@ttmg/cli 0.4.3 → 0.4.4-beta.1
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.
- package/CHANGELOG.md +277 -0
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/dist/package.json +5 -3
- package/dist/public/assets/{Detail-1nSjYvRw.js → Detail-5RBwvI1M.js} +1 -1
- package/dist/public/assets/Detail-5RBwvI1M.js.br +0 -0
- package/dist/public/assets/{MonetizationMode-hwWN5zUT.js → MonetizationMode-BNWhLbH4.js} +1 -1
- package/dist/public/assets/MonetizationModeSummary-3IFhpJtg.js +1 -0
- package/dist/public/assets/{SectionHeader-BL_bJf61.js → SectionHeader-4yiyPOgU.js} +1 -1
- package/dist/public/assets/{Tag-B4bSl-_E.js → Tag-BEGC7xBm.js} +1 -1
- package/dist/public/assets/{baseForm-zW5Gb1OH.js → baseForm-B46NsqNV.js} +1 -1
- package/dist/public/assets/baseForm-B46NsqNV.js.br +0 -0
- package/dist/public/assets/{col-vAurEPaC.js → col-DYNqjxgf.js} +1 -1
- package/dist/public/assets/{compass-DEadzu-v.js → compass-CDbv_4WN.js} +1 -1
- package/dist/public/assets/{index-DhK1XTMu.js → index-0ZXvsv6N.js} +1 -1
- package/dist/public/assets/{index-DpnThngH.js → index-B51es4GH.js} +1 -1
- package/dist/public/assets/{index-Bpx0cjfq.js → index-BRLaHgvx.js} +1 -1
- package/dist/public/assets/{index-wqj8y8SZ.js → index-BYIujYdU.js} +2 -2
- package/dist/public/assets/index-BYIujYdU.js.br +0 -0
- package/dist/public/assets/{index-qycdeV7S.js → index-BbwnUecN.js} +1 -1
- package/dist/public/assets/index-BbwnUecN.js.br +0 -0
- package/dist/public/assets/{index-BXllV1mP.js → index-Bv29rr8X.js} +1 -1
- package/dist/public/assets/index-Bv29rr8X.js.br +0 -0
- package/dist/public/assets/{index-Cw4SLGVh.js → index-C4FIEYze.js} +1 -1
- package/dist/public/assets/{index-Do7tPKef.js → index-CFIXkzUa.js} +1 -1
- package/dist/public/assets/{index-P3QtE2VP.js → index-CLjbrJ-V.js} +1 -1
- package/dist/public/assets/index-CLjbrJ-V.js.br +0 -0
- package/dist/public/assets/{index-DyHfBQPm.js → index-CMymGpPM.js} +1 -1
- package/dist/public/assets/{index-DVDX92Zz.js → index-CjpmMeus.js} +1 -1
- package/dist/public/assets/{index-BuiCnshQ.js → index-D7Ic_K5L.js} +1 -1
- package/dist/public/assets/{index-Dj0vBPuW.js → index-D7Min-ID.js} +1 -1
- package/dist/public/assets/{index-BJmPZor5.js → index-DZen0tWD.js} +1 -1
- package/dist/public/assets/{index-CozQgXOx.js → index-De6aUXHS.js} +1 -1
- package/dist/public/assets/index-De6aUXHS.js.br +0 -0
- package/dist/public/assets/{index-Dd2Oev0p.js → index-DotB5V_j.js} +1 -1
- package/dist/public/assets/{index-C2jjb4tf.js → index-DyFkQnHH.js} +1 -1
- package/dist/public/assets/{index-QtH0wQu1.js → index-FFm0ULGJ.js} +1 -1
- package/dist/public/assets/{index-CaArjQkD.js → index-UhNVLNJV.js} +1 -1
- package/dist/public/assets/index-UhNVLNJV.js.br +0 -0
- package/dist/public/assets/{index-C5k1IRcX.js → index-XHO2ciZ_.js} +1 -1
- package/dist/public/assets/index-XHO2ciZ_.js.br +0 -0
- package/dist/public/assets/{index-vuGJOmRn.js → index-fYRa-mFF.js} +1 -1
- package/dist/public/assets/{index-BCdOYP-_.js → index-k7bnci5q.js} +1 -1
- package/dist/public/assets/{index-ChtjciM4.js → index-knleXaJV.js} +1 -1
- package/dist/public/assets/index-knleXaJV.js.br +0 -0
- package/dist/public/assets/{index-Db3F1FgQ.js → index-orYk2UId.js} +1 -1
- package/dist/public/assets/{index-CHODjAYV.js → index-vdqYVp2k.js} +1 -1
- package/dist/public/assets/{layers-DDrUeTNf.js → layers-DFzVcSdo.js} +1 -1
- package/dist/public/assets/{list-checks-C4ci4EKo.js → list-checks-sBbjrB9b.js} +1 -1
- package/dist/public/assets/{sparkles-PwlPP_sT.js → sparkles-kUOwqZbi.js} +1 -1
- package/dist/public/assets/{triangle-alert-BAadCxAv.js → triangle-alert-DEb521qR.js} +1 -1
- package/dist/public/assets/{zap-CgIIDLY4.js → zap-4GR910dG.js} +1 -1
- package/dist/public/index.html +1 -1
- package/package.json +5 -3
- package/dist/public/assets/Detail-1nSjYvRw.js.br +0 -0
- package/dist/public/assets/MonetizationModeSummary-BmvxAKbI.js +0 -1
- package/dist/public/assets/baseForm-zW5Gb1OH.js.br +0 -0
- package/dist/public/assets/index-BXllV1mP.js.br +0 -0
- package/dist/public/assets/index-C5k1IRcX.js.br +0 -0
- package/dist/public/assets/index-CaArjQkD.js.br +0 -0
- package/dist/public/assets/index-ChtjciM4.js.br +0 -0
- package/dist/public/assets/index-CozQgXOx.js.br +0 -0
- package/dist/public/assets/index-P3QtE2VP.js.br +0 -0
- package/dist/public/assets/index-qycdeV7S.js.br +0 -0
- package/dist/public/assets/index-wqj8y8SZ.js.br +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BRLaHgvx.js","assets/index-DyFkQnHH.js","assets/index-BPf4cmgA.css","assets/index-4NS2mMuQ.css","assets/index-DotB5V_j.js","assets/index-C-tTmNa4.css","assets/index-fYRa-mFF.js","assets/baseForm-B46NsqNV.js","assets/col-DYNqjxgf.js","assets/col-BXewy14r.css","assets/index-Bv29rr8X.js","assets/index-BFPQPvSA.css","assets/baseForm-BAvk37jF.css","assets/index-D-GbEkoB.css","assets/index-CjpmMeus.js","assets/index-Crx61Qjc.css","assets/index-D7Min-ID.js","assets/index-DKxf26_O.css","assets/index-DZen0tWD.js","assets/compass-CDbv_4WN.js","assets/zap-4GR910dG.js","assets/index-BlG-Rcwd.css","assets/index-De6aUXHS.js","assets/SectionHeader-4yiyPOgU.js","assets/Tag-BEGC7xBm.js","assets/index-XHO2ciZ_.js","assets/triangle-alert-DEb521qR.js","assets/index-HqjZ5P-l.css","assets/index-0ZXvsv6N.js","assets/index-k7bnci5q.js","assets/index-FFm0ULGJ.js","assets/index-DXFg6tGR.css","assets/index-3FxbJxwu.css","assets/index-knleXaJV.js","assets/index-BdixrK5I.css","assets/index-D7Ic_K5L.js","assets/index-faRHENEQ.css","assets/index-C4FIEYze.js","assets/sparkles-kUOwqZbi.js","assets/index-DM7Cg9s9.css","assets/index-B51es4GH.js","assets/MonetizationModeSummary-3IFhpJtg.js","assets/index-vdqYVp2k.js","assets/index-Czg0RYGI.css","assets/layers-DFzVcSdo.js","assets/Detail-5RBwvI1M.js","assets/index-orYk2UId.js","assets/index-BaQ9eM95.css","assets/list-checks-sBbjrB9b.js","assets/MonetizationMode-BNWhLbH4.js","assets/index-CFIXkzUa.js","assets/index-AtMMzkp0.css","assets/index-BbwnUecN.js","assets/index-CLjbrJ-V.js","assets/index-CYnulX57.css","assets/index-vlN_-PRJ.css","assets/index-CMymGpPM.js","assets/index-DfVst8q1.css","assets/index-UhNVLNJV.js","assets/index-DBDUeSB8.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();var La=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xe(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var yu={exports:{}},Wo={},vu={exports:{}},Oe={};var bv;function fP(){if(bv)return Oe;bv=1;var i=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function S(I){return I===null||typeof I!="object"?null:(I=v&&I[v]||I["@@iterator"],typeof I=="function"?I:null)}var P={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,b={};function w(I,U,se){this.props=I,this.context=U,this.refs=b,this.updater=se||P}w.prototype.isReactComponent={},w.prototype.setState=function(I,U){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,U,"setState")},w.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function D(){}D.prototype=w.prototype;function O(I,U,se){this.props=I,this.context=U,this.refs=b,this.updater=se||P}var N=O.prototype=new D;N.constructor=O,T(N,w.prototype),N.isPureReactComponent=!0;var M=Array.isArray,F=Object.prototype.hasOwnProperty,j={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};function z(I,U,se){var re,oe={},_e=null,ye=null;if(U!=null)for(re in U.ref!==void 0&&(ye=U.ref),U.key!==void 0&&(_e=""+U.key),U)F.call(U,re)&&!L.hasOwnProperty(re)&&(oe[re]=U[re]);var ve=arguments.length-2;if(ve===1)oe.children=se;else if(1<ve){for(var Ce=Array(ve),be=0;be<ve;be++)Ce[be]=arguments[be+2];oe.children=Ce}if(I&&I.defaultProps)for(re in ve=I.defaultProps,ve)oe[re]===void 0&&(oe[re]=ve[re]);return{$$typeof:i,type:I,key:_e,ref:ye,props:oe,_owner:j.current}}function W(I,U){return{$$typeof:i,type:I.type,key:U,ref:I.ref,props:I.props,_owner:I._owner}}function H(I){return typeof I=="object"&&I!==null&&I.$$typeof===i}function K(I){var U={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(se){return U[se]})}var ie=/\/+/g;function ee(I,U){return typeof I=="object"&&I!==null&&I.key!=null?K(""+I.key):U.toString(36)}function ae(I,U,se,re,oe){var _e=typeof I;(_e==="undefined"||_e==="boolean")&&(I=null);var ye=!1;if(I===null)ye=!0;else switch(_e){case"string":case"number":ye=!0;break;case"object":switch(I.$$typeof){case i:case e:ye=!0}}if(ye)return ye=I,oe=oe(ye),I=re===""?"."+ee(ye,0):re,M(oe)?(se="",I!=null&&(se=I.replace(ie,"$&/")+"/"),ae(oe,U,se,"",function(be){return be})):oe!=null&&(H(oe)&&(oe=W(oe,se+(!oe.key||ye&&ye.key===oe.key?"":(""+oe.key).replace(ie,"$&/")+"/")+I)),U.push(oe)),1;if(ye=0,re=re===""?".":re+":",M(I))for(var ve=0;ve<I.length;ve++){_e=I[ve];var Ce=re+ee(_e,ve);ye+=ae(_e,U,se,Ce,oe)}else if(Ce=S(I),typeof Ce=="function")for(I=Ce.call(I),ve=0;!(_e=I.next()).done;)_e=_e.value,Ce=re+ee(_e,ve++),ye+=ae(_e,U,se,Ce,oe);else if(_e==="object")throw U=String(I),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.");return ye}function ne(I,U,se){if(I==null)return I;var re=[],oe=0;return ae(I,re,"","",function(_e){return U.call(se,_e,oe++)}),re}function ce(I){if(I._status===-1){var U=I._result;U=U(),U.then(function(se){(I._status===0||I._status===-1)&&(I._status=1,I._result=se)},function(se){(I._status===0||I._status===-1)&&(I._status=2,I._result=se)}),I._status===-1&&(I._status=0,I._result=U)}if(I._status===1)return I._result.default;throw I._result}var de={current:null},V={transition:null},Y={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:V,ReactCurrentOwner:j};return Oe.Children={map:ne,forEach:function(I,U,se){ne(I,function(){U.apply(this,arguments)},se)},count:function(I){var U=0;return ne(I,function(){U++}),U},toArray:function(I){return ne(I,function(U){return U})||[]},only:function(I){if(!H(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},Oe.Component=w,Oe.Fragment=n,Oe.Profiler=s,Oe.PureComponent=O,Oe.StrictMode=r,Oe.Suspense=p,Oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y,Oe.cloneElement=function(I,U,se){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var re=T({},I.props),oe=I.key,_e=I.ref,ye=I._owner;if(U!=null){if(U.ref!==void 0&&(_e=U.ref,ye=j.current),U.key!==void 0&&(oe=""+U.key),I.type&&I.type.defaultProps)var ve=I.type.defaultProps;for(Ce in U)F.call(U,Ce)&&!L.hasOwnProperty(Ce)&&(re[Ce]=U[Ce]===void 0&&ve!==void 0?ve[Ce]:U[Ce])}var Ce=arguments.length-2;if(Ce===1)re.children=se;else if(1<Ce){ve=Array(Ce);for(var be=0;be<Ce;be++)ve[be]=arguments[be+2];re.children=ve}return{$$typeof:i,type:I.type,key:oe,ref:_e,props:re,_owner:ye}},Oe.createContext=function(I){return I={$$typeof:c,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:l,_context:I},I.Consumer=I},Oe.createElement=z,Oe.createFactory=function(I){var U=z.bind(null,I);return U.type=I,U},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(I){return{$$typeof:u,render:I}},Oe.isValidElement=H,Oe.lazy=function(I){return{$$typeof:y,_payload:{_status:-1,_result:I},_init:ce}},Oe.memo=function(I,U){return{$$typeof:f,type:I,compare:U===void 0?null:U}},Oe.startTransition=function(I){var U=V.transition;V.transition={};try{I()}finally{V.transition=U}},Oe.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},Oe.useCallback=function(I,U){return de.current.useCallback(I,U)},Oe.useContext=function(I){return de.current.useContext(I)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(I){return de.current.useDeferredValue(I)},Oe.useEffect=function(I,U){return de.current.useEffect(I,U)},Oe.useId=function(){return de.current.useId()},Oe.useImperativeHandle=function(I,U,se){return de.current.useImperativeHandle(I,U,se)},Oe.useInsertionEffect=function(I,U){return de.current.useInsertionEffect(I,U)},Oe.useLayoutEffect=function(I,U){return de.current.useLayoutEffect(I,U)},Oe.useMemo=function(I,U){return de.current.useMemo(I,U)},Oe.useReducer=function(I,U,se){return de.current.useReducer(I,U,se)},Oe.useRef=function(I){return de.current.useRef(I)},Oe.useState=function(I){return de.current.useState(I)},Oe.useSyncExternalStore=function(I,U,se){return de.current.useSyncExternalStore(I,U,se)},Oe.useTransition=function(){return de.current.useTransition()},Oe.version="18.2.0",Oe}var Sv;function hs(){return Sv||(Sv=1,vu.exports=fP()),vu.exports}var wv;function hP(){if(wv)return Wo;wv=1;var i=hs(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(u,p,f){var y,v={},S=null,P=null;f!==void 0&&(S=""+f),p.key!==void 0&&(S=""+p.key),p.ref!==void 0&&(P=p.ref);for(y in p)r.call(p,y)&&!l.hasOwnProperty(y)&&(v[y]=p[y]);if(u&&u.defaultProps)for(y in p=u.defaultProps,p)v[y]===void 0&&(v[y]=p[y]);return{$$typeof:e,type:u,key:S,ref:P,props:v,_owner:s.current}}return Wo.Fragment=n,Wo.jsx=c,Wo.jsxs=c,Wo}var Cv;function gP(){return Cv||(Cv=1,yu.exports=hP()),yu.exports}var k=gP(),Aa={},bu={exports:{}},$t={},Su={exports:{}},wu={};var _v;function mP(){return _v||(_v=1,(function(i){function e(V,Y){var I=V.length;V.push(Y);e:for(;0<I;){var U=I-1>>>1,se=V[U];if(0<s(se,Y))V[U]=Y,V[I]=se,I=U;else break e}}function n(V){return V.length===0?null:V[0]}function r(V){if(V.length===0)return null;var Y=V[0],I=V.pop();if(I!==Y){V[0]=I;e:for(var U=0,se=V.length,re=se>>>1;U<re;){var oe=2*(U+1)-1,_e=V[oe],ye=oe+1,ve=V[ye];if(0>s(_e,I))ye<se&&0>s(ve,_e)?(V[U]=ve,V[ye]=I,U=ye):(V[U]=_e,V[oe]=I,U=oe);else if(ye<se&&0>s(ve,I))V[U]=ve,V[ye]=I,U=ye;else break e}}return Y}function s(V,Y){var I=V.sortIndex-Y.sortIndex;return I!==0?I:V.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;i.unstable_now=function(){return l.now()}}else{var c=Date,u=c.now();i.unstable_now=function(){return c.now()-u}}var p=[],f=[],y=1,v=null,S=3,P=!1,T=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(V){for(var Y=n(f);Y!==null;){if(Y.callback===null)r(f);else if(Y.startTime<=V)r(f),Y.sortIndex=Y.expirationTime,e(p,Y);else break;Y=n(f)}}function M(V){if(b=!1,N(V),!T)if(n(p)!==null)T=!0,ce(F);else{var Y=n(f);Y!==null&&de(M,Y.startTime-V)}}function F(V,Y){T=!1,b&&(b=!1,D(z),z=-1),P=!0;var I=S;try{for(N(Y),v=n(p);v!==null&&(!(v.expirationTime>Y)||V&&!K());){var U=v.callback;if(typeof U=="function"){v.callback=null,S=v.priorityLevel;var se=U(v.expirationTime<=Y);Y=i.unstable_now(),typeof se=="function"?v.callback=se:v===n(p)&&r(p),N(Y)}else r(p);v=n(p)}if(v!==null)var re=!0;else{var oe=n(f);oe!==null&&de(M,oe.startTime-Y),re=!1}return re}finally{v=null,S=I,P=!1}}var j=!1,L=null,z=-1,W=5,H=-1;function K(){return!(i.unstable_now()-H<W)}function ie(){if(L!==null){var V=i.unstable_now();H=V;var Y=!0;try{Y=L(!0,V)}finally{Y?ee():(j=!1,L=null)}}else j=!1}var ee;if(typeof O=="function")ee=function(){O(ie)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,ne=ae.port2;ae.port1.onmessage=ie,ee=function(){ne.postMessage(null)}}else ee=function(){w(ie,0)};function ce(V){L=V,j||(j=!0,ee())}function de(V,Y){z=w(function(){V(i.unstable_now())},Y)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(V){V.callback=null},i.unstable_continueExecution=function(){T||P||(T=!0,ce(F))},i.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<V?Math.floor(1e3/V):5},i.unstable_getCurrentPriorityLevel=function(){return S},i.unstable_getFirstCallbackNode=function(){return n(p)},i.unstable_next=function(V){switch(S){case 1:case 2:case 3:var Y=3;break;default:Y=S}var I=S;S=Y;try{return V()}finally{S=I}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(V,Y){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var I=S;S=V;try{return Y()}finally{S=I}},i.unstable_scheduleCallback=function(V,Y,I){var U=i.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?U+I:U):I=U,V){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=I+se,V={id:y++,callback:Y,priorityLevel:V,startTime:I,expirationTime:se,sortIndex:-1},I>U?(V.sortIndex=I,e(f,V),n(p)===null&&V===n(f)&&(b?(D(z),z=-1):b=!0,de(M,I-U))):(V.sortIndex=se,e(p,V),T||P||(T=!0,ce(F))),V},i.unstable_shouldYield=K,i.unstable_wrapCallback=function(V){var Y=S;return function(){var I=S;S=Y;try{return V.apply(this,arguments)}finally{S=I}}}})(wu)),wu}var kv;function yP(){return kv||(kv=1,Su.exports=mP()),Su.exports}var Pv;function vP(){if(Pv)return $t;Pv=1;var i=hs(),e=yP();function n(t){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+t,a=1;a<arguments.length;a++)o+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+t+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function l(t,o){c(t,o),c(t+"Capture",o)}function c(t,o){for(s[t]=o,t=0;t<o.length;t++)r.add(o[t])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,y={},v={};function S(t){return p.call(v,t)?!0:p.call(y,t)?!1:f.test(t)?v[t]=!0:(y[t]=!0,!1)}function P(t,o,a,d){if(a!==null&&a.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return d?!1:a!==null?!a.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function T(t,o,a,d){if(o===null||typeof o>"u"||P(t,o,a,d))return!0;if(d)return!1;if(a!==null)switch(a.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function b(t,o,a,d,h,m,_){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=d,this.attributeNamespace=h,this.mustUseProperty=a,this.propertyName=t,this.type=o,this.sanitizeURL=m,this.removeEmptyString=_}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){w[t]=new b(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var o=t[0];w[o]=new b(o,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){w[t]=new b(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){w[t]=new b(t,2,!1,t,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){w[t]=new b(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){w[t]=new b(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){w[t]=new b(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){w[t]=new b(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){w[t]=new b(t,5,!1,t.toLowerCase(),null,!1,!1)});var D=/[\-:]([a-z])/g;function O(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var o=t.replace(D,O);w[o]=new b(o,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var o=t.replace(D,O);w[o]=new b(o,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var o=t.replace(D,O);w[o]=new b(o,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){w[t]=new b(t,1,!1,t.toLowerCase(),null,!1,!1)}),w.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){w[t]=new b(t,1,!1,t.toLowerCase(),null,!0,!0)});function N(t,o,a,d){var h=w.hasOwnProperty(o)?w[o]:null;(h!==null?h.type!==0:d||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(T(o,a,h,d)&&(a=null),d||h===null?S(o)&&(a===null?t.removeAttribute(o):t.setAttribute(o,""+a)):h.mustUseProperty?t[h.propertyName]=a===null?h.type===3?!1:"":a:(o=h.attributeName,d=h.attributeNamespace,a===null?t.removeAttribute(o):(h=h.type,a=h===3||h===4&&a===!0?"":""+a,d?t.setAttributeNS(d,o,a):t.setAttribute(o,a))))}var M=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,F=Symbol.for("react.element"),j=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),K=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),ce=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),V=Symbol.iterator;function Y(t){return t===null||typeof t!="object"?null:(t=V&&t[V]||t["@@iterator"],typeof t=="function"?t:null)}var I=Object.assign,U;function se(t){if(U===void 0)try{throw Error()}catch(a){var o=a.stack.trim().match(/\n( *(at )?)/);U=o&&o[1]||""}return`
|
|
3
3
|
`+U+t}var re=!1;function oe(t,o){if(!t||re)return"";re=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(G){var d=G}Reflect.construct(t,[],o)}else{try{o.call()}catch(G){d=G}t.call(o.prototype)}else{try{throw Error()}catch(G){d=G}t()}}catch(G){if(G&&d&&typeof G.stack=="string"){for(var h=G.stack.split(`
|
|
4
4
|
`),m=d.stack.split(`
|
|
@@ -18,4 +18,4 @@ Error generating stack: `+m.message+`
|
|
|
18
18
|
</svg>
|
|
19
19
|
`);function xg(){return typeof window>"u"?new URLSearchParams:new URLSearchParams(window.location.search)}function Dl(){if(typeof window>"u")return!1;if(xg().get(AG)==="1")return!0;try{return window.localStorage.getItem(MG)==="1"}catch{return!1}}function Dg(){return xg().get($G)||"default"}function zG(i){const e=xg().get(FG);if(e==="en-US"||e==="zh-CN")return e;const n=i?.["X-TTMG-Docs-Lang"]||i?.["x-ttmg-docs-lang"];return n==="en-US"||n==="zh-CN"?n:"zh-CN"}function Og(){return Dg()==="wasm.prepare"}function BG(){return Dg()==="upload.permission-restricted"}function qG(i){try{return new URL(i,typeof window>"u"?"http://localhost":window.location.origin).pathname}catch{return i.split("?")[0]}}function GG(i){const e=zG(i),n=Og(),r=n?$0:M0;return{data:{schema:`snssdk1233://microapp?app_id=ttmg-doc-fixture&launch_from=devtool_docs&host=${Iw}&host_list=${encodeURIComponent(JSON.stringify([Iw]))}&port=3000&ws_port=2999`,nodeWsPort:4e3,nodeServerPort:3e3,nodeStaticBaseUrl:"http://127.0.0.1:3000",user:{user_id:"doc-user",email:"devtool-doc@example.com"},devToolVersion:"0.4.3",packages:r,engine:n?"unity":"cocos",clientKey:Rh,checkResult:[],lang:e}}}function WG(){const i=Og(),e=i?$0:M0,n={data:{name:i?"Unity Wasm Sample":"Coins Sort 20",client_key:Rh,size:e.reduce((r,s)=>r+s.size,0),description:"A sample mini game used for DevTool documentation screenshots.",icon_url:`data:image/svg+xml;charset=utf-8,${Rw}`,display_icon_url:`data:image/svg+xml;charset=utf-8,${Rw}`,created_at:1728e6,privacy_policy_link:"https://example.com/privacy",terms_of_service_link:"https://example.com/terms",request_allowed_domains:["https://api.example.com","https://assets.example.com"],sandbox_info:{sandbox_id:"doc-sandbox"},app_id:"ttmg-doc-fixture",packages:e,update_time:1728e6,scopes:["user.info.basic","im.share"]}};return BG()&&(n.error={errorCode:403,errorMsg:"The current account does not have permission for this game.",clientKey:Rh}),n}function UG({url:i,method:e,headers:n}){if(!Dl())return null;const r=qG(i),s=e.toUpperCase();return s==="GET"&&r==="/game/config"?GG(n):s==="GET"&&r==="/game/detail"?WG():s==="GET"&&r==="/game/wasm-split-config"&&Og()?{code:0,data:{enableWasmCollect:!1,enableWasmSplit:!1}}:r==="/game/config-fillback"?{isSuccess:!0,data:{}}:null}const HG=6e5,VG={error:{errorCode:-1,errorMsg:"Request failed"},isSuccess:!1,msg:"Request failed"},KG={error:{errorCode:-1,errorMsg:"Request timeout"},isSuccess:!1,msg:"Request timeout"};function Qi(i){const{url:e,method:n="GET",data:r=void 0,headers:s={},timeout:l=HG}=i;let c=e;const u={method:n,headers:{"Content-Type":"application/json",...s}};if(n.toUpperCase()==="GET"&&r){const v=new URLSearchParams(r).toString();c+=(c.includes("?")?"&":"?")+v}else r&&(u.body=JSON.stringify(r));const p=UG({url:c,method:n,headers:s});if(p)return Promise.resolve(p);const f=new AbortController,y=setTimeout(()=>f.abort(),l);return u.signal=f.signal,fetch(c,u).then(async v=>{if(!v.ok)return{error:{errorCode:-1,errorMsg:v.statusText},isSuccess:!1,msg:v.statusText};const S=v.headers.get("content-type");if(S&&S.includes("application/json"))try{const P=await v.text();return P.trim()?JSON.parse(P):{isSuccess:!0,data:{}}}catch(P){throw new Error(`Failed to parse JSON response: ${P instanceof Error?P.message:"Unknown error"}`)}else return v.text()}).catch(v=>v instanceof DOMException&&v.name==="AbortError"?KG:VG).finally(()=>{clearTimeout(y)})}const es={allowed_domains:[],client_key_type:2,stage:2,description:"TTMG Dev Game",entity:"",icon_big_url:"",icon_url:"",minis_category:"mini_game",minis_status:1,minis_tech_type:0,minis_type:2,scopes:["user.info.open_id","user.info.basic"],tos_url:"",update_time:Date.now(),status_code:0,status_msg:"",name:"TikTok Mini Game"};async function QG(i){const{scopes:e,update_time:n,display_icon_url:r,request_allowed_domains:s,name:l,terms_of_service_link:c,privacy_policy_link:u,description:p}=i||es,f=N0(),y={...es,tos_url:c,privacy_url:u,name:l||es.name,icon_url:r||es.icon_url,icon_big_url:r||es.icon_url,client_key:Pe.get("clientKey"),minis_url:`https://minis-${Pe.get("clientKey")}-vdebug-minigame.tiktok-minis.us/`,package_config:JSON.stringify({packages:Pe.get("packages")}),allowed_domains:s||[],status_code:0,status_msg:"",update_time:n,description:p,scopes:e};console.log(`🚀 ${x("startToSendMetaToClient")}`,y);const v=await Qi({url:`${f}/game/meta`,method:"POST",data:y,headers:{"Content-Type":"application/json"}});return console.log(`✅ ${x("sendMetaToClientSuccess")}`),v}async function Nw(){const i=document.getElementById(Eg);return new Promise(e=>{i.onload=()=>{i.onload=null,e(i)},i.contentWindow?.location.reload()})}const F0="debugMode";function Ig(i){return(i||"").trim().replace(/^v/i,"")}function XG(){const i=[Ua,Ha];try{const e=JSON.parse(localStorage.getItem(j0)||"[]");if(e.length){const n=e.filter(r=>r.id!==Ha.id).filter(r=>r.id!==Ua.id);return[Ua,...n,Ha]}else return i}catch{return i}}function YG(i){try{localStorage.setItem(j0,JSON.stringify(i))}catch(e){console.error("Failed to save launch options:",e)}}function ZG(i){try{localStorage.setItem(A0,JSON.stringify(i))}catch(e){console.error("Failed to save debug setting:",e)}}function JG(){const i={enableAdMock:!1,enableIAPMock:!1,enableDomainCheck:!0,enableVConsole:!1,enableDevInfoPanel:!0},e={enableAdMock:!1,enableIAPMock:!1,enableDomainCheck:!0,enableVConsole:!0,enableDevInfoPanel:!0},r=z0()===qn.browserDebug;try{const s=localStorage.getItem(A0);if(s){const l=JSON.parse(s);return r?{...l,enableVConsole:!1}:l}}catch(s){console.error("Failed to get debug setting:",s)}return r?i:e}function z0(){try{return B0()??qn.browserDebug}catch(i){return console.error("Failed to get debug mode:",i),qn.browserDebug}}function B0(){try{const i=localStorage.getItem(F0);return i&&Object.values(qn).includes(i)?i:null}catch(i){return console.error("Failed to get stored debug mode:",i),null}}function q0(i){try{localStorage.setItem(F0,i)}catch(e){console.error("Failed to save debug mode:",e)}}function eW(){try{return Ig(localStorage.getItem(L0))}catch(i){return console.error("Failed to get changelog last seen version:",i),""}}function tW(i){const e=Ig(i);if(e)try{localStorage.setItem(L0,e)}catch(n){console.error("Failed to save changelog last seen version:",n)}}function nW(i){const e=Ig(i);if(!e)return!1;const n=eW();return n?e!==n:!0}function rW(){const i={header:"font-weight:700;font-size:16px",subtitle:"font-weight:600;font-size:12px",desc:"font-size:12px",supportVersion:"font-size:12px; background:#FFE4B5;padding:1px 6px;border-radius:3px; color:#8B4513",tagBrowser:"background:#4F8BFF;color:#fff;border-radius:3px;padding:1px 6px",tagClient:"background:#22C55E;color:#fff;border-radius:3px;padding:1px 6px",bulletKey:"font-weight:600",bulletVal:"font-size:12px",tip:"font-size:12px;font-style:italic"},e={browserRemoteDebugDesc:x("browserRemoteDebugDesc"),clientRealPreviewDesc:x("clientRealPreviewDesc"),scanTips:x("debug.scan.tips"),browser:{title:x("debug.mode.browser.title"),points:{logic:x("debug.mode.browser.point.logic"),devtools:x("debug.mode.browser.point.devtools"),preview:x("debug.mode.browser.point.preview")}},client:{title:x("debug.mode.client.title"),supportVersion:x("debug.mode.client.supportVersion"),points:{logic:x("debug.mode.client.point.logic"),vconsole:x("debug.mode.client.point.vconsole"),preview:x("debug.mode.client.point.preview")}},customTip:x("debug.mode.custom.tip")};console.log("%c%s",i.header,`📌 ${x("debug.guide.header")}`),console.log("%c%s",i.desc,e.scanTips),console.group("%c%s %cBROWSER",i.subtitle,e.browser.title,i.tagBrowser),console.log("%c• %c%s",i.bulletKey,i.bulletVal,e.browser.points.logic),console.log("%c• %c%s",i.bulletKey,i.bulletVal,e.browser.points.devtools),console.log("%c• %c%s",i.bulletKey,i.bulletVal,e.browser.points.preview),console.groupEnd(),console.group("%c%s %cDEVICE",i.subtitle,e.client.title,i.tagClient),console.log("%c%s",i.supportVersion,e.client.supportVersion),console.log("%c• %c%s",i.bulletKey,i.bulletVal,e.client.points.logic),console.log("%c• %c%s",i.bulletKey,i.bulletVal,e.client.points.vconsole),console.log("%c• %c%s",i.bulletKey,i.bulletVal,e.client.points.preview),console.groupEnd(),console.log("%c💡 %s",i.tip,e.customTip)}const iW="ttmg.";function oW(i){return i===""||i==="1"||i==="true"}function G0(i){const e=iW+i;try{const n=new URLSearchParams(window.location.search);if(n.has(i)){const r=oW(n.get(i));try{r?sessionStorage.setItem(e,"1"):sessionStorage.removeItem(e)}catch{}return r}}catch{}try{return sessionStorage.getItem(e)==="1"}catch{return!1}}const sW=G0("enableExperiment"),aW=G0("enableLocalDev");function nV(){return sW}function rV(){return aW}function dh({baseSchema:i,option:e,debugMode:n}){if(e){const{scene:r,pkgName:s,queries:l}=e;let u=`${i}&debugMode=${n}&_tiktok_minis_params=${encodeURIComponent(JSON.stringify({enter_from:r,ttmg_init_module:s}))}`;if(l){const p=NG(l);p&&Object.keys(p).forEach(f=>{u+=`&${f}=${encodeURIComponent(p[f])}`})}return u}else return i}const lW=-1001;function Rg(i){return!!(i?.user_id||i?.email)}function Ng(i){const{errorCode:e,user:n}=i;return e===lW||e===0?"networkProxy":e?e===404?"notFound":e===403?"noPermission":e===401?Rg(n)?"loginExpired":"notLoggedIn":"unknown":"ok"}function cW(i){const{clientKey:e,errorMsg:n}=i,r=Ng(i);return r==="notFound"?x("getDevGameDetailNotFound",{clientKey:e}):r==="noPermission"?x("gameDetailNoPermission",{clientKey:e}):r==="loginExpired"?x("gameLoginExpired",{clientKey:e}):r==="networkProxy"?x("gameDetailNetworkProxyBlocked",{clientKey:e}):r==="notLoggedIn"?x("gameDetailNotLogin",{clientKey:e}):n||""}const W0="tt-theme";function uW(){try{const i=window.localStorage.getItem(W0);if(i==="light"||i==="dark")return i}catch{}return null}function dW(i){try{window.localStorage.setItem(W0,i)}catch{}}function pW(){const i=uW();return i||"light"}function U0(i){if(typeof document>"u")return;const e=document.documentElement,n=document.body;e.setAttribute("data-theme",i),n&&(n.setAttribute("data-theme",i),n.setAttribute("theme-mode",i))}function jw(i){U0(i),dW(i)}function fW(){return typeof document>"u"?"light":document.documentElement.getAttribute("data-theme")||"light"}function hW(){const i=pW();return U0(i),i}const gW={devToolVersion:"",engine:"unknown",isConnected:!1,hasSetup:!1,showManualBindIP:!1,debugMode:z0(),schema:"",devSchema:"",gameDetail:null,user:null,feature:{upload:!0,loginStatus:!0,debugSetting:!0,launchMode:!0,sidebar:{enable:!0,info:!1,launch:!1,setting:!1,log:!1,code:!1}},launchOptions:XG(),selectedLaunchOption:Ua,loading:{visible:!0,text:x("loading")},error:{text:""},message:{type:"info",title:x("disConnectionStatusTitle"),desc:x("disConnectionStatusDesc")},debugSetting:JG(),packages:[]};function mW(i,e){switch(e.type){case"SHOW_LOADING":return{...i,loading:{visible:!0,text:e.payload??x("loading")}};case"HIDE_LOADING":return{...i,loading:{...i.loading,visible:!1}};case"SET_MESSAGE":return{...i,message:e.payload};case"SET_IS_CONNECTED":return{...i,isConnected:e.payload};case"SET_SCHEMA":return{...i,schema:e.payload,devSchema:dh({baseSchema:e.payload,option:i.selectedLaunchOption,debugMode:i.debugMode})};case"CLEAR_MESSAGE":return{...i,message:{type:"info",title:"",desc:""}};case"SET_USER":return{...i,user:e.payload};case"SET_LAUNCH_OPTIONS":return YG(e.payload),{...i,launchOptions:e.payload};case"SET_SELECTED_LAUNCH_OPTION":return{...i,selectedLaunchOption:e.payload,devSchema:dh({baseSchema:i.schema,option:e.payload,debugMode:i.debugMode})};case"SET_PACKAGES":return{...i,packages:e.payload};case"SET_DEBUG_SETTING":return ZG(e.payload),{...i,debugSetting:e.payload};case"SET_GAME_DETAIL":return{...i,gameDetail:e.payload};case"SET_HAS_SETUP":return{...i,hasSetup:e.payload};case"SET_ERROR":return{...i,error:e.payload};case"SET_DEV_TOOL_VERSION":return{...i,devToolVersion:e.payload};case"SET_DEBUG_MODE":return{...i,debugMode:e.payload,devSchema:dh({baseSchema:i.schema,option:i.selectedLaunchOption,debugMode:e.payload})};case"SET_SHOW_MANUAL_BIND_IP":return{...i,showManualBindIP:e.payload};case"SET_ENGINE":return{...i,engine:e.payload};default:return i}}const yW=({children:i})=>{const[e,n]=E.useReducer(mW,gW),r=E.useCallback(j=>{n({type:"SET_IS_CONNECTED",payload:j})},[]),s=E.useCallback(j=>{n({type:"SHOW_LOADING",payload:j})},[]),l=E.useCallback(()=>{setTimeout(()=>{n({type:"HIDE_LOADING"})},500)},[]),c=E.useCallback(j=>{n({type:"SET_MESSAGE",payload:j})},[]),u=E.useCallback(()=>{n({type:"CLEAR_MESSAGE"})},[]),p=E.useCallback(j=>{n({type:"SET_SCHEMA",payload:j})},[]),f=E.useCallback(j=>{n({type:"SET_USER",payload:j})},[]),y=E.useCallback(j=>{n({type:"SET_LAUNCH_OPTIONS",payload:j})},[]),v=E.useCallback(j=>{n({type:"SET_SELECTED_LAUNCH_OPTION",payload:j})},[]),S=E.useCallback(j=>{n({type:"SET_DEBUG_SETTING",payload:j})},[]),P=E.useCallback(j=>{n({type:"SET_PACKAGES",payload:j})},[]),T=E.useCallback(j=>{n({type:"SET_GAME_DETAIL",payload:j})},[]),b=E.useCallback(j=>{n({type:"SET_HAS_SETUP",payload:j})},[]),w=E.useCallback(j=>{n({type:"SET_ERROR",payload:j})},[]),D=E.useCallback(j=>{n({type:"SET_DEV_TOOL_VERSION",payload:j})},[]),O=E.useCallback(j=>{n({type:"SET_DEBUG_MODE",payload:j})},[]),N=E.useCallback(j=>{n({type:"SET_SHOW_MANUAL_BIND_IP",payload:j})},[]),M=E.useCallback(j=>{n({type:"SET_ENGINE",payload:j})},[]),F=E.useMemo(()=>({state:e,showLoading:s,hideLoading:l,setIsConnected:r,setSchema:p,setMessage:c,clearMessage:u,setUser:f,setLaunchOptions:y,setSelectedLaunchOption:v,setDebugSetting:S,setPackages:P,setGameDetail:T,setHasSetup:b,setError:w,setDevToolVersion:D,setDebugMode:O,setShowManualBindIP:N,setEngine:M}),[e,s,l,r,p,c,u,f,y,v,S,P,T,b,w,D,O,N,M]);return k.jsx(Tg.Provider,{value:F,children:i})};var Lw="popstate";function Aw(i){return typeof i=="object"&&i!=null&&"pathname"in i&&"search"in i&&"hash"in i&&"state"in i&&"key"in i}function vW(i={}){function e(r,s){let l=s.state?.masked,{pathname:c,search:u,hash:p}=l||r.location;return Nh("",{pathname:c,search:u,hash:p},s.state&&s.state.usr||null,s.state&&s.state.key||"default",l?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,s){return typeof s=="string"?s:fs(s)}return SW(e,n,null,i)}function He(i,e){if(i===!1||i===null||typeof i>"u")throw new Error(e)}function kn(i,e){if(!i){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function bW(){return Math.random().toString(36).substring(2,10)}function Mw(i,e){return{usr:i.state,key:i.key,idx:e,masked:i.unstable_mask?{pathname:i.pathname,search:i.search,hash:i.hash}:void 0}}function Nh(i,e,n=null,r,s){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof e=="string"?no(e):e,state:n,key:e&&e.key||r||bW(),unstable_mask:s}}function fs({pathname:i="/",search:e="",hash:n=""}){return e&&e!=="?"&&(i+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(i+=n.charAt(0)==="#"?n:"#"+n),i}function no(i){let e={};if(i){let n=i.indexOf("#");n>=0&&(e.hash=i.substring(n),i=i.substring(0,n));let r=i.indexOf("?");r>=0&&(e.search=i.substring(r),i=i.substring(0,r)),i&&(e.pathname=i)}return e}function SW(i,e,n,r={}){let{window:s=document.defaultView,v5Compat:l=!1}=r,c=s.history,u="POP",p=null,f=y();f==null&&(f=0,c.replaceState({...c.state,idx:f},""));function y(){return(c.state||{idx:null}).idx}function v(){u="POP";let w=y(),D=w==null?null:w-f;f=w,p&&p({action:u,location:b.location,delta:D})}function S(w,D){u="PUSH";let O=Aw(w)?w:Nh(b.location,w,D);f=y()+1;let N=Mw(O,f),M=b.createHref(O.unstable_mask||O);try{c.pushState(N,"",M)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;s.location.assign(M)}l&&p&&p({action:u,location:b.location,delta:1})}function P(w,D){u="REPLACE";let O=Aw(w)?w:Nh(b.location,w,D);f=y();let N=Mw(O,f),M=b.createHref(O.unstable_mask||O);c.replaceState(N,"",M),l&&p&&p({action:u,location:b.location,delta:0})}function T(w){return wW(w)}let b={get action(){return u},get location(){return i(s,c)},listen(w){if(p)throw new Error("A history only accepts one active listener");return s.addEventListener(Lw,v),p=w,()=>{s.removeEventListener(Lw,v),p=null}},createHref(w){return e(s,w)},createURL:T,encodeLocation(w){let D=T(w);return{pathname:D.pathname,search:D.search,hash:D.hash}},push:S,replace:P,go(w){return c.go(w)}};return b}function wW(i,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),He(n,"No window.location.(origin|href) available to create URL");let r=typeof i=="string"?i:fs(i);return r=r.replace(/ $/,"%20"),!e&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function H0(i,e,n="/"){return CW(i,e,n,!1)}function CW(i,e,n,r){let s=typeof e=="string"?no(e):e,l=sr(s.pathname||"/",n);if(l==null)return null;let c=V0(i);_W(c);let u=null;for(let p=0;u==null&&p<c.length;++p){let f=jW(l);u=RW(c[p],f,r)}return u}function V0(i,e=[],n=[],r="",s=!1){let l=(c,u,p=s,f)=>{let y={relativePath:f===void 0?c.path||"":f,caseSensitive:c.caseSensitive===!0,childrenIndex:u,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(r)&&p)return;He(y.relativePath.startsWith(r),`Absolute route path "${y.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(r.length)}let v=zn([r,y.relativePath]),S=n.concat(y);c.children&&c.children.length>0&&(He(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),V0(c.children,e,S,v,p)),!(c.path==null&&!c.index)&&e.push({path:v,score:OW(v,c.index),routesMeta:S})};return i.forEach((c,u)=>{if(c.path===""||!c.path?.includes("?"))l(c,u);else for(let p of K0(c.path))l(c,u,!0,p)}),e}function K0(i){let e=i.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return s?[l,""]:[l];let c=K0(r.join("/")),u=[];return u.push(...c.map(p=>p===""?l:[l,p].join("/"))),s&&u.push(...c),u.map(p=>i.startsWith("/")&&p===""?"/":p)}function _W(i){i.sort((e,n)=>e.score!==n.score?n.score-e.score:IW(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var kW=/^:[\w-]+$/,PW=3,TW=2,EW=1,xW=10,DW=-2,$w=i=>i==="*";function OW(i,e){let n=i.split("/"),r=n.length;return n.some($w)&&(r+=DW),e&&(r+=TW),n.filter(s=>!$w(s)).reduce((s,l)=>s+(kW.test(l)?PW:l===""?EW:xW),r)}function IW(i,e){return i.length===e.length&&i.slice(0,-1).every((r,s)=>r===e[s])?i[i.length-1]-e[e.length-1]:0}function RW(i,e,n=!1){let{routesMeta:r}=i,s={},l="/",c=[];for(let u=0;u<r.length;++u){let p=r[u],f=u===r.length-1,y=l==="/"?e:e.slice(l.length)||"/",v=el({path:p.relativePath,caseSensitive:p.caseSensitive,end:f},y),S=p.route;if(!v&&f&&n&&!r[r.length-1].route.index&&(v=el({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!v)return null;Object.assign(s,v.params),c.push({params:s,pathname:zn([l,v.pathname]),pathnameBase:$W(zn([l,v.pathnameBase])),route:S}),v.pathnameBase!=="/"&&(l=zn([l,v.pathnameBase]))}return c}function el(i,e){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[n,r]=NW(i.path,i.caseSensitive,i.end),s=e.match(n);if(!s)return null;let l=s[0],c=l.replace(/(.)\/+$/,"$1"),u=s.slice(1);return{params:r.reduce((f,{paramName:y,isOptional:v},S)=>{if(y==="*"){let T=u[S]||"";c=l.slice(0,l.length-T.length).replace(/(.)\/+$/,"$1")}const P=u[S];return v&&!P?f[y]=void 0:f[y]=(P||"").replace(/%2F/g,"/"),f},{}),pathname:l,pathnameBase:c,pattern:i}}function NW(i,e=!1,n=!0){kn(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let r=[],s="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,u,p,f,y)=>{if(r.push({paramName:u,isOptional:p!=null}),p){let v=y.charAt(f+c.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(r.push({paramName:"*"}),s+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":i!==""&&i!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function jW(i){try{return i.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return kn(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),i}}function sr(i,e){if(e==="/")return i;if(!i.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=i.charAt(n);return r&&r!=="/"?null:i.slice(n)||"/"}var LW=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function AW(i,e="/"){let{pathname:n,search:r="",hash:s=""}=typeof i=="string"?no(i):i,l;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?l=Fw(n.substring(1),"/"):l=Fw(n,e)):l=e,{pathname:l,search:FW(r),hash:zW(s)}}function Fw(i,e){let n=e.replace(/\/+$/,"").split("/");return i.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function ph(i,e,n,r){return`Cannot include a '${i}' character in a manually specified \`to.${e}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function MW(i){return i.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function jg(i){let e=MW(i);return e.map((n,r)=>r===e.length-1?n.pathname:n.pathnameBase)}function Ol(i,e,n,r=!1){let s;typeof i=="string"?s=no(i):(s={...i},He(!s.pathname||!s.pathname.includes("?"),ph("?","pathname","search",s)),He(!s.pathname||!s.pathname.includes("#"),ph("#","pathname","hash",s)),He(!s.search||!s.search.includes("#"),ph("#","search","hash",s)));let l=i===""||s.pathname==="",c=l?"/":s.pathname,u;if(c==null)u=n;else{let v=e.length-1;if(!r&&c.startsWith("..")){let S=c.split("/");for(;S[0]==="..";)S.shift(),v-=1;s.pathname=S.join("/")}u=v>=0?e[v]:"/"}let p=AW(s,u),f=c&&c!=="/"&&c.endsWith("/"),y=(l||c===".")&&n.endsWith("/");return!p.pathname.endsWith("/")&&(f||y)&&(p.pathname+="/"),p}var zn=i=>i.join("/").replace(/\/\/+/g,"/"),$W=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),FW=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,zW=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,BW=class{constructor(i,e,n,r=!1){this.status=i,this.statusText=e||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function qW(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}function GW(i){return i.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Q0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function X0(i,e){let n=i;if(typeof n!="string"||!LW.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,s=!1;if(Q0)try{let l=new URL(window.location.href),c=n.startsWith("//")?new URL(l.protocol+n):new URL(n),u=sr(c.pathname,e);c.origin===l.origin&&u!=null?n=u+c.search+c.hash:s=!0}catch{kn(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:s,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Y0=["POST","PUT","PATCH","DELETE"];new Set(Y0);var WW=["GET",...Y0];new Set(WW);var ro=E.createContext(null);ro.displayName="DataRouter";var Il=E.createContext(null);Il.displayName="DataRouterState";var UW=E.createContext(!1),Z0=E.createContext({isTransitioning:!1});Z0.displayName="ViewTransition";var HW=E.createContext(new Map);HW.displayName="Fetchers";var VW=E.createContext(null);VW.displayName="Await";var Jt=E.createContext(null);Jt.displayName="Navigation";var _s=E.createContext(null);_s.displayName="Location";var En=E.createContext({outlet:null,matches:[],isDataRoute:!1});En.displayName="Route";var Lg=E.createContext(null);Lg.displayName="RouteError";var J0="REACT_ROUTER_ERROR",KW="REDIRECT",QW="ROUTE_ERROR_RESPONSE";function XW(i){if(i.startsWith(`${J0}:${KW}:{`))try{let e=JSON.parse(i.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function YW(i){if(i.startsWith(`${J0}:${QW}:{`))try{let e=JSON.parse(i.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new BW(e.status,e.statusText,e.data)}catch{}}function ZW(i,{relative:e}={}){He(io(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=E.useContext(Jt),{hash:s,pathname:l,search:c}=Ps(i,{relative:e}),u=l;return n!=="/"&&(u=l==="/"?n:zn([n,l])),r.createHref({pathname:u,search:c,hash:s})}function io(){return E.useContext(_s)!=null}function lr(){return He(io(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(_s).location}var e_="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function t_(i){E.useContext(Jt).static||E.useLayoutEffect(i)}function ks(){let{isDataRoute:i}=E.useContext(En);return i?dU():JW()}function JW(){He(io(),"useNavigate() may be used only in the context of a <Router> component.");let i=E.useContext(ro),{basename:e,navigator:n}=E.useContext(Jt),{matches:r}=E.useContext(En),{pathname:s}=lr(),l=JSON.stringify(jg(r)),c=E.useRef(!1);return t_(()=>{c.current=!0}),E.useCallback((p,f={})=>{if(kn(c.current,e_),!c.current)return;if(typeof p=="number"){n.go(p);return}let y=Ol(p,JSON.parse(l),s,f.relative==="path");i==null&&e!=="/"&&(y.pathname=y.pathname==="/"?e:zn([e,y.pathname])),(f.replace?n.replace:n.push)(y,f.state,f)},[e,n,l,s,i])}E.createContext(null);function iV(){let{matches:i}=E.useContext(En),e=i[i.length-1];return e?e.params:{}}function Ps(i,{relative:e}={}){let{matches:n}=E.useContext(En),{pathname:r}=lr(),s=JSON.stringify(jg(n));return E.useMemo(()=>Ol(i,JSON.parse(s),r,e==="path"),[i,s,r,e])}function eU(i,e){return n_(i,e)}function n_(i,e,n){He(io(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=E.useContext(Jt),{matches:s}=E.useContext(En),l=s[s.length-1],c=l?l.params:{},u=l?l.pathname:"/",p=l?l.pathnameBase:"/",f=l&&l.route;{let w=f&&f.path||"";i_(u,!f||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${w}">) 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.
|
|
20
20
|
|
|
21
|
-
Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let y=lr(),v;if(e){let w=typeof e=="string"?no(e):e;He(p==="/"||w.pathname?.startsWith(p),`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 "${p}" but pathname "${w.pathname}" was given in the \`location\` prop.`),v=w}else v=y;let S=v.pathname||"/",P=S;if(p!=="/"){let w=p.replace(/^\//,"").split("/");P="/"+S.replace(/^\//,"").split("/").slice(w.length).join("/")}let T=H0(i,{pathname:P});kn(f||T!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),kn(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.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 b=oU(T&&T.map(w=>Object.assign({},w,{params:Object.assign({},c,w.params),pathname:zn([p,r.encodeLocation?r.encodeLocation(w.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?p:zn([p,r.encodeLocation?r.encodeLocation(w.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),s,n);return e&&b?E.createElement(_s.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...v},navigationType:"POP"}},b):b}function tU(){let i=uU(),e=qW(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),n=i instanceof Error?i.stack:null,r="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:r},l={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",i),c=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:l},"ErrorBoundary")," or"," ",E.createElement("code",{style:l},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},e),n?E.createElement("pre",{style:s},n):null,c)}var nU=E.createElement(tU,null),r_=class extends E.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,e){return e.location!==i.location||e.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:e.error,location:e.location,revalidation:i.revalidation||e.revalidation}}componentDidCatch(i,e){this.props.onError?this.props.onError(i,e):console.error("React Router caught the following error during render",i)}render(){let i=this.state.error;if(this.context&&typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){const n=YW(i.digest);n&&(i=n)}let e=i!==void 0?E.createElement(En.Provider,{value:this.props.routeContext},E.createElement(Lg.Provider,{value:i,children:this.props.component})):this.props.children;return this.context?E.createElement(rU,{error:i},e):e}};r_.contextType=UW;var fh=new WeakMap;function rU({children:i,error:e}){let{basename:n}=E.useContext(Jt);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=XW(e.digest);if(r){let s=fh.get(e);if(s)throw s;let l=X0(r.location,n);if(Q0&&!fh.get(e))if(l.isExternal||r.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:r.replace}));throw fh.set(e,c),c}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return i}function iU({routeContext:i,match:e,children:n}){let r=E.useContext(ro);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),E.createElement(En.Provider,{value:i},n)}function oU(i,e=[],n){let r=n?.state;if(i==null){if(!r)return null;if(r.errors)i=r.matches;else if(e.length===0&&!r.initialized&&r.matches.length>0)i=r.matches;else return null}let s=i,l=r?.errors;if(l!=null){let y=s.findIndex(v=>v.route.id&&l?.[v.route.id]!==void 0);He(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),s=s.slice(0,Math.min(s.length,y+1))}let c=!1,u=-1;if(n&&r){c=r.renderFallback;for(let y=0;y<s.length;y++){let v=s[y];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(u=y),v.route.id){let{loaderData:S,errors:P}=r,T=v.route.loader&&!S.hasOwnProperty(v.route.id)&&(!P||P[v.route.id]===void 0);if(v.route.lazy||T){n.isStatic&&(c=!0),u>=0?s=s.slice(0,u+1):s=[s[0]];break}}}}let p=n?.onError,f=r&&p?(y,v)=>{p(y,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:GW(r.matches),errorInfo:v})}:void 0;return s.reduceRight((y,v,S)=>{let P,T=!1,b=null,w=null;r&&(P=l&&v.route.id?l[v.route.id]:void 0,b=v.route.errorElement||nU,c&&(u<0&&S===0?(i_("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),T=!0,w=null):u===S&&(T=!0,w=v.route.hydrateFallbackElement||null)));let D=e.concat(s.slice(0,S+1)),O=()=>{let N;return P?N=b:T?N=w:v.route.Component?N=E.createElement(v.route.Component,null):v.route.element?N=v.route.element:N=y,E.createElement(iU,{match:v,routeContext:{outlet:y,matches:D,isDataRoute:r!=null},children:N})};return r&&(v.route.ErrorBoundary||v.route.errorElement||S===0)?E.createElement(r_,{location:r.location,revalidation:r.revalidation,component:b,error:P,children:O(),routeContext:{outlet:null,matches:D,isDataRoute:!0},onError:f}):O()},null)}function Ag(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sU(i){let e=E.useContext(ro);return He(e,Ag(i)),e}function aU(i){let e=E.useContext(Il);return He(e,Ag(i)),e}function lU(i){let e=E.useContext(En);return He(e,Ag(i)),e}function Mg(i){let e=lU(i),n=e.matches[e.matches.length-1];return He(n.route.id,`${i} can only be used on routes that contain a unique "id"`),n.route.id}function cU(){return Mg("useRouteId")}function uU(){let i=E.useContext(Lg),e=aU("useRouteError"),n=Mg("useRouteError");return i!==void 0?i:e.errors?.[n]}function dU(){let{router:i}=sU("useNavigate"),e=Mg("useNavigate"),n=E.useRef(!1);return t_(()=>{n.current=!0}),E.useCallback(async(s,l={})=>{kn(n.current,e_),n.current&&(typeof s=="number"?await i.navigate(s):await i.navigate(s,{fromRouteId:e,...l}))},[i,e])}var zw={};function i_(i,e,n){!e&&!zw[i]&&(zw[i]=!0,kn(!1,n))}E.memo(pU);function pU({routes:i,future:e,state:n,isStatic:r,onError:s}){return n_(i,void 0,{state:n,isStatic:r,onError:s})}function hh({to:i,replace:e,state:n,relative:r}){He(io(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=E.useContext(Jt);kn(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:l}=E.useContext(En),{pathname:c}=lr(),u=ks(),p=Ol(i,jg(l),c,r==="path"),f=JSON.stringify(p);return E.useEffect(()=>{u(JSON.parse(f),{replace:e,state:n,relative:r})},[u,f,r,e,n]),null}function st(i){He(!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 fU({basename:i="/",children:e=null,location:n,navigationType:r="POP",navigator:s,static:l=!1,unstable_useTransitions:c}){He(!io(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=i.replace(/^\/*/,"/"),p=E.useMemo(()=>({basename:u,navigator:s,static:l,unstable_useTransitions:c,future:{}}),[u,s,l,c]);typeof n=="string"&&(n=no(n));let{pathname:f="/",search:y="",hash:v="",state:S=null,key:P="default",unstable_mask:T}=n,b=E.useMemo(()=>{let w=sr(f,u);return w==null?null:{location:{pathname:w,search:y,hash:v,state:S,key:P,unstable_mask:T},navigationType:r}},[u,f,y,v,S,P,r,T]);return kn(b!=null,`<Router basename="${u}"> is not able to match the URL "${f}${y}${v}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:E.createElement(Jt.Provider,{value:p},E.createElement(_s.Provider,{children:e,value:b}))}function hU({children:i,location:e}){return eU(jh(i),e)}function jh(i,e=[]){let n=[];return E.Children.forEach(i,(r,s)=>{if(!E.isValidElement(r))return;let l=[...e,s];if(r.type===E.Fragment){n.push.apply(n,jh(r.props.children,l));return}He(r.type===st,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),He(!r.props.index||!r.props.children,"An index route cannot have child routes.");let c={id:r.props.id||l.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(c.children=jh(r.props.children,l)),n.push(c)}),n}var Va="get",Ka="application/x-www-form-urlencoded";function Rl(i){return typeof HTMLElement<"u"&&i instanceof HTMLElement}function gU(i){return Rl(i)&&i.tagName.toLowerCase()==="button"}function mU(i){return Rl(i)&&i.tagName.toLowerCase()==="form"}function yU(i){return Rl(i)&&i.tagName.toLowerCase()==="input"}function vU(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function bU(i,e){return i.button===0&&(!e||e==="_self")&&!vU(i)}var za=null;function SU(){if(za===null)try{new FormData(document.createElement("form"),0),za=!1}catch{za=!0}return za}var wU=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gh(i){return i!=null&&!wU.has(i)?(kn(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ka}"`),null):i}function CU(i,e){let n,r,s,l,c;if(mU(i)){let u=i.getAttribute("action");r=u?sr(u,e):null,n=i.getAttribute("method")||Va,s=gh(i.getAttribute("enctype"))||Ka,l=new FormData(i)}else if(gU(i)||yU(i)&&(i.type==="submit"||i.type==="image")){let u=i.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=i.getAttribute("formaction")||u.getAttribute("action");if(r=p?sr(p,e):null,n=i.getAttribute("formmethod")||u.getAttribute("method")||Va,s=gh(i.getAttribute("formenctype"))||gh(u.getAttribute("enctype"))||Ka,l=new FormData(u,i),!SU()){let{name:f,type:y,value:v}=i;if(y==="image"){let S=f?`${f}.`:"";l.append(`${S}x`,"0"),l.append(`${S}y`,"0")}else f&&l.append(f,v)}}else{if(Rl(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Va,r=null,s=Ka,c=i}return l&&s==="text/plain"&&(c=l,l=void 0),{action:r,method:n.toLowerCase(),encType:s,formData:l,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function $g(i,e){if(i===!1||i===null||typeof i>"u")throw new Error(e)}function _U(i,e,n,r){let s=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${r}`:s.pathname=`${s.pathname}.${r}`:s.pathname==="/"?s.pathname=`_root.${r}`:e&&sr(s.pathname,e)==="/"?s.pathname=`${e.replace(/\/$/,"")}/_root.${r}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${r}`,s}async function kU(i,e){if(i.id in e)return e[i.id];try{let n=await import(i.module);return e[i.id]=n,n}catch(n){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function PU(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function TU(i,e,n){let r=await Promise.all(i.map(async s=>{let l=e.routes[s.route.id];if(l){let c=await kU(l,n);return c.links?c.links():[]}return[]}));return OU(r.flat(1).filter(PU).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Bw(i,e,n,r,s,l){let c=(p,f)=>n[f]?p.route.id!==n[f].route.id:!0,u=(p,f)=>n[f].pathname!==p.pathname||n[f].route.path?.endsWith("*")&&n[f].params["*"]!==p.params["*"];return l==="assets"?e.filter((p,f)=>c(p,f)||u(p,f)):l==="data"?e.filter((p,f)=>{let y=r.routes[p.route.id];if(!y||!y.hasLoader)return!1;if(c(p,f)||u(p,f))return!0;if(p.route.shouldRevalidate){let v=p.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(i,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function EU(i,e,{includeHydrateFallback:n}={}){return xU(i.map(r=>{let s=e.routes[r.route.id];if(!s)return[];let l=[s.module];return s.clientActionModule&&(l=l.concat(s.clientActionModule)),s.clientLoaderModule&&(l=l.concat(s.clientLoaderModule)),n&&s.hydrateFallbackModule&&(l=l.concat(s.hydrateFallbackModule)),s.imports&&(l=l.concat(s.imports)),l}).flat(1))}function xU(i){return[...new Set(i)]}function DU(i){let e={},n=Object.keys(i).sort();for(let r of n)e[r]=i[r];return e}function OU(i,e){let n=new Set;return new Set(e),i.reduce((r,s)=>{let l=JSON.stringify(DU(s));return n.has(l)||(n.add(l),r.push({key:l,link:s})),r},[])}function o_(){let i=E.useContext(ro);return $g(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function IU(){let i=E.useContext(Il);return $g(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var Fg=E.createContext(void 0);Fg.displayName="FrameworkContext";function s_(){let i=E.useContext(Fg);return $g(i,"You must render this element inside a <HydratedRouter> element"),i}function RU(i,e){let n=E.useContext(Fg),[r,s]=E.useState(!1),[l,c]=E.useState(!1),{onFocus:u,onBlur:p,onMouseEnter:f,onMouseLeave:y,onTouchStart:v}=e,S=E.useRef(null);E.useEffect(()=>{if(i==="render"&&c(!0),i==="viewport"){let b=D=>{D.forEach(O=>{c(O.isIntersecting)})},w=new IntersectionObserver(b,{threshold:.5});return S.current&&w.observe(S.current),()=>{w.disconnect()}}},[i]),E.useEffect(()=>{if(r){let b=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(b)}}},[r]);let P=()=>{s(!0)},T=()=>{s(!1),c(!1)};return n?i!=="intent"?[l,S,{}]:[l,S,{onFocus:ts(u,P),onBlur:ts(p,T),onMouseEnter:ts(f,P),onMouseLeave:ts(y,T),onTouchStart:ts(v,P)}]:[!1,S,{}]}function ts(i,e){return n=>{i&&i(n),n.defaultPrevented||e(n)}}function NU({page:i,...e}){let{router:n}=o_(),r=E.useMemo(()=>H0(n.routes,i,n.basename),[n.routes,i,n.basename]);return r?E.createElement(LU,{page:i,matches:r,...e}):null}function jU(i){let{manifest:e,routeModules:n}=s_(),[r,s]=E.useState([]);return E.useEffect(()=>{let l=!1;return TU(i,e,n).then(c=>{l||s(c)}),()=>{l=!0}},[i,e,n]),r}function LU({page:i,matches:e,...n}){let r=lr(),{future:s,manifest:l,routeModules:c}=s_(),{basename:u}=o_(),{loaderData:p,matches:f}=IU(),y=E.useMemo(()=>Bw(i,e,f,l,r,"data"),[i,e,f,l,r]),v=E.useMemo(()=>Bw(i,e,f,l,r,"assets"),[i,e,f,l,r]),S=E.useMemo(()=>{if(i===r.pathname+r.search+r.hash)return[];let b=new Set,w=!1;if(e.forEach(O=>{let N=l.routes[O.route.id];!N||!N.hasLoader||(!y.some(M=>M.route.id===O.route.id)&&O.route.id in p&&c[O.route.id]?.shouldRevalidate||N.hasClientLoader?w=!0:b.add(O.route.id))}),b.size===0)return[];let D=_U(i,u,s.unstable_trailingSlashAwareDataRequests,"data");return w&&b.size>0&&D.searchParams.set("_routes",e.filter(O=>b.has(O.route.id)).map(O=>O.route.id).join(",")),[D.pathname+D.search]},[u,s.unstable_trailingSlashAwareDataRequests,p,r,l,y,e,i,c]),P=E.useMemo(()=>EU(v,l),[v,l]),T=jU(v);return E.createElement(E.Fragment,null,S.map(b=>E.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...n})),P.map(b=>E.createElement("link",{key:b,rel:"modulepreload",href:b,...n})),T.map(({key:b,link:w})=>E.createElement("link",{key:b,nonce:n.nonce,...w,crossOrigin:w.crossOrigin??n.crossOrigin})))}function AU(...i){return e=>{i.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var MU=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{MU&&(window.__reactRouterVersion="7.13.1")}catch{}function $U({basename:i,children:e,unstable_useTransitions:n,window:r}){let s=E.useRef();s.current==null&&(s.current=vW({window:r,v5Compat:!0}));let l=s.current,[c,u]=E.useState({action:l.action,location:l.location}),p=E.useCallback(f=>{n===!1?u(f):E.startTransition(()=>u(f))},[n]);return E.useLayoutEffect(()=>l.listen(p),[l,p]),E.createElement(fU,{basename:i,children:e,location:c.location,navigationType:c.action,navigator:l,unstable_useTransitions:n})}var a_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,l_=E.forwardRef(function({onClick:e,discover:n="render",prefetch:r="none",relative:s,reloadDocument:l,replace:c,unstable_mask:u,state:p,target:f,to:y,preventScrollReset:v,viewTransition:S,unstable_defaultShouldRevalidate:P,...T},b){let{basename:w,navigator:D,unstable_useTransitions:O}=E.useContext(Jt),N=typeof y=="string"&&a_.test(y),M=X0(y,w);y=M.to;let F=ZW(y,{relative:s}),j=lr(),L=null;if(u){let ne=Ol(u,[],j.unstable_mask?j.unstable_mask.pathname:"/",!0);w!=="/"&&(ne.pathname=ne.pathname==="/"?w:zn([w,ne.pathname])),L=D.createHref(ne)}let[z,W,H]=RU(r,T),K=qU(y,{replace:c,unstable_mask:u,state:p,target:f,preventScrollReset:v,relative:s,viewTransition:S,unstable_defaultShouldRevalidate:P,unstable_useTransitions:O});function ie(ne){e&&e(ne),ne.defaultPrevented||K(ne)}let ee=!(M.isExternal||l),ae=E.createElement("a",{...T,...H,href:(ee?L:void 0)||M.absoluteURL||F,onClick:ee?ie:e,ref:AU(b,W),target:f,"data-discover":!N&&n==="render"?"true":void 0});return z&&!N?E.createElement(E.Fragment,null,ae,E.createElement(NU,{page:F})):ae});l_.displayName="Link";var FU=E.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:r="",end:s=!1,style:l,to:c,viewTransition:u,children:p,...f},y){let v=Ps(c,{relative:f.relative}),S=lr(),P=E.useContext(Il),{navigator:T,basename:b}=E.useContext(Jt),w=P!=null&&VU(v)&&u===!0,D=T.encodeLocation?T.encodeLocation(v).pathname:v.pathname,O=S.pathname,N=P&&P.navigation&&P.navigation.location?P.navigation.location.pathname:null;n||(O=O.toLowerCase(),N=N?N.toLowerCase():null,D=D.toLowerCase()),N&&b&&(N=sr(N,b)||N);const M=D!=="/"&&D.endsWith("/")?D.length-1:D.length;let F=O===D||!s&&O.startsWith(D)&&O.charAt(M)==="/",j=N!=null&&(N===D||!s&&N.startsWith(D)&&N.charAt(D.length)==="/"),L={isActive:F,isPending:j,isTransitioning:w},z=F?e:void 0,W;typeof r=="function"?W=r(L):W=[r,F?"active":null,j?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let H=typeof l=="function"?l(L):l;return E.createElement(l_,{...f,"aria-current":z,className:W,ref:y,style:H,to:c,viewTransition:u},typeof p=="function"?p(L):p)});FU.displayName="NavLink";var zU=E.forwardRef(({discover:i="render",fetcherKey:e,navigate:n,reloadDocument:r,replace:s,state:l,method:c=Va,action:u,onSubmit:p,relative:f,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:S,...P},T)=>{let{unstable_useTransitions:b}=E.useContext(Jt),w=UU(),D=HU(u,{relative:f}),O=c.toLowerCase()==="get"?"get":"post",N=typeof u=="string"&&a_.test(u),M=F=>{if(p&&p(F),F.defaultPrevented)return;F.preventDefault();let j=F.nativeEvent.submitter,L=j?.getAttribute("formmethod")||c,z=()=>w(j||F.currentTarget,{fetcherKey:e,method:L,navigate:n,replace:s,state:l,relative:f,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:S});b&&n!==!1?E.startTransition(()=>z()):z()};return E.createElement("form",{ref:T,method:O,action:D,onSubmit:r?p:M,...P,"data-discover":!N&&i==="render"?"true":void 0})});zU.displayName="Form";function BU(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function c_(i){let e=E.useContext(ro);return He(e,BU(i)),e}function qU(i,{target:e,replace:n,unstable_mask:r,state:s,preventScrollReset:l,relative:c,viewTransition:u,unstable_defaultShouldRevalidate:p,unstable_useTransitions:f}={}){let y=ks(),v=lr(),S=Ps(i,{relative:c});return E.useCallback(P=>{if(bU(P,e)){P.preventDefault();let T=n!==void 0?n:fs(v)===fs(S),b=()=>y(i,{replace:T,unstable_mask:r,state:s,preventScrollReset:l,relative:c,viewTransition:u,unstable_defaultShouldRevalidate:p});f?E.startTransition(()=>b()):b()}},[v,y,S,n,r,s,e,i,l,c,u,p,f])}var GU=0,WU=()=>`__${String(++GU)}__`;function UU(){let{router:i}=c_("useSubmit"),{basename:e}=E.useContext(Jt),n=cU(),r=i.fetch,s=i.navigate;return E.useCallback(async(l,c={})=>{let{action:u,method:p,encType:f,formData:y,body:v}=CU(l,e);if(c.navigate===!1){let S=c.fetcherKey||WU();await r(S,n,c.action||u,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:v,formMethod:c.method||p,formEncType:c.encType||f,flushSync:c.flushSync})}else await s(c.action||u,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:v,formMethod:c.method||p,formEncType:c.encType||f,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[r,s,e,n])}function HU(i,{relative:e}={}){let{basename:n}=E.useContext(Jt),r=E.useContext(En);He(r,"useFormAction must be used inside a RouteContext");let[s]=r.matches.slice(-1),l={...Ps(i||".",{relative:e})},c=lr();if(i==null){l.search=c.search;let u=new URLSearchParams(l.search),p=u.getAll("index");if(p.some(y=>y==="")){u.delete("index"),p.filter(v=>v).forEach(v=>u.append("index",v));let y=u.toString();l.search=y?`?${y}`:""}}return(!i||i===".")&&s.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(l.pathname=l.pathname==="/"?n:zn([n,l.pathname])),fs(l)}function VU(i,{relative:e}={}){let n=E.useContext(Z0);He(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=c_("useViewTransitionState"),s=Ps(i,{relative:e});if(!n.isTransitioning)return!1;let l=sr(n.currentLocation.pathname,r)||n.currentLocation.pathname,c=sr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return el(s.pathname,c)!=null||el(s.pathname,l)!=null}var KU=Object.defineProperty,qw=Object.getOwnPropertySymbols,QU=Object.prototype.hasOwnProperty,XU=Object.prototype.propertyIsEnumerable,Gw=(i,e,n)=>e in i?KU(i,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[e]=n,YU=(i,e)=>{for(var n in e||(e={}))QU.call(e,n)&&Gw(i,n,e[n]);if(qw)for(var n of qw(e))XU.call(e,n)&&Gw(i,n,e[n]);return i};function ZU(i){return E.createElement("svg",YU({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,"aria-hidden":!0},i),E.createElement("rect",{width:200,height:200,fill:"transparent"}),E.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)"}),E.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"}),E.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"}),E.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"}),E.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"}),E.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"}),E.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"}),E.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"}),E.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"}),E.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"}),E.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"}),E.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"}),E.createElement("ellipse",{cx:127.42,cy:86.0081,rx:2.47934,ry:2.47934,fill:"white",stroke:"#515151"}),E.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}),E.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"}),E.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 JU=ZU;function e9(){return document.getElementById(Eg)?.contentWindow}class t9{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 n=`ws://${e.clientHost}:${e.clientWsPort||e.clientHttpPort-1}`;console.info(`⌛️ ${x("startConnectClientWS",{wsURL:n})}`);const r=new WebSocket(n);this.connectTimeoutTimer=setTimeout(()=>{r.readyState!==WebSocket.OPEN&&(this.isTimeout=!0,r.close(),console.error(`${x("clientConnectTimeout")||"客户端连接超时"}`),Ee.emit("connectionChange",{node:Pe.get("isNodeWSConnected"),client:!1,from:"client",reason:"timeout"}),Nw())},5e3),r.onclose=()=>{this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.isTimeout||(console.error(`${x("clientServerDisconnected")}`),Ee.emit("connectionChange",{node:Pe.get("isNodeWSConnected"),client:!1,from:"client",reason:"close"}),Nw())},r.onerror=()=>{if(this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),!this.isTimeout){const s=x("clientServerStartError");Ee.emit("connectionChange",{node:Pe.get("isNodeWSConnected"),client:!1,from:"client",reason:"error"}),console.error(s)}},this.ws=r,r.onopen=()=>{this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.isTimeout||(console.log(`✅ ${x("clientConnectedSuccess")}`),Ee.emit("connectionChange",{node:Pe.get("isNodeWSConnected"),client:!0,from:"client",reason:"open"}),r.send(JSON.stringify({stage:"connecting",status:"success",message:"Browser connected to Client Server Successfully"})))},r.onmessage=function(s){try{const l=JSON.parse(s.data),c=e9();switch(l?.method){case"subscribeHandler":c?.__DEV__?.subscribeHandler?.(l?.payload?.event,l?.payload?.data);break;case"invokeHandler":c?.__DEV__?.invokeHandler?.(l?.payload?.callbackId,l?.payload?.data);break;case"predownloadSubpackage":case"reportScene":l?.payload&&typeof l.payload=="object"&&Ee.emit(l.method,l.payload);break;default:break}}catch(l){console.error(l)}}}send(e){this.ws?.readyState===WebSocket.OPEN&&(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 Ts=new t9,n9={start:{msgKey:"uploadGameStart"},success:{msgKey:"uploadGameSuccess",handle:i=>{const{packages:e,clientKey:n}=i||{};Pe.setMultiple({packages:e,clientKey:n,isResourcesReady:!0}),Ee.emit("setupStatusChange",{isScriptsReady:Pe.get("isScriptsReady"),isResourcesReady:!0})}},process:{msgKey:"uploadProcess"},error:{msgKey:"uploadError",handle:i=>{const{msg:e}=i||{};Pe.set("isResourcesReady",!1),Ee.emit("setupStatusChange",{isScriptsReady:Pe.get("isScriptsReady"),isResourcesReady:!1,isResourcesFailed:!0})}},restart:{msgKey:"uploadGameRestart"}};function r9(i){const{status:e,payload:n}=i,r=n9[e];if(!r){console.warn(`Unknown upload status: ${e}`);return}const s=x(r.msgKey);Ee.emit("uploadGame",{status:e,msg:s,progress:n?.progress}),r.handle&&r.handle(n)}class i9{ws;init(){const e=Pe.get("nodeWsPort");console.info(`⌛️ ${x("nodeServerStartConnect")}`);let n=!1;return this.ws=new WebSocket(`ws://localhost:${e}`),this.ws.onclose=()=>{console.error(`❌ ${x("nodeServerDisconnect")}`),Ee.emit("connectionChange",{node:!1,client:Pe.get("isClientWSConnected"),from:"node",reason:n?"error":"close"})},this.ws.onerror=()=>{n=!0;const r=x("nodeServerStartError");console.error(r),Ee.emit("connectionChange",{node:!1,client:Pe.get("isClientWSConnected"),from:"node",reason:"error"})},this.ws.onopen=()=>{console.log(`✅ ${x("nodeServerConnectedSuccess")}`),Ee.emit("connectionChange",{node:!0,client:Pe.get("isClientWSConnected"),from:"node",reason:"open"}),this.ws?.send(JSON.stringify({event:"connected",method:"connected",from:"browser"}))},this.ws.onmessage=r=>{if(r.data){const s=JSON.parse(r.data);switch(s.method){case"uploadStatus":{r9(s);break}case"compilationStatus":{Ee.emit("compilationStatus",s.payload);break}case"unitySplitStatus":{Ee.emit("unitySplitStatus",s.payload);break}case"resourceChange":{Fn.info("Node WS resourceChange",s?.payload),Ee.emit("resourceChange",{});break}case"scanQRCodeSuccess":{const{clientWsPort:c,clientHost:u,clientHttpPort:p}=s.payload;Pe.setMultiple({clientHost:u,clientWsPort:c,clientHttpPort:p}),Ts.init({clientWsPort:c,clientHost:u,clientHttpPort:p}),Ee.emit("scanQRCode",{status:"success"});break}case"scanQRCodeFailed":{const{msg:c}=s.payload;Ee.emit("scanQRCode",{status:"failed",msg:c});break}}}},!0}send(e){e.from="browser",this.ws?.send(JSON.stringify(e))}close(){this.ws?.close(),this.ws=void 0}}const Vi=new i9,o9=["krypton.js","ttmg-core.js"];async function Ww(i){try{const e=N0();console.log(`⌛️ ${x("startDebug")}`),console.log(`⌛️ ${x("initClientEnv")}`);const n=await Qi({url:`${e}/game/cwd`,method:"POST",data:{command:"start"}});if(console.log(`✅ ${x("initClientEnvSuccess")}`),Ts.send({method:"setDebugSettings",payload:i.debugSetting}),i.debugMode==="clientPreview"||i.debugMode==="clientDebug")Pe.set("isScriptsReady",!0),Vi.send({method:"startUpload"});else{console.log(`⌛️ ${x("startInitJSDevEnv")}`);const s=document.getElementById(Eg).contentWindow;s.__DEV__={isEnable:!0,server:e,nodeStaticBaseUrl:Pe.get("nodeStaticBaseUrl")},console.log(`✅ ${x("initJSDevEnvSuccess")}`);const l=await s9(s,o9,e),c=Object.values(l).some(u=>!u);Pe.set("isScriptsReady",Object.values(l).every(u=>u)),Ee.emit("setupStatusChange",{isScriptsReady:Pe.get("isScriptsReady"),isResourcesReady:Pe.get("isResourcesReady"),isScriptsFailed:c}),c||(console.log(`✅ ${x("setDevScriptsSuccess")}`),Vi.send({method:"startUpload"}))}}catch(e){console.log(`❌ ${x("setDevEnvFailed")}`,e?.message??e)}}async function s9(i,e,n){const r={};for(const s of e)try{console.log(`⏳ ${x("startLoadDevScripts")}: ${s}`);const l=await fetch(`${n}/game/scripts/${s}`);if(!l.ok){console.error(`${x("loadDevScriptsFailed")}: ${s}`),r[s]=!1;continue}const c=await l.text();if(!c){console.error(`${x("loadDevScriptsEmpty")}: ${s}`),r[s]=!1;continue}console.log(`✅ ${x("loadDevScriptsSuccess")}: ${s}`);const u=i.document.createElement("script");u.id=s,u.type="text/javascript",u.text=c,i.document.body.appendChild(u),r[s]=!0,console.log(`✅ ${x("loadDevScriptsInitSuccess")}: ${s}`)}catch(l){console.error(`${x("loadDevScriptsFailed")}: ${s}`,l),r[s]=!1}return r}function a9(){const i=()=>typeof document<"u"?document.hidden:!1,[e,n]=E.useState(i);return E.useEffect(()=>{const r=()=>{n(document.hidden),Ts.send({method:"sendPageVisibility",payload:{isHidden:document.hidden}})};return document.addEventListener("visibilitychange",r),()=>{document.removeEventListener("visibilitychange",r)}},[]),e}function l9(){const[i,e]=E.useState([]),n=E.useRef([]),r=E.useRef([]),s=E.useRef([]),l=E.useRef([]),c=E.useRef([]),u=E.useCallback(()=>{const T=[...c.current,...n.current,...r.current,...s.current,...l.current],b=new Map;T.forEach(w=>{const D=w?.text?.trim();if(!D)return;const O=b.get(D);if(!O){b.set(D,{title:w.title,text:D,required:w.required,detail:w.detail});return}!O.required&&w.required&&b.set(D,{title:O.title??w.title,text:D,required:!0,detail:O.detail??w.detail})}),e(Array.from(b.values()))},[]),p=E.useCallback(T=>{const b=[],w=!T?.terms_of_service_link?.trim(),D=!T?.privacy_policy_link?.trim();return w&&D?(b.push({text:x("policyDependencyTermsPrivacyRequired"),required:!0}),b):(w&&b.push({text:x("policyDependencyTermsRequired"),required:!0}),D&&b.push({text:x("policyDependencyPrivacyRequired"),required:!0}),b)},[]),f=E.useCallback(T=>{const b=[],w=!T?.name?.trim(),D=!T?.display_icon_url?.trim()&&!T?.icon_url?.trim(),O=!T?.description?.trim();return w&&b.push(x("topBasicInfoNameField")),D&&b.push(x("topBasicInfoIconField")),O&&b.push(x("topBasicInfoDescriptionField")),b.length===0?[]:[{text:x("topBasicInfoMissing",{fields:b.join(x("topBasicInfoFieldJoiner"))}),required:!1}]},[]),y=E.useCallback(T=>Rg(T)?[]:[{text:x("topLoginStatusWarning"),required:!1}],[]),v=E.useCallback(T=>{r.current=p(T),s.current=f(T),u()},[f,p,u]),S=E.useCallback(({currentUser:T,checkResult:b=[]})=>{l.current=y(T),n.current=b.filter(w=>w?.passed===!1).map(w=>({text:w.msg,required:w.required===!0,detail:w.detail})),u()},[y,u]),P=E.useCallback(T=>{c.current=T,u()},[u]);return{topErrorItems:i,updateGameDetailTopErrors:v,updateConfigTopErrors:S,updateGameDetailAccessErrors:P}}const Uw="https://developers.tiktok.com/",c9="https://bytedance.larkoffice.com/wiki/PeIawT4M4ia9R8kYyLMcjwHknOg";function u9(i){const e=Ng({errorCode:i.errorCode,user:i.user});if(e==="noPermission")return{link:Uw,text:x("topErrorCtaApplyPermission")};if(e==="networkProxy")return{link:c9,text:x("projectInfo.error.openProxyDoc")};if(e==="notFound"||e==="unknown")return{link:Uw,text:x("topErrorCtaOpenPortal")}}function d9(i){const e=Ng({errorCode:i.errorCode,user:i.user});if(e==="networkProxy")return x("topErrorTitleNetworkProxy");if(e==="noPermission")return x("topErrorTitlePermission");if(e==="notLoggedIn"||e==="loginExpired")return x("topErrorTitleLogin");if(e==="notFound")return x("topErrorTitleProjectNotFound")}function p9({onSuccess:i,updateGameDetailAccessErrors:e}){const{state:{user:n},hideLoading:r,setError:s,setGameDetail:l}=pn(),c=E.useRef(!1),u=E.useRef(!1),p=E.useCallback(f=>{if(c.current){u.current=!0;return}c.current=!0,Qi({url:"/game/detail",method:"GET"}).then(y=>{if(y.error){r();const{errorCode:v,errorMsg:S}=y.error,P=cW({errorCode:v,errorMsg:S,clientKey:y.error.clientKey,user:f??n});l({client_key:y.error.clientKey,has_error:!0,error_msg:S,error_code:v}),s({text:""}),e(P?[{title:d9({errorCode:v,user:f??n}),text:P,required:!0,detail:u9({errorCode:v,user:f??n})}]:[]);return}s({text:""}),e([]),l(y.data),i(y.data),r()}).finally(()=>{c.current=!1,u.current&&(u.current=!1,p(f))})},[r,i,s,l,e,n]);return{fetchGameDetail:p}}function f9({fetchGameDetail:i,updateConfigTopErrors:e}){const{showLoading:n,hideLoading:r,setError:s,setSchema:l,setUser:c,setPackages:u,setDevToolVersion:p,setEngine:f,setDebugMode:y,setMessage:v}=pn(),[S,P]=E.useState(""),T=E.useRef(!1);return E.useEffect(()=>{T.current||(T.current=!0,n(),Qi({url:"/game/config",method:"GET"}).then(b=>{if(b.error){r(),s({visible:!0,text:x("getDevGameConfigFailed")+`: ${b.error.errorMsg}`}),P(x("getDevGameConfigFailed")),console.log(`❌ ${x("getDevGameConfigFailed")}: ${b.error.errorMsg}`);return}const{schema:w,nodeWsPort:D,user:O,packages:N,devToolVersion:M,clientKey:F,engine:j,nodeStaticBaseUrl:L,checkResult:z,lang:W}=b.data;if(IG(W),rW(),console.log(`✅ ${x("getDevGameConfigSuccess")}`),W||Qi({url:"/game/config-fillback",method:"POST",data:{lang:navigator.language}}),l(w),Pe.setMultiple({nodeWsPort:D,email:O?.email,clientKey:F,nodeStaticBaseUrl:L}),c(O),p(M),u(N),f(j),Dl()&&v({type:"success",desc:x("nodeServerConnectedSuccess")}),!B0()){const H=j==="unity"?qn.clientPreview:qn.browserDebug;y(H),q0(H)}i(O),e({currentUser:O,checkResult:z}),r()}))},[i,r,p,f,y,s,u,l,c,v,n,e]),{isServerError:!!S,serverErrorMsg:S}}function h9({onResourceChange:i}){E.useEffect(()=>{const e=()=>{i()};return Ee.on("resourceChange",e),()=>{Ee.off("resourceChange",e)}},[i])}function g9(){const[i,e]=E.useState(()=>fW());E.useEffect(()=>{const s=l=>{if(l.key!=="tt-theme")return;const c=l.newValue;(c==="light"||c==="dark")&&(jw(c),e(c))};return window.addEventListener("storage",s),()=>window.removeEventListener("storage",s)},[]);const n=E.useCallback(s=>{jw(s),e(s)},[]),r=E.useCallback(()=>{n(i==="dark"?"light":"dark")},[i,n]);return{theme:i,setTheme:n,toggle:r}}const m9="modulepreload",y9=function(i){return"/"+i},Hw={},lt=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){let p=function(f){return Promise.all(f.map(y=>Promise.resolve(y).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),u=c?.nonce||c?.getAttribute("nonce");s=p(n.map(f=>{if(f=y9(f),f in Hw)return;Hw[f]=!0;const y=f.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${v}`))return;const S=document.createElement("link");if(S.rel=y?"stylesheet":m9,y||(S.as="script"),S.crossOrigin="",S.href=f,u&&S.setAttribute("nonce",u),document.head.appendChild(S),y)return new Promise((P,T)=>{S.addEventListener("load",P),S.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${f}`)))})}))}function l(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return s.then(c=>{for(const u of c||[])u.status==="rejected"&&l(u.reason);return e().catch(l)})},u_=()=>{const{state:{loading:i}}=pn();return i.visible?k.jsx("div",{className:"loading-container",children:k.jsxs("div",{className:"loading-content",children:[k.jsx(Mr,{size:"large"}),k.jsx("div",{className:"loading-text",children:i.text})]})}):null},v9=({size:i=24,color:e="#000",style:n,className:r})=>k.jsx("div",{style:{display:"flex",alignItems:"center",position:"relative"},children:k.jsxs("svg",{fill:"currentColor",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:i,height:i,children:[k.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"}),k.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"})]})}),b9=()=>k.jsxs("div",{className:"logo-container",children:[k.jsx(v9,{size:24}),k.jsx("div",{className:"logo-title",children:x("title")})]});function Vw(i){return x(i==="ok"?"connectStatusConnected":i==="fail"?"connectStatusFailed":"connectStatusDisconnected")}function ns(i){return i==="ok"?"var(--tt-success-text)":i==="fail"?"var(--tt-error-text)":"var(--tt-text-faint)"}function S9(){return Dl()?["subpackage.collecting","subpackage.ready","subpackage.success"].includes(Dg()):!1}const w9=()=>{const{state:{schema:i,isConnected:e},setIsConnected:n,setMessage:r}=pn(),s=e||S9(),[l,c]=E.useState("off"),[u,p]=E.useState("off"),[f,y]=E.useState("off"),v={node:{bg:"var(--tt-info-bg)",stroke:"var(--tt-info-border)",text:"var(--tt-info-text)"},browser:{bg:"var(--tt-success-bg)",stroke:"var(--tt-success-border)",text:"var(--tt-success-text)"},client:{bg:"var(--tt-accent-soft)",stroke:"var(--tt-accent-strong)",text:"var(--tt-accent-text)"}},S=E.useMemo(()=>{const{nodeWsPort:N,clientHost:M,clientHttpPort:F,clientWsPort:j}=Pe.getMultiple(["nodeWsPort","clientHost","clientHttpPort","clientWsPort"]);let L="",z="";try{if(i){const W=new URL(i);L=(W.searchParams.get("host")||"").trim(),z=(W.searchParams.get("port")||"").trim()}}catch{}return{nodeWsPort:N,clientHost:M,clientHttpPort:F,clientWsPort:j,schemaHost:L,schemaPort:z}},[l,u,f,i]),P=N=>{const{client:M,node:F,reason:j}=N||{};Fn.info("connectionChange",M,F),Pe.get("isNodeWSConnected")===F&&(M||r({type:"danger",desc:x("clientServerStartError")})),Pe.get("isClientWSConnected")===M&&(F||r({type:"danger",desc:x("nodeServerStartError")})),Pe.get("isClientWSConnected")&&!M&&(Pe.setMultiple({isClientWSConnected:!1,isResourcesReady:!1,isScriptsReady:!1}),r({type:"danger",desc:x("clientDisconnected")})),Pe.get("isNodeWSConnected")&&!F&&(Pe.setMultiple({isNodeWSConnected:!1,isResourcesReady:!1,isScriptsReady:!1}),r({type:"danger",title:x("serverDisconnected"),desc:x("nodeDisconnected")})),!Pe.get("isClientWSConnected")&&M&&(Pe.set("isClientWSConnected",!0),r({type:"success",desc:x("clientConnectedSuccess")})),!Pe.get("isNodeWSConnected")&&F&&(Pe.set("isNodeWSConnected",!0),r({type:"success",desc:x("nodeServerConnectedSuccess")})),typeof F=="boolean"&&(c(F?"ok":j==="error"||j==="timeout"?"fail":"off"),F||y("off")),typeof M=="boolean"&&p(M?"ok":j==="error"||j==="timeout"?"fail":"off"),n(!!M&&!!F)},T=N=>{if(N?.status==="success"){y("ok");return}if(N?.status==="failed"){y("fail");return}N?.status==="start"&&y("off")};E.useEffect(()=>(Ee.on("connectionChange",P),Ee.on("scanQRCode",T),()=>{Ee.off("connectionChange",P),Ee.off("scanQRCode",T)}),[n]);const b=k.jsxs("div",{children:[k.jsxs("div",{children:[x("connectStatusNode"),": ",Vw(l)]}),k.jsxs("div",{children:[x("connectStatusDebugPage"),": ",window.location.origin]}),S.nodeWsPort?k.jsxs("div",{children:["WS: ws://localhost:",S.nodeWsPort]}):null,k.jsxs("div",{children:["HTTP: ",window.location.origin]}),S.schemaHost&&S.schemaPort?k.jsxs("div",{children:[x("scanQRCode"),":ws://",S.schemaHost,":",S.schemaPort]}):null]}),w=k.jsx("div",{children:k.jsxs("div",{children:[x("connectStatusBrowser"),": ",x("connectStatusConnected")]})}),D=k.jsxs("div",{children:[k.jsxs("div",{children:[x("connectStatusClient"),": ",Vw(u)]}),S.clientHost?k.jsxs("div",{children:[S.clientHost,S.clientHttpPort?` http:${S.clientHttpPort}`:"",S.clientWsPort?` ws:${S.clientWsPort}`:""]}):null]}),O=k.jsxs("div",{className:"conn-graph-wrap",children:[k.jsx("div",{className:"conn-graph",children:k.jsx("svg",{className:"conn-graph-svg",width:"340",height:"220",viewBox:"0 0 360 240",children:(()=>{const N={x:180,y:44},M={x:70,y:206},F={x:290,y:206},j=14,L=26,z=4,W=5,H=8,K={x:(N.x+M.x+F.x)/3,y:(N.y+M.y+F.y)/3},ie=(Y,I)=>({x:I.x-Y.x,y:I.y-Y.y}),ee=Y=>Math.hypot(Y.x,Y.y)||1,ae=Y=>{const I=ee(Y);return{x:Y.x/I,y:Y.y/I}},ne=Y=>({x:-Y.y,y:Y.x}),ce=(Y,I,U=1)=>({x:Y.x+I.x*U,y:Y.y+I.y*U}),de=(Y,I,U)=>{const se=ie(Y,I),re=ae(se),oe=ae(ne(se)),_e=U.offset||0,ye=ce(ce(Y,re,L),oe,_e),ve=ce(ce(I,re,-L),oe,_e),Ce=typeof U.t=="number"?Math.min(.9,Math.max(.1,U.t)):.5,be={x:ye.x+(ve.x-ye.x)*Ce,y:ye.y+(ve.y-ye.y)*Ce},mt=ce(Y,re,L),kt=ce(I,re,-L),cr={x:mt.x+(kt.x-mt.x)*Ce,y:mt.y+(kt.y-mt.y)*Ce},xn=U.markMode||"byLineOffset",Dn=ie(cr,K),en=Dn.x*oe.x+Dn.y*oe.y>0?{x:-oe.x,y:-oe.y}:oe,De=U.labelSide==="inner"?-1:1,Bt=_e>=0?1:-1,Pt=xn==="byTriangleSide"?De:Bt,$e={w:360,h:240,pad:10};let Ie=ce(be,en,H*Pt);(Ie.y>$e.h-$e.pad||Ie.y<$e.pad||Ie.x>$e.w-$e.pad||Ie.x<$e.pad)&&(Ie=ce(be,en,-H*Pt));const rt=Ie.x<$e.w-60,ze={x:rt?Ie.x+W+z:Ie.x-W-z,y:Ie.y},Tt=rt?"start":"end",Rt=U.label.length*6+8,On=Tt==="start"?ze.x:ze.x-Rt,tn=Tt==="start"?ze.x+Rt:ze.x;let Ze=Tt,Et=ze.x;return On<$e.pad&&tn>$e.w-$e.pad?(Ze="start",Et=$e.pad):On<$e.pad?(Ze="start",Et=Ie.x+W+z):tn>$e.w-$e.pad&&(Ze="end",Et=Ie.x-W-z),k.jsxs("g",{children:[k.jsx("line",{x1:ye.x,y1:ye.y,x2:ve.x,y2:ve.y,stroke:"var(--tt-border-strong)",strokeWidth:"2",strokeDasharray:U.dashed?"4 3":void 0}),k.jsx("circle",{cx:Ie.x,cy:Ie.y,r:W,fill:U.statusColor}),k.jsx("text",{x:Et,y:ze.y,fontSize:"10",fill:"var(--tt-text-dim)",dominantBaseline:"middle",textAnchor:Ze,paintOrder:"stroke",stroke:"var(--tt-bg-panel)",strokeWidth:"3",children:U.label})]})},V=(Y,I,U,se)=>k.jsx(or,{content:U,children:k.jsxs("g",{className:"conn-vertex",children:[k.jsx("rect",{x:Y.x-28,y:Y.y-14,width:56,height:22,rx:8,fill:se.bg,stroke:se.stroke}),k.jsx("text",{x:Y.x,y:Y.y-1,textAnchor:"middle",dominantBaseline:"middle",fontSize:"12",fill:se.text,children:I})]})});return k.jsxs(k.Fragment,{children:[de(M,N,{label:"ws",statusColor:ns(l),offset:-j/2,labelSide:"outer",markMode:"byLineOffset",t:.42}),de(M,N,{label:"http",statusColor:ns(l),offset:j/2,labelSide:"inner",markMode:"byLineOffset",t:.58}),de(N,F,{label:"ws",statusColor:ns(f),dashed:!0,offset:0,labelSide:"outer",markMode:"byTriangleSide",t:.55}),de(M,F,{label:"ws",statusColor:ns(u),offset:-j/2,labelSide:"outer",markMode:"byLineOffset",t:.55}),de(M,F,{label:"http",statusColor:ns(u),offset:j/2,labelSide:"inner",markMode:"byLineOffset",t:.45}),V(N,x("connectStatusNode"),b,v.node),V(M,x("connectStatusBrowser"),w,v.browser),V(F,x("connectStatusClient"),D,v.client)]})})()})}),k.jsxs("div",{className:"conn-legend",children:[k.jsx("div",{className:"conn-legend-title",children:x("connectStatusLegendTitle")}),k.jsxs("div",{className:"conn-legend-item",children:[k.jsx("div",{className:"conn-legend-name",children:k.jsx(Ft,{className:"conn-legend-tag-node",type:"ghost",size:"small",style:{marginRight:6},children:x("connectStatusNode")})}),k.jsx("div",{className:"conn-legend-desc",children:x("connectStatusLegendNode")})]}),k.jsxs("div",{className:"conn-legend-item",children:[k.jsx("div",{className:"conn-legend-name",children:k.jsx(Ft,{color:"green",type:"ghost",size:"small",style:{marginRight:6},children:x("connectStatusBrowser")})}),k.jsx("div",{className:"conn-legend-desc",children:x("connectStatusLegendBrowser")})]}),k.jsxs("div",{className:"conn-legend-item",children:[k.jsx("div",{className:"conn-legend-name",children:k.jsx(Ft,{className:"conn-legend-tag-client",type:"ghost",size:"small",style:{marginRight:6},children:x("connectStatusClient")})}),k.jsx("div",{className:"conn-legend-desc",children:x("connectStatusLegendClient")})]}),k.jsxs("div",{className:"conn-legend-item",children:[k.jsxs("div",{className:"conn-legend-name",children:[k.jsx(Ft,{color:"grey",type:"ghost",size:"small",style:{marginRight:6},children:"WS"}),k.jsx(Ft,{color:"grey",type:"ghost",size:"small",children:"HTTP"})]}),k.jsx("div",{className:"conn-legend-desc",children:x("connectStatusLegendProto")})]})]})]});return k.jsx(Bn,{content:O,trigger:"hover",showArrow:!1,children:k.jsxs("div",{className:"connect-status tt-header-chip"+(s?" connect-status-on":" connect-status-off"),role:"status","aria-label":x(s?"deviceConnected":"deviceDisconnected"),children:[k.jsx("span",{className:"connect-status-dot","aria-hidden":"true"}),k.jsx("span",{className:"connect-status-text",children:x(s?"deviceConnected":"deviceDisconnected")})]})})},C9=({version:i})=>{const e=ks(),{state:{devToolVersion:n}}=pn(),[r,s]=E.useState(!1);if(E.useEffect(()=>{s(nW(n))},[n]),!i)return null;const l=()=>{n&&(tW(n),s(!1)),e("/changelog")};return k.jsxs("button",{type:"button",onClick:l,className:"version-tag tt-header-chip"+(r?" version-tag-has-new":""),"aria-label":r?`${x("changelog")||"Changelog"} · ${x("changelogNewTag")||"NEW"}`:x("changelog")||"Changelog",title:r?x("changelogNewTag")||"NEW":void 0,children:[k.jsx("span",{className:"version-tag-text",children:i}),r&&k.jsx("span",{className:"version-tag-new",children:x("changelogNewTag")||"NEW"})]})};const d_=(...i)=>i.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();const _9=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const k9=i=>i.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase());const Kw=i=>{const e=k9(i);return e.charAt(0).toUpperCase()+e.slice(1)};var mh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const P9=i=>{for(const e in i)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},T9=E.createContext({}),E9=()=>E.useContext(T9),x9=E.forwardRef(({color:i,size:e,strokeWidth:n,absoluteStrokeWidth:r,className:s="",children:l,iconNode:c,...u},p)=>{const{size:f=24,strokeWidth:y=2,absoluteStrokeWidth:v=!1,color:S="currentColor",className:P=""}=E9()??{},T=r??v?Number(n??y)*24/Number(e??f):n??y;return E.createElement("svg",{ref:p,...mh,width:e??f??mh.width,height:e??f??mh.height,stroke:i??S,strokeWidth:T,className:d_("lucide",P,s),...!l&&!P9(u)&&{"aria-hidden":"true"},...u},[...c.map(([b,w])=>E.createElement(b,w)),...Array.isArray(l)?l:[l]])});const Nl=(i,e)=>{const n=E.forwardRef(({className:r,...s},l)=>E.createElement(x9,{ref:l,iconNode:e,className:d_(`lucide-${_9(Kw(i))}`,`lucide-${i}`,r),...s}));return n.displayName=Kw(i),n};const D9=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],O9=Nl("arrow-left",D9);const I9=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],R9=Nl("external-link",I9);const N9=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],j9=Nl("moon",N9);const L9=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],A9=Nl("sun",L9),M9=()=>{const{theme:i,toggle:e}=g9(),n=i==="dark",r=n?A9:j9,s=x(n?"themeToggleToLight":"themeToggleToDark");return k.jsx("button",{type:"button",onClick:e,className:"theme-toggle tt-header-chip","aria-label":s,title:s,children:k.jsx(r,{className:"theme-toggle-icon",size:14,strokeWidth:2})})},$9=E.lazy(()=>lt(()=>import("./index-Bpx0cjfq.js"),__vite__mapDeps([0,1,2,3])).then(i=>({default:i.AccessDocs}))),F9=E.lazy(()=>lt(()=>import("./index-Dd2Oev0p.js"),__vite__mapDeps([4,1,2,5])).then(i=>({default:i.LangSwitcher})));E.lazy(()=>lt(()=>import("./index-vuGJOmRn.js"),__vite__mapDeps([6,7,8,9,10,11,12,13])).then(i=>({default:i.GameUploader})));const z9=E.lazy(()=>lt(()=>import("./index-DVDX92Zz.js"),__vite__mapDeps([14,15])).then(i=>({default:i.LoginStatus}))),B9=E.lazy(()=>lt(()=>import("./index-Dj0vBPuW.js"),__vite__mapDeps([16,17])).then(i=>({default:i.WasmCodeSplit}))),q9=()=>{const{state:{devToolVersion:i,engine:e}}=pn();return k.jsxs("div",{className:"header-wrapper",children:[k.jsxs("div",{className:"header-content",children:[k.jsxs("div",{className:"header-content-left",children:[k.jsx(b9,{}),k.jsx(C9,{version:i}),k.jsx(w9,{})]}),k.jsx("div",{className:"header-content-right",children:k.jsxs(ws,{spacing:12,children:[k.jsx(E.Suspense,{fallback:null,children:k.jsx($9,{})}),e==="unity"&&k.jsx(E.Suspense,{fallback:null,children:k.jsx(B9,{})}),k.jsx(E.Suspense,{fallback:null,children:k.jsx(F9,{})}),k.jsx(M9,{}),k.jsx(E.Suspense,{fallback:null,children:k.jsx(z9,{})})]})})]}),k.jsx(j2,{})]})},G9=({enabled:i=!0})=>(E.useEffect(()=>{if(!i){Vi.close();return}return Vi.init(),()=>{Vi.close()}},[i]),null),W9=E.lazy(()=>lt(()=>import("./index-BJmPZor5.js"),__vite__mapDeps([18,19,20,21])).then(i=>({default:i.Sidebar}))),U9=()=>k.jsx("div",{className:"sidebar-container",children:k.jsx(E.Suspense,{fallback:k.jsx("div",{className:"sidebar-loading-placeholder"}),children:k.jsx(W9,{})})}),H9=({title:i,subtitle:e,action:n,decoration:r=!0,className:s})=>k.jsxs("header",{className:Q("tt-page-hero",r&&"tt-page-hero-decorated",s),children:[k.jsxs("div",{className:"tt-page-hero-text",children:[k.jsx("h1",{className:"tt-page-hero-title",children:i}),e&&k.jsx("p",{className:"tt-page-hero-subtitle",children:e})]}),n&&k.jsx("div",{className:"tt-page-hero-action",children:n})]}),p_=({href:i,iconSize:e=13,className:n="",children:r,target:s="_blank",rel:l="noopener noreferrer",...c})=>k.jsxs("a",{...c,className:`tt-document-link ${n}`.trim(),href:i,target:s,rel:l,children:[k.jsx("span",{className:"tt-document-link-label",children:r}),k.jsx(R9,{className:"tt-document-link-icon",size:e,strokeWidth:2,"aria-hidden":"true"})]}),V9=({items:i,fallbackErrorText:e})=>{const[n,r]=E.useState(!1),s=E.useMemo(()=>{const f=e?.trim();return f?[{text:f,required:!0},...i.filter(y=>y.text.trim()!==f)]:i},[e,i]);if(E.useEffect(()=>{r(!1)},[s]),s.length===0)return null;const l=f=>f.detail?.link?k.jsx(p_,{className:"app-error-cta",href:f.detail.link,children:f.detail.text||x("viewDoc")}):null,c=(f,y)=>{const v=f.required?vl:bl,S=f.required?"required":"suggested",P=f.title||(f.required?x("topErrorTitleRequired"):x("topErrorTitleSuggested"));return k.jsxs("div",{className:`app-error-row app-error-row-${S}`,role:f.required?"alert":"status",children:[k.jsx("span",{className:"app-error-row-accent","aria-hidden":"true"}),k.jsx("span",{className:"app-error-row-icon",children:k.jsx(v,{})}),k.jsxs("div",{className:"app-error-row-body",children:[k.jsx("div",{className:"app-error-row-title",children:P}),k.jsx("div",{className:"app-error-row-text",children:f.text})]}),l(f)]},`${f.text}-${S}-${y}`)};if(s.length===1)return k.jsx("div",{className:"app-error-banner",children:c(s[0],0)});const u=s.find(f=>f.required)??s[0],p=s.filter(f=>f!==u);return k.jsxs("div",{className:"app-error-banner app-error-banner-multi",children:[k.jsxs("div",{className:"app-error-multi-head",children:[c(u,0),k.jsx("button",{type:"button",className:"app-error-multi-toggle",onClick:()=>r(f=>!f),children:n?x("topErrorHideDetails"):x("topErrorMoreItems",{count:String(p.length)})})]}),n&&k.jsx("div",{className:"app-error-multi-body",children:p.map((f,y)=>c(f,y+1))})]})},K9=i=>Number.isFinite(i)?Math.max(0,Math.min(1,i??0)):0,Q9=C.memo(()=>{const{setMessage:i,hideLoading:e,state:{gameDetail:n,debugSetting:r,isConnected:s,selectedLaunchOption:l,debugMode:c}}=pn();a9();const[u,p]=E.useState(""),f=T=>{if(!T.client||!T.node){Pe.set("hasSetup",!1);return}if(Pe.get("hasSetup"))return;Pe.set("hasSetup",!0),(async()=>(e(),i({type:"success",desc:x("setupDevEnv")}),await Ww({debugSetting:r,debugMode:c})))()},y=E.useCallback(({status:T,msg:b,progress:w})=>{switch(T){case"start":const D=x("uploadProcess");i({type:"info",title:D,desc:x("uploadProcessDesc"),progress:0,intent:"uploading"}),console.log(D);break;case"success":i({type:"success",desc:x("uploadSuccess")}),console.log(`✅ ${x("uploadSuccess")}`);break;case"error":const O=`${x("uploadError")}: ${b}`;i({type:"danger",desc:O}),console.log(O);break;case"restart":break;case"process":const N=K9(w);`${x("uploadProcess")}${(N*100).toFixed(0)}`,i({type:"info",title:x("uploadProcess"),desc:x("uploadProcessDesc"),progress:N,intent:"uploading"});break}},[]),v=E.useCallback(({isScriptsReady:T,isResourcesReady:b,isScriptsFailed:w,isResourcesFailed:D})=>{T&&b?(Fn.info("scripts and resources are ready, send meta"),QG(n),i({type:"success",desc:x(c==="clientPreview"?"clientPreviewEnvSetupSuccess":"debugEnvSetupSuccess")})):w?i({type:"danger",desc:x("scriptsSetupFailed")}):D&&i({type:"danger",desc:x("resourcesSetupFailed")})},[n,l,c]),S=()=>{if(!s)return;const T=nr.warning({position:"top",duration:1e4,title:x("gameResourceUpdated"),id:u,onClose:()=>{p("")},content:k.jsxs(k.Fragment,{children:[k.jsx("p",{children:x("gameResourceChange")}),k.jsxs("div",{className:"banner-footer",children:[k.jsx(tt,{type:"tertiary",onClick:()=>{nr.close(T)},children:x("notUpload")}),k.jsx(tt,{style:{marginLeft:12},type:"warning",onClick:()=>{Fn.info("upload"),Fn.info("upload iframe onload, 开始重新初始化"),Ww({debugSetting:r,debugMode:c}),nr.close(T)},children:x("uploadToClient")})]})]})});p(T)},P=E.useCallback(({status:T,errorMsg:b})=>{T==="start"?(i({type:"info",title:x("gameResourceCompilingTitle"),desc:x("gameResourceCompiling")}),console.warn(`⚠️ ${x("gameResourceCompiling")}`)):T==="end"&&(b?(i({type:"danger",desc:b}),console.error(`❌ ${b}`)):(i({type:"success",title:x("gameResourceCompileSuccessTitle"),desc:x("gameResourceCompileSuccess")}),console.log(`✅ ${x("gameResourceCompileSuccess")}`)))},[]);return E.useEffect(()=>(Ee.on("connectionChange",f),Ee.on("compilationStatus",P),Ee.on("resourceChange",S),Ee.on("uploadGame",y),Ee.on("setupStatusChange",v),()=>{Ee.off("compilationStatus",P),Ee.off("resourceChange",S),Ee.off("setupStatusChange",v),Ee.off("uploadGame",y),Ee.off("connectionChange",f)}),[f,P,S,v,y]),null});var Wi={},yh,Qw;function f_(){return Qw||(Qw=1,yh={L:1,M:0,Q:3,H:2}),yh}var vh,Xw;function h_(){return Xw||(Xw=1,vh={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),vh}var bh,Yw;function X9(){if(Yw)return bh;Yw=1;var i=h_();function e(n){this.mode=i.MODE_8BIT_BYTE,this.data=n}return e.prototype={getLength:function(n){return this.data.length},write:function(n){for(var r=0;r<this.data.length;r++)n.put(this.data.charCodeAt(r),8)}},bh=e,bh}var Sh,Zw;function Y9(){if(Zw)return Sh;Zw=1;var i=f_();function e(n,r){this.totalCount=n,this.dataCount=r}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(n,r){var s=e.getRsBlockTable(n,r);if(s==null)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+r);for(var l=s.length/3,c=new Array,u=0;u<l;u++)for(var p=s[u*3+0],f=s[u*3+1],y=s[u*3+2],v=0;v<p;v++)c.push(new e(f,y));return c},e.getRsBlockTable=function(n,r){switch(r){case i.L:return e.RS_BLOCK_TABLE[(n-1)*4+0];case i.M:return e.RS_BLOCK_TABLE[(n-1)*4+1];case i.Q:return e.RS_BLOCK_TABLE[(n-1)*4+2];case i.H:return e.RS_BLOCK_TABLE[(n-1)*4+3];default:return}},Sh=e,Sh}var wh,Jw;function Z9(){if(Jw)return wh;Jw=1;function i(){this.buffer=new Array,this.length=0}return i.prototype={get:function(e){var n=Math.floor(e/8);return(this.buffer[n]>>>7-e%8&1)==1},put:function(e,n){for(var r=0;r<n;r++)this.putBit((e>>>n-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),e&&(this.buffer[n]|=128>>>this.length%8),this.length++}},wh=i,wh}var Ch,eC;function g_(){if(eC)return Ch;eC=1;for(var i={glog:function(n){if(n<1)throw new Error("glog("+n+")");return i.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return i.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},e=0;e<8;e++)i.EXP_TABLE[e]=1<<e;for(var e=8;e<256;e++)i.EXP_TABLE[e]=i.EXP_TABLE[e-4]^i.EXP_TABLE[e-5]^i.EXP_TABLE[e-6]^i.EXP_TABLE[e-8];for(var e=0;e<255;e++)i.LOG_TABLE[i.EXP_TABLE[e]]=e;return Ch=i,Ch}var _h,tC;function m_(){if(tC)return _h;tC=1;var i=g_();function e(n,r){if(n.length==null)throw new Error(n.length+"/"+r);for(var s=0;s<n.length&&n[s]==0;)s++;this.num=new Array(n.length-s+r);for(var l=0;l<n.length-s;l++)this.num[l]=n[l+s]}return e.prototype={get:function(n){return this.num[n]},getLength:function(){return this.num.length},multiply:function(n){for(var r=new Array(this.getLength()+n.getLength()-1),s=0;s<this.getLength();s++)for(var l=0;l<n.getLength();l++)r[s+l]^=i.gexp(i.glog(this.get(s))+i.glog(n.get(l)));return new e(r,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var r=i.glog(this.get(0))-i.glog(n.get(0)),s=new Array(this.getLength()),l=0;l<this.getLength();l++)s[l]=this.get(l);for(var l=0;l<n.getLength();l++)s[l]^=i.gexp(i.glog(n.get(l))+r);return new e(s,0).mod(n)}},_h=e,_h}var kh,nC;function J9(){if(nC)return kh;nC=1;var i=h_(),e=m_(),n=g_(),r={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},s={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(l){for(var c=l<<10;s.getBCHDigit(c)-s.getBCHDigit(s.G15)>=0;)c^=s.G15<<s.getBCHDigit(c)-s.getBCHDigit(s.G15);return(l<<10|c)^s.G15_MASK},getBCHTypeNumber:function(l){for(var c=l<<12;s.getBCHDigit(c)-s.getBCHDigit(s.G18)>=0;)c^=s.G18<<s.getBCHDigit(c)-s.getBCHDigit(s.G18);return l<<12|c},getBCHDigit:function(l){for(var c=0;l!=0;)c++,l>>>=1;return c},getPatternPosition:function(l){return s.PATTERN_POSITION_TABLE[l-1]},getMask:function(l,c,u){switch(l){case r.PATTERN000:return(c+u)%2==0;case r.PATTERN001:return c%2==0;case r.PATTERN010:return u%3==0;case r.PATTERN011:return(c+u)%3==0;case r.PATTERN100:return(Math.floor(c/2)+Math.floor(u/3))%2==0;case r.PATTERN101:return c*u%2+c*u%3==0;case r.PATTERN110:return(c*u%2+c*u%3)%2==0;case r.PATTERN111:return(c*u%3+(c+u)%2)%2==0;default:throw new Error("bad maskPattern:"+l)}},getErrorCorrectPolynomial:function(l){for(var c=new e([1],0),u=0;u<l;u++)c=c.multiply(new e([1,n.gexp(u)],0));return c},getLengthInBits:function(l,c){if(1<=c&&c<10)switch(l){case i.MODE_NUMBER:return 10;case i.MODE_ALPHA_NUM:return 9;case i.MODE_8BIT_BYTE:return 8;case i.MODE_KANJI:return 8;default:throw new Error("mode:"+l)}else if(c<27)switch(l){case i.MODE_NUMBER:return 12;case i.MODE_ALPHA_NUM:return 11;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 10;default:throw new Error("mode:"+l)}else if(c<41)switch(l){case i.MODE_NUMBER:return 14;case i.MODE_ALPHA_NUM:return 13;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 12;default:throw new Error("mode:"+l)}else throw new Error("type:"+c)},getLostPoint:function(l){for(var c=l.getModuleCount(),u=0,p=0;p<c;p++)for(var f=0;f<c;f++){for(var y=0,v=l.isDark(p,f),S=-1;S<=1;S++)if(!(p+S<0||c<=p+S))for(var P=-1;P<=1;P++)f+P<0||c<=f+P||S==0&&P==0||v==l.isDark(p+S,f+P)&&y++;y>5&&(u+=3+y-5)}for(var p=0;p<c-1;p++)for(var f=0;f<c-1;f++){var T=0;l.isDark(p,f)&&T++,l.isDark(p+1,f)&&T++,l.isDark(p,f+1)&&T++,l.isDark(p+1,f+1)&&T++,(T==0||T==4)&&(u+=3)}for(var p=0;p<c;p++)for(var f=0;f<c-6;f++)l.isDark(p,f)&&!l.isDark(p,f+1)&&l.isDark(p,f+2)&&l.isDark(p,f+3)&&l.isDark(p,f+4)&&!l.isDark(p,f+5)&&l.isDark(p,f+6)&&(u+=40);for(var f=0;f<c;f++)for(var p=0;p<c-6;p++)l.isDark(p,f)&&!l.isDark(p+1,f)&&l.isDark(p+2,f)&&l.isDark(p+3,f)&&l.isDark(p+4,f)&&!l.isDark(p+5,f)&&l.isDark(p+6,f)&&(u+=40);for(var b=0,f=0;f<c;f++)for(var p=0;p<c;p++)l.isDark(p,f)&&b++;var w=Math.abs(100*b/c/c-50)/5;return u+=w*10,u}};return kh=s,kh}var Ph,rC;function eH(){if(rC)return Ph;rC=1;var i=X9(),e=Y9(),n=Z9(),r=J9(),s=m_();function l(u,p){this.typeNumber=u,this.errorCorrectLevel=p,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=l.prototype;return c.addData=function(u){var p=new i(u);this.dataList.push(p),this.dataCache=null},c.isDark=function(u,p){if(u<0||this.moduleCount<=u||p<0||this.moduleCount<=p)throw new Error(u+","+p);return this.modules[u][p]},c.getModuleCount=function(){return this.moduleCount},c.make=function(){if(this.typeNumber<1){var u=1;for(u=1;u<40;u++){for(var p=e.getRSBlocks(u,this.errorCorrectLevel),f=new n,y=0,v=0;v<p.length;v++)y+=p[v].dataCount;for(var v=0;v<this.dataList.length;v++){var S=this.dataList[v];f.put(S.mode,4),f.put(S.getLength(),r.getLengthInBits(S.mode,u)),S.write(f)}if(f.getLengthInBits()<=y*8)break}this.typeNumber=u}this.makeImpl(!1,this.getBestMaskPattern())},c.makeImpl=function(u,p){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var f=0;f<this.moduleCount;f++){this.modules[f]=new Array(this.moduleCount);for(var y=0;y<this.moduleCount;y++)this.modules[f][y]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(u,p),this.typeNumber>=7&&this.setupTypeNumber(u),this.dataCache==null&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,p)},c.setupPositionProbePattern=function(u,p){for(var f=-1;f<=7;f++)if(!(u+f<=-1||this.moduleCount<=u+f))for(var y=-1;y<=7;y++)p+y<=-1||this.moduleCount<=p+y||(0<=f&&f<=6&&(y==0||y==6)||0<=y&&y<=6&&(f==0||f==6)||2<=f&&f<=4&&2<=y&&y<=4?this.modules[u+f][p+y]=!0:this.modules[u+f][p+y]=!1)},c.getBestMaskPattern=function(){for(var u=0,p=0,f=0;f<8;f++){this.makeImpl(!0,f);var y=r.getLostPoint(this);(f==0||u>y)&&(u=y,p=f)}return p},c.createMovieClip=function(u,p,f){var y=u.createEmptyMovieClip(p,f),v=1;this.make();for(var S=0;S<this.modules.length;S++)for(var P=S*v,T=0;T<this.modules[S].length;T++){var b=T*v,w=this.modules[S][T];w&&(y.beginFill(0,100),y.moveTo(b,P),y.lineTo(b+v,P),y.lineTo(b+v,P+v),y.lineTo(b,P+v),y.endFill())}return y},c.setupTimingPattern=function(){for(var u=8;u<this.moduleCount-8;u++)this.modules[u][6]==null&&(this.modules[u][6]=u%2==0);for(var p=8;p<this.moduleCount-8;p++)this.modules[6][p]==null&&(this.modules[6][p]=p%2==0)},c.setupPositionAdjustPattern=function(){for(var u=r.getPatternPosition(this.typeNumber),p=0;p<u.length;p++)for(var f=0;f<u.length;f++){var y=u[p],v=u[f];if(this.modules[y][v]==null)for(var S=-2;S<=2;S++)for(var P=-2;P<=2;P++)S==-2||S==2||P==-2||P==2||S==0&&P==0?this.modules[y+S][v+P]=!0:this.modules[y+S][v+P]=!1}},c.setupTypeNumber=function(u){for(var p=r.getBCHTypeNumber(this.typeNumber),f=0;f<18;f++){var y=!u&&(p>>f&1)==1;this.modules[Math.floor(f/3)][f%3+this.moduleCount-8-3]=y}for(var f=0;f<18;f++){var y=!u&&(p>>f&1)==1;this.modules[f%3+this.moduleCount-8-3][Math.floor(f/3)]=y}},c.setupTypeInfo=function(u,p){for(var f=this.errorCorrectLevel<<3|p,y=r.getBCHTypeInfo(f),v=0;v<15;v++){var S=!u&&(y>>v&1)==1;v<6?this.modules[v][8]=S:v<8?this.modules[v+1][8]=S:this.modules[this.moduleCount-15+v][8]=S}for(var v=0;v<15;v++){var S=!u&&(y>>v&1)==1;v<8?this.modules[8][this.moduleCount-v-1]=S:v<9?this.modules[8][15-v-1+1]=S:this.modules[8][15-v-1]=S}this.modules[this.moduleCount-8][8]=!u},c.mapData=function(u,p){for(var f=-1,y=this.moduleCount-1,v=7,S=0,P=this.moduleCount-1;P>0;P-=2)for(P==6&&P--;;){for(var T=0;T<2;T++)if(this.modules[y][P-T]==null){var b=!1;S<u.length&&(b=(u[S]>>>v&1)==1);var w=r.getMask(p,y,P-T);w&&(b=!b),this.modules[y][P-T]=b,v--,v==-1&&(S++,v=7)}if(y+=f,y<0||this.moduleCount<=y){y-=f,f=-f;break}}},l.PAD0=236,l.PAD1=17,l.createData=function(u,p,f){for(var y=e.getRSBlocks(u,p),v=new n,S=0;S<f.length;S++){var P=f[S];v.put(P.mode,4),v.put(P.getLength(),r.getLengthInBits(P.mode,u)),P.write(v)}for(var T=0,S=0;S<y.length;S++)T+=y[S].dataCount;if(v.getLengthInBits()>T*8)throw new Error("code length overflow. ("+v.getLengthInBits()+">"+T*8+")");for(v.getLengthInBits()+4<=T*8&&v.put(0,4);v.getLengthInBits()%8!=0;)v.putBit(!1);for(;!(v.getLengthInBits()>=T*8||(v.put(l.PAD0,8),v.getLengthInBits()>=T*8));)v.put(l.PAD1,8);return l.createBytes(v,y)},l.createBytes=function(u,p){for(var f=0,y=0,v=0,S=new Array(p.length),P=new Array(p.length),T=0;T<p.length;T++){var b=p[T].dataCount,w=p[T].totalCount-b;y=Math.max(y,b),v=Math.max(v,w),S[T]=new Array(b);for(var D=0;D<S[T].length;D++)S[T][D]=255&u.buffer[D+f];f+=b;var O=r.getErrorCorrectPolynomial(w),N=new s(S[T],O.getLength()-1),M=N.mod(O);P[T]=new Array(O.getLength()-1);for(var D=0;D<P[T].length;D++){var F=D+M.getLength()-P[T].length;P[T][D]=F>=0?M.get(F):0}}for(var j=0,D=0;D<p.length;D++)j+=p[D].totalCount;for(var L=new Array(j),z=0,D=0;D<y;D++)for(var T=0;T<p.length;T++)D<S[T].length&&(L[z++]=S[T][D]);for(var D=0;D<v;D++)for(var T=0;T<p.length;T++)D<P[T].length&&(L[z++]=P[T][D]);return L},Ph=l,Ph}var Ba={},iC;function tH(){if(iC)return Ba;iC=1,Object.defineProperty(Ba,"__esModule",{value:!0});var i=Object.assign||function(f){for(var y=1;y<arguments.length;y++){var v=arguments[y];for(var S in v)Object.prototype.hasOwnProperty.call(v,S)&&(f[S]=v[S])}return f},e=zh(),n=l(e),r=hs(),s=l(r);function l(f){return f&&f.__esModule?f:{default:f}}function c(f,y){var v={};for(var S in f)y.indexOf(S)>=0||Object.prototype.hasOwnProperty.call(f,S)&&(v[S]=f[S]);return v}var u={bgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,bgD:n.default.string.isRequired,fgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,fgD:n.default.string.isRequired,size:n.default.number.isRequired,title:n.default.string,viewBoxSize:n.default.number.isRequired,xmlns:n.default.string},p=(0,r.forwardRef)(function(f,y){var v=f.bgColor,S=f.bgD,P=f.fgD,T=f.fgColor,b=f.size,w=f.title,D=f.viewBoxSize,O=f.xmlns,N=O===void 0?"http://www.w3.org/2000/svg":O,M=c(f,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return s.default.createElement("svg",i({},M,{height:b,ref:y,viewBox:"0 0 "+D+" "+D,width:b,xmlns:N}),w?s.default.createElement("title",null,w):null,s.default.createElement("path",{d:S,fill:v}),s.default.createElement("path",{d:P,fill:T}))});return p.displayName="QRCodeSvg",p.propTypes=u,Ba.default=p,Ba}var oC;function nH(){if(oC)return Wi;oC=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.QRCode=void 0;var i=Object.assign||function(b){for(var w=1;w<arguments.length;w++){var D=arguments[w];for(var O in D)Object.prototype.hasOwnProperty.call(D,O)&&(b[O]=D[O])}return b},e=zh(),n=v(e),r=f_(),s=v(r),l=eH(),c=v(l),u=hs(),p=v(u),f=tH(),y=v(f);function v(b){return b&&b.__esModule?b:{default:b}}function S(b,w){var D={};for(var O in b)w.indexOf(O)>=0||Object.prototype.hasOwnProperty.call(b,O)&&(D[O]=b[O]);return D}var P={bgColor:n.default.oneOfType([n.default.object,n.default.string]),fgColor:n.default.oneOfType([n.default.object,n.default.string]),level:n.default.string,size:n.default.number,value:n.default.string.isRequired},T=(0,u.forwardRef)(function(b,w){var D=b.bgColor,O=D===void 0?"#FFFFFF":D,N=b.fgColor,M=N===void 0?"#000000":N,F=b.level,j=F===void 0?"L":F,L=b.size,z=L===void 0?256:L,W=b.value,H=S(b,["bgColor","fgColor","level","size","value"]),K=new c.default(-1,s.default[j]);K.addData(W),K.make();var ie=K.modules;return p.default.createElement(y.default,i({},H,{bgColor:O,bgD:ie.map(function(ee,ae){return ee.map(function(ne,ce){return ne?"":"M "+ce+" "+ae+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:M,fgD:ie.map(function(ee,ae){return ee.map(function(ne,ce){return ne?"M "+ce+" "+ae+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:w,size:z,viewBoxSize:ie.length}))});return Wi.QRCode=T,T.displayName="QRCode",T.propTypes=P,Wi.default=T,Wi}var rH=nH();const sC=Xe(rH),iH=i=>{const e=ks(),{isConnected:n}=i,{state:{devSchema:r,schema:s,launchOptions:l,selectedLaunchOption:c,debugMode:u,debugSetting:p,gameDetail:f,user:y},setShowManualBindIP:v,setSelectedLaunchOption:S,setDebugMode:P}=pn(),[T,b]=E.useState(!1),w=Rg(y),D=f?.request_allowed_domains?.length??0,O=!p.enableDomainCheck,N=!O&&D===0,M=u===qn.clientPreview,F=c?.pkgType==="independent"?x("independentPackage"):x("mainPackage"),j=c?.id==="normal"?x("normalLaunchMode"):c?.name||x("normalLaunchMode"),L=x(M?"clientPreviewMode":"browserDebugMode"),z=x(M?"homeSession.mode.clientPreviewDesc":"homeSession.mode.remoteDebugDesc"),W=O?x("homeSession.domainCheck.disabled"):D>0?x("homeSession.domainCheck.enabledWithDomains",{count:String(D)}):x("homeSession.domainCheck.enabledNoDomains"),H=O?x("homeSession.domainCheck.disabledDesc"):D>0?x("homeSession.domainCheck.enabledWithDomainsDesc"):x("homeSession.domainCheck.enabledNoDomainsDesc"),K=E.useMemo(()=>{try{if(!r)return null;const ne=new URL(r),ce=(ne.searchParams.get("host")||"").trim(),de=ne.searchParams.get("host_list")||"";let V=[];if(de)try{V=JSON.parse(decodeURIComponent(de))}catch{V=[]}const Y=ce==="127.0.0.1"||ce==="localhost",I=Array.isArray(V)&&V.length>0;return Y||!I?{host:ce,hostList:V}:null}catch{return{host:"",hostList:[]}}},[r]),ie=ne=>{ne.status==="success"&&b(!1),ne.status==="failed"&&b(!1),ne.status==="start"&&b(!0)},ee=ne=>{P(ne),q0(ne)};E.useEffect(()=>(Ee.on("scanQRCode",ie),()=>{Ee.off("scanQRCode",ie)}),[]);const ae=ne=>{if(ne==="created")S({...Ha,name:""}),e("/launch_mode");else{const ce=l.find(de=>de.id===ne);ce&&S(ce)}};return n?k.jsx("div",{className:"qr-code-container-connected",children:k.jsxs("div",{className:"qr-code-connected-content",children:[k.jsx("div",{className:"qr-code-tile qr-code-tile-connected",children:k.jsx(sC,{className:"qr-code-connected",size:150,value:s,bgColor:"transparent",fgColor:"#0e0f13"})}),k.jsxs("div",{className:"qr-code-connected-info",children:[k.jsx("div",{className:"qr-code-connected-desc-title",children:x("scanQRCodeChange")}),k.jsx("div",{className:"qr-code-connected-desc",children:x("scanQRCodeDesc")})]}),k.jsxs("div",{className:"qr-code-session-panel",children:[k.jsxs("div",{className:"qr-code-session-header",children:[k.jsx("span",{children:x("homeSession.title")}),k.jsx("span",{className:"qr-code-session-mode-tag",children:L})]}),k.jsxs("div",{className:"qr-code-session-grid",children:[k.jsxs("div",{className:"qr-code-session-item",children:[k.jsx("span",{children:x("homeSession.modeLabel")}),k.jsx("strong",{children:L}),k.jsx("p",{children:z})]}),k.jsxs("div",{className:"qr-code-session-item",children:[k.jsx("span",{children:x("homeSession.entryLabel")}),k.jsx("strong",{children:j}),k.jsx("p",{children:`${F}${c?.scene?` · ${c.scene}`:""}`})]}),k.jsxs("div",{className:"qr-code-session-item",children:[k.jsx("span",{children:x("homeSession.domainLabel")}),k.jsx("strong",{children:W}),k.jsx("p",{children:H})]})]}),k.jsxs("div",{className:"qr-code-session-checks",children:[k.jsx("span",{className:`qr-code-session-check ${O?"is-muted":""}`,children:x(O?"homeSession.chip.domainCheckOff":"homeSession.chip.domainCheckOn")}),k.jsx("span",{className:`qr-code-session-check ${p.enableVConsole?"":"is-muted"}`,children:p.enableVConsole?x("homeSession.chip.vConsoleOn"):x("homeSession.chip.vConsoleOff")}),k.jsx("span",{className:`qr-code-session-check ${p.enableDevInfoPanel?"":"is-muted"}`,children:p.enableDevInfoPanel?x("homeSession.chip.devPanelOn"):x("homeSession.chip.devPanelOff")})]}),k.jsxs("div",{className:`qr-code-session-hint ${N?"is-warning":""}`,children:[k.jsx("strong",{children:x(N?"homeSession.risk.domainTitle":M?"homeSession.diff.clientPreviewTitle":"homeSession.diff.remoteDebugTitle")}),k.jsx("span",{children:x(N?"homeSession.risk.domainDesc":M?"homeSession.diff.clientPreviewDesc":"homeSession.diff.remoteDebugDesc")})]})]})]})}):k.jsxs("div",{className:"qr-code-container-disconnected",children:[k.jsx("div",{className:"qr-code-select-container",children:k.jsx($r,{className:"qr-code-launch-select",value:c?.id,onChange:ae,placeholder:x("selectLaunchMode"),style:{width:"216px"},optionList:l.map(ne=>({label:ne.id==="normal"?x("normalLaunchMode"):ne.id==="created"?x("createdLaunchMode"):ne.name,value:ne.id}))})}),k.jsxs("div",{className:"qr-code-content",children:[K?k.jsx(fg,{style:{marginBottom:12},bordered:!1,icon:null,closeIcon:null,fullMode:!1,type:"danger",title:x("networkNoLanIPTitle"),description:k.jsxs("div",{children:[k.jsx("div",{style:{marginBottom:8},children:x("networkNoLanIPDesc")}),k.jsx(tt,{size:"small",type:"primary",onClick:()=>v(!0),children:x("networkNoLanIPAction")})]})}):null,k.jsxs("div",{className:"qr-code-schema",children:[k.jsx("div",{className:"qr-code-tile",children:k.jsx(sC,{size:256,value:r,bgColor:"transparent",fgColor:"#0e0f13"})}),k.jsxs(hg,{className:"qr-code-mode-switches",children:[k.jsx(tt,{className:`qr-code-mode-button ${u==="browserDebug"?"is-active":""}`,theme:"borderless",type:"tertiary",size:"small",onClick:()=>ee("browserDebug"),children:x("browserDebugMode")}),k.jsx(tt,{className:`qr-code-mode-button ${u==="clientPreview"?"is-active":""}`,onClick:()=>ee("clientPreview"),theme:"borderless",type:"tertiary",size:"small",children:x("clientPreviewMode")})]}),T&&k.jsxs("div",{className:"qr-code-spin",children:[k.jsx(Mr,{size:"large"}),k.jsx("div",{className:"qr-code-text",children:x("scanning")})]})]}),k.jsxs("div",{className:"qr-code-side-panel",children:[k.jsxs("div",{className:"qr-code-diagnostics-card",children:[k.jsx("div",{className:"qr-code-diagnostics-card-copy",children:k.jsx(Qe.Text,{children:x("netDiagEntryDesc")})}),k.jsx(tt,{className:"qr-code-diagnostics-entry",theme:"light",size:"small",onClick:()=>e("/network_diagnostics"),children:x("netDiagEntryAction")})]}),w?null:k.jsxs("div",{className:"qr-code-login-guide",children:[k.jsxs("div",{className:"qr-code-login-guide-copy",children:[k.jsx(Qe.Text,{strong:!0,children:x("basicDebugGuide.entryTitle")}),k.jsx(Qe.Text,{children:x("basicDebugGuide.entryDesc")})]}),k.jsx(tt,{theme:"light",onClick:()=>e("/basic_debug_guide"),children:x("basicDebugGuide.entryAction")})]})]})]})]})},oH=[{key:"domain-check",labelKey:"debugSettingDomainCheck",descriptionKey:"devOptionsDomainCheckDesc",getChecked:i=>!i.enableDomainCheck,getNextSetting:(i,e)=>({...i,enableDomainCheck:!e})},{key:"ad-mock",labelKey:"debugSettingAdMock",descriptionKey:"debugSettingAdMockDesc",getChecked:i=>i.enableAdMock,getNextSetting:(i,e)=>({...i,enableAdMock:e})},{key:"iap-mock",labelKey:"debugSettingIAPMock",descriptionKey:"debugSettingIAPMockDesc",getChecked:i=>i.enableIAPMock,getNextSetting:(i,e)=>({...i,enableIAPMock:e})},{key:"dev-info-panel",labelKey:"debugSettingDevInfoPanel",descriptionKey:"debugSettingEnableDevInfoPanelDesc",getChecked:i=>i.enableDevInfoPanel,getNextSetting:(i,e)=>({...i,enableDevInfoPanel:e})},{key:"vconsole",labelKey:"debugSettingVConsole",descriptionKey:"debugSettingEnableVconsoleDesc",isAvailable:i=>i!==qn.browserDebug,getChecked:i=>i.enableVConsole,getNextSetting:(i,e)=>({...i,enableVConsole:e})}];function sH({debugMode:i,debugSetting:e,onChange:n}){return oH.filter(r=>!r.isAvailable||r.isAvailable(i)).map(r=>({key:r.key,checked:r.getChecked(e),label:x(r.labelKey),description:x(r.descriptionKey),onChange:s=>n(r.getNextSetting(e,s))}))}const aH=()=>{const{state:{debugSetting:i,debugMode:e},setDebugSetting:n}=pn(),r=c=>{n(c)},s=()=>{Ts.send({method:"setDebugSettings",payload:i})};E.useEffect(()=>(Ee.on("connectionChange",s),()=>{Ee.off("connectionChange",s)}),[s]);const l=sH({debugMode:e,debugSetting:i,onChange:r});return k.jsx("div",{className:"debug-setting-card",children:k.jsxs(kl,{style:{width:"100%"},children:[k.jsx("div",{className:"debug-setting-head",children:k.jsx(Qe.Text,{style:{fontWeight:"bold",fontSize:16},children:x("devOptions")})}),k.jsx("div",{className:"debug-setting-row",children:l.map(c=>k.jsxs("div",{className:"debug-setting-item",children:[k.jsxs("div",{className:"debug-setting-item-head",children:[k.jsx(Pg,{className:"debug-setting-switch",checked:c.checked,onChange:c.onChange}),k.jsx(Qe.Text,{className:"debug-setting-item-title",children:c.label})]}),k.jsx(Qe.Text,{className:"debug-setting-item-desc",type:"tertiary",children:c.description})]},c.key))})]})})};function y_(){return{ip:Pe.get("clientHost")||localStorage.getItem("clientHost")||"",port:Pe.get("clientHttpPort")||localStorage.getItem("clientHttpPort")||"",wsPort:Pe.get("clientWsPort")||localStorage.getItem("clientWsPort")||""}}function oV(i=y_()){return!!(String(i.ip||"").trim()&&String(i.port||"").trim()&&String(i.wsPort||"").trim())}function lH(i){const{ip:e,port:n,wsPort:r}=i;Pe.setMultiple({clientHost:e,clientWsPort:r,clientHttpPort:n}),Vi.send({method:"manualConnect",payload:{clientHost:e,clientWsPort:r,clientHttpPort:n}}),Ts.init({clientWsPort:r,clientHost:e,clientHttpPort:n}),localStorage.setItem("clientHost",e),localStorage.setItem("clientWsPort",r),localStorage.setItem("clientHttpPort",n)}function aC(i){const e=String(i.ip||""),n=String(i.port||""),r=String(i.wsPort||"");Pe.setMultiple({clientHost:e,clientWsPort:r,clientHttpPort:n}),localStorage.setItem("clientHost",e),localStorage.setItem("clientWsPort",r),localStorage.setItem("clientHttpPort",n)}const v_=i=>{const{onClose:e,onSuccess:n,onValuesChange:r,onConnectResult:s,getFormApi:l,layout:c="default"}=i,[u,p]=E.useState(!1),[f,y]=E.useState({}),v=(L,z=3e3)=>new Promise(W=>{let H=!1;const K=setTimeout(()=>{if(!H){H=!0;try{ie?.close()}catch{}W({ok:!1,message:x("connectivityTimeout")})}},z);let ie=null;try{ie=new WebSocket(L),ie.onopen=()=>{if(!H){H=!0,clearTimeout(K);try{ie?.close()}catch{}W({ok:!0,message:x("connectivityOK")})}},ie.onerror=()=>{H||(H=!0,clearTimeout(K),W({ok:!1,message:x("connectivityFailed")}))}}catch{clearTimeout(K),W({ok:!1,message:x("connectivityFailed")})}}),S=async L=>{if(!j(L)){s?.({ok:!1,message:x("connectivityMissingParams")});return}p(!0),lH(L);const{ip:z,wsPort:W}=L,H=await v(`ws://${z}:${W}`);s?.(H),H.ok&&n?.(),p(!1)},P=E.useMemo(()=>y_(),[]),[T,b]=E.useState(P),w=E.useRef(P),D=E.useRef(null),O=E.useRef(null),N=E.useRef(null),M=L=>{const z={...w.current,...L};w.current=z,b(z),y(W=>({...W,...L.ip!==void 0?{ip:void 0}:{},...L.port!==void 0?{port:void 0}:{},...L.wsPort!==void 0?{wsPort:void 0}:{}})),r?.(z),aC(z)},F=()=>{const L=D.current?.querySelector("input")?.value,z=O.current?.querySelector("input")?.value,W=N.current?.querySelector("input")?.value,H={ip:String(L||""),port:String(z||""),wsPort:String(W||"")};(H.ip!==w.current.ip||H.port!==w.current.port||H.wsPort!==w.current.wsPort)&&M(H)};E.useEffect(()=>{w.current=P,b(P),r?.(P),aC(P)},[P]),E.useEffect(()=>{const L=[0,80,300,800].map(z=>window.setTimeout(()=>F(),z));return()=>{L.forEach(z=>window.clearTimeout(z))}},[]),E.useEffect(()=>{l?.({getValues:()=>w.current,submitForm:()=>S(w.current)})},[l]);const j=L=>{const z={};return String(L.ip||"").trim()||(z.ip=x("debug.guide.manualBindIPInvalid")),String(L.port||"").trim()||(z.port=x("invalidPort")),String(L.wsPort||"").trim()||(z.wsPort=x("invalidPort")),y(z),Object.keys(z).length===0};return k.jsxs("div",{className:`manual-connection-form manual-connection-form-${c}`,children:[c==="default"?k.jsx("div",{className:"manual-connection-tip",children:x("manualConnectDialogDesc")}):null,k.jsxs("div",{className:"manual-connection-grid",children:[k.jsxs("div",{className:"manual-connection-field",children:[k.jsxs("div",{className:"manual-connection-label",children:[k.jsx(Qe.Text,{strong:!0,children:"Client IP "}),k.jsx(Qe.Text,{type:"danger",children:"*"})]}),k.jsx("div",{ref:D,children:k.jsx(as,{value:T.ip,onChange:L=>M({ip:String(L||"")}),onBlur:F,placeholder:"192.168.x.x"})}),f.ip?k.jsx(Qe.Text,{type:"danger",children:f.ip}):null]}),k.jsxs("div",{className:"manual-connection-field",children:[k.jsxs("div",{className:"manual-connection-label",children:[k.jsx(Qe.Text,{strong:!0,children:"Port 1(HTTP 端口) "}),k.jsx(Qe.Text,{type:"danger",children:"*"})]}),k.jsx("div",{ref:O,children:k.jsx(as,{value:T.port,onChange:L=>M({port:String(L||"")}),onBlur:F,placeholder:"3000"})}),f.port?k.jsx(Qe.Text,{type:"danger",children:f.port}):null]}),k.jsxs("div",{className:"manual-connection-field",children:[k.jsxs("div",{className:"manual-connection-label",children:[k.jsx(Qe.Text,{strong:!0,children:"Port 2(WS 端口) "}),k.jsx(Qe.Text,{type:"danger",children:"*"})]}),k.jsx("div",{ref:N,children:k.jsx(as,{value:T.wsPort,onChange:L=>M({wsPort:String(L||"")}),onBlur:F,placeholder:"2999"})}),f.wsPort?k.jsx(Qe.Text,{type:"danger",children:f.wsPort}):null]})]}),e?k.jsxs("div",{className:"manual-connection-footer",children:[k.jsx(tt,{type:"tertiary",onClick:()=>e(),disabled:u,children:x("cancel")}),k.jsx(tt,{type:"primary",theme:"solid",onClick:()=>S(w.current),loading:u,children:x("manualConnectConfirm")})]}):null]})},cH=()=>{const{state:{showManualBindIP:i},setShowManualBindIP:e}=pn();return k.jsx(zt,{className:"manual-connection-modal",width:520,title:x("manualBindClientDebugServiceTitle"),visible:i,showCancel:!1,onCancel:()=>e(!1),showOk:!1,footer:null,children:k.jsx(v_,{onClose:()=>e(!1),onSuccess:()=>e(!1)})})},uH=()=>{const{state:{isConnected:i,message:e}}=E.useContext(Tg),n=e?.intent==="uploading",r=Math.max(0,Math.min(100,Math.round((e?.progress??0)*100))),s=!!e?.title;return k.jsxs("div",{"data-doc-shot":"start-debug-qr-idle",className:`home-container ${i?"home-container-connected":""}`,children:[k.jsx(H9,{title:x(i?"homeHeroTitleConnected":"homeHeroTitle"),subtitle:x(i?"homeHeroSubtitleConnected":"homeHeroSubtitle")}),k.jsxs("div",{className:Q("home-status-banner",`home-status-banner-${e?.type??"info"}`,{"home-status-banner-uploading":n}),"aria-live":"polite",children:[k.jsx("span",{className:"home-status-dot"}),k.jsxs("div",{className:"home-status-copy",children:[e?.title?k.jsx("div",{className:"home-status-title",children:e.title}):null,e?.desc?k.jsx("div",{className:Q("home-status-desc",{"home-status-desc-standalone":!s}),children:e.desc}):null]}),n?k.jsxs("div",{className:"home-status-progress-value",children:[r,"%"]}):null,n?k.jsx("div",{className:"home-status-progress-track",children:k.jsx("span",{className:"home-status-progress-fill",style:{width:`${r}%`}})}):null]}),k.jsx(iH,{isConnected:i}),!i&&k.jsx(aH,{})]})},dH="https://bytedance.larkoffice.com/wiki/WvifwWjGri7bTzkPbqKcqVi5ntc";function pH(i){try{return i?(new URL(i).searchParams.get("port")||"").trim():""}catch{return""}}function fH(i,e){return i?i.ok?"success":i.code==="status"?"warning":"error":e?"running":"idle"}function hH(i){return x(i==="success"?"connectivityOK":i==="warning"?"netDiagStatusWarning":i==="error"?"connectivityNotOK":i==="running"?"netDiagStatusRunning":"netDiagStatusIdle")}function gH(i,e){return i?i.ok?x("netDiagCheckReachableDetail"):i.msg||x("connectivityFailed"):x(e?"netDiagCheckRunningDetail":"netDiagCheckIdleDetail")}function mH({hasChecked:i,running:e,nodeHttp:n,nodeWs:r,clientHttp:s,clientWs:l,hasClientEndpoint:c}){return e?{kind:"running",title:x("netDiagSummaryRunningTitle"),desc:x("netDiagSummaryRunningDesc"),suggestions:[x("netDiagSummaryRunningHint")]}:i?c?n&&!n.ok?{kind:"node-service",title:x("netDiagSummaryNodeTitle"),desc:x("netDiagSummaryNodeDesc"),suggestions:[x("netDiagSuggestNodeDesc"),x("netDiagSuggestNodeRestart")]}:r&&!r.ok?{kind:"node-service",title:x("netDiagSummaryNodeTitle"),desc:x("netDiagSummaryNodeWsDesc"),suggestions:[x("netDiagSuggestNodeDesc")]}:s?.ok&&l&&!l.ok?{kind:"client-ws-failed",title:x("netDiagSummaryClientWsTitle"),desc:x("netDiagSummaryClientWsDesc"),suggestions:[x("netDiagSuggestClientDebugService"),x("netDiagSuggestWsBlocked"),x("netDiagSuggestPhoneProxyFallback")]}:s&&!s.ok&&l&&!l.ok?{kind:"client-both-failed",title:x("netDiagSummaryClientBothTitle"),desc:x("netDiagSummaryClientBothDesc"),suggestions:[x("netDiagSuggestClientDebugService"),x("netDiagSuggestLanAndProxy"),x("netDiagSuggestPhoneProxyFallback")]}:n?.ok&&r?.ok&&s?.ok&&l?.ok?{kind:"healthy",title:x("netDiagSummaryHealthyTitle"),desc:x("netDiagSummaryHealthyDesc"),suggestions:[x("netDiagSuggestOkDesc")]}:{kind:"partial",title:x("netDiagSummaryPartialTitle"),desc:x("netDiagSummaryPartialDesc"),suggestions:[x("netDiagSummaryPartialHint")]}:{kind:"missing-client",title:x("netDiagSummaryMissingClientTitle"),desc:x("netDiagSummaryMissingClientDesc"),suggestions:[x("netDiagSuggestNoClientDesc")]}:c?{kind:"idle",title:x("netDiagSummaryIdleTitle"),desc:x("netDiagSummaryIdleDesc"),suggestions:[x("netDiagSummaryIdleHint")]}:{kind:"missing-client",title:x("netDiagSummaryMissingClientTitle"),desc:x("netDiagSummaryMissingClientDesc"),suggestions:[x("netDiagSuggestNoClientDesc")]}}const lC=(i,e=3e3)=>new Promise(n=>{let r=!1;const s=setTimeout(()=>{if(!r){r=!0;try{l?.close()}catch{}n({ok:!1,code:"timeout",msg:x("connectivityTimeout")})}},e);let l=null;try{l=new WebSocket(i),l.onopen=()=>{if(!r){r=!0,clearTimeout(s);try{l?.close()}catch{}n({ok:!0,code:"ok"})}},l.onerror=()=>{r||(r=!0,clearTimeout(s),n({ok:!1,code:"error",msg:x("connectivityFailed")}))}}catch{clearTimeout(s),n({ok:!1,code:"error",msg:x("connectivityFailed")})}}),cC=async i=>{try{const e=new AbortController,n=setTimeout(()=>e.abort(),3e3),r=await fetch(i,{method:"GET",cache:"no-store",signal:e.signal});return clearTimeout(n),r.ok?{ok:!0,code:"ok"}:{ok:!1,code:"status",msg:`${r.status} ${r.statusText}`}}catch(e){return e instanceof DOMException&&e.name==="AbortError"?{ok:!1,code:"timeout",msg:x("connectivityTimeout")}:{ok:!1,code:"error",msg:x("connectivityFailed")}}},yH=()=>{const i=ks(),{state:{devSchema:e,schema:n}}=pn(),r=E.useRef(0),[s,l]=E.useState(!1),[c,u]=E.useState(!1),[p,f]=E.useState(!0),[y,v]=E.useState(!1),[S,P]=E.useState(!1),[T,b]=E.useState(),[w,D]=E.useState(),[O,N]=E.useState(),[M,F]=E.useState(),[j,L]=E.useState(!1),[z,W]=E.useState(null),[H,K]=E.useState(()=>({ip:String(Pe.get("clientHost")||localStorage.getItem("clientHost")||""),port:String(Pe.get("clientHttpPort")||localStorage.getItem("clientHttpPort")||""),wsPort:String(Pe.get("clientWsPort")||localStorage.getItem("clientWsPort")||"")})),ie=E.useMemo(()=>({ip:String(H.ip||""),port:String(H.port||""),wsPort:String(H.wsPort||"")}),[H]),ee=E.useCallback(re=>{K(re)},[]),ae=E.useMemo(()=>{const{nodeWsPort:re,clientHost:oe,clientHttpPort:_e,clientWsPort:ye}=Pe.getMultiple(["nodeWsPort","clientHost","clientHttpPort","clientWsPort"]);let ve="";try{n&&(ve=(new URL(n).searchParams.get("host")||"").trim())}catch{}return{schemaHost:ve,httpPort:pH(n),nodeWsPort:re,clientHost:oe,clientHttpPort:_e,clientWsPort:ye}},[e,n]),ne=String(ie.ip||ae.clientHost||"").trim(),ce=String(ie.port||ae.clientHttpPort||"").trim(),de=String(ie.wsPort||ae.clientWsPort||"").trim(),V=E.useCallback(async()=>{L(!0),l(!0),b(void 0),D(void 0),N(void 0),F(void 0);const re=await cC("/game/config");b(re);const oe=ae.nodeWsPort;D(oe?await lC(`ws://localhost:${oe}`):{ok:!1,code:"error",msg:x("connectivityMissingParams")}),N(ne&&ce?await cC(`http://${ne}:${ce}/game/scripts/krypton.js`):{ok:!1,code:"error",msg:x("netDiagMissingClientHttp")}),F(ne&&de?await lC(`ws://${ne}:${de}`):{ok:!1,code:"error",msg:x("netDiagMissingClientWs")}),P(!0),l(!1)},[ae.nodeWsPort,ne,ce,de]);E.useEffect(()=>{V()},[V]);const Y=E.useMemo(()=>[{key:"node-http",title:x("netDiagCheckNodeHttp"),target:"/game/config",item:T},{key:"node-ws",title:x("netDiagCheckNodeWs"),target:ae.nodeWsPort?`ws://localhost:${ae.nodeWsPort}`:"-",item:w},{key:"client-http",title:x("netDiagCheckClientHttp"),target:ne&&ce?`http://${ne}:${ce}`:"-",item:O},{key:"client-ws",title:x("netDiagCheckClientWs"),target:ne&&de?`ws://${ne}:${de}`:"-",item:M}],[O,M,ae.nodeWsPort,T,w,ne,ce,de]),I=E.useMemo(()=>mH({hasChecked:j,running:s,nodeHttp:T,nodeWs:w,clientHttp:O,clientWs:M,hasClientEndpoint:!!(ne&&ce&&de)}),[O,M,j,T,w,ne,ce,de,s]),U=I.suggestions,se=E.useCallback(()=>{r.current=window.scrollY,W(null),v(!0)},[]);return E.useEffect(()=>{if(!y)return;const re=()=>{window.scrollTo({top:r.current,left:0})},oe=window.requestAnimationFrame(re),_e=window.setTimeout(re,80);return()=>{window.cancelAnimationFrame(oe),window.clearTimeout(_e)}},[y]),k.jsxs("div",{className:"check-network-container",children:[k.jsxs("div",{className:"check-network-hero",children:[k.jsx("div",{className:"check-network-back",children:k.jsxs("button",{type:"button",className:"check-network-back-link",onClick:()=>i("/"),children:[k.jsx(O9,{size:14,strokeWidth:2}),k.jsx("span",{children:x("back")})]})}),k.jsx("div",{className:"check-network-hero-head",children:k.jsxs("div",{className:"check-network-hero-copy",children:[k.jsx("div",{className:"check-network-hero-title",children:x("netDiagTitle")}),k.jsx("div",{className:"check-network-hero-subtitle",children:x("netDiagSubtitle")})]})})]}),k.jsxs("section",{className:`check-network-section check-network-summary-result check-network-summary-result-${I.kind}`,children:[k.jsxs("div",{className:"check-network-section-headline",children:[k.jsx("div",{children:k.jsxs("div",{className:"check-network-title-row",children:[k.jsx("div",{className:"check-network-section-title",children:x("netDiagSummaryTitle")}),k.jsx(p_,{className:"check-network-title-link",href:dH,children:x("netDiagOpenTroubleshoot")})]})}),k.jsx(tt,{className:"check-network-section-toggle",theme:"borderless",onClick:()=>f(re=>!re),children:x(p?"netDiagCollapse":"netDiagExpand")})]}),p?k.jsxs(k.Fragment,{children:[k.jsxs("div",{className:"check-network-summary-main",children:[k.jsx("div",{className:"check-network-summary-eyebrow",children:x("netDiagGuideEyebrow")}),k.jsx("div",{className:"check-network-summary-result-title",children:I.title}),k.jsx("div",{className:"check-network-summary-result-desc",children:I.desc})]}),k.jsxs("div",{className:"check-network-guide-panel",children:[k.jsx("div",{className:"check-network-guide-label",children:x("netDiagGuideStepsTitle")}),k.jsx("div",{className:"check-network-suggestion-list",children:U.map((re,oe)=>k.jsxs("div",{className:"check-network-suggestion-item",children:[k.jsx("span",{className:"check-network-suggestion-index",children:oe+1}),k.jsx("span",{className:"check-network-suggestion-text",children:re})]},`${re}_${oe}`))})]})]}):null]}),k.jsxs("section",{className:"check-network-section check-network-manual-entry",children:[k.jsxs("div",{className:"check-network-section-headline",children:[k.jsxs("div",{children:[k.jsx("div",{className:"check-network-section-title",children:x("netDiagManualBindEntry")}),k.jsx("div",{className:"check-network-suggest-desc",children:x("netDiagManualSectionDesc")})]}),k.jsxs("div",{className:"check-network-manual-entry-actions",children:[k.jsx(tt,{className:"check-network-recheck-action",theme:"borderless",loading:s,onClick:()=>{V()},children:x("netDiagRunAll")}),k.jsx(tt,{className:"check-network-next-step-action",theme:"solid",type:"primary",onClick:se,children:x("netDiagActionManualConnect")})]})]}),z?k.jsx("div",{className:`check-network-inline-result ${z.ok?"success":"error"}`,children:z.ok?x("netDiagManualConnectResultSuccess"):`${x("netDiagManualConnectResultError")} ${z.message}`}):null]}),k.jsxs("section",{className:"check-network-section check-network-env-section",children:[k.jsxs("div",{className:"check-network-section-headline",children:[k.jsxs("div",{children:[k.jsx("div",{className:"check-network-section-title",children:x("netDiagEnvTitle")}),k.jsx("div",{className:"check-network-suggest-desc",children:x("netDiagEnvSectionDesc")})]}),k.jsx(tt,{className:"check-network-section-toggle",theme:"borderless",onClick:()=>u(re=>!re),children:x(c?"netDiagCollapse":"netDiagExpand")})]}),c?k.jsxs("div",{className:"check-network-summary-grid",children:[k.jsxs("div",{className:"check-network-summary-card",children:[k.jsx("div",{className:"check-network-summary-title",children:x("netDiagComputerGroup")}),k.jsxs("div",{className:"check-network-kv",children:[k.jsx("span",{children:x("netDiagEnvIP")}),k.jsx("span",{children:ae.schemaHost||"-"})]}),k.jsxs("div",{className:"check-network-kv",children:[k.jsx("span",{children:x("netDiagEnvWsPort")}),k.jsx("span",{children:ae.nodeWsPort||"-"})]}),k.jsxs("div",{className:"check-network-kv",children:[k.jsx("span",{children:x("netDiagEnvHttpPort")}),k.jsx("span",{children:ae.httpPort||"-"})]})]}),k.jsxs("div",{className:"check-network-summary-card",children:[k.jsx("div",{className:"check-network-summary-title",children:x("netDiagClientGroup")}),k.jsxs("div",{className:"check-network-kv",children:[k.jsx("span",{children:"IP"}),k.jsx("span",{children:ne||"-"})]}),k.jsxs("div",{className:"check-network-kv",children:[k.jsx("span",{children:x("netDiagEnvWsPort")}),k.jsx("span",{children:de||"-"})]}),k.jsxs("div",{className:"check-network-kv",children:[k.jsx("span",{children:x("netDiagEnvHttpPort")}),k.jsx("span",{children:ce||"-"})]})]})]}):null]}),k.jsxs("section",{className:"check-network-section check-network-check-section",children:[k.jsxs("div",{className:"check-network-section-headline",children:[k.jsxs("div",{children:[k.jsx("div",{className:"check-network-section-title",children:x("netDiagChecksTitle")}),k.jsx("div",{className:"check-network-suggest-desc",children:x("netDiagCheckSectionDesc")})]}),k.jsx(tt,{className:"check-network-section-toggle",theme:"borderless",onClick:()=>P(re=>!re),children:x(S?"netDiagCollapse":"netDiagExpand")})]}),S?k.jsx("div",{className:"check-network-checks",children:Y.map(re=>{const oe=fH(re.item,s&&j);return k.jsxs("div",{className:`check-network-check-card check-network-check-${oe}`,children:[k.jsxs("div",{className:"check-network-check-main",children:[k.jsxs("div",{className:"check-network-check-title-row",children:[k.jsx("span",{className:"check-network-check-dot"}),k.jsx("span",{className:"check-network-check-title",children:re.title})]}),k.jsxs("div",{className:"check-network-check-meta",children:[k.jsx("span",{className:"check-network-check-target",children:re.target}),k.jsx("span",{className:"check-network-check-detail",children:gH(re.item,s&&j)})]})]}),k.jsx("span",{className:`check-network-check-badge check-network-check-badge-${oe}`,children:hH(oe)})]},re.key)})}):null]}),k.jsxs(zt,{className:"manual-connection-modal check-network-manual-modal",width:560,title:x("manualBindClientDebugServiceTitle"),visible:y,showCancel:!1,showOk:!1,footer:null,onCancel:()=>v(!1),children:[k.jsx(v_,{onClose:()=>v(!1),onSuccess:()=>v(!1),onValuesChange:ee,onConnectResult:re=>{W(re),V()}}),z&&!z.ok?k.jsx("div",{className:"check-network-inline-result error",children:`${x("netDiagManualConnectResultError")} ${z.message}`}):null]})]})},vH=E.lazy(()=>lt(()=>import("./index-CozQgXOx.js"),__vite__mapDeps([22,23,24,25,26,27])).then(i=>({default:i.ProjectDetail}))),bH=E.lazy(()=>lt(()=>import("./index-DhK1XTMu.js"),__vite__mapDeps([28,10,11])).then(i=>({default:i.DebugSetting}))),SH=E.lazy(()=>lt(()=>import("./index-BCdOYP-_.js"),__vite__mapDeps([29,30,31,7,8,9,10,11,12,32])).then(i=>({default:i.LaunchMode}))),wH=E.lazy(()=>lt(()=>import("./index-ChtjciM4.js"),__vite__mapDeps([33,7,8,9,10,11,12,25,34])).then(i=>({default:i.CheckCode}))),CH=E.lazy(()=>lt(()=>import("./index-BuiCnshQ.js"),__vite__mapDeps([35,36])).then(i=>({default:i.BasicDebugGuide}))),_H=E.lazy(()=>lt(()=>import("./index-Cw4SLGVh.js"),__vite__mapDeps([37,23,24,38,39])).then(i=>({default:i.ChangeLog}))),kH=E.lazy(()=>lt(()=>import("./index-DpnThngH.js"),__vite__mapDeps([40,23,41,24,42,43,44,19])).then(i=>({default:i.IntegrationAssistant}))),PH=E.lazy(()=>lt(()=>import("./Detail-1nSjYvRw.js"),__vite__mapDeps([45,46,47,23,24,30,31,7,8,9,10,11,12,42,43,48,38])).then(i=>({default:i.IntegrationAssistantDetail}))),TH=E.lazy(()=>lt(()=>import("./MonetizationMode-hwWN5zUT.js"),__vite__mapDeps([49,46,47,23,24,41,42,43,44,19])).then(i=>({default:i.IntegrationAssistantMonetizationMode}))),EH=E.lazy(()=>lt(()=>import("./index-Do7tPKef.js"),__vite__mapDeps([50,51])).then(i=>({default:i.ManualConnect}))),xH=E.lazy(()=>lt(()=>import("./index-qycdeV7S.js"),__vite__mapDeps([52,23,24,53,8,9,54,7,10,11,12,48,38,55,17])).then(i=>({default:i.WasmCodeSplit}))),DH=E.lazy(()=>lt(()=>import("./index-DyHfBQPm.js"),__vite__mapDeps([56,24,20,44,57])).then(i=>({default:i.Performance}))),OH=E.lazy(()=>lt(()=>import("./index-CaArjQkD.js"),__vite__mapDeps([58,23,24,53,8,9,54,26,59])).then(i=>({default:i.SubpackageCollect}))),IH=()=>k.jsx("div",{className:"routes-container",children:k.jsx(E.Suspense,{fallback:k.jsx(u_,{}),children:k.jsxs(hU,{children:[k.jsx(st,{path:"/",element:k.jsx(uH,{})}),k.jsx(st,{path:"/integration_assistant",element:k.jsx(kH,{})}),k.jsx(st,{path:"/integration_assistant/mode/:modeKey",element:k.jsx(TH,{})}),k.jsx(st,{path:"/integration_assistant/:capabilityKey",element:k.jsx(PH,{})}),k.jsx(st,{path:"/project_overview",element:k.jsx(vH,{})}),k.jsx(st,{path:"/project_detail",element:k.jsx(hh,{to:"/project_overview",replace:!0})}),k.jsx(st,{path:"/basic_debug_guide",element:k.jsx(CH,{})}),k.jsx(st,{path:"/debug_setting",element:k.jsx(bH,{})}),k.jsx(st,{path:"/launch_mode",element:k.jsx(SH,{})}),k.jsx(st,{path:"/upload_publish",element:k.jsx(wH,{})}),k.jsx(st,{path:"/version_upload",element:k.jsx(hh,{to:"/upload_publish",replace:!0})}),k.jsx(st,{path:"/precheck_code",element:k.jsx(hh,{to:"/upload_publish",replace:!0})}),k.jsx(st,{path:"/network_diagnostics",element:k.jsx(yH,{})}),k.jsx(st,{path:"/manual_connect",element:k.jsx(EH,{})}),k.jsx(st,{path:"/changelog",element:k.jsx(_H,{})}),k.jsx(st,{path:"/wasm_split",element:k.jsx(xH,{})}),k.jsx(st,{path:"/performance",element:k.jsx(DH,{})}),k.jsx(st,{path:"/subpackage_collect",element:k.jsx(OH,{})})]})})});function RH(){const{state:{loading:i,error:e,user:n}}=pn(),{topErrorItems:r,updateGameDetailTopErrors:s,updateConfigTopErrors:l,updateGameDetailAccessErrors:c}=l9(),{fetchGameDetail:u}=p9({onSuccess:s,updateGameDetailAccessErrors:c}),{isServerError:p,serverErrorMsg:f}=f9({fetchGameDetail:u,updateConfigTopErrors:l}),y=Dl();return h9({onResourceChange:u}),E.useEffect(()=>{const v=async S=>{if(S.status!=="update_wasm_split_config_done")return;const P=await Qi({url:"/game/config",method:"GET"});P.error||l({currentUser:n,checkResult:P.data?.checkResult})};return Ee.on("unitySplitStatus",v),()=>{Ee.off("unitySplitStatus",v)}},[l,n]),p&&!i.visible?k.jsxs("div",{className:"server-error-container",children:[k.jsx(JU,{}),k.jsx("div",{className:"server-error-text",children:f})]}):k.jsxs($U,{children:[k.jsx(V9,{items:r,fallbackErrorText:e.text}),k.jsx(G9,{enabled:!y&&!i.visible&&!p}),k.jsx(Q9,{}),k.jsx(cH,{}),k.jsxs("div",{className:"main-layout",children:[k.jsx(q9,{}),k.jsxs("div",{className:"content-wrapper",children:[k.jsx(U9,{}),k.jsx(IH,{})]})]}),k.jsx(u_,{})]})}hW();SP.createRoot(document.getElementById("root")).render(k.jsx(yg,{children:k.jsx(yW,{children:k.jsx(RH,{})})}));export{vl as $,O9 as A,tt as B,kl as C,p_ as D,Sl as E,Xt as F,mi as G,Gn as H,cD as I,g as J,ar as K,Ar as L,me as M,Ua as N,bl as O,H9 as P,sC as Q,C as R,ws as S,Qe as T,nV as U,rV as V,v_ as W,Lr as X,Mn as Y,zr as Z,Te as _,Ft as a,CT as a$,Qa as a0,er as a1,ds as a2,dh as a3,or as a4,Ee as a5,hg as a6,Dl as a7,Dg as a8,y_ as a9,_x as aA,Th as aB,nw as aC,Tx as aD,Wf as aE,Uo as aF,Ho as aG,Cx as aH,Eh as aI,rw as aJ,fT as aK,at as aL,ss as aM,ir as aN,Rr as aO,ug as aP,fi as aQ,us as aR,_n as aS,t0 as aT,as as aU,fE as aV,iT as aW,Mh as aX,hl as aY,AO as aZ,Yi as a_,oV as aa,lH as ab,zt as ac,Fh as ad,lr as ae,Zt as af,IG as ag,Ui as ah,MH as ai,$H as aj,Nr as ak,GH as al,BH as am,yl as an,qH as ao,AH as ap,zH as aq,FH as ar,QC as as,ai as at,nr as au,Xe as av,oT as aw,dn as ax,Zh as ay,kx as az,Qi as b,Nb as b$,Hh as b0,Zi as b1,UT as b2,ul as b3,FO as b4,SE as b5,IC as b6,PC as b7,fC as b8,ZE as b9,QP as bA,YP as bB,wC as bC,WC as bD,YC as bE,Fr as bF,Tn as bG,pl as bH,Uh as bI,RT as bJ,ml as bK,Cl as bL,Ya as bM,tr as bN,jT as bO,GE as bP,Bh as bQ,LE as bR,ZP as bS,PP as bT,NO as bU,qE as bV,gE as bW,WT as bX,ci as bY,LH as bZ,KE as b_,al as ba,dl as bb,Yt as bc,Vh as bd,kC as be,$h as bf,CE as bg,tl as bh,Kh as bi,rE as bj,wP as bk,IE as bl,zC as bm,MO as bn,$O as bo,BC as bp,Jn as bq,wT as br,KH as bs,ng as bt,QO as bu,gT as bv,gl as bw,og as bx,KC as by,yE as bz,Nl as c,TC as c0,WD as c1,UD as c2,Hi as c3,MD as c4,YH as c5,XP as c6,rD as c7,rx as c8,Za as c9,fI as ca,CD as cb,UH as cc,Pg as cd,HH as ce,VH as cf,Ki as cg,Mr as d,cW as e,ks as f,Ng as g,Rg as h,x as i,k as j,Jh as k,eg as l,fg as m,$r as n,Ih as o,Bn as p,iV as q,E as r,tW as s,xe as t,pn as u,tV as v,It as w,ww as x,gt as y,Q as z};
|
|
21
|
+
Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let y=lr(),v;if(e){let w=typeof e=="string"?no(e):e;He(p==="/"||w.pathname?.startsWith(p),`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 "${p}" but pathname "${w.pathname}" was given in the \`location\` prop.`),v=w}else v=y;let S=v.pathname||"/",P=S;if(p!=="/"){let w=p.replace(/^\//,"").split("/");P="/"+S.replace(/^\//,"").split("/").slice(w.length).join("/")}let T=H0(i,{pathname:P});kn(f||T!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),kn(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.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 b=oU(T&&T.map(w=>Object.assign({},w,{params:Object.assign({},c,w.params),pathname:zn([p,r.encodeLocation?r.encodeLocation(w.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?p:zn([p,r.encodeLocation?r.encodeLocation(w.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),s,n);return e&&b?E.createElement(_s.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...v},navigationType:"POP"}},b):b}function tU(){let i=uU(),e=qW(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),n=i instanceof Error?i.stack:null,r="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:r},l={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",i),c=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:l},"ErrorBoundary")," or"," ",E.createElement("code",{style:l},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},e),n?E.createElement("pre",{style:s},n):null,c)}var nU=E.createElement(tU,null),r_=class extends E.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,e){return e.location!==i.location||e.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:e.error,location:e.location,revalidation:i.revalidation||e.revalidation}}componentDidCatch(i,e){this.props.onError?this.props.onError(i,e):console.error("React Router caught the following error during render",i)}render(){let i=this.state.error;if(this.context&&typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){const n=YW(i.digest);n&&(i=n)}let e=i!==void 0?E.createElement(En.Provider,{value:this.props.routeContext},E.createElement(Lg.Provider,{value:i,children:this.props.component})):this.props.children;return this.context?E.createElement(rU,{error:i},e):e}};r_.contextType=UW;var fh=new WeakMap;function rU({children:i,error:e}){let{basename:n}=E.useContext(Jt);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=XW(e.digest);if(r){let s=fh.get(e);if(s)throw s;let l=X0(r.location,n);if(Q0&&!fh.get(e))if(l.isExternal||r.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:r.replace}));throw fh.set(e,c),c}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return i}function iU({routeContext:i,match:e,children:n}){let r=E.useContext(ro);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),E.createElement(En.Provider,{value:i},n)}function oU(i,e=[],n){let r=n?.state;if(i==null){if(!r)return null;if(r.errors)i=r.matches;else if(e.length===0&&!r.initialized&&r.matches.length>0)i=r.matches;else return null}let s=i,l=r?.errors;if(l!=null){let y=s.findIndex(v=>v.route.id&&l?.[v.route.id]!==void 0);He(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),s=s.slice(0,Math.min(s.length,y+1))}let c=!1,u=-1;if(n&&r){c=r.renderFallback;for(let y=0;y<s.length;y++){let v=s[y];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(u=y),v.route.id){let{loaderData:S,errors:P}=r,T=v.route.loader&&!S.hasOwnProperty(v.route.id)&&(!P||P[v.route.id]===void 0);if(v.route.lazy||T){n.isStatic&&(c=!0),u>=0?s=s.slice(0,u+1):s=[s[0]];break}}}}let p=n?.onError,f=r&&p?(y,v)=>{p(y,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:GW(r.matches),errorInfo:v})}:void 0;return s.reduceRight((y,v,S)=>{let P,T=!1,b=null,w=null;r&&(P=l&&v.route.id?l[v.route.id]:void 0,b=v.route.errorElement||nU,c&&(u<0&&S===0?(i_("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),T=!0,w=null):u===S&&(T=!0,w=v.route.hydrateFallbackElement||null)));let D=e.concat(s.slice(0,S+1)),O=()=>{let N;return P?N=b:T?N=w:v.route.Component?N=E.createElement(v.route.Component,null):v.route.element?N=v.route.element:N=y,E.createElement(iU,{match:v,routeContext:{outlet:y,matches:D,isDataRoute:r!=null},children:N})};return r&&(v.route.ErrorBoundary||v.route.errorElement||S===0)?E.createElement(r_,{location:r.location,revalidation:r.revalidation,component:b,error:P,children:O(),routeContext:{outlet:null,matches:D,isDataRoute:!0},onError:f}):O()},null)}function Ag(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sU(i){let e=E.useContext(ro);return He(e,Ag(i)),e}function aU(i){let e=E.useContext(Il);return He(e,Ag(i)),e}function lU(i){let e=E.useContext(En);return He(e,Ag(i)),e}function Mg(i){let e=lU(i),n=e.matches[e.matches.length-1];return He(n.route.id,`${i} can only be used on routes that contain a unique "id"`),n.route.id}function cU(){return Mg("useRouteId")}function uU(){let i=E.useContext(Lg),e=aU("useRouteError"),n=Mg("useRouteError");return i!==void 0?i:e.errors?.[n]}function dU(){let{router:i}=sU("useNavigate"),e=Mg("useNavigate"),n=E.useRef(!1);return t_(()=>{n.current=!0}),E.useCallback(async(s,l={})=>{kn(n.current,e_),n.current&&(typeof s=="number"?await i.navigate(s):await i.navigate(s,{fromRouteId:e,...l}))},[i,e])}var zw={};function i_(i,e,n){!e&&!zw[i]&&(zw[i]=!0,kn(!1,n))}E.memo(pU);function pU({routes:i,future:e,state:n,isStatic:r,onError:s}){return n_(i,void 0,{state:n,isStatic:r,onError:s})}function hh({to:i,replace:e,state:n,relative:r}){He(io(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=E.useContext(Jt);kn(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:l}=E.useContext(En),{pathname:c}=lr(),u=ks(),p=Ol(i,jg(l),c,r==="path"),f=JSON.stringify(p);return E.useEffect(()=>{u(JSON.parse(f),{replace:e,state:n,relative:r})},[u,f,r,e,n]),null}function st(i){He(!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 fU({basename:i="/",children:e=null,location:n,navigationType:r="POP",navigator:s,static:l=!1,unstable_useTransitions:c}){He(!io(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=i.replace(/^\/*/,"/"),p=E.useMemo(()=>({basename:u,navigator:s,static:l,unstable_useTransitions:c,future:{}}),[u,s,l,c]);typeof n=="string"&&(n=no(n));let{pathname:f="/",search:y="",hash:v="",state:S=null,key:P="default",unstable_mask:T}=n,b=E.useMemo(()=>{let w=sr(f,u);return w==null?null:{location:{pathname:w,search:y,hash:v,state:S,key:P,unstable_mask:T},navigationType:r}},[u,f,y,v,S,P,r,T]);return kn(b!=null,`<Router basename="${u}"> is not able to match the URL "${f}${y}${v}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:E.createElement(Jt.Provider,{value:p},E.createElement(_s.Provider,{children:e,value:b}))}function hU({children:i,location:e}){return eU(jh(i),e)}function jh(i,e=[]){let n=[];return E.Children.forEach(i,(r,s)=>{if(!E.isValidElement(r))return;let l=[...e,s];if(r.type===E.Fragment){n.push.apply(n,jh(r.props.children,l));return}He(r.type===st,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),He(!r.props.index||!r.props.children,"An index route cannot have child routes.");let c={id:r.props.id||l.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(c.children=jh(r.props.children,l)),n.push(c)}),n}var Va="get",Ka="application/x-www-form-urlencoded";function Rl(i){return typeof HTMLElement<"u"&&i instanceof HTMLElement}function gU(i){return Rl(i)&&i.tagName.toLowerCase()==="button"}function mU(i){return Rl(i)&&i.tagName.toLowerCase()==="form"}function yU(i){return Rl(i)&&i.tagName.toLowerCase()==="input"}function vU(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function bU(i,e){return i.button===0&&(!e||e==="_self")&&!vU(i)}var za=null;function SU(){if(za===null)try{new FormData(document.createElement("form"),0),za=!1}catch{za=!0}return za}var wU=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gh(i){return i!=null&&!wU.has(i)?(kn(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ka}"`),null):i}function CU(i,e){let n,r,s,l,c;if(mU(i)){let u=i.getAttribute("action");r=u?sr(u,e):null,n=i.getAttribute("method")||Va,s=gh(i.getAttribute("enctype"))||Ka,l=new FormData(i)}else if(gU(i)||yU(i)&&(i.type==="submit"||i.type==="image")){let u=i.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=i.getAttribute("formaction")||u.getAttribute("action");if(r=p?sr(p,e):null,n=i.getAttribute("formmethod")||u.getAttribute("method")||Va,s=gh(i.getAttribute("formenctype"))||gh(u.getAttribute("enctype"))||Ka,l=new FormData(u,i),!SU()){let{name:f,type:y,value:v}=i;if(y==="image"){let S=f?`${f}.`:"";l.append(`${S}x`,"0"),l.append(`${S}y`,"0")}else f&&l.append(f,v)}}else{if(Rl(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Va,r=null,s=Ka,c=i}return l&&s==="text/plain"&&(c=l,l=void 0),{action:r,method:n.toLowerCase(),encType:s,formData:l,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function $g(i,e){if(i===!1||i===null||typeof i>"u")throw new Error(e)}function _U(i,e,n,r){let s=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${r}`:s.pathname=`${s.pathname}.${r}`:s.pathname==="/"?s.pathname=`_root.${r}`:e&&sr(s.pathname,e)==="/"?s.pathname=`${e.replace(/\/$/,"")}/_root.${r}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${r}`,s}async function kU(i,e){if(i.id in e)return e[i.id];try{let n=await import(i.module);return e[i.id]=n,n}catch(n){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function PU(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function TU(i,e,n){let r=await Promise.all(i.map(async s=>{let l=e.routes[s.route.id];if(l){let c=await kU(l,n);return c.links?c.links():[]}return[]}));return OU(r.flat(1).filter(PU).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Bw(i,e,n,r,s,l){let c=(p,f)=>n[f]?p.route.id!==n[f].route.id:!0,u=(p,f)=>n[f].pathname!==p.pathname||n[f].route.path?.endsWith("*")&&n[f].params["*"]!==p.params["*"];return l==="assets"?e.filter((p,f)=>c(p,f)||u(p,f)):l==="data"?e.filter((p,f)=>{let y=r.routes[p.route.id];if(!y||!y.hasLoader)return!1;if(c(p,f)||u(p,f))return!0;if(p.route.shouldRevalidate){let v=p.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(i,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function EU(i,e,{includeHydrateFallback:n}={}){return xU(i.map(r=>{let s=e.routes[r.route.id];if(!s)return[];let l=[s.module];return s.clientActionModule&&(l=l.concat(s.clientActionModule)),s.clientLoaderModule&&(l=l.concat(s.clientLoaderModule)),n&&s.hydrateFallbackModule&&(l=l.concat(s.hydrateFallbackModule)),s.imports&&(l=l.concat(s.imports)),l}).flat(1))}function xU(i){return[...new Set(i)]}function DU(i){let e={},n=Object.keys(i).sort();for(let r of n)e[r]=i[r];return e}function OU(i,e){let n=new Set;return new Set(e),i.reduce((r,s)=>{let l=JSON.stringify(DU(s));return n.has(l)||(n.add(l),r.push({key:l,link:s})),r},[])}function o_(){let i=E.useContext(ro);return $g(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function IU(){let i=E.useContext(Il);return $g(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var Fg=E.createContext(void 0);Fg.displayName="FrameworkContext";function s_(){let i=E.useContext(Fg);return $g(i,"You must render this element inside a <HydratedRouter> element"),i}function RU(i,e){let n=E.useContext(Fg),[r,s]=E.useState(!1),[l,c]=E.useState(!1),{onFocus:u,onBlur:p,onMouseEnter:f,onMouseLeave:y,onTouchStart:v}=e,S=E.useRef(null);E.useEffect(()=>{if(i==="render"&&c(!0),i==="viewport"){let b=D=>{D.forEach(O=>{c(O.isIntersecting)})},w=new IntersectionObserver(b,{threshold:.5});return S.current&&w.observe(S.current),()=>{w.disconnect()}}},[i]),E.useEffect(()=>{if(r){let b=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(b)}}},[r]);let P=()=>{s(!0)},T=()=>{s(!1),c(!1)};return n?i!=="intent"?[l,S,{}]:[l,S,{onFocus:ts(u,P),onBlur:ts(p,T),onMouseEnter:ts(f,P),onMouseLeave:ts(y,T),onTouchStart:ts(v,P)}]:[!1,S,{}]}function ts(i,e){return n=>{i&&i(n),n.defaultPrevented||e(n)}}function NU({page:i,...e}){let{router:n}=o_(),r=E.useMemo(()=>H0(n.routes,i,n.basename),[n.routes,i,n.basename]);return r?E.createElement(LU,{page:i,matches:r,...e}):null}function jU(i){let{manifest:e,routeModules:n}=s_(),[r,s]=E.useState([]);return E.useEffect(()=>{let l=!1;return TU(i,e,n).then(c=>{l||s(c)}),()=>{l=!0}},[i,e,n]),r}function LU({page:i,matches:e,...n}){let r=lr(),{future:s,manifest:l,routeModules:c}=s_(),{basename:u}=o_(),{loaderData:p,matches:f}=IU(),y=E.useMemo(()=>Bw(i,e,f,l,r,"data"),[i,e,f,l,r]),v=E.useMemo(()=>Bw(i,e,f,l,r,"assets"),[i,e,f,l,r]),S=E.useMemo(()=>{if(i===r.pathname+r.search+r.hash)return[];let b=new Set,w=!1;if(e.forEach(O=>{let N=l.routes[O.route.id];!N||!N.hasLoader||(!y.some(M=>M.route.id===O.route.id)&&O.route.id in p&&c[O.route.id]?.shouldRevalidate||N.hasClientLoader?w=!0:b.add(O.route.id))}),b.size===0)return[];let D=_U(i,u,s.unstable_trailingSlashAwareDataRequests,"data");return w&&b.size>0&&D.searchParams.set("_routes",e.filter(O=>b.has(O.route.id)).map(O=>O.route.id).join(",")),[D.pathname+D.search]},[u,s.unstable_trailingSlashAwareDataRequests,p,r,l,y,e,i,c]),P=E.useMemo(()=>EU(v,l),[v,l]),T=jU(v);return E.createElement(E.Fragment,null,S.map(b=>E.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...n})),P.map(b=>E.createElement("link",{key:b,rel:"modulepreload",href:b,...n})),T.map(({key:b,link:w})=>E.createElement("link",{key:b,nonce:n.nonce,...w,crossOrigin:w.crossOrigin??n.crossOrigin})))}function AU(...i){return e=>{i.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var MU=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{MU&&(window.__reactRouterVersion="7.13.1")}catch{}function $U({basename:i,children:e,unstable_useTransitions:n,window:r}){let s=E.useRef();s.current==null&&(s.current=vW({window:r,v5Compat:!0}));let l=s.current,[c,u]=E.useState({action:l.action,location:l.location}),p=E.useCallback(f=>{n===!1?u(f):E.startTransition(()=>u(f))},[n]);return E.useLayoutEffect(()=>l.listen(p),[l,p]),E.createElement(fU,{basename:i,children:e,location:c.location,navigationType:c.action,navigator:l,unstable_useTransitions:n})}var a_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,l_=E.forwardRef(function({onClick:e,discover:n="render",prefetch:r="none",relative:s,reloadDocument:l,replace:c,unstable_mask:u,state:p,target:f,to:y,preventScrollReset:v,viewTransition:S,unstable_defaultShouldRevalidate:P,...T},b){let{basename:w,navigator:D,unstable_useTransitions:O}=E.useContext(Jt),N=typeof y=="string"&&a_.test(y),M=X0(y,w);y=M.to;let F=ZW(y,{relative:s}),j=lr(),L=null;if(u){let ne=Ol(u,[],j.unstable_mask?j.unstable_mask.pathname:"/",!0);w!=="/"&&(ne.pathname=ne.pathname==="/"?w:zn([w,ne.pathname])),L=D.createHref(ne)}let[z,W,H]=RU(r,T),K=qU(y,{replace:c,unstable_mask:u,state:p,target:f,preventScrollReset:v,relative:s,viewTransition:S,unstable_defaultShouldRevalidate:P,unstable_useTransitions:O});function ie(ne){e&&e(ne),ne.defaultPrevented||K(ne)}let ee=!(M.isExternal||l),ae=E.createElement("a",{...T,...H,href:(ee?L:void 0)||M.absoluteURL||F,onClick:ee?ie:e,ref:AU(b,W),target:f,"data-discover":!N&&n==="render"?"true":void 0});return z&&!N?E.createElement(E.Fragment,null,ae,E.createElement(NU,{page:F})):ae});l_.displayName="Link";var FU=E.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:r="",end:s=!1,style:l,to:c,viewTransition:u,children:p,...f},y){let v=Ps(c,{relative:f.relative}),S=lr(),P=E.useContext(Il),{navigator:T,basename:b}=E.useContext(Jt),w=P!=null&&VU(v)&&u===!0,D=T.encodeLocation?T.encodeLocation(v).pathname:v.pathname,O=S.pathname,N=P&&P.navigation&&P.navigation.location?P.navigation.location.pathname:null;n||(O=O.toLowerCase(),N=N?N.toLowerCase():null,D=D.toLowerCase()),N&&b&&(N=sr(N,b)||N);const M=D!=="/"&&D.endsWith("/")?D.length-1:D.length;let F=O===D||!s&&O.startsWith(D)&&O.charAt(M)==="/",j=N!=null&&(N===D||!s&&N.startsWith(D)&&N.charAt(D.length)==="/"),L={isActive:F,isPending:j,isTransitioning:w},z=F?e:void 0,W;typeof r=="function"?W=r(L):W=[r,F?"active":null,j?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let H=typeof l=="function"?l(L):l;return E.createElement(l_,{...f,"aria-current":z,className:W,ref:y,style:H,to:c,viewTransition:u},typeof p=="function"?p(L):p)});FU.displayName="NavLink";var zU=E.forwardRef(({discover:i="render",fetcherKey:e,navigate:n,reloadDocument:r,replace:s,state:l,method:c=Va,action:u,onSubmit:p,relative:f,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:S,...P},T)=>{let{unstable_useTransitions:b}=E.useContext(Jt),w=UU(),D=HU(u,{relative:f}),O=c.toLowerCase()==="get"?"get":"post",N=typeof u=="string"&&a_.test(u),M=F=>{if(p&&p(F),F.defaultPrevented)return;F.preventDefault();let j=F.nativeEvent.submitter,L=j?.getAttribute("formmethod")||c,z=()=>w(j||F.currentTarget,{fetcherKey:e,method:L,navigate:n,replace:s,state:l,relative:f,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:S});b&&n!==!1?E.startTransition(()=>z()):z()};return E.createElement("form",{ref:T,method:O,action:D,onSubmit:r?p:M,...P,"data-discover":!N&&i==="render"?"true":void 0})});zU.displayName="Form";function BU(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function c_(i){let e=E.useContext(ro);return He(e,BU(i)),e}function qU(i,{target:e,replace:n,unstable_mask:r,state:s,preventScrollReset:l,relative:c,viewTransition:u,unstable_defaultShouldRevalidate:p,unstable_useTransitions:f}={}){let y=ks(),v=lr(),S=Ps(i,{relative:c});return E.useCallback(P=>{if(bU(P,e)){P.preventDefault();let T=n!==void 0?n:fs(v)===fs(S),b=()=>y(i,{replace:T,unstable_mask:r,state:s,preventScrollReset:l,relative:c,viewTransition:u,unstable_defaultShouldRevalidate:p});f?E.startTransition(()=>b()):b()}},[v,y,S,n,r,s,e,i,l,c,u,p,f])}var GU=0,WU=()=>`__${String(++GU)}__`;function UU(){let{router:i}=c_("useSubmit"),{basename:e}=E.useContext(Jt),n=cU(),r=i.fetch,s=i.navigate;return E.useCallback(async(l,c={})=>{let{action:u,method:p,encType:f,formData:y,body:v}=CU(l,e);if(c.navigate===!1){let S=c.fetcherKey||WU();await r(S,n,c.action||u,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:v,formMethod:c.method||p,formEncType:c.encType||f,flushSync:c.flushSync})}else await s(c.action||u,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:v,formMethod:c.method||p,formEncType:c.encType||f,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[r,s,e,n])}function HU(i,{relative:e}={}){let{basename:n}=E.useContext(Jt),r=E.useContext(En);He(r,"useFormAction must be used inside a RouteContext");let[s]=r.matches.slice(-1),l={...Ps(i||".",{relative:e})},c=lr();if(i==null){l.search=c.search;let u=new URLSearchParams(l.search),p=u.getAll("index");if(p.some(y=>y==="")){u.delete("index"),p.filter(v=>v).forEach(v=>u.append("index",v));let y=u.toString();l.search=y?`?${y}`:""}}return(!i||i===".")&&s.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(l.pathname=l.pathname==="/"?n:zn([n,l.pathname])),fs(l)}function VU(i,{relative:e}={}){let n=E.useContext(Z0);He(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=c_("useViewTransitionState"),s=Ps(i,{relative:e});if(!n.isTransitioning)return!1;let l=sr(n.currentLocation.pathname,r)||n.currentLocation.pathname,c=sr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return el(s.pathname,c)!=null||el(s.pathname,l)!=null}var KU=Object.defineProperty,qw=Object.getOwnPropertySymbols,QU=Object.prototype.hasOwnProperty,XU=Object.prototype.propertyIsEnumerable,Gw=(i,e,n)=>e in i?KU(i,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[e]=n,YU=(i,e)=>{for(var n in e||(e={}))QU.call(e,n)&&Gw(i,n,e[n]);if(qw)for(var n of qw(e))XU.call(e,n)&&Gw(i,n,e[n]);return i};function ZU(i){return E.createElement("svg",YU({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,"aria-hidden":!0},i),E.createElement("rect",{width:200,height:200,fill:"transparent"}),E.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)"}),E.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"}),E.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"}),E.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"}),E.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"}),E.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"}),E.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"}),E.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"}),E.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"}),E.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"}),E.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"}),E.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"}),E.createElement("ellipse",{cx:127.42,cy:86.0081,rx:2.47934,ry:2.47934,fill:"white",stroke:"#515151"}),E.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}),E.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"}),E.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 JU=ZU;function e9(){return document.getElementById(Eg)?.contentWindow}class t9{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 n=`ws://${e.clientHost}:${e.clientWsPort||e.clientHttpPort-1}`;console.info(`⌛️ ${x("startConnectClientWS",{wsURL:n})}`);const r=new WebSocket(n);this.connectTimeoutTimer=setTimeout(()=>{r.readyState!==WebSocket.OPEN&&(this.isTimeout=!0,r.close(),console.error(`${x("clientConnectTimeout")||"客户端连接超时"}`),Ee.emit("connectionChange",{node:Pe.get("isNodeWSConnected"),client:!1,from:"client",reason:"timeout"}),Nw())},5e3),r.onclose=()=>{this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.isTimeout||(console.error(`${x("clientServerDisconnected")}`),Ee.emit("connectionChange",{node:Pe.get("isNodeWSConnected"),client:!1,from:"client",reason:"close"}),Nw())},r.onerror=()=>{if(this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),!this.isTimeout){const s=x("clientServerStartError");Ee.emit("connectionChange",{node:Pe.get("isNodeWSConnected"),client:!1,from:"client",reason:"error"}),console.error(s)}},this.ws=r,r.onopen=()=>{this.connectTimeoutTimer&&(clearTimeout(this.connectTimeoutTimer),this.connectTimeoutTimer=void 0),this.isTimeout||(console.log(`✅ ${x("clientConnectedSuccess")}`),Ee.emit("connectionChange",{node:Pe.get("isNodeWSConnected"),client:!0,from:"client",reason:"open"}),r.send(JSON.stringify({stage:"connecting",status:"success",message:"Browser connected to Client Server Successfully"})))},r.onmessage=function(s){try{const l=JSON.parse(s.data),c=e9();switch(l?.method){case"subscribeHandler":c?.__DEV__?.subscribeHandler?.(l?.payload?.event,l?.payload?.data);break;case"invokeHandler":c?.__DEV__?.invokeHandler?.(l?.payload?.callbackId,l?.payload?.data);break;case"predownloadSubpackage":case"reportScene":l?.payload&&typeof l.payload=="object"&&Ee.emit(l.method,l.payload);break;default:break}}catch(l){console.error(l)}}}send(e){this.ws?.readyState===WebSocket.OPEN&&(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 Ts=new t9,n9={start:{msgKey:"uploadGameStart"},success:{msgKey:"uploadGameSuccess",handle:i=>{const{packages:e,clientKey:n}=i||{};Pe.setMultiple({packages:e,clientKey:n,isResourcesReady:!0}),Ee.emit("setupStatusChange",{isScriptsReady:Pe.get("isScriptsReady"),isResourcesReady:!0})}},process:{msgKey:"uploadProcess"},error:{msgKey:"uploadError",handle:i=>{const{msg:e}=i||{};Pe.set("isResourcesReady",!1),Ee.emit("setupStatusChange",{isScriptsReady:Pe.get("isScriptsReady"),isResourcesReady:!1,isResourcesFailed:!0})}},restart:{msgKey:"uploadGameRestart"}};function r9(i){const{status:e,payload:n}=i,r=n9[e];if(!r){console.warn(`Unknown upload status: ${e}`);return}const s=x(r.msgKey);Ee.emit("uploadGame",{status:e,msg:s,progress:n?.progress}),r.handle&&r.handle(n)}class i9{ws;init(){const e=Pe.get("nodeWsPort");console.info(`⌛️ ${x("nodeServerStartConnect")}`);let n=!1;return this.ws=new WebSocket(`ws://localhost:${e}`),this.ws.onclose=()=>{console.error(`❌ ${x("nodeServerDisconnect")}`),Ee.emit("connectionChange",{node:!1,client:Pe.get("isClientWSConnected"),from:"node",reason:n?"error":"close"})},this.ws.onerror=()=>{n=!0;const r=x("nodeServerStartError");console.error(r),Ee.emit("connectionChange",{node:!1,client:Pe.get("isClientWSConnected"),from:"node",reason:"error"})},this.ws.onopen=()=>{console.log(`✅ ${x("nodeServerConnectedSuccess")}`),Ee.emit("connectionChange",{node:!0,client:Pe.get("isClientWSConnected"),from:"node",reason:"open"}),this.ws?.send(JSON.stringify({event:"connected",method:"connected",from:"browser"}))},this.ws.onmessage=r=>{if(r.data){const s=JSON.parse(r.data);switch(s.method){case"uploadStatus":{r9(s);break}case"compilationStatus":{Ee.emit("compilationStatus",s.payload);break}case"unitySplitStatus":{Ee.emit("unitySplitStatus",s.payload);break}case"resourceChange":{Fn.info("Node WS resourceChange",s?.payload),Ee.emit("resourceChange",{});break}case"scanQRCodeSuccess":{const{clientWsPort:c,clientHost:u,clientHttpPort:p}=s.payload;Pe.setMultiple({clientHost:u,clientWsPort:c,clientHttpPort:p}),Ts.init({clientWsPort:c,clientHost:u,clientHttpPort:p}),Ee.emit("scanQRCode",{status:"success"});break}case"scanQRCodeFailed":{const{msg:c}=s.payload;Ee.emit("scanQRCode",{status:"failed",msg:c});break}}}},!0}send(e){e.from="browser",this.ws?.send(JSON.stringify(e))}close(){this.ws?.close(),this.ws=void 0}}const Vi=new i9,o9=["krypton.js","ttmg-core.js"];async function Ww(i){try{const e=N0();console.log(`⌛️ ${x("startDebug")}`),console.log(`⌛️ ${x("initClientEnv")}`);const n=await Qi({url:`${e}/game/cwd`,method:"POST",data:{command:"start"}});if(console.log(`✅ ${x("initClientEnvSuccess")}`),Ts.send({method:"setDebugSettings",payload:i.debugSetting}),i.debugMode==="clientPreview"||i.debugMode==="clientDebug")Pe.set("isScriptsReady",!0),Vi.send({method:"startUpload"});else{console.log(`⌛️ ${x("startInitJSDevEnv")}`);const s=document.getElementById(Eg).contentWindow;s.__DEV__={isEnable:!0,server:e,nodeStaticBaseUrl:Pe.get("nodeStaticBaseUrl")},console.log(`✅ ${x("initJSDevEnvSuccess")}`);const l=await s9(s,o9,e),c=Object.values(l).some(u=>!u);Pe.set("isScriptsReady",Object.values(l).every(u=>u)),Ee.emit("setupStatusChange",{isScriptsReady:Pe.get("isScriptsReady"),isResourcesReady:Pe.get("isResourcesReady"),isScriptsFailed:c}),c||(console.log(`✅ ${x("setDevScriptsSuccess")}`),Vi.send({method:"startUpload"}))}}catch(e){console.log(`❌ ${x("setDevEnvFailed")}`,e?.message??e)}}async function s9(i,e,n){const r={};for(const s of e)try{console.log(`⏳ ${x("startLoadDevScripts")}: ${s}`);const l=await fetch(`${n}/game/scripts/${s}`);if(!l.ok){console.error(`${x("loadDevScriptsFailed")}: ${s}`),r[s]=!1;continue}const c=await l.text();if(!c){console.error(`${x("loadDevScriptsEmpty")}: ${s}`),r[s]=!1;continue}console.log(`✅ ${x("loadDevScriptsSuccess")}: ${s}`);const u=i.document.createElement("script");u.id=s,u.type="text/javascript",u.text=c,i.document.body.appendChild(u),r[s]=!0,console.log(`✅ ${x("loadDevScriptsInitSuccess")}: ${s}`)}catch(l){console.error(`${x("loadDevScriptsFailed")}: ${s}`,l),r[s]=!1}return r}function a9(){const i=()=>typeof document<"u"?document.hidden:!1,[e,n]=E.useState(i);return E.useEffect(()=>{const r=()=>{n(document.hidden),Ts.send({method:"sendPageVisibility",payload:{isHidden:document.hidden}})};return document.addEventListener("visibilitychange",r),()=>{document.removeEventListener("visibilitychange",r)}},[]),e}function l9(){const[i,e]=E.useState([]),n=E.useRef([]),r=E.useRef([]),s=E.useRef([]),l=E.useRef([]),c=E.useRef([]),u=E.useCallback(()=>{const T=[...c.current,...n.current,...r.current,...s.current,...l.current],b=new Map;T.forEach(w=>{const D=w?.text?.trim();if(!D)return;const O=b.get(D);if(!O){b.set(D,{title:w.title,text:D,required:w.required,detail:w.detail});return}!O.required&&w.required&&b.set(D,{title:O.title??w.title,text:D,required:!0,detail:O.detail??w.detail})}),e(Array.from(b.values()))},[]),p=E.useCallback(T=>{const b=[],w=!T?.terms_of_service_link?.trim(),D=!T?.privacy_policy_link?.trim();return w&&D?(b.push({text:x("policyDependencyTermsPrivacyRequired"),required:!0}),b):(w&&b.push({text:x("policyDependencyTermsRequired"),required:!0}),D&&b.push({text:x("policyDependencyPrivacyRequired"),required:!0}),b)},[]),f=E.useCallback(T=>{const b=[],w=!T?.name?.trim(),D=!T?.display_icon_url?.trim()&&!T?.icon_url?.trim(),O=!T?.description?.trim();return w&&b.push(x("topBasicInfoNameField")),D&&b.push(x("topBasicInfoIconField")),O&&b.push(x("topBasicInfoDescriptionField")),b.length===0?[]:[{text:x("topBasicInfoMissing",{fields:b.join(x("topBasicInfoFieldJoiner"))}),required:!1}]},[]),y=E.useCallback(T=>Rg(T)?[]:[{text:x("topLoginStatusWarning"),required:!1}],[]),v=E.useCallback(T=>{r.current=p(T),s.current=f(T),u()},[f,p,u]),S=E.useCallback(({currentUser:T,checkResult:b=[]})=>{l.current=y(T),n.current=b.filter(w=>w?.passed===!1).map(w=>({text:w.msg,required:w.required===!0,detail:w.detail})),u()},[y,u]),P=E.useCallback(T=>{c.current=T,u()},[u]);return{topErrorItems:i,updateGameDetailTopErrors:v,updateConfigTopErrors:S,updateGameDetailAccessErrors:P}}const Uw="https://developers.tiktok.com/",c9="https://bytedance.larkoffice.com/wiki/PeIawT4M4ia9R8kYyLMcjwHknOg";function u9(i){const e=Ng({errorCode:i.errorCode,user:i.user});if(e==="noPermission")return{link:Uw,text:x("topErrorCtaApplyPermission")};if(e==="networkProxy")return{link:c9,text:x("projectInfo.error.openProxyDoc")};if(e==="notFound"||e==="unknown")return{link:Uw,text:x("topErrorCtaOpenPortal")}}function d9(i){const e=Ng({errorCode:i.errorCode,user:i.user});if(e==="networkProxy")return x("topErrorTitleNetworkProxy");if(e==="noPermission")return x("topErrorTitlePermission");if(e==="notLoggedIn"||e==="loginExpired")return x("topErrorTitleLogin");if(e==="notFound")return x("topErrorTitleProjectNotFound")}function p9({onSuccess:i,updateGameDetailAccessErrors:e}){const{state:{user:n},hideLoading:r,setError:s,setGameDetail:l}=pn(),c=E.useRef(!1),u=E.useRef(!1),p=E.useCallback(f=>{if(c.current){u.current=!0;return}c.current=!0,Qi({url:"/game/detail",method:"GET"}).then(y=>{if(y.error){r();const{errorCode:v,errorMsg:S}=y.error,P=cW({errorCode:v,errorMsg:S,clientKey:y.error.clientKey,user:f??n});l({client_key:y.error.clientKey,has_error:!0,error_msg:S,error_code:v}),s({text:""}),e(P?[{title:d9({errorCode:v,user:f??n}),text:P,required:!0,detail:u9({errorCode:v,user:f??n})}]:[]);return}s({text:""}),e([]),l(y.data),i(y.data),r()}).finally(()=>{c.current=!1,u.current&&(u.current=!1,p(f))})},[r,i,s,l,e,n]);return{fetchGameDetail:p}}function f9({fetchGameDetail:i,updateConfigTopErrors:e}){const{showLoading:n,hideLoading:r,setError:s,setSchema:l,setUser:c,setPackages:u,setDevToolVersion:p,setEngine:f,setDebugMode:y,setMessage:v}=pn(),[S,P]=E.useState(""),T=E.useRef(!1);return E.useEffect(()=>{T.current||(T.current=!0,n(),Qi({url:"/game/config",method:"GET"}).then(b=>{if(b.error){r(),s({visible:!0,text:x("getDevGameConfigFailed")+`: ${b.error.errorMsg}`}),P(x("getDevGameConfigFailed")),console.log(`❌ ${x("getDevGameConfigFailed")}: ${b.error.errorMsg}`);return}const{schema:w,nodeWsPort:D,user:O,packages:N,devToolVersion:M,clientKey:F,engine:j,nodeStaticBaseUrl:L,checkResult:z,lang:W}=b.data;if(IG(W),rW(),console.log(`✅ ${x("getDevGameConfigSuccess")}`),W||Qi({url:"/game/config-fillback",method:"POST",data:{lang:navigator.language}}),l(w),Pe.setMultiple({nodeWsPort:D,email:O?.email,clientKey:F,nodeStaticBaseUrl:L}),c(O),p(M),u(N),f(j),Dl()&&v({type:"success",desc:x("nodeServerConnectedSuccess")}),!B0()){const H=j==="unity"?qn.clientPreview:qn.browserDebug;y(H),q0(H)}i(O),e({currentUser:O,checkResult:z}),r()}))},[i,r,p,f,y,s,u,l,c,v,n,e]),{isServerError:!!S,serverErrorMsg:S}}function h9({onResourceChange:i}){E.useEffect(()=>{const e=()=>{i()};return Ee.on("resourceChange",e),()=>{Ee.off("resourceChange",e)}},[i])}function g9(){const[i,e]=E.useState(()=>fW());E.useEffect(()=>{const s=l=>{if(l.key!=="tt-theme")return;const c=l.newValue;(c==="light"||c==="dark")&&(jw(c),e(c))};return window.addEventListener("storage",s),()=>window.removeEventListener("storage",s)},[]);const n=E.useCallback(s=>{jw(s),e(s)},[]),r=E.useCallback(()=>{n(i==="dark"?"light":"dark")},[i,n]);return{theme:i,setTheme:n,toggle:r}}const m9="modulepreload",y9=function(i){return"/"+i},Hw={},lt=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){let p=function(f){return Promise.all(f.map(y=>Promise.resolve(y).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),u=c?.nonce||c?.getAttribute("nonce");s=p(n.map(f=>{if(f=y9(f),f in Hw)return;Hw[f]=!0;const y=f.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${v}`))return;const S=document.createElement("link");if(S.rel=y?"stylesheet":m9,y||(S.as="script"),S.crossOrigin="",S.href=f,u&&S.setAttribute("nonce",u),document.head.appendChild(S),y)return new Promise((P,T)=>{S.addEventListener("load",P),S.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${f}`)))})}))}function l(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return s.then(c=>{for(const u of c||[])u.status==="rejected"&&l(u.reason);return e().catch(l)})},u_=()=>{const{state:{loading:i}}=pn();return i.visible?k.jsx("div",{className:"loading-container",children:k.jsxs("div",{className:"loading-content",children:[k.jsx(Mr,{size:"large"}),k.jsx("div",{className:"loading-text",children:i.text})]})}):null},v9=({size:i=24,color:e="#000",style:n,className:r})=>k.jsx("div",{style:{display:"flex",alignItems:"center",position:"relative"},children:k.jsxs("svg",{fill:"currentColor",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",width:i,height:i,children:[k.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"}),k.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"})]})}),b9=()=>k.jsxs("div",{className:"logo-container",children:[k.jsx(v9,{size:24}),k.jsx("div",{className:"logo-title",children:x("title")})]});function Vw(i){return x(i==="ok"?"connectStatusConnected":i==="fail"?"connectStatusFailed":"connectStatusDisconnected")}function ns(i){return i==="ok"?"var(--tt-success-text)":i==="fail"?"var(--tt-error-text)":"var(--tt-text-faint)"}function S9(){return Dl()?["subpackage.collecting","subpackage.ready","subpackage.success"].includes(Dg()):!1}const w9=()=>{const{state:{schema:i,isConnected:e},setIsConnected:n,setMessage:r}=pn(),s=e||S9(),[l,c]=E.useState("off"),[u,p]=E.useState("off"),[f,y]=E.useState("off"),v={node:{bg:"var(--tt-info-bg)",stroke:"var(--tt-info-border)",text:"var(--tt-info-text)"},browser:{bg:"var(--tt-success-bg)",stroke:"var(--tt-success-border)",text:"var(--tt-success-text)"},client:{bg:"var(--tt-accent-soft)",stroke:"var(--tt-accent-strong)",text:"var(--tt-accent-text)"}},S=E.useMemo(()=>{const{nodeWsPort:N,clientHost:M,clientHttpPort:F,clientWsPort:j}=Pe.getMultiple(["nodeWsPort","clientHost","clientHttpPort","clientWsPort"]);let L="",z="";try{if(i){const W=new URL(i);L=(W.searchParams.get("host")||"").trim(),z=(W.searchParams.get("port")||"").trim()}}catch{}return{nodeWsPort:N,clientHost:M,clientHttpPort:F,clientWsPort:j,schemaHost:L,schemaPort:z}},[l,u,f,i]),P=N=>{const{client:M,node:F,reason:j}=N||{};Fn.info("connectionChange",M,F),Pe.get("isNodeWSConnected")===F&&(M||r({type:"danger",desc:x("clientServerStartError")})),Pe.get("isClientWSConnected")===M&&(F||r({type:"danger",desc:x("nodeServerStartError")})),Pe.get("isClientWSConnected")&&!M&&(Pe.setMultiple({isClientWSConnected:!1,isResourcesReady:!1,isScriptsReady:!1}),r({type:"danger",desc:x("clientDisconnected")})),Pe.get("isNodeWSConnected")&&!F&&(Pe.setMultiple({isNodeWSConnected:!1,isResourcesReady:!1,isScriptsReady:!1}),r({type:"danger",title:x("serverDisconnected"),desc:x("nodeDisconnected")})),!Pe.get("isClientWSConnected")&&M&&(Pe.set("isClientWSConnected",!0),r({type:"success",desc:x("clientConnectedSuccess")})),!Pe.get("isNodeWSConnected")&&F&&(Pe.set("isNodeWSConnected",!0),r({type:"success",desc:x("nodeServerConnectedSuccess")})),typeof F=="boolean"&&(c(F?"ok":j==="error"||j==="timeout"?"fail":"off"),F||y("off")),typeof M=="boolean"&&p(M?"ok":j==="error"||j==="timeout"?"fail":"off"),n(!!M&&!!F)},T=N=>{if(N?.status==="success"){y("ok");return}if(N?.status==="failed"){y("fail");return}N?.status==="start"&&y("off")};E.useEffect(()=>(Ee.on("connectionChange",P),Ee.on("scanQRCode",T),()=>{Ee.off("connectionChange",P),Ee.off("scanQRCode",T)}),[n]);const b=k.jsxs("div",{children:[k.jsxs("div",{children:[x("connectStatusNode"),": ",Vw(l)]}),k.jsxs("div",{children:[x("connectStatusDebugPage"),": ",window.location.origin]}),S.nodeWsPort?k.jsxs("div",{children:["WS: ws://localhost:",S.nodeWsPort]}):null,k.jsxs("div",{children:["HTTP: ",window.location.origin]}),S.schemaHost&&S.schemaPort?k.jsxs("div",{children:[x("scanQRCode"),":ws://",S.schemaHost,":",S.schemaPort]}):null]}),w=k.jsx("div",{children:k.jsxs("div",{children:[x("connectStatusBrowser"),": ",x("connectStatusConnected")]})}),D=k.jsxs("div",{children:[k.jsxs("div",{children:[x("connectStatusClient"),": ",Vw(u)]}),S.clientHost?k.jsxs("div",{children:[S.clientHost,S.clientHttpPort?` http:${S.clientHttpPort}`:"",S.clientWsPort?` ws:${S.clientWsPort}`:""]}):null]}),O=k.jsxs("div",{className:"conn-graph-wrap",children:[k.jsx("div",{className:"conn-graph",children:k.jsx("svg",{className:"conn-graph-svg",width:"340",height:"220",viewBox:"0 0 360 240",children:(()=>{const N={x:180,y:44},M={x:70,y:206},F={x:290,y:206},j=14,L=26,z=4,W=5,H=8,K={x:(N.x+M.x+F.x)/3,y:(N.y+M.y+F.y)/3},ie=(Y,I)=>({x:I.x-Y.x,y:I.y-Y.y}),ee=Y=>Math.hypot(Y.x,Y.y)||1,ae=Y=>{const I=ee(Y);return{x:Y.x/I,y:Y.y/I}},ne=Y=>({x:-Y.y,y:Y.x}),ce=(Y,I,U=1)=>({x:Y.x+I.x*U,y:Y.y+I.y*U}),de=(Y,I,U)=>{const se=ie(Y,I),re=ae(se),oe=ae(ne(se)),_e=U.offset||0,ye=ce(ce(Y,re,L),oe,_e),ve=ce(ce(I,re,-L),oe,_e),Ce=typeof U.t=="number"?Math.min(.9,Math.max(.1,U.t)):.5,be={x:ye.x+(ve.x-ye.x)*Ce,y:ye.y+(ve.y-ye.y)*Ce},mt=ce(Y,re,L),kt=ce(I,re,-L),cr={x:mt.x+(kt.x-mt.x)*Ce,y:mt.y+(kt.y-mt.y)*Ce},xn=U.markMode||"byLineOffset",Dn=ie(cr,K),en=Dn.x*oe.x+Dn.y*oe.y>0?{x:-oe.x,y:-oe.y}:oe,De=U.labelSide==="inner"?-1:1,Bt=_e>=0?1:-1,Pt=xn==="byTriangleSide"?De:Bt,$e={w:360,h:240,pad:10};let Ie=ce(be,en,H*Pt);(Ie.y>$e.h-$e.pad||Ie.y<$e.pad||Ie.x>$e.w-$e.pad||Ie.x<$e.pad)&&(Ie=ce(be,en,-H*Pt));const rt=Ie.x<$e.w-60,ze={x:rt?Ie.x+W+z:Ie.x-W-z,y:Ie.y},Tt=rt?"start":"end",Rt=U.label.length*6+8,On=Tt==="start"?ze.x:ze.x-Rt,tn=Tt==="start"?ze.x+Rt:ze.x;let Ze=Tt,Et=ze.x;return On<$e.pad&&tn>$e.w-$e.pad?(Ze="start",Et=$e.pad):On<$e.pad?(Ze="start",Et=Ie.x+W+z):tn>$e.w-$e.pad&&(Ze="end",Et=Ie.x-W-z),k.jsxs("g",{children:[k.jsx("line",{x1:ye.x,y1:ye.y,x2:ve.x,y2:ve.y,stroke:"var(--tt-border-strong)",strokeWidth:"2",strokeDasharray:U.dashed?"4 3":void 0}),k.jsx("circle",{cx:Ie.x,cy:Ie.y,r:W,fill:U.statusColor}),k.jsx("text",{x:Et,y:ze.y,fontSize:"10",fill:"var(--tt-text-dim)",dominantBaseline:"middle",textAnchor:Ze,paintOrder:"stroke",stroke:"var(--tt-bg-panel)",strokeWidth:"3",children:U.label})]})},V=(Y,I,U,se)=>k.jsx(or,{content:U,children:k.jsxs("g",{className:"conn-vertex",children:[k.jsx("rect",{x:Y.x-28,y:Y.y-14,width:56,height:22,rx:8,fill:se.bg,stroke:se.stroke}),k.jsx("text",{x:Y.x,y:Y.y-1,textAnchor:"middle",dominantBaseline:"middle",fontSize:"12",fill:se.text,children:I})]})});return k.jsxs(k.Fragment,{children:[de(M,N,{label:"ws",statusColor:ns(l),offset:-j/2,labelSide:"outer",markMode:"byLineOffset",t:.42}),de(M,N,{label:"http",statusColor:ns(l),offset:j/2,labelSide:"inner",markMode:"byLineOffset",t:.58}),de(N,F,{label:"ws",statusColor:ns(f),dashed:!0,offset:0,labelSide:"outer",markMode:"byTriangleSide",t:.55}),de(M,F,{label:"ws",statusColor:ns(u),offset:-j/2,labelSide:"outer",markMode:"byLineOffset",t:.55}),de(M,F,{label:"http",statusColor:ns(u),offset:j/2,labelSide:"inner",markMode:"byLineOffset",t:.45}),V(N,x("connectStatusNode"),b,v.node),V(M,x("connectStatusBrowser"),w,v.browser),V(F,x("connectStatusClient"),D,v.client)]})})()})}),k.jsxs("div",{className:"conn-legend",children:[k.jsx("div",{className:"conn-legend-title",children:x("connectStatusLegendTitle")}),k.jsxs("div",{className:"conn-legend-item",children:[k.jsx("div",{className:"conn-legend-name",children:k.jsx(Ft,{className:"conn-legend-tag-node",type:"ghost",size:"small",style:{marginRight:6},children:x("connectStatusNode")})}),k.jsx("div",{className:"conn-legend-desc",children:x("connectStatusLegendNode")})]}),k.jsxs("div",{className:"conn-legend-item",children:[k.jsx("div",{className:"conn-legend-name",children:k.jsx(Ft,{color:"green",type:"ghost",size:"small",style:{marginRight:6},children:x("connectStatusBrowser")})}),k.jsx("div",{className:"conn-legend-desc",children:x("connectStatusLegendBrowser")})]}),k.jsxs("div",{className:"conn-legend-item",children:[k.jsx("div",{className:"conn-legend-name",children:k.jsx(Ft,{className:"conn-legend-tag-client",type:"ghost",size:"small",style:{marginRight:6},children:x("connectStatusClient")})}),k.jsx("div",{className:"conn-legend-desc",children:x("connectStatusLegendClient")})]}),k.jsxs("div",{className:"conn-legend-item",children:[k.jsxs("div",{className:"conn-legend-name",children:[k.jsx(Ft,{color:"grey",type:"ghost",size:"small",style:{marginRight:6},children:"WS"}),k.jsx(Ft,{color:"grey",type:"ghost",size:"small",children:"HTTP"})]}),k.jsx("div",{className:"conn-legend-desc",children:x("connectStatusLegendProto")})]})]})]});return k.jsx(Bn,{content:O,trigger:"hover",showArrow:!1,children:k.jsxs("div",{className:"connect-status tt-header-chip"+(s?" connect-status-on":" connect-status-off"),role:"status","aria-label":x(s?"deviceConnected":"deviceDisconnected"),children:[k.jsx("span",{className:"connect-status-dot","aria-hidden":"true"}),k.jsx("span",{className:"connect-status-text",children:x(s?"deviceConnected":"deviceDisconnected")})]})})},C9=({version:i})=>{const e=ks(),{state:{devToolVersion:n}}=pn(),[r,s]=E.useState(!1);if(E.useEffect(()=>{s(nW(n))},[n]),!i)return null;const l=()=>{n&&(tW(n),s(!1)),e("/changelog")};return k.jsxs("button",{type:"button",onClick:l,className:"version-tag tt-header-chip"+(r?" version-tag-has-new":""),"aria-label":r?`${x("changelog")||"Changelog"} · ${x("changelogNewTag")||"NEW"}`:x("changelog")||"Changelog",title:r?x("changelogNewTag")||"NEW":void 0,children:[k.jsx("span",{className:"version-tag-text",children:i}),r&&k.jsx("span",{className:"version-tag-new",children:x("changelogNewTag")||"NEW"})]})};const d_=(...i)=>i.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();const _9=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const k9=i=>i.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase());const Kw=i=>{const e=k9(i);return e.charAt(0).toUpperCase()+e.slice(1)};var mh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const P9=i=>{for(const e in i)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},T9=E.createContext({}),E9=()=>E.useContext(T9),x9=E.forwardRef(({color:i,size:e,strokeWidth:n,absoluteStrokeWidth:r,className:s="",children:l,iconNode:c,...u},p)=>{const{size:f=24,strokeWidth:y=2,absoluteStrokeWidth:v=!1,color:S="currentColor",className:P=""}=E9()??{},T=r??v?Number(n??y)*24/Number(e??f):n??y;return E.createElement("svg",{ref:p,...mh,width:e??f??mh.width,height:e??f??mh.height,stroke:i??S,strokeWidth:T,className:d_("lucide",P,s),...!l&&!P9(u)&&{"aria-hidden":"true"},...u},[...c.map(([b,w])=>E.createElement(b,w)),...Array.isArray(l)?l:[l]])});const Nl=(i,e)=>{const n=E.forwardRef(({className:r,...s},l)=>E.createElement(x9,{ref:l,iconNode:e,className:d_(`lucide-${_9(Kw(i))}`,`lucide-${i}`,r),...s}));return n.displayName=Kw(i),n};const D9=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],O9=Nl("arrow-left",D9);const I9=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],R9=Nl("external-link",I9);const N9=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],j9=Nl("moon",N9);const L9=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],A9=Nl("sun",L9),M9=()=>{const{theme:i,toggle:e}=g9(),n=i==="dark",r=n?A9:j9,s=x(n?"themeToggleToLight":"themeToggleToDark");return k.jsx("button",{type:"button",onClick:e,className:"theme-toggle tt-header-chip","aria-label":s,title:s,children:k.jsx(r,{className:"theme-toggle-icon",size:14,strokeWidth:2})})},$9=E.lazy(()=>lt(()=>import("./index-BRLaHgvx.js"),__vite__mapDeps([0,1,2,3])).then(i=>({default:i.AccessDocs}))),F9=E.lazy(()=>lt(()=>import("./index-DotB5V_j.js"),__vite__mapDeps([4,1,2,5])).then(i=>({default:i.LangSwitcher})));E.lazy(()=>lt(()=>import("./index-fYRa-mFF.js"),__vite__mapDeps([6,7,8,9,10,11,12,13])).then(i=>({default:i.GameUploader})));const z9=E.lazy(()=>lt(()=>import("./index-CjpmMeus.js"),__vite__mapDeps([14,15])).then(i=>({default:i.LoginStatus}))),B9=E.lazy(()=>lt(()=>import("./index-D7Min-ID.js"),__vite__mapDeps([16,17])).then(i=>({default:i.WasmCodeSplit}))),q9=()=>{const{state:{devToolVersion:i,engine:e}}=pn();return k.jsxs("div",{className:"header-wrapper",children:[k.jsxs("div",{className:"header-content",children:[k.jsxs("div",{className:"header-content-left",children:[k.jsx(b9,{}),k.jsx(C9,{version:i}),k.jsx(w9,{})]}),k.jsx("div",{className:"header-content-right",children:k.jsxs(ws,{spacing:12,children:[k.jsx(E.Suspense,{fallback:null,children:k.jsx($9,{})}),e==="unity"&&k.jsx(E.Suspense,{fallback:null,children:k.jsx(B9,{})}),k.jsx(E.Suspense,{fallback:null,children:k.jsx(F9,{})}),k.jsx(M9,{}),k.jsx(E.Suspense,{fallback:null,children:k.jsx(z9,{})})]})})]}),k.jsx(j2,{})]})},G9=({enabled:i=!0})=>(E.useEffect(()=>{if(!i){Vi.close();return}return Vi.init(),()=>{Vi.close()}},[i]),null),W9=E.lazy(()=>lt(()=>import("./index-DZen0tWD.js"),__vite__mapDeps([18,19,20,21])).then(i=>({default:i.Sidebar}))),U9=()=>k.jsx("div",{className:"sidebar-container",children:k.jsx(E.Suspense,{fallback:k.jsx("div",{className:"sidebar-loading-placeholder"}),children:k.jsx(W9,{})})}),H9=({title:i,subtitle:e,action:n,decoration:r=!0,className:s})=>k.jsxs("header",{className:Q("tt-page-hero",r&&"tt-page-hero-decorated",s),children:[k.jsxs("div",{className:"tt-page-hero-text",children:[k.jsx("h1",{className:"tt-page-hero-title",children:i}),e&&k.jsx("p",{className:"tt-page-hero-subtitle",children:e})]}),n&&k.jsx("div",{className:"tt-page-hero-action",children:n})]}),p_=({href:i,iconSize:e=13,className:n="",children:r,target:s="_blank",rel:l="noopener noreferrer",...c})=>k.jsxs("a",{...c,className:`tt-document-link ${n}`.trim(),href:i,target:s,rel:l,children:[k.jsx("span",{className:"tt-document-link-label",children:r}),k.jsx(R9,{className:"tt-document-link-icon",size:e,strokeWidth:2,"aria-hidden":"true"})]}),V9=({items:i,fallbackErrorText:e})=>{const[n,r]=E.useState(!1),s=E.useMemo(()=>{const f=e?.trim();return f?[{text:f,required:!0},...i.filter(y=>y.text.trim()!==f)]:i},[e,i]);if(E.useEffect(()=>{r(!1)},[s]),s.length===0)return null;const l=f=>f.detail?.link?k.jsx(p_,{className:"app-error-cta",href:f.detail.link,children:f.detail.text||x("viewDoc")}):null,c=(f,y)=>{const v=f.required?vl:bl,S=f.required?"required":"suggested",P=f.title||(f.required?x("topErrorTitleRequired"):x("topErrorTitleSuggested"));return k.jsxs("div",{className:`app-error-row app-error-row-${S}`,role:f.required?"alert":"status",children:[k.jsx("span",{className:"app-error-row-accent","aria-hidden":"true"}),k.jsx("span",{className:"app-error-row-icon",children:k.jsx(v,{})}),k.jsxs("div",{className:"app-error-row-body",children:[k.jsx("div",{className:"app-error-row-title",children:P}),k.jsx("div",{className:"app-error-row-text",children:f.text})]}),l(f)]},`${f.text}-${S}-${y}`)};if(s.length===1)return k.jsx("div",{className:"app-error-banner",children:c(s[0],0)});const u=s.find(f=>f.required)??s[0],p=s.filter(f=>f!==u);return k.jsxs("div",{className:"app-error-banner app-error-banner-multi",children:[k.jsxs("div",{className:"app-error-multi-head",children:[c(u,0),k.jsx("button",{type:"button",className:"app-error-multi-toggle",onClick:()=>r(f=>!f),children:n?x("topErrorHideDetails"):x("topErrorMoreItems",{count:String(p.length)})})]}),n&&k.jsx("div",{className:"app-error-multi-body",children:p.map((f,y)=>c(f,y+1))})]})},K9=i=>Number.isFinite(i)?Math.max(0,Math.min(1,i??0)):0,Q9=C.memo(()=>{const{setMessage:i,hideLoading:e,state:{gameDetail:n,debugSetting:r,isConnected:s,selectedLaunchOption:l,debugMode:c}}=pn();a9();const[u,p]=E.useState(""),f=T=>{if(!T.client||!T.node){Pe.set("hasSetup",!1);return}if(Pe.get("hasSetup"))return;Pe.set("hasSetup",!0),(async()=>(e(),i({type:"success",desc:x("setupDevEnv")}),await Ww({debugSetting:r,debugMode:c})))()},y=E.useCallback(({status:T,msg:b,progress:w})=>{switch(T){case"start":const D=x("uploadProcess");i({type:"info",title:D,desc:x("uploadProcessDesc"),progress:0,intent:"uploading"}),console.log(D);break;case"success":i({type:"success",desc:x("uploadSuccess")}),console.log(`✅ ${x("uploadSuccess")}`);break;case"error":const O=`${x("uploadError")}: ${b}`;i({type:"danger",desc:O}),console.log(O);break;case"restart":break;case"process":const N=K9(w);`${x("uploadProcess")}${(N*100).toFixed(0)}`,i({type:"info",title:x("uploadProcess"),desc:x("uploadProcessDesc"),progress:N,intent:"uploading"});break}},[]),v=E.useCallback(({isScriptsReady:T,isResourcesReady:b,isScriptsFailed:w,isResourcesFailed:D})=>{T&&b?(Fn.info("scripts and resources are ready, send meta"),QG(n),i({type:"success",desc:x(c==="clientPreview"?"clientPreviewEnvSetupSuccess":"debugEnvSetupSuccess")})):w?i({type:"danger",desc:x("scriptsSetupFailed")}):D&&i({type:"danger",desc:x("resourcesSetupFailed")})},[n,l,c]),S=()=>{if(!s)return;const T=nr.warning({position:"top",duration:1e4,title:x("gameResourceUpdated"),id:u,onClose:()=>{p("")},content:k.jsxs(k.Fragment,{children:[k.jsx("p",{children:x("gameResourceChange")}),k.jsxs("div",{className:"banner-footer",children:[k.jsx(tt,{type:"tertiary",onClick:()=>{nr.close(T)},children:x("notUpload")}),k.jsx(tt,{style:{marginLeft:12},type:"warning",onClick:()=>{Fn.info("upload"),Fn.info("upload iframe onload, 开始重新初始化"),Ww({debugSetting:r,debugMode:c}),nr.close(T)},children:x("uploadToClient")})]})]})});p(T)},P=E.useCallback(({status:T,errorMsg:b})=>{T==="start"?(i({type:"info",title:x("gameResourceCompilingTitle"),desc:x("gameResourceCompiling")}),console.warn(`⚠️ ${x("gameResourceCompiling")}`)):T==="end"&&(b?(i({type:"danger",desc:b}),console.error(`❌ ${b}`)):(i({type:"success",title:x("gameResourceCompileSuccessTitle"),desc:x("gameResourceCompileSuccess")}),console.log(`✅ ${x("gameResourceCompileSuccess")}`)))},[]);return E.useEffect(()=>(Ee.on("connectionChange",f),Ee.on("compilationStatus",P),Ee.on("resourceChange",S),Ee.on("uploadGame",y),Ee.on("setupStatusChange",v),()=>{Ee.off("compilationStatus",P),Ee.off("resourceChange",S),Ee.off("setupStatusChange",v),Ee.off("uploadGame",y),Ee.off("connectionChange",f)}),[f,P,S,v,y]),null});var Wi={},yh,Qw;function f_(){return Qw||(Qw=1,yh={L:1,M:0,Q:3,H:2}),yh}var vh,Xw;function h_(){return Xw||(Xw=1,vh={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),vh}var bh,Yw;function X9(){if(Yw)return bh;Yw=1;var i=h_();function e(n){this.mode=i.MODE_8BIT_BYTE,this.data=n}return e.prototype={getLength:function(n){return this.data.length},write:function(n){for(var r=0;r<this.data.length;r++)n.put(this.data.charCodeAt(r),8)}},bh=e,bh}var Sh,Zw;function Y9(){if(Zw)return Sh;Zw=1;var i=f_();function e(n,r){this.totalCount=n,this.dataCount=r}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(n,r){var s=e.getRsBlockTable(n,r);if(s==null)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+r);for(var l=s.length/3,c=new Array,u=0;u<l;u++)for(var p=s[u*3+0],f=s[u*3+1],y=s[u*3+2],v=0;v<p;v++)c.push(new e(f,y));return c},e.getRsBlockTable=function(n,r){switch(r){case i.L:return e.RS_BLOCK_TABLE[(n-1)*4+0];case i.M:return e.RS_BLOCK_TABLE[(n-1)*4+1];case i.Q:return e.RS_BLOCK_TABLE[(n-1)*4+2];case i.H:return e.RS_BLOCK_TABLE[(n-1)*4+3];default:return}},Sh=e,Sh}var wh,Jw;function Z9(){if(Jw)return wh;Jw=1;function i(){this.buffer=new Array,this.length=0}return i.prototype={get:function(e){var n=Math.floor(e/8);return(this.buffer[n]>>>7-e%8&1)==1},put:function(e,n){for(var r=0;r<n;r++)this.putBit((e>>>n-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),e&&(this.buffer[n]|=128>>>this.length%8),this.length++}},wh=i,wh}var Ch,eC;function g_(){if(eC)return Ch;eC=1;for(var i={glog:function(n){if(n<1)throw new Error("glog("+n+")");return i.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return i.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},e=0;e<8;e++)i.EXP_TABLE[e]=1<<e;for(var e=8;e<256;e++)i.EXP_TABLE[e]=i.EXP_TABLE[e-4]^i.EXP_TABLE[e-5]^i.EXP_TABLE[e-6]^i.EXP_TABLE[e-8];for(var e=0;e<255;e++)i.LOG_TABLE[i.EXP_TABLE[e]]=e;return Ch=i,Ch}var _h,tC;function m_(){if(tC)return _h;tC=1;var i=g_();function e(n,r){if(n.length==null)throw new Error(n.length+"/"+r);for(var s=0;s<n.length&&n[s]==0;)s++;this.num=new Array(n.length-s+r);for(var l=0;l<n.length-s;l++)this.num[l]=n[l+s]}return e.prototype={get:function(n){return this.num[n]},getLength:function(){return this.num.length},multiply:function(n){for(var r=new Array(this.getLength()+n.getLength()-1),s=0;s<this.getLength();s++)for(var l=0;l<n.getLength();l++)r[s+l]^=i.gexp(i.glog(this.get(s))+i.glog(n.get(l)));return new e(r,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var r=i.glog(this.get(0))-i.glog(n.get(0)),s=new Array(this.getLength()),l=0;l<this.getLength();l++)s[l]=this.get(l);for(var l=0;l<n.getLength();l++)s[l]^=i.gexp(i.glog(n.get(l))+r);return new e(s,0).mod(n)}},_h=e,_h}var kh,nC;function J9(){if(nC)return kh;nC=1;var i=h_(),e=m_(),n=g_(),r={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},s={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(l){for(var c=l<<10;s.getBCHDigit(c)-s.getBCHDigit(s.G15)>=0;)c^=s.G15<<s.getBCHDigit(c)-s.getBCHDigit(s.G15);return(l<<10|c)^s.G15_MASK},getBCHTypeNumber:function(l){for(var c=l<<12;s.getBCHDigit(c)-s.getBCHDigit(s.G18)>=0;)c^=s.G18<<s.getBCHDigit(c)-s.getBCHDigit(s.G18);return l<<12|c},getBCHDigit:function(l){for(var c=0;l!=0;)c++,l>>>=1;return c},getPatternPosition:function(l){return s.PATTERN_POSITION_TABLE[l-1]},getMask:function(l,c,u){switch(l){case r.PATTERN000:return(c+u)%2==0;case r.PATTERN001:return c%2==0;case r.PATTERN010:return u%3==0;case r.PATTERN011:return(c+u)%3==0;case r.PATTERN100:return(Math.floor(c/2)+Math.floor(u/3))%2==0;case r.PATTERN101:return c*u%2+c*u%3==0;case r.PATTERN110:return(c*u%2+c*u%3)%2==0;case r.PATTERN111:return(c*u%3+(c+u)%2)%2==0;default:throw new Error("bad maskPattern:"+l)}},getErrorCorrectPolynomial:function(l){for(var c=new e([1],0),u=0;u<l;u++)c=c.multiply(new e([1,n.gexp(u)],0));return c},getLengthInBits:function(l,c){if(1<=c&&c<10)switch(l){case i.MODE_NUMBER:return 10;case i.MODE_ALPHA_NUM:return 9;case i.MODE_8BIT_BYTE:return 8;case i.MODE_KANJI:return 8;default:throw new Error("mode:"+l)}else if(c<27)switch(l){case i.MODE_NUMBER:return 12;case i.MODE_ALPHA_NUM:return 11;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 10;default:throw new Error("mode:"+l)}else if(c<41)switch(l){case i.MODE_NUMBER:return 14;case i.MODE_ALPHA_NUM:return 13;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 12;default:throw new Error("mode:"+l)}else throw new Error("type:"+c)},getLostPoint:function(l){for(var c=l.getModuleCount(),u=0,p=0;p<c;p++)for(var f=0;f<c;f++){for(var y=0,v=l.isDark(p,f),S=-1;S<=1;S++)if(!(p+S<0||c<=p+S))for(var P=-1;P<=1;P++)f+P<0||c<=f+P||S==0&&P==0||v==l.isDark(p+S,f+P)&&y++;y>5&&(u+=3+y-5)}for(var p=0;p<c-1;p++)for(var f=0;f<c-1;f++){var T=0;l.isDark(p,f)&&T++,l.isDark(p+1,f)&&T++,l.isDark(p,f+1)&&T++,l.isDark(p+1,f+1)&&T++,(T==0||T==4)&&(u+=3)}for(var p=0;p<c;p++)for(var f=0;f<c-6;f++)l.isDark(p,f)&&!l.isDark(p,f+1)&&l.isDark(p,f+2)&&l.isDark(p,f+3)&&l.isDark(p,f+4)&&!l.isDark(p,f+5)&&l.isDark(p,f+6)&&(u+=40);for(var f=0;f<c;f++)for(var p=0;p<c-6;p++)l.isDark(p,f)&&!l.isDark(p+1,f)&&l.isDark(p+2,f)&&l.isDark(p+3,f)&&l.isDark(p+4,f)&&!l.isDark(p+5,f)&&l.isDark(p+6,f)&&(u+=40);for(var b=0,f=0;f<c;f++)for(var p=0;p<c;p++)l.isDark(p,f)&&b++;var w=Math.abs(100*b/c/c-50)/5;return u+=w*10,u}};return kh=s,kh}var Ph,rC;function eH(){if(rC)return Ph;rC=1;var i=X9(),e=Y9(),n=Z9(),r=J9(),s=m_();function l(u,p){this.typeNumber=u,this.errorCorrectLevel=p,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=l.prototype;return c.addData=function(u){var p=new i(u);this.dataList.push(p),this.dataCache=null},c.isDark=function(u,p){if(u<0||this.moduleCount<=u||p<0||this.moduleCount<=p)throw new Error(u+","+p);return this.modules[u][p]},c.getModuleCount=function(){return this.moduleCount},c.make=function(){if(this.typeNumber<1){var u=1;for(u=1;u<40;u++){for(var p=e.getRSBlocks(u,this.errorCorrectLevel),f=new n,y=0,v=0;v<p.length;v++)y+=p[v].dataCount;for(var v=0;v<this.dataList.length;v++){var S=this.dataList[v];f.put(S.mode,4),f.put(S.getLength(),r.getLengthInBits(S.mode,u)),S.write(f)}if(f.getLengthInBits()<=y*8)break}this.typeNumber=u}this.makeImpl(!1,this.getBestMaskPattern())},c.makeImpl=function(u,p){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var f=0;f<this.moduleCount;f++){this.modules[f]=new Array(this.moduleCount);for(var y=0;y<this.moduleCount;y++)this.modules[f][y]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(u,p),this.typeNumber>=7&&this.setupTypeNumber(u),this.dataCache==null&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,p)},c.setupPositionProbePattern=function(u,p){for(var f=-1;f<=7;f++)if(!(u+f<=-1||this.moduleCount<=u+f))for(var y=-1;y<=7;y++)p+y<=-1||this.moduleCount<=p+y||(0<=f&&f<=6&&(y==0||y==6)||0<=y&&y<=6&&(f==0||f==6)||2<=f&&f<=4&&2<=y&&y<=4?this.modules[u+f][p+y]=!0:this.modules[u+f][p+y]=!1)},c.getBestMaskPattern=function(){for(var u=0,p=0,f=0;f<8;f++){this.makeImpl(!0,f);var y=r.getLostPoint(this);(f==0||u>y)&&(u=y,p=f)}return p},c.createMovieClip=function(u,p,f){var y=u.createEmptyMovieClip(p,f),v=1;this.make();for(var S=0;S<this.modules.length;S++)for(var P=S*v,T=0;T<this.modules[S].length;T++){var b=T*v,w=this.modules[S][T];w&&(y.beginFill(0,100),y.moveTo(b,P),y.lineTo(b+v,P),y.lineTo(b+v,P+v),y.lineTo(b,P+v),y.endFill())}return y},c.setupTimingPattern=function(){for(var u=8;u<this.moduleCount-8;u++)this.modules[u][6]==null&&(this.modules[u][6]=u%2==0);for(var p=8;p<this.moduleCount-8;p++)this.modules[6][p]==null&&(this.modules[6][p]=p%2==0)},c.setupPositionAdjustPattern=function(){for(var u=r.getPatternPosition(this.typeNumber),p=0;p<u.length;p++)for(var f=0;f<u.length;f++){var y=u[p],v=u[f];if(this.modules[y][v]==null)for(var S=-2;S<=2;S++)for(var P=-2;P<=2;P++)S==-2||S==2||P==-2||P==2||S==0&&P==0?this.modules[y+S][v+P]=!0:this.modules[y+S][v+P]=!1}},c.setupTypeNumber=function(u){for(var p=r.getBCHTypeNumber(this.typeNumber),f=0;f<18;f++){var y=!u&&(p>>f&1)==1;this.modules[Math.floor(f/3)][f%3+this.moduleCount-8-3]=y}for(var f=0;f<18;f++){var y=!u&&(p>>f&1)==1;this.modules[f%3+this.moduleCount-8-3][Math.floor(f/3)]=y}},c.setupTypeInfo=function(u,p){for(var f=this.errorCorrectLevel<<3|p,y=r.getBCHTypeInfo(f),v=0;v<15;v++){var S=!u&&(y>>v&1)==1;v<6?this.modules[v][8]=S:v<8?this.modules[v+1][8]=S:this.modules[this.moduleCount-15+v][8]=S}for(var v=0;v<15;v++){var S=!u&&(y>>v&1)==1;v<8?this.modules[8][this.moduleCount-v-1]=S:v<9?this.modules[8][15-v-1+1]=S:this.modules[8][15-v-1]=S}this.modules[this.moduleCount-8][8]=!u},c.mapData=function(u,p){for(var f=-1,y=this.moduleCount-1,v=7,S=0,P=this.moduleCount-1;P>0;P-=2)for(P==6&&P--;;){for(var T=0;T<2;T++)if(this.modules[y][P-T]==null){var b=!1;S<u.length&&(b=(u[S]>>>v&1)==1);var w=r.getMask(p,y,P-T);w&&(b=!b),this.modules[y][P-T]=b,v--,v==-1&&(S++,v=7)}if(y+=f,y<0||this.moduleCount<=y){y-=f,f=-f;break}}},l.PAD0=236,l.PAD1=17,l.createData=function(u,p,f){for(var y=e.getRSBlocks(u,p),v=new n,S=0;S<f.length;S++){var P=f[S];v.put(P.mode,4),v.put(P.getLength(),r.getLengthInBits(P.mode,u)),P.write(v)}for(var T=0,S=0;S<y.length;S++)T+=y[S].dataCount;if(v.getLengthInBits()>T*8)throw new Error("code length overflow. ("+v.getLengthInBits()+">"+T*8+")");for(v.getLengthInBits()+4<=T*8&&v.put(0,4);v.getLengthInBits()%8!=0;)v.putBit(!1);for(;!(v.getLengthInBits()>=T*8||(v.put(l.PAD0,8),v.getLengthInBits()>=T*8));)v.put(l.PAD1,8);return l.createBytes(v,y)},l.createBytes=function(u,p){for(var f=0,y=0,v=0,S=new Array(p.length),P=new Array(p.length),T=0;T<p.length;T++){var b=p[T].dataCount,w=p[T].totalCount-b;y=Math.max(y,b),v=Math.max(v,w),S[T]=new Array(b);for(var D=0;D<S[T].length;D++)S[T][D]=255&u.buffer[D+f];f+=b;var O=r.getErrorCorrectPolynomial(w),N=new s(S[T],O.getLength()-1),M=N.mod(O);P[T]=new Array(O.getLength()-1);for(var D=0;D<P[T].length;D++){var F=D+M.getLength()-P[T].length;P[T][D]=F>=0?M.get(F):0}}for(var j=0,D=0;D<p.length;D++)j+=p[D].totalCount;for(var L=new Array(j),z=0,D=0;D<y;D++)for(var T=0;T<p.length;T++)D<S[T].length&&(L[z++]=S[T][D]);for(var D=0;D<v;D++)for(var T=0;T<p.length;T++)D<P[T].length&&(L[z++]=P[T][D]);return L},Ph=l,Ph}var Ba={},iC;function tH(){if(iC)return Ba;iC=1,Object.defineProperty(Ba,"__esModule",{value:!0});var i=Object.assign||function(f){for(var y=1;y<arguments.length;y++){var v=arguments[y];for(var S in v)Object.prototype.hasOwnProperty.call(v,S)&&(f[S]=v[S])}return f},e=zh(),n=l(e),r=hs(),s=l(r);function l(f){return f&&f.__esModule?f:{default:f}}function c(f,y){var v={};for(var S in f)y.indexOf(S)>=0||Object.prototype.hasOwnProperty.call(f,S)&&(v[S]=f[S]);return v}var u={bgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,bgD:n.default.string.isRequired,fgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,fgD:n.default.string.isRequired,size:n.default.number.isRequired,title:n.default.string,viewBoxSize:n.default.number.isRequired,xmlns:n.default.string},p=(0,r.forwardRef)(function(f,y){var v=f.bgColor,S=f.bgD,P=f.fgD,T=f.fgColor,b=f.size,w=f.title,D=f.viewBoxSize,O=f.xmlns,N=O===void 0?"http://www.w3.org/2000/svg":O,M=c(f,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return s.default.createElement("svg",i({},M,{height:b,ref:y,viewBox:"0 0 "+D+" "+D,width:b,xmlns:N}),w?s.default.createElement("title",null,w):null,s.default.createElement("path",{d:S,fill:v}),s.default.createElement("path",{d:P,fill:T}))});return p.displayName="QRCodeSvg",p.propTypes=u,Ba.default=p,Ba}var oC;function nH(){if(oC)return Wi;oC=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.QRCode=void 0;var i=Object.assign||function(b){for(var w=1;w<arguments.length;w++){var D=arguments[w];for(var O in D)Object.prototype.hasOwnProperty.call(D,O)&&(b[O]=D[O])}return b},e=zh(),n=v(e),r=f_(),s=v(r),l=eH(),c=v(l),u=hs(),p=v(u),f=tH(),y=v(f);function v(b){return b&&b.__esModule?b:{default:b}}function S(b,w){var D={};for(var O in b)w.indexOf(O)>=0||Object.prototype.hasOwnProperty.call(b,O)&&(D[O]=b[O]);return D}var P={bgColor:n.default.oneOfType([n.default.object,n.default.string]),fgColor:n.default.oneOfType([n.default.object,n.default.string]),level:n.default.string,size:n.default.number,value:n.default.string.isRequired},T=(0,u.forwardRef)(function(b,w){var D=b.bgColor,O=D===void 0?"#FFFFFF":D,N=b.fgColor,M=N===void 0?"#000000":N,F=b.level,j=F===void 0?"L":F,L=b.size,z=L===void 0?256:L,W=b.value,H=S(b,["bgColor","fgColor","level","size","value"]),K=new c.default(-1,s.default[j]);K.addData(W),K.make();var ie=K.modules;return p.default.createElement(y.default,i({},H,{bgColor:O,bgD:ie.map(function(ee,ae){return ee.map(function(ne,ce){return ne?"":"M "+ce+" "+ae+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:M,fgD:ie.map(function(ee,ae){return ee.map(function(ne,ce){return ne?"M "+ce+" "+ae+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:w,size:z,viewBoxSize:ie.length}))});return Wi.QRCode=T,T.displayName="QRCode",T.propTypes=P,Wi.default=T,Wi}var rH=nH();const sC=Xe(rH),iH=i=>{const e=ks(),{isConnected:n}=i,{state:{devSchema:r,schema:s,launchOptions:l,selectedLaunchOption:c,debugMode:u,debugSetting:p,gameDetail:f,user:y},setShowManualBindIP:v,setSelectedLaunchOption:S,setDebugMode:P}=pn(),[T,b]=E.useState(!1),w=Rg(y),D=f?.request_allowed_domains?.length??0,O=!p.enableDomainCheck,N=!O&&D===0,M=u===qn.clientPreview,F=c?.pkgType==="independent"?x("independentPackage"):x("mainPackage"),j=c?.id==="normal"?x("normalLaunchMode"):c?.name||x("normalLaunchMode"),L=x(M?"clientPreviewMode":"browserDebugMode"),z=x(M?"homeSession.mode.clientPreviewDesc":"homeSession.mode.remoteDebugDesc"),W=O?x("homeSession.domainCheck.disabled"):D>0?x("homeSession.domainCheck.enabledWithDomains",{count:String(D)}):x("homeSession.domainCheck.enabledNoDomains"),H=O?x("homeSession.domainCheck.disabledDesc"):D>0?x("homeSession.domainCheck.enabledWithDomainsDesc"):x("homeSession.domainCheck.enabledNoDomainsDesc"),K=E.useMemo(()=>{try{if(!r)return null;const ne=new URL(r),ce=(ne.searchParams.get("host")||"").trim(),de=ne.searchParams.get("host_list")||"";let V=[];if(de)try{V=JSON.parse(decodeURIComponent(de))}catch{V=[]}const Y=ce==="127.0.0.1"||ce==="localhost",I=Array.isArray(V)&&V.length>0;return Y||!I?{host:ce,hostList:V}:null}catch{return{host:"",hostList:[]}}},[r]),ie=ne=>{ne.status==="success"&&b(!1),ne.status==="failed"&&b(!1),ne.status==="start"&&b(!0)},ee=ne=>{P(ne),q0(ne)};E.useEffect(()=>(Ee.on("scanQRCode",ie),()=>{Ee.off("scanQRCode",ie)}),[]);const ae=ne=>{if(ne==="created")S({...Ha,name:""}),e("/launch_mode");else{const ce=l.find(de=>de.id===ne);ce&&S(ce)}};return n?k.jsx("div",{className:"qr-code-container-connected",children:k.jsxs("div",{className:"qr-code-connected-content",children:[k.jsx("div",{className:"qr-code-tile qr-code-tile-connected",children:k.jsx(sC,{className:"qr-code-connected",size:150,value:s,bgColor:"transparent",fgColor:"#0e0f13"})}),k.jsxs("div",{className:"qr-code-connected-info",children:[k.jsx("div",{className:"qr-code-connected-desc-title",children:x("scanQRCodeChange")}),k.jsx("div",{className:"qr-code-connected-desc",children:x("scanQRCodeDesc")})]}),k.jsxs("div",{className:"qr-code-session-panel",children:[k.jsxs("div",{className:"qr-code-session-header",children:[k.jsx("span",{children:x("homeSession.title")}),k.jsx("span",{className:"qr-code-session-mode-tag",children:L})]}),k.jsxs("div",{className:"qr-code-session-grid",children:[k.jsxs("div",{className:"qr-code-session-item",children:[k.jsx("span",{children:x("homeSession.modeLabel")}),k.jsx("strong",{children:L}),k.jsx("p",{children:z})]}),k.jsxs("div",{className:"qr-code-session-item",children:[k.jsx("span",{children:x("homeSession.entryLabel")}),k.jsx("strong",{children:j}),k.jsx("p",{children:`${F}${c?.scene?` · ${c.scene}`:""}`})]}),k.jsxs("div",{className:"qr-code-session-item",children:[k.jsx("span",{children:x("homeSession.domainLabel")}),k.jsx("strong",{children:W}),k.jsx("p",{children:H})]})]}),k.jsxs("div",{className:"qr-code-session-checks",children:[k.jsx("span",{className:`qr-code-session-check ${O?"is-muted":""}`,children:x(O?"homeSession.chip.domainCheckOff":"homeSession.chip.domainCheckOn")}),k.jsx("span",{className:`qr-code-session-check ${p.enableVConsole?"":"is-muted"}`,children:p.enableVConsole?x("homeSession.chip.vConsoleOn"):x("homeSession.chip.vConsoleOff")}),k.jsx("span",{className:`qr-code-session-check ${p.enableDevInfoPanel?"":"is-muted"}`,children:p.enableDevInfoPanel?x("homeSession.chip.devPanelOn"):x("homeSession.chip.devPanelOff")})]}),k.jsxs("div",{className:`qr-code-session-hint ${N?"is-warning":""}`,children:[k.jsx("strong",{children:x(N?"homeSession.risk.domainTitle":M?"homeSession.diff.clientPreviewTitle":"homeSession.diff.remoteDebugTitle")}),k.jsx("span",{children:x(N?"homeSession.risk.domainDesc":M?"homeSession.diff.clientPreviewDesc":"homeSession.diff.remoteDebugDesc")})]})]})]})}):k.jsxs("div",{className:"qr-code-container-disconnected",children:[k.jsx("div",{className:"qr-code-select-container",children:k.jsx($r,{className:"qr-code-launch-select",value:c?.id,onChange:ae,placeholder:x("selectLaunchMode"),style:{width:"216px"},optionList:l.map(ne=>({label:ne.id==="normal"?x("normalLaunchMode"):ne.id==="created"?x("createdLaunchMode"):ne.name,value:ne.id}))})}),k.jsxs("div",{className:"qr-code-content",children:[K?k.jsx(fg,{style:{marginBottom:12},bordered:!1,icon:null,closeIcon:null,fullMode:!1,type:"danger",title:x("networkNoLanIPTitle"),description:k.jsxs("div",{children:[k.jsx("div",{style:{marginBottom:8},children:x("networkNoLanIPDesc")}),k.jsx(tt,{size:"small",type:"primary",onClick:()=>v(!0),children:x("networkNoLanIPAction")})]})}):null,k.jsxs("div",{className:"qr-code-schema",children:[k.jsx("div",{className:"qr-code-tile",children:k.jsx(sC,{size:256,value:r,bgColor:"transparent",fgColor:"#0e0f13"})}),k.jsxs(hg,{className:"qr-code-mode-switches",children:[k.jsx(tt,{className:`qr-code-mode-button ${u==="browserDebug"?"is-active":""}`,theme:"borderless",type:"tertiary",size:"small",onClick:()=>ee("browserDebug"),children:x("browserDebugMode")}),k.jsx(tt,{className:`qr-code-mode-button ${u==="clientPreview"?"is-active":""}`,onClick:()=>ee("clientPreview"),theme:"borderless",type:"tertiary",size:"small",children:x("clientPreviewMode")})]}),T&&k.jsxs("div",{className:"qr-code-spin",children:[k.jsx(Mr,{size:"large"}),k.jsx("div",{className:"qr-code-text",children:x("scanning")})]})]}),k.jsxs("div",{className:"qr-code-side-panel",children:[k.jsxs("div",{className:"qr-code-diagnostics-card",children:[k.jsx("div",{className:"qr-code-diagnostics-card-copy",children:k.jsx(Qe.Text,{children:x("netDiagEntryDesc")})}),k.jsx(tt,{className:"qr-code-diagnostics-entry",theme:"light",size:"small",onClick:()=>e("/network_diagnostics"),children:x("netDiagEntryAction")})]}),w?null:k.jsxs("div",{className:"qr-code-login-guide",children:[k.jsxs("div",{className:"qr-code-login-guide-copy",children:[k.jsx(Qe.Text,{strong:!0,children:x("basicDebugGuide.entryTitle")}),k.jsx(Qe.Text,{children:x("basicDebugGuide.entryDesc")})]}),k.jsx(tt,{theme:"light",onClick:()=>e("/basic_debug_guide"),children:x("basicDebugGuide.entryAction")})]})]})]})]})},oH=[{key:"domain-check",labelKey:"debugSettingDomainCheck",descriptionKey:"devOptionsDomainCheckDesc",getChecked:i=>!i.enableDomainCheck,getNextSetting:(i,e)=>({...i,enableDomainCheck:!e})},{key:"ad-mock",labelKey:"debugSettingAdMock",descriptionKey:"debugSettingAdMockDesc",getChecked:i=>i.enableAdMock,getNextSetting:(i,e)=>({...i,enableAdMock:e})},{key:"iap-mock",labelKey:"debugSettingIAPMock",descriptionKey:"debugSettingIAPMockDesc",getChecked:i=>i.enableIAPMock,getNextSetting:(i,e)=>({...i,enableIAPMock:e})},{key:"dev-info-panel",labelKey:"debugSettingDevInfoPanel",descriptionKey:"debugSettingEnableDevInfoPanelDesc",getChecked:i=>i.enableDevInfoPanel,getNextSetting:(i,e)=>({...i,enableDevInfoPanel:e})},{key:"vconsole",labelKey:"debugSettingVConsole",descriptionKey:"debugSettingEnableVconsoleDesc",isAvailable:i=>i!==qn.browserDebug,getChecked:i=>i.enableVConsole,getNextSetting:(i,e)=>({...i,enableVConsole:e})}];function sH({debugMode:i,debugSetting:e,onChange:n}){return oH.filter(r=>!r.isAvailable||r.isAvailable(i)).map(r=>({key:r.key,checked:r.getChecked(e),label:x(r.labelKey),description:x(r.descriptionKey),onChange:s=>n(r.getNextSetting(e,s))}))}const aH=()=>{const{state:{debugSetting:i,debugMode:e},setDebugSetting:n}=pn(),r=c=>{n(c)},s=()=>{Ts.send({method:"setDebugSettings",payload:i})};E.useEffect(()=>(Ee.on("connectionChange",s),()=>{Ee.off("connectionChange",s)}),[s]);const l=sH({debugMode:e,debugSetting:i,onChange:r});return k.jsx("div",{className:"debug-setting-card",children:k.jsxs(kl,{style:{width:"100%"},children:[k.jsx("div",{className:"debug-setting-head",children:k.jsx(Qe.Text,{style:{fontWeight:"bold",fontSize:16},children:x("devOptions")})}),k.jsx("div",{className:"debug-setting-row",children:l.map(c=>k.jsxs("div",{className:"debug-setting-item",children:[k.jsxs("div",{className:"debug-setting-item-head",children:[k.jsx(Pg,{className:"debug-setting-switch",checked:c.checked,onChange:c.onChange}),k.jsx(Qe.Text,{className:"debug-setting-item-title",children:c.label})]}),k.jsx(Qe.Text,{className:"debug-setting-item-desc",type:"tertiary",children:c.description})]},c.key))})]})})};function y_(){return{ip:Pe.get("clientHost")||localStorage.getItem("clientHost")||"",port:Pe.get("clientHttpPort")||localStorage.getItem("clientHttpPort")||"",wsPort:Pe.get("clientWsPort")||localStorage.getItem("clientWsPort")||""}}function oV(i=y_()){return!!(String(i.ip||"").trim()&&String(i.port||"").trim()&&String(i.wsPort||"").trim())}function lH(i){const{ip:e,port:n,wsPort:r}=i;Pe.setMultiple({clientHost:e,clientWsPort:r,clientHttpPort:n}),Vi.send({method:"manualConnect",payload:{clientHost:e,clientWsPort:r,clientHttpPort:n}}),Ts.init({clientWsPort:r,clientHost:e,clientHttpPort:n}),localStorage.setItem("clientHost",e),localStorage.setItem("clientWsPort",r),localStorage.setItem("clientHttpPort",n)}function aC(i){const e=String(i.ip||""),n=String(i.port||""),r=String(i.wsPort||"");Pe.setMultiple({clientHost:e,clientWsPort:r,clientHttpPort:n}),localStorage.setItem("clientHost",e),localStorage.setItem("clientWsPort",r),localStorage.setItem("clientHttpPort",n)}const v_=i=>{const{onClose:e,onSuccess:n,onValuesChange:r,onConnectResult:s,getFormApi:l,layout:c="default"}=i,[u,p]=E.useState(!1),[f,y]=E.useState({}),v=(L,z=3e3)=>new Promise(W=>{let H=!1;const K=setTimeout(()=>{if(!H){H=!0;try{ie?.close()}catch{}W({ok:!1,message:x("connectivityTimeout")})}},z);let ie=null;try{ie=new WebSocket(L),ie.onopen=()=>{if(!H){H=!0,clearTimeout(K);try{ie?.close()}catch{}W({ok:!0,message:x("connectivityOK")})}},ie.onerror=()=>{H||(H=!0,clearTimeout(K),W({ok:!1,message:x("connectivityFailed")}))}}catch{clearTimeout(K),W({ok:!1,message:x("connectivityFailed")})}}),S=async L=>{if(!j(L)){s?.({ok:!1,message:x("connectivityMissingParams")});return}p(!0),lH(L);const{ip:z,wsPort:W}=L,H=await v(`ws://${z}:${W}`);s?.(H),H.ok&&n?.(),p(!1)},P=E.useMemo(()=>y_(),[]),[T,b]=E.useState(P),w=E.useRef(P),D=E.useRef(null),O=E.useRef(null),N=E.useRef(null),M=L=>{const z={...w.current,...L};w.current=z,b(z),y(W=>({...W,...L.ip!==void 0?{ip:void 0}:{},...L.port!==void 0?{port:void 0}:{},...L.wsPort!==void 0?{wsPort:void 0}:{}})),r?.(z),aC(z)},F=()=>{const L=D.current?.querySelector("input")?.value,z=O.current?.querySelector("input")?.value,W=N.current?.querySelector("input")?.value,H={ip:String(L||""),port:String(z||""),wsPort:String(W||"")};(H.ip!==w.current.ip||H.port!==w.current.port||H.wsPort!==w.current.wsPort)&&M(H)};E.useEffect(()=>{w.current=P,b(P),r?.(P),aC(P)},[P]),E.useEffect(()=>{const L=[0,80,300,800].map(z=>window.setTimeout(()=>F(),z));return()=>{L.forEach(z=>window.clearTimeout(z))}},[]),E.useEffect(()=>{l?.({getValues:()=>w.current,submitForm:()=>S(w.current)})},[l]);const j=L=>{const z={};return String(L.ip||"").trim()||(z.ip=x("debug.guide.manualBindIPInvalid")),String(L.port||"").trim()||(z.port=x("invalidPort")),String(L.wsPort||"").trim()||(z.wsPort=x("invalidPort")),y(z),Object.keys(z).length===0};return k.jsxs("div",{className:`manual-connection-form manual-connection-form-${c}`,children:[c==="default"?k.jsx("div",{className:"manual-connection-tip",children:x("manualConnectDialogDesc")}):null,k.jsxs("div",{className:"manual-connection-grid",children:[k.jsxs("div",{className:"manual-connection-field",children:[k.jsxs("div",{className:"manual-connection-label",children:[k.jsx(Qe.Text,{strong:!0,children:"Client IP "}),k.jsx(Qe.Text,{type:"danger",children:"*"})]}),k.jsx("div",{ref:D,children:k.jsx(as,{value:T.ip,onChange:L=>M({ip:String(L||"")}),onBlur:F,placeholder:"192.168.x.x"})}),f.ip?k.jsx(Qe.Text,{type:"danger",children:f.ip}):null]}),k.jsxs("div",{className:"manual-connection-field",children:[k.jsxs("div",{className:"manual-connection-label",children:[k.jsx(Qe.Text,{strong:!0,children:"Port 1(HTTP 端口) "}),k.jsx(Qe.Text,{type:"danger",children:"*"})]}),k.jsx("div",{ref:O,children:k.jsx(as,{value:T.port,onChange:L=>M({port:String(L||"")}),onBlur:F,placeholder:"3000"})}),f.port?k.jsx(Qe.Text,{type:"danger",children:f.port}):null]}),k.jsxs("div",{className:"manual-connection-field",children:[k.jsxs("div",{className:"manual-connection-label",children:[k.jsx(Qe.Text,{strong:!0,children:"Port 2(WS 端口) "}),k.jsx(Qe.Text,{type:"danger",children:"*"})]}),k.jsx("div",{ref:N,children:k.jsx(as,{value:T.wsPort,onChange:L=>M({wsPort:String(L||"")}),onBlur:F,placeholder:"2999"})}),f.wsPort?k.jsx(Qe.Text,{type:"danger",children:f.wsPort}):null]})]}),e?k.jsxs("div",{className:"manual-connection-footer",children:[k.jsx(tt,{type:"tertiary",onClick:()=>e(),disabled:u,children:x("cancel")}),k.jsx(tt,{type:"primary",theme:"solid",onClick:()=>S(w.current),loading:u,children:x("manualConnectConfirm")})]}):null]})},cH=()=>{const{state:{showManualBindIP:i},setShowManualBindIP:e}=pn();return k.jsx(zt,{className:"manual-connection-modal",width:520,title:x("manualBindClientDebugServiceTitle"),visible:i,showCancel:!1,onCancel:()=>e(!1),showOk:!1,footer:null,children:k.jsx(v_,{onClose:()=>e(!1),onSuccess:()=>e(!1)})})},uH=()=>{const{state:{isConnected:i,message:e}}=E.useContext(Tg),n=e?.intent==="uploading",r=Math.max(0,Math.min(100,Math.round((e?.progress??0)*100))),s=!!e?.title;return k.jsxs("div",{"data-doc-shot":"start-debug-qr-idle",className:`home-container ${i?"home-container-connected":""}`,children:[k.jsx(H9,{title:x(i?"homeHeroTitleConnected":"homeHeroTitle"),subtitle:x(i?"homeHeroSubtitleConnected":"homeHeroSubtitle")}),k.jsxs("div",{className:Q("home-status-banner",`home-status-banner-${e?.type??"info"}`,{"home-status-banner-uploading":n}),"aria-live":"polite",children:[k.jsx("span",{className:"home-status-dot"}),k.jsxs("div",{className:"home-status-copy",children:[e?.title?k.jsx("div",{className:"home-status-title",children:e.title}):null,e?.desc?k.jsx("div",{className:Q("home-status-desc",{"home-status-desc-standalone":!s}),children:e.desc}):null]}),n?k.jsxs("div",{className:"home-status-progress-value",children:[r,"%"]}):null,n?k.jsx("div",{className:"home-status-progress-track",children:k.jsx("span",{className:"home-status-progress-fill",style:{width:`${r}%`}})}):null]}),k.jsx(iH,{isConnected:i}),!i&&k.jsx(aH,{})]})},dH="https://bytedance.larkoffice.com/wiki/WvifwWjGri7bTzkPbqKcqVi5ntc";function pH(i){try{return i?(new URL(i).searchParams.get("port")||"").trim():""}catch{return""}}function fH(i,e){return i?i.ok?"success":i.code==="status"?"warning":"error":e?"running":"idle"}function hH(i){return x(i==="success"?"connectivityOK":i==="warning"?"netDiagStatusWarning":i==="error"?"connectivityNotOK":i==="running"?"netDiagStatusRunning":"netDiagStatusIdle")}function gH(i,e){return i?i.ok?x("netDiagCheckReachableDetail"):i.msg||x("connectivityFailed"):x(e?"netDiagCheckRunningDetail":"netDiagCheckIdleDetail")}function mH({hasChecked:i,running:e,nodeHttp:n,nodeWs:r,clientHttp:s,clientWs:l,hasClientEndpoint:c}){return e?{kind:"running",title:x("netDiagSummaryRunningTitle"),desc:x("netDiagSummaryRunningDesc"),suggestions:[x("netDiagSummaryRunningHint")]}:i?c?n&&!n.ok?{kind:"node-service",title:x("netDiagSummaryNodeTitle"),desc:x("netDiagSummaryNodeDesc"),suggestions:[x("netDiagSuggestNodeDesc"),x("netDiagSuggestNodeRestart")]}:r&&!r.ok?{kind:"node-service",title:x("netDiagSummaryNodeTitle"),desc:x("netDiagSummaryNodeWsDesc"),suggestions:[x("netDiagSuggestNodeDesc")]}:s?.ok&&l&&!l.ok?{kind:"client-ws-failed",title:x("netDiagSummaryClientWsTitle"),desc:x("netDiagSummaryClientWsDesc"),suggestions:[x("netDiagSuggestClientDebugService"),x("netDiagSuggestWsBlocked"),x("netDiagSuggestPhoneProxyFallback")]}:s&&!s.ok&&l&&!l.ok?{kind:"client-both-failed",title:x("netDiagSummaryClientBothTitle"),desc:x("netDiagSummaryClientBothDesc"),suggestions:[x("netDiagSuggestClientDebugService"),x("netDiagSuggestLanAndProxy"),x("netDiagSuggestPhoneProxyFallback")]}:n?.ok&&r?.ok&&s?.ok&&l?.ok?{kind:"healthy",title:x("netDiagSummaryHealthyTitle"),desc:x("netDiagSummaryHealthyDesc"),suggestions:[x("netDiagSuggestOkDesc")]}:{kind:"partial",title:x("netDiagSummaryPartialTitle"),desc:x("netDiagSummaryPartialDesc"),suggestions:[x("netDiagSummaryPartialHint")]}:{kind:"missing-client",title:x("netDiagSummaryMissingClientTitle"),desc:x("netDiagSummaryMissingClientDesc"),suggestions:[x("netDiagSuggestNoClientDesc")]}:c?{kind:"idle",title:x("netDiagSummaryIdleTitle"),desc:x("netDiagSummaryIdleDesc"),suggestions:[x("netDiagSummaryIdleHint")]}:{kind:"missing-client",title:x("netDiagSummaryMissingClientTitle"),desc:x("netDiagSummaryMissingClientDesc"),suggestions:[x("netDiagSuggestNoClientDesc")]}}const lC=(i,e=3e3)=>new Promise(n=>{let r=!1;const s=setTimeout(()=>{if(!r){r=!0;try{l?.close()}catch{}n({ok:!1,code:"timeout",msg:x("connectivityTimeout")})}},e);let l=null;try{l=new WebSocket(i),l.onopen=()=>{if(!r){r=!0,clearTimeout(s);try{l?.close()}catch{}n({ok:!0,code:"ok"})}},l.onerror=()=>{r||(r=!0,clearTimeout(s),n({ok:!1,code:"error",msg:x("connectivityFailed")}))}}catch{clearTimeout(s),n({ok:!1,code:"error",msg:x("connectivityFailed")})}}),cC=async i=>{try{const e=new AbortController,n=setTimeout(()=>e.abort(),3e3),r=await fetch(i,{method:"GET",cache:"no-store",signal:e.signal});return clearTimeout(n),r.ok?{ok:!0,code:"ok"}:{ok:!1,code:"status",msg:`${r.status} ${r.statusText}`}}catch(e){return e instanceof DOMException&&e.name==="AbortError"?{ok:!1,code:"timeout",msg:x("connectivityTimeout")}:{ok:!1,code:"error",msg:x("connectivityFailed")}}},yH=()=>{const i=ks(),{state:{devSchema:e,schema:n}}=pn(),r=E.useRef(0),[s,l]=E.useState(!1),[c,u]=E.useState(!1),[p,f]=E.useState(!0),[y,v]=E.useState(!1),[S,P]=E.useState(!1),[T,b]=E.useState(),[w,D]=E.useState(),[O,N]=E.useState(),[M,F]=E.useState(),[j,L]=E.useState(!1),[z,W]=E.useState(null),[H,K]=E.useState(()=>({ip:String(Pe.get("clientHost")||localStorage.getItem("clientHost")||""),port:String(Pe.get("clientHttpPort")||localStorage.getItem("clientHttpPort")||""),wsPort:String(Pe.get("clientWsPort")||localStorage.getItem("clientWsPort")||"")})),ie=E.useMemo(()=>({ip:String(H.ip||""),port:String(H.port||""),wsPort:String(H.wsPort||"")}),[H]),ee=E.useCallback(re=>{K(re)},[]),ae=E.useMemo(()=>{const{nodeWsPort:re,clientHost:oe,clientHttpPort:_e,clientWsPort:ye}=Pe.getMultiple(["nodeWsPort","clientHost","clientHttpPort","clientWsPort"]);let ve="";try{n&&(ve=(new URL(n).searchParams.get("host")||"").trim())}catch{}return{schemaHost:ve,httpPort:pH(n),nodeWsPort:re,clientHost:oe,clientHttpPort:_e,clientWsPort:ye}},[e,n]),ne=String(ie.ip||ae.clientHost||"").trim(),ce=String(ie.port||ae.clientHttpPort||"").trim(),de=String(ie.wsPort||ae.clientWsPort||"").trim(),V=E.useCallback(async()=>{L(!0),l(!0),b(void 0),D(void 0),N(void 0),F(void 0);const re=await cC("/game/config");b(re);const oe=ae.nodeWsPort;D(oe?await lC(`ws://localhost:${oe}`):{ok:!1,code:"error",msg:x("connectivityMissingParams")}),N(ne&&ce?await cC(`http://${ne}:${ce}/game/scripts/krypton.js`):{ok:!1,code:"error",msg:x("netDiagMissingClientHttp")}),F(ne&&de?await lC(`ws://${ne}:${de}`):{ok:!1,code:"error",msg:x("netDiagMissingClientWs")}),P(!0),l(!1)},[ae.nodeWsPort,ne,ce,de]);E.useEffect(()=>{V()},[V]);const Y=E.useMemo(()=>[{key:"node-http",title:x("netDiagCheckNodeHttp"),target:"/game/config",item:T},{key:"node-ws",title:x("netDiagCheckNodeWs"),target:ae.nodeWsPort?`ws://localhost:${ae.nodeWsPort}`:"-",item:w},{key:"client-http",title:x("netDiagCheckClientHttp"),target:ne&&ce?`http://${ne}:${ce}`:"-",item:O},{key:"client-ws",title:x("netDiagCheckClientWs"),target:ne&&de?`ws://${ne}:${de}`:"-",item:M}],[O,M,ae.nodeWsPort,T,w,ne,ce,de]),I=E.useMemo(()=>mH({hasChecked:j,running:s,nodeHttp:T,nodeWs:w,clientHttp:O,clientWs:M,hasClientEndpoint:!!(ne&&ce&&de)}),[O,M,j,T,w,ne,ce,de,s]),U=I.suggestions,se=E.useCallback(()=>{r.current=window.scrollY,W(null),v(!0)},[]);return E.useEffect(()=>{if(!y)return;const re=()=>{window.scrollTo({top:r.current,left:0})},oe=window.requestAnimationFrame(re),_e=window.setTimeout(re,80);return()=>{window.cancelAnimationFrame(oe),window.clearTimeout(_e)}},[y]),k.jsxs("div",{className:"check-network-container",children:[k.jsxs("div",{className:"check-network-hero",children:[k.jsx("div",{className:"check-network-back",children:k.jsxs("button",{type:"button",className:"check-network-back-link",onClick:()=>i("/"),children:[k.jsx(O9,{size:14,strokeWidth:2}),k.jsx("span",{children:x("back")})]})}),k.jsx("div",{className:"check-network-hero-head",children:k.jsxs("div",{className:"check-network-hero-copy",children:[k.jsx("div",{className:"check-network-hero-title",children:x("netDiagTitle")}),k.jsx("div",{className:"check-network-hero-subtitle",children:x("netDiagSubtitle")})]})})]}),k.jsxs("section",{className:`check-network-section check-network-summary-result check-network-summary-result-${I.kind}`,children:[k.jsxs("div",{className:"check-network-section-headline",children:[k.jsx("div",{children:k.jsxs("div",{className:"check-network-title-row",children:[k.jsx("div",{className:"check-network-section-title",children:x("netDiagSummaryTitle")}),k.jsx(p_,{className:"check-network-title-link",href:dH,children:x("netDiagOpenTroubleshoot")})]})}),k.jsx(tt,{className:"check-network-section-toggle",theme:"borderless",onClick:()=>f(re=>!re),children:x(p?"netDiagCollapse":"netDiagExpand")})]}),p?k.jsxs(k.Fragment,{children:[k.jsxs("div",{className:"check-network-summary-main",children:[k.jsx("div",{className:"check-network-summary-eyebrow",children:x("netDiagGuideEyebrow")}),k.jsx("div",{className:"check-network-summary-result-title",children:I.title}),k.jsx("div",{className:"check-network-summary-result-desc",children:I.desc})]}),k.jsxs("div",{className:"check-network-guide-panel",children:[k.jsx("div",{className:"check-network-guide-label",children:x("netDiagGuideStepsTitle")}),k.jsx("div",{className:"check-network-suggestion-list",children:U.map((re,oe)=>k.jsxs("div",{className:"check-network-suggestion-item",children:[k.jsx("span",{className:"check-network-suggestion-index",children:oe+1}),k.jsx("span",{className:"check-network-suggestion-text",children:re})]},`${re}_${oe}`))})]})]}):null]}),k.jsxs("section",{className:"check-network-section check-network-manual-entry",children:[k.jsxs("div",{className:"check-network-section-headline",children:[k.jsxs("div",{children:[k.jsx("div",{className:"check-network-section-title",children:x("netDiagManualBindEntry")}),k.jsx("div",{className:"check-network-suggest-desc",children:x("netDiagManualSectionDesc")})]}),k.jsxs("div",{className:"check-network-manual-entry-actions",children:[k.jsx(tt,{className:"check-network-recheck-action",theme:"borderless",loading:s,onClick:()=>{V()},children:x("netDiagRunAll")}),k.jsx(tt,{className:"check-network-next-step-action",theme:"solid",type:"primary",onClick:se,children:x("netDiagActionManualConnect")})]})]}),z?k.jsx("div",{className:`check-network-inline-result ${z.ok?"success":"error"}`,children:z.ok?x("netDiagManualConnectResultSuccess"):`${x("netDiagManualConnectResultError")} ${z.message}`}):null]}),k.jsxs("section",{className:"check-network-section check-network-env-section",children:[k.jsxs("div",{className:"check-network-section-headline",children:[k.jsxs("div",{children:[k.jsx("div",{className:"check-network-section-title",children:x("netDiagEnvTitle")}),k.jsx("div",{className:"check-network-suggest-desc",children:x("netDiagEnvSectionDesc")})]}),k.jsx(tt,{className:"check-network-section-toggle",theme:"borderless",onClick:()=>u(re=>!re),children:x(c?"netDiagCollapse":"netDiagExpand")})]}),c?k.jsxs("div",{className:"check-network-summary-grid",children:[k.jsxs("div",{className:"check-network-summary-card",children:[k.jsx("div",{className:"check-network-summary-title",children:x("netDiagComputerGroup")}),k.jsxs("div",{className:"check-network-kv",children:[k.jsx("span",{children:x("netDiagEnvIP")}),k.jsx("span",{children:ae.schemaHost||"-"})]}),k.jsxs("div",{className:"check-network-kv",children:[k.jsx("span",{children:x("netDiagEnvWsPort")}),k.jsx("span",{children:ae.nodeWsPort||"-"})]}),k.jsxs("div",{className:"check-network-kv",children:[k.jsx("span",{children:x("netDiagEnvHttpPort")}),k.jsx("span",{children:ae.httpPort||"-"})]})]}),k.jsxs("div",{className:"check-network-summary-card",children:[k.jsx("div",{className:"check-network-summary-title",children:x("netDiagClientGroup")}),k.jsxs("div",{className:"check-network-kv",children:[k.jsx("span",{children:"IP"}),k.jsx("span",{children:ne||"-"})]}),k.jsxs("div",{className:"check-network-kv",children:[k.jsx("span",{children:x("netDiagEnvWsPort")}),k.jsx("span",{children:de||"-"})]}),k.jsxs("div",{className:"check-network-kv",children:[k.jsx("span",{children:x("netDiagEnvHttpPort")}),k.jsx("span",{children:ce||"-"})]})]})]}):null]}),k.jsxs("section",{className:"check-network-section check-network-check-section",children:[k.jsxs("div",{className:"check-network-section-headline",children:[k.jsxs("div",{children:[k.jsx("div",{className:"check-network-section-title",children:x("netDiagChecksTitle")}),k.jsx("div",{className:"check-network-suggest-desc",children:x("netDiagCheckSectionDesc")})]}),k.jsx(tt,{className:"check-network-section-toggle",theme:"borderless",onClick:()=>P(re=>!re),children:x(S?"netDiagCollapse":"netDiagExpand")})]}),S?k.jsx("div",{className:"check-network-checks",children:Y.map(re=>{const oe=fH(re.item,s&&j);return k.jsxs("div",{className:`check-network-check-card check-network-check-${oe}`,children:[k.jsxs("div",{className:"check-network-check-main",children:[k.jsxs("div",{className:"check-network-check-title-row",children:[k.jsx("span",{className:"check-network-check-dot"}),k.jsx("span",{className:"check-network-check-title",children:re.title})]}),k.jsxs("div",{className:"check-network-check-meta",children:[k.jsx("span",{className:"check-network-check-target",children:re.target}),k.jsx("span",{className:"check-network-check-detail",children:gH(re.item,s&&j)})]})]}),k.jsx("span",{className:`check-network-check-badge check-network-check-badge-${oe}`,children:hH(oe)})]},re.key)})}):null]}),k.jsxs(zt,{className:"manual-connection-modal check-network-manual-modal",width:560,title:x("manualBindClientDebugServiceTitle"),visible:y,showCancel:!1,showOk:!1,footer:null,onCancel:()=>v(!1),children:[k.jsx(v_,{onClose:()=>v(!1),onSuccess:()=>v(!1),onValuesChange:ee,onConnectResult:re=>{W(re),V()}}),z&&!z.ok?k.jsx("div",{className:"check-network-inline-result error",children:`${x("netDiagManualConnectResultError")} ${z.message}`}):null]})]})},vH=E.lazy(()=>lt(()=>import("./index-De6aUXHS.js"),__vite__mapDeps([22,23,24,25,26,27])).then(i=>({default:i.ProjectDetail}))),bH=E.lazy(()=>lt(()=>import("./index-0ZXvsv6N.js"),__vite__mapDeps([28,10,11])).then(i=>({default:i.DebugSetting}))),SH=E.lazy(()=>lt(()=>import("./index-k7bnci5q.js"),__vite__mapDeps([29,30,31,7,8,9,10,11,12,32])).then(i=>({default:i.LaunchMode}))),wH=E.lazy(()=>lt(()=>import("./index-knleXaJV.js"),__vite__mapDeps([33,7,8,9,10,11,12,25,34])).then(i=>({default:i.CheckCode}))),CH=E.lazy(()=>lt(()=>import("./index-D7Ic_K5L.js"),__vite__mapDeps([35,36])).then(i=>({default:i.BasicDebugGuide}))),_H=E.lazy(()=>lt(()=>import("./index-C4FIEYze.js"),__vite__mapDeps([37,23,24,38,39])).then(i=>({default:i.ChangeLog}))),kH=E.lazy(()=>lt(()=>import("./index-B51es4GH.js"),__vite__mapDeps([40,23,41,24,42,43,44,19])).then(i=>({default:i.IntegrationAssistant}))),PH=E.lazy(()=>lt(()=>import("./Detail-5RBwvI1M.js"),__vite__mapDeps([45,46,47,23,24,30,31,7,8,9,10,11,12,42,43,48,38])).then(i=>({default:i.IntegrationAssistantDetail}))),TH=E.lazy(()=>lt(()=>import("./MonetizationMode-BNWhLbH4.js"),__vite__mapDeps([49,46,47,23,24,41,42,43,44,19])).then(i=>({default:i.IntegrationAssistantMonetizationMode}))),EH=E.lazy(()=>lt(()=>import("./index-CFIXkzUa.js"),__vite__mapDeps([50,51])).then(i=>({default:i.ManualConnect}))),xH=E.lazy(()=>lt(()=>import("./index-BbwnUecN.js"),__vite__mapDeps([52,23,24,53,8,9,54,7,10,11,12,48,38,55,17])).then(i=>({default:i.WasmCodeSplit}))),DH=E.lazy(()=>lt(()=>import("./index-CMymGpPM.js"),__vite__mapDeps([56,24,20,44,57])).then(i=>({default:i.Performance}))),OH=E.lazy(()=>lt(()=>import("./index-UhNVLNJV.js"),__vite__mapDeps([58,23,24,53,8,9,54,26,59])).then(i=>({default:i.SubpackageCollect}))),IH=()=>k.jsx("div",{className:"routes-container",children:k.jsx(E.Suspense,{fallback:k.jsx(u_,{}),children:k.jsxs(hU,{children:[k.jsx(st,{path:"/",element:k.jsx(uH,{})}),k.jsx(st,{path:"/integration_assistant",element:k.jsx(kH,{})}),k.jsx(st,{path:"/integration_assistant/mode/:modeKey",element:k.jsx(TH,{})}),k.jsx(st,{path:"/integration_assistant/:capabilityKey",element:k.jsx(PH,{})}),k.jsx(st,{path:"/project_overview",element:k.jsx(vH,{})}),k.jsx(st,{path:"/project_detail",element:k.jsx(hh,{to:"/project_overview",replace:!0})}),k.jsx(st,{path:"/basic_debug_guide",element:k.jsx(CH,{})}),k.jsx(st,{path:"/debug_setting",element:k.jsx(bH,{})}),k.jsx(st,{path:"/launch_mode",element:k.jsx(SH,{})}),k.jsx(st,{path:"/upload_publish",element:k.jsx(wH,{})}),k.jsx(st,{path:"/version_upload",element:k.jsx(hh,{to:"/upload_publish",replace:!0})}),k.jsx(st,{path:"/precheck_code",element:k.jsx(hh,{to:"/upload_publish",replace:!0})}),k.jsx(st,{path:"/network_diagnostics",element:k.jsx(yH,{})}),k.jsx(st,{path:"/manual_connect",element:k.jsx(EH,{})}),k.jsx(st,{path:"/changelog",element:k.jsx(_H,{})}),k.jsx(st,{path:"/wasm_split",element:k.jsx(xH,{})}),k.jsx(st,{path:"/performance",element:k.jsx(DH,{})}),k.jsx(st,{path:"/subpackage_collect",element:k.jsx(OH,{})})]})})});function RH(){const{state:{loading:i,error:e,user:n}}=pn(),{topErrorItems:r,updateGameDetailTopErrors:s,updateConfigTopErrors:l,updateGameDetailAccessErrors:c}=l9(),{fetchGameDetail:u}=p9({onSuccess:s,updateGameDetailAccessErrors:c}),{isServerError:p,serverErrorMsg:f}=f9({fetchGameDetail:u,updateConfigTopErrors:l}),y=Dl();return h9({onResourceChange:u}),E.useEffect(()=>{const v=async S=>{if(S.status!=="update_wasm_split_config_done")return;const P=await Qi({url:"/game/config",method:"GET"});P.error||l({currentUser:n,checkResult:P.data?.checkResult})};return Ee.on("unitySplitStatus",v),()=>{Ee.off("unitySplitStatus",v)}},[l,n]),p&&!i.visible?k.jsxs("div",{className:"server-error-container",children:[k.jsx(JU,{}),k.jsx("div",{className:"server-error-text",children:f})]}):k.jsxs($U,{children:[k.jsx(V9,{items:r,fallbackErrorText:e.text}),k.jsx(G9,{enabled:!y&&!i.visible&&!p}),k.jsx(Q9,{}),k.jsx(cH,{}),k.jsxs("div",{className:"main-layout",children:[k.jsx(q9,{}),k.jsxs("div",{className:"content-wrapper",children:[k.jsx(U9,{}),k.jsx(IH,{})]})]}),k.jsx(u_,{})]})}hW();SP.createRoot(document.getElementById("root")).render(k.jsx(yg,{children:k.jsx(yW,{children:k.jsx(RH,{})})}));export{vl as $,O9 as A,tt as B,kl as C,p_ as D,Sl as E,Xt as F,mi as G,Gn as H,cD as I,g as J,ar as K,Ar as L,me as M,Ua as N,bl as O,H9 as P,sC as Q,C as R,ws as S,Qe as T,nV as U,rV as V,v_ as W,Lr as X,Mn as Y,zr as Z,Te as _,Ft as a,CT as a$,Qa as a0,er as a1,ds as a2,dh as a3,or as a4,Ee as a5,hg as a6,Dl as a7,Dg as a8,y_ as a9,_x as aA,Th as aB,nw as aC,Tx as aD,Wf as aE,Uo as aF,Ho as aG,Cx as aH,Eh as aI,rw as aJ,fT as aK,at as aL,ss as aM,ir as aN,Rr as aO,ug as aP,fi as aQ,us as aR,_n as aS,t0 as aT,as as aU,fE as aV,iT as aW,Mh as aX,hl as aY,AO as aZ,Yi as a_,oV as aa,lH as ab,zt as ac,Fh as ad,lr as ae,Zt as af,IG as ag,Ui as ah,MH as ai,$H as aj,Nr as ak,GH as al,BH as am,yl as an,qH as ao,AH as ap,zH as aq,FH as ar,QC as as,ai as at,nr as au,Xe as av,oT as aw,dn as ax,Zh as ay,kx as az,Qi as b,Nb as b$,Hh as b0,Zi as b1,UT as b2,ul as b3,FO as b4,SE as b5,IC as b6,PC as b7,fC as b8,ZE as b9,QP as bA,YP as bB,wC as bC,WC as bD,YC as bE,Fr as bF,Tn as bG,pl as bH,Uh as bI,RT as bJ,ml as bK,Cl as bL,Ya as bM,tr as bN,jT as bO,GE as bP,Bh as bQ,LE as bR,ZP as bS,PP as bT,NO as bU,qE as bV,gE as bW,WT as bX,ci as bY,LH as bZ,KE as b_,al as ba,dl as bb,Yt as bc,Vh as bd,kC as be,$h as bf,CE as bg,tl as bh,Kh as bi,rE as bj,wP as bk,IE as bl,zC as bm,MO as bn,$O as bo,BC as bp,Jn as bq,wT as br,KH as bs,ng as bt,QO as bu,gT as bv,gl as bw,og as bx,KC as by,yE as bz,Nl as c,TC as c0,WD as c1,UD as c2,Hi as c3,MD as c4,YH as c5,XP as c6,rD as c7,rx as c8,Za as c9,fI as ca,CD as cb,UH as cc,Pg as cd,HH as ce,VH as cf,Ki as cg,Mr as d,cW as e,ks as f,Ng as g,Rg as h,x as i,k as j,Jh as k,eg as l,fg as m,$r as n,Ih as o,Bn as p,iV as q,E as r,tW as s,xe as t,pn as u,tV as v,It as w,ww as x,gt as y,Q as z};
|