@uptimizr/dashboard 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/out/404.html +1 -1
  2. package/out/__next.__PAGE__.txt +2 -2
  3. package/out/__next._full.txt +3 -3
  4. package/out/__next._head.txt +1 -1
  5. package/out/__next._index.txt +2 -2
  6. package/out/__next._tree.txt +2 -2
  7. package/out/_next/static/chunks/0927l-ygd5c8d.js +1 -0
  8. package/out/_next/static/chunks/09e4adtr6w0xe.js +1 -0
  9. package/out/_next/static/chunks/0g_v2zswo4l6f.js +1 -0
  10. package/out/_next/static/chunks/0o_tpe5tlugtr.js +3 -0
  11. package/out/_next/static/chunks/0pj9pajm2xz97.css +3 -0
  12. package/out/_next/static/chunks/{30yzu213bqtq0.js → 10fnxpln_5xfd.js} +1 -1
  13. package/out/_next/static/chunks/11v6j6q59u-f_.js +1 -0
  14. package/out/_next/static/chunks/{turbopack-2ropzf0axp1x9.js → turbopack-0sgd6pfbe1fy6.js} +1 -1
  15. package/out/_not-found/__next._full.txt +2 -2
  16. package/out/_not-found/__next._head.txt +1 -1
  17. package/out/_not-found/__next._index.txt +2 -2
  18. package/out/_not-found/__next._not-found.__PAGE__.txt +1 -1
  19. package/out/_not-found/__next._not-found.txt +1 -1
  20. package/out/_not-found/__next._tree.txt +2 -2
  21. package/out/_not-found.html +1 -1
  22. package/out/_not-found.txt +2 -2
  23. package/out/index.html +1 -1
  24. package/out/index.txt +3 -3
  25. package/package.json +4 -4
  26. package/out/_next/static/chunks/00zdau6mcqeae.js +0 -1
  27. package/out/_next/static/chunks/0tx1j_ghpz7rc.css +0 -3
  28. package/out/_next/static/chunks/1lsg-22yob8dx.js +0 -1
  29. package/out/_next/static/chunks/21o42k82w4llc.js +0 -1
  30. package/out/_next/static/chunks/2d09v5u7dfq0q.js +0 -1
  31. package/out/_next/static/chunks/2tws5udjdcmh3.js +0 -1
  32. package/out/_next/static/chunks/2yiy_l8bwiw2_.js +0 -3
  33. package/out/_next/static/chunks/30fq_t9e2_fv-.js +0 -1
  34. /package/out/_next/static/{Hn5EPlVBFzONWfhyS_1fO → yttuijl-0Cn9k8uTCfhIM}/_buildManifest.js +0 -0
  35. /package/out/_next/static/{Hn5EPlVBFzONWfhyS_1fO → yttuijl-0Cn9k8uTCfhIM}/_clientMiddlewareManifest.js +0 -0
  36. /package/out/_next/static/{Hn5EPlVBFzONWfhyS_1fO → yttuijl-0Cn9k8uTCfhIM}/_ssgManifest.js +0 -0
