@ttmg/cli 0.3.1-unity.10 → 0.3.1-unity.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -64,4 +64,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
64
64
  * @license MIT
65
65
  */var U3="popstate";function cie(s={}){function e(n,r){let{pathname:a,search:i,hash:o}=n.location;return MC("",{pathname:a,search:i,hash:o},r.state&&r.state.usr||null,r.state&&r.state.key||"default")}function t(n,r){return typeof r=="string"?r:fu(r)}return die(e,t,null,s)}function fn(s,e){if(s===!1||s===null||typeof s>"u")throw new Error(e)}function la(s,e){if(!s){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function uie(){return Math.random().toString(36).substring(2,10)}function H3(s,e){return{usr:s.state,key:s.key,idx:e}}function MC(s,e,t=null,n){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof e=="string"?zl(e):e,state:t,key:e&&e.key||n||uie()}}function fu({pathname:s="/",search:e="",hash:t=""}){return e&&e!=="?"&&(s+=e.charAt(0)==="?"?e:"?"+e),t&&t!=="#"&&(s+=t.charAt(0)==="#"?t:"#"+t),s}function zl(s){let e={};if(s){let t=s.indexOf("#");t>=0&&(e.hash=s.substring(t),s=s.substring(0,t));let n=s.indexOf("?");n>=0&&(e.search=s.substring(n),s=s.substring(0,n)),s&&(e.pathname=s)}return e}function die(s,e,t,n={}){let{window:r=document.defaultView,v5Compat:a=!1}=n,i=r.history,o="POP",c=null,h=f();h==null&&(h=0,i.replaceState({...i.state,idx:h},""));function f(){return(i.state||{idx:null}).idx}function p(){o="POP";let C=f(),w=C==null?null:C-h;h=C,c&&c({action:o,location:S.location,delta:w})}function y(C,w){o="PUSH";let x=MC(S.location,C,w);h=f()+1;let O=H3(x,h),P=S.createHref(x);try{i.pushState(O,"",P)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;r.location.assign(P)}a&&c&&c({action:o,location:S.location,delta:1})}function v(C,w){o="REPLACE";let x=MC(S.location,C,w);h=f();let O=H3(x,h),P=S.createHref(x);i.replaceState(O,"",P),a&&c&&c({action:o,location:S.location,delta:0})}function _(C){return hie(C)}let S={get action(){return o},get location(){return s(r,i)},listen(C){if(c)throw new Error("A history only accepts one active listener");return r.addEventListener(U3,p),c=C,()=>{r.removeEventListener(U3,p),c=null}},createHref(C){return e(r,C)},createURL:_,encodeLocation(C){let w=_(C);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:y,replace:v,go(C){return i.go(C)}};return S}function hie(s,e=!1){let t="http://localhost";typeof window<"u"&&(t=window.location.origin!=="null"?window.location.origin:window.location.href),fn(t,"No window.location.(origin|href) available to create URL");let n=typeof s=="string"?s:fu(s);return n=n.replace(/ $/,"%20"),!e&&n.startsWith("//")&&(n=t+n),new URL(n,t)}function n5(s,e,t="/"){return fie(s,e,t,!1)}function fie(s,e,t,n){let r=typeof e=="string"?zl(e):e,a=ka(r.pathname||"/",t);if(a==null)return null;let i=r5(s);pie(i);let o=null;for(let c=0;o==null&&c<i.length;++c){let h=Oie(a);o=_ie(i[c],h,n)}return o}function r5(s,e=[],t=[],n="",r=!1){let a=(i,o,c=r,h)=>{let f={relativePath:h===void 0?i.path||"":h,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(n)&&c)return;fn(f.relativePath.startsWith(n),`Absolute route path "${f.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(n.length)}let p=Oa([n,f.relativePath]),y=t.concat(f);i.children&&i.children.length>0&&(fn(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),r5(i.children,e,y,p,c)),!(i.path==null&&!i.index)&&e.push({path:p,score:Sie(p,i.index),routesMeta:y})};return s.forEach((i,o)=>{if(i.path===""||!i.path?.includes("?"))a(i,o);else for(let c of s5(i.path))a(i,o,!0,c)}),e}function s5(s){let e=s.split("/");if(e.length===0)return[];let[t,...n]=e,r=t.endsWith("?"),a=t.replace(/\?$/,"");if(n.length===0)return r?[a,""]:[a];let i=s5(n.join("/")),o=[];return o.push(...i.map(c=>c===""?a:[a,c].join("/"))),r&&o.push(...i),o.map(c=>s.startsWith("/")&&c===""?"/":c)}function pie(s){s.sort((e,t)=>e.score!==t.score?t.score-e.score:wie(e.routesMeta.map(n=>n.childrenIndex),t.routesMeta.map(n=>n.childrenIndex)))}var gie=/^:[\w-]+$/,mie=3,yie=2,vie=1,bie=10,Cie=-2,z3=s=>s==="*";function Sie(s,e){let t=s.split("/"),n=t.length;return t.some(z3)&&(n+=Cie),e&&(n+=yie),t.filter(r=>!z3(r)).reduce((r,a)=>r+(gie.test(a)?mie:a===""?vie:bie),n)}function wie(s,e){return s.length===e.length&&s.slice(0,-1).every((n,r)=>n===e[r])?s[s.length-1]-e[e.length-1]:0}function _ie(s,e,t=!1){let{routesMeta:n}=s,r={},a="/",i=[];for(let o=0;o<n.length;++o){let c=n[o],h=o===n.length-1,f=a==="/"?e:e.slice(a.length)||"/",p=Qf({path:c.relativePath,caseSensitive:c.caseSensitive,end:h},f),y=c.route;if(!p&&h&&t&&!n[n.length-1].route.index&&(p=Qf({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},f)),!p)return null;Object.assign(r,p.params),i.push({params:r,pathname:Oa([a,p.pathname]),pathnameBase:Iie(Oa([a,p.pathnameBase])),route:y}),p.pathnameBase!=="/"&&(a=Oa([a,p.pathnameBase]))}return i}function Qf(s,e){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[t,n]=Eie(s.path,s.caseSensitive,s.end),r=e.match(t);if(!r)return null;let a=r[0],i=a.replace(/(.)\/+$/,"$1"),o=r.slice(1);return{params:n.reduce((h,{paramName:f,isOptional:p},y)=>{if(f==="*"){let _=o[y]||"";i=a.slice(0,a.length-_.length).replace(/(.)\/+$/,"$1")}const v=o[y];return p&&!v?h[f]=void 0:h[f]=(v||"").replace(/%2F/g,"/"),h},{}),pathname:a,pathnameBase:i,pattern:s}}function Eie(s,e=!1,t=!0){la(s==="*"||!s.endsWith("*")||s.endsWith("/*"),`Route path "${s}" will be treated as if it were "${s.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${s.replace(/\*$/,"/*")}".`);let n=[],r="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,o,c)=>(n.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(n.push({paramName:"*"}),r+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?r+="\\/*$":s!==""&&s!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),n]}function Oie(s){try{return s.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return la(!1,`The URL path "${s}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),s}}function ka(s,e){if(e==="/")return s;if(!s.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,n=s.charAt(t);return n&&n!=="/"?null:s.slice(t)||"/"}function xie(s,e="/"){let{pathname:t,search:n="",hash:r=""}=typeof s=="string"?zl(s):s;return{pathname:t?t.startsWith("/")?t:Tie(t,e):e,search:Die(n),hash:Rie(r)}}function Tie(s,e){let t=e.replace(/\/+$/,"").split("/");return s.split("/").forEach(r=>{r===".."?t.length>1&&t.pop():r!=="."&&t.push(r)}),t.length>1?t.join("/"):"/"}function Y0(s,e,t,n){return`Cannot include a '${s}' character in a manually specified \`to.${e}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${t}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Pie(s){return s.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function a5(s){let e=Pie(s);return e.map((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)}function i5(s,e,t,n=!1){let r;typeof s=="string"?r=zl(s):(r={...s},fn(!r.pathname||!r.pathname.includes("?"),Y0("?","pathname","search",r)),fn(!r.pathname||!r.pathname.includes("#"),Y0("#","pathname","hash",r)),fn(!r.search||!r.search.includes("#"),Y0("#","search","hash",r)));let a=s===""||r.pathname==="",i=a?"/":r.pathname,o;if(i==null)o=t;else{let p=e.length-1;if(!n&&i.startsWith("..")){let y=i.split("/");for(;y[0]==="..";)y.shift(),p-=1;r.pathname=y.join("/")}o=p>=0?e[p]:"/"}let c=xie(r,o),h=i&&i!=="/"&&i.endsWith("/"),f=(a||i===".")&&t.endsWith("/");return!c.pathname.endsWith("/")&&(h||f)&&(c.pathname+="/"),c}var Oa=s=>s.join("/").replace(/\/\/+/g,"/"),Iie=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),Die=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,Rie=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s;function kie(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}var o5=["POST","PUT","PATCH","DELETE"];new Set(o5);var Nie=["GET",...o5];new Set(Nie);var Kl=T.createContext(null);Kl.displayName="DataRouter";var Bp=T.createContext(null);Bp.displayName="DataRouterState";T.createContext(!1);var l5=T.createContext({isTransitioning:!1});l5.displayName="ViewTransition";var Aie=T.createContext(new Map);Aie.displayName="Fetchers";var Mie=T.createContext(null);Mie.displayName="Await";var da=T.createContext(null);da.displayName="Navigation";var Wu=T.createContext(null);Wu.displayName="Location";var Na=T.createContext({outlet:null,matches:[],isDataRoute:!1});Na.displayName="Route";var Ow=T.createContext(null);Ow.displayName="RouteError";function Fie(s,{relative:e}={}){fn(qu(),"useHref() may be used only in the context of a <Router> component.");let{basename:t,navigator:n}=T.useContext(da),{hash:r,pathname:a,search:i}=Yu(s,{relative:e}),o=a;return t!=="/"&&(o=a==="/"?t:Oa([t,a])),n.createHref({pathname:o,search:i,hash:r})}function qu(){return T.useContext(Wu)!=null}function So(){return fn(qu(),"useLocation() may be used only in the context of a <Router> component."),T.useContext(Wu).location}var c5="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function u5(s){T.useContext(da).static||T.useLayoutEffect(s)}function Gu(){let{isDataRoute:s}=T.useContext(Na);return s?Yie():Lie()}function Lie(){fn(qu(),"useNavigate() may be used only in the context of a <Router> component.");let s=T.useContext(Kl),{basename:e,navigator:t}=T.useContext(da),{matches:n}=T.useContext(Na),{pathname:r}=So(),a=JSON.stringify(a5(n)),i=T.useRef(!1);return u5(()=>{i.current=!0}),T.useCallback((c,h={})=>{if(la(i.current,c5),!i.current)return;if(typeof c=="number"){t.go(c);return}let f=i5(c,JSON.parse(a),r,h.relative==="path");s==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:Oa([e,f.pathname])),(h.replace?t.replace:t.push)(f,h.state,h)},[e,t,a,r,s])}T.createContext(null);function Yu(s,{relative:e}={}){let{matches:t}=T.useContext(Na),{pathname:n}=So(),r=JSON.stringify(a5(t));return T.useMemo(()=>i5(s,JSON.parse(r),n,e==="path"),[s,r,n,e])}function $ie(s,e){return d5(s,e)}function d5(s,e,t,n,r){fn(qu(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=T.useContext(da),{matches:i}=T.useContext(Na),o=i[i.length-1],c=o?o.params:{},h=o?o.pathname:"/",f=o?o.pathnameBase:"/",p=o&&o.route;{let x=p&&p.path||"";h5(h,!p||x.endsWith("*")||x.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${x}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
66
66
 
67
- Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let y=So(),v;if(e){let x=typeof e=="string"?zl(e):e;fn(f==="/"||x.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${x.pathname}" was given in the \`location\` prop.`),v=x}else v=y;let _=v.pathname||"/",S=_;if(f!=="/"){let x=f.replace(/^\//,"").split("/");S="/"+_.replace(/^\//,"").split("/").slice(x.length).join("/")}let C=n5(s,{pathname:S});la(p||C!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),la(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=Hie(C&&C.map(x=>Object.assign({},x,{params:Object.assign({},c,x.params),pathname:Oa([f,a.encodeLocation?a.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?f:Oa([f,a.encodeLocation?a.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,t,n,r);return e&&w?T.createElement(Wu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},w):w}function jie(){let s=Gie(),e=kie(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),t=s instanceof Error?s.stack:null,n="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",s),i=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:a},"ErrorBoundary")," or"," ",T.createElement("code",{style:a},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},e),t?T.createElement("pre",{style:r},t):null,i)}var Vie=T.createElement(jie,null),Bie=class extends T.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,e){return e.location!==s.location||e.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:e.error,location:e.location,revalidation:s.revalidation||e.revalidation}}componentDidCatch(s,e){this.props.unstable_onError?this.props.unstable_onError(s,e):console.error("React Router caught the following error during render",s)}render(){return this.state.error!==void 0?T.createElement(Na.Provider,{value:this.props.routeContext},T.createElement(Ow.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Uie({routeContext:s,match:e,children:t}){let n=T.useContext(Kl);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),T.createElement(Na.Provider,{value:s},t)}function Hie(s,e=[],t=null,n=null,r=null){if(s==null){if(!t)return null;if(t.errors)s=t.matches;else if(e.length===0&&!t.initialized&&t.matches.length>0)s=t.matches;else return null}let a=s,i=t?.errors;if(i!=null){let h=a.findIndex(f=>f.route.id&&i?.[f.route.id]!==void 0);fn(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,h+1))}let o=!1,c=-1;if(t)for(let h=0;h<a.length;h++){let f=a[h];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=h),f.route.id){let{loaderData:p,errors:y}=t,v=f.route.loader&&!p.hasOwnProperty(f.route.id)&&(!y||y[f.route.id]===void 0);if(f.route.lazy||v){o=!0,c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((h,f,p)=>{let y,v=!1,_=null,S=null;t&&(y=i&&f.route.id?i[f.route.id]:void 0,_=f.route.errorElement||Vie,o&&(c<0&&p===0?(h5("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,S=null):c===p&&(v=!0,S=f.route.hydrateFallbackElement||null)));let C=e.concat(a.slice(0,p+1)),w=()=>{let x;return y?x=_:v?x=S:f.route.Component?x=T.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=h,T.createElement(Uie,{match:f,routeContext:{outlet:h,matches:C,isDataRoute:t!=null},children:x})};return t&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?T.createElement(Bie,{location:t.location,revalidation:t.revalidation,component:_,error:y,children:w(),routeContext:{outlet:null,matches:C,isDataRoute:!0},unstable_onError:n}):w()},null)}function xw(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zie(s){let e=T.useContext(Kl);return fn(e,xw(s)),e}function Kie(s){let e=T.useContext(Bp);return fn(e,xw(s)),e}function Wie(s){let e=T.useContext(Na);return fn(e,xw(s)),e}function Tw(s){let e=Wie(s),t=e.matches[e.matches.length-1];return fn(t.route.id,`${s} can only be used on routes that contain a unique "id"`),t.route.id}function qie(){return Tw("useRouteId")}function Gie(){let s=T.useContext(Ow),e=Kie("useRouteError"),t=Tw("useRouteError");return s!==void 0?s:e.errors?.[t]}function Yie(){let{router:s}=zie("useNavigate"),e=Tw("useNavigate"),t=T.useRef(!1);return u5(()=>{t.current=!0}),T.useCallback(async(r,a={})=>{la(t.current,c5),t.current&&(typeof r=="number"?s.navigate(r):await s.navigate(r,{fromRouteId:e,...a}))},[s,e])}var K3={};function h5(s,e,t){!e&&!K3[s]&&(K3[s]=!0,la(!1,t))}T.memo(Zie);function Zie({routes:s,future:e,state:t,unstable_onError:n}){return d5(s,void 0,t,n,e)}function Gi(s){fn(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Xie({basename:s="/",children:e=null,location:t,navigationType:n="POP",navigator:r,static:a=!1}){fn(!qu(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let i=s.replace(/^\/*/,"/"),o=T.useMemo(()=>({basename:i,navigator:r,static:a,future:{}}),[i,r,a]);typeof t=="string"&&(t=zl(t));let{pathname:c="/",search:h="",hash:f="",state:p=null,key:y="default"}=t,v=T.useMemo(()=>{let _=ka(c,i);return _==null?null:{location:{pathname:_,search:h,hash:f,state:p,key:y},navigationType:n}},[i,c,h,f,p,y,n]);return la(v!=null,`<Router basename="${i}"> is not able to match the URL "${c}${h}${f}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:T.createElement(da.Provider,{value:o},T.createElement(Wu.Provider,{children:e,value:v}))}function Qie({children:s,location:e}){return $ie(FC(s),e)}function FC(s,e=[]){let t=[];return T.Children.forEach(s,(n,r)=>{if(!T.isValidElement(n))return;let a=[...e,r];if(n.type===T.Fragment){t.push.apply(t,FC(n.props.children,a));return}fn(n.type===Gi,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),fn(!n.props.index||!n.props.children,"An index route cannot have child routes.");let i={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=FC(n.props.children,a)),t.push(i)}),t}var Pf="get",If="application/x-www-form-urlencoded";function Up(s){return s!=null&&typeof s.tagName=="string"}function Jie(s){return Up(s)&&s.tagName.toLowerCase()==="button"}function eoe(s){return Up(s)&&s.tagName.toLowerCase()==="form"}function toe(s){return Up(s)&&s.tagName.toLowerCase()==="input"}function noe(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function roe(s,e){return s.button===0&&(!e||e==="_self")&&!noe(s)}var hf=null;function soe(){if(hf===null)try{new FormData(document.createElement("form"),0),hf=!1}catch{hf=!0}return hf}var aoe=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Z0(s){return s!=null&&!aoe.has(s)?(la(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${If}"`),null):s}function ioe(s,e){let t,n,r,a,i;if(eoe(s)){let o=s.getAttribute("action");n=o?ka(o,e):null,t=s.getAttribute("method")||Pf,r=Z0(s.getAttribute("enctype"))||If,a=new FormData(s)}else if(Jie(s)||toe(s)&&(s.type==="submit"||s.type==="image")){let o=s.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=s.getAttribute("formaction")||o.getAttribute("action");if(n=c?ka(c,e):null,t=s.getAttribute("formmethod")||o.getAttribute("method")||Pf,r=Z0(s.getAttribute("formenctype"))||Z0(o.getAttribute("enctype"))||If,a=new FormData(o,s),!soe()){let{name:h,type:f,value:p}=s;if(f==="image"){let y=h?`${h}.`:"";a.append(`${y}x`,"0"),a.append(`${y}y`,"0")}else h&&a.append(h,p)}}else{if(Up(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=Pf,n=null,r=If,i=s}return a&&r==="text/plain"&&(i=a,a=void 0),{action:n,method:t.toLowerCase(),encType:r,formData:a,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Pw(s,e){if(s===!1||s===null||typeof s>"u")throw new Error(e)}function ooe(s,e,t){let n=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return n.pathname==="/"?n.pathname=`_root.${t}`:e&&ka(n.pathname,e)==="/"?n.pathname=`${e.replace(/\/$/,"")}/_root.${t}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${t}`,n}async function loe(s,e){if(s.id in e)return e[s.id];try{let t=await import(s.module);return e[s.id]=t,t}catch(t){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function coe(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function uoe(s,e,t){let n=await Promise.all(s.map(async r=>{let a=e.routes[r.route.id];if(a){let i=await loe(a,t);return i.links?i.links():[]}return[]}));return poe(n.flat(1).filter(coe).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function W3(s,e,t,n,r,a){let i=(c,h)=>t[h]?c.route.id!==t[h].route.id:!0,o=(c,h)=>t[h].pathname!==c.pathname||t[h].route.path?.endsWith("*")&&t[h].params["*"]!==c.params["*"];return a==="assets"?e.filter((c,h)=>i(c,h)||o(c,h)):a==="data"?e.filter((c,h)=>{let f=n.routes[c.route.id];if(!f||!f.hasLoader)return!1;if(i(c,h)||o(c,h))return!0;if(c.route.shouldRevalidate){let p=c.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:t[0]?.params||{},nextUrl:new URL(s,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function doe(s,e,{includeHydrateFallback:t}={}){return hoe(s.map(n=>{let r=e.routes[n.route.id];if(!r)return[];let a=[r.module];return r.clientActionModule&&(a=a.concat(r.clientActionModule)),r.clientLoaderModule&&(a=a.concat(r.clientLoaderModule)),t&&r.hydrateFallbackModule&&(a=a.concat(r.hydrateFallbackModule)),r.imports&&(a=a.concat(r.imports)),a}).flat(1))}function hoe(s){return[...new Set(s)]}function foe(s){let e={},t=Object.keys(s).sort();for(let n of t)e[n]=s[n];return e}function poe(s,e){let t=new Set;return new Set(e),s.reduce((n,r)=>{let a=JSON.stringify(foe(r));return t.has(a)||(t.add(a),n.push({key:a,link:r})),n},[])}function f5(){let s=T.useContext(Kl);return Pw(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function goe(){let s=T.useContext(Bp);return Pw(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var Iw=T.createContext(void 0);Iw.displayName="FrameworkContext";function p5(){let s=T.useContext(Iw);return Pw(s,"You must render this element inside a <HydratedRouter> element"),s}function moe(s,e){let t=T.useContext(Iw),[n,r]=T.useState(!1),[a,i]=T.useState(!1),{onFocus:o,onBlur:c,onMouseEnter:h,onMouseLeave:f,onTouchStart:p}=e,y=T.useRef(null);T.useEffect(()=>{if(s==="render"&&i(!0),s==="viewport"){let S=w=>{w.forEach(x=>{i(x.isIntersecting)})},C=new IntersectionObserver(S,{threshold:.5});return y.current&&C.observe(y.current),()=>{C.disconnect()}}},[s]),T.useEffect(()=>{if(n){let S=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(S)}}},[n]);let v=()=>{r(!0)},_=()=>{r(!1),i(!1)};return t?s!=="intent"?[a,y,{}]:[a,y,{onFocus:Vc(o,v),onBlur:Vc(c,_),onMouseEnter:Vc(h,v),onMouseLeave:Vc(f,_),onTouchStart:Vc(p,v)}]:[!1,y,{}]}function Vc(s,e){return t=>{s&&s(t),t.defaultPrevented||e(t)}}function yoe({page:s,...e}){let{router:t}=f5(),n=T.useMemo(()=>n5(t.routes,s,t.basename),[t.routes,s,t.basename]);return n?T.createElement(boe,{page:s,matches:n,...e}):null}function voe(s){let{manifest:e,routeModules:t}=p5(),[n,r]=T.useState([]);return T.useEffect(()=>{let a=!1;return uoe(s,e,t).then(i=>{a||r(i)}),()=>{a=!0}},[s,e,t]),n}function boe({page:s,matches:e,...t}){let n=So(),{manifest:r,routeModules:a}=p5(),{basename:i}=f5(),{loaderData:o,matches:c}=goe(),h=T.useMemo(()=>W3(s,e,c,r,n,"data"),[s,e,c,r,n]),f=T.useMemo(()=>W3(s,e,c,r,n,"assets"),[s,e,c,r,n]),p=T.useMemo(()=>{if(s===n.pathname+n.search+n.hash)return[];let _=new Set,S=!1;if(e.forEach(w=>{let x=r.routes[w.route.id];!x||!x.hasLoader||(!h.some(O=>O.route.id===w.route.id)&&w.route.id in o&&a[w.route.id]?.shouldRevalidate||x.hasClientLoader?S=!0:_.add(w.route.id))}),_.size===0)return[];let C=ooe(s,i,"data");return S&&_.size>0&&C.searchParams.set("_routes",e.filter(w=>_.has(w.route.id)).map(w=>w.route.id).join(",")),[C.pathname+C.search]},[i,o,n,r,h,e,s,a]),y=T.useMemo(()=>doe(f,r),[f,r]),v=voe(f);return T.createElement(T.Fragment,null,p.map(_=>T.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...t})),y.map(_=>T.createElement("link",{key:_,rel:"modulepreload",href:_,...t})),v.map(({key:_,link:S})=>T.createElement("link",{key:_,nonce:t.nonce,...S})))}function Coe(...s){return e=>{s.forEach(t=>{typeof t=="function"?t(e):t!=null&&(t.current=e)})}}var g5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{g5&&(window.__reactRouterVersion="7.8.2")}catch{}function Soe({basename:s,children:e,window:t}){let n=T.useRef();n.current==null&&(n.current=cie({window:t,v5Compat:!0}));let r=n.current,[a,i]=T.useState({action:r.action,location:r.location}),o=T.useCallback(c=>{T.startTransition(()=>i(c))},[i]);return T.useLayoutEffect(()=>r.listen(o),[r,o]),T.createElement(Xie,{basename:s,children:e,location:a.location,navigationType:a.action,navigator:r})}var m5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,y5=T.forwardRef(function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:a,replace:i,state:o,target:c,to:h,preventScrollReset:f,viewTransition:p,...y},v){let{basename:_}=T.useContext(da),S=typeof h=="string"&&m5.test(h),C,w=!1;if(typeof h=="string"&&S&&(C=h,g5))try{let F=new URL(window.location.href),j=h.startsWith("//")?new URL(F.protocol+h):new URL(h),B=ka(j.pathname,_);j.origin===F.origin&&B!=null?h=B+j.search+j.hash:w=!0}catch{la(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let x=Fie(h,{relative:r}),[O,P,D]=moe(n,y),k=Ooe(h,{replace:i,state:o,target:c,preventScrollReset:f,relative:r,viewTransition:p});function N(F){e&&e(F),F.defaultPrevented||k(F)}let M=T.createElement("a",{...y,...D,href:C||x,onClick:w||a?e:N,ref:Coe(v,P),target:c,"data-discover":!S&&t==="render"?"true":void 0});return O&&!S?T.createElement(T.Fragment,null,M,T.createElement(yoe,{page:x})):M});y5.displayName="Link";var woe=T.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:a,to:i,viewTransition:o,children:c,...h},f){let p=Yu(i,{relative:h.relative}),y=So(),v=T.useContext(Bp),{navigator:_,basename:S}=T.useContext(da),C=v!=null&&Doe(p)&&o===!0,w=_.encodeLocation?_.encodeLocation(p).pathname:p.pathname,x=y.pathname,O=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;t||(x=x.toLowerCase(),O=O?O.toLowerCase():null,w=w.toLowerCase()),O&&S&&(O=ka(O,S)||O);const P=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let D=x===w||!r&&x.startsWith(w)&&x.charAt(P)==="/",k=O!=null&&(O===w||!r&&O.startsWith(w)&&O.charAt(w.length)==="/"),N={isActive:D,isPending:k,isTransitioning:C},M=D?e:void 0,F;typeof n=="function"?F=n(N):F=[n,D?"active":null,k?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let j=typeof a=="function"?a(N):a;return T.createElement(y5,{...h,"aria-current":M,className:F,ref:f,style:j,to:i,viewTransition:o},typeof c=="function"?c(N):c)});woe.displayName="NavLink";var _oe=T.forwardRef(({discover:s="render",fetcherKey:e,navigate:t,reloadDocument:n,replace:r,state:a,method:i=Pf,action:o,onSubmit:c,relative:h,preventScrollReset:f,viewTransition:p,...y},v)=>{let _=Poe(),S=Ioe(o,{relative:h}),C=i.toLowerCase()==="get"?"get":"post",w=typeof o=="string"&&m5.test(o),x=O=>{if(c&&c(O),O.defaultPrevented)return;O.preventDefault();let P=O.nativeEvent.submitter,D=P?.getAttribute("formmethod")||i;_(P||O.currentTarget,{fetcherKey:e,method:D,navigate:t,replace:r,state:a,relative:h,preventScrollReset:f,viewTransition:p})};return T.createElement("form",{ref:v,method:C,action:S,onSubmit:n?c:x,...y,"data-discover":!w&&s==="render"?"true":void 0})});_oe.displayName="Form";function Eoe(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function v5(s){let e=T.useContext(Kl);return fn(e,Eoe(s)),e}function Ooe(s,{target:e,replace:t,state:n,preventScrollReset:r,relative:a,viewTransition:i}={}){let o=Gu(),c=So(),h=Yu(s,{relative:a});return T.useCallback(f=>{if(roe(f,e)){f.preventDefault();let p=t!==void 0?t:fu(c)===fu(h);o(s,{replace:p,state:n,preventScrollReset:r,relative:a,viewTransition:i})}},[c,o,h,t,n,e,s,r,a,i])}var xoe=0,Toe=()=>`__${String(++xoe)}__`;function Poe(){let{router:s}=v5("useSubmit"),{basename:e}=T.useContext(da),t=qie();return T.useCallback(async(n,r={})=>{let{action:a,method:i,encType:o,formData:c,body:h}=ioe(n,e);if(r.navigate===!1){let f=r.fetcherKey||Toe();await s.fetch(f,t,r.action||a,{preventScrollReset:r.preventScrollReset,formData:c,body:h,formMethod:r.method||i,formEncType:r.encType||o,flushSync:r.flushSync})}else await s.navigate(r.action||a,{preventScrollReset:r.preventScrollReset,formData:c,body:h,formMethod:r.method||i,formEncType:r.encType||o,replace:r.replace,state:r.state,fromRouteId:t,flushSync:r.flushSync,viewTransition:r.viewTransition})},[s,e,t])}function Ioe(s,{relative:e}={}){let{basename:t}=T.useContext(da),n=T.useContext(Na);fn(n,"useFormAction must be used inside a RouteContext");let[r]=n.matches.slice(-1),a={...Yu(s||".",{relative:e})},i=So();if(s==null){a.search=i.search;let o=new URLSearchParams(a.search),c=o.getAll("index");if(c.some(f=>f==="")){o.delete("index"),c.filter(p=>p).forEach(p=>o.append("index",p));let f=o.toString();a.search=f?`?${f}`:""}}return(!s||s===".")&&r.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(a.pathname=a.pathname==="/"?t:Oa([t,a.pathname])),fu(a)}function Doe(s,{relative:e}={}){let t=T.useContext(l5);fn(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=v5("useViewTransitionState"),r=Yu(s,{relative:e});if(!t.isTransitioning)return!1;let a=ka(t.currentLocation.pathname,n)||t.currentLocation.pathname,i=ka(t.nextLocation.pathname,n)||t.nextLocation.pathname;return Qf(r.pathname,i)!=null||Qf(r.pathname,a)!=null}const Roe=document.getElementById(Ew),q3=Roe.contentWindow;class koe{ws;connectTimeoutTimer;isTimeout=!1;init(e){this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.ws&&(this.ws.close(),this.ws=void 0),this.isTimeout=!1;const t=`ws://${e.clientHost}:${e.clientWsPort||e.clientHttpPort-1}`;console.info(`⌛️ ${V("startConnectClientWS",{wsURL:t})}`);const n=new WebSocket(t);this.connectTimeoutTimer=setTimeout(()=>{n.readyState!==WebSocket.OPEN&&(this.isTimeout=!0,n.close(),console.error(`${V("clientConnectTimeout")||"客户端连接超时"}`),qe.emit("connectionChange",{node:ze.get("isNodeWSConnected"),client:!1,from:"client"}),B3())},5e3),n.onclose=()=>{this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.isTimeout||(console.error(`${V("clientServerDisconnected")}`),qe.emit("connectionChange",{node:ze.get("isNodeWSConnected"),client:!1}),B3())},n.onerror=()=>{if(this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),!this.isTimeout){const r=V("clientServerStartError");qe.emit("connectionChange",{node:ze.get("isNodeWSConnected"),client:!1}),console.error(r)}},this.ws=n,n.onopen=()=>{this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.isTimeout||(console.log(`✅ ${V("clientConnectedSuccess")}`),qe.emit("connectionChange",{node:ze.get("isNodeWSConnected"),client:!0,from:"client"}),n.send(JSON.stringify({stage:"connecting",status:"success",message:"Browser connected to Client Server Successfully"})))},n.onmessage=function(r){try{const a=JSON.parse(r.data);switch(a?.method){case"subscribeHandler":q3.__DEV__?.subscribeHandler?.(a?.payload?.event,a?.payload?.data);break;case"invokeHandler":q3.__DEV__?.invokeHandler?.(a?.payload?.callbackId,a?.payload?.data);break;default:break}}catch(a){console.error(a)}}}send(e){this.ws?.readyState&&(e.from="browser",this.ws?.send(JSON.stringify(e)))}close(){this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.ws?.close(),this.ws=void 0}}const Zu=new koe,Noe={start:{msgKey:"uploadGameStart"},success:{msgKey:"uploadGameSuccess",handle:s=>{const{packages:e,clientKey:t}=s||{};ze.setMultiple({packages:e,clientKey:t,isResourcesReady:!0}),qe.emit("setupStatusChange",{isScriptsReady:ze.get("isScriptsReady"),isResourcesReady:!0})}},process:{msgKey:"uploadProcess"},error:{msgKey:"uploadError",handle:s=>{const{msg:e}=s||{};ze.set("isResourcesReady",!1),qe.emit("setupStatusChange",{isScriptsReady:ze.get("isScriptsReady"),isResourcesReady:!1,isResourcesFailed:!0})}},restart:{msgKey:"uploadGameRestart"}};function Aoe(s){const{status:e,payload:t}=s,n=Noe[e];if(!n){console.warn(`Unknown upload status: ${e}`);return}const r=V(n.msgKey);qe.emit("uploadGame",{status:e,msg:r,progress:t?.progress}),n.handle&&n.handle(t)}class Moe{ws;init(){const e=ze.get("nodeWsPort");return console.info(`⌛️ ${V("nodeServerStartConnect")}`),this.ws=new WebSocket(`ws://localhost:${e}`),this.ws.onclose=()=>{console.error(`❌ ${V("nodeServerDisconnect")}`),qe.emit("connectionChange",{node:!1,client:ze.get("isClientWSConnected")})},this.ws.onerror=()=>{const t=V("nodeServerStartError");console.error(t)},this.ws.onopen=()=>{console.log(`✅ ${V("nodeServerConnectedSuccess")}`),qe.emit("connectionChange",{node:!0,client:ze.get("isClientWSConnected")}),this.ws?.send(JSON.stringify({event:"connected",method:"connected",from:"browser"}))},this.ws.onmessage=t=>{if(t.data){const n=JSON.parse(t.data);switch(n.method){case"uploadStatus":{Aoe(n);break}case"compilationStatus":{qe.emit("compilationStatus",n.payload);break}case"unitySplitStatus":{qe.emit("unitySplitStatus",n.payload);break}case"resourceChange":{aa.info("Node WS resourceChange",n?.payload),qe.emit("resourceChange",{});break}case"scanQRCodeSuccess":{const{clientWsPort:a,clientHost:i,clientHttpPort:o}=n.payload;ze.setMultiple({clientHost:i,clientWsPort:a,clientHttpPort:o}),Zu.init({clientWsPort:a,clientHost:i,clientHttpPort:o}),qe.emit("scanQRCode",{status:"success"});break}case"scanQRCodeFailed":{const{msg:a}=n.payload;qe.emit("scanQRCode",{status:"failed",msg:a});break}case"scanQRCodeStart":{qe.emit("scanQRCode",{status:"start"});break}}}},!0}send(e){e.from="browser",this.ws?.send(JSON.stringify(e))}close(){this.ws?.close(),this.ws=void 0}}const pu=new Moe,Foe=["krypton.js","ttmg-core.js"];async function G3(s){try{const e=J4();console.log(`⌛️ ${V("startDebug")}`),console.log(`⌛️ ${V("initClientEnv")}`);const t=await Ln({url:`${e}/game/cwd`,method:"POST",data:{command:"start"}});if(console.log(`✅ ${V("initClientEnvSuccess")}`),Zu.send({method:"setDebugSettings",payload:s.debugSetting}),s.debugMode==="clientPreview"||s.debugMode==="clientDebug")ze.set("isScriptsReady",!0),pu.send({method:"startUpload"});else{console.log(`⌛️ ${V("startInitJSDevEnv")}`);const r=document.getElementById(Ew).contentWindow;r.__DEV__={isEnable:!0,server:e},console.log(`✅ ${V("initJSDevEnvSuccess")}`);const a=await Loe(r,Foe,e),i=Object.values(a).some(o=>!o);ze.set("isScriptsReady",Object.values(a).every(o=>o)),qe.emit("setupStatusChange",{isScriptsReady:ze.get("isScriptsReady"),isResourcesReady:ze.get("isResourcesReady"),isScriptsFailed:i}),i||(console.log(`✅ ${V("setDevScriptsSuccess")}`),pu.send({method:"startUpload"}))}}catch(e){console.log(`❌ ${V("setDevEnvFailed")}`,e?.message??e)}}async function Loe(s,e,t){const n={};for(const r of e)try{console.log(`⏳ ${V("startLoadDevScripts")}: ${r}`);const a=await fetch(`${t}/game/scripts/${r}`);if(!a.ok){console.error(`${V("loadDevScriptsFailed")}: ${r}`),n[r]=!1;continue}const i=await a.text();if(!i){console.error(`${V("loadDevScriptsEmpty")}: ${r}`),n[r]=!1;continue}console.log(`✅ ${V("loadDevScriptsSuccess")}: ${r}`);const o=s.document.createElement("script");o.id=r,o.type="text/javascript",o.text=i,s.document.body.appendChild(o),n[r]=!0,console.log(`✅ ${V("loadDevScriptsInitSuccess")}: ${r}`)}catch(a){console.error(`${V("loadDevScriptsFailed")}: ${r}`,a),n[r]=!1}return n}function $oe(){const s=()=>typeof document<"u"?document.hidden:!1,[e,t]=T.useState(s);return T.useEffect(()=>{const n=()=>{t(document.hidden),Zu.send({method:"sendPageVisibility",payload:{isHidden:document.hidden}})};return document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n)}},[]),e}const joe=m.memo(()=>{const{setMessage:s,hideLoading:e,state:{gameDetail:t,debugSetting:n,isConnected:r,selectedLaunchOption:a,debugMode:i}}=Qr();$oe();const[o,c]=T.useState(""),h=_=>{if(!_.client||!_.node){ze.set("hasSetup",!1);return}if(ze.get("hasSetup"))return;ze.set("hasSetup",!0),(async()=>{e(),s({type:"success",desc:V("setupDevEnv")}),await G3({debugSetting:n,debugMode:i})})()},f=T.useCallback(({status:_,msg:S,progress:C})=>{switch(_){case"start":const w=`⌛️ ${V("uploadStart")}`;s({type:"info",desc:w}),console.log(w);break;case"success":s({type:"success",desc:V("uploadSuccess")}),console.log(`✅ ${V("uploadSuccess")}`);break;case"error":const x=`${V("uploadError")}: ${S}`;s({type:"danger",desc:x}),console.log(x);break;case"restart":break;case"process":const O=`${V("uploadProcess")} ${(C*100).toFixed(0)}%`;s({type:"info",desc:O});break}},[]),p=T.useCallback(({isScriptsReady:_,isResourcesReady:S,isScriptsFailed:C,isResourcesFailed:w})=>{_&&S?(aa.info("scripts and resources are ready, send meta"),eie(t),s({type:"success",desc:V(i==="clientPreview"?"clientPreviewEnvSetupSuccess":"debugEnvSetupSuccess")})):C?s({type:"danger",desc:V("scriptsSetupFailed")}):w&&s({type:"danger",desc:V("resourcesSetupFailed")})},[t,a,i]),y=()=>{if(!r)return;const _=sa.warning({position:"top",duration:1e4,title:V("gameResourceUpdated"),id:o,onClose:()=>{c("")},content:R.jsxs(R.Fragment,{children:[R.jsx("p",{children:V("gameResourceChange")}),R.jsxs("div",{className:"banner-footer",children:[R.jsx(Pe,{type:"tertiary",onClick:()=>{sa.close(_)},children:V("notUpload")}),R.jsx(Pe,{style:{marginLeft:12},type:"warning",onClick:()=>{aa.info("upload"),aa.info("upload iframe onload, 开始重新初始化"),G3({debugSetting:n,debugMode:i}),sa.close(_)},children:V("uploadToClient")})]})]})});c(_)},v=T.useCallback(({status:_,errorMsg:S})=>{_==="start"?(s({type:"info",title:V("gameResourceCompilingTitle"),desc:V("gameResourceCompiling")}),console.warn(`⚠️ ${V("gameResourceCompiling")}`)):_==="end"&&(S?(s({type:"danger",desc:S}),console.error(`❌ ${S}`)):(s({type:"success",title:V("gameResourceCompileSuccessTitle"),desc:V("gameResourceCompileSuccess")}),console.log(`✅ ${V("gameResourceCompileSuccess")}`)))},[]);return T.useEffect(()=>(qe.on("connectionChange",h),qe.on("compilationStatus",v),qe.on("resourceChange",y),qe.on("uploadGame",f),qe.on("setupStatusChange",p),()=>{qe.off("compilationStatus",v),qe.off("resourceChange",y),qe.off("setupStatusChange",p),qe.off("uploadGame",f),qe.off("connectionChange",h)}),[h,v,y,p,f]),null});var rl={},X0,Y3;function b5(){return Y3||(Y3=1,X0={L:1,M:0,Q:3,H:2}),X0}var Q0,Z3;function C5(){return Z3||(Z3=1,Q0={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),Q0}var J0,X3;function Voe(){if(X3)return J0;X3=1;var s=C5();function e(t){this.mode=s.MODE_8BIT_BYTE,this.data=t}return e.prototype={getLength:function(t){return this.data.length},write:function(t){for(var n=0;n<this.data.length;n++)t.put(this.data.charCodeAt(n),8)}},J0=e,J0}var eC,Q3;function Boe(){if(Q3)return eC;Q3=1;var s=b5();function e(t,n){this.totalCount=t,this.dataCount=n}return e.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],e.getRSBlocks=function(t,n){var r=e.getRsBlockTable(t,n);if(r==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+n);for(var a=r.length/3,i=new Array,o=0;o<a;o++)for(var c=r[o*3+0],h=r[o*3+1],f=r[o*3+2],p=0;p<c;p++)i.push(new e(h,f));return i},e.getRsBlockTable=function(t,n){switch(n){case s.L:return e.RS_BLOCK_TABLE[(t-1)*4+0];case s.M:return e.RS_BLOCK_TABLE[(t-1)*4+1];case s.Q:return e.RS_BLOCK_TABLE[(t-1)*4+2];case s.H:return e.RS_BLOCK_TABLE[(t-1)*4+3];default:return}},eC=e,eC}var tC,J3;function Uoe(){if(J3)return tC;J3=1;function s(){this.buffer=new Array,this.length=0}return s.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(var n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},tC=s,tC}var nC,eR;function S5(){if(eR)return nC;eR=1;for(var s={glog:function(t){if(t<1)throw new Error("glog("+t+")");return s.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return s.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},e=0;e<8;e++)s.EXP_TABLE[e]=1<<e;for(var e=8;e<256;e++)s.EXP_TABLE[e]=s.EXP_TABLE[e-4]^s.EXP_TABLE[e-5]^s.EXP_TABLE[e-6]^s.EXP_TABLE[e-8];for(var e=0;e<255;e++)s.LOG_TABLE[s.EXP_TABLE[e]]=e;return nC=s,nC}var rC,tR;function w5(){if(tR)return rC;tR=1;var s=S5();function e(t,n){if(t.length==null)throw new Error(t.length+"/"+n);for(var r=0;r<t.length&&t[r]==0;)r++;this.num=new Array(t.length-r+n);for(var a=0;a<t.length-r;a++)this.num[a]=t[a+r]}return e.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var n=new Array(this.getLength()+t.getLength()-1),r=0;r<this.getLength();r++)for(var a=0;a<t.getLength();a++)n[r+a]^=s.gexp(s.glog(this.get(r))+s.glog(t.get(a)));return new e(n,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var n=s.glog(this.get(0))-s.glog(t.get(0)),r=new Array(this.getLength()),a=0;a<this.getLength();a++)r[a]=this.get(a);for(var a=0;a<t.getLength();a++)r[a]^=s.gexp(s.glog(t.get(a))+n);return new e(r,0).mod(t)}},rC=e,rC}var sC,nR;function Hoe(){if(nR)return sC;nR=1;var s=C5(),e=w5(),t=S5(),n={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},r={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var i=a<<10;r.getBCHDigit(i)-r.getBCHDigit(r.G15)>=0;)i^=r.G15<<r.getBCHDigit(i)-r.getBCHDigit(r.G15);return(a<<10|i)^r.G15_MASK},getBCHTypeNumber:function(a){for(var i=a<<12;r.getBCHDigit(i)-r.getBCHDigit(r.G18)>=0;)i^=r.G18<<r.getBCHDigit(i)-r.getBCHDigit(r.G18);return a<<12|i},getBCHDigit:function(a){for(var i=0;a!=0;)i++,a>>>=1;return i},getPatternPosition:function(a){return r.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,i,o){switch(a){case n.PATTERN000:return(i+o)%2==0;case n.PATTERN001:return i%2==0;case n.PATTERN010:return o%3==0;case n.PATTERN011:return(i+o)%3==0;case n.PATTERN100:return(Math.floor(i/2)+Math.floor(o/3))%2==0;case n.PATTERN101:return i*o%2+i*o%3==0;case n.PATTERN110:return(i*o%2+i*o%3)%2==0;case n.PATTERN111:return(i*o%3+(i+o)%2)%2==0;default:throw new Error("bad maskPattern:"+a)}},getErrorCorrectPolynomial:function(a){for(var i=new e([1],0),o=0;o<a;o++)i=i.multiply(new e([1,t.gexp(o)],0));return i},getLengthInBits:function(a,i){if(1<=i&&i<10)switch(a){case s.MODE_NUMBER:return 10;case s.MODE_ALPHA_NUM:return 9;case s.MODE_8BIT_BYTE:return 8;case s.MODE_KANJI:return 8;default:throw new Error("mode:"+a)}else if(i<27)switch(a){case s.MODE_NUMBER:return 12;case s.MODE_ALPHA_NUM:return 11;case s.MODE_8BIT_BYTE:return 16;case s.MODE_KANJI:return 10;default:throw new Error("mode:"+a)}else if(i<41)switch(a){case s.MODE_NUMBER:return 14;case s.MODE_ALPHA_NUM:return 13;case s.MODE_8BIT_BYTE:return 16;case s.MODE_KANJI:return 12;default:throw new Error("mode:"+a)}else throw new Error("type:"+i)},getLostPoint:function(a){for(var i=a.getModuleCount(),o=0,c=0;c<i;c++)for(var h=0;h<i;h++){for(var f=0,p=a.isDark(c,h),y=-1;y<=1;y++)if(!(c+y<0||i<=c+y))for(var v=-1;v<=1;v++)h+v<0||i<=h+v||y==0&&v==0||p==a.isDark(c+y,h+v)&&f++;f>5&&(o+=3+f-5)}for(var c=0;c<i-1;c++)for(var h=0;h<i-1;h++){var _=0;a.isDark(c,h)&&_++,a.isDark(c+1,h)&&_++,a.isDark(c,h+1)&&_++,a.isDark(c+1,h+1)&&_++,(_==0||_==4)&&(o+=3)}for(var c=0;c<i;c++)for(var h=0;h<i-6;h++)a.isDark(c,h)&&!a.isDark(c,h+1)&&a.isDark(c,h+2)&&a.isDark(c,h+3)&&a.isDark(c,h+4)&&!a.isDark(c,h+5)&&a.isDark(c,h+6)&&(o+=40);for(var h=0;h<i;h++)for(var c=0;c<i-6;c++)a.isDark(c,h)&&!a.isDark(c+1,h)&&a.isDark(c+2,h)&&a.isDark(c+3,h)&&a.isDark(c+4,h)&&!a.isDark(c+5,h)&&a.isDark(c+6,h)&&(o+=40);for(var S=0,h=0;h<i;h++)for(var c=0;c<i;c++)a.isDark(c,h)&&S++;var C=Math.abs(100*S/i/i-50)/5;return o+=C*10,o}};return sC=r,sC}var aC,rR;function zoe(){if(rR)return aC;rR=1;var s=Voe(),e=Boe(),t=Uoe(),n=Hoe(),r=w5();function a(o,c){this.typeNumber=o,this.errorCorrectLevel=c,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var i=a.prototype;return i.addData=function(o){var c=new s(o);this.dataList.push(c),this.dataCache=null},i.isDark=function(o,c){if(o<0||this.moduleCount<=o||c<0||this.moduleCount<=c)throw new Error(o+","+c);return this.modules[o][c]},i.getModuleCount=function(){return this.moduleCount},i.make=function(){if(this.typeNumber<1){var o=1;for(o=1;o<40;o++){for(var c=e.getRSBlocks(o,this.errorCorrectLevel),h=new t,f=0,p=0;p<c.length;p++)f+=c[p].dataCount;for(var p=0;p<this.dataList.length;p++){var y=this.dataList[p];h.put(y.mode,4),h.put(y.getLength(),n.getLengthInBits(y.mode,o)),y.write(h)}if(h.getLengthInBits()<=f*8)break}this.typeNumber=o}this.makeImpl(!1,this.getBestMaskPattern())},i.makeImpl=function(o,c){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var h=0;h<this.moduleCount;h++){this.modules[h]=new Array(this.moduleCount);for(var f=0;f<this.moduleCount;f++)this.modules[h][f]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(o,c),this.typeNumber>=7&&this.setupTypeNumber(o),this.dataCache==null&&(this.dataCache=a.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},i.setupPositionProbePattern=function(o,c){for(var h=-1;h<=7;h++)if(!(o+h<=-1||this.moduleCount<=o+h))for(var f=-1;f<=7;f++)c+f<=-1||this.moduleCount<=c+f||(0<=h&&h<=6&&(f==0||f==6)||0<=f&&f<=6&&(h==0||h==6)||2<=h&&h<=4&&2<=f&&f<=4?this.modules[o+h][c+f]=!0:this.modules[o+h][c+f]=!1)},i.getBestMaskPattern=function(){for(var o=0,c=0,h=0;h<8;h++){this.makeImpl(!0,h);var f=n.getLostPoint(this);(h==0||o>f)&&(o=f,c=h)}return c},i.createMovieClip=function(o,c,h){var f=o.createEmptyMovieClip(c,h),p=1;this.make();for(var y=0;y<this.modules.length;y++)for(var v=y*p,_=0;_<this.modules[y].length;_++){var S=_*p,C=this.modules[y][_];C&&(f.beginFill(0,100),f.moveTo(S,v),f.lineTo(S+p,v),f.lineTo(S+p,v+p),f.lineTo(S,v+p),f.endFill())}return f},i.setupTimingPattern=function(){for(var o=8;o<this.moduleCount-8;o++)this.modules[o][6]==null&&(this.modules[o][6]=o%2==0);for(var c=8;c<this.moduleCount-8;c++)this.modules[6][c]==null&&(this.modules[6][c]=c%2==0)},i.setupPositionAdjustPattern=function(){for(var o=n.getPatternPosition(this.typeNumber),c=0;c<o.length;c++)for(var h=0;h<o.length;h++){var f=o[c],p=o[h];if(this.modules[f][p]==null)for(var y=-2;y<=2;y++)for(var v=-2;v<=2;v++)y==-2||y==2||v==-2||v==2||y==0&&v==0?this.modules[f+y][p+v]=!0:this.modules[f+y][p+v]=!1}},i.setupTypeNumber=function(o){for(var c=n.getBCHTypeNumber(this.typeNumber),h=0;h<18;h++){var f=!o&&(c>>h&1)==1;this.modules[Math.floor(h/3)][h%3+this.moduleCount-8-3]=f}for(var h=0;h<18;h++){var f=!o&&(c>>h&1)==1;this.modules[h%3+this.moduleCount-8-3][Math.floor(h/3)]=f}},i.setupTypeInfo=function(o,c){for(var h=this.errorCorrectLevel<<3|c,f=n.getBCHTypeInfo(h),p=0;p<15;p++){var y=!o&&(f>>p&1)==1;p<6?this.modules[p][8]=y:p<8?this.modules[p+1][8]=y:this.modules[this.moduleCount-15+p][8]=y}for(var p=0;p<15;p++){var y=!o&&(f>>p&1)==1;p<8?this.modules[8][this.moduleCount-p-1]=y:p<9?this.modules[8][15-p-1+1]=y:this.modules[8][15-p-1]=y}this.modules[this.moduleCount-8][8]=!o},i.mapData=function(o,c){for(var h=-1,f=this.moduleCount-1,p=7,y=0,v=this.moduleCount-1;v>0;v-=2)for(v==6&&v--;;){for(var _=0;_<2;_++)if(this.modules[f][v-_]==null){var S=!1;y<o.length&&(S=(o[y]>>>p&1)==1);var C=n.getMask(c,f,v-_);C&&(S=!S),this.modules[f][v-_]=S,p--,p==-1&&(y++,p=7)}if(f+=h,f<0||this.moduleCount<=f){f-=h,h=-h;break}}},a.PAD0=236,a.PAD1=17,a.createData=function(o,c,h){for(var f=e.getRSBlocks(o,c),p=new t,y=0;y<h.length;y++){var v=h[y];p.put(v.mode,4),p.put(v.getLength(),n.getLengthInBits(v.mode,o)),v.write(p)}for(var _=0,y=0;y<f.length;y++)_+=f[y].dataCount;if(p.getLengthInBits()>_*8)throw new Error("code length overflow. ("+p.getLengthInBits()+">"+_*8+")");for(p.getLengthInBits()+4<=_*8&&p.put(0,4);p.getLengthInBits()%8!=0;)p.putBit(!1);for(;!(p.getLengthInBits()>=_*8||(p.put(a.PAD0,8),p.getLengthInBits()>=_*8));)p.put(a.PAD1,8);return a.createBytes(p,f)},a.createBytes=function(o,c){for(var h=0,f=0,p=0,y=new Array(c.length),v=new Array(c.length),_=0;_<c.length;_++){var S=c[_].dataCount,C=c[_].totalCount-S;f=Math.max(f,S),p=Math.max(p,C),y[_]=new Array(S);for(var w=0;w<y[_].length;w++)y[_][w]=255&o.buffer[w+h];h+=S;var x=n.getErrorCorrectPolynomial(C),O=new r(y[_],x.getLength()-1),P=O.mod(x);v[_]=new Array(x.getLength()-1);for(var w=0;w<v[_].length;w++){var D=w+P.getLength()-v[_].length;v[_][w]=D>=0?P.get(D):0}}for(var k=0,w=0;w<c.length;w++)k+=c[w].totalCount;for(var N=new Array(k),M=0,w=0;w<f;w++)for(var _=0;_<c.length;_++)w<y[_].length&&(N[M++]=y[_][w]);for(var w=0;w<p;w++)for(var _=0;_<c.length;_++)w<v[_].length&&(N[M++]=v[_][w]);return N},aC=a,aC}var ff={},sR;function Koe(){if(sR)return ff;sR=1,Object.defineProperty(ff,"__esModule",{value:!0});var s=Object.assign||function(h){for(var f=1;f<arguments.length;f++){var p=arguments[f];for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&(h[y]=p[y])}return h},e=UC(),t=a(e),n=gu(),r=a(n);function a(h){return h&&h.__esModule?h:{default:h}}function i(h,f){var p={};for(var y in h)f.indexOf(y)>=0||Object.prototype.hasOwnProperty.call(h,y)&&(p[y]=h[y]);return p}var o={bgColor:t.default.oneOfType([t.default.object,t.default.string]).isRequired,bgD:t.default.string.isRequired,fgColor:t.default.oneOfType([t.default.object,t.default.string]).isRequired,fgD:t.default.string.isRequired,size:t.default.number.isRequired,title:t.default.string,viewBoxSize:t.default.number.isRequired,xmlns:t.default.string},c=(0,n.forwardRef)(function(h,f){var p=h.bgColor,y=h.bgD,v=h.fgD,_=h.fgColor,S=h.size,C=h.title,w=h.viewBoxSize,x=h.xmlns,O=x===void 0?"http://www.w3.org/2000/svg":x,P=i(h,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return r.default.createElement("svg",s({},P,{height:S,ref:f,viewBox:"0 0 "+w+" "+w,width:S,xmlns:O}),C?r.default.createElement("title",null,C):null,r.default.createElement("path",{d:y,fill:p}),r.default.createElement("path",{d:v,fill:_}))});return c.displayName="QRCodeSvg",c.propTypes=o,ff.default=c,ff}var aR;function Woe(){if(aR)return rl;aR=1,Object.defineProperty(rl,"__esModule",{value:!0}),rl.QRCode=void 0;var s=Object.assign||function(S){for(var C=1;C<arguments.length;C++){var w=arguments[C];for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(S[x]=w[x])}return S},e=UC(),t=p(e),n=b5(),r=p(n),a=zoe(),i=p(a),o=gu(),c=p(o),h=Koe(),f=p(h);function p(S){return S&&S.__esModule?S:{default:S}}function y(S,C){var w={};for(var x in S)C.indexOf(x)>=0||Object.prototype.hasOwnProperty.call(S,x)&&(w[x]=S[x]);return w}var v={bgColor:t.default.oneOfType([t.default.object,t.default.string]),fgColor:t.default.oneOfType([t.default.object,t.default.string]),level:t.default.string,size:t.default.number,value:t.default.string.isRequired},_=(0,o.forwardRef)(function(S,C){var w=S.bgColor,x=w===void 0?"#FFFFFF":w,O=S.fgColor,P=O===void 0?"#000000":O,D=S.level,k=D===void 0?"L":D,N=S.size,M=N===void 0?256:N,F=S.value,j=y(S,["bgColor","fgColor","level","size","value"]),B=new i.default(-1,r.default[k]);B.addData(F),B.make();var W=B.modules;return c.default.createElement(f.default,s({},j,{bgColor:x,bgD:W.map(function(q,J){return q.map(function(ne,te){return ne?"":"M "+te+" "+J+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:P,fgD:W.map(function(q,J){return q.map(function(ne,te){return ne?"M "+te+" "+J+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:C,size:M,viewBoxSize:W.length}))});return rl.QRCode=_,_.displayName="QRCode",_.propTypes=v,rl.default=_,rl}var qoe=Woe();const LC=Fe(qoe),Goe=s=>{const e=Gu(),{isConnected:t}=s,{state:{devSchema:n,schema:r,launchOptions:a,selectedLaunchOption:i,debugMode:o},setShowManualBindIP:c,setSelectedLaunchOption:h,setDebugMode:f}=Qr(),[p,y]=T.useState(!1),v=C=>{C.status==="success"&&y(!1),C.status==="failed"&&y(!1),C.status==="start"&&y(!0)},_=C=>{f(C),localStorage.setItem("debugMode",C)};T.useEffect(()=>(qe.on("scanQRCode",v),()=>{qe.off("scanQRCode",v)}),[]);const S=C=>{if(C==="created")h({...Tf,name:""}),e("/launch_mode");else{const w=a.find(x=>x.id===C);w&&h(w)}};return t?R.jsx("div",{className:"qr-code-container-connected",children:R.jsxs("div",{className:"qr-code-connected-content",children:[R.jsx(LC,{className:"qr-code-connected",size:150,value:r}),R.jsxs("div",{className:"qr-code-connected-info",children:[R.jsx("div",{className:"qr-code-connected-desc-title",children:V("scanQRCodeChange")}),R.jsx("div",{className:"qr-code-connected-desc",children:V("scanQRCodeDesc")})]})]})}):R.jsxs("div",{className:"qr-code-container-disconnected",children:[R.jsx("div",{className:"qr-code-select-container",children:R.jsx(Ls,{value:i?.id,onChange:S,placeholder:V("selectLaunchMode"),style:{minWidth:"140px"},optionList:a.map(C=>({label:C.name,value:C.id}))})}),R.jsxs("div",{className:"qr-code-content",children:[R.jsxs("div",{className:"qr-code-schema",children:[R.jsx(LC,{value:n}),R.jsxs(Pa,{style:{marginTop:"12px"},children:[R.jsx(Pe,{theme:o==="browserDebug"?"solid":"outline",type:"tertiary",size:"small",onClick:()=>_("browserDebug"),children:V("browserDebugMode")}),R.jsx(Pe,{onClick:()=>_("clientPreview"),theme:o==="clientPreview"?"solid":"outline",type:"tertiary",size:"small",children:V("clientPreviewMode")})]}),p&&R.jsxs("div",{className:"qr-code-spin",children:[R.jsx(pn,{size:"large"}),R.jsx("div",{className:"qr-code-text",children:V("scanning")})]})]}),R.jsx("div",{className:"qr-code-title",children:V("scanQRCode")}),R.jsx("div",{className:"qr-code-desc",children:V("scanQRCodeDesc")}),R.jsxs("div",{className:"qr-code-no-response",onClick:()=>c(!0),children:[V("scanQrcodeNoResponse"),R.jsx(Cn,{content:()=>R.jsxs("div",{children:[V("manualBindIPInfo1"),R.jsx("br",{}),V("manualBindIPInfo2")]}),children:R.jsx("div",{style:{display:"inline-flex",alignItems:"center",justifyContent:"bottom",transform:"translateY(4px)"},children:R.jsx(xu,{style:{marginTop:"4px",marginLeft:"4px"}})})})]})]})]})},Yoe=()=>{const{state:{debugSetting:s,debugMode:e,isConnected:t},setDebugSetting:n}=Qr(),r=i=>{n(i)},a=()=>{Zu.send({method:"setDebugSettings",payload:s})};return T.useEffect(()=>(qe.on("connectionChange",a),()=>{qe.off("connectionChange",a)}),[a]),R.jsx("div",{className:"debug-setting-card",children:R.jsxs(yp,{style:{width:"100%"},children:[R.jsxs(wa,{style:{marginBottom:12,display:"flex",alignItems:"center"},children:[R.jsx(De.Text,{style:{fontWeight:"bold",fontSize:16,paddingRight:4},children:V("devOptions")}),R.jsx(Cn,{content:()=>R.jsxs("div",{style:{width:"100%",fontSize:"12px"},children:["1. ",V("devOptionsDomainCheckDesc"),R.jsx("br",{}),"2. ",V("debugSettingAdMockDesc"),R.jsx("br",{}),"3. ",V("debugSettingIAPMockDesc"),R.jsx("br",{}),"4. ",V("debugSettingEnableVconsoleDesc"),R.jsx("br",{}),"5. ",V("debugSettingEnableDevInfoPanelDesc")]}),children:R.jsx(xu,{})})]}),R.jsxs(wa,{className:"debug-setting-row",children:[R.jsxs("div",{className:"debug-setting-item",children:[R.jsx(oi,{style:{marginRight:"8px"},checked:!s.enableDomainCheck,onChange:i=>{r({...s,enableDomainCheck:!i})}}),R.jsx(De.Text,{children:V("debugSettingDomainCheck")})]}),R.jsxs("div",{className:"debug-setting-item",children:[R.jsx(oi,{checked:s.enableAdMock,style:{marginRight:"8px"},onChange:i=>{r({...s,enableAdMock:i})}}),R.jsx(De.Text,{children:V("debugSettingAdMock")})]})]}),R.jsxs(wa,{className:"debug-setting-row",children:[R.jsxs("div",{className:"debug-setting-item",children:[R.jsx(oi,{checked:s.enableIAPMock,style:{marginRight:"8px"},onChange:i=>{r({...s,enableIAPMock:i})}}),R.jsx(De.Text,{children:V("debugSettingIAPMock")})]}),R.jsxs("div",{className:"debug-setting-item",children:[R.jsx(oi,{checked:s.enableDevInfoPanel,style:{marginRight:"8px"},onChange:i=>{r({...s,enableDevInfoPanel:i})}}),R.jsx(De.Text,{children:V("debugSettingDevInfoPanel")})]})]}),R.jsx(wa,{className:"debug-setting-row",children:e!==hi.browserDebug&&R.jsxs("div",{className:"debug-setting-item",children:[R.jsx(oi,{checked:s.enableVConsole,style:{marginRight:"8px"},onChange:i=>{r({...s,enableVConsole:i})}}),R.jsx(De.Text,{children:V("debugSettingVConsole")})]})})]})})},Zoe=()=>{const{state:{showManualBindIP:s},setShowManualBindIP:e}=Qr(),t=r=>{const{ip:a,port:i,wsPort:o}=r;ze.setMultiple({clientHost:a,clientWsPort:o,clientHttpPort:i}),pu.send({method:"manualConnect",payload:{clientHost:a,clientWsPort:o,clientHttpPort:i}}),Zu.init({clientWsPort:o,clientHost:a,clientHttpPort:i}),localStorage.setItem("clientHost",a),localStorage.setItem("clientWsPort",o),localStorage.setItem("clientHttpPort",i),e(!1)},n={ip:ze.get("clientHost")||localStorage.getItem("clientHost")||"",port:ze.get("clientHttpPort")||localStorage.getItem("clientHttpPort")||"",wsPort:ze.get("clientWsPort")||localStorage.getItem("clientWsPort")||""};return R.jsxs(Cr,{title:V("manualBindClientDebugServiceTitle"),visible:s,showCancel:!1,onCancel:()=>e(!1),showOk:!1,footer:null,children:[R.jsx(Ei,{bordered:!1,icon:null,closeIcon:null,fullMode:!1,style:{margin:"12px 0"},description:R.jsxs(R.Fragment,{children:[R.jsx("div",{style:{marginBottom:"8px"},children:V("debug.guide.manualBindIPDesc1")}),R.jsx("div",{style:{marginBottom:"8px"},children:V("debug.guide.manualBindIPDesc2")}),R.jsx("div",{style:{marginBottom:"8px"},children:V("debug.guide.manualBindIPDesc3")})]}),type:"warning"}),R.jsxs(He,{onSubmit:t,initValues:n,style:{marginBottom:"24px"},children:[R.jsx(He.Input,{name:"ip",label:"IP",field:"ip",required:!0,rules:[{required:!0,message:V("debug.guide.manualBindIPInvalid")}]}),R.jsx(He.Input,{name:"port",label:"Port 1 ",field:"port",rules:[{required:!0,message:V("invalidPort")}]}),R.jsx(He.Input,{style:{marginBottom:"12px"},name:"wsPort",label:"Port 2",field:"wsPort",rules:[{required:!0,message:V("invalidPort")}]}),R.jsx(Pe,{type:"primary",htmlType:"submit",style:{marginRight:"8px"},children:V("confirm")}),R.jsx(Pe,{onClick:()=>e(!1),children:V("cancel")})]})]})},Xoe=()=>{const{state:{isConnected:s,message:e}}=T.useContext(_w);return R.jsxs("div",{className:"home-container",children:[R.jsx(Ei,{fullMode:!1,icon:null,closeIcon:null,type:e?.type,title:e?.title,description:e?.desc}),R.jsx(Goe,{isConnected:s}),!s&&R.jsx(Yoe,{}),R.jsx(joe,{}),R.jsx(Zoe,{})]})},Qoe=s=>{const{open:e,onClose:t}=s,[n,r]=T.useState(!0),[a,i]=T.useState(!1),[o,c]=T.useState(!1),[h,f]=T.useState(!1),p=[{label:"是否开启域名校验",description:"开启后,客户端将校验所有请求的域名是否合法,建议开发环境关闭以便调试。",checked:n,onChange:r},{label:"是否开启 IAA Mock",description:"启用后,广告相关接口将返回模拟数据,方便开发和测试广告逻辑。",checked:a,onChange:i},{label:"是否开启 IAP Mock",description:"启用后,内购相关流程将使用模拟支付,避免真实扣费。",checked:o,onChange:c}];return R.jsx("div",{children:R.jsx(bo,{vertical:!0,align:"start",spacing:"loose",children:p.map((y,v)=>R.jsxs("div",{children:[R.jsx(Uf,{checked:y.checked,onChange:_=>y.onChange(_.target.checked),children:y.label}),R.jsx(De.Text,{type:"tertiary",style:{display:"block",marginTop:4},children:y.description})]},v))})})},Joe=[{label:V("scene_scan_qrcode"),value:"scan_qrcode"},{label:V("scene_search"),value:"search"},{label:V("scene_anchor"),value:"anchor"},{label:V("scene_center"),value:"center"},{label:V("scene_ad"),value:"ads"},{label:V("scene_shortcut"),value:"desktop_shortcut"},{label:V("scene_sharing"),value:"dm_sharing"},{label:V("scene_link"),value:"minis_link"}],ele=()=>{const s=Gu(),{state:{launchOptions:e,selectedLaunchOption:t,packages:n},setLaunchOptions:r,setSelectedLaunchOption:a}=Qr(),i=T.useRef(null),o=t||ml,[c,h]=T.useState(o),[f,p]=T.useState(o.id),y=n.map(O=>{if(O.type==="main")return{label:V("gameMainPackage"),value:O.name};if(O.type==="independent")return{label:`${V("independentPackage")}: ${O.name}`,value:O.name}}).filter(Boolean),v=T.useCallback(O=>{const P={...c,...O};P.pkgType==="main"&&P.independentPkg!==void 0&&(P.independentPkg=void 0,i.current&&i.current.setValues({independentPkg:void 0})),h(P)},[c]),_=T.useCallback(()=>{if(!i.current)return;const O=i.current.getValues();O.pkgType==="main"&&(O.independentPkg=void 0);const P=e.findIndex(k=>k.name===O.name&&k.id!=="created"&&k.id!=="normal");let D;P!==-1?(D=[...e],D[P]=O):(O.id=Date.now().toString(),D=[...e.slice(0,-1),O,...e.slice(-1)]),r(D),h(O),a(O),s("/")},[e,s,r,a]),S=T.useCallback(O=>{const P=e.find(D=>D.id===O);if(P){p(O);const D={...P};O==="created"?D.name="":O==="normal"&&(D.name=V("normalLaunchMode")),h(D),i.current?.setValues(D)}},[e]),C=T.useCallback(()=>{const O=f;if(["normal","created"].includes(O))return;const P=e.filter(N=>N.id!==O);r(P);const D=P.find(N=>N.id==="normal")||P.find(N=>N.id==="created")||P[0]||ml,k={...D,...D.id==="created"?{name:""}:{},...D.id==="normal"?{name:V("normalLaunchMode")}:{}};a(k),p(k.id),h(k),i.current?.setValues(k)},[e,f,r,a]),w=T.useCallback(()=>{h(o),i.current?.setValues(o),s("/")},[o,s]),x=e.find(O=>O.id===f);return R.jsxs("div",{children:[R.jsx(Ei,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:V("launchModeDesc"),type:"info"}),R.jsxs(He,{initValues:c,onValueChange:v,getFormApi:O=>i.current=O,style:{padding:20,border:"1px solid #eee",borderRadius:8},onSubmit:_,children:[R.jsx(He.Select,{placeholder:V("selectLaunchMode"),rules:[{required:!0,message:V("selectLaunchMode")}],field:"id",label:V("selectLaunchMode"),optionList:e.map(O=>({label:O.name,value:O.id})),onChange:S,style:{width:"100%"},value:f}),R.jsx(He.Input,{required:!0,placeholder:V("launchModeName"),field:"name",label:V("launchModeName"),rules:[{required:!0,message:V("notEmpty")}],style:{width:"100%"},trigger:"blur"}),R.jsx(He.Select,{field:"pkgName",label:V("selectLaunchPkg"),placeholder:V("selectLaunchPkg"),rules:[{required:!0,message:V("notEmpty")}],optionList:y,style:{width:"100%"}}),R.jsx(He.Select,{field:"scene",label:V("selectScene"),rules:[{required:!0,message:V("notEmpty")}],placeholder:V("selectScene"),optionList:Joe,style:{width:"100%"},filter:!0}),R.jsx(He.Input,{field:"queries",label:V("launchQueries"),placeholder:V("launchQueriesDesc"),trigger:"blur",rules:[{validator:(O,P)=>{const{isValid:D,message:k}=Qae(P);return D?Promise.resolve():Promise.reject(k)}}],style:{width:"100%"}}),R.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:20},children:[["created","normal"].includes(f)?R.jsx(Pe,{style:{marginRight:12},onClick:w,children:V("cancel")}):R.jsx(El,{title:V("deleteLaunchModeConfirm",{name:x?.name??""}),onConfirm:C,position:"bottomRight",children:R.jsx(Pe,{type:"danger",style:{marginRight:12},children:V("delete")})}),R.jsx(Pe,{htmlType:"submit",type:"primary",children:V("saveAndUse")})]})]})]})},tle=({packages:s})=>R.jsx("div",{children:s.map(({name:e,size:t},n)=>{const r=(t/1024/1024).toFixed(2)+"MB",a=t<=4*1024*1024;return R.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",borderRadius:6,backgroundColor:a?"#E8F5E9":"#FCE4EC",marginBottom:n===s.length-1?0:8,width:"fit-content"},children:[R.jsxs(De.Text,{style:{fontWeight:600,fontSize:14},children:[e,":"]}),R.jsx(De.Text,{style:{color:a?"#4CAF50":"#F44336",fontWeight:600},children:r}),R.jsx(De.Text,{type:"tertiary",style:{marginLeft:8},children:a?V("notExceedIndependentPkgSizeLimit",{limit:"4MB"}):V("exceedIndependentPkgSizeLimit",{limit:"4MB"})})]},e)})}),nle=({size:s,limit:e})=>{const t=(s/1024/1024).toFixed(2)+"MB",n=s<=e*1024*1024,r=n?V("notExceedSizeLimit",{limit:e+"MB"}):V("exceedSizeLimit",{limit:e+"MB"});return R.jsxs("div",{style:{display:"flex",alignItems:"center",width:"fit-content",padding:"2px 8px",borderRadius:6,backgroundColor:n?"#E8F5E9":"#FCE4EC"},children:[R.jsx(De.Text,{style:{fontWeight:600,color:n?"#4CAF50":"#F44336"},children:t}),R.jsx(De.Text,{type:"tertiary",style:{marginLeft:8},children:r})]})},rle=({packages:s,limit:e})=>{const t=s.find(i=>i.type==="main")?.size,n=(t/1024/1024).toFixed(2)+"MB",r=t<=e*1024*1024,a=r?V("notExceedMainPkgSizeLimit",{limit:e+"MB"}):V("exceedMainPkgSizeLimit",{limit:e+"MB"});return R.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",width:"fit-content",borderRadius:6,backgroundColor:r?"#E8F5E9":"#FCE4EC"},children:[R.jsx(De.Text,{style:{fontWeight:600,color:r?"#4CAF50":"#F44336"},children:n}),R.jsx(De.Text,{type:"tertiary",style:{marginLeft:8},children:a})]})},sle=({domains:s=[]})=>s?.length?R.jsx(bo,{style:{flexWrap:"wrap"},children:s.map(e=>R.jsx(zt,{children:e},e))}):R.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[R.jsx(De.Text,{style:{fontSize:14},children:"⚠️"}),R.jsx(De.Text,{style:{color:"red",marginLeft:8,fontSize:14},children:V("trustDomainEmptyTip")})]}),ale=({termsOfServiceLink:s})=>s?R.jsx(zt,{children:s}):R.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[R.jsx(De.Text,{children:"⚠️"}),R.jsx(De.Text,{style:{color:"red",marginLeft:8},children:V("termsOfServiceEmptyTip")})]}),ile=({privacyPolicyLink:s})=>s?R.jsx(zt,{children:s}):R.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[R.jsx(De.Text,{children:"⚠️"}),R.jsx(De.Text,{style:{color:"red",marginLeft:8},children:V("privacyPolicyEmptyTip")})]}),ole=()=>R.jsx(Ei,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:R.jsxs("div",{children:[R.jsx(De,{style:{marginBottom:8},children:V("projectInfoDesc")}),R.jsx(De,{children:V("projectInfoDescTip")})]}),type:"info"}),lle=({logo:s,placeholder:e})=>{const[t,n]=T.useState(!1);return R.jsxs("div",{style:{width:100,height:100,borderRadius:4,overflow:"hidden",position:"relative",background:"#f0f0f0",display:"flex",alignItems:"center",justifyContent:"center"},children:[!t&&(e||R.jsx("div",{style:{width:"100%",height:"100%",background:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",color:"#aaa",fontSize:14}})),R.jsx("img",{src:s,alt:"logo",style:{width:"100%",height:"100%",borderRadius:4,objectFit:"cover",position:"absolute",top:0,left:0,opacity:t?1:0,transition:"opacity 0.3s"},onLoad:()=>n(!0)})]})},cle=({description:s})=>s?R.jsx(De.Text,{style:{fontSize:14},children:s}):R.jsx(De.Text,{type:"warning",style:{fontSize:14},children:V("gameDescEmptyTip")});var ule=Object.defineProperty,iR=Object.getOwnPropertySymbols,dle=Object.prototype.hasOwnProperty,hle=Object.prototype.propertyIsEnumerable,oR=(s,e,t)=>e in s?ule(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,fle=(s,e)=>{for(var t in e||(e={}))dle.call(e,t)&&oR(s,t,e[t]);if(iR)for(var t of iR(e))hle.call(e,t)&&oR(s,t,e[t]);return s};function ple(s){return T.createElement("svg",fle({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,"aria-hidden":!0},s),T.createElement("rect",{width:200,height:200,fill:"transparent"}),T.createElement("path",{d:"M74.7 78.6c20.78-6.32 57.55-12.26 71.81-9.86 4.21.7 8.12 1.98 11.36 3.42-.51-1.69-.95-3.5-1.38-5.3l-.04-.18c-1.03-4.27-2.05-8.44-3.95-10.55-4.8-5.32.67-10.12.67-10.12l.93-10.53c13.02 4.82 21.65 14.92 27 25.08 4.57 8.67 6.75 17.37 7.25 22.89 1.06 12-8.18 18.86-19.2 18.86-9.74 0-18.36-1.64-24.81-3.1.64 2.18 5.44 19.18 7.53 32.66l-46.15.58-7.58-14.68-4.66-12.26c-19.46 7.46-50.77 19.02-64.9 18.44-10.35-.42-15.68-15.68-17.44-28.7a71.55 71.55 0 0 1-.67-9.4c0-5.64.3-12.18 2.22-17.89.74-2.21 1.73-4.3 3.04-6.17a18.1 18.1 0 0 1 4.6-4.59c0 4-1.02 13.54 2.8 14.12 5.06.78 10.4-9.08 13.85-7.06 3.87 2.27-1.65 16.34-1.33 17.2.27.7.53 1.4.76 2.07a48.99 48.99 0 0 1 2.25 8.55C46.59 87.56 60 83.06 74.69 78.6Z",fill:"white"}),T.createElement("path",{d:"M181.1 60.56c4.57 8.67 6.75 17.37 7.25 22.89 1.06 12-8.18 18.86-19.2 18.86-9.74 0-18.36-1.64-24.81-3.1m36.77-38.65c-5.36-10.16-13.99-20.26-27-25.08l-.94 10.53s-5.46 4.8-.67 10.12c1.9 2.11 2.92 6.28 3.95 10.55m24.66-6.12c-6-.37-18.32.8-24.66 6.12m0 0c1.57 6.53 3.15 13.3 7.91 13.3 7.2 0-3.6-8.84-17.85-11.24-14.25-2.4-51.03 3.54-71.82 9.86-20.78 6.32-39.04 12.71-42.77 19.1-3.63 6.23 13.24 10.92 4.49-14.17m0 0c-.23-.67-.49-1.36-.76-2.08-.32-.85 5.2-14.92 1.33-17.19-3.45-2.02-8.8 7.84-13.85 7.06-3.82-.58-2.8-10.12-2.8-14.12a18.1 18.1 0 0 0-4.6 4.6M36.4 83.52c-7.27 1.58-21.92 8.1-25.27 11.73m0 0a71.55 71.55 0 0 1-.67-9.41c0-5.64.3-12.18 2.22-17.89m-1.55 27.3c1.76 13 7.09 28.27 17.45 28.7 14.12.57 45.43-10.99 64.89-18.45l4.66 12.26 7.58 14.68 46.15-.58c-2.09-13.48-6.89-30.48-7.53-32.67M15.73 61.8c-.98 3-1.08 5.5.19 7.8m-.2-7.8a24.08 24.08 0 0 0-3.03 6.16m0 0a5.43 5.43 0 0 0 1.25 4.22m130.4 27.02c-.9-3.08-3.12-9.95-4.76-12.76",stroke:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m156.89 15.66-2.04 27.96 2.57 28.1c-7.51-3.07-13.32-4.34-27.25-3.36-11.94.83-31.75 3.95-46.23 7.62-16.66 4.27-37.81 11.64-45.21 15.9-.77-4.64-2.92-10.15-2.92-10.15-.07-.7 2.63-8.32 2.73-13.06.08-3.08-.91-4.45-2.33-4.75a3.47 3.47 0 0 0-2.05.35c-.63.32-.86.48-1.38.84-1.34.98-2.38 2.02-3.95 3.34a17.14 17.14 0 0 1-3.04 2.17 4.6 4.6 0 0 1-2.89.63c-.63-.1-1.21-.47-1.71-1.58l-.07-.89c-.5-5.79-2.7-20.12-2.7-34.91 0-7.74 1.61-10.04 2.7-11.59l.13-.18c3.85-5.53 13.67-6.75 23.12-6.96 2.5-.14 5.2-.2 8.1-.17l.11.15H53.15l-.52.07 18.32 25.49-3.62 14.08 10.2 15.98-2.84-16.49 10-11.99-3.5-27.7s8.78-.5 19.47-1.77c10.69-1.28 18.47-1.9 29.42-1.83 1.64.01 3.4.1 5.23.22 9.64.65 18.55 2.56 21.46 4.4l.13.09h-.01Z",fill:"var(--semi-color-primary-light-default)"}),T.createElement("path",{d:"M143 27.91a1.38 1.38 0 0 1 1.77-.85c.5.18.98.41 1.44.71a1.38 1.38 0 0 1-1.53 2.31c-.26-.17-.53-.3-.82-.4a1.38 1.38 0 0 1-.85-1.77Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M140.65 28.12c.21.74-.21 1.5-.95 1.72-.36.1-.73.22-1.11.36a1.38 1.38 0 1 1-.95-2.6c.43-.16.87-.3 1.3-.43.74-.2 1.5.22 1.71.95Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M134.74 30.4c.37.67.14 1.51-.53 1.89l-1.07.62a1.38 1.38 0 1 1-1.41-2.38l1.12-.65a1.38 1.38 0 0 1 1.89.52Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M97.86 31.43h.76a1.38 1.38 0 1 1-.06 2.77h-.52a6.7 6.7 0 0 0-.57.1 1.38 1.38 0 0 1-.64-2.68c.33-.08.64-.14.94-.18l.09-.01Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M147.78 31.75c.73-.23 1.5.19 1.72.92.13.43.25.88.35 1.35a1.38 1.38 0 0 1-2.7.58c-.1-.4-.19-.78-.3-1.13-.22-.73.2-1.5.93-1.72Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M102.27 33.13c.19-.75.94-1.2 1.68-1.01.45.11.89.23 1.3.37a1.38 1.38 0 0 1-.84 2.63c-.36-.11-.73-.22-1.13-.32a1.38 1.38 0 0 1-1-1.67Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M129.3 33.68c.42.64.25 1.5-.4 1.92l-.52.34-.53.36a1.38 1.38 0 0 1-1.53-2.31l.32-.21.21-.14.3-.2.23-.15c.64-.42 1.5-.25 1.92.39Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M108.25 35.22c.36-.67 1.2-.92 1.88-.55a246.5 246.5 0 0 1 1.11.61 1.38 1.38 0 0 1-1.33 2.43l-.5-.28h-.01l-.6-.34a1.38 1.38 0 0 1-.55-1.87Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M92.83 35.77c.76-.01 1.4.6 1.4 1.36.01.16.03.34.07.55a1.38 1.38 0 1 1-2.7.58 5.62 5.62 0 0 1-.13-1.08c-.01-.76.6-1.4 1.36-1.4Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M124 37.2c.31.7 0 1.51-.7 1.82a6.07 6.07 0 0 1-1.44.45 1.38 1.38 0 1 1-.67-2.68l.58-.16c.1-.03.24-.07.42-.15.7-.3 1.51.02 1.82.72Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M113.9 38.14c.15-.75.89-1.22 1.63-1.06.35.07.72.13 1.1.16a1.38 1.38 0 0 1-.26 2.76c-.49-.05-.96-.12-1.41-.22a1.38 1.38 0 0 1-1.07-1.64Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M148.98 37.95c.76-.01 1.4.6 1.4 1.36a38.45 38.45 0 0 1 0 1.42 1.38 1.38 0 0 1-2.77-.08 24.28 24.28 0 0 0 0-1.3c0-.76.6-1.39 1.37-1.4Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M148.6 44.88c.75.16 1.22.9 1.06 1.65-.1.47-.22.94-.34 1.41a1.38 1.38 0 1 1-2.68-.7c.12-.43.22-.87.31-1.3.17-.75.9-1.22 1.65-1.06Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M146.69 51.6c.7.31 1 1.13.7 1.83-.2.44-.41.88-.63 1.31a1.38 1.38 0 0 1-2.48-1.24c.2-.4.4-.8.58-1.2.31-.7 1.13-1.01 1.83-.7Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M41.67 55.45c.07.77-.5 1.44-1.25 1.5-.43.04-.86.1-1.26.19a1.38 1.38 0 1 1-.54-2.72c.5-.1 1.02-.17 1.55-.22.76-.07 1.43.5 1.5 1.25Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M44.58 55.78c.22-.73 1-1.15 1.72-.93l.74.23a1.38 1.38 0 1 1-.9 2.62l-.62-.2a1.38 1.38 0 0 1-.94-1.72Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M91.9 56.9c.05.76-.52 1.42-1.29 1.47-.44.02-.89.06-1.32.11a1.38 1.38 0 0 1-.31-2.75c.48-.05.96-.1 1.45-.13.77-.05 1.42.53 1.47 1.3Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M94.72 56.95c.07-.76.74-1.33 1.5-1.26l1.43.14a1.38 1.38 0 0 1-.32 2.75c-.45-.05-.9-.1-1.35-.13a1.38 1.38 0 0 1-1.26-1.5Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M101.64 57.83c.16-.75.9-1.22 1.64-1.07l1.39.31a1.38 1.38 0 1 1-.62 2.7l-1.34-.3a1.38 1.38 0 0 1-1.07-1.64Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M34.85 57.26c.48.6.39 1.46-.2 1.94-.33.27-.63.55-.9.84a1.38 1.38 0 0 1-2.03-1.89c.36-.39.76-.75 1.18-1.1.6-.48 1.46-.39 1.95.2Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M85 57.9c.29.71-.06 1.51-.78 1.8a15.8 15.8 0 0 0-1.26.54 1.38 1.38 0 1 1-1.15-2.52 71.64 71.64 0 0 1 1.4-.6c.71-.28 1.52.07 1.8.78Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M143.4 57.76c.61.47.72 1.34.26 1.95-.3.39-.62.77-.94 1.14a1.38 1.38 0 0 1-2.09-1.81 24 24 0 0 0 .84-1.03c.47-.6 1.33-.71 1.94-.25Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M108.43 59.46c.22-.74.99-1.15 1.72-.93l1.35.41a1.38 1.38 0 1 1-.82 2.64l-1.32-.4a1.38 1.38 0 0 1-.93-1.72Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M115.08 61.58a1.38 1.38 0 0 1 1.77-.82l1.32.48a1.38 1.38 0 0 1-.97 2.6c-.43-.17-.87-.33-1.3-.48a1.38 1.38 0 0 1-.82-1.78Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M138.67 62.89c.42.64.25 1.5-.4 1.92-.41.27-.85.54-1.29.78a1.38 1.38 0 0 1-1.32-2.43c.37-.2.73-.43 1.1-.66.63-.42 1.49-.25 1.91.39Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M30.5 62.78c.77.07 1.33.74 1.26 1.5l-.03.59.01.75-1.6 1.4a1.38 1.38 0 0 1-1.16-1.32l-.02-.83c0-.28.02-.56.04-.84.07-.76.75-1.32 1.5-1.25Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M121.6 64.07c.3-.7 1.1-1.04 1.8-.75a146.8 146.8 0 0 1 1.26.52 1.38 1.38 0 1 1-.97 2.59 19.62 19.62 0 0 1-1.35-.55c-.7-.3-1.04-1.1-.74-1.81Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M72.11 64.94c.48.6.4 1.47-.2 1.95-.38.3-.74.62-1.09.92A1.38 1.38 0 1 1 69 65.73c.37-.33.76-.66 1.17-.99.59-.48 1.46-.39 1.94.2Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M132.4 65.92c.09.76-.46 1.44-1.22 1.53-.5.05-1.02.08-1.53.09a1.38 1.38 0 1 1-.02-2.77c.42 0 .84-.03 1.25-.07.76-.09 1.44.46 1.53 1.22Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M66.66 69.9c.57.52.6 1.4.09 1.96l-.73.8-.02.02-.16.18-.08.09a1.38 1.38 0 0 1-2.05-1.86l.25-.28.75-.82c.51-.56 1.39-.6 1.95-.09Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M61.6 75.28c.45.61.31 1.48-.3 1.93-.44.31-.88.61-1.36.89a1.38 1.38 0 1 1-1.4-2.4c.4-.22.77-.46 1.12-.72a1.38 1.38 0 0 1 1.94.3Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M37.67 75.97c.42.19.86.37 1.35.53a1.38 1.38 0 0 1-.89 2.62c-.56-.19-1.1-.4-1.6-.63l.72-2.63c.14.01.28.05.42.11Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M55.05 78.57c.12.75-.4 1.46-1.15 1.58-.5.08-1 .15-1.54.2a1.38 1.38 0 1 1-.28-2.75c.49-.05.95-.11 1.39-.18.75-.12 1.46.4 1.58 1.15Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M43.4 78.87c.06-.76.73-1.33 1.49-1.27a38.43 38.43 0 0 0 1.5.1 1.38 1.38 0 1 1-.12 2.76 62.94 62.94 0 0 1-1.6-.1 1.38 1.38 0 0 1-1.27-1.49Z",fill:"var(--semi-color-primary)"}),T.createElement("g",{clipPath:"url(#clip_failure_96_39_65)"},T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M30.9 46.87a13.45 13.45 0 0 1 9.37-16.53 13.46 13.46 0 0 1 16.52 9.39c2.64 9.56-4.76 29.27-5.14 29.9a.75.75 0 0 1-.99.27c-.64-.34-17.11-13.47-19.76-23.03Zm14.36 1.54a6.1 6.1 0 0 1-3.25-11.75 6.1 6.1 0 0 1 3.25 11.75Z",fill:"var(--semi-color-primary)"})),T.createElement("path",{d:"M102.31 100.69c-2.8 1.55-5.63 2.85-9.36 4.58l1.48 3.92c2.14-.96 6.16-6.03 7.88-8.5Z",fill:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M121 63.04c8.85 2.1 12.43-6.5 13.12-8.77.68-2.27-5.6-11.86-8-11.2l-.42.12-.23.06c-3.1.82-11.15 2.94-12.35 8-1.3 5.46 2.4 10.49 7.88 11.79Z",fill:"#515151"}),T.createElement("path",{d:"M134.5 64.73c-.43.47-1.2.74-2.33.73a12.7 12.7 0 0 1-4.06-.86 31.25 31.25 0 0 1-9.94-6.22c-3.25-2.97-5.97-5.8-7.59-8.42-1.61-2.61-2.05-4.88-.98-6.84a3.7 3.7 0 0 1 2.11-1.86 4.53 4.53 0 0 1 2.9.15c2.16.76 4.57 2.83 6.48 6.02 3.4 5.63 6.89 8.23 9.7 10.33.49.35.95.7 1.38 1.03a7.29 7.29 0 0 1 2.61 3.48c.34 1.1.16 1.97-.28 2.46Z",fill:"white",stroke:"#515151"}),T.createElement("mask",{id:"mask_failure_130_526","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:98,y:44,width:36,height:27},T.createElement("path",{d:"M130.53 62.1c-.5-3.3-9.52-14.75-16.08-15.03l-12.68 4.52 6.47 14.16 17.25 3.07c1.84-1.14 5.43-4.07 5.04-6.72Z",fill:"#C4C4C4"})),T.createElement("g",{mask:"url(#mask_failure_130_526)"},T.createElement("path",{d:"M127.2 63.62a9.74 9.74 0 0 1-13.76.5 9.74 9.74 0 0 1-.32-13.77 9.74 9.74 0 0 1 13.77-.5 9.74 9.74 0 0 1 .32 13.77Z",fill:"white",stroke:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m116.79 47.35-.02.37c2.86.5 8.57 2.59 8.58 6.87 0 5.36-7.44 9.34-14.47 3.46-.34-.28-.66-.53-.95-.74a10.09 10.09 0 0 0 3.17 7.17 10.24 10.24 0 0 0 14.47-.52 10.24 10.24 0 0 0-.34-14.47 10.16 10.16 0 0 0-10.44-2.14Z",fill:"#515151"}),T.createElement("path",{d:"M119.34 55a.79.79 0 1 0-1.1-1.12.79.79 0 0 0 1.1 1.12Z",fill:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.98 50.72c.21-.09.45.01.54.22a7.87 7.87 0 0 0 1.84 2.65.41.41 0 1 1-.55.62 8.67 8.67 0 0 1-2.05-2.95.41.41 0 0 1 .22-.54Z",fill:"#515151"}),T.createElement("path",{d:"M114.85 52.4a.79.79 0 1 0-1.1-1.1.79.79 0 0 0 1.1 1.1Z",fill:"#515151"}),T.createElement("mask",{id:"path-18-inside-1",fill:"white"},T.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)"})),T.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)",fill:"white"}),T.createElement("path",{d:"m128.42 60.04.01-.01a.03.03 0 0 1 .02 0l-4.12 4.37a5.98 5.98 0 0 0 8.45-.25l-4.36-4.11Zm.03 0v.02l-4.37-4.11a5.98 5.98 0 0 0 .25 8.45l4.12-4.37Zm0 .03h-.01a.03.03 0 0 1-.02 0l4.12-4.37a5.98 5.98 0 0 0-8.46.25l4.37 4.12Zm-.03 0v-.03l4.37 4.11a5.98 5.98 0 0 0-.25-8.45l-4.12 4.37Z",fill:"#515151",mask:"url(#path-18-inside-1)"})),T.createElement("path",{d:"M145.63 40.19c1.37-2.75 12.75 2.35 16.14 6.78 3.38 4.43 1.48 10.74-1.9 9.68-6.69-2.12-7.56-6.7-7.94-9.48-1.2-1.85-7.67-4.24-6.3-6.98Z",fill:"white",stroke:"#515151"}),T.createElement("path",{d:"m158.95 41.56 6.64 2.52 1.66 12.47-8.3 1.98-3.47-12.03 3.47-4.94Z",fill:"white"}),T.createElement("path",{d:"M167.3 151.94c5.19 1.66 23.35 35.57 19.05 35.57-13.86 0-34.5.53-71.42.53-15.63 0-17.9-5.16-11.79-22.08a353.23 353.23 0 0 1 6.14-15.76l32.5 1.26c-.43 1.53-.91 3.07-1.38 4.4a26.82 26.82 0 0 1 8.73-1.47c5.27 0 7.04 1.4 11.77 0 2.13-.62 4.8-2.97 6.4-2.45Z",fill:"white",className:""}),T.createElement("path",{d:"M140.4 155.87c.47-1.34.95-2.88 1.38-4.4l-32.5-1.27a353.23 353.23 0 0 0-6.14 15.76c-6.1 16.92-3.84 22.08 11.79 22.08 36.93 0 57.56-.53 71.42-.53 4.3 0-13.86-33.91-19.06-35.57-1.6-.52-4.26 1.83-6.4 2.45-4.72 1.4-6.5 0-11.76 0-3.08 0-6.06.55-8.72 1.48Zm0 0a26.67 26.67 0 0 1-4.44 8.38c-1.7 2.22-3.99 4.43-5.43 4.33-1.44-.1-1.42-3.18 0-5.66 1.97-3.44 6.45-5.87 9.88-7.05Z",stroke:"#1C1F23",className:""}),T.createElement("path",{d:"M149.25 131.7s3.36 19.46-12.34 21.04c-11.53 1.15-40.77-4.55-53.76-7.79 4.72 12.82 9.61 39.86 7 42.16-3.33 2.93-47.55 1.76-55.96 0-8.42-1.75 13.82-11.46 15.45-14.66 2.99-5.84-5.48-21.18-5.75-45.45-.27-24.27 18.18-24.86 34.47-21.64 13.02 2.57 41.63 18.33 52.56 26.86l18.33-.52Z",fill:"white",stroke:"#515151"}),T.createElement("path",{d:"M141.5 153.87c-3.11 2.55-27.72 5-35.58 3.53l2.75-6.8c20.23 2.85 28.08 3.34 33.46 1.16l-.63 2.11Z",fill:"#515151",className:"__web-inspector-hide-shortcut__"}),T.createElement("path",{d:"M141.5 153.87c-3.11 2.55-27.72 5-35.58 3.53l2.75-6.8c20.23 2.85 28.08 3.34 33.46 1.16l-.63 2.11Z",fill:"#515151"}),T.createElement("path",{d:"M126.02 142.7c-3.1-2.99-4.99-7.5-4.16-12.35",stroke:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M130.6 95.65c-9.03-10.98-18.97-19.74-25.5-24.56l1.63-2.22c6.7 4.95 16.81 13.86 26 25.02 9.18 11.16 17.54 24.67 20.59 38.83l-2.7.59c-2.91-13.56-10.97-26.67-20.02-37.66Z",fill:"#515151"}),T.createElement("path",{d:"m149.12 107.09-16.36 13.2 22.27 17.8 8.87-19.19c-.14-3.93-2.34-5.34-5.83-4.66l-3.12-2.5c.08-3.5-2.18-5.64-5.83-4.65Z",fill:"#E6E8EA"}),T.createElement("path",{d:"m148.24 128.62 9.45-14.34-2.91-2.33-10.94 13.07 4.4 3.6Z",stroke:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M143.67 127.98a6.93 6.93 0 1 1-10.82-8.65 6.93 6.93 0 0 1 10.82 8.65Zm12.28 9.82a6.93 6.93 0 1 1-10.82-8.66 6.93 6.93 0 0 1 10.82 8.66Z",fill:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m133.43 123.46 9.21-1.8.32 1.61-9.2 1.81-.33-1.62Z",fill:"white"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m145.5 133.11 9.21-1.8.32 1.62-9.2 1.8-.33-1.62Z",fill:"white"}),T.createElement("defs",null,T.createElement("clipPath",{id:"clip_failure_96_39_65"},T.createElement("rect",{width:44.4004,height:44.4627,transform:"matrix(0.963965 -0.266028 0.266198 0.963918 18.4214 34.6221)",fill:"white"}))))}var gle=ple,mle=Object.defineProperty,lR=Object.getOwnPropertySymbols,yle=Object.prototype.hasOwnProperty,vle=Object.prototype.propertyIsEnumerable,cR=(s,e,t)=>e in s?mle(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ble=(s,e)=>{for(var t in e||(e={}))yle.call(e,t)&&cR(s,t,e[t]);if(lR)for(var t of lR(e))vle.call(e,t)&&cR(s,t,e[t]);return s};function Cle(s){return T.createElement("svg",ble({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,"aria-hidden":!0},s),T.createElement("rect",{width:200,height:200,fill:"transparent"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M64.09 64.86V8.56L5.76 78.94h44.26v20.3h14.07v-20.3h8.82V64.86h-8.82Zm110.18 0V8.56L124.1 69.08c.7-3.74 1.07-7.7 1.07-11.76 0-11-2.7-21.1-7.25-28.55-4.5-7.4-11.13-12.63-19-12.63-7.88 0-14.5 5.23-19.01 12.63-4.54 7.45-7.25 17.55-7.25 28.55s2.7 21.1 7.25 28.55c4.5 7.4 11.13 12.62 19 12.62 7.88 0 14.5-5.23 19.01-12.62a44.09 44.09 0 0 0 3.4-6.93h38.86v20.3h14.08v-20.3h8.81V64.86h-8.81Zm-138.57 0L50.02 47.6v17.26H35.7Zm124.5 0h-14.32L160.2 47.6v17.26Zm-49.1-7.54c0 8.84-2.2 16.32-5.19 21.22-3.08 5.08-5.87 5.87-6.98 5.87-1.12 0-3.9-.8-7-5.87-2.98-4.9-5.19-12.38-5.19-21.22 0-8.85 2.21-16.33 5.2-21.23 3.09-5.07 5.87-5.87 6.98-5.87 1.12 0 3.9.8 7 5.87 2.98 4.9 5.19 12.38 5.19 21.23Z",fill:"var(--semi-color-primary-light-default)"}),T.createElement("path",{d:"M178.34 186.57c-1.85 2.2-6.66 1.02-8.13.24a2.46 2.46 0 0 1-.34-.22c-1.94.22-14.94-.5-15.12-.46-6.12 1.43-14.06 1.03-15.2 1-1.36-.05-4.53-1.33-5.75-5.08-1.2-3.67 0-7.12 2.16-13.37l.13-.38-1.43 2.83c-7.37 14.43-11.05 19.7-17.43 20.14-6.38.45-34.34-.09-41.09-.78-6.75-.7-9.42-1.68-9.35-2.83.05-.92 2.98-2.2 4.44-2.72-5.88-1.57-20.16-5.97-30.18-10.98-12.52-6.26-25.14-15.8-21.91-28.92 3.22-13.13 15.76-16.8 25.59-17.38 2.75-.16 5.14-.1 7.16.07 3.76.33 6.21 1.06 7.2 1.53-1.12-6.37-3.33-19.34-3.33-20.21 0-1.1-3.02-10.67-3.64-14.35-.1-.55-1.11-5.6 3.64-5.02 4.75.57 12.4 18.2 15.88 28.7a401.55 401.55 0 0 0 11.15-9.87c.84-1.02 9.36-9.75 14.87-13.84a60.09 60.09 0 0 1 33-11.76c16.29-.81 34.49 2.36 40.9 11.91 6.4 9.55 6.1 34.44 6.44 48.71.35 14.27.84 27.64 2.11 29.76 1.27 2.12 6.45 5.02 9.77 7.14 3.33 2.11 4.45 3.9 4.36 4.2-.1.3-.4.58-2.24 1.08.34.47.12 1.38-2.12 1.6-4.7.48-8.64-.74-11.54-.74Z",fill:"white"}),T.createElement("path",{d:"M192 185.71c-1.6-2.3-9.7-5.34-15.04-5.75-5.34-.41-6.45.53-7.4 1.85-1 1.37-1.05 3.72.3 4.78m22.14-.88c.34.47.12 1.38-2.12 1.6-4.7.48-8.64-.74-11.54-.74-1.85 2.2-6.66 1.02-8.13.24a2.46 2.46 0 0 1-.34-.22m22.13-.88c1.84-.5 2.15-.78 2.24-1.08.09-.3-1.03-2.09-4.36-4.2-3.32-2.12-8.5-5.02-9.77-7.14-1.27-2.12-1.76-15.49-2.1-29.76-.36-14.27-.06-39.16-6.46-48.7-6.4-9.56-24.6-12.73-40.89-11.92a60.09 60.09 0 0 0-33 11.76c-5.5 4.09-14.03 12.82-14.87 13.84-.37.46-5.43 4.9-11.15 9.87-3.49-10.5-11.13-28.13-15.88-28.7-4.75-.58-3.73 4.47-3.64 5.02.62 3.68 3.64 13.26 3.64 14.35 0 .87 2.21 13.84 3.32 20.2-.98-.46-3.43-1.2-7.19-1.52m19.34 57.21c-5.88-1.57-20.16-5.97-30.18-10.98-12.52-6.26-25.14-15.8-21.91-28.92 3.22-13.13 15.76-16.8 25.59-17.38 2.75-.16 5.14-.1 7.16.07m19.34 57.21c-1.46.52-4.39 1.8-4.44 2.72-.07 1.15 2.6 2.14 9.35 2.83 6.75.7 34.71 1.23 41.09.78 6.38-.44 10.06-5.71 17.43-20.14l1.43-2.83m-64.86 16.64c5.89-2.49 12.35-6.32 16.49-10.11 5.07-4.65 9.55-13.46 9.96-14.28l.82-1.56m43.43 4.15c-.47-3-1.21-7.33.37-14.67 1.47-6.81 6.6-15.3 6.65-11.03.05 4-6.05 17.35-12.86 30.86m0 0c-2.25 6.5-3.51 10-2.3 13.75 1.23 3.75 4.4 5.03 5.76 5.07 1.14.04 9.08.44 15.2-.99m0 0a19.5 19.5 0 0 0 3.27-1.03c6.09-2.63 10.92-8.55 13.53-24.26 2.62-15.71 1.5-42.36-10.29-50.78-11.78-8.41-21.32-6.07-34.03 5.8-5.34 4.98-11.86 14.52-17.42 23.52m44.94 46.75c.18-.04 13.19.68 15.12.46m-60.06-47.2c-.8-3.66-1.44-7.16-1.94-10.43m1.94 10.42c-1.24 2-2.43 3.98-3.55 5.87m.32-30.9c0 3.75.41 8.8 1.3 14.61m0 0c-2.32 2.46-7.78 7.15-13.67 11.55m-42.32-12.78s1.24 7.12 3.87 11.42a29.93 29.93 0 0 0 6.61 7.8m36.13 12.04c-6.87-3.1-17.87-6.8-22.51-8.27m22.51 8.27a394.7 394.7 0 0 1 7.76-13.74M76 150.72c.39-.06.78-.14 1.17-.23 3.97-.93 10.76-5.29 17.05-9.98m-18.22 10.2c-4.7.8-9.36-.34-13.62-3.76m0 0c-3.29-.85-11.28-2.39-12.86-2.41m56.75.71c-2.32-.94-9-3.55-12.05-4.74",stroke:"#515151"}),T.createElement("path",{d:"m77.74 73.31 23.73 43.2-1.7 2.5-22.73 9.55-24.58-44.48 21.9-10.77h3.38Z",fill:"#E6E8EA"}),T.createElement("path",{d:"M74.35 73.31h3.4l23.72 43.2-1.7 2.5m-25.42-45.7-21.9 10.77 24.59 44.48L99.78 119m-25.43-45.7 25.43 45.7",stroke:"#515151"}),T.createElement("path",{d:"M83.9 116.95c.96 1.97-4.91 4.57-8.32 6.18-1.33.63-2.1.98-2.7 1.2.9 3.3 1.24 8.14-4.48 9.82-5.73 1.69-15.07-1.02-18-9.6-2.95-8.6.01-19.97 9.05-27.04 5.67-4.42 15.01-5.77 19.42-4.05 2.15.82 1.38 2.71-.56 4.44a58.1 58.1 0 0 1-4.53 3.58c.4-.01.8-.02 1.23 0 4.13.06 7.26 1.11 7.42 3.14.07.94-.8 2.13-1.95 3.45-.62.71-1.28 1.34-1.95 1.88 2.8-.22 5.94 1.05 2.9 4.2-.41.43-.85.83-1.29 1.2 1.73.02 3.24.56 3.75 1.6Z",fill:"white"}),T.createElement("path",{d:"M69.73 125.1c1.65-.34 2.2-.4 3.14-.76m0 0c.6-.23 1.38-.58 2.7-1.21 3.42-1.6 9.3-4.21 8.32-6.17-.86-1.76-4.53-2.09-7.33-.97-2.84 1.13-3.58 2.24-3.46 2.56.12.31 4.75-.69 8.34-4.4 3.4-3.54-.96-4.7-3.9-4.06-2.26.5-6.4 2.06-6.16 2.85.16.5 5.33-.54 9.1-4.87 1.14-1.32 2.02-2.51 1.95-3.45-.16-2.03-3.3-3.08-7.42-3.15-8.83-.16-11.56 4.78-11.16 5.1 1.1.92 9.36-4.15 14.46-8.67 1.94-1.73 2.71-3.62.56-4.44-4.4-1.72-13.75-.37-19.42 4.05-9.04 7.07-12 18.44-9.06 27.03 2.94 8.6 12.28 11.3 18 9.61 5.73-1.68 5.4-6.53 4.48-9.81Z",stroke:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M106.48 120.15c-.2 1.56-.53 3.98-1.2 6.51-.68 2.53-1.71 5.16-3.3 7.14l.2.19 5.67-4.97-1.1-8.87h-.27Zm31.09 45.32-.25-.1-11.3 21.27h11.92l-.43-.26c-3.5-2.07-4.07-5.79-3.46-9.77.52-3.4 1.9-6.95 3-9.77l.52-1.37Zm-85.81-37.9-.24.13a55.3 55.3 0 0 0 1.65 6.39l.01.04.05.03c1.63.84 4.4 1.85 7.45 2.14 3.05.3 6.39-.12 9.1-2.15l-.12-.24c-3.14 1.2-11.14 1.63-17.9-6.33Z",fill:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m133.54 82.83.02-.16h-.16c-1.82.1-5.84.39-9.87.96-2.02.28-4.04.64-5.79 1.08-1.74.43-3.23.95-4.18 1.58l-.06.04v.07c-.04 1.8.13 3.69.65 5.35a7.28 7.28 0 0 0 2.8 4.05c2.81 1.86 6.69 1.62 9.98-.58 3.3-2.2 6.04-6.37 6.61-12.4Z",fill:"#515151"}),T.createElement("path",{d:"M126.66 84.73a9.79 9.79 0 0 1-9.7 9.87 9.79 9.79 0 0 1-9.7-9.87 9.79 9.79 0 0 1 9.7-9.87c5.35 0 9.7 4.41 9.7 9.87Z",fill:"white",stroke:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M109.41 70.6c.66.25 1.25.47 1.9.26.52-.18.83-.7 1.18-1.3.75-1.27 1.73-2.93 5.56-2.56 3.86.38 4.6 2.17 5.1 3.43.21.5.38.9.69 1.12.48.32.84.33 1.26.35.55.02 1.2.05 2.37.75 1.41.85 2.49 5.65.23 9.93l.26.43c-.45 2.15-3.05 4.37-3.05 4.14 0-3.04 0-4.75-2.92-7.43-4.26 1.6-10.89 1.13-13.94.14-4-1.28-5.98-6.81-2.53-9 1.72-1.1 2.88-.65 3.9-.26Z",fill:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M116.7 81.6a.41.41 0 1 0-.74.4c.2.39.47.74.9.95.41.2.93.25 1.58.17a.41.41 0 1 0-.1-.82c-.58.07-.9.01-1.12-.09-.2-.1-.36-.28-.53-.6Zm-6.57 4.22a1.07 1.07 0 0 0 1-1.13 1.06 1.06 0 0 0-1.1-1.02c-.59.03-1.03.54-1 1.13.02.6.52 1.05 1.1 1.02Zm6.82.73a1.07 1.07 0 0 0 1-1.13 1.06 1.06 0 0 0-1.1-1.01c-.58.02-1.03.53-1 1.12.03.6.52 1.05 1.1 1.02Z",fill:"#515151"}),T.createElement("ellipse",{cx:127.42,cy:86.0081,rx:2.47934,ry:2.47934,fill:"white",stroke:"#515151"}),T.createElement("circle",{r:4.67102,transform:"matrix(0.707106 0.707108 -0.707106 0.707108 75.0508 75.7794)",fill:"var(--semi-color-primary)",stroke:"var(--semi-color-primary)",strokeWidth:3}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M77.9 72.97a1.1 1.1 0 0 0-1.57 0l-1.26 1.27-1.31-1.3a1.1 1.1 0 1 0-1.57 1.56l1.31 1.3-1.3 1.31a1.1 1.1 0 0 0 1.56 1.57l1.3-1.3 1.27 1.26a1.1 1.1 0 1 0 1.57-1.57l-1.26-1.26 1.26-1.27a1.1 1.1 0 0 0 0-1.57Z",fill:"white"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M99.41 49.11a32.26 32.26 0 0 0-19-9.84 2.14 2.14 0 0 0-2.42 2.02c-.07 1.2.82 2.2 1.97 2.37a27.86 27.86 0 0 1 16.13 8.36c.83.87 2.24.99 3.17.15.88-.79.99-2.17.15-3.06Zm-35.8-8.52a32.5 32.5 0 0 0-18.74 15.73 2.14 2.14 0 0 0 1.01 2.93c1.11.52 2.4.02 2.96-1.02a28.08 28.08 0 0 1 15.96-13.4 2.28 2.28 0 0 0 1.53-2.72 2.14 2.14 0 0 0-2.72-1.52Zm27.75 15.78c-3.02-3.14-7-5.38-11.53-6.22a2.11 2.11 0 0 0-2.47 2 2.33 2.33 0 0 0 1.9 2.38c3.41.69 6.43 2.37 8.75 4.72.85.85 2.26 1 3.2.15.87-.78 1-2.15.15-3.03Zm-24.64-4.65a21.63 21.63 0 0 0-11.66 9.8 2.1 2.1 0 0 0 .99 2.94c1.12.52 2.4.01 2.98-1 2-3.45 5.17-6.11 8.91-7.5 1.1-.4 1.81-1.56 1.5-2.75a2.1 2.1 0 0 0-2.72-1.5Zm16.63 11.95a10.69 10.69 0 0 0-4-2.47c-1.35-.47-2.56.62-2.63 1.9-.07 1.14.73 2.04 1.65 2.44.56.25 1.07.56 1.52.94.89.74 2.33 1 3.32.11.82-.74 1-2.07.14-2.92Zm-14.28-.76c-1.82.83-3.39 2.16-4.5 3.83-.73 1.08-.16 2.42.9 2.92 1.14.53 2.38-.02 3.05-.88a6.35 6.35 0 0 1 1.93-1.63c.95-.52 1.68-1.63 1.37-2.83-.3-1.15-1.54-1.95-2.75-1.4Z",fill:"var(--semi-color-primary)"}))}var Sle=Cle;const wle=({errorMsg:s})=>R.jsxs("div",{className:"error-display",children:[R.jsx(gle,{}),R.jsx("div",{className:"error-display-content",children:R.jsx(De.Text,{style:{fontSize:14},children:s})})]}),_le=()=>{const{state:{gameDetail:s},setGameDetail:e}=Qr(),[t,n]=T.useState(!0),[r,a]=T.useState(!1),[i,o]=T.useState(""),c=({errorCode:f,errorMsg:p,clientKey:y})=>{n(!1),a(!0),f===404?o(V("getDevGameDetailNotFound",{clientKey:y})):f===403?o(V("gameDetailNoPermission",{clientKey:y})):f===401&&o(V("gameDetailNotLogin",{clientKey:y}))};T.useEffect(()=>{s?.has_error&&(a(!0),c({errorCode:s.error_code,errorMsg:s.error_msg,clientKey:s.client_key})),Ln({url:"/game/detail",method:"GET"}).then(f=>{if(f?.error)n(!1),c(f.error);else{const{data:p}=f;e(p),n(!1)}})},[]);const h=T.useMemo(()=>{if(!s||s?.has_error)return[];const{name:f,client_key:p,size:y,description:v,request_allowed_domains:_}=s,S=s.packages.filter(w=>w.type==="independent");return[{key:V("gameName"),value:()=>R.jsx(De.Text,{style:{fontWeight:"bold"},children:f})},{key:V("gameIcon"),value:()=>R.jsx(lle,{logo:s.display_icon_url})},{key:V("gameID"),value:()=>R.jsx(De.Text,{children:p})},{key:V("gameDesc"),value:()=>R.jsx(cle,{description:v})},{key:V("gameSize"),value:()=>R.jsx(nle,{size:y,limit:30})},{key:V("gameMainPackageSize"),value:()=>R.jsx(rle,{packages:s.packages,limit:4})},{key:V("gameIndependentPackageSize"),hidden:S.length===0,value:()=>R.jsx(tle,{packages:S})},{key:V("gameTrustDomains"),value:()=>R.jsx(sle,{domains:_})},{key:V("gameServiceAgreement"),value:()=>R.jsx(ale,{termsOfServiceLink:s.terms_of_service_link})},{key:V("gamePrivacyPolicy"),value:()=>R.jsx(ile,{privacyPolicyLink:s.privacy_policy_link})}].filter(w=>!w.hidden)},[s]);return t&&!s?R.jsx("div",{className:"game-detail-loading-container",children:R.jsx(pn,{size:"large"})}):r?R.jsx(wle,{errorMsg:i}):h.length===0?null:R.jsxs("div",{className:"game-detail-container",children:[R.jsx(ole,{}),R.jsx($u,{data:h,align:"left",size:"small"})]})},Ele=()=>R.jsxs("div",{children:[R.jsx("strong",{className:"check-code-banner-section-title",children:V("pkgSizeCheckDesc")}),R.jsx("div",{className:"check-code-banner-section-desc",style:{marginBottom:4},children:R.jsx("div",{children:V("pkgSizeCheckDescTip",{projectSize:"30MB",mainPackageSize:"4MB",independentPackageSize:"4MB"})})}),R.jsx("strong",{className:"check-code-banner-section-title",children:V("mandatoryApiCheck")}),R.jsx("div",{className:"check-code-banner-section-desc",children:V("mandatoryApiCheckDesc")}),R.jsx("strong",{className:"check-code-banner-section-title",children:V("configFileCheck")}),R.jsx("div",{className:"check-code-banner-section-desc",children:R.jsxs("div",{children:[R.jsx("code",{children:"game.json"}),":",V("gameJsonCheckDesc")]})})]}),Ole=()=>R.jsx(Ei,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:R.jsx(Ele,{}),type:"info"}),xle=s=>{const{result:e}=s,t=e.every(a=>a?.passed),[n,r]=T.useState(!1);return R.jsxs("div",{className:"check-result-group",children:[t?R.jsxs("div",{className:"check-result-title",children:[R.jsx(wi,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),R.jsx(De.Text,{style:{color:"#4CAF50",fontSize:20},children:V("checkConfigPassed")})]}):R.jsxs("div",{className:"check-result-title",children:[R.jsx(Vs,{style:{color:"#F44336",marginRight:4}}),R.jsx(De.Text,{style:{color:"#F44336",fontSize:20},children:V("checkConfigFailed")})]}),R.jsxs("div",{style:{paddingBottom:24,position:"relative"},children:[R.jsx(Fs,{style:{marginBottom:12},collapseHeight:150,isOpen:n,children:e.map((a,i)=>R.jsxs("div",{className:"check-result-item",children:[R.jsx(zt,{color:a?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:a?.file}),R.jsx(De.Text,{style:{fontSize:14,color:a?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:a?.msg})]},i))}),n?R.jsx(De.Text,{style:{color:"grey",cursor:"pointer",fontSize:14,width:"100%",display:"block",alignItems:"center",justifyContent:"center",textAlign:"center"},onClick:()=>r(!1),children:V("closeCheckDetail")}):R.jsx(De.Text,{style:{color:"grey"},className:"show-more-text-btn",onClick:()=>r(!0),children:V("expandCheckDetail")})]})]})},Tle={project:V("gameProject"),main_package:V("gameMainPackage"),independent_package:V("independentPackage")},Ple=s=>{const{result:e}=s,t=e.every(n=>n?.passed);return R.jsxs("div",{className:"check-result-group",children:[t?R.jsxs("div",{className:"check-result-title",children:[R.jsx(wi,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),R.jsx(De.Text,{style:{color:"#4CAF50",fontSize:20},children:V("checkPkgSizePassed")})]}):R.jsxs("div",{className:"check-result-title",children:[R.jsx(Vs,{style:{color:"#F44336",marginRight:4,fontSize:20}}),R.jsx(De.Text,{style:{color:"#F44336",fontSize:20},children:V("checkPkgSizeFailed")})]}),e.map((n,r)=>R.jsxs("div",{className:"check-result-item",children:[R.jsxs(zt,{color:n?.passed?"green":"red",style:{marginRight:8},children:[Tle[n.dimension],n.dimension==="independent_package"?`: ${n.name}`:""]}),R.jsx(De.Text,{style:{fontSize:14,color:n?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:n?.msg})]},r))]})},Ile=s=>{const{result:e}=s,t=e.every(a=>a?.passed),[n,r]=T.useState(!1);return R.jsxs("div",{className:"check-result-group",children:[t?R.jsxs("div",{className:"check-result-title",children:[R.jsx(wi,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),R.jsx(De.Text,{style:{color:"#4CAF50",fontSize:20},children:V("checkApiSuccess")})]}):R.jsxs("div",{className:"check-result-title",children:[R.jsx(Vs,{style:{color:"#F44336",marginRight:4}}),R.jsx(De.Text,{style:{color:"#F44336",fontSize:20},children:V("checkApiFailed")})]}),R.jsxs("div",{style:{position:"relative"},children:[R.jsx(Fs,{style:{marginBottom:12},collapseHeight:150,isOpen:n,children:e.map((a,i)=>R.jsxs("div",{className:"check-result-item",children:[R.jsx(zt,{color:a?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:a?.name}),R.jsxs(De.Text,{style:{fontSize:14,color:a?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:[V(a?.name),a?.passed?V("integrated"):V("notIntegrated")]})]},i))}),n?R.jsx(De.Text,{style:{color:"grey",cursor:"pointer",fontSize:14,width:"100%",display:"block",alignItems:"center",justifyContent:"center",textAlign:"center"},onClick:()=>r(!1),children:V("closeCheckDetail")}):R.jsx(De.Text,{style:{color:"grey"},className:"show-more-text-btn",onClick:()=>r(!0),children:V("expandCheckDetail")})]})]})},Dle=()=>{const[s,e]=T.useState([]),[t,n]=T.useState(!1);T.useEffect(()=>{Ln({url:"/game/check",method:"GET"}).then(o=>{e(o?.data||[])}).catch(()=>{n(!0)})},[]);const r=s.filter(o=>o?.type==="config"),a=s.filter(o=>o?.type==="size"),i=s.filter(o=>o?.type==="api");return R.jsxs("div",{style:{height:"100%",overflow:"auto"},children:[R.jsx(Ole,{}),R.jsx(Ple,{result:a}),R.jsx(Ile,{result:i}),R.jsx(xle,{result:r})]})},Rle=[{title:"0.3.0",target:{iOS:">=43.1",Android:">=43.1"},changes:{feature:[{desc:{"zh-CN":"支持了开发信息蒙层,打开后可以查看游戏 FPS、设备信息、调试开关等信息,便于查看游戏运行状态","en-US":"Support devInfo panel, which can show game FPS, device info, debug switch, etc."},link:"https://bytedance.larkoffice.com/wiki/PaK1wSu0eiPrxrkrqtrcR3VEnjf",module:"devOptions"},{desc:{"zh-CN":"支持删除历史启动模式,便于管理历史启动模式","en-US":"Support delete historical launch mode,keep consistent with client dev options"},module:"devOptions"},{desc:{"zh-CN":"调整调试设置模块名称为开发选项,和客户端内调开发者选项保持一致","en-US":"Rename debug setting module to dev options, keep consistent with client dev options"},module:"devOptions",link:"https://bytedance.larkoffice.com/wiki/PaK1wSu0eiPrxrkrqtrcR3VEnjf"},{desc:{"zh-CN":"调试设置新增定义 vConsole 和 开发信息浮层设置","en-US":"Add debug setting to define vConsole and dev overlay"},module:"devOptions"},{desc:{"zh-CN":"支持了变更日志,用户可以在调试环境下查看游戏的变更记录,部分新功能可通过更多信息查看使用","en-US":"Support change log, user can view game change log in IDE, some new features can be viewed in more info"},module:"new"}],optimize:[{desc:{"zh-CN":"支持了调试设置开关本地缓存,避免每次都需要重新设置","en-US":"Support debug setting cache, avoid setting debug mode every time"},module:"devOptions"}],bugfix:[{desc:{"zh-CN":"修复上传名称为中文的游戏时,平台展示乱码的问题","en-US":"Fix the issue that the platform shows garbled code when the game name is in Chinese"},module:"upload"},{desc:{"zh-CN":"修复启动模式模块,自定义query 参数无法持久化的问题","en-US":"Fix the issue that custom query parameters cannot be persisted in launch mode module"},module:"launchMode"},{desc:{"zh-CN":"修复扫描二维码模块,内容过多,纵向无法滚动问题","en-US":"Fix the issue that the content in scan QR code module is too long, and cannot be scrolled vertically"},module:"scanQrcode"}]}}],kle=()=>{const s=X4;return R.jsx("div",{className:"change-log-container",children:Rle.map(e=>R.jsxs("div",{className:"change-log-item",children:[R.jsx("h2",{className:"change-log-title",children:e.title}),R.jsx("div",{className:"change-log-target",children:R.jsxs("div",{className:"change-log-target-title",children:[V("changelogTarget")," iOS ",e.target.iOS," | Android",e.target.Android]})}),e?.changes?.feature?.length>0&&R.jsxs("div",{children:[R.jsx("div",{className:"change-log-feature-title",children:R.jsx(zt,{color:"green",size:"large",shape:"circle",type:"solid",children:V("changelogFeature")})}),R.jsx("ul",{className:"change-log-changes-feature",children:e.changes.feature.map(t=>R.jsxs("li",{className:"change-log-change",children:[t.desc[s]," ",t?.link?R.jsx("a",{style:{fontWeight:600,color:"orange"},href:t.link,target:"_blank",rel:"noopener noreferrer",children:V("changelogLink")}):null]},t.desc[s]))})]}),e?.changes?.optimize?.length>0&&R.jsxs("div",{children:[R.jsx("div",{className:"change-log-optimize-title",children:R.jsx(zt,{color:"orange",size:"large",shape:"circle",type:"solid",children:V("changelogOptimize")})}),R.jsx("ul",{className:"change-log-changes-optimize",children:e.changes.optimize.map(t=>R.jsx("li",{className:"change-log-change",children:t.desc[s]},t.desc[s]))})]}),e?.changes?.bugfix?.length>0&&R.jsxs("div",{children:[R.jsx("div",{className:"change-log-bugfix-title",children:R.jsx(zt,{color:"red",size:"large",shape:"circle",type:"solid",children:V("changelogBugfix")})}),R.jsx("ul",{className:"change-log-changes-bugfix",children:e.changes.bugfix.map(t=>R.jsx("li",{className:"change-log-change",children:t.desc[s]},t.desc[s]))})]})]},e.title))})},Nle=({size:s=24,color:e="#000",style:t,className:n})=>R.jsx("div",{style:{display:"flex",alignItems:"center",position:"relative"},children:R.jsxs("svg",{fill:"currentColor",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,children:[R.jsx("path",{d:"M37.86 17.82c.14.24.14.67.14 1.53v9.5c0 1.14 0 1.72-.2 2.26-.16.49-.43.96-.77 1.34-.37.44-.87.73-1.86 1.3l-7.84 4.53c-.74.43-1.11.64-1.4.64a.66.66 0 0 1-.58-.34c-.14-.24-.14-.67-.14-1.53v-9.5c0-1.14 0-1.71.2-2.26.16-.48.43-.95.76-1.34.38-.44.88-.73 1.87-1.3l7.84-4.52c.74-.43 1.11-.65 1.4-.64.25 0 .45.12.58.33Z"}),R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m27.54 1.99 7 3.93 6.89 4a7.23 7.23 0 0 1 3.59 6.2l.06 7.88-.06 7.88a7.23 7.23 0 0 1-3.6 6.2l-6.88 4-7 3.93a7.23 7.23 0 0 1-7.08 0l-7-3.93-6.9-4a7.23 7.23 0 0 1-3.58-6.2L2.9 24l.07-7.88a7.23 7.23 0 0 1 3.59-6.2l6.89-4 7-3.93a7.23 7.23 0 0 1 7.08 0Zm-2.07 3.67 6.98 3.92 6.86 3.99a3.01 3.01 0 0 1 1.5 2.58l.06 7.85-.07 7.85c0 1.06-.57 2.04-1.5 2.58l-6.85 4-6.98 3.9c-.91.52-2.03.52-2.95 0l-6.97-3.9-6.86-4a3.01 3.01 0 0 1-1.5-2.58L7.13 24l.06-7.85c.01-1.06.58-2.04 1.5-2.58l6.86-4 6.97-3.9a3.01 3.01 0 0 1 2.95 0Z"})]})}),Ale=()=>R.jsxs("div",{className:"logo-container",children:[R.jsx(Nle,{size:32}),R.jsx("div",{className:"logo-title",children:V("title")})]}),Mle=()=>{const{state:{user:s}}=Qr(),[e,t]=T.useState(!1),[n,r]=T.useState(!1),[a,i]=T.useState(""),[o,c]=T.useState(""),h=T.useRef(null),f={"ttmg-game-desc":encodeURIComponent(a||"--")},p=()=>{r(!1),c(""),i("")},y=()=>{t(!1),p(),h.current?.formApi?.reset?.()},v=()=>{s?.email&&t(!0)},_=C=>{const w=C;if(w?.code===0)sa.success({title:V("uploadPlatformSuccess"),content:R.jsxs(R.Fragment,{children:[R.jsx("div",{children:V("uploadPlatformDesc")}),R.jsx("div",{style:{marginTop:12,display:"flex",justifyContent:"flex-end"},children:R.jsx(De.Text,{link:!0,onClick:()=>{window.open(w?.data?.detail,"_blank")},children:V("viewOnPlatform")})})]}),duration:10}),t(!1),p();else{const x=w?.error?.StatusMessage||w?.detail||V("uploadPlatformFailed");c(x),r(!1)}},S=C=>{const w=C?.error?.StatusMessage||C?.response?.detail||C?.message||V("uploadPlatformFailed");c(w),r(!1)};return R.jsxs(R.Fragment,{children:[R.jsx(In,{content:()=>s?.email?null:R.jsx("div",{className:"uploader-login-tip",children:V("loginToUpload")}),children:R.jsxs("div",{className:$("resource-uploader",{"resource-uploader-disabled":!s?.email}),onClick:v,children:[R.jsx(fC,{size:"default"}),R.jsx("div",{className:"uploader-text",children:V("upload")})]})}),R.jsx(Cr,{footer:null,visible:e,onCancel:y,title:V("uploadToPlatform"),children:R.jsxs("div",{className:"uploader-modal-content",children:[n&&R.jsx("div",{className:"upload-loading-container",children:R.jsx("div",{className:"loading-spin",children:R.jsx(pn,{size:"large"})})}),o&&R.jsx(De.Text,{style:{color:"red",marginBottom:12,marginTop:12},children:o}),R.jsxs(He,{ref:h,onChange:({values:C})=>{i(C?.gameDescription||"--"),c("")},children:[R.jsx(He.TextArea,{label:V("gameAssetDescription"),placeholder:V("gameAssetDescription"),field:"gameDescription"}),R.jsx(He.Slot,{children:R.jsx(Hu,{accept:".zip",action:"/game/upload",showClear:!1,headers:f,beforeUpload:C=>(r(!0),!0),onSuccess:C=>{_(C)},onError:C=>{S(C)},children:R.jsxs("div",{className:"uploader-button-container",children:[R.jsx(fC,{className:"uploader-button-icon"}),R.jsx("div",{className:"uploader-button-text",children:V("uploadGamePackageTip")})]})})}),R.jsx("div",{style:{display:"flex",justifyContent:"flex-end",paddingBottom:16,marginTop:12}})]})]})})]})},Fle=()=>{const{state:{isConnected:s},setIsConnected:e,setMessage:t}=Qr(),n=({client:r,node:a})=>{aa.info("connectionChange",r,a),ze.get("isNodeWSConnected")===a&&(r||t({type:"danger",desc:V("clientServerStartError")})),ze.get("isClientWSConnected")===r&&(a||t({type:"danger",desc:V("nodeServerStartError")})),ze.get("isClientWSConnected")&&!r&&(ze.setMultiple({isClientWSConnected:!1,isResourcesReady:!1,isScriptsReady:!1}),t({type:"danger",desc:V("clientDisconnected")})),ze.get("isNodeWSConnected")&&!a&&(ze.setMultiple({isNodeWSConnected:!1,isResourcesReady:!1,isScriptsReady:!1}),t({type:"danger",title:V("serverDisconnected"),desc:V("nodeDisconnected")})),!ze.get("isClientWSConnected")&&r&&(ze.set("isClientWSConnected",!0),t({type:"success",desc:V("clientConnectedSuccess")})),!ze.get("isNodeWSConnected")&&a&&(ze.set("isNodeWSConnected",!0),t({type:"success",desc:V("nodeServerConnectedSuccess")})),e(r&&a)};return T.useEffect(()=>(qe.on("connectionChange",n),()=>{qe.off("connectionChange",n)}),[e]),R.jsx(zt,{style:{margin:"0 4px"},color:s?"light-green":"grey",size:"large",shape:"circle",type:"ghost",children:V(s?"deviceConnected":"deviceDisconnected")})},Lle="/api/passport/web/email/login",$le={aid:"2471",account_sdk_source:"web",sdk_version:"2.1.1"};Lle+""+new URLSearchParams($le);const jle=()=>{const{state:{user:s}}=Qr();return s?.email?R.jsx(In,{position:"bottom",content:R.jsx("div",{className:"login-user-popover",children:s.email}),children:R.jsx(bi,{color:"amber",style:{flexShrink:0},alt:s?.email,size:"small",children:s?.email?.split("@")[0][0]})}):R.jsx(In,{position:"bottom",trigger:"hover",content:R.jsx("div",{className:"not-login-status-popover",children:V("notLoginTip")}),children:R.jsx(bi,{color:"grey",style:{flexShrink:0},size:"small",children:V("notLogin")})})},Vle=[{node:"item",name:V("quickStart"),link:"https://bytedance.sg.larkoffice.com/docx/MarqdNvQLoihvjxN4rFllgjBgwb"},{node:"item",name:V("jsApiList"),link:"https://bytedance.larkoffice.com/wiki/GQscwDOQSiPxyjkbzyfckh2pnDg"},{node:"item",name:V("faq"),link:"https://bytedance.larkoffice.com/wiki/O6aWwFhDBiEglwkcnJ4ccJpdnmb"}],Ble=()=>R.jsx(Mn,{trigger:"hover",position:"bottomRight",render:R.jsx(R.Fragment,{children:Vle.map(s=>R.jsx(Mn.Item,{onClick:()=>{window.open(s.link)},children:s.name},s.name))}),children:R.jsxs("div",{className:"access-docs",children:[R.jsx(De.Text,{className:"access-docs-text",type:"primary",children:V("docs")}),R.jsx(ao,{className:"access-docs-icon"})]})}),Ule=({version:s})=>{const e=Gu();if(!s)return null;const t=()=>{e("/changelog")};return R.jsx(zt,{onClick:t,style:{margin:8,flexShrink:0,cursor:"pointer"},color:"light-blue",size:"large",shape:"circle",type:"ghost",children:s})},li={Idle:0,WasmPreparing:1,WasmPrepared:2,WasmSplitIssued:3,WasmSplitting:4,WasmSplitDone:5,WasmReadyToPrepare:6,WasmSplitPreparing:7,WasmPreparedSuccess:8,WasmCollecting:9,WasmUploadFail:-1,WasmDownloadFail:-2,WasmFileNotExist:-3,WasmSplitFail:-4,WasmSplitUpdateDBFail:-5,WasmSplitPrepareFail:-6,WasmPrepareFailed:-1};function Hle({codeMd5:s,clientKey:e}){return Ln({url:"/game/wasm-split-config",method:"GET",data:{codeMd5:s,clientKey:e}})}function zle(s){const{codePath:e,codeMd5:t,clientKey:n,desc:r}=s;return Ln({url:"/game/wasm-prepare",method:"POST",data:{codePath:e,clientKey:n,codeMd5:t,desc:r}})}function Kle({codeMd5:s,clientKey:e}){return Ln({url:"/game/wasm-prepare-result",method:"POST",data:{codeMd5:s,clientKey:e}})}function Wle(s,e){const t=e?.intervalMs,n=e?.maxAttempts,r=e?.signal||new AbortController().signal;let a=0;return new Promise((i,o)=>{if(r?.aborted){o(new DOMException("Polling aborted","AbortError"));return}const c=()=>{clearTimeout(h),o(new DOMException("Polling aborted","AbortError"))};r?.addEventListener("abort",c,{once:!0});let h;const f=async()=>{a+=1;try{const p=await Kle(s),{status:y}=p.data;if(y===li.WasmPreparedSuccess||y===li.WasmSplitDone){i(p);return}if(y<0){i(p);return}if(a>=n){o(new Error(`Polling timeout after ${n} attempts`));return}h=window.setTimeout(f,t)}catch(p){if(a>=n){o(p);return}h=window.setTimeout(f,t)}};f()})}function qle({codeMd5:s,clientKey:e,codePath:t}){return Ln({url:"/game/wasm-prepare-download",method:"POST",data:{codeMd5:s,clientKey:e,codePath:t}})}function Gle(s){const{codeMd5:e,clientKey:t}=s;return Ln({url:"/game/wasm-split",method:"POST",data:{codeMd5:e,clientKey:t}})}function Yle({codeMd5:s,clientKey:e}){return Ln({url:"/game/wasm-split-result",method:"POST",data:{codeMd5:s,clientKey:e}})}function Zle(s,e){const t=e?.intervalMs,n=e?.maxAttempts,r=e?.signal||new AbortController().signal;let a=0;return new Promise((i,o)=>{if(r?.aborted){o(new DOMException("Polling aborted","AbortError"));return}const c=()=>{clearTimeout(h),o(new DOMException("Polling aborted","AbortError"))};r?.addEventListener("abort",c,{once:!0});let h;const f=async()=>{a+=1;try{const p=await Yle(s),{status:y}=p.data;if(y!==li.WasmSplitDone){if(a>=n){o(new Error(`Polling timeout after ${n} attempts`));return}h=window.setTimeout(f,t);return}i(p)}catch(p){if(a>=n){o(p);return}h=window.setTimeout(f,t)}};f()})}function Xle({codeMd5:s,clientKey:e}){return Ln({url:"/game/wasm-split-download-result",method:"POST",data:{clientKey:e,codeMd5:s}})}function Qle(s){return Ln({url:"/game/wasm-split-download",method:"POST",data:s})}function _5(s){const{codeMd5:e,clientKey:t,codePath:n}=s;return Ln({url:"/game/wasm-split-reset",method:"POST",data:{codeMd5:e,clientKey:t,codePath:n}})}function Jle({codeMd5:s,clientKey:e}){return Ln({url:"/game/wasm-taskinfo",method:"GET",data:{codeMd5:s,clientKey:e}})}function ece({codeMd5:s,clientKey:e}){return Ln({url:"/game/wasm-set-collect",method:"POST",data:{codeMd5:s,clientKey:e}})}function uR(s){return Ln({url:"/game/wasm-collect-funcids",method:"GET",data:s})}function tce(s){return Ln({url:"/game/wasm-collect-info",method:"GET",data:s})}const Qc={container:"wasm-prepare-downloading-content",process:"wasm-prepare-downloading-text",success:"wasm-prepare-downloading-success",error:"wasm-prepare-downloading-error"},nce=({kind:s,children:e})=>{const t={process:Qc.process,success:Qc.success,error:Qc.error};return R.jsx("div",{className:t[s],children:e})},dR={star_fetch_prepared_wasm_url:{kind:"process",text:"fetchDownloadUrl",showSpin:!0},fetch_prepared_wasm_url_done:{kind:"success",text:"fetchDownloadUrlSuccess",showSpin:!0},fetch_prepared_wasm_url_failed:{kind:"error",text:"fetchDownloadUrlFailed",appendError:!0},start_download_prepared_wasm:{kind:"process",text:"downloadPreparedWasmCode",showSpin:!0},download_prepared_wasm_done:{kind:"success",text:"downloadPreparedWasmCodeSuccess",showSpin:!0},download_prepared_wasm_failed:{kind:"error",text:"downloadPreparedWasmCodeFailed",appendError:!0,showRetry:!0},start_compress_prepared_wasm:{kind:"process",text:"compressPreparedWasmCode",showSpin:!0},compress_prepared_wasm_done:{kind:"success",text:"compressPreparedWasmCodeSuccess",showSpin:!0},start_write_compress_prepared_wasm:{kind:"process",text:"writeCompressPreparedWasmCode",showSpin:!0},start_update_wasm_split_config:{kind:"process",text:"updateWasmSplitConfig",showSpin:!0},update_wasm_split_config_done:{kind:"success",text:"updateWasmSplitConfigSuccess"},update_wasm_split_config_failed:{kind:"error",text:"updateWasmSplitConfigFailed",appendError:!0},default:{kind:"process",text:"processing",showSpin:!0}},rce=({onCancel:s,onRetry:e,onHide:t})=>{const[n,r]=T.useState(""),[a,i]=T.useState("");T.useEffect(()=>{const f=p=>{r(p.status),i(p.errorMsg||"")};return qe.on("unitySplitStatus",f),()=>{qe.off("unitySplitStatus",f)}},[]);const o=T.useMemo(()=>dR[n]??dR.default,[n]),c=R.jsx(pn,{size:"large",color:"primary"}),h=typeof o.text=="string"?V(o.text)??o.text:"";return R.jsxs("div",{className:Qc.container,children:[o.showSpin&&c,!!h&&R.jsx(nce,{kind:o.kind,children:h}),o.appendError&&!!a&&R.jsx("div",{className:Qc.error,children:a}),o.showRetry&&R.jsx(Pe,{onClick:e,children:V("retryDownload")}),R.jsx(Pe,{style:{marginTop:12},type:"tertiary",onClick:t,children:V("backgroundRun")})]})},sce=({onSubmit:s,onCancel:e,onChange:t})=>R.jsxs(He,{style:{width:"100%",transform:"translateY(-20px)"},onChange:t,onSubmit:s,children:[R.jsx(He.TextArea,{rules:[{required:!0,message:V("inputSplitDesc")}],label:V("splitDesc"),placeholder:V("inputSplitDesc"),field:"desc"}),R.jsxs("div",{className:"wasm-prepare-form-button-container",children:[R.jsx(Pe,{type:"tertiary",htmlType:"submit",style:{marginRight:12},children:V("startPrepare")}),R.jsx(Pe,{type:"tertiary",onClick:e,children:V("cancel")})]})]}),Xn={init:"init",start:"start",processing:li.WasmPreparing,processingReady:li.WasmReadyToPrepare,success:li.WasmPreparedSuccess,failed:li.WasmPrepareFailed,splitDone:li.WasmSplitDone,downloading:"downloading",downloadFailed:"downloadFailed"},hR=new AbortController,ace=({codePath:s,codeMd5:e,clientKey:t,onCancel:n,onNext:r,onHide:a})=>{const[i,o]=T.useState(""),[c,h]=T.useState({code:0,data:{status:Xn.init}}),f=T.useMemo(()=>c?.data?.status,[c?.data?.status]),p=()=>{hR.abort(),n(),_5({codeMd5:e,clientKey:t,codePath:s}).then(w=>{w.code===0&&h({...c,data:{...c?.data,status:Xn.init}})})},y=()=>{h({code:0,data:{status:Xn.start}}),zle({codePath:s,codeMd5:e,clientKey:t,desc:i}).then(w=>{w.code===0||w?.error?.code===10024||w?.error?.code===10028?(h({...w,data:{...w?.data,status:Xn.processing}}),v()):h({...c,error:w?.error||{code:-1,message:"Internal server error, please try again later..."},data:{...c?.data,status:Xn.failed}})})},v=()=>{Wle({codeMd5:e,clientKey:t},{intervalMs:500,maxAttempts:100,signal:hR.signal}).then(w=>{w.code===0?h(w):h({...c,data:{...c?.data}})})},_=()=>{h({...c,data:{...c?.data,status:"downloading"}}),qle({codePath:s,codeMd5:e,clientKey:t}).then(w=>{w.code===0?(h({...c,data:{...c?.data,status:Xn.success}}),r()):h({...c,data:{...c?.data,status:Xn.downloadFailed}})})},S=w=>{o(w?.values?.desc)};let C=null;switch(f){case Xn.init:C=R.jsx(sce,{onSubmit:y,onCancel:n,onChange:S});break;case Xn.start:C=R.jsxs("div",{className:"wasm-prepare-processing-content",children:[R.jsx(pn,{size:"large",color:"primary"}),R.jsx("div",{className:"wasm-prepare-processing-text",children:V("startingPrepare")}),R.jsx("div",{className:"wasm-prepare-processing-cancel",children:R.jsxs(Pa,{children:[R.jsx(Pe,{type:"tertiary",onClick:n,children:V("cancelPrepare")}),R.jsx(Pe,{type:"tertiary",onClick:()=>a(),children:V("backgroundRun")})]})})]});break;case Xn.processing:case Xn.processingReady:C=R.jsxs("div",{className:"wasm-prepare-processing-content",children:[R.jsx(pn,{size:"large",color:"primary"}),R.jsx("div",{className:"wasm-prepare-processing-text",children:V("preparingSplit")}),R.jsx("div",{className:"wasm-prepare-processing-warning",children:V("warningDuringPreparing")}),R.jsx("div",{className:"wasm-prepare-processing-cancel",children:R.jsxs(Pa,{children:[R.jsx(Pe,{type:"tertiary",onClick:()=>{p()},children:V("cancelPrepare")}),R.jsx(Pe,{type:"tertiary",onClick:()=>a(),children:V("backgroundRun")})]})})]});break;case Xn.success:case Xn.splitDone:C=R.jsxs("div",{className:"wasm-prepare-success-content",children:[R.jsx("div",{className:"wasm-prepare-success-text",children:V("preparingSplitSuccess")}),R.jsx("div",{className:"wasm-prepare-success-download",children:R.jsx(Pe,{type:"tertiary",onClick:()=>{_()},children:V("downloadPreparedWasmCode")})})]});break;case Xn.downloading:C=R.jsx(rce,{onHide:a});break;case Xn.downloadFailed:const w=c?.error?.message||"Unknown error";C=R.jsxs("div",{className:"wasm-prepare-downloadfailed-content",children:[R.jsx("div",{className:"wasm-prepare-downloadfailed-text",children:V("downloadFailed")}),R.jsx("div",{className:"wasm-prepare-downloadfailed-warning",children:w}),R.jsx(Pe,{onClick:_,children:V("retryDownload")})]});break;case Xn.failed:const x=c?.error?.message||"Unknown error";C=R.jsxs("div",{className:"wasm-prepare-failed-content",children:[R.jsx("div",{className:"wasm-prepare-failed-text",children:V("preparingSplitFailed")}),c?.data?.status===Xn.failed&&R.jsx("div",{className:"wasm-prepare-failed-warning",children:x}),R.jsx(Pe,{type:"tertiary",style:{marginTop:12},onClick:y,children:V("retryPrepare")})]});break;default:C=null}return R.jsx("div",{className:"wasm-prepare-content-container",children:C})},ice=({data:s})=>{const e={...s||{}},t=[{label:"Client key",value:"app_id"},{label:V("wasmSize"),value:"wasm_size",render:n=>`${(n/1024/1024).toFixed(2)} MB`},{label:V("totalFuncCount"),value:"total_wasm_func_count",render:n=>n>=1e3?`${(n/1e3).toFixed(2)} K`:`${n}`},{label:V("collectedFuncCount"),value:"collected_func_count",render:n=>n>=1e3?`${(n/1e3).toFixed(2)} K`:`${n}`},{label:"Wasm md5",value:"wasm_md5"},{label:V("splitVersion"),value:"base_version"}];return R.jsx("div",{className:"wasm-collect-status",children:t.map(n=>R.jsxs("div",{className:"wasm-collect-status-item",children:[R.jsx(zt,{size:"small",className:"wasm-collect-status-item-label",children:n.label}),R.jsx("span",{className:"wasm-collect-status-item-value",children:n.render?.(e[n.value])||e[n.value]})]},n.value))})},oce=({onNext:s,codeMd5:e,clientKey:t,onHide:n})=>{const{state:{devSchema:r}}=Qr(),[a,i]=T.useState("willCollect"),[o,c]=T.useState(),[h,f]=T.useState(),[p,y]=T.useState(0),v=T.useRef(null),_=T.useMemo(()=>!h||!h?.total_wasm_func_count?!1:(p||0)/(h?.total_wasm_func_count||0)>=.08,[h,p]);T.useEffect(()=>{if(a!=="collecting"){v.current&&(window.clearInterval(v.current),v.current=null);return}if(!v.current)return uR({codeMd5:e,clientKey:t}).then(w=>{y(w.data?.collected_func_count||0)}).catch(console.error),v.current=window.setInterval(()=>{uR({codeMd5:e,clientKey:t}).then(w=>{y(w.data?.collected_func_count||0)}).catch(w=>{console.error(w)})},2e3),()=>{v.current&&(window.clearInterval(v.current),v.current=null)}},[a,e,t]);const S=async()=>{if(a!=="collecting")try{i("startCollect");const w=await ece({codeMd5:e,clientKey:t});i("collecting"),Jle({codeMd5:e,clientKey:t}).then(x=>{c(x.data)}).catch(console.error),tce({codeMd5:e,clientKey:t}).then(x=>{f(x.data||{})}).catch(console.error)}catch(w){console.error(w)}},C=()=>{v.current&&(window.clearInterval(v.current),v.current=null),i("willCollect"),s()};return R.jsxs("div",{className:"wasm-collect-content-container",children:[o&&R.jsx(ice,{data:{...o||{},total_wasm_func_count:h?.total_wasm_func_count,collected_func_count:p}}),R.jsx("div",{className:"collect-qrcode-container",children:R.jsx(LC,{value:r})}),R.jsx("div",{className:"collect-qrcode-desc",children:V("collectDesc")}),R.jsxs("div",{className:"collect-qrcode-button-container",children:[a!=="collecting"&&R.jsx(Pe,{loading:a==="startCollect",onClick:S,children:V("startCollect")}),a==="collecting"&&R.jsxs(Pa,{children:[_?R.jsx(Pe,{type:"tertiary",onClick:C,children:V("startSplit")}):R.jsx(Cn,{content:V("cannotSplitTip"),children:R.jsx(Pe,{type:"tertiary",disabled:!0,children:V("startSplit")})}),R.jsx(Pe,{type:"tertiary",onClick:n,children:V("backgroundRun")})]})]})]})},lce=({onCancel:s,onHide:e})=>{const[t,n]=T.useState(""),[r,a]=T.useState("");T.useEffect(()=>{const h=f=>{n(f.status),a(f.errorMsg||"")};return qe.on("unitySplitStatus",h),()=>{qe.off("unitySplitStatus",h)}},[]);let i=null;const o="wasm-split-downloading-content",c="wasm-split-downloading-text";switch(t){case"start_download_android_main_wasm":case"download_android_main_wasm_done":case"start_compress_android_main_wasm":case"compress_android_main_wasm_done":case"start_download_android_sub_wasm_code":case"download_android_sub_wasm_code_done":case"start_compress_android_sub_wasm_code":case"compress_android_sub_wasm_code_done":case"start_download_ios_main_wasm":case"download_ios_main_wasm_done":case"start_compress_ios_main_wasm":case"compress_ios_main_wasm_done":case"start_download_ios_range_json":case"download_ios_range_json_done":case"start_download_ios_js_data_br":case"download_ios_js_data_br_done":case"start_compress_ios_sub_wasm_code":case"compress_ios_sub_wasm_code_done":case"start_write_splited_wasm_br":case"write_splited_wasm_done":case"start_update_wasm_split_config":case"update_wasm_split_config_done":i=R.jsxs("div",{className:o,children:[R.jsx(pn,{size:"large",color:"primary"}),R.jsx("div",{className:c,children:V(t)}),R.jsxs(Pa,{children:[R.jsx(Pe,{type:"danger",onClick:s,children:V("cancelSplit")}),R.jsx(Pe,{onClick:e,children:V("backgroundRun")})]})]});break;default:i=R.jsxs("div",{className:o,children:[R.jsx(pn,{size:"large",color:"primary"}),R.jsx("div",{className:c,children:V("processing")})]})}return i},fR=new AbortController,cce=({onCancel:s,onHide:e,codeMd5:t,clientKey:n})=>{const[r,a]=T.useState("spliting"),[i,o]=T.useState(),c=()=>{fR.abort(),s()},h=()=>{a("downloadingSplitResult"),Qle(i?.result).then(v=>{v.code===0?a("downloadSuccess"):a("downloadFailed")}).catch(()=>{a("downloadFailed")})},f=()=>{a("spliting"),Gle({codeMd5:t,clientKey:n}).then(v=>{v.code===0&&Zle({codeMd5:t,clientKey:n},{intervalMs:1e3,maxAttempts:1e3,signal:fR.signal}).then(_=>{a("splitSuccess"),p()})}).catch(()=>{a("splitFailed")})},p=()=>{a("startGetSplitResult"),Xle({clientKey:n,codeMd5:t}).then(v=>{v.code===0?(o(v.data),a("getSplitResultSuccess")):a("getSplitResultFailed")})};T.useEffect(()=>{f()},[]);let y=null;switch(r){case"spliting":y=R.jsxs("div",{className:"wasm-split-processing",children:[R.jsx(pn,{size:"large",color:"primary"}),R.jsx("div",{className:"wasm-split-processing-content",children:V("splittingDesc")}),R.jsx("div",{className:"wasm-split-processing-cancel",children:R.jsxs(Pa,{children:[R.jsx(Pe,{onClick:()=>c(),type:"danger",children:V("cancelSplit")}),R.jsx(Pe,{onClick:()=>e(),children:V("backgroundRun")})]})})]});break;case"splitSuccess":y=R.jsx("div",{className:"wasm-split-success",children:R.jsx("div",{className:"wasm-split-success-content",children:V("getSplitResult")})});break;case"startGetSplitResult":y=R.jsxs("div",{className:"wasm-split-processing",children:[R.jsx(pn,{}),R.jsx("div",{className:"wasm-split-processing-content",children:V("getSplitResult")})]});break;case"getSplitResultFailed":y=R.jsxs("div",{className:"wasm-split-failed",children:[R.jsx("div",{className:"wasm-split-failed-content",children:V("getSplitResultFailed")}),R.jsx("div",{className:"wasm-split-failed-retry",children:R.jsx(Pe,{type:"primary",onClick:()=>p(),children:V("retryGetSplitResult")})})]});break;case"getSplitResultSuccess":y=R.jsxs("div",{className:"wasm-split-success",children:[R.jsx("div",{className:"wasm-split-success-content",children:V("splitSuccess")}),R.jsx("div",{className:"wasm-split-success-download",children:R.jsx(Pe,{type:"primary",onClick:()=>h(),children:V("downloadSplitResult")})})]});break;case"getDownloadResultFailed":y=R.jsxs("div",{className:"wasm-split-failed",children:[R.jsx("div",{className:"wasm-split-failed-content",children:V("getSplitResultFailed")}),R.jsx("div",{className:"wasm-split-failed-retry",children:R.jsx(Pe,{type:"primary",onClick:()=>p(),children:V("retryGetSplitResult")})})]});break;case"downloadingSplitResult":y=R.jsx(lce,{onCancel:c,onHide:e});break;case"downloadSuccess":y=R.jsxs("div",{className:"wasm-split-success",children:[R.jsx("div",{className:"wasm-split-success-content",children:V("downloadSplitResultSuccess")}),R.jsx("div",{className:"wasm-split-success-tip",children:V("downloadSplitResultTip")})]});break;default:y=null}return R.jsx("div",{className:"wasm-split-content-container",children:y})},pf={prepare:{number:0,title:V("splitPrepare")},collect:{number:1,title:V("splitCollect")},split:{number:2,title:V("splitCode")},rollback:{number:3,title:V("rollback")}},uce=({stage:s})=>R.jsxs(Ji,{type:"basic",current:pf[s].number,style:{marginTop:24},children:[R.jsx(Ji.Step,{title:pf.prepare.title}),R.jsx(Ji.Step,{title:pf.collect.title}),R.jsx(Ji.Step,{title:pf.split.title})]}),dce=({onCancel:s,errorType:e,onHide:t})=>R.jsxs("div",{className:"wasm-code-split-error",children:[e==="noWasmCode"&&R.jsxs("div",{className:"wasm-code-split-error-container",children:[R.jsx("div",{className:"wasm-code-split-error-title",children:V("noWasmCode")}),R.jsx("div",{className:"wasm-code-split-error-desc",children:V("noWasmCodeDesc")})]}),e==="hasSplited"&&R.jsxs("div",{className:"wasm-code-split-error-container",children:[R.jsx("div",{className:"wasm-code-split-error-title",children:V("hasSplitedTitle")}),R.jsx("div",{className:"wasm-code-split-error-desc",children:V("hasSplitedDesc")}),R.jsxs(Pa,{children:[R.jsx(Pe,{onClick:s,children:V("cancelSplit")}),R.jsx(Pe,{onClick:t,children:V("backgroundRun")})]})]}),e==="noSplitConfig"&&R.jsxs("div",{className:"wasm-code-split-error-container",children:[R.jsx("div",{className:"wasm-code-split-error-title",children:V("noSplitConfigTitle")}),R.jsx("div",{className:"wasm-code-split-error-desc",children:V("noSplitConfigDesc")})]})]}),hce=()=>R.jsxs("div",{className:"split-loading",children:[R.jsx(pn,{size:"large",color:"primary"}),R.jsx("div",{className:"split-loading-text",children:"正在初始化分包环境"})]}),fce=({codeMd5:s,clientKey:e,codePath:t,onHide:n,onReset:r})=>{const[a,i]=T.useState("rollbacking"),o=()=>{i("rollbacking"),_5({codeMd5:s,clientKey:e,codePath:t}).then(f=>{f.code===0?(i("rollbackSuccess"),r()):i("rollbackFailed")})};T.useEffect(()=>{o()},[]);let c="",h=null;switch(a){case"rollbacking":c="回滚中...",h=R.jsx(Pe,{onClick:()=>{i("rollbackFailed")},children:"后台进行"});break;case"rollbackSuccess":c="回滚成功",h=R.jsx(Pe,{onClick:()=>{n()},children:"关闭"});break;case"rollbackFailed":c="回滚失败",h=R.jsx(Pe,{onClick:()=>{o()},children:"重试"});break}return R.jsx(R.Fragment,{children:R.jsxs("div",{className:"wasm-split-rollback-container",children:[R.jsx("div",{className:"wasm-split-rollback-text",children:c}),h]})})};function pce({enableWasmCollect:s,enableWasmSplit:e}){return typeof s=="boolean"&&(typeof e=="string"||e===!1)?s:!1}function gce({enableWasmSplit:s,hasWasmCode:e}){return s===!0?{errorType:"hasSplited",hasError:!0}:e?{hasError:!1}:{errorType:"noWasmCode",hasError:!0}}const mce=({codePath:s,clientKey:e,codeMd5:t})=>{const[n,r]=T.useState(!1),[a,i]=T.useState(""),[o,c]=T.useState("loading"),[h,f]=T.useState(null),p=()=>{r(!0),(!h||o==="error")&&(c("loading"),Hle({codeMd5:t,clientKey:e}).then(_=>{if(_.code===0){const{errorType:S,hasError:C}=gce({enableWasmSplit:_.data.enableWasmSplit,hasWasmCode:!!s});i(S),C?(i(S),c("error")):pce(_.data)?c("collect"):c("prepare"),f(_.data)}else c("error")}))},y=()=>{r(!1)},v=()=>{c("rollback")};return R.jsxs(R.Fragment,{children:[R.jsxs("div",{className:$("wasm-code-split",{}),onClick:p,children:[R.jsx(C7,{size:"default"}),R.jsx("span",{className:"wasm-code-split-text",children:V("wasmSplit")})]}),R.jsxs(Cr,{centered:!0,keepDOM:!0,maskClosable:!1,visible:n,footer:null,style:{width:"90%"},onCancel:()=>r(!1),onOk:()=>r(!1),title:V("wasmSplit"),children:[o==="loading"&&R.jsx(hce,{}),o==="error"&&R.jsx(dce,{errorType:a,onCancel:v,onHide:y}),o!=="error"&&o!=="loading"&&R.jsx(uce,{stage:o}),o==="prepare"&&R.jsx(ace,{codeMd5:t,codePath:s,clientKey:e,onCancel:()=>{r(!1)},onNext:()=>{c("collect")},onHide:y}),o==="collect"&&R.jsx(oce,{codeMd5:t,clientKey:e,onCancel:()=>{r(!1),c("prepare")},onHide:y,onNext:()=>{c("split")}}),o==="split"&&R.jsx(cce,{codeMd5:t,clientKey:e,onCancel:v,onHide:y}),o==="rollback"&&R.jsx(fce,{codeMd5:t,clientKey:e,codePath:s,onHide:y,onReset:()=>{c("prepare")}})]})]})},yce=()=>{const{state:{devToolVersion:s,engine:e,packages:t,gameDetail:n}}=Qr(),r=t?.find(o=>o.name==="wasmcode"),a=r?.root,i=r?.md5;return R.jsxs("div",{className:"header-wrapper",children:[R.jsxs("div",{className:"header-content",children:[R.jsxs("div",{className:"header-content-left",children:[R.jsx(Ale,{}),R.jsx(Ule,{version:s}),R.jsx(Fle,{})]}),R.jsx("div",{className:"header-content-right",children:R.jsxs(bo,{spacing:12,children:[R.jsx(Ble,{}),R.jsx(Mle,{}),e==="unity"&&R.jsx(mce,{codePath:a,codeMd5:i,clientKey:n?.client_key}),R.jsx(jle,{})]})})]}),R.jsx(eK,{})]})},vce=()=>(T.useEffect(()=>(pu.init(),()=>{pu.close()}),[]),null);function bce(){return R.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M8.48092 0.748384C8.16727 0.653859 7.83272 0.653859 7.51907 0.748384C7.30423 0.813133 7.13028 0.92386 6.97716 1.04125C6.83512 1.15015 6.67675 1.2924 6.50211 1.44927L2.21784 5.29713C2.00105 5.49145 1.80997 5.66273 1.66845 5.87532C1.54419 6.062 1.4522 6.26826 1.39635 6.48545C1.33275 6.73279 1.333 6.9894 1.33329 7.28054L1.33333 12.4241C1.33331 12.6835 1.3333 12.9169 1.34917 13.1111C1.36616 13.3191 1.40462 13.5401 1.51499 13.7567C1.67477 14.0703 1.92974 14.3253 2.24335 14.485C2.45995 14.5954 2.68093 14.6339 2.88891 14.6509C3.08312 14.6667 3.31653 14.6667 3.57591 14.6667H12.4241C12.6835 14.6667 12.9169 14.6667 13.1111 14.6509C13.3191 14.6339 13.54 14.5954 13.7566 14.485C14.0703 14.3253 14.3252 14.0703 14.485 13.7567C14.5954 13.5401 14.6338 13.3191 14.6508 13.1111C14.6667 12.9169 14.6667 12.6835 14.6667 12.4241L14.6667 7.28053C14.667 6.9894 14.6672 6.73279 14.6036 6.48545C14.5478 6.26826 14.4558 6.062 14.3315 5.87532C14.19 5.66273 13.9989 5.49145 13.7822 5.29713L9.49788 1.44927C9.32325 1.2924 9.16488 1.15015 9.02284 1.04125C8.86971 0.923861 8.69577 0.813133 8.48092 0.748384ZM7.90381 2.025C7.96654 2.0061 8.03345 2.0061 8.09618 2.025C8.09682 2.02519 8.10364 2.0272 8.11997 2.0364C8.13837 2.04678 8.16717 2.06534 8.21161 2.0994C8.30743 2.17287 8.42696 2.27959 8.62365 2.45625L12.8467 6.24917C13.1328 6.50615 13.1858 6.56032 13.2216 6.61414C13.263 6.67637 13.2937 6.74512 13.3123 6.81752C13.3284 6.88014 13.3333 6.95575 13.3333 7.34034V12.4C13.3333 12.6911 13.3328 12.8692 13.3219 13.0025C13.3168 13.0646 13.3105 13.1022 13.3051 13.125C13.3025 13.1359 13.3004 13.1426 13.2991 13.1462C13.2979 13.1496 13.2971 13.1511 13.297 13.1514C13.265 13.2141 13.214 13.2651 13.1513 13.297C13.1511 13.2972 13.1496 13.2979 13.1461 13.2991C13.1425 13.3004 13.1359 13.3026 13.125 13.3051C13.1022 13.3105 13.0646 13.3169 13.0025 13.322C12.8692 13.3328 12.691 13.3334 12.4 13.3334H8.66667V8.50008C8.66667 8.31599 8.51743 8.16675 8.33333 8.16675H7.66667C7.48257 8.16675 7.33333 8.31599 7.33333 8.50008V13.3334H3.6C3.30897 13.3334 3.13079 13.3328 2.99749 13.322C2.93539 13.3169 2.89781 13.3105 2.875 13.3051C2.86414 13.3026 2.85747 13.3004 2.85386 13.2991C2.85039 13.2979 2.84894 13.2972 2.84867 13.297C2.78595 13.2651 2.73495 13.2141 2.70299 13.1514C2.70291 13.1512 2.70256 13.1505 2.70199 13.1491C2.70168 13.1483 2.70131 13.1474 2.70088 13.1462C2.69959 13.1426 2.69745 13.1359 2.69489 13.125C2.68952 13.1022 2.68315 13.0646 2.67807 13.0025C2.66718 12.8692 2.66666 12.6911 2.66666 12.4V7.34034C2.66666 6.95575 2.67157 6.88014 2.68767 6.81752C2.70629 6.74512 2.73695 6.67637 2.77837 6.61414C2.8142 6.56032 2.86717 6.50615 3.1533 6.24917L7.37634 2.45625C7.57304 2.27959 7.69256 2.17287 7.78839 2.0994C7.83282 2.06534 7.86162 2.04678 7.88003 2.0364C7.89635 2.0272 7.90317 2.02519 7.90381 2.025Z",fill:"black",fillOpacity:"0.65"})})}const Cce=()=>R.jsx(kl,{svg:R.jsx(bce,{})});function Sce(){return R.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{d:"M5.33333 7.66675C5.14924 7.66675 5 7.51751 5 7.33341V6.66675C5 6.48265 5.14924 6.33341 5.33333 6.33341H10.6667C10.8508 6.33341 11 6.48265 11 6.66675V7.33341C11 7.51751 10.8508 7.66675 10.6667 7.66675H5.33333Z",fill:"black",fillOpacity:"0.65"}),R.jsx("path",{d:"M5.33333 10.6667C5.14924 10.6667 5 10.5175 5 10.3334V9.66675C5 9.48265 5.14924 9.33341 5.33333 9.33341H8.33333C8.51743 9.33341 8.66667 9.48265 8.66667 9.66675V10.3334C8.66667 10.5175 8.51743 10.6667 8.33333 10.6667H5.33333Z",fill:"black",fillOpacity:"0.65"}),R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.33333 0.666748C5.14924 0.666748 5 0.815986 5 1.00008V2.00013C4.01165 2.0009 3.49359 2.01346 3.09202 2.21807C2.71569 2.40982 2.40973 2.71578 2.21799 3.0921C2 3.51992 2 4.07998 2 5.20008V12.1334C2 13.2535 2 13.8136 2.21799 14.2414C2.40973 14.6177 2.71569 14.9237 3.09202 15.1154C3.51984 15.3334 4.0799 15.3334 5.2 15.3334H10.8C11.9201 15.3334 12.4802 15.3334 12.908 15.1154C13.2843 14.9237 13.5903 14.6177 13.782 14.2414C14 13.8136 14 13.2535 14 12.1334V5.20008C14 4.07998 14 3.51992 13.782 3.0921C13.5903 2.71578 13.2843 2.40982 12.908 2.21807C12.5064 2.01346 11.9883 2.0009 11 2.00013V1.00008C11 0.815986 10.8508 0.666748 10.6667 0.666748H10C9.81591 0.666748 9.66667 0.815986 9.66667 1.00008V2.00008H6.33333V1.00008C6.33333 0.815986 6.1841 0.666748 6 0.666748H5.33333ZM3.99498 3.35623C4.22961 3.33707 4.53372 3.33396 5 3.33349V4.00008C5 4.18418 5.14924 4.33341 5.33333 4.33341H6C6.1841 4.33341 6.33333 4.18418 6.33333 4.00008V3.33341H9.66667V4.00008C9.66667 4.18418 9.81591 4.33341 10 4.33341H10.6667C10.8508 4.33341 11 4.18418 11 4.00008V3.33349C11.4663 3.33396 11.7704 3.33707 12.005 3.35623C12.1292 3.36638 12.2044 3.37913 12.25 3.38988C12.2717 3.39499 12.2851 3.39927 12.2923 3.40185C12.2992 3.40432 12.3027 3.40608 12.3027 3.40608C12.4281 3.46999 12.5301 3.57198 12.594 3.69742C12.594 3.69742 12.5958 3.70087 12.5982 3.7078C12.6008 3.71502 12.6051 3.72837 12.6102 3.75008C12.621 3.79572 12.6337 3.87086 12.6438 3.99506C12.6656 4.26168 12.6667 4.61803 12.6667 5.20008V12.1334C12.6667 12.7155 12.6656 13.0718 12.6438 13.3384C12.6337 13.4626 12.621 13.5378 12.6102 13.5834C12.6051 13.6051 12.6008 13.6185 12.5982 13.6257C12.5969 13.6295 12.5958 13.632 12.5951 13.6337C12.5945 13.6351 12.594 13.6361 12.594 13.6361C12.5301 13.7615 12.4281 13.8635 12.3027 13.9274C12.3027 13.9274 12.2992 13.9292 12.2923 13.9316C12.2851 13.9342 12.2717 13.9385 12.25 13.9436C12.2044 13.9544 12.1292 13.9671 12.005 13.9773C11.7384 13.999 11.3821 14.0001 10.8 14.0001H5.2C4.61795 14.0001 4.26159 13.999 3.99498 13.9773C3.87078 13.9671 3.79563 13.9544 3.75 13.9436C3.72829 13.9385 3.71494 13.9342 3.70772 13.9316C3.70078 13.9292 3.69734 13.9274 3.69734 13.9274C3.5719 13.8635 3.46991 13.7615 3.406 13.6361C3.406 13.6361 3.40424 13.6326 3.40177 13.6257C3.39919 13.6185 3.39491 13.6051 3.38979 13.5834C3.37905 13.5378 3.3663 13.4626 3.35615 13.3384C3.33437 13.0718 3.33333 12.7155 3.33333 12.1334V5.20008C3.33333 4.61803 3.33437 4.26168 3.35615 3.99506C3.3663 3.87086 3.37905 3.79572 3.38979 3.75008C3.39491 3.72837 3.39919 3.71502 3.40177 3.7078C3.40424 3.70087 3.406 3.69742 3.406 3.69742C3.46991 3.57198 3.5719 3.46999 3.69734 3.40608C3.69734 3.40608 3.70078 3.40432 3.70772 3.40185C3.71494 3.39927 3.72829 3.39499 3.75 3.38988C3.79563 3.37913 3.87078 3.36638 3.99498 3.35623Z",fill:"black",fillOpacity:"0.65"})]})}const wce=()=>R.jsx(kl,{svg:R.jsx(Sce,{})});function _ce(){return R.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 7.16667C7.33518 7.16667 8.45466 6.24312 8.75446 5H14.6667C14.8508 5 15 4.85076 15 4.66667V4C15 3.81591 14.8508 3.66667 14.6667 3.66667H8.75446C8.45466 2.42355 7.33518 1.5 6 1.5C4.66482 1.5 3.54534 2.42355 3.24554 3.66667H1.33333C1.14924 3.66667 1 3.81591 1 4V4.66667C1 4.85076 1.14924 5 1.33333 5H3.24554C3.54534 6.24312 4.66482 7.16667 6 7.16667ZM7.5 4.33333C7.5 5.16176 6.82843 5.83333 6 5.83333C5.17157 5.83333 4.5 5.16176 4.5 4.33333C4.5 3.50491 5.17157 2.83333 6 2.83333C6.82843 2.83333 7.5 3.50491 7.5 4.33333Z",fill:"black",fillOpacity:"0.65"}),R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 14.5C11.3352 14.5 12.4547 13.5765 12.7545 12.3333H14.6667C14.8508 12.3333 15 12.1841 15 12V11.3333C15 11.1492 14.8508 11 14.6667 11H12.7545C12.4547 9.75688 11.3352 8.83333 10 8.83333C8.66482 8.83333 7.54534 9.75688 7.24554 11H1.33333C1.14924 11 1 11.1492 1 11.3333V12C1 12.1841 1.14924 12.3333 1.33333 12.3333H7.24554C7.54534 13.5765 8.66482 14.5 10 14.5ZM11.5 11.6667C11.5 12.4951 10.8284 13.1667 10 13.1667C9.17157 13.1667 8.5 12.4951 8.5 11.6667C8.5 10.8382 9.17157 10.1667 10 10.1667C10.8284 10.1667 11.5 10.8382 11.5 11.6667Z",fill:"black",fillOpacity:"0.65"})]})}const Ece=()=>R.jsx(kl,{svg:R.jsx(_ce,{})});function Oce(){return R.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{d:"M5.66666 2.66659C5.85076 2.66659 6 2.51735 6 2.33325V1.66659C6 1.48249 5.85076 1.33325 5.66666 1.33325H5.59999C4.10652 1.33325 3.35979 1.33325 2.78935 1.6239C2.28759 1.87956 1.87964 2.28751 1.62398 2.78928C1.33333 3.35971 1.33333 4.10645 1.33333 5.59992V5.66658C1.33333 5.85068 1.48257 5.99992 1.66666 5.99992H2.33333C2.51742 5.99992 2.66666 5.85068 2.66666 5.66658V5.59992C2.66666 4.83118 2.6677 4.33482 2.69856 3.95703C2.72816 3.59482 2.7784 3.46052 2.81199 3.3946C2.93982 3.14372 3.14379 2.93974 3.39467 2.81191C3.4606 2.77832 3.59489 2.72808 3.95711 2.69849C4.33489 2.66762 4.83126 2.66659 5.59999 2.66659H5.66666Z",fill:"black",fillOpacity:"0.65"}),R.jsx("path",{d:"M14.6667 5.66658C14.6667 5.85068 14.5174 5.99992 14.3333 5.99992H13.6667C13.4826 5.99992 13.3333 5.85068 13.3333 5.66658V5.59992C13.3333 4.83118 13.3323 4.33482 13.3014 3.95703C13.2718 3.59482 13.2216 3.46052 13.188 3.3946C13.0602 3.14372 12.8562 2.93974 12.6053 2.81191C12.5394 2.77832 12.4051 2.72808 12.0429 2.69849C11.6651 2.66762 11.1687 2.66659 10.4 2.66659H10.3333C10.1492 2.66659 10 2.51735 10 2.33325V1.66659C10 1.48249 10.1492 1.33325 10.3333 1.33325H10.4C11.8935 1.33325 12.6402 1.33325 13.2106 1.6239C13.7124 1.87956 14.1203 2.28751 14.376 2.78928C14.6667 3.35971 14.6667 4.10645 14.6667 5.59992V5.66658Z",fill:"black",fillOpacity:"0.65"}),R.jsx("path",{d:"M1.66666 9.99992C1.48257 9.99992 1.33333 10.1492 1.33333 10.3333V10.3999C1.33333 11.8934 1.33333 12.6401 1.62398 13.2106C1.87964 13.7123 2.28759 14.1203 2.78935 14.3759C3.35979 14.6666 4.10652 14.6666 5.59999 14.6666H5.66666C5.85076 14.6666 6 14.5173 6 14.3333V13.6666C6 13.4825 5.85076 13.3333 5.66666 13.3333H5.59999C4.83126 13.3333 4.33489 13.3322 3.95711 13.3013C3.59489 13.2718 3.4606 13.2215 3.39467 13.1879C3.14379 13.0601 2.93982 12.8561 2.81199 12.6052C2.7784 12.5393 2.72816 12.405 2.69856 12.0428C2.6677 11.665 2.66666 11.1687 2.66666 10.3999V10.3333C2.66666 10.1492 2.51742 9.99992 2.33333 9.99992H1.66666Z",fill:"black",fillOpacity:"0.65"}),R.jsx("path",{d:"M10.3333 13.3333C10.1492 13.3333 10 13.4825 10 13.6666V14.3333C10 14.5173 10.1492 14.6666 10.3333 14.6666H10.4C11.8935 14.6666 12.6402 14.6666 13.2106 14.3759C13.7124 14.1203 14.1203 13.7123 14.376 13.2106C14.6667 12.6401 14.6667 11.8934 14.6667 10.3999V10.3333C14.6667 10.1492 14.5174 9.99992 14.3333 9.99992H13.6667C13.4826 9.99992 13.3333 10.1492 13.3333 10.3333V10.3999C13.3333 11.1687 13.3323 11.665 13.3014 12.0428C13.2718 12.405 13.2216 12.5393 13.188 12.6052C13.0602 12.8561 12.8562 13.0601 12.6053 13.1879C12.5394 13.2215 12.4051 13.2718 12.0429 13.3013C11.6651 13.3322 11.1687 13.3333 10.4 13.3333H10.3333Z",fill:"black",fillOpacity:"0.65"}),R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.17159 10.1144C8.64463 10.4634 8.01272 10.6667 7.33333 10.6667C5.49238 10.6667 3.99999 9.17428 3.99999 7.33333C3.99999 5.49238 5.49238 4 7.33333 4C9.17428 4 10.6667 5.49238 10.6667 7.33333C10.6667 8.01272 10.4634 8.64464 10.1144 9.17159L11.7357 10.7929C11.8659 10.9231 11.8659 11.1341 11.7357 11.2643L11.2643 11.7357C11.1341 11.8659 10.9231 11.8659 10.7929 11.7357L9.17159 10.1144ZM9.33333 7.33333C9.33333 8.4379 8.4379 9.33333 7.33333 9.33333C6.22876 9.33333 5.33333 8.4379 5.33333 7.33333C5.33333 6.22876 6.22876 5.33333 7.33333 5.33333C8.4379 5.33333 9.33333 6.22876 9.33333 7.33333Z",fill:"black",fillOpacity:"0.65"})]})}const xce=()=>R.jsx(kl,{svg:R.jsx(Oce,{})}),iC=[{text:V("scanQRCode2Debug"),itemKey:"scan_qrcode",icon:R.jsx(Cce,{}),path:"/"},{itemKey:"launch_mode",text:V("launchMode"),icon:R.jsx(Ece,{}),path:"/launch_mode"},{itemKey:"precheck_code",text:V("codePreCheck"),icon:R.jsx(xce,{}),path:"/precheck_code"},{itemKey:"project_info",text:V("projectInfo"),icon:R.jsx(wce,{}),path:"/project_detail"},{itemKey:"changelog",text:V("changelog"),icon:R.jsx(j7,{size:"default",style:{fontWeight:"300",color:"#666"}}),path:"/changelog"}],Tce=()=>{const s=Gu(),[e,t]=T.useState("scan_qrcode"),n=r=>{const a=iC.find(i=>i.itemKey===r.itemKey);s(a.path),t(a.itemKey)};return T.useEffect(()=>{const r=window.location.pathname,a=iC.find(i=>i.path===r);t(a?a.itemKey:"")},[s]),R.jsx(Ra,{limitIndent:!1,bodyStyle:{height:"100vh",paddingLeft:"12px"},items:iC,selectedKeys:[e],onSelect:n})},Pce=()=>{const{state:{loading:s}}=Qr();return s.visible?R.jsx("div",{className:"loading-container",children:R.jsxs("div",{className:"loading-content",children:[R.jsx(pn,{size:"large"}),R.jsx("div",{className:"loading-text",children:s.text})]})}):null};function Ice(){const{state:{feature:s,loading:e,error:t},setSchema:n,showLoading:r,hideLoading:a,setError:i,setUser:o,setPackages:c,setGameDetail:h,setDevToolVersion:f,setEngine:p}=Qr(),[y,v]=T.useState(!1),[_,S]=T.useState("");T.useEffect(()=>{aie()},[]);const C=()=>{Ln({url:"/game/detail",method:"GET"}).then(w=>{if(w.error){a();const{errorCode:x,errorMsg:O}=w.error;h({client_key:w.error.clientKey,has_error:!0,error_msg:O,error_code:x}),x===404&&i({text:V("getDevGameDetailNotFound",{clientKey:w.error.clientKey})});return}else i({text:""}),h(w.data),a()})};return T.useEffect(()=>{r(),Ln({url:"/game/config",method:"GET"}).then(w=>{if(w.error)a(),i({visible:!0,text:V("getDevGameConfigFailed")+`: ${w.error.errorMsg}`}),v(!0),S(V("getDevGameConfigFailed")),console.log(`❌ ${V("getDevGameConfigFailed")}: ${w.error.errorMsg}`);else{console.log(`✅ ${V("getDevGameConfigSuccess")}`);const{schema:x,nodeWsPort:O,user:P,packages:D,devToolVersion:k,clientKey:N,engine:M}=w.data;n(x),ze.setMultiple({nodeWsPort:O,email:P?.email,clientKey:N}),o(P),f(k),c(D),p(M),a()}}),C()},[]),T.useEffect(()=>(qe.on("resourceChange",C),()=>{qe.off("resourceChange",C)}),[]),e.visible?R.jsx(Pce,{}):y?R.jsxs("div",{className:"server-error-container",children:[R.jsx(Sle,{}),R.jsx("div",{className:"server-error-text",children:_})]}):R.jsxs(Soe,{children:[t.text&&R.jsx(Ei,{description:t.text,type:"danger"}),R.jsx(vce,{}),R.jsxs("div",{className:"main-layout",children:[R.jsx(yce,{}),R.jsxs("div",{className:"content-wrapper",children:[s.sidebar.enable&&R.jsx(Tce,{}),R.jsx("div",{className:"routes-container",children:R.jsxs(Qie,{children:[R.jsx(Gi,{path:"/",element:R.jsx(Xoe,{})}),R.jsx(Gi,{path:"/project_detail",element:R.jsx(_le,{})}),R.jsx(Gi,{path:"/debug_setting",element:R.jsx(Qoe,{})}),R.jsx(Gi,{path:"/launch_mode",element:R.jsx(ele,{})}),R.jsx(Gi,{path:"/precheck_code",element:R.jsx(Dle,{})}),R.jsx(Gi,{path:"/changelog",element:R.jsx(kle,{})})]})})]})]})]})}CM.createRoot(document.getElementById("root")).render(R.jsx(FS,{children:R.jsx(lie,{children:R.jsx(Ice,{})})}));
67
+ Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let y=So(),v;if(e){let x=typeof e=="string"?zl(e):e;fn(f==="/"||x.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${x.pathname}" was given in the \`location\` prop.`),v=x}else v=y;let _=v.pathname||"/",S=_;if(f!=="/"){let x=f.replace(/^\//,"").split("/");S="/"+_.replace(/^\//,"").split("/").slice(x.length).join("/")}let C=n5(s,{pathname:S});la(p||C!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),la(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=Hie(C&&C.map(x=>Object.assign({},x,{params:Object.assign({},c,x.params),pathname:Oa([f,a.encodeLocation?a.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?f:Oa([f,a.encodeLocation?a.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,t,n,r);return e&&w?T.createElement(Wu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},w):w}function jie(){let s=Gie(),e=kie(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),t=s instanceof Error?s.stack:null,n="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",s),i=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:a},"ErrorBoundary")," or"," ",T.createElement("code",{style:a},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},e),t?T.createElement("pre",{style:r},t):null,i)}var Vie=T.createElement(jie,null),Bie=class extends T.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,e){return e.location!==s.location||e.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:e.error,location:e.location,revalidation:s.revalidation||e.revalidation}}componentDidCatch(s,e){this.props.unstable_onError?this.props.unstable_onError(s,e):console.error("React Router caught the following error during render",s)}render(){return this.state.error!==void 0?T.createElement(Na.Provider,{value:this.props.routeContext},T.createElement(Ow.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Uie({routeContext:s,match:e,children:t}){let n=T.useContext(Kl);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),T.createElement(Na.Provider,{value:s},t)}function Hie(s,e=[],t=null,n=null,r=null){if(s==null){if(!t)return null;if(t.errors)s=t.matches;else if(e.length===0&&!t.initialized&&t.matches.length>0)s=t.matches;else return null}let a=s,i=t?.errors;if(i!=null){let h=a.findIndex(f=>f.route.id&&i?.[f.route.id]!==void 0);fn(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,h+1))}let o=!1,c=-1;if(t)for(let h=0;h<a.length;h++){let f=a[h];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=h),f.route.id){let{loaderData:p,errors:y}=t,v=f.route.loader&&!p.hasOwnProperty(f.route.id)&&(!y||y[f.route.id]===void 0);if(f.route.lazy||v){o=!0,c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((h,f,p)=>{let y,v=!1,_=null,S=null;t&&(y=i&&f.route.id?i[f.route.id]:void 0,_=f.route.errorElement||Vie,o&&(c<0&&p===0?(h5("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,S=null):c===p&&(v=!0,S=f.route.hydrateFallbackElement||null)));let C=e.concat(a.slice(0,p+1)),w=()=>{let x;return y?x=_:v?x=S:f.route.Component?x=T.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=h,T.createElement(Uie,{match:f,routeContext:{outlet:h,matches:C,isDataRoute:t!=null},children:x})};return t&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?T.createElement(Bie,{location:t.location,revalidation:t.revalidation,component:_,error:y,children:w(),routeContext:{outlet:null,matches:C,isDataRoute:!0},unstable_onError:n}):w()},null)}function xw(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zie(s){let e=T.useContext(Kl);return fn(e,xw(s)),e}function Kie(s){let e=T.useContext(Bp);return fn(e,xw(s)),e}function Wie(s){let e=T.useContext(Na);return fn(e,xw(s)),e}function Tw(s){let e=Wie(s),t=e.matches[e.matches.length-1];return fn(t.route.id,`${s} can only be used on routes that contain a unique "id"`),t.route.id}function qie(){return Tw("useRouteId")}function Gie(){let s=T.useContext(Ow),e=Kie("useRouteError"),t=Tw("useRouteError");return s!==void 0?s:e.errors?.[t]}function Yie(){let{router:s}=zie("useNavigate"),e=Tw("useNavigate"),t=T.useRef(!1);return u5(()=>{t.current=!0}),T.useCallback(async(r,a={})=>{la(t.current,c5),t.current&&(typeof r=="number"?s.navigate(r):await s.navigate(r,{fromRouteId:e,...a}))},[s,e])}var K3={};function h5(s,e,t){!e&&!K3[s]&&(K3[s]=!0,la(!1,t))}T.memo(Zie);function Zie({routes:s,future:e,state:t,unstable_onError:n}){return d5(s,void 0,t,n,e)}function Gi(s){fn(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Xie({basename:s="/",children:e=null,location:t,navigationType:n="POP",navigator:r,static:a=!1}){fn(!qu(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let i=s.replace(/^\/*/,"/"),o=T.useMemo(()=>({basename:i,navigator:r,static:a,future:{}}),[i,r,a]);typeof t=="string"&&(t=zl(t));let{pathname:c="/",search:h="",hash:f="",state:p=null,key:y="default"}=t,v=T.useMemo(()=>{let _=ka(c,i);return _==null?null:{location:{pathname:_,search:h,hash:f,state:p,key:y},navigationType:n}},[i,c,h,f,p,y,n]);return la(v!=null,`<Router basename="${i}"> is not able to match the URL "${c}${h}${f}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:T.createElement(da.Provider,{value:o},T.createElement(Wu.Provider,{children:e,value:v}))}function Qie({children:s,location:e}){return $ie(FC(s),e)}function FC(s,e=[]){let t=[];return T.Children.forEach(s,(n,r)=>{if(!T.isValidElement(n))return;let a=[...e,r];if(n.type===T.Fragment){t.push.apply(t,FC(n.props.children,a));return}fn(n.type===Gi,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),fn(!n.props.index||!n.props.children,"An index route cannot have child routes.");let i={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=FC(n.props.children,a)),t.push(i)}),t}var Pf="get",If="application/x-www-form-urlencoded";function Up(s){return s!=null&&typeof s.tagName=="string"}function Jie(s){return Up(s)&&s.tagName.toLowerCase()==="button"}function eoe(s){return Up(s)&&s.tagName.toLowerCase()==="form"}function toe(s){return Up(s)&&s.tagName.toLowerCase()==="input"}function noe(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function roe(s,e){return s.button===0&&(!e||e==="_self")&&!noe(s)}var hf=null;function soe(){if(hf===null)try{new FormData(document.createElement("form"),0),hf=!1}catch{hf=!0}return hf}var aoe=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Z0(s){return s!=null&&!aoe.has(s)?(la(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${If}"`),null):s}function ioe(s,e){let t,n,r,a,i;if(eoe(s)){let o=s.getAttribute("action");n=o?ka(o,e):null,t=s.getAttribute("method")||Pf,r=Z0(s.getAttribute("enctype"))||If,a=new FormData(s)}else if(Jie(s)||toe(s)&&(s.type==="submit"||s.type==="image")){let o=s.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=s.getAttribute("formaction")||o.getAttribute("action");if(n=c?ka(c,e):null,t=s.getAttribute("formmethod")||o.getAttribute("method")||Pf,r=Z0(s.getAttribute("formenctype"))||Z0(o.getAttribute("enctype"))||If,a=new FormData(o,s),!soe()){let{name:h,type:f,value:p}=s;if(f==="image"){let y=h?`${h}.`:"";a.append(`${y}x`,"0"),a.append(`${y}y`,"0")}else h&&a.append(h,p)}}else{if(Up(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=Pf,n=null,r=If,i=s}return a&&r==="text/plain"&&(i=a,a=void 0),{action:n,method:t.toLowerCase(),encType:r,formData:a,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Pw(s,e){if(s===!1||s===null||typeof s>"u")throw new Error(e)}function ooe(s,e,t){let n=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return n.pathname==="/"?n.pathname=`_root.${t}`:e&&ka(n.pathname,e)==="/"?n.pathname=`${e.replace(/\/$/,"")}/_root.${t}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${t}`,n}async function loe(s,e){if(s.id in e)return e[s.id];try{let t=await import(s.module);return e[s.id]=t,t}catch(t){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function coe(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function uoe(s,e,t){let n=await Promise.all(s.map(async r=>{let a=e.routes[r.route.id];if(a){let i=await loe(a,t);return i.links?i.links():[]}return[]}));return poe(n.flat(1).filter(coe).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function W3(s,e,t,n,r,a){let i=(c,h)=>t[h]?c.route.id!==t[h].route.id:!0,o=(c,h)=>t[h].pathname!==c.pathname||t[h].route.path?.endsWith("*")&&t[h].params["*"]!==c.params["*"];return a==="assets"?e.filter((c,h)=>i(c,h)||o(c,h)):a==="data"?e.filter((c,h)=>{let f=n.routes[c.route.id];if(!f||!f.hasLoader)return!1;if(i(c,h)||o(c,h))return!0;if(c.route.shouldRevalidate){let p=c.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:t[0]?.params||{},nextUrl:new URL(s,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function doe(s,e,{includeHydrateFallback:t}={}){return hoe(s.map(n=>{let r=e.routes[n.route.id];if(!r)return[];let a=[r.module];return r.clientActionModule&&(a=a.concat(r.clientActionModule)),r.clientLoaderModule&&(a=a.concat(r.clientLoaderModule)),t&&r.hydrateFallbackModule&&(a=a.concat(r.hydrateFallbackModule)),r.imports&&(a=a.concat(r.imports)),a}).flat(1))}function hoe(s){return[...new Set(s)]}function foe(s){let e={},t=Object.keys(s).sort();for(let n of t)e[n]=s[n];return e}function poe(s,e){let t=new Set;return new Set(e),s.reduce((n,r)=>{let a=JSON.stringify(foe(r));return t.has(a)||(t.add(a),n.push({key:a,link:r})),n},[])}function f5(){let s=T.useContext(Kl);return Pw(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function goe(){let s=T.useContext(Bp);return Pw(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var Iw=T.createContext(void 0);Iw.displayName="FrameworkContext";function p5(){let s=T.useContext(Iw);return Pw(s,"You must render this element inside a <HydratedRouter> element"),s}function moe(s,e){let t=T.useContext(Iw),[n,r]=T.useState(!1),[a,i]=T.useState(!1),{onFocus:o,onBlur:c,onMouseEnter:h,onMouseLeave:f,onTouchStart:p}=e,y=T.useRef(null);T.useEffect(()=>{if(s==="render"&&i(!0),s==="viewport"){let S=w=>{w.forEach(x=>{i(x.isIntersecting)})},C=new IntersectionObserver(S,{threshold:.5});return y.current&&C.observe(y.current),()=>{C.disconnect()}}},[s]),T.useEffect(()=>{if(n){let S=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(S)}}},[n]);let v=()=>{r(!0)},_=()=>{r(!1),i(!1)};return t?s!=="intent"?[a,y,{}]:[a,y,{onFocus:Vc(o,v),onBlur:Vc(c,_),onMouseEnter:Vc(h,v),onMouseLeave:Vc(f,_),onTouchStart:Vc(p,v)}]:[!1,y,{}]}function Vc(s,e){return t=>{s&&s(t),t.defaultPrevented||e(t)}}function yoe({page:s,...e}){let{router:t}=f5(),n=T.useMemo(()=>n5(t.routes,s,t.basename),[t.routes,s,t.basename]);return n?T.createElement(boe,{page:s,matches:n,...e}):null}function voe(s){let{manifest:e,routeModules:t}=p5(),[n,r]=T.useState([]);return T.useEffect(()=>{let a=!1;return uoe(s,e,t).then(i=>{a||r(i)}),()=>{a=!0}},[s,e,t]),n}function boe({page:s,matches:e,...t}){let n=So(),{manifest:r,routeModules:a}=p5(),{basename:i}=f5(),{loaderData:o,matches:c}=goe(),h=T.useMemo(()=>W3(s,e,c,r,n,"data"),[s,e,c,r,n]),f=T.useMemo(()=>W3(s,e,c,r,n,"assets"),[s,e,c,r,n]),p=T.useMemo(()=>{if(s===n.pathname+n.search+n.hash)return[];let _=new Set,S=!1;if(e.forEach(w=>{let x=r.routes[w.route.id];!x||!x.hasLoader||(!h.some(O=>O.route.id===w.route.id)&&w.route.id in o&&a[w.route.id]?.shouldRevalidate||x.hasClientLoader?S=!0:_.add(w.route.id))}),_.size===0)return[];let C=ooe(s,i,"data");return S&&_.size>0&&C.searchParams.set("_routes",e.filter(w=>_.has(w.route.id)).map(w=>w.route.id).join(",")),[C.pathname+C.search]},[i,o,n,r,h,e,s,a]),y=T.useMemo(()=>doe(f,r),[f,r]),v=voe(f);return T.createElement(T.Fragment,null,p.map(_=>T.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...t})),y.map(_=>T.createElement("link",{key:_,rel:"modulepreload",href:_,...t})),v.map(({key:_,link:S})=>T.createElement("link",{key:_,nonce:t.nonce,...S})))}function Coe(...s){return e=>{s.forEach(t=>{typeof t=="function"?t(e):t!=null&&(t.current=e)})}}var g5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{g5&&(window.__reactRouterVersion="7.8.2")}catch{}function Soe({basename:s,children:e,window:t}){let n=T.useRef();n.current==null&&(n.current=cie({window:t,v5Compat:!0}));let r=n.current,[a,i]=T.useState({action:r.action,location:r.location}),o=T.useCallback(c=>{T.startTransition(()=>i(c))},[i]);return T.useLayoutEffect(()=>r.listen(o),[r,o]),T.createElement(Xie,{basename:s,children:e,location:a.location,navigationType:a.action,navigator:r})}var m5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,y5=T.forwardRef(function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:a,replace:i,state:o,target:c,to:h,preventScrollReset:f,viewTransition:p,...y},v){let{basename:_}=T.useContext(da),S=typeof h=="string"&&m5.test(h),C,w=!1;if(typeof h=="string"&&S&&(C=h,g5))try{let F=new URL(window.location.href),j=h.startsWith("//")?new URL(F.protocol+h):new URL(h),B=ka(j.pathname,_);j.origin===F.origin&&B!=null?h=B+j.search+j.hash:w=!0}catch{la(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let x=Fie(h,{relative:r}),[O,P,D]=moe(n,y),k=Ooe(h,{replace:i,state:o,target:c,preventScrollReset:f,relative:r,viewTransition:p});function N(F){e&&e(F),F.defaultPrevented||k(F)}let M=T.createElement("a",{...y,...D,href:C||x,onClick:w||a?e:N,ref:Coe(v,P),target:c,"data-discover":!S&&t==="render"?"true":void 0});return O&&!S?T.createElement(T.Fragment,null,M,T.createElement(yoe,{page:x})):M});y5.displayName="Link";var woe=T.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:a,to:i,viewTransition:o,children:c,...h},f){let p=Yu(i,{relative:h.relative}),y=So(),v=T.useContext(Bp),{navigator:_,basename:S}=T.useContext(da),C=v!=null&&Doe(p)&&o===!0,w=_.encodeLocation?_.encodeLocation(p).pathname:p.pathname,x=y.pathname,O=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;t||(x=x.toLowerCase(),O=O?O.toLowerCase():null,w=w.toLowerCase()),O&&S&&(O=ka(O,S)||O);const P=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let D=x===w||!r&&x.startsWith(w)&&x.charAt(P)==="/",k=O!=null&&(O===w||!r&&O.startsWith(w)&&O.charAt(w.length)==="/"),N={isActive:D,isPending:k,isTransitioning:C},M=D?e:void 0,F;typeof n=="function"?F=n(N):F=[n,D?"active":null,k?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let j=typeof a=="function"?a(N):a;return T.createElement(y5,{...h,"aria-current":M,className:F,ref:f,style:j,to:i,viewTransition:o},typeof c=="function"?c(N):c)});woe.displayName="NavLink";var _oe=T.forwardRef(({discover:s="render",fetcherKey:e,navigate:t,reloadDocument:n,replace:r,state:a,method:i=Pf,action:o,onSubmit:c,relative:h,preventScrollReset:f,viewTransition:p,...y},v)=>{let _=Poe(),S=Ioe(o,{relative:h}),C=i.toLowerCase()==="get"?"get":"post",w=typeof o=="string"&&m5.test(o),x=O=>{if(c&&c(O),O.defaultPrevented)return;O.preventDefault();let P=O.nativeEvent.submitter,D=P?.getAttribute("formmethod")||i;_(P||O.currentTarget,{fetcherKey:e,method:D,navigate:t,replace:r,state:a,relative:h,preventScrollReset:f,viewTransition:p})};return T.createElement("form",{ref:v,method:C,action:S,onSubmit:n?c:x,...y,"data-discover":!w&&s==="render"?"true":void 0})});_oe.displayName="Form";function Eoe(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function v5(s){let e=T.useContext(Kl);return fn(e,Eoe(s)),e}function Ooe(s,{target:e,replace:t,state:n,preventScrollReset:r,relative:a,viewTransition:i}={}){let o=Gu(),c=So(),h=Yu(s,{relative:a});return T.useCallback(f=>{if(roe(f,e)){f.preventDefault();let p=t!==void 0?t:fu(c)===fu(h);o(s,{replace:p,state:n,preventScrollReset:r,relative:a,viewTransition:i})}},[c,o,h,t,n,e,s,r,a,i])}var xoe=0,Toe=()=>`__${String(++xoe)}__`;function Poe(){let{router:s}=v5("useSubmit"),{basename:e}=T.useContext(da),t=qie();return T.useCallback(async(n,r={})=>{let{action:a,method:i,encType:o,formData:c,body:h}=ioe(n,e);if(r.navigate===!1){let f=r.fetcherKey||Toe();await s.fetch(f,t,r.action||a,{preventScrollReset:r.preventScrollReset,formData:c,body:h,formMethod:r.method||i,formEncType:r.encType||o,flushSync:r.flushSync})}else await s.navigate(r.action||a,{preventScrollReset:r.preventScrollReset,formData:c,body:h,formMethod:r.method||i,formEncType:r.encType||o,replace:r.replace,state:r.state,fromRouteId:t,flushSync:r.flushSync,viewTransition:r.viewTransition})},[s,e,t])}function Ioe(s,{relative:e}={}){let{basename:t}=T.useContext(da),n=T.useContext(Na);fn(n,"useFormAction must be used inside a RouteContext");let[r]=n.matches.slice(-1),a={...Yu(s||".",{relative:e})},i=So();if(s==null){a.search=i.search;let o=new URLSearchParams(a.search),c=o.getAll("index");if(c.some(f=>f==="")){o.delete("index"),c.filter(p=>p).forEach(p=>o.append("index",p));let f=o.toString();a.search=f?`?${f}`:""}}return(!s||s===".")&&r.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(a.pathname=a.pathname==="/"?t:Oa([t,a.pathname])),fu(a)}function Doe(s,{relative:e}={}){let t=T.useContext(l5);fn(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=v5("useViewTransitionState"),r=Yu(s,{relative:e});if(!t.isTransitioning)return!1;let a=ka(t.currentLocation.pathname,n)||t.currentLocation.pathname,i=ka(t.nextLocation.pathname,n)||t.nextLocation.pathname;return Qf(r.pathname,i)!=null||Qf(r.pathname,a)!=null}const Roe=document.getElementById(Ew),q3=Roe.contentWindow;class koe{ws;connectTimeoutTimer;isTimeout=!1;init(e){this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.ws&&(this.ws.close(),this.ws=void 0),this.isTimeout=!1;const t=`ws://${e.clientHost}:${e.clientWsPort||e.clientHttpPort-1}`;console.info(`⌛️ ${V("startConnectClientWS",{wsURL:t})}`);const n=new WebSocket(t);this.connectTimeoutTimer=setTimeout(()=>{n.readyState!==WebSocket.OPEN&&(this.isTimeout=!0,n.close(),console.error(`${V("clientConnectTimeout")||"客户端连接超时"}`),qe.emit("connectionChange",{node:ze.get("isNodeWSConnected"),client:!1,from:"client"}),B3())},5e3),n.onclose=()=>{this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.isTimeout||(console.error(`${V("clientServerDisconnected")}`),qe.emit("connectionChange",{node:ze.get("isNodeWSConnected"),client:!1}),B3())},n.onerror=()=>{if(this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),!this.isTimeout){const r=V("clientServerStartError");qe.emit("connectionChange",{node:ze.get("isNodeWSConnected"),client:!1}),console.error(r)}},this.ws=n,n.onopen=()=>{this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.isTimeout||(console.log(`✅ ${V("clientConnectedSuccess")}`),qe.emit("connectionChange",{node:ze.get("isNodeWSConnected"),client:!0,from:"client"}),n.send(JSON.stringify({stage:"connecting",status:"success",message:"Browser connected to Client Server Successfully"})))},n.onmessage=function(r){try{const a=JSON.parse(r.data);switch(a?.method){case"subscribeHandler":q3.__DEV__?.subscribeHandler?.(a?.payload?.event,a?.payload?.data);break;case"invokeHandler":q3.__DEV__?.invokeHandler?.(a?.payload?.callbackId,a?.payload?.data);break;default:break}}catch(a){console.error(a)}}}send(e){this.ws?.readyState&&(e.from="browser",this.ws?.send(JSON.stringify(e)))}close(){this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.ws?.close(),this.ws=void 0}}const Zu=new koe,Noe={start:{msgKey:"uploadGameStart"},success:{msgKey:"uploadGameSuccess",handle:s=>{const{packages:e,clientKey:t}=s||{};ze.setMultiple({packages:e,clientKey:t,isResourcesReady:!0}),qe.emit("setupStatusChange",{isScriptsReady:ze.get("isScriptsReady"),isResourcesReady:!0})}},process:{msgKey:"uploadProcess"},error:{msgKey:"uploadError",handle:s=>{const{msg:e}=s||{};ze.set("isResourcesReady",!1),qe.emit("setupStatusChange",{isScriptsReady:ze.get("isScriptsReady"),isResourcesReady:!1,isResourcesFailed:!0})}},restart:{msgKey:"uploadGameRestart"}};function Aoe(s){const{status:e,payload:t}=s,n=Noe[e];if(!n){console.warn(`Unknown upload status: ${e}`);return}const r=V(n.msgKey);qe.emit("uploadGame",{status:e,msg:r,progress:t?.progress}),n.handle&&n.handle(t)}class Moe{ws;init(){const e=ze.get("nodeWsPort");return console.info(`⌛️ ${V("nodeServerStartConnect")}`),this.ws=new WebSocket(`ws://localhost:${e}`),this.ws.onclose=()=>{console.error(`❌ ${V("nodeServerDisconnect")}`),qe.emit("connectionChange",{node:!1,client:ze.get("isClientWSConnected")})},this.ws.onerror=()=>{const t=V("nodeServerStartError");console.error(t)},this.ws.onopen=()=>{console.log(`✅ ${V("nodeServerConnectedSuccess")}`),qe.emit("connectionChange",{node:!0,client:ze.get("isClientWSConnected")}),this.ws?.send(JSON.stringify({event:"connected",method:"connected",from:"browser"}))},this.ws.onmessage=t=>{if(t.data){const n=JSON.parse(t.data);switch(n.method){case"uploadStatus":{Aoe(n);break}case"compilationStatus":{qe.emit("compilationStatus",n.payload);break}case"unitySplitStatus":{qe.emit("unitySplitStatus",n.payload);break}case"resourceChange":{aa.info("Node WS resourceChange",n?.payload),qe.emit("resourceChange",{});break}case"scanQRCodeSuccess":{const{clientWsPort:a,clientHost:i,clientHttpPort:o}=n.payload;ze.setMultiple({clientHost:i,clientWsPort:a,clientHttpPort:o}),Zu.init({clientWsPort:a,clientHost:i,clientHttpPort:o}),qe.emit("scanQRCode",{status:"success"});break}case"scanQRCodeFailed":{const{msg:a}=n.payload;qe.emit("scanQRCode",{status:"failed",msg:a});break}case"scanQRCodeStart":{qe.emit("scanQRCode",{status:"start"});break}}}},!0}send(e){e.from="browser",this.ws?.send(JSON.stringify(e))}close(){this.ws?.close(),this.ws=void 0}}const pu=new Moe,Foe=["krypton.js","ttmg-core.js"];async function G3(s){try{const e=J4();console.log(`⌛️ ${V("startDebug")}`),console.log(`⌛️ ${V("initClientEnv")}`);const t=await Ln({url:`${e}/game/cwd`,method:"POST",data:{command:"start"}});if(console.log(`✅ ${V("initClientEnvSuccess")}`),Zu.send({method:"setDebugSettings",payload:s.debugSetting}),s.debugMode==="clientPreview"||s.debugMode==="clientDebug")ze.set("isScriptsReady",!0),pu.send({method:"startUpload"});else{console.log(`⌛️ ${V("startInitJSDevEnv")}`);const r=document.getElementById(Ew).contentWindow;r.__DEV__={isEnable:!0,server:e},console.log(`✅ ${V("initJSDevEnvSuccess")}`);const a=await Loe(r,Foe,e),i=Object.values(a).some(o=>!o);ze.set("isScriptsReady",Object.values(a).every(o=>o)),qe.emit("setupStatusChange",{isScriptsReady:ze.get("isScriptsReady"),isResourcesReady:ze.get("isResourcesReady"),isScriptsFailed:i}),i||(console.log(`✅ ${V("setDevScriptsSuccess")}`),pu.send({method:"startUpload"}))}}catch(e){console.log(`❌ ${V("setDevEnvFailed")}`,e?.message??e)}}async function Loe(s,e,t){const n={};for(const r of e)try{console.log(`⏳ ${V("startLoadDevScripts")}: ${r}`);const a=await fetch(`${t}/game/scripts/${r}`);if(!a.ok){console.error(`${V("loadDevScriptsFailed")}: ${r}`),n[r]=!1;continue}const i=await a.text();if(!i){console.error(`${V("loadDevScriptsEmpty")}: ${r}`),n[r]=!1;continue}console.log(`✅ ${V("loadDevScriptsSuccess")}: ${r}`);const o=s.document.createElement("script");o.id=r,o.type="text/javascript",o.text=i,s.document.body.appendChild(o),n[r]=!0,console.log(`✅ ${V("loadDevScriptsInitSuccess")}: ${r}`)}catch(a){console.error(`${V("loadDevScriptsFailed")}: ${r}`,a),n[r]=!1}return n}function $oe(){const s=()=>typeof document<"u"?document.hidden:!1,[e,t]=T.useState(s);return T.useEffect(()=>{const n=()=>{t(document.hidden),Zu.send({method:"sendPageVisibility",payload:{isHidden:document.hidden}})};return document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n)}},[]),e}const joe=m.memo(()=>{const{setMessage:s,hideLoading:e,state:{gameDetail:t,debugSetting:n,isConnected:r,selectedLaunchOption:a,debugMode:i}}=Qr();$oe();const[o,c]=T.useState(""),h=_=>{if(!_.client||!_.node){ze.set("hasSetup",!1);return}if(ze.get("hasSetup"))return;ze.set("hasSetup",!0),(async()=>{e(),s({type:"success",desc:V("setupDevEnv")}),await G3({debugSetting:n,debugMode:i})})()},f=T.useCallback(({status:_,msg:S,progress:C})=>{switch(_){case"start":const w=`⌛️ ${V("uploadStart")}`;s({type:"info",desc:w}),console.log(w);break;case"success":s({type:"success",desc:V("uploadSuccess")}),console.log(`✅ ${V("uploadSuccess")}`);break;case"error":const x=`${V("uploadError")}: ${S}`;s({type:"danger",desc:x}),console.log(x);break;case"restart":break;case"process":const O=`${V("uploadProcess")} ${(C*100).toFixed(0)}%`;s({type:"info",desc:O});break}},[]),p=T.useCallback(({isScriptsReady:_,isResourcesReady:S,isScriptsFailed:C,isResourcesFailed:w})=>{_&&S?(aa.info("scripts and resources are ready, send meta"),eie(t),s({type:"success",desc:V(i==="clientPreview"?"clientPreviewEnvSetupSuccess":"debugEnvSetupSuccess")})):C?s({type:"danger",desc:V("scriptsSetupFailed")}):w&&s({type:"danger",desc:V("resourcesSetupFailed")})},[t,a,i]),y=()=>{if(!r)return;const _=sa.warning({position:"top",duration:1e4,title:V("gameResourceUpdated"),id:o,onClose:()=>{c("")},content:R.jsxs(R.Fragment,{children:[R.jsx("p",{children:V("gameResourceChange")}),R.jsxs("div",{className:"banner-footer",children:[R.jsx(Pe,{type:"tertiary",onClick:()=>{sa.close(_)},children:V("notUpload")}),R.jsx(Pe,{style:{marginLeft:12},type:"warning",onClick:()=>{aa.info("upload"),aa.info("upload iframe onload, 开始重新初始化"),G3({debugSetting:n,debugMode:i}),sa.close(_)},children:V("uploadToClient")})]})]})});c(_)},v=T.useCallback(({status:_,errorMsg:S})=>{_==="start"?(s({type:"info",title:V("gameResourceCompilingTitle"),desc:V("gameResourceCompiling")}),console.warn(`⚠️ ${V("gameResourceCompiling")}`)):_==="end"&&(S?(s({type:"danger",desc:S}),console.error(`❌ ${S}`)):(s({type:"success",title:V("gameResourceCompileSuccessTitle"),desc:V("gameResourceCompileSuccess")}),console.log(`✅ ${V("gameResourceCompileSuccess")}`)))},[]);return T.useEffect(()=>(qe.on("connectionChange",h),qe.on("compilationStatus",v),qe.on("resourceChange",y),qe.on("uploadGame",f),qe.on("setupStatusChange",p),()=>{qe.off("compilationStatus",v),qe.off("resourceChange",y),qe.off("setupStatusChange",p),qe.off("uploadGame",f),qe.off("connectionChange",h)}),[h,v,y,p,f]),null});var rl={},X0,Y3;function b5(){return Y3||(Y3=1,X0={L:1,M:0,Q:3,H:2}),X0}var Q0,Z3;function C5(){return Z3||(Z3=1,Q0={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),Q0}var J0,X3;function Voe(){if(X3)return J0;X3=1;var s=C5();function e(t){this.mode=s.MODE_8BIT_BYTE,this.data=t}return e.prototype={getLength:function(t){return this.data.length},write:function(t){for(var n=0;n<this.data.length;n++)t.put(this.data.charCodeAt(n),8)}},J0=e,J0}var eC,Q3;function Boe(){if(Q3)return eC;Q3=1;var s=b5();function e(t,n){this.totalCount=t,this.dataCount=n}return e.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],e.getRSBlocks=function(t,n){var r=e.getRsBlockTable(t,n);if(r==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+n);for(var a=r.length/3,i=new Array,o=0;o<a;o++)for(var c=r[o*3+0],h=r[o*3+1],f=r[o*3+2],p=0;p<c;p++)i.push(new e(h,f));return i},e.getRsBlockTable=function(t,n){switch(n){case s.L:return e.RS_BLOCK_TABLE[(t-1)*4+0];case s.M:return e.RS_BLOCK_TABLE[(t-1)*4+1];case s.Q:return e.RS_BLOCK_TABLE[(t-1)*4+2];case s.H:return e.RS_BLOCK_TABLE[(t-1)*4+3];default:return}},eC=e,eC}var tC,J3;function Uoe(){if(J3)return tC;J3=1;function s(){this.buffer=new Array,this.length=0}return s.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(var n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},tC=s,tC}var nC,eR;function S5(){if(eR)return nC;eR=1;for(var s={glog:function(t){if(t<1)throw new Error("glog("+t+")");return s.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return s.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},e=0;e<8;e++)s.EXP_TABLE[e]=1<<e;for(var e=8;e<256;e++)s.EXP_TABLE[e]=s.EXP_TABLE[e-4]^s.EXP_TABLE[e-5]^s.EXP_TABLE[e-6]^s.EXP_TABLE[e-8];for(var e=0;e<255;e++)s.LOG_TABLE[s.EXP_TABLE[e]]=e;return nC=s,nC}var rC,tR;function w5(){if(tR)return rC;tR=1;var s=S5();function e(t,n){if(t.length==null)throw new Error(t.length+"/"+n);for(var r=0;r<t.length&&t[r]==0;)r++;this.num=new Array(t.length-r+n);for(var a=0;a<t.length-r;a++)this.num[a]=t[a+r]}return e.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var n=new Array(this.getLength()+t.getLength()-1),r=0;r<this.getLength();r++)for(var a=0;a<t.getLength();a++)n[r+a]^=s.gexp(s.glog(this.get(r))+s.glog(t.get(a)));return new e(n,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var n=s.glog(this.get(0))-s.glog(t.get(0)),r=new Array(this.getLength()),a=0;a<this.getLength();a++)r[a]=this.get(a);for(var a=0;a<t.getLength();a++)r[a]^=s.gexp(s.glog(t.get(a))+n);return new e(r,0).mod(t)}},rC=e,rC}var sC,nR;function Hoe(){if(nR)return sC;nR=1;var s=C5(),e=w5(),t=S5(),n={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},r={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var i=a<<10;r.getBCHDigit(i)-r.getBCHDigit(r.G15)>=0;)i^=r.G15<<r.getBCHDigit(i)-r.getBCHDigit(r.G15);return(a<<10|i)^r.G15_MASK},getBCHTypeNumber:function(a){for(var i=a<<12;r.getBCHDigit(i)-r.getBCHDigit(r.G18)>=0;)i^=r.G18<<r.getBCHDigit(i)-r.getBCHDigit(r.G18);return a<<12|i},getBCHDigit:function(a){for(var i=0;a!=0;)i++,a>>>=1;return i},getPatternPosition:function(a){return r.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,i,o){switch(a){case n.PATTERN000:return(i+o)%2==0;case n.PATTERN001:return i%2==0;case n.PATTERN010:return o%3==0;case n.PATTERN011:return(i+o)%3==0;case n.PATTERN100:return(Math.floor(i/2)+Math.floor(o/3))%2==0;case n.PATTERN101:return i*o%2+i*o%3==0;case n.PATTERN110:return(i*o%2+i*o%3)%2==0;case n.PATTERN111:return(i*o%3+(i+o)%2)%2==0;default:throw new Error("bad maskPattern:"+a)}},getErrorCorrectPolynomial:function(a){for(var i=new e([1],0),o=0;o<a;o++)i=i.multiply(new e([1,t.gexp(o)],0));return i},getLengthInBits:function(a,i){if(1<=i&&i<10)switch(a){case s.MODE_NUMBER:return 10;case s.MODE_ALPHA_NUM:return 9;case s.MODE_8BIT_BYTE:return 8;case s.MODE_KANJI:return 8;default:throw new Error("mode:"+a)}else if(i<27)switch(a){case s.MODE_NUMBER:return 12;case s.MODE_ALPHA_NUM:return 11;case s.MODE_8BIT_BYTE:return 16;case s.MODE_KANJI:return 10;default:throw new Error("mode:"+a)}else if(i<41)switch(a){case s.MODE_NUMBER:return 14;case s.MODE_ALPHA_NUM:return 13;case s.MODE_8BIT_BYTE:return 16;case s.MODE_KANJI:return 12;default:throw new Error("mode:"+a)}else throw new Error("type:"+i)},getLostPoint:function(a){for(var i=a.getModuleCount(),o=0,c=0;c<i;c++)for(var h=0;h<i;h++){for(var f=0,p=a.isDark(c,h),y=-1;y<=1;y++)if(!(c+y<0||i<=c+y))for(var v=-1;v<=1;v++)h+v<0||i<=h+v||y==0&&v==0||p==a.isDark(c+y,h+v)&&f++;f>5&&(o+=3+f-5)}for(var c=0;c<i-1;c++)for(var h=0;h<i-1;h++){var _=0;a.isDark(c,h)&&_++,a.isDark(c+1,h)&&_++,a.isDark(c,h+1)&&_++,a.isDark(c+1,h+1)&&_++,(_==0||_==4)&&(o+=3)}for(var c=0;c<i;c++)for(var h=0;h<i-6;h++)a.isDark(c,h)&&!a.isDark(c,h+1)&&a.isDark(c,h+2)&&a.isDark(c,h+3)&&a.isDark(c,h+4)&&!a.isDark(c,h+5)&&a.isDark(c,h+6)&&(o+=40);for(var h=0;h<i;h++)for(var c=0;c<i-6;c++)a.isDark(c,h)&&!a.isDark(c+1,h)&&a.isDark(c+2,h)&&a.isDark(c+3,h)&&a.isDark(c+4,h)&&!a.isDark(c+5,h)&&a.isDark(c+6,h)&&(o+=40);for(var S=0,h=0;h<i;h++)for(var c=0;c<i;c++)a.isDark(c,h)&&S++;var C=Math.abs(100*S/i/i-50)/5;return o+=C*10,o}};return sC=r,sC}var aC,rR;function zoe(){if(rR)return aC;rR=1;var s=Voe(),e=Boe(),t=Uoe(),n=Hoe(),r=w5();function a(o,c){this.typeNumber=o,this.errorCorrectLevel=c,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var i=a.prototype;return i.addData=function(o){var c=new s(o);this.dataList.push(c),this.dataCache=null},i.isDark=function(o,c){if(o<0||this.moduleCount<=o||c<0||this.moduleCount<=c)throw new Error(o+","+c);return this.modules[o][c]},i.getModuleCount=function(){return this.moduleCount},i.make=function(){if(this.typeNumber<1){var o=1;for(o=1;o<40;o++){for(var c=e.getRSBlocks(o,this.errorCorrectLevel),h=new t,f=0,p=0;p<c.length;p++)f+=c[p].dataCount;for(var p=0;p<this.dataList.length;p++){var y=this.dataList[p];h.put(y.mode,4),h.put(y.getLength(),n.getLengthInBits(y.mode,o)),y.write(h)}if(h.getLengthInBits()<=f*8)break}this.typeNumber=o}this.makeImpl(!1,this.getBestMaskPattern())},i.makeImpl=function(o,c){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var h=0;h<this.moduleCount;h++){this.modules[h]=new Array(this.moduleCount);for(var f=0;f<this.moduleCount;f++)this.modules[h][f]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(o,c),this.typeNumber>=7&&this.setupTypeNumber(o),this.dataCache==null&&(this.dataCache=a.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},i.setupPositionProbePattern=function(o,c){for(var h=-1;h<=7;h++)if(!(o+h<=-1||this.moduleCount<=o+h))for(var f=-1;f<=7;f++)c+f<=-1||this.moduleCount<=c+f||(0<=h&&h<=6&&(f==0||f==6)||0<=f&&f<=6&&(h==0||h==6)||2<=h&&h<=4&&2<=f&&f<=4?this.modules[o+h][c+f]=!0:this.modules[o+h][c+f]=!1)},i.getBestMaskPattern=function(){for(var o=0,c=0,h=0;h<8;h++){this.makeImpl(!0,h);var f=n.getLostPoint(this);(h==0||o>f)&&(o=f,c=h)}return c},i.createMovieClip=function(o,c,h){var f=o.createEmptyMovieClip(c,h),p=1;this.make();for(var y=0;y<this.modules.length;y++)for(var v=y*p,_=0;_<this.modules[y].length;_++){var S=_*p,C=this.modules[y][_];C&&(f.beginFill(0,100),f.moveTo(S,v),f.lineTo(S+p,v),f.lineTo(S+p,v+p),f.lineTo(S,v+p),f.endFill())}return f},i.setupTimingPattern=function(){for(var o=8;o<this.moduleCount-8;o++)this.modules[o][6]==null&&(this.modules[o][6]=o%2==0);for(var c=8;c<this.moduleCount-8;c++)this.modules[6][c]==null&&(this.modules[6][c]=c%2==0)},i.setupPositionAdjustPattern=function(){for(var o=n.getPatternPosition(this.typeNumber),c=0;c<o.length;c++)for(var h=0;h<o.length;h++){var f=o[c],p=o[h];if(this.modules[f][p]==null)for(var y=-2;y<=2;y++)for(var v=-2;v<=2;v++)y==-2||y==2||v==-2||v==2||y==0&&v==0?this.modules[f+y][p+v]=!0:this.modules[f+y][p+v]=!1}},i.setupTypeNumber=function(o){for(var c=n.getBCHTypeNumber(this.typeNumber),h=0;h<18;h++){var f=!o&&(c>>h&1)==1;this.modules[Math.floor(h/3)][h%3+this.moduleCount-8-3]=f}for(var h=0;h<18;h++){var f=!o&&(c>>h&1)==1;this.modules[h%3+this.moduleCount-8-3][Math.floor(h/3)]=f}},i.setupTypeInfo=function(o,c){for(var h=this.errorCorrectLevel<<3|c,f=n.getBCHTypeInfo(h),p=0;p<15;p++){var y=!o&&(f>>p&1)==1;p<6?this.modules[p][8]=y:p<8?this.modules[p+1][8]=y:this.modules[this.moduleCount-15+p][8]=y}for(var p=0;p<15;p++){var y=!o&&(f>>p&1)==1;p<8?this.modules[8][this.moduleCount-p-1]=y:p<9?this.modules[8][15-p-1+1]=y:this.modules[8][15-p-1]=y}this.modules[this.moduleCount-8][8]=!o},i.mapData=function(o,c){for(var h=-1,f=this.moduleCount-1,p=7,y=0,v=this.moduleCount-1;v>0;v-=2)for(v==6&&v--;;){for(var _=0;_<2;_++)if(this.modules[f][v-_]==null){var S=!1;y<o.length&&(S=(o[y]>>>p&1)==1);var C=n.getMask(c,f,v-_);C&&(S=!S),this.modules[f][v-_]=S,p--,p==-1&&(y++,p=7)}if(f+=h,f<0||this.moduleCount<=f){f-=h,h=-h;break}}},a.PAD0=236,a.PAD1=17,a.createData=function(o,c,h){for(var f=e.getRSBlocks(o,c),p=new t,y=0;y<h.length;y++){var v=h[y];p.put(v.mode,4),p.put(v.getLength(),n.getLengthInBits(v.mode,o)),v.write(p)}for(var _=0,y=0;y<f.length;y++)_+=f[y].dataCount;if(p.getLengthInBits()>_*8)throw new Error("code length overflow. ("+p.getLengthInBits()+">"+_*8+")");for(p.getLengthInBits()+4<=_*8&&p.put(0,4);p.getLengthInBits()%8!=0;)p.putBit(!1);for(;!(p.getLengthInBits()>=_*8||(p.put(a.PAD0,8),p.getLengthInBits()>=_*8));)p.put(a.PAD1,8);return a.createBytes(p,f)},a.createBytes=function(o,c){for(var h=0,f=0,p=0,y=new Array(c.length),v=new Array(c.length),_=0;_<c.length;_++){var S=c[_].dataCount,C=c[_].totalCount-S;f=Math.max(f,S),p=Math.max(p,C),y[_]=new Array(S);for(var w=0;w<y[_].length;w++)y[_][w]=255&o.buffer[w+h];h+=S;var x=n.getErrorCorrectPolynomial(C),O=new r(y[_],x.getLength()-1),P=O.mod(x);v[_]=new Array(x.getLength()-1);for(var w=0;w<v[_].length;w++){var D=w+P.getLength()-v[_].length;v[_][w]=D>=0?P.get(D):0}}for(var k=0,w=0;w<c.length;w++)k+=c[w].totalCount;for(var N=new Array(k),M=0,w=0;w<f;w++)for(var _=0;_<c.length;_++)w<y[_].length&&(N[M++]=y[_][w]);for(var w=0;w<p;w++)for(var _=0;_<c.length;_++)w<v[_].length&&(N[M++]=v[_][w]);return N},aC=a,aC}var ff={},sR;function Koe(){if(sR)return ff;sR=1,Object.defineProperty(ff,"__esModule",{value:!0});var s=Object.assign||function(h){for(var f=1;f<arguments.length;f++){var p=arguments[f];for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&(h[y]=p[y])}return h},e=UC(),t=a(e),n=gu(),r=a(n);function a(h){return h&&h.__esModule?h:{default:h}}function i(h,f){var p={};for(var y in h)f.indexOf(y)>=0||Object.prototype.hasOwnProperty.call(h,y)&&(p[y]=h[y]);return p}var o={bgColor:t.default.oneOfType([t.default.object,t.default.string]).isRequired,bgD:t.default.string.isRequired,fgColor:t.default.oneOfType([t.default.object,t.default.string]).isRequired,fgD:t.default.string.isRequired,size:t.default.number.isRequired,title:t.default.string,viewBoxSize:t.default.number.isRequired,xmlns:t.default.string},c=(0,n.forwardRef)(function(h,f){var p=h.bgColor,y=h.bgD,v=h.fgD,_=h.fgColor,S=h.size,C=h.title,w=h.viewBoxSize,x=h.xmlns,O=x===void 0?"http://www.w3.org/2000/svg":x,P=i(h,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return r.default.createElement("svg",s({},P,{height:S,ref:f,viewBox:"0 0 "+w+" "+w,width:S,xmlns:O}),C?r.default.createElement("title",null,C):null,r.default.createElement("path",{d:y,fill:p}),r.default.createElement("path",{d:v,fill:_}))});return c.displayName="QRCodeSvg",c.propTypes=o,ff.default=c,ff}var aR;function Woe(){if(aR)return rl;aR=1,Object.defineProperty(rl,"__esModule",{value:!0}),rl.QRCode=void 0;var s=Object.assign||function(S){for(var C=1;C<arguments.length;C++){var w=arguments[C];for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(S[x]=w[x])}return S},e=UC(),t=p(e),n=b5(),r=p(n),a=zoe(),i=p(a),o=gu(),c=p(o),h=Koe(),f=p(h);function p(S){return S&&S.__esModule?S:{default:S}}function y(S,C){var w={};for(var x in S)C.indexOf(x)>=0||Object.prototype.hasOwnProperty.call(S,x)&&(w[x]=S[x]);return w}var v={bgColor:t.default.oneOfType([t.default.object,t.default.string]),fgColor:t.default.oneOfType([t.default.object,t.default.string]),level:t.default.string,size:t.default.number,value:t.default.string.isRequired},_=(0,o.forwardRef)(function(S,C){var w=S.bgColor,x=w===void 0?"#FFFFFF":w,O=S.fgColor,P=O===void 0?"#000000":O,D=S.level,k=D===void 0?"L":D,N=S.size,M=N===void 0?256:N,F=S.value,j=y(S,["bgColor","fgColor","level","size","value"]),B=new i.default(-1,r.default[k]);B.addData(F),B.make();var W=B.modules;return c.default.createElement(f.default,s({},j,{bgColor:x,bgD:W.map(function(q,J){return q.map(function(ne,te){return ne?"":"M "+te+" "+J+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:P,fgD:W.map(function(q,J){return q.map(function(ne,te){return ne?"M "+te+" "+J+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:C,size:M,viewBoxSize:W.length}))});return rl.QRCode=_,_.displayName="QRCode",_.propTypes=v,rl.default=_,rl}var qoe=Woe();const LC=Fe(qoe),Goe=s=>{const e=Gu(),{isConnected:t}=s,{state:{devSchema:n,schema:r,launchOptions:a,selectedLaunchOption:i,debugMode:o},setShowManualBindIP:c,setSelectedLaunchOption:h,setDebugMode:f}=Qr(),[p,y]=T.useState(!1),v=C=>{C.status==="success"&&y(!1),C.status==="failed"&&y(!1),C.status==="start"&&y(!0)},_=C=>{f(C),localStorage.setItem("debugMode",C)};T.useEffect(()=>(qe.on("scanQRCode",v),()=>{qe.off("scanQRCode",v)}),[]);const S=C=>{if(C==="created")h({...Tf,name:""}),e("/launch_mode");else{const w=a.find(x=>x.id===C);w&&h(w)}};return t?R.jsx("div",{className:"qr-code-container-connected",children:R.jsxs("div",{className:"qr-code-connected-content",children:[R.jsx(LC,{className:"qr-code-connected",size:150,value:r}),R.jsxs("div",{className:"qr-code-connected-info",children:[R.jsx("div",{className:"qr-code-connected-desc-title",children:V("scanQRCodeChange")}),R.jsx("div",{className:"qr-code-connected-desc",children:V("scanQRCodeDesc")})]})]})}):R.jsxs("div",{className:"qr-code-container-disconnected",children:[R.jsx("div",{className:"qr-code-select-container",children:R.jsx(Ls,{value:i?.id,onChange:S,placeholder:V("selectLaunchMode"),style:{minWidth:"140px"},optionList:a.map(C=>({label:C.name,value:C.id}))})}),R.jsxs("div",{className:"qr-code-content",children:[R.jsxs("div",{className:"qr-code-schema",children:[R.jsx(LC,{value:n}),R.jsxs(Pa,{style:{marginTop:"12px"},children:[R.jsx(Pe,{theme:o==="browserDebug"?"solid":"outline",type:"tertiary",size:"small",onClick:()=>_("browserDebug"),children:V("browserDebugMode")}),R.jsx(Pe,{onClick:()=>_("clientPreview"),theme:o==="clientPreview"?"solid":"outline",type:"tertiary",size:"small",children:V("clientPreviewMode")})]}),p&&R.jsxs("div",{className:"qr-code-spin",children:[R.jsx(pn,{size:"large"}),R.jsx("div",{className:"qr-code-text",children:V("scanning")})]})]}),R.jsx("div",{className:"qr-code-title",children:V("scanQRCode")}),R.jsx("div",{className:"qr-code-desc",children:V("scanQRCodeDesc")}),R.jsxs("div",{className:"qr-code-no-response",onClick:()=>c(!0),children:[V("scanQrcodeNoResponse"),R.jsx(Cn,{content:()=>R.jsxs("div",{children:[V("manualBindIPInfo1"),R.jsx("br",{}),V("manualBindIPInfo2")]}),children:R.jsx("div",{style:{display:"inline-flex",alignItems:"center",justifyContent:"bottom",transform:"translateY(4px)"},children:R.jsx(xu,{style:{marginTop:"4px",marginLeft:"4px"}})})})]})]})]})},Yoe=()=>{const{state:{debugSetting:s,debugMode:e,isConnected:t},setDebugSetting:n}=Qr(),r=i=>{n(i)},a=()=>{Zu.send({method:"setDebugSettings",payload:s})};return T.useEffect(()=>(qe.on("connectionChange",a),()=>{qe.off("connectionChange",a)}),[a]),R.jsx("div",{className:"debug-setting-card",children:R.jsxs(yp,{style:{width:"100%"},children:[R.jsxs(wa,{style:{marginBottom:12,display:"flex",alignItems:"center"},children:[R.jsx(De.Text,{style:{fontWeight:"bold",fontSize:16,paddingRight:4},children:V("devOptions")}),R.jsx(Cn,{content:()=>R.jsxs("div",{style:{width:"100%",fontSize:"12px"},children:["1. ",V("devOptionsDomainCheckDesc"),R.jsx("br",{}),"2. ",V("debugSettingAdMockDesc"),R.jsx("br",{}),"3. ",V("debugSettingIAPMockDesc"),R.jsx("br",{}),"4. ",V("debugSettingEnableVconsoleDesc"),R.jsx("br",{}),"5. ",V("debugSettingEnableDevInfoPanelDesc")]}),children:R.jsx(xu,{})})]}),R.jsxs(wa,{className:"debug-setting-row",children:[R.jsxs("div",{className:"debug-setting-item",children:[R.jsx(oi,{style:{marginRight:"8px"},checked:!s.enableDomainCheck,onChange:i=>{r({...s,enableDomainCheck:!i})}}),R.jsx(De.Text,{children:V("debugSettingDomainCheck")})]}),R.jsxs("div",{className:"debug-setting-item",children:[R.jsx(oi,{checked:s.enableAdMock,style:{marginRight:"8px"},onChange:i=>{r({...s,enableAdMock:i})}}),R.jsx(De.Text,{children:V("debugSettingAdMock")})]})]}),R.jsxs(wa,{className:"debug-setting-row",children:[R.jsxs("div",{className:"debug-setting-item",children:[R.jsx(oi,{checked:s.enableIAPMock,style:{marginRight:"8px"},onChange:i=>{r({...s,enableIAPMock:i})}}),R.jsx(De.Text,{children:V("debugSettingIAPMock")})]}),R.jsxs("div",{className:"debug-setting-item",children:[R.jsx(oi,{checked:s.enableDevInfoPanel,style:{marginRight:"8px"},onChange:i=>{r({...s,enableDevInfoPanel:i})}}),R.jsx(De.Text,{children:V("debugSettingDevInfoPanel")})]})]}),R.jsx(wa,{className:"debug-setting-row",children:e!==hi.browserDebug&&R.jsxs("div",{className:"debug-setting-item",children:[R.jsx(oi,{checked:s.enableVConsole,style:{marginRight:"8px"},onChange:i=>{r({...s,enableVConsole:i})}}),R.jsx(De.Text,{children:V("debugSettingVConsole")})]})})]})})},Zoe=()=>{const{state:{showManualBindIP:s},setShowManualBindIP:e}=Qr(),t=r=>{const{ip:a,port:i,wsPort:o}=r;ze.setMultiple({clientHost:a,clientWsPort:o,clientHttpPort:i}),pu.send({method:"manualConnect",payload:{clientHost:a,clientWsPort:o,clientHttpPort:i}}),Zu.init({clientWsPort:o,clientHost:a,clientHttpPort:i}),localStorage.setItem("clientHost",a),localStorage.setItem("clientWsPort",o),localStorage.setItem("clientHttpPort",i),e(!1)},n={ip:ze.get("clientHost")||localStorage.getItem("clientHost")||"",port:ze.get("clientHttpPort")||localStorage.getItem("clientHttpPort")||"",wsPort:ze.get("clientWsPort")||localStorage.getItem("clientWsPort")||""};return R.jsxs(Cr,{title:V("manualBindClientDebugServiceTitle"),visible:s,showCancel:!1,onCancel:()=>e(!1),showOk:!1,footer:null,children:[R.jsx(Ei,{bordered:!1,icon:null,closeIcon:null,fullMode:!1,style:{margin:"12px 0"},description:R.jsxs(R.Fragment,{children:[R.jsx("div",{style:{marginBottom:"8px"},children:V("debug.guide.manualBindIPDesc1")}),R.jsx("div",{style:{marginBottom:"8px"},children:V("debug.guide.manualBindIPDesc2")}),R.jsx("div",{style:{marginBottom:"8px"},children:V("debug.guide.manualBindIPDesc3")})]}),type:"warning"}),R.jsxs(He,{onSubmit:t,initValues:n,style:{marginBottom:"24px"},children:[R.jsx(He.Input,{name:"ip",label:"IP",field:"ip",required:!0,rules:[{required:!0,message:V("debug.guide.manualBindIPInvalid")}]}),R.jsx(He.Input,{name:"port",label:"Port 1 ",field:"port",rules:[{required:!0,message:V("invalidPort")}]}),R.jsx(He.Input,{style:{marginBottom:"12px"},name:"wsPort",label:"Port 2",field:"wsPort",rules:[{required:!0,message:V("invalidPort")}]}),R.jsx(Pe,{type:"primary",htmlType:"submit",style:{marginRight:"8px"},children:V("confirm")}),R.jsx(Pe,{onClick:()=>e(!1),children:V("cancel")})]})]})},Xoe=()=>{const{state:{isConnected:s,message:e}}=T.useContext(_w);return R.jsxs("div",{className:"home-container",children:[R.jsx(Ei,{fullMode:!1,icon:null,closeIcon:null,type:e?.type,title:e?.title,description:e?.desc}),R.jsx(Goe,{isConnected:s}),!s&&R.jsx(Yoe,{}),R.jsx(joe,{}),R.jsx(Zoe,{})]})},Qoe=s=>{const{open:e,onClose:t}=s,[n,r]=T.useState(!0),[a,i]=T.useState(!1),[o,c]=T.useState(!1),[h,f]=T.useState(!1),p=[{label:"是否开启域名校验",description:"开启后,客户端将校验所有请求的域名是否合法,建议开发环境关闭以便调试。",checked:n,onChange:r},{label:"是否开启 IAA Mock",description:"启用后,广告相关接口将返回模拟数据,方便开发和测试广告逻辑。",checked:a,onChange:i},{label:"是否开启 IAP Mock",description:"启用后,内购相关流程将使用模拟支付,避免真实扣费。",checked:o,onChange:c}];return R.jsx("div",{children:R.jsx(bo,{vertical:!0,align:"start",spacing:"loose",children:p.map((y,v)=>R.jsxs("div",{children:[R.jsx(Uf,{checked:y.checked,onChange:_=>y.onChange(_.target.checked),children:y.label}),R.jsx(De.Text,{type:"tertiary",style:{display:"block",marginTop:4},children:y.description})]},v))})})},Joe=[{label:V("scene_scan_qrcode"),value:"scan_qrcode"},{label:V("scene_search"),value:"search"},{label:V("scene_anchor"),value:"anchor"},{label:V("scene_center"),value:"center"},{label:V("scene_ad"),value:"ads"},{label:V("scene_shortcut"),value:"desktop_shortcut"},{label:V("scene_sharing"),value:"dm_sharing"},{label:V("scene_link"),value:"minis_link"}],ele=()=>{const s=Gu(),{state:{launchOptions:e,selectedLaunchOption:t,packages:n},setLaunchOptions:r,setSelectedLaunchOption:a}=Qr(),i=T.useRef(null),o=t||ml,[c,h]=T.useState(o),[f,p]=T.useState(o.id),y=n.map(O=>{if(O.type==="main")return{label:V("gameMainPackage"),value:O.name};if(O.type==="independent")return{label:`${V("independentPackage")}: ${O.name}`,value:O.name}}).filter(Boolean),v=T.useCallback(O=>{const P={...c,...O};P.pkgType==="main"&&P.independentPkg!==void 0&&(P.independentPkg=void 0,i.current&&i.current.setValues({independentPkg:void 0})),h(P)},[c]),_=T.useCallback(()=>{if(!i.current)return;const O=i.current.getValues();O.pkgType==="main"&&(O.independentPkg=void 0);const P=e.findIndex(k=>k.name===O.name&&k.id!=="created"&&k.id!=="normal");let D;P!==-1?(D=[...e],D[P]=O):(O.id=Date.now().toString(),D=[...e.slice(0,-1),O,...e.slice(-1)]),r(D),h(O),a(O),s("/")},[e,s,r,a]),S=T.useCallback(O=>{const P=e.find(D=>D.id===O);if(P){p(O);const D={...P};O==="created"?D.name="":O==="normal"&&(D.name=V("normalLaunchMode")),h(D),i.current?.setValues(D)}},[e]),C=T.useCallback(()=>{const O=f;if(["normal","created"].includes(O))return;const P=e.filter(N=>N.id!==O);r(P);const D=P.find(N=>N.id==="normal")||P.find(N=>N.id==="created")||P[0]||ml,k={...D,...D.id==="created"?{name:""}:{},...D.id==="normal"?{name:V("normalLaunchMode")}:{}};a(k),p(k.id),h(k),i.current?.setValues(k)},[e,f,r,a]),w=T.useCallback(()=>{h(o),i.current?.setValues(o),s("/")},[o,s]),x=e.find(O=>O.id===f);return R.jsxs("div",{children:[R.jsx(Ei,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:V("launchModeDesc"),type:"info"}),R.jsxs(He,{initValues:c,onValueChange:v,getFormApi:O=>i.current=O,style:{padding:20,border:"1px solid #eee",borderRadius:8},onSubmit:_,children:[R.jsx(He.Select,{placeholder:V("selectLaunchMode"),rules:[{required:!0,message:V("selectLaunchMode")}],field:"id",label:V("selectLaunchMode"),optionList:e.map(O=>({label:O.name,value:O.id})),onChange:S,style:{width:"100%"},value:f}),R.jsx(He.Input,{required:!0,placeholder:V("launchModeName"),field:"name",label:V("launchModeName"),rules:[{required:!0,message:V("notEmpty")}],style:{width:"100%"},trigger:"blur"}),R.jsx(He.Select,{field:"pkgName",label:V("selectLaunchPkg"),placeholder:V("selectLaunchPkg"),rules:[{required:!0,message:V("notEmpty")}],optionList:y,style:{width:"100%"}}),R.jsx(He.Select,{field:"scene",label:V("selectScene"),rules:[{required:!0,message:V("notEmpty")}],placeholder:V("selectScene"),optionList:Joe,style:{width:"100%"},filter:!0}),R.jsx(He.Input,{field:"queries",label:V("launchQueries"),placeholder:V("launchQueriesDesc"),trigger:"blur",rules:[{validator:(O,P)=>{const{isValid:D,message:k}=Qae(P);return D?Promise.resolve():Promise.reject(k)}}],style:{width:"100%"}}),R.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:20},children:[["created","normal"].includes(f)?R.jsx(Pe,{style:{marginRight:12},onClick:w,children:V("cancel")}):R.jsx(El,{title:V("deleteLaunchModeConfirm",{name:x?.name??""}),onConfirm:C,position:"bottomRight",children:R.jsx(Pe,{type:"danger",style:{marginRight:12},children:V("delete")})}),R.jsx(Pe,{htmlType:"submit",type:"primary",children:V("saveAndUse")})]})]})]})},tle=({packages:s})=>R.jsx("div",{children:s.map(({name:e,size:t},n)=>{const r=(t/1024/1024).toFixed(2)+"MB",a=t<=4*1024*1024;return R.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",borderRadius:6,backgroundColor:a?"#E8F5E9":"#FCE4EC",marginBottom:n===s.length-1?0:8,width:"fit-content"},children:[R.jsxs(De.Text,{style:{fontWeight:600,fontSize:14},children:[e,":"]}),R.jsx(De.Text,{style:{color:a?"#4CAF50":"#F44336",fontWeight:600},children:r}),R.jsx(De.Text,{type:"tertiary",style:{marginLeft:8},children:a?V("notExceedIndependentPkgSizeLimit",{limit:"4MB"}):V("exceedIndependentPkgSizeLimit",{limit:"4MB"})})]},e)})}),nle=({size:s,limit:e})=>{const t=(s/1024/1024).toFixed(2)+"MB",n=s<=e*1024*1024,r=n?V("notExceedSizeLimit",{limit:e+"MB"}):V("exceedSizeLimit",{limit:e+"MB"});return R.jsxs("div",{style:{display:"flex",alignItems:"center",width:"fit-content",padding:"2px 8px",borderRadius:6,backgroundColor:n?"#E8F5E9":"#FCE4EC"},children:[R.jsx(De.Text,{style:{fontWeight:600,color:n?"#4CAF50":"#F44336"},children:t}),R.jsx(De.Text,{type:"tertiary",style:{marginLeft:8},children:r})]})},rle=({packages:s,limit:e})=>{const t=s.find(i=>i.type==="main")?.size,n=(t/1024/1024).toFixed(2)+"MB",r=t<=e*1024*1024,a=r?V("notExceedMainPkgSizeLimit",{limit:e+"MB"}):V("exceedMainPkgSizeLimit",{limit:e+"MB"});return R.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",width:"fit-content",borderRadius:6,backgroundColor:r?"#E8F5E9":"#FCE4EC"},children:[R.jsx(De.Text,{style:{fontWeight:600,color:r?"#4CAF50":"#F44336"},children:n}),R.jsx(De.Text,{type:"tertiary",style:{marginLeft:8},children:a})]})},sle=({domains:s=[]})=>s?.length?R.jsx(bo,{style:{flexWrap:"wrap"},children:s.map(e=>R.jsx(zt,{children:e},e))}):R.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[R.jsx(De.Text,{style:{fontSize:14},children:"⚠️"}),R.jsx(De.Text,{style:{color:"red",marginLeft:8,fontSize:14},children:V("trustDomainEmptyTip")})]}),ale=({termsOfServiceLink:s})=>s?R.jsx(zt,{children:s}):R.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[R.jsx(De.Text,{children:"⚠️"}),R.jsx(De.Text,{style:{color:"red",marginLeft:8},children:V("termsOfServiceEmptyTip")})]}),ile=({privacyPolicyLink:s})=>s?R.jsx(zt,{children:s}):R.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[R.jsx(De.Text,{children:"⚠️"}),R.jsx(De.Text,{style:{color:"red",marginLeft:8},children:V("privacyPolicyEmptyTip")})]}),ole=()=>R.jsx(Ei,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:R.jsxs("div",{children:[R.jsx(De,{style:{marginBottom:8},children:V("projectInfoDesc")}),R.jsx(De,{children:V("projectInfoDescTip")})]}),type:"info"}),lle=({logo:s,placeholder:e})=>{const[t,n]=T.useState(!1);return R.jsxs("div",{style:{width:100,height:100,borderRadius:4,overflow:"hidden",position:"relative",background:"#f0f0f0",display:"flex",alignItems:"center",justifyContent:"center"},children:[!t&&(e||R.jsx("div",{style:{width:"100%",height:"100%",background:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",color:"#aaa",fontSize:14}})),R.jsx("img",{src:s,alt:"logo",style:{width:"100%",height:"100%",borderRadius:4,objectFit:"cover",position:"absolute",top:0,left:0,opacity:t?1:0,transition:"opacity 0.3s"},onLoad:()=>n(!0)})]})},cle=({description:s})=>s?R.jsx(De.Text,{style:{fontSize:14},children:s}):R.jsx(De.Text,{type:"warning",style:{fontSize:14},children:V("gameDescEmptyTip")});var ule=Object.defineProperty,iR=Object.getOwnPropertySymbols,dle=Object.prototype.hasOwnProperty,hle=Object.prototype.propertyIsEnumerable,oR=(s,e,t)=>e in s?ule(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,fle=(s,e)=>{for(var t in e||(e={}))dle.call(e,t)&&oR(s,t,e[t]);if(iR)for(var t of iR(e))hle.call(e,t)&&oR(s,t,e[t]);return s};function ple(s){return T.createElement("svg",fle({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,"aria-hidden":!0},s),T.createElement("rect",{width:200,height:200,fill:"transparent"}),T.createElement("path",{d:"M74.7 78.6c20.78-6.32 57.55-12.26 71.81-9.86 4.21.7 8.12 1.98 11.36 3.42-.51-1.69-.95-3.5-1.38-5.3l-.04-.18c-1.03-4.27-2.05-8.44-3.95-10.55-4.8-5.32.67-10.12.67-10.12l.93-10.53c13.02 4.82 21.65 14.92 27 25.08 4.57 8.67 6.75 17.37 7.25 22.89 1.06 12-8.18 18.86-19.2 18.86-9.74 0-18.36-1.64-24.81-3.1.64 2.18 5.44 19.18 7.53 32.66l-46.15.58-7.58-14.68-4.66-12.26c-19.46 7.46-50.77 19.02-64.9 18.44-10.35-.42-15.68-15.68-17.44-28.7a71.55 71.55 0 0 1-.67-9.4c0-5.64.3-12.18 2.22-17.89.74-2.21 1.73-4.3 3.04-6.17a18.1 18.1 0 0 1 4.6-4.59c0 4-1.02 13.54 2.8 14.12 5.06.78 10.4-9.08 13.85-7.06 3.87 2.27-1.65 16.34-1.33 17.2.27.7.53 1.4.76 2.07a48.99 48.99 0 0 1 2.25 8.55C46.59 87.56 60 83.06 74.69 78.6Z",fill:"white"}),T.createElement("path",{d:"M181.1 60.56c4.57 8.67 6.75 17.37 7.25 22.89 1.06 12-8.18 18.86-19.2 18.86-9.74 0-18.36-1.64-24.81-3.1m36.77-38.65c-5.36-10.16-13.99-20.26-27-25.08l-.94 10.53s-5.46 4.8-.67 10.12c1.9 2.11 2.92 6.28 3.95 10.55m24.66-6.12c-6-.37-18.32.8-24.66 6.12m0 0c1.57 6.53 3.15 13.3 7.91 13.3 7.2 0-3.6-8.84-17.85-11.24-14.25-2.4-51.03 3.54-71.82 9.86-20.78 6.32-39.04 12.71-42.77 19.1-3.63 6.23 13.24 10.92 4.49-14.17m0 0c-.23-.67-.49-1.36-.76-2.08-.32-.85 5.2-14.92 1.33-17.19-3.45-2.02-8.8 7.84-13.85 7.06-3.82-.58-2.8-10.12-2.8-14.12a18.1 18.1 0 0 0-4.6 4.6M36.4 83.52c-7.27 1.58-21.92 8.1-25.27 11.73m0 0a71.55 71.55 0 0 1-.67-9.41c0-5.64.3-12.18 2.22-17.89m-1.55 27.3c1.76 13 7.09 28.27 17.45 28.7 14.12.57 45.43-10.99 64.89-18.45l4.66 12.26 7.58 14.68 46.15-.58c-2.09-13.48-6.89-30.48-7.53-32.67M15.73 61.8c-.98 3-1.08 5.5.19 7.8m-.2-7.8a24.08 24.08 0 0 0-3.03 6.16m0 0a5.43 5.43 0 0 0 1.25 4.22m130.4 27.02c-.9-3.08-3.12-9.95-4.76-12.76",stroke:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m156.89 15.66-2.04 27.96 2.57 28.1c-7.51-3.07-13.32-4.34-27.25-3.36-11.94.83-31.75 3.95-46.23 7.62-16.66 4.27-37.81 11.64-45.21 15.9-.77-4.64-2.92-10.15-2.92-10.15-.07-.7 2.63-8.32 2.73-13.06.08-3.08-.91-4.45-2.33-4.75a3.47 3.47 0 0 0-2.05.35c-.63.32-.86.48-1.38.84-1.34.98-2.38 2.02-3.95 3.34a17.14 17.14 0 0 1-3.04 2.17 4.6 4.6 0 0 1-2.89.63c-.63-.1-1.21-.47-1.71-1.58l-.07-.89c-.5-5.79-2.7-20.12-2.7-34.91 0-7.74 1.61-10.04 2.7-11.59l.13-.18c3.85-5.53 13.67-6.75 23.12-6.96 2.5-.14 5.2-.2 8.1-.17l.11.15H53.15l-.52.07 18.32 25.49-3.62 14.08 10.2 15.98-2.84-16.49 10-11.99-3.5-27.7s8.78-.5 19.47-1.77c10.69-1.28 18.47-1.9 29.42-1.83 1.64.01 3.4.1 5.23.22 9.64.65 18.55 2.56 21.46 4.4l.13.09h-.01Z",fill:"var(--semi-color-primary-light-default)"}),T.createElement("path",{d:"M143 27.91a1.38 1.38 0 0 1 1.77-.85c.5.18.98.41 1.44.71a1.38 1.38 0 0 1-1.53 2.31c-.26-.17-.53-.3-.82-.4a1.38 1.38 0 0 1-.85-1.77Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M140.65 28.12c.21.74-.21 1.5-.95 1.72-.36.1-.73.22-1.11.36a1.38 1.38 0 1 1-.95-2.6c.43-.16.87-.3 1.3-.43.74-.2 1.5.22 1.71.95Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M134.74 30.4c.37.67.14 1.51-.53 1.89l-1.07.62a1.38 1.38 0 1 1-1.41-2.38l1.12-.65a1.38 1.38 0 0 1 1.89.52Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M97.86 31.43h.76a1.38 1.38 0 1 1-.06 2.77h-.52a6.7 6.7 0 0 0-.57.1 1.38 1.38 0 0 1-.64-2.68c.33-.08.64-.14.94-.18l.09-.01Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M147.78 31.75c.73-.23 1.5.19 1.72.92.13.43.25.88.35 1.35a1.38 1.38 0 0 1-2.7.58c-.1-.4-.19-.78-.3-1.13-.22-.73.2-1.5.93-1.72Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M102.27 33.13c.19-.75.94-1.2 1.68-1.01.45.11.89.23 1.3.37a1.38 1.38 0 0 1-.84 2.63c-.36-.11-.73-.22-1.13-.32a1.38 1.38 0 0 1-1-1.67Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M129.3 33.68c.42.64.25 1.5-.4 1.92l-.52.34-.53.36a1.38 1.38 0 0 1-1.53-2.31l.32-.21.21-.14.3-.2.23-.15c.64-.42 1.5-.25 1.92.39Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M108.25 35.22c.36-.67 1.2-.92 1.88-.55a246.5 246.5 0 0 1 1.11.61 1.38 1.38 0 0 1-1.33 2.43l-.5-.28h-.01l-.6-.34a1.38 1.38 0 0 1-.55-1.87Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M92.83 35.77c.76-.01 1.4.6 1.4 1.36.01.16.03.34.07.55a1.38 1.38 0 1 1-2.7.58 5.62 5.62 0 0 1-.13-1.08c-.01-.76.6-1.4 1.36-1.4Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M124 37.2c.31.7 0 1.51-.7 1.82a6.07 6.07 0 0 1-1.44.45 1.38 1.38 0 1 1-.67-2.68l.58-.16c.1-.03.24-.07.42-.15.7-.3 1.51.02 1.82.72Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M113.9 38.14c.15-.75.89-1.22 1.63-1.06.35.07.72.13 1.1.16a1.38 1.38 0 0 1-.26 2.76c-.49-.05-.96-.12-1.41-.22a1.38 1.38 0 0 1-1.07-1.64Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M148.98 37.95c.76-.01 1.4.6 1.4 1.36a38.45 38.45 0 0 1 0 1.42 1.38 1.38 0 0 1-2.77-.08 24.28 24.28 0 0 0 0-1.3c0-.76.6-1.39 1.37-1.4Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M148.6 44.88c.75.16 1.22.9 1.06 1.65-.1.47-.22.94-.34 1.41a1.38 1.38 0 1 1-2.68-.7c.12-.43.22-.87.31-1.3.17-.75.9-1.22 1.65-1.06Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M146.69 51.6c.7.31 1 1.13.7 1.83-.2.44-.41.88-.63 1.31a1.38 1.38 0 0 1-2.48-1.24c.2-.4.4-.8.58-1.2.31-.7 1.13-1.01 1.83-.7Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M41.67 55.45c.07.77-.5 1.44-1.25 1.5-.43.04-.86.1-1.26.19a1.38 1.38 0 1 1-.54-2.72c.5-.1 1.02-.17 1.55-.22.76-.07 1.43.5 1.5 1.25Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M44.58 55.78c.22-.73 1-1.15 1.72-.93l.74.23a1.38 1.38 0 1 1-.9 2.62l-.62-.2a1.38 1.38 0 0 1-.94-1.72Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M91.9 56.9c.05.76-.52 1.42-1.29 1.47-.44.02-.89.06-1.32.11a1.38 1.38 0 0 1-.31-2.75c.48-.05.96-.1 1.45-.13.77-.05 1.42.53 1.47 1.3Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M94.72 56.95c.07-.76.74-1.33 1.5-1.26l1.43.14a1.38 1.38 0 0 1-.32 2.75c-.45-.05-.9-.1-1.35-.13a1.38 1.38 0 0 1-1.26-1.5Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M101.64 57.83c.16-.75.9-1.22 1.64-1.07l1.39.31a1.38 1.38 0 1 1-.62 2.7l-1.34-.3a1.38 1.38 0 0 1-1.07-1.64Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M34.85 57.26c.48.6.39 1.46-.2 1.94-.33.27-.63.55-.9.84a1.38 1.38 0 0 1-2.03-1.89c.36-.39.76-.75 1.18-1.1.6-.48 1.46-.39 1.95.2Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M85 57.9c.29.71-.06 1.51-.78 1.8a15.8 15.8 0 0 0-1.26.54 1.38 1.38 0 1 1-1.15-2.52 71.64 71.64 0 0 1 1.4-.6c.71-.28 1.52.07 1.8.78Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M143.4 57.76c.61.47.72 1.34.26 1.95-.3.39-.62.77-.94 1.14a1.38 1.38 0 0 1-2.09-1.81 24 24 0 0 0 .84-1.03c.47-.6 1.33-.71 1.94-.25Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M108.43 59.46c.22-.74.99-1.15 1.72-.93l1.35.41a1.38 1.38 0 1 1-.82 2.64l-1.32-.4a1.38 1.38 0 0 1-.93-1.72Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M115.08 61.58a1.38 1.38 0 0 1 1.77-.82l1.32.48a1.38 1.38 0 0 1-.97 2.6c-.43-.17-.87-.33-1.3-.48a1.38 1.38 0 0 1-.82-1.78Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M138.67 62.89c.42.64.25 1.5-.4 1.92-.41.27-.85.54-1.29.78a1.38 1.38 0 0 1-1.32-2.43c.37-.2.73-.43 1.1-.66.63-.42 1.49-.25 1.91.39Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M30.5 62.78c.77.07 1.33.74 1.26 1.5l-.03.59.01.75-1.6 1.4a1.38 1.38 0 0 1-1.16-1.32l-.02-.83c0-.28.02-.56.04-.84.07-.76.75-1.32 1.5-1.25Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M121.6 64.07c.3-.7 1.1-1.04 1.8-.75a146.8 146.8 0 0 1 1.26.52 1.38 1.38 0 1 1-.97 2.59 19.62 19.62 0 0 1-1.35-.55c-.7-.3-1.04-1.1-.74-1.81Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M72.11 64.94c.48.6.4 1.47-.2 1.95-.38.3-.74.62-1.09.92A1.38 1.38 0 1 1 69 65.73c.37-.33.76-.66 1.17-.99.59-.48 1.46-.39 1.94.2Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M132.4 65.92c.09.76-.46 1.44-1.22 1.53-.5.05-1.02.08-1.53.09a1.38 1.38 0 1 1-.02-2.77c.42 0 .84-.03 1.25-.07.76-.09 1.44.46 1.53 1.22Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M66.66 69.9c.57.52.6 1.4.09 1.96l-.73.8-.02.02-.16.18-.08.09a1.38 1.38 0 0 1-2.05-1.86l.25-.28.75-.82c.51-.56 1.39-.6 1.95-.09Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M61.6 75.28c.45.61.31 1.48-.3 1.93-.44.31-.88.61-1.36.89a1.38 1.38 0 1 1-1.4-2.4c.4-.22.77-.46 1.12-.72a1.38 1.38 0 0 1 1.94.3Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M37.67 75.97c.42.19.86.37 1.35.53a1.38 1.38 0 0 1-.89 2.62c-.56-.19-1.1-.4-1.6-.63l.72-2.63c.14.01.28.05.42.11Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M55.05 78.57c.12.75-.4 1.46-1.15 1.58-.5.08-1 .15-1.54.2a1.38 1.38 0 1 1-.28-2.75c.49-.05.95-.11 1.39-.18.75-.12 1.46.4 1.58 1.15Z",fill:"var(--semi-color-primary)"}),T.createElement("path",{d:"M43.4 78.87c.06-.76.73-1.33 1.49-1.27a38.43 38.43 0 0 0 1.5.1 1.38 1.38 0 1 1-.12 2.76 62.94 62.94 0 0 1-1.6-.1 1.38 1.38 0 0 1-1.27-1.49Z",fill:"var(--semi-color-primary)"}),T.createElement("g",{clipPath:"url(#clip_failure_96_39_65)"},T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M30.9 46.87a13.45 13.45 0 0 1 9.37-16.53 13.46 13.46 0 0 1 16.52 9.39c2.64 9.56-4.76 29.27-5.14 29.9a.75.75 0 0 1-.99.27c-.64-.34-17.11-13.47-19.76-23.03Zm14.36 1.54a6.1 6.1 0 0 1-3.25-11.75 6.1 6.1 0 0 1 3.25 11.75Z",fill:"var(--semi-color-primary)"})),T.createElement("path",{d:"M102.31 100.69c-2.8 1.55-5.63 2.85-9.36 4.58l1.48 3.92c2.14-.96 6.16-6.03 7.88-8.5Z",fill:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M121 63.04c8.85 2.1 12.43-6.5 13.12-8.77.68-2.27-5.6-11.86-8-11.2l-.42.12-.23.06c-3.1.82-11.15 2.94-12.35 8-1.3 5.46 2.4 10.49 7.88 11.79Z",fill:"#515151"}),T.createElement("path",{d:"M134.5 64.73c-.43.47-1.2.74-2.33.73a12.7 12.7 0 0 1-4.06-.86 31.25 31.25 0 0 1-9.94-6.22c-3.25-2.97-5.97-5.8-7.59-8.42-1.61-2.61-2.05-4.88-.98-6.84a3.7 3.7 0 0 1 2.11-1.86 4.53 4.53 0 0 1 2.9.15c2.16.76 4.57 2.83 6.48 6.02 3.4 5.63 6.89 8.23 9.7 10.33.49.35.95.7 1.38 1.03a7.29 7.29 0 0 1 2.61 3.48c.34 1.1.16 1.97-.28 2.46Z",fill:"white",stroke:"#515151"}),T.createElement("mask",{id:"mask_failure_130_526","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:98,y:44,width:36,height:27},T.createElement("path",{d:"M130.53 62.1c-.5-3.3-9.52-14.75-16.08-15.03l-12.68 4.52 6.47 14.16 17.25 3.07c1.84-1.14 5.43-4.07 5.04-6.72Z",fill:"#C4C4C4"})),T.createElement("g",{mask:"url(#mask_failure_130_526)"},T.createElement("path",{d:"M127.2 63.62a9.74 9.74 0 0 1-13.76.5 9.74 9.74 0 0 1-.32-13.77 9.74 9.74 0 0 1 13.77-.5 9.74 9.74 0 0 1 .32 13.77Z",fill:"white",stroke:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m116.79 47.35-.02.37c2.86.5 8.57 2.59 8.58 6.87 0 5.36-7.44 9.34-14.47 3.46-.34-.28-.66-.53-.95-.74a10.09 10.09 0 0 0 3.17 7.17 10.24 10.24 0 0 0 14.47-.52 10.24 10.24 0 0 0-.34-14.47 10.16 10.16 0 0 0-10.44-2.14Z",fill:"#515151"}),T.createElement("path",{d:"M119.34 55a.79.79 0 1 0-1.1-1.12.79.79 0 0 0 1.1 1.12Z",fill:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.98 50.72c.21-.09.45.01.54.22a7.87 7.87 0 0 0 1.84 2.65.41.41 0 1 1-.55.62 8.67 8.67 0 0 1-2.05-2.95.41.41 0 0 1 .22-.54Z",fill:"#515151"}),T.createElement("path",{d:"M114.85 52.4a.79.79 0 1 0-1.1-1.1.79.79 0 0 0 1.1 1.1Z",fill:"#515151"}),T.createElement("mask",{id:"path-18-inside-1",fill:"white"},T.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)"})),T.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)",fill:"white"}),T.createElement("path",{d:"m128.42 60.04.01-.01a.03.03 0 0 1 .02 0l-4.12 4.37a5.98 5.98 0 0 0 8.45-.25l-4.36-4.11Zm.03 0v.02l-4.37-4.11a5.98 5.98 0 0 0 .25 8.45l4.12-4.37Zm0 .03h-.01a.03.03 0 0 1-.02 0l4.12-4.37a5.98 5.98 0 0 0-8.46.25l4.37 4.12Zm-.03 0v-.03l4.37 4.11a5.98 5.98 0 0 0-.25-8.45l-4.12 4.37Z",fill:"#515151",mask:"url(#path-18-inside-1)"})),T.createElement("path",{d:"M145.63 40.19c1.37-2.75 12.75 2.35 16.14 6.78 3.38 4.43 1.48 10.74-1.9 9.68-6.69-2.12-7.56-6.7-7.94-9.48-1.2-1.85-7.67-4.24-6.3-6.98Z",fill:"white",stroke:"#515151"}),T.createElement("path",{d:"m158.95 41.56 6.64 2.52 1.66 12.47-8.3 1.98-3.47-12.03 3.47-4.94Z",fill:"white"}),T.createElement("path",{d:"M167.3 151.94c5.19 1.66 23.35 35.57 19.05 35.57-13.86 0-34.5.53-71.42.53-15.63 0-17.9-5.16-11.79-22.08a353.23 353.23 0 0 1 6.14-15.76l32.5 1.26c-.43 1.53-.91 3.07-1.38 4.4a26.82 26.82 0 0 1 8.73-1.47c5.27 0 7.04 1.4 11.77 0 2.13-.62 4.8-2.97 6.4-2.45Z",fill:"white",className:""}),T.createElement("path",{d:"M140.4 155.87c.47-1.34.95-2.88 1.38-4.4l-32.5-1.27a353.23 353.23 0 0 0-6.14 15.76c-6.1 16.92-3.84 22.08 11.79 22.08 36.93 0 57.56-.53 71.42-.53 4.3 0-13.86-33.91-19.06-35.57-1.6-.52-4.26 1.83-6.4 2.45-4.72 1.4-6.5 0-11.76 0-3.08 0-6.06.55-8.72 1.48Zm0 0a26.67 26.67 0 0 1-4.44 8.38c-1.7 2.22-3.99 4.43-5.43 4.33-1.44-.1-1.42-3.18 0-5.66 1.97-3.44 6.45-5.87 9.88-7.05Z",stroke:"#1C1F23",className:""}),T.createElement("path",{d:"M149.25 131.7s3.36 19.46-12.34 21.04c-11.53 1.15-40.77-4.55-53.76-7.79 4.72 12.82 9.61 39.86 7 42.16-3.33 2.93-47.55 1.76-55.96 0-8.42-1.75 13.82-11.46 15.45-14.66 2.99-5.84-5.48-21.18-5.75-45.45-.27-24.27 18.18-24.86 34.47-21.64 13.02 2.57 41.63 18.33 52.56 26.86l18.33-.52Z",fill:"white",stroke:"#515151"}),T.createElement("path",{d:"M141.5 153.87c-3.11 2.55-27.72 5-35.58 3.53l2.75-6.8c20.23 2.85 28.08 3.34 33.46 1.16l-.63 2.11Z",fill:"#515151",className:"__web-inspector-hide-shortcut__"}),T.createElement("path",{d:"M141.5 153.87c-3.11 2.55-27.72 5-35.58 3.53l2.75-6.8c20.23 2.85 28.08 3.34 33.46 1.16l-.63 2.11Z",fill:"#515151"}),T.createElement("path",{d:"M126.02 142.7c-3.1-2.99-4.99-7.5-4.16-12.35",stroke:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M130.6 95.65c-9.03-10.98-18.97-19.74-25.5-24.56l1.63-2.22c6.7 4.95 16.81 13.86 26 25.02 9.18 11.16 17.54 24.67 20.59 38.83l-2.7.59c-2.91-13.56-10.97-26.67-20.02-37.66Z",fill:"#515151"}),T.createElement("path",{d:"m149.12 107.09-16.36 13.2 22.27 17.8 8.87-19.19c-.14-3.93-2.34-5.34-5.83-4.66l-3.12-2.5c.08-3.5-2.18-5.64-5.83-4.65Z",fill:"#E6E8EA"}),T.createElement("path",{d:"m148.24 128.62 9.45-14.34-2.91-2.33-10.94 13.07 4.4 3.6Z",stroke:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M143.67 127.98a6.93 6.93 0 1 1-10.82-8.65 6.93 6.93 0 0 1 10.82 8.65Zm12.28 9.82a6.93 6.93 0 1 1-10.82-8.66 6.93 6.93 0 0 1 10.82 8.66Z",fill:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m133.43 123.46 9.21-1.8.32 1.61-9.2 1.81-.33-1.62Z",fill:"white"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m145.5 133.11 9.21-1.8.32 1.62-9.2 1.8-.33-1.62Z",fill:"white"}),T.createElement("defs",null,T.createElement("clipPath",{id:"clip_failure_96_39_65"},T.createElement("rect",{width:44.4004,height:44.4627,transform:"matrix(0.963965 -0.266028 0.266198 0.963918 18.4214 34.6221)",fill:"white"}))))}var gle=ple,mle=Object.defineProperty,lR=Object.getOwnPropertySymbols,yle=Object.prototype.hasOwnProperty,vle=Object.prototype.propertyIsEnumerable,cR=(s,e,t)=>e in s?mle(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ble=(s,e)=>{for(var t in e||(e={}))yle.call(e,t)&&cR(s,t,e[t]);if(lR)for(var t of lR(e))vle.call(e,t)&&cR(s,t,e[t]);return s};function Cle(s){return T.createElement("svg",ble({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,"aria-hidden":!0},s),T.createElement("rect",{width:200,height:200,fill:"transparent"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M64.09 64.86V8.56L5.76 78.94h44.26v20.3h14.07v-20.3h8.82V64.86h-8.82Zm110.18 0V8.56L124.1 69.08c.7-3.74 1.07-7.7 1.07-11.76 0-11-2.7-21.1-7.25-28.55-4.5-7.4-11.13-12.63-19-12.63-7.88 0-14.5 5.23-19.01 12.63-4.54 7.45-7.25 17.55-7.25 28.55s2.7 21.1 7.25 28.55c4.5 7.4 11.13 12.62 19 12.62 7.88 0 14.5-5.23 19.01-12.62a44.09 44.09 0 0 0 3.4-6.93h38.86v20.3h14.08v-20.3h8.81V64.86h-8.81Zm-138.57 0L50.02 47.6v17.26H35.7Zm124.5 0h-14.32L160.2 47.6v17.26Zm-49.1-7.54c0 8.84-2.2 16.32-5.19 21.22-3.08 5.08-5.87 5.87-6.98 5.87-1.12 0-3.9-.8-7-5.87-2.98-4.9-5.19-12.38-5.19-21.22 0-8.85 2.21-16.33 5.2-21.23 3.09-5.07 5.87-5.87 6.98-5.87 1.12 0 3.9.8 7 5.87 2.98 4.9 5.19 12.38 5.19 21.23Z",fill:"var(--semi-color-primary-light-default)"}),T.createElement("path",{d:"M178.34 186.57c-1.85 2.2-6.66 1.02-8.13.24a2.46 2.46 0 0 1-.34-.22c-1.94.22-14.94-.5-15.12-.46-6.12 1.43-14.06 1.03-15.2 1-1.36-.05-4.53-1.33-5.75-5.08-1.2-3.67 0-7.12 2.16-13.37l.13-.38-1.43 2.83c-7.37 14.43-11.05 19.7-17.43 20.14-6.38.45-34.34-.09-41.09-.78-6.75-.7-9.42-1.68-9.35-2.83.05-.92 2.98-2.2 4.44-2.72-5.88-1.57-20.16-5.97-30.18-10.98-12.52-6.26-25.14-15.8-21.91-28.92 3.22-13.13 15.76-16.8 25.59-17.38 2.75-.16 5.14-.1 7.16.07 3.76.33 6.21 1.06 7.2 1.53-1.12-6.37-3.33-19.34-3.33-20.21 0-1.1-3.02-10.67-3.64-14.35-.1-.55-1.11-5.6 3.64-5.02 4.75.57 12.4 18.2 15.88 28.7a401.55 401.55 0 0 0 11.15-9.87c.84-1.02 9.36-9.75 14.87-13.84a60.09 60.09 0 0 1 33-11.76c16.29-.81 34.49 2.36 40.9 11.91 6.4 9.55 6.1 34.44 6.44 48.71.35 14.27.84 27.64 2.11 29.76 1.27 2.12 6.45 5.02 9.77 7.14 3.33 2.11 4.45 3.9 4.36 4.2-.1.3-.4.58-2.24 1.08.34.47.12 1.38-2.12 1.6-4.7.48-8.64-.74-11.54-.74Z",fill:"white"}),T.createElement("path",{d:"M192 185.71c-1.6-2.3-9.7-5.34-15.04-5.75-5.34-.41-6.45.53-7.4 1.85-1 1.37-1.05 3.72.3 4.78m22.14-.88c.34.47.12 1.38-2.12 1.6-4.7.48-8.64-.74-11.54-.74-1.85 2.2-6.66 1.02-8.13.24a2.46 2.46 0 0 1-.34-.22m22.13-.88c1.84-.5 2.15-.78 2.24-1.08.09-.3-1.03-2.09-4.36-4.2-3.32-2.12-8.5-5.02-9.77-7.14-1.27-2.12-1.76-15.49-2.1-29.76-.36-14.27-.06-39.16-6.46-48.7-6.4-9.56-24.6-12.73-40.89-11.92a60.09 60.09 0 0 0-33 11.76c-5.5 4.09-14.03 12.82-14.87 13.84-.37.46-5.43 4.9-11.15 9.87-3.49-10.5-11.13-28.13-15.88-28.7-4.75-.58-3.73 4.47-3.64 5.02.62 3.68 3.64 13.26 3.64 14.35 0 .87 2.21 13.84 3.32 20.2-.98-.46-3.43-1.2-7.19-1.52m19.34 57.21c-5.88-1.57-20.16-5.97-30.18-10.98-12.52-6.26-25.14-15.8-21.91-28.92 3.22-13.13 15.76-16.8 25.59-17.38 2.75-.16 5.14-.1 7.16.07m19.34 57.21c-1.46.52-4.39 1.8-4.44 2.72-.07 1.15 2.6 2.14 9.35 2.83 6.75.7 34.71 1.23 41.09.78 6.38-.44 10.06-5.71 17.43-20.14l1.43-2.83m-64.86 16.64c5.89-2.49 12.35-6.32 16.49-10.11 5.07-4.65 9.55-13.46 9.96-14.28l.82-1.56m43.43 4.15c-.47-3-1.21-7.33.37-14.67 1.47-6.81 6.6-15.3 6.65-11.03.05 4-6.05 17.35-12.86 30.86m0 0c-2.25 6.5-3.51 10-2.3 13.75 1.23 3.75 4.4 5.03 5.76 5.07 1.14.04 9.08.44 15.2-.99m0 0a19.5 19.5 0 0 0 3.27-1.03c6.09-2.63 10.92-8.55 13.53-24.26 2.62-15.71 1.5-42.36-10.29-50.78-11.78-8.41-21.32-6.07-34.03 5.8-5.34 4.98-11.86 14.52-17.42 23.52m44.94 46.75c.18-.04 13.19.68 15.12.46m-60.06-47.2c-.8-3.66-1.44-7.16-1.94-10.43m1.94 10.42c-1.24 2-2.43 3.98-3.55 5.87m.32-30.9c0 3.75.41 8.8 1.3 14.61m0 0c-2.32 2.46-7.78 7.15-13.67 11.55m-42.32-12.78s1.24 7.12 3.87 11.42a29.93 29.93 0 0 0 6.61 7.8m36.13 12.04c-6.87-3.1-17.87-6.8-22.51-8.27m22.51 8.27a394.7 394.7 0 0 1 7.76-13.74M76 150.72c.39-.06.78-.14 1.17-.23 3.97-.93 10.76-5.29 17.05-9.98m-18.22 10.2c-4.7.8-9.36-.34-13.62-3.76m0 0c-3.29-.85-11.28-2.39-12.86-2.41m56.75.71c-2.32-.94-9-3.55-12.05-4.74",stroke:"#515151"}),T.createElement("path",{d:"m77.74 73.31 23.73 43.2-1.7 2.5-22.73 9.55-24.58-44.48 21.9-10.77h3.38Z",fill:"#E6E8EA"}),T.createElement("path",{d:"M74.35 73.31h3.4l23.72 43.2-1.7 2.5m-25.42-45.7-21.9 10.77 24.59 44.48L99.78 119m-25.43-45.7 25.43 45.7",stroke:"#515151"}),T.createElement("path",{d:"M83.9 116.95c.96 1.97-4.91 4.57-8.32 6.18-1.33.63-2.1.98-2.7 1.2.9 3.3 1.24 8.14-4.48 9.82-5.73 1.69-15.07-1.02-18-9.6-2.95-8.6.01-19.97 9.05-27.04 5.67-4.42 15.01-5.77 19.42-4.05 2.15.82 1.38 2.71-.56 4.44a58.1 58.1 0 0 1-4.53 3.58c.4-.01.8-.02 1.23 0 4.13.06 7.26 1.11 7.42 3.14.07.94-.8 2.13-1.95 3.45-.62.71-1.28 1.34-1.95 1.88 2.8-.22 5.94 1.05 2.9 4.2-.41.43-.85.83-1.29 1.2 1.73.02 3.24.56 3.75 1.6Z",fill:"white"}),T.createElement("path",{d:"M69.73 125.1c1.65-.34 2.2-.4 3.14-.76m0 0c.6-.23 1.38-.58 2.7-1.21 3.42-1.6 9.3-4.21 8.32-6.17-.86-1.76-4.53-2.09-7.33-.97-2.84 1.13-3.58 2.24-3.46 2.56.12.31 4.75-.69 8.34-4.4 3.4-3.54-.96-4.7-3.9-4.06-2.26.5-6.4 2.06-6.16 2.85.16.5 5.33-.54 9.1-4.87 1.14-1.32 2.02-2.51 1.95-3.45-.16-2.03-3.3-3.08-7.42-3.15-8.83-.16-11.56 4.78-11.16 5.1 1.1.92 9.36-4.15 14.46-8.67 1.94-1.73 2.71-3.62.56-4.44-4.4-1.72-13.75-.37-19.42 4.05-9.04 7.07-12 18.44-9.06 27.03 2.94 8.6 12.28 11.3 18 9.61 5.73-1.68 5.4-6.53 4.48-9.81Z",stroke:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M106.48 120.15c-.2 1.56-.53 3.98-1.2 6.51-.68 2.53-1.71 5.16-3.3 7.14l.2.19 5.67-4.97-1.1-8.87h-.27Zm31.09 45.32-.25-.1-11.3 21.27h11.92l-.43-.26c-3.5-2.07-4.07-5.79-3.46-9.77.52-3.4 1.9-6.95 3-9.77l.52-1.37Zm-85.81-37.9-.24.13a55.3 55.3 0 0 0 1.65 6.39l.01.04.05.03c1.63.84 4.4 1.85 7.45 2.14 3.05.3 6.39-.12 9.1-2.15l-.12-.24c-3.14 1.2-11.14 1.63-17.9-6.33Z",fill:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m133.54 82.83.02-.16h-.16c-1.82.1-5.84.39-9.87.96-2.02.28-4.04.64-5.79 1.08-1.74.43-3.23.95-4.18 1.58l-.06.04v.07c-.04 1.8.13 3.69.65 5.35a7.28 7.28 0 0 0 2.8 4.05c2.81 1.86 6.69 1.62 9.98-.58 3.3-2.2 6.04-6.37 6.61-12.4Z",fill:"#515151"}),T.createElement("path",{d:"M126.66 84.73a9.79 9.79 0 0 1-9.7 9.87 9.79 9.79 0 0 1-9.7-9.87 9.79 9.79 0 0 1 9.7-9.87c5.35 0 9.7 4.41 9.7 9.87Z",fill:"white",stroke:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M109.41 70.6c.66.25 1.25.47 1.9.26.52-.18.83-.7 1.18-1.3.75-1.27 1.73-2.93 5.56-2.56 3.86.38 4.6 2.17 5.1 3.43.21.5.38.9.69 1.12.48.32.84.33 1.26.35.55.02 1.2.05 2.37.75 1.41.85 2.49 5.65.23 9.93l.26.43c-.45 2.15-3.05 4.37-3.05 4.14 0-3.04 0-4.75-2.92-7.43-4.26 1.6-10.89 1.13-13.94.14-4-1.28-5.98-6.81-2.53-9 1.72-1.1 2.88-.65 3.9-.26Z",fill:"#515151"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M116.7 81.6a.41.41 0 1 0-.74.4c.2.39.47.74.9.95.41.2.93.25 1.58.17a.41.41 0 1 0-.1-.82c-.58.07-.9.01-1.12-.09-.2-.1-.36-.28-.53-.6Zm-6.57 4.22a1.07 1.07 0 0 0 1-1.13 1.06 1.06 0 0 0-1.1-1.02c-.59.03-1.03.54-1 1.13.02.6.52 1.05 1.1 1.02Zm6.82.73a1.07 1.07 0 0 0 1-1.13 1.06 1.06 0 0 0-1.1-1.01c-.58.02-1.03.53-1 1.12.03.6.52 1.05 1.1 1.02Z",fill:"#515151"}),T.createElement("ellipse",{cx:127.42,cy:86.0081,rx:2.47934,ry:2.47934,fill:"white",stroke:"#515151"}),T.createElement("circle",{r:4.67102,transform:"matrix(0.707106 0.707108 -0.707106 0.707108 75.0508 75.7794)",fill:"var(--semi-color-primary)",stroke:"var(--semi-color-primary)",strokeWidth:3}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M77.9 72.97a1.1 1.1 0 0 0-1.57 0l-1.26 1.27-1.31-1.3a1.1 1.1 0 1 0-1.57 1.56l1.31 1.3-1.3 1.31a1.1 1.1 0 0 0 1.56 1.57l1.3-1.3 1.27 1.26a1.1 1.1 0 1 0 1.57-1.57l-1.26-1.26 1.26-1.27a1.1 1.1 0 0 0 0-1.57Z",fill:"white"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M99.41 49.11a32.26 32.26 0 0 0-19-9.84 2.14 2.14 0 0 0-2.42 2.02c-.07 1.2.82 2.2 1.97 2.37a27.86 27.86 0 0 1 16.13 8.36c.83.87 2.24.99 3.17.15.88-.79.99-2.17.15-3.06Zm-35.8-8.52a32.5 32.5 0 0 0-18.74 15.73 2.14 2.14 0 0 0 1.01 2.93c1.11.52 2.4.02 2.96-1.02a28.08 28.08 0 0 1 15.96-13.4 2.28 2.28 0 0 0 1.53-2.72 2.14 2.14 0 0 0-2.72-1.52Zm27.75 15.78c-3.02-3.14-7-5.38-11.53-6.22a2.11 2.11 0 0 0-2.47 2 2.33 2.33 0 0 0 1.9 2.38c3.41.69 6.43 2.37 8.75 4.72.85.85 2.26 1 3.2.15.87-.78 1-2.15.15-3.03Zm-24.64-4.65a21.63 21.63 0 0 0-11.66 9.8 2.1 2.1 0 0 0 .99 2.94c1.12.52 2.4.01 2.98-1 2-3.45 5.17-6.11 8.91-7.5 1.1-.4 1.81-1.56 1.5-2.75a2.1 2.1 0 0 0-2.72-1.5Zm16.63 11.95a10.69 10.69 0 0 0-4-2.47c-1.35-.47-2.56.62-2.63 1.9-.07 1.14.73 2.04 1.65 2.44.56.25 1.07.56 1.52.94.89.74 2.33 1 3.32.11.82-.74 1-2.07.14-2.92Zm-14.28-.76c-1.82.83-3.39 2.16-4.5 3.83-.73 1.08-.16 2.42.9 2.92 1.14.53 2.38-.02 3.05-.88a6.35 6.35 0 0 1 1.93-1.63c.95-.52 1.68-1.63 1.37-2.83-.3-1.15-1.54-1.95-2.75-1.4Z",fill:"var(--semi-color-primary)"}))}var Sle=Cle;const wle=({errorMsg:s})=>R.jsxs("div",{className:"error-display",children:[R.jsx(gle,{}),R.jsx("div",{className:"error-display-content",children:R.jsx(De.Text,{style:{fontSize:14},children:s})})]}),_le=()=>{const{state:{gameDetail:s},setGameDetail:e}=Qr(),[t,n]=T.useState(!0),[r,a]=T.useState(!1),[i,o]=T.useState(""),c=({errorCode:f,errorMsg:p,clientKey:y})=>{n(!1),a(!0),f===404?o(V("getDevGameDetailNotFound",{clientKey:y})):f===403?o(V("gameDetailNoPermission",{clientKey:y})):f===401&&o(V("gameDetailNotLogin",{clientKey:y}))};T.useEffect(()=>{s?.has_error&&(a(!0),c({errorCode:s.error_code,errorMsg:s.error_msg,clientKey:s.client_key})),Ln({url:"/game/detail",method:"GET"}).then(f=>{if(f?.error)n(!1),c(f.error);else{const{data:p}=f;e(p),n(!1)}})},[]);const h=T.useMemo(()=>{if(!s||s?.has_error)return[];const{name:f,client_key:p,size:y,description:v,request_allowed_domains:_}=s,S=s.packages.filter(w=>w.type==="independent");return[{key:V("gameName"),value:()=>R.jsx(De.Text,{style:{fontWeight:"bold"},children:f})},{key:V("gameIcon"),value:()=>R.jsx(lle,{logo:s.display_icon_url})},{key:V("gameID"),value:()=>R.jsx(De.Text,{children:p})},{key:V("gameDesc"),value:()=>R.jsx(cle,{description:v})},{key:V("gameSize"),value:()=>R.jsx(nle,{size:y,limit:30})},{key:V("gameMainPackageSize"),value:()=>R.jsx(rle,{packages:s.packages,limit:4})},{key:V("gameIndependentPackageSize"),hidden:S.length===0,value:()=>R.jsx(tle,{packages:S})},{key:V("gameTrustDomains"),value:()=>R.jsx(sle,{domains:_})},{key:V("gameServiceAgreement"),value:()=>R.jsx(ale,{termsOfServiceLink:s.terms_of_service_link})},{key:V("gamePrivacyPolicy"),value:()=>R.jsx(ile,{privacyPolicyLink:s.privacy_policy_link})}].filter(w=>!w.hidden)},[s]);return t&&!s?R.jsx("div",{className:"game-detail-loading-container",children:R.jsx(pn,{size:"large"})}):r?R.jsx(wle,{errorMsg:i}):h.length===0?null:R.jsxs("div",{className:"game-detail-container",children:[R.jsx(ole,{}),R.jsx($u,{data:h,align:"left",size:"small"})]})},Ele=()=>R.jsxs("div",{children:[R.jsx("strong",{className:"check-code-banner-section-title",children:V("pkgSizeCheckDesc")}),R.jsx("div",{className:"check-code-banner-section-desc",style:{marginBottom:4},children:R.jsx("div",{children:V("pkgSizeCheckDescTip",{projectSize:"30MB",mainPackageSize:"4MB",independentPackageSize:"4MB"})})}),R.jsx("strong",{className:"check-code-banner-section-title",children:V("mandatoryApiCheck")}),R.jsx("div",{className:"check-code-banner-section-desc",children:V("mandatoryApiCheckDesc")}),R.jsx("strong",{className:"check-code-banner-section-title",children:V("configFileCheck")}),R.jsx("div",{className:"check-code-banner-section-desc",children:R.jsxs("div",{children:[R.jsx("code",{children:"game.json"}),":",V("gameJsonCheckDesc")]})})]}),Ole=()=>R.jsx(Ei,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:R.jsx(Ele,{}),type:"info"}),xle=s=>{const{result:e}=s,t=e.every(a=>a?.passed),[n,r]=T.useState(!1);return R.jsxs("div",{className:"check-result-group",children:[t?R.jsxs("div",{className:"check-result-title",children:[R.jsx(wi,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),R.jsx(De.Text,{style:{color:"#4CAF50",fontSize:20},children:V("checkConfigPassed")})]}):R.jsxs("div",{className:"check-result-title",children:[R.jsx(Vs,{style:{color:"#F44336",marginRight:4}}),R.jsx(De.Text,{style:{color:"#F44336",fontSize:20},children:V("checkConfigFailed")})]}),R.jsxs("div",{style:{paddingBottom:24,position:"relative"},children:[R.jsx(Fs,{style:{marginBottom:12},collapseHeight:150,isOpen:n,children:e.map((a,i)=>R.jsxs("div",{className:"check-result-item",children:[R.jsx(zt,{color:a?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:a?.file}),R.jsx(De.Text,{style:{fontSize:14,color:a?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:a?.msg})]},i))}),n?R.jsx(De.Text,{style:{color:"grey",cursor:"pointer",fontSize:14,width:"100%",display:"block",alignItems:"center",justifyContent:"center",textAlign:"center"},onClick:()=>r(!1),children:V("closeCheckDetail")}):R.jsx(De.Text,{style:{color:"grey"},className:"show-more-text-btn",onClick:()=>r(!0),children:V("expandCheckDetail")})]})]})},Tle={project:V("gameProject"),main_package:V("gameMainPackage"),independent_package:V("independentPackage")},Ple=s=>{const{result:e}=s,t=e.every(n=>n?.passed);return R.jsxs("div",{className:"check-result-group",children:[t?R.jsxs("div",{className:"check-result-title",children:[R.jsx(wi,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),R.jsx(De.Text,{style:{color:"#4CAF50",fontSize:20},children:V("checkPkgSizePassed")})]}):R.jsxs("div",{className:"check-result-title",children:[R.jsx(Vs,{style:{color:"#F44336",marginRight:4,fontSize:20}}),R.jsx(De.Text,{style:{color:"#F44336",fontSize:20},children:V("checkPkgSizeFailed")})]}),e.map((n,r)=>R.jsxs("div",{className:"check-result-item",children:[R.jsxs(zt,{color:n?.passed?"green":"red",style:{marginRight:8},children:[Tle[n.dimension],n.dimension==="independent_package"?`: ${n.name}`:""]}),R.jsx(De.Text,{style:{fontSize:14,color:n?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:n?.msg})]},r))]})},Ile=s=>{const{result:e}=s,t=e.every(a=>a?.passed),[n,r]=T.useState(!1);return R.jsxs("div",{className:"check-result-group",children:[t?R.jsxs("div",{className:"check-result-title",children:[R.jsx(wi,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),R.jsx(De.Text,{style:{color:"#4CAF50",fontSize:20},children:V("checkApiSuccess")})]}):R.jsxs("div",{className:"check-result-title",children:[R.jsx(Vs,{style:{color:"#F44336",marginRight:4}}),R.jsx(De.Text,{style:{color:"#F44336",fontSize:20},children:V("checkApiFailed")})]}),R.jsxs("div",{style:{position:"relative"},children:[R.jsx(Fs,{style:{marginBottom:12},collapseHeight:150,isOpen:n,children:e.map((a,i)=>R.jsxs("div",{className:"check-result-item",children:[R.jsx(zt,{color:a?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:a?.name}),R.jsxs(De.Text,{style:{fontSize:14,color:a?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:[V(a?.name),a?.passed?V("integrated"):V("notIntegrated")]})]},i))}),n?R.jsx(De.Text,{style:{color:"grey",cursor:"pointer",fontSize:14,width:"100%",display:"block",alignItems:"center",justifyContent:"center",textAlign:"center"},onClick:()=>r(!1),children:V("closeCheckDetail")}):R.jsx(De.Text,{style:{color:"grey"},className:"show-more-text-btn",onClick:()=>r(!0),children:V("expandCheckDetail")})]})]})},Dle=()=>{const[s,e]=T.useState([]),[t,n]=T.useState(!1);T.useEffect(()=>{Ln({url:"/game/check",method:"GET"}).then(o=>{e(o?.data||[])}).catch(()=>{n(!0)})},[]);const r=s.filter(o=>o?.type==="config"),a=s.filter(o=>o?.type==="size"),i=s.filter(o=>o?.type==="api");return R.jsxs("div",{style:{height:"100%",overflow:"auto"},children:[R.jsx(Ole,{}),R.jsx(Ple,{result:a}),R.jsx(Ile,{result:i}),R.jsx(xle,{result:r})]})},Rle=[{title:"0.3.0",target:{iOS:">=43.1",Android:">=43.1"},changes:{feature:[{desc:{"zh-CN":"支持了开发信息蒙层,打开后可以查看游戏 FPS、设备信息、调试开关等信息,便于查看游戏运行状态","en-US":"Support devInfo panel, which can show game FPS, device info, debug switch, etc."},link:"https://bytedance.larkoffice.com/wiki/PaK1wSu0eiPrxrkrqtrcR3VEnjf",module:"devOptions"},{desc:{"zh-CN":"支持删除历史启动模式,便于管理历史启动模式","en-US":"Support delete historical launch mode,keep consistent with client dev options"},module:"devOptions"},{desc:{"zh-CN":"调整调试设置模块名称为开发选项,和客户端内调开发者选项保持一致","en-US":"Rename debug setting module to dev options, keep consistent with client dev options"},module:"devOptions",link:"https://bytedance.larkoffice.com/wiki/PaK1wSu0eiPrxrkrqtrcR3VEnjf"},{desc:{"zh-CN":"调试设置新增定义 vConsole 和 开发信息浮层设置","en-US":"Add debug setting to define vConsole and dev overlay"},module:"devOptions"},{desc:{"zh-CN":"支持了变更日志,用户可以在调试环境下查看游戏的变更记录,部分新功能可通过更多信息查看使用","en-US":"Support change log, user can view game change log in IDE, some new features can be viewed in more info"},module:"new"}],optimize:[{desc:{"zh-CN":"支持了调试设置开关本地缓存,避免每次都需要重新设置","en-US":"Support debug setting cache, avoid setting debug mode every time"},module:"devOptions"}],bugfix:[{desc:{"zh-CN":"修复上传名称为中文的游戏时,平台展示乱码的问题","en-US":"Fix the issue that the platform shows garbled code when the game name is in Chinese"},module:"upload"},{desc:{"zh-CN":"修复启动模式模块,自定义query 参数无法持久化的问题","en-US":"Fix the issue that custom query parameters cannot be persisted in launch mode module"},module:"launchMode"},{desc:{"zh-CN":"修复扫描二维码模块,内容过多,纵向无法滚动问题","en-US":"Fix the issue that the content in scan QR code module is too long, and cannot be scrolled vertically"},module:"scanQrcode"}]}}],kle=()=>{const s=X4;return R.jsx("div",{className:"change-log-container",children:Rle.map(e=>R.jsxs("div",{className:"change-log-item",children:[R.jsx("h2",{className:"change-log-title",children:e.title}),R.jsx("div",{className:"change-log-target",children:R.jsxs("div",{className:"change-log-target-title",children:[V("changelogTarget")," iOS ",e.target.iOS," | Android",e.target.Android]})}),e?.changes?.feature?.length>0&&R.jsxs("div",{children:[R.jsx("div",{className:"change-log-feature-title",children:R.jsx(zt,{color:"green",size:"large",shape:"circle",type:"solid",children:V("changelogFeature")})}),R.jsx("ul",{className:"change-log-changes-feature",children:e.changes.feature.map(t=>R.jsxs("li",{className:"change-log-change",children:[t.desc[s]," ",t?.link?R.jsx("a",{style:{fontWeight:600,color:"orange"},href:t.link,target:"_blank",rel:"noopener noreferrer",children:V("changelogLink")}):null]},t.desc[s]))})]}),e?.changes?.optimize?.length>0&&R.jsxs("div",{children:[R.jsx("div",{className:"change-log-optimize-title",children:R.jsx(zt,{color:"orange",size:"large",shape:"circle",type:"solid",children:V("changelogOptimize")})}),R.jsx("ul",{className:"change-log-changes-optimize",children:e.changes.optimize.map(t=>R.jsx("li",{className:"change-log-change",children:t.desc[s]},t.desc[s]))})]}),e?.changes?.bugfix?.length>0&&R.jsxs("div",{children:[R.jsx("div",{className:"change-log-bugfix-title",children:R.jsx(zt,{color:"red",size:"large",shape:"circle",type:"solid",children:V("changelogBugfix")})}),R.jsx("ul",{className:"change-log-changes-bugfix",children:e.changes.bugfix.map(t=>R.jsx("li",{className:"change-log-change",children:t.desc[s]},t.desc[s]))})]})]},e.title))})},Nle=({size:s=24,color:e="#000",style:t,className:n})=>R.jsx("div",{style:{display:"flex",alignItems:"center",position:"relative"},children:R.jsxs("svg",{fill:"currentColor",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,children:[R.jsx("path",{d:"M37.86 17.82c.14.24.14.67.14 1.53v9.5c0 1.14 0 1.72-.2 2.26-.16.49-.43.96-.77 1.34-.37.44-.87.73-1.86 1.3l-7.84 4.53c-.74.43-1.11.64-1.4.64a.66.66 0 0 1-.58-.34c-.14-.24-.14-.67-.14-1.53v-9.5c0-1.14 0-1.71.2-2.26.16-.48.43-.95.76-1.34.38-.44.88-.73 1.87-1.3l7.84-4.52c.74-.43 1.11-.65 1.4-.64.25 0 .45.12.58.33Z"}),R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m27.54 1.99 7 3.93 6.89 4a7.23 7.23 0 0 1 3.59 6.2l.06 7.88-.06 7.88a7.23 7.23 0 0 1-3.6 6.2l-6.88 4-7 3.93a7.23 7.23 0 0 1-7.08 0l-7-3.93-6.9-4a7.23 7.23 0 0 1-3.58-6.2L2.9 24l.07-7.88a7.23 7.23 0 0 1 3.59-6.2l6.89-4 7-3.93a7.23 7.23 0 0 1 7.08 0Zm-2.07 3.67 6.98 3.92 6.86 3.99a3.01 3.01 0 0 1 1.5 2.58l.06 7.85-.07 7.85c0 1.06-.57 2.04-1.5 2.58l-6.85 4-6.98 3.9c-.91.52-2.03.52-2.95 0l-6.97-3.9-6.86-4a3.01 3.01 0 0 1-1.5-2.58L7.13 24l.06-7.85c.01-1.06.58-2.04 1.5-2.58l6.86-4 6.97-3.9a3.01 3.01 0 0 1 2.95 0Z"})]})}),Ale=()=>R.jsxs("div",{className:"logo-container",children:[R.jsx(Nle,{size:32}),R.jsx("div",{className:"logo-title",children:V("title")})]}),Mle=()=>{const{state:{user:s}}=Qr(),[e,t]=T.useState(!1),[n,r]=T.useState(!1),[a,i]=T.useState(""),[o,c]=T.useState(""),h=T.useRef(null),f={"ttmg-game-desc":encodeURIComponent(a||"--")},p=()=>{r(!1),c(""),i("")},y=()=>{t(!1),p(),h.current?.formApi?.reset?.()},v=()=>{s?.email&&t(!0)},_=C=>{const w=C;if(w?.code===0)sa.success({title:V("uploadPlatformSuccess"),content:R.jsxs(R.Fragment,{children:[R.jsx("div",{children:V("uploadPlatformDesc")}),R.jsx("div",{style:{marginTop:12,display:"flex",justifyContent:"flex-end"},children:R.jsx(De.Text,{link:!0,onClick:()=>{window.open(w?.data?.detail,"_blank")},children:V("viewOnPlatform")})})]}),duration:10}),t(!1),p();else{const x=w?.error?.StatusMessage||w?.detail||V("uploadPlatformFailed");c(x),r(!1)}},S=C=>{const w=C?.error?.StatusMessage||C?.response?.detail||C?.message||V("uploadPlatformFailed");c(w),r(!1)};return R.jsxs(R.Fragment,{children:[R.jsx(In,{content:()=>s?.email?null:R.jsx("div",{className:"uploader-login-tip",children:V("loginToUpload")}),children:R.jsxs("div",{className:$("resource-uploader",{"resource-uploader-disabled":!s?.email}),onClick:v,children:[R.jsx(fC,{size:"default"}),R.jsx("div",{className:"uploader-text",children:V("upload")})]})}),R.jsx(Cr,{footer:null,visible:e,onCancel:y,title:V("uploadToPlatform"),children:R.jsxs("div",{className:"uploader-modal-content",children:[n&&R.jsx("div",{className:"upload-loading-container",children:R.jsx("div",{className:"loading-spin",children:R.jsx(pn,{size:"large"})})}),o&&R.jsx(De.Text,{style:{color:"red",marginBottom:12,marginTop:12},children:o}),R.jsxs(He,{ref:h,onChange:({values:C})=>{i(C?.gameDescription||"--"),c("")},children:[R.jsx(He.TextArea,{label:V("gameAssetDescription"),placeholder:V("gameAssetDescription"),field:"gameDescription"}),R.jsx(He.Slot,{children:R.jsx(Hu,{accept:".zip",action:"/game/upload",showClear:!1,headers:f,beforeUpload:C=>(r(!0),!0),onSuccess:C=>{_(C)},onError:C=>{S(C)},children:R.jsxs("div",{className:"uploader-button-container",children:[R.jsx(fC,{className:"uploader-button-icon"}),R.jsx("div",{className:"uploader-button-text",children:V("uploadGamePackageTip")})]})})}),R.jsx("div",{style:{display:"flex",justifyContent:"flex-end",paddingBottom:16,marginTop:12}})]})]})})]})},Fle=()=>{const{state:{isConnected:s},setIsConnected:e,setMessage:t}=Qr(),n=({client:r,node:a})=>{aa.info("connectionChange",r,a),ze.get("isNodeWSConnected")===a&&(r||t({type:"danger",desc:V("clientServerStartError")})),ze.get("isClientWSConnected")===r&&(a||t({type:"danger",desc:V("nodeServerStartError")})),ze.get("isClientWSConnected")&&!r&&(ze.setMultiple({isClientWSConnected:!1,isResourcesReady:!1,isScriptsReady:!1}),t({type:"danger",desc:V("clientDisconnected")})),ze.get("isNodeWSConnected")&&!a&&(ze.setMultiple({isNodeWSConnected:!1,isResourcesReady:!1,isScriptsReady:!1}),t({type:"danger",title:V("serverDisconnected"),desc:V("nodeDisconnected")})),!ze.get("isClientWSConnected")&&r&&(ze.set("isClientWSConnected",!0),t({type:"success",desc:V("clientConnectedSuccess")})),!ze.get("isNodeWSConnected")&&a&&(ze.set("isNodeWSConnected",!0),t({type:"success",desc:V("nodeServerConnectedSuccess")})),e(r&&a)};return T.useEffect(()=>(qe.on("connectionChange",n),()=>{qe.off("connectionChange",n)}),[e]),R.jsx(zt,{style:{margin:"0 4px"},color:s?"light-green":"grey",size:"large",shape:"circle",type:"ghost",children:V(s?"deviceConnected":"deviceDisconnected")})},Lle="/api/passport/web/email/login",$le={aid:"2471",account_sdk_source:"web",sdk_version:"2.1.1"};Lle+""+new URLSearchParams($le);const jle=()=>{const{state:{user:s}}=Qr();return s?.email?R.jsx(In,{position:"bottom",content:R.jsx("div",{className:"login-user-popover",children:s.email}),children:R.jsx(bi,{color:"amber",style:{flexShrink:0},alt:s?.email,size:"small",children:s?.email?.split("@")[0][0]})}):R.jsx(In,{position:"bottom",trigger:"hover",content:R.jsx("div",{className:"not-login-status-popover",children:V("notLoginTip")}),children:R.jsx(bi,{color:"grey",style:{flexShrink:0},size:"small",children:V("notLogin")})})},Vle=[{node:"item",name:V("quickStart"),link:"https://bytedance.sg.larkoffice.com/docx/MarqdNvQLoihvjxN4rFllgjBgwb"},{node:"item",name:V("jsApiList"),link:"https://bytedance.larkoffice.com/wiki/GQscwDOQSiPxyjkbzyfckh2pnDg"},{node:"item",name:V("faq"),link:"https://bytedance.larkoffice.com/wiki/O6aWwFhDBiEglwkcnJ4ccJpdnmb"}],Ble=()=>R.jsx(Mn,{trigger:"hover",position:"bottomRight",render:R.jsx(R.Fragment,{children:Vle.map(s=>R.jsx(Mn.Item,{onClick:()=>{window.open(s.link)},children:s.name},s.name))}),children:R.jsxs("div",{className:"access-docs",children:[R.jsx(De.Text,{className:"access-docs-text",type:"primary",children:V("docs")}),R.jsx(ao,{className:"access-docs-icon"})]})}),Ule=({version:s})=>{const e=Gu();if(!s)return null;const t=()=>{e("/changelog")};return R.jsx(zt,{onClick:t,style:{margin:8,flexShrink:0,cursor:"pointer"},color:"light-blue",size:"large",shape:"circle",type:"ghost",children:s})},li={Idle:0,WasmPreparing:1,WasmPrepared:2,WasmSplitIssued:3,WasmSplitting:4,WasmSplitDone:5,WasmReadyToPrepare:6,WasmSplitPreparing:7,WasmPreparedSuccess:8,WasmCollecting:9,WasmUploadFail:-1,WasmDownloadFail:-2,WasmFileNotExist:-3,WasmSplitFail:-4,WasmSplitUpdateDBFail:-5,WasmSplitPrepareFail:-6,WasmPrepareFailed:-1};function Hle({codeMd5:s,clientKey:e}){return Ln({url:"/game/wasm-split-config",method:"GET",data:{codeMd5:s,clientKey:e}})}function zle(s){const{codePath:e,codeMd5:t,clientKey:n,desc:r}=s;return Ln({url:"/game/wasm-prepare",method:"POST",data:{codePath:e,clientKey:n,codeMd5:t,desc:r}})}function Kle({codeMd5:s,clientKey:e}){return Ln({url:"/game/wasm-prepare-result",method:"POST",data:{codeMd5:s,clientKey:e}})}function Wle(s,e){const t=e?.intervalMs,n=e?.maxAttempts,r=e?.signal||new AbortController().signal;let a=0;return new Promise((i,o)=>{if(r?.aborted){o(new DOMException("Polling aborted","AbortError"));return}const c=()=>{clearTimeout(h),o(new DOMException("Polling aborted","AbortError"))};r?.addEventListener("abort",c,{once:!0});let h;const f=async()=>{a+=1;try{const p=await Kle(s),{status:y}=p.data;if(y===li.WasmPreparedSuccess||y===li.WasmSplitDone){i(p);return}if(y<0){i(p);return}if(a>=n){o(new Error(`Polling timeout after ${n} attempts`));return}h=window.setTimeout(f,t)}catch(p){if(a>=n){o(p);return}h=window.setTimeout(f,t)}};f()})}function qle({codeMd5:s,clientKey:e,codePath:t}){return Ln({url:"/game/wasm-prepare-download",method:"POST",data:{codeMd5:s,clientKey:e,codePath:t}})}function Gle(s){const{codeMd5:e,clientKey:t}=s;return Ln({url:"/game/wasm-split",method:"POST",data:{codeMd5:e,clientKey:t}})}function Yle({codeMd5:s,clientKey:e}){return Ln({url:"/game/wasm-split-result",method:"POST",data:{codeMd5:s,clientKey:e}})}function Zle(s,e){const t=e?.intervalMs,n=e?.maxAttempts,r=e?.signal||new AbortController().signal;let a=0;return new Promise((i,o)=>{if(r?.aborted){o(new DOMException("Polling aborted","AbortError"));return}const c=()=>{clearTimeout(h),o(new DOMException("Polling aborted","AbortError"))};r?.addEventListener("abort",c,{once:!0});let h;const f=async()=>{a+=1;try{const p=await Yle(s),{status:y}=p.data;if(y!==li.WasmSplitDone){if(a>=n){o(new Error(`Polling timeout after ${n} attempts`));return}h=window.setTimeout(f,t);return}i(p)}catch(p){if(a>=n){o(p);return}h=window.setTimeout(f,t)}};f()})}function Xle({codeMd5:s,clientKey:e}){return Ln({url:"/game/wasm-split-download-result",method:"POST",data:{clientKey:e,codeMd5:s}})}function Qle(s){return Ln({url:"/game/wasm-split-download",method:"POST",data:s})}function _5(s){const{codeMd5:e,clientKey:t,codePath:n}=s;return Ln({url:"/game/wasm-split-reset",method:"POST",data:{codeMd5:e,clientKey:t,codePath:n}})}function Jle({codeMd5:s,clientKey:e}){return Ln({url:"/game/wasm-taskinfo",method:"GET",data:{codeMd5:s,clientKey:e}})}function ece({codeMd5:s,clientKey:e}){return Ln({url:"/game/wasm-set-collect",method:"POST",data:{codeMd5:s,clientKey:e}})}function uR(s){return Ln({url:"/game/wasm-collect-funcids",method:"GET",data:s})}function tce(s){return Ln({url:"/game/wasm-collect-info",method:"GET",data:s})}const Qc={container:"wasm-prepare-downloading-content",process:"wasm-prepare-downloading-text",success:"wasm-prepare-downloading-success",error:"wasm-prepare-downloading-error"},nce=({kind:s,children:e})=>{const t={process:Qc.process,success:Qc.success,error:Qc.error};return R.jsx("div",{className:t[s],children:e})},dR={star_fetch_prepared_wasm_url:{kind:"process",text:"fetchDownloadUrl",showSpin:!0},fetch_prepared_wasm_url_done:{kind:"success",text:"fetchDownloadUrlSuccess",showSpin:!0},fetch_prepared_wasm_url_failed:{kind:"error",text:"fetchDownloadUrlFailed",appendError:!0},start_download_prepared_wasm:{kind:"process",text:"downloadPreparedWasmCode",showSpin:!0},download_prepared_wasm_done:{kind:"success",text:"downloadPreparedWasmCodeSuccess",showSpin:!0},download_prepared_wasm_failed:{kind:"error",text:"downloadPreparedWasmCodeFailed",appendError:!0,showRetry:!0},start_compress_prepared_wasm:{kind:"process",text:"compressPreparedWasmCode",showSpin:!0},compress_prepared_wasm_done:{kind:"success",text:"compressPreparedWasmCodeSuccess",showSpin:!0},start_write_compress_prepared_wasm:{kind:"process",text:"writeCompressPreparedWasmCode",showSpin:!0},start_update_wasm_split_config:{kind:"process",text:"updateWasmSplitConfig",showSpin:!0},update_wasm_split_config_done:{kind:"success",text:"updateWasmSplitConfigSuccess"},update_wasm_split_config_failed:{kind:"error",text:"updateWasmSplitConfigFailed",appendError:!0},default:{kind:"process",text:"processing",showSpin:!0}},rce=({onCancel:s,onRetry:e,onHide:t})=>{const[n,r]=T.useState(""),[a,i]=T.useState("");T.useEffect(()=>{const f=p=>{r(p.status),i(p.errorMsg||"")};return qe.on("unitySplitStatus",f),()=>{qe.off("unitySplitStatus",f)}},[]);const o=T.useMemo(()=>dR[n]??dR.default,[n]),c=R.jsx(pn,{size:"large",color:"primary"}),h=typeof o.text=="string"?V(o.text)??o.text:"";return R.jsxs("div",{className:Qc.container,children:[o.showSpin&&c,!!h&&R.jsx(nce,{kind:o.kind,children:h}),o.appendError&&!!a&&R.jsx("div",{className:Qc.error,children:a}),o.showRetry&&R.jsx(Pe,{onClick:e,children:V("retryDownload")}),R.jsx(Pe,{style:{marginTop:12},type:"tertiary",onClick:t,children:V("backgroundRun")})]})},sce=({onSubmit:s,onCancel:e,onChange:t})=>R.jsxs(He,{style:{width:"100%",transform:"translateY(-20px)"},onChange:t,onSubmit:s,children:[R.jsx(He.TextArea,{rules:[{required:!0,message:V("inputSplitDesc")}],label:V("splitDesc"),placeholder:V("inputSplitDesc"),field:"desc"}),R.jsxs("div",{className:"wasm-prepare-form-button-container",children:[R.jsx(Pe,{type:"tertiary",htmlType:"submit",style:{marginRight:12},children:V("startPrepare")}),R.jsx(Pe,{type:"tertiary",onClick:e,children:V("cancel")})]})]}),Xn={init:"init",start:"start",processing:li.WasmPreparing,processingReady:li.WasmReadyToPrepare,success:li.WasmPreparedSuccess,failed:li.WasmPrepareFailed,splitDone:li.WasmSplitDone,downloading:"downloading",downloadFailed:"downloadFailed"},hR=new AbortController,ace=({codePath:s,codeMd5:e,clientKey:t,onCancel:n,onNext:r,onHide:a})=>{const[i,o]=T.useState(""),[c,h]=T.useState({code:0,data:{status:Xn.init}}),f=T.useMemo(()=>c?.data?.status,[c?.data?.status]),p=()=>{hR.abort(),n(),_5({codeMd5:e,clientKey:t,codePath:s}).then(w=>{w.code===0&&h({...c,data:{...c?.data,status:Xn.init}})})},y=()=>{h({code:0,data:{status:Xn.start}}),zle({codePath:s,codeMd5:e,clientKey:t,desc:i}).then(w=>{w.code===0||w?.error?.code===10024||w?.error?.code===10028?(h({...w,data:{...w?.data,status:Xn.processing}}),v()):h({...c,error:w?.error||{code:-1,message:"Internal server error, please try again later..."},data:{...c?.data,status:Xn.failed}})})},v=()=>{Wle({codeMd5:e,clientKey:t},{intervalMs:500,maxAttempts:100,signal:hR.signal}).then(w=>{w.code===0?h(w):h({...c,data:{...c?.data}})})},_=()=>{h({...c,data:{...c?.data,status:"downloading"}}),qle({codePath:s,codeMd5:e,clientKey:t}).then(w=>{w.code===0?(h({...c,data:{...c?.data,status:Xn.success}}),r()):h({...c,data:{...c?.data,status:Xn.downloadFailed}})})},S=w=>{o(w?.values?.desc)};let C=null;switch(f){case Xn.init:C=R.jsx(sce,{onSubmit:y,onCancel:n,onChange:S});break;case Xn.start:C=R.jsxs("div",{className:"wasm-prepare-processing-content",children:[R.jsx(pn,{size:"large",color:"primary"}),R.jsx("div",{className:"wasm-prepare-processing-text",children:V("startingPrepare")}),R.jsx("div",{className:"wasm-prepare-processing-cancel",children:R.jsxs(Pa,{children:[R.jsx(Pe,{type:"tertiary",onClick:n,children:V("cancelPrepare")}),R.jsx(Pe,{type:"tertiary",onClick:()=>a(),children:V("backgroundRun")})]})})]});break;case Xn.processing:case Xn.processingReady:C=R.jsxs("div",{className:"wasm-prepare-processing-content",children:[R.jsx(pn,{size:"large",color:"primary"}),R.jsx("div",{className:"wasm-prepare-processing-text",children:V("preparingSplit")}),R.jsx("div",{className:"wasm-prepare-processing-warning",children:V("warningDuringPreparing")}),R.jsx("div",{className:"wasm-prepare-processing-cancel",children:R.jsxs(Pa,{children:[R.jsx(Pe,{type:"tertiary",onClick:()=>{p()},children:V("cancelPrepare")}),R.jsx(Pe,{type:"tertiary",onClick:()=>a(),children:V("backgroundRun")})]})})]});break;case Xn.success:case Xn.splitDone:C=R.jsxs("div",{className:"wasm-prepare-success-content",children:[R.jsx("div",{className:"wasm-prepare-success-text",children:V("preparingSplitSuccess")}),R.jsx("div",{className:"wasm-prepare-success-download",children:R.jsx(Pe,{type:"tertiary",onClick:()=>{_()},children:V("downloadPreparedWasmCode")})})]});break;case Xn.downloading:C=R.jsx(rce,{onHide:a});break;case Xn.downloadFailed:const w=c?.error?.message||"Unknown error";C=R.jsxs("div",{className:"wasm-prepare-downloadfailed-content",children:[R.jsx("div",{className:"wasm-prepare-downloadfailed-text",children:V("downloadFailed")}),R.jsx("div",{className:"wasm-prepare-downloadfailed-warning",children:w}),R.jsx(Pe,{onClick:_,children:V("retryDownload")})]});break;case Xn.failed:const x=c?.error?.message||"Unknown error";C=R.jsxs("div",{className:"wasm-prepare-failed-content",children:[R.jsx("div",{className:"wasm-prepare-failed-text",children:V("preparingSplitFailed")}),c?.data?.status===Xn.failed&&R.jsx("div",{className:"wasm-prepare-failed-warning",children:x}),R.jsx(Pe,{type:"tertiary",style:{marginTop:12},onClick:y,children:V("retryPrepare")})]});break;default:C=null}return R.jsx("div",{className:"wasm-prepare-content-container",children:C})},ice=({data:s})=>{const e={...s||{}},t=[{label:"Client key",value:"app_id"},{label:V("wasmSize"),value:"wasm_size",render:n=>`${(n/1024/1024).toFixed(2)} MB`},{label:V("totalFuncCount"),value:"total_wasm_func_count",render:n=>n>=1e3?`${(n/1e3).toFixed(2)} K`:`${n}`},{label:V("collectedFuncCount"),value:"collected_func_count",render:n=>n>=1e3?`${(n/1e3).toFixed(2)} K`:`${n}`},{label:"Wasm md5",value:"wasm_md5"}];return R.jsx("div",{className:"wasm-collect-status",children:t.map(n=>R.jsxs("div",{className:"wasm-collect-status-item",children:[R.jsx(zt,{size:"small",className:"wasm-collect-status-item-label",children:n.label}),R.jsx("span",{className:"wasm-collect-status-item-value",children:n.render?.(e[n.value])||e[n.value]})]},n.value))})},oce=({onNext:s,codeMd5:e,clientKey:t,onHide:n})=>{const{state:{devSchema:r}}=Qr(),[a,i]=T.useState("willCollect"),[o,c]=T.useState(),[h,f]=T.useState(),[p,y]=T.useState(0),v=T.useRef(null),_=T.useMemo(()=>!h||!h?.total_wasm_func_count?!1:(p||0)/(h?.total_wasm_func_count||0)>=.08,[h,p]);T.useEffect(()=>{if(a!=="collecting"){v.current&&(window.clearInterval(v.current),v.current=null);return}if(!v.current)return uR({codeMd5:e,clientKey:t}).then(w=>{y(w.data?.collected_func_count||0)}).catch(console.error),v.current=window.setInterval(()=>{uR({codeMd5:e,clientKey:t}).then(w=>{y(w.data?.collected_func_count||0)}).catch(w=>{console.error(w)})},2e3),()=>{v.current&&(window.clearInterval(v.current),v.current=null)}},[a,e,t]);const S=async()=>{if(a!=="collecting")try{i("startCollect");const w=await ece({codeMd5:e,clientKey:t});i("collecting"),Jle({codeMd5:e,clientKey:t}).then(x=>{c(x.data)}).catch(console.error),tce({codeMd5:e,clientKey:t}).then(x=>{f(x.data||{})}).catch(console.error)}catch(w){console.error(w)}},C=()=>{v.current&&(window.clearInterval(v.current),v.current=null),i("willCollect"),s()};return R.jsxs("div",{className:"wasm-collect-content-container",children:[o&&R.jsx(ice,{data:{...o||{},total_wasm_func_count:h?.total_wasm_func_count,collected_func_count:p}}),R.jsx("div",{className:"collect-qrcode-container",children:R.jsx(LC,{value:r})}),R.jsx("div",{className:"collect-qrcode-desc",children:V("collectDesc")}),R.jsxs("div",{className:"collect-qrcode-button-container",children:[a!=="collecting"&&R.jsx(Pe,{loading:a==="startCollect",onClick:S,children:V("startCollect")}),a==="collecting"&&R.jsxs(Pa,{children:[_?R.jsx(Pe,{type:"tertiary",onClick:C,children:V("startSplit")}):R.jsx(Cn,{content:V("cannotSplitTip"),children:R.jsx(Pe,{type:"tertiary",disabled:!0,children:V("startSplit")})}),R.jsx(Pe,{type:"tertiary",onClick:n,children:V("backgroundRun")})]})]})]})},lce=({onCancel:s,onHide:e})=>{const[t,n]=T.useState(""),[r,a]=T.useState("");T.useEffect(()=>{const h=f=>{n(f.status),a(f.errorMsg||"")};return qe.on("unitySplitStatus",h),()=>{qe.off("unitySplitStatus",h)}},[]);let i=null;const o="wasm-split-downloading-content",c="wasm-split-downloading-text";switch(t){case"start_download_android_main_wasm":case"download_android_main_wasm_done":case"start_compress_android_main_wasm":case"compress_android_main_wasm_done":case"start_download_android_sub_wasm_code":case"download_android_sub_wasm_code_done":case"start_compress_android_sub_wasm_code":case"compress_android_sub_wasm_code_done":case"start_download_ios_main_wasm":case"download_ios_main_wasm_done":case"start_compress_ios_main_wasm":case"compress_ios_main_wasm_done":case"start_download_ios_range_json":case"download_ios_range_json_done":case"start_download_ios_js_data_br":case"download_ios_js_data_br_done":case"start_compress_ios_sub_wasm_code":case"compress_ios_sub_wasm_code_done":case"start_write_splited_wasm_br":case"write_splited_wasm_done":case"start_update_wasm_split_config":case"update_wasm_split_config_done":i=R.jsxs("div",{className:o,children:[R.jsx(pn,{size:"large",color:"primary"}),R.jsx("div",{className:c,children:V(t)}),R.jsxs(Pa,{children:[R.jsx(Pe,{type:"danger",onClick:s,children:V("cancelSplit")}),R.jsx(Pe,{onClick:e,children:V("backgroundRun")})]})]});break;default:i=R.jsxs("div",{className:o,children:[R.jsx(pn,{size:"large",color:"primary"}),R.jsx("div",{className:c,children:V("processing")})]})}return i},fR=new AbortController,cce=({onCancel:s,onHide:e,codeMd5:t,clientKey:n})=>{const[r,a]=T.useState("spliting"),[i,o]=T.useState(),c=()=>{fR.abort(),s()},h=()=>{a("downloadingSplitResult"),Qle(i?.result).then(v=>{v.code===0?a("downloadSuccess"):a("downloadFailed")}).catch(()=>{a("downloadFailed")})},f=()=>{a("spliting"),Gle({codeMd5:t,clientKey:n}).then(v=>{v.code===0&&Zle({codeMd5:t,clientKey:n},{intervalMs:1e3,maxAttempts:1e3,signal:fR.signal}).then(_=>{a("splitSuccess"),p()})}).catch(()=>{a("splitFailed")})},p=()=>{a("startGetSplitResult"),Xle({clientKey:n,codeMd5:t}).then(v=>{v.code===0?(o(v.data),a("getSplitResultSuccess")):a("getSplitResultFailed")})};T.useEffect(()=>{f()},[]);let y=null;switch(r){case"spliting":y=R.jsxs("div",{className:"wasm-split-processing",children:[R.jsx(pn,{size:"large",color:"primary"}),R.jsx("div",{className:"wasm-split-processing-content",children:V("splittingDesc")}),R.jsx("div",{className:"wasm-split-processing-cancel",children:R.jsxs(Pa,{children:[R.jsx(Pe,{onClick:()=>c(),type:"danger",children:V("cancelSplit")}),R.jsx(Pe,{onClick:()=>e(),children:V("backgroundRun")})]})})]});break;case"splitSuccess":y=R.jsx("div",{className:"wasm-split-success",children:R.jsx("div",{className:"wasm-split-success-content",children:V("getSplitResult")})});break;case"startGetSplitResult":y=R.jsxs("div",{className:"wasm-split-processing",children:[R.jsx(pn,{}),R.jsx("div",{className:"wasm-split-processing-content",children:V("getSplitResult")})]});break;case"getSplitResultFailed":y=R.jsxs("div",{className:"wasm-split-failed",children:[R.jsx("div",{className:"wasm-split-failed-content",children:V("getSplitResultFailed")}),R.jsx("div",{className:"wasm-split-failed-retry",children:R.jsx(Pe,{type:"primary",onClick:()=>p(),children:V("retryGetSplitResult")})})]});break;case"getSplitResultSuccess":y=R.jsxs("div",{className:"wasm-split-success",children:[R.jsx("div",{className:"wasm-split-success-content",children:V("splitSuccess")}),R.jsx("div",{className:"wasm-split-success-download",children:R.jsx(Pe,{type:"primary",onClick:()=>h(),children:V("downloadSplitResult")})})]});break;case"getDownloadResultFailed":y=R.jsxs("div",{className:"wasm-split-failed",children:[R.jsx("div",{className:"wasm-split-failed-content",children:V("getSplitResultFailed")}),R.jsx("div",{className:"wasm-split-failed-retry",children:R.jsx(Pe,{type:"primary",onClick:()=>p(),children:V("retryGetSplitResult")})})]});break;case"downloadingSplitResult":y=R.jsx(lce,{onCancel:c,onHide:e});break;case"downloadSuccess":y=R.jsxs("div",{className:"wasm-split-success",children:[R.jsx("div",{className:"wasm-split-success-content",children:V("downloadSplitResultSuccess")}),R.jsx("div",{className:"wasm-split-success-tip",children:V("downloadSplitResultTip")})]});break;default:y=null}return R.jsx("div",{className:"wasm-split-content-container",children:y})},pf={prepare:{number:0,title:V("splitPrepare")},collect:{number:1,title:V("splitCollect")},split:{number:2,title:V("splitCode")},rollback:{number:3,title:V("rollback")}},uce=({stage:s})=>R.jsxs(Ji,{type:"basic",current:pf[s].number,style:{marginTop:24},children:[R.jsx(Ji.Step,{title:pf.prepare.title}),R.jsx(Ji.Step,{title:pf.collect.title}),R.jsx(Ji.Step,{title:pf.split.title})]}),dce=({onCancel:s,errorType:e,onHide:t})=>R.jsxs("div",{className:"wasm-code-split-error",children:[e==="noWasmCode"&&R.jsxs("div",{className:"wasm-code-split-error-container",children:[R.jsx("div",{className:"wasm-code-split-error-title",children:V("noWasmCode")}),R.jsx("div",{className:"wasm-code-split-error-desc",children:V("noWasmCodeDesc")})]}),e==="hasSplited"&&R.jsxs("div",{className:"wasm-code-split-error-container",children:[R.jsx("div",{className:"wasm-code-split-error-title",children:V("hasSplitedTitle")}),R.jsx("div",{className:"wasm-code-split-error-desc",children:V("hasSplitedDesc")}),R.jsxs(Pa,{children:[R.jsx(Pe,{onClick:s,children:V("cancelSplit")}),R.jsx(Pe,{onClick:t,children:V("backgroundRun")})]})]}),e==="noSplitConfig"&&R.jsxs("div",{className:"wasm-code-split-error-container",children:[R.jsx("div",{className:"wasm-code-split-error-title",children:V("noSplitConfigTitle")}),R.jsx("div",{className:"wasm-code-split-error-desc",children:V("noSplitConfigDesc")})]})]}),hce=()=>R.jsxs("div",{className:"split-loading",children:[R.jsx(pn,{size:"large",color:"primary"}),R.jsx("div",{className:"split-loading-text",children:"正在初始化分包环境"})]}),fce=({codeMd5:s,clientKey:e,codePath:t,onHide:n,onReset:r})=>{const[a,i]=T.useState("rollbacking"),o=()=>{i("rollbacking"),_5({codeMd5:s,clientKey:e,codePath:t}).then(f=>{f.code===0?(i("rollbackSuccess"),r()):i("rollbackFailed")})};T.useEffect(()=>{o()},[]);let c="",h=null;switch(a){case"rollbacking":c="回滚中...",h=R.jsx(Pe,{onClick:()=>{i("rollbackFailed")},children:"后台进行"});break;case"rollbackSuccess":c="回滚成功",h=R.jsx(Pe,{onClick:()=>{n()},children:"关闭"});break;case"rollbackFailed":c="回滚失败",h=R.jsx(Pe,{onClick:()=>{o()},children:"重试"});break}return R.jsx(R.Fragment,{children:R.jsxs("div",{className:"wasm-split-rollback-container",children:[R.jsx("div",{className:"wasm-split-rollback-text",children:c}),h]})})};function pce({enableWasmCollect:s,enableWasmSplit:e}){return typeof s=="boolean"&&(typeof e=="string"||e===!1)?s:!1}function gce({enableWasmSplit:s,hasWasmCode:e}){return s===!0?{errorType:"hasSplited",hasError:!0}:e?{hasError:!1}:{errorType:"noWasmCode",hasError:!0}}const mce=({codePath:s,clientKey:e,codeMd5:t})=>{const[n,r]=T.useState(!1),[a,i]=T.useState(""),[o,c]=T.useState("loading"),[h,f]=T.useState(null),p=()=>{r(!0),(!h||o==="error")&&(c("loading"),Hle({codeMd5:t,clientKey:e}).then(_=>{if(_.code===0){const{errorType:S,hasError:C}=gce({enableWasmSplit:_.data.enableWasmSplit,hasWasmCode:!!s});i(S),C?(i(S),c("error")):pce(_.data)?c("collect"):c("prepare"),f(_.data)}else c("error")}))},y=()=>{r(!1)},v=()=>{c("rollback")};return R.jsxs(R.Fragment,{children:[R.jsxs("div",{className:$("wasm-code-split",{}),onClick:p,children:[R.jsx(C7,{size:"default"}),R.jsx("span",{className:"wasm-code-split-text",children:V("wasmSplit")})]}),R.jsxs(Cr,{centered:!0,keepDOM:!0,maskClosable:!1,visible:n,footer:null,style:{width:"90%"},onCancel:()=>r(!1),onOk:()=>r(!1),title:V("wasmSplit"),children:[o==="loading"&&R.jsx(hce,{}),o==="error"&&R.jsx(dce,{errorType:a,onCancel:v,onHide:y}),o!=="error"&&o!=="loading"&&R.jsx(uce,{stage:o}),o==="prepare"&&R.jsx(ace,{codeMd5:t,codePath:s,clientKey:e,onCancel:()=>{r(!1)},onNext:()=>{c("collect")},onHide:y}),o==="collect"&&R.jsx(oce,{codeMd5:t,clientKey:e,onCancel:()=>{r(!1),c("prepare")},onHide:y,onNext:()=>{c("split")}}),o==="split"&&R.jsx(cce,{codeMd5:t,clientKey:e,onCancel:v,onHide:y}),o==="rollback"&&R.jsx(fce,{codeMd5:t,clientKey:e,codePath:s,onHide:y,onReset:()=>{c("prepare")}})]})]})},yce=()=>{const{state:{devToolVersion:s,engine:e,packages:t,gameDetail:n}}=Qr(),r=t?.find(o=>o.name==="wasmcode"),a=r?.root,i=r?.md5;return R.jsxs("div",{className:"header-wrapper",children:[R.jsxs("div",{className:"header-content",children:[R.jsxs("div",{className:"header-content-left",children:[R.jsx(Ale,{}),R.jsx(Ule,{version:s}),R.jsx(Fle,{})]}),R.jsx("div",{className:"header-content-right",children:R.jsxs(bo,{spacing:12,children:[R.jsx(Ble,{}),R.jsx(Mle,{}),e==="unity"&&R.jsx(mce,{codePath:a,codeMd5:i,clientKey:n?.client_key}),R.jsx(jle,{})]})})]}),R.jsx(eK,{})]})},vce=()=>(T.useEffect(()=>(pu.init(),()=>{pu.close()}),[]),null);function bce(){return R.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M8.48092 0.748384C8.16727 0.653859 7.83272 0.653859 7.51907 0.748384C7.30423 0.813133 7.13028 0.92386 6.97716 1.04125C6.83512 1.15015 6.67675 1.2924 6.50211 1.44927L2.21784 5.29713C2.00105 5.49145 1.80997 5.66273 1.66845 5.87532C1.54419 6.062 1.4522 6.26826 1.39635 6.48545C1.33275 6.73279 1.333 6.9894 1.33329 7.28054L1.33333 12.4241C1.33331 12.6835 1.3333 12.9169 1.34917 13.1111C1.36616 13.3191 1.40462 13.5401 1.51499 13.7567C1.67477 14.0703 1.92974 14.3253 2.24335 14.485C2.45995 14.5954 2.68093 14.6339 2.88891 14.6509C3.08312 14.6667 3.31653 14.6667 3.57591 14.6667H12.4241C12.6835 14.6667 12.9169 14.6667 13.1111 14.6509C13.3191 14.6339 13.54 14.5954 13.7566 14.485C14.0703 14.3253 14.3252 14.0703 14.485 13.7567C14.5954 13.5401 14.6338 13.3191 14.6508 13.1111C14.6667 12.9169 14.6667 12.6835 14.6667 12.4241L14.6667 7.28053C14.667 6.9894 14.6672 6.73279 14.6036 6.48545C14.5478 6.26826 14.4558 6.062 14.3315 5.87532C14.19 5.66273 13.9989 5.49145 13.7822 5.29713L9.49788 1.44927C9.32325 1.2924 9.16488 1.15015 9.02284 1.04125C8.86971 0.923861 8.69577 0.813133 8.48092 0.748384ZM7.90381 2.025C7.96654 2.0061 8.03345 2.0061 8.09618 2.025C8.09682 2.02519 8.10364 2.0272 8.11997 2.0364C8.13837 2.04678 8.16717 2.06534 8.21161 2.0994C8.30743 2.17287 8.42696 2.27959 8.62365 2.45625L12.8467 6.24917C13.1328 6.50615 13.1858 6.56032 13.2216 6.61414C13.263 6.67637 13.2937 6.74512 13.3123 6.81752C13.3284 6.88014 13.3333 6.95575 13.3333 7.34034V12.4C13.3333 12.6911 13.3328 12.8692 13.3219 13.0025C13.3168 13.0646 13.3105 13.1022 13.3051 13.125C13.3025 13.1359 13.3004 13.1426 13.2991 13.1462C13.2979 13.1496 13.2971 13.1511 13.297 13.1514C13.265 13.2141 13.214 13.2651 13.1513 13.297C13.1511 13.2972 13.1496 13.2979 13.1461 13.2991C13.1425 13.3004 13.1359 13.3026 13.125 13.3051C13.1022 13.3105 13.0646 13.3169 13.0025 13.322C12.8692 13.3328 12.691 13.3334 12.4 13.3334H8.66667V8.50008C8.66667 8.31599 8.51743 8.16675 8.33333 8.16675H7.66667C7.48257 8.16675 7.33333 8.31599 7.33333 8.50008V13.3334H3.6C3.30897 13.3334 3.13079 13.3328 2.99749 13.322C2.93539 13.3169 2.89781 13.3105 2.875 13.3051C2.86414 13.3026 2.85747 13.3004 2.85386 13.2991C2.85039 13.2979 2.84894 13.2972 2.84867 13.297C2.78595 13.2651 2.73495 13.2141 2.70299 13.1514C2.70291 13.1512 2.70256 13.1505 2.70199 13.1491C2.70168 13.1483 2.70131 13.1474 2.70088 13.1462C2.69959 13.1426 2.69745 13.1359 2.69489 13.125C2.68952 13.1022 2.68315 13.0646 2.67807 13.0025C2.66718 12.8692 2.66666 12.6911 2.66666 12.4V7.34034C2.66666 6.95575 2.67157 6.88014 2.68767 6.81752C2.70629 6.74512 2.73695 6.67637 2.77837 6.61414C2.8142 6.56032 2.86717 6.50615 3.1533 6.24917L7.37634 2.45625C7.57304 2.27959 7.69256 2.17287 7.78839 2.0994C7.83282 2.06534 7.86162 2.04678 7.88003 2.0364C7.89635 2.0272 7.90317 2.02519 7.90381 2.025Z",fill:"black",fillOpacity:"0.65"})})}const Cce=()=>R.jsx(kl,{svg:R.jsx(bce,{})});function Sce(){return R.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{d:"M5.33333 7.66675C5.14924 7.66675 5 7.51751 5 7.33341V6.66675C5 6.48265 5.14924 6.33341 5.33333 6.33341H10.6667C10.8508 6.33341 11 6.48265 11 6.66675V7.33341C11 7.51751 10.8508 7.66675 10.6667 7.66675H5.33333Z",fill:"black",fillOpacity:"0.65"}),R.jsx("path",{d:"M5.33333 10.6667C5.14924 10.6667 5 10.5175 5 10.3334V9.66675C5 9.48265 5.14924 9.33341 5.33333 9.33341H8.33333C8.51743 9.33341 8.66667 9.48265 8.66667 9.66675V10.3334C8.66667 10.5175 8.51743 10.6667 8.33333 10.6667H5.33333Z",fill:"black",fillOpacity:"0.65"}),R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.33333 0.666748C5.14924 0.666748 5 0.815986 5 1.00008V2.00013C4.01165 2.0009 3.49359 2.01346 3.09202 2.21807C2.71569 2.40982 2.40973 2.71578 2.21799 3.0921C2 3.51992 2 4.07998 2 5.20008V12.1334C2 13.2535 2 13.8136 2.21799 14.2414C2.40973 14.6177 2.71569 14.9237 3.09202 15.1154C3.51984 15.3334 4.0799 15.3334 5.2 15.3334H10.8C11.9201 15.3334 12.4802 15.3334 12.908 15.1154C13.2843 14.9237 13.5903 14.6177 13.782 14.2414C14 13.8136 14 13.2535 14 12.1334V5.20008C14 4.07998 14 3.51992 13.782 3.0921C13.5903 2.71578 13.2843 2.40982 12.908 2.21807C12.5064 2.01346 11.9883 2.0009 11 2.00013V1.00008C11 0.815986 10.8508 0.666748 10.6667 0.666748H10C9.81591 0.666748 9.66667 0.815986 9.66667 1.00008V2.00008H6.33333V1.00008C6.33333 0.815986 6.1841 0.666748 6 0.666748H5.33333ZM3.99498 3.35623C4.22961 3.33707 4.53372 3.33396 5 3.33349V4.00008C5 4.18418 5.14924 4.33341 5.33333 4.33341H6C6.1841 4.33341 6.33333 4.18418 6.33333 4.00008V3.33341H9.66667V4.00008C9.66667 4.18418 9.81591 4.33341 10 4.33341H10.6667C10.8508 4.33341 11 4.18418 11 4.00008V3.33349C11.4663 3.33396 11.7704 3.33707 12.005 3.35623C12.1292 3.36638 12.2044 3.37913 12.25 3.38988C12.2717 3.39499 12.2851 3.39927 12.2923 3.40185C12.2992 3.40432 12.3027 3.40608 12.3027 3.40608C12.4281 3.46999 12.5301 3.57198 12.594 3.69742C12.594 3.69742 12.5958 3.70087 12.5982 3.7078C12.6008 3.71502 12.6051 3.72837 12.6102 3.75008C12.621 3.79572 12.6337 3.87086 12.6438 3.99506C12.6656 4.26168 12.6667 4.61803 12.6667 5.20008V12.1334C12.6667 12.7155 12.6656 13.0718 12.6438 13.3384C12.6337 13.4626 12.621 13.5378 12.6102 13.5834C12.6051 13.6051 12.6008 13.6185 12.5982 13.6257C12.5969 13.6295 12.5958 13.632 12.5951 13.6337C12.5945 13.6351 12.594 13.6361 12.594 13.6361C12.5301 13.7615 12.4281 13.8635 12.3027 13.9274C12.3027 13.9274 12.2992 13.9292 12.2923 13.9316C12.2851 13.9342 12.2717 13.9385 12.25 13.9436C12.2044 13.9544 12.1292 13.9671 12.005 13.9773C11.7384 13.999 11.3821 14.0001 10.8 14.0001H5.2C4.61795 14.0001 4.26159 13.999 3.99498 13.9773C3.87078 13.9671 3.79563 13.9544 3.75 13.9436C3.72829 13.9385 3.71494 13.9342 3.70772 13.9316C3.70078 13.9292 3.69734 13.9274 3.69734 13.9274C3.5719 13.8635 3.46991 13.7615 3.406 13.6361C3.406 13.6361 3.40424 13.6326 3.40177 13.6257C3.39919 13.6185 3.39491 13.6051 3.38979 13.5834C3.37905 13.5378 3.3663 13.4626 3.35615 13.3384C3.33437 13.0718 3.33333 12.7155 3.33333 12.1334V5.20008C3.33333 4.61803 3.33437 4.26168 3.35615 3.99506C3.3663 3.87086 3.37905 3.79572 3.38979 3.75008C3.39491 3.72837 3.39919 3.71502 3.40177 3.7078C3.40424 3.70087 3.406 3.69742 3.406 3.69742C3.46991 3.57198 3.5719 3.46999 3.69734 3.40608C3.69734 3.40608 3.70078 3.40432 3.70772 3.40185C3.71494 3.39927 3.72829 3.39499 3.75 3.38988C3.79563 3.37913 3.87078 3.36638 3.99498 3.35623Z",fill:"black",fillOpacity:"0.65"})]})}const wce=()=>R.jsx(kl,{svg:R.jsx(Sce,{})});function _ce(){return R.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 7.16667C7.33518 7.16667 8.45466 6.24312 8.75446 5H14.6667C14.8508 5 15 4.85076 15 4.66667V4C15 3.81591 14.8508 3.66667 14.6667 3.66667H8.75446C8.45466 2.42355 7.33518 1.5 6 1.5C4.66482 1.5 3.54534 2.42355 3.24554 3.66667H1.33333C1.14924 3.66667 1 3.81591 1 4V4.66667C1 4.85076 1.14924 5 1.33333 5H3.24554C3.54534 6.24312 4.66482 7.16667 6 7.16667ZM7.5 4.33333C7.5 5.16176 6.82843 5.83333 6 5.83333C5.17157 5.83333 4.5 5.16176 4.5 4.33333C4.5 3.50491 5.17157 2.83333 6 2.83333C6.82843 2.83333 7.5 3.50491 7.5 4.33333Z",fill:"black",fillOpacity:"0.65"}),R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 14.5C11.3352 14.5 12.4547 13.5765 12.7545 12.3333H14.6667C14.8508 12.3333 15 12.1841 15 12V11.3333C15 11.1492 14.8508 11 14.6667 11H12.7545C12.4547 9.75688 11.3352 8.83333 10 8.83333C8.66482 8.83333 7.54534 9.75688 7.24554 11H1.33333C1.14924 11 1 11.1492 1 11.3333V12C1 12.1841 1.14924 12.3333 1.33333 12.3333H7.24554C7.54534 13.5765 8.66482 14.5 10 14.5ZM11.5 11.6667C11.5 12.4951 10.8284 13.1667 10 13.1667C9.17157 13.1667 8.5 12.4951 8.5 11.6667C8.5 10.8382 9.17157 10.1667 10 10.1667C10.8284 10.1667 11.5 10.8382 11.5 11.6667Z",fill:"black",fillOpacity:"0.65"})]})}const Ece=()=>R.jsx(kl,{svg:R.jsx(_ce,{})});function Oce(){return R.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{d:"M5.66666 2.66659C5.85076 2.66659 6 2.51735 6 2.33325V1.66659C6 1.48249 5.85076 1.33325 5.66666 1.33325H5.59999C4.10652 1.33325 3.35979 1.33325 2.78935 1.6239C2.28759 1.87956 1.87964 2.28751 1.62398 2.78928C1.33333 3.35971 1.33333 4.10645 1.33333 5.59992V5.66658C1.33333 5.85068 1.48257 5.99992 1.66666 5.99992H2.33333C2.51742 5.99992 2.66666 5.85068 2.66666 5.66658V5.59992C2.66666 4.83118 2.6677 4.33482 2.69856 3.95703C2.72816 3.59482 2.7784 3.46052 2.81199 3.3946C2.93982 3.14372 3.14379 2.93974 3.39467 2.81191C3.4606 2.77832 3.59489 2.72808 3.95711 2.69849C4.33489 2.66762 4.83126 2.66659 5.59999 2.66659H5.66666Z",fill:"black",fillOpacity:"0.65"}),R.jsx("path",{d:"M14.6667 5.66658C14.6667 5.85068 14.5174 5.99992 14.3333 5.99992H13.6667C13.4826 5.99992 13.3333 5.85068 13.3333 5.66658V5.59992C13.3333 4.83118 13.3323 4.33482 13.3014 3.95703C13.2718 3.59482 13.2216 3.46052 13.188 3.3946C13.0602 3.14372 12.8562 2.93974 12.6053 2.81191C12.5394 2.77832 12.4051 2.72808 12.0429 2.69849C11.6651 2.66762 11.1687 2.66659 10.4 2.66659H10.3333C10.1492 2.66659 10 2.51735 10 2.33325V1.66659C10 1.48249 10.1492 1.33325 10.3333 1.33325H10.4C11.8935 1.33325 12.6402 1.33325 13.2106 1.6239C13.7124 1.87956 14.1203 2.28751 14.376 2.78928C14.6667 3.35971 14.6667 4.10645 14.6667 5.59992V5.66658Z",fill:"black",fillOpacity:"0.65"}),R.jsx("path",{d:"M1.66666 9.99992C1.48257 9.99992 1.33333 10.1492 1.33333 10.3333V10.3999C1.33333 11.8934 1.33333 12.6401 1.62398 13.2106C1.87964 13.7123 2.28759 14.1203 2.78935 14.3759C3.35979 14.6666 4.10652 14.6666 5.59999 14.6666H5.66666C5.85076 14.6666 6 14.5173 6 14.3333V13.6666C6 13.4825 5.85076 13.3333 5.66666 13.3333H5.59999C4.83126 13.3333 4.33489 13.3322 3.95711 13.3013C3.59489 13.2718 3.4606 13.2215 3.39467 13.1879C3.14379 13.0601 2.93982 12.8561 2.81199 12.6052C2.7784 12.5393 2.72816 12.405 2.69856 12.0428C2.6677 11.665 2.66666 11.1687 2.66666 10.3999V10.3333C2.66666 10.1492 2.51742 9.99992 2.33333 9.99992H1.66666Z",fill:"black",fillOpacity:"0.65"}),R.jsx("path",{d:"M10.3333 13.3333C10.1492 13.3333 10 13.4825 10 13.6666V14.3333C10 14.5173 10.1492 14.6666 10.3333 14.6666H10.4C11.8935 14.6666 12.6402 14.6666 13.2106 14.3759C13.7124 14.1203 14.1203 13.7123 14.376 13.2106C14.6667 12.6401 14.6667 11.8934 14.6667 10.3999V10.3333C14.6667 10.1492 14.5174 9.99992 14.3333 9.99992H13.6667C13.4826 9.99992 13.3333 10.1492 13.3333 10.3333V10.3999C13.3333 11.1687 13.3323 11.665 13.3014 12.0428C13.2718 12.405 13.2216 12.5393 13.188 12.6052C13.0602 12.8561 12.8562 13.0601 12.6053 13.1879C12.5394 13.2215 12.4051 13.2718 12.0429 13.3013C11.6651 13.3322 11.1687 13.3333 10.4 13.3333H10.3333Z",fill:"black",fillOpacity:"0.65"}),R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.17159 10.1144C8.64463 10.4634 8.01272 10.6667 7.33333 10.6667C5.49238 10.6667 3.99999 9.17428 3.99999 7.33333C3.99999 5.49238 5.49238 4 7.33333 4C9.17428 4 10.6667 5.49238 10.6667 7.33333C10.6667 8.01272 10.4634 8.64464 10.1144 9.17159L11.7357 10.7929C11.8659 10.9231 11.8659 11.1341 11.7357 11.2643L11.2643 11.7357C11.1341 11.8659 10.9231 11.8659 10.7929 11.7357L9.17159 10.1144ZM9.33333 7.33333C9.33333 8.4379 8.4379 9.33333 7.33333 9.33333C6.22876 9.33333 5.33333 8.4379 5.33333 7.33333C5.33333 6.22876 6.22876 5.33333 7.33333 5.33333C8.4379 5.33333 9.33333 6.22876 9.33333 7.33333Z",fill:"black",fillOpacity:"0.65"})]})}const xce=()=>R.jsx(kl,{svg:R.jsx(Oce,{})}),iC=[{text:V("scanQRCode2Debug"),itemKey:"scan_qrcode",icon:R.jsx(Cce,{}),path:"/"},{itemKey:"launch_mode",text:V("launchMode"),icon:R.jsx(Ece,{}),path:"/launch_mode"},{itemKey:"precheck_code",text:V("codePreCheck"),icon:R.jsx(xce,{}),path:"/precheck_code"},{itemKey:"project_info",text:V("projectInfo"),icon:R.jsx(wce,{}),path:"/project_detail"},{itemKey:"changelog",text:V("changelog"),icon:R.jsx(j7,{size:"default",style:{fontWeight:"300",color:"#666"}}),path:"/changelog"}],Tce=()=>{const s=Gu(),[e,t]=T.useState("scan_qrcode"),n=r=>{const a=iC.find(i=>i.itemKey===r.itemKey);s(a.path),t(a.itemKey)};return T.useEffect(()=>{const r=window.location.pathname,a=iC.find(i=>i.path===r);t(a?a.itemKey:"")},[s]),R.jsx(Ra,{limitIndent:!1,bodyStyle:{height:"100vh",paddingLeft:"12px"},items:iC,selectedKeys:[e],onSelect:n})},Pce=()=>{const{state:{loading:s}}=Qr();return s.visible?R.jsx("div",{className:"loading-container",children:R.jsxs("div",{className:"loading-content",children:[R.jsx(pn,{size:"large"}),R.jsx("div",{className:"loading-text",children:s.text})]})}):null};function Ice(){const{state:{feature:s,loading:e,error:t},setSchema:n,showLoading:r,hideLoading:a,setError:i,setUser:o,setPackages:c,setGameDetail:h,setDevToolVersion:f,setEngine:p}=Qr(),[y,v]=T.useState(!1),[_,S]=T.useState("");T.useEffect(()=>{aie()},[]);const C=()=>{Ln({url:"/game/detail",method:"GET"}).then(w=>{if(w.error){a();const{errorCode:x,errorMsg:O}=w.error;h({client_key:w.error.clientKey,has_error:!0,error_msg:O,error_code:x}),x===404&&i({text:V("getDevGameDetailNotFound",{clientKey:w.error.clientKey})});return}else i({text:""}),h(w.data),a()})};return T.useEffect(()=>{r(),Ln({url:"/game/config",method:"GET"}).then(w=>{if(w.error)a(),i({visible:!0,text:V("getDevGameConfigFailed")+`: ${w.error.errorMsg}`}),v(!0),S(V("getDevGameConfigFailed")),console.log(`❌ ${V("getDevGameConfigFailed")}: ${w.error.errorMsg}`);else{console.log(`✅ ${V("getDevGameConfigSuccess")}`);const{schema:x,nodeWsPort:O,user:P,packages:D,devToolVersion:k,clientKey:N,engine:M}=w.data;n(x),ze.setMultiple({nodeWsPort:O,email:P?.email,clientKey:N}),o(P),f(k),c(D),p(M),a()}}),C()},[]),T.useEffect(()=>(qe.on("resourceChange",C),()=>{qe.off("resourceChange",C)}),[]),e.visible?R.jsx(Pce,{}):y?R.jsxs("div",{className:"server-error-container",children:[R.jsx(Sle,{}),R.jsx("div",{className:"server-error-text",children:_})]}):R.jsxs(Soe,{children:[t.text&&R.jsx(Ei,{description:t.text,type:"danger"}),R.jsx(vce,{}),R.jsxs("div",{className:"main-layout",children:[R.jsx(yce,{}),R.jsxs("div",{className:"content-wrapper",children:[s.sidebar.enable&&R.jsx(Tce,{}),R.jsx("div",{className:"routes-container",children:R.jsxs(Qie,{children:[R.jsx(Gi,{path:"/",element:R.jsx(Xoe,{})}),R.jsx(Gi,{path:"/project_detail",element:R.jsx(_le,{})}),R.jsx(Gi,{path:"/debug_setting",element:R.jsx(Qoe,{})}),R.jsx(Gi,{path:"/launch_mode",element:R.jsx(ele,{})}),R.jsx(Gi,{path:"/precheck_code",element:R.jsx(Dle,{})}),R.jsx(Gi,{path:"/changelog",element:R.jsx(kle,{})})]})})]})]})]})}CM.createRoot(document.getElementById("root")).render(R.jsx(FS,{children:R.jsx(lie,{children:R.jsx(Ice,{})})}));