Spaces:
Running
Running
Static MEDTRACE workstation: export, recorded responses and assets
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +2 -35
- 404.html +1 -0
- 404/index.html +1 -0
- _next/static/3FTYk2NLW5nOk64NExprH/_buildManifest.js +1 -0
- _next/static/3FTYk2NLW5nOk64NExprH/_ssgManifest.js +1 -0
- _next/static/DGlq7oEfmh1JjD6ikGNzk/_buildManifest.js +1 -0
- _next/static/DGlq7oEfmh1JjD6ikGNzk/_ssgManifest.js +1 -0
- _next/static/chunks/139.8d54880d25bc452f.js +1 -0
- _next/static/chunks/141-d76cad12a8d5b9c5.js +1 -0
- _next/static/chunks/156-38979c8018e9e56b.js +0 -0
- _next/static/chunks/178.c399c7425cacc4ec.js +1 -0
- _next/static/chunks/199.9b66732a108fbca1.js +1 -0
- _next/static/chunks/255-91b6ab0b096141ad.js +0 -0
- _next/static/chunks/405.19edef85d9a977c9.js +1 -0
- _next/static/chunks/467ef8ee-6369ff81ae928fb4.js +0 -0
- _next/static/chunks/481.6d33ebcca51aa184.js +558 -0
- _next/static/chunks/4bd1b696-409494caf8c83275.js +0 -0
- _next/static/chunks/534.8ac9c9b001e41ba4.js +1 -0
- _next/static/chunks/646.c2c67a3e35c59670.js +1 -0
- _next/static/chunks/658-3bc27228933a69df.js +0 -0
- _next/static/chunks/808.846f0159cc232e21.js +1 -0
- _next/static/chunks/942.1c41165479333662.js +0 -0
- _next/static/chunks/987.0c5b0a0d50e19d04.js +1 -0
- _next/static/chunks/app/_not-found/page-9a083be54ecaf07f.js +1 -0
- _next/static/chunks/app/layout-23ac75db55e2192c.js +1 -0
- _next/static/chunks/app/page-91f7834d38336646.js +1 -0
- _next/static/chunks/app/page-95b07fc08ebfaa5d.js +1 -0
- _next/static/chunks/compute.d10654f9aa3589b1.js +1 -0
- _next/static/chunks/framework-e180e6045d9bc50e.js +0 -0
- _next/static/chunks/main-599738e4e4dd0ebe.js +0 -0
- _next/static/chunks/main-app-674d0f61ba780985.js +1 -0
- _next/static/chunks/pages/_app-0d6ce27712411be2.js +1 -0
- _next/static/chunks/pages/_error-a8479a8c7bc399cf.js +1 -0
- _next/static/chunks/polyfills-42372ed130431b0a.js +0 -0
- _next/static/chunks/webpack-cdf507f9780ee5a2.js +1 -0
- _next/static/css/d9023e9e90080539.css +1 -0
- api/ai-observations/041c2146-8e58-4c2d-b5dd-6c888ff2447e.json +1 -0
- api/ai-observations/05e8f381-fc6b-4afa-a8ae-e1a8888b7be3.json +1 -0
- api/ai-observations/0a1ba0ca-23d8-46ed-9974-f86a08bf7027.json +1 -0
- api/ai-observations/0e36f014-cba2-4b67-a60a-d5c720f13384.json +1 -0
- api/ai-observations/1644cc40-79e6-47bf-a4e4-51c8248a7ad9.json +1 -0
- api/ai-observations/2043be8c-57f4-4845-88d0-cadadd106f19.json +1 -0
- api/ai-observations/2166fc98-aac6-45a6-855a-bad61c98e806.json +1 -0
- api/ai-observations/2be8a602-8102-4bf4-a6a0-87df5f84f3c1.json +1 -0
- api/ai-observations/31d3fa6c-d577-4972-9845-fd45c6d03801.json +1 -0
- api/ai-observations/37ab76a9-f8d9-4ccb-8ae7-5b617bc333f8.json +1 -0
- api/ai-observations/4709627e-6d9f-467a-9c36-76e45ed24071.json +1 -0
- api/ai-observations/4ec108df-781d-4553-b5e0-56aa6c18c94a.json +1 -0
- api/ai-observations/5cbd85a6-01b0-40aa-b6ba-eb8a5dd942c3.json +1 -0
- api/ai-observations/65c97660-6722-4a04-8a81-840ce91c1a8d.json +1 -0
.gitattributes
CHANGED
|
@@ -1,35 +1,2 @@
|
|
| 1 |
-
*.
|
| 2 |
-
*.
|
| 3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 1 |
+
*.gif filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
404.html
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html><!--DGlq7oEfmh1JjD6ikGNzk--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/d9023e9e90080539.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-cdf507f9780ee5a2.js"/><script src="/_next/static/chunks/4bd1b696-409494caf8c83275.js" async=""></script><script src="/_next/static/chunks/255-91b6ab0b096141ad.js" async=""></script><script src="/_next/static/chunks/main-app-674d0f61ba780985.js" async=""></script><script src="/_next/static/chunks/141-d76cad12a8d5b9c5.js" async=""></script><script src="/_next/static/chunks/app/layout-23ac75db55e2192c.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>MEDTRACE — Longitudinal Brain MRI</title><meta name="description" content="Research prototype for longitudinal brain MRI disease evolution. Not for diagnosis."/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-cdf507f9780ee5a2.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[44079,[\"141\",\"static/chunks/141-d76cad12a8d5b9c5.js\",\"177\",\"static/chunks/app/layout-23ac75db55e2192c.js\"],\"QueryProvider\"]\n3:I[9766,[],\"\"]\n4:I[98924,[],\"\"]\n5:I[24431,[],\"OutletBoundary\"]\n7:I[15278,[],\"AsyncMetadataOutlet\"]\n9:I[24431,[],\"ViewportBoundary\"]\nb:I[24431,[],\"MetadataBoundary\"]\nc:\"$Sreact.suspense\"\ne:I[57150,[],\"\"]\n:HL[\"/_next/static/css/d9023e9e90080539.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"DGlq7oEfmh1JjD6ikGNzk\",\"p\":\"\",\"c\":[\"\",\"_not-found\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/d9023e9e90080539.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$L6\",[\"$\",\"$L7\",null,{\"promise\":\"$@8\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L9\",null,{\"children\":\"$La\"}],null],[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$c\",null,{\"fallback\":null,\"children\":\"$Ld\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n6:null\n"])</script><script>self.__next_f.push([1,"8:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"MEDTRACE — Longitudinal Brain MRI\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Research prototype for longitudinal brain MRI disease evolution. Not for diagnosis.\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"d:\"$8:metadata\"\n"])</script></body></html>
|
404/index.html
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html><!--DGlq7oEfmh1JjD6ikGNzk--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/d9023e9e90080539.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-cdf507f9780ee5a2.js"/><script src="/_next/static/chunks/4bd1b696-409494caf8c83275.js" async=""></script><script src="/_next/static/chunks/255-91b6ab0b096141ad.js" async=""></script><script src="/_next/static/chunks/main-app-674d0f61ba780985.js" async=""></script><script src="/_next/static/chunks/141-d76cad12a8d5b9c5.js" async=""></script><script src="/_next/static/chunks/app/layout-23ac75db55e2192c.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>MEDTRACE — Longitudinal Brain MRI</title><meta name="description" content="Research prototype for longitudinal brain MRI disease evolution. Not for diagnosis."/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-cdf507f9780ee5a2.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[44079,[\"141\",\"static/chunks/141-d76cad12a8d5b9c5.js\",\"177\",\"static/chunks/app/layout-23ac75db55e2192c.js\"],\"QueryProvider\"]\n3:I[9766,[],\"\"]\n4:I[98924,[],\"\"]\n5:I[24431,[],\"OutletBoundary\"]\n7:I[15278,[],\"AsyncMetadataOutlet\"]\n9:I[24431,[],\"ViewportBoundary\"]\nb:I[24431,[],\"MetadataBoundary\"]\nc:\"$Sreact.suspense\"\ne:I[57150,[],\"\"]\n:HL[\"/_next/static/css/d9023e9e90080539.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"DGlq7oEfmh1JjD6ikGNzk\",\"p\":\"\",\"c\":[\"\",\"_not-found\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/d9023e9e90080539.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$L6\",[\"$\",\"$L7\",null,{\"promise\":\"$@8\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L9\",null,{\"children\":\"$La\"}],null],[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$c\",null,{\"fallback\":null,\"children\":\"$Ld\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n6:null\n"])</script><script>self.__next_f.push([1,"8:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"MEDTRACE — Longitudinal Brain MRI\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Research prototype for longitudinal brain MRI disease evolution. Not for diagnosis.\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"d:\"$8:metadata\"\n"])</script></body></html>
|
_next/static/3FTYk2NLW5nOk64NExprH/_buildManifest.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
self.__BUILD_MANIFEST=function(e,r,t){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:2,errorRate:1e-4,numBits:39,numHashes:14,bitArray:[0,1,1,0,r,e,e,r,r,e,e,r,e,e,e,r,r,e,e,e,e,r,e,r,r,r,r,e,e,e,r,e,r,e,r,e,e,e,r]},__routerFilterDynamic:{numItems:r,errorRate:1e-4,numBits:r,numHashes:null,bitArray:[]},"/_error":["static/chunks/pages/_error-a8479a8c7bc399cf.js"],sortedPages:["/_app","/_error"]}}(1,0,1e-4),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
_next/static/3FTYk2NLW5nOk64NExprH/_ssgManifest.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()
|
_next/static/DGlq7oEfmh1JjD6ikGNzk/_buildManifest.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
self.__BUILD_MANIFEST=function(e,r,t){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:2,errorRate:1e-4,numBits:39,numHashes:14,bitArray:[0,1,1,0,r,e,e,r,r,e,e,r,e,e,e,r,r,e,e,e,e,r,e,r,r,r,r,e,e,e,r,e,r,e,r,e,e,e,r]},__routerFilterDynamic:{numItems:r,errorRate:1e-4,numBits:r,numHashes:null,bitArray:[]},"/_error":["static/chunks/pages/_error-a8479a8c7bc399cf.js"],sortedPages:["/_app","/_error"]}}(1,0,1e-4),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
_next/static/DGlq7oEfmh1JjD6ikGNzk/_ssgManifest.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()
|
_next/static/chunks/139.8d54880d25bc452f.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[139],{45139:(e,t,l)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let u=l(64252),n=l(37876),a=u._(l(14232)),o=l(1033);async function r(e){let{Component:t,ctx:l}=e;return{pageProps:await (0,o.loadGetInitialProps)(t,l)}}class s extends a.default.Component{render(){let{Component:e,pageProps:t}=this.props;return(0,n.jsx)(e,{...t})}}s.origGetInitialProps=r,s.getInitialProps=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)}}]);
|
_next/static/chunks/141-d76cad12a8d5b9c5.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[141],{31668:(t,e,s)=>{s.d(e,{X:()=>o,k:()=>u});var i=s(34049),n=s(74268),r=s(93049),a=s(69781),o=class extends a.k{#t;#e;#s;#i;#n;#r;#a;constructor(t){super(),this.#a=!1,this.#r=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#s=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=h(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(t){if(this.options={...this.#r,...t},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let t=h(this.options);void 0!==t.data&&(this.setData(t.data,{updatedAt:t.dataUpdatedAt,manual:!0}),this.#t=t)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#s.remove(this)}setData(t,e){let s=(0,i.pl)(this.state.data,t,this.options);return this.#o({data:s,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),s}setState(t,e){this.#o({type:"setState",state:t,setStateOptions:e})}cancel(t){let e=this.#n?.promise;return this.#n?.cancel(t),e?e.then(i.lQ).catch(i.lQ):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(t=>!1!==(0,i.Eh)(t.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===i.hT||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(t=>"static"===(0,i.d2)(t.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(t=0){return void 0===this.state.data||"static"!==t&&(!!this.state.isInvalidated||!(0,i.j3)(this.state.dataUpdatedAt,t))}onFocus(){let t=this.observers.find(t=>t.shouldFetchOnWindowFocus());t?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){let t=this.observers.find(t=>t.shouldFetchOnReconnect());t?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#n&&(this.#a?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(t,e){if("idle"!==this.state.fetchStatus&&this.#n?.status()!=="rejected"){if(void 0!==this.state.data&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(t&&this.setOptions(t),!this.options.queryFn){let t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}let s=new AbortController,n=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(this.#a=!0,s.signal)})},a=()=>{let t=(0,i.ZM)(this.options,e),s=(()=>{let t={client:this.#i,queryKey:this.queryKey,meta:this.meta};return n(t),t})();return(this.#a=!1,this.options.persister)?this.options.persister(t,s,this):t(s)},o=(()=>{let t={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:a};return n(t),t})();this.options.behavior?.onFetch(o,this),this.#e=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#o({type:"fetch",meta:o.fetchOptions?.meta}),this.#n=(0,r.II)({initialPromise:e?.initialPromise,fn:o.fetchFn,onCancel:t=>{t instanceof r.cc&&t.revert&&this.setState({...this.#e,fetchStatus:"idle"}),s.abort()},onFail:(t,e)=>{this.#o({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{let t=await this.#n.start();if(void 0===t)throw Error(`${this.queryHash} data is undefined`);return this.setData(t),this.#s.config.onSuccess?.(t,this),this.#s.config.onSettled?.(t,this.state.error,this),t}catch(t){if(t instanceof r.cc){if(t.silent)return this.#n.promise;else if(t.revert){if(void 0===this.state.data)throw t;return this.state.data}}throw this.#o({type:"error",error:t}),this.#s.config.onError?.(t,this),this.#s.config.onSettled?.(this.state.data,t,this),t}finally{this.scheduleGc()}}#o(t){let e=e=>{switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,...u(e.data,this.options),fetchMeta:t.meta??null};case"success":let s={...e,data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=t.manual?s:void 0,s;case"error":let i=t.error;return{...e,error:i,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}};this.state=e(this.state),n.jG.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:t})})}};function u(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,r.v_)(e.networkMode)?"fetching":"paused",...void 0===t&&{error:null,status:"pending"}}}function h(t){let e="function"==typeof t.initialData?t.initialData():t.initialData,s=void 0!==e,i=s?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}},34049:(t,e,s)=>{s.d(e,{Cp:()=>y,EN:()=>f,Eh:()=>c,F$:()=>p,GU:()=>E,MK:()=>l,S$:()=>n,ZM:()=>j,ZZ:()=>F,Zw:()=>a,d2:()=>h,f8:()=>m,gn:()=>o,hT:()=>T,j3:()=>u,lQ:()=>r,nJ:()=>d,pl:()=>C,y9:()=>O,yy:()=>S});var i=s(37126),n="undefined"==typeof window||"Deno"in globalThis;function r(){}function a(t,e){return"function"==typeof t?t(e):t}function o(t){return"number"==typeof t&&t>=0&&t!==1/0}function u(t,e){return Math.max(t+(e||0)-Date.now(),0)}function h(t,e){return"function"==typeof t?t(e):t}function c(t,e){return"function"==typeof t?t(e):t}function l(t,e){let{type:s="all",exact:i,fetchStatus:n,predicate:r,queryKey:a,stale:o}=t;if(a){if(i){if(e.queryHash!==p(a,e.options))return!1}else if(!y(e.queryKey,a))return!1}if("all"!==s){let t=e.isActive();if("active"===s&&!t||"inactive"===s&&t)return!1}return("boolean"!=typeof o||e.isStale()===o)&&(!n||n===e.state.fetchStatus)&&(!r||!!r(e))}function d(t,e){let{exact:s,status:i,predicate:n,mutationKey:r}=t;if(r){if(!e.options.mutationKey)return!1;if(s){if(f(e.options.mutationKey)!==f(r))return!1}else if(!y(e.options.mutationKey,r))return!1}return(!i||e.state.status===i)&&(!n||!!n(e))}function p(t,e){return(e?.queryKeyHashFn||f)(t)}function f(t){return JSON.stringify(t,(t,e)=>g(e)?Object.keys(e).sort().reduce((t,s)=>(t[s]=e[s],t),{}):e)}function y(t,e){return t===e||typeof t==typeof e&&!!t&&!!e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).every(s=>y(t[s],e[s]))}var v=Object.prototype.hasOwnProperty;function m(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let s in t)if(t[s]!==e[s])return!1;return!0}function b(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function g(t){if(!w(t))return!1;let e=t.constructor;if(void 0===e)return!0;let s=e.prototype;return!!w(s)&&!!s.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(t)===Object.prototype}function w(t){return"[object Object]"===Object.prototype.toString.call(t)}function S(t){return new Promise(e=>{i.zs.setTimeout(e,t)})}function C(t,e,s){return"function"==typeof s.structuralSharing?s.structuralSharing(t,e):!1!==s.structuralSharing?function t(e,s){if(e===s)return e;let i=b(e)&&b(s);if(!i&&!(g(e)&&g(s)))return s;let n=(i?e:Object.keys(e)).length,r=i?s:Object.keys(s),a=r.length,o=i?Array(a):{},u=0;for(let h=0;h<a;h++){let a=i?h:r[h],c=e[a],l=s[a];if(c===l){o[a]=c,(i?h<n:v.call(e,a))&&u++;continue}if(null===c||null===l||"object"!=typeof c||"object"!=typeof l){o[a]=l;continue}let d=t(c,l);o[a]=d,d===c&&u++}return n===a&&u===n?e:o}(t,e):e}function O(t,e,s=0){let i=[...t,e];return s&&i.length>s?i.slice(1):i}function F(t,e,s=0){let i=[e,...t];return s&&i.length>s?i.slice(0,-1):i}var T=Symbol();function j(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:t.queryFn&&t.queryFn!==T?t.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${t.queryHash}'`))}function E(t,e){return"function"==typeof t?t(...e):!!t}},37126:(t,e,s)=>{s.d(e,{Zq:()=>r,zs:()=>n});var i={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},n=new class{#u=i;#h=!1;setTimeoutProvider(t){this.#u=t}setTimeout(t,e){return this.#u.setTimeout(t,e)}clearTimeout(t){this.#u.clearTimeout(t)}setInterval(t,e){return this.#u.setInterval(t,e)}clearInterval(t){this.#u.clearInterval(t)}};function r(t){setTimeout(t,0)}},38445:(t,e,s)=>{s.d(e,{Q:()=>i});var i=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},38559:(t,e,s)=>{s.d(e,{$:()=>o,s:()=>a});var i=s(74268),n=s(69781),r=s(93049),a=class extends n.k{#i;#c;#l;#n;constructor(t){super(),this.#i=t.client,this.mutationId=t.mutationId,this.#l=t.mutationCache,this.#c=[],this.state=t.state||o(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#c.includes(t)||(this.#c.push(t),this.clearGcTimeout(),this.#l.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#c=this.#c.filter(e=>e!==t),this.scheduleGc(),this.#l.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#c.length||("pending"===this.state.status?this.scheduleGc():this.#l.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#o({type:"continue"})},s={client:this.#i,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=(0,r.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#o({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#o({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#l.canRun(this)});let i="pending"===this.state.status,n=!this.#n.canStart();try{if(i)e();else{this.#o({type:"pending",variables:t,isPaused:n}),await this.#l.config.onMutate?.(t,this,s);let e=await this.options.onMutate?.(t,s);e!==this.state.context&&this.#o({type:"pending",context:e,variables:t,isPaused:n})}let r=await this.#n.start();return await this.#l.config.onSuccess?.(r,t,this.state.context,this,s),await this.options.onSuccess?.(r,t,this.state.context,s),await this.#l.config.onSettled?.(r,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(r,null,t,this.state.context,s),this.#o({type:"success",data:r}),r}catch(e){try{throw await this.#l.config.onError?.(e,t,this.state.context,this,s),await this.options.onError?.(e,t,this.state.context,s),await this.#l.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(void 0,e,t,this.state.context,s),e}finally{this.#o({type:"error",error:e})}}finally{this.#l.runNext(this)}}#o(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),i.jG.batch(()=>{this.#c.forEach(e=>{e.onMutationUpdate(t)}),this.#l.notify({mutation:this,type:"updated",action:t})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},56195:(t,e,s)=>{s.d(e,{m:()=>r});var i=s(38445),n=s(34049),r=new class extends i.Q{#d;#p;#f;constructor(){super(),this.#f=t=>{if(!n.S$&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#p||this.setEventListener(this.#f)}onUnsubscribe(){this.hasListeners()||(this.#p?.(),this.#p=void 0)}setEventListener(t){this.#f=t,this.#p?.(),this.#p=t(t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})}setFocused(t){this.#d!==t&&(this.#d=t,this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return"boolean"==typeof this.#d?this.#d:globalThis.document?.visibilityState!=="hidden"}}},63122:(t,e,s)=>{s.d(e,{t:()=>r});var i=s(38445),n=s(34049),r=new class extends i.Q{#y=!0;#p;#f;constructor(){super(),this.#f=t=>{if(!n.S$&&window.addEventListener){let e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#p||this.setEventListener(this.#f)}onUnsubscribe(){this.hasListeners()||(this.#p?.(),this.#p=void 0)}setEventListener(t){this.#f=t,this.#p?.(),this.#p=t(this.setOnline.bind(this))}setOnline(t){this.#y!==t&&(this.#y=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#y}}},69781:(t,e,s)=>{s.d(e,{k:()=>r});var i=s(37126),n=s(34049),r=class{#v;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,n.gn)(this.gcTime)&&(this.#v=i.zs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(n.S$?1/0:3e5))}clearGcTimeout(){this.#v&&(i.zs.clearTimeout(this.#v),this.#v=void 0)}}},74268:(t,e,s)=>{s.d(e,{jG:()=>n});var i=s(37126).Zq,n=function(){let t=[],e=0,s=t=>{t()},n=t=>{t()},r=i,a=i=>{e?t.push(i):r(()=>{s(i)})};return{batch:i=>{let a;e++;try{a=i()}finally{--e||(()=>{let e=t;t=[],e.length&&r(()=>{n(()=>{e.forEach(t=>{s(t)})})})})()}return a},batchCalls:t=>(...e)=>{a(()=>{t(...e)})},schedule:a,setNotifyFunction:t=>{s=t},setBatchNotifyFunction:t=>{n=t},setScheduler:t=>{r=t}}}()},83515:(t,e,s)=>{s.d(e,{T:()=>i});function i(){let t,e,s=new Promise((s,i)=>{t=s,e=i});function i(t){Object.assign(s,t),delete s.resolve,delete s.reject}return s.status="pending",s.catch(()=>{}),s.resolve=e=>{i({status:"fulfilled",value:e}),t(e)},s.reject=t=>{i({status:"rejected",reason:t}),e(t)},s}},93049:(t,e,s)=>{s.d(e,{II:()=>c,cc:()=>h,v_:()=>u});var i=s(56195),n=s(63122),r=s(83515),a=s(34049);function o(t){return Math.min(1e3*2**t,3e4)}function u(t){return(t??"online")!=="online"||n.t.isOnline()}var h=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function c(t){let e,s=!1,c=0,l=(0,r.T)(),d=()=>i.m.isFocused()&&("always"===t.networkMode||n.t.isOnline())&&t.canRun(),p=()=>u(t.networkMode)&&t.canRun(),f=t=>{"pending"===l.status&&(e?.(),l.resolve(t))},y=t=>{"pending"===l.status&&(e?.(),l.reject(t))},v=()=>new Promise(s=>{e=t=>{("pending"!==l.status||d())&&s(t)},t.onPause?.()}).then(()=>{e=void 0,"pending"===l.status&&t.onContinue?.()}),m=()=>{let e;if("pending"!==l.status)return;let i=0===c?t.initialPromise:void 0;try{e=i??t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(f).catch(e=>{if("pending"!==l.status)return;let i=t.retry??3*!a.S$,n=t.retryDelay??o,r="function"==typeof n?n(c,e):n,u=!0===i||"number"==typeof i&&c<i||"function"==typeof i&&i(c,e);if(s||!u)return void y(e);c++,t.onFail?.(c,e),(0,a.yy)(r).then(()=>d()?void 0:v()).then(()=>{s?y(e):m()})})};return{promise:l,status:()=>l.status,cancel:e=>{if("pending"===l.status){let s=new h(e);y(s),t.onCancel?.(s)}},continue:()=>(e?.(),l),cancelRetry:()=>{s=!0},continueRetry:()=>{s=!1},canStart:p,start:()=>(p()?m():v().then(m),l)}}},99776:(t,e,s)=>{s.d(e,{Ht:()=>o,jE:()=>a});var i=s(12115),n=s(95155),r=i.createContext(void 0),a=t=>{let e=i.useContext(r);if(t)return t;if(!e)throw Error("No QueryClient set, use QueryClientProvider to set one");return e},o=t=>{let{client:e,children:s}=t;return i.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,n.jsx)(r.Provider,{value:e,children:s})}}}]);
|
_next/static/chunks/156-38979c8018e9e56b.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
_next/static/chunks/178.c399c7425cacc4ec.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[178],{36178:(e,t,n)=>{n.d(t,{A5:()=>h,BX:()=>C,CB:()=>V,Oh:()=>S,Pf:()=>z,Q4:()=>v,S2:()=>o,cJ:()=>s,lD:()=>w,ow:()=>p,rr:()=>I,wn:()=>E,xI:()=>f});var l=n(70192),r=n(54987),i=n(20205);let a=null;function u(){return null!=a||(a=(async()=>{await (0,l.Ts)(),await (0,i.Ts)(),(0,r.Ts)(),l.R2.registerImageLoader("nifti",r.nL),(0,i.Gx)(i.Du),(0,i.Gx)(i.CH),(0,i.Gx)(i.OQ),(0,i.Gx)(i.ae),(0,i.Gx)(i.LW),l.PP.setMaxCacheSize(5e8),window.cornerstone={cache:l.PP,cacheStats:E}})()),a}let c=new Map;async function o(e){await u();let t=c.get(e);if(t)return t;let n=(0,r.AZ)({url:e}).catch(t=>{throw c.delete(e),t});return c.set(e,n),n}function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:99,l=[],r=Math.max(1,Math.floor(e.length/2e5));for(let t=0;t<e.length;t+=r){let n=e[t];Number.isFinite(n)&&n>0&&l.push(n)}if(l.length<100)return null;l.sort((e,t)=>e-t);let i=e=>l[Math.min(l.length-1,Math.floor(e/100*l.length))],a=i(t),u=i(n);return u>a?{lower:a,upper:u}:null}function h(e){var t,n;let l=e.voxelManager;if(!l)return null;try{let e=null==(t=l.getMiddleSliceData)?void 0:t.call(l);if(null==e?void 0:e.length)return e}catch(e){}try{let e=null==(n=l.getScalarData)?void 0:n.call(l);if(null==e?void 0:e.length)return e}catch(e){}let r=e.dimensions;if(!l.getAtIndex||!r||r.length<3)return null;let i=r[0]*r[1]*r[2];if(!i)return null;let a=Math.max(1,Math.floor(i/1e5)),u=[];for(let e=0;e<i;e+=a)try{u.push(l.getAtIndex(e))}catch(e){break}return u.length?u:null}let d=new Map;function s(e,t){d.set(e,t),t&&function(e){let t=g.indexOf(e);-1!==t&&g.splice(t,1),g.push(e)}(t),function(){let e=new Set([...d.values()].filter(Boolean)),t=l.PP.getVolumes().map(e=>null==e?void 0:e.volumeId).filter(Boolean),n=l.PP.getCacheSize()>=.6*l.PP.getMaxCacheSize(),r=t.length>6;if(!n&&!r)return;let i=[...t.filter(t=>!g.includes(t)&&!e.has(t)),...g.filter(n=>t.includes(n)&&!e.has(n))],a=t.length;for(let e of i){if(!(l.PP.getCacheSize()>=.6*l.PP.getMaxCacheSize())&&a<=6)break;try{l.PP.removeVolumeLoadObject(e);let t=g.indexOf(e);for(let[n]of(-1!==t&&g.splice(t,1),c))e.endsWith(n)&&c.delete(n);a-=1}catch(e){}}}()}let g=[],m="medtrace",P=null;async function w(){return await u(),P&&P.hasBeenDestroyed&&(P=null),null!=P||(P=new l.vR(m)),P}let v=m,x=!0,y=l.fX.sV.CAMERA_MODIFIED,M=new Map;function p(e,t){let n=function(e){var t;let n=M.get(e);if(n)return n;let l="medtrace-slice-".concat(e);return n=null!=(t=i._K.getSynchronizer(l))?t:i._K.createSynchronizer(l,y,(e,t,n)=>{if(t.viewportId===n.viewportId)return;let l=P;if(!l)return;let r=l.getViewport(t.viewportId),i=l.getViewport(n.viewportId);if(!r||!i)return;let a=function(e){try{let t=e.getNumberOfSlices();if(!t||t<2)return null;let n=e.getSliceIndex();if(!Number.isFinite(n))return null;return Math.min(1,Math.max(0,n/(t-1)))}catch(e){return null}}(r);if(null!==a)try{let e=i.getNumberOfSlices();if(!e||e<2)return;let t=Math.round(a*(e-1));if(i.getSliceIndex()===t)return;let n=i.getVolumeId();if(!n)return;i.setViewReference({volumeId:n,viewPlaneNormal:i.getCamera().viewPlaneNormal,sliceIndex:t}),i.render()}catch(e){}}),M.set(e,n),n}(e);try{n.add({renderingEngineId:m,viewportId:t}),n.setEnabled(x)}catch(e){}}function S(e,t){try{var n;null==(n=M.get(e))||n.remove({renderingEngineId:m,viewportId:t})}catch(e){}}function I(e){for(let t of(x=e,M.values()))try{t.setEnabled(e)}catch(e){}}function C(){return x}let b=new Set;function z(e){return b.add(e),()=>b.delete(e)}function V(){try{null==P||P.destroy()}catch(e){}for(let[e,t]of(P=null,M)){try{t.destroy()}catch(e){}M.delete(e)}try{l.PP.purgeVolumeCache()}catch(e){}for(let e of(c.clear(),g.length=0,d.clear(),b))e()}function E(){return{bytes:l.PP.getCacheSize(),max:l.PP.getMaxCacheSize(),volumes:l.PP.getVolumes().length}}}}]);
|
_next/static/chunks/199.9b66732a108fbca1.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[199],{22199:(e,t,n)=>{n.r(t),n.d(t,{NiftiViewport:()=>m,ORIENTATIONS:()=>f});var r=n(95155),l=n(70192),o=n(20205),i=n(12115),a=n(85330),c=n(36178);let{NV:u,KY:s}=l.fX,{iP:d}=o.fX,f=["axial","coronal","sagittal"],v={axial:s.AXIAL,coronal:s.CORONAL,sagittal:s.SAGITTAL};function m(e){var t,n;let{pane:s,fileUrl:m,orientation:p,mask:w,onStatusChange:g,onRenderedChange:x}=e,y=(0,i.useRef)({axial:null,coronal:null,sagittal:null}),h=(0,i.useRef)(null),b=(0,i.useRef)(null),[E,A]=(0,i.useState)(!1),[N,O]=(0,i.useState)({state:"idle"}),[V,k]=(0,i.useState)(0),[I,C]=(0,i.useState)(null),[S,T]=(0,i.useState)(null),[R,j]=(0,i.useState)(null),[D,L]=(0,i.useState)(null),G=(0,i.useRef)(Promise.resolve()),P=(0,i.useRef)(0),z=(0,i.useRef)(0),_=(0,i.useRef)(null),B="tools-".concat(s),F=void 0!==m&&null!==I&&I.url===m&&I.orientation===p;return(0,i.useEffect)(()=>{null==g||g(N)},[N,g]),(0,i.useEffect)(()=>{null==x||x(F?m:null)},[F,m,x]),(0,i.useEffect)(()=>{let e=f.map(e=>y.current[e]);if(e.some(e=>!e))return;let t=!1;return(async function(){let n=await (0,c.lD)();if(t)return;for(let[t,r]of(b.current=n,f.entries()))n.enableElement({viewportId:"viewport-".concat(s,"-").concat(r),type:u.ORTHOGRAPHIC,element:e[t],defaultOptions:{orientation:v[r],background:[0,0,0]}});o.dU.getToolGroup(B)&&o.dU.destroyToolGroup(B);let r=o.dU.createToolGroup(B);if(r){for(let e of f)r.addViewport("viewport-".concat(s,"-").concat(e),c.Q4);for(let e of[o.Du,o.CH,o.OQ,o.ae])r.addTool(e.toolName);r.setToolActive(o.Du.toolName,{bindings:[{mouseButton:d.Primary}]}),r.setToolActive(o.CH.toolName,{bindings:[{mouseButton:d.Auxiliary}]}),r.setToolActive(o.OQ.toolName,{bindings:[{mouseButton:d.Secondary}]}),r.setToolActive(o.ae.toolName,{bindings:[{mouseButton:d.Wheel}]})}for(let e of f)(0,c.ow)(e,"viewport-".concat(s,"-").concat(e));A(!0)})().catch(e=>{t||O({state:"error",message:e instanceof Error?e.message:"Viewer failed to initialise"})}),()=>{t=!0,A(!1),C(null);try{o.dU.destroyToolGroup(B)}catch(e){}for(let t of f){(0,c.Oh)(t,"viewport-".concat(s,"-").concat(t));try{var e;null==(e=b.current)||e.disableElement("viewport-".concat(s,"-").concat(t))}catch(e){}}b.current=null,(0,c.cJ)(s,null)}},[s,B,V]),(0,i.useEffect)(()=>{function e(e){e.preventDefault(),C(null),O({state:"error",message:"Graphics context lost. Recovering…"}),setTimeout(()=>(0,c.CB)(),250)}return window.addEventListener("webglcontextlost",e,!0),document.addEventListener("webglcontextlost",e,!0),()=>{window.removeEventListener("webglcontextlost",e,!0),document.removeEventListener("webglcontextlost",e,!0)}},[]),(0,i.useEffect)(()=>(0,c.Pf)(()=>{A(!1),C(null),b.current=null,k(e=>e+1)}),[]),(0,i.useEffect)(()=>{if(!E)return;let e=b.current;if(!e)return;P.current+=1;let t=P.current;if(C(null),_.current&&((0,a.dp)(_.current.viewportId,_.current.segmentationId),_.current=null,z.current+=1,T(null),L(null)),!m){for(let t of f){let n=e.getViewport("viewport-".concat(s,"-").concat(t));try{null==n||n.removeAllActors(),null==n||n.render()}catch(e){}}O({state:"idle"}),(0,c.cJ)(s,null);return}let n="viewport-".concat(s,"-").concat(p),r="nifti:".concat(m);async function o(){if(P.current===t){O({state:"loading"});try{var o,i,a;let u=await (0,c.S2)(m);if(P.current!==t)return;if(0===u.length)throw Error("Volume contained no slices");let s=await l.UH.createAndCacheVolumeFromImages(r,u);if(P.current!==t)return;let d=e.getViewport(n);if(!d)throw Error("Viewport is not available");if(await d.setVolumes([{volumeId:r}],!1),P.current!==t||(await (null==(o=s.load)?void 0:o.call(s)),P.current!==t))return;let f=(0,c.A5)(s),v=f?(0,c.xI)(f):null;if(v&&d.setProperties({voiRange:v}),d.resetCamera(),d.render(),P.current!==t)return;let w=null!=(i=s.dimensions)?i:[];O({state:"ready",slices:null!=(a=w[2])?a:u.length}),C({url:m,orientation:p})}catch(e){if(P.current!==t)return;C(null),O({state:"error",message:e instanceof Error?e.message:"Could not render volume"})}}}(0,c.cJ)(s,r),G.current=G.current.then(o,o)},[E,m,p,s]),(0,i.useEffect)(()=>{if(!E||!F)return;let e="viewport-".concat(s,"-").concat(p),t="nifti:".concat(m),n=null==w?void 0:w.url,r=null==w?void 0:w.key;if(!n||!r||!(null==w?void 0:w.visible)){var l;_.current&&((0,a.dp)(_.current.viewportId,_.current.segmentationId),_.current=null),z.current+=1,T(null),L(null),null==(l=b.current)||l.renderViewports([e]);return}let o=(0,a.bh)(r),i="labelmap:".concat(r);z.current+=1;let c=z.current,u=()=>z.current!==c;async function d(){if(!u())try{var r,l;let c=await (0,a.zE)(n,t,i);if(u())return;(0,a.dp)(e,o),(0,a.o)(o,i),(0,a.Cn)(e,o,{outlineOnly:w.outlineOnly,opacity:w.opacity}),(0,a.ml)(e,o),_.current={viewportId:e,segmentationId:o},null==(r=b.current)||r.renderViewports([e]);let s=null==(l=b.current)?void 0:l.getViewport(e),d={outlineOnly:w.outlineOnly,opacity:w.opacity};(async()=>{let t=await (0,a.kl)(s,i,3e4);if(!u()&&(L(t),t))for(let t of[0,250,750,1500]){var n;if(t&&await new Promise(e=>setTimeout(e,t)),u())return;(0,a.Iy)(e,o,d),null==(n=b.current)||n.renderViewports([e])}})(),T(c)}catch(e){if(u())return;T(null),j(e instanceof Error?e.message:"Could not draw the tumour mask")}}return j(null),G.current=G.current.then(d,d),()=>{z.current+=1}},[E,F,s,p,m,null==w?void 0:w.url,null==w?void 0:w.key,null==w?void 0:w.visible]),(0,i.useEffect)(()=>{var e;(null==w?void 0:w.key)&&w.visible&&((0,a.AV)((0,a.bh)(w.key),{outlineOnly:w.outlineOnly,opacity:w.opacity}),null==(e=b.current)||e.renderViewports(["viewport-".concat(s,"-").concat(p)]))},[null==w?void 0:w.key,null==w?void 0:w.visible,null==w?void 0:w.outlineOnly,null==w?void 0:w.opacity,s,p]),(0,i.useEffect)(()=>{if(!E)return;let e=y.current[p],t=h.current;if(e&&t)return n(),e.addEventListener(l.fX.sV.CAMERA_MODIFIED,n),()=>e.removeEventListener(l.fX.sV.CAMERA_MODIFIED,n);function n(){var e;let n=null==(e=b.current)?void 0:e.getViewport("viewport-".concat(s,"-").concat(p));if(n)try{let e=n.getNumberOfSlices();if(!e)return;t.dataset.sliceIndex=String(n.getSliceIndex()),t.dataset.sliceCount=String(e)}catch(e){}}},[E,p,s,F]),(0,i.useEffect)(()=>{if(!E||!F)return;let e=b.current;if(!e)return;let t=requestAnimationFrame(()=>{try{e.renderViewports(["viewport-".concat(s,"-").concat(p)])}catch(e){}});return()=>cancelAnimationFrame(t)},[E,F,p,s]),(0,r.jsxs)("div",{ref:h,className:"relative size-full","data-rendered-url":F?m:"","data-mask-voxels":null!=(t=null==S?void 0:S.voxels)?t:"","data-mask-labels":null!=(n=null==S?void 0:S.labels.join(","))?n:"","data-mask-attached":null===D?"":String(D),"data-testid":"pane-".concat(s),children:[f.map(e=>(0,r.jsx)("div",{ref:t=>{y.current[e]=t},className:e===p?"absolute inset-0 z-10 bg-black":"pointer-events-none invisible absolute inset-0 z-0 bg-black",onContextMenu:e=>e.preventDefault(),"data-testid":e===p?"viewport-".concat(s):"viewport-".concat(s,"-").concat(e,"-hidden")},e)),F&&R&&(0,r.jsx)("p",{className:"absolute bottom-2 right-2 z-20 max-w-[60%] text-right text-[9px] leading-tight text-signal-uncertain",children:R}),!F&&(0,r.jsxs)("div",{className:"absolute inset-0 z-20 flex items-center justify-center bg-clinical-900",children:["loading"===N.state&&(0,r.jsx)("p",{className:"text-[10px] uppercase tracking-[0.2em] text-clinical-dim",children:"loading volume"}),"error"===N.state&&(0,r.jsx)("p",{className:"max-w-[80%] text-center text-[10px] leading-tight text-signal-concern",children:N.message}),"idle"===N.state&&(0,r.jsx)("p",{className:"text-[10px] text-clinical-dim",children:"No volume"}),"ready"===N.state&&(0,r.jsx)("p",{className:"text-[10px] uppercase tracking-[0.2em] text-clinical-dim",children:"loading volume"})]})]})}}}]);
|
_next/static/chunks/255-91b6ab0b096141ad.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
_next/static/chunks/405.19edef85d9a977c9.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{3405:(e,t,n)=>{n.r(t),n.d(t,{EvolutionViewport:()=>N});var a=n(95155);n(69955),n(10054);var s=n(89473),r=n(56109),i=n(54261),l=n(10355),o=n(18533),c=n(54731),u=n(73416),d=n(87352),m=n(36481),p=n(38376),g=n(12412),h=n(30536),x=n(19047),f=n(12115),y=n(67161),w=n(6547);let v={newInstance:n(17042).Ay.newInstance(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,n),w.Ay.extend(e,t,n),t.classHierarchy.push("vtkFollowPointerStyle"),e.handleMouseRotate=(e,n)=>{let a=t.previousPosition;if(a){var s,r,i;s=e.getActiveCamera(),r=n.x-a.x,i=n.y-a.y,Number.isFinite(r)&&Number.isFinite(i)&&(s.azimuth(-(.18*r)),s.elevation(function(e,t){let n=e.getViewPlaneNormal(),a=e.getViewUp(),s=180*Math.acos(Math.max(-1,Math.min(1,-(n[0]*a[0]+n[1]*a[1]+n[2]*a[2]))))/Math.PI;return Math.max(12-s,Math.min(168-s,t))}(s,-(.18*i))),s.orthogonalizeViewUp()),!1!==t.autoAdjustCameraClippingRange&&e.resetCameraClippingRange(),t._interactor.getLightFollowCamera()&&e.updateLightsGeometryToFollowCamera()}}},"vtkFollowPointerStyle")};var b=n(35623);function C(e){return null===e.relativeChange||e.correspondenceDoubtful?[.62,.64,.68]:e.relativeChange>.25?[.86,.31,.31]:e.relativeChange<-.25?[.32,.62,.86]:[.55,.72,.55]}let I=[[0,0],[1,0],[40,.02],[110,.06],[180,.14],[255,.22]],j=[[0,.05,.05,.06],[60,.35,.31,.29],[130,.62,.57,.53],[200,.85,.81,.77],[255,.97,.95,.92]];function N(e){let{current:t,prior:n,selectedLesionId:w,onSelectLesion:N,showPrior:R,brainSegmentationId:S}=e,[k,L]=(0,f.useState)(!0),O=(0,f.useRef)(null),M=(0,f.useRef)(null),[z,F]=(0,f.useState)({state:"idle"}),T=(0,f.useRef)(null),D=(0,f.useRef)(!1),[V,E]=(0,f.useState)(0),G=(0,f.useRef)(0),[U,_]=(0,f.useState)(0);(0,f.useEffect)(()=>{let e=O.current;if(!e)return;let t=m.Ay.newInstance({background:[.043,.055,.071]});t.setContainer(e),t.resize(),t.getInteractor().setInteractorStyle(v.newInstance()),(n=t.getRenderer().getActiveCamera()).setFocalPoint(0,0,0),n.setPosition(0,-1,0),n.setViewUp(0,0,1);var n,a=t.getRenderer();a.setTwoSidedLighting(!0),a.setAutomaticLightCreation(!1);let s=p.Ay.newInstance();s.setLightTypeToCameraLight(),s.setPosition(.35,.45,1),s.setFocalPoint(0,0,0),s.setIntensity(.85),a.addLight(s);let r=p.Ay.newInstance();r.setLightTypeToCameraLight(),r.setPosition(-.7,-.35,.4),r.setFocalPoint(0,0,0),r.setIntensity(.45),a.addLight(r),M.current={window:t,actors:new Map,volume:null};let i=()=>t.resize();return globalThis.addEventListener("resize",i),()=>{var e,n;for(let{actor:t,mapper:a,polyData:s}of(globalThis.removeEventListener("resize",i),M.current&&A(M.current),null!=(n=null==(e=M.current)?void 0:e.actors.values())?n:[]))t.delete(),a.delete(),s.delete();M.current=null,t.delete(),T.current=null,D.current=!1}},[]),(0,f.useEffect)(()=>{let e=M.current;if(!e)return;let a=!1;return async function(){let m,p=null;if(k&&S)try{p=await (0,y.V$)(S)}catch(e){p=null}if(a)return;let f=[...t.map(e=>({surface:e,isPrior:!1})),...R?n.map(e=>({surface:e,isPrior:!0})):[]];if(0===f.length){P(e),A(e),e.window.getRenderWindow().render(),_(0),F({state:"idle"});return}F({state:"loading"});try{m=await Promise.all(f.map(async e=>{let{surface:t,isPrior:n}=e;return{key:"".concat(n?"prior":"current",":").concat(t.observationId),mesh:await (0,y.s4)(t.observationId),surface:t,isPrior:n}}))}catch(e){if(a)return;F({state:"error",message:e instanceof Error?e.message:"Could not load surfaces"});return}if(a)return;if(new Set(m.map(e=>{let{mesh:t}=e;return t.spacing.join(",")})).size>1){F({state:"error",message:"These timepoints are not in a common space, so their surfaces cannot be overlaid. Registration is required."}),P(e),e.window.getRenderWindow().render();return}P(e);let v=e.window.getRenderer();if(A(e),p){let t=function(e){let t=i.Ay.newInstance();return t.setDimensions(e.dimensions),t.setSpacing(e.spacing),t.setOrigin([0,0,0]),t.getPointData().setScalars(d.Ay.newInstance({name:"intensity",numberOfComponents:1,values:e.voxels})),t}(p),n=c.Ay.newInstance();n.setInputData(t),n.setSampleDistance(1);let a=o.Ay.newInstance();a.setMapper(n);let s=r.Ay.newInstance();for(let[e,t,n,a]of j)s.addRGBPoint(e,t,n,a);let u=l.Ay.newInstance();for(let[e,t]of I)u.addPoint(e,t);let m=a.getProperty();m.setRGBTransferFunction(0,s),m.setScalarOpacity(0,u),m.setScalarOpacityUnitDistance(0,2.5),m.setInterpolationTypeToLinear(),m.setShade(!0),m.setAmbient(.3),m.setDiffuse(.75),m.setSpecular(.2),m.setSpecularPower(12),m.setUseGradientOpacity(0,!0),m.setGradientOpacityMinimumValue(0,2),m.setGradientOpacityMinimumOpacity(0,0),m.setGradientOpacityMaximumValue(0,20),m.setGradientOpacityMaximumOpacity(0,1),v.addVolume(a),e.volume={volume:a,mapper:n,imageData:t}}for(let{key:t,mesh:n,surface:a,isPrior:r}of m){let i=function(e){let t=x.Ay.newInstance(),n=h.Ay.newInstance();n.setData(e.points,3),t.setPoints(n),e.normals&&t.getPointData().setNormals(d.Ay.newInstance({name:"Normals",numberOfComponents:3,values:e.normals}));let a=new Uint32Array(4*e.triangleCount);for(let t=0;t<e.triangleCount;t+=1)a[4*t]=3,a[4*t+1]=e.triangles[3*t],a[4*t+2]=e.triangles[3*t+1],a[4*t+3]=e.triangles[3*t+2];return t.setPolys(u.Ay.newInstance({values:a})),t}(n),l=g.Ay.newInstance();l.setInputData(i);let o=s.Ay.newInstance();o.setMapper(l);let c=o.getProperty(),m=C(a),p=null!==w&&a.lesionId===w;r?(c.setRepresentation(1),c.setColor(.45,.47,.52),c.setOpacity(.55),c.setLineWidth(1),c.setLighting(!1)):(c.setColor(...m),c.setOpacity(1),c.setAmbient(.75),c.setDiffuse(.5),c.setSpecular(.1),c.setSpecularPower(24),c.setInterpolation(1),p&&(c.setEdgeVisibility(!0),c.setEdgeColor(1,1,1)),null===w||p||c.setOpacity(.35)),v.addActor(o),e.actors.set(t,{actor:o,mapper:l,polyData:i})}let N=(0,b.z)(m.map(e=>{let{mesh:t}=e;return t.bounds})),L=V>0&&V!==G.current,O=p?function(e){let[t,n,a]=e.dimensions,[s,r,i]=e.spacing;return[0,0,0,(t-1)*s,(n-1)*r,(a-1)*i]}(p):null,M=O&&!L?(0,b.z)([O,...m.map(e=>{let{mesh:t}=e;return t.bounds})]):N;if(M){var z,E,U;let e=T.current;if(null===e||L||(z=e,!((E=M)[0]>=z[0])||!(E[1]>=z[1])||!(E[2]>=z[2])||!(E[3]<=z[3])||!(E[4]<=z[4])||!(E[5]<=z[5]))){let t=null===e||L?M:(0,b.z)([e,M]);T.current=t,G.current=V;let n=[(U=t)[0],U[3],U[1],U[4],U[2],U[5]];v.resetCamera(n),D.current||(v.getActiveCamera().elevation(-20),v.resetCamera(n),D.current=!0),v.resetCameraClippingRange()}}e.window.getRenderWindow().render(),_(p?p.voxels.length:0),F({state:"ready",triangles:m.reduce((e,t)=>{let{mesh:n}=t;return e+n.triangleCount},0)})}(),()=>{a=!0}},[t,n,R,w,V,k,S]);let W=t.reduce((e,t)=>e+t.volumeCm3,0);return(0,a.jsxs)("div",{className:"relative min-h-0 flex-1",children:[(0,a.jsx)("div",{ref:O,className:"absolute inset-0","data-testid":"evolution-canvas","data-surface-count":t.length,"data-triangle-count":"ready"===z.state?z.triangles:0,"data-brain-voxels":U}),(0,a.jsxs)("dl",{className:"pointer-events-none absolute left-2 top-2 space-y-1 text-[9px]",children:[[["#dc4f4f","growing (>25%)"],["#8cb88c","stable"],["#529edc","shrinking (>25%)"],["#9ea3ad","baseline or uncertain match"]].map(e=>{let[t,n]=e;return(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"size-2 rounded-sm",style:{backgroundColor:t},"aria-hidden":!0}),(0,a.jsx)("dt",{className:"text-clinical-dim",children:n})]},n)}),R&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5 pt-0.5",children:[(0,a.jsx)("span",{className:"size-2 rounded-sm border border-clinical-500","aria-hidden":!0}),(0,a.jsx)("dt",{className:"text-clinical-dim",children:"outline: prior timepoint"})]})]}),S&&(0,a.jsx)("button",{type:"button",onClick:()=>L(e=>!e),title:"Show the brain surface, so the lesion can be located within the head",className:"absolute left-2 top-28 rounded px-2 py-0.5 text-[9px] uppercase tracking-wider transition-colors ".concat(k?"bg-signal-info/20 text-signal-info":"text-clinical-dim hover:text-clinical-muted"),children:"brain outline"}),t.length>0&&(0,a.jsx)("ul",{className:"absolute right-2 top-2 max-h-[70%] w-40 space-y-0.5 overflow-y-auto",children:t.map(e=>{let t=e.lesionId===w;return(0,a.jsx)("li",{children:(0,a.jsxs)("button",{type:"button",onClick:()=>N(t?null:e.lesionId),className:"flex w-full items-center justify-between gap-1 rounded px-1.5 py-0.5 text-left text-[10px] transition-colors ".concat(t?"bg-clinical-700 text-clinical-text":"text-clinical-muted hover:bg-clinical-800"),children:[(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"size-2 shrink-0 rounded-sm",style:{backgroundColor:"rgb(".concat(C(e).map(e=>Math.round(255*e)).join(","),")")},"aria-hidden":!0}),e.lesionLabel]}),(0,a.jsx)("span",{className:"measurement text-clinical-dim",children:e.volumeCm3.toFixed(2)})]})},e.observationId)})}),(0,a.jsxs)("p",{className:"measurement pointer-events-none absolute bottom-2 left-2 text-[9px] text-clinical-dim",children:[t.length," surface",1===t.length?"":"s"," \xb7"," ",W.toFixed(2)," cm\xb3 total","ready"===z.state&&" \xb7 ".concat(z.triangles.toLocaleString()," triangles")]}),"ready"!==z.state&&(0,a.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-clinical-900/80",children:["loading"===z.state&&(0,a.jsx)("p",{className:"text-[10px] uppercase tracking-[0.2em] text-clinical-dim",children:"loading surfaces"}),"error"===z.state&&(0,a.jsx)("p",{className:"max-w-[70%] text-center text-[10px] leading-relaxed text-signal-concern",children:z.message}),"idle"===z.state&&(0,a.jsxs)("p",{className:"max-w-[70%] text-center text-[11px] leading-relaxed text-clinical-dim",children:["No measurable surface at this timepoint.",(0,a.jsx)("br",{}),(0,a.jsx)("span",{className:"text-[10px]",children:"Lesions below a few voxels have no closed surface."})]})]}),(0,a.jsxs)("div",{className:"pointer-events-none absolute bottom-2 right-2 flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>{T.current=null,E(e=>e+1)},className:"pointer-events-auto rounded px-2 py-0.5 text-[9px] uppercase tracking-wider text-clinical-dim transition-colors hover:bg-clinical-800 hover:text-clinical-muted",title:"Frame the camera on the surfaces currently shown",children:"fit view"}),(0,a.jsx)("span",{className:"text-[9px] text-clinical-dim",children:"drag: rotate \xb7 wheel: zoom \xb7 shift-drag: pan"})]})]})}function A(e){if(!e.volume)return;let{volume:t,mapper:n,imageData:a}=e.volume;e.window.getRenderer().removeVolume(t),t.delete(),n.delete(),a.delete(),e.volume=null}function P(e){let t=e.window.getRenderer();for(let{actor:n,mapper:a,polyData:s}of e.actors.values())t.removeActor(n),n.delete(),a.delete(),s.delete();e.actors.clear()}}}]);
|
_next/static/chunks/467ef8ee-6369ff81ae928fb4.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
_next/static/chunks/481.6d33ebcca51aa184.js
ADDED
|
@@ -0,0 +1,558 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[481],{6547:(e,t,r)=>{r.d(t,{Ay:()=>w});var a=r(17042),n=r(11701),o=r(25881),s={States:{IS_START:0,IS_NONE:0,IS_ROTATE:1,IS_PAN:2,IS_SPIN:3,IS_DOLLY:4,IS_CAMERA_POSE:11,IS_WINDOW_LEVEL:1024,IS_SLICE:1025}},l=r(91923),{vtkErrorMacro:i,VOID:u}=a.Ay,c={enabled:!0,priority:0,processEvents:!0,subscribedEvents:[]};function d(e,t,r={}){Object.assign(t,c,r),a.Ay.obj(e,t),a.Ay.event(e,t,"InteractionEvent"),a.Ay.event(e,t,"StartInteractionEvent"),a.Ay.event(e,t,"EndInteractionEvent"),a.Ay.get(e,t,["_interactor","enabled"]),a.Ay.setGet(e,t,["priority","processEvents"]),a.Ay.moveToProtected(e,t,["interactor"]);t.classHierarchy.push("vtkInteractorObserver");let n={...e};function o(){for(;t.subscribedEvents.length;)t.subscribedEvents.pop().unsubscribe()}function s(){l.Ay.handledEvents.forEach(r=>{e[`handle${r}`]&&t.subscribedEvents.push(t._interactor[`on${r}`](a=>t.processEvents?e[`handle${r}`](a):u,t.priority))})}e.setInteractor=r=>{r!==t._interactor&&(o(),t._interactor=r,r&&t.enabled&&s(),e.modified())},e.setEnabled=r=>{r!==t.enabled&&(o(),r&&(t._interactor?s():i(`
|
| 2 |
+
The interactor must be set before subscribing to events
|
| 3 |
+
`)),t.enabled=r,e.modified())},e.computeDisplayToWorld=(e,r,a,n)=>e?t._interactor.getView().displayToWorld(r,a,n,e):null,e.computeWorldToDisplay=(e,r,a,n)=>e?t._interactor.getView().worldToDisplay(r,a,n,e):null,e.setPriority=e=>{n.setPriority(e)&&t._interactor&&(o(),s())}}var p={newInstance:a.Ay.newInstance(d,"vtkInteractorObserver"),extend:d,...{computeWorldToDisplay:function(e,t,r,a){return e.getRenderWindow().getViews()[0].worldToDisplay(t,r,a,e)},computeDisplayToWorld:function(e,t,r,a){return e.getRenderWindow().getViews()[0].displayToWorld(t,r,a,e)}}},{States:m}=s,g={Rotate:m.IS_ROTATE,Pan:m.IS_PAN,Spin:m.IS_SPIN,Dolly:m.IS_DOLLY,CameraPose:m.IS_CAMERA_POSE,WindowLevel:m.IS_WINDOW_LEVEL,Slice:m.IS_SLICE},h={state:m.IS_NONE,handleObservers:1,autoAdjustCameraClippingRange:1};function v(e,t,r={}){Object.assign(t,h,r),p.extend(e,t,r),a.Ay.setGet(e,t,["focusedRenderer"]),t.classHierarchy.push("vtkInteractorStyle"),Object.keys(g).forEach(r=>{a.Ay.event(e,t,`Start${r}Event`),e[`start${r}`]=()=>{t.state===m.IS_NONE&&(t.state=g[r],t._interactor.requestAnimation(e),e.invokeStartInteractionEvent({type:"StartInteractionEvent"}),e[`invokeStart${r}Event`]({type:`Start${r}Event`}))},a.Ay.event(e,t,`End${r}Event`),e[`end${r}`]=()=>{t.state===g[r]&&(t.state=m.IS_NONE,t._interactor.cancelAnimation(e),e.invokeEndInteractionEvent({type:"EndInteractionEvent"}),e[`invokeEnd${r}Event`]({type:`End${r}Event`}),t._interactor.render())}}),t.getRenderer=e=>t.focusedRenderer||e.pokedRenderer,e.handleKeyPress=e=>{let r=t._interactor;switch(e.key){case"r":case"R":t.getRenderer(e).resetCamera(),r.render();break;case"w":case"W":t.getRenderer(e).getActors().forEach(e=>{let t=e.getProperty();t.setRepresentationToWireframe&&t.setRepresentationToWireframe()}),r.render();break;case"s":case"S":t.getRenderer(e).getActors().forEach(e=>{let t=e.getProperty();t.setRepresentationToSurface&&t.setRepresentationToSurface()}),r.render();break;case"v":case"V":t.getRenderer(e).getActors().forEach(e=>{let t=e.getProperty();t.setRepresentationToPoints&&t.setRepresentationToPoints()}),r.render()}}}var f={newInstance:a.Ay.newInstance(v,"vtkInteractorStyle"),extend:v,...s},{States:S}=s,y={motionFactor:10,zoomFactor:10,wheelDolly:!1};function T(e,t,r={}){Object.assign(t,y,r),f.extend(e,t,r),a.Ay.setGet(e,t,["motionFactor","zoomFactor"]),t.classHierarchy.push("vtkInteractorStyleTrackballCamera"),e.handleMouseMove=r=>{let a=r.position,n=t.getRenderer(r);switch(t.state){case S.IS_ROTATE:e.handleMouseRotate(n,a),e.invokeInteractionEvent({type:"InteractionEvent"});break;case S.IS_PAN:e.handleMousePan(n,a),e.invokeInteractionEvent({type:"InteractionEvent"});break;case S.IS_DOLLY:t.wheelDolly||(e.handleMouseDolly(n,a),e.invokeInteractionEvent({type:"InteractionEvent"}));break;case S.IS_SPIN:e.handleMouseSpin(n,a),e.invokeInteractionEvent({type:"InteractionEvent"})}t.previousPosition=a},e.handleButton3D=r=>{if(r&&r.pressed&&r.device===o.pF.RightController&&(r.input===o.pd.Trigger||r.input===o.pd.TrackPad))return void e.startCameraPose();r&&!r.pressed&&r.device===o.pF.RightController&&(r.input===o.pd.Trigger||r.input===o.pd.TrackPad)&&t.state===S.IS_CAMERA_POSE&&e.endCameraPose()},e.handleMove3D=r=>{t.state===S.IS_CAMERA_POSE&&e.updateCameraPose(r)},e.updateCameraPose=e=>{let r=t.getRenderer(e).getActiveCamera(),a=r.getPhysicalTranslation(),n=.025*r.getPhysicalScale(),o=r.physicalOrientationToWorldDirection([e.orientation.x,e.orientation.y,e.orientation.z,e.orientation.w]);r.setPhysicalTranslation(a[0]+o[0]*n,a[1]+o[1]*n,a[2]+o[2]*n)},e.handleLeftButtonPress=r=>{t.previousPosition=r.position,r.shiftKey?r.controlKey||r.altKey?e.startDolly():e.startPan():r.controlKey||r.altKey?e.startSpin():e.startRotate()},e.handleLeftButtonRelease=()=>{switch(t.state){case S.IS_DOLLY:e.endDolly();break;case S.IS_PAN:e.endPan();break;case S.IS_SPIN:e.endSpin();break;case S.IS_ROTATE:e.endRotate()}},e.handleStartMouseWheel=()=>{t.wheelDolly=!0,e.startDolly()},e.handleEndMouseWheel=()=>{e.endDolly(),t.wheelDolly=!1},e.handleStartPinch=r=>{t.previousScale=r.scale,e.startDolly()},e.handleEndPinch=()=>{e.endDolly()},e.handleStartRotate=r=>{t.previousRotation=r.rotation,e.startRotate()},e.handleEndRotate=()=>{e.endRotate()},e.handleStartPan=r=>{t.previousTranslation=r.translation,e.startPan()},e.handleEndPan=()=>{e.endPan()},e.handlePinch=r=>{e.dollyByFactor(t.getRenderer(r),r.scale/t.previousScale),t.previousScale=r.scale},e.handlePan=r=>{let a=t.getRenderer(r).getActiveCamera(),n=a.getFocalPoint(),o=(n=e.computeWorldToDisplay(t.getRenderer(r),n[0],n[1],n[2]))[2],s=r.translation,l=t.previousTranslation,i=e.computeDisplayToWorld(t.getRenderer(r),n[0]+s[0]-l[0],n[1]+s[1]-l[1],o),u=e.computeDisplayToWorld(t.getRenderer(r),n[0],n[1],o),c=[];c[0]=u[0]-i[0],c[1]=u[1]-i[1],c[2]=u[2]-i[2],n=a.getFocalPoint();let d=a.getPosition();a.setFocalPoint(c[0]+n[0],c[1]+n[1],c[2]+n[2]),a.setPosition(c[0]+d[0],c[1]+d[1],c[2]+d[2]),t._interactor.getLightFollowCamera()&&t.getRenderer(r).updateLightsGeometryToFollowCamera(),a.orthogonalizeViewUp(),t.previousTranslation=r.translation},e.handleRotate=e=>{let r=t.getRenderer(e).getActiveCamera();r.roll(e.rotation-t.previousRotation),r.orthogonalizeViewUp(),t.previousRotation=e.rotation},e.handleMouseRotate=(e,r)=>{if(!t.previousPosition)return;let a=t._interactor,n=r.x-t.previousPosition.x,o=r.y-t.previousPosition.y,s=a.getView().getViewportSize(e),l=-.1,i=-.1;s[0]&&s[1]&&(l=-20/s[1],i=-20/s[0]);let u=n*i*t.motionFactor,c=o*l*t.motionFactor,d=e.getActiveCamera();Number.isNaN(u)||Number.isNaN(c)||(d.azimuth(u),d.elevation(c),d.orthogonalizeViewUp()),t.autoAdjustCameraClippingRange&&e.resetCameraClippingRange(),a.getLightFollowCamera()&&e.updateLightsGeometryToFollowCamera()},e.handleMouseSpin=(e,r)=>{if(!t.previousPosition)return;let a=t._interactor,o=e.getActiveCamera(),s=a.getView().getViewportCenter(e),l=(0,n.WK)(Math.atan2(t.previousPosition.y-s[1],t.previousPosition.x-s[0])),i=(0,n.WK)(Math.atan2(r.y-s[1],r.x-s[0]))-l;Number.isNaN(i)||(o.roll(i),o.orthogonalizeViewUp())},e.handleMousePan=(r,a)=>{if(!t.previousPosition)return;let n=r.getActiveCamera(),o=n.getFocalPoint(),s=(o=e.computeWorldToDisplay(r,o[0],o[1],o[2]))[2],l=e.computeDisplayToWorld(r,a.x,a.y,s),i=e.computeDisplayToWorld(r,t.previousPosition.x,t.previousPosition.y,s),u=[];u[0]=i[0]-l[0],u[1]=i[1]-l[1],u[2]=i[2]-l[2],o=n.getFocalPoint();let c=n.getPosition();n.setFocalPoint(u[0]+o[0],u[1]+o[1],u[2]+o[2]),n.setPosition(u[0]+c[0],u[1]+c[1],u[2]+c[2]),t._interactor.getLightFollowCamera()&&r.updateLightsGeometryToFollowCamera()},e.handleMouseDolly=(r,a)=>{if(!t.previousPosition)return;let n=a.y-t.previousPosition.y,o=t._interactor.getView().getViewportCenter(r),s=t.motionFactor*n/o[1];e.dollyByFactor(r,1.1**s)},e.handleMouseWheel=r=>{let a=1-r.spinY/t.zoomFactor;e.dollyByFactor(t.getRenderer(r),a)},e.dollyByFactor=(e,r)=>{if(Number.isNaN(r))return;let a=e.getActiveCamera();a.getParallelProjection()?a.setParallelScale(a.getParallelScale()/r):(a.dolly(r),t.autoAdjustCameraClippingRange&&e.resetCameraClippingRange()),t._interactor.getLightFollowCamera()&&e.updateLightsGeometryToFollowCamera()}}var w={newInstance:a.Ay.newInstance(T,"vtkInteractorStyleTrackballCamera"),extend:T}},36481:(e,t,r)=>{r.d(t,{Ay:()=>eV});var a=r(17042),n=r(87352);function o(e){return e}function s(e){return null===e||"null"===e?null:"true"===e||"false"!==e&&(void 0!==e&&"undefined"!==e?"["===e[0]&&"]"===e[e.length-1]?e.substring(1,e.length-1).split(",").map(e=>s(e.trim())):""===e||Number.isNaN(Number(e))?e:Number(e):void 0)}r(30536);var l=r(19047),i=r(91923);r(89473),r(12412);var u=r(6547),c=r(1943),d=r(628);r(67368);var p=r(47224),m=r(68916),g=r(72288),h=r(57787),v=r(72867),f=r(59780),{vtkErrorMacro:S}=a.o$,y=["setBindGroup","setIndexBuffer","setVertexBuffer","draw","drawIndexed"],T={description:null,handle:null,boundPipeline:null,pipelineHash:null,pipelineSettings:null,replaceShaderCodeFunction:null,depthTextureView:null,label:null},w={newInstance:(0,a.UI)(function(e,t,r={}){Object.assign(t,T,r),(0,a.WL)(e,t),t.description={colorAttachments:[{view:void 0,loadOp:"load",storeOp:"store"}],depthStencilAttachment:{view:void 0,depthLoadOp:"clear",depthClearValue:0,depthStoreOp:"store"}},t.replaceShaderCodeFunction=e=>{let t=e.getShaderDescription("fragment");t.addOutput("vec4<f32>","outColor");let r=t.getCode();r=f.Ay.substitute(r,"//VTK::RenderEncoder::Impl",["output.outColor = computedColor;"]).result,t.setCode(r)},t.pipelineSettings={primitive:{cullMode:"none"},depthStencil:{depthWriteEnabled:!0,depthCompare:"greater-equal",format:"depth32float"},fragment:{targets:[{format:"rgba16float",blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha"}}}]}},t.colorTextureViews=[],(0,a.Jt)(e,t,["boundPipeline","colorTextureViews"]),(0,a.V0)(e,t,["depthTextureView","description","handle","label","pipelineHash","pipelineSettings","replaceShaderCodeFunction"]);t.classHierarchy.push("vtkWebGPURenderEncoder"),e.begin=e=>{t.drawCallbacks=[],t.handle=e.beginRenderPass(t.description),t.label&&t.handle.pushDebugGroup(t.label)},e.end=()=>{for(let r=0;r<t.drawCallbacks.length;r++){let a=t.drawCallbacks[r],n=a.pipeline;e.setPipeline(n);for(let t=0;t<a.callbacks.length;t++)a.callbacks[t](e)}t.label&&t.handle.popDebugGroup(),t.handle.end(),t.boundPipeline=null},e.setPipeline=e=>{if(t.boundPipeline===e)return;t.handle.setPipeline(e.getHandle());let r=e.getPipelineDescription(),a=r.fragment?.targets;if(t.colorTextureViews.length!==a.length)console.log(`mismatched attachment counts on pipeline ${a.length} while encoder has ${t.colorTextureViews.length}`),console.trace();else for(let e=0;e<t.colorTextureViews.length;e++){let r=t.colorTextureViews[e].getTexture()?.getFormat();r&&r!==a[e].format&&(console.log(`mismatched attachments for attachment ${e} on pipeline ${a[e].format} while encoder has ${r}`),console.trace())}if(!!t.depthTextureView!="depthStencil"in r)console.log("mismatched depth attachments"),console.trace();else if(t.depthTextureView){let e=t.depthTextureView.getTexture()?.getFormat();e&&e!==r.depthStencil.format&&(console.log(`mismatched depth attachments on pipeline ${r.depthStencil.format} while encoder has ${e}`),console.trace())}t.boundPipeline=e},e.replaceShaderCode=e=>{t.replaceShaderCodeFunction(e)},e.setColorTextureView=(e,r)=>{t.colorTextureViews[e]!==r&&(t.colorTextureViews[e]=r)},e.activateBindGroup=e=>{let r=t.boundPipeline.getDevice(),a=t.boundPipeline.getBindGroupLayoutIndex(e.getLabel());if(a<0)return void S(`vtkWebGPURenderEncoder: could not find bind group layout ${e.getLabel()}`);t.handle.setBindGroup(a,e.getBindGroup(r));let n=r.getBindGroupLayoutDescription(e.getBindGroupLayout(r)),o=r.getBindGroupLayoutDescription(t.boundPipeline.getBindGroupLayout(a));n!==o&&(console.log(`renderEncoder ${t.pipelineHash} mismatched bind group layouts bind group has
|
| 4 |
+
${n}
|
| 5 |
+
versus pipeline
|
| 6 |
+
${o}
|
| 7 |
+
`),console.trace())},e.attachTextureViews=()=>{for(let e=0;e<t.colorTextureViews.length;e++)t.description.colorAttachments[e]?t.description.colorAttachments[e].view=t.colorTextureViews[e].getHandle():t.description.colorAttachments[e]={view:t.colorTextureViews[e].getHandle()};t.depthTextureView&&(t.description.depthStencilAttachment.view=t.depthTextureView.getHandle())},e.registerDrawCallback=(e,r)=>{for(let a=0;a<t.drawCallbacks.length;a++)if(t.drawCallbacks[a].pipeline===e)return void t.drawCallbacks[a].callbacks.push(r);t.drawCallbacks.push({pipeline:e,callbacks:[r]})};for(let r=0;r<y.length;r++)e[y[r]]=(...e)=>t.handle[y[r]](...e)},"vtkWebGPURenderEncoder")},C=r(51555),P=r(43561),x=r(65020),b={renderEncoder:null,colorTexture:null,depthTexture:null},I={newInstance:a.Ay.newInstance(function(e,t,r={}){Object.assign(t,b,r),m.Ay.extend(e,t,r),a.Ay.get(e,t,["colorTexture","depthTexture"]),t.classHierarchy.push("vtkWebGPUOpaquePass"),e.traverse=(r,a)=>{if(t.deleted)return;t._currentParent=a;let n=a.getDevice();if(t.renderEncoder)t.colorTexture.resize(a.getCanvas().width,a.getCanvas().height),t.depthTexture.resize(a.getCanvas().width,a.getCanvas().height);else{e.createRenderEncoder(),t.colorTexture=x.Ay.newInstance({label:"opaquePassColor"}),t.colorTexture.create(n,{width:a.getCanvas().width,height:a.getCanvas().height,format:"rgba16float",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_SRC});let r=t.colorTexture.createView("opaquePassColorTexture");t.renderEncoder.setColorTextureView(0,r),t.depthFormat="depth32float",t.depthTexture=x.Ay.newInstance({label:"opaquePassDepth"}),t.depthTexture.create(n,{width:a.getCanvas().width,height:a.getCanvas().height,format:t.depthFormat,usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_SRC});let o=t.depthTexture.createView("opaquePassDepthTexture");t.renderEncoder.setDepthTextureView(o)}t.renderEncoder.attachTextureViews(),e.setCurrentOperation("opaquePass"),r.setRenderEncoder(t.renderEncoder),r.traverse(e)},e.getColorTextureView=()=>t.renderEncoder.getColorTextureViews()[0],e.getDepthTextureView=()=>t.renderEncoder.getDepthTextureView(),e.createRenderEncoder=()=>{t.renderEncoder=w.newInstance({label:"OpaquePass"}),t.renderEncoder.setPipelineHash("op")},e.releaseGraphicsResources=()=>{t.renderEncoder=null,t.colorTexture=null,t.depthTexture=null}},"vtkWebGPUOpaquePass")},R=`
|
| 8 |
+
//VTK::Mapper::Dec
|
| 9 |
+
|
| 10 |
+
//VTK::TCoord::Dec
|
| 11 |
+
|
| 12 |
+
//VTK::RenderEncoder::Dec
|
| 13 |
+
|
| 14 |
+
//VTK::IOStructs::Dec
|
| 15 |
+
|
| 16 |
+
@fragment
|
| 17 |
+
fn main(
|
| 18 |
+
//VTK::IOStructs::Input
|
| 19 |
+
)
|
| 20 |
+
//VTK::IOStructs::Output
|
| 21 |
+
{
|
| 22 |
+
var output: fragmentOutput;
|
| 23 |
+
|
| 24 |
+
var tcoord: vec2<i32> = vec2<i32>(i32(input.fragPos.x), i32(input.fragPos.y));
|
| 25 |
+
var reveal: f32 = textureLoad(oitpAccumTexture, tcoord, 0).r;
|
| 26 |
+
if (reveal == 1.0) { discard; }
|
| 27 |
+
var tcolor: vec4<f32> = textureLoad(oitpColorTexture, tcoord, 0);
|
| 28 |
+
var total: f32 = max(tcolor.a, 0.01);
|
| 29 |
+
var computedColor: vec4<f32> = vec4<f32>(tcolor.r/total, tcolor.g/total, tcolor.b/total, 1.0 - reveal);
|
| 30 |
+
|
| 31 |
+
//VTK::RenderEncoder::Impl
|
| 32 |
+
return output;
|
| 33 |
+
}
|
| 34 |
+
`,E={colorTextureView:null,depthTextureView:null},V={newInstance:a.Ay.newInstance(function(e,t,r={}){Object.assign(t,E,r),m.Ay.extend(e,t,r),a.Ay.setGet(e,t,["colorTextureView","depthTextureView"]),t.classHierarchy.push("vtkWebGPUOrderIndependentTranslucentPass"),e.traverse=(r,a)=>{if(t.deleted)return;t._currentParent=a;let n=a.getDevice();if(t.translucentRenderEncoder)t.translucentColorTexture.resizeToMatch(t.colorTextureView.getTexture()),t.translucentAccumulateTexture.resizeToMatch(t.colorTextureView.getTexture());else{e.createRenderEncoder(),e.createFinalEncoder(),t.translucentColorTexture=x.Ay.newInstance({label:"translucentPassColor"}),t.translucentColorTexture.create(n,{width:a.getCanvas().width,height:a.getCanvas().height,format:"rgba16float",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING});let r=t.translucentColorTexture.createView("oitpColorTexture");t.translucentRenderEncoder.setColorTextureView(0,r),t.translucentAccumulateTexture=x.Ay.newInstance({label:"translucentPassAccumulate"}),t.translucentAccumulateTexture.create(n,{width:a.getCanvas().width,height:a.getCanvas().height,format:"r16float",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING});let o=t.translucentAccumulateTexture.createView("oitpAccumTexture");t.translucentRenderEncoder.setColorTextureView(1,o),t.fullScreenQuad=v.Ay.newInstance(),t.fullScreenQuad.setDevice(a.getDevice()),t.fullScreenQuad.setPipelineHash("oitpfsq"),t.fullScreenQuad.setTextureViews(t.translucentRenderEncoder.getColorTextureViews()),t.fullScreenQuad.setFragmentShaderTemplate(R)}t.translucentRenderEncoder.setDepthTextureView(t.depthTextureView),t.translucentRenderEncoder.attachTextureViews(),e.setCurrentOperation("translucentPass"),r.setRenderEncoder(t.translucentRenderEncoder),r.traverse(e),e.finalPass(a,r)},e.finalPass=(e,r)=>{t.translucentFinalEncoder.setColorTextureView(0,t.colorTextureView),t.translucentFinalEncoder.attachTextureViews(),t.translucentFinalEncoder.begin(e.getCommandEncoder()),r.scissorAndViewport(t.translucentFinalEncoder),t.fullScreenQuad.prepareAndDraw(t.translucentFinalEncoder),t.translucentFinalEncoder.end()},e.getTextures=()=>[t.translucentColorTexture,t.translucentAccumulateTexture],e.createRenderEncoder=()=>{t.translucentRenderEncoder=w.newInstance({label:"translucentRender"});let e=t.translucentRenderEncoder.getDescription();e.colorAttachments=[{view:void 0,clearValue:[0,0,0,0],loadOp:"clear",storeOp:"store"},{view:void 0,clearValue:[1,0,0,0],loadOp:"clear",storeOp:"store"}],e.depthStencilAttachment={view:void 0,depthLoadOp:"load",depthStoreOp:"store"},t.translucentRenderEncoder.setReplaceShaderCodeFunction(e=>{let t=e.getShaderDescription("fragment");t.addOutput("vec4<f32>","outColor"),t.addOutput("f32","outAccum"),t.addBuiltinInput("vec4<f32>","@builtin(position) fragPos");let r=t.getCode();r=f.Ay.substitute(r,"//VTK::RenderEncoder::Impl",["var w: f32 = computedColor.a * pow(0.1 + input.fragPos.z, 2.0);","output.outColor = vec4<f32>(computedColor.rgb*w, w);","output.outAccum = computedColor.a;"]).result,t.setCode(r)}),t.translucentRenderEncoder.setPipelineHash("oitpr"),t.translucentRenderEncoder.setPipelineSettings({primitive:{cullMode:"none"},depthStencil:{depthWriteEnabled:!1,depthCompare:"greater",format:"depth32float"},fragment:{targets:[{format:"rgba16float",blend:{color:{srcFactor:"one",dstFactor:"one"},alpha:{srcFactor:"one",dstFactor:"one"}}},{format:"r16float",blend:{color:{srcFactor:"zero",dstFactor:"one-minus-src"},alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha"}}}]}})},e.createFinalEncoder=()=>{t.translucentFinalEncoder=w.newInstance({label:"translucentFinal"}),t.translucentFinalEncoder.setDescription({colorAttachments:[{view:null,loadOp:"load",storeOp:"store"}]}),t.translucentFinalEncoder.setReplaceShaderCodeFunction(e=>{let t=e.getShaderDescription("fragment");t.addOutput("vec4<f32>","outColor"),t.addBuiltinInput("vec4<f32>","@builtin(position) fragPos");let r=t.getCode();r=f.Ay.substitute(r,"//VTK::RenderEncoder::Impl",["output.outColor = vec4<f32>(computedColor.rgb, computedColor.a);"]).result,t.setCode(r)}),t.translucentFinalEncoder.setPipelineHash("oitpf"),t.translucentFinalEncoder.setPipelineSettings({primitive:{cullMode:"none"},fragment:{targets:[{format:"rgba16float",blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha"}}}]}})},e.releaseGraphicsResources=()=>{t.translucentRenderEncoder=null,t.translucentFinalEncoder=null,t.translucentColorTexture=null,t.translucentAccumulateTexture=null,t.fullScreenQuad=null}},"vtkWebGPUOrderIndependentTranslucentPass")},A=r(11701),_=r(70125),D=r(44293),B=r(44238),O=r(40577),N=r(23985),U=r(53038),M=r(55540),F=r(53014),G=r(85250),z=`
|
| 35 |
+
//VTK::Renderer::Dec
|
| 36 |
+
|
| 37 |
+
//VTK::Mapper::Dec
|
| 38 |
+
|
| 39 |
+
//VTK::TCoord::Dec
|
| 40 |
+
|
| 41 |
+
//VTK::Volume::TraverseDec
|
| 42 |
+
|
| 43 |
+
//VTK::RenderEncoder::Dec
|
| 44 |
+
|
| 45 |
+
//VTK::IOStructs::Dec
|
| 46 |
+
|
| 47 |
+
fn getTextureValue(vTex: texture_3d<f32>, tpos: vec4<f32>) -> f32
|
| 48 |
+
{
|
| 49 |
+
// todo multicomponent support
|
| 50 |
+
return textureSampleLevel(vTex, clampSampler, tpos.xyz, 0.0).r;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
fn intersectRayBoundsWithClipPlanes(vNum: i32, minPosSC: vec4<f32>, rayStepSC: vec4<f32>, rayBounds: vec2<f32>) -> vec2<f32>
|
| 54 |
+
{
|
| 55 |
+
var result: vec2<f32> = rayBounds;
|
| 56 |
+
let clipCount: i32 = i32(volumeSSBO.values[vNum].clipPlaneStates.x);
|
| 57 |
+
if (clipCount <= 0)
|
| 58 |
+
{
|
| 59 |
+
return result;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
${Array.from({length:6},(e,t)=>`
|
| 63 |
+
if (clipCount > ${t})
|
| 64 |
+
{
|
| 65 |
+
let clipPlane${t}: vec4<f32> = volumeSSBO.values[vNum].clipPlane${t};
|
| 66 |
+
let rayDirRatio${t}: f32 = dot(rayStepSC, clipPlane${t});
|
| 67 |
+
let equationResult${t}: f32 = dot(minPosSC, clipPlane${t});
|
| 68 |
+
|
| 69 |
+
let absRayDirRatio${t}: f32 = abs(rayDirRatio${t});
|
| 70 |
+
if (absRayDirRatio${t} > 1e-6)
|
| 71 |
+
{
|
| 72 |
+
let intersection${t}: f32 = -equationResult${t} / rayDirRatio${t};
|
| 73 |
+
result.x = select(result.x, max(result.x, intersection${t}), rayDirRatio${t} > 0.0);
|
| 74 |
+
result.y = select(result.y, min(result.y, intersection${t}), rayDirRatio${t} < 0.0);
|
| 75 |
+
}
|
| 76 |
+
else if (equationResult${t} < 0.0)
|
| 77 |
+
{
|
| 78 |
+
result.x = result.y;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
if (result.x >= result.y)
|
| 82 |
+
{
|
| 83 |
+
return result;
|
| 84 |
+
}
|
| 85 |
+
}`).join("\n")}
|
| 86 |
+
|
| 87 |
+
return result;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
fn getGradient(vTex: texture_3d<f32>, tpos: vec4<f32>, vNum: i32, scalar: f32) -> vec4<f32>
|
| 91 |
+
{
|
| 92 |
+
var result: vec4<f32>;
|
| 93 |
+
|
| 94 |
+
var tstep: vec4<f32> = volumeSSBO.values[vNum].tstep;
|
| 95 |
+
result.x = getTextureValue(vTex, tpos + vec4<f32>(tstep.x, 0.0, 0.0, 1.0)) - scalar;
|
| 96 |
+
result.y = getTextureValue(vTex, tpos + vec4<f32>(0.0, tstep.y, 0.0, 1.0)) - scalar;
|
| 97 |
+
result.z = getTextureValue(vTex, tpos + vec4<f32>(0.0, 0.0, tstep.z, 1.0)) - scalar;
|
| 98 |
+
result.w = 0.0;
|
| 99 |
+
|
| 100 |
+
// divide by spacing as that is our delta
|
| 101 |
+
result = result / volumeSSBO.values[vNum].spacing;
|
| 102 |
+
// now we have a gradient in unit tcoords
|
| 103 |
+
|
| 104 |
+
var grad: f32 = length(result.xyz);
|
| 105 |
+
if (grad > 0.0)
|
| 106 |
+
{
|
| 107 |
+
// rotate to View Coords, needed for lighting and shading
|
| 108 |
+
var nMat: mat4x4<f32> = rendererUBO.SCVCMatrix * volumeSSBO.values[vNum].planeNormals;
|
| 109 |
+
result = nMat * result;
|
| 110 |
+
result = result / length(result);
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
// store gradient magnitude in .w
|
| 114 |
+
result.w = grad;
|
| 115 |
+
|
| 116 |
+
return result;
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
fn processVolume(vTex: texture_3d<f32>, vNum: i32, cNum: i32, posSC: vec4<f32>, tfunRows: f32) -> vec4<f32>
|
| 120 |
+
{
|
| 121 |
+
var outColor: vec4<f32> = vec4<f32>(0.0, 0.0, 0.0, 0.0);
|
| 122 |
+
|
| 123 |
+
// convert to tcoords and reject if outside the volume
|
| 124 |
+
var tpos: vec4<f32> = volumeSSBO.values[vNum].SCTCMatrix*posSC;
|
| 125 |
+
if (tpos.x < 0.0 || tpos.y < 0.0 || tpos.z < 0.0 ||
|
| 126 |
+
tpos.x > 1.0 || tpos.y > 1.0 || tpos.z > 1.0) { return outColor; }
|
| 127 |
+
|
| 128 |
+
var scalar: f32 = getTextureValue(vTex, tpos);
|
| 129 |
+
|
| 130 |
+
var coord: vec2<f32> =
|
| 131 |
+
vec2<f32>(scalar * componentSSBO.values[cNum].cScale + componentSSBO.values[cNum].cShift,
|
| 132 |
+
(0.5 + 2.0 * f32(vNum)) / tfunRows);
|
| 133 |
+
var color: vec4<f32> = textureSampleLevel(tfunTexture, clampSampler, coord, 0.0);
|
| 134 |
+
|
| 135 |
+
var gofactor: f32 = 1.0;
|
| 136 |
+
var normal: vec4<f32> = vec4<f32>(0.0,0.0,0.0,0.0);
|
| 137 |
+
if (componentSSBO.values[cNum].gomin < 1.0 || volumeSSBO.values[vNum].shade[0] > 0.0)
|
| 138 |
+
{
|
| 139 |
+
normal = getGradient(vTex, tpos, vNum, scalar);
|
| 140 |
+
if (componentSSBO.values[cNum].gomin < 1.0)
|
| 141 |
+
{
|
| 142 |
+
gofactor = clamp(normal.a*componentSSBO.values[cNum].goScale + componentSSBO.values[cNum].goShift,
|
| 143 |
+
componentSSBO.values[cNum].gomin, componentSSBO.values[cNum].gomax);
|
| 144 |
+
}
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
coord.x = (scalar * componentSSBO.values[cNum].oScale + componentSSBO.values[cNum].oShift);
|
| 148 |
+
var opacity: f32 = textureSampleLevel(ofunTexture, clampSampler, coord, 0.0).r;
|
| 149 |
+
|
| 150 |
+
if (volumeSSBO.values[vNum].shade[0] > 0.0)
|
| 151 |
+
{
|
| 152 |
+
color = color*abs(normal.z);
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
outColor = vec4<f32>(color.rgb, gofactor * opacity);
|
| 156 |
+
|
| 157 |
+
return outColor;
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
// adjust the start and end point of a raycast such that it intersects the unit cube.
|
| 161 |
+
// This function is used to take a raycast starting point and step vector
|
| 162 |
+
// and numSteps and return the startijng and ending steps for intersecting the
|
| 163 |
+
// unit cube. Recall for a 3D texture, the unit cube is the range of texture coordsinates
|
| 164 |
+
// that have valid values. So this funtion can be used to take a ray in texture coordinates
|
| 165 |
+
// and bound it to intersecting the texture.
|
| 166 |
+
//
|
| 167 |
+
fn adjustBounds(tpos: vec4<f32>, tstep: vec4<f32>, numSteps: f32) -> vec2<f32>
|
| 168 |
+
{
|
| 169 |
+
var result: vec2<f32> = vec2<f32>(0.0, numSteps);
|
| 170 |
+
var tpos2: vec4<f32> = tpos + tstep*numSteps;
|
| 171 |
+
|
| 172 |
+
// move tpos to the start of the volume
|
| 173 |
+
var adjust: f32 =
|
| 174 |
+
min(
|
| 175 |
+
max(tpos.x/tstep.x, (tpos.x - 1.0)/tstep.x),
|
| 176 |
+
min(
|
| 177 |
+
max((tpos.y - 1.0)/tstep.y, tpos.y/tstep.y),
|
| 178 |
+
max((tpos.z - 1.0)/tstep.z, tpos.z/tstep.z)));
|
| 179 |
+
if (adjust < 0.0)
|
| 180 |
+
{
|
| 181 |
+
result.x = result.x - adjust;
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
// adjust length to the end
|
| 185 |
+
adjust =
|
| 186 |
+
max(
|
| 187 |
+
min(tpos2.x/tstep.x, (tpos2.x - 1.0)/tstep.x),
|
| 188 |
+
max(
|
| 189 |
+
min((tpos2.y - 1.0)/tstep.y, tpos2.y/tstep.y),
|
| 190 |
+
min((tpos2.z - 1.0)/tstep.z, tpos2.z/tstep.z)));
|
| 191 |
+
if (adjust > 0.0)
|
| 192 |
+
{
|
| 193 |
+
result.y = result.y - adjust;
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
return result;
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
fn getSimpleColor(scalar: f32, vNum: i32, cNum: i32) -> vec4<f32>
|
| 200 |
+
{
|
| 201 |
+
// how many rows (tfuns) do we have in our tfunTexture
|
| 202 |
+
var tfunRows: f32 = f32(textureDimensions(tfunTexture).y);
|
| 203 |
+
|
| 204 |
+
var coord: vec2<f32> =
|
| 205 |
+
vec2<f32>(scalar * componentSSBO.values[cNum].cScale + componentSSBO.values[cNum].cShift,
|
| 206 |
+
(0.5 + 2.0 * f32(vNum)) / tfunRows);
|
| 207 |
+
var color: vec4<f32> = textureSampleLevel(tfunTexture, clampSampler, coord, 0.0);
|
| 208 |
+
coord.x = (scalar * componentSSBO.values[cNum].oScale + componentSSBO.values[cNum].oShift);
|
| 209 |
+
var opacity: f32 = textureSampleLevel(ofunTexture, clampSampler, coord, 0.0).r;
|
| 210 |
+
return vec4<f32>(color.rgb, opacity);
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
fn traverseMax(vTex: texture_3d<f32>, vNum: i32, cNum: i32, rayLengthSC: f32, minPosSC: vec4<f32>, rayStepSC: vec4<f32>)
|
| 214 |
+
{
|
| 215 |
+
// convert to tcoords and reject if outside the volume
|
| 216 |
+
var numSteps: f32 = rayLengthSC/mapperUBO.SampleDistance;
|
| 217 |
+
var tpos: vec4<f32> = volumeSSBO.values[vNum].SCTCMatrix*minPosSC;
|
| 218 |
+
var tpos2: vec4<f32> = volumeSSBO.values[vNum].SCTCMatrix*(minPosSC + rayStepSC);
|
| 219 |
+
var tstep: vec4<f32> = tpos2 - tpos;
|
| 220 |
+
|
| 221 |
+
var rayBounds: vec2<f32> = intersectRayBoundsWithClipPlanes(
|
| 222 |
+
vNum,
|
| 223 |
+
minPosSC,
|
| 224 |
+
rayStepSC,
|
| 225 |
+
adjustBounds(tpos, tstep, numSteps));
|
| 226 |
+
|
| 227 |
+
// did we hit anything
|
| 228 |
+
if (rayBounds.x >= rayBounds.y)
|
| 229 |
+
{
|
| 230 |
+
traverseVals[vNum] = vec4<f32>(0.0,0.0,0.0,0.0);
|
| 231 |
+
return;
|
| 232 |
+
}
|
| 233 |
+
|
| 234 |
+
tpos = tpos + tstep*rayBounds.x;
|
| 235 |
+
var curDist: f32 = rayBounds.x;
|
| 236 |
+
var maxVal: f32 = -1.0e37;
|
| 237 |
+
loop
|
| 238 |
+
{
|
| 239 |
+
var scalar: f32 = getTextureValue(vTex, tpos);
|
| 240 |
+
if (scalar > maxVal)
|
| 241 |
+
{
|
| 242 |
+
maxVal = scalar;
|
| 243 |
+
}
|
| 244 |
+
|
| 245 |
+
// increment position
|
| 246 |
+
curDist = curDist + 1.0;
|
| 247 |
+
tpos = tpos + tstep;
|
| 248 |
+
|
| 249 |
+
// check if we have reached a terminating condition
|
| 250 |
+
if (curDist > rayBounds.y) { break; }
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
// process to get the color and opacity
|
| 254 |
+
traverseVals[vNum] = getSimpleColor(maxVal, vNum, cNum);
|
| 255 |
+
}
|
| 256 |
+
|
| 257 |
+
fn traverseMin(vTex: texture_3d<f32>, vNum: i32, cNum: i32, rayLengthSC: f32, minPosSC: vec4<f32>, rayStepSC: vec4<f32>)
|
| 258 |
+
{
|
| 259 |
+
// convert to tcoords and reject if outside the volume
|
| 260 |
+
var numSteps: f32 = rayLengthSC/mapperUBO.SampleDistance;
|
| 261 |
+
var tpos: vec4<f32> = volumeSSBO.values[vNum].SCTCMatrix*minPosSC;
|
| 262 |
+
var tpos2: vec4<f32> = volumeSSBO.values[vNum].SCTCMatrix*(minPosSC + rayStepSC);
|
| 263 |
+
var tstep: vec4<f32> = tpos2 - tpos;
|
| 264 |
+
|
| 265 |
+
var rayBounds: vec2<f32> = intersectRayBoundsWithClipPlanes(
|
| 266 |
+
vNum,
|
| 267 |
+
minPosSC,
|
| 268 |
+
rayStepSC,
|
| 269 |
+
adjustBounds(tpos, tstep, numSteps));
|
| 270 |
+
|
| 271 |
+
// did we hit anything
|
| 272 |
+
if (rayBounds.x >= rayBounds.y)
|
| 273 |
+
{
|
| 274 |
+
traverseVals[vNum] = vec4<f32>(0.0,0.0,0.0,0.0);
|
| 275 |
+
return;
|
| 276 |
+
}
|
| 277 |
+
|
| 278 |
+
tpos = tpos + tstep*rayBounds.x;
|
| 279 |
+
var curDist: f32 = rayBounds.x;
|
| 280 |
+
var minVal: f32 = 1.0e37;
|
| 281 |
+
loop
|
| 282 |
+
{
|
| 283 |
+
var scalar: f32 = getTextureValue(vTex, tpos);
|
| 284 |
+
if (scalar < minVal)
|
| 285 |
+
{
|
| 286 |
+
minVal = scalar;
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
// increment position
|
| 290 |
+
curDist = curDist + 1.0;
|
| 291 |
+
tpos = tpos + tstep;
|
| 292 |
+
|
| 293 |
+
// check if we have reached a terminating condition
|
| 294 |
+
if (curDist > rayBounds.y) { break; }
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
// process to get the color and opacity
|
| 298 |
+
traverseVals[vNum] = getSimpleColor(minVal, vNum, cNum);
|
| 299 |
+
}
|
| 300 |
+
|
| 301 |
+
fn traverseAverage(vTex: texture_3d<f32>, vNum: i32, cNum: i32, rayLengthSC: f32, minPosSC: vec4<f32>, rayStepSC: vec4<f32>)
|
| 302 |
+
{
|
| 303 |
+
// convert to tcoords and reject if outside the volume
|
| 304 |
+
var numSteps: f32 = rayLengthSC/mapperUBO.SampleDistance;
|
| 305 |
+
var tpos: vec4<f32> = volumeSSBO.values[vNum].SCTCMatrix*minPosSC;
|
| 306 |
+
var tpos2: vec4<f32> = volumeSSBO.values[vNum].SCTCMatrix*(minPosSC + rayStepSC);
|
| 307 |
+
var tstep: vec4<f32> = tpos2 - tpos;
|
| 308 |
+
|
| 309 |
+
var rayBounds: vec2<f32> = intersectRayBoundsWithClipPlanes(
|
| 310 |
+
vNum,
|
| 311 |
+
minPosSC,
|
| 312 |
+
rayStepSC,
|
| 313 |
+
adjustBounds(tpos, tstep, numSteps));
|
| 314 |
+
|
| 315 |
+
// did we hit anything
|
| 316 |
+
if (rayBounds.x >= rayBounds.y)
|
| 317 |
+
{
|
| 318 |
+
traverseVals[vNum] = vec4<f32>(0.0,0.0,0.0,0.0);
|
| 319 |
+
return;
|
| 320 |
+
}
|
| 321 |
+
|
| 322 |
+
let ipRange: vec4<f32> = volumeSSBO.values[vNum].ipScalarRange;
|
| 323 |
+
tpos = tpos + tstep*rayBounds.x;
|
| 324 |
+
var curDist: f32 = rayBounds.x;
|
| 325 |
+
var avgVal: f32 = 0.0;
|
| 326 |
+
var sampleCount: f32 = 0.0;
|
| 327 |
+
loop
|
| 328 |
+
{
|
| 329 |
+
var sample: f32 = getTextureValue(vTex, tpos);
|
| 330 |
+
// right now leave filtering off until WebGL changes get merged
|
| 331 |
+
// if (ipRange.z == 0.0 || sample >= ipRange.x && sample <= ipRange.y)
|
| 332 |
+
// {
|
| 333 |
+
avgVal = avgVal + sample;
|
| 334 |
+
sampleCount = sampleCount + 1.0;
|
| 335 |
+
// }
|
| 336 |
+
|
| 337 |
+
// increment position
|
| 338 |
+
curDist = curDist + 1.0;
|
| 339 |
+
tpos = tpos + tstep;
|
| 340 |
+
|
| 341 |
+
// check if we have reached a terminating condition
|
| 342 |
+
if (curDist > rayBounds.y) { break; }
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
if (sampleCount <= 0.0)
|
| 346 |
+
{
|
| 347 |
+
traverseVals[vNum] = vec4<f32>(0.0,0.0,0.0,0.0);
|
| 348 |
+
return;
|
| 349 |
+
}
|
| 350 |
+
|
| 351 |
+
// process to get the color and opacity
|
| 352 |
+
traverseVals[vNum] = getSimpleColor(avgVal/sampleCount, vNum, cNum);
|
| 353 |
+
}
|
| 354 |
+
|
| 355 |
+
fn traverseAdditive(vTex: texture_3d<f32>, vNum: i32, cNum: i32, rayLengthSC: f32, minPosSC: vec4<f32>, rayStepSC: vec4<f32>)
|
| 356 |
+
{
|
| 357 |
+
// convert to tcoords and reject if outside the volume
|
| 358 |
+
var numSteps: f32 = rayLengthSC/mapperUBO.SampleDistance;
|
| 359 |
+
var tpos: vec4<f32> = volumeSSBO.values[vNum].SCTCMatrix*minPosSC;
|
| 360 |
+
var tpos2: vec4<f32> = volumeSSBO.values[vNum].SCTCMatrix*(minPosSC + rayStepSC);
|
| 361 |
+
var tstep: vec4<f32> = tpos2 - tpos;
|
| 362 |
+
|
| 363 |
+
var rayBounds: vec2<f32> = intersectRayBoundsWithClipPlanes(
|
| 364 |
+
vNum,
|
| 365 |
+
minPosSC,
|
| 366 |
+
rayStepSC,
|
| 367 |
+
adjustBounds(tpos, tstep, numSteps));
|
| 368 |
+
|
| 369 |
+
// did we hit anything
|
| 370 |
+
if (rayBounds.x >= rayBounds.y)
|
| 371 |
+
{
|
| 372 |
+
traverseVals[vNum] = vec4<f32>(0.0,0.0,0.0,0.0);
|
| 373 |
+
return;
|
| 374 |
+
}
|
| 375 |
+
|
| 376 |
+
let ipRange: vec4<f32> = volumeSSBO.values[vNum].ipScalarRange;
|
| 377 |
+
tpos = tpos + tstep*rayBounds.x;
|
| 378 |
+
var curDist: f32 = rayBounds.x;
|
| 379 |
+
var sumVal: f32 = 0.0;
|
| 380 |
+
loop
|
| 381 |
+
{
|
| 382 |
+
var sample: f32 = getTextureValue(vTex, tpos);
|
| 383 |
+
// right now leave filtering off until WebGL changes get merged
|
| 384 |
+
// if (ipRange.z == 0.0 || sample >= ipRange.x && sample <= ipRange.y)
|
| 385 |
+
// {
|
| 386 |
+
sumVal = sumVal + sample;
|
| 387 |
+
// }
|
| 388 |
+
// increment position
|
| 389 |
+
curDist = curDist + 1.0;
|
| 390 |
+
tpos = tpos + tstep;
|
| 391 |
+
|
| 392 |
+
// check if we have reached a terminating condition
|
| 393 |
+
if (curDist > rayBounds.y) { break; }
|
| 394 |
+
}
|
| 395 |
+
|
| 396 |
+
// process to get the color and opacity
|
| 397 |
+
traverseVals[vNum] = getSimpleColor(sumVal, vNum, cNum);
|
| 398 |
+
}
|
| 399 |
+
|
| 400 |
+
fn composite(rayLengthSC: f32, minPosSC: vec4<f32>, rayStepSC: vec4<f32>) -> vec4<f32>
|
| 401 |
+
{
|
| 402 |
+
// initial ray position is at the beginning
|
| 403 |
+
var rayPosSC: vec4<f32> = minPosSC;
|
| 404 |
+
|
| 405 |
+
// how many rows (tfuns) do we have in our tfunTexture
|
| 406 |
+
var tfunRows: f32 = f32(textureDimensions(tfunTexture).y);
|
| 407 |
+
|
| 408 |
+
var curDist: f32 = 0.0;
|
| 409 |
+
var computedColor: vec4<f32> = vec4<f32>(0.0, 0.0, 0.0, 0.0);
|
| 410 |
+
var sampleColor: vec4<f32>;
|
| 411 |
+
var numSteps: f32 = rayLengthSC/mapperUBO.SampleDistance;
|
| 412 |
+
//VTK::Volume::TraverseCalls
|
| 413 |
+
//VTK::Volume::TraverseInit
|
| 414 |
+
|
| 415 |
+
loop
|
| 416 |
+
{
|
| 417 |
+
// for each volume, sample and accumulate color
|
| 418 |
+
//VTK::Volume::CompositeCalls
|
| 419 |
+
|
| 420 |
+
// increment position
|
| 421 |
+
curDist = curDist + mapperUBO.SampleDistance;
|
| 422 |
+
rayPosSC = rayPosSC + rayStepSC;
|
| 423 |
+
|
| 424 |
+
// check if we have reached a terminating condition
|
| 425 |
+
if (curDist > rayLengthSC) { break; }
|
| 426 |
+
if (computedColor.a > 0.98) { break; }
|
| 427 |
+
}
|
| 428 |
+
return computedColor;
|
| 429 |
+
}
|
| 430 |
+
|
| 431 |
+
@fragment
|
| 432 |
+
fn main(
|
| 433 |
+
//VTK::IOStructs::Input
|
| 434 |
+
)
|
| 435 |
+
//VTK::IOStructs::Output
|
| 436 |
+
{
|
| 437 |
+
var output: fragmentOutput;
|
| 438 |
+
|
| 439 |
+
var rayMax: f32 = textureSampleLevel(maxTexture, clampSampler, input.tcoordVS, 0.0).r;
|
| 440 |
+
var rayMin: f32 = textureSampleLevel(minTexture, clampSampler, input.tcoordVS, 0.0).r;
|
| 441 |
+
|
| 442 |
+
// discard empty rays
|
| 443 |
+
if (rayMax <= rayMin) { discard; }
|
| 444 |
+
else
|
| 445 |
+
{
|
| 446 |
+
// compute start and end ray positions in view coordinates
|
| 447 |
+
var minPosSC: vec4<f32> = rendererUBO.PCSCMatrix*vec4<f32>(2.0 * input.tcoordVS.x - 1.0, 1.0 - 2.0 * input.tcoordVS.y, rayMax, 1.0);
|
| 448 |
+
minPosSC = minPosSC * (1.0 / minPosSC.w);
|
| 449 |
+
var maxPosSC: vec4<f32> = rendererUBO.PCSCMatrix*vec4<f32>(2.0 * input.tcoordVS.x - 1.0, 1.0 - 2.0 * input.tcoordVS.y, rayMin, 1.0);
|
| 450 |
+
maxPosSC = maxPosSC * (1.0 / maxPosSC.w);
|
| 451 |
+
|
| 452 |
+
var rayLengthSC: f32 = distance(minPosSC.xyz, maxPosSC.xyz);
|
| 453 |
+
var rayStepSC: vec4<f32> = (maxPosSC - minPosSC)*(mapperUBO.SampleDistance/rayLengthSC);
|
| 454 |
+
rayStepSC.w = 0.0;
|
| 455 |
+
|
| 456 |
+
var computedColor: vec4<f32>;
|
| 457 |
+
|
| 458 |
+
//VTK::Volume::Loop
|
| 459 |
+
|
| 460 |
+
//VTK::RenderEncoder::Impl
|
| 461 |
+
}
|
| 462 |
+
|
| 463 |
+
return output;
|
| 464 |
+
}
|
| 465 |
+
`,W=new Float64Array(16),L=new Float64Array(16),k={volumes:null,rowLength:1024,lastVolumeLength:0},$={newInstance:a.Ay.newInstance(function(e,t,r={}){Object.assign(t,k,r),v.Ay.extend(e,t,r),t.fragmentShaderTemplate=z,t.UBO=O.Ay.newInstance({label:"mapperUBO"}),t.UBO.addEntry("SampleDistance","f32"),t.SSBO=M.Ay.newInstance({label:"volumeSSBO"}),t.componentSSBO=M.Ay.newInstance({label:"componentSSBO"}),t.lutBuildTime={},a.Ay.obj(t.lutBuildTime,{mtime:0}),t.clipPlanes=Array.from({length:6},()=>[0,0,0,0]);t.classHierarchy.push("vtkWebGPUVolumePassFSQ"),e.replaceShaderPosition=(e,t,r)=>{let a=t.getShaderDescription("vertex");a.addBuiltinOutput("vec4<f32>","@builtin(position) Position");let n=a.getCode();n=f.Ay.substitute(n,"//VTK::Position::Impl",["output.tcoordVS = vec2<f32>(vertexBC.x * 0.5 + 0.5, 1.0 - vertexBC.y * 0.5 - 0.5);","output.Position = vec4<f32>(vertexBC, 1.0);"]).result,a.setCode(n),t.getShaderDescription("fragment").addBuiltinInput("vec4<f32>","@builtin(position) fragPos")},t.shaderReplacements.set("replaceShaderPosition",e.replaceShaderPosition),e.replaceShaderVolume=(e,r,a)=>{let n=r.getShaderDescription("fragment"),o=n.getCode(),s=[],l=[],i=[];for(let e=0;e<t.volumes.length;e++)t.volumes[e].getRenderable().getMapper().getBlendMode()===N.N.COMPOSITE_BLEND?(l.push(` var tpos${e}: vec4<f32> = volumeSSBO.values[${e}].SCTCMatrix*minPosSC;`),l.push(` var tpos2_${e}: vec4<f32> = volumeSSBO.values[${e}].SCTCMatrix*(minPosSC + rayStepSC);`),l.push(` var tstep${e}: vec4<f32> = tpos2_${e} - tpos${e};`),l.push(` var rayBounds${e}: vec2<f32> = intersectRayBoundsWithClipPlanes(${e}, minPosSC, rayStepSC, adjustBounds(tpos${e}, tstep${e}, numSteps));`),s.push(` if (curDist >= rayBounds${e}.x * mapperUBO.SampleDistance && curDist <= rayBounds${e}.y * mapperUBO.SampleDistance) {`),s.push(` sampleColor = processVolume(volTexture${e}, ${e}, ${t.rowStarts[e]}, rayPosSC, tfunRows);`),s.push(` computedColor = vec4<f32>(
|
| 466 |
+
sampleColor.a * sampleColor.rgb * (1.0 - computedColor.a) + computedColor.rgb,
|
| 467 |
+
(1.0 - computedColor.a)*sampleColor.a + computedColor.a);`),s.push(" }")):(i.push(` sampleColor = traverseVals[${e}];`),i.push(` computedColor = vec4<f32>(
|
| 468 |
+
sampleColor.a * sampleColor.rgb * (1.0 - computedColor.a) + computedColor.rgb,
|
| 469 |
+
(1.0 - computedColor.a)*sampleColor.a + computedColor.a);`));o=f.Ay.substitute(o,"//VTK::Volume::CompositeCalls",s).result,o=f.Ay.substitute(o,"//VTK::Volume::TraverseCalls",i).result,o=f.Ay.substitute(o,"//VTK::Volume::TraverseInit",l).result,o=f.Ay.substitute(o,"//VTK::Volume::TraverseDec",[`var<private> traverseVals: array<vec4<f32>,${t.volumes.length}>;`]).result;let u=!1;for(let e=0;e<t.volumes.length;e++){let r=t.volumes[e].getRenderable().getMapper().getBlendMode();r===N.N.COMPOSITE_BLEND?u=!0:r===N.N.MAXIMUM_INTENSITY_BLEND?o=f.Ay.substitute(o,"//VTK::Volume::Loop",[` traverseMax(volTexture${e}, ${e}, ${e}, rayLengthSC, minPosSC, rayStepSC);`,` computedColor = traverseVals[${e}];`,"//VTK::Volume::Loop"]).result:r===N.N.MINIMUM_INTENSITY_BLEND?o=f.Ay.substitute(o,"//VTK::Volume::Loop",[` traverseMin(volTexture${e}, ${e}, ${e}, rayLengthSC, minPosSC, rayStepSC);`,` computedColor = traverseVals[${e}];`,"//VTK::Volume::Loop"]).result:r===N.N.AVERAGE_INTENSITY_BLEND?o=f.Ay.substitute(o,"//VTK::Volume::Loop",[` traverseAverage(volTexture${e}, ${e}, ${e}, rayLengthSC, minPosSC, rayStepSC);`,` computedColor = traverseVals[${e}];`,"//VTK::Volume::Loop"]).result:r===N.N.ADDITIVE_INTENSITY_BLEND&&(o=f.Ay.substitute(o,"//VTK::Volume::Loop",[` traverseAdditive(volTexture${e}, ${e}, ${e}, rayLengthSC, minPosSC, rayStepSC);`,` computedColor = traverseVals[${e}];`,"//VTK::Volume::Loop"]).result)}u&&(o=f.Ay.substitute(o,"//VTK::Volume::Loop",[" computedColor = composite(rayLengthSC, minPosSC, rayStepSC);"]).result),n.setCode(o)},t.shaderReplacements.set("replaceShaderVolume",e.replaceShaderVolume),e.updateLUTImage=r=>{let a=e.getMTime();for(let e=0;e<t.volumes.length;e++){let r=t.volumes[e].getRenderable(),n=r.getMapper().getInputData();a=Math.max(a,r.getMTime(),n.getMTime())}if(a<t.lutBuildTime.getMTime())return;t.numRows=0,t.rowStarts=[];for(let e=0;e<t.volumes.length;e++){t.rowStarts.push(t.numRows);let r=t.volumes[e].getRenderable(),a=r.getMapper(),n=r.getProperty(),o=a.getInputData(),s=(o.getPointData()&&o.getPointData().getScalars()).getNumberOfComponents(),l=n.getIndependentComponents()?s:1;t.numRows+=l}let n=new Uint8ClampedArray(2*t.numRows*t.rowLength*4),o=new Float32Array(2*t.numRows*t.rowLength),s=0,l=new Float32Array(3*t.rowLength),i=t.rowLength;for(let e=0;e<t.volumes.length;e++){let r=t.volumes[e].getRenderable(),a=r.getMapper(),u=r.getProperty(),c=a.getInputData(),d=(c.getPointData()&&c.getPointData().getScalars()).getNumberOfComponents(),p=u.getIndependentComponents()?d:1;for(let e=0;e<p;++e){let r=u.getRGBTransferFunction(e),a=r.getRange();r.getTable(a[0],a[1],i,l,1);let c=s*i*4;for(let e=0;e<i;++e){n[c+4*e]=255*l[3*e],n[c+4*e+1]=255*l[3*e+1],n[c+4*e+2]=255*l[3*e+2],n[c+4*e+3]=255;for(let t=0;t<4;t++)n[c+(i+e)*4+t]=n[c+4*e+t]}let d=u.getScalarOpacity(e),p=t.sampleDist/u.getScalarOpacityUnitDistance(e),m=d.getRange();d.getTable(m[0],m[1],i,l,1),c=s*i;for(let e=0;e<i;++e)o[c+e]=1-(1-l[e])**p,o[c+e+i]=o[c+e];s+=2}}{let e={nativeArray:n,width:t.rowLength,height:2*t.numRows,depth:1,format:"rgba8unorm"},a=r.getTextureManager().getTexture(e).createView("tfunTexture");t.textureViews[2]=a}{let e={nativeArray:o,width:t.rowLength,height:2*t.numRows,depth:1,format:"r16float"},a=r.getTextureManager().getTexture(e).createView("ofunTexture");t.textureViews[3]=a}t.lutBuildTime.modified()},e.updateSSBO=r=>{let a=Math.max(e.getMTime(),t.WebGPURenderer.getStabilizedTime());for(let e=0;e<t.volumes.length;e++){let r=t.volumes[e].getRenderable(),n=r.getMapper(),o=n.getInputData();a=Math.max(a,r.getMTime(),o.getMTime(),n.getMTime(),n.getClippingPlanesMTime())}if(a<t.SSBO.getSendTime())return;let n=t.WebGPURenderer.getStabilizedCenterByReference();t.SSBO.clearData(),t.SSBO.setNumberOfInstances(t.volumes.length);let o=new Float64Array(16*t.volumes.length),s=new Float64Array(16*t.volumes.length),l=Array.from({length:6},()=>new Float64Array(4*t.volumes.length)),i=new Float64Array(4*t.volumes.length),u=new Float64Array(4*t.volumes.length),c=new Float64Array(4*t.volumes.length),d=new Float64Array(4*t.volumes.length),p=new Float64Array(4*t.volumes.length);for(let e=0;e<t.volumes.length;e++){let r=t.volumes[e].getRenderable(),a=r.getMapper(),m=a.getInputData();G.identity(W),G.translate(W,W,n);let g=r.getMatrix();G.transpose(L,g),G.invert(L,L),G.multiply(W,L,W);let h=m.getWorldToIndex();G.multiply(W,h,W);let v=m.getDimensions();G.identity(L),G.scale(L,L,[1/v[0],1/v[1],1/v[2]]),G.multiply(W,L,W);for(let t=0;t<16;t++)o[16*e+t]=W[t];G.invert(W,W);for(let t=0;t<4;t++)s[16*e+4*t]=W[4*t],s[16*e+4*t+1]=W[4*t+1],s[16*e+4*t+2]=W[4*t+2],s[16*e+4*t+3]=0;u[4*e]=1/v[0],u[4*e+1]=1/v[1],u[4*e+2]=1/v[2],u[4*e+3]=1,c[4*e]=+!!r.getProperty().getShade();let f=m.getSpacing();d[4*e]=f[0],d[4*e+1]=f[1],d[4*e+2]=f[2],d[4*e+3]=1;let S=t.textureViews[e+4].getTexture().getScale(),y=r.getProperty().getIpScalarRange();p[4*e]=y[0]/S,p[4*e+1]=y[1]/S,p[4*e+2]=r.getProperty().getFilterMode(),G.fromTranslation(L,[-n[0],-n[1],-n[2]]);let T=(0,F.Z6)(a,L,t.clipPlanes);i[4*e]=T;for(let r=0;r<T;r++){let a=4*e;l[r][a]=t.clipPlanes[r][0],l[r][a+1]=t.clipPlanes[r][1],l[r][a+2]=t.clipPlanes[r][2],l[r][a+3]=t.clipPlanes[r][3]}}t.SSBO.addEntry("SCTCMatrix","mat4x4<f32>"),t.SSBO.addEntry("planeNormals","mat4x4<f32>"),t.SSBO.addEntry("shade","vec4<f32>"),t.SSBO.addEntry("tstep","vec4<f32>"),t.SSBO.addEntry("spacing","vec4<f32>"),t.SSBO.addEntry("ipScalarRange","vec4<f32>"),(0,F.G_)(t.SSBO,"clipPlane"),t.SSBO.addEntry("clipPlaneStates","vec4<f32>"),t.SSBO.setAllInstancesFromArray("SCTCMatrix",o),t.SSBO.setAllInstancesFromArray("planeNormals",s),t.SSBO.setAllInstancesFromArray("shade",c),t.SSBO.setAllInstancesFromArray("tstep",u),t.SSBO.setAllInstancesFromArray("spacing",d),t.SSBO.setAllInstancesFromArray("ipScalarRange",p);for(let e=0;e<6;e++)t.SSBO.setAllInstancesFromArray(`clipPlane${e}`,l[e]);t.SSBO.setAllInstancesFromArray("clipPlaneStates",i),t.SSBO.send(r),t.componentSSBO.clearData(),t.componentSSBO.setNumberOfInstances(t.numRows);let m=new Float64Array(t.numRows),g=new Float64Array(t.numRows),h=new Float64Array(t.numRows),v=new Float64Array(t.numRows),f=new Float64Array(t.numRows),S=new Float64Array(t.numRows),y=new Float64Array(t.numRows),T=new Float64Array(t.numRows),w=0;for(let e=0;e<t.volumes.length;e++){let r=t.volumes[e].getRenderable(),a=r.getMapper(),n=r.getProperty(),o=a.getInputData(),s=(o.getPointData()&&o.getPointData().getScalars()).getNumberOfComponents(),l=n.getIndependentComponents(),i=t.textureViews[e+4].getTexture().getFormat(),u=U.A.getDetailsFromTextureFormat(i),c=2===u.elementSize&&"float"===u.sampleType,d=[255],p=[0];c&&(d[0]=1);for(let e=0;e<s;e++){let t=l?e:0,r=d[e],a=n.getScalarOpacity(t).getRange(),o=r/(a[1]-a[0]);v[w]=(p[e]-a[0])/(a[1]-a[0]),h[w]=o;let s=n.getRGBTransferFunction(t).getRange();if(g[w]=(p[e]-s[0])/(s[1]-s[0]),m[w]=r/(s[1]-s[0]),n.getUseGradientOpacity(t)){let e=n.getGradientOpacityMinimumOpacity(t),a=n.getGradientOpacityMaximumOpacity(t);f[w]=e,S[w]=a;let o=[n.getGradientOpacityMinimumValue(t),n.getGradientOpacityMaximumValue(t)];T[w]=r*(a-e)/(o[1]-o[0]),y[w]=-o[0]*(a-e)/(o[1]-o[0])+e}else f[w]=1,S[w]=1,T[w]=0,y[w]=1;w++}}t.componentSSBO.addEntry("cScale","f32"),t.componentSSBO.addEntry("cShift","f32"),t.componentSSBO.addEntry("oScale","f32"),t.componentSSBO.addEntry("oShift","f32"),t.componentSSBO.addEntry("goShift","f32"),t.componentSSBO.addEntry("goScale","f32"),t.componentSSBO.addEntry("gomin","f32"),t.componentSSBO.addEntry("gomax","f32"),t.componentSSBO.setAllInstancesFromArray("cScale",m),t.componentSSBO.setAllInstancesFromArray("cShift",g),t.componentSSBO.setAllInstancesFromArray("oScale",h),t.componentSSBO.setAllInstancesFromArray("oShift",v),t.componentSSBO.setAllInstancesFromArray("goScale",T),t.componentSSBO.setAllInstancesFromArray("goShift",y),t.componentSSBO.setAllInstancesFromArray("gomin",f),t.componentSSBO.setAllInstancesFromArray("gomax",S),t.componentSSBO.send(r)};let n=e.updateBuffers;e.updateBuffers=()=>{n();let r=t.volumes[0].getRenderable().getMapper().getSampleDistance();for(let e=0;e<t.volumes.length;e++){let a=t.volumes[e].getRenderable().getMapper().getSampleDistance();a<r&&(r=a)}t.sampleDist!==r&&(t.sampleDist=r,t.UBO.setValue("SampleDistance",r),t.UBO.sendIfNeeded(t.device));for(let e=0;e<t.volumes.length;e++){let r=t.volumes[e].getRenderable().getMapper().getInputData(),a=t.device.getTextureManager().getTextureForImageData(r);if(!t.textureViews[e+4]||t.textureViews[e+4].getTexture()!==a){let r=a.createView(`volTexture${e}`);t.textureViews[e+4]=r}}if(t.volumes.length<t.lastVolumeLength)for(let e=t.volumes.length;e<t.lastVolumeLength;e++)t.textureViews.pop();t.lastVolumeLength=t.volumes.length,e.updateLUTImage(t.device),e.updateSSBO(t.device),t.clampSampler||(t.clampSampler=C.Ay.newInstance({label:"clampSampler"}),t.clampSampler.create(t.device,{minFilter:"linear",magFilter:"linear"}))},e.computePipelineHash=()=>{t.pipelineHash="volfsq";for(let e=0;e<t.volumes.length;e++){let r=t.volumes[e].getRenderable().getMapper().getBlendMode();t.pipelineHash+=`${r}`}},e.setVolumes=r=>{if(!t.volumes||t.volumes.length!==r.length){t.volumes=[...r],e.modified();return}for(let a=0;a<r.length;a++)if(r[a]!==t.volumes[a]){t.volumes=[...r],e.modified();return}};let o=e.getBindables;e.getBindables=()=>{let e=o();return e.push(t.componentSSBO),e.push(t.clampSampler),e}},"vtkWebGPUVolumePassFSQ")},{Representation:H}=_.Ay,{BufferUsage:K,PrimitiveTypes:j}=B.Ay,q=[[0,4,6],[0,6,2],[1,3,7],[1,7,5],[0,5,4],[0,1,5],[2,6,7],[2,7,3],[0,3,1],[0,2,3],[4,5,7],[4,7,6]],Q=`
|
| 470 |
+
//VTK::Renderer::Dec
|
| 471 |
+
|
| 472 |
+
//VTK::Select::Dec
|
| 473 |
+
|
| 474 |
+
//VTK::VolumePass::Dec
|
| 475 |
+
|
| 476 |
+
//VTK::TCoord::Dec
|
| 477 |
+
|
| 478 |
+
//VTK::RenderEncoder::Dec
|
| 479 |
+
|
| 480 |
+
//VTK::Mapper::Dec
|
| 481 |
+
|
| 482 |
+
//VTK::IOStructs::Dec
|
| 483 |
+
|
| 484 |
+
@fragment
|
| 485 |
+
fn main(
|
| 486 |
+
//VTK::IOStructs::Input
|
| 487 |
+
)
|
| 488 |
+
//VTK::IOStructs::Output
|
| 489 |
+
{
|
| 490 |
+
var output : fragmentOutput;
|
| 491 |
+
|
| 492 |
+
//VTK::Select::Impl
|
| 493 |
+
|
| 494 |
+
//VTK::TCoord::Impl
|
| 495 |
+
|
| 496 |
+
//VTK::VolumePass::Impl
|
| 497 |
+
|
| 498 |
+
// use the maximum (closest) of the current value and the zbuffer
|
| 499 |
+
// the blend func will then take the min to find the farthest stop value
|
| 500 |
+
var stopval: f32 = max(input.fragPos.z, textureLoad(opaquePassDepthTexture, vec2<i32>(i32(input.fragPos.x), i32(input.fragPos.y)), 0));
|
| 501 |
+
|
| 502 |
+
//VTK::RenderEncoder::Impl
|
| 503 |
+
return output;
|
| 504 |
+
}
|
| 505 |
+
`,Y=`
|
| 506 |
+
//VTK::Renderer::Dec
|
| 507 |
+
|
| 508 |
+
//VTK::Mapper::Dec
|
| 509 |
+
|
| 510 |
+
//VTK::TCoord::Dec
|
| 511 |
+
|
| 512 |
+
//VTK::RenderEncoder::Dec
|
| 513 |
+
|
| 514 |
+
//VTK::IOStructs::Dec
|
| 515 |
+
|
| 516 |
+
@fragment
|
| 517 |
+
fn main(
|
| 518 |
+
//VTK::IOStructs::Input
|
| 519 |
+
)
|
| 520 |
+
//VTK::IOStructs::Output
|
| 521 |
+
{
|
| 522 |
+
var output: fragmentOutput;
|
| 523 |
+
|
| 524 |
+
var computedColor: vec4<f32> = textureSample(volumePassColorTexture,
|
| 525 |
+
volumePassColorTextureSampler, mapperUBO.tscale*input.tcoordVS);
|
| 526 |
+
|
| 527 |
+
//VTK::RenderEncoder::Impl
|
| 528 |
+
return output;
|
| 529 |
+
}
|
| 530 |
+
`,X={colorTextureView:null,depthTextureView:null,volumes:null},Z={newInstance:a.Ay.newInstance(function(e,t,r={}){Object.assign(t,X,r),m.Ay.extend(e,t,r),t._mapper=D.Ay.newInstance(),t._mapper.setFragmentShaderTemplate(Q),t._mapper.getShaderReplacements().set("replaceShaderVolumePass",(e,t,r)=>{t.getShaderDescription("fragment").addBuiltinInput("vec4<f32>","@builtin(position) fragPos")}),t._boundsPoly=l.Ay.newInstance(),t._lastMTimes=[],a.Ay.setGet(e,t,["colorTextureView","depthTextureView"]),t.classHierarchy.push("vtkWebGPUVolumePass"),e.initialize=r=>{t._clearEncoder||e.createClearEncoder(r),t._mergeEncoder||e.createMergeEncoder(r),t._copyEncoder||e.createCopyEncoder(r),t._depthRangeEncoder||e.createDepthRangeEncoder(r),t.fullScreenQuad||(t.fullScreenQuad=$.newInstance(),t.fullScreenQuad.setDevice(r.getDevice()),t.fullScreenQuad.setTextureViews([...t._depthRangeEncoder.getColorTextureViews()])),t._volumeCopyQuad||(t._volumeCopyQuad=v.Ay.newInstance(),t._volumeCopyQuad.setPipelineHash("volpassfsq"),t._volumeCopyQuad.setDevice(r.getDevice()),t._volumeCopyQuad.setFragmentShaderTemplate(Y),t._copyUBO=O.Ay.newInstance({label:"mapperUBO"}),t._copyUBO.addEntry("tscale","vec2<f32>"),t._volumeCopyQuad.setUBO(t._copyUBO),t._volumeCopyQuad.setTextureViews([t._colorTextureView]))},e.traverse=(r,a)=>{if(t.deleted)return;t._currentParent=a,e.initialize(a),e.computeTiming(a),e.renderDepthBounds(r,a),t._firstGroup=!0;let n=a.getDevice(),o=n.getHandle().limits.maxSampledTexturesPerShaderStage-4;if(t.volumes.length>o){let n=r.getRenderable().getActiveCamera().getPosition(),s=[];for(let e=0;e<t.volumes.length;e++){let r=t.volumes[e].getRenderable().getBounds();s[e]=(0,A.fm)([.5*(r[1]+r[0]),.5*(r[3]+r[2]),.5*(r[5]+r[4])],n)}let l=[...Array(t.volumes.length).keys()];l.sort((e,t)=>s[t]-s[e]);let i=[],u=l.length%o;for(let n=0;n<l.length;n++)i.push(t.volumes[l[n]]),i.length>=u&&(e.rayCastPass(a,r,i),i=[],u=o,t._firstGroup=!1)}else e.rayCastPass(a,r,t.volumes);if(t._volumeCopyQuad.setWebGPURenderer(r),t._useSmallViewport){let e=t._colorTextureView.getTexture().getWidth(),r=t._colorTextureView.getTexture().getHeight();t._copyUBO.setArray("tscale",[t._smallViewportWidth/e,t._smallViewportHeight/r])}else t._copyUBO.setArray("tscale",[1,1]);t._copyUBO.sendIfNeeded(n),t._copyEncoder.setColorTextureView(0,t.colorTextureView),t._copyEncoder.attachTextureViews(),t._copyEncoder.begin(a.getCommandEncoder()),r.scissorAndViewport(t._copyEncoder),t._volumeCopyQuad.prepareAndDraw(t._copyEncoder),t._copyEncoder.end()},e.delete=a.Ay.chain(()=>{t._animationRateSubscription&&(t._animationRateSubscription.unsubscribe(),t._animationRateSubscription=null)},e.delete),e.computeTiming=e=>{let r=e.getRenderable().getInteractor();null==t._lastScale&&(t._lastScale=t.volumes[0].getRenderable().getMapper().getInitialInteractionScale()||1),t._useSmallViewport=!1,r.isAnimating()&&t._lastScale>1.5&&(t._useSmallViewport=!0),t._colorTexture.resize(e.getCanvas().width,e.getCanvas().height),t._animationRateSubscription||(t._animationRateSubscription=r.onAnimationFrameRateUpdate(()=>{let e=t.volumes[0].getRenderable().getMapper();if(e.getAutoAdjustSampleDistances()){let e=r.getRecentAnimationFrameRate();t._lastScale=t._lastScale*r.getDesiredUpdateRate()/e,t._lastScale>400&&(t._lastScale=400)}else t._lastScale=e.getImageSampleDistance()*e.getImageSampleDistance();t._lastScale<1.5&&(t._lastScale=1.5)}))},e.rayCastPass=(e,r,a)=>{let n=t._firstGroup?t._clearEncoder:t._mergeEncoder;n.attachTextureViews(),n.begin(e.getCommandEncoder());let o=t._colorTextureView.getTexture().getWidth(),s=t._colorTextureView.getTexture().getHeight();if(t._useSmallViewport){let r=e.getCanvas(),a=1/Math.sqrt(t._lastScale);t._smallViewportWidth=Math.ceil(a*r.width),t._smallViewportHeight=Math.ceil(a*r.height),o=t._smallViewportWidth,s=t._smallViewportHeight}n.getHandle().setViewport(0,0,o,s,0,1),n.getHandle().setScissorRect(0,0,o,s),t.fullScreenQuad.setWebGPURenderer(r),t.fullScreenQuad.setVolumes(a),t.fullScreenQuad.prepareAndDraw(n),n.end()},e.renderDepthBounds=(r,a)=>{e.updateDepthPolyData(r);let n=t._boundsPoly,o=n.getPoints(),s=n.getPolys(),l={hash:`vp${s.getMTime()}`,usage:K.Index,cells:s,numberOfPoints:o.getNumberOfPoints(),primitiveType:j.Triangles,representation:H.SURFACE},i=a.getDevice().getBufferManager().getBuffer(l);t._mapper.getVertexInput().setIndexBuffer(i),l={usage:K.PointArray,format:"float32x4",hash:`vp${o.getMTime()}${s.getMTime()}`,dataArray:o,indexBuffer:i,packExtra:!0};let u=a.getDevice().getBufferManager().getBuffer(l);t._mapper.getVertexInput().addBuffer(u,["vertexBC"]),t._mapper.setNumberOfVertices(u.getSizeInBytes()/u.getStrideInBytes()),e.drawDepthRange(r,a)},e.updateDepthPolyData=e=>{let r=!1;for(let e=0;e<t.volumes.length;e++){let a=t.volumes[e].getMTime();t._lastMTimes[e]&&a===t._lastMTimes[e]||(r=!0,t._lastMTimes[e]=a)}let a=e.getStabilizedTime();if((t._lastMTimes.length<=t.volumes.length||a!==t._lastMTimes[t.volumes.length])&&(r=!0,t._lastMTimes[t.volumes.length]=a),!r)return;let n=e.getStabilizedCenterByReference(),o=new Float64Array(3*(8*t.volumes.length)),s=new Uint16Array(4*(12*t.volumes.length));for(let e=0;e<t.volumes.length;e++){t.volumes[e].getBoundingCubePoints(o,24*e);let r=12*e*4,a=8*e;for(let e=0;e<12;e++)s[r++]=3,s[r++]=a+q[e][0],s[r++]=a+q[e][1],s[r++]=a+q[e][2]}for(let e=0;e<o.length;e+=3)o[e]-=n[0],o[e+1]-=n[1],o[e+2]-=n[2];t._boundsPoly.getPoints().setData(o,3),t._boundsPoly.getPoints().modified(),t._boundsPoly.getPolys().setData(s,1),t._boundsPoly.getPolys().modified(),t._boundsPoly.modified()},e.drawDepthRange=(r,a)=>{t._depthRangeTexture.resizeToMatch(t.colorTextureView.getTexture()),t._depthRangeTexture2.resizeToMatch(t.colorTextureView.getTexture()),t._depthRangeEncoder.attachTextureViews(),e.setCurrentOperation("volumeDepthRangePass"),r.setRenderEncoder(t._depthRangeEncoder),r.volumeDepthRangePass(!0),t._mapper.setWebGPURenderer(r),t._mapper.prepareToDraw(t._depthRangeEncoder),t._mapper.registerDrawCallback(t._depthRangeEncoder),r.volumeDepthRangePass(!1)},e.createDepthRangeEncoder=e=>{let r=e.getDevice();t._depthRangeEncoder=w.newInstance({label:"VolumePass DepthRange"}),t._depthRangeEncoder.setPipelineHash("volr"),t._depthRangeEncoder.setReplaceShaderCodeFunction(e=>{let t=e.getShaderDescription("fragment");t.addOutput("vec4<f32>","outColor1"),t.addOutput("vec4<f32>","outColor2");let r=t.getCode();r=f.Ay.substitute(r,"//VTK::RenderEncoder::Impl",["output.outColor1 = vec4<f32>(input.fragPos.z, 0.0, 0.0, 0.0);","output.outColor2 = vec4<f32>(stopval, 0.0, 0.0, 0.0);"]).result,t.setCode(r)}),t._depthRangeEncoder.setDescription({colorAttachments:[{view:null,clearValue:[0,0,0,0],loadOp:"clear",storeOp:"store"},{view:null,clearValue:[1,1,1,1],loadOp:"clear",storeOp:"store"}]}),t._depthRangeEncoder.setPipelineSettings({primitive:{cullMode:"none"},fragment:{targets:[{format:"r16float",blend:{color:{srcFactor:"one",dstFactor:"one",operation:"max"},alpha:{srcFactor:"one",dstFactor:"one",operation:"max"}}},{format:"r16float",blend:{color:{srcFactor:"one",dstFactor:"one",operation:"min"},alpha:{srcFactor:"one",dstFactor:"one",operation:"min"}}}]}}),t._depthRangeTexture=x.Ay.newInstance({label:"volumePassMaxDepth"}),t._depthRangeTexture.create(r,{width:e.getCanvas().width,height:e.getCanvas().height,format:"r16float",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING});let a=t._depthRangeTexture.createView("maxTexture");t._depthRangeEncoder.setColorTextureView(0,a),t._depthRangeTexture2=x.Ay.newInstance({label:"volumePassDepthMin"}),t._depthRangeTexture2.create(r,{width:e.getCanvas().width,height:e.getCanvas().height,format:"r16float",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING});let n=t._depthRangeTexture2.createView("minTexture");t._depthRangeEncoder.setColorTextureView(1,n),t._mapper.setDevice(e.getDevice()),t._mapper.setTextureViews([t.depthTextureView])},e.createClearEncoder=e=>{t._colorTexture=x.Ay.newInstance({label:"volumePassColor"}),t._colorTexture.create(e.getDevice(),{width:e.getCanvas().width,height:e.getCanvas().height,format:"bgra8unorm",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_SRC}),t._colorTextureView=t._colorTexture.createView("volumePassColorTexture"),t._colorTextureView.addSampler(e.getDevice(),{minFilter:"linear",magFilter:"linear"}),t._clearEncoder=w.newInstance({label:"VolumePass Clear"}),t._clearEncoder.setColorTextureView(0,t._colorTextureView),t._clearEncoder.setDescription({colorAttachments:[{view:null,clearValue:[0,0,0,0],loadOp:"clear",storeOp:"store"}]}),t._clearEncoder.setPipelineHash("volpf"),t._clearEncoder.setPipelineSettings({primitive:{cullMode:"none"},fragment:{targets:[{format:"bgra8unorm",blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha"}}}]}})},e.createCopyEncoder=e=>{t._copyEncoder=w.newInstance({label:"volumePassCopy"}),t._copyEncoder.setDescription({colorAttachments:[{view:null,loadOp:"load",storeOp:"store"}]}),t._copyEncoder.setPipelineHash("volcopypf"),t._copyEncoder.setPipelineSettings({primitive:{cullMode:"none"},fragment:{targets:[{format:"rgba16float",blend:{color:{srcFactor:"one",dstFactor:"one-minus-src-alpha"},alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha"}}}]}})},e.createMergeEncoder=e=>{t._mergeEncoder=w.newInstance({label:"volumePassMerge"}),t._mergeEncoder.setColorTextureView(0,t._colorTextureView),t._mergeEncoder.setDescription({colorAttachments:[{view:null,loadOp:"load",storeOp:"store"}]}),t._mergeEncoder.setReplaceShaderCodeFunction(e=>{let t=e.getShaderDescription("fragment");t.addOutput("vec4<f32>","outColor");let r=t.getCode();r=f.Ay.substitute(r,"//VTK::RenderEncoder::Impl",["output.outColor = vec4<f32>(computedColor.rgb, computedColor.a);"]).result,t.setCode(r)}),t._mergeEncoder.setPipelineHash("volpf"),t._mergeEncoder.setPipelineSettings({primitive:{cullMode:"none"},fragment:{targets:[{format:"bgra8unorm",blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha"}}}]}})},e.setVolumes=r=>{if(!t.volumes||t.volumes.length!==r.length){t.volumes=[...r],e.modified();return}for(let a=0;a<r.length;a++)if(r[a]!==t.volumes[a]){t.volumes=[...r],e.modified();return}},e.releaseGraphicsResources=()=>{t._animationRateSubscription&&(t._animationRateSubscription.unsubscribe(),t._animationRateSubscription=null),t._clearEncoder=null,t._mergeEncoder=null,t._copyEncoder=null,t._depthRangeEncoder=null,t._colorTexture=null,t._colorTextureView=null,t._depthRangeTexture=null,t._depthRangeTexture2=null,t._volumeCopyQuad=null,t.fullScreenQuad=null,t._copyUBO=null,t.colorTextureView=null,t.depthTextureView=null}},"vtkWebGPUVolumePass")},J=`
|
| 531 |
+
//VTK::Mapper::Dec
|
| 532 |
+
|
| 533 |
+
//VTK::TCoord::Dec
|
| 534 |
+
|
| 535 |
+
//VTK::RenderEncoder::Dec
|
| 536 |
+
|
| 537 |
+
//VTK::IOStructs::Dec
|
| 538 |
+
|
| 539 |
+
@fragment
|
| 540 |
+
fn main(
|
| 541 |
+
//VTK::IOStructs::Input
|
| 542 |
+
)
|
| 543 |
+
//VTK::IOStructs::Output
|
| 544 |
+
{
|
| 545 |
+
var output: fragmentOutput;
|
| 546 |
+
|
| 547 |
+
var texCoord: vec2<i32> =
|
| 548 |
+
vec2<i32>(i32(input.fragPos.x), i32(input.fragPos.y));
|
| 549 |
+
var computedColor: vec4<f32> = clamp(
|
| 550 |
+
textureLoad(opaquePassColorTexture, texCoord, 0),
|
| 551 |
+
vec4<f32>(0.0),
|
| 552 |
+
vec4<f32>(1.0)
|
| 553 |
+
);
|
| 554 |
+
|
| 555 |
+
//VTK::RenderEncoder::Impl
|
| 556 |
+
return output;
|
| 557 |
+
}
|
| 558 |
+
`,ee={opaqueActorCount:0,translucentActorCount:0,volumes:null,opaqueRenderEncoder:null,translucentPass:null,volumePass:null},et={newInstance:a.Ay.newInstance(function(e,t,r={}){Object.assign(t,ee,r),m.Ay.extend(e,t,r),a.Ay.setGet(e,t,["opaquePass","translucentPass","volumePass"]),t.classHierarchy.push("vtkForwardPass"),e.traverse=(r,a=null)=>{if(t.deleted)return;t._currentParent=a,e.setCurrentOperation("buildPass"),r.traverse(e),t.opaquePass||(t.opaquePass=I.newInstance());let n=r.getRenderable().getNumberOfLayers(),o=r.getChildren();for(let a=0;a<n;a++)for(let n=0;n<o.length;n++){let s=o[n],l=r.getRenderable().getRenderers()[n];l.getDraw()&&l.getLayer()===a&&(t.opaqueActorCount=0,t.translucentActorCount=0,t.volumes=[],e.setCurrentOperation("queryPass"),s.traverse(e),e.setCurrentOperation("cameraPass"),s.traverse(e),t.opaquePass.traverse(s,r),t.translucentActorCount>0&&(t.translucentPass||(t.translucentPass=V.newInstance()),t.translucentPass.setColorTextureView(t.opaquePass.getColorTextureView()),t.translucentPass.setDepthTextureView(t.opaquePass.getDepthTextureView()),t.translucentPass.traverse(s,r)),t.volumes.length>0&&(t.volumePass||(t.volumePass=Z.newInstance()),t.volumePass.setColorTextureView(t.opaquePass.getColorTextureView()),t.volumePass.setDepthTextureView(t.opaquePass.getDepthTextureView()),t.volumePass.setVolumes(t.volumes),t.volumePass.traverse(s,r)),e.finalPass(r,s))}},e.finalPass=(r,a)=>{t._finalBlitEncoder||e.createFinalBlitEncoder(r),t._finalBlitOutputTextureView.createFromTextureHandle(r.getCurrentTexture(),{depth:1,format:r.getPresentationFormat()}),t._finalBlitEncoder.attachTextureViews(),t._finalBlitEncoder.begin(r.getCommandEncoder()),a.scissorAndViewport(t._finalBlitEncoder),t._fullScreenQuad.prepareAndDraw(t._finalBlitEncoder),t._finalBlitEncoder.end()},e.createFinalBlitEncoder=e=>{t._finalBlitEncoder=w.newInstance({label:"forwardPassBlit"}),t._finalBlitEncoder.setDescription({colorAttachments:[{view:null,loadOp:"load",storeOp:"store"}]}),t._finalBlitEncoder.setPipelineHash("fpf"),t._finalBlitEncoder.setPipelineSettings({primitive:{cullMode:"none"},fragment:{targets:[{format:e.getPresentationFormat(),blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha"}}}]}}),t._fsqSampler=C.Ay.newInstance({label:"finalPassSampler"}),t._fsqSampler.create(e.getDevice(),{minFilter:"linear",magFilter:"linear"}),t._fullScreenQuad=v.Ay.newInstance(),t._fullScreenQuad.setDevice(e.getDevice()),t._fullScreenQuad.setPipelineHash("fpfsq"),t._fullScreenQuad.setTextureViews([t.opaquePass.getColorTextureView()]),t._fullScreenQuad.setAdditionalBindables([t._fsqSampler]),t._fullScreenQuad.setFragmentShaderTemplate(J),t._fullScreenQuad.getShaderReplacements().set("replaceShaderTCoord",(e,t)=>{let r=t.getShaderDescription("vertex");r.hasOutput("tcoordVS")||r.addOutput("vec2<f32>","tcoordVS"),t.getShaderDescription("fragment").addBuiltinInput("vec4<f32>","@builtin(position) fragPos")}),t._finalBlitOutputTextureView=P.Ay.newInstance(),t._finalBlitEncoder.setColorTextureView(0,t._finalBlitOutputTextureView)},e.incrementOpaqueActorCount=()=>t.opaqueActorCount++,e.incrementTranslucentActorCount=()=>t.translucentActorCount++,e.addVolume=e=>{t.volumes.push(e)},e.releaseGraphicsResources=()=>{t.opaquePass?.releaseGraphicsResources?.(),t.translucentPass?.releaseGraphicsResources?.(),t.volumePass?.releaseGraphicsResources?.(),t.opaquePass=null,t.translucentPass=null,t.volumePass=null,t._finalBlitEncoder=null,t._finalBlitOutputTextureView=null,t._fullScreenQuad=null,t._fsqSampler=null}},"vtkForwardPass")},{VtkDataTypes:er}=n.Ay,ea={handle:null,device:null},en={newInstance:a.Ay.newInstance(function(e,t,r={}){Object.assign(t,ea,r),a.Ay.obj(e,t),a.Ay.setGet(e,t,["device"]);function n(e){if(e.imageData){e.dataArray=e.imageData.getPointData().getScalars(),e.time=e.dataArray.getMTime(),e.nativeArray=e.dataArray.getData();let t=e.imageData.getDimensions();switch(e.width=t[0],e.height=t[1],e.depth=t[2],e.dataArray.getNumberOfComponents()){case 1:e.format="r";break;case 2:e.format="rg";break;default:e.format="rgba"}switch(e.dataArray.getDataType()){case er.UNSIGNED_CHAR:e.format+="8unorm";break;case er.FLOAT:case er.UNSIGNED_INT:case er.INT:case er.DOUBLE:case er.UNSIGNED_SHORT:case er.SHORT:default:e.format+="16float"}}e.image&&(e.width=e.image.width,e.height=e.image.height,e.depth=1,e.format="rgba8unorm",e.flip=!0,e.usage=GPUTextureUsage.STORAGE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.RENDER_ATTACHMENT),e.jsImageData&&(e.width=e.jsImageData.width,e.height=e.jsImageData.height,e.depth=1,e.format="rgba8unorm",e.flip=!0,e.nativeArray=e.jsImageData.data,e.usage=GPUTextureUsage.STORAGE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.RENDER_ATTACHMENT),e.imageBitmap&&(e.width=e.imageBitmap.width,e.height=e.imageBitmap.height,e.depth=1,e.format="rgba8unorm",e.flip=!0,e.usage=GPUTextureUsage.STORAGE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.RENDER_ATTACHMENT),e.canvas&&(e.width=e.canvas.width,e.height=e.canvas.height,e.depth=1,e.format="rgba8unorm",e.flip=!0,e.usage=GPUTextureUsage.STORAGE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.RENDER_ATTACHMENT)}function o(e){let r=x.Ay.newInstance({label:e.label});return r.create(t.device,{width:e.width,height:e.height,depth:e.depth,format:e.format,usage:e.usage,mipLevel:e.mipLevel}),(e.nativeArray||e.image||e.canvas||e.imageBitmap)&&r.writeImageData(e),r}t.classHierarchy.push("vtkWebGPUTextureManager"),e.getTexture=e=>e.hash?t.device.getCachedObject(e.hash,o,e):o(e),e.getTextureForImageData=e=>{let r={time:e.getMTime()};return r.imageData=e,n(r),r.hash=r.time+r.format+r.mipLevel,t.device.getTextureManager().getTexture(r)},e.getTextureForVTKTexture=(e,r)=>{let a={time:e.getMTime(),label:r};return e.getInputData()?a.imageData=e.getInputData():e.getImage()?a.image=e.getImage():e.getJsImageData()?a.jsImageData=e.getJsImageData():e.getImageBitmap()?a.imageBitmap=e.getImageBitmap():e.getCanvas()&&(a.canvas=e.getCanvas()),n(a),a.mipLevel=e.getMipLevel(),a.hash=a.time+a.format+a.mipLevel,t.device.getTextureManager().getTexture(a)}})},eo=class extends Map{constructor(){super(),this.registry=new FinalizationRegistry(e=>{let t=super.get(e);t&&t.deref&&void 0===t.deref()&&super.delete(e)})}getValue(e){let t=super.get(e);if(t){let r=t.deref();if(void 0!==r)return r;super.delete(e)}}setValue(e,t){let r;return t&&"object"==typeof t&&(r=new WeakRef(t),this.registry.register(t,e),super.set(e,r)),r}},es={handle:null,pipelines:null,shaderCache:null,bindGroupLayouts:null,bufferManager:null,textureManager:null},el={newInstance:(0,a.UI)(function(e,t,r={}){Object.assign(t,es,r),(0,a.WL)(e,t),(0,a.V0)(e,t,["handle"]),(0,a.Jt)(e,t,["bufferManager","shaderCache","textureManager"]),t.objectCache=new eo,t.shaderCache=f.Ay.newInstance(),t.shaderCache.setDevice(e),t.bindGroupLayouts=[],t.bufferManager=B.Ay.newInstance(),t.bufferManager.setDevice(e),t.textureManager=en.newInstance(),t.textureManager.setDevice(e),t.pipelines={},t.classHierarchy.push("vtkWebGPUDevice"),e.initialize=e=>{t.handle=e},e.createCommandEncoder=()=>t.handle.createCommandEncoder(),e.submitCommandEncoder=e=>{t.handle.queue.submit([e.finish()])},e.getShaderModule=e=>t.shaderCache.getShaderModule(e),e.getBindGroupLayout=e=>{if(!e.entries)return null;for(let t=0;t<e.entries.length;t++){let r=e.entries[t];r.binding=r.binding||0,r.visibility=r.visibility||GPUShaderStage.VERTEX|GPUShaderStage.FRAGMENT}let r=JSON.stringify(e);for(let e=0;e<t.bindGroupLayouts.length;e++)if(t.bindGroupLayouts[e].sval===r)return t.bindGroupLayouts[e].layout;let a=t.handle.createBindGroupLayout(e);return t.bindGroupLayouts.push({sval:r,layout:a}),a},e.getBindGroupLayoutDescription=e=>{for(let r=0;r<t.bindGroupLayouts.length;r++)if(t.bindGroupLayouts[r].layout===e)return t.bindGroupLayouts[r].sval;return vtkErrorMacro("layout not found"),console.trace(),null},e.getPipeline=e=>e in t.pipelines?t.pipelines[e]:null,e.createPipeline=(r,a)=>{a.initialize(e,r),t.pipelines[r]=a},e.onSubmittedWorkDone=()=>t.handle.queue.onSubmittedWorkDone(),e.hasCachedObject=e=>t.objectCache.getValue(e),e.getCachedObject=(e,r,...a)=>{if(!e)return vtkErrorMacro("attempt to cache an object without a hash"),null;let n=t.objectCache.getValue(e);if(n)return n;let o=r(...a);return t.objectCache.setValue(e,o),o}},"vtkWebGPUDevice")},ei=r(21122),eu=r(56971),ec=r(28193),ed={selectionRenderEncoder:null,colorTexture:null,depthTexture:null},ep={newInstance:a.Ay.newInstance(function(e,t,r={}){Object.assign(t,ed,r),m.Ay.extend(e,t,r),a.Ay.get(e,t,["colorTexture","depthTexture"]),t.classHierarchy.push("vtkWebGPUHardwareSelectionPass"),e.traverse=(r,a)=>{if(t.deleted)return;t._currentParent=null,e.setCurrentOperation("buildPass"),r.traverse(e);let n=r.getDevice();if(t.selectionRenderEncoder)t.colorTexture.resize(r.getCanvas().width,r.getCanvas().height),t.depthTexture.resizeToMatch(t.colorTexture);else{e.createRenderEncoder(),t.colorTexture=x.Ay.newInstance({label:"hardwareSelectorColor"}),t.colorTexture.create(n,{width:r.getCanvas().width,height:r.getCanvas().height,format:"rgba32uint",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC});let a=t.colorTexture.createView("hardwareSelectColorTexture");t.selectionRenderEncoder.setColorTextureView(0,a),t.depthTexture=x.Ay.newInstance({label:"hardwareSelectorDepth"}),t.depthTexture.create(n,{width:r.getCanvas().width,height:r.getCanvas().height,format:"depth32float",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC});let o=t.depthTexture.createView("hardwareSelectDepthTexture");t.selectionRenderEncoder.setDepthTextureView(o)}t.selectionRenderEncoder.attachTextureViews(),a.setRenderEncoder(t.selectionRenderEncoder),e.setCurrentOperation("cameraPass"),a.traverse(e),e.setCurrentOperation("opaquePass"),a.traverse(e)},e.createRenderEncoder=()=>{t.selectionRenderEncoder=w.newInstance({label:"HardwareSelectionPass"}),t.selectionRenderEncoder.setPipelineHash("sel"),t.selectionRenderEncoder.setReplaceShaderCodeFunction(e=>{let t=e.getShaderDescription("fragment");t.addOutput("vec4<u32>","outColor");let r=t.getCode();r=f.Ay.substitute(r,"//VTK::Select::Impl",[" var compositeID: u32 = 0u;"," var attributeID: u32 = compositeID;"]).result,r=f.Ay.substitute(r,"//VTK::RenderEncoder::Impl",["output.outColor = vec4<u32>(mapperUBO.PropID, compositeID, attributeID + 1u, 0u);"]).result,t.setCode(r)}),t.selectionRenderEncoder.getDescription().colorAttachments[0].clearValue=[0,0,0,0],t.selectionRenderEncoder.setPipelineSettings({primitive:{cullMode:"none"},depthStencil:{depthWriteEnabled:!0,depthCompare:"greater",format:"depth32float"},fragment:{targets:[{format:"rgba32uint",blend:void 0}]}})}},"vtkWebGPUHardwareSelectionPass")},{SelectionContent:em,SelectionField:eg}=eu.Ay,{FieldAssociations:eh}=ei.Ay,{vtkErrorMacro:ev}=a.Ay;function ef(e,t,r,a){let n=((r.height-t-1)*r.colorBufferWidth+e)*4+a;return r.colorValues[n]}var eS={_selectionPropMap:null,_selectionProps:null},ey={newInstance:a.Ay.newInstance(function(e,t,r={}){Object.assign(t,eS,r),ec.Ay.extend(e,t,r),t._selectionPass=ep.newInstance(),t._selectionPropMap=new Map,t._selectionProps=[],a.Ay.setGet(e,t,["_WebGPURenderWindow"]),a.Ay.moveToProtected(e,t,["WebGPURenderWindow"]),t.classHierarchy.push("vtkWebGPUHardwareSelector"),e.getPropIDForSelection=(e,r=null)=>{if(t._selectionPropMap.has(e))return t._selectionPropMap.get(e);let a=t._selectionProps.length;return t._selectionPropMap.set(e,a),t._selectionProps.push(r),a},e.endSelection=()=>{t.WebGPURenderer.setSelector(null)},e.getSourceDataAsync=async r=>{let a;if(!r||!t._WebGPURenderWindow)return ev("Renderer and view must be set before calling Select."),!1;t._WebGPURenderWindow.getRenderable().preRender(),t._WebGPURenderWindow.getInitialized()||(t._WebGPURenderWindow.initialize(),await new Promise(e=>{t._WebGPURenderWindow.onInitialized(e)}));let n=t._WebGPURenderWindow.getViewNodeFor(r);if(!n)return!1;let o=n.getSuppressClear(),s=n.getSelector();t._selectionPropMap.clear(),t._selectionProps=[],n.setSuppressClear(!0),n.setSelector(e);try{t._selectionPass.traverse(t._WebGPURenderWindow,n)}finally{n.setSelector(s),n.setSuppressClear(o)}let l=t._WebGPURenderWindow.getDevice(),i=t._selectionPass.getColorTexture(),u=t._selectionPass.getDepthTexture(),c={area:[0,0,i.getWidth()-1,i.getHeight()-1],captureZValues:t.captureZValues,fieldAssociation:t.fieldAssociation,props:[...t._selectionProps],renderer:r,webGPURenderer:n,webGPURenderWindow:t._WebGPURenderWindow,width:i.getWidth(),height:i.getHeight()};c.colorBufferWidth=16*Math.floor((c.width+15)/16),c.colorBufferSizeInBytes=c.colorBufferWidth*c.height*16;let d=h.Ay.newInstance({label:"hardwareSelectColorBuffer"});d.setDevice(l),d.create(c.colorBufferSizeInBytes,GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST);let p=t._WebGPURenderWindow.getCommandEncoder();p.copyTextureToBuffer({texture:i.getHandle()},{buffer:d.getHandle(),bytesPerRow:16*c.colorBufferWidth,rowsPerImage:c.height},{width:c.width,height:c.height,depthOrArrayLayers:1}),t.captureZValues&&(c.zbufferBufferWidth=64*Math.floor((c.width+63)/64),(a=h.Ay.newInstance({label:"hardwareSelectDepthBuffer"})).setDevice(l),c.zbufferSizeInBytes=c.height*c.zbufferBufferWidth*4,a.create(c.zbufferSizeInBytes,GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST),p.copyTextureToBuffer({texture:u.getHandle(),aspect:"depth-only"},{buffer:a.getHandle(),bytesPerRow:4*c.zbufferBufferWidth,rowsPerImage:c.height},{width:c.width,height:c.height,depthOrArrayLayers:1})),l.submitCommandEncoder(p);let m=d.mapAsync(GPUMapMode.READ);if(t.captureZValues){let e=a.mapAsync(GPUMapMode.READ);await Promise.all([m,e]),c.depthValues=new Float32Array(a.getMappedRange().slice()),a.unmap()}else await m;return c.colorValues=new Uint32Array(d.getMappedRange().slice()),d.unmap(),c.generateSelection=(e,t,r,a)=>(function(e,t,r,a,n){let o=Math.floor(t),s=Math.floor(r),l=Math.floor(a),i=Math.floor(n),u=new Map,c=[0,0];for(let t=s;t<=i;t++)for(let r=o;r<=l;r++){let a=function e(t,r,a,n){let o=a<0?0:a;if(0===o){if(n[0]=r[0],n[1]=r[1],r[0]<0||r[0]>=t.width||r[1]<0||r[1]>=t.height)return null;let e=ef(r[0],r[1],t,0);if(e<=0||e-1>=(t.props?.length??0))return null;let a={};a.propID=e-1,a.prop=t.props?.[a.propID];let o=ef(r[0],r[1],t,1);(o<0||o>0xffffff)&&(o=0),a.compositeID=o-1;let s=ef(r[0],r[1],t,2);if(s<1&&(s=o),a.attributeID=s-1,t.captureZValues){let e=(t.height-r[1]-1)*t.zbufferBufferWidth+r[0];a.zValue=t.depthValues[e],a.zValue=t.webGPURenderer.convertToOpenGLDepth(a.zValue),a.displayPosition=r}return a}let s=[r[0],r[1]],l=[0,0],i=e(t,r,0,n);if(i)return i;for(let r=1;r<o;++r){for(let a=s[1]>r?s[1]-r:0;a<=s[1]+r;++a)if(l[1]=a,s[0]>=r&&(l[0]=s[0]-r,i=e(t,l,0,n))||(l[0]=s[0]+r,i=e(t,l,0,n)))return i;for(let a=s[0]>=r?s[0]-(r-1):0;a<=s[0]+(r-1);++a)if(l[0]=a,s[1]>=r&&(l[1]=s[1]-r,i=e(t,l,0,n))||(l[1]=s[1]+r,i=e(t,l,0,n)))return i}return n[0]=r[0],n[1]=r[1],null}(e,[r,t],0,c);if(a){let t=`${a.propID} ${a.compositeID}`;if(u.has(t)){let r=u.get(t);r.pixelCount++,e.captureZValues&&a.zValue<r.info.zValue&&(r.info=a),-1===r.attributeIDs.indexOf(a.attributeID)&&r.attributeIDs.push(a.attributeID)}else u.set(t,{info:a,pixelCount:1,attributeIDs:[a.attributeID]})}}var d=e.fieldAssociation;let p=[],m=0;return u.forEach((t,r)=>{let a=eu.Ay.newInstance();switch(a.setContentType(em.INDICES),d){case eh.FIELD_ASSOCIATION_CELLS:a.setFieldType(eg.CELL);break;case eh.FIELD_ASSOCIATION_POINTS:a.setFieldType(eg.POINT);break;default:ev("Unknown field association")}a.getProperties().propID=t.info.propID,a.getProperties().prop=t.info.prop,a.getProperties().compositeID=t.info.compositeID,a.getProperties().attributeID=t.info.attributeID,a.getProperties().pixelCount=t.pixelCount,e.captureZValues&&(a.getProperties().displayPosition=[t.info.displayPosition[0],t.info.displayPosition[1],t.info.zValue],a.getProperties().worldPosition=e.webGPURenderWindow.displayToWorld(t.info.displayPosition[0],t.info.displayPosition[1],t.info.zValue,e.renderer)),a.setSelectionList(t.attributeIDs),p[m]=a,m++}),p})(c,e,t,r,a),c}},"vtkWebGPUHardwareSelector")},eT=r(74978),{vtkErrorMacro:ew,vtkWarningMacro:eC}=a.Ay,eP={position:"absolute",top:0,left:0,width:"100%",height:"100%"},ex={initialized:!1,initializing:!1,handlingDeviceLost:!1,deviceGeneration:0,deviceLostInfo:null,context:null,adapter:null,device:null,canvas:null,cursorVisibility:!0,cursor:"pointer",containerSize:null,renderPasses:[],notifyStartCaptureImage:!1,imageFormat:"image/png",useOffScreen:!1,useBackgroundImage:!1,nextPropID:1,xrSupported:!1,presentationFormat:null},eb=a.Ay.newInstance(function(e,t,r={}){Object.assign(t,ex,r),t.canvas=document.createElement("canvas"),t.canvas.style.width="100%",t.bgImage=new Image,t.bgImage.style.position="absolute",t.bgImage.style.left="0",t.bgImage.style.top="0",t.bgImage.style.width="100%",t.bgImage.style.height="100%",t.bgImage.style.zIndex="-1",g.Ay.extend(e,t,r),t.myFactory=eT.Ay.newInstance(),t.renderPasses[0]=et.newInstance(),t.selector||(t.selector=ey.newInstance(),t.selector.setWebGPURenderWindow(e)),a.Ay.event(e,t,"imageReady"),a.Ay.event(e,t,"initialized"),a.Ay.event(e,t,"deviceLost"),a.Ay.get(e,t,["commandEncoder","deviceLostInfo","device","presentationFormat","useBackgroundImage","xrSupported"]),a.Ay.setGet(e,t,["initialized","context","canvas","device","renderPasses","notifyStartCaptureImage","cursor","useOffScreen"]),a.Ay.setGetArray(e,t,["size"],2),a.Ay.event(e,t,"windowResizeEvent");t.classHierarchy.push("vtkWebGPURenderWindow"),e.getViewNodeFactory=()=>t.myFactory;let n=[0,0];async function o(r=t.imageFormat){let a=document.createElement("canvas"),n=a.getContext("2d");a.width=t.canvas.width,a.height=t.canvas.height;let s=await e.getPixelsAsync(),l=new ImageData(s.colorValues,s.width,s.height);n.putImageData(l,0,0);let i=t.canvas.getBoundingClientRect();t.renderable.getRenderers().forEach(e=>{e.getViewProps().forEach(e=>{if(e.getContainer){let t=e.getContainer().getElementsByTagName("canvas");for(let e=0;e<t.length;e++){let r=t[e],a=r.getBoundingClientRect(),o=a.x-i.x,s=a.y-i.y;n.drawImage(r,o,s)}}})});let u=a.toDataURL(r);a.remove(),e.invokeImageReady(u)}e.onModified(function(){t.renderable&&(t.size[0]!==n[0]||t.size[1]!==n[1])&&(n[0]=t.size[0],n[1]=t.size[1],t.canvas.setAttribute("width",t.size[0]),t.canvas.setAttribute("height",t.size[1]),e.recreateSwapChain()),t.viewStream&&t.viewStream.setSize(t.size[0],t.size[1]),t.canvas.style.display=t.useOffScreen?"none":"block",t.el&&(t.el.style.cursor=t.cursorVisibility?t.cursor:"none"),t.containerSize=null}),e.recreateSwapChain=()=>{t.context&&(t.context.unconfigure(),t.presentationFormat=navigator.gpu.getPreferredCanvasFormat(t.adapter),t.context.configure({device:t.device.getHandle(),format:t.presentationFormat,alphaMode:"premultiplied",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_DST,width:t.size[0],height:t.size[1]}),t._configured=!0)},e.getCurrentTexture=()=>t.context.getCurrentTexture(),e.buildPass=r=>{r?t.renderable&&(e.prepareNodes(),e.addMissingNodes(t.renderable.getRenderersByReference()),e.removeUnusedNodes(),e.initialize()):t.initialized&&(t._configured||e.recreateSwapChain(),t.commandEncoder=t.device.createCommandEncoder())},e.initialize=()=>{if(!t.initializing){if(t.initializing=!0,t.deviceLostInfo=null,!navigator.gpu)return void ew("WebGPU is not enabled.");e.create3DContextAsync().then(()=>{t.initialized=!0,t.deleted||e.invokeInitialized()})}},e.setContainer=r=>{t.el&&t.el!==r&&(t.canvas.parentNode!==t.el&&ew("Error: canvas parent node does not match container"),t.el.removeChild(t.canvas),t.el.contains(t.bgImage)&&t.el.removeChild(t.bgImage)),t.el!==r&&(t.el=r,t.el&&(t.el.appendChild(t.canvas),t.useBackgroundImage&&t.el.appendChild(t.bgImage)),e.modified())},e.getContainer=()=>t.el,e.getContainerSize=()=>{if(!t.containerSize&&t.el){let{width:e,height:r}=t.el.getBoundingClientRect();t.containerSize=[e,r]}return t.containerSize||t.size},e.getFramebufferSize=()=>t.size,e.create3DContextAsync=async()=>{if(t.adapter=await navigator.gpu.requestAdapter({powerPreference:"high-performance"}),!t.deleted){var r,a;if(t.device=el.newInstance(),t.device.initialize(await t.adapter.requestDevice({requiredLimits:{maxBufferSize:t.adapter.limits.maxBufferSize,maxStorageBufferBindingSize:t.adapter.limits.maxStorageBufferBindingSize,maxUniformBufferBindingSize:t.adapter.limits.maxUniformBufferBindingSize}})),t.deleted){t.device=null;return}t.deviceGeneration+=1,r=t.device.getHandle(),a=t.deviceGeneration,r.lost.then(r=>{!function(r,a){if(t.deleted||a!==t.deviceGeneration||t.handlingDeviceLost)return;t.handlingDeviceLost=!0,t.deviceLostInfo=r;let n=r?.reason??"unknown",o=r?.message||"WebGPU device was lost.";if(eC(`WebGPU device lost (${n}): ${o}`),e.releaseGraphicsResources(),e.invokeDeviceLost({reason:n,message:o,recoverable:"destroyed"!==n}),"destroyed"!==n){let r=e.onInitialized(()=>{r.unsubscribe(),t.deleted||e.traverseAllPasses()});e.initialize()}t.handlingDeviceLost=!1}(r,a)}),t.context=t.canvas.getContext("webgpu")}},e.releaseGraphicsResources=()=>{if(t.renderPasses)for(let e=0;e<t.renderPasses.length;e++)t.renderPasses[e]?.releaseGraphicsResources?.();!function e(t,r=new Set){if(!t||r.has(t))return;r.add(t);let a=t.getChildren?.()||[];for(let t=0;t<a.length;t++){let n=a[t];n?.releaseGraphicsResources?.(),e(n,r)}}(e);let r=m.Ay.newInstance();r.setCurrentOperation("Release"),r.traverse(e,null),t.context&&t.context.unconfigure(),t.adapter=null,t.device=null,t.context=null,t.commandEncoder=null,t._configured=!1,t.initialized=!1,t.initializing=!1},e.setBackgroundImage=e=>{t.bgImage.src=e.src},e.setUseBackgroundImage=e=>{t.useBackgroundImage=e,t.useBackgroundImage&&!t.el.contains(t.bgImage)?t.el.appendChild(t.bgImage):!t.useBackgroundImage&&t.el.contains(t.bgImage)&&t.el.removeChild(t.bgImage)},e.captureNextImage=(r="image/png",{resetCamera:a=!1,size:n=null,scale:o=1}={})=>{if(t.deleted)return null;t.imageFormat=r;let s=t.notifyStartCaptureImage;return t.notifyStartCaptureImage=!0,t._screenshot={size:n||1!==o?n||t.size.map(e=>e*o):null},new Promise((r,n)=>{let o=e.onImageReady(n=>{if(null===t._screenshot.size)t.notifyStartCaptureImage=s,o.unsubscribe(),t._screenshot.placeHolder&&(t.size=t._screenshot.originalSize,e.modified(),t._screenshot.cameras&&t._screenshot.cameras.forEach(({restoreParamsFn:e,arg:t})=>e(t)),e.traverseAllPasses(),t.el.removeChild(t._screenshot.placeHolder),t._screenshot.placeHolder.remove(),t._screenshot=null),r(n);else{let r=document.createElement("img");if(r.style=eP,r.src=n,t._screenshot.placeHolder=t.el.appendChild(r),t.canvas.style.display="none",t._screenshot.originalSize=t.size,t.size=t._screenshot.size,t._screenshot.size=null,e.modified(),a){let e=!0!==a;t._screenshot.cameras=t.renderable.getRenderers().map(t=>{let r=t.getActiveCamera(),n=r.get("focalPoint","position","parallelScale");return{resetCameraArgs:e?{renderer:t}:void 0,resetCameraFn:e?a:t.resetCamera,restoreParamsFn:r.set,arg:JSON.parse(JSON.stringify(n))}}),t._screenshot.cameras.forEach(({resetCameraFn:e,resetCameraArgs:t})=>e(t))}e.traverseAllPasses()}})})},e.traverseAllPasses=()=>{if(!t.deleted)if(t.initialized){if(t.renderPasses)for(let r=0;r<t.renderPasses.length;++r)t.renderPasses[r].traverse(e,null);t.commandEncoder&&(t.device.submitCommandEncoder(t.commandEncoder),t.commandEncoder=null,t.notifyStartCaptureImage&&t.device.onSubmittedWorkDone().then(()=>{o()}))}else{e.initialize();let t=e.onInitialized(()=>{t.unsubscribe(),e.traverseAllPasses()})}},e.setViewStream=r=>t.viewStream!==r&&(t.subscription&&(t.subscription.unsubscribe(),t.subscription=null),t.viewStream=r,t.viewStream&&(t.renderable.getRenderers()[0].getBackgroundByReference()[3]=0,e.setUseBackgroundImage(!0),t.subscription=t.viewStream.onImageReady(t=>e.setBackgroundImage(t.image)),t.viewStream.setSize(t.size[0],t.size[1]),t.viewStream.invalidateCache(),t.viewStream.render(),e.modified()),!0),e.getUniquePropID=()=>t.nextPropID++,e.getPropFromID=e=>{for(let r=0;r<t.children.length;r++){let a=t.children[r].getPropFromID(e);if(null!==a)return a}return null},e.getPixelsAsync=async()=>{let e=t.device,r=t.renderPasses[0].getOpaquePass().getColorTexture(),a={width:r.getWidth(),height:r.getHeight()};a.colorBufferWidth=32*Math.floor((a.width+31)/32),a.colorBufferSizeInBytes=a.colorBufferWidth*a.height*8;let n=h.Ay.newInstance();n.setDevice(e),n.create(a.colorBufferSizeInBytes,GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST);let o=t.device.createCommandEncoder();o.copyTextureToBuffer({texture:r.getHandle()},{buffer:n.getHandle(),bytesPerRow:8*a.colorBufferWidth,rowsPerImage:a.height},{width:a.width,height:a.height,depthOrArrayLayers:1}),e.submitCommandEncoder(o),await n.mapAsync(GPUMapMode.READ),a.colorValues=new Uint16Array(n.getMappedRange().slice()),n.unmap();let s=new Uint8ClampedArray(a.height*a.width*4);for(let e=0;e<a.height;e++)for(let t=0;t<a.width;t++){let r=(e*a.width+t)*4,n=(e*a.colorBufferWidth+t)*4;s[r]=255*p.A.fromHalf(a.colorValues[n]),s[r+1]=255*p.A.fromHalf(a.colorValues[n+1]),s[r+2]=255*p.A.fromHalf(a.colorValues[n+2]),s[r+3]=255*p.A.fromHalf(a.colorValues[n+3])}return a.colorValues=s,a},e.createSelector=()=>{let t=ey.newInstance();return t.setWebGPURenderWindow(e),t};let s=e.setSize;e.setSize=(t,r)=>{let a=s(t,r);return a&&e.invokeWindowResizeEvent({width:t,height:r}),a},e.delete=a.Ay.chain(e.delete,e.setViewStream)},"vtkWebGPURenderWindow");(0,d.p$)("WebGPU",eb),(0,eT.c9)("vtkRenderWindow",eb);var eI=({toNativeType:s,extractURLParameters:function(e=!0,t=window.location.search){let r={},a=e?s:o;return new URLSearchParams(t).forEach((e,t)=>{t&&(r[t]=!e||a(e))}),r}}).extractURLParameters(),eR={background:[.32,.34,.43],listenWindowResize:!0,container:null};function eE(e,t,r={}){Object.assign(t,eR,r),a.Ay.obj(e,t),a.Ay.get(e,t,["renderWindow","renderer","_apiSpecificRenderWindow","interactor","container"]),a.Ay.moveToProtected(e,t,["_apiSpecificRenderWindow"]),a.Ay.event(e,t,"resize");let n=e.invokeResize;delete e.invokeResize,t.renderWindow=d.Ay.newInstance(),t.renderer=c.Ay.newInstance(),t.renderWindow.addRenderer(t.renderer),t._apiSpecificRenderWindow=t.renderWindow.newAPISpecificView(eI.viewAPI??t.defaultViewAPI),t.renderWindow.addView(t._apiSpecificRenderWindow),t.interactor=i.Ay.newInstance(),t.interactor.setInteractorStyle(u.Ay.newInstance()),t.interactor.setView(t._apiSpecificRenderWindow),t.interactor.initialize(),e.setBackground=t.renderer.setBackground,e.setBackground(...t.background),e.resize=()=>{if(t.container){let e=t.container.getBoundingClientRect(),r=window.devicePixelRatio||1;t._apiSpecificRenderWindow.setSize(Math.floor(e.width*r),Math.floor(e.height*r)),n(),t.renderWindow.render()}},e.setContainer=e=>{t.container&&t.interactor.unbindEvents(t.container),t.container=e,t._apiSpecificRenderWindow.setContainer(t.container),t.container&&t.interactor.bindEvents(t.container)},e.delete=a.Ay.chain(e.setContainer,t._apiSpecificRenderWindow.delete,()=>{window.removeEventListener("resize",e.resize)},e.delete),t.listenWindowResize&&window.addEventListener("resize",e.resize),e.resize()}var eV={newInstance:a.Ay.newInstance(eE),extend:eE}}}]);
|
_next/static/chunks/4bd1b696-409494caf8c83275.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
_next/static/chunks/534.8ac9c9b001e41ba4.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[534],{31534:(e,t,n)=>{n.r(t),n.d(t,{ViewerMemory:()=>s});var r=n(95155),a=n(12115),l=n(55545),c=n(36178);function s(){let[e,t]=(0,a.useState)(null);(0,a.useEffect)(()=>{function e(){try{let e=(0,c.wn)();t({mb:Math.round(e.bytes/1e6),maxMb:Math.round(e.max/1e6),volumes:e.volumes})}catch(e){}}e();let n=setInterval(e,2e3);return()=>clearInterval(n)},[]);let n=e&&e.maxMb>0?e.mb/e.maxMb:0;return(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{title:e?"Viewer memory: ".concat(e.mb," MB of ").concat(e.maxMb," MB, ").concat(e.volumes," volumes resident"):"Viewer memory",className:(0,l.cn)("measurement text-[9px]",n>.8?"text-signal-concern":"text-clinical-dim"),children:e?"".concat(e.mb," MB \xb7 ").concat(e.volumes," vol"):"—"}),(0,r.jsx)("button",{type:"button",onClick:()=>(0,c.CB)(),title:"Release all volumes and rebuild the renderer. Use if the images stop appearing.",className:"rounded border border-clinical-600 px-1.5 py-0.5 text-[9px] text-clinical-muted transition-colors hover:border-signal-info/60 hover:text-clinical-text",children:"reset viewer"})]})}}}]);
|
_next/static/chunks/646.c2c67a3e35c59670.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[646],{12479:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(14232),o=r.useLayoutEffect,l=r.useEffect;function a(e){let{headManager:t,reduceComponentsToState:n}=e;function a(){if(t&&t.mountedInstances){let o=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(n(o,e))}}return o(()=>{var n;return null==t||null==(n=t.mountedInstances)||n.add(e.children),()=>{var n;null==t||null==(n=t.mountedInstances)||n.delete(e.children)}}),o(()=>(t&&(t._pendingUpdate=a),()=>{t&&(t._pendingUpdate=a)})),l(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},18438:(e,t)=>{function n(e){let{ampFirst:t=!1,hybrid:n=!1,hasQuery:r=!1}=void 0===e?{}:e;return t||n&&r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return n}})},31646:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}});let r=n(64252),o=n(37876),l=r._(n(14232)),a=r._(n(97918)),i={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"};function d(e){let{req:t,res:n,err:r}=e;return{statusCode:n&&n.statusCode?n.statusCode:r?r.statusCode:404,hostname:window.location.hostname}}let s={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{lineHeight:"48px"},h1:{display:"inline-block",margin:"0 20px 0 0",paddingRight:23,fontSize:24,fontWeight:500,verticalAlign:"top"},h2:{fontSize:14,fontWeight:400,lineHeight:"28px"},wrap:{display:"inline-block"}};class u extends l.default.Component{render(){let{statusCode:e,withDarkMode:t=!0}=this.props,n=this.props.title||i[e]||"An unexpected error has occurred";return(0,o.jsxs)("div",{style:s.error,children:[(0,o.jsx)(a.default,{children:(0,o.jsx)("title",{children:e?e+": "+n:"Application error: a client-side exception has occurred"})}),(0,o.jsxs)("div",{style:s.desc,children:[(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}"+(t?"@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}":"")}}),e?(0,o.jsx)("h1",{className:"next-error-h1",style:s.h1,children:e}):null,(0,o.jsx)("div",{style:s.wrap,children:(0,o.jsxs)("h2",{style:s.h2,children:[this.props.title||e?n:(0,o.jsxs)(o.Fragment,{children:["Application error: a client-side exception has occurred"," ",!!this.props.hostname&&(0,o.jsxs)(o.Fragment,{children:["while loading ",this.props.hostname]})," ","(see the browser console for more information)"]}),"."]})})]})]})}}u.displayName="ErrorPage",u.getInitialProps=d,u.origGetInitialProps=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)},55066:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AmpStateContext",{enumerable:!0,get:function(){return r}});let r=n(64252)._(n(14232)).default.createContext({})},97918:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return y},defaultHead:function(){return c}});let r=n(64252),o=n(88365),l=n(37876),a=o._(n(14232)),i=r._(n(12479)),d=n(55066),s=n(74324),u=n(18438);function c(e){void 0===e&&(e=!1);let t=[(0,l.jsx)("meta",{charSet:"utf-8"},"charset")];return e||t.push((0,l.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")),t}function p(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===a.default.Fragment?e.concat(a.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}n(76456);let f=["name","httpEquiv","charSet","itemProp"];function h(e,t){let{inAmpMode:n}=t;return e.reduce(p,[]).reverse().concat(c(n).reverse()).filter(function(){let e=new Set,t=new Set,n=new Set,r={};return o=>{let l=!0,a=!1;if(o.key&&"number"!=typeof o.key&&o.key.indexOf("$")>0){a=!0;let t=o.key.slice(o.key.indexOf("$")+1);e.has(t)?l=!1:e.add(t)}switch(o.type){case"title":case"base":t.has(o.type)?l=!1:t.add(o.type);break;case"meta":for(let e=0,t=f.length;e<t;e++){let t=f[e];if(o.props.hasOwnProperty(t))if("charSet"===t)n.has(t)?l=!1:n.add(t);else{let e=o.props[t],n=r[t]||new Set;("name"!==t||!a)&&n.has(e)?l=!1:(n.add(e),r[t]=n)}}}return l}}()).reverse().map((e,t)=>{let n=e.key||t;return a.default.cloneElement(e,{key:n})})}let y=function(e){let{children:t}=e,n=(0,a.useContext)(d.AmpStateContext),r=(0,a.useContext)(s.HeadManagerContext);return(0,l.jsx)(i.default,{reduceComponentsToState:h,headManager:r,inAmpMode:(0,u.isInAmpMode)(n),children:t})};("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)}}]);
|
_next/static/chunks/658-3bc27228933a69df.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
_next/static/chunks/808.846f0159cc232e21.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[808],{5808:(e,t,n)=>{n.r(t),n.d(t,{SliceSyncToggle:()=>r});var a=n(95155),i=n(12115),l=n(55545),s=n(36178);function r(){let[e,t]=(0,i.useState)(()=>(0,s.BX)());return(0,a.jsxs)("button",{type:"button",onClick:()=>{let n=!e;(0,s.rr)(n),t(n)},title:e?"Panes are linked to the same relative depth through the volume. Alignment is approximate: the studies are not registered to each other.":"Panes scroll independently. They may show different anatomical levels.",className:(0,l.cn)("flex items-center gap-1 rounded px-2 py-0.5 text-[10px] uppercase tracking-wider transition-colors",e?"bg-signal-info/20 text-signal-info":"text-clinical-dim hover:text-clinical-muted"),children:[(0,a.jsx)("span",{className:(0,l.cn)("size-1.5 rounded-full",e?"bg-signal-info":"bg-clinical-500")}),"linked",e&&(0,a.jsx)("span",{className:"normal-case tracking-normal opacity-70",children:"(approx)"})]})}}}]);
|
_next/static/chunks/942.1c41165479333662.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
_next/static/chunks/987.0c5b0a0d50e19d04.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[987],{4371:(t,e,i)=>{var n=i(15376).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.NIFTI2=void 0;let s=i(6958),r=i(42541);class a{littleEndian=!1;dim_info=0;dims=[];intent_p1=0;intent_p2=0;intent_p3=0;intent_code=0;datatypeCode=0;numBitsPerVoxel=0;slice_start=0;slice_end=0;slice_code=0;pixDims=[];vox_offset=0;scl_slope=1;scl_inter=0;xyzt_units=0;cal_max=0;cal_min=0;slice_duration=0;toffset=0;description="";aux_file="";intent_name="";qform_code=0;sform_code=0;quatern_b=0;quatern_c=0;quatern_d=0;qoffset_x=0;qoffset_y=0;qoffset_z=0;affine=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];magic="0";extensionFlag=[0,0,0,0];extensions=[];extensionSize=0;extensionCode=0;static MAGIC_COOKIE=540;static MAGIC_NUMBER_LOCATION=4;static MAGIC_NUMBER=[110,43,50,0,13,10,26,10];static MAGIC_NUMBER2=[110,105,50,0,13,10,26,10];readHeader(t){var e,i,n,s,o=new DataView(t),l=r.Utils.getIntAt(o,0,this.littleEndian);if(l!==a.MAGIC_COOKIE&&(this.littleEndian=!0,l=r.Utils.getIntAt(o,0,this.littleEndian)),l!==a.MAGIC_COOKIE)throw Error("This does not appear to be a NIFTI file!");for(e=0,this.magic=r.Utils.getStringAt(o,4,12),this.datatypeCode=r.Utils.getShortAt(o,12,this.littleEndian),this.numBitsPerVoxel=r.Utils.getShortAt(o,14,this.littleEndian);e<8;e+=1)s=16+8*e,this.dims[e]=r.Utils.getInt64At(o,s,this.littleEndian);for(e=0,this.intent_p1=r.Utils.getDoubleAt(o,80,this.littleEndian),this.intent_p2=r.Utils.getDoubleAt(o,88,this.littleEndian),this.intent_p3=r.Utils.getDoubleAt(o,96,this.littleEndian);e<8;e+=1)s=104+8*e,this.pixDims[e]=r.Utils.getDoubleAt(o,s,this.littleEndian);for(i=0,this.vox_offset=r.Utils.getInt64At(o,168,this.littleEndian),this.scl_slope=r.Utils.getDoubleAt(o,176,this.littleEndian),this.scl_inter=r.Utils.getDoubleAt(o,184,this.littleEndian),this.cal_max=r.Utils.getDoubleAt(o,192,this.littleEndian),this.cal_min=r.Utils.getDoubleAt(o,200,this.littleEndian),this.slice_duration=r.Utils.getDoubleAt(o,208,this.littleEndian),this.toffset=r.Utils.getDoubleAt(o,216,this.littleEndian),this.slice_start=r.Utils.getInt64At(o,224,this.littleEndian),this.slice_end=r.Utils.getInt64At(o,232,this.littleEndian),this.description=r.Utils.getStringAt(o,240,320),this.aux_file=r.Utils.getStringAt(o,320,344),this.qform_code=r.Utils.getIntAt(o,344,this.littleEndian),this.sform_code=r.Utils.getIntAt(o,348,this.littleEndian),this.quatern_b=r.Utils.getDoubleAt(o,352,this.littleEndian),this.quatern_c=r.Utils.getDoubleAt(o,360,this.littleEndian),this.quatern_d=r.Utils.getDoubleAt(o,368,this.littleEndian),this.qoffset_x=r.Utils.getDoubleAt(o,376,this.littleEndian),this.qoffset_y=r.Utils.getDoubleAt(o,384,this.littleEndian),this.qoffset_z=r.Utils.getDoubleAt(o,392,this.littleEndian);i<3;i+=1)for(n=0;n<4;n+=1)s=400+(4*i+n)*8,this.affine[i][n]=r.Utils.getDoubleAt(o,s,this.littleEndian);this.affine[3][0]=0,this.affine[3][1]=0,this.affine[3][2]=0,this.affine[3][3]=1,this.slice_code=r.Utils.getIntAt(o,496,this.littleEndian),this.xyzt_units=r.Utils.getIntAt(o,500,this.littleEndian),this.intent_code=r.Utils.getIntAt(o,504,this.littleEndian),this.intent_name=r.Utils.getStringAt(o,508,524),this.dim_info=r.Utils.getByteAt(o,524),o.byteLength>a.MAGIC_COOKIE&&(this.extensionFlag[0]=r.Utils.getByteAt(o,540),this.extensionFlag[1]=r.Utils.getByteAt(o,541),this.extensionFlag[2]=r.Utils.getByteAt(o,542),this.extensionFlag[3]=r.Utils.getByteAt(o,543),this.extensionFlag[0]&&(this.extensions=r.Utils.getExtensionsAt(o,this.getExtensionLocation(),this.littleEndian,this.vox_offset),this.extensionSize=this.extensions[0].esize,this.extensionCode=this.extensions[0].ecode))}toFormattedString(){var t=r.Utils.formatNumber,e="";return e+("Datatype = "+ +this.datatypeCode+" ("+this.getDatatypeCodeString(this.datatypeCode)+")\n"+("Bits Per Voxel = = "+this.numBitsPerVoxel)+"\n"+("Image Dimensions (1-8): "+this.dims[0]+", "+this.dims[1]+", "+this.dims[2]+", "+this.dims[3]+", "+this.dims[4]+", "+this.dims[5]+", "+this.dims[6]+", "+this.dims[7])+"\n"+("Intent Parameters (1-3): "+this.intent_p1+", "+this.intent_p2+", "+this.intent_p3)+"\n"+("Voxel Dimensions (1-8): "+t(this.pixDims[0])+", "+t(this.pixDims[1])+", "+t(this.pixDims[2])+", "+t(this.pixDims[3])+", "+t(this.pixDims[4])+", "+t(this.pixDims[5])+", "+t(this.pixDims[6])+", "+t(this.pixDims[7]))+"\n"+("Image Offset = "+this.vox_offset)+"\n"+("Data Scale: Slope = "+t(this.scl_slope)+" Intercept = "+t(this.scl_inter))+"\n"+("Display Range: Max = "+t(this.cal_max)+" Min = "+t(this.cal_min))+"\n"+("Slice Duration = "+this.slice_duration)+"\n"+("Time Axis Shift = "+this.toffset)+"\n"+("Slice Start = "+this.slice_start)+"\n"+("Slice End = "+this.slice_end)+"\n"+('Description: "'+this.description)+'"\n'+('Auxiliary File: "'+this.aux_file)+'"\n'+("Q-Form Code = "+this.qform_code+" ("+this.getTransformCodeString(this.qform_code))+")\n"+("S-Form Code = "+this.sform_code+" ("+this.getTransformCodeString(this.sform_code))+")\n"+("Quaternion Parameters: b = "+t(this.quatern_b)+" c = "+t(this.quatern_c)+" d = "+t(this.quatern_d))+"\n"+("Quaternion Offsets: x = "+this.qoffset_x+" y = "+this.qoffset_y+" z = "+this.qoffset_z)+"\n"+("S-Form Parameters X: "+t(this.affine[0][0])+", "+t(this.affine[0][1])+", "+t(this.affine[0][2])+", "+t(this.affine[0][3]))+"\n"+("S-Form Parameters Y: "+t(this.affine[1][0])+", "+t(this.affine[1][1])+", "+t(this.affine[1][2])+", "+t(this.affine[1][3]))+"\n"+("S-Form Parameters Z: "+t(this.affine[2][0])+", "+t(this.affine[2][1])+", "+t(this.affine[2][2])+", "+t(this.affine[2][3]))+"\n"+("Slice Code = "+this.slice_code)+"\n"+("Units Code = "+this.xyzt_units+" ("+this.getUnitsCodeString(s.NIFTI1.SPATIAL_UNITS_MASK&this.xyzt_units)+", "+this.getUnitsCodeString(s.NIFTI1.TEMPORAL_UNITS_MASK&this.xyzt_units))+")\n"+("Intent Code = "+this.intent_code)+"\n"+('Intent Name: "'+this.intent_name)+'"\n'+("Dim Info = "+this.dim_info)+"\n")}getExtensionLocation=function(){return a.MAGIC_COOKIE+4};getExtensionSize=s.NIFTI1.prototype.getExtensionSize;getExtensionCode=s.NIFTI1.prototype.getExtensionCode;addExtension=s.NIFTI1.prototype.addExtension;removeExtension=s.NIFTI1.prototype.removeExtension;getDatatypeCodeString=s.NIFTI1.prototype.getDatatypeCodeString;getTransformCodeString=s.NIFTI1.prototype.getTransformCodeString;getUnitsCodeString=s.NIFTI1.prototype.getUnitsCodeString;getQformMat=s.NIFTI1.prototype.getQformMat;convertNiftiQFormToNiftiSForm=s.NIFTI1.prototype.convertNiftiQFormToNiftiSForm;convertNiftiSFormToNEMA=s.NIFTI1.prototype.convertNiftiSFormToNEMA;nifti_mat33_mul=s.NIFTI1.prototype.nifti_mat33_mul;nifti_mat33_determ=s.NIFTI1.prototype.nifti_mat33_determ;toArrayBuffer(t=!1){let e=544;if(t)for(let t of this.extensions)e+=t.esize;let i=new Uint8Array(e),s=new DataView(i.buffer);s.setInt32(0,540,this.littleEndian),i.set(n.from(this.magic),4),s.setInt16(12,this.datatypeCode,this.littleEndian),s.setInt16(14,this.numBitsPerVoxel,this.littleEndian);for(let t=0;t<8;t++)s.setBigInt64(16+8*t,BigInt(this.dims[t]),this.littleEndian);s.setFloat64(80,this.intent_p1,this.littleEndian),s.setFloat64(88,this.intent_p2,this.littleEndian),s.setFloat64(96,this.intent_p3,this.littleEndian);for(let t=0;t<8;t++)s.setFloat64(104+8*t,this.pixDims[t],this.littleEndian);s.setBigInt64(168,BigInt(this.vox_offset),this.littleEndian),s.setFloat64(176,this.scl_slope,this.littleEndian),s.setFloat64(184,this.scl_inter,this.littleEndian),s.setFloat64(192,this.cal_max,this.littleEndian),s.setFloat64(200,this.cal_min,this.littleEndian),s.setFloat64(208,this.slice_duration,this.littleEndian),s.setFloat64(216,this.toffset,this.littleEndian),s.setBigInt64(224,BigInt(this.slice_start),this.littleEndian),s.setBigInt64(232,BigInt(this.slice_end),this.littleEndian),i.set(n.from(this.description),240),i.set(n.from(this.aux_file),320),s.setInt32(344,this.qform_code,this.littleEndian),s.setInt32(348,this.sform_code,this.littleEndian),s.setFloat64(352,this.quatern_b,this.littleEndian),s.setFloat64(360,this.quatern_c,this.littleEndian),s.setFloat64(368,this.quatern_d,this.littleEndian),s.setFloat64(376,this.qoffset_x,this.littleEndian),s.setFloat64(384,this.qoffset_y,this.littleEndian),s.setFloat64(392,this.qoffset_z,this.littleEndian);let r=this.affine.flat();for(let t=0;t<12;t++)s.setFloat64(400+8*t,r[t],this.littleEndian);if(s.setInt32(496,this.slice_code,this.littleEndian),s.setInt32(500,this.xyzt_units,this.littleEndian),s.setInt32(504,this.intent_code,this.littleEndian),i.set(n.from(this.intent_name),508),s.setUint8(524,this.dim_info),t){i.set(Uint8Array.from([1,0,0,0]),540);let t=this.getExtensionLocation();for(let e of this.extensions)s.setInt32(t,e.esize,e.littleEndian),s.setInt32(t+4,e.ecode,e.littleEndian),i.set(new Uint8Array(e.edata),t+8),t+=e.esize}else i.set(new Uint8Array(4).fill(0),540);return i.buffer}}e.NIFTI2=a},6958:(t,e,i)=>{var n=i(15376).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.NIFTI1=void 0;let s=i(42541);class r{littleEndian=!1;dim_info=0;dims=[];intent_p1=0;intent_p2=0;intent_p3=0;intent_code=0;datatypeCode=0;numBitsPerVoxel=0;slice_start=0;slice_end=0;slice_code=0;pixDims=[];vox_offset=0;scl_slope=1;scl_inter=0;xyzt_units=0;cal_max=0;cal_min=0;slice_duration=0;toffset=0;description="";aux_file="";intent_name="";qform_code=0;sform_code=0;quatern_a=0;quatern_b=0;quatern_c=0;quatern_d=0;qoffset_x=0;qoffset_y=0;qoffset_z=0;affine=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];qfac=1;quatern_R;magic="0";isHDR=!1;extensionFlag=[0,0,0,0];extensionSize=0;extensionCode=0;extensions=[];static TYPE_NONE=0;static TYPE_BINARY=1;static TYPE_UINT8=2;static TYPE_INT16=4;static TYPE_INT32=8;static TYPE_FLOAT32=16;static TYPE_COMPLEX64=32;static TYPE_FLOAT64=64;static TYPE_RGB24=128;static TYPE_INT8=256;static TYPE_UINT16=512;static TYPE_UINT32=768;static TYPE_INT64=1024;static TYPE_UINT64=1280;static TYPE_FLOAT128=1536;static TYPE_COMPLEX128=1792;static TYPE_COMPLEX256=2048;static XFORM_UNKNOWN=0;static XFORM_SCANNER_ANAT=1;static XFORM_ALIGNED_ANAT=2;static XFORM_TALAIRACH=3;static XFORM_MNI_152=4;static SPATIAL_UNITS_MASK=7;static TEMPORAL_UNITS_MASK=56;static UNITS_UNKNOWN=0;static UNITS_METER=1;static UNITS_MM=2;static UNITS_MICRON=3;static UNITS_SEC=8;static UNITS_MSEC=16;static UNITS_USEC=24;static UNITS_HZ=32;static UNITS_PPM=40;static UNITS_RADS=48;static MAGIC_COOKIE=348;static STANDARD_HEADER_SIZE=348;static MAGIC_NUMBER_LOCATION=344;static MAGIC_NUMBER=[110,43,49];static MAGIC_NUMBER2=[110,105,49];static EXTENSION_HEADER_SIZE=8;readHeader(t){var e,i,n,a,o=new DataView(t),l=s.Utils.getIntAt(o,0,this.littleEndian);if(l!==r.MAGIC_COOKIE&&(this.littleEndian=!0,l=s.Utils.getIntAt(o,0,this.littleEndian)),l!==r.MAGIC_COOKIE)throw Error("This does not appear to be a NIFTI file!");for(e=0,this.dim_info=s.Utils.getByteAt(o,39);e<8;e+=1)a=40+2*e,this.dims[e]=s.Utils.getShortAt(o,a,this.littleEndian);for(e=0,this.intent_p1=s.Utils.getFloatAt(o,56,this.littleEndian),this.intent_p2=s.Utils.getFloatAt(o,60,this.littleEndian),this.intent_p3=s.Utils.getFloatAt(o,64,this.littleEndian),this.intent_code=s.Utils.getShortAt(o,68,this.littleEndian),this.datatypeCode=s.Utils.getShortAt(o,70,this.littleEndian),this.numBitsPerVoxel=s.Utils.getShortAt(o,72,this.littleEndian),this.slice_start=s.Utils.getShortAt(o,74,this.littleEndian);e<8;e+=1)a=76+4*e,this.pixDims[e]=s.Utils.getFloatAt(o,a,this.littleEndian);if(this.vox_offset=s.Utils.getFloatAt(o,108,this.littleEndian),this.scl_slope=s.Utils.getFloatAt(o,112,this.littleEndian),this.scl_inter=s.Utils.getFloatAt(o,116,this.littleEndian),this.slice_end=s.Utils.getShortAt(o,120,this.littleEndian),this.slice_code=s.Utils.getByteAt(o,122),this.xyzt_units=s.Utils.getByteAt(o,123),this.cal_max=s.Utils.getFloatAt(o,124,this.littleEndian),this.cal_min=s.Utils.getFloatAt(o,128,this.littleEndian),this.slice_duration=s.Utils.getFloatAt(o,132,this.littleEndian),this.toffset=s.Utils.getFloatAt(o,136,this.littleEndian),this.description=s.Utils.getStringAt(o,148,228),this.aux_file=s.Utils.getStringAt(o,228,252),this.qform_code=s.Utils.getShortAt(o,252,this.littleEndian),this.sform_code=s.Utils.getShortAt(o,254,this.littleEndian),this.quatern_b=s.Utils.getFloatAt(o,256,this.littleEndian),this.quatern_c=s.Utils.getFloatAt(o,260,this.littleEndian),this.quatern_d=s.Utils.getFloatAt(o,264,this.littleEndian),this.quatern_a=Math.sqrt(1-(Math.pow(this.quatern_b,2)+Math.pow(this.quatern_c,2)+Math.pow(this.quatern_d,2))),this.qoffset_x=s.Utils.getFloatAt(o,268,this.littleEndian),this.qoffset_y=s.Utils.getFloatAt(o,272,this.littleEndian),this.qoffset_z=s.Utils.getFloatAt(o,276,this.littleEndian),this.qform_code<1&&this.sform_code<1&&(this.affine[0][0]=this.pixDims[1],this.affine[1][1]=this.pixDims[2],this.affine[2][2]=this.pixDims[3]),this.qform_code>0&&this.sform_code<this.qform_code){let t=this.quatern_a,e=this.quatern_b,s=this.quatern_c,r=this.quatern_d;for(i=0,this.qfac=0===this.pixDims[0]?1:this.pixDims[0],this.quatern_R=[[t*t+e*e-s*s-r*r,2*e*s-2*t*r,2*e*r+2*t*s],[2*e*s+2*t*r,t*t+s*s-e*e-r*r,2*s*r-2*t*e],[2*e*r-2*t*s,2*s*r+2*t*e,t*t+r*r-s*s-e*e]];i<3;i+=1)for(n=0;n<3;n+=1)this.affine[i][n]=this.quatern_R[i][n]*this.pixDims[n+1],2===n&&(this.affine[i][n]*=this.qfac);this.affine[0][3]=this.qoffset_x,this.affine[1][3]=this.qoffset_y,this.affine[2][3]=this.qoffset_z}else if(this.sform_code>0)for(i=0;i<3;i+=1)for(n=0;n<4;n+=1)a=280+(4*i+n)*4,this.affine[i][n]=s.Utils.getFloatAt(o,a,this.littleEndian);if(this.affine[3][0]=0,this.affine[3][1]=0,this.affine[3][2]=0,this.affine[3][3]=1,this.intent_name=s.Utils.getStringAt(o,328,344),this.magic=s.Utils.getStringAt(o,344,348),this.isHDR=this.magic===String.fromCharCode.apply(null,r.MAGIC_NUMBER2),o.byteLength>r.MAGIC_COOKIE){this.extensionFlag[0]=s.Utils.getByteAt(o,348),this.extensionFlag[1]=s.Utils.getByteAt(o,349),this.extensionFlag[2]=s.Utils.getByteAt(o,350),this.extensionFlag[3]=s.Utils.getByteAt(o,351);let t=!0;!this.isHDR&&this.vox_offset<=352&&(t=!1),o.byteLength<=368&&(t=!1),t&&this.extensionFlag[0]&&(this.extensions=s.Utils.getExtensionsAt(o,this.getExtensionLocation(),this.littleEndian,this.vox_offset),this.extensionSize=this.extensions[0].esize,this.extensionCode=this.extensions[0].ecode)}}toFormattedString(){var t=s.Utils.formatNumber,e="";return e+="Dim Info = "+this.dim_info+"\n"+("Image Dimensions (1-8): "+this.dims[0]+", "+this.dims[1]+", "+this.dims[2]+", "+this.dims[3]+", "+this.dims[4]+", "+this.dims[5]+", "+this.dims[6]+", "+this.dims[7])+"\n"+("Intent Parameters (1-3): "+this.intent_p1+", "+this.intent_p2+", "+this.intent_p3)+"\n"+("Intent Code = "+this.intent_code)+"\n"+("Datatype = "+this.datatypeCode+" ("+this.getDatatypeCodeString(this.datatypeCode))+")\n"+("Bits Per Voxel = "+this.numBitsPerVoxel)+"\n"+("Slice Start = "+this.slice_start)+"\n"+("Voxel Dimensions (1-8): "+t(this.pixDims[0])+", "+t(this.pixDims[1])+", "+t(this.pixDims[2])+", "+t(this.pixDims[3])+", "+t(this.pixDims[4])+", "+t(this.pixDims[5])+", "+t(this.pixDims[6])+", "+t(this.pixDims[7]))+"\n"+("Image Offset = "+this.vox_offset)+"\n"+("Data Scale: Slope = "+t(this.scl_slope)+" Intercept = "+t(this.scl_inter))+"\n"+("Slice End = "+this.slice_end)+"\n"+("Slice Code = "+this.slice_code)+"\n"+("Units Code = "+this.xyzt_units+" ("+this.getUnitsCodeString(r.SPATIAL_UNITS_MASK&this.xyzt_units)+", "+this.getUnitsCodeString(r.TEMPORAL_UNITS_MASK&this.xyzt_units))+")\n"+("Display Range: Max = "+t(this.cal_max)+" Min = "+t(this.cal_min))+"\n"+("Slice Duration = "+this.slice_duration)+"\n"+("Time Axis Shift = "+this.toffset)+"\n"+('Description: "'+this.description)+'"\n'+('Auxiliary File: "'+this.aux_file)+'"\n'+("Q-Form Code = "+this.qform_code+" ("+this.getTransformCodeString(this.qform_code))+")\n"+("S-Form Code = "+this.sform_code+" ("+this.getTransformCodeString(this.sform_code))+")\n"+("Quaternion Parameters: b = "+t(this.quatern_b)+" c = "+t(this.quatern_c)+" d = "+t(this.quatern_d))+"\n"+("Quaternion Offsets: x = "+this.qoffset_x+" y = "+this.qoffset_y+" z = "+this.qoffset_z)+"\n"+("S-Form Parameters X: "+t(this.affine[0][0])+", "+t(this.affine[0][1])+", "+t(this.affine[0][2])+", "+t(this.affine[0][3]))+"\n"+("S-Form Parameters Y: "+t(this.affine[1][0])+", "+t(this.affine[1][1])+", "+t(this.affine[1][2])+", "+t(this.affine[1][3]))+"\n"+("S-Form Parameters Z: "+t(this.affine[2][0])+", "+t(this.affine[2][1])+", "+t(this.affine[2][2])+", "+t(this.affine[2][3]))+"\n"+('Intent Name: "'+this.intent_name)+'"\n',this.extensionFlag[0]&&(e+="Extension: Size = "+this.extensionSize+" Code = "+this.extensionCode+"\n"),e}getDatatypeCodeString=function(t){if(t===r.TYPE_UINT8)return"1-Byte Unsigned Integer";if(t===r.TYPE_INT16)return"2-Byte Signed Integer";if(t===r.TYPE_INT32)return"4-Byte Signed Integer";if(t===r.TYPE_FLOAT32)return"4-Byte Float";if(t===r.TYPE_FLOAT64)return"8-Byte Float";else if(t===r.TYPE_RGB24)return"RGB";else if(t===r.TYPE_INT8)return"1-Byte Signed Integer";else if(t===r.TYPE_UINT16)return"2-Byte Unsigned Integer";else if(t===r.TYPE_UINT32)return"4-Byte Unsigned Integer";else if(t===r.TYPE_INT64)return"8-Byte Signed Integer";else if(t===r.TYPE_UINT64)return"8-Byte Unsigned Integer";else return"Unknown"};getTransformCodeString=function(t){return t===r.XFORM_SCANNER_ANAT?"Scanner":t===r.XFORM_ALIGNED_ANAT?"Aligned":t===r.XFORM_TALAIRACH?"Talairach":t===r.XFORM_MNI_152?"MNI":"Unknown"};getUnitsCodeString=function(t){if(t===r.UNITS_METER)return"Meters";if(t===r.UNITS_MM)return"Millimeters";if(t===r.UNITS_MICRON)return"Microns";if(t===r.UNITS_SEC)return"Seconds";if(t===r.UNITS_MSEC)return"Milliseconds";else if(t===r.UNITS_USEC)return"Microseconds";else if(t===r.UNITS_HZ)return"Hz";else if(t===r.UNITS_PPM)return"PPM";else if(t===r.UNITS_RADS)return"Rads";else return"Unknown"};getQformMat(){return this.convertNiftiQFormToNiftiSForm(this.quatern_b,this.quatern_c,this.quatern_d,this.qoffset_x,this.qoffset_y,this.qoffset_z,this.pixDims[1],this.pixDims[2],this.pixDims[3],this.pixDims[0])}convertNiftiQFormToNiftiSForm(t,e,i,n,s,r,a,o,l,h){var f,u,c,d,p=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],g=t,_=e,m=i;return p[3][0]=p[3][1]=p[3][2]=0,p[3][3]=1,(f=1-(g*g+_*_+m*m))<1e-7?(f=1/Math.sqrt(g*g+_*_+m*m),g*=f,_*=f,m*=f,f=0):f=Math.sqrt(f),u=a>0?a:1,c=o>0?o:1,d=l>0?l:1,h<0&&(d=-d),p[0][0]=(f*f+g*g-_*_-m*m)*u,p[0][1]=2*(g*_-f*m)*c,p[0][2]=2*(g*m+f*_)*d,p[1][0]=2*(g*_+f*m)*u,p[1][1]=(f*f+_*_-g*g-m*m)*c,p[1][2]=2*(_*m-f*g)*d,p[2][0]=2*(g*m-f*_)*u,p[2][1]=2*(_*m+f*g)*c,p[2][2]=(f*f+m*m-_*_-g*g)*d,p[0][3]=n,p[1][3]=s,p[2][3]=r,p}convertNiftiSFormToNEMA(t){var e,i,n,s,r,a,o,l,h,f,u,c,d,p,g,_,m,I,v,E,y,A,T,x,b,U,N,F,S,M,w,C,O;if(p=0,U=[[0,0,0],[0,0,0],[0,0,0]],N=[[0,0,0],[0,0,0],[0,0,0]],e=t[0][0],i=t[0][1],n=t[0][2],s=t[1][0],r=t[1][1],a=t[1][2],o=t[2][0],l=t[2][1],h=t[2][2],0===(f=Math.sqrt(e*e+s*s+o*o))||(e/=f,s/=f,o/=f,0===(f=Math.sqrt(i*i+r*r+l*l))))return null;if(i/=f,r/=f,l/=f,Math.abs(f=e*i+s*r+o*l)>1e-4){if(i-=f*e,r-=f*s,l-=f*o,0===(f=Math.sqrt(i*i+r*r+l*l)))return null;i/=f,r/=f,l/=f}if(0===(f=Math.sqrt(n*n+a*a+h*h))?(n=s*l-o*r,a=o*i-l*e,h=e*r-s*i):(n/=f,a/=f,h/=f),Math.abs(f=e*n+s*a+o*h)>1e-4){if(n-=f*e,a-=f*s,h-=f*o,0===(f=Math.sqrt(n*n+a*a+h*h)))return null;n/=f,a/=f,h/=f}if(Math.abs(f=i*n+r*a+l*h)>1e-4){if(n-=f*i,a-=f*r,h-=f*l,0===(f=Math.sqrt(n*n+a*a+h*h)))return null;n/=f,a/=f,h/=f}if(U[0][0]=e,U[0][1]=i,U[0][2]=n,U[1][0]=s,U[1][1]=r,U[1][2]=a,U[2][0]=o,U[2][1]=l,U[2][2]=h,0===(u=this.nifti_mat33_determ(U)))return null;for(c=1,b=-666,I=y=A=T=1,v=2,E=3;c<=3;c+=1)for(d=1;d<=3;d+=1)if(c!==d){for(p=1;p<=3;p+=1)if(c!==p&&d!==p)for(g=-1,N[0][0]=N[0][1]=N[0][2]=N[1][0]=N[1][1]=N[1][2]=N[2][0]=N[2][1]=N[2][2]=0;g<=1;g+=2)for(_=-1;_<=1;_+=2)for(m=-1;m<=1;m+=2)N[0][c-1]=g,N[1][d-1]=_,N[2][p-1]=m,this.nifti_mat33_determ(N)*u>0&&(f=(x=this.nifti_mat33_mul(N,U))[0][0]+x[1][1]+x[2][2])>b&&(b=f,I=c,v=d,E=p,y=g,A=_,T=m)}switch(F=S=M=w=C=O="",I*y){case 1:F="X",w="+";break;case -1:F="X",w="-";break;case 2:F="Y",w="+";break;case -2:F="Y",w="-";break;case 3:F="Z",w="+";break;case -3:F="Z",w="-"}switch(v*A){case 1:S="X",C="+";break;case -1:S="X",C="-";break;case 2:S="Y",C="+";break;case -2:S="Y",C="-";break;case 3:S="Z",C="+";break;case -3:S="Z",C="-"}switch(E*T){case 1:M="X",O="+";break;case -1:M="X",O="-";break;case 2:M="Y",O="+";break;case -2:M="Y",O="-";break;case 3:M="Z",O="+";break;case -3:M="Z",O="-"}return F+S+M+w+C+O}nifti_mat33_mul=function(t,e){var i,n,s=[[0,0,0],[0,0,0],[0,0,0]];for(i=0;i<3;i+=1)for(n=0;n<3;n+=1)s[i][n]=t[i][0]*e[0][n]+t[i][1]*e[1][n]+t[i][2]*e[2][n];return s};nifti_mat33_determ=function(t){var e,i,n,s,r,a,o,l,h;return e=t[0][0],i=t[0][1],n=t[0][2],s=t[1][0],r=t[1][1],a=t[1][2],o=t[2][0],l=t[2][1],e*r*(h=t[2][2])-e*l*a-s*i*h+s*l*n+o*i*a-o*r*n};getExtensionLocation(){return r.MAGIC_COOKIE+4}getExtensionSize(t){return s.Utils.getIntAt(t,this.getExtensionLocation(),this.littleEndian)}getExtensionCode(t){return s.Utils.getIntAt(t,this.getExtensionLocation()+4,this.littleEndian)}addExtension(t,e=-1){-1==e?this.extensions.push(t):this.extensions.splice(e,0,t),this.vox_offset+=t.esize}removeExtension(t){let e=this.extensions[t];e&&(this.vox_offset-=e.esize),this.extensions.splice(t,1)}toArrayBuffer(t=!1){let e=352;if(t)for(let t of this.extensions)e+=t.esize;let i=new Uint8Array(e),s=new DataView(i.buffer);s.setInt32(0,348,this.littleEndian),s.setUint8(39,this.dim_info);for(let t=0;t<8;t++)s.setUint16(40+2*t,this.dims[t],this.littleEndian);s.setFloat32(56,this.intent_p1,this.littleEndian),s.setFloat32(60,this.intent_p2,this.littleEndian),s.setFloat32(64,this.intent_p3,this.littleEndian),s.setInt16(68,this.intent_code,this.littleEndian),s.setInt16(70,this.datatypeCode,this.littleEndian),s.setInt16(72,this.numBitsPerVoxel,this.littleEndian),s.setInt16(74,this.slice_start,this.littleEndian);for(let t=0;t<8;t++)s.setFloat32(76+4*t,this.pixDims[t],this.littleEndian);s.setFloat32(108,this.vox_offset,this.littleEndian),s.setFloat32(112,this.scl_slope,this.littleEndian),s.setFloat32(116,this.scl_inter,this.littleEndian),s.setInt16(120,this.slice_end,this.littleEndian),s.setUint8(122,this.slice_code),s.setUint8(123,this.xyzt_units),s.setFloat32(124,this.cal_max,this.littleEndian),s.setFloat32(128,this.cal_min,this.littleEndian),s.setFloat32(132,this.slice_duration,this.littleEndian),s.setFloat32(136,this.toffset,this.littleEndian),i.set(n.from(this.description),148),i.set(n.from(this.aux_file),228),s.setInt16(252,this.qform_code,this.littleEndian),s.setInt16(254,this.sform_code,this.littleEndian),s.setFloat32(256,this.quatern_b,this.littleEndian),s.setFloat32(260,this.quatern_c,this.littleEndian),s.setFloat32(264,this.quatern_d,this.littleEndian),s.setFloat32(268,this.qoffset_x,this.littleEndian),s.setFloat32(272,this.qoffset_y,this.littleEndian),s.setFloat32(276,this.qoffset_z,this.littleEndian);let r=this.affine.flat();for(let t=0;t<12;t++)s.setFloat32(280+4*t,r[t],this.littleEndian);if(i.set(n.from(this.intent_name),328),i.set(n.from(this.magic),344),t){i.set(Uint8Array.from([1,0,0,0]),348);let t=this.getExtensionLocation();for(let e of this.extensions)s.setInt32(t,e.esize,e.littleEndian),s.setInt32(t+4,e.ecode,e.littleEndian),i.set(new Uint8Array(e.edata),t+8),t+=e.esize}else i.set(new Uint8Array(4).fill(0),348);return i.buffer}}e.NIFTI1=r},33862:(t,e)=>{var i={};e.default=function(t,e,n,s,r){var a=new Worker(i[e]||(i[e]=URL.createObjectURL(new Blob([t+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(t){var e=t.data,i=e.$e$;if(i){var n=Error(i[0]);n.code=i[1],n.stack=i[2],r(n,null)}else r(null,e)},a.postMessage(n,s),a}},42541:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=void 0;let n=i(66035);class s{static crcTable=null;static GUNZIP_MAGIC_COOKIE1=31;static GUNZIP_MAGIC_COOKIE2=139;static getStringAt(t,e,i){var n,s,r="";for(n=e;n<i;n+=1)0!==(s=t.getUint8(n))&&(r+=String.fromCharCode(s));return r}static getByteAt=function(t,e){return t.getUint8(e)};static getShortAt=function(t,e,i){return t.getInt16(e,i)};static getIntAt(t,e,i){return t.getInt32(e,i)}static getFloatAt(t,e,i){return t.getFloat32(e,i)}static getDoubleAt(t,e,i){return t.getFloat64(e,i)}static getInt64At(t,e,i){let n,s=t.getUint32(e,i),r=t.getInt32(e+4,i);return n=i?0x100000000*r+s:0x100000000*s+r,r<0&&(n+=-1*0x100000000*0x100000000),n}static getExtensionsAt(t,e,i,r){let a=[],o=e;for(;o<r;){let e=i,l=s.getIntAt(t,o,i);if(!l)break;if(l+o>r&&(e=!e,(l=s.getIntAt(t,o,e))+o>r))throw Error("This does not appear to be a valid NIFTI extension");if(l%16!=0)throw Error("This does not appear to be a NIFTI extension");let h=s.getIntAt(t,o+4,e),f=t.buffer.slice(o+8,o+l);console.log("extensionByteIndex: "+(o+8)+" esize: "+l),console.log(f);let u=new n.NIFTIEXTENSION(l,h,f,e);a.push(u),o+=l}return a}static toArrayBuffer(t){var e,i,n;for(n=0,i=new Uint8Array(e=new ArrayBuffer(t.length));n<t.length;n+=1)i[n]=t[n];return e}static isString(t){return"string"==typeof t||t instanceof String}static formatNumber(t,e){let i;return i=s.isString(t)?Number(t):t,parseFloat(i=e?i.toPrecision(5):i.toPrecision(7))}static makeCRCTable(){let t,e=[];for(var i=0;i<256;i++){t=i;for(var n=0;n<8;n++)t=1&t?0xedb88320^t>>>1:t>>>1;e[i]=t}return e}static crc32(t){s.crcTable||(s.crcTable=s.makeCRCTable());let e=s.crcTable,i=-1;for(var n=0;n<t.byteLength;n++)i=i>>>8^e[(i^t.getUint8(n))&255];return(-1^i)>>>0}}e.Utils=s},54987:(t,e,i)=>{i.d(e,{nL:()=>d,AZ:()=>E,Ts:()=>y});var n,s=i(70192),r=i(65387);!function(t){t.NIFTI_VOLUME_LOADED="CORNERSTONE_NIFTI_VOLUME_LOADED",t.NIFTI_VOLUME_PROGRESS="CORNERSTONE_NIFTI_VOLUME_PROGRESS"}(n||(n={}));let a=n;var o=i(50923);let{windowLevel:l}=s.BF;function h(t,e){let i=t/8*e;if(!s.PP.isCacheable(i))throw Error(s.fX.sV.CACHE_SIZE_EXCEEDED);return s.PP.decacheIfNecessaryUntilBytesAvailable(i),i}function f(t,e){let i,n=e.length;switch(t){case"Float32Array":h(32,n),i=new Float32Array(n);break;case"Int16Array":h(16,n),i=new Int16Array(n);break;case"Int8Array":h(8,n),i=new Int16Array(n);break;case"Uint16Array":h(16,n),i=new Uint16Array(n);break;case"Uint8Array":h(8,n),i=new Uint8Array(n);break;case"Float64Array":h(64,n),i=new Float64Array(n);break;default:throw Error(`TypedArray ${t} is not yet supported`)}return i.set(e),i}let u={beforeSend(){}},c=new Map;function d(t){let[e,i]=t.substring(6).split("?frame="),n=parseInt(i,10),r=s.wx.get(s.fX.nb.IMAGE_PIXEL,t),a=s.wx.get(s.fX.nb.IMAGE_PLANE,t);return{promise:new Promise((i,s)=>{var o,l,h,f,u;c.get(e)?(o=t,l=e,h=n,f=r,u=a,new Promise((t,e)=>{let i=setInterval(()=>{let n=c.get(l);n||(clearInterval(i),e(`dataFetchState for ${l} is not found. The cache was purged before it completed loading.`)),n?.status==="fetched"&&(clearInterval(i),t(g(o,h,f,u,n.scalarData)))},10)})).then(i).catch(s):(c.set(e,{status:"fetching"}),p(t,e,n,r,a).then(i).catch(s))}),cancelFn:void 0,decache:()=>{c.delete(e)}}}async function p(t,e,i,n,o){let l=await function({url:t,signal:e,onload:i}){return new Promise(async(n,r)=>{let o=new XMLHttpRequest;o.open("GET",t,!0);let l={},h=u,f=await h.beforeSend(o,l,t),c=Object.assign({},l,f);o.responseType="arraybuffer",Object.keys(c).forEach(function(t){null!==c[t]&&o.setRequestHeader(t,c[t])});let d=function(t){i&&"function"==typeof i&&i(),e&&e.removeEventListener("abort",p),n(o.response)},p=()=>{o.abort(),o.removeEventListener("load",d),r(Error("Request aborted"))};o.addEventListener("load",d),o.onprogress=function(e){var i,n;i=e.loaded,n=e.total,(0,s.Hl)(s.tX,a.NIFTI_VOLUME_PROGRESS,{data:{url:t,loaded:i,total:n}})},e&&e.aborted?(o.abort(),r(Error("Request aborted"))):e&&e.addEventListener("abort",p),o.send()})}({url:e}),h=null,d=null;if(r.isCompressed(l)&&(l=r.decompress(l)),r.isNIFTI(l))h=r.readHeader(l),d=r.readImage(h,l);else{let t="The provided buffer is not a valid NIFTI file.";throw console.warn(t),Error(t)}let{scalarData:p}=function(t,e){let i,n,{datatypeCode:s,scl_slope:r,scl_inter:a}=t,o=r,l=a;(!r||0===r||Number.isNaN(r))&&(o=1),(!a||Number.isNaN(a))&&(l=0);let h=l<0||o<0,u=l%1!=0||o%1!=0,c=1;switch(s){case 2:i=new Uint8Array(e),u?n=f("Float32Array",i):h?n=f("Int16Array",i):(c=0,n=f("Uint8Array",i));break;case 4:i=new Int16Array(e),n=u?f("Float32Array",i):f("Int16Array",i);break;case 8:n=f("Float32Array",i=new Int32Array(e));break;case 16:n=f("Float32Array",i=new Float32Array(e));break;case 256:i=new Int8Array(e),n=u?f("Float32Array",i):f("Int8Array",i);break;case 512:i=new Uint16Array(e),u||h?n=f("Float32Array",i):(c=0,n=f("Uint16Array",i));break;case 768:n=f("Float32Array",i=new Uint32Array(e));break;case 64:n=f("Float64Array",i=new Float64Array(e));break;default:throw Error(`NIFTI datatypeCode ${s} is not yet supported`)}let d=n.length;if(1!==o&&0!==l)for(let t=0;t<d;t++){var p;n[t]=(p=n[t],p*o+l)}return t.numBitsPerVoxel=n.byteLength/n.length*8,{scalarData:n,pixelRepresentation:c}}(h,d);return c.set(e,{status:"fetched",scalarData:p}),g(t,i,n,o,p)}function g(t,e,i,n,r){let{rows:a,columns:o}=n,l=a*o,h=l*e,f=new r.constructor(l);f.set(r.subarray(h,h+l));let u=s.BF.VoxelManager.createImageVoxelManager({width:o,height:a,numberOfComponents:1,scalarData:f}),c=f[0],d=f[0];for(let t=1;t<f.length;t++){let e=f[t];e<c&&(c=e),e>d&&(d=e)}return{imageId:t,dataType:r.constructor.name,columnPixelSpacing:n.columnPixelSpacing,columns:n.columns,height:n.rows,invert:"MONOCHROME1"===i.photometricInterpretation,rowPixelSpacing:n.rowPixelSpacing,rows:n.rows,sizeInBytes:a*o*r.BYTES_PER_ELEMENT,width:n.columns,getPixelData:()=>u.getScalarData(),getCanvas:void 0,numberOfComponents:void 0,voxelManager:u,minPixelValue:c,maxPixelValue:d}}let _=new Map;async function m({url:t,onProgress:e,controller:i,onLoad:n,onHeader:s,loadFullVolume:a=!1}){let l,h=new URL(t).pathname.endsWith(".gz"),f=new Uint8Array(0),c=null,d=i.signal,p=u,g={},_=await p.beforeSend?.(null,g,t),m=Object.assign({},g,_);Object.keys(m).forEach(function(t){null===m[t]&&(m[t]=void 0)});try{let e=await fetch(t,{signal:d,headers:m});if(!e.ok)throw Error(`HTTP error! status: ${e.status}`);l=e.headers.get("Content-Length");let s=e.body.getReader(),r=h?new DecompressionStream("gzip"):null,o=r?r.writable.getWriter():null;if(I(s,o,h,0,v,i).catch(console.error),h){let t=r.readable.getReader();for(;;){let{done:e,value:n}=await t.read();if(e)break;if(v(n),c&&!a){i.abort();break}}}return n&&"function"==typeof n&&n(),{data:f,headerInfo:c,sliceInfo:null}}catch(t){throw"AbortError"===t.name?console.log("Fetch aborted"):console.error("Fetch error:",t),t}function v(t){(function(t){let e=new Uint8Array(f.length+t.length);e.set(f),e.set(t,f.length),f=e,a||c||!(f.length>=540)||((c=function(t){if(t.length<540)return{isValid:!1,message:"Not enough data to check header"};try{let e=t.slice(0,540).buffer,i=r.readHeader(e),n=540===i.sizeof_hdr?2:1,{orientation:s,origin:a,spacing:l}=function(t){let{affine:e}=t,{orientation:i,origin:n,spacing:s}=function(t){let e=[t[0][3],t[1][3],t[2][3]],i=[Math.sqrt(t[0][0]**2+t[1][0]**2+t[2][0]**2),Math.sqrt(t[0][1]**2+t[1][1]**2+t[2][1]**2),Math.sqrt(t[0][2]**2+t[1][2]**2+t[2][2]**2)];return{origin:e,orientation:[t[0][0]/i[0],t[0][1]/i[1],t[0][2]/i[2],t[1][0]/i[0],t[1][1]/i[1],t[1][2]/i[2],t[2][0]/i[0],t[2][1]/i[1],t[2][2]/i[2]],spacing:i}}(e);return{origin:[-n[0],-n[1],n[2]],orientation:[-i[0],-i[3],i[6],-i[1],-i[4],i[7],-i[2],-i[5],i[8]],spacing:s}}(i),{dimensions:h,direction:f}=function(t,e,i){let{numBitsPerVoxel:n,littleEndian:s,pixDims:r,dims:a}=t;a[1],a[2],a[3];let{windowWidth:l,windowCenter:h}={windowWidth:400,windowCenter:40},f=o.vt(),u=o.vt(),c=o.vt();return o.hZ(f,e[0],e[1],e[2]),o.hZ(u,e[3],e[4],e[5]),o.hZ(c,e[6],e[7],e[8]),{volumeMetadata:{BitsAllocated:n,BitsStored:n,SamplesPerPixel:1,HighBit:s?n-1:1,PhotometricInterpretation:"MONOCHROME2",PixelRepresentation:1,ImageOrientationPatient:[f[0],f[1],f[2],u[0],u[1],u[2]],PixelSpacing:[r[1],r[2]],Columns:a[1],Rows:a[2],voiLut:[{windowCenter:h,windowWidth:l}],FrameOfReferenceUID:"1.2.3",Modality:"MR",VOILUTFunction:"LINEAR"},dimensions:[a[1],a[2],a[3]],direction:new Float32Array([f[0],f[1],f[2],u[0],u[1],u[2],c[0],c[1],c[2]])}}(i,s,0),u=function(t){switch(t){case 2:return Uint8Array;case 4:return Int16Array;case 8:return Int32Array;case 16:return Float32Array;case 256:return Int8Array;case 512:return Uint16Array;case 768:return Uint32Array;case 64:return Float64Array;default:throw Error(`NIFTI datatypeCode ${t} is not yet supported`)}}(i.datatypeCode);return{dimensions:h,direction:f,isValid:!0,message:`Valid Nifti-${n} header detected`,origin:a,version:n,orientation:s,spacing:l,header:i,arrayConstructor:u}}catch(t){return console.error("Error reading Nifti header:",t),{isValid:!1,message:"Error reading Nifti header"}}}(f))&&c.isValid&&i.abort(),s?.(c))})(t),e&&"function"==typeof e&&e(0,l)}}async function I(t,e,i,n,s,r){for(;;){let{done:n,value:a}=await t.read();if(n){i&&e.close();break}if(a.length,i?await e.write(a):s(a),r.signal.aborted)break}}async function v(t){let e=(e,i)=>{(0,s.Hl)(s.tX,a.NIFTI_VOLUME_PROGRESS,{data:{volumeId:t,loaded:e,total:i}})},i=()=>{(0,s.Hl)(s.tX,a.NIFTI_VOLUME_LOADED,{data:{volumeId:t}})},n=new AbortController;_.set(t,{controller:n,loading:!0});let{dimensions:r,direction:o,isValid:l,message:h,origin:f,version:u,header:c,spacing:d,arrayConstructor:p}=await new Promise(s=>{m({url:t,onProgress:e,controller:n,onLoad:i,onHeader:s})}),g=r[2];if(!l)return void console.error(h);let I=[];for(let e=0;e<g;e++){let i=`nifti:${t}?frame=${e}`,n=e;I.push(i);let a=[o[0],o[1],o[2],o[3],o[4],o[5]],l=[parseFloat((f[0]+n*o[6]*d[0]).toFixed(6)),parseFloat((f[1]+n*o[7]*d[1]).toFixed(6)),parseFloat((f[2]+n*o[8]*d[2]).toFixed(6))],h={frameOfReferenceUID:"1.2.840.10008.1.4",rows:r[1],columns:r[0],imageOrientationPatient:a,rowCosines:o.slice(0,3),columnCosines:o.slice(3,6),imagePositionPatient:l,sliceThickness:d[2],sliceLocation:f[2]+e*d[2],pixelSpacing:[d[0],d[1]],rowPixelSpacing:d[1],columnPixelSpacing:d[0]},g={samplesPerPixel:1,photometricInterpretation:"MONOCHROME2",rows:r[1],columns:r[0],bitsAllocated:8*p.BYTES_PER_ELEMENT,bitsStored:8*p.BYTES_PER_ELEMENT,highBit:8*p.BYTES_PER_ELEMENT-1,pixelRepresentation:1,planarConfiguration:0,pixelAspectRatio:"1\\1",redPaletteColorLookupTableDescriptor:[],greenPaletteColorLookupTableDescriptor:[],bluePaletteColorLookupTableDescriptor:[],redPaletteColorLookupTableData:[],greenPaletteColorLookupTableData:[],bluePaletteColorLookupTableData:[],smallestPixelValue:void 0,largestPixelValue:void 0},_={seriesDate:new Date,seriesTime:new Date};s.BF.genericMetadataProvider.add(i,{type:"imagePixelModule",metadata:g}),s.BF.genericMetadataProvider.add(i,{type:"imagePlaneModule",metadata:h}),s.BF.genericMetadataProvider.add(i,{type:"generalSeriesModule",metadata:_}),s.BF.genericMetadataProvider.add(i,{type:"niftiVersion",metadata:{version:u}}),s.BF.genericMetadataProvider.addRaw(i,{type:"niftiHeader",metadata:{header:c}})}return _.delete(t),I}async function E({url:t}){return await v(t)}let y=function(t={}){u=Object.assign(u,t)}},65387:function(t,e,i){var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(e,i);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,s)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)"default"!==i&&Object.prototype.hasOwnProperty.call(t,i)&&n(e,t,i);return s(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.readExtensionData=e.readExtension=e.readImage=e.hasExtension=e.readHeader=e.decompress=e.isCompressed=e.isNIFTI=e.isNIFTI2=e.isNIFTI1=e.NIFTIEXTENSION=e.Utils=e.NIFTI2=e.NIFTI1=void 0;let a=r(i(66998)),o=i(6958),l=i(4371),h=i(42541);var f=i(6958);Object.defineProperty(e,"NIFTI1",{enumerable:!0,get:function(){return f.NIFTI1}});var u=i(4371);Object.defineProperty(e,"NIFTI2",{enumerable:!0,get:function(){return u.NIFTI2}});var c=i(42541);Object.defineProperty(e,"Utils",{enumerable:!0,get:function(){return c.Utils}});var d=i(66035);function p(t,e=!1){var i,n,s,r;return!(t.byteLength<o.NIFTI1.STANDARD_HEADER_SIZE)&&(n=(i=new DataView(t)).getUint8(o.NIFTI1.MAGIC_NUMBER_LOCATION),s=i.getUint8(o.NIFTI1.MAGIC_NUMBER_LOCATION+1),r=i.getUint8(o.NIFTI1.MAGIC_NUMBER_LOCATION+2),!!e&&n===o.NIFTI1.MAGIC_NUMBER2[0]&&s===o.NIFTI1.MAGIC_NUMBER2[1]&&r===o.NIFTI1.MAGIC_NUMBER2[2]||n===o.NIFTI1.MAGIC_NUMBER[0]&&s===o.NIFTI1.MAGIC_NUMBER[1]&&r===o.NIFTI1.MAGIC_NUMBER[2])}function g(t,e=!1){var i,n,s,r;return!(t.byteLength<o.NIFTI1.STANDARD_HEADER_SIZE)&&(n=(i=new DataView(t)).getUint8(l.NIFTI2.MAGIC_NUMBER_LOCATION),s=i.getUint8(l.NIFTI2.MAGIC_NUMBER_LOCATION+1),r=i.getUint8(l.NIFTI2.MAGIC_NUMBER_LOCATION+2),!!e&&n===l.NIFTI2.MAGIC_NUMBER2[0]&&s===l.NIFTI2.MAGIC_NUMBER2[1]&&r===l.NIFTI2.MAGIC_NUMBER2[2]||n===l.NIFTI2.MAGIC_NUMBER[0]&&s===l.NIFTI2.MAGIC_NUMBER[1]&&r===l.NIFTI2.MAGIC_NUMBER[2])}function _(t){var e,i,n;return!!t&&(i=(e=new DataView(t)).getUint8(0),n=e.getUint8(1),i===h.Utils.GUNZIP_MAGIC_COOKIE1||n===h.Utils.GUNZIP_MAGIC_COOKIE2)||!1}function m(t){return a.decompressSync(new Uint8Array(t)).buffer}Object.defineProperty(e,"NIFTIEXTENSION",{enumerable:!0,get:function(){return d.NIFTIEXTENSION}}),e.isNIFTI1=p,e.isNIFTI2=g,e.isNIFTI=function(t,e=!1){return p(t,e)||g(t,e)},e.isCompressed=_,e.decompress=m,e.readHeader=function(t,e=!1){var i=null;return _(t)&&(t=m(t)),p(t,e)?i=new o.NIFTI1:g(t,e)&&(i=new l.NIFTI2),i?i.readHeader(t):console.error("That file does not appear to be NIFTI!"),i},e.hasExtension=function(t){return 0!=t.extensionFlag[0]},e.readImage=function(t,e){var i=t.vox_offset,n=1,s=1;t.dims[4]&&(n=t.dims[4]),t.dims[5]&&(s=t.dims[5]);var r=t.dims[1]*t.dims[2]*t.dims[3]*n*s*(t.numBitsPerVoxel/8);return e.slice(i,i+r)},e.readExtension=function(t,e){var i=t.getExtensionLocation(),n=t.extensionSize;return e.slice(i,i+n)},e.readExtensionData=function(t,e){var i=t.getExtensionLocation(),n=t.extensionSize;return e.slice(i+8,i+n)}},66035:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.NIFTIEXTENSION=void 0;class i{esize;ecode;edata;littleEndian;constructor(t,e,i,n){if(t%16!=0)throw Error("This does not appear to be a NIFTI extension");this.esize=t,this.ecode=e,this.edata=i,this.littleEndian=n}toArrayBuffer(){let t=new Uint8Array(this.esize),e=new Uint8Array(this.edata);t.set(e,8);let i=new DataView(t.buffer);return i.setInt32(0,this.esize,this.littleEndian),i.setInt32(4,this.ecode,this.littleEndian),t.buffer}}e.NIFTIEXTENSION=i},66998:(t,e,i)=>{var n=i(33862),s=Uint8Array,r=Uint16Array,a=Uint32Array,o=new s([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),l=new s([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),h=new s([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),f=function(t,e){for(var i=new r(31),n=0;n<31;++n)i[n]=e+=1<<t[n-1];for(var s=new a(i[30]),n=1;n<30;++n)for(var o=i[n];o<i[n+1];++o)s[o]=o-i[n]<<5|n;return[i,s]},u=f(o,2),c=u[0],d=u[1];c[28]=258,d[258]=28;for(var p=f(l,0),g=p[0],_=p[1],m=new r(32768),I=0;I<32768;++I){var v=(43690&I)>>>1|(21845&I)<<1;v=(61680&(v=(52428&v)>>>2|(13107&v)<<2))>>>4|(3855&v)<<4,m[I]=((65280&v)>>>8|(255&v)<<8)>>>1}for(var E=function(t,e,i){for(var n,s=t.length,a=0,o=new r(e);a<s;++a)t[a]&&++o[t[a]-1];var l=new r(e);for(a=0;a<e;++a)l[a]=l[a-1]+o[a-1]<<1;if(i){n=new r(1<<e);var h=15-e;for(a=0;a<s;++a)if(t[a])for(var f=a<<4|t[a],u=e-t[a],c=l[t[a]-1]++<<u,d=c|(1<<u)-1;c<=d;++c)n[m[c]>>>h]=f}else for(a=0,n=new r(s);a<s;++a)t[a]&&(n[a]=m[l[t[a]-1]++]>>>15-t[a]);return n},y=new s(288),I=0;I<144;++I)y[I]=8;for(var I=144;I<256;++I)y[I]=9;for(var I=256;I<280;++I)y[I]=7;for(var I=280;I<288;++I)y[I]=8;for(var A=new s(32),I=0;I<32;++I)A[I]=5;var T=E(y,9,0),x=E(y,9,1),b=E(A,5,0),U=E(A,5,1),N=function(t){for(var e=t[0],i=1;i<t.length;++i)t[i]>e&&(e=t[i]);return e},F=function(t,e,i){var n=e/8|0;return(t[n]|t[n+1]<<8)>>(7&e)&i},S=function(t,e){var i=e/8|0;return(t[i]|t[i+1]<<8|t[i+2]<<16)>>(7&e)},M=function(t){return(t+7)/8|0},w=function(t,e,i){(null==e||e<0)&&(e=0),(null==i||i>t.length)&&(i=t.length);var n=new(2==t.BYTES_PER_ELEMENT?r:4==t.BYTES_PER_ELEMENT?a:s)(i-e);return n.set(t.subarray(e,i)),n};e.FlateErrorCode={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14};var C=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],O=function(t,e,i){var n=Error(e||C[t]);if(n.code=t,Error.captureStackTrace&&Error.captureStackTrace(n,O),!i)throw n;return n},D=function(t,e,i){var n=t.length;if(!n||i&&i.f&&!i.l)return e||new s(0);var r=!e||i,a=!i||i.i;i||(i={}),e||(e=new s(3*n));var f=function(t){var i=e.length;if(t>i){var n=new s(Math.max(2*i,t));n.set(e),e=n}},u=i.f||0,d=i.p||0,p=i.b||0,_=i.l,m=i.d,I=i.m,v=i.n,y=8*n;do{if(!_){u=F(t,d,1);var A=F(t,d+1,3);if(d+=3,A)if(1==A)_=x,m=U,I=9,v=5;else if(2==A){var T=F(t,d,31)+257,b=F(t,d+10,15)+4,C=T+F(t,d+5,31)+1;d+=14;for(var D=new s(C),P=new s(19),R=0;R<b;++R)P[h[R]]=F(t,d+3*R,7);d+=3*b;for(var q=N(P),B=(1<<q)-1,z=E(P,q,1),R=0;R<C;){var k=z[F(t,d,B)];d+=15&k;var L=k>>>4;if(L<16)D[R++]=L;else{var G=0,Y=0;for(16==L?(Y=3+F(t,d,3),d+=2,G=D[R-1]):17==L?(Y=3+F(t,d,7),d+=3):18==L&&(Y=11+F(t,d,127),d+=7);Y--;)D[R++]=G}}var V=D.subarray(0,T),X=D.subarray(T);I=N(V),v=N(X),_=E(V,I,1),m=E(X,v,1)}else O(1);else{var L=M(d)+4,H=t[L-4]|t[L-3]<<8,Z=L+H;if(Z>n){a&&O(0);break}r&&f(p+H),e.set(t.subarray(L,Z),p),i.b=p+=H,i.p=d=8*Z,i.f=u;continue}if(d>y){a&&O(0);break}}r&&f(p+131072);for(var j=(1<<I)-1,K=(1<<v)-1,Q=d;;Q=d){var G=_[S(t,d)&j],$=G>>>4;if((d+=15&G)>y){a&&O(0);break}if(G||O(2),$<256)e[p++]=$;else if(256==$){Q=d,_=null;break}else{var W=$-254;if($>264){var R=$-257,J=o[R];W=F(t,d,(1<<J)-1)+c[R],d+=J}var tt=m[S(t,d)&K],te=tt>>>4;tt||O(3),d+=15&tt;var X=g[te];if(te>3){var J=l[te];X+=S(t,d)&(1<<J)-1,d+=J}if(d>y){a&&O(0);break}r&&f(p+131072);for(var ti=p+W;p<ti;p+=4)e[p]=e[p-X],e[p+1]=e[p+1-X],e[p+2]=e[p+2-X],e[p+3]=e[p+3-X];p=ti}}i.l=_,i.p=Q,i.b=p,i.f=u,_&&(u=1,i.m=I,i.d=m,i.n=v)}while(!u);return p==e.length?e:w(e,0,p)},P=function(t,e,i){i<<=7&e;var n=e/8|0;t[n]|=i,t[n+1]|=i>>>8},R=function(t,e,i){i<<=7&e;var n=e/8|0;t[n]|=i,t[n+1]|=i>>>8,t[n+2]|=i>>>16},q=function(t,e){for(var i=[],n=0;n<t.length;++n)t[n]&&i.push({s:n,f:t[n]});var a=i.length,o=i.slice();if(!a)return[V,0];if(1==a){var l=new s(i[0].s+1);return l[i[0].s]=1,[l,1]}i.sort(function(t,e){return t.f-e.f}),i.push({s:-1,f:25001});var h=i[0],f=i[1],u=0,c=1,d=2;for(i[0]={s:-1,f:h.f+f.f,l:h,r:f};c!=a-1;)h=i[i[u].f<i[d].f?u++:d++],f=i[u!=c&&i[u].f<i[d].f?u++:d++],i[c++]={s:-1,f:h.f+f.f,l:h,r:f};for(var p=o[0].s,n=1;n<a;++n)o[n].s>p&&(p=o[n].s);var g=new r(p+1),_=B(i[c-1],g,0);if(_>e){var n=0,m=0,I=_-e,v=1<<I;for(o.sort(function(t,e){return g[e.s]-g[t.s]||t.f-e.f});n<a;++n){var E=o[n].s;if(g[E]>e)m+=v-(1<<_-g[E]),g[E]=e;else break}for(m>>>=I;m>0;){var y=o[n].s;g[y]<e?m-=1<<e-g[y]++-1:++n}for(;n>=0&&m;--n){var A=o[n].s;g[A]==e&&(--g[A],++m)}_=e}return[new s(g),_]},B=function(t,e,i){return -1==t.s?Math.max(B(t.l,e,i+1),B(t.r,e,i+1)):e[t.s]=i},z=function(t){for(var e=t.length;e&&!t[--e];);for(var i=new r(++e),n=0,s=t[0],a=1,o=function(t){i[n++]=t},l=1;l<=e;++l)if(t[l]==s&&l!=e)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[l]}return[i.subarray(0,n),e]},k=function(t,e){for(var i=0,n=0;n<e.length;++n)i+=t[n]*e[n];return i},L=function(t,e,i){var n=i.length,s=M(e+2);t[s]=255&n,t[s+1]=n>>>8,t[s+2]=255^t[s],t[s+3]=255^t[s+1];for(var r=0;r<n;++r)t[s+r+4]=i[r];return(s+4+n)*8},G=function(t,e,i,n,s,a,f,u,c,d,p){P(e,p++,i),++s[256];for(var g,_,m,I,v=q(s,15),x=v[0],U=v[1],N=q(a,15),F=N[0],S=N[1],M=z(x),w=M[0],C=M[1],O=z(F),D=O[0],B=O[1],G=new r(19),Y=0;Y<w.length;++Y)G[31&w[Y]]++;for(var Y=0;Y<D.length;++Y)G[31&D[Y]]++;for(var V=q(G,7),X=V[0],H=V[1],Z=19;Z>4&&!X[h[Z-1]];--Z);var j=d+5<<3,K=k(s,y)+k(a,A)+f,Q=k(s,x)+k(a,F)+f+14+3*Z+k(G,X)+(2*G[16]+3*G[17]+7*G[18]);if(j<=K&&j<=Q)return L(e,p,t.subarray(c,c+d));if(P(e,p,1+(Q<K)),p+=2,Q<K){g=E(x,U,0),_=x,m=E(F,S,0),I=F;var $=E(X,H,0);P(e,p,C-257),P(e,p+5,B-1),P(e,p+10,Z-4),p+=14;for(var Y=0;Y<Z;++Y)P(e,p+3*Y,X[h[Y]]);p+=3*Z;for(var W=[w,D],J=0;J<2;++J)for(var tt=W[J],Y=0;Y<tt.length;++Y){var te=31&tt[Y];P(e,p,$[te]),p+=X[te],te>15&&(P(e,p,tt[Y]>>>5&127),p+=tt[Y]>>>12)}}else g=T,_=y,m=b,I=A;for(var Y=0;Y<u;++Y)if(n[Y]>255){var te=n[Y]>>>18&31;R(e,p,g[te+257]),p+=_[te+257],te>7&&(P(e,p,n[Y]>>>23&31),p+=o[te]);var ti=31&n[Y];R(e,p,m[ti]),p+=I[ti],ti>3&&(R(e,p,n[Y]>>>5&8191),p+=l[ti])}else R(e,p,g[n[Y]]),p+=_[n[Y]];return R(e,p,g[256]),p+_[256]},Y=new a([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),V=new s(0),X=function(t,e,i,n,h,f){var u=t.length,c=new s(n+u+5*(1+Math.ceil(u/7e3))+h),p=c.subarray(n,c.length-h),g=0;if(!e||u<8)for(var m=0;m<=u;m+=65535){var I=m+65535;I>=u&&(p[g>>3]=f),g=L(p,g+1,t.subarray(m,I))}else{for(var v=Y[e-1],E=v>>>13,y=8191&v,A=(1<<i)-1,T=new r(32768),x=new r(A+1),b=Math.ceil(i/3),U=2*b,N=function(e){return(t[e]^t[e+1]<<b^t[e+2]<<U)&A},F=new a(25e3),S=new r(288),C=new r(32),O=0,D=0,m=0,P=0,R=0,q=0;m<u;++m){var B=N(m),z=32767&m,k=x[B];if(T[z]=k,x[B]=z,R<=m){var X=u-m;if((O>7e3||P>24576)&&X>423){g=G(t,p,0,F,S,C,D,P,q,m-q,g),P=O=D=0,q=m;for(var H=0;H<286;++H)S[H]=0;for(var H=0;H<30;++H)C[H]=0}var Z=2,j=0,K=y,Q=z-k&32767;if(X>2&&B==N(m-Q))for(var $=Math.min(E,X)-1,W=Math.min(32767,m),J=Math.min(258,X);Q<=W&&--K&&z!=k;){if(t[m+Z]==t[m+Z-Q]){for(var tt=0;tt<J&&t[m+tt]==t[m+tt-Q];++tt);if(tt>Z){if(Z=tt,j=Q,tt>$)break;for(var te=Math.min(Q,tt-2),ti=0,H=0;H<te;++H){var tn=m-Q+H+32768&32767,ts=T[tn],tr=tn-ts+32768&32767;tr>ti&&(ti=tr,k=tn)}}}k=T[z=k],Q+=z-k+32768&32767}if(j){F[P++]=0x10000000|d[Z]<<18|_[j];var ta=31&d[Z],to=31&_[j];D+=o[ta]+l[to],++S[257+ta],++C[to],R=m+Z,++O}else F[P++]=t[m],++S[t[m]]}}g=G(t,p,f,F,S,C,D,P,q,m-q,g),!f&&7&g&&(g=L(p,g+1,V))}return w(c,0,n+M(g)+h)},H=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var i=e,n=9;--n;)i=(1&i&&-0x12477ce0)^i>>>1;t[e]=i}return t}(),Z=function(){var t=-1;return{p:function(e){for(var i=t,n=0;n<e.length;++n)i=H[255&i^e[n]]^i>>>8;t=i},d:function(){return~t}}},j=function(){var t=1,e=0;return{p:function(i){for(var n=t,s=e,r=0|i.length,a=0;a!=r;){for(var o=Math.min(a+2655,r);a<o;++a)s+=n+=i[a];n=(65535&n)+15*(n>>16),s=(65535&s)+15*(s>>16)}t=n,e=s},d:function(){return t%=65521,e%=65521,(255&t)<<24|t>>>8<<16|(255&e)<<8|e>>>8}}},K=function(t,e,i,n,s){return X(t,null==e.level?6:e.level,null==e.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,i,n,!s)},Q=function(t,e){var i={};for(var n in t)i[n]=t[n];for(var n in e)i[n]=e[n];return i},$=function(t,e,i){for(var n=t(),s=t.toString(),r=s.slice(s.indexOf("[")+1,s.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<n.length;++a){var o=n[a],l=r[a];if("function"==typeof o){e+=";"+l+"=";var h=o.toString();if(o.prototype)if(-1!=h.indexOf("[native code]")){var f=h.indexOf(" ",8)+1;e+=h.slice(f,h.indexOf("(",f))}else for(var u in e+=h,o.prototype)e+=";"+l+".prototype."+u+"="+o.prototype[u].toString();else e+=h}else i[l]=o}return[e,i]},W=[],J=function(t){var e=[];for(var i in t)t[i].buffer&&e.push((t[i]=new t[i].constructor(t[i])).buffer);return e},tt=function(t,e,i,s){if(!W[i]){for(var r,a="",o={},l=t.length-1,h=0;h<l;++h)a=(r=$(t[h],a,o))[0],o=r[1];W[i]=$(t[l],a,o)}var f=Q({},W[i][1]);return n.default(W[i][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",i,f,J(f),s)},te=function(){return[s,r,a,o,l,h,c,g,x,U,m,C,E,N,F,S,M,w,O,D,tM,to,tl]},ti=function(){return[s,r,a,o,l,h,d,_,T,y,b,A,m,Y,V,E,P,R,q,B,z,k,L,G,M,w,X,K,tU,to]},tn=function(){return[t_,tv,tg,Z,H]},ts=function(){return[tm,tI]},tr=function(){return[tE,tg,j]},ta=function(){return[ty]},to=function(t){return postMessage(t,[t.buffer])},tl=function(t){return t&&t.size&&new s(t.size)},th=function(t,e,i,n,s,r){var a=tt(i,n,s,function(t,e){a.terminate(),r(t,e)});return a.postMessage([t,e],e.consume?[t.buffer]:[]),function(){a.terminate()}},tf=function(t){return t.ondata=function(t,e){return postMessage([t,e],[t.buffer])},function(e){return t.push(e.data[0],e.data[1])}},tu=function(t,e,i,n,s){var r,a=tt(t,n,s,function(t,i){t?(a.terminate(),e.ondata.call(e,t)):(i[1]&&a.terminate(),e.ondata.call(e,t,i[0],i[1]))});a.postMessage(i),e.push=function(t,i){e.ondata||O(5),r&&e.ondata(O(4,0,1),null,!!i),a.postMessage([t,r=i],[t.buffer])},e.terminate=function(){a.terminate()}},tc=function(t,e){return t[e]|t[e+1]<<8},td=function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0},tp=function(t,e){return td(t,e)+0x100000000*td(t,e+4)},tg=function(t,e,i){for(;i;++e)t[e]=i,i>>>=8},t_=function(t,e){var i=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:2*(9==e.level),t[9]=3,0!=e.mtime&&tg(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),i){t[3]=8;for(var n=0;n<=i.length;++n)t[n+10]=i.charCodeAt(n)}},tm=function(t){(31!=t[0]||139!=t[1]||8!=t[2])&&O(6,"invalid gzip data");var e=t[3],i=10;4&e&&(i+=t[10]|(t[11]<<8)+2);for(var n=(e>>3&1)+(e>>4&1);n>0;n-=!t[i++]);return i+(2&e)},tI=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},tv=function(t){return 10+(t.filename&&t.filename.length+1||0)},tE=function(t,e){var i=e.level,n=0==i?0:i<6?1:9==i?3:2;t[0]=120,t[1]=n<<6|(n?32-2*n:1)},ty=function(t){((15&t[0])!=8||t[0]>>>4>7||(t[0]<<8|t[1])%31)&&O(6,"invalid zlib data"),32&t[1]&&O(6,"invalid zlib data: preset dictionaries not supported")};function tA(t,e){return e||"function"!=typeof t||(e=t,t={}),this.ondata=e,t}var tT=function(){function t(t,e){e||"function"!=typeof t||(e=t,t={}),this.ondata=e,this.o=t||{}}return t.prototype.p=function(t,e){this.ondata(K(t,this.o,0,0,!e),e)},t.prototype.push=function(t,e){this.ondata||O(5),this.d&&O(4),this.d=e,this.p(t,e||!1)},t}();e.Deflate=tT;var tx=function(t,e){tu([ti,function(){return[tf,tT]}],this,tA.call(this,t,e),function(t){onmessage=tf(new tT(t.data))},6)};function tb(t,e,i){return i||(i=e,e={}),"function"!=typeof i&&O(7),th(t,e,[ti],function(t){return to(tU(t.data[0],t.data[1]))},0,i)}function tU(t,e){return K(t,e||{},0,0)}e.AsyncDeflate=tx,e.deflate=tb,e.deflateSync=tU;var tN=function(){function t(t){this.s={},this.p=new s(0),this.ondata=t}return t.prototype.e=function(t){this.ondata||O(5),this.d&&O(4);var e=this.p.length,i=new s(e+t.length);i.set(this.p),i.set(t,e),this.p=i},t.prototype.c=function(t){this.d=this.s.i=t||!1;var e=this.s.b,i=D(this.p,this.o,this.s);this.ondata(w(i,e,this.s.b),this.d),this.o=w(i,this.s.b-32768),this.s.b=this.o.length,this.p=w(this.p,this.s.p/8|0),this.s.p&=7},t.prototype.push=function(t,e){this.e(t),this.c(e)},t}();e.Inflate=tN;var tF=function(t){this.ondata=t,tu([te,function(){return[tf,tN]}],this,0,function(){onmessage=tf(new tN)},7)};function tS(t,e,i){return i||(i=e,e={}),"function"!=typeof i&&O(7),th(t,e,[te],function(t){var e;return to((e=t.data[0],D(e,tl(t.data[1]))))},1,i)}function tM(t,e){return D(t,e)}e.AsyncInflate=tF,e.inflate=tS,e.inflateSync=tM;var tw=function(){function t(t,e){this.c=Z(),this.l=0,this.v=1,tT.call(this,t,e)}return t.prototype.push=function(t,e){tT.prototype.push.call(this,t,e)},t.prototype.p=function(t,e){this.c.p(t),this.l+=t.length;var i=K(t,this.o,this.v&&tv(this.o),e&&8,!e);this.v&&(t_(i,this.o),this.v=0),e&&(tg(i,i.length-8,this.c.d()),tg(i,i.length-4,this.l)),this.ondata(i,e)},t}();e.Gzip=tw,e.Compress=tw;var tC=function(t,e){tu([ti,tn,function(){return[tf,tT,tw]}],this,tA.call(this,t,e),function(t){onmessage=tf(new tw(t.data))},8)};function tO(t,e,i){return i||(i=e,e={}),"function"!=typeof i&&O(7),th(t,e,[ti,tn,function(){return[tD]}],function(t){return to(tD(t.data[0],t.data[1]))},2,i)}function tD(t,e){e||(e={});var i=Z(),n=t.length;i.p(t);var s=K(t,e,tv(e),8),r=s.length;return t_(s,e),tg(s,r-8,i.d()),tg(s,r-4,n),s}e.AsyncGzip=tC,e.AsyncCompress=tC,e.gzip=tO,e.compress=tO,e.gzipSync=tD,e.compressSync=tD;var tP=function(){function t(t){this.v=1,tN.call(this,t)}return t.prototype.push=function(t,e){if(tN.prototype.e.call(this,t),this.v){var i=this.p.length>3?tm(this.p):4;if(i>=this.p.length&&!e)return;this.p=this.p.subarray(i),this.v=0}e&&(this.p.length<8&&O(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),tN.prototype.c.call(this,e)},t}();e.Gunzip=tP;var tR=function(t){this.ondata=t,tu([te,ts,function(){return[tf,tN,tP]}],this,0,function(){onmessage=tf(new tP)},9)};function tq(t,e,i){return i||(i=e,e={}),"function"!=typeof i&&O(7),th(t,e,[te,ts,function(){return[tB]}],function(t){return to(tB(t.data[0]))},3,i)}function tB(t,e){return D(t.subarray(tm(t),-8),e||new s(tI(t)))}e.AsyncGunzip=tR,e.gunzip=tq,e.gunzipSync=tB;var tz=function(){function t(t,e){this.c=j(),this.v=1,tT.call(this,t,e)}return t.prototype.push=function(t,e){tT.prototype.push.call(this,t,e)},t.prototype.p=function(t,e){this.c.p(t);var i=K(t,this.o,this.v&&2,e&&4,!e);this.v&&(tE(i,this.o),this.v=0),e&&tg(i,i.length-4,this.c.d()),this.ondata(i,e)},t}();function tk(t,e){e||(e={});var i=j();i.p(t);var n=K(t,e,2,4);return tE(n,e),tg(n,n.length-4,i.d()),n}e.Zlib=tz,e.AsyncZlib=function(t,e){tu([ti,tr,function(){return[tf,tT,tz]}],this,tA.call(this,t,e),function(t){onmessage=tf(new tz(t.data))},10)},e.zlib=function(t,e,i){return i||(i=e,e={}),"function"!=typeof i&&O(7),th(t,e,[ti,tr,function(){return[tk]}],function(t){return to(tk(t.data[0],t.data[1]))},4,i)},e.zlibSync=tk;var tL=function(){function t(t){this.v=1,tN.call(this,t)}return t.prototype.push=function(t,e){if(tN.prototype.e.call(this,t),this.v){if(this.p.length<2&&!e)return;this.p=this.p.subarray(2),this.v=0}e&&(this.p.length<4&&O(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),tN.prototype.c.call(this,e)},t}();e.Unzlib=tL;var tG=function(t){this.ondata=t,tu([te,ta,function(){return[tf,tN,tL]}],this,0,function(){onmessage=tf(new tL)},11)};function tY(t,e,i){return i||(i=e,e={}),"function"!=typeof i&&O(7),th(t,e,[te,ta,function(){return[tV]}],function(t){return to(tV(t.data[0],tl(t.data[1])))},5,i)}function tV(t,e){return D((ty(t),t.subarray(2,-4)),e)}e.AsyncUnzlib=tG,e.unzlib=tY,e.unzlibSync=tV;var tX=function(){function t(t){this.G=tP,this.I=tN,this.Z=tL,this.ondata=t}return t.prototype.push=function(t,e){if(this.ondata||O(5),this.s)this.s.push(t,e);else{if(this.p&&this.p.length){var i=new s(this.p.length+t.length);i.set(this.p),i.set(t,this.p.length)}else this.p=t;if(this.p.length>2){var n=this,r=function(){n.ondata.apply(n,arguments)};this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(r):(15&this.p[0])!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(r):new this.Z(r),this.s.push(this.p,e),this.p=null}}},t}();e.Decompress=tX,e.AsyncDecompress=function(){function t(t){this.G=tR,this.I=tF,this.Z=tG,this.ondata=t}return t.prototype.push=function(t,e){tX.prototype.push.call(this,t,e)},t}(),e.decompress=function(t,e,i){return i||(i=e,e={}),"function"!=typeof i&&O(7),31==t[0]&&139==t[1]&&8==t[2]?tq(t,e,i):(15&t[0])!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?tS(t,e,i):tY(t,e,i)},e.decompressSync=function(t,e){return 31==t[0]&&139==t[1]&&8==t[2]?tB(t,e):(15&t[0])!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?D(t,e):tV(t,e)};var tH=function(t,e,i,n){for(var r in t){var a=t[r],o=e+r,l=n;Array.isArray(a)&&(l=Q(n,a[1]),a=a[0]),a instanceof s?i[o]=[a,l]:(i[o+="/"]=[new s(0),l],tH(a,o,i,n))}},tZ="undefined"!=typeof TextEncoder&&new TextEncoder,tj="undefined"!=typeof TextDecoder&&new TextDecoder,tK=0;try{tj.decode(V,{stream:!0}),tK=1}catch(t){}var tQ=function(t){for(var e="",i=0;;){var n=t[i++],s=(n>127)+(n>223)+(n>239);if(i+s>t.length)return[e,w(t,i-1)];s?3==s?e+=String.fromCharCode(55296|(n=((15&n)<<18|(63&t[i++])<<12|(63&t[i++])<<6|63&t[i++])-65536)>>10,56320|1023&n):1&s?e+=String.fromCharCode((31&n)<<6|63&t[i++]):e+=String.fromCharCode((15&n)<<12|(63&t[i++])<<6|63&t[i++]):e+=String.fromCharCode(n)}};function t$(t,e){if(e){for(var i=new s(t.length),n=0;n<t.length;++n)i[n]=t.charCodeAt(n);return i}if(tZ)return tZ.encode(t);for(var r=t.length,a=new s(t.length+(t.length>>1)),o=0,l=function(t){a[o++]=t},n=0;n<r;++n){if(o+5>a.length){var h=new s(o+8+(r-n<<1));h.set(a),a=h}var f=t.charCodeAt(n);f<128||e?l(f):(f<2048?l(192|f>>6):(f>55295&&f<57344?(l(240|(f=65536+(1047552&f)|1023&t.charCodeAt(++n))>>18),l(128|f>>12&63)):l(224|f>>12),l(128|f>>6&63)),l(128|63&f))}return w(a,0,o)}function tW(t,e){if(e){for(var i="",n=0;n<t.length;n+=16384)i+=String.fromCharCode.apply(null,t.subarray(n,n+16384));return i}if(tj)return tj.decode(t);var s=tQ(t),r=s[0];return s[1].length&&O(8),r}e.DecodeUTF8=function(){function t(t){this.ondata=t,tK?this.t=new TextDecoder:this.p=V}return t.prototype.push=function(t,e){if(this.ondata||O(5),e=!!e,this.t){this.ondata(this.t.decode(t,{stream:!0}),e),e&&(this.t.decode().length&&O(8),this.t=null);return}this.p||O(4);var i=new s(this.p.length+t.length);i.set(this.p),i.set(t,this.p.length);var n=tQ(i),r=n[0],a=n[1];e?(a.length&&O(8),this.p=null):this.p=a,this.ondata(r,e)},t}(),e.EncodeUTF8=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,e){this.ondata||O(5),this.d&&O(4),this.ondata(t$(t),this.d=e||!1)},t}(),e.strToU8=t$,e.strFromU8=tW;var tJ=function(t){return 1==t?3:t<6?2:+(9==t)},t0=function(t,e){return e+30+tc(t,e+26)+tc(t,e+28)},t1=function(t,e,i){var n=tc(t,e+28),s=tW(t.subarray(e+46,e+46+n),!(2048&tc(t,e+8))),r=e+46+n,a=td(t,e+20),o=i&&0xffffffff==a?t2(t,r):[a,td(t,e+24),td(t,e+42)],l=o[0],h=o[1],f=o[2];return[tc(t,e+10),l,h,s,r+tc(t,e+30)+tc(t,e+32),f]},t2=function(t,e){for(;1!=tc(t,e);e+=4+tc(t,e+2));return[tp(t,e+12),tp(t,e+4),tp(t,e+20)]},t3=function(t){var e=0;if(t)for(var i in t){var n=t[i].length;n>65535&&O(9),e+=n+4}return e},t4=function(t,e,i,n,s,r,a,o){var l=n.length,h=i.extra,f=o&&o.length,u=t3(h);tg(t,e,null!=a?0x2014b50:0x4034b50),e+=4,null!=a&&(t[e++]=20,t[e++]=i.os),t[e]=20,e+=2,t[e++]=i.flag<<1|(null==r&&8),t[e++]=s&&8,t[e++]=255&i.compression,t[e++]=i.compression>>8;var c=new Date(null==i.mtime?Date.now():i.mtime),d=c.getFullYear()-1980;if((d<0||d>119)&&O(10),tg(t,e,d<<25|c.getMonth()+1<<21|c.getDate()<<16|c.getHours()<<11|c.getMinutes()<<5|c.getSeconds()>>>1),e+=4,null!=r&&(tg(t,e,i.crc),tg(t,e+4,r),tg(t,e+8,i.size)),tg(t,e+12,l),tg(t,e+14,u),e+=16,null!=a&&(tg(t,e,f),tg(t,e+6,i.attrs),tg(t,e+10,a),e+=14),t.set(n,e),e+=l,u)for(var p in h){var g=h[p],_=g.length;tg(t,e,+p),tg(t,e+2,_),t.set(g,e+4),e+=4+_}return f&&(t.set(o,e),e+=f),e},t8=function(t,e,i,n,s){tg(t,e,0x6054b50),tg(t,e+8,i),tg(t,e+10,i),tg(t,e+12,n),tg(t,e+16,s)},t6=function(){function t(t){this.filename=t,this.c=Z(),this.size=0,this.compression=0}return t.prototype.process=function(t,e){this.ondata(null,t,e)},t.prototype.push=function(t,e){this.ondata||O(5),this.c.p(t),this.size+=t.length,e&&(this.crc=this.c.d()),this.process(t,e||!1)},t}();e.ZipPassThrough=t6,e.ZipDeflate=function(){function t(t,e){var i=this;e||(e={}),t6.call(this,t),this.d=new tT(e,function(t,e){i.ondata(null,t,e)}),this.compression=8,this.flag=tJ(e.level)}return t.prototype.process=function(t,e){try{this.d.push(t,e)}catch(t){this.ondata(t,null,e)}},t.prototype.push=function(t,e){t6.prototype.push.call(this,t,e)},t}(),e.AsyncZipDeflate=function(){function t(t,e){var i=this;e||(e={}),t6.call(this,t),this.d=new tx(e,function(t,e,n){i.ondata(t,e,n)}),this.compression=8,this.flag=tJ(e.level),this.terminate=this.d.terminate}return t.prototype.process=function(t,e){this.d.push(t,e)},t.prototype.push=function(t,e){t6.prototype.push.call(this,t,e)},t}(),e.Zip=function(){function t(t){this.ondata=t,this.u=[],this.d=1}return t.prototype.add=function(t){var e=this;if(this.ondata||O(5),2&this.d)this.ondata(O(4+(1&this.d)*8,0,1),null,!1);else{var i=t$(t.filename),n=i.length,r=t.comment,a=r&&t$(r),o=n!=t.filename.length||a&&r.length!=a.length,l=n+t3(t.extra)+30;n>65535&&this.ondata(O(11,0,1),null,!1);var h=new s(l);t4(h,0,t,i,o);var f=[h],u=function(){for(var t=0,i=f;t<i.length;t++){var n=i[t];e.ondata(null,n,!1)}f=[]},c=this.d;this.d=0;var d=this.u.length,p=Q(t,{f:i,u:o,o:a,t:function(){t.terminate&&t.terminate()},r:function(){if(u(),c){var t=e.u[d+1];t?t.r():e.d=1}c=1}}),g=0;t.ondata=function(i,n,r){if(i)e.ondata(i,n,r),e.terminate();else if(g+=n.length,f.push(n),r){var a=new s(16);tg(a,0,0x8074b50),tg(a,4,t.crc),tg(a,8,g),tg(a,12,t.size),f.push(a),p.c=g,p.b=l+g+16,p.crc=t.crc,p.size=t.size,c&&p.r(),c=1}else c&&u()},this.u.push(p)}},t.prototype.end=function(){var t=this;if(2&this.d)return void this.ondata(O(4+(1&this.d)*8,0,1),null,!0);this.d?this.e():this.u.push({r:function(){1&t.d&&(t.u.splice(-1,1),t.e())},t:function(){}}),this.d=3},t.prototype.e=function(){for(var t=0,e=0,i=0,n=0,r=this.u;n<r.length;n++){var a=r[n];i+=46+a.f.length+t3(a.extra)+(a.o?a.o.length:0)}for(var o=new s(i+22),l=0,h=this.u;l<h.length;l++){var a=h[l];t4(o,t,a,a.f,a.u,a.c,e,a.o),t+=46+a.f.length+t3(a.extra)+(a.o?a.o.length:0),e+=a.b}t8(o,t,this.u.length,i,e),this.ondata(null,o,!0),this.d=2},t.prototype.terminate=function(){for(var t=0,e=this.u;t<e.length;t++)e[t].t();this.d=2},t}(),e.zip=function(t,e,i){i||(i=e,e={}),"function"!=typeof i&&O(7);var n={};tH(t,"",n,e);var r=Object.keys(n),a=r.length,o=0,l=0,h=a,f=Array(a),u=[],c=function(){for(var t=0;t<u.length;++t)u[t]()},d=function(t,e){t7(function(){i(t,e)})};t7(function(){d=i});var p=function(){var t=new s(l+22),e=o,i=l-o;l=0;for(var n=0;n<h;++n){var r=f[n];try{var a=r.c.length;t4(t,l,r,r.f,r.u,a);var u=30+r.f.length+t3(r.extra),c=l+u;t.set(r.c,c),t4(t,o,r,r.f,r.u,a,l,r.m),o+=16+u+(r.m?r.m.length:0),l=c+a}catch(t){return d(t,null)}}t8(t,o,f.length,i,e),d(null,t)};a||p();for(var g=function(t){var e=r[t],i=n[e],s=i[0],h=i[1],g=Z(),_=s.length;g.p(s);var m=t$(e),I=m.length,v=h.comment,E=v&&t$(v),y=E&&E.length,A=t3(h.extra),T=8*(0!=h.level),x=function(i,n){if(i)c(),d(i,null);else{var s=n.length;f[t]=Q(h,{size:_,crc:g.d(),c:n,f:m,m:E,u:I!=e.length||E&&v.length!=y,compression:T}),o+=30+I+A+s,l+=76+2*(I+A)+(y||0)+s,--a||p()}};if(I>65535&&x(O(11,0,1),null),T)if(_<16e4)try{x(null,tU(s,h))}catch(t){x(t,null)}else u.push(tb(s,h,x));else x(null,s)},_=0;_<h;++_)g(_);return c},e.zipSync=function(t,e){e||(e={});var i={},n=[];tH(t,"",i,e);var r=0,a=0;for(var o in i){var l=i[o],h=l[0],f=l[1],u=8*(0!=f.level),c=t$(o),d=c.length,p=f.comment,g=p&&t$(p),_=g&&g.length,m=t3(f.extra);d>65535&&O(11);var I=u?tU(h,f):h,v=I.length,E=Z();E.p(h),n.push(Q(f,{size:h.length,crc:E.d(),c:I,f:c,m:g,u:d!=o.length||g&&p.length!=_,o:r,compression:u})),r+=30+d+m+v,a+=76+2*(d+m)+(_||0)+v}for(var y=new s(a+22),A=r,T=a-r,x=0;x<n.length;++x){var c=n[x];t4(y,c.o,c,c.f,c.u,c.c.length);var b=30+c.f.length+t3(c.extra);y.set(c.c,c.o+b),t4(y,r,c,c.f,c.u,c.c.length,c.o,c.m),r+=16+b+(c.m?c.m.length:0)}return t8(y,r,n.length,T,A),y};var t5=function(){function t(){}return t.prototype.push=function(t,e){this.ondata(null,t,e)},t.compression=0,t}();e.UnzipPassThrough=t5,e.UnzipInflate=function(){function t(){var t=this;this.i=new tN(function(e,i){t.ondata(null,e,i)})}return t.prototype.push=function(t,e){try{this.i.push(t,e)}catch(t){this.ondata(t,null,e)}},t.compression=8,t}(),e.AsyncUnzipInflate=function(){function t(t,e){var i=this;e<32e4?this.i=new tN(function(t,e){i.ondata(null,t,e)}):(this.i=new tF(function(t,e,n){i.ondata(t,e,n)}),this.terminate=this.i.terminate)}return t.prototype.push=function(t,e){this.i.terminate&&(t=w(t,0)),this.i.push(t,e)},t.compression=8,t}(),e.Unzip=function(){function t(t){this.onfile=t,this.k=[],this.o={0:t5},this.p=V}return t.prototype.push=function(t,e){var i=this;if(this.onfile||O(5),this.p||O(4),this.c>0){var n=Math.min(this.c,t.length),r=t.subarray(0,n);if(this.c-=n,this.d?this.d.push(r,!this.c):this.k[0].push(r),(t=t.subarray(n)).length)return this.push(t,e)}else{var a=0,o=0,l=void 0,h=void 0;this.p.length?t.length?((h=new s(this.p.length+t.length)).set(this.p),h.set(t,this.p.length)):h=this.p:h=t;for(var f=h.length,u=this.c,c=u&&this.d,d=this;o<f-4&&"break"!==function(){var t=td(h,o);if(0x4034b50==t){a=1,l=o,d.d=null,d.c=0;var e=tc(h,o+6),n=tc(h,o+8),s=8&e,r=tc(h,o+26),c=tc(h,o+28);if(f>o+30+r+c){var p,g,_=[];d.k.unshift(_),a=2;var m=td(h,o+18),I=td(h,o+22),v=tW(h.subarray(o+30,o+=30+r),!(2048&e));0xffffffff==m?(m=(p=s?[-2]:t2(h,o))[0],I=p[1]):s&&(m=-1),o+=c,d.c=m;var E={name:v,compression:n,start:function(){if(E.ondata||O(5),m){var t=i.o[n];t||E.ondata(O(14,"unknown compression type "+n,1),null,!1),(g=m<0?new t(v):new t(v,m,I)).ondata=function(t,e,i){E.ondata(t,e,i)};for(var e=0;e<_.length;e++){var s=_[e];g.push(s,!1)}i.k[0]==_&&i.c?i.d=g:g.push(V,!0)}else E.ondata(null,V,!0)},terminate:function(){g&&g.terminate&&g.terminate()}};m>=0&&(E.size=m,E.originalSize=I),d.onfile(E)}return"break"}if(u){if(0x8074b50==t)return l=o+=12+(-2==u&&8),a=3,d.c=0,"break";else if(0x2014b50==t)return l=o-=4,a=3,d.c=0,"break"}}();++o);if(this.p=V,u<0){var p=a?h.subarray(0,l-12-(-2==u&&8)-(0x8074b50==td(h,l-16)&&4)):h.subarray(0,o);c?c.push(p,!!a):this.k[+(2==a)].push(p)}if(2&a)return this.push(h.subarray(o),e);this.p=h.subarray(o)}e&&(this.c&&O(13),this.p=null)},t.prototype.register=function(t){this.o[t.compression]=t},t}();var t7="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(t){t()};e.unzip=function(t,e,i){i||(i=e,e={}),"function"!=typeof i&&O(7);var n=[],r=function(){for(var t=0;t<n.length;++t)n[t]()},a={},o=function(t,e){t7(function(){i(t,e)})};t7(function(){o=i});for(var l=t.length-22;0x6054b50!=td(t,l);--l)if(!l||t.length-l>65558)return o(O(13,0,1),null),r;var h=tc(t,l+8);if(h){var f=h,u=td(t,l+16),c=0xffffffff==u;if(c){if(l=td(t,l-12),0x6064b50!=td(t,l))return o(O(13,0,1),null),r;f=h=td(t,l+32),u=td(t,l+48)}for(var d=e&&e.filter,p=0;p<f;++p)!function(e){var i=t1(t,u,c),l=i[0],f=i[1],p=i[2],g=i[3],_=i[4],m=t0(t,i[5]);u=_;var I=function(t,e){t?(r(),o(t,null)):(e&&(a[g]=e),--h||o(null,a))};if(!d||d({name:g,size:f,originalSize:p,compression:l}))if(l)if(8==l){var v,E=t.subarray(m,m+f);if(f<32e4)try{I(null,(v=new s(p),D(E,v)))}catch(t){I(t,null)}else n.push(tS(E,{size:p},I))}else I(O(14,"unknown compression type "+l,1),null);else I(null,w(t,m,m+f));else I(null,null)}(0)}else o(null,{});return r},e.unzipSync=function(t,e){for(var i={},n=t.length-22;0x6054b50!=td(t,n);--n)(!n||t.length-n>65558)&&O(13);var r=tc(t,n+8);if(!r)return{};var a=td(t,n+16),o=0xffffffff==a;o&&(n=td(t,n-12),0x6064b50!=td(t,n)&&O(13),r=td(t,n+32),a=td(t,n+48));for(var l=e&&e.filter,h=0;h<r;++h){var f=t1(t,a,o),u=f[0],c=f[1],d=f[2],p=f[3],g=f[4],_=t0(t,f[5]);a=g,(!l||l({name:p,size:c,originalSize:d,compression:u}))&&(u?8==u?i[p]=D(t.subarray(_,_+c),new s(d)):O(14,"unknown compression type "+u):i[p]=w(t,_,_+c))}return i}}}]);
|
_next/static/chunks/app/_not-found/page-9a083be54ecaf07f.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[492],{24585:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"styles",{enumerable:!0,get:function(){return l}});let l={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block"},h1:{display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},h2:{fontSize:14,fontWeight:400,lineHeight:"49px",margin:0}};("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)},38886:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HTTPAccessErrorFallback",{enumerable:!0,get:function(){return o}});let r=l(95155),n=l(24585);function o(e){let{status:t,message:l}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:t+": "+l}),(0,r.jsx)("div",{style:n.styles.error,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,r.jsx)("h1",{className:"next-error-h1",style:n.styles.h1,children:t}),(0,r.jsx)("div",{style:n.styles.desc,children:(0,r.jsx)("h2",{style:n.styles.h2,children:l})})]})})]})}("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)},71599:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return l(79520)}])},79520:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=l(95155),n=l(38886),o=function(){return(0,r.jsx)("html",{children:(0,r.jsx)("body",{children:(0,r.jsx)(n.HTTPAccessErrorFallback,{status:404,message:"This page could not be found."})})})};("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)}},e=>{e.O(0,[441,255,358],()=>e(e.s=71599)),_N_E=e.O()}]);
|
_next/static/chunks/app/layout-23ac75db55e2192c.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[177],{13673:()=>{},29068:(e,t,s)=>{Promise.resolve().then(s.t.bind(s,13673,23)),Promise.resolve().then(s.bind(s,44079))},44079:(e,t,s)=>{"use strict";s.d(t,{QueryProvider:()=>q});var i=s(95155),r=s(34049),a=s(31668),n=s(74268),u=s(38445),h=class extends u.Q{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,s){let i=t.queryKey,n=t.queryHash??(0,r.F$)(i,t),u=this.get(n);return u||(u=new a.X({client:e,queryKey:i,queryHash:n,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(i)}),this.add(u)),u}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){n.jG.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,r.MK)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,r.MK)(e,t)):t}notify(e){n.jG.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){n.jG.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){n.jG.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},l=s(38559),o=class extends u.Q{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#s=new Map,this.#i=0}#t;#s;#i;build(e,t,s){let i=new l.s({client:e,mutationCache:this,mutationId:++this.#i,options:e.defaultMutationOptions(t),state:s});return this.add(i),i}add(e){this.#t.add(e);let t=c(e);if("string"==typeof t){let s=this.#s.get(t);s?s.push(e):this.#s.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){let t=c(e);if("string"==typeof t){let s=this.#s.get(t);if(s)if(s.length>1){let t=s.indexOf(e);-1!==t&&s.splice(t,1)}else s[0]===e&&this.#s.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=c(e);if("string"!=typeof t)return!0;{let s=this.#s.get(t),i=s?.find(e=>"pending"===e.state.status);return!i||i===e}}runNext(e){let t=c(e);if("string"!=typeof t)return Promise.resolve();{let s=this.#s.get(t)?.find(t=>t!==e&&t.state.isPaused);return s?.continue()??Promise.resolve()}}clear(){n.jG.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#s.clear()})}getAll(){return Array.from(this.#t)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,r.nJ)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,r.nJ)(e,t))}notify(e){n.jG.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return n.jG.batch(()=>Promise.all(e.map(e=>e.continue().catch(r.lQ))))}};function c(e){return e.options.scope?.id}var f=s(56195),d=s(63122);function y(e){return{onFetch:(t,s)=>{let i=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,n=t.state.data?.pages||[],u=t.state.data?.pageParams||[],h={pages:[],pageParams:[]},l=0,o=async()=>{let s=!1,o=(0,r.ZM)(t.options,t.fetchOptions),c=async(e,i,a)=>{if(s)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);let n=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:i,direction:a?"backward":"forward",meta:t.options.meta};return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?s=!0:t.signal.addEventListener("abort",()=>{s=!0}),t.signal)}),e})(),u=await o(n),{maxPages:h}=t.options,l=a?r.ZZ:r.y9;return{pages:l(e.pages,u,h),pageParams:l(e.pageParams,i,h)}};if(a&&n.length){let e="backward"===a,t={pages:n,pageParams:u},s=(e?function(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}:p)(i,t);h=await c(t,s,e)}else{let t=e??n.length;do{let e=0===l?u[0]??i.initialPageParam:p(i,h);if(l>0&&null==e)break;h=await c(h,e),l++}while(l<t)}return h};t.options.persister?t.fetchFn=()=>t.options.persister?.(o,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=o}}}function p(e,{pages:t,pageParams:s}){let i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,s[i],s):void 0}var m=class{#r;#a;#n;#u;#h;#l;#o;#c;constructor(e={}){this.#r=e.queryCache||new h,this.#a=e.mutationCache||new o,this.#n=e.defaultOptions||{},this.#u=new Map,this.#h=new Map,this.#l=0}mount(){this.#l++,1===this.#l&&(this.#o=f.m.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#r.onFocus())}),this.#c=d.t.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#r.onOnline())}))}unmount(){this.#l--,0===this.#l&&(this.#o?.(),this.#o=void 0,this.#c?.(),this.#c=void 0)}isFetching(e){return this.#r.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#a.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#r.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),s=this.#r.build(this,t),i=s.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime((0,r.d2)(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#r.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,s){let i=this.defaultQueryOptions({queryKey:e}),a=this.#r.get(i.queryHash),n=a?.state.data,u=(0,r.Zw)(t,n);if(void 0!==u)return this.#r.build(this,i).setData(u,{...s,manual:!0})}setQueriesData(e,t,s){return n.jG.batch(()=>this.#r.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,s)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#r.get(t.queryHash)?.state}removeQueries(e){let t=this.#r;n.jG.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let s=this.#r;return n.jG.batch(()=>(s.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let s={revert:!0,...t};return Promise.all(n.jG.batch(()=>this.#r.findAll(e).map(e=>e.cancel(s)))).then(r.lQ).catch(r.lQ)}invalidateQueries(e,t={}){return n.jG.batch(()=>(this.#r.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let s={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(n.jG.batch(()=>this.#r.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,s);return s.throwOnError||(t=t.catch(r.lQ)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(r.lQ)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let s=this.#r.build(this,t);return s.isStaleByTime((0,r.d2)(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(r.lQ).catch(r.lQ)}fetchInfiniteQuery(e){return e.behavior=y(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(r.lQ).catch(r.lQ)}ensureInfiniteQueryData(e){return e.behavior=y(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return d.t.isOnline()?this.#a.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#r}getMutationCache(){return this.#a}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#u.set((0,r.EN)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#u.values()],s={};return t.forEach(t=>{(0,r.Cp)(e,t.queryKey)&&Object.assign(s,t.defaultOptions)}),s}setMutationDefaults(e,t){this.#h.set((0,r.EN)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#h.values()],s={};return t.forEach(t=>{(0,r.Cp)(e,t.mutationKey)&&Object.assign(s,t.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,r.F$)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===r.hT&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#r.clear(),this.#a.clear()}},g=s(99776),b=s(12115);function q(e){let{children:t}=e,[s]=(0,b.useState)(()=>new m({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:6e4,retry:1}}}));return(0,i.jsx)(g.Ht,{client:s,children:t})}}},e=>{e.O(0,[978,141,441,255,358],()=>e(e.s=29068)),_N_E=e.O()}]);
|
_next/static/chunks/app/page-91f7834d38336646.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[694,974],{35623:(e,t,n)=>{"use strict";n.d(t,{V:()=>l,z:()=>s});let i="end_header\n";function l(e){let t,n=new Uint8Array(e),l=new TextDecoder("ascii").decode(n.subarray(0,Math.min(4096,n.length))),s=l.indexOf(i);if(-1===s)throw Error("Not a PLY: no header terminator in the first 4 KB");let c=l.slice(0,s);if(!c.includes("format binary_little_endian 1.0"))throw Error("Unsupported PLY: expected binary little-endian");let r=a(c,"element vertex"),o=a(c,"element face"),d=function(e){let t=e.split("\n").find(e=>e.startsWith("comment spacing_mm"));if(!t)throw Error("PLY header has no spacing comment");let n=t.trim().split(/\s+/).slice(2,5).map(Number);if(3!==n.length||n.some(e=>!Number.isFinite(e)))throw Error("PLY header has a bad spacing comment");return[n[0],n[1],n[2]]}(c),u=c.includes("property float nx"),x=u?6:3,m=s+i.length,p=r*x*4,h=p+13*o,g=n.length-m;if(g!==h)throw Error("PLY body is ".concat(g," bytes, expected ").concat(h," (truncated or unexpected layout)"));let f=new Float32Array(r*x);new Uint8Array(f.buffer).set(n.subarray(m,m+p));let b=null;if(u){t=new Float32Array(3*r),b=new Float32Array(3*r);for(let e=0;e<r;e+=1){let n=6*e,i=3*e;t[i]=f[n],t[i+1]=f[n+1],t[i+2]=f[n+2],b[i]=f[n+3],b[i+1]=f[n+4],b[i+2]=f[n+5]}}else t=f;let v=new Uint32Array(3*o),y=new DataView(e),j=m+p;for(let e=0;e<o;e+=1){if(3!==y.getUint8(j))throw Error("PLY face ".concat(e," is not a triangle"));v[3*e]=y.getInt32(j+1,!0),v[3*e+1]=y.getInt32(j+5,!0),v[3*e+2]=y.getInt32(j+9,!0),j+=13}return{points:t,normals:b,triangles:v,spacing:d,vertexCount:r,triangleCount:o,bounds:function(e){if(0===e.length)return[0,0,0,0,0,0];let t=1/0,n=1/0,i=1/0,l=-1/0,a=-1/0,s=-1/0;for(let c=0;c<e.length;c+=3){let r=e[c],o=e[c+1],d=e[c+2];r<t&&(t=r),o<n&&(n=o),d<i&&(i=d),r>l&&(l=r),o>a&&(a=o),d>s&&(s=d)}return[t,n,i,l,a,s]}(t)}}function a(e,t){let n=e.split("\n").find(e=>e.startsWith(t));if(!n)throw Error("PLY header has no '".concat(t,"'"));let i=Number(n.trim().split(/\s+/).at(-1));if(!Number.isInteger(i)||i<0)throw Error("PLY header has a bad count for '".concat(t,"'"));return i}function s(e){let t=e.filter(e=>e.some(e=>0!==e));return 0===t.length?null:t.reduce((e,t)=>[Math.min(e[0],t[0]),Math.min(e[1],t[1]),Math.min(e[2],t[2]),Math.max(e[3],t[3]),Math.max(e[4],t[4]),Math.max(e[5],t[5])])}},41234:()=>{},51920:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>V});var i=n(95155),l=n(22454),a=n(12115),s=n(99776),c=n(80549),r=n(67161),o=n(55545);let d=(0,n(25959).v)(e=>({patientId:null,timepointIndex:0,comparisonIndex:null,selectedLesionId:null,viewMode:"COMPARE_2D",evidencePanelOpen:!1,activeEvidenceId:null,setPatient:t=>e({patientId:t,timepointIndex:0,comparisonIndex:null,selectedLesionId:null,activeEvidenceId:null}),setTimepointIndex:t=>e({timepointIndex:t}),stepTimepoint:(t,n)=>e(e=>({timepointIndex:Math.min(Math.max(e.timepointIndex+t,0),n)})),setComparisonIndex:t=>e({comparisonIndex:t}),selectLesion:t=>e({selectedLesionId:t}),setViewMode:t=>e({viewMode:t}),showEvidence:t=>e({activeEvidenceId:t,evidencePanelOpen:!0}),closeEvidence:()=>e({evidencePanelOpen:!1,activeEvidenceId:null})})),u=[{question:"WHAT_CHANGED",label:"what changed"},{question:"LARGEST_CHANGE",label:"largest change"},{question:"WHEN_LARGEST_CHANGE",label:"when"},{question:"WHAT_REMAINED_STABLE",label:"what was stable"},{question:"EVIDENCE_FOR_FINDING",label:"why this lesion",needsLesion:!0}];function x(e){var t,n,x,g;let{patientId:f}=e,{activeEvidenceId:b,selectedLesionId:v,timepointIndex:y,showEvidence:j}=d(),N=(0,s.jE)(),[w,_]=(0,a.useState)(null),[E,I]=(0,a.useState)(null),[k,A]=(0,a.useState)(!1),{data:S,isLoading:T}=(0,l.I)({queryKey:r.lH.aiObservations(f),queryFn:()=>r.FH.listAIObservations(f)}),{data:C}=(0,l.I)({queryKey:r.lH.timeline(f),queryFn:()=>r.FH.getTimeline(f)}),M=(0,c.n)({mutationFn:e=>{var t;return r.FH.askAIObservation(f,{question:e,study_id:null==C||null==(t=C.points[y])?void 0:t.study.id,lesion_id:"EVIDENCE_FOR_FINDING"===e&&null!=v?v:void 0})},onMutate:()=>{I(null)},onSuccess:e=>{_(e.observation),j(null),N.invalidateQueries({queryKey:r.lH.aiObservations(f)})},onError:e=>{I(e instanceof r.hD?e.message:"The evidence engine could not be reached.")}}),L=null!=(t=null!=w?w:null==S?void 0:S[0])?t:null,O=null==L?void 0:L.evidence_items.find(e=>e.id===b);return(0,i.jsxs)("section",{className:"shrink-0 border-t border-clinical-700 bg-clinical-800 px-4 py-2","data-testid":"evidence-panel","data-answer-id":null!=(n=null==L?void 0:L.id)?n:"","data-evidence-count":null!=(x=null==L?void 0:L.evidence_items.length)?x:0,"data-safety-status":null!=(g=null==L?void 0:L.safety_status)?g:"","data-collapsed":k,children:[(0,i.jsxs)("div",{className:"mb-1.5 flex flex-wrap items-baseline gap-x-3 gap-y-1",children:[(0,i.jsx)("h2",{className:"text-[10px] font-semibold uppercase tracking-[0.15em] text-signal-ai",children:"AI evidence"}),(0,i.jsx)("ul",{className:"flex flex-wrap gap-1",children:u.map(e=>{let{question:t,label:n,needsLesion:l}=e,a=l&&!v;return(0,i.jsx)("li",{children:(0,i.jsx)("button",{type:"button",disabled:M.isPending||a,onClick:()=>M.mutate(t),"data-testid":"ask-".concat(t),title:a?"Select a lesion first — this question is about one lesion":"Ask: ".concat(n),className:(0,o.cn)("rounded border px-2 py-0.5 text-[10px] transition-colors","border-clinical-600 text-clinical-muted",!a&&!M.isPending&&"hover:border-signal-ai/60 hover:text-clinical-text",(a||M.isPending)&&"cursor-not-allowed opacity-40"),children:n})},t)})}),L&&(0,i.jsx)(m,{observation:L,pending:M.isPending}),(0,i.jsx)("button",{type:"button",onClick:()=>A(e=>!e),"aria-expanded":!k,"aria-controls":"evidence-body","aria-label":k?"Expand the AI evidence panel":"Shrink the AI evidence panel",title:k?"Expand — give the evidence more room":"Shrink — give the images more room","data-testid":"evidence-resize",className:"ml-auto rounded border border-clinical-600 px-1.5 py-0.5 text-[11px] leading-none text-clinical-muted transition-colors hover:border-signal-ai/60 hover:text-clinical-text",children:(0,i.jsx)("span",{"aria-hidden":!0,children:k?"⤢":"\xd7"})})]}),(0,i.jsxs)("div",{id:"evidence-body","data-testid":"evidence-body",className:(0,o.cn)(k&&"max-h-20 overflow-y-auto pr-1"),children:[M.isPending?(0,i.jsx)("p",{className:"text-[11px] text-clinical-dim",children:"Assembling findings…"}):E?(0,i.jsx)("p",{className:"text-[11px] leading-relaxed text-signal-concern","data-testid":"evidence-refusal",children:E}):T?(0,i.jsx)("p",{className:"text-[11px] text-clinical-dim",children:"Loading…"}):L?(0,i.jsx)(p,{observation:L,onSelectEvidence:j,activeId:b}):(0,i.jsx)("p",{className:"text-[11px] text-clinical-dim",children:"Ask one of the five questions above. Answers are generated from the measurements on this timeline, never from the images directly."}),O&&(0,i.jsx)(h,{item:O,timeline:C})]})]})}function m(e){let{observation:t,pending:n}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"text-[9px] text-clinical-dim",children:"none"===t.llm_provider?"composed from findings":"".concat(t.llm_model)}),null!=t.confidence&&(0,i.jsxs)("span",{className:(0,o.cn)("measurement text-[9px]",(0,o.Jv)(t.confidence)),"data-testid":"answer-confidence",children:[(100*t.confidence).toFixed(0),"% confidence"]}),"PASSED"!==t.safety_status&&(0,i.jsxs)("span",{className:"text-[9px] uppercase tracking-wider text-signal-concern",children:["safety: ",t.safety_status.toLowerCase()]}),!n&&(0,i.jsx)("span",{className:"text-[9px] text-clinical-dim",children:new Date(t.created_at).toLocaleString()})]})}function p(e){let{observation:t,onSelectEvidence:n,activeId:l}=e,a=t.safety_notes.filter(e=>e.startsWith("low confidence")||e.startsWith("quality flag"));return(0,i.jsxs)("div",{className:"flex items-start gap-4",children:[(0,i.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,i.jsx)("p",{className:"border-l-2 border-signal-ai/40 pl-3 text-[11px] leading-relaxed text-clinical-text","data-testid":"answer-text",children:t.answer_text}),a.length>0&&(0,i.jsx)("ul",{className:"mt-1 pl-3 text-[9px] leading-relaxed text-signal-caution",children:a.map(e=>(0,i.jsx)("li",{children:e},e))})]}),(0,i.jsx)("ul",{className:"flex shrink-0 flex-wrap gap-1.5","data-testid":"evidence-list",children:t.evidence_items.map(e=>(0,i.jsx)("li",{children:(0,i.jsx)("button",{type:"button",onClick:()=>n(e.id),title:e.label,className:(0,o.cn)("rounded border px-2 py-1 text-[10px] transition-colors",l===e.id?"border-signal-ai bg-signal-ai/15 text-clinical-text":"border-clinical-600 text-clinical-muted hover:border-signal-ai/60 hover:text-clinical-text"),children:function(e){switch(e){case"IMAGE_REGION":return"Image region";case"SEGMENTATION":return"Segmentation";case"MEASUREMENT":return"Measurement";case"PRIOR_STUDY":return"Prior study";case"CLINICAL_EVENT":return"Clinical event";case"QUALITY_FINDING":return"Quality finding";default:return e}}(e.kind)})},e.id))})]})}function h(e){var t;let{item:n,timeline:l}=e,{closeEvidence:a,setTimepointIndex:s,selectLesion:c}=d(),r="string"==typeof n.locator.study_id?n.locator.study_id:null,o="string"==typeof n.locator.lesion_id?n.locator.lesion_id:null,u=r&&null!=(t=null==l?void 0:l.points.findIndex(e=>e.study.id===r))?t:-1;return(0,i.jsxs)("div",{className:"mt-2 flex items-start justify-between gap-4 rounded border border-signal-ai/30 bg-clinical-850 px-3 py-2",children:[(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("p",{className:"text-[11px] text-clinical-text",children:n.label}),Object.keys(n.locator).length>0&&(0,i.jsx)("p",{className:"measurement mt-0.5 text-[9px] text-clinical-dim",children:Object.entries(n.locator).filter(e=>{let[,t]=e;return null!==t}).map(e=>{let[t,n]=e;return"".concat(t,": ").concat(JSON.stringify(n))}).join(" \xb7 ")})]}),(0,i.jsxs)("div",{className:"flex shrink-0 items-center gap-3",children:[(u>=0||null!==o)&&(0,i.jsx)("button",{type:"button","data-testid":"evidence-navigate",onClick:()=>{u>=0&&s(u),o&&c(o)},className:"rounded border border-signal-ai/50 px-2 py-1 text-[10px] text-clinical-text transition-colors hover:bg-signal-ai/15",children:"show me"}),(0,i.jsx)("button",{type:"button",onClick:a,className:"text-[10px] text-clinical-muted hover:text-clinical-text",children:"close"})]})]})}function g(e){var t;let{point:n,lesions:l}=e,{selectedLesionId:a,selectLesion:s}=d(),c=null!=(t=null==n?void 0:n.observations)?t:[];return(0,i.jsxs)("aside",{className:"flex w-72 shrink-0 flex-col border-l border-clinical-700 bg-clinical-850",children:[(0,i.jsx)("div",{className:"border-b border-clinical-700 px-3 py-2",children:(0,i.jsx)("h2",{className:"text-[10px] font-semibold uppercase tracking-[0.15em] text-clinical-muted",children:"Findings"})}),(0,i.jsx)("div",{className:"flex-1 overflow-y-auto",children:0===c.length?(0,i.jsx)("p",{className:"px-3 py-4 text-[11px] text-clinical-dim",children:"No findings recorded at this timepoint."}):(0,i.jsx)("ul",{className:"divide-y divide-clinical-800",children:c.map(e=>{var t,n;let c=l.find(t=>t.id===e.lesion_id),r=(0,o.S5)(e,"VOLUME"),d=(0,o.S5)(e,"LARGEST_DIAMETER"),u=(0,o.S5)(e,"VOLUME_CHANGE_REL"),x=(0,o.S5)(e,"GROWTH_RATE"),m=a===e.lesion_id,p=e.quality_flags.includes("MATCH_UNCERTAIN")||e.quality_flags.includes("WEAK_SCORE")||e.quality_flags.includes("AMBIGUOUS_ALTERNATIVE");return(0,i.jsx)("li",{children:(0,i.jsxs)("button",{type:"button",onClick:()=>s(m?null:e.lesion_id),"data-testid":"finding-row","data-lesion-id":null!=(t=e.lesion_id)?t:"",className:(0,o.cn)("w-full px-3 py-2.5 text-left transition-colors",m?"bg-clinical-750":"hover:bg-clinical-800"),children:[(0,i.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,i.jsx)("span",{className:"measurement text-xs font-semibold text-clinical-text",children:null!=(n=null==c?void 0:c.label)?n:"Lesion"}),(0,i.jsx)("span",{className:"text-[9px] uppercase tracking-wider text-clinical-dim",children:e.compartment.toLowerCase().replaceAll("_"," ")})]}),(null==c?void 0:c.anatomy_region)&&(0,i.jsx)("p",{className:"mt-0.5 text-[10px] text-clinical-muted",children:c.anatomy_region}),(0,i.jsxs)("dl",{className:"mt-2 space-y-1",children:[r&&(0,i.jsx)(f,{label:"Volume",children:(0,i.jsx)("span",{className:"measurement text-clinical-text",children:(0,o.s8)(r)})}),d&&(0,i.jsx)(f,{label:"Diameter",children:(0,i.jsx)("span",{className:"measurement text-clinical-text",children:(0,o.s8)(d)})}),u&&(0,i.jsx)(f,{label:"Change",children:(0,i.jsxs)("span",{className:(0,o.cn)("measurement",p?"text-clinical-dim line-through decoration-clinical-500/60":(0,o.Tu)(u.value,e.quality_flags)),title:p?"This lesion may not be the same one measured previously, so the change may compare two different findings.":void 0,children:[(0,o.s8)(u),(0,i.jsxs)("span",{className:"ml-1 text-clinical-dim",children:["/ ",(0,o.vy)(e.interval_days)]})]})}),x&&(0,i.jsx)(f,{label:"Rate",children:(0,i.jsx)("span",{className:"measurement text-clinical-muted",children:(0,o.s8)(x)})}),(0,i.jsx)(f,{label:"Confidence",children:(0,i.jsx)("span",{className:(0,o.cn)("measurement",(0,o.Jv)(e.confidence)),children:null!=e.confidence?"".concat((100*e.confidence).toFixed(0),"%"):"—"})})]}),p&&u&&(0,i.jsx)("p",{className:"mt-2 border-l-2 border-signal-uncertain/60 pl-2 text-[9px] leading-tight text-signal-uncertain",children:"This may not be the same lesion as before. Treat the change with caution."}),e.quality_flags.length>0&&(0,i.jsx)("ul",{className:"mt-2 space-y-0.5 border-t border-clinical-800 pt-2",children:e.quality_flags.map(e=>(0,i.jsx)("li",{className:"text-[9px] leading-tight text-signal-uncertain",children:(0,o.Wt)(e)},e))})]})},e.id)})})}),(0,i.jsx)("p",{className:"border-t border-clinical-700 px-3 py-2 text-[9px] leading-snug text-clinical-dim",children:"Measured change only. MEDTRACE does not assess tumour progression or treatment response."})]})}function f(e){let{label:t,children:n}=e;return(0,i.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,i.jsx)("dt",{className:"text-[10px] text-clinical-muted",children:t}),(0,i.jsx)("dd",{className:"text-[11px]",children:n})]})}function b(e){var t,n;let{patient:a,selector:s}=e,{data:c}=(0,l.I)({queryKey:r.lH.health,queryFn:r.FH.health,refetchInterval:3e4}),d=(null==c?void 0:c.status)==="ok";return(0,i.jsxs)("header",{className:"flex shrink-0 items-center gap-4 border-b border-clinical-700 bg-clinical-850 px-4 py-2",children:[(0,i.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,i.jsx)("span",{className:"text-sm font-semibold tracking-[0.2em] text-clinical-text",children:"MEDTRACE"}),(0,i.jsx)("span",{className:"text-[10px] uppercase tracking-wider text-clinical-dim",children:"research prototype"})]}),(0,i.jsx)("div",{className:"h-4 w-px bg-clinical-700"}),s,a?(0,i.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[(0,i.jsxs)("span",{className:"text-clinical-muted",children:[null!=(t=a.sex)?t:"—",a.age_at_baseline_years?", ".concat(a.age_at_baseline_years," y"):""]}),(0,i.jsxs)("span",{className:"text-clinical-dim",children:[a.study_count," studies \xb7 ",a.lesion_count," lesions"]}),a.is_synthetic&&(0,i.jsx)("span",{className:"rounded border border-signal-uncertain/50 bg-signal-uncertain/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-signal-uncertain",children:"synthetic"})]}):(0,i.jsx)("span",{className:"text-xs text-clinical-dim",children:"No patient selected"}),(0,i.jsxs)("div",{className:"ml-auto flex items-center gap-4",children:[(0,i.jsx)("p",{className:"max-w-md text-right text-[10px] leading-tight text-clinical-dim",children:"Not for diagnosis or treatment. All clinical decisions remain with qualified healthcare professionals."}),(0,i.jsxs)("div",{className:"flex items-center gap-1.5",title:(n=c)?n.services.map(e=>"".concat(e.name,": ").concat(e.healthy?"ok":"unavailable")).join("\n"):"Checking services",children:[(0,i.jsx)("span",{className:(0,o.cn)("size-1.5 rounded-full",d?"bg-signal-stable":"bg-signal-concern")}),(0,i.jsx)("span",{className:"text-[10px] uppercase tracking-wider text-clinical-dim",children:c?d?"services ok":"degraded":"checking"})]})]})]})}function v(e){var t;let{patients:n,selectedId:l,onSelect:s}=e,[c,r]=(0,a.useState)(!1),[d,u]=(0,a.useState)(""),x=(0,a.useMemo)(()=>[...n].sort((e,t)=>t.study_count-e.study_count),[n]),m=(0,a.useMemo)(()=>{let e=d.trim().toLowerCase();return e?x.filter(t=>t.external_id.toLowerCase().includes(e)||t.source_dataset.toLowerCase().includes(e)):x},[x,d]),p=n.find(e=>e.id===l);return(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsxs)("button",{type:"button",onClick:()=>r(e=>!e),className:"flex items-center gap-2 rounded border border-clinical-600 px-2 py-1 text-[11px] text-clinical-text transition-colors hover:border-clinical-500",children:[(0,i.jsx)("span",{className:"measurement",children:null!=(t=null==p?void 0:p.external_id)?t:"Select patient"}),(0,i.jsx)("span",{className:"text-clinical-dim",children:c?"▲":"▼"})]}),c&&(0,i.jsxs)("div",{className:"absolute left-0 top-full z-50 mt-1 w-80 rounded border border-clinical-600 bg-clinical-850 shadow-xl",children:[(0,i.jsx)("input",{autoFocus:!0,value:d,onChange:e=>u(e.target.value),placeholder:"Filter by id or dataset",className:"w-full border-b border-clinical-700 bg-clinical-900 px-2 py-1.5 text-[11px] text-clinical-text placeholder:text-clinical-dim focus:outline-none"}),(0,i.jsxs)("ul",{className:"max-h-80 overflow-y-auto",children:[m.map(e=>(0,i.jsx)("li",{children:(0,i.jsxs)("button",{type:"button",onClick:()=>{s(e.id),r(!1),u("")},className:(0,o.cn)("flex w-full items-center justify-between gap-2 px-2 py-1.5 text-left text-[11px] transition-colors",e.id===l?"bg-clinical-750 text-clinical-text":"text-clinical-muted hover:bg-clinical-800"),children:[(0,i.jsx)("span",{className:"measurement",children:e.external_id}),(0,i.jsxs)("span",{className:"flex items-center gap-2 text-[9px] text-clinical-dim",children:[(0,i.jsxs)("span",{children:[e.study_count," studies"]}),(0,i.jsx)("span",{className:"uppercase tracking-wider",children:"BRATS2023_GLI"===e.source_dataset?"BraTS":e.source_dataset.toLowerCase()}),e.is_synthetic&&(0,i.jsx)("span",{className:"text-signal-uncertain",children:"synthetic"})]})]})},e.id)),0===m.length&&(0,i.jsx)("li",{className:"px-2 py-3 text-[11px] text-clinical-dim",children:"No match"})]}),(0,i.jsxs)("p",{className:"border-t border-clinical-700 px-2 py-1.5 text-[9px] text-clinical-dim",children:[n.length," patients \xb7 sorted by number of timepoints"]})]})]})}function y(e){let{points:t}=e,{timepointIndex:n,comparisonIndex:l,setTimepointIndex:a,setComparisonIndex:s}=d(),c=null!=l?l:n>0?n-1:null;return(0,i.jsxs)("aside",{className:"flex w-52 shrink-0 flex-col border-r border-clinical-700 bg-clinical-850",children:[(0,i.jsx)("div",{className:"border-b border-clinical-700 px-3 py-2",children:(0,i.jsx)("h2",{className:"text-[10px] font-semibold uppercase tracking-[0.15em] text-clinical-muted",children:"Studies"})}),(0,i.jsx)("ol",{className:"flex-1 overflow-y-auto",children:t.map((e,t)=>{var l,r;let d=t===n,u=e.study.quality,x=null!=(l=null==u?void 0:u.flags.length)?l:0;return(0,i.jsx)("li",{children:(0,i.jsxs)("button",{type:"button",onClick:()=>a(t),onContextMenu:e=>{e.preventDefault(),s(t===n?null:t)},"aria-current":d?"true":void 0,className:(0,o.cn)("flex w-full flex-col gap-1 border-l-2 px-3 py-2 text-left transition-colors",d?"border-l-signal-info bg-clinical-750":"border-l-transparent hover:bg-clinical-800"),children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)("span",{className:"measurement text-xs text-clinical-text",children:e.study.timepoint_label}),e.study.is_reference&&(0,i.jsx)("span",{className:"text-[9px] uppercase tracking-wider text-clinical-dim",title:"Reference study — others are registered onto this one",children:"ref"})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2 text-[10px]",children:[(0,i.jsx)("span",{className:(0,o.uA)(null==u?void 0:u.status),children:null!=(r=null==u?void 0:u.status.toLowerCase())?r:"not assessed"}),(null==u?void 0:u.confidence)!=null&&(0,i.jsxs)("span",{className:"measurement text-clinical-dim",children:[(100*u.confidence).toFixed(0),"%"]})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-clinical-dim",children:[(0,i.jsx)("span",{children:(0,o.vy)(e.study.days_from_baseline)}),e.observations.length>0&&(0,i.jsxs)("span",{children:[e.observations.length," obs"]}),x>0&&(0,i.jsxs)("span",{className:"text-signal-uncertain",children:[x," flag",x>1?"s":""]})]}),t===c&&!d&&(0,i.jsx)("span",{className:"text-[9px] uppercase tracking-wider text-signal-info",children:"comparing against"})]})},e.study.id)})}),(0,i.jsx)("p",{className:"border-t border-clinical-700 px-3 py-2 text-[9px] leading-snug text-clinical-dim",children:"Click to select. Right-click to set the comparison study."})]})}function j(e){var t;let{points:n}=e,{timepointIndex:l,setTimepointIndex:s,stepTimepoint:c}=d(),r=n.length-1;if((0,a.useEffect)(()=>{function e(e){let t=e.target;t&&["INPUT","TEXTAREA"].includes(t.tagName)||("ArrowLeft"===e.key?(e.preventDefault(),c(-1,r)):"ArrowRight"===e.key&&(e.preventDefault(),c(1,r)))}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[c,r]),0===n.length)return null;let u=n.map(e=>{var t;return null!=(t=e.study.days_from_baseline)?t:0}),x=Math.max(...u)||1,m=e=>u[e]/x*100,p=n[l],h=new Set,g=-1/0;for(let e=0;e<n.length;e+=1){let t=m(e);(0===e||e===n.length-1||t-g>=6)&&(h.add(e),g=t)}return h.add(l),(0,i.jsxs)("section",{className:"shrink-0 border-t border-clinical-700 bg-clinical-850 px-4 pb-3 pt-2",children:[(0,i.jsxs)("div",{className:"mb-1 flex items-baseline justify-between",children:[(0,i.jsx)("h2",{className:"text-[10px] font-semibold uppercase tracking-[0.15em] text-clinical-muted",children:"Disease timeline"}),(0,i.jsxs)("div",{className:"flex items-center gap-3 text-[10px] text-clinical-dim",children:[(0,i.jsxs)("span",{className:"measurement",children:[null==p?void 0:p.study.timepoint_label," \xb7"," ",(0,o.vy)(null!=(t=null==p?void 0:p.study.days_from_baseline)?t:null)," from baseline"]}),(0,i.jsx)("span",{children:"← → to move"})]})]}),(0,i.jsxs)("div",{className:"relative h-16",children:[(0,i.jsx)("div",{className:"absolute inset-x-0 top-7 h-px bg-clinical-600"}),(0,i.jsx)("div",{className:"absolute top-7 h-px bg-signal-info",style:{width:"".concat(m(l),"%")}}),n.map((e,t)=>{let n=t===l,a=e.study.quality,c=e.events.some(e=>e.is_within_treatment_window),r=e.events.filter(e=>!e.is_within_treatment_window);return(0,i.jsxs)("button",{type:"button",onClick:()=>s(t),"aria-label":"Timepoint ".concat(e.study.timepoint_label),"aria-current":n?"true":void 0,className:"absolute top-0 flex h-16 -translate-x-1/2 flex-col items-center justify-start gap-0.5 px-2",style:{left:"".concat(m(t),"%")},children:[(0,i.jsxs)("span",{className:"flex h-6 items-end gap-0.5",children:[c&&(0,i.jsx)("span",{className:"mb-0.5 size-1.5 rotate-45 bg-signal-uncertain",title:"Within 3 months of radiotherapy — progression cannot be assessed"}),r.map(e=>(0,i.jsx)("span",{className:"mb-0.5 size-1.5 rounded-full bg-clinical-500",title:e.label},e.id))]}),(0,i.jsx)("span",{className:(0,o.cn)("size-2.5 rounded-full border-2 transition-all",n?"scale-125 border-signal-info bg-signal-info":"border-clinical-500 bg-clinical-850")}),h.has(t)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:(0,o.cn)("measurement mt-0.5 text-[9px] whitespace-nowrap",n?"text-clinical-text":"text-clinical-dim"),children:e.study.timepoint_label.replace("week-","w")}),(0,i.jsx)("span",{className:(0,o.cn)("text-[8px]",(0,o.uA)(null==a?void 0:a.status)),children:(null==a?void 0:a.status)==="READY"?"":null==a?void 0:a.status.toLowerCase()})]})]},e.study.id)})]}),(0,i.jsx)("label",{className:"sr-only",htmlFor:"time-scrubber",children:"Disease timeline position"}),(0,i.jsx)("input",{id:"time-scrubber",type:"range",min:0,max:r,step:1,value:l,onChange:e=>s(Number(e.target.value)),className:"w-full accent-signal-info"}),p&&p.events.length>0&&(0,i.jsx)("ul",{className:"mt-1.5 flex flex-wrap gap-x-4 gap-y-1",children:p.events.map(e=>(0,i.jsxs)("li",{className:(0,o.cn)("text-[10px]",e.is_within_treatment_window?"text-signal-uncertain":"text-clinical-muted"),children:[(0,i.jsx)("span",{className:"uppercase tracking-wider text-clinical-dim",children:e.event_type.toLowerCase().replaceAll("_"," ")})," ",e.label]},e.id))})]})}var N=n(67909),w=n(85330);function _(e){let{settings:t,onChange:n,available:l}=e;return(0,i.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,i.jsx)("button",{type:"button",disabled:!l,onClick:()=>n({...t,visible:!t.visible}),title:l?"Show the tumour segmentation over the image":"No mask aligned to this sequence. Try T1C, or see the 3D view.",className:(0,o.cn)("rounded px-2 py-0.5 text-[10px] uppercase tracking-wider transition-colors",l?t.visible?"bg-signal-info/20 text-signal-info":"text-clinical-dim hover:text-clinical-muted":"text-clinical-700"),children:"mask"}),l&&t.visible&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{type:"button",onClick:()=>n({...t,outlineOnly:!t.outlineOnly}),title:t.outlineOnly?"Outline only — the tissue under the mask stays visible":"Filled — hides the tissue it describes",className:"rounded px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-clinical-dim transition-colors hover:text-clinical-muted",children:t.outlineOnly?"outline":"filled"}),!t.outlineOnly&&(0,i.jsxs)("label",{className:"flex items-center gap-1 text-[9px] text-clinical-dim",children:[(0,i.jsx)("span",{className:"sr-only",children:"Mask opacity"}),(0,i.jsx)("input",{type:"range",min:.1,max:.9,step:.05,value:t.opacity,onChange:e=>n({...t,opacity:Number(e.target.value)}),className:"w-16 accent-signal-info"}),Math.round(100*t.opacity),"%"]}),(0,i.jsx)("span",{className:"flex items-center gap-1.5 pl-1",children:[1,2,3].map(e=>(0,i.jsxs)("span",{className:"flex items-center gap-1 text-[9px]",children:[(0,i.jsx)("span",{className:"size-2 rounded-sm",style:{backgroundColor:"rgb(".concat(w.B[e].slice(0,3).join(","),")")},"aria-hidden":!0}),(0,i.jsx)("span",{className:"text-clinical-dim",children:w.eW[e]})]},e))})]})]})}function E(e,t){let[n,i]=(0,a.useState)(e);return(0,a.useEffect)(()=>{if(e===n)return;let l=setTimeout(()=>i(e),t);return()=>clearTimeout(l)},[e,n,t]),n}let I=(0,N.default)(()=>Promise.all([n.e(987),n.e(178),n.e(199)]).then(n.bind(n,22199)).then(e=>e.NiftiViewport),{loadableGenerated:{webpack:()=>[22199]},ssr:!1,loading:()=>(0,i.jsx)("div",{className:"flex size-full items-center justify-center bg-black",children:(0,i.jsx)("p",{className:"text-[10px] uppercase tracking-[0.2em] text-clinical-dim",children:"initialising viewer"})})}),k=(0,N.default)(()=>Promise.all([n.e(987),n.e(178),n.e(534)]).then(n.bind(n,31534)).then(e=>e.ViewerMemory),{loadableGenerated:{webpack:()=>[31534]},ssr:!1}),A=(0,N.default)(()=>Promise.all([n.e(987),n.e(178),n.e(808)]).then(n.bind(n,5808)).then(e=>e.SliceSyncToggle),{loadableGenerated:{webpack:()=>[5808]},ssr:!1}),S=(0,N.default)(()=>Promise.all([n.e(481),n.e(405)]).then(n.bind(n,3405)).then(e=>e.EvolutionViewport),{loadableGenerated:{webpack:()=>[3405]},ssr:!1,loading:()=>(0,i.jsx)("div",{className:"flex min-h-0 flex-1 items-center justify-center bg-clinical-900",children:(0,i.jsx)("p",{className:"text-[10px] uppercase tracking-[0.2em] text-clinical-dim",children:"loading 3D renderer"})})}),T=["T1C","T1","T2","FLAIR"],C=["axial","coronal","sagittal"];function M(e){var t,n;let{current:s,comparison:c,lesionLabels:o}=e,{viewMode:u,setViewMode:x}=d(),[m,p]=(0,a.useState)("T1C"),[h,g]=(0,a.useState)("axial"),[f,b]=(0,a.useState)({visible:!0,outlineOnly:!0,opacity:.4}),{data:v}=(0,l.I)({queryKey:r.lH.study(null!=(n=null==s?void 0:s.study.id)?n:"none"),queryFn:()=>r.FH.getStudy(s.study.id),enabled:!!s}),y=!!(null==v||null==(t=v.series.find(e=>e.sequence===m))?void 0:t.has_mask);return(0,i.jsxs)("section",{className:"flex min-w-0 flex-1 flex-col bg-clinical-900",children:[(0,i.jsxs)("div",{className:"flex shrink-0 flex-wrap items-center gap-1 border-b border-clinical-700 bg-clinical-850 px-2 py-1.5",children:[(0,i.jsx)(L,{mode:"COMPARE_2D",active:u,onSelect:x,children:"2D comparison"}),(0,i.jsx)(L,{mode:"EVOLUTION_3D",active:u,onSelect:x,children:"3D evolution"}),"COMPARE_2D"===u&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"mx-1 h-4 w-px bg-clinical-700"}),(0,i.jsx)(O,{options:T,value:m,onChange:p}),(0,i.jsx)("span",{className:"mx-1 h-4 w-px bg-clinical-700"}),(0,i.jsx)(O,{options:C,value:h,onChange:g}),(0,i.jsx)("span",{className:"mx-1 h-4 w-px bg-clinical-700"}),(0,i.jsx)(A,{}),(0,i.jsx)("span",{className:"mx-1 h-4 w-px bg-clinical-700"}),(0,i.jsx)(_,{settings:f,onChange:b,available:y}),(0,i.jsx)("span",{className:"ml-auto text-[9px] text-clinical-dim",children:"drag: window/level \xb7 wheel: scroll \xb7 right-drag: zoom \xb7 middle: pan"}),(0,i.jsx)(k,{})]})]}),"COMPARE_2D"===u?(0,i.jsxs)("div",{className:"grid min-h-0 flex-1 grid-cols-2 gap-px bg-clinical-700","data-testid":"viewer-grid",children:[(0,i.jsx)(R,{pane:"prior",label:"Prior",point:c,sequence:m,orientation:h,maskSettings:f}),(0,i.jsx)(R,{pane:"current",label:"Current",point:s,sequence:m,orientation:h,maskSettings:f})]}):(0,i.jsx)(H,{current:s,comparison:c,lesionLabels:o})]})}function L(e){let{mode:t,active:n,onSelect:l,children:a}=e;return(0,i.jsx)("button",{type:"button",onClick:()=>l(t),className:(0,o.cn)("rounded px-2.5 py-1 text-[11px] transition-colors",n===t?"bg-clinical-700 text-clinical-text":"text-clinical-muted hover:bg-clinical-800"),children:a})}function O(e){let{options:t,value:n,onChange:l}=e;return(0,i.jsx)("div",{className:"flex gap-0.5",children:t.map(e=>(0,i.jsx)("button",{type:"button",onClick:()=>l(e),className:(0,o.cn)("rounded px-2 py-0.5 text-[10px] uppercase tracking-wider transition-colors",n===e?"bg-signal-info/20 text-signal-info":"text-clinical-dim hover:text-clinical-muted"),children:e},e))})}function R(e){var t,n,s,c,d,u;let{pane:x,label:m,point:p,sequence:h,orientation:g,maskSettings:f}=e,[b,v]=(0,a.useState)({state:"idle"}),[y,j]=(0,a.useState)(null),{data:N}=(0,l.I)({queryKey:r.lH.study(null!=(n=null==p?void 0:p.study.id)?n:"none"),queryFn:()=>r.FH.getStudy(p.study.id),enabled:!!p}),w=null==N?void 0:N.series.find(e=>e.sequence===h),_=null!=(s=null==p||null==(t=p.study.quality)?void 0:t.flags)?s:[],k=(null==w?void 0:w.has_file)?(0,r.VX)(w.id):void 0,A=E(k,400),S=E((null==w?void 0:w.has_mask)?(0,r.Fc)(w.id):void 0,400),T=E((null==w?void 0:w.has_mask)?w.id:void 0,400),C=null!==y&&void 0!==w&&y===k;return(0,i.jsxs)("div",{className:"relative flex min-h-0 flex-col bg-clinical-900","data-pane":x,"data-expected-study":null!=(c=null==p?void 0:p.study.id)?c:"","data-expected-series":null!=(d=null==w?void 0:w.id)?d:"","data-showing-correct-study":C?"true":"false",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between gap-2 px-2 py-1 text-[10px]",children:[(0,i.jsx)("span",{className:"uppercase tracking-wider text-clinical-muted",children:m}),(0,i.jsxs)("span",{className:"flex items-center gap-1.5",children:[p&&(null==w?void 0:w.has_file)&&(0,i.jsx)("span",{title:C?"Displaying ".concat(p.study.timepoint_label,", ").concat(h):"Image not yet loaded for this timepoint",className:(0,o.cn)("size-1.5 rounded-full",C?"bg-signal-stable":"bg-signal-uncertain")}),(0,i.jsx)("span",{className:"measurement text-clinical-text",children:null!=(u=null==p?void 0:p.study.timepoint_label)?u:"—"}),(0,i.jsx)("span",{className:"text-clinical-dim",children:p?h:""})]})]}),(0,i.jsxs)("div",{className:"relative min-h-0 flex-1 border-t border-clinical-800",children:[(0,i.jsx)(I,{pane:x,fileUrl:A,orientation:g,mask:{url:S,key:T,visible:f.visible,outlineOnly:f.outlineOnly,opacity:f.opacity},onStatusChange:v,onRenderedChange:j}),!p&&(0,i.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-clinical-900",children:(0,i.jsx)("p",{className:"text-[11px] text-clinical-dim",children:"No comparison study at this position"})}),p&&!N&&(0,i.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-clinical-900",children:(0,i.jsx)("p",{className:"text-[10px] text-clinical-dim",children:"loading study"})}),p&&N&&!w&&(0,i.jsx)("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center bg-clinical-900",children:(0,i.jsxs)("p",{className:"text-[11px] text-signal-uncertain",children:[h," not acquired at this timepoint"]})}),p&&w&&!w.has_file&&(0,i.jsx)("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center bg-clinical-900",children:(0,i.jsxs)("p",{className:"max-w-[80%] text-center text-[11px] leading-relaxed text-clinical-dim",children:["No imaging data for this series.",(0,i.jsx)("br",{}),(0,i.jsx)("span",{className:"text-[10px]",children:"Metadata only — this patient has no pixel data on disk."})]})}),w&&(0,i.jsx)(F,{study:N,sequence:h,status:b}),_.length>0&&(0,i.jsx)("ul",{className:"pointer-events-none absolute right-2 top-2 max-w-[15rem] space-y-1 text-right",children:_.map(e=>(0,i.jsx)("li",{className:"text-[9px] leading-tight text-signal-uncertain",children:(0,o.Wt)(e)},e))})]})]})}function F(e){let{study:t,sequence:n,status:l}=e,a=null==t?void 0:t.series.find(e=>e.sequence===n);if(!a)return null;let s=a.voxel_spacing_mm;return(0,i.jsxs)("dl",{className:"pointer-events-none absolute bottom-2 left-2 space-y-0.5 text-[9px] text-clinical-dim",children:[(0,i.jsxs)("div",{className:"measurement",children:[a.columns,"\xd7",a.rows,"\xd7",a.slice_count,"ready"===l.state&&" \xb7 ".concat(l.slices," slices loaded")]}),s&&(0,i.jsxs)("div",{className:"measurement",children:[s.map(e=>e.toFixed(2)).join(" \xd7 ")," mm"]}),(0,i.jsxs)("div",{className:"measurement",children:[a.field_strength_t?"".concat(a.field_strength_t," T"):"field strength unknown",a.manufacturer?" \xb7 ".concat(a.manufacturer.trim()):"",a.scanner_model?" ".concat(a.scanner_model.trim()):""]})]})}let D=["MATCH_UNCERTAIN","WEAK_SCORE","AMBIGUOUS_ALTERNATIVE"];function q(e,t){let n=e.measurements.find(e=>e.kind===t);return n?n.value:null}function P(e,t){return e?e.observations.filter(e=>e.has_mesh).map(e=>{var n,i;return{observationId:e.id,lesionId:e.lesion_id,lesionLabel:e.lesion_id&&null!=(n=t.get(e.lesion_id))?n:"—",relativeChange:q(e,"VOLUME_CHANGE_REL"),correspondenceDoubtful:e.quality_flags.some(e=>D.includes(e)),volumeCm3:null!=(i=q(e,"VOLUME"))?i:0}}):[]}function H(e){var t,n,s,c;let{current:u,comparison:x,lesionLabels:m}=e,{selectedLesionId:p,selectLesion:h}=d(),[g,f]=(0,a.useState)(!0),b=P(u,m),v=P(x,m),{data:y}=(0,l.I)({queryKey:r.lH.segmentations(null!=(n=null==u?void 0:u.study.id)?n:"none"),queryFn:()=>r.FH.listStudySegmentations(u.study.id),enabled:!!u}),j=null!=(s=null==y||null==(t=y.find(e=>e.has_mesh))?void 0:t.id)?s:null;return(0,i.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,i.jsxs)("div",{className:"flex shrink-0 items-center gap-2 border-b border-clinical-800 px-2 py-1 text-[10px]",children:[(0,i.jsx)("span",{className:"uppercase tracking-wider text-clinical-muted",children:"3D evolution"}),(0,i.jsx)("span",{className:"measurement text-clinical-text",children:null!=(c=null==u?void 0:u.study.timepoint_label)?c:"—"}),(0,i.jsx)("button",{type:"button",onClick:()=>f(e=>!e),disabled:0===v.length,title:0===v.length?"No comparison surfaces at this position":"Show the comparison timepoint as an outline",className:(0,o.cn)("rounded px-2 py-0.5 uppercase tracking-wider transition-colors",0===v.length?"text-clinical-700":g?"bg-signal-info/20 text-signal-info":"text-clinical-dim hover:text-clinical-muted"),children:"prior outline"}),(0,i.jsx)("span",{className:"ml-auto text-[9px] text-clinical-dim",children:x?"compared against ".concat(x.study.timepoint_label):"baseline — nothing to compare against"})]}),(0,i.jsx)(S,{current:b,prior:v,showPrior:g&&v.length>0,selectedLesionId:p,onSelectLesion:h,brainSegmentationId:j})]})}function V(){var e,t;let{patientId:n,setPatient:s,timepointIndex:c,comparisonIndex:o}=d(),{data:u,isLoading:m,error:p}=(0,l.I)({queryKey:r.lH.patients,queryFn:()=>r.FH.listPatients(500)});(0,a.useEffect)(()=>{!n&&(null==u?void 0:u.length)&&s([...u].sort((e,t)=>t.study_count-e.study_count)[0].id)},[n,u,s]);let{data:h,isLoading:f}=(0,l.I)({queryKey:r.lH.timeline(null!=n?n:"none"),queryFn:()=>r.FH.getTimeline(n),enabled:!!n}),N=null!=(e=null==h?void 0:h.points)?e:[],w=N[c],_=null!=o?N[o]:c>0?N[c-1]:void 0,E=(0,a.useMemo)(()=>{var e;return new Map((null!=(e=null==h?void 0:h.lesions)?e:[]).map(e=>[e.id,e.label]))},[null==h?void 0:h.lesions]);return(0,i.jsxs)("main",{className:"flex h-screen flex-col overflow-hidden",children:[(0,i.jsx)(b,{patient:null==h?void 0:h.patient,selector:u&&u.length>0?(0,i.jsx)(v,{patients:u,selectedId:n,onSelect:s}):null}),p?(0,i.jsx)(G,{title:"Cannot reach the API",detail:"Start the backend with: make api"}):m||f?(0,i.jsx)(G,{title:"Loading patient"}):0===N.length?(0,i.jsx)(G,{title:"No patients",detail:"Seed the demonstration patient with: make seed"}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex min-h-0 flex-1",children:[(0,i.jsx)(y,{points:N}),(0,i.jsx)(M,{current:w,comparison:_,lesionLabels:E}),(0,i.jsx)(g,{point:w,lesions:null!=(t=null==h?void 0:h.lesions)?t:[]})]}),(0,i.jsx)(j,{points:N}),n&&(0,i.jsx)(x,{patientId:n})]})]})}function G(e){let{title:t,detail:n}=e;return(0,i.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center gap-2",children:[(0,i.jsx)("p",{className:"text-sm text-clinical-muted",children:t}),n&&(0,i.jsx)("code",{className:"text-[11px] text-clinical-dim",children:n})]})}},55545:(e,t,n)=>{"use strict";n.d(t,{Jv:()=>d,S5:()=>x,Tu:()=>o,Wt:()=>c,cn:()=>a,s8:()=>u,uA:()=>r,vy:()=>m});var i=n(2821),l=n(75889);function a(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,l.QP)((0,i.$)(t))}let s={MISSING_SEQUENCE:"A required sequence is missing",THICK_SLICES:"Thick slices limit volumetric accuracy",MIXED_FIELD_STRENGTH:"Sequences acquired at different field strengths",MIXED_MANUFACTURER:"Sequences acquired on different scanners",DIFFERENT_PROTOCOL_FROM_PRIOR:"Different acquisition protocol from the prior study",SPACING_HEADER_MISMATCH:"Voxel spacing disagrees with the file header",REGISTRATION_UNCERTAINTY:"Alignment to the prior study is uncertain",POST_OPERATIVE_ANATOMY:"Post-operative anatomy",WITHIN_TREATMENT_WINDOW:"Within 3 months of radiotherapy",NON_MEASURABLE_LESION:"Lesion too small or diffuse to measure reliably",SEGMENTATION_DISAGREEMENT:"Segmentation sources disagree"};function c(e){var t;return null!=(t=s[e])?t:e.toLowerCase().replaceAll("_"," ")}function r(e){switch(e){case"READY":return"text-signal-stable";case"DEGRADED":return"text-signal-uncertain";case"UNUSABLE":return"text-signal-concern";default:return"text-clinical-dim"}}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.includes("WITHIN_TREATMENT_WINDOW")||t.includes("REGISTRATION_UNCERTAINTY")||t.includes("DIFFERENT_PROTOCOL_FROM_PRIOR")?"text-signal-uncertain":e>=.25?"text-signal-concern":e>=.1?"text-signal-change":e<=-.1?"text-signal-stable":"text-clinical-text"}function d(e){return null===e?"text-clinical-dim":e>=.85?"text-signal-stable":e>=.7?"text-signal-uncertain":"text-signal-concern"}function u(e){let{value:t,unit:n,uncertainty:i}=e;if("ratio"===n)return"".concat(t>=0?"+":"").concat((100*t).toFixed(1),"%");let l=Math.abs(t)>=100?0:1,a="".concat(t.toFixed(l)," ").concat(function(e){switch(e){case"cm3":return"cm\xb3";case"mm3":return"mm\xb3";case"cm3/month":return"cm\xb3/month";default:return e}}(n));return i?"".concat(a," \xb1 ").concat(i.toFixed(l)):a}function x(e,t){return null==e?void 0:e.measurements.find(e=>e.kind===t)}function m(e){if(null===e)return"interval unknown";if(e<14)return"".concat(e," d");let t=Math.round(e/7);return t<9?"".concat(t," wk"):"".concat((e/30.44).toFixed(1)," mo")}},59750:(e,t,n)=>{Promise.resolve().then(n.bind(n,51920))},67161:(e,t,n)=>{"use strict";n.d(t,{hD:()=>r,FH:()=>f,V$:()=>g,s4:()=>p,lH:()=>b,VX:()=>u,Fc:()=>x});var i=n(83846),l=n(35623);let a="https://huggingface.co/datasets/AIOmarRehan/medtrace-rhuh-gbm-derived/resolve/main";function s(e,t,n){return"".concat(a,"/").concat(e,"/").concat(t).concat(n)}let c={seriesFile:e=>s("images",e,".nii.gz"),seriesMask:e=>s("masks",e,".nii.gz"),segmentationVolume:e=>s("volumes",e,".nii.gz"),observationMesh:e=>s("meshes",e,".ply")};class r extends Error{constructor(e,t){super(e),this.status=t,this.name="ApiError"}}async function o(e,t){var n;let i=await fetch(e,{headers:{Accept:"application/json"},cache:"no-store"});if(!i.ok)throw new r("Recorded response for ".concat(t," is missing (").concat(i.status,")"),i.status);let l=await i.json();if("object"==typeof l&&null!==l&&"number"==typeof l.__recorded_status)throw new r(null!=(n=l.detail)?n:"Request to ".concat(t," failed with ").concat(l.__recorded_status),l.__recorded_status);return l}async function d(e,t){{let t=function(e){let[t]=e.split("?");if("/health"===t)return"".concat("api","/health.json");if("/api/v1/patients"===t)return"".concat("api","/patients.json");let n=t.match(/^\/api\/v1\/patients\/([^/]+)\/timeline$/);if(n)return"".concat("api","/timeline/").concat(n[1],".json");let i=t.match(/^\/api\/v1\/patients\/([^/]+)\/ai-observations$/);if(i)return"".concat("api","/ai-observations/").concat(i[1],".json");let l=t.match(/^\/api\/v1\/studies\/([^/]+)\/segmentations$/);if(l)return"".concat("api","/segmentations/").concat(l[1],".json");let a=t.match(/^\/api\/v1\/studies\/([^/]+)$/);if(a)return"".concat("api","/study/").concat(a[1],".json");let s=t.match(/^\/api\/v1\/lesions\/([^/]+)$/);return s?"".concat("api","/lesion/").concat(s[1],".json"):null}(e);if(null===t)throw new r("No recorded response for ".concat(e),501);return o(t,e)}}function u(e){return c.seriesFile(e)}function x(e){return c.seriesMask(e)}let m=new Map;function p(e){var t=c.observationMesh(e);let n=m.get(t);if(n)return n;let i=fetch(t).then(async e=>{if(!e.ok)throw new r("Mesh request failed with ".concat(e.status),e.status);return(0,l.V)(await e.arrayBuffer())}).catch(e=>{throw m.delete(t),e});return m.set(t,i),i}let h=new Map;function g(e){let t=c.segmentationVolume(e),n=h.get(t);if(n)return n;let l=fetch(t).then(async e=>{if(!e.ok)throw new r("Volume request failed with ".concat(e.status),e.status);return(0,i.uh)(await (0,i.gV)(await e.arrayBuffer()))}).catch(e=>{throw h.delete(t),e});return h.set(t,l),l}let f={health:()=>d("/health"),listPatients:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;return d("/api/v1/patients?limit=".concat(e))},getTimeline:e=>d("/api/v1/patients/".concat(e,"/timeline")),getStudy:e=>d("/api/v1/studies/".concat(e)),getLesion:e=>d("/api/v1/lesions/".concat(e)),listAIObservations:e=>d("/api/v1/patients/".concat(e,"/ai-observations")),askAIObservation:(e,t)=>o(function(e,t,n,i){return"".concat("api","/answers/").concat(e,"/").concat(t,"/").concat(null!=n?n:"none","/").concat(null!=i?i:"none",".json")}(e,t.question,t.study_id,t.lesion_id),"".concat(t.question," for ").concat(e)),listStudySegmentations:e=>d("/api/v1/studies/".concat(e,"/segmentations"))},b={health:["health"],patients:["patients"],timeline:e=>["timeline",e],study:e=>["study",e],lesion:e=>["lesion",e],aiObservations:e=>["ai-observations",e],segmentations:e=>["segmentations",e]}},83846:(e,t,n)=>{"use strict";n.d(t,{GX:()=>a,gV:()=>i,uh:()=>l});async function i(e){let t=new Uint8Array(e,0,Math.min(2,e.byteLength));if(t.length<2||31!==t[0]||139!==t[1])return e;if("undefined"==typeof DecompressionStream)throw Error("Volume arrived gzip-compressed and this browser has no DecompressionStream to inflate it");return new Response(new Blob([e]).stream().pipeThrough(new DecompressionStream("gzip"))).arrayBuffer()}function l(e){if(e.byteLength<348)throw Error("Mask is only ".concat(e.byteLength," bytes; not a NIfTI file"));let t=new DataView(e),n=!0;if(348!==t.getInt32(0,!0))if(348===t.getInt32(0,!1))n=!1;else throw Error("Mask header is not a NIfTI-1 header");let i=t.getInt16(40,n);if(i<3)throw Error("Mask has rank ".concat(i,"; a 3D volume is required"));let l=[t.getInt16(42,n),t.getInt16(44,n),t.getInt16(46,n)];if(l.some(e=>e<=0))throw Error("Mask has invalid dimensions ".concat(l.join("x")));let a=t.getInt16(70,n);if(2!==a)throw Error("Mask datatype is ".concat(a,", expected ").concat(2," (uint8). Regenerate it with link_series_masks.py"));let s=Math.round(t.getFloat32(108,n))||352,c=l[0]*l[1]*l[2],r=e.byteLength-s;if(r<c)throw Error("Mask is truncated: ".concat(r," bytes of voxel data, expected ").concat(c));return{voxels:new Uint8Array(e,s,c),dimensions:l,spacing:[t.getFloat32(80,n),t.getFloat32(84,n),t.getFloat32(88,n)].map(e=>Number.isFinite(e)&&e>0?e:1)}}function a(e){let t=l(e),n=new Set,i=0;for(let e=0;e<t.voxels.length;e+=1){let l=t.voxels[e];0!==l&&(i+=1,n.add(l))}return{...t,labels:[...n].sort((e,t)=>e-t),labelledVoxels:i}}},85330:(e,t,n)=>{"use strict";n.d(t,{AV:()=>h,B:()=>c,Cn:()=>m,Iy:()=>p,bh:()=>o,dp:()=>v,eW:()=>r,kl:()=>b,ml:()=>g,o:()=>x,zE:()=>u});var i=n(70192),l=n(20205),a=n(83846);let{D_:s}=l.fX,c={1:[255,92,92,255],2:[110,200,255,255],3:[250,214,120,255]},r={1:"enhancing",2:"necrotic core",3:"oedema"};function o(e){return"seg-".concat(e)}let d=new Map;async function u(e,t,n){var l;let s=d.get(n);if(s&&i.PP.getVolume(n))return s;let c=await fetch(e);if(!c.ok)throw Error("Mask request failed with ".concat(c.status));let r=(0,a.GX)(await (0,a.gV)(await c.arrayBuffer())),o=i.PP.getVolume(t);if(!o)throw Error("Image volume is not loaded, so no labelmap can be aligned to it");let u=null!=(l=o.dimensions)?l:[];if(3===u.length&&!r.dimensions.every((e,t)=>e===u[t]))throw Error("Mask grid ".concat(r.dimensions.join("x")," does not match the image ")+"".concat(u.join("x")));let x=i.UH.createAndCacheDerivedLabelmapVolume(t,{volumeId:n}).voxelManager;if(!(null==x?void 0:x.setAtIndex))throw Error("Labelmap has no writable voxel manager");for(let e=0;e<r.voxels.length;e+=1){let t=r.voxels[e];0!==t&&x.setAtIndex(e,t)}let m={voxels:r.labelledVoxels,labels:r.labels};return d.set(n,m),m}function x(e,t){l.b2.state.getSegmentation(e)||l.b2.addSegmentations([{segmentationId:e,representation:{type:s.Labelmap,data:{volumeId:t}}}])}function m(e,t,n){l.b2.addLabelmapRepresentationToViewport(e,[{segmentationId:t,type:s.Labelmap}]),h(t,n);try{l.b2.triggerSegmentationEvents.triggerSegmentationDataModified(t)}catch(e){}}function p(e,t,n){h(t,n),g(e,t);try{l.b2.triggerSegmentationEvents.triggerSegmentationDataModified(t)}catch(e){}}function h(e,t){l.b2.config.style.setStyle({type:s.Labelmap,segmentationId:e},{renderFill:!t.outlineOnly,renderOutline:!0,fillAlpha:t.opacity,outlineWidth:t.outlineOnly?2:1,outlineOpacity:1,activeSegmentOutlineWidthDelta:0})}function g(e,t){for(let[n,i]of Object.entries(c))try{l.b2.config.color.setSegmentIndexColor(e,t,Number(n),i)}catch(e){}}function f(e,t){var n,i;return(null!=(i=null==e||null==(n=e.getActors)?void 0:n.call(e))?i:[]).some(e=>e.referencedId===t||e.uid===t)}async function b(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4e3,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:16,l=Date.now()+n;for(;Date.now()<l;){if(f(e,t))return!0;await new Promise(e=>setTimeout(e,i))}return f(e,t)}function v(e,t){try{l.b2.removeSegmentationRepresentations(e,{segmentationId:t,type:s.Labelmap})}catch(e){}}}},e=>{e.O(0,[977,658,141,156,441,255,358],()=>e(e.s=59750)),_N_E=e.O()}]);
|
_next/static/chunks/app/page-95b07fc08ebfaa5d.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[694,974],{35623:(e,t,n)=>{"use strict";n.d(t,{V:()=>l,z:()=>s});let i="end_header\n";function l(e){let t,n=new Uint8Array(e),l=new TextDecoder("ascii").decode(n.subarray(0,Math.min(4096,n.length))),s=l.indexOf(i);if(-1===s)throw Error("Not a PLY: no header terminator in the first 4 KB");let c=l.slice(0,s);if(!c.includes("format binary_little_endian 1.0"))throw Error("Unsupported PLY: expected binary little-endian");let r=a(c,"element vertex"),o=a(c,"element face"),d=function(e){let t=e.split("\n").find(e=>e.startsWith("comment spacing_mm"));if(!t)throw Error("PLY header has no spacing comment");let n=t.trim().split(/\s+/).slice(2,5).map(Number);if(3!==n.length||n.some(e=>!Number.isFinite(e)))throw Error("PLY header has a bad spacing comment");return[n[0],n[1],n[2]]}(c),u=c.includes("property float nx"),x=u?6:3,m=s+i.length,p=r*x*4,h=p+13*o,g=n.length-m;if(g!==h)throw Error("PLY body is ".concat(g," bytes, expected ").concat(h," (truncated or unexpected layout)"));let f=new Float32Array(r*x);new Uint8Array(f.buffer).set(n.subarray(m,m+p));let b=null;if(u){t=new Float32Array(3*r),b=new Float32Array(3*r);for(let e=0;e<r;e+=1){let n=6*e,i=3*e;t[i]=f[n],t[i+1]=f[n+1],t[i+2]=f[n+2],b[i]=f[n+3],b[i+1]=f[n+4],b[i+2]=f[n+5]}}else t=f;let v=new Uint32Array(3*o),y=new DataView(e),j=m+p;for(let e=0;e<o;e+=1){if(3!==y.getUint8(j))throw Error("PLY face ".concat(e," is not a triangle"));v[3*e]=y.getInt32(j+1,!0),v[3*e+1]=y.getInt32(j+5,!0),v[3*e+2]=y.getInt32(j+9,!0),j+=13}return{points:t,normals:b,triangles:v,spacing:d,vertexCount:r,triangleCount:o,bounds:function(e){if(0===e.length)return[0,0,0,0,0,0];let t=1/0,n=1/0,i=1/0,l=-1/0,a=-1/0,s=-1/0;for(let c=0;c<e.length;c+=3){let r=e[c],o=e[c+1],d=e[c+2];r<t&&(t=r),o<n&&(n=o),d<i&&(i=d),r>l&&(l=r),o>a&&(a=o),d>s&&(s=d)}return[t,n,i,l,a,s]}(t)}}function a(e,t){let n=e.split("\n").find(e=>e.startsWith(t));if(!n)throw Error("PLY header has no '".concat(t,"'"));let i=Number(n.trim().split(/\s+/).at(-1));if(!Number.isInteger(i)||i<0)throw Error("PLY header has a bad count for '".concat(t,"'"));return i}function s(e){let t=e.filter(e=>e.some(e=>0!==e));return 0===t.length?null:t.reduce((e,t)=>[Math.min(e[0],t[0]),Math.min(e[1],t[1]),Math.min(e[2],t[2]),Math.max(e[3],t[3]),Math.max(e[4],t[4]),Math.max(e[5],t[5])])}},41234:()=>{},51920:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>V});var i=n(95155),l=n(22454),a=n(12115),s=n(99776),c=n(80549),r=n(67161),o=n(55545);let d=(0,n(25959).v)(e=>({patientId:null,timepointIndex:0,comparisonIndex:null,selectedLesionId:null,viewMode:"COMPARE_2D",evidencePanelOpen:!1,activeEvidenceId:null,setPatient:t=>e({patientId:t,timepointIndex:0,comparisonIndex:null,selectedLesionId:null,activeEvidenceId:null}),setTimepointIndex:t=>e({timepointIndex:t}),stepTimepoint:(t,n)=>e(e=>({timepointIndex:Math.min(Math.max(e.timepointIndex+t,0),n)})),setComparisonIndex:t=>e({comparisonIndex:t}),selectLesion:t=>e({selectedLesionId:t}),setViewMode:t=>e({viewMode:t}),showEvidence:t=>e({activeEvidenceId:t,evidencePanelOpen:!0}),closeEvidence:()=>e({evidencePanelOpen:!1,activeEvidenceId:null})})),u=[{question:"WHAT_CHANGED",label:"what changed"},{question:"LARGEST_CHANGE",label:"largest change"},{question:"WHEN_LARGEST_CHANGE",label:"when"},{question:"WHAT_REMAINED_STABLE",label:"what was stable"},{question:"EVIDENCE_FOR_FINDING",label:"why this lesion",needsLesion:!0}];function x(e){var t,n,x,g;let{patientId:f}=e,{activeEvidenceId:b,selectedLesionId:v,timepointIndex:y,showEvidence:j}=d(),N=(0,s.jE)(),[w,_]=(0,a.useState)(null),[E,I]=(0,a.useState)(null),[k,A]=(0,a.useState)(!1),{data:S,isLoading:T}=(0,l.I)({queryKey:r.lH.aiObservations(f),queryFn:()=>r.FH.listAIObservations(f)}),{data:C}=(0,l.I)({queryKey:r.lH.timeline(f),queryFn:()=>r.FH.getTimeline(f)}),M=(0,c.n)({mutationFn:e=>{var t;return r.FH.askAIObservation(f,{question:e,study_id:null==C||null==(t=C.points[y])?void 0:t.study.id,lesion_id:"EVIDENCE_FOR_FINDING"===e&&null!=v?v:void 0})},onMutate:()=>{I(null)},onSuccess:e=>{_(e.observation),j(null),N.invalidateQueries({queryKey:r.lH.aiObservations(f)})},onError:e=>{I(e instanceof r.hD?e.message:"The evidence engine could not be reached.")}}),L=null!=(t=null!=w?w:null==S?void 0:S[0])?t:null,O=null==L?void 0:L.evidence_items.find(e=>e.id===b);return(0,i.jsxs)("section",{className:"shrink-0 border-t border-clinical-700 bg-clinical-800 px-4 py-2","data-testid":"evidence-panel","data-answer-id":null!=(n=null==L?void 0:L.id)?n:"","data-evidence-count":null!=(x=null==L?void 0:L.evidence_items.length)?x:0,"data-safety-status":null!=(g=null==L?void 0:L.safety_status)?g:"","data-collapsed":k,children:[(0,i.jsxs)("div",{className:"mb-1.5 flex flex-wrap items-baseline gap-x-3 gap-y-1",children:[(0,i.jsx)("h2",{className:"text-[10px] font-semibold uppercase tracking-[0.15em] text-signal-ai",children:"AI evidence"}),(0,i.jsx)("ul",{className:"flex flex-wrap gap-1",children:u.map(e=>{let{question:t,label:n,needsLesion:l}=e,a=l&&!v;return(0,i.jsx)("li",{children:(0,i.jsx)("button",{type:"button",disabled:M.isPending||a,onClick:()=>M.mutate(t),"data-testid":"ask-".concat(t),title:a?"Select a lesion first — this question is about one lesion":"Ask: ".concat(n),className:(0,o.cn)("rounded border px-2 py-0.5 text-[10px] transition-colors","border-clinical-600 text-clinical-muted",!a&&!M.isPending&&"hover:border-signal-ai/60 hover:text-clinical-text",(a||M.isPending)&&"cursor-not-allowed opacity-40"),children:n})},t)})}),L&&(0,i.jsx)(m,{observation:L,pending:M.isPending}),(0,i.jsx)("button",{type:"button",onClick:()=>A(e=>!e),"aria-expanded":!k,"aria-controls":"evidence-body","aria-label":k?"Expand the AI evidence panel":"Shrink the AI evidence panel",title:k?"Expand — give the evidence more room":"Shrink — give the images more room","data-testid":"evidence-resize",className:"ml-auto rounded border border-clinical-600 px-1.5 py-0.5 text-[11px] leading-none text-clinical-muted transition-colors hover:border-signal-ai/60 hover:text-clinical-text",children:(0,i.jsx)("span",{"aria-hidden":!0,children:k?"⤢":"\xd7"})})]}),(0,i.jsxs)("div",{id:"evidence-body","data-testid":"evidence-body",className:(0,o.cn)(k&&"max-h-20 overflow-y-auto pr-1"),children:[M.isPending?(0,i.jsx)("p",{className:"text-[11px] text-clinical-dim",children:"Assembling findings…"}):E?(0,i.jsx)("p",{className:"text-[11px] leading-relaxed text-signal-concern","data-testid":"evidence-refusal",children:E}):T?(0,i.jsx)("p",{className:"text-[11px] text-clinical-dim",children:"Loading…"}):L?(0,i.jsx)(p,{observation:L,onSelectEvidence:j,activeId:b}):(0,i.jsx)("p",{className:"text-[11px] text-clinical-dim",children:"Ask one of the five questions above. Answers are generated from the measurements on this timeline, never from the images directly."}),O&&(0,i.jsx)(h,{item:O,timeline:C})]})]})}function m(e){let{observation:t,pending:n}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"text-[9px] text-clinical-dim",children:"none"===t.llm_provider?"composed from findings":"".concat(t.llm_model)}),null!=t.confidence&&(0,i.jsxs)("span",{className:(0,o.cn)("measurement text-[9px]",(0,o.Jv)(t.confidence)),"data-testid":"answer-confidence",children:[(100*t.confidence).toFixed(0),"% confidence"]}),"PASSED"!==t.safety_status&&(0,i.jsxs)("span",{className:"text-[9px] uppercase tracking-wider text-signal-concern",children:["safety: ",t.safety_status.toLowerCase()]}),!n&&(0,i.jsx)("span",{className:"text-[9px] text-clinical-dim",children:new Date(t.created_at).toLocaleString()})]})}function p(e){let{observation:t,onSelectEvidence:n,activeId:l}=e,a=t.safety_notes.filter(e=>e.startsWith("low confidence")||e.startsWith("quality flag"));return(0,i.jsxs)("div",{className:"flex items-start gap-4",children:[(0,i.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,i.jsx)("p",{className:"border-l-2 border-signal-ai/40 pl-3 text-[11px] leading-relaxed text-clinical-text","data-testid":"answer-text",children:t.answer_text}),a.length>0&&(0,i.jsx)("ul",{className:"mt-1 pl-3 text-[9px] leading-relaxed text-signal-caution",children:a.map(e=>(0,i.jsx)("li",{children:e},e))})]}),(0,i.jsx)("ul",{className:"flex shrink-0 flex-wrap gap-1.5","data-testid":"evidence-list",children:t.evidence_items.map(e=>(0,i.jsx)("li",{children:(0,i.jsx)("button",{type:"button",onClick:()=>n(e.id),title:e.label,className:(0,o.cn)("rounded border px-2 py-1 text-[10px] transition-colors",l===e.id?"border-signal-ai bg-signal-ai/15 text-clinical-text":"border-clinical-600 text-clinical-muted hover:border-signal-ai/60 hover:text-clinical-text"),children:function(e){switch(e){case"IMAGE_REGION":return"Image region";case"SEGMENTATION":return"Segmentation";case"MEASUREMENT":return"Measurement";case"PRIOR_STUDY":return"Prior study";case"CLINICAL_EVENT":return"Clinical event";case"QUALITY_FINDING":return"Quality finding";default:return e}}(e.kind)})},e.id))})]})}function h(e){var t;let{item:n,timeline:l}=e,{closeEvidence:a,setTimepointIndex:s,selectLesion:c}=d(),r="string"==typeof n.locator.study_id?n.locator.study_id:null,o="string"==typeof n.locator.lesion_id?n.locator.lesion_id:null,u=r&&null!=(t=null==l?void 0:l.points.findIndex(e=>e.study.id===r))?t:-1;return(0,i.jsxs)("div",{className:"mt-2 flex items-start justify-between gap-4 rounded border border-signal-ai/30 bg-clinical-850 px-3 py-2",children:[(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("p",{className:"text-[11px] text-clinical-text",children:n.label}),Object.keys(n.locator).length>0&&(0,i.jsx)("p",{className:"measurement mt-0.5 text-[9px] text-clinical-dim",children:Object.entries(n.locator).filter(e=>{let[,t]=e;return null!==t}).map(e=>{let[t,n]=e;return"".concat(t,": ").concat(JSON.stringify(n))}).join(" \xb7 ")})]}),(0,i.jsxs)("div",{className:"flex shrink-0 items-center gap-3",children:[(u>=0||null!==o)&&(0,i.jsx)("button",{type:"button","data-testid":"evidence-navigate",onClick:()=>{u>=0&&s(u),o&&c(o)},className:"rounded border border-signal-ai/50 px-2 py-1 text-[10px] text-clinical-text transition-colors hover:bg-signal-ai/15",children:"show me"}),(0,i.jsx)("button",{type:"button",onClick:a,className:"text-[10px] text-clinical-muted hover:text-clinical-text",children:"close"})]})]})}function g(e){var t;let{point:n,lesions:l}=e,{selectedLesionId:a,selectLesion:s}=d(),c=null!=(t=null==n?void 0:n.observations)?t:[];return(0,i.jsxs)("aside",{className:"flex w-72 shrink-0 flex-col border-l border-clinical-700 bg-clinical-850",children:[(0,i.jsx)("div",{className:"border-b border-clinical-700 px-3 py-2",children:(0,i.jsx)("h2",{className:"text-[10px] font-semibold uppercase tracking-[0.15em] text-clinical-muted",children:"Findings"})}),(0,i.jsx)("div",{className:"flex-1 overflow-y-auto",children:0===c.length?(0,i.jsx)("p",{className:"px-3 py-4 text-[11px] text-clinical-dim",children:"No findings recorded at this timepoint."}):(0,i.jsx)("ul",{className:"divide-y divide-clinical-800",children:c.map(e=>{var t,n;let c=l.find(t=>t.id===e.lesion_id),r=(0,o.S5)(e,"VOLUME"),d=(0,o.S5)(e,"LARGEST_DIAMETER"),u=(0,o.S5)(e,"VOLUME_CHANGE_REL"),x=(0,o.S5)(e,"GROWTH_RATE"),m=a===e.lesion_id,p=e.quality_flags.includes("MATCH_UNCERTAIN")||e.quality_flags.includes("WEAK_SCORE")||e.quality_flags.includes("AMBIGUOUS_ALTERNATIVE");return(0,i.jsx)("li",{children:(0,i.jsxs)("button",{type:"button",onClick:()=>s(m?null:e.lesion_id),"data-testid":"finding-row","data-lesion-id":null!=(t=e.lesion_id)?t:"",className:(0,o.cn)("w-full px-3 py-2.5 text-left transition-colors",m?"bg-clinical-750":"hover:bg-clinical-800"),children:[(0,i.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,i.jsx)("span",{className:"measurement text-xs font-semibold text-clinical-text",children:null!=(n=null==c?void 0:c.label)?n:"Lesion"}),(0,i.jsx)("span",{className:"text-[9px] uppercase tracking-wider text-clinical-dim",children:e.compartment.toLowerCase().replaceAll("_"," ")})]}),(null==c?void 0:c.anatomy_region)&&(0,i.jsx)("p",{className:"mt-0.5 text-[10px] text-clinical-muted",children:c.anatomy_region}),(0,i.jsxs)("dl",{className:"mt-2 space-y-1",children:[r&&(0,i.jsx)(f,{label:"Volume",children:(0,i.jsx)("span",{className:"measurement text-clinical-text",children:(0,o.s8)(r)})}),d&&(0,i.jsx)(f,{label:"Diameter",children:(0,i.jsx)("span",{className:"measurement text-clinical-text",children:(0,o.s8)(d)})}),u&&(0,i.jsx)(f,{label:"Change",children:(0,i.jsxs)("span",{className:(0,o.cn)("measurement",p?"text-clinical-dim line-through decoration-clinical-500/60":(0,o.Tu)(u.value,e.quality_flags)),title:p?"This lesion may not be the same one measured previously, so the change may compare two different findings.":void 0,children:[(0,o.s8)(u),(0,i.jsxs)("span",{className:"ml-1 text-clinical-dim",children:["/ ",(0,o.vy)(e.interval_days)]})]})}),x&&(0,i.jsx)(f,{label:"Rate",children:(0,i.jsx)("span",{className:"measurement text-clinical-muted",children:(0,o.s8)(x)})}),(0,i.jsx)(f,{label:"Confidence",children:(0,i.jsx)("span",{className:(0,o.cn)("measurement",(0,o.Jv)(e.confidence)),children:null!=e.confidence?"".concat((100*e.confidence).toFixed(0),"%"):"—"})})]}),p&&u&&(0,i.jsx)("p",{className:"mt-2 border-l-2 border-signal-uncertain/60 pl-2 text-[9px] leading-tight text-signal-uncertain",children:"This may not be the same lesion as before. Treat the change with caution."}),e.quality_flags.length>0&&(0,i.jsx)("ul",{className:"mt-2 space-y-0.5 border-t border-clinical-800 pt-2",children:e.quality_flags.map(e=>(0,i.jsx)("li",{className:"text-[9px] leading-tight text-signal-uncertain",children:(0,o.Wt)(e)},e))})]})},e.id)})})}),(0,i.jsx)("p",{className:"border-t border-clinical-700 px-3 py-2 text-[9px] leading-snug text-clinical-dim",children:"Measured change only. MEDTRACE does not assess tumour progression or treatment response."})]})}function f(e){let{label:t,children:n}=e;return(0,i.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,i.jsx)("dt",{className:"text-[10px] text-clinical-muted",children:t}),(0,i.jsx)("dd",{className:"text-[11px]",children:n})]})}function b(e){var t,n;let{patient:a,selector:s}=e,{data:c}=(0,l.I)({queryKey:r.lH.health,queryFn:r.FH.health,refetchInterval:3e4}),d=(null==c?void 0:c.status)==="ok";return(0,i.jsxs)("header",{className:"flex shrink-0 items-center gap-4 border-b border-clinical-700 bg-clinical-850 px-4 py-2",children:[(0,i.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,i.jsx)("span",{className:"text-sm font-semibold tracking-[0.2em] text-clinical-text",children:"MEDTRACE"}),(0,i.jsx)("span",{className:"text-[10px] uppercase tracking-wider text-clinical-dim",children:"research prototype"})]}),(0,i.jsx)("div",{className:"h-4 w-px bg-clinical-700"}),s,a?(0,i.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[(0,i.jsxs)("span",{className:"text-clinical-muted",children:[null!=(t=a.sex)?t:"—",a.age_at_baseline_years?", ".concat(a.age_at_baseline_years," y"):""]}),(0,i.jsxs)("span",{className:"text-clinical-dim",children:[a.study_count," studies \xb7 ",a.lesion_count," lesions"]}),a.is_synthetic&&(0,i.jsx)("span",{className:"rounded border border-signal-uncertain/50 bg-signal-uncertain/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-signal-uncertain",children:"synthetic"})]}):(0,i.jsx)("span",{className:"text-xs text-clinical-dim",children:"No patient selected"}),(0,i.jsxs)("div",{className:"ml-auto flex items-center gap-4",children:[(0,i.jsx)("p",{className:"max-w-md text-right text-[10px] leading-tight text-clinical-dim",children:"Not for diagnosis or treatment. All clinical decisions remain with qualified healthcare professionals."}),(0,i.jsxs)("div",{className:"flex items-center gap-1.5",title:(n=c)?n.services.map(e=>"".concat(e.name,": ").concat(e.healthy?"ok":"unavailable")).join("\n"):"Checking services",children:[(0,i.jsx)("span",{className:(0,o.cn)("size-1.5 rounded-full",d?"bg-signal-stable":"bg-signal-concern")}),(0,i.jsx)("span",{className:"text-[10px] uppercase tracking-wider text-clinical-dim",children:c?d?"services ok":"degraded":"checking"})]})]})]})}function v(e){var t;let{patients:n,selectedId:l,onSelect:s}=e,[c,r]=(0,a.useState)(!1),[d,u]=(0,a.useState)(""),x=(0,a.useMemo)(()=>[...n].sort((e,t)=>t.study_count-e.study_count),[n]),m=(0,a.useMemo)(()=>{let e=d.trim().toLowerCase();return e?x.filter(t=>t.external_id.toLowerCase().includes(e)||t.source_dataset.toLowerCase().includes(e)):x},[x,d]),p=n.find(e=>e.id===l);return(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsxs)("button",{type:"button",onClick:()=>r(e=>!e),className:"flex items-center gap-2 rounded border border-clinical-600 px-2 py-1 text-[11px] text-clinical-text transition-colors hover:border-clinical-500",children:[(0,i.jsx)("span",{className:"measurement",children:null!=(t=null==p?void 0:p.external_id)?t:"Select patient"}),(0,i.jsx)("span",{className:"text-clinical-dim",children:c?"▲":"▼"})]}),c&&(0,i.jsxs)("div",{className:"absolute left-0 top-full z-50 mt-1 w-80 rounded border border-clinical-600 bg-clinical-850 shadow-xl",children:[(0,i.jsx)("input",{autoFocus:!0,value:d,onChange:e=>u(e.target.value),placeholder:"Filter by id or dataset",className:"w-full border-b border-clinical-700 bg-clinical-900 px-2 py-1.5 text-[11px] text-clinical-text placeholder:text-clinical-dim focus:outline-none"}),(0,i.jsxs)("ul",{className:"max-h-80 overflow-y-auto",children:[m.map(e=>(0,i.jsx)("li",{children:(0,i.jsxs)("button",{type:"button",onClick:()=>{s(e.id),r(!1),u("")},className:(0,o.cn)("flex w-full items-center justify-between gap-2 px-2 py-1.5 text-left text-[11px] transition-colors",e.id===l?"bg-clinical-750 text-clinical-text":"text-clinical-muted hover:bg-clinical-800"),children:[(0,i.jsx)("span",{className:"measurement",children:e.external_id}),(0,i.jsxs)("span",{className:"flex items-center gap-2 text-[9px] text-clinical-dim",children:[(0,i.jsxs)("span",{children:[e.study_count," studies"]}),(0,i.jsx)("span",{className:"uppercase tracking-wider",children:"BRATS2023_GLI"===e.source_dataset?"BraTS":e.source_dataset.toLowerCase()}),e.is_synthetic&&(0,i.jsx)("span",{className:"text-signal-uncertain",children:"synthetic"})]})]})},e.id)),0===m.length&&(0,i.jsx)("li",{className:"px-2 py-3 text-[11px] text-clinical-dim",children:"No match"})]}),(0,i.jsxs)("p",{className:"border-t border-clinical-700 px-2 py-1.5 text-[9px] text-clinical-dim",children:[n.length," patients \xb7 sorted by number of timepoints"]})]})]})}function y(e){let{points:t}=e,{timepointIndex:n,comparisonIndex:l,setTimepointIndex:a,setComparisonIndex:s}=d(),c=null!=l?l:n>0?n-1:null;return(0,i.jsxs)("aside",{className:"flex w-52 shrink-0 flex-col border-r border-clinical-700 bg-clinical-850",children:[(0,i.jsx)("div",{className:"border-b border-clinical-700 px-3 py-2",children:(0,i.jsx)("h2",{className:"text-[10px] font-semibold uppercase tracking-[0.15em] text-clinical-muted",children:"Studies"})}),(0,i.jsx)("ol",{className:"flex-1 overflow-y-auto",children:t.map((e,t)=>{var l,r;let d=t===n,u=e.study.quality,x=null!=(l=null==u?void 0:u.flags.length)?l:0;return(0,i.jsx)("li",{children:(0,i.jsxs)("button",{type:"button",onClick:()=>a(t),onContextMenu:e=>{e.preventDefault(),s(t===n?null:t)},"aria-current":d?"true":void 0,className:(0,o.cn)("flex w-full flex-col gap-1 border-l-2 px-3 py-2 text-left transition-colors",d?"border-l-signal-info bg-clinical-750":"border-l-transparent hover:bg-clinical-800"),children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)("span",{className:"measurement text-xs text-clinical-text",children:e.study.timepoint_label}),e.study.is_reference&&(0,i.jsx)("span",{className:"text-[9px] uppercase tracking-wider text-clinical-dim",title:"Reference study — others are registered onto this one",children:"ref"})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2 text-[10px]",children:[(0,i.jsx)("span",{className:(0,o.uA)(null==u?void 0:u.status),children:null!=(r=null==u?void 0:u.status.toLowerCase())?r:"not assessed"}),(null==u?void 0:u.confidence)!=null&&(0,i.jsxs)("span",{className:"measurement text-clinical-dim",children:[(100*u.confidence).toFixed(0),"%"]})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-clinical-dim",children:[(0,i.jsx)("span",{children:(0,o.vy)(e.study.days_from_baseline)}),e.observations.length>0&&(0,i.jsxs)("span",{children:[e.observations.length," obs"]}),x>0&&(0,i.jsxs)("span",{className:"text-signal-uncertain",children:[x," flag",x>1?"s":""]})]}),t===c&&!d&&(0,i.jsx)("span",{className:"text-[9px] uppercase tracking-wider text-signal-info",children:"comparing against"})]})},e.study.id)})}),(0,i.jsx)("p",{className:"border-t border-clinical-700 px-3 py-2 text-[9px] leading-snug text-clinical-dim",children:"Click to select. Right-click to set the comparison study."})]})}function j(e){var t;let{points:n}=e,{timepointIndex:l,setTimepointIndex:s,stepTimepoint:c}=d(),r=n.length-1;if((0,a.useEffect)(()=>{function e(e){let t=e.target;t&&["INPUT","TEXTAREA"].includes(t.tagName)||("ArrowLeft"===e.key?(e.preventDefault(),c(-1,r)):"ArrowRight"===e.key&&(e.preventDefault(),c(1,r)))}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[c,r]),0===n.length)return null;let u=n.map(e=>{var t;return null!=(t=e.study.days_from_baseline)?t:0}),x=Math.max(...u)||1,m=e=>u[e]/x*100,p=n[l],h=new Set,g=-1/0;for(let e=0;e<n.length;e+=1){let t=m(e);(0===e||e===n.length-1||t-g>=6)&&(h.add(e),g=t)}return h.add(l),(0,i.jsxs)("section",{className:"shrink-0 border-t border-clinical-700 bg-clinical-850 px-4 pb-3 pt-2",children:[(0,i.jsxs)("div",{className:"mb-1 flex items-baseline justify-between",children:[(0,i.jsx)("h2",{className:"text-[10px] font-semibold uppercase tracking-[0.15em] text-clinical-muted",children:"Disease timeline"}),(0,i.jsxs)("div",{className:"flex items-center gap-3 text-[10px] text-clinical-dim",children:[(0,i.jsxs)("span",{className:"measurement",children:[null==p?void 0:p.study.timepoint_label," \xb7"," ",(0,o.vy)(null!=(t=null==p?void 0:p.study.days_from_baseline)?t:null)," from baseline"]}),(0,i.jsx)("span",{children:"← → to move"})]})]}),(0,i.jsxs)("div",{className:"relative h-16",children:[(0,i.jsx)("div",{className:"absolute inset-x-0 top-7 h-px bg-clinical-600"}),(0,i.jsx)("div",{className:"absolute top-7 h-px bg-signal-info",style:{width:"".concat(m(l),"%")}}),n.map((e,t)=>{let n=t===l,a=e.study.quality,c=e.events.some(e=>e.is_within_treatment_window),r=e.events.filter(e=>!e.is_within_treatment_window);return(0,i.jsxs)("button",{type:"button",onClick:()=>s(t),"aria-label":"Timepoint ".concat(e.study.timepoint_label),"aria-current":n?"true":void 0,className:"absolute top-0 flex h-16 -translate-x-1/2 flex-col items-center justify-start gap-0.5 px-2",style:{left:"".concat(m(t),"%")},children:[(0,i.jsxs)("span",{className:"flex h-6 items-end gap-0.5",children:[c&&(0,i.jsx)("span",{className:"mb-0.5 size-1.5 rotate-45 bg-signal-uncertain",title:"Within 3 months of radiotherapy — progression cannot be assessed"}),r.map(e=>(0,i.jsx)("span",{className:"mb-0.5 size-1.5 rounded-full bg-clinical-500",title:e.label},e.id))]}),(0,i.jsx)("span",{className:(0,o.cn)("size-2.5 rounded-full border-2 transition-all",n?"scale-125 border-signal-info bg-signal-info":"border-clinical-500 bg-clinical-850")}),h.has(t)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:(0,o.cn)("measurement mt-0.5 text-[9px] whitespace-nowrap",n?"text-clinical-text":"text-clinical-dim"),children:e.study.timepoint_label.replace("week-","w")}),(0,i.jsx)("span",{className:(0,o.cn)("text-[8px]",(0,o.uA)(null==a?void 0:a.status)),children:(null==a?void 0:a.status)==="READY"?"":null==a?void 0:a.status.toLowerCase()})]})]},e.study.id)})]}),(0,i.jsx)("label",{className:"sr-only",htmlFor:"time-scrubber",children:"Disease timeline position"}),(0,i.jsx)("input",{id:"time-scrubber",type:"range",min:0,max:r,step:1,value:l,onChange:e=>s(Number(e.target.value)),className:"w-full accent-signal-info"}),p&&p.events.length>0&&(0,i.jsx)("ul",{className:"mt-1.5 flex flex-wrap gap-x-4 gap-y-1",children:p.events.map(e=>(0,i.jsxs)("li",{className:(0,o.cn)("text-[10px]",e.is_within_treatment_window?"text-signal-uncertain":"text-clinical-muted"),children:[(0,i.jsx)("span",{className:"uppercase tracking-wider text-clinical-dim",children:e.event_type.toLowerCase().replaceAll("_"," ")})," ",e.label]},e.id))})]})}var N=n(67909),w=n(85330);function _(e){let{settings:t,onChange:n,available:l}=e;return(0,i.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,i.jsx)("button",{type:"button",disabled:!l,onClick:()=>n({...t,visible:!t.visible}),title:l?"Show the tumour segmentation over the image":"No mask aligned to this sequence. Try T1C, or see the 3D view.",className:(0,o.cn)("rounded px-2 py-0.5 text-[10px] uppercase tracking-wider transition-colors",l?t.visible?"bg-signal-info/20 text-signal-info":"text-clinical-dim hover:text-clinical-muted":"text-clinical-700"),children:"mask"}),l&&t.visible&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{type:"button",onClick:()=>n({...t,outlineOnly:!t.outlineOnly}),title:t.outlineOnly?"Outline only — the tissue under the mask stays visible":"Filled — hides the tissue it describes",className:"rounded px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-clinical-dim transition-colors hover:text-clinical-muted",children:t.outlineOnly?"outline":"filled"}),!t.outlineOnly&&(0,i.jsxs)("label",{className:"flex items-center gap-1 text-[9px] text-clinical-dim",children:[(0,i.jsx)("span",{className:"sr-only",children:"Mask opacity"}),(0,i.jsx)("input",{type:"range",min:.1,max:.9,step:.05,value:t.opacity,onChange:e=>n({...t,opacity:Number(e.target.value)}),className:"w-16 accent-signal-info"}),Math.round(100*t.opacity),"%"]}),(0,i.jsx)("span",{className:"flex items-center gap-1.5 pl-1",children:[1,2,3].map(e=>(0,i.jsxs)("span",{className:"flex items-center gap-1 text-[9px]",children:[(0,i.jsx)("span",{className:"size-2 rounded-sm",style:{backgroundColor:"rgb(".concat(w.B[e].slice(0,3).join(","),")")},"aria-hidden":!0}),(0,i.jsx)("span",{className:"text-clinical-dim",children:w.eW[e]})]},e))})]})]})}function E(e,t){let[n,i]=(0,a.useState)(e);return(0,a.useEffect)(()=>{if(e===n)return;let l=setTimeout(()=>i(e),t);return()=>clearTimeout(l)},[e,n,t]),n}let I=(0,N.default)(()=>Promise.all([n.e(987),n.e(178),n.e(199)]).then(n.bind(n,22199)).then(e=>e.NiftiViewport),{loadableGenerated:{webpack:()=>[22199]},ssr:!1,loading:()=>(0,i.jsx)("div",{className:"flex size-full items-center justify-center bg-black",children:(0,i.jsx)("p",{className:"text-[10px] uppercase tracking-[0.2em] text-clinical-dim",children:"initialising viewer"})})}),k=(0,N.default)(()=>Promise.all([n.e(987),n.e(178),n.e(534)]).then(n.bind(n,31534)).then(e=>e.ViewerMemory),{loadableGenerated:{webpack:()=>[31534]},ssr:!1}),A=(0,N.default)(()=>Promise.all([n.e(987),n.e(178),n.e(808)]).then(n.bind(n,5808)).then(e=>e.SliceSyncToggle),{loadableGenerated:{webpack:()=>[5808]},ssr:!1}),S=(0,N.default)(()=>Promise.all([n.e(481),n.e(405)]).then(n.bind(n,3405)).then(e=>e.EvolutionViewport),{loadableGenerated:{webpack:()=>[3405]},ssr:!1,loading:()=>(0,i.jsx)("div",{className:"flex min-h-0 flex-1 items-center justify-center bg-clinical-900",children:(0,i.jsx)("p",{className:"text-[10px] uppercase tracking-[0.2em] text-clinical-dim",children:"loading 3D renderer"})})}),T=["T1C","T1","T2","FLAIR"],C=["axial","coronal","sagittal"];function M(e){var t,n;let{current:s,comparison:c,lesionLabels:o}=e,{viewMode:u,setViewMode:x}=d(),[m,p]=(0,a.useState)("T1C"),[h,g]=(0,a.useState)("axial"),[f,b]=(0,a.useState)({visible:!0,outlineOnly:!0,opacity:.4}),{data:v}=(0,l.I)({queryKey:r.lH.study(null!=(n=null==s?void 0:s.study.id)?n:"none"),queryFn:()=>r.FH.getStudy(s.study.id),enabled:!!s}),y=!!(null==v||null==(t=v.series.find(e=>e.sequence===m))?void 0:t.has_mask);return(0,i.jsxs)("section",{className:"flex min-w-0 flex-1 flex-col bg-clinical-900",children:[(0,i.jsxs)("div",{className:"flex shrink-0 flex-wrap items-center gap-1 border-b border-clinical-700 bg-clinical-850 px-2 py-1.5",children:[(0,i.jsx)(L,{mode:"COMPARE_2D",active:u,onSelect:x,children:"2D comparison"}),(0,i.jsx)(L,{mode:"EVOLUTION_3D",active:u,onSelect:x,children:"3D evolution"}),"COMPARE_2D"===u&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"mx-1 h-4 w-px bg-clinical-700"}),(0,i.jsx)(O,{options:T,value:m,onChange:p}),(0,i.jsx)("span",{className:"mx-1 h-4 w-px bg-clinical-700"}),(0,i.jsx)(O,{options:C,value:h,onChange:g}),(0,i.jsx)("span",{className:"mx-1 h-4 w-px bg-clinical-700"}),(0,i.jsx)(A,{}),(0,i.jsx)("span",{className:"mx-1 h-4 w-px bg-clinical-700"}),(0,i.jsx)(_,{settings:f,onChange:b,available:y}),(0,i.jsx)("span",{className:"ml-auto text-[9px] text-clinical-dim",children:"drag: window/level \xb7 wheel: scroll \xb7 right-drag: zoom \xb7 middle: pan"}),(0,i.jsx)(k,{})]})]}),"COMPARE_2D"===u?(0,i.jsxs)("div",{className:"grid min-h-0 flex-1 grid-cols-2 gap-px bg-clinical-700","data-testid":"viewer-grid",children:[(0,i.jsx)(R,{pane:"prior",label:"Prior",point:c,sequence:m,orientation:h,maskSettings:f}),(0,i.jsx)(R,{pane:"current",label:"Current",point:s,sequence:m,orientation:h,maskSettings:f})]}):(0,i.jsx)(H,{current:s,comparison:c,lesionLabels:o})]})}function L(e){let{mode:t,active:n,onSelect:l,children:a}=e;return(0,i.jsx)("button",{type:"button",onClick:()=>l(t),className:(0,o.cn)("rounded px-2.5 py-1 text-[11px] transition-colors",n===t?"bg-clinical-700 text-clinical-text":"text-clinical-muted hover:bg-clinical-800"),children:a})}function O(e){let{options:t,value:n,onChange:l}=e;return(0,i.jsx)("div",{className:"flex gap-0.5",children:t.map(e=>(0,i.jsx)("button",{type:"button",onClick:()=>l(e),className:(0,o.cn)("rounded px-2 py-0.5 text-[10px] uppercase tracking-wider transition-colors",n===e?"bg-signal-info/20 text-signal-info":"text-clinical-dim hover:text-clinical-muted"),children:e},e))})}function R(e){var t,n,s,c,d,u;let{pane:x,label:m,point:p,sequence:h,orientation:g,maskSettings:f}=e,[b,v]=(0,a.useState)({state:"idle"}),[y,j]=(0,a.useState)(null),{data:N}=(0,l.I)({queryKey:r.lH.study(null!=(n=null==p?void 0:p.study.id)?n:"none"),queryFn:()=>r.FH.getStudy(p.study.id),enabled:!!p}),w=null==N?void 0:N.series.find(e=>e.sequence===h),_=null!=(s=null==p||null==(t=p.study.quality)?void 0:t.flags)?s:[],k=(null==w?void 0:w.has_file)?(0,r.VX)(w.id):void 0,A=E(k,400),S=E((null==w?void 0:w.has_mask)?(0,r.Fc)(w.id):void 0,400),T=E((null==w?void 0:w.has_mask)?w.id:void 0,400),C=null!==y&&void 0!==w&&y===k;return(0,i.jsxs)("div",{className:"relative flex min-h-0 flex-col bg-clinical-900","data-pane":x,"data-expected-study":null!=(c=null==p?void 0:p.study.id)?c:"","data-expected-series":null!=(d=null==w?void 0:w.id)?d:"","data-showing-correct-study":C?"true":"false",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between gap-2 px-2 py-1 text-[10px]",children:[(0,i.jsx)("span",{className:"uppercase tracking-wider text-clinical-muted",children:m}),(0,i.jsxs)("span",{className:"flex items-center gap-1.5",children:[p&&(null==w?void 0:w.has_file)&&(0,i.jsx)("span",{title:C?"Displaying ".concat(p.study.timepoint_label,", ").concat(h):"Image not yet loaded for this timepoint",className:(0,o.cn)("size-1.5 rounded-full",C?"bg-signal-stable":"bg-signal-uncertain")}),(0,i.jsx)("span",{className:"measurement text-clinical-text",children:null!=(u=null==p?void 0:p.study.timepoint_label)?u:"—"}),(0,i.jsx)("span",{className:"text-clinical-dim",children:p?h:""})]})]}),(0,i.jsxs)("div",{className:"relative min-h-0 flex-1 border-t border-clinical-800",children:[(0,i.jsx)(I,{pane:x,fileUrl:A,orientation:g,mask:{url:S,key:T,visible:f.visible,outlineOnly:f.outlineOnly,opacity:f.opacity},onStatusChange:v,onRenderedChange:j}),!p&&(0,i.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-clinical-900",children:(0,i.jsx)("p",{className:"text-[11px] text-clinical-dim",children:"No comparison study at this position"})}),p&&!N&&(0,i.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-clinical-900",children:(0,i.jsx)("p",{className:"text-[10px] text-clinical-dim",children:"loading study"})}),p&&N&&!w&&(0,i.jsx)("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center bg-clinical-900",children:(0,i.jsxs)("p",{className:"text-[11px] text-signal-uncertain",children:[h," not acquired at this timepoint"]})}),p&&w&&!w.has_file&&(0,i.jsx)("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center bg-clinical-900",children:(0,i.jsxs)("p",{className:"max-w-[80%] text-center text-[11px] leading-relaxed text-clinical-dim",children:["No imaging data for this series.",(0,i.jsx)("br",{}),(0,i.jsx)("span",{className:"text-[10px]",children:"Metadata only — this patient has no pixel data on disk."})]})}),w&&(0,i.jsx)(F,{study:N,sequence:h,status:b}),_.length>0&&(0,i.jsx)("ul",{className:"pointer-events-none absolute right-2 top-2 max-w-[15rem] space-y-1 text-right",children:_.map(e=>(0,i.jsx)("li",{className:"text-[9px] leading-tight text-signal-uncertain",children:(0,o.Wt)(e)},e))})]})]})}function F(e){let{study:t,sequence:n,status:l}=e,a=null==t?void 0:t.series.find(e=>e.sequence===n);if(!a)return null;let s=a.voxel_spacing_mm;return(0,i.jsxs)("dl",{className:"pointer-events-none absolute bottom-2 left-2 space-y-0.5 text-[9px] text-clinical-dim",children:[(0,i.jsxs)("div",{className:"measurement",children:[a.columns,"\xd7",a.rows,"\xd7",a.slice_count,"ready"===l.state&&" \xb7 ".concat(l.slices," slices loaded")]}),s&&(0,i.jsxs)("div",{className:"measurement",children:[s.map(e=>e.toFixed(2)).join(" \xd7 ")," mm"]}),(0,i.jsxs)("div",{className:"measurement",children:[a.field_strength_t?"".concat(a.field_strength_t," T"):"field strength unknown",a.manufacturer?" \xb7 ".concat(a.manufacturer.trim()):"",a.scanner_model?" ".concat(a.scanner_model.trim()):""]})]})}let D=["MATCH_UNCERTAIN","WEAK_SCORE","AMBIGUOUS_ALTERNATIVE"];function q(e,t){let n=e.measurements.find(e=>e.kind===t);return n?n.value:null}function P(e,t){return e?e.observations.filter(e=>e.has_mesh).map(e=>{var n,i;return{observationId:e.id,lesionId:e.lesion_id,lesionLabel:e.lesion_id&&null!=(n=t.get(e.lesion_id))?n:"—",relativeChange:q(e,"VOLUME_CHANGE_REL"),correspondenceDoubtful:e.quality_flags.some(e=>D.includes(e)),volumeCm3:null!=(i=q(e,"VOLUME"))?i:0}}):[]}function H(e){var t,n,s,c;let{current:u,comparison:x,lesionLabels:m}=e,{selectedLesionId:p,selectLesion:h}=d(),[g,f]=(0,a.useState)(!0),b=P(u,m),v=P(x,m),{data:y}=(0,l.I)({queryKey:r.lH.segmentations(null!=(n=null==u?void 0:u.study.id)?n:"none"),queryFn:()=>r.FH.listStudySegmentations(u.study.id),enabled:!!u}),j=null!=(s=null==y||null==(t=y.find(e=>e.has_mesh))?void 0:t.id)?s:null;return(0,i.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,i.jsxs)("div",{className:"flex shrink-0 items-center gap-2 border-b border-clinical-800 px-2 py-1 text-[10px]",children:[(0,i.jsx)("span",{className:"uppercase tracking-wider text-clinical-muted",children:"3D evolution"}),(0,i.jsx)("span",{className:"measurement text-clinical-text",children:null!=(c=null==u?void 0:u.study.timepoint_label)?c:"—"}),(0,i.jsx)("button",{type:"button",onClick:()=>f(e=>!e),disabled:0===v.length,title:0===v.length?"No comparison surfaces at this position":"Show the comparison timepoint as an outline",className:(0,o.cn)("rounded px-2 py-0.5 uppercase tracking-wider transition-colors",0===v.length?"text-clinical-700":g?"bg-signal-info/20 text-signal-info":"text-clinical-dim hover:text-clinical-muted"),children:"prior outline"}),(0,i.jsx)("span",{className:"ml-auto text-[9px] text-clinical-dim",children:x?"compared against ".concat(x.study.timepoint_label):"baseline — nothing to compare against"})]}),(0,i.jsx)(S,{current:b,prior:v,showPrior:g&&v.length>0,selectedLesionId:p,onSelectLesion:h,brainSegmentationId:j})]})}function V(){var e,t;let{patientId:n,setPatient:s,timepointIndex:c,comparisonIndex:o}=d(),{data:u,isLoading:m,error:p}=(0,l.I)({queryKey:r.lH.patients,queryFn:()=>r.FH.listPatients(500)});(0,a.useEffect)(()=>{!n&&(null==u?void 0:u.length)&&s([...u].sort((e,t)=>t.study_count-e.study_count)[0].id)},[n,u,s]);let{data:h,isLoading:f}=(0,l.I)({queryKey:r.lH.timeline(null!=n?n:"none"),queryFn:()=>r.FH.getTimeline(n),enabled:!!n}),N=null!=(e=null==h?void 0:h.points)?e:[],w=N[c],_=null!=o?N[o]:c>0?N[c-1]:void 0,E=(0,a.useMemo)(()=>{var e;return new Map((null!=(e=null==h?void 0:h.lesions)?e:[]).map(e=>[e.id,e.label]))},[null==h?void 0:h.lesions]);return(0,i.jsxs)("main",{className:"flex h-screen flex-col overflow-hidden",children:[(0,i.jsx)(b,{patient:null==h?void 0:h.patient,selector:u&&u.length>0?(0,i.jsx)(v,{patients:u,selectedId:n,onSelect:s}):null}),p?(0,i.jsx)(G,{title:"Cannot reach the API",detail:"Start the backend with: make api"}):m||f?(0,i.jsx)(G,{title:"Loading patient"}):0===N.length?(0,i.jsx)(G,{title:"No patients",detail:"Seed the demonstration patient with: make seed"}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex min-h-0 flex-1",children:[(0,i.jsx)(y,{points:N}),(0,i.jsx)(M,{current:w,comparison:_,lesionLabels:E}),(0,i.jsx)(g,{point:w,lesions:null!=(t=null==h?void 0:h.lesions)?t:[]})]}),(0,i.jsx)(j,{points:N}),n&&(0,i.jsx)(x,{patientId:n})]})]})}function G(e){let{title:t,detail:n}=e;return(0,i.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center gap-2",children:[(0,i.jsx)("p",{className:"text-sm text-clinical-muted",children:t}),n&&(0,i.jsx)("code",{className:"text-[11px] text-clinical-dim",children:n})]})}},55545:(e,t,n)=>{"use strict";n.d(t,{Jv:()=>d,S5:()=>x,Tu:()=>o,Wt:()=>c,cn:()=>a,s8:()=>u,uA:()=>r,vy:()=>m});var i=n(2821),l=n(75889);function a(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,l.QP)((0,i.$)(t))}let s={MISSING_SEQUENCE:"A required sequence is missing",THICK_SLICES:"Thick slices limit volumetric accuracy",MIXED_FIELD_STRENGTH:"Sequences acquired at different field strengths",MIXED_MANUFACTURER:"Sequences acquired on different scanners",DIFFERENT_PROTOCOL_FROM_PRIOR:"Different acquisition protocol from the prior study",SPACING_HEADER_MISMATCH:"Voxel spacing disagrees with the file header",REGISTRATION_UNCERTAINTY:"Alignment to the prior study is uncertain",POST_OPERATIVE_ANATOMY:"Post-operative anatomy",WITHIN_TREATMENT_WINDOW:"Within 3 months of radiotherapy",NON_MEASURABLE_LESION:"Lesion too small or diffuse to measure reliably",SEGMENTATION_DISAGREEMENT:"Segmentation sources disagree"};function c(e){var t;return null!=(t=s[e])?t:e.toLowerCase().replaceAll("_"," ")}function r(e){switch(e){case"READY":return"text-signal-stable";case"DEGRADED":return"text-signal-uncertain";case"UNUSABLE":return"text-signal-concern";default:return"text-clinical-dim"}}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.includes("WITHIN_TREATMENT_WINDOW")||t.includes("REGISTRATION_UNCERTAINTY")||t.includes("DIFFERENT_PROTOCOL_FROM_PRIOR")?"text-signal-uncertain":e>=.25?"text-signal-concern":e>=.1?"text-signal-change":e<=-.1?"text-signal-stable":"text-clinical-text"}function d(e){return null===e?"text-clinical-dim":e>=.85?"text-signal-stable":e>=.7?"text-signal-uncertain":"text-signal-concern"}function u(e){let{value:t,unit:n,uncertainty:i}=e;if("ratio"===n)return"".concat(t>=0?"+":"").concat((100*t).toFixed(1),"%");let l=Math.abs(t)>=100?0:1,a="".concat(t.toFixed(l)," ").concat(function(e){switch(e){case"cm3":return"cm\xb3";case"mm3":return"mm\xb3";case"cm3/month":return"cm\xb3/month";default:return e}}(n));return i?"".concat(a," \xb1 ").concat(i.toFixed(l)):a}function x(e,t){return null==e?void 0:e.measurements.find(e=>e.kind===t)}function m(e){if(null===e)return"interval unknown";if(e<14)return"".concat(e," d");let t=Math.round(e/7);return t<9?"".concat(t," wk"):"".concat((e/30.44).toFixed(1)," mo")}},59750:(e,t,n)=>{Promise.resolve().then(n.bind(n,51920))},67161:(e,t,n)=>{"use strict";n.d(t,{hD:()=>r,FH:()=>f,V$:()=>g,s4:()=>p,lH:()=>b,VX:()=>u,Fc:()=>x});var i=n(83846),l=n(35623);let a="https://huggingface.co/datasets/AIOmarRehan/medtrace-rhuh-gbm-derived/resolve/main";function s(e,t,n){return"".concat(a,"/").concat(e,"/").concat(t).concat(n)}let c={seriesFile:e=>s("images",e,".nii.gz"),seriesMask:e=>s("masks",e,".nii.gz"),segmentationVolume:e=>s("volumes",e,".nii.gz"),observationMesh:e=>s("meshes",e,".ply")};class r extends Error{constructor(e,t){super(e),this.status=t,this.name="ApiError"}}async function o(e,t){var n;let i=await fetch(e,{headers:{Accept:"application/json"},cache:"no-store"});if(!i.ok)throw new r("Recorded response for ".concat(t," is missing (").concat(i.status,")"),i.status);let l=await i.json();if("object"==typeof l&&null!==l&&"number"==typeof l.__recorded_status)throw new r(null!=(n=l.detail)?n:"Request to ".concat(t," failed with ").concat(l.__recorded_status),l.__recorded_status);return l}async function d(e,t){{let t=function(e){let[t]=e.split("?");if("/health"===t)return"".concat("api","/health.json");if("/api/v1/patients"===t)return"".concat("api","/patients.json");let n=t.match(/^\/api\/v1\/patients\/([^/]+)\/timeline$/);if(n)return"".concat("api","/timeline/").concat(n[1],".json");let i=t.match(/^\/api\/v1\/patients\/([^/]+)\/ai-observations$/);if(i)return"".concat("api","/ai-observations/").concat(i[1],".json");let l=t.match(/^\/api\/v1\/studies\/([^/]+)\/segmentations$/);if(l)return"".concat("api","/segmentations/").concat(l[1],".json");let a=t.match(/^\/api\/v1\/studies\/([^/]+)$/);if(a)return"".concat("api","/study/").concat(a[1],".json");let s=t.match(/^\/api\/v1\/lesions\/([^/]+)$/);return s?"".concat("api","/lesion/").concat(s[1],".json"):null}(e);if(null===t)throw new r("No recorded response for ".concat(e),501);return o(t,e)}}function u(e){return c.seriesFile(e)}function x(e){return c.seriesMask(e)}let m=new Map;function p(e){var t=c.observationMesh(e);let n=m.get(t);if(n)return n;let i=fetch(t).then(async e=>{if(!e.ok)throw new r("Mesh request failed with ".concat(e.status),e.status);return(0,l.V)(await e.arrayBuffer())}).catch(e=>{throw m.delete(t),e});return m.set(t,i),i}let h=new Map;function g(e){let t=c.segmentationVolume(e),n=h.get(t);if(n)return n;let l=fetch(t).then(async e=>{if(!e.ok)throw new r("Volume request failed with ".concat(e.status),e.status);return(0,i.u)(await e.arrayBuffer())}).catch(e=>{throw h.delete(t),e});return h.set(t,l),l}let f={health:()=>d("/health"),listPatients:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;return d("/api/v1/patients?limit=".concat(e))},getTimeline:e=>d("/api/v1/patients/".concat(e,"/timeline")),getStudy:e=>d("/api/v1/studies/".concat(e)),getLesion:e=>d("/api/v1/lesions/".concat(e)),listAIObservations:e=>d("/api/v1/patients/".concat(e,"/ai-observations")),askAIObservation:(e,t)=>o(function(e,t,n,i){return"".concat("api","/answers/").concat(e,"/").concat(t,"/").concat(null!=n?n:"none","/").concat(null!=i?i:"none",".json")}(e,t.question,t.study_id,t.lesion_id),"".concat(t.question," for ").concat(e)),listStudySegmentations:e=>d("/api/v1/studies/".concat(e,"/segmentations"))},b={health:["health"],patients:["patients"],timeline:e=>["timeline",e],study:e=>["study",e],lesion:e=>["lesion",e],aiObservations:e=>["ai-observations",e],segmentations:e=>["segmentations",e]}},83846:(e,t,n)=>{"use strict";function i(e){if(e.byteLength<348)throw Error("Mask is only ".concat(e.byteLength," bytes; not a NIfTI file"));let t=new DataView(e),n=!0;if(348!==t.getInt32(0,!0))if(348===t.getInt32(0,!1))n=!1;else throw Error("Mask header is not a NIfTI-1 header");let i=t.getInt16(40,n);if(i<3)throw Error("Mask has rank ".concat(i,"; a 3D volume is required"));let l=[t.getInt16(42,n),t.getInt16(44,n),t.getInt16(46,n)];if(l.some(e=>e<=0))throw Error("Mask has invalid dimensions ".concat(l.join("x")));let a=t.getInt16(70,n);if(2!==a)throw Error("Mask datatype is ".concat(a,", expected ").concat(2," (uint8). Regenerate it with link_series_masks.py"));let s=Math.round(t.getFloat32(108,n))||352,c=l[0]*l[1]*l[2],r=e.byteLength-s;if(r<c)throw Error("Mask is truncated: ".concat(r," bytes of voxel data, expected ").concat(c));return{voxels:new Uint8Array(e,s,c),dimensions:l,spacing:[t.getFloat32(80,n),t.getFloat32(84,n),t.getFloat32(88,n)].map(e=>Number.isFinite(e)&&e>0?e:1)}}function l(e){let t=i(e),n=new Set,l=0;for(let e=0;e<t.voxels.length;e+=1){let i=t.voxels[e];0!==i&&(l+=1,n.add(i))}return{...t,labels:[...n].sort((e,t)=>e-t),labelledVoxels:l}}n.d(t,{G:()=>l,u:()=>i})},85330:(e,t,n)=>{"use strict";n.d(t,{AV:()=>h,B:()=>c,Cn:()=>m,Iy:()=>p,bh:()=>o,dp:()=>v,eW:()=>r,kl:()=>b,ml:()=>g,o:()=>x,zE:()=>u});var i=n(70192),l=n(20205),a=n(83846);let{D_:s}=l.fX,c={1:[255,92,92,255],2:[110,200,255,255],3:[250,214,120,255]},r={1:"enhancing",2:"necrotic core",3:"oedema"};function o(e){return"seg-".concat(e)}let d=new Map;async function u(e,t,n){var l;let s=d.get(n);if(s&&i.PP.getVolume(n))return s;let c=await fetch(e);if(!c.ok)throw Error("Mask request failed with ".concat(c.status));let r=(0,a.G)(await c.arrayBuffer()),o=i.PP.getVolume(t);if(!o)throw Error("Image volume is not loaded, so no labelmap can be aligned to it");let u=null!=(l=o.dimensions)?l:[];if(3===u.length&&!r.dimensions.every((e,t)=>e===u[t]))throw Error("Mask grid ".concat(r.dimensions.join("x")," does not match the image ")+"".concat(u.join("x")));let x=i.UH.createAndCacheDerivedLabelmapVolume(t,{volumeId:n}).voxelManager;if(!(null==x?void 0:x.setAtIndex))throw Error("Labelmap has no writable voxel manager");for(let e=0;e<r.voxels.length;e+=1){let t=r.voxels[e];0!==t&&x.setAtIndex(e,t)}let m={voxels:r.labelledVoxels,labels:r.labels};return d.set(n,m),m}function x(e,t){l.b2.state.getSegmentation(e)||l.b2.addSegmentations([{segmentationId:e,representation:{type:s.Labelmap,data:{volumeId:t}}}])}function m(e,t,n){l.b2.addLabelmapRepresentationToViewport(e,[{segmentationId:t,type:s.Labelmap}]),h(t,n);try{l.b2.triggerSegmentationEvents.triggerSegmentationDataModified(t)}catch(e){}}function p(e,t,n){h(t,n),g(e,t);try{l.b2.triggerSegmentationEvents.triggerSegmentationDataModified(t)}catch(e){}}function h(e,t){l.b2.config.style.setStyle({type:s.Labelmap,segmentationId:e},{renderFill:!t.outlineOnly,renderOutline:!0,fillAlpha:t.opacity,outlineWidth:t.outlineOnly?2:1,outlineOpacity:1,activeSegmentOutlineWidthDelta:0})}function g(e,t){for(let[n,i]of Object.entries(c))try{l.b2.config.color.setSegmentIndexColor(e,t,Number(n),i)}catch(e){}}function f(e,t){var n,i;return(null!=(i=null==e||null==(n=e.getActors)?void 0:n.call(e))?i:[]).some(e=>e.referencedId===t||e.uid===t)}async function b(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4e3,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:16,l=Date.now()+n;for(;Date.now()<l;){if(f(e,t))return!0;await new Promise(e=>setTimeout(e,i))}return f(e,t)}function v(e,t){try{l.b2.removeSegmentationRepresentations(e,{segmentationId:t,type:s.Labelmap})}catch(e){}}}},e=>{e.O(0,[977,658,141,156,441,255,358],()=>e(e.s=59750)),_N_E=e.O()}]);
|
_next/static/chunks/compute.d10654f9aa3589b1.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
(()=>{var e={41234:()=>{}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={id:o,loaded:!1,exports:{}},i=!0;try{e[o].call(a.exports,a,a.exports,r),i=!1}finally{i&&delete t[o]}return a.loaded=!0,a.exports}r.m=e,r.x=()=>{var e=r.O(void 0,[977,658,942],()=>r(3821));return r.O(e)},r.amdD=function(){throw Error("define cannot be used indirect")},r.amdO={},(()=>{var e=[];r.O=(t,o,n,a)=>{if(o){a=a||0;for(var i=e.length;i>0&&e[i-1][2]>a;i--)e[i]=e[i-1];e[i]=[o,n,a];return}for(var c=1/0,i=0;i<e.length;i++){for(var[o,n,a]=e[i],s=!0,l=0;l<o.length;l++)(!1&a||c>=a)&&Object.keys(r.O).every(e=>r.O[e](o[l]))?o.splice(l--,1):(s=!1,a<c&&(c=a));if(s){e.splice(i--,1);var u=n();void 0!==u&&(t=u)}}return t}})(),r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,o)=>(r.f[o](e,t),t),[])),r.u=e=>977===e?"static/chunks/467ef8ee-6369ff81ae928fb4.js":658===e?"static/chunks/658-3bc27228933a69df.js":"static/chunks/"+(694===e?"compute":e)+"."+({694:"d10654f9aa3589b1",942:"1c41165479333662"})[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:e=>e},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("nextjs#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="/_next/",(()=>{r.b=self.location+"/../../../";var e={694:1};r.f.i=(t,o)=>{e[t]||importScripts(r.tu(r.p+r.u(t)))};var t=self.webpackChunk_N_E=self.webpackChunk_N_E||[],o=t.push.bind(t);t.push=t=>{var[n,a,i]=t;for(var c in a)r.o(a,c)&&(r.m[c]=a[c]);for(i&&i(r);n.length;)e[n.pop()]=1;o(t)}})(),(()=>{var e=r.x;r.x=()=>Promise.all([977,658,942].map(r.e,r)).then(e)})(),_N_E=r.x()})();
|
_next/static/chunks/framework-e180e6045d9bc50e.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
_next/static/chunks/main-599738e4e4dd0ebe.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
_next/static/chunks/main-app-674d0f61ba780985.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[358],{19393:()=>{},75591:(e,s,n)=>{Promise.resolve().then(n.t.bind(n,57150,23)),Promise.resolve().then(n.t.bind(n,81959,23)),Promise.resolve().then(n.t.bind(n,17989,23)),Promise.resolve().then(n.t.bind(n,63886,23)),Promise.resolve().then(n.t.bind(n,9766,23)),Promise.resolve().then(n.t.bind(n,15278,23)),Promise.resolve().then(n.t.bind(n,98924,23)),Promise.resolve().then(n.t.bind(n,24431,23)),Promise.resolve().then(n.bind(n,80622))}},e=>{var s=s=>e(e.s=s);e.O(0,[441,255],()=>(s(1666),s(75591))),_N_E=e.O()}]);
|
_next/static/chunks/pages/_app-0d6ce27712411be2.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[139,636],{45139:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let u=n(64252),l=n(37876),a=u._(n(14232)),o=n(1033);async function r(e){let{Component:t,ctx:n}=e;return{pageProps:await (0,o.loadGetInitialProps)(t,n)}}class s extends a.default.Component{render(){let{Component:e,pageProps:t}=this.props;return(0,l.jsx)(e,{...t})}}s.origGetInitialProps=r,s.getInitialProps=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)},50326:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(45139)}])}},e=>{var t=t=>e(e.s=t);e.O(0,[593,792],()=>(t(50326),t(6763))),_N_E=e.O()}]);
|
_next/static/chunks/pages/_error-a8479a8c7bc399cf.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[646,731],{12479:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let r=n(14232),o=r.useLayoutEffect,l=r.useEffect;function i(e){let{headManager:t,reduceComponentsToState:n}=e;function i(){if(t&&t.mountedInstances){let o=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(n(o,e))}}return o(()=>{var n;return null==t||null==(n=t.mountedInstances)||n.add(e.children),()=>{var n;null==t||null==(n=t.mountedInstances)||n.delete(e.children)}}),o(()=>(t&&(t._pendingUpdate=i),()=>{t&&(t._pendingUpdate=i)})),l(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},18438:(e,t)=>{"use strict";function n(e){let{ampFirst:t=!1,hybrid:n=!1,hasQuery:r=!1}=void 0===e?{}:e;return t||n&&r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return n}})},31646:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}});let r=n(64252),o=n(37876),l=r._(n(14232)),i=r._(n(97918)),a={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"};function d(e){let{req:t,res:n,err:r}=e;return{statusCode:n&&n.statusCode?n.statusCode:r?r.statusCode:404,hostname:window.location.hostname}}let s={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{lineHeight:"48px"},h1:{display:"inline-block",margin:"0 20px 0 0",paddingRight:23,fontSize:24,fontWeight:500,verticalAlign:"top"},h2:{fontSize:14,fontWeight:400,lineHeight:"28px"},wrap:{display:"inline-block"}};class u extends l.default.Component{render(){let{statusCode:e,withDarkMode:t=!0}=this.props,n=this.props.title||a[e]||"An unexpected error has occurred";return(0,o.jsxs)("div",{style:s.error,children:[(0,o.jsx)(i.default,{children:(0,o.jsx)("title",{children:e?e+": "+n:"Application error: a client-side exception has occurred"})}),(0,o.jsxs)("div",{style:s.desc,children:[(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}"+(t?"@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}":"")}}),e?(0,o.jsx)("h1",{className:"next-error-h1",style:s.h1,children:e}):null,(0,o.jsx)("div",{style:s.wrap,children:(0,o.jsxs)("h2",{style:s.h2,children:[this.props.title||e?n:(0,o.jsxs)(o.Fragment,{children:["Application error: a client-side exception has occurred"," ",!!this.props.hostname&&(0,o.jsxs)(o.Fragment,{children:["while loading ",this.props.hostname]})," ","(see the browser console for more information)"]}),"."]})})]})]})}}u.displayName="ErrorPage",u.getInitialProps=d,u.origGetInitialProps=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)},55066:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AmpStateContext",{enumerable:!0,get:function(){return r}});let r=n(64252)._(n(14232)).default.createContext({})},92164:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_error",function(){return n(31646)}])},97918:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return y},defaultHead:function(){return c}});let r=n(64252),o=n(88365),l=n(37876),i=o._(n(14232)),a=r._(n(12479)),d=n(55066),s=n(74324),u=n(18438);function c(e){void 0===e&&(e=!1);let t=[(0,l.jsx)("meta",{charSet:"utf-8"},"charset")];return e||t.push((0,l.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")),t}function p(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===i.default.Fragment?e.concat(i.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}n(76456);let f=["name","httpEquiv","charSet","itemProp"];function h(e,t){let{inAmpMode:n}=t;return e.reduce(p,[]).reverse().concat(c(n).reverse()).filter(function(){let e=new Set,t=new Set,n=new Set,r={};return o=>{let l=!0,i=!1;if(o.key&&"number"!=typeof o.key&&o.key.indexOf("$")>0){i=!0;let t=o.key.slice(o.key.indexOf("$")+1);e.has(t)?l=!1:e.add(t)}switch(o.type){case"title":case"base":t.has(o.type)?l=!1:t.add(o.type);break;case"meta":for(let e=0,t=f.length;e<t;e++){let t=f[e];if(o.props.hasOwnProperty(t))if("charSet"===t)n.has(t)?l=!1:n.add(t);else{let e=o.props[t],n=r[t]||new Set;("name"!==t||!i)&&n.has(e)?l=!1:(n.add(e),r[t]=n)}}}return l}}()).reverse().map((e,t)=>{let n=e.key||t;return i.default.cloneElement(e,{key:n})})}let y=function(e){let{children:t}=e,n=(0,i.useContext)(d.AmpStateContext),r=(0,i.useContext)(s.HeadManagerContext);return(0,l.jsx)(a.default,{reduceComponentsToState:h,headManager:r,inAmpMode:(0,u.isInAmpMode)(n),children:t})};("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)}},e=>{e.O(0,[636,593,792],()=>e(e.s=92164)),_N_E=e.O()}]);
|
_next/static/chunks/polyfills-42372ed130431b0a.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
_next/static/chunks/webpack-cdf507f9780ee5a2.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
(()=>{"use strict";var e={},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={id:o,loaded:!1,exports:{}},i=!0;try{e[o].call(a.exports,a,a.exports,r),i=!1}finally{i&&delete t[o]}return a.loaded=!0,a.exports}r.m=e,r.amdD=function(){throw Error("define cannot be used indirect")},r.amdO={},(()=>{var e=[];r.O=(t,o,n,a)=>{if(o){a=a||0;for(var i=e.length;i>0&&e[i-1][2]>a;i--)e[i]=e[i-1];e[i]=[o,n,a];return}for(var d=1/0,i=0;i<e.length;i++){for(var[o,n,a]=e[i],u=!0,c=0;c<o.length;c++)(!1&a||d>=a)&&Object.keys(r.O).every(e=>r.O[e](o[c]))?o.splice(c--,1):(u=!1,a<d&&(d=a));if(u){e.splice(i--,1);var l=n();void 0!==l&&(t=l)}}return t}})(),r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;r.t=function(o,n){if(1&n&&(o=this(o)),8&n||"object"==typeof o&&o&&(4&n&&o.__esModule||16&n&&"function"==typeof o.then))return o;var a=Object.create(null);r.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var d=2&n&&o;"object"==typeof d&&!~e.indexOf(d);d=t(d))Object.getOwnPropertyNames(d).forEach(e=>i[e]=()=>o[e]);return i.default=()=>o,r.d(a,i),a}})(),r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,o)=>(r.f[o](e,t),t),[])),r.u=e=>"static/chunks/"+(694===e?"compute":e)+"."+({139:"8d54880d25bc452f",178:"c399c7425cacc4ec",199:"9b66732a108fbca1",405:"19edef85d9a977c9",481:"6d33ebcca51aa184",534:"8ac9c9b001e41ba4",646:"c2c67a3e35c59670",694:"d10654f9aa3589b1",808:"846f0159cc232e21",987:"0c5b0a0d50e19d04"})[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="_N_E:";r.l=(o,n,a,i)=>{if(e[o])return void e[o].push(n);if(void 0!==a)for(var d,u,c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var f=c[l];if(f.getAttribute("src")==o||f.getAttribute("data-webpack")==t+a){d=f;break}}d||(u=!0,(d=document.createElement("script")).charset="utf-8",d.timeout=120,r.nc&&d.setAttribute("nonce",r.nc),d.setAttribute("data-webpack",t+a),d.src=r.tu(o)),e[o]=[n];var s=(t,r)=>{d.onerror=d.onload=null,clearTimeout(p);var n=e[o];if(delete e[o],d.parentNode&&d.parentNode.removeChild(d),n&&n.forEach(e=>e(r)),t)return t(r)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=s.bind(null,d.onerror),d.onload=s.bind(null,d.onload),u&&document.head.appendChild(d)}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:e=>e},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("nextjs#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="/_next/",(()=>{r.b=document.baseURI||self.location.href;var e={68:0,978:0};r.f.j=(t,o)=>{var n=r.o(e,t)?e[t]:void 0;if(0!==n)if(n)o.push(n[2]);else if(/^(6|97)8$/.test(t))e[t]=0;else{var a=new Promise((r,o)=>n=e[t]=[r,o]);o.push(n[2]=a);var i=r.p+r.u(t),d=Error();r.l(i,o=>{if(r.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.src;d.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",d.name="ChunkLoadError",d.type=a,d.request=i,n[1](d)}},"chunk-"+t,t)}},r.O.j=t=>0===e[t];var t=(t,o)=>{var n,a,[i,d,u]=o,c=0;if(i.some(t=>0!==e[t])){for(n in d)r.o(d,n)&&(r.m[n]=d[n]);if(u)var l=u(r)}for(t&&t(o);c<i.length;c++)a=i[c],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return r.O(l)},o=self.webpackChunk_N_E=self.webpackChunk_N_E||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})()})();
|
_next/static/css/d9023e9e90080539.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,"Cascadia Mono","Segoe UI Mono",Menlo,monospace;--color-black:#000;--spacing:.25rem;--container-md:28rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--font-weight-semibold:600;--tracking-normal:0em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-clinical-900:#080b12;--color-clinical-850:#0c1018;--color-clinical-800:#11161f;--color-clinical-750:#161c27;--color-clinical-700:#1d2532;--color-clinical-600:#2a3444;--color-clinical-500:#3b4759;--color-clinical-text:#e3e8ef;--color-clinical-muted:#8593a8;--color-clinical-dim:#5d6b80;--color-signal-info:#4d94ff;--color-signal-stable:#35c98b;--color-signal-uncertain:#e8c34a;--color-signal-change:#f0883e;--color-signal-concern:#f0503e;--color-signal-ai:#a877f0}}@layer base{*,::backdrop,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden}.absolute,.sr-only{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-2{top:calc(var(--spacing)*2)}.top-7{top:calc(var(--spacing)*7)}.top-28{top:calc(var(--spacing)*28)}.top-full{top:100%}.right-2{right:calc(var(--spacing)*2)}.bottom-2{bottom:calc(var(--spacing)*2)}.left-0{left:calc(var(--spacing)*0)}.left-2{left:calc(var(--spacing)*2)}.isolate{isolation:isolate}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-1{margin-inline:calc(var(--spacing)*1)}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mb-0\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\.5{margin-bottom:calc(var(--spacing)*1.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.table{display:table}.size-1\.5{width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.size-2{width:calc(var(--spacing)*2);height:calc(var(--spacing)*2)}.size-2\.5{width:calc(var(--spacing)*2.5);height:calc(var(--spacing)*2.5)}.size-full{width:100%;height:100%}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-16{height:calc(var(--spacing)*16)}.h-px{height:1px}.h-screen{height:100vh}.max-h-20{max-height:calc(var(--spacing)*20)}.max-h-80{max-height:calc(var(--spacing)*80)}.max-h-\[70\%\]{max-height:70%}.min-h-0{min-height:calc(var(--spacing)*0)}.w-16{width:calc(var(--spacing)*16)}.w-40{width:calc(var(--spacing)*40)}.w-52{width:calc(var(--spacing)*52)}.w-72{width:calc(var(--spacing)*72)}.w-80{width:calc(var(--spacing)*80)}.w-full{width:100%}.w-px{width:1px}.max-w-\[15rem\]{max-width:15rem}.max-w-\[60\%\]{max-width:60%}.max-w-\[70\%\]{max-width:70%}.max-w-\[80\%\]{max-width:80%}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-not-allowed{cursor:not-allowed}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-start{justify-content:flex-start}.gap-0\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-px{gap:1px}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing)*3)}.gap-x-4{column-gap:calc(var(--spacing)*4)}.gap-y-1{row-gap:calc(var(--spacing)*1)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-clinical-800>:not(:last-child)){border-color:var(--color-clinical-800)}.truncate{text-overflow:ellipsis;white-space:nowrap}.overflow-hidden,.truncate{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e+38px}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-clinical-500{border-color:var(--color-clinical-500)}.border-clinical-600{border-color:var(--color-clinical-600)}.border-clinical-700{border-color:var(--color-clinical-700)}.border-clinical-800{border-color:var(--color-clinical-800)}.border-signal-ai{border-color:var(--color-signal-ai)}.border-signal-ai\/30{border-color:#a877f04d}@supports (color:color-mix(in lab,red,red)){.border-signal-ai\/30{border-color:color-mix(in oklab,var(--color-signal-ai)30%,transparent)}}.border-signal-ai\/40{border-color:#a877f066}@supports (color:color-mix(in lab,red,red)){.border-signal-ai\/40{border-color:color-mix(in oklab,var(--color-signal-ai)40%,transparent)}}.border-signal-ai\/50{border-color:#a877f080}@supports (color:color-mix(in lab,red,red)){.border-signal-ai\/50{border-color:color-mix(in oklab,var(--color-signal-ai)50%,transparent)}}.border-signal-info{border-color:var(--color-signal-info)}.border-signal-uncertain\/50{border-color:#e8c34a80}@supports (color:color-mix(in lab,red,red)){.border-signal-uncertain\/50{border-color:color-mix(in oklab,var(--color-signal-uncertain)50%,transparent)}}.border-signal-uncertain\/60{border-color:#e8c34a99}@supports (color:color-mix(in lab,red,red)){.border-signal-uncertain\/60{border-color:color-mix(in oklab,var(--color-signal-uncertain)60%,transparent)}}.border-l-signal-info{border-left-color:var(--color-signal-info)}.border-l-transparent{border-left-color:#0000}.bg-black{background-color:var(--color-black)}.bg-clinical-500{background-color:var(--color-clinical-500)}.bg-clinical-600{background-color:var(--color-clinical-600)}.bg-clinical-700{background-color:var(--color-clinical-700)}.bg-clinical-750{background-color:var(--color-clinical-750)}.bg-clinical-800{background-color:var(--color-clinical-800)}.bg-clinical-850{background-color:var(--color-clinical-850)}.bg-clinical-900{background-color:var(--color-clinical-900)}.bg-clinical-900\/80{background-color:#080b12cc}@supports (color:color-mix(in lab,red,red)){.bg-clinical-900\/80{background-color:color-mix(in oklab,var(--color-clinical-900)80%,transparent)}}.bg-signal-ai\/15{background-color:#a877f026}@supports (color:color-mix(in lab,red,red)){.bg-signal-ai\/15{background-color:color-mix(in oklab,var(--color-signal-ai)15%,transparent)}}.bg-signal-concern{background-color:var(--color-signal-concern)}.bg-signal-info{background-color:var(--color-signal-info)}.bg-signal-info\/20{background-color:#4d94ff33}@supports (color:color-mix(in lab,red,red)){.bg-signal-info\/20{background-color:color-mix(in oklab,var(--color-signal-info)20%,transparent)}}.bg-signal-stable{background-color:var(--color-signal-stable)}.bg-signal-uncertain{background-color:var(--color-signal-uncertain)}.bg-signal-uncertain\/10{background-color:#e8c34a1a}@supports (color:color-mix(in lab,red,red)){.bg-signal-uncertain\/10{background-color:color-mix(in oklab,var(--color-signal-uncertain)10%,transparent)}}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.pt-0\.5{padding-top:calc(var(--spacing)*.5)}.pt-2{padding-top:calc(var(--spacing)*2)}.pr-1{padding-right:calc(var(--spacing)*1)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-3{padding-left:calc(var(--spacing)*3)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\[0\.15em\]{--tw-tracking:.15em;letter-spacing:.15em}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.whitespace-nowrap{white-space:nowrap}.text-clinical-700{color:var(--color-clinical-700)}.text-clinical-dim{color:var(--color-clinical-dim)}.text-clinical-muted{color:var(--color-clinical-muted)}.text-clinical-text{color:var(--color-clinical-text)}.text-signal-ai{color:var(--color-signal-ai)}.text-signal-change{color:var(--color-signal-change)}.text-signal-concern{color:var(--color-signal-concern)}.text-signal-info{color:var(--color-signal-info)}.text-signal-stable{color:var(--color-signal-stable)}.text-signal-uncertain{color:var(--color-signal-uncertain)}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.decoration-clinical-500\/60{text-decoration-color:#3b475999}@supports (color:color-mix(in lab,red,red)){.decoration-clinical-500\/60{-webkit-text-decoration-color:color-mix(in oklab,var(--color-clinical-500)60%,transparent);text-decoration-color:color-mix(in oklab,var(--color-clinical-500)60%,transparent)}}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.accent-signal-info{accent-color:var(--color-signal-info)}.opacity-40{opacity:.4}.opacity-70{opacity:.7}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a)}.ring,.shadow-xl{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.invert{--tw-invert:invert(100%)}.filter,.invert{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.placeholder\:text-clinical-dim::placeholder{color:var(--color-clinical-dim)}@media (hover:hover){.hover\:border-clinical-500:hover{border-color:var(--color-clinical-500)}.hover\:border-signal-ai\/60:hover{border-color:#a877f099}@supports (color:color-mix(in lab,red,red)){.hover\:border-signal-ai\/60:hover{border-color:color-mix(in oklab,var(--color-signal-ai)60%,transparent)}}.hover\:border-signal-info\/60:hover{border-color:#4d94ff99}@supports (color:color-mix(in lab,red,red)){.hover\:border-signal-info\/60:hover{border-color:color-mix(in oklab,var(--color-signal-info)60%,transparent)}}.hover\:bg-clinical-800:hover{background-color:var(--color-clinical-800)}.hover\:bg-signal-ai\/15:hover{background-color:#a877f026}@supports (color:color-mix(in lab,red,red)){.hover\:bg-signal-ai\/15:hover{background-color:color-mix(in oklab,var(--color-signal-ai)15%,transparent)}}.hover\:text-clinical-muted:hover{color:var(--color-clinical-muted)}.hover\:text-clinical-text:hover{color:var(--color-clinical-text)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}}body,html{height:100%}body{background-color:var(--color-clinical-900);color:var(--color-clinical-text);font-feature-settings:"tnum" 1;-webkit-font-smoothing:antialiased}.measurement{font-family:var(--font-mono);font-variant-numeric:tabular-nums}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:var(--color-clinical-850)}::-webkit-scrollbar-thumb{background:var(--color-clinical-600);border-radius:5px}::-webkit-scrollbar-thumb:hover{background:var(--color-clinical-500)}:focus-visible{outline:2px solid var(--color-signal-info);outline-offset:1px}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}
|
api/ai-observations/041c2146-8e58-4c2d-b5dd-6c888ff2447e.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"answer_text":"No measured enhancing volume changed by more than 25%. 1 lesion had no prior to compare against: L02 measures 3.8 mm\u00b3 (first measurement, no prior to compare). Confidence 0.92; the interval between the two examinations is not recorded.","confidence":0.92,"created_at":"2026-08-18T22:19:41.587603Z","evidence_items":[{"id":"19575ae2-8456-44c7-a91b-d4ea14e7a390","kind":"MEASUREMENT","label":"L02 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"d928425b-f596-49a3-b4b5-068ef58d0af8","observation_id":"e046ac65-722c-4008-9edb-fcf8fbd8bf2a","study_id":"94d8c40b-022d-40bd-a1ab-3af52f7a4287","volume_cm3":0.0},"target_id":"e046ac65-722c-4008-9edb-fcf8fbd8bf2a","target_table":"lesion_observations"},{"id":"1f72d474-4982-4e36-b91d-b15b02a66dfe","kind":"SEGMENTATION","label":"Segmented enhancing for L02","locator":{"lesion_id":"d928425b-f596-49a3-b4b5-068ef58d0af8","observation_id":"e046ac65-722c-4008-9edb-fcf8fbd8bf2a","study_id":"94d8c40b-022d-40bd-a1ab-3af52f7a4287"},"target_id":"e046ac65-722c-4008-9edb-fcf8fbd8bf2a","target_table":"lesion_observations"}],"id":"ebba5b6c-6ae8-469e-b137-5713c5248419","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_CHANGED","question_text":"What changed since the previous scan?","safety_notes":["quality flag on input: NO_INTERVAL","composed from findings without a language model"],"safety_status":"PASSED"}]
|
api/ai-observations/05e8f381-fc6b-4afa-a8ae-e1a8888b7be3.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"answer_text":"No measured enhancing volume changed by more than 25%. 2 lesions had no prior to compare against: L03 measures 21.0 mm\u00b3 (first measurement, no prior to compare); L04 measures 0.0 mm\u00b3 (first measurement, no prior to compare). Confidence 0.92; the interval between the two examinations is not recorded.","confidence":0.92,"created_at":"2026-08-18T22:19:43.607499Z","evidence_items":[{"id":"2c87c1cf-2511-448f-8678-4bf0c2b2de7c","kind":"MEASUREMENT","label":"L03 volume 0.02 cm\u00b3 at recurrence","locator":{"lesion_id":"e9d82174-9b6b-4619-966c-74169ed6903e","observation_id":"501eaeb2-222c-4a4c-8de0-8a0029bbd341","study_id":"facc5eed-6372-4287-a4ab-0c53a7dc1ca7","volume_cm3":0.02},"target_id":"501eaeb2-222c-4a4c-8de0-8a0029bbd341","target_table":"lesion_observations"},{"id":"4f2df9b6-cb59-43ef-95da-2fad66592364","kind":"SEGMENTATION","label":"Segmented enhancing for L03","locator":{"lesion_id":"e9d82174-9b6b-4619-966c-74169ed6903e","observation_id":"501eaeb2-222c-4a4c-8de0-8a0029bbd341","study_id":"facc5eed-6372-4287-a4ab-0c53a7dc1ca7"},"target_id":"501eaeb2-222c-4a4c-8de0-8a0029bbd341","target_table":"lesion_observations"},{"id":"28ea33eb-c6c4-44e3-bb38-f272dfbe7c0f","kind":"MEASUREMENT","label":"L04 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"093413a8-d6a7-4c3e-b162-beb55610f174","observation_id":"faa6f9d0-f4e5-4b4c-a55f-1efaa685ba6d","study_id":"facc5eed-6372-4287-a4ab-0c53a7dc1ca7","volume_cm3":0.0},"target_id":"faa6f9d0-f4e5-4b4c-a55f-1efaa685ba6d","target_table":"lesion_observations"},{"id":"7f81d150-3fb1-49c5-a9cd-efa40b6d944a","kind":"SEGMENTATION","label":"Segmented enhancing for L04","locator":{"lesion_id":"093413a8-d6a7-4c3e-b162-beb55610f174","observation_id":"faa6f9d0-f4e5-4b4c-a55f-1efaa685ba6d","study_id":"facc5eed-6372-4287-a4ab-0c53a7dc1ca7"},"target_id":"faa6f9d0-f4e5-4b4c-a55f-1efaa685ba6d","target_table":"lesion_observations"}],"id":"092c8132-435d-4a08-87d7-27b2cacb4b5a","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_CHANGED","question_text":"What changed since the previous scan?","safety_notes":["quality flag on input: NO_INTERVAL","composed from findings without a language model"],"safety_status":"PASSED"}]
|
api/ai-observations/0a1ba0ca-23d8-46ed-9974-f86a08bf7027.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"answer_text":"No lesion was measured within 25% of its previous enhancing volume at recurrence. All 1 lesion with a measured change moved by more than that: L01 measures 14.0 mm\u00b3, increased by 67.5% (5.7 mm\u00b3). Confidence 0.92.","confidence":0.92,"created_at":"2026-08-18T22:19:45.482904Z","evidence_items":[{"id":"2c1497ea-2a9a-47e4-84e4-45d7403b2eec","kind":"MEASUREMENT","label":"L01 volume 0.01 cm\u00b3 at recurrence","locator":{"lesion_id":"9c34e27c-5cb8-483b-b3b4-7426985ac984","observation_id":"d842f767-6e05-486e-8797-4f5198bafd93","study_id":"26272b5b-80dd-4201-8001-3de172691935","volume_cm3":0.01},"target_id":"d842f767-6e05-486e-8797-4f5198bafd93","target_table":"lesion_observations"},{"id":"2d7ca551-9c94-4f4c-8ab9-b3a3b67438d3","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"9c34e27c-5cb8-483b-b3b4-7426985ac984","observation_id":"d842f767-6e05-486e-8797-4f5198bafd93","study_id":"26272b5b-80dd-4201-8001-3de172691935"},"target_id":"d842f767-6e05-486e-8797-4f5198bafd93","target_table":"lesion_observations"}],"id":"d9fe8998-3ad5-49d1-8804-5b02ee0a44b0","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_REMAINED_STABLE","question_text":"What remained stable?","safety_notes":["composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"The largest total measured enhancing volume change was recorded at recurrence, 5.7 mm\u00b3 summed across 1 lesion, 161 days after the study it is compared with. Confidence 0.92.","confidence":0.92,"created_at":"2026-08-18T22:19:45.430947Z","evidence_items":[{"id":"004b5bd0-5b11-4f89-8655-0d94eba4fa77","kind":"MEASUREMENT","label":"L01 volume 0.01 cm\u00b3 at recurrence","locator":{"lesion_id":"9c34e27c-5cb8-483b-b3b4-7426985ac984","observation_id":"d842f767-6e05-486e-8797-4f5198bafd93","study_id":"26272b5b-80dd-4201-8001-3de172691935","volume_cm3":0.01},"target_id":"d842f767-6e05-486e-8797-4f5198bafd93","target_table":"lesion_observations"},{"id":"c5d7ada0-0cc6-4552-9506-4310ce7f6c55","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"9c34e27c-5cb8-483b-b3b4-7426985ac984","observation_id":"d842f767-6e05-486e-8797-4f5198bafd93","study_id":"26272b5b-80dd-4201-8001-3de172691935"},"target_id":"d842f767-6e05-486e-8797-4f5198bafd93","target_table":"lesion_observations"}],"id":"9290b492-75ea-49f8-9b8b-32472cd8f478","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHEN_LARGEST_CHANGE","question_text":"When was the largest change measured?","safety_notes":["composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"The largest measured enhancing volume change is L01 measures 14.0 mm\u00b3, increased by 67.5% (5.7 mm\u00b3) at recurrence, compared against preoperative. This is the largest of 1 measured change across the timeline. Confidence 0.92.","confidence":0.92,"created_at":"2026-08-18T22:19:45.384462Z","evidence_items":[{"id":"05bd46b2-ed91-4d77-a761-861e51ebfd63","kind":"MEASUREMENT","label":"L01 volume 0.01 cm\u00b3 at recurrence","locator":{"lesion_id":"9c34e27c-5cb8-483b-b3b4-7426985ac984","observation_id":"d842f767-6e05-486e-8797-4f5198bafd93","study_id":"26272b5b-80dd-4201-8001-3de172691935","volume_cm3":0.01},"target_id":"d842f767-6e05-486e-8797-4f5198bafd93","target_table":"lesion_observations"},{"id":"973a2f4e-8a92-42f4-8b4b-8e2d8e4e336a","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"9c34e27c-5cb8-483b-b3b4-7426985ac984","observation_id":"d842f767-6e05-486e-8797-4f5198bafd93","study_id":"26272b5b-80dd-4201-8001-3de172691935"},"target_id":"d842f767-6e05-486e-8797-4f5198bafd93","target_table":"lesion_observations"},{"id":"e3d10849-12bc-4726-a301-c64fd7c2f3ec","kind":"PRIOR_STUDY","label":"Compared against preoperative","locator":{"study_id":"11d9fd96-2cf5-4a80-8a39-8ad4ce075a86","timepoint":"preoperative"},"target_id":"11d9fd96-2cf5-4a80-8a39-8ad4ce075a86","target_table":"studies"}],"id":"8ddfa5ed-2d0a-4cc6-8d33-10aa1bc3847f","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"LARGEST_CHANGE","question_text":"Which change is the largest?","safety_notes":["composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"Measured enhancing volume changed by more than 25% for 1 lesion between preoperative and recurrence, 161 days apart: L01 measures 14.0 mm\u00b3, increased by 67.5% (5.7 mm\u00b3). Confidence 0.92.","confidence":0.92,"created_at":"2026-08-18T22:19:45.338471Z","evidence_items":[{"id":"a5499bdc-7971-4701-b379-0d1fdc32b577","kind":"MEASUREMENT","label":"L01 volume 0.01 cm\u00b3 at recurrence","locator":{"lesion_id":"9c34e27c-5cb8-483b-b3b4-7426985ac984","observation_id":"d842f767-6e05-486e-8797-4f5198bafd93","study_id":"26272b5b-80dd-4201-8001-3de172691935","volume_cm3":0.01},"target_id":"d842f767-6e05-486e-8797-4f5198bafd93","target_table":"lesion_observations"},{"id":"915f85a6-d917-4c9b-966e-4b78d8f1d11d","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"9c34e27c-5cb8-483b-b3b4-7426985ac984","observation_id":"d842f767-6e05-486e-8797-4f5198bafd93","study_id":"26272b5b-80dd-4201-8001-3de172691935"},"target_id":"d842f767-6e05-486e-8797-4f5198bafd93","target_table":"lesion_observations"},{"id":"0ad43409-5f07-441c-85bc-3b5c40df4bf7","kind":"PRIOR_STUDY","label":"Compared against preoperative","locator":{"study_id":"11d9fd96-2cf5-4a80-8a39-8ad4ce075a86","timepoint":"preoperative"},"target_id":"11d9fd96-2cf5-4a80-8a39-8ad4ce075a86","target_table":"studies"}],"id":"52d7a659-7632-4100-ab96-5f8658f0f0b5","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_CHANGED","question_text":"What changed since the previous scan?","safety_notes":["composed from findings without a language model"],"safety_status":"PASSED"}]
|
api/ai-observations/0e36f014-cba2-4b67-a60a-d5c720f13384.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"answer_text":"No lesion was measured within 25% of its previous enhancing volume at recurrence. All 1 lesion with a measured change moved by more than that: L01 measures 0.5 mm\u00b3, decreased by 93.7% (8.1 mm\u00b3). Confidence 0.80; the interval between the two examinations is not recorded, the correspondence to the prior lesion is not confident, the volume difference is large enough to weaken the correspondence, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:39.587570Z","evidence_items":[{"id":"98b72c13-4bc4-4710-926e-0cb62e732f6b","kind":"MEASUREMENT","label":"L01 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"b7be23e8-bef9-4836-86d6-afd7c60a963d","observation_id":"b9ab1333-8f7e-4e08-b834-8071aa9835c4","study_id":"9c028656-fa40-4171-9040-e4cba54359ae","volume_cm3":0.0},"target_id":"b9ab1333-8f7e-4e08-b834-8071aa9835c4","target_table":"lesion_observations"},{"id":"482f4bd1-6263-43a7-91bc-f44c5e5bbb0b","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"b7be23e8-bef9-4836-86d6-afd7c60a963d","observation_id":"b9ab1333-8f7e-4e08-b834-8071aa9835c4","study_id":"9c028656-fa40-4171-9040-e4cba54359ae"},"target_id":"b9ab1333-8f7e-4e08-b834-8071aa9835c4","target_table":"lesion_observations"}],"id":"1b0d0185-0cac-4fbf-96cd-0cc125b86baa","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_REMAINED_STABLE","question_text":"What remained stable?","safety_notes":["quality flag on input: NO_INTERVAL","quality flag on input: MATCH_UNCERTAIN","quality flag on input: LARGE_VOLUME_CHANGE","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"The largest total measured enhancing volume change was recorded at recurrence, 8.1 mm\u00b3 summed across 1 lesion, 710 days after the study it is compared with. Confidence 0.80; the correspondence to the prior lesion is not confident, the volume difference is large enough to weaken the correspondence, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:39.532672Z","evidence_items":[{"id":"fe9b0913-2a76-4b11-b58a-cd712e6126f3","kind":"MEASUREMENT","label":"L01 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"b7be23e8-bef9-4836-86d6-afd7c60a963d","observation_id":"b9ab1333-8f7e-4e08-b834-8071aa9835c4","study_id":"9c028656-fa40-4171-9040-e4cba54359ae","volume_cm3":0.0},"target_id":"b9ab1333-8f7e-4e08-b834-8071aa9835c4","target_table":"lesion_observations"},{"id":"794691c7-8e44-468f-9a59-6be5e7c8defb","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"b7be23e8-bef9-4836-86d6-afd7c60a963d","observation_id":"b9ab1333-8f7e-4e08-b834-8071aa9835c4","study_id":"9c028656-fa40-4171-9040-e4cba54359ae"},"target_id":"b9ab1333-8f7e-4e08-b834-8071aa9835c4","target_table":"lesion_observations"}],"id":"3c93a13b-6db8-42cc-806a-4bbb3f79eed2","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHEN_LARGEST_CHANGE","question_text":"When was the largest change measured?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: LARGE_VOLUME_CHANGE","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"The largest measured enhancing volume change is L01 measures 0.5 mm\u00b3, decreased by 93.7% (8.1 mm\u00b3) at recurrence, compared against preoperative. This is the largest of 1 measured change across the timeline. Confidence 0.80; the correspondence to the prior lesion is not confident, the volume difference is large enough to weaken the correspondence, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:39.482637Z","evidence_items":[{"id":"b276fe1b-1f4c-4344-9fd3-05c904c75062","kind":"MEASUREMENT","label":"L01 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"b7be23e8-bef9-4836-86d6-afd7c60a963d","observation_id":"b9ab1333-8f7e-4e08-b834-8071aa9835c4","study_id":"9c028656-fa40-4171-9040-e4cba54359ae","volume_cm3":0.0},"target_id":"b9ab1333-8f7e-4e08-b834-8071aa9835c4","target_table":"lesion_observations"},{"id":"8c99cb0f-a58d-440d-8994-ad74754e97d2","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"b7be23e8-bef9-4836-86d6-afd7c60a963d","observation_id":"b9ab1333-8f7e-4e08-b834-8071aa9835c4","study_id":"9c028656-fa40-4171-9040-e4cba54359ae"},"target_id":"b9ab1333-8f7e-4e08-b834-8071aa9835c4","target_table":"lesion_observations"},{"id":"8913dea0-125d-4432-ba83-fee93d12487a","kind":"PRIOR_STUDY","label":"Compared against preoperative","locator":{"study_id":"dcb50ac6-7ed8-455f-8c79-99ee2ae46836","timepoint":"preoperative"},"target_id":"dcb50ac6-7ed8-455f-8c79-99ee2ae46836","target_table":"studies"}],"id":"d7524d0a-c660-490c-bce0-5a0f02c837a9","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"LARGEST_CHANGE","question_text":"Which change is the largest?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: LARGE_VOLUME_CHANGE","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"Measured enhancing volume changed by more than 25% for 1 lesion between preoperative and recurrence, 710 days apart: L01 measures 0.5 mm\u00b3, decreased by 93.7% (8.1 mm\u00b3). 1 lesion had no prior to compare against: L02 measures 35.2 mm\u00b3 (first measurement, no prior to compare). Confidence 0.80; the interval between the two examinations is not recorded, the correspondence to the prior lesion is not confident, the volume difference is large enough to weaken the correspondence, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:39.434897Z","evidence_items":[{"id":"21682d27-cbde-4f5a-a102-c8967c21f21c","kind":"MEASUREMENT","label":"L02 volume 0.04 cm\u00b3 at recurrence","locator":{"lesion_id":"a53dafaa-d8fa-4a05-b6ac-0ae0e1b8f831","observation_id":"04d132bc-cb4c-4dbb-b218-d6c8af102ed7","study_id":"9c028656-fa40-4171-9040-e4cba54359ae","volume_cm3":0.04},"target_id":"04d132bc-cb4c-4dbb-b218-d6c8af102ed7","target_table":"lesion_observations"},{"id":"ebb6a2c6-c812-4091-ae6a-c39d51793cfb","kind":"SEGMENTATION","label":"Segmented enhancing for L02","locator":{"lesion_id":"a53dafaa-d8fa-4a05-b6ac-0ae0e1b8f831","observation_id":"04d132bc-cb4c-4dbb-b218-d6c8af102ed7","study_id":"9c028656-fa40-4171-9040-e4cba54359ae"},"target_id":"04d132bc-cb4c-4dbb-b218-d6c8af102ed7","target_table":"lesion_observations"},{"id":"2260c1df-e052-499f-94dd-b7feb4ecde9c","kind":"MEASUREMENT","label":"L01 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"b7be23e8-bef9-4836-86d6-afd7c60a963d","observation_id":"b9ab1333-8f7e-4e08-b834-8071aa9835c4","study_id":"9c028656-fa40-4171-9040-e4cba54359ae","volume_cm3":0.0},"target_id":"b9ab1333-8f7e-4e08-b834-8071aa9835c4","target_table":"lesion_observations"},{"id":"cf645c46-88a0-4bca-8617-ccab37686ddb","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"b7be23e8-bef9-4836-86d6-afd7c60a963d","observation_id":"b9ab1333-8f7e-4e08-b834-8071aa9835c4","study_id":"9c028656-fa40-4171-9040-e4cba54359ae"},"target_id":"b9ab1333-8f7e-4e08-b834-8071aa9835c4","target_table":"lesion_observations"},{"id":"00facdb2-b018-4a32-affc-42981238f4c0","kind":"PRIOR_STUDY","label":"Compared against preoperative","locator":{"study_id":"dcb50ac6-7ed8-455f-8c79-99ee2ae46836","timepoint":"preoperative"},"target_id":"dcb50ac6-7ed8-455f-8c79-99ee2ae46836","target_table":"studies"}],"id":"2c3f3d22-bf2c-4124-916e-694aff08a14b","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_CHANGED","question_text":"What changed since the previous scan?","safety_notes":["quality flag on input: NO_INTERVAL","quality flag on input: MATCH_UNCERTAIN","quality flag on input: LARGE_VOLUME_CHANGE","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"}]
|
api/ai-observations/1644cc40-79e6-47bf-a4e4-51c8248a7ad9.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"answer_text":"No measured enhancing volume changed by more than 25%. 2 lesions had no prior to compare against: L02 measures 5.4 mm\u00b3 (first measurement, no prior to compare); L03 measures 0.4 mm\u00b3 (first measurement, no prior to compare). Confidence 0.92; the interval between the two examinations is not recorded.","confidence":0.92,"created_at":"2026-08-18T22:19:40.038524Z","evidence_items":[{"id":"c7062b9e-1906-4310-92a7-1b2af5384c89","kind":"MEASUREMENT","label":"L02 volume 0.01 cm\u00b3 at recurrence","locator":{"lesion_id":"ba5e450e-8dc0-4b84-a5b9-2ab98a67f85b","observation_id":"6cbae5c3-0adb-40b3-848d-a67efbfe7eb4","study_id":"6b329524-c37b-4581-9859-84a55b0f7d84","volume_cm3":0.01},"target_id":"6cbae5c3-0adb-40b3-848d-a67efbfe7eb4","target_table":"lesion_observations"},{"id":"70873a60-8f1b-47bf-9055-173d4b65113f","kind":"SEGMENTATION","label":"Segmented enhancing for L02","locator":{"lesion_id":"ba5e450e-8dc0-4b84-a5b9-2ab98a67f85b","observation_id":"6cbae5c3-0adb-40b3-848d-a67efbfe7eb4","study_id":"6b329524-c37b-4581-9859-84a55b0f7d84"},"target_id":"6cbae5c3-0adb-40b3-848d-a67efbfe7eb4","target_table":"lesion_observations"},{"id":"d4986659-135d-49ca-b792-8bbe6888dcc1","kind":"MEASUREMENT","label":"L03 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"4ef55edd-f946-4fc6-9ff2-b21d2fdcb86f","observation_id":"a7719e45-3af0-4e6c-a364-0a937aba199e","study_id":"6b329524-c37b-4581-9859-84a55b0f7d84","volume_cm3":0.0},"target_id":"a7719e45-3af0-4e6c-a364-0a937aba199e","target_table":"lesion_observations"},{"id":"f178f0ac-86dc-4b5d-a234-0f5df2e8e15e","kind":"SEGMENTATION","label":"Segmented enhancing for L03","locator":{"lesion_id":"4ef55edd-f946-4fc6-9ff2-b21d2fdcb86f","observation_id":"a7719e45-3af0-4e6c-a364-0a937aba199e","study_id":"6b329524-c37b-4581-9859-84a55b0f7d84"},"target_id":"a7719e45-3af0-4e6c-a364-0a937aba199e","target_table":"lesion_observations"}],"id":"e6285085-d5c3-4260-96c4-632feaec248b","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_CHANGED","question_text":"What changed since the previous scan?","safety_notes":["quality flag on input: NO_INTERVAL","composed from findings without a language model"],"safety_status":"PASSED"}]
|
api/ai-observations/2043be8c-57f4-4845-88d0-cadadd106f19.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"answer_text":"No measured enhancing volume changed by more than 25%. 1 lesion had no prior to compare against: L03 measures 0.7 mm\u00b3 (first measurement, no prior to compare). Confidence 0.92; the interval between the two examinations is not recorded.","confidence":0.92,"created_at":"2026-08-18T22:19:41.339914Z","evidence_items":[{"id":"5c0c1b7e-cbc0-454a-9568-e7b5422352e6","kind":"MEASUREMENT","label":"L03 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"03a303d7-5935-4d2a-ba9f-9d3fd3e2e710","observation_id":"f42cf460-16e3-4d5c-a476-8e75f8b41022","study_id":"b4d0c863-a94f-4cb7-8c20-0544dadd2b55","volume_cm3":0.0},"target_id":"f42cf460-16e3-4d5c-a476-8e75f8b41022","target_table":"lesion_observations"},{"id":"d9ce64fd-35e8-4362-b09c-c23e3749462d","kind":"SEGMENTATION","label":"Segmented enhancing for L03","locator":{"lesion_id":"03a303d7-5935-4d2a-ba9f-9d3fd3e2e710","observation_id":"f42cf460-16e3-4d5c-a476-8e75f8b41022","study_id":"b4d0c863-a94f-4cb7-8c20-0544dadd2b55"},"target_id":"f42cf460-16e3-4d5c-a476-8e75f8b41022","target_table":"lesion_observations"}],"id":"e06689d6-2033-4efd-9e4f-4e3e589feeb0","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_CHANGED","question_text":"What changed since the previous scan?","safety_notes":["quality flag on input: NO_INTERVAL","composed from findings without a language model"],"safety_status":"PASSED"}]
|
api/ai-observations/2166fc98-aac6-45a6-855a-bad61c98e806.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"answer_text":"No lesion was measured within 25% of its previous enhancing volume at recurrence. All 1 lesion with a measured change moved by more than that: L02 measures 0.1 mm\u00b3, decreased by 72.8% (0.3 mm\u00b3). Confidence 0.80; the interval between the two examinations is not recorded, the correspondence to the prior lesion is not confident, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:45.974768Z","evidence_items":[{"id":"284d444a-24c3-4ff0-bc31-e68e5f67c365","kind":"MEASUREMENT","label":"L02 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"9e47ef3f-ccc3-4b81-820a-cd83535c52d3","observation_id":"318f13bf-4ec3-4083-9c46-b639d1b5c978","study_id":"77bec26e-b844-4e0b-9769-3887372c01a0","volume_cm3":0.0},"target_id":"318f13bf-4ec3-4083-9c46-b639d1b5c978","target_table":"lesion_observations"},{"id":"4911489b-7c0d-4d8d-834e-98f29139fa31","kind":"SEGMENTATION","label":"Segmented enhancing for L02","locator":{"lesion_id":"9e47ef3f-ccc3-4b81-820a-cd83535c52d3","observation_id":"318f13bf-4ec3-4083-9c46-b639d1b5c978","study_id":"77bec26e-b844-4e0b-9769-3887372c01a0"},"target_id":"318f13bf-4ec3-4083-9c46-b639d1b5c978","target_table":"lesion_observations"}],"id":"080b7f52-50a9-4ca6-b062-7875abb9bc11","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_REMAINED_STABLE","question_text":"What remained stable?","safety_notes":["quality flag on input: NO_INTERVAL","quality flag on input: MATCH_UNCERTAIN","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"The largest total measured enhancing volume change was recorded at recurrence, 0.3 mm\u00b3 summed across 1 lesion, 475 days after the study it is compared with. Confidence 0.80; the correspondence to the prior lesion is not confident, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:45.909180Z","evidence_items":[{"id":"b609dd02-6f03-45a6-bef5-fa7b8871e3e4","kind":"MEASUREMENT","label":"L02 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"9e47ef3f-ccc3-4b81-820a-cd83535c52d3","observation_id":"318f13bf-4ec3-4083-9c46-b639d1b5c978","study_id":"77bec26e-b844-4e0b-9769-3887372c01a0","volume_cm3":0.0},"target_id":"318f13bf-4ec3-4083-9c46-b639d1b5c978","target_table":"lesion_observations"},{"id":"dc3a31c7-b3d2-4c5d-8008-3001365039aa","kind":"SEGMENTATION","label":"Segmented enhancing for L02","locator":{"lesion_id":"9e47ef3f-ccc3-4b81-820a-cd83535c52d3","observation_id":"318f13bf-4ec3-4083-9c46-b639d1b5c978","study_id":"77bec26e-b844-4e0b-9769-3887372c01a0"},"target_id":"318f13bf-4ec3-4083-9c46-b639d1b5c978","target_table":"lesion_observations"}],"id":"261296be-9283-413f-b763-c8a7ee464094","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHEN_LARGEST_CHANGE","question_text":"When was the largest change measured?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"The largest measured enhancing volume change is L02 measures 0.1 mm\u00b3, decreased by 72.8% (0.3 mm\u00b3) at recurrence, compared against early-postoperative. This is the largest of 1 measured change across the timeline. Confidence 0.80; the correspondence to the prior lesion is not confident, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:45.848558Z","evidence_items":[{"id":"ffb0baff-c447-4485-abf4-473361528c7b","kind":"MEASUREMENT","label":"L02 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"9e47ef3f-ccc3-4b81-820a-cd83535c52d3","observation_id":"318f13bf-4ec3-4083-9c46-b639d1b5c978","study_id":"77bec26e-b844-4e0b-9769-3887372c01a0","volume_cm3":0.0},"target_id":"318f13bf-4ec3-4083-9c46-b639d1b5c978","target_table":"lesion_observations"},{"id":"da74d778-9253-46c0-98a5-f133f228d8af","kind":"SEGMENTATION","label":"Segmented enhancing for L02","locator":{"lesion_id":"9e47ef3f-ccc3-4b81-820a-cd83535c52d3","observation_id":"318f13bf-4ec3-4083-9c46-b639d1b5c978","study_id":"77bec26e-b844-4e0b-9769-3887372c01a0"},"target_id":"318f13bf-4ec3-4083-9c46-b639d1b5c978","target_table":"lesion_observations"},{"id":"b83ec3b2-cc80-4385-95ae-579a33b4fb96","kind":"PRIOR_STUDY","label":"Compared against early-postoperative","locator":{"study_id":"7388fa67-3ca2-4c5a-a0bb-2b7dd8374ed5","timepoint":"early-postoperative"},"target_id":"7388fa67-3ca2-4c5a-a0bb-2b7dd8374ed5","target_table":"studies"}],"id":"690099ac-891b-4dfd-ba41-8bc4141fbbfb","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"LARGEST_CHANGE","question_text":"Which change is the largest?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"Measured enhancing volume changed by more than 25% for 1 lesion between early-postoperative and recurrence, 475 days apart: L02 measures 0.1 mm\u00b3, decreased by 72.8% (0.3 mm\u00b3). 2 lesions had no prior to compare against: L03 measures 12.2 mm\u00b3 (first measurement, no prior to compare); L04 measures 0.2 mm\u00b3 (first measurement, no prior to compare). Confidence 0.80; the interval between the two examinations is not recorded, the correspondence to the prior lesion is not confident, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:45.785137Z","evidence_items":[{"id":"408e9f68-27f9-4642-b63b-e442f55be34a","kind":"MEASUREMENT","label":"L03 volume 0.01 cm\u00b3 at recurrence","locator":{"lesion_id":"2e8827c1-46a4-4399-8c94-2fa76af52e96","observation_id":"deb468e9-2694-4e8d-b629-a51cf4aa6452","study_id":"77bec26e-b844-4e0b-9769-3887372c01a0","volume_cm3":0.01},"target_id":"deb468e9-2694-4e8d-b629-a51cf4aa6452","target_table":"lesion_observations"},{"id":"330400f5-001e-49cf-aad8-3ee6a5bd14b2","kind":"SEGMENTATION","label":"Segmented enhancing for L03","locator":{"lesion_id":"2e8827c1-46a4-4399-8c94-2fa76af52e96","observation_id":"deb468e9-2694-4e8d-b629-a51cf4aa6452","study_id":"77bec26e-b844-4e0b-9769-3887372c01a0"},"target_id":"deb468e9-2694-4e8d-b629-a51cf4aa6452","target_table":"lesion_observations"},{"id":"26338d0e-dcab-4daa-a761-992dfd61bd6a","kind":"MEASUREMENT","label":"L04 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"c7ab0b24-d573-4fa9-b44c-a437ac7505b5","observation_id":"8cd8ed80-0a30-4196-a36c-6c9db2aabd33","study_id":"77bec26e-b844-4e0b-9769-3887372c01a0","volume_cm3":0.0},"target_id":"8cd8ed80-0a30-4196-a36c-6c9db2aabd33","target_table":"lesion_observations"},{"id":"a752e528-2db4-49a9-94c2-cd1b0a7e5393","kind":"SEGMENTATION","label":"Segmented enhancing for L04","locator":{"lesion_id":"c7ab0b24-d573-4fa9-b44c-a437ac7505b5","observation_id":"8cd8ed80-0a30-4196-a36c-6c9db2aabd33","study_id":"77bec26e-b844-4e0b-9769-3887372c01a0"},"target_id":"8cd8ed80-0a30-4196-a36c-6c9db2aabd33","target_table":"lesion_observations"},{"id":"5454e335-f7f8-43e7-8608-05e986fa6bcd","kind":"MEASUREMENT","label":"L02 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"9e47ef3f-ccc3-4b81-820a-cd83535c52d3","observation_id":"318f13bf-4ec3-4083-9c46-b639d1b5c978","study_id":"77bec26e-b844-4e0b-9769-3887372c01a0","volume_cm3":0.0},"target_id":"318f13bf-4ec3-4083-9c46-b639d1b5c978","target_table":"lesion_observations"},{"id":"f3f16ea6-a82f-407d-a1ba-75a317b75f98","kind":"SEGMENTATION","label":"Segmented enhancing for L02","locator":{"lesion_id":"9e47ef3f-ccc3-4b81-820a-cd83535c52d3","observation_id":"318f13bf-4ec3-4083-9c46-b639d1b5c978","study_id":"77bec26e-b844-4e0b-9769-3887372c01a0"},"target_id":"318f13bf-4ec3-4083-9c46-b639d1b5c978","target_table":"lesion_observations"},{"id":"4a7483f3-b756-4060-ae76-5b6d05e293ab","kind":"PRIOR_STUDY","label":"Compared against early-postoperative","locator":{"study_id":"7388fa67-3ca2-4c5a-a0bb-2b7dd8374ed5","timepoint":"early-postoperative"},"target_id":"7388fa67-3ca2-4c5a-a0bb-2b7dd8374ed5","target_table":"studies"}],"id":"931f4618-a2ee-49a6-9f85-d84d9a3ce81d","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_CHANGED","question_text":"What changed since the previous scan?","safety_notes":["quality flag on input: NO_INTERVAL","quality flag on input: MATCH_UNCERTAIN","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"}]
|
api/ai-observations/2be8a602-8102-4bf4-a6a0-87df5f84f3c1.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"answer_text":"No lesion was measured within 25% of its previous enhancing volume at early-postoperative. All 1 lesion with a measured change moved by more than that: L02 measures 0.3 mm\u00b3, decreased by 42.5% (0.2 mm\u00b3). Confidence 0.80; the correspondence to the prior lesion is not confident, the lesion does not overlap its match in the prior study, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:43.063000Z","evidence_items":[{"id":"ed2dc62f-c13d-4013-ac2d-8171a4719dab","kind":"MEASUREMENT","label":"L02 volume 0.0 cm\u00b3 at early-postoperative","locator":{"lesion_id":"a6267041-4c96-4162-97d7-87a315531b54","observation_id":"ab37a6dc-3ee7-4695-8f73-a9d03440a2a5","study_id":"e2e99632-5b1e-4ef7-86d7-ae6ba1909392","volume_cm3":0.0},"target_id":"ab37a6dc-3ee7-4695-8f73-a9d03440a2a5","target_table":"lesion_observations"},{"id":"eb37fb3e-1c86-4977-b13e-895338012e75","kind":"SEGMENTATION","label":"Segmented enhancing for L02","locator":{"lesion_id":"a6267041-4c96-4162-97d7-87a315531b54","observation_id":"ab37a6dc-3ee7-4695-8f73-a9d03440a2a5","study_id":"e2e99632-5b1e-4ef7-86d7-ae6ba1909392"},"target_id":"ab37a6dc-3ee7-4695-8f73-a9d03440a2a5","target_table":"lesion_observations"}],"id":"947bcb36-20b2-4ce5-b285-b6bc2b054421","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_REMAINED_STABLE","question_text":"What remained stable?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: NO_OVERLAP","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"The largest total measured enhancing volume change was recorded at early-postoperative, 0.2 mm\u00b3 summed across 1 lesion, 10 days after the study it is compared with. Confidence 0.80; the correspondence to the prior lesion is not confident, the lesion does not overlap its match in the prior study, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:43.003295Z","evidence_items":[{"id":"6c2db5bc-2eb9-45a0-899c-8087b851e1f2","kind":"MEASUREMENT","label":"L02 volume 0.0 cm\u00b3 at early-postoperative","locator":{"lesion_id":"a6267041-4c96-4162-97d7-87a315531b54","observation_id":"ab37a6dc-3ee7-4695-8f73-a9d03440a2a5","study_id":"e2e99632-5b1e-4ef7-86d7-ae6ba1909392","volume_cm3":0.0},"target_id":"ab37a6dc-3ee7-4695-8f73-a9d03440a2a5","target_table":"lesion_observations"},{"id":"d5f983a1-d34d-40d4-b92a-d026829c343f","kind":"SEGMENTATION","label":"Segmented enhancing for L02","locator":{"lesion_id":"a6267041-4c96-4162-97d7-87a315531b54","observation_id":"ab37a6dc-3ee7-4695-8f73-a9d03440a2a5","study_id":"e2e99632-5b1e-4ef7-86d7-ae6ba1909392"},"target_id":"ab37a6dc-3ee7-4695-8f73-a9d03440a2a5","target_table":"lesion_observations"}],"id":"26ff2ff8-4e55-4cf9-a5b5-41d47fea96c6","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHEN_LARGEST_CHANGE","question_text":"When was the largest change measured?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: NO_OVERLAP","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"The largest measured enhancing volume change is L02 measures 0.3 mm\u00b3, decreased by 42.5% (0.2 mm\u00b3) at early-postoperative, compared against preoperative. This is the largest of 1 measured change across the timeline. Confidence 0.80; the correspondence to the prior lesion is not confident, the lesion does not overlap its match in the prior study, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:42.935392Z","evidence_items":[{"id":"0bd635c6-ad12-4952-9682-b40b638e2c89","kind":"MEASUREMENT","label":"L02 volume 0.0 cm\u00b3 at early-postoperative","locator":{"lesion_id":"a6267041-4c96-4162-97d7-87a315531b54","observation_id":"ab37a6dc-3ee7-4695-8f73-a9d03440a2a5","study_id":"e2e99632-5b1e-4ef7-86d7-ae6ba1909392","volume_cm3":0.0},"target_id":"ab37a6dc-3ee7-4695-8f73-a9d03440a2a5","target_table":"lesion_observations"},{"id":"a5069ecf-4c6c-48d2-a22f-77fd96a099ea","kind":"SEGMENTATION","label":"Segmented enhancing for L02","locator":{"lesion_id":"a6267041-4c96-4162-97d7-87a315531b54","observation_id":"ab37a6dc-3ee7-4695-8f73-a9d03440a2a5","study_id":"e2e99632-5b1e-4ef7-86d7-ae6ba1909392"},"target_id":"ab37a6dc-3ee7-4695-8f73-a9d03440a2a5","target_table":"lesion_observations"},{"id":"3b288c4c-2ba2-4afa-bc43-ad5e95583e33","kind":"PRIOR_STUDY","label":"Compared against preoperative","locator":{"study_id":"71f83359-3065-4843-8c63-6d27998c4099","timepoint":"preoperative"},"target_id":"71f83359-3065-4843-8c63-6d27998c4099","target_table":"studies"}],"id":"f95cd8fc-115f-4ae8-b165-d3feadea4b6b","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"LARGEST_CHANGE","question_text":"Which change is the largest?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: NO_OVERLAP","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"Measured enhancing volume changed by more than 25% for 1 lesion between preoperative and early-postoperative, 10 days apart: L02 measures 0.3 mm\u00b3, decreased by 42.5% (0.2 mm\u00b3). Confidence 0.80; the correspondence to the prior lesion is not confident, the lesion does not overlap its match in the prior study, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:42.859867Z","evidence_items":[{"id":"1f223be7-2ef8-49fe-b3bc-138765f8f51c","kind":"MEASUREMENT","label":"L02 volume 0.0 cm\u00b3 at early-postoperative","locator":{"lesion_id":"a6267041-4c96-4162-97d7-87a315531b54","observation_id":"ab37a6dc-3ee7-4695-8f73-a9d03440a2a5","study_id":"e2e99632-5b1e-4ef7-86d7-ae6ba1909392","volume_cm3":0.0},"target_id":"ab37a6dc-3ee7-4695-8f73-a9d03440a2a5","target_table":"lesion_observations"},{"id":"91382226-e87d-41d6-9375-bac6c6578ff2","kind":"SEGMENTATION","label":"Segmented enhancing for L02","locator":{"lesion_id":"a6267041-4c96-4162-97d7-87a315531b54","observation_id":"ab37a6dc-3ee7-4695-8f73-a9d03440a2a5","study_id":"e2e99632-5b1e-4ef7-86d7-ae6ba1909392"},"target_id":"ab37a6dc-3ee7-4695-8f73-a9d03440a2a5","target_table":"lesion_observations"},{"id":"dac82aad-a62e-4d53-9716-0d72a2633539","kind":"PRIOR_STUDY","label":"Compared against preoperative","locator":{"study_id":"71f83359-3065-4843-8c63-6d27998c4099","timepoint":"preoperative"},"target_id":"71f83359-3065-4843-8c63-6d27998c4099","target_table":"studies"}],"id":"4e11107a-fb6f-4d01-8870-75f371ef9cd0","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_CHANGED","question_text":"What changed since the previous scan?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: NO_OVERLAP","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"}]
|
api/ai-observations/31d3fa6c-d577-4972-9845-fd45c6d03801.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"answer_text":"No measured enhancing volume changed by more than 25%. 1 lesion had no prior to compare against: L04 measures 25.5 mm\u00b3 (first measurement, no prior to compare). Confidence 0.92; the interval between the two examinations is not recorded.","confidence":0.92,"created_at":"2026-08-18T22:19:41.800035Z","evidence_items":[{"id":"311a0efc-7985-4a3c-b923-d96a611826d5","kind":"MEASUREMENT","label":"L04 volume 0.03 cm\u00b3 at recurrence","locator":{"lesion_id":"78ef9305-6125-4334-8785-506ce70462d9","observation_id":"7aac196e-901d-442a-a817-5261341ca0b6","study_id":"62ec3a94-03fb-4477-860a-e4068c3f2bad","volume_cm3":0.03},"target_id":"7aac196e-901d-442a-a817-5261341ca0b6","target_table":"lesion_observations"},{"id":"ac4c57fb-d742-444f-b515-4f7d567ccbd3","kind":"SEGMENTATION","label":"Segmented enhancing for L04","locator":{"lesion_id":"78ef9305-6125-4334-8785-506ce70462d9","observation_id":"7aac196e-901d-442a-a817-5261341ca0b6","study_id":"62ec3a94-03fb-4477-860a-e4068c3f2bad"},"target_id":"7aac196e-901d-442a-a817-5261341ca0b6","target_table":"lesion_observations"}],"id":"6e7a1ff1-83c5-4e46-ab77-37ba313cc048","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_CHANGED","question_text":"What changed since the previous scan?","safety_notes":["quality flag on input: NO_INTERVAL","composed from findings without a language model"],"safety_status":"PASSED"}]
|
api/ai-observations/37ab76a9-f8d9-4ccb-8ae7-5b617bc333f8.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"answer_text":"1 lesion changed by 25% or less in measured enhancing volume at recurrence: L02 measures 0.2 mm\u00b3, decreased by 15.9% (0.0 mm\u00b3). Confidence 0.72; the correspondence to the prior lesion is not confident, the change is smaller than the measurement uncertainty, the lesion does not overlap its match in the prior study, the similarity score for the correspondence is weak.","confidence":0.72,"created_at":"2026-08-18T22:19:39.345900Z","evidence_items":[{"id":"04d5a9eb-3fd1-4f7a-b2e3-259bdb3ba779","kind":"MEASUREMENT","label":"L02 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"e01128b9-d80a-42e2-9743-21b1098bb9bc","observation_id":"0924c56e-ef14-427d-a372-319bccb4cf20","study_id":"bf46ee7b-a403-4562-a149-7811740eb6ab","volume_cm3":0.0},"target_id":"0924c56e-ef14-427d-a372-319bccb4cf20","target_table":"lesion_observations"},{"id":"612a3195-0c3e-4828-af8a-77aa854dc2a2","kind":"SEGMENTATION","label":"Segmented enhancing for L02","locator":{"lesion_id":"e01128b9-d80a-42e2-9743-21b1098bb9bc","observation_id":"0924c56e-ef14-427d-a372-319bccb4cf20","study_id":"bf46ee7b-a403-4562-a149-7811740eb6ab"},"target_id":"0924c56e-ef14-427d-a372-319bccb4cf20","target_table":"lesion_observations"}],"id":"aaa5d303-0c78-423e-b5f0-609e5ac9b735","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_REMAINED_STABLE","question_text":"What remained stable?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: BELOW_UNCERTAINTY","quality flag on input: NO_OVERLAP","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"The largest total measured enhancing volume change was recorded at recurrence, 11.5 mm\u00b3 summed across 2 lesions, 141 days after the study it is compared with. Confidence 0.72; the correspondence to the prior lesion is not confident, the volume difference is large enough to weaken the correspondence, the similarity score for the correspondence is weak, the change is smaller than the measurement uncertainty, the lesion does not overlap its match in the prior study.","confidence":0.72,"created_at":"2026-08-18T22:19:39.264878Z","evidence_items":[{"id":"192c00ca-5be2-4b9c-80b5-996ccf291659","kind":"MEASUREMENT","label":"L01 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"1c572a43-b5f7-4915-9167-0d577ca39887","observation_id":"7d887f9f-a518-4065-ab83-bda4ae30f053","study_id":"bf46ee7b-a403-4562-a149-7811740eb6ab","volume_cm3":0.0},"target_id":"7d887f9f-a518-4065-ab83-bda4ae30f053","target_table":"lesion_observations"},{"id":"d880c34b-2201-4c32-a6fd-48ed4c340e9d","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"1c572a43-b5f7-4915-9167-0d577ca39887","observation_id":"7d887f9f-a518-4065-ab83-bda4ae30f053","study_id":"bf46ee7b-a403-4562-a149-7811740eb6ab"},"target_id":"7d887f9f-a518-4065-ab83-bda4ae30f053","target_table":"lesion_observations"},{"id":"c6c241f0-b2b9-47ce-9312-ef31aeb5a2b6","kind":"MEASUREMENT","label":"L02 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"e01128b9-d80a-42e2-9743-21b1098bb9bc","observation_id":"0924c56e-ef14-427d-a372-319bccb4cf20","study_id":"bf46ee7b-a403-4562-a149-7811740eb6ab","volume_cm3":0.0},"target_id":"0924c56e-ef14-427d-a372-319bccb4cf20","target_table":"lesion_observations"},{"id":"2d860d45-a5af-4a53-b3a8-b3a7dc4a4491","kind":"SEGMENTATION","label":"Segmented enhancing for L02","locator":{"lesion_id":"e01128b9-d80a-42e2-9743-21b1098bb9bc","observation_id":"0924c56e-ef14-427d-a372-319bccb4cf20","study_id":"bf46ee7b-a403-4562-a149-7811740eb6ab"},"target_id":"0924c56e-ef14-427d-a372-319bccb4cf20","target_table":"lesion_observations"}],"id":"658df23c-61c8-4c55-a5ca-b82ba0e2ae24","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHEN_LARGEST_CHANGE","question_text":"When was the largest change measured?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: LARGE_VOLUME_CHANGE","quality flag on input: WEAK_SCORE","quality flag on input: BELOW_UNCERTAINTY","quality flag on input: NO_OVERLAP","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"The largest measured enhancing volume change is L01 measures 2.4 mm\u00b3, decreased by 82.9% (11.5 mm\u00b3) at recurrence, compared against preoperative. This is the largest of 2 measured changes across the timeline. Confidence 0.80; the correspondence to the prior lesion is not confident, the volume difference is large enough to weaken the correspondence, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:39.198561Z","evidence_items":[{"id":"d3eadb75-ee96-45ab-875c-c5744f7dca92","kind":"MEASUREMENT","label":"L01 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"1c572a43-b5f7-4915-9167-0d577ca39887","observation_id":"7d887f9f-a518-4065-ab83-bda4ae30f053","study_id":"bf46ee7b-a403-4562-a149-7811740eb6ab","volume_cm3":0.0},"target_id":"7d887f9f-a518-4065-ab83-bda4ae30f053","target_table":"lesion_observations"},{"id":"863bc4dc-80a7-4ec7-b79d-0b2acb011604","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"1c572a43-b5f7-4915-9167-0d577ca39887","observation_id":"7d887f9f-a518-4065-ab83-bda4ae30f053","study_id":"bf46ee7b-a403-4562-a149-7811740eb6ab"},"target_id":"7d887f9f-a518-4065-ab83-bda4ae30f053","target_table":"lesion_observations"},{"id":"c22dd66f-8c98-44a0-901b-ff57a7009eed","kind":"PRIOR_STUDY","label":"Compared against preoperative","locator":{"study_id":"50c7e8b0-067e-4c68-b476-5f78dfcd7a62","timepoint":"preoperative"},"target_id":"50c7e8b0-067e-4c68-b476-5f78dfcd7a62","target_table":"studies"}],"id":"12f48be4-377b-4b27-b0ec-e3ad129be880","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"LARGEST_CHANGE","question_text":"Which change is the largest?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: LARGE_VOLUME_CHANGE","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"Measured enhancing volume changed by more than 25% for 1 lesion between preoperative and recurrence, 141 days apart: L01 measures 2.4 mm\u00b3, decreased by 82.9% (11.5 mm\u00b3). 1 lesion changed by less: L02 measures 0.2 mm\u00b3, decreased by 15.9% (0.0 mm\u00b3). 2 lesions had no prior to compare against: L03 measures 2.0 mm\u00b3 (first measurement, no prior to compare); L04 measures 0.0 mm\u00b3 (first measurement, no prior to compare). Confidence 0.72; the correspondence to the prior lesion is not confident, the volume difference is large enough to weaken the correspondence, the similarity score for the correspondence is weak, the interval between the two examinations is not recorded, the change is smaller than the measurement uncertainty, the lesion does not overlap its match in the prior study.","confidence":0.72,"created_at":"2026-08-18T22:19:39.140545Z","evidence_items":[{"id":"d9e167bd-926e-4156-a229-c5823bf868f3","kind":"MEASUREMENT","label":"L01 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"1c572a43-b5f7-4915-9167-0d577ca39887","observation_id":"7d887f9f-a518-4065-ab83-bda4ae30f053","study_id":"bf46ee7b-a403-4562-a149-7811740eb6ab","volume_cm3":0.0},"target_id":"7d887f9f-a518-4065-ab83-bda4ae30f053","target_table":"lesion_observations"},{"id":"10208c27-cfac-4ae0-937a-043eb04a7acd","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"1c572a43-b5f7-4915-9167-0d577ca39887","observation_id":"7d887f9f-a518-4065-ab83-bda4ae30f053","study_id":"bf46ee7b-a403-4562-a149-7811740eb6ab"},"target_id":"7d887f9f-a518-4065-ab83-bda4ae30f053","target_table":"lesion_observations"},{"id":"33079d50-e49f-4bca-98af-d990e1368658","kind":"MEASUREMENT","label":"L03 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"e3cc1862-b0c2-404d-9620-b3125cd5ddde","observation_id":"6730331d-032a-437e-a3af-be8d0bb1c257","study_id":"bf46ee7b-a403-4562-a149-7811740eb6ab","volume_cm3":0.0},"target_id":"6730331d-032a-437e-a3af-be8d0bb1c257","target_table":"lesion_observations"},{"id":"7de47dad-3e8a-4e56-9671-cc3cb9bd09dd","kind":"SEGMENTATION","label":"Segmented enhancing for L03","locator":{"lesion_id":"e3cc1862-b0c2-404d-9620-b3125cd5ddde","observation_id":"6730331d-032a-437e-a3af-be8d0bb1c257","study_id":"bf46ee7b-a403-4562-a149-7811740eb6ab"},"target_id":"6730331d-032a-437e-a3af-be8d0bb1c257","target_table":"lesion_observations"},{"id":"45706439-8684-441f-9c5b-deadc2eb7319","kind":"MEASUREMENT","label":"L02 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"e01128b9-d80a-42e2-9743-21b1098bb9bc","observation_id":"0924c56e-ef14-427d-a372-319bccb4cf20","study_id":"bf46ee7b-a403-4562-a149-7811740eb6ab","volume_cm3":0.0},"target_id":"0924c56e-ef14-427d-a372-319bccb4cf20","target_table":"lesion_observations"},{"id":"6eebda81-5d2d-4097-a80f-01ca86c0a564","kind":"SEGMENTATION","label":"Segmented enhancing for L02","locator":{"lesion_id":"e01128b9-d80a-42e2-9743-21b1098bb9bc","observation_id":"0924c56e-ef14-427d-a372-319bccb4cf20","study_id":"bf46ee7b-a403-4562-a149-7811740eb6ab"},"target_id":"0924c56e-ef14-427d-a372-319bccb4cf20","target_table":"lesion_observations"},{"id":"9c652c99-32c1-4b40-814a-a52ed9ccb10b","kind":"MEASUREMENT","label":"L04 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"03fbc286-7b48-4e0f-bc7d-a7a5bc6bbbe3","observation_id":"f8dd7f1c-e9eb-413e-8876-dc1348b6ac13","study_id":"bf46ee7b-a403-4562-a149-7811740eb6ab","volume_cm3":0.0},"target_id":"f8dd7f1c-e9eb-413e-8876-dc1348b6ac13","target_table":"lesion_observations"},{"id":"fd729e95-043a-4b0d-a6ff-3547eda6db8c","kind":"SEGMENTATION","label":"Segmented enhancing for L04","locator":{"lesion_id":"03fbc286-7b48-4e0f-bc7d-a7a5bc6bbbe3","observation_id":"f8dd7f1c-e9eb-413e-8876-dc1348b6ac13","study_id":"bf46ee7b-a403-4562-a149-7811740eb6ab"},"target_id":"f8dd7f1c-e9eb-413e-8876-dc1348b6ac13","target_table":"lesion_observations"},{"id":"3938c1b9-c6a0-490e-a5ee-e8f6f9955e1d","kind":"PRIOR_STUDY","label":"Compared against preoperative","locator":{"study_id":"50c7e8b0-067e-4c68-b476-5f78dfcd7a62","timepoint":"preoperative"},"target_id":"50c7e8b0-067e-4c68-b476-5f78dfcd7a62","target_table":"studies"}],"id":"191df22c-4c07-4877-9263-b2d274e9fd5a","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_CHANGED","question_text":"What changed since the previous scan?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: LARGE_VOLUME_CHANGE","quality flag on input: WEAK_SCORE","quality flag on input: NO_INTERVAL","quality flag on input: BELOW_UNCERTAINTY","quality flag on input: NO_OVERLAP","composed from findings without a language model"],"safety_status":"PASSED"}]
|
api/ai-observations/4709627e-6d9f-467a-9c36-76e45ed24071.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"answer_text":"No measured enhancing volume changed by more than 25%. 4 lesions had no prior to compare against: L02 measures 3.4 mm\u00b3 (first measurement, no prior to compare); L03 measures 0.5 mm\u00b3 (first measurement, no prior to compare); L04 measures 0.2 mm\u00b3 (first measurement, no prior to compare); L05 measures 0.1 mm\u00b3 (first measurement, no prior to compare). Confidence 0.92; the interval between the two examinations is not recorded.","confidence":0.92,"created_at":"2026-08-18T22:19:38.943990Z","evidence_items":[{"id":"6b7080e9-2689-4fe8-a5a4-bd2ddf00a899","kind":"MEASUREMENT","label":"L02 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"31c8e958-ff3f-4b70-8949-b368b58d6287","observation_id":"b31ea8d2-26e2-4f18-88d0-a3f63349fde6","study_id":"49fff636-3d0c-4bbc-866d-fd34845e8803","volume_cm3":0.0},"target_id":"b31ea8d2-26e2-4f18-88d0-a3f63349fde6","target_table":"lesion_observations"},{"id":"ad06d09c-1f26-4ffa-b52c-5ee2b3d53f87","kind":"SEGMENTATION","label":"Segmented enhancing for L02","locator":{"lesion_id":"31c8e958-ff3f-4b70-8949-b368b58d6287","observation_id":"b31ea8d2-26e2-4f18-88d0-a3f63349fde6","study_id":"49fff636-3d0c-4bbc-866d-fd34845e8803"},"target_id":"b31ea8d2-26e2-4f18-88d0-a3f63349fde6","target_table":"lesion_observations"},{"id":"f4aacf44-7c50-4bd4-a030-26d9aa093049","kind":"MEASUREMENT","label":"L03 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"829204f4-53cb-4fc1-a74e-c73ebd9f5420","observation_id":"5c536362-9ba7-4327-8aa2-304c9f4e64f7","study_id":"49fff636-3d0c-4bbc-866d-fd34845e8803","volume_cm3":0.0},"target_id":"5c536362-9ba7-4327-8aa2-304c9f4e64f7","target_table":"lesion_observations"},{"id":"feeb2335-65d2-472d-829c-3f22d77e36b0","kind":"SEGMENTATION","label":"Segmented enhancing for L03","locator":{"lesion_id":"829204f4-53cb-4fc1-a74e-c73ebd9f5420","observation_id":"5c536362-9ba7-4327-8aa2-304c9f4e64f7","study_id":"49fff636-3d0c-4bbc-866d-fd34845e8803"},"target_id":"5c536362-9ba7-4327-8aa2-304c9f4e64f7","target_table":"lesion_observations"},{"id":"6d1eea9b-a4f4-48b8-b644-c868e717bf49","kind":"MEASUREMENT","label":"L04 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"30114963-0ca7-40e9-857a-cb4edfefe911","observation_id":"2199f51c-1c5e-4ed6-be4a-bad5fd5be320","study_id":"49fff636-3d0c-4bbc-866d-fd34845e8803","volume_cm3":0.0},"target_id":"2199f51c-1c5e-4ed6-be4a-bad5fd5be320","target_table":"lesion_observations"},{"id":"0c59425d-c34d-485b-bae0-aefbb3574d27","kind":"SEGMENTATION","label":"Segmented enhancing for L04","locator":{"lesion_id":"30114963-0ca7-40e9-857a-cb4edfefe911","observation_id":"2199f51c-1c5e-4ed6-be4a-bad5fd5be320","study_id":"49fff636-3d0c-4bbc-866d-fd34845e8803"},"target_id":"2199f51c-1c5e-4ed6-be4a-bad5fd5be320","target_table":"lesion_observations"},{"id":"e0770475-2729-43e4-bd80-997d241a0c4f","kind":"MEASUREMENT","label":"L05 volume 0.0 cm\u00b3 at recurrence","locator":{"lesion_id":"fbc33fe6-783a-4e4b-9785-49535c649a98","observation_id":"58b6d6cb-e075-4540-a601-ad338d376e94","study_id":"49fff636-3d0c-4bbc-866d-fd34845e8803","volume_cm3":0.0},"target_id":"58b6d6cb-e075-4540-a601-ad338d376e94","target_table":"lesion_observations"},{"id":"206c9a4f-f1c6-4500-a156-7b0ed8e65e27","kind":"SEGMENTATION","label":"Segmented enhancing for L05","locator":{"lesion_id":"fbc33fe6-783a-4e4b-9785-49535c649a98","observation_id":"58b6d6cb-e075-4540-a601-ad338d376e94","study_id":"49fff636-3d0c-4bbc-866d-fd34845e8803"},"target_id":"58b6d6cb-e075-4540-a601-ad338d376e94","target_table":"lesion_observations"}],"id":"35c08d3a-933a-44c6-b36d-f556577315d1","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_CHANGED","question_text":"What changed since the previous scan?","safety_notes":["quality flag on input: NO_INTERVAL","composed from findings without a language model"],"safety_status":"PASSED"}]
|
api/ai-observations/4ec108df-781d-4553-b5e0-56aa6c18c94a.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"answer_text":"No lesion was measured within 25% of its previous enhancing volume at recurrence. All 1 lesion with a measured change moved by more than that: L01 measures 5.4 mm\u00b3, decreased by 56.3% (6.9 mm\u00b3). Confidence 0.80; the correspondence to the prior lesion is not confident, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:44.795235Z","evidence_items":[{"id":"8076a4a9-bb6e-49aa-8a9a-492045d507ec","kind":"MEASUREMENT","label":"L01 volume 0.01 cm\u00b3 at recurrence","locator":{"lesion_id":"1108649e-d9b0-4d55-9ade-ad598f201934","observation_id":"ef290c1e-98a3-43cd-88d4-3c6e8b31a9e1","study_id":"9092c616-07c7-41e2-b50a-ea0bdca26e44","volume_cm3":0.01},"target_id":"ef290c1e-98a3-43cd-88d4-3c6e8b31a9e1","target_table":"lesion_observations"},{"id":"7ccb0523-6b69-40c8-9a54-66e4756ded25","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"1108649e-d9b0-4d55-9ade-ad598f201934","observation_id":"ef290c1e-98a3-43cd-88d4-3c6e8b31a9e1","study_id":"9092c616-07c7-41e2-b50a-ea0bdca26e44"},"target_id":"ef290c1e-98a3-43cd-88d4-3c6e8b31a9e1","target_table":"lesion_observations"}],"id":"eced4ed1-033d-491d-8e20-612e742d07bf","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_REMAINED_STABLE","question_text":"What remained stable?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"The largest total measured enhancing volume change was recorded at recurrence, 6.9 mm\u00b3 summed across 1 lesion, 154 days after the study it is compared with. Confidence 0.80; the correspondence to the prior lesion is not confident, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:44.739097Z","evidence_items":[{"id":"8208ecac-1422-4797-b52f-5175d29f5cb7","kind":"MEASUREMENT","label":"L01 volume 0.01 cm\u00b3 at recurrence","locator":{"lesion_id":"1108649e-d9b0-4d55-9ade-ad598f201934","observation_id":"ef290c1e-98a3-43cd-88d4-3c6e8b31a9e1","study_id":"9092c616-07c7-41e2-b50a-ea0bdca26e44","volume_cm3":0.01},"target_id":"ef290c1e-98a3-43cd-88d4-3c6e8b31a9e1","target_table":"lesion_observations"},{"id":"d128f5fb-7173-415c-8acf-96d9ea47a892","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"1108649e-d9b0-4d55-9ade-ad598f201934","observation_id":"ef290c1e-98a3-43cd-88d4-3c6e8b31a9e1","study_id":"9092c616-07c7-41e2-b50a-ea0bdca26e44"},"target_id":"ef290c1e-98a3-43cd-88d4-3c6e8b31a9e1","target_table":"lesion_observations"}],"id":"65dd1ad6-4c97-4c21-82b6-ba185aae1e72","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHEN_LARGEST_CHANGE","question_text":"When was the largest change measured?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"The largest measured enhancing volume change is L01 measures 5.4 mm\u00b3, decreased by 56.3% (6.9 mm\u00b3) at recurrence, compared against preoperative. This is the largest of 1 measured change across the timeline. Confidence 0.80; the correspondence to the prior lesion is not confident, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:44.679224Z","evidence_items":[{"id":"980f362c-4b93-4962-85ff-d9362ed54c13","kind":"MEASUREMENT","label":"L01 volume 0.01 cm\u00b3 at recurrence","locator":{"lesion_id":"1108649e-d9b0-4d55-9ade-ad598f201934","observation_id":"ef290c1e-98a3-43cd-88d4-3c6e8b31a9e1","study_id":"9092c616-07c7-41e2-b50a-ea0bdca26e44","volume_cm3":0.01},"target_id":"ef290c1e-98a3-43cd-88d4-3c6e8b31a9e1","target_table":"lesion_observations"},{"id":"b1dc0fe0-a008-4122-9dcc-bd0784434a23","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"1108649e-d9b0-4d55-9ade-ad598f201934","observation_id":"ef290c1e-98a3-43cd-88d4-3c6e8b31a9e1","study_id":"9092c616-07c7-41e2-b50a-ea0bdca26e44"},"target_id":"ef290c1e-98a3-43cd-88d4-3c6e8b31a9e1","target_table":"lesion_observations"},{"id":"69bbecd0-5817-4d88-8a00-197780c4bca6","kind":"PRIOR_STUDY","label":"Compared against preoperative","locator":{"study_id":"d117d92a-bdda-4456-bff9-a18b78431102","timepoint":"preoperative"},"target_id":"d117d92a-bdda-4456-bff9-a18b78431102","target_table":"studies"}],"id":"40040771-d151-49f4-98bb-bd516525b43b","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"LARGEST_CHANGE","question_text":"Which change is the largest?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"Measured enhancing volume changed by more than 25% for 1 lesion between preoperative and recurrence, 154 days apart: L01 measures 5.4 mm\u00b3, decreased by 56.3% (6.9 mm\u00b3). Confidence 0.80; the correspondence to the prior lesion is not confident, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:44.621050Z","evidence_items":[{"id":"7813dae5-a1dc-4101-a401-f9dcf0ca07e0","kind":"MEASUREMENT","label":"L01 volume 0.01 cm\u00b3 at recurrence","locator":{"lesion_id":"1108649e-d9b0-4d55-9ade-ad598f201934","observation_id":"ef290c1e-98a3-43cd-88d4-3c6e8b31a9e1","study_id":"9092c616-07c7-41e2-b50a-ea0bdca26e44","volume_cm3":0.01},"target_id":"ef290c1e-98a3-43cd-88d4-3c6e8b31a9e1","target_table":"lesion_observations"},{"id":"2af5ab25-1f4a-4279-a353-9adcfc2e561f","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"1108649e-d9b0-4d55-9ade-ad598f201934","observation_id":"ef290c1e-98a3-43cd-88d4-3c6e8b31a9e1","study_id":"9092c616-07c7-41e2-b50a-ea0bdca26e44"},"target_id":"ef290c1e-98a3-43cd-88d4-3c6e8b31a9e1","target_table":"lesion_observations"},{"id":"dec7c956-9a17-4067-b32b-78deb8f33894","kind":"PRIOR_STUDY","label":"Compared against preoperative","locator":{"study_id":"d117d92a-bdda-4456-bff9-a18b78431102","timepoint":"preoperative"},"target_id":"d117d92a-bdda-4456-bff9-a18b78431102","target_table":"studies"}],"id":"fa727aba-0004-43fe-8bde-95244e827c9f","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_CHANGED","question_text":"What changed since the previous scan?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"}]
|
api/ai-observations/5cbd85a6-01b0-40aa-b6ba-eb8a5dd942c3.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"answer_text":"No lesion was measured within 25% of its previous enhancing volume at recurrence. All 1 lesion with a measured change moved by more than that: L01 measures 9.9 mm\u00b3, increased by 74.6% (4.2 mm\u00b3). Confidence 0.80; the correspondence to the prior lesion is not confident, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:45.260926Z","evidence_items":[{"id":"ce379118-8249-4860-a03d-918e17c7abf1","kind":"MEASUREMENT","label":"L01 volume 0.01 cm\u00b3 at recurrence","locator":{"lesion_id":"8ed11258-94f9-4f70-8dd8-5c6978145285","observation_id":"2454f266-7772-4ebb-a39d-9383abbe4619","study_id":"824a3e19-8c80-4983-86c3-d5b15d10b882","volume_cm3":0.01},"target_id":"2454f266-7772-4ebb-a39d-9383abbe4619","target_table":"lesion_observations"},{"id":"7f0138a7-4c46-4132-9468-be633dcfc727","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"8ed11258-94f9-4f70-8dd8-5c6978145285","observation_id":"2454f266-7772-4ebb-a39d-9383abbe4619","study_id":"824a3e19-8c80-4983-86c3-d5b15d10b882"},"target_id":"2454f266-7772-4ebb-a39d-9383abbe4619","target_table":"lesion_observations"}],"id":"d7b47d10-e45a-42d8-bd3b-f9ce71a5248d","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_REMAINED_STABLE","question_text":"What remained stable?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"The largest total measured enhancing volume change was recorded at recurrence, 4.2 mm\u00b3 summed across 1 lesion, 80 days after the study it is compared with. Confidence 0.80; the correspondence to the prior lesion is not confident, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:45.209353Z","evidence_items":[{"id":"f44f10bb-cee5-4774-a146-b5cc652d5fc7","kind":"MEASUREMENT","label":"L01 volume 0.01 cm\u00b3 at recurrence","locator":{"lesion_id":"8ed11258-94f9-4f70-8dd8-5c6978145285","observation_id":"2454f266-7772-4ebb-a39d-9383abbe4619","study_id":"824a3e19-8c80-4983-86c3-d5b15d10b882","volume_cm3":0.01},"target_id":"2454f266-7772-4ebb-a39d-9383abbe4619","target_table":"lesion_observations"},{"id":"a24df315-8619-43b1-af38-9f7f71d80e50","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"8ed11258-94f9-4f70-8dd8-5c6978145285","observation_id":"2454f266-7772-4ebb-a39d-9383abbe4619","study_id":"824a3e19-8c80-4983-86c3-d5b15d10b882"},"target_id":"2454f266-7772-4ebb-a39d-9383abbe4619","target_table":"lesion_observations"}],"id":"9fe86627-9aea-494a-ab2a-0ee7b45d1636","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHEN_LARGEST_CHANGE","question_text":"When was the largest change measured?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"The largest measured enhancing volume change is L01 measures 9.9 mm\u00b3, increased by 74.6% (4.2 mm\u00b3) at recurrence, compared against preoperative. This is the largest of 1 measured change across the timeline. Confidence 0.80; the correspondence to the prior lesion is not confident, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:45.162317Z","evidence_items":[{"id":"c808a135-744e-440d-b3f1-70ceccf33199","kind":"MEASUREMENT","label":"L01 volume 0.01 cm\u00b3 at recurrence","locator":{"lesion_id":"8ed11258-94f9-4f70-8dd8-5c6978145285","observation_id":"2454f266-7772-4ebb-a39d-9383abbe4619","study_id":"824a3e19-8c80-4983-86c3-d5b15d10b882","volume_cm3":0.01},"target_id":"2454f266-7772-4ebb-a39d-9383abbe4619","target_table":"lesion_observations"},{"id":"fc92726a-aae4-4754-861a-1bb5cbc4dc0d","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"8ed11258-94f9-4f70-8dd8-5c6978145285","observation_id":"2454f266-7772-4ebb-a39d-9383abbe4619","study_id":"824a3e19-8c80-4983-86c3-d5b15d10b882"},"target_id":"2454f266-7772-4ebb-a39d-9383abbe4619","target_table":"lesion_observations"},{"id":"c2a233ad-d693-4d88-a2ea-fb73703abecd","kind":"PRIOR_STUDY","label":"Compared against preoperative","locator":{"study_id":"f476432c-9081-4a87-95e2-f2493a745fb1","timepoint":"preoperative"},"target_id":"f476432c-9081-4a87-95e2-f2493a745fb1","target_table":"studies"}],"id":"6b7d98e8-c714-47d8-a2fe-2b89011482ef","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"LARGEST_CHANGE","question_text":"Which change is the largest?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"Measured enhancing volume changed by more than 25% for 1 lesion between preoperative and recurrence, 80 days apart: L01 measures 9.9 mm\u00b3, increased by 74.6% (4.2 mm\u00b3). Confidence 0.80; the correspondence to the prior lesion is not confident, the similarity score for the correspondence is weak.","confidence":0.8,"created_at":"2026-08-18T22:19:45.108676Z","evidence_items":[{"id":"b0deb63f-e3a7-4500-9f3b-efbb0da52706","kind":"MEASUREMENT","label":"L01 volume 0.01 cm\u00b3 at recurrence","locator":{"lesion_id":"8ed11258-94f9-4f70-8dd8-5c6978145285","observation_id":"2454f266-7772-4ebb-a39d-9383abbe4619","study_id":"824a3e19-8c80-4983-86c3-d5b15d10b882","volume_cm3":0.01},"target_id":"2454f266-7772-4ebb-a39d-9383abbe4619","target_table":"lesion_observations"},{"id":"0052e096-79e5-49de-9e23-5aca73e80707","kind":"SEGMENTATION","label":"Segmented enhancing for L01","locator":{"lesion_id":"8ed11258-94f9-4f70-8dd8-5c6978145285","observation_id":"2454f266-7772-4ebb-a39d-9383abbe4619","study_id":"824a3e19-8c80-4983-86c3-d5b15d10b882"},"target_id":"2454f266-7772-4ebb-a39d-9383abbe4619","target_table":"lesion_observations"},{"id":"22471ba5-5a9a-4c1e-b221-f73b150e4ce0","kind":"PRIOR_STUDY","label":"Compared against preoperative","locator":{"study_id":"f476432c-9081-4a87-95e2-f2493a745fb1","timepoint":"preoperative"},"target_id":"f476432c-9081-4a87-95e2-f2493a745fb1","target_table":"studies"}],"id":"4e7860fd-b167-496d-8e74-69b909634d8e","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_CHANGED","question_text":"What changed since the previous scan?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: WEAK_SCORE","composed from findings without a language model"],"safety_status":"PASSED"}]
|
api/ai-observations/65c97660-6722-4a04-8a81-840ce91c1a8d.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"answer_text":"No lesion was measured within 25% of its previous enhancing volume at early-postoperative. All 2 lesions with a measured change moved by more than that: L02 measures 0.5 mm\u00b3, increased by 46.0% (0.2 mm\u00b3); L03 measures 0.0 mm\u00b3, decreased by 76.3% (0.1 mm\u00b3). Confidence 0.80; the interval between the two examinations is not recorded, the correspondence to the prior lesion is not confident, the lesion does not overlap its match in the prior study, the similarity score for the correspondence is weak, another lesion scored almost as well as this correspondence.","confidence":0.8,"created_at":"2026-08-18T22:19:42.193232Z","evidence_items":[{"id":"51fd9904-1013-4fd1-a1f8-1acf5105a09a","kind":"MEASUREMENT","label":"L02 volume 0.0 cm\u00b3 at early-postoperative","locator":{"lesion_id":"25e2590d-dde9-4bb6-a1b4-02606e776b65","observation_id":"d5343f9b-26e0-4081-a3a2-7a3709137d15","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3","volume_cm3":0.0},"target_id":"d5343f9b-26e0-4081-a3a2-7a3709137d15","target_table":"lesion_observations"},{"id":"8dbddf91-67c6-4a46-a407-5ea8ec658ce3","kind":"SEGMENTATION","label":"Segmented enhancing for L02","locator":{"lesion_id":"25e2590d-dde9-4bb6-a1b4-02606e776b65","observation_id":"d5343f9b-26e0-4081-a3a2-7a3709137d15","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3"},"target_id":"d5343f9b-26e0-4081-a3a2-7a3709137d15","target_table":"lesion_observations"},{"id":"5721a20c-a83e-4892-ad91-953507cdf547","kind":"MEASUREMENT","label":"L03 volume 0.0 cm\u00b3 at early-postoperative","locator":{"lesion_id":"0c772fe3-273f-4419-b816-c8ad71aebddd","observation_id":"f686fa80-7320-407a-b564-1d7cd3213357","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3","volume_cm3":0.0},"target_id":"f686fa80-7320-407a-b564-1d7cd3213357","target_table":"lesion_observations"},{"id":"08a53839-bdd7-4644-a3e5-24cd630ad986","kind":"SEGMENTATION","label":"Segmented enhancing for L03","locator":{"lesion_id":"0c772fe3-273f-4419-b816-c8ad71aebddd","observation_id":"f686fa80-7320-407a-b564-1d7cd3213357","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3"},"target_id":"f686fa80-7320-407a-b564-1d7cd3213357","target_table":"lesion_observations"}],"id":"a309413c-e467-4a41-9b49-386828312adf","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_REMAINED_STABLE","question_text":"What remained stable?","safety_notes":["quality flag on input: NO_INTERVAL","quality flag on input: MATCH_UNCERTAIN","quality flag on input: NO_OVERLAP","quality flag on input: WEAK_SCORE","quality flag on input: AMBIGUOUS_ALTERNATIVE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"The largest total measured enhancing volume change was recorded at early-postoperative, 0.3 mm\u00b3 summed across 2 lesions, 3 days after the study it is compared with. Confidence 0.80; the correspondence to the prior lesion is not confident, the lesion does not overlap its match in the prior study, the similarity score for the correspondence is weak, another lesion scored almost as well as this correspondence.","confidence":0.8,"created_at":"2026-08-18T22:19:42.125029Z","evidence_items":[{"id":"cc032b21-5eca-4046-9828-431151c5c677","kind":"MEASUREMENT","label":"L02 volume 0.0 cm\u00b3 at early-postoperative","locator":{"lesion_id":"25e2590d-dde9-4bb6-a1b4-02606e776b65","observation_id":"d5343f9b-26e0-4081-a3a2-7a3709137d15","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3","volume_cm3":0.0},"target_id":"d5343f9b-26e0-4081-a3a2-7a3709137d15","target_table":"lesion_observations"},{"id":"562d9695-3487-414a-9002-449c396db048","kind":"SEGMENTATION","label":"Segmented enhancing for L02","locator":{"lesion_id":"25e2590d-dde9-4bb6-a1b4-02606e776b65","observation_id":"d5343f9b-26e0-4081-a3a2-7a3709137d15","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3"},"target_id":"d5343f9b-26e0-4081-a3a2-7a3709137d15","target_table":"lesion_observations"},{"id":"d1412193-d90c-41ea-a8fa-1bfa0fb02571","kind":"MEASUREMENT","label":"L03 volume 0.0 cm\u00b3 at early-postoperative","locator":{"lesion_id":"0c772fe3-273f-4419-b816-c8ad71aebddd","observation_id":"f686fa80-7320-407a-b564-1d7cd3213357","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3","volume_cm3":0.0},"target_id":"f686fa80-7320-407a-b564-1d7cd3213357","target_table":"lesion_observations"},{"id":"467cd27b-4b94-461f-869d-785e2766d64c","kind":"SEGMENTATION","label":"Segmented enhancing for L03","locator":{"lesion_id":"0c772fe3-273f-4419-b816-c8ad71aebddd","observation_id":"f686fa80-7320-407a-b564-1d7cd3213357","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3"},"target_id":"f686fa80-7320-407a-b564-1d7cd3213357","target_table":"lesion_observations"}],"id":"595f491b-736d-43ae-80eb-2e7da463ced3","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHEN_LARGEST_CHANGE","question_text":"When was the largest change measured?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: NO_OVERLAP","quality flag on input: WEAK_SCORE","quality flag on input: AMBIGUOUS_ALTERNATIVE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"The largest measured enhancing volume change is L03 measures 0.0 mm\u00b3, decreased by 76.3% (0.1 mm\u00b3) at early-postoperative, compared against preoperative. This is the largest of 2 measured changes across the timeline. Confidence 0.80; the correspondence to the prior lesion is not confident, the similarity score for the correspondence is weak, another lesion scored almost as well as this correspondence.","confidence":0.8,"created_at":"2026-08-18T22:19:42.068871Z","evidence_items":[{"id":"e6a53046-085a-4975-8826-c29654044227","kind":"MEASUREMENT","label":"L03 volume 0.0 cm\u00b3 at early-postoperative","locator":{"lesion_id":"0c772fe3-273f-4419-b816-c8ad71aebddd","observation_id":"f686fa80-7320-407a-b564-1d7cd3213357","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3","volume_cm3":0.0},"target_id":"f686fa80-7320-407a-b564-1d7cd3213357","target_table":"lesion_observations"},{"id":"39789b0b-0331-45ec-b650-086dd17c466c","kind":"SEGMENTATION","label":"Segmented enhancing for L03","locator":{"lesion_id":"0c772fe3-273f-4419-b816-c8ad71aebddd","observation_id":"f686fa80-7320-407a-b564-1d7cd3213357","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3"},"target_id":"f686fa80-7320-407a-b564-1d7cd3213357","target_table":"lesion_observations"},{"id":"ead736b5-0fac-4035-8860-b78aa327a019","kind":"PRIOR_STUDY","label":"Compared against preoperative","locator":{"study_id":"02502ba4-5660-47b5-bffa-2670a34dfe7b","timepoint":"preoperative"},"target_id":"02502ba4-5660-47b5-bffa-2670a34dfe7b","target_table":"studies"}],"id":"60d3619c-6b46-4c6a-bb2a-d97f7935e5f4","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"LARGEST_CHANGE","question_text":"Which change is the largest?","safety_notes":["quality flag on input: MATCH_UNCERTAIN","quality flag on input: WEAK_SCORE","quality flag on input: AMBIGUOUS_ALTERNATIVE","composed from findings without a language model"],"safety_status":"PASSED"},{"answer_text":"Measured enhancing volume changed by more than 25% for 2 lesions between preoperative and early-postoperative, 3 days apart: L02 measures 0.5 mm\u00b3, increased by 46.0% (0.2 mm\u00b3); L03 measures 0.0 mm\u00b3, decreased by 76.3% (0.1 mm\u00b3). 4 lesions had no prior to compare against: L04 measures 0.8 mm\u00b3 (first measurement, no prior to compare); L05 measures 0.2 mm\u00b3 (first measurement, no prior to compare); L06 measures 0.0 mm\u00b3 (first measurement, no prior to compare); L07 measures 0.0 mm\u00b3 (first measurement, no prior to compare). Confidence 0.80; the interval between the two examinations is not recorded, the correspondence to the prior lesion is not confident, the lesion does not overlap its match in the prior study, the similarity score for the correspondence is weak, another lesion scored almost as well as this correspondence.","confidence":0.8,"created_at":"2026-08-18T22:19:42.010276Z","evidence_items":[{"id":"8c3e1021-a15a-412a-9118-63af7ae13b39","kind":"MEASUREMENT","label":"L04 volume 0.0 cm\u00b3 at early-postoperative","locator":{"lesion_id":"f0920ce3-fdfc-4b32-9478-e865a3e9cb74","observation_id":"c9f65a64-fd9b-4df2-b2b3-8ec76402c853","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3","volume_cm3":0.0},"target_id":"c9f65a64-fd9b-4df2-b2b3-8ec76402c853","target_table":"lesion_observations"},{"id":"c94656f0-1b49-4c68-b210-6454c1b7b7d0","kind":"SEGMENTATION","label":"Segmented enhancing for L04","locator":{"lesion_id":"f0920ce3-fdfc-4b32-9478-e865a3e9cb74","observation_id":"c9f65a64-fd9b-4df2-b2b3-8ec76402c853","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3"},"target_id":"c9f65a64-fd9b-4df2-b2b3-8ec76402c853","target_table":"lesion_observations"},{"id":"ee9fe71a-e41d-42ea-9613-dc990fef2ef8","kind":"MEASUREMENT","label":"L02 volume 0.0 cm\u00b3 at early-postoperative","locator":{"lesion_id":"25e2590d-dde9-4bb6-a1b4-02606e776b65","observation_id":"d5343f9b-26e0-4081-a3a2-7a3709137d15","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3","volume_cm3":0.0},"target_id":"d5343f9b-26e0-4081-a3a2-7a3709137d15","target_table":"lesion_observations"},{"id":"bdf5b9d6-ea3b-434f-93c4-dc8143ecc489","kind":"SEGMENTATION","label":"Segmented enhancing for L02","locator":{"lesion_id":"25e2590d-dde9-4bb6-a1b4-02606e776b65","observation_id":"d5343f9b-26e0-4081-a3a2-7a3709137d15","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3"},"target_id":"d5343f9b-26e0-4081-a3a2-7a3709137d15","target_table":"lesion_observations"},{"id":"1380c0d1-d1f5-4c3e-8849-1419155be45b","kind":"MEASUREMENT","label":"L05 volume 0.0 cm\u00b3 at early-postoperative","locator":{"lesion_id":"d73efc2a-804a-4a3a-96c6-946c678bfd02","observation_id":"94ac4c1c-da76-48ef-8f00-146253f4244c","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3","volume_cm3":0.0},"target_id":"94ac4c1c-da76-48ef-8f00-146253f4244c","target_table":"lesion_observations"},{"id":"8b453baa-e86b-4034-b9c3-d1f6a180000e","kind":"SEGMENTATION","label":"Segmented enhancing for L05","locator":{"lesion_id":"d73efc2a-804a-4a3a-96c6-946c678bfd02","observation_id":"94ac4c1c-da76-48ef-8f00-146253f4244c","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3"},"target_id":"94ac4c1c-da76-48ef-8f00-146253f4244c","target_table":"lesion_observations"},{"id":"080a8380-3988-4807-98d6-3606e37daa4d","kind":"MEASUREMENT","label":"L06 volume 0.0 cm\u00b3 at early-postoperative","locator":{"lesion_id":"b42056dd-8b55-48a2-84b7-0f96a36cea31","observation_id":"21443394-5deb-480c-b737-8ddd3fbc82f7","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3","volume_cm3":0.0},"target_id":"21443394-5deb-480c-b737-8ddd3fbc82f7","target_table":"lesion_observations"},{"id":"daa99788-7dc0-41fe-b85c-828a77cb98c5","kind":"SEGMENTATION","label":"Segmented enhancing for L06","locator":{"lesion_id":"b42056dd-8b55-48a2-84b7-0f96a36cea31","observation_id":"21443394-5deb-480c-b737-8ddd3fbc82f7","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3"},"target_id":"21443394-5deb-480c-b737-8ddd3fbc82f7","target_table":"lesion_observations"},{"id":"863bf131-4bfa-49ed-940c-bf203f0ab93d","kind":"MEASUREMENT","label":"L03 volume 0.0 cm\u00b3 at early-postoperative","locator":{"lesion_id":"0c772fe3-273f-4419-b816-c8ad71aebddd","observation_id":"f686fa80-7320-407a-b564-1d7cd3213357","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3","volume_cm3":0.0},"target_id":"f686fa80-7320-407a-b564-1d7cd3213357","target_table":"lesion_observations"},{"id":"719b72d4-dcd1-4bf3-9377-ebe2c85a6624","kind":"SEGMENTATION","label":"Segmented enhancing for L03","locator":{"lesion_id":"0c772fe3-273f-4419-b816-c8ad71aebddd","observation_id":"f686fa80-7320-407a-b564-1d7cd3213357","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3"},"target_id":"f686fa80-7320-407a-b564-1d7cd3213357","target_table":"lesion_observations"},{"id":"b3cd429b-fb88-4232-bba0-a1bc3e3ccc65","kind":"MEASUREMENT","label":"L07 volume 0.0 cm\u00b3 at early-postoperative","locator":{"lesion_id":"b0b9a542-83d4-4f7a-a140-88a75d4274e5","observation_id":"08f390d9-5939-41c4-bbce-1b7465a2f0eb","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3","volume_cm3":0.0},"target_id":"08f390d9-5939-41c4-bbce-1b7465a2f0eb","target_table":"lesion_observations"},{"id":"ced58fa9-67c2-4024-9b1f-5737b70d1b6e","kind":"SEGMENTATION","label":"Segmented enhancing for L07","locator":{"lesion_id":"b0b9a542-83d4-4f7a-a140-88a75d4274e5","observation_id":"08f390d9-5939-41c4-bbce-1b7465a2f0eb","study_id":"33bf232d-ced9-495b-9152-eb6d149877d3"},"target_id":"08f390d9-5939-41c4-bbce-1b7465a2f0eb","target_table":"lesion_observations"},{"id":"8bd14c14-f19d-49af-a997-da8792a3c730","kind":"PRIOR_STUDY","label":"Compared against preoperative","locator":{"study_id":"02502ba4-5660-47b5-bffa-2670a34dfe7b","timepoint":"preoperative"},"target_id":"02502ba4-5660-47b5-bffa-2670a34dfe7b","target_table":"studies"}],"id":"86e90d75-a2aa-4190-8c1a-730fffaaafd1","llm_model":"google/medgemma-27b-text-it","llm_provider":"none","question":"WHAT_CHANGED","question_text":"What changed since the previous scan?","safety_notes":["quality flag on input: NO_INTERVAL","quality flag on input: MATCH_UNCERTAIN","quality flag on input: NO_OVERLAP","quality flag on input: WEAK_SCORE","quality flag on input: AMBIGUOUS_ALTERNATIVE","composed from findings without a language model"],"safety_status":"PASSED"}]
|