@@ -1,3 +0,0 @@
1
- @font-face{font-family:Space Grotesk;font-style:normal;font-weight:300 700;font-display:swap;src:url(../media/32687112bd2dd8db-s.1gepa_7fcx9fm.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Space Grotesk;font-style:normal;font-weight:300 700;font-display:swap;src:url(../media/28868e710e86be81-s.2eksvhm1z0jwa.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Space Grotesk;font-style:normal;font-weight:300 700;font-display:swap;src:url(../media/0c89a48fa5027cee-s.p.2cyn07wtgehh0.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Space Grotesk Fallback;src:local(Arial);ascent-override:89.71%;descent-override:26.62%;line-gap-override:0.0%;size-adjust:109.69%}.space_grotesk_59d6dcf5-module__z_Ctiq__className{font-family:Space Grotesk,Space Grotesk Fallback;font-style:normal}.space_grotesk_59d6dcf5-module__z_Ctiq__variable{--font-space-grotesk:"Space Grotesk", "Space Grotesk Fallback"}
2
- @font-face{font-family:JetBrains Mono;font-style:normal;font-weight:100 800;font-display:swap;src:url(../media/13bf9871fe164e7f-s.2f7nqdagzwx2-.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:100 800;font-display:swap;src:url(../media/cc545e633e20c56d-s.176arc174-8zp.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:100 800;font-display:swap;src:url(../media/71b036adf157cdcf-s.0bp8oijd_gu96.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:100 800;font-display:swap;src:url(../media/89b21bb081cb7469-s.1fby2rem9ngyr.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:100 800;font-display:swap;src:url(../media/3fe682a82f50d426-s.0vfdmo25voy_0.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:100 800;font-display:swap;src:url(../media/70bc3e132a0a741e-s.p.3t6q91iet4nsy.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:JetBrains Mono Fallback;src:local(Arial);ascent-override:75.79%;descent-override:22.29%;line-gap-override:0.0%;size-adjust:134.59%}.jetbrains_mono_38c99671-module__5Dhsuq__className{font-family:JetBrains Mono,JetBrains Mono Fallback;font-style:normal}.jetbrains_mono_38c99671-module__5Dhsuq__variable{--font-jetbrains-mono:"JetBrains Mono", "JetBrains Mono Fallback"}
3
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--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-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction: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-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;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:var(--font-jetbrains-mono), ui-monospace, SFMono-Regular, monospace;--color-red-300:#ffa3a3;--color-red-400:#ff6568;--color-red-900:#82181a;--color-red-950:#460809;--color-amber-300:#ffd236;--color-amber-400:#fcbb00;--color-emerald-300:#5ee9b5;--color-emerald-400:#00d294;--color-emerald-500:#00bb7f;--color-fuchsia-300:#f2a9ff;--color-fuchsia-400:#ec6cff;--color-fuchsia-500:#e12afb;--color-rose-300:#ffa2ae;--color-rose-400:#ff667f;--color-rose-500:#ff2357;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-normal:0em;--tracking-wide:.025em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--aspect-video:16 / 9;--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-ink:#161210;--color-panel:#201913;--color-edge:#34291f;--color-fg-hi:#f4eadf;--color-fg:#d8c8b8;--color-fg-muted:#a8917c;--color-saffron:#f4c84b;--color-amber:#eda63e;--color-ember:#e07b39;--font-display:var(--font-space-grotesk), system-ui, sans-serif;--font-body:system-ui, -apple-system, "Segoe UI", Roboto, sans-serif}@supports (color:lab(0% 0 0)){:root,:host{--color-red-300:lab(76.5514% 36.422 15.5335);--color-red-400:lab(63.7053% 60.745 31.3109);--color-red-900:lab(28.5139% 44.5539 29.0463);--color-red-950:lab(13.003% 29.04 16.7519);--color-amber-300:lab(86.4156% 6.13147 78.3961);--color-amber-400:lab(80.1641% 16.6016 99.2089);--color-emerald-300:lab(83.9203% -48.7124 13.8849);--color-emerald-400:lab(75.0771% -60.7313 19.4147);--color-emerald-500:lab(66.9756% -58.27 19.5419);--color-fuchsia-300:lab(78.5378% 39.3533 -32.9615);--color-fuchsia-400:lab(66.1178% 66.0652 -52.4733);--color-fuchsia-500:lab(56.4256% 83.132 -64.639);--color-rose-300:lab(76.6339% 38.3549 9.68835);--color-rose-400:lab(64.4125% 63.0291 19.2068);--color-rose-500:lab(56.101% 79.4328 31.4532)}}}@layer base{*,:after,:before,::backdrop{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}html,:host{-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;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{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}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,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{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-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{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:0}.inset-y-1{inset-block:var(--spacing)}.top-0{top:0}.top-2{top:calc(var(--spacing) * 2)}.top-3{top:calc(var(--spacing) * 3)}.top-6{top:calc(var(--spacing) * 6)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.bottom-3{bottom:calc(var(--spacing) * 3)}.left-0{left:0}.left-1\/2{left:50%}.left-3{left:calc(var(--spacing) * 3)}.isolate{isolation:isolate}.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-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.ml-1{margin-left:var(--spacing)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.aspect-video{aspect-ratio:var(--aspect-video)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-27\.5{height:calc(var(--spacing) * 27.5)}.h-full{height:100%}.max-h-64{max-height:calc(var(--spacing) * 64)}.w-2{width:calc(var(--spacing) * 2)}.w-4{width:calc(var(--spacing) * 4)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-36{width:calc(var(--spacing) * 36)}.w-37\.5{width:calc(var(--spacing) * 37.5)}.w-64{width:calc(var(--spacing) * 64)}.w-full{width:100%}.w-px{width:1px}.max-w-6xl{max-width:var(--container-6xl)}.max-w-44{max-width:calc(var(--spacing) * 44)}.max-w-\[12rem\]{max-width:12rem}.max-w-\[16rem\]{max-width:16rem}.max-w-\[20rem\]{max-width:20rem}.min-w-0{min-width:0}.min-w-36{min-width:calc(var(--spacing) * 36)}.min-w-40{min-width:calc(var(--spacing) * 40)}.min-w-56{min-width:calc(var(--spacing) * 56)}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.cursor-crosshair{cursor:crosshair}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.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}.gap-1{gap:var(--spacing)}.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-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * 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:var(--spacing)}.gap-y-3{row-gap:calc(var(--spacing) * 3)}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-amber{border-color:var(--color-amber)}.border-edge{border-color:var(--color-edge)}.border-ink\/60{border-color:#16121099}@supports (color:color-mix(in lab, red, red)){.border-ink\/60{border-color:color-mix(in oklab, var(--color-ink) 60%, transparent)}}.border-red-900\/60{border-color:#82181a99}@supports (color:color-mix(in lab, red, red)){.border-red-900\/60{border-color:color-mix(in oklab, var(--color-red-900) 60%, transparent)}}.border-transparent{border-color:#0000}.bg-amber{background-color:var(--color-amber)}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber\/10{background-color:#eda63e1a}@supports (color:color-mix(in lab, red, red)){.bg-amber\/10{background-color:color-mix(in oklab, var(--color-amber) 10%, transparent)}}.bg-amber\/15{background-color:#eda63e26}@supports (color:color-mix(in lab, red, red)){.bg-amber\/15{background-color:color-mix(in oklab, var(--color-amber) 15%, transparent)}}.bg-amber\/30{background-color:#eda63e4d}@supports (color:color-mix(in lab, red, red)){.bg-amber\/30{background-color:color-mix(in oklab, var(--color-amber) 30%, transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab, red, red)){.bg-black\/70{background-color:color-mix(in oklab, var(--color-black) 70%, transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500\/70{background-color:#00bb7fb3}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/70{background-color:color-mix(in oklab, var(--color-emerald-500) 70%, transparent)}}.bg-fg-muted{background-color:var(--color-fg-muted)}.bg-fg\/15{background-color:#d8c8b826}@supports (color:color-mix(in lab, red, red)){.bg-fg\/15{background-color:color-mix(in oklab, var(--color-fg) 15%, transparent)}}.bg-fuchsia-400\/30{background-color:#ec6cff4d}@supports (color:color-mix(in lab, red, red)){.bg-fuchsia-400\/30{background-color:color-mix(in oklab, var(--color-fuchsia-400) 30%, transparent)}}.bg-ink{background-color:var(--color-ink)}.bg-ink\/40{background-color:#16121066}@supports (color:color-mix(in lab, red, red)){.bg-ink\/40{background-color:color-mix(in oklab, var(--color-ink) 40%, transparent)}}.bg-ink\/50{background-color:#16121080}@supports (color:color-mix(in lab, red, red)){.bg-ink\/50{background-color:color-mix(in oklab, var(--color-ink) 50%, transparent)}}.bg-ink\/60{background-color:#16121099}@supports (color:color-mix(in lab, red, red)){.bg-ink\/60{background-color:color-mix(in oklab, var(--color-ink) 60%, transparent)}}.bg-ink\/80{background-color:#161210cc}@supports (color:color-mix(in lab, red, red)){.bg-ink\/80{background-color:color-mix(in oklab, var(--color-ink) 80%, transparent)}}.bg-ink\/90{background-color:#161210e6}@supports (color:color-mix(in lab, red, red)){.bg-ink\/90{background-color:color-mix(in oklab, var(--color-ink) 90%, transparent)}}.bg-ink\/95{background-color:#161210f2}@supports (color:color-mix(in lab, red, red)){.bg-ink\/95{background-color:color-mix(in oklab, var(--color-ink) 95%, transparent)}}.bg-panel{background-color:var(--color-panel)}.bg-red-950\/40{background-color:#46080966}@supports (color:color-mix(in lab, red, red)){.bg-red-950\/40{background-color:color-mix(in oklab, var(--color-red-950) 40%, transparent)}}.bg-rose-400{background-color:var(--color-rose-400)}.bg-rose-500\/20{background-color:#ff235733}@supports (color:color-mix(in lab, red, red)){.bg-rose-500\/20{background-color:color-mix(in oklab, var(--color-rose-500) 20%, transparent)}}.bg-saffron{background-color:var(--color-saffron)}.bg-transparent{background-color:#0000}.bg-white\/5{background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.bg-white\/5{background-color:color-mix(in oklab, var(--color-white) 5%, transparent)}}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.px-1{padding-inline:var(--spacing)}.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)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.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-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-1{padding-top:var(--spacing)}.pr-1{padding-right:var(--spacing)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pb-0\.5{padding-bottom:calc(var(--spacing) * .5)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-display{font-family:var(--font-display)}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.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-\[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-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.whitespace-nowrap{white-space:nowrap}.text-amber-300{color:var(--color-amber-300)}.text-emerald-300{color:var(--color-emerald-300)}.text-fg{color:var(--color-fg)}.text-fg-hi{color:var(--color-fg-hi)}.text-fg-muted{color:var(--color-fg-muted)}.text-fg-muted\/40{color:#a8917c66}@supports (color:color-mix(in lab, red, red)){.text-fg-muted\/40{color:color-mix(in oklab, var(--color-fg-muted) 40%, transparent)}}.text-fuchsia-300{color:var(--color-fuchsia-300)}.text-ink{color:var(--color-ink)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-rose-300{color:var(--color-rose-300)}.text-saffron{color:var(--color-saffron)}.text-white{color:var(--color-white)}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.accent-amber{accent-color:var(--color-amber)}.opacity-0{opacity:0}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-amber\/30{--tw-shadow-color:#eda63e4d}@supports (color:color-mix(in lab, red, red)){.shadow-amber\/30{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber) 30%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/20{--tw-shadow-color:#0003}@supports (color:color-mix(in lab, red, red)){.shadow-black\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/40{--tw-shadow-color:#0006}@supports (color:color-mix(in lab, red, red)){.shadow-black\/40{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 40%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-fuchsia-500\/30{--tw-shadow-color:#e12afb4d}@supports (color:color-mix(in lab, red, red)){.shadow-fuchsia-500\/30{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-fuchsia-500) 30%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-amber{--tw-ring-color:var(--color-amber)}.ring-amber\/30{--tw-ring-color:#eda63e4d}@supports (color:color-mix(in lab, red, red)){.ring-amber\/30{--tw-ring-color:color-mix(in oklab, var(--color-amber) 30%, transparent)}}.ring-fuchsia-300{--tw-ring-color:var(--color-fuchsia-300)}.ring-fuchsia-400\/30{--tw-ring-color:#ec6cff4d}@supports (color:color-mix(in lab, red, red)){.ring-fuchsia-400\/30{--tw-ring-color:color-mix(in oklab, var(--color-fuchsia-400) 30%, transparent)}}.ring-rose-400\/40{--tw-ring-color:#ff667f66}@supports (color:color-mix(in lab, red, red)){.ring-rose-400\/40{--tw-ring-color:color-mix(in oklab, var(--color-rose-400) 40%, transparent)}}.filter{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,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;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))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.group-focus-within\:opacity-100:is(:where(.group):focus-within *){opacity:1}@media (hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.first\:rounded-l-md:first-child{border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.last\:rounded-r-md:last-child{border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}@media (hover:hover){.hover\:border-amber:hover{border-color:var(--color-amber)}.hover\:border-amber\/60:hover{border-color:#eda63e99}@supports (color:color-mix(in lab, red, red)){.hover\:border-amber\/60:hover{border-color:color-mix(in oklab, var(--color-amber) 60%, transparent)}}.hover\:border-edge:hover{border-color:var(--color-edge)}.hover\:bg-ember:hover{background-color:var(--color-ember)}.hover\:bg-ink:hover{background-color:var(--color-ink)}.hover\:text-fg:hover{color:var(--color-fg)}.hover\:text-fg-hi:hover{color:var(--color-fg-hi)}.hover\:text-white:hover{color:var(--color-white)}}.focus\:border-saffron:focus{border-color:var(--color-saffron)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-amber:focus{--tw-ring-color:var(--color-amber)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width:40rem){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:p-8{padding:calc(var(--spacing) * 8)}}@media (min-width:64rem){.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}}:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}body{background-color:var(--color-ink);color:var(--color-fg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:var(--font-body)}h1,h2,h3,h4{font-family:var(--font-display)}code,kbd,samp,pre{font-family:var(--font-mono)}@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-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-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-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{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-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}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62238,42279,e=>{"use strict";let t=1/1.2;e.s(["ZOOM_IN_FACTOR",0,t,"ZOOM_OUT_FACTOR",0,1.2,"disableWheelZoom",0,function(e){e.inputs.removeByType("ArcRotateCameraMouseWheelInput")},"stepZoom",0,function(e,t){let n=e.lowerRadiusLimit??.01,s=e.upperRadiusLimit??1/0;e.radius=Math.min(s,Math.max(n,e.radius*t))}],62238);var n=e.i(29212);e.s(["ZoomButtons",0,function({onZoom:e}){let s="grid h-8 w-8 place-items-center rounded-md border border-edge bg-ink/80 text-lg leading-none text-fg backdrop-blur transition hover:bg-ink hover:text-white";return(0,n.jsxs)("div",{className:"absolute right-3 top-3 flex flex-col gap-1",children:[(0,n.jsx)("button",{type:"button","aria-label":"Zoom in",className:s,onClick:()=>e(t),children:"+"}),(0,n.jsx)("button",{type:"button","aria-label":"Zoom out",className:s,onClick:()=>e(1.2),children:"−"})]})}],42279)},59683,37660,e=>{"use strict";e.s(["attachMeshHover",0,function(e,t,n){let s=0,a=null,i=t=>{let i=t.offsetX,o=t.offsetY;s||(s=requestAnimationFrame(()=>{var t,l;let r;s=0;let c=e.pick(i,o,e=>e.isPickable&&e.isEnabled()),u=c?.pickedMesh?(t=c.pickedMesh,l=c.thinInstanceIndex??-1,(r=t.metadata)?l>=0&&r.hoverLabels?r.hoverLabels[l]??null:r.hoverLabel??null:null):null;u?n({label:u,x:i,y:o}):null!==a&&n(null),a=u}))},o=()=>{s&&(cancelAnimationFrame(s),s=0),null!==a&&(a=null,n(null))};return t.addEventListener("pointermove",i),t.addEventListener("pointerleave",o),()=>{t.removeEventListener("pointermove",i),t.removeEventListener("pointerleave",o),s&&cancelAnimationFrame(s)}}],59683);var t=e.i(29212),n=e.i(56054);e.s(["HeatLegend",0,function({title:e,lowLabel:s="low",highLabel:a="high",note:i}){return(0,t.jsxs)("div",{className:"pointer-events-none absolute bottom-3 left-3 rounded-md border border-edge bg-ink/80 px-3 py-2 text-fg backdrop-blur-sm",children:[(0,t.jsx)("div",{className:"mb-1 text-xs font-medium text-fg",children:e}),(0,t.jsx)("div",{className:"h-2 w-36 rounded-sm",style:{background:n.HEAT_GRADIENT}}),(0,t.jsxs)("div",{className:"mt-1 flex w-36 justify-between text-[10px] text-fg-muted",children:[(0,t.jsx)("span",{children:s}),(0,t.jsx)("span",{children:a})]}),i?(0,t.jsx)("div",{className:"mt-1 max-w-44 text-[10px] leading-tight text-fg-muted",children:i}):null]})}],37660)},24543,e=>{"use strict";var t=e.i(29212),n=e.i(94179);e.i(82665);var s=e.i(20880);let a="__other_sp__",i="__other_mesh__";function o(e){return`${e[0]}|${e[1]}|${e[2]}`}function l(e,t){return t<=1?0:1.4-e/(t-1)*2.8}var r=e.i(56054),c=e.i(62238),u=e.i(59683),h=e.i(37660),d=e.i(93425),m=e.i(42279);let f="__all__",b={maxStandpoints:6,maxMeshes:10,maxRibbons:70};function p(e,t){return`${e}|${t}`}function g({label:e,value:n,onChange:s,allLabel:a,options:i}){return(0,t.jsxs)("label",{className:"flex items-center gap-1.5 rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg backdrop-blur",children:[(0,t.jsx)("span",{className:"font-medium text-fg-muted",children:e}),(0,t.jsxs)("select",{className:"max-w-[12rem] bg-transparent text-white outline-none",value:n,onChange:e=>s(e.target.value),children:[(0,t.jsx)("option",{value:f,children:a}),i.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))]})]})}function x({active:e,onClick:n,children:s,disabled:a=!1,title:i}){return(0,t.jsx)("button",{type:"button",onClick:n,disabled:a,title:i,className:`rounded px-2 py-0.5 font-medium transition ${a?"cursor-not-allowed text-fg-muted/40":e?"bg-amber text-ink":"text-fg-muted hover:text-fg"}`,children:s})}function v({standpoints:e,proxyMeshes:s,selectedKey:a,onSelect:i}){let o=(0,n.useRef)(null),l=(0,n.useMemo)(()=>e.filter(e=>e.origin),[e]),r=(0,n.useMemo)(()=>{let e=1/0,t=-1/0,n=1/0,a=-1/0,i=(s,i)=>{e=Math.min(e,s),t=Math.max(t,s),n=Math.min(n,i),a=Math.max(a,i)};for(let e of s)i(e.aabb[0],e.aabb[2]),i(e.aabb[3],e.aabb[5]);for(let e of l)i(e.origin[0],e.origin[2]);return Number.isFinite(e)?(t-e<.001&&(e-=1,t+=1),a-n<.001&&(n-=1,a+=1),{minX:e,maxX:t,minZ:n,maxZ:a}):{minX:-1,maxX:1,minZ:-1,maxZ:1}},[s,l]),c=(0,n.useMemo)(()=>{let e=Math.min(134/(r.maxX-r.minX),94/(r.maxZ-r.minZ));return(t,n)=>[8+(t-r.minX)*e,8+(n-r.minZ)*e]},[r]),u=(0,n.useMemo)(()=>l.reduce((e,t)=>Math.max(e,t.count),1),[l]);return(0,n.useEffect)(()=>{let e=o.current,t=e?.getContext("2d");if(!t)return;let n=window.devicePixelRatio||1;for(let a of(e.width=150*n,e.height=110*n,t.setTransform(n,0,0,n,0,0),t.clearRect(0,0,150,110),t.fillStyle="rgba(8,10,14,0.85)",t.fillRect(0,0,150,110),t.strokeStyle="rgba(120,140,170,0.35)",t.lineWidth=1,s)){let[e,n]=c(a.aabb[0],a.aabb[2]),[s,i]=c(a.aabb[3],a.aabb[5]);t.strokeRect(Math.min(e,s),Math.min(n,i),Math.abs(s-e),Math.abs(i-n))}for(let e of l){let[n,s]=c(e.origin[0],e.origin[2]),i=2+e.count/u*4,o=e.key===a;t.beginPath(),t.arc(n,s,i,0,2*Math.PI),t.fillStyle=o?"rgba(242,115,242,1)":"rgba(242,115,242,0.55)",t.fill(),o&&(t.beginPath(),t.arc(n,s,i+2.5,0,2*Math.PI),t.strokeStyle="rgba(255,255,255,0.9)",t.lineWidth=1.5,t.stroke())}},[s,l,c,u,a]),(0,t.jsxs)("div",{className:"absolute right-3 top-3 rounded-md border border-edge bg-ink/80 p-1 backdrop-blur",children:[(0,t.jsx)("div",{className:"px-1 pb-0.5 text-[10px] font-medium text-fg-muted",children:"Standpoints (top view)"}),(0,t.jsx)("canvas",{ref:o,className:"h-27.5 w-37.5 cursor-pointer rounded",onClick:e=>{let t=o.current;if(!t||0===l.length)return;let n=t.getBoundingClientRect(),s=(e.clientX-n.left)/n.width*150,a=(e.clientY-n.top)/n.height*110,r=null,u=1/0;for(let e of l){let[t,n]=c(e.origin[0],e.origin[2]),i=(t-s)**2+(n-a)**2;i<u&&(u=i,r=e)}r&&u<=196&&i(r.key)}})]})}e.s(["FlowSankey3D",0,function({links:k,gridSize:w,proxyMeshes:j=[],maxLinks:z=80,baseUrl:y,apiKey:M,flowQuery:$,hasFirstPerson:_=!1}){let I=(0,n.useRef)(null),C=(0,n.useRef)(null),[P,S]=(0,n.useState)("loading"),[A,B]=(0,n.useState)(null),[L,N]=(0,n.useState)(f),[E,q]=(0,n.useState)(f),[R,O]=(0,n.useState)(f),[Z,T]=(0,n.useState)("aggregate"),[F,V]=(0,n.useState)(null),[W,H]=(0,n.useState)("all"),[X,D]=(0,n.useState)(k),U=!!(y&&$),K=(0,n.useMemo)(()=>$?JSON.stringify($):"",[$]),G=(0,n.useRef)(!1);(0,n.useEffect)(()=>{!G.current&&_&&(H("first-person"),G.current=!0)},[_]),(0,n.useEffect)(()=>{_&&"viewer"===W&&H("first-person")},[_,W]),(0,n.useEffect)(()=>{U||D(k)},[k,U]),(0,n.useEffect)(()=>{if(!y||!$)return;let e=!1,t=new s.CollectorApi(y,M??""),n="all"===W?void 0:W;return t.flowHeatmap({...$,bins:w,limit:400,groupByOrigin:!0,cameraMode:n}).then(t=>{e||D(t)}).catch(()=>{e||D([])}),()=>{e=!0}},[y,M,K,W,w]);let Y=(0,n.useMemo)(()=>{let e=new Map;for(let t of X){if(!t.originVoxel)continue;let n=o(t.originVoxel),s=t.origin,a=e.get(n);a?(a.count+=t.count,s&&(a.ox+=s[0]*t.count,a.oy+=s[1]*t.count,a.oz+=s[2]*t.count,a.wsum+=t.count)):e.set(n,{key:n,voxel:t.originVoxel,count:t.count,ox:s?s[0]*t.count:0,oy:s?s[1]*t.count:0,oz:s?s[2]*t.count:0,wsum:s?t.count:0})}return[...e.values()].map(e=>({key:e.key,voxel:e.voxel,count:e.count,origin:e.wsum>0?[e.ox/e.wsum,e.oy/e.wsum,e.oz/e.wsum]:void 0})).sort((e,t)=>t.count-e.count)},[X]),J=Y.length>0,Q=(0,n.useMemo)(()=>R===f?null:Y.find(e=>e.key===R)??null,[Y,R]),ee=(0,n.useMemo)(()=>(function(e,t,n,s){let r=e.filter(e=>e.originVoxel);if(0===r.length)return{standpoints:[],gazes:[],meshes:[],ribbons:[],maxCount:1};let c=t.slice(0,Math.max(1,s.maxStandpoints)),u=new Set(c.map(e=>e.key)),h=e=>{let t=e.originVoxel?o(e.originVoxel):a;return u.has(t)?t:a},d=new Map;for(let e of r)d.set(e.mesh,(d.get(e.mesh)??0)+e.count);let m=new Set([...d.entries()].sort((e,t)=>t[1]-e[1]).slice(0,Math.max(1,s.maxMeshes)).map(([e])=>e)),f=e=>m.has(e)?e:i,b=new Map;for(let e of r){let t=h(e),n=f(e.mesh),s=`${t}|${e.azimuth_bin}|${e.elevation_bin}|${n}`,a=b.get(s);a?a.count+=e.count:b.set(s,{standpointId:t,gazeId:`${t}|${e.azimuth_bin}|${e.elevation_bin}`,meshId:n,azimuthBin:e.azimuth_bin,elevationBin:e.elevation_bin,count:e.count})}let p=[...b.values()].sort((e,t)=>t.count-e.count),g=p.slice(0,Math.max(1,s.maxRibbons)),x=p.slice(Math.max(1,s.maxRibbons));if(x.length>0){let e=new Map(g.map(e=>[`${e.standpointId}|${e.azimuthBin}|${e.elevationBin}|${i}`,e]));for(let t of x){let n=`${t.standpointId}|${t.azimuthBin}|${t.elevationBin}|${i}`,s=e.get(n);if(s)s.count+=t.count;else{let s={standpointId:t.standpointId,gazeId:t.gazeId,meshId:i,azimuthBin:t.azimuthBin,elevationBin:t.elevationBin,count:t.count};e.set(n,s),g.push(s)}}}let v=new Set(g.map(e=>e.standpointId)),k=new Set(g.map(e=>e.meshId)),w=[...c.filter(e=>v.has(e.key)).map(e=>e.key),...v.has(a)?[a]:[]],j=w.map((e,t)=>{let n=c.find(t=>t.key===e),s=g.filter(t=>t.standpointId===e).reduce((e,t)=>e+t.count,0);return{id:e,kind:"standpoint",pos:[-2.6,l(t,w.length),0],count:s,label:n?`[${n.voxel[0]}, ${n.voxel[1]}, ${n.voxel[2]}]`:"Other standpoints",isOther:e===a}}),z=new Map(j.map(e=>[e.id,e.pos[1]])),y=new Map;for(let e of g)y.set(e.meshId,(y.get(e.meshId)??0)+e.count);let M=[...k].sort((e,t)=>(y.get(t)??0)-(y.get(e)??0));M.sort((e,t)=>(e===i)-(t===i));let $=M.map((e,t)=>({id:e,kind:"mesh",pos:[2.6,l(t,M.length),0],count:y.get(e)??0,label:e===i?"Other meshes":e,isOther:e===i})),_=new Map;for(let e of g){let t=_.get(e.gazeId);t?t.count+=e.count:_.set(e.gazeId,{az:e.azimuthBin,el:e.elevationBin,sp:e.standpointId,count:e.count})}let I=[..._.entries()].map(([e,t])=>{let s=z.get(t.sp)??0,a=(t.az+.5)/n-.5;return{id:e,kind:"gaze",pos:[0,s+((t.el+.5)/n-.5)*.85,1.6*a],count:t.count,label:`(${t.az}, ${t.el})`,isOther:!1}}),C=g.reduce((e,t)=>Math.max(e,t.count),1);return{standpoints:j,gazes:I,meshes:$,ribbons:g,maxCount:C}})(X,Y,w,b),[X,Y,w]),et="twostage"===Z&&J;(0,n.useEffect)(()=>{"twostage"!==Z||J||T("aggregate")},[Z,J]);let en=(0,n.useMemo)(()=>{if(R!==f&&J)return X.filter(e=>e.originVoxel&&o(e.originVoxel)===R);if(!J)return X;let e=new Map;for(let t of X){let n=`${t.azimuth_bin}|${t.elevation_bin}|${t.mesh}`,s=e.get(n);s?s.count+=t.count:e.set(n,{azimuth_bin:t.azimuth_bin,elevation_bin:t.elevation_bin,mesh:t.mesh,count:t.count})}return[...e.values()]},[X,R,J]),es=(0,n.useMemo)(()=>[...en].sort((e,t)=>t.count-e.count).slice(0,Math.max(1,z)),[en,z]),ea=(0,n.useMemo)(()=>{let e=new Map;for(let t of es)e.set(t.mesh,(e.get(t.mesh)??0)+t.count);return[...e.entries()].sort((e,t)=>t[1]-e[1])},[es]),ei=(0,n.useMemo)(()=>{let e=new Map;for(let t of es){let n=p(t.azimuth_bin,t.elevation_bin),s=e.get(n);s?s.count+=t.count:e.set(n,{azimuthBin:t.azimuth_bin,elevationBin:t.elevation_bin,count:t.count})}return[...e.values()].sort((e,t)=>t.count-e.count)},[es]);(0,n.useEffect)(()=>{!et&&L!==f&&(ea.some(([e])=>e===L)||N(f))},[et,L,ea]),(0,n.useEffect)(()=>{!et&&E!==f&&(ei.some(e=>p(e.azimuthBin,e.elevationBin)===E)||q(f))},[et,E,ei]),(0,n.useEffect)(()=>{!et&&R!==f&&(Y.some(e=>e.key===R)||O(f))},[et,R,Y]),(0,n.useEffect)(()=>{N(f),q(f),O(f)},[Z]);let eo=(0,n.useMemo)(()=>et?ee.ribbons.filter(e=>{let t=R===f||e.standpointId===R,n=E===f||p(e.azimuthBin,e.elevationBin)===E,s=L===f||e.meshId===L;return t&&n&&s}).length:es.filter(e=>{let t=E===f||p(e.azimuth_bin,e.elevation_bin)===E,n=L===f||e.mesh===L;return t&&n}).length,[et,ee,es,L,E,R]),el=et?ee.ribbons.length:es.length,er=(0,n.useMemo)(()=>et?ee.standpoints.map(e=>({value:e.id,label:`${e.label} \xb7 ${e.count}`})):Y.slice(0,24).map(e=>({value:e.key,label:`[${e.voxel[0]}, ${e.voxel[1]}, ${e.voxel[2]}] \xb7 ${e.count}`})),[et,ee,Y]),ec=(0,n.useMemo)(()=>{if(et){let e=new Map;for(let t of ee.ribbons){let n=p(t.azimuthBin,t.elevationBin),s=e.get(n);s?s.count+=t.count:e.set(n,{az:t.azimuthBin,el:t.elevationBin,count:t.count})}return[...e.values()].sort((e,t)=>t.count-e.count).map(e=>({value:p(e.az,e.el),label:`(${e.az}, ${e.el}) \xb7 ${e.count}`}))}return ei.map(e=>({value:p(e.azimuthBin,e.elevationBin),label:`(${e.azimuthBin}, ${e.elevationBin}) \xb7 ${e.count}`}))},[et,ee,ei]),eu=(0,n.useMemo)(()=>et?ee.meshes.map(e=>({value:e.id,label:`${e.label} \xb7 ${e.count}`})):ea.map(([e,t])=>({value:e,label:`${e} \xb7 ${t}`})),[et,ee,ea]);return(0,n.useEffect)(()=>{let t=I.current;if(!t||et)return;if(0===es.length)return void S("empty");let n=!1,s=null;return S("loading"),B(null),(async()=>{try{let[{Engine:a},{Scene:i},{ArcRotateCamera:o},{HemisphericLight:l},{Vector3:h,Color3:d,Color4:m},{MeshBuilder:b},{StandardMaterial:g}]=await Promise.all([e.A(66022),e.A(48505),e.A(53976),e.A(42436),e.A(89370),e.A(67141),e.A(20693),e.A(96664)]);if(n)return;let x=new a(t,!0,{preserveDrawingBuffer:!1}),v=new i(x);v.clearColor=new m(.04,.05,.07,1);let k=new Map;for(let e of j)k.set(e.name,function(e){let t=e.aabb;return[(t[0]+t[3])/2,(t[1]+t[4])/2,(t[2]+t[5])/2]}(e));let z=new Map,y=ea.map(([e])=>e).filter(e=>!k.has(e));for(let e=0;e<y.length;e++){let t=y[e],n=function(e){let t=0;for(let n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Math.abs(t)}(t),s=e/Math.max(1,y.length)*Math.PI*2+n%100/100*.35;z.set(t,[2.2*Math.cos(s),-.35+(n%7-3)*.06,2.2*Math.sin(s)])}for(let[e,t]of k.entries())z.set(e,t);let M=0,$=0,_=0,I=0;for(let e of z.values())M+=e[0],$+=e[1],_+=e[2],I++;let P=new h(M/Math.max(1,I),$/Math.max(1,I),_/Math.max(1,I)),A=1.8;for(let e of z.values()){let t=e[0]-P.x,n=e[1]-P.y,s=e[2]-P.z;A=Math.max(A,Math.sqrt(t*t+n*n+s*s))}let B=.75*A+1,N=Math.max(1,A/1.8),q=es.reduce((e,t)=>Math.max(e,t.count),1),R=new g("flow-source-node",v);R.disableLighting=!0,R.emissiveColor=new d(.45,.75,1);let O=new g("flow-target-node",v);O.disableLighting=!0,O.emissiveColor=new d(1,.82,.42);let Z=new Set,T=new Set,F=e=>{let t=E===f||p(e.azimuth_bin,e.elevation_bin)===E,n=L===f||e.mesh===L;return t&&n},W=new Set,H=new Set;for(let e of es)F(e)&&(W.add(p(e.azimuth_bin,e.elevation_bin)),H.add(e.mesh));for(let e of es){let t=`${e.azimuth_bin}|${e.elevation_bin}`,n=z.get(e.mesh);if(!n)continue;let s=F(e),a=(e.azimuth_bin+.5)/w*Math.PI*2-Math.PI,i=(e.elevation_bin+.5)/w*Math.PI-Math.PI/2,o=Math.cos(i),l=o*Math.cos(a),c=Math.sin(i),u=o*Math.sin(a),m=new h(P.x+l*B,P.y+c*B,P.z+u*B),p=new h(n[0],n[1],n[2]);if(!Z.has(t)){let e=b.CreateSphere(`flow-src-${t}`,{diameter:.12*N,segments:6},v);e.position=m;let n=R.clone(`flow-src-mat-${t}`);n.alpha=W.has(t)||L===f&&E===f?1:.22,e.material=n,e.isPickable=!1,Z.add(t)}if(!T.has(e.mesh)){let t=b.CreateSphere(`flow-target-${e.mesh}`,{diameter:.2*N,segments:7},v);t.position=p;let n=O.clone(`flow-target-mat-${e.mesh}`);n.alpha=H.has(e.mesh)||L===f&&E===f?1:.22,t.material=n,t.isPickable=!0,t.metadata={hoverLabel:e.mesh},T.add(e.mesh)}let x=m.add(p).scale(.5),k=x.subtract(P),j=Math.sqrt(k.x*k.x+k.y*k.y+k.z*k.z),y=j>1e-6?k.x/j:0,M=j>1e-6?k.y/j:1,$=j>1e-6?k.z/j:0,_=(.35+e.count/q*.75)*N,I=new h(x.x+y*_,x.y+M*_+.12*N,x.z+$*_),C=[];for(let e=0;e<=18;e++){let t=e/18,n=1-t;C.push(new h(n*n*m.x+2*n*t*I.x+t*t*p.x,n*n*m.y+2*n*t*I.y+t*t*p.y,n*n*m.z+2*n*t*I.z+t*t*p.z))}let S=e.count/q,[A,V,X]=(0,r.heatRgb)(S),D=b.CreateTube(`flow-link-${e.mesh}-${t}`,{path:C,radius:(s?1:.4)*(.012+.04*S)*N,tessellation:8,cap:0,sideOrientation:0},v),U=new g(`flow-link-mat-${e.mesh}-${t}`,v);U.disableLighting=!0,U.emissiveColor=new d(A,V,X),U.alpha=s?.35+.65*S:.08,D.material=U,D.isPickable=!0,D.metadata={hoverLabel:e.mesh}}let X=new o("flow-cam",Math.PI/4,Math.PI/3,3.4*A,P,v);X.attachControl(t,!0),(0,c.disableWheelZoom)(X),C.current=X,new l("flow-light",new h(.3,1,.2),v);let D=b.CreateSphere("flow-source-dome",{diameter:2*B,segments:20},v);D.position=P;let U=new g("flow-source-dome-mat",v);U.wireframe=!0,U.disableLighting=!0,U.emissiveColor=new d(.16,.2,.28),U.alpha=.35,D.material=U,D.isPickable=!1;let K=Q?.origin;if(K){let e=new h(K[0],K[1],K[2]),t=b.CreateSphere("flow-standpoint",{diameter:.26*N,segments:10},v);t.position=e;let n=new g("flow-standpoint-mat",v);n.disableLighting=!0,n.emissiveColor=new d(.95,.45,.95),t.material=n,t.isPickable=!1;let s=b.CreateLines("flow-standpoint-stem",{points:[e,new h(e.x,P.y,e.z)]},v);s.color=new d(.95,.45,.95),s.isPickable=!1}x.runRenderLoop(()=>v.render());let G=()=>x.resize();window.addEventListener("resize",G);let Y=(0,u.attachMeshHover)(v,t,V);S("ready"),s=()=>{window.removeEventListener("resize",G),Y(),V(null),C.current=null,v.dispose(),x.dispose()}}catch(e){if(n)return;S("error"),B(e instanceof Error?e.message:"Failed to render flow links.")}})(),()=>{n=!0,s?.()}},[es,w,j,L,E,Q,et]),(0,n.useEffect)(()=>{let t=I.current;if(!t||!et)return;if(0===ee.ribbons.length)return void S("empty");let n=!1,s=null;return S("loading"),B(null),(async()=>{try{let[{Engine:a},{Scene:i},{ArcRotateCamera:o},{HemisphericLight:l},{Vector3:h,Color3:d,Color4:m},{MeshBuilder:b},{StandardMaterial:g}]=await Promise.all([e.A(66022),e.A(48505),e.A(53976),e.A(42436),e.A(89370),e.A(67141),e.A(20693),e.A(96664)]);if(n)return;let x=new a(t,!0,{preserveDrawingBuffer:!1}),v=new i(x);v.clearColor=new m(.04,.05,.07,1);let k=e=>{let t=R===f||e.standpointId===R,n=E===f||p(e.azimuthBin,e.elevationBin)===E,s=L===f||e.meshId===L;return t&&n&&s},w=R!==f||E!==f||L!==f,j=new Set;for(let e of ee.ribbons)k(e)&&(j.add(e.standpointId),j.add(e.gazeId),j.add(e.meshId));let z={standpoint:[.95,.45,.95],gaze:[.45,.75,1],mesh:[1,.82,.42]},y={standpoint:.26,gaze:.13,mesh:.22},M=[...ee.standpoints,...ee.gazes,...ee.meshes],$=new Map(M.map(e=>[e.id,e.pos])),_=new Map(M.map(e=>[e.id,e.label]));for(let e of M){let t=b.CreateSphere(`ts-node-${e.kind}-${e.id}`,{diameter:y[e.kind],segments:8},v);t.position=new h(e.pos[0],e.pos[1],e.pos[2]);let n=new g(`ts-node-mat-${e.kind}-${e.id}`,v);n.disableLighting=!0;let[s,a,i]=z[e.kind];n.emissiveColor=new d(s,a,i),n.alpha=!w||j.has(e.id)?1:.2,t.material=n,t.isPickable=!0,t.metadata={hoverLabel:e.label}}let I=(e,t,n)=>{let s=e[0],a=e[1],i=e[2],o=t[0],l=t[1],r=t[2],c=[(s+o)/2,(a+l)/2+n,(i+r)/2],u=[];for(let e=0;e<=12;e++){let t=e/12,n=1-t;u.push(new h(n*n*s+2*n*t*c[0]+t*t*o,n*n*a+2*n*t*c[1]+t*t*l,n*n*i+2*n*t*c[2]+t*t*r))}return u};for(let e of ee.ribbons){let t=$.get(e.standpointId),n=$.get(e.gazeId),s=$.get(e.meshId);if(!t||!n||!s)continue;let a=e.count/ee.maxCount,i=.18+.5*a,o=[...I(t,n,i),...I(n,s,i).slice(1)],l=k(e),[c,u,h]=(0,r.heatRgb)(a),m=b.CreateTube(`ts-link-${e.standpointId}-${e.gazeId}-${e.meshId}`,{path:o,radius:(l?1:.4)*(.012+.04*a),tessellation:8,cap:0,sideOrientation:0},v),f=new g(`ts-link-mat-${e.standpointId}-${e.gazeId}-${e.meshId}`,v);f.disableLighting=!0,f.emissiveColor=new d(c,u,h),f.alpha=l?.35+.65*a:w?.06:.18,m.material=f,m.isPickable=!0,m.metadata={hoverLabel:_.get(e.meshId)??e.meshId}}let P=new o("ts-cam",Math.PI/2,Math.PI/2.4,8.5,h.Zero(),v);P.attachControl(t,!0),(0,c.disableWheelZoom)(P),C.current=P,new l("ts-light",new h(.3,1,.2),v),x.runRenderLoop(()=>v.render());let A=()=>x.resize();window.addEventListener("resize",A);let B=(0,u.attachMeshHover)(v,t,V);S("ready"),s=()=>{window.removeEventListener("resize",A),B(),V(null),C.current=null,v.dispose(),x.dispose()}}catch(e){if(n)return;S("error"),B(e instanceof Error?e.message:"Failed to render flow links.")}})(),()=>{n=!0,s?.()}},[et,ee,R,E,L]),(0,t.jsx)(d.Panel,{title:"Flow Sankey (3D)",subtitle:"Direction-bin → mesh links (aggregate), or standpoint → gaze → mesh (two-stage)",help:(0,t.jsxs)(t.Fragment,{children:["Each ",(0,t.jsx)("strong",{children:"source"})," is a camera ",(0,t.jsx)("em",{children:"gaze-direction bin"})," — a cell on the sphere of where viewers were looking (grouped by azimuth/elevation). Each"," ",(0,t.jsx)("strong",{children:"target"})," is a ",(0,t.jsx)("em",{children:"mesh that was clicked"}),". A ribbon's thickness is how many clicks on that mesh happened while viewers looked from that direction, so you can see which viewpoints drive interaction with which objects. When the scene reports"," ",(0,t.jsx)("em",{children:"standpoints"}),'(where the viewer stood, §7.8), pick one to gate the flow to clicks made from that vantage — a pin marks it in the scene. "All standpoints" is the aggregate view. Switch to ',(0,t.jsx)("strong",{children:"Two-stage"})," for a three-column"," ",(0,t.jsx)("em",{children:"standpoint → gaze sector → mesh"}),'flow with a birdview minimap; the busiest standpoints/meshes are kept and the tail folds into an "Other" node.']}),children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("canvas",{ref:I,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),F?(0,t.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-[16rem] truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:F.x+12,top:F.y+12},children:F.label}):null,"ready"===P?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"absolute left-3 top-3 flex flex-wrap gap-2",children:[J?(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-edge bg-ink/80 p-0.5 text-xs backdrop-blur",children:[(0,t.jsx)(x,{active:!et,onClick:()=>T("aggregate"),children:"Aggregate"}),(0,t.jsx)(x,{active:et,onClick:()=>T("twostage"),children:"Two-stage"})]}):null,U?(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-edge bg-ink/80 p-0.5 text-xs backdrop-blur",children:[(0,t.jsx)(x,{active:"first-person"===W,onClick:()=>H("first-person"),children:"Walk"}),(0,t.jsx)(x,{active:"viewer"===W,onClick:()=>H("viewer"),disabled:_,title:_?"Orbit (viewer) flow isn't available for walkable scenes":void 0,children:"Orbit"}),(0,t.jsx)(x,{active:"all"===W,onClick:()=>H("all"),children:"All"})]}):null,J?(0,t.jsx)(g,{label:"Standpoint",value:R,onChange:O,allLabel:"All standpoints",options:er}):null,(0,t.jsx)(g,{label:et?"Gaze":"Source",value:E,onChange:q,allLabel:et?"All gaze sectors":"All sources",options:ec}),(0,t.jsx)(g,{label:"Mesh",value:L,onChange:N,allLabel:"All meshes",options:eu})]}),et?(0,t.jsx)(v,{standpoints:Y,proxyMeshes:j,selectedKey:R,onSelect:e=>O(t=>t===e?f:e)}):null,(0,t.jsxs)("div",{className:"pointer-events-none absolute bottom-3 right-3 flex max-w-[20rem] flex-col items-end gap-2",children:[U&&!_?(0,t.jsxs)("div",{className:"rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg-muted backdrop-blur",children:["Orbit-dominated scene — viewer ",(0,t.jsx)("em",{children:"position"})," adds little here. Use the"," ",(0,t.jsx)("strong",{children:"View dome"})," (§7.5) above for where viewers looked."]}):null,(0,t.jsxs)("div",{className:"rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg backdrop-blur",children:["Active links: ",eo,"/",el]})]}),(0,t.jsx)(m.ZoomButtons,{onZoom:e=>C.current&&(0,c.stepZoom)(C.current,e)}),(0,t.jsx)(h.HeatLegend,{title:"Flow volume",lowLabel:"fewer links",highLabel:"dominant links",note:et?"Three columns: standpoint → gaze sector → mesh. Top standpoints/meshes are kept; the tail folds into an “Other” node. Pick a standpoint (or click the minimap), gaze sector, or mesh to emphasize matching ribbons.":"Each arc aggregates clicks from one camera-direction bin to a mesh. Pick a source or mesh to emphasize matching links and dim the rest."})]}):(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===P?"Rendering…":"empty"===P?"No aggregate flow links in range.":"error"===P?A??"Flow view unavailable.":null})]})})}],24543)},36471,e=>{e.n(e.i(24543))},66022,e=>{e.v(t=>Promise.all(["static/chunks/0ys9-ozuluawt.js","static/chunks/2ycvtdd68gub7.js","static/chunks/0v82oqyoy9zol.js","static/chunks/18u58lorfahxi.js","static/chunks/1nj82er7msdto.js","static/chunks/0ufbyo1x3qkmo.js","static/chunks/1yehxf-fmeicg.js"].map(t=>e.l(t))).then(()=>t(94080)))},48505,e=>{e.v(t=>Promise.all(["static/chunks/3v5ha25nxo43j.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3t06schbtqonl.js","static/chunks/1nj82er7msdto.js","static/chunks/3nz-dh9d7cehk.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/2u6shh3oeycm-.js"].map(t=>e.l(t))).then(()=>t(73073)))},53976,e=>{e.v(t=>Promise.all(["static/chunks/3v3-7fio3nw_t.js","static/chunks/10r_824wzt8hj.js","static/chunks/2aor7m-wbis85.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/0v82oqyoy9zol.js","static/chunks/25b9x-li-tvk2.js","static/chunks/2aelw3far6rii.js","static/chunks/0aznt7717miff.js","static/chunks/1_aahautsz2v_.js","static/chunks/1nj82er7msdto.js","static/chunks/3t06schbtqonl.js","static/chunks/18u58lorfahxi.js"].map(t=>e.l(t))).then(()=>t(18662)))},42436,e=>{e.v(t=>Promise.all(["static/chunks/37vzwr3ciejf1.js","static/chunks/157d9euci08yu.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/0v82oqyoy9zol.js"].map(t=>e.l(t))).then(()=>t(12847)))},89370,e=>{e.v(t=>Promise.all(["static/chunks/0dm32-jq30tg8.js","static/chunks/18u58lorfahxi.js","static/chunks/0v82oqyoy9zol.js"].map(t=>e.l(t))).then(()=>t(62566)))},67141,e=>{e.v(t=>Promise.all(["static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3mqy-84_ul3t2.js","static/chunks/1_aahautsz2v_.js","static/chunks/3t06schbtqonl.js","static/chunks/1thjncpj7u6pq.js","static/chunks/10r_824wzt8hj.js","static/chunks/1vdjn0pkoyypn.js","static/chunks/1nj82er7msdto.js","static/chunks/0aznt7717miff.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/2aelw3far6rii.js","static/chunks/3nz-dh9d7cehk.js"].map(t=>e.l(t))).then(()=>t(97998)))},20693,e=>{e.v(t=>Promise.all(["static/chunks/1-61zh4waha61.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/1zx2q-r32thv1.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3nz-dh9d7cehk.js","static/chunks/2u6shh3oeycm-.js","static/chunks/18u58lorfahxi.js","static/chunks/1_aahautsz2v_.js","static/chunks/1nj82er7msdto.js","static/chunks/3t06schbtqonl.js"].map(t=>e.l(t))).then(()=>t(32550)))},96664,e=>{e.v(t=>Promise.all(["static/chunks/1o1d0p-v1z8ty.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3t06schbtqonl.js","static/chunks/3pufs8g4ui943.js","static/chunks/1nj82er7msdto.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/2u6shh3oeycm-.js","static/chunks/3nz-dh9d7cehk.js"].map(t=>e.l(t))).then(()=>t(44981)))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62238,42279,t=>{"use strict";let e=1/1.2;t.s(["ZOOM_IN_FACTOR",0,e,"ZOOM_OUT_FACTOR",0,1.2,"disableWheelZoom",0,function(t){t.inputs.removeByType("ArcRotateCameraMouseWheelInput")},"stepZoom",0,function(t,e){let s=t.lowerRadiusLimit??.01,a=t.upperRadiusLimit??1/0;t.radius=Math.min(a,Math.max(s,t.radius*e))}],62238);var s=t.i(29212);t.s(["ZoomButtons",0,function({onZoom:t}){let a="grid h-8 w-8 place-items-center rounded-md border border-edge bg-ink/80 text-lg leading-none text-fg backdrop-blur transition hover:bg-ink hover:text-white";return(0,s.jsxs)("div",{className:"absolute right-3 top-3 flex flex-col gap-1",children:[(0,s.jsx)("button",{type:"button","aria-label":"Zoom in",className:a,onClick:()=>t(e),children:"+"}),(0,s.jsx)("button",{type:"button","aria-label":"Zoom out",className:a,onClick:()=>t(1.2),children:"−"})]})}],42279)},59683,37660,t=>{"use strict";t.s(["attachMeshHover",0,function(t,e,s){let a=0,n=null,i=e=>{let i=e.offsetX,r=e.offsetY;a||(a=requestAnimationFrame(()=>{var e,l;let c;a=0;let o=t.pick(i,r,t=>t.isPickable&&t.isEnabled()),h=o?.pickedMesh?(e=o.pickedMesh,l=o.thinInstanceIndex??-1,(c=e.metadata)?l>=0&&c.hoverLabels?c.hoverLabels[l]??null:c.hoverLabel??null:null):null;h?s({label:h,x:i,y:r}):null!==n&&s(null),n=h}))},r=()=>{a&&(cancelAnimationFrame(a),a=0),null!==n&&(n=null,s(null))};return e.addEventListener("pointermove",i),e.addEventListener("pointerleave",r),()=>{e.removeEventListener("pointermove",i),e.removeEventListener("pointerleave",r),a&&cancelAnimationFrame(a)}}],59683);var e=t.i(29212),s=t.i(56054);t.s(["HeatLegend",0,function({title:t,lowLabel:a="low",highLabel:n="high",note:i}){return(0,e.jsxs)("div",{className:"pointer-events-none absolute bottom-3 left-3 rounded-md border border-edge bg-ink/80 px-3 py-2 text-fg backdrop-blur-sm",children:[(0,e.jsx)("div",{className:"mb-1 text-xs font-medium text-fg",children:t}),(0,e.jsx)("div",{className:"h-2 w-36 rounded-sm",style:{background:s.HEAT_GRADIENT}}),(0,e.jsxs)("div",{className:"mt-1 flex w-36 justify-between text-[10px] text-fg-muted",children:[(0,e.jsx)("span",{children:a}),(0,e.jsx)("span",{children:n})]}),i?(0,e.jsx)("div",{className:"mt-1 max-w-44 text-[10px] leading-tight text-fg-muted",children:i}):null]})}],37660)},38413,t=>{"use strict";var e=t.i(29212),s=t.i(94179),a=t.i(56054),n=t.i(62238),i=t.i(59683),r=t.i(37660),l=t.i(93425),c=t.i(42279);function o({shape:t,onChange:s}){let a=t=>`h-8 px-2.5 text-xs font-medium leading-none transition first:rounded-l-md last:rounded-r-md ${t?"bg-ink text-white":"bg-ink/80 text-fg hover:text-white"}`,n="sphere"===t,i="cube"===t;return(0,e.jsxs)("div",{className:"absolute left-3 top-3 flex overflow-hidden rounded-md border border-edge backdrop-blur",role:"group","aria-label":"Voxel marker shape",children:[(0,e.jsx)("button",{type:"button",className:a(n),"aria-pressed":n,onClick:()=>s("sphere"),children:"Spheres"}),(0,e.jsx)("button",{type:"button",className:a(i),"aria-pressed":i,onClick:()=>s("cube"),children:"Cubes"})]})}t.s(["WorldHeatmap3D",0,function({voxels:h,cellSize:u,proxyMeshes:d=[],title:m="World heatmap (3D)",subtitle:j="Pointer hit-points voxel-binned in world space — drag to orbit, +/- to zoom",legendTitle:k="Pointer-hit density",legendLow:f="few hits",legendHigh:b="most hits",legendNote:v="Each marker is a voxel where the pointer hit your scene. Color & size scale with hits, normalized to the busiest cell.",emptyLabel:x="No 3D hit-points in range."}){let p=(0,s.useRef)(null),y=(0,s.useRef)(null),[g,w]=(0,s.useState)("loading"),[z,q]=(0,s.useState)(null),[A,M]=(0,s.useState)("sphere"),[_,C]=(0,s.useState)(null);return(0,s.useEffect)(()=>{let e=p.current;if(!e)return;if(0===h.length&&0===d.length)return void w("empty");let s=!1,r=null;return w("loading"),q(null),(async()=>{try{let[{Engine:l},{Scene:c},{ArcRotateCamera:o},{HemisphericLight:m},{Vector3:j,Color3:k,Color4:f,Matrix:b},{MeshBuilder:v},{StandardMaterial:x}]=await Promise.all([t.A(66022),t.A(48505),t.A(53976),t.A(42436),t.A(89370),t.A(67141),t.A(20693),t.A(9607),t.A(96664)]);if(s)return;let p=h.reduce((t,e)=>Math.max(t,e.count),1),g=0,z=0,q=0,M=0;for(let t of h)g+=(t.vx+.5)*u,z+=(t.vy+.5)*u,q+=(t.vz+.5)*u,M++;if(0===M)for(let t of d)g+=(t.aabb[0]+t.aabb[3])/2,z+=(t.aabb[1]+t.aabb[4])/2,q+=(t.aabb[2]+t.aabb[5])/2,M++;let _=new j(g/M,z/M,q/M),P=4*u;for(let t of h){let e=(t.vx+.5)*u-_.x,s=(t.vy+.5)*u-_.y,a=(t.vz+.5)*u-_.z;P=Math.max(P,Math.sqrt(e*e+s*s+a*a))}for(let t of d){let e=(t.aabb[0]+t.aabb[3])/2-_.x,s=(t.aabb[1]+t.aabb[4])/2-_.y,a=(t.aabb[2]+t.aabb[5])/2-_.z;P=Math.max(P,Math.sqrt(e*e+s*s+a*a))}let L=new l(e,!0,{preserveDrawingBuffer:!1}),N=new c(L);N.clearColor=new f(.04,.05,.07,1);let R=new o("world-cam",Math.PI/4,Math.PI/3,2.4*P,_,N);if(R.attachControl(e,!0),(0,n.disableWheelZoom)(R),y.current=R,new m("world-light",new j(.4,1,.3),N),d.length>0){let t=v.CreateBox("scene-proxy",{size:1},N),e=new x("scene-proxy-mat",N);e.wireframe=!0,e.disableLighting=!0,e.emissiveColor=new k(.32,.4,.52),e.alpha=.35,t.material=e,t.isPickable=!0,t.thinInstanceEnablePicking=!0,t.metadata={hoverLabels:d.map(t=>t.name)};let s=d.length,a=new Float32Array(16*s);for(let t=0;t<s;t++){let e=d[t].aabb,s=Math.max(e[3]-e[0],.001),n=Math.max(e[4]-e[1],.001),i=Math.max(e[5]-e[2],.001);b.Scaling(s,n,i).multiply(b.Translation((e[0]+e[3])/2,(e[1]+e[4])/2,(e[2]+e[5])/2)).copyToArray(a,16*t)}t.thinInstanceSetBuffer("matrix",a,16,!0)}if(h.length>0){let t="cube"===A?v.CreateBox("world-voxel",{size:.9*u},N):v.CreateSphere("world-voxel",{diameter:.9*u,segments:6},N),e=new x("world-voxel-mat",N);e.diffuseColor=new k(1,1,1),e.specularColor=new k(0,0,0),t.material=e;let s=h.length,n=new Float32Array(16*s),i=new Float32Array(4*s),r=new Float32Array(s),l=Math.max(.02*P,.25*u)/(.9*u);for(let t=0;t<s;t++){let e=h[t],s=e.count/p,c=l*(.5+.5*s);r[t]=c,b.Scaling(c,c,c).multiply(b.Translation((e.vx+.5)*u,(e.vy+.5)*u,(e.vz+.5)*u)).copyToArray(n,16*t);let[o,d,m]=(0,a.heatRgb)(s);i[4*t]=o,i[4*t+1]=d,i[4*t+2]=m,i[4*t+3]=1}t.thinInstanceSetBuffer("matrix",n,16,!1),t.thinInstanceSetBuffer("color",i,4,!0);let c=R.radius,o=0,d=()=>{let e=Math.min(8,Math.max(.6,R.radius/c));if(!(.01>Math.abs(e-o))){o=e;for(let t=0;t<s;t++){let s=r[t]*e,a=16*t;n[a]=s,n[a+5]=s,n[a+10]=s}t.thinInstanceBufferUpdated("matrix")}};d(),N.onBeforeRenderObservable.add(d)}L.runRenderLoop(()=>N.render());let T=()=>L.resize();window.addEventListener("resize",T);let B=(0,i.attachMeshHover)(N,e,C);w("ready"),r=()=>{window.removeEventListener("resize",T),B(),C(null),y.current=null,N.dispose(),L.dispose()}}catch(t){if(s)return;w("error"),q(t instanceof Error?t.message:"Failed to render heatmap.")}})(),()=>{s=!0,r?.()}},[h,u,d,A]),(0,e.jsx)(l.Panel,{title:m,subtitle:j,children:(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsx)("canvas",{ref:p,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),_?(0,e.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-[16rem] truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:_.x+12,top:_.y+12},children:_.label}):null,"ready"===g?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(o,{shape:A,onChange:M}),(0,e.jsx)(c.ZoomButtons,{onZoom:t=>y.current&&(0,n.stepZoom)(y.current,t)}),(0,e.jsx)(r.HeatLegend,{title:k,lowLabel:f,highLabel:b,note:v})]}):(0,e.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===g?"Rendering…":"empty"===g?x:"error"===g?z??"Heatmap unavailable.":null})]})})}])},25453,t=>{t.n(t.i(38413))},66022,t=>{t.v(e=>Promise.all(["static/chunks/0ys9-ozuluawt.js","static/chunks/2ycvtdd68gub7.js","static/chunks/0v82oqyoy9zol.js","static/chunks/18u58lorfahxi.js","static/chunks/1nj82er7msdto.js","static/chunks/0ufbyo1x3qkmo.js","static/chunks/1yehxf-fmeicg.js"].map(e=>t.l(e))).then(()=>e(94080)))},48505,t=>{t.v(e=>Promise.all(["static/chunks/3v5ha25nxo43j.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3t06schbtqonl.js","static/chunks/1nj82er7msdto.js","static/chunks/3nz-dh9d7cehk.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/2u6shh3oeycm-.js"].map(e=>t.l(e))).then(()=>e(73073)))},53976,t=>{t.v(e=>Promise.all(["static/chunks/3v3-7fio3nw_t.js","static/chunks/10r_824wzt8hj.js","static/chunks/2aor7m-wbis85.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/0v82oqyoy9zol.js","static/chunks/25b9x-li-tvk2.js","static/chunks/2aelw3far6rii.js","static/chunks/0aznt7717miff.js","static/chunks/1_aahautsz2v_.js","static/chunks/1nj82er7msdto.js","static/chunks/3t06schbtqonl.js","static/chunks/18u58lorfahxi.js"].map(e=>t.l(e))).then(()=>e(18662)))},42436,t=>{t.v(e=>Promise.all(["static/chunks/37vzwr3ciejf1.js","static/chunks/157d9euci08yu.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/0v82oqyoy9zol.js"].map(e=>t.l(e))).then(()=>e(12847)))},89370,t=>{t.v(e=>Promise.all(["static/chunks/0dm32-jq30tg8.js","static/chunks/18u58lorfahxi.js","static/chunks/0v82oqyoy9zol.js"].map(e=>t.l(e))).then(()=>e(62566)))},67141,t=>{t.v(e=>Promise.all(["static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3mqy-84_ul3t2.js","static/chunks/1_aahautsz2v_.js","static/chunks/3t06schbtqonl.js","static/chunks/1thjncpj7u6pq.js","static/chunks/10r_824wzt8hj.js","static/chunks/1vdjn0pkoyypn.js","static/chunks/1nj82er7msdto.js","static/chunks/0aznt7717miff.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/2aelw3far6rii.js","static/chunks/3nz-dh9d7cehk.js"].map(e=>t.l(e))).then(()=>e(97998)))},20693,t=>{t.v(e=>Promise.all(["static/chunks/1-61zh4waha61.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/1zx2q-r32thv1.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3nz-dh9d7cehk.js","static/chunks/2u6shh3oeycm-.js","static/chunks/18u58lorfahxi.js","static/chunks/1_aahautsz2v_.js","static/chunks/1nj82er7msdto.js","static/chunks/3t06schbtqonl.js"].map(e=>t.l(e))).then(()=>e(32550)))},9607,t=>{t.v(e=>Promise.all(["static/chunks/2szdcpl41-kzv.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/3t06schbtqonl.js","static/chunks/10r_824wzt8hj.js","static/chunks/0aznt7717miff.js","static/chunks/1_aahautsz2v_.js","static/chunks/1nj82er7msdto.js","static/chunks/2aelw3far6rii.js","static/chunks/18u58lorfahxi.js","static/chunks/0v82oqyoy9zol.js"].map(e=>t.l(e))).then(()=>e(26831)))},96664,t=>{t.v(e=>Promise.all(["static/chunks/1o1d0p-v1z8ty.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3t06schbtqonl.js","static/chunks/3pufs8g4ui943.js","static/chunks/1nj82er7msdto.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/2u6shh3oeycm-.js","static/chunks/3nz-dh9d7cehk.js"].map(e=>t.l(e))).then(()=>e(44981)))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62238,42279,t=>{"use strict";let e=1/1.2;t.s(["ZOOM_IN_FACTOR",0,e,"ZOOM_OUT_FACTOR",0,1.2,"disableWheelZoom",0,function(t){t.inputs.removeByType("ArcRotateCameraMouseWheelInput")},"stepZoom",0,function(t,e){let s=t.lowerRadiusLimit??.01,a=t.upperRadiusLimit??1/0;t.radius=Math.min(a,Math.max(s,t.radius*e))}],62238);var s=t.i(29212);t.s(["ZoomButtons",0,function({onZoom:t}){let a="grid h-8 w-8 place-items-center rounded-md border border-edge bg-ink/80 text-lg leading-none text-fg backdrop-blur transition hover:bg-ink hover:text-white";return(0,s.jsxs)("div",{className:"absolute right-3 top-3 flex flex-col gap-1",children:[(0,s.jsx)("button",{type:"button","aria-label":"Zoom in",className:a,onClick:()=>t(e),children:"+"}),(0,s.jsx)("button",{type:"button","aria-label":"Zoom out",className:a,onClick:()=>t(1.2),children:"−"})]})}],42279)},59683,37660,t=>{"use strict";t.s(["attachMeshHover",0,function(t,e,s){let a=0,n=null,i=e=>{let i=e.offsetX,o=e.offsetY;a||(a=requestAnimationFrame(()=>{var e,r;let c;a=0;let l=t.pick(i,o,t=>t.isPickable&&t.isEnabled()),h=l?.pickedMesh?(e=l.pickedMesh,r=l.thinInstanceIndex??-1,(c=e.metadata)?r>=0&&c.hoverLabels?c.hoverLabels[r]??null:c.hoverLabel??null:null):null;h?s({label:h,x:i,y:o}):null!==n&&s(null),n=h}))},o=()=>{a&&(cancelAnimationFrame(a),a=0),null!==n&&(n=null,s(null))};return e.addEventListener("pointermove",i),e.addEventListener("pointerleave",o),()=>{e.removeEventListener("pointermove",i),e.removeEventListener("pointerleave",o),a&&cancelAnimationFrame(a)}}],59683);var e=t.i(29212),s=t.i(56054);t.s(["HeatLegend",0,function({title:t,lowLabel:a="low",highLabel:n="high",note:i}){return(0,e.jsxs)("div",{className:"pointer-events-none absolute bottom-3 left-3 rounded-md border border-edge bg-ink/80 px-3 py-2 text-fg backdrop-blur-sm",children:[(0,e.jsx)("div",{className:"mb-1 text-xs font-medium text-fg",children:t}),(0,e.jsx)("div",{className:"h-2 w-36 rounded-sm",style:{background:s.HEAT_GRADIENT}}),(0,e.jsxs)("div",{className:"mt-1 flex w-36 justify-between text-[10px] text-fg-muted",children:[(0,e.jsx)("span",{children:a}),(0,e.jsx)("span",{children:n})]}),i?(0,e.jsx)("div",{className:"mt-1 max-w-44 text-[10px] leading-tight text-fg-muted",children:i}):null]})}],37660)},47273,t=>{"use strict";var e=t.i(29212),s=t.i(94179);function a(t){return Number.isNaN(t)||t<0?0:t>1?1:t}function n(t){let e=a(t),s=[[0,.1,.9],[0,.85,1],[.1,.9,.2],[1,.85,0],[1,.15,0],[1,1,1]],n=s.length-1,i=e*n,o=Math.min(Math.floor(i),n-1),r=i-o,c=s[o],l=s[o+1];return c&&l?[c[0]+(l[0]-c[0])*r,c[1]+(l[1]-c[1])*r,c[2]+(l[2]-c[2])*r]:[1,1,1]}var i=t.i(56054),o=t.i(62238),r=t.i(59683),c=t.i(37660),l=t.i(93425),h=t.i(42279);t.s(["CameraDome3D",0,function({bins:u,gridSize:d}){let m=(0,s.useRef)(null),j=(0,s.useRef)(null),[k,f]=(0,s.useState)("loading"),[v,b]=(0,s.useState)(null),[p,g]=(0,s.useState)("markers"),[w,x]=(0,s.useState)(null);return(0,s.useEffect)(()=>{let e=m.current;if(!e)return;if(0===u.length)return void f("empty");let s=!1,c=null;return f("loading"),b(null),(async()=>{try{let[{Engine:l},{Scene:h},{ArcRotateCamera:m},{HemisphericLight:k},{Vector3:v,Color3:b,Color4:g,Matrix:w},{MeshBuilder:y},{StandardMaterial:z},{Mesh:M},{DynamicTexture:P}]=await Promise.all([t.A(66022),t.A(48505),t.A(53976),t.A(42436),t.A(89370),t.A(67141),t.A(20693),t.A(8850),t.A(63836),t.A(9607),t.A(96664)]);if(s)return;let _=new l(e,!0,{preserveDrawingBuffer:!1}),q=new h(_);q.clearColor=new g(.04,.05,.07,1);let A=new m("dome-cam",Math.PI/3,Math.PI/2.4,3.6,v.Zero(),q);A.attachControl(e,!0),A.lowerRadiusLimit=1.6,A.upperRadiusLimit=8,(0,o.disableWheelZoom)(A),j.current=A,new k("dome-light",new v(.3,1,.2),q);let I=y.CreateSphere("dome",{diameter:2,segments:20},q),C=new z("dome-mat",q);C.wireframe=!0,C.disableLighting=!0,C.emissiveColor=new b(.16,.2,.28),C.alpha=.5,I.material=C,I.isPickable=!1;let L=[];for(let t=0;t<=64;t++){let e=t/64*Math.PI*2;L.push(new v(Math.cos(e),0,Math.sin(e)))}let N=y.CreateLines("dome-horizon",{points:L},q);N.color=new b(.3,.36,.46),N.isPickable=!1;let B=y.CreateLines("dome-forward",{points:[v.Zero(),new v(1.25,0,0)]},q);B.color=new b(.4,.7,.95),B.isPickable=!1;let R=u.reduce((t,e)=>Math.max(t,e.count),1),S=d>0?d:1;if("markers"===p){let t=y.CreateBox("dome-marker",{size:1},q),e=new z("dome-marker-mat",q);e.disableLighting=!0,e.emissiveColor=b.White(),e.specularColor=new b(0,0,0),t.material=e,t.isPickable=!0,t.thinInstanceEnablePicking=!0;let s=u.length,a=new Float32Array(16*s),n=new Float32Array(4*s),o=Array(s);for(let t=0;t<s;t++){let e=u[t],s=(e.azimuth_bin+.5)/S*Math.PI*2-Math.PI,r=(e.elevation_bin+.5)/S*Math.PI-Math.PI/2,c=Math.cos(r),l=c*Math.cos(s),h=Math.sin(r),d=c*Math.sin(s),m=e.count/R,j=.03+.12*m;w.Scaling(j,j,j).multiply(w.Translation(l,h,d)).copyToArray(a,16*t);let[k,f,v]=(0,i.heatRgb)(m);n[4*t]=k,n[4*t+1]=f,n[4*t+2]=v,n[4*t+3]=1,o[t]=`dir (${e.azimuth_bin}, ${e.elevation_bin}) \xb7 ${e.count}`}t.thinInstanceSetBuffer("matrix",a,16,!0),t.thinInstanceSetBuffer("color",n,4,!0),t.metadata={hoverLabels:o}}else{let t=function(t,e={}){let s=void 0!==e.width&&e.width>0?Math.floor(e.width):256,i=void 0!==e.height&&e.height>0?Math.floor(e.height):Math.max(1,Math.floor(s/2)),o=e.colorRamp??n,r=void 0!==e.blurBins&&e.blurBins>0?e.blurBins:1.5,c=a(e.alphaFloor??0),l=a(e.opacity??1),h=t.gridSize>0?t.gridSize:1,u=new Uint8ClampedArray(s*i*4),d=t.bins.filter(t=>t.count>0);if(0===d.length)return{width:s,height:i,rgba:u};let m=Math.max(1e-4,Math.PI/h*r),j=2*m*m,k=Math.cos(Math.min(Math.PI,3*m)),f=d.map(t=>{var e,s;let a,[n,i]=(e=t.azimuthBin,s=t.elevationBin,[(e+.5)/h*Math.PI*2-Math.PI,(s+.5)/h*Math.PI-Math.PI/2]);return[(a=Math.cos(i))*Math.cos(n),Math.sin(i),a*Math.sin(n)]}),v=new Float32Array(s*i),b=0;for(let t=0;t<i;t++){let e=Math.PI/2-(t+.5)/i*Math.PI,a=Math.cos(e),n=Math.sin(e);for(let e=0;e<s;e++){let i=(e+.5)/s*Math.PI*2-Math.PI,o=a*Math.cos(i),r=a*Math.sin(i),c=0;for(let t=0;t<d.length;t++){let e=f[t],s=o*e[0]+n*e[1]+r*e[2];if(s<k)continue;let a=Math.acos(s>1?1:s<-1?-1:s);c+=d[t].count*Math.exp(-(a*a)/j)}v[t*s+e]=c,c>b&&(b=c)}}if(b<=0)return{width:s,height:i,rgba:u};for(let t=0;t<v.length;t++){let e=a(v[t]/b),[s,n,i]=o(e),r=(c+(1-c)*e)*l,h=4*t;u[h]=Math.round(255*s),u[h+1]=Math.round(255*n),u[h+2]=Math.round(255*i),u[h+3]=Math.round(255*a(r))}return{width:s,height:i,rgba:u}}({bins:u.map(t=>({azimuthBin:t.azimuth_bin,elevationBin:t.elevation_bin,count:t.count})),gridSize:S},{width:256,blurBins:1.5,opacity:.95}),e=new P("dome-skytex",{width:t.width,height:t.height},q,!1);e.hasAlpha=!0;let s=e.getContext(),i=s.createImageData(t.width,t.height);i.data.set(t.rgba),s.putImageData(i,0,0),e.update();let o=y.CreateSphere("dome-sky",{diameter:2,segments:48,sideOrientation:M.DOUBLESIDE},q),r=new z("dome-sky-mat",q);r.disableLighting=!0,r.emissiveColor=b.White(),r.diffuseColor=new b(0,0,0),r.specularColor=new b(0,0,0),r.emissiveTexture=e,r.opacityTexture=e,r.backFaceCulling=!1,o.material=r,o.isPickable=!1}_.runRenderLoop(()=>q.render());let E=()=>_.resize();window.addEventListener("resize",E);let T=(0,r.attachMeshHover)(q,e,x);f("ready"),c=()=>{window.removeEventListener("resize",E),T(),x(null),j.current=null,q.dispose(),_.dispose()}}catch(t){if(s)return;f("error"),b(t instanceof Error?t.message:"Failed to render dome.")}})(),()=>{s=!0,c?.()}},[u,d,p]),(0,e.jsx)(l.Panel,{title:"View-direction dome (3D)",subtitle:"Where the audience looked, mapped onto a sphere — drag to orbit, +/- to zoom",children:(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsx)("canvas",{ref:m,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),w?(0,e.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-[16rem] truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:w.x+12,top:w.y+12},children:w.label}):null,"ready"===k?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"absolute left-3 top-3 flex overflow-hidden rounded-md border border-edge bg-ink/80 text-xs backdrop-blur",children:["markers","skydome"].map(t=>(0,e.jsx)("button",{type:"button",onClick:()=>g(t),className:`px-2.5 py-1 ${p===t?"bg-fg/15 font-medium text-white":"text-fg-muted hover:text-fg"}`,children:"markers"===t?"Markers":"Skydome"},t))}),(0,e.jsx)(h.ZoomButtons,{onZoom:t=>j.current&&(0,o.stepZoom)(j.current,t)}),(0,e.jsx)(c.HeatLegend,{title:"Gaze density",lowLabel:"rarely",highLabel:"most-viewed",note:"markers"===p?"Each marker is a look-direction (camera forward). Blue line = forward, ring = horizon. Color & size scale with how often that direction was viewed.":"Continuous equirectangular heat field: the same gaze bins splatted into a smooth thermal texture wrapped on the dome. The in-scene SDK overlay (showGazeSkydome) renders this inward so you can stand inside it in WebXR."})]}):(0,e.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===k?"Rendering…":"empty"===k?"No camera samples in range.":"error"===k?v??"Dome unavailable.":null})]})})}],47273)},98568,t=>{t.n(t.i(47273))},66022,t=>{t.v(e=>Promise.all(["static/chunks/0ys9-ozuluawt.js","static/chunks/2ycvtdd68gub7.js","static/chunks/0v82oqyoy9zol.js","static/chunks/18u58lorfahxi.js","static/chunks/1nj82er7msdto.js","static/chunks/0ufbyo1x3qkmo.js","static/chunks/1yehxf-fmeicg.js"].map(e=>t.l(e))).then(()=>e(94080)))},48505,t=>{t.v(e=>Promise.all(["static/chunks/3v5ha25nxo43j.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3t06schbtqonl.js","static/chunks/1nj82er7msdto.js","static/chunks/3nz-dh9d7cehk.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/2u6shh3oeycm-.js"].map(e=>t.l(e))).then(()=>e(73073)))},53976,t=>{t.v(e=>Promise.all(["static/chunks/3v3-7fio3nw_t.js","static/chunks/10r_824wzt8hj.js","static/chunks/2aor7m-wbis85.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/0v82oqyoy9zol.js","static/chunks/25b9x-li-tvk2.js","static/chunks/2aelw3far6rii.js","static/chunks/0aznt7717miff.js","static/chunks/1_aahautsz2v_.js","static/chunks/1nj82er7msdto.js","static/chunks/3t06schbtqonl.js","static/chunks/18u58lorfahxi.js"].map(e=>t.l(e))).then(()=>e(18662)))},42436,t=>{t.v(e=>Promise.all(["static/chunks/37vzwr3ciejf1.js","static/chunks/157d9euci08yu.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/0v82oqyoy9zol.js"].map(e=>t.l(e))).then(()=>e(12847)))},89370,t=>{t.v(e=>Promise.all(["static/chunks/0dm32-jq30tg8.js","static/chunks/18u58lorfahxi.js","static/chunks/0v82oqyoy9zol.js"].map(e=>t.l(e))).then(()=>e(62566)))},67141,t=>{t.v(e=>Promise.all(["static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3mqy-84_ul3t2.js","static/chunks/1_aahautsz2v_.js","static/chunks/3t06schbtqonl.js","static/chunks/1thjncpj7u6pq.js","static/chunks/10r_824wzt8hj.js","static/chunks/1vdjn0pkoyypn.js","static/chunks/1nj82er7msdto.js","static/chunks/0aznt7717miff.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/2aelw3far6rii.js","static/chunks/3nz-dh9d7cehk.js"].map(e=>t.l(e))).then(()=>e(97998)))},20693,t=>{t.v(e=>Promise.all(["static/chunks/1-61zh4waha61.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/1zx2q-r32thv1.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3nz-dh9d7cehk.js","static/chunks/2u6shh3oeycm-.js","static/chunks/18u58lorfahxi.js","static/chunks/1_aahautsz2v_.js","static/chunks/1nj82er7msdto.js","static/chunks/3t06schbtqonl.js"].map(e=>t.l(e))).then(()=>e(32550)))},8850,t=>{t.v(e=>Promise.all(["static/chunks/068j6934u8j16.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/3t06schbtqonl.js","static/chunks/10r_824wzt8hj.js","static/chunks/18u58lorfahxi.js","static/chunks/1_aahautsz2v_.js","static/chunks/1nj82er7msdto.js","static/chunks/2aelw3far6rii.js","static/chunks/0aznt7717miff.js","static/chunks/0v82oqyoy9zol.js"].map(e=>t.l(e))).then(()=>e(35131)))},63836,t=>{t.v(e=>Promise.all(["static/chunks/2fh-_9b6tqhvb.js","static/chunks/0wwcfw8i3j_zx.js","static/chunks/0v82oqyoy9zol.js","static/chunks/1nj82er7msdto.js","static/chunks/310uz81hnnzsu.js","static/chunks/18u58lorfahxi.js","static/chunks/163fa70v4mgxj.js"].map(e=>t.l(e))).then(()=>e(14960)))},9607,t=>{t.v(e=>Promise.all(["static/chunks/2szdcpl41-kzv.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/3t06schbtqonl.js","static/chunks/10r_824wzt8hj.js","static/chunks/0aznt7717miff.js","static/chunks/1_aahautsz2v_.js","static/chunks/1nj82er7msdto.js","static/chunks/2aelw3far6rii.js","static/chunks/18u58lorfahxi.js","static/chunks/0v82oqyoy9zol.js"].map(e=>t.l(e))).then(()=>e(26831)))},96664,t=>{t.v(e=>Promise.all(["static/chunks/1o1d0p-v1z8ty.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3t06schbtqonl.js","static/chunks/3pufs8g4ui943.js","static/chunks/1nj82er7msdto.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/2u6shh3oeycm-.js","static/chunks/3nz-dh9d7cehk.js"].map(e=>t.l(e))).then(()=>e(44981)))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62238,42279,e=>{"use strict";let t=1/1.2;e.s(["ZOOM_IN_FACTOR",0,t,"ZOOM_OUT_FACTOR",0,1.2,"disableWheelZoom",0,function(e){e.inputs.removeByType("ArcRotateCameraMouseWheelInput")},"stepZoom",0,function(e,t){let s=e.lowerRadiusLimit??.01,n=e.upperRadiusLimit??1/0;e.radius=Math.min(n,Math.max(s,e.radius*t))}],62238);var s=e.i(29212);e.s(["ZoomButtons",0,function({onZoom:e}){let n="grid h-8 w-8 place-items-center rounded-md border border-edge bg-ink/80 text-lg leading-none text-fg backdrop-blur transition hover:bg-ink hover:text-white";return(0,s.jsxs)("div",{className:"absolute right-3 top-3 flex flex-col gap-1",children:[(0,s.jsx)("button",{type:"button","aria-label":"Zoom in",className:n,onClick:()=>e(t),children:"+"}),(0,s.jsx)("button",{type:"button","aria-label":"Zoom out",className:n,onClick:()=>e(1.2),children:"−"})]})}],42279)},59683,37660,e=>{"use strict";e.s(["attachMeshHover",0,function(e,t,s){let n=0,a=null,i=t=>{let i=t.offsetX,l=t.offsetY;n||(n=requestAnimationFrame(()=>{var t,c;let o;n=0;let r=e.pick(i,l,e=>e.isPickable&&e.isEnabled()),h=r?.pickedMesh?(t=r.pickedMesh,c=r.thinInstanceIndex??-1,(o=t.metadata)?c>=0&&o.hoverLabels?o.hoverLabels[c]??null:o.hoverLabel??null:null):null;h?s({label:h,x:i,y:l}):null!==a&&s(null),a=h}))},l=()=>{n&&(cancelAnimationFrame(n),n=0),null!==a&&(a=null,s(null))};return t.addEventListener("pointermove",i),t.addEventListener("pointerleave",l),()=>{t.removeEventListener("pointermove",i),t.removeEventListener("pointerleave",l),n&&cancelAnimationFrame(n)}}],59683);var t=e.i(29212),s=e.i(56054);e.s(["HeatLegend",0,function({title:e,lowLabel:n="low",highLabel:a="high",note:i}){return(0,t.jsxs)("div",{className:"pointer-events-none absolute bottom-3 left-3 rounded-md border border-edge bg-ink/80 px-3 py-2 text-fg backdrop-blur-sm",children:[(0,t.jsx)("div",{className:"mb-1 text-xs font-medium text-fg",children:e}),(0,t.jsx)("div",{className:"h-2 w-36 rounded-sm",style:{background:s.HEAT_GRADIENT}}),(0,t.jsxs)("div",{className:"mt-1 flex w-36 justify-between text-[10px] text-fg-muted",children:[(0,t.jsx)("span",{children:n}),(0,t.jsx)("span",{children:a})]}),i?(0,t.jsx)("div",{className:"mt-1 max-w-44 text-[10px] leading-tight text-fg-muted",children:i}):null]})}],37660)},71028,e=>{"use strict";var t=e.i(29212),s=e.i(94179),n=e.i(56054),a=e.i(62238),i=e.i(59683),l=e.i(37660),c=e.i(93425),o=e.i(42279);let r="__all__";function h(e){return`${e[0]},${e[1]},${e[2]}`}function u({label:e,value:s,onChange:n,allLabel:a,options:i}){return(0,t.jsxs)("label",{className:"flex items-center gap-1.5 rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg backdrop-blur",children:[(0,t.jsx)("span",{className:"font-medium text-fg-muted",children:e}),(0,t.jsxs)("select",{className:"max-w-[12rem] bg-transparent text-white outline-none",value:s,onChange:e=>n(e.target.value),children:[(0,t.jsx)("option",{value:r,children:a}),i.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))]})]})}e.s(["ClickRays3D",0,function({rays:m,cellSize:d,proxyMeshes:j=[]}){let k=(0,s.useRef)(null),f=(0,s.useRef)(null),[v,p]=(0,s.useState)("loading"),[x,b]=(0,s.useState)(null),[g,y]=(0,s.useState)(r),[w,z]=(0,s.useState)(r),[q,_]=(0,s.useState)(null),A=(0,s.useMemo)(()=>{let e=new Map;for(let t of m){let s=h(t.camVoxel),n=e.get(s);n?n.count+=t.count:e.set(s,{key:s,voxel:t.camVoxel,count:t.count})}return[...e.values()].sort((e,t)=>t.count-e.count)},[m]),L=(0,s.useMemo)(()=>{let e=new Map;for(let t of m)""!==t.mesh&&e.set(t.mesh,(e.get(t.mesh)??0)+t.count);return[...e.entries()].map(([e,t])=>({name:e,count:t})).sort((e,t)=>t.count-e.count)},[m]);return(0,s.useEffect)(()=>{g!==r&&(A.some(e=>e.key===g)||y(r))},[g,A]),(0,s.useEffect)(()=>{w!==r&&(L.some(e=>e.name===w)||z(r))},[w,L]),(0,s.useEffect)(()=>{let t=k.current;if(!t)return;if(0===m.length)return void p("empty");let s=!1,l=null;return p("loading"),b(null),(async()=>{try{let[{Engine:c},{Scene:o},{ArcRotateCamera:u},{HemisphericLight:k},{Vector3:v,Color3:x,Color4:b,Matrix:y},{MeshBuilder:z},{StandardMaterial:q}]=await Promise.all([e.A(66022),e.A(48505),e.A(53976),e.A(42436),e.A(89370),e.A(67141),e.A(20693),e.A(9607),e.A(96664)]);if(s)return;let A=g===r?m:m.filter(e=>h(e.camVoxel)===g);if(0===A.length)return void p("empty");let L=A.reduce((e,t)=>Math.max(e,t.count),1),M=0,C=0,P=0,N=0,E=(e,t,s)=>{M+=e,C+=t,P+=s,N++};for(let e of A)E(e.origin[0],e.origin[1],e.origin[2]),E(e.hit[0],e.hit[1],e.hit[2]);let R=N>0?new v(M/N,C/N,P/N):v.Zero(),T=4*d;for(let e of A)for(let t of[e.origin,e.hit]){let e=t[0]-R.x,s=t[1]-R.y,n=t[2]-R.z;T=Math.max(T,Math.sqrt(e*e+s*s+n*n))}let S=new c(t,!0,{preserveDrawingBuffer:!1}),Z=new o(S);Z.clearColor=new b(.04,.05,.07,1);let I=new u("rays-cam",Math.PI/4,Math.PI/3,2.4*T,R,Z);if(I.attachControl(t,!0),(0,a.disableWheelZoom)(I),f.current=I,new k("rays-light",new v(.4,1,.3),Z),j.length>0){let e=z.CreateBox("scene-proxy",{size:1},Z),t=new q("scene-proxy-mat",Z);t.wireframe=!0,t.disableLighting=!0,t.emissiveColor=new x(.32,.4,.52),t.alpha=.35,e.material=t,e.isPickable=!0,e.thinInstanceEnablePicking=!0,e.metadata={hoverLabels:j.map(e=>e.name)};let s=j.length,n=new Float32Array(16*s);for(let e=0;e<s;e++){let t=j[e].aabb,s=Math.max(t[3]-t[0],.001),a=Math.max(t[4]-t[1],.001),i=Math.max(t[5]-t[2],.001);y.Scaling(s,a,i).multiply(y.Translation((t[0]+t[3])/2,(t[1]+t[4])/2,(t[2]+t[5])/2)).copyToArray(n,16*e)}e.thinInstanceSetBuffer("matrix",n,16,!0)}let B=[],F=[];for(let e of A){let t=e.count/L,[s,a,i]=(0,n.heatRgb)(t),l=new b(s,a,i,.35+.65*t);B.push([new v(e.origin[0],e.origin[1],e.origin[2]),new v(e.hit[0],e.hit[1],e.hit[2])]),F.push([l,l])}B.length>0&&(z.CreateLineSystem("click-rays",{lines:B,colors:F,useVertexAlpha:!0},Z).isPickable=!1);let O=new Map;for(let e of A)O.set(h(e.camVoxel),e.camVoxel);if(O.size>0){let e=z.CreateSphere("rays-eye",{diameter:.6*d,segments:6},Z),t=new q("rays-eye-mat",Z);t.disableLighting=!0,t.emissiveColor=new x(.9,.95,1),e.material=t;let s=[...O.values()],n=new Float32Array(16*s.length);for(let e=0;e<s.length;e++){let t=s[e];y.Translation((t[0]+.5)*d,(t[1]+.5)*d,(t[2]+.5)*d).copyToArray(n,16*e)}e.thinInstanceSetBuffer("matrix",n,16,!0)}if(w!==r){let e=m.filter(e=>e.mesh===w);if(e.length>0){let t,s=j.find(e=>e.name===w);if(s){let e=s.aabb;t=new v((e[0]+e[3])/2,(e[1]+e[4])/2,(e[2]+e[5])/2)}else{let s=0,n=0,a=0;for(let t of e)s+=t.hit[0],n+=t.hit[1],a+=t.hit[2];t=new v(s/e.length,n/e.length,a/e.length)}let a=Math.max(3*d,.18*T),i=e.reduce((e,t)=>Math.max(e,t.count),1),l=[],c=[];for(let s of e){let e=s.origin[0]-s.hit[0],o=s.origin[1]-s.hit[1],r=s.origin[2]-s.hit[2],h=Math.sqrt(e*e+o*o+r*r)||1,u=s.count/i,m=a*(.4+.6*u),d=new v(t.x+e/h*m,t.y+o/h*m,t.z+r/h*m),[j,k,f]=(0,n.heatRgb)(u),p=new b(j,k,f,1);l.push([t.clone(),d]),c.push([new b(j,k,f,.25),p])}z.CreateLineSystem("mesh-rose",{lines:l,colors:c,useVertexAlpha:!0},Z).isPickable=!1;let o=z.CreateSphere("mesh-rose-hub",{diameter:.8*d,segments:8},Z),r=new q("mesh-rose-hub-mat",Z);r.disableLighting=!0,r.emissiveColor=new x(1,.85,.4),o.material=r,o.position=t,o.isPickable=!0,o.metadata={hoverLabel:w}}}S.runRenderLoop(()=>Z.render());let V=()=>S.resize();window.addEventListener("resize",V);let $=(0,i.attachMeshHover)(Z,t,_);p("ready"),l=()=>{window.removeEventListener("resize",V),$(),_(null),f.current=null,Z.dispose(),S.dispose()}}catch(e){if(s)return;p("error"),b(e instanceof Error?e.message:"Failed to render click rays.")}})(),()=>{s=!0,l?.()}},[m,d,j,g,w]),(0,t.jsx)(c.Panel,{title:"Click rays (3D)",subtitle:"Each click joined to the view it was made from — gate by viewpoint or focus a mesh",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("canvas",{ref:k,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),q?(0,t.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-[16rem] truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:q.x+12,top:q.y+12},children:q.label}):null,"ready"===v?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"absolute left-3 top-3 flex gap-2",children:[(0,t.jsx)(u,{label:"Viewpoint",value:g,onChange:y,allLabel:"All viewpoints",options:A.map(e=>({value:e.key,label:`(${e.voxel.join(", ")}) \xb7 ${e.count}`}))}),(0,t.jsx)(u,{label:"Mesh rose",value:w,onChange:z,allLabel:"No mesh focus",options:L.map(e=>({value:e.name,label:`${e.name} \xb7 ${e.count}`}))})]}),(0,t.jsx)(o.ZoomButtons,{onZoom:e=>f.current&&(0,a.stepZoom)(f.current,e)}),(0,t.jsx)(l.HeatLegend,{title:"Click volume",lowLabel:"few clicks",highLabel:"most clicks",note:"Lines run from the camera position (bright eye) to where the click landed. Pick a viewpoint to see only clicks made from there; pick a mesh to see which directions its clicks came from."})]}):(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===v?"Rendering…":"empty"===v?"No correlated clicks in range.":"error"===v?x??"Click rays unavailable.":null})]})})}])},61518,e=>{e.n(e.i(71028))},66022,e=>{e.v(t=>Promise.all(["static/chunks/0ys9-ozuluawt.js","static/chunks/2ycvtdd68gub7.js","static/chunks/0v82oqyoy9zol.js","static/chunks/18u58lorfahxi.js","static/chunks/1nj82er7msdto.js","static/chunks/0ufbyo1x3qkmo.js","static/chunks/1yehxf-fmeicg.js"].map(t=>e.l(t))).then(()=>t(94080)))},48505,e=>{e.v(t=>Promise.all(["static/chunks/3v5ha25nxo43j.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3t06schbtqonl.js","static/chunks/1nj82er7msdto.js","static/chunks/3nz-dh9d7cehk.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/2u6shh3oeycm-.js"].map(t=>e.l(t))).then(()=>t(73073)))},53976,e=>{e.v(t=>Promise.all(["static/chunks/3v3-7fio3nw_t.js","static/chunks/10r_824wzt8hj.js","static/chunks/2aor7m-wbis85.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/0v82oqyoy9zol.js","static/chunks/25b9x-li-tvk2.js","static/chunks/2aelw3far6rii.js","static/chunks/0aznt7717miff.js","static/chunks/1_aahautsz2v_.js","static/chunks/1nj82er7msdto.js","static/chunks/3t06schbtqonl.js","static/chunks/18u58lorfahxi.js"].map(t=>e.l(t))).then(()=>t(18662)))},42436,e=>{e.v(t=>Promise.all(["static/chunks/37vzwr3ciejf1.js","static/chunks/157d9euci08yu.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/0v82oqyoy9zol.js"].map(t=>e.l(t))).then(()=>t(12847)))},89370,e=>{e.v(t=>Promise.all(["static/chunks/0dm32-jq30tg8.js","static/chunks/18u58lorfahxi.js","static/chunks/0v82oqyoy9zol.js"].map(t=>e.l(t))).then(()=>t(62566)))},67141,e=>{e.v(t=>Promise.all(["static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3mqy-84_ul3t2.js","static/chunks/1_aahautsz2v_.js","static/chunks/3t06schbtqonl.js","static/chunks/1thjncpj7u6pq.js","static/chunks/10r_824wzt8hj.js","static/chunks/1vdjn0pkoyypn.js","static/chunks/1nj82er7msdto.js","static/chunks/0aznt7717miff.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/2aelw3far6rii.js","static/chunks/3nz-dh9d7cehk.js"].map(t=>e.l(t))).then(()=>t(97998)))},20693,e=>{e.v(t=>Promise.all(["static/chunks/1-61zh4waha61.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/1zx2q-r32thv1.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3nz-dh9d7cehk.js","static/chunks/2u6shh3oeycm-.js","static/chunks/18u58lorfahxi.js","static/chunks/1_aahautsz2v_.js","static/chunks/1nj82er7msdto.js","static/chunks/3t06schbtqonl.js"].map(t=>e.l(t))).then(()=>t(32550)))},9607,e=>{e.v(t=>Promise.all(["static/chunks/2szdcpl41-kzv.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/3t06schbtqonl.js","static/chunks/10r_824wzt8hj.js","static/chunks/0aznt7717miff.js","static/chunks/1_aahautsz2v_.js","static/chunks/1nj82er7msdto.js","static/chunks/2aelw3far6rii.js","static/chunks/18u58lorfahxi.js","static/chunks/0v82oqyoy9zol.js"].map(t=>e.l(t))).then(()=>t(26831)))},96664,e=>{e.v(t=>Promise.all(["static/chunks/1o1d0p-v1z8ty.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3t06schbtqonl.js","static/chunks/3pufs8g4ui943.js","static/chunks/1nj82er7msdto.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/2u6shh3oeycm-.js","static/chunks/3nz-dh9d7cehk.js"].map(t=>e.l(t))).then(()=>t(44981)))}]);
@@ -1,3 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,51581,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"BailoutToCSR",{enumerable:!0,get:function(){return l}});let n=e.r(59922);function l({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},16201,(e,t,s)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"encodeURIPath",{enumerable:!0,get:function(){return n}})},1299,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"PreloadChunks",{enumerable:!0,get:function(){return o}});let n=e.r(29212),l=e.r(90611),r=e.r(50803),a=e.r(16201),i=e.r(29434);function o({moduleIds:e}){if("u">typeof window)return null;let t=r.workAsyncStorage.getStore();if(void 0===t)return null;let s=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;s.push(...e)}}if(0===s.length)return null;let d=(0,i.getAssetTokenQuery)();return(0,n.jsx)(n.Fragment,{children:s.map(e=>{let s=`${t.assetPrefix}/_next/${(0,a.encodeURIPath)(e)}${d}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:s,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,l.preload)(s,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},89699,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return d}});let n=e.r(29212),l=e.r(94179),r=e.r(51581),a=e.r(1299);function i(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},d=function(e){let t={...o,...e},s=(0,l.lazy)(()=>t.loader().then(i)),d=t.loading;function c(e){let i=d?(0,n.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,c=o?l.Suspense:l.Fragment,u=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(a.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(s,{...e})]}):(0,n.jsx)(r.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(s,{...e})});return(0,n.jsx)(c,{...o?{fallback:i}:{},children:u})}return c.displayName="LoadableComponent",c}},80268,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return l}});let n=e.r(81258)._(e.r(89699));function l(e,t){let s={};"function"==typeof e&&(s.loader=e);let l={...s,...t};return(0,n.default)({...l,modules:l.loadableGenerated?.modules})}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},14936,e=>{"use strict";e.i(23838);var t=e.i(29212),s=e.i(80268),n=e.i(94179),l=e.i(82665),r=e.i(20880);let a={window:"1h"},i=[{id:"1h",label:"Last hour"},{id:"24h",label:"Last 24h"},{id:"7d",label:"Last 7 days"},{id:"all",label:"All time"}],o={"1h":36e5,"24h":864e5,"7d":6048e5};function d(e,t=Date.now()){return"all"===e.window?{}:"custom"===e.window?{since:e.since,until:e.until}:{since:t-o[e.window],until:t}}function c(e,t=Date.now()){return{...d(e,t),scene:e.scene&&e.scene.length>0?e.scene:void 0,source:e.source,cameraMode:e.cameraMode}}let u=[60,300,900,1800,3600,10800,21600,43200,86400,604800];function x(e){return"xr-controller"===e?"XR controller":e.charAt(0).toUpperCase()+e.slice(1)}let m=["mouse","touch","stylus","pen","xr-controller","hand","gaze","transient","other"];var p=e.i(56054);function h(e,t=1){let[s,n,l]=(0,p.heatRgb)(e);return`rgba(${Math.round(255*s)}, ${Math.round(255*n)}, ${Math.round(255*l)}, ${t})`}function f(e,t=0){return Number.isFinite(e)?e.toLocaleString(void 0,{maximumFractionDigits:t}):"—"}var g=e.i(88725);let b="#161210",j={fontSize:13,color:"#a8917c"},v={padding:"6px 10px",fontSize:13,borderTop:"1px solid #34291f"};function y({sessions:e,onSelect:s,selectedId:n}){return 0===e.length?(0,t.jsx)("p",{style:j,children:"No sessions in range."}):(0,t.jsx)("div",{style:{maxHeight:320,overflow:"auto"},children:(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",textAlign:"left"},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{fontSize:11,textTransform:"uppercase",color:"#a8917c"},children:[(0,t.jsx)("th",{style:{padding:"6px 10px"},children:"Session"}),(0,t.jsx)("th",{style:{padding:"6px 10px"},children:"Visitor"}),(0,t.jsx)("th",{style:{padding:"6px 10px",textAlign:"right"},children:"Events"}),(0,t.jsx)("th",{style:{padding:"6px 10px"},children:"Started"})]})}),(0,t.jsx)("tbody",{children:e.map(e=>{var l;let r,a=e.session_id===n;return(0,t.jsxs)("tr",{onClick:s?()=>s(e.session_id):void 0,style:{cursor:s?"pointer":"default",background:a?"rgba(237,166,62,0.15)":void 0},children:[(0,t.jsx)("td",{style:{...v,fontFamily:"ui-monospace, monospace",color:"#d8c8b8"},children:e.session_id.slice(0,12)}),(0,t.jsx)("td",{style:{...v,fontFamily:"ui-monospace, monospace",color:"#a8917c"},children:e.visitor_id.slice(0,8)}),(0,t.jsx)("td",{style:{...v,textAlign:"right",fontVariantNumeric:"tabular-nums"},children:f(e.events)}),(0,t.jsx)("td",{style:{...v,fontSize:12,color:"#a8917c"},children:Number.isNaN((r=new Date((l=e.started_at).includes("T")?l:l.replace(" ","T")+"Z")).getTime())?l:r.toLocaleString()})]},e.session_id)})})]})})}function w({bins:e,gridSize:s,size:l=320,className:r,style:a}){let i=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let t=i.current;if(!t)return;let n=t.getContext("2d");n&&function(e,t,s,n){if(e.clearRect(0,0,n,n),e.fillStyle=b,e.fillRect(0,0,n,n),0===t.length)return;let l=t.reduce((e,t)=>Math.max(e,t.count),0),r=n/s;for(let s of t)e.fillStyle=h(l>0?s.count/l:0,.85),e.fillRect(s.gx*r,s.gy*r,Math.ceil(r),Math.ceil(r))}(n,e,s,l)},[e,s,l]),(0,t.jsx)("canvas",{ref:i,width:l,height:l,className:r,style:a,"aria-label":"Pointer heatmap"})}function N({bins:e,gridSize:s,size:l=340,className:r,style:a}){let i=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let t=i.current;if(!t)return;let n=t.getContext("2d");if(!n)return;let r=Math.min(window.devicePixelRatio||1,2);t.width=l*r,t.height=l*r,n.setTransform(r,0,0,r,0,0),function(e,t,s,n){let l=n/2,r=n/2,a=n/2-18;if(e.clearRect(0,0,n,n),e.fillStyle=b,e.fillRect(0,0,n,n),e.strokeStyle="#34291f",e.lineWidth=1,e.beginPath(),e.arc(l,r,a,0,2*Math.PI),e.stroke(),e.beginPath(),e.arc(l,r,a/2,0,2*Math.PI),e.stroke(),t.length>0){let n=t.reduce((e,t)=>Math.max(e,t.count),0),i=2*Math.PI/s;for(let o of t){let t=n>0?o.count/n:0,d=1-(o.elevation_bin+1)/s,c=1-o.elevation_bin/s,u=Math.max(0,d)*a,x=Math.max(0,c)*a,m=o.azimuth_bin*i,p=m+i;e.beginPath(),e.arc(l,r,x,m,p),e.arc(l,r,u,p,m,!0),e.closePath(),e.fillStyle=h(t,.85),e.fill()}}let i=(t,s,n)=>{e.lineWidth=3,e.strokeStyle="rgba(22,18,16,0.9)",e.strokeText(t,s,n),e.fillStyle="#d8c8b8",e.fillText(t,s,n)};for(let t of(e.font="600 10px ui-sans-serif, system-ui, sans-serif",e.textAlign="left",e.textBaseline="middle",e.strokeStyle="rgba(203,213,225,0.35)",e.lineWidth=1,e.beginPath(),e.moveTo(l,r),e.lineTo(l,r-a),e.stroke(),[0,a/2,a]))e.beginPath(),e.moveTo(l-3,r-t),e.lineTo(l+3,r-t),e.stroke();i("up",l+6,r),i("horizon",l+6,r-a/2),i("down",l+6,r-a+2)}(n,e,s,l)},[e,s,l]),(0,t.jsx)("canvas",{ref:i,className:r,style:{width:l,height:l,...a},"aria-label":"Camera view-direction heatmap: top-down polar plot where the center is looking up, the middle ring is the horizon, and the rim is looking down; color shows how often each direction was viewed."})}let S={background:"rgba(32,25,19,0.6)",borderRadius:8,padding:12},k={fontSize:11,textTransform:"uppercase",letterSpacing:"0.04em",color:"#a8917c"},P={marginTop:4,fontSize:24,fontWeight:600,color:"#f4eadf",fontVariantNumeric:"tabular-nums"};function M({label:e,value:s}){return(0,t.jsxs)("div",{style:S,children:[(0,t.jsx)("div",{style:k,children:e}),(0,t.jsx)("div",{style:P,children:s})]})}function _({perf:e}){return e&&0!==e.samples?(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:12},children:[(0,t.jsx)(M,{label:"Samples",value:f(e.samples)}),(0,t.jsx)(M,{label:"Avg FPS",value:f(e.avg_fps,1)}),(0,t.jsx)(M,{label:"p50 FPS",value:f(e.p50_fps,1)}),(0,t.jsx)(M,{label:"Min FPS",value:f(e.min_fps,1)})]}):(0,t.jsx)("p",{style:j,children:"No performance samples in range."})}var C=e.i(93425);function R({bins:e,gridSize:s}){return(0,t.jsx)(C.Panel,{title:"View-direction heatmap",subtitle:"Top-down sphere — center = looking up, rim = looking down",help:(0,t.jsxs)(t.Fragment,{children:["A flattened top-down view of where the camera pointed."," ",(0,t.jsx)("strong",{children:"Distance from the center"})," is the up/down tilt: the ",(0,t.jsx)("strong",{children:"center"})," ","is looking straight up, the ",(0,t.jsx)("strong",{children:"middle ring"})," is the horizon (level), and the"," ",(0,t.jsx)("strong",{children:"outer rim"})," is looking straight down. The"," ",(0,t.jsx)("strong",{children:"angle around the disc"})," is the facing (azimuth) direction. Color shows how often each direction was viewed, normalized to the most-viewed direction in range."]}),children:(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,t.jsx)(N,{bins:e,gridSize:s,className:"rounded-lg border border-edge"}),e.length>0?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-fg-muted",children:[(0,t.jsx)("span",{className:"font-medium text-fg",children:"View density"}),(0,t.jsx)("span",{children:"rarely"}),(0,t.jsx)("span",{className:"h-2 w-28 rounded-sm",style:{background:p.HEAT_GRADIENT}}),(0,t.jsx)("span",{children:"most-viewed"})]}):null]})})}function T({bins:e,cellSize:s}){let l=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let t=l.current;if(!t)return;let s=t.getContext("2d");if(!s||(s.clearRect(0,0,360,360),s.fillStyle="#0b0e14",s.fillRect(0,0,360,360),0===e.length))return;let n=1/0,r=-1/0,a=1/0,i=-1/0,o=0;for(let t of e)t.gx<n&&(n=t.gx),t.gx>r&&(r=t.gx),t.gz<a&&(a=t.gz),t.gz>i&&(i=t.gz),t.count>o&&(o=t.count);let d=344/Math.max(r-n+1,i-a+1);for(let t of e){s.fillStyle=h(o>0?t.count/o:0,.9);let e=8+(t.gx-n)*d,l=8+(i-t.gz)*d;s.fillRect(e,l,Math.ceil(d),Math.ceil(d))}},[e,s]),(0,t.jsxs)(C.Panel,{title:"Floor-plan heatmap",subtitle:"Where visitors stand (top-down, first-person)",help:"Camera positions binned on the ground plane — the first-person counterpart of the pointer heatmap. Filter to the first-person camera mode to isolate walkable sessions.",children:[(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)("canvas",{ref:l,width:360,height:360,className:"rounded-lg border border-edge","aria-label":"Floor-plan position heatmap"})}),0===e.length?(0,t.jsx)("p",{className:"mt-2 text-center text-xs text-fg-muted",children:"No camera-position data in range. Capture a first-person session to populate the plan."}):null]})}function z(e){return null==e?"":new Date(e-6e4*new Date(e).getTimezoneOffset()).toISOString().slice(0,16)}function $(e){if(!e)return;let t=new Date(e).getTime();return Number.isNaN(t)?void 0:t}function E({filters:e,scenes:s,onChange:n,busy:l}){let r=t=>n({...e,...t});return(0,t.jsxs)("section",{className:"mb-6 flex flex-wrap items-end gap-x-4 gap-y-3 rounded-xl border border-edge bg-panel p-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-xs text-fg-muted",children:"Time window"}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",role:"group","aria-label":"Time window",children:[i.map(s=>{let n=e.window===s.id;return(0,t.jsx)("button",{type:"button",onClick:()=>r({window:s.id}),className:`rounded-md border px-2.5 py-1.5 text-xs transition ${n?"border-amber bg-amber/10 text-saffron":"border-edge text-fg hover:border-amber/60 hover:text-fg-hi"}`,children:s.label},s.id)}),(0,t.jsx)("button",{type:"button",onClick:()=>r({window:"custom",since:e.since??Date.now()-864e5,until:e.until??Date.now()}),className:`rounded-md border px-2.5 py-1.5 text-xs transition ${"custom"===e.window?"border-amber bg-amber/10 text-saffron":"border-edge text-fg hover:border-amber/60 hover:text-fg-hi"}`,children:"Custom"})]})]}),"custom"===e.window?(0,t.jsxs)("div",{className:"flex items-end gap-2",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-fg-muted",children:["From",(0,t.jsx)("input",{type:"datetime-local",value:z(e.since),onChange:e=>r({since:$(e.target.value)}),className:"rounded-md border border-edge bg-ink px-2 py-1.5 text-xs text-fg outline-none focus:border-saffron"})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-fg-muted",children:["To",(0,t.jsx)("input",{type:"datetime-local",value:z(e.until),onChange:e=>r({until:$(e.target.value)}),className:"rounded-md border border-edge bg-ink px-2 py-1.5 text-xs text-fg outline-none focus:border-saffron"})]})]}):null,(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-fg-muted",children:["Scene",(0,t.jsxs)("select",{value:e.scene??"",onChange:e=>r({scene:e.target.value||void 0}),className:"min-w-40 rounded-md border border-edge bg-ink px-2 py-1.5 text-xs text-fg outline-none focus:border-saffron",children:[(0,t.jsx)("option",{value:"",children:"All scenes"}),s.map(e=>(0,t.jsxs)("option",{value:e.scene_id,children:[e.scene_id," (",e.events.toLocaleString(),")"]},e.scene_id))]})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-fg-muted",children:["Input source",(0,t.jsxs)("select",{value:e.source??"",onChange:e=>r({source:e.target.value||void 0}),className:"min-w-36 rounded-md border border-edge bg-ink px-2 py-1.5 text-xs text-fg outline-none focus:border-saffron",children:[(0,t.jsx)("option",{value:"",children:"All sources"}),m.map(e=>(0,t.jsx)("option",{value:e,children:x(e)},e))]})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-fg-muted",children:["Camera mode",(0,t.jsxs)("select",{value:e.cameraMode??"",onChange:e=>r({cameraMode:e.target.value||void 0}),className:"min-w-36 rounded-md border border-edge bg-ink px-2 py-1.5 text-xs text-fg outline-none focus:border-saffron",children:[(0,t.jsx)("option",{value:"",children:"All cameras"}),(0,t.jsx)("option",{value:"viewer",children:"Viewer (orbit)"}),(0,t.jsx)("option",{value:"first-person",children:"First-person (walk)"})]})]}),(0,t.jsx)("span",{className:`ml-auto text-xs ${l?"text-saffron":"text-fg-muted"}`,"aria-live":"polite",children:l?"Refreshing…":"Up to date"})]})}function A({rows:e}){let s=function(e){let t=new Map;for(let s of e){let e=t.get(s.source);e||(e={source:s.source,total:0,sessions:0,byType:[]},t.set(s.source,e)),e.total+=s.count,e.sessions=Math.max(e.sessions,s.sessions),e.byType.push({event_type:s.event_type,count:s.count})}for(let e of t.values())e.byType.sort((e,t)=>t.count-e.count);return[...t.values()].sort((e,t)=>t.total-e.total)}(e),n=s.reduce((e,t)=>Math.max(e,t.total),0);return(0,t.jsx)(C.Panel,{title:"Input sources",subtitle:"Interactions by input source",children:0===s.length?(0,t.jsx)("p",{className:"text-sm text-fg-muted",children:"No source-bearing interactions in range."}):(0,t.jsx)("ul",{className:"space-y-3",children:s.map(e=>(0,t.jsxs)("li",{className:"text-sm",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("span",{className:"font-medium text-fg",children:x(e.source)}),(0,t.jsxs)("span",{className:"tabular-nums text-fg-muted",children:[f(e.total),(0,t.jsxs)("span",{className:"ml-1 text-xs text-fg-muted",children:["· ",f(e.sessions)," ",1===e.sessions?"session":"sessions"]})]})]}),(0,t.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,t.jsx)("div",{className:"h-full rounded bg-amber",style:{width:`${n>0?e.total/n*100:0}%`}})}),(0,t.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1.5",children:e.byType.map(e=>{let s;return(0,t.jsxs)("span",{className:"rounded bg-ink/60 px-1.5 py-0.5 font-mono text-[11px] text-fg-muted",children:[(s=e.event_type.replace(/_/g," ")).charAt(0).toUpperCase()+s.slice(1)," ",f(e.count)]},e.event_type)})})]},e.source))})})}function I({perf:e}){return(0,t.jsx)(C.Panel,{title:"Rendering performance",subtitle:"frame_perf samples",children:(0,t.jsx)(_,{perf:e})})}function D({label:e,value:s,unit:n}){return(0,t.jsxs)("div",{className:"rounded-lg bg-ink/60 p-3",children:[(0,t.jsx)("div",{className:"text-xs uppercase tracking-wide text-fg-muted",children:e}),(0,t.jsxs)("div",{className:"mt-1 text-2xl font-semibold tabular-nums text-fg-hi",children:[s,n?(0,t.jsx)("span",{className:"ml-1 text-sm font-normal text-fg-muted",children:n}):null]})]})}function F(e){return f(e/1048576,1)}function L({bins:e}){if(0===e.length)return(0,t.jsx)("p",{className:"text-sm text-fg-muted",children:"No FPS samples in range."});let s=[...e].sort((e,t)=>e.bucket-t.bucket),n=s.reduce((e,t)=>Math.max(e,t.sessions),0)||1,l=s.length>1?s[1].bucket-s[0].bucket:10;return(0,t.jsx)("div",{className:"space-y-1.5",children:s.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsxs)("span",{className:"w-16 shrink-0 text-right tabular-nums text-fg-muted",children:[e.bucket,"–",e.bucket+l]}),(0,t.jsx)("div",{className:"h-4 flex-1 overflow-hidden rounded bg-ink/60",children:(0,t.jsx)("div",{className:"h-full rounded bg-emerald-500/70",style:{width:`${e.sessions/n*100}%`}})}),(0,t.jsx)("span",{className:"w-10 shrink-0 tabular-nums text-fg-muted",children:e.sessions})]},e.bucket))})}function U({data:e}){let{distribution:s,histogram:n,frameTime:l,jank:r,byDevice:a,byScene:i,resources:o,stability:d}=e,c=(s?.samples??0)>0;return(0,t.jsxs)("section",{className:"space-y-4",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold uppercase tracking-wide text-fg-muted",children:"Performance"}),(0,t.jsx)(C.Panel,{title:"FPS distribution",subtitle:"per-session p05 / p50 / p95, summarized across sessions",children:c?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[(0,t.jsx)(D,{label:"p05 FPS (worst)",value:f(s.p05_fps,1)}),(0,t.jsx)(D,{label:"p50 FPS (typical)",value:f(s.p50_fps,1)}),(0,t.jsx)(D,{label:"p95 FPS (best)",value:f(s.p95_fps,1)}),(0,t.jsx)(D,{label:"Sessions",value:f(s.sessions)})]}),(0,t.jsx)(L,{bins:n})]}):(0,t.jsx)("p",{className:"text-sm text-fg-muted",children:"No performance samples in range."})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[(0,t.jsx)(C.Panel,{title:"Frame time",subtitle:"per-session median & worst-window p95",children:l&&0!==l.sessions?(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsx)(D,{label:"p50 frame time",value:f(l.p50_ms,1),unit:"ms"}),(0,t.jsx)(D,{label:"p95 frame time",value:f(l.p95_ms,1),unit:"ms"})]}):(0,t.jsx)("p",{className:"text-sm text-fg-muted",children:"No frame-time samples in range."})}),(0,t.jsx)(C.Panel,{title:"Jank",subtitle:"long frames per sample window",children:r&&0!==r.sessions?(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsx)(D,{label:"Median session",value:f(r.median_rate,2)}),(0,t.jsx)(D,{label:"Worst decile",value:f(r.worst_decile_rate,2)})]}):(0,t.jsx)("p",{className:"text-sm text-fg-muted",children:"No jank data in range."})})]}),(0,t.jsx)(C.Panel,{title:"FPS by device",subtitle:"per-session median FPS, attributed to session_start.device",children:0===a.length?(0,t.jsx)("p",{className:"text-sm text-fg-muted",children:"No device data in range."}):(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-left text-sm",children:[(0,t.jsx)("thead",{className:"text-xs uppercase tracking-wide text-fg-muted",children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:"py-1 pr-4 font-medium",children:"Backend"}),(0,t.jsx)("th",{className:"py-1 pr-4 font-medium",children:"Mobile"}),(0,t.jsx)("th",{className:"py-1 pr-4 font-medium",children:"GPU"}),(0,t.jsx)("th",{className:"py-1 pr-4 text-right font-medium",children:"Sessions"}),(0,t.jsx)("th",{className:"py-1 text-right font-medium",children:"p50 FPS"})]})}),(0,t.jsx)("tbody",{className:"text-fg",children:a.map((e,s)=>(0,t.jsxs)("tr",{className:"border-t border-ink/60",children:[(0,t.jsx)("td",{className:"py-1 pr-4",children:e.engine||"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:"true"===e.is_mobile?"yes":"no"}),(0,t.jsx)("td",{className:"py-1 pr-4 max-w-[16rem] truncate",title:e.renderer,children:e.renderer||"—"}),(0,t.jsx)("td",{className:"py-1 pr-4 text-right tabular-nums",children:f(e.sessions)}),(0,t.jsx)("td",{className:"py-1 text-right tabular-nums",children:f(e.p50_fps,1)})]},`${e.engine}|${e.is_mobile}|${e.renderer}|${s}`))})]})})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[(0,t.jsx)(C.Panel,{title:"FPS by scene",subtitle:"per-session median FPS per scene",children:0===i.length?(0,t.jsx)("p",{className:"text-sm text-fg-muted",children:"No scene data in range."}):(0,t.jsxs)("table",{className:"w-full text-left text-sm",children:[(0,t.jsx)("thead",{className:"text-xs uppercase tracking-wide text-fg-muted",children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:"py-1 pr-4 font-medium",children:"Scene"}),(0,t.jsx)("th",{className:"py-1 pr-4 text-right font-medium",children:"Sessions"}),(0,t.jsx)("th",{className:"py-1 text-right font-medium",children:"p50 FPS"})]})}),(0,t.jsx)("tbody",{className:"text-fg",children:i.map(e=>(0,t.jsxs)("tr",{className:"border-t border-ink/60",children:[(0,t.jsx)("td",{className:"py-1 pr-4",children:e.scene_id||"—"}),(0,t.jsx)("td",{className:"py-1 pr-4 text-right tabular-nums",children:f(e.sessions)}),(0,t.jsx)("td",{className:"py-1 text-right tabular-nums",children:f(e.p50_fps,1)})]},e.scene_id))})]})}),(0,t.jsx)(C.Panel,{title:"Stability",subtitle:"hard failures frame_perf can't show",children:d?(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,t.jsx)(D,{label:"Context losses",value:f(d.context_losses)}),(0,t.jsx)(D,{label:"Compile stalls",value:f(d.compile_stalls)}),(0,t.jsx)(D,{label:"Incidents",value:f(d.incidents)})]}):(0,t.jsx)("p",{className:"text-sm text-fg-muted",children:"No stability data in range."})})]}),(0,t.jsx)(C.Panel,{title:"Resource footprint",subtitle:"per-session p50 / p95 of what the scene asked of the device",children:o&&0!==o.sessions?(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:[(0,t.jsx)(D,{label:"p50 JS heap",value:F(o.p50_js_heap_bytes),unit:"MB"}),(0,t.jsx)(D,{label:"p50 texture",value:F(o.p50_texture_bytes),unit:"MB"}),(0,t.jsx)(D,{label:"p50 triangles",value:f(o.p50_triangles)}),(0,t.jsx)(D,{label:"p95 JS heap",value:F(o.p95_js_heap_bytes),unit:"MB"}),(0,t.jsx)(D,{label:"p95 texture",value:F(o.p95_texture_bytes),unit:"MB"}),(0,t.jsx)(D,{label:"p95 triangles",value:f(o.p95_triangles)})]}):(0,t.jsx)("p",{className:"text-sm text-fg-muted",children:"No resource samples in range."})})]})}function O({bins:e,gridSize:s}){return(0,t.jsx)(C.Panel,{title:"Pointer heatmap",subtitle:"Normalized screen positions",children:(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)(w,{bins:e,gridSize:s,className:"rounded-lg border border-edge"})})})}function B({label:e,value:s,tone:n="neutral",hint:l}){return(0,t.jsxs)("div",{className:"rounded-lg border border-edge bg-ink/40 px-3 py-2.5",children:[(0,t.jsx)("p",{className:"text-xs uppercase tracking-wide text-fg-muted",children:e}),(0,t.jsx)("p",{className:`mt-0.5 text-lg font-semibold tabular-nums ${"bad"===n?"text-red-300":"warn"===n?"text-amber-300":"good"===n?"text-emerald-300":"text-fg-hi"}`,children:s}),l?(0,t.jsx)("p",{className:"text-[11px] text-fg-muted",children:l}):null]})}function G({counts:e,perf:s}){let n=new Map(e.map(e=>[e.event_type,e.count])),l=e=>n.get(e)??0,r=l("session_start"),a=l("runtime_error"),i=l("context_lost"),o=l("focus_change"),d=l("visibility_change"),c=l("viewport_resize"),u=e.reduce((e,t)=>e+t.count,0),x=r>0?a/r:0;return(0,t.jsx)(C.Panel,{title:"Scene health",subtitle:"Errors, GPU context loss & attention gaps in the selected window",children:u>0?(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:[(0,t.jsx)(B,{label:"Errors",value:f(a),tone:a>0?"bad":"good",hint:r>0?`${x.toFixed(2)} / session`:void 0}),(0,t.jsx)(B,{label:"Context loss",value:f(i),tone:i>0?"warn":"good",hint:"GPU device lost"}),(0,t.jsx)(B,{label:"Avg FPS",value:s&&s.samples>0?f(s.avg_fps,1):"—",tone:s&&s.samples>0?s.avg_fps>=50?"good":"warn":"neutral",hint:s&&s.samples>0?`min ${f(s.min_fps,0)}`:void 0}),(0,t.jsx)(B,{label:"Sessions",value:f(r)}),(0,t.jsx)(B,{label:"Attention",value:f(o+d),hint:"focus + visibility changes"}),(0,t.jsx)(B,{label:"Resizes",value:f(c),hint:"viewport changes"})]}):(0,t.jsx)("p",{className:"text-sm text-fg-muted",children:"No events in range."})})}function H({label:e,value:s,hint:n}){return(0,t.jsxs)("div",{className:"rounded-lg border border-edge bg-ink/40 px-3 py-2.5",children:[(0,t.jsx)("p",{className:"text-xs uppercase tracking-wide text-fg-muted",children:e}),(0,t.jsx)("p",{className:"mt-0.5 text-lg font-semibold tabular-nums text-fg-hi",children:s}),n?(0,t.jsx)("p",{className:"text-[11px] text-fg-muted",children:n}):null]})}function K({buckets:e,bucketSize:s}){if(0===e.length)return(0,t.jsx)("p",{className:"text-sm text-fg-muted",children:"No camera samples in range."});let n=[...e].sort((e,t)=>e.bucket-t.bucket),l=n.reduce((e,t)=>Math.max(e,t.count),0)||1;return(0,t.jsx)("div",{className:"flex flex-col gap-1",children:n.map(e=>{let n=e.bucket*s;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"w-24 shrink-0 text-right font-mono text-[11px] text-fg-muted",children:[f(n,1),"–",f(n+s,1)]}),(0,t.jsx)("div",{className:"h-3.5 flex-1 overflow-hidden rounded-sm bg-ink/60",children:(0,t.jsx)("div",{className:"h-full rounded-sm bg-amber",style:{width:`${e.count/l*100}%`}})}),(0,t.jsx)("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] text-fg-muted",children:f(e.count)})]},e.bucket)})})}function V({coverage:e,cellSize:s,distance:n,bucketSize:l,navigation:r}){let a=e.length,i=e.reduce((e,t)=>e+t.count,0),o=r.reduce((e,t)=>e+t.total_distance,0),d=r.reduce((e,t)=>e+t.segments,0),c=r.reduce((e,t)=>e+t.active_segments,0),u=r.length,x=a>0||r.length>0;return(0,t.jsx)(C.Panel,{title:"Scene traversal",subtitle:"Coverage, camera distance & navigation effort — derived from camera_sample",collapsible:!0,defaultCollapsed:!0,children:x?(0,t.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:[(0,t.jsx)(H,{label:"Visited cells",value:f(a),hint:`${f(s,2)} u voxels`}),(0,t.jsx)(H,{label:"Camera samples",value:f(i)}),(0,t.jsx)(H,{label:"Avg travel",value:f(u>0?o/u:0,1),hint:u>0?`over ${f(u)} sessions`:void 0}),(0,t.jsx)(H,{label:"Active movement",value:`${f(100*(d>0?c/d:0),0)}%`,hint:"of camera segments"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1.5 text-xs uppercase tracking-wide text-fg-muted",children:"Camera distance distribution"}),(0,t.jsx)(K,{buckets:n,bucketSize:l})]})]}):(0,t.jsx)("p",{className:"text-sm text-fg-muted",children:"No camera samples in range."})})}let W={babylon:"Babylon.js","babylon-lite":"Babylon (lite)",three:"three.js",playcanvas:"PlayCanvas",r3f:"react-three-fiber",aframe:"A-Frame"};function J({project:e,playgroundUrl:s,onView:l,onOpenOverlay:r}){var a;let i=e.scene,o=i?.engines.length?i.engines:[],[d,c]=(0,n.useState)(i?.defaultEngine??o[0]??""),u=s.length>0&&d.length>0;return(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-xl border border-edge bg-panel p-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-fg-hi",children:i?.label??e.name}),(0,t.jsx)("p",{className:"text-xs text-fg-muted",children:e.name})]}),i?(0,t.jsx)("span",{className:"shrink-0 rounded-full border border-edge bg-ink/50 px-2 py-0.5 text-[11px] text-fg-muted",children:"first-person"===i.cameraMode?"first-person":"viewer"}):null]}),i?.description?(0,t.jsx)("p",{className:"text-xs leading-relaxed text-fg-muted",children:i.description}):(0,t.jsx)("p",{className:"text-xs leading-relaxed text-fg-muted",children:"A project without scene metadata — open its analytics directly."}),o.length>1?(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-[11px] text-fg-muted",children:["Engine",(0,t.jsx)("select",{className:"rounded-md border border-edge bg-ink px-2 py-1.5 text-xs text-fg outline-none focus:border-saffron",value:d,onChange:e=>c(e.target.value),children:o.map(e=>(0,t.jsx)("option",{value:e,children:W[e]??e},e))})]}):1===o.length?(0,t.jsxs)("p",{className:"text-[11px] text-fg-muted",children:["Engine: ",W[a=o[0]]??a]}):null,(0,t.jsxs)("div",{className:"mt-auto flex flex-wrap gap-2 pt-1",children:[(0,t.jsx)("button",{type:"button",onClick:()=>l(e),className:"rounded-md bg-amber px-3 py-1.5 text-xs font-medium text-ink transition hover:bg-ember",children:"View analytics"}),i?(0,t.jsx)("button",{type:"button",disabled:!u,onClick:()=>r(e,d),className:"rounded-md border border-edge px-3 py-1.5 text-xs text-fg transition hover:border-amber hover:text-fg-hi disabled:opacity-40",children:"Open live scene"}):null]})]})}function Q({projects:e,playgroundUrl:s,onView:l}){let[r,a]=(0,n.useState)(null),i=(0,n.useMemo)(()=>{let t=[],s=[],n=[];for(let l of e)l.scene?"first-person"===l.scene.cameraMode?s.push(l):t.push(l):n.push(l);return{viewer:t,firstPerson:s,other:n}},[e]),o=(e,t)=>{let n=e.scene;n&&s&&a({url:`${s.replace(/\/$/,"")}/?scene=${encodeURIComponent(n.id)}&engine=${encodeURIComponent(t)}`,title:`${n.label} \xb7 ${W[t]??t}`})},d=(e,n)=>n.length>0?(0,t.jsxs)("section",{className:"flex flex-col gap-3",children:[(0,t.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-fg-muted",children:e}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:n.map(e=>(0,t.jsx)(J,{project:e,playgroundUrl:s,onView:l,onOpenOverlay:o},e.id))})]}):null;return(0,t.jsxs)(C.Panel,{title:"Scenes",subtitle:"Pick a scene to explore its analytics, or open it live to test capture.",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[d("Viewer",i.viewer),d("First-person",i.firstPerson),d("Other projects",i.other)]}),r?(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex flex-col bg-black/70 p-4 sm:p-8",role:"dialog","aria-modal":"true","aria-label":"Live scene overlay",children:(0,t.jsxs)("div",{className:"mx-auto flex h-full w-full max-w-6xl flex-col overflow-hidden rounded-xl border border-edge bg-panel",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-edge px-4 py-2.5",children:[(0,t.jsx)("p",{className:"text-sm text-fg",children:r.title}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("a",{href:r.url,target:"_blank",rel:"noreferrer",className:"rounded-md border border-edge px-3 py-1.5 text-xs text-fg transition hover:border-amber hover:text-fg-hi",children:"Open in new tab ↗"}),(0,t.jsx)("button",{type:"button",onClick:()=>a(null),className:"rounded-md border border-edge px-3 py-1.5 text-xs text-fg transition hover:border-amber hover:text-fg-hi",children:"Close ✕"})]})]}),(0,t.jsx)("iframe",{title:r.title,src:r.url,className:"h-full w-full flex-1 bg-ink"})]})}):null]})}function X({sessions:e,onSelect:s,selectedId:n}){return(0,t.jsx)(C.Panel,{title:"Sessions",subtitle:s?`${e.length} most recent \xb7 select to drill in`:`${e.length} most recent`,children:(0,t.jsx)(y,{sessions:e,onSelect:s,selectedId:n})})}function q({meshes:e}){let s=e.reduce((e,t)=>Math.max(e,t.count),0);return(0,t.jsx)(C.Panel,{title:"Top meshes",subtitle:"Most-interacted meshes",children:0===e.length?(0,t.jsx)("p",{className:"text-sm text-fg-muted",children:"No mesh interactions in range."}):(0,t.jsx)("ul",{className:"space-y-1.5",children:e.map(e=>(0,t.jsxs)("li",{className:"text-sm",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("span",{className:"truncate font-mono text-xs text-fg",children:e.mesh}),(0,t.jsx)("span",{className:"tabular-nums text-fg-muted",children:f(e.count)})]}),(0,t.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,t.jsx)("div",{className:"h-full rounded bg-amber",style:{width:`${s>0?e.count/s*100:0}%`}})})]},e.mesh))})})}function Y({baseUrl:e,apiKey:s,sessionId:l,scene:a}){let i=(0,n.useRef)(null),[o,d]=(0,n.useState)([]),[c,u]=(0,n.useState)("loading");return(0,n.useEffect)(()=>{let t=!1;return u("loading"),new r.CollectorApi(e,s).sessionTrajectory(l,{scene:a,limit:5e3}).then(e=>{t||(d(e),u("ready"))}).catch(()=>{t||(d([]),u("error"))}),()=>{t=!0}},[e,s,l,a]),(0,n.useEffect)(()=>{let e=i.current;if(!e)return;let t=e.getContext("2d");if(!t||(t.clearRect(0,0,360,360),t.fillStyle="#0b0e14",t.fillRect(0,0,360,360),0===o.length))return;let s=1/0,n=-1/0,l=1/0,r=-1/0;for(let e of o)e.x<s&&(s=e.x),e.x>n&&(n=e.x),e.z<l&&(l=e.z),e.z>r&&(r=e.z);let a=328/Math.max(n-s,r-l,.001),d=e=>[16+(e.x-s)*a,16+(r-e.z)*a];t.lineWidth=2,t.strokeStyle="#38bdf8",t.beginPath(),o.forEach((e,s)=>{let[n,l]=d(e);0===s?t.moveTo(n,l):t.lineTo(n,l)}),t.stroke();let c=o[0],u=o[o.length-1];if(c){let[e,s]=d(c);t.fillStyle="#22c55e",t.beginPath(),t.arc(e,s,5,0,2*Math.PI),t.fill()}if(u){let[e,s]=d(u);t.fillStyle="#ef4444",t.beginPath(),t.arc(e,s,5,0,2*Math.PI),t.fill()}},[o]),(0,t.jsxs)(C.Panel,{title:"Walked path",subtitle:"Camera trajectory (top-down)",help:"The ordered route this session's camera took across the X/Z ground plane — green is the start, red is the end. Meaningful for first-person (walkable) sessions.",children:[(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)("canvas",{ref:i,width:360,height:360,className:"rounded-lg border border-edge","aria-label":"Session camera trajectory"})}),"loading"===c?(0,t.jsx)("p",{className:"mt-2 text-center text-xs text-fg-muted",children:"Loading trajectory…"}):"error"===c?(0,t.jsx)("p",{className:"mt-2 text-center text-xs text-red-400",children:"Failed to load trajectory."}):0===o.length?(0,t.jsx)("p",{className:"mt-2 text-center text-xs text-fg-muted",children:"No camera movement recorded for this session."}):null]})}function Z(e){return e>=36e5?`${Math.round(e/36e5)}h`:e>=6e4?`${Math.round(e/6e4)}m`:e>=1e3?`${Math.round(e/1e3)}s`:`${e}ms`}function ee({buckets:e,intervalMs:s,onBrush:l,onClear:r,brushed:a}){let i=(0,n.useRef)(null),o=(0,n.useRef)(null),[d,c]=(0,n.useState)(640),u=(0,n.useRef)(null),[x,m]=(0,n.useState)(null);(0,n.useEffect)(()=>{let e=i.current;if(!e)return;let t=()=>c(Math.max(320,e.clientWidth));t();let s=new ResizeObserver(t);return s.observe(e),()=>s.disconnect()},[]);let p={x:40,y:14,w:Math.max(1,d-40-36),h:114},h=e.length>0?{start:e[0].bucket,end:e[e.length-1].bucket+s}:null,f=(0,n.useCallback)(e=>{if(!h)return 0;let t=(e-p.x)/p.w;return Math.round(h.start+Math.max(0,Math.min(1,t))*(h.end-h.start))},[h,p.x,p.w]);(0,n.useEffect)(()=>{let t=o.current;if(!t)return;let n=t.getContext("2d");if(!n)return;if(n.clearRect(0,0,d,150),n.fillStyle="#0b0e14",n.fillRect(0,0,d,150),0===e.length||!h){n.fillStyle="#64748b",n.font="12px system-ui, sans-serif",n.textAlign="center",n.fillText("No events in range",d/2,75);return}let l=e.reduce((e,t)=>Math.max(e,t.events),0)||1,r=h.end-h.start,a=Math.max(1,p.w/e.length*.8);for(let t of e){let e=p.x+(t.bucket-h.start)/r*p.w,s=t.events/l*p.h;n.fillStyle="rgba(56, 189, 248, 0.55)",n.fillRect(e,p.y+p.h-s,a,s)}if(n.font="10px system-ui, sans-serif",n.textBaseline="middle",n.fillStyle="rgba(56, 189, 248, 0.95)",n.textAlign="right",n.fillText(String(l),p.x-5,p.y+4),n.fillText("0",p.x-5,p.y+p.h),n.textBaseline="alphabetic",n.fillStyle="rgba(56, 189, 248, 0.7)",n.textAlign="left",n.fillText(`events / ${Z(s)}`,p.x,144),x){let e=Math.min(x.x0,x.x1),t=Math.max(x.x0,x.x1);n.fillStyle="rgba(56, 189, 248, 0.18)",n.fillRect(e,p.y,t-e,p.h),n.strokeStyle="rgba(56, 189, 248, 0.8)",n.lineWidth=1,n.strokeRect(e,p.y,t-e,p.h)}},[e,d,h,x,s,p.x,p.y,p.w,p.h]);let g=()=>{let e=u.current;if(u.current=null,m(null),!e||4>Math.abs(e.x1-e.x0))return;let t=f(Math.min(e.x0,e.x1)),s=f(Math.max(e.x0,e.x1));s>t&&l(t,s)};return(0,t.jsx)(C.Panel,{title:"Event volume over time",subtitle:`Bars: events per ${Z(s)} \xb7 drag to zoom the time window`,children:(0,t.jsxs)("div",{ref:i,className:"relative",children:[(0,t.jsx)("canvas",{ref:o,width:d,height:150,className:"w-full cursor-crosshair rounded-lg border border-edge",onMouseDown:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.clientX-t.left;u.current={x0:s,x1:s},m({x0:s,x1:s})},onMouseMove:e=>{if(!u.current)return;let t=e.currentTarget.getBoundingClientRect(),s={...u.current,x1:e.clientX-t.left};u.current=s,m(s)},onMouseUp:g,onMouseLeave:g,"aria-label":"Event volume time series"}),a&&r?(0,t.jsx)("button",{type:"button",onClick:r,className:"absolute right-2 top-2 rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg transition hover:border-amber hover:text-fg-hi",children:"Clear zoom"}):null]})})}var et=e.i(19761);function es({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-3 py-0.5",children:[(0,t.jsx)("span",{className:"shrink-0 text-xs text-fg-muted",children:e}),(0,t.jsx)("span",{className:"min-w-0 truncate text-right font-mono text-xs text-fg",title:s,children:s})]})}function en({title:e,rows:s}){return 0===s.length?null:(0,t.jsxs)("div",{className:"rounded-lg border border-edge bg-ink/40 p-3",children:[(0,t.jsx)("p",{className:"mb-1.5 text-[10px] font-semibold uppercase tracking-wide text-fg-muted",children:e}),s.map(([e,s])=>(0,t.jsx)(es,{label:e,value:s},e))]})}function el(e){let t=[];for(let[s,n]of e){let e=null==n||""===n?null:Array.isArray(n)?n.join(" × "):"boolean"==typeof n?n?"yes":"no":"object"==typeof n?JSON.stringify(n):String(n);null!=e&&t.push([s,e])}return t}function er({baseUrl:e,apiKey:s,sessionId:l,hiddenTypes:r,onToggleType:a,onSetAllHidden:i}){let o,d,c,[u,x]=(0,n.useState)([]),[m,p]=(0,n.useState)("loading"),[h,f]=(0,n.useState)(null),[g,b]=(0,n.useState)(new Set);(0,n.useEffect)(()=>{let t=!1;return p("loading"),f(null),x([]),b(new Set),(async()=>{try{let n=await (0,et.fetchSessionEvents)({endpoint:e,apiKey:s,sessionId:l});if(t)return;x(n),p(0===n.length?"empty":"ready")}catch(e){if(t)return;p("error"),f(e instanceof Error?e.message:"Failed to load session data.")}})(),()=>{t=!0}},[e,s,l]);let{meta:j,byType:v,allTypes:y,sorted:w}=(0,n.useMemo)(()=>{let e=[...u].sort((e,t)=>e.ts-t.ts),t=new Map;for(let s of e)t.set(s.type,(t.get(s.type)??0)+1);let s=[...t.keys()].sort(),n=e[0];return{meta:{start:n,end:e[e.length-1],startEvent:e.find(e=>"session_start"===e.type)},byType:t,allTypes:s,sorted:e}},[u]);if("ready"!==m)return(0,t.jsx)(C.Panel,{title:"Session data",subtitle:"Metadata and captured event breakdown",children:(0,t.jsx)("p",{className:"py-6 text-center text-sm text-fg-muted",children:"loading"===m?"Loading session data…":"empty"===m?"No events captured for this session.":h??"Session data unavailable."})});let N=j.start,S=j.end,k=j.startEvent,P=N&&S?S.ts-N.ts:0,M=e=>e?new Date(e).toLocaleString():"—",_=N?.pageMeta,R=el([["Project",N?.projectId],["Session",N?.sessionId],["Visitor",N?.visitorId],["SDK",N?.sdkVersion],["Scene ID",N?.sceneId],["URL",N?.url],["Started",M(N?.ts)],["Ended",M(S?.ts)],["Duration",(d=Math.floor((o=Math.round(P/1e3))/60),c=o%60,d>0?`${d}m ${c}s`:`${c}s`)],["Events",String(w.length)]]),T=_?el([["Title",_.title],["Language",_.language],["Referrer",_.referrer],["Viewport",_.viewport],["Device pixel ratio",_.devicePixelRatio]]):[],z=k?.type==="session_start"?k.device:void 0,$=k?.type==="session_start"?k.graphics:void 0,E=k?.type==="session_start"?k.scene:void 0,A=k?.type==="session_start"?k.connector:void 0,I=k?.type==="session_start"?k.user:void 0,D=el([["Engine",z?.engine],["Graphics API",$?.api],["Backend",$?.backend],["API version",$?.apiVersion],["Shading language",$?.shadingLanguage],["GPU vendor",z?.vendor],["GPU renderer",z?.renderer],["Max texture size",z?.maxTextureSize],["CPU cores",z?.hardwareConcurrency],["Device memory (GB)",z?.deviceMemoryGb],["Mobile",z?.isMobile]]),F=el([["Connector",A?[A.name,A.version].filter(Boolean).join(" "):null],["Coordinate system",A?.coordinateSystem],["Description",E?.description],["Camera type",E?.cameraType],["Camera name",E?.cameraName],["Mesh count",E?.meshCount],["User id",I?.id],["User traits",I?.traits]]),L=y.every(e=>r.has(e));return(0,t.jsxs)(C.Panel,{title:"Session data",subtitle:"Metadata that was sent and a per-feature breakdown — toggle a type to show/hide it in the replay, expand to inspect raw payloads",help:(0,t.jsxs)(t.Fragment,{children:["Project-level metadata beyond the ",(0,t.jsx)("strong",{children:"Project ID"}),"isn't stored in the OSS collector (Phase 1) — everything here is derived from the session's own events. The"," ",(0,t.jsx)("strong",{children:"Device / graphics"})," and ",(0,t.jsx)("strong",{children:"Scene / connector"})," blocks come from the one-time ",(0,t.jsx)("code",{children:"session_start"})," event."]}),children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,t.jsx)(en,{title:"Identity",rows:R}),(0,t.jsx)(en,{title:"Page context",rows:T}),(0,t.jsx)(en,{title:"Device / graphics",rows:D}),(0,t.jsx)(en,{title:"Scene / connector",rows:F})]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,t.jsxs)("p",{className:"text-[10px] font-semibold uppercase tracking-wide text-fg-muted",children:["Captured features (",y.length," event types)"]}),(0,t.jsx)("button",{type:"button",onClick:()=>i(!L,y),className:"rounded-md border border-edge px-2 py-1 text-xs text-fg transition hover:border-amber hover:text-fg-hi",children:L?"Show all":"Hide all"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-2 lg:grid-cols-3",children:y.map(e=>{let s=!r.has(e),n=g.has(e),l=w.filter(t=>t.type===e).slice(0,3);return(0,t.jsxs)("div",{className:`self-start rounded-lg border border-edge bg-ink/40 ${n?"sm:col-span-2 lg:col-span-3":""}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-2.5 py-1.5",children:[(0,t.jsxs)("label",{className:"flex min-w-0 flex-1 cursor-pointer items-center gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:s,onChange:()=>a(e),className:"accent-amber"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-fg",children:e})]}),(0,t.jsx)("span",{className:"tabular-nums text-xs text-fg-muted",children:v.get(e)}),(0,t.jsx)("button",{type:"button",onClick:()=>b(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s}),"aria-expanded":n?"true":"false",className:"rounded border border-edge px-1.5 py-0.5 text-[10px] text-fg-muted transition hover:border-amber hover:text-fg-hi",children:n?"Hide raw":"Raw"})]}),n?(0,t.jsxs)("pre",{className:"max-h-64 overflow-auto border-t border-edge bg-black/30 px-3 py-2 text-[10px] leading-relaxed text-fg",children:[l.map(e=>JSON.stringify(e,null,2)).join("\n\n"),(v.get(e)??0)>l.length?`
2
-
3
- … ${(v.get(e)??0)-l.length} more`:""]}):null]},e)})})]})]})}function ea(e){return e.length>10?`${e.slice(0,8)}…`:e}function ei(e,t){let s=Math.max(0,Math.round((t-e)/1e3));if(s<60)return`${s}s ago`;let n=Math.floor(s/60);return n<60?`${n}m ago`:`${Math.floor(n/60)}h ago`}let eo={active:"bg-emerald-400",recent:"bg-amber-400",idle:"bg-fg-muted"},ed={idle:"offline",connecting:"connecting…",open:"live",reconnecting:"reconnecting…"};function ec({status:e,sessions:s}){let n="open"===e;return(0,t.jsxs)("span",{className:"inline-flex items-center gap-2 rounded-full border border-edge bg-ink px-3 py-1 text-xs",children:[(0,t.jsxs)("span",{className:"relative flex h-2 w-2",children:[n?(0,t.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-75"}):null,(0,t.jsx)("span",{className:`relative inline-flex h-2 w-2 rounded-full ${n?"bg-emerald-400":"idle"===e?"bg-fg-muted":"bg-amber-400"}`})]}),(0,t.jsx)("span",{className:"font-medium text-fg",children:n?`${f(s)} live now`:ed[e]})]})}function eu({snapshot:e,status:s,feed:n,now:l,onSelectSession:r}){let a=e?.sessions??[],i=e?.activeSessions??0,o=e?.activeVisitors??0;return(0,t.jsxs)(C.Panel,{title:"Live now",subtitle:"Active sessions and a real-time event feed, updating in place.",help:(0,t.jsx)(t.Fragment,{children:"Sessions seen within the liveness window, streamed over SSE from the collector. The roster is intentionally non-identifying — no geo, user-agent, or visitor id. Click a session to follow it live."}),children:[(0,t.jsxs)("div",{className:"mb-3 flex flex-wrap items-center gap-4",children:[(0,t.jsx)(ec,{status:s,sessions:i}),(0,t.jsxs)("span",{className:"text-xs text-fg-muted",children:[(0,t.jsx)("span",{className:"font-semibold text-fg",children:f(o)})," visitor",1===o?"":"s"]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2 text-xs uppercase tracking-wide text-fg-muted",children:["Sessions (",a.length,")"]}),0===a.length?(0,t.jsx)("p",{className:"text-sm text-fg-muted",children:"open"===s?"No active sessions right now.":"Waiting for live data…"}):(0,t.jsx)("ul",{className:"flex max-h-64 flex-col gap-1 overflow-y-auto pr-1",children:a.map(e=>(0,t.jsx)("li",{children:r?(0,t.jsxs)("button",{type:"button",onClick:()=>r(e.sessionId),className:"flex w-full items-center gap-2 rounded-md border border-transparent px-2 py-1.5 text-left transition hover:border-edge hover:bg-ink",children:[(0,t.jsx)("span",{className:`h-2 w-2 flex-none rounded-full ${eo[e.activity]}`,"aria-hidden":"true"}),(0,t.jsx)("span",{className:"font-mono text-xs text-fg",children:ea(e.sessionId)}),(0,t.jsx)("span",{className:"truncate text-xs text-fg-muted",children:e.sceneId}),(0,t.jsx)("span",{className:"ml-auto flex-none text-xs text-fg-muted",children:ei(e.lastSeen,l)})]}):(0,t.jsxs)("div",{className:"flex w-full items-center gap-2 px-2 py-1.5",children:[(0,t.jsx)("span",{className:`h-2 w-2 flex-none rounded-full ${eo[e.activity]}`,"aria-hidden":"true"}),(0,t.jsx)("span",{className:"font-mono text-xs text-fg",children:ea(e.sessionId)}),(0,t.jsx)("span",{className:"truncate text-xs text-fg-muted",children:e.sceneId}),(0,t.jsx)("span",{className:"ml-auto flex-none text-xs text-fg-muted",children:ei(e.lastSeen,l)})]})},e.sessionId))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-2 text-xs uppercase tracking-wide text-fg-muted",children:"Event feed"}),0===n.length?(0,t.jsx)("p",{className:"text-sm text-fg-muted",children:"open"===s?"Listening for events…":"Waiting for live data…"}):(0,t.jsx)("ul",{className:"flex max-h-64 flex-col gap-1 overflow-y-auto pr-1 font-mono text-xs",children:n.map((e,s)=>(0,t.jsxs)("li",{className:"flex items-center gap-2 rounded-md px-2 py-1",children:[(0,t.jsx)("span",{className:"flex-none rounded bg-amber/15 px-1.5 py-0.5 text-[11px] text-saffron",children:e.type}),(0,t.jsx)("span",{className:"text-fg-muted",children:ea(e.sessionId)}),(0,t.jsx)("span",{className:"ml-auto flex-none text-fg-muted",children:ei(e.ts,l)})]},`${e.sessionId}-${e.ts}-${s}`))})]})]})]})}let ex=(0,s.default)(()=>e.A(69091).then(e=>e.SessionReplay),{loadableGenerated:{modules:[12449]},ssr:!1}),em=(0,s.default)(()=>e.A(33996).then(e=>e.WorldHeatmap3D),{loadableGenerated:{modules:[25453]},ssr:!1}),ep=(0,s.default)(()=>e.A(58913).then(e=>e.CameraDome3D),{loadableGenerated:{modules:[98568]},ssr:!1}),eh=(0,s.default)(()=>e.A(56403).then(e=>e.ClickRays3D),{loadableGenerated:{modules:[61518]},ssr:!1}),ef=(0,s.default)(()=>e.A(70019).then(e=>e.FlowSankey3D),{loadableGenerated:{modules:[36471]},ssr:!1}),eg={sessions:[],pointer:[],camera:[],meshes:[],perf:null,world:[],gaze:[],clickRays:[],flowLinks:[],flowQuery:{},hasFirstPerson:!1,proxyMeshes:[],timeseries:[],counts:[],coverage:[],distance:[],navigation:[],sources:[],floorPlan:[],performance:{distribution:null,histogram:[],frameTime:null,jank:null,byDevice:[],byScene:[],resources:null,stability:null},intervalMs:36e5};e.s(["default",0,function(){let[e,s]=(0,n.useState)(l.DEFAULT_COLLECTOR_URL),[i,o]=(0,n.useState)(l.DEFAULT_API_KEY),[x,m]=(0,n.useState)([]),[p,h]=(0,n.useState)(""),[f,b]=(0,n.useState)(a),[j,v]=(0,n.useState)([]),[y,w]=(0,n.useState)(eg),[N,S]=(0,n.useState)("idle"),[k,P]=(0,n.useState)(null),[M,_]=(0,n.useState)(null),[C,z]=(0,n.useState)("idle"),[$,D]=(0,n.useState)(new Set),[F,L]=(0,n.useState)([]),[B,H]=(0,n.useState)(()=>Date.now()),K=(0,n.useRef)(f);K.current=f;let W=(0,n.useRef)(a.window),J=(0,n.useRef)(p);J.current=p;let Z=(0,n.useRef)(M);Z.current=M;let et=(0,n.useRef)(null),es=(0,n.useRef)(null),en=(0,n.useRef)(!1),el=(0,n.useCallback)((e,t)=>{let s=`/projects/${encodeURIComponent(e)}`;return t?`${s}/session/${encodeURIComponent(t)}`:s},[]),ea=(0,n.useCallback)(e=>{window.location.pathname!==e&&window.history.pushState({},"",e)},[]);(0,n.useEffect)(()=>{let e=window.location.pathname.match(/^\/projects\/([^/]+)(?:\/session\/([^/]+))?/);e?.[1]&&(et.current=decodeURIComponent(e[1]),e[2]&&(es.current=decodeURIComponent(e[2])))},[]),(0,n.useEffect)(()=>{l.COLLECTOR_URL_IS_PINNED||s(window.location.origin)},[]),(0,n.useEffect)(()=>{let e=!1;return fetch("/api/projects").then(e=>e.ok?e.json():[]).then(t=>{if(e||!Array.isArray(t)||0===t.length)return;m(t);let[s]=t,n=et.current,r=(n?t.find(e=>e.id===n):void 0)??t.find(e=>e.apiKey===l.DEFAULT_API_KEY)??s;r&&(h(r.id),o(r.apiKey),(n&&r.id===n||1===t.length&&!r.scene)&&(en.current=!0))}).catch(()=>{}),()=>{e=!0}},[]);let ei=(0,n.useCallback)(async t=>{let s=t??i;if(!s){S("error"),P("An API key is required.");return}S("loading"),P(null),_(null),z("idle");let n=K.current,l=c(n),a=d(n),o=new r.CollectorApi(e,s);try{let e=await o.sessions({...l,source:void 0,limit:100}),t=a.until??Date.now(),s=a.since;if(null==s){let n=e.reduce((e,t)=>{var s;let n=(s=t.started_at,new Date(s.includes("T")?s:s.replace(" ","T")+"Z").getTime());return Number.isFinite(n)?Math.min(e,n):e},Date.now());s=Number.isFinite(n)?n:t-864e5}let n=function(e,t=80){let s=Math.max(60,Math.round(e/t/1e3));return u.find(e=>e>=s)??604800}(Math.max(6e4,t-s)),[r,i,d,c,x,m,p,h,f,g,b,j,y,N,k,P,M]=await Promise.all([o.pointerHeatmap({...l,bins:50}),o.cameraHeatmap({...l,source:void 0,bins:36}),o.topMeshes({...l,source:void 0,scene:void 0,limit:25}),o.perf({...l,source:void 0}),o.worldHeatmap({...l,cellSize:.5}),o.gazeHeatmap({...l,source:void 0,cellSize:.5}),o.clickRays({...l,cellSize:.5}),o.flowHeatmap({...l,bins:36,limit:400,groupByOrigin:!0}),o.scenes({since:a.since,until:a.until,limit:200}),o.timeseries({since:a.since,until:a.until,scene:l.scene,interval:n}),o.eventCounts({since:a.since,until:a.until,scene:l.scene}),o.coverage({...l,source:void 0,cellSize:1}),o.cameraDistance({...l,source:void 0,bucketSize:1}),o.navigation({...l,source:void 0}),o.interactionsBySource(l),o.cameraPositionHeatmap({...l,source:void 0,cameraMode:"first-person",cellSize:1}),(async()=>{let[e,t,s,n,r,a,i,d]=await Promise.all([o.perfDistribution({...l,source:void 0}),o.fpsHistogram({...l,source:void 0}),o.frameTimePercentiles({...l,source:void 0}),o.jankRate({...l,source:void 0}),o.perfByDevice({...l,source:void 0}),o.perfByScene({...l,source:void 0,scene:void 0}),o.resourcePercentiles({...l,source:void 0}),o.stabilityCounts({...l,source:void 0})]);return{distribution:e,histogram:t,frameTime:s,jank:n,byDevice:r,byScene:a,resources:i,stability:d}})()]);v(f);let _=l.scene??(1===f.length?f[0]?.scene_id:void 0),C=_?(await o.sceneRepresentation(_).catch(()=>null))?.proxy?.meshes??[]:[];w({sessions:e,pointer:r,camera:i,meshes:d,perf:c,world:x,gaze:m,clickRays:p,flowLinks:h,flowQuery:{since:a.since,until:a.until,scene:l.scene,source:l.source},hasFirstPerson:P.length>0,proxyMeshes:C,timeseries:g,counts:b,coverage:j,distance:y,navigation:N,sources:k,floorPlan:P,performance:M,intervalMs:1e3*n}),S("ready")}catch(e){w(eg),S("error"),P(e instanceof r.ApiError?`${e.status}: ${e.message}`:e instanceof Error?e.message:"Request failed.")}},[i,e]),eo=(0,n.useCallback)(e=>{h(e.id),o(e.apiKey),ea(el(e.id)),ei(e.apiKey)},[ei,el,ea]);(0,n.useEffect)(()=>{if("idle"===N)return;let e=setTimeout(()=>void ei(),300);return()=>clearTimeout(e)},[f]);let ed="idle"!==N&&!!i,ec=(0,n.useRef)(0),eb=(0,n.useRef)(!1);eb.current=null!=M;let ej=(0,n.useCallback)(e=>{L(t=>[e,...t].slice(0,30));let t=Date.now();eb.current||t-ec.current<5e3||(ec.current=t,ei())},[ei]),{snapshot:ev,status:ey}=(0,g.useLivePresence)(e,i,ed);(0,g.useLiveStream)(e,i,ed,ej),(0,n.useEffect)(()=>{if(!ed)return;let e=setInterval(()=>H(Date.now()),1e3);return()=>clearInterval(e)},[ed]);let ew=(0,n.useCallback)(async t=>{let s=c(K.current),n=new r.CollectorApi(e,i),[l,a,o,d,u]=await Promise.all([n.pointerHeatmap({...s,bins:50,session:t}),n.cameraHeatmap({...s,source:void 0,bins:36,session:t}),n.topMeshes({...s,source:void 0,scene:void 0,limit:25,session:t}),n.perf({...s,source:void 0,session:t}),n.sessionMeta(t).catch(()=>null)]);return{id:t,meta:u,pointer:l,camera:a,meshes:o,perf:d}},[e,i]),eN=(0,n.useCallback)(async e=>{let t=J.current;t&&ea(el(t,e)),window.scrollTo({top:0,behavior:"smooth"}),_({id:e,meta:null,pointer:[],camera:[],meshes:[],perf:null}),z("loading"),D(new Set);try{_(await ew(e)),z("ready")}catch(e){z("error"),P(e instanceof r.ApiError?`${e.status}: ${e.message}`:e instanceof Error?e.message:"Request failed.")}},[ew,el,ea]),eS=(0,n.useCallback)(()=>{let e=J.current;e&&ea(el(e)),_(null),z("idle"),D(new Set)},[el,ea]),ek=(0,n.useCallback)(e=>{let t=x.find(t=>t.id===e);h(e),t&&o(t.apiKey),w(eg),v([]),S("idle"),P(null),_(null),z("idle"),D(new Set)},[x]),eP=(0,n.useCallback)(e=>{D(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),eM=(0,n.useCallback)((e,t)=>{D(e?new Set(t):new Set)},[]),e_=(0,n.useCallback)((e,t)=>{b(s=>("custom"!==s.window&&(W.current=s.window),{...s,window:"custom",since:e,until:t}))},[]),eC=(0,n.useCallback)(()=>{b(e=>({...e,window:W.current}))},[]);(0,n.useEffect)(()=>{en.current&&i&&(en.current=!1,ei())},[x,i,ei]),(0,n.useEffect)(()=>{if("ready"===N&&es.current){let e=es.current;es.current=null,eN(e)}},[N,eN]),(0,n.useEffect)(()=>{let e=()=>{let e=window.location.pathname.match(/^\/projects\/[^/]+(?:\/session\/([^/]+))?/),t=e?.[1]?decodeURIComponent(e[1]):null;t?Z.current?.id!==t&&eN(t):Z.current&&eS()};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[eN,eS]);let eR=!!(M&&ev?.sessions.some(e=>e.sessionId===M.id)),eT=(0,n.useRef)(eR);return(0,n.useEffect)(()=>{let e=eT.current;if(eT.current=eR,!e||eR)return;let t=Z.current;if(!t||"ready"!==C)return;let s=t.id,n=!1;return(async()=>{try{let e=await ew(s);n||Z.current?.id!==s||_(e)}catch{}})(),()=>{n=!0}},[eR,C,ew]),(0,n.useEffect)(()=>{if(!eR||"ready"!==C)return;let e=Z.current?.id;if(!e)return;let t=!1,s=setInterval(()=>{(async()=>{try{let s=await ew(e);t||Z.current?.id!==e||_(s)}catch{}})()},1e3);return()=>{t=!0,clearInterval(s)}},[eR,C,ew]),(0,t.jsxs)("main",{className:"mx-auto max-w-6xl px-6 py-8",children:[(0,t.jsxs)("header",{className:"mb-6 flex items-center gap-3",children:[(0,t.jsx)("img",{src:"/logo.svg",alt:"Uptimizr",width:36,height:36,className:"h-9 w-9 shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"font-display text-2xl font-bold text-fg-hi",children:"Uptimizr"}),(0,t.jsx)("p",{className:"text-sm text-fg-muted",children:"Analytics for 3D scenes — open-source collector."})]})]}),(0,t.jsxs)("form",{className:"mb-6 flex flex-wrap items-end gap-3 rounded-xl border border-edge bg-panel p-4",onSubmit:e=>{e.preventDefault(),p&&ea(el(p)),ei()},children:[x.length>0?(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-fg-muted",children:["Project",(0,t.jsx)("select",{className:"min-w-56 rounded-md border border-edge bg-ink px-3 py-2 text-sm text-fg outline-none focus:border-saffron",value:p,onChange:e=>ek(e.target.value),children:x.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))})]}):null,(0,t.jsxs)("label",{className:"flex flex-1 flex-col gap-1 text-xs text-fg-muted",children:["Collector URL",(0,t.jsx)("input",{className:"min-w-56 rounded-md border border-edge bg-ink px-3 py-2 text-sm text-fg outline-none focus:border-saffron",value:e,onChange:e=>s(e.target.value),placeholder:"http://localhost:4318"})]}),(0,t.jsxs)("label",{className:"flex flex-1 flex-col gap-1 text-xs text-fg-muted",children:["Project API key",(0,t.jsx)("input",{className:"min-w-56 rounded-md border border-edge bg-ink px-3 py-2 text-sm text-fg outline-none focus:border-saffron",value:i,onChange:e=>o(e.target.value),type:"password",placeholder:"utk_…"})]}),(0,t.jsx)("button",{type:"submit",disabled:"loading"===N,className:"rounded-md bg-amber px-4 py-2 text-sm font-medium text-ink transition hover:bg-ember disabled:opacity-50",children:"loading"===N?"Loading…":"Load"})]}),"idle"!==N?(0,t.jsx)(E,{filters:f,scenes:j,onChange:b,busy:"loading"===N}):null,k?(0,t.jsx)("div",{className:"mb-6 rounded-lg border border-red-900/60 bg-red-950/40 px-4 py-3 text-sm text-red-300",children:k}):null,"idle"===N?x.length>0?(0,t.jsx)(Q,{projects:x,playgroundUrl:l.DEFAULT_PLAYGROUND_URL,onView:eo}):(0,t.jsx)("p",{className:"text-sm text-fg-muted",children:"Enter your collector URL and a project API key, then load to view analytics."}):M?(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-2",children:[(0,t.jsxs)("div",{className:"lg:col-span-2 flex flex-wrap items-center justify-between gap-3 rounded-xl border border-edge bg-panel p-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xs uppercase tracking-wide text-fg-muted",children:"Session"}),(0,t.jsx)("p",{className:"font-mono text-sm text-fg",children:M.id}),(0,t.jsx)("p",{className:"mt-1 text-xs text-fg-muted",children:"loading"===C?"Loading session…":[M.meta?.scene?.sceneId?`scene: ${M.meta.scene.sceneId}`:null,M.meta?.device?.gpu?`gpu: ${M.meta.device.gpu}`:null,M.meta?.startedAt?`started: ${M.meta.startedAt}`:null].filter(Boolean).join(" · ")||"No session metadata."})]}),(0,t.jsx)("button",{type:"button",onClick:eS,className:"rounded-md border border-edge px-3 py-2 text-sm text-fg transition hover:border-amber hover:text-fg-hi",children:"← All sessions"})]}),(0,t.jsx)("div",{className:"lg:col-span-2",children:(0,t.jsx)(ex,{baseUrl:e,apiKey:i,sessionId:M.id,hiddenTypes:$,isLive:eR})}),(0,t.jsx)("div",{className:"lg:col-span-2",children:(0,t.jsx)(er,{baseUrl:e,apiKey:i,sessionId:M.id,hiddenTypes:$,onToggleType:eP,onSetAllHidden:eM})}),(0,t.jsx)(I,{perf:M.perf}),(0,t.jsx)(q,{meshes:M.meshes}),(0,t.jsx)(O,{bins:M.pointer,gridSize:50}),(0,t.jsx)(R,{bins:M.camera,gridSize:36}),M.meta?.scene?.cameraType==="free"?(0,t.jsx)(Y,{baseUrl:e,apiKey:i,sessionId:M.id,scene:M.meta?.scene?.sceneId??f.scene}):null,(0,t.jsx)("div",{className:"lg:col-span-2",children:(0,t.jsx)(ep,{bins:M.camera,gridSize:36})}),(0,t.jsx)("div",{className:"lg:col-span-2",children:(0,t.jsx)(X,{sessions:y.sessions,selectedId:M.id,onSelect:eN})})]}):(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-2",children:[(0,t.jsx)("div",{className:"lg:col-span-2",children:(0,t.jsx)(eu,{snapshot:ev,status:ey,feed:F,now:B,onSelectSession:eN})}),(0,t.jsx)("div",{className:"lg:col-span-2",children:(0,t.jsx)(ee,{buckets:y.timeseries,intervalMs:y.intervalMs,onBrush:e_,brushed:"custom"===f.window,onClear:eC})}),(0,t.jsx)("div",{className:"lg:col-span-2",children:(0,t.jsx)(G,{counts:y.counts,perf:y.perf})}),(0,t.jsx)("div",{className:"lg:col-span-2",children:(0,t.jsx)(V,{coverage:y.coverage,cellSize:1,distance:y.distance,bucketSize:1,navigation:y.navigation})}),(0,t.jsx)(I,{perf:y.perf}),(0,t.jsx)(q,{meshes:y.meshes}),(0,t.jsx)("div",{className:"lg:col-span-2",children:(0,t.jsx)(U,{data:y.performance})}),(0,t.jsx)(A,{rows:y.sources}),(0,t.jsx)(O,{bins:y.pointer,gridSize:50}),(0,t.jsx)(R,{bins:y.camera,gridSize:36}),"viewer"!==f.cameraMode?(0,t.jsx)(T,{bins:y.floorPlan,cellSize:1}):null,(0,t.jsx)("div",{className:"lg:col-span-2",children:(0,t.jsx)(ep,{bins:y.camera,gridSize:36})}),(0,t.jsx)("div",{className:"lg:col-span-2",children:(0,t.jsx)(em,{voxels:y.world,cellSize:.5,proxyMeshes:y.proxyMeshes})}),(0,t.jsx)("div",{className:"lg:col-span-2",children:(0,t.jsx)(em,{voxels:y.gaze,cellSize:.5,proxyMeshes:y.proxyMeshes,title:"Gaze heatmap (3D)",subtitle:"Camera-pose gaze hit-points voxel-binned in world space — what viewers actually look at",legendTitle:"Gaze density",legendLow:"few looks",legendHigh:"most looks",legendNote:"Each marker is a voxel where the camera-forward (gaze) ray hit your scene. Enable gaze capture in the SDK to populate this.",emptyLabel:"No gaze hit-points in range. Enable gaze capture in the SDK."})}),(0,t.jsx)("div",{className:"lg:col-span-2",children:(0,t.jsx)(eh,{rays:y.clickRays,cellSize:.5,proxyMeshes:y.proxyMeshes})}),(0,t.jsx)("div",{className:"lg:col-span-2",children:(0,t.jsx)(ef,{links:y.flowLinks,gridSize:36,proxyMeshes:y.proxyMeshes,maxLinks:80,baseUrl:e,apiKey:i,flowQuery:y.flowQuery,hasFirstPerson:y.hasFirstPerson})}),(0,t.jsx)("div",{className:"lg:col-span-2",children:(0,t.jsx)(X,{sessions:y.sessions,onSelect:eN})})]})]})}],14936)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62238,42279,e=>{"use strict";let t=1/1.2;e.s(["ZOOM_IN_FACTOR",0,t,"ZOOM_OUT_FACTOR",0,1.2,"disableWheelZoom",0,function(e){e.inputs.removeByType("ArcRotateCameraMouseWheelInput")},"stepZoom",0,function(e,t){let s=e.lowerRadiusLimit??.01,i=e.upperRadiusLimit??1/0;e.radius=Math.min(i,Math.max(s,e.radius*t))}],62238);var s=e.i(29212);e.s(["ZoomButtons",0,function({onZoom:e}){let i="grid h-8 w-8 place-items-center rounded-md border border-edge bg-ink/80 text-lg leading-none text-fg backdrop-blur transition hover:bg-ink hover:text-white";return(0,s.jsxs)("div",{className:"absolute right-3 top-3 flex flex-col gap-1",children:[(0,s.jsx)("button",{type:"button","aria-label":"Zoom in",className:i,onClick:()=>e(t),children:"+"}),(0,s.jsx)("button",{type:"button","aria-label":"Zoom out",className:i,onClick:()=>e(1.2),children:"−"})]})}],42279)},28538,e=>{"use strict";var t=e.i(29212),s=e.i(94179);e.i(82665);var i=e.i(20880),n=e.i(88725),r=e.i(62238),a=e.i(93425),l=e.i(42279);let o=new Set,c=[{key:"interaction",label:"Clicks & picks",color:"#fb923c",types:new Set(["pointer_click","mesh_interaction"])},{key:"actors",label:"Scene actors",color:"#e879f9",types:new Set(["node_transform"])},{key:"custom",label:"Custom",color:"#34d399",types:new Set(["custom"])},{key:"camera",label:"Camera",color:"#38bdf8",types:new Set(["camera_sample"])},{key:"pointer",label:"Pointer",color:"#94a3b8",types:new Set(["pointer_move","pointer_down","pointer_up"])},{key:"perf",label:"Perf",color:"#a78bfa",types:new Set(["frame_perf"])},{key:"lifecycle",label:"Lifecycle",color:"#f472b6",types:new Set(["session_start","session_end","scene_change","focus_change","visibility_change","viewport_resize","context_lost","context_restored","runtime_error","capability_change","input_action","resource_sample","compile_stall","mesh_visibility","hover_dwell"])}];function u(e,t,s){let i=Math.max(1,s),n=new Map;c.forEach((e,t)=>{for(let s of e.types)n.set(s,t)});let r=c.map(()=>new Set);for(let s of e){let e=n.get(s.type);if(void 0===e)continue;let a=Math.min(1,Math.max(0,(s.ts-t)/i));r[e].add(Math.round(600*a))}return c.map((e,t)=>({key:e.key,label:e.label,color:e.color,marks:[...r[t]].sort((e,t)=>e-t).map(e=>e/600)})).filter(e=>e.marks.length>0)}function h(e){let t=Math.max(0,Math.round(e/1e3)),s=Math.floor(t/60);return`${s}:${(t%60).toString().padStart(2,"0")}`}function p(e){let t=e.slice(e.lastIndexOf("/")+1);return t.length>20?`${t.slice(0,19)}\u2026`:t}function d({lanes:e,duration:s,progress:i,onSeek:n,hiddenTypes:r}){let a=e.filter(e=>{let t=c.find(t=>t.key===e.key);if(!t)return!0;for(let e of t.types)if(!r.has(e))return!0;return!1});if(0===a.length)return null;let l=`${Math.min(100,Math.max(0,i/Math.max(1,s)*100))}%`;return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("div",{className:"mb-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-[10px] text-fg-muted",children:a.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"inline-block h-2 w-2 rounded-sm",style:{backgroundColor:e.color}}),e.label,(0,t.jsxs)("span",{className:"tabular-nums text-fg-muted",children:["(",e.marks.length,")"]})]},e.key))}),(0,t.jsxs)("button",{type:"button","aria-label":"Event timeline — click to seek",className:"relative block w-full cursor-pointer select-none rounded-md border border-edge bg-ink/60 p-1.5 text-left",onClick:e=>{var t;let i;return t=e.clientX,void n(Math.min(1,Math.max(0,(t-(i=e.currentTarget.getBoundingClientRect()).left)/(i.width||1)))*s)},children:[(0,t.jsx)("div",{className:"flex flex-col gap-1",children:a.map(e=>(0,t.jsx)("div",{className:"relative h-2.5 rounded-sm bg-white/5",children:e.marks.map((s,i)=>(0,t.jsx)("span",{"aria-hidden":!0,className:"pointer-events-none absolute top-0 h-full w-px",style:{left:`${100*s}%`,backgroundColor:e.color,opacity:.85}},i))},e.key))}),(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-y-1 w-px bg-saffron",style:{left:l}})]})]})}e.s(["SessionReplay",0,function({baseUrl:c,apiKey:m,sessionId:f,hiddenTypes:y,isLive:b=!1}){let g=(0,s.useRef)(null),k=(0,s.useRef)(null),x=(0,s.useRef)(0),w=(0,s.useRef)(y??o),v=(0,s.useRef)(!1),j=(0,s.useRef)(null),M=(0,s.useRef)(!1),_=(0,s.useRef)(!1),C=(0,s.useRef)(null),P=(0,s.useRef)(0),z=(0,s.useRef)([]),N=(0,s.useRef)([]),S=(0,s.useRef)([]),R=(0,s.useRef)(!0),$=(0,s.useRef)("birdview"),q=(0,s.useRef)(null),[I,V]=(0,s.useState)("idle"),[A,L]=(0,s.useState)(null),[T,Z]=(0,s.useState)(0),[O,E]=(0,s.useState)(0),[W,F]=(0,s.useState)(!1),[B,K]=(0,s.useState)([]),[H,U]=(0,s.useState)([]),[G,X]=(0,s.useState)([]),[D,J]=(0,s.useState)(!0),[Q,Y]=(0,s.useState)(!1),[ee,et]=(0,s.useState)("birdview"),[es,ei]=(0,s.useState)(null);(0,s.useEffect)(()=>{R.current=D},[D]),(0,s.useEffect)(()=>{_.current=W},[W]),(0,s.useEffect)(()=>{M.current=Q},[Q]),(0,s.useEffect)(()=>{$.current=ee,v.current=!0},[ee]),(0,s.useEffect)(()=>{w.current=y??o,v.current=!0},[y]),(0,s.useEffect)(()=>{let t=g.current;if(!t)return;let s=!1,n=null;return V("loading"),L(null),F(!1),Z(0),E(0),K([]),U([]),X([]),ei(null),q.current=null,z.current=[],N.current=[],S.current=[],x.current=0,(async()=>{try{let a,[{Engine:l},{Scene:o},{ArcRotateCamera:h},{UniversalCamera:p},{HemisphericLight:d},{Vector3:y,Color3:g,Color4:I,Matrix:A},{MeshBuilder:L},{StandardMaterial:T},{fetchSessionEvents:O,ReplayPlayer:W}]=await Promise.all([e.A(66022),e.A(48505),e.A(53976),e.A(32633),e.A(42436),e.A(89370),e.A(67141),e.A(20693),e.A(85461),e.A(96664)]),B=await O({endpoint:c,apiKey:m,sessionId:f});if(s)return;if(0===B.length)return void V("empty");for(let e of B){let t=e.sceneId;if("string"==typeof t&&t){a=t;break}}let H=a?(await new i.CollectorApi(c,m).sceneRepresentation(a).catch(()=>null))?.proxy?.meshes??[]:[];if(s)return;let G=[...B].sort((e,t)=>e.ts-t.ts),D=G[0].ts,J=[],Q=[],ee=new Map,et=null;for(let e of G){let t=e.ts-D;if("camera_sample"===e.type){et=[e.position[0],e.position[1],e.position[2]],J.push({at:t,position:et,direction:[e.direction[0],e.direction[1],e.direction[2]],..."number"==typeof e.fov?{fov:e.fov}:{}});continue}if("node_transform"===e.type){if(e.boneId)continue;let s=e.childPath?`${e.nodeId}/${e.childPath}`:e.nodeId,i=ee.get(s);i||(i=[],ee.set(s,i)),i.push({at:t,position:[e.position[0],e.position[1],e.position[2]]});continue}if("pointer_click"===e.type&&e.hitPoint){let s=e.ray?.origin??et;if(!s)continue;Q.push({at:t,type:"pointer_click",origin:[s[0],s[1],s[2]],hit:[e.hitPoint[0],e.hitPoint[1],e.hitPoint[2]],...e.hitMesh?{mesh:e.hitMesh}:{}});continue}if("mesh_interaction"===e.type&&e.point){if(!et)continue;Q.push({at:t,type:"mesh_interaction",origin:[et[0],et[1],et[2]],hit:[e.point[0],e.point[1],e.point[2]],...e.mesh?{mesh:e.mesh}:{}})}}if(0===J.length&&0===Q.length&&0===ee.size)return void V("empty");let es=new l(t,!0,{preserveDrawingBuffer:!1}),en=new o(es);en.clearColor=new I(.04,.05,.07,1);let er=new h("birdview-cam",-Math.PI/2,.22,12,y.Zero(),en);er.attachControl(t,!0),(0,r.disableWheelZoom)(er),k.current=er,new d("replay-light",new y(0,1,0),en);let ea=new p("replay-follow-cam",y.Zero(),en);ea.minZ=.05,ea.fov=Math.PI/3,en.activeCamera=er;let el="birdview",eo=L.CreateGround("replay-ground",{width:20,height:20,subdivisions:20},en),ec=new T("replay-ground-mat",en);ec.diffuseColor=new g(.12,.14,.18),ec.wireframe=!0,eo.material=ec;let eu=new Set(ee.keys()),eh=new Set(Array.from(eu,e=>e.slice(e.lastIndexOf("/")+1))),ep=e=>{if(e.path){for(let t of eu)if(e.path===t||e.path.endsWith(`/${t}`))return!0}return eh.has(e.name)},ed=[];for(let e of H){if(ep(e))continue;let t=e.aabb,s=Math.max(t[3]-t[0],.001),i=Math.max(t[4]-t[1],.001),n=Math.max(t[5]-t[2],.001),r=L.CreateBox(`replay-proxy-${e.name}`,{width:s,height:i,depth:n},en);r.position=new y((t[0]+t[3])/2,(t[1]+t[4])/2,(t[2]+t[5])/2);let a=new T(`replay-proxy-mat-${e.name}`,en);a.wireframe=!0,a.disableLighting=!0,a.emissiveColor=new g(.32,.4,.52),a.alpha=.35,r.material=a,r.isPickable=!1,ed.push({name:e.name,center:new y((t[0]+t[3])/2,t[4],(t[2]+t[5])/2)})}z.current=ed,N.current=ed.map(()=>null),U(ed.map(e=>e.name));let em=[[.91,.47,.98],[.4,.95,.6],[.98,.8,.3],[.45,.85,1]],ef=e=>{let t=e.indexOf("/");return -1===t?e:e.slice(0,t)},ey=[],eb=new Map,eg=0,ek=(e,t,s)=>{let i=L.CreateSphere(`replay-actor-${e}`,{diameter:.5,segments:12},en),n=new T(`replay-actor-mat-${e}`,en);n.disableLighting=!0;let r=em[eg%em.length];n.emissiveColor=new g(r[0],r[1],r[2]),i.material=n,i.isPickable=!1,i.isVisible=!1,eg++;let a={key:e,mesh:i,samples:s,driveKey:t};return ey.push(a),eb.set(e,a),a},ex=new Map,ew=new Map;for(let[e,t]of ee){if(0===t.length)continue;let s=ef(e);if(e===s)ex.set(s,t);else{let i=ew.get(s);(!i||t.length>i.samples.length)&&ew.set(s,{key:e,samples:t})}}for(let e of new Set([...ex.keys(),...ew.keys()])){let t=ex.get(e);if(t)ek(e,e,t);else{let t=ew.get(e);ek(e,t.key,t.samples)}}S.current=ey.map(()=>null),X(ey.map(e=>e.key));let ev=(e,t)=>{if(0===e.length||t<e[0].at)return null;let s=0,i=e.length-1,n=-1;for(;s<=i;){let r=s+i>>1;e[r].at<=t?(n=r,s=r+1):i=r-1}if(n<0)return null;let r=e[n],a=e[n+1];if(!a)return r.position;let l=a.at-r.at;if(l<=0)return r.position;let o=Math.max(0,Math.min(1,(t-r.at)/l));return[r.position[0]+(a.position[0]-r.position[0])*o,r.position[1]+(a.position[1]-r.position[1])*o,r.position[2]+(a.position[2]-r.position[2])*o]},ej=1,eM=1.4,e_=L.CreateSphere("replay-camera-origin",{diameter:.35,segments:12},en),eC=new T("replay-camera-origin-mat",en);eC.disableLighting=!0,eC.emissiveColor=new g(.6,.9,1),e_.material=eC;let eP=L.CreateLines("replay-camera-frustum",{points:[y.Zero(),new y(0,0,1)]},en);eP.color=new g(.7,.95,1),eP.isPickable=!1;let ez=L.CreateCylinder("replay-camera-cone",{height:1,diameterTop:0,diameterBottom:1,tessellation:24},en);ez.bakeTransformIntoVertices(A.RotationX(-Math.PI/2).multiply(A.Translation(0,0,.5)));let eN=new T("replay-camera-cone-mat",en);eN.disableLighting=!0,eN.emissiveColor=new g(.4,.78,1),eN.alpha=.16,eN.backFaceCulling=!1,ez.material=eN,ez.isPickable=!1,ez.isVisible=!1;let eS=(e,t,s,i)=>{if(e?.dispose(),0===s.length)return null;let n=L.CreateLineSystem(t,{lines:s,...i?{colors:i,useVertexAlpha:!0}:{}},en);return n.isPickable=!1,n},eR=null,e$=null,eq=null,eI=()=>{let e=w.current,t=[],s=[];for(let i of Q){if(e.has(i.type))continue;let[n,r,a]=i.hit,l="mesh_interaction"===i.type?new I(.45,.85,1,.32):new I(1,.7,.35,.32);t.push([new y(n-.1,r,a),new y(n+.1,r,a)]),t.push([new y(n,r-.1,a),new y(n,r+.1,a)]),t.push([new y(n,r,a-.1),new y(n,r,a+.1)]),s.push([l,l],[l,l],[l,l])}eq=eS(eq,"replay-persistent-marks",t,s)};eI();let eV=L.CreateSphere("replay-glow",{diameter:1,segments:12},en),eA=new T("replay-glow-mat",en);eA.disableLighting=!0,eA.emissiveColor=new g(1,.62,.2),eA.alpha=0,eV.material=eA,eV.isPickable=!1,eV.isVisible=!1;let eL=1/0,eT=1/0,eZ=1/0,eO=-1/0,eE=-1/0,eW=-1/0,eF=!1,eB=e=>{eL=Math.min(eL,e[0]),eT=Math.min(eT,e[1]),eZ=Math.min(eZ,e[2]),eO=Math.max(eO,e[0]),eE=Math.max(eE,e[1]),eW=Math.max(eW,e[2])},eK=()=>{let e;if(eF||!Number.isFinite(eL))return;let t=(eL+eO)/2,s=(eT+eE)/2,i=(eZ+eW)/2,n=eO-eL,r=eE-eT,a=eW-eZ,l=Math.sqrt(n*n+r*r+a*a);er.setTarget(new y(t,s,i)),e=1.3*l,er.radius=Number.isFinite(e)?Math.max(8,e):12,eF=!0};for(let e of J)eB(e.position);for(let e of Q)eB(e.origin),eB(e.hit);for(let e of ee.values())for(let t of e)eB(t.position);for(let e of H)eB(e.aabb.slice(0,3)),eB(e.aabb.slice(3,6));eK();{let e=eO-eL,t=eE-eT,s=eW-eZ,i=Number.isFinite(e)?Math.sqrt(e*e+t*t+s*s):0,n=Math.min(Math.max(.035*i,.45),Math.max(.45,.18*i));ej=n/.35,eM=Math.max(.16*i,3.2*n,1.4),e_.scaling.setAll(ej)}let eH=-1,eU=e=>{var i;let n=v.current;if(!n&&e===eH)return;v.current=!1,eH=e,n&&eI();let r=w.current;(i=$.current)!==el&&(el=i,"follow"===i?(er.detachControl(),en.activeCamera=ea):(en.activeCamera=er,er.attachControl(t,!0)));let a="follow"===$.current,l=r.has("camera_sample")?null:(e=>{if(0===J.length)return null;let t=0,s=J.length-1,i=-1;for(;t<=s;){let n=t+s>>1;J[n].at<=e?(i=n,t=n+1):s=n-1}return i>=0?J[i]:null})(e);if(l){e_.position.set(l.position[0],l.position[1],l.position[2]);let e=l.direction,t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2])||1,s=eM,i=new y(l.position[0]+e[0]/t*s,l.position[1]+e[1]/t*s,l.position[2]+e[2]/t*s);if(a)e_.isVisible=!1,eP.isVisible=!1,ez.isVisible=!1,ea.position.set(l.position[0],l.position[1],l.position[2]),ea.setTarget(i),l.fov&&l.fov>0&&(ea.fov=l.fov);else{e_.isVisible=!0,eP.isVisible=!0,eP=L.CreateLines("replay-camera-frustum",{points:[e_.position.clone(),i],instance:eP},en);let e=(l.fov&&l.fov>0?l.fov:Math.PI/3)/2,t=s*Math.tan(e);ez.isVisible=!0,ez.position.copyFrom(e_.position),ez.lookAt(i),ez.scaling.set(2*t,2*t,s)}}else e_.isVisible=!1,eP.isVisible=!1,ez.isVisible=!1;let o=r.has("node_transform");for(let t of ey){let s=o?null:ev(t.samples,e);if(!s){t.mesh.isVisible=!1;continue}t.mesh.isVisible=!0,t.mesh.position.set(s[0],s[1],s[2])}let c=Q.filter(t=>!r.has(t.type)&&t.at<=e&&t.at>=e-2200),u=[],h=[],p=[],d=[],m=null;for(let t of c){let s=e-t.at,i=Math.max(0,Math.min(1,1-s/2200)),n=new I(1,.62,.2,.18+.72*i),r=new y(t.origin[0],t.origin[1],t.origin[2]),a=new y(t.hit[0],t.hit[1],t.hit[2]);u.push([r,a]),h.push([n,n]);let l=.12+.08*i;p.push([new y(a.x-l,a.y,a.z),new y(a.x+l,a.y,a.z)]),p.push([new y(a.x,a.y-l,a.z),new y(a.x,a.y+l,a.z)]),p.push([new y(a.x,a.y,a.z-l),new y(a.x,a.y,a.z+l)]);let o=new I(1,.78,.42,.22+.72*i);if(d.push([o,o],[o,o],[o,o]),s<=900){let e=1-s/900;(!m||e>m.t)&&(m={hit:t.hit,t:e})}}if(m){let e=.25+.9*m.t;eV.isVisible=!0,eV.scaling.set(e,e,e),eV.position.set(m.hit[0],m.hit[1],m.hit[2]),eA.alpha=.12+.5*m.t}else eV.isVisible=!1;let f=null,b=-1/0;for(let e of c)e.mesh&&e.at>b&&(b=e.at,f=e.mesh);f!==q.current&&(q.current=f,s||ei(f)),eR=eS(eR,"replay-trail-lines",u,h),e$=eS(e$,"replay-trail-hits",p,d)},eG=G.length>0?G[G.length-1].ts-D:0,eX=eG,eD=G.length>0?G[G.length-1].ts:-1/0,eJ=G.map(e=>({type:e.type,ts:e.ts})),eQ=0;if(b)j.current=null,C.current=e=>{if(s)return;let t="number"==typeof e.ts?e.ts:NaN;if(!Number.isFinite(t)||t<=eD)return;eD=t;let i=t-D;if(i>eX&&(eX=i),i>eG&&(eG=i),eJ.push({type:e.type,ts:t}),"camera_sample"===e.type){let t=e.position,s=e.direction;if(t&&s){let n=[t[0],t[1],t[2]];et=n;let r="number"==typeof e.fov?e.fov:void 0;J.push({at:i,position:n,direction:[s[0],s[1],s[2]],...void 0!==r?{fov:r}:{}}),eB(n),eK()}}else if("pointer_click"===e.type){let t=e.hitPoint,s=e.ray,n=s?.origin??et;if(t&&n){let s="string"==typeof e.hitMesh?e.hitMesh:void 0;Q.push({at:i,type:"pointer_click",origin:[n[0],n[1],n[2]],hit:[t[0],t[1],t[2]],...s?{mesh:s}:{}}),eB(t),v.current=!0}}else if("mesh_interaction"===e.type){let t=e.point;if(t&&et){let s="string"==typeof e.mesh?e.mesh:void 0;Q.push({at:i,type:"mesh_interaction",origin:[et[0],et[1],et[2]],hit:[t[0],t[1],t[2]],...s?{mesh:s}:{}}),eB(t),v.current=!0}}else if("node_transform"===e.type){let t=e.position;if(e.boneId||"string"!=typeof e.nodeId||!t)return;let s="string"==typeof e.childPath?e.childPath:void 0,n=s?`${e.nodeId}/${s}`:e.nodeId;((e,t)=>{let s=ef(e),i=eb.get(s);if(!i){i=ek(s,e,[]);let t=S.current;S.current=ey.map((e,s)=>t[s]??null),X(ey.map(e=>e.key))}e===i.driveKey?i.samples.push(t):e===s&&i.driveKey!==s&&(i.driveKey=s,i.samples.length=0,i.samples.push(t))})(n,{at:i,position:[t[0],t[1],t[2]]}),eB(t)}let n=performance.now();n-eQ>250&&(eQ=n,K(u(eJ,D,Math.max(1,eG)))),M.current&&i>x.current&&(x.current=i)},P.current=eG,x.current=eG,M.current=!0,Y(!0),F(!1),Z(eG),E(eG),K(u(eJ,D,Math.max(1,eG))),eU(eG);else{let e=new W(B,{reset(){},apply(){}},{onProgress:e=>{s||(x.current=e,E(e))},onComplete:()=>{s||F(!1)}});j.current=e,Z(e.durationMs),K(u(G,D,e.durationMs)),e.update(0),eU(0)}let eY=A.Identity(),e0=new Map,e1=e=>{let t=e0.get(e);if(t)return t;let s={w:e.offsetWidth||60,h:e.offsetHeight||16};return e.offsetWidth>0&&e0.set(e,s),s},e2=performance.now(),e3=0;es.runRenderLoop(()=>{if(b){let e=performance.now(),t=e-e2;if(e2=e,M.current)x.current+=t,x.current>eG&&(eG=x.current),P.current=eG,E(x.current),e-e3>250&&(e3=e,Z(eG));else if(_.current){let e=x.current+t;e>=eG&&(e=eG),x.current=e,E(e)}}eU(x.current),en.render(),(()=>{if(!R.current)return;let e=t.clientWidth||es.getRenderWidth(),s=t.clientHeight||es.getRenderHeight(),i=er.viewport.toGlobal(e,s),n=en.getTransformMatrix(),r=q.current,a=e=>e.slice(e.lastIndexOf("/")+1),l=e=>!!r&&(r===e||a(r)===a(e)||e.endsWith(`/${r}`)||r.endsWith(`/${e}`)),o=[],c=z.current,u=N.current;for(let e=0;e<c.length;e++){let t=u[e];if(!t)continue;let s=y.Project(c[e].center,eY,n,i);if(s.z<0||s.z>1){t.style.opacity="0";continue}o.push({el:t,x:s.x,y:s.y,liftPct:140,highlighted:l(c[e].name)})}let h=S.current;for(let e=0;e<ey.length;e++){let t=h[e];if(!t)continue;let s=ey[e].mesh;if(!s.isVisible){t.style.opacity="0";continue}let r=y.Project(s.position,eY,n,i);if(r.z<0||r.z>1){t.style.opacity="0";continue}o.push({el:t,x:r.x,y:r.y,liftPct:180,highlighted:l(ey[e].key)})}o.sort((e,t)=>e.highlighted!==t.highlighted?e.highlighted?-1:1:e.y-t.y||e.x-t.x);let p=[];for(let e of o){let{w:t,h:s}=e1(e.el),i=e.x-t/2,n=e.x+t/2,r=e.y-e.liftPct/100*s,a=r,l=!0,o=0;for(;l&&o++<256;)for(let e of(l=!1,p))i<e.right&&n>e.left&&a<e.bottom&&a+s>e.top&&(a=e.bottom+1,l=!0);p.push({left:i,right:n,top:a,bottom:a+s});let c=a-r;e.el.style.opacity="1",e.el.style.zIndex=e.highlighted?"10":"",e.el.style.transform=`translate(${e.x}px, ${e.y+c}px) translate(-50%, -${e.liftPct}%)`}})()});let e8=()=>es.resize();window.addEventListener("resize",e8),V("ready"),n=()=>{window.removeEventListener("resize",e8),C.current=null,j.current?.pause(),eP.dispose(),ez.dispose(),eR?.dispose(),e$?.dispose(),eq?.dispose(),eV.dispose(),en.dispose(),es.dispose(),k.current=null,j.current=null}}catch(e){if(s)return;V("error"),L(e instanceof Error?e.message:"Failed to load replay.")}})(),()=>{s=!0,n?.()}},[c,m,f,b]);let en=(0,s.useCallback)(()=>{if(b){Y(!1),M.current=!1,F(e=>{let t=!e;return _.current=t,t});return}let e=j.current;e&&F(t=>(t?e.pause():e.play(),!t))},[b]),er=(0,s.useCallback)(e=>{if(b){Y(!1),M.current=!1,F(!1),_.current=!1,x.current=e,E(e);return}let t=j.current;t&&(t.pause(),t.seek(e),F(!1),x.current=e,E(e))},[b]),ea=(0,s.useCallback)(()=>{Y(!0),M.current=!0,F(!1),_.current=!1,x.current=P.current,E(P.current)},[]),{gated:el}=(0,n.useLiveSession)(c,m,f,b&&"ready"===I,e=>C.current?.(e),()=>{}),eo=(0,s.useCallback)(e=>{if(!es)return!1;if(es===e)return!0;let t=e=>e.slice(e.lastIndexOf("/")+1);return t(es)===t(e)||e.endsWith(`/${es}`)||es.endsWith(`/${e}`)},[es]);return(0,t.jsxs)(a.Panel,{title:b?"Session replay · live":"Session replay (birdview timeline)",subtitle:b?"Following this session live — new camera moves and interactions stream in and the timeline grows. Scrub back to review, then press ● LIVE to return to the edge.":"Scrub the camera path and interaction rays; every click stays marked and glows as the playhead passes it. The color-coded strip marks when each event fired (click to seek).",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("canvas",{ref:g,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),(0,t.jsxs)("div",{className:`pointer-events-none absolute inset-0 overflow-hidden ${D?"":"hidden"}`,children:[H.map((e,s)=>(0,t.jsx)("div",{title:e,ref:e=>{e&&(N.current[s]=e)},className:`absolute left-0 top-0 whitespace-nowrap rounded px-1.5 py-0.5 text-[10px] font-medium opacity-0 transition-colors ${eo(e)?"bg-amber/30 text-white ring-2 ring-amber shadow-lg shadow-amber/30":"bg-ink/80 text-saffron ring-1 ring-amber/30"}`,children:p(e)},e)),G.map((e,s)=>(0,t.jsx)("div",{title:e,ref:e=>{e&&(S.current[s]=e)},className:`absolute left-0 top-0 whitespace-nowrap rounded px-1.5 py-0.5 text-[10px] font-medium opacity-0 transition-colors ${eo(e)?"bg-fuchsia-400/30 text-white ring-2 ring-fuchsia-300 shadow-lg shadow-fuchsia-500/30":"bg-ink/80 text-fuchsia-300 ring-1 ring-fuchsia-400/30"}`,children:p(e)},`actor-${e}`))]}),"ready"===I&&(H.length>0||G.length>0)?(0,t.jsx)("button",{type:"button",onClick:()=>J(e=>!e),className:"absolute left-3 top-3 rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs font-medium text-fg transition hover:bg-ink hover:text-white","aria-pressed":D?"true":"false",children:D?"Hide labels":"Show labels"}):null,"ready"===I&&"birdview"===ee?(0,t.jsx)(l.ZoomButtons,{onZoom:e=>k.current&&(0,r.stepZoom)(k.current,e)}):null,"ready"!==I?(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===I?"Loading replay…":"empty"===I?"No replayable events (raw retention may be disabled).":"error"===I?A??"Replay unavailable.":null}):null]}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:en,disabled:"ready"!==I,className:"rounded-md bg-amber px-3 py-1.5 text-sm font-medium text-ink transition hover:bg-ember disabled:opacity-40",children:W?"Pause":"Play"}),b?(0,t.jsxs)("button",{type:"button",onClick:ea,disabled:"ready"!==I,"aria-pressed":Q?"true":"false",className:`flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition disabled:opacity-40 ${Q?"bg-rose-500/20 text-rose-300 ring-1 ring-rose-400/40":"border border-edge text-fg hover:bg-ink hover:text-white"}`,children:[(0,t.jsx)("span",{className:`inline-block h-2 w-2 rounded-full ${Q?"animate-pulse bg-rose-400":"bg-fg-muted"}`}),Q?"LIVE":"Resume live"]}):null,(0,t.jsxs)("div",{role:"group","aria-label":"Camera view",className:"flex items-center rounded-md border border-edge p-0.5 text-xs font-medium",children:[(0,t.jsx)("button",{type:"button",onClick:()=>et("birdview"),disabled:"ready"!==I,"aria-pressed":"birdview"===ee?"true":"false",className:`rounded px-2 py-1 transition disabled:opacity-40 ${"birdview"===ee?"bg-amber text-ink":"text-fg hover:text-white"}`,children:"Birdview"}),(0,t.jsx)("button",{type:"button",onClick:()=>et("follow"),disabled:"ready"!==I,"aria-pressed":"follow"===ee?"true":"false",className:`rounded px-2 py-1 transition disabled:opacity-40 ${"follow"===ee?"bg-amber text-ink":"text-fg hover:text-white"}`,children:"Follow camera"})]}),(0,t.jsx)("span",{className:"w-12 text-right font-mono text-xs tabular-nums text-fg-muted",children:h(O)}),(0,t.jsx)("input",{type:"range",min:0,max:Math.max(1,T),step:50,value:Math.min(O,T),onChange:e=>er(Number(e.target.value)),disabled:"ready"!==I,className:"flex-1 accent-amber"}),(0,t.jsx)("span",{className:"w-12 font-mono text-xs tabular-nums text-fg-muted",children:h(T)})]}),"ready"===I?(0,t.jsx)(d,{lanes:B,duration:T,progress:O,onSeek:er,hiddenTypes:y??o}):null,b&&el&&"ready"===I?(0,t.jsx)("p",{className:"mt-2 text-xs text-fg-muted",children:"Live follow is unavailable — raw session retention is disabled on the collector."}):null]})}])},12449,e=>{e.n(e.i(28538))},66022,e=>{e.v(t=>Promise.all(["static/chunks/0ys9-ozuluawt.js","static/chunks/2ycvtdd68gub7.js","static/chunks/0v82oqyoy9zol.js","static/chunks/18u58lorfahxi.js","static/chunks/1nj82er7msdto.js","static/chunks/0ufbyo1x3qkmo.js","static/chunks/1yehxf-fmeicg.js"].map(t=>e.l(t))).then(()=>t(94080)))},48505,e=>{e.v(t=>Promise.all(["static/chunks/3v5ha25nxo43j.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3t06schbtqonl.js","static/chunks/1nj82er7msdto.js","static/chunks/3nz-dh9d7cehk.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/2u6shh3oeycm-.js"].map(t=>e.l(t))).then(()=>t(73073)))},53976,e=>{e.v(t=>Promise.all(["static/chunks/3v3-7fio3nw_t.js","static/chunks/10r_824wzt8hj.js","static/chunks/2aor7m-wbis85.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/0v82oqyoy9zol.js","static/chunks/25b9x-li-tvk2.js","static/chunks/2aelw3far6rii.js","static/chunks/0aznt7717miff.js","static/chunks/1_aahautsz2v_.js","static/chunks/1nj82er7msdto.js","static/chunks/3t06schbtqonl.js","static/chunks/18u58lorfahxi.js"].map(t=>e.l(t))).then(()=>t(18662)))},32633,e=>{e.v(t=>Promise.all(["static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/10r_824wzt8hj.js","static/chunks/18u58lorfahxi.js","static/chunks/2unhhuv0arlcv.js","static/chunks/1nj82er7msdto.js","static/chunks/13isnf0--pmx1.js"].map(t=>e.l(t))).then(()=>t(30118)))},42436,e=>{e.v(t=>Promise.all(["static/chunks/37vzwr3ciejf1.js","static/chunks/157d9euci08yu.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/0v82oqyoy9zol.js"].map(t=>e.l(t))).then(()=>t(12847)))},89370,e=>{e.v(t=>Promise.all(["static/chunks/0dm32-jq30tg8.js","static/chunks/18u58lorfahxi.js","static/chunks/0v82oqyoy9zol.js"].map(t=>e.l(t))).then(()=>t(62566)))},67141,e=>{e.v(t=>Promise.all(["static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3mqy-84_ul3t2.js","static/chunks/1_aahautsz2v_.js","static/chunks/3t06schbtqonl.js","static/chunks/1thjncpj7u6pq.js","static/chunks/10r_824wzt8hj.js","static/chunks/1vdjn0pkoyypn.js","static/chunks/1nj82er7msdto.js","static/chunks/0aznt7717miff.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/2aelw3far6rii.js","static/chunks/3nz-dh9d7cehk.js"].map(t=>e.l(t))).then(()=>t(97998)))},20693,e=>{e.v(t=>Promise.all(["static/chunks/1-61zh4waha61.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/1zx2q-r32thv1.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3nz-dh9d7cehk.js","static/chunks/2u6shh3oeycm-.js","static/chunks/18u58lorfahxi.js","static/chunks/1_aahautsz2v_.js","static/chunks/1nj82er7msdto.js","static/chunks/3t06schbtqonl.js"].map(t=>e.l(t))).then(()=>t(32550)))},85461,e=>{e.v(t=>Promise.all(["static/chunks/0n8n481szj90g.js"].map(t=>e.l(t))).then(()=>t(57092)))},96664,e=>{e.v(t=>Promise.all(["static/chunks/1o1d0p-v1z8ty.js","static/chunks/3v3-7fio3nw_t.js","static/chunks/0v82oqyoy9zol.js","static/chunks/3t06schbtqonl.js","static/chunks/3pufs8g4ui943.js","static/chunks/1nj82er7msdto.js","static/chunks/2-sjjedfr0kfq.js","static/chunks/18u58lorfahxi.js","static/chunks/2u6shh3oeycm-.js","static/chunks/3nz-dh9d7cehk.js"].map(t=>e.l(t))).then(()=>t(44981)))}]);