\ 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 47521b99..78630bdc 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 299b8b56..fe1b9469 100644
--- a/docs/__next.__PAGE__.txt
+++ b/docs/__next.__PAGE__.txt
@@ -1,10 +1,10 @@
1:"$Sreact.fragment"
2:I[47257,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"ClientPageRoot"]
-3:I[31713,["/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.js","/t2-mapper/_next/static/chunks/628df86be2b8074c.js","/t2-mapper/_next/static/chunks/28c57db7b25d3d02.js","/t2-mapper/_next/static/chunks/d22dc3fe32e979ff.js","/t2-mapper/_next/static/chunks/b30d580062e7b044.js","/t2-mapper/_next/static/chunks/e01e6e76b521dd3c.js","/t2-mapper/_next/static/chunks/21659079be7af0ab.js","/t2-mapper/_next/static/chunks/26c11097581036eb.js","/t2-mapper/_next/static/chunks/9a99559140e82f06.js","/t2-mapper/_next/static/chunks/727710e55f003daf.js","/t2-mapper/_next/static/chunks/af18e4f3fa33de6b.js","/t2-mapper/_next/static/chunks/048c0e679979d576.js","/t2-mapper/_next/static/chunks/153d5796298dee1e.js"],"default"]
+3:I[31713,["/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.js","/t2-mapper/_next/static/chunks/628df86be2b8074c.js","/t2-mapper/_next/static/chunks/5dae6153cf1240b6.js","/t2-mapper/_next/static/chunks/779e069cb2cf814f.js","/t2-mapper/_next/static/chunks/b30d580062e7b044.js","/t2-mapper/_next/static/chunks/e01e6e76b521dd3c.js","/t2-mapper/_next/static/chunks/21659079be7af0ab.js","/t2-mapper/_next/static/chunks/6e8ac7c28fb34400.js","/t2-mapper/_next/static/chunks/9a99559140e82f06.js","/t2-mapper/_next/static/chunks/727710e55f003daf.js","/t2-mapper/_next/static/chunks/af18e4f3fa33de6b.js","/t2-mapper/_next/static/chunks/048c0e679979d576.js","/t2-mapper/_next/static/chunks/153d5796298dee1e.js"],"default"]
6:I[97367,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"OutletBoundary"]
7:"$Sreact.suspense"
-:HL["/t2-mapper/_next/static/chunks/3ec6b524f05ae0b6.css","style"]
-0:{"buildId":"qFiVWtG4yk0ykisMKiEZH","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/3ec6b524f05ae0b6.css","precedence":"next"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/628df86be2b8074c.js","async":true}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/28c57db7b25d3d02.js","async":true}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/d22dc3fe32e979ff.js","async":true}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/b30d580062e7b044.js","async":true}],["$","script","script-4",{"src":"/t2-mapper/_next/static/chunks/e01e6e76b521dd3c.js","async":true}],["$","script","script-5",{"src":"/t2-mapper/_next/static/chunks/21659079be7af0ab.js","async":true}],["$","script","script-6",{"src":"/t2-mapper/_next/static/chunks/26c11097581036eb.js","async":true}],["$","script","script-7",{"src":"/t2-mapper/_next/static/chunks/9a99559140e82f06.js","async":true}],["$","script","script-8",{"src":"/t2-mapper/_next/static/chunks/727710e55f003daf.js","async":true}],["$","script","script-9",{"src":"/t2-mapper/_next/static/chunks/af18e4f3fa33de6b.js","async":true}],["$","script","script-10",{"src":"/t2-mapper/_next/static/chunks/048c0e679979d576.js","async":true}],["$","script","script-11",{"src":"/t2-mapper/_next/static/chunks/153d5796298dee1e.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false}
+:HL["/t2-mapper/_next/static/chunks/aabc2b89bca559ab.css","style"]
+0:{"buildId":"6Rbtt13_hS5V8nXPFgNnq","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/aabc2b89bca559ab.css","precedence":"next"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/628df86be2b8074c.js","async":true}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/5dae6153cf1240b6.js","async":true}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/779e069cb2cf814f.js","async":true}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/b30d580062e7b044.js","async":true}],["$","script","script-4",{"src":"/t2-mapper/_next/static/chunks/e01e6e76b521dd3c.js","async":true}],["$","script","script-5",{"src":"/t2-mapper/_next/static/chunks/21659079be7af0ab.js","async":true}],["$","script","script-6",{"src":"/t2-mapper/_next/static/chunks/6e8ac7c28fb34400.js","async":true}],["$","script","script-7",{"src":"/t2-mapper/_next/static/chunks/9a99559140e82f06.js","async":true}],["$","script","script-8",{"src":"/t2-mapper/_next/static/chunks/727710e55f003daf.js","async":true}],["$","script","script-9",{"src":"/t2-mapper/_next/static/chunks/af18e4f3fa33de6b.js","async":true}],["$","script","script-10",{"src":"/t2-mapper/_next/static/chunks/048c0e679979d576.js","async":true}],["$","script","script-11",{"src":"/t2-mapper/_next/static/chunks/153d5796298dee1e.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 715f0ea9..a9ef3976 100644
--- a/docs/__next._full.txt
+++ b/docs/__next._full.txt
@@ -3,15 +3,15 @@
3:I[39756,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"default"]
4:I[37457,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"default"]
5:I[47257,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"ClientPageRoot"]
-6:I[31713,["/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.js","/t2-mapper/_next/static/chunks/628df86be2b8074c.js","/t2-mapper/_next/static/chunks/28c57db7b25d3d02.js","/t2-mapper/_next/static/chunks/d22dc3fe32e979ff.js","/t2-mapper/_next/static/chunks/b30d580062e7b044.js","/t2-mapper/_next/static/chunks/e01e6e76b521dd3c.js","/t2-mapper/_next/static/chunks/21659079be7af0ab.js","/t2-mapper/_next/static/chunks/26c11097581036eb.js","/t2-mapper/_next/static/chunks/9a99559140e82f06.js","/t2-mapper/_next/static/chunks/727710e55f003daf.js","/t2-mapper/_next/static/chunks/af18e4f3fa33de6b.js","/t2-mapper/_next/static/chunks/048c0e679979d576.js","/t2-mapper/_next/static/chunks/153d5796298dee1e.js"],"default"]
+6:I[31713,["/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.js","/t2-mapper/_next/static/chunks/628df86be2b8074c.js","/t2-mapper/_next/static/chunks/5dae6153cf1240b6.js","/t2-mapper/_next/static/chunks/779e069cb2cf814f.js","/t2-mapper/_next/static/chunks/b30d580062e7b044.js","/t2-mapper/_next/static/chunks/e01e6e76b521dd3c.js","/t2-mapper/_next/static/chunks/21659079be7af0ab.js","/t2-mapper/_next/static/chunks/6e8ac7c28fb34400.js","/t2-mapper/_next/static/chunks/9a99559140e82f06.js","/t2-mapper/_next/static/chunks/727710e55f003daf.js","/t2-mapper/_next/static/chunks/af18e4f3fa33de6b.js","/t2-mapper/_next/static/chunks/048c0e679979d576.js","/t2-mapper/_next/static/chunks/153d5796298dee1e.js"],"default"]
9:I[97367,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"OutletBoundary"]
a:"$Sreact.suspense"
c:I[97367,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"ViewportBoundary"]
e:I[97367,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"MetadataBoundary"]
10:I[68027,[],"default"]
:HL["/t2-mapper/_next/static/chunks/ad52ebedad251428.css","style"]
-:HL["/t2-mapper/_next/static/chunks/3ec6b524f05ae0b6.css","style"]
-0:{"P":null,"b":"qFiVWtG4yk0ykisMKiEZH","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/ad52ebedad251428.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.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"]}}],[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/3ec6b524f05ae0b6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/628df86be2b8074c.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/28c57db7b25d3d02.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/d22dc3fe32e979ff.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/b30d580062e7b044.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/t2-mapper/_next/static/chunks/e01e6e76b521dd3c.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/t2-mapper/_next/static/chunks/21659079be7af0ab.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/t2-mapper/_next/static/chunks/26c11097581036eb.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/t2-mapper/_next/static/chunks/9a99559140e82f06.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/t2-mapper/_next/static/chunks/727710e55f003daf.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/t2-mapper/_next/static/chunks/af18e4f3fa33de6b.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/t2-mapper/_next/static/chunks/048c0e679979d576.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/t2-mapper/_next/static/chunks/153d5796298dee1e.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}
+:HL["/t2-mapper/_next/static/chunks/aabc2b89bca559ab.css","style"]
+0:{"P":null,"b":"6Rbtt13_hS5V8nXPFgNnq","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/ad52ebedad251428.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.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"]}}],[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/aabc2b89bca559ab.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/628df86be2b8074c.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/5dae6153cf1240b6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/779e069cb2cf814f.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/b30d580062e7b044.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/t2-mapper/_next/static/chunks/e01e6e76b521dd3c.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/t2-mapper/_next/static/chunks/21659079be7af0ab.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/t2-mapper/_next/static/chunks/6e8ac7c28fb34400.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/t2-mapper/_next/static/chunks/9a99559140e82f06.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/t2-mapper/_next/static/chunks/727710e55f003daf.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/t2-mapper/_next/static/chunks/af18e4f3fa33de6b.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/t2-mapper/_next/static/chunks/048c0e679979d576.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/t2-mapper/_next/static/chunks/153d5796298dee1e.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 9da154c0..ab41a633 100644
--- a/docs/__next._head.txt
+++ b/docs/__next._head.txt
@@ -3,4 +3,4 @@
3:I[97367,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"MetadataBoundary"]
4:"$Sreact.suspense"
5:I[27201,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"IconMark"]
-0:{"buildId":"qFiVWtG4yk0ykisMKiEZH","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":"6Rbtt13_hS5V8nXPFgNnq","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 4c48efbe..88a68946 100644
--- a/docs/__next._index.txt
+++ b/docs/__next._index.txt
@@ -3,4 +3,4 @@
3:I[39756,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"default"]
4:I[37457,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"default"]
:HL["/t2-mapper/_next/static/chunks/ad52ebedad251428.css","style"]
-0:{"buildId":"qFiVWtG4yk0ykisMKiEZH","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/ad52ebedad251428.css","precedence":"next"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.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":"6Rbtt13_hS5V8nXPFgNnq","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/ad52ebedad251428.css","precedence":"next"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.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 8ba096c2..6aa5dc21 100644
--- a/docs/__next._tree.txt
+++ b/docs/__next._tree.txt
@@ -1,3 +1,3 @@
:HL["/t2-mapper/_next/static/chunks/ad52ebedad251428.css","style"]
-:HL["/t2-mapper/_next/static/chunks/3ec6b524f05ae0b6.css","style"]
-0:{"buildId":"qFiVWtG4yk0ykisMKiEZH","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}
+:HL["/t2-mapper/_next/static/chunks/aabc2b89bca559ab.css","style"]
+0:{"buildId":"6Rbtt13_hS5V8nXPFgNnq","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/qFiVWtG4yk0ykisMKiEZH/_buildManifest.js b/docs/_next/static/6Rbtt13_hS5V8nXPFgNnq/_buildManifest.js
similarity index 100%
rename from docs/_next/static/qFiVWtG4yk0ykisMKiEZH/_buildManifest.js
rename to docs/_next/static/6Rbtt13_hS5V8nXPFgNnq/_buildManifest.js
diff --git a/docs/_next/static/qFiVWtG4yk0ykisMKiEZH/_clientMiddlewareManifest.json b/docs/_next/static/6Rbtt13_hS5V8nXPFgNnq/_clientMiddlewareManifest.json
similarity index 100%
rename from docs/_next/static/qFiVWtG4yk0ykisMKiEZH/_clientMiddlewareManifest.json
rename to docs/_next/static/6Rbtt13_hS5V8nXPFgNnq/_clientMiddlewareManifest.json
diff --git a/docs/_next/static/qFiVWtG4yk0ykisMKiEZH/_ssgManifest.js b/docs/_next/static/6Rbtt13_hS5V8nXPFgNnq/_ssgManifest.js
similarity index 100%
rename from docs/_next/static/qFiVWtG4yk0ykisMKiEZH/_ssgManifest.js
rename to docs/_next/static/6Rbtt13_hS5V8nXPFgNnq/_ssgManifest.js
diff --git a/docs/_next/static/chunks/28c57db7b25d3d02.js b/docs/_next/static/chunks/28c57db7b25d3d02.js
deleted file mode 100644
index 91c46853..00000000
--- a/docs/_next/static/chunks/28c57db7b25d3d02.js
+++ /dev/null
@@ -1,211 +0,0 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67191,e=>{e.v({Label:"FloatingLabel-module__8y09Ka__Label"})},89887,e=>{"use strict";var t=e.i(43476),r=e.i(932),i=e.i(71645),s=e.i(90072),n=e.i(71753),a=e.i(60099),o=e.i(67191);let l=[0,0,0],u=new s.Vector3,c=(0,i.memo)(function(e){let s,c,h,d=(0,r.c)(11),{children:f,color:p,position:m,opacity:v}=e,g=void 0===p?"white":p,y=void 0===m?l:m,b=void 0===v?"fadeWithDistance":v,S="fadeWithDistance"===b,O=(0,i.useRef)(null),[T,x]=(0,i.useState)(0!==b),E=(0,i.useRef)(null);return d[0]!==S||d[1]!==T||d[2]!==b?(s=e=>{var t,r,i;let s,{camera:n}=e,a=O.current;if(!a)return;a.getWorldPosition(u);let o=(t=u.x,r=u.y,i=u.z,-((t-(s=n.matrixWorld.elements)[12])*s[8])+-((r-s[13])*s[9])+-((i-s[14])*s[10])<0);if(S){let e=o?1/0:n.position.distanceTo(u),t=e<200;if(T!==t&&x(t),E.current&&t){let t=Math.max(0,Math.min(1,1-e/200));E.current.style.opacity=t.toString()}}else{let e=!o&&0!==b;T!==e&&x(e),E.current&&(E.current.style.opacity=b.toString())}},d[0]=S,d[1]=T,d[2]=b,d[3]=s):s=d[3],(0,n.useFrame)(s),d[4]!==f||d[5]!==g||d[6]!==T||d[7]!==y?(c=T?(0,t.jsx)(a.Html,{position:y,center:!0,children:(0,t.jsx)("div",{ref:E,className:o.default.Label,style:{color:g},children:f})}):null,d[4]=f,d[5]=g,d[6]=T,d[7]=y,d[8]=c):c=d[8],d[9]!==c?(h=(0,t.jsx)("group",{ref:O,children:c}),d[9]=c,d[10]=h):h=d[10],h});e.s(["FloatingLabel",0,c])},60099,e=>{"use strict";let t,r;var i=e.i(31067),s=e.i(71645),n=e.i(88014),a=e.i(90072),o=e.i(15080),l=e.i(71753);let u=new a.Vector3,c=new a.Vector3,h=new a.Vector3,d=new a.Vector2;function f(e,t,r){let i=u.setFromMatrixPosition(e.matrixWorld);i.project(t);let s=r.width/2,n=r.height/2;return[i.x*s+s,-(i.y*n)+n]}let p=e=>1e-10>Math.abs(e)?0:e;function m(e,t,r=""){let i="matrix3d(";for(let r=0;16!==r;r++)i+=p(t[r]*e.elements[r])+(15!==r?",":")");return r+i}let v=(t=[1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1],e=>m(e,t)),g=(r=e=>[1/e,1/e,1/e,1,-1/e,-1/e,-1/e,-1,1/e,1/e,1/e,1,1,1,1,1],(e,t)=>m(e,r(t),"translate(-50%,-50%)")),y=s.forwardRef(({children:e,eps:t=.001,style:r,className:m,prepend:y,center:b,fullscreen:S,portal:O,distanceFactor:T,sprite:x=!1,transform:E=!1,occlude:F,onOcclude:M,castShadow:R,receiveShadow:w,material:C,geometry:P,zIndexRange:D=[0x1000037,0],calculatePosition:I=f,as:U="div",wrapperClass:j,pointerEvents:_="auto",...Q},k)=>{let{gl:L,camera:q,scene:A,size:H,raycaster:V,events:W,viewport:z}=(0,o.useThree)(),[G]=s.useState(()=>document.createElement(U)),N=s.useRef(null),$=s.useRef(null),K=s.useRef(0),Y=s.useRef([0,0]),B=s.useRef(null),J=s.useRef(null),Z=(null==O?void 0:O.current)||W.connected||L.domElement.parentNode,X=s.useRef(null),ee=s.useRef(!1),et=s.useMemo(()=>{var e;return F&&"blending"!==F||Array.isArray(F)&&F.length&&(e=F[0])&&"object"==typeof e&&"current"in e},[F]);s.useLayoutEffect(()=>{let e=L.domElement;F&&"blending"===F?(e.style.zIndex=`${Math.floor(D[0]/2)}`,e.style.position="absolute",e.style.pointerEvents="none"):(e.style.zIndex=null,e.style.position=null,e.style.pointerEvents=null)},[F]),s.useLayoutEffect(()=>{if($.current){let e=N.current=n.createRoot(G);if(A.updateMatrixWorld(),E)G.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{let e=I($.current,q,H);G.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${e[0]}px,${e[1]}px,0);transform-origin:0 0;`}return Z&&(y?Z.prepend(G):Z.appendChild(G)),()=>{Z&&Z.removeChild(G),e.unmount()}}},[Z,E]),s.useLayoutEffect(()=>{j&&(G.className=j)},[j]);let er=s.useMemo(()=>E?{position:"absolute",top:0,left:0,width:H.width,height:H.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:b?"translate3d(-50%,-50%,0)":"none",...S&&{top:-H.height/2,left:-H.width/2,width:H.width,height:H.height},...r},[r,b,S,H,E]),ei=s.useMemo(()=>({position:"absolute",pointerEvents:_}),[_]);s.useLayoutEffect(()=>{var t,i;ee.current=!1,E?null==(t=N.current)||t.render(s.createElement("div",{ref:B,style:er},s.createElement("div",{ref:J,style:ei},s.createElement("div",{ref:k,className:m,style:r,children:e})))):null==(i=N.current)||i.render(s.createElement("div",{ref:k,style:er,className:m,children:e}))});let es=s.useRef(!0);(0,l.useFrame)(e=>{if($.current){q.updateMatrixWorld(),$.current.updateWorldMatrix(!0,!1);let e=E?Y.current:I($.current,q,H);if(E||Math.abs(K.current-q.zoom)>t||Math.abs(Y.current[0]-e[0])>t||Math.abs(Y.current[1]-e[1])>t){var r;let t,i,s,n,o=(r=$.current,t=u.setFromMatrixPosition(r.matrixWorld),i=c.setFromMatrixPosition(q.matrixWorld),s=t.sub(i),n=q.getWorldDirection(h),s.angleTo(n)>Math.PI/2),l=!1;et&&(Array.isArray(F)?l=F.map(e=>e.current):"blending"!==F&&(l=[A]));let f=es.current;l?es.current=function(e,t,r,i){let s=u.setFromMatrixPosition(e.matrixWorld),n=s.clone();n.project(t),d.set(n.x,n.y),r.setFromCamera(d,t);let a=r.intersectObjects(i,!0);if(a.length){let e=a[0].distance;return s.distanceTo(r.ray.origin)({vertexShader:E?void 0:`
- /*
- This shader is from the THREE's SpriteMaterial.
- We need to turn the backing plane into a Sprite
- (make it always face the camera) if "transfrom"
- is false.
- */
- #include
-
- void main() {
- vec2 center = vec2(0., 1.);
- float rotation = 0.0;
-
- // This is somewhat arbitrary, but it seems to work well
- // Need to figure out how to derive this dynamically if it even matters
- float size = 0.03;
-
- vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );
- vec2 scale;
- scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );
- scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );
-
- bool isPerspective = isPerspectiveMatrix( projectionMatrix );
- if ( isPerspective ) scale *= - mvPosition.z;
-
- vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size;
- vec2 rotatedPosition;
- rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
- rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
- mvPosition.xy += rotatedPosition;
-
- gl_Position = projectionMatrix * mvPosition;
- }
- `,fragmentShader:`
- void main() {
- gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
- }
- `}),[E]);return s.createElement("group",(0,i.default)({},Q,{ref:$}),F&&!et&&s.createElement("mesh",{castShadow:R,receiveShadow:w,ref:X},P||s.createElement("planeGeometry",null),C||s.createElement("shaderMaterial",{side:a.DoubleSide,vertexShader:en.vertexShader,fragmentShader:en.fragmentShader})))});e.s(["Html",()=>y])},79123,38847,74657,21025,e=>{"use strict";var t=e.i(43476),r=e.i(71645),i=e.i(932),s=e.i(80902),n=e.i(22289);function a(e,t,r){try{return e(t)}catch(e){return(0,n.l)("[nuqs] Error while parsing value `%s`: %O"+(r?" (for key `%s`)":""),t,e,r),null}}function o(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),a(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}}}}let l=o({parse:e=>e,serialize:String});o({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)}),o({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)}),o({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}}),o({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String});let u=o({parse:e=>"true"===e.toLowerCase(),serialize:String});function c(e,t){return e.valueOf()===t.valueOf()}o({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:c}),o({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:c}),o({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:c});let h=(0,s.r)(),d={};function f(e,t,r,i,n,o){let l=!1,u=Object.entries(e).reduce((e,[u,c])=>{var h;let d=t?.[u]??u,f=i[d],p="multi"===c.type?[]:null,m=void 0===f?("multi"===c.type?r?.getAll(d):r?.get(d))??p:f;return n&&o&&((h=n[d]??p)===m||null!==h&&null!==m&&"string"!=typeof h&&"string"!=typeof m&&h.length===m.length&&h.every((e,t)=>e===m[t]))?e[u]=o[u]??null:(l=!0,e[u]=((0,s.i)(m)?null:a(c.parse,m,d))??null,n&&(n[d]=m)),e},{});if(!l){let t=Object.keys(e),r=Object.keys(o??{});l=t.length!==r.length||t.some(e=>!r.includes(e))}return{state:u,hasChanged:l}}function p(e,t){return Object.fromEntries(Object.keys(e).map(r=>[r,e[r]??t[r]??null]))}function m(e,t={}){let{parse:i,type:a,serialize:o,eq:l,defaultValue:u,...c}=t,[{[e]:v},g]=function(e,t={}){let i=(0,r.useId)(),a=(0,n.i)(),o=(0,n.a)(),{history:l="replace",scroll:u=a?.scroll??!1,shallow:c=a?.shallow??!0,throttleMs:m=s.s.timeMs,limitUrlUpdates:v=a?.limitUrlUpdates,clearOnDefault:g=a?.clearOnDefault??!0,startTransition:y,urlKeys:b=d}=t,S=Object.keys(e).join(","),O=(0,r.useMemo)(()=>Object.fromEntries(Object.keys(e).map(e=>[e,b[e]??e])),[S,JSON.stringify(b)]),T=(0,n.r)(Object.values(O)),x=T.searchParams,E=(0,r.useRef)({}),F=(0,r.useMemo)(()=>Object.fromEntries(Object.keys(e).map(t=>[t,e[t].defaultValue??null])),[Object.values(e).map(({defaultValue:e})=>e).join(",")]),M=s.t.useQueuedQueries(Object.values(O)),[R,w]=(0,r.useState)(()=>f(e,b,x??new URLSearchParams,M).state),C=(0,r.useRef)(R);if((0,n.c)("[nuq+ %s `%s`] render - state: %O, iSP: %s",i,S,R,x),Object.keys(E.current).join("&")!==Object.values(O).join("&")){let{state:t,hasChanged:r}=f(e,b,x,M,E.current,C.current);r&&((0,n.c)("[nuq+ %s `%s`] State changed: %O",i,S,{state:t,initialSearchParams:x,queuedQueries:M,queryRef:E.current,stateRef:C.current}),C.current=t,w(t)),E.current=Object.fromEntries(Object.entries(O).map(([t,r])=>[r,e[t]?.type==="multi"?x?.getAll(r):x?.get(r)??null]))}(0,r.useEffect)(()=>{let{state:t,hasChanged:r}=f(e,b,x,M,E.current,C.current);r&&((0,n.c)("[nuq+ %s `%s`] State changed: %O",i,S,{state:t,initialSearchParams:x,queuedQueries:M,queryRef:E.current,stateRef:C.current}),C.current=t,w(t))},[Object.values(O).map(e=>`${e}=${x?.getAll(e)}`).join("&"),JSON.stringify(M)]),(0,r.useEffect)(()=>{let t=Object.keys(e).reduce((t,r)=>(t[r]=({state:t,query:s})=>{w(a=>{let{defaultValue:o}=e[r],l=O[r],u=t??o??null;return Object.is(a[r]??o??null,u)?((0,n.c)("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",i,S,l,t,o,C.current),a):(C.current={...C.current,[r]:u},E.current[l]=s,(0,n.c)("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",i,S,l,t,o,C.current),C.current)})},t),{});for(let r of Object.keys(e)){let e=O[r];(0,n.c)("[nuq+ %s `%s`] Subscribing to sync for `%s`",i,e,S),h.on(e,t[r])}return()=>{for(let r of Object.keys(e)){let e=O[r];(0,n.c)("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",i,e,S),h.off(e,t[r])}}},[S,O]);let P=(0,r.useCallback)((t,r={})=>{let a,d=Object.fromEntries(Object.keys(e).map(e=>[e,null])),f="function"==typeof t?t(p(C.current,F))??d:t??d;(0,n.c)("[nuq+ %s `%s`] setState: %O",i,S,f);let b=0,x=!1,E=[];for(let[t,i]of Object.entries(f)){let d=e[t],f=O[t];if(!d||void 0===i)continue;(r.clearOnDefault??d.clearOnDefault??g)&&null!==i&&void 0!==d.defaultValue&&(d.eq??((e,t)=>e===t))(i,d.defaultValue)&&(i=null);let p=null===i?null:(d.serialize??String)(i);h.emit(f,{state:i,query:p});let S={key:f,query:p,options:{history:r.history??d.history??l,shallow:r.shallow??d.shallow??c,scroll:r.scroll??d.scroll??u,startTransition:r.startTransition??d.startTransition??y}};if(r?.limitUrlUpdates?.method==="debounce"||v?.method==="debounce"||d.limitUrlUpdates?.method==="debounce"){!0===S.options.shallow&&console.warn((0,n.s)(422));let e=r?.limitUrlUpdates?.timeMs??v?.timeMs??d.limitUrlUpdates?.timeMs??s.s.timeMs,t=s.t.push(S,e,T,o);bt(e),x?s.n.flush(T,o):s.n.getPendingPromise(T));return a??M},[S,l,c,u,m,v?.method,v?.timeMs,y,O,T.updateUrl,T.getSearchParamsSnapshot,T.rateLimitFactor,o,F]);return[(0,r.useMemo)(()=>p(R,F),[R,F]),P]}({[e]:{parse:i??(e=>e),type:a,serialize:o,eq:l,defaultValue:u}},c);return[v,(0,r.useCallback)((t,r={})=>g(r=>({[e]:"function"==typeof t?t(r[e]):t}),r),[e,g])]}e.s(["createParser",()=>o,"parseAsBoolean",()=>u,"parseAsString",()=>l,"useQueryState",()=>m],38847);var v=e.i(91996);let g=o({parse(e){let[t,r]=e.split("~"),i=r,s=(0,v.getMissionInfo)(t).missionTypes;return r&&s.includes(r)||(i=s[0]),{missionName:t,missionType:i}},serialize({missionName:e,missionType:t}){let r=(0,v.getMissionInfo)(e).missionTypes;return t&&1!==r.length?`${e}~${t}`:e},eq:(e,t)=>e.missionName===t.missionName&&e.missionType===t.missionType}).withDefault({missionName:"RiverDance",missionType:"CTF"});function y(){let e,t=(0,i.c)(3),[r,s]=m("mission",g);return t[0]!==r||t[1]!==s?(e=[r,s],t[0]=r,t[1]=s,t[2]=e):e=t[2],e}function b(){let e,t=(0,i.c)(3),[r,s]=m("fog",u);return t[0]!==r||t[1]!==s?(e=[r,s],t[0]=r,t[1]=s,t[2]=e):e=t[2],e}e.s(["useFogQueryState",()=>b,"useMissionQueryState",()=>y],74657);let S="(pointer: coarse)",O=()=>null;function T(e){let t=window.matchMedia(S);return t.addEventListener("change",e),()=>{t.removeEventListener("change",e)}}function x(){return window.matchMedia(S).matches}function E(){return(0,r.useSyncExternalStore)(T,x,O)}e.s(["useTouchDevice",()=>E],21025);let F=(0,r.createContext)(null),M=(0,r.createContext)(null),R=(0,r.createContext)(null);function w(){return(0,r.useContext)(F)}function C(){return(0,r.useContext)(M)}function P(){return(0,r.useContext)(R)}function D({children:e}){let[i,s]=(0,r.useState)(!0),[n,a]=(0,r.useState)(!1),[o,l]=(0,r.useState)(.15),[u,c]=(0,r.useState)(90),[h,d]=(0,r.useState)(!1),[f,p]=(0,r.useState)(.75),[m,v]=(0,r.useState)(!0),[g,y]=(0,r.useState)(!1),[S,O]=(0,r.useState)("moveLookStick"),[T,x]=(0,r.useState)("MapGenius"),[w,C]=(0,r.useState)(!1),[P,D]=(0,r.useState)(!1),[I,U]=(0,r.useState)(!1),[j,_]=(0,r.useState)(!1),[Q,k]=(0,r.useState)(!1),[L,q]=b(),A=(0,r.useCallback)(()=>{q(null)},[q]),H=(0,r.useCallback)(e=>{s(e),A()},[A]),V=(0,r.useMemo)(()=>({fogEnabled:L??i,setFogEnabled:H,clearFogEnabledOverride:A,highQualityFog:n,setHighQualityFog:a,fov:u,setFov:c,audioEnabled:h,setAudioEnabled:d,animationEnabled:m,setAnimationEnabled:v,warriorName:T,setWarriorName:x,audioVolume:f,setAudioVolume:p,sidebarOpen:j,setSidebarOpen:_}),[i,L,H,A,n,u,h,m,T,f,j]),W=(0,r.useMemo)(()=>({debugMode:g,setDebugMode:y,renderOnDemand:Q,setRenderOnDemand:k}),[g,y,Q]),z=(0,r.useMemo)(()=>({speedMultiplier:o,setSpeedMultiplier:l,touchMode:S,setTouchMode:O,invertScroll:w,setInvertScroll:C,invertDrag:P,setInvertDrag:D,invertJoystick:I,setInvertJoystick:U}),[o,l,S,O,w,P,I]),G=E();(0,r.useEffect)(()=>{if(null==G)return;let e={};try{e=JSON.parse(localStorage.getItem("settings"))||{}}catch(e){}null!=e.debugMode&&y(e.debugMode),null!=e.audioEnabled&&d(e.audioEnabled),null!=e.animationEnabled&&v(e.animationEnabled),null!=e.fogEnabled&&s(e.fogEnabled),null!=e.highQualityFog&&a(e.highQualityFog),null!=e.speedMultiplier&&l(Math.max(.01,Math.min(1,e.speedMultiplier))),null!=e.fov&&c(e.fov),null!=e.touchMode&&O(e.touchMode),null!=e.warriorName&&x(e.warriorName),null!=e.audioVolume&&p(e.audioVolume),null!=e.invertScroll&&C(e.invertScroll),null!=e.invertDrag&&D(e.invertDrag),null!=e.invertJoystick&&U(e.invertJoystick),null==e.sidebarOpen||G||_(e.sidebarOpen)},[G]);let N=(0,r.useRef)(null);return(0,r.useEffect)(()=>(N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{try{localStorage.setItem("settings",JSON.stringify({fogEnabled:i,highQualityFog:n,speedMultiplier:o,fov:u,audioEnabled:h,animationEnabled:m,debugMode:g,touchMode:S,warriorName:T,audioVolume:f,invertScroll:w,invertDrag:P,invertJoystick:I,sidebarOpen:j}))}catch(e){}},500),()=>{N.current&&clearTimeout(N.current)}),[i,n,o,u,h,m,g,S,T,f,w,P,I,j]),(0,t.jsx)(F.Provider,{value:V,children:(0,t.jsx)(M.Provider,{value:W,children:(0,t.jsx)(R.Provider,{value:z,children:e})})})}e.s(["MAX_SPEED_MULTIPLIER",0,1,"MIN_SPEED_MULTIPLIER",0,.01,"SettingsProvider",()=>D,"useControls",()=>P,"useDebug",()=>C,"useSettings",()=>w],79123)},31067,e=>{"use strict";function t(){return(t=Object.assign.bind()).apply(null,arguments)}e.s(["default",()=>t])},19273,80166,e=>{"use strict";e.i(47167);var t={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},r=new class{#e=t;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function i(e){setTimeout(e,0)}e.s(["systemSetTimeoutZero",()=>i,"timeoutManager",()=>r],80166);var s="u"=0&&e!==1/0}function l(e,t){return Math.max(e+(t||0)-Date.now(),0)}function u(e,t){return"function"==typeof e?e(t):e}function c(e,t){return"function"==typeof e?e(t):e}function h(e,t){let{type:r="all",exact:i,fetchStatus:s,predicate:n,queryKey:a,stale:o}=e;if(a){if(i){if(t.queryHash!==f(a,t.options))return!1}else if(!m(t.queryKey,a))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&(!s||s===t.state.fetchStatus)&&(!n||!!n(t))}function d(e,t){let{exact:r,status:i,predicate:s,mutationKey:n}=e;if(n){if(!t.options.mutationKey)return!1;if(r){if(p(t.options.mutationKey)!==p(n))return!1}else if(!m(t.options.mutationKey,n))return!1}return(!i||t.state.status===i)&&(!s||!!s(t))}function f(e,t){return(t?.queryKeyHashFn||p)(e)}function p(e){return JSON.stringify(e,(e,t)=>b(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function m(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(r=>m(e[r],t[r]))}var v=Object.prototype.hasOwnProperty;function g(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function y(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function b(e){if(!S(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!S(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function S(e){return"[object Object]"===Object.prototype.toString.call(e)}function O(e){return new Promise(t=>{r.setTimeout(t,e)})}function T(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?function e(t,r,i=0){if(t===r)return t;if(i>500)return r;let s=y(t)&&y(r);if(!s&&!(b(t)&&b(r)))return r;let n=(s?t:Object.keys(t)).length,a=s?r:Object.keys(r),o=a.length,l=s?Array(o):{},u=0;for(let c=0;cr?i.slice(1):i}function E(e,t,r=0){let i=[t,...e];return r&&i.length>r?i.slice(0,-1):i}var F=Symbol();function M(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==F?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}function R(e,t){return"function"==typeof e?e(...t):!!e}function w(e,t,r){let i,s=!1;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),s||(s=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}e.s(["addConsumeAwareSignal",()=>w,"addToEnd",()=>x,"addToStart",()=>E,"ensureQueryFn",()=>M,"functionalUpdate",()=>a,"hashKey",()=>p,"hashQueryKeyByOptions",()=>f,"isServer",()=>s,"isValidTimeout",()=>o,"matchMutation",()=>d,"matchQuery",()=>h,"noop",()=>n,"partialMatchKey",()=>m,"replaceData",()=>T,"resolveEnabled",()=>c,"resolveStaleTime",()=>u,"shallowEqualObjects",()=>g,"shouldThrowError",()=>R,"skipToken",()=>F,"sleep",()=>O,"timeUntilStale",()=>l],19273)},40143,e=>{"use strict";let t,r,i,s,n,a;var o=e.i(80166).systemSetTimeoutZero,l=(t=[],r=0,i=e=>{e()},s=e=>{e()},n=o,{batch:e=>{let a;r++;try{a=e()}finally{let e;--r||(e=t,t=[],e.length&&n(()=>{s(()=>{e.forEach(e=>{i(e)})})}))}return a},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a=e=>{r?t.push(e):n(()=>{i(e)})},setNotifyFunction:e=>{i=e},setBatchNotifyFunction:e=>{s=e},setScheduler:e=>{n=e}});e.s(["notifyManager",()=>l])},15823,e=>{"use strict";var t=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};e.s(["Subscribable",()=>t])},75555,e=>{"use strict";var t=e.i(15823),r=e.i(19273),i=new class extends t.Subscribable{#r;#i;#s;constructor(){super(),this.#s=e=>{if(!r.isServer&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#i||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#i?.(),this.#i=void 0)}setEventListener(e){this.#s=e,this.#i?.(),this.#i=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#r!==e&&(this.#r=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#r?this.#r:globalThis.document?.visibilityState!=="hidden"}};e.s(["focusManager",()=>i])},86491,14448,93803,36553,88587,e=>{"use strict";e.i(47167);var t=e.i(19273),r=e.i(40143),i=e.i(75555),s=e.i(15823),n=new class extends s.Subscribable{#n=!0;#i;#s;constructor(){super(),this.#s=e=>{if(!t.isServer&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#i||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#i?.(),this.#i=void 0)}setEventListener(e){this.#s=e,this.#i?.(),this.#i=e(this.setOnline.bind(this))}setOnline(e){this.#n!==e&&(this.#n=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#n}};function a(){let e,t,r=new Promise((r,i)=>{e=r,t=i});function i(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{i({status:"fulfilled",value:t}),e(t)},r.reject=e=>{i({status:"rejected",reason:e}),t(e)},r}function o(e){return Math.min(1e3*2**e,3e4)}function l(e){return(e??"online")!=="online"||n.isOnline()}e.s(["onlineManager",()=>n],14448),e.s(["pendingThenable",()=>a],93803);var u=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function c(e){let r,s=!1,c=0,h=a(),d=()=>i.focusManager.isFocused()&&("always"===e.networkMode||n.isOnline())&&e.canRun(),f=()=>l(e.networkMode)&&e.canRun(),p=e=>{"pending"===h.status&&(r?.(),h.resolve(e))},m=e=>{"pending"===h.status&&(r?.(),h.reject(e))},v=()=>new Promise(t=>{r=e=>{("pending"!==h.status||d())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,"pending"===h.status&&e.onContinue?.()}),g=()=>{let r;if("pending"!==h.status)return;let i=0===c?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(p).catch(r=>{if("pending"!==h.status)return;let i=e.retry??3*!t.isServer,n=e.retryDelay??o,a="function"==typeof n?n(c,r):n,l=!0===i||"number"==typeof i&&cd()?void 0:v()).then(()=>{s?m(r):g()}))})};return{promise:h,status:()=>h.status,cancel:t=>{if("pending"===h.status){let r=new u(t);m(r),e.onCancel?.(r)}},continue:()=>(r?.(),h),cancelRetry:()=>{s=!0},continueRetry:()=>{s=!1},canStart:f,start:()=>(f()?g():v().then(g),h)}}e.s(["CancelledError",()=>u,"canFetch",()=>l,"createRetryer",()=>c],36553);var h=e.i(80166),d=class{#a;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,t.isValidTimeout)(this.gcTime)&&(this.#a=h.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(t.isServer?1/0:3e5))}clearGcTimeout(){this.#a&&(h.timeoutManager.clearTimeout(this.#a),this.#a=void 0)}};e.s(["Removable",()=>d],88587);var f=class extends d{#o;#l;#u;#c;#h;#d;#f;constructor(e){super(),this.#f=!1,this.#d=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#c=e.client,this.#u=this.#c.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#o=v(this.options),this.state=e.state??this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#h?.promise}setOptions(e){if(this.options={...this.#d,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=v(this.options);void 0!==e.data&&(this.setState(m(e.data,e.dataUpdatedAt)),this.#o=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#u.remove(this)}setData(e,r){let i=(0,t.replaceData)(this.state.data,e,this.options);return this.#p({data:i,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),i}setState(e,t){this.#p({type:"setState",state:e,setStateOptions:t})}cancel(e){let r=this.#h?.promise;return this.#h?.cancel(e),r?r.then(t.noop).catch(t.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#o)}isActive(){return this.observers.some(e=>!1!==(0,t.resolveEnabled)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===t.skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,t.resolveStaleTime)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,t.timeUntilStale)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#u.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#h&&(this.#f?this.#h.cancel({revert:!0}):this.#h.cancelRetry()),this.scheduleGc()),this.#u.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#p({type:"invalidate"})}async fetch(e,r){let i;if("idle"!==this.state.fetchStatus&&this.#h?.status()!=="rejected"){if(void 0!==this.state.data&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#h)return this.#h.continueRetry(),this.#h.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let s=new AbortController,n=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#f=!0,s.signal)})},a=()=>{let e,i=(0,t.ensureQueryFn)(this.options,r),s=(n(e={client:this.#c,queryKey:this.queryKey,meta:this.meta}),e);return(this.#f=!1,this.options.persister)?this.options.persister(i,s,this):i(s)},o=(n(i={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:a}),i);this.options.behavior?.onFetch(o,this),this.#l=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#p({type:"fetch",meta:o.fetchOptions?.meta}),this.#h=c({initialPromise:r?.initialPromise,fn:o.fetchFn,onCancel:e=>{e instanceof u&&e.revert&&this.setState({...this.#l,fetchStatus:"idle"}),s.abort()},onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:()=>{this.#p({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{let e=await this.#h.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#u.config.onSuccess?.(e,this),this.#u.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof u){if(e.silent)return this.#h.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#p({type:"error",error:e}),this.#u.config.onError?.(e,this),this.#u.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#p(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...p(t.data,this.options),fetchMeta:e.meta??null};case"success":let r={...t,...m(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#l=e.manual?r:void 0,r;case"error":let i=e.error;return{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),r.notifyManager.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#u.notify({query:this,type:"updated",action:e})})}};function p(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:l(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function m(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function v(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,i=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}e.s(["Query",()=>f,"fetchState",()=>p],86491)},12598,e=>{"use strict";var t=e.i(71645),r=e.i(43476),i=t.createContext(void 0),s=e=>{let r=t.useContext(i);if(e)return e;if(!r)throw Error("No QueryClient set, use QueryClientProvider to set one");return r},n=({client:e,children:s})=>(t.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,r.jsx)(i.Provider,{value:e,children:s}));e.s(["QueryClientProvider",()=>n,"useQueryClient",()=>s])},69230,e=>{"use strict";var t=e.i(75555),r=e.i(40143),i=e.i(86491),s=e.i(15823),n=e.i(93803),a=e.i(19273),o=e.i(80166),l=class extends s.Subscribable{constructor(e,t){super(),this.options=t,this.#c=e,this.#m=null,this.#v=(0,n.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#c;#g=void 0;#y=void 0;#b=void 0;#S;#O;#v;#m;#T;#x;#E;#F;#M;#R;#w=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#g.addObserver(this),u(this.#g,this.options)?this.#C():this.updateResult(),this.#P())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return c(this.#g,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return c(this.#g,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#D(),this.#I(),this.#g.removeObserver(this)}setOptions(e){let t=this.options,r=this.#g;if(this.options=this.#c.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,a.resolveEnabled)(this.options.enabled,this.#g))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#U(),this.#g.setOptions(this.options),t._defaulted&&!(0,a.shallowEqualObjects)(this.options,t)&&this.#c.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#g,observer:this});let i=this.hasListeners();i&&h(this.#g,r,this.options,t)&&this.#C(),this.updateResult(),i&&(this.#g!==r||(0,a.resolveEnabled)(this.options.enabled,this.#g)!==(0,a.resolveEnabled)(t.enabled,this.#g)||(0,a.resolveStaleTime)(this.options.staleTime,this.#g)!==(0,a.resolveStaleTime)(t.staleTime,this.#g))&&this.#j();let s=this.#_();i&&(this.#g!==r||(0,a.resolveEnabled)(this.options.enabled,this.#g)!==(0,a.resolveEnabled)(t.enabled,this.#g)||s!==this.#R)&&this.#Q(s)}getOptimisticResult(e){var t,r;let i=this.#c.getQueryCache().build(this.#c,e),s=this.createResult(i,e);return t=this,r=s,(0,a.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#b=s,this.#O=this.options,this.#S=this.#g.state),s}getCurrentResult(){return this.#b}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#v.status||this.#v.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#w.add(e)}getCurrentQuery(){return this.#g}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#c.defaultQueryOptions(e),r=this.#c.getQueryCache().build(this.#c,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#C({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#b))}#C(e){this.#U();let t=this.#g.fetch(this.options,e);return e?.throwOnError||(t=t.catch(a.noop)),t}#j(){this.#D();let e=(0,a.resolveStaleTime)(this.options.staleTime,this.#g);if(a.isServer||this.#b.isStale||!(0,a.isValidTimeout)(e))return;let t=(0,a.timeUntilStale)(this.#b.dataUpdatedAt,e);this.#F=o.timeoutManager.setTimeout(()=>{this.#b.isStale||this.updateResult()},t+1)}#_(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#g):this.options.refetchInterval)??!1}#Q(e){this.#I(),this.#R=e,!a.isServer&&!1!==(0,a.resolveEnabled)(this.options.enabled,this.#g)&&(0,a.isValidTimeout)(this.#R)&&0!==this.#R&&(this.#M=o.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||t.focusManager.isFocused())&&this.#C()},this.#R))}#P(){this.#j(),this.#Q(this.#_())}#D(){this.#F&&(o.timeoutManager.clearTimeout(this.#F),this.#F=void 0)}#I(){this.#M&&(o.timeoutManager.clearInterval(this.#M),this.#M=void 0)}createResult(e,t){let r,s=this.#g,o=this.options,l=this.#b,c=this.#S,f=this.#O,p=e!==s?e.state:this.#y,{state:m}=e,v={...m},g=!1;if(t._optimisticResults){let r=this.hasListeners(),n=!r&&u(e,t),a=r&&h(e,s,t,o);(n||a)&&(v={...v,...(0,i.fetchState)(m.data,e.options)}),"isRestoring"===t._optimisticResults&&(v.fetchStatus="idle")}let{error:y,errorUpdatedAt:b,status:S}=v;r=v.data;let O=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===S){let e;l?.isPlaceholderData&&t.placeholderData===f?.placeholderData?(e=l.data,O=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#E?.state.data,this.#E):t.placeholderData,void 0!==e&&(S="success",r=(0,a.replaceData)(l?.data,e,t),g=!0)}if(t.select&&void 0!==r&&!O)if(l&&r===c?.data&&t.select===this.#T)r=this.#x;else try{this.#T=t.select,r=t.select(r),r=(0,a.replaceData)(l?.data,r,t),this.#x=r,this.#m=null}catch(e){this.#m=e}this.#m&&(y=this.#m,r=this.#x,b=Date.now(),S="error");let T="fetching"===v.fetchStatus,x="pending"===S,E="error"===S,F=x&&T,M=void 0!==r,R={status:S,fetchStatus:v.fetchStatus,isPending:x,isSuccess:"success"===S,isError:E,isInitialLoading:F,isLoading:F,data:r,dataUpdatedAt:v.dataUpdatedAt,error:y,errorUpdatedAt:b,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>p.dataUpdateCount||v.errorUpdateCount>p.errorUpdateCount,isFetching:T,isRefetching:T&&!x,isLoadingError:E&&!M,isPaused:"paused"===v.fetchStatus,isPlaceholderData:g,isRefetchError:E&&M,isStale:d(e,t),refetch:this.refetch,promise:this.#v,isEnabled:!1!==(0,a.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==R.data,r="error"===R.status&&!t,i=e=>{r?e.reject(R.error):t&&e.resolve(R.data)},a=()=>{i(this.#v=R.promise=(0,n.pendingThenable)())},o=this.#v;switch(o.status){case"pending":e.queryHash===s.queryHash&&i(o);break;case"fulfilled":(r||R.data!==o.value)&&a();break;case"rejected":r&&R.error===o.reason||a()}}return R}updateResult(){let e=this.#b,t=this.createResult(this.#g,this.options);if(this.#S=this.#g.state,this.#O=this.options,void 0!==this.#S.data&&(this.#E=this.#g),(0,a.shallowEqualObjects)(t,e))return;this.#b=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#w.size)return!0;let i=new Set(r??this.#w);return this.options.throwOnError&&i.add("error"),Object.keys(this.#b).some(t=>this.#b[t]!==e[t]&&i.has(t))};this.#k({listeners:r()})}#U(){let e=this.#c.getQueryCache().build(this.#c,this.options);if(e===this.#g)return;let t=this.#g;this.#g=e,this.#y=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#P()}#k(e){r.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#b)}),this.#c.getQueryCache().notify({query:this.#g,type:"observerResultsUpdated"})})}};function u(e,t){return!1!==(0,a.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&c(e,t,t.refetchOnMount)}function c(e,t,r){if(!1!==(0,a.resolveEnabled)(t.enabled,e)&&"static"!==(0,a.resolveStaleTime)(t.staleTime,e)){let i="function"==typeof r?r(e):r;return"always"===i||!1!==i&&d(e,t)}return!1}function h(e,t,r,i){return(e!==t||!1===(0,a.resolveEnabled)(i.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&d(e,r)}function d(e,t){return!1!==(0,a.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,a.resolveStaleTime)(t.staleTime,e))}e.s(["QueryObserver",()=>l])},69637,54440,e=>{"use strict";let t;e.i(47167);var r=e.i(71645),i=e.i(19273),s=e.i(40143),n=e.i(12598);e.i(43476);var a=r.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),o=r.createContext(!1);o.Provider;var l=(e,t)=>void 0===t.state.data,u=e=>{if(e.suspense){let t=e=>"static"===e?e:Math.max(e??1e3,1e3),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>t(r(...e)):t(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}},c=(e,t)=>e.isLoading&&e.isFetching&&!t,h=(e,t)=>e?.suspense&&t.isPending,d=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function f(e,t,l){let f,p=r.useContext(o),m=r.useContext(a),v=(0,n.useQueryClient)(l),g=v.defaultQueryOptions(e);v.getDefaultOptions().queries?._experimental_beforeQuery?.(g);let y=v.getQueryCache().get(g.queryHash);g._optimisticResults=p?"isRestoring":"optimistic",u(g),f=y?.state.error&&"function"==typeof g.throwOnError?(0,i.shouldThrowError)(g.throwOnError,[y.state.error,y]):g.throwOnError,(g.suspense||g.experimental_prefetchInRender||f)&&!m.isReset()&&(g.retryOnMount=!1),r.useEffect(()=>{m.clearReset()},[m]);let b=!v.getQueryCache().get(g.queryHash),[S]=r.useState(()=>new t(v,g)),O=S.getOptimisticResult(g),T=!p&&!1!==e.subscribed;if(r.useSyncExternalStore(r.useCallback(e=>{let t=T?S.subscribe(s.notifyManager.batchCalls(e)):i.noop;return S.updateResult(),t},[S,T]),()=>S.getCurrentResult(),()=>S.getCurrentResult()),r.useEffect(()=>{S.setOptions(g)},[g,S]),h(g,O))throw d(g,S,m);if((({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(n&&void 0===e.data||(0,i.shouldThrowError)(r,[e.error,s])))({result:O,errorResetBoundary:m,throwOnError:g.throwOnError,query:y,suspense:g.suspense}))throw O.error;if(v.getDefaultOptions().queries?._experimental_afterQuery?.(g,O),g.experimental_prefetchInRender&&!i.isServer&&c(O,p)){let e=b?d(g,S,m):y?.promise;e?.catch(i.noop).finally(()=>{S.updateResult()})}return g.notifyOnChangeProps?O:S.trackResult(O)}e.s(["defaultThrowOnError",()=>l,"ensureSuspenseTimers",()=>u,"fetchOptimistic",()=>d,"shouldSuspend",()=>h,"willFetch",()=>c],54440),e.s(["useBaseQuery",()=>f],69637)},47071,99143,e=>{"use strict";var t=e.i(71645),r=e.i(90072),i=e.i(15080),s=e.i(40859);e.s(["useLoader",()=>s.G],99143);var s=s;let n=e=>e===Object(e)&&!Array.isArray(e)&&"function"!=typeof e;function a(e,a){let o=(0,i.useThree)(e=>e.gl),l=(0,s.G)(r.TextureLoader,n(e)?Object.values(e):e);return(0,t.useLayoutEffect)(()=>{null==a||a(l)},[a]),(0,t.useEffect)(()=>{if("initTexture"in o){let e=[];Array.isArray(l)?e=l:l instanceof r.Texture?e=[l]:n(l)&&(e=Object.values(l)),e.forEach(e=>{e instanceof r.Texture&&o.initTexture(e)})}},[o,l]),(0,t.useMemo)(()=>{if(!n(e))return l;{let t={},r=0;for(let i in e)t[i]=l[r++];return t}},[e,l])}a.preload=e=>s.G.preload(r.TextureLoader,e),a.clear=e=>s.G.clear(r.TextureLoader,e),e.s(["useTexture",()=>a],47071)},75567,56893,e=>{"use strict";var t=e.i(90072);let r=new t.ImageBitmapLoader,i=new Map;function s(e,s){let n=i.get(e);if(n)return s&&n.image&&s(n),n;let a=new t.Texture;return a.flipY=!1,i.set(e,a),r.load(e,e=>{a.image=e,a.needsUpdate=!0,s?.(a)}),a}function n(e){let s=i.get(e);return s?s.image?Promise.resolve(s):new Promise(e=>{let t=()=>{s.image?e(s):setTimeout(t,16)};t()}):new Promise((s,n)=>{let a=new t.Texture;a.flipY=!1,i.set(e,a),r.load(e,e=>{a.image=e,a.needsUpdate=!0,s(a)},void 0,n)})}function a(e,r={}){let{repeat:i=[1,1],disableMipmaps:s=!1,anisotropy:n}=r;return e.wrapS=e.wrapT=t.RepeatWrapping,e.colorSpace=t.SRGBColorSpace,e.repeat.set(...i),e.flipY=!1,e.anisotropy=n??1,s?(e.generateMipmaps=!1,e.minFilter=t.LinearFilter):(e.generateMipmaps=!0,e.minFilter=t.LinearMipmapLinearFilter),e.magFilter=t.LinearFilter,e.needsUpdate=!0,e}function o(e){let r=new t.DataTexture(e,256,256,t.RedFormat,t.UnsignedByteType);return r.colorSpace=t.NoColorSpace,r.wrapS=r.wrapT=t.RepeatWrapping,r.generateMipmaps=!1,r.minFilter=t.LinearFilter,r.magFilter=t.LinearFilter,r.needsUpdate=!0,r}e.s(["loadTexture",()=>s,"loadTextureAsync",()=>n,"setupMask",()=>o,"setupTexture",()=>a],75567);var l=e.i(15080);function u(){return(0,l.useThree)(c)}function c(e){return e.gl.capabilities.getMaxAnisotropy()}e.s(["useAnisotropy",()=>u],56893)},47021,e=>{"use strict";var t=e.i(8560);let r=`
-#ifdef USE_FOG
- // Check fog enabled uniform - allows toggling without shader recompilation
- #ifdef USE_VOLUMETRIC_FOG
- if (!fogEnabled) {
- // Skip all fog calculations when disabled
- } else {
- #endif
-
- float dist = vFogDepth;
-
- // Discard fragments at or beyond visible distance - matches Torque's behavior
- // where objects beyond visibleDistance are not rendered at all.
- // This prevents fully-fogged geometry from showing as silhouettes against
- // the sky's fog-to-sky gradient.
- if (dist >= fogFar) {
- discard;
- }
-
- // Step 1: Calculate distance-based haze (quadratic falloff)
- // Since we discard at fogFar, haze never reaches 1.0 here
- float haze = 0.0;
- if (dist > fogNear) {
- float fogScale = 1.0 / (fogFar - fogNear);
- float distFactor = (dist - fogNear) * fogScale - 1.0;
- haze = 1.0 - distFactor * distFactor;
- }
-
- // Step 2: Calculate fog volume contributions
- // Note: Per-volume colors are NOT used in Tribes 2 ($specialFog defaults to false)
- // All fog uses the global fogColor - see Tribes2_Fog_System.md for details
- float volumeFog = 0.0;
-
- #ifdef USE_VOLUMETRIC_FOG
- {
- #ifdef USE_FOG_WORLD_POSITION
- float fragmentHeight = vFogWorldPosition.y;
- #else
- float fragmentHeight = cameraHeight;
- #endif
-
- float deltaY = fragmentHeight - cameraHeight;
- float absDeltaY = abs(deltaY);
-
- // Determine if we're going up (positive) or down (negative)
- if (absDeltaY > 0.01) {
- // Non-horizontal ray: ray-march through fog volumes
- for (int i = 0; i < 3; i++) {
- int offset = i * 4;
- float volVisDist = fogVolumeData[offset + 0];
- float volMinH = fogVolumeData[offset + 1];
- float volMaxH = fogVolumeData[offset + 2];
- float volPct = fogVolumeData[offset + 3];
-
- // Skip inactive volumes (visibleDistance = 0)
- if (volVisDist <= 0.0) continue;
-
- // Calculate fog factor for this volume
- // From Torque: factor = (1 / (volumeVisDist * visFactor)) * percentage
- // where visFactor is smVisibleDistanceMod (a user quality pref, default 1.0)
- // Since we don't have quality settings, we use visFactor = 1.0
- float factor = (1.0 / volVisDist) * volPct;
-
- // Find ray intersection with this volume's height range
- float rayMinY = min(cameraHeight, fragmentHeight);
- float rayMaxY = max(cameraHeight, fragmentHeight);
-
- // Check if ray intersects volume height range
- if (rayMinY < volMaxH && rayMaxY > volMinH) {
- float intersectMin = max(rayMinY, volMinH);
- float intersectMax = min(rayMaxY, volMaxH);
- float intersectHeight = intersectMax - intersectMin;
-
- // Calculate distance traveled through this volume using similar triangles:
- // subDist / dist = intersectHeight / absDeltaY
- float subDist = dist * (intersectHeight / absDeltaY);
-
- // Accumulate fog: fog += subDist * factor
- volumeFog += subDist * factor;
- }
- }
- } else {
- // Near-horizontal ray: if camera is inside a volume, apply full fog for that volume
- for (int i = 0; i < 3; i++) {
- int offset = i * 4;
- float volVisDist = fogVolumeData[offset + 0];
- float volMinH = fogVolumeData[offset + 1];
- float volMaxH = fogVolumeData[offset + 2];
- float volPct = fogVolumeData[offset + 3];
-
- if (volVisDist <= 0.0) continue;
-
- // If camera is inside this volume, apply fog for full distance
- if (cameraHeight >= volMinH && cameraHeight <= volMaxH) {
- float factor = (1.0 / volVisDist) * volPct;
- volumeFog += dist * factor;
- }
- }
- }
- }
- #endif
-
- // Step 3: Combine haze and volume fog
- // Torque's clamping: if (bandPct + hazePct > 1) hazePct = 1 - bandPct
- // This gives fog volumes priority over haze
- float volPct = min(volumeFog, 1.0);
- float hazePct = haze;
- if (volPct + hazePct > 1.0) {
- hazePct = 1.0 - volPct;
- }
- float fogFactor = hazePct + volPct;
-
- // Apply fog using global fogColor (per-volume colors not used in Tribes 2)
- gl_FragColor.rgb = mix(gl_FragColor.rgb, fogColor, fogFactor);
-
- #ifdef USE_VOLUMETRIC_FOG
- } // end fogEnabled check
- #endif
-#endif
-`;function i(){t.ShaderChunk.fog_pars_fragment=`
-#ifdef USE_FOG
- uniform vec3 fogColor;
- varying float vFogDepth;
- #ifdef FOG_EXP2
- uniform float fogDensity;
- #else
- uniform float fogNear;
- uniform float fogFar;
- #endif
-
- // Custom volumetric fog uniforms (only defined when USE_VOLUMETRIC_FOG is set)
- // Format: [visDist, minH, maxH, percentage] x 3 volumes = 12 floats
- #ifdef USE_VOLUMETRIC_FOG
- uniform float fogVolumeData[12];
- uniform float cameraHeight;
- #endif
-
- #ifdef USE_FOG_WORLD_POSITION
- varying vec3 vFogWorldPosition;
- #endif
-#endif
-`,t.ShaderChunk.fog_fragment=r,t.ShaderChunk.fog_pars_vertex=`
-#ifdef USE_FOG
- varying float vFogDepth;
- #ifdef USE_FOG_WORLD_POSITION
- varying vec3 vFogWorldPosition;
- #endif
-#endif
-`,t.ShaderChunk.fog_vertex=`
-#ifdef USE_FOG
- // Use Euclidean distance from camera, not view-space z-depth
- // This ensures fog doesn't change when rotating the camera
- vFogDepth = length(mvPosition.xyz);
- #ifdef USE_FOG_WORLD_POSITION
- vFogWorldPosition = (modelMatrix * vec4(transformed, 1.0)).xyz;
- #endif
-#endif
-`}function s(e,t){e.uniforms.fogVolumeData=t.fogVolumeData,e.uniforms.cameraHeight=t.cameraHeight,e.uniforms.fogEnabled=t.fogEnabled,e.vertexShader=e.vertexShader.replace("#include ",`#include
-#ifdef USE_FOG
- #define USE_FOG_WORLD_POSITION
- #define USE_VOLUMETRIC_FOG
- varying vec3 vFogWorldPosition;
-#endif`),e.vertexShader=e.vertexShader.replace("#include ",`#include
-#ifdef USE_FOG
- vFogWorldPosition = (modelMatrix * vec4(transformed, 1.0)).xyz;
-#endif`),e.fragmentShader=e.fragmentShader.replace("#include ",`#include
-#ifdef USE_FOG
- #define USE_VOLUMETRIC_FOG
- uniform float fogVolumeData[12];
- uniform float cameraHeight;
- uniform bool fogEnabled;
- #define USE_FOG_WORLD_POSITION
- varying vec3 vFogWorldPosition;
-#endif`),e.fragmentShader=e.fragmentShader.replace("#include ",r)}e.s(["fogFragmentShader",0,r,"injectCustomFog",()=>s,"installCustomFogShader",()=>i])},48066,e=>{"use strict";let t={fogVolumeData:{value:new Float32Array(12)},cameraHeight:{value:0},fogEnabled:{value:!0}};function r(e,i,s=!0){t.cameraHeight.value=e,t.fogVolumeData.value.set(i),t.fogEnabled.value=s}function i(){t.cameraHeight.value=0,t.fogVolumeData.value.fill(0),t.fogEnabled.value=!0}function s(e){let t=new Float32Array(12);for(let r=0;r<3;r++){let i=4*r,s=e[r];s&&(t[i+0]=s.visibleDistance,t[i+1]=s.minHeight,t[i+2]=s.maxHeight,t[i+3]=s.percentage)}return t}e.s(["globalFogUniforms",0,t,"packFogVolumeData",()=>s,"resetGlobalFogUniforms",()=>i,"updateGlobalFogUniforms",()=>r])}]);
\ No newline at end of file
diff --git a/docs/_next/static/chunks/5dae6153cf1240b6.js b/docs/_next/static/chunks/5dae6153cf1240b6.js
new file mode 100644
index 00000000..8eb23b1e
--- /dev/null
+++ b/docs/_next/static/chunks/5dae6153cf1240b6.js
@@ -0,0 +1,211 @@
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67191,e=>{e.v({Label:"FloatingLabel-module__8y09Ka__Label"})},89887,e=>{"use strict";var t=e.i(43476),r=e.i(932),i=e.i(71645),s=e.i(90072),n=e.i(71753),a=e.i(60099),o=e.i(67191);let l=[0,0,0],u=new s.Vector3,c=(0,i.memo)(function(e){let s,c,h,d=(0,r.c)(11),{children:f,color:p,position:m,opacity:v}=e,g=void 0===p?"white":p,y=void 0===m?l:m,b=void 0===v?"fadeWithDistance":v,S="fadeWithDistance"===b,O=(0,i.useRef)(null),[T,x]=(0,i.useState)(0!==b),E=(0,i.useRef)(null);return d[0]!==S||d[1]!==T||d[2]!==b?(s=e=>{var t,r,i;let s,{camera:n}=e,a=O.current;if(!a)return;a.getWorldPosition(u);let o=(t=u.x,r=u.y,i=u.z,-((t-(s=n.matrixWorld.elements)[12])*s[8])+-((r-s[13])*s[9])+-((i-s[14])*s[10])<0);if(S){let e=o?1/0:n.position.distanceTo(u),t=e<200;if(T!==t&&x(t),E.current&&t){let t=Math.max(0,Math.min(1,1-e/200));E.current.style.opacity=t.toString()}}else{let e=!o&&0!==b;T!==e&&x(e),E.current&&(E.current.style.opacity=b.toString())}},d[0]=S,d[1]=T,d[2]=b,d[3]=s):s=d[3],(0,n.useFrame)(s),d[4]!==f||d[5]!==g||d[6]!==T||d[7]!==y?(c=T?(0,t.jsx)(a.Html,{position:y,center:!0,children:(0,t.jsx)("div",{ref:E,className:o.default.Label,style:{color:g},children:f})}):null,d[4]=f,d[5]=g,d[6]=T,d[7]=y,d[8]=c):c=d[8],d[9]!==c?(h=(0,t.jsx)("group",{ref:O,children:c}),d[9]=c,d[10]=h):h=d[10],h});e.s(["FloatingLabel",0,c])},60099,e=>{"use strict";let t,r;var i=e.i(31067),s=e.i(71645),n=e.i(88014),a=e.i(90072),o=e.i(15080),l=e.i(71753);let u=new a.Vector3,c=new a.Vector3,h=new a.Vector3,d=new a.Vector2;function f(e,t,r){let i=u.setFromMatrixPosition(e.matrixWorld);i.project(t);let s=r.width/2,n=r.height/2;return[i.x*s+s,-(i.y*n)+n]}let p=e=>1e-10>Math.abs(e)?0:e;function m(e,t,r=""){let i="matrix3d(";for(let r=0;16!==r;r++)i+=p(t[r]*e.elements[r])+(15!==r?",":")");return r+i}let v=(t=[1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1],e=>m(e,t)),g=(r=e=>[1/e,1/e,1/e,1,-1/e,-1/e,-1/e,-1,1/e,1/e,1/e,1,1,1,1,1],(e,t)=>m(e,r(t),"translate(-50%,-50%)")),y=s.forwardRef(({children:e,eps:t=.001,style:r,className:m,prepend:y,center:b,fullscreen:S,portal:O,distanceFactor:T,sprite:x=!1,transform:E=!1,occlude:F,onOcclude:M,castShadow:R,receiveShadow:w,material:C,geometry:P,zIndexRange:D=[0x1000037,0],calculatePosition:I=f,as:U="div",wrapperClass:j,pointerEvents:_="auto",...Q},k)=>{let{gl:L,camera:q,scene:A,size:H,raycaster:V,events:W,viewport:z}=(0,o.useThree)(),[G]=s.useState(()=>document.createElement(U)),N=s.useRef(null),$=s.useRef(null),K=s.useRef(0),Y=s.useRef([0,0]),B=s.useRef(null),J=s.useRef(null),Z=(null==O?void 0:O.current)||W.connected||L.domElement.parentNode,X=s.useRef(null),ee=s.useRef(!1),et=s.useMemo(()=>{var e;return F&&"blending"!==F||Array.isArray(F)&&F.length&&(e=F[0])&&"object"==typeof e&&"current"in e},[F]);s.useLayoutEffect(()=>{let e=L.domElement;F&&"blending"===F?(e.style.zIndex=`${Math.floor(D[0]/2)}`,e.style.position="absolute",e.style.pointerEvents="none"):(e.style.zIndex=null,e.style.position=null,e.style.pointerEvents=null)},[F]),s.useLayoutEffect(()=>{if($.current){let e=N.current=n.createRoot(G);if(A.updateMatrixWorld(),E)G.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{let e=I($.current,q,H);G.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${e[0]}px,${e[1]}px,0);transform-origin:0 0;`}return Z&&(y?Z.prepend(G):Z.appendChild(G)),()=>{Z&&Z.removeChild(G),e.unmount()}}},[Z,E]),s.useLayoutEffect(()=>{j&&(G.className=j)},[j]);let er=s.useMemo(()=>E?{position:"absolute",top:0,left:0,width:H.width,height:H.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:b?"translate3d(-50%,-50%,0)":"none",...S&&{top:-H.height/2,left:-H.width/2,width:H.width,height:H.height},...r},[r,b,S,H,E]),ei=s.useMemo(()=>({position:"absolute",pointerEvents:_}),[_]);s.useLayoutEffect(()=>{var t,i;ee.current=!1,E?null==(t=N.current)||t.render(s.createElement("div",{ref:B,style:er},s.createElement("div",{ref:J,style:ei},s.createElement("div",{ref:k,className:m,style:r,children:e})))):null==(i=N.current)||i.render(s.createElement("div",{ref:k,style:er,className:m,children:e}))});let es=s.useRef(!0);(0,l.useFrame)(e=>{if($.current){q.updateMatrixWorld(),$.current.updateWorldMatrix(!0,!1);let e=E?Y.current:I($.current,q,H);if(E||Math.abs(K.current-q.zoom)>t||Math.abs(Y.current[0]-e[0])>t||Math.abs(Y.current[1]-e[1])>t){var r;let t,i,s,n,o=(r=$.current,t=u.setFromMatrixPosition(r.matrixWorld),i=c.setFromMatrixPosition(q.matrixWorld),s=t.sub(i),n=q.getWorldDirection(h),s.angleTo(n)>Math.PI/2),l=!1;et&&(Array.isArray(F)?l=F.map(e=>e.current):"blending"!==F&&(l=[A]));let f=es.current;l?es.current=function(e,t,r,i){let s=u.setFromMatrixPosition(e.matrixWorld),n=s.clone();n.project(t),d.set(n.x,n.y),r.setFromCamera(d,t);let a=r.intersectObjects(i,!0);if(a.length){let e=a[0].distance;return s.distanceTo(r.ray.origin)({vertexShader:E?void 0:`
+ /*
+ This shader is from the THREE's SpriteMaterial.
+ We need to turn the backing plane into a Sprite
+ (make it always face the camera) if "transfrom"
+ is false.
+ */
+ #include
+
+ void main() {
+ vec2 center = vec2(0., 1.);
+ float rotation = 0.0;
+
+ // This is somewhat arbitrary, but it seems to work well
+ // Need to figure out how to derive this dynamically if it even matters
+ float size = 0.03;
+
+ vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );
+ vec2 scale;
+ scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );
+ scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );
+
+ bool isPerspective = isPerspectiveMatrix( projectionMatrix );
+ if ( isPerspective ) scale *= - mvPosition.z;
+
+ vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size;
+ vec2 rotatedPosition;
+ rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
+ rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
+ mvPosition.xy += rotatedPosition;
+
+ gl_Position = projectionMatrix * mvPosition;
+ }
+ `,fragmentShader:`
+ void main() {
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
+ }
+ `}),[E]);return s.createElement("group",(0,i.default)({},Q,{ref:$}),F&&!et&&s.createElement("mesh",{castShadow:R,receiveShadow:w,ref:X},P||s.createElement("planeGeometry",null),C||s.createElement("shaderMaterial",{side:a.DoubleSide,vertexShader:en.vertexShader,fragmentShader:en.fragmentShader})))});e.s(["Html",()=>y])},79123,38847,74657,21025,e=>{"use strict";var t=e.i(43476),r=e.i(71645),i=e.i(932),s=e.i(80902),n=e.i(22289);function a(e,t,r){try{return e(t)}catch(e){return(0,n.l)("[nuqs] Error while parsing value `%s`: %O"+(r?" (for key `%s`)":""),t,e,r),null}}function o(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),a(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}}}}let l=o({parse:e=>e,serialize:String});o({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)}),o({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)}),o({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}}),o({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String});let u=o({parse:e=>"true"===e.toLowerCase(),serialize:String});function c(e,t){return e.valueOf()===t.valueOf()}o({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:c}),o({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:c}),o({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:c});let h=(0,s.r)(),d={};function f(e,t,r,i,n,o){let l=!1,u=Object.entries(e).reduce((e,[u,c])=>{var h;let d=t?.[u]??u,f=i[d],p="multi"===c.type?[]:null,m=void 0===f?("multi"===c.type?r?.getAll(d):r?.get(d))??p:f;return n&&o&&((h=n[d]??p)===m||null!==h&&null!==m&&"string"!=typeof h&&"string"!=typeof m&&h.length===m.length&&h.every((e,t)=>e===m[t]))?e[u]=o[u]??null:(l=!0,e[u]=((0,s.i)(m)?null:a(c.parse,m,d))??null,n&&(n[d]=m)),e},{});if(!l){let t=Object.keys(e),r=Object.keys(o??{});l=t.length!==r.length||t.some(e=>!r.includes(e))}return{state:u,hasChanged:l}}function p(e,t){return Object.fromEntries(Object.keys(e).map(r=>[r,e[r]??t[r]??null]))}function m(e,t={}){let{parse:i,type:a,serialize:o,eq:l,defaultValue:u,...c}=t,[{[e]:v},g]=function(e,t={}){let i=(0,r.useId)(),a=(0,n.i)(),o=(0,n.a)(),{history:l="replace",scroll:u=a?.scroll??!1,shallow:c=a?.shallow??!0,throttleMs:m=s.s.timeMs,limitUrlUpdates:v=a?.limitUrlUpdates,clearOnDefault:g=a?.clearOnDefault??!0,startTransition:y,urlKeys:b=d}=t,S=Object.keys(e).join(","),O=(0,r.useMemo)(()=>Object.fromEntries(Object.keys(e).map(e=>[e,b[e]??e])),[S,JSON.stringify(b)]),T=(0,n.r)(Object.values(O)),x=T.searchParams,E=(0,r.useRef)({}),F=(0,r.useMemo)(()=>Object.fromEntries(Object.keys(e).map(t=>[t,e[t].defaultValue??null])),[Object.values(e).map(({defaultValue:e})=>e).join(",")]),M=s.t.useQueuedQueries(Object.values(O)),[R,w]=(0,r.useState)(()=>f(e,b,x??new URLSearchParams,M).state),C=(0,r.useRef)(R);if((0,n.c)("[nuq+ %s `%s`] render - state: %O, iSP: %s",i,S,R,x),Object.keys(E.current).join("&")!==Object.values(O).join("&")){let{state:t,hasChanged:r}=f(e,b,x,M,E.current,C.current);r&&((0,n.c)("[nuq+ %s `%s`] State changed: %O",i,S,{state:t,initialSearchParams:x,queuedQueries:M,queryRef:E.current,stateRef:C.current}),C.current=t,w(t)),E.current=Object.fromEntries(Object.entries(O).map(([t,r])=>[r,e[t]?.type==="multi"?x?.getAll(r):x?.get(r)??null]))}(0,r.useEffect)(()=>{let{state:t,hasChanged:r}=f(e,b,x,M,E.current,C.current);r&&((0,n.c)("[nuq+ %s `%s`] State changed: %O",i,S,{state:t,initialSearchParams:x,queuedQueries:M,queryRef:E.current,stateRef:C.current}),C.current=t,w(t))},[Object.values(O).map(e=>`${e}=${x?.getAll(e)}`).join("&"),JSON.stringify(M)]),(0,r.useEffect)(()=>{let t=Object.keys(e).reduce((t,r)=>(t[r]=({state:t,query:s})=>{w(a=>{let{defaultValue:o}=e[r],l=O[r],u=t??o??null;return Object.is(a[r]??o??null,u)?((0,n.c)("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",i,S,l,t,o,C.current),a):(C.current={...C.current,[r]:u},E.current[l]=s,(0,n.c)("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",i,S,l,t,o,C.current),C.current)})},t),{});for(let r of Object.keys(e)){let e=O[r];(0,n.c)("[nuq+ %s `%s`] Subscribing to sync for `%s`",i,e,S),h.on(e,t[r])}return()=>{for(let r of Object.keys(e)){let e=O[r];(0,n.c)("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",i,e,S),h.off(e,t[r])}}},[S,O]);let P=(0,r.useCallback)((t,r={})=>{let a,d=Object.fromEntries(Object.keys(e).map(e=>[e,null])),f="function"==typeof t?t(p(C.current,F))??d:t??d;(0,n.c)("[nuq+ %s `%s`] setState: %O",i,S,f);let b=0,x=!1,E=[];for(let[t,i]of Object.entries(f)){let d=e[t],f=O[t];if(!d||void 0===i)continue;(r.clearOnDefault??d.clearOnDefault??g)&&null!==i&&void 0!==d.defaultValue&&(d.eq??((e,t)=>e===t))(i,d.defaultValue)&&(i=null);let p=null===i?null:(d.serialize??String)(i);h.emit(f,{state:i,query:p});let S={key:f,query:p,options:{history:r.history??d.history??l,shallow:r.shallow??d.shallow??c,scroll:r.scroll??d.scroll??u,startTransition:r.startTransition??d.startTransition??y}};if(r?.limitUrlUpdates?.method==="debounce"||v?.method==="debounce"||d.limitUrlUpdates?.method==="debounce"){!0===S.options.shallow&&console.warn((0,n.s)(422));let e=r?.limitUrlUpdates?.timeMs??v?.timeMs??d.limitUrlUpdates?.timeMs??s.s.timeMs,t=s.t.push(S,e,T,o);bt(e),x?s.n.flush(T,o):s.n.getPendingPromise(T));return a??M},[S,l,c,u,m,v?.method,v?.timeMs,y,O,T.updateUrl,T.getSearchParamsSnapshot,T.rateLimitFactor,o,F]);return[(0,r.useMemo)(()=>p(R,F),[R,F]),P]}({[e]:{parse:i??(e=>e),type:a,serialize:o,eq:l,defaultValue:u}},c);return[v,(0,r.useCallback)((t,r={})=>g(r=>({[e]:"function"==typeof t?t(r[e]):t}),r),[e,g])]}e.s(["createParser",()=>o,"parseAsBoolean",()=>u,"parseAsString",()=>l,"useQueryState",()=>m],38847);var v=e.i(91996);let g=o({parse(e){let[t,r]=e.split("~"),i=r,s=(0,v.getMissionInfo)(t).missionTypes;return r&&s.includes(r)||(i=s[0]),{missionName:t,missionType:i}},serialize({missionName:e,missionType:t}){let r=(0,v.getMissionInfo)(e).missionTypes;return t&&1!==r.length?`${e}~${t}`:e},eq:(e,t)=>e.missionName===t.missionName&&e.missionType===t.missionType}).withDefault({missionName:"RiverDance",missionType:"CTF"});function y(){let e,t=(0,i.c)(3),[r,s]=m("mission",g);return t[0]!==r||t[1]!==s?(e=[r,s],t[0]=r,t[1]=s,t[2]=e):e=t[2],e}function b(){let e,t=(0,i.c)(3),[r,s]=m("fog",u);return t[0]!==r||t[1]!==s?(e=[r,s],t[0]=r,t[1]=s,t[2]=e):e=t[2],e}e.s(["useFogQueryState",()=>b,"useMissionQueryState",()=>y],74657);let S="(pointer: coarse)",O=()=>null;function T(e){let t=window.matchMedia(S);return t.addEventListener("change",e),()=>{t.removeEventListener("change",e)}}function x(){return window.matchMedia(S).matches}function E(){return(0,r.useSyncExternalStore)(T,x,O)}e.s(["useTouchDevice",()=>E],21025);let F=1/8e3,M=(0,r.createContext)(null),R=(0,r.createContext)(null),w=(0,r.createContext)(null);function C(){return(0,r.useContext)(M)}function P(){return(0,r.useContext)(R)}function D(){return(0,r.useContext)(w)}function I({children:e}){let[i,s]=(0,r.useState)(!0),[n,a]=(0,r.useState)(!1),[o,l]=(0,r.useState)(.15),[u,c]=(0,r.useState)(.002),[h,d]=(0,r.useState)(90),[f,p]=(0,r.useState)(!1),[m,v]=(0,r.useState)(.75),[g,y]=(0,r.useState)(!0),[S,O]=(0,r.useState)(!1),[T,x]=(0,r.useState)("moveLookStick"),[C,P]=(0,r.useState)("MapGenius"),[D,I]=(0,r.useState)(!1),[U,j]=(0,r.useState)(!1),[_,Q]=(0,r.useState)(!1),[k,L]=(0,r.useState)(!1),[q,A]=(0,r.useState)(!1),[H,V]=b(),W=(0,r.useCallback)(()=>{V(null)},[V]),z=(0,r.useCallback)(e=>{s(e),W()},[W]),G=(0,r.useMemo)(()=>({fogEnabled:H??i,setFogEnabled:z,clearFogEnabledOverride:W,highQualityFog:n,setHighQualityFog:a,fov:h,setFov:d,audioEnabled:f,setAudioEnabled:p,animationEnabled:g,setAnimationEnabled:y,warriorName:C,setWarriorName:P,audioVolume:m,setAudioVolume:v,sidebarOpen:k,setSidebarOpen:L}),[i,H,z,W,n,h,f,g,C,m,k]),N=(0,r.useMemo)(()=>({debugMode:S,setDebugMode:O,renderOnDemand:q,setRenderOnDemand:A}),[S,O,q]),$=(0,r.useMemo)(()=>({speedMultiplier:o,setSpeedMultiplier:l,mouseSensitivity:u,setMouseSensitivity:c,touchMode:T,setTouchMode:x,invertScroll:D,setInvertScroll:I,invertDrag:U,setInvertDrag:j,invertJoystick:_,setInvertJoystick:Q}),[o,l,u,T,x,D,U,_]),K=E();(0,r.useEffect)(()=>{if(null==K)return;let e={};try{e=JSON.parse(localStorage.getItem("settings"))||{}}catch(e){}null!=e.debugMode&&O(e.debugMode),null!=e.audioEnabled&&p(e.audioEnabled),null!=e.animationEnabled&&y(e.animationEnabled),null!=e.fogEnabled&&s(e.fogEnabled),null!=e.highQualityFog&&a(e.highQualityFog),null!=e.speedMultiplier&&l(Math.max(.01,Math.min(1,e.speedMultiplier))),null!=e.mouseSensitivity&&c(Math.max(F,Math.min(.008,e.mouseSensitivity))),null!=e.fov&&d(e.fov),null!=e.touchMode&&x(e.touchMode),null!=e.warriorName&&P(e.warriorName),null!=e.audioVolume&&v(e.audioVolume),null!=e.invertScroll&&I(e.invertScroll),null!=e.invertDrag&&j(e.invertDrag),null!=e.invertJoystick&&Q(e.invertJoystick),null==e.sidebarOpen||K||L(e.sidebarOpen)},[K]);let Y=(0,r.useRef)(null);return(0,r.useEffect)(()=>(Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>{try{localStorage.setItem("settings",JSON.stringify({fogEnabled:i,highQualityFog:n,speedMultiplier:o,mouseSensitivity:u,fov:h,audioEnabled:f,animationEnabled:g,debugMode:S,touchMode:T,warriorName:C,audioVolume:m,invertScroll:D,invertDrag:U,invertJoystick:_,sidebarOpen:k}))}catch(e){}},500),()=>{Y.current&&clearTimeout(Y.current)}),[i,n,o,u,h,f,g,S,T,C,m,D,U,_,k]),(0,t.jsx)(M.Provider,{value:G,children:(0,t.jsx)(R.Provider,{value:N,children:(0,t.jsx)(w.Provider,{value:$,children:e})})})}e.s(["MAX_SPEED_MULTIPLIER",0,1,"MIN_SPEED_MULTIPLIER",0,.01,"SettingsProvider",()=>I,"useControls",()=>D,"useDebug",()=>P,"useSettings",()=>C],79123)},31067,e=>{"use strict";function t(){return(t=Object.assign.bind()).apply(null,arguments)}e.s(["default",()=>t])},19273,80166,e=>{"use strict";e.i(47167);var t={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},r=new class{#e=t;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function i(e){setTimeout(e,0)}e.s(["systemSetTimeoutZero",()=>i,"timeoutManager",()=>r],80166);var s="u"=0&&e!==1/0}function l(e,t){return Math.max(e+(t||0)-Date.now(),0)}function u(e,t){return"function"==typeof e?e(t):e}function c(e,t){return"function"==typeof e?e(t):e}function h(e,t){let{type:r="all",exact:i,fetchStatus:s,predicate:n,queryKey:a,stale:o}=e;if(a){if(i){if(t.queryHash!==f(a,t.options))return!1}else if(!m(t.queryKey,a))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&(!s||s===t.state.fetchStatus)&&(!n||!!n(t))}function d(e,t){let{exact:r,status:i,predicate:s,mutationKey:n}=e;if(n){if(!t.options.mutationKey)return!1;if(r){if(p(t.options.mutationKey)!==p(n))return!1}else if(!m(t.options.mutationKey,n))return!1}return(!i||t.state.status===i)&&(!s||!!s(t))}function f(e,t){return(t?.queryKeyHashFn||p)(e)}function p(e){return JSON.stringify(e,(e,t)=>b(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function m(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(r=>m(e[r],t[r]))}var v=Object.prototype.hasOwnProperty;function g(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function y(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function b(e){if(!S(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!S(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function S(e){return"[object Object]"===Object.prototype.toString.call(e)}function O(e){return new Promise(t=>{r.setTimeout(t,e)})}function T(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?function e(t,r,i=0){if(t===r)return t;if(i>500)return r;let s=y(t)&&y(r);if(!s&&!(b(t)&&b(r)))return r;let n=(s?t:Object.keys(t)).length,a=s?r:Object.keys(r),o=a.length,l=s?Array(o):{},u=0;for(let c=0;cr?i.slice(1):i}function E(e,t,r=0){let i=[t,...e];return r&&i.length>r?i.slice(0,-1):i}var F=Symbol();function M(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==F?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}function R(e,t){return"function"==typeof e?e(...t):!!e}function w(e,t,r){let i,s=!1;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),s||(s=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}e.s(["addConsumeAwareSignal",()=>w,"addToEnd",()=>x,"addToStart",()=>E,"ensureQueryFn",()=>M,"functionalUpdate",()=>a,"hashKey",()=>p,"hashQueryKeyByOptions",()=>f,"isServer",()=>s,"isValidTimeout",()=>o,"matchMutation",()=>d,"matchQuery",()=>h,"noop",()=>n,"partialMatchKey",()=>m,"replaceData",()=>T,"resolveEnabled",()=>c,"resolveStaleTime",()=>u,"shallowEqualObjects",()=>g,"shouldThrowError",()=>R,"skipToken",()=>F,"sleep",()=>O,"timeUntilStale",()=>l],19273)},40143,e=>{"use strict";let t,r,i,s,n,a;var o=e.i(80166).systemSetTimeoutZero,l=(t=[],r=0,i=e=>{e()},s=e=>{e()},n=o,{batch:e=>{let a;r++;try{a=e()}finally{let e;--r||(e=t,t=[],e.length&&n(()=>{s(()=>{e.forEach(e=>{i(e)})})}))}return a},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a=e=>{r?t.push(e):n(()=>{i(e)})},setNotifyFunction:e=>{i=e},setBatchNotifyFunction:e=>{s=e},setScheduler:e=>{n=e}});e.s(["notifyManager",()=>l])},15823,e=>{"use strict";var t=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};e.s(["Subscribable",()=>t])},75555,e=>{"use strict";var t=e.i(15823),r=e.i(19273),i=new class extends t.Subscribable{#r;#i;#s;constructor(){super(),this.#s=e=>{if(!r.isServer&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#i||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#i?.(),this.#i=void 0)}setEventListener(e){this.#s=e,this.#i?.(),this.#i=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#r!==e&&(this.#r=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#r?this.#r:globalThis.document?.visibilityState!=="hidden"}};e.s(["focusManager",()=>i])},86491,14448,93803,36553,88587,e=>{"use strict";e.i(47167);var t=e.i(19273),r=e.i(40143),i=e.i(75555),s=e.i(15823),n=new class extends s.Subscribable{#n=!0;#i;#s;constructor(){super(),this.#s=e=>{if(!t.isServer&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#i||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#i?.(),this.#i=void 0)}setEventListener(e){this.#s=e,this.#i?.(),this.#i=e(this.setOnline.bind(this))}setOnline(e){this.#n!==e&&(this.#n=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#n}};function a(){let e,t,r=new Promise((r,i)=>{e=r,t=i});function i(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{i({status:"fulfilled",value:t}),e(t)},r.reject=e=>{i({status:"rejected",reason:e}),t(e)},r}function o(e){return Math.min(1e3*2**e,3e4)}function l(e){return(e??"online")!=="online"||n.isOnline()}e.s(["onlineManager",()=>n],14448),e.s(["pendingThenable",()=>a],93803);var u=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function c(e){let r,s=!1,c=0,h=a(),d=()=>i.focusManager.isFocused()&&("always"===e.networkMode||n.isOnline())&&e.canRun(),f=()=>l(e.networkMode)&&e.canRun(),p=e=>{"pending"===h.status&&(r?.(),h.resolve(e))},m=e=>{"pending"===h.status&&(r?.(),h.reject(e))},v=()=>new Promise(t=>{r=e=>{("pending"!==h.status||d())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,"pending"===h.status&&e.onContinue?.()}),g=()=>{let r;if("pending"!==h.status)return;let i=0===c?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(p).catch(r=>{if("pending"!==h.status)return;let i=e.retry??3*!t.isServer,n=e.retryDelay??o,a="function"==typeof n?n(c,r):n,l=!0===i||"number"==typeof i&&cd()?void 0:v()).then(()=>{s?m(r):g()}))})};return{promise:h,status:()=>h.status,cancel:t=>{if("pending"===h.status){let r=new u(t);m(r),e.onCancel?.(r)}},continue:()=>(r?.(),h),cancelRetry:()=>{s=!0},continueRetry:()=>{s=!1},canStart:f,start:()=>(f()?g():v().then(g),h)}}e.s(["CancelledError",()=>u,"canFetch",()=>l,"createRetryer",()=>c],36553);var h=e.i(80166),d=class{#a;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,t.isValidTimeout)(this.gcTime)&&(this.#a=h.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(t.isServer?1/0:3e5))}clearGcTimeout(){this.#a&&(h.timeoutManager.clearTimeout(this.#a),this.#a=void 0)}};e.s(["Removable",()=>d],88587);var f=class extends d{#o;#l;#u;#c;#h;#d;#f;constructor(e){super(),this.#f=!1,this.#d=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#c=e.client,this.#u=this.#c.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#o=v(this.options),this.state=e.state??this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#h?.promise}setOptions(e){if(this.options={...this.#d,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=v(this.options);void 0!==e.data&&(this.setState(m(e.data,e.dataUpdatedAt)),this.#o=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#u.remove(this)}setData(e,r){let i=(0,t.replaceData)(this.state.data,e,this.options);return this.#p({data:i,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),i}setState(e,t){this.#p({type:"setState",state:e,setStateOptions:t})}cancel(e){let r=this.#h?.promise;return this.#h?.cancel(e),r?r.then(t.noop).catch(t.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#o)}isActive(){return this.observers.some(e=>!1!==(0,t.resolveEnabled)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===t.skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,t.resolveStaleTime)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,t.timeUntilStale)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#u.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#h&&(this.#f?this.#h.cancel({revert:!0}):this.#h.cancelRetry()),this.scheduleGc()),this.#u.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#p({type:"invalidate"})}async fetch(e,r){let i;if("idle"!==this.state.fetchStatus&&this.#h?.status()!=="rejected"){if(void 0!==this.state.data&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#h)return this.#h.continueRetry(),this.#h.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let s=new AbortController,n=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#f=!0,s.signal)})},a=()=>{let e,i=(0,t.ensureQueryFn)(this.options,r),s=(n(e={client:this.#c,queryKey:this.queryKey,meta:this.meta}),e);return(this.#f=!1,this.options.persister)?this.options.persister(i,s,this):i(s)},o=(n(i={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:a}),i);this.options.behavior?.onFetch(o,this),this.#l=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#p({type:"fetch",meta:o.fetchOptions?.meta}),this.#h=c({initialPromise:r?.initialPromise,fn:o.fetchFn,onCancel:e=>{e instanceof u&&e.revert&&this.setState({...this.#l,fetchStatus:"idle"}),s.abort()},onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:()=>{this.#p({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{let e=await this.#h.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#u.config.onSuccess?.(e,this),this.#u.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof u){if(e.silent)return this.#h.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#p({type:"error",error:e}),this.#u.config.onError?.(e,this),this.#u.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#p(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...p(t.data,this.options),fetchMeta:e.meta??null};case"success":let r={...t,...m(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#l=e.manual?r:void 0,r;case"error":let i=e.error;return{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),r.notifyManager.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#u.notify({query:this,type:"updated",action:e})})}};function p(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:l(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function m(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function v(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,i=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}e.s(["Query",()=>f,"fetchState",()=>p],86491)},12598,e=>{"use strict";var t=e.i(71645),r=e.i(43476),i=t.createContext(void 0),s=e=>{let r=t.useContext(i);if(e)return e;if(!r)throw Error("No QueryClient set, use QueryClientProvider to set one");return r},n=({client:e,children:s})=>(t.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,r.jsx)(i.Provider,{value:e,children:s}));e.s(["QueryClientProvider",()=>n,"useQueryClient",()=>s])},69230,e=>{"use strict";var t=e.i(75555),r=e.i(40143),i=e.i(86491),s=e.i(15823),n=e.i(93803),a=e.i(19273),o=e.i(80166),l=class extends s.Subscribable{constructor(e,t){super(),this.options=t,this.#c=e,this.#m=null,this.#v=(0,n.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#c;#g=void 0;#y=void 0;#b=void 0;#S;#O;#v;#m;#T;#x;#E;#F;#M;#R;#w=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#g.addObserver(this),u(this.#g,this.options)?this.#C():this.updateResult(),this.#P())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return c(this.#g,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return c(this.#g,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#D(),this.#I(),this.#g.removeObserver(this)}setOptions(e){let t=this.options,r=this.#g;if(this.options=this.#c.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,a.resolveEnabled)(this.options.enabled,this.#g))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#U(),this.#g.setOptions(this.options),t._defaulted&&!(0,a.shallowEqualObjects)(this.options,t)&&this.#c.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#g,observer:this});let i=this.hasListeners();i&&h(this.#g,r,this.options,t)&&this.#C(),this.updateResult(),i&&(this.#g!==r||(0,a.resolveEnabled)(this.options.enabled,this.#g)!==(0,a.resolveEnabled)(t.enabled,this.#g)||(0,a.resolveStaleTime)(this.options.staleTime,this.#g)!==(0,a.resolveStaleTime)(t.staleTime,this.#g))&&this.#j();let s=this.#_();i&&(this.#g!==r||(0,a.resolveEnabled)(this.options.enabled,this.#g)!==(0,a.resolveEnabled)(t.enabled,this.#g)||s!==this.#R)&&this.#Q(s)}getOptimisticResult(e){var t,r;let i=this.#c.getQueryCache().build(this.#c,e),s=this.createResult(i,e);return t=this,r=s,(0,a.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#b=s,this.#O=this.options,this.#S=this.#g.state),s}getCurrentResult(){return this.#b}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#v.status||this.#v.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#w.add(e)}getCurrentQuery(){return this.#g}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#c.defaultQueryOptions(e),r=this.#c.getQueryCache().build(this.#c,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#C({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#b))}#C(e){this.#U();let t=this.#g.fetch(this.options,e);return e?.throwOnError||(t=t.catch(a.noop)),t}#j(){this.#D();let e=(0,a.resolveStaleTime)(this.options.staleTime,this.#g);if(a.isServer||this.#b.isStale||!(0,a.isValidTimeout)(e))return;let t=(0,a.timeUntilStale)(this.#b.dataUpdatedAt,e);this.#F=o.timeoutManager.setTimeout(()=>{this.#b.isStale||this.updateResult()},t+1)}#_(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#g):this.options.refetchInterval)??!1}#Q(e){this.#I(),this.#R=e,!a.isServer&&!1!==(0,a.resolveEnabled)(this.options.enabled,this.#g)&&(0,a.isValidTimeout)(this.#R)&&0!==this.#R&&(this.#M=o.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||t.focusManager.isFocused())&&this.#C()},this.#R))}#P(){this.#j(),this.#Q(this.#_())}#D(){this.#F&&(o.timeoutManager.clearTimeout(this.#F),this.#F=void 0)}#I(){this.#M&&(o.timeoutManager.clearInterval(this.#M),this.#M=void 0)}createResult(e,t){let r,s=this.#g,o=this.options,l=this.#b,c=this.#S,f=this.#O,p=e!==s?e.state:this.#y,{state:m}=e,v={...m},g=!1;if(t._optimisticResults){let r=this.hasListeners(),n=!r&&u(e,t),a=r&&h(e,s,t,o);(n||a)&&(v={...v,...(0,i.fetchState)(m.data,e.options)}),"isRestoring"===t._optimisticResults&&(v.fetchStatus="idle")}let{error:y,errorUpdatedAt:b,status:S}=v;r=v.data;let O=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===S){let e;l?.isPlaceholderData&&t.placeholderData===f?.placeholderData?(e=l.data,O=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#E?.state.data,this.#E):t.placeholderData,void 0!==e&&(S="success",r=(0,a.replaceData)(l?.data,e,t),g=!0)}if(t.select&&void 0!==r&&!O)if(l&&r===c?.data&&t.select===this.#T)r=this.#x;else try{this.#T=t.select,r=t.select(r),r=(0,a.replaceData)(l?.data,r,t),this.#x=r,this.#m=null}catch(e){this.#m=e}this.#m&&(y=this.#m,r=this.#x,b=Date.now(),S="error");let T="fetching"===v.fetchStatus,x="pending"===S,E="error"===S,F=x&&T,M=void 0!==r,R={status:S,fetchStatus:v.fetchStatus,isPending:x,isSuccess:"success"===S,isError:E,isInitialLoading:F,isLoading:F,data:r,dataUpdatedAt:v.dataUpdatedAt,error:y,errorUpdatedAt:b,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>p.dataUpdateCount||v.errorUpdateCount>p.errorUpdateCount,isFetching:T,isRefetching:T&&!x,isLoadingError:E&&!M,isPaused:"paused"===v.fetchStatus,isPlaceholderData:g,isRefetchError:E&&M,isStale:d(e,t),refetch:this.refetch,promise:this.#v,isEnabled:!1!==(0,a.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==R.data,r="error"===R.status&&!t,i=e=>{r?e.reject(R.error):t&&e.resolve(R.data)},a=()=>{i(this.#v=R.promise=(0,n.pendingThenable)())},o=this.#v;switch(o.status){case"pending":e.queryHash===s.queryHash&&i(o);break;case"fulfilled":(r||R.data!==o.value)&&a();break;case"rejected":r&&R.error===o.reason||a()}}return R}updateResult(){let e=this.#b,t=this.createResult(this.#g,this.options);if(this.#S=this.#g.state,this.#O=this.options,void 0!==this.#S.data&&(this.#E=this.#g),(0,a.shallowEqualObjects)(t,e))return;this.#b=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#w.size)return!0;let i=new Set(r??this.#w);return this.options.throwOnError&&i.add("error"),Object.keys(this.#b).some(t=>this.#b[t]!==e[t]&&i.has(t))};this.#k({listeners:r()})}#U(){let e=this.#c.getQueryCache().build(this.#c,this.options);if(e===this.#g)return;let t=this.#g;this.#g=e,this.#y=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#P()}#k(e){r.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#b)}),this.#c.getQueryCache().notify({query:this.#g,type:"observerResultsUpdated"})})}};function u(e,t){return!1!==(0,a.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&c(e,t,t.refetchOnMount)}function c(e,t,r){if(!1!==(0,a.resolveEnabled)(t.enabled,e)&&"static"!==(0,a.resolveStaleTime)(t.staleTime,e)){let i="function"==typeof r?r(e):r;return"always"===i||!1!==i&&d(e,t)}return!1}function h(e,t,r,i){return(e!==t||!1===(0,a.resolveEnabled)(i.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&d(e,r)}function d(e,t){return!1!==(0,a.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,a.resolveStaleTime)(t.staleTime,e))}e.s(["QueryObserver",()=>l])},69637,54440,e=>{"use strict";let t;e.i(47167);var r=e.i(71645),i=e.i(19273),s=e.i(40143),n=e.i(12598);e.i(43476);var a=r.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),o=r.createContext(!1);o.Provider;var l=(e,t)=>void 0===t.state.data,u=e=>{if(e.suspense){let t=e=>"static"===e?e:Math.max(e??1e3,1e3),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>t(r(...e)):t(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}},c=(e,t)=>e.isLoading&&e.isFetching&&!t,h=(e,t)=>e?.suspense&&t.isPending,d=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function f(e,t,l){let f,p=r.useContext(o),m=r.useContext(a),v=(0,n.useQueryClient)(l),g=v.defaultQueryOptions(e);v.getDefaultOptions().queries?._experimental_beforeQuery?.(g);let y=v.getQueryCache().get(g.queryHash);g._optimisticResults=p?"isRestoring":"optimistic",u(g),f=y?.state.error&&"function"==typeof g.throwOnError?(0,i.shouldThrowError)(g.throwOnError,[y.state.error,y]):g.throwOnError,(g.suspense||g.experimental_prefetchInRender||f)&&!m.isReset()&&(g.retryOnMount=!1),r.useEffect(()=>{m.clearReset()},[m]);let b=!v.getQueryCache().get(g.queryHash),[S]=r.useState(()=>new t(v,g)),O=S.getOptimisticResult(g),T=!p&&!1!==e.subscribed;if(r.useSyncExternalStore(r.useCallback(e=>{let t=T?S.subscribe(s.notifyManager.batchCalls(e)):i.noop;return S.updateResult(),t},[S,T]),()=>S.getCurrentResult(),()=>S.getCurrentResult()),r.useEffect(()=>{S.setOptions(g)},[g,S]),h(g,O))throw d(g,S,m);if((({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(n&&void 0===e.data||(0,i.shouldThrowError)(r,[e.error,s])))({result:O,errorResetBoundary:m,throwOnError:g.throwOnError,query:y,suspense:g.suspense}))throw O.error;if(v.getDefaultOptions().queries?._experimental_afterQuery?.(g,O),g.experimental_prefetchInRender&&!i.isServer&&c(O,p)){let e=b?d(g,S,m):y?.promise;e?.catch(i.noop).finally(()=>{S.updateResult()})}return g.notifyOnChangeProps?O:S.trackResult(O)}e.s(["defaultThrowOnError",()=>l,"ensureSuspenseTimers",()=>u,"fetchOptimistic",()=>d,"shouldSuspend",()=>h,"willFetch",()=>c],54440),e.s(["useBaseQuery",()=>f],69637)},47071,99143,e=>{"use strict";var t=e.i(71645),r=e.i(90072),i=e.i(15080),s=e.i(40859);e.s(["useLoader",()=>s.G],99143);var s=s;let n=e=>e===Object(e)&&!Array.isArray(e)&&"function"!=typeof e;function a(e,a){let o=(0,i.useThree)(e=>e.gl),l=(0,s.G)(r.TextureLoader,n(e)?Object.values(e):e);return(0,t.useLayoutEffect)(()=>{null==a||a(l)},[a]),(0,t.useEffect)(()=>{if("initTexture"in o){let e=[];Array.isArray(l)?e=l:l instanceof r.Texture?e=[l]:n(l)&&(e=Object.values(l)),e.forEach(e=>{e instanceof r.Texture&&o.initTexture(e)})}},[o,l]),(0,t.useMemo)(()=>{if(!n(e))return l;{let t={},r=0;for(let i in e)t[i]=l[r++];return t}},[e,l])}a.preload=e=>s.G.preload(r.TextureLoader,e),a.clear=e=>s.G.clear(r.TextureLoader,e),e.s(["useTexture",()=>a],47071)},75567,56893,e=>{"use strict";var t=e.i(90072);let r=new t.ImageBitmapLoader,i=new Map;function s(e,s){let n=i.get(e);if(n)return s&&n.image&&s(n),n;let a=new t.Texture;return a.flipY=!1,i.set(e,a),r.load(e,e=>{a.image=e,a.needsUpdate=!0,s?.(a)}),a}function n(e){let s=i.get(e);return s?s.image?Promise.resolve(s):new Promise(e=>{let t=()=>{s.image?e(s):setTimeout(t,16)};t()}):new Promise((s,n)=>{let a=new t.Texture;a.flipY=!1,i.set(e,a),r.load(e,e=>{a.image=e,a.needsUpdate=!0,s(a)},void 0,n)})}function a(e,r={}){let{repeat:i=[1,1],disableMipmaps:s=!1,anisotropy:n}=r;return e.wrapS=e.wrapT=t.RepeatWrapping,e.colorSpace=t.SRGBColorSpace,e.repeat.set(...i),e.flipY=!1,e.anisotropy=n??1,s?(e.generateMipmaps=!1,e.minFilter=t.LinearFilter):(e.generateMipmaps=!0,e.minFilter=t.LinearMipmapLinearFilter),e.magFilter=t.LinearFilter,e.needsUpdate=!0,e}function o(e){let r=new t.DataTexture(e,256,256,t.RedFormat,t.UnsignedByteType);return r.colorSpace=t.NoColorSpace,r.wrapS=r.wrapT=t.RepeatWrapping,r.generateMipmaps=!1,r.minFilter=t.LinearFilter,r.magFilter=t.LinearFilter,r.needsUpdate=!0,r}e.s(["loadTexture",()=>s,"loadTextureAsync",()=>n,"setupMask",()=>o,"setupTexture",()=>a],75567);var l=e.i(15080);function u(){return(0,l.useThree)(c)}function c(e){return e.gl.capabilities.getMaxAnisotropy()}e.s(["useAnisotropy",()=>u],56893)},47021,e=>{"use strict";var t=e.i(8560);let r=`
+#ifdef USE_FOG
+ // Check fog enabled uniform - allows toggling without shader recompilation
+ #ifdef USE_VOLUMETRIC_FOG
+ if (!fogEnabled) {
+ // Skip all fog calculations when disabled
+ } else {
+ #endif
+
+ float dist = vFogDepth;
+
+ // Discard fragments at or beyond visible distance - matches Torque's behavior
+ // where objects beyond visibleDistance are not rendered at all.
+ // This prevents fully-fogged geometry from showing as silhouettes against
+ // the sky's fog-to-sky gradient.
+ if (dist >= fogFar) {
+ discard;
+ }
+
+ // Step 1: Calculate distance-based haze (quadratic falloff)
+ // Since we discard at fogFar, haze never reaches 1.0 here
+ float haze = 0.0;
+ if (dist > fogNear) {
+ float fogScale = 1.0 / (fogFar - fogNear);
+ float distFactor = (dist - fogNear) * fogScale - 1.0;
+ haze = 1.0 - distFactor * distFactor;
+ }
+
+ // Step 2: Calculate fog volume contributions
+ // Note: Per-volume colors are NOT used in Tribes 2 ($specialFog defaults to false)
+ // All fog uses the global fogColor - see Tribes2_Fog_System.md for details
+ float volumeFog = 0.0;
+
+ #ifdef USE_VOLUMETRIC_FOG
+ {
+ #ifdef USE_FOG_WORLD_POSITION
+ float fragmentHeight = vFogWorldPosition.y;
+ #else
+ float fragmentHeight = cameraHeight;
+ #endif
+
+ float deltaY = fragmentHeight - cameraHeight;
+ float absDeltaY = abs(deltaY);
+
+ // Determine if we're going up (positive) or down (negative)
+ if (absDeltaY > 0.01) {
+ // Non-horizontal ray: ray-march through fog volumes
+ for (int i = 0; i < 3; i++) {
+ int offset = i * 4;
+ float volVisDist = fogVolumeData[offset + 0];
+ float volMinH = fogVolumeData[offset + 1];
+ float volMaxH = fogVolumeData[offset + 2];
+ float volPct = fogVolumeData[offset + 3];
+
+ // Skip inactive volumes (visibleDistance = 0)
+ if (volVisDist <= 0.0) continue;
+
+ // Calculate fog factor for this volume
+ // From Torque: factor = (1 / (volumeVisDist * visFactor)) * percentage
+ // where visFactor is smVisibleDistanceMod (a user quality pref, default 1.0)
+ // Since we don't have quality settings, we use visFactor = 1.0
+ float factor = (1.0 / volVisDist) * volPct;
+
+ // Find ray intersection with this volume's height range
+ float rayMinY = min(cameraHeight, fragmentHeight);
+ float rayMaxY = max(cameraHeight, fragmentHeight);
+
+ // Check if ray intersects volume height range
+ if (rayMinY < volMaxH && rayMaxY > volMinH) {
+ float intersectMin = max(rayMinY, volMinH);
+ float intersectMax = min(rayMaxY, volMaxH);
+ float intersectHeight = intersectMax - intersectMin;
+
+ // Calculate distance traveled through this volume using similar triangles:
+ // subDist / dist = intersectHeight / absDeltaY
+ float subDist = dist * (intersectHeight / absDeltaY);
+
+ // Accumulate fog: fog += subDist * factor
+ volumeFog += subDist * factor;
+ }
+ }
+ } else {
+ // Near-horizontal ray: if camera is inside a volume, apply full fog for that volume
+ for (int i = 0; i < 3; i++) {
+ int offset = i * 4;
+ float volVisDist = fogVolumeData[offset + 0];
+ float volMinH = fogVolumeData[offset + 1];
+ float volMaxH = fogVolumeData[offset + 2];
+ float volPct = fogVolumeData[offset + 3];
+
+ if (volVisDist <= 0.0) continue;
+
+ // If camera is inside this volume, apply fog for full distance
+ if (cameraHeight >= volMinH && cameraHeight <= volMaxH) {
+ float factor = (1.0 / volVisDist) * volPct;
+ volumeFog += dist * factor;
+ }
+ }
+ }
+ }
+ #endif
+
+ // Step 3: Combine haze and volume fog
+ // Torque's clamping: if (bandPct + hazePct > 1) hazePct = 1 - bandPct
+ // This gives fog volumes priority over haze
+ float volPct = min(volumeFog, 1.0);
+ float hazePct = haze;
+ if (volPct + hazePct > 1.0) {
+ hazePct = 1.0 - volPct;
+ }
+ float fogFactor = hazePct + volPct;
+
+ // Apply fog using global fogColor (per-volume colors not used in Tribes 2)
+ gl_FragColor.rgb = mix(gl_FragColor.rgb, fogColor, fogFactor);
+
+ #ifdef USE_VOLUMETRIC_FOG
+ } // end fogEnabled check
+ #endif
+#endif
+`;function i(){t.ShaderChunk.fog_pars_fragment=`
+#ifdef USE_FOG
+ uniform vec3 fogColor;
+ varying float vFogDepth;
+ #ifdef FOG_EXP2
+ uniform float fogDensity;
+ #else
+ uniform float fogNear;
+ uniform float fogFar;
+ #endif
+
+ // Custom volumetric fog uniforms (only defined when USE_VOLUMETRIC_FOG is set)
+ // Format: [visDist, minH, maxH, percentage] x 3 volumes = 12 floats
+ #ifdef USE_VOLUMETRIC_FOG
+ uniform float fogVolumeData[12];
+ uniform float cameraHeight;
+ #endif
+
+ #ifdef USE_FOG_WORLD_POSITION
+ varying vec3 vFogWorldPosition;
+ #endif
+#endif
+`,t.ShaderChunk.fog_fragment=r,t.ShaderChunk.fog_pars_vertex=`
+#ifdef USE_FOG
+ varying float vFogDepth;
+ #ifdef USE_FOG_WORLD_POSITION
+ varying vec3 vFogWorldPosition;
+ #endif
+#endif
+`,t.ShaderChunk.fog_vertex=`
+#ifdef USE_FOG
+ // Use Euclidean distance from camera, not view-space z-depth
+ // This ensures fog doesn't change when rotating the camera
+ vFogDepth = length(mvPosition.xyz);
+ #ifdef USE_FOG_WORLD_POSITION
+ vFogWorldPosition = (modelMatrix * vec4(transformed, 1.0)).xyz;
+ #endif
+#endif
+`}function s(e,t){e.uniforms.fogVolumeData=t.fogVolumeData,e.uniforms.cameraHeight=t.cameraHeight,e.uniforms.fogEnabled=t.fogEnabled,e.vertexShader=e.vertexShader.replace("#include ",`#include
+#ifdef USE_FOG
+ #define USE_FOG_WORLD_POSITION
+ #define USE_VOLUMETRIC_FOG
+ varying vec3 vFogWorldPosition;
+#endif`),e.vertexShader=e.vertexShader.replace("#include ",`#include
+#ifdef USE_FOG
+ vFogWorldPosition = (modelMatrix * vec4(transformed, 1.0)).xyz;
+#endif`),e.fragmentShader=e.fragmentShader.replace("#include ",`#include
+#ifdef USE_FOG
+ #define USE_VOLUMETRIC_FOG
+ uniform float fogVolumeData[12];
+ uniform float cameraHeight;
+ uniform bool fogEnabled;
+ #define USE_FOG_WORLD_POSITION
+ varying vec3 vFogWorldPosition;
+#endif`),e.fragmentShader=e.fragmentShader.replace("#include ",r)}e.s(["fogFragmentShader",0,r,"injectCustomFog",()=>s,"installCustomFogShader",()=>i])},48066,e=>{"use strict";let t={fogVolumeData:{value:new Float32Array(12)},cameraHeight:{value:0},fogEnabled:{value:!0}};function r(e,i,s=!0){t.cameraHeight.value=e,t.fogVolumeData.value.set(i),t.fogEnabled.value=s}function i(){t.cameraHeight.value=0,t.fogVolumeData.value.fill(0),t.fogEnabled.value=!0}function s(e){let t=new Float32Array(12);for(let r=0;r<3;r++){let i=4*r,s=e[r];s&&(t[i+0]=s.visibleDistance,t[i+1]=s.minHeight,t[i+2]=s.maxHeight,t[i+3]=s.percentage)}return t}e.s(["globalFogUniforms",0,t,"packFogVolumeData",()=>s,"resetGlobalFogUniforms",()=>i,"updateGlobalFogUniforms",()=>r])}]);
\ No newline at end of file
diff --git a/docs/_next/static/chunks/26c11097581036eb.js b/docs/_next/static/chunks/6e8ac7c28fb34400.js
similarity index 68%
rename from docs/_next/static/chunks/26c11097581036eb.js
rename to docs/_next/static/chunks/6e8ac7c28fb34400.js
index 2536c2d2..b47b7225 100644
--- a/docs/_next/static/chunks/26c11097581036eb.js
+++ b/docs/_next/static/chunks/6e8ac7c28fb34400.js
@@ -1,4 +1,4 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65883,e=>{e.v({ButtonGroup:"InspectorControls-module__gNRB6W__ButtonGroup",ButtonHint:"InspectorControls-module__gNRB6W__ButtonHint",ButtonLabel:"InspectorControls-module__gNRB6W__ButtonLabel",CheckboxField:"InspectorControls-module__gNRB6W__CheckboxField",Control:"InspectorControls-module__gNRB6W__Control",Description:"InspectorControls-module__gNRB6W__Description",Dropdown:"InspectorControls-module__gNRB6W__Dropdown",Field:"InspectorControls-module__gNRB6W__Field",ForceRenderButton:"InspectorControls-module__gNRB6W__ForceRenderButton",Group:"InspectorControls-module__gNRB6W__Group",IconButton:"InspectorControls-module__gNRB6W__IconButton",InspectorControls:"InspectorControls-module__gNRB6W__InspectorControls",Label:"InspectorControls-module__gNRB6W__Label",LabelledButton:"InspectorControls-module__gNRB6W__LabelledButton",MapInfoButton:"InspectorControls-module__gNRB6W__MapInfoButton InspectorControls-module__gNRB6W__IconButton InspectorControls-module__gNRB6W__LabelledButton",Toggle:"InspectorControls-module__gNRB6W__Toggle InspectorControls-module__gNRB6W__IconButton",Tools:"InspectorControls-module__gNRB6W__Tools"})},36679,e=>{e.v({ButtonLabel:"CopyCoordinatesButton-module__BxovtG__ButtonLabel "+e.i(65883).ButtonLabel,ClipboardCheck:"CopyCoordinatesButton-module__BxovtG__ClipboardCheck",MapPin:"CopyCoordinatesButton-module__BxovtG__MapPin",Root:"CopyCoordinatesButton-module__BxovtG__Root "+e.i(65883).IconButton+" "+e.i(65883).LabelledButton,showClipboardCheck:"CopyCoordinatesButton-module__BxovtG__showClipboardCheck"})},28903,e=>{e.v({ButtonHint:"LoadDemoButton-module__kGZaoW__ButtonHint "+e.i(65883).ButtonHint,ButtonLabel:"LoadDemoButton-module__kGZaoW__ButtonLabel "+e.i(65883).ButtonLabel,Root:"LoadDemoButton-module__kGZaoW__Root "+e.i(65883).IconButton+" "+e.i(65883).LabelledButton})},9607,e=>{e.v({ButtonHint:"JoinServerButton-module__DIR70a__ButtonHint "+e.i(65883).ButtonHint,PingLabel:"JoinServerButton-module__DIR70a__PingLabel "+e.i(65883).ButtonLabel,Pulsing:"JoinServerButton-module__DIR70a__Pulsing",Root:"JoinServerButton-module__DIR70a__Root "+e.i(65883).IconButton+" "+e.i(65883).LabelledButton,TextLabel:"JoinServerButton-module__DIR70a__TextLabel "+e.i(65883).ButtonLabel,blink:"JoinServerButton-module__DIR70a__blink"})},81323,e=>{e.v({AccordionGroup:"Accordion-module__rN-DYq__AccordionGroup",Body:"Accordion-module__rN-DYq__Body",Content:"Accordion-module__rN-DYq__Content",Trigger:"Accordion-module__rN-DYq__Trigger",TriggerIcon:"Accordion-module__rN-DYq__TriggerIcon",slideDown:"Accordion-module__rN-DYq__slideDown",slideUp:"Accordion-module__rN-DYq__slideUp"})},16964,e=>{e.v({ActionButton:"StreamingMissionInfo-module__hEaQnW__ActionButton "+e.i(65883).IconButton,Attribution:"StreamingMissionInfo-module__hEaQnW__Attribution",EjectIcon:"StreamingMissionInfo-module__hEaQnW__EjectIcon",Error:"StreamingMissionInfo-module__hEaQnW__Error",Header:"StreamingMissionInfo-module__hEaQnW__Header",Metadata:"StreamingMissionInfo-module__hEaQnW__Metadata",MissionInfo:"StreamingMissionInfo-module__hEaQnW__MissionInfo",MissionName:"StreamingMissionInfo-module__hEaQnW__MissionName "+e.i(97442).SelectedName,MissionType:"StreamingMissionInfo-module__hEaQnW__MissionType "+e.i(97442).ItemType,MissionTypeDisplayName:"StreamingMissionInfo-module__hEaQnW__MissionTypeDisplayName",PlayerName:"StreamingMissionInfo-module__hEaQnW__PlayerName",RecordingDate:"StreamingMissionInfo-module__hEaQnW__RecordingDate",ServerInfo:"StreamingMissionInfo-module__hEaQnW__ServerInfo",ServerName:"StreamingMissionInfo-module__hEaQnW__ServerName"})},29418,e=>{e.v({Bottom:"PlayerNameplate-module__zYDm0a__Bottom PlayerNameplate-module__zYDm0a__Root",HealthBar:"PlayerNameplate-module__zYDm0a__HealthBar",HealthFill:"PlayerNameplate-module__zYDm0a__HealthFill",IffArrow:"PlayerNameplate-module__zYDm0a__IffArrow",Name:"PlayerNameplate-module__zYDm0a__Name",Root:"PlayerNameplate-module__zYDm0a__Root",Top:"PlayerNameplate-module__zYDm0a__Top PlayerNameplate-module__zYDm0a__Root"})},78779,e=>{e.v({Distance:"FlagMarker-module__INpLba__Distance",Icon:"FlagMarker-module__INpLba__Icon",Root:"FlagMarker-module__INpLba__Root"})},89271,e=>{e.v({LoadingIndicator:"LoadingIndicator-module__F20Nda__LoadingIndicator",Progress:"LoadingIndicator-module__F20Nda__Progress",ProgressBar:"LoadingIndicator-module__F20Nda__ProgressBar",ProgressText:"LoadingIndicator-module__F20Nda__ProgressText",Spinner:"LoadingIndicator-module__F20Nda__Spinner",loadingComplete:"LoadingIndicator-module__F20Nda__loadingComplete",spin:"LoadingIndicator-module__F20Nda__spin"})},82156,e=>{e.v({Backdrop:"MapInspector-module__nU0WNq__Backdrop",CancelButton:"MapInspector-module__nU0WNq__CancelButton",Content:"MapInspector-module__nU0WNq__Content",Frame:"MapInspector-module__nU0WNq__Frame",PlayerBar:"MapInspector-module__nU0WNq__PlayerBar",Sidebar:"MapInspector-module__nU0WNq__Sidebar",ThreeView:"MapInspector-module__nU0WNq__ThreeView",ToggleSidebarButton:"MapInspector-module__nU0WNq__ToggleSidebarButton",Toolbar:"MapInspector-module__nU0WNq__Toolbar",layout:"MapInspector-module__nU0WNq__layout"})},31713,e=>{"use strict";var t,r=e.i(43476),n=e.i(932),a=e.i(71645),o=e.i(17751),i=e.i(12598),l=e.i(38847);let s=(0,a.createContext)({live:!1});function c(e){let t,o,i=(0,n.c)(5),{children:c}=e,[d]=(0,l.useQueryState)("features",l.parseAsString);i[0]!==d?(t=()=>({live:new Set((d??"").split(",").map(u).filter(Boolean)).has("live")}),i[0]=d,i[1]=t):t=i[1];let[m]=(0,a.useState)(t);return i[2]!==c||i[3]!==m?(o=(0,r.jsx)(s.Provider,{value:m,children:c}),i[2]=c,i[3]=m,i[4]=o):o=i[4],o}function u(e){return e.trim().toLowerCase()}var d=e.i(40141);function m(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M16 21L11.2381 12.2698L15 6L23 21H16ZM8 10L14 21H2L8 10ZM5.5 8C4.11929 8 3 6.88071 3 5.5C3 4.11929 4.11929 3 5.5 3C6.88071 3 8 4.11929 8 5.5C8 6.88071 6.88071 8 5.5 8Z"},child:[]}]})(e)}function f(e){return(0,d.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 h(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M463.5 224l8.5 0c13.3 0 24-10.7 24-24l0-128c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8l119.5 0z"},child:[]}]})(e)}function p(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M2 8V2h6"},child:[]},{tag:"path",attr:{d:"m2 2 10 10"},child:[]},{tag:"path",attr:{d:"M12 2A10 10 0 1 1 2 12"},child:[]}]})(e)}function g(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1"},child:[]},{tag:"path",attr:{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"},child:[]},{tag:"path",attr:{d:"M12 11h4"},child:[]},{tag:"path",attr:{d:"M12 16h4"},child:[]},{tag:"path",attr:{d:"M8 11h.01"},child:[]},{tag:"path",attr:{d:"M8 16h.01"},child:[]}]})(e)}function v(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"18",height:"18",x:"3",y:"3",rx:"2"},child:[]},{tag:"path",attr:{d:"M9 3v18"},child:[]},{tag:"path",attr:{d:"m16 15-3-3 3-3"},child:[]}]})(e)}function x(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"18",height:"18",x:"3",y:"3",rx:"2"},child:[]},{tag:"path",attr:{d:"M9 3v18"},child:[]},{tag:"path",attr:{d:"m14 9 3 3-3 3"},child:[]}]})(e)}function y(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"18",height:"18",x:"3",y:"3",rx:"2"},child:[]},{tag:"path",attr:{d:"M3 9h18"},child:[]},{tag:"path",attr:{d:"m9 16 3-3 3 3"},child:[]}]})(e)}function b(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"18",height:"18",x:"3",y:"3",rx:"2"},child:[]},{tag:"path",attr:{d:"M3 9h18"},child:[]},{tag:"path",attr:{d:"m15 14-3 3-3-3"},child:[]}]})(e)}var _=e.i(79123),S=e.i(11152),w=e.i(36679);function C(e){let t,o,i,l,s,c=(0,n.c)(12),{cameraRef:u,missionName:d,missionType:m,disabled:h}=e,{fogEnabled:p}=(0,_.useSettings)(),[g,v]=(0,a.useState)(!1),x=(0,a.useRef)(null);c[0]!==u||c[1]!==p||c[2]!==d||c[3]!==m?(t=async()=>{clearTimeout(x.current);let e=u.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)}`,a=`${r(t.x)},${r(t.y)},${r(t.z)},${r(t.w)}`;return`#c${n}~${a}`}(e),r=new URLSearchParams;r.set("mission",`${d}~${m}`),r.set("fog",p.toString());let n=`${window.location.pathname}?${r}${t}`,a=`${window.location.origin}${n}`;window.history.replaceState(null,"",n);try{await navigator.clipboard.writeText(a),v(!0),x.current=setTimeout(()=>{v(!1)},1100)}catch(e){console.error(e)}},c[0]=u,c[1]=p,c[2]=d,c[3]=m,c[4]=t):t=c[4];let y=t,b=g?"true":"false";return c[5]===Symbol.for("react.memo_cache_sentinel")?(o=(0,r.jsx)(S.FaMapPin,{className:w.default.MapPin}),i=(0,r.jsx)(f,{className:w.default.ClipboardCheck}),l=(0,r.jsx)("span",{className:w.default.ButtonLabel,children:" Link to coordinates"}),c[5]=o,c[6]=i,c[7]=l):(o=c[5],i=c[6],l=c[7]),c[8]!==h||c[9]!==y||c[10]!==b?(s=(0,r.jsxs)("button",{type:"button",className:w.default.Root,"aria-label":"Link to coordinates",title:"Copy the current coordinates to URL",onClick:y,disabled:h,"data-copied":b,id:"copyCoordinatesButton",children:[o,i,l]}),c[8]=h,c[9]=y,c[10]=b,c[11]=s):s=c[11],s}function j(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M21 3H3c-1.11 0-2 .89-2 2v12a2 2 0 0 0 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5a2 2 0 0 0-2-2zm0 14H3V5h18v12zm-5-6-7 4V7z"},child:[]}]})(e)}var M=e.i(25645),k=e.i(98755),T=e.i(32865),N=e.i(28903);let R=(0,M.createLogger)("LoadDemoButton");function D({isActive:t=!1,choosingMap:n=!1,onCancelChoosingMap:o}){let i=(0,T.useRecording)(),l=i?.source==="demo",{setRecording:s}=(0,T.usePlaybackActions)(),c=(0,a.useRef)(null),u=(0,a.useRef)(0),d=(0,a.useCallback)(()=>{if(n&&l)return void o?.();if(l){u.current+=1,s(null);return}c.current?.click()},[l,n,o,s]),m=(0,a.useCallback)(async t=>{let r=t.target.files?.[0];if(r){t.target.value="";try{let t=await r.arrayBuffer(),n=u.current+1;u.current=n;let{createDemoStreamingRecording:a}=await e.A(60946),o=await a(t);if(u.current!==n)return;let i=k.liveConnectionStore.getState();i.disconnectServer(),i.disconnectRelay(),s(o)}catch(e){R.error("Failed to load demo: %o",e)}}},[s]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("input",{ref:c,type:"file",accept:".rec",style:{display:"none"},onChange:m}),(0,r.jsxs)("button",{type:"button",className:N.default.Root,"aria-label":l?"Unload demo":"Load demo (.rec)",title:l?"Unload demo":"Load demo (.rec)",onClick:d,"data-active":t,children:[(0,r.jsx)(j,{className:N.default.DemoIcon}),(0,r.jsx)("span",{className:N.default.ButtonLabel,children:"Demo"}),(0,r.jsx)("span",{className:N.default.ButtonHint,children:n&&l?"Return to demo":l?"Click to unload":"Load a .rec file"})]})]})}function L(e){return(0,d.GenIcon)({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M11.251.068a.5.5 0 0 1 .227.58L9.677 6.5H13a.5.5 0 0 1 .364.843l-8 8.5a.5.5 0 0 1-.842-.49L6.323 9.5H3a.5.5 0 0 1-.364-.843l8-8.5a.5.5 0 0 1 .615-.09z"},child:[]}]})(e)}var F=e.i(9607);function I(e){let t,a,o,i,l,s,c=(0,n.c)(20),{isActive:u,onOpenServerBrowser:d}=e,m=(0,k.useLiveSelector)(P),f=(0,k.useLiveSelector)(k.selectPing),h=(0,k.useLiveSelector)(B),p=(0,k.useLiveSelector)(E),g="connected"===m,v="connecting"===m||"challenging"===m||"authenticating"===m,x=g?"Connected – click to disconnect":"Join server",y=g?"Connected – click to disconnect":"Join server";c[0]!==p||c[1]!==h||c[2]!==g||c[3]!==d?(t=()=>{g?(h(),p()):d()},c[0]=p,c[1]=h,c[2]=g,c[3]=d,c[4]=t):t=c[4];let b=`${F.default.LiveIcon} ${g?F.default.Pulsing:""}`;if(c[5]!==b?(a=(0,r.jsx)(L,{className:b}),c[5]=b,c[6]=a):a=c[6],c[7]===Symbol.for("react.memo_cache_sentinel")?(o=(0,r.jsx)("span",{className:F.default.TextLabel,children:"Live"}),c[7]=o):o=c[7],c[8]!==v||c[9]!==f)i=v?"Connecting…":null!=f?`${f.toLocaleString()} ms`:"Join a game",c[8]=v,c[9]=f,c[10]=i;else i=c[10];return c[11]!==i?(l=(0,r.jsxs)(r.Fragment,{children:[o,(0,r.jsx)("span",{className:F.default.ButtonHint,children:i})]}),c[11]=i,c[12]=l):l=c[12],c[13]!==u||c[14]!==x||c[15]!==y||c[16]!==t||c[17]!==a||c[18]!==l?(s=(0,r.jsxs)("button",{type:"button",className:F.default.Root,"aria-label":x,title:y,onClick:t,"data-active":u,children:[a,l]}),c[13]=u,c[14]=x,c[15]=y,c[16]=t,c[17]=a,c[18]=l,c[19]=s):s=c[19],s}function E(e){return e.disconnectRelay}function B(e){return e.disconnectServer}function P(e){return e.gameStatus}function A(e,t=[]){let n=[],o=()=>{let t=n.map(e=>a.createContext(e));return function(r){let n=r?.[e]||t;return a.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return o.scopeName=e,[function(t,o){let i=a.createContext(o),l=n.length;n=[...n,o];let s=t=>{let{scope:n,children:o,...s}=t,c=n?.[e]?.[l]||i,u=a.useMemo(()=>s,Object.values(s));return(0,r.jsx)(c.Provider,{value:u,children:o})};return s.displayName=t+"Provider",[s,function(r,n){let s=n?.[e]?.[l]||i,c=a.useContext(s);if(c)return c;if(void 0!==o)return o;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:n})=>{let a=r(e)[`__scope${n}`];return{...t,...a}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}(o,...t)]}function z(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function U(...e){return t=>{let r=!1,n=e.map(e=>{let n=z(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t{let{children:r,...n}=e;if(a.isValidElement(r)){var o;let e,i,l=(o=r,(i=(e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(i=(e=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref),s=function(e,t){let r={...t};for(let n in t){let a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{let t=o(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==a.Fragment&&(s.ref=t?U(t,l):l),a.cloneElement(r,s)}return a.Children.count(r)>1?a.Children.only(null):null})).displayName=`${t}.SlotClone`,n),i=a.forwardRef((e,t)=>{let{children:n,...i}=e,l=a.Children.toArray(n),s=l.find(O);if(s){let e=s.props.children,n=l.map(t=>t!==s?t:a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null);return(0,r.jsx)(o,{...i,ref:t,children:a.isValidElement(e)?a.cloneElement(e,void 0,n):null})}return(0,r.jsx)(o,{...i,ref:t,children:n})});return i.displayName=`${e}.Slot`,i}var H=Symbol("radix.slottable");function O(e){return a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===H}var V=new WeakMap;function q(e,t){var r,n;let a,o,i;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let l=(r=e,n=t,a=r.length,(i=(o=$(n))>=0?o:a+o)<0||i>=a?-1:i);return -1===l?void 0:e[l]}function $(e){return e!=e||0===e?0:Math.trunc(e)}function K(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],V.set(this,!0)}set(e,t){return V.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let n,a=this.has(t),o=this.#e.length,i=$(e),l=i>=0?i:o+i,s=l<0||l>=o?-1:l;if(s===this.size||a&&s===this.size-1||-1===s)return this.set(t,r),this;let c=this.size+ +!a;i<0&&l++;let u=[...this.#e],d=!1;for(let e=l;e=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],a=0;for(let e of this)Reflect.apply(t,r,[e,a,this])&&n.push(e),a++;return new e(n)}map(t,r){let n=[],a=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,a,this])]),a++;return new e(n)}reduce(...e){let[t,r]=e,n=0,a=r??this.at(0);for(let r of this)a=0===n&&1===e.length?r:Reflect.apply(t,this,[a,r,n,this]),n++;return a}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let a=this.at(r);n=r===this.size-1&&1===e.length?a:Reflect.apply(t,this,[n,a,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,a=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(a=r-1);for(let e=t;e<=a;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),"u">typeof window&&window.document&&window.document.createElement;var Q=globalThis?.document?a.useLayoutEffect:()=>{};a[" useEffectEvent ".trim().toString()],a[" useInsertionEffect ".trim().toString()];var Y=a[" useInsertionEffect ".trim().toString()]||Q;function X({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,i,l]=function({defaultProp:e,onChange:t}){let[r,n]=a.useState(e),o=a.useRef(r),i=a.useRef(t);return Y(()=>{i.current=t},[t]),a.useEffect(()=>{o.current!==r&&(i.current?.(r),o.current=r)},[r,o]),[r,n,i]}({defaultProp:t,onChange:r}),s=void 0!==e,c=s?e:o;{let t=a.useRef(void 0!==e);a.useEffect(()=>{let e=t.current;if(e!==s){let t=s?"controlled":"uncontrolled";console.warn(`${n} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s},[s,n])}return[c,a.useCallback(t=>{if(s){let r="function"==typeof t?t(e):t;r!==e&&l.current?.(r)}else i(t)},[s,e,i,l])]}Symbol("RADIX:SYNC_STATE"),e.i(74080);var Z=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=W(`Primitive.${t}`),o=a.forwardRef((e,a)=>{let{asChild:o,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,r.jsx)(o?n:t,{...i,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),J=e=>{var t;let r,n,{present:o,children:i}=e,l=function(e){var t,r;let[n,o]=a.useState(),i=a.useRef(null),l=a.useRef(e),s=a.useRef("none"),[c,u]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},a.useReducer((e,t)=>r[e][t]??e,t));return a.useEffect(()=>{let e=ee(i.current);s.current="mounted"===c?e:"none"},[c]),Q(()=>{let t=i.current,r=l.current;if(r!==e){let n=s.current,a=ee(t);e?u("MOUNT"):"none"===a||t?.display==="none"?u("UNMOUNT"):r&&n!==a?u("ANIMATION_OUT"):u("UNMOUNT"),l.current=e}},[e,u]),Q(()=>{if(n){let e,t=n.ownerDocument.defaultView??window,r=r=>{let a=ee(i.current).includes(CSS.escape(r.animationName));if(r.target===n&&a&&(u("ANIMATION_END"),!l.current)){let r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},a=e=>{e.target===n&&(s.current=ee(i.current))};return n.addEventListener("animationstart",a),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",a),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}u("ANIMATION_END")},[n,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:a.useCallback(e=>{i.current=e?getComputedStyle(e):null,o(e)},[])}}(o),s="function"==typeof i?i({present:l.isPresent}):a.Children.only(i),c=G(l.ref,(t=s,(n=(r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?t.ref:(n=(r=Object.getOwnPropertyDescriptor(t,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?t.props.ref:t.props.ref||t.ref));return"function"==typeof i||l.isPresent?a.cloneElement(s,{ref:c}):null};function ee(e){return e?.animationName||"none"}J.displayName="Presence";var et=a[" useId ".trim().toString()]||(()=>void 0),er=0;function en(e){let[t,r]=a.useState(et());return Q(()=>{e||r(e=>e??String(er++))},[e]),e||(t?`radix-${t}`:"")}var ea="Collapsible",[eo,ei]=A(ea),[el,es]=eo(ea),ec=a.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:o,defaultOpen:i,disabled:l,onOpenChange:s,...c}=e,[u,d]=X({prop:o,defaultProp:i??!1,onChange:s,caller:ea});return(0,r.jsx)(el,{scope:n,disabled:l,contentId:en(),open:u,onOpenToggle:a.useCallback(()=>d(e=>!e),[d]),children:(0,r.jsx)(Z.div,{"data-state":ep(u),"data-disabled":l?"":void 0,...c,ref:t})})});ec.displayName=ea;var eu="CollapsibleTrigger",ed=a.forwardRef((e,t)=>{let{__scopeCollapsible:n,...a}=e,o=es(eu,n);return(0,r.jsx)(Z.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ep(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...a,ref:t,onClick:K(e.onClick,o.onOpenToggle)})});ed.displayName=eu;var em="CollapsibleContent",ef=a.forwardRef((e,t)=>{let{forceMount:n,...a}=e,o=es(em,e.__scopeCollapsible);return(0,r.jsx)(J,{present:n||o.open,children:({present:e})=>(0,r.jsx)(eh,{...a,ref:t,present:e})})});ef.displayName=em;var eh=a.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:o,children:i,...l}=e,s=es(em,n),[c,u]=a.useState(o),d=a.useRef(null),m=G(t,d),f=a.useRef(0),h=f.current,p=a.useRef(0),g=p.current,v=s.open||c,x=a.useRef(v),y=a.useRef(void 0);return a.useEffect(()=>{let e=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(e)},[]),Q(()=>{let e=d.current;if(e){y.current=y.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();f.current=t.height,p.current=t.width,x.current||(e.style.transitionDuration=y.current.transitionDuration,e.style.animationName=y.current.animationName),u(o)}},[s.open,o]),(0,r.jsx)(Z.div,{"data-state":ep(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!v,...l,ref:m,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:v&&i})});function ep(e){return e?"open":"closed"}var eg=a.createContext(void 0),ev="Accordion",ex=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ey,eb,e_]=function(e){let t=e+"CollectionProvider",[n,o]=A(t),[i,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:n}=e,o=a.default.useRef(null),l=a.default.useRef(new Map).current;return(0,r.jsx)(i,{scope:t,itemMap:l,collectionRef:o,children:n})};s.displayName=t;let c=e+"CollectionSlot",u=W(c),d=a.default.forwardRef((e,t)=>{let{scope:n,children:a}=e,o=G(t,l(c,n).collectionRef);return(0,r.jsx)(u,{ref:o,children:a})});d.displayName=c;let m=e+"CollectionItemSlot",f="data-radix-collection-item",h=W(m),p=a.default.forwardRef((e,t)=>{let{scope:n,children:o,...i}=e,s=a.default.useRef(null),c=G(t,s),u=l(m,n);return a.default.useEffect(()=>(u.itemMap.set(s,{ref:s,...i}),()=>void u.itemMap.delete(s))),(0,r.jsx)(h,{...{[f]:""},ref:c,children:o})});return p.displayName=m,[{Provider:s,Slot:d,ItemSlot:p},function(t){let r=l(e+"CollectionConsumer",t);return a.default.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},o]}(ev),[eS,ew]=A(ev,[e_,ei]),eC=ei(),ej=a.default.forwardRef((e,t)=>{let{type:n,...a}=e;return(0,r.jsx)(ey.Provider,{scope:e.__scopeAccordion,children:"multiple"===n?(0,r.jsx)(eD,{...a,ref:t}):(0,r.jsx)(eR,{...a,ref:t})})});ej.displayName=ev;var[eM,ek]=eS(ev),[eT,eN]=eS(ev,{collapsible:!1}),eR=a.default.forwardRef((e,t)=>{let{value:n,defaultValue:o,onValueChange:i=()=>{},collapsible:l=!1,...s}=e,[c,u]=X({prop:n,defaultProp:o??"",onChange:i,caller:ev});return(0,r.jsx)(eM,{scope:e.__scopeAccordion,value:a.default.useMemo(()=>c?[c]:[],[c]),onItemOpen:u,onItemClose:a.default.useCallback(()=>l&&u(""),[l,u]),children:(0,r.jsx)(eT,{scope:e.__scopeAccordion,collapsible:l,children:(0,r.jsx)(eI,{...s,ref:t})})})}),eD=a.default.forwardRef((e,t)=>{let{value:n,defaultValue:o,onValueChange:i=()=>{},...l}=e,[s,c]=X({prop:n,defaultProp:o??[],onChange:i,caller:ev}),u=a.default.useCallback(e=>c((t=[])=>[...t,e]),[c]),d=a.default.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return(0,r.jsx)(eM,{scope:e.__scopeAccordion,value:s,onItemOpen:u,onItemClose:d,children:(0,r.jsx)(eT,{scope:e.__scopeAccordion,collapsible:!0,children:(0,r.jsx)(eI,{...l,ref:t})})})}),[eL,eF]=eS(ev),eI=a.default.forwardRef((e,t)=>{let n,{__scopeAccordion:o,disabled:i,dir:l,orientation:s="vertical",...c}=e,u=G(a.default.useRef(null),t),d=eb(o),m="ltr"===(n=a.useContext(eg),l||n||"ltr"),f=K(e.onKeyDown,e=>{if(!ex.includes(e.key))return;let t=e.target,r=d().filter(e=>!e.ref.current?.disabled),n=r.findIndex(e=>e.ref.current===t),a=r.length;if(-1===n)return;e.preventDefault();let o=n,i=a-1,l=()=>{(o=n+1)>i&&(o=0)},c=()=>{(o=n-1)<0&&(o=i)};switch(e.key){case"Home":o=0;break;case"End":o=i;break;case"ArrowRight":"horizontal"===s&&(m?l():c());break;case"ArrowDown":"vertical"===s&&l();break;case"ArrowLeft":"horizontal"===s&&(m?c():l());break;case"ArrowUp":"vertical"===s&&c()}let u=o%a;r[u].ref.current?.focus()});return(0,r.jsx)(eL,{scope:o,disabled:i,direction:l,orientation:s,children:(0,r.jsx)(ey.Slot,{scope:o,children:(0,r.jsx)(Z.div,{...c,"data-orientation":s,ref:u,onKeyDown:i?void 0:f})})})}),eE="AccordionItem",[eB,eP]=eS(eE),eA=a.default.forwardRef((e,t)=>{let{__scopeAccordion:n,value:a,...o}=e,i=eF(eE,n),l=ek(eE,n),s=eC(n),c=en(),u=a&&l.value.includes(a)||!1,d=i.disabled||e.disabled;return(0,r.jsx)(eB,{scope:n,open:u,disabled:d,triggerId:c,children:(0,r.jsx)(ec,{"data-orientation":i.orientation,"data-state":eO(u),...s,...o,ref:t,disabled:d,open:u,onOpenChange:e=>{e?l.onItemOpen(a):l.onItemClose(a)}})})});eA.displayName=eE;var ez="AccordionHeader";a.default.forwardRef((e,t)=>{let{__scopeAccordion:n,...a}=e,o=eF(ev,n),i=eP(ez,n);return(0,r.jsx)(Z.h3,{"data-orientation":o.orientation,"data-state":eO(i.open),"data-disabled":i.disabled?"":void 0,...a,ref:t})}).displayName=ez;var eU="AccordionTrigger",eG=a.default.forwardRef((e,t)=>{let{__scopeAccordion:n,...a}=e,o=eF(ev,n),i=eP(eU,n),l=eN(eU,n),s=eC(n);return(0,r.jsx)(ey.ItemSlot,{scope:n,children:(0,r.jsx)(ed,{"aria-disabled":i.open&&!l.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId,...s,...a,ref:t})})});eG.displayName=eU;var eW="AccordionContent",eH=a.default.forwardRef((e,t)=>{let{__scopeAccordion:n,...a}=e,o=eF(ev,n),i=eP(eW,n),l=eC(n);return(0,r.jsx)(ef,{role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation,...l,...a,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});function eO(e){return e?"open":"closed"}function eV(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m190.06 414 163.12-139.78a24 24 0 0 0 0-36.44L190.06 98c-15.57-13.34-39.62-2.28-39.62 18.22v279.6c0 20.5 24.05 31.56 39.62 18.18z"},child:[]}]})(e)}eH.displayName=eW;var eq=e.i(81323);function e$(e){let t,a=(0,n.c)(2);return a[0]!==e?(t=(0,r.jsx)(ej,{className:eq.default.AccordionGroup,...e}),a[0]=e,a[1]=t):t=a[1],t}function eK(e){let t,a,o,i,l=(0,n.c)(9),{value:s,label:c,children:u}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,r.jsx)(eV,{className:eq.default.TriggerIcon}),l[0]=t):t=l[0],l[1]!==c?(a=(0,r.jsxs)(eG,{className:eq.default.Trigger,children:[t," ",c]}),l[1]=c,l[2]=a):a=l[2],l[3]!==u?(o=(0,r.jsx)(eH,{className:eq.default.Content,children:(0,r.jsx)("div",{className:eq.default.Body,children:u})}),l[3]=u,l[4]=o):o=l[4],l[5]!==a||l[6]!==o||l[7]!==s?(i=(0,r.jsxs)(eA,{value:s,children:[a,o]}),l[5]=a,l[6]=o,l[7]=s,l[8]=i):i=l[8],i}var eQ=e.i(65883),eY=e.i(21025),eX=e.i(92224),eZ=e.i(91996);let eJ=["controls","preferences","audio"];function e0(e){let t,o,i,l,s,c,u,d,f,p,v,x,y,b,S,w,j,M,N,R,L,F,E,B,P,A,z,U,G,W,H,O,V,q,$,K,Q,Y,X,Z,J,ee,et,er,en,ea,eo,ei,el,es,ec,eu,ed,em,ef,eh,ep,eg,ev,ex,ey,eb,e_,eS,ew,eC,ej,eM,ek,eT,eN,eR,eD=(0,n.c)(169),{missionName:eL,missionType:eF,onOpenMapInfo:eI,onOpenServerBrowser:eE,onChooseMap:eB,onCancelChoosingMap:eP,choosingMap:eA,cameraRef:ez,invalidateRef:eU}=e,eG=(0,eY.useTouchDevice)(),eW=(0,eX.useDataSource)(),eH=(0,T.useRecording)(),eO=(0,eX.useMissionName)(),eV="demo"===eW||"live"===eW?eO:eL;eD[0]!==eV?(t=!!eV&&(0,eZ.hasMission)(eV),eD[0]=eV,eD[1]=t):t=eD[1];let eq=t,e0=(0,k.useLiveSelector)(e1),{fogEnabled:e2,setFogEnabled:e3,fov:e5,setFov:e4,audioEnabled:e6,setAudioEnabled:e8,audioVolume:e7,setAudioVolume:e9,animationEnabled:te,setAnimationEnabled:tt}=(0,_.useSettings)(),{speedMultiplier:tr,setSpeedMultiplier:tn,touchMode:ta,setTouchMode:to,invertScroll:ti,setInvertScroll:tl,invertDrag:ts,setInvertDrag:tc,invertJoystick:tu,setInvertJoystick:td}=(0,_.useControls)(),{debugMode:tm,setDebugMode:tf,renderOnDemand:th,setRenderOnDemand:tp}=(0,_.useDebug)(),[tg,tv]=(0,a.useState)(!1),tx=(0,a.useRef)(null),ty=(0,a.useRef)(null),tb=(0,a.useRef)(null);eD[2]!==tg?(o=()=>{tg&&tx.current?.focus()},i=[tg],eD[2]=tg,eD[3]=o,eD[4]=i):(o=eD[3],i=eD[4]),(0,a.useEffect)(o,i),eD[5]===Symbol.for("react.memo_cache_sentinel")?(l=e=>{let t=e.relatedTarget;t&&tb.current?.contains(t)||tv(!1)},eD[5]=l):l=eD[5];let t_=l;eD[6]===Symbol.for("react.memo_cache_sentinel")?(s=e=>{"Escape"===e.key&&(tv(!1),ty.current?.focus())},eD[6]=s):s=eD[6];let tS=s,tw="map"===eW&&!eH||eA;eD[7]===Symbol.for("react.memo_cache_sentinel")?(c=(0,r.jsx)(m,{}),u=(0,r.jsx)("span",{className:eQ.default.ButtonLabel,children:"Explore"}),d=(0,r.jsx)("span",{className:eQ.default.ButtonHint,children:"Browse maps"}),eD[7]=c,eD[8]=u,eD[9]=d):(c=eD[7],u=eD[8],d=eD[9]),eD[10]!==eB||eD[11]!==tw?(f=(0,r.jsxs)("button",{type:"button",className:eQ.default.IconButton,"data-active":tw,onClick:eB,children:[c,u,d]}),eD[10]=eB,eD[11]=tw,eD[12]=f):f=eD[12];let tC=!eA&&eH?.source==="demo";eD[13]!==eA||eD[14]!==eP||eD[15]!==tC?(p=(0,r.jsx)(D,{isActive:tC,choosingMap:eA,onCancelChoosingMap:eP}),eD[13]=eA,eD[14]=eP,eD[15]=tC,eD[16]=p):p=eD[16],eD[17]!==eA||eD[18]!==e0||eD[19]!==eE?(v=eE&&(0,r.jsx)(I,{isActive:!eA&&e0,onOpenServerBrowser:eE}),eD[17]=eA,eD[18]=e0,eD[19]=eE,eD[20]=v):v=eD[20],eD[21]!==f||eD[22]!==p||eD[23]!==v?(x=(0,r.jsxs)("div",{className:eQ.default.ButtonGroup,children:[f,p,v]}),eD[21]=f,eD[22]=p,eD[23]=v,eD[24]=x):x=eD[24];let tj=!eq;eD[25]!==ez||eD[26]!==eL||eD[27]!==eF||eD[28]!==tj?(y=(0,r.jsx)(C,{missionName:eL,missionType:eF,cameraRef:ez,disabled:tj}),eD[25]=ez,eD[26]=eL,eD[27]=eF,eD[28]=tj,eD[29]=y):y=eD[29];let tM=!eq;eD[30]===Symbol.for("react.memo_cache_sentinel")?(b=(0,r.jsx)(g,{}),S=(0,r.jsx)("span",{className:eQ.default.ButtonLabel,children:"Show map info"}),eD[30]=b,eD[31]=S):(b=eD[30],S=eD[31]),eD[32]!==eI||eD[33]!==tM?(w=(0,r.jsxs)("button",{type:"button",className:eQ.default.MapInfoButton,"aria-label":"Show map info",onClick:eI,disabled:tM,children:[b,S]}),eD[32]=eI,eD[33]=tM,eD[34]=w):w=eD[34],eD[35]!==x||eD[36]!==y||eD[37]!==w?(j=(0,r.jsxs)("div",{className:eQ.default.Tools,children:[x,y,w]}),eD[35]=x,eD[36]=y,eD[37]=w,eD[38]=j):j=eD[38],eD[39]===Symbol.for("react.memo_cache_sentinel")?(M=(0,r.jsx)("label",{htmlFor:"speedInput",children:"Fly speed"}),eD[39]=M):M=eD[39],eD[40]!==tr?(N=Math.round(100*tr),eD[40]=tr,eD[41]=N):N=eD[41],eD[42]!==tn?(R=e=>tn(parseFloat(e.target.value)/100),eD[42]=tn,eD[43]=R):R=eD[43],eD[44]!==N||eD[45]!==R?(L=(0,r.jsx)("input",{id:"speedInput",type:"range",min:1,max:100,step:1,value:N,onChange:R}),eD[44]=N,eD[45]=R,eD[46]=L):L=eD[46];let tk=!1===eG?" Use your scroll wheel or trackpad to adjust while flying.":"";return eD[47]!==tk?(F=(0,r.jsxs)("p",{className:eQ.default.Description,children:["How fast you move in free-flying mode.",tk]}),eD[47]=tk,eD[48]=F):F=eD[48],eD[49]!==L||eD[50]!==F?(E=(0,r.jsxs)("div",{className:eQ.default.Field,children:[M,L,F]}),eD[49]=L,eD[50]=F,eD[51]=E):E=eD[51],eD[52]!==eG||eD[53]!==to||eD[54]!==ta?(B=eG?(0,r.jsxs)("div",{className:eQ.default.Field,children:[(0,r.jsx)("label",{htmlFor:"touchModeInput",children:"Joystick"})," ",(0,r.jsxs)("select",{id:"touchModeInput",value:ta,onChange:e=>to(e.target.value),children:[(0,r.jsx)("option",{value:"dualStick",children:"Dual stick"}),(0,r.jsx)("option",{value:"moveLookStick",children:"Single stick"})]}),(0,r.jsx)("p",{className:eQ.default.Description,children:"Single stick has a unified move + look control. Dual stick has independent move + look."})]}):null,eD[52]=eG,eD[53]=to,eD[54]=ta,eD[55]=B):B=eD[55],eD[56]!==ti||eD[57]!==eG||eD[58]!==tl?(P=!1===eG?(0,r.jsxs)("div",{className:eQ.default.CheckboxField,children:[(0,r.jsx)("input",{id:"invertScroll",type:"checkbox",checked:ti,onChange:e=>{tl(e.target.checked)}}),(0,r.jsx)("label",{className:eQ.default.Label,htmlFor:"invertScroll",children:"Invert scroll direction"}),(0,r.jsx)("p",{className:eQ.default.Description,children:"Reverse which scroll direction increases and decreases fly speed."})]}):null,eD[56]=ti,eD[57]=eG,eD[58]=tl,eD[59]=P):P=eD[59],eD[60]!==tu||eD[61]!==eG||eD[62]!==td?(A=eG?(0,r.jsxs)("div",{className:eQ.default.CheckboxField,children:[(0,r.jsx)("input",{id:"invertJoystick",type:"checkbox",checked:tu,onChange:e=>{td(e.target.checked)}}),(0,r.jsx)("label",{className:eQ.default.Label,htmlFor:"invertJoystick",children:"Invert joystick direction"}),(0,r.jsx)("p",{className:eQ.default.Description,children:"Reverse joystick look direction."})]}):null,eD[60]=tu,eD[61]=eG,eD[62]=td,eD[63]=A):A=eD[63],eD[64]!==tc?(z=e=>{tc(e.target.checked)},eD[64]=tc,eD[65]=z):z=eD[65],eD[66]!==ts||eD[67]!==z?(U=(0,r.jsx)("input",{id:"invertDrag",type:"checkbox",checked:ts,onChange:z}),eD[66]=ts,eD[67]=z,eD[68]=U):U=eD[68],eD[69]===Symbol.for("react.memo_cache_sentinel")?(G=(0,r.jsx)("label",{className:eQ.default.Label,htmlFor:"invertDrag",children:"Invert drag direction"}),W=(0,r.jsx)("p",{className:eQ.default.Description,children:"Reverse how dragging the viewport aims the camera."}),eD[69]=G,eD[70]=W):(G=eD[69],W=eD[70]),eD[71]!==U?(H=(0,r.jsxs)("div",{className:eQ.default.CheckboxField,children:[U,G,W]}),eD[71]=U,eD[72]=H):H=eD[72],eD[73]!==E||eD[74]!==B||eD[75]!==P||eD[76]!==A||eD[77]!==H?(O=(0,r.jsxs)(eK,{value:"controls",label:"Controls",children:[E,B,P,A,H]}),eD[73]=E,eD[74]=B,eD[75]=P,eD[76]=A,eD[77]=H,eD[78]=O):O=eD[78],eD[79]===Symbol.for("react.memo_cache_sentinel")?(V=(0,r.jsx)("label",{htmlFor:"fovInput",children:"FOV"}),eD[79]=V):V=eD[79],eD[80]!==e5?(q=(0,r.jsxs)("output",{htmlFor:"fovInput",children:[e5,"°"]}),eD[80]=e5,eD[81]=q):q=eD[81],eD[82]!==e4?($=e=>e4(parseInt(e.target.value)),eD[82]=e4,eD[83]=$):$=eD[83],eD[84]!==e5||eD[85]!==$?(K=(0,r.jsx)("input",{id:"fovInput",type:"range",min:75,max:120,step:5,value:e5,onChange:$}),eD[84]=e5,eD[85]=$,eD[86]=K):K=eD[86],eD[87]!==q||eD[88]!==K?(Q=(0,r.jsx)(eK,{value:"preferences",label:"Preferences",children:(0,r.jsxs)("div",{className:eQ.default.Field,children:[V,(0,r.jsxs)("div",{className:eQ.default.Control,children:[q,K]})]})}),eD[87]=q,eD[88]=K,eD[89]=Q):Q=eD[89],eD[90]!==e8?(Y=e=>{e8(e.target.checked)},eD[90]=e8,eD[91]=Y):Y=eD[91],eD[92]!==e6||eD[93]!==Y?(X=(0,r.jsx)("input",{id:"audioInput",type:"checkbox",checked:e6,onChange:Y}),eD[92]=e6,eD[93]=Y,eD[94]=X):X=eD[94],eD[95]===Symbol.for("react.memo_cache_sentinel")?(Z=(0,r.jsx)("label",{className:eQ.default.Label,htmlFor:"audioInput",children:"Enable audio"}),eD[95]=Z):Z=eD[95],eD[96]!==X?(J=(0,r.jsxs)("div",{className:eQ.default.CheckboxField,children:[X,Z]}),eD[96]=X,eD[97]=J):J=eD[97],eD[98]===Symbol.for("react.memo_cache_sentinel")?(ee=(0,r.jsx)("label",{htmlFor:"volumeInput",children:"Master volume"}),eD[98]=ee):ee=eD[98],eD[99]!==e7?(et=Math.round(100*e7),eD[99]=e7,eD[100]=et):et=eD[100],eD[101]!==et?(er=(0,r.jsxs)("output",{htmlFor:"volumeInput",children:[et,"%"]}),eD[101]=et,eD[102]=er):er=eD[102],eD[103]!==e9?(en=e=>e9(parseFloat(e.target.value)),eD[103]=e9,eD[104]=en):en=eD[104],eD[105]!==e7||eD[106]!==en?(ea=(0,r.jsx)("input",{id:"volumeInput",type:"range",min:0,max:1,step:.05,value:e7,onChange:en}),eD[105]=e7,eD[106]=en,eD[107]=ea):ea=eD[107],eD[108]!==er||eD[109]!==ea?(eo=(0,r.jsxs)("div",{className:eQ.default.Field,children:[ee,(0,r.jsxs)("div",{className:eQ.default.Control,children:[er,ea]})]}),eD[108]=er,eD[109]=ea,eD[110]=eo):eo=eD[110],eD[111]!==J||eD[112]!==eo?(ei=(0,r.jsxs)(eK,{value:"audio",label:"Audio",children:[J,eo]}),eD[111]=J,eD[112]=eo,eD[113]=ei):ei=eD[113],eD[114]!==e3?(el=e=>{e3(e.target.checked)},eD[114]=e3,eD[115]=el):el=eD[115],eD[116]!==e2||eD[117]!==el?(es=(0,r.jsx)("input",{id:"fogInput",type:"checkbox",checked:e2,onChange:el}),eD[116]=e2,eD[117]=el,eD[118]=es):es=eD[118],eD[119]===Symbol.for("react.memo_cache_sentinel")?(ec=(0,r.jsx)("label",{className:eQ.default.Label,htmlFor:"fogInput",children:"Enable fog"}),eD[119]=ec):ec=eD[119],eD[120]!==es?(eu=(0,r.jsxs)("div",{className:eQ.default.CheckboxField,children:[es,ec]}),eD[120]=es,eD[121]=eu):eu=eD[121],eD[122]!==tt?(ed=e=>{tt(e.target.checked)},eD[122]=tt,eD[123]=ed):ed=eD[123],eD[124]!==te||eD[125]!==ed?(em=(0,r.jsx)("input",{id:"animationInput",type:"checkbox",checked:te,onChange:ed}),eD[124]=te,eD[125]=ed,eD[126]=em):em=eD[126],eD[127]===Symbol.for("react.memo_cache_sentinel")?(ef=(0,r.jsx)("label",{className:eQ.default.Label,htmlFor:"animationInput",children:"Enable animations"}),eD[127]=ef):ef=eD[127],eD[128]!==em?(eh=(0,r.jsxs)("div",{className:eQ.default.CheckboxField,children:[em,ef]}),eD[128]=em,eD[129]=eh):eh=eD[129],eD[130]!==eu||eD[131]!==eh?(ep=(0,r.jsxs)(eK,{value:"graphics",label:"Graphics",children:[eu,eh]}),eD[130]=eu,eD[131]=eh,eD[132]=ep):ep=eD[132],eD[133]!==tf?(eg=e=>{tf(e.target.checked)},eD[133]=tf,eD[134]=eg):eg=eD[134],eD[135]!==tm||eD[136]!==eg?(ev=(0,r.jsx)("input",{id:"debugInput",type:"checkbox",checked:tm,onChange:eg}),eD[135]=tm,eD[136]=eg,eD[137]=ev):ev=eD[137],eD[138]===Symbol.for("react.memo_cache_sentinel")?(ex=(0,r.jsx)("label",{className:eQ.default.Label,htmlFor:"debugInput",children:"Render debug visuals"}),eD[138]=ex):ex=eD[138],eD[139]!==ev?(ey=(0,r.jsxs)("div",{className:eQ.default.CheckboxField,children:[ev,ex]}),eD[139]=ev,eD[140]=ey):ey=eD[140],eD[141]!==tp?(eb=e=>{tp(e.target.checked)},eD[141]=tp,eD[142]=eb):eb=eD[142],eD[143]!==th||eD[144]!==eb?(e_=(0,r.jsx)("input",{id:"onDemandInput",type:"checkbox",checked:th,onChange:eb}),eD[143]=th,eD[144]=eb,eD[145]=e_):e_=eD[145],eD[146]===Symbol.for("react.memo_cache_sentinel")?(eS=(0,r.jsx)("label",{htmlFor:"onDemandInput",children:"Render on demand "}),eD[146]=eS):eS=eD[146],eD[147]!==eU?(ew=()=>eU.current?.(),eD[147]=eU,eD[148]=ew):ew=eD[148],eD[149]===Symbol.for("react.memo_cache_sentinel")?(eC=(0,r.jsx)(h,{}),eD[149]=eC):eC=eD[149],eD[150]!==ew?(ej=(0,r.jsxs)("div",{className:eQ.default.Label,children:[eS,(0,r.jsx)("button",{type:"button",className:eQ.default.ForceRenderButton,title:"Force render","aria-label":"Force render",onClick:ew,children:eC})]}),eD[150]=ew,eD[151]=ej):ej=eD[151],eD[152]===Symbol.for("react.memo_cache_sentinel")?(eM=(0,r.jsx)("p",{className:eQ.default.Description,children:"Significantly decreases CPU and GPU usage by only rendering frames when requested. Helpful when developing parts of the app unrelated to rendering."}),eD[152]=eM):eM=eD[152],eD[153]!==e_||eD[154]!==ej?(ek=(0,r.jsxs)("div",{className:eQ.default.CheckboxField,children:[e_,ej,eM]}),eD[153]=e_,eD[154]=ej,eD[155]=ek):ek=eD[155],eD[156]!==ey||eD[157]!==ek?(eT=(0,r.jsxs)(eK,{value:"debug",label:"Debug",children:[ey,ek]}),eD[156]=ey,eD[157]=ek,eD[158]=eT):eT=eD[158],eD[159]!==O||eD[160]!==Q||eD[161]!==ei||eD[162]!==ep||eD[163]!==eT?(eN=(0,r.jsx)("div",{className:eQ.default.Accordions,children:(0,r.jsxs)(e$,{type:"multiple",defaultValue:eJ,children:[O,Q,ei,ep,eT]})}),eD[159]=O,eD[160]=Q,eD[161]=ei,eD[162]=ep,eD[163]=eT,eD[164]=eN):eN=eD[164],eD[165]!==tg||eD[166]!==j||eD[167]!==eN?(eR=(0,r.jsx)("div",{className:eQ.default.InspectorControls,children:(0,r.jsx)("div",{ref:tb,children:(0,r.jsxs)("div",{className:eQ.default.Dropdown,ref:tx,id:"settingsPanel",tabIndex:-1,onKeyDown:tS,onBlur:t_,"data-open":tg,children:[j,eN]})})}),eD[165]=tg,eD[166]=j,eD[167]=eN,eD[168]=eR):eR=eD[168],eR}function e1(e){return"connected"===e.gameStatus||"authenticating"===e.gameStatus}var e2=e.i(11889),e3=e.i(56373),e5=e.i(86447),e4=e.i(1559),e6=e.i(78440),e8=e.i(59129),e7=e.i(25998),e9=e.i(18364),te=e.i(68754),tt=e.i(70238),tr=e.i(29402),tn=e.i(97442);let ta=new Set(["SkiFree","SkiFree_Daily","SkiFree_Randomizer"]),to={"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)"},ti={"z_mappacks/DM":"DM","z_mappacks/LCTF":"LCTF","z_mappacks/Lak":"LakRabbit"},tl=(0,eZ.getMissionList)().filter(e=>!ta.has(e)).map(e=>{let t,r=(0,eZ.getMissionInfo)(e),[n]=(0,eZ.getSourceAndPath)(r.resourcePath),a=(t=n.match(/^(.*)(\/[^/]+)$/))?t[1]:"",o=to[n]??ti[a]??null;return{resourcePath:r.resourcePath,missionName:e,displayName:r.displayName,sourcePath:n,groupName:o,missionTypes:r.missionTypes}}),ts=new Map(tl.map(e=>[e.missionName,e])),tc=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,tr.default)(e,[e=>(e.displayName||e.missionName).toLowerCase()],["asc"]))}),(0,tr.default)(Array.from(t.entries()),[([e])=>"Official"===e?0:null==e?2:1,([e])=>e?e.toLowerCase():""],["asc","asc"])}(tl),tu="u">typeof navigator&&/Mac|iPhone|iPad|iPod/.test(navigator.platform);function td(e){let t,a,o,i,l,s=(0,n.c)(12),{mission:c}=e,u=c.displayName||c.missionName;return s[0]!==u?(t=(0,r.jsx)("span",{className:tn.default.ItemName,children:u}),s[0]=u,s[1]=t):t=s[1],s[2]!==c.missionTypes?(a=c.missionTypes.length>0&&(0,r.jsx)("span",{className:tn.default.ItemTypes,children:c.missionTypes.map(tm)}),s[2]=c.missionTypes,s[3]=a):a=s[3],s[4]!==t||s[5]!==a?(o=(0,r.jsxs)("span",{className:tn.default.ItemHeader,children:[t,a]}),s[4]=t,s[5]=a,s[6]=o):o=s[6],s[7]!==c.missionName?(i=(0,r.jsx)("span",{className:tn.default.ItemMissionName,children:c.missionName}),s[7]=c.missionName,s[8]=i):i=s[8],s[9]!==o||s[10]!==i?(l=(0,r.jsxs)(r.Fragment,{children:[o,i]}),s[9]=o,s[10]=i,s[11]=l):l=s[11],l}function tm(e){return(0,r.jsx)("span",{className:tn.default.ItemType,"data-mission-type":e,children:e},e)}function tf(e){let t,o,i,l,s,c,u,d,m,f,h,p,g,v,x,y,b,_=(0,n.c)(48),{value:S,missionType:w,onChange:C,disabled:j,autoFocus:M}=e,[k,T]=(0,a.useState)(""),N=(0,a.useRef)(null),R=(0,a.useRef)(w);_[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{(0,a.startTransition)(()=>T(e))},_[0]=t):t=_[0];let D=(0,e9.useComboboxStore)({resetValueOnHide:!0,selectedValue:S,setSelectedValue:e=>{if(e){let t=R.current,r=(0,eZ.getMissionInfo)(e).missionTypes;t&&r.includes(t)||(t=r[0]),C({missionName:e,missionType:t}),N.current?.blur()}},setValue:t}),L=(0,te.useStoreState)(D,"open");_[1]!==D?(o=()=>{let e=e=>{"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),N.current?.focus(),D.show())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},i=[D],_[1]=D,_[2]=o,_[3]=i):(o=_[2],i=_[3]),(0,a.useEffect)(o,i),_[4]!==S?(l=ts.get(S),_[4]=S,_[5]=l):l=_[5];let F=l;e:{let e,t;if(!k){let e;_[6]===Symbol.for("react.memo_cache_sentinel")?(e={type:"grouped",groups:tc},_[6]=e):e=_[6],s=e;break e}_[7]!==k?(e=(0,tt.matchSorter)(tl,k,{keys:["displayName","missionName","missionTypes","groupName"]}),_[7]=k,_[8]=e):e=_[8];let r=e;_[9]!==r?(t={type:"flat",missions:r},_[9]=r,_[10]=t):t=_[10],s=t}let I=s,E=F?F.displayName||F.missionName:S,B="flat"===I.type?0===I.missions.length:0===I.groups.length,P=e=>(0,r.jsx)(e3.ComboboxItem,{value:e.missionName,className:tn.default.Item,focusOnHover:!0,onClick:t=>{if(t.target&&t.target instanceof HTMLElement){let r=t.target.dataset.missionType;r?(R.current=r,e.missionName===S&&C({missionName:e.missionName,missionType:r})):R.current=null}else R.current=null},children:(0,r.jsx)(td,{mission:e})},e.missionName),A=e6.ComboboxProvider,z=L?"visible":"hidden";_[11]===Symbol.for("react.memo_cache_sentinel")?(c=(0,r.jsx)("div",{className:tn.default.Backdrop}),_[11]=c):c=_[11],_[12]!==z?(u=(0,r.jsx)(a.Activity,{mode:z,children:c}),_[12]=z,_[13]=u):u=_[13];let U=F?void 0:"Choose a map…";_[14]!==D?(d=()=>{try{document.exitPointerLock()}catch{}D.show()},m=e=>{"Escape"!==e.key||D.getState().open||N.current?.blur()},_[14]=D,_[15]=d,_[16]=m):(d=_[15],m=_[16]),_[17]!==M||_[18]!==j||_[19]!==d||_[20]!==m||_[21]!==U?(f=(0,r.jsx)(e2.Combobox,{ref:N,autoSelect:!0,autoFocus:M,disabled:j,placeholder:U,className:tn.default.Input,onFocus:d,onKeyDown:m}),_[17]=M,_[18]=j,_[19]=d,_[20]=m,_[21]=U,_[22]=f):f=_[22],_[23]!==E||_[24]!==w||_[25]!==F?(h=F&&(0,r.jsxs)("div",{className:tn.default.SelectedValue,children:[(0,r.jsx)("span",{className:tn.default.SelectedName,children:E}),w&&(0,r.jsx)("span",{className:tn.default.ItemType,"data-mission-type":w,children:w})]}),_[23]=E,_[24]=w,_[25]=F,_[26]=h):h=_[26],_[27]===Symbol.for("react.memo_cache_sentinel")?(p=(0,r.jsx)("kbd",{className:tn.default.Shortcut,children:tu?"⌘K":"^K"}),_[27]=p):p=_[27],_[28]!==f||_[29]!==h?(g=(0,r.jsxs)("div",{className:tn.default.InputWrapper,children:[f,h,p]}),_[28]=f,_[29]=h,_[30]=g):g=_[30];let G=e4.ComboboxPopover,W=tn.default,H=e5.ComboboxList,O=tn.default,V="flat"===I.type?I.missions.map(P):I.groups.map(e=>{let[t,n]=e;return t?(0,r.jsxs)(e8.ComboboxGroup,{className:tn.default.Group,children:[(0,r.jsx)(e7.ComboboxGroupLabel,{className:tn.default.GroupLabel,children:t}),n.map(P)]},t):(0,r.jsx)(a.Fragment,{children:n.map(P)},"ungrouped")});return _[31]!==B?(v=B&&(0,r.jsx)("div",{className:tn.default.NoResults,children:"No missions found"}),_[31]=B,_[32]=v):v=_[32],_[33]!==H||_[34]!==O.List||_[35]!==V||_[36]!==v?(x=(0,r.jsxs)(H,{className:O.List,children:[V,v]}),_[33]=H,_[34]=O.List,_[35]=V,_[36]=v,_[37]=x):x=_[37],_[38]!==G||_[39]!==W.Popover||_[40]!==x?(y=(0,r.jsx)(G,{gutter:4,fitViewport:!0,autoFocusOnHide:!1,className:W.Popover,children:x}),_[38]=G,_[39]=W.Popover,_[40]=x,_[41]=y):y=_[41],_[42]!==A||_[43]!==D||_[44]!==g||_[45]!==y||_[46]!==u?(b=(0,r.jsxs)(A,{store:D,children:[u,g,y]}),_[42]=A,_[43]=D,_[44]=g,_[45]=y,_[46]=u,_[47]=b):b=_[47],b}var th=e.i(58647);function tp(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m12 6-6 8h12zM6 16h12v2H6z"},child:[]}]})(e)}var tg=e.i(16964);function tv(){let e,t,a,o,i,l,s=(0,n.c)(24),c=(0,eX.useDataSource)(),u=(0,eX.useMissionDisplayName)(),d=(0,eX.useMissionType)(),m=(0,eX.useMissionTypeDisplayName)(),f=(0,eX.useServerDisplayName)(),h=(0,eX.useRecorderName)(),g=(0,eX.useRecordingDate)(),[v,x]=g?g.split(" "):[null,null],y="live"===c,b=(0,T.useRecording)(),_=(0,k.useLiveSelector)(tb),S=tg.default;s[0]!==u||s[1]!==d||s[2]!==m?(e=u&&d?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:tg.default.MissionName,children:u}),d&&(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)("span",{className:tg.default.MissionType,"data-mission-type":d,children:"LCTF"===m?"LCTF":d})]})]}):null,s[0]=u,s[1]=d,s[2]=m,s[3]=e):e=s[3],s[4]!==e?(t=(0,r.jsx)("div",{className:tg.default.MissionInfo,children:e}),s[4]=e,s[5]=t):t=s[5];let w=tg.default,C=y?_?h?(0,r.jsxs)("div",{className:tg.default.Attribution,children:["Connected as"," ",(0,r.jsx)("span",{className:tg.default.PlayerName,children:h})]}):null:(0,r.jsx)("div",{className:tg.default.Error,children:"Disconnected"}):h&&g?(0,r.jsxs)("div",{className:tg.default.Attribution,children:["Recorded by ",(0,r.jsx)("span",{className:tg.default.PlayerName,children:h})," ","on"," ",(0,r.jsx)("span",{className:tg.default.RecordingDate,children:v.replace(/-/g," ")})," ","at ",(0,r.jsx)("span",{className:tg.default.RecordingDate,children:x})]}):null;return s[6]!==f?(a=f?(0,r.jsxs)("div",{className:tg.default.ServerInfo,children:["Server: ",(0,r.jsx)("span",{className:tg.default.ServerName,children:f})]}):null,s[6]=f,s[7]=a):a=s[7],s[8]!==w.Metadata||s[9]!==C||s[10]!==a?(o=(0,r.jsxs)("div",{className:w.Metadata,children:[C,a]}),s[8]=w.Metadata,s[9]=C,s[10]=a,s[11]=o):o=s[11],s[12]!==c||s[13]!==tx||s[14]!==ty||s[15]!==y||s[16]!==_||s[17]!==b?(i="demo"===c?(0,r.jsx)("button",{type:"button",className:tg.default.ActionButton,title:"Unload demo","aria-label":"Unload demo",onClick:ty,disabled:!b,children:(0,r.jsx)(tp,{className:tg.default.EjectIcon})}):y?(0,r.jsx)("button",{type:"button",className:tg.default.ActionButton,title:"Disconnect","aria-label":"Disconnect",onClick:tx,disabled:!_,children:(0,r.jsx)(p,{})}):null,s[12]=c,s[13]=tx,s[14]=ty,s[15]=y,s[16]=_,s[17]=b,s[18]=i):i=s[18],s[19]!==S.Header||s[20]!==t||s[21]!==o||s[22]!==i?(l=(0,r.jsxs)("div",{className:S.Header,children:[t,o,i]}),s[19]=S.Header,s[20]=t,s[21]=o,s[22]=i,s[23]=l):l=s[23],l}function tx(){let e=k.liveConnectionStore.getState();e.disconnectServer(),e.disconnectRelay(),th.engineStore.getState().setRecording(null)}function ty(){th.engineStore.getState().setRecording(null)}function tb(e){return"connected"===e.gameStatus||"authenticating"===e.gameStatus}var t_=e.i(31067),tS=e.i(15080),tw=e.i(71753),tC=e.i(90072);let tj=a.forwardRef(({envMap:e,resolution:t=256,frames:r=1/0,makeDefault:n,children:o,...i},l)=>{let s=(0,tS.useThree)(({set:e})=>e),c=(0,tS.useThree)(({camera:e})=>e),u=(0,tS.useThree)(({size:e})=>e),d=a.useRef(null);a.useImperativeHandle(l,()=>d.current,[]);let m=a.useRef(null),f=function(e,t,r){let n=(0,tS.useThree)(e=>e.size),o=(0,tS.useThree)(e=>e.viewport),i="number"==typeof e?e:n.width*o.dpr,l=n.height*o.dpr,s=("number"==typeof e?void 0:e)||{},{samples:c=0,depth:u,...d}=s,m=null!=u?u:s.depthBuffer,f=a.useMemo(()=>{let e=new tC.WebGLRenderTarget(i,l,{minFilter:tC.LinearFilter,magFilter:tC.LinearFilter,type:tC.HalfFloatType,...d});return m&&(e.depthTexture=new tC.DepthTexture(i,l,tC.FloatType)),e.samples=c,e},[]);return a.useLayoutEffect(()=>{f.setSize(i,l),c&&(f.samples=c)},[c,f,i,l]),a.useEffect(()=>()=>f.dispose(),[]),f}(t);a.useLayoutEffect(()=>{i.manual||(d.current.aspect=u.width/u.height)},[u,i]),a.useLayoutEffect(()=>{d.current.updateProjectionMatrix()});let h=0,p=null,g="function"==typeof o;return(0,tw.useFrame)(t=>{g&&(r===1/0||h{if(n)return s(()=>({camera:d.current})),()=>s(()=>({camera:c}))},[d,n,s]),a.createElement(a.Fragment,null,a.createElement("perspectiveCamera",(0,t_.default)({ref:d},i),!g&&o),a.createElement("group",{ref:m},g&&o(f.texture)))});function tM(){let e,t,a=(0,n.c)(3),{fov:o}=(0,_.useSettings)();return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=[0,256,0],a[0]=e):e=a[0],a[1]!==o?(t=(0,r.jsx)(tj,{makeDefault:!0,position:e,fov:o}),a[1]=o,a[2]=t):t=a[2],t}var tk=e.i(51434);let tT=(0,a.createContext)(null);function tN(){let e=(0,a.useContext)(tT);if(!e)throw Error("useCameras must be used within CamerasProvider");return e}function tR({children:e}){let t=(0,tS.useThree)(e=>e.camera),[n,o]=(0,a.useState)(-1),[i,l]=(0,a.useState)({}),[s,c]=(0,a.useState)(()=>({initialized:!1,position:null,quarternion:null})),u=(0,a.useCallback)(e=>{l(t=>({...t,[e.id]:e}))},[]),d=(0,a.useCallback)(e=>{l(t=>{let{[e.id]:r,...n}=t;return n})},[]),m=Object.keys(i).length,f=(0,a.useCallback)(e=>{if(e>=0&&e{f(m?(n+1)%m:-1)},[m,n,f]);(0,a.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)),a=r.split(",").map(e=>parseFloat(e));c({initialized:!0,position:new tC.Vector3(...n),quarternion:new tC.Quaternion(...a)})}else c({initialized:!0,position:null,quarternion:null})};return window.addEventListener("hashchange",e),e(),()=>{window.removeEventListener("hashchange",e)}},[]),(0,a.useEffect)(()=>{s.initialized&&s.position&&(t.position.copy(s.position),s.quarternion&&t.quaternion.copy(s.quarternion))},[t,s]),(0,a.useEffect)(()=>{s.initialized&&!s.position&&m>0&&-1===n&&f(0)},[m,f,n,s]);let p=(0,a.useMemo)(()=>({registerCamera:u,unregisterCamera:d,nextCamera:h,setCameraIndex:f,cameraCount:m}),[u,d,h,f,m]);return 0===m&&-1!==n&&o(-1),(0,r.jsx)(tT.Provider,{value:p,children:e})}var tD=e.i(93784),tL=e.i(65349),tF=e.i(51475),tI=e.i(89119);let tE=(0,M.createLogger)("InputConsumer"),tB=Math.PI/2-.01,tP=1/32,tA=2*Math.PI;function tz(e){return(Math.round(e/tA*65536)<<16>>16)*tA/65536}let tU=new tC.Vector3,tG=new tC.Vector3,tW=new tC.Vector3,tH=new tC.Euler(0,0,0,"YXZ");function tO(e,t,r,n,a,o,i){if(0===n&&0===a&&0===o)return;let l=Math.sin(t),s=Math.cos(t),c=Math.sin(r),u=Math.cos(r),d=i*tP;e.x+=(s*n+l*u*a+l*c*o)*d,e.y+=(-l*n+s*u*a+s*c*o)*d,e.z+=(-c*a+u*o)*d}function tV(){let{moveQueue:e,mode:t,setMode:r}=(0,tL.useInputContext)(),n=(0,k.useLiveSelector)(e=>e.adapter),o=(0,k.useLiveSelector)(e=>e.gameStatus),i=(0,k.useLiveSelector)(e=>e.sendMoves),l=(0,th.useEngineStoreApi)(),s=(0,tS.useThree)(e=>e.camera),c=(0,tF.useGetTickFraction)(),u=(0,a.useRef)(null),d=(0,a.useRef)([]),m=(0,a.useRef)(0),f=(0,a.useRef)(0),h=(0,a.useRef)(null),p=(0,a.useRef)(0),g=(0,a.useRef)(0),v=(0,a.useRef)({x:0,y:0,z:0}),x=(0,a.useRef)(0),y=(0,a.useRef)(0),b=(0,a.useRef)({x:0,y:0,z:0}),_=(0,a.useRef)(!1),S=(0,a.useRef)({x:0,y:0,z:0}),w=(0,a.useRef)({x:0,y:0,z:0}),C=(0,a.useRef)(!1),j=(0,a.useRef)(null),M=(0,a.useRef)(0),T=(0,a.useRef)(0),N=(0,a.useRef)(0),R=(0,a.useRef)(0),D=(0,a.useRef)(0),L=(0,a.useRef)([!1,!1,!1,!1,!1,!1]),F=(0,a.useRef)([!1,!1,!1,!1,!1,!1]),I=!!n&&("connected"===o||"authenticating"===o);return(0,a.useEffect)(()=>{if(I&&n){if(u.current===n)return;tE.info("wiring adapter to engine store");let e=k.liveConnectionStore.getState(),t={source:"live",duration:1/0,missionName:e.mapName??null,gameType:null,serverDisplayName:e.serverName??null,recorderName:e.warriorName??null,recordingDate:null,streamingPlayback:n};l.getState().setRecording(t),l.getState().setPlaybackStatus("playing"),u.current=n,_.current=!1,C.current=!1,j.current=null,d.current.length=0,m.current=0,f.current=0,h.current=null,r("fly")}else if(!I&&u.current){let e=l.getState().playback.recording;e?.source==="live"&&l.getState().setRecording(null),u.current=null,_.current=!1,C.current=!1,j.current=null,d.current.length=0,r("local")}},[I,n,l,r]),(0,tF.useTick)(()=>{if(!u.current||"connected"!==o)return;let e=M.current,t=T.current;M.current=0,T.current=0;let n=N.current,a=R.current,l=D.current;N.current=0,R.current=0,D.current=0;let s=[...L.current];L.current.fill(!1),s[2]&&!F.current[2]&&(u.current.toggleObserverMode(),tE.info("observer mode: %s",u.current.observerMode),r("follow"===u.current.observerMode?"follow":"fly")),F.current=s;let c=tz(e),f=tz(t);p.current+=c-e,g.current+=f-t,x.current=p.current,y.current=g.current,b.current={...v.current};let h=p.current-c,_=g.current-f;tO(v.current,h,_,n,a,l,80),s[1]=!0;let k=m.current++,I=d.current;I.push({moveIndex:k,move:{x:n,y:a,z:l,yaw:e,pitch:t,roll:0,trigger:s,freeLook:!1},yaw:c,pitch:f,x:n,y:a,z:l}),I.length>45&&I.splice(0,I.length-45);let E=u.current.lastMoveAck;for(;I.length>0&&I[0].moveIndex0){let e=I.slice(0,31);i(e.map(e=>e.move),e[0].moveIndex)}let B=u.current.getSnapshot();if(B!==j.current){j.current=B;let e=B?.camera;if(e?.orbitTargetId){let t=B.entities.find(t=>t.id===e.orbitTargetId);t?.position&&(S.current={...w.current},w.current={x:t.position[0],y:t.position[1],z:t.position[2]},C.current||(S.current={...w.current},C.current=!0))}}}),(0,tw.useFrame)((r,n)=>{let a=e.current;if(a.length>0){let t=0,r=0,n=0,c=0,d=0,f=0,h=[!1,!1,!1,!1,!1,!1];for(let e of a){t+=e.deltaYaw,r+=e.deltaPitch,n=e.x,c=e.y,d=e.z,f+=e.delta;for(let t=0;t0&&(tW.multiplyScalar(Math.min(1,e)/e*300*E),i.position.add(tW))}return}}if(!I||!u.current||"connected"!==o)return;let B=u.current,P=B.getSnapshot(),A=P?.camera;if(A&&A!==h.current&&"number"==typeof A.yaw&&"number"==typeof A.pitch){h.current=A;let e=B.lastMoveAck;if(e>f.current){f.current=e;let t=d.current;for(;t.length>0&&t[0].moveIndexe.id===A.orbitTargetId);if(e?.position){let t={x:e.position[0],y:e.position[1],z:e.position[2]};w.current=t,S.current={...t},C.current=!0}}}if(_.current){if("fly"===t)!function(e,t,r,n,a,o){let i=t.x+(r.x-t.x)*o,l=t.y+(r.y-t.y)*o,s=t.z+(r.z-t.z)*o;e.position.set(l,s,i);let[c,u,d,m]=(0,tI.yawPitchToQuaternion)(n,a);e.quaternion.set(c,u,d,m)}(r.camera,b.current,v.current,p.current,g.current,c());else if("follow"===t){if(!C.current)return;!function(e,t,r,n,a,o,i,l){let s=t.x+(r.x-t.x)*o,c=t.y+(r.y-t.y)*o,u=t.z+(r.z-t.z)*o,d=null!=l&&tD.streamPlaybackStore.getState().entities.get(l)?.renderType==="Player",m=Math.sin(a),f=Math.cos(a),h=Math.sin(n),p=Math.cos(n),g=Math.max(.1,i);e.position.set(c-p*f*g,u+ +!!d+m*g,s-h*f*g);let[v,x,y,b]=(0,tI.yawPitchToQuaternion)(n,a);e.quaternion.set(v,x,y,b)}(r.camera,S.current,w.current,p.current,g.current,c(),A?.orbitDistance??4,A?.orbitTargetId)}}}),(0,a.useEffect)(()=>()=>{if(u.current){let e=l.getState().playback.recording;e?.source==="live"&&l.getState().setRecording(null),u.current=null}},[l]),null}var tq=e.i(77964),t$=e.i(91907),tK=e.i(25947),tQ=e.i(46325),tY=e.i(31999),tX=e.i(89887);function tZ(e){let t,r,o,i,l=(0,n.c)(12),{entity:s}=e,{registerCamera:c,unregisterCamera:u}=tN(),d=(0,a.useId)(),m=s.cameraDataBlock;l[0]!==s.position?(t=s.position?new tC.Vector3(...s.position):new tC.Vector3,l[0]=s.position,l[1]=t):t=l[1];let f=t;l[2]!==s.rotation?(r=s.rotation?new tC.Quaternion(...s.rotation):new tC.Quaternion,l[2]=s.rotation,l[3]=r):r=l[3];let h=r;return l[4]!==m||l[5]!==d||l[6]!==f||l[7]!==c||l[8]!==h||l[9]!==u?(o=()=>{if("Observer"===m){let e={id:d,position:f,rotation:h};return c(e),()=>{u(e)}}},i=[d,m,c,u,f,h],l[4]=m,l[5]=d,l[6]=f,l[7]=c,l[8]=h,l[9]=u,l[10]=o,l[11]=i):(o=l[10],i=l[11]),(0,a.useEffect)(o,i),null}function tJ(e){let t,a=(0,n.c)(3),{entity:o}=e;return a[0]!==o.label||a[1]!==o.position?(t=o.label?(0,r.jsx)(tX.FloatingLabel,{position:o.position,opacity:.6,children:o.label}):null,a[0]=o.label,a[1]=o.position,a[2]=t):t=a[2],t}var t0=e.i(66027),t1=e.i(63318),t2=e.i(12979),t3=e.i(75567),t5=e.i(47071);let t4={value:!0},t6=`
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65883,e=>{e.v({ButtonGroup:"InspectorControls-module__gNRB6W__ButtonGroup",ButtonHint:"InspectorControls-module__gNRB6W__ButtonHint",ButtonLabel:"InspectorControls-module__gNRB6W__ButtonLabel",CheckboxField:"InspectorControls-module__gNRB6W__CheckboxField",Control:"InspectorControls-module__gNRB6W__Control",Description:"InspectorControls-module__gNRB6W__Description",Dropdown:"InspectorControls-module__gNRB6W__Dropdown",Field:"InspectorControls-module__gNRB6W__Field",ForceRenderButton:"InspectorControls-module__gNRB6W__ForceRenderButton",Group:"InspectorControls-module__gNRB6W__Group",IconButton:"InspectorControls-module__gNRB6W__IconButton",InspectorControls:"InspectorControls-module__gNRB6W__InspectorControls",Label:"InspectorControls-module__gNRB6W__Label",LabelledButton:"InspectorControls-module__gNRB6W__LabelledButton",MapInfoButton:"InspectorControls-module__gNRB6W__MapInfoButton InspectorControls-module__gNRB6W__IconButton InspectorControls-module__gNRB6W__LabelledButton",Toggle:"InspectorControls-module__gNRB6W__Toggle InspectorControls-module__gNRB6W__IconButton",Tools:"InspectorControls-module__gNRB6W__Tools"})},36679,e=>{e.v({ButtonLabel:"CopyCoordinatesButton-module__BxovtG__ButtonLabel "+e.i(65883).ButtonLabel,ClipboardCheck:"CopyCoordinatesButton-module__BxovtG__ClipboardCheck",MapPin:"CopyCoordinatesButton-module__BxovtG__MapPin",Root:"CopyCoordinatesButton-module__BxovtG__Root "+e.i(65883).IconButton+" "+e.i(65883).LabelledButton,showClipboardCheck:"CopyCoordinatesButton-module__BxovtG__showClipboardCheck"})},28903,e=>{e.v({ButtonHint:"LoadDemoButton-module__kGZaoW__ButtonHint "+e.i(65883).ButtonHint,ButtonLabel:"LoadDemoButton-module__kGZaoW__ButtonLabel "+e.i(65883).ButtonLabel,Root:"LoadDemoButton-module__kGZaoW__Root "+e.i(65883).IconButton+" "+e.i(65883).LabelledButton})},9607,e=>{e.v({ButtonHint:"JoinServerButton-module__DIR70a__ButtonHint "+e.i(65883).ButtonHint,PingLabel:"JoinServerButton-module__DIR70a__PingLabel "+e.i(65883).ButtonLabel,Pulsing:"JoinServerButton-module__DIR70a__Pulsing",Root:"JoinServerButton-module__DIR70a__Root "+e.i(65883).IconButton+" "+e.i(65883).LabelledButton,TextLabel:"JoinServerButton-module__DIR70a__TextLabel "+e.i(65883).ButtonLabel,blink:"JoinServerButton-module__DIR70a__blink"})},81323,e=>{e.v({AccordionGroup:"Accordion-module__rN-DYq__AccordionGroup",Body:"Accordion-module__rN-DYq__Body",Content:"Accordion-module__rN-DYq__Content",Trigger:"Accordion-module__rN-DYq__Trigger",TriggerIcon:"Accordion-module__rN-DYq__TriggerIcon",slideDown:"Accordion-module__rN-DYq__slideDown",slideUp:"Accordion-module__rN-DYq__slideUp"})},16964,e=>{e.v({ActionButton:"StreamingMissionInfo-module__hEaQnW__ActionButton "+e.i(65883).IconButton,Attribution:"StreamingMissionInfo-module__hEaQnW__Attribution",EjectIcon:"StreamingMissionInfo-module__hEaQnW__EjectIcon",Error:"StreamingMissionInfo-module__hEaQnW__Error",Header:"StreamingMissionInfo-module__hEaQnW__Header",Metadata:"StreamingMissionInfo-module__hEaQnW__Metadata",MissionInfo:"StreamingMissionInfo-module__hEaQnW__MissionInfo",MissionName:"StreamingMissionInfo-module__hEaQnW__MissionName "+e.i(97442).SelectedName,MissionType:"StreamingMissionInfo-module__hEaQnW__MissionType "+e.i(97442).ItemType,MissionTypeDisplayName:"StreamingMissionInfo-module__hEaQnW__MissionTypeDisplayName",PlayerName:"StreamingMissionInfo-module__hEaQnW__PlayerName",RecordingDate:"StreamingMissionInfo-module__hEaQnW__RecordingDate",ServerInfo:"StreamingMissionInfo-module__hEaQnW__ServerInfo",ServerName:"StreamingMissionInfo-module__hEaQnW__ServerName"})},29418,e=>{e.v({Bottom:"PlayerNameplate-module__zYDm0a__Bottom PlayerNameplate-module__zYDm0a__Root",HealthBar:"PlayerNameplate-module__zYDm0a__HealthBar",HealthFill:"PlayerNameplate-module__zYDm0a__HealthFill",IffArrow:"PlayerNameplate-module__zYDm0a__IffArrow",Name:"PlayerNameplate-module__zYDm0a__Name",Root:"PlayerNameplate-module__zYDm0a__Root",Top:"PlayerNameplate-module__zYDm0a__Top PlayerNameplate-module__zYDm0a__Root"})},78779,e=>{e.v({Distance:"FlagMarker-module__INpLba__Distance",Icon:"FlagMarker-module__INpLba__Icon",Root:"FlagMarker-module__INpLba__Root"})},89271,e=>{e.v({LoadingIndicator:"LoadingIndicator-module__F20Nda__LoadingIndicator",Progress:"LoadingIndicator-module__F20Nda__Progress",ProgressBar:"LoadingIndicator-module__F20Nda__ProgressBar",ProgressText:"LoadingIndicator-module__F20Nda__ProgressText",Spinner:"LoadingIndicator-module__F20Nda__Spinner",loadingComplete:"LoadingIndicator-module__F20Nda__loadingComplete",spin:"LoadingIndicator-module__F20Nda__spin"})},82156,e=>{e.v({Backdrop:"MapInspector-module__nU0WNq__Backdrop",CancelButton:"MapInspector-module__nU0WNq__CancelButton",Content:"MapInspector-module__nU0WNq__Content",Frame:"MapInspector-module__nU0WNq__Frame",PlayerBar:"MapInspector-module__nU0WNq__PlayerBar",Sidebar:"MapInspector-module__nU0WNq__Sidebar",ThreeView:"MapInspector-module__nU0WNq__ThreeView",ToggleSidebarButton:"MapInspector-module__nU0WNq__ToggleSidebarButton",Toolbar:"MapInspector-module__nU0WNq__Toolbar",layout:"MapInspector-module__nU0WNq__layout"})},31713,e=>{"use strict";var t,r=e.i(43476),n=e.i(932),a=e.i(71645),o=e.i(17751),i=e.i(12598),l=e.i(38847);let s=(0,a.createContext)({live:!1});function c(e){let t,o,i=(0,n.c)(5),{children:c}=e,[d]=(0,l.useQueryState)("features",l.parseAsString);i[0]!==d?(t=()=>({live:new Set((d??"").split(",").map(u).filter(Boolean)).has("live")}),i[0]=d,i[1]=t):t=i[1];let[m]=(0,a.useState)(t);return i[2]!==c||i[3]!==m?(o=(0,r.jsx)(s.Provider,{value:m,children:c}),i[2]=c,i[3]=m,i[4]=o):o=i[4],o}function u(e){return e.trim().toLowerCase()}var d=e.i(40141);function m(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M16 21L11.2381 12.2698L15 6L23 21H16ZM8 10L14 21H2L8 10ZM5.5 8C4.11929 8 3 6.88071 3 5.5C3 4.11929 4.11929 3 5.5 3C6.88071 3 8 4.11929 8 5.5C8 6.88071 6.88071 8 5.5 8Z"},child:[]}]})(e)}function f(e){return(0,d.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 h(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M463.5 224l8.5 0c13.3 0 24-10.7 24-24l0-128c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8l119.5 0z"},child:[]}]})(e)}function p(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M2 8V2h6"},child:[]},{tag:"path",attr:{d:"m2 2 10 10"},child:[]},{tag:"path",attr:{d:"M12 2A10 10 0 1 1 2 12"},child:[]}]})(e)}function g(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1"},child:[]},{tag:"path",attr:{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"},child:[]},{tag:"path",attr:{d:"M12 11h4"},child:[]},{tag:"path",attr:{d:"M12 16h4"},child:[]},{tag:"path",attr:{d:"M8 11h.01"},child:[]},{tag:"path",attr:{d:"M8 16h.01"},child:[]}]})(e)}function v(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"18",height:"18",x:"3",y:"3",rx:"2"},child:[]},{tag:"path",attr:{d:"M9 3v18"},child:[]},{tag:"path",attr:{d:"m16 15-3-3 3-3"},child:[]}]})(e)}function x(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"18",height:"18",x:"3",y:"3",rx:"2"},child:[]},{tag:"path",attr:{d:"M9 3v18"},child:[]},{tag:"path",attr:{d:"m14 9 3 3-3 3"},child:[]}]})(e)}function y(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"18",height:"18",x:"3",y:"3",rx:"2"},child:[]},{tag:"path",attr:{d:"M3 9h18"},child:[]},{tag:"path",attr:{d:"m9 16 3-3 3 3"},child:[]}]})(e)}function b(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"18",height:"18",x:"3",y:"3",rx:"2"},child:[]},{tag:"path",attr:{d:"M3 9h18"},child:[]},{tag:"path",attr:{d:"m15 14-3 3-3-3"},child:[]}]})(e)}var _=e.i(79123),S=e.i(11152),w=e.i(36679);function C(e){let t,o,i,l,s,c=(0,n.c)(12),{cameraRef:u,missionName:d,missionType:m,disabled:h}=e,{fogEnabled:p}=(0,_.useSettings)(),[g,v]=(0,a.useState)(!1),x=(0,a.useRef)(null);c[0]!==u||c[1]!==p||c[2]!==d||c[3]!==m?(t=async()=>{clearTimeout(x.current);let e=u.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)}`,a=`${r(t.x)},${r(t.y)},${r(t.z)},${r(t.w)}`;return`#c${n}~${a}`}(e),r=new URLSearchParams;r.set("mission",`${d}~${m}`),r.set("fog",p.toString());let n=`${window.location.pathname}?${r}${t}`,a=`${window.location.origin}${n}`;window.history.replaceState(null,"",n);try{await navigator.clipboard.writeText(a),v(!0),x.current=setTimeout(()=>{v(!1)},1100)}catch(e){console.error(e)}},c[0]=u,c[1]=p,c[2]=d,c[3]=m,c[4]=t):t=c[4];let y=t,b=g?"true":"false";return c[5]===Symbol.for("react.memo_cache_sentinel")?(o=(0,r.jsx)(S.FaMapPin,{className:w.default.MapPin}),i=(0,r.jsx)(f,{className:w.default.ClipboardCheck}),l=(0,r.jsx)("span",{className:w.default.ButtonLabel,children:" Link to coordinates"}),c[5]=o,c[6]=i,c[7]=l):(o=c[5],i=c[6],l=c[7]),c[8]!==h||c[9]!==y||c[10]!==b?(s=(0,r.jsxs)("button",{type:"button",className:w.default.Root,"aria-label":"Link to coordinates",title:"Copy the current coordinates to URL",onClick:y,disabled:h,"data-copied":b,id:"copyCoordinatesButton",children:[o,i,l]}),c[8]=h,c[9]=y,c[10]=b,c[11]=s):s=c[11],s}function j(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M21 3H3c-1.11 0-2 .89-2 2v12a2 2 0 0 0 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5a2 2 0 0 0-2-2zm0 14H3V5h18v12zm-5-6-7 4V7z"},child:[]}]})(e)}var M=e.i(25645),k=e.i(98755),T=e.i(32865),N=e.i(28903);let R=(0,M.createLogger)("LoadDemoButton");function D({isActive:t=!1,choosingMap:n=!1,onCancelChoosingMap:o}){let i=(0,T.useRecording)(),l=i?.source==="demo",{setRecording:s}=(0,T.usePlaybackActions)(),c=(0,a.useRef)(null),u=(0,a.useRef)(0),d=(0,a.useCallback)(()=>{if(n&&l)return void o?.();if(l){u.current+=1,s(null);return}c.current?.click()},[l,n,o,s]),m=(0,a.useCallback)(async t=>{let r=t.target.files?.[0];if(r){t.target.value="";try{let t=await r.arrayBuffer(),n=u.current+1;u.current=n;let{createDemoStreamingRecording:a}=await e.A(60946),o=await a(t);if(u.current!==n)return;let i=k.liveConnectionStore.getState();i.disconnectServer(),i.disconnectRelay(),s(o)}catch(e){R.error("Failed to load demo: %o",e)}}},[s]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("input",{ref:c,type:"file",accept:".rec",style:{display:"none"},onChange:m}),(0,r.jsxs)("button",{type:"button",className:N.default.Root,"aria-label":l?"Unload demo":"Load demo (.rec)",title:l?"Unload demo":"Load demo (.rec)",onClick:d,"data-active":t,children:[(0,r.jsx)(j,{className:N.default.DemoIcon}),(0,r.jsx)("span",{className:N.default.ButtonLabel,children:"Demo"}),(0,r.jsx)("span",{className:N.default.ButtonHint,children:n&&l?"Return to demo":l?"Click to unload":"Load a .rec file"})]})]})}function L(e){return(0,d.GenIcon)({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M11.251.068a.5.5 0 0 1 .227.58L9.677 6.5H13a.5.5 0 0 1 .364.843l-8 8.5a.5.5 0 0 1-.842-.49L6.323 9.5H3a.5.5 0 0 1-.364-.843l8-8.5a.5.5 0 0 1 .615-.09z"},child:[]}]})(e)}var F=e.i(9607);function I(e){let t,a,o,i,l,s,c=(0,n.c)(20),{isActive:u,onOpenServerBrowser:d}=e,m=(0,k.useLiveSelector)(P),f=(0,k.useLiveSelector)(k.selectPing),h=(0,k.useLiveSelector)(B),p=(0,k.useLiveSelector)(E),g="connected"===m,v="connecting"===m||"challenging"===m||"authenticating"===m,x=g?"Connected – click to disconnect":"Join server",y=g?"Connected – click to disconnect":"Join server";c[0]!==p||c[1]!==h||c[2]!==g||c[3]!==d?(t=()=>{g?(h(),p()):d()},c[0]=p,c[1]=h,c[2]=g,c[3]=d,c[4]=t):t=c[4];let b=`${F.default.LiveIcon} ${g?F.default.Pulsing:""}`;if(c[5]!==b?(a=(0,r.jsx)(L,{className:b}),c[5]=b,c[6]=a):a=c[6],c[7]===Symbol.for("react.memo_cache_sentinel")?(o=(0,r.jsx)("span",{className:F.default.TextLabel,children:"Live"}),c[7]=o):o=c[7],c[8]!==v||c[9]!==f)i=v?"Connecting…":null!=f?`${f.toLocaleString()} ms`:"Join a game",c[8]=v,c[9]=f,c[10]=i;else i=c[10];return c[11]!==i?(l=(0,r.jsxs)(r.Fragment,{children:[o,(0,r.jsx)("span",{className:F.default.ButtonHint,children:i})]}),c[11]=i,c[12]=l):l=c[12],c[13]!==u||c[14]!==x||c[15]!==y||c[16]!==t||c[17]!==a||c[18]!==l?(s=(0,r.jsxs)("button",{type:"button",className:F.default.Root,"aria-label":x,title:y,onClick:t,"data-active":u,children:[a,l]}),c[13]=u,c[14]=x,c[15]=y,c[16]=t,c[17]=a,c[18]=l,c[19]=s):s=c[19],s}function E(e){return e.disconnectRelay}function B(e){return e.disconnectServer}function P(e){return e.gameStatus}function A(e,t=[]){let n=[],o=()=>{let t=n.map(e=>a.createContext(e));return function(r){let n=r?.[e]||t;return a.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return o.scopeName=e,[function(t,o){let i=a.createContext(o),l=n.length;n=[...n,o];let s=t=>{let{scope:n,children:o,...s}=t,c=n?.[e]?.[l]||i,u=a.useMemo(()=>s,Object.values(s));return(0,r.jsx)(c.Provider,{value:u,children:o})};return s.displayName=t+"Provider",[s,function(r,n){let s=n?.[e]?.[l]||i,c=a.useContext(s);if(c)return c;if(void 0!==o)return o;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:n})=>{let a=r(e)[`__scope${n}`];return{...t,...a}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}(o,...t)]}function z(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function U(...e){return t=>{let r=!1,n=e.map(e=>{let n=z(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t{let{children:r,...n}=e;if(a.isValidElement(r)){var o;let e,i,l=(o=r,(i=(e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(i=(e=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref),s=function(e,t){let r={...t};for(let n in t){let a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{let t=o(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==a.Fragment&&(s.ref=t?U(t,l):l),a.cloneElement(r,s)}return a.Children.count(r)>1?a.Children.only(null):null})).displayName=`${t}.SlotClone`,n),i=a.forwardRef((e,t)=>{let{children:n,...i}=e,l=a.Children.toArray(n),s=l.find(O);if(s){let e=s.props.children,n=l.map(t=>t!==s?t:a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null);return(0,r.jsx)(o,{...i,ref:t,children:a.isValidElement(e)?a.cloneElement(e,void 0,n):null})}return(0,r.jsx)(o,{...i,ref:t,children:n})});return i.displayName=`${e}.Slot`,i}var H=Symbol("radix.slottable");function O(e){return a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===H}var V=new WeakMap;function q(e,t){var r,n;let a,o,i;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let l=(r=e,n=t,a=r.length,(i=(o=$(n))>=0?o:a+o)<0||i>=a?-1:i);return -1===l?void 0:e[l]}function $(e){return e!=e||0===e?0:Math.trunc(e)}function K(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],V.set(this,!0)}set(e,t){return V.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let n,a=this.has(t),o=this.#e.length,i=$(e),l=i>=0?i:o+i,s=l<0||l>=o?-1:l;if(s===this.size||a&&s===this.size-1||-1===s)return this.set(t,r),this;let c=this.size+ +!a;i<0&&l++;let u=[...this.#e],d=!1;for(let e=l;e=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],a=0;for(let e of this)Reflect.apply(t,r,[e,a,this])&&n.push(e),a++;return new e(n)}map(t,r){let n=[],a=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,a,this])]),a++;return new e(n)}reduce(...e){let[t,r]=e,n=0,a=r??this.at(0);for(let r of this)a=0===n&&1===e.length?r:Reflect.apply(t,this,[a,r,n,this]),n++;return a}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let a=this.at(r);n=r===this.size-1&&1===e.length?a:Reflect.apply(t,this,[n,a,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,a=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(a=r-1);for(let e=t;e<=a;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),"u">typeof window&&window.document&&window.document.createElement;var Q=globalThis?.document?a.useLayoutEffect:()=>{};a[" useEffectEvent ".trim().toString()],a[" useInsertionEffect ".trim().toString()];var Y=a[" useInsertionEffect ".trim().toString()]||Q;function X({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,i,l]=function({defaultProp:e,onChange:t}){let[r,n]=a.useState(e),o=a.useRef(r),i=a.useRef(t);return Y(()=>{i.current=t},[t]),a.useEffect(()=>{o.current!==r&&(i.current?.(r),o.current=r)},[r,o]),[r,n,i]}({defaultProp:t,onChange:r}),s=void 0!==e,c=s?e:o;{let t=a.useRef(void 0!==e);a.useEffect(()=>{let e=t.current;if(e!==s){let t=s?"controlled":"uncontrolled";console.warn(`${n} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s},[s,n])}return[c,a.useCallback(t=>{if(s){let r="function"==typeof t?t(e):t;r!==e&&l.current?.(r)}else i(t)},[s,e,i,l])]}Symbol("RADIX:SYNC_STATE"),e.i(74080);var Z=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=W(`Primitive.${t}`),o=a.forwardRef((e,a)=>{let{asChild:o,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,r.jsx)(o?n:t,{...i,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),J=e=>{var t;let r,n,{present:o,children:i}=e,l=function(e){var t,r;let[n,o]=a.useState(),i=a.useRef(null),l=a.useRef(e),s=a.useRef("none"),[c,u]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},a.useReducer((e,t)=>r[e][t]??e,t));return a.useEffect(()=>{let e=ee(i.current);s.current="mounted"===c?e:"none"},[c]),Q(()=>{let t=i.current,r=l.current;if(r!==e){let n=s.current,a=ee(t);e?u("MOUNT"):"none"===a||t?.display==="none"?u("UNMOUNT"):r&&n!==a?u("ANIMATION_OUT"):u("UNMOUNT"),l.current=e}},[e,u]),Q(()=>{if(n){let e,t=n.ownerDocument.defaultView??window,r=r=>{let a=ee(i.current).includes(CSS.escape(r.animationName));if(r.target===n&&a&&(u("ANIMATION_END"),!l.current)){let r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},a=e=>{e.target===n&&(s.current=ee(i.current))};return n.addEventListener("animationstart",a),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",a),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}u("ANIMATION_END")},[n,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:a.useCallback(e=>{i.current=e?getComputedStyle(e):null,o(e)},[])}}(o),s="function"==typeof i?i({present:l.isPresent}):a.Children.only(i),c=G(l.ref,(t=s,(n=(r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?t.ref:(n=(r=Object.getOwnPropertyDescriptor(t,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?t.props.ref:t.props.ref||t.ref));return"function"==typeof i||l.isPresent?a.cloneElement(s,{ref:c}):null};function ee(e){return e?.animationName||"none"}J.displayName="Presence";var et=a[" useId ".trim().toString()]||(()=>void 0),er=0;function en(e){let[t,r]=a.useState(et());return Q(()=>{e||r(e=>e??String(er++))},[e]),e||(t?`radix-${t}`:"")}var ea="Collapsible",[eo,ei]=A(ea),[el,es]=eo(ea),ec=a.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:o,defaultOpen:i,disabled:l,onOpenChange:s,...c}=e,[u,d]=X({prop:o,defaultProp:i??!1,onChange:s,caller:ea});return(0,r.jsx)(el,{scope:n,disabled:l,contentId:en(),open:u,onOpenToggle:a.useCallback(()=>d(e=>!e),[d]),children:(0,r.jsx)(Z.div,{"data-state":ep(u),"data-disabled":l?"":void 0,...c,ref:t})})});ec.displayName=ea;var eu="CollapsibleTrigger",ed=a.forwardRef((e,t)=>{let{__scopeCollapsible:n,...a}=e,o=es(eu,n);return(0,r.jsx)(Z.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ep(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...a,ref:t,onClick:K(e.onClick,o.onOpenToggle)})});ed.displayName=eu;var em="CollapsibleContent",ef=a.forwardRef((e,t)=>{let{forceMount:n,...a}=e,o=es(em,e.__scopeCollapsible);return(0,r.jsx)(J,{present:n||o.open,children:({present:e})=>(0,r.jsx)(eh,{...a,ref:t,present:e})})});ef.displayName=em;var eh=a.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:o,children:i,...l}=e,s=es(em,n),[c,u]=a.useState(o),d=a.useRef(null),m=G(t,d),f=a.useRef(0),h=f.current,p=a.useRef(0),g=p.current,v=s.open||c,x=a.useRef(v),y=a.useRef(void 0);return a.useEffect(()=>{let e=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(e)},[]),Q(()=>{let e=d.current;if(e){y.current=y.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();f.current=t.height,p.current=t.width,x.current||(e.style.transitionDuration=y.current.transitionDuration,e.style.animationName=y.current.animationName),u(o)}},[s.open,o]),(0,r.jsx)(Z.div,{"data-state":ep(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!v,...l,ref:m,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:v&&i})});function ep(e){return e?"open":"closed"}var eg=a.createContext(void 0),ev="Accordion",ex=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ey,eb,e_]=function(e){let t=e+"CollectionProvider",[n,o]=A(t),[i,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:n}=e,o=a.default.useRef(null),l=a.default.useRef(new Map).current;return(0,r.jsx)(i,{scope:t,itemMap:l,collectionRef:o,children:n})};s.displayName=t;let c=e+"CollectionSlot",u=W(c),d=a.default.forwardRef((e,t)=>{let{scope:n,children:a}=e,o=G(t,l(c,n).collectionRef);return(0,r.jsx)(u,{ref:o,children:a})});d.displayName=c;let m=e+"CollectionItemSlot",f="data-radix-collection-item",h=W(m),p=a.default.forwardRef((e,t)=>{let{scope:n,children:o,...i}=e,s=a.default.useRef(null),c=G(t,s),u=l(m,n);return a.default.useEffect(()=>(u.itemMap.set(s,{ref:s,...i}),()=>void u.itemMap.delete(s))),(0,r.jsx)(h,{...{[f]:""},ref:c,children:o})});return p.displayName=m,[{Provider:s,Slot:d,ItemSlot:p},function(t){let r=l(e+"CollectionConsumer",t);return a.default.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},o]}(ev),[eS,ew]=A(ev,[e_,ei]),eC=ei(),ej=a.default.forwardRef((e,t)=>{let{type:n,...a}=e;return(0,r.jsx)(ey.Provider,{scope:e.__scopeAccordion,children:"multiple"===n?(0,r.jsx)(eD,{...a,ref:t}):(0,r.jsx)(eR,{...a,ref:t})})});ej.displayName=ev;var[eM,ek]=eS(ev),[eT,eN]=eS(ev,{collapsible:!1}),eR=a.default.forwardRef((e,t)=>{let{value:n,defaultValue:o,onValueChange:i=()=>{},collapsible:l=!1,...s}=e,[c,u]=X({prop:n,defaultProp:o??"",onChange:i,caller:ev});return(0,r.jsx)(eM,{scope:e.__scopeAccordion,value:a.default.useMemo(()=>c?[c]:[],[c]),onItemOpen:u,onItemClose:a.default.useCallback(()=>l&&u(""),[l,u]),children:(0,r.jsx)(eT,{scope:e.__scopeAccordion,collapsible:l,children:(0,r.jsx)(eI,{...s,ref:t})})})}),eD=a.default.forwardRef((e,t)=>{let{value:n,defaultValue:o,onValueChange:i=()=>{},...l}=e,[s,c]=X({prop:n,defaultProp:o??[],onChange:i,caller:ev}),u=a.default.useCallback(e=>c((t=[])=>[...t,e]),[c]),d=a.default.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return(0,r.jsx)(eM,{scope:e.__scopeAccordion,value:s,onItemOpen:u,onItemClose:d,children:(0,r.jsx)(eT,{scope:e.__scopeAccordion,collapsible:!0,children:(0,r.jsx)(eI,{...l,ref:t})})})}),[eL,eF]=eS(ev),eI=a.default.forwardRef((e,t)=>{let n,{__scopeAccordion:o,disabled:i,dir:l,orientation:s="vertical",...c}=e,u=G(a.default.useRef(null),t),d=eb(o),m="ltr"===(n=a.useContext(eg),l||n||"ltr"),f=K(e.onKeyDown,e=>{if(!ex.includes(e.key))return;let t=e.target,r=d().filter(e=>!e.ref.current?.disabled),n=r.findIndex(e=>e.ref.current===t),a=r.length;if(-1===n)return;e.preventDefault();let o=n,i=a-1,l=()=>{(o=n+1)>i&&(o=0)},c=()=>{(o=n-1)<0&&(o=i)};switch(e.key){case"Home":o=0;break;case"End":o=i;break;case"ArrowRight":"horizontal"===s&&(m?l():c());break;case"ArrowDown":"vertical"===s&&l();break;case"ArrowLeft":"horizontal"===s&&(m?c():l());break;case"ArrowUp":"vertical"===s&&c()}let u=o%a;r[u].ref.current?.focus()});return(0,r.jsx)(eL,{scope:o,disabled:i,direction:l,orientation:s,children:(0,r.jsx)(ey.Slot,{scope:o,children:(0,r.jsx)(Z.div,{...c,"data-orientation":s,ref:u,onKeyDown:i?void 0:f})})})}),eE="AccordionItem",[eB,eP]=eS(eE),eA=a.default.forwardRef((e,t)=>{let{__scopeAccordion:n,value:a,...o}=e,i=eF(eE,n),l=ek(eE,n),s=eC(n),c=en(),u=a&&l.value.includes(a)||!1,d=i.disabled||e.disabled;return(0,r.jsx)(eB,{scope:n,open:u,disabled:d,triggerId:c,children:(0,r.jsx)(ec,{"data-orientation":i.orientation,"data-state":eO(u),...s,...o,ref:t,disabled:d,open:u,onOpenChange:e=>{e?l.onItemOpen(a):l.onItemClose(a)}})})});eA.displayName=eE;var ez="AccordionHeader";a.default.forwardRef((e,t)=>{let{__scopeAccordion:n,...a}=e,o=eF(ev,n),i=eP(ez,n);return(0,r.jsx)(Z.h3,{"data-orientation":o.orientation,"data-state":eO(i.open),"data-disabled":i.disabled?"":void 0,...a,ref:t})}).displayName=ez;var eU="AccordionTrigger",eG=a.default.forwardRef((e,t)=>{let{__scopeAccordion:n,...a}=e,o=eF(ev,n),i=eP(eU,n),l=eN(eU,n),s=eC(n);return(0,r.jsx)(ey.ItemSlot,{scope:n,children:(0,r.jsx)(ed,{"aria-disabled":i.open&&!l.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId,...s,...a,ref:t})})});eG.displayName=eU;var eW="AccordionContent",eH=a.default.forwardRef((e,t)=>{let{__scopeAccordion:n,...a}=e,o=eF(ev,n),i=eP(eW,n),l=eC(n);return(0,r.jsx)(ef,{role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation,...l,...a,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});function eO(e){return e?"open":"closed"}function eV(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m190.06 414 163.12-139.78a24 24 0 0 0 0-36.44L190.06 98c-15.57-13.34-39.62-2.28-39.62 18.22v279.6c0 20.5 24.05 31.56 39.62 18.18z"},child:[]}]})(e)}eH.displayName=eW;var eq=e.i(81323);function e$(e){let t,a=(0,n.c)(2);return a[0]!==e?(t=(0,r.jsx)(ej,{className:eq.default.AccordionGroup,...e}),a[0]=e,a[1]=t):t=a[1],t}function eK(e){let t,a,o,i,l=(0,n.c)(9),{value:s,label:c,children:u}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,r.jsx)(eV,{className:eq.default.TriggerIcon}),l[0]=t):t=l[0],l[1]!==c?(a=(0,r.jsxs)(eG,{className:eq.default.Trigger,children:[t," ",c]}),l[1]=c,l[2]=a):a=l[2],l[3]!==u?(o=(0,r.jsx)(eH,{className:eq.default.Content,children:(0,r.jsx)("div",{className:eq.default.Body,children:u})}),l[3]=u,l[4]=o):o=l[4],l[5]!==a||l[6]!==o||l[7]!==s?(i=(0,r.jsxs)(eA,{value:s,children:[a,o]}),l[5]=a,l[6]=o,l[7]=s,l[8]=i):i=l[8],i}var eQ=e.i(65883),eY=e.i(21025),eX=e.i(92224),eZ=e.i(91996);let eJ=["controls","preferences","audio"];function e0(e){let t,o,i,l,s,c,u,d,f,p,v,x,y,b,S,w,j,M,N,R,L,F,E,B,P,A,z,U,G,W,H,O,V,q,$,K,Q,Y,X,Z,J,ee,et,er,en,ea,eo,ei,el,es,ec,eu,ed,em,ef,eh,ep,eg,ev,ex,ey,eb,e_,eS,ew,eC,ej,eM,ek,eT,eN,eR,eD,eL=(0,n.c)(174),{missionName:eF,missionType:eI,onOpenMapInfo:eE,onOpenServerBrowser:eB,onChooseMap:eP,onCancelChoosingMap:eA,choosingMap:ez,cameraRef:eU,invalidateRef:eG}=e,eW=(0,eY.useTouchDevice)(),eH=(0,eX.useDataSource)(),eO=(0,T.useRecording)(),eV=(0,eX.useMissionName)(),eq="demo"===eH||"live"===eH?eV:eF;eL[0]!==eq?(t=!!eq&&(0,eZ.hasMission)(eq),eL[0]=eq,eL[1]=t):t=eL[1];let e0=t,e2=(0,k.useLiveSelector)(e1),{fogEnabled:e3,setFogEnabled:e5,fov:e4,setFov:e6,audioEnabled:e8,setAudioEnabled:e7,audioVolume:e9,setAudioVolume:te,animationEnabled:tt,setAnimationEnabled:tr}=(0,_.useSettings)(),{speedMultiplier:tn,setSpeedMultiplier:ta,mouseSensitivity:to,setMouseSensitivity:ti,touchMode:tl,setTouchMode:ts,invertScroll:tc,setInvertScroll:tu,invertDrag:td,setInvertDrag:tm,invertJoystick:tf,setInvertJoystick:th}=(0,_.useControls)(),{debugMode:tp,setDebugMode:tg,renderOnDemand:tv,setRenderOnDemand:tx}=(0,_.useDebug)(),[ty,tb]=(0,a.useState)(!1),t_=(0,a.useRef)(null),tS=(0,a.useRef)(null),tw=(0,a.useRef)(null);eL[2]!==ty?(o=()=>{ty&&t_.current?.focus()},i=[ty],eL[2]=ty,eL[3]=o,eL[4]=i):(o=eL[3],i=eL[4]),(0,a.useEffect)(o,i),eL[5]===Symbol.for("react.memo_cache_sentinel")?(l=e=>{let t=e.relatedTarget;t&&tw.current?.contains(t)||tb(!1)},eL[5]=l):l=eL[5];let tC=l;eL[6]===Symbol.for("react.memo_cache_sentinel")?(s=e=>{"Escape"===e.key&&(tb(!1),tS.current?.focus())},eL[6]=s):s=eL[6];let tj=s,tM="map"===eH&&!eO||ez;eL[7]===Symbol.for("react.memo_cache_sentinel")?(c=(0,r.jsx)(m,{}),u=(0,r.jsx)("span",{className:eQ.default.ButtonLabel,children:"Explore"}),d=(0,r.jsx)("span",{className:eQ.default.ButtonHint,children:"Browse maps"}),eL[7]=c,eL[8]=u,eL[9]=d):(c=eL[7],u=eL[8],d=eL[9]),eL[10]!==eP||eL[11]!==tM?(f=(0,r.jsxs)("button",{type:"button",className:eQ.default.IconButton,"data-active":tM,onClick:eP,children:[c,u,d]}),eL[10]=eP,eL[11]=tM,eL[12]=f):f=eL[12];let tk=!ez&&eO?.source==="demo";eL[13]!==ez||eL[14]!==eA||eL[15]!==tk?(p=(0,r.jsx)(D,{isActive:tk,choosingMap:ez,onCancelChoosingMap:eA}),eL[13]=ez,eL[14]=eA,eL[15]=tk,eL[16]=p):p=eL[16],eL[17]!==ez||eL[18]!==e2||eL[19]!==eB?(v=eB&&(0,r.jsx)(I,{isActive:!ez&&e2,onOpenServerBrowser:eB}),eL[17]=ez,eL[18]=e2,eL[19]=eB,eL[20]=v):v=eL[20],eL[21]!==f||eL[22]!==p||eL[23]!==v?(x=(0,r.jsxs)("div",{className:eQ.default.ButtonGroup,children:[f,p,v]}),eL[21]=f,eL[22]=p,eL[23]=v,eL[24]=x):x=eL[24];let tT=!e0;eL[25]!==eU||eL[26]!==eF||eL[27]!==eI||eL[28]!==tT?(y=(0,r.jsx)(C,{missionName:eF,missionType:eI,cameraRef:eU,disabled:tT}),eL[25]=eU,eL[26]=eF,eL[27]=eI,eL[28]=tT,eL[29]=y):y=eL[29];let tN=!e0;eL[30]===Symbol.for("react.memo_cache_sentinel")?(b=(0,r.jsx)(g,{}),S=(0,r.jsx)("span",{className:eQ.default.ButtonLabel,children:"Show map info"}),eL[30]=b,eL[31]=S):(b=eL[30],S=eL[31]),eL[32]!==eE||eL[33]!==tN?(w=(0,r.jsxs)("button",{type:"button",className:eQ.default.MapInfoButton,"aria-label":"Show map info",onClick:eE,disabled:tN,children:[b,S]}),eL[32]=eE,eL[33]=tN,eL[34]=w):w=eL[34],eL[35]!==x||eL[36]!==y||eL[37]!==w?(j=(0,r.jsxs)("div",{className:eQ.default.Tools,children:[x,y,w]}),eL[35]=x,eL[36]=y,eL[37]=w,eL[38]=j):j=eL[38],eL[39]===Symbol.for("react.memo_cache_sentinel")?(M=(0,r.jsx)("label",{htmlFor:"speedInput",children:"Fly speed"}),eL[39]=M):M=eL[39],eL[40]!==tn?(N=Math.round(100*tn),eL[40]=tn,eL[41]=N):N=eL[41],eL[42]!==ta?(R=e=>ta(parseFloat(e.target.value)/100),eL[42]=ta,eL[43]=R):R=eL[43],eL[44]!==N||eL[45]!==R?(L=(0,r.jsx)("input",{id:"speedInput",type:"range",min:1,max:100,step:1,value:N,onChange:R}),eL[44]=N,eL[45]=R,eL[46]=L):L=eL[46];let tR=!1===eW?" Use your scroll wheel or trackpad to adjust while flying.":"";return eL[47]!==tR?(F=(0,r.jsxs)("p",{className:eQ.default.Description,children:["How fast you move in free-flying mode.",tR]}),eL[47]=tR,eL[48]=F):F=eL[48],eL[49]!==L||eL[50]!==F?(E=(0,r.jsxs)("div",{className:eQ.default.Field,children:[M,L,F]}),eL[49]=L,eL[50]=F,eL[51]=E):E=eL[51],eL[52]!==eW||eL[53]!==ts||eL[54]!==tl?(B=eW?(0,r.jsxs)("div",{className:eQ.default.Field,children:[(0,r.jsx)("label",{htmlFor:"touchModeInput",children:"Joystick"})," ",(0,r.jsxs)("select",{id:"touchModeInput",value:tl,onChange:e=>ts(e.target.value),children:[(0,r.jsx)("option",{value:"dualStick",children:"Dual stick"}),(0,r.jsx)("option",{value:"moveLookStick",children:"Single stick"})]}),(0,r.jsx)("p",{className:eQ.default.Description,children:"Single stick has a unified move + look control. Dual stick has independent move + look."})]}):null,eL[52]=eW,eL[53]=ts,eL[54]=tl,eL[55]=B):B=eL[55],eL[56]!==tc||eL[57]!==eW||eL[58]!==tu?(P=!1===eW?(0,r.jsxs)("div",{className:eQ.default.CheckboxField,children:[(0,r.jsx)("input",{id:"invertScroll",type:"checkbox",checked:tc,onChange:e=>{tu(e.target.checked)}}),(0,r.jsx)("label",{className:eQ.default.Label,htmlFor:"invertScroll",children:"Invert scroll direction"}),(0,r.jsx)("p",{className:eQ.default.Description,children:"Reverse which scroll direction increases and decreases fly speed."})]}):null,eL[56]=tc,eL[57]=eW,eL[58]=tu,eL[59]=P):P=eL[59],eL[60]!==tf||eL[61]!==eW||eL[62]!==th?(A=eW?(0,r.jsxs)("div",{className:eQ.default.CheckboxField,children:[(0,r.jsx)("input",{id:"invertJoystick",type:"checkbox",checked:tf,onChange:e=>{th(e.target.checked)}}),(0,r.jsx)("label",{className:eQ.default.Label,htmlFor:"invertJoystick",children:"Invert joystick direction"}),(0,r.jsx)("p",{className:eQ.default.Description,children:"Reverse joystick look direction."})]}):null,eL[60]=tf,eL[61]=eW,eL[62]=th,eL[63]=A):A=eL[63],eL[64]!==tm?(z=e=>{tm(e.target.checked)},eL[64]=tm,eL[65]=z):z=eL[65],eL[66]!==td||eL[67]!==z?(U=(0,r.jsx)("input",{id:"invertDrag",type:"checkbox",checked:td,onChange:z}),eL[66]=td,eL[67]=z,eL[68]=U):U=eL[68],eL[69]===Symbol.for("react.memo_cache_sentinel")?(G=(0,r.jsx)("label",{className:eQ.default.Label,htmlFor:"invertDrag",children:"Invert drag direction"}),W=(0,r.jsx)("p",{className:eQ.default.Description,children:"Reverse how dragging the viewport aims the camera."}),eL[69]=G,eL[70]=W):(G=eL[69],W=eL[70]),eL[71]!==U?(H=(0,r.jsxs)("div",{className:eQ.default.CheckboxField,children:[U,G,W]}),eL[71]=U,eL[72]=H):H=eL[72],eL[73]!==eW||eL[74]!==to||eL[75]!==ti?(O=!1===eW&&(0,r.jsxs)("div",{className:eQ.default.Field,children:[(0,r.jsx)("label",{htmlFor:"mouseSensitivityInput",children:"Mouse sensitivity"}),(0,r.jsxs)("div",{className:eQ.default.Control,children:[(0,r.jsx)("output",{htmlFor:"mouseSensitivityInput",children:Math.round(8e3*to)/64}),(0,r.jsx)("input",{id:"mouseSensitivityInput",type:"range",min:1,max:64,step:1,value:Math.round(8e3*to),onChange:e=>{ti(parseInt(e.target.value)/8e3)}})]})]}),eL[73]=eW,eL[74]=to,eL[75]=ti,eL[76]=O):O=eL[76],eL[77]!==E||eL[78]!==B||eL[79]!==P||eL[80]!==A||eL[81]!==H||eL[82]!==O?(V=(0,r.jsxs)(eK,{value:"controls",label:"Controls",children:[E,B,P,A,H,O]}),eL[77]=E,eL[78]=B,eL[79]=P,eL[80]=A,eL[81]=H,eL[82]=O,eL[83]=V):V=eL[83],eL[84]===Symbol.for("react.memo_cache_sentinel")?(q=(0,r.jsx)("label",{htmlFor:"fovInput",children:"FOV"}),eL[84]=q):q=eL[84],eL[85]!==e4?($=(0,r.jsxs)("output",{htmlFor:"fovInput",children:[e4,"°"]}),eL[85]=e4,eL[86]=$):$=eL[86],eL[87]!==e6?(K=e=>e6(parseInt(e.target.value)),eL[87]=e6,eL[88]=K):K=eL[88],eL[89]!==e4||eL[90]!==K?(Q=(0,r.jsx)("input",{id:"fovInput",type:"range",min:75,max:120,step:5,value:e4,onChange:K}),eL[89]=e4,eL[90]=K,eL[91]=Q):Q=eL[91],eL[92]!==$||eL[93]!==Q?(Y=(0,r.jsx)(eK,{value:"preferences",label:"Preferences",children:(0,r.jsxs)("div",{className:eQ.default.Field,children:[q,(0,r.jsxs)("div",{className:eQ.default.Control,children:[$,Q]})]})}),eL[92]=$,eL[93]=Q,eL[94]=Y):Y=eL[94],eL[95]!==e7?(X=e=>{e7(e.target.checked)},eL[95]=e7,eL[96]=X):X=eL[96],eL[97]!==e8||eL[98]!==X?(Z=(0,r.jsx)("input",{id:"audioInput",type:"checkbox",checked:e8,onChange:X}),eL[97]=e8,eL[98]=X,eL[99]=Z):Z=eL[99],eL[100]===Symbol.for("react.memo_cache_sentinel")?(J=(0,r.jsx)("label",{className:eQ.default.Label,htmlFor:"audioInput",children:"Enable audio"}),eL[100]=J):J=eL[100],eL[101]!==Z?(ee=(0,r.jsxs)("div",{className:eQ.default.CheckboxField,children:[Z,J]}),eL[101]=Z,eL[102]=ee):ee=eL[102],eL[103]===Symbol.for("react.memo_cache_sentinel")?(et=(0,r.jsx)("label",{htmlFor:"volumeInput",children:"Master volume"}),eL[103]=et):et=eL[103],eL[104]!==e9?(er=Math.round(100*e9),eL[104]=e9,eL[105]=er):er=eL[105],eL[106]!==er?(en=(0,r.jsxs)("output",{htmlFor:"volumeInput",children:[er,"%"]}),eL[106]=er,eL[107]=en):en=eL[107],eL[108]!==te?(ea=e=>te(parseFloat(e.target.value)),eL[108]=te,eL[109]=ea):ea=eL[109],eL[110]!==e9||eL[111]!==ea?(eo=(0,r.jsx)("input",{id:"volumeInput",type:"range",min:0,max:1,step:.05,value:e9,onChange:ea}),eL[110]=e9,eL[111]=ea,eL[112]=eo):eo=eL[112],eL[113]!==en||eL[114]!==eo?(ei=(0,r.jsxs)("div",{className:eQ.default.Field,children:[et,(0,r.jsxs)("div",{className:eQ.default.Control,children:[en,eo]})]}),eL[113]=en,eL[114]=eo,eL[115]=ei):ei=eL[115],eL[116]!==ee||eL[117]!==ei?(el=(0,r.jsxs)(eK,{value:"audio",label:"Audio",children:[ee,ei]}),eL[116]=ee,eL[117]=ei,eL[118]=el):el=eL[118],eL[119]!==e5?(es=e=>{e5(e.target.checked)},eL[119]=e5,eL[120]=es):es=eL[120],eL[121]!==e3||eL[122]!==es?(ec=(0,r.jsx)("input",{id:"fogInput",type:"checkbox",checked:e3,onChange:es}),eL[121]=e3,eL[122]=es,eL[123]=ec):ec=eL[123],eL[124]===Symbol.for("react.memo_cache_sentinel")?(eu=(0,r.jsx)("label",{className:eQ.default.Label,htmlFor:"fogInput",children:"Enable fog"}),eL[124]=eu):eu=eL[124],eL[125]!==ec?(ed=(0,r.jsxs)("div",{className:eQ.default.CheckboxField,children:[ec,eu]}),eL[125]=ec,eL[126]=ed):ed=eL[126],eL[127]!==tr?(em=e=>{tr(e.target.checked)},eL[127]=tr,eL[128]=em):em=eL[128],eL[129]!==tt||eL[130]!==em?(ef=(0,r.jsx)("input",{id:"animationInput",type:"checkbox",checked:tt,onChange:em}),eL[129]=tt,eL[130]=em,eL[131]=ef):ef=eL[131],eL[132]===Symbol.for("react.memo_cache_sentinel")?(eh=(0,r.jsx)("label",{className:eQ.default.Label,htmlFor:"animationInput",children:"Enable animations"}),eL[132]=eh):eh=eL[132],eL[133]!==ef?(ep=(0,r.jsxs)("div",{className:eQ.default.CheckboxField,children:[ef,eh]}),eL[133]=ef,eL[134]=ep):ep=eL[134],eL[135]!==ed||eL[136]!==ep?(eg=(0,r.jsxs)(eK,{value:"graphics",label:"Graphics",children:[ed,ep]}),eL[135]=ed,eL[136]=ep,eL[137]=eg):eg=eL[137],eL[138]!==tg?(ev=e=>{tg(e.target.checked)},eL[138]=tg,eL[139]=ev):ev=eL[139],eL[140]!==tp||eL[141]!==ev?(ex=(0,r.jsx)("input",{id:"debugInput",type:"checkbox",checked:tp,onChange:ev}),eL[140]=tp,eL[141]=ev,eL[142]=ex):ex=eL[142],eL[143]===Symbol.for("react.memo_cache_sentinel")?(ey=(0,r.jsx)("label",{className:eQ.default.Label,htmlFor:"debugInput",children:"Render debug visuals"}),eL[143]=ey):ey=eL[143],eL[144]!==ex?(eb=(0,r.jsxs)("div",{className:eQ.default.CheckboxField,children:[ex,ey]}),eL[144]=ex,eL[145]=eb):eb=eL[145],eL[146]!==tx?(e_=e=>{tx(e.target.checked)},eL[146]=tx,eL[147]=e_):e_=eL[147],eL[148]!==tv||eL[149]!==e_?(eS=(0,r.jsx)("input",{id:"onDemandInput",type:"checkbox",checked:tv,onChange:e_}),eL[148]=tv,eL[149]=e_,eL[150]=eS):eS=eL[150],eL[151]===Symbol.for("react.memo_cache_sentinel")?(ew=(0,r.jsx)("label",{htmlFor:"onDemandInput",children:"Render on demand "}),eL[151]=ew):ew=eL[151],eL[152]!==eG?(eC=()=>eG.current?.(),eL[152]=eG,eL[153]=eC):eC=eL[153],eL[154]===Symbol.for("react.memo_cache_sentinel")?(ej=(0,r.jsx)(h,{}),eL[154]=ej):ej=eL[154],eL[155]!==eC?(eM=(0,r.jsxs)("div",{className:eQ.default.Label,children:[ew,(0,r.jsx)("button",{type:"button",className:eQ.default.ForceRenderButton,title:"Force render","aria-label":"Force render",onClick:eC,children:ej})]}),eL[155]=eC,eL[156]=eM):eM=eL[156],eL[157]===Symbol.for("react.memo_cache_sentinel")?(ek=(0,r.jsx)("p",{className:eQ.default.Description,children:"Significantly decreases CPU and GPU usage by only rendering frames when requested. Helpful when developing parts of the app unrelated to rendering."}),eL[157]=ek):ek=eL[157],eL[158]!==eS||eL[159]!==eM?(eT=(0,r.jsxs)("div",{className:eQ.default.CheckboxField,children:[eS,eM,ek]}),eL[158]=eS,eL[159]=eM,eL[160]=eT):eT=eL[160],eL[161]!==eb||eL[162]!==eT?(eN=(0,r.jsxs)(eK,{value:"debug",label:"Debug",children:[eb,eT]}),eL[161]=eb,eL[162]=eT,eL[163]=eN):eN=eL[163],eL[164]!==V||eL[165]!==Y||eL[166]!==el||eL[167]!==eg||eL[168]!==eN?(eR=(0,r.jsx)("div",{className:eQ.default.Accordions,children:(0,r.jsxs)(e$,{type:"multiple",defaultValue:eJ,children:[V,Y,el,eg,eN]})}),eL[164]=V,eL[165]=Y,eL[166]=el,eL[167]=eg,eL[168]=eN,eL[169]=eR):eR=eL[169],eL[170]!==ty||eL[171]!==j||eL[172]!==eR?(eD=(0,r.jsx)("div",{className:eQ.default.InspectorControls,children:(0,r.jsx)("div",{ref:tw,children:(0,r.jsxs)("div",{className:eQ.default.Dropdown,ref:t_,id:"settingsPanel",tabIndex:-1,onKeyDown:tj,onBlur:tC,"data-open":ty,children:[j,eR]})})}),eL[170]=ty,eL[171]=j,eL[172]=eR,eL[173]=eD):eD=eL[173],eD}function e1(e){return"connected"===e.gameStatus||"authenticating"===e.gameStatus}var e2=e.i(11889),e3=e.i(56373),e5=e.i(86447),e4=e.i(1559),e6=e.i(78440),e8=e.i(59129),e7=e.i(25998),e9=e.i(18364),te=e.i(68754),tt=e.i(70238),tr=e.i(29402),tn=e.i(97442);let ta=new Set(["SkiFree","SkiFree_Daily","SkiFree_Randomizer"]),to={"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)"},ti={"z_mappacks/DM":"DM","z_mappacks/LCTF":"LCTF","z_mappacks/Lak":"LakRabbit"},tl=(0,eZ.getMissionList)().filter(e=>!ta.has(e)).map(e=>{let t,r=(0,eZ.getMissionInfo)(e),[n]=(0,eZ.getSourceAndPath)(r.resourcePath),a=(t=n.match(/^(.*)(\/[^/]+)$/))?t[1]:"",o=to[n]??ti[a]??null;return{resourcePath:r.resourcePath,missionName:e,displayName:r.displayName,sourcePath:n,groupName:o,missionTypes:r.missionTypes}}),ts=new Map(tl.map(e=>[e.missionName,e])),tc=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,tr.default)(e,[e=>(e.displayName||e.missionName).toLowerCase()],["asc"]))}),(0,tr.default)(Array.from(t.entries()),[([e])=>"Official"===e?0:null==e?2:1,([e])=>e?e.toLowerCase():""],["asc","asc"])}(tl),tu="u">typeof navigator&&/Mac|iPhone|iPad|iPod/.test(navigator.platform);function td(e){let t,a,o,i,l,s=(0,n.c)(12),{mission:c}=e,u=c.displayName||c.missionName;return s[0]!==u?(t=(0,r.jsx)("span",{className:tn.default.ItemName,children:u}),s[0]=u,s[1]=t):t=s[1],s[2]!==c.missionTypes?(a=c.missionTypes.length>0&&(0,r.jsx)("span",{className:tn.default.ItemTypes,children:c.missionTypes.map(tm)}),s[2]=c.missionTypes,s[3]=a):a=s[3],s[4]!==t||s[5]!==a?(o=(0,r.jsxs)("span",{className:tn.default.ItemHeader,children:[t,a]}),s[4]=t,s[5]=a,s[6]=o):o=s[6],s[7]!==c.missionName?(i=(0,r.jsx)("span",{className:tn.default.ItemMissionName,children:c.missionName}),s[7]=c.missionName,s[8]=i):i=s[8],s[9]!==o||s[10]!==i?(l=(0,r.jsxs)(r.Fragment,{children:[o,i]}),s[9]=o,s[10]=i,s[11]=l):l=s[11],l}function tm(e){return(0,r.jsx)("span",{className:tn.default.ItemType,"data-mission-type":e,children:e},e)}function tf(e){let t,o,i,l,s,c,u,d,m,f,h,p,g,v,x,y,b,_=(0,n.c)(48),{value:S,missionType:w,onChange:C,disabled:j,autoFocus:M}=e,[k,T]=(0,a.useState)(""),N=(0,a.useRef)(null),R=(0,a.useRef)(w);_[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{(0,a.startTransition)(()=>T(e))},_[0]=t):t=_[0];let D=(0,e9.useComboboxStore)({resetValueOnHide:!0,selectedValue:S,setSelectedValue:e=>{if(e){let t=R.current,r=(0,eZ.getMissionInfo)(e).missionTypes;t&&r.includes(t)||(t=r[0]),C({missionName:e,missionType:t}),N.current?.blur()}},setValue:t}),L=(0,te.useStoreState)(D,"open");_[1]!==D?(o=()=>{let e=e=>{"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),N.current?.focus(),D.show())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},i=[D],_[1]=D,_[2]=o,_[3]=i):(o=_[2],i=_[3]),(0,a.useEffect)(o,i),_[4]!==S?(l=ts.get(S),_[4]=S,_[5]=l):l=_[5];let F=l;e:{let e,t;if(!k){let e;_[6]===Symbol.for("react.memo_cache_sentinel")?(e={type:"grouped",groups:tc},_[6]=e):e=_[6],s=e;break e}_[7]!==k?(e=(0,tt.matchSorter)(tl,k,{keys:["displayName","missionName","missionTypes","groupName"]}),_[7]=k,_[8]=e):e=_[8];let r=e;_[9]!==r?(t={type:"flat",missions:r},_[9]=r,_[10]=t):t=_[10],s=t}let I=s,E=F?F.displayName||F.missionName:S,B="flat"===I.type?0===I.missions.length:0===I.groups.length,P=e=>(0,r.jsx)(e3.ComboboxItem,{value:e.missionName,className:tn.default.Item,focusOnHover:!0,onClick:t=>{if(t.target&&t.target instanceof HTMLElement){let r=t.target.dataset.missionType;r?(R.current=r,e.missionName===S&&C({missionName:e.missionName,missionType:r})):R.current=null}else R.current=null},children:(0,r.jsx)(td,{mission:e})},e.missionName),A=e6.ComboboxProvider,z=L?"visible":"hidden";_[11]===Symbol.for("react.memo_cache_sentinel")?(c=(0,r.jsx)("div",{className:tn.default.Backdrop}),_[11]=c):c=_[11],_[12]!==z?(u=(0,r.jsx)(a.Activity,{mode:z,children:c}),_[12]=z,_[13]=u):u=_[13];let U=F?void 0:"Choose a map…";_[14]!==D?(d=()=>{try{document.exitPointerLock()}catch{}D.show()},m=e=>{"Escape"!==e.key||D.getState().open||N.current?.blur()},_[14]=D,_[15]=d,_[16]=m):(d=_[15],m=_[16]),_[17]!==M||_[18]!==j||_[19]!==d||_[20]!==m||_[21]!==U?(f=(0,r.jsx)(e2.Combobox,{ref:N,autoSelect:!0,autoFocus:M,disabled:j,placeholder:U,className:tn.default.Input,onFocus:d,onKeyDown:m}),_[17]=M,_[18]=j,_[19]=d,_[20]=m,_[21]=U,_[22]=f):f=_[22],_[23]!==E||_[24]!==w||_[25]!==F?(h=F&&(0,r.jsxs)("div",{className:tn.default.SelectedValue,children:[(0,r.jsx)("span",{className:tn.default.SelectedName,children:E}),w&&(0,r.jsx)("span",{className:tn.default.ItemType,"data-mission-type":w,children:w})]}),_[23]=E,_[24]=w,_[25]=F,_[26]=h):h=_[26],_[27]===Symbol.for("react.memo_cache_sentinel")?(p=(0,r.jsx)("kbd",{className:tn.default.Shortcut,children:tu?"⌘K":"^K"}),_[27]=p):p=_[27],_[28]!==f||_[29]!==h?(g=(0,r.jsxs)("div",{className:tn.default.InputWrapper,children:[f,h,p]}),_[28]=f,_[29]=h,_[30]=g):g=_[30];let G=e4.ComboboxPopover,W=tn.default,H=e5.ComboboxList,O=tn.default,V="flat"===I.type?I.missions.map(P):I.groups.map(e=>{let[t,n]=e;return t?(0,r.jsxs)(e8.ComboboxGroup,{className:tn.default.Group,children:[(0,r.jsx)(e7.ComboboxGroupLabel,{className:tn.default.GroupLabel,children:t}),n.map(P)]},t):(0,r.jsx)(a.Fragment,{children:n.map(P)},"ungrouped")});return _[31]!==B?(v=B&&(0,r.jsx)("div",{className:tn.default.NoResults,children:"No missions found"}),_[31]=B,_[32]=v):v=_[32],_[33]!==H||_[34]!==O.List||_[35]!==V||_[36]!==v?(x=(0,r.jsxs)(H,{className:O.List,children:[V,v]}),_[33]=H,_[34]=O.List,_[35]=V,_[36]=v,_[37]=x):x=_[37],_[38]!==G||_[39]!==W.Popover||_[40]!==x?(y=(0,r.jsx)(G,{gutter:4,fitViewport:!0,autoFocusOnHide:!1,className:W.Popover,children:x}),_[38]=G,_[39]=W.Popover,_[40]=x,_[41]=y):y=_[41],_[42]!==A||_[43]!==D||_[44]!==g||_[45]!==y||_[46]!==u?(b=(0,r.jsxs)(A,{store:D,children:[u,g,y]}),_[42]=A,_[43]=D,_[44]=g,_[45]=y,_[46]=u,_[47]=b):b=_[47],b}var th=e.i(58647);function tp(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m12 6-6 8h12zM6 16h12v2H6z"},child:[]}]})(e)}var tg=e.i(16964);function tv(){let e,t,a,o,i,l,s=(0,n.c)(24),c=(0,eX.useDataSource)(),u=(0,eX.useMissionDisplayName)(),d=(0,eX.useMissionType)(),m=(0,eX.useMissionTypeDisplayName)(),f=(0,eX.useServerDisplayName)(),h=(0,eX.useRecorderName)(),g=(0,eX.useRecordingDate)(),[v,x]=g?g.split(" "):[null,null],y="live"===c,b=(0,T.useRecording)(),_=(0,k.useLiveSelector)(tb),S=tg.default;s[0]!==u||s[1]!==d||s[2]!==m?(e=u&&d?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:tg.default.MissionName,children:u}),d&&(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)("span",{className:tg.default.MissionType,"data-mission-type":d,children:"LCTF"===m?"LCTF":d})]})]}):null,s[0]=u,s[1]=d,s[2]=m,s[3]=e):e=s[3],s[4]!==e?(t=(0,r.jsx)("div",{className:tg.default.MissionInfo,children:e}),s[4]=e,s[5]=t):t=s[5];let w=tg.default,C=y?_?h?(0,r.jsxs)("div",{className:tg.default.Attribution,children:["Connected as"," ",(0,r.jsx)("span",{className:tg.default.PlayerName,children:h})]}):null:(0,r.jsx)("div",{className:tg.default.Error,children:"Disconnected"}):h&&g?(0,r.jsxs)("div",{className:tg.default.Attribution,children:["Recorded by ",(0,r.jsx)("span",{className:tg.default.PlayerName,children:h})," ","on"," ",(0,r.jsx)("span",{className:tg.default.RecordingDate,children:v.replace(/-/g," ")})," ","at ",(0,r.jsx)("span",{className:tg.default.RecordingDate,children:x})]}):null;return s[6]!==f?(a=f?(0,r.jsxs)("div",{className:tg.default.ServerInfo,children:["Server: ",(0,r.jsx)("span",{className:tg.default.ServerName,children:f})]}):null,s[6]=f,s[7]=a):a=s[7],s[8]!==w.Metadata||s[9]!==C||s[10]!==a?(o=(0,r.jsxs)("div",{className:w.Metadata,children:[C,a]}),s[8]=w.Metadata,s[9]=C,s[10]=a,s[11]=o):o=s[11],s[12]!==c||s[13]!==tx||s[14]!==ty||s[15]!==y||s[16]!==_||s[17]!==b?(i="demo"===c?(0,r.jsx)("button",{type:"button",className:tg.default.ActionButton,title:"Unload demo","aria-label":"Unload demo",onClick:ty,disabled:!b,children:(0,r.jsx)(tp,{className:tg.default.EjectIcon})}):y?(0,r.jsx)("button",{type:"button",className:tg.default.ActionButton,title:"Disconnect","aria-label":"Disconnect",onClick:tx,disabled:!_,children:(0,r.jsx)(p,{})}):null,s[12]=c,s[13]=tx,s[14]=ty,s[15]=y,s[16]=_,s[17]=b,s[18]=i):i=s[18],s[19]!==S.Header||s[20]!==t||s[21]!==o||s[22]!==i?(l=(0,r.jsxs)("div",{className:S.Header,children:[t,o,i]}),s[19]=S.Header,s[20]=t,s[21]=o,s[22]=i,s[23]=l):l=s[23],l}function tx(){let e=k.liveConnectionStore.getState();e.disconnectServer(),e.disconnectRelay(),th.engineStore.getState().setRecording(null)}function ty(){th.engineStore.getState().setRecording(null)}function tb(e){return"connected"===e.gameStatus||"authenticating"===e.gameStatus}var t_=e.i(31067),tS=e.i(15080),tw=e.i(71753),tC=e.i(90072);let tj=a.forwardRef(({envMap:e,resolution:t=256,frames:r=1/0,makeDefault:n,children:o,...i},l)=>{let s=(0,tS.useThree)(({set:e})=>e),c=(0,tS.useThree)(({camera:e})=>e),u=(0,tS.useThree)(({size:e})=>e),d=a.useRef(null);a.useImperativeHandle(l,()=>d.current,[]);let m=a.useRef(null),f=function(e,t,r){let n=(0,tS.useThree)(e=>e.size),o=(0,tS.useThree)(e=>e.viewport),i="number"==typeof e?e:n.width*o.dpr,l=n.height*o.dpr,s=("number"==typeof e?void 0:e)||{},{samples:c=0,depth:u,...d}=s,m=null!=u?u:s.depthBuffer,f=a.useMemo(()=>{let e=new tC.WebGLRenderTarget(i,l,{minFilter:tC.LinearFilter,magFilter:tC.LinearFilter,type:tC.HalfFloatType,...d});return m&&(e.depthTexture=new tC.DepthTexture(i,l,tC.FloatType)),e.samples=c,e},[]);return a.useLayoutEffect(()=>{f.setSize(i,l),c&&(f.samples=c)},[c,f,i,l]),a.useEffect(()=>()=>f.dispose(),[]),f}(t);a.useLayoutEffect(()=>{i.manual||(d.current.aspect=u.width/u.height)},[u,i]),a.useLayoutEffect(()=>{d.current.updateProjectionMatrix()});let h=0,p=null,g="function"==typeof o;return(0,tw.useFrame)(t=>{g&&(r===1/0||h{if(n)return s(()=>({camera:d.current})),()=>s(()=>({camera:c}))},[d,n,s]),a.createElement(a.Fragment,null,a.createElement("perspectiveCamera",(0,t_.default)({ref:d},i),!g&&o),a.createElement("group",{ref:m},g&&o(f.texture)))});function tM(){let e,t,a=(0,n.c)(3),{fov:o}=(0,_.useSettings)();return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=[0,256,0],a[0]=e):e=a[0],a[1]!==o?(t=(0,r.jsx)(tj,{makeDefault:!0,position:e,fov:o}),a[1]=o,a[2]=t):t=a[2],t}var tk=e.i(51434);let tT=(0,a.createContext)(null);function tN(){let e=(0,a.useContext)(tT);if(!e)throw Error("useCameras must be used within CamerasProvider");return e}function tR({children:e}){let t=(0,tS.useThree)(e=>e.camera),[n,o]=(0,a.useState)(-1),[i,l]=(0,a.useState)({}),[s,c]=(0,a.useState)(()=>({initialized:!1,position:null,quarternion:null})),u=(0,a.useCallback)(e=>{l(t=>({...t,[e.id]:e}))},[]),d=(0,a.useCallback)(e=>{l(t=>{let{[e.id]:r,...n}=t;return n})},[]),m=Object.keys(i).length,f=(0,a.useCallback)(e=>{if(e>=0&&e{f(m?(n+1)%m:-1)},[m,n,f]);(0,a.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)),a=r.split(",").map(e=>parseFloat(e));c({initialized:!0,position:new tC.Vector3(...n),quarternion:new tC.Quaternion(...a)})}else c({initialized:!0,position:null,quarternion:null})};return window.addEventListener("hashchange",e),e(),()=>{window.removeEventListener("hashchange",e)}},[]),(0,a.useEffect)(()=>{s.initialized&&s.position&&(t.position.copy(s.position),s.quarternion&&t.quaternion.copy(s.quarternion))},[t,s]),(0,a.useEffect)(()=>{s.initialized&&!s.position&&m>0&&-1===n&&f(0)},[m,f,n,s]);let p=(0,a.useMemo)(()=>({registerCamera:u,unregisterCamera:d,nextCamera:h,setCameraIndex:f,cameraCount:m}),[u,d,h,f,m]);return 0===m&&-1!==n&&o(-1),(0,r.jsx)(tT.Provider,{value:p,children:e})}var tD=e.i(93784),tL=e.i(65349),tF=e.i(51475),tI=e.i(89119);let tE=(0,M.createLogger)("InputConsumer"),tB=Math.PI/2-.01,tP=1/32,tA=2*Math.PI;function tz(e){return(Math.round(e/tA*65536)<<16>>16)*tA/65536}let tU=new tC.Vector3,tG=new tC.Vector3,tW=new tC.Vector3,tH=new tC.Euler(0,0,0,"YXZ");function tO(e,t,r,n,a,o,i){if(0===n&&0===a&&0===o)return;let l=Math.sin(t),s=Math.cos(t),c=Math.sin(r),u=Math.cos(r),d=i*tP;e.x+=(s*n+l*u*a+l*c*o)*d,e.y+=(-l*n+s*u*a+s*c*o)*d,e.z+=(-c*a+u*o)*d}function tV(){let{moveQueue:e,mode:t,setMode:r}=(0,tL.useInputContext)(),n=(0,k.useLiveSelector)(e=>e.adapter),o=(0,k.useLiveSelector)(e=>e.gameStatus),i=(0,k.useLiveSelector)(e=>e.sendMoves),l=(0,th.useEngineStoreApi)(),s=(0,tS.useThree)(e=>e.camera),c=(0,tF.useGetTickFraction)(),u=(0,a.useRef)(null),d=(0,a.useRef)([]),m=(0,a.useRef)(0),f=(0,a.useRef)(0),h=(0,a.useRef)(null),p=(0,a.useRef)(0),g=(0,a.useRef)(0),v=(0,a.useRef)({x:0,y:0,z:0}),x=(0,a.useRef)(0),y=(0,a.useRef)(0),b=(0,a.useRef)({x:0,y:0,z:0}),_=(0,a.useRef)(!1),S=(0,a.useRef)({x:0,y:0,z:0}),w=(0,a.useRef)({x:0,y:0,z:0}),C=(0,a.useRef)(!1),j=(0,a.useRef)(null),M=(0,a.useRef)(0),T=(0,a.useRef)(0),N=(0,a.useRef)(0),R=(0,a.useRef)(0),D=(0,a.useRef)(0),L=(0,a.useRef)([!1,!1,!1,!1,!1,!1]),F=(0,a.useRef)([!1,!1,!1,!1,!1,!1]),I=!!n&&("connected"===o||"authenticating"===o);return(0,a.useEffect)(()=>{if(I&&n){if(u.current===n)return;tE.info("wiring adapter to engine store");let e=k.liveConnectionStore.getState(),t={source:"live",duration:1/0,missionName:e.mapName??null,gameType:null,serverDisplayName:e.serverName??null,recorderName:e.warriorName??null,recordingDate:null,streamingPlayback:n};l.getState().setRecording(t),l.getState().setPlaybackStatus("playing"),u.current=n,_.current=!1,C.current=!1,j.current=null,d.current.length=0,m.current=0,f.current=0,h.current=null,r("fly")}else if(!I&&u.current){let e=l.getState().playback.recording;e?.source==="live"&&l.getState().setRecording(null),u.current=null,_.current=!1,C.current=!1,j.current=null,d.current.length=0,r("local")}},[I,n,l,r]),(0,tF.useTick)(()=>{if(!u.current||"connected"!==o)return;let e=M.current,t=T.current;M.current=0,T.current=0;let n=N.current,a=R.current,l=D.current;N.current=0,R.current=0,D.current=0;let s=[...L.current];L.current.fill(!1),s[2]&&!F.current[2]&&(u.current.toggleObserverMode(),tE.info("observer mode: %s",u.current.observerMode),r("follow"===u.current.observerMode?"follow":"fly")),F.current=s;let c=tz(e),f=tz(t);p.current+=c-e,g.current+=f-t,x.current=p.current,y.current=g.current,b.current={...v.current};let h=p.current-c,_=g.current-f;tO(v.current,h,_,n,a,l,80),s[1]=!0;let k=m.current++,I=d.current;I.push({moveIndex:k,move:{x:n,y:a,z:l,yaw:e,pitch:t,roll:0,trigger:s,freeLook:!1},yaw:c,pitch:f,x:n,y:a,z:l}),I.length>45&&I.splice(0,I.length-45);let E=u.current.lastMoveAck;for(;I.length>0&&I[0].moveIndex0){let e=I.slice(0,31);i(e.map(e=>e.move),e[0].moveIndex)}let B=u.current.getSnapshot();if(B!==j.current){j.current=B;let e=B?.camera;if(e?.orbitTargetId){let t=B.entities.find(t=>t.id===e.orbitTargetId);t?.position&&(S.current={...w.current},w.current={x:t.position[0],y:t.position[1],z:t.position[2]},C.current||(S.current={...w.current},C.current=!0))}}}),(0,tw.useFrame)((r,n)=>{let a=e.current;if(a.length>0){let t=0,r=0,n=0,c=0,d=0,f=0,h=[!1,!1,!1,!1,!1,!1];for(let e of a){t+=e.deltaYaw,r+=e.deltaPitch,n=e.x,c=e.y,d=e.z,f+=e.delta;for(let t=0;t0&&(tW.multiplyScalar(Math.min(1,e)/e*300*E),i.position.add(tW))}return}}if(!I||!u.current||"connected"!==o)return;let B=u.current,P=B.getSnapshot(),A=P?.camera;if(A&&A!==h.current&&"number"==typeof A.yaw&&"number"==typeof A.pitch){h.current=A;let e=B.lastMoveAck;if(e>f.current){f.current=e;let t=d.current;for(;t.length>0&&t[0].moveIndexe.id===A.orbitTargetId);if(e?.position){let t={x:e.position[0],y:e.position[1],z:e.position[2]};w.current=t,S.current={...t},C.current=!0}}}if(_.current){if("fly"===t)!function(e,t,r,n,a,o){let i=t.x+(r.x-t.x)*o,l=t.y+(r.y-t.y)*o,s=t.z+(r.z-t.z)*o;e.position.set(l,s,i);let[c,u,d,m]=(0,tI.yawPitchToQuaternion)(n,a);e.quaternion.set(c,u,d,m)}(r.camera,b.current,v.current,p.current,g.current,c());else if("follow"===t){if(!C.current)return;!function(e,t,r,n,a,o,i,l){let s=t.x+(r.x-t.x)*o,c=t.y+(r.y-t.y)*o,u=t.z+(r.z-t.z)*o,d=null!=l&&tD.streamPlaybackStore.getState().entities.get(l)?.renderType==="Player",m=Math.sin(a),f=Math.cos(a),h=Math.sin(n),p=Math.cos(n),g=Math.max(.1,i);e.position.set(c-p*f*g,u+ +!!d+m*g,s-h*f*g);let[v,x,y,b]=(0,tI.yawPitchToQuaternion)(n,a);e.quaternion.set(v,x,y,b)}(r.camera,S.current,w.current,p.current,g.current,c(),A?.orbitDistance??4,A?.orbitTargetId)}}}),(0,a.useEffect)(()=>()=>{if(u.current){let e=l.getState().playback.recording;e?.source==="live"&&l.getState().setRecording(null),u.current=null}},[l]),null}var tq=e.i(77964),t$=e.i(91907),tK=e.i(25947),tQ=e.i(46325),tY=e.i(31999),tX=e.i(89887);function tZ(e){let t,r,o,i,l=(0,n.c)(12),{entity:s}=e,{registerCamera:c,unregisterCamera:u}=tN(),d=(0,a.useId)(),m=s.cameraDataBlock;l[0]!==s.position?(t=s.position?new tC.Vector3(...s.position):new tC.Vector3,l[0]=s.position,l[1]=t):t=l[1];let f=t;l[2]!==s.rotation?(r=s.rotation?new tC.Quaternion(...s.rotation):new tC.Quaternion,l[2]=s.rotation,l[3]=r):r=l[3];let h=r;return l[4]!==m||l[5]!==d||l[6]!==f||l[7]!==c||l[8]!==h||l[9]!==u?(o=()=>{if("Observer"===m){let e={id:d,position:f,rotation:h};return c(e),()=>{u(e)}}},i=[d,m,c,u,f,h],l[4]=m,l[5]=d,l[6]=f,l[7]=c,l[8]=h,l[9]=u,l[10]=o,l[11]=i):(o=l[10],i=l[11]),(0,a.useEffect)(o,i),null}function tJ(e){let t,a=(0,n.c)(3),{entity:o}=e;return a[0]!==o.label||a[1]!==o.position?(t=o.label?(0,r.jsx)(tX.FloatingLabel,{position:o.position,opacity:.6,children:o.label}):null,a[0]=o.label,a[1]=o.position,a[2]=t):t=a[2],t}var t0=e.i(66027),t1=e.i(63318),t2=e.i(12979),t3=e.i(75567),t5=e.i(47071);let t4={value:!0},t6=`
vec3 terrainLinearToSRGB(vec3 linear) {
vec3 higher = pow(linear, vec3(1.0/2.4)) * 1.055 - 0.055;
vec3 lower = linear * 12.92;
@@ -518,4 +518,4 @@ outgoingLight = resultLinear + totalEmissiveRadiance;
gl_FragColor = vec4(linearToSRGB(finalColor), 1.0);
}
- `,depthWrite:!1,depthTest:!1})]})}function rW(e,t){let{fogDistance:r,visibleDistance:n}=e;return[r,n]}function rH({fogState:e,enabled:t}){let r=(0,tS.useThree)(e=>e.scene),n=(0,tS.useThree)(e=>e.camera),o=(0,a.useRef)(null),i=(0,a.useMemo)(()=>(0,t9.packFogVolumeData)(e.fogVolumes),[e.fogVolumes]);return(0,a.useEffect)(()=>{rP||((0,t7.installCustomFogShader)(),rP=!0)},[]),(0,a.useEffect)(()=>{(0,t9.resetGlobalFogUniforms)();let[t,a]=rW(e,n.position.y),l=new tC.Fog(e.fogColor,t,a);return r.fog=l,o.current=l,(0,t9.updateGlobalFogUniforms)(n.position.y,i),()=>{r.fog=null,o.current=null,(0,t9.resetGlobalFogUniforms)()}},[r,n,e,i]),(0,a.useEffect)(()=>{let r=o.current;if(r)if(t){let[t,a]=rW(e,n.position.y);r.near=t,r.far=a}else r.near=1e10,r.far=1e10},[t,e,n.position.y]),(0,tw.useFrame)(()=>{let r=o.current;if(!r)return;let a=n.position.y;if((0,t9.updateGlobalFogUniforms)(a,i,t),t){let[t,n]=rW(e,a);r.near=t,r.far=n,r.color.copy(e.fogColor)}}),null}let rO=(0,a.memo)(function({entity:e}){let{skyData:t}=e;rB.debug("Rendering: materialList=%s, useSkyTextures=%s",t.materialList,t.useSkyTextures);let{fogEnabled:n}=(0,_.useSettings)(),o=t.materialList||void 0,i=(0,a.useMemo)(()=>rA(t.skySolidColor),[t.skySolidColor]),l=t.useSkyTextures,s=(0,a.useMemo)(()=>(function(e){let t=e.fogDistance,r=e.visibleDistance>0?e.visibleDistance:1e3,{r:n,g:a,b:o}=e.fogColor,i=new tC.Color().setRGB(n,a,o).convertSRGBToLinear(),l=[];for(let t of e.fogVolumes)t.visibleDistance<=0||t.maxHeight<=t.minHeight||l.push({visibleDistance:t.visibleDistance,minHeight:t.minHeight,maxHeight:t.maxHeight,percentage:1});let s=l.reduce((e,t)=>Math.max(e,t.maxHeight),0);return{fogDistance:t,visibleDistance:r,fogColor:i,fogVolumes:l,fogLine:s,enabled:r>t}})(t),[t]);rB.debug("fogState: fogColor=(%s, %s, %s) visibleDistance=%d fogDistance=%d enabled=%s volumes=%d",t.fogColor.r.toFixed(3),t.fogColor.g.toFixed(3),t.fogColor.b.toFixed(3),t.visibleDistance,t.fogDistance,s.enabled,s.fogVolumes.length);let c=(0,a.useMemo)(()=>rA(t.fogColor),[t.fogColor]),u=i||c,d=s.enabled&&n,m=s.fogColor,f=(0,tS.useThree)(e=>e.scene),h=(0,tS.useThree)(e=>e.gl);(0,a.useEffect)(()=>{if(d){let e=m.clone();f.background=e,h.setClearColor(e)}else if(u){let e=u[0].clone();f.background=e,h.setClearColor(e)}else f.background=null;return()=>{f.background=null}},[f,h,d,m,u]);let p=i?.[1];return(0,r.jsxs)(r.Fragment,{children:[o&&l&&o.length>0?(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(rU,{materialList:o,fogColor:d?m:void 0,fogState:d?s:void 0},o)}):p?(0,r.jsx)(rG,{skyColor:p,fogColor:d?m:void 0,fogState:d?s:void 0}):null,(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(rF,{scene:t})}),s.enabled?(0,r.jsx)(rH,{fogState:s,enabled:n}):null]})});function rV(e){let t,o=(0,n.c)(3),{children:i}=e,{audioEnabled:l}=(0,_.useSettings)();return o[0]!==l||o[1]!==i?(t=l?(0,r.jsx)(a.Suspense,{children:i}):null,o[0]=l,o[1]=i,o[2]=t):t=o[2],t}function rq(e,t){let o=(0,a.lazy)(()=>t().then(t=>({default:t[e]}))),i=t=>{let a,i,l=(0,n.c)(5),{entity:s}=t,c=`${e}:${s.id}`;return l[0]!==s?(a=(0,r.jsx)(o,{entity:s}),l[0]=s,l[1]=a):a=l[1],l[2]!==c||l[3]!==a?(i=(0,r.jsx)(tQ.DebugSuspense,{name:c,children:a}),l[2]=c,l[3]=a,l[4]=i):i=l[4],i};return i.displayName=`createLazy(${e})`,i}let r$=rq("PlayerModel",()=>e.A(30814)),rK=rq("ExplosionShape",()=>e.A(44325)),rQ=rq("TracerProjectile",()=>e.A(62125)),rY=rq("SpriteProjectile",()=>e.A(62125)),rX=rq("ForceFieldBare",()=>e.A(25147)),rZ=rq("AudioEmitter",()=>e.A(61921)),rJ=rq("WaterBlock",()=>e.A(18599)),r0=rq("WeaponModel",()=>e.A(44325)),r1={1:"Storm",2:"Inferno"},r2=(0,a.memo)(function(e){let t=(0,n.c)(26),{entity:a}=e;switch(a.renderType){case"Shape":{let e;return t[0]!==a?(e=(0,r.jsx)(r3,{entity:a}),t[0]=a,t[1]=e):e=t[1],e}case"ForceFieldBare":{let e;return t[2]!==a?(e=(0,r.jsx)(rX,{entity:a}),t[2]=a,t[3]=e):e=t[3],e}case"Player":{let e;return t[4]!==a?(e=(0,r.jsx)(r$,{entity:a}),t[4]=a,t[5]=e):e=t[5],e}case"Explosion":{let e;return t[6]!==a?(e=(0,r.jsx)(rK,{entity:a}),t[6]=a,t[7]=e):e=t[7],e}case"Tracer":{let e;return t[8]!==a?(e=(0,r.jsx)(rQ,{entity:a}),t[8]=a,t[9]=e):e=t[9],e}case"Sprite":{let e;return t[10]!==a?(e=(0,r.jsx)(rY,{entity:a}),t[10]=a,t[11]=e):e=t[11],e}case"AudioEmitter":{let e;return t[12]!==a?(e=(0,r.jsx)(rV,{children:(0,r.jsx)(rZ,{entity:a})}),t[12]=a,t[13]=e):e=t[13],e}case"Camera":{let e;return t[14]!==a?(e=(0,r.jsx)(tZ,{entity:a}),t[14]=a,t[15]=e):e=t[15],e}case"WayPoint":{let e;return t[16]!==a?(e=(0,r.jsx)(tJ,{entity:a}),t[16]=a,t[17]=e):e=t[17],e}case"TerrainBlock":{let e;return t[18]!==a.terrainData?(e=(0,r.jsx)(rl,{scene:a.terrainData}),t[18]=a.terrainData,t[19]=e):e=t[19],e}case"InteriorInstance":{let e;return t[20]!==a.interiorData?(e=(0,r.jsx)(rw,{scene:a.interiorData}),t[20]=a.interiorData,t[21]=e):e=t[21],e}case"Sky":{let e;return t[22]!==a?(e=(0,r.jsx)(rO,{entity:a}),t[22]=a,t[23]=e):e=t[23],e}case"Sun":case"MissionArea":case"None":default:return null;case"WaterBlock":{let e;return t[24]!==a?(e=(0,r.jsx)(rJ,{entity:a}),t[24]=a,t[25]=e):e=t[25],e}}});function r3(e){let t,o,i,l,s,c,u,d=(0,n.c)(24),{entity:m}=e,{animationEnabled:f}=(0,_.useSettings)(),h=(0,a.useRef)(null);if(d[0]!==f||d[1]!==m.rotate?(t=()=>{if(!h.current||!m.rotate||!f)return;let e=performance.now()/1e3;h.current.rotation.y=e/3*Math.PI*2},d[0]=f,d[1]=m.rotate,d[2]=t):t=d[2],(0,tw.useFrame)(t),!m.shapeName)throw Error(`Shape entity missing shapeName: ${m.id}`);let p=m.runtimeObject,g=m.shapeType??"StaticShape",v=m.dataBlock?.toLowerCase()==="flag",x=m.teamId&&m.teamId>0?r1[m.teamId]:null,y=v&&x?`${x} Flag`:null,b="Item"===m.shapeType?"pink":m.threads?"#00ff88":"yellow",S=m.rotate?h:void 0,w=p?void 0:m;return d[3]!==y?(o=y?(0,r.jsx)(tX.FloatingLabel,{opacity:.6,children:y}):null,d[3]=y,d[4]=o):o=d[4],d[5]!==b||d[6]!==w||d[7]!==o?(i=(0,r.jsx)(t$.ShapeRenderer,{loadingColor:b,streamEntity:w,children:o}),d[5]=b,d[6]=w,d[7]=o,d[8]=i):i=d[8],d[9]!==m.barrelShapeName||d[10]!==p?(l=m.barrelShapeName&&(0,r.jsx)(tK.ShapeInfoProvider,{object:p,shapeName:m.barrelShapeName,type:"Turret",children:(0,r.jsx)("group",{position:[0,1.5,0],children:(0,r.jsx)(t$.ShapeRenderer,{})})}),d[9]=m.barrelShapeName,d[10]=p,d[11]=l):l=d[11],d[12]!==m?(s=m.weaponShape&&(0,r.jsx)(tY.ShapeErrorBoundary,{fallback:(0,r.jsx)(t$.ShapePlaceholder,{color:"red",label:m.weaponShape}),children:(0,r.jsx)(tQ.DebugSuspense,{name:`Weapon:${m.id}/${m.weaponShape}`,fallback:(0,r.jsx)(t$.ShapePlaceholder,{color:"cyan",label:m.weaponShape}),children:(0,r.jsx)(r0,{entity:m})})}),d[12]=m,d[13]=s):s=d[13],d[14]!==S||d[15]!==i||d[16]!==l||d[17]!==s?(c=(0,r.jsxs)("group",{ref:S,children:[i,l,s]}),d[14]=S,d[15]=i,d[16]=l,d[17]=s,d[18]=c):c=d[18],d[19]!==m.shapeName||d[20]!==g||d[21]!==c||d[22]!==p?(u=(0,r.jsx)(tK.ShapeInfoProvider,{object:p,shapeName:m.shapeName,type:g,children:c}),d[19]=m.shapeName,d[20]=g,d[21]=c,d[22]=p,d[23]=u):u=d[23],u}var r5=e.i(60099),r4=e.i(85557),r6=e.i(29418);let r8=(0,t2.textureToUrl)("gui/hud_alliedtriangle"),r7=(0,t2.textureToUrl)("gui/hud_enemytriangle"),r9=new tC.Vector3,ne=[];function nt(e){let t,o,i,l,s,c=(0,n.c)(21),{entity:u}=e,d=(0,t$.useStaticShape)(u.shapeName??u.dataBlock),m=(0,tS.useThree)(nn),f=(0,a.useRef)(null),h=(0,a.useRef)(null),p=(0,a.useRef)(null),g=(0,a.useRef)(null),v=(0,a.useRef)(null),[x,y]=(0,a.useState)(!0),b=(0,a.useRef)(null);c[0]!==d.scene?(t=new tC.Box3().setFromObject(d.scene),c[0]=d.scene,c[1]=t):t=c[1];let _=t.max.y+.1,S=u.keyframes??ne;c[2]!==S?(o=S.some(nr),c[2]=S,c[3]=o):o=c[3];let w=o;c[4]!==m||c[5]!==u.id||c[6]!==u.iffColor||c[7]!==u.playerName||c[8]!==w||c[9]!==x||c[10]!==S?(i=()=>{let e=f.current;if(!e)return;e.getWorldPosition(r9);let t=m.position.distanceTo(r9),r=m.matrixWorld.elements,n=!(-((r9.x-r[12])*r[8])+-((r9.y-r[13])*r[9])+-((r9.z-r[14])*r[10])<0)&&t<150;if(x!==n&&y(n),!n)return;let a=(0,r4.getKeyframeAtTime)(S,tD.streamPlaybackStore.getState().time),o=a?.health??1;if(a?.damageState!=null&&a.damageState>=1){h.current&&(h.current.style.opacity="0"),p.current&&(p.current.style.opacity="0");return}let i=Math.max(0,Math.min(1,1-t/150)).toString();if(h.current&&(h.current.style.opacity=i),p.current&&(p.current.style.opacity=i),b.current){let e=u.playerName??u.id;b.current.textContent!==e&&(b.current.textContent=e)}if(v.current&&u.iffColor){let e=u.iffColor.r>u.iffColor.g?r7:r8;v.current.getAttribute("src")!==e&&(v.current.src=e)}g.current&&w&&(g.current.style.width=`${Math.max(0,Math.min(100,100*o))}%`,g.current.style.background=u.iffColor?`rgb(${u.iffColor.r}, ${u.iffColor.g}, ${u.iffColor.b})`:"")},c[4]=m,c[5]=u.id,c[6]=u.iffColor,c[7]=u.playerName,c[8]=w,c[9]=x,c[10]=S,c[11]=i):i=c[11],(0,tw.useFrame)(i);let C=u.iffColor&&u.iffColor.r>u.iffColor.g?r7:r8;return c[12]!==u.id||c[13]!==u.playerName||c[14]!==w||c[15]!==_||c[16]!==C||c[17]!==x?(l=x&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(r5.Html,{position:[0,_,0],center:!0,children:(0,r.jsx)("div",{ref:h,className:r6.default.Top,children:(0,r.jsx)("img",{ref:v,className:r6.default.IffArrow,src:C,alt:""})})}),(0,r.jsx)(r5.Html,{position:[0,-.2,0],center:!0,children:(0,r.jsxs)("div",{ref:p,className:r6.default.Bottom,children:[(0,r.jsx)("div",{ref:b,className:r6.default.Name,children:u.playerName??u.id}),w&&(0,r.jsx)("div",{className:r6.default.HealthBar,children:(0,r.jsx)("div",{ref:g,className:r6.default.HealthFill})})]})})]}),c[12]=u.id,c[13]=u.playerName,c[14]=w,c[15]=_,c[16]=C,c[17]=x,c[18]=l):l=c[18],c[19]!==l?(s=(0,r.jsx)("group",{ref:f,children:l}),c[19]=l,c[20]=s):s=c[20],s}function nr(e){return null!=e.health}function nn(e){return e.camera}var na=e.i(78779);let no=(0,t2.textureToUrl)("commander/MiniIcons/com_flag_grey"),ni=new tC.Vector3;function nl(e){let t,o,i,l,s,c=(0,n.c)(9),{entity:u}=e,d=(0,a.useRef)(null),m=(0,a.useRef)(null),f=(0,a.useRef)(null),h=(0,tS.useThree)(ns);c[0]!==h||c[1]!==u.iffColor?(t=()=>{if(m.current&&u.iffColor){let{r:e,g:t,b:r}=u.iffColor;m.current.style.backgroundColor=`rgb(${e},${t},${r})`}if(f.current&&d.current){d.current.getWorldPosition(ni);let e=h.position.distanceTo(ni);f.current.textContent=e.toFixed(1)}},c[0]=h,c[1]=u.iffColor,c[2]=t):t=c[2],(0,tw.useFrame)(t);let p=u.iffColor?`rgb(${u.iffColor.r},${u.iffColor.g},${u.iffColor.b})`:"rgb(200,200,200)";c[3]===Symbol.for("react.memo_cache_sentinel")?(o=[0,1.5,0],c[3]=o):o=c[3],c[4]===Symbol.for("react.memo_cache_sentinel")?(i=(0,r.jsx)("span",{ref:f,className:na.default.Distance}),c[4]=i):i=c[4],c[5]!==p?(l={backgroundColor:p,"--flag-icon-url":`url(${no})`},c[5]=p,c[6]=l):l=c[6];let g=l;return c[7]!==g?(s=(0,r.jsx)("group",{ref:d,children:(0,r.jsx)(r5.Html,{position:o,center:!0,children:(0,r.jsxs)("div",{className:na.default.Root,children:[i,(0,r.jsx)("div",{ref:m,className:na.default.Icon,style:g})]})})}),c[7]=g,c[8]=s):s=c[8],s}function ns(e){return e.camera}function nc(){let e,t=(0,n.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)("group",{ref:nu,children:(0,r.jsx)(nd,{})}),t[0]=e):e=t[0],e}function nu(e){tD.streamPlaybackStore.setState({root:e})}let nd=(0,a.memo)(function(){let e=(0,eX.useAllGameEntities)(),t=(0,a.useRef)(new Map).current,n=new Set;for(let r of e)n.add(r.id),t.set(r.id,r);for(let e of t.keys())n.has(e)||t.delete(e);return(0,r.jsx)(r.Fragment,{children:[...t.values()].map(e=>(0,r.jsx)(nm,{entity:e},e.id))})}),nm=(0,a.memo)(function(e){let t,a=(0,n.c)(7),{entity:o}=e;if((0,tq.isSceneEntity)(o)){let e,t;return a[0]!==o?(e=(0,r.jsx)(r2,{entity:o}),a[0]=o,a[1]=e):e=a[1],a[2]!==o.id||a[3]!==e?(t=(0,r.jsx)("group",{name:o.id,children:e}),a[2]=o.id,a[3]=e,a[4]=t):t=a[4],t}return"None"===o.renderType?null:(a[5]!==o?(t=(0,r.jsx)(ng,{entity:o}),a[5]=o,a[6]=t):t=a[6],t)});function nf(e){let t,a=(0,n.c)(2),{entity:o}=e,i=(0,th.useEngineSelector)(nh);return o.id===i?null:(a[0]!==o?(t=(0,r.jsx)(nt,{entity:o}),a[0]=o,a[1]=t):t=a[1],t)}function nh(e){return e.playback.streamSnapshot?.controlPlayerGhostId}function np({entity:e}){let t=(0,a.useRef)(!1),[n,o]=(0,a.useState)(()=>((("targetRenderFlags"in e?e.targetRenderFlags:void 0)??0)&2)!=0);return(t.current=n,(0,tw.useFrame)(()=>{let r=((("targetRenderFlags"in e?e.targetRenderFlags:void 0)??0)&2)!=0;r!==t.current&&(t.current=r,o(r))}),n)?(0,r.jsx)(nl,{entity:e}):null}function ng(e){let t,a,o,i,l,s,c,u,d=(0,n.c)(39),{entity:m}=e,f=m.position,h=m.scale;e:{let e;if(!m.rotation){t=void 0;break e}d[0]!==m.rotation?(e=new tC.Quaternion(...m.rotation),d[0]=m.rotation,d[1]=e):e=d[1],t=e}let p=t,g="Player"===m.renderType;if("Shape"===m.renderType&&!m.shapeName){let e,t,n,a,o,i=m.id;return d[2]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)("sphereGeometry",{args:[.3,6,4]}),d[2]=e):e=d[2],d[3]!==m.className?(t=(0,r4.entityTypeColor)(m.className),d[3]=m.className,d[4]=t):t=d[4],d[5]!==t?(n=(0,r.jsxs)("mesh",{children:[e,(0,r.jsx)("meshBasicMaterial",{color:t,wireframe:!0})]}),d[5]=t,d[6]=n):n=d[6],d[7]!==m?(a=(0,r.jsx)(np,{entity:m}),d[7]=m,d[8]=a):a=d[8],d[9]!==m.id||d[10]!==f||d[11]!==p||d[12]!==h||d[13]!==n||d[14]!==a?(o=(0,r.jsxs)("group",{name:i,position:f,quaternion:p,scale:h,children:[n,a]}),d[9]=m.id,d[10]=f,d[11]=p,d[12]=h,d[13]=n,d[14]=a,d[15]=o):o=d[15],o}d[16]!==m.className||d[17]!==m.renderType?(a="Explosion"===m.renderType?null:(0,r.jsxs)("mesh",{children:[(0,r.jsx)("sphereGeometry",{args:[.5,8,6]}),(0,r.jsx)("meshBasicMaterial",{color:(0,r4.entityTypeColor)(m.className),wireframe:!0})]}),d[16]=m.className,d[17]=m.renderType,d[18]=a):a=d[18];let v=a;return d[19]!==m?(o=(0,r.jsx)(r2,{entity:m}),d[19]=m,d[20]=o):o=d[20],d[21]!==v||d[22]!==o?(i=(0,r.jsx)(tY.ShapeErrorBoundary,{fallback:v,children:o}),d[21]=v,d[22]=o,d[23]=i):i=d[23],d[24]!==m||d[25]!==g?(l=g&&(0,r.jsx)(nf,{entity:m}),d[24]=m,d[25]=g,d[26]=l):l=d[26],d[27]!==m?(s=(0,r.jsx)(np,{entity:m}),d[27]=m,d[28]=s):s=d[28],d[29]!==i||d[30]!==l||d[31]!==s?(c=(0,r.jsxs)("group",{name:"model",children:[i,l,s]}),d[29]=i,d[30]=l,d[31]=s,d[32]=c):c=d[32],d[33]!==m.id||d[34]!==f||d[35]!==p||d[36]!==h||d[37]!==c?(u=(0,r.jsx)("group",{name:m.id,position:f,quaternion:p,scale:h,children:c}),d[33]=m.id,d[34]=f,d[35]=p,d[36]=h,d[37]=c,d[38]=u):u=d[38],u}let nv=(0,M.createLogger)("SceneLighting");function nx(){let e,t,o,i=(0,n.c)(6),l=(0,eX.useSceneSun)();if(i[0]!==l?(e=()=>{l?nv.debug("sunData: dir=(%s, %s, %s) color=(%s, %s, %s) ambient=(%s, %s, %s)",l.direction.x.toFixed(3),l.direction.y.toFixed(3),l.direction.z.toFixed(3),l.color.r.toFixed(3),l.color.g.toFixed(3),l.color.b.toFixed(3),l.ambient.r.toFixed(3),l.ambient.g.toFixed(3),l.ambient.b.toFixed(3)):nv.debug("No sunData — using fallback ambient #888")},t=[l],i[0]=l,i[1]=e,i[2]=t):(e=i[1],t=i[2]),(0,a.useEffect)(e,t),!l){let e;return i[3]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)("ambientLight",{color:"#888888",intensity:1}),i[3]=e):e=i[3],e}return i[4]!==l?(o=(0,r.jsx)(ny,{sunData:l}),i[4]=l,i[5]=o):o=i[5],o}function ny(e){let t,o,i,l,s,c,u,d,m,f,h=(0,n.c)(29),{sunData:p}=e;h[0]!==p.direction?(t=(0,t1.torqueToThree)(p.direction),h[0]=p.direction,h[1]=t):t=h[1];let[g,v,x]=t,y=Math.sqrt(g*g+v*v+x*x),b=g/y,_=v/y,S=x/y;h[2]!==b||h[3]!==_||h[4]!==S?(o=new tC.Vector3(b,_,S),h[2]=b,h[3]=_,h[4]=S,h[5]=o):o=h[5];let w=o,C=-(5e3*w.x),j=-(5e3*w.y),M=-(5e3*w.z);h[6]!==C||h[7]!==j||h[8]!==M?(i=new tC.Vector3(C,j,M),h[6]=C,h[7]=j,h[8]=M,h[9]=i):i=h[9];let k=i;h[10]!==p.color.b||h[11]!==p.color.g||h[12]!==p.color.r?(l=new tC.Color(p.color.r,p.color.g,p.color.b),h[10]=p.color.b,h[11]=p.color.g,h[12]=p.color.r,h[13]=l):l=h[13];let T=l;h[14]!==p.ambient.b||h[15]!==p.ambient.g||h[16]!==p.ambient.r?(s=new tC.Color(p.ambient.r,p.ambient.g,p.ambient.b),h[14]=p.ambient.b,h[15]=p.ambient.g,h[16]=p.ambient.r,h[17]=s):s=h[17];let N=s,R=w.y<0;return h[18]!==R?(c=()=>{t4.value=R},u=[R],h[18]=R,h[19]=c,h[20]=u):(c=h[19],u=h[20]),(0,a.useEffect)(c,u),h[21]!==T||h[22]!==k?(d=(0,r.jsx)("directionalLight",{position:k,color:T,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}),h[21]=T,h[22]=k,h[23]=d):d=h[23],h[24]!==N?(m=(0,r.jsx)("ambientLight",{color:N,intensity:1}),h[24]=N,h[25]=m):m=h[25],h[26]!==d||h[27]!==m?(f=(0,r.jsxs)(r.Fragment,{children:[d,m]}),h[26]=d,h[27]=m,h[28]=f):f=h[28],f}function nb(){delete window.setMissionName,delete window.getMissionList,delete window.getMissionInfo,delete window.loadDemoRecording}var n_=e.i(74657),nS=e.i(75056);let nw={toneMapping:tC.NoToneMapping,outputColorSpace:tC.SRGBColorSpace};function nC(e){let t,a,o=(0,n.c)(6),{children:i,renderOnDemand:l,dpr:s,onCreated:c}=e,{renderOnDemand:u}=(0,_.useDebug)(),d=void 0!==l&&l||u?"demand":"always";return o[0]===Symbol.for("react.memo_cache_sentinel")?(t={type:tC.PCFShadowMap},o[0]=t):t=o[0],o[1]!==i||o[2]!==s||o[3]!==c||o[4]!==d?(a=(0,r.jsx)(nS.Canvas,{frameloop:d,dpr:s,gl:nw,shadows:t,onCreated:c,children:i}),o[1]=i,o[2]=s,o[3]=c,o[4]=d,o[5]=a):a=o[5],a}var nj=e.i(12631),nM=e.i(66093),nk=e.i(85413),nT=Object.defineProperty,nN=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?nT(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,r};let nR=new tC.Euler(0,0,0,"YXZ"),nD=new tC.Vector3,nL={type:"change"},nF={type:"lock"},nI={type:"unlock"},nE=Math.PI/2;class nB extends nk.EventDispatcher{constructor(e,t){super(),nN(this,"camera"),nN(this,"domElement"),nN(this,"isLocked"),nN(this,"minPolarAngle"),nN(this,"maxPolarAngle"),nN(this,"pointerSpeed"),nN(this,"onMouseMove",e=>{this.domElement&&!1!==this.isLocked&&(nR.setFromQuaternion(this.camera.quaternion),nR.y-=.002*e.movementX*this.pointerSpeed,nR.x-=.002*e.movementY*this.pointerSpeed,nR.x=Math.max(nE-this.maxPolarAngle,Math.min(nE-this.minPolarAngle,nR.x)),this.camera.quaternion.setFromEuler(nR),this.dispatchEvent(nL))}),nN(this,"onPointerlockChange",()=>{this.domElement&&(this.domElement.ownerDocument.pointerLockElement===this.domElement?(this.dispatchEvent(nF),this.isLocked=!0):(this.dispatchEvent(nI),this.isLocked=!1))}),nN(this,"onPointerlockError",()=>{console.error("THREE.PointerLockControls: Unable to use Pointer Lock API")}),nN(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))}),nN(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))}),nN(this,"dispose",()=>{this.disconnect()}),nN(this,"getObject",()=>this.camera),nN(this,"direction",new tC.Vector3(0,0,-1)),nN(this,"getDirection",e=>e.copy(this.direction).applyQuaternion(this.camera.quaternion)),nN(this,"moveForward",e=>{nD.setFromMatrixColumn(this.camera.matrix,0),nD.crossVectors(this.camera.up,nD),this.camera.position.addScaledVector(nD,e)}),nN(this,"moveRight",e=>{nD.setFromMatrixColumn(this.camera.matrix,0),this.camera.position.addScaledVector(nD,e)}),nN(this,"lock",()=>{this.domElement&&this.domElement.requestPointerLock()}),nN(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)}}(t={}).forward="forward",t.backward="backward",t.left="left",t.right="right",t.up="up",t.down="down",t.lookUp="lookUp",t.lookDown="lookDown",t.lookLeft="lookLeft",t.lookRight="lookRight",t.camera1="camera1",t.camera2="camera2",t.camera3="camera3",t.camera4="camera4",t.camera5="camera5",t.camera6="camera6",t.camera7="camera7",t.camera8="camera8",t.camera9="camera9";let nP=[{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 nA(){let e,t,r,o,i,l,s,c,u,d,m,f,h,p,g,v=(0,n.c)(41);v[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],v[0]=e):e=v[0],(0,a.useEffect)(nG,e);let{speedMultiplier:x,setSpeedMultiplier:y,invertScroll:b,invertDrag:S}=(0,_.useControls)(),{onInput:w,mode:C}=(0,tL.useInputContext)(),[j,M]=(0,nj.useKeyboardControls)(),k=(0,tS.useThree)(nU),T=(0,tS.useThree)(nz),{nextCamera:N,setCameraIndex:R,cameraCount:D}=tN(),L=(0,a.useRef)(null);v[1]!==b?(t=()=>b,v[1]=b,v[2]=t):t=v[2];let F=(0,a.useEffectEvent)(t);v[3]!==S?(r=()=>S,v[3]=S,v[4]=r):r=v[4];let I=(0,a.useEffectEvent)(r);v[5]!==C?(o=()=>C,v[5]=C,v[6]=o):o=v[6];let E=(0,a.useEffectEvent)(o),B=(0,a.useRef)(0),P=(0,a.useRef)(0),A=(0,a.useRef)(!1),z=(0,a.useRef)(!1);return v[7]!==k||v[8]!==T.domElement?(i=()=>{let e=new nB(k,T.domElement);return L.current=e,()=>{e.dispose()}},l=[k,T.domElement],v[7]=k,v[8]=T.domElement,v[9]=i,v[10]=l):(i=v[9],l=v[10]),(0,a.useEffect)(i,l),v[11]!==I||v[12]!==E||v[13]!==T.domElement||v[14]!==C||v[15]!==N?(s=()=>{let e=T.domElement,t=!1,r=!1,n=0,a=0,o=o=>{L.current?.isLocked||o.target===e&&(t=!0,r=!1,n=o.clientX,a=o.clientY)},i=e=>{if(L.current?.isLocked){B.current=B.current+.002*e.movementX,P.current=P.current+.002*e.movementY;return}if(!t||!r&&3>Math.abs(e.clientX-n)&&3>Math.abs(e.clientY-a))return;r=!0;let o="follow"===E()?-1:1,i=(I()?1:-1)*o;B.current=B.current+i*e.movementX*.002,P.current=P.current+i*e.movementY*.002},l=()=>{t=!1},s=t=>{let n=L.current;n?.isLocked?"follow"===C?A.current=!0:"local"===C&&N():t.target!==e||r||n?.lock()};return e.addEventListener("mousedown",o),document.addEventListener("mousemove",i),document.addEventListener("mouseup",l),document.addEventListener("click",s),()=>{e.removeEventListener("mousedown",o),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",l),document.removeEventListener("click",s)}},v[11]=I,v[12]=E,v[13]=T.domElement,v[14]=C,v[15]=N,v[16]=s):s=v[16],v[17]!==k||v[18]!==T.domElement||v[19]!==C||v[20]!==N?(c=[k,T.domElement,N,C],v[17]=k,v[18]=T.domElement,v[19]=C,v[20]=N,v[21]=c):c=v[21],(0,a.useEffect)(s,c),v[22]!==D||v[23]!==R||v[24]!==j?(u=()=>{let e=["camera1","camera2","camera3","camera4","camera5","camera6","camera7","camera8","camera9"];return j(t=>{for(let r=0;r{let e=e=>{e.preventDefault();let t=F()?-1:1,r=(e.deltaY>0?-1:1)*t,n=Math.max(2,Math.min(11,Math.ceil(Math.log2(Math.abs(e.deltaY)+1))))*r;y(e=>{let t=Math.round(100*e)+n;return Math.max(_.MIN_SPEED_MULTIPLIER,Math.min(_.MAX_SPEED_MULTIPLIER,t/100))})},t=T.domElement;return t.addEventListener("wheel",e,{passive:!1}),()=>{t.removeEventListener("wheel",e)}},v[27]=F,v[28]=T.domElement,v[29]=y,v[30]=m):m=v[30],v[31]!==T.domElement||v[32]!==y?(f=[T.domElement,y],v[31]=T.domElement,v[32]=y,v[33]=f):f=v[33],(0,a.useEffect)(m,f),v[34]!==C?(h=()=>{if("local"===C)return;let e=e=>{if("KeyO"!==e.code||e.metaKey||e.ctrlKey||e.altKey)return;let t=e.target;"INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(z.current=!0)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},p=[C],v[34]=C,v[35]=h,v[36]=p):(h=v[35],p=v[36]),(0,a.useEffect)(h,p),v[37]!==M||v[38]!==w||v[39]!==x?(g=(e,t)=>{let{forward:r,backward:n,left:a,right:o,up:i,down:l,lookUp:s,lookDown:c,lookLeft:u,lookRight:d}=M(),m=B.current,f=P.current;B.current=0,P.current=0,u&&(m-=t),d&&(m+=+t),s&&(f-=t),c&&(f+=+t);let h=0,p=0,g=0;a&&(h=-1),o&&(h+=1),r&&(p=1),n&&(p-=1),i&&(g=1),l&&(g-=1);let v=(Math.round(15*((x-_.MIN_SPEED_MULTIPLIER)/(1-_.MIN_SPEED_MULTIPLIER)))+1)/16;h=Math.max(-1,Math.min(1,h*v)),p=Math.max(-1,Math.min(1,p*v)),g=Math.max(-1,Math.min(1,g*v));let y=[!1,!1,!1,!1,!1,!1];A.current&&(y[0]=!0,A.current=!1),z.current&&(y[2]=!0,z.current=!1);let b=0!==m||0!==f,S=0!==h||0!==p||0!==g,C=y.some(Boolean);(b||S||C)&&w({deltaYaw:m,deltaPitch:f,x:h,y:p,z:g,triggers:y,delta:t})},v[37]=M,v[38]=w,v[39]=x,v[40]=g):g=v[40],(0,tw.useFrame)(g),null}function nz(e){return e.gl}function nU(e){return e.camera}function nG(){return window.addEventListener("keydown",nW,{capture:!0}),window.addEventListener("keyup",nW,{capture:!0}),()=>{window.removeEventListener("keydown",nW,{capture:!0}),window.removeEventListener("keyup",nW,{capture:!0})}}function nW(e){(e.metaKey||e.ctrlKey)&&"k"===e.key||e.metaKey&&e.stopImmediatePropagation()}let nH=(0,a.lazy)(()=>e.A(34019).then(e=>({default:e.TouchHandler})));function nO(e){let t,o,i,l,s,c=(0,n.c)(9),{children:u}=e;c[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],c[0]=t):t=c[0];let d=(0,a.useRef)(t),[m,f]=(0,a.useState)("local");c[1]===Symbol.for("react.memo_cache_sentinel")?(o=e=>{d.current.push(e)},c[1]=o):o=c[1];let h=o;return c[2]!==m?(i={moveQueue:d,onInput:h,mode:m,setMode:f},c[2]=m,c[3]=i):i=c[3],c[4]!==u?(l=(0,r.jsx)(nj.KeyboardControls,{map:nP,children:(0,r.jsx)(nM.JoystickProvider,{children:u})}),c[4]=u,c[5]=l):l=c[5],c[6]!==i||c[7]!==l?(s=(0,r.jsx)(tL.InputContext.Provider,{value:i,children:l}),c[6]=i,c[7]=l,c[8]=s):s=c[8],s}function nV(){let e,t,o,i=(0,n.c)(5),l=(0,eY.useTouchDevice)();return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(nA,{}),i[0]=e):e=i[0],i[1]!==l?(t=l?(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(nH,{})}):null,i[1]=l,i[2]=t):t=i[2],i[3]!==t?(o=(0,r.jsxs)(r.Fragment,{children:[e,t]}),i[3]=t,i[4]=o):o=i[4],o}let nq=(0,a.lazy)(()=>e.A(553).then(e=>({default:e.TouchJoystick}))),n$=(0,a.lazy)(()=>e.A(33487).then(e=>({default:e.KeyboardOverlay})));function nK(){let e,t,o,i=(0,n.c)(7),l=(0,eY.useTouchDevice)();return i[0]!==l?(e=l?(0,r.jsx)(nq,{}):null,i[0]=l,i[1]=e):e=i[1],i[2]!==l?(t=!1===l?(0,r.jsx)(n$,{}):null,i[2]=l,i[3]=t):t=i[3],i[4]!==e||i[5]!==t?(o=(0,r.jsxs)(a.Suspense,{children:[e,t]}),i[4]=e,i[5]=t,i[6]=o):o=i[6],o}var nQ=e.i(89271);function nY(e){let t,a,o,i,l,s=(0,n.c)(11),{isLoading:c,progress:u}=e,d=!c;s[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,r.jsx)("div",{className:nQ.default.Spinner}),s[0]=t):t=s[0];let m=`${100*u}%`;return s[1]!==m?(a=(0,r.jsx)("div",{className:nQ.default.Progress,children:(0,r.jsx)("div",{className:nQ.default.ProgressBar,style:{width:m}})}),s[1]=m,s[2]=a):a=s[2],s[3]!==u?(o=Math.round(100*u),s[3]=u,s[4]=o):o=s[4],s[5]!==o?(i=(0,r.jsxs)("div",{className:nQ.default.ProgressText,children:[o,"%"]}),s[5]=o,s[6]=i):i=s[6],s[7]!==d||s[8]!==a||s[9]!==i?(l=(0,r.jsxs)("div",{className:nQ.default.LoadingIndicator,"data-complete":d,children:[t,a,i]}),s[7]=d,s[8]=a,s[9]=i,s[10]=l):l=s[10],l}function nX(e){let t,o=(0,n.c)(3),{children:i}=e,{debugMode:l}=(0,_.useDebug)();return o[0]!==i||o[1]!==l?(t=l?(0,r.jsx)(a.Suspense,{children:i}):null,o[0]=i,o[1]=l,o[2]=t):t=o[2],t}var nZ=e.i(82156);function nJ(e,t){return(0,a.lazy)(()=>t().then(t=>({default:t[e]})))}let n0=nJ("StreamingController",()=>e.A(25483)),n1=nJ("DemoPlaybackControls",()=>e.A(93884)),n2=nJ("DebugElements",()=>e.A(88487)),n3=nJ("Mission",()=>e.A(21683)),n5=nJ("ChatSoundPlayer",()=>e.A(38496)),n4=nJ("PlayerHUD",()=>e.A(57567)),n6=nJ("MapInfoDialog",()=>e.A(59197)),n8=nJ("ServerBrowser",()=>e.A(70012));function n7(){let[e,t]=(0,n_.useMissionQueryState)(),o=(0,a.useContext)(s),{clearFogEnabledOverride:i,sidebarOpen:l,setSidebarOpen:c}=(0,_.useSettings)(),{missionName:u,missionType:d}=e,[m,f]=(0,a.useState)(!1),[h,p]=(0,a.useState)(!1),[g,S]=(0,a.useState)(!1),[w,C]=(0,a.useState)(0),[j,M]=(0,a.useState)(!0),N=(0,eY.useTouchDevice)(),R=(0,a.useCallback)(e=>{window.location.hash="",i(),S(!1);let r=k.liveConnectionStore.getState();r.disconnectServer(),r.disconnectRelay(),th.engineStore.getState().setRecording(null),eX.gameEntityStore.getState().endStreaming(),t(e),N&&c(!1)},[i,t,N,c]);!function(e){let t,r,o=(0,n.c)(5),{onChangeMission:i}=e,{setRecording:l}=(0,T.usePlaybackActions)(),s=(0,a.useEffectEvent)(i);o[0]!==s||o[1]!==l?(t=()=>(window.setMissionName=e=>{let t=(0,eZ.getMissionInfo)(e).missionTypes;s({missionName:e,missionType:t[0]})},window.getMissionList=eZ.getMissionList,window.getMissionInfo=eZ.getMissionInfo,window.loadDemoRecording=l,nb),o[0]=s,o[1]=l,o[2]=t):t=o[2],o[3]!==l?(r=[l],o[3]=l,o[4]=r):r=o[4],(0,a.useEffect)(t,r)}({onChangeMission:R});let D=(0,T.useRecording)(),L=(0,eX.useDataSource)(),F="demo"===L||"live"===L,I=(0,eX.useMissionName)(),E=(0,eX.useMissionType)();(0,a.useEffect)(()=>{if(F&&I)try{let e=(0,eZ.getMissionInfo)(I),r=E&&e.missionTypes.includes(E)?E:void 0;t({missionName:I,missionType:r})}catch{t(null)}},[F,I,E,t]),(0,a.useEffect)(()=>{D&&S(!1)},[D]);let B=(0,k.useLiveSelector)(e=>e.gameStatus);(0,a.useEffect)(()=>{"connected"===B&&N&&c(!1)},[B,N,c]),(0,a.useEffect)(()=>{D&&N&&c(!1)},[N,D,c]);let P=w<1;(0,a.useEffect)(()=>{if(P)M(!0);else{let e=setTimeout(()=>M(!1),500);return()=>clearTimeout(e)}},[P]);let A=(0,a.useCallback)((e,t=0)=>{C(t)},[]),z=(0,a.useRef)(null),U=(0,a.useRef)(null);return(0,r.jsx)("main",{className:nZ.default.Frame,children:(0,r.jsxs)(T.RecordingProvider,{children:[(0,r.jsxs)("header",{className:nZ.default.Toolbar,onKeyDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),children:[(0,r.jsx)("button",{type:"button",className:nZ.default.ToggleSidebarButton,"data-orientation":"top","aria-label":l?"Close sidebar":"Open sidebar",title:l?"Close sidebar":"Open sidebar",onClick:e=>{(0,a.startTransition)(()=>c(e=>!e))},children:l?(0,r.jsx)(y,{}):(0,r.jsx)(b,{})}),(0,r.jsx)("button",{type:"button",className:nZ.default.ToggleSidebarButton,"data-orientation":"left","aria-label":l?"Close sidebar":"Open sidebar",title:l?"Close sidebar":"Open sidebar",onClick:e=>{(0,a.startTransition)(()=>c(e=>!e))},children:l?(0,r.jsx)(v,{}):(0,r.jsx)(x,{})}),(0,r.jsx)(a.Activity,{mode:F&&!g?"visible":"hidden",children:(0,r.jsx)(tv,{})}),(0,r.jsxs)(a.Activity,{mode:!F||g?"visible":"hidden",children:[(0,r.jsx)(tf,{value:g?"":u,missionType:g?"":d,onChange:R,autoFocus:g}),g&&(0,r.jsx)("button",{type:"button",className:nZ.default.CancelButton,onClick:()=>{S(!1)},children:"Cancel"})]})]}),l?(0,r.jsx)("div",{className:nZ.default.Backdrop}):null,(0,r.jsx)(a.Activity,{mode:l?"visible":"hidden",children:(0,r.jsx)(a.ViewTransition,{children:(0,r.jsx)("div",{className:nZ.default.Sidebar,onKeyDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),"data-open":l,children:(0,r.jsx)(e0,{missionName:u,missionType:d,onOpenMapInfo:()=>f(!0),onOpenServerBrowser:o.live?()=>p(!0):void 0,onChooseMap:F?()=>{S(!0)}:void 0,onCancelChoosingMap:()=>{S(!1)},choosingMap:g,cameraRef:z,invalidateRef:U})})})}),(0,r.jsx)(nO,{children:(0,r.jsxs)("div",{className:nZ.default.Content,children:[(0,r.jsx)("div",{className:nZ.default.ThreeView,children:(0,r.jsx)(nC,{dpr:m||h?.25:void 0,onCreated:e=>{z.current=e.camera,U.current=e.invalidate},children:(0,r.jsx)(tF.TickProvider,{children:(0,r.jsxs)(tR,{children:[(0,r.jsx)(nV,{}),(0,r.jsxs)(tk.AudioProvider,{children:[(0,r.jsx)(nx,{}),(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(nc,{})}),(0,r.jsx)(tM,{}),(0,r.jsx)(rV,{children:(0,r.jsx)(n5,{})}),(0,r.jsx)(nX,{children:(0,r.jsx)(n2,{})}),D?(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(n0,{recording:D})}):null,F?null:(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(n3,{name:u,missionType:d,onLoadingChange:A},`${u}~${d}`)}),(0,r.jsx)(tV,{})]})]})})})}),F?(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(n4,{})}):null,(0,r.jsx)(nK,{}),j&&(0,r.jsx)(nY,{isLoading:P,progress:w})]})}),(0,r.jsx)("footer",{className:nZ.default.PlayerBar,onKeyDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),children:D?.source==="demo"?(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(n1,{})}):null}),m?(0,r.jsx)(a.ViewTransition,{children:(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(n6,{onClose:()=>f(!1),missionName:u,missionType:d??""})})}):null,h?(0,r.jsx)(a.ViewTransition,{children:(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(n8,{onClose:()=>p(!1)})})}):null]})})}let n9=new o.QueryClient;function ae(){let e,t=(0,n.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(c,{children:(0,r.jsx)(i.QueryClientProvider,{client:n9,children:(0,r.jsx)(_.SettingsProvider,{children:(0,r.jsx)(n7,{})})})})}),t[0]=e):e=t[0],e}e.s(["default",()=>ae],31713)}]);
\ No newline at end of file
+ `,depthWrite:!1,depthTest:!1})]})}function rW(e,t){let{fogDistance:r,visibleDistance:n}=e;return[r,n]}function rH({fogState:e,enabled:t}){let r=(0,tS.useThree)(e=>e.scene),n=(0,tS.useThree)(e=>e.camera),o=(0,a.useRef)(null),i=(0,a.useMemo)(()=>(0,t9.packFogVolumeData)(e.fogVolumes),[e.fogVolumes]);return(0,a.useEffect)(()=>{rP||((0,t7.installCustomFogShader)(),rP=!0)},[]),(0,a.useEffect)(()=>{(0,t9.resetGlobalFogUniforms)();let[t,a]=rW(e,n.position.y),l=new tC.Fog(e.fogColor,t,a);return r.fog=l,o.current=l,(0,t9.updateGlobalFogUniforms)(n.position.y,i),()=>{r.fog=null,o.current=null,(0,t9.resetGlobalFogUniforms)()}},[r,n,e,i]),(0,a.useEffect)(()=>{let r=o.current;if(r)if(t){let[t,a]=rW(e,n.position.y);r.near=t,r.far=a}else r.near=1e10,r.far=1e10},[t,e,n.position.y]),(0,tw.useFrame)(()=>{let r=o.current;if(!r)return;let a=n.position.y;if((0,t9.updateGlobalFogUniforms)(a,i,t),t){let[t,n]=rW(e,a);r.near=t,r.far=n,r.color.copy(e.fogColor)}}),null}let rO=(0,a.memo)(function({entity:e}){let{skyData:t}=e;rB.debug("Rendering: materialList=%s, useSkyTextures=%s",t.materialList,t.useSkyTextures);let{fogEnabled:n}=(0,_.useSettings)(),o=t.materialList||void 0,i=(0,a.useMemo)(()=>rA(t.skySolidColor),[t.skySolidColor]),l=t.useSkyTextures,s=(0,a.useMemo)(()=>(function(e){let t=e.fogDistance,r=e.visibleDistance>0?e.visibleDistance:1e3,{r:n,g:a,b:o}=e.fogColor,i=new tC.Color().setRGB(n,a,o).convertSRGBToLinear(),l=[];for(let t of e.fogVolumes)t.visibleDistance<=0||t.maxHeight<=t.minHeight||l.push({visibleDistance:t.visibleDistance,minHeight:t.minHeight,maxHeight:t.maxHeight,percentage:1});let s=l.reduce((e,t)=>Math.max(e,t.maxHeight),0);return{fogDistance:t,visibleDistance:r,fogColor:i,fogVolumes:l,fogLine:s,enabled:r>t}})(t),[t]);rB.debug("fogState: fogColor=(%s, %s, %s) visibleDistance=%d fogDistance=%d enabled=%s volumes=%d",t.fogColor.r.toFixed(3),t.fogColor.g.toFixed(3),t.fogColor.b.toFixed(3),t.visibleDistance,t.fogDistance,s.enabled,s.fogVolumes.length);let c=(0,a.useMemo)(()=>rA(t.fogColor),[t.fogColor]),u=i||c,d=s.enabled&&n,m=s.fogColor,f=(0,tS.useThree)(e=>e.scene),h=(0,tS.useThree)(e=>e.gl);(0,a.useEffect)(()=>{if(d){let e=m.clone();f.background=e,h.setClearColor(e)}else if(u){let e=u[0].clone();f.background=e,h.setClearColor(e)}else f.background=null;return()=>{f.background=null}},[f,h,d,m,u]);let p=i?.[1];return(0,r.jsxs)(r.Fragment,{children:[o&&l&&o.length>0?(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(rU,{materialList:o,fogColor:d?m:void 0,fogState:d?s:void 0},o)}):p?(0,r.jsx)(rG,{skyColor:p,fogColor:d?m:void 0,fogState:d?s:void 0}):null,(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(rF,{scene:t})}),s.enabled?(0,r.jsx)(rH,{fogState:s,enabled:n}):null]})});function rV(e){let t,o=(0,n.c)(3),{children:i}=e,{audioEnabled:l}=(0,_.useSettings)();return o[0]!==l||o[1]!==i?(t=l?(0,r.jsx)(a.Suspense,{children:i}):null,o[0]=l,o[1]=i,o[2]=t):t=o[2],t}function rq(e,t){let o=(0,a.lazy)(()=>t().then(t=>({default:t[e]}))),i=t=>{let a,i,l=(0,n.c)(5),{entity:s}=t,c=`${e}:${s.id}`;return l[0]!==s?(a=(0,r.jsx)(o,{entity:s}),l[0]=s,l[1]=a):a=l[1],l[2]!==c||l[3]!==a?(i=(0,r.jsx)(tQ.DebugSuspense,{name:c,children:a}),l[2]=c,l[3]=a,l[4]=i):i=l[4],i};return i.displayName=`createLazy(${e})`,i}let r$=rq("PlayerModel",()=>e.A(30814)),rK=rq("ExplosionShape",()=>e.A(44325)),rQ=rq("TracerProjectile",()=>e.A(62125)),rY=rq("SpriteProjectile",()=>e.A(62125)),rX=rq("ForceFieldBare",()=>e.A(25147)),rZ=rq("AudioEmitter",()=>e.A(61921)),rJ=rq("WaterBlock",()=>e.A(18599)),r0=rq("WeaponModel",()=>e.A(44325)),r1={1:"Storm",2:"Inferno"},r2=(0,a.memo)(function(e){let t=(0,n.c)(26),{entity:a}=e;switch(a.renderType){case"Shape":{let e;return t[0]!==a?(e=(0,r.jsx)(r3,{entity:a}),t[0]=a,t[1]=e):e=t[1],e}case"ForceFieldBare":{let e;return t[2]!==a?(e=(0,r.jsx)(rX,{entity:a}),t[2]=a,t[3]=e):e=t[3],e}case"Player":{let e;return t[4]!==a?(e=(0,r.jsx)(r$,{entity:a}),t[4]=a,t[5]=e):e=t[5],e}case"Explosion":{let e;return t[6]!==a?(e=(0,r.jsx)(rK,{entity:a}),t[6]=a,t[7]=e):e=t[7],e}case"Tracer":{let e;return t[8]!==a?(e=(0,r.jsx)(rQ,{entity:a}),t[8]=a,t[9]=e):e=t[9],e}case"Sprite":{let e;return t[10]!==a?(e=(0,r.jsx)(rY,{entity:a}),t[10]=a,t[11]=e):e=t[11],e}case"AudioEmitter":{let e;return t[12]!==a?(e=(0,r.jsx)(rV,{children:(0,r.jsx)(rZ,{entity:a})}),t[12]=a,t[13]=e):e=t[13],e}case"Camera":{let e;return t[14]!==a?(e=(0,r.jsx)(tZ,{entity:a}),t[14]=a,t[15]=e):e=t[15],e}case"WayPoint":{let e;return t[16]!==a?(e=(0,r.jsx)(tJ,{entity:a}),t[16]=a,t[17]=e):e=t[17],e}case"TerrainBlock":{let e;return t[18]!==a.terrainData?(e=(0,r.jsx)(rl,{scene:a.terrainData}),t[18]=a.terrainData,t[19]=e):e=t[19],e}case"InteriorInstance":{let e;return t[20]!==a.interiorData?(e=(0,r.jsx)(rw,{scene:a.interiorData}),t[20]=a.interiorData,t[21]=e):e=t[21],e}case"Sky":{let e;return t[22]!==a?(e=(0,r.jsx)(rO,{entity:a}),t[22]=a,t[23]=e):e=t[23],e}case"Sun":case"MissionArea":case"None":default:return null;case"WaterBlock":{let e;return t[24]!==a?(e=(0,r.jsx)(rJ,{entity:a}),t[24]=a,t[25]=e):e=t[25],e}}});function r3(e){let t,o,i,l,s,c,u,d=(0,n.c)(24),{entity:m}=e,{animationEnabled:f}=(0,_.useSettings)(),h=(0,a.useRef)(null);if(d[0]!==f||d[1]!==m.rotate?(t=()=>{if(!h.current||!m.rotate||!f)return;let e=performance.now()/1e3;h.current.rotation.y=e/3*Math.PI*2},d[0]=f,d[1]=m.rotate,d[2]=t):t=d[2],(0,tw.useFrame)(t),!m.shapeName)throw Error(`Shape entity missing shapeName: ${m.id}`);let p=m.runtimeObject,g=m.shapeType??"StaticShape",v=m.dataBlock?.toLowerCase()==="flag",x=m.teamId&&m.teamId>0?r1[m.teamId]:null,y=v&&x?`${x} Flag`:null,b="Item"===m.shapeType?"pink":m.threads?"#00ff88":"yellow",S=m.rotate?h:void 0,w=p?void 0:m;return d[3]!==y?(o=y?(0,r.jsx)(tX.FloatingLabel,{opacity:.6,children:y}):null,d[3]=y,d[4]=o):o=d[4],d[5]!==b||d[6]!==w||d[7]!==o?(i=(0,r.jsx)(t$.ShapeRenderer,{loadingColor:b,streamEntity:w,children:o}),d[5]=b,d[6]=w,d[7]=o,d[8]=i):i=d[8],d[9]!==m.barrelShapeName||d[10]!==p?(l=m.barrelShapeName&&(0,r.jsx)(tK.ShapeInfoProvider,{object:p,shapeName:m.barrelShapeName,type:"Turret",children:(0,r.jsx)("group",{position:[0,1.5,0],children:(0,r.jsx)(t$.ShapeRenderer,{})})}),d[9]=m.barrelShapeName,d[10]=p,d[11]=l):l=d[11],d[12]!==m?(s=m.weaponShape&&(0,r.jsx)(tY.ShapeErrorBoundary,{fallback:(0,r.jsx)(t$.ShapePlaceholder,{color:"red",label:m.weaponShape}),children:(0,r.jsx)(tQ.DebugSuspense,{name:`Weapon:${m.id}/${m.weaponShape}`,fallback:(0,r.jsx)(t$.ShapePlaceholder,{color:"cyan",label:m.weaponShape}),children:(0,r.jsx)(r0,{entity:m})})}),d[12]=m,d[13]=s):s=d[13],d[14]!==S||d[15]!==i||d[16]!==l||d[17]!==s?(c=(0,r.jsxs)("group",{ref:S,children:[i,l,s]}),d[14]=S,d[15]=i,d[16]=l,d[17]=s,d[18]=c):c=d[18],d[19]!==m.shapeName||d[20]!==g||d[21]!==c||d[22]!==p?(u=(0,r.jsx)(tK.ShapeInfoProvider,{object:p,shapeName:m.shapeName,type:g,children:c}),d[19]=m.shapeName,d[20]=g,d[21]=c,d[22]=p,d[23]=u):u=d[23],u}var r5=e.i(60099),r4=e.i(85557),r6=e.i(29418);let r8=(0,t2.textureToUrl)("gui/hud_alliedtriangle"),r7=(0,t2.textureToUrl)("gui/hud_enemytriangle"),r9=new tC.Vector3,ne=[];function nt(e){let t,o,i,l,s,c=(0,n.c)(21),{entity:u}=e,d=(0,t$.useStaticShape)(u.shapeName??u.dataBlock),m=(0,tS.useThree)(nn),f=(0,a.useRef)(null),h=(0,a.useRef)(null),p=(0,a.useRef)(null),g=(0,a.useRef)(null),v=(0,a.useRef)(null),[x,y]=(0,a.useState)(!0),b=(0,a.useRef)(null);c[0]!==d.scene?(t=new tC.Box3().setFromObject(d.scene),c[0]=d.scene,c[1]=t):t=c[1];let _=t.max.y+.1,S=u.keyframes??ne;c[2]!==S?(o=S.some(nr),c[2]=S,c[3]=o):o=c[3];let w=o;c[4]!==m||c[5]!==u.id||c[6]!==u.iffColor||c[7]!==u.playerName||c[8]!==w||c[9]!==x||c[10]!==S?(i=()=>{let e=f.current;if(!e)return;e.getWorldPosition(r9);let t=m.position.distanceTo(r9),r=m.matrixWorld.elements,n=!(-((r9.x-r[12])*r[8])+-((r9.y-r[13])*r[9])+-((r9.z-r[14])*r[10])<0)&&t<150;if(x!==n&&y(n),!n)return;let a=(0,r4.getKeyframeAtTime)(S,tD.streamPlaybackStore.getState().time),o=a?.health??1;if(a?.damageState!=null&&a.damageState>=1){h.current&&(h.current.style.opacity="0"),p.current&&(p.current.style.opacity="0");return}let i=Math.max(0,Math.min(1,1-t/150)).toString();if(h.current&&(h.current.style.opacity=i),p.current&&(p.current.style.opacity=i),b.current){let e=u.playerName??u.id;b.current.textContent!==e&&(b.current.textContent=e)}if(v.current&&u.iffColor){let e=u.iffColor.r>u.iffColor.g?r7:r8;v.current.getAttribute("src")!==e&&(v.current.src=e)}g.current&&w&&(g.current.style.width=`${Math.max(0,Math.min(100,100*o))}%`,g.current.style.background=u.iffColor?`rgb(${u.iffColor.r}, ${u.iffColor.g}, ${u.iffColor.b})`:"")},c[4]=m,c[5]=u.id,c[6]=u.iffColor,c[7]=u.playerName,c[8]=w,c[9]=x,c[10]=S,c[11]=i):i=c[11],(0,tw.useFrame)(i);let C=u.iffColor&&u.iffColor.r>u.iffColor.g?r7:r8;return c[12]!==u.id||c[13]!==u.playerName||c[14]!==w||c[15]!==_||c[16]!==C||c[17]!==x?(l=x&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(r5.Html,{position:[0,_,0],center:!0,children:(0,r.jsx)("div",{ref:h,className:r6.default.Top,children:(0,r.jsx)("img",{ref:v,className:r6.default.IffArrow,src:C,alt:""})})}),(0,r.jsx)(r5.Html,{position:[0,-.2,0],center:!0,children:(0,r.jsxs)("div",{ref:p,className:r6.default.Bottom,children:[(0,r.jsx)("div",{ref:b,className:r6.default.Name,children:u.playerName??u.id}),w&&(0,r.jsx)("div",{className:r6.default.HealthBar,children:(0,r.jsx)("div",{ref:g,className:r6.default.HealthFill})})]})})]}),c[12]=u.id,c[13]=u.playerName,c[14]=w,c[15]=_,c[16]=C,c[17]=x,c[18]=l):l=c[18],c[19]!==l?(s=(0,r.jsx)("group",{ref:f,children:l}),c[19]=l,c[20]=s):s=c[20],s}function nr(e){return null!=e.health}function nn(e){return e.camera}var na=e.i(78779);let no=(0,t2.textureToUrl)("commander/MiniIcons/com_flag_grey"),ni=new tC.Vector3;function nl(e){let t,o,i,l,s,c=(0,n.c)(9),{entity:u}=e,d=(0,a.useRef)(null),m=(0,a.useRef)(null),f=(0,a.useRef)(null),h=(0,tS.useThree)(ns);c[0]!==h||c[1]!==u.iffColor?(t=()=>{if(m.current&&u.iffColor){let{r:e,g:t,b:r}=u.iffColor;m.current.style.backgroundColor=`rgb(${e},${t},${r})`}if(f.current&&d.current){d.current.getWorldPosition(ni);let e=h.position.distanceTo(ni);f.current.textContent=e.toFixed(1)}},c[0]=h,c[1]=u.iffColor,c[2]=t):t=c[2],(0,tw.useFrame)(t);let p=u.iffColor?`rgb(${u.iffColor.r},${u.iffColor.g},${u.iffColor.b})`:"rgb(200,200,200)";c[3]===Symbol.for("react.memo_cache_sentinel")?(o=[0,1.5,0],c[3]=o):o=c[3],c[4]===Symbol.for("react.memo_cache_sentinel")?(i=(0,r.jsx)("span",{ref:f,className:na.default.Distance}),c[4]=i):i=c[4],c[5]!==p?(l={backgroundColor:p,"--flag-icon-url":`url(${no})`},c[5]=p,c[6]=l):l=c[6];let g=l;return c[7]!==g?(s=(0,r.jsx)("group",{ref:d,children:(0,r.jsx)(r5.Html,{position:o,center:!0,children:(0,r.jsxs)("div",{className:na.default.Root,children:[i,(0,r.jsx)("div",{ref:m,className:na.default.Icon,style:g})]})})}),c[7]=g,c[8]=s):s=c[8],s}function ns(e){return e.camera}function nc(){let e,t=(0,n.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)("group",{ref:nu,children:(0,r.jsx)(nd,{})}),t[0]=e):e=t[0],e}function nu(e){tD.streamPlaybackStore.setState({root:e})}let nd=(0,a.memo)(function(){let e=(0,eX.useAllGameEntities)(),t=(0,a.useRef)(new Map).current,n=new Set;for(let r of e)n.add(r.id),t.set(r.id,r);for(let e of t.keys())n.has(e)||t.delete(e);return(0,r.jsx)(r.Fragment,{children:[...t.values()].map(e=>(0,r.jsx)(nm,{entity:e},e.id))})}),nm=(0,a.memo)(function(e){let t,a=(0,n.c)(7),{entity:o}=e;if((0,tq.isSceneEntity)(o)){let e,t;return a[0]!==o?(e=(0,r.jsx)(r2,{entity:o}),a[0]=o,a[1]=e):e=a[1],a[2]!==o.id||a[3]!==e?(t=(0,r.jsx)("group",{name:o.id,children:e}),a[2]=o.id,a[3]=e,a[4]=t):t=a[4],t}return"None"===o.renderType?null:(a[5]!==o?(t=(0,r.jsx)(ng,{entity:o}),a[5]=o,a[6]=t):t=a[6],t)});function nf(e){let t,a=(0,n.c)(2),{entity:o}=e,i=(0,th.useEngineSelector)(nh);return o.id===i?null:(a[0]!==o?(t=(0,r.jsx)(nt,{entity:o}),a[0]=o,a[1]=t):t=a[1],t)}function nh(e){return e.playback.streamSnapshot?.controlPlayerGhostId}function np({entity:e}){let t=(0,a.useRef)(!1),[n,o]=(0,a.useState)(()=>((("targetRenderFlags"in e?e.targetRenderFlags:void 0)??0)&2)!=0);return(t.current=n,(0,tw.useFrame)(()=>{let r=((("targetRenderFlags"in e?e.targetRenderFlags:void 0)??0)&2)!=0;r!==t.current&&(t.current=r,o(r))}),n)?(0,r.jsx)(nl,{entity:e}):null}function ng(e){let t,a,o,i,l,s,c,u,d=(0,n.c)(39),{entity:m}=e,f=m.position,h=m.scale;e:{let e;if(!m.rotation){t=void 0;break e}d[0]!==m.rotation?(e=new tC.Quaternion(...m.rotation),d[0]=m.rotation,d[1]=e):e=d[1],t=e}let p=t,g="Player"===m.renderType;if("Shape"===m.renderType&&!m.shapeName){let e,t,n,a,o,i=m.id;return d[2]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)("sphereGeometry",{args:[.3,6,4]}),d[2]=e):e=d[2],d[3]!==m.className?(t=(0,r4.entityTypeColor)(m.className),d[3]=m.className,d[4]=t):t=d[4],d[5]!==t?(n=(0,r.jsxs)("mesh",{children:[e,(0,r.jsx)("meshBasicMaterial",{color:t,wireframe:!0})]}),d[5]=t,d[6]=n):n=d[6],d[7]!==m?(a=(0,r.jsx)(np,{entity:m}),d[7]=m,d[8]=a):a=d[8],d[9]!==m.id||d[10]!==f||d[11]!==p||d[12]!==h||d[13]!==n||d[14]!==a?(o=(0,r.jsxs)("group",{name:i,position:f,quaternion:p,scale:h,children:[n,a]}),d[9]=m.id,d[10]=f,d[11]=p,d[12]=h,d[13]=n,d[14]=a,d[15]=o):o=d[15],o}d[16]!==m.className||d[17]!==m.renderType?(a="Explosion"===m.renderType?null:(0,r.jsxs)("mesh",{children:[(0,r.jsx)("sphereGeometry",{args:[.5,8,6]}),(0,r.jsx)("meshBasicMaterial",{color:(0,r4.entityTypeColor)(m.className),wireframe:!0})]}),d[16]=m.className,d[17]=m.renderType,d[18]=a):a=d[18];let v=a;return d[19]!==m?(o=(0,r.jsx)(r2,{entity:m}),d[19]=m,d[20]=o):o=d[20],d[21]!==v||d[22]!==o?(i=(0,r.jsx)(tY.ShapeErrorBoundary,{fallback:v,children:o}),d[21]=v,d[22]=o,d[23]=i):i=d[23],d[24]!==m||d[25]!==g?(l=g&&(0,r.jsx)(nf,{entity:m}),d[24]=m,d[25]=g,d[26]=l):l=d[26],d[27]!==m?(s=(0,r.jsx)(np,{entity:m}),d[27]=m,d[28]=s):s=d[28],d[29]!==i||d[30]!==l||d[31]!==s?(c=(0,r.jsxs)("group",{name:"model",children:[i,l,s]}),d[29]=i,d[30]=l,d[31]=s,d[32]=c):c=d[32],d[33]!==m.id||d[34]!==f||d[35]!==p||d[36]!==h||d[37]!==c?(u=(0,r.jsx)("group",{name:m.id,position:f,quaternion:p,scale:h,children:c}),d[33]=m.id,d[34]=f,d[35]=p,d[36]=h,d[37]=c,d[38]=u):u=d[38],u}let nv=(0,M.createLogger)("SceneLighting");function nx(){let e,t,o,i=(0,n.c)(6),l=(0,eX.useSceneSun)();if(i[0]!==l?(e=()=>{l?nv.debug("sunData: dir=(%s, %s, %s) color=(%s, %s, %s) ambient=(%s, %s, %s)",l.direction.x.toFixed(3),l.direction.y.toFixed(3),l.direction.z.toFixed(3),l.color.r.toFixed(3),l.color.g.toFixed(3),l.color.b.toFixed(3),l.ambient.r.toFixed(3),l.ambient.g.toFixed(3),l.ambient.b.toFixed(3)):nv.debug("No sunData — using fallback ambient #888")},t=[l],i[0]=l,i[1]=e,i[2]=t):(e=i[1],t=i[2]),(0,a.useEffect)(e,t),!l){let e;return i[3]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)("ambientLight",{color:"#888888",intensity:1}),i[3]=e):e=i[3],e}return i[4]!==l?(o=(0,r.jsx)(ny,{sunData:l}),i[4]=l,i[5]=o):o=i[5],o}function ny(e){let t,o,i,l,s,c,u,d,m,f,h=(0,n.c)(29),{sunData:p}=e;h[0]!==p.direction?(t=(0,t1.torqueToThree)(p.direction),h[0]=p.direction,h[1]=t):t=h[1];let[g,v,x]=t,y=Math.sqrt(g*g+v*v+x*x),b=g/y,_=v/y,S=x/y;h[2]!==b||h[3]!==_||h[4]!==S?(o=new tC.Vector3(b,_,S),h[2]=b,h[3]=_,h[4]=S,h[5]=o):o=h[5];let w=o,C=-(5e3*w.x),j=-(5e3*w.y),M=-(5e3*w.z);h[6]!==C||h[7]!==j||h[8]!==M?(i=new tC.Vector3(C,j,M),h[6]=C,h[7]=j,h[8]=M,h[9]=i):i=h[9];let k=i;h[10]!==p.color.b||h[11]!==p.color.g||h[12]!==p.color.r?(l=new tC.Color(p.color.r,p.color.g,p.color.b),h[10]=p.color.b,h[11]=p.color.g,h[12]=p.color.r,h[13]=l):l=h[13];let T=l;h[14]!==p.ambient.b||h[15]!==p.ambient.g||h[16]!==p.ambient.r?(s=new tC.Color(p.ambient.r,p.ambient.g,p.ambient.b),h[14]=p.ambient.b,h[15]=p.ambient.g,h[16]=p.ambient.r,h[17]=s):s=h[17];let N=s,R=w.y<0;return h[18]!==R?(c=()=>{t4.value=R},u=[R],h[18]=R,h[19]=c,h[20]=u):(c=h[19],u=h[20]),(0,a.useEffect)(c,u),h[21]!==T||h[22]!==k?(d=(0,r.jsx)("directionalLight",{position:k,color:T,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}),h[21]=T,h[22]=k,h[23]=d):d=h[23],h[24]!==N?(m=(0,r.jsx)("ambientLight",{color:N,intensity:1}),h[24]=N,h[25]=m):m=h[25],h[26]!==d||h[27]!==m?(f=(0,r.jsxs)(r.Fragment,{children:[d,m]}),h[26]=d,h[27]=m,h[28]=f):f=h[28],f}function nb(){delete window.setMissionName,delete window.getMissionList,delete window.getMissionInfo,delete window.loadDemoRecording}var n_=e.i(74657),nS=e.i(75056);let nw={toneMapping:tC.NoToneMapping,outputColorSpace:tC.SRGBColorSpace};function nC(e){let t,a,o=(0,n.c)(6),{children:i,renderOnDemand:l,dpr:s,onCreated:c}=e,{renderOnDemand:u}=(0,_.useDebug)(),d=void 0!==l&&l||u?"demand":"always";return o[0]===Symbol.for("react.memo_cache_sentinel")?(t={type:tC.PCFShadowMap},o[0]=t):t=o[0],o[1]!==i||o[2]!==s||o[3]!==c||o[4]!==d?(a=(0,r.jsx)(nS.Canvas,{frameloop:d,dpr:s,gl:nw,shadows:t,onCreated:c,children:i}),o[1]=i,o[2]=s,o[3]=c,o[4]=d,o[5]=a):a=o[5],a}var nj=e.i(12631),nM=e.i(66093),nk=e.i(85413),nT=Object.defineProperty,nN=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?nT(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,r};let nR=new tC.Euler(0,0,0,"YXZ"),nD=new tC.Vector3,nL={type:"change"},nF={type:"lock"},nI={type:"unlock"},nE=Math.PI/2;class nB extends nk.EventDispatcher{constructor(e,t){super(),nN(this,"camera"),nN(this,"domElement"),nN(this,"isLocked"),nN(this,"minPolarAngle"),nN(this,"maxPolarAngle"),nN(this,"pointerSpeed"),nN(this,"onMouseMove",e=>{this.domElement&&!1!==this.isLocked&&(nR.setFromQuaternion(this.camera.quaternion),nR.y-=.002*e.movementX*this.pointerSpeed,nR.x-=.002*e.movementY*this.pointerSpeed,nR.x=Math.max(nE-this.maxPolarAngle,Math.min(nE-this.minPolarAngle,nR.x)),this.camera.quaternion.setFromEuler(nR),this.dispatchEvent(nL))}),nN(this,"onPointerlockChange",()=>{this.domElement&&(this.domElement.ownerDocument.pointerLockElement===this.domElement?(this.dispatchEvent(nF),this.isLocked=!0):(this.dispatchEvent(nI),this.isLocked=!1))}),nN(this,"onPointerlockError",()=>{console.error("THREE.PointerLockControls: Unable to use Pointer Lock API")}),nN(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))}),nN(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))}),nN(this,"dispose",()=>{this.disconnect()}),nN(this,"getObject",()=>this.camera),nN(this,"direction",new tC.Vector3(0,0,-1)),nN(this,"getDirection",e=>e.copy(this.direction).applyQuaternion(this.camera.quaternion)),nN(this,"moveForward",e=>{nD.setFromMatrixColumn(this.camera.matrix,0),nD.crossVectors(this.camera.up,nD),this.camera.position.addScaledVector(nD,e)}),nN(this,"moveRight",e=>{nD.setFromMatrixColumn(this.camera.matrix,0),this.camera.position.addScaledVector(nD,e)}),nN(this,"lock",()=>{this.domElement&&this.domElement.requestPointerLock()}),nN(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)}}(t={}).forward="forward",t.backward="backward",t.left="left",t.right="right",t.up="up",t.down="down",t.lookUp="lookUp",t.lookDown="lookDown",t.lookLeft="lookLeft",t.lookRight="lookRight",t.camera1="camera1",t.camera2="camera2",t.camera3="camera3",t.camera4="camera4",t.camera5="camera5",t.camera6="camera6",t.camera7="camera7",t.camera8="camera8",t.camera9="camera9";let nP=[{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 nA(){let e,t,r,o,i,l,s,c,u,d,m,f,h,p,g,v,x=(0,n.c)(44);x[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],x[0]=e):e=x[0],(0,a.useEffect)(nG,e);let{speedMultiplier:y,setSpeedMultiplier:b,mouseSensitivity:S,invertScroll:w,invertDrag:C}=(0,_.useControls)(),{onInput:j,mode:M}=(0,tL.useInputContext)(),[k,T]=(0,nj.useKeyboardControls)(),N=(0,tS.useThree)(nU),R=(0,tS.useThree)(nz),{nextCamera:D,setCameraIndex:L,cameraCount:F}=tN(),I=(0,a.useRef)(null);x[1]!==w?(t=()=>w,x[1]=w,x[2]=t):t=x[2];let E=(0,a.useEffectEvent)(t);x[3]!==C?(r=()=>C,x[3]=C,x[4]=r):r=x[4];let B=(0,a.useEffectEvent)(r);x[5]!==M?(o=()=>M,x[5]=M,x[6]=o):o=x[6];let P=(0,a.useEffectEvent)(o);x[7]!==S?(i=()=>S,x[7]=S,x[8]=i):i=x[8];let A=(0,a.useEffectEvent)(i),z=(0,a.useRef)(0),U=(0,a.useRef)(0),G=(0,a.useRef)(!1),W=(0,a.useRef)(!1);return x[9]!==N||x[10]!==R.domElement?(l=()=>{let e=new nB(N,R.domElement);return I.current=e,()=>{e.dispose()}},s=[N,R.domElement],x[9]=N,x[10]=R.domElement,x[11]=l,x[12]=s):(l=x[11],s=x[12]),(0,a.useEffect)(l,s),x[13]!==B||x[14]!==P||x[15]!==A||x[16]!==R.domElement||x[17]!==M||x[18]!==D?(c=()=>{let e=R.domElement,t=!1,r=!1,n=0,a=0,o=o=>{I.current?.isLocked||o.target===e&&(t=!0,r=!1,n=o.clientX,a=o.clientY)},i=e=>{if(I.current?.isLocked){let t=A();z.current=z.current+e.movementX*t,U.current=U.current+e.movementY*t;return}if(!t||!r&&3>Math.abs(e.clientX-n)&&3>Math.abs(e.clientY-a))return;r=!0;let o="follow"===P()?-1:1,i=(B()?1:-1)*o;z.current=z.current+i*e.movementX*.002,U.current=U.current+i*e.movementY*.002},l=()=>{t=!1},s=t=>{let n=I.current;n?.isLocked?"follow"===M?G.current=!0:"local"===M&&D():t.target!==e||r||n?.lock()};return e.addEventListener("mousedown",o),document.addEventListener("mousemove",i),document.addEventListener("mouseup",l),document.addEventListener("click",s),()=>{e.removeEventListener("mousedown",o),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",l),document.removeEventListener("click",s)}},x[13]=B,x[14]=P,x[15]=A,x[16]=R.domElement,x[17]=M,x[18]=D,x[19]=c):c=x[19],x[20]!==N||x[21]!==R.domElement||x[22]!==M||x[23]!==D?(u=[N,R.domElement,D,M],x[20]=N,x[21]=R.domElement,x[22]=M,x[23]=D,x[24]=u):u=x[24],(0,a.useEffect)(c,u),x[25]!==F||x[26]!==L||x[27]!==k?(m=()=>{let e=["camera1","camera2","camera3","camera4","camera5","camera6","camera7","camera8","camera9"];return k(t=>{for(let r=0;r{let e=e=>{e.preventDefault();let t=E()?-1:1,r=(e.deltaY>0?-1:1)*t,n=Math.max(2,Math.min(11,Math.ceil(Math.log2(Math.abs(e.deltaY)+1))))*r;b(e=>{let t=Math.round(100*e)+n;return Math.max(_.MIN_SPEED_MULTIPLIER,Math.min(_.MAX_SPEED_MULTIPLIER,t/100))})},t=R.domElement;return t.addEventListener("wheel",e,{passive:!1}),()=>{t.removeEventListener("wheel",e)}},x[30]=E,x[31]=R.domElement,x[32]=b,x[33]=f):f=x[33],x[34]!==R.domElement||x[35]!==b?(h=[R.domElement,b],x[34]=R.domElement,x[35]=b,x[36]=h):h=x[36],(0,a.useEffect)(f,h),x[37]!==M?(p=()=>{if("local"===M)return;let e=e=>{if("KeyO"!==e.code||e.metaKey||e.ctrlKey||e.altKey)return;let t=e.target;"INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(W.current=!0)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},g=[M],x[37]=M,x[38]=p,x[39]=g):(p=x[38],g=x[39]),(0,a.useEffect)(p,g),x[40]!==T||x[41]!==j||x[42]!==y?(v=(e,t)=>{let{forward:r,backward:n,left:a,right:o,up:i,down:l,lookUp:s,lookDown:c,lookLeft:u,lookRight:d}=T(),m=z.current,f=U.current;z.current=0,U.current=0,u&&(m-=t),d&&(m+=+t),s&&(f-=t),c&&(f+=+t);let h=0,p=0,g=0;a&&(h=-1),o&&(h+=1),r&&(p=1),n&&(p-=1),i&&(g=1),l&&(g-=1);let v=(Math.round(15*((y-_.MIN_SPEED_MULTIPLIER)/(1-_.MIN_SPEED_MULTIPLIER)))+1)/16;h=Math.max(-1,Math.min(1,h*v)),p=Math.max(-1,Math.min(1,p*v)),g=Math.max(-1,Math.min(1,g*v));let x=[!1,!1,!1,!1,!1,!1];G.current&&(x[0]=!0,G.current=!1),W.current&&(x[2]=!0,W.current=!1);let b=0!==m||0!==f,S=0!==h||0!==p||0!==g,w=x.some(Boolean);(b||S||w)&&j({deltaYaw:m,deltaPitch:f,x:h,y:p,z:g,triggers:x,delta:t})},x[40]=T,x[41]=j,x[42]=y,x[43]=v):v=x[43],(0,tw.useFrame)(v),null}function nz(e){return e.gl}function nU(e){return e.camera}function nG(){return window.addEventListener("keydown",nW,{capture:!0}),window.addEventListener("keyup",nW,{capture:!0}),()=>{window.removeEventListener("keydown",nW,{capture:!0}),window.removeEventListener("keyup",nW,{capture:!0})}}function nW(e){(e.metaKey||e.ctrlKey)&&"k"===e.key||e.metaKey&&e.stopImmediatePropagation()}let nH=(0,a.lazy)(()=>e.A(34019).then(e=>({default:e.TouchHandler})));function nO(e){let t,o,i,l,s,c=(0,n.c)(9),{children:u}=e;c[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],c[0]=t):t=c[0];let d=(0,a.useRef)(t),[m,f]=(0,a.useState)("local");c[1]===Symbol.for("react.memo_cache_sentinel")?(o=e=>{d.current.push(e)},c[1]=o):o=c[1];let h=o;return c[2]!==m?(i={moveQueue:d,onInput:h,mode:m,setMode:f},c[2]=m,c[3]=i):i=c[3],c[4]!==u?(l=(0,r.jsx)(nj.KeyboardControls,{map:nP,children:(0,r.jsx)(nM.JoystickProvider,{children:u})}),c[4]=u,c[5]=l):l=c[5],c[6]!==i||c[7]!==l?(s=(0,r.jsx)(tL.InputContext.Provider,{value:i,children:l}),c[6]=i,c[7]=l,c[8]=s):s=c[8],s}function nV(){let e,t,o,i=(0,n.c)(5),l=(0,eY.useTouchDevice)();return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(nA,{}),i[0]=e):e=i[0],i[1]!==l?(t=l?(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(nH,{})}):null,i[1]=l,i[2]=t):t=i[2],i[3]!==t?(o=(0,r.jsxs)(r.Fragment,{children:[e,t]}),i[3]=t,i[4]=o):o=i[4],o}let nq=(0,a.lazy)(()=>e.A(553).then(e=>({default:e.TouchJoystick}))),n$=(0,a.lazy)(()=>e.A(33487).then(e=>({default:e.KeyboardOverlay})));function nK(){let e,t,o,i=(0,n.c)(7),l=(0,eY.useTouchDevice)();return i[0]!==l?(e=l?(0,r.jsx)(nq,{}):null,i[0]=l,i[1]=e):e=i[1],i[2]!==l?(t=!1===l?(0,r.jsx)(n$,{}):null,i[2]=l,i[3]=t):t=i[3],i[4]!==e||i[5]!==t?(o=(0,r.jsxs)(a.Suspense,{children:[e,t]}),i[4]=e,i[5]=t,i[6]=o):o=i[6],o}var nQ=e.i(89271);function nY(e){let t,a,o,i,l,s=(0,n.c)(11),{isLoading:c,progress:u}=e,d=!c;s[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,r.jsx)("div",{className:nQ.default.Spinner}),s[0]=t):t=s[0];let m=`${100*u}%`;return s[1]!==m?(a=(0,r.jsx)("div",{className:nQ.default.Progress,children:(0,r.jsx)("div",{className:nQ.default.ProgressBar,style:{width:m}})}),s[1]=m,s[2]=a):a=s[2],s[3]!==u?(o=Math.round(100*u),s[3]=u,s[4]=o):o=s[4],s[5]!==o?(i=(0,r.jsxs)("div",{className:nQ.default.ProgressText,children:[o,"%"]}),s[5]=o,s[6]=i):i=s[6],s[7]!==d||s[8]!==a||s[9]!==i?(l=(0,r.jsxs)("div",{className:nQ.default.LoadingIndicator,"data-complete":d,children:[t,a,i]}),s[7]=d,s[8]=a,s[9]=i,s[10]=l):l=s[10],l}function nX(e){let t,o=(0,n.c)(3),{children:i}=e,{debugMode:l}=(0,_.useDebug)();return o[0]!==i||o[1]!==l?(t=l?(0,r.jsx)(a.Suspense,{children:i}):null,o[0]=i,o[1]=l,o[2]=t):t=o[2],t}var nZ=e.i(82156);function nJ(e,t){return(0,a.lazy)(()=>t().then(t=>({default:t[e]})))}let n0=nJ("StreamingController",()=>e.A(25483)),n1=nJ("DemoPlaybackControls",()=>e.A(93884)),n2=nJ("DebugElements",()=>e.A(88487)),n3=nJ("Mission",()=>e.A(21683)),n5=nJ("ChatSoundPlayer",()=>e.A(38496)),n4=nJ("PlayerHUD",()=>e.A(57567)),n6=nJ("MapInfoDialog",()=>e.A(59197)),n8=nJ("ServerBrowser",()=>e.A(70012));function n7(){let[e,t]=(0,n_.useMissionQueryState)(),o=(0,a.useContext)(s),{clearFogEnabledOverride:i,sidebarOpen:l,setSidebarOpen:c}=(0,_.useSettings)(),{missionName:u,missionType:d}=e,[m,f]=(0,a.useState)(!1),[h,p]=(0,a.useState)(!1),[g,S]=(0,a.useState)(!1),[w,C]=(0,a.useState)(0),[j,M]=(0,a.useState)(!0),N=(0,eY.useTouchDevice)(),R=(0,a.useCallback)(e=>{window.location.hash="",i(),S(!1);let r=k.liveConnectionStore.getState();r.disconnectServer(),r.disconnectRelay(),th.engineStore.getState().setRecording(null),eX.gameEntityStore.getState().endStreaming(),t(e),N&&c(!1)},[i,t,N,c]);!function(e){let t,r,o=(0,n.c)(5),{onChangeMission:i}=e,{setRecording:l}=(0,T.usePlaybackActions)(),s=(0,a.useEffectEvent)(i);o[0]!==s||o[1]!==l?(t=()=>(window.setMissionName=e=>{let t=(0,eZ.getMissionInfo)(e).missionTypes;s({missionName:e,missionType:t[0]})},window.getMissionList=eZ.getMissionList,window.getMissionInfo=eZ.getMissionInfo,window.loadDemoRecording=l,nb),o[0]=s,o[1]=l,o[2]=t):t=o[2],o[3]!==l?(r=[l],o[3]=l,o[4]=r):r=o[4],(0,a.useEffect)(t,r)}({onChangeMission:R});let D=(0,T.useRecording)(),L=(0,eX.useDataSource)(),F="demo"===L||"live"===L,I=(0,eX.useMissionName)(),E=(0,eX.useMissionType)();(0,a.useEffect)(()=>{if(F&&I)try{let e=(0,eZ.getMissionInfo)(I),r=E&&e.missionTypes.includes(E)?E:void 0;t({missionName:I,missionType:r})}catch{t(null)}},[F,I,E,t]),(0,a.useEffect)(()=>{D&&S(!1)},[D]);let B=(0,k.useLiveSelector)(e=>e.gameStatus);(0,a.useEffect)(()=>{"connected"===B&&N&&c(!1)},[B,N,c]),(0,a.useEffect)(()=>{D&&N&&c(!1)},[N,D,c]);let P=w<1;(0,a.useEffect)(()=>{if(P)M(!0);else{let e=setTimeout(()=>M(!1),500);return()=>clearTimeout(e)}},[P]);let A=(0,a.useCallback)((e,t=0)=>{C(t)},[]),z=(0,a.useRef)(null),U=(0,a.useRef)(null);return(0,r.jsx)("main",{className:nZ.default.Frame,children:(0,r.jsxs)(T.RecordingProvider,{children:[(0,r.jsxs)("header",{className:nZ.default.Toolbar,onKeyDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),children:[(0,r.jsx)("button",{type:"button",className:nZ.default.ToggleSidebarButton,"data-orientation":"top","aria-label":l?"Close sidebar":"Open sidebar",title:l?"Close sidebar":"Open sidebar",onClick:e=>{(0,a.startTransition)(()=>c(e=>!e))},children:l?(0,r.jsx)(y,{}):(0,r.jsx)(b,{})}),(0,r.jsx)("button",{type:"button",className:nZ.default.ToggleSidebarButton,"data-orientation":"left","aria-label":l?"Close sidebar":"Open sidebar",title:l?"Close sidebar":"Open sidebar",onClick:e=>{(0,a.startTransition)(()=>c(e=>!e))},children:l?(0,r.jsx)(v,{}):(0,r.jsx)(x,{})}),(0,r.jsx)(a.Activity,{mode:F&&!g?"visible":"hidden",children:(0,r.jsx)(tv,{})}),(0,r.jsxs)(a.Activity,{mode:!F||g?"visible":"hidden",children:[(0,r.jsx)(tf,{value:g?"":u,missionType:g?"":d,onChange:R,autoFocus:g}),g&&(0,r.jsx)("button",{type:"button",className:nZ.default.CancelButton,onClick:()=>{S(!1)},children:"Cancel"})]})]}),l?(0,r.jsx)("div",{className:nZ.default.Backdrop}):null,(0,r.jsx)(a.Activity,{mode:l?"visible":"hidden",children:(0,r.jsx)(a.ViewTransition,{children:(0,r.jsx)("div",{className:nZ.default.Sidebar,onKeyDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),"data-open":l,children:(0,r.jsx)(e0,{missionName:u,missionType:d,onOpenMapInfo:()=>f(!0),onOpenServerBrowser:o.live?()=>p(!0):void 0,onChooseMap:F?()=>{S(!0)}:void 0,onCancelChoosingMap:()=>{S(!1)},choosingMap:g,cameraRef:z,invalidateRef:U})})})}),(0,r.jsx)(nO,{children:(0,r.jsxs)("div",{className:nZ.default.Content,children:[(0,r.jsx)("div",{className:nZ.default.ThreeView,children:(0,r.jsx)(nC,{dpr:m||h?.25:void 0,onCreated:e=>{z.current=e.camera,U.current=e.invalidate},children:(0,r.jsx)(tF.TickProvider,{children:(0,r.jsxs)(tR,{children:[(0,r.jsx)(nV,{}),(0,r.jsxs)(tk.AudioProvider,{children:[(0,r.jsx)(nx,{}),(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(nc,{})}),(0,r.jsx)(tM,{}),(0,r.jsx)(rV,{children:(0,r.jsx)(n5,{})}),(0,r.jsx)(nX,{children:(0,r.jsx)(n2,{})}),D?(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(n0,{recording:D})}):null,F?null:(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(n3,{name:u,missionType:d,onLoadingChange:A},`${u}~${d}`)}),(0,r.jsx)(tV,{})]})]})})})}),F?(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(n4,{})}):null,(0,r.jsx)(nK,{}),j&&(0,r.jsx)(nY,{isLoading:P,progress:w})]})}),(0,r.jsx)("footer",{className:nZ.default.PlayerBar,onKeyDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),children:D?.source==="demo"?(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(n1,{})}):null}),m?(0,r.jsx)(a.ViewTransition,{children:(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(n6,{onClose:()=>f(!1),missionName:u,missionType:d??""})})}):null,h?(0,r.jsx)(a.ViewTransition,{children:(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(n8,{onClose:()=>p(!1)})})}):null]})})}let n9=new o.QueryClient;function ae(){let e,t=(0,n.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(a.Suspense,{children:(0,r.jsx)(c,{children:(0,r.jsx)(i.QueryClientProvider,{client:n9,children:(0,r.jsx)(_.SettingsProvider,{children:(0,r.jsx)(n7,{})})})})}),t[0]=e):e=t[0],e}e.s(["default",()=>ae],31713)}]);
\ No newline at end of file
diff --git a/docs/_next/static/chunks/d22dc3fe32e979ff.js b/docs/_next/static/chunks/779e069cb2cf814f.js
similarity index 99%
rename from docs/_next/static/chunks/d22dc3fe32e979ff.js
rename to docs/_next/static/chunks/779e069cb2cf814f.js
index cbbc8b83..7a0bf07a 100644
--- a/docs/_next/static/chunks/d22dc3fe32e979ff.js
+++ b/docs/_next/static/chunks/779e069cb2cf814f.js
@@ -1 +1 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,66027,e=>{"use strict";var t=e.i(69230),s=e.i(69637);function n(e,n){return(0,s.useBaseQuery)(e,t.QueryObserver,n)}e.s(["useQuery",()=>n])},9672,e=>{"use strict";function t(e,t){return e[t.toLowerCase()]}function s(e,s){let n=t(e,s);if(null==n)return;let i=parseFloat(n);return Number.isFinite(i)?i:void 0}function n(e,s){let n=t(e,s);if(null==n)return;let i=parseInt(n,10);return Number.isFinite(i)?i:void 0}function i(e,t={x:0,y:0,z:0}){if(!e)return t;let s=e.split(" ").map(Number);return{x:s[0]??t.x,y:s[1]??t.y,z:s[2]??t.z}}function r(e,t={r:0,g:0,b:0}){if(!e)return t;let s=e.split(" ").map(Number);return{r:s[0]??t.r,g:s[1]??t.g,b:s[2]??t.b}}function a(e,t={r:.5,g:.5,b:.5,a:1}){if(!e)return t;let s=e.split(" ").map(Number);return{r:s[0]??t.r,g:s[1]??t.g,b:s[2]??t.b,a:s[3]??t.a}}function o(e,t){let s=i(e),n=(t??"1 0 0 0").split(" ").map(Number),r=n[0]??1,a=n[1]??0,o=n[2]??0,l=Math.PI/180*(n[3]??0),c=Math.sqrt(r*r+a*a+o*o),u=0,d=0,m=1;c>1e-8&&(u=r/c,d=a/c,m=o/c);let h=Math.cos(l),p=Math.sin(l),g=1-h,y=Array(16).fill(0);return y[0]=g*u*u+h,y[1]=g*u*d+p*m,y[2]=g*u*m-p*d,y[4]=g*u*d-p*m,y[5]=g*d*d+h,y[6]=g*d*m+p*u,y[8]=g*u*m+p*d,y[9]=g*d*m-p*u,y[10]=g*m*m+h,y[12]=s.x,y[13]=s.y,y[14]=s.z,y[15]=1,{elements:y,position:s}}function l(e){return{className:"TerrainBlock",ghostIndex:e._id,terrFileName:t(e,"terrainFile")??"",detailTextureName:t(e,"detailTexture")??"",squareSize:n(e,"squareSize")??8,emptySquareRuns:function(e){if(!e)return;let t=e.split(/\s+/).map(Number).filter(Number.isFinite);return t.length>0?t:void 0}(t(e,"emptySquares"))}}function c(e){return{className:"InteriorInstance",ghostIndex:e._id,interiorFile:t(e,"interiorFile")??"",transform:o(t(e,"position"),t(e,"rotation")),scale:i(t(e,"scale"),{x:1,y:1,z:1}),showTerrainInside:"1"===t(e,"showTerrainInside"),skinBase:t(e,"skinBase")??"",alarmState:!1}}function u(e){let a=[];for(let s=1;s<=3;s++){let n=function(e){if(!e)return null;let t=e.split(/\s+/).map(Number),s=t[0]??0,n=t[1]??0,i=t[2]??0;return 0===s&&0===n&&0===i?null:{visibleDistance:s,minHeight:n,maxHeight:i,color:{r:.5,g:.5,b:.5}}}(t(e,`fogVolume${s}`));n&&a.push(n)}let o=[];for(let n=0;n<3;n++){let i=t(e,`cloudText${n+1}`)??"",r=s(e,`cloudHeightPer[${n}]`)??s(e,`cloudheightper${n}`)??[.35,.25,.2][n],a=s(e,`cloudSpeed${n+1}`)??[1e-4,2e-4,3e-4][n];o.push({texture:i,heightPercent:r,speed:a})}return{className:"Sky",ghostIndex:e._id,materialList:t(e,"materialList")??"",fogColor:r(t(e,"fogColor")),visibleDistance:s(e,"visibleDistance")??1e3,fogDistance:s(e,"fogDistance")??0,skySolidColor:r(t(e,"SkySolidColor")),useSkyTextures:(n(e,"useSkyTextures")??1)!==0,fogVolumes:a,cloudLayers:o,windVelocity:i(t(e,"windVelocity"))}}function d(e){return{className:"Sun",ghostIndex:e._id,direction:i(t(e,"direction"),{x:.57735,y:.57735,z:-.57735}),color:a(t(e,"color"),{r:.7,g:.7,b:.7,a:1}),ambient:a(t(e,"ambient"),{r:.5,g:.5,b:.5,a:1})}}function m(e){let n=t(e,"area"),i={x:-512,y:-512,w:1024,h:1024};if(n){let e=n.split(/\s+/).map(Number);i={x:e[0]??i.x,y:e[1]??i.y,w:e[2]??i.w,h:e[3]??i.h}}return{className:"MissionArea",ghostIndex:e._id,area:i,flightCeiling:s(e,"flightCeiling")??2e3,flightCeilingRange:s(e,"flightCeilingRange")??50}}function h(e){return{className:"WaterBlock",ghostIndex:e._id,transform:o(t(e,"position"),t(e,"rotation")),scale:i(t(e,"scale"),{x:1,y:1,z:1}),surfaceName:t(e,"surfaceTexture")??"",envMapName:t(e,"envMapTexture")??"",surfaceOpacity:s(e,"surfaceOpacity")??.75,waveMagnitude:s(e,"waveMagnitude")??1,envMapIntensity:s(e,"envMapIntensity")??1}}e.s(["interiorFromMis",()=>c,"missionAreaFromMis",()=>m,"skyFromMis",()=>u,"sunFromMis",()=>d,"terrainFromMis",()=>l,"waterBlockFromMis",()=>h])},70847,47566,63318,e=>{"use strict";let t=(0,e.i(25645).createLogger)("ghostToScene");function s(e,t={x:0,y:0,z:0}){return e&&"object"==typeof e&&"x"in e?e:t}function n(e,t={r:0,g:0,b:0}){return e&&"object"==typeof e&&"r"in e?e:t}function i(e,t={r:.5,g:.5,b:.5,a:1}){return e&&"object"==typeof e&&"r"in e?e:t}function r(e){if(e&&"object"==typeof e&&"elements"in e&&Array.isArray(e.elements))return e;if(e&&"object"==typeof e&&"position"in e&&"rotation"in e){let{position:t,rotation:s}=e,n=s.x*s.x,i=s.y*s.y,r=s.z*s.z,a=s.x*s.y,o=s.x*s.z,l=s.y*s.z,c=s.w*s.x,u=s.w*s.y,d=s.w*s.z;return{elements:[1-2*(i+r),2*(a+d),2*(o-u),0,2*(a-d),1-2*(n+r),2*(l+c),0,2*(o+u),2*(l-c),1-2*(n+i),0,t.x,t.y,t.z,1],position:{x:t.x,y:t.y,z:t.z}}}return{elements:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],position:{x:0,y:0,z:0}}}function a(e,a,o){let l;switch(e){case"TerrainBlock":return l={className:"TerrainBlock",ghostIndex:a,terrFileName:o.terrFileName??"",detailTextureName:o.detailTextureName??"",squareSize:o.squareSize??8,emptySquareRuns:o.emptySquareRuns},t.debug("TerrainBlock #%d: terrFileName=%s",a,l.terrFileName),l;case"InteriorInstance":return l={className:"InteriorInstance",ghostIndex:a,interiorFile:o.interiorFile??"",transform:r(o.transform),scale:s(o.scale,{x:1,y:1,z:1}),showTerrainInside:o.showTerrainInside??!1,skinBase:o.skinBase??"",alarmState:o.alarmState??!1},t.debug("InteriorInstance #%d: interiorFile=%s",a,l.interiorFile),l;case"TSStatic":return{className:"TSStatic",ghostIndex:a,shapeName:o.shapeName??"",transform:r(o.transform),scale:s(o.scale,{x:1,y:1,z:1})};case"Sky":{let e,i;e=Array.isArray(o.fogVolumes)?o.fogVolumes.map(e=>({visibleDistance:e.visibleDistance??0,minHeight:e.minHeight??0,maxHeight:e.maxHeight??0,color:n(e.color)})):[],i=Array.isArray(o.cloudLayers)?o.cloudLayers.map(e=>({texture:e.texture??"",heightPercent:e.heightPercent??0,speed:e.speed??0})):[];let r=l={className:"Sky",ghostIndex:a,materialList:o.materialList??"",fogColor:n(o.fogColor),visibleDistance:o.visibleDistance??1e3,fogDistance:o.fogDistance??0,skySolidColor:n(o.skySolidColor),useSkyTextures:o.useSkyTextures??!0,fogVolumes:e,cloudLayers:i,windVelocity:s(o.windVelocity)};return t.debug("Sky #%d: materialList=%s fogColor=(%s, %s, %s) visibleDist=%d fogDist=%d useSkyTextures=%s",a,r.materialList,r.fogColor.r.toFixed(3),r.fogColor.g.toFixed(3),r.fogColor.b.toFixed(3),r.visibleDistance,r.fogDistance,r.useSkyTextures),l}case"Sun":{let e=l={className:"Sun",ghostIndex:a,direction:s(o.direction,{x:.57735,y:.57735,z:-.57735}),color:i(o.color,{r:.7,g:.7,b:.7,a:1}),ambient:i(o.ambient,{r:.5,g:.5,b:.5,a:1}),textures:Array.isArray(o.textures)?o.textures:void 0};return t.debug("Sun #%d: dir=(%s, %s, %s) color=(%s, %s, %s) ambient=(%s, %s, %s)",a,e.direction.x.toFixed(3),e.direction.y.toFixed(3),e.direction.z.toFixed(3),e.color.r.toFixed(3),e.color.g.toFixed(3),e.color.b.toFixed(3),e.ambient.r.toFixed(3),e.ambient.g.toFixed(3),e.ambient.b.toFixed(3)),l}case"MissionArea":return{className:"MissionArea",ghostIndex:a,area:o.area??{x:-512,y:-512,w:1024,h:1024},flightCeiling:o.flightCeiling??2e3,flightCeilingRange:o.flightCeilingRange??50};case"WaterBlock":return{className:"WaterBlock",ghostIndex:a,transform:r(o.transform),scale:s(o.scale,{x:1,y:1,z:1}),surfaceName:o.surfaceName??"",envMapName:o.envMapName??"",surfaceOpacity:o.surfaceOpacity??.75,waveMagnitude:o.waveMagnitude??1,envMapIntensity:o.envMapIntensity??1};default:return null}}e.s(["ghostToSceneObject",()=>a],47566),e.i(9672);var o=e.i(90072);function l(e){return[e.y,e.z,e.x]}function c(e){return[e.y,e.z,e.x]}function u(e){let t=e.elements,s=new o.Matrix4,n=s.elements;n[0]=t[5],n[1]=t[6],n[2]=t[4],n[3]=0,n[4]=t[9],n[5]=t[10],n[6]=t[8],n[7]=0,n[8]=t[1],n[9]=t[2],n[10]=t[0],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1;let i=new o.Quaternion;return i.setFromRotationMatrix(s),i.conjugate(),i}e.s(["matrixFToQuaternion",()=>u,"torqueScaleToThree",()=>c,"torqueToThree",()=>l],63318),e.s([],70847)},92224,e=>{"use strict";e.i(932);var t=e.i(8155),s=e.i(66748),n=e.i(62395);let i=(0,t.createStore)()(e=>({missionEntities:new Map,streamEntities:new Map,isStreaming:!1,dataSource:null,missionName:null,missionType:null,missionTypeDisplayName:null,missionDisplayName:null,gameClassName:null,serverDisplayName:null,recorderName:null,recordingDate:null,version:0,setEntity(t){e(e=>{let s=new Map(e.missionEntities);return s.set(t.id,t),{missionEntities:s,version:e.version+1}})},deleteEntity(t){e(e=>{if(!e.missionEntities.has(t))return e;let s=new Map(e.missionEntities);return s.delete(t),{missionEntities:s,version:e.version+1}})},setEntities(t){e(e=>{let s=new Map(e.missionEntities);for(let e of t)s.set(e.id,e);return{missionEntities:s,version:e.version+1}})},setAllEntities(t){e(e=>{let s=new Map;for(let e of t)s.set(e.id,e);return{missionEntities:s,dataSource:e.isStreaming?e.dataSource:"map"}})},clearEntities(){e(e=>0===e.missionEntities.size?e:e.isStreaming?{missionEntities:new Map,version:e.version+1}:{missionEntities:new Map,dataSource:null,missionName:null,missionType:null,missionTypeDisplayName:null,missionDisplayName:null,gameClassName:null,serverDisplayName:null,recorderName:null,recordingDate:null,version:e.version+1})},setMissionInfo(t){let s={};if(void 0!==t.missionName&&(s.missionName=t.missionName),void 0!==t.missionType&&(s.missionType=t.missionType),void 0!==t.missionTypeDisplayName&&(s.missionTypeDisplayName=t.missionTypeDisplayName),void 0!==t.missionDisplayName&&(s.missionDisplayName=t.missionDisplayName),void 0!==t.gameClassName&&(s.gameClassName=t.gameClassName,void 0===t.missionType))if(t.gameClassName){let e=t.gameClassName.replace(/Game$/i,"");s.missionType=n.normalizedMissionTypes[e.toLowerCase()]??e}else s.missionType=null;void 0!==t.serverDisplayName&&(s.serverDisplayName=t.serverDisplayName),void 0!==t.recorderName&&(s.recorderName=t.recorderName),void 0!==t.recordingDate&&(s.recordingDate=t.recordingDate),e(e=>({...s,version:e.version+1}))},beginStreaming(t){e(e=>({isStreaming:!0,dataSource:t,streamEntities:new Map,missionName:null,missionType:null,missionTypeDisplayName:null,missionDisplayName:null,gameClassName:null,serverDisplayName:null,recorderName:null,recordingDate:null,version:e.version+1}))},endStreaming(){e(e=>e.isStreaming?{isStreaming:!1,dataSource:e.missionEntities.size>0?"map":null,missionName:null,missionType:null,missionTypeDisplayName:null,missionDisplayName:null,gameClassName:null,serverDisplayName:null,recorderName:null,recordingDate:null,streamEntities:new Map,version:e.version+1}:e)},setStreamEntity(t){e(e=>{let s=new Map(e.streamEntities);return s.set(t.id,t),{streamEntities:s,version:e.version+1}})},deleteStreamEntity(t){e(e=>{if(!e.streamEntities.has(t))return e;let s=new Map(e.streamEntities);return s.delete(t),{streamEntities:s,version:e.version+1}})},setStreamEntities(t){e(e=>{let s=new Map(e.streamEntities);for(let e of t)s.set(e.id,e);return{streamEntities:s,version:e.version+1}})},setAllStreamEntities(t){e(e=>{let s=new Map;for(let e of t)s.set(e.id,e);let n=e.streamEntities;return s.size===n.size&&[...s.keys()].every(e=>n.has(e))?e:{streamEntities:s,version:e.version+1}})},clearStreamEntities(){e(e=>0===e.streamEntities.size?e:{streamEntities:new Map,version:e.version+1})}}));function r(e){let t=e.isStreaming?e.streamEntities:e.missionEntities,s=[];for(let e of t.values())"None"!==e.renderType&&s.push(e);return s}function a(e,t){if(e.length!==t.length)return!1;for(let s=0;so,"useDataSource",()=>m,"useMissionDisplayName",()=>k,"useMissionName",()=>p,"useMissionType",()=>y,"useMissionTypeDisplayName",()=>v,"useRecorderName",()=>E,"useRecordingDate",()=>x,"useSceneSky",()=>u,"useSceneSun",()=>d,"useServerDisplayName",()=>N])},98755,e=>{"use strict";e.i(47167);var t=e.i(8155),s=e.i(66748),n=e.i(25645);let i=(0,n.createLogger)("relayClient");class r{ws=null;handlers;url;_connected=!1;wsPingInterval=null;smoothedWsPing=0;constructor(e,t){this.url=e,this.handlers=t}get connected(){return this._connected}connect(){this.ws=new WebSocket(this.url),this.ws.binaryType="arraybuffer",this.ws.onopen=()=>{i.info("WebSocket connected to %s",this.url),this._connected=!0,this.startWsPing(),this.handlers.onOpen?.()},this.ws.onmessage=e=>{if(e.data instanceof ArrayBuffer)this.handlers.onGamePacket?.(new Uint8Array(e.data));else try{let t=JSON.parse(e.data);this.handleMessage(t)}catch(e){i.error("Failed to parse relay message: %o",e)}},this.ws.onclose=()=>{i.info("WebSocket disconnected"),this._connected=!1,this.stopWsPing(),this.handlers.onClose?.()},this.ws.onerror=()=>{i.error("WebSocket error"),this.handlers.onError?.("WebSocket connection error")}}handleMessage(e){switch(e.type){case"serverList":this.handlers.onServerList?.(e.servers);break;case"status":this.handlers.onStatus?.(e.status,e.message,e.connectSequence,e.mapName);break;case"ping":this.handlers.onPing?.(e.ms);break;case"wsPong":{let t=Date.now()-e.ts;this.smoothedWsPing=0===this.smoothedWsPing?t:.5*this.smoothedWsPing+.5*t,this.handlers.onWsPing?.(Math.round(this.smoothedWsPing));break}case"error":this.handlers.onError?.(e.message)}}listServers(){this.send({type:"listServers"})}sendWsPing(){this.send({type:"wsPing",ts:Date.now()})}joinServer(e,t){i.info("Joining server: %s",e),this.send({type:"joinServer",address:e,warriorName:t})}disconnectServer(){this.send({type:"disconnect"})}sendAuthEvent(e,t){this.send({type:"sendCommand",command:e,args:t})}sendCommand(e,t){this.send({type:"sendCommand",command:e,args:t})}sendCRCResponse(e,t,s){this.send({type:"sendCRCResponse",crcValue:e,field1:t,field2:s})}sendCRCCompute(e,t,s,n){this.send({type:"sendCRCCompute",seed:e,field2:t,includeTextures:n,datablocks:s})}sendGhostAck(e,t){this.send({type:"sendGhostAck",sequence:e,ghostCount:t})}sendMoves(e,t){this.send({type:"sendMoves",moves:e,moveStartIndex:t})}close(){this.stopWsPing(),this.ws&&(this.ws.close(),this.ws=null),this._connected=!1}startWsPing(){this.smoothedWsPing=0,this.send({type:"wsPing",ts:Date.now()}),this.wsPingInterval=setInterval(()=>{this.send({type:"wsPing",ts:Date.now()})},7e3)}stopWsPing(){null!=this.wsPingInterval&&(clearInterval(this.wsPingInterval),this.wsPingInterval=null)}send(e){this.ws?.readyState===WebSocket.OPEN?this.ws.send(JSON.stringify(e)):i.warn("send dropped (ws not open): %s",e.type)}}e.i(50593);var a=e.i(45853),o=e.i(89119),l=e.i(10244);let c=(0,n.createLogger)("liveStreaming");class u extends l.StreamEngine{packetParser;relay;currentTimeSec=0;connectSynced=!1;_snapshot=null;_snapshotTick=-1;_ready=!1;dataBlockClassNames=new Map;onReady;onMissionChange;missionName=null;lastMoveAck=0;constructor(e){super(),this.relay=e;const{registry:t,ghostTracker:s,packetParser:n}=(0,a.createLiveParser)();this.packetParser=n,this.ghostTracker=s,this.registry=t}getDataBlockData(e){return this.packetParser.getDataBlockDataMap()?.get(e)}_shapeConstructorCache=null;getShapeConstructorSequences(e){this._shapeConstructorCache=new Map;let t=this.packetParser.getDataBlockDataMap();if(t){for(let[,e]of t){let t=e.shape,s=e.sequences;t&&s&&this._shapeConstructorCache.set(t.toLowerCase(),s)}return this._shapeConstructorCache.get(e.toLowerCase())}}getTimeSec(){return this.currentTimeSec}getCameraYawPitch(e){return this.getAbsoluteRotation(e)??{yaw:0,pitch:0}}getEffectShapes(){let e=new Set,t=this.packetParser.getDataBlockDataMap();if(!t)return[];for(let[,s]of t){let n=s.explosion;if(null==n)continue;let i=t.get(n);i?.dtsFileName&&e.add(i.dtsFileName)}return[...e]}reset(){this.resetSharedState(),this.ghostTracker.clear?.(),this.currentTimeSec=0,this._snapshot=null,this._snapshotTick=-1,this.dataBlockClassNames.clear(),this.observerMode="fly",this.missionName=null}getSnapshot(){return this._snapshot&&this._snapshotTick===this.tickCount?this._snapshot:this.buildSnapshot()}stepToTime(e,t){return this.currentTimeSec=e,this.getSnapshot()}syncConnectSequence(e){if(this.connectSynced||e.length<1)return;this.connectSynced=!0;let t=e[0]>>1&1;this.packetParser.setConnectionProtocolState({lastSeqRecvdAtSend:Array(32).fill(0),lastSeqRecvd:0,highestAckedSeq:0,lastSendSeq:0x1fffffff,ackMask:0,connectSequence:t,lastRecvAckAck:0,connectionEstablished:!0})}feedPacket(e){this.syncConnectSequence(e),this.processPacket(e)}handleRelayCommands(e){if("RemoteCommandEvent"!==e.type)return;let t=e.funcName;if(!t)return;let s=this.resolveNetString(t);if(["t2csri_pokeClient","t2csri_getChallengeChunk","t2csri_decryptChallenge"].includes(s)){let t=(e.args??[]).map(e=>this.resolveNetString(e)).filter(e=>""!==e);c.info("auth event: %s %o",s,t),this.relay.sendAuthEvent(s,t);return}let n=(e.args??[]).map(e=>this.resolveNetString(e));if("MissionStartPhase1"===s){let e=n[0]??"",t=n[1]??null;c.info("mission phase 1, seq=%s mission=%s resolvedArgs=%o",e,t,n),t&&t!==this.missionName&&(this.missionName=t,this.entities.clear(),this.entityIdByGhostIndex.clear(),this._ready=!1,this._snapshot=null,this._snapshotTick=-1,this.missionDisplayName=null,this.missionTypeDisplayName=null,this.gameClassName=null,this.serverDisplayName=null,this.onMissionChange?.(t)),this.relay.sendCommand("MissionStartPhase1Done",[e])}else if("MissionStartPhase2"===s){let e=n[0]??"";c.info("mission phase 2 (datablocks), seq=%s",e),this.relay.sendCommand("MissionStartPhase2Done",[e])}else if("MissionStartPhase3"===s){let e=n[0]??"",t=n[1]??null;c.info("mission phase 3 (ghosting), seq=%s mission=%s",e,t),t&&(this.missionName=t),this.relay.sendCommand("setClientFav",[""]),this.relay.sendCommand("MissionStartPhase3Done",[e])}}handleCRCChallenge(e){if("CRCChallengeEvent"!==e.type)return;let t=e.crcValue,s=e.field1,n=e.field2,i=(1&s)!=0;c.info("CRC challenge: seed=0x%s f1=0x%s f2=0x%s includeTextures=%s",(t>>>0).toString(16),(s>>>0).toString(16),(n>>>0).toString(16),i);let r=this.packetParser.getDataBlockDataMap(),a=[];if(r)for(let[e,t]of r){let s=this.dataBlockClassNames.get(e);if(!s)continue;let n=(0,o.resolveShapeName)(s,t);a.push({objectId:e,className:s,shapeName:n??""})}c.info("CRC: sending %d datablocks for computation",a.length),this.relay.sendCRCCompute(t,n,a,i)}handleGhostingMessage(e){if("GhostingMessageEvent"!==e.type)return;let t=e.message,s=e.sequence,n=e.ghostCount;c.info("GhostingMessageEvent: message=%d sequence=%d ghostCount=%d",t,s,n),0===t&&(c.info("Sending ghost ack (type 1) for sequence %d",s),this.relay.sendGhostAck(s,n))}observerMode="fly";toggleObserverMode(){"fly"===this.observerMode?(c.info("observer: fly → follow"),this.observerMode="follow"):(c.info("observer: follow → fly"),this.observerMode="fly")}getPlayerList(){let e=[];for(let[t,s]of this.targetNames){let n=this.targetTeams.get(t)??0;e.push({targetId:t,name:s,sensorGroup:n})}return e}processPacket(e){try{let t=this.packetParser.protocolRejected,s=this.packetParser.protocolNoDispatch,n=this.packetParser.parsePacket(e),i=this.packetParser.protocolRejected>t,r=this.packetParser.protocolNoDispatch>s;(i||r)&&c.warn("packet #%d %s: %d bytes (total rejected=%d, noDispatch=%d)",this.tickCount,i?"REJECTED":"no-dispatch",e.length,this.packetParser.protocolRejected,this.packetParser.protocolNoDispatch);let a=this.tickCount<20,l=this.tickCount%100==0,u=a||l;for(let t of(u&&c.debug("packet #%d: %d events, %d ghosts, %d bytes%s%s",this.tickCount,n.events.length,n.ghosts.length,e.length,void 0!==n.gameState.controlObjectGhostIndex?`, control=${n.gameState.controlObjectGhostIndex}`:"",void 0!==n.gameState.cameraFov?`, fov=${n.gameState.cameraFov}`:""),this.lastMoveAck=n.gameState.lastMoveAck,this.processControlObject(n.gameState),n.events))if(t.parsedData){this.handleRelayCommands(t.parsedData),this.handleCRCChallenge(t.parsedData),this.handleGhostingMessage(t.parsedData);let e=t.parsedData.type;if("RemoteCommandEvent"===e){let e=this.resolveNetString(t.parsedData.funcName??"");c.debug("remote: %s",e)}if(a&&"NetStringEvent"!==e&&"RemoteCommandEvent"!==e&&c.debug("event: %s%s",e,"SimDataBlockEvent"===e?` id=${t.parsedData.objectId} class=${t.parsedData.dataBlockClassName}`:""),"SimDataBlockEvent"===e){let e=t.parsedData.objectId,s=t.parsedData.dataBlockClassName;if(null!=e&&s&&this.dataBlockClassNames.set(e,s),u){let n=t.parsedData.dataBlockData,i=(0,o.resolveShapeName)(s??"",n);c.debug("datablock: id=%d class=%s%s",e,s??"?",i?` shape=${i}`:"")}}let s=this.registry.getEventParser(t.classId)?.name;if(this.processEvent(t,s),a&&"NetStringEvent"===e){let e=t.parsedData.id,s=t.parsedData.value;null!=e&&"string"==typeof s&&c.trace('netString #%d = "%s"',e,s.length>60?s.slice(0,60)+"…":s)}if("TargetInfoEvent"===e){let e=t.parsedData.targetId,s=t.parsedData.nameTag;if(null!=e&&null!=s){let n=this.netStrings.get(s);if(n){let s=(0,o.stripTaggedStringMarkup)(n);c.info('target #%d: "%s" team=%s',e,s,t.parsedData.sensorGroup??"?")}}}if("SetSensorGroupEvent"===e){let e=t.parsedData.sensorGroup;null!=e&&c.info("sensor group changed: → %d",e)}if("SensorGroupColorEvent"===e){let e=t.parsedData.sensorGroup,s=t.parsedData.colors;s&&c.debug("sensor group colors: group=%d, %d entries",e,s.length)}}for(let e of n.ghosts){if("create"===e.type){let t=e.parsedData?.position,s=t&&"number"==typeof t.x&&"number"==typeof t.y&&"number"==typeof t.z,n=this.resolveGhostClassName(e.index,e.classId);c.debug("ghost create: #%d %s%s (%d entities total)",e.index,n??"?",s?` at (${t.x.toFixed(1)}, ${t.y.toFixed(1)}, ${t.z.toFixed(1)})`:"",this.entities.size+1),this._ready||(this._ready=!0,this.onReady?.())}else if("delete"===e.type){let t=this.entityIdByGhostIndex.get(e.index),s=t?this.entities.get(t):void 0;(this.tickCount<50||this.tickCount%200==0)&&c.debug("ghost delete: #%d %s (%d entities remaining)",e.index,s?.className??"?",this.entities.size-1)}this.processGhostUpdate(e)}if(this.tickCount++,this.advanceProjectiles(),this.advanceItems(),l&&this.tickCount>1){let e=this.packetParser.getDataBlockDataMap();c.info("status @ tick %d: %d entities, %d datablocks, rejected=%d, noDispatch=%d",this.tickCount,this.entities.size,e?.size??0,this.packetParser.protocolRejected,this.packetParser.protocolNoDispatch)}let d=this.entities.size;if(1===this.tickCount||d>0&&d%25==0&&this.tickCount<100){let e=new Map;for(let t of this.entities.values())e.set(t.type,(e.get(t.type)??0)+1);let t=[...e.entries()].map(([e,t])=>`${e}=${t}`).join(" ");c.info("entity count: %d (%s)",d,t)}let m=this.camera?.mode;if(this.updateCameraAndHud(),this.camera&&this.camera.mode!==m&&c.info("camera mode: %s → %s%s",m??"none",this.camera.mode,"third-person"===this.camera.mode?` orbit=${this.camera.orbitTargetId??"?"} dist=${this.camera.orbitDistance??"?"}`:""),this.tickCount<=5&&this.camera){let[e,t,s]=this.camera.position;c.debug("camera: mode=%s pos=(%s, %s, %s) fov=%s",this.camera.mode,e.toFixed(1),t.toFixed(1),s.toFixed(1),this.camera.fov)}}catch(s){let t={tickCount:this.tickCount,entityCount:this.entities.size,dataLength:e.length,controlGhost:this.latestControl.ghostIndex,connectSynced:this.connectSynced};c.error("Failed to process live packet: %o %o",s,t)}}buildSnapshot(){let e=this.buildEntityList(),t=this.currentTimeSec,{chatMessages:s,audioEvents:n}=this.buildTimeFilteredEvents(t),{weaponsHud:i,inventoryHud:r,backpackHud:a,teamScores:o}=this.buildHudState();this.camera||(this.camera={time:t,position:[0,0,200],rotation:[0,0,0,1],fov:90,mode:"observer"});let l={timeSec:t,exhausted:!1,camera:this.camera,entities:e,controlPlayerGhostId:this.controlPlayerGhostId,playerSensorGroup:this.playerSensorGroup,status:this.lastStatus,chatMessages:s,audioEvents:n,weaponsHud:i,backpackHud:a,inventoryHud:r,teamScores:o};return this._snapshot=l,this._snapshotTick=this.tickCount,l}}var d=e.i(92224);let m=(0,n.createLogger)("liveConnectionStore"),h="wss://t2-relay.fly.dev",p=(0,t.createStore)((e,t)=>({relayConnected:!1,gameStatus:null,gameStatusMessage:void 0,mapName:void 0,serverName:void 0,relayToGameServerPing:null,browserToRelayPing:null,servers:[],serversLoading:!1,adapter:null,liveReady:!1,_relay:null,_adapter:null,_pending:[],_listInFlight:!1,connectRelay(s=h){let n=t();n._relay&&n._relay.close();let i=new r(s,{onOpen(){e({relayConnected:!0});let s=t();for(let e of s._pending)e();s._pending=[]},onStatus(t,s,n,i){m.info("game status: %s%s%s",t,s?` — ${s}`:"",i?` map=${i}`:""),e({gameStatus:t,gameStatusMessage:s,...i?{mapName:i}:{}})},onServerList(s){t()._listInFlight=!1,e({servers:s,serversLoading:!1})},onGamePacket(e){let s=t()._adapter;s||m.warn("received game packet but no adapter is active"),s?.feedPacket(e)},onPing(t){e({relayToGameServerPing:t})},onWsPing(t){e({browserToRelayPing:t})},onError(s){m.error("error: %s",s),t()._listInFlight=!1,e({serversLoading:!1})},onClose(){let s=t();s._relay===i&&(s._relay=null,s._adapter=null,s._pending=[],s._listInFlight=!1,e({relayConnected:!1,gameStatus:null,gameStatusMessage:void 0,mapName:void 0,serverName:void 0,relayToGameServerPing:null,browserToRelayPing:null,adapter:null,liveReady:!1}))}});i.connect(),t()._relay=i},disconnectRelay(){let s=t();s._relay?.close(),s._relay=null,s._adapter=null,s._pending=[],s._listInFlight=!1,e({relayConnected:!1,gameStatus:null,gameStatusMessage:void 0,mapName:void 0,serverName:void 0,relayToGameServerPing:null,browserToRelayPing:null,adapter:null,liveReady:!1})},listServers(){let s=t();if(s._listInFlight)return;s._listInFlight=!0;let n=()=>{let e=t();e._relay?.sendWsPing(),e._relay?.listServers()};e({serversLoading:!0}),s._relay?.connected?n():(s._pending.push(n),s._relay||t().connectRelay())},joinServer(s,n){let i=t();if(!i._relay)return;let r=i.servers.find(e=>e.address===s),a=new u(i._relay);a.onReady=()=>e({liveReady:!0}),a.onMissionChange=t=>{m.info("mission changed: %s",t),e({mapName:t,liveReady:!1}),d.gameEntityStore.getState().setMissionInfo({missionName:t,missionType:null,missionTypeDisplayName:null,missionDisplayName:null,gameClassName:null})},a.onMissionInfoChange=()=>{d.gameEntityStore.getState().setMissionInfo({missionDisplayName:a.missionDisplayName??void 0,missionTypeDisplayName:a.missionTypeDisplayName??void 0,gameClassName:a.gameClassName??void 0,serverDisplayName:a.serverDisplayName??void 0,recorderName:a.connectedPlayerName??void 0})},i._adapter=a,e({mapName:r?.mapName??i.mapName,serverName:r?.name,warriorName:n,liveReady:!1,gameStatus:null,adapter:a}),d.gameEntityStore.getState().setMissionInfo({missionName:r?.mapName??void 0,missionTypeDisplayName:r?.gameType??void 0,serverDisplayName:r?.name??void 0,recorderName:n??void 0}),i._relay.joinServer(s,n)},disconnectServer(){let s=t();s._relay?.disconnectServer(),s._adapter=null,e({adapter:null,liveReady:!1,gameStatus:null,mapName:void 0,serverName:void 0,relayToGameServerPing:null})},sendMoves(e,s){t()._relay?.sendMoves(e,s)},sendCommand(e,...s){t()._relay?.sendCommand(e,s)}}));function g(e,t){return(0,s.useStoreWithEqualityFn)(p,e,t)}function y(e){return null!=e.relayToGameServerPing&&null!=e.browserToRelayPing?e.relayToGameServerPing+e.browserToRelayPing:e.relayToGameServerPing??null}e.s(["liveConnectionStore",0,p,"selectPing",()=>y,"useLiveSelector",()=>g],98755)},66093,e=>{"use strict";var t=e.i(43476),s=e.i(932),n=e.i(71645);let i=(0,n.createContext)(null);function r(){let e=(0,n.useContext)(i);if(!e)throw Error("No JoystickContext found. Did you forget to add a ?");return e}function a(e){let r,a,o,l,c,u,d=(0,s.c)(7),{children:m}=e;d[0]===Symbol.for("react.memo_cache_sentinel")?(r={angle:0,force:0},d[0]=r):r=d[0];let h=(0,n.useRef)(r);d[1]===Symbol.for("react.memo_cache_sentinel")?(a={angle:0,force:0},d[1]=a):a=d[1];let p=(0,n.useRef)(a);d[2]===Symbol.for("react.memo_cache_sentinel")?(o=e=>{let{angle:t,force:s}=e;null!=t&&(h.current.angle=t),null!=s&&(h.current.force=s)},d[2]=o):o=d[2];let g=o;d[3]===Symbol.for("react.memo_cache_sentinel")?(l=e=>{let{angle:t,force:s}=e;null!=t&&(p.current.angle=t),null!=s&&(p.current.force=s)},d[3]=l):l=d[3];let y=l;d[4]===Symbol.for("react.memo_cache_sentinel")?(c={moveState:h,lookState:p,setMoveState:g,setLookState:y},d[4]=c):c=d[4];let f=c;return d[5]!==m?(u=(0,t.jsx)(i,{value:f,children:m}),d[5]=m,d[6]=u):u=d[6],u}e.s(["JoystickProvider",()=>a,"useJoystick",()=>r])},65349,e=>{"use strict";var t=e.i(71645);let s=(0,t.createContext)(null);function n(){let e=(0,t.useContext)(s);if(!e)throw Error("useInputContext must be used within an InputProvider");return e}function i(){return n().onInput}e.s(["InputContext",0,s,"useInputContext",()=>n,"useOnInput",()=>i])},32865,e=>{"use strict";var t=e.i(43476),s=e.i(932),n=e.i(58647);function i(e){let n,i=(0,s.c)(2),{children:r}=e;return i[0]!==r?(n=(0,t.jsx)(t.Fragment,{children:r}),i[0]=r,i[1]=n):n=i[1],n}function r(){return(0,n.useEngineSelector)(a)}function a(e){return e.playback.recording}function o(){return(0,n.useEngineSelector)(l)}function l(e){return"playing"===e.playback.status}function c(){return(0,n.useEngineSelector)(u)}function u(e){return e.playback.timeMs/1e3}function d(){return(0,n.useEngineSelector)(m)}function m(e){return e.playback.durationMs/1e3}function h(){return(0,n.useEngineSelector)(p)}function p(e){return e.playback.rate}function g(){let e,t,i,a,o,l,c=(0,s.c)(17),u=r(),d=(0,n.useEngineSelector)(S),m=(0,n.useEngineSelector)(v),h=(0,n.useEngineSelector)(f),p=(0,n.useEngineSelector)(y);c[0]!==d?(e=e=>{d(e)},c[0]=d,c[1]=e):e=c[1];let g=e;c[2]!==u||c[3]!==m?(t=()=>{u&&m("playing")},c[2]=u,c[3]=m,c[4]=t):t=c[4];let k=t;c[5]!==m?(i=()=>{m("paused")},c[5]=m,c[6]=i):i=c[6];let b=i;c[7]!==h?(a=e=>{h(1e3*e)},c[7]=h,c[8]=a):a=c[8];let N=a;c[9]!==p?(o=e=>{p(e)},c[9]=p,c[10]=o):o=c[10];let C=o;return c[11]!==b||c[12]!==k||c[13]!==N||c[14]!==g||c[15]!==C?(l={setRecording:g,play:k,pause:b,seek:N,setSpeed:C},c[11]=b,c[12]=k,c[13]=N,c[14]=g,c[15]=C,c[16]=l):l=c[16],l}function y(e){return e.setPlaybackRate}function f(e){return e.setPlaybackTime}function v(e){return e.setPlaybackStatus}function S(e){return e.setRecording}e.s(["RecordingProvider",()=>i,"useCurrentTime",()=>c,"useDuration",()=>d,"useIsPlaying",()=>o,"usePlaybackActions",()=>g,"useRecording",()=>r,"useSpeed",()=>h])},12631,e=>{"use strict";var t=e.i(71645),s=e.i(8155);let n=e=>{let n=(0,s.createStore)(e),i=e=>(function(e,s=e=>e){let n=t.default.useSyncExternalStore(e.subscribe,t.default.useCallback(()=>s(e.getState()),[e,s]),t.default.useCallback(()=>s(e.getInitialState()),[e,s]));return t.default.useDebugValue(n),n})(n,e);return Object.assign(i,n),i};var i=e.i(79473);let r=t.createContext(null);function a({map:e,children:s,onChange:a,domElement:o}){let l=e.map(e=>e.name+e.keys).join("-"),c=t.useMemo(()=>{let t;return(t=(0,i.subscribeWithSelector)(()=>e.reduce((e,t)=>({...e,[t.name]:!1}),{})))?n(t):n},[l]),u=t.useMemo(()=>[c.subscribe,c.getState,c],[l]),d=c.setState;return t.useEffect(()=>{let t=e.map(({name:e,keys:t,up:s})=>({keys:t,up:s,fn:t=>{d({[e]:t}),a&&a(e,t,u[1]())}})).reduce((e,{keys:t,fn:s,up:n=!0})=>(t.forEach(t=>e[t]={fn:s,pressed:!1,up:n}),e),{}),s=({key:e,code:s})=>{let n=t[e]||t[s];if(!n)return;let{fn:i,pressed:r,up:a}=n;n.pressed=!0,(a||!r)&&i(!0)},n=({key:e,code:s})=>{let n=t[e]||t[s];if(!n)return;let{fn:i,up:r}=n;n.pressed=!1,r&&i(!1)},i=o||window;return i.addEventListener("keydown",s,{passive:!0}),i.addEventListener("keyup",n,{passive:!0}),()=>{i.removeEventListener("keydown",s),i.removeEventListener("keyup",n)}},[o,l]),t.createElement(r.Provider,{value:u,children:s})}function o(e){let[s,n,i]=t.useContext(r);return e?i(e):[s,n]}e.s(["KeyboardControls",()=>a,"useKeyboardControls",()=>o],12631)},93784,e=>{"use strict";let t=(0,e.i(8155).createStore)()(()=>({time:0,playback:null,root:null,freeFlyCamera:!1,entities:new Map}));function s(){t.setState({time:0,playback:null,freeFlyCamera:!1})}e.s(["resetStreamPlayback",()=>s,"streamPlaybackStore",0,t])},46325,e=>{"use strict";var t=e.i(43476),s=e.i(932),n=e.i(71645);let i=(0,e.i(25645).createLogger)("DebugSuspense");function r(e){let i,r,l,c=(0,s.c)(10),{name:u,fallback:d,children:m}=e,h=void 0===d?null:d;return c[0]!==h||c[1]!==u?(i=(0,t.jsx)(a,{name:u,children:h}),c[0]=h,c[1]=u,c[2]=i):i=c[2],c[3]!==u?(r=(0,t.jsx)(o,{name:u}),c[3]=u,c[4]=r):r=c[4],c[5]!==m||c[6]!==u||c[7]!==i||c[8]!==r?(l=(0,t.jsxs)(n.Suspense,{name:u,fallback:i,children:[r,m]}),c[5]=m,c[6]=u,c[7]=i,c[8]=r,c[9]=l):l=c[9],l}function a(e){let t,r,a=(0,s.c)(3),{name:o,children:l}=e;return a[0]!==o?(t=()=>{i.debug("🛑 SUSPENDED: %s",o)},r=[o],a[0]=o,a[1]=t,a[2]=r):(t=a[1],r=a[2]),(0,n.useEffect)(t,r),l}function o(e){let t,r,a=(0,s.c)(3),{name:o}=e;return a[0]!==o?(t=()=>{i.debug("✅ RESOLVED: %s",o)},r=[o],a[0]=o,a[1]=t,a[2]=r):(t=a[1],r=a[2]),(0,n.useEffect)(t,r),null}e.s(["DebugSuspense",()=>r])},51434,e=>{"use strict";var t=e.i(43476),s=e.i(932),n=e.i(71645),i=e.i(15080),r=e.i(90072),a=e.i(58647),o=e.i(79123);let l=(0,n.createContext)(void 0);function c(e){let c,h,p,g,y,f,v=(0,s.c)(11),{children:S}=e,k=(0,i.useThree)(m),{audioVolume:b}=(0,o.useSettings)();v[0]===Symbol.for("react.memo_cache_sentinel")?(c={audioLoader:null,audioListener:null},v[0]=c):c=v[0];let[N,C]=(0,n.useState)(c);return v[1]!==k?(h=()=>{let e=new r.AudioLoader,t=k.children.find(d);t||(t=new r.AudioListener,k.add(t)),C({audioLoader:e,audioListener:t});let s=()=>{let e=t.context;e&&"suspended"===e.state&&e.resume().finally(()=>{document.removeEventListener("click",s),document.removeEventListener("keydown",s),document.removeEventListener("touchend",s)})};document.addEventListener("click",s),document.addEventListener("keydown",s),document.addEventListener("touchend",s);let n=a.engineStore.subscribe(u,e=>{let s=t.context;s&&("paused"===e?s.suspend():"suspended"===s.state&&s.resume())});return()=>{document.removeEventListener("click",s),document.removeEventListener("keydown",s),document.removeEventListener("touchend",s),n(),t&&k.remove(t)}},p=[k],v[1]=k,v[2]=h,v[3]=p):(h=v[2],p=v[3]),(0,n.useEffect)(h,p),v[4]!==N.audioListener||v[5]!==b?(g=()=>{N.audioListener?.setMasterVolume(b)},y=[b,N.audioListener],v[4]=N.audioListener,v[5]=b,v[6]=g,v[7]=y):(g=v[6],y=v[7]),(0,n.useEffect)(g,y),v[8]!==N||v[9]!==S?(f=(0,t.jsx)(l.Provider,{value:N,children:S}),v[8]=N,v[9]=S,v[10]=f):f=v[10],f}function u(e){return e.playback.status}function d(e){return e instanceof r.AudioListener}function m(e){return e.camera}function h(){let e=(0,n.useContext)(l);if(void 0===e)throw Error("useAudio must be used within AudioProvider");return e}e.s(["AudioProvider",()=>c,"useAudio",()=>h])},31999,e=>{"use strict";var t=e.i(71645);let s=(0,e.i(25645).createLogger)("ShapeErrorBoundary");class n extends t.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){s.error("Shape load failed: %s %s",e.message,t.componentStack)}render(){return this.state.hasError?this.props.fallback:this.props.children}}e.s(["ShapeErrorBoundary",()=>n])},77964,e=>{"use strict";function t(e){switch(e.renderType){case"TerrainBlock":case"InteriorInstance":case"Sky":case"Sun":case"WaterBlock":case"MissionArea":return!0;default:return!1}}e.s(["isSceneEntity",()=>t])},60946,e=>{e.v(t=>Promise.all(["static/chunks/4fb9edf01fb5e4f5.js"].map(t=>e.l(t))).then(()=>t(0)))},30814,e=>{e.v(t=>Promise.all(["static/chunks/41fb9d5ac0e14608.js"].map(t=>e.l(t))).then(()=>t(9721)))},44325,e=>{e.v(t=>Promise.all(["static/chunks/c5f946098461b297.js"].map(t=>e.l(t))).then(()=>t(66789)))},62125,e=>{e.v(t=>Promise.all(["static/chunks/6c0bdfaab43cc40b.js"].map(t=>e.l(t))).then(()=>t(64972)))},25147,e=>{e.v(t=>Promise.all(["static/chunks/2c772d15a5a10e4d.js"].map(t=>e.l(t))).then(()=>t(63724)))},61921,e=>{e.v(t=>Promise.all(["static/chunks/538e72dc81951677.js"].map(t=>e.l(t))).then(()=>t(29055)))},18599,e=>{e.v(t=>Promise.all(["static/chunks/2070573ac43e863c.js"].map(t=>e.l(t))).then(()=>t(42585)))},34019,e=>{e.v(t=>Promise.all(["static/chunks/967c4aa315f919d7.js"].map(t=>e.l(t))).then(()=>t(66069)))},553,e=>{e.v(t=>Promise.all(["static/chunks/66f953934e42712b.css","static/chunks/e27b13e203064a85.js"].map(t=>e.l(t))).then(()=>t(18339)))},33487,e=>{e.v(t=>Promise.all(["static/chunks/9ffe862a9787606f.css","static/chunks/302e494fb721f5e6.js"].map(t=>e.l(t))).then(()=>t(40378)))},25483,e=>{e.v(t=>Promise.all(["static/chunks/41fb9d5ac0e14608.js","static/chunks/419d6e651fe3d509.js"].map(t=>e.l(t))).then(()=>t(51295)))},93884,e=>{e.v(t=>Promise.all(["static/chunks/1db3a9d62713e989.css","static/chunks/3770acf7d1a6ba0a.js"].map(t=>e.l(t))).then(()=>t(94737)))},88487,e=>{e.v(t=>Promise.all(["static/chunks/005e475439c5cb3e.js","static/chunks/3ec6b524f05ae0b6.css"].map(t=>e.l(t))).then(()=>t(86855)))},21683,e=>{e.v(t=>Promise.all(["static/chunks/4c292ca57f1d49be.js"].map(t=>e.l(t))).then(()=>t(91285)))},38496,e=>{e.v(t=>Promise.all(["static/chunks/fd10b9633e3b5488.js"].map(t=>e.l(t))).then(()=>t(9962)))},57567,e=>{e.v(t=>Promise.all(["static/chunks/dbc95e0f1d663220.css","static/chunks/4e0d5bbc5104adf2.js"].map(t=>e.l(t))).then(()=>t(49776)))},59197,e=>{e.v(t=>Promise.all(["static/chunks/7317a925124598e3.css","static/chunks/7dcb40c178014bc9.js"].map(t=>e.l(t))).then(()=>t(94247)))},70012,e=>{e.v(t=>Promise.all(["static/chunks/7317a925124598e3.css","static/chunks/0070446447a9983b.js"].map(t=>e.l(t))).then(()=>t(45554)))}]);
\ No newline at end of file
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,66027,e=>{"use strict";var t=e.i(69230),s=e.i(69637);function n(e,n){return(0,s.useBaseQuery)(e,t.QueryObserver,n)}e.s(["useQuery",()=>n])},9672,e=>{"use strict";function t(e,t){return e[t.toLowerCase()]}function s(e,s){let n=t(e,s);if(null==n)return;let i=parseFloat(n);return Number.isFinite(i)?i:void 0}function n(e,s){let n=t(e,s);if(null==n)return;let i=parseInt(n,10);return Number.isFinite(i)?i:void 0}function i(e,t={x:0,y:0,z:0}){if(!e)return t;let s=e.split(" ").map(Number);return{x:s[0]??t.x,y:s[1]??t.y,z:s[2]??t.z}}function r(e,t={r:0,g:0,b:0}){if(!e)return t;let s=e.split(" ").map(Number);return{r:s[0]??t.r,g:s[1]??t.g,b:s[2]??t.b}}function a(e,t={r:.5,g:.5,b:.5,a:1}){if(!e)return t;let s=e.split(" ").map(Number);return{r:s[0]??t.r,g:s[1]??t.g,b:s[2]??t.b,a:s[3]??t.a}}function o(e,t){let s=i(e),n=(t??"1 0 0 0").split(" ").map(Number),r=n[0]??1,a=n[1]??0,o=n[2]??0,l=Math.PI/180*(n[3]??0),c=Math.sqrt(r*r+a*a+o*o),u=0,d=0,m=1;c>1e-8&&(u=r/c,d=a/c,m=o/c);let h=Math.cos(l),p=Math.sin(l),g=1-h,y=Array(16).fill(0);return y[0]=g*u*u+h,y[1]=g*u*d+p*m,y[2]=g*u*m-p*d,y[4]=g*u*d-p*m,y[5]=g*d*d+h,y[6]=g*d*m+p*u,y[8]=g*u*m+p*d,y[9]=g*d*m-p*u,y[10]=g*m*m+h,y[12]=s.x,y[13]=s.y,y[14]=s.z,y[15]=1,{elements:y,position:s}}function l(e){return{className:"TerrainBlock",ghostIndex:e._id,terrFileName:t(e,"terrainFile")??"",detailTextureName:t(e,"detailTexture")??"",squareSize:n(e,"squareSize")??8,emptySquareRuns:function(e){if(!e)return;let t=e.split(/\s+/).map(Number).filter(Number.isFinite);return t.length>0?t:void 0}(t(e,"emptySquares"))}}function c(e){return{className:"InteriorInstance",ghostIndex:e._id,interiorFile:t(e,"interiorFile")??"",transform:o(t(e,"position"),t(e,"rotation")),scale:i(t(e,"scale"),{x:1,y:1,z:1}),showTerrainInside:"1"===t(e,"showTerrainInside"),skinBase:t(e,"skinBase")??"",alarmState:!1}}function u(e){let a=[];for(let s=1;s<=3;s++){let n=function(e){if(!e)return null;let t=e.split(/\s+/).map(Number),s=t[0]??0,n=t[1]??0,i=t[2]??0;return 0===s&&0===n&&0===i?null:{visibleDistance:s,minHeight:n,maxHeight:i,color:{r:.5,g:.5,b:.5}}}(t(e,`fogVolume${s}`));n&&a.push(n)}let o=[];for(let n=0;n<3;n++){let i=t(e,`cloudText${n+1}`)??"",r=s(e,`cloudHeightPer[${n}]`)??s(e,`cloudheightper${n}`)??[.35,.25,.2][n],a=s(e,`cloudSpeed${n+1}`)??[1e-4,2e-4,3e-4][n];o.push({texture:i,heightPercent:r,speed:a})}return{className:"Sky",ghostIndex:e._id,materialList:t(e,"materialList")??"",fogColor:r(t(e,"fogColor")),visibleDistance:s(e,"visibleDistance")??1e3,fogDistance:s(e,"fogDistance")??0,skySolidColor:r(t(e,"SkySolidColor")),useSkyTextures:(n(e,"useSkyTextures")??1)!==0,fogVolumes:a,cloudLayers:o,windVelocity:i(t(e,"windVelocity"))}}function d(e){return{className:"Sun",ghostIndex:e._id,direction:i(t(e,"direction"),{x:.57735,y:.57735,z:-.57735}),color:a(t(e,"color"),{r:.7,g:.7,b:.7,a:1}),ambient:a(t(e,"ambient"),{r:.5,g:.5,b:.5,a:1})}}function m(e){let n=t(e,"area"),i={x:-512,y:-512,w:1024,h:1024};if(n){let e=n.split(/\s+/).map(Number);i={x:e[0]??i.x,y:e[1]??i.y,w:e[2]??i.w,h:e[3]??i.h}}return{className:"MissionArea",ghostIndex:e._id,area:i,flightCeiling:s(e,"flightCeiling")??2e3,flightCeilingRange:s(e,"flightCeilingRange")??50}}function h(e){return{className:"WaterBlock",ghostIndex:e._id,transform:o(t(e,"position"),t(e,"rotation")),scale:i(t(e,"scale"),{x:1,y:1,z:1}),surfaceName:t(e,"surfaceTexture")??"",envMapName:t(e,"envMapTexture")??"",surfaceOpacity:s(e,"surfaceOpacity")??.75,waveMagnitude:s(e,"waveMagnitude")??1,envMapIntensity:s(e,"envMapIntensity")??1}}e.s(["interiorFromMis",()=>c,"missionAreaFromMis",()=>m,"skyFromMis",()=>u,"sunFromMis",()=>d,"terrainFromMis",()=>l,"waterBlockFromMis",()=>h])},70847,47566,63318,e=>{"use strict";let t=(0,e.i(25645).createLogger)("ghostToScene");function s(e,t={x:0,y:0,z:0}){return e&&"object"==typeof e&&"x"in e?e:t}function n(e,t={r:0,g:0,b:0}){return e&&"object"==typeof e&&"r"in e?e:t}function i(e,t={r:.5,g:.5,b:.5,a:1}){return e&&"object"==typeof e&&"r"in e?e:t}function r(e){if(e&&"object"==typeof e&&"elements"in e&&Array.isArray(e.elements))return e;if(e&&"object"==typeof e&&"position"in e&&"rotation"in e){let{position:t,rotation:s}=e,n=s.x*s.x,i=s.y*s.y,r=s.z*s.z,a=s.x*s.y,o=s.x*s.z,l=s.y*s.z,c=s.w*s.x,u=s.w*s.y,d=s.w*s.z;return{elements:[1-2*(i+r),2*(a+d),2*(o-u),0,2*(a-d),1-2*(n+r),2*(l+c),0,2*(o+u),2*(l-c),1-2*(n+i),0,t.x,t.y,t.z,1],position:{x:t.x,y:t.y,z:t.z}}}return{elements:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],position:{x:0,y:0,z:0}}}function a(e,a,o){let l;switch(e){case"TerrainBlock":return l={className:"TerrainBlock",ghostIndex:a,terrFileName:o.terrFileName??"",detailTextureName:o.detailTextureName??"",squareSize:o.squareSize??8,emptySquareRuns:o.emptySquareRuns},t.debug("TerrainBlock #%d: terrFileName=%s",a,l.terrFileName),l;case"InteriorInstance":return l={className:"InteriorInstance",ghostIndex:a,interiorFile:o.interiorFile??"",transform:r(o.transform),scale:s(o.scale,{x:1,y:1,z:1}),showTerrainInside:o.showTerrainInside??!1,skinBase:o.skinBase??"",alarmState:o.alarmState??!1},t.debug("InteriorInstance #%d: interiorFile=%s",a,l.interiorFile),l;case"TSStatic":return{className:"TSStatic",ghostIndex:a,shapeName:o.shapeName??"",transform:r(o.transform),scale:s(o.scale,{x:1,y:1,z:1})};case"Sky":{let e,i;e=Array.isArray(o.fogVolumes)?o.fogVolumes.map(e=>({visibleDistance:e.visibleDistance??0,minHeight:e.minHeight??0,maxHeight:e.maxHeight??0,color:n(e.color)})):[],i=Array.isArray(o.cloudLayers)?o.cloudLayers.map(e=>({texture:e.texture??"",heightPercent:e.heightPercent??0,speed:e.speed??0})):[];let r=l={className:"Sky",ghostIndex:a,materialList:o.materialList??"",fogColor:n(o.fogColor),visibleDistance:o.visibleDistance??1e3,fogDistance:o.fogDistance??0,skySolidColor:n(o.skySolidColor),useSkyTextures:o.useSkyTextures??!0,fogVolumes:e,cloudLayers:i,windVelocity:s(o.windVelocity)};return t.debug("Sky #%d: materialList=%s fogColor=(%s, %s, %s) visibleDist=%d fogDist=%d useSkyTextures=%s",a,r.materialList,r.fogColor.r.toFixed(3),r.fogColor.g.toFixed(3),r.fogColor.b.toFixed(3),r.visibleDistance,r.fogDistance,r.useSkyTextures),l}case"Sun":{let e=l={className:"Sun",ghostIndex:a,direction:s(o.direction,{x:.57735,y:.57735,z:-.57735}),color:i(o.color,{r:.7,g:.7,b:.7,a:1}),ambient:i(o.ambient,{r:.5,g:.5,b:.5,a:1}),textures:Array.isArray(o.textures)?o.textures:void 0};return t.debug("Sun #%d: dir=(%s, %s, %s) color=(%s, %s, %s) ambient=(%s, %s, %s)",a,e.direction.x.toFixed(3),e.direction.y.toFixed(3),e.direction.z.toFixed(3),e.color.r.toFixed(3),e.color.g.toFixed(3),e.color.b.toFixed(3),e.ambient.r.toFixed(3),e.ambient.g.toFixed(3),e.ambient.b.toFixed(3)),l}case"MissionArea":return{className:"MissionArea",ghostIndex:a,area:o.area??{x:-512,y:-512,w:1024,h:1024},flightCeiling:o.flightCeiling??2e3,flightCeilingRange:o.flightCeilingRange??50};case"WaterBlock":return{className:"WaterBlock",ghostIndex:a,transform:r(o.transform),scale:s(o.scale,{x:1,y:1,z:1}),surfaceName:o.surfaceName??"",envMapName:o.envMapName??"",surfaceOpacity:o.surfaceOpacity??.75,waveMagnitude:o.waveMagnitude??1,envMapIntensity:o.envMapIntensity??1};default:return null}}e.s(["ghostToSceneObject",()=>a],47566),e.i(9672);var o=e.i(90072);function l(e){return[e.y,e.z,e.x]}function c(e){return[e.y,e.z,e.x]}function u(e){let t=e.elements,s=new o.Matrix4,n=s.elements;n[0]=t[5],n[1]=t[6],n[2]=t[4],n[3]=0,n[4]=t[9],n[5]=t[10],n[6]=t[8],n[7]=0,n[8]=t[1],n[9]=t[2],n[10]=t[0],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1;let i=new o.Quaternion;return i.setFromRotationMatrix(s),i.conjugate(),i}e.s(["matrixFToQuaternion",()=>u,"torqueScaleToThree",()=>c,"torqueToThree",()=>l],63318),e.s([],70847)},92224,e=>{"use strict";e.i(932);var t=e.i(8155),s=e.i(66748),n=e.i(62395);let i=(0,t.createStore)()(e=>({missionEntities:new Map,streamEntities:new Map,isStreaming:!1,dataSource:null,missionName:null,missionType:null,missionTypeDisplayName:null,missionDisplayName:null,gameClassName:null,serverDisplayName:null,recorderName:null,recordingDate:null,version:0,setEntity(t){e(e=>{let s=new Map(e.missionEntities);return s.set(t.id,t),{missionEntities:s,version:e.version+1}})},deleteEntity(t){e(e=>{if(!e.missionEntities.has(t))return e;let s=new Map(e.missionEntities);return s.delete(t),{missionEntities:s,version:e.version+1}})},setEntities(t){e(e=>{let s=new Map(e.missionEntities);for(let e of t)s.set(e.id,e);return{missionEntities:s,version:e.version+1}})},setAllEntities(t){e(e=>{let s=new Map;for(let e of t)s.set(e.id,e);return{missionEntities:s,dataSource:e.isStreaming?e.dataSource:"map"}})},clearEntities(){e(e=>0===e.missionEntities.size?e:e.isStreaming?{missionEntities:new Map,version:e.version+1}:{missionEntities:new Map,dataSource:null,missionName:null,missionType:null,missionTypeDisplayName:null,missionDisplayName:null,gameClassName:null,serverDisplayName:null,recorderName:null,recordingDate:null,version:e.version+1})},setMissionInfo(t){let s={};if(void 0!==t.missionName&&(s.missionName=t.missionName),void 0!==t.missionType&&(s.missionType=t.missionType),void 0!==t.missionTypeDisplayName&&(s.missionTypeDisplayName=t.missionTypeDisplayName),void 0!==t.missionDisplayName&&(s.missionDisplayName=t.missionDisplayName),void 0!==t.gameClassName&&(s.gameClassName=t.gameClassName,void 0===t.missionType))if(t.gameClassName){let e=t.gameClassName.replace(/Game$/i,"");s.missionType=n.normalizedMissionTypes[e.toLowerCase()]??e}else s.missionType=null;void 0!==t.serverDisplayName&&(s.serverDisplayName=t.serverDisplayName),void 0!==t.recorderName&&(s.recorderName=t.recorderName),void 0!==t.recordingDate&&(s.recordingDate=t.recordingDate),e(e=>({...s,version:e.version+1}))},beginStreaming(t){e(e=>({isStreaming:!0,dataSource:t,streamEntities:new Map,missionName:null,missionType:null,missionTypeDisplayName:null,missionDisplayName:null,gameClassName:null,serverDisplayName:null,recorderName:null,recordingDate:null,version:e.version+1}))},endStreaming(){e(e=>e.isStreaming?{isStreaming:!1,dataSource:e.missionEntities.size>0?"map":null,missionName:null,missionType:null,missionTypeDisplayName:null,missionDisplayName:null,gameClassName:null,serverDisplayName:null,recorderName:null,recordingDate:null,streamEntities:new Map,version:e.version+1}:e)},setStreamEntity(t){e(e=>{let s=new Map(e.streamEntities);return s.set(t.id,t),{streamEntities:s,version:e.version+1}})},deleteStreamEntity(t){e(e=>{if(!e.streamEntities.has(t))return e;let s=new Map(e.streamEntities);return s.delete(t),{streamEntities:s,version:e.version+1}})},setStreamEntities(t){e(e=>{let s=new Map(e.streamEntities);for(let e of t)s.set(e.id,e);return{streamEntities:s,version:e.version+1}})},setAllStreamEntities(t){e(e=>{let s=new Map;for(let e of t)s.set(e.id,e);let n=e.streamEntities;return s.size===n.size&&[...s.keys()].every(e=>n.has(e))?e:{streamEntities:s,version:e.version+1}})},clearStreamEntities(){e(e=>0===e.streamEntities.size?e:{streamEntities:new Map,version:e.version+1})}}));function r(e){let t=e.isStreaming?e.streamEntities:e.missionEntities,s=[];for(let e of t.values())"None"!==e.renderType&&s.push(e);return s}function a(e,t){if(e.length!==t.length)return!1;for(let s=0;so,"useDataSource",()=>m,"useMissionDisplayName",()=>k,"useMissionName",()=>p,"useMissionType",()=>y,"useMissionTypeDisplayName",()=>v,"useRecorderName",()=>E,"useRecordingDate",()=>x,"useSceneSky",()=>u,"useSceneSun",()=>d,"useServerDisplayName",()=>N])},98755,e=>{"use strict";e.i(47167);var t=e.i(8155),s=e.i(66748),n=e.i(25645);let i=(0,n.createLogger)("relayClient");class r{ws=null;handlers;url;_connected=!1;wsPingInterval=null;smoothedWsPing=0;constructor(e,t){this.url=e,this.handlers=t}get connected(){return this._connected}connect(){this.ws=new WebSocket(this.url),this.ws.binaryType="arraybuffer",this.ws.onopen=()=>{i.info("WebSocket connected to %s",this.url),this._connected=!0,this.startWsPing(),this.handlers.onOpen?.()},this.ws.onmessage=e=>{if(e.data instanceof ArrayBuffer)this.handlers.onGamePacket?.(new Uint8Array(e.data));else try{let t=JSON.parse(e.data);this.handleMessage(t)}catch(e){i.error("Failed to parse relay message: %o",e)}},this.ws.onclose=()=>{i.info("WebSocket disconnected"),this._connected=!1,this.stopWsPing(),this.handlers.onClose?.()},this.ws.onerror=()=>{i.error("WebSocket error"),this.handlers.onError?.("WebSocket connection error")}}handleMessage(e){switch(e.type){case"serverList":this.handlers.onServerList?.(e.servers);break;case"status":this.handlers.onStatus?.(e.status,e.message,e.connectSequence,e.mapName);break;case"ping":this.handlers.onPing?.(e.ms);break;case"wsPong":{let t=Date.now()-e.ts;this.smoothedWsPing=0===this.smoothedWsPing?t:.5*this.smoothedWsPing+.5*t,this.handlers.onWsPing?.(Math.round(this.smoothedWsPing));break}case"error":this.handlers.onError?.(e.message)}}listServers(){this.send({type:"listServers"})}sendWsPing(){this.send({type:"wsPing",ts:Date.now()})}joinServer(e,t){i.info("Joining server: %s",e),this.send({type:"joinServer",address:e,warriorName:t})}disconnectServer(){this.send({type:"disconnect"})}sendAuthEvent(e,t){this.send({type:"sendCommand",command:e,args:t})}sendCommand(e,t){this.send({type:"sendCommand",command:e,args:t})}sendCRCResponse(e,t,s){this.send({type:"sendCRCResponse",crcValue:e,field1:t,field2:s})}sendCRCCompute(e,t,s,n){this.send({type:"sendCRCCompute",seed:e,field2:t,includeTextures:n,datablocks:s})}sendGhostAck(e,t){this.send({type:"sendGhostAck",sequence:e,ghostCount:t})}sendMoves(e,t){this.send({type:"sendMoves",moves:e,moveStartIndex:t})}close(){this.stopWsPing(),this.ws&&(this.ws.close(),this.ws=null),this._connected=!1}startWsPing(){this.smoothedWsPing=0,this.send({type:"wsPing",ts:Date.now()}),this.wsPingInterval=setInterval(()=>{this.send({type:"wsPing",ts:Date.now()})},7e3)}stopWsPing(){null!=this.wsPingInterval&&(clearInterval(this.wsPingInterval),this.wsPingInterval=null)}send(e){this.ws?.readyState===WebSocket.OPEN?this.ws.send(JSON.stringify(e)):i.warn("send dropped (ws not open): %s",e.type)}}e.i(50593);var a=e.i(45853),o=e.i(89119),l=e.i(10244);let c=(0,n.createLogger)("liveStreaming");class u extends l.StreamEngine{packetParser;relay;currentTimeSec=0;connectSynced=!1;_snapshot=null;_snapshotTick=-1;_ready=!1;dataBlockClassNames=new Map;onReady;onMissionChange;missionName=null;lastMoveAck=0;constructor(e){super(),this.relay=e;const{registry:t,ghostTracker:s,packetParser:n}=(0,a.createLiveParser)();this.packetParser=n,this.ghostTracker=s,this.registry=t}getDataBlockData(e){return this.packetParser.getDataBlockDataMap()?.get(e)}_shapeConstructorCache=null;getShapeConstructorSequences(e){this._shapeConstructorCache=new Map;let t=this.packetParser.getDataBlockDataMap();if(t){for(let[,e]of t){let t=e.shape,s=e.sequences;t&&s&&this._shapeConstructorCache.set(t.toLowerCase(),s)}return this._shapeConstructorCache.get(e.toLowerCase())}}getTimeSec(){return this.currentTimeSec}getCameraYawPitch(e){return this.getAbsoluteRotation(e)??{yaw:0,pitch:0}}getEffectShapes(){let e=new Set,t=this.packetParser.getDataBlockDataMap();if(!t)return[];for(let[,s]of t){let n=s.explosion;if(null==n)continue;let i=t.get(n);i?.dtsFileName&&e.add(i.dtsFileName)}return[...e]}reset(){this.resetSharedState(),this.ghostTracker.clear?.(),this.currentTimeSec=0,this._snapshot=null,this._snapshotTick=-1,this.dataBlockClassNames.clear(),this.observerMode="fly",this.missionName=null}getSnapshot(){return this._snapshot&&this._snapshotTick===this.tickCount?this._snapshot:this.buildSnapshot()}stepToTime(e,t){return this.currentTimeSec=e,this.getSnapshot()}syncConnectSequence(e){if(this.connectSynced||e.length<1)return;this.connectSynced=!0;let t=e[0]>>1&1;this.packetParser.setConnectionProtocolState({lastSeqRecvdAtSend:Array(32).fill(0),lastSeqRecvd:0,highestAckedSeq:0,lastSendSeq:0x1fffffff,ackMask:0,connectSequence:t,lastRecvAckAck:0,connectionEstablished:!0})}feedPacket(e){this.syncConnectSequence(e),this.processPacket(e)}handleRelayCommands(e){if("RemoteCommandEvent"!==e.type)return;let t=e.funcName;if(!t)return;let s=this.resolveNetString(t);if(["t2csri_pokeClient","t2csri_getChallengeChunk","t2csri_decryptChallenge"].includes(s)){let t=(e.args??[]).map(e=>this.resolveNetString(e)).filter(e=>""!==e);c.info("auth event: %s %o",s,t),this.relay.sendAuthEvent(s,t);return}let n=(e.args??[]).map(e=>this.resolveNetString(e));if("MissionStartPhase1"===s){let e=n[0]??"",t=n[1]??null;c.info("mission phase 1, seq=%s mission=%s resolvedArgs=%o",e,t,n),t&&t!==this.missionName&&(this.missionName=t,this.entities.clear(),this.entityIdByGhostIndex.clear(),this._ready=!1,this._snapshot=null,this._snapshotTick=-1,this.missionDisplayName=null,this.missionTypeDisplayName=null,this.gameClassName=null,this.serverDisplayName=null,this.onMissionChange?.(t)),this.relay.sendCommand("MissionStartPhase1Done",[e])}else if("MissionStartPhase2"===s){let e=n[0]??"";c.info("mission phase 2 (datablocks), seq=%s",e),this.relay.sendCommand("MissionStartPhase2Done",[e])}else if("MissionStartPhase3"===s){let e=n[0]??"",t=n[1]??null;c.info("mission phase 3 (ghosting), seq=%s mission=%s",e,t),t&&(this.missionName=t),this.relay.sendCommand("setClientFav",[""]),this.relay.sendCommand("MissionStartPhase3Done",[e])}}handleCRCChallenge(e){if("CRCChallengeEvent"!==e.type)return;let t=e.crcValue,s=e.field1,n=e.field2,i=(1&s)!=0;c.info("CRC challenge: seed=0x%s f1=0x%s f2=0x%s includeTextures=%s",(t>>>0).toString(16),(s>>>0).toString(16),(n>>>0).toString(16),i);let r=this.packetParser.getDataBlockDataMap(),a=[];if(r)for(let[e,t]of r){let s=this.dataBlockClassNames.get(e);if(!s)continue;let n=(0,o.resolveShapeName)(s,t);a.push({objectId:e,className:s,shapeName:n??""})}c.info("CRC: sending %d datablocks for computation",a.length),this.relay.sendCRCCompute(t,n,a,i)}handleGhostingMessage(e){if("GhostingMessageEvent"!==e.type)return;let t=e.message,s=e.sequence,n=e.ghostCount;c.info("GhostingMessageEvent: message=%d sequence=%d ghostCount=%d",t,s,n),0===t&&(c.info("Sending ghost ack (type 1) for sequence %d",s),this.relay.sendGhostAck(s,n))}observerMode="fly";toggleObserverMode(){"fly"===this.observerMode?(c.info("observer: fly → follow"),this.observerMode="follow"):(c.info("observer: follow → fly"),this.observerMode="fly")}getPlayerList(){let e=[];for(let[t,s]of this.targetNames){let n=this.targetTeams.get(t)??0;e.push({targetId:t,name:s,sensorGroup:n})}return e}processPacket(e){try{let t=this.packetParser.protocolRejected,s=this.packetParser.protocolNoDispatch,n=this.packetParser.parsePacket(e),i=this.packetParser.protocolRejected>t,r=this.packetParser.protocolNoDispatch>s;(i||r)&&c.warn("packet #%d %s: %d bytes (total rejected=%d, noDispatch=%d)",this.tickCount,i?"REJECTED":"no-dispatch",e.length,this.packetParser.protocolRejected,this.packetParser.protocolNoDispatch);let a=this.tickCount<20,l=this.tickCount%100==0,u=a||l;for(let t of(u&&c.debug("packet #%d: %d events, %d ghosts, %d bytes%s%s",this.tickCount,n.events.length,n.ghosts.length,e.length,void 0!==n.gameState.controlObjectGhostIndex?`, control=${n.gameState.controlObjectGhostIndex}`:"",void 0!==n.gameState.cameraFov?`, fov=${n.gameState.cameraFov}`:""),this.lastMoveAck=n.gameState.lastMoveAck,this.processControlObject(n.gameState),n.events))if(t.parsedData){this.handleRelayCommands(t.parsedData),this.handleCRCChallenge(t.parsedData),this.handleGhostingMessage(t.parsedData);let e=t.parsedData.type;if("RemoteCommandEvent"===e){let e=this.resolveNetString(t.parsedData.funcName??"");c.debug("remote: %s",e)}if(a&&"NetStringEvent"!==e&&"RemoteCommandEvent"!==e&&c.debug("event: %s%s",e,"SimDataBlockEvent"===e?` id=${t.parsedData.objectId} class=${t.parsedData.dataBlockClassName}`:""),"SimDataBlockEvent"===e){let e=t.parsedData.objectId,s=t.parsedData.dataBlockClassName;if(null!=e&&s&&this.dataBlockClassNames.set(e,s),u){let n=t.parsedData.dataBlockData,i=(0,o.resolveShapeName)(s??"",n);c.debug("datablock: id=%d class=%s%s",e,s??"?",i?` shape=${i}`:"")}}let s=this.registry.getEventParser(t.classId)?.name;if(this.processEvent(t,s),a&&"NetStringEvent"===e){let e=t.parsedData.id,s=t.parsedData.value;null!=e&&"string"==typeof s&&c.trace('netString #%d = "%s"',e,s.length>60?s.slice(0,60)+"…":s)}if("TargetInfoEvent"===e){let e=t.parsedData.targetId,s=t.parsedData.nameTag;if(null!=e&&null!=s){let n=this.netStrings.get(s);if(n){let s=(0,o.stripTaggedStringMarkup)(n);c.info('target #%d: "%s" team=%s',e,s,t.parsedData.sensorGroup??"?")}}}if("SetSensorGroupEvent"===e){let e=t.parsedData.sensorGroup;null!=e&&c.info("sensor group changed: → %d",e)}if("SensorGroupColorEvent"===e){let e=t.parsedData.sensorGroup,s=t.parsedData.colors;s&&c.debug("sensor group colors: group=%d, %d entries",e,s.length)}}for(let e of n.ghosts){if("create"===e.type){let t=e.parsedData?.position,s=t&&"number"==typeof t.x&&"number"==typeof t.y&&"number"==typeof t.z,n=this.resolveGhostClassName(e.index,e.classId);c.debug("ghost create: #%d %s%s (%d entities total)",e.index,n??"?",s?` at (${t.x.toFixed(1)}, ${t.y.toFixed(1)}, ${t.z.toFixed(1)})`:"",this.entities.size+1),this._ready||(this._ready=!0,this.onReady?.())}else if("delete"===e.type){let t=this.entityIdByGhostIndex.get(e.index),s=t?this.entities.get(t):void 0;(this.tickCount<50||this.tickCount%200==0)&&c.debug("ghost delete: #%d %s (%d entities remaining)",e.index,s?.className??"?",this.entities.size-1)}this.processGhostUpdate(e)}if(this.tickCount++,this.advanceProjectiles(),this.advanceItems(),l&&this.tickCount>1){let e=this.packetParser.getDataBlockDataMap();c.info("status @ tick %d: %d entities, %d datablocks, rejected=%d, noDispatch=%d",this.tickCount,this.entities.size,e?.size??0,this.packetParser.protocolRejected,this.packetParser.protocolNoDispatch)}let d=this.entities.size;if(1===this.tickCount||d>0&&d%25==0&&this.tickCount<100){let e=new Map;for(let t of this.entities.values())e.set(t.type,(e.get(t.type)??0)+1);let t=[...e.entries()].map(([e,t])=>`${e}=${t}`).join(" ");c.info("entity count: %d (%s)",d,t)}let m=this.camera?.mode;if(this.updateCameraAndHud(),this.camera&&this.camera.mode!==m&&c.info("camera mode: %s → %s%s",m??"none",this.camera.mode,"third-person"===this.camera.mode?` orbit=${this.camera.orbitTargetId??"?"} dist=${this.camera.orbitDistance??"?"}`:""),this.tickCount<=5&&this.camera){let[e,t,s]=this.camera.position;c.debug("camera: mode=%s pos=(%s, %s, %s) fov=%s",this.camera.mode,e.toFixed(1),t.toFixed(1),s.toFixed(1),this.camera.fov)}}catch(s){let t={tickCount:this.tickCount,entityCount:this.entities.size,dataLength:e.length,controlGhost:this.latestControl.ghostIndex,connectSynced:this.connectSynced};c.error("Failed to process live packet: %o %o",s,t)}}buildSnapshot(){let e=this.buildEntityList(),t=this.currentTimeSec,{chatMessages:s,audioEvents:n}=this.buildTimeFilteredEvents(t),{weaponsHud:i,inventoryHud:r,backpackHud:a,teamScores:o}=this.buildHudState();this.camera||(this.camera={time:t,position:[0,0,200],rotation:[0,0,0,1],fov:90,mode:"observer"});let l={timeSec:t,exhausted:!1,camera:this.camera,entities:e,controlPlayerGhostId:this.controlPlayerGhostId,playerSensorGroup:this.playerSensorGroup,status:this.lastStatus,chatMessages:s,audioEvents:n,weaponsHud:i,backpackHud:a,inventoryHud:r,teamScores:o};return this._snapshot=l,this._snapshotTick=this.tickCount,l}}var d=e.i(92224);let m=(0,n.createLogger)("liveConnectionStore"),h="wss://t2-relay.fly.dev",p=(0,t.createStore)((e,t)=>({relayConnected:!1,gameStatus:null,gameStatusMessage:void 0,mapName:void 0,serverName:void 0,relayToGameServerPing:null,browserToRelayPing:null,servers:[],serversLoading:!1,adapter:null,liveReady:!1,_relay:null,_adapter:null,_pending:[],_listInFlight:!1,connectRelay(s=h){let n=t();n._relay&&n._relay.close();let i=new r(s,{onOpen(){e({relayConnected:!0});let s=t();for(let e of s._pending)e();s._pending=[]},onStatus(t,s,n,i){m.info("game status: %s%s%s",t,s?` — ${s}`:"",i?` map=${i}`:""),e({gameStatus:t,gameStatusMessage:s,...i?{mapName:i}:{}})},onServerList(s){t()._listInFlight=!1,e({servers:s,serversLoading:!1})},onGamePacket(e){let s=t()._adapter;s||m.warn("received game packet but no adapter is active"),s?.feedPacket(e)},onPing(t){e({relayToGameServerPing:t})},onWsPing(t){e({browserToRelayPing:t})},onError(s){m.error("error: %s",s),t()._listInFlight=!1,e({serversLoading:!1})},onClose(){let s=t();s._relay===i&&(s._relay=null,s._adapter=null,s._pending=[],s._listInFlight=!1,e({relayConnected:!1,gameStatus:null,gameStatusMessage:void 0,mapName:void 0,serverName:void 0,relayToGameServerPing:null,browserToRelayPing:null,adapter:null,liveReady:!1}))}});i.connect(),t()._relay=i},disconnectRelay(){let s=t();s._relay?.close(),s._relay=null,s._adapter=null,s._pending=[],s._listInFlight=!1,e({relayConnected:!1,gameStatus:null,gameStatusMessage:void 0,mapName:void 0,serverName:void 0,relayToGameServerPing:null,browserToRelayPing:null,adapter:null,liveReady:!1})},listServers(){let s=t();if(s._listInFlight)return;s._listInFlight=!0;let n=()=>{let e=t();e._relay?.sendWsPing(),e._relay?.listServers()};e({serversLoading:!0}),s._relay?.connected?n():(s._pending.push(n),s._relay||t().connectRelay())},joinServer(s,n){let i=t();if(!i._relay)return;let r=i.servers.find(e=>e.address===s),a=new u(i._relay);a.onReady=()=>e({liveReady:!0}),a.onMissionChange=t=>{m.info("mission changed: %s",t),e({mapName:t,liveReady:!1}),d.gameEntityStore.getState().setMissionInfo({missionName:t,missionType:null,missionTypeDisplayName:null,missionDisplayName:null,gameClassName:null})},a.onMissionInfoChange=()=>{d.gameEntityStore.getState().setMissionInfo({missionDisplayName:a.missionDisplayName??void 0,missionTypeDisplayName:a.missionTypeDisplayName??void 0,gameClassName:a.gameClassName??void 0,serverDisplayName:a.serverDisplayName??void 0,recorderName:a.connectedPlayerName??void 0})},i._adapter=a,e({mapName:r?.mapName??i.mapName,serverName:r?.name,warriorName:n,liveReady:!1,gameStatus:null,adapter:a}),d.gameEntityStore.getState().setMissionInfo({missionName:r?.mapName??void 0,missionTypeDisplayName:r?.gameType??void 0,serverDisplayName:r?.name??void 0,recorderName:n??void 0}),i._relay.joinServer(s,n)},disconnectServer(){let s=t();s._relay?.disconnectServer(),s._adapter=null,e({adapter:null,liveReady:!1,gameStatus:null,mapName:void 0,serverName:void 0,relayToGameServerPing:null})},sendMoves(e,s){t()._relay?.sendMoves(e,s)},sendCommand(e,...s){t()._relay?.sendCommand(e,s)}}));function g(e,t){return(0,s.useStoreWithEqualityFn)(p,e,t)}function y(e){return null!=e.relayToGameServerPing&&null!=e.browserToRelayPing?e.relayToGameServerPing+e.browserToRelayPing:e.relayToGameServerPing??null}e.s(["liveConnectionStore",0,p,"selectPing",()=>y,"useLiveSelector",()=>g],98755)},66093,e=>{"use strict";var t=e.i(43476),s=e.i(932),n=e.i(71645);let i=(0,n.createContext)(null);function r(){let e=(0,n.useContext)(i);if(!e)throw Error("No JoystickContext found. Did you forget to add a ?");return e}function a(e){let r,a,o,l,c,u,d=(0,s.c)(7),{children:m}=e;d[0]===Symbol.for("react.memo_cache_sentinel")?(r={angle:0,force:0},d[0]=r):r=d[0];let h=(0,n.useRef)(r);d[1]===Symbol.for("react.memo_cache_sentinel")?(a={angle:0,force:0},d[1]=a):a=d[1];let p=(0,n.useRef)(a);d[2]===Symbol.for("react.memo_cache_sentinel")?(o=e=>{let{angle:t,force:s}=e;null!=t&&(h.current.angle=t),null!=s&&(h.current.force=s)},d[2]=o):o=d[2];let g=o;d[3]===Symbol.for("react.memo_cache_sentinel")?(l=e=>{let{angle:t,force:s}=e;null!=t&&(p.current.angle=t),null!=s&&(p.current.force=s)},d[3]=l):l=d[3];let y=l;d[4]===Symbol.for("react.memo_cache_sentinel")?(c={moveState:h,lookState:p,setMoveState:g,setLookState:y},d[4]=c):c=d[4];let f=c;return d[5]!==m?(u=(0,t.jsx)(i,{value:f,children:m}),d[5]=m,d[6]=u):u=d[6],u}e.s(["JoystickProvider",()=>a,"useJoystick",()=>r])},65349,e=>{"use strict";var t=e.i(71645);let s=(0,t.createContext)(null);function n(){let e=(0,t.useContext)(s);if(!e)throw Error("useInputContext must be used within an InputProvider");return e}function i(){return n().onInput}e.s(["InputContext",0,s,"useInputContext",()=>n,"useOnInput",()=>i])},32865,e=>{"use strict";var t=e.i(43476),s=e.i(932),n=e.i(58647);function i(e){let n,i=(0,s.c)(2),{children:r}=e;return i[0]!==r?(n=(0,t.jsx)(t.Fragment,{children:r}),i[0]=r,i[1]=n):n=i[1],n}function r(){return(0,n.useEngineSelector)(a)}function a(e){return e.playback.recording}function o(){return(0,n.useEngineSelector)(l)}function l(e){return"playing"===e.playback.status}function c(){return(0,n.useEngineSelector)(u)}function u(e){return e.playback.timeMs/1e3}function d(){return(0,n.useEngineSelector)(m)}function m(e){return e.playback.durationMs/1e3}function h(){return(0,n.useEngineSelector)(p)}function p(e){return e.playback.rate}function g(){let e,t,i,a,o,l,c=(0,s.c)(17),u=r(),d=(0,n.useEngineSelector)(S),m=(0,n.useEngineSelector)(v),h=(0,n.useEngineSelector)(f),p=(0,n.useEngineSelector)(y);c[0]!==d?(e=e=>{d(e)},c[0]=d,c[1]=e):e=c[1];let g=e;c[2]!==u||c[3]!==m?(t=()=>{u&&m("playing")},c[2]=u,c[3]=m,c[4]=t):t=c[4];let k=t;c[5]!==m?(i=()=>{m("paused")},c[5]=m,c[6]=i):i=c[6];let b=i;c[7]!==h?(a=e=>{h(1e3*e)},c[7]=h,c[8]=a):a=c[8];let N=a;c[9]!==p?(o=e=>{p(e)},c[9]=p,c[10]=o):o=c[10];let C=o;return c[11]!==b||c[12]!==k||c[13]!==N||c[14]!==g||c[15]!==C?(l={setRecording:g,play:k,pause:b,seek:N,setSpeed:C},c[11]=b,c[12]=k,c[13]=N,c[14]=g,c[15]=C,c[16]=l):l=c[16],l}function y(e){return e.setPlaybackRate}function f(e){return e.setPlaybackTime}function v(e){return e.setPlaybackStatus}function S(e){return e.setRecording}e.s(["RecordingProvider",()=>i,"useCurrentTime",()=>c,"useDuration",()=>d,"useIsPlaying",()=>o,"usePlaybackActions",()=>g,"useRecording",()=>r,"useSpeed",()=>h])},12631,e=>{"use strict";var t=e.i(71645),s=e.i(8155);let n=e=>{let n=(0,s.createStore)(e),i=e=>(function(e,s=e=>e){let n=t.default.useSyncExternalStore(e.subscribe,t.default.useCallback(()=>s(e.getState()),[e,s]),t.default.useCallback(()=>s(e.getInitialState()),[e,s]));return t.default.useDebugValue(n),n})(n,e);return Object.assign(i,n),i};var i=e.i(79473);let r=t.createContext(null);function a({map:e,children:s,onChange:a,domElement:o}){let l=e.map(e=>e.name+e.keys).join("-"),c=t.useMemo(()=>{let t;return(t=(0,i.subscribeWithSelector)(()=>e.reduce((e,t)=>({...e,[t.name]:!1}),{})))?n(t):n},[l]),u=t.useMemo(()=>[c.subscribe,c.getState,c],[l]),d=c.setState;return t.useEffect(()=>{let t=e.map(({name:e,keys:t,up:s})=>({keys:t,up:s,fn:t=>{d({[e]:t}),a&&a(e,t,u[1]())}})).reduce((e,{keys:t,fn:s,up:n=!0})=>(t.forEach(t=>e[t]={fn:s,pressed:!1,up:n}),e),{}),s=({key:e,code:s})=>{let n=t[e]||t[s];if(!n)return;let{fn:i,pressed:r,up:a}=n;n.pressed=!0,(a||!r)&&i(!0)},n=({key:e,code:s})=>{let n=t[e]||t[s];if(!n)return;let{fn:i,up:r}=n;n.pressed=!1,r&&i(!1)},i=o||window;return i.addEventListener("keydown",s,{passive:!0}),i.addEventListener("keyup",n,{passive:!0}),()=>{i.removeEventListener("keydown",s),i.removeEventListener("keyup",n)}},[o,l]),t.createElement(r.Provider,{value:u,children:s})}function o(e){let[s,n,i]=t.useContext(r);return e?i(e):[s,n]}e.s(["KeyboardControls",()=>a,"useKeyboardControls",()=>o],12631)},93784,e=>{"use strict";let t=(0,e.i(8155).createStore)()(()=>({time:0,playback:null,root:null,freeFlyCamera:!1,entities:new Map}));function s(){t.setState({time:0,playback:null,freeFlyCamera:!1})}e.s(["resetStreamPlayback",()=>s,"streamPlaybackStore",0,t])},46325,e=>{"use strict";var t=e.i(43476),s=e.i(932),n=e.i(71645);let i=(0,e.i(25645).createLogger)("DebugSuspense");function r(e){let i,r,l,c=(0,s.c)(10),{name:u,fallback:d,children:m}=e,h=void 0===d?null:d;return c[0]!==h||c[1]!==u?(i=(0,t.jsx)(a,{name:u,children:h}),c[0]=h,c[1]=u,c[2]=i):i=c[2],c[3]!==u?(r=(0,t.jsx)(o,{name:u}),c[3]=u,c[4]=r):r=c[4],c[5]!==m||c[6]!==u||c[7]!==i||c[8]!==r?(l=(0,t.jsxs)(n.Suspense,{name:u,fallback:i,children:[r,m]}),c[5]=m,c[6]=u,c[7]=i,c[8]=r,c[9]=l):l=c[9],l}function a(e){let t,r,a=(0,s.c)(3),{name:o,children:l}=e;return a[0]!==o?(t=()=>{i.debug("🛑 SUSPENDED: %s",o)},r=[o],a[0]=o,a[1]=t,a[2]=r):(t=a[1],r=a[2]),(0,n.useEffect)(t,r),l}function o(e){let t,r,a=(0,s.c)(3),{name:o}=e;return a[0]!==o?(t=()=>{i.debug("✅ RESOLVED: %s",o)},r=[o],a[0]=o,a[1]=t,a[2]=r):(t=a[1],r=a[2]),(0,n.useEffect)(t,r),null}e.s(["DebugSuspense",()=>r])},51434,e=>{"use strict";var t=e.i(43476),s=e.i(932),n=e.i(71645),i=e.i(15080),r=e.i(90072),a=e.i(58647),o=e.i(79123);let l=(0,n.createContext)(void 0);function c(e){let c,h,p,g,y,f,v=(0,s.c)(11),{children:S}=e,k=(0,i.useThree)(m),{audioVolume:b}=(0,o.useSettings)();v[0]===Symbol.for("react.memo_cache_sentinel")?(c={audioLoader:null,audioListener:null},v[0]=c):c=v[0];let[N,C]=(0,n.useState)(c);return v[1]!==k?(h=()=>{let e=new r.AudioLoader,t=k.children.find(d);t||(t=new r.AudioListener,k.add(t)),C({audioLoader:e,audioListener:t});let s=()=>{let e=t.context;e&&"suspended"===e.state&&e.resume().finally(()=>{document.removeEventListener("click",s),document.removeEventListener("keydown",s),document.removeEventListener("touchend",s)})};document.addEventListener("click",s),document.addEventListener("keydown",s),document.addEventListener("touchend",s);let n=a.engineStore.subscribe(u,e=>{let s=t.context;s&&("paused"===e?s.suspend():"suspended"===s.state&&s.resume())});return()=>{document.removeEventListener("click",s),document.removeEventListener("keydown",s),document.removeEventListener("touchend",s),n(),t&&k.remove(t)}},p=[k],v[1]=k,v[2]=h,v[3]=p):(h=v[2],p=v[3]),(0,n.useEffect)(h,p),v[4]!==N.audioListener||v[5]!==b?(g=()=>{N.audioListener?.setMasterVolume(b)},y=[b,N.audioListener],v[4]=N.audioListener,v[5]=b,v[6]=g,v[7]=y):(g=v[6],y=v[7]),(0,n.useEffect)(g,y),v[8]!==N||v[9]!==S?(f=(0,t.jsx)(l.Provider,{value:N,children:S}),v[8]=N,v[9]=S,v[10]=f):f=v[10],f}function u(e){return e.playback.status}function d(e){return e instanceof r.AudioListener}function m(e){return e.camera}function h(){let e=(0,n.useContext)(l);if(void 0===e)throw Error("useAudio must be used within AudioProvider");return e}e.s(["AudioProvider",()=>c,"useAudio",()=>h])},31999,e=>{"use strict";var t=e.i(71645);let s=(0,e.i(25645).createLogger)("ShapeErrorBoundary");class n extends t.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){s.error("Shape load failed: %s %s",e.message,t.componentStack)}render(){return this.state.hasError?this.props.fallback:this.props.children}}e.s(["ShapeErrorBoundary",()=>n])},77964,e=>{"use strict";function t(e){switch(e.renderType){case"TerrainBlock":case"InteriorInstance":case"Sky":case"Sun":case"WaterBlock":case"MissionArea":return!0;default:return!1}}e.s(["isSceneEntity",()=>t])},60946,e=>{e.v(t=>Promise.all(["static/chunks/4fb9edf01fb5e4f5.js"].map(t=>e.l(t))).then(()=>t(0)))},30814,e=>{e.v(t=>Promise.all(["static/chunks/41fb9d5ac0e14608.js"].map(t=>e.l(t))).then(()=>t(9721)))},44325,e=>{e.v(t=>Promise.all(["static/chunks/c5f946098461b297.js"].map(t=>e.l(t))).then(()=>t(66789)))},62125,e=>{e.v(t=>Promise.all(["static/chunks/6c0bdfaab43cc40b.js"].map(t=>e.l(t))).then(()=>t(64972)))},25147,e=>{e.v(t=>Promise.all(["static/chunks/2c772d15a5a10e4d.js"].map(t=>e.l(t))).then(()=>t(63724)))},61921,e=>{e.v(t=>Promise.all(["static/chunks/538e72dc81951677.js"].map(t=>e.l(t))).then(()=>t(29055)))},18599,e=>{e.v(t=>Promise.all(["static/chunks/2070573ac43e863c.js"].map(t=>e.l(t))).then(()=>t(42585)))},34019,e=>{e.v(t=>Promise.all(["static/chunks/967c4aa315f919d7.js"].map(t=>e.l(t))).then(()=>t(66069)))},553,e=>{e.v(t=>Promise.all(["static/chunks/66f953934e42712b.css","static/chunks/e27b13e203064a85.js"].map(t=>e.l(t))).then(()=>t(18339)))},33487,e=>{e.v(t=>Promise.all(["static/chunks/9ffe862a9787606f.css","static/chunks/302e494fb721f5e6.js"].map(t=>e.l(t))).then(()=>t(40378)))},25483,e=>{e.v(t=>Promise.all(["static/chunks/41fb9d5ac0e14608.js","static/chunks/419d6e651fe3d509.js"].map(t=>e.l(t))).then(()=>t(51295)))},93884,e=>{e.v(t=>Promise.all(["static/chunks/1db3a9d62713e989.css","static/chunks/3770acf7d1a6ba0a.js"].map(t=>e.l(t))).then(()=>t(94737)))},88487,e=>{e.v(t=>Promise.all(["static/chunks/005e475439c5cb3e.js","static/chunks/aabc2b89bca559ab.css"].map(t=>e.l(t))).then(()=>t(86855)))},21683,e=>{e.v(t=>Promise.all(["static/chunks/4c292ca57f1d49be.js"].map(t=>e.l(t))).then(()=>t(91285)))},38496,e=>{e.v(t=>Promise.all(["static/chunks/fd10b9633e3b5488.js"].map(t=>e.l(t))).then(()=>t(9962)))},57567,e=>{e.v(t=>Promise.all(["static/chunks/dbc95e0f1d663220.css","static/chunks/4e0d5bbc5104adf2.js"].map(t=>e.l(t))).then(()=>t(49776)))},59197,e=>{e.v(t=>Promise.all(["static/chunks/7317a925124598e3.css","static/chunks/7dcb40c178014bc9.js"].map(t=>e.l(t))).then(()=>t(94247)))},70012,e=>{e.v(t=>Promise.all(["static/chunks/7317a925124598e3.css","static/chunks/0070446447a9983b.js"].map(t=>e.l(t))).then(()=>t(45554)))}]);
\ No newline at end of file
diff --git a/docs/_next/static/chunks/3ec6b524f05ae0b6.css b/docs/_next/static/chunks/aabc2b89bca559ab.css
similarity index 83%
rename from docs/_next/static/chunks/3ec6b524f05ae0b6.css
rename to docs/_next/static/chunks/aabc2b89bca559ab.css
index 8b2c7fe9..4dbba095 100644
--- a/docs/_next/static/chunks/3ec6b524f05ae0b6.css
+++ b/docs/_next/static/chunks/aabc2b89bca559ab.css
@@ -1,4 +1,4 @@
-.InspectorControls-module__gNRB6W__InspectorControls{z-index:2;font-size:13px;line-height:1.231;position:relative}.InspectorControls-module__gNRB6W__Dropdown{flex-direction:column;justify-content:center;align-items:stretch;gap:0;display:flex}.InspectorControls-module__gNRB6W__ButtonGroup{flex:1 0 auto;align-items:stretch;width:100%;display:flex}.InspectorControls-module__gNRB6W__ButtonGroup .InspectorControls-module__gNRB6W__IconButton{background:#1b4f87b3;flex-direction:column;flex:1 0 0;gap:1px;padding-top:8px;padding-bottom:8px;font-size:22px;box-shadow:inset 0 0 10px #04284780}.InspectorControls-module__gNRB6W__ButtonGroup .InspectorControls-module__gNRB6W__IconButton svg{margin-bottom:3px}.InspectorControls-module__gNRB6W__ButtonGroup .InspectorControls-module__gNRB6W__IconButton[data-active=true]{background:#0065cbcc;box-shadow:inset 0 2px 3px #08bdff80,inset 0 -2px 6px #00122880}.InspectorControls-module__gNRB6W__ButtonGroup .InspectorControls-module__gNRB6W__IconButton[data-active=true] svg{opacity:1}.InspectorControls-module__gNRB6W__ButtonGroup .InspectorControls-module__gNRB6W__IconButton:not(:first-child){border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.InspectorControls-module__gNRB6W__ButtonGroup .InspectorControls-module__gNRB6W__IconButton:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.InspectorControls-module__gNRB6W__Group{flex-wrap:wrap;justify-content:center;align-items:center;gap:20px;display:flex}.InspectorControls-module__gNRB6W__LabelledButton{align-items:center;gap:6px;display:flex}.InspectorControls-module__gNRB6W__CheckboxField{grid-template-rows:auto auto;grid-template-columns:auto 1fr;align-items:center;gap:0 6px;margin:0 0 6px;display:grid}.InspectorControls-module__gNRB6W__CheckboxField input[type=checkbox]{grid-area:1/1;margin-left:0}.InspectorControls-module__gNRB6W__CheckboxField .InspectorControls-module__gNRB6W__Label{grid-area:1/2;align-items:center;gap:6px;display:flex}.InspectorControls-module__gNRB6W__Description{opacity:.6;margin:2px 0 4px;padding:0;font-size:12px;line-height:1.3333}.InspectorControls-module__gNRB6W__CheckboxField .InspectorControls-module__gNRB6W__Description{grid-area:2/2}.InspectorControls-module__gNRB6W__Control{align-items:center;gap:8px;display:flex}.InspectorControls-module__gNRB6W__Field select{margin-bottom:6px}.InspectorControls-module__gNRB6W__Field output{opacity:.7}.InspectorControls-module__gNRB6W__Tools{flex-wrap:wrap;align-items:center;gap:8px;padding:10px;display:flex}.InspectorControls-module__gNRB6W__Field{grid-template-rows:auto auto;grid-template-columns:1fr auto;align-items:center;margin:0 0 6px;display:grid}.InspectorControls-module__gNRB6W__Field label{grid-area:1/1}.InspectorControls-module__gNRB6W__Field .InspectorControls-module__gNRB6W__Control{grid-area:1/2}.InspectorControls-module__gNRB6W__Field .InspectorControls-module__gNRB6W__Description{grid-area:2/1/auto/-1}.InspectorControls-module__gNRB6W__IconButton{color:#fff;cursor:pointer;background:#0062b3cc;border:1px solid #fff6;border-radius:5px;flex:auto;justify-content:center;align-items:center;gap:8px;width:auto;min-width:28px;height:auto;min-height:32px;margin:0;padding:4px 8px;font-family:inherit;font-size:18px;font-weight:500;transition:background .2s,border-color .2s;display:flex;position:relative;transform:translate(0);box-shadow:0 1px 2px #0006}.InspectorControls-module__gNRB6W__IconButton svg{opacity:.8;pointer-events:none;flex:none;transition:opacity .2s}.InspectorControls-module__gNRB6W__IconButton:disabled{opacity:.6;cursor:default}@media (hover:hover){.InspectorControls-module__gNRB6W__IconButton{background:#03529399;border:1px solid #c8c8c84d;border-color:#ffffff4d #c8c8c84d #c8c8c84d #ffffff4d}.InspectorControls-module__gNRB6W__IconButton:not(:disabled):hover{background:#0062b3cc;border-color:#fff6}.InspectorControls-module__gNRB6W__IconButton svg{opacity:.6}.InspectorControls-module__gNRB6W__IconButton:not(:disabled):hover svg{opacity:1}}.InspectorControls-module__gNRB6W__IconButton:not(:disabled):active,.InspectorControls-module__gNRB6W__IconButton[aria-expanded=true]{background:#0062b3b3;border-color:#ffffff4d;transform:translateY(1px)}.InspectorControls-module__gNRB6W__IconButton[data-active=true]{background:#0075d5e6;border-color:#fff6}.InspectorControls-module__gNRB6W__ButtonLabel{font-size:14px}.InspectorControls-module__gNRB6W__ButtonHint{opacity:.7;font-size:10px}.InspectorControls-module__gNRB6W__Toggle{margin:0;}.InspectorControls-module__gNRB6W__MapInfoButton{}.InspectorControls-module__gNRB6W__ForceRenderButton{color:#4cb5ff;cursor:pointer;background:0 0;border:0;place-content:center;margin:0;padding:0 2px;font-size:16px;display:grid}
+.InspectorControls-module__gNRB6W__InspectorControls{z-index:2;font-size:13px;line-height:1.231;position:relative}.InspectorControls-module__gNRB6W__Dropdown{flex-direction:column;justify-content:center;align-items:stretch;gap:0;display:flex}.InspectorControls-module__gNRB6W__ButtonGroup{flex:1 0 auto;align-items:stretch;width:100%;display:flex}.InspectorControls-module__gNRB6W__ButtonGroup .InspectorControls-module__gNRB6W__IconButton{background:#1b4f87b3;flex-direction:column;flex:1 0 0;gap:1px;padding-top:8px;padding-bottom:8px;font-size:22px;box-shadow:inset 0 0 10px #04284780}.InspectorControls-module__gNRB6W__ButtonGroup .InspectorControls-module__gNRB6W__IconButton svg{margin-bottom:3px}.InspectorControls-module__gNRB6W__ButtonGroup .InspectorControls-module__gNRB6W__IconButton[data-active=true]{background:#0065cbcc;box-shadow:inset 0 2px 3px #08bdff80,inset 0 -2px 6px #00122880}.InspectorControls-module__gNRB6W__ButtonGroup .InspectorControls-module__gNRB6W__IconButton[data-active=true] svg{opacity:1}.InspectorControls-module__gNRB6W__ButtonGroup .InspectorControls-module__gNRB6W__IconButton:not(:first-child){border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.InspectorControls-module__gNRB6W__ButtonGroup .InspectorControls-module__gNRB6W__IconButton:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.InspectorControls-module__gNRB6W__Group{flex-wrap:wrap;justify-content:center;align-items:center;gap:20px;display:flex}.InspectorControls-module__gNRB6W__LabelledButton{align-items:center;gap:6px;display:flex}.InspectorControls-module__gNRB6W__CheckboxField{grid-template-rows:auto auto;grid-template-columns:auto 1fr;align-items:center;gap:0 6px;margin:0 0 8px;display:grid}.InspectorControls-module__gNRB6W__CheckboxField:has(.InspectorControls-module__gNRB6W__Description){margin:0 0 6px}.InspectorControls-module__gNRB6W__CheckboxField input[type=checkbox]{grid-area:1/1;margin-left:0}.InspectorControls-module__gNRB6W__CheckboxField .InspectorControls-module__gNRB6W__Label{grid-area:1/2;align-items:center;gap:6px;display:flex}.InspectorControls-module__gNRB6W__Description{opacity:.6;margin:2px 0 0;padding:0;font-size:12px;line-height:1.3333}.InspectorControls-module__gNRB6W__CheckboxField .InspectorControls-module__gNRB6W__Description{grid-area:2/2}.InspectorControls-module__gNRB6W__Control{align-items:center;gap:8px;display:flex}.InspectorControls-module__gNRB6W__Field select{margin-bottom:6px}.InspectorControls-module__gNRB6W__Field output{opacity:.7}.InspectorControls-module__gNRB6W__Tools{flex-wrap:wrap;align-items:center;gap:8px;padding:10px;display:flex}.InspectorControls-module__gNRB6W__Field{grid-template-rows:auto auto;grid-template-columns:1fr auto;align-items:center;margin:0 0 12px;display:grid}.InspectorControls-module__gNRB6W__Field:has(.InspectorControls-module__gNRB6W__Description){margin:0 0 10px}.InspectorControls-module__gNRB6W__Field label{grid-area:1/1}.InspectorControls-module__gNRB6W__Field .InspectorControls-module__gNRB6W__Control{grid-area:1/2}.InspectorControls-module__gNRB6W__Field .InspectorControls-module__gNRB6W__Description{grid-area:2/1/auto/-1}.InspectorControls-module__gNRB6W__IconButton{color:#fff;cursor:pointer;background:#0062b3cc;border:1px solid #fff6;border-radius:5px;flex:auto;justify-content:center;align-items:center;gap:8px;width:auto;min-width:28px;height:auto;min-height:32px;margin:0;padding:4px 8px;font-family:inherit;font-size:18px;font-weight:500;transition:background .2s,border-color .2s;display:flex;position:relative;transform:translate(0);box-shadow:0 1px 2px #0006}.InspectorControls-module__gNRB6W__IconButton svg{opacity:.8;pointer-events:none;flex:none;transition:opacity .2s}.InspectorControls-module__gNRB6W__IconButton:disabled{opacity:.6;cursor:default}@media (hover:hover){.InspectorControls-module__gNRB6W__IconButton{background:#03529399;border:1px solid #c8c8c84d;border-color:#ffffff4d #c8c8c84d #c8c8c84d #ffffff4d}.InspectorControls-module__gNRB6W__IconButton:not(:disabled):hover{background:#0062b3cc;border-color:#fff6}.InspectorControls-module__gNRB6W__IconButton svg{opacity:.6}.InspectorControls-module__gNRB6W__IconButton:not(:disabled):hover svg{opacity:1}}.InspectorControls-module__gNRB6W__IconButton:not(:disabled):active,.InspectorControls-module__gNRB6W__IconButton[aria-expanded=true]{background:#0062b3b3;border-color:#ffffff4d;transform:translateY(1px)}.InspectorControls-module__gNRB6W__IconButton[data-active=true]{background:#0075d5e6;border-color:#fff6}.InspectorControls-module__gNRB6W__ButtonLabel{font-size:14px}.InspectorControls-module__gNRB6W__ButtonHint{opacity:.7;font-size:10px}.InspectorControls-module__gNRB6W__Toggle{margin:0;}.InspectorControls-module__gNRB6W__MapInfoButton{}.InspectorControls-module__gNRB6W__ForceRenderButton{color:#4cb5ff;cursor:pointer;background:0 0;border:0;place-content:center;margin:0;padding:0 2px;font-size:16px;display:grid}
.CopyCoordinatesButton-module__BxovtG__Root{}.CopyCoordinatesButton-module__BxovtG__Root[data-copied=true]{background:#0075d5e6;border-color:#fff6}.CopyCoordinatesButton-module__BxovtG__ClipboardCheck{opacity:1;display:none}.CopyCoordinatesButton-module__BxovtG__Root[data-copied=true] .CopyCoordinatesButton-module__BxovtG__ClipboardCheck{animation:.22s linear infinite CopyCoordinatesButton-module__BxovtG__showClipboardCheck;display:block}.CopyCoordinatesButton-module__BxovtG__Root[data-copied=true] .CopyCoordinatesButton-module__BxovtG__MapPin{display:none}.CopyCoordinatesButton-module__BxovtG__ButtonLabel{}@keyframes CopyCoordinatesButton-module__BxovtG__showClipboardCheck{0%{opacity:1}to{opacity:.2}}
.LoadDemoButton-module__kGZaoW__Root{}.LoadDemoButton-module__kGZaoW__ButtonLabel{}.LoadDemoButton-module__kGZaoW__ButtonHint{}
.JoinServerButton-module__DIR70a__Root{}.JoinServerButton-module__DIR70a__TextLabel{}.JoinServerButton-module__DIR70a__PingLabel{margin-right:2px;display:flex!important;}.JoinServerButton-module__DIR70a__Pulsing{animation:1.2s ease-out infinite JoinServerButton-module__DIR70a__blink}@keyframes JoinServerButton-module__DIR70a__blink{0%{opacity:1}to{opacity:.25}}.JoinServerButton-module__DIR70a__ButtonHint{}
diff --git a/docs/_not-found/__next._full.txt b/docs/_not-found/__next._full.txt
index 4b53c63b..c9e67401 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/2f236954d6a65e12.js"],"MetadataBoundary"]
c:I[68027,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"default"]
:HL["/t2-mapper/_next/static/chunks/ad52ebedad251428.css","style"]
-0:{"P":null,"b":"qFiVWtG4yk0ykisMKiEZH","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/ad52ebedad251428.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.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":"6Rbtt13_hS5V8nXPFgNnq","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/ad52ebedad251428.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.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/2f236954d6a65e12.js"],"IconMark"]
7:null
diff --git a/docs/_not-found/__next._head.txt b/docs/_not-found/__next._head.txt
index b1c7aafb..3664cc92 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/2f236954d6a65e12.js"],"MetadataBoundary"]
4:"$Sreact.suspense"
5:I[27201,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"IconMark"]
-0:{"buildId":"qFiVWtG4yk0ykisMKiEZH","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":"6Rbtt13_hS5V8nXPFgNnq","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 4c48efbe..88a68946 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/2f236954d6a65e12.js"],"default"]
4:I[37457,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"default"]
:HL["/t2-mapper/_next/static/chunks/ad52ebedad251428.css","style"]
-0:{"buildId":"qFiVWtG4yk0ykisMKiEZH","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/ad52ebedad251428.css","precedence":"next"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.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":"6Rbtt13_hS5V8nXPFgNnq","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/ad52ebedad251428.css","precedence":"next"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.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 1d5b52d1..05de10bc 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/2f236954d6a65e12.js"],"OutletBoundary"]
3:"$Sreact.suspense"
-0:{"buildId":"qFiVWtG4yk0ykisMKiEZH","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":"6Rbtt13_hS5V8nXPFgNnq","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 99f5d0f6..1accbf50 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/2f236954d6a65e12.js"],"default"]
3:I[37457,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"default"]
-0:{"buildId":"qFiVWtG4yk0ykisMKiEZH","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false}
+0:{"buildId":"6Rbtt13_hS5V8nXPFgNnq","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 8a9148ba..5ceab4c2 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/ad52ebedad251428.css","style"]
-0:{"buildId":"qFiVWtG4yk0ykisMKiEZH","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":"6Rbtt13_hS5V8nXPFgNnq","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 47521b99..78630bdc 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 4b53c63b..c9e67401 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/2f236954d6a65e12.js"],"MetadataBoundary"]
c:I[68027,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"default"]
:HL["/t2-mapper/_next/static/chunks/ad52ebedad251428.css","style"]
-0:{"P":null,"b":"qFiVWtG4yk0ykisMKiEZH","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/ad52ebedad251428.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.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":"6Rbtt13_hS5V8nXPFgNnq","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/ad52ebedad251428.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.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/2f236954d6a65e12.js"],"IconMark"]
7:null
diff --git a/docs/index.html b/docs/index.html
index 9da218e6..8da65523 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 715f0ea9..a9ef3976 100644
--- a/docs/index.txt
+++ b/docs/index.txt
@@ -3,15 +3,15 @@
3:I[39756,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"default"]
4:I[37457,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"default"]
5:I[47257,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"ClientPageRoot"]
-6:I[31713,["/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.js","/t2-mapper/_next/static/chunks/628df86be2b8074c.js","/t2-mapper/_next/static/chunks/28c57db7b25d3d02.js","/t2-mapper/_next/static/chunks/d22dc3fe32e979ff.js","/t2-mapper/_next/static/chunks/b30d580062e7b044.js","/t2-mapper/_next/static/chunks/e01e6e76b521dd3c.js","/t2-mapper/_next/static/chunks/21659079be7af0ab.js","/t2-mapper/_next/static/chunks/26c11097581036eb.js","/t2-mapper/_next/static/chunks/9a99559140e82f06.js","/t2-mapper/_next/static/chunks/727710e55f003daf.js","/t2-mapper/_next/static/chunks/af18e4f3fa33de6b.js","/t2-mapper/_next/static/chunks/048c0e679979d576.js","/t2-mapper/_next/static/chunks/153d5796298dee1e.js"],"default"]
+6:I[31713,["/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.js","/t2-mapper/_next/static/chunks/628df86be2b8074c.js","/t2-mapper/_next/static/chunks/5dae6153cf1240b6.js","/t2-mapper/_next/static/chunks/779e069cb2cf814f.js","/t2-mapper/_next/static/chunks/b30d580062e7b044.js","/t2-mapper/_next/static/chunks/e01e6e76b521dd3c.js","/t2-mapper/_next/static/chunks/21659079be7af0ab.js","/t2-mapper/_next/static/chunks/6e8ac7c28fb34400.js","/t2-mapper/_next/static/chunks/9a99559140e82f06.js","/t2-mapper/_next/static/chunks/727710e55f003daf.js","/t2-mapper/_next/static/chunks/af18e4f3fa33de6b.js","/t2-mapper/_next/static/chunks/048c0e679979d576.js","/t2-mapper/_next/static/chunks/153d5796298dee1e.js"],"default"]
9:I[97367,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"OutletBoundary"]
a:"$Sreact.suspense"
c:I[97367,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"ViewportBoundary"]
e:I[97367,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"MetadataBoundary"]
10:I[68027,[],"default"]
:HL["/t2-mapper/_next/static/chunks/ad52ebedad251428.css","style"]
-:HL["/t2-mapper/_next/static/chunks/3ec6b524f05ae0b6.css","style"]
-0:{"P":null,"b":"qFiVWtG4yk0ykisMKiEZH","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/ad52ebedad251428.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.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"]}}],[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/3ec6b524f05ae0b6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/628df86be2b8074c.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/28c57db7b25d3d02.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/d22dc3fe32e979ff.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/b30d580062e7b044.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/t2-mapper/_next/static/chunks/e01e6e76b521dd3c.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/t2-mapper/_next/static/chunks/21659079be7af0ab.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/t2-mapper/_next/static/chunks/26c11097581036eb.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/t2-mapper/_next/static/chunks/9a99559140e82f06.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/t2-mapper/_next/static/chunks/727710e55f003daf.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/t2-mapper/_next/static/chunks/af18e4f3fa33de6b.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/t2-mapper/_next/static/chunks/048c0e679979d576.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/t2-mapper/_next/static/chunks/153d5796298dee1e.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}
+:HL["/t2-mapper/_next/static/chunks/aabc2b89bca559ab.css","style"]
+0:{"P":null,"b":"6Rbtt13_hS5V8nXPFgNnq","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/ad52ebedad251428.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.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"]}}],[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/aabc2b89bca559ab.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/628df86be2b8074c.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/5dae6153cf1240b6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/779e069cb2cf814f.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/b30d580062e7b044.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/t2-mapper/_next/static/chunks/e01e6e76b521dd3c.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/t2-mapper/_next/static/chunks/21659079be7af0ab.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/t2-mapper/_next/static/chunks/6e8ac7c28fb34400.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/t2-mapper/_next/static/chunks/9a99559140e82f06.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/t2-mapper/_next/static/chunks/727710e55f003daf.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/t2-mapper/_next/static/chunks/af18e4f3fa33de6b.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/t2-mapper/_next/static/chunks/048c0e679979d576.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/t2-mapper/_next/static/chunks/153d5796298dee1e.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/shapes/__next._full.txt b/docs/shapes/__next._full.txt
index 3461c1de..6d807765 100644
--- a/docs/shapes/__next._full.txt
+++ b/docs/shapes/__next._full.txt
@@ -3,15 +3,15 @@
3:I[39756,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"default"]
4:I[37457,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"default"]
5:I[47257,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"ClientPageRoot"]
-6:I[39724,["/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.js","/t2-mapper/_next/static/chunks/ad4fd30929cca23f.js","/t2-mapper/_next/static/chunks/628df86be2b8074c.js","/t2-mapper/_next/static/chunks/44a6df9214eeac58.js","/t2-mapper/_next/static/chunks/28c57db7b25d3d02.js","/t2-mapper/_next/static/chunks/d712fc4c15db64e6.js","/t2-mapper/_next/static/chunks/9a99559140e82f06.js","/t2-mapper/_next/static/chunks/153d5796298dee1e.js","/t2-mapper/_next/static/chunks/21659079be7af0ab.js","/t2-mapper/_next/static/chunks/9549e76d03bf90ea.js","/t2-mapper/_next/static/chunks/727710e55f003daf.js"],"default"]
+6:I[39724,["/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.js","/t2-mapper/_next/static/chunks/ad4fd30929cca23f.js","/t2-mapper/_next/static/chunks/628df86be2b8074c.js","/t2-mapper/_next/static/chunks/44a6df9214eeac58.js","/t2-mapper/_next/static/chunks/5dae6153cf1240b6.js","/t2-mapper/_next/static/chunks/d712fc4c15db64e6.js","/t2-mapper/_next/static/chunks/9a99559140e82f06.js","/t2-mapper/_next/static/chunks/153d5796298dee1e.js","/t2-mapper/_next/static/chunks/21659079be7af0ab.js","/t2-mapper/_next/static/chunks/9549e76d03bf90ea.js","/t2-mapper/_next/static/chunks/727710e55f003daf.js"],"default"]
9:I[97367,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"OutletBoundary"]
a:"$Sreact.suspense"
c:I[97367,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"ViewportBoundary"]
e:I[97367,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"MetadataBoundary"]
10:I[68027,[],"default"]
:HL["/t2-mapper/_next/static/chunks/ad52ebedad251428.css","style"]
-:HL["/t2-mapper/_next/static/chunks/3ec6b524f05ae0b6.css","style"]
-0:{"P":null,"b":"qFiVWtG4yk0ykisMKiEZH","c":["","shapes",""],"q":"","i":false,"f":[[["",{"children":["shapes",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/ad52ebedad251428.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.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":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/3ec6b524f05ae0b6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/ad4fd30929cca23f.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/628df86be2b8074c.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/44a6df9214eeac58.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/28c57db7b25d3d02.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/t2-mapper/_next/static/chunks/d712fc4c15db64e6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/t2-mapper/_next/static/chunks/9a99559140e82f06.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/t2-mapper/_next/static/chunks/153d5796298dee1e.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/t2-mapper/_next/static/chunks/21659079be7af0ab.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/t2-mapper/_next/static/chunks/9549e76d03bf90ea.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/t2-mapper/_next/static/chunks/727710e55f003daf.js","async":true,"nonce":"$undefined"}]],["$","$L9",null,{"children":["$","$a",null,{"name":"Next.MetadataOutlet","children":"$@b"}]}]]}],{},null,false,false]},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}
+:HL["/t2-mapper/_next/static/chunks/aabc2b89bca559ab.css","style"]
+0:{"P":null,"b":"6Rbtt13_hS5V8nXPFgNnq","c":["","shapes",""],"q":"","i":false,"f":[[["",{"children":["shapes",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/ad52ebedad251428.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.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":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/aabc2b89bca559ab.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/ad4fd30929cca23f.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/628df86be2b8074c.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/44a6df9214eeac58.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/5dae6153cf1240b6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/t2-mapper/_next/static/chunks/d712fc4c15db64e6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/t2-mapper/_next/static/chunks/9a99559140e82f06.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/t2-mapper/_next/static/chunks/153d5796298dee1e.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/t2-mapper/_next/static/chunks/21659079be7af0ab.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/t2-mapper/_next/static/chunks/9549e76d03bf90ea.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/t2-mapper/_next/static/chunks/727710e55f003daf.js","async":true,"nonce":"$undefined"}]],["$","$L9",null,{"children":["$","$a",null,{"name":"Next.MetadataOutlet","children":"$@b"}]}]]}],{},null,false,false]},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: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/shapes/__next._head.txt b/docs/shapes/__next._head.txt
index 9da154c0..ab41a633 100644
--- a/docs/shapes/__next._head.txt
+++ b/docs/shapes/__next._head.txt
@@ -3,4 +3,4 @@
3:I[97367,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"MetadataBoundary"]
4:"$Sreact.suspense"
5:I[27201,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"IconMark"]
-0:{"buildId":"qFiVWtG4yk0ykisMKiEZH","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":"6Rbtt13_hS5V8nXPFgNnq","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/shapes/__next._index.txt b/docs/shapes/__next._index.txt
index 4c48efbe..88a68946 100644
--- a/docs/shapes/__next._index.txt
+++ b/docs/shapes/__next._index.txt
@@ -3,4 +3,4 @@
3:I[39756,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"default"]
4:I[37457,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"default"]
:HL["/t2-mapper/_next/static/chunks/ad52ebedad251428.css","style"]
-0:{"buildId":"qFiVWtG4yk0ykisMKiEZH","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/ad52ebedad251428.css","precedence":"next"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.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":"6Rbtt13_hS5V8nXPFgNnq","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/ad52ebedad251428.css","precedence":"next"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.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/shapes/__next._tree.txt b/docs/shapes/__next._tree.txt
index 2065303c..e7d63a9b 100644
--- a/docs/shapes/__next._tree.txt
+++ b/docs/shapes/__next._tree.txt
@@ -1,3 +1,3 @@
:HL["/t2-mapper/_next/static/chunks/ad52ebedad251428.css","style"]
-:HL["/t2-mapper/_next/static/chunks/3ec6b524f05ae0b6.css","style"]
-0:{"buildId":"qFiVWtG4yk0ykisMKiEZH","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"shapes","paramType":null,"paramKey":"shapes","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300}
+:HL["/t2-mapper/_next/static/chunks/aabc2b89bca559ab.css","style"]
+0:{"buildId":"6Rbtt13_hS5V8nXPFgNnq","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"shapes","paramType":null,"paramKey":"shapes","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/shapes/__next.shapes.__PAGE__.txt b/docs/shapes/__next.shapes.__PAGE__.txt
index c55f1e70..43ad2f33 100644
--- a/docs/shapes/__next.shapes.__PAGE__.txt
+++ b/docs/shapes/__next.shapes.__PAGE__.txt
@@ -1,10 +1,10 @@
1:"$Sreact.fragment"
2:I[47257,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"ClientPageRoot"]
-3:I[39724,["/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.js","/t2-mapper/_next/static/chunks/ad4fd30929cca23f.js","/t2-mapper/_next/static/chunks/628df86be2b8074c.js","/t2-mapper/_next/static/chunks/44a6df9214eeac58.js","/t2-mapper/_next/static/chunks/28c57db7b25d3d02.js","/t2-mapper/_next/static/chunks/d712fc4c15db64e6.js","/t2-mapper/_next/static/chunks/9a99559140e82f06.js","/t2-mapper/_next/static/chunks/153d5796298dee1e.js","/t2-mapper/_next/static/chunks/21659079be7af0ab.js","/t2-mapper/_next/static/chunks/9549e76d03bf90ea.js","/t2-mapper/_next/static/chunks/727710e55f003daf.js"],"default"]
+3:I[39724,["/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.js","/t2-mapper/_next/static/chunks/ad4fd30929cca23f.js","/t2-mapper/_next/static/chunks/628df86be2b8074c.js","/t2-mapper/_next/static/chunks/44a6df9214eeac58.js","/t2-mapper/_next/static/chunks/5dae6153cf1240b6.js","/t2-mapper/_next/static/chunks/d712fc4c15db64e6.js","/t2-mapper/_next/static/chunks/9a99559140e82f06.js","/t2-mapper/_next/static/chunks/153d5796298dee1e.js","/t2-mapper/_next/static/chunks/21659079be7af0ab.js","/t2-mapper/_next/static/chunks/9549e76d03bf90ea.js","/t2-mapper/_next/static/chunks/727710e55f003daf.js"],"default"]
6:I[97367,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"OutletBoundary"]
7:"$Sreact.suspense"
-:HL["/t2-mapper/_next/static/chunks/3ec6b524f05ae0b6.css","style"]
-0:{"buildId":"qFiVWtG4yk0ykisMKiEZH","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/3ec6b524f05ae0b6.css","precedence":"next"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/ad4fd30929cca23f.js","async":true}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/628df86be2b8074c.js","async":true}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/44a6df9214eeac58.js","async":true}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/28c57db7b25d3d02.js","async":true}],["$","script","script-4",{"src":"/t2-mapper/_next/static/chunks/d712fc4c15db64e6.js","async":true}],["$","script","script-5",{"src":"/t2-mapper/_next/static/chunks/9a99559140e82f06.js","async":true}],["$","script","script-6",{"src":"/t2-mapper/_next/static/chunks/153d5796298dee1e.js","async":true}],["$","script","script-7",{"src":"/t2-mapper/_next/static/chunks/21659079be7af0ab.js","async":true}],["$","script","script-8",{"src":"/t2-mapper/_next/static/chunks/9549e76d03bf90ea.js","async":true}],["$","script","script-9",{"src":"/t2-mapper/_next/static/chunks/727710e55f003daf.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false}
+:HL["/t2-mapper/_next/static/chunks/aabc2b89bca559ab.css","style"]
+0:{"buildId":"6Rbtt13_hS5V8nXPFgNnq","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/aabc2b89bca559ab.css","precedence":"next"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/ad4fd30929cca23f.js","async":true}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/628df86be2b8074c.js","async":true}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/44a6df9214eeac58.js","async":true}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/5dae6153cf1240b6.js","async":true}],["$","script","script-4",{"src":"/t2-mapper/_next/static/chunks/d712fc4c15db64e6.js","async":true}],["$","script","script-5",{"src":"/t2-mapper/_next/static/chunks/9a99559140e82f06.js","async":true}],["$","script","script-6",{"src":"/t2-mapper/_next/static/chunks/153d5796298dee1e.js","async":true}],["$","script","script-7",{"src":"/t2-mapper/_next/static/chunks/21659079be7af0ab.js","async":true}],["$","script","script-8",{"src":"/t2-mapper/_next/static/chunks/9549e76d03bf90ea.js","async":true}],["$","script","script-9",{"src":"/t2-mapper/_next/static/chunks/727710e55f003daf.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/shapes/__next.shapes.txt b/docs/shapes/__next.shapes.txt
index 99f5d0f6..1accbf50 100644
--- a/docs/shapes/__next.shapes.txt
+++ b/docs/shapes/__next.shapes.txt
@@ -1,4 +1,4 @@
1:"$Sreact.fragment"
2:I[39756,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"default"]
3:I[37457,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"default"]
-0:{"buildId":"qFiVWtG4yk0ykisMKiEZH","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false}
+0:{"buildId":"6Rbtt13_hS5V8nXPFgNnq","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false}
diff --git a/docs/shapes/index.html b/docs/shapes/index.html
index 14c190f5..6b90fdad 100644
--- a/docs/shapes/index.html
+++ b/docs/shapes/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/shapes/index.txt b/docs/shapes/index.txt
index 3461c1de..6d807765 100644
--- a/docs/shapes/index.txt
+++ b/docs/shapes/index.txt
@@ -3,15 +3,15 @@
3:I[39756,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"default"]
4:I[37457,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"default"]
5:I[47257,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"ClientPageRoot"]
-6:I[39724,["/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.js","/t2-mapper/_next/static/chunks/ad4fd30929cca23f.js","/t2-mapper/_next/static/chunks/628df86be2b8074c.js","/t2-mapper/_next/static/chunks/44a6df9214eeac58.js","/t2-mapper/_next/static/chunks/28c57db7b25d3d02.js","/t2-mapper/_next/static/chunks/d712fc4c15db64e6.js","/t2-mapper/_next/static/chunks/9a99559140e82f06.js","/t2-mapper/_next/static/chunks/153d5796298dee1e.js","/t2-mapper/_next/static/chunks/21659079be7af0ab.js","/t2-mapper/_next/static/chunks/9549e76d03bf90ea.js","/t2-mapper/_next/static/chunks/727710e55f003daf.js"],"default"]
+6:I[39724,["/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.js","/t2-mapper/_next/static/chunks/ad4fd30929cca23f.js","/t2-mapper/_next/static/chunks/628df86be2b8074c.js","/t2-mapper/_next/static/chunks/44a6df9214eeac58.js","/t2-mapper/_next/static/chunks/5dae6153cf1240b6.js","/t2-mapper/_next/static/chunks/d712fc4c15db64e6.js","/t2-mapper/_next/static/chunks/9a99559140e82f06.js","/t2-mapper/_next/static/chunks/153d5796298dee1e.js","/t2-mapper/_next/static/chunks/21659079be7af0ab.js","/t2-mapper/_next/static/chunks/9549e76d03bf90ea.js","/t2-mapper/_next/static/chunks/727710e55f003daf.js"],"default"]
9:I[97367,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"OutletBoundary"]
a:"$Sreact.suspense"
c:I[97367,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"ViewportBoundary"]
e:I[97367,["/t2-mapper/_next/static/chunks/2f236954d6a65e12.js"],"MetadataBoundary"]
10:I[68027,[],"default"]
:HL["/t2-mapper/_next/static/chunks/ad52ebedad251428.css","style"]
-:HL["/t2-mapper/_next/static/chunks/3ec6b524f05ae0b6.css","style"]
-0:{"P":null,"b":"qFiVWtG4yk0ykisMKiEZH","c":["","shapes",""],"q":"","i":false,"f":[[["",{"children":["shapes",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/ad52ebedad251428.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.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":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/3ec6b524f05ae0b6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/ad4fd30929cca23f.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/628df86be2b8074c.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/44a6df9214eeac58.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/28c57db7b25d3d02.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/t2-mapper/_next/static/chunks/d712fc4c15db64e6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/t2-mapper/_next/static/chunks/9a99559140e82f06.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/t2-mapper/_next/static/chunks/153d5796298dee1e.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/t2-mapper/_next/static/chunks/21659079be7af0ab.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/t2-mapper/_next/static/chunks/9549e76d03bf90ea.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/t2-mapper/_next/static/chunks/727710e55f003daf.js","async":true,"nonce":"$undefined"}]],["$","$L9",null,{"children":["$","$a",null,{"name":"Next.MetadataOutlet","children":"$@b"}]}]]}],{},null,false,false]},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}
+:HL["/t2-mapper/_next/static/chunks/aabc2b89bca559ab.css","style"]
+0:{"P":null,"b":"6Rbtt13_hS5V8nXPFgNnq","c":["","shapes",""],"q":"","i":false,"f":[[["",{"children":["shapes",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/ad52ebedad251428.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/89fcb9c19e93d0ef.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":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/aabc2b89bca559ab.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/ad4fd30929cca23f.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/628df86be2b8074c.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/44a6df9214eeac58.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/5dae6153cf1240b6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/t2-mapper/_next/static/chunks/d712fc4c15db64e6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/t2-mapper/_next/static/chunks/9a99559140e82f06.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/t2-mapper/_next/static/chunks/153d5796298dee1e.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/t2-mapper/_next/static/chunks/21659079be7af0ab.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/t2-mapper/_next/static/chunks/9549e76d03bf90ea.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/t2-mapper/_next/static/chunks/727710e55f003daf.js","async":true,"nonce":"$undefined"}]],["$","$L9",null,{"children":["$","$a",null,{"name":"Next.MetadataOutlet","children":"$@b"}]}]]}],{},null,false,false]},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: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/InspectorControls.module.css b/src/components/InspectorControls.module.css
index 7babe3a5..0fa21f0f 100644
--- a/src/components/InspectorControls.module.css
+++ b/src/components/InspectorControls.module.css
@@ -77,9 +77,17 @@
grid-template-rows: auto auto;
align-items: center;
gap: 0 6px;
+ margin: 0 0 8px 0;
+}
+
+.CheckboxField:has(.Description) {
margin: 0 0 6px 0;
}
+/* .Field:not(:has(.Description)) + .CheckboxField {
+ margin-top: 10px;
+} */
+
.CheckboxField input[type="checkbox"] {
margin-left: 0;
grid-column: 1;
@@ -98,7 +106,7 @@
font-size: 12px;
line-height: 1.3333;
opacity: 0.6;
- margin: 2px 0 4px 0;
+ margin: 2px 0 0 0;
padding: 0;
}
@@ -134,7 +142,11 @@
grid-template-columns: 1fr auto;
grid-template-rows: auto auto;
align-items: center;
- margin: 0 0 6px 0;
+ margin: 0 0 12px 0;
+}
+
+.Field:has(.Description) {
+ margin: 0 0 10px 0;
}
.Field label {
diff --git a/src/components/InspectorControls.tsx b/src/components/InspectorControls.tsx
index f0beeb35..d9114572 100644
--- a/src/components/InspectorControls.tsx
+++ b/src/components/InspectorControls.tsx
@@ -72,6 +72,8 @@ export function InspectorControls({
const {
speedMultiplier,
setSpeedMultiplier,
+ mouseSensitivity,
+ setMouseSensitivity,
touchMode,
setTouchMode,
invertScroll,
@@ -257,6 +259,31 @@ export function InspectorControls({
Reverse how dragging the viewport aims the camera.
+ {isTouch === false && (
+
+
+
+
+ {
+ const value = parseInt(event.target.value);
+ const sens = value / 8000;
+ setMouseSensitivity(sens);
+ }}
+ />
+