From 1121012d910eec1aa5d72ac4cd013a7a292c3a31 Mon Sep 17 00:00:00 2001 From: Brian Beck Date: Thu, 19 Feb 2026 06:10:38 -0800 Subject: [PATCH] guard pointer lock APIs for Mobile Safari --- docs/404.html | 2 +- docs/404/index.html | 2 +- docs/__next.__PAGE__.txt | 4 ++-- docs/__next._full.txt | 4 ++-- docs/__next._head.txt | 2 +- docs/__next._index.txt | 2 +- docs/__next._tree.txt | 2 +- .../chunks/{aa3c97b2da210ead.js => 5be1f91d5fe511ed.js} | 2 +- .../chunks/{fd5173b60870d6fb.js => 9fdd9dd1af0bcc76.js} | 2 +- .../chunks/{143bcebca21d60e5.js => eced4fe19bc9da99.js} | 2 +- .../_buildManifest.js | 0 .../_clientMiddlewareManifest.json | 0 .../_ssgManifest.js | 0 docs/_not-found/__next._full.txt | 2 +- docs/_not-found/__next._head.txt | 2 +- docs/_not-found/__next._index.txt | 2 +- docs/_not-found/__next._not-found.__PAGE__.txt | 2 +- docs/_not-found/__next._not-found.txt | 2 +- docs/_not-found/__next._tree.txt | 2 +- docs/_not-found/index.html | 2 +- docs/_not-found/index.txt | 2 +- docs/index.html | 2 +- docs/index.txt | 4 ++-- src/components/MapInfoDialog.tsx | 4 +++- src/components/MissionSelect.tsx | 4 +++- 25 files changed, 29 insertions(+), 25 deletions(-) rename docs/_next/static/chunks/{aa3c97b2da210ead.js => 5be1f91d5fe511ed.js} (52%) rename docs/_next/static/chunks/{fd5173b60870d6fb.js => 9fdd9dd1af0bcc76.js} (99%) rename docs/_next/static/chunks/{143bcebca21d60e5.js => eced4fe19bc9da99.js} (92%) rename docs/_next/static/{8Gyh12L4dTN96synIylXt => lsuSqSz5gb3GKN3jziExr}/_buildManifest.js (100%) rename docs/_next/static/{8Gyh12L4dTN96synIylXt => lsuSqSz5gb3GKN3jziExr}/_clientMiddlewareManifest.json (100%) rename docs/_next/static/{8Gyh12L4dTN96synIylXt => lsuSqSz5gb3GKN3jziExr}/_ssgManifest.js (100%) diff --git a/docs/404.html b/docs/404.html index 4a374c3a..fe7e8054 100644 --- a/docs/404.html +++ b/docs/404.html @@ -1 +1 @@ -404: This page could not be found.MapGenius – Explore maps for Tribes 2

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.MapGenius – Explore maps for Tribes 2

404

This page could not be found.

\ No newline at end of file diff --git a/docs/404/index.html b/docs/404/index.html index 4a374c3a..fe7e8054 100644 --- a/docs/404/index.html +++ b/docs/404/index.html @@ -1 +1 @@ -404: This page could not be found.MapGenius – Explore maps for Tribes 2

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.MapGenius – Explore maps for Tribes 2

404

This page could not be found.

\ No newline at end of file diff --git a/docs/__next.__PAGE__.txt b/docs/__next.__PAGE__.txt index 4a5ad290..f5c6338b 100644 --- a/docs/__next.__PAGE__.txt +++ b/docs/__next.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[47257,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"ClientPageRoot"] -3:I[31713,["/t2-mapper/_next/static/chunks/e6da73430a674f20.js","/t2-mapper/_next/static/chunks/fd5173b60870d6fb.js","/t2-mapper/_next/static/chunks/93b588fa7f31935c.js","/t2-mapper/_next/static/chunks/5619c5b2b1355f74.js","/t2-mapper/_next/static/chunks/143bcebca21d60e5.js","/t2-mapper/_next/static/chunks/fcdc907286f09d63.js","/t2-mapper/_next/static/chunks/bb0aa1c978feffed.js"],"default"] +3:I[31713,["/t2-mapper/_next/static/chunks/e6da73430a674f20.js","/t2-mapper/_next/static/chunks/9fdd9dd1af0bcc76.js","/t2-mapper/_next/static/chunks/93b588fa7f31935c.js","/t2-mapper/_next/static/chunks/5619c5b2b1355f74.js","/t2-mapper/_next/static/chunks/eced4fe19bc9da99.js","/t2-mapper/_next/static/chunks/fcdc907286f09d63.js","/t2-mapper/_next/static/chunks/bb0aa1c978feffed.js"],"default"] 6:I[97367,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"8Gyh12L4dTN96synIylXt","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/fd5173b60870d6fb.js","async":true}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/93b588fa7f31935c.js","async":true}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/5619c5b2b1355f74.js","async":true}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/143bcebca21d60e5.js","async":true}],["$","script","script-4",{"src":"/t2-mapper/_next/static/chunks/fcdc907286f09d63.js","async":true}],["$","script","script-5",{"src":"/t2-mapper/_next/static/chunks/bb0aa1c978feffed.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lsuSqSz5gb3GKN3jziExr","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/9fdd9dd1af0bcc76.js","async":true}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/93b588fa7f31935c.js","async":true}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/5619c5b2b1355f74.js","async":true}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/eced4fe19bc9da99.js","async":true}],["$","script","script-4",{"src":"/t2-mapper/_next/static/chunks/fcdc907286f09d63.js","async":true}],["$","script","script-5",{"src":"/t2-mapper/_next/static/chunks/bb0aa1c978feffed.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/docs/__next._full.txt b/docs/__next._full.txt index a0f400a5..eb4f6fea 100644 --- a/docs/__next._full.txt +++ b/docs/__next._full.txt @@ -3,14 +3,14 @@ 3:I[39756,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"default"] 4:I[37457,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"default"] 5:I[47257,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"ClientPageRoot"] -6:I[31713,["/t2-mapper/_next/static/chunks/e6da73430a674f20.js","/t2-mapper/_next/static/chunks/fd5173b60870d6fb.js","/t2-mapper/_next/static/chunks/93b588fa7f31935c.js","/t2-mapper/_next/static/chunks/5619c5b2b1355f74.js","/t2-mapper/_next/static/chunks/143bcebca21d60e5.js","/t2-mapper/_next/static/chunks/fcdc907286f09d63.js","/t2-mapper/_next/static/chunks/bb0aa1c978feffed.js"],"default"] +6:I[31713,["/t2-mapper/_next/static/chunks/e6da73430a674f20.js","/t2-mapper/_next/static/chunks/9fdd9dd1af0bcc76.js","/t2-mapper/_next/static/chunks/93b588fa7f31935c.js","/t2-mapper/_next/static/chunks/5619c5b2b1355f74.js","/t2-mapper/_next/static/chunks/eced4fe19bc9da99.js","/t2-mapper/_next/static/chunks/fcdc907286f09d63.js","/t2-mapper/_next/static/chunks/bb0aa1c978feffed.js"],"default"] 9:I[97367,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"OutletBoundary"] a:"$Sreact.suspense" c:I[97367,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"ViewportBoundary"] e:I[97367,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"MetadataBoundary"] 10:I[68027,[],"default"] :HL["/t2-mapper/_next/static/chunks/748c06086372a1f2.css","style"] -0:{"P":null,"b":"8Gyh12L4dTN96synIylXt","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/748c06086372a1f2.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/e6da73430a674f20.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"defaultOptions":{"clearOnDefault":false},"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],[["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/fd5173b60870d6fb.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/93b588fa7f31935c.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/5619c5b2b1355f74.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/143bcebca21d60e5.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/t2-mapper/_next/static/chunks/fcdc907286f09d63.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/t2-mapper/_next/static/chunks/bb0aa1c978feffed.js","async":true,"nonce":"$undefined"}]],["$","$L9",null,{"children":["$","$a",null,{"name":"Next.MetadataOutlet","children":"$@b"}]}]]}],{},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Lc",null,{"children":"$Ld"}],["$","div",null,{"hidden":true,"children":["$","$Le",null,{"children":["$","$a",null,{"name":"Next.Metadata","children":"$Lf"}]}]}],null]}],false]],"m":"$undefined","G":["$10",[]],"S":true} +0:{"P":null,"b":"lsuSqSz5gb3GKN3jziExr","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/748c06086372a1f2.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/e6da73430a674f20.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"defaultOptions":{"clearOnDefault":false},"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],[["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/9fdd9dd1af0bcc76.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/93b588fa7f31935c.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/5619c5b2b1355f74.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/eced4fe19bc9da99.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/t2-mapper/_next/static/chunks/fcdc907286f09d63.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/t2-mapper/_next/static/chunks/bb0aa1c978feffed.js","async":true,"nonce":"$undefined"}]],["$","$L9",null,{"children":["$","$a",null,{"name":"Next.MetadataOutlet","children":"$@b"}]}]]}],{},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Lc",null,{"children":"$Ld"}],["$","div",null,{"hidden":true,"children":["$","$Le",null,{"children":["$","$a",null,{"name":"Next.Metadata","children":"$Lf"}]}]}],null]}],false]],"m":"$undefined","G":["$10",[]],"S":true} 7:{} 8:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params" d:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}]] diff --git a/docs/__next._head.txt b/docs/__next._head.txt index 0599601d..5f5c6eaa 100644 --- a/docs/__next._head.txt +++ b/docs/__next._head.txt @@ -3,4 +3,4 @@ 3:I[97367,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"IconMark"] -0:{"buildId":"8Gyh12L4dTN96synIylXt","rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"MapGenius – Explore maps for Tribes 2"}],["$","meta","1",{"name":"description","content":"Tribes 2 forever."}],["$","link","2",{"rel":"icon","href":"/t2-mapper/icon.png?icon.2911bba1.png","sizes":"108x128","type":"image/png"}],["$","$L5","3",{}]]}]}]}],null]}],"loading":null,"isPartial":false} +0:{"buildId":"lsuSqSz5gb3GKN3jziExr","rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"MapGenius – Explore maps for Tribes 2"}],["$","meta","1",{"name":"description","content":"Tribes 2 forever."}],["$","link","2",{"rel":"icon","href":"/t2-mapper/icon.png?icon.2911bba1.png","sizes":"108x128","type":"image/png"}],["$","$L5","3",{}]]}]}]}],null]}],"loading":null,"isPartial":false} diff --git a/docs/__next._index.txt b/docs/__next._index.txt index cd08d784..653b77e5 100644 --- a/docs/__next._index.txt +++ b/docs/__next._index.txt @@ -3,4 +3,4 @@ 3:I[39756,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"default"] 4:I[37457,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"default"] :HL["/t2-mapper/_next/static/chunks/748c06086372a1f2.css","style"] -0:{"buildId":"8Gyh12L4dTN96synIylXt","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/748c06086372a1f2.css","precedence":"next"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/e6da73430a674f20.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"defaultOptions":{"clearOnDefault":false},"children":["$","$L3",null,{"parallelRouterKey":"children","template":["$","$L4",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lsuSqSz5gb3GKN3jziExr","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/748c06086372a1f2.css","precedence":"next"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/e6da73430a674f20.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"defaultOptions":{"clearOnDefault":false},"children":["$","$L3",null,{"parallelRouterKey":"children","template":["$","$L4",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/docs/__next._tree.txt b/docs/__next._tree.txt index 95f61bba..445fc11c 100644 --- a/docs/__next._tree.txt +++ b/docs/__next._tree.txt @@ -1,2 +1,2 @@ :HL["/t2-mapper/_next/static/chunks/748c06086372a1f2.css","style"] -0:{"buildId":"8Gyh12L4dTN96synIylXt","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lsuSqSz5gb3GKN3jziExr","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/docs/_next/static/chunks/aa3c97b2da210ead.js b/docs/_next/static/chunks/5be1f91d5fe511ed.js similarity index 52% rename from docs/_next/static/chunks/aa3c97b2da210ead.js rename to docs/_next/static/chunks/5be1f91d5fe511ed.js index 3454e2a5..3bc54b44 100644 --- a/docs/_next/static/chunks/aa3c97b2da210ead.js +++ b/docs/_next/static/chunks/5be1f91d5fe511ed.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94247,e=>{"use strict";var t=e.i(43476),n=e.i(932),a=e.i(71645),i=e.i(11152),s=e.i(66027),l=e.i(12979),r=e.i(91996);let o=new Map;function c(e){let a,i=(0,n.c)(5),{name:s}=e;i[0]!==s?(a=function(e){let t;if(o.has(e))return o.get(e);try{t=(0,l.getUrlForPath)((0,r.getStandardTextureResourceKey)(`textures/gui/${e}`))}catch{t=null}return o.set(e,t),t}(s),i[0]=s,i[1]=a):a=i[1];let c=a;if(c){let e;return i[2]!==c?(e=(0,t.jsx)("img",{src:c,alt:"",className:"GuiMarkup-bitmap"}),i[2]=c,i[3]=e):e=i[3],e}if(/bullet/i.test(s)){let e;return i[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("span",{className:"GuiMarkup-bullet",children:"•"}),i[4]=e):e=i[4],e}return null}function u(e){let a,i,s=(0,n.c)(8),{span:l}=e,{color:r,fontSize:o}=l.style;if(!r&&!o){let e;return s[0]!==l.text?(e=(0,t.jsx)(t.Fragment,{children:l.text}),s[0]=l.text,s[1]=e):e=s[1],e}let c=null!=o?`${o}px`:void 0;return s[2]!==r||s[3]!==c?(a={color:r,fontSize:c},s[2]=r,s[3]=c,s[4]=a):a=s[4],s[5]!==l.text||s[6]!==a?(i=(0,t.jsx)("span",{style:a,children:l.text}),s[5]=l.text,s[6]=a,s[7]=i):i=s[7],i}function p(e){let a,i,s,l=(0,n.c)(6),{markup:r}=e;l[0]!==r?(a=function(e){let t=function(e){let t,n=[],a=/<([^>]*)>/g,i=0,s=e=>{let t=e.split("\n");t.forEach((e,a)=>{e&&n.push({type:"text",value:e}),ai&&s(e.slice(i,t.index)),i=t.index+t[0].length;let a=t[1].trim(),l=a.indexOf(":"),r=(-1===l?a:a.slice(0,l)).toLowerCase(),o=-1===l?"":a.slice(l+1);n.push({type:"tag",name:r,arg:o})}return i{p.push({align:r,lmargin:o,textIndent:u,items:l}),l=[],r=i,o=s,c=!1,u=0},m=e=>{if(!e)return;let t=l[l.length-1];t?.type==="span"&&t.style.color===a.color&&t.style.fontSize===a.fontSize?t.text+=e:l.push({type:"span",text:e,style:{...a}})};for(let e of t){if("newline"===e.type){f();continue}if("text"===e.type){m(e.value.replace(/\t/g," "));continue}let{name:t,arg:p}=e;switch(t){case"spush":n.push({...a});break;case"spop":n.length>0&&(a=n.pop());break;case"color":a={...a,color:`#${p.trim()}`};break;case"font":a={...a,fontSize:function(e){let t=e.lastIndexOf(":");return Math.min(parseInt(-1===t?e:e.slice(t+1),10)||14,16)}(p)};break;case"lmargin":{let e=parseInt(p,10)||0;s=e,c&&e>0?u=e:0===l.length&&(o=e);break}case"just":{let e=p.trim().toLowerCase();("left"===e||"center"===e||"right"===e)&&(i=e,0===l.length&&(r=e));break}case"bitmap":c=!0,l.push({type:"bitmap",name:p.trim()});break;case"br":f();break;case"sbreak":l.length>0&&f(),f()}}return l.length>0&&f(),p}(r),l[0]=r,l[1]=a):a=l[1];let o=a;return l[2]!==o?(i=o.map(f),l[2]=o,l[3]=i):i=l[3],l[4]!==i?(s=(0,t.jsx)("div",{className:"GuiMarkup",children:i}),l[4]=i,l[5]=s):s=l[5],s}function f(e,n){let{align:a,lmargin:i,textIndent:s,items:l}=e,r=l.filter(y),o=l.filter(x),c=o.some(g);return r.length>0&&s>0&&c?(0,t.jsxs)("div",{className:"GuiMarkup-bulletLine",children:[(0,t.jsx)("div",{className:"GuiMarkup-bulletIcon",children:r.map(h)}),(0,t.jsx)("div",{className:"GuiMarkup-bulletText",children:o.map(d)})]},n):c||0!==r.length?(0,t.jsx)("div",{className:"GuiMarkup-line",style:{textAlign:"left"!==a?a:void 0,paddingLeft:i>0?`${i}px`:void 0},children:l.map(m)},n):(0,t.jsx)("div",{className:"GuiMarkup-spacer"},n)}function m(e,n){return"bitmap"===e.type?(0,t.jsx)(c,{name:e.name},n):(0,t.jsx)(u,{span:e},n)}function d(e,n){return(0,t.jsx)(u,{span:e},n)}function h(e,n){return(0,t.jsx)(c,{name:e.name},n)}function g(e){return e.text.trim().length>0}function x(e){return"span"===e.type}function y(e){return"bitmap"===e.type}function j(e){let i,s,l,r,o=(0,n.c)(9),{src:c,alt:u,className:p}=e,f=void 0===p?"MapInfoDialog-preview":p,m=(0,a.useRef)(null),[d,h]=(0,a.useState)(!1);o[0]!==c?(i=()=>{let e=!1;return fetch(c).then(M).then(v).then(t=>{if(e)return void t.close();let n=m.current;n?(n.width=t.width,n.height=t.height,n.getContext("2d")?.drawImage(t,0,0),t.close(),h(!0)):t.close()}).catch(b),()=>{e=!0}},s=[c],o[0]=c,o[1]=i,o[2]=s):(i=o[1],s=o[2]),(0,a.useEffect)(i,s);let g=d?"block":"none";return o[3]!==g?(l={display:g},o[3]=g,o[4]=l):l=o[4],o[5]!==u||o[6]!==f||o[7]!==l?(r=(0,t.jsx)("canvas",{ref:m,className:f,"aria-label":u,style:l}),o[5]=u,o[6]=f,o[7]=l,o[8]=r):r=o[8],r}function b(){}function v(e){return createImageBitmap(e,{colorSpaceConversion:"none"})}function M(e){return e.blob()}function k(e){let s,r,o,c,u,p,f,m,d,h,g,x=(0,n.c)(22),{track:y}=e,[j,b]=(0,a.useState)(!1),[v,M]=(0,a.useState)(!0),k=(0,a.useRef)(null);x[0]!==y?(s=y.toLowerCase(),x[0]=y,x[1]=s):s=x[1];let I=`${l.RESOURCE_ROOT_URL}music/${s}.mp3`;x[2]===Symbol.for("react.memo_cache_sentinel")?(r=()=>()=>{k.current?.pause()},o=[],x[2]=r,x[3]=o):(r=x[2],o=x[3]),(0,a.useEffect)(r,o),x[4]!==j?(c=()=>{let e=k.current;e&&(j?e.pause():e.play().catch(()=>M(!1)))},x[4]=j,x[5]=c):c=x[5];let N=c;return x[6]===Symbol.for("react.memo_cache_sentinel")?(u=()=>b(!0),p=()=>b(!1),f=()=>M(!1),x[6]=u,x[7]=p,x[8]=f):(u=x[6],p=x[7],f=x[8]),x[9]!==I?(m=(0,t.jsx)("audio",{ref:k,src:I,loop:!0,onPlay:u,onPause:p,onError:f}),x[9]=I,x[10]=m):m=x[10],x[11]!==y?(d=(0,t.jsx)("span",{className:"MusicTrackName",children:y}),x[11]=y,x[12]=d):d=x[12],x[13]!==v||x[14]!==j||x[15]!==N?(h=v&&(0,t.jsx)("button",{className:"MapInfoDialog-musicBtn",onClick:N,"aria-label":j?"Pause music":"Play music",children:j?(0,t.jsx)(i.FaVolumeUp,{}):(0,t.jsx)(i.FaVolumeMute,{})}),x[13]=v,x[14]=j,x[15]=N,x[16]=h):h=x[16],x[17]!==j||x[18]!==h||x[19]!==m||x[20]!==d?(g=(0,t.jsxs)("div",{className:"MapInfoDialog-musicTrack","data-playing":j,children:[m,d,h]}),x[17]=j,x[18]=h,x[19]=m,x[20]=d,x[21]=g):g=x[21],g}function I(e){var i;let o,c,u,f,m,d,h,g,x,y,b,v,M,I,S,C,L,E,P,R,T,_,B,K,U,$,G,O,F,q,z,A,Q,V,H,J,W,X=(0,n.c)(98),{open:Y,onClose:Z,missionName:ee,missionType:et}=e,{data:en}=((W=(0,n.c)(2))[0]!==ee?(J={queryKey:["parsedMission",ee],queryFn:()=>(0,l.loadMission)(ee)},W[0]=ee,W[1]=J):J=W[1],(0,s.useQuery)(J)),ea=(0,a.useRef)(null);if(X[0]!==Y?(o=()=>{Y&&(ea.current?.focus(),document.exitPointerLock())},c=[Y],X[0]=Y,X[1]=o,X[2]=c):(o=X[1],c=X[2]),(0,a.useEffect)(o,c),X[3]!==Z||X[4]!==Y?(u=()=>{if(!Y)return;let e=e=>{if("KeyI"===e.code||"Escape"===e.key)Z();else if("k"===e.key&&(e.metaKey||e.ctrlKey))return void Z();e.stopImmediatePropagation()};return window.addEventListener("keydown",e,{capture:!0}),window.addEventListener("keyup",D,{capture:!0}),()=>{window.removeEventListener("keydown",e,{capture:!0}),window.removeEventListener("keyup",D,{capture:!0})}},f=[Y,Z],X[3]=Z,X[4]=Y,X[5]=u,X[6]=f):(u=X[5],f=X[6]),(0,a.useEffect)(u,f),!Y)return null;X[7]!==en?(m=en?function(e){for(let t of e.body){if("ObjectDeclaration"!==t.type)continue;let{instanceName:e,body:n}=t;if(e&&"Identifier"===e.type&&"missiongroup"===e.name.toLowerCase()){let e={};for(let t of n){if("Assignment"!==t.type)continue;let{target:n,value:a}=t;"Identifier"===n.type&&"StringLiteral"===a.type&&(e[n.name.toLowerCase()]=a.value)}return e}}return{}}(en.ast):{},X[7]=en,X[8]=m):m=X[8];let ei=m;X[9]!==ee||X[10]!==en?(d=en?function(e,t){if(e)try{let t=(0,r.getStandardTextureResourceKey)(`textures/gui/${e}`);return(0,l.getUrlForPath)(t)}catch{}try{let e=(0,r.getStandardTextureResourceKey)(`textures/gui/Load_${t}`);return(0,l.getUrlForPath)(e)}catch{}return null}(en.bitmap,ee):null,X[9]=ee,X[10]=en,X[11]=d):d=X[11];let es=d,el=en?.displayName??ee;X[12]!==et?(h=et.toLowerCase(),X[12]=et,X[13]=h):h=X[13];let er="singleplayer"===h,eo=ei.musictrack;if(X[14]!==es||X[15]!==el||X[16]!==er||X[17]!==et||X[18]!==Z||X[19]!==en){let e,n,a,s,l=en?.missionString?(i=en.missionString,s=et.toUpperCase(),i.split("\n").flatMap(e=>{let t=e.match(/^\[([^\]]+)\]/);return t&&!t[1].toUpperCase().split(/\s+/).includes(s)?[]:[e.replace(/^\[[^\]]+\]/,"")]}).join("\n")):null;if(X[38]!==en?.missionQuote){for(let t of(n="",e="",en?.missionQuote?.trim().split("\n")??[])){let a=t.trim();a.match(/^-+\s/)?e=a.replace(/^-+\s*/,"").trim():a&&(n+=(n?" ":"")+a)}X[38]=en?.missionQuote,X[39]=e,X[40]=n}else e=X[39],n=X[40];_="MapInfoDialog-overlay",B=Z,I=ea,S="MapInfoDialog",C=w,L=N,E="dialog",P="true",R="Map Information",T=-1,M="MapInfoDialog-inner",K="MapInfoDialog-left",X[41]!==es||X[42]!==el||X[43]!==er?(U=es&&er&&(0,t.jsx)(j,{className:"MapInfoDialog-preview--floated",src:es,alt:`${el} preview`},es),X[41]=es,X[42]=el,X[43]=er,X[44]=U):U=X[44],X[45]!==el?(g=(0,t.jsx)("h1",{className:"MapInfoDialog-title",children:el}),X[45]=el,X[46]=g):g=X[46],X[47]!==en?(a=en?.planetName&&(0,t.jsx)("span",{className:"MapInfoDialog-planet",children:en.planetName}),X[47]=en,X[48]=a):a=X[48],X[49]!==a?(x=(0,t.jsx)("div",{className:"MapInfoDialog-meta",children:a}),X[49]=a,X[50]=x):x=X[50],X[51]!==e||X[52]!==n?(y=n&&(0,t.jsxs)("blockquote",{className:"MapInfoDialog-quote",children:[(0,t.jsx)("p",{children:n}),e&&(0,t.jsxs)("cite",{children:["— ",e]})]}),X[51]=e,X[52]=n,X[53]=y):y=X[53],X[54]!==en?(b=en?.missionBlurb&&(0,t.jsx)("p",{className:"MapInfoDialog-blurb",children:en.missionBlurb.trim()}),X[54]=en,X[55]=b):b=X[55],v=l&&l.trim()&&(0,t.jsx)("div",{className:"MapInfoDialog-section",children:(0,t.jsx)(p,{markup:l})}),X[14]=es,X[15]=el,X[16]=er,X[17]=et,X[18]=Z,X[19]=en,X[20]=g,X[21]=x,X[22]=y,X[23]=b,X[24]=v,X[25]=M,X[26]=I,X[27]=S,X[28]=C,X[29]=L,X[30]=E,X[31]=P,X[32]=R,X[33]=T,X[34]=_,X[35]=B,X[36]=K,X[37]=U}else g=X[20],x=X[21],y=X[22],b=X[23],v=X[24],M=X[25],I=X[26],S=X[27],C=X[28],L=X[29],E=X[30],P=X[31],R=X[32],T=X[33],_=X[34],B=X[35],K=X[36],U=X[37];return X[56]!==en?($=en?.missionBriefing&&(0,t.jsxs)("div",{className:"MapInfoDialog-section",children:[(0,t.jsx)("h2",{className:"MapInfoDialog-sectionTitle",children:"Mission Briefing"}),(0,t.jsx)(p,{markup:en.missionBriefing})]}),X[56]=en,X[57]=$):$=X[57],X[58]!==eo?(G=eo&&(0,t.jsx)(k,{track:eo}),X[58]=eo,X[59]=G):G=X[59],X[60]!==g||X[61]!==x||X[62]!==y||X[63]!==b||X[64]!==v||X[65]!==$||X[66]!==G||X[67]!==K||X[68]!==U?(O=(0,t.jsxs)("div",{className:K,children:[U,g,x,y,b,v,$,G]}),X[60]=g,X[61]=x,X[62]=y,X[63]=b,X[64]=v,X[65]=$,X[66]=G,X[67]=K,X[68]=U,X[69]=O):O=X[69],X[70]!==es||X[71]!==el||X[72]!==er?(F=es&&!er&&(0,t.jsx)("div",{className:"MapInfoDialog-right",children:(0,t.jsx)(j,{src:es,alt:`${el} preview`},es)}),X[70]=es,X[71]=el,X[72]=er,X[73]=F):F=X[73],X[74]!==M||X[75]!==O||X[76]!==F?(q=(0,t.jsxs)("div",{className:M,children:[O,F]}),X[74]=M,X[75]=O,X[76]=F,X[77]=q):q=X[77],X[78]!==Z?(z=(0,t.jsx)("button",{className:"MapInfoDialog-closeBtn",onClick:Z,children:"Close"}),X[78]=Z,X[79]=z):z=X[79],X[80]===Symbol.for("react.memo_cache_sentinel")?(A=(0,t.jsx)("span",{className:"MapInfoDialog-hint",children:"I or Esc to close"}),X[80]=A):A=X[80],X[81]!==z?(Q=(0,t.jsxs)("div",{className:"MapInfoDialog-footer",children:[z,A]}),X[81]=z,X[82]=Q):Q=X[82],X[83]!==I||X[84]!==S||X[85]!==C||X[86]!==L||X[87]!==E||X[88]!==P||X[89]!==R||X[90]!==T||X[91]!==q||X[92]!==Q?(V=(0,t.jsxs)("div",{ref:I,className:S,onClick:C,onKeyDown:L,role:E,"aria-modal":P,"aria-label":R,tabIndex:T,children:[q,Q]}),X[83]=I,X[84]=S,X[85]=C,X[86]=L,X[87]=E,X[88]=P,X[89]=R,X[90]=T,X[91]=q,X[92]=Q,X[93]=V):V=X[93],X[94]!==_||X[95]!==B||X[96]!==V?(H=(0,t.jsx)("div",{className:_,onClick:B,children:V}),X[94]=_,X[95]=B,X[96]=V,X[97]=H):H=X[97],H}function N(e){return e.stopPropagation()}function w(e){return e.stopPropagation()}function D(e){e.stopImmediatePropagation()}e.s(["MapInfoDialog",()=>I],94247)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94247,e=>{"use strict";var t=e.i(43476),n=e.i(932),a=e.i(71645),i=e.i(11152),s=e.i(66027),l=e.i(12979),r=e.i(91996);let o=new Map;function c(e){let a,i=(0,n.c)(5),{name:s}=e;i[0]!==s?(a=function(e){let t;if(o.has(e))return o.get(e);try{t=(0,l.getUrlForPath)((0,r.getStandardTextureResourceKey)(`textures/gui/${e}`))}catch{t=null}return o.set(e,t),t}(s),i[0]=s,i[1]=a):a=i[1];let c=a;if(c){let e;return i[2]!==c?(e=(0,t.jsx)("img",{src:c,alt:"",className:"GuiMarkup-bitmap"}),i[2]=c,i[3]=e):e=i[3],e}if(/bullet/i.test(s)){let e;return i[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("span",{className:"GuiMarkup-bullet",children:"•"}),i[4]=e):e=i[4],e}return null}function u(e){let a,i,s=(0,n.c)(8),{span:l}=e,{color:r,fontSize:o}=l.style;if(!r&&!o){let e;return s[0]!==l.text?(e=(0,t.jsx)(t.Fragment,{children:l.text}),s[0]=l.text,s[1]=e):e=s[1],e}let c=null!=o?`${o}px`:void 0;return s[2]!==r||s[3]!==c?(a={color:r,fontSize:c},s[2]=r,s[3]=c,s[4]=a):a=s[4],s[5]!==l.text||s[6]!==a?(i=(0,t.jsx)("span",{style:a,children:l.text}),s[5]=l.text,s[6]=a,s[7]=i):i=s[7],i}function p(e){let a,i,s,l=(0,n.c)(6),{markup:r}=e;l[0]!==r?(a=function(e){let t=function(e){let t,n=[],a=/<([^>]*)>/g,i=0,s=e=>{let t=e.split("\n");t.forEach((e,a)=>{e&&n.push({type:"text",value:e}),ai&&s(e.slice(i,t.index)),i=t.index+t[0].length;let a=t[1].trim(),l=a.indexOf(":"),r=(-1===l?a:a.slice(0,l)).toLowerCase(),o=-1===l?"":a.slice(l+1);n.push({type:"tag",name:r,arg:o})}return i{p.push({align:r,lmargin:o,textIndent:u,items:l}),l=[],r=i,o=s,c=!1,u=0},m=e=>{if(!e)return;let t=l[l.length-1];t?.type==="span"&&t.style.color===a.color&&t.style.fontSize===a.fontSize?t.text+=e:l.push({type:"span",text:e,style:{...a}})};for(let e of t){if("newline"===e.type){f();continue}if("text"===e.type){m(e.value.replace(/\t/g," "));continue}let{name:t,arg:p}=e;switch(t){case"spush":n.push({...a});break;case"spop":n.length>0&&(a=n.pop());break;case"color":a={...a,color:`#${p.trim()}`};break;case"font":a={...a,fontSize:function(e){let t=e.lastIndexOf(":");return Math.min(parseInt(-1===t?e:e.slice(t+1),10)||14,16)}(p)};break;case"lmargin":{let e=parseInt(p,10)||0;s=e,c&&e>0?u=e:0===l.length&&(o=e);break}case"just":{let e=p.trim().toLowerCase();("left"===e||"center"===e||"right"===e)&&(i=e,0===l.length&&(r=e));break}case"bitmap":c=!0,l.push({type:"bitmap",name:p.trim()});break;case"br":f();break;case"sbreak":l.length>0&&f(),f()}}return l.length>0&&f(),p}(r),l[0]=r,l[1]=a):a=l[1];let o=a;return l[2]!==o?(i=o.map(f),l[2]=o,l[3]=i):i=l[3],l[4]!==i?(s=(0,t.jsx)("div",{className:"GuiMarkup",children:i}),l[4]=i,l[5]=s):s=l[5],s}function f(e,n){let{align:a,lmargin:i,textIndent:s,items:l}=e,r=l.filter(y),o=l.filter(x),c=o.some(g);return r.length>0&&s>0&&c?(0,t.jsxs)("div",{className:"GuiMarkup-bulletLine",children:[(0,t.jsx)("div",{className:"GuiMarkup-bulletIcon",children:r.map(h)}),(0,t.jsx)("div",{className:"GuiMarkup-bulletText",children:o.map(d)})]},n):c||0!==r.length?(0,t.jsx)("div",{className:"GuiMarkup-line",style:{textAlign:"left"!==a?a:void 0,paddingLeft:i>0?`${i}px`:void 0},children:l.map(m)},n):(0,t.jsx)("div",{className:"GuiMarkup-spacer"},n)}function m(e,n){return"bitmap"===e.type?(0,t.jsx)(c,{name:e.name},n):(0,t.jsx)(u,{span:e},n)}function d(e,n){return(0,t.jsx)(u,{span:e},n)}function h(e,n){return(0,t.jsx)(c,{name:e.name},n)}function g(e){return e.text.trim().length>0}function x(e){return"span"===e.type}function y(e){return"bitmap"===e.type}function j(e){let i,s,l,r,o=(0,n.c)(9),{src:c,alt:u,className:p}=e,f=void 0===p?"MapInfoDialog-preview":p,m=(0,a.useRef)(null),[d,h]=(0,a.useState)(!1);o[0]!==c?(i=()=>{let e=!1;return fetch(c).then(M).then(v).then(t=>{if(e)return void t.close();let n=m.current;n?(n.width=t.width,n.height=t.height,n.getContext("2d")?.drawImage(t,0,0),t.close(),h(!0)):t.close()}).catch(b),()=>{e=!0}},s=[c],o[0]=c,o[1]=i,o[2]=s):(i=o[1],s=o[2]),(0,a.useEffect)(i,s);let g=d?"block":"none";return o[3]!==g?(l={display:g},o[3]=g,o[4]=l):l=o[4],o[5]!==u||o[6]!==f||o[7]!==l?(r=(0,t.jsx)("canvas",{ref:m,className:f,"aria-label":u,style:l}),o[5]=u,o[6]=f,o[7]=l,o[8]=r):r=o[8],r}function b(){}function v(e){return createImageBitmap(e,{colorSpaceConversion:"none"})}function M(e){return e.blob()}function k(e){let s,r,o,c,u,p,f,m,d,h,g,x=(0,n.c)(22),{track:y}=e,[j,b]=(0,a.useState)(!1),[v,M]=(0,a.useState)(!0),k=(0,a.useRef)(null);x[0]!==y?(s=y.toLowerCase(),x[0]=y,x[1]=s):s=x[1];let I=`${l.RESOURCE_ROOT_URL}music/${s}.mp3`;x[2]===Symbol.for("react.memo_cache_sentinel")?(r=()=>()=>{k.current?.pause()},o=[],x[2]=r,x[3]=o):(r=x[2],o=x[3]),(0,a.useEffect)(r,o),x[4]!==j?(c=()=>{let e=k.current;e&&(j?e.pause():e.play().catch(()=>M(!1)))},x[4]=j,x[5]=c):c=x[5];let N=c;return x[6]===Symbol.for("react.memo_cache_sentinel")?(u=()=>b(!0),p=()=>b(!1),f=()=>M(!1),x[6]=u,x[7]=p,x[8]=f):(u=x[6],p=x[7],f=x[8]),x[9]!==I?(m=(0,t.jsx)("audio",{ref:k,src:I,loop:!0,onPlay:u,onPause:p,onError:f}),x[9]=I,x[10]=m):m=x[10],x[11]!==y?(d=(0,t.jsx)("span",{className:"MusicTrackName",children:y}),x[11]=y,x[12]=d):d=x[12],x[13]!==v||x[14]!==j||x[15]!==N?(h=v&&(0,t.jsx)("button",{className:"MapInfoDialog-musicBtn",onClick:N,"aria-label":j?"Pause music":"Play music",children:j?(0,t.jsx)(i.FaVolumeUp,{}):(0,t.jsx)(i.FaVolumeMute,{})}),x[13]=v,x[14]=j,x[15]=N,x[16]=h):h=x[16],x[17]!==j||x[18]!==h||x[19]!==m||x[20]!==d?(g=(0,t.jsxs)("div",{className:"MapInfoDialog-musicTrack","data-playing":j,children:[m,d,h]}),x[17]=j,x[18]=h,x[19]=m,x[20]=d,x[21]=g):g=x[21],g}function I(e){var i;let o,c,u,f,m,d,h,g,x,y,b,v,M,I,S,C,L,E,P,R,T,_,B,K,U,$,G,O,F,q,z,A,Q,V,H,J,W,X=(0,n.c)(98),{open:Y,onClose:Z,missionName:ee,missionType:et}=e,{data:en}=((W=(0,n.c)(2))[0]!==ee?(J={queryKey:["parsedMission",ee],queryFn:()=>(0,l.loadMission)(ee)},W[0]=ee,W[1]=J):J=W[1],(0,s.useQuery)(J)),ea=(0,a.useRef)(null);if(X[0]!==Y?(o=()=>{if(Y){ea.current?.focus();try{document.exitPointerLock()}catch{}}},c=[Y],X[0]=Y,X[1]=o,X[2]=c):(o=X[1],c=X[2]),(0,a.useEffect)(o,c),X[3]!==Z||X[4]!==Y?(u=()=>{if(!Y)return;let e=e=>{if("KeyI"===e.code||"Escape"===e.key)Z();else if("k"===e.key&&(e.metaKey||e.ctrlKey))return void Z();e.stopImmediatePropagation()};return window.addEventListener("keydown",e,{capture:!0}),window.addEventListener("keyup",D,{capture:!0}),()=>{window.removeEventListener("keydown",e,{capture:!0}),window.removeEventListener("keyup",D,{capture:!0})}},f=[Y,Z],X[3]=Z,X[4]=Y,X[5]=u,X[6]=f):(u=X[5],f=X[6]),(0,a.useEffect)(u,f),!Y)return null;X[7]!==en?(m=en?function(e){for(let t of e.body){if("ObjectDeclaration"!==t.type)continue;let{instanceName:e,body:n}=t;if(e&&"Identifier"===e.type&&"missiongroup"===e.name.toLowerCase()){let e={};for(let t of n){if("Assignment"!==t.type)continue;let{target:n,value:a}=t;"Identifier"===n.type&&"StringLiteral"===a.type&&(e[n.name.toLowerCase()]=a.value)}return e}}return{}}(en.ast):{},X[7]=en,X[8]=m):m=X[8];let ei=m;X[9]!==ee||X[10]!==en?(d=en?function(e,t){if(e)try{let t=(0,r.getStandardTextureResourceKey)(`textures/gui/${e}`);return(0,l.getUrlForPath)(t)}catch{}try{let e=(0,r.getStandardTextureResourceKey)(`textures/gui/Load_${t}`);return(0,l.getUrlForPath)(e)}catch{}return null}(en.bitmap,ee):null,X[9]=ee,X[10]=en,X[11]=d):d=X[11];let es=d,el=en?.displayName??ee;X[12]!==et?(h=et.toLowerCase(),X[12]=et,X[13]=h):h=X[13];let er="singleplayer"===h,eo=ei.musictrack;if(X[14]!==es||X[15]!==el||X[16]!==er||X[17]!==et||X[18]!==Z||X[19]!==en){let e,n,a,s,l=en?.missionString?(i=en.missionString,s=et.toUpperCase(),i.split("\n").flatMap(e=>{let t=e.match(/^\[([^\]]+)\]/);return t&&!t[1].toUpperCase().split(/\s+/).includes(s)?[]:[e.replace(/^\[[^\]]+\]/,"")]}).join("\n")):null;if(X[38]!==en?.missionQuote){for(let t of(n="",e="",en?.missionQuote?.trim().split("\n")??[])){let a=t.trim();a.match(/^-+\s/)?e=a.replace(/^-+\s*/,"").trim():a&&(n+=(n?" ":"")+a)}X[38]=en?.missionQuote,X[39]=e,X[40]=n}else e=X[39],n=X[40];_="MapInfoDialog-overlay",B=Z,I=ea,S="MapInfoDialog",C=w,L=N,E="dialog",P="true",R="Map Information",T=-1,M="MapInfoDialog-inner",K="MapInfoDialog-left",X[41]!==es||X[42]!==el||X[43]!==er?(U=es&&er&&(0,t.jsx)(j,{className:"MapInfoDialog-preview--floated",src:es,alt:`${el} preview`},es),X[41]=es,X[42]=el,X[43]=er,X[44]=U):U=X[44],X[45]!==el?(g=(0,t.jsx)("h1",{className:"MapInfoDialog-title",children:el}),X[45]=el,X[46]=g):g=X[46],X[47]!==en?(a=en?.planetName&&(0,t.jsx)("span",{className:"MapInfoDialog-planet",children:en.planetName}),X[47]=en,X[48]=a):a=X[48],X[49]!==a?(x=(0,t.jsx)("div",{className:"MapInfoDialog-meta",children:a}),X[49]=a,X[50]=x):x=X[50],X[51]!==e||X[52]!==n?(y=n&&(0,t.jsxs)("blockquote",{className:"MapInfoDialog-quote",children:[(0,t.jsx)("p",{children:n}),e&&(0,t.jsxs)("cite",{children:["— ",e]})]}),X[51]=e,X[52]=n,X[53]=y):y=X[53],X[54]!==en?(b=en?.missionBlurb&&(0,t.jsx)("p",{className:"MapInfoDialog-blurb",children:en.missionBlurb.trim()}),X[54]=en,X[55]=b):b=X[55],v=l&&l.trim()&&(0,t.jsx)("div",{className:"MapInfoDialog-section",children:(0,t.jsx)(p,{markup:l})}),X[14]=es,X[15]=el,X[16]=er,X[17]=et,X[18]=Z,X[19]=en,X[20]=g,X[21]=x,X[22]=y,X[23]=b,X[24]=v,X[25]=M,X[26]=I,X[27]=S,X[28]=C,X[29]=L,X[30]=E,X[31]=P,X[32]=R,X[33]=T,X[34]=_,X[35]=B,X[36]=K,X[37]=U}else g=X[20],x=X[21],y=X[22],b=X[23],v=X[24],M=X[25],I=X[26],S=X[27],C=X[28],L=X[29],E=X[30],P=X[31],R=X[32],T=X[33],_=X[34],B=X[35],K=X[36],U=X[37];return X[56]!==en?($=en?.missionBriefing&&(0,t.jsxs)("div",{className:"MapInfoDialog-section",children:[(0,t.jsx)("h2",{className:"MapInfoDialog-sectionTitle",children:"Mission Briefing"}),(0,t.jsx)(p,{markup:en.missionBriefing})]}),X[56]=en,X[57]=$):$=X[57],X[58]!==eo?(G=eo&&(0,t.jsx)(k,{track:eo}),X[58]=eo,X[59]=G):G=X[59],X[60]!==g||X[61]!==x||X[62]!==y||X[63]!==b||X[64]!==v||X[65]!==$||X[66]!==G||X[67]!==K||X[68]!==U?(O=(0,t.jsxs)("div",{className:K,children:[U,g,x,y,b,v,$,G]}),X[60]=g,X[61]=x,X[62]=y,X[63]=b,X[64]=v,X[65]=$,X[66]=G,X[67]=K,X[68]=U,X[69]=O):O=X[69],X[70]!==es||X[71]!==el||X[72]!==er?(F=es&&!er&&(0,t.jsx)("div",{className:"MapInfoDialog-right",children:(0,t.jsx)(j,{src:es,alt:`${el} preview`},es)}),X[70]=es,X[71]=el,X[72]=er,X[73]=F):F=X[73],X[74]!==M||X[75]!==O||X[76]!==F?(q=(0,t.jsxs)("div",{className:M,children:[O,F]}),X[74]=M,X[75]=O,X[76]=F,X[77]=q):q=X[77],X[78]!==Z?(z=(0,t.jsx)("button",{className:"MapInfoDialog-closeBtn",onClick:Z,children:"Close"}),X[78]=Z,X[79]=z):z=X[79],X[80]===Symbol.for("react.memo_cache_sentinel")?(A=(0,t.jsx)("span",{className:"MapInfoDialog-hint",children:"I or Esc to close"}),X[80]=A):A=X[80],X[81]!==z?(Q=(0,t.jsxs)("div",{className:"MapInfoDialog-footer",children:[z,A]}),X[81]=z,X[82]=Q):Q=X[82],X[83]!==I||X[84]!==S||X[85]!==C||X[86]!==L||X[87]!==E||X[88]!==P||X[89]!==R||X[90]!==T||X[91]!==q||X[92]!==Q?(V=(0,t.jsxs)("div",{ref:I,className:S,onClick:C,onKeyDown:L,role:E,"aria-modal":P,"aria-label":R,tabIndex:T,children:[q,Q]}),X[83]=I,X[84]=S,X[85]=C,X[86]=L,X[87]=E,X[88]=P,X[89]=R,X[90]=T,X[91]=q,X[92]=Q,X[93]=V):V=X[93],X[94]!==_||X[95]!==B||X[96]!==V?(H=(0,t.jsx)("div",{className:_,onClick:B,children:V}),X[94]=_,X[95]=B,X[96]=V,X[97]=H):H=X[97],H}function N(e){return e.stopPropagation()}function w(e){return e.stopPropagation()}function D(e){e.stopImmediatePropagation()}e.s(["MapInfoDialog",()=>I],94247)}]); \ No newline at end of file diff --git a/docs/_next/static/chunks/fd5173b60870d6fb.js b/docs/_next/static/chunks/9fdd9dd1af0bcc76.js similarity index 99% rename from docs/_next/static/chunks/fd5173b60870d6fb.js rename to docs/_next/static/chunks/9fdd9dd1af0bcc76.js index 246d3e36..232ea402 100644 --- a/docs/_next/static/chunks/fd5173b60870d6fb.js +++ b/docs/_next/static/chunks/9fdd9dd1af0bcc76.js @@ -208,4 +208,4 @@ void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); } - `}),[P]);return a.createElement("group",(0,c.default)({},L,{ref:q}),E&&!et&&a.createElement("mesh",{castShadow:T,receiveShadow:w,ref:Q},D||a.createElement("planeGeometry",null),O||a.createElement("shaderMaterial",{side:s.DoubleSide,vertexShader:ea.vertexShader,fragmentShader:ea.fragmentShader})))});e.s(["Html",()=>b],60099);let F=[0,0,0],S=(0,a.memo)(function(e){let t,r,c,u,f,d=(0,o.c)(19),{children:m,color:g,position:h,opacity:v}=e,p=void 0===g?"white":g,x=void 0===h?F:h,y=void 0===v?"fadeWithDistance":v,S="fadeWithDistance"===y,M=(0,a.useRef)(null),P=function(e){let t,r,i=(0,o.c)(3),{camera:c}=(0,l.useThree)(),u=(0,a.useRef)(null),f=(r=(0,a.useRef)(null),(0,n.useFrame)(()=>{e.current&&(r.current??=new s.Vector3,e.current.getWorldPosition(r.current))}),r);return i[0]!==c||i[1]!==f?(t=()=>{f.current?u.current=c.position.distanceTo(f.current):u.current=null},i[0]=c,i[1]=f,i[2]=t):t=i[2],(0,n.useFrame)(t),u}(M),[E,_]=(0,a.useState)(0!==y),T=(0,a.useRef)(null);return d[0]!==P||d[1]!==S?(t=()=>{if(S&&T.current&&null!=P.current){let e=Math.max(0,Math.min(1,1-P.current/200));T.current.style.opacity=e.toString()}},d[0]=P,d[1]=S,d[2]=t):t=d[2],d[3]!==P||d[4]!==S||d[5]!==E?(r=[E,S,P],d[3]=P,d[4]=S,d[5]=E,d[6]=r):r=d[6],(0,a.useEffect)(t,r),d[7]!==P||d[8]!==S||d[9]!==E||d[10]!==y?(c=()=>{if(S){let e=P.current,t=null!=e&&e<200;if(E!==t&&_(t),T.current&&t){let t=Math.max(0,Math.min(1,1-e/200));T.current.style.opacity=t.toString()}}else _(0!==y),T.current&&(T.current.style.opacity=y.toString())},d[7]=P,d[8]=S,d[9]=E,d[10]=y,d[11]=c):c=d[11],(0,n.useFrame)(c),d[12]!==m||d[13]!==p||d[14]!==E||d[15]!==x?(u=E?(0,i.jsx)(b,{position:x,center:!0,children:(0,i.jsx)("div",{ref:T,className:"StaticShapeLabel",style:{color:p},children:m})}):null,d[12]=m,d[13]=p,d[14]=E,d[15]=x,d[16]=u):u=d[16],d[17]!==u?(f=(0,i.jsx)("group",{ref:M,children:u}),d[17]=u,d[18]=f):f=d[18],f});e.s(["FloatingLabel",0,S],89887)},51434,e=>{"use strict";var t=e.i(43476),r=e.i(932),i=e.i(71645),o=e.i(73949),a=e.i(90072);let n=(0,i.createContext)(void 0);function l(e){let l,c,u,f,d=(0,r.c)(7),{children:m}=e,{camera:g}=(0,o.useThree)();d[0]===Symbol.for("react.memo_cache_sentinel")?(l={audioLoader:null,audioListener:null},d[0]=l):l=d[0];let[h,v]=(0,i.useState)(l);return d[1]!==g?(c=()=>{let e=new a.AudioLoader,t=g.children.find(s);t||(t=new a.AudioListener,g.add(t)),v({audioLoader:e,audioListener:t})},u=[g],d[1]=g,d[2]=c,d[3]=u):(c=d[2],u=d[3]),(0,i.useEffect)(c,u),d[4]!==h||d[5]!==m?(f=(0,t.jsx)(n.Provider,{value:h,children:m}),d[4]=h,d[5]=m,d[6]=f):f=d[6],f}function s(e){return e instanceof a.AudioListener}function c(){let e=(0,i.useContext)(n);if(void 0===e)throw Error("useAudio must be used within AudioProvider");return e}e.s(["AudioProvider",()=>l,"useAudio",()=>c])},61921,e=>{e.v(t=>Promise.all(["static/chunks/cb4089eec9313f48.js"].map(t=>e.l(t))).then(()=>t(29055)))},25147,e=>{e.v(t=>Promise.all(["static/chunks/4e5626f3eeee0985.js"].map(t=>e.l(t))).then(()=>t(63724)))},18599,e=>{e.v(t=>Promise.all(["static/chunks/6e74e9455d83b68c.js"].map(t=>e.l(t))).then(()=>t(42585)))},84968,e=>{e.v(t=>Promise.all(["static/chunks/70bf3e06d5674fac.js"].map(t=>e.l(t))).then(()=>t(90208)))},59197,e=>{e.v(t=>Promise.all(["static/chunks/aa3c97b2da210ead.js"].map(t=>e.l(t))).then(()=>t(94247)))}]); \ No newline at end of file + `}),[P]);return a.createElement("group",(0,c.default)({},L,{ref:q}),E&&!et&&a.createElement("mesh",{castShadow:T,receiveShadow:w,ref:Q},D||a.createElement("planeGeometry",null),O||a.createElement("shaderMaterial",{side:s.DoubleSide,vertexShader:ea.vertexShader,fragmentShader:ea.fragmentShader})))});e.s(["Html",()=>b],60099);let F=[0,0,0],S=(0,a.memo)(function(e){let t,r,c,u,f,d=(0,o.c)(19),{children:m,color:g,position:h,opacity:v}=e,p=void 0===g?"white":g,x=void 0===h?F:h,y=void 0===v?"fadeWithDistance":v,S="fadeWithDistance"===y,M=(0,a.useRef)(null),P=function(e){let t,r,i=(0,o.c)(3),{camera:c}=(0,l.useThree)(),u=(0,a.useRef)(null),f=(r=(0,a.useRef)(null),(0,n.useFrame)(()=>{e.current&&(r.current??=new s.Vector3,e.current.getWorldPosition(r.current))}),r);return i[0]!==c||i[1]!==f?(t=()=>{f.current?u.current=c.position.distanceTo(f.current):u.current=null},i[0]=c,i[1]=f,i[2]=t):t=i[2],(0,n.useFrame)(t),u}(M),[E,_]=(0,a.useState)(0!==y),T=(0,a.useRef)(null);return d[0]!==P||d[1]!==S?(t=()=>{if(S&&T.current&&null!=P.current){let e=Math.max(0,Math.min(1,1-P.current/200));T.current.style.opacity=e.toString()}},d[0]=P,d[1]=S,d[2]=t):t=d[2],d[3]!==P||d[4]!==S||d[5]!==E?(r=[E,S,P],d[3]=P,d[4]=S,d[5]=E,d[6]=r):r=d[6],(0,a.useEffect)(t,r),d[7]!==P||d[8]!==S||d[9]!==E||d[10]!==y?(c=()=>{if(S){let e=P.current,t=null!=e&&e<200;if(E!==t&&_(t),T.current&&t){let t=Math.max(0,Math.min(1,1-e/200));T.current.style.opacity=t.toString()}}else _(0!==y),T.current&&(T.current.style.opacity=y.toString())},d[7]=P,d[8]=S,d[9]=E,d[10]=y,d[11]=c):c=d[11],(0,n.useFrame)(c),d[12]!==m||d[13]!==p||d[14]!==E||d[15]!==x?(u=E?(0,i.jsx)(b,{position:x,center:!0,children:(0,i.jsx)("div",{ref:T,className:"StaticShapeLabel",style:{color:p},children:m})}):null,d[12]=m,d[13]=p,d[14]=E,d[15]=x,d[16]=u):u=d[16],d[17]!==u?(f=(0,i.jsx)("group",{ref:M,children:u}),d[17]=u,d[18]=f):f=d[18],f});e.s(["FloatingLabel",0,S],89887)},51434,e=>{"use strict";var t=e.i(43476),r=e.i(932),i=e.i(71645),o=e.i(73949),a=e.i(90072);let n=(0,i.createContext)(void 0);function l(e){let l,c,u,f,d=(0,r.c)(7),{children:m}=e,{camera:g}=(0,o.useThree)();d[0]===Symbol.for("react.memo_cache_sentinel")?(l={audioLoader:null,audioListener:null},d[0]=l):l=d[0];let[h,v]=(0,i.useState)(l);return d[1]!==g?(c=()=>{let e=new a.AudioLoader,t=g.children.find(s);t||(t=new a.AudioListener,g.add(t)),v({audioLoader:e,audioListener:t})},u=[g],d[1]=g,d[2]=c,d[3]=u):(c=d[2],u=d[3]),(0,i.useEffect)(c,u),d[4]!==h||d[5]!==m?(f=(0,t.jsx)(n.Provider,{value:h,children:m}),d[4]=h,d[5]=m,d[6]=f):f=d[6],f}function s(e){return e instanceof a.AudioListener}function c(){let e=(0,i.useContext)(n);if(void 0===e)throw Error("useAudio must be used within AudioProvider");return e}e.s(["AudioProvider",()=>l,"useAudio",()=>c])},61921,e=>{e.v(t=>Promise.all(["static/chunks/cb4089eec9313f48.js"].map(t=>e.l(t))).then(()=>t(29055)))},25147,e=>{e.v(t=>Promise.all(["static/chunks/4e5626f3eeee0985.js"].map(t=>e.l(t))).then(()=>t(63724)))},18599,e=>{e.v(t=>Promise.all(["static/chunks/6e74e9455d83b68c.js"].map(t=>e.l(t))).then(()=>t(42585)))},84968,e=>{e.v(t=>Promise.all(["static/chunks/70bf3e06d5674fac.js"].map(t=>e.l(t))).then(()=>t(90208)))},59197,e=>{e.v(t=>Promise.all(["static/chunks/5be1f91d5fe511ed.js"].map(t=>e.l(t))).then(()=>t(94247)))}]); \ No newline at end of file diff --git a/docs/_next/static/chunks/143bcebca21d60e5.js b/docs/_next/static/chunks/eced4fe19bc9da99.js similarity index 92% rename from docs/_next/static/chunks/143bcebca21d60e5.js rename to docs/_next/static/chunks/eced4fe19bc9da99.js index 65a6eef7..1d269fe2 100644 --- a/docs/_next/static/chunks/143bcebca21d60e5.js +++ b/docs/_next/static/chunks/eced4fe19bc9da99.js @@ -525,4 +525,4 @@ uniform float shapeAmbientFactor; // Apply shape-specific lighting multipliers reflectedLight.directDiffuse *= shapeDirectionalFactor; reflectedLight.indirectDiffuse *= shapeAmbientFactor; -`))}}function tL(e,t,r,n){let i=r.has("Translucent"),a=r.has("Additive");if(r.has("SelfIlluminating")){let e=new u.MeshBasicMaterial({map:t,side:2,transparent:a,alphaTest:.5*!a,fog:!0,...a&&{blending:u.AdditiveBlending}});return tG(e),e}if(n||i){let e={map:t,transparent:!1,alphaTest:.5,reflectivity:0},r=new u.MeshLambertMaterial({...e,side:1,polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:1}),n=new u.MeshLambertMaterial({...e,side:0});return tG(r),tG(n),[r,n]}let o=new u.MeshLambertMaterial({map:t,side:2,reflectivity:0});return tG(o),o}let t_=(0,o.memo)(function(e){let t,r,n,o,l,s,c=(0,a.c)(35),{material:d,shapeName:f,geometry:m,backGeometry:h,castShadow:p,receiveShadow:A}=e,g=void 0!==p&&p,B=void 0!==A&&A,C=d.userData.resource_path;c[0]!==d.userData.flag_names?(t=d.userData.flag_names??[],c[0]=d.userData.flag_names,c[1]=t):t=c[1],c[2]!==t?(r=new Set(t),c[2]=t,c[3]=r):r=c[3];let y=r,b=function(e){var t,r;let n,i,o,l,s=(0,a.c)(14),{animationEnabled:c}=(0,S.useSettings)();s[0]!==e?(n={queryKey:["ifl",e],queryFn:()=>(0,v.loadImageFrameList)(e)},s[0]=e,s[1]=n):n=s[1];let{data:d}=(t=n,(0,tR.useBaseQuery)({...t,enabled:!0,suspense:!0,throwOnError:tw.defaultThrowOnError,placeholderData:void 0},tT.QueryObserver,void 0));if(s[2]!==d||s[3]!==e){let t;s[5]!==e?(t=t=>(0,v.iflTextureToUrl)(t.name,e),s[5]=e,s[6]=t):t=s[6],i=d.map(t),s[2]=d,s[3]=e,s[4]=i}else i=s[4];let f=i,m=(0,x.useTexture)(f);if(s[7]!==d||s[8]!==e||s[9]!==m){let t;if(!(o=tI.get(e))){let t,r,n,i,a,l,s,c,d;r=(t=m[0].image).width,n=t.height,a=Math.ceil(Math.sqrt(i=m.length)),l=Math.ceil(i/a),(s=document.createElement("canvas")).width=r*a,s.height=n*l,c=s.getContext("2d"),m.forEach((e,t)=>{let i=Math.floor(t/a);c.drawImage(e.image,t%a*r,i*n)}),(d=new u.CanvasTexture(s)).colorSpace=u.SRGBColorSpace,d.generateMipmaps=!1,d.minFilter=u.NearestFilter,d.magFilter=u.NearestFilter,d.wrapS=u.ClampToEdgeWrapping,d.wrapT=u.ClampToEdgeWrapping,d.repeat.set(1/a,1/l),o={texture:d,columns:a,rows:l,frameCount:i,frameStartTicks:[],totalTicks:0,lastFrame:-1},tI.set(e,o)}t=0,(r=o).frameStartTicks=d.map(e=>{let r=t;return t+=e.frameCount,r}),r.totalTicks=t,s[7]=d,s[8]=e,s[9]=m,s[10]=o}else o=s[10];let h=o;return s[11]!==c||s[12]!==h?(l=e=>{let t=c?function(e,t){if(0===e.totalTicks)return 0;let r=t%e.totalTicks,{frameStartTicks:n}=e;for(let e=n.length-1;e>=0;e--)if(r>=n[e])return e;return 0}(h,e):0;!function(e,t){if(t===e.lastFrame)return;e.lastFrame=t;let r=t%e.columns,n=e.rows-1-Math.floor(t/e.columns);e.texture.offset.set(r/e.columns,n/e.rows)}(h,t)},s[11]=c,s[12]=h,s[13]=l):l=s[13],(0,tD.useTick)(l),h.texture}(`textures/${C}.ifl`);c[4]!==f?(n=f&&tE(f),c[4]=f,c[5]=n):n=c[5];let E=n;c[6]!==y||c[7]!==E||c[8]!==d||c[9]!==b?(o=tL(d,b,y,E),c[6]=y,c[7]=E,c[8]=d,c[9]=b,c[10]=o):o=c[10];let M=o;if(Array.isArray(M)){let e,t,r,n,a,o=h||m;return c[11]!==M[0]?(e=(0,i.jsx)("primitive",{object:M[0],attach:"material"}),c[11]=M[0],c[12]=e):e=c[12],c[13]!==g||c[14]!==B||c[15]!==o||c[16]!==e?(t=(0,i.jsx)("mesh",{geometry:o,castShadow:g,receiveShadow:B,children:e}),c[13]=g,c[14]=B,c[15]=o,c[16]=e,c[17]=t):t=c[17],c[18]!==M[1]?(r=(0,i.jsx)("primitive",{object:M[1],attach:"material"}),c[18]=M[1],c[19]=r):r=c[19],c[20]!==g||c[21]!==m||c[22]!==B||c[23]!==r?(n=(0,i.jsx)("mesh",{geometry:m,castShadow:g,receiveShadow:B,children:r}),c[20]=g,c[21]=m,c[22]=B,c[23]=r,c[24]=n):n=c[24],c[25]!==n||c[26]!==t?(a=(0,i.jsxs)(i.Fragment,{children:[t,n]}),c[25]=n,c[26]=t,c[27]=a):a=c[27],a}return c[28]!==M?(l=(0,i.jsx)("primitive",{object:M,attach:"material"}),c[28]=M,c[29]=l):l=c[29],c[30]!==g||c[31]!==m||c[32]!==B||c[33]!==l?(s=(0,i.jsx)("mesh",{geometry:m,castShadow:g,receiveShadow:B,children:l}),c[30]=g,c[31]=m,c[32]=B,c[33]=l,c[34]=s):s=c[34],s}),tP=(0,o.memo)(function(e){let t,r,n,o,l,s,u,c,d=(0,a.c)(40),{material:f,shapeName:m,geometry:h,backGeometry:p,castShadow:A,receiveShadow:g}=e,B=void 0!==A&&A,C=void 0!==g&&g,y=f.userData.resource_path;d[0]!==f.userData.flag_names?(t=f.userData.flag_names??[],d[0]=f.userData.flag_names,d[1]=t):t=d[1],d[2]!==t?(r=new Set(t),d[2]=t,d[3]=r):r=d[3];let E=r;y||console.warn(`No resource_path was found on "${m}" - rendering fallback.`),d[4]!==y?(n=y?(0,v.textureToUrl)(y):v.FALLBACK_TEXTURE_URL,d[4]=y,d[5]=n):n=d[5];let M=n;d[6]!==m?(o=m&&tE(m),d[6]=m,d[7]=o):o=d[7];let S=o,F=E.has("Translucent");d[8]!==S||d[9]!==F?(l=e=>S||F?(0,b.setupTexture)(e,{disableMipmaps:!0}):(0,b.setupTexture)(e),d[8]=S,d[9]=F,d[10]=l):l=d[10];let T=(0,x.useTexture)(M,l);d[11]!==E||d[12]!==S||d[13]!==f||d[14]!==T?(s=tL(f,T,E,S),d[11]=E,d[12]=S,d[13]=f,d[14]=T,d[15]=s):s=d[15];let R=s;if(Array.isArray(R)){let e,t,r,n,a,o=p||h;return d[16]!==R[0]?(e=(0,i.jsx)("primitive",{object:R[0],attach:"material"}),d[16]=R[0],d[17]=e):e=d[17],d[18]!==B||d[19]!==C||d[20]!==e||d[21]!==o?(t=(0,i.jsx)("mesh",{geometry:o,castShadow:B,receiveShadow:C,children:e}),d[18]=B,d[19]=C,d[20]=e,d[21]=o,d[22]=t):t=d[22],d[23]!==R[1]?(r=(0,i.jsx)("primitive",{object:R[1],attach:"material"}),d[23]=R[1],d[24]=r):r=d[24],d[25]!==B||d[26]!==h||d[27]!==C||d[28]!==r?(n=(0,i.jsx)("mesh",{geometry:h,castShadow:B,receiveShadow:C,children:r}),d[25]=B,d[26]=h,d[27]=C,d[28]=r,d[29]=n):n=d[29],d[30]!==t||d[31]!==n?(a=(0,i.jsxs)(i.Fragment,{children:[t,n]}),d[30]=t,d[31]=n,d[32]=a):a=d[32],a}return d[33]!==R?(u=(0,i.jsx)("primitive",{object:R,attach:"material"}),d[33]=R,d[34]=u):u=d[34],d[35]!==B||d[36]!==h||d[37]!==C||d[38]!==u?(c=(0,i.jsx)("mesh",{geometry:h,castShadow:B,receiveShadow:C,children:u}),d[35]=B,d[36]=h,d[37]=C,d[38]=u,d[39]=c):c=d[39],c}),tO=(0,o.memo)(function(e){let t=(0,a.c)(14),{material:r,shapeName:n,geometry:o,backGeometry:l,castShadow:s,receiveShadow:u}=e,c=void 0!==s&&s,d=void 0!==u&&u,f=new Set(r.userData.flag_names??[]).has("IflMaterial"),m=r.userData.resource_path;if(f&&m){let e;return t[0]!==l||t[1]!==c||t[2]!==o||t[3]!==r||t[4]!==d||t[5]!==n?(e=(0,i.jsx)(t_,{material:r,shapeName:n,geometry:o,backGeometry:l,castShadow:c,receiveShadow:d}),t[0]=l,t[1]=c,t[2]=o,t[3]=r,t[4]=d,t[5]=n,t[6]=e):e=t[6],e}if(!r.name)return null;{let e;return t[7]!==l||t[8]!==c||t[9]!==o||t[10]!==r||t[11]!==d||t[12]!==n?(e=(0,i.jsx)(tP,{material:r,shapeName:n,geometry:o,backGeometry:l,castShadow:c,receiveShadow:d}),t[7]=l,t[8]=c,t[9]=o,t[10]=r,t[11]=d,t[12]=n,t[13]=e):e=t[13],e}});function tk(e){let t,r,n,o,l=(0,a.c)(9),{color:s,label:u}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsx)("boxGeometry",{args:[10,10,10]}),l[0]=t):t=l[0],l[1]!==s?(r=(0,i.jsx)("meshStandardMaterial",{color:s,wireframe:!0}),l[1]=s,l[2]=r):r=l[2],l[3]!==s||l[4]!==u?(n=u?(0,i.jsx)(e9.FloatingLabel,{color:s,children:u}):null,l[3]=s,l[4]=u,l[5]=n):n=l[5],l[6]!==r||l[7]!==n?(o=(0,i.jsxs)("mesh",{children:[t,r,n]}),l[6]=r,l[7]=n,l[8]=o):o=l[8],o}function tH(e){let t,r=(0,a.c)(4),{color:n,label:o}=e,{debugMode:l}=(0,S.useDebug)();return r[0]!==n||r[1]!==l||r[2]!==o?(t=l?(0,i.jsx)(tk,{color:n,label:o}):null,r[0]=n,r[1]=l,r[2]=o,r[3]=t):t=r[3],t}function tj(e){let t,r,n,l,s,u=(0,a.c)(13),{loadingColor:c,children:d}=e,f=void 0===c?"yellow":c,{object:m,shapeName:h}=tS();if(!h){let e,t=`${m._id}: `;return u[0]!==t?(e=(0,i.jsx)(tH,{color:"orange",label:t}),u[0]=t,u[1]=e):e=u[1],e}let p=`${m._id}: ${h}`;return u[2]!==p?(t=(0,i.jsx)(tH,{color:"red",label:p}),u[2]=p,u[3]=t):t=u[3],u[4]!==f?(r=(0,i.jsx)(tk,{color:f}),u[4]=f,u[5]=r):r=u[5],u[6]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)(tU,{}),u[6]=n):n=u[6],u[7]!==d||u[8]!==r?(l=(0,i.jsxs)(o.Suspense,{fallback:r,children:[n,d]}),u[7]=d,u[8]=r,u[9]=l):l=u[9],u[10]!==t||u[11]!==l?(s=(0,i.jsx)(q,{fallback:t,children:l}),u[10]=t,u[11]=l,u[12]=s):s=u[12],s}let tU=(0,o.memo)(function(){var e;let t,r,n,l,s,u,c,d,f=(0,a.c)(19),{object:m,shapeName:h,isOrganic:p}=tS(),{debugMode:A}=(0,S.useDebug)(),{nodes:g}=((d=(0,a.c)(2))[0]!==h?(c=(0,v.shapeToUrl)(h),d[0]=h,d[1]=c):c=d[1],e2(c));if(f[0]!==g){e:{let r,n=Object.values(g).filter(tN);if(n.length>0){let r;e=n[0].skeleton,r=new Set,e.bones.forEach((e,t)=>{e.name.match(/^Hulk/i)&&r.add(t)}),t=r;break e}f[2]===Symbol.for("react.memo_cache_sentinel")?(r=new Set,f[2]=r):r=f[2],t=r}f[0]=g,f[1]=t}else t=f[1];let B=t;f[3]!==B||f[4]!==p||f[5]!==g?(r=Object.entries(g).filter(tJ).map(e=>{let[,t]=e,r=function(e,t){if(0===t.size||!e.attributes.skinIndex)return e;let r=e.attributes.skinIndex,n=e.attributes.skinWeight,i=e.index,a=Array(r.count).fill(!1);for(let e=0;e.01&&t.has(o)){a[e]=!0;break}}if(i){let t=[],r=i.array;for(let e=0;e1){let t=0,r=0,n=0;for(let i of e)t+=a[3*i],r+=a[3*i+1],n+=a[3*i+2];let i=Math.sqrt(t*t+r*r+n*n);for(let o of(i>0&&(t/=i,r/=i,n/=i),e))a[3*o]=t,a[3*o+1]=r,a[3*o+2]=n}if(t.needsUpdate=!0,p){let e=(n=r.clone()).attributes.normal,t=e.array;for(let e=0;e{let{node:t,geometry:r,backGeometry:n}=e;return(0,i.jsx)(o.Suspense,{fallback:(0,i.jsx)("mesh",{geometry:r,children:(0,i.jsx)("meshStandardMaterial",{color:"gray",wireframe:!0})}),children:t.material?Array.isArray(t.material)?t.material.map((e,t)=>(0,i.jsx)(tO,{material:e,shapeName:h,geometry:r,backGeometry:n,castShadow:y,receiveShadow:y},t)):(0,i.jsx)(tO,{material:t.material,shapeName:h,geometry:r,backGeometry:n,castShadow:y,receiveShadow:y}):null},t.id)}),f[8]=y,f[9]=C,f[10]=h,f[11]=l):l=f[11],f[12]!==A||f[13]!==m||f[14]!==h?(s=A?(0,i.jsxs)(e9.FloatingLabel,{children:[m._id,": ",h]}):null,f[12]=A,f[13]=m,f[14]=h,f[15]=s):s=f[15],f[16]!==l||f[17]!==s?(u=(0,i.jsxs)("group",{rotation:n,children:[l,s]}),f[16]=l,f[17]=s,f[18]=u):u=f[18],u});function tN(e){return e.skeleton}function tJ(e){let[,t]=e;return t.material&&"Unassigned"!==t.material.name&&!t.name.match(/^Hulk/i)}var tK=e.i(6112);let tQ={1:"Storm",2:"Inferno"},tV=(0,o.createContext)(null);function tX(){let e=(0,o.useContext)(tV);if(!e)throw Error("useCameras must be used within CamerasProvider");return e}function tq({children:e}){let{camera:t}=(0,C.useThree)(),[r,n]=(0,o.useState)(-1),[a,l]=(0,o.useState)({}),[s,c]=(0,o.useState)(()=>({initialized:!1,position:null,quarternion:null})),d=(0,o.useCallback)(e=>{l(t=>({...t,[e.id]:e}))},[]),f=(0,o.useCallback)(e=>{l(t=>{let{[e.id]:r,...n}=t;return n})},[]),m=Object.keys(a).length,h=(0,o.useCallback)(e=>{if(e>=0&&e{h(m?(r+1)%m:-1)},[m,r,h]);(0,o.useEffect)(()=>{let e=()=>{let e=window.location.hash;if(e.startsWith("#c")){let[t,r]=e.slice(2).split("~"),n=t.split(",").map(e=>parseFloat(e)),i=r.split(",").map(e=>parseFloat(e));c({initialized:!0,position:new u.Vector3(...n),quarternion:new u.Quaternion(...i)})}else c({initialized:!0,position:null,quarternion:null})};return window.addEventListener("hashchange",e),e(),()=>{window.removeEventListener("hashchange",e)}},[]),(0,o.useEffect)(()=>{s.initialized&&s.position&&(t.position.copy(s.position),s.quarternion&&t.quaternion.copy(s.quarternion))},[t,s]),(0,o.useEffect)(()=>{s.initialized&&!s.position&&m>0&&-1===r&&h(0)},[m,h,r,s]);let A=(0,o.useMemo)(()=>({registerCamera:d,unregisterCamera:f,nextCamera:p,setCameraIndex:h,cameraCount:m}),[d,f,p,h,m]);return 0===m&&-1!==r&&n(-1),(0,i.jsx)(tV.Provider,{value:A,children:e})}let tW=(0,o.createContext)(null),tY=tW.Provider,tz=(0,o.lazy)(()=>e.A(61921).then(e=>({default:e.AudioEmitter}))),tZ={AudioEmitter:function(e){let t,r=(0,a.c)(3),{audioEnabled:n}=(0,S.useSettings)();return r[0]!==n||r[1]!==e?(t=n?(0,i.jsx)(tz,{...e}):null,r[0]=n,r[1]=e,r[2]=t):t=r[2],t},Camera:function(e){let t,r,n,i,l,s=(0,a.c)(14),{object:c}=e,{registerCamera:d,unregisterCamera:f}=tX(),m=(0,o.useId)();s[0]!==c?(t=(0,y.getProperty)(c,"dataBlock"),s[0]=c,s[1]=t):t=s[1];let h=t;s[2]!==c?(r=(0,y.getPosition)(c),s[2]=c,s[3]=r):r=s[3];let p=r;s[4]!==c?(n=(0,y.getRotation)(c),s[4]=c,s[5]=n):n=s[5];let A=n;return s[6]!==h||s[7]!==m||s[8]!==p||s[9]!==A||s[10]!==d||s[11]!==f?(i=()=>{if("Observer"===h){let e={id:m,position:new u.Vector3(...p),rotation:A};return d(e),()=>{f(e)}}},l=[m,h,d,f,p,A],s[6]=h,s[7]=m,s[8]=p,s[9]=A,s[10]=d,s[11]=f,s[12]=i,s[13]=l):(i=s[12],l=s[13]),(0,o.useEffect)(i,l),null},ForceFieldBare:(0,o.lazy)(()=>e.A(25147).then(e=>({default:e.ForceFieldBare}))),InteriorInstance:tr,Item:function(e){let t,r,n,o,l,s,u,c,d,f=(0,a.c)(23),{object:m}=e,h=J();f[0]!==m?(t=(0,y.getProperty)(m,"dataBlock")??"",f[0]=m,f[1]=t):t=f[1];let p=t,A=(0,tK.useDatablock)(p);f[2]!==m?(r=(0,y.getPosition)(m),f[2]=m,f[3]=r):r=f[3];let g=r;f[4]!==m?(n=(0,y.getScale)(m),f[4]=m,f[5]=n):n=f[5];let v=n;f[6]!==m?(o=(0,y.getRotation)(m),f[6]=m,f[7]=o):o=f[7];let B=o;f[8]!==A?(l=(0,y.getProperty)(A,"shapeFile"),f[8]=A,f[9]=l):l=f[9];let C=l;C||console.error(` missing shape for datablock: ${p}`);let b=p?.toLowerCase()==="flag",x=h?.team??null,E=x&&x>0?tQ[x]:null,M=b&&E?`${E} Flag`:null;return f[10]!==M?(s=M?(0,i.jsx)(e9.FloatingLabel,{opacity:.6,children:M}):null,f[10]=M,f[11]=s):s=f[11],f[12]!==s?(u=(0,i.jsx)(tj,{loadingColor:"pink",children:s}),f[12]=s,f[13]=u):u=f[13],f[14]!==g||f[15]!==B||f[16]!==v||f[17]!==u?(c=(0,i.jsx)("group",{position:g,quaternion:B,scale:v,children:u}),f[14]=g,f[15]=B,f[16]=v,f[17]=u,f[18]=c):c=f[18],f[19]!==m||f[20]!==C||f[21]!==c?(d=(0,i.jsx)(tF,{type:"Item",object:m,shapeName:C,children:c}),f[19]=m,f[20]=C,f[21]=c,f[22]=d):d=f[22],d},SimGroup:function(e){let t,r,n,o,l=(0,a.c)(17),{object:s}=e,u=J(),c=null,d=!1;if(u&&u.hasTeams){if(d=!0,null!=u.team)c=u.team;else if(s._name){let e;if(l[0]!==s._name){let t;l[2]===Symbol.for("react.memo_cache_sentinel")?(t=/^team(\d+)$/i,l[2]=t):t=l[2],e=s._name.match(t),l[0]=s._name,l[1]=e}else e=l[1];let t=e;t&&(c=parseInt(t[1],10))}}else if(s._name){let e;l[3]!==s._name?(e=s._name.toLowerCase(),l[3]=s._name,l[4]=e):e=l[4],d="teams"===e}l[5]!==d||l[6]!==s||l[7]!==u||l[8]!==c?(t={object:s,parent:u,hasTeams:d,team:c},l[5]=d,l[6]=s,l[7]=u,l[8]=c,l[9]=t):t=l[9];let f=t;return l[10]!==s._children?(r=s._children??[],l[10]=s._children,l[11]=r):r=l[11],l[12]!==r?(n=r.map(K),l[12]=r,l[13]=n):n=l[13],l[14]!==f||l[15]!==n?(o=(0,i.jsx)(N.Provider,{value:f,children:n}),l[14]=f,l[15]=n,l[16]=o):o=l[16],o},Sky:function({object:e}){let{fogEnabled:t,highQualityFog:r}=(0,S.useSettings)(),n=(0,y.getProperty)(e,"materialList"),a=(0,o.useMemo)(()=>th((0,y.getProperty)(e,"SkySolidColor")),[e]),l=(0,y.getInt)(e,"useSkyTextures")??1,s=(0,o.useMemo)(()=>(function(e,t=!0){let r=(0,y.getFloat)(e,"fogDistance")??0,n=(0,y.getFloat)(e,"visibleDistance")??1e3,i=(0,y.getFloat)(e,"high_fogDistance"),a=(0,y.getFloat)(e,"high_visibleDistance"),o=t&&null!=i&&i>0?i:r,l=t&&null!=a&&a>0?a:n,s=function(e){if(!e)return new u.Color(.5,.5,.5);let[t,r,n]=e.split(" ").map(e=>parseFloat(e));return new u.Color().setRGB(t,r,n).convertSRGBToLinear()}((0,y.getProperty)(e,"fogColor")),c=[];for(let t=1;t<=3;t++){let r=function(e,t=1){if(!e)return null;let r=e.split(" ").map(e=>parseFloat(e));if(r.length<3)return null;let[n,i,a]=r;return n<=0||a<=i?null:{visibleDistance:n,minHeight:i,maxHeight:a,percentage:Math.max(0,Math.min(1,t))}}((0,y.getProperty)(e,`fogVolume${t}`),1);r&&c.push(r)}let d=c.reduce((e,t)=>Math.max(e,t.maxHeight),0);return{fogDistance:o,visibleDistance:l,fogColor:s,fogVolumes:c,fogLine:d,enabled:l>o}})(e,r),[e,r]),c=(0,o.useMemo)(()=>th((0,y.getProperty)(e,"fogColor")),[e]),d=a||c,f=s.enabled&&t,m=s.fogColor,{scene:h,gl:p}=(0,C.useThree)();(0,o.useEffect)(()=>{if(f){let e=m.clone();h.background=e,p.setClearColor(e)}else if(d){let e=d[0].clone();h.background=e,p.setClearColor(e)}else h.background=null;return()=>{h.background=null}},[h,p,f,m,d]);let A=a?.[1];return(0,i.jsxs)(i.Fragment,{children:[n&&l?(0,i.jsx)(o.Suspense,{fallback:null,children:(0,i.jsx)(tA,{materialList:n,fogColor:f?m:void 0,fogState:f?s:void 0},n)}):A?(0,i.jsx)(tg,{skyColor:A,fogColor:f?m:void 0,fogState:f?s:void 0}):null,(0,i.jsx)(o.Suspense,{children:(0,i.jsx)(td,{object:e})}),s.enabled?(0,i.jsx)(tB,{fogState:s,enabled:t}):null]})},StaticShape:function(e){let t,r,n,o,l,s,u,c,d=(0,a.c)(19),{object:f}=e;d[0]!==f?(t=(0,y.getProperty)(f,"dataBlock")??"",d[0]=f,d[1]=t):t=d[1];let m=t,h=(0,tK.useDatablock)(m);d[2]!==f?(r=(0,y.getPosition)(f),d[2]=f,d[3]=r):r=d[3];let p=r;d[4]!==f?(n=(0,y.getRotation)(f),d[4]=f,d[5]=n):n=d[5];let A=n;d[6]!==f?(o=(0,y.getScale)(f),d[6]=f,d[7]=o):o=d[7];let g=o;d[8]!==h?(l=(0,y.getProperty)(h,"shapeFile"),d[8]=h,d[9]=l):l=d[9];let v=l;return v||console.error(` missing shape for datablock: ${m}`),d[10]===Symbol.for("react.memo_cache_sentinel")?(s=(0,i.jsx)(tj,{}),d[10]=s):s=d[10],d[11]!==p||d[12]!==A||d[13]!==g?(u=(0,i.jsx)("group",{position:p,quaternion:A,scale:g,children:s}),d[11]=p,d[12]=A,d[13]=g,d[14]=u):u=d[14],d[15]!==f||d[16]!==v||d[17]!==u?(c=(0,i.jsx)(tF,{type:"StaticShape",object:f,shapeName:v,children:u}),d[15]=f,d[16]=v,d[17]=u,d[18]=c):c=d[18],c},Sun:function(e){let t,r,n,l,s,c,d,f,m,h,p=(0,a.c)(25),{object:A}=e;p[0]!==A?(t=((0,y.getProperty)(A,"direction")??"0.57735 0.57735 -0.57735").split(" ").map(tb),p[0]=A,p[1]=t):t=p[1];let[g,v,B]=t,C=Math.sqrt(g*g+B*B+v*v),b=g/C,x=B/C,M=v/C;p[2]!==b||p[3]!==x||p[4]!==M?(r=new u.Vector3(b,x,M),p[2]=b,p[3]=x,p[4]=M,p[5]=r):r=p[5];let S=r,F=-(5e3*S.x),T=-(5e3*S.y),R=-(5e3*S.z);p[6]!==F||p[7]!==T||p[8]!==R?(n=new u.Vector3(F,T,R),p[6]=F,p[7]=T,p[8]=R,p[9]=n):n=p[9];let w=n;if(p[10]!==A){let[e,t,r]=((0,y.getProperty)(A,"color")??"0.7 0.7 0.7 1").split(" ").map(ty);l=new u.Color(e,t,r),p[10]=A,p[11]=l}else l=p[11];let D=l;if(p[12]!==A){let[e,t,r]=((0,y.getProperty)(A,"ambient")??"0.5 0.5 0.5 1").split(" ").map(tC);s=new u.Color(e,t,r),p[12]=A,p[13]=s}else s=p[13];let I=s,G=S.y<0;return p[14]!==G?(c=()=>{E.value=G},d=[G],p[14]=G,p[15]=c,p[16]=d):(c=p[15],d=p[16]),(0,o.useEffect)(c,d),p[17]!==D||p[18]!==w?(f=(0,i.jsx)("directionalLight",{position:w,color:D,intensity:1,castShadow:!0,"shadow-mapSize-width":8192,"shadow-mapSize-height":8192,"shadow-camera-left":-4096,"shadow-camera-right":4096,"shadow-camera-top":4096,"shadow-camera-bottom":-4096,"shadow-camera-near":100,"shadow-camera-far":12e3,"shadow-bias":-1e-5,"shadow-normalBias":.4,"shadow-radius":2}),p[17]=D,p[18]=w,p[19]=f):f=p[19],p[20]!==I?(m=(0,i.jsx)("ambientLight",{color:I,intensity:1}),p[20]=I,p[21]=m):m=p[21],p[22]!==f||p[23]!==m?(h=(0,i.jsxs)(i.Fragment,{children:[f,m]}),p[22]=f,p[23]=m,p[24]=h):h=p[24],h},TerrainBlock:P,TSStatic:function(e){let t,r,n,o,l,s,u,c=(0,a.c)(17),{object:d}=e;c[0]!==d?(t=(0,y.getProperty)(d,"shapeName"),c[0]=d,c[1]=t):t=c[1];let f=t;c[2]!==d?(r=(0,y.getPosition)(d),c[2]=d,c[3]=r):r=c[3];let m=r;c[4]!==d?(n=(0,y.getRotation)(d),c[4]=d,c[5]=n):n=c[5];let h=n;c[6]!==d?(o=(0,y.getScale)(d),c[6]=d,c[7]=o):o=c[7];let p=o;return f||console.error(" missing shapeName for object",d),c[8]===Symbol.for("react.memo_cache_sentinel")?(l=(0,i.jsx)(tj,{}),c[8]=l):l=c[8],c[9]!==m||c[10]!==h||c[11]!==p?(s=(0,i.jsx)("group",{position:m,quaternion:h,scale:p,children:l}),c[9]=m,c[10]=h,c[11]=p,c[12]=s):s=c[12],c[13]!==d||c[14]!==f||c[15]!==s?(u=(0,i.jsx)(tF,{type:"TSStatic",object:d,shapeName:f,children:s}),c[13]=d,c[14]=f,c[15]=s,c[16]=u):u=c[16],u},Turret:function(e){let t,r,n,o,l,s,u,c,d,f,m,h=(0,a.c)(27),{object:p}=e;h[0]!==p?(t=(0,y.getProperty)(p,"dataBlock")??"",h[0]=p,h[1]=t):t=h[1];let A=t;h[2]!==p?(r=(0,y.getProperty)(p,"initialBarrel"),h[2]=p,h[3]=r):r=h[3];let g=r,v=(0,tK.useDatablock)(A),B=(0,tK.useDatablock)(g);h[4]!==p?(n=(0,y.getPosition)(p),h[4]=p,h[5]=n):n=h[5];let C=n;h[6]!==p?(o=(0,y.getRotation)(p),h[6]=p,h[7]=o):o=h[7];let b=o;h[8]!==p?(l=(0,y.getScale)(p),h[8]=p,h[9]=l):l=h[9];let x=l;h[10]!==v?(s=(0,y.getProperty)(v,"shapeFile"),h[10]=v,h[11]=s):s=h[11];let E=s;h[12]!==B?(u=(0,y.getProperty)(B,"shapeFile"),h[12]=B,h[13]=u):u=h[13];let M=u;return E||console.error(` missing shape for datablock: ${A}`),g&&!M&&console.error(` missing shape for barrel datablock: ${g}`),h[14]===Symbol.for("react.memo_cache_sentinel")?(c=(0,i.jsx)(tj,{}),h[14]=c):c=h[14],h[15]!==M||h[16]!==p?(d=M?(0,i.jsx)(tF,{type:"Turret",object:p,shapeName:M,children:(0,i.jsx)("group",{position:[0,1.5,0],children:(0,i.jsx)(tj,{})})}):null,h[15]=M,h[16]=p,h[17]=d):d=h[17],h[18]!==C||h[19]!==b||h[20]!==x||h[21]!==d?(f=(0,i.jsxs)("group",{position:C,quaternion:b,scale:x,children:[c,d]}),h[18]=C,h[19]=b,h[20]=x,h[21]=d,h[22]=f):f=h[22],h[23]!==p||h[24]!==E||h[25]!==f?(m=(0,i.jsx)(tF,{type:"Turret",object:p,shapeName:E,children:f}),h[23]=p,h[24]=E,h[25]=f,h[26]=m):m=h[26],m},WaterBlock:(0,o.lazy)(()=>e.A(18599).then(e=>({default:e.WaterBlock}))),WayPoint:function(e){let t,r,n,o=(0,a.c)(7),{object:l}=e;o[0]!==l?(t=(0,y.getPosition)(l),o[0]=l,o[1]=t):t=o[1];let s=t;o[2]!==l?(r=(0,y.getProperty)(l,"name"),o[2]=l,o[3]=r):r=o[3];let u=r;return o[4]!==u||o[5]!==s?(n=u?(0,i.jsx)(e9.FloatingLabel,{position:s,opacity:.6,children:u}):null,o[4]=u,o[5]=s,o[6]=n):n=o[6],n}};function t$(e){let t,r,n,l=(0,a.c)(9),{object:s}=e,{missionType:u}=(0,o.useContext)(tW);l[0]!==s?(t=new Set(((0,y.getProperty)(s,"missionTypesList")??"").toLowerCase().split(/s+/).filter(Boolean)),l[0]=s,l[1]=t):t=l[1];let c=t;l[2]!==u||l[3]!==c?(r=!c.size||c.has(u.toLowerCase()),l[2]=u,l[3]=c,l[4]=r):r=l[4];let d=r,f=tZ[s._className];return l[5]!==f||l[6]!==s||l[7]!==d?(n=d&&f?(0,i.jsx)(o.Suspense,{children:(0,i.jsx)(f,{object:s})}):null,l[5]=f,l[6]=s,l[7]=d,l[8]=n):n=l[8],n}var t0=e.i(86608),t1=e.i(38433),t2=e.i(33870),t9=e.i(91996);let t3=async e=>{let t;try{t=(0,v.getUrlForPath)(e)}catch(t){return console.warn(`Script not in manifest: ${e} (${t})`),null}try{let r=await fetch(t);if(!r.ok)return console.error(`Script fetch failed: ${e} (${r.status})`),null;return await r.text()}catch(t){return console.error(`Script fetch error: ${e}`),console.error(t),null}},t5=(0,t2.createScriptCache)(),t8={findFiles:e=>{let t=(0,g.default)(e,{nocase:!0});return(0,t9.getResourceList)().filter(e=>t(e)).map(e=>{let[,t]=(0,t9.getSourceAndPath)(e);return t})},isFile:e=>null!=(0,t9.getResourceMap)()[(0,t9.getResourceKey)(e)]},t6=(0,o.memo)(function(e){let t,r,n,l,s,u,c,d,f=(0,a.c)(17),{name:m,missionType:h,onLoadingChange:p}=e,{data:g}=((d=(0,a.c)(2))[0]!==m?(c={queryKey:["parsedMission",m],queryFn:()=>(0,v.loadMission)(m)},d[0]=m,d[1]=c):c=d[1],(0,A.useQuery)(c)),{missionGroup:B,runtime:C,progress:y}=function(e,t,r){let n,i,l,s=(0,a.c)(6);s[0]===Symbol.for("react.memo_cache_sentinel")?(n={missionGroup:void 0,runtime:void 0,progress:0},s[0]=n):n=s[0];let[u,c]=(0,o.useState)(n);return s[1]!==e||s[2]!==t||s[3]!==r?(i=()=>{if(!r)return;let n=new AbortController,i=(0,t1.createProgressTracker)(),a=()=>{c(e=>({...e,progress:i.progress}))};i.on("update",a);let{runtime:o}=(0,t0.runServer)({missionName:e,missionType:t,runtimeOptions:{loadScript:t3,fileSystem:t8,cache:t5,signal:n.signal,progress:i,ignoreScripts:["scripts/admin.cs","scripts/ai.cs","scripts/aiBotProfiles.cs","scripts/aiBountyGame.cs","scripts/aiChat.cs","scripts/aiCnH.cs","scripts/aiCTF.cs","scripts/aiDeathMatch.cs","scripts/aiDebug.cs","scripts/aiDefaultTasks.cs","scripts/aiDnD.cs","scripts/aiHumanTasks.cs","scripts/aiHunters.cs","scripts/aiInventory.cs","scripts/aiObjectiveBuilder.cs","scripts/aiObjectives.cs","scripts/aiRabbit.cs","scripts/aiSiege.cs","scripts/aiTDM.cs","scripts/aiTeamHunters.cs","scripts/deathMessages.cs","scripts/graphBuild.cs","scripts/navGraph.cs","scripts/serverTasks.cs","scripts/spdialog.cs"]},onMissionLoadDone:()=>{c({missionGroup:l.getObjectByName("MissionGroup"),runtime:l,progress:1})}}),l=o;return()=>{i.off("update",a),n.abort(),l.destroy()}},l=[e,t,r],s[1]=e,s[2]=t,s[3]=r,s[4]=i,s[5]=l):(i=s[4],l=s[5]),(0,o.useEffect)(i,l),u}(m,h,g),b=!g||!B||!C;f[0]!==B||f[1]!==h||f[2]!==g?(t={metadata:g,missionType:h,missionGroup:B},f[0]=B,f[1]=h,f[2]=g,f[3]=t):t=f[3];let x=t;return(f[4]!==b||f[5]!==p||f[6]!==y?(r=()=>{p?.(b,y)},n=[b,y,p],f[4]=b,f[5]=p,f[6]=y,f[7]=r,f[8]=n):(r=f[7],n=f[8]),(0,o.useEffect)(r,n),b)?null:(f[9]!==B?(l=(0,i.jsx)(t$,{object:B}),f[9]=B,f[10]=l):l=f[10],f[11]!==C||f[12]!==l?(s=(0,i.jsx)(G.RuntimeProvider,{runtime:C,children:l}),f[11]=C,f[12]=l,f[13]=s):s=f[13],f[14]!==x||f[15]!==s?(u=(0,i.jsx)(tY,{value:x,children:s}),f[14]=x,f[15]=s,f[16]=u):u=f[16],u)});var t4=e.i(19273),t7=e.i(86491),re=e.i(40143),rt=e.i(15823),rr=class extends rt.Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){let n=t.queryKey,i=t.queryHash??(0,t4.hashQueryKeyByOptions)(n,t),a=this.get(i);return a||(a=new t7.Query({client:e,queryKey:n,queryHash:i,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){re.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,t4.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,t4.matchQuery)(e,t)):t}notify(e){re.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){re.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){re.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},rn=e.i(88587),ri=e.i(36553),ra=class extends rn.Removable{#t;#r;#n;#i;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#r=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#r.includes(e)||(this.#r.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#r=this.#r.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#r.length||("pending"===this.state.status?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#a({type:"continue"})},r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=(0,ri.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#a({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#a({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let n="pending"===this.state.status,i=!this.#i.canStart();try{if(n)t();else{this.#a({type:"pending",variables:e,isPaused:i}),await this.#n.config.onMutate?.(e,this,r);let t=await this.options.onMutate?.(e,r);t!==this.state.context&&this.#a({type:"pending",context:t,variables:e,isPaused:i})}let a=await this.#i.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,r),await this.options.onSuccess?.(a,e,this.state.context,r),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(a,null,e,this.state.context,r),this.#a({type:"success",data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,r)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,r)}catch(e){Promise.reject(e)}throw this.#a({type:"error",error:t}),t}finally{this.#n.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),re.notifyManager.batch(()=>{this.#r.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}},ro=rt,rl=class extends ro.Subscribable{constructor(e={}){super(),this.config=e,this.#o=new Set,this.#l=new Map,this.#s=0}#o;#l;#s;build(e,t,r){let n=new ra({client:e,mutationCache:this,mutationId:++this.#s,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){this.#o.add(e);let t=rs(e);if("string"==typeof t){let r=this.#l.get(t);r?r.push(e):this.#l.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#o.delete(e)){let t=rs(e);if("string"==typeof t){let r=this.#l.get(t);if(r)if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#l.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=rs(e);if("string"!=typeof t)return!0;{let r=this.#l.get(t),n=r?.find(e=>"pending"===e.state.status);return!n||n===e}}runNext(e){let t=rs(e);if("string"!=typeof t)return Promise.resolve();{let r=this.#l.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){re.notifyManager.batch(()=>{this.#o.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#o.clear(),this.#l.clear()})}getAll(){return Array.from(this.#o)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,t4.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,t4.matchMutation)(e,t))}notify(e){re.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return re.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(t4.noop))))}};function rs(e){return e.options.scope?.id}var ru=e.i(75555),rc=e.i(14448);function rd(e){return{onFetch:(t,r)=>{let n=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],l={pages:[],pageParams:[]},s=0,u=async()=>{let r=!1,u=(0,t4.ensureQueryFn)(t.options,t.fetchOptions),c=async(e,n,i)=>{let a;if(r)return Promise.reject();if(null==n&&e.pages.length)return Promise.resolve(e);let o=(a={client:t.client,queryKey:t.queryKey,pageParam:n,direction:i?"backward":"forward",meta:t.options.meta},(0,t4.addConsumeAwareSignal)(a,()=>t.signal,()=>r=!0),a),l=await u(o),{maxPages:s}=t.options,c=i?t4.addToStart:t4.addToEnd;return{pages:c(e.pages,l,s),pageParams:c(e.pageParams,n,s)}};if(i&&a.length){let e="backward"===i,t={pages:a,pageParams:o},r=(e?function(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}:rf)(n,t);l=await c(t,r,e)}else{let t=e??a.length;do{let e=0===s?o[0]??n.initialPageParam:rf(n,l);if(s>0&&null==e)break;l=await c(l,e),s++}while(st.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=u}}}function rf(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}var rm=class{#u;#n;#c;#d;#f;#m;#h;#p;constructor(e={}){this.#u=e.queryCache||new rr,this.#n=e.mutationCache||new rl,this.#c=e.defaultOptions||{},this.#d=new Map,this.#f=new Map,this.#m=0}mount(){this.#m++,1===this.#m&&(this.#h=ru.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#u.onFocus())}),this.#p=rc.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#u.onOnline())}))}unmount(){this.#m--,0===this.#m&&(this.#h?.(),this.#h=void 0,this.#p?.(),this.#p=void 0)}isFetching(e){return this.#u.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#u.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#u.build(this,t),n=r.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime((0,t4.resolveStaleTime)(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#u.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let n=this.defaultQueryOptions({queryKey:e}),i=this.#u.get(n.queryHash),a=i?.state.data,o=(0,t4.functionalUpdate)(t,a);if(void 0!==o)return this.#u.build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return re.notifyManager.batch(()=>this.#u.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#u.get(t.queryHash)?.state}removeQueries(e){let t=this.#u;re.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#u;return re.notifyManager.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let r={revert:!0,...t};return Promise.all(re.notifyManager.batch(()=>this.#u.findAll(e).map(e=>e.cancel(r)))).then(t4.noop).catch(t4.noop)}invalidateQueries(e,t={}){return re.notifyManager.batch(()=>(this.#u.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(re.notifyManager.batch(()=>this.#u.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(t4.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(t4.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#u.build(this,t);return r.isStaleByTime((0,t4.resolveStaleTime)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(t4.noop).catch(t4.noop)}fetchInfiniteQuery(e){return e.behavior=rd(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(t4.noop).catch(t4.noop)}ensureInfiniteQueryData(e){return e.behavior=rd(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return rc.onlineManager.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#u}getMutationCache(){return this.#n}getDefaultOptions(){return this.#c}setDefaultOptions(e){this.#c=e}setQueryDefaults(e,t){this.#d.set((0,t4.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#d.values()],r={};return t.forEach(t=>{(0,t4.partialMatchKey)(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#f.set((0,t4.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#f.values()],r={};return t.forEach(t=>{(0,t4.partialMatchKey)(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#c.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,t4.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===t4.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#c.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#u.clear(),this.#n.clear()}},rh=e.i(12598),rp=e.i(8155);let rA=e=>{let t=(0,rp.createStore)(e),r=e=>(function(e,t=e=>e){let r=o.default.useSyncExternalStore(e.subscribe,o.default.useCallback(()=>t(e.getState()),[e,t]),o.default.useCallback(()=>t(e.getInitialState()),[e,t]));return o.default.useDebugValue(r),r})(t,e);return Object.assign(r,t),r},rg=o.createContext(null);function rv({map:e,children:t,onChange:r,domElement:n}){let i=e.map(e=>e.name+e.keys).join("-"),a=o.useMemo(()=>{let t,r;return t=()=>e.reduce((e,t)=>({...e,[t.name]:!1}),{}),(r=(e,r,n)=>{let i=n.subscribe;return n.subscribe=(e,t,r)=>{let a=e;if(t){let i=(null==r?void 0:r.equalityFn)||Object.is,o=e(n.getState());a=r=>{let n=e(r);if(!i(o,n)){let e=o;t(o=n,e)}},(null==r?void 0:r.fireImmediately)&&t(o,o)}return i(a)},t(e,r,n)})?rA(r):rA},[i]),l=o.useMemo(()=>[a.subscribe,a.getState,a],[i]),s=a.setState;return o.useEffect(()=>{let t=e.map(({name:e,keys:t,up:n})=>({keys:t,up:n,fn:t=>{s({[e]:t}),r&&r(e,t,l[1]())}})).reduce((e,{keys:t,fn:r,up:n=!0})=>(t.forEach(t=>e[t]={fn:r,pressed:!1,up:n}),e),{}),i=({key:e,code:r})=>{let n=t[e]||t[r];if(!n)return;let{fn:i,pressed:a,up:o}=n;n.pressed=!0,(o||!a)&&i(!0)},a=({key:e,code:r})=>{let n=t[e]||t[r];if(!n)return;let{fn:i,up:a}=n;n.pressed=!1,a&&i(!1)},o=n||window;return o.addEventListener("keydown",i,{passive:!0}),o.addEventListener("keyup",a,{passive:!0}),()=>{o.removeEventListener("keydown",i),o.removeEventListener("keyup",a)}},[n,i]),o.createElement(rg.Provider,{value:l,children:t})}function rB(e){let[t,r,n]=o.useContext(rg);return e?n(e):[t,r]}var rC=Object.defineProperty;class ry{constructor(){((e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?rC(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r})(this,"_listeners")}addEventListener(e,t){void 0===this._listeners&&(this._listeners={});let r=this._listeners;void 0===r[e]&&(r[e]=[]),-1===r[e].indexOf(t)&&r[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;let r=this._listeners;return void 0!==r[e]&&-1!==r[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;let r=this._listeners[e];if(void 0!==r){let e=r.indexOf(t);-1!==e&&r.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;let t=this._listeners[e.type];if(void 0!==t){e.target=this;let r=t.slice(0);for(let t=0,n=r.length;t{let n;return(n="symbol"!=typeof t?t+"":t)in e?rb(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,r};let rE=new u.Euler(0,0,0,"YXZ"),rM=new u.Vector3,rS={type:"change"},rF={type:"lock"},rT={type:"unlock"},rR=Math.PI/2;class rw extends ry{constructor(e,t){super(),rx(this,"camera"),rx(this,"domElement"),rx(this,"isLocked"),rx(this,"minPolarAngle"),rx(this,"maxPolarAngle"),rx(this,"pointerSpeed"),rx(this,"onMouseMove",e=>{this.domElement&&!1!==this.isLocked&&(rE.setFromQuaternion(this.camera.quaternion),rE.y-=.002*e.movementX*this.pointerSpeed,rE.x-=.002*e.movementY*this.pointerSpeed,rE.x=Math.max(rR-this.maxPolarAngle,Math.min(rR-this.minPolarAngle,rE.x)),this.camera.quaternion.setFromEuler(rE),this.dispatchEvent(rS))}),rx(this,"onPointerlockChange",()=>{this.domElement&&(this.domElement.ownerDocument.pointerLockElement===this.domElement?(this.dispatchEvent(rF),this.isLocked=!0):(this.dispatchEvent(rT),this.isLocked=!1))}),rx(this,"onPointerlockError",()=>{console.error("THREE.PointerLockControls: Unable to use Pointer Lock API")}),rx(this,"connect",e=>{this.domElement=e||this.domElement,this.domElement&&(this.domElement.ownerDocument.addEventListener("mousemove",this.onMouseMove),this.domElement.ownerDocument.addEventListener("pointerlockchange",this.onPointerlockChange),this.domElement.ownerDocument.addEventListener("pointerlockerror",this.onPointerlockError))}),rx(this,"disconnect",()=>{this.domElement&&(this.domElement.ownerDocument.removeEventListener("mousemove",this.onMouseMove),this.domElement.ownerDocument.removeEventListener("pointerlockchange",this.onPointerlockChange),this.domElement.ownerDocument.removeEventListener("pointerlockerror",this.onPointerlockError))}),rx(this,"dispose",()=>{this.disconnect()}),rx(this,"getObject",()=>this.camera),rx(this,"direction",new u.Vector3(0,0,-1)),rx(this,"getDirection",e=>e.copy(this.direction).applyQuaternion(this.camera.quaternion)),rx(this,"moveForward",e=>{rM.setFromMatrixColumn(this.camera.matrix,0),rM.crossVectors(this.camera.up,rM),this.camera.position.addScaledVector(rM,e)}),rx(this,"moveRight",e=>{rM.setFromMatrixColumn(this.camera.matrix,0),this.camera.position.addScaledVector(rM,e)}),rx(this,"lock",()=>{this.domElement&&this.domElement.requestPointerLock()}),rx(this,"unlock",()=>{this.domElement&&this.domElement.ownerDocument.exitPointerLock()}),this.camera=e,this.domElement=t,this.isLocked=!1,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.pointerSpeed=1,t&&this.connect(t)}}(n={}).forward="forward",n.backward="backward",n.left="left",n.right="right",n.up="up",n.down="down",n.lookUp="lookUp",n.lookDown="lookDown",n.lookLeft="lookLeft",n.lookRight="lookRight",n.camera1="camera1",n.camera2="camera2",n.camera3="camera3",n.camera4="camera4",n.camera5="camera5",n.camera6="camera6",n.camera7="camera7",n.camera8="camera8",n.camera9="camera9";let rD=Math.PI/2-.01;function rI(){let e,t,r,n,i,l,s,c,d,f,m,h,p,A=(0,a.c)(26),{speedMultiplier:g,setSpeedMultiplier:v}=(0,S.useControls)(),[y,b]=rB(),{camera:x,gl:E}=(0,C.useThree)(),{nextCamera:M,setCameraIndex:F,cameraCount:T}=tX(),R=(0,o.useRef)(null);A[0]===Symbol.for("react.memo_cache_sentinel")?(e=new u.Vector3,A[0]=e):e=A[0];let w=(0,o.useRef)(e);A[1]===Symbol.for("react.memo_cache_sentinel")?(t=new u.Vector3,A[1]=t):t=A[1];let D=(0,o.useRef)(t);A[2]===Symbol.for("react.memo_cache_sentinel")?(r=new u.Vector3,A[2]=r):r=A[2];let I=(0,o.useRef)(r);A[3]===Symbol.for("react.memo_cache_sentinel")?(n=new u.Euler(0,0,0,"YXZ"),A[3]=n):n=A[3];let G=(0,o.useRef)(n);return A[4]!==x||A[5]!==E.domElement?(i=()=>{let e=new rw(x,E.domElement);return R.current=e,()=>{e.dispose()}},l=[x,E.domElement],A[4]=x,A[5]=E.domElement,A[6]=i,A[7]=l):(i=A[6],l=A[7]),(0,o.useEffect)(i,l),A[8]!==x||A[9]!==E.domElement||A[10]!==M?(s=()=>{let e=E.domElement,t=new u.Euler(0,0,0,"YXZ"),r=!1,n=!1,i=0,a=0,o=t=>{R.current?.isLocked||t.target===e&&(r=!0,n=!1,i=t.clientX,a=t.clientY)},l=e=>{!r||!n&&3>Math.abs(e.clientX-i)&&3>Math.abs(e.clientY-a)||(n=!0,t.setFromQuaternion(x.quaternion,"YXZ"),t.y=t.y-.003*e.movementX,t.x=t.x-.003*e.movementY,t.x=Math.max(-rD,Math.min(rD,t.x)),x.quaternion.setFromEuler(t))},s=()=>{r=!1},c=t=>{let r=R.current;!r||r.isLocked?M():t.target!==e||n||r.lock()};return e.addEventListener("mousedown",o),document.addEventListener("mousemove",l),document.addEventListener("mouseup",s),document.addEventListener("click",c),()=>{e.removeEventListener("mousedown",o),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s),document.removeEventListener("click",c)}},c=[x,E.domElement,M],A[8]=x,A[9]=E.domElement,A[10]=M,A[11]=s,A[12]=c):(s=A[11],c=A[12]),(0,o.useEffect)(s,c),A[13]!==T||A[14]!==F||A[15]!==y?(d=()=>{let e=["camera1","camera2","camera3","camera4","camera5","camera6","camera7","camera8","camera9"];return y(t=>{for(let r=0;r{let e=e=>{e.preventDefault();let t=e.deltaY>0?-1:1,r=Math.max(.05,Math.min(.5,Math.abs(.01*e.deltaY)))*t;v(e=>Math.max(.1,Math.min(5,Math.round((e+r)*20)/20)))},t=E.domElement;return t.addEventListener("wheel",e,{passive:!1}),()=>{t.removeEventListener("wheel",e)}},h=[E.domElement,v],A[18]=E.domElement,A[19]=v,A[20]=m,A[21]=h):(m=A[20],h=A[21]),(0,o.useEffect)(m,h),A[22]!==x||A[23]!==b||A[24]!==g?(p=(e,t)=>{let{forward:r,backward:n,left:i,right:a,up:o,down:l,lookUp:s,lookDown:u,lookLeft:c,lookRight:d}=b();if((s||u||c||d)&&(G.current.setFromQuaternion(x.quaternion,"YXZ"),c&&(G.current.y=G.current.y+ +t),d&&(G.current.y=G.current.y-t),s&&(G.current.x=G.current.x+ +t),u&&(G.current.x=G.current.x-t),G.current.x=Math.max(-rD,Math.min(rD,G.current.x)),x.quaternion.setFromEuler(G.current)),!r&&!n&&!i&&!a&&!o&&!l)return;let f=80*g;x.getWorldDirection(w.current),w.current.normalize(),D.current.crossVectors(x.up,w.current).normalize(),I.current.set(0,0,0),r&&I.current.add(w.current),n&&I.current.sub(w.current),i&&I.current.add(D.current),a&&I.current.sub(D.current),o&&(I.current.y=I.current.y+1),l&&(I.current.y=I.current.y-1),I.current.lengthSq()>0&&(I.current.normalize().multiplyScalar(f*t),x.position.add(I.current))},A[22]=x,A[23]=b,A[24]=g,A[25]=p):p=A[25],(0,B.useFrame)(p),null}let rG=[{name:"forward",keys:["KeyW"]},{name:"backward",keys:["KeyS"]},{name:"left",keys:["KeyA"]},{name:"right",keys:["KeyD"]},{name:"up",keys:["Space"]},{name:"down",keys:["ShiftLeft","ShiftRight"]},{name:"lookUp",keys:["ArrowUp"]},{name:"lookDown",keys:["ArrowDown"]},{name:"lookLeft",keys:["ArrowLeft"]},{name:"lookRight",keys:["ArrowRight"]},{name:"camera1",keys:["Digit1"]},{name:"camera2",keys:["Digit2"]},{name:"camera3",keys:["Digit3"]},{name:"camera4",keys:["Digit4"]},{name:"camera5",keys:["Digit5"]},{name:"camera6",keys:["Digit6"]},{name:"camera7",keys:["Digit7"]},{name:"camera8",keys:["Digit8"]},{name:"camera9",keys:["Digit9"]}];function rL(){let e,t,r=(0,a.c)(2);return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],r[0]=e):e=r[0],(0,o.useEffect)(r_,e),r[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsx)(rI,{}),r[1]=t):t=r[1],t}function r_(){return window.addEventListener("keydown",rP,{capture:!0}),window.addEventListener("keyup",rP,{capture:!0}),()=>{window.removeEventListener("keydown",rP,{capture:!0}),window.removeEventListener("keyup",rP,{capture:!0})}}function rP(e){(e.metaKey||e.ctrlKey)&&"k"===e.key||e.metaKey&&e.stopImmediatePropagation()}function rO(){let e,t,r,n,o,l,s,u,c,d,f,m,h,p,A,g,v,B,C,y,b,x,E,M,S=(0,a.c)(51),F=rB(rX),T=rB(rV),R=rB(rQ),w=rB(rK),D=rB(rJ),I=rB(rN),G=rB(rU),L=rB(rj),_=rB(rH),P=rB(rk);return S[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)("div",{className:"KeyboardOverlay-spacer"}),S[0]=e):e=S[0],S[1]!==F?(t=(0,i.jsx)("div",{className:"KeyboardOverlay-key","data-pressed":F,children:"W"}),S[1]=F,S[2]=t):t=S[2],S[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,i.jsx)("div",{className:"KeyboardOverlay-spacer"}),S[3]=r):r=S[3],S[4]!==t?(n=(0,i.jsxs)("div",{className:"KeyboardOverlay-row",children:[e,t,r]}),S[4]=t,S[5]=n):n=S[5],S[6]!==R?(o=(0,i.jsx)("div",{className:"KeyboardOverlay-key","data-pressed":R,children:"A"}),S[6]=R,S[7]=o):o=S[7],S[8]!==T?(l=(0,i.jsx)("div",{className:"KeyboardOverlay-key","data-pressed":T,children:"S"}),S[8]=T,S[9]=l):l=S[9],S[10]!==w?(s=(0,i.jsx)("div",{className:"KeyboardOverlay-key","data-pressed":w,children:"D"}),S[10]=w,S[11]=s):s=S[11],S[12]!==o||S[13]!==l||S[14]!==s?(u=(0,i.jsxs)("div",{className:"KeyboardOverlay-row",children:[o,l,s]}),S[12]=o,S[13]=l,S[14]=s,S[15]=u):u=S[15],S[16]!==n||S[17]!==u?(c=(0,i.jsxs)("div",{className:"KeyboardOverlay-column",children:[n,u]}),S[16]=n,S[17]=u,S[18]=c):c=S[18],S[19]===Symbol.for("react.memo_cache_sentinel")?(d=(0,i.jsx)("span",{className:"KeyboardOverlay-arrow",children:"↑"}),S[19]=d):d=S[19],S[20]!==D?(f=(0,i.jsx)("div",{className:"KeyboardOverlay-row",children:(0,i.jsxs)("div",{className:"KeyboardOverlay-key","data-pressed":D,children:[d," Space"]})}),S[20]=D,S[21]=f):f=S[21],S[22]===Symbol.for("react.memo_cache_sentinel")?(m=(0,i.jsx)("span",{className:"KeyboardOverlay-arrow",children:"↓"}),S[22]=m):m=S[22],S[23]!==I?(h=(0,i.jsx)("div",{className:"KeyboardOverlay-row",children:(0,i.jsxs)("div",{className:"KeyboardOverlay-key","data-pressed":I,children:[m," Shift"]})}),S[23]=I,S[24]=h):h=S[24],S[25]!==f||S[26]!==h?(p=(0,i.jsxs)("div",{className:"KeyboardOverlay-column",children:[f,h]}),S[25]=f,S[26]=h,S[27]=p):p=S[27],S[28]===Symbol.for("react.memo_cache_sentinel")?(A=(0,i.jsx)("div",{className:"KeyboardOverlay-spacer"}),S[28]=A):A=S[28],S[29]!==G?(g=(0,i.jsx)("div",{className:"KeyboardOverlay-key","data-pressed":G,children:"↑"}),S[29]=G,S[30]=g):g=S[30],S[31]===Symbol.for("react.memo_cache_sentinel")?(v=(0,i.jsx)("div",{className:"KeyboardOverlay-spacer"}),S[31]=v):v=S[31],S[32]!==g?(B=(0,i.jsxs)("div",{className:"KeyboardOverlay-row",children:[A,g,v]}),S[32]=g,S[33]=B):B=S[33],S[34]!==_?(C=(0,i.jsx)("div",{className:"KeyboardOverlay-key","data-pressed":_,children:"←"}),S[34]=_,S[35]=C):C=S[35],S[36]!==L?(y=(0,i.jsx)("div",{className:"KeyboardOverlay-key","data-pressed":L,children:"↓"}),S[36]=L,S[37]=y):y=S[37],S[38]!==P?(b=(0,i.jsx)("div",{className:"KeyboardOverlay-key","data-pressed":P,children:"→"}),S[38]=P,S[39]=b):b=S[39],S[40]!==C||S[41]!==y||S[42]!==b?(x=(0,i.jsxs)("div",{className:"KeyboardOverlay-row",children:[C,y,b]}),S[40]=C,S[41]=y,S[42]=b,S[43]=x):x=S[43],S[44]!==B||S[45]!==x?(E=(0,i.jsxs)("div",{className:"KeyboardOverlay-column",children:[B,x]}),S[44]=B,S[45]=x,S[46]=E):E=S[46],S[47]!==p||S[48]!==E||S[49]!==c?(M=(0,i.jsxs)("div",{className:"KeyboardOverlay",children:[c,p,E]}),S[47]=p,S[48]=E,S[49]=c,S[50]=M):M=S[50],M}function rk(e){return e.lookRight}function rH(e){return e.lookLeft}function rj(e){return e.lookDown}function rU(e){return e.lookUp}function rN(e){return e.down}function rJ(e){return e.up}function rK(e){return e.right}function rQ(e){return e.left}function rV(e){return e.backward}function rX(e){return e.forward}let rq=Math.PI/2-.01;function rW({joystickState:t,joystickZone:r,lookJoystickState:n,lookJoystickZone:a}){let{touchMode:l}=(0,S.useControls)();(0,o.useEffect)(()=>{let n=r.current;if(!n)return;let i=null,a=!1;return e.A(84968).then(e=>{a||((i=e.default.create({zone:n,mode:"static",position:{left:"70px",bottom:"70px"},size:120,restOpacity:.9})).on("move",(e,r)=>{t.current.angle=r.angle.radian,t.current.force=Math.min(1,r.force)}),i.on("end",()=>{t.current.force=0}))}),()=>{a=!0,i?.destroy()}},[t,r,l]),(0,o.useEffect)(()=>{if("dualStick"!==l)return;let t=a.current;if(!t)return;let r=null,i=!1;return e.A(84968).then(e=>{i||((r=e.default.create({zone:t,mode:"static",position:{right:"70px",bottom:"70px"},size:120,restOpacity:.9})).on("move",(e,t)=>{n.current.angle=t.angle.radian,n.current.force=Math.min(1,t.force)}),r.on("end",()=>{n.current.force=0}))}),()=>{i=!0,r?.destroy()}},[l,n,a]);let s=()=>{document.activeElement instanceof HTMLElement&&document.activeElement.blur()};return"dualStick"===l?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{ref:r,className:"TouchJoystick TouchJoystick--left",onContextMenu:e=>e.preventDefault(),onTouchStart:s}),(0,i.jsx)("div",{ref:a,className:"TouchJoystick TouchJoystick--right",onContextMenu:e=>e.preventDefault(),onTouchStart:s})]}):(0,i.jsx)("div",{ref:r,className:"TouchJoystick",onContextMenu:e=>e.preventDefault(),onTouchStart:s})}function rY(e){let t,r,n,i,l,s,c,d,f,m,h=(0,a.c)(25),{joystickState:p,joystickZone:A,lookJoystickState:g}=e,{speedMultiplier:v,touchMode:y}=(0,S.useControls)(),{camera:b,gl:x}=(0,C.useThree)();h[0]===Symbol.for("react.memo_cache_sentinel")?(t=new u.Euler(0,0,0,"YXZ"),h[0]=t):t=h[0];let E=(0,o.useRef)(t),M=(0,o.useRef)(null);h[1]===Symbol.for("react.memo_cache_sentinel")?(r={x:0,y:0},h[1]=r):r=h[1];let F=(0,o.useRef)(r);h[2]===Symbol.for("react.memo_cache_sentinel")?(n=new u.Vector3,h[2]=n):n=h[2];let T=(0,o.useRef)(n);h[3]===Symbol.for("react.memo_cache_sentinel")?(i=new u.Vector3,h[3]=i):i=h[3];let R=(0,o.useRef)(i);h[4]===Symbol.for("react.memo_cache_sentinel")?(l=new u.Vector3,h[4]=l):l=h[4];let w=(0,o.useRef)(l);return h[5]!==b.quaternion?(s=()=>{E.current.setFromQuaternion(b.quaternion,"YXZ")},h[5]=b.quaternion,h[6]=s):s=h[6],h[7]!==b?(c=[b],h[7]=b,h[8]=c):c=h[8],(0,o.useEffect)(s,c),h[9]!==b.quaternion||h[10]!==x.domElement||h[11]!==A||h[12]!==y?(d=()=>{if("moveLookStick"!==y)return;let e=x.domElement,t=e=>{let t=A.current;if(!t)return!1;let r=t.getBoundingClientRect();return e.clientX>=r.left&&e.clientX<=r.right&&e.clientY>=r.top&&e.clientY<=r.bottom},r=e=>{if(null===M.current)for(let r=0;r{if(null!==M.current)for(let t=0;t{for(let t=0;t{e.removeEventListener("touchstart",r),e.removeEventListener("touchmove",n),e.removeEventListener("touchend",i),e.removeEventListener("touchcancel",i),M.current=null}},h[9]=b.quaternion,h[10]=x.domElement,h[11]=A,h[12]=y,h[13]=d):d=h[13],h[14]!==b||h[15]!==x.domElement||h[16]!==A||h[17]!==y?(f=[b,x.domElement,A,y],h[14]=b,h[15]=x.domElement,h[16]=A,h[17]=y,h[18]=f):f=h[18],(0,o.useEffect)(d,f),h[19]!==b||h[20]!==p.current||h[21]!==g||h[22]!==v||h[23]!==y?(m=(e,t)=>{let{force:r,angle:n}=p.current;if("dualStick"===y){let e=g.current;if(e.force>.15){let r=(e.force-.15)/.85,n=Math.cos(e.angle),i=Math.sin(e.angle);E.current.setFromQuaternion(b.quaternion,"YXZ"),E.current.y=E.current.y-n*r*2.5*t,E.current.x=E.current.x+i*r*2.5*t,E.current.x=Math.max(-rq,Math.min(rq,E.current.x)),b.quaternion.setFromEuler(E.current)}if(r>.08){let e=80*v*((r-.08)/.92),i=Math.cos(n),a=Math.sin(n);b.getWorldDirection(T.current),T.current.normalize(),R.current.crossVectors(b.up,T.current).normalize(),w.current.set(0,0,0).addScaledVector(T.current,a).addScaledVector(R.current,-i),w.current.lengthSq()>0&&(w.current.normalize().multiplyScalar(e*t),b.position.add(w.current))}}else if("moveLookStick"===y&&r>0){let e=80*v*.5;if(b.getWorldDirection(T.current),T.current.normalize(),w.current.copy(T.current).multiplyScalar(e*t),b.position.add(w.current),r>=.15){let e=Math.cos(n),i=Math.sin(n),a=(r-.15)/.85;E.current.setFromQuaternion(b.quaternion,"YXZ"),E.current.y=E.current.y-e*a*1.25*t,E.current.x=E.current.x+i*a*1.25*t,E.current.x=Math.max(-rq,Math.min(rq,E.current.x)),b.quaternion.setFromEuler(E.current)}}},h[19]=b,h[20]=p.current,h[21]=g,h[22]=v,h[23]=y,h[24]=m):m=h[24],(0,B.useFrame)(m),null}var rz="undefined"!=typeof window&&!!(null==(r=window.document)?void 0:r.createElement);function rZ(e){return e?"self"in e?e.document:e.ownerDocument||document:document}function r$(e){return e?"self"in e?e.self:rZ(e).defaultView||window:self}function r0(e,t=!1){let{activeElement:r}=rZ(e);if(!(null==r?void 0:r.nodeName))return null;if(r2(r)&&r.contentDocument)return r0(r.contentDocument.body,t);if(t){let e=r.getAttribute("aria-activedescendant");if(e){let t=rZ(r).getElementById(e);if(t)return t}}return r}function r1(e,t){return e===t||e.contains(t)}function r2(e){return"IFRAME"===e.tagName}function r9(e){let t=e.tagName.toLowerCase();return"button"===t||"input"===t&&!!e.type&&-1!==r3.indexOf(e.type)}var r3=["button","color","file","image","reset","submit"];function r5(e){return"function"==typeof e.checkVisibility?e.checkVisibility():e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}function r8(e){try{let t=e instanceof HTMLInputElement&&null!==e.selectionStart,r="TEXTAREA"===e.tagName;return t||r||!1}catch(e){return!1}}function r6(e){return e.isContentEditable||r8(e)}function r4(e){let t=0,r=0;if(r8(e))t=e.selectionStart||0,r=e.selectionEnd||0;else if(e.isContentEditable){let n=rZ(e).getSelection();if((null==n?void 0:n.rangeCount)&&n.anchorNode&&r1(e,n.anchorNode)&&n.focusNode&&r1(e,n.focusNode)){let i=n.getRangeAt(0),a=i.cloneRange();a.selectNodeContents(e),a.setEnd(i.startContainer,i.startOffset),t=a.toString().length,a.setEnd(i.endContainer,i.endOffset),r=a.toString().length}}return{start:t,end:r}}function r7(e,t){let r=null==e?void 0:e.getAttribute("role");return r&&-1!==["dialog","menu","listbox","tree","grid"].indexOf(r)?r:t}function ne(e){if(!e)return null;let t=e=>"auto"===e||"scroll"===e;if(e.clientHeight&&e.scrollHeight>e.clientHeight){let{overflowY:r}=getComputedStyle(e);if(t(r))return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){let{overflowX:r}=getComputedStyle(e);if(t(r))return e}return ne(e.parentElement)||document.scrollingElement||document.body}function nt(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}function nr(e,t){return t&&e.item(t)||null}var nn=Symbol("FOCUS_SILENTLY");function ni(e,t,r){if(!t||t===r)return!1;let n=e.item(t.id);return!!n&&(!r||n.element!==r)}function na(){}function no(e,t){return"function"==typeof Object.hasOwn?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function nl(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}function ns(e){return e}function nu(e,t){if(!e){if("string"!=typeof t)throw Error("Invariant failed");throw Error(t)}}function nc(e,...t){let r="function"==typeof e?e(...t):e;return null!=r&&!r}function nd(e){return e.disabled||!0===e["aria-disabled"]||"true"===e["aria-disabled"]}function nf(e){let t={};for(let r in e)void 0!==e[r]&&(t[r]=e[r]);return t}function nm(...e){for(let t of e)if(void 0!==t)return t}function nh(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function np(){return rz&&!!navigator.maxTouchPoints}function nA(){return!!rz&&/mac|iphone|ipad|ipod/i.test(navigator.platform)}function ng(){return rz&&nA()&&/apple/i.test(navigator.vendor)}function nv(e){return!!(e.currentTarget&&!r1(e.currentTarget,e.target))}function nB(e){return e.target===e.currentTarget}function nC(e,t){let r=new FocusEvent("blur",t),n=e.dispatchEvent(r),i={...t,bubbles:!0};return e.dispatchEvent(new FocusEvent("focusout",i)),n}function ny(e,t){let r=new MouseEvent("click",t);return e.dispatchEvent(r)}function nb(e,t){let r=t||e.currentTarget,n=e.relatedTarget;return!n||!r1(r,n)}function nx(e,t,r,n){let i=(e=>{if(n){let t=setTimeout(e,n);return()=>clearTimeout(t)}let t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)})(()=>{e.removeEventListener(t,a,!0),r()}),a=()=>{i(),r()};return e.addEventListener(t,a,{once:!0,capture:!0}),i}function nE(e,t,r,n=window){let i=[];try{for(let a of(n.document.addEventListener(e,t,r),Array.from(n.frames)))i.push(nE(e,t,r,a))}catch(e){}return()=>{try{n.document.removeEventListener(e,t,r)}catch(e){}for(let e of i)e()}}var nM={...o},nS=nM.useId;nM.useDeferredValue;var nF=nM.useInsertionEffect,nT=rz?o.useLayoutEffect:o.useEffect;function nR(e){let t=(0,o.useRef)(()=>{throw Error("Cannot call an event handler while rendering.")});return nF?nF(()=>{t.current=e}):t.current=e,(0,o.useCallback)((...e)=>{var r;return null==(r=t.current)?void 0:r.call(t,...e)},[])}function nw(...e){return(0,o.useMemo)(()=>{if(e.some(Boolean))return t=>{for(let r of e)nh(r,t)}},e)}function nD(e){if(nS){let t=nS();return e||t}let[t,r]=(0,o.useState)(e);return nT(()=>{if(e||t)return;let n=Math.random().toString(36).slice(2,8);r(`id-${n}`)},[e,t]),e||t}function nI(e,t){let r=(0,o.useRef)(!1);(0,o.useEffect)(()=>{if(r.current)return e();r.current=!0},t),(0,o.useEffect)(()=>()=>{r.current=!1},[])}function nG(){return(0,o.useReducer)(()=>[],[])}function nL(e){return nR("function"==typeof e?e:()=>e)}function n_(e,t,r=[]){let n=(0,o.useCallback)(r=>(e.wrapElement&&(r=e.wrapElement(r)),t(r)),[...r,e.wrapElement]);return{...e,wrapElement:n}}function nP(e=!1,t){let[r,n]=(0,o.useState)(null);return{portalRef:nw(n,t),portalNode:r,domReady:!e||r}}var nO=!1,nk=!1,nH=0,nj=0;function nU(e){let t,r;t=e.movementX||e.screenX-nH,r=e.movementY||e.screenY-nj,nH=e.screenX,nj=e.screenY,(t||r||0)&&(nk=!0)}function nN(){nk=!1}function nJ(e){let t=o.forwardRef((t,r)=>e({...t,ref:r}));return t.displayName=e.displayName||e.name,t}function nK(e,t){return o.memo(e,t)}function nQ(e,t){let r,{wrapElement:n,render:a,...l}=t,s=nw(t.ref,a&&(0,o.isValidElement)(a)&&("ref"in a.props||"ref"in a)?({...a.props}).ref||a.ref:null);if(o.isValidElement(a)){let e={...a.props,ref:s};r=o.cloneElement(a,function(e,t){let r={...e};for(let n in t){if(!no(t,n))continue;if("className"===n){let n="className";r[n]=e[n]?`${e[n]} ${t[n]}`:t[n];continue}if("style"===n){let n="style";r[n]=e[n]?{...e[n],...t[n]}:t[n];continue}let i=t[n];if("function"==typeof i&&n.startsWith("on")){let t=e[n];if("function"==typeof t){r[n]=(...e)=>{i(...e),t(...e)};continue}}r[n]=i}return r}(l,e))}else r=a?a(l):(0,i.jsx)(e,{...l});return n?n(r):r}function nV(e){let t=(t={})=>e(t);return t.displayName=e.name,t}function nX(e=[],t=[]){let r=o.createContext(void 0),n=o.createContext(void 0),a=()=>o.useContext(r),l=t=>e.reduceRight((e,r)=>(0,i.jsx)(r,{...t,children:e}),(0,i.jsx)(r.Provider,{...t}));return{context:r,scopedContext:n,useContext:a,useScopedContext:(e=!1)=>{let t=o.useContext(n),r=a();return e?t:t||r},useProviderContext:()=>{let e=o.useContext(n),t=a();if(!e||e!==t)return t},ContextProvider:l,ScopedContextProvider:e=>(0,i.jsx)(l,{...e,children:t.reduceRight((t,r)=>(0,i.jsx)(r,{...e,children:t}),(0,i.jsx)(n.Provider,{...e}))})}}var nq=nX(),nW=nq.useContext;nq.useScopedContext,nq.useProviderContext;var nY=nX([nq.ContextProvider],[nq.ScopedContextProvider]),nz=nY.useContext;nY.useScopedContext;var nZ=nY.useProviderContext,n$=nY.ContextProvider,n0=nY.ScopedContextProvider,n1=(0,o.createContext)(void 0),n2=(0,o.createContext)(void 0),n9=(0,o.createContext)(!0),n3="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function n5(e){return!(!e.matches(n3)||!r5(e)||e.closest("[inert]"))}function n8(e){if(!n5(e)||0>Number.parseInt(e.getAttribute("tabindex")||"0",10))return!1;if(!("form"in e)||!e.form||e.checked||"radio"!==e.type)return!0;let t=e.form.elements.namedItem(e.name);if(!t||!("length"in t))return!0;let r=r0(e);return!r||r===e||!("form"in r)||r.form!==e.form||r.name!==e.name}function n6(e,t){let r=Array.from(e.querySelectorAll(n3));t&&r.unshift(e);let n=r.filter(n5);return n.forEach((e,t)=>{if(r2(e)&&e.contentDocument){let r=e.contentDocument.body;n.splice(t,1,...n6(r))}}),n}function n4(e,t,r){let n=Array.from(e.querySelectorAll(n3)),i=n.filter(n8);return(t&&n8(e)&&i.unshift(e),i.forEach((e,t)=>{if(r2(e)&&e.contentDocument){let n=n4(e.contentDocument.body,!1,r);i.splice(t,1,...n)}}),!i.length&&r)?n:i}function n7(e,t){var r;let n,i,a,o;return r=document.body,n=r0(r),a=(i=n6(r,!1)).indexOf(n),(o=i.slice(a+1)).find(n8)||(e?i.find(n8):null)||(t?o[0]:null)||null}function ie(e,t){var r;let n,i,a,o;return r=document.body,n=r0(r),a=(i=n6(r,!1).reverse()).indexOf(n),(o=i.slice(a+1)).find(n8)||(e?i.find(n8):null)||(t?o[0]:null)||null}function it(e){let t=r0(e);if(!t)return!1;if(t===e)return!0;let r=t.getAttribute("aria-activedescendant");return!!r&&r===e.id}function ir(e){let t=r0(e);if(!t)return!1;if(r1(e,t))return!0;let r=t.getAttribute("aria-activedescendant");return!!r&&"id"in e&&(r===e.id||!!e.querySelector(`#${CSS.escape(r)}`))}function ii(e){!ir(e)&&n5(e)&&e.focus()}var ia=ng(),io=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"],il=Symbol("safariFocusAncestor");function is(e){return"input"===e.tagName.toLowerCase()&&!!e.type&&("radio"===e.type||"checkbox"===e.type)}function iu(e,t){return nR(r=>{null==e||e(r),!r.defaultPrevented&&t&&(r.stopPropagation(),r.preventDefault())})}var ic=!1,id=!0;function im(e){let t=e.target;t&&"hasAttribute"in t&&!t.hasAttribute("data-focus-visible")&&(id=!1)}function ih(e){e.metaKey||e.ctrlKey||e.altKey||(id=!0)}var ip=nV(function({focusable:e=!0,accessibleWhenDisabled:t,autoFocus:r,onFocusVisible:n,...i}){var a,l,s,u,c;let d=(0,o.useRef)(null);(0,o.useEffect)(()=>{!e||ic||(nE("mousedown",im,!0),nE("keydown",ih,!0),ic=!0)},[e]),ia&&(0,o.useEffect)(()=>{if(!e)return;let t=d.current;if(!t||!is(t))return;let r="labels"in t?t.labels:null;if(!r)return;let n=()=>queueMicrotask(()=>t.focus());for(let e of r)e.addEventListener("mouseup",n);return()=>{for(let e of r)e.removeEventListener("mouseup",n)}},[e]);let f=e&&nd(i),m=!!f&&!t,[h,p]=(0,o.useState)(!1);(0,o.useEffect)(()=>{e&&m&&h&&p(!1)},[e,m,h]),(0,o.useEffect)(()=>{if(!e||!h)return;let t=d.current;if(!t||"undefined"==typeof IntersectionObserver)return;let r=new IntersectionObserver(()=>{n5(t)||p(!1)});return r.observe(t),()=>r.disconnect()},[e,h]);let A=iu(i.onKeyPressCapture,f),g=iu(i.onMouseDownCapture,f),v=iu(i.onClickCapture,f),B=i.onMouseDown,C=nR(t=>{if(null==B||B(t),t.defaultPrevented||!e)return;let r=t.currentTarget;if(!ia||nv(t)||!r9(r)&&!is(r))return;let n=!1,i=()=>{n=!0};r.addEventListener("focusin",i,{capture:!0,once:!0});let a=function(e){for(;e&&!n5(e);)e=e.closest(n3);return e||null}(r.parentElement);a&&(a[il]=!0),nx(r,"mouseup",()=>{r.removeEventListener("focusin",i,!0),a&&(a[il]=!1),n||ii(r)})}),y=(t,r)=>{if(r&&(t.currentTarget=r),!e)return;let i=t.currentTarget;i&&it(i)&&(null==n||n(t),t.defaultPrevented||(i.dataset.focusVisible="true",p(!0)))},b=i.onKeyDownCapture,x=nR(t=>{if(null==b||b(t),t.defaultPrevented||!e||h||t.metaKey||t.altKey||t.ctrlKey||!nB(t))return;let r=t.currentTarget;nx(r,"focusout",()=>y(t,r))}),E=i.onFocusCapture,M=nR(t=>{if(null==E||E(t),t.defaultPrevented||!e)return;if(!nB(t))return void p(!1);let r=t.currentTarget;id||function(e){let{tagName:t,readOnly:r,type:n}=e;return"TEXTAREA"===t&&!r||"SELECT"===t&&!r||("INPUT"!==t||r?!!e.isContentEditable||"combobox"===e.getAttribute("role")&&!!e.dataset.name:io.includes(n))}(t.target)?nx(t.target,"focusout",()=>y(t,r)):p(!1)}),S=i.onBlur,F=nR(t=>{null==S||S(t),!e||nb(t)&&(t.currentTarget.removeAttribute("data-focus-visible"),p(!1))}),T=(0,o.useContext)(n9),R=nR(t=>{e&&r&&t&&T&&queueMicrotask(()=>{it(t)||n5(t)&&t.focus()})}),w=function(e,t){let r=e=>{if("string"==typeof e)return e},[n,i]=(0,o.useState)(()=>r(void 0));return nT(()=>{let t=e&&"current"in e?e.current:e;i((null==t?void 0:t.tagName.toLowerCase())||r(void 0))},[e,void 0]),n}(d),D=e&&(!w||"button"===w||"summary"===w||"input"===w||"select"===w||"textarea"===w||"a"===w),I=e&&(!w||"button"===w||"input"===w||"select"===w||"textarea"===w),G=i.style,L=(0,o.useMemo)(()=>m?{pointerEvents:"none",...G}:G,[m,G]);return i={"data-focus-visible":e&&h||void 0,"data-autofocus":r||void 0,"aria-disabled":f||void 0,...i,ref:nw(d,R,i.ref),style:L,tabIndex:(a=e,l=m,s=D,u=I,c=i.tabIndex,a?l?s&&!u?-1:void 0:s?c:c||0:c),disabled:!!I&&!!m||void 0,contentEditable:f?void 0:i.contentEditable,onKeyPressCapture:A,onClickCapture:v,onMouseDownCapture:g,onMouseDown:C,onKeyDownCapture:x,onFocusCapture:M,onBlur:F},nf(i)});function iA(e){let t=[];for(let r of e)t.push(...r);return t}function ig(e){return e.slice().reverse()}function iv(e,t,r){return nR(n=>{var i;let a,o;if(null==t||t(n),n.defaultPrevented||n.isPropagationStopped()||!nB(n)||"Shift"===n.key||"Control"===n.key||"Alt"===n.key||"Meta"===n.key||(!(a=n.target)||r8(a))&&1===n.key.length&&!n.ctrlKey&&!n.metaKey)return;let l=e.getState(),s=null==(i=nr(e,l.activeId))?void 0:i.element;if(!s)return;let{view:u,...c}=n;s!==(null==r?void 0:r.current)&&s.focus(),o=new KeyboardEvent(n.type,c),s.dispatchEvent(o)||n.preventDefault(),n.currentTarget.contains(s)&&n.stopPropagation()})}nJ(function(e){return nQ("div",ip(e))});var iB=nV(function({store:e,composite:t=!0,focusOnMove:r=t,moveOnKeyPress:n=!0,...a}){let l=nZ();nu(e=e||l,!1);let s=(0,o.useRef)(null),u=(0,o.useRef)(null),c=function(e){let[t,r]=(0,o.useState)(!1),n=(0,o.useCallback)(()=>r(!0),[]),i=e.useState(t=>nr(e,t.activeId));return(0,o.useEffect)(()=>{let e=null==i?void 0:i.element;!t||e&&(r(!1),e.focus({preventScroll:!0}))},[i,t]),n}(e),d=e.useState("moves"),[,f]=function(e){let[t,r]=(0,o.useState)(null);return nT(()=>{if(null==t||!e)return;let r=null;return e(e=>(r=e,t)),()=>{e(r)}},[t,e]),[t,r]}(t?e.setBaseElement:null);(0,o.useEffect)(()=>{var n;if(!e||!d||!t||!r)return;let{activeId:i}=e.getState(),a=null==(n=nr(e,i))?void 0:n.element;a&&("scrollIntoView"in a?(a.focus({preventScroll:!0}),a.scrollIntoView({block:"nearest",inline:"nearest",...void 0})):a.focus())},[e,d,t,r]),nT(()=>{if(!e||!d||!t)return;let{baseElement:r,activeId:n}=e.getState();if(null!==n||!r)return;let i=u.current;u.current=null,i&&nC(i,{relatedTarget:r}),it(r)||r.focus()},[e,d,t]);let m=e.useState("activeId"),h=e.useState("virtualFocus");nT(()=>{var r;if(!e||!t||!h)return;let n=u.current;if(u.current=null,!n)return;let i=(null==(r=nr(e,m))?void 0:r.element)||r0(n);i!==n&&nC(n,{relatedTarget:i})},[e,m,h,t]);let p=iv(e,a.onKeyDownCapture,u),A=iv(e,a.onKeyUpCapture,u),g=a.onFocusCapture,v=nR(t=>{var r;let n;if(null==g||g(t),t.defaultPrevented||!e)return;let{virtualFocus:i}=e.getState();if(!i)return;let a=t.relatedTarget,o=(n=(r=t.currentTarget)[nn],delete r[nn],n);nB(t)&&o&&(t.stopPropagation(),u.current=a)}),B=a.onFocus,C=nR(r=>{if(null==B||B(r),r.defaultPrevented||!t||!e)return;let{relatedTarget:n}=r,{virtualFocus:i}=e.getState();i?nB(r)&&!ni(e,n)&&queueMicrotask(c):nB(r)&&e.setActiveId(null)}),y=a.onBlurCapture,b=nR(t=>{var r;if(null==y||y(t),t.defaultPrevented||!e)return;let{virtualFocus:n,activeId:i}=e.getState();if(!n)return;let a=null==(r=nr(e,i))?void 0:r.element,o=t.relatedTarget,l=ni(e,o),s=u.current;u.current=null,nB(t)&&l?(o===a?s&&s!==o&&nC(s,t):a?nC(a,t):s&&nC(s,t),t.stopPropagation()):!ni(e,t.target)&&a&&nC(a,t)}),x=a.onKeyDown,E=nL(n),M=nR(t=>{var r;if(null==x||x(t),t.nativeEvent.isComposing||t.defaultPrevented||!e||!nB(t))return;let{orientation:n,renderedItems:i,activeId:a}=e.getState(),o=nr(e,a);if(null==(r=null==o?void 0:o.element)?void 0:r.isConnected)return;let l="horizontal"!==n,s="vertical"!==n,u=i.some(e=>!!e.rowId);if(("ArrowLeft"===t.key||"ArrowRight"===t.key||"Home"===t.key||"End"===t.key)&&r8(t.currentTarget))return;let c={ArrowUp:(u||l)&&(()=>{if(u){let e=iA(ig(function(e){let t=[];for(let r of e){let e=t.find(e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===r.rowId});e?e.push(r):t.push([r])}return t}(i))).find(e=>!e.disabled);return null==e?void 0:e.id}return null==e?void 0:e.last()}),ArrowRight:(u||s)&&e.first,ArrowDown:(u||l)&&e.first,ArrowLeft:(u||s)&&e.last,Home:e.first,End:e.last,PageUp:e.first,PageDown:e.last}[t.key];if(c){let r=c();if(void 0!==r){if(!E(t))return;t.preventDefault(),e.move(r)}}});return a=n_(a,t=>(0,i.jsx)(n$,{value:e,children:t}),[e]),a={"aria-activedescendant":e.useState(r=>{var n;if(e&&t&&r.virtualFocus)return null==(n=nr(e,r.activeId))?void 0:n.id}),...a,ref:nw(s,f,a.ref),onKeyDownCapture:p,onKeyUpCapture:A,onFocusCapture:v,onFocus:C,onBlurCapture:b,onKeyDown:M},a=ip({focusable:e.useState(e=>t&&(e.virtualFocus||null===e.activeId)),...a})});nJ(function(e){return nQ("div",iB(e))});var iC=nX();iC.useContext,iC.useScopedContext;var iy=iC.useProviderContext,ib=nX([iC.ContextProvider],[iC.ScopedContextProvider]);ib.useContext,ib.useScopedContext;var ix=ib.useProviderContext,iE=ib.ContextProvider,iM=ib.ScopedContextProvider,iS=(0,o.createContext)(void 0),iF=(0,o.createContext)(void 0),iT=nX([iE],[iM]);iT.useContext,iT.useScopedContext;var iR=iT.useProviderContext,iw=iT.ContextProvider,iD=iT.ScopedContextProvider,iI=nV(function({store:e,...t}){let r=iR();return e=e||r,t={...t,ref:nw(null==e?void 0:e.setAnchorElement,t.ref)}});nJ(function(e){return nQ("div",iI(e))});var iG=(0,o.createContext)(void 0),iL=nX([iw,n$],[iD,n0]),i_=iL.useContext,iP=iL.useScopedContext,iO=iL.useProviderContext,ik=iL.ContextProvider,iH=iL.ScopedContextProvider,ij=(0,o.createContext)(void 0),iU=(0,o.createContext)(!1);function iN(e,t){let r=e.__unstableInternals;return nu(r,"Invalid store"),r[t]}function iJ(e,...t){let r=e,n=r,i=Symbol(),a=na,o=new Set,l=new Set,s=new Set,u=new Set,c=new Set,d=new WeakMap,f=new WeakMap,m=(e,t,r=u)=>(r.add(t),f.set(t,e),()=>{var e;null==(e=d.get(t))||e(),d.delete(t),f.delete(t),r.delete(t)}),h=(e,a,o=!1)=>{var s,m;if(!no(r,e))return;let h=(m=r[e],"function"==typeof a?a("function"==typeof m?m():m):a);if(h===r[e])return;if(!o)for(let r of t)null==(s=null==r?void 0:r.setState)||s.call(r,e,h);let p=r;r={...r,[e]:h};let A=Symbol();i=A,l.add(e);let g=(t,n,i)=>{var a;let o=f.get(t);(!o||o.some(t=>i?i.has(t):t===e))&&(null==(a=d.get(t))||a(),d.set(t,t(r,n)))};for(let e of u)g(e,p);queueMicrotask(()=>{if(i!==A)return;let e=r;for(let e of c)g(e,n,l);n=e,l.clear()})},p={getState:()=>r,setState:h,__unstableInternals:{setup:e=>(s.add(e),()=>s.delete(e)),init:()=>{let e=o.size,n=Symbol();o.add(n);let i=()=>{o.delete(n),o.size||a()};if(e)return i;let l=Object.keys(r).map(e=>nl(...t.map(t=>{var r;let n=null==(r=null==t?void 0:t.getState)?void 0:r.call(t);if(n&&no(n,e))return iX(t,[e],t=>{h(e,t[e],!0)})}))),u=[];for(let e of s)u.push(e());return a=nl(...l,...u,...t.map(iQ)),i},subscribe:(e,t)=>m(e,t),sync:(e,t)=>(d.set(t,t(r,r)),m(e,t)),batch:(e,t)=>(d.set(t,t(r,n)),m(e,t,c)),pick:e=>iJ(function(e,t){let r={};for(let n of t)no(e,n)&&(r[n]=e[n]);return r}(r,e),p),omit:e=>iJ(function(e,t){let r={...e};for(let e of t)no(r,e)&&delete r[e];return r}(r,e),p)}};return p}function iK(e,...t){if(e)return iN(e,"setup")(...t)}function iQ(e,...t){if(e)return iN(e,"init")(...t)}function iV(e,...t){if(e)return iN(e,"subscribe")(...t)}function iX(e,...t){if(e)return iN(e,"sync")(...t)}function iq(e,...t){if(e)return iN(e,"batch")(...t)}function iW(e,...t){if(e)return iN(e,"omit")(...t)}function iY(...e){var t;let r={};for(let n of e){let e=null==(t=null==n?void 0:n.getState)?void 0:t.call(n);e&&Object.assign(r,e)}let n=iJ(r,...e);return Object.assign({},...e,n)}function iz(e,t){}function iZ(e,t,r){if(!r)return!1;let n=e.find(e=>!e.disabled&&e.value);return(null==n?void 0:n.value)===t}function i$(e,t){return!!t&&null!=e&&(e=e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),t.length>e.length&&0===t.toLowerCase().indexOf(e.toLowerCase()))}var i0=nV(function({store:e,focusable:t=!0,autoSelect:r=!1,getAutoSelectId:n,setValueOnChange:i,showMinLength:a=0,showOnChange:l,showOnMouseDown:s,showOnClick:u=s,showOnKeyDown:c,showOnKeyPress:d=c,blurActiveItemOnClick:f,setValueOnClick:m=!0,moveOnKeyPress:h=!0,autoComplete:p="list",...A}){var g;let v,B=iO();nu(e=e||B,!1);let C=(0,o.useRef)(null),[y,b]=nG(),x=(0,o.useRef)(!1),E=(0,o.useRef)(!1),M=e.useState(e=>e.virtualFocus&&r),S="inline"===p||"both"===p,[F,T]=(0,o.useState)(S);g=[S],v=(0,o.useRef)(!1),nT(()=>{if(v.current)return(()=>{S&&T(!0)})();v.current=!0},g),nT(()=>()=>{v.current=!1},[]);let R=e.useState("value"),w=(0,o.useRef)();(0,o.useEffect)(()=>iX(e,["selectedValue","activeId"],(e,t)=>{w.current=t.selectedValue}),[]);let D=e.useState(e=>{var t;if(S&&F){if(e.activeValue&&Array.isArray(e.selectedValue)&&(e.selectedValue.includes(e.activeValue)||(null==(t=w.current)?void 0:t.includes(e.activeValue))))return;return e.activeValue}}),I=e.useState("renderedItems"),G=e.useState("open"),L=e.useState("contentElement"),_=(0,o.useMemo)(()=>{if(!S||!F)return R;if(iZ(I,D,M)){if(i$(R,D)){let e=(null==D?void 0:D.slice(R.length))||"";return R+e}return R}return D||R},[S,F,I,D,M,R]);(0,o.useEffect)(()=>{let e=C.current;if(!e)return;let t=()=>T(!0);return e.addEventListener("combobox-item-move",t),()=>{e.removeEventListener("combobox-item-move",t)}},[]),(0,o.useEffect)(()=>{if(!S||!F||!D||!iZ(I,D,M)||!i$(R,D))return;let e=na;return queueMicrotask(()=>{let t=C.current;if(!t)return;let{start:r,end:n}=r4(t),i=R.length,a=D.length;nt(t,i,a),e=()=>{if(!it(t))return;let{start:e,end:o}=r4(t);e!==i||o===a&&nt(t,r,n)}}),()=>e()},[y,S,F,D,I,M,R]);let P=(0,o.useRef)(null),O=nR(n),k=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(!G||!L)return;let t=ne(L);if(!t)return;P.current=t;let r=()=>{x.current=!1},n=()=>{if(!e||!x.current)return;let{activeId:t}=e.getState();null===t||t!==k.current&&(x.current=!1)},i={passive:!0,capture:!0};return t.addEventListener("wheel",r,i),t.addEventListener("touchmove",r,i),t.addEventListener("scroll",n,i),()=>{t.removeEventListener("wheel",r,!0),t.removeEventListener("touchmove",r,!0),t.removeEventListener("scroll",n,!0)}},[G,L,e]),nT(()=>{!R||E.current||(x.current=!0)},[R]),nT(()=>{"always"!==M&&G||(x.current=G)},[M,G]);let H=e.useState("resetValueOnSelect");nI(()=>{var t,r;let n=x.current;if(!e||!G||!n&&!H)return;let{baseElement:i,contentElement:a,activeId:o}=e.getState();if(!i||it(i)){if(null==a?void 0:a.hasAttribute("data-placing")){let e=new MutationObserver(b);return e.observe(a,{attributeFilter:["data-placing"]}),()=>e.disconnect()}if(M&&n){let r,n=O(I),i=void 0!==n?n:null!=(t=null==(r=I.find(e=>{var t;return!e.disabled&&(null==(t=e.element)?void 0:t.getAttribute("role"))!=="tab"}))?void 0:r.id)?t:e.first();k.current=i,e.move(null!=i?i:null)}else{let t=null==(r=e.item(o||e.first()))?void 0:r.element;t&&"scrollIntoView"in t&&t.scrollIntoView({block:"nearest",inline:"nearest"})}}},[e,G,y,R,M,H,O,I]),(0,o.useEffect)(()=>{if(!S)return;let t=C.current;if(!t)return;let r=[t,L].filter(e=>!!e),n=t=>{r.every(e=>nb(t,e))&&(null==e||e.setValue(_))};for(let e of r)e.addEventListener("focusout",n);return()=>{for(let e of r)e.removeEventListener("focusout",n)}},[S,L,e,_]);let j=e=>e.currentTarget.value.length>=a,U=A.onChange,N=nL(null!=l?l:j),J=nL(null!=i?i:!e.tag),K=nR(t=>{if(null==U||U(t),t.defaultPrevented||!e)return;let r=t.currentTarget,{value:n,selectionStart:i,selectionEnd:a}=r,o=t.nativeEvent;if(x.current=!0,"input"===o.type&&(o.isComposing&&(x.current=!1,E.current=!0),S)){let e="insertText"===o.inputType||"insertCompositionText"===o.inputType,t=i===n.length;T(e&&t)}if(J(t)){let t=n===e.getState().value;e.setValue(n),queueMicrotask(()=>{nt(r,i,a)}),S&&M&&t&&b()}N(t)&&e.show(),M&&x.current||e.setActiveId(null)}),Q=A.onCompositionEnd,V=nR(e=>{x.current=!0,E.current=!1,null==Q||Q(e),e.defaultPrevented||M&&b()}),X=A.onMouseDown,q=nL(null!=f?f:()=>!!(null==e?void 0:e.getState().includesBaseElement)),W=nL(m),Y=nL(null!=u?u:j),z=nR(t=>{null==X||X(t),t.defaultPrevented||t.button||t.ctrlKey||e&&(q(t)&&e.setActiveId(null),W(t)&&e.setValue(_),Y(t)&&nx(t.currentTarget,"mouseup",e.show))}),Z=A.onKeyDown,$=nL(null!=d?d:j),ee=nR(t=>{if(null==Z||Z(t),t.repeat||(x.current=!1),t.defaultPrevented||t.ctrlKey||t.altKey||t.shiftKey||t.metaKey||!e)return;let{open:r}=e.getState();!r&&("ArrowUp"===t.key||"ArrowDown"===t.key)&&$(t)&&(t.preventDefault(),e.show())}),et=A.onBlur,er=nR(e=>{if(x.current=!1,null==et||et(e),e.defaultPrevented)return}),en=nD(A.id),ei=e.useState(e=>null===e.activeId);return A={id:en,role:"combobox","aria-autocomplete":"inline"===p||"list"===p||"both"===p||"none"===p?p:void 0,"aria-haspopup":r7(L,"listbox"),"aria-expanded":G,"aria-controls":null==L?void 0:L.id,"data-active-item":ei||void 0,value:_,...A,ref:nw(C,A.ref),onChange:K,onCompositionEnd:V,onMouseDown:z,onKeyDown:ee,onBlur:er},A=iB({store:e,focusable:t,...A,moveOnKeyPress:e=>!nc(h,e)&&(S&&T(!0),!0)}),{autoComplete:"off",...A=iI({store:e,...A})}}),i1=nJ(function(e){return nQ("input",i0(e))});function i2(e){let t=e.relatedTarget;return(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null}var i9=Symbol("composite-hover"),i3=nV(function({store:e,focusOnHover:t=!0,blurOnHoverEnd:r=!!t,...n}){let i=nz();nu(e=e||i,!1);let a=((0,o.useEffect)(()=>{nO||(nE("mousemove",nU,!0),nE("mousedown",nN,!0),nE("mouseup",nN,!0),nE("keydown",nN,!0),nE("scroll",nN,!0),nO=!0)},[]),nR(()=>nk)),l=n.onMouseMove,s=nL(t),u=nR(t=>{if((null==l||l(t),!t.defaultPrevented&&a())&&s(t)){if(!ir(t.currentTarget)){let t=null==e?void 0:e.getState().baseElement;t&&!it(t)&&t.focus()}null==e||e.setActiveId(t.currentTarget.id)}}),c=n.onMouseLeave,d=nL(r),f=nR(t=>{var r;let n;null==c||c(t),!t.defaultPrevented&&a()&&((n=i2(t))&&r1(t.currentTarget,n)||function(e){let t=i2(e);if(!t)return!1;do{if(no(t,i9)&&t[i9])return!0;t=t.parentElement}while(t)return!1}(t)||!s(t)||d(t)&&(null==e||e.setActiveId(null),null==(r=null==e?void 0:e.getState().baseElement)||r.focus()))}),m=(0,o.useCallback)(e=>{e&&(e[i9]=!0)},[]);return nf(n={...n,ref:nw(m,n.ref),onMouseMove:u,onMouseLeave:f})});nK(nJ(function(e){return nQ("div",i3(e))}));var i5=nV(function({store:e,shouldRegisterItem:t=!0,getItem:r=ns,element:n,...i}){let a=nW();e=e||a;let l=nD(i.id),s=(0,o.useRef)(n);return(0,o.useEffect)(()=>{let n=s.current;if(!l||!n||!t)return;let i=r({id:l,element:n});return null==e?void 0:e.renderItem(i)},[l,t,r,e]),nf(i={...i,ref:nw(s,i.ref)})});function i8(e){if(!e.isTrusted)return!1;let t=e.currentTarget;return"Enter"===e.key?r9(t)||"SUMMARY"===t.tagName||"A"===t.tagName:" "===e.key&&(r9(t)||"SUMMARY"===t.tagName||"INPUT"===t.tagName||"SELECT"===t.tagName)}nJ(function(e){return nQ("div",i5(e))});var i6=Symbol("command"),i4=nV(function({clickOnEnter:e=!0,clickOnSpace:t=!0,...r}){let n,i,a=(0,o.useRef)(null),[l,s]=(0,o.useState)(!1);(0,o.useEffect)(()=>{a.current&&s(r9(a.current))},[]);let[u,c]=(0,o.useState)(!1),d=(0,o.useRef)(!1),f=nd(r),[m,h]=(n=r.onLoadedMetadataCapture,i=(0,o.useMemo)(()=>Object.assign(()=>{},{...n,[i6]:!0}),[n,i6,!0]),[null==n?void 0:n[i6],{onLoadedMetadataCapture:i}]),p=r.onKeyDown,A=nR(r=>{null==p||p(r);let n=r.currentTarget;if(r.defaultPrevented||m||f||!nB(r)||r8(n)||n.isContentEditable)return;let i=e&&"Enter"===r.key,a=t&&" "===r.key,o="Enter"===r.key&&!e,l=" "===r.key&&!t;if(o||l)return void r.preventDefault();if(i||a){let e=i8(r);if(i){if(!e){r.preventDefault();let{view:e,...t}=r,i=()=>ny(n,t);rz&&/firefox\//i.test(navigator.userAgent)?nx(n,"keyup",i):queueMicrotask(i)}}else a&&(d.current=!0,e||(r.preventDefault(),c(!0)))}}),g=r.onKeyUp,v=nR(e=>{if(null==g||g(e),e.defaultPrevented||m||f||e.metaKey)return;let r=t&&" "===e.key;if(d.current&&r&&(d.current=!1,!i8(e))){e.preventDefault(),c(!1);let t=e.currentTarget,{view:r,...n}=e;queueMicrotask(()=>ny(t,n))}});return ip(r={"data-active":u||void 0,type:l?"button":void 0,...h,...r,ref:nw(a,r.ref),onKeyDown:A,onKeyUp:v})});nJ(function(e){return nQ("button",i4(e))});var{useSyncExternalStore:i7}=e.i(2239).default,ae=()=>()=>{};function at(e,t=ns){let r=o.useCallback(t=>e?iV(e,null,t):ae(),[e]),n=()=>{let r="string"==typeof t?t:null,n="function"==typeof t?t:null,i=null==e?void 0:e.getState();return n?n(i):i&&r&&no(i,r)?i[r]:void 0};return i7(r,n,n)}function ar(e,t){let r=o.useRef({}),n=o.useCallback(t=>e?iV(e,null,t):ae(),[e]),i=()=>{let n=null==e?void 0:e.getState(),i=!1,a=r.current;for(let e in t){let r=t[e];if("function"==typeof r){let t=r(n);t!==a[e]&&(a[e]=t,i=!0)}if("string"==typeof r){if(!n||!no(n,r))continue;let t=n[r];t!==a[e]&&(a[e]=t,i=!0)}}return i&&(r.current={...a}),r.current};return i7(n,i,i)}function an(e,t,r,n){var i;let a,l=no(t,r)?t[r]:void 0,s=(i={value:l,setValue:n?t[n]:void 0},a=(0,o.useRef)(i),nT(()=>{a.current=i}),a);nT(()=>iX(e,[r],(e,t)=>{let{value:n,setValue:i}=s.current;i&&e[r]!==t[r]&&e[r]!==n&&i(e[r])}),[e,r]),nT(()=>{if(void 0!==l)return e.setState(r,l),iq(e,[r],()=>{void 0!==l&&e.setState(r,l)})})}function ai(e,t){let[r,n]=o.useState(()=>e(t));nT(()=>iQ(r),[r]);let i=o.useCallback(e=>at(r,e),[r]);return[o.useMemo(()=>({...r,useState:i}),[r,i]),nR(()=>{n(r=>e({...t,...r.getState()}))})]}function aa(e,t,r,n=!1){var i;let a,o;if(!t||!r)return;let{renderedItems:l}=t.getState(),s=ne(e);if(!s)return;let u=function(e,t=!1){let r=e.clientHeight,{top:n}=e.getBoundingClientRect(),i=1.5*Math.max(.875*r,r-40),a=t?r-i+n:i+n;return"HTML"===e.tagName?a+e.scrollTop:a}(s,n);for(let e=0;e=0){void 0!==o&&ot||(e&&(null==h?void 0:h.baseElement)&&h.baseElement===e.baseElement?h.id:void 0),baseElement:e=>(null==e?void 0:e.baseElement)||void 0,isActiveItem:e=>!!e&&e.activeId===f,ariaSetSize:e=>null!=s?s:e&&(null==h?void 0:h.ariaSetSize)&&h.baseElement===e.baseElement?h.ariaSetSize:void 0,ariaPosInSet(e){if(null!=u)return u;if(!e||!(null==h?void 0:h.ariaPosInSet)||h.baseElement!==e.baseElement)return;let t=e.renderedItems.filter(e=>e.rowId===A);return h.ariaPosInSet+t.findIndex(e=>e.id===f)},isTabbable(t){if(!(null==t?void 0:t.renderedItems.length))return!0;if(t.virtualFocus)return!1;if(a)return!0;if(null===t.activeId)return!1;let r=null==e?void 0:e.item(t.activeId);return null!=r&&!!r.disabled||null==r||!r.element||t.activeId===f}}),b=(0,o.useCallback)(e=>{var t;let r={...e,id:f||e.id,rowId:A,disabled:!!p,children:null==(t=e.element)?void 0:t.textContent};return l?l(r):r},[f,A,p,l]),x=c.onFocus,E=(0,o.useRef)(!1),M=nR(t=>{var r,n;if(null==x||x(t),t.defaultPrevented||nv(t)||!f||!e||(r=e,!nB(t)&&ni(r,t.target)))return;let{virtualFocus:i,baseElement:a}=e.getState();e.setActiveId(f),r6(t.currentTarget)&&function(e,t=!1){if(r8(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){let r=rZ(e).getSelection();null==r||r.selectAllChildren(e),t&&(null==r||r.collapseToEnd())}}(t.currentTarget),!i||!nB(t)||!r6(n=t.currentTarget)&&("INPUT"!==n.tagName||r9(n))&&(null==a?void 0:a.isConnected)&&((ng()&&t.currentTarget.hasAttribute("data-autofocus")&&t.currentTarget.scrollIntoView({block:"nearest",inline:"nearest"}),E.current=!0,t.relatedTarget===a||ni(e,t.relatedTarget))?(a[nn]=!0,a.focus({preventScroll:!0})):a.focus())}),S=c.onBlurCapture,F=nR(t=>{if(null==S||S(t),t.defaultPrevented)return;let r=null==e?void 0:e.getState();(null==r?void 0:r.virtualFocus)&&E.current&&(E.current=!1,t.preventDefault(),t.stopPropagation())}),T=c.onKeyDown,R=nL(r),w=nL(n),D=nR(t=>{if(null==T||T(t),t.defaultPrevented||!nB(t)||!e)return;let{currentTarget:r}=t,n=e.getState(),i=e.item(f),a=!!(null==i?void 0:i.rowId),o="horizontal"!==n.orientation,l="vertical"!==n.orientation,s=()=>!(!a&&!l&&n.baseElement&&r8(n.baseElement)),u={ArrowUp:(a||o)&&e.up,ArrowRight:(a||l)&&e.next,ArrowDown:(a||o)&&e.down,ArrowLeft:(a||l)&&e.previous,Home:()=>{if(s())return!a||t.ctrlKey?null==e?void 0:e.first():null==e?void 0:e.previous(-1)},End:()=>{if(s())return!a||t.ctrlKey?null==e?void 0:e.last():null==e?void 0:e.next(-1)},PageUp:()=>aa(r,e,null==e?void 0:e.up,!0),PageDown:()=>aa(r,e,null==e?void 0:e.down)}[t.key];if(u){if(r6(r)){let e=r4(r),n=l&&"ArrowLeft"===t.key,i=l&&"ArrowRight"===t.key,a=o&&"ArrowUp"===t.key,s=o&&"ArrowDown"===t.key;if(i||s){let{length:t}=function(e){if(r8(e))return e.value;if(e.isContentEditable){let t=rZ(e).createRange();return t.selectNodeContents(e),t.toString()}return""}(r);if(e.end!==t)return}else if((n||a)&&0!==e.start)return}let n=u();if(R(t)||void 0!==n){if(!w(t))return;t.preventDefault(),e.move(n)}}}),I=(0,o.useMemo)(()=>({id:f,baseElement:g}),[f,g]);return c={id:f,"data-active-item":v||void 0,...c=n_(c,e=>(0,i.jsx)(n1.Provider,{value:I,children:e}),[I]),ref:nw(m,c.ref),tabIndex:y?c.tabIndex:-1,onFocus:M,onBlurCapture:F,onKeyDown:D},c=i4(c),nf({...c=i5({store:e,...c,getItem:b,shouldRegisterItem:!!f&&c.shouldRegisterItem}),"aria-setsize":B,"aria-posinset":C})});nK(nJ(function(e){return nQ("button",ao(e))}));var al=nV(function({store:e,value:t,hideOnClick:r,setValueOnClick:n,selectValueOnClick:a=!0,resetValueOnSelect:l,focusOnHover:s=!1,moveOnKeyPress:u=!0,getItem:c,...d}){var f,m;let h=iP();nu(e=e||h,!1);let{resetValueOnSelectState:p,multiSelectable:A,selected:g}=ar(e,{resetValueOnSelectState:"resetValueOnSelect",multiSelectable:e=>Array.isArray(e.selectedValue),selected:e=>(function(e,t){if(null!=t)return null!=e&&(Array.isArray(e)?e.includes(t):e===t)})(e.selectedValue,t)}),v=(0,o.useCallback)(e=>{let r={...e,value:t};return c?c(r):r},[t,c]);n=null!=n?n:!A,r=null!=r?r:null!=t&&!A;let B=d.onClick,C=nL(n),y=nL(a),b=nL(null!=(f=null!=l?l:p)?f:A),x=nL(r),E=nR(r=>{null==B||B(r),r.defaultPrevented||function(e){let t=e.currentTarget;if(!t)return!1;let r=t.tagName.toLowerCase();return!!e.altKey&&("a"===r||"button"===r&&"submit"===t.type||"input"===r&&"submit"===t.type)}(r)||!function(e){let t=e.currentTarget;if(!t)return!1;let r=nA();if(r&&!e.metaKey||!r&&!e.ctrlKey)return!1;let n=t.tagName.toLowerCase();return"a"===n||"button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type}(r)&&(null!=t&&(y(r)&&(b(r)&&(null==e||e.resetValue()),null==e||e.setSelectedValue(e=>Array.isArray(e)?e.includes(t)?e.filter(e=>e!==t):[...e,t]:t)),C(r)&&(null==e||e.setValue(t))),x(r)&&(null==e||e.hide()))}),M=d.onKeyDown,S=nR(t=>{if(null==M||M(t),t.defaultPrevented)return;let r=null==e?void 0:e.getState().baseElement;!r||it(r)||(1===t.key.length||"Backspace"===t.key||"Delete"===t.key)&&(queueMicrotask(()=>r.focus()),r8(r)&&(null==e||e.setValue(r.value)))});A&&null!=g&&(d={"aria-selected":g,...d}),d=n_(d,e=>(0,i.jsx)(ij.Provider,{value:t,children:(0,i.jsx)(iU.Provider,{value:null!=g&&g,children:e})}),[t,g]),d={role:null!=(m=({menu:"menuitem",listbox:"option",tree:"treeitem"})[(0,o.useContext)(iG)])?m:"option",children:t,...d,onClick:E,onKeyDown:S};let F=nL(u);return d=ao({store:e,...d,getItem:v,moveOnKeyPress:t=>{if(!F(t))return!1;let r=new Event("combobox-item-move"),n=null==e?void 0:e.getState().baseElement;return null==n||n.dispatchEvent(r),!0}}),d=i3({store:e,focusOnHover:s,...d})}),as=nK(nJ(function(e){return nQ("div",al(e))})),au=e.i(74080);function ac(e,t){let r=setTimeout(t,e);return()=>clearTimeout(r)}function ad(...e){return e.join(", ").split(", ").reduce((e,t)=>{let r=t.endsWith("ms")?1:1e3,n=Number.parseFloat(t||"0s")*r;return n>e?n:e},0)}function af(e,t,r){return!r&&!1!==t&&(!e||!!t)}var am=nV(function({store:e,alwaysVisible:t,...r}){let n=iy();nu(e=e||n,!1);let a=(0,o.useRef)(null),l=nD(r.id),[s,u]=(0,o.useState)(null),c=e.useState("open"),d=e.useState("mounted"),f=e.useState("animated"),m=e.useState("contentElement"),h=at(e.disclosure,"contentElement");nT(()=>{a.current&&(null==e||e.setContentElement(a.current))},[e]),nT(()=>{let t;return null==e||e.setState("animated",e=>(t=e,!0)),()=>{void 0!==t&&(null==e||e.setState("animated",t))}},[e]),nT(()=>{if(f){var e;let t;return(null==m?void 0:m.isConnected)?(e=()=>{u(c?"enter":d?"leave":null)},t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)}),()=>cancelAnimationFrame(t)):void u(null)}},[f,m,c,d]),nT(()=>{if(!e||!f||!s||!m)return;let t=()=>null==e?void 0:e.setState("animating",!1),r=()=>(0,au.flushSync)(t);if("leave"===s&&c||"enter"===s&&!c)return;if("number"==typeof f)return ac(f,r);let{transitionDuration:n,animationDuration:i,transitionDelay:a,animationDelay:o}=getComputedStyle(m),{transitionDuration:l="0",animationDuration:u="0",transitionDelay:d="0",animationDelay:p="0"}=h?getComputedStyle(h):{},A=ad(a,o,d,p)+ad(n,i,l,u);if(!A){"enter"===s&&e.setState("animated",!1),t();return}return ac(Math.max(A-1e3/60,0),r)},[e,f,m,h,c,s]);let p=af(d,(r=n_(r,t=>(0,i.jsx)(iM,{value:e,children:t}),[e])).hidden,t),A=r.style,g=(0,o.useMemo)(()=>p?{...A,display:"none"}:A,[p,A]);return nf(r={id:l,"data-open":c||void 0,"data-enter":"enter"===s||void 0,"data-leave":"leave"===s||void 0,hidden:p,...r,ref:nw(l?e.setContentElement:null,a,r.ref),style:g})}),ah=nJ(function(e){return nQ("div",am(e))});nJ(function({unmountOnHide:e,...t}){let r=iy();return!1===at(t.store||r,t=>!e||(null==t?void 0:t.mounted))?null:(0,i.jsx)(ah,{...t})});var ap=nV(function({store:e,alwaysVisible:t,...r}){let n=iP(!0),a=i_(),l=!!(e=e||a)&&e===n;nu(e,!1);let s=(0,o.useRef)(null),u=nD(r.id),c=e.useState("mounted"),d=af(c,r.hidden,t),f=d?{...r.style,display:"none"}:r.style,m=e.useState(e=>Array.isArray(e.selectedValue)),h=function(e,t,r){let n=function(e){let[t]=(0,o.useState)(e);return t}(r),[i,a]=(0,o.useState)(n);return(0,o.useEffect)(()=>{let r=e&&"current"in e?e.current:e;if(!r)return;let i=()=>{let e=r.getAttribute(t);a(null==e?n:e)},o=new MutationObserver(i);return o.observe(r,{attributeFilter:[t]}),i(),()=>o.disconnect()},[e,t,n]),i}(s,"role",r.role),p="listbox"===h||"tree"===h||"grid"===h,[A,g]=(0,o.useState)(!1),v=e.useState("contentElement");nT(()=>{if(!c)return;let e=s.current;if(!e||v!==e)return;let t=()=>{g(!!e.querySelector("[role='listbox']"))},r=new MutationObserver(t);return r.observe(e,{subtree:!0,childList:!0,attributeFilter:["role"]}),t(),()=>r.disconnect()},[c,v]),A||(r={role:"listbox","aria-multiselectable":p&&m||void 0,...r}),r=n_(r,t=>(0,i.jsx)(iH,{value:e,children:(0,i.jsx)(iG.Provider,{value:h,children:t})}),[e,h]);let B=!u||n&&l?null:e.setContentElement;return nf(r={id:u,hidden:d,...r,ref:nw(B,s,r.ref),style:f})}),aA=nJ(function(e){return nQ("div",ap(e))}),ag=(0,o.createContext)(null),av=nV(function(e){return{...e,style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px",...e.style}}});nJ(function(e){return nQ("span",av(e))});var aB=nV(function(e){return av(e={"data-focus-trap":"",tabIndex:0,"aria-hidden":!0,...e,style:{position:"fixed",top:0,left:0,...e.style}})}),aC=nJ(function(e){return nQ("span",aB(e))});function ay(e){queueMicrotask(()=>{null==e||e.focus()})}var ab=nV(function({preserveTabOrder:e,preserveTabOrderAnchor:t,portalElement:r,portalRef:n,portal:a=!0,...l}){let s=(0,o.useRef)(null),u=nw(s,l.ref),c=(0,o.useContext)(ag),[d,f]=(0,o.useState)(null),[m,h]=(0,o.useState)(null),p=(0,o.useRef)(null),A=(0,o.useRef)(null),g=(0,o.useRef)(null),v=(0,o.useRef)(null);return nT(()=>{let e=s.current;if(!e||!a)return void f(null);let t=r?"function"==typeof r?r(e):r:rZ(e).createElement("div");if(!t)return void f(null);let i=t.isConnected;if(i||(c||rZ(e).body).appendChild(t),t.id||(t.id=e.id?`portal/${e.id}`:function(e="id"){return`${e?`${e}-`:""}${Math.random().toString(36).slice(2,8)}`}()),f(t),nh(n,t),!i)return()=>{t.remove(),nh(n,null)}},[a,r,c,n]),nT(()=>{if(!a||!e||!t)return;let r=rZ(t).createElement("span");return r.style.position="fixed",t.insertAdjacentElement("afterend",r),h(r),()=>{r.remove(),h(null)}},[a,e,t]),(0,o.useEffect)(()=>{if(!d||!e)return;let t=0,r=e=>{if(!nb(e))return;let r="focusin"===e.type;if(cancelAnimationFrame(t),r){let e=d.querySelectorAll("[data-tabindex]"),t=e=>{let t=e.getAttribute("data-tabindex");e.removeAttribute("data-tabindex"),t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")};for(let r of(d.hasAttribute("data-tabindex")&&t(d),e))t(r);return}t=requestAnimationFrame(()=>{for(let e of n4(d,!0))!function(e){var t;let r=null!=(t=e.getAttribute("tabindex"))?t:"";e.setAttribute("data-tabindex",r),e.setAttribute("tabindex","-1")}(e)})};return d.addEventListener("focusin",r,!0),d.addEventListener("focusout",r,!0),()=>{cancelAnimationFrame(t),d.removeEventListener("focusin",r,!0),d.removeEventListener("focusout",r,!0)}},[d,e]),l={...l=n_(l,t=>{if(t=(0,i.jsx)(ag.Provider,{value:d||c,children:t}),!a)return t;if(!d)return(0,i.jsx)("span",{ref:u,id:l.id,style:{position:"fixed"},hidden:!0});t=(0,i.jsxs)(i.Fragment,{children:[e&&d&&(0,i.jsx)(aC,{ref:A,"data-focus-trap":l.id,className:"__focus-trap-inner-before",onFocus:e=>{nb(e,d)?ay(n7()):ay(p.current)}}),t,e&&d&&(0,i.jsx)(aC,{ref:g,"data-focus-trap":l.id,className:"__focus-trap-inner-after",onFocus:e=>{nb(e,d)?ay(ie()):ay(v.current)}})]}),d&&(t=(0,au.createPortal)(t,d));let r=(0,i.jsxs)(i.Fragment,{children:[e&&d&&(0,i.jsx)(aC,{ref:p,"data-focus-trap":l.id,className:"__focus-trap-outer-before",onFocus:e=>{e.relatedTarget!==v.current&&nb(e,d)?ay(A.current):ay(ie())}}),e&&(0,i.jsx)("span",{"aria-owns":null==d?void 0:d.id,style:{position:"fixed"}}),e&&d&&(0,i.jsx)(aC,{ref:v,"data-focus-trap":l.id,className:"__focus-trap-outer-after",onFocus:e=>{if(nb(e,d))ay(g.current);else{let e=n7();if(e===A.current)return void requestAnimationFrame(()=>{var e;return null==(e=n7())?void 0:e.focus()});ay(e)}}})]});return m&&e&&(r=(0,au.createPortal)(r,m)),(0,i.jsxs)(i.Fragment,{children:[r,t]})},[d,c,a,l.id,e,m]),ref:u}});nJ(function(e){return nQ("div",ab(e))});var ax=(0,o.createContext)(0);function aE({level:e,children:t}){let r=(0,o.useContext)(ax),n=Math.max(Math.min(e||r+1,6),1);return(0,i.jsx)(ax.Provider,{value:n,children:t})}var aM=nV(function({autoFocusOnShow:e=!0,...t}){return n_(t,t=>(0,i.jsx)(n9.Provider,{value:e,children:t}),[e])});nJ(function(e){return nQ("div",aM(e))});var aS=new WeakMap;function aF(e,t,r){aS.has(e)||aS.set(e,new Map);let n=aS.get(e),i=n.get(t);if(!i)return n.set(t,r()),()=>{var e;null==(e=n.get(t))||e(),n.delete(t)};let a=r(),o=()=>{a(),i(),n.delete(t)};return n.set(t,o),()=>{n.get(t)===o&&(a(),n.set(t,i))}}function aT(e,t,r){return aF(e,t,()=>{let n=e.getAttribute(t);return e.setAttribute(t,r),()=>{null==n?e.removeAttribute(t):e.setAttribute(t,n)}})}function aR(e,t,r){return aF(e,t,()=>{let n=t in e,i=e[t];return e[t]=r,()=>{n?e[t]=i:delete e[t]}})}function aw(e,t){return e?aF(e,"style",()=>{let r=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=r}}):()=>{}}var aD=["SCRIPT","STYLE"];function aI(e){return`__ariakit-dialog-snapshot-${e}`}function aG(e,t,r,n){for(let i of t){if(!(null==i?void 0:i.isConnected))continue;let a=t.some(e=>!!e&&e!==i&&e.contains(i)),o=rZ(i),l=i;for(;i.parentElement&&i!==o.body;){if(null==n||n(i.parentElement,l),!a)for(let n of i.parentElement.children)(function(e,t,r){return!aD.includes(t.tagName)&&!!function(e,t){let r=rZ(t),n=aI(e);if(!r.body[n])return!0;for(;;){if(t===r.body)return!1;if(t[n])return!0;if(!t.parentElement)return!1;t=t.parentElement}}(e,t)&&!r.some(e=>e&&r1(t,e))})(e,n,t)&&r(n,l);i=i.parentElement}}}function aL(e,...t){if(!e)return!1;let r=e.getAttribute("data-backdrop");return null!=r&&(""===r||"true"===r||!t.length||t.some(e=>r===e))}function a_(e="",t=!1){return`__ariakit-dialog-${t?"ancestor":"outside"}${e?`-${e}`:""}`}function aP(e,t=""){return nl(aR(e,a_("",!0),!0),aR(e,a_(t,!0),!0))}function aO(e,t){if(e[a_(t,!0)])return!0;let r=a_(t);for(;;){if(e[r])return!0;if(!e.parentElement)return!1;e=e.parentElement}}function ak(e,t){let r=[],n=t.map(e=>null==e?void 0:e.id);return aG(e,t,t=>{aL(t,...n)||r.unshift(function(e,t=""){return nl(aR(e,a_(),!0),aR(e,a_(t),!0))}(t,e))},(t,n)=>{n.hasAttribute("data-dialog")&&n.id!==e||r.unshift(aP(t,e))}),()=>{for(let e of r)e()}}function aH({store:e,type:t,listener:r,capture:n,domReady:i}){let a=nR(r),l=at(e,"open"),s=(0,o.useRef)(!1);nT(()=>{if(!l||!i)return;let{contentElement:t}=e.getState();if(!t)return;let r=()=>{s.current=!0};return t.addEventListener("focusin",r,!0),()=>t.removeEventListener("focusin",r,!0)},[e,l,i]),(0,o.useEffect)(()=>{if(l)return nE(t,t=>{let{contentElement:r,disclosureElement:n}=e.getState(),i=t.target;!r||!i||!(!("HTML"===i.tagName||r1(rZ(i).body,i))||r1(r,i)||function(e,t){if(!e)return!1;if(r1(e,t))return!0;let r=t.getAttribute("aria-activedescendant");if(r){let t=rZ(e).getElementById(r);if(t)return r1(e,t)}return!1}(n,i)||i.hasAttribute("data-focus-trap")||function(e,t){if(!("clientY"in e))return!1;let r=t.getBoundingClientRect();return 0!==r.width&&0!==r.height&&r.top<=e.clientY&&e.clientY<=r.top+r.height&&r.left<=e.clientX&&e.clientX<=r.left+r.width}(t,r))&&(!s.current||aO(i,r.id))&&(i&&i[il]||a(t))},n)},[l,n])}function aj(e,t){return"function"==typeof e?e(t):!!e}var aU=(0,o.createContext)({});function aN(){return"inert"in HTMLElement.prototype}function aJ(e,t){if(!("style"in e))return na;if(aN())return aR(e,"inert",!0);let r=n4(e,!0).map(e=>{if(null==t?void 0:t.some(t=>t&&r1(t,e)))return na;let r=aF(e,"focus",()=>(e.focus=na,()=>{delete e.focus}));return nl(aT(e,"tabindex","-1"),r)});return nl(...r,aT(e,"aria-hidden","true"),aw(e,{pointerEvents:"none",userSelect:"none",cursor:"default"}))}function aK(e={}){let t=iY(e.store,iW(e.disclosure,["contentElement","disclosureElement"]));iz(e,t);let r=null==t?void 0:t.getState(),n=nm(e.open,null==r?void 0:r.open,e.defaultOpen,!1),i=nm(e.animated,null==r?void 0:r.animated,!1),a=iJ({open:n,animated:i,animating:!!i&&n,mounted:n,contentElement:nm(null==r?void 0:r.contentElement,null),disclosureElement:nm(null==r?void 0:r.disclosureElement,null)},t);return iK(a,()=>iX(a,["animated","animating"],e=>{e.animated||a.setState("animating",!1)})),iK(a,()=>iV(a,["open"],()=>{a.getState().animated&&a.setState("animating",!0)})),iK(a,()=>iX(a,["open","animating"],e=>{a.setState("mounted",e.open||e.animating)})),{...a,disclosure:e.disclosure,setOpen:e=>a.setState("open",e),show:()=>a.setState("open",!0),hide:()=>a.setState("open",!1),toggle:()=>a.setState("open",e=>!e),stopAnimation:()=>a.setState("animating",!1),setContentElement:e=>a.setState("contentElement",e),setDisclosureElement:e=>a.setState("disclosureElement",e)}}function aQ(e,t,r){return nI(t,[r.store,r.disclosure]),an(e,r,"open","setOpen"),an(e,r,"mounted","setMounted"),an(e,r,"animated"),Object.assign(e,{disclosure:r.disclosure})}nV(function(e){return e});var aV=nJ(function(e){return nQ("div",e)});function aX({store:e,backdrop:t,alwaysVisible:r,hidden:n}){let a=(0,o.useRef)(null),l=function(e={}){let[t,r]=ai(aK,e);return aQ(t,r,e)}({disclosure:e}),s=at(e,"contentElement");(0,o.useEffect)(()=>{let e=a.current;!e||s&&(e.style.zIndex=getComputedStyle(s).zIndex)},[s]),nT(()=>{let e=null==s?void 0:s.id;if(!e)return;let t=a.current;if(t)return aP(t,e)},[s]);let u=am({ref:a,store:l,role:"presentation","data-backdrop":(null==s?void 0:s.id)||"",alwaysVisible:r,hidden:null!=n?n:void 0,style:{position:"fixed",top:0,right:0,bottom:0,left:0}});if(!t)return null;if((0,o.isValidElement)(t))return(0,i.jsx)(aV,{...u,render:t});let c="boolean"!=typeof t?t:"div";return(0,i.jsx)(aV,{...u,render:(0,i.jsx)(c,{})})}function aq(e={}){return aK(e)}Object.assign(aV,["a","button","details","dialog","div","form","h1","h2","h3","h4","h5","h6","header","img","input","label","li","nav","ol","p","section","select","span","summary","textarea","ul","svg"].reduce((e,t)=>(e[t]=nJ(function(e){return nQ(t,e)}),e),{}));var aW=ng();function aY(e,t=!1){if(!e)return null;let r="current"in e?e.current:e;return r?t?n5(r)?r:null:r:null}var az=nV(function({store:e,open:t,onClose:r,focusable:n=!0,modal:a=!0,portal:l=!!a,backdrop:s=!!a,hideOnEscape:u=!0,hideOnInteractOutside:c=!0,getPersistentElements:d,preventBodyScroll:f=!!a,autoFocusOnShow:m=!0,autoFocusOnHide:h=!0,initialFocus:p,finalFocus:A,unmountOnHide:g,unstable_treeSnapshotKey:v,...B}){var C;let y,b,x,E=ix(),M=(0,o.useRef)(null),S=function(e={}){let[t,r]=ai(aq,e);return aQ(t,r,e)}({store:e||E,open:t,setOpen(e){if(e)return;let t=M.current;if(!t)return;let n=new Event("close",{bubbles:!1,cancelable:!0});r&&t.addEventListener("close",r,{once:!0}),t.dispatchEvent(n),n.defaultPrevented&&S.setOpen(!0)}}),{portalRef:F,domReady:T}=nP(l,B.portalRef),R=B.preserveTabOrder,w=at(S,e=>R&&!a&&e.mounted),D=nD(B.id),I=at(S,"open"),G=at(S,"mounted"),L=at(S,"contentElement"),_=af(G,B.hidden,B.alwaysVisible);y=function({attribute:e,contentId:t,contentElement:r,enabled:n}){let[i,a]=nG(),l=(0,o.useCallback)(()=>{if(!n||!r)return!1;let{body:i}=rZ(r),a=i.getAttribute(e);return!a||a===t},[i,n,r,e,t]);return(0,o.useEffect)(()=>{if(!n||!t||!r)return;let{body:i}=rZ(r);if(l())return i.setAttribute(e,t),()=>i.removeAttribute(e);let o=new MutationObserver(()=>(0,au.flushSync)(a));return o.observe(i,{attributeFilter:[e]}),()=>o.disconnect()},[i,n,t,r,l,e]),l}({attribute:"data-dialog-prevent-body-scroll",contentElement:L,contentId:D,enabled:f&&!_}),(0,o.useEffect)(()=>{var e,t;if(!y()||!L)return;let r=rZ(L),n=r$(L),{documentElement:i,body:a}=r,o=i.style.getPropertyValue("--scrollbar-width"),l=o?Number.parseInt(o,10):n.innerWidth-i.clientWidth,s=Math.round(i.getBoundingClientRect().left)+i.scrollLeft?"paddingLeft":"paddingRight",u=nA()&&!(rz&&navigator.platform.startsWith("Mac")&&!np());return nl((e="--scrollbar-width",t=`${l}px`,i?aF(i,e,()=>{let r=i.style.getPropertyValue(e);return i.style.setProperty(e,t),()=>{r?i.style.setProperty(e,r):i.style.removeProperty(e)}}):()=>{}),u?(()=>{var e,t;let{scrollX:r,scrollY:i,visualViewport:o}=n,u=null!=(e=null==o?void 0:o.offsetLeft)?e:0,c=null!=(t=null==o?void 0:o.offsetTop)?t:0,d=aw(a,{position:"fixed",overflow:"hidden",top:`${-(i-Math.floor(c))}px`,left:`${-(r-Math.floor(u))}px`,right:"0",[s]:`${l}px`});return()=>{d(),n.scrollTo({left:r,top:i,behavior:"instant"})}})():aw(a,{overflow:"hidden",[s]:`${l}px`}))},[y,L]),C=at(S,"open"),b=(0,o.useRef)(),(0,o.useEffect)(()=>{if(!C){b.current=null;return}return nE("mousedown",e=>{b.current=e.target},!0)},[C]),aH({...x={store:S,domReady:T,capture:!0},type:"click",listener:e=>{let{contentElement:t}=S.getState(),r=b.current;r&&r5(r)&&aO(r,null==t?void 0:t.id)&&aj(c,e)&&S.hide()}}),aH({...x,type:"focusin",listener:e=>{let{contentElement:t}=S.getState();!t||e.target===rZ(t)||aj(c,e)&&S.hide()}}),aH({...x,type:"contextmenu",listener:e=>{aj(c,e)&&S.hide()}});let{wrapElement:P,nestedDialogs:O}=function(e){let t=(0,o.useContext)(aU),[r,n]=(0,o.useState)([]),a=(0,o.useCallback)(e=>{var r;return n(t=>[...t,e]),nl(null==(r=t.add)?void 0:r.call(t,e),()=>{n(t=>t.filter(t=>t!==e))})},[t]);nT(()=>iX(e,["open","contentElement"],r=>{var n;if(r.open&&r.contentElement)return null==(n=t.add)?void 0:n.call(t,e)}),[e,t]);let l=(0,o.useMemo)(()=>({store:e,add:a}),[e,a]);return{wrapElement:(0,o.useCallback)(e=>(0,i.jsx)(aU.Provider,{value:l,children:e}),[l]),nestedDialogs:r}}(S);B=n_(B,P,[P]),nT(()=>{if(!I)return;let e=M.current,t=r0(e,!0);!t||"BODY"===t.tagName||e&&r1(e,t)||S.setDisclosureElement(t)},[S,I]),aW&&(0,o.useEffect)(()=>{if(!G)return;let{disclosureElement:e}=S.getState();if(!e||!r9(e))return;let t=()=>{let t=!1,r=()=>{t=!0};e.addEventListener("focusin",r,{capture:!0,once:!0}),nx(e,"mouseup",()=>{e.removeEventListener("focusin",r,!0),t||ii(e)})};return e.addEventListener("mousedown",t),()=>{e.removeEventListener("mousedown",t)}},[S,G]),(0,o.useEffect)(()=>{if(!G||!T)return;let e=M.current;if(!e)return;let t=r$(e),r=t.visualViewport||t,n=()=>{var r,n;let i=null!=(n=null==(r=t.visualViewport)?void 0:r.height)?n:t.innerHeight;e.style.setProperty("--dialog-viewport-height",`${i}px`)};return n(),r.addEventListener("resize",n),()=>{r.removeEventListener("resize",n)}},[G,T]),(0,o.useEffect)(()=>{if(!a||!G||!T)return;let e=M.current;if(e&&!e.querySelector("[data-dialog-dismiss]")){var t;let r;return t=S.hide,(r=rZ(e).createElement("button")).type="button",r.tabIndex=-1,r.textContent="Dismiss popup",Object.assign(r.style,{border:"0px",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"}),r.addEventListener("click",t),e.prepend(r),()=>{r.removeEventListener("click",t),r.remove()}}},[S,a,G,T]),nT(()=>{if(!aN()||I||!G||!T)return;let e=M.current;if(e)return aJ(e)},[I,G,T]);let k=I&&T;nT(()=>{if(D&&k)return function(e,t){let{body:r}=rZ(t[0]),n=[];return aG(e,t,t=>{n.push(aR(t,aI(e),!0))}),nl(aR(r,aI(e),!0),()=>{for(let e of n)e()})}(D,[M.current])},[D,k,v]);let H=nR(d);nT(()=>{if(!D||!k)return;let{disclosureElement:e}=S.getState(),t=[M.current,...H()||[],...O.map(e=>e.getState().contentElement)];if(a){let e,r;return nl(ak(D,t),(e=[],r=t.map(e=>null==e?void 0:e.id),aG(D,t,n=>{aL(n,...r)||!function(e,...t){if(!e)return!1;let r=e.getAttribute("data-focus-trap");return null!=r&&(!t.length||""!==r&&t.some(e=>r===e))}(n,...r)&&e.unshift(aJ(n,t))},r=>{!r.hasAttribute("role")||t.some(e=>e&&r1(e,r))||e.unshift(aT(r,"role","none"))}),()=>{for(let t of e)t()}))}return ak(D,[e,...t])},[D,S,k,H,O,a,v]);let j=!!m,U=nL(m),[N,J]=(0,o.useState)(!1);(0,o.useEffect)(()=>{if(!I||!j||!T||!(null==L?void 0:L.isConnected))return;let e=aY(p,!0)||L.querySelector("[data-autofocus=true],[autofocus]")||function(e,t,r){let[n]=n4(e,t,r);return n||null}(L,!0,l&&w)||L,t=n5(e);U(t?e:null)&&(J(!0),queueMicrotask(()=>{e.focus(),!aW||t&&e.scrollIntoView({block:"nearest",inline:"nearest"})}))},[I,j,T,L,p,l,w,U]);let K=!!h,Q=nL(h),[V,X]=(0,o.useState)(!1);(0,o.useEffect)(()=>{if(I)return X(!0),()=>X(!1)},[I]);let q=(0,o.useCallback)((e,t=!0)=>{let r,{disclosureElement:n}=S.getState();if(!(!(r=r0())||e&&r1(e,r))&&n5(r))return;let i=aY(A)||n;if(null==i?void 0:i.id){let e=rZ(i),t=`[aria-activedescendant="${i.id}"]`,r=e.querySelector(t);r&&(i=r)}if(i&&!n5(i)){let e=i.closest("[data-dialog]");if(null==e?void 0:e.id){let t=rZ(e),r=`[aria-controls~="${e.id}"]`,n=t.querySelector(r);n&&(i=n)}}let a=i&&n5(i);!a&&t?requestAnimationFrame(()=>q(e,!1)):!Q(a?i:null)||a&&(null==i||i.focus({preventScroll:!0}))},[S,A,Q]),W=(0,o.useRef)(!1);nT(()=>{if(I||!V||!K)return;let e=M.current;W.current=!0,q(e)},[I,V,T,K,q]),(0,o.useEffect)(()=>{if(!V||!K)return;let e=M.current;return()=>{if(W.current){W.current=!1;return}q(e)}},[V,K,q]);let Y=nL(u);(0,o.useEffect)(()=>{if(T&&G)return nE("keydown",e=>{if("Escape"!==e.key||e.defaultPrevented)return;let t=M.current;if(!t||aO(t))return;let r=e.target;if(!r)return;let{disclosureElement:n}=S.getState();!("BODY"===r.tagName||r1(t,r)||!n||r1(n,r))||Y(e)&&S.hide()},!0)},[S,T,G,Y]);let z=(B=n_(B,e=>(0,i.jsx)(aE,{level:a?1:void 0,children:e}),[a])).hidden,Z=B.alwaysVisible;B=n_(B,e=>s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(aX,{store:S,backdrop:s,hidden:z,alwaysVisible:Z}),e]}):e,[S,s,z,Z]);let[$,ee]=(0,o.useState)(),[et,er]=(0,o.useState)();return B=aM({...B={id:D,"data-dialog":"",role:"dialog",tabIndex:n?-1:void 0,"aria-labelledby":$,"aria-describedby":et,...B=n_(B,e=>(0,i.jsx)(iM,{value:S,children:(0,i.jsx)(iS.Provider,{value:ee,children:(0,i.jsx)(iF.Provider,{value:er,children:e})})}),[S]),ref:nw(M,B.ref)},autoFocusOnShow:N}),B=ab({portal:l,...B=ip({...B=am({store:S,...B}),focusable:n}),portalRef:F,preserveTabOrder:w})});function aZ(e,t=ix){return nJ(function(r){let n=t();return at(r.store||n,e=>!r.unmountOnHide||(null==e?void 0:e.mounted)||!!r.open)?(0,i.jsx)(e,{...r}):null})}aZ(nJ(function(e){return nQ("div",az(e))}),ix);let a$=Math.min,a0=Math.max,a1=Math.round,a2=Math.floor,a9=e=>({x:e,y:e}),a3={left:"right",right:"left",bottom:"top",top:"bottom"},a5={start:"end",end:"start"};function a8(e,t){return"function"==typeof e?e(t):e}function a6(e){return e.split("-")[0]}function a4(e){return e.split("-")[1]}function a7(e){return"x"===e?"y":"x"}function oe(e){return"y"===e?"height":"width"}let ot=new Set(["top","bottom"]);function or(e){return ot.has(a6(e))?"y":"x"}function on(e){return e.replace(/start|end/g,e=>a5[e])}let oi=["left","right"],oa=["right","left"],oo=["top","bottom"],ol=["bottom","top"];function os(e){return e.replace(/left|right|bottom|top/g,e=>a3[e])}function ou(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function oc(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function od(e,t,r){let n,{reference:i,floating:a}=e,o=or(t),l=a7(or(t)),s=oe(l),u=a6(t),c="y"===o,d=i.x+i.width/2-a.width/2,f=i.y+i.height/2-a.height/2,m=i[s]/2-a[s]/2;switch(u){case"top":n={x:d,y:i.y-a.height};break;case"bottom":n={x:d,y:i.y+i.height};break;case"right":n={x:i.x+i.width,y:f};break;case"left":n={x:i.x-a.width,y:f};break;default:n={x:i.x,y:i.y}}switch(a4(t)){case"start":n[l]-=m*(r&&c?-1:1);break;case"end":n[l]+=m*(r&&c?-1:1)}return n}let of=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:o}=r,l=a.filter(Boolean),s=await (null==o.isRTL?void 0:o.isRTL(t)),u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=od(u,n,s),f=n,m={},h=0;for(let r=0;r{try{return e.matches(t)}catch(e){return!1}})}let oR=["transform","translate","scale","rotate","perspective"],ow=["transform","translate","scale","rotate","perspective","filter"],oD=["paint","layout","strict","content"];function oI(e){let t=oG(),r=oy(e)?oP(e):e;return oR.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||ow.some(e=>(r.willChange||"").includes(e))||oD.some(e=>(r.contain||"").includes(e))}function oG(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let oL=new Set(["html","body","#document"]);function o_(e){return oL.has(og(e))}function oP(e){return ov(e).getComputedStyle(e)}function oO(e){return oy(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ok(e){if("html"===og(e))return e;let t=e.assignedSlot||e.parentNode||ox(e)&&e.host||oB(e);return ox(t)?t.host:t}function oH(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let i=function e(t){let r=ok(t);return o_(r)?t.ownerDocument?t.ownerDocument.body:t.body:ob(r)&&oM(r)?r:e(r)}(e),a=i===(null==(n=e.ownerDocument)?void 0:n.body),o=ov(i);if(a){let e=oj(o);return t.concat(o,o.visualViewport||[],oM(i)?i:[],e&&r?oH(e):[])}return t.concat(i,oH(i,[],r))}function oj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oU(e){let t=oP(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=ob(e),a=i?e.offsetWidth:r,o=i?e.offsetHeight:n,l=a1(r)!==a||a1(n)!==o;return l&&(r=a,n=o),{width:r,height:n,$:l}}function oN(e){return oy(e)?e:e.contextElement}function oJ(e){let t=oN(e);if(!ob(t))return a9(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:a}=oU(t),o=(a?a1(r.width):r.width)/n,l=(a?a1(r.height):r.height)/i;return o&&Number.isFinite(o)||(o=1),l&&Number.isFinite(l)||(l=1),{x:o,y:l}}let oK=a9(0);function oQ(e){let t=ov(e);return oG()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:oK}function oV(e,t,r,n){var i;void 0===t&&(t=!1),void 0===r&&(r=!1);let a=e.getBoundingClientRect(),o=oN(e),l=a9(1);t&&(n?oy(n)&&(l=oJ(n)):l=oJ(e));let s=(void 0===(i=r)&&(i=!1),n&&(!i||n===ov(o))&&i)?oQ(o):a9(0),u=(a.left+s.x)/l.x,c=(a.top+s.y)/l.y,d=a.width/l.x,f=a.height/l.y;if(o){let e=ov(o),t=n&&oy(n)?ov(n):n,r=e,i=oj(r);for(;i&&n&&t!==r;){let e=oJ(i),t=i.getBoundingClientRect(),n=oP(i),a=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;u*=e.x,c*=e.y,d*=e.x,f*=e.y,u+=a,c+=o,i=oj(r=ov(i))}}return oc({width:d,height:f,x:u,y:c})}function oX(e,t){let r=oO(e).scrollLeft;return t?t.left+r:oV(oB(e)).left+r}function oq(e,t){let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-oX(e,r),y:r.top+t.scrollTop}}let oW=new Set(["absolute","fixed"]);function oY(e,t,r){var n;let i;if("viewport"===t)i=function(e,t){let r=ov(e),n=oB(e),i=r.visualViewport,a=n.clientWidth,o=n.clientHeight,l=0,s=0;if(i){a=i.width,o=i.height;let e=oG();(!e||e&&"fixed"===t)&&(l=i.offsetLeft,s=i.offsetTop)}let u=oX(n);if(u<=0){let e=n.ownerDocument,t=e.body,r=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,o=Math.abs(n.clientWidth-t.clientWidth-i);o<=25&&(a-=o)}else u<=25&&(a+=u);return{width:a,height:o,x:l,y:s}}(e,r);else if("document"===t){let t,r,a,o,l,s,u;n=oB(e),t=oB(n),r=oO(n),a=n.ownerDocument.body,o=a0(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),l=a0(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight),s=-r.scrollLeft+oX(n),u=-r.scrollTop,"rtl"===oP(a).direction&&(s+=a0(t.clientWidth,a.clientWidth)-o),i={width:o,height:l,x:s,y:u}}else if(oy(t)){let e,n,a,o,l,s;n=(e=oV(t,!0,"fixed"===r)).top+t.clientTop,a=e.left+t.clientLeft,o=ob(t)?oJ(t):a9(1),l=t.clientWidth*o.x,s=t.clientHeight*o.y,i={width:l,height:s,x:a*o.x,y:n*o.y}}else{let r=oQ(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return oc(i)}function oz(e){return"static"===oP(e).position}function oZ(e,t){if(!ob(e)||"fixed"===oP(e).position)return null;if(t)return t(e);let r=e.offsetParent;return oB(e)===r&&(r=r.ownerDocument.body),r}function o$(e,t){var r;let n=ov(e);if(oT(e))return n;if(!ob(e)){let t=ok(e);for(;t&&!o_(t);){if(oy(t)&&!oz(t))return t;t=ok(t)}return n}let i=oZ(e,t);for(;i&&(r=i,oS.has(og(r)))&&oz(i);)i=oZ(i,t);return i&&o_(i)&&oz(i)&&!oI(i)?n:i||function(e){let t=ok(e);for(;ob(t)&&!o_(t);){if(oI(t))return t;if(oT(t))break;t=ok(t)}return null}(e)||n}let o0=async function(e){let t=this.getOffsetParent||o$,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=ob(t),i=oB(t),a="fixed"===r,o=oV(e,!0,a,t),l={scrollLeft:0,scrollTop:0},s=a9(0);if(n||!n&&!a)if(("body"!==og(t)||oM(i))&&(l=oO(t)),n){let e=oV(t,!0,a,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=oX(i));a&&!n&&i&&(s.x=oX(i));let u=!i||n||a?a9(0):oq(i,l);return{x:o.left+l.scrollLeft-s.x-u.x,y:o.top+l.scrollTop-s.y-u.y,width:o.width,height:o.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},o1={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,a="fixed"===i,o=oB(n),l=!!t&&oT(t.floating);if(n===o||l&&a)return r;let s={scrollLeft:0,scrollTop:0},u=a9(1),c=a9(0),d=ob(n);if((d||!d&&!a)&&(("body"!==og(n)||oM(o))&&(s=oO(n)),ob(n))){let e=oV(n);u=oJ(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}let f=!o||d||a?a9(0):oq(o,s);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-s.scrollLeft*u.x+c.x+f.x,y:r.y*u.y-s.scrollTop*u.y+c.y+f.y}},getDocumentElement:oB,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[..."clippingAncestors"===r?oT(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=oH(e,[],!1).filter(e=>oy(e)&&"body"!==og(e)),i=null,a="fixed"===oP(e).position,o=a?ok(e):e;for(;oy(o)&&!o_(o);){let t=oP(o),r=oI(o);r||"fixed"!==t.position||(i=null),(a?!r&&!i:!r&&"static"===t.position&&!!i&&oW.has(i.position)||oM(o)&&!r&&function e(t,r){let n=ok(t);return!(n===r||!oy(n)||o_(n))&&("fixed"===oP(n).position||e(n,r))}(e,o))?n=n.filter(e=>e!==o):i=t,o=ok(o)}return t.set(e,n),n}(t,this._c):[].concat(r),n],o=a[0],l=a.reduce((e,r)=>{let n=oY(t,r,i);return e.top=a0(n.top,e.top),e.right=a$(n.right,e.right),e.bottom=a$(n.bottom,e.bottom),e.left=a0(n.left,e.left),e},oY(t,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:o$,getElementRects:o0,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=oU(e);return{width:t,height:r}},getScale:oJ,isElement:oy,isRTL:function(e){return"rtl"===oP(e).direction}};function o2(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function o9(e=0,t=0,r=0,n=0){if("function"==typeof DOMRect)return new DOMRect(e,t,r,n);let i={x:e,y:t,width:r,height:n,top:t,right:e+r,bottom:t+n,left:e};return{...i,toJSON:()=>i}}function o3(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}function o5(e){let t=window.devicePixelRatio||1;return Math.round(e*t)/t}var o8=nV(function({store:e,modal:t=!1,portal:r=!!t,preserveTabOrder:n=!0,autoFocusOnShow:a=!0,wrapperProps:l,fixed:s=!1,flip:u=!0,shift:c=0,slide:d=!0,overlap:f=!1,sameWidth:m=!1,fitViewport:h=!1,gutter:p,arrowPadding:A=4,overflowPadding:g=8,getAnchorRect:v,updatePosition:B,...C}){let y=iR();nu(e=e||y,!1);let b=e.useState("arrowElement"),x=e.useState("anchorElement"),E=e.useState("disclosureElement"),M=e.useState("popoverElement"),S=e.useState("contentElement"),F=e.useState("placement"),T=e.useState("mounted"),R=e.useState("rendered"),w=(0,o.useRef)(null),[D,I]=(0,o.useState)(!1),{portalRef:G,domReady:L}=nP(r,C.portalRef),_=nR(v),P=nR(B),O=!!B;nT(()=>{if(!(null==M?void 0:M.isConnected))return;M.style.setProperty("--popover-overflow-padding",`${g}px`);let t={contextElement:x||void 0,getBoundingClientRect:()=>{let e=null==_?void 0:_(x);return e||!x?function(e){if(!e)return o9();let{x:t,y:r,width:n,height:i}=e;return o9(t,r,n,i)}(e):x.getBoundingClientRect()}},r=async()=>{var r,n,i,a,o;let l,v,B;if(!T)return;b||(w.current=w.current||document.createElement("div"));let C=b||w.current,y=[(r={gutter:p,shift:c},void 0===(n=({placement:e})=>{var t;let n=((null==C?void 0:C.clientHeight)||0)/2,i="number"==typeof r.gutter?r.gutter+n:null!=(t=r.gutter)?t:n;return{crossAxis:e.split("-")[1]?void 0:r.shift,mainAxis:i,alignmentAxis:r.shift}})&&(n=0),{name:"offset",options:n,async fn(e){var t,r;let{x:i,y:a,placement:o,middlewareData:l}=e,s=await op(e,n);return o===(null==(t=l.offset)?void 0:t.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:i+s.x,y:a+s.y,data:{...s,placement:o}}}}),function(e){var t;if(!1===e.flip)return;let r="string"==typeof e.flip?e.flip.split(" "):void 0;return nu(!r||r.every(o3),!1),{name:"flip",options:t={padding:e.overflowPadding,fallbackPlacements:r},async fn(e){var r,n,i,a,o,l,s,u;let c,d,f,{placement:m,middlewareData:h,rects:p,initialPlacement:A,platform:g,elements:v}=e,{mainAxis:B=!0,crossAxis:C=!0,fallbackPlacements:y,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:E=!0,...M}=a8(t,e);if(null!=(r=h.arrow)&&r.alignmentOffset)return{};let S=a6(m),F=or(A),T=a6(A)===A,R=await (null==g.isRTL?void 0:g.isRTL(v.floating)),w=y||(T||!E?[os(A)]:(c=os(A),[on(A),c,on(c)])),D="none"!==x;!y&&D&&w.push(...(d=a4(A),f=function(e,t,r){switch(e){case"top":case"bottom":if(r)return t?oa:oi;return t?oi:oa;case"left":case"right":return t?oo:ol;default:return[]}}(a6(A),"start"===x,R),d&&(f=f.map(e=>e+"-"+d),E&&(f=f.concat(f.map(on)))),f));let I=[A,...w],G=await om(e,M),L=[],_=(null==(n=h.flip)?void 0:n.overflows)||[];if(B&&L.push(G[S]),C){let e,t,r,n,i=(l=m,s=p,void 0===(u=R)&&(u=!1),e=a4(l),r=oe(t=a7(or(l))),n="x"===t?e===(u?"end":"start")?"right":"left":"start"===e?"bottom":"top",s.reference[r]>s.floating[r]&&(n=os(n)),[n,os(n)]);L.push(G[i[0]],G[i[1]])}if(_=[..._,{placement:m,overflows:L}],!L.every(e=>e<=0)){let e=((null==(i=h.flip)?void 0:i.index)||0)+1,t=I[e];if(t&&("alignment"!==C||F===or(t)||_.every(e=>or(e.placement)!==F||e.overflows[0]>0)))return{data:{index:e,overflows:_},reset:{placement:t}};let r=null==(a=_.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:a.placement;if(!r)switch(b){case"bestFit":{let e=null==(o=_.filter(e=>{if(D){let t=or(e.placement);return t===F||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0];e&&(r=e);break}case"initialPlacement":r=A}if(m!==r)return{reset:{placement:r}}}return{}}}}({flip:u,overflowPadding:g}),function(e){if(e.slide||e.overlap){var t,r;return{name:"shift",options:r={mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:(void 0===t&&(t={}),{options:t,fn(e){let{x:r,y:n,placement:i,rects:a,middlewareData:o}=e,{offset:l=0,mainAxis:s=!0,crossAxis:u=!0}=a8(t,e),c={x:r,y:n},d=or(i),f=a7(d),m=c[f],h=c[d],p=a8(l,e),A="number"==typeof p?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(s){let e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+A.mainAxis,r=a.reference[f]+a.reference[e]-A.mainAxis;mr&&(m=r)}if(u){var g,v;let e="y"===f?"width":"height",t=oh.has(a6(i)),r=a.reference[d]-a.floating[e]+(t&&(null==(g=o.offset)?void 0:g[d])||0)+(t?0:A.crossAxis),n=a.reference[d]+a.reference[e]+(t?0:(null==(v=o.offset)?void 0:v[d])||0)-(t?A.crossAxis:0);hn&&(h=n)}return{[f]:m,[d]:h}}})},async fn(e){let{x:t,y:n,placement:i}=e,{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=a8(r,e),u={x:t,y:n},c=await om(e,s),d=or(a6(i)),f=a7(d),m=u[f],h=u[d];if(a){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",r=m+c[e],n=m-c[t];m=a0(r,a$(m,n))}if(o){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",r=h+c[e],n=h-c[t];h=a0(r,a$(h,n))}let p=l.fn({...e,[f]:m,[d]:h});return{...p,data:{x:p.x-t,y:p.y-n,enabled:{[f]:a,[d]:o}}}}}}}({slide:d,shift:c,overlap:f,overflowPadding:g}),function(e,t){if(e){let r;return{name:"arrow",options:r={element:e,padding:t.arrowPadding},async fn(e){let{x:t,y:n,placement:i,rects:a,platform:o,elements:l,middlewareData:s}=e,{element:u,padding:c=0}=a8(r,e)||{};if(null==u)return{};let d=ou(c),f={x:t,y:n},m=a7(or(i)),h=oe(m),p=await o.getDimensions(u),A="y"===m,g=A?"clientHeight":"clientWidth",v=a.reference[h]+a.reference[m]-f[m]-a.floating[h],B=f[m]-a.reference[m],C=await (null==o.getOffsetParent?void 0:o.getOffsetParent(u)),y=C?C[g]:0;y&&await (null==o.isElement?void 0:o.isElement(C))||(y=l.floating[g]||a.floating[h]);let b=y/2-p[h]/2-1,x=a$(d[A?"top":"left"],b),E=a$(d[A?"bottom":"right"],b),M=y-p[h]-E,S=y/2-p[h]/2+(v/2-B/2),F=a0(x,a$(S,M)),T=!s.arrow&&null!=a4(i)&&S!==F&&a.reference[h]/2-(S{},...d}=a8(a,e),f=await om(e,d),m=a6(o),h=a4(o),p="y"===or(o),{width:A,height:g}=l.floating;"top"===m||"bottom"===m?(n=m,i=h===(await (null==s.isRTL?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(i=m,n="end"===h?"top":"bottom");let v=g-f.top-f.bottom,B=A-f.left-f.right,C=a$(g-f[n],v),y=a$(A-f[i],B),b=!e.middlewareData.shift,x=C,E=y;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(E=B),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(x=v),b&&!h){let e=a0(f.left,0),t=a0(f.right,0),r=a0(f.top,0),n=a0(f.bottom,0);p?E=A-2*(0!==e||0!==t?e+t:a0(f.left,f.right)):x=g-2*(0!==r||0!==n?r+n:a0(f.top,f.bottom))}await c({...e,availableWidth:E,availableHeight:x});let M=await s.getDimensions(u.floating);return A!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}],x=await (o={placement:F,strategy:s?"fixed":"absolute",middleware:y},l=new Map,B={...(v={platform:o1,...o}).platform,_c:l},of(t,M,{...v,platform:B}));null==e||e.setState("currentPlacement",x.placement),I(!0);let E=o5(x.x),S=o5(x.y);if(Object.assign(M.style,{top:"0",left:"0",transform:`translate3d(${E}px,${S}px,0)`}),C&&x.middlewareData.arrow){let{x:e,y:t}=x.middlewareData.arrow,r=x.placement.split("-")[0],n=C.clientWidth/2,i=C.clientHeight/2,a=null!=e?e+n:-n,o=null!=t?t+i:-i;M.style.setProperty("--popover-transform-origin",{top:`${a}px calc(100% + ${i}px)`,bottom:`${a}px ${-i}px`,left:`calc(100% + ${n}px) ${o}px`,right:`${-n}px ${o}px`}[r]),Object.assign(C.style,{left:null!=e?`${e}px`:"",top:null!=t?`${t}px`:"",[r]:"100%"})}},n=function(e,t,r,n){let i;void 0===n&&(n={});let{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:u=!1}=n,c=oN(e),d=a||o?[...c?oH(c):[],...oH(t)]:[];d.forEach(e=>{a&&e.addEventListener("scroll",r,{passive:!0}),o&&e.addEventListener("resize",r)});let f=c&&s?function(e,t){let r,n=null,i=oB(e);function a(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return!function o(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),a();let u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:m}=u;if(l||t(),!f||!m)return;let h={rootMargin:-a2(d)+"px "+-a2(i.clientWidth-(c+f))+"px "+-a2(i.clientHeight-(d+m))+"px "+-a2(c)+"px",threshold:a0(0,a$(1,s))||1},p=!0;function A(t){let n=t[0].intersectionRatio;if(n!==s){if(!p)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}1!==n||o2(u,e.getBoundingClientRect())||o(),p=!1}try{n=new IntersectionObserver(A,{...h,root:i.ownerDocument})}catch(e){n=new IntersectionObserver(A,h)}n.observe(e)}(!0),a}(c,r):null,m=-1,h=null;l&&(h=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),r()}),c&&!u&&h.observe(c),h.observe(t));let p=u?oV(e):null;return u&&function t(){let n=oV(e);p&&!o2(p,n)&&r(),p=n,i=requestAnimationFrame(t)}(),r(),()=>{var e;d.forEach(e=>{a&&e.removeEventListener("scroll",r),o&&e.removeEventListener("resize",r)}),null==f||f(),null==(e=h)||e.disconnect(),h=null,u&&cancelAnimationFrame(i)}}(t,M,async()=>{O?(await P({updatePosition:r}),I(!0)):await r()},{elementResize:"function"==typeof ResizeObserver});return()=>{I(!1),n()}},[e,R,M,b,x,M,F,T,L,s,u,c,d,f,m,h,p,A,g,_,O,P]),nT(()=>{if(!T||!L||!(null==M?void 0:M.isConnected)||!(null==S?void 0:S.isConnected))return;let e=()=>{M.style.zIndex=getComputedStyle(S).zIndex};e();let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>cancelAnimationFrame(t)},[T,L,M,S]);let k=s?"fixed":"absolute";return C=n_(C,t=>(0,i.jsx)("div",{...l,style:{position:k,top:0,left:0,width:"max-content",...null==l?void 0:l.style},ref:null==e?void 0:e.setPopoverElement,children:t}),[e,k,l]),C={"data-placing":!D||void 0,...C=n_(C,t=>(0,i.jsx)(iD,{value:e,children:t}),[e]),style:{position:"relative",...C.style}},C=az({store:e,modal:t,portal:r,preserveTabOrder:n,preserveTabOrderAnchor:E||x,autoFocusOnShow:D&&a,...C,portalRef:G})});aZ(nJ(function(e){return nQ("div",o8(e))}),iR);var o6=nV(function({store:e,modal:t,tabIndex:r,alwaysVisible:n,autoFocusOnHide:i=!0,hideOnInteractOutside:a=!0,...l}){let s=iO();nu(e=e||s,!1);let u=e.useState("baseElement"),c=(0,o.useRef)(!1),d=at(e.tag,e=>null==e?void 0:e.renderedItems.length);return l=ap({store:e,alwaysVisible:n,...l}),l=o8({store:e,modal:t,alwaysVisible:n,backdrop:!1,autoFocusOnShow:!1,finalFocus:u,preserveTabOrderAnchor:null,unstable_treeSnapshotKey:d,...l,getPersistentElements(){var r;let n=(null==(r=l.getPersistentElements)?void 0:r.call(l))||[];if(!t||!e)return n;let{contentElement:i,baseElement:a}=e.getState();if(!a)return n;let o=rZ(a),s=[];if((null==i?void 0:i.id)&&s.push(`[aria-controls~="${i.id}"]`),(null==a?void 0:a.id)&&s.push(`[aria-controls~="${a.id}"]`),!s.length)return[...n,a];let u=s.join(",");return[...n,...o.querySelectorAll(u)]},autoFocusOnHide:e=>!nc(i,e)&&(!c.current||(c.current=!1,!1)),hideOnInteractOutside(t){var r,n;let i=null==e?void 0:e.getState(),o=null==(r=null==i?void 0:i.contentElement)?void 0:r.id,l=null==(n=null==i?void 0:i.baseElement)?void 0:n.id;if(function(e,...t){if(!e)return!1;if("id"in e){let r=t.filter(Boolean).map(e=>`[aria-controls~="${e}"]`).join(", ");return!!r&&e.matches(r)}return!1}(t.target,o,l))return!1;let s="function"==typeof a?a(t):a;return s&&(c.current="click"===t.type),s}})}),o4=aZ(nJ(function(e){return nQ("div",o6(e))}),iO);(0,o.createContext)(null),(0,o.createContext)(null);var o7=nX([n$],[n0]),le=o7.useContext;o7.useScopedContext,o7.useProviderContext,o7.ContextProvider,o7.ScopedContextProvider;var lt={id:null};function lr(e,t){return e.find(e=>t?!e.disabled&&e.id!==t:!e.disabled)}function ln(e,t){return e.filter(e=>e.rowId===t)}function li(e){let t=[];for(let r of e){let e=t.find(e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===r.rowId});e?e.push(r):t.push([r])}return t}function la(e){let t=0;for(let{length:r}of e)r>t&&(t=r);return t}var lo=ng()&&np();function ll({tag:e,...t}={}){let r=iY(t.store,function(e,...t){if(e)return iN(e,"pick")(...t)}(e,["value","rtl"]));iz(t,r);let n=null==e?void 0:e.getState(),i=null==r?void 0:r.getState(),a=nm(t.activeId,null==i?void 0:i.activeId,t.defaultActiveId,null),o=function(e={}){var t;let r=null==(t=e.store)?void 0:t.getState(),n=function(e={}){var t,r;iz(e,e.store);let n=null==(t=e.store)?void 0:t.getState(),i=nm(e.items,null==n?void 0:n.items,e.defaultItems,[]),a=new Map(i.map(e=>[e.id,e])),o={items:i,renderedItems:nm(null==n?void 0:n.renderedItems,[])},l=null==(r=e.store)?void 0:r.__unstablePrivateStore,s=iJ({items:i,renderedItems:o.renderedItems},l),u=iJ(o,e.store),c=e=>{var t;let r,n,i=(t=e=>e.element,r=e.map((e,t)=>[t,e]),n=!1,(r.sort(([e,r],[i,a])=>{var o;let l=t(r),s=t(a);return l!==s&&l&&s?(o=l,s.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING)?(e>i&&(n=!0),-1):(et):e);s.setState("renderedItems",i),u.setState("renderedItems",i)};iK(u,()=>iQ(s)),iK(s,()=>iq(s,["items"],e=>{u.setState("items",e.items)})),iK(s,()=>iq(s,["renderedItems"],e=>{let t=!0,r=requestAnimationFrame(()=>{let{renderedItems:t}=u.getState();e.renderedItems!==t&&c(e.renderedItems)});if("function"!=typeof IntersectionObserver)return()=>cancelAnimationFrame(r);let n=new IntersectionObserver(()=>{if(t){t=!1;return}cancelAnimationFrame(r),r=requestAnimationFrame(()=>c(e.renderedItems))},{root:function(e){var t;let r=e.find(e=>!!e.element),n=[...e].reverse().find(e=>!!e.element),i=null==(t=null==r?void 0:r.element)?void 0:t.parentElement;for(;i&&(null==n?void 0:n.element);){let e=i;if(n&&e.contains(n.element))return i;i=i.parentElement}return rZ(i).body}(e.renderedItems)});for(let t of e.renderedItems)t.element&&n.observe(t.element);return()=>{cancelAnimationFrame(r),n.disconnect()}}));let d=(e,t,r=!1)=>{let n;return t(t=>{let r=t.findIndex(({id:t})=>t===e.id),i=t.slice();if(-1!==r){let o={...n=t[r],...e};i[r]=o,a.set(e.id,o)}else i.push(e),a.set(e.id,e);return i}),()=>{t(t=>{if(!n)return r&&a.delete(e.id),t.filter(({id:t})=>t!==e.id);let i=t.findIndex(({id:t})=>t===e.id);if(-1===i)return t;let o=t.slice();return o[i]=n,a.set(e.id,n),o})}},f=e=>d(e,e=>s.setState("items",e),!0);return{...u,registerItem:f,renderItem:e=>nl(f(e),d(e,e=>s.setState("renderedItems",e))),item:e=>{if(!e)return null;let t=a.get(e);if(!t){let{items:r}=s.getState();(t=r.find(t=>t.id===e))&&a.set(e,t)}return t||null},__unstablePrivateStore:s}}(e),i=nm(e.activeId,null==r?void 0:r.activeId,e.defaultActiveId),a=iJ({...n.getState(),id:nm(e.id,null==r?void 0:r.id,`id-${Math.random().toString(36).slice(2,8)}`),activeId:i,baseElement:nm(null==r?void 0:r.baseElement,null),includesBaseElement:nm(e.includesBaseElement,null==r?void 0:r.includesBaseElement,null===i),moves:nm(null==r?void 0:r.moves,0),orientation:nm(e.orientation,null==r?void 0:r.orientation,"both"),rtl:nm(e.rtl,null==r?void 0:r.rtl,!1),virtualFocus:nm(e.virtualFocus,null==r?void 0:r.virtualFocus,!1),focusLoop:nm(e.focusLoop,null==r?void 0:r.focusLoop,!1),focusWrap:nm(e.focusWrap,null==r?void 0:r.focusWrap,!1),focusShift:nm(e.focusShift,null==r?void 0:r.focusShift,!1)},n,e.store);iK(a,()=>iX(a,["renderedItems","activeId"],e=>{a.setState("activeId",t=>{var r;return void 0!==t?t:null==(r=lr(e.renderedItems))?void 0:r.id})}));let o=(e="next",t={})=>{var r,n;let i=a.getState(),{skip:o=0,activeId:l=i.activeId,focusShift:s=i.focusShift,focusLoop:u=i.focusLoop,focusWrap:c=i.focusWrap,includesBaseElement:d=i.includesBaseElement,renderedItems:f=i.renderedItems,rtl:m=i.rtl}=t,h="up"===e||"down"===e,p="next"===e||"down"===e,A=h?iA(function(e,t,r){let n=la(e);for(let i of e)for(let e=0;ee.id===l);if(!g)return null==(n=lr(A))?void 0:n.id;let v=A.some(e=>e.rowId),B=A.indexOf(g),C=A.slice(B+1),y=ln(C,g.rowId);if(o){let e=y.filter(e=>l?!e.disabled&&e.id!==l:!e.disabled),t=e.slice(o)[0]||e[e.length-1];return null==t?void 0:t.id}let b=u&&(h?"horizontal"!==u:"vertical"!==u),x=v&&c&&(h?"horizontal"!==c:"vertical"!==c),E=p?(!v||h)&&b&&d:!!h&&d;if(b){let e=lr(function(e,t,r=!1){let n=e.findIndex(e=>e.id===t);return[...e.slice(n+1),...r?[lt]:[],...e.slice(0,n)]}(x&&!E?A:ln(A,g.rowId),l,E),l);return null==e?void 0:e.id}if(x){let e=lr(E?y:C,l);return E?(null==e?void 0:e.id)||null:null==e?void 0:e.id}let M=lr(y,l);return!M&&E?null:null==M?void 0:M.id};return{...n,...a,setBaseElement:e=>a.setState("baseElement",e),setActiveId:e=>a.setState("activeId",e),move:e=>{void 0!==e&&(a.setState("activeId",e),a.setState("moves",e=>e+1))},first:()=>{var e;return null==(e=lr(a.getState().renderedItems))?void 0:e.id},last:()=>{var e;return null==(e=lr(ig(a.getState().renderedItems)))?void 0:e.id},next:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),o("next",e)),previous:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),o("previous",e)),down:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),o("down",e)),up:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),o("up",e))}}({...t,activeId:a,includesBaseElement:nm(t.includesBaseElement,null==i?void 0:i.includesBaseElement,!0),orientation:nm(t.orientation,null==i?void 0:i.orientation,"vertical"),focusLoop:nm(t.focusLoop,null==i?void 0:i.focusLoop,!0),focusWrap:nm(t.focusWrap,null==i?void 0:i.focusWrap,!0),virtualFocus:nm(t.virtualFocus,null==i?void 0:i.virtualFocus,!0)}),l=function({popover:e,...t}={}){let r=iY(t.store,iW(e,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));iz(t,r);let n=null==r?void 0:r.getState(),i=aq({...t,store:r}),a=nm(t.placement,null==n?void 0:n.placement,"bottom"),o=iJ({...i.getState(),placement:a,currentPlacement:a,anchorElement:nm(null==n?void 0:n.anchorElement,null),popoverElement:nm(null==n?void 0:n.popoverElement,null),arrowElement:nm(null==n?void 0:n.arrowElement,null),rendered:Symbol("rendered")},i,r);return{...i,...o,setAnchorElement:e=>o.setState("anchorElement",e),setPopoverElement:e=>o.setState("popoverElement",e),setArrowElement:e=>o.setState("arrowElement",e),render:()=>o.setState("rendered",Symbol("rendered"))}}({...t,placement:nm(t.placement,null==i?void 0:i.placement,"bottom-start")}),s=nm(t.value,null==i?void 0:i.value,t.defaultValue,""),u=nm(t.selectedValue,null==i?void 0:i.selectedValue,null==n?void 0:n.values,t.defaultSelectedValue,""),c=Array.isArray(u),d={...o.getState(),...l.getState(),value:s,selectedValue:u,resetValueOnSelect:nm(t.resetValueOnSelect,null==i?void 0:i.resetValueOnSelect,c),resetValueOnHide:nm(t.resetValueOnHide,null==i?void 0:i.resetValueOnHide,c&&!e),activeValue:null==i?void 0:i.activeValue},f=iJ(d,o,l,r);return lo&&iK(f,()=>iX(f,["virtualFocus"],()=>{f.setState("virtualFocus",!1)})),iK(f,()=>{if(e)return nl(iX(f,["selectedValue"],t=>{Array.isArray(t.selectedValue)&&e.setValues(t.selectedValue)}),iX(e,["values"],e=>{f.setState("selectedValue",e.values)}))}),iK(f,()=>iX(f,["resetValueOnHide","mounted"],e=>{!e.resetValueOnHide||e.mounted||f.setState("value",s)})),iK(f,()=>iX(f,["open"],e=>{e.open||(f.setState("activeId",a),f.setState("moves",0))})),iK(f,()=>iX(f,["moves","activeId"],(e,t)=>{e.moves===t.moves&&f.setState("activeValue",void 0)})),iK(f,()=>iq(f,["moves","renderedItems"],(e,t)=>{if(e.moves===t.moves)return;let{activeId:r}=f.getState(),n=o.item(r);f.setState("activeValue",null==n?void 0:n.value)})),{...l,...o,...f,tag:e,setValue:e=>f.setState("value",e),resetValue:()=>f.setState("value",d.value),setSelectedValue:e=>f.setState("selectedValue",e)}}function ls(e={}){var t,r,n,i,a,o,l,s;let u;t=e,u=le();let[c,d]=ai(ll,e={id:nD((r=t={...t,tag:void 0!==t.tag?t.tag:u}).id),...r});return nI(d,[(n=e).tag]),an(c,n,"value","setValue"),an(c,n,"selectedValue","setSelectedValue"),an(c,n,"resetValueOnHide"),an(c,n,"resetValueOnSelect"),Object.assign((o=c,nI(l=d,[(s=n).popover]),an(o,s,"placement"),i=aQ(o,l,s),a=i,nI(d,[n.store]),an(a,n,"items","setItems"),an(i=a,n,"activeId","setActiveId"),an(i,n,"includesBaseElement"),an(i,n,"virtualFocus"),an(i,n,"orientation"),an(i,n,"rtl"),an(i,n,"focusLoop"),an(i,n,"focusWrap"),an(i,n,"focusShift"),i),{tag:n.tag})}function lu(e={}){let t=ls(e);return(0,i.jsx)(ik,{value:t,children:e.children})}var lc=(0,o.createContext)(void 0),ld=nV(function(e){let[t,r]=(0,o.useState)();return nf(e={role:"group","aria-labelledby":t,...e=n_(e,e=>(0,i.jsx)(lc.Provider,{value:r,children:e}),[])})});nJ(function(e){return nQ("div",ld(e))});var lf=nV(function({store:e,...t}){return ld(t)});nJ(function(e){return nQ("div",lf(e))});var lm=nV(function({store:e,...t}){let r=iP();return nu(e=e||r,!1),"grid"===r7(e.useState("contentElement"))&&(t={role:"rowgroup",...t}),t=lf({store:e,...t})}),lh=nJ(function(e){return nQ("div",lm(e))}),lp=nV(function(e){let t=(0,o.useContext)(lc),r=nD(e.id);return nT(()=>(null==t||t(r),()=>null==t?void 0:t(void 0)),[t,r]),nf(e={id:r,"aria-hidden":!0,...e})});nJ(function(e){return nQ("div",lp(e))});var lA=nV(function({store:e,...t}){return lp(t)});nJ(function(e){return nQ("div",lA(e))});var lg=nV(function(e){return lA(e)}),lv=nJ(function(e){return nQ("div",lg(e))}),lB=e.i(38360);let lC={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0},ly=(e,t)=>String(e.rankedValue).localeCompare(String(t.rankedValue));function lb(e,t,r={}){let{keys:n,threshold:i=lC.MATCHES,baseSort:a=ly,sorter:o=e=>e.sort((e,t)=>(function(e,t,r){let{rank:n,keyIndex:i}=e,{rank:a,keyIndex:o}=t;return n!==a?n>a?-1:1:i===o?r(e,t):i{let l=lx(i,u,c),s=t,{minRanking:d,maxRanking:f,threshold:m}=a;return l=lC.MATCHES?l=d:l>f&&(l=f),l>e&&(e=l,r=o,n=m,s=i),{rankedValue:s,rank:e,keyIndex:r,keyThreshold:n}},{rankedValue:l,rank:lC.NO_MATCH,keyIndex:-1,keyThreshold:c.threshold}):{rankedValue:l,rank:lx(l,u,c),keyIndex:-1,keyThreshold:c.threshold}),{rank:f,keyThreshold:m=i}=d;return f>=m&&e.push({...d,item:a,index:o}),e},[])).map(({item:e})=>e)}function lx(e,t,r){if(e=lE(e,r),(t=lE(t,r)).length>e.length)return lC.NO_MATCH;if(e===t)return lC.CASE_SENSITIVE_EQUAL;let n=function*(e,t){let r=-1;for(;(r=e.indexOf(t,r+1))>-1;)yield r;return -1}(e=e.toLowerCase(),t=t.toLowerCase()),i=n.next(),a=i.value;if(e.length===t.length&&0===a)return lC.EQUAL;if(0===a)return lC.STARTS_WITH;let o=i;for(;!o.done;){if(o.value>0&&" "===e[o.value-1])return lC.WORD_STARTS_WITH;o=n.next()}return a>0?lC.CONTAINS:1===t.length?lC.NO_MATCH:(function(e){let t="",r=" ";for(let n=0;n-1))return lC.NO_MATCH;return r=a-l,n=i/t.length,lC.MATCHES+1/r*n}(e,t)}function lE(e,{keepDiacritics:t}){return e=`${e}`,t||(e=(0,lB.default)(e)),e}lb.rankings=lC;let lM={maxRanking:1/0,minRanking:-1/0};var lS=e.i(29402);let lF=new Set(["SkiFree","SkiFree_Daily","SkiFree_Randomizer"]),lT={"missions.vl2":"Official","TR2final105-client.vl2":"Team Rabbit 2","z_mappacks/CTF/Classic_maps_v1.vl2":"Classic","z_mappacks/CTF/DynamixFinalPack.vl2":"Official","z_mappacks/CTF/KryMapPack_b3EDIT.vl2":"KryMapPack","z_mappacks/CTF/S5maps.vl2":"S5","z_mappacks/CTF/S8maps.vl2":"S8","z_mappacks/CTF/TWL-MapPack.vl2":"TWL","z_mappacks/CTF/TWL-MapPackEDIT.vl2":"TWL","z_mappacks/CTF/TWL2-MapPack.vl2":"TWL2","z_mappacks/CTF/TWL2-MapPackEDIT.vl2":"TWL2","z_mappacks/TWL_T2arenaOfficialMaps.vl2":"Arena","z_mappacks/xPack2.vl2":"xPack2","z_mappacks/z_DMP2-V0.6.vl2":"DMP2 (Discord Map Pack)","z_mappacks/zDMP-4.7.3DX.vl2":"DMP (Discord Map Pack)","z_mappacks/zDMP-4.7.3DX-ServerOnly.vl2":"DMP (Discord Map Pack)"},lR={"z_mappacks/DM":"DM","z_mappacks/LCTF":"LCTF","z_mappacks/Lak":"LakRabbit"},lw=(0,t9.getMissionList)().filter(e=>!lF.has(e)).map(e=>{let t,r=(0,t9.getMissionInfo)(e),[n]=(0,t9.getSourceAndPath)(r.resourcePath),i=(t=n.match(/^(.*)(\/[^/]+)$/))?t[1]:"",a=lT[n]??lR[i]??null;return{resourcePath:r.resourcePath,missionName:e,displayName:r.displayName,sourcePath:n,groupName:a,missionTypes:r.missionTypes}}),lD=new Map(lw.map(e=>[e.missionName,e])),lI=function(e){let t=new Map;for(let r of e){let e=t.get(r.groupName)??[];e.push(r),t.set(r.groupName,e)}return t.forEach((e,r)=>{t.set(r,(0,lS.default)(e,[e=>(e.displayName||e.missionName).toLowerCase()],["asc"]))}),(0,lS.default)(Array.from(t.entries()),[([e])=>"Official"===e?0:null==e?2:1,([e])=>e?e.toLowerCase():""],["asc","asc"])}(lw),lG="undefined"!=typeof navigator&&/Mac|iPhone|iPad|iPod/.test(navigator.platform);function lL(e){let t,r,n,o,l,s=(0,a.c)(12),{mission:u}=e,c=u.displayName||u.missionName;return s[0]!==c?(t=(0,i.jsx)("span",{className:"MissionSelect-itemName",children:c}),s[0]=c,s[1]=t):t=s[1],s[2]!==u.missionTypes?(r=u.missionTypes.length>0&&(0,i.jsx)("span",{className:"MissionSelect-itemTypes",children:u.missionTypes.map(l_)}),s[2]=u.missionTypes,s[3]=r):r=s[3],s[4]!==t||s[5]!==r?(n=(0,i.jsxs)("span",{className:"MissionSelect-itemHeader",children:[t,r]}),s[4]=t,s[5]=r,s[6]=n):n=s[6],s[7]!==u.missionName?(o=(0,i.jsx)("span",{className:"MissionSelect-itemMissionName",children:u.missionName}),s[7]=u.missionName,s[8]=o):o=s[8],s[9]!==n||s[10]!==o?(l=(0,i.jsxs)(i.Fragment,{children:[n,o]}),s[9]=n,s[10]=o,s[11]=l):l=s[11],l}function l_(e){return(0,i.jsx)("span",{className:"MissionSelect-itemType","data-mission-type":e,children:e},e)}function lP(e){let t,r,n,l,s,u,c,d,f,m,h,p,A,g,v,B,C,y=(0,a.c)(43),{value:b,missionType:x,onChange:E}=e,[M,S]=(0,o.useState)(""),F=(0,o.useRef)(null),T=(0,o.useRef)(x);y[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{(0,o.startTransition)(()=>S(e))},y[0]=t):t=y[0];let R=ls({resetValueOnHide:!0,selectedValue:b,setSelectedValue:e=>{if(e){let t=T.current,r=(0,t9.getMissionInfo)(e).missionTypes;t&&r.includes(t)||(t=r[0]),E({missionName:e,missionType:t}),F.current?.blur()}},setValue:t});y[1]!==R?(r=()=>{let e=e=>{"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),F.current?.focus(),R.show())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},n=[R],y[1]=R,y[2]=r,y[3]=n):(r=y[2],n=y[3]),(0,o.useEffect)(r,n),y[4]!==b?(l=lD.get(b),y[4]=b,y[5]=l):l=y[5];let w=l;e:{let e,t;if(!M){let e;y[6]===Symbol.for("react.memo_cache_sentinel")?(e={type:"grouped",groups:lI},y[6]=e):e=y[6],s=e;break e}y[7]!==M?(e=lb(lw,M,{keys:["displayName","missionName","missionTypes","groupName"]}),y[7]=M,y[8]=e):e=y[8];let r=e;y[9]!==r?(t={type:"flat",missions:r},y[9]=r,y[10]=t):t=y[10],s=t}let D=s,I=w?w.displayName||w.missionName:b,G="flat"===D.type?0===D.missions.length:0===D.groups.length,L=e=>(0,i.jsx)(as,{value:e.missionName,className:"MissionSelect-item",focusOnHover:!0,onClick:t=>{if(t.target&&t.target instanceof HTMLElement){let r=t.target.dataset.missionType;r?(T.current=r,e.missionName===b&&E({missionName:e.missionName,missionType:r})):T.current=null}else T.current=null},children:(0,i.jsx)(lL,{mission:e})},e.missionName);y[11]!==R?(u=()=>{document.exitPointerLock(),R.show()},c=e=>{"Escape"!==e.key||R.getState().open||F.current?.blur()},y[11]=R,y[12]=u,y[13]=c):(u=y[12],c=y[13]),y[14]!==I||y[15]!==u||y[16]!==c?(d=(0,i.jsx)(i1,{ref:F,autoSelect:!0,placeholder:I,className:"MissionSelect-input",onFocus:u,onKeyDown:c}),y[14]=I,y[15]=u,y[16]=c,y[17]=d):d=y[17],y[18]!==I?(f=(0,i.jsx)("span",{className:"MissionSelect-selectedName",children:I}),y[18]=I,y[19]=f):f=y[19],y[20]!==x?(m=x&&(0,i.jsx)("span",{className:"MissionSelect-itemType","data-mission-type":x,children:x}),y[20]=x,y[21]=m):m=y[21],y[22]!==m||y[23]!==f?(h=(0,i.jsxs)("div",{className:"MissionSelect-selectedValue",children:[f,m]}),y[22]=m,y[23]=f,y[24]=h):h=y[24],y[25]===Symbol.for("react.memo_cache_sentinel")?(p=(0,i.jsx)("kbd",{className:"MissionSelect-shortcut",children:lG?"⌘K":"^K"}),y[25]=p):p=y[25],y[26]!==h||y[27]!==d?(A=(0,i.jsxs)("div",{className:"MissionSelect-inputWrapper",children:[d,h,p]}),y[26]=h,y[27]=d,y[28]=A):A=y[28];let _="flat"===D.type?D.missions.map(L):D.groups.map(e=>{let[t,r]=e;return t?(0,i.jsxs)(lh,{className:"MissionSelect-group",children:[(0,i.jsx)(lv,{className:"MissionSelect-groupLabel",children:t}),r.map(L)]},t):(0,i.jsx)(o.Fragment,{children:r.map(L)},"ungrouped")});return y[29]!==G?(g=G&&(0,i.jsx)("div",{className:"MissionSelect-noResults",children:"No missions found"}),y[29]=G,y[30]=g):g=y[30],y[31]!==aA||y[32]!==_||y[33]!==g?(v=(0,i.jsxs)(aA,{className:"MissionSelect-list",children:[_,g]}),y[31]=aA,y[32]=_,y[33]=g,y[34]=v):v=y[34],y[35]!==o4||y[36]!==v?(B=(0,i.jsx)(o4,{gutter:4,fitViewport:!0,autoFocusOnHide:!1,className:"MissionSelect-popover",children:v}),y[35]=o4,y[36]=v,y[37]=B):B=y[37],y[38]!==lu||y[39]!==R||y[40]!==A||y[41]!==B?(C=(0,i.jsxs)(lu,{store:R,children:[A,B]}),y[38]=lu,y[39]=R,y[40]=A,y[41]=B,y[42]=C):C=y[42],C}var lO=e.i(11152),lk=e.i(40141);function lH(e){return(0,lk.GenIcon)({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M192 0c-41.8 0-77.4 26.7-90.5 64L64 64C28.7 64 0 92.7 0 128L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64l-37.5 0C269.4 26.7 233.8 0 192 0zm0 64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM305 273L177 401c-9.4 9.4-24.6 9.4-33.9 0L79 337c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L271 239c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"},child:[]}]})(e)}function lj(e){let t,r,n,l,s,u=(0,a.c)(11),{cameraRef:c,missionName:d,missionType:f}=e,{fogEnabled:m}=(0,S.useSettings)(),[h,p]=(0,o.useState)(!1),A=(0,o.useRef)(null);u[0]!==c||u[1]!==m||u[2]!==d||u[3]!==f?(t=async()=>{clearTimeout(A.current);let e=c.current;if(!e)return;let t=function({position:e,quaternion:t}){let r=e=>parseFloat(e.toFixed(3)),n=`${r(e.x)},${r(e.y)},${r(e.z)}`,i=`${r(t.x)},${r(t.y)},${r(t.z)},${r(t.w)}`;return`#c${n}~${i}`}(e),r=new URLSearchParams;r.set("mission",`${d}~${f}`),r.set("fog",m.toString());let n=`${window.location.pathname}?${r}${t}`,i=`${window.location.origin}${n}`;window.history.replaceState(null,"",n);try{await navigator.clipboard.writeText(i),p(!0),A.current=setTimeout(()=>{p(!1)},1100)}catch(e){console.error(e)}},u[0]=c,u[1]=m,u[2]=d,u[3]=f,u[4]=t):t=u[4];let g=t,v=h?"true":"false";return u[5]===Symbol.for("react.memo_cache_sentinel")?(r=(0,i.jsx)(lO.FaMapPin,{className:"MapPin"}),n=(0,i.jsx)(lH,{className:"ClipboardCheck"}),l=(0,i.jsx)("span",{className:"ButtonLabel",children:" Copy coordinates URL"}),u[5]=r,u[6]=n,u[7]=l):(r=u[5],n=u[6],l=u[7]),u[8]!==g||u[9]!==v?(s=(0,i.jsxs)("button",{type:"button",className:"IconButton LabelledButton CopyCoordinatesButton","aria-label":"Copy coordinates URL",title:"Copy coordinates URL",onClick:g,"data-copied":v,id:"copyCoordinatesButton",children:[r,n,l]}),u[8]=g,u[9]=v,u[10]=s):s=u[10],s}function lU(e){return(0,lk.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12.01",y2:"8"},child:[]}]})(e)}function lN(e){return(0,lk.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"},child:[]},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"},child:[]}]})(e)}function lJ(e){let t,r,n,l,s,u,c,d,f,m,h,p,A,g,v,B,C,y,b,x,E,M,F,T,R,w,D,I,G,L,_,P,O,k,H,j,U,N,J,K,Q,V,X,q,W=(0,a.c)(99),{missionName:Y,missionType:z,onChangeMission:Z,onOpenMapInfo:$,cameraRef:ee,isTouch:et}=e,{fogEnabled:er,setFogEnabled:en,fov:ei,setFov:ea,audioEnabled:eo,setAudioEnabled:el,animationEnabled:es,setAnimationEnabled:eu}=(0,S.useSettings)(),{speedMultiplier:ec,setSpeedMultiplier:ed,touchMode:ef,setTouchMode:em}=(0,S.useControls)(),{debugMode:eh,setDebugMode:ep}=(0,S.useDebug)(),[eA,eg]=(0,o.useState)(!1),ev=(0,o.useRef)(null),eB=(0,o.useRef)(null),eC=(0,o.useRef)(null);W[0]!==eA?(t=()=>{eA&&ev.current?.focus()},r=[eA],W[0]=eA,W[1]=t,W[2]=r):(t=W[1],r=W[2]),(0,o.useEffect)(t,r),W[3]===Symbol.for("react.memo_cache_sentinel")?(n=e=>{let t=e.relatedTarget;t&&eC.current?.contains(t)||eg(!1)},W[3]=n):n=W[3];let ey=n;W[4]===Symbol.for("react.memo_cache_sentinel")?(l=e=>{"Escape"===e.key&&(eg(!1),eB.current?.focus())},W[4]=l):l=W[4];let eb=l;return W[5]!==Y||W[6]!==z||W[7]!==Z?(s=(0,i.jsx)(lP,{value:Y,missionType:z,onChange:Z}),W[5]=Y,W[6]=z,W[7]=Z,W[8]=s):s=W[8],W[9]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{eg(lK)},W[9]=u):u=W[9],W[10]===Symbol.for("react.memo_cache_sentinel")?(c=(0,i.jsx)(lN,{}),W[10]=c):c=W[10],W[11]!==eA?(d=(0,i.jsx)("button",{ref:eB,className:"IconButton Controls-toggle",onClick:u,"aria-expanded":eA,"aria-controls":"settingsPanel","aria-label":"Settings",children:c}),W[11]=eA,W[12]=d):d=W[12],W[13]!==ee||W[14]!==Y||W[15]!==z?(f=(0,i.jsx)(lj,{cameraRef:ee,missionName:Y,missionType:z}),W[13]=ee,W[14]=Y,W[15]=z,W[16]=f):f=W[16],W[17]===Symbol.for("react.memo_cache_sentinel")?(m=(0,i.jsx)(lU,{}),h=(0,i.jsx)("span",{className:"ButtonLabel",children:"Show map info"}),W[17]=m,W[18]=h):(m=W[17],h=W[18]),W[19]!==$?(p=(0,i.jsxs)("button",{type:"button",className:"IconButton LabelledButton MapInfoButton","aria-label":"Show map info",onClick:$,children:[m,h]}),W[19]=$,W[20]=p):p=W[20],W[21]!==p||W[22]!==f?(A=(0,i.jsxs)("div",{className:"Controls-group",children:[f,p]}),W[21]=p,W[22]=f,W[23]=A):A=W[23],W[24]!==en?(g=e=>{en(e.target.checked)},W[24]=en,W[25]=g):g=W[25],W[26]!==er||W[27]!==g?(v=(0,i.jsx)("input",{id:"fogInput",type:"checkbox",checked:er,onChange:g}),W[26]=er,W[27]=g,W[28]=v):v=W[28],W[29]===Symbol.for("react.memo_cache_sentinel")?(B=(0,i.jsx)("label",{htmlFor:"fogInput",children:"Fog?"}),W[29]=B):B=W[29],W[30]!==v?(C=(0,i.jsxs)("div",{className:"CheckboxField",children:[v,B]}),W[30]=v,W[31]=C):C=W[31],W[32]!==el?(y=e=>{el(e.target.checked)},W[32]=el,W[33]=y):y=W[33],W[34]!==eo||W[35]!==y?(b=(0,i.jsx)("input",{id:"audioInput",type:"checkbox",checked:eo,onChange:y}),W[34]=eo,W[35]=y,W[36]=b):b=W[36],W[37]===Symbol.for("react.memo_cache_sentinel")?(x=(0,i.jsx)("label",{htmlFor:"audioInput",children:"Audio?"}),W[37]=x):x=W[37],W[38]!==b?(E=(0,i.jsxs)("div",{className:"CheckboxField",children:[b,x]}),W[38]=b,W[39]=E):E=W[39],W[40]!==C||W[41]!==E?(M=(0,i.jsxs)("div",{className:"Controls-group",children:[C,E]}),W[40]=C,W[41]=E,W[42]=M):M=W[42],W[43]!==eu?(F=e=>{eu(e.target.checked)},W[43]=eu,W[44]=F):F=W[44],W[45]!==es||W[46]!==F?(T=(0,i.jsx)("input",{id:"animationInput",type:"checkbox",checked:es,onChange:F}),W[45]=es,W[46]=F,W[47]=T):T=W[47],W[48]===Symbol.for("react.memo_cache_sentinel")?(R=(0,i.jsx)("label",{htmlFor:"animationInput",children:"Animation?"}),W[48]=R):R=W[48],W[49]!==T?(w=(0,i.jsxs)("div",{className:"CheckboxField",children:[T,R]}),W[49]=T,W[50]=w):w=W[50],W[51]!==ep?(D=e=>{ep(e.target.checked)},W[51]=ep,W[52]=D):D=W[52],W[53]!==eh||W[54]!==D?(I=(0,i.jsx)("input",{id:"debugInput",type:"checkbox",checked:eh,onChange:D}),W[53]=eh,W[54]=D,W[55]=I):I=W[55],W[56]===Symbol.for("react.memo_cache_sentinel")?(G=(0,i.jsx)("label",{htmlFor:"debugInput",children:"Debug?"}),W[56]=G):G=W[56],W[57]!==I?(L=(0,i.jsxs)("div",{className:"CheckboxField",children:[I,G]}),W[57]=I,W[58]=L):L=W[58],W[59]!==w||W[60]!==L?(_=(0,i.jsxs)("div",{className:"Controls-group",children:[w,L]}),W[59]=w,W[60]=L,W[61]=_):_=W[61],W[62]===Symbol.for("react.memo_cache_sentinel")?(P=(0,i.jsx)("label",{htmlFor:"fovInput",children:"FOV"}),W[62]=P):P=W[62],W[63]!==ea?(O=e=>ea(parseInt(e.target.value)),W[63]=ea,W[64]=O):O=W[64],W[65]!==ei||W[66]!==O?(k=(0,i.jsx)("input",{id:"fovInput",type:"range",min:75,max:120,step:5,value:ei,onChange:O}),W[65]=ei,W[66]=O,W[67]=k):k=W[67],W[68]!==ei?(H=(0,i.jsx)("output",{htmlFor:"fovInput",children:ei}),W[68]=ei,W[69]=H):H=W[69],W[70]!==k||W[71]!==H?(j=(0,i.jsxs)("div",{className:"Field",children:[P,k,H]}),W[70]=k,W[71]=H,W[72]=j):j=W[72],W[73]===Symbol.for("react.memo_cache_sentinel")?(U=(0,i.jsx)("label",{htmlFor:"speedInput",children:"Speed"}),W[73]=U):U=W[73],W[74]!==ed?(N=e=>ed(parseFloat(e.target.value)),W[74]=ed,W[75]=N):N=W[75],W[76]!==ec||W[77]!==N?(J=(0,i.jsxs)("div",{className:"Field",children:[U,(0,i.jsx)("input",{id:"speedInput",type:"range",min:.1,max:5,step:.05,value:ec,onChange:N})]}),W[76]=ec,W[77]=N,W[78]=J):J=W[78],W[79]!==j||W[80]!==J?(K=(0,i.jsxs)("div",{className:"Controls-group",children:[j,J]}),W[79]=j,W[80]=J,W[81]=K):K=W[81],W[82]!==et||W[83]!==em||W[84]!==ef?(Q=et&&(0,i.jsx)("div",{className:"Controls-group",children:(0,i.jsxs)("div",{className:"Field",children:[(0,i.jsx)("label",{htmlFor:"touchModeInput",children:"Joystick:"})," ",(0,i.jsxs)("select",{id:"touchModeInput",value:ef,onChange:e=>em(e.target.value),children:[(0,i.jsx)("option",{value:"dualStick",children:"Dual Stick"}),(0,i.jsx)("option",{value:"moveLookStick",children:"Single Stick"})]})]})}),W[82]=et,W[83]=em,W[84]=ef,W[85]=Q):Q=W[85],W[86]!==eA||W[87]!==A||W[88]!==M||W[89]!==_||W[90]!==K||W[91]!==Q?(V=(0,i.jsxs)("div",{className:"Controls-dropdown",ref:ev,id:"settingsPanel",tabIndex:-1,onKeyDown:eb,onBlur:ey,"data-open":eA,children:[A,M,_,K,Q]}),W[86]=eA,W[87]=A,W[88]=M,W[89]=_,W[90]=K,W[91]=Q,W[92]=V):V=W[92],W[93]!==V||W[94]!==d?(X=(0,i.jsxs)("div",{ref:eC,children:[d,V]}),W[93]=V,W[94]=d,W[95]=X):X=W[95],W[96]!==X||W[97]!==s?(q=(0,i.jsxs)("div",{id:"controls",onKeyDown:lX,onPointerDown:lV,onClick:lQ,children:[s,X]}),W[96]=X,W[97]=s,W[98]=q):q=W[98],q}function lK(e){return!e}function lQ(e){return e.stopPropagation()}function lV(e){return e.stopPropagation()}function lX(e){return e.stopPropagation()}let lq=()=>null,lW=o.forwardRef(({envMap:e,resolution:t=256,frames:r=1/0,makeDefault:n,children:i,...a},l)=>{let s=(0,C.useThree)(({set:e})=>e),c=(0,C.useThree)(({camera:e})=>e),d=(0,C.useThree)(({size:e})=>e),f=o.useRef(null);o.useImperativeHandle(l,()=>f.current,[]);let m=o.useRef(null),h=function(e,t,r){let n=(0,C.useThree)(e=>e.size),i=(0,C.useThree)(e=>e.viewport),a="number"==typeof e?e:n.width*i.dpr,l=n.height*i.dpr,s=("number"==typeof e?void 0:e)||{},{samples:c=0,depth:d,...f}=s,m=null!=d?d:s.depthBuffer,h=o.useMemo(()=>{let e=new u.WebGLRenderTarget(a,l,{minFilter:u.LinearFilter,magFilter:u.LinearFilter,type:u.HalfFloatType,...f});return m&&(e.depthTexture=new u.DepthTexture(a,l,u.FloatType)),e.samples=c,e},[]);return o.useLayoutEffect(()=>{h.setSize(a,l),c&&(h.samples=c)},[c,h,a,l]),o.useEffect(()=>()=>h.dispose(),[]),h}(t);o.useLayoutEffect(()=>{a.manual||(f.current.aspect=d.width/d.height)},[d,a]),o.useLayoutEffect(()=>{f.current.updateProjectionMatrix()});let p=0,A=null,g="function"==typeof i;return(0,B.useFrame)(t=>{g&&(r===1/0||p{if(n)return s(()=>({camera:f.current})),()=>s(()=>({camera:c}))},[f,n,s]),o.createElement(o.Fragment,null,o.createElement("perspectiveCamera",(0,W.default)({ref:f},a),!g&&i),o.createElement("group",{ref:m},g&&i(h.texture)))});function lY(){let e,t,r=(0,a.c)(3),{fov:n}=(0,S.useSettings)();return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=[0,256,0],r[0]=e):e=r[0],r[1]!==n?(t=(0,i.jsx)(lW,{makeDefault:!0,position:e,fov:n}),r[1]=n,r[2]=t):t=r[2],t}var lz=e.i(51434),lZ=e.i(81405);function l$(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function l0({showPanel:e=0,className:t,parent:r}){let n=function(e,t=[],r){let[n,i]=o.useState();return o.useLayoutEffect(()=>{let t=e();return i(t),l$(void 0,t),()=>l$(void 0,null)},t),n}(()=>new lZ.default,[]);return o.useEffect(()=>{if(n){let i=r&&r.current||document.body;n.showPanel(e),null==i||i.appendChild(n.dom);let a=(null!=t?t:"").split(" ").filter(e=>e);a.length&&n.dom.classList.add(...a);let o=(0,l.j)(()=>n.begin()),s=(0,l.k)(()=>n.end());return()=>{a.length&&n.dom.classList.remove(...a),null==i||i.removeChild(n.dom),o(),s()}}},[r,n,t,e]),null}var l1=e.i(60099);function l2(){let e,t,r=(0,a.c)(3),{debugMode:n}=(0,S.useDebug)(),l=(0,o.useRef)(null);return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{let e=l.current;e&&e.setColors("rgb(153, 255, 0)","rgb(0, 153, 255)","rgb(255, 153, 0)")},r[0]=e):e=r[0],(0,o.useEffect)(e),r[1]!==n?(t=n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l0,{className:"StatsPanel"}),(0,i.jsx)("axesHelper",{ref:l,args:[70],renderOrder:999,children:(0,i.jsx)("lineBasicMaterial",{depthTest:!1,depthWrite:!1,fog:!1,vertexColors:!0})}),(0,i.jsx)(l1.Html,{position:[80,0,0],center:!0,children:(0,i.jsx)("span",{className:"AxisLabel","data-axis":"y",children:"Y"})}),(0,i.jsx)(l1.Html,{position:[0,80,0],center:!0,children:(0,i.jsx)("span",{className:"AxisLabel","data-axis":"z",children:"Z"})}),(0,i.jsx)(l1.Html,{position:[0,0,80],center:!0,children:(0,i.jsx)("span",{className:"AxisLabel","data-axis":"x",children:"X"})})]}):null,r[1]=n,r[2]=t):t=r[2],t}var l9=e.i(50361),l3=e.i(24540);function l5(e,t,r){try{return e(t)}catch(e){return(0,l3.l)("[nuqs] Error while parsing value `%s`: %O"+(r?" (for key `%s`)":""),t,e,r),null}}function l8(e){function t(t){if(void 0===t)return null;let r="";if(Array.isArray(t)){if(void 0===t[0])return null;r=t[0]}return"string"==typeof t&&(r=t),l5(e.parse,r)}return{type:"single",eq:(e,t)=>e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide:r=>t(r)??e}},withOptions(e){return{...this,...e}}}}l8({parse:e=>e,serialize:String}),l8({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)}),l8({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)}),l8({parse:e=>{let t=parseInt(e,16);return t==t?t:null},serialize:e=>{let t=Math.round(e).toString(16);return(1&t.length?"0":"")+t}}),l8({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String});let l6=l8({parse:e=>"true"===e.toLowerCase(),serialize:String});function l4(e,t){return e.valueOf()===t.valueOf()}l8({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:l4}),l8({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:l4}),l8({parse:e=>{let t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:l4});let l7=(0,l9.r)(),se={};function st(e,t,r,n,i,a){let o=!1,l=Object.entries(e).reduce((e,[l,s])=>{var u;let c=t?.[l]??l,d=n[c],f="multi"===s.type?[]:null,m=void 0===d?("multi"===s.type?r?.getAll(c):r?.get(c))??f:d;return i&&a&&((u=i[c]??f)===m||null!==u&&null!==m&&"string"!=typeof u&&"string"!=typeof m&&u.length===m.length&&u.every((e,t)=>e===m[t]))?e[l]=a[l]??null:(o=!0,e[l]=((0,l9.i)(m)?null:l5(s.parse,m,c))??null,i&&(i[c]=m)),e},{});if(!o){let t=Object.keys(e),r=Object.keys(a??{});o=t.length!==r.length||t.some(e=>!r.includes(e))}return{state:l,hasChanged:o}}function sr(e,t){return Object.fromEntries(Object.keys(e).map(r=>[r,e[r]??t[r]??null]))}function sn(e,t={}){let{parse:r,type:n,serialize:i,eq:a,defaultValue:l,...s}=t,[{[e]:u},c]=function(e,t={}){let r=(0,o.useId)(),n=(0,l3.i)(),i=(0,l3.a)(),{history:a="replace",scroll:l=n?.scroll??!1,shallow:s=n?.shallow??!0,throttleMs:u=l9.s.timeMs,limitUrlUpdates:c=n?.limitUrlUpdates,clearOnDefault:d=n?.clearOnDefault??!0,startTransition:f,urlKeys:m=se}=t,h=Object.keys(e).join(","),p=(0,o.useMemo)(()=>Object.fromEntries(Object.keys(e).map(e=>[e,m[e]??e])),[h,JSON.stringify(m)]),A=(0,l3.r)(Object.values(p)),g=A.searchParams,v=(0,o.useRef)({}),B=(0,o.useMemo)(()=>Object.fromEntries(Object.keys(e).map(t=>[t,e[t].defaultValue??null])),[Object.values(e).map(({defaultValue:e})=>e).join(",")]),C=l9.t.useQueuedQueries(Object.values(p)),[y,b]=(0,o.useState)(()=>st(e,m,g??new URLSearchParams,C).state),x=(0,o.useRef)(y);if((0,l3.c)("[nuq+ %s `%s`] render - state: %O, iSP: %s",r,h,y,g),Object.keys(v.current).join("&")!==Object.values(p).join("&")){let{state:t,hasChanged:n}=st(e,m,g,C,v.current,x.current);n&&((0,l3.c)("[nuq+ %s `%s`] State changed: %O",r,h,{state:t,initialSearchParams:g,queuedQueries:C,queryRef:v.current,stateRef:x.current}),x.current=t,b(t)),v.current=Object.fromEntries(Object.entries(p).map(([t,r])=>[r,e[t]?.type==="multi"?g?.getAll(r):g?.get(r)??null]))}(0,o.useEffect)(()=>{let{state:t,hasChanged:n}=st(e,m,g,C,v.current,x.current);n&&((0,l3.c)("[nuq+ %s `%s`] State changed: %O",r,h,{state:t,initialSearchParams:g,queuedQueries:C,queryRef:v.current,stateRef:x.current}),x.current=t,b(t))},[Object.values(p).map(e=>`${e}=${g?.getAll(e)}`).join("&"),JSON.stringify(C)]),(0,o.useEffect)(()=>{let t=Object.keys(e).reduce((t,n)=>(t[n]=({state:t,query:i})=>{b(a=>{let{defaultValue:o}=e[n],l=p[n],s=t??o??null;return Object.is(a[n]??o??null,s)?((0,l3.c)("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",r,h,l,t,o,x.current),a):(x.current={...x.current,[n]:s},v.current[l]=i,(0,l3.c)("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",r,h,l,t,o,x.current),x.current)})},t),{});for(let n of Object.keys(e)){let e=p[n];(0,l3.c)("[nuq+ %s `%s`] Subscribing to sync for `%s`",r,e,h),l7.on(e,t[n])}return()=>{for(let n of Object.keys(e)){let e=p[n];(0,l3.c)("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",r,e,h),l7.off(e,t[n])}}},[h,p]);let E=(0,o.useCallback)((t,n={})=>{let o,m=Object.fromEntries(Object.keys(e).map(e=>[e,null])),g="function"==typeof t?t(sr(x.current,B))??m:t??m;(0,l3.c)("[nuq+ %s `%s`] setState: %O",r,h,g);let v=0,C=!1,y=[];for(let[t,r]of Object.entries(g)){let m=e[t],h=p[t];if(!m||void 0===r)continue;(n.clearOnDefault??m.clearOnDefault??d)&&null!==r&&void 0!==m.defaultValue&&(m.eq??((e,t)=>e===t))(r,m.defaultValue)&&(r=null);let g=null===r?null:(m.serialize??String)(r);l7.emit(h,{state:r,query:g});let B={key:h,query:g,options:{history:n.history??m.history??a,shallow:n.shallow??m.shallow??s,scroll:n.scroll??m.scroll??l,startTransition:n.startTransition??m.startTransition??f}};if(n?.limitUrlUpdates?.method==="debounce"||c?.method==="debounce"||m.limitUrlUpdates?.method==="debounce"){!0===B.options.shallow&&console.warn((0,l3.s)(422));let e=n?.limitUrlUpdates?.timeMs??c?.timeMs??m.limitUrlUpdates?.timeMs??l9.s.timeMs,t=l9.t.push(B,e,A,i);vt(e),C?l9.n.flush(A,i):l9.n.getPendingPromise(A));return o??b},[h,a,s,l,u,c?.method,c?.timeMs,f,p,A.updateUrl,A.getSearchParamsSnapshot,A.rateLimitFactor,i,B]);return[(0,o.useMemo)(()=>sr(y,B),[y,B]),E]}({[e]:{parse:r??(e=>e),type:n,serialize:i,eq:a,defaultValue:l}},s);return[u,(0,o.useCallback)((t,r={})=>c(r=>({[e]:"function"==typeof t?t(r[e]):t}),r),[e,c])]}let si=(0,o.lazy)(()=>e.A(59197).then(e=>({default:e.MapInfoDialog}))),sa=new rm,so={toneMapping:u.NoToneMapping,outputColorSpace:u.SRGBColorSpace},sl=l8({parse(e){let[t,r]=e.split("~"),n=r,i=(0,t9.getMissionInfo)(t).missionTypes;return r&&i.includes(r)||(n=i[0]),{missionName:t,missionType:n}},serialize:({missionName:e,missionType:t})=>1===(0,t9.getMissionInfo)(e).missionTypes.length?e:`${e}~${t}`,eq:(e,t)=>e.missionName===t.missionName&&e.missionType===t.missionType}).withDefault({missionName:"RiverDance",missionType:"CTF"});function ss(){let e,t,r,n,l,s,c,d,f,m,h,A,g,v,B,C,y,b,x,E,M,F,T,R,w,D,I,G,L,_,P,O,k,H=(0,a.c)(60),[j,U]=sn("mission",sl),[N,J]=sn("fog",l6);H[0]!==J?(e=()=>{J(null)},H[0]=J,H[1]=e):e=H[1];let K=e;H[2]!==K||H[3]!==U?(t=e=>{window.location.hash="",K(),U(e)},H[2]=K,H[3]=U,H[4]=t):t=H[4];let Q=t,V=(_=(0,a.c)(2),P=(0,o.useRef)(null),_[0]===Symbol.for("react.memo_cache_sentinel")?(G=e=>{let t=window.matchMedia("(pointer: coarse)");return t.addEventListener("change",e),P.current=t,()=>{t.removeEventListener("change",e)}},_[0]=G):G=_[0],O=G,_[1]===Symbol.for("react.memo_cache_sentinel")?(L=()=>P.current?.matches??null,_[1]=L):L=_[1],k=L,(0,o.useSyncExternalStore)(O,k,lq)),{missionName:X,missionType:q}=j,[W,Y]=(0,o.useState)(!1),[z,Z]=(0,o.useState)(0),[$,ee]=(0,o.useState)(!0),et=z<1;H[5]!==et?(r=()=>{if(et)ee(!0);else{let e=setTimeout(()=>ee(!1),500);return()=>clearTimeout(e)}},n=[et],H[5]=et,H[6]=r,H[7]=n):(r=H[6],n=H[7]),(0,o.useEffect)(r,n),H[8]!==Q?(l=()=>(window.setMissionName=e=>{let t=(0,t9.getMissionInfo)(e).missionTypes;Q({missionName:e,missionType:t[0]})},window.getMissionList=t9.getMissionList,window.getMissionInfo=t9.getMissionInfo,su),s=[Q],H[8]=Q,H[9]=l,H[10]=s):(l=H[9],s=H[10]),(0,o.useEffect)(l,s),H[11]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{let e=e=>{if("KeyI"!==e.code||e.metaKey||e.ctrlKey||e.altKey)return;let t=e.target;"INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||Y(!0)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},d=[],H[11]=c,H[12]=d):(c=H[11],d=H[12]),(0,o.useEffect)(c,d),H[13]===Symbol.for("react.memo_cache_sentinel")?(f=(e,t)=>{Z(void 0===t?0:t)},H[13]=f):f=H[13];let er=f,en=(0,o.useRef)(null);H[14]===Symbol.for("react.memo_cache_sentinel")?(m={angle:0,force:0},H[14]=m):m=H[14];let ei=(0,o.useRef)(m),ea=(0,o.useRef)(null);H[15]===Symbol.for("react.memo_cache_sentinel")?(h={angle:0,force:0},H[15]=h):h=H[15];let eo=(0,o.useRef)(h),el=(0,o.useRef)(null);H[16]!==et||H[17]!==z||H[18]!==$?(A=$&&(0,i.jsxs)("div",{id:"loadingIndicator","data-complete":!et,children:[(0,i.jsx)("div",{className:"LoadingSpinner"}),(0,i.jsx)("div",{className:"LoadingProgress",children:(0,i.jsx)("div",{className:"LoadingProgress-bar",style:{width:`${100*z}%`}})}),(0,i.jsxs)("div",{className:"LoadingProgress-text",children:[Math.round(100*z),"%"]})]}),H[16]=et,H[17]=z,H[18]=$,H[19]=A):A=H[19],H[20]===Symbol.for("react.memo_cache_sentinel")?(g={type:u.PCFShadowMap},v=e=>{en.current=e.camera},H[20]=g,H[21]=v):(g=H[20],v=H[21]);let es=`${X}~${q}`;return H[22]!==X||H[23]!==q||H[24]!==es?(B=(0,i.jsx)(t6,{name:X,missionType:q,onLoadingChange:er},es),H[22]=X,H[23]=q,H[24]=es,H[25]=B):B=H[25],H[26]===Symbol.for("react.memo_cache_sentinel")?(C=(0,i.jsx)(lY,{}),y=(0,i.jsx)(l2,{}),H[26]=C,H[27]=y):(C=H[26],y=H[27]),H[28]!==V?(b=null===V?null:V?(0,i.jsx)(rY,{joystickState:ei,joystickZone:ea,lookJoystickState:eo,lookJoystickZone:el}):(0,i.jsx)(rL,{}),H[28]=V,H[29]=b):b=H[29],H[30]!==B||H[31]!==b?(x=(0,i.jsx)(p,{frameloop:"always",gl:so,shadows:g,onCreated:v,children:(0,i.jsx)(tq,{children:(0,i.jsxs)(lz.AudioProvider,{children:[B,C,y,b]})})}),H[30]=B,H[31]=b,H[32]=x):x=H[32],H[33]!==A||H[34]!==x?(E=(0,i.jsxs)("div",{id:"canvasContainer",children:[A,x]}),H[33]=A,H[34]=x,H[35]=E):E=H[35],H[36]!==V?(M=V&&(0,i.jsx)(rW,{joystickState:ei,joystickZone:ea,lookJoystickState:eo,lookJoystickZone:el}),H[36]=V,H[37]=M):M=H[37],H[38]!==V?(F=!1===V&&(0,i.jsx)(rO,{}),H[38]=V,H[39]=F):F=H[39],H[40]===Symbol.for("react.memo_cache_sentinel")?(T=()=>Y(!0),H[40]=T):T=H[40],H[41]!==Q||H[42]!==V||H[43]!==X||H[44]!==q?(R=(0,i.jsx)(lJ,{missionName:X,missionType:q,onChangeMission:Q,onOpenMapInfo:T,cameraRef:en,isTouch:V}),H[41]=Q,H[42]=V,H[43]=X,H[44]=q,H[45]=R):R=H[45],H[46]!==W||H[47]!==X||H[48]!==q?(w=W&&(0,i.jsx)(o.Suspense,{fallback:null,children:(0,i.jsx)(si,{open:W,onClose:()=>Y(!1),missionName:X,missionType:q??""})}),H[46]=W,H[47]=X,H[48]=q,H[49]=w):w=H[49],H[50]!==E||H[51]!==M||H[52]!==F||H[53]!==R||H[54]!==w?(D=(0,i.jsxs)(rv,{map:rG,children:[E,M,F,R,w]}),H[50]=E,H[51]=M,H[52]=F,H[53]=R,H[54]=w,H[55]=D):D=H[55],H[56]!==K||H[57]!==N||H[58]!==D?(I=(0,i.jsx)(rh.QueryClientProvider,{client:sa,children:(0,i.jsx)("main",{children:(0,i.jsx)(S.SettingsProvider,{fogEnabledOverride:N,onClearFogEnabledOverride:K,children:D})})}),H[56]=K,H[57]=N,H[58]=D,H[59]=I):I=H[59],I}function su(){delete window.setMissionName,delete window.getMissionList,delete window.getMissionInfo}function sc(){let e,t=(0,a.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)(o.Suspense,{children:(0,i.jsx)(ss,{})}),t[0]=e):e=t[0],e}e.s(["default",()=>sc],31713)}]); \ No newline at end of file +`))}}function tL(e,t,r,n){let i=r.has("Translucent"),a=r.has("Additive");if(r.has("SelfIlluminating")){let e=new u.MeshBasicMaterial({map:t,side:2,transparent:a,alphaTest:.5*!a,fog:!0,...a&&{blending:u.AdditiveBlending}});return tG(e),e}if(n||i){let e={map:t,transparent:!1,alphaTest:.5,reflectivity:0},r=new u.MeshLambertMaterial({...e,side:1,polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:1}),n=new u.MeshLambertMaterial({...e,side:0});return tG(r),tG(n),[r,n]}let o=new u.MeshLambertMaterial({map:t,side:2,reflectivity:0});return tG(o),o}let t_=(0,o.memo)(function(e){let t,r,n,o,l,s,c=(0,a.c)(35),{material:d,shapeName:f,geometry:m,backGeometry:h,castShadow:p,receiveShadow:A}=e,g=void 0!==p&&p,B=void 0!==A&&A,C=d.userData.resource_path;c[0]!==d.userData.flag_names?(t=d.userData.flag_names??[],c[0]=d.userData.flag_names,c[1]=t):t=c[1],c[2]!==t?(r=new Set(t),c[2]=t,c[3]=r):r=c[3];let y=r,b=function(e){var t,r;let n,i,o,l,s=(0,a.c)(14),{animationEnabled:c}=(0,S.useSettings)();s[0]!==e?(n={queryKey:["ifl",e],queryFn:()=>(0,v.loadImageFrameList)(e)},s[0]=e,s[1]=n):n=s[1];let{data:d}=(t=n,(0,tR.useBaseQuery)({...t,enabled:!0,suspense:!0,throwOnError:tw.defaultThrowOnError,placeholderData:void 0},tT.QueryObserver,void 0));if(s[2]!==d||s[3]!==e){let t;s[5]!==e?(t=t=>(0,v.iflTextureToUrl)(t.name,e),s[5]=e,s[6]=t):t=s[6],i=d.map(t),s[2]=d,s[3]=e,s[4]=i}else i=s[4];let f=i,m=(0,x.useTexture)(f);if(s[7]!==d||s[8]!==e||s[9]!==m){let t;if(!(o=tI.get(e))){let t,r,n,i,a,l,s,c,d;r=(t=m[0].image).width,n=t.height,a=Math.ceil(Math.sqrt(i=m.length)),l=Math.ceil(i/a),(s=document.createElement("canvas")).width=r*a,s.height=n*l,c=s.getContext("2d"),m.forEach((e,t)=>{let i=Math.floor(t/a);c.drawImage(e.image,t%a*r,i*n)}),(d=new u.CanvasTexture(s)).colorSpace=u.SRGBColorSpace,d.generateMipmaps=!1,d.minFilter=u.NearestFilter,d.magFilter=u.NearestFilter,d.wrapS=u.ClampToEdgeWrapping,d.wrapT=u.ClampToEdgeWrapping,d.repeat.set(1/a,1/l),o={texture:d,columns:a,rows:l,frameCount:i,frameStartTicks:[],totalTicks:0,lastFrame:-1},tI.set(e,o)}t=0,(r=o).frameStartTicks=d.map(e=>{let r=t;return t+=e.frameCount,r}),r.totalTicks=t,s[7]=d,s[8]=e,s[9]=m,s[10]=o}else o=s[10];let h=o;return s[11]!==c||s[12]!==h?(l=e=>{let t=c?function(e,t){if(0===e.totalTicks)return 0;let r=t%e.totalTicks,{frameStartTicks:n}=e;for(let e=n.length-1;e>=0;e--)if(r>=n[e])return e;return 0}(h,e):0;!function(e,t){if(t===e.lastFrame)return;e.lastFrame=t;let r=t%e.columns,n=e.rows-1-Math.floor(t/e.columns);e.texture.offset.set(r/e.columns,n/e.rows)}(h,t)},s[11]=c,s[12]=h,s[13]=l):l=s[13],(0,tD.useTick)(l),h.texture}(`textures/${C}.ifl`);c[4]!==f?(n=f&&tE(f),c[4]=f,c[5]=n):n=c[5];let E=n;c[6]!==y||c[7]!==E||c[8]!==d||c[9]!==b?(o=tL(d,b,y,E),c[6]=y,c[7]=E,c[8]=d,c[9]=b,c[10]=o):o=c[10];let M=o;if(Array.isArray(M)){let e,t,r,n,a,o=h||m;return c[11]!==M[0]?(e=(0,i.jsx)("primitive",{object:M[0],attach:"material"}),c[11]=M[0],c[12]=e):e=c[12],c[13]!==g||c[14]!==B||c[15]!==o||c[16]!==e?(t=(0,i.jsx)("mesh",{geometry:o,castShadow:g,receiveShadow:B,children:e}),c[13]=g,c[14]=B,c[15]=o,c[16]=e,c[17]=t):t=c[17],c[18]!==M[1]?(r=(0,i.jsx)("primitive",{object:M[1],attach:"material"}),c[18]=M[1],c[19]=r):r=c[19],c[20]!==g||c[21]!==m||c[22]!==B||c[23]!==r?(n=(0,i.jsx)("mesh",{geometry:m,castShadow:g,receiveShadow:B,children:r}),c[20]=g,c[21]=m,c[22]=B,c[23]=r,c[24]=n):n=c[24],c[25]!==n||c[26]!==t?(a=(0,i.jsxs)(i.Fragment,{children:[t,n]}),c[25]=n,c[26]=t,c[27]=a):a=c[27],a}return c[28]!==M?(l=(0,i.jsx)("primitive",{object:M,attach:"material"}),c[28]=M,c[29]=l):l=c[29],c[30]!==g||c[31]!==m||c[32]!==B||c[33]!==l?(s=(0,i.jsx)("mesh",{geometry:m,castShadow:g,receiveShadow:B,children:l}),c[30]=g,c[31]=m,c[32]=B,c[33]=l,c[34]=s):s=c[34],s}),tP=(0,o.memo)(function(e){let t,r,n,o,l,s,u,c,d=(0,a.c)(40),{material:f,shapeName:m,geometry:h,backGeometry:p,castShadow:A,receiveShadow:g}=e,B=void 0!==A&&A,C=void 0!==g&&g,y=f.userData.resource_path;d[0]!==f.userData.flag_names?(t=f.userData.flag_names??[],d[0]=f.userData.flag_names,d[1]=t):t=d[1],d[2]!==t?(r=new Set(t),d[2]=t,d[3]=r):r=d[3];let E=r;y||console.warn(`No resource_path was found on "${m}" - rendering fallback.`),d[4]!==y?(n=y?(0,v.textureToUrl)(y):v.FALLBACK_TEXTURE_URL,d[4]=y,d[5]=n):n=d[5];let M=n;d[6]!==m?(o=m&&tE(m),d[6]=m,d[7]=o):o=d[7];let S=o,F=E.has("Translucent");d[8]!==S||d[9]!==F?(l=e=>S||F?(0,b.setupTexture)(e,{disableMipmaps:!0}):(0,b.setupTexture)(e),d[8]=S,d[9]=F,d[10]=l):l=d[10];let T=(0,x.useTexture)(M,l);d[11]!==E||d[12]!==S||d[13]!==f||d[14]!==T?(s=tL(f,T,E,S),d[11]=E,d[12]=S,d[13]=f,d[14]=T,d[15]=s):s=d[15];let R=s;if(Array.isArray(R)){let e,t,r,n,a,o=p||h;return d[16]!==R[0]?(e=(0,i.jsx)("primitive",{object:R[0],attach:"material"}),d[16]=R[0],d[17]=e):e=d[17],d[18]!==B||d[19]!==C||d[20]!==e||d[21]!==o?(t=(0,i.jsx)("mesh",{geometry:o,castShadow:B,receiveShadow:C,children:e}),d[18]=B,d[19]=C,d[20]=e,d[21]=o,d[22]=t):t=d[22],d[23]!==R[1]?(r=(0,i.jsx)("primitive",{object:R[1],attach:"material"}),d[23]=R[1],d[24]=r):r=d[24],d[25]!==B||d[26]!==h||d[27]!==C||d[28]!==r?(n=(0,i.jsx)("mesh",{geometry:h,castShadow:B,receiveShadow:C,children:r}),d[25]=B,d[26]=h,d[27]=C,d[28]=r,d[29]=n):n=d[29],d[30]!==t||d[31]!==n?(a=(0,i.jsxs)(i.Fragment,{children:[t,n]}),d[30]=t,d[31]=n,d[32]=a):a=d[32],a}return d[33]!==R?(u=(0,i.jsx)("primitive",{object:R,attach:"material"}),d[33]=R,d[34]=u):u=d[34],d[35]!==B||d[36]!==h||d[37]!==C||d[38]!==u?(c=(0,i.jsx)("mesh",{geometry:h,castShadow:B,receiveShadow:C,children:u}),d[35]=B,d[36]=h,d[37]=C,d[38]=u,d[39]=c):c=d[39],c}),tO=(0,o.memo)(function(e){let t=(0,a.c)(14),{material:r,shapeName:n,geometry:o,backGeometry:l,castShadow:s,receiveShadow:u}=e,c=void 0!==s&&s,d=void 0!==u&&u,f=new Set(r.userData.flag_names??[]).has("IflMaterial"),m=r.userData.resource_path;if(f&&m){let e;return t[0]!==l||t[1]!==c||t[2]!==o||t[3]!==r||t[4]!==d||t[5]!==n?(e=(0,i.jsx)(t_,{material:r,shapeName:n,geometry:o,backGeometry:l,castShadow:c,receiveShadow:d}),t[0]=l,t[1]=c,t[2]=o,t[3]=r,t[4]=d,t[5]=n,t[6]=e):e=t[6],e}if(!r.name)return null;{let e;return t[7]!==l||t[8]!==c||t[9]!==o||t[10]!==r||t[11]!==d||t[12]!==n?(e=(0,i.jsx)(tP,{material:r,shapeName:n,geometry:o,backGeometry:l,castShadow:c,receiveShadow:d}),t[7]=l,t[8]=c,t[9]=o,t[10]=r,t[11]=d,t[12]=n,t[13]=e):e=t[13],e}});function tk(e){let t,r,n,o,l=(0,a.c)(9),{color:s,label:u}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsx)("boxGeometry",{args:[10,10,10]}),l[0]=t):t=l[0],l[1]!==s?(r=(0,i.jsx)("meshStandardMaterial",{color:s,wireframe:!0}),l[1]=s,l[2]=r):r=l[2],l[3]!==s||l[4]!==u?(n=u?(0,i.jsx)(e9.FloatingLabel,{color:s,children:u}):null,l[3]=s,l[4]=u,l[5]=n):n=l[5],l[6]!==r||l[7]!==n?(o=(0,i.jsxs)("mesh",{children:[t,r,n]}),l[6]=r,l[7]=n,l[8]=o):o=l[8],o}function tH(e){let t,r=(0,a.c)(4),{color:n,label:o}=e,{debugMode:l}=(0,S.useDebug)();return r[0]!==n||r[1]!==l||r[2]!==o?(t=l?(0,i.jsx)(tk,{color:n,label:o}):null,r[0]=n,r[1]=l,r[2]=o,r[3]=t):t=r[3],t}function tj(e){let t,r,n,l,s,u=(0,a.c)(13),{loadingColor:c,children:d}=e,f=void 0===c?"yellow":c,{object:m,shapeName:h}=tS();if(!h){let e,t=`${m._id}: `;return u[0]!==t?(e=(0,i.jsx)(tH,{color:"orange",label:t}),u[0]=t,u[1]=e):e=u[1],e}let p=`${m._id}: ${h}`;return u[2]!==p?(t=(0,i.jsx)(tH,{color:"red",label:p}),u[2]=p,u[3]=t):t=u[3],u[4]!==f?(r=(0,i.jsx)(tk,{color:f}),u[4]=f,u[5]=r):r=u[5],u[6]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)(tU,{}),u[6]=n):n=u[6],u[7]!==d||u[8]!==r?(l=(0,i.jsxs)(o.Suspense,{fallback:r,children:[n,d]}),u[7]=d,u[8]=r,u[9]=l):l=u[9],u[10]!==t||u[11]!==l?(s=(0,i.jsx)(q,{fallback:t,children:l}),u[10]=t,u[11]=l,u[12]=s):s=u[12],s}let tU=(0,o.memo)(function(){var e;let t,r,n,l,s,u,c,d,f=(0,a.c)(19),{object:m,shapeName:h,isOrganic:p}=tS(),{debugMode:A}=(0,S.useDebug)(),{nodes:g}=((d=(0,a.c)(2))[0]!==h?(c=(0,v.shapeToUrl)(h),d[0]=h,d[1]=c):c=d[1],e2(c));if(f[0]!==g){e:{let r,n=Object.values(g).filter(tN);if(n.length>0){let r;e=n[0].skeleton,r=new Set,e.bones.forEach((e,t)=>{e.name.match(/^Hulk/i)&&r.add(t)}),t=r;break e}f[2]===Symbol.for("react.memo_cache_sentinel")?(r=new Set,f[2]=r):r=f[2],t=r}f[0]=g,f[1]=t}else t=f[1];let B=t;f[3]!==B||f[4]!==p||f[5]!==g?(r=Object.entries(g).filter(tJ).map(e=>{let[,t]=e,r=function(e,t){if(0===t.size||!e.attributes.skinIndex)return e;let r=e.attributes.skinIndex,n=e.attributes.skinWeight,i=e.index,a=Array(r.count).fill(!1);for(let e=0;e.01&&t.has(o)){a[e]=!0;break}}if(i){let t=[],r=i.array;for(let e=0;e1){let t=0,r=0,n=0;for(let i of e)t+=a[3*i],r+=a[3*i+1],n+=a[3*i+2];let i=Math.sqrt(t*t+r*r+n*n);for(let o of(i>0&&(t/=i,r/=i,n/=i),e))a[3*o]=t,a[3*o+1]=r,a[3*o+2]=n}if(t.needsUpdate=!0,p){let e=(n=r.clone()).attributes.normal,t=e.array;for(let e=0;e{let{node:t,geometry:r,backGeometry:n}=e;return(0,i.jsx)(o.Suspense,{fallback:(0,i.jsx)("mesh",{geometry:r,children:(0,i.jsx)("meshStandardMaterial",{color:"gray",wireframe:!0})}),children:t.material?Array.isArray(t.material)?t.material.map((e,t)=>(0,i.jsx)(tO,{material:e,shapeName:h,geometry:r,backGeometry:n,castShadow:y,receiveShadow:y},t)):(0,i.jsx)(tO,{material:t.material,shapeName:h,geometry:r,backGeometry:n,castShadow:y,receiveShadow:y}):null},t.id)}),f[8]=y,f[9]=C,f[10]=h,f[11]=l):l=f[11],f[12]!==A||f[13]!==m||f[14]!==h?(s=A?(0,i.jsxs)(e9.FloatingLabel,{children:[m._id,": ",h]}):null,f[12]=A,f[13]=m,f[14]=h,f[15]=s):s=f[15],f[16]!==l||f[17]!==s?(u=(0,i.jsxs)("group",{rotation:n,children:[l,s]}),f[16]=l,f[17]=s,f[18]=u):u=f[18],u});function tN(e){return e.skeleton}function tJ(e){let[,t]=e;return t.material&&"Unassigned"!==t.material.name&&!t.name.match(/^Hulk/i)}var tK=e.i(6112);let tQ={1:"Storm",2:"Inferno"},tV=(0,o.createContext)(null);function tX(){let e=(0,o.useContext)(tV);if(!e)throw Error("useCameras must be used within CamerasProvider");return e}function tq({children:e}){let{camera:t}=(0,C.useThree)(),[r,n]=(0,o.useState)(-1),[a,l]=(0,o.useState)({}),[s,c]=(0,o.useState)(()=>({initialized:!1,position:null,quarternion:null})),d=(0,o.useCallback)(e=>{l(t=>({...t,[e.id]:e}))},[]),f=(0,o.useCallback)(e=>{l(t=>{let{[e.id]:r,...n}=t;return n})},[]),m=Object.keys(a).length,h=(0,o.useCallback)(e=>{if(e>=0&&e{h(m?(r+1)%m:-1)},[m,r,h]);(0,o.useEffect)(()=>{let e=()=>{let e=window.location.hash;if(e.startsWith("#c")){let[t,r]=e.slice(2).split("~"),n=t.split(",").map(e=>parseFloat(e)),i=r.split(",").map(e=>parseFloat(e));c({initialized:!0,position:new u.Vector3(...n),quarternion:new u.Quaternion(...i)})}else c({initialized:!0,position:null,quarternion:null})};return window.addEventListener("hashchange",e),e(),()=>{window.removeEventListener("hashchange",e)}},[]),(0,o.useEffect)(()=>{s.initialized&&s.position&&(t.position.copy(s.position),s.quarternion&&t.quaternion.copy(s.quarternion))},[t,s]),(0,o.useEffect)(()=>{s.initialized&&!s.position&&m>0&&-1===r&&h(0)},[m,h,r,s]);let A=(0,o.useMemo)(()=>({registerCamera:d,unregisterCamera:f,nextCamera:p,setCameraIndex:h,cameraCount:m}),[d,f,p,h,m]);return 0===m&&-1!==r&&n(-1),(0,i.jsx)(tV.Provider,{value:A,children:e})}let tW=(0,o.createContext)(null),tY=tW.Provider,tz=(0,o.lazy)(()=>e.A(61921).then(e=>({default:e.AudioEmitter}))),tZ={AudioEmitter:function(e){let t,r=(0,a.c)(3),{audioEnabled:n}=(0,S.useSettings)();return r[0]!==n||r[1]!==e?(t=n?(0,i.jsx)(tz,{...e}):null,r[0]=n,r[1]=e,r[2]=t):t=r[2],t},Camera:function(e){let t,r,n,i,l,s=(0,a.c)(14),{object:c}=e,{registerCamera:d,unregisterCamera:f}=tX(),m=(0,o.useId)();s[0]!==c?(t=(0,y.getProperty)(c,"dataBlock"),s[0]=c,s[1]=t):t=s[1];let h=t;s[2]!==c?(r=(0,y.getPosition)(c),s[2]=c,s[3]=r):r=s[3];let p=r;s[4]!==c?(n=(0,y.getRotation)(c),s[4]=c,s[5]=n):n=s[5];let A=n;return s[6]!==h||s[7]!==m||s[8]!==p||s[9]!==A||s[10]!==d||s[11]!==f?(i=()=>{if("Observer"===h){let e={id:m,position:new u.Vector3(...p),rotation:A};return d(e),()=>{f(e)}}},l=[m,h,d,f,p,A],s[6]=h,s[7]=m,s[8]=p,s[9]=A,s[10]=d,s[11]=f,s[12]=i,s[13]=l):(i=s[12],l=s[13]),(0,o.useEffect)(i,l),null},ForceFieldBare:(0,o.lazy)(()=>e.A(25147).then(e=>({default:e.ForceFieldBare}))),InteriorInstance:tr,Item:function(e){let t,r,n,o,l,s,u,c,d,f=(0,a.c)(23),{object:m}=e,h=J();f[0]!==m?(t=(0,y.getProperty)(m,"dataBlock")??"",f[0]=m,f[1]=t):t=f[1];let p=t,A=(0,tK.useDatablock)(p);f[2]!==m?(r=(0,y.getPosition)(m),f[2]=m,f[3]=r):r=f[3];let g=r;f[4]!==m?(n=(0,y.getScale)(m),f[4]=m,f[5]=n):n=f[5];let v=n;f[6]!==m?(o=(0,y.getRotation)(m),f[6]=m,f[7]=o):o=f[7];let B=o;f[8]!==A?(l=(0,y.getProperty)(A,"shapeFile"),f[8]=A,f[9]=l):l=f[9];let C=l;C||console.error(` missing shape for datablock: ${p}`);let b=p?.toLowerCase()==="flag",x=h?.team??null,E=x&&x>0?tQ[x]:null,M=b&&E?`${E} Flag`:null;return f[10]!==M?(s=M?(0,i.jsx)(e9.FloatingLabel,{opacity:.6,children:M}):null,f[10]=M,f[11]=s):s=f[11],f[12]!==s?(u=(0,i.jsx)(tj,{loadingColor:"pink",children:s}),f[12]=s,f[13]=u):u=f[13],f[14]!==g||f[15]!==B||f[16]!==v||f[17]!==u?(c=(0,i.jsx)("group",{position:g,quaternion:B,scale:v,children:u}),f[14]=g,f[15]=B,f[16]=v,f[17]=u,f[18]=c):c=f[18],f[19]!==m||f[20]!==C||f[21]!==c?(d=(0,i.jsx)(tF,{type:"Item",object:m,shapeName:C,children:c}),f[19]=m,f[20]=C,f[21]=c,f[22]=d):d=f[22],d},SimGroup:function(e){let t,r,n,o,l=(0,a.c)(17),{object:s}=e,u=J(),c=null,d=!1;if(u&&u.hasTeams){if(d=!0,null!=u.team)c=u.team;else if(s._name){let e;if(l[0]!==s._name){let t;l[2]===Symbol.for("react.memo_cache_sentinel")?(t=/^team(\d+)$/i,l[2]=t):t=l[2],e=s._name.match(t),l[0]=s._name,l[1]=e}else e=l[1];let t=e;t&&(c=parseInt(t[1],10))}}else if(s._name){let e;l[3]!==s._name?(e=s._name.toLowerCase(),l[3]=s._name,l[4]=e):e=l[4],d="teams"===e}l[5]!==d||l[6]!==s||l[7]!==u||l[8]!==c?(t={object:s,parent:u,hasTeams:d,team:c},l[5]=d,l[6]=s,l[7]=u,l[8]=c,l[9]=t):t=l[9];let f=t;return l[10]!==s._children?(r=s._children??[],l[10]=s._children,l[11]=r):r=l[11],l[12]!==r?(n=r.map(K),l[12]=r,l[13]=n):n=l[13],l[14]!==f||l[15]!==n?(o=(0,i.jsx)(N.Provider,{value:f,children:n}),l[14]=f,l[15]=n,l[16]=o):o=l[16],o},Sky:function({object:e}){let{fogEnabled:t,highQualityFog:r}=(0,S.useSettings)(),n=(0,y.getProperty)(e,"materialList"),a=(0,o.useMemo)(()=>th((0,y.getProperty)(e,"SkySolidColor")),[e]),l=(0,y.getInt)(e,"useSkyTextures")??1,s=(0,o.useMemo)(()=>(function(e,t=!0){let r=(0,y.getFloat)(e,"fogDistance")??0,n=(0,y.getFloat)(e,"visibleDistance")??1e3,i=(0,y.getFloat)(e,"high_fogDistance"),a=(0,y.getFloat)(e,"high_visibleDistance"),o=t&&null!=i&&i>0?i:r,l=t&&null!=a&&a>0?a:n,s=function(e){if(!e)return new u.Color(.5,.5,.5);let[t,r,n]=e.split(" ").map(e=>parseFloat(e));return new u.Color().setRGB(t,r,n).convertSRGBToLinear()}((0,y.getProperty)(e,"fogColor")),c=[];for(let t=1;t<=3;t++){let r=function(e,t=1){if(!e)return null;let r=e.split(" ").map(e=>parseFloat(e));if(r.length<3)return null;let[n,i,a]=r;return n<=0||a<=i?null:{visibleDistance:n,minHeight:i,maxHeight:a,percentage:Math.max(0,Math.min(1,t))}}((0,y.getProperty)(e,`fogVolume${t}`),1);r&&c.push(r)}let d=c.reduce((e,t)=>Math.max(e,t.maxHeight),0);return{fogDistance:o,visibleDistance:l,fogColor:s,fogVolumes:c,fogLine:d,enabled:l>o}})(e,r),[e,r]),c=(0,o.useMemo)(()=>th((0,y.getProperty)(e,"fogColor")),[e]),d=a||c,f=s.enabled&&t,m=s.fogColor,{scene:h,gl:p}=(0,C.useThree)();(0,o.useEffect)(()=>{if(f){let e=m.clone();h.background=e,p.setClearColor(e)}else if(d){let e=d[0].clone();h.background=e,p.setClearColor(e)}else h.background=null;return()=>{h.background=null}},[h,p,f,m,d]);let A=a?.[1];return(0,i.jsxs)(i.Fragment,{children:[n&&l?(0,i.jsx)(o.Suspense,{fallback:null,children:(0,i.jsx)(tA,{materialList:n,fogColor:f?m:void 0,fogState:f?s:void 0},n)}):A?(0,i.jsx)(tg,{skyColor:A,fogColor:f?m:void 0,fogState:f?s:void 0}):null,(0,i.jsx)(o.Suspense,{children:(0,i.jsx)(td,{object:e})}),s.enabled?(0,i.jsx)(tB,{fogState:s,enabled:t}):null]})},StaticShape:function(e){let t,r,n,o,l,s,u,c,d=(0,a.c)(19),{object:f}=e;d[0]!==f?(t=(0,y.getProperty)(f,"dataBlock")??"",d[0]=f,d[1]=t):t=d[1];let m=t,h=(0,tK.useDatablock)(m);d[2]!==f?(r=(0,y.getPosition)(f),d[2]=f,d[3]=r):r=d[3];let p=r;d[4]!==f?(n=(0,y.getRotation)(f),d[4]=f,d[5]=n):n=d[5];let A=n;d[6]!==f?(o=(0,y.getScale)(f),d[6]=f,d[7]=o):o=d[7];let g=o;d[8]!==h?(l=(0,y.getProperty)(h,"shapeFile"),d[8]=h,d[9]=l):l=d[9];let v=l;return v||console.error(` missing shape for datablock: ${m}`),d[10]===Symbol.for("react.memo_cache_sentinel")?(s=(0,i.jsx)(tj,{}),d[10]=s):s=d[10],d[11]!==p||d[12]!==A||d[13]!==g?(u=(0,i.jsx)("group",{position:p,quaternion:A,scale:g,children:s}),d[11]=p,d[12]=A,d[13]=g,d[14]=u):u=d[14],d[15]!==f||d[16]!==v||d[17]!==u?(c=(0,i.jsx)(tF,{type:"StaticShape",object:f,shapeName:v,children:u}),d[15]=f,d[16]=v,d[17]=u,d[18]=c):c=d[18],c},Sun:function(e){let t,r,n,l,s,c,d,f,m,h,p=(0,a.c)(25),{object:A}=e;p[0]!==A?(t=((0,y.getProperty)(A,"direction")??"0.57735 0.57735 -0.57735").split(" ").map(tb),p[0]=A,p[1]=t):t=p[1];let[g,v,B]=t,C=Math.sqrt(g*g+B*B+v*v),b=g/C,x=B/C,M=v/C;p[2]!==b||p[3]!==x||p[4]!==M?(r=new u.Vector3(b,x,M),p[2]=b,p[3]=x,p[4]=M,p[5]=r):r=p[5];let S=r,F=-(5e3*S.x),T=-(5e3*S.y),R=-(5e3*S.z);p[6]!==F||p[7]!==T||p[8]!==R?(n=new u.Vector3(F,T,R),p[6]=F,p[7]=T,p[8]=R,p[9]=n):n=p[9];let w=n;if(p[10]!==A){let[e,t,r]=((0,y.getProperty)(A,"color")??"0.7 0.7 0.7 1").split(" ").map(ty);l=new u.Color(e,t,r),p[10]=A,p[11]=l}else l=p[11];let D=l;if(p[12]!==A){let[e,t,r]=((0,y.getProperty)(A,"ambient")??"0.5 0.5 0.5 1").split(" ").map(tC);s=new u.Color(e,t,r),p[12]=A,p[13]=s}else s=p[13];let I=s,G=S.y<0;return p[14]!==G?(c=()=>{E.value=G},d=[G],p[14]=G,p[15]=c,p[16]=d):(c=p[15],d=p[16]),(0,o.useEffect)(c,d),p[17]!==D||p[18]!==w?(f=(0,i.jsx)("directionalLight",{position:w,color:D,intensity:1,castShadow:!0,"shadow-mapSize-width":8192,"shadow-mapSize-height":8192,"shadow-camera-left":-4096,"shadow-camera-right":4096,"shadow-camera-top":4096,"shadow-camera-bottom":-4096,"shadow-camera-near":100,"shadow-camera-far":12e3,"shadow-bias":-1e-5,"shadow-normalBias":.4,"shadow-radius":2}),p[17]=D,p[18]=w,p[19]=f):f=p[19],p[20]!==I?(m=(0,i.jsx)("ambientLight",{color:I,intensity:1}),p[20]=I,p[21]=m):m=p[21],p[22]!==f||p[23]!==m?(h=(0,i.jsxs)(i.Fragment,{children:[f,m]}),p[22]=f,p[23]=m,p[24]=h):h=p[24],h},TerrainBlock:P,TSStatic:function(e){let t,r,n,o,l,s,u,c=(0,a.c)(17),{object:d}=e;c[0]!==d?(t=(0,y.getProperty)(d,"shapeName"),c[0]=d,c[1]=t):t=c[1];let f=t;c[2]!==d?(r=(0,y.getPosition)(d),c[2]=d,c[3]=r):r=c[3];let m=r;c[4]!==d?(n=(0,y.getRotation)(d),c[4]=d,c[5]=n):n=c[5];let h=n;c[6]!==d?(o=(0,y.getScale)(d),c[6]=d,c[7]=o):o=c[7];let p=o;return f||console.error(" missing shapeName for object",d),c[8]===Symbol.for("react.memo_cache_sentinel")?(l=(0,i.jsx)(tj,{}),c[8]=l):l=c[8],c[9]!==m||c[10]!==h||c[11]!==p?(s=(0,i.jsx)("group",{position:m,quaternion:h,scale:p,children:l}),c[9]=m,c[10]=h,c[11]=p,c[12]=s):s=c[12],c[13]!==d||c[14]!==f||c[15]!==s?(u=(0,i.jsx)(tF,{type:"TSStatic",object:d,shapeName:f,children:s}),c[13]=d,c[14]=f,c[15]=s,c[16]=u):u=c[16],u},Turret:function(e){let t,r,n,o,l,s,u,c,d,f,m,h=(0,a.c)(27),{object:p}=e;h[0]!==p?(t=(0,y.getProperty)(p,"dataBlock")??"",h[0]=p,h[1]=t):t=h[1];let A=t;h[2]!==p?(r=(0,y.getProperty)(p,"initialBarrel"),h[2]=p,h[3]=r):r=h[3];let g=r,v=(0,tK.useDatablock)(A),B=(0,tK.useDatablock)(g);h[4]!==p?(n=(0,y.getPosition)(p),h[4]=p,h[5]=n):n=h[5];let C=n;h[6]!==p?(o=(0,y.getRotation)(p),h[6]=p,h[7]=o):o=h[7];let b=o;h[8]!==p?(l=(0,y.getScale)(p),h[8]=p,h[9]=l):l=h[9];let x=l;h[10]!==v?(s=(0,y.getProperty)(v,"shapeFile"),h[10]=v,h[11]=s):s=h[11];let E=s;h[12]!==B?(u=(0,y.getProperty)(B,"shapeFile"),h[12]=B,h[13]=u):u=h[13];let M=u;return E||console.error(` missing shape for datablock: ${A}`),g&&!M&&console.error(` missing shape for barrel datablock: ${g}`),h[14]===Symbol.for("react.memo_cache_sentinel")?(c=(0,i.jsx)(tj,{}),h[14]=c):c=h[14],h[15]!==M||h[16]!==p?(d=M?(0,i.jsx)(tF,{type:"Turret",object:p,shapeName:M,children:(0,i.jsx)("group",{position:[0,1.5,0],children:(0,i.jsx)(tj,{})})}):null,h[15]=M,h[16]=p,h[17]=d):d=h[17],h[18]!==C||h[19]!==b||h[20]!==x||h[21]!==d?(f=(0,i.jsxs)("group",{position:C,quaternion:b,scale:x,children:[c,d]}),h[18]=C,h[19]=b,h[20]=x,h[21]=d,h[22]=f):f=h[22],h[23]!==p||h[24]!==E||h[25]!==f?(m=(0,i.jsx)(tF,{type:"Turret",object:p,shapeName:E,children:f}),h[23]=p,h[24]=E,h[25]=f,h[26]=m):m=h[26],m},WaterBlock:(0,o.lazy)(()=>e.A(18599).then(e=>({default:e.WaterBlock}))),WayPoint:function(e){let t,r,n,o=(0,a.c)(7),{object:l}=e;o[0]!==l?(t=(0,y.getPosition)(l),o[0]=l,o[1]=t):t=o[1];let s=t;o[2]!==l?(r=(0,y.getProperty)(l,"name"),o[2]=l,o[3]=r):r=o[3];let u=r;return o[4]!==u||o[5]!==s?(n=u?(0,i.jsx)(e9.FloatingLabel,{position:s,opacity:.6,children:u}):null,o[4]=u,o[5]=s,o[6]=n):n=o[6],n}};function t$(e){let t,r,n,l=(0,a.c)(9),{object:s}=e,{missionType:u}=(0,o.useContext)(tW);l[0]!==s?(t=new Set(((0,y.getProperty)(s,"missionTypesList")??"").toLowerCase().split(/s+/).filter(Boolean)),l[0]=s,l[1]=t):t=l[1];let c=t;l[2]!==u||l[3]!==c?(r=!c.size||c.has(u.toLowerCase()),l[2]=u,l[3]=c,l[4]=r):r=l[4];let d=r,f=tZ[s._className];return l[5]!==f||l[6]!==s||l[7]!==d?(n=d&&f?(0,i.jsx)(o.Suspense,{children:(0,i.jsx)(f,{object:s})}):null,l[5]=f,l[6]=s,l[7]=d,l[8]=n):n=l[8],n}var t0=e.i(86608),t1=e.i(38433),t2=e.i(33870),t9=e.i(91996);let t3=async e=>{let t;try{t=(0,v.getUrlForPath)(e)}catch(t){return console.warn(`Script not in manifest: ${e} (${t})`),null}try{let r=await fetch(t);if(!r.ok)return console.error(`Script fetch failed: ${e} (${r.status})`),null;return await r.text()}catch(t){return console.error(`Script fetch error: ${e}`),console.error(t),null}},t5=(0,t2.createScriptCache)(),t8={findFiles:e=>{let t=(0,g.default)(e,{nocase:!0});return(0,t9.getResourceList)().filter(e=>t(e)).map(e=>{let[,t]=(0,t9.getSourceAndPath)(e);return t})},isFile:e=>null!=(0,t9.getResourceMap)()[(0,t9.getResourceKey)(e)]},t6=(0,o.memo)(function(e){let t,r,n,l,s,u,c,d,f=(0,a.c)(17),{name:m,missionType:h,onLoadingChange:p}=e,{data:g}=((d=(0,a.c)(2))[0]!==m?(c={queryKey:["parsedMission",m],queryFn:()=>(0,v.loadMission)(m)},d[0]=m,d[1]=c):c=d[1],(0,A.useQuery)(c)),{missionGroup:B,runtime:C,progress:y}=function(e,t,r){let n,i,l,s=(0,a.c)(6);s[0]===Symbol.for("react.memo_cache_sentinel")?(n={missionGroup:void 0,runtime:void 0,progress:0},s[0]=n):n=s[0];let[u,c]=(0,o.useState)(n);return s[1]!==e||s[2]!==t||s[3]!==r?(i=()=>{if(!r)return;let n=new AbortController,i=(0,t1.createProgressTracker)(),a=()=>{c(e=>({...e,progress:i.progress}))};i.on("update",a);let{runtime:o}=(0,t0.runServer)({missionName:e,missionType:t,runtimeOptions:{loadScript:t3,fileSystem:t8,cache:t5,signal:n.signal,progress:i,ignoreScripts:["scripts/admin.cs","scripts/ai.cs","scripts/aiBotProfiles.cs","scripts/aiBountyGame.cs","scripts/aiChat.cs","scripts/aiCnH.cs","scripts/aiCTF.cs","scripts/aiDeathMatch.cs","scripts/aiDebug.cs","scripts/aiDefaultTasks.cs","scripts/aiDnD.cs","scripts/aiHumanTasks.cs","scripts/aiHunters.cs","scripts/aiInventory.cs","scripts/aiObjectiveBuilder.cs","scripts/aiObjectives.cs","scripts/aiRabbit.cs","scripts/aiSiege.cs","scripts/aiTDM.cs","scripts/aiTeamHunters.cs","scripts/deathMessages.cs","scripts/graphBuild.cs","scripts/navGraph.cs","scripts/serverTasks.cs","scripts/spdialog.cs"]},onMissionLoadDone:()=>{c({missionGroup:l.getObjectByName("MissionGroup"),runtime:l,progress:1})}}),l=o;return()=>{i.off("update",a),n.abort(),l.destroy()}},l=[e,t,r],s[1]=e,s[2]=t,s[3]=r,s[4]=i,s[5]=l):(i=s[4],l=s[5]),(0,o.useEffect)(i,l),u}(m,h,g),b=!g||!B||!C;f[0]!==B||f[1]!==h||f[2]!==g?(t={metadata:g,missionType:h,missionGroup:B},f[0]=B,f[1]=h,f[2]=g,f[3]=t):t=f[3];let x=t;return(f[4]!==b||f[5]!==p||f[6]!==y?(r=()=>{p?.(b,y)},n=[b,y,p],f[4]=b,f[5]=p,f[6]=y,f[7]=r,f[8]=n):(r=f[7],n=f[8]),(0,o.useEffect)(r,n),b)?null:(f[9]!==B?(l=(0,i.jsx)(t$,{object:B}),f[9]=B,f[10]=l):l=f[10],f[11]!==C||f[12]!==l?(s=(0,i.jsx)(G.RuntimeProvider,{runtime:C,children:l}),f[11]=C,f[12]=l,f[13]=s):s=f[13],f[14]!==x||f[15]!==s?(u=(0,i.jsx)(tY,{value:x,children:s}),f[14]=x,f[15]=s,f[16]=u):u=f[16],u)});var t4=e.i(19273),t7=e.i(86491),re=e.i(40143),rt=e.i(15823),rr=class extends rt.Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){let n=t.queryKey,i=t.queryHash??(0,t4.hashQueryKeyByOptions)(n,t),a=this.get(i);return a||(a=new t7.Query({client:e,queryKey:n,queryHash:i,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){re.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,t4.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,t4.matchQuery)(e,t)):t}notify(e){re.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){re.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){re.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},rn=e.i(88587),ri=e.i(36553),ra=class extends rn.Removable{#t;#r;#n;#i;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#r=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#r.includes(e)||(this.#r.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#r=this.#r.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#r.length||("pending"===this.state.status?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#a({type:"continue"})},r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=(0,ri.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#a({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#a({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let n="pending"===this.state.status,i=!this.#i.canStart();try{if(n)t();else{this.#a({type:"pending",variables:e,isPaused:i}),await this.#n.config.onMutate?.(e,this,r);let t=await this.options.onMutate?.(e,r);t!==this.state.context&&this.#a({type:"pending",context:t,variables:e,isPaused:i})}let a=await this.#i.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,r),await this.options.onSuccess?.(a,e,this.state.context,r),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(a,null,e,this.state.context,r),this.#a({type:"success",data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,r)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,r)}catch(e){Promise.reject(e)}throw this.#a({type:"error",error:t}),t}finally{this.#n.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),re.notifyManager.batch(()=>{this.#r.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}},ro=rt,rl=class extends ro.Subscribable{constructor(e={}){super(),this.config=e,this.#o=new Set,this.#l=new Map,this.#s=0}#o;#l;#s;build(e,t,r){let n=new ra({client:e,mutationCache:this,mutationId:++this.#s,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){this.#o.add(e);let t=rs(e);if("string"==typeof t){let r=this.#l.get(t);r?r.push(e):this.#l.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#o.delete(e)){let t=rs(e);if("string"==typeof t){let r=this.#l.get(t);if(r)if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#l.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=rs(e);if("string"!=typeof t)return!0;{let r=this.#l.get(t),n=r?.find(e=>"pending"===e.state.status);return!n||n===e}}runNext(e){let t=rs(e);if("string"!=typeof t)return Promise.resolve();{let r=this.#l.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){re.notifyManager.batch(()=>{this.#o.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#o.clear(),this.#l.clear()})}getAll(){return Array.from(this.#o)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,t4.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,t4.matchMutation)(e,t))}notify(e){re.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return re.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(t4.noop))))}};function rs(e){return e.options.scope?.id}var ru=e.i(75555),rc=e.i(14448);function rd(e){return{onFetch:(t,r)=>{let n=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],l={pages:[],pageParams:[]},s=0,u=async()=>{let r=!1,u=(0,t4.ensureQueryFn)(t.options,t.fetchOptions),c=async(e,n,i)=>{let a;if(r)return Promise.reject();if(null==n&&e.pages.length)return Promise.resolve(e);let o=(a={client:t.client,queryKey:t.queryKey,pageParam:n,direction:i?"backward":"forward",meta:t.options.meta},(0,t4.addConsumeAwareSignal)(a,()=>t.signal,()=>r=!0),a),l=await u(o),{maxPages:s}=t.options,c=i?t4.addToStart:t4.addToEnd;return{pages:c(e.pages,l,s),pageParams:c(e.pageParams,n,s)}};if(i&&a.length){let e="backward"===i,t={pages:a,pageParams:o},r=(e?function(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}:rf)(n,t);l=await c(t,r,e)}else{let t=e??a.length;do{let e=0===s?o[0]??n.initialPageParam:rf(n,l);if(s>0&&null==e)break;l=await c(l,e),s++}while(st.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=u}}}function rf(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}var rm=class{#u;#n;#c;#d;#f;#m;#h;#p;constructor(e={}){this.#u=e.queryCache||new rr,this.#n=e.mutationCache||new rl,this.#c=e.defaultOptions||{},this.#d=new Map,this.#f=new Map,this.#m=0}mount(){this.#m++,1===this.#m&&(this.#h=ru.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#u.onFocus())}),this.#p=rc.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#u.onOnline())}))}unmount(){this.#m--,0===this.#m&&(this.#h?.(),this.#h=void 0,this.#p?.(),this.#p=void 0)}isFetching(e){return this.#u.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#u.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#u.build(this,t),n=r.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime((0,t4.resolveStaleTime)(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#u.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let n=this.defaultQueryOptions({queryKey:e}),i=this.#u.get(n.queryHash),a=i?.state.data,o=(0,t4.functionalUpdate)(t,a);if(void 0!==o)return this.#u.build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return re.notifyManager.batch(()=>this.#u.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#u.get(t.queryHash)?.state}removeQueries(e){let t=this.#u;re.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#u;return re.notifyManager.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let r={revert:!0,...t};return Promise.all(re.notifyManager.batch(()=>this.#u.findAll(e).map(e=>e.cancel(r)))).then(t4.noop).catch(t4.noop)}invalidateQueries(e,t={}){return re.notifyManager.batch(()=>(this.#u.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(re.notifyManager.batch(()=>this.#u.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(t4.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(t4.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#u.build(this,t);return r.isStaleByTime((0,t4.resolveStaleTime)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(t4.noop).catch(t4.noop)}fetchInfiniteQuery(e){return e.behavior=rd(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(t4.noop).catch(t4.noop)}ensureInfiniteQueryData(e){return e.behavior=rd(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return rc.onlineManager.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#u}getMutationCache(){return this.#n}getDefaultOptions(){return this.#c}setDefaultOptions(e){this.#c=e}setQueryDefaults(e,t){this.#d.set((0,t4.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#d.values()],r={};return t.forEach(t=>{(0,t4.partialMatchKey)(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#f.set((0,t4.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#f.values()],r={};return t.forEach(t=>{(0,t4.partialMatchKey)(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#c.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,t4.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===t4.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#c.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#u.clear(),this.#n.clear()}},rh=e.i(12598),rp=e.i(8155);let rA=e=>{let t=(0,rp.createStore)(e),r=e=>(function(e,t=e=>e){let r=o.default.useSyncExternalStore(e.subscribe,o.default.useCallback(()=>t(e.getState()),[e,t]),o.default.useCallback(()=>t(e.getInitialState()),[e,t]));return o.default.useDebugValue(r),r})(t,e);return Object.assign(r,t),r},rg=o.createContext(null);function rv({map:e,children:t,onChange:r,domElement:n}){let i=e.map(e=>e.name+e.keys).join("-"),a=o.useMemo(()=>{let t,r;return t=()=>e.reduce((e,t)=>({...e,[t.name]:!1}),{}),(r=(e,r,n)=>{let i=n.subscribe;return n.subscribe=(e,t,r)=>{let a=e;if(t){let i=(null==r?void 0:r.equalityFn)||Object.is,o=e(n.getState());a=r=>{let n=e(r);if(!i(o,n)){let e=o;t(o=n,e)}},(null==r?void 0:r.fireImmediately)&&t(o,o)}return i(a)},t(e,r,n)})?rA(r):rA},[i]),l=o.useMemo(()=>[a.subscribe,a.getState,a],[i]),s=a.setState;return o.useEffect(()=>{let t=e.map(({name:e,keys:t,up:n})=>({keys:t,up:n,fn:t=>{s({[e]:t}),r&&r(e,t,l[1]())}})).reduce((e,{keys:t,fn:r,up:n=!0})=>(t.forEach(t=>e[t]={fn:r,pressed:!1,up:n}),e),{}),i=({key:e,code:r})=>{let n=t[e]||t[r];if(!n)return;let{fn:i,pressed:a,up:o}=n;n.pressed=!0,(o||!a)&&i(!0)},a=({key:e,code:r})=>{let n=t[e]||t[r];if(!n)return;let{fn:i,up:a}=n;n.pressed=!1,a&&i(!1)},o=n||window;return o.addEventListener("keydown",i,{passive:!0}),o.addEventListener("keyup",a,{passive:!0}),()=>{o.removeEventListener("keydown",i),o.removeEventListener("keyup",a)}},[n,i]),o.createElement(rg.Provider,{value:l,children:t})}function rB(e){let[t,r,n]=o.useContext(rg);return e?n(e):[t,r]}var rC=Object.defineProperty;class ry{constructor(){((e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?rC(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r})(this,"_listeners")}addEventListener(e,t){void 0===this._listeners&&(this._listeners={});let r=this._listeners;void 0===r[e]&&(r[e]=[]),-1===r[e].indexOf(t)&&r[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;let r=this._listeners;return void 0!==r[e]&&-1!==r[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;let r=this._listeners[e];if(void 0!==r){let e=r.indexOf(t);-1!==e&&r.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;let t=this._listeners[e.type];if(void 0!==t){e.target=this;let r=t.slice(0);for(let t=0,n=r.length;t{let n;return(n="symbol"!=typeof t?t+"":t)in e?rb(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,r};let rE=new u.Euler(0,0,0,"YXZ"),rM=new u.Vector3,rS={type:"change"},rF={type:"lock"},rT={type:"unlock"},rR=Math.PI/2;class rw extends ry{constructor(e,t){super(),rx(this,"camera"),rx(this,"domElement"),rx(this,"isLocked"),rx(this,"minPolarAngle"),rx(this,"maxPolarAngle"),rx(this,"pointerSpeed"),rx(this,"onMouseMove",e=>{this.domElement&&!1!==this.isLocked&&(rE.setFromQuaternion(this.camera.quaternion),rE.y-=.002*e.movementX*this.pointerSpeed,rE.x-=.002*e.movementY*this.pointerSpeed,rE.x=Math.max(rR-this.maxPolarAngle,Math.min(rR-this.minPolarAngle,rE.x)),this.camera.quaternion.setFromEuler(rE),this.dispatchEvent(rS))}),rx(this,"onPointerlockChange",()=>{this.domElement&&(this.domElement.ownerDocument.pointerLockElement===this.domElement?(this.dispatchEvent(rF),this.isLocked=!0):(this.dispatchEvent(rT),this.isLocked=!1))}),rx(this,"onPointerlockError",()=>{console.error("THREE.PointerLockControls: Unable to use Pointer Lock API")}),rx(this,"connect",e=>{this.domElement=e||this.domElement,this.domElement&&(this.domElement.ownerDocument.addEventListener("mousemove",this.onMouseMove),this.domElement.ownerDocument.addEventListener("pointerlockchange",this.onPointerlockChange),this.domElement.ownerDocument.addEventListener("pointerlockerror",this.onPointerlockError))}),rx(this,"disconnect",()=>{this.domElement&&(this.domElement.ownerDocument.removeEventListener("mousemove",this.onMouseMove),this.domElement.ownerDocument.removeEventListener("pointerlockchange",this.onPointerlockChange),this.domElement.ownerDocument.removeEventListener("pointerlockerror",this.onPointerlockError))}),rx(this,"dispose",()=>{this.disconnect()}),rx(this,"getObject",()=>this.camera),rx(this,"direction",new u.Vector3(0,0,-1)),rx(this,"getDirection",e=>e.copy(this.direction).applyQuaternion(this.camera.quaternion)),rx(this,"moveForward",e=>{rM.setFromMatrixColumn(this.camera.matrix,0),rM.crossVectors(this.camera.up,rM),this.camera.position.addScaledVector(rM,e)}),rx(this,"moveRight",e=>{rM.setFromMatrixColumn(this.camera.matrix,0),this.camera.position.addScaledVector(rM,e)}),rx(this,"lock",()=>{this.domElement&&this.domElement.requestPointerLock()}),rx(this,"unlock",()=>{this.domElement&&this.domElement.ownerDocument.exitPointerLock()}),this.camera=e,this.domElement=t,this.isLocked=!1,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.pointerSpeed=1,t&&this.connect(t)}}(n={}).forward="forward",n.backward="backward",n.left="left",n.right="right",n.up="up",n.down="down",n.lookUp="lookUp",n.lookDown="lookDown",n.lookLeft="lookLeft",n.lookRight="lookRight",n.camera1="camera1",n.camera2="camera2",n.camera3="camera3",n.camera4="camera4",n.camera5="camera5",n.camera6="camera6",n.camera7="camera7",n.camera8="camera8",n.camera9="camera9";let rD=Math.PI/2-.01;function rI(){let e,t,r,n,i,l,s,c,d,f,m,h,p,A=(0,a.c)(26),{speedMultiplier:g,setSpeedMultiplier:v}=(0,S.useControls)(),[y,b]=rB(),{camera:x,gl:E}=(0,C.useThree)(),{nextCamera:M,setCameraIndex:F,cameraCount:T}=tX(),R=(0,o.useRef)(null);A[0]===Symbol.for("react.memo_cache_sentinel")?(e=new u.Vector3,A[0]=e):e=A[0];let w=(0,o.useRef)(e);A[1]===Symbol.for("react.memo_cache_sentinel")?(t=new u.Vector3,A[1]=t):t=A[1];let D=(0,o.useRef)(t);A[2]===Symbol.for("react.memo_cache_sentinel")?(r=new u.Vector3,A[2]=r):r=A[2];let I=(0,o.useRef)(r);A[3]===Symbol.for("react.memo_cache_sentinel")?(n=new u.Euler(0,0,0,"YXZ"),A[3]=n):n=A[3];let G=(0,o.useRef)(n);return A[4]!==x||A[5]!==E.domElement?(i=()=>{let e=new rw(x,E.domElement);return R.current=e,()=>{e.dispose()}},l=[x,E.domElement],A[4]=x,A[5]=E.domElement,A[6]=i,A[7]=l):(i=A[6],l=A[7]),(0,o.useEffect)(i,l),A[8]!==x||A[9]!==E.domElement||A[10]!==M?(s=()=>{let e=E.domElement,t=new u.Euler(0,0,0,"YXZ"),r=!1,n=!1,i=0,a=0,o=t=>{R.current?.isLocked||t.target===e&&(r=!0,n=!1,i=t.clientX,a=t.clientY)},l=e=>{!r||!n&&3>Math.abs(e.clientX-i)&&3>Math.abs(e.clientY-a)||(n=!0,t.setFromQuaternion(x.quaternion,"YXZ"),t.y=t.y-.003*e.movementX,t.x=t.x-.003*e.movementY,t.x=Math.max(-rD,Math.min(rD,t.x)),x.quaternion.setFromEuler(t))},s=()=>{r=!1},c=t=>{let r=R.current;!r||r.isLocked?M():t.target!==e||n||r.lock()};return e.addEventListener("mousedown",o),document.addEventListener("mousemove",l),document.addEventListener("mouseup",s),document.addEventListener("click",c),()=>{e.removeEventListener("mousedown",o),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s),document.removeEventListener("click",c)}},c=[x,E.domElement,M],A[8]=x,A[9]=E.domElement,A[10]=M,A[11]=s,A[12]=c):(s=A[11],c=A[12]),(0,o.useEffect)(s,c),A[13]!==T||A[14]!==F||A[15]!==y?(d=()=>{let e=["camera1","camera2","camera3","camera4","camera5","camera6","camera7","camera8","camera9"];return y(t=>{for(let r=0;r{let e=e=>{e.preventDefault();let t=e.deltaY>0?-1:1,r=Math.max(.05,Math.min(.5,Math.abs(.01*e.deltaY)))*t;v(e=>Math.max(.1,Math.min(5,Math.round((e+r)*20)/20)))},t=E.domElement;return t.addEventListener("wheel",e,{passive:!1}),()=>{t.removeEventListener("wheel",e)}},h=[E.domElement,v],A[18]=E.domElement,A[19]=v,A[20]=m,A[21]=h):(m=A[20],h=A[21]),(0,o.useEffect)(m,h),A[22]!==x||A[23]!==b||A[24]!==g?(p=(e,t)=>{let{forward:r,backward:n,left:i,right:a,up:o,down:l,lookUp:s,lookDown:u,lookLeft:c,lookRight:d}=b();if((s||u||c||d)&&(G.current.setFromQuaternion(x.quaternion,"YXZ"),c&&(G.current.y=G.current.y+ +t),d&&(G.current.y=G.current.y-t),s&&(G.current.x=G.current.x+ +t),u&&(G.current.x=G.current.x-t),G.current.x=Math.max(-rD,Math.min(rD,G.current.x)),x.quaternion.setFromEuler(G.current)),!r&&!n&&!i&&!a&&!o&&!l)return;let f=80*g;x.getWorldDirection(w.current),w.current.normalize(),D.current.crossVectors(x.up,w.current).normalize(),I.current.set(0,0,0),r&&I.current.add(w.current),n&&I.current.sub(w.current),i&&I.current.add(D.current),a&&I.current.sub(D.current),o&&(I.current.y=I.current.y+1),l&&(I.current.y=I.current.y-1),I.current.lengthSq()>0&&(I.current.normalize().multiplyScalar(f*t),x.position.add(I.current))},A[22]=x,A[23]=b,A[24]=g,A[25]=p):p=A[25],(0,B.useFrame)(p),null}let rG=[{name:"forward",keys:["KeyW"]},{name:"backward",keys:["KeyS"]},{name:"left",keys:["KeyA"]},{name:"right",keys:["KeyD"]},{name:"up",keys:["Space"]},{name:"down",keys:["ShiftLeft","ShiftRight"]},{name:"lookUp",keys:["ArrowUp"]},{name:"lookDown",keys:["ArrowDown"]},{name:"lookLeft",keys:["ArrowLeft"]},{name:"lookRight",keys:["ArrowRight"]},{name:"camera1",keys:["Digit1"]},{name:"camera2",keys:["Digit2"]},{name:"camera3",keys:["Digit3"]},{name:"camera4",keys:["Digit4"]},{name:"camera5",keys:["Digit5"]},{name:"camera6",keys:["Digit6"]},{name:"camera7",keys:["Digit7"]},{name:"camera8",keys:["Digit8"]},{name:"camera9",keys:["Digit9"]}];function rL(){let e,t,r=(0,a.c)(2);return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],r[0]=e):e=r[0],(0,o.useEffect)(r_,e),r[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsx)(rI,{}),r[1]=t):t=r[1],t}function r_(){return window.addEventListener("keydown",rP,{capture:!0}),window.addEventListener("keyup",rP,{capture:!0}),()=>{window.removeEventListener("keydown",rP,{capture:!0}),window.removeEventListener("keyup",rP,{capture:!0})}}function rP(e){(e.metaKey||e.ctrlKey)&&"k"===e.key||e.metaKey&&e.stopImmediatePropagation()}function rO(){let e,t,r,n,o,l,s,u,c,d,f,m,h,p,A,g,v,B,C,y,b,x,E,M,S=(0,a.c)(51),F=rB(rX),T=rB(rV),R=rB(rQ),w=rB(rK),D=rB(rJ),I=rB(rN),G=rB(rU),L=rB(rj),_=rB(rH),P=rB(rk);return S[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)("div",{className:"KeyboardOverlay-spacer"}),S[0]=e):e=S[0],S[1]!==F?(t=(0,i.jsx)("div",{className:"KeyboardOverlay-key","data-pressed":F,children:"W"}),S[1]=F,S[2]=t):t=S[2],S[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,i.jsx)("div",{className:"KeyboardOverlay-spacer"}),S[3]=r):r=S[3],S[4]!==t?(n=(0,i.jsxs)("div",{className:"KeyboardOverlay-row",children:[e,t,r]}),S[4]=t,S[5]=n):n=S[5],S[6]!==R?(o=(0,i.jsx)("div",{className:"KeyboardOverlay-key","data-pressed":R,children:"A"}),S[6]=R,S[7]=o):o=S[7],S[8]!==T?(l=(0,i.jsx)("div",{className:"KeyboardOverlay-key","data-pressed":T,children:"S"}),S[8]=T,S[9]=l):l=S[9],S[10]!==w?(s=(0,i.jsx)("div",{className:"KeyboardOverlay-key","data-pressed":w,children:"D"}),S[10]=w,S[11]=s):s=S[11],S[12]!==o||S[13]!==l||S[14]!==s?(u=(0,i.jsxs)("div",{className:"KeyboardOverlay-row",children:[o,l,s]}),S[12]=o,S[13]=l,S[14]=s,S[15]=u):u=S[15],S[16]!==n||S[17]!==u?(c=(0,i.jsxs)("div",{className:"KeyboardOverlay-column",children:[n,u]}),S[16]=n,S[17]=u,S[18]=c):c=S[18],S[19]===Symbol.for("react.memo_cache_sentinel")?(d=(0,i.jsx)("span",{className:"KeyboardOverlay-arrow",children:"↑"}),S[19]=d):d=S[19],S[20]!==D?(f=(0,i.jsx)("div",{className:"KeyboardOverlay-row",children:(0,i.jsxs)("div",{className:"KeyboardOverlay-key","data-pressed":D,children:[d," Space"]})}),S[20]=D,S[21]=f):f=S[21],S[22]===Symbol.for("react.memo_cache_sentinel")?(m=(0,i.jsx)("span",{className:"KeyboardOverlay-arrow",children:"↓"}),S[22]=m):m=S[22],S[23]!==I?(h=(0,i.jsx)("div",{className:"KeyboardOverlay-row",children:(0,i.jsxs)("div",{className:"KeyboardOverlay-key","data-pressed":I,children:[m," Shift"]})}),S[23]=I,S[24]=h):h=S[24],S[25]!==f||S[26]!==h?(p=(0,i.jsxs)("div",{className:"KeyboardOverlay-column",children:[f,h]}),S[25]=f,S[26]=h,S[27]=p):p=S[27],S[28]===Symbol.for("react.memo_cache_sentinel")?(A=(0,i.jsx)("div",{className:"KeyboardOverlay-spacer"}),S[28]=A):A=S[28],S[29]!==G?(g=(0,i.jsx)("div",{className:"KeyboardOverlay-key","data-pressed":G,children:"↑"}),S[29]=G,S[30]=g):g=S[30],S[31]===Symbol.for("react.memo_cache_sentinel")?(v=(0,i.jsx)("div",{className:"KeyboardOverlay-spacer"}),S[31]=v):v=S[31],S[32]!==g?(B=(0,i.jsxs)("div",{className:"KeyboardOverlay-row",children:[A,g,v]}),S[32]=g,S[33]=B):B=S[33],S[34]!==_?(C=(0,i.jsx)("div",{className:"KeyboardOverlay-key","data-pressed":_,children:"←"}),S[34]=_,S[35]=C):C=S[35],S[36]!==L?(y=(0,i.jsx)("div",{className:"KeyboardOverlay-key","data-pressed":L,children:"↓"}),S[36]=L,S[37]=y):y=S[37],S[38]!==P?(b=(0,i.jsx)("div",{className:"KeyboardOverlay-key","data-pressed":P,children:"→"}),S[38]=P,S[39]=b):b=S[39],S[40]!==C||S[41]!==y||S[42]!==b?(x=(0,i.jsxs)("div",{className:"KeyboardOverlay-row",children:[C,y,b]}),S[40]=C,S[41]=y,S[42]=b,S[43]=x):x=S[43],S[44]!==B||S[45]!==x?(E=(0,i.jsxs)("div",{className:"KeyboardOverlay-column",children:[B,x]}),S[44]=B,S[45]=x,S[46]=E):E=S[46],S[47]!==p||S[48]!==E||S[49]!==c?(M=(0,i.jsxs)("div",{className:"KeyboardOverlay",children:[c,p,E]}),S[47]=p,S[48]=E,S[49]=c,S[50]=M):M=S[50],M}function rk(e){return e.lookRight}function rH(e){return e.lookLeft}function rj(e){return e.lookDown}function rU(e){return e.lookUp}function rN(e){return e.down}function rJ(e){return e.up}function rK(e){return e.right}function rQ(e){return e.left}function rV(e){return e.backward}function rX(e){return e.forward}let rq=Math.PI/2-.01;function rW({joystickState:t,joystickZone:r,lookJoystickState:n,lookJoystickZone:a}){let{touchMode:l}=(0,S.useControls)();(0,o.useEffect)(()=>{let n=r.current;if(!n)return;let i=null,a=!1;return e.A(84968).then(e=>{a||((i=e.default.create({zone:n,mode:"static",position:{left:"70px",bottom:"70px"},size:120,restOpacity:.9})).on("move",(e,r)=>{t.current.angle=r.angle.radian,t.current.force=Math.min(1,r.force)}),i.on("end",()=>{t.current.force=0}))}),()=>{a=!0,i?.destroy()}},[t,r,l]),(0,o.useEffect)(()=>{if("dualStick"!==l)return;let t=a.current;if(!t)return;let r=null,i=!1;return e.A(84968).then(e=>{i||((r=e.default.create({zone:t,mode:"static",position:{right:"70px",bottom:"70px"},size:120,restOpacity:.9})).on("move",(e,t)=>{n.current.angle=t.angle.radian,n.current.force=Math.min(1,t.force)}),r.on("end",()=>{n.current.force=0}))}),()=>{i=!0,r?.destroy()}},[l,n,a]);let s=()=>{document.activeElement instanceof HTMLElement&&document.activeElement.blur()};return"dualStick"===l?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{ref:r,className:"TouchJoystick TouchJoystick--left",onContextMenu:e=>e.preventDefault(),onTouchStart:s}),(0,i.jsx)("div",{ref:a,className:"TouchJoystick TouchJoystick--right",onContextMenu:e=>e.preventDefault(),onTouchStart:s})]}):(0,i.jsx)("div",{ref:r,className:"TouchJoystick",onContextMenu:e=>e.preventDefault(),onTouchStart:s})}function rY(e){let t,r,n,i,l,s,c,d,f,m,h=(0,a.c)(25),{joystickState:p,joystickZone:A,lookJoystickState:g}=e,{speedMultiplier:v,touchMode:y}=(0,S.useControls)(),{camera:b,gl:x}=(0,C.useThree)();h[0]===Symbol.for("react.memo_cache_sentinel")?(t=new u.Euler(0,0,0,"YXZ"),h[0]=t):t=h[0];let E=(0,o.useRef)(t),M=(0,o.useRef)(null);h[1]===Symbol.for("react.memo_cache_sentinel")?(r={x:0,y:0},h[1]=r):r=h[1];let F=(0,o.useRef)(r);h[2]===Symbol.for("react.memo_cache_sentinel")?(n=new u.Vector3,h[2]=n):n=h[2];let T=(0,o.useRef)(n);h[3]===Symbol.for("react.memo_cache_sentinel")?(i=new u.Vector3,h[3]=i):i=h[3];let R=(0,o.useRef)(i);h[4]===Symbol.for("react.memo_cache_sentinel")?(l=new u.Vector3,h[4]=l):l=h[4];let w=(0,o.useRef)(l);return h[5]!==b.quaternion?(s=()=>{E.current.setFromQuaternion(b.quaternion,"YXZ")},h[5]=b.quaternion,h[6]=s):s=h[6],h[7]!==b?(c=[b],h[7]=b,h[8]=c):c=h[8],(0,o.useEffect)(s,c),h[9]!==b.quaternion||h[10]!==x.domElement||h[11]!==A||h[12]!==y?(d=()=>{if("moveLookStick"!==y)return;let e=x.domElement,t=e=>{let t=A.current;if(!t)return!1;let r=t.getBoundingClientRect();return e.clientX>=r.left&&e.clientX<=r.right&&e.clientY>=r.top&&e.clientY<=r.bottom},r=e=>{if(null===M.current)for(let r=0;r{if(null!==M.current)for(let t=0;t{for(let t=0;t{e.removeEventListener("touchstart",r),e.removeEventListener("touchmove",n),e.removeEventListener("touchend",i),e.removeEventListener("touchcancel",i),M.current=null}},h[9]=b.quaternion,h[10]=x.domElement,h[11]=A,h[12]=y,h[13]=d):d=h[13],h[14]!==b||h[15]!==x.domElement||h[16]!==A||h[17]!==y?(f=[b,x.domElement,A,y],h[14]=b,h[15]=x.domElement,h[16]=A,h[17]=y,h[18]=f):f=h[18],(0,o.useEffect)(d,f),h[19]!==b||h[20]!==p.current||h[21]!==g||h[22]!==v||h[23]!==y?(m=(e,t)=>{let{force:r,angle:n}=p.current;if("dualStick"===y){let e=g.current;if(e.force>.15){let r=(e.force-.15)/.85,n=Math.cos(e.angle),i=Math.sin(e.angle);E.current.setFromQuaternion(b.quaternion,"YXZ"),E.current.y=E.current.y-n*r*2.5*t,E.current.x=E.current.x+i*r*2.5*t,E.current.x=Math.max(-rq,Math.min(rq,E.current.x)),b.quaternion.setFromEuler(E.current)}if(r>.08){let e=80*v*((r-.08)/.92),i=Math.cos(n),a=Math.sin(n);b.getWorldDirection(T.current),T.current.normalize(),R.current.crossVectors(b.up,T.current).normalize(),w.current.set(0,0,0).addScaledVector(T.current,a).addScaledVector(R.current,-i),w.current.lengthSq()>0&&(w.current.normalize().multiplyScalar(e*t),b.position.add(w.current))}}else if("moveLookStick"===y&&r>0){let e=80*v*.5;if(b.getWorldDirection(T.current),T.current.normalize(),w.current.copy(T.current).multiplyScalar(e*t),b.position.add(w.current),r>=.15){let e=Math.cos(n),i=Math.sin(n),a=(r-.15)/.85;E.current.setFromQuaternion(b.quaternion,"YXZ"),E.current.y=E.current.y-e*a*1.25*t,E.current.x=E.current.x+i*a*1.25*t,E.current.x=Math.max(-rq,Math.min(rq,E.current.x)),b.quaternion.setFromEuler(E.current)}}},h[19]=b,h[20]=p.current,h[21]=g,h[22]=v,h[23]=y,h[24]=m):m=h[24],(0,B.useFrame)(m),null}var rz="undefined"!=typeof window&&!!(null==(r=window.document)?void 0:r.createElement);function rZ(e){return e?"self"in e?e.document:e.ownerDocument||document:document}function r$(e){return e?"self"in e?e.self:rZ(e).defaultView||window:self}function r0(e,t=!1){let{activeElement:r}=rZ(e);if(!(null==r?void 0:r.nodeName))return null;if(r2(r)&&r.contentDocument)return r0(r.contentDocument.body,t);if(t){let e=r.getAttribute("aria-activedescendant");if(e){let t=rZ(r).getElementById(e);if(t)return t}}return r}function r1(e,t){return e===t||e.contains(t)}function r2(e){return"IFRAME"===e.tagName}function r9(e){let t=e.tagName.toLowerCase();return"button"===t||"input"===t&&!!e.type&&-1!==r3.indexOf(e.type)}var r3=["button","color","file","image","reset","submit"];function r5(e){return"function"==typeof e.checkVisibility?e.checkVisibility():e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}function r8(e){try{let t=e instanceof HTMLInputElement&&null!==e.selectionStart,r="TEXTAREA"===e.tagName;return t||r||!1}catch(e){return!1}}function r6(e){return e.isContentEditable||r8(e)}function r4(e){let t=0,r=0;if(r8(e))t=e.selectionStart||0,r=e.selectionEnd||0;else if(e.isContentEditable){let n=rZ(e).getSelection();if((null==n?void 0:n.rangeCount)&&n.anchorNode&&r1(e,n.anchorNode)&&n.focusNode&&r1(e,n.focusNode)){let i=n.getRangeAt(0),a=i.cloneRange();a.selectNodeContents(e),a.setEnd(i.startContainer,i.startOffset),t=a.toString().length,a.setEnd(i.endContainer,i.endOffset),r=a.toString().length}}return{start:t,end:r}}function r7(e,t){let r=null==e?void 0:e.getAttribute("role");return r&&-1!==["dialog","menu","listbox","tree","grid"].indexOf(r)?r:t}function ne(e){if(!e)return null;let t=e=>"auto"===e||"scroll"===e;if(e.clientHeight&&e.scrollHeight>e.clientHeight){let{overflowY:r}=getComputedStyle(e);if(t(r))return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){let{overflowX:r}=getComputedStyle(e);if(t(r))return e}return ne(e.parentElement)||document.scrollingElement||document.body}function nt(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}function nr(e,t){return t&&e.item(t)||null}var nn=Symbol("FOCUS_SILENTLY");function ni(e,t,r){if(!t||t===r)return!1;let n=e.item(t.id);return!!n&&(!r||n.element!==r)}function na(){}function no(e,t){return"function"==typeof Object.hasOwn?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function nl(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}function ns(e){return e}function nu(e,t){if(!e){if("string"!=typeof t)throw Error("Invariant failed");throw Error(t)}}function nc(e,...t){let r="function"==typeof e?e(...t):e;return null!=r&&!r}function nd(e){return e.disabled||!0===e["aria-disabled"]||"true"===e["aria-disabled"]}function nf(e){let t={};for(let r in e)void 0!==e[r]&&(t[r]=e[r]);return t}function nm(...e){for(let t of e)if(void 0!==t)return t}function nh(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function np(){return rz&&!!navigator.maxTouchPoints}function nA(){return!!rz&&/mac|iphone|ipad|ipod/i.test(navigator.platform)}function ng(){return rz&&nA()&&/apple/i.test(navigator.vendor)}function nv(e){return!!(e.currentTarget&&!r1(e.currentTarget,e.target))}function nB(e){return e.target===e.currentTarget}function nC(e,t){let r=new FocusEvent("blur",t),n=e.dispatchEvent(r),i={...t,bubbles:!0};return e.dispatchEvent(new FocusEvent("focusout",i)),n}function ny(e,t){let r=new MouseEvent("click",t);return e.dispatchEvent(r)}function nb(e,t){let r=t||e.currentTarget,n=e.relatedTarget;return!n||!r1(r,n)}function nx(e,t,r,n){let i=(e=>{if(n){let t=setTimeout(e,n);return()=>clearTimeout(t)}let t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)})(()=>{e.removeEventListener(t,a,!0),r()}),a=()=>{i(),r()};return e.addEventListener(t,a,{once:!0,capture:!0}),i}function nE(e,t,r,n=window){let i=[];try{for(let a of(n.document.addEventListener(e,t,r),Array.from(n.frames)))i.push(nE(e,t,r,a))}catch(e){}return()=>{try{n.document.removeEventListener(e,t,r)}catch(e){}for(let e of i)e()}}var nM={...o},nS=nM.useId;nM.useDeferredValue;var nF=nM.useInsertionEffect,nT=rz?o.useLayoutEffect:o.useEffect;function nR(e){let t=(0,o.useRef)(()=>{throw Error("Cannot call an event handler while rendering.")});return nF?nF(()=>{t.current=e}):t.current=e,(0,o.useCallback)((...e)=>{var r;return null==(r=t.current)?void 0:r.call(t,...e)},[])}function nw(...e){return(0,o.useMemo)(()=>{if(e.some(Boolean))return t=>{for(let r of e)nh(r,t)}},e)}function nD(e){if(nS){let t=nS();return e||t}let[t,r]=(0,o.useState)(e);return nT(()=>{if(e||t)return;let n=Math.random().toString(36).slice(2,8);r(`id-${n}`)},[e,t]),e||t}function nI(e,t){let r=(0,o.useRef)(!1);(0,o.useEffect)(()=>{if(r.current)return e();r.current=!0},t),(0,o.useEffect)(()=>()=>{r.current=!1},[])}function nG(){return(0,o.useReducer)(()=>[],[])}function nL(e){return nR("function"==typeof e?e:()=>e)}function n_(e,t,r=[]){let n=(0,o.useCallback)(r=>(e.wrapElement&&(r=e.wrapElement(r)),t(r)),[...r,e.wrapElement]);return{...e,wrapElement:n}}function nP(e=!1,t){let[r,n]=(0,o.useState)(null);return{portalRef:nw(n,t),portalNode:r,domReady:!e||r}}var nO=!1,nk=!1,nH=0,nj=0;function nU(e){let t,r;t=e.movementX||e.screenX-nH,r=e.movementY||e.screenY-nj,nH=e.screenX,nj=e.screenY,(t||r||0)&&(nk=!0)}function nN(){nk=!1}function nJ(e){let t=o.forwardRef((t,r)=>e({...t,ref:r}));return t.displayName=e.displayName||e.name,t}function nK(e,t){return o.memo(e,t)}function nQ(e,t){let r,{wrapElement:n,render:a,...l}=t,s=nw(t.ref,a&&(0,o.isValidElement)(a)&&("ref"in a.props||"ref"in a)?({...a.props}).ref||a.ref:null);if(o.isValidElement(a)){let e={...a.props,ref:s};r=o.cloneElement(a,function(e,t){let r={...e};for(let n in t){if(!no(t,n))continue;if("className"===n){let n="className";r[n]=e[n]?`${e[n]} ${t[n]}`:t[n];continue}if("style"===n){let n="style";r[n]=e[n]?{...e[n],...t[n]}:t[n];continue}let i=t[n];if("function"==typeof i&&n.startsWith("on")){let t=e[n];if("function"==typeof t){r[n]=(...e)=>{i(...e),t(...e)};continue}}r[n]=i}return r}(l,e))}else r=a?a(l):(0,i.jsx)(e,{...l});return n?n(r):r}function nV(e){let t=(t={})=>e(t);return t.displayName=e.name,t}function nX(e=[],t=[]){let r=o.createContext(void 0),n=o.createContext(void 0),a=()=>o.useContext(r),l=t=>e.reduceRight((e,r)=>(0,i.jsx)(r,{...t,children:e}),(0,i.jsx)(r.Provider,{...t}));return{context:r,scopedContext:n,useContext:a,useScopedContext:(e=!1)=>{let t=o.useContext(n),r=a();return e?t:t||r},useProviderContext:()=>{let e=o.useContext(n),t=a();if(!e||e!==t)return t},ContextProvider:l,ScopedContextProvider:e=>(0,i.jsx)(l,{...e,children:t.reduceRight((t,r)=>(0,i.jsx)(r,{...e,children:t}),(0,i.jsx)(n.Provider,{...e}))})}}var nq=nX(),nW=nq.useContext;nq.useScopedContext,nq.useProviderContext;var nY=nX([nq.ContextProvider],[nq.ScopedContextProvider]),nz=nY.useContext;nY.useScopedContext;var nZ=nY.useProviderContext,n$=nY.ContextProvider,n0=nY.ScopedContextProvider,n1=(0,o.createContext)(void 0),n2=(0,o.createContext)(void 0),n9=(0,o.createContext)(!0),n3="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function n5(e){return!(!e.matches(n3)||!r5(e)||e.closest("[inert]"))}function n8(e){if(!n5(e)||0>Number.parseInt(e.getAttribute("tabindex")||"0",10))return!1;if(!("form"in e)||!e.form||e.checked||"radio"!==e.type)return!0;let t=e.form.elements.namedItem(e.name);if(!t||!("length"in t))return!0;let r=r0(e);return!r||r===e||!("form"in r)||r.form!==e.form||r.name!==e.name}function n6(e,t){let r=Array.from(e.querySelectorAll(n3));t&&r.unshift(e);let n=r.filter(n5);return n.forEach((e,t)=>{if(r2(e)&&e.contentDocument){let r=e.contentDocument.body;n.splice(t,1,...n6(r))}}),n}function n4(e,t,r){let n=Array.from(e.querySelectorAll(n3)),i=n.filter(n8);return(t&&n8(e)&&i.unshift(e),i.forEach((e,t)=>{if(r2(e)&&e.contentDocument){let n=n4(e.contentDocument.body,!1,r);i.splice(t,1,...n)}}),!i.length&&r)?n:i}function n7(e,t){var r;let n,i,a,o;return r=document.body,n=r0(r),a=(i=n6(r,!1)).indexOf(n),(o=i.slice(a+1)).find(n8)||(e?i.find(n8):null)||(t?o[0]:null)||null}function ie(e,t){var r;let n,i,a,o;return r=document.body,n=r0(r),a=(i=n6(r,!1).reverse()).indexOf(n),(o=i.slice(a+1)).find(n8)||(e?i.find(n8):null)||(t?o[0]:null)||null}function it(e){let t=r0(e);if(!t)return!1;if(t===e)return!0;let r=t.getAttribute("aria-activedescendant");return!!r&&r===e.id}function ir(e){let t=r0(e);if(!t)return!1;if(r1(e,t))return!0;let r=t.getAttribute("aria-activedescendant");return!!r&&"id"in e&&(r===e.id||!!e.querySelector(`#${CSS.escape(r)}`))}function ii(e){!ir(e)&&n5(e)&&e.focus()}var ia=ng(),io=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"],il=Symbol("safariFocusAncestor");function is(e){return"input"===e.tagName.toLowerCase()&&!!e.type&&("radio"===e.type||"checkbox"===e.type)}function iu(e,t){return nR(r=>{null==e||e(r),!r.defaultPrevented&&t&&(r.stopPropagation(),r.preventDefault())})}var ic=!1,id=!0;function im(e){let t=e.target;t&&"hasAttribute"in t&&!t.hasAttribute("data-focus-visible")&&(id=!1)}function ih(e){e.metaKey||e.ctrlKey||e.altKey||(id=!0)}var ip=nV(function({focusable:e=!0,accessibleWhenDisabled:t,autoFocus:r,onFocusVisible:n,...i}){var a,l,s,u,c;let d=(0,o.useRef)(null);(0,o.useEffect)(()=>{!e||ic||(nE("mousedown",im,!0),nE("keydown",ih,!0),ic=!0)},[e]),ia&&(0,o.useEffect)(()=>{if(!e)return;let t=d.current;if(!t||!is(t))return;let r="labels"in t?t.labels:null;if(!r)return;let n=()=>queueMicrotask(()=>t.focus());for(let e of r)e.addEventListener("mouseup",n);return()=>{for(let e of r)e.removeEventListener("mouseup",n)}},[e]);let f=e&&nd(i),m=!!f&&!t,[h,p]=(0,o.useState)(!1);(0,o.useEffect)(()=>{e&&m&&h&&p(!1)},[e,m,h]),(0,o.useEffect)(()=>{if(!e||!h)return;let t=d.current;if(!t||"undefined"==typeof IntersectionObserver)return;let r=new IntersectionObserver(()=>{n5(t)||p(!1)});return r.observe(t),()=>r.disconnect()},[e,h]);let A=iu(i.onKeyPressCapture,f),g=iu(i.onMouseDownCapture,f),v=iu(i.onClickCapture,f),B=i.onMouseDown,C=nR(t=>{if(null==B||B(t),t.defaultPrevented||!e)return;let r=t.currentTarget;if(!ia||nv(t)||!r9(r)&&!is(r))return;let n=!1,i=()=>{n=!0};r.addEventListener("focusin",i,{capture:!0,once:!0});let a=function(e){for(;e&&!n5(e);)e=e.closest(n3);return e||null}(r.parentElement);a&&(a[il]=!0),nx(r,"mouseup",()=>{r.removeEventListener("focusin",i,!0),a&&(a[il]=!1),n||ii(r)})}),y=(t,r)=>{if(r&&(t.currentTarget=r),!e)return;let i=t.currentTarget;i&&it(i)&&(null==n||n(t),t.defaultPrevented||(i.dataset.focusVisible="true",p(!0)))},b=i.onKeyDownCapture,x=nR(t=>{if(null==b||b(t),t.defaultPrevented||!e||h||t.metaKey||t.altKey||t.ctrlKey||!nB(t))return;let r=t.currentTarget;nx(r,"focusout",()=>y(t,r))}),E=i.onFocusCapture,M=nR(t=>{if(null==E||E(t),t.defaultPrevented||!e)return;if(!nB(t))return void p(!1);let r=t.currentTarget;id||function(e){let{tagName:t,readOnly:r,type:n}=e;return"TEXTAREA"===t&&!r||"SELECT"===t&&!r||("INPUT"!==t||r?!!e.isContentEditable||"combobox"===e.getAttribute("role")&&!!e.dataset.name:io.includes(n))}(t.target)?nx(t.target,"focusout",()=>y(t,r)):p(!1)}),S=i.onBlur,F=nR(t=>{null==S||S(t),!e||nb(t)&&(t.currentTarget.removeAttribute("data-focus-visible"),p(!1))}),T=(0,o.useContext)(n9),R=nR(t=>{e&&r&&t&&T&&queueMicrotask(()=>{it(t)||n5(t)&&t.focus()})}),w=function(e,t){let r=e=>{if("string"==typeof e)return e},[n,i]=(0,o.useState)(()=>r(void 0));return nT(()=>{let t=e&&"current"in e?e.current:e;i((null==t?void 0:t.tagName.toLowerCase())||r(void 0))},[e,void 0]),n}(d),D=e&&(!w||"button"===w||"summary"===w||"input"===w||"select"===w||"textarea"===w||"a"===w),I=e&&(!w||"button"===w||"input"===w||"select"===w||"textarea"===w),G=i.style,L=(0,o.useMemo)(()=>m?{pointerEvents:"none",...G}:G,[m,G]);return i={"data-focus-visible":e&&h||void 0,"data-autofocus":r||void 0,"aria-disabled":f||void 0,...i,ref:nw(d,R,i.ref),style:L,tabIndex:(a=e,l=m,s=D,u=I,c=i.tabIndex,a?l?s&&!u?-1:void 0:s?c:c||0:c),disabled:!!I&&!!m||void 0,contentEditable:f?void 0:i.contentEditable,onKeyPressCapture:A,onClickCapture:v,onMouseDownCapture:g,onMouseDown:C,onKeyDownCapture:x,onFocusCapture:M,onBlur:F},nf(i)});function iA(e){let t=[];for(let r of e)t.push(...r);return t}function ig(e){return e.slice().reverse()}function iv(e,t,r){return nR(n=>{var i;let a,o;if(null==t||t(n),n.defaultPrevented||n.isPropagationStopped()||!nB(n)||"Shift"===n.key||"Control"===n.key||"Alt"===n.key||"Meta"===n.key||(!(a=n.target)||r8(a))&&1===n.key.length&&!n.ctrlKey&&!n.metaKey)return;let l=e.getState(),s=null==(i=nr(e,l.activeId))?void 0:i.element;if(!s)return;let{view:u,...c}=n;s!==(null==r?void 0:r.current)&&s.focus(),o=new KeyboardEvent(n.type,c),s.dispatchEvent(o)||n.preventDefault(),n.currentTarget.contains(s)&&n.stopPropagation()})}nJ(function(e){return nQ("div",ip(e))});var iB=nV(function({store:e,composite:t=!0,focusOnMove:r=t,moveOnKeyPress:n=!0,...a}){let l=nZ();nu(e=e||l,!1);let s=(0,o.useRef)(null),u=(0,o.useRef)(null),c=function(e){let[t,r]=(0,o.useState)(!1),n=(0,o.useCallback)(()=>r(!0),[]),i=e.useState(t=>nr(e,t.activeId));return(0,o.useEffect)(()=>{let e=null==i?void 0:i.element;!t||e&&(r(!1),e.focus({preventScroll:!0}))},[i,t]),n}(e),d=e.useState("moves"),[,f]=function(e){let[t,r]=(0,o.useState)(null);return nT(()=>{if(null==t||!e)return;let r=null;return e(e=>(r=e,t)),()=>{e(r)}},[t,e]),[t,r]}(t?e.setBaseElement:null);(0,o.useEffect)(()=>{var n;if(!e||!d||!t||!r)return;let{activeId:i}=e.getState(),a=null==(n=nr(e,i))?void 0:n.element;a&&("scrollIntoView"in a?(a.focus({preventScroll:!0}),a.scrollIntoView({block:"nearest",inline:"nearest",...void 0})):a.focus())},[e,d,t,r]),nT(()=>{if(!e||!d||!t)return;let{baseElement:r,activeId:n}=e.getState();if(null!==n||!r)return;let i=u.current;u.current=null,i&&nC(i,{relatedTarget:r}),it(r)||r.focus()},[e,d,t]);let m=e.useState("activeId"),h=e.useState("virtualFocus");nT(()=>{var r;if(!e||!t||!h)return;let n=u.current;if(u.current=null,!n)return;let i=(null==(r=nr(e,m))?void 0:r.element)||r0(n);i!==n&&nC(n,{relatedTarget:i})},[e,m,h,t]);let p=iv(e,a.onKeyDownCapture,u),A=iv(e,a.onKeyUpCapture,u),g=a.onFocusCapture,v=nR(t=>{var r;let n;if(null==g||g(t),t.defaultPrevented||!e)return;let{virtualFocus:i}=e.getState();if(!i)return;let a=t.relatedTarget,o=(n=(r=t.currentTarget)[nn],delete r[nn],n);nB(t)&&o&&(t.stopPropagation(),u.current=a)}),B=a.onFocus,C=nR(r=>{if(null==B||B(r),r.defaultPrevented||!t||!e)return;let{relatedTarget:n}=r,{virtualFocus:i}=e.getState();i?nB(r)&&!ni(e,n)&&queueMicrotask(c):nB(r)&&e.setActiveId(null)}),y=a.onBlurCapture,b=nR(t=>{var r;if(null==y||y(t),t.defaultPrevented||!e)return;let{virtualFocus:n,activeId:i}=e.getState();if(!n)return;let a=null==(r=nr(e,i))?void 0:r.element,o=t.relatedTarget,l=ni(e,o),s=u.current;u.current=null,nB(t)&&l?(o===a?s&&s!==o&&nC(s,t):a?nC(a,t):s&&nC(s,t),t.stopPropagation()):!ni(e,t.target)&&a&&nC(a,t)}),x=a.onKeyDown,E=nL(n),M=nR(t=>{var r;if(null==x||x(t),t.nativeEvent.isComposing||t.defaultPrevented||!e||!nB(t))return;let{orientation:n,renderedItems:i,activeId:a}=e.getState(),o=nr(e,a);if(null==(r=null==o?void 0:o.element)?void 0:r.isConnected)return;let l="horizontal"!==n,s="vertical"!==n,u=i.some(e=>!!e.rowId);if(("ArrowLeft"===t.key||"ArrowRight"===t.key||"Home"===t.key||"End"===t.key)&&r8(t.currentTarget))return;let c={ArrowUp:(u||l)&&(()=>{if(u){let e=iA(ig(function(e){let t=[];for(let r of e){let e=t.find(e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===r.rowId});e?e.push(r):t.push([r])}return t}(i))).find(e=>!e.disabled);return null==e?void 0:e.id}return null==e?void 0:e.last()}),ArrowRight:(u||s)&&e.first,ArrowDown:(u||l)&&e.first,ArrowLeft:(u||s)&&e.last,Home:e.first,End:e.last,PageUp:e.first,PageDown:e.last}[t.key];if(c){let r=c();if(void 0!==r){if(!E(t))return;t.preventDefault(),e.move(r)}}});return a=n_(a,t=>(0,i.jsx)(n$,{value:e,children:t}),[e]),a={"aria-activedescendant":e.useState(r=>{var n;if(e&&t&&r.virtualFocus)return null==(n=nr(e,r.activeId))?void 0:n.id}),...a,ref:nw(s,f,a.ref),onKeyDownCapture:p,onKeyUpCapture:A,onFocusCapture:v,onFocus:C,onBlurCapture:b,onKeyDown:M},a=ip({focusable:e.useState(e=>t&&(e.virtualFocus||null===e.activeId)),...a})});nJ(function(e){return nQ("div",iB(e))});var iC=nX();iC.useContext,iC.useScopedContext;var iy=iC.useProviderContext,ib=nX([iC.ContextProvider],[iC.ScopedContextProvider]);ib.useContext,ib.useScopedContext;var ix=ib.useProviderContext,iE=ib.ContextProvider,iM=ib.ScopedContextProvider,iS=(0,o.createContext)(void 0),iF=(0,o.createContext)(void 0),iT=nX([iE],[iM]);iT.useContext,iT.useScopedContext;var iR=iT.useProviderContext,iw=iT.ContextProvider,iD=iT.ScopedContextProvider,iI=nV(function({store:e,...t}){let r=iR();return e=e||r,t={...t,ref:nw(null==e?void 0:e.setAnchorElement,t.ref)}});nJ(function(e){return nQ("div",iI(e))});var iG=(0,o.createContext)(void 0),iL=nX([iw,n$],[iD,n0]),i_=iL.useContext,iP=iL.useScopedContext,iO=iL.useProviderContext,ik=iL.ContextProvider,iH=iL.ScopedContextProvider,ij=(0,o.createContext)(void 0),iU=(0,o.createContext)(!1);function iN(e,t){let r=e.__unstableInternals;return nu(r,"Invalid store"),r[t]}function iJ(e,...t){let r=e,n=r,i=Symbol(),a=na,o=new Set,l=new Set,s=new Set,u=new Set,c=new Set,d=new WeakMap,f=new WeakMap,m=(e,t,r=u)=>(r.add(t),f.set(t,e),()=>{var e;null==(e=d.get(t))||e(),d.delete(t),f.delete(t),r.delete(t)}),h=(e,a,o=!1)=>{var s,m;if(!no(r,e))return;let h=(m=r[e],"function"==typeof a?a("function"==typeof m?m():m):a);if(h===r[e])return;if(!o)for(let r of t)null==(s=null==r?void 0:r.setState)||s.call(r,e,h);let p=r;r={...r,[e]:h};let A=Symbol();i=A,l.add(e);let g=(t,n,i)=>{var a;let o=f.get(t);(!o||o.some(t=>i?i.has(t):t===e))&&(null==(a=d.get(t))||a(),d.set(t,t(r,n)))};for(let e of u)g(e,p);queueMicrotask(()=>{if(i!==A)return;let e=r;for(let e of c)g(e,n,l);n=e,l.clear()})},p={getState:()=>r,setState:h,__unstableInternals:{setup:e=>(s.add(e),()=>s.delete(e)),init:()=>{let e=o.size,n=Symbol();o.add(n);let i=()=>{o.delete(n),o.size||a()};if(e)return i;let l=Object.keys(r).map(e=>nl(...t.map(t=>{var r;let n=null==(r=null==t?void 0:t.getState)?void 0:r.call(t);if(n&&no(n,e))return iX(t,[e],t=>{h(e,t[e],!0)})}))),u=[];for(let e of s)u.push(e());return a=nl(...l,...u,...t.map(iQ)),i},subscribe:(e,t)=>m(e,t),sync:(e,t)=>(d.set(t,t(r,r)),m(e,t)),batch:(e,t)=>(d.set(t,t(r,n)),m(e,t,c)),pick:e=>iJ(function(e,t){let r={};for(let n of t)no(e,n)&&(r[n]=e[n]);return r}(r,e),p),omit:e=>iJ(function(e,t){let r={...e};for(let e of t)no(r,e)&&delete r[e];return r}(r,e),p)}};return p}function iK(e,...t){if(e)return iN(e,"setup")(...t)}function iQ(e,...t){if(e)return iN(e,"init")(...t)}function iV(e,...t){if(e)return iN(e,"subscribe")(...t)}function iX(e,...t){if(e)return iN(e,"sync")(...t)}function iq(e,...t){if(e)return iN(e,"batch")(...t)}function iW(e,...t){if(e)return iN(e,"omit")(...t)}function iY(...e){var t;let r={};for(let n of e){let e=null==(t=null==n?void 0:n.getState)?void 0:t.call(n);e&&Object.assign(r,e)}let n=iJ(r,...e);return Object.assign({},...e,n)}function iz(e,t){}function iZ(e,t,r){if(!r)return!1;let n=e.find(e=>!e.disabled&&e.value);return(null==n?void 0:n.value)===t}function i$(e,t){return!!t&&null!=e&&(e=e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),t.length>e.length&&0===t.toLowerCase().indexOf(e.toLowerCase()))}var i0=nV(function({store:e,focusable:t=!0,autoSelect:r=!1,getAutoSelectId:n,setValueOnChange:i,showMinLength:a=0,showOnChange:l,showOnMouseDown:s,showOnClick:u=s,showOnKeyDown:c,showOnKeyPress:d=c,blurActiveItemOnClick:f,setValueOnClick:m=!0,moveOnKeyPress:h=!0,autoComplete:p="list",...A}){var g;let v,B=iO();nu(e=e||B,!1);let C=(0,o.useRef)(null),[y,b]=nG(),x=(0,o.useRef)(!1),E=(0,o.useRef)(!1),M=e.useState(e=>e.virtualFocus&&r),S="inline"===p||"both"===p,[F,T]=(0,o.useState)(S);g=[S],v=(0,o.useRef)(!1),nT(()=>{if(v.current)return(()=>{S&&T(!0)})();v.current=!0},g),nT(()=>()=>{v.current=!1},[]);let R=e.useState("value"),w=(0,o.useRef)();(0,o.useEffect)(()=>iX(e,["selectedValue","activeId"],(e,t)=>{w.current=t.selectedValue}),[]);let D=e.useState(e=>{var t;if(S&&F){if(e.activeValue&&Array.isArray(e.selectedValue)&&(e.selectedValue.includes(e.activeValue)||(null==(t=w.current)?void 0:t.includes(e.activeValue))))return;return e.activeValue}}),I=e.useState("renderedItems"),G=e.useState("open"),L=e.useState("contentElement"),_=(0,o.useMemo)(()=>{if(!S||!F)return R;if(iZ(I,D,M)){if(i$(R,D)){let e=(null==D?void 0:D.slice(R.length))||"";return R+e}return R}return D||R},[S,F,I,D,M,R]);(0,o.useEffect)(()=>{let e=C.current;if(!e)return;let t=()=>T(!0);return e.addEventListener("combobox-item-move",t),()=>{e.removeEventListener("combobox-item-move",t)}},[]),(0,o.useEffect)(()=>{if(!S||!F||!D||!iZ(I,D,M)||!i$(R,D))return;let e=na;return queueMicrotask(()=>{let t=C.current;if(!t)return;let{start:r,end:n}=r4(t),i=R.length,a=D.length;nt(t,i,a),e=()=>{if(!it(t))return;let{start:e,end:o}=r4(t);e!==i||o===a&&nt(t,r,n)}}),()=>e()},[y,S,F,D,I,M,R]);let P=(0,o.useRef)(null),O=nR(n),k=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(!G||!L)return;let t=ne(L);if(!t)return;P.current=t;let r=()=>{x.current=!1},n=()=>{if(!e||!x.current)return;let{activeId:t}=e.getState();null===t||t!==k.current&&(x.current=!1)},i={passive:!0,capture:!0};return t.addEventListener("wheel",r,i),t.addEventListener("touchmove",r,i),t.addEventListener("scroll",n,i),()=>{t.removeEventListener("wheel",r,!0),t.removeEventListener("touchmove",r,!0),t.removeEventListener("scroll",n,!0)}},[G,L,e]),nT(()=>{!R||E.current||(x.current=!0)},[R]),nT(()=>{"always"!==M&&G||(x.current=G)},[M,G]);let H=e.useState("resetValueOnSelect");nI(()=>{var t,r;let n=x.current;if(!e||!G||!n&&!H)return;let{baseElement:i,contentElement:a,activeId:o}=e.getState();if(!i||it(i)){if(null==a?void 0:a.hasAttribute("data-placing")){let e=new MutationObserver(b);return e.observe(a,{attributeFilter:["data-placing"]}),()=>e.disconnect()}if(M&&n){let r,n=O(I),i=void 0!==n?n:null!=(t=null==(r=I.find(e=>{var t;return!e.disabled&&(null==(t=e.element)?void 0:t.getAttribute("role"))!=="tab"}))?void 0:r.id)?t:e.first();k.current=i,e.move(null!=i?i:null)}else{let t=null==(r=e.item(o||e.first()))?void 0:r.element;t&&"scrollIntoView"in t&&t.scrollIntoView({block:"nearest",inline:"nearest"})}}},[e,G,y,R,M,H,O,I]),(0,o.useEffect)(()=>{if(!S)return;let t=C.current;if(!t)return;let r=[t,L].filter(e=>!!e),n=t=>{r.every(e=>nb(t,e))&&(null==e||e.setValue(_))};for(let e of r)e.addEventListener("focusout",n);return()=>{for(let e of r)e.removeEventListener("focusout",n)}},[S,L,e,_]);let j=e=>e.currentTarget.value.length>=a,U=A.onChange,N=nL(null!=l?l:j),J=nL(null!=i?i:!e.tag),K=nR(t=>{if(null==U||U(t),t.defaultPrevented||!e)return;let r=t.currentTarget,{value:n,selectionStart:i,selectionEnd:a}=r,o=t.nativeEvent;if(x.current=!0,"input"===o.type&&(o.isComposing&&(x.current=!1,E.current=!0),S)){let e="insertText"===o.inputType||"insertCompositionText"===o.inputType,t=i===n.length;T(e&&t)}if(J(t)){let t=n===e.getState().value;e.setValue(n),queueMicrotask(()=>{nt(r,i,a)}),S&&M&&t&&b()}N(t)&&e.show(),M&&x.current||e.setActiveId(null)}),Q=A.onCompositionEnd,V=nR(e=>{x.current=!0,E.current=!1,null==Q||Q(e),e.defaultPrevented||M&&b()}),X=A.onMouseDown,q=nL(null!=f?f:()=>!!(null==e?void 0:e.getState().includesBaseElement)),W=nL(m),Y=nL(null!=u?u:j),z=nR(t=>{null==X||X(t),t.defaultPrevented||t.button||t.ctrlKey||e&&(q(t)&&e.setActiveId(null),W(t)&&e.setValue(_),Y(t)&&nx(t.currentTarget,"mouseup",e.show))}),Z=A.onKeyDown,$=nL(null!=d?d:j),ee=nR(t=>{if(null==Z||Z(t),t.repeat||(x.current=!1),t.defaultPrevented||t.ctrlKey||t.altKey||t.shiftKey||t.metaKey||!e)return;let{open:r}=e.getState();!r&&("ArrowUp"===t.key||"ArrowDown"===t.key)&&$(t)&&(t.preventDefault(),e.show())}),et=A.onBlur,er=nR(e=>{if(x.current=!1,null==et||et(e),e.defaultPrevented)return}),en=nD(A.id),ei=e.useState(e=>null===e.activeId);return A={id:en,role:"combobox","aria-autocomplete":"inline"===p||"list"===p||"both"===p||"none"===p?p:void 0,"aria-haspopup":r7(L,"listbox"),"aria-expanded":G,"aria-controls":null==L?void 0:L.id,"data-active-item":ei||void 0,value:_,...A,ref:nw(C,A.ref),onChange:K,onCompositionEnd:V,onMouseDown:z,onKeyDown:ee,onBlur:er},A=iB({store:e,focusable:t,...A,moveOnKeyPress:e=>!nc(h,e)&&(S&&T(!0),!0)}),{autoComplete:"off",...A=iI({store:e,...A})}}),i1=nJ(function(e){return nQ("input",i0(e))});function i2(e){let t=e.relatedTarget;return(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null}var i9=Symbol("composite-hover"),i3=nV(function({store:e,focusOnHover:t=!0,blurOnHoverEnd:r=!!t,...n}){let i=nz();nu(e=e||i,!1);let a=((0,o.useEffect)(()=>{nO||(nE("mousemove",nU,!0),nE("mousedown",nN,!0),nE("mouseup",nN,!0),nE("keydown",nN,!0),nE("scroll",nN,!0),nO=!0)},[]),nR(()=>nk)),l=n.onMouseMove,s=nL(t),u=nR(t=>{if((null==l||l(t),!t.defaultPrevented&&a())&&s(t)){if(!ir(t.currentTarget)){let t=null==e?void 0:e.getState().baseElement;t&&!it(t)&&t.focus()}null==e||e.setActiveId(t.currentTarget.id)}}),c=n.onMouseLeave,d=nL(r),f=nR(t=>{var r;let n;null==c||c(t),!t.defaultPrevented&&a()&&((n=i2(t))&&r1(t.currentTarget,n)||function(e){let t=i2(e);if(!t)return!1;do{if(no(t,i9)&&t[i9])return!0;t=t.parentElement}while(t)return!1}(t)||!s(t)||d(t)&&(null==e||e.setActiveId(null),null==(r=null==e?void 0:e.getState().baseElement)||r.focus()))}),m=(0,o.useCallback)(e=>{e&&(e[i9]=!0)},[]);return nf(n={...n,ref:nw(m,n.ref),onMouseMove:u,onMouseLeave:f})});nK(nJ(function(e){return nQ("div",i3(e))}));var i5=nV(function({store:e,shouldRegisterItem:t=!0,getItem:r=ns,element:n,...i}){let a=nW();e=e||a;let l=nD(i.id),s=(0,o.useRef)(n);return(0,o.useEffect)(()=>{let n=s.current;if(!l||!n||!t)return;let i=r({id:l,element:n});return null==e?void 0:e.renderItem(i)},[l,t,r,e]),nf(i={...i,ref:nw(s,i.ref)})});function i8(e){if(!e.isTrusted)return!1;let t=e.currentTarget;return"Enter"===e.key?r9(t)||"SUMMARY"===t.tagName||"A"===t.tagName:" "===e.key&&(r9(t)||"SUMMARY"===t.tagName||"INPUT"===t.tagName||"SELECT"===t.tagName)}nJ(function(e){return nQ("div",i5(e))});var i6=Symbol("command"),i4=nV(function({clickOnEnter:e=!0,clickOnSpace:t=!0,...r}){let n,i,a=(0,o.useRef)(null),[l,s]=(0,o.useState)(!1);(0,o.useEffect)(()=>{a.current&&s(r9(a.current))},[]);let[u,c]=(0,o.useState)(!1),d=(0,o.useRef)(!1),f=nd(r),[m,h]=(n=r.onLoadedMetadataCapture,i=(0,o.useMemo)(()=>Object.assign(()=>{},{...n,[i6]:!0}),[n,i6,!0]),[null==n?void 0:n[i6],{onLoadedMetadataCapture:i}]),p=r.onKeyDown,A=nR(r=>{null==p||p(r);let n=r.currentTarget;if(r.defaultPrevented||m||f||!nB(r)||r8(n)||n.isContentEditable)return;let i=e&&"Enter"===r.key,a=t&&" "===r.key,o="Enter"===r.key&&!e,l=" "===r.key&&!t;if(o||l)return void r.preventDefault();if(i||a){let e=i8(r);if(i){if(!e){r.preventDefault();let{view:e,...t}=r,i=()=>ny(n,t);rz&&/firefox\//i.test(navigator.userAgent)?nx(n,"keyup",i):queueMicrotask(i)}}else a&&(d.current=!0,e||(r.preventDefault(),c(!0)))}}),g=r.onKeyUp,v=nR(e=>{if(null==g||g(e),e.defaultPrevented||m||f||e.metaKey)return;let r=t&&" "===e.key;if(d.current&&r&&(d.current=!1,!i8(e))){e.preventDefault(),c(!1);let t=e.currentTarget,{view:r,...n}=e;queueMicrotask(()=>ny(t,n))}});return ip(r={"data-active":u||void 0,type:l?"button":void 0,...h,...r,ref:nw(a,r.ref),onKeyDown:A,onKeyUp:v})});nJ(function(e){return nQ("button",i4(e))});var{useSyncExternalStore:i7}=e.i(2239).default,ae=()=>()=>{};function at(e,t=ns){let r=o.useCallback(t=>e?iV(e,null,t):ae(),[e]),n=()=>{let r="string"==typeof t?t:null,n="function"==typeof t?t:null,i=null==e?void 0:e.getState();return n?n(i):i&&r&&no(i,r)?i[r]:void 0};return i7(r,n,n)}function ar(e,t){let r=o.useRef({}),n=o.useCallback(t=>e?iV(e,null,t):ae(),[e]),i=()=>{let n=null==e?void 0:e.getState(),i=!1,a=r.current;for(let e in t){let r=t[e];if("function"==typeof r){let t=r(n);t!==a[e]&&(a[e]=t,i=!0)}if("string"==typeof r){if(!n||!no(n,r))continue;let t=n[r];t!==a[e]&&(a[e]=t,i=!0)}}return i&&(r.current={...a}),r.current};return i7(n,i,i)}function an(e,t,r,n){var i;let a,l=no(t,r)?t[r]:void 0,s=(i={value:l,setValue:n?t[n]:void 0},a=(0,o.useRef)(i),nT(()=>{a.current=i}),a);nT(()=>iX(e,[r],(e,t)=>{let{value:n,setValue:i}=s.current;i&&e[r]!==t[r]&&e[r]!==n&&i(e[r])}),[e,r]),nT(()=>{if(void 0!==l)return e.setState(r,l),iq(e,[r],()=>{void 0!==l&&e.setState(r,l)})})}function ai(e,t){let[r,n]=o.useState(()=>e(t));nT(()=>iQ(r),[r]);let i=o.useCallback(e=>at(r,e),[r]);return[o.useMemo(()=>({...r,useState:i}),[r,i]),nR(()=>{n(r=>e({...t,...r.getState()}))})]}function aa(e,t,r,n=!1){var i;let a,o;if(!t||!r)return;let{renderedItems:l}=t.getState(),s=ne(e);if(!s)return;let u=function(e,t=!1){let r=e.clientHeight,{top:n}=e.getBoundingClientRect(),i=1.5*Math.max(.875*r,r-40),a=t?r-i+n:i+n;return"HTML"===e.tagName?a+e.scrollTop:a}(s,n);for(let e=0;e=0){void 0!==o&&ot||(e&&(null==h?void 0:h.baseElement)&&h.baseElement===e.baseElement?h.id:void 0),baseElement:e=>(null==e?void 0:e.baseElement)||void 0,isActiveItem:e=>!!e&&e.activeId===f,ariaSetSize:e=>null!=s?s:e&&(null==h?void 0:h.ariaSetSize)&&h.baseElement===e.baseElement?h.ariaSetSize:void 0,ariaPosInSet(e){if(null!=u)return u;if(!e||!(null==h?void 0:h.ariaPosInSet)||h.baseElement!==e.baseElement)return;let t=e.renderedItems.filter(e=>e.rowId===A);return h.ariaPosInSet+t.findIndex(e=>e.id===f)},isTabbable(t){if(!(null==t?void 0:t.renderedItems.length))return!0;if(t.virtualFocus)return!1;if(a)return!0;if(null===t.activeId)return!1;let r=null==e?void 0:e.item(t.activeId);return null!=r&&!!r.disabled||null==r||!r.element||t.activeId===f}}),b=(0,o.useCallback)(e=>{var t;let r={...e,id:f||e.id,rowId:A,disabled:!!p,children:null==(t=e.element)?void 0:t.textContent};return l?l(r):r},[f,A,p,l]),x=c.onFocus,E=(0,o.useRef)(!1),M=nR(t=>{var r,n;if(null==x||x(t),t.defaultPrevented||nv(t)||!f||!e||(r=e,!nB(t)&&ni(r,t.target)))return;let{virtualFocus:i,baseElement:a}=e.getState();e.setActiveId(f),r6(t.currentTarget)&&function(e,t=!1){if(r8(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){let r=rZ(e).getSelection();null==r||r.selectAllChildren(e),t&&(null==r||r.collapseToEnd())}}(t.currentTarget),!i||!nB(t)||!r6(n=t.currentTarget)&&("INPUT"!==n.tagName||r9(n))&&(null==a?void 0:a.isConnected)&&((ng()&&t.currentTarget.hasAttribute("data-autofocus")&&t.currentTarget.scrollIntoView({block:"nearest",inline:"nearest"}),E.current=!0,t.relatedTarget===a||ni(e,t.relatedTarget))?(a[nn]=!0,a.focus({preventScroll:!0})):a.focus())}),S=c.onBlurCapture,F=nR(t=>{if(null==S||S(t),t.defaultPrevented)return;let r=null==e?void 0:e.getState();(null==r?void 0:r.virtualFocus)&&E.current&&(E.current=!1,t.preventDefault(),t.stopPropagation())}),T=c.onKeyDown,R=nL(r),w=nL(n),D=nR(t=>{if(null==T||T(t),t.defaultPrevented||!nB(t)||!e)return;let{currentTarget:r}=t,n=e.getState(),i=e.item(f),a=!!(null==i?void 0:i.rowId),o="horizontal"!==n.orientation,l="vertical"!==n.orientation,s=()=>!(!a&&!l&&n.baseElement&&r8(n.baseElement)),u={ArrowUp:(a||o)&&e.up,ArrowRight:(a||l)&&e.next,ArrowDown:(a||o)&&e.down,ArrowLeft:(a||l)&&e.previous,Home:()=>{if(s())return!a||t.ctrlKey?null==e?void 0:e.first():null==e?void 0:e.previous(-1)},End:()=>{if(s())return!a||t.ctrlKey?null==e?void 0:e.last():null==e?void 0:e.next(-1)},PageUp:()=>aa(r,e,null==e?void 0:e.up,!0),PageDown:()=>aa(r,e,null==e?void 0:e.down)}[t.key];if(u){if(r6(r)){let e=r4(r),n=l&&"ArrowLeft"===t.key,i=l&&"ArrowRight"===t.key,a=o&&"ArrowUp"===t.key,s=o&&"ArrowDown"===t.key;if(i||s){let{length:t}=function(e){if(r8(e))return e.value;if(e.isContentEditable){let t=rZ(e).createRange();return t.selectNodeContents(e),t.toString()}return""}(r);if(e.end!==t)return}else if((n||a)&&0!==e.start)return}let n=u();if(R(t)||void 0!==n){if(!w(t))return;t.preventDefault(),e.move(n)}}}),I=(0,o.useMemo)(()=>({id:f,baseElement:g}),[f,g]);return c={id:f,"data-active-item":v||void 0,...c=n_(c,e=>(0,i.jsx)(n1.Provider,{value:I,children:e}),[I]),ref:nw(m,c.ref),tabIndex:y?c.tabIndex:-1,onFocus:M,onBlurCapture:F,onKeyDown:D},c=i4(c),nf({...c=i5({store:e,...c,getItem:b,shouldRegisterItem:!!f&&c.shouldRegisterItem}),"aria-setsize":B,"aria-posinset":C})});nK(nJ(function(e){return nQ("button",ao(e))}));var al=nV(function({store:e,value:t,hideOnClick:r,setValueOnClick:n,selectValueOnClick:a=!0,resetValueOnSelect:l,focusOnHover:s=!1,moveOnKeyPress:u=!0,getItem:c,...d}){var f,m;let h=iP();nu(e=e||h,!1);let{resetValueOnSelectState:p,multiSelectable:A,selected:g}=ar(e,{resetValueOnSelectState:"resetValueOnSelect",multiSelectable:e=>Array.isArray(e.selectedValue),selected:e=>(function(e,t){if(null!=t)return null!=e&&(Array.isArray(e)?e.includes(t):e===t)})(e.selectedValue,t)}),v=(0,o.useCallback)(e=>{let r={...e,value:t};return c?c(r):r},[t,c]);n=null!=n?n:!A,r=null!=r?r:null!=t&&!A;let B=d.onClick,C=nL(n),y=nL(a),b=nL(null!=(f=null!=l?l:p)?f:A),x=nL(r),E=nR(r=>{null==B||B(r),r.defaultPrevented||function(e){let t=e.currentTarget;if(!t)return!1;let r=t.tagName.toLowerCase();return!!e.altKey&&("a"===r||"button"===r&&"submit"===t.type||"input"===r&&"submit"===t.type)}(r)||!function(e){let t=e.currentTarget;if(!t)return!1;let r=nA();if(r&&!e.metaKey||!r&&!e.ctrlKey)return!1;let n=t.tagName.toLowerCase();return"a"===n||"button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type}(r)&&(null!=t&&(y(r)&&(b(r)&&(null==e||e.resetValue()),null==e||e.setSelectedValue(e=>Array.isArray(e)?e.includes(t)?e.filter(e=>e!==t):[...e,t]:t)),C(r)&&(null==e||e.setValue(t))),x(r)&&(null==e||e.hide()))}),M=d.onKeyDown,S=nR(t=>{if(null==M||M(t),t.defaultPrevented)return;let r=null==e?void 0:e.getState().baseElement;!r||it(r)||(1===t.key.length||"Backspace"===t.key||"Delete"===t.key)&&(queueMicrotask(()=>r.focus()),r8(r)&&(null==e||e.setValue(r.value)))});A&&null!=g&&(d={"aria-selected":g,...d}),d=n_(d,e=>(0,i.jsx)(ij.Provider,{value:t,children:(0,i.jsx)(iU.Provider,{value:null!=g&&g,children:e})}),[t,g]),d={role:null!=(m=({menu:"menuitem",listbox:"option",tree:"treeitem"})[(0,o.useContext)(iG)])?m:"option",children:t,...d,onClick:E,onKeyDown:S};let F=nL(u);return d=ao({store:e,...d,getItem:v,moveOnKeyPress:t=>{if(!F(t))return!1;let r=new Event("combobox-item-move"),n=null==e?void 0:e.getState().baseElement;return null==n||n.dispatchEvent(r),!0}}),d=i3({store:e,focusOnHover:s,...d})}),as=nK(nJ(function(e){return nQ("div",al(e))})),au=e.i(74080);function ac(e,t){let r=setTimeout(t,e);return()=>clearTimeout(r)}function ad(...e){return e.join(", ").split(", ").reduce((e,t)=>{let r=t.endsWith("ms")?1:1e3,n=Number.parseFloat(t||"0s")*r;return n>e?n:e},0)}function af(e,t,r){return!r&&!1!==t&&(!e||!!t)}var am=nV(function({store:e,alwaysVisible:t,...r}){let n=iy();nu(e=e||n,!1);let a=(0,o.useRef)(null),l=nD(r.id),[s,u]=(0,o.useState)(null),c=e.useState("open"),d=e.useState("mounted"),f=e.useState("animated"),m=e.useState("contentElement"),h=at(e.disclosure,"contentElement");nT(()=>{a.current&&(null==e||e.setContentElement(a.current))},[e]),nT(()=>{let t;return null==e||e.setState("animated",e=>(t=e,!0)),()=>{void 0!==t&&(null==e||e.setState("animated",t))}},[e]),nT(()=>{if(f){var e;let t;return(null==m?void 0:m.isConnected)?(e=()=>{u(c?"enter":d?"leave":null)},t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)}),()=>cancelAnimationFrame(t)):void u(null)}},[f,m,c,d]),nT(()=>{if(!e||!f||!s||!m)return;let t=()=>null==e?void 0:e.setState("animating",!1),r=()=>(0,au.flushSync)(t);if("leave"===s&&c||"enter"===s&&!c)return;if("number"==typeof f)return ac(f,r);let{transitionDuration:n,animationDuration:i,transitionDelay:a,animationDelay:o}=getComputedStyle(m),{transitionDuration:l="0",animationDuration:u="0",transitionDelay:d="0",animationDelay:p="0"}=h?getComputedStyle(h):{},A=ad(a,o,d,p)+ad(n,i,l,u);if(!A){"enter"===s&&e.setState("animated",!1),t();return}return ac(Math.max(A-1e3/60,0),r)},[e,f,m,h,c,s]);let p=af(d,(r=n_(r,t=>(0,i.jsx)(iM,{value:e,children:t}),[e])).hidden,t),A=r.style,g=(0,o.useMemo)(()=>p?{...A,display:"none"}:A,[p,A]);return nf(r={id:l,"data-open":c||void 0,"data-enter":"enter"===s||void 0,"data-leave":"leave"===s||void 0,hidden:p,...r,ref:nw(l?e.setContentElement:null,a,r.ref),style:g})}),ah=nJ(function(e){return nQ("div",am(e))});nJ(function({unmountOnHide:e,...t}){let r=iy();return!1===at(t.store||r,t=>!e||(null==t?void 0:t.mounted))?null:(0,i.jsx)(ah,{...t})});var ap=nV(function({store:e,alwaysVisible:t,...r}){let n=iP(!0),a=i_(),l=!!(e=e||a)&&e===n;nu(e,!1);let s=(0,o.useRef)(null),u=nD(r.id),c=e.useState("mounted"),d=af(c,r.hidden,t),f=d?{...r.style,display:"none"}:r.style,m=e.useState(e=>Array.isArray(e.selectedValue)),h=function(e,t,r){let n=function(e){let[t]=(0,o.useState)(e);return t}(r),[i,a]=(0,o.useState)(n);return(0,o.useEffect)(()=>{let r=e&&"current"in e?e.current:e;if(!r)return;let i=()=>{let e=r.getAttribute(t);a(null==e?n:e)},o=new MutationObserver(i);return o.observe(r,{attributeFilter:[t]}),i(),()=>o.disconnect()},[e,t,n]),i}(s,"role",r.role),p="listbox"===h||"tree"===h||"grid"===h,[A,g]=(0,o.useState)(!1),v=e.useState("contentElement");nT(()=>{if(!c)return;let e=s.current;if(!e||v!==e)return;let t=()=>{g(!!e.querySelector("[role='listbox']"))},r=new MutationObserver(t);return r.observe(e,{subtree:!0,childList:!0,attributeFilter:["role"]}),t(),()=>r.disconnect()},[c,v]),A||(r={role:"listbox","aria-multiselectable":p&&m||void 0,...r}),r=n_(r,t=>(0,i.jsx)(iH,{value:e,children:(0,i.jsx)(iG.Provider,{value:h,children:t})}),[e,h]);let B=!u||n&&l?null:e.setContentElement;return nf(r={id:u,hidden:d,...r,ref:nw(B,s,r.ref),style:f})}),aA=nJ(function(e){return nQ("div",ap(e))}),ag=(0,o.createContext)(null),av=nV(function(e){return{...e,style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px",...e.style}}});nJ(function(e){return nQ("span",av(e))});var aB=nV(function(e){return av(e={"data-focus-trap":"",tabIndex:0,"aria-hidden":!0,...e,style:{position:"fixed",top:0,left:0,...e.style}})}),aC=nJ(function(e){return nQ("span",aB(e))});function ay(e){queueMicrotask(()=>{null==e||e.focus()})}var ab=nV(function({preserveTabOrder:e,preserveTabOrderAnchor:t,portalElement:r,portalRef:n,portal:a=!0,...l}){let s=(0,o.useRef)(null),u=nw(s,l.ref),c=(0,o.useContext)(ag),[d,f]=(0,o.useState)(null),[m,h]=(0,o.useState)(null),p=(0,o.useRef)(null),A=(0,o.useRef)(null),g=(0,o.useRef)(null),v=(0,o.useRef)(null);return nT(()=>{let e=s.current;if(!e||!a)return void f(null);let t=r?"function"==typeof r?r(e):r:rZ(e).createElement("div");if(!t)return void f(null);let i=t.isConnected;if(i||(c||rZ(e).body).appendChild(t),t.id||(t.id=e.id?`portal/${e.id}`:function(e="id"){return`${e?`${e}-`:""}${Math.random().toString(36).slice(2,8)}`}()),f(t),nh(n,t),!i)return()=>{t.remove(),nh(n,null)}},[a,r,c,n]),nT(()=>{if(!a||!e||!t)return;let r=rZ(t).createElement("span");return r.style.position="fixed",t.insertAdjacentElement("afterend",r),h(r),()=>{r.remove(),h(null)}},[a,e,t]),(0,o.useEffect)(()=>{if(!d||!e)return;let t=0,r=e=>{if(!nb(e))return;let r="focusin"===e.type;if(cancelAnimationFrame(t),r){let e=d.querySelectorAll("[data-tabindex]"),t=e=>{let t=e.getAttribute("data-tabindex");e.removeAttribute("data-tabindex"),t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")};for(let r of(d.hasAttribute("data-tabindex")&&t(d),e))t(r);return}t=requestAnimationFrame(()=>{for(let e of n4(d,!0))!function(e){var t;let r=null!=(t=e.getAttribute("tabindex"))?t:"";e.setAttribute("data-tabindex",r),e.setAttribute("tabindex","-1")}(e)})};return d.addEventListener("focusin",r,!0),d.addEventListener("focusout",r,!0),()=>{cancelAnimationFrame(t),d.removeEventListener("focusin",r,!0),d.removeEventListener("focusout",r,!0)}},[d,e]),l={...l=n_(l,t=>{if(t=(0,i.jsx)(ag.Provider,{value:d||c,children:t}),!a)return t;if(!d)return(0,i.jsx)("span",{ref:u,id:l.id,style:{position:"fixed"},hidden:!0});t=(0,i.jsxs)(i.Fragment,{children:[e&&d&&(0,i.jsx)(aC,{ref:A,"data-focus-trap":l.id,className:"__focus-trap-inner-before",onFocus:e=>{nb(e,d)?ay(n7()):ay(p.current)}}),t,e&&d&&(0,i.jsx)(aC,{ref:g,"data-focus-trap":l.id,className:"__focus-trap-inner-after",onFocus:e=>{nb(e,d)?ay(ie()):ay(v.current)}})]}),d&&(t=(0,au.createPortal)(t,d));let r=(0,i.jsxs)(i.Fragment,{children:[e&&d&&(0,i.jsx)(aC,{ref:p,"data-focus-trap":l.id,className:"__focus-trap-outer-before",onFocus:e=>{e.relatedTarget!==v.current&&nb(e,d)?ay(A.current):ay(ie())}}),e&&(0,i.jsx)("span",{"aria-owns":null==d?void 0:d.id,style:{position:"fixed"}}),e&&d&&(0,i.jsx)(aC,{ref:v,"data-focus-trap":l.id,className:"__focus-trap-outer-after",onFocus:e=>{if(nb(e,d))ay(g.current);else{let e=n7();if(e===A.current)return void requestAnimationFrame(()=>{var e;return null==(e=n7())?void 0:e.focus()});ay(e)}}})]});return m&&e&&(r=(0,au.createPortal)(r,m)),(0,i.jsxs)(i.Fragment,{children:[r,t]})},[d,c,a,l.id,e,m]),ref:u}});nJ(function(e){return nQ("div",ab(e))});var ax=(0,o.createContext)(0);function aE({level:e,children:t}){let r=(0,o.useContext)(ax),n=Math.max(Math.min(e||r+1,6),1);return(0,i.jsx)(ax.Provider,{value:n,children:t})}var aM=nV(function({autoFocusOnShow:e=!0,...t}){return n_(t,t=>(0,i.jsx)(n9.Provider,{value:e,children:t}),[e])});nJ(function(e){return nQ("div",aM(e))});var aS=new WeakMap;function aF(e,t,r){aS.has(e)||aS.set(e,new Map);let n=aS.get(e),i=n.get(t);if(!i)return n.set(t,r()),()=>{var e;null==(e=n.get(t))||e(),n.delete(t)};let a=r(),o=()=>{a(),i(),n.delete(t)};return n.set(t,o),()=>{n.get(t)===o&&(a(),n.set(t,i))}}function aT(e,t,r){return aF(e,t,()=>{let n=e.getAttribute(t);return e.setAttribute(t,r),()=>{null==n?e.removeAttribute(t):e.setAttribute(t,n)}})}function aR(e,t,r){return aF(e,t,()=>{let n=t in e,i=e[t];return e[t]=r,()=>{n?e[t]=i:delete e[t]}})}function aw(e,t){return e?aF(e,"style",()=>{let r=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=r}}):()=>{}}var aD=["SCRIPT","STYLE"];function aI(e){return`__ariakit-dialog-snapshot-${e}`}function aG(e,t,r,n){for(let i of t){if(!(null==i?void 0:i.isConnected))continue;let a=t.some(e=>!!e&&e!==i&&e.contains(i)),o=rZ(i),l=i;for(;i.parentElement&&i!==o.body;){if(null==n||n(i.parentElement,l),!a)for(let n of i.parentElement.children)(function(e,t,r){return!aD.includes(t.tagName)&&!!function(e,t){let r=rZ(t),n=aI(e);if(!r.body[n])return!0;for(;;){if(t===r.body)return!1;if(t[n])return!0;if(!t.parentElement)return!1;t=t.parentElement}}(e,t)&&!r.some(e=>e&&r1(t,e))})(e,n,t)&&r(n,l);i=i.parentElement}}}function aL(e,...t){if(!e)return!1;let r=e.getAttribute("data-backdrop");return null!=r&&(""===r||"true"===r||!t.length||t.some(e=>r===e))}function a_(e="",t=!1){return`__ariakit-dialog-${t?"ancestor":"outside"}${e?`-${e}`:""}`}function aP(e,t=""){return nl(aR(e,a_("",!0),!0),aR(e,a_(t,!0),!0))}function aO(e,t){if(e[a_(t,!0)])return!0;let r=a_(t);for(;;){if(e[r])return!0;if(!e.parentElement)return!1;e=e.parentElement}}function ak(e,t){let r=[],n=t.map(e=>null==e?void 0:e.id);return aG(e,t,t=>{aL(t,...n)||r.unshift(function(e,t=""){return nl(aR(e,a_(),!0),aR(e,a_(t),!0))}(t,e))},(t,n)=>{n.hasAttribute("data-dialog")&&n.id!==e||r.unshift(aP(t,e))}),()=>{for(let e of r)e()}}function aH({store:e,type:t,listener:r,capture:n,domReady:i}){let a=nR(r),l=at(e,"open"),s=(0,o.useRef)(!1);nT(()=>{if(!l||!i)return;let{contentElement:t}=e.getState();if(!t)return;let r=()=>{s.current=!0};return t.addEventListener("focusin",r,!0),()=>t.removeEventListener("focusin",r,!0)},[e,l,i]),(0,o.useEffect)(()=>{if(l)return nE(t,t=>{let{contentElement:r,disclosureElement:n}=e.getState(),i=t.target;!r||!i||!(!("HTML"===i.tagName||r1(rZ(i).body,i))||r1(r,i)||function(e,t){if(!e)return!1;if(r1(e,t))return!0;let r=t.getAttribute("aria-activedescendant");if(r){let t=rZ(e).getElementById(r);if(t)return r1(e,t)}return!1}(n,i)||i.hasAttribute("data-focus-trap")||function(e,t){if(!("clientY"in e))return!1;let r=t.getBoundingClientRect();return 0!==r.width&&0!==r.height&&r.top<=e.clientY&&e.clientY<=r.top+r.height&&r.left<=e.clientX&&e.clientX<=r.left+r.width}(t,r))&&(!s.current||aO(i,r.id))&&(i&&i[il]||a(t))},n)},[l,n])}function aj(e,t){return"function"==typeof e?e(t):!!e}var aU=(0,o.createContext)({});function aN(){return"inert"in HTMLElement.prototype}function aJ(e,t){if(!("style"in e))return na;if(aN())return aR(e,"inert",!0);let r=n4(e,!0).map(e=>{if(null==t?void 0:t.some(t=>t&&r1(t,e)))return na;let r=aF(e,"focus",()=>(e.focus=na,()=>{delete e.focus}));return nl(aT(e,"tabindex","-1"),r)});return nl(...r,aT(e,"aria-hidden","true"),aw(e,{pointerEvents:"none",userSelect:"none",cursor:"default"}))}function aK(e={}){let t=iY(e.store,iW(e.disclosure,["contentElement","disclosureElement"]));iz(e,t);let r=null==t?void 0:t.getState(),n=nm(e.open,null==r?void 0:r.open,e.defaultOpen,!1),i=nm(e.animated,null==r?void 0:r.animated,!1),a=iJ({open:n,animated:i,animating:!!i&&n,mounted:n,contentElement:nm(null==r?void 0:r.contentElement,null),disclosureElement:nm(null==r?void 0:r.disclosureElement,null)},t);return iK(a,()=>iX(a,["animated","animating"],e=>{e.animated||a.setState("animating",!1)})),iK(a,()=>iV(a,["open"],()=>{a.getState().animated&&a.setState("animating",!0)})),iK(a,()=>iX(a,["open","animating"],e=>{a.setState("mounted",e.open||e.animating)})),{...a,disclosure:e.disclosure,setOpen:e=>a.setState("open",e),show:()=>a.setState("open",!0),hide:()=>a.setState("open",!1),toggle:()=>a.setState("open",e=>!e),stopAnimation:()=>a.setState("animating",!1),setContentElement:e=>a.setState("contentElement",e),setDisclosureElement:e=>a.setState("disclosureElement",e)}}function aQ(e,t,r){return nI(t,[r.store,r.disclosure]),an(e,r,"open","setOpen"),an(e,r,"mounted","setMounted"),an(e,r,"animated"),Object.assign(e,{disclosure:r.disclosure})}nV(function(e){return e});var aV=nJ(function(e){return nQ("div",e)});function aX({store:e,backdrop:t,alwaysVisible:r,hidden:n}){let a=(0,o.useRef)(null),l=function(e={}){let[t,r]=ai(aK,e);return aQ(t,r,e)}({disclosure:e}),s=at(e,"contentElement");(0,o.useEffect)(()=>{let e=a.current;!e||s&&(e.style.zIndex=getComputedStyle(s).zIndex)},[s]),nT(()=>{let e=null==s?void 0:s.id;if(!e)return;let t=a.current;if(t)return aP(t,e)},[s]);let u=am({ref:a,store:l,role:"presentation","data-backdrop":(null==s?void 0:s.id)||"",alwaysVisible:r,hidden:null!=n?n:void 0,style:{position:"fixed",top:0,right:0,bottom:0,left:0}});if(!t)return null;if((0,o.isValidElement)(t))return(0,i.jsx)(aV,{...u,render:t});let c="boolean"!=typeof t?t:"div";return(0,i.jsx)(aV,{...u,render:(0,i.jsx)(c,{})})}function aq(e={}){return aK(e)}Object.assign(aV,["a","button","details","dialog","div","form","h1","h2","h3","h4","h5","h6","header","img","input","label","li","nav","ol","p","section","select","span","summary","textarea","ul","svg"].reduce((e,t)=>(e[t]=nJ(function(e){return nQ(t,e)}),e),{}));var aW=ng();function aY(e,t=!1){if(!e)return null;let r="current"in e?e.current:e;return r?t?n5(r)?r:null:r:null}var az=nV(function({store:e,open:t,onClose:r,focusable:n=!0,modal:a=!0,portal:l=!!a,backdrop:s=!!a,hideOnEscape:u=!0,hideOnInteractOutside:c=!0,getPersistentElements:d,preventBodyScroll:f=!!a,autoFocusOnShow:m=!0,autoFocusOnHide:h=!0,initialFocus:p,finalFocus:A,unmountOnHide:g,unstable_treeSnapshotKey:v,...B}){var C;let y,b,x,E=ix(),M=(0,o.useRef)(null),S=function(e={}){let[t,r]=ai(aq,e);return aQ(t,r,e)}({store:e||E,open:t,setOpen(e){if(e)return;let t=M.current;if(!t)return;let n=new Event("close",{bubbles:!1,cancelable:!0});r&&t.addEventListener("close",r,{once:!0}),t.dispatchEvent(n),n.defaultPrevented&&S.setOpen(!0)}}),{portalRef:F,domReady:T}=nP(l,B.portalRef),R=B.preserveTabOrder,w=at(S,e=>R&&!a&&e.mounted),D=nD(B.id),I=at(S,"open"),G=at(S,"mounted"),L=at(S,"contentElement"),_=af(G,B.hidden,B.alwaysVisible);y=function({attribute:e,contentId:t,contentElement:r,enabled:n}){let[i,a]=nG(),l=(0,o.useCallback)(()=>{if(!n||!r)return!1;let{body:i}=rZ(r),a=i.getAttribute(e);return!a||a===t},[i,n,r,e,t]);return(0,o.useEffect)(()=>{if(!n||!t||!r)return;let{body:i}=rZ(r);if(l())return i.setAttribute(e,t),()=>i.removeAttribute(e);let o=new MutationObserver(()=>(0,au.flushSync)(a));return o.observe(i,{attributeFilter:[e]}),()=>o.disconnect()},[i,n,t,r,l,e]),l}({attribute:"data-dialog-prevent-body-scroll",contentElement:L,contentId:D,enabled:f&&!_}),(0,o.useEffect)(()=>{var e,t;if(!y()||!L)return;let r=rZ(L),n=r$(L),{documentElement:i,body:a}=r,o=i.style.getPropertyValue("--scrollbar-width"),l=o?Number.parseInt(o,10):n.innerWidth-i.clientWidth,s=Math.round(i.getBoundingClientRect().left)+i.scrollLeft?"paddingLeft":"paddingRight",u=nA()&&!(rz&&navigator.platform.startsWith("Mac")&&!np());return nl((e="--scrollbar-width",t=`${l}px`,i?aF(i,e,()=>{let r=i.style.getPropertyValue(e);return i.style.setProperty(e,t),()=>{r?i.style.setProperty(e,r):i.style.removeProperty(e)}}):()=>{}),u?(()=>{var e,t;let{scrollX:r,scrollY:i,visualViewport:o}=n,u=null!=(e=null==o?void 0:o.offsetLeft)?e:0,c=null!=(t=null==o?void 0:o.offsetTop)?t:0,d=aw(a,{position:"fixed",overflow:"hidden",top:`${-(i-Math.floor(c))}px`,left:`${-(r-Math.floor(u))}px`,right:"0",[s]:`${l}px`});return()=>{d(),n.scrollTo({left:r,top:i,behavior:"instant"})}})():aw(a,{overflow:"hidden",[s]:`${l}px`}))},[y,L]),C=at(S,"open"),b=(0,o.useRef)(),(0,o.useEffect)(()=>{if(!C){b.current=null;return}return nE("mousedown",e=>{b.current=e.target},!0)},[C]),aH({...x={store:S,domReady:T,capture:!0},type:"click",listener:e=>{let{contentElement:t}=S.getState(),r=b.current;r&&r5(r)&&aO(r,null==t?void 0:t.id)&&aj(c,e)&&S.hide()}}),aH({...x,type:"focusin",listener:e=>{let{contentElement:t}=S.getState();!t||e.target===rZ(t)||aj(c,e)&&S.hide()}}),aH({...x,type:"contextmenu",listener:e=>{aj(c,e)&&S.hide()}});let{wrapElement:P,nestedDialogs:O}=function(e){let t=(0,o.useContext)(aU),[r,n]=(0,o.useState)([]),a=(0,o.useCallback)(e=>{var r;return n(t=>[...t,e]),nl(null==(r=t.add)?void 0:r.call(t,e),()=>{n(t=>t.filter(t=>t!==e))})},[t]);nT(()=>iX(e,["open","contentElement"],r=>{var n;if(r.open&&r.contentElement)return null==(n=t.add)?void 0:n.call(t,e)}),[e,t]);let l=(0,o.useMemo)(()=>({store:e,add:a}),[e,a]);return{wrapElement:(0,o.useCallback)(e=>(0,i.jsx)(aU.Provider,{value:l,children:e}),[l]),nestedDialogs:r}}(S);B=n_(B,P,[P]),nT(()=>{if(!I)return;let e=M.current,t=r0(e,!0);!t||"BODY"===t.tagName||e&&r1(e,t)||S.setDisclosureElement(t)},[S,I]),aW&&(0,o.useEffect)(()=>{if(!G)return;let{disclosureElement:e}=S.getState();if(!e||!r9(e))return;let t=()=>{let t=!1,r=()=>{t=!0};e.addEventListener("focusin",r,{capture:!0,once:!0}),nx(e,"mouseup",()=>{e.removeEventListener("focusin",r,!0),t||ii(e)})};return e.addEventListener("mousedown",t),()=>{e.removeEventListener("mousedown",t)}},[S,G]),(0,o.useEffect)(()=>{if(!G||!T)return;let e=M.current;if(!e)return;let t=r$(e),r=t.visualViewport||t,n=()=>{var r,n;let i=null!=(n=null==(r=t.visualViewport)?void 0:r.height)?n:t.innerHeight;e.style.setProperty("--dialog-viewport-height",`${i}px`)};return n(),r.addEventListener("resize",n),()=>{r.removeEventListener("resize",n)}},[G,T]),(0,o.useEffect)(()=>{if(!a||!G||!T)return;let e=M.current;if(e&&!e.querySelector("[data-dialog-dismiss]")){var t;let r;return t=S.hide,(r=rZ(e).createElement("button")).type="button",r.tabIndex=-1,r.textContent="Dismiss popup",Object.assign(r.style,{border:"0px",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"}),r.addEventListener("click",t),e.prepend(r),()=>{r.removeEventListener("click",t),r.remove()}}},[S,a,G,T]),nT(()=>{if(!aN()||I||!G||!T)return;let e=M.current;if(e)return aJ(e)},[I,G,T]);let k=I&&T;nT(()=>{if(D&&k)return function(e,t){let{body:r}=rZ(t[0]),n=[];return aG(e,t,t=>{n.push(aR(t,aI(e),!0))}),nl(aR(r,aI(e),!0),()=>{for(let e of n)e()})}(D,[M.current])},[D,k,v]);let H=nR(d);nT(()=>{if(!D||!k)return;let{disclosureElement:e}=S.getState(),t=[M.current,...H()||[],...O.map(e=>e.getState().contentElement)];if(a){let e,r;return nl(ak(D,t),(e=[],r=t.map(e=>null==e?void 0:e.id),aG(D,t,n=>{aL(n,...r)||!function(e,...t){if(!e)return!1;let r=e.getAttribute("data-focus-trap");return null!=r&&(!t.length||""!==r&&t.some(e=>r===e))}(n,...r)&&e.unshift(aJ(n,t))},r=>{!r.hasAttribute("role")||t.some(e=>e&&r1(e,r))||e.unshift(aT(r,"role","none"))}),()=>{for(let t of e)t()}))}return ak(D,[e,...t])},[D,S,k,H,O,a,v]);let j=!!m,U=nL(m),[N,J]=(0,o.useState)(!1);(0,o.useEffect)(()=>{if(!I||!j||!T||!(null==L?void 0:L.isConnected))return;let e=aY(p,!0)||L.querySelector("[data-autofocus=true],[autofocus]")||function(e,t,r){let[n]=n4(e,t,r);return n||null}(L,!0,l&&w)||L,t=n5(e);U(t?e:null)&&(J(!0),queueMicrotask(()=>{e.focus(),!aW||t&&e.scrollIntoView({block:"nearest",inline:"nearest"})}))},[I,j,T,L,p,l,w,U]);let K=!!h,Q=nL(h),[V,X]=(0,o.useState)(!1);(0,o.useEffect)(()=>{if(I)return X(!0),()=>X(!1)},[I]);let q=(0,o.useCallback)((e,t=!0)=>{let r,{disclosureElement:n}=S.getState();if(!(!(r=r0())||e&&r1(e,r))&&n5(r))return;let i=aY(A)||n;if(null==i?void 0:i.id){let e=rZ(i),t=`[aria-activedescendant="${i.id}"]`,r=e.querySelector(t);r&&(i=r)}if(i&&!n5(i)){let e=i.closest("[data-dialog]");if(null==e?void 0:e.id){let t=rZ(e),r=`[aria-controls~="${e.id}"]`,n=t.querySelector(r);n&&(i=n)}}let a=i&&n5(i);!a&&t?requestAnimationFrame(()=>q(e,!1)):!Q(a?i:null)||a&&(null==i||i.focus({preventScroll:!0}))},[S,A,Q]),W=(0,o.useRef)(!1);nT(()=>{if(I||!V||!K)return;let e=M.current;W.current=!0,q(e)},[I,V,T,K,q]),(0,o.useEffect)(()=>{if(!V||!K)return;let e=M.current;return()=>{if(W.current){W.current=!1;return}q(e)}},[V,K,q]);let Y=nL(u);(0,o.useEffect)(()=>{if(T&&G)return nE("keydown",e=>{if("Escape"!==e.key||e.defaultPrevented)return;let t=M.current;if(!t||aO(t))return;let r=e.target;if(!r)return;let{disclosureElement:n}=S.getState();!("BODY"===r.tagName||r1(t,r)||!n||r1(n,r))||Y(e)&&S.hide()},!0)},[S,T,G,Y]);let z=(B=n_(B,e=>(0,i.jsx)(aE,{level:a?1:void 0,children:e}),[a])).hidden,Z=B.alwaysVisible;B=n_(B,e=>s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(aX,{store:S,backdrop:s,hidden:z,alwaysVisible:Z}),e]}):e,[S,s,z,Z]);let[$,ee]=(0,o.useState)(),[et,er]=(0,o.useState)();return B=aM({...B={id:D,"data-dialog":"",role:"dialog",tabIndex:n?-1:void 0,"aria-labelledby":$,"aria-describedby":et,...B=n_(B,e=>(0,i.jsx)(iM,{value:S,children:(0,i.jsx)(iS.Provider,{value:ee,children:(0,i.jsx)(iF.Provider,{value:er,children:e})})}),[S]),ref:nw(M,B.ref)},autoFocusOnShow:N}),B=ab({portal:l,...B=ip({...B=am({store:S,...B}),focusable:n}),portalRef:F,preserveTabOrder:w})});function aZ(e,t=ix){return nJ(function(r){let n=t();return at(r.store||n,e=>!r.unmountOnHide||(null==e?void 0:e.mounted)||!!r.open)?(0,i.jsx)(e,{...r}):null})}aZ(nJ(function(e){return nQ("div",az(e))}),ix);let a$=Math.min,a0=Math.max,a1=Math.round,a2=Math.floor,a9=e=>({x:e,y:e}),a3={left:"right",right:"left",bottom:"top",top:"bottom"},a5={start:"end",end:"start"};function a8(e,t){return"function"==typeof e?e(t):e}function a6(e){return e.split("-")[0]}function a4(e){return e.split("-")[1]}function a7(e){return"x"===e?"y":"x"}function oe(e){return"y"===e?"height":"width"}let ot=new Set(["top","bottom"]);function or(e){return ot.has(a6(e))?"y":"x"}function on(e){return e.replace(/start|end/g,e=>a5[e])}let oi=["left","right"],oa=["right","left"],oo=["top","bottom"],ol=["bottom","top"];function os(e){return e.replace(/left|right|bottom|top/g,e=>a3[e])}function ou(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function oc(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function od(e,t,r){let n,{reference:i,floating:a}=e,o=or(t),l=a7(or(t)),s=oe(l),u=a6(t),c="y"===o,d=i.x+i.width/2-a.width/2,f=i.y+i.height/2-a.height/2,m=i[s]/2-a[s]/2;switch(u){case"top":n={x:d,y:i.y-a.height};break;case"bottom":n={x:d,y:i.y+i.height};break;case"right":n={x:i.x+i.width,y:f};break;case"left":n={x:i.x-a.width,y:f};break;default:n={x:i.x,y:i.y}}switch(a4(t)){case"start":n[l]-=m*(r&&c?-1:1);break;case"end":n[l]+=m*(r&&c?-1:1)}return n}let of=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:o}=r,l=a.filter(Boolean),s=await (null==o.isRTL?void 0:o.isRTL(t)),u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=od(u,n,s),f=n,m={},h=0;for(let r=0;r{try{return e.matches(t)}catch(e){return!1}})}let oR=["transform","translate","scale","rotate","perspective"],ow=["transform","translate","scale","rotate","perspective","filter"],oD=["paint","layout","strict","content"];function oI(e){let t=oG(),r=oy(e)?oP(e):e;return oR.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||ow.some(e=>(r.willChange||"").includes(e))||oD.some(e=>(r.contain||"").includes(e))}function oG(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let oL=new Set(["html","body","#document"]);function o_(e){return oL.has(og(e))}function oP(e){return ov(e).getComputedStyle(e)}function oO(e){return oy(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ok(e){if("html"===og(e))return e;let t=e.assignedSlot||e.parentNode||ox(e)&&e.host||oB(e);return ox(t)?t.host:t}function oH(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let i=function e(t){let r=ok(t);return o_(r)?t.ownerDocument?t.ownerDocument.body:t.body:ob(r)&&oM(r)?r:e(r)}(e),a=i===(null==(n=e.ownerDocument)?void 0:n.body),o=ov(i);if(a){let e=oj(o);return t.concat(o,o.visualViewport||[],oM(i)?i:[],e&&r?oH(e):[])}return t.concat(i,oH(i,[],r))}function oj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oU(e){let t=oP(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=ob(e),a=i?e.offsetWidth:r,o=i?e.offsetHeight:n,l=a1(r)!==a||a1(n)!==o;return l&&(r=a,n=o),{width:r,height:n,$:l}}function oN(e){return oy(e)?e:e.contextElement}function oJ(e){let t=oN(e);if(!ob(t))return a9(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:a}=oU(t),o=(a?a1(r.width):r.width)/n,l=(a?a1(r.height):r.height)/i;return o&&Number.isFinite(o)||(o=1),l&&Number.isFinite(l)||(l=1),{x:o,y:l}}let oK=a9(0);function oQ(e){let t=ov(e);return oG()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:oK}function oV(e,t,r,n){var i;void 0===t&&(t=!1),void 0===r&&(r=!1);let a=e.getBoundingClientRect(),o=oN(e),l=a9(1);t&&(n?oy(n)&&(l=oJ(n)):l=oJ(e));let s=(void 0===(i=r)&&(i=!1),n&&(!i||n===ov(o))&&i)?oQ(o):a9(0),u=(a.left+s.x)/l.x,c=(a.top+s.y)/l.y,d=a.width/l.x,f=a.height/l.y;if(o){let e=ov(o),t=n&&oy(n)?ov(n):n,r=e,i=oj(r);for(;i&&n&&t!==r;){let e=oJ(i),t=i.getBoundingClientRect(),n=oP(i),a=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;u*=e.x,c*=e.y,d*=e.x,f*=e.y,u+=a,c+=o,i=oj(r=ov(i))}}return oc({width:d,height:f,x:u,y:c})}function oX(e,t){let r=oO(e).scrollLeft;return t?t.left+r:oV(oB(e)).left+r}function oq(e,t){let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-oX(e,r),y:r.top+t.scrollTop}}let oW=new Set(["absolute","fixed"]);function oY(e,t,r){var n;let i;if("viewport"===t)i=function(e,t){let r=ov(e),n=oB(e),i=r.visualViewport,a=n.clientWidth,o=n.clientHeight,l=0,s=0;if(i){a=i.width,o=i.height;let e=oG();(!e||e&&"fixed"===t)&&(l=i.offsetLeft,s=i.offsetTop)}let u=oX(n);if(u<=0){let e=n.ownerDocument,t=e.body,r=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,o=Math.abs(n.clientWidth-t.clientWidth-i);o<=25&&(a-=o)}else u<=25&&(a+=u);return{width:a,height:o,x:l,y:s}}(e,r);else if("document"===t){let t,r,a,o,l,s,u;n=oB(e),t=oB(n),r=oO(n),a=n.ownerDocument.body,o=a0(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),l=a0(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight),s=-r.scrollLeft+oX(n),u=-r.scrollTop,"rtl"===oP(a).direction&&(s+=a0(t.clientWidth,a.clientWidth)-o),i={width:o,height:l,x:s,y:u}}else if(oy(t)){let e,n,a,o,l,s;n=(e=oV(t,!0,"fixed"===r)).top+t.clientTop,a=e.left+t.clientLeft,o=ob(t)?oJ(t):a9(1),l=t.clientWidth*o.x,s=t.clientHeight*o.y,i={width:l,height:s,x:a*o.x,y:n*o.y}}else{let r=oQ(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return oc(i)}function oz(e){return"static"===oP(e).position}function oZ(e,t){if(!ob(e)||"fixed"===oP(e).position)return null;if(t)return t(e);let r=e.offsetParent;return oB(e)===r&&(r=r.ownerDocument.body),r}function o$(e,t){var r;let n=ov(e);if(oT(e))return n;if(!ob(e)){let t=ok(e);for(;t&&!o_(t);){if(oy(t)&&!oz(t))return t;t=ok(t)}return n}let i=oZ(e,t);for(;i&&(r=i,oS.has(og(r)))&&oz(i);)i=oZ(i,t);return i&&o_(i)&&oz(i)&&!oI(i)?n:i||function(e){let t=ok(e);for(;ob(t)&&!o_(t);){if(oI(t))return t;if(oT(t))break;t=ok(t)}return null}(e)||n}let o0=async function(e){let t=this.getOffsetParent||o$,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=ob(t),i=oB(t),a="fixed"===r,o=oV(e,!0,a,t),l={scrollLeft:0,scrollTop:0},s=a9(0);if(n||!n&&!a)if(("body"!==og(t)||oM(i))&&(l=oO(t)),n){let e=oV(t,!0,a,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=oX(i));a&&!n&&i&&(s.x=oX(i));let u=!i||n||a?a9(0):oq(i,l);return{x:o.left+l.scrollLeft-s.x-u.x,y:o.top+l.scrollTop-s.y-u.y,width:o.width,height:o.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},o1={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,a="fixed"===i,o=oB(n),l=!!t&&oT(t.floating);if(n===o||l&&a)return r;let s={scrollLeft:0,scrollTop:0},u=a9(1),c=a9(0),d=ob(n);if((d||!d&&!a)&&(("body"!==og(n)||oM(o))&&(s=oO(n)),ob(n))){let e=oV(n);u=oJ(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}let f=!o||d||a?a9(0):oq(o,s);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-s.scrollLeft*u.x+c.x+f.x,y:r.y*u.y-s.scrollTop*u.y+c.y+f.y}},getDocumentElement:oB,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[..."clippingAncestors"===r?oT(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=oH(e,[],!1).filter(e=>oy(e)&&"body"!==og(e)),i=null,a="fixed"===oP(e).position,o=a?ok(e):e;for(;oy(o)&&!o_(o);){let t=oP(o),r=oI(o);r||"fixed"!==t.position||(i=null),(a?!r&&!i:!r&&"static"===t.position&&!!i&&oW.has(i.position)||oM(o)&&!r&&function e(t,r){let n=ok(t);return!(n===r||!oy(n)||o_(n))&&("fixed"===oP(n).position||e(n,r))}(e,o))?n=n.filter(e=>e!==o):i=t,o=ok(o)}return t.set(e,n),n}(t,this._c):[].concat(r),n],o=a[0],l=a.reduce((e,r)=>{let n=oY(t,r,i);return e.top=a0(n.top,e.top),e.right=a$(n.right,e.right),e.bottom=a$(n.bottom,e.bottom),e.left=a0(n.left,e.left),e},oY(t,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:o$,getElementRects:o0,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=oU(e);return{width:t,height:r}},getScale:oJ,isElement:oy,isRTL:function(e){return"rtl"===oP(e).direction}};function o2(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function o9(e=0,t=0,r=0,n=0){if("function"==typeof DOMRect)return new DOMRect(e,t,r,n);let i={x:e,y:t,width:r,height:n,top:t,right:e+r,bottom:t+n,left:e};return{...i,toJSON:()=>i}}function o3(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}function o5(e){let t=window.devicePixelRatio||1;return Math.round(e*t)/t}var o8=nV(function({store:e,modal:t=!1,portal:r=!!t,preserveTabOrder:n=!0,autoFocusOnShow:a=!0,wrapperProps:l,fixed:s=!1,flip:u=!0,shift:c=0,slide:d=!0,overlap:f=!1,sameWidth:m=!1,fitViewport:h=!1,gutter:p,arrowPadding:A=4,overflowPadding:g=8,getAnchorRect:v,updatePosition:B,...C}){let y=iR();nu(e=e||y,!1);let b=e.useState("arrowElement"),x=e.useState("anchorElement"),E=e.useState("disclosureElement"),M=e.useState("popoverElement"),S=e.useState("contentElement"),F=e.useState("placement"),T=e.useState("mounted"),R=e.useState("rendered"),w=(0,o.useRef)(null),[D,I]=(0,o.useState)(!1),{portalRef:G,domReady:L}=nP(r,C.portalRef),_=nR(v),P=nR(B),O=!!B;nT(()=>{if(!(null==M?void 0:M.isConnected))return;M.style.setProperty("--popover-overflow-padding",`${g}px`);let t={contextElement:x||void 0,getBoundingClientRect:()=>{let e=null==_?void 0:_(x);return e||!x?function(e){if(!e)return o9();let{x:t,y:r,width:n,height:i}=e;return o9(t,r,n,i)}(e):x.getBoundingClientRect()}},r=async()=>{var r,n,i,a,o;let l,v,B;if(!T)return;b||(w.current=w.current||document.createElement("div"));let C=b||w.current,y=[(r={gutter:p,shift:c},void 0===(n=({placement:e})=>{var t;let n=((null==C?void 0:C.clientHeight)||0)/2,i="number"==typeof r.gutter?r.gutter+n:null!=(t=r.gutter)?t:n;return{crossAxis:e.split("-")[1]?void 0:r.shift,mainAxis:i,alignmentAxis:r.shift}})&&(n=0),{name:"offset",options:n,async fn(e){var t,r;let{x:i,y:a,placement:o,middlewareData:l}=e,s=await op(e,n);return o===(null==(t=l.offset)?void 0:t.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:i+s.x,y:a+s.y,data:{...s,placement:o}}}}),function(e){var t;if(!1===e.flip)return;let r="string"==typeof e.flip?e.flip.split(" "):void 0;return nu(!r||r.every(o3),!1),{name:"flip",options:t={padding:e.overflowPadding,fallbackPlacements:r},async fn(e){var r,n,i,a,o,l,s,u;let c,d,f,{placement:m,middlewareData:h,rects:p,initialPlacement:A,platform:g,elements:v}=e,{mainAxis:B=!0,crossAxis:C=!0,fallbackPlacements:y,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:E=!0,...M}=a8(t,e);if(null!=(r=h.arrow)&&r.alignmentOffset)return{};let S=a6(m),F=or(A),T=a6(A)===A,R=await (null==g.isRTL?void 0:g.isRTL(v.floating)),w=y||(T||!E?[os(A)]:(c=os(A),[on(A),c,on(c)])),D="none"!==x;!y&&D&&w.push(...(d=a4(A),f=function(e,t,r){switch(e){case"top":case"bottom":if(r)return t?oa:oi;return t?oi:oa;case"left":case"right":return t?oo:ol;default:return[]}}(a6(A),"start"===x,R),d&&(f=f.map(e=>e+"-"+d),E&&(f=f.concat(f.map(on)))),f));let I=[A,...w],G=await om(e,M),L=[],_=(null==(n=h.flip)?void 0:n.overflows)||[];if(B&&L.push(G[S]),C){let e,t,r,n,i=(l=m,s=p,void 0===(u=R)&&(u=!1),e=a4(l),r=oe(t=a7(or(l))),n="x"===t?e===(u?"end":"start")?"right":"left":"start"===e?"bottom":"top",s.reference[r]>s.floating[r]&&(n=os(n)),[n,os(n)]);L.push(G[i[0]],G[i[1]])}if(_=[..._,{placement:m,overflows:L}],!L.every(e=>e<=0)){let e=((null==(i=h.flip)?void 0:i.index)||0)+1,t=I[e];if(t&&("alignment"!==C||F===or(t)||_.every(e=>or(e.placement)!==F||e.overflows[0]>0)))return{data:{index:e,overflows:_},reset:{placement:t}};let r=null==(a=_.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:a.placement;if(!r)switch(b){case"bestFit":{let e=null==(o=_.filter(e=>{if(D){let t=or(e.placement);return t===F||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0];e&&(r=e);break}case"initialPlacement":r=A}if(m!==r)return{reset:{placement:r}}}return{}}}}({flip:u,overflowPadding:g}),function(e){if(e.slide||e.overlap){var t,r;return{name:"shift",options:r={mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:(void 0===t&&(t={}),{options:t,fn(e){let{x:r,y:n,placement:i,rects:a,middlewareData:o}=e,{offset:l=0,mainAxis:s=!0,crossAxis:u=!0}=a8(t,e),c={x:r,y:n},d=or(i),f=a7(d),m=c[f],h=c[d],p=a8(l,e),A="number"==typeof p?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(s){let e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+A.mainAxis,r=a.reference[f]+a.reference[e]-A.mainAxis;mr&&(m=r)}if(u){var g,v;let e="y"===f?"width":"height",t=oh.has(a6(i)),r=a.reference[d]-a.floating[e]+(t&&(null==(g=o.offset)?void 0:g[d])||0)+(t?0:A.crossAxis),n=a.reference[d]+a.reference[e]+(t?0:(null==(v=o.offset)?void 0:v[d])||0)-(t?A.crossAxis:0);hn&&(h=n)}return{[f]:m,[d]:h}}})},async fn(e){let{x:t,y:n,placement:i}=e,{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=a8(r,e),u={x:t,y:n},c=await om(e,s),d=or(a6(i)),f=a7(d),m=u[f],h=u[d];if(a){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",r=m+c[e],n=m-c[t];m=a0(r,a$(m,n))}if(o){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",r=h+c[e],n=h-c[t];h=a0(r,a$(h,n))}let p=l.fn({...e,[f]:m,[d]:h});return{...p,data:{x:p.x-t,y:p.y-n,enabled:{[f]:a,[d]:o}}}}}}}({slide:d,shift:c,overlap:f,overflowPadding:g}),function(e,t){if(e){let r;return{name:"arrow",options:r={element:e,padding:t.arrowPadding},async fn(e){let{x:t,y:n,placement:i,rects:a,platform:o,elements:l,middlewareData:s}=e,{element:u,padding:c=0}=a8(r,e)||{};if(null==u)return{};let d=ou(c),f={x:t,y:n},m=a7(or(i)),h=oe(m),p=await o.getDimensions(u),A="y"===m,g=A?"clientHeight":"clientWidth",v=a.reference[h]+a.reference[m]-f[m]-a.floating[h],B=f[m]-a.reference[m],C=await (null==o.getOffsetParent?void 0:o.getOffsetParent(u)),y=C?C[g]:0;y&&await (null==o.isElement?void 0:o.isElement(C))||(y=l.floating[g]||a.floating[h]);let b=y/2-p[h]/2-1,x=a$(d[A?"top":"left"],b),E=a$(d[A?"bottom":"right"],b),M=y-p[h]-E,S=y/2-p[h]/2+(v/2-B/2),F=a0(x,a$(S,M)),T=!s.arrow&&null!=a4(i)&&S!==F&&a.reference[h]/2-(S{},...d}=a8(a,e),f=await om(e,d),m=a6(o),h=a4(o),p="y"===or(o),{width:A,height:g}=l.floating;"top"===m||"bottom"===m?(n=m,i=h===(await (null==s.isRTL?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(i=m,n="end"===h?"top":"bottom");let v=g-f.top-f.bottom,B=A-f.left-f.right,C=a$(g-f[n],v),y=a$(A-f[i],B),b=!e.middlewareData.shift,x=C,E=y;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(E=B),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(x=v),b&&!h){let e=a0(f.left,0),t=a0(f.right,0),r=a0(f.top,0),n=a0(f.bottom,0);p?E=A-2*(0!==e||0!==t?e+t:a0(f.left,f.right)):x=g-2*(0!==r||0!==n?r+n:a0(f.top,f.bottom))}await c({...e,availableWidth:E,availableHeight:x});let M=await s.getDimensions(u.floating);return A!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}],x=await (o={placement:F,strategy:s?"fixed":"absolute",middleware:y},l=new Map,B={...(v={platform:o1,...o}).platform,_c:l},of(t,M,{...v,platform:B}));null==e||e.setState("currentPlacement",x.placement),I(!0);let E=o5(x.x),S=o5(x.y);if(Object.assign(M.style,{top:"0",left:"0",transform:`translate3d(${E}px,${S}px,0)`}),C&&x.middlewareData.arrow){let{x:e,y:t}=x.middlewareData.arrow,r=x.placement.split("-")[0],n=C.clientWidth/2,i=C.clientHeight/2,a=null!=e?e+n:-n,o=null!=t?t+i:-i;M.style.setProperty("--popover-transform-origin",{top:`${a}px calc(100% + ${i}px)`,bottom:`${a}px ${-i}px`,left:`calc(100% + ${n}px) ${o}px`,right:`${-n}px ${o}px`}[r]),Object.assign(C.style,{left:null!=e?`${e}px`:"",top:null!=t?`${t}px`:"",[r]:"100%"})}},n=function(e,t,r,n){let i;void 0===n&&(n={});let{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:u=!1}=n,c=oN(e),d=a||o?[...c?oH(c):[],...oH(t)]:[];d.forEach(e=>{a&&e.addEventListener("scroll",r,{passive:!0}),o&&e.addEventListener("resize",r)});let f=c&&s?function(e,t){let r,n=null,i=oB(e);function a(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return!function o(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),a();let u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:m}=u;if(l||t(),!f||!m)return;let h={rootMargin:-a2(d)+"px "+-a2(i.clientWidth-(c+f))+"px "+-a2(i.clientHeight-(d+m))+"px "+-a2(c)+"px",threshold:a0(0,a$(1,s))||1},p=!0;function A(t){let n=t[0].intersectionRatio;if(n!==s){if(!p)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}1!==n||o2(u,e.getBoundingClientRect())||o(),p=!1}try{n=new IntersectionObserver(A,{...h,root:i.ownerDocument})}catch(e){n=new IntersectionObserver(A,h)}n.observe(e)}(!0),a}(c,r):null,m=-1,h=null;l&&(h=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),r()}),c&&!u&&h.observe(c),h.observe(t));let p=u?oV(e):null;return u&&function t(){let n=oV(e);p&&!o2(p,n)&&r(),p=n,i=requestAnimationFrame(t)}(),r(),()=>{var e;d.forEach(e=>{a&&e.removeEventListener("scroll",r),o&&e.removeEventListener("resize",r)}),null==f||f(),null==(e=h)||e.disconnect(),h=null,u&&cancelAnimationFrame(i)}}(t,M,async()=>{O?(await P({updatePosition:r}),I(!0)):await r()},{elementResize:"function"==typeof ResizeObserver});return()=>{I(!1),n()}},[e,R,M,b,x,M,F,T,L,s,u,c,d,f,m,h,p,A,g,_,O,P]),nT(()=>{if(!T||!L||!(null==M?void 0:M.isConnected)||!(null==S?void 0:S.isConnected))return;let e=()=>{M.style.zIndex=getComputedStyle(S).zIndex};e();let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>cancelAnimationFrame(t)},[T,L,M,S]);let k=s?"fixed":"absolute";return C=n_(C,t=>(0,i.jsx)("div",{...l,style:{position:k,top:0,left:0,width:"max-content",...null==l?void 0:l.style},ref:null==e?void 0:e.setPopoverElement,children:t}),[e,k,l]),C={"data-placing":!D||void 0,...C=n_(C,t=>(0,i.jsx)(iD,{value:e,children:t}),[e]),style:{position:"relative",...C.style}},C=az({store:e,modal:t,portal:r,preserveTabOrder:n,preserveTabOrderAnchor:E||x,autoFocusOnShow:D&&a,...C,portalRef:G})});aZ(nJ(function(e){return nQ("div",o8(e))}),iR);var o6=nV(function({store:e,modal:t,tabIndex:r,alwaysVisible:n,autoFocusOnHide:i=!0,hideOnInteractOutside:a=!0,...l}){let s=iO();nu(e=e||s,!1);let u=e.useState("baseElement"),c=(0,o.useRef)(!1),d=at(e.tag,e=>null==e?void 0:e.renderedItems.length);return l=ap({store:e,alwaysVisible:n,...l}),l=o8({store:e,modal:t,alwaysVisible:n,backdrop:!1,autoFocusOnShow:!1,finalFocus:u,preserveTabOrderAnchor:null,unstable_treeSnapshotKey:d,...l,getPersistentElements(){var r;let n=(null==(r=l.getPersistentElements)?void 0:r.call(l))||[];if(!t||!e)return n;let{contentElement:i,baseElement:a}=e.getState();if(!a)return n;let o=rZ(a),s=[];if((null==i?void 0:i.id)&&s.push(`[aria-controls~="${i.id}"]`),(null==a?void 0:a.id)&&s.push(`[aria-controls~="${a.id}"]`),!s.length)return[...n,a];let u=s.join(",");return[...n,...o.querySelectorAll(u)]},autoFocusOnHide:e=>!nc(i,e)&&(!c.current||(c.current=!1,!1)),hideOnInteractOutside(t){var r,n;let i=null==e?void 0:e.getState(),o=null==(r=null==i?void 0:i.contentElement)?void 0:r.id,l=null==(n=null==i?void 0:i.baseElement)?void 0:n.id;if(function(e,...t){if(!e)return!1;if("id"in e){let r=t.filter(Boolean).map(e=>`[aria-controls~="${e}"]`).join(", ");return!!r&&e.matches(r)}return!1}(t.target,o,l))return!1;let s="function"==typeof a?a(t):a;return s&&(c.current="click"===t.type),s}})}),o4=aZ(nJ(function(e){return nQ("div",o6(e))}),iO);(0,o.createContext)(null),(0,o.createContext)(null);var o7=nX([n$],[n0]),le=o7.useContext;o7.useScopedContext,o7.useProviderContext,o7.ContextProvider,o7.ScopedContextProvider;var lt={id:null};function lr(e,t){return e.find(e=>t?!e.disabled&&e.id!==t:!e.disabled)}function ln(e,t){return e.filter(e=>e.rowId===t)}function li(e){let t=[];for(let r of e){let e=t.find(e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===r.rowId});e?e.push(r):t.push([r])}return t}function la(e){let t=0;for(let{length:r}of e)r>t&&(t=r);return t}var lo=ng()&&np();function ll({tag:e,...t}={}){let r=iY(t.store,function(e,...t){if(e)return iN(e,"pick")(...t)}(e,["value","rtl"]));iz(t,r);let n=null==e?void 0:e.getState(),i=null==r?void 0:r.getState(),a=nm(t.activeId,null==i?void 0:i.activeId,t.defaultActiveId,null),o=function(e={}){var t;let r=null==(t=e.store)?void 0:t.getState(),n=function(e={}){var t,r;iz(e,e.store);let n=null==(t=e.store)?void 0:t.getState(),i=nm(e.items,null==n?void 0:n.items,e.defaultItems,[]),a=new Map(i.map(e=>[e.id,e])),o={items:i,renderedItems:nm(null==n?void 0:n.renderedItems,[])},l=null==(r=e.store)?void 0:r.__unstablePrivateStore,s=iJ({items:i,renderedItems:o.renderedItems},l),u=iJ(o,e.store),c=e=>{var t;let r,n,i=(t=e=>e.element,r=e.map((e,t)=>[t,e]),n=!1,(r.sort(([e,r],[i,a])=>{var o;let l=t(r),s=t(a);return l!==s&&l&&s?(o=l,s.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING)?(e>i&&(n=!0),-1):(et):e);s.setState("renderedItems",i),u.setState("renderedItems",i)};iK(u,()=>iQ(s)),iK(s,()=>iq(s,["items"],e=>{u.setState("items",e.items)})),iK(s,()=>iq(s,["renderedItems"],e=>{let t=!0,r=requestAnimationFrame(()=>{let{renderedItems:t}=u.getState();e.renderedItems!==t&&c(e.renderedItems)});if("function"!=typeof IntersectionObserver)return()=>cancelAnimationFrame(r);let n=new IntersectionObserver(()=>{if(t){t=!1;return}cancelAnimationFrame(r),r=requestAnimationFrame(()=>c(e.renderedItems))},{root:function(e){var t;let r=e.find(e=>!!e.element),n=[...e].reverse().find(e=>!!e.element),i=null==(t=null==r?void 0:r.element)?void 0:t.parentElement;for(;i&&(null==n?void 0:n.element);){let e=i;if(n&&e.contains(n.element))return i;i=i.parentElement}return rZ(i).body}(e.renderedItems)});for(let t of e.renderedItems)t.element&&n.observe(t.element);return()=>{cancelAnimationFrame(r),n.disconnect()}}));let d=(e,t,r=!1)=>{let n;return t(t=>{let r=t.findIndex(({id:t})=>t===e.id),i=t.slice();if(-1!==r){let o={...n=t[r],...e};i[r]=o,a.set(e.id,o)}else i.push(e),a.set(e.id,e);return i}),()=>{t(t=>{if(!n)return r&&a.delete(e.id),t.filter(({id:t})=>t!==e.id);let i=t.findIndex(({id:t})=>t===e.id);if(-1===i)return t;let o=t.slice();return o[i]=n,a.set(e.id,n),o})}},f=e=>d(e,e=>s.setState("items",e),!0);return{...u,registerItem:f,renderItem:e=>nl(f(e),d(e,e=>s.setState("renderedItems",e))),item:e=>{if(!e)return null;let t=a.get(e);if(!t){let{items:r}=s.getState();(t=r.find(t=>t.id===e))&&a.set(e,t)}return t||null},__unstablePrivateStore:s}}(e),i=nm(e.activeId,null==r?void 0:r.activeId,e.defaultActiveId),a=iJ({...n.getState(),id:nm(e.id,null==r?void 0:r.id,`id-${Math.random().toString(36).slice(2,8)}`),activeId:i,baseElement:nm(null==r?void 0:r.baseElement,null),includesBaseElement:nm(e.includesBaseElement,null==r?void 0:r.includesBaseElement,null===i),moves:nm(null==r?void 0:r.moves,0),orientation:nm(e.orientation,null==r?void 0:r.orientation,"both"),rtl:nm(e.rtl,null==r?void 0:r.rtl,!1),virtualFocus:nm(e.virtualFocus,null==r?void 0:r.virtualFocus,!1),focusLoop:nm(e.focusLoop,null==r?void 0:r.focusLoop,!1),focusWrap:nm(e.focusWrap,null==r?void 0:r.focusWrap,!1),focusShift:nm(e.focusShift,null==r?void 0:r.focusShift,!1)},n,e.store);iK(a,()=>iX(a,["renderedItems","activeId"],e=>{a.setState("activeId",t=>{var r;return void 0!==t?t:null==(r=lr(e.renderedItems))?void 0:r.id})}));let o=(e="next",t={})=>{var r,n;let i=a.getState(),{skip:o=0,activeId:l=i.activeId,focusShift:s=i.focusShift,focusLoop:u=i.focusLoop,focusWrap:c=i.focusWrap,includesBaseElement:d=i.includesBaseElement,renderedItems:f=i.renderedItems,rtl:m=i.rtl}=t,h="up"===e||"down"===e,p="next"===e||"down"===e,A=h?iA(function(e,t,r){let n=la(e);for(let i of e)for(let e=0;ee.id===l);if(!g)return null==(n=lr(A))?void 0:n.id;let v=A.some(e=>e.rowId),B=A.indexOf(g),C=A.slice(B+1),y=ln(C,g.rowId);if(o){let e=y.filter(e=>l?!e.disabled&&e.id!==l:!e.disabled),t=e.slice(o)[0]||e[e.length-1];return null==t?void 0:t.id}let b=u&&(h?"horizontal"!==u:"vertical"!==u),x=v&&c&&(h?"horizontal"!==c:"vertical"!==c),E=p?(!v||h)&&b&&d:!!h&&d;if(b){let e=lr(function(e,t,r=!1){let n=e.findIndex(e=>e.id===t);return[...e.slice(n+1),...r?[lt]:[],...e.slice(0,n)]}(x&&!E?A:ln(A,g.rowId),l,E),l);return null==e?void 0:e.id}if(x){let e=lr(E?y:C,l);return E?(null==e?void 0:e.id)||null:null==e?void 0:e.id}let M=lr(y,l);return!M&&E?null:null==M?void 0:M.id};return{...n,...a,setBaseElement:e=>a.setState("baseElement",e),setActiveId:e=>a.setState("activeId",e),move:e=>{void 0!==e&&(a.setState("activeId",e),a.setState("moves",e=>e+1))},first:()=>{var e;return null==(e=lr(a.getState().renderedItems))?void 0:e.id},last:()=>{var e;return null==(e=lr(ig(a.getState().renderedItems)))?void 0:e.id},next:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),o("next",e)),previous:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),o("previous",e)),down:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),o("down",e)),up:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),o("up",e))}}({...t,activeId:a,includesBaseElement:nm(t.includesBaseElement,null==i?void 0:i.includesBaseElement,!0),orientation:nm(t.orientation,null==i?void 0:i.orientation,"vertical"),focusLoop:nm(t.focusLoop,null==i?void 0:i.focusLoop,!0),focusWrap:nm(t.focusWrap,null==i?void 0:i.focusWrap,!0),virtualFocus:nm(t.virtualFocus,null==i?void 0:i.virtualFocus,!0)}),l=function({popover:e,...t}={}){let r=iY(t.store,iW(e,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));iz(t,r);let n=null==r?void 0:r.getState(),i=aq({...t,store:r}),a=nm(t.placement,null==n?void 0:n.placement,"bottom"),o=iJ({...i.getState(),placement:a,currentPlacement:a,anchorElement:nm(null==n?void 0:n.anchorElement,null),popoverElement:nm(null==n?void 0:n.popoverElement,null),arrowElement:nm(null==n?void 0:n.arrowElement,null),rendered:Symbol("rendered")},i,r);return{...i,...o,setAnchorElement:e=>o.setState("anchorElement",e),setPopoverElement:e=>o.setState("popoverElement",e),setArrowElement:e=>o.setState("arrowElement",e),render:()=>o.setState("rendered",Symbol("rendered"))}}({...t,placement:nm(t.placement,null==i?void 0:i.placement,"bottom-start")}),s=nm(t.value,null==i?void 0:i.value,t.defaultValue,""),u=nm(t.selectedValue,null==i?void 0:i.selectedValue,null==n?void 0:n.values,t.defaultSelectedValue,""),c=Array.isArray(u),d={...o.getState(),...l.getState(),value:s,selectedValue:u,resetValueOnSelect:nm(t.resetValueOnSelect,null==i?void 0:i.resetValueOnSelect,c),resetValueOnHide:nm(t.resetValueOnHide,null==i?void 0:i.resetValueOnHide,c&&!e),activeValue:null==i?void 0:i.activeValue},f=iJ(d,o,l,r);return lo&&iK(f,()=>iX(f,["virtualFocus"],()=>{f.setState("virtualFocus",!1)})),iK(f,()=>{if(e)return nl(iX(f,["selectedValue"],t=>{Array.isArray(t.selectedValue)&&e.setValues(t.selectedValue)}),iX(e,["values"],e=>{f.setState("selectedValue",e.values)}))}),iK(f,()=>iX(f,["resetValueOnHide","mounted"],e=>{!e.resetValueOnHide||e.mounted||f.setState("value",s)})),iK(f,()=>iX(f,["open"],e=>{e.open||(f.setState("activeId",a),f.setState("moves",0))})),iK(f,()=>iX(f,["moves","activeId"],(e,t)=>{e.moves===t.moves&&f.setState("activeValue",void 0)})),iK(f,()=>iq(f,["moves","renderedItems"],(e,t)=>{if(e.moves===t.moves)return;let{activeId:r}=f.getState(),n=o.item(r);f.setState("activeValue",null==n?void 0:n.value)})),{...l,...o,...f,tag:e,setValue:e=>f.setState("value",e),resetValue:()=>f.setState("value",d.value),setSelectedValue:e=>f.setState("selectedValue",e)}}function ls(e={}){var t,r,n,i,a,o,l,s;let u;t=e,u=le();let[c,d]=ai(ll,e={id:nD((r=t={...t,tag:void 0!==t.tag?t.tag:u}).id),...r});return nI(d,[(n=e).tag]),an(c,n,"value","setValue"),an(c,n,"selectedValue","setSelectedValue"),an(c,n,"resetValueOnHide"),an(c,n,"resetValueOnSelect"),Object.assign((o=c,nI(l=d,[(s=n).popover]),an(o,s,"placement"),i=aQ(o,l,s),a=i,nI(d,[n.store]),an(a,n,"items","setItems"),an(i=a,n,"activeId","setActiveId"),an(i,n,"includesBaseElement"),an(i,n,"virtualFocus"),an(i,n,"orientation"),an(i,n,"rtl"),an(i,n,"focusLoop"),an(i,n,"focusWrap"),an(i,n,"focusShift"),i),{tag:n.tag})}function lu(e={}){let t=ls(e);return(0,i.jsx)(ik,{value:t,children:e.children})}var lc=(0,o.createContext)(void 0),ld=nV(function(e){let[t,r]=(0,o.useState)();return nf(e={role:"group","aria-labelledby":t,...e=n_(e,e=>(0,i.jsx)(lc.Provider,{value:r,children:e}),[])})});nJ(function(e){return nQ("div",ld(e))});var lf=nV(function({store:e,...t}){return ld(t)});nJ(function(e){return nQ("div",lf(e))});var lm=nV(function({store:e,...t}){let r=iP();return nu(e=e||r,!1),"grid"===r7(e.useState("contentElement"))&&(t={role:"rowgroup",...t}),t=lf({store:e,...t})}),lh=nJ(function(e){return nQ("div",lm(e))}),lp=nV(function(e){let t=(0,o.useContext)(lc),r=nD(e.id);return nT(()=>(null==t||t(r),()=>null==t?void 0:t(void 0)),[t,r]),nf(e={id:r,"aria-hidden":!0,...e})});nJ(function(e){return nQ("div",lp(e))});var lA=nV(function({store:e,...t}){return lp(t)});nJ(function(e){return nQ("div",lA(e))});var lg=nV(function(e){return lA(e)}),lv=nJ(function(e){return nQ("div",lg(e))}),lB=e.i(38360);let lC={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0},ly=(e,t)=>String(e.rankedValue).localeCompare(String(t.rankedValue));function lb(e,t,r={}){let{keys:n,threshold:i=lC.MATCHES,baseSort:a=ly,sorter:o=e=>e.sort((e,t)=>(function(e,t,r){let{rank:n,keyIndex:i}=e,{rank:a,keyIndex:o}=t;return n!==a?n>a?-1:1:i===o?r(e,t):i{let l=lx(i,u,c),s=t,{minRanking:d,maxRanking:f,threshold:m}=a;return l=lC.MATCHES?l=d:l>f&&(l=f),l>e&&(e=l,r=o,n=m,s=i),{rankedValue:s,rank:e,keyIndex:r,keyThreshold:n}},{rankedValue:l,rank:lC.NO_MATCH,keyIndex:-1,keyThreshold:c.threshold}):{rankedValue:l,rank:lx(l,u,c),keyIndex:-1,keyThreshold:c.threshold}),{rank:f,keyThreshold:m=i}=d;return f>=m&&e.push({...d,item:a,index:o}),e},[])).map(({item:e})=>e)}function lx(e,t,r){if(e=lE(e,r),(t=lE(t,r)).length>e.length)return lC.NO_MATCH;if(e===t)return lC.CASE_SENSITIVE_EQUAL;let n=function*(e,t){let r=-1;for(;(r=e.indexOf(t,r+1))>-1;)yield r;return -1}(e=e.toLowerCase(),t=t.toLowerCase()),i=n.next(),a=i.value;if(e.length===t.length&&0===a)return lC.EQUAL;if(0===a)return lC.STARTS_WITH;let o=i;for(;!o.done;){if(o.value>0&&" "===e[o.value-1])return lC.WORD_STARTS_WITH;o=n.next()}return a>0?lC.CONTAINS:1===t.length?lC.NO_MATCH:(function(e){let t="",r=" ";for(let n=0;n-1))return lC.NO_MATCH;return r=a-l,n=i/t.length,lC.MATCHES+1/r*n}(e,t)}function lE(e,{keepDiacritics:t}){return e=`${e}`,t||(e=(0,lB.default)(e)),e}lb.rankings=lC;let lM={maxRanking:1/0,minRanking:-1/0};var lS=e.i(29402);let lF=new Set(["SkiFree","SkiFree_Daily","SkiFree_Randomizer"]),lT={"missions.vl2":"Official","TR2final105-client.vl2":"Team Rabbit 2","z_mappacks/CTF/Classic_maps_v1.vl2":"Classic","z_mappacks/CTF/DynamixFinalPack.vl2":"Official","z_mappacks/CTF/KryMapPack_b3EDIT.vl2":"KryMapPack","z_mappacks/CTF/S5maps.vl2":"S5","z_mappacks/CTF/S8maps.vl2":"S8","z_mappacks/CTF/TWL-MapPack.vl2":"TWL","z_mappacks/CTF/TWL-MapPackEDIT.vl2":"TWL","z_mappacks/CTF/TWL2-MapPack.vl2":"TWL2","z_mappacks/CTF/TWL2-MapPackEDIT.vl2":"TWL2","z_mappacks/TWL_T2arenaOfficialMaps.vl2":"Arena","z_mappacks/xPack2.vl2":"xPack2","z_mappacks/z_DMP2-V0.6.vl2":"DMP2 (Discord Map Pack)","z_mappacks/zDMP-4.7.3DX.vl2":"DMP (Discord Map Pack)","z_mappacks/zDMP-4.7.3DX-ServerOnly.vl2":"DMP (Discord Map Pack)"},lR={"z_mappacks/DM":"DM","z_mappacks/LCTF":"LCTF","z_mappacks/Lak":"LakRabbit"},lw=(0,t9.getMissionList)().filter(e=>!lF.has(e)).map(e=>{let t,r=(0,t9.getMissionInfo)(e),[n]=(0,t9.getSourceAndPath)(r.resourcePath),i=(t=n.match(/^(.*)(\/[^/]+)$/))?t[1]:"",a=lT[n]??lR[i]??null;return{resourcePath:r.resourcePath,missionName:e,displayName:r.displayName,sourcePath:n,groupName:a,missionTypes:r.missionTypes}}),lD=new Map(lw.map(e=>[e.missionName,e])),lI=function(e){let t=new Map;for(let r of e){let e=t.get(r.groupName)??[];e.push(r),t.set(r.groupName,e)}return t.forEach((e,r)=>{t.set(r,(0,lS.default)(e,[e=>(e.displayName||e.missionName).toLowerCase()],["asc"]))}),(0,lS.default)(Array.from(t.entries()),[([e])=>"Official"===e?0:null==e?2:1,([e])=>e?e.toLowerCase():""],["asc","asc"])}(lw),lG="undefined"!=typeof navigator&&/Mac|iPhone|iPad|iPod/.test(navigator.platform);function lL(e){let t,r,n,o,l,s=(0,a.c)(12),{mission:u}=e,c=u.displayName||u.missionName;return s[0]!==c?(t=(0,i.jsx)("span",{className:"MissionSelect-itemName",children:c}),s[0]=c,s[1]=t):t=s[1],s[2]!==u.missionTypes?(r=u.missionTypes.length>0&&(0,i.jsx)("span",{className:"MissionSelect-itemTypes",children:u.missionTypes.map(l_)}),s[2]=u.missionTypes,s[3]=r):r=s[3],s[4]!==t||s[5]!==r?(n=(0,i.jsxs)("span",{className:"MissionSelect-itemHeader",children:[t,r]}),s[4]=t,s[5]=r,s[6]=n):n=s[6],s[7]!==u.missionName?(o=(0,i.jsx)("span",{className:"MissionSelect-itemMissionName",children:u.missionName}),s[7]=u.missionName,s[8]=o):o=s[8],s[9]!==n||s[10]!==o?(l=(0,i.jsxs)(i.Fragment,{children:[n,o]}),s[9]=n,s[10]=o,s[11]=l):l=s[11],l}function l_(e){return(0,i.jsx)("span",{className:"MissionSelect-itemType","data-mission-type":e,children:e},e)}function lP(e){let t,r,n,l,s,u,c,d,f,m,h,p,A,g,v,B,C,y=(0,a.c)(43),{value:b,missionType:x,onChange:E}=e,[M,S]=(0,o.useState)(""),F=(0,o.useRef)(null),T=(0,o.useRef)(x);y[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{(0,o.startTransition)(()=>S(e))},y[0]=t):t=y[0];let R=ls({resetValueOnHide:!0,selectedValue:b,setSelectedValue:e=>{if(e){let t=T.current,r=(0,t9.getMissionInfo)(e).missionTypes;t&&r.includes(t)||(t=r[0]),E({missionName:e,missionType:t}),F.current?.blur()}},setValue:t});y[1]!==R?(r=()=>{let e=e=>{"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),F.current?.focus(),R.show())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},n=[R],y[1]=R,y[2]=r,y[3]=n):(r=y[2],n=y[3]),(0,o.useEffect)(r,n),y[4]!==b?(l=lD.get(b),y[4]=b,y[5]=l):l=y[5];let w=l;e:{let e,t;if(!M){let e;y[6]===Symbol.for("react.memo_cache_sentinel")?(e={type:"grouped",groups:lI},y[6]=e):e=y[6],s=e;break e}y[7]!==M?(e=lb(lw,M,{keys:["displayName","missionName","missionTypes","groupName"]}),y[7]=M,y[8]=e):e=y[8];let r=e;y[9]!==r?(t={type:"flat",missions:r},y[9]=r,y[10]=t):t=y[10],s=t}let D=s,I=w?w.displayName||w.missionName:b,G="flat"===D.type?0===D.missions.length:0===D.groups.length,L=e=>(0,i.jsx)(as,{value:e.missionName,className:"MissionSelect-item",focusOnHover:!0,onClick:t=>{if(t.target&&t.target instanceof HTMLElement){let r=t.target.dataset.missionType;r?(T.current=r,e.missionName===b&&E({missionName:e.missionName,missionType:r})):T.current=null}else T.current=null},children:(0,i.jsx)(lL,{mission:e})},e.missionName);y[11]!==R?(u=()=>{try{document.exitPointerLock()}catch{}R.show()},c=e=>{"Escape"!==e.key||R.getState().open||F.current?.blur()},y[11]=R,y[12]=u,y[13]=c):(u=y[12],c=y[13]),y[14]!==I||y[15]!==u||y[16]!==c?(d=(0,i.jsx)(i1,{ref:F,autoSelect:!0,placeholder:I,className:"MissionSelect-input",onFocus:u,onKeyDown:c}),y[14]=I,y[15]=u,y[16]=c,y[17]=d):d=y[17],y[18]!==I?(f=(0,i.jsx)("span",{className:"MissionSelect-selectedName",children:I}),y[18]=I,y[19]=f):f=y[19],y[20]!==x?(m=x&&(0,i.jsx)("span",{className:"MissionSelect-itemType","data-mission-type":x,children:x}),y[20]=x,y[21]=m):m=y[21],y[22]!==m||y[23]!==f?(h=(0,i.jsxs)("div",{className:"MissionSelect-selectedValue",children:[f,m]}),y[22]=m,y[23]=f,y[24]=h):h=y[24],y[25]===Symbol.for("react.memo_cache_sentinel")?(p=(0,i.jsx)("kbd",{className:"MissionSelect-shortcut",children:lG?"⌘K":"^K"}),y[25]=p):p=y[25],y[26]!==h||y[27]!==d?(A=(0,i.jsxs)("div",{className:"MissionSelect-inputWrapper",children:[d,h,p]}),y[26]=h,y[27]=d,y[28]=A):A=y[28];let _="flat"===D.type?D.missions.map(L):D.groups.map(e=>{let[t,r]=e;return t?(0,i.jsxs)(lh,{className:"MissionSelect-group",children:[(0,i.jsx)(lv,{className:"MissionSelect-groupLabel",children:t}),r.map(L)]},t):(0,i.jsx)(o.Fragment,{children:r.map(L)},"ungrouped")});return y[29]!==G?(g=G&&(0,i.jsx)("div",{className:"MissionSelect-noResults",children:"No missions found"}),y[29]=G,y[30]=g):g=y[30],y[31]!==aA||y[32]!==_||y[33]!==g?(v=(0,i.jsxs)(aA,{className:"MissionSelect-list",children:[_,g]}),y[31]=aA,y[32]=_,y[33]=g,y[34]=v):v=y[34],y[35]!==o4||y[36]!==v?(B=(0,i.jsx)(o4,{gutter:4,fitViewport:!0,autoFocusOnHide:!1,className:"MissionSelect-popover",children:v}),y[35]=o4,y[36]=v,y[37]=B):B=y[37],y[38]!==lu||y[39]!==R||y[40]!==A||y[41]!==B?(C=(0,i.jsxs)(lu,{store:R,children:[A,B]}),y[38]=lu,y[39]=R,y[40]=A,y[41]=B,y[42]=C):C=y[42],C}var lO=e.i(11152),lk=e.i(40141);function lH(e){return(0,lk.GenIcon)({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M192 0c-41.8 0-77.4 26.7-90.5 64L64 64C28.7 64 0 92.7 0 128L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64l-37.5 0C269.4 26.7 233.8 0 192 0zm0 64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM305 273L177 401c-9.4 9.4-24.6 9.4-33.9 0L79 337c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L271 239c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"},child:[]}]})(e)}function lj(e){let t,r,n,l,s,u=(0,a.c)(11),{cameraRef:c,missionName:d,missionType:f}=e,{fogEnabled:m}=(0,S.useSettings)(),[h,p]=(0,o.useState)(!1),A=(0,o.useRef)(null);u[0]!==c||u[1]!==m||u[2]!==d||u[3]!==f?(t=async()=>{clearTimeout(A.current);let e=c.current;if(!e)return;let t=function({position:e,quaternion:t}){let r=e=>parseFloat(e.toFixed(3)),n=`${r(e.x)},${r(e.y)},${r(e.z)}`,i=`${r(t.x)},${r(t.y)},${r(t.z)},${r(t.w)}`;return`#c${n}~${i}`}(e),r=new URLSearchParams;r.set("mission",`${d}~${f}`),r.set("fog",m.toString());let n=`${window.location.pathname}?${r}${t}`,i=`${window.location.origin}${n}`;window.history.replaceState(null,"",n);try{await navigator.clipboard.writeText(i),p(!0),A.current=setTimeout(()=>{p(!1)},1100)}catch(e){console.error(e)}},u[0]=c,u[1]=m,u[2]=d,u[3]=f,u[4]=t):t=u[4];let g=t,v=h?"true":"false";return u[5]===Symbol.for("react.memo_cache_sentinel")?(r=(0,i.jsx)(lO.FaMapPin,{className:"MapPin"}),n=(0,i.jsx)(lH,{className:"ClipboardCheck"}),l=(0,i.jsx)("span",{className:"ButtonLabel",children:" Copy coordinates URL"}),u[5]=r,u[6]=n,u[7]=l):(r=u[5],n=u[6],l=u[7]),u[8]!==g||u[9]!==v?(s=(0,i.jsxs)("button",{type:"button",className:"IconButton LabelledButton CopyCoordinatesButton","aria-label":"Copy coordinates URL",title:"Copy coordinates URL",onClick:g,"data-copied":v,id:"copyCoordinatesButton",children:[r,n,l]}),u[8]=g,u[9]=v,u[10]=s):s=u[10],s}function lU(e){return(0,lk.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12.01",y2:"8"},child:[]}]})(e)}function lN(e){return(0,lk.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"},child:[]},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"},child:[]}]})(e)}function lJ(e){let t,r,n,l,s,u,c,d,f,m,h,p,A,g,v,B,C,y,b,x,E,M,F,T,R,w,D,I,G,L,_,P,O,k,H,j,U,N,J,K,Q,V,X,q,W=(0,a.c)(99),{missionName:Y,missionType:z,onChangeMission:Z,onOpenMapInfo:$,cameraRef:ee,isTouch:et}=e,{fogEnabled:er,setFogEnabled:en,fov:ei,setFov:ea,audioEnabled:eo,setAudioEnabled:el,animationEnabled:es,setAnimationEnabled:eu}=(0,S.useSettings)(),{speedMultiplier:ec,setSpeedMultiplier:ed,touchMode:ef,setTouchMode:em}=(0,S.useControls)(),{debugMode:eh,setDebugMode:ep}=(0,S.useDebug)(),[eA,eg]=(0,o.useState)(!1),ev=(0,o.useRef)(null),eB=(0,o.useRef)(null),eC=(0,o.useRef)(null);W[0]!==eA?(t=()=>{eA&&ev.current?.focus()},r=[eA],W[0]=eA,W[1]=t,W[2]=r):(t=W[1],r=W[2]),(0,o.useEffect)(t,r),W[3]===Symbol.for("react.memo_cache_sentinel")?(n=e=>{let t=e.relatedTarget;t&&eC.current?.contains(t)||eg(!1)},W[3]=n):n=W[3];let ey=n;W[4]===Symbol.for("react.memo_cache_sentinel")?(l=e=>{"Escape"===e.key&&(eg(!1),eB.current?.focus())},W[4]=l):l=W[4];let eb=l;return W[5]!==Y||W[6]!==z||W[7]!==Z?(s=(0,i.jsx)(lP,{value:Y,missionType:z,onChange:Z}),W[5]=Y,W[6]=z,W[7]=Z,W[8]=s):s=W[8],W[9]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{eg(lK)},W[9]=u):u=W[9],W[10]===Symbol.for("react.memo_cache_sentinel")?(c=(0,i.jsx)(lN,{}),W[10]=c):c=W[10],W[11]!==eA?(d=(0,i.jsx)("button",{ref:eB,className:"IconButton Controls-toggle",onClick:u,"aria-expanded":eA,"aria-controls":"settingsPanel","aria-label":"Settings",children:c}),W[11]=eA,W[12]=d):d=W[12],W[13]!==ee||W[14]!==Y||W[15]!==z?(f=(0,i.jsx)(lj,{cameraRef:ee,missionName:Y,missionType:z}),W[13]=ee,W[14]=Y,W[15]=z,W[16]=f):f=W[16],W[17]===Symbol.for("react.memo_cache_sentinel")?(m=(0,i.jsx)(lU,{}),h=(0,i.jsx)("span",{className:"ButtonLabel",children:"Show map info"}),W[17]=m,W[18]=h):(m=W[17],h=W[18]),W[19]!==$?(p=(0,i.jsxs)("button",{type:"button",className:"IconButton LabelledButton MapInfoButton","aria-label":"Show map info",onClick:$,children:[m,h]}),W[19]=$,W[20]=p):p=W[20],W[21]!==p||W[22]!==f?(A=(0,i.jsxs)("div",{className:"Controls-group",children:[f,p]}),W[21]=p,W[22]=f,W[23]=A):A=W[23],W[24]!==en?(g=e=>{en(e.target.checked)},W[24]=en,W[25]=g):g=W[25],W[26]!==er||W[27]!==g?(v=(0,i.jsx)("input",{id:"fogInput",type:"checkbox",checked:er,onChange:g}),W[26]=er,W[27]=g,W[28]=v):v=W[28],W[29]===Symbol.for("react.memo_cache_sentinel")?(B=(0,i.jsx)("label",{htmlFor:"fogInput",children:"Fog?"}),W[29]=B):B=W[29],W[30]!==v?(C=(0,i.jsxs)("div",{className:"CheckboxField",children:[v,B]}),W[30]=v,W[31]=C):C=W[31],W[32]!==el?(y=e=>{el(e.target.checked)},W[32]=el,W[33]=y):y=W[33],W[34]!==eo||W[35]!==y?(b=(0,i.jsx)("input",{id:"audioInput",type:"checkbox",checked:eo,onChange:y}),W[34]=eo,W[35]=y,W[36]=b):b=W[36],W[37]===Symbol.for("react.memo_cache_sentinel")?(x=(0,i.jsx)("label",{htmlFor:"audioInput",children:"Audio?"}),W[37]=x):x=W[37],W[38]!==b?(E=(0,i.jsxs)("div",{className:"CheckboxField",children:[b,x]}),W[38]=b,W[39]=E):E=W[39],W[40]!==C||W[41]!==E?(M=(0,i.jsxs)("div",{className:"Controls-group",children:[C,E]}),W[40]=C,W[41]=E,W[42]=M):M=W[42],W[43]!==eu?(F=e=>{eu(e.target.checked)},W[43]=eu,W[44]=F):F=W[44],W[45]!==es||W[46]!==F?(T=(0,i.jsx)("input",{id:"animationInput",type:"checkbox",checked:es,onChange:F}),W[45]=es,W[46]=F,W[47]=T):T=W[47],W[48]===Symbol.for("react.memo_cache_sentinel")?(R=(0,i.jsx)("label",{htmlFor:"animationInput",children:"Animation?"}),W[48]=R):R=W[48],W[49]!==T?(w=(0,i.jsxs)("div",{className:"CheckboxField",children:[T,R]}),W[49]=T,W[50]=w):w=W[50],W[51]!==ep?(D=e=>{ep(e.target.checked)},W[51]=ep,W[52]=D):D=W[52],W[53]!==eh||W[54]!==D?(I=(0,i.jsx)("input",{id:"debugInput",type:"checkbox",checked:eh,onChange:D}),W[53]=eh,W[54]=D,W[55]=I):I=W[55],W[56]===Symbol.for("react.memo_cache_sentinel")?(G=(0,i.jsx)("label",{htmlFor:"debugInput",children:"Debug?"}),W[56]=G):G=W[56],W[57]!==I?(L=(0,i.jsxs)("div",{className:"CheckboxField",children:[I,G]}),W[57]=I,W[58]=L):L=W[58],W[59]!==w||W[60]!==L?(_=(0,i.jsxs)("div",{className:"Controls-group",children:[w,L]}),W[59]=w,W[60]=L,W[61]=_):_=W[61],W[62]===Symbol.for("react.memo_cache_sentinel")?(P=(0,i.jsx)("label",{htmlFor:"fovInput",children:"FOV"}),W[62]=P):P=W[62],W[63]!==ea?(O=e=>ea(parseInt(e.target.value)),W[63]=ea,W[64]=O):O=W[64],W[65]!==ei||W[66]!==O?(k=(0,i.jsx)("input",{id:"fovInput",type:"range",min:75,max:120,step:5,value:ei,onChange:O}),W[65]=ei,W[66]=O,W[67]=k):k=W[67],W[68]!==ei?(H=(0,i.jsx)("output",{htmlFor:"fovInput",children:ei}),W[68]=ei,W[69]=H):H=W[69],W[70]!==k||W[71]!==H?(j=(0,i.jsxs)("div",{className:"Field",children:[P,k,H]}),W[70]=k,W[71]=H,W[72]=j):j=W[72],W[73]===Symbol.for("react.memo_cache_sentinel")?(U=(0,i.jsx)("label",{htmlFor:"speedInput",children:"Speed"}),W[73]=U):U=W[73],W[74]!==ed?(N=e=>ed(parseFloat(e.target.value)),W[74]=ed,W[75]=N):N=W[75],W[76]!==ec||W[77]!==N?(J=(0,i.jsxs)("div",{className:"Field",children:[U,(0,i.jsx)("input",{id:"speedInput",type:"range",min:.1,max:5,step:.05,value:ec,onChange:N})]}),W[76]=ec,W[77]=N,W[78]=J):J=W[78],W[79]!==j||W[80]!==J?(K=(0,i.jsxs)("div",{className:"Controls-group",children:[j,J]}),W[79]=j,W[80]=J,W[81]=K):K=W[81],W[82]!==et||W[83]!==em||W[84]!==ef?(Q=et&&(0,i.jsx)("div",{className:"Controls-group",children:(0,i.jsxs)("div",{className:"Field",children:[(0,i.jsx)("label",{htmlFor:"touchModeInput",children:"Joystick:"})," ",(0,i.jsxs)("select",{id:"touchModeInput",value:ef,onChange:e=>em(e.target.value),children:[(0,i.jsx)("option",{value:"dualStick",children:"Dual Stick"}),(0,i.jsx)("option",{value:"moveLookStick",children:"Single Stick"})]})]})}),W[82]=et,W[83]=em,W[84]=ef,W[85]=Q):Q=W[85],W[86]!==eA||W[87]!==A||W[88]!==M||W[89]!==_||W[90]!==K||W[91]!==Q?(V=(0,i.jsxs)("div",{className:"Controls-dropdown",ref:ev,id:"settingsPanel",tabIndex:-1,onKeyDown:eb,onBlur:ey,"data-open":eA,children:[A,M,_,K,Q]}),W[86]=eA,W[87]=A,W[88]=M,W[89]=_,W[90]=K,W[91]=Q,W[92]=V):V=W[92],W[93]!==V||W[94]!==d?(X=(0,i.jsxs)("div",{ref:eC,children:[d,V]}),W[93]=V,W[94]=d,W[95]=X):X=W[95],W[96]!==X||W[97]!==s?(q=(0,i.jsxs)("div",{id:"controls",onKeyDown:lX,onPointerDown:lV,onClick:lQ,children:[s,X]}),W[96]=X,W[97]=s,W[98]=q):q=W[98],q}function lK(e){return!e}function lQ(e){return e.stopPropagation()}function lV(e){return e.stopPropagation()}function lX(e){return e.stopPropagation()}let lq=()=>null,lW=o.forwardRef(({envMap:e,resolution:t=256,frames:r=1/0,makeDefault:n,children:i,...a},l)=>{let s=(0,C.useThree)(({set:e})=>e),c=(0,C.useThree)(({camera:e})=>e),d=(0,C.useThree)(({size:e})=>e),f=o.useRef(null);o.useImperativeHandle(l,()=>f.current,[]);let m=o.useRef(null),h=function(e,t,r){let n=(0,C.useThree)(e=>e.size),i=(0,C.useThree)(e=>e.viewport),a="number"==typeof e?e:n.width*i.dpr,l=n.height*i.dpr,s=("number"==typeof e?void 0:e)||{},{samples:c=0,depth:d,...f}=s,m=null!=d?d:s.depthBuffer,h=o.useMemo(()=>{let e=new u.WebGLRenderTarget(a,l,{minFilter:u.LinearFilter,magFilter:u.LinearFilter,type:u.HalfFloatType,...f});return m&&(e.depthTexture=new u.DepthTexture(a,l,u.FloatType)),e.samples=c,e},[]);return o.useLayoutEffect(()=>{h.setSize(a,l),c&&(h.samples=c)},[c,h,a,l]),o.useEffect(()=>()=>h.dispose(),[]),h}(t);o.useLayoutEffect(()=>{a.manual||(f.current.aspect=d.width/d.height)},[d,a]),o.useLayoutEffect(()=>{f.current.updateProjectionMatrix()});let p=0,A=null,g="function"==typeof i;return(0,B.useFrame)(t=>{g&&(r===1/0||p{if(n)return s(()=>({camera:f.current})),()=>s(()=>({camera:c}))},[f,n,s]),o.createElement(o.Fragment,null,o.createElement("perspectiveCamera",(0,W.default)({ref:f},a),!g&&i),o.createElement("group",{ref:m},g&&i(h.texture)))});function lY(){let e,t,r=(0,a.c)(3),{fov:n}=(0,S.useSettings)();return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=[0,256,0],r[0]=e):e=r[0],r[1]!==n?(t=(0,i.jsx)(lW,{makeDefault:!0,position:e,fov:n}),r[1]=n,r[2]=t):t=r[2],t}var lz=e.i(51434),lZ=e.i(81405);function l$(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function l0({showPanel:e=0,className:t,parent:r}){let n=function(e,t=[],r){let[n,i]=o.useState();return o.useLayoutEffect(()=>{let t=e();return i(t),l$(void 0,t),()=>l$(void 0,null)},t),n}(()=>new lZ.default,[]);return o.useEffect(()=>{if(n){let i=r&&r.current||document.body;n.showPanel(e),null==i||i.appendChild(n.dom);let a=(null!=t?t:"").split(" ").filter(e=>e);a.length&&n.dom.classList.add(...a);let o=(0,l.j)(()=>n.begin()),s=(0,l.k)(()=>n.end());return()=>{a.length&&n.dom.classList.remove(...a),null==i||i.removeChild(n.dom),o(),s()}}},[r,n,t,e]),null}var l1=e.i(60099);function l2(){let e,t,r=(0,a.c)(3),{debugMode:n}=(0,S.useDebug)(),l=(0,o.useRef)(null);return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{let e=l.current;e&&e.setColors("rgb(153, 255, 0)","rgb(0, 153, 255)","rgb(255, 153, 0)")},r[0]=e):e=r[0],(0,o.useEffect)(e),r[1]!==n?(t=n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l0,{className:"StatsPanel"}),(0,i.jsx)("axesHelper",{ref:l,args:[70],renderOrder:999,children:(0,i.jsx)("lineBasicMaterial",{depthTest:!1,depthWrite:!1,fog:!1,vertexColors:!0})}),(0,i.jsx)(l1.Html,{position:[80,0,0],center:!0,children:(0,i.jsx)("span",{className:"AxisLabel","data-axis":"y",children:"Y"})}),(0,i.jsx)(l1.Html,{position:[0,80,0],center:!0,children:(0,i.jsx)("span",{className:"AxisLabel","data-axis":"z",children:"Z"})}),(0,i.jsx)(l1.Html,{position:[0,0,80],center:!0,children:(0,i.jsx)("span",{className:"AxisLabel","data-axis":"x",children:"X"})})]}):null,r[1]=n,r[2]=t):t=r[2],t}var l9=e.i(50361),l3=e.i(24540);function l5(e,t,r){try{return e(t)}catch(e){return(0,l3.l)("[nuqs] Error while parsing value `%s`: %O"+(r?" (for key `%s`)":""),t,e,r),null}}function l8(e){function t(t){if(void 0===t)return null;let r="";if(Array.isArray(t)){if(void 0===t[0])return null;r=t[0]}return"string"==typeof t&&(r=t),l5(e.parse,r)}return{type:"single",eq:(e,t)=>e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide:r=>t(r)??e}},withOptions(e){return{...this,...e}}}}l8({parse:e=>e,serialize:String}),l8({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)}),l8({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)}),l8({parse:e=>{let t=parseInt(e,16);return t==t?t:null},serialize:e=>{let t=Math.round(e).toString(16);return(1&t.length?"0":"")+t}}),l8({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String});let l6=l8({parse:e=>"true"===e.toLowerCase(),serialize:String});function l4(e,t){return e.valueOf()===t.valueOf()}l8({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:l4}),l8({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:l4}),l8({parse:e=>{let t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:l4});let l7=(0,l9.r)(),se={};function st(e,t,r,n,i,a){let o=!1,l=Object.entries(e).reduce((e,[l,s])=>{var u;let c=t?.[l]??l,d=n[c],f="multi"===s.type?[]:null,m=void 0===d?("multi"===s.type?r?.getAll(c):r?.get(c))??f:d;return i&&a&&((u=i[c]??f)===m||null!==u&&null!==m&&"string"!=typeof u&&"string"!=typeof m&&u.length===m.length&&u.every((e,t)=>e===m[t]))?e[l]=a[l]??null:(o=!0,e[l]=((0,l9.i)(m)?null:l5(s.parse,m,c))??null,i&&(i[c]=m)),e},{});if(!o){let t=Object.keys(e),r=Object.keys(a??{});o=t.length!==r.length||t.some(e=>!r.includes(e))}return{state:l,hasChanged:o}}function sr(e,t){return Object.fromEntries(Object.keys(e).map(r=>[r,e[r]??t[r]??null]))}function sn(e,t={}){let{parse:r,type:n,serialize:i,eq:a,defaultValue:l,...s}=t,[{[e]:u},c]=function(e,t={}){let r=(0,o.useId)(),n=(0,l3.i)(),i=(0,l3.a)(),{history:a="replace",scroll:l=n?.scroll??!1,shallow:s=n?.shallow??!0,throttleMs:u=l9.s.timeMs,limitUrlUpdates:c=n?.limitUrlUpdates,clearOnDefault:d=n?.clearOnDefault??!0,startTransition:f,urlKeys:m=se}=t,h=Object.keys(e).join(","),p=(0,o.useMemo)(()=>Object.fromEntries(Object.keys(e).map(e=>[e,m[e]??e])),[h,JSON.stringify(m)]),A=(0,l3.r)(Object.values(p)),g=A.searchParams,v=(0,o.useRef)({}),B=(0,o.useMemo)(()=>Object.fromEntries(Object.keys(e).map(t=>[t,e[t].defaultValue??null])),[Object.values(e).map(({defaultValue:e})=>e).join(",")]),C=l9.t.useQueuedQueries(Object.values(p)),[y,b]=(0,o.useState)(()=>st(e,m,g??new URLSearchParams,C).state),x=(0,o.useRef)(y);if((0,l3.c)("[nuq+ %s `%s`] render - state: %O, iSP: %s",r,h,y,g),Object.keys(v.current).join("&")!==Object.values(p).join("&")){let{state:t,hasChanged:n}=st(e,m,g,C,v.current,x.current);n&&((0,l3.c)("[nuq+ %s `%s`] State changed: %O",r,h,{state:t,initialSearchParams:g,queuedQueries:C,queryRef:v.current,stateRef:x.current}),x.current=t,b(t)),v.current=Object.fromEntries(Object.entries(p).map(([t,r])=>[r,e[t]?.type==="multi"?g?.getAll(r):g?.get(r)??null]))}(0,o.useEffect)(()=>{let{state:t,hasChanged:n}=st(e,m,g,C,v.current,x.current);n&&((0,l3.c)("[nuq+ %s `%s`] State changed: %O",r,h,{state:t,initialSearchParams:g,queuedQueries:C,queryRef:v.current,stateRef:x.current}),x.current=t,b(t))},[Object.values(p).map(e=>`${e}=${g?.getAll(e)}`).join("&"),JSON.stringify(C)]),(0,o.useEffect)(()=>{let t=Object.keys(e).reduce((t,n)=>(t[n]=({state:t,query:i})=>{b(a=>{let{defaultValue:o}=e[n],l=p[n],s=t??o??null;return Object.is(a[n]??o??null,s)?((0,l3.c)("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",r,h,l,t,o,x.current),a):(x.current={...x.current,[n]:s},v.current[l]=i,(0,l3.c)("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",r,h,l,t,o,x.current),x.current)})},t),{});for(let n of Object.keys(e)){let e=p[n];(0,l3.c)("[nuq+ %s `%s`] Subscribing to sync for `%s`",r,e,h),l7.on(e,t[n])}return()=>{for(let n of Object.keys(e)){let e=p[n];(0,l3.c)("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",r,e,h),l7.off(e,t[n])}}},[h,p]);let E=(0,o.useCallback)((t,n={})=>{let o,m=Object.fromEntries(Object.keys(e).map(e=>[e,null])),g="function"==typeof t?t(sr(x.current,B))??m:t??m;(0,l3.c)("[nuq+ %s `%s`] setState: %O",r,h,g);let v=0,C=!1,y=[];for(let[t,r]of Object.entries(g)){let m=e[t],h=p[t];if(!m||void 0===r)continue;(n.clearOnDefault??m.clearOnDefault??d)&&null!==r&&void 0!==m.defaultValue&&(m.eq??((e,t)=>e===t))(r,m.defaultValue)&&(r=null);let g=null===r?null:(m.serialize??String)(r);l7.emit(h,{state:r,query:g});let B={key:h,query:g,options:{history:n.history??m.history??a,shallow:n.shallow??m.shallow??s,scroll:n.scroll??m.scroll??l,startTransition:n.startTransition??m.startTransition??f}};if(n?.limitUrlUpdates?.method==="debounce"||c?.method==="debounce"||m.limitUrlUpdates?.method==="debounce"){!0===B.options.shallow&&console.warn((0,l3.s)(422));let e=n?.limitUrlUpdates?.timeMs??c?.timeMs??m.limitUrlUpdates?.timeMs??l9.s.timeMs,t=l9.t.push(B,e,A,i);vt(e),C?l9.n.flush(A,i):l9.n.getPendingPromise(A));return o??b},[h,a,s,l,u,c?.method,c?.timeMs,f,p,A.updateUrl,A.getSearchParamsSnapshot,A.rateLimitFactor,i,B]);return[(0,o.useMemo)(()=>sr(y,B),[y,B]),E]}({[e]:{parse:r??(e=>e),type:n,serialize:i,eq:a,defaultValue:l}},s);return[u,(0,o.useCallback)((t,r={})=>c(r=>({[e]:"function"==typeof t?t(r[e]):t}),r),[e,c])]}let si=(0,o.lazy)(()=>e.A(59197).then(e=>({default:e.MapInfoDialog}))),sa=new rm,so={toneMapping:u.NoToneMapping,outputColorSpace:u.SRGBColorSpace},sl=l8({parse(e){let[t,r]=e.split("~"),n=r,i=(0,t9.getMissionInfo)(t).missionTypes;return r&&i.includes(r)||(n=i[0]),{missionName:t,missionType:n}},serialize:({missionName:e,missionType:t})=>1===(0,t9.getMissionInfo)(e).missionTypes.length?e:`${e}~${t}`,eq:(e,t)=>e.missionName===t.missionName&&e.missionType===t.missionType}).withDefault({missionName:"RiverDance",missionType:"CTF"});function ss(){let e,t,r,n,l,s,c,d,f,m,h,A,g,v,B,C,y,b,x,E,M,F,T,R,w,D,I,G,L,_,P,O,k,H=(0,a.c)(60),[j,U]=sn("mission",sl),[N,J]=sn("fog",l6);H[0]!==J?(e=()=>{J(null)},H[0]=J,H[1]=e):e=H[1];let K=e;H[2]!==K||H[3]!==U?(t=e=>{window.location.hash="",K(),U(e)},H[2]=K,H[3]=U,H[4]=t):t=H[4];let Q=t,V=(_=(0,a.c)(2),P=(0,o.useRef)(null),_[0]===Symbol.for("react.memo_cache_sentinel")?(G=e=>{let t=window.matchMedia("(pointer: coarse)");return t.addEventListener("change",e),P.current=t,()=>{t.removeEventListener("change",e)}},_[0]=G):G=_[0],O=G,_[1]===Symbol.for("react.memo_cache_sentinel")?(L=()=>P.current?.matches??null,_[1]=L):L=_[1],k=L,(0,o.useSyncExternalStore)(O,k,lq)),{missionName:X,missionType:q}=j,[W,Y]=(0,o.useState)(!1),[z,Z]=(0,o.useState)(0),[$,ee]=(0,o.useState)(!0),et=z<1;H[5]!==et?(r=()=>{if(et)ee(!0);else{let e=setTimeout(()=>ee(!1),500);return()=>clearTimeout(e)}},n=[et],H[5]=et,H[6]=r,H[7]=n):(r=H[6],n=H[7]),(0,o.useEffect)(r,n),H[8]!==Q?(l=()=>(window.setMissionName=e=>{let t=(0,t9.getMissionInfo)(e).missionTypes;Q({missionName:e,missionType:t[0]})},window.getMissionList=t9.getMissionList,window.getMissionInfo=t9.getMissionInfo,su),s=[Q],H[8]=Q,H[9]=l,H[10]=s):(l=H[9],s=H[10]),(0,o.useEffect)(l,s),H[11]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{let e=e=>{if("KeyI"!==e.code||e.metaKey||e.ctrlKey||e.altKey)return;let t=e.target;"INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||Y(!0)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},d=[],H[11]=c,H[12]=d):(c=H[11],d=H[12]),(0,o.useEffect)(c,d),H[13]===Symbol.for("react.memo_cache_sentinel")?(f=(e,t)=>{Z(void 0===t?0:t)},H[13]=f):f=H[13];let er=f,en=(0,o.useRef)(null);H[14]===Symbol.for("react.memo_cache_sentinel")?(m={angle:0,force:0},H[14]=m):m=H[14];let ei=(0,o.useRef)(m),ea=(0,o.useRef)(null);H[15]===Symbol.for("react.memo_cache_sentinel")?(h={angle:0,force:0},H[15]=h):h=H[15];let eo=(0,o.useRef)(h),el=(0,o.useRef)(null);H[16]!==et||H[17]!==z||H[18]!==$?(A=$&&(0,i.jsxs)("div",{id:"loadingIndicator","data-complete":!et,children:[(0,i.jsx)("div",{className:"LoadingSpinner"}),(0,i.jsx)("div",{className:"LoadingProgress",children:(0,i.jsx)("div",{className:"LoadingProgress-bar",style:{width:`${100*z}%`}})}),(0,i.jsxs)("div",{className:"LoadingProgress-text",children:[Math.round(100*z),"%"]})]}),H[16]=et,H[17]=z,H[18]=$,H[19]=A):A=H[19],H[20]===Symbol.for("react.memo_cache_sentinel")?(g={type:u.PCFShadowMap},v=e=>{en.current=e.camera},H[20]=g,H[21]=v):(g=H[20],v=H[21]);let es=`${X}~${q}`;return H[22]!==X||H[23]!==q||H[24]!==es?(B=(0,i.jsx)(t6,{name:X,missionType:q,onLoadingChange:er},es),H[22]=X,H[23]=q,H[24]=es,H[25]=B):B=H[25],H[26]===Symbol.for("react.memo_cache_sentinel")?(C=(0,i.jsx)(lY,{}),y=(0,i.jsx)(l2,{}),H[26]=C,H[27]=y):(C=H[26],y=H[27]),H[28]!==V?(b=null===V?null:V?(0,i.jsx)(rY,{joystickState:ei,joystickZone:ea,lookJoystickState:eo,lookJoystickZone:el}):(0,i.jsx)(rL,{}),H[28]=V,H[29]=b):b=H[29],H[30]!==B||H[31]!==b?(x=(0,i.jsx)(p,{frameloop:"always",gl:so,shadows:g,onCreated:v,children:(0,i.jsx)(tq,{children:(0,i.jsxs)(lz.AudioProvider,{children:[B,C,y,b]})})}),H[30]=B,H[31]=b,H[32]=x):x=H[32],H[33]!==A||H[34]!==x?(E=(0,i.jsxs)("div",{id:"canvasContainer",children:[A,x]}),H[33]=A,H[34]=x,H[35]=E):E=H[35],H[36]!==V?(M=V&&(0,i.jsx)(rW,{joystickState:ei,joystickZone:ea,lookJoystickState:eo,lookJoystickZone:el}),H[36]=V,H[37]=M):M=H[37],H[38]!==V?(F=!1===V&&(0,i.jsx)(rO,{}),H[38]=V,H[39]=F):F=H[39],H[40]===Symbol.for("react.memo_cache_sentinel")?(T=()=>Y(!0),H[40]=T):T=H[40],H[41]!==Q||H[42]!==V||H[43]!==X||H[44]!==q?(R=(0,i.jsx)(lJ,{missionName:X,missionType:q,onChangeMission:Q,onOpenMapInfo:T,cameraRef:en,isTouch:V}),H[41]=Q,H[42]=V,H[43]=X,H[44]=q,H[45]=R):R=H[45],H[46]!==W||H[47]!==X||H[48]!==q?(w=W&&(0,i.jsx)(o.Suspense,{fallback:null,children:(0,i.jsx)(si,{open:W,onClose:()=>Y(!1),missionName:X,missionType:q??""})}),H[46]=W,H[47]=X,H[48]=q,H[49]=w):w=H[49],H[50]!==E||H[51]!==M||H[52]!==F||H[53]!==R||H[54]!==w?(D=(0,i.jsxs)(rv,{map:rG,children:[E,M,F,R,w]}),H[50]=E,H[51]=M,H[52]=F,H[53]=R,H[54]=w,H[55]=D):D=H[55],H[56]!==K||H[57]!==N||H[58]!==D?(I=(0,i.jsx)(rh.QueryClientProvider,{client:sa,children:(0,i.jsx)("main",{children:(0,i.jsx)(S.SettingsProvider,{fogEnabledOverride:N,onClearFogEnabledOverride:K,children:D})})}),H[56]=K,H[57]=N,H[58]=D,H[59]=I):I=H[59],I}function su(){delete window.setMissionName,delete window.getMissionList,delete window.getMissionInfo}function sc(){let e,t=(0,a.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)(o.Suspense,{children:(0,i.jsx)(ss,{})}),t[0]=e):e=t[0],e}e.s(["default",()=>sc],31713)}]); \ No newline at end of file diff --git a/docs/_next/static/8Gyh12L4dTN96synIylXt/_buildManifest.js b/docs/_next/static/lsuSqSz5gb3GKN3jziExr/_buildManifest.js similarity index 100% rename from docs/_next/static/8Gyh12L4dTN96synIylXt/_buildManifest.js rename to docs/_next/static/lsuSqSz5gb3GKN3jziExr/_buildManifest.js diff --git a/docs/_next/static/8Gyh12L4dTN96synIylXt/_clientMiddlewareManifest.json b/docs/_next/static/lsuSqSz5gb3GKN3jziExr/_clientMiddlewareManifest.json similarity index 100% rename from docs/_next/static/8Gyh12L4dTN96synIylXt/_clientMiddlewareManifest.json rename to docs/_next/static/lsuSqSz5gb3GKN3jziExr/_clientMiddlewareManifest.json diff --git a/docs/_next/static/8Gyh12L4dTN96synIylXt/_ssgManifest.js b/docs/_next/static/lsuSqSz5gb3GKN3jziExr/_ssgManifest.js similarity index 100% rename from docs/_next/static/8Gyh12L4dTN96synIylXt/_ssgManifest.js rename to docs/_next/static/lsuSqSz5gb3GKN3jziExr/_ssgManifest.js diff --git a/docs/_not-found/__next._full.txt b/docs/_not-found/__next._full.txt index f1b9cb84..6518ac01 100644 --- a/docs/_not-found/__next._full.txt +++ b/docs/_not-found/__next._full.txt @@ -8,7 +8,7 @@ a:I[97367,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"MetadataBoundary"] c:I[68027,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"default"] :HL["/t2-mapper/_next/static/chunks/748c06086372a1f2.css","style"] -0:{"P":null,"b":"8Gyh12L4dTN96synIylXt","c":["","_not-found",""],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/748c06086372a1f2.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/e6da73430a674f20.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"defaultOptions":{"clearOnDefault":false},"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L5",null,{"children":["$","$6",null,{"name":"Next.MetadataOutlet","children":"$@7"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L8",null,{"children":"$L9"}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$6",null,{"name":"Next.Metadata","children":"$Lb"}]}]}],null]}],false]],"m":"$undefined","G":["$c","$undefined"],"S":true} +0:{"P":null,"b":"lsuSqSz5gb3GKN3jziExr","c":["","_not-found",""],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/748c06086372a1f2.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/e6da73430a674f20.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"defaultOptions":{"clearOnDefault":false},"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L5",null,{"children":["$","$6",null,{"name":"Next.MetadataOutlet","children":"$@7"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L8",null,{"children":"$L9"}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$6",null,{"name":"Next.Metadata","children":"$Lb"}]}]}],null]}],false]],"m":"$undefined","G":["$c","$undefined"],"S":true} 9:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}]] d:I[27201,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"IconMark"] 7:null diff --git a/docs/_not-found/__next._head.txt b/docs/_not-found/__next._head.txt index 66a9c801..b2a578f6 100644 --- a/docs/_not-found/__next._head.txt +++ b/docs/_not-found/__next._head.txt @@ -3,4 +3,4 @@ 3:I[97367,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"IconMark"] -0:{"buildId":"8Gyh12L4dTN96synIylXt","rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"MapGenius – Explore maps for Tribes 2"}],["$","meta","1",{"name":"description","content":"Tribes 2 forever."}],["$","link","2",{"rel":"icon","href":"/t2-mapper/icon.png?icon.2911bba1.png","sizes":"108x128","type":"image/png"}],["$","$L5","3",{}]]}]}]}],null]}],"loading":null,"isPartial":false} +0:{"buildId":"lsuSqSz5gb3GKN3jziExr","rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"MapGenius – Explore maps for Tribes 2"}],["$","meta","1",{"name":"description","content":"Tribes 2 forever."}],["$","link","2",{"rel":"icon","href":"/t2-mapper/icon.png?icon.2911bba1.png","sizes":"108x128","type":"image/png"}],["$","$L5","3",{}]]}]}]}],null]}],"loading":null,"isPartial":false} diff --git a/docs/_not-found/__next._index.txt b/docs/_not-found/__next._index.txt index cd08d784..653b77e5 100644 --- a/docs/_not-found/__next._index.txt +++ b/docs/_not-found/__next._index.txt @@ -3,4 +3,4 @@ 3:I[39756,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"default"] 4:I[37457,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"default"] :HL["/t2-mapper/_next/static/chunks/748c06086372a1f2.css","style"] -0:{"buildId":"8Gyh12L4dTN96synIylXt","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/748c06086372a1f2.css","precedence":"next"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/e6da73430a674f20.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"defaultOptions":{"clearOnDefault":false},"children":["$","$L3",null,{"parallelRouterKey":"children","template":["$","$L4",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lsuSqSz5gb3GKN3jziExr","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/748c06086372a1f2.css","precedence":"next"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/e6da73430a674f20.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"defaultOptions":{"clearOnDefault":false},"children":["$","$L3",null,{"parallelRouterKey":"children","template":["$","$L4",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/docs/_not-found/__next._not-found.__PAGE__.txt b/docs/_not-found/__next._not-found.__PAGE__.txt index 6f317107..9838c427 100644 --- a/docs/_not-found/__next._not-found.__PAGE__.txt +++ b/docs/_not-found/__next._not-found.__PAGE__.txt @@ -1,5 +1,5 @@ 1:"$Sreact.fragment" 2:I[97367,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"OutletBoundary"] 3:"$Sreact.suspense" -0:{"buildId":"8Gyh12L4dTN96synIylXt","rsc":["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lsuSqSz5gb3GKN3jziExr","rsc":["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"loading":null,"isPartial":false} 4:null diff --git a/docs/_not-found/__next._not-found.txt b/docs/_not-found/__next._not-found.txt index 449fbfff..04ef72f1 100644 --- a/docs/_not-found/__next._not-found.txt +++ b/docs/_not-found/__next._not-found.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[39756,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"default"] 3:I[37457,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"default"] -0:{"buildId":"8Gyh12L4dTN96synIylXt","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lsuSqSz5gb3GKN3jziExr","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/docs/_not-found/__next._tree.txt b/docs/_not-found/__next._tree.txt index 81b38975..6e44c303 100644 --- a/docs/_not-found/__next._tree.txt +++ b/docs/_not-found/__next._tree.txt @@ -1,2 +1,2 @@ :HL["/t2-mapper/_next/static/chunks/748c06086372a1f2.css","style"] -0:{"buildId":"8Gyh12L4dTN96synIylXt","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"/_not-found","paramType":null,"paramKey":"/_not-found","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lsuSqSz5gb3GKN3jziExr","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"/_not-found","paramType":null,"paramKey":"/_not-found","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/docs/_not-found/index.html b/docs/_not-found/index.html index 4a374c3a..fe7e8054 100644 --- a/docs/_not-found/index.html +++ b/docs/_not-found/index.html @@ -1 +1 @@ -404: This page could not be found.MapGenius – Explore maps for Tribes 2

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.MapGenius – Explore maps for Tribes 2

404

This page could not be found.

\ No newline at end of file diff --git a/docs/_not-found/index.txt b/docs/_not-found/index.txt index f1b9cb84..6518ac01 100644 --- a/docs/_not-found/index.txt +++ b/docs/_not-found/index.txt @@ -8,7 +8,7 @@ a:I[97367,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"MetadataBoundary"] c:I[68027,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"default"] :HL["/t2-mapper/_next/static/chunks/748c06086372a1f2.css","style"] -0:{"P":null,"b":"8Gyh12L4dTN96synIylXt","c":["","_not-found",""],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/748c06086372a1f2.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/e6da73430a674f20.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"defaultOptions":{"clearOnDefault":false},"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L5",null,{"children":["$","$6",null,{"name":"Next.MetadataOutlet","children":"$@7"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L8",null,{"children":"$L9"}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$6",null,{"name":"Next.Metadata","children":"$Lb"}]}]}],null]}],false]],"m":"$undefined","G":["$c","$undefined"],"S":true} +0:{"P":null,"b":"lsuSqSz5gb3GKN3jziExr","c":["","_not-found",""],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/748c06086372a1f2.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/e6da73430a674f20.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"defaultOptions":{"clearOnDefault":false},"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L5",null,{"children":["$","$6",null,{"name":"Next.MetadataOutlet","children":"$@7"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L8",null,{"children":"$L9"}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$6",null,{"name":"Next.Metadata","children":"$Lb"}]}]}],null]}],false]],"m":"$undefined","G":["$c","$undefined"],"S":true} 9:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}]] d:I[27201,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"IconMark"] 7:null diff --git a/docs/index.html b/docs/index.html index 92a4534a..14055b41 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1 +1 @@ -MapGenius – Explore maps for Tribes 2 \ No newline at end of file +MapGenius – Explore maps for Tribes 2 \ No newline at end of file diff --git a/docs/index.txt b/docs/index.txt index a0f400a5..eb4f6fea 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -3,14 +3,14 @@ 3:I[39756,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"default"] 4:I[37457,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"default"] 5:I[47257,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"ClientPageRoot"] -6:I[31713,["/t2-mapper/_next/static/chunks/e6da73430a674f20.js","/t2-mapper/_next/static/chunks/fd5173b60870d6fb.js","/t2-mapper/_next/static/chunks/93b588fa7f31935c.js","/t2-mapper/_next/static/chunks/5619c5b2b1355f74.js","/t2-mapper/_next/static/chunks/143bcebca21d60e5.js","/t2-mapper/_next/static/chunks/fcdc907286f09d63.js","/t2-mapper/_next/static/chunks/bb0aa1c978feffed.js"],"default"] +6:I[31713,["/t2-mapper/_next/static/chunks/e6da73430a674f20.js","/t2-mapper/_next/static/chunks/9fdd9dd1af0bcc76.js","/t2-mapper/_next/static/chunks/93b588fa7f31935c.js","/t2-mapper/_next/static/chunks/5619c5b2b1355f74.js","/t2-mapper/_next/static/chunks/eced4fe19bc9da99.js","/t2-mapper/_next/static/chunks/fcdc907286f09d63.js","/t2-mapper/_next/static/chunks/bb0aa1c978feffed.js"],"default"] 9:I[97367,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"OutletBoundary"] a:"$Sreact.suspense" c:I[97367,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"ViewportBoundary"] e:I[97367,["/t2-mapper/_next/static/chunks/4fd93823156e59e8.js"],"MetadataBoundary"] 10:I[68027,[],"default"] :HL["/t2-mapper/_next/static/chunks/748c06086372a1f2.css","style"] -0:{"P":null,"b":"8Gyh12L4dTN96synIylXt","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/748c06086372a1f2.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/e6da73430a674f20.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"defaultOptions":{"clearOnDefault":false},"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],[["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/fd5173b60870d6fb.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/93b588fa7f31935c.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/5619c5b2b1355f74.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/143bcebca21d60e5.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/t2-mapper/_next/static/chunks/fcdc907286f09d63.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/t2-mapper/_next/static/chunks/bb0aa1c978feffed.js","async":true,"nonce":"$undefined"}]],["$","$L9",null,{"children":["$","$a",null,{"name":"Next.MetadataOutlet","children":"$@b"}]}]]}],{},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Lc",null,{"children":"$Ld"}],["$","div",null,{"hidden":true,"children":["$","$Le",null,{"children":["$","$a",null,{"name":"Next.Metadata","children":"$Lf"}]}]}],null]}],false]],"m":"$undefined","G":["$10",[]],"S":true} +0:{"P":null,"b":"lsuSqSz5gb3GKN3jziExr","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/748c06086372a1f2.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/e6da73430a674f20.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"defaultOptions":{"clearOnDefault":false},"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],[["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/9fdd9dd1af0bcc76.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/93b588fa7f31935c.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/5619c5b2b1355f74.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/eced4fe19bc9da99.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/t2-mapper/_next/static/chunks/fcdc907286f09d63.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/t2-mapper/_next/static/chunks/bb0aa1c978feffed.js","async":true,"nonce":"$undefined"}]],["$","$L9",null,{"children":["$","$a",null,{"name":"Next.MetadataOutlet","children":"$@b"}]}]]}],{},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Lc",null,{"children":"$Ld"}],["$","div",null,{"hidden":true,"children":["$","$Le",null,{"children":["$","$a",null,{"name":"Next.Metadata","children":"$Lf"}]}]}],null]}],false]],"m":"$undefined","G":["$10",[]],"S":true} 7:{} 8:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params" d:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}]] diff --git a/src/components/MapInfoDialog.tsx b/src/components/MapInfoDialog.tsx index e0954edc..6de7c16a 100644 --- a/src/components/MapInfoDialog.tsx +++ b/src/components/MapInfoDialog.tsx @@ -176,7 +176,9 @@ export function MapInfoDialog({ useEffect(() => { if (open) { dialogRef.current?.focus(); - document.exitPointerLock(); + try { + document.exitPointerLock(); + } catch {} } }, [open]); diff --git a/src/components/MissionSelect.tsx b/src/components/MissionSelect.tsx index ad9ad4a5..439ee62f 100644 --- a/src/components/MissionSelect.tsx +++ b/src/components/MissionSelect.tsx @@ -270,7 +270,9 @@ export function MissionSelect({ placeholder={displayValue} className="MissionSelect-input" onFocus={() => { - document.exitPointerLock(); + try { + document.exitPointerLock(); + } catch {} combobox.show(); }} onKeyDown={(e) => {