@ttmg/cli 0.4.4-beta.1 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/CHANGELOG.md +13 -13
  2. package/dist/index.js +143 -165
  3. package/dist/index.js.map +1 -1
  4. package/dist/package.json +4 -2
  5. package/dist/public/assets/Card-BAsimNoh.js +1 -0
  6. package/dist/public/assets/Detail-rVxbEDgh.js +1 -0
  7. package/dist/public/assets/Detail-rVxbEDgh.js.br +0 -0
  8. package/dist/public/assets/MonetizationMode-B20TAE9o.js +1 -0
  9. package/dist/public/assets/MonetizationModeSummary-CnHqXyco.js +1 -0
  10. package/dist/public/assets/{SectionHeader-4yiyPOgU.js → SectionHeader-Cn3FnOqh.js} +1 -1
  11. package/dist/public/assets/{baseForm-B46NsqNV.js → baseForm-kBTxn8h8.js} +1 -1
  12. package/dist/public/assets/baseForm-kBTxn8h8.js.br +0 -0
  13. package/dist/public/assets/{col-DYNqjxgf.js → col-VN3Ivd-x.js} +1 -1
  14. package/dist/public/assets/{compass-CDbv_4WN.js → compass-BabZVjAl.js} +1 -1
  15. package/dist/public/assets/{index-orYk2UId.js → index--6iHQzho.js} +1 -1
  16. package/dist/public/assets/{index-DyFkQnHH.js → index-1WjGwqIV.js} +1 -1
  17. package/dist/public/assets/index-BFFsJ47B.js +1 -0
  18. package/dist/public/assets/{index-CjpmMeus.js → index-Ba-JWe4X.js} +1 -1
  19. package/dist/public/assets/{index-CFIXkzUa.js → index-BjQlJrX7.js} +1 -1
  20. package/dist/public/assets/index-Bjn0ctEd.js +21 -0
  21. package/dist/public/assets/index-Bjn0ctEd.js.br +0 -0
  22. package/dist/public/assets/index-BnOeYQAd.js +1 -0
  23. package/dist/public/assets/index-BxokHznc.js +1 -0
  24. package/dist/public/assets/index-BxokHznc.js.br +0 -0
  25. package/dist/public/assets/{index-FFm0ULGJ.js → index-BxsB5E3u.js} +1 -1
  26. package/dist/public/assets/index-C83QHLmD.js +1 -0
  27. package/dist/public/assets/{index-0ZXvsv6N.js → index-CUuX90R9.js} +1 -1
  28. package/dist/public/assets/{index-BRJFt3oz.css → index-Ckp_mJJy.css} +1 -1
  29. package/dist/public/assets/index-Ckp_mJJy.css.br +0 -0
  30. package/dist/public/assets/{index-CLjbrJ-V.js → index-Cl0_vMWE.js} +1 -1
  31. package/dist/public/assets/index-Cl0_vMWE.js.br +0 -0
  32. package/dist/public/assets/index-ClU1uQYs.css +1 -0
  33. package/dist/public/assets/{index-k7bnci5q.js → index-Clq0hTDI.js} +1 -1
  34. package/dist/public/assets/{index-DM7Cg9s9.css → index-CoYWdJV1.css} +1 -1
  35. package/dist/public/assets/{index-vdqYVp2k.js → index-CpM8t743.js} +1 -1
  36. package/dist/public/assets/index-CzXMNZL3.js +1 -0
  37. package/dist/public/assets/index-DHdJsD10.js +1 -0
  38. package/dist/public/assets/index-DHdJsD10.js.br +0 -0
  39. package/dist/public/assets/index-DIcz5ciL.js +1 -0
  40. package/dist/public/assets/index-DIcz5ciL.js.br +0 -0
  41. package/dist/public/assets/{index-D7Min-ID.js → index-DK4IvdRl.js} +1 -1
  42. package/dist/public/assets/{index-BRLaHgvx.js → index-DXDZCuG4.js} +1 -1
  43. package/dist/public/assets/{index-DZen0tWD.js → index-DnnfZ7H_.js} +1 -1
  44. package/dist/public/assets/index-Dohibgdp.js +1 -0
  45. package/dist/public/assets/{index-fYRa-mFF.js → index-DulANwbq.js} +1 -1
  46. package/dist/public/assets/index-O_L1tU2b.js +1 -0
  47. package/dist/public/assets/index-O_L1tU2b.js.br +0 -0
  48. package/dist/public/assets/index-QNLvejKK.js +1 -0
  49. package/dist/public/assets/index-WyNc-BTG.css +1 -0
  50. package/dist/public/assets/index-WyNc-BTG.css.br +0 -0
  51. package/dist/public/assets/index-aSl6Wdrp.js +1 -0
  52. package/dist/public/assets/index-aSl6Wdrp.js.br +0 -0
  53. package/dist/public/assets/index-odEI7YQF.js +1 -0
  54. package/dist/public/assets/index-odEI7YQF.js.br +0 -0
  55. package/dist/public/assets/{layers-DFzVcSdo.js → layers-B4zhx14P.js} +1 -1
  56. package/dist/public/assets/{list-checks-sBbjrB9b.js → list-checks-Br6imjXC.js} +1 -1
  57. package/dist/public/assets/{sparkles-kUOwqZbi.js → sparkles-BjIkcbAi.js} +1 -1
  58. package/dist/public/assets/{triangle-alert-DEb521qR.js → triangle-alert-CgKAc3w5.js} +1 -1
  59. package/dist/public/assets/{zap-4GR910dG.js → zap-DFHw5liD.js} +1 -1
  60. package/dist/public/index.html +2 -2
  61. package/dist/scripts/docs/render.js +8 -8
  62. package/dist/scripts/verify-dist-version.js +41 -0
  63. package/package.json +4 -2
  64. package/dist/public/assets/Detail-5RBwvI1M.js +0 -1
  65. package/dist/public/assets/Detail-5RBwvI1M.js.br +0 -0
  66. package/dist/public/assets/MonetizationMode-BNWhLbH4.js +0 -1
  67. package/dist/public/assets/MonetizationModeSummary-3IFhpJtg.js +0 -1
  68. package/dist/public/assets/Tag-BEGC7xBm.js +0 -1
  69. package/dist/public/assets/baseForm-B46NsqNV.js.br +0 -0
  70. package/dist/public/assets/index-B51es4GH.js +0 -1
  71. package/dist/public/assets/index-BRJFt3oz.css.br +0 -0
  72. package/dist/public/assets/index-BYIujYdU.js +0 -21
  73. package/dist/public/assets/index-BYIujYdU.js.br +0 -0
  74. package/dist/public/assets/index-BbwnUecN.js +0 -1
  75. package/dist/public/assets/index-BbwnUecN.js.br +0 -0
  76. package/dist/public/assets/index-Bv29rr8X.js +0 -1
  77. package/dist/public/assets/index-Bv29rr8X.js.br +0 -0
  78. package/dist/public/assets/index-C4FIEYze.js +0 -1
  79. package/dist/public/assets/index-CLjbrJ-V.js.br +0 -0
  80. package/dist/public/assets/index-CMymGpPM.js +0 -1
  81. package/dist/public/assets/index-D7Ic_K5L.js +0 -1
  82. package/dist/public/assets/index-DBDUeSB8.css +0 -1
  83. package/dist/public/assets/index-DBDUeSB8.css.br +0 -0
  84. package/dist/public/assets/index-De6aUXHS.js +0 -1
  85. package/dist/public/assets/index-De6aUXHS.js.br +0 -0
  86. package/dist/public/assets/index-DotB5V_j.js +0 -1
  87. package/dist/public/assets/index-UhNVLNJV.js +0 -1
  88. package/dist/public/assets/index-UhNVLNJV.js.br +0 -0
  89. package/dist/public/assets/index-XHO2ciZ_.js +0 -1
  90. package/dist/public/assets/index-XHO2ciZ_.js.br +0 -0
  91. package/dist/public/assets/index-knleXaJV.js +0 -1
  92. package/dist/public/assets/index-knleXaJV.js.br +0 -0
@@ -1 +0,0 @@
1
- import{w as be,t as Oe,X as Te,y as ye,R as j,z as X,Y as Ee,Z as Pe,E as Re,$ as Ie,k as We,l as Me,O as Fe,H as De,J as k,K as $e,M as J,r as g,a0 as K,a1 as re,a2 as Ae,c as V,b as T,j as e,i as a,B as w,a as ze,u as Se,a3 as Le,d as D,D as ve,Q as qe,a4 as Be,a5 as ie,a6 as le,f as Ue,A as Q,P as Z}from"./index-BYIujYdU.js";import{S as oe}from"./SectionHeader-4yiyPOgU.js";import{C as H,T as Ge}from"./Tag-BEGC7xBm.js";import{C as He,a as ce,U as Xe,W as Ve}from"./index-CLjbrJ-V.js";import{F as de}from"./baseForm-B46NsqNV.js";/* empty css */import{L as Ye}from"./list-checks-sBbjrB9b.js";import{S as Qe}from"./sparkles-kUOwqZbi.js";import"./col-DYNqjxgf.js";import"./index-Bv29rr8X.js";class te extends be{constructor(s){super(Object.assign(Object.assign({},te.defaultAdapter),s)),this.handleMouseInSideChange=t=>{this._adapter.handleMouseInSideChange(t)},this.getInputWrapperRect=()=>this._adapter.getInputWrapperRect()}hasToast(s){return this._adapter.getState("list").map(n=>{let{id:l}=n;return l}).includes(s)}addToast(s){const t=this._adapter.getState("list");t.push(s),this._adapter.updateToast(t,[],[])}updateToast(s,t){let n=this._adapter.getState("list");n=n.map(i=>i.id===s?Object.assign(Object.assign({},i),t):i);const l=n.filter(i=>i.id===s);this._adapter.updateToast(n,[],l)}removeToast(s){let t=this._adapter.getState("list");const n=[];t=t.filter(l=>l.id===s?(n.push(l),!1):!0),this._adapter.updateToast(t,n,[])}destroyAll(){const s=this._adapter.getState("list");s.length>0&&this._adapter.updateToast([],s,[])}}const pe=`${Oe}-toast`,z={PREFIX:pe,WRAPPER:`${pe}-wrapper`},B={types:["warning","success","info","error","default"],themes:["normal","light"],directions:["ltr","rtl"]},Ze={duration:3};class se extends be{constructor(s){super(Object.assign(Object.assign({},se.defaultAdapter),s)),this._timer=null,this._id=null}init(){this.startCloseTimer_(),this._id=this._adapter.getProp("id")}destroy(){this.clearCloseTimer_()}startCloseTimer_(){const s=this._adapter.getProp("duration");s&&Te(s)&&(this._timer=setTimeout(()=>{this.close()},s*1e3))}close(s){s&&s.stopPropagation(),this._adapter.notifyWrapperToRemove(this._id),this._adapter.notifyClose()}clearCloseTimer_(){this._timer&&(clearTimeout(this._timer),this._timer=null)}restartCloseTimer(){this.clearCloseTimer_(),this.startCloseTimer_()}}const W=z.PREFIX;let $=class extends ye{constructor(s){super(s),this.toastEle=j.createRef(),this.clearCloseTimer=()=>{this.foundation.clearCloseTimer_()},this.startCloseTimer=()=>{this.foundation.startCloseTimer_()},this.restartCloseTimer=()=>{this.foundation.restartCloseTimer()},this.state={},this.foundation=new se(this.adapter)}get adapter(){return Object.assign(Object.assign({},super.adapter),{notifyWrapperToRemove:s=>{this.props.close(s)},notifyClose:()=>{this.props.onClose()}})}componentDidMount(){this.foundation.init()}componentWillUnmount(){this.foundation.destroy()}close(s){this.foundation.close(s)}renderIcon(){const{type:s,icon:t}=this.props,l={warning:j.createElement(Fe,null),success:j.createElement(Me,null),info:j.createElement(We,null),error:j.createElement(Ie,null)}[s],i="large",c=X(`${W}-icon`,`${W}-icon-${s}`);return t?Ee(t)?j.cloneElement(t,{size:i,className:`${W}-icon`}):t:s&&l?j.cloneElement(l,{size:i,className:c}):null}render(){const{content:s,type:t,theme:n,showClose:l,textMaxWidth:i,className:c,style:d}=this.props,m=this.props.direction||this.context.direction,p=X(W,c,{[`${W}-${t}`]:!0,[`${W}-${n}`]:n==="light",[`${W}-rtl`]:m==="rtl"}),o={};o.maxWidth=i;const u="borderless",v="small",f=this.props.positionInList?this.props.positionInList.length-this.props.positionInList.index-1:0,y=j.createElement("div",{ref:this.toastEle,role:"alert","aria-label":`${t||"default"} type`,className:p,style:Object.assign(Object.assign({},d),{transform:`translate3d(0,0,${f*-10}px)`}),onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onAnimationStart:this.props.onAnimationStart,onAnimationEnd:this.props.onAnimationEnd},j.createElement("div",{className:`${W}-content`},this.renderIcon(),j.createElement("span",{className:`${W}-content-text`,style:o,"x-semi-prop":"content"},s),l&&j.createElement("div",{className:`${W}-close-button`},j.createElement(Pe,{onClick:O=>this.close(O),type:"tertiary",icon:j.createElement(Re,{"x-semi-prop":"icon"}),theme:u,size:v}))));if(this.props.stack){const O=this.props.stackExpanded&&this.toastEle.current&&getComputedStyle(this.toastEle.current).height||0;return j.createElement("div",{className:`${W}-zero-height-wrapper`,style:{height:O}},y)}else return y}};$.contextType=De;$.propTypes={onClose:k.func,content:k.node,close:k.func,duration:k.number,theme:k.oneOf(B.themes),type:k.oneOf(B.types),textMaxWidth:k.oneOfType([k.string,k.number]),style:k.object,className:k.string,showClose:k.bool,stack:k.bool,stackExpanded:k.bool,icon:k.node,direction:k.oneOf(B.directions)};$.__SemiComponentName__="Toast";$.defaultProps=$e($.__SemiComponentName__,{onClose:J,content:"",close:J,duration:Ze.duration,textMaxWidth:450,showClose:!0,stack:!1,stackExpanded:!1,theme:"normal"});var Je=function(r,s){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&s.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(r);l<n.length;l++)s.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(r,n[l])&&(t[n[l]]=r[n[l]]);return t};const Ke=(r,s)=>{var{afterClose:t}=r,n=Je(r,["afterClose"]);const[l,i]=g.useState(!0),c=()=>{i(!1)};return j.useImperativeHandle(s,()=>({close:()=>{i(!1)}})),g.useEffect(()=>{l||t(n.id)},[l]),l?j.createElement($,Object.assign({},n,{close:c})):null},et=j.forwardRef(Ke),q={motion:!0,zIndex:1010,duration:3};function tt(){const[r,s]=j.useState([]);function t(n,l){return s(i=>[{element:n,config:l},...i]),i=>{s(c=>c.filter(d=>{let{config:m}=d;return m.id!==i}))}}return[r,t]}function st(){const[r,s]=tt(),t=g.useRef(new Map),n=i=>{const c=K("semi_toast_"),d=Object.assign(Object.assign({},i),{id:c});let m;const p=j.createElement(et,Object.assign({},d,{key:c,afterClose:o=>m(o),ref:o=>{var u;t.current.set(c,{close:(u=o?.close)!==null&&u!==void 0?u:J})}}));return m=s(p,Object.assign({},d)),c},l=i=>{var c;const{close:d}=(c=t.current.get(i))!==null&&c!==void 0?c:{};d?.()};return[{success:i=>n(Object.assign(Object.assign(Object.assign({},q),i),{type:"success"})),info:i=>n(Object.assign(Object.assign(Object.assign({},q),i),{type:"info"})),error:i=>n(Object.assign(Object.assign(Object.assign({},q),i),{type:"error"})),warning:i=>n(Object.assign(Object.assign(Object.assign({},q),i),{type:"warning"})),open:i=>n(Object.assign(Object.assign(Object.assign({},q),i),{type:"default"})),close:i=>l(i)},j.createElement(j.Fragment,null,Array.isArray(r)&&r.length?j.createElement(j.Fragment,null,r.map(i=>i.element)):null)]}const at=()=>{var r;return r=class x extends ye{constructor(t){super(t),this.stack=!1,this.innerWrapperRef=j.createRef(),this.handleMouseEnter=n=>{this.stack&&this.foundation.handleMouseInSideChange(!0)},this.handleMouseLeave=n=>{var l;this.stack&&!((l=this.foundation.getInputWrapperRect())===null||l===void 0)&&l.height&&this.foundation.handleMouseInSideChange(!1)},this.state={list:[],removedItems:[],updatedItems:[],mouseInSide:!1},this.foundation=new te(this.adapter)}get adapter(){return Object.assign(Object.assign({},super.adapter),{updateToast:(t,n,l)=>{this.setState({list:t,removedItems:n,updatedItems:l})},handleMouseInSideChange:t=>{this.setState({mouseInSide:t})},getInputWrapperRect:()=>{var t;return(t=this.innerWrapperRef.current)===null||t===void 0?void 0:t.getBoundingClientRect()}})}static create(t){var n;const l=(n=t.id)!==null&&n!==void 0?n:K("toast");if(x.ref){const i=document.querySelector(`#${this.wrapperId}`);["top","left","bottom","right"].map(c=>{c in t&&(i.style[c]=typeof t[c]=="number"?`${t[c]}px`:t[c])}),!!t.stack!==x.ref.stack&&(x.ref.stack=!!t.stack),x.ref.has(l)?x.ref.update(l,Object.assign(Object.assign({},t),{id:l})):x.ref.add(Object.assign(Object.assign({},t),{id:l}))}else{const i=document.createElement("div");this.wrapperId||(this.wrapperId=K("toast-wrapper").slice(0,26)),i.className=z.WRAPPER,i.id=this.wrapperId,i.style.zIndex=String(typeof t.zIndex=="number"?t.zIndex:x.defaultOpts.zIndex),["top","left","bottom","right"].map(c=>{if(c in x.defaultOpts||c in t){const d=t[c]?t[c]:x.defaultOpts[c];i.style[c]=typeof d=="number"?`${d}px`:d}}),x.defaultOpts.getPopupContainer?x.defaultOpts.getPopupContainer().appendChild(i):document.body.appendChild(i),re.render(j.createElement(x,{ref:c=>x.ref=c}),i,()=>{x.ref.add(Object.assign(Object.assign({},t),{id:l})),x.ref.stack=!!t.stack})}return l}static close(t){x.ref&&x.ref.remove(t)}static destroyAll(){if(x.ref){x.ref.destroyAll();const t=document.querySelector(`#${this.wrapperId}`);re.unmountComponentAtNode(t),t&&t.parentNode.removeChild(t),x.ref=null,this.wrapperId=null}}static getWrapperId(){return this.wrapperId}static info(t){return typeof t=="string"&&(t={content:t}),this.create(Object.assign(Object.assign(Object.assign({},x.defaultOpts),t),{type:"info"}))}static warning(t){return typeof t=="string"&&(t={content:t}),this.create(Object.assign(Object.assign(Object.assign({},x.defaultOpts),t),{type:"warning"}))}static error(t){return typeof t=="string"&&(t={content:t}),this.create(Object.assign(Object.assign(Object.assign({},x.defaultOpts),t),{type:"error"}))}static success(t){return typeof t=="string"&&(t={content:t}),this.create(Object.assign(Object.assign(Object.assign({},x.defaultOpts),t),{type:"success"}))}static config(t){["top","left","bottom","right"].forEach(n=>{n in t&&(x.defaultOpts[n]=t[n])}),typeof t.theme=="string"&&B.themes.includes(t.theme)&&(x.defaultOpts.theme=t.theme),typeof t.zIndex=="number"&&(x.defaultOpts.zIndex=t.zIndex),typeof t.duration=="number"&&(x.defaultOpts.duration=t.duration),typeof t.getPopupContainer=="function"&&(x.defaultOpts.getPopupContainer=t.getPopupContainer)}has(t){return this.foundation.hasToast(t)}add(t){return this.foundation.addToast(t)}update(t,n){return this.foundation.updateToast(t,n)}remove(t){return this.foundation.removeToast(t)}destroyAll(){return this.foundation.destroyAll()}render(){let{list:t}=this.state;const{removedItems:n,updatedItems:l}=this.state;t=Array.from(new Set([...t,...n]));const i=l.map(d=>{let{id:m}=d;return m}),c=d=>{var m;!((m=d?.foundation)===null||m===void 0)&&m._id&&i.includes(d.foundation._id)&&d.foundation.restartCloseTimer()};return j.createElement(j.Fragment,null,j.createElement("div",{className:X({[`${z.PREFIX}-innerWrapper`]:!0,[`${z.PREFIX}-innerWrapper-hover`]:this.state.mouseInSide}),ref:this.innerWrapperRef,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},t.map((d,m)=>{const p=n.find(o=>o.id===d.id)!==void 0;return j.createElement(Ae,{key:d.id,motion:d.motion,animationState:p?"leave":"enter",startClassName:p?`${z.PREFIX}-animation-hide`:`${z.PREFIX}-animation-show`},o=>{let{animationClassName:u,animationEventsNeedBind:v,isAnimating:f}=o;return p&&!f?null:j.createElement($,Object.assign({},d,{stack:this.stack,stackExpanded:this.state.mouseInSide,positionInList:{length:t.length,index:m},className:X({[d.className]:!!d.className,[u]:!0})},v,{style:Object.assign({},d.style),close:y=>this.remove(y),ref:c}))})})))}},r.defaultOpts={motion:!0,zIndex:1010,content:""},r.propTypes={content:k.node,duration:k.number,onClose:k.func,icon:k.node,direction:k.oneOf(B.directions),stack:k.bool},r.defaultProps={},r};class nt{static create(s){const t=at();return t.useToast=st,s&&t.config(s),t}}const ee=nt.create();const rt=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],it=V("check",rt);const lt=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],ot=V("cloud",lt);const ct=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],dt=V("cpu",ct);const pt=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],mt=V("workflow",pt),M={Idle:0,WasmPreparing:1,WasmPrepared:2,WasmSplitIssued:3,WasmSplitting:4,WasmSplitDone:5,WasmReadyToPrepare:6,WasmSplitPreparing:7,WasmPreparedSuccess:8,WasmCollecting:9,WasmUploadFail:-1,WasmDownloadFail:-2,WasmFileNotExist:-3,WasmSplitFail:-4,WasmSplitUpdateDBFail:-5,WasmSplitPrepareFail:-6,WasmPrepareFailed:-1};function me({codeMd5:r,clientKey:s}){return T({url:"/game/wasm-split-config",method:"GET",data:{codeMd5:r,clientKey:s}})}function ut(r){const{codePath:s,codeMd5:t,clientKey:n,desc:l}=r;return T({url:"/game/wasm-prepare",method:"POST",data:{codePath:s,clientKey:n,codeMd5:t,desc:l}})}function ht({codeMd5:r,clientKey:s}){return T({url:"/game/wasm-prepare-result",method:"POST",data:{codeMd5:r,clientKey:s}})}function gt(r,s){const t=s?.intervalMs,n=s?.maxAttempts,l=s?.signal||new AbortController().signal;let i=0;return new Promise((c,d)=>{if(l?.aborted){d(new DOMException("Polling aborted","AbortError"));return}const m=()=>{clearTimeout(p),d(new DOMException("Polling aborted","AbortError"))};l?.addEventListener("abort",m,{once:!0});let p;const o=async()=>{i+=1;try{const u=await ht(r),{status:v}=u.data;if(v===M.WasmPreparedSuccess||v===M.WasmSplitDone){c(u);return}if(v<0){c(u);return}if(i>=n){d(new Error(`Polling timeout after ${n} attempts`));return}p=window.setTimeout(o,t)}catch(u){if(i>=n){d(u);return}p=window.setTimeout(o,t)}};o()})}function ft({codeMd5:r,clientKey:s,codePath:t}){return T({url:"/game/wasm-prepare-download",method:"POST",data:{codeMd5:r,clientKey:s,codePath:t}})}function ue(r){const{codeMd5:s,clientKey:t,archive:n}=r;return T({url:"/game/wasm-split",method:"POST",data:{codeMd5:s,clientKey:t,archive:n??!1}})}function wt({codeMd5:r,clientKey:s}){return T({url:"/game/wasm-split-result",method:"POST",data:{codeMd5:r,clientKey:s}})}function xt(r,s){const t=s?.intervalMs,n=s?.maxAttempts,l=s?.signal||new AbortController().signal;let i=0;return new Promise((c,d)=>{if(l?.aborted){d(new DOMException("Polling aborted","AbortError"));return}const m=()=>{clearTimeout(p),d(new DOMException("Polling aborted","AbortError"))};l?.addEventListener("abort",m,{once:!0});let p;const o=async()=>{i+=1;try{const u=await wt(r),{status:v}=u.data;if(v!==M.WasmSplitDone){if(i>=n){d(new Error(`Polling timeout after ${n} attempts`));return}p=window.setTimeout(o,t);return}c(u)}catch(u){if(i>=n){d(u);return}p=window.setTimeout(o,t)}};o()})}function jt({codeMd5:r,clientKey:s}){return T({url:"/game/wasm-split-download-result",method:"POST",data:{clientKey:s,codeMd5:r}})}function he(r){return T({url:"/game/wasm-split-download",method:"POST",data:r})}function ke(r){const{codeMd5:s,clientKey:t,codePath:n}=r;return T({url:"/game/wasm-split-reset",method:"POST",data:{codeMd5:s,clientKey:t,codePath:n}})}function bt({codeMd5:r,clientKey:s}){return T({url:"/game/wasm-taskinfo",method:"GET",data:{codeMd5:r,clientKey:s}})}function yt({codeMd5:r,clientKey:s}){return T({url:"/game/wasm-collect-start",method:"POST",data:{codeMd5:r,clientKey:s}})}function St({codeMd5:r,clientKey:s}){return T({url:"/game/wasm-set-collect",method:"POST",data:{codeMd5:r,clientKey:s}})}function ge(r){return T({url:"/game/wasm-collect-funcids",method:"GET",data:r})}function vt(r){return T({url:"/game/wasm-collect-info",method:"GET",data:r})}function fe(r){return T({url:"/game/pipeline-mode",method:"POST",data:{mode:r}})}const kt=({onSubmit:r,onCancel:s,onChange:t})=>e.jsxs(de,{style:{width:"100%"},onChange:t,onSubmit:r,children:[e.jsx(de.TextArea,{rules:[{required:!0,message:a("inputSplitDesc")}],label:a("splitDesc"),placeholder:a("inputSplitDesc"),field:"desc"}),e.jsxs("div",{className:"wasm-prepare-form-button-container",children:[e.jsx(w,{type:"primary",htmlType:"submit",style:{marginRight:12},children:a("startPrepare")}),e.jsx(w,{type:"tertiary",onClick:s,children:a("cancel")})]})]}),N={init:"init",start:"start",processing:M.WasmPreparing,processingReady:M.WasmReadyToPrepare,success:M.WasmPreparedSuccess,failed:M.WasmPrepareFailed,splitDone:M.WasmSplitDone},Ct=({codePath:r,codeMd5:s,clientKey:t,pipelineMode:n="local",onCancel:l,onNext:i,onHide:c})=>{const[d,m]=g.useState(""),[p,o]=g.useState({code:0,data:{status:N.init}}),u=g.useRef(null),v=g.useMemo(()=>p?.data?.status,[p?.data?.status]),f=()=>{u.current?.abort(),l(),ke({codeMd5:s,clientKey:t,codePath:r}).then(b=>{b.code===0&&o({...p,data:{...p?.data,status:N.init}})})},y=async()=>{u.current=new AbortController,o({code:0,data:{status:N.start}}),ut({codePath:r,codeMd5:s,clientKey:t,desc:d}).then(b=>{b.code===0||b?.error?.code===10024||b?.error?.code===10028?(o({...b,data:{...b?.data,status:N.processing}}),O()):o({...p,error:b?.error||{code:-1,message:"Internal server error, please try again later..."},data:{...p?.data,status:N.failed}})})},O=()=>{gt({codeMd5:s,clientKey:t},{intervalMs:2e3,maxAttempts:240,signal:u.current?.signal}).then(b=>{b.code===0?ft({codeMd5:s,clientKey:t,codePath:r}).then(P=>{P.code===0?i():o({...p,error:{code:-1,message:P?.error?.message||"Download prepared wasm failed"},data:{...p?.data,status:N.failed}})}).catch(P=>{o({...p,error:{code:-1,message:P?.message||"Download prepared wasm failed"},data:{...p?.data,status:N.failed}})}):o({...p,data:{...p?.data,status:N.failed}})}).catch(b=>{b?.name!=="AbortError"&&o(P=>({...P,error:{code:-1,message:b?.message||"Polling failed"},data:{...P?.data,status:N.failed}}))})},R=b=>{m(b?.values?.desc)},S=n==="remote",h=()=>e.jsxs("div",{className:"wasm-prepare-processing-content",children:[e.jsx("div",{className:"wasm-prepare-processing-spinner",role:"status","aria-label":S?a("remotePreparing.title"):a("preparingSplit")}),e.jsx("div",{className:"wasm-prepare-processing-text",children:S?a("remotePreparing.title"):a("preparingSplit")}),e.jsx("div",{className:"wasm-prepare-processing-warning",children:S?a("remotePreparing.eta"):a("warningDuringPreparing")}),e.jsxs("div",{className:"wasm-prepare-processing-cancel",children:[e.jsx(w,{type:"tertiary",onClick:()=>f(),children:a("cancelPrepare")}),e.jsx(w,{type:"primary",onClick:()=>c(),children:a("backgroundRun")})]})]});let _=null;switch(v){case N.init:_=e.jsx(kt,{onSubmit:y,onCancel:l,onChange:R});break;case N.start:_=S?h():e.jsxs("div",{className:"wasm-prepare-processing-content",children:[e.jsx("div",{className:"wasm-prepare-processing-spinner",role:"status","aria-label":a("startingPrepare")}),e.jsx("div",{className:"wasm-prepare-processing-text",children:a("startingPrepare")}),e.jsxs("div",{className:"wasm-prepare-processing-cancel",children:[e.jsx(w,{type:"tertiary",onClick:l,children:a("cancelPrepare")}),e.jsx(w,{type:"primary",onClick:()=>c(),children:a("backgroundRun")})]})]});break;case N.processing:case N.processingReady:_=S?h():e.jsxs("div",{className:"wasm-prepare-processing-content",children:[e.jsx("div",{className:"wasm-prepare-processing-spinner",role:"status","aria-label":a("preparingSplit")}),e.jsx("div",{className:"wasm-prepare-processing-text",children:a("preparingSplit")}),e.jsx("div",{className:"wasm-prepare-processing-warning",children:a("warningDuringPreparing")}),e.jsxs("div",{className:"wasm-prepare-processing-cancel",children:[e.jsx(w,{type:"tertiary",onClick:()=>{f()},children:a("cancelPrepare")}),e.jsx(w,{type:"primary",onClick:()=>c(),children:a("backgroundRun")})]})]});break;case N.success:case N.splitDone:break;case N.failed:const b=p?.error?.message||"Unknown error";_=e.jsxs("div",{className:"wasm-prepare-failed-content",children:[e.jsx("div",{className:"wasm-prepare-failed-text",children:a("preparingSplitFailed")}),p?.data?.status===N.failed&&e.jsx("div",{className:"wasm-prepare-failed-warning",children:b}),e.jsx(w,{type:"tertiary",style:{marginTop:12},onClick:y,children:a("retryPrepare")})]});break;default:_=null}return e.jsx("div",{className:"wasm-prepare-content-container",children:_})},_t=({data:r})=>{const s={...r||{}},t=[{label:"Client key",value:"app_id"},{label:a("wasmSize"),value:"wasm_size",render:n=>`${(n/1024/1024).toFixed(2)} MB`},{label:a("totalFuncCount"),value:"total_wasm_func_count",render:n=>n>=1e3?`${(n/1e3).toFixed(2)} K`:`${n}`},{label:a("collectedFuncCount"),value:"collected_func_count",render:n=>n>=1e3?`${(n/1e3).toFixed(2)} K`:`${n}`},{label:"Wasm md5",value:"wasm_md5"}];return e.jsx("div",{className:"wasm-collect-status",children:t.map(n=>e.jsxs("div",{className:"wasm-collect-status-item",children:[e.jsx(ze,{size:"small",className:"wasm-collect-status-item-label",children:n.label}),e.jsx("span",{className:"wasm-collect-status-item-value",children:n.render?.(s[n.value])||s[n.value]})]},n.value))})},Nt="https://bytedance.larkoffice.com/wiki/OyGMwHVW9iSeneknlOcc2qb6nUh",Ot=({onNext:r,onCancel:s,codeMd5:t,clientKey:n,onHide:l})=>{const{state:{devSchema:i,schema:c,selectedLaunchOption:d,isConnected:m}}=Se(),p=g.useMemo(()=>{if(c)return Le({baseSchema:c,option:d,debugMode:"clientPreview"});if(!i)return"";if(/([?&])debugMode=/.test(i))return i.replace(/([?&])debugMode=[^&]*/,"$1debugMode=clientPreview");const E=i.includes("?")?"&":"?";return`${i}${E}debugMode=clientPreview`},[i,c,d]),[o,u]=g.useState("startCollect"),[v,f]=g.useState(),[y,O]=g.useState(),[R,S]=g.useState(0),h=g.useRef(null),_=g.useRef(!1),b=g.useRef(!1),P=.08,A=g.useMemo(()=>{if(!y)return!1;const E=y?.total_wasm_func_count;return E?R/E>=P:!1},[y,R]);g.useEffect(()=>{if(o!=="collecting"){h.current&&(window.clearInterval(h.current),h.current=null);return}if(h.current)return;const E=I=>{S(I.data?.collected_func_count||0);const L=I.data?.collect_state;L==="closed"&&!_.current?(_.current=!0,ee.warning({content:a("collect.sessionClosed"),duration:5})):L==="open"&&(_.current=!1)};return ge({codeMd5:t,clientKey:n}).then(E).catch(console.error),h.current=window.setInterval(()=>{ge({codeMd5:t,clientKey:n}).then(E).catch(I=>{console.error(I)})},2e3),()=>{h.current&&(window.clearInterval(h.current),h.current=null)}},[o,t,n]);const U=async()=>{if(o!=="collecting")try{if(u("startCollect"),(await yt({codeMd5:t,clientKey:n})).code!==0){u("willCollect");return}St({codeMd5:t,clientKey:n}).catch(console.error),u("collecting"),bt({codeMd5:t,clientKey:n}).then(I=>{f(I.data)}).catch(console.error),vt({codeMd5:t,clientKey:n}).then(I=>{O(I.data||{})}).catch(console.error)}catch(E){console.error(E),ee.error({content:a("collect.startFailed"),duration:4}),u("willCollect")}};g.useEffect(()=>{b.current||(b.current=!0,U())},[]);const F=()=>{h.current&&(window.clearInterval(h.current),h.current=null),u("willCollect"),r()};return e.jsxs("div",{className:"wasm-collect-content-container",children:[o!=="willCollect"&&(v?e.jsx(_t,{data:{...v||{},total_wasm_func_count:y?.total_wasm_func_count,collected_func_count:R}}):e.jsxs("div",{className:"wasm-collect-status-loading",children:[e.jsx(D,{size:"middle"}),e.jsx("span",{className:"wasm-collect-status-loading-text",children:a("startingCollect")})]})),e.jsxs("div",{className:"collect-requirements-notice",role:"note",children:[e.jsx("span",{className:"collect-requirements-notice-title",children:a("collect.requirements.title")}),e.jsxs("span",{className:"collect-requirements-notice-desc",children:[a("collect.requirements.desc")," ",e.jsx(ve,{href:Nt,children:a("collect.requirements.link")})]})]}),m&&o!=="willCollect"?e.jsxs("div",{className:"collect-connected-panel",children:[e.jsx("span",{className:"collect-connected-dot",role:"status","aria-label":a("collectConnectedTitle")}),e.jsx("div",{className:"collect-connected-title",children:a("collectConnectedTitle")}),e.jsx("div",{className:"collect-qrcode-desc",children:a("collectConnectedDesc")})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"collect-qrcode-container",children:e.jsx(qe,{value:p})}),e.jsx("div",{className:"collect-qrcode-desc",children:a("collectDesc")})]}),e.jsxs("div",{className:"collect-qrcode-button-container",children:[o==="willCollect"&&e.jsxs(e.Fragment,{children:[e.jsx(w,{type:"primary",onClick:U,children:a("startCollect")}),e.jsx(w,{type:"tertiary",onClick:s,children:a("cancelSplit")})]}),o!=="willCollect"&&e.jsxs(e.Fragment,{children:[A?e.jsx(w,{type:"primary",onClick:F,children:a("startSplit")}):e.jsx(Be,{content:a("cannotSplitTip"),children:e.jsx(w,{type:"primary",disabled:!0,children:a("startSplit")})}),e.jsx(w,{type:"tertiary",onClick:l,children:a("backgroundRun")}),e.jsx(w,{type:"tertiary",onClick:s,children:a("cancelSplit")})]})]})]})},we=({onCancel:r,onRetry:s,onHide:t,forcedStatus:n,forcedErrorMsg:l})=>{const[i,c]=g.useState(""),[d,m]=g.useState("");g.useEffect(()=>{const y=O=>{c(O.status),m(O.errorMsg||"")};return ie.on("unitySplitStatus",y),()=>{ie.off("unitySplitStatus",y)}},[]);const p="wasm-split-downloading-content",o="wasm-split-downloading-text",u=n||i,v=l||d;let f=null;switch(u){case"start_download_android_main_wasm":case"download_android_main_wasm_done":case"start_compress_android_main_wasm":case"compress_android_main_wasm_done":case"start_download_android_sub_wasm_code":case"download_android_sub_wasm_code_done":case"start_compress_android_sub_wasm_code":case"compress_android_sub_wasm_code_done":case"start_download_ios_main_wasm":case"download_ios_main_wasm_done":case"start_compress_ios_main_wasm":case"compress_ios_main_wasm_done":case"start_download_ios_range_json":case"download_ios_range_json_done":case"start_download_ios_js_data_br":case"download_ios_js_data_br_done":case"start_compress_ios_sub_wasm_code":case"compress_ios_sub_wasm_code_done":case"start_write_splited_wasm_br":case"write_splited_wasm_done":case"start_update_wasm_split_config":case"update_wasm_split_config_done":f=e.jsxs("div",{className:p,children:[e.jsx(D,{size:"large",color:"primary"}),e.jsx("div",{className:o,children:a(u)}),e.jsxs(le,{children:[e.jsx(w,{type:"danger",onClick:r,children:a("cancelSplit")}),e.jsx(w,{onClick:t,children:a("backgroundRun")})]})]});break;case"wasm_split_failed":f=e.jsxs("div",{className:p,children:[e.jsx("div",{className:o,children:a("downloadSplitResultFailed")}),v?e.jsx("div",{className:o,children:v}):null,e.jsxs(le,{children:[e.jsx(w,{type:"primary",onClick:s,children:a("retryDownloadSplitResult")}),e.jsx(w,{type:"danger",onClick:r,children:a("cancelSplit")}),e.jsx(w,{onClick:t,children:a("backgroundRun")})]})]});break;default:f=e.jsxs("div",{className:p,children:[e.jsx(D,{size:"large",color:"primary"}),e.jsx("div",{className:o,children:a("processing")})]})}return f},Tt=({onCancel:r,onHide:s,codeMd5:t,clientKey:n,archive:l,pipelineMode:i="local"})=>{const c=i==="local",[d,m]=g.useState("spliting"),[p,o]=g.useState(""),[u,v]=g.useState(),f=()=>{m("spliting"),o(""),ue({codeMd5:t,clientKey:n,archive:l}).then(h=>{if(h.code===0){const _=h.data?.func_count;return m("writing"),he({}).then(b=>{b.code===0?(m("success"),typeof _=="number"&&_>0&&ee.success({content:a("wasmSplit.splitDoneToast",{count:String(_)}),duration:3})):(o(b?.error?.errorMsg||b?.msg||a("splitFailed")),m("writeFailed"))})}else o(h?.error?.message||h?.msg||a("splitFailed")),m("splitFailed")}).catch(h=>{o(h?.message||a("splitFailed")),m("splitFailed")})},y=()=>{m("spliting"),o(""),ue({codeMd5:t,clientKey:n,archive:l}).then(h=>{if(h.code===0)return m("remotePolling"),xt({codeMd5:t,clientKey:n},{intervalMs:1e3,maxAttempts:1e3}).then(()=>(m("remoteFetchingResult"),jt({clientKey:n,codeMd5:t}).then(_=>{_.code===0?(v(_.data),m("remoteReadyToDownload")):(o(a("getSplitResultFailed")),m("splitFailed"))})));o(h?.error?.message||h?.msg||a("splitFailed")),m("splitFailed")}).catch(h=>{o(h?.message||a("splitFailed")),m("splitFailed")})},O=()=>{m("remoteDownloading"),o(""),he(u?.result).then(h=>{h.code===0?m("success"):(o(h?.error?.errorMsg||h?.msg||a("downloadSplitResultFailed")),m("remoteDownloadFailed"))}).catch(h=>{o(h?.message||a("downloadSplitResultFailed")),m("remoteDownloadFailed")})},R=c?f:y;g.useEffect(()=>{R()},[]);let S=null;switch(d){case"spliting":S=e.jsxs("div",{className:"wasm-split-processing",children:[e.jsx(D,{size:"large",color:"primary"}),e.jsx("div",{className:"wasm-split-processing-content",children:a("splittingDesc")}),e.jsxs("div",{className:"wasm-split-processing-cancel",children:[e.jsx(w,{type:"tertiary",onClick:()=>r(),children:a("cancelSplit")}),e.jsx(w,{type:"primary",onClick:()=>s(),children:a("backgroundRun")})]})]});break;case"writing":S=e.jsxs("div",{className:"wasm-split-processing",children:[e.jsx(D,{size:"large",color:"primary"}),e.jsx("div",{className:"wasm-split-processing-content",children:a("writingSplitResult")||"正在写入分包产物..."})]});break;case"splitFailed":case"writeFailed":S=e.jsxs("div",{className:"wasm-split-failed",children:[e.jsx("div",{className:"wasm-split-failed-content",children:p||a("splitFailed")}),e.jsxs("div",{className:"wasm-split-failed-retry",children:[e.jsx(w,{type:"primary",onClick:()=>R(),children:a("retry")||"重试"}),e.jsx(w,{type:"tertiary",onClick:()=>r(),children:a("cancelSplit")})]})]});break;case"remotePolling":case"remoteFetchingResult":S=e.jsxs("div",{className:"wasm-split-processing",children:[e.jsx(D,{size:"large",color:"primary"}),e.jsx("div",{className:"wasm-split-processing-content",children:d==="remotePolling"?a("splittingDesc"):a("getSplitResult")||"获取分包结果..."}),e.jsxs("div",{className:"wasm-split-processing-cancel",children:[e.jsx(w,{type:"tertiary",onClick:()=>r(),children:a("cancelSplit")}),e.jsx(w,{type:"primary",onClick:()=>s(),children:a("backgroundRun")})]})]});break;case"remoteReadyToDownload":S=e.jsxs("div",{className:"wasm-split-success",children:[e.jsx("div",{className:"wasm-split-success-content",children:a("splitSuccess")||"分包成功"}),e.jsx("div",{className:"wasm-split-success-download",children:e.jsx(w,{type:"primary",onClick:O,children:a("downloadSplitResult")||"下载分包产物"})})]});break;case"remoteDownloading":S=e.jsx(we,{onCancel:r,onRetry:O,onHide:s});break;case"remoteDownloadFailed":S=e.jsx(we,{onCancel:r,onRetry:O,onHide:s,forcedStatus:"wasm_split_failed",forcedErrorMsg:p});break;case"success":S=e.jsxs("div",{className:"wasm-split-success",children:[e.jsx("div",{className:"wasm-split-success-content",children:a("downloadSplitResultSuccess")}),e.jsx("div",{className:"wasm-split-success-tip",children:a("downloadSplitResultTip")})]});break;default:S=null}return e.jsx("div",{className:"wasm-split-content-container",children:S})},Et=({onCancel:r})=>e.jsx("div",{className:"wasm-splitted",children:e.jsxs("div",{className:"wasm-splitted-panel",children:[e.jsx("div",{className:"wasm-splitted-icon","aria-hidden":"true",children:e.jsx(He,{size:26,strokeWidth:2})}),e.jsx("div",{className:"wasm-splitted-title",children:a("hasSplitedTitle")}),e.jsx("div",{className:"wasm-splitted-desc",children:a("hasSplitedDesc")}),e.jsx("div",{className:"wasm-splitted-actions",children:e.jsx(w,{type:"primary",onClick:r,children:a("hasSplitedDiscard")})})]})}),Pt=({onCancel:r,errorType:s,onHide:t})=>e.jsxs("div",{className:"wasm-code-split-error",children:[s==="noWasmCode"&&e.jsxs("div",{className:"wasm-code-split-error-container",children:[e.jsx("div",{className:"wasm-code-split-error-title",children:a("noWasmCode")}),e.jsx("div",{className:"wasm-code-split-error-desc",children:a("noWasmCodeDesc")})]}),s==="noSplitConfig"&&e.jsxs("div",{className:"wasm-code-split-error-container",children:[e.jsx("div",{className:"wasm-code-split-error-title",children:a("noSplitConfigTitle")}),e.jsx("div",{className:"wasm-code-split-error-desc",children:a("noSplitConfigDesc")})]})]}),xe=()=>e.jsxs("div",{className:"split-loading",children:[e.jsx(D,{size:"large",color:"primary"}),e.jsx("div",{className:"split-loading-text",children:a("wasmSplit.initializingEnv")})]}),Rt=({codeMd5:r,clientKey:s,codePath:t,onHide:n,onReset:l})=>{const[i,c]=g.useState("rollbacking"),d=()=>{c("rollbacking"),ke({codeMd5:r,clientKey:s,codePath:t}).then(o=>{o.code===0?(c("rollbackSuccess"),l()):c("rollbackFailed")})};g.useEffect(()=>{d()},[]);let m="",p=null;switch(i){case"rollbacking":m=a("rollback.rollbacking"),p=e.jsx(w,{onClick:()=>{c("rollbackFailed")},children:a("rollback.backgroundRun")});break;case"rollbackSuccess":m=a("rollback.success"),p=e.jsx(w,{onClick:()=>{n()},children:a("rollback.close")});break;case"rollbackFailed":m=a("rollback.failed"),p=e.jsx(w,{onClick:()=>{d()},children:a("rollback.retry")});break}return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"wasm-split-rollback-container",children:[e.jsx("div",{className:"wasm-split-rollback-text",children:m}),p]})})};function It({enableWasmCollect:r,enableWasmSplit:s}){return typeof r=="boolean"&&(typeof s=="string"||s===!1)?r:!1}function Wt({enableWasmSplit:r,hasWasmCode:s}){return r===!0?{errorType:"hasSplited",hasError:!0}:s?{hasError:!1}:{errorType:"noWasmCode",hasError:!0}}const Mt="https://bytedance.larkoffice.com/wiki/OyGMwHVW9iSeneknlOcc2qb6nUh",Ft={loading:"neutral",prepare:"accent",collect:"accent",split:"success",splitted:"success",rollback:"warn",error:"error"},Dt=r=>({label:a(`wasmSplit.stage.${r}`),tone:Ft[r]}),$t=r=>{const s=n=>a(`wasmSplit.help.${r}.${n}`),t={loading:["line1"],prepare:["line1","line2"],collect:["line1","line2","line3"],split:["line1","line2"],splitted:["line1"],rollback:["line1"],error:["line1"]};return{title:s("title"),lines:t[r].map(s)}},je=({active:r,recommended:s,icon:t,title:n,description:l,onSelect:i})=>e.jsxs("button",{type:"button",className:`tt-wasm-mode-card${r?" tt-wasm-mode-card-active":""}`,onClick:i,"aria-pressed":r,children:[e.jsx("span",{className:"tt-wasm-mode-card-icon",children:t}),e.jsxs("span",{className:"tt-wasm-mode-card-body",children:[e.jsxs("span",{className:"tt-wasm-mode-card-title-row",children:[e.jsx("span",{className:"tt-wasm-mode-card-title",children:n}),s&&e.jsx("span",{className:"tt-wasm-mode-card-badge",children:a("wasmSplit.recommended")})]}),e.jsx("span",{className:"tt-wasm-mode-card-desc",children:l})]}),r&&e.jsx("span",{className:"tt-wasm-mode-card-check","aria-hidden":"true",children:e.jsx(it,{size:14,strokeWidth:2.5})})]}),Qt=()=>{const r=Ue(),{state:{engine:s,packages:t,gameDetail:n,debugMode:l},setDebugMode:i,setPackages:c}=Se();g.useEffect(()=>{s==="unity"&&l!=="clientPreview"&&i("clientPreview")},[s,l,i]);const d=t?.find(C=>C.name==="wasmcode"),m=d?.root||"",p=d?.md5||"",o=n?.client_key||"",[u,v]=g.useState(""),[f,y]=g.useState("loading"),[O,R]=g.useState(null),[S,h]=g.useState("local"),_=C=>{h(C),fe(C)},b=n===null,P=!b&&(!p||!o);g.useEffect(()=>{b||P||(y("loading"),me({codeMd5:p,clientKey:o}).then(C=>{if(C.code===0){const{errorType:G,hasError:Y}=Wt({enableWasmSplit:C.data.enableWasmSplit,hasWasmCode:!!m});Y?(v(G),y(G==="hasSplited"?"splitted":"error")):It(C.data)?y("collect"):y("prepare"),R(C.data),fe("local")}else v("noSplitConfig"),y("error")}))},[p,o,m,b,P]);const A=()=>{y("rollback")},U=g.useCallback(async()=>{try{const C=await T({url:"/game/config",method:"GET"});!C.error&&C.data?.packages&&c(C.data.packages)}catch{}y("prepare")},[c]),F=()=>{r("/")},E=()=>{r("/")},I=(C,G,Y,Ne)=>e.jsxs("div",{className:"tt-wasm-split-shell tt-wasm-split-page",children:[e.jsxs("div",{className:"tt-wasm-split-hero-strip",children:[e.jsxs("button",{type:"button",className:"tt-wasm-split-back",onClick:E,children:[e.jsx(Q,{size:14,strokeWidth:2}),e.jsx("span",{children:a("back")})]}),e.jsx(Z,{title:a("wasmSplit")})]}),e.jsxs(H,{padding:"lg",className:"tt-wasm-split-empty-card",children:[e.jsx("div",{className:"tt-wasm-split-empty-icon","aria-hidden":"true",children:e.jsx(ce,{size:24,strokeWidth:1.75})}),e.jsx("h2",{className:"tt-wasm-split-empty-title",children:C}),e.jsx("p",{className:"tt-wasm-split-empty",children:G}),e.jsx("div",{className:"tt-wasm-split-empty-actions",children:e.jsx("button",{type:"button",className:"tt-wasm-split-empty-cta",onClick:()=>r(Ne),children:Y})})]})]});if(b)return e.jsxs("div",{className:"tt-wasm-split-shell tt-wasm-split-page",children:[e.jsxs("div",{className:"tt-wasm-split-hero-strip",children:[e.jsxs("button",{type:"button",className:"tt-wasm-split-back",onClick:E,children:[e.jsx(Q,{size:14,strokeWidth:2}),e.jsx("span",{children:a("back")})]}),e.jsx(Z,{title:a("wasmSplit")})]}),e.jsx(H,{padding:"lg",children:e.jsx(xe,{})})]});if(s&&s!=="unity")return I(a("wasmSplit.empty.unityOnly.title"),a("wasmSplit.empty.unityOnly.desc"),a("wasmSplit.empty.backHome"),"/");if(P)return I(a("wasmSplit.empty.needDevice.title"),a("wasmSplit.empty.needDevice.desc"),a("wasmSplit.empty.connectDevice"),"/");const L=Dt(f),ae=$t(f),Ce=f==="prepare",_e=f==="collect"||f==="split",ne=f!=="error"&&f!=="loading"&&f!=="splitted";return e.jsxs("div",{className:"tt-wasm-split-shell tt-wasm-split-page",children:[e.jsxs("div",{className:"tt-wasm-split-hero-strip",children:[e.jsxs("button",{type:"button",className:"tt-wasm-split-back",onClick:E,children:[e.jsx(Q,{size:14,strokeWidth:2}),e.jsx("span",{children:a("back")})]}),e.jsx(Z,{title:a("wasmSplit"),subtitle:a("wasmSplit.subtitle"),action:e.jsx(Ge,{tone:L.tone,withDot:!0,variant:"solid",children:L.label})})]}),e.jsxs("div",{className:"tt-wasm-requirements-notice",role:"note",children:[e.jsx("span",{className:"tt-wasm-requirements-notice-icon","aria-hidden":"true",children:e.jsx(Ye,{size:18,strokeWidth:2})}),e.jsxs("span",{className:"tt-wasm-requirements-notice-copy",children:[e.jsx("span",{className:"tt-wasm-requirements-notice-title",children:a("wasmSplit.requirements.title")}),e.jsxs("ul",{className:"tt-wasm-requirements-notice-list",children:[e.jsx("li",{children:a("wasmSplit.requirements.account")}),e.jsxs("li",{children:[a("wasmSplit.requirements.unityPlugin")," ",e.jsx(ve,{href:Mt,children:a("wasmSplit.requirements.unityPluginLink")})]})]})]})]}),Ce&&e.jsxs("section",{className:"tt-wasm-split-section",children:[e.jsx(oe,{icon:mt,eyebrow:"STEP 0",title:a("wasmSplit.strategy.title"),subtitle:a("wasmSplit.strategy.subtitle")}),e.jsxs("div",{className:"tt-wasm-mode-grid",children:[e.jsx(je,{active:S==="local",recommended:!0,icon:e.jsx(dt,{size:18,strokeWidth:2}),title:a("wasmSplit.mode.local.title"),description:a("wasmSplit.mode.local.desc"),onSelect:()=>_("local")}),e.jsx(je,{active:S==="remote",icon:e.jsx(ot,{size:18,strokeWidth:2}),title:a("wasmSplit.mode.remote.title"),description:a("wasmSplit.mode.remote.desc"),onSelect:()=>_("remote")})]})]}),e.jsxs("div",{className:"tt-wasm-split-grid",children:[e.jsx("aside",{className:"tt-wasm-split-helper",children:e.jsx(H,{padding:"lg",className:"tt-wasm-split-helper-card",children:e.jsx("div",{className:"tt-wasm-split-helper-grid",children:e.jsxs("div",{className:"tt-wasm-split-helper-main",children:[e.jsx(oe,{icon:f==="error"?ce:Qe,title:ae.title}),e.jsx("ul",{className:"tt-wasm-split-helper-list",children:ae.lines.map(C=>e.jsx("li",{children:C},C))})]})})})}),e.jsxs(H,{padding:"lg",className:"tt-wasm-split-workflow-card",children:[f==="loading"&&e.jsx(xe,{}),f==="splitted"&&e.jsx(Et,{onCancel:A}),f==="error"&&e.jsx(Pt,{errorType:u,onCancel:A,onHide:F}),_e&&e.jsx("div",{className:"tt-wasm-split-upload-row",children:e.jsx(Xe,{})}),ne&&e.jsx("div",{className:"tt-wasm-split-steps-wrap",children:e.jsx(Ve,{stage:f})}),ne&&e.jsxs("div",{className:"tt-wasm-split-stage",children:[f==="prepare"&&e.jsx(Ct,{codeMd5:p,codePath:m,clientKey:o,pipelineMode:S,onCancel:E,onNext:()=>y("collect"),onHide:F}),f==="collect"&&e.jsx(Ot,{codeMd5:p,clientKey:o,onCancel:A,onHide:F,onNext:()=>{me({codeMd5:p,clientKey:o}).then(C=>{C.code===0&&R(C.data),y("split")})}}),f==="split"&&e.jsx(Tt,{codeMd5:p,clientKey:o,archive:O?.enableArchiveMode===!0,pipelineMode:S,onCancel:A,onHide:F}),f==="rollback"&&e.jsx(Rt,{codeMd5:p,clientKey:o,codePath:m,onHide:F,onReset:U})]})]})]})]})};export{Qt as WasmCodeSplit};
@@ -1 +0,0 @@
1
- import{af as U,r as T,bF as J,bG as K,av as H,t as $,w as M,aN as _,bt as Q,R as o,z as P,M as I,J as t,y as L,aR as j,aM as ee,aS as te}from"./index-BYIujYdU.js";function ae(u){return T.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},u),T.createElement("path",{d:"M5 12.5c0-.83.67-1.5 1.5-1.5h11a1.5 1.5 0 0 1 0 3h-11A1.5 1.5 0 0 1 5 12.5Z",fill:"currentColor"}))}const se=U(ae,"checkbox_indeterminate");function ne(u){return T.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},u),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.41 7.3c.66.51.78 1.45.28 2.11l-6.5 8.5a1.5 1.5 0 0 1-2.37.01l-3.5-4.5a1.5 1.5 0 1 1 2.36-1.84L10 14.54l5.32-6.95a1.5 1.5 0 0 1 2.1-.28Z",fill:"currentColor"}))}const re=U(ne,"checkbox_tick");var R,w;function ie(){if(w)return R;w=1;var u=J(),e=K(),a="[object Boolean]";function s(r){return r===!0||r===!1||e(r)&&u(r)==a}return R=s,R}var oe=ie();const de=H(oe),G={PREFIX:`${$}-checkbox`,INPUT:`${$}-checkbox-input`,WRAPPER:""},le={PREFIX:`${$}-checkboxGroup`},p={DIRECTION_SET:["horizontal","vertical"],TYPE_DEFAULT:"default",TYPE_CARD:"card",TYPE_PURECARD:"pureCard",DEFAULT_DIRECTION:"vertical"};class ce extends M{constructor(e){super(Object.assign({},e)),this.clickState=!1,this.handleFocusVisible=a=>{const{target:s}=a;try{if(this.clickState){this.clickState=!1;return}s.matches(":focus-visible")&&this._adapter.setFocusVisible(!0)}catch{_(!0,"Warning: [Semi Checkbox] The current browser does not support the focus-visible")}},this.handleBlur=()=>{this.clickState=!1,this._adapter.setFocusVisible(!1)}}init(){const{children:e,extra:a,extraId:s,addonId:r}=this.getProps();e&&!r&&this._adapter.setAddonId(),a&&!s&&this._adapter.setExtraId()}notifyChange(e,a){const s=this._adapter.generateEvent(e,a);this._adapter.notifyChange(s)}handleChange(e){if(this.getProp("disabled"))return;if(e?.type==="click"&&(this.clickState=!0),this._adapter.focusCheckboxEntity(),this._adapter.getIsInGroup()){this._adapter.getGroupDisabled()||this.handleChangeInGroup(e);return}const l=!this.getState("checked");this._isControlledComponent("checked")?this.notifyChange(l,e):(this.setChecked(l),this.notifyChange(l,e))}handleChangeInGroup(e){const{value:a}=this.getProps(),l=!this._adapter.getGroupValue().includes(a),c=this._adapter.generateEvent(l,e);this._adapter.notifyChange(c),this._adapter.notifyGroupChange(c)}handleEnterPress(e){Q(e)&&this.handleChange(e)}setChecked(e){this._adapter.setNativeControlChecked(e)}destroy(){}}const N=o.createContext({});class A extends T.PureComponent{blur(){this.inputEntity.blur()}focus(){const{preventScroll:e}=this.props;this.inputEntity.focus({preventScroll:e})}render(){const{indeterminate:e,checked:a,disabled:s,prefixCls:r,name:l,isPureCardType:c,addonId:E,extraId:x,focusInner:f,onInputFocus:g,onInputBlur:m}=this.props,h=r||G.PREFIX,v=P({[`${h}-inner`]:!0,[`${h}-inner-checked`]:!!a,[`${h}-inner-pureCardType`]:c},G.WRAPPER),k=P({[`${h}-inner-display`]:!0,[`${h}-focus`]:f,[`${h}-focus-border`]:f&&!a}),C=a?o.createElement(re,null):e?o.createElement(se,null):null,i={type:"checkbox","aria-label":this.props["aria-label"],"aria-disabled":s,"aria-checked":a,"aria-labelledby":E,"aria-describedby":x||this.props["aria-describedby"],"aria-invalid":this.props["aria-invalid"],"aria-errormessage":this.props["aria-errormessage"],"aria-required":this.props["aria-required"],className:G.INPUT,onChange:I,checked:a,disabled:s,onFocus:g,onBlur:m};return l&&(i.name=l),o.createElement("span",{className:v},o.createElement("input",Object.assign({},i,{ref:b=>{this.inputEntity=b}})),o.createElement("span",{className:k},C))}}A.contextType=N;A.propTypes={"aria-describedby":t.string,"aria-errormessage":t.string,"aria-invalid":t.bool,"aria-labelledby":t.string,"aria-required":t.bool,checked:t.bool,disabled:t.bool,onChange:t.func,children:t.node,grouped:t.bool,value:t.any,isPureCardType:t.bool,addonId:t.string,extraId:t.string,focusInner:t.bool,onInputFocus:t.func,onInputBlur:t.func,preventScroll:t.bool};A.defaultProps={onChange:I};class y extends L{get adapter(){return Object.assign(Object.assign({},super.adapter),{setNativeControlChecked:e=>{this.setState({checked:e})},notifyChange:e=>{const{onChange:a}=this.props;a&&a(e)},generateEvent:(e,a)=>{const{props:s}=this;return{target:Object.assign(Object.assign({},s),{checked:e}),stopPropagation:()=>{a.stopPropagation()},preventDefault:()=>{a.preventDefault()},nativeEvent:{stopImmediatePropagation:()=>{a.nativeEvent&&typeof a.nativeEvent.stopImmediatePropagation=="function"&&a.nativeEvent.stopImmediatePropagation()}}}},getIsInGroup:()=>this.isInGroup(),getGroupValue:()=>this.context&&this.context.checkboxGroup.value||[],notifyGroupChange:e=>{this.context.checkboxGroup.onChange(e)},getGroupDisabled:()=>this.context&&this.context.checkboxGroup.disabled,setAddonId:()=>{this.setState({addonId:j({prefix:"addon"})})},setExtraId:()=>{this.setState({extraId:j({prefix:"extra"})})},setFocusVisible:e=>{this.setState({focusVisible:e})},focusCheckboxEntity:()=>{this.focus()}})}constructor(e){super(e),this.handleChange=s=>this.foundation.handleChange(s),this.handleEnterPress=s=>this.foundation.handleEnterPress(s),this.handleFocusVisible=s=>{this.foundation.handleFocusVisible(s)},this.handleBlur=s=>{this.foundation.handleBlur()};const a=!1;this.state={checked:e.checked||e.defaultChecked||a,addonId:e.addonId,extraId:e.extraId,focusVisible:!1},this.checkboxEntity=null,this.foundation=new ce(this.adapter)}componentDidUpdate(e){this.props.checked!==e.checked&&(ee(this.props.checked)?this.foundation.setChecked(!1):de(this.props.checked)&&this.foundation.setChecked(this.props.checked))}isInGroup(){return!!(this.context&&this.context.checkboxGroup&&"value"in this.props)}focus(){this.checkboxEntity&&this.checkboxEntity.focus()}blur(){this.checkboxEntity&&this.checkboxEntity.blur()}render(){const{disabled:e,style:a,prefixCls:s,className:r,indeterminate:l,children:c,onMouseEnter:E,onMouseLeave:x,extra:f,value:g,role:m,tabIndex:h,id:v,type:k}=this.props,{checked:C,addonId:i,extraId:b,focusVisible:V}=this.state,n={checked:C,disabled:e},O=this.isInGroup();if(O){if(this.context.checkboxGroup.value){const Z=(this.context.checkboxGroup.value||[]).includes(g);n.checked=Z}this.context.checkboxGroup.disabled&&(n.disabled=this.context.checkboxGroup.disabled||this.props.disabled);const{isCardType:D,isPureCardType:z}=this.context.checkboxGroup;n.isCardType=D,n.isPureCardType=z,n.name=this.context.checkboxGroup.name}else n.isPureCardType=k===p.TYPE_PURECARD,n.isCardType=k===p.TYPE_CARD||n.isPureCardType;const d=s||G.PREFIX,B=n.isCardType||n.isPureCardType,Y=P(d,{[`${d}-disabled`]:n.disabled,[`${d}-indeterminate`]:l,[`${d}-checked`]:n.checked,[`${d}-unChecked`]:!n.checked,[`${d}-cardType`]:n.isCardType,[`${d}-cardType_disabled`]:n.disabled&&n.isCardType,[`${d}-cardType_enable`]:!(n.disabled&&n.isCardType),[`${d}-cardType_checked`]:n.isCardType&&n.checked&&!n.disabled,[`${d}-cardType_checked_disabled`]:n.isCardType&&n.checked&&n.disabled,[r]:!!r,[`${d}-focus`]:V&&B}),q=P(`${d}-extra`,{[`${d}-cardType_extra_noChildren`]:n.isCardType&&!c});O&&this.context.checkboxGroup.name;const W=this.props["x-semi-children-alias"]||"children",X=()=>!c&&!f?null:o.createElement("div",{className:`${d}-content`},c?o.createElement("span",{id:i,className:`${d}-addon`,"x-semi-prop":W},c):null,f?o.createElement("div",{id:b,className:q,"x-semi-prop":"extra"},f):null);return o.createElement("span",Object.assign({role:m,tabIndex:h,style:a,className:Y,id:v,onMouseEnter:E,onMouseLeave:x,onClick:this.handleChange,onKeyPress:this.handleEnterPress,"aria-labelledby":this.props["aria-labelledby"]},this.getDataAttr(this.props)),o.createElement(A,Object.assign({},this.props,n,{addonId:c&&i,extraId:f&&b,isPureCardType:n.isPureCardType,ref:D=>{this.checkboxEntity=D},focusInner:V&&!B,onInputFocus:this.handleFocusVisible,onInputBlur:this.handleBlur})),X())}}y.contextType=N;y.propTypes={"aria-describedby":t.string,"aria-errormessage":t.string,"aria-invalid":t.bool,"aria-labelledby":t.string,"aria-required":t.bool,checked:t.bool,defaultChecked:t.bool,disabled:t.bool,indeterminate:t.bool,onChange:t.func,value:t.any,style:t.object,className:t.string,prefixCls:t.string,onMouseEnter:t.func,onMouseLeave:t.func,extra:t.node,index:t.number,"aria-label":t.string,tabIndex:t.number,preventScroll:t.bool,type:t.string};y.defaultProps={defaultChecked:!1,indeterminate:!1,onChange:I,onMouseEnter:I,onMouseLeave:I,type:"default"};y.elementType="Checkbox";class S extends M{static get checkboxGroupDefaultAdapter(){return{}}constructor(e){super(Object.assign(Object.assign({},S.checkboxGroupDefaultAdapter),e))}init(){const{defaultValue:e,value:a}=this.getProps();typeof e<"u"&&!Array.isArray(e)&&_(!0,"Warning: [Semi CheckboxGroup] defaultValue should be an Array"),typeof a<"u"&&!Array.isArray(a)&&_(!0,"Warning: [Semi CheckboxGroup] value should be an Array")}notifyChange(e){this._adapter.notifyChange(e)}handleChange(e){const a=this.getState("value");let s=[];Array.isArray(a)||(s=[a]),e.target.checked?s=[...a,e.target.value]:s=a.filter((l,c)=>l!==e.target.value),"value"in this.getProps()?this.notifyChange(s):(this._adapter.updateGroupValue(s),this.notifyChange(s))}getFormatName(){return this.getProp("name")||"default"}handlePropValueChange(e){Array.isArray(e)?this._adapter.updateGroupValue(e):(typeof e>"u"&&this._adapter.updateGroupValue([]),_(!0,"Warning: [Semi CheckboxGroup] value should be an Array"))}destroy(){}}class F extends L{get adapter(){return Object.assign(Object.assign({},super.adapter),{updateGroupValue:e=>{this.setState({value:e})},notifyChange:e=>{this.props.onChange&&this.props.onChange(e)}})}constructor(e){super(e),this.state={value:e.value||e.defaultValue},this.foundation=new S(this.adapter),this.onChange=this.onChange.bind(this)}componentDidMount(){this.foundation.init()}componentDidUpdate(e){te(e.value,this.props.value)||this.foundation.handlePropValueChange(this.props.value)}componentWillUnmount(){this.foundation.destroy()}onChange(e){this.foundation.handleChange(e)}render(){const{children:e,options:a,prefixCls:s,direction:r,className:l,id:c,style:E,type:x,disabled:f}=this.props,g=x===p.TYPE_PURECARD,m=x===p.TYPE_CARD||g,h=s||le.PREFIX,v=P({[h]:!0,[`${h}-wrapper`]:!0,[`${h}-${r}`]:r,[`${h}-${r}-cardType`]:r&&m,[`${h}-${r}-pureCardType`]:r&&g},l),k=this.state.value.slice();let C;return a?C=(a||[]).map((i,b)=>typeof i=="string"?o.createElement(y,{role:"listitem",key:b,disabled:this.props.disabled,value:i,prefixCls:s},i):o.createElement(y,{role:"listitem",key:b,disabled:i.disabled||this.props.disabled,value:i.value,prefixCls:s,extra:i.extra,className:i.className,style:i.style,onChange:i.onChange},i.label)):e&&(C=o.Children.toArray(e).map((i,b)=>o.cloneElement(i,{key:b,role:"listitem"}))),o.createElement("div",Object.assign({id:c,role:"list","aria-label":this.props["aria-label"],className:v,style:E,"aria-labelledby":this.props["aria-labelledby"],"aria-describedby":this.props["aria-describedby"]},this.getDataAttr(this.props)),o.createElement(N.Provider,{value:{checkboxGroup:{onChange:this.onChange,value:k,disabled:this.props.disabled,name:this.foundation.getFormatName(),isCardType:m,isPureCardType:g}}},C))}}F.propTypes={"aria-describedby":t.string,"aria-errormessage":t.string,"aria-invalid":t.bool,"aria-labelledby":t.string,"aria-required":t.bool,defaultValue:t.array,disabled:t.bool,name:t.string,options:t.array,value:t.array,onChange:t.func,children:t.node,prefixCls:t.string,direction:t.oneOf(p.DIRECTION_SET),className:t.string,type:t.oneOf([p.TYPE_DEFAULT,p.TYPE_CARD,p.TYPE_PURECARD]),style:t.object};F.defaultProps={disabled:!1,onChange:()=>{},type:p.TYPE_DEFAULT,defaultValue:[],direction:p.DEFAULT_DIRECTION};class he extends y{}he.Group=F;export{he as C,de as _,y as a,F as b};
@@ -1 +0,0 @@
1
- import{c as x,b as N,u as M,r as n,s as S,j as e,d as b,P as v,i as o,m as L,T as z,D as C,o as I}from"./index-BYIujYdU.js";import{S as T}from"./SectionHeader-4yiyPOgU.js";import{C as m,T as f}from"./Tag-BEGC7xBm.js";import{S as E}from"./sparkles-kUOwqZbi.js";const w=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],_=x("bug",w);const q=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],A=x("wrench",q);function B(){return N({url:"/game/changelog",method:"GET"})}const D=[{key:"feature",icon:E,titleI18n:"changelogFeature",tone:"success"},{key:"optimize",icon:A,titleI18n:"changelogOptimize",tone:"warn"},{key:"bugfix",icon:_,titleI18n:"changelogBugfix",tone:"error"}],V=()=>{const{state:{devToolVersion:l}}=M(),d=I,[h,p]=n.useState([]),[j,c]=n.useState(!0),[r,u]=n.useState("");return n.useEffect(()=>{l&&S(l)},[l]),n.useEffect(()=>{let a=!1;return(async()=>{c(!0),u("");const s=await B();if(!a){if(s?.error||s?.code!==0||!s?.data){p([]),u(typeof s?.error=="object"&&s.error?.errorMsg||"Failed to load changelog."),c(!1);return}p(s.data.items||[]),c(!1)}})(),()=>{a=!0}},[]),j?e.jsx("div",{className:"change-log-container change-log-loading",children:e.jsx(b,{size:"large"})}):e.jsxs("div",{className:"change-log-container",children:[e.jsx(v,{title:o("changelog"),subtitle:o("changelogTip")}),r?e.jsx(L,{fullMode:!1,bordered:!1,closeIcon:null,type:"danger",description:r}):null,!r&&h.length===0?e.jsx(m,{padding:"lg",children:e.jsx(z.Paragraph,{className:"change-log-empty",children:"No changelog entries yet."})}):null,h.map(a=>e.jsxs(m,{padding:"md",className:"change-log-item",children:[e.jsxs("div",{className:"change-log-item-head",children:[e.jsx("h2",{className:"change-log-version",children:a.title}),e.jsxs(f,{tone:"neutral",size:"sm",children:["iOS ",a.target.iOS," · Android ",a.target.Android]})]}),D.map(({key:i,icon:s,titleI18n:y,tone:k})=>{const g=a.changes?.[i]||[];return g.length?e.jsxs("section",{className:"change-log-section",children:[e.jsx(T,{icon:s,title:e.jsxs("span",{className:"change-log-section-title",children:[e.jsx("span",{children:o(y)}),e.jsx(f,{tone:k,size:"sm",children:g.length})]})}),e.jsx("ul",{className:"change-log-changes",children:g.map(t=>e.jsxs("li",{className:"change-log-change",children:[e.jsx("span",{className:"change-log-change-bullet","aria-hidden":!0}),e.jsxs("span",{className:"change-log-change-body",children:[t.desc[d],t?.link?e.jsx(C,{className:"change-log-change-link",href:t.link,iconSize:12,children:o("changelogLink")}):null]})]},t.desc[d]))})]},i):null})]},a.title))]})};export{V as ChangeLog};
@@ -1 +0,0 @@
1
- import{f as i,i as r,U as n,V as o,j as e,P as d}from"./index-BYIujYdU.js";import{C as p,T as m}from"./Tag-BEGC7xBm.js";import{Z as f}from"./zap-4GR910dG.js";import{L as h,C as u}from"./layers-DFzVcSdo.js";const N=()=>{const t=i(),l=[{key:"wasm_split",title:r("performance.card.wasmSplit.title"),description:r("performance.card.wasmSplit.desc"),icon:f,path:"/wasm_split",tags:[{label:"Unity",tone:"info"},{label:"Wasm",tone:"neutral"}]},{key:"subpackage_collect",title:r("performance.card.subpackageCollect.title"),description:r("performance.card.subpackageCollect.desc"),icon:h,path:"/subpackage_collect",tags:[{label:r("performance.card.subpackageCollect.status"),tone:"info"},{label:"FP/TTI",tone:"accent"},{label:"Preload",tone:"neutral"}]}].filter(a=>!(a.experimentOnly&&!n()||a.localDevOnly&&!o()));return e.jsxs("div",{className:"perf-page",children:[e.jsx(d,{title:r("performance.overview.title"),subtitle:r("performance.overview.desc")}),e.jsx("section",{className:"perf-section",children:e.jsx("div",{className:"perf-tool-grid",children:l.map(a=>{const c=a.icon;return e.jsxs(p,{interactive:!0,padding:"md",className:"perf-tool-card",onClick:()=>t(a.path),role:"button",tabIndex:0,children:[e.jsxs("div",{className:"perf-tool-card-head",children:[e.jsx("span",{className:"perf-tool-card-glyph","aria-hidden":"true",children:e.jsx(c,{size:18,strokeWidth:1.75})}),e.jsx("div",{className:"perf-tool-card-titlewrap",children:e.jsxs("div",{className:"perf-tool-card-title-row",children:[e.jsx("h3",{className:"perf-tool-card-title",children:a.title}),a.tags.map(s=>e.jsx(m,{tone:s.tone??"neutral",size:"sm",variant:"outline",children:s.label},s.label))]})}),e.jsx("span",{className:"perf-tool-card-chevron","aria-hidden":"true",children:e.jsx(u,{size:16,strokeWidth:2})})]}),e.jsx("p",{className:"perf-tool-card-desc",children:a.description})]},a.key)})})})]})};export{N as Performance};
@@ -1 +0,0 @@
1
- import{f as l,j as e,m as u,T as s,i,B as t,D as b}from"./index-BYIujYdU.js";const n="https://bytedance.larkoffice.com/wiki/PeIawT4M4ia9R8kYyLMcjwHknOg",g=[{titleKey:"basicDebugGuide.available.scan.title",descKey:"basicDebugGuide.available.scan.desc"},{titleKey:"basicDebugGuide.available.launch.title",descKey:"basicDebugGuide.available.launch.desc"},{titleKey:"basicDebugGuide.available.preview.title",descKey:"basicDebugGuide.available.preview.desc"},{titleKey:"basicDebugGuide.available.network.title",descKey:"basicDebugGuide.available.network.desc"},{titleKey:"basicDebugGuide.available.manual.title",descKey:"basicDebugGuide.available.manual.desc"}],r=[{titleKey:"basicDebugGuide.locked.project.title",descKey:"basicDebugGuide.locked.project.desc"},{titleKey:"basicDebugGuide.locked.upload.title",descKey:"basicDebugGuide.locked.upload.desc"},{titleKey:"basicDebugGuide.locked.platform.title",descKey:"basicDebugGuide.locked.platform.desc"}],o=["basicDebugGuide.step1","basicDebugGuide.step2","basicDebugGuide.step3","basicDebugGuide.step4"],m=()=>{const d=l();return e.jsxs("div",{className:"basic-debug-guide-page",children:[e.jsx(u,{className:"basic-debug-guide-banner",fullMode:!1,bordered:!1,closeIcon:null,type:"info",description:e.jsxs("div",{className:"basic-debug-guide-banner-copy",children:[e.jsx(s.Text,{strong:!0,children:i("basicDebugGuide.bannerTitle")}),e.jsx(s.Text,{children:i("basicDebugGuide.bannerDesc")})]})}),e.jsxs("section",{className:"basic-debug-guide-hero",children:[e.jsxs("div",{className:"basic-debug-guide-hero-copy",children:[e.jsx(s.Title,{heading:3,children:i("basicDebugGuide.title")}),e.jsx(s.Paragraph,{className:"basic-debug-guide-hero-desc",children:i("basicDebugGuide.desc")})]}),e.jsxs("div",{className:"basic-debug-guide-actions",children:[e.jsx(t,{theme:"solid",type:"primary",onClick:()=>d("/"),children:i("basicDebugGuide.actionScan")}),e.jsx(t,{theme:"light",onClick:()=>d("/network_diagnostics"),children:i("basicDebugGuide.actionNetwork")}),e.jsx(b,{href:n,children:i("basicDebugGuide.actionProxy")})]})]}),e.jsxs("section",{className:"basic-debug-guide-section",children:[e.jsxs("div",{className:"basic-debug-guide-section-head",children:[e.jsx(s.Text,{strong:!0,children:i("basicDebugGuide.availableTitle")}),e.jsx(s.Text,{className:"basic-debug-guide-section-desc",children:i("basicDebugGuide.availableDesc")})]}),e.jsx("div",{className:"basic-debug-guide-list",children:g.map((c,a)=>e.jsxs("div",{className:"basic-debug-guide-item",children:[e.jsx("span",{className:"basic-debug-guide-item-index",children:a+1}),e.jsxs("div",{className:"basic-debug-guide-item-copy",children:[e.jsx(s.Text,{strong:!0,children:i(c.titleKey)}),e.jsx(s.Text,{children:i(c.descKey)})]})]},c.titleKey))})]}),e.jsxs("section",{className:"basic-debug-guide-section",children:[e.jsxs("div",{className:"basic-debug-guide-section-head",children:[e.jsx(s.Text,{strong:!0,children:i("basicDebugGuide.lockedTitle")}),e.jsx(s.Text,{className:"basic-debug-guide-section-desc",children:i("basicDebugGuide.lockedDesc")})]}),e.jsx("div",{className:"basic-debug-guide-list",children:r.map((c,a)=>e.jsxs("div",{className:"basic-debug-guide-item basic-debug-guide-item-muted",children:[e.jsx("span",{className:"basic-debug-guide-item-index",children:a+1}),e.jsxs("div",{className:"basic-debug-guide-item-copy",children:[e.jsx(s.Text,{strong:!0,children:i(c.titleKey)}),e.jsx(s.Text,{children:i(c.descKey)})]})]},c.titleKey))})]}),e.jsxs("section",{className:"basic-debug-guide-section",children:[e.jsxs("div",{className:"basic-debug-guide-section-head",children:[e.jsx(s.Text,{strong:!0,children:i("basicDebugGuide.stepsTitle")}),e.jsx(s.Text,{className:"basic-debug-guide-section-desc",children:i("basicDebugGuide.stepsDesc")})]}),e.jsx("div",{className:"basic-debug-guide-steps",children:o.map((c,a)=>e.jsxs("div",{className:"basic-debug-guide-step",children:[e.jsx("span",{className:"basic-debug-guide-step-index",children:a+1}),e.jsx(s.Text,{children:i(c)})]},c))}),e.jsxs("div",{className:"basic-debug-guide-command-list",children:[e.jsxs("div",{className:"basic-debug-guide-command-item",children:[e.jsx(s.Text,{type:"tertiary",children:i("basicDebugGuide.commandProxy")}),e.jsx("code",{children:"ttmg config set proxy http://127.0.0.1:7890"}),e.jsx(s.Text,{type:"tertiary",children:i("basicDebugGuide.commandProxyHint")})]}),e.jsxs("div",{className:"basic-debug-guide-command-item",children:[e.jsx(s.Text,{type:"tertiary",children:i("basicDebugGuide.commandLogin")}),e.jsx("code",{children:"ttmg login"})]}),e.jsxs("div",{className:"basic-debug-guide-command-item",children:[e.jsx(s.Text,{type:"tertiary",children:i("basicDebugGuide.commandDev")}),e.jsx("code",{children:"ttmg dev"})]})]})]})]})};export{m as BasicDebugGuide};
@@ -1 +0,0 @@
1
- .subpkg-page{width:100%;box-sizing:border-box;display:flex;flex-direction:column;gap:24px;padding-bottom:24px}.subpkg-hero-strip{margin:-24px -32px 8px;padding:12px 28px 0;background:var(--tt-bg-panel)}.subpkg-hero-strip .tt-page-hero{margin:0;padding:12px 0 8px;background:transparent}.subpkg-back{display:inline-flex;align-items:center;gap:6px;padding:4px 8px 4px 6px;margin-left:-8px;font-size:var(--tt-text-meta);font-weight:500;color:var(--tt-text-dim);background:transparent;border:1px solid transparent;border-radius:var(--tt-radius-md);cursor:pointer;transition:var(--tt-hover-transition)}.subpkg-back:hover{color:var(--tt-text);background:var(--tt-overlay-soft);border-color:var(--tt-border)}.subpkg-back:focus-visible{outline:none;box-shadow:0 0 0 3px var(--tt-accent-soft)}.subpkg-hero-actions{display:inline-flex;align-items:center;gap:10px}.subpkg-card{display:flex;flex-direction:column;gap:16px}.subpkg-card>.tt-section-header{margin-bottom:0}.subpkg-version-card{gap:0}.subpkg-version-card .subpkg-client-version{padding:0;border:0;background:transparent}.subpkg-unsupported-card{display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;padding:40px 32px}.subpkg-unsupported-icon{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;margin-bottom:4px;border-radius:50%;border:1px solid var(--tt-warn-border);background:var(--tt-warn-bg);color:var(--tt-warn-text)}.subpkg-unsupported-title{margin:0;font-size:var(--tt-text-h2);font-weight:600;color:var(--tt-text)}.subpkg-unsupported-desc{margin:0;max-width:520px;font-size:var(--tt-text-body);line-height:1.6;color:var(--tt-text-dim)}.subpkg-unsupported-actions{margin-top:8px}.subpkg-client-version{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 12px;border-radius:var(--tt-radius-md);border:1px solid var(--tt-border);background:var(--tt-bg-sunken)}.subpkg-client-version-title{flex:1 1 160px;display:inline-flex;align-items:center;gap:6px;min-width:0;font-size:var(--tt-text-meta);font-weight:600;line-height:1.4;color:var(--tt-text)}.subpkg-client-version-title svg{flex-shrink:0;color:var(--tt-accent-text)}.subpkg-client-version-chip{flex:0 0 auto;display:inline-flex;align-items:center;height:26px;padding:0 10px;border-radius:999px;border:1px solid var(--tt-accent-border);background:var(--tt-accent-soft);color:var(--tt-accent-text);font-size:var(--tt-text-meta);font-weight:600;white-space:nowrap}.subpkg-dev-guide-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0;padding:0;list-style:none}.subpkg-required-integration{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px 12px;padding:11px 12px;border-left:3px solid var(--tt-emphasis);background:var(--tt-emphasis-soft);border-radius:var(--tt-radius-sm)}.subpkg-required-label{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:0 8px;border:1px solid var(--tt-emphasis-border);border-radius:999px;color:var(--tt-emphasis-text);background:var(--tt-bg-panel);font-size:var(--tt-text-meta);font-weight:600;line-height:1;white-space:nowrap}.subpkg-required-copy{min-width:0;display:flex;flex-direction:column;gap:2px}.subpkg-required-title{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px;color:var(--tt-text);font-size:var(--tt-text-meta);font-weight:600;line-height:1.45}.subpkg-required-title code{padding:1px 5px;border:1px solid var(--tt-emphasis-border);border-radius:var(--tt-radius-sm);color:var(--tt-emphasis-text);background:var(--tt-bg-panel);font:inherit;font-weight:600}.subpkg-required-desc{color:var(--tt-text-dim);font-size:var(--tt-text-meta);line-height:1.5}.subpkg-dev-guide-list li{min-width:0;display:flex;align-items:flex-start;gap:10px;padding:2px 0}.subpkg-dev-guide-index{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:999px;background:var(--tt-overlay-soft);color:var(--tt-text);font-size:var(--tt-text-meta);font-weight:700;line-height:1}.subpkg-dev-guide-copy{min-width:0;display:flex;flex-direction:column;gap:4px;font-size:var(--tt-text-meta);line-height:1.55;color:var(--tt-text-dim)}.subpkg-dev-guide-copy strong{font-size:var(--tt-text-meta);font-weight:600;line-height:1.45;color:var(--tt-text)}.subpkg-section-header.tt-section-header{align-items:center}.subpkg-section-header .tt-section-header-title{font-size:var(--tt-text-h3);font-weight:600;line-height:1.3}.subpkg-entry-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.subpkg-entry-card{appearance:none;font:inherit;cursor:pointer;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:16px 18px;border-radius:var(--tt-radius-md);background:var(--tt-bg-elevated);border:1px solid var(--tt-border);transition:var(--tt-hover-transition)}.subpkg-entry-card:hover{border-color:var(--tt-accent);background:var(--tt-accent-soft)}.subpkg-entry-name{font-size:var(--tt-text-body);font-weight:600;color:var(--tt-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.subpkg-collect-grid{display:flex;flex-direction:column;gap:16px}.subpkg-scan{display:grid;grid-template-columns:208px minmax(0,1fr);align-items:center;gap:16px 24px}.subpkg-qr{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:208px;max-width:208px;aspect-ratio:1;min-width:0;min-height:0;padding:14px;background:var(--tt-bg-elevated);border:1px solid var(--tt-border);border-radius:var(--tt-radius-md)}.subpkg-qr>svg{width:164px;height:164px;max-width:100%;background:var(--tt-qr-bg);padding:4px;border-radius:var(--tt-radius-sm)}.subpkg-scan-main{min-width:0;display:flex;flex-direction:column;gap:10px;padding:4px 0}.subpkg-scan-heading{display:flex;flex-direction:column;gap:2px}.subpkg-scan-title{font-size:var(--tt-text-body);font-weight:600;line-height:1.45;color:var(--tt-text)}.subpkg-scan-subtitle{font-size:var(--tt-text-meta);line-height:1.5;color:var(--tt-text-dim)}.subpkg-qr-empty{font-size:var(--tt-text-body);color:var(--tt-text-dim);text-align:center;line-height:1.6}.subpkg-entry-title{display:inline-flex;align-items:center;gap:8px}.subpkg-entry-title-label{font-size:inherit;font-weight:500;color:var(--tt-text-dim)}.subpkg-entry-title-value{font-weight:600;color:var(--tt-text)}.subpkg-entry-hint{font-size:var(--tt-text-meta);color:var(--tt-text-dim)}.subpkg-entry-hint strong{color:var(--tt-text);font-weight:600}.subpkg-guide{counter-reset:subpkg-guide-step;min-width:0;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;list-style:none;font-size:var(--tt-text-meta);line-height:1.6;color:var(--tt-text-dim)}.subpkg-guide li{counter-increment:subpkg-guide-step;min-width:0;display:grid;grid-template-columns:22px minmax(0,1fr);align-items:flex-start;gap:8px}.subpkg-guide li:before{content:counter(subpkg-guide-step);display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:999px;background:var(--tt-overlay-soft);color:var(--tt-text);font-size:12px;font-weight:700;line-height:1}.subpkg-guide-key{color:var(--tt-text);font-weight:600}.subpkg-guide-key:before{background:var(--tt-accent-soft);color:var(--tt-accent-text)}.subpkg-connect-tools{grid-column:1 / -1;box-sizing:border-box;width:100%;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px;border-radius:var(--tt-radius-md);border:1px solid var(--tt-accent-border);background:var(--tt-accent-soft)}.subpkg-connect-copy{flex:1 1 auto;min-width:0;display:flex;align-items:flex-start;justify-content:flex-start;gap:10px;text-align:left}.subpkg-connect-icon{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:999px;color:var(--tt-accent-text);background:var(--tt-bg-panel);border:1px solid var(--tt-accent-border)}.subpkg-connect-text{min-width:0;display:flex;flex-direction:column;gap:2px}.subpkg-connect-title{font-size:var(--tt-text-meta);line-height:1.5;font-weight:600;color:var(--tt-text)}.subpkg-connect-hint{min-width:0;font-size:var(--tt-text-meta);line-height:1.5;color:var(--tt-text-dim)}.subpkg-connect-actions{flex:0 0 auto;display:inline-flex;align-items:center;gap:8px}.subpkg-connect-button[class*=semi-button]{flex:0 0 auto;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;height:32px;min-width:112px;padding:0 12px;border:1px solid transparent;border-radius:var(--tt-radius-sm);font-weight:600;line-height:30px;white-space:nowrap;transform:none;transition:color .16s ease,background-color .16s ease,border-color .16s ease,box-shadow .16s ease}.subpkg-connect-button-secondary[class*=semi-button]{min-width:124px}.subpkg-connect-button-primary[class*=semi-button]{min-width:104px}.subpkg-connect-button[class*=semi-button] [class*=semi-button-content]{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:0;height:100%;line-height:30px}.subpkg-connect-button-secondary[class*=semi-button]{color:var(--tt-text-dim);background:var(--tt-bg-panel);border-color:var(--tt-border)}.subpkg-connect-button-primary[class*=semi-button]{color:var(--tt-accent-text);background:var(--tt-bg-panel);border-color:var(--tt-accent-border)}.subpkg-connect-button[class*=semi-button]:hover,.subpkg-connect-button[class*=semi-button]:active,.subpkg-connect-button[class*=semi-button]:focus{transform:none;border-width:1px;border-style:solid}.subpkg-connect-button[class*=semi-button]:hover{background:var(--tt-overlay-medium);border-color:var(--tt-border);box-shadow:none}.subpkg-connect-button-primary[class*=semi-button]:hover{border-color:var(--tt-accent-strong);background:var(--tt-bg-panel)}@media(max-width:900px){.subpkg-required-integration{grid-template-columns:auto minmax(0,1fr)}.subpkg-required-integration>.tt-document-link{grid-column:2;justify-self:start}.subpkg-dev-guide-list{grid-template-columns:repeat(2,minmax(0,1fr))}.subpkg-scan{grid-template-columns:1fr;align-items:start;gap:16px}.subpkg-qr{width:min(100%,208px);max-width:208px;min-height:0;margin:0 auto}.subpkg-connect-tools{align-items:flex-start;flex-direction:column;gap:10px}.subpkg-connect-copy{text-align:left}}@media(max-width:560px){.subpkg-hero-strip .tt-page-hero{flex-direction:column}.subpkg-hero-strip .tt-page-hero-action{align-self:flex-start}.subpkg-dev-guide-list{grid-template-columns:1fr}.subpkg-required-integration{grid-template-columns:1fr;align-items:start}.subpkg-required-label{justify-self:start}.subpkg-required-integration>.tt-document-link{grid-column:1}.subpkg-client-version{align-items:flex-start}}.subpkg-banner{position:relative;display:flex;align-items:flex-start;gap:12px;padding:12px 16px 12px 19px;border-radius:var(--tt-radius-md);border:1px solid var(--tt-border);background:var(--tt-bg-sunken);overflow:hidden}.subpkg-banner-bar{position:absolute;left:0;top:0;bottom:0;width:3px;border-top-right-radius:2px;border-bottom-right-radius:2px}.subpkg-banner-accent .subpkg-banner-bar{background:var(--tt-accent)}.subpkg-banner-warn .subpkg-banner-bar{background:var(--tt-warn-text)}.subpkg-banner-success{border-color:var(--tt-success-border);background:var(--tt-success-bg)}.subpkg-banner-success .subpkg-banner-bar{background:var(--tt-success-text)}.subpkg-banner-icon{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;margin-top:1px}.subpkg-banner-accent .subpkg-banner-icon{color:var(--tt-accent-text)}.subpkg-banner-warn .subpkg-banner-icon{color:var(--tt-warn-text)}.subpkg-banner-success .subpkg-banner-icon{color:var(--tt-success-text)}.subpkg-banner-body{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}.subpkg-banner-title{font-size:13px;font-weight:600;line-height:1.4;color:var(--tt-text)}.subpkg-banner-text{font-size:12px;line-height:1.55;color:var(--tt-text-dim);word-break:break-word}.subpkg-banner-progress:empty{display:none}.subpkg-banner-progress .tt-wasm-upload-progress{margin:4px 0 5px;padding:0;background:transparent;border:0;border-radius:0}.subpkg-banner-progress .tt-wasm-upload-progress-meta{font-size:12px}.subpkg-banner-progress .tt-wasm-upload-progress-track{height:5px}.subpkg-banner-cta{flex-shrink:0;align-self:center}.subpkg-banner-action[class*=semi-button]{flex-shrink:0;align-self:center;height:28px;padding:0 12px;border-radius:var(--tt-radius-sm)}.subpkg-wait-spin{animation:subpkg-spin 1.1s linear infinite;flex-shrink:0}@keyframes subpkg-spin{to{transform:rotate(360deg)}}.subpkg-mock{display:flex;flex-direction:column;gap:12px;padding:14px;border-radius:var(--tt-radius-md);border:1px dashed var(--tt-border);background:var(--tt-bg-sunken)}.subpkg-mock-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.subpkg-mock-input{flex:1 1 160px;min-width:140px}.subpkg-mock-empty{display:flex;flex-direction:column;gap:10px;font-size:12px;line-height:1.6;color:var(--tt-text-secondary)}.subpkg-mock-empty-action{align-self:flex-start}.subpkg-json{margin:0;padding:14px 16px;max-height:320px;overflow:auto;border-radius:var(--tt-radius-md);background:var(--tt-bg-sunken);border:1px solid var(--tt-border);color:var(--tt-text);font-family:var( --tt-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace );font-size:var(--tt-text-meta);line-height:1.6;white-space:pre;tab-size:2}.subpkg-preview-empty{padding:20px;text-align:center;font-size:var(--tt-text-meta);color:var(--tt-text-faint);border:1px dashed var(--tt-border);border-radius:var(--tt-radius-md)}.subpkg-finish-note{margin:0;padding:8px 12px;font-size:var(--tt-text-meta);line-height:1.5;color:var(--tt-text-dim);border-radius:var(--tt-radius-md);background:var(--tt-bg-sunken);border:1px solid var(--tt-border)}.subpkg-finish-note-clear{color:var(--tt-warn-text);background:var(--tt-warn-bg);border-color:var(--tt-warn-border)}.subpkg-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}.subpkg-center{align-items:center;text-align:center;padding:48px 32px}.subpkg-center-text{margin:12px 0 0;font-size:var(--tt-text-body);color:var(--tt-text-dim)}.subpkg-empty-icon{color:var(--tt-text-faint)}.subpkg-empty-title{margin:12px 0 0;font-size:var(--tt-text-body);font-weight:600;color:var(--tt-text)}.subpkg-empty-desc{margin:6px 0 0;max-width:440px;font-size:var(--tt-text-meta);line-height:1.6;color:var(--tt-text-dim)}.subpkg-actions-center{justify-content:center;margin-top:18px}.subpkg-result-head{display:flex;align-items:center;gap:8px;font-size:var(--tt-text-h3);font-weight:600}.subpkg-result-success{color:var(--tt-success-text, var(--tt-accent-text))}.subpkg-result-failed{color:var(--tt-error-text, var(--tt-warn-text))}.subpkg-error-msg{margin:0;font-size:var(--tt-text-body);color:var(--tt-text-dim);line-height:1.6;word-break:break-word}
@@ -1 +0,0 @@
1
- import{c as y,j as e,T as c,i,S as H,a as q,r as d,u as C,b as R,d as G,P as V,g as W,e as $}from"./index-BYIujYdU.js";import{S as I}from"./SectionHeader-4yiyPOgU.js";import{T as j,C as f}from"./Tag-BEGC7xBm.js";import{A as F}from"./index-XHO2ciZ_.js";import{T as U}from"./triangle-alert-DEb521qR.js";const K=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],J=y("globe",K);const O=[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]],Q=y("image-off",O);const X=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Y=y("info",X);const Z=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],ee=y("package",Z),se=({packages:s})=>e.jsx("div",{children:s.map(({name:t,size:r},a)=>{const l=(r/1024/1024).toFixed(2)+"MB",m=r<=4*1024*1024;return e.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",borderRadius:6,backgroundColor:m?"var(--tt-success-bg)":"var(--tt-error-bg)",marginBottom:a===s.length-1?0:8,width:"fit-content"},children:[e.jsxs(c.Text,{style:{fontWeight:600,fontSize:14},children:[t,":"]}),e.jsx(c.Text,{style:{color:m?"var(--tt-success-text)":"var(--tt-error-text)",fontWeight:600},children:l}),e.jsx(c.Text,{type:"tertiary",style:{marginLeft:8},children:m?i("notExceedIndependentPkgSizeLimit",{limit:"4MB"}):i("exceedIndependentPkgSizeLimit",{limit:"4MB"})})]},t)})}),ie=({size:s,limit:t})=>{const r=(s/1024/1024).toFixed(2)+"MB",a=s<=t*1024*1024,l=a?i("notExceedSizeLimit",{limit:t+"MB"}):i("exceedSizeLimit",{limit:t+"MB"});return e.jsxs("div",{style:{display:"flex",alignItems:"center",width:"fit-content",padding:"2px 8px",borderRadius:6,backgroundColor:a?"var(--tt-success-bg)":"var(--tt-error-bg)"},children:[e.jsx(c.Text,{style:{fontWeight:600,color:a?"var(--tt-success-text)":"var(--tt-error-text)"},children:r}),e.jsx(c.Text,{type:"tertiary",style:{marginLeft:8},children:l})]})},te=({packages:s,limit:t})=>{const r=s.find(g=>g.type==="main")?.size,a=(r/1024/1024).toFixed(2)+"MB",l=r<=t*1024*1024,m=l?i("notExceedMainPkgSizeLimit",{limit:t+"MB"}):i("exceedMainPkgSizeLimit",{limit:t+"MB"});return e.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",width:"fit-content",borderRadius:6,backgroundColor:l?"var(--tt-success-bg)":"var(--tt-error-bg)"},children:[e.jsx(c.Text,{style:{fontWeight:600,color:l?"var(--tt-success-text)":"var(--tt-error-text)"},children:a}),e.jsx(c.Text,{type:"tertiary",style:{marginLeft:8},children:m})]})},re=({domains:s=[]})=>s?.length?e.jsx(H,{className:"trusted-domain-list",style:{flexWrap:"wrap"},children:s.map(t=>e.jsx(q,{className:"trusted-domain-tag",children:t},t))}):e.jsxs("div",{className:"pd-empty-config-row",children:[e.jsx(j,{tone:"warn",size:"sm",children:i("projectInfo.status.missing")}),e.jsx("span",{children:i("projectInfo.status.domainRequired")})]}),ae=({termsOfServiceLink:s})=>{const t=i("termsLabel");return s?e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(c.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsx("a",{className:"terms-privacy-value",href:s,title:s,target:"_blank",rel:"noreferrer",children:s})]}):e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(c.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsxs("span",{className:"pd-missing-inline",children:[e.jsx(j,{tone:"warn",size:"sm",children:i("projectInfo.status.missing")}),e.jsx("span",{children:i("projectInfo.status.authRequired")})]})]})},ne=({privacyPolicyLink:s})=>{const t=i("privacyLabel");return s?e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(c.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsx("a",{className:"terms-privacy-value",href:s,title:s,target:"_blank",rel:"noreferrer",children:s})]}):e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(c.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsxs("span",{className:"pd-missing-inline",children:[e.jsx(j,{tone:"warn",size:"sm",children:i("projectInfo.status.missing")}),e.jsx("span",{children:i("projectInfo.status.authRequired")})]})]})},ce=({logo:s,placeholder:t})=>{const[r,a]=d.useState(!1);return s?.trim()?e.jsxs("div",{className:"pd-logo-image-frame",children:[!r&&(t||e.jsx("div",{className:"pd-logo-loading"})),e.jsx("img",{src:s,alt:"logo",className:"pd-logo-image",style:{opacity:r?1:0},onLoad:()=>a(!0)})]}):e.jsxs("div",{className:"pd-logo-placeholder",children:[e.jsx(Q,{size:20,strokeWidth:2}),e.jsx("span",{children:i("projectInfo.logoMissingShort")})]})},oe=({description:s})=>s?e.jsx("span",{children:s}):e.jsxs("span",{className:"pd-missing-inline",children:[e.jsx(j,{tone:"warn",size:"sm",children:i("projectInfo.status.missing")}),e.jsx("span",{children:i("projectInfo.status.reviewBeforeSubmit")})]}),S=({label:s,children:t,wide:r=!1})=>e.jsxs("div",{className:`pd-field ${r?"pd-field-wide":""}`,children:[e.jsx("span",{className:"pd-field-label",children:s}),e.jsx("div",{className:"pd-field-value",children:t})]}),b=({label:s,children:t})=>e.jsxs("div",{className:"pd-hero-row",children:[e.jsx("span",{className:"pd-hero-row-label",children:s}),e.jsx("div",{className:"pd-hero-row-value",children:t})]}),le=({hint:s})=>e.jsxs("span",{className:"pd-missing-inline",children:[e.jsx(j,{tone:"warn",size:"sm",children:i("projectInfo.status.missing")}),e.jsx("span",{children:s})]}),z=({title:s,issues:t})=>e.jsxs("div",{className:"pd-config-issue-group",children:[e.jsx("div",{className:"pd-config-issue-group-title",children:s}),e.jsx("div",{className:"pd-config-issue-list",children:t.map(r=>e.jsxs("div",{className:"pd-config-issue-item",children:[e.jsx("span",{className:"pd-config-issue-dot","aria-hidden":"true"}),e.jsx("span",{className:"pd-config-issue-title",children:r.title}),e.jsx("span",{className:"pd-config-issue-desc",children:r.desc})]},r.id))})]}),de=({issues:s})=>{if(!s.length)return null;const t=s.filter(a=>a.group==="review"),r=s.filter(a=>a.group==="runtime");return e.jsxs(f,{padding:"md",accent:"warn",className:"pd-config-summary",children:[e.jsxs("div",{className:"pd-config-summary-head",children:[e.jsxs("div",{className:"pd-config-summary-title-block",children:[e.jsxs("div",{className:"pd-config-summary-title",children:[e.jsx(U,{size:16,strokeWidth:2}),e.jsx("span",{children:i("projectInfo.configSummary.title")})]}),e.jsx("div",{className:"pd-config-summary-desc",children:i("projectInfo.configSummary.desc")})]}),e.jsx(j,{tone:"warn",size:"md",children:i("projectInfo.configSummary.count",{count:s.length})})]}),e.jsxs("div",{className:"pd-config-summary-grid",children:[t.length>0?e.jsx(z,{title:i("projectInfo.configSummary.reviewGroup"),issues:t}):null,r.length>0?e.jsx(z,{title:i("projectInfo.configSummary.runtimeGroup"),issues:r}):null]})]})},je=()=>{const{state:{gameDetail:s,user:t,packages:r,engine:a},setGameDetail:l}=C(),[m,g]=d.useState(!0),[w,_]=d.useState(!1),[T,D]=d.useState(""),[P,L]=d.useState("unknown"),M=({errorCode:n,errorMsg:p,clientKey:u})=>{g(!1),_(!0),L(W({errorCode:n,user:t})),D($({errorCode:n,errorMsg:p,clientKey:u,user:t}))};d.useEffect(()=>{if(s&&!s.has_error){g(!1);return}s?.has_error&&(_(!0),M({errorCode:s.error_code,errorMsg:s.error_msg,clientKey:s.client_key})),R({url:"/game/detail",method:"GET"}).then(n=>{if(n?.error)g(!1),M(n.error);else{const{data:p}=n;l(p),g(!1)}})},[]);const o=d.useMemo(()=>{if(!s||s?.has_error)return null;const{size:n,request_allowed_domains:p}=s,u=a==="unity",x=r?.length>0?r:s.packages??[],v=x.reduce((h,A)=>h+(A?.size??0),0)||n,N=u?60:30,k=x.filter(h=>h.type==="independent"),E=x.some(h=>h.type==="main");return{isUnity:u,packageList:x,projectSize:v,projectSizeLimit:N,independentPackages:k,hasMainPackage:E,domains:p}},[a,s,r]),B=d.useMemo(()=>{if(!s||s?.has_error)return[];const n=[],p=!s.display_icon_url?.trim()&&!s.icon_url?.trim(),u=!s.name?.trim(),x=!s.description?.trim(),v=!s.request_allowed_domains?.length,N=!s.terms_of_service_link?.trim(),k=!s.privacy_policy_link?.trim();return p&&n.push({id:"icon",group:"review",title:i("projectInfo.configSummary.item.icon"),desc:i("projectInfo.configSummary.reviewHint")}),u&&n.push({id:"name",group:"review",title:i("projectInfo.configSummary.item.name"),desc:i("projectInfo.configSummary.reviewHint")}),x&&n.push({id:"description",group:"review",title:i("projectInfo.configSummary.item.description"),desc:i("projectInfo.configSummary.reviewHint")}),v&&n.push({id:"domains",group:"runtime",title:i("projectInfo.configSummary.item.domain"),desc:i("projectInfo.configSummary.domainHint")}),N&&n.push({id:"terms",group:"runtime",title:i("projectInfo.configSummary.item.terms"),desc:i("projectInfo.configSummary.termsHint")}),k&&n.push({id:"privacy",group:"runtime",title:i("projectInfo.configSummary.item.privacy"),desc:i("projectInfo.configSummary.privacyHint")}),n},[s]);return m&&!s?e.jsx("div",{className:"pd-loading",children:e.jsx(G,{size:"large"})}):w?e.jsx(F,{errorMsg:T,errorState:P}):!s||!o?null:e.jsxs("div",{className:"pd-page","data-doc-shot":"project-ready",children:[e.jsx(V,{title:i("projectInfo"),subtitle:i("projectInfo.summary")}),e.jsx(de,{issues:B}),e.jsxs(f,{padding:"md",children:[e.jsx(I,{icon:Y,title:i("projectInfo.section.basic")}),e.jsxs("div",{className:"pd-hero",children:[e.jsx("div",{className:"pd-hero-logo",children:e.jsx(ce,{logo:s.display_icon_url||s.icon_url||""})}),e.jsxs("div",{className:"pd-hero-meta",children:[e.jsx(b,{label:i("gameName"),children:s.name?.trim()?e.jsx("span",{className:"pd-hero-name",children:s.name}):e.jsx(le,{hint:i("projectInfo.status.reviewBeforeSubmit")})}),e.jsx(b,{label:i("gameID"),children:e.jsx("span",{className:"pd-hero-code",children:s.client_key||"-"})}),e.jsx(b,{label:i("gameDesc"),children:e.jsx(oe,{description:s.description})})]})]})]}),e.jsxs(f,{padding:"md",children:[e.jsx(I,{icon:ee,title:i("projectInfo.section.package")}),e.jsxs("div",{className:"pd-fields-grid",children:[e.jsx(S,{label:i("gameSize"),children:e.jsx(ie,{size:o.projectSize,limit:o.projectSizeLimit})}),!o.isUnity&&o.hasMainPackage?e.jsx(S,{label:i("gameMainPackageSize"),children:e.jsx(te,{packages:o.packageList,limit:4})}):null,!o.isUnity&&o.independentPackages.length>0?e.jsx(S,{label:i("gameIndependentPackageSize"),wide:!0,children:e.jsx(se,{packages:o.independentPackages})}):null]})]}),e.jsxs(f,{padding:"md",children:[e.jsx(I,{icon:J,title:i("projectInfo.section.platform")}),e.jsxs("div",{className:"pd-platform-stack",children:[e.jsxs("div",{className:"pd-platform-subsection",children:[e.jsx("span",{className:"pd-subsection-label",children:i("gameTrustDomains")}),e.jsx(re,{domains:o.domains})]}),e.jsxs("div",{className:"pd-platform-subsection",children:[e.jsx("span",{className:"pd-subsection-label",children:i("gameTermsAndPrivacy")}),e.jsxs("div",{className:"pd-terms-stack",children:[e.jsx(ae,{termsOfServiceLink:s.terms_of_service_link}),e.jsx(ne,{privacyPolicyLink:s.privacy_policy_link})]})]})]})]})]})};export{je as ProjectDetail};
@@ -1 +0,0 @@
1
- import{af as o,r as s,o as n,j as e,T as h,i as c,l as g,ag as m,b as d}from"./index-BYIujYdU.js";import{D as r}from"./index-DyFkQnHH.js";function u(a){return s.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},a),s.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m6.62 3.25.44.75H2.6C1.72 4 1 4.67 1 5.5S1.72 7 2.6 7h1.9c0 2.45 1.1 4.71 2.5 6.5-1.1.64-2.63 1-4 1a1.5 1.5 0 1 0 0 3c2.23 0 4.3-.7 6-1.88 1.4.98 3.06 1.62 4.85 1.82l-1.7 3.39a1.5 1.5 0 0 0 2.7 1.34l.58-1.17h4.14l.59 1.17a1.5 1.5 0 0 0 2.68-1.34l-4-8a1.5 1.5 0 0 0-2.68 0l-.85 1.7a1.5 1.5 0 0 0-.31-.03c-1.37 0-2.9-.36-4-1A10.7 10.7 0 0 0 13.5 7h1.9c.88 0 1.6-.67 1.6-1.5S16.28 4 15.4 4h-4.88l-1.3-2.25a1.5 1.5 0 0 0-2.6 1.5ZM7.5 7h3c0 1.69-.56 3.25-1.5 4.5A7.47 7.47 0 0 1 7.5 7Zm10 9.85L18.57 19h-2.14l1.07-2.15Z",fill:"currentColor"}))}const w=o(u,"language"),i=[{code:"zh-CN",labelKey:"langChinese",short:"中"},{code:"en-US",labelKey:"langEnglish",short:"EN"}];async function p(a){if(a!==n){m(a);try{await d({url:"/game/language",method:"POST",data:{lang:a}})}catch{}window.location.reload()}}const f=()=>{const a=i.find(t=>t.code===n)?.short??"EN";return e.jsx(r,{trigger:"hover",position:"bottomRight",render:e.jsx(e.Fragment,{children:i.map(t=>{const l=t.code===n;return e.jsxs(r.Item,{onClick:()=>{p(t.code)},className:"lang-switcher-item"+(l?" lang-switcher-item-active":""),children:[e.jsx("span",{className:"lang-switcher-item-label",children:c(t.labelKey)}),l?e.jsx(g,{className:"lang-switcher-item-check"}):null]},t.code)})}),children:e.jsxs("div",{className:"lang-switcher tt-header-chip","aria-label":c("languageSwitcherLabel"),children:[e.jsx(w,{className:"lang-switcher-icon"}),e.jsx(h.Text,{className:"lang-switcher-text",children:a})]})})};export{f as LangSwitcher};
@@ -1 +0,0 @@
1
- import{c as z,j as e,b as A,f as Ee,u as Me,r as t,i as s,a5 as ee,A as Ge,P as _e,D as U,B as d,Q as Le,a7 as Pe,a8 as ze,a9 as Ae,aa as De,ab as Re,ac as qe}from"./index-BYIujYdU.js";import{S as L}from"./SectionHeader-4yiyPOgU.js";import{T as se,C as u}from"./Tag-BEGC7xBm.js";import{a as ae,C as te,U as Oe}from"./index-CLjbrJ-V.js";import{T as ce}from"./triangle-alert-DEb521qR.js";import"./col-DYNqjxgf.js";const We=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],ne=z("boxes",We);const Ie=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Be=z("link",Ie);const Ue=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],$=z("loader",Ue);const $e=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Fe=z("refresh-cw",$e),le=({entries:n,emptyText:i})=>{if(!n.length)return e.jsx("div",{className:"subpkg-preview-empty",children:i});const m=JSON.stringify({parallelPreloadSubpackages:n},null,2);return e.jsx("pre",{className:"subpkg-json",children:m})},h="__GAME__",Ke=9999;function He(n){return A({url:"/game/preload-subpackages-config",method:"GET",data:{entry:n}})}function Ve(n){return A({url:"/game/preload-subpackage-candidates",method:"GET",data:{entry:n}})}function Qe(n,i){return A({url:"/game/collect-preload-subpackages",method:"POST",data:{entry:n,subpackages:i}})}function ie(n){return A({url:"/game/clear-preload-subpackages-config",method:"POST",data:{entry:n}})}const Ze=2e4,F="https://bytedance.my.larkoffice.com/docx/MIyMdmzb0oOQAKxNHGNmR5hDyAh",Je=!1,P=[{subPkgName:"configBundle",isStartup:!0},{subPkgName:"gameplayBundle",isStartup:!1}];function Ye(){if(!Pe())return null;switch(ze()){case"subpackage.collecting":return{shot:"subpackage-collecting",stage:"collecting",entry:h,entryLabel:s("subpackageCollect.entry.game"),isConnected:!0,windowClosed:!1,collected:P,result:[]};case"subpackage.ready":return{shot:"subpackage-ready",stage:"collecting",entry:h,entryLabel:s("subpackageCollect.entry.game"),isConnected:!0,windowClosed:!0,collected:P,result:[]};case"subpackage.success":return{shot:"subpackage-success",stage:"success",entry:h,entryLabel:s("subpackageCollect.entry.game"),isConnected:!0,windowClosed:!0,collected:P,result:P};case"subpackage.collect-ready":return{shot:"subpackage-entry",stage:"entry",entry:h,entryLabel:"",isConnected:!1,windowClosed:!1,collected:[],result:[]};default:return null}}const Xe={entry:"neutral",empty:"neutral",collecting:"accent",processing:"accent",success:"success",failed:"error"},is=()=>{const n=Ee(),i=Ye(),{state:{devSchema:m,engine:re,packages:D,isConnected:oe},setMessage:G,setShowManualBindIP:K}=Me(),R=t.useMemo(()=>{const a=(D||[]).filter(l=>l.type==="independent").map(l=>({value:l.name,label:l.name,isGame:!1}));return[{value:h,label:s("subpackageCollect.entry.game"),isGame:!0},...a]},[D]),q=(D?.length??0)>0,x=R.length>1,f=re==="unity",N=oe||!!i?.isConnected,[c,r]=t.useState(()=>i?.stage??"entry"),[de,C]=t.useState("idle"),[k,ue]=t.useState(()=>i?.entry??h),[H,pe]=t.useState(()=>i?.entryLabel??""),[p,v]=t.useState(()=>i?.collected??[]),[es,O]=t.useState([]),[b,w]=t.useState([]),[W,S]=t.useState(()=>i?.result??[]),[g,T]=t.useState(()=>i?.windowClosed??!1),[ge,_]=t.useState(!1),[ke,E]=t.useState(""),[be,M]=t.useState(""),I=t.useRef(!1),B=t.useRef("entry");I.current=g,B.current=c;const V=t.useMemo(()=>{if(!m)return"";const a=m.includes("?")?"&":"?";return`${m}${a}startupRoot=${encodeURIComponent(k)}`},[m,k]);t.useEffect(()=>{const a=ee.on("predownloadSubpackage",o=>{if(B.current!=="collecting"||I.current)return;const{subPkgName:j,isStartup:Se}=o;!j||j===h||(v(y=>y.some(Te=>Te.subPkgName===j)?y:[...y,{subPkgName:j,isStartup:Se}]),C(y=>y==="idle"?"running":y))}),l=ee.on("reportScene",o=>{B.current!=="collecting"||I.current||o.sceneId===Ke&&(T(!0),C("interactive"),G({type:"success",title:s("subpackageCollect.reportScene.toastTitle"),desc:s("subpackageCollect.reportScene.toastDesc")}))});return()=>{a(),l()}},[G]),t.useEffect(()=>{if(i||c!=="collecting"||g||!N){_(!1);return}const a=window.setTimeout(()=>_(!0),Ze);return()=>window.clearTimeout(a)},[i,c,g,N,de]);const Q=async a=>{ue(a.value),pe(a.label),v([]),S([]),T(!1),C("idle"),w([]),O([]),r("collecting");const[l,o]=await Promise.all([He(a.value),Ve(a.value)]);if(l?.code===0&&l.data){const j=l.data.parallelPreloadSubpackages||[];w(j)}o?.code===0&&o.data&&(O(o.data.candidates||[]),o.data.totalSubpackages===0&&r("empty"))};t.useEffect(()=>{f||c==="entry"&&q&&!x&&Q(R[0])},[c,q,x,f]);const Z=async()=>{M(s("subpackageCollect.processing.write")),r("processing");const a=p.slice(),l=await Qe(k,a);if(l?.code===0&&l.data){const o=l.data.parallelPreloadSubpackages||[];S(o),w(o),r("success")}else E(l?.error?.message||s("subpackageCollect.error.generic")),r("failed")},he=()=>{if(p.length===0&&b.length>0){qe.confirm({type:"warning",title:s("subpackageCollect.finish.clearTitle"),content:s("subpackageCollect.finish.clearConfirm",{existing:b.length}),okText:s("subpackageCollect.finish.okClear"),cancelText:s("subpackageCollect.finish.cancel"),onOk:Z});return}Z()},me=()=>{v([]),S([]),w([]),T(!1),C("idle"),_(!1),E(""),M(""),r("collecting")},xe=()=>{v([]),S([]),w([]),T(!1),C("idle"),_(!1),E(""),M(""),r(x?"entry":"collecting")},J=async()=>{M(s("subpackageCollect.processing.clear")),r("processing");const a=await ie(k);if(a?.code===0){me();return}E(a?.error?.message||s("subpackageCollect.error.generic")),r("failed")},Y=()=>{v([]),S([]),O([]),T(!1),C("idle"),r("entry")},Ce=async()=>{M(s("subpackageCollect.processing.cancel")),r("processing");const a=await ie(k);if(a?.code===0){xe();return}E(a?.error?.message||s("subpackageCollect.error.generic")),r("failed")},je=()=>{n("/performance")},ye=()=>{K(!0)},fe=()=>{const a=Ae();if(!De(a)){G({type:"warning",title:s("subpackageCollect.manualConnect.noRecordTitle"),desc:s("subpackageCollect.manualConnect.noRecordDesc")}),K(!0);return}Re(a),G({type:"info",title:s("subpackageCollect.manualConnect.retryTitle"),desc:s("subpackageCollect.manualConnect.retryDesc",{ip:String(a.ip),port:String(a.wsPort)})})},Ne=t.useMemo(()=>c==="success"?W:p.length?p:g?[]:b,[c,W,p,b,g]),X=c==="collecting"&&!N,ve=f?s("subpackageCollect.stage.unsupported"):X?s("subpackageCollect.stage.notStarted"):s(`subpackageCollect.stage.${c}`),we=f?"warn":X?"neutral":Xe[c];return e.jsxs("div",{className:"subpkg-page","data-doc-shot":i?.shot||"subpackage-collection",children:[e.jsxs("div",{className:"subpkg-hero-strip",children:[e.jsxs("button",{type:"button",className:"subpkg-back",onClick:()=>n("/performance"),children:[e.jsx(Ge,{size:14,strokeWidth:2}),e.jsx("span",{children:s("back")})]}),e.jsx(_e,{title:s("subpackageCollect"),subtitle:s("subpackageCollect.subtitle"),action:e.jsxs("div",{className:"subpkg-hero-actions",children:[e.jsx(U,{href:F,children:s("subpackageCollect.devGuide.link")}),e.jsx(se,{tone:we,withDot:!0,variant:"solid",children:ve})]})})]}),f?e.jsxs(u,{padding:"lg",className:"subpkg-card subpkg-unsupported-card",children:[e.jsx("div",{className:"subpkg-unsupported-icon","aria-hidden":"true",children:e.jsx(ce,{size:22,strokeWidth:1.75})}),e.jsx("h2",{className:"subpkg-unsupported-title",children:s("subpackageCollect.unsupported.unity.title")}),e.jsx("p",{className:"subpkg-unsupported-desc",children:s("subpackageCollect.unsupported.unity.desc")}),e.jsx("div",{className:"subpkg-unsupported-actions",children:e.jsx(d,{type:"primary",theme:"solid",onClick:()=>n("/wasm_split"),children:s("subpackageCollect.unsupported.unity.action")})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(u,{padding:"lg",className:"subpkg-card subpkg-dev-guide-card",children:[e.jsx(L,{className:"subpkg-section-header",title:s("subpackageCollect.devGuide.stepsTitle")}),e.jsxs("div",{className:"subpkg-required-integration",children:[e.jsx("span",{className:"subpkg-required-label",children:s("subpackageCollect.devGuide.required.badge")}),e.jsxs("div",{className:"subpkg-required-copy",children:[e.jsxs("div",{className:"subpkg-required-title",children:[s("subpackageCollect.devGuide.required.title"),e.jsx("code",{children:s("subpackageCollect.devGuide.required.code")})]}),e.jsx("div",{className:"subpkg-required-desc",children:s("subpackageCollect.devGuide.required.desc")})]}),e.jsx(U,{href:F,children:s("subpackageCollect.devGuide.required.link")})]}),e.jsxs("ol",{className:"subpkg-dev-guide-list",children:[e.jsxs("li",{children:[e.jsx("span",{className:"subpkg-dev-guide-index",children:"1"}),e.jsxs("span",{className:"subpkg-dev-guide-copy",children:[e.jsx("strong",{children:s("subpackageCollect.devGuide.step1.title")}),e.jsx("span",{children:s("subpackageCollect.devGuide.step1.desc")})]})]}),e.jsxs("li",{children:[e.jsx("span",{className:"subpkg-dev-guide-index",children:"2"}),e.jsxs("span",{className:"subpkg-dev-guide-copy",children:[e.jsx("strong",{children:s("subpackageCollect.devGuide.step2.title")}),e.jsx("span",{children:s("subpackageCollect.devGuide.step2.desc")})]})]}),e.jsxs("li",{children:[e.jsx("span",{className:"subpkg-dev-guide-index",children:"3"}),e.jsxs("span",{className:"subpkg-dev-guide-copy",children:[e.jsx("strong",{children:s("subpackageCollect.devGuide.step3.title")}),e.jsx("span",{children:s("subpackageCollect.devGuide.step3.desc")})]})]})]})]}),c==="entry"&&(q&&x?e.jsxs(u,{padding:"lg",className:"subpkg-card",children:[e.jsx(L,{icon:ne,title:s("subpackageCollect.entry.title"),subtitle:s("subpackageCollect.entry.subtitle")}),e.jsx("div",{className:"subpkg-entry-grid",children:R.map(a=>e.jsxs("button",{type:"button",className:"subpkg-entry-card",onClick:()=>Q(a),children:[e.jsx("span",{className:"subpkg-entry-name",children:a.label}),e.jsx(se,{tone:a.isGame?"accent":"info",size:"sm",variant:"outline",children:a.isGame?s("subpackageCollect.entry.gameTag"):s("subpackageCollect.entry.independentTag")})]},a.value))})]}):e.jsxs(u,{padding:"lg",className:"subpkg-card subpkg-center",children:[e.jsx($,{size:28,strokeWidth:1.75,className:"subpkg-wait-spin"}),e.jsx("p",{className:"subpkg-center-text",children:s("subpackageCollect.loading")})]})),c==="empty"&&e.jsxs(u,{padding:"lg",className:"subpkg-card subpkg-center",children:[e.jsx(ne,{size:28,strokeWidth:1.5,className:"subpkg-empty-icon"}),e.jsx("p",{className:"subpkg-empty-title",children:s("subpackageCollect.empty.title")}),e.jsx("p",{className:"subpkg-empty-desc",children:s("subpackageCollect.empty.desc")}),e.jsx("div",{className:"subpkg-actions subpkg-actions-center",children:e.jsx(d,{type:"primary",theme:"solid",onClick:()=>n("/performance"),children:s("subpackageCollect.empty.back")})})]}),c==="collecting"&&e.jsxs("div",{className:"subpkg-collect-grid",children:[e.jsxs(u,{padding:"lg",className:"subpkg-card subpkg-collect-card",children:[e.jsx(L,{className:"subpkg-section-header",title:e.jsxs("span",{className:"subpkg-entry-title",children:[e.jsx("span",{className:"subpkg-entry-title-label",children:s("subpackageCollect.preview.currentEntry")}),e.jsx("span",{className:"subpkg-entry-title-value",children:H||k})]})}),!g&&!N&&e.jsxs("div",{className:"subpkg-scan",children:[e.jsx("div",{className:"subpkg-qr",children:V?e.jsx(Le,{value:V,size:164}):e.jsx("div",{className:"subpkg-qr-empty",children:s("subpackageCollect.preview.noSchema")})}),e.jsxs("div",{className:"subpkg-scan-main",children:[e.jsxs("div",{className:"subpkg-scan-heading",children:[e.jsx("div",{className:"subpkg-scan-title",children:s("subpackageCollect.scan.title")}),e.jsx("div",{className:"subpkg-scan-subtitle",children:s("subpackageCollect.scan.subtitle")})]}),e.jsxs("ol",{className:"subpkg-guide",children:[e.jsx("li",{children:s("subpackageCollect.guide.step2")}),e.jsx("li",{className:"subpkg-guide-key",children:s("subpackageCollect.guide.step3")})]})]}),e.jsxs("div",{className:"subpkg-connect-tools",role:"group","aria-label":s("subpackageCollect.manualConnect.title"),children:[e.jsxs("div",{className:"subpkg-connect-copy",children:[e.jsx("span",{className:"subpkg-connect-icon","aria-hidden":"true",children:e.jsx(ae,{size:16,strokeWidth:2})}),e.jsxs("span",{className:"subpkg-connect-text",children:[e.jsx("span",{className:"subpkg-connect-title",children:s("subpackageCollect.manualConnect.title")}),e.jsx("span",{className:"subpkg-connect-hint",children:s("subpackageCollect.manualConnect.desc")})]})]}),e.jsxs("div",{className:"subpkg-connect-actions",children:[e.jsx(d,{className:"subpkg-connect-button subpkg-connect-button-secondary",size:"small",type:"tertiary",icon:e.jsx(Fe,{size:14,strokeWidth:2}),onClick:fe,children:s("subpackageCollect.manualConnect.retry")}),e.jsx(d,{className:"subpkg-connect-button subpkg-connect-button-primary",size:"small",theme:"light",icon:e.jsx(Be,{size:14,strokeWidth:2}),onClick:ye,children:s("subpackageCollect.manualConnect.action")})]})]})]}),g?e.jsxs("div",{className:"subpkg-banner subpkg-banner-success",role:"status",children:[e.jsx("span",{className:"subpkg-banner-bar","aria-hidden":"true"}),e.jsx("span",{className:"subpkg-banner-icon",children:e.jsx(te,{size:18,strokeWidth:2})}),e.jsxs("div",{className:"subpkg-banner-body",children:[e.jsx("div",{className:"subpkg-banner-title",children:s("subpackageCollect.reportScene.readyTitle")}),e.jsx("div",{className:"subpkg-banner-text",children:s("subpackageCollect.reportScene.readyDesc")})]}),e.jsx(d,{className:"subpkg-banner-action",size:"small",type:"primary",theme:"solid",onClick:he,children:s("subpackageCollect.action.finish")})]}):N&&(ge?e.jsxs("div",{className:"subpkg-banner subpkg-banner-warn",role:"alert",children:[e.jsx("span",{className:"subpkg-banner-bar","aria-hidden":"true"}),e.jsx("span",{className:"subpkg-banner-icon",children:e.jsx(ce,{size:18,strokeWidth:2})}),e.jsxs("div",{className:"subpkg-banner-body",children:[e.jsx("div",{className:"subpkg-banner-title",children:s("subpackageCollect.wait.timeoutTitle")}),e.jsx("div",{className:"subpkg-banner-text",children:s("subpackageCollect.wait.timeout")})]}),e.jsx(U,{className:"subpkg-banner-cta",href:F,children:s("subpackageCollect.wait.docLink")})]}):e.jsxs("div",{className:"subpkg-banner subpkg-banner-accent",role:"status",children:[e.jsx("span",{className:"subpkg-banner-bar","aria-hidden":"true"}),e.jsx("span",{className:"subpkg-banner-icon",children:e.jsx($,{size:18,strokeWidth:2,className:"subpkg-wait-spin"})}),e.jsxs("div",{className:"subpkg-banner-body",children:[e.jsx("div",{className:"subpkg-banner-title",children:s("subpackageCollect.wait.runningTitle")}),e.jsx("div",{className:"subpkg-banner-progress",children:e.jsx(Oe,{})}),e.jsx("div",{className:"subpkg-banner-text",children:s("subpackageCollect.wait.running")})]})]})),Je]}),e.jsxs(u,{padding:"lg",className:"subpkg-card subpkg-side",children:[e.jsx(L,{title:s("subpackageCollect.preview.collectedTitle"),subtitle:p.length?s("subpackageCollect.preview.collectedDesc"):s("subpackageCollect.preview.existingDesc")}),e.jsx(le,{entries:Ne,emptyText:s("subpackageCollect.preview.empty")}),g&&b.length>0&&e.jsx("p",{className:`subpkg-finish-note${p.length?"":" subpkg-finish-note-clear"}`,children:p.length?s("subpackageCollect.finish.overwriteNote",{current:p.length,existing:b.length}):s("subpackageCollect.finish.clearNote",{existing:b.length})}),!g&&e.jsxs("div",{className:"subpkg-actions",children:[e.jsx(d,{type:"tertiary",onClick:Ce,children:s("subpackageCollect.action.cancel")}),e.jsx(d,{type:"tertiary",onClick:je,children:s("subpackageCollect.action.exit")})]})]})]}),c==="processing"&&e.jsxs(u,{padding:"lg",className:"subpkg-card subpkg-center",children:[e.jsx($,{size:28,strokeWidth:1.75,className:"subpkg-wait-spin"}),e.jsx("p",{className:"subpkg-center-text",children:be||s("subpackageCollect.processing.write")})]}),c==="success"&&e.jsxs(u,{padding:"lg",className:"subpkg-card",children:[e.jsxs("div",{className:"subpkg-result-head subpkg-result-success",children:[e.jsx(te,{size:20,strokeWidth:1.75}),e.jsx("span",{children:s("subpackageCollect.success.title")})]}),e.jsxs("div",{className:"subpkg-entry-hint",children:[s("subpackageCollect.preview.currentEntry"),":",e.jsx("strong",{children:H||k})]}),e.jsx(le,{entries:W,emptyText:s("subpackageCollect.success.empty")}),e.jsxs("div",{className:"subpkg-actions",children:[e.jsx(d,{type:"primary",theme:"solid",onClick:J,children:s("subpackageCollect.action.recollect")}),x&&e.jsx(d,{type:"tertiary",onClick:Y,children:s("subpackageCollect.action.switch")})]})]}),c==="failed"&&e.jsxs(u,{padding:"lg",className:"subpkg-card",children:[e.jsxs("div",{className:"subpkg-result-head subpkg-result-failed",children:[e.jsx(ae,{size:20,strokeWidth:1.75}),e.jsx("span",{children:s("subpackageCollect.failed.title")})]}),e.jsx("p",{className:"subpkg-error-msg",children:ke}),e.jsxs("div",{className:"subpkg-actions",children:[e.jsx(d,{type:"primary",theme:"solid",onClick:J,children:s("subpackageCollect.action.recollect")}),x&&e.jsx(d,{type:"tertiary",onClick:Y,children:s("subpackageCollect.action.switch")})]})]})]})]})};export{is as SubpackageCollect};
@@ -1 +0,0 @@
1
- import{r as e,c as f,f as u,j as r,m as x,T as i,i as a,B as M,D as Z}from"./index-BYIujYdU.js";var g=Object.defineProperty,d=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,h=(c,l,t)=>l in c?g(c,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[l]=t,I=(c,l)=>{for(var t in l||(l={}))k.call(l,t)&&h(c,t,l[t]);if(d)for(var t of d(l))w.call(l,t)&&h(c,t,l[t]);return c};function _(c){return e.createElement("svg",I({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,"aria-hidden":!0},c),e.createElement("rect",{width:200,height:200,fill:"transparent"}),e.createElement("path",{d:"M74.7 78.6c20.78-6.32 57.55-12.26 71.81-9.86 4.21.7 8.12 1.98 11.36 3.42-.51-1.69-.95-3.5-1.38-5.3l-.04-.18c-1.03-4.27-2.05-8.44-3.95-10.55-4.8-5.32.67-10.12.67-10.12l.93-10.53c13.02 4.82 21.65 14.92 27 25.08 4.57 8.67 6.75 17.37 7.25 22.89 1.06 12-8.18 18.86-19.2 18.86-9.74 0-18.36-1.64-24.81-3.1.64 2.18 5.44 19.18 7.53 32.66l-46.15.58-7.58-14.68-4.66-12.26c-19.46 7.46-50.77 19.02-64.9 18.44-10.35-.42-15.68-15.68-17.44-28.7a71.55 71.55 0 0 1-.67-9.4c0-5.64.3-12.18 2.22-17.89.74-2.21 1.73-4.3 3.04-6.17a18.1 18.1 0 0 1 4.6-4.59c0 4-1.02 13.54 2.8 14.12 5.06.78 10.4-9.08 13.85-7.06 3.87 2.27-1.65 16.34-1.33 17.2.27.7.53 1.4.76 2.07a48.99 48.99 0 0 1 2.25 8.55C46.59 87.56 60 83.06 74.69 78.6Z",fill:"white"}),e.createElement("path",{d:"M181.1 60.56c4.57 8.67 6.75 17.37 7.25 22.89 1.06 12-8.18 18.86-19.2 18.86-9.74 0-18.36-1.64-24.81-3.1m36.77-38.65c-5.36-10.16-13.99-20.26-27-25.08l-.94 10.53s-5.46 4.8-.67 10.12c1.9 2.11 2.92 6.28 3.95 10.55m24.66-6.12c-6-.37-18.32.8-24.66 6.12m0 0c1.57 6.53 3.15 13.3 7.91 13.3 7.2 0-3.6-8.84-17.85-11.24-14.25-2.4-51.03 3.54-71.82 9.86-20.78 6.32-39.04 12.71-42.77 19.1-3.63 6.23 13.24 10.92 4.49-14.17m0 0c-.23-.67-.49-1.36-.76-2.08-.32-.85 5.2-14.92 1.33-17.19-3.45-2.02-8.8 7.84-13.85 7.06-3.82-.58-2.8-10.12-2.8-14.12a18.1 18.1 0 0 0-4.6 4.6M36.4 83.52c-7.27 1.58-21.92 8.1-25.27 11.73m0 0a71.55 71.55 0 0 1-.67-9.41c0-5.64.3-12.18 2.22-17.89m-1.55 27.3c1.76 13 7.09 28.27 17.45 28.7 14.12.57 45.43-10.99 64.89-18.45l4.66 12.26 7.58 14.68 46.15-.58c-2.09-13.48-6.89-30.48-7.53-32.67M15.73 61.8c-.98 3-1.08 5.5.19 7.8m-.2-7.8a24.08 24.08 0 0 0-3.03 6.16m0 0a5.43 5.43 0 0 0 1.25 4.22m130.4 27.02c-.9-3.08-3.12-9.95-4.76-12.76",stroke:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m156.89 15.66-2.04 27.96 2.57 28.1c-7.51-3.07-13.32-4.34-27.25-3.36-11.94.83-31.75 3.95-46.23 7.62-16.66 4.27-37.81 11.64-45.21 15.9-.77-4.64-2.92-10.15-2.92-10.15-.07-.7 2.63-8.32 2.73-13.06.08-3.08-.91-4.45-2.33-4.75a3.47 3.47 0 0 0-2.05.35c-.63.32-.86.48-1.38.84-1.34.98-2.38 2.02-3.95 3.34a17.14 17.14 0 0 1-3.04 2.17 4.6 4.6 0 0 1-2.89.63c-.63-.1-1.21-.47-1.71-1.58l-.07-.89c-.5-5.79-2.7-20.12-2.7-34.91 0-7.74 1.61-10.04 2.7-11.59l.13-.18c3.85-5.53 13.67-6.75 23.12-6.96 2.5-.14 5.2-.2 8.1-.17l.11.15H53.15l-.52.07 18.32 25.49-3.62 14.08 10.2 15.98-2.84-16.49 10-11.99-3.5-27.7s8.78-.5 19.47-1.77c10.69-1.28 18.47-1.9 29.42-1.83 1.64.01 3.4.1 5.23.22 9.64.65 18.55 2.56 21.46 4.4l.13.09h-.01Z",fill:"var(--semi-color-primary-light-default)"}),e.createElement("path",{d:"M143 27.91a1.38 1.38 0 0 1 1.77-.85c.5.18.98.41 1.44.71a1.38 1.38 0 0 1-1.53 2.31c-.26-.17-.53-.3-.82-.4a1.38 1.38 0 0 1-.85-1.77Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M140.65 28.12c.21.74-.21 1.5-.95 1.72-.36.1-.73.22-1.11.36a1.38 1.38 0 1 1-.95-2.6c.43-.16.87-.3 1.3-.43.74-.2 1.5.22 1.71.95Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M134.74 30.4c.37.67.14 1.51-.53 1.89l-1.07.62a1.38 1.38 0 1 1-1.41-2.38l1.12-.65a1.38 1.38 0 0 1 1.89.52Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M97.86 31.43h.76a1.38 1.38 0 1 1-.06 2.77h-.52a6.7 6.7 0 0 0-.57.1 1.38 1.38 0 0 1-.64-2.68c.33-.08.64-.14.94-.18l.09-.01Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M147.78 31.75c.73-.23 1.5.19 1.72.92.13.43.25.88.35 1.35a1.38 1.38 0 0 1-2.7.58c-.1-.4-.19-.78-.3-1.13-.22-.73.2-1.5.93-1.72Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M102.27 33.13c.19-.75.94-1.2 1.68-1.01.45.11.89.23 1.3.37a1.38 1.38 0 0 1-.84 2.63c-.36-.11-.73-.22-1.13-.32a1.38 1.38 0 0 1-1-1.67Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M129.3 33.68c.42.64.25 1.5-.4 1.92l-.52.34-.53.36a1.38 1.38 0 0 1-1.53-2.31l.32-.21.21-.14.3-.2.23-.15c.64-.42 1.5-.25 1.92.39Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M108.25 35.22c.36-.67 1.2-.92 1.88-.55a246.5 246.5 0 0 1 1.11.61 1.38 1.38 0 0 1-1.33 2.43l-.5-.28h-.01l-.6-.34a1.38 1.38 0 0 1-.55-1.87Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M92.83 35.77c.76-.01 1.4.6 1.4 1.36.01.16.03.34.07.55a1.38 1.38 0 1 1-2.7.58 5.62 5.62 0 0 1-.13-1.08c-.01-.76.6-1.4 1.36-1.4Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M124 37.2c.31.7 0 1.51-.7 1.82a6.07 6.07 0 0 1-1.44.45 1.38 1.38 0 1 1-.67-2.68l.58-.16c.1-.03.24-.07.42-.15.7-.3 1.51.02 1.82.72Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M113.9 38.14c.15-.75.89-1.22 1.63-1.06.35.07.72.13 1.1.16a1.38 1.38 0 0 1-.26 2.76c-.49-.05-.96-.12-1.41-.22a1.38 1.38 0 0 1-1.07-1.64Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M148.98 37.95c.76-.01 1.4.6 1.4 1.36a38.45 38.45 0 0 1 0 1.42 1.38 1.38 0 0 1-2.77-.08 24.28 24.28 0 0 0 0-1.3c0-.76.6-1.39 1.37-1.4Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M148.6 44.88c.75.16 1.22.9 1.06 1.65-.1.47-.22.94-.34 1.41a1.38 1.38 0 1 1-2.68-.7c.12-.43.22-.87.31-1.3.17-.75.9-1.22 1.65-1.06Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M146.69 51.6c.7.31 1 1.13.7 1.83-.2.44-.41.88-.63 1.31a1.38 1.38 0 0 1-2.48-1.24c.2-.4.4-.8.58-1.2.31-.7 1.13-1.01 1.83-.7Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M41.67 55.45c.07.77-.5 1.44-1.25 1.5-.43.04-.86.1-1.26.19a1.38 1.38 0 1 1-.54-2.72c.5-.1 1.02-.17 1.55-.22.76-.07 1.43.5 1.5 1.25Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M44.58 55.78c.22-.73 1-1.15 1.72-.93l.74.23a1.38 1.38 0 1 1-.9 2.62l-.62-.2a1.38 1.38 0 0 1-.94-1.72Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M91.9 56.9c.05.76-.52 1.42-1.29 1.47-.44.02-.89.06-1.32.11a1.38 1.38 0 0 1-.31-2.75c.48-.05.96-.1 1.45-.13.77-.05 1.42.53 1.47 1.3Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M94.72 56.95c.07-.76.74-1.33 1.5-1.26l1.43.14a1.38 1.38 0 0 1-.32 2.75c-.45-.05-.9-.1-1.35-.13a1.38 1.38 0 0 1-1.26-1.5Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M101.64 57.83c.16-.75.9-1.22 1.64-1.07l1.39.31a1.38 1.38 0 1 1-.62 2.7l-1.34-.3a1.38 1.38 0 0 1-1.07-1.64Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M34.85 57.26c.48.6.39 1.46-.2 1.94-.33.27-.63.55-.9.84a1.38 1.38 0 0 1-2.03-1.89c.36-.39.76-.75 1.18-1.1.6-.48 1.46-.39 1.95.2Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M85 57.9c.29.71-.06 1.51-.78 1.8a15.8 15.8 0 0 0-1.26.54 1.38 1.38 0 1 1-1.15-2.52 71.64 71.64 0 0 1 1.4-.6c.71-.28 1.52.07 1.8.78Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M143.4 57.76c.61.47.72 1.34.26 1.95-.3.39-.62.77-.94 1.14a1.38 1.38 0 0 1-2.09-1.81 24 24 0 0 0 .84-1.03c.47-.6 1.33-.71 1.94-.25Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M108.43 59.46c.22-.74.99-1.15 1.72-.93l1.35.41a1.38 1.38 0 1 1-.82 2.64l-1.32-.4a1.38 1.38 0 0 1-.93-1.72Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M115.08 61.58a1.38 1.38 0 0 1 1.77-.82l1.32.48a1.38 1.38 0 0 1-.97 2.6c-.43-.17-.87-.33-1.3-.48a1.38 1.38 0 0 1-.82-1.78Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M138.67 62.89c.42.64.25 1.5-.4 1.92-.41.27-.85.54-1.29.78a1.38 1.38 0 0 1-1.32-2.43c.37-.2.73-.43 1.1-.66.63-.42 1.49-.25 1.91.39Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M30.5 62.78c.77.07 1.33.74 1.26 1.5l-.03.59.01.75-1.6 1.4a1.38 1.38 0 0 1-1.16-1.32l-.02-.83c0-.28.02-.56.04-.84.07-.76.75-1.32 1.5-1.25Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M121.6 64.07c.3-.7 1.1-1.04 1.8-.75a146.8 146.8 0 0 1 1.26.52 1.38 1.38 0 1 1-.97 2.59 19.62 19.62 0 0 1-1.35-.55c-.7-.3-1.04-1.1-.74-1.81Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M72.11 64.94c.48.6.4 1.47-.2 1.95-.38.3-.74.62-1.09.92A1.38 1.38 0 1 1 69 65.73c.37-.33.76-.66 1.17-.99.59-.48 1.46-.39 1.94.2Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M132.4 65.92c.09.76-.46 1.44-1.22 1.53-.5.05-1.02.08-1.53.09a1.38 1.38 0 1 1-.02-2.77c.42 0 .84-.03 1.25-.07.76-.09 1.44.46 1.53 1.22Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M66.66 69.9c.57.52.6 1.4.09 1.96l-.73.8-.02.02-.16.18-.08.09a1.38 1.38 0 0 1-2.05-1.86l.25-.28.75-.82c.51-.56 1.39-.6 1.95-.09Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M61.6 75.28c.45.61.31 1.48-.3 1.93-.44.31-.88.61-1.36.89a1.38 1.38 0 1 1-1.4-2.4c.4-.22.77-.46 1.12-.72a1.38 1.38 0 0 1 1.94.3Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M37.67 75.97c.42.19.86.37 1.35.53a1.38 1.38 0 0 1-.89 2.62c-.56-.19-1.1-.4-1.6-.63l.72-2.63c.14.01.28.05.42.11Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M55.05 78.57c.12.75-.4 1.46-1.15 1.58-.5.08-1 .15-1.54.2a1.38 1.38 0 1 1-.28-2.75c.49-.05.95-.11 1.39-.18.75-.12 1.46.4 1.58 1.15Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M43.4 78.87c.06-.76.73-1.33 1.49-1.27a38.43 38.43 0 0 0 1.5.1 1.38 1.38 0 1 1-.12 2.76 62.94 62.94 0 0 1-1.6-.1 1.38 1.38 0 0 1-1.27-1.49Z",fill:"var(--semi-color-primary)"}),e.createElement("g",{clipPath:"url(#clip_failure_96_39_65)"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M30.9 46.87a13.45 13.45 0 0 1 9.37-16.53 13.46 13.46 0 0 1 16.52 9.39c2.64 9.56-4.76 29.27-5.14 29.9a.75.75 0 0 1-.99.27c-.64-.34-17.11-13.47-19.76-23.03Zm14.36 1.54a6.1 6.1 0 0 1-3.25-11.75 6.1 6.1 0 0 1 3.25 11.75Z",fill:"var(--semi-color-primary)"})),e.createElement("path",{d:"M102.31 100.69c-2.8 1.55-5.63 2.85-9.36 4.58l1.48 3.92c2.14-.96 6.16-6.03 7.88-8.5Z",fill:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M121 63.04c8.85 2.1 12.43-6.5 13.12-8.77.68-2.27-5.6-11.86-8-11.2l-.42.12-.23.06c-3.1.82-11.15 2.94-12.35 8-1.3 5.46 2.4 10.49 7.88 11.79Z",fill:"#515151"}),e.createElement("path",{d:"M134.5 64.73c-.43.47-1.2.74-2.33.73a12.7 12.7 0 0 1-4.06-.86 31.25 31.25 0 0 1-9.94-6.22c-3.25-2.97-5.97-5.8-7.59-8.42-1.61-2.61-2.05-4.88-.98-6.84a3.7 3.7 0 0 1 2.11-1.86 4.53 4.53 0 0 1 2.9.15c2.16.76 4.57 2.83 6.48 6.02 3.4 5.63 6.89 8.23 9.7 10.33.49.35.95.7 1.38 1.03a7.29 7.29 0 0 1 2.61 3.48c.34 1.1.16 1.97-.28 2.46Z",fill:"white",stroke:"#515151"}),e.createElement("mask",{id:"mask_failure_130_526","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:98,y:44,width:36,height:27},e.createElement("path",{d:"M130.53 62.1c-.5-3.3-9.52-14.75-16.08-15.03l-12.68 4.52 6.47 14.16 17.25 3.07c1.84-1.14 5.43-4.07 5.04-6.72Z",fill:"#C4C4C4"})),e.createElement("g",{mask:"url(#mask_failure_130_526)"},e.createElement("path",{d:"M127.2 63.62a9.74 9.74 0 0 1-13.76.5 9.74 9.74 0 0 1-.32-13.77 9.74 9.74 0 0 1 13.77-.5 9.74 9.74 0 0 1 .32 13.77Z",fill:"white",stroke:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m116.79 47.35-.02.37c2.86.5 8.57 2.59 8.58 6.87 0 5.36-7.44 9.34-14.47 3.46-.34-.28-.66-.53-.95-.74a10.09 10.09 0 0 0 3.17 7.17 10.24 10.24 0 0 0 14.47-.52 10.24 10.24 0 0 0-.34-14.47 10.16 10.16 0 0 0-10.44-2.14Z",fill:"#515151"}),e.createElement("path",{d:"M119.34 55a.79.79 0 1 0-1.1-1.12.79.79 0 0 0 1.1 1.12Z",fill:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.98 50.72c.21-.09.45.01.54.22a7.87 7.87 0 0 0 1.84 2.65.41.41 0 1 1-.55.62 8.67 8.67 0 0 1-2.05-2.95.41.41 0 0 1 .22-.54Z",fill:"#515151"}),e.createElement("path",{d:"M114.85 52.4a.79.79 0 1 0-1.1-1.1.79.79 0 0 0 1.1 1.1Z",fill:"#515151"}),e.createElement("mask",{id:"path-18-inside-1",fill:"white"},e.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)"})),e.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)",fill:"white"}),e.createElement("path",{d:"m128.42 60.04.01-.01a.03.03 0 0 1 .02 0l-4.12 4.37a5.98 5.98 0 0 0 8.45-.25l-4.36-4.11Zm.03 0v.02l-4.37-4.11a5.98 5.98 0 0 0 .25 8.45l4.12-4.37Zm0 .03h-.01a.03.03 0 0 1-.02 0l4.12-4.37a5.98 5.98 0 0 0-8.46.25l4.37 4.12Zm-.03 0v-.03l4.37 4.11a5.98 5.98 0 0 0-.25-8.45l-4.12 4.37Z",fill:"#515151",mask:"url(#path-18-inside-1)"})),e.createElement("path",{d:"M145.63 40.19c1.37-2.75 12.75 2.35 16.14 6.78 3.38 4.43 1.48 10.74-1.9 9.68-6.69-2.12-7.56-6.7-7.94-9.48-1.2-1.85-7.67-4.24-6.3-6.98Z",fill:"white",stroke:"#515151"}),e.createElement("path",{d:"m158.95 41.56 6.64 2.52 1.66 12.47-8.3 1.98-3.47-12.03 3.47-4.94Z",fill:"white"}),e.createElement("path",{d:"M167.3 151.94c5.19 1.66 23.35 35.57 19.05 35.57-13.86 0-34.5.53-71.42.53-15.63 0-17.9-5.16-11.79-22.08a353.23 353.23 0 0 1 6.14-15.76l32.5 1.26c-.43 1.53-.91 3.07-1.38 4.4a26.82 26.82 0 0 1 8.73-1.47c5.27 0 7.04 1.4 11.77 0 2.13-.62 4.8-2.97 6.4-2.45Z",fill:"white",className:""}),e.createElement("path",{d:"M140.4 155.87c.47-1.34.95-2.88 1.38-4.4l-32.5-1.27a353.23 353.23 0 0 0-6.14 15.76c-6.1 16.92-3.84 22.08 11.79 22.08 36.93 0 57.56-.53 71.42-.53 4.3 0-13.86-33.91-19.06-35.57-1.6-.52-4.26 1.83-6.4 2.45-4.72 1.4-6.5 0-11.76 0-3.08 0-6.06.55-8.72 1.48Zm0 0a26.67 26.67 0 0 1-4.44 8.38c-1.7 2.22-3.99 4.43-5.43 4.33-1.44-.1-1.42-3.18 0-5.66 1.97-3.44 6.45-5.87 9.88-7.05Z",stroke:"#1C1F23",className:""}),e.createElement("path",{d:"M149.25 131.7s3.36 19.46-12.34 21.04c-11.53 1.15-40.77-4.55-53.76-7.79 4.72 12.82 9.61 39.86 7 42.16-3.33 2.93-47.55 1.76-55.96 0-8.42-1.75 13.82-11.46 15.45-14.66 2.99-5.84-5.48-21.18-5.75-45.45-.27-24.27 18.18-24.86 34.47-21.64 13.02 2.57 41.63 18.33 52.56 26.86l18.33-.52Z",fill:"white",stroke:"#515151"}),e.createElement("path",{d:"M141.5 153.87c-3.11 2.55-27.72 5-35.58 3.53l2.75-6.8c20.23 2.85 28.08 3.34 33.46 1.16l-.63 2.11Z",fill:"#515151",className:"__web-inspector-hide-shortcut__"}),e.createElement("path",{d:"M141.5 153.87c-3.11 2.55-27.72 5-35.58 3.53l2.75-6.8c20.23 2.85 28.08 3.34 33.46 1.16l-.63 2.11Z",fill:"#515151"}),e.createElement("path",{d:"M126.02 142.7c-3.1-2.99-4.99-7.5-4.16-12.35",stroke:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M130.6 95.65c-9.03-10.98-18.97-19.74-25.5-24.56l1.63-2.22c6.7 4.95 16.81 13.86 26 25.02 9.18 11.16 17.54 24.67 20.59 38.83l-2.7.59c-2.91-13.56-10.97-26.67-20.02-37.66Z",fill:"#515151"}),e.createElement("path",{d:"m149.12 107.09-16.36 13.2 22.27 17.8 8.87-19.19c-.14-3.93-2.34-5.34-5.83-4.66l-3.12-2.5c.08-3.5-2.18-5.64-5.83-4.65Z",fill:"#E6E8EA"}),e.createElement("path",{d:"m148.24 128.62 9.45-14.34-2.91-2.33-10.94 13.07 4.4 3.6Z",stroke:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M143.67 127.98a6.93 6.93 0 1 1-10.82-8.65 6.93 6.93 0 0 1 10.82 8.65Zm12.28 9.82a6.93 6.93 0 1 1-10.82-8.66 6.93 6.93 0 0 1 10.82 8.66Z",fill:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m133.43 123.46 9.21-1.8.32 1.61-9.2 1.81-.33-1.62Z",fill:"white"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m145.5 133.11 9.21-1.8.32 1.62-9.2 1.8-.33-1.62Z",fill:"white"}),e.createElement("defs",null,e.createElement("clipPath",{id:"clip_failure_96_39_65"},e.createElement("rect",{width:44.4004,height:44.4627,transform:"matrix(0.963965 -0.266028 0.266198 0.963918 18.4214 34.6221)",fill:"white"}))))}var N=_;const R=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],P=f("shield-alert",R);const b=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],T=f("wifi-off",b),O="https://bytedance.larkoffice.com/wiki/PeIawT4M4ia9R8kYyLMcjwHknOg",D=({errorMsg:c,errorState:l="unknown"})=>{const t=u(),o=l==="notLoggedIn"||l==="loginExpired",m=l==="noPermission",n=l==="networkProxy",y=o?"projectInfo.error.login.title":m?"projectInfo.error.permission.title":n?"projectInfo.error.network.title":"projectInfo.error.general.title",v=o?"projectInfo.error.login.desc":m?"projectInfo.error.permission.desc":n?"projectInfo.error.network.desc":"projectInfo.error.general.desc",E=o?["projectInfo.error.login.stepLogin","projectInfo.error.login.stepRestart","projectInfo.error.login.stepProxy"]:m?["projectInfo.error.permission.stepCheckAccount","projectInfo.error.permission.stepApply","projectInfo.error.permission.stepRestart"]:n?["projectInfo.error.network.stepCheck","projectInfo.error.network.stepProxy","projectInfo.error.network.stepRestart"]:["projectInfo.error.general.stepCheck","projectInfo.error.general.stepRetry"],p=o?[{label:"projectInfo.error.commandLogin",command:"ttmg login",hint:""},{label:"projectInfo.error.commandRestart",command:"ttmg dev",hint:""},{label:"projectInfo.error.commandProxy",command:"ttmg config set proxy http://127.0.0.1:7890",hint:"projectInfo.error.commandProxyHint"}]:n?[{label:"projectInfo.error.commandProxy",command:"ttmg config set proxy http://127.0.0.1:7890",hint:"projectInfo.error.commandProxyHint"},{label:"projectInfo.error.commandRestart",command:"ttmg dev",hint:""}]:[];return r.jsxs("div",{className:`error-display error-display-${l}`,children:[r.jsx(x,{className:"error-display-banner",type:m||o||n?"warning":"danger",closeIcon:null,description:r.jsxs("div",{className:"error-display-banner-content",children:[r.jsx(i.Text,{strong:!0,children:a(y)}),r.jsx(i.Text,{children:a(v)})]})}),r.jsxs("div",{className:"error-display-panel",children:[r.jsxs("div",{className:"error-display-hero",children:[r.jsx("div",{className:"error-display-hero-illustration",children:m?r.jsx("div",{className:"error-display-permission-mark",children:r.jsx(P,{size:72,strokeWidth:1.8})}):n?r.jsx("div",{className:"error-display-network-mark",children:r.jsx(T,{size:72,strokeWidth:1.8})}):r.jsx(N,{})}),r.jsxs("div",{className:"error-display-hero-copy",children:[r.jsx(i.Title,{heading:4,children:a("projectInfo.error.guideTitle")}),r.jsx(i.Paragraph,{className:"error-display-main-text",children:c})]})]}),r.jsxs("div",{className:"error-display-guide-grid",children:[r.jsxs("section",{className:"error-display-guide-card",children:[r.jsx(i.Text,{strong:!0,children:a("projectInfo.error.stepTitle")}),r.jsx("div",{className:"error-display-step-list",children:E.map((s,j)=>r.jsxs("div",{className:"error-display-step-item",children:[r.jsx("span",{className:"error-display-step-index",children:j+1}),r.jsx(i.Text,{children:a(s)})]},s))}),p.length>0?r.jsx("div",{className:"error-display-command-list",children:p.map(s=>r.jsxs("div",{className:"error-display-command-item",children:[r.jsx(i.Text,{type:"tertiary",children:a(s.label)}),r.jsx("code",{children:s.command}),s.hint?r.jsx(i.Text,{type:"tertiary",className:"error-display-command-hint",children:a(s.hint)}):null]},s.command))}):null]}),r.jsxs("section",{className:"error-display-guide-card",children:[r.jsx(i.Text,{strong:!0,children:a("projectInfo.error.helpTitle")}),r.jsx(i.Paragraph,{className:"error-display-help-text",children:o?a("projectInfo.error.helpLoginDesc"):m?a("projectInfo.error.helpPermissionDesc"):n?a("projectInfo.error.helpNetworkDesc"):a("projectInfo.error.helpGeneralDesc")}),o||n?r.jsxs("div",{className:"error-display-actions",children:[o?r.jsx(M,{theme:"light",onClick:()=>t("/basic_debug_guide"),children:a("basicDebugGuide.entryAction")}):null,r.jsx(Z,{href:O,children:a("projectInfo.error.openProxyDoc")})]}):null]})]})]})]})};export{D as A};
@@ -1 +0,0 @@
1
- import{j as e,i as a,D as _,r as o,f as Oe,u as Be,h as qe,g as Ke,e as He,P as Ve,T as r,d as z,I as V,k as Qe,B as w,l as Je,Q as pe,m as Ze,n as We,b as C}from"./index-BYIujYdU.js";import{C as he,F as me}from"./baseForm-B46NsqNV.js";import{A as Xe}from"./index-XHO2ciZ_.js";import"./col-DYNqjxgf.js";import"./index-Bv29rr8X.js";const Ye="https://bytedance.larkoffice.com/wiki/LkihwQCMfiBpr3khwNuceCBkn3e";function es(m){return String(m).replace(/^\s*\d+\s*[\.、]\s*/,"")}const ss=({engine:m})=>e.jsx("div",{className:"check-code-banner-list",children:[{show:!0,titleKey:"pkgSizeCheckDesc",desc:e.jsxs("div",{children:[e.jsx("span",{children:m==="unity"?a("unityPkgSizeCheckDescTip",{projectSize:"60MB"}):a("commonPkgSizeCheckDescTip",{projectSize:"30MB",mainPackageSize:"4MB",independentPackageSize:"4MB"})}),e.jsx(_,{className:"check-code-banner-doc-link",href:Ye,children:a("uploadGame.packageSizeDoc")})]})},{show:m!=="unity",titleKey:"mandatoryApiCheck",desc:a("mandatoryApiCheckDesc")},{show:!0,titleKey:"configFileCheck",desc:e.jsxs("div",{children:[e.jsx("code",{children:"game.json"}),":",a("gameJsonCheckDesc")]})}].filter(i=>i.show).map((i,h)=>e.jsxs("div",{className:"check-code-banner-section",children:[e.jsxs("div",{className:"check-code-banner-section-title",children:[e.jsx("span",{className:"check-code-banner-section-index",children:h+1}),e.jsx("strong",{children:es(a(i.titleKey))})]}),e.jsx("div",{className:"check-code-banner-section-desc",children:i.desc})]},i.titleKey))}),as=({engine:m})=>e.jsx("div",{className:"check-code-banner",role:"note",children:e.jsx(ss,{engine:m})}),rs=m=>{const{result:i}=m,h=i.every(d=>d?.passed),[l,n]=o.useState(!1);return e.jsxs("section",{className:`check-result-group ${h?"check-result-group-passed":"check-result-group-failed"}`,children:[e.jsxs("div",{className:"check-result-title",children:[e.jsx("span",{className:"check-result-status-dot"}),e.jsx("span",{className:"check-result-title-text",children:h?a("checkConfigPassed"):a("checkConfigFailed")})]}),e.jsxs("div",{className:`check-result-collapse ${l?"check-result-collapse-open":"check-result-collapse-closed"}`,children:[e.jsx(he,{collapseHeight:150,isOpen:l,children:e.jsx("div",{className:"check-result-list",children:i.map((d,k)=>e.jsxs("div",{className:`check-result-item ${d?.passed?"check-result-item-passed":"check-result-item-failed"}`,children:[e.jsx("span",{className:"check-result-tag",children:d?.file}),e.jsx("span",{className:"check-result-message",children:d?.msg}),d?.detail?.link?e.jsx(_,{className:"check-result-link",href:d.detail.link,children:d.detail.text||a("viewDoc")}):null]},k))})}),l?e.jsx("button",{className:"check-result-toggle",type:"button",onClick:()=>n(!1),children:a("closeCheckDetail")}):e.jsx("button",{className:"show-more-text-btn",type:"button",onClick:()=>n(!0),children:a("expandCheckDetail")})]})]})},ls={project:a("gameProject"),main_package:a("gameMainPackage"),independent_package:a("independentPackage")},ts=m=>{const{result:i}=m,h=i.every(l=>l?.passed);return e.jsxs("section",{className:`check-result-group ${h?"check-result-group-passed":"check-result-group-failed"}`,children:[e.jsxs("div",{className:"check-result-title",children:[e.jsx("span",{className:"check-result-status-dot"}),e.jsx("span",{className:"check-result-title-text",children:h?a("checkPkgSizePassed"):a("checkPkgSizeFailed")})]}),e.jsx("div",{className:"check-result-list",children:i.map((l,n)=>e.jsxs("div",{className:`check-result-item ${l?.passed?"check-result-item-passed":"check-result-item-failed"}`,children:[e.jsxs("span",{className:"check-result-tag",children:[ls[l.dimension],l.dimension==="independent_package"?`: ${l.name}`:""]}),e.jsx("span",{className:"check-result-message",children:l?.msg}),l?.detail?.link?e.jsx(_,{className:"check-result-link",href:l.detail.link,children:l.detail.text||a("viewDoc")}):null]},n))})]})},cs=m=>{const{result:i}=m;if(!Array.isArray(i)||i.length===0)return null;const h=i.every(d=>d?.passed),[l,n]=o.useState(!1);return e.jsxs("section",{className:`check-result-group ${h?"check-result-group-passed":"check-result-group-failed"}`,children:[e.jsxs("div",{className:"check-result-title",children:[e.jsx("span",{className:"check-result-status-dot"}),e.jsx("span",{className:"check-result-title-text",children:h?a("checkApiSuccess"):a("checkApiFailed")})]}),e.jsxs("div",{className:`check-result-collapse ${l?"check-result-collapse-open":"check-result-collapse-closed"}`,children:[e.jsx(he,{collapseHeight:150,isOpen:l,children:e.jsx("div",{className:"check-result-list",children:i.map((d,k)=>e.jsxs("div",{className:`check-result-item ${d?.passed?"check-result-item-passed":"check-result-item-failed"}`,children:[e.jsx("span",{className:"check-result-tag",children:d?.name}),e.jsxs("span",{className:"check-result-message",children:[a(d?.name),d?.passed?a("integrated"):a("notIntegrated")]}),d?.detail?.link?e.jsx(_,{className:"check-result-link",href:d.detail.link,children:d.detail.text||a("viewDoc")}):null]},k))})}),l?e.jsx("button",{className:"check-result-toggle",type:"button",onClick:()=>n(!1),children:a("closeCheckDetail")}):e.jsx("button",{className:"show-more-text-btn",type:"button",onClick:()=>n(!0),children:a("expandCheckDetail")})]})]})},ds=m=>{const{result:i}=m;if(!Array.isArray(i)||i.length===0)return null;const h=i.every(l=>l?.passed);return e.jsxs("section",{className:`check-result-group ${h?"check-result-group-passed":"check-result-group-failed"}`,children:[e.jsxs("div",{className:"check-result-title",children:[e.jsx("span",{className:"check-result-status-dot"}),e.jsx("span",{className:"check-result-title-text",children:h?a("checkPerformancePassed"):a("checkPerformanceFailed")})]}),e.jsx("div",{className:"check-result-list",children:i.map((l,n)=>e.jsxs("div",{className:`check-result-item ${l?.passed?"check-result-item-passed":"check-result-item-failed"}`,children:[e.jsx("span",{className:"check-result-tag",children:a("performanceCheck")}),e.jsx("span",{className:"check-result-message",children:l?.msg}),l?.detail?.link?e.jsx(_,{className:"check-result-link",href:l.detail.link,children:l.detail.text||a("viewDoc")}):null]},n))})]})},hs=()=>{const m=Oe(),i=3e3,h=600*1e3,[l,n]=o.useState("idle"),[d,k]=o.useState(""),[A,F]=o.useState(""),[ge,R]=o.useState(""),[G,M]=o.useState([]),[v,b]=o.useState(""),[xe,Q]=o.useState({}),[J,U]=o.useState(!1),[Z,L]=o.useState(""),[je,E]=o.useState(!1),[fe,ke]=o.useState(""),[T,ve]=o.useState([]),[O,W]=o.useState(!1),[P,X]=o.useState(!0),[x,ye]=o.useState(!1),[Y,ee]=o.useState(""),[se,ae]=o.useState(!1),[B,j]=o.useState(""),re=o.useRef(null),{state:{engine:Ne,user:q,gameDetail:y}}=Be(),N=qe(q),K=Ke({errorCode:y?.has_error?y.error_code:void 0,user:q}),I=K==="noPermission",we=I||K==="networkProxy",H=s=>new Promise(t=>setTimeout(t,s)),Se=s=>s?String(s.status??s.cdn_deploy_status??s.live_status??"").toLowerCase():"",le=s=>s?String(s.status??s.cdn_deploy_status??s.live_status??""):"",D=s=>{if(Number(s?.cdn_deploy_status)===2)return"ready";const t=Se(s);return t?["ready","success","succeeded","available"].includes(t)?"ready":t.includes("fail")||t.includes("error")||t.includes("reject")?"failed":"pending":"pending"},te=s=>s==="preview"?4:s==="review"?3:s==="live"?2:1,Ge=s=>{if(!s)return[];const t=[...(s.preview_assets||[]).map(c=>({...c,source:"preview",state:D(c)})),...(s.in_review_assets||[]).map(c=>({...c,source:"review",state:D(c)})),...(s.live_assets||[]).map(c=>({...c,source:"live",state:D(c)})),...(s.assets||[]).map(c=>({...c,source:"other",state:D(c)}))].sort((c,p)=>{const f=Number(p.uploaded_at||0)-Number(c.uploaded_at||0);return f!==0?f:te(p.source)-te(c.source)}),u=new Map;return t.forEach(c=>{const p=String(c.asset_id||"");p&&!u.has(p)&&u.set(p,c)}),Array.from(u.values())},be=s=>s==="ready"?a("uploadGame.record.state.ready"):s==="failed"?a("uploadGame.record.state.failed"):a("uploadGame.record.state.pending"),Te=s=>s==="preview"?a("uploadGame.record.source.preview"):s==="review"?a("uploadGame.record.source.review"):s==="live"?a("uploadGame.record.source.live"):a("uploadGame.record.source.other"),ce=s=>s?new Date(s*1e3).toLocaleString():a("uploadGame.record.metaUnknown"),Pe=s=>{if(!s)return a("uploadGame.record.metaUnknown");const t=s/1024/1024;return`${t>=10?t.toFixed(0):t.toFixed(1)} MB`},de=s=>{if(s.version)return`v${s.version}`;const t=String(s.asset_id||"");return t?`${t.slice(0,6)}...${t.slice(-4)}`:a("uploadGame.record.metaUnknown")},De=s=>`${de(s)} · ${be(s.state)} · ${ce(s.uploaded_at)}`,Ce=s=>s?[s.preview_assets||[],s.in_review_assets||[],s.live_assets||[],s.assets||[]].flat().filter(Boolean):[],ie=async()=>{if(!N||I){M([]),b(""),L(""),U(!1);return}U(!0),L("");try{const s=await C({method:"POST",url:"/game/assets"});if(s?.code!==0||!s?.data)throw new Error(a("uploadGame.record.loadFailed"));const t=Ge(s.data);M(t);const u=(v&&t.some(c=>String(c.asset_id)===String(v))?v:"")||"";b(String(u||""))}catch(s){L(s instanceof Error?s.message:a("uploadGame.record.loadFailed"))}finally{U(!1)}},_e=async(s,t)=>{for(;Date.now()<t;){const u=await C({method:"POST",url:"/game/assets",data:{assetId:s,includePending:!0}}),p=Ce(u?.data).find(f=>String(f.asset_id)===String(s))||null;if(p){const f=le(p);f&&R(f);const ue=D(p);if(ue==="ready")return{ok:!0,asset:p};if(ue==="failed")return{ok:!1,asset:p}}await H(i)}return{ok:!1,asset:null}},oe=async(s,t)=>{for(;Date.now()<t;){const u=await C({method:"POST",url:"/game/asset/preview-url",data:{assetId:s}});if(u?.code===0&&u?.data?.preview_url)return u.data.preview_url;await H(i)}return""},Ae=()=>{X(!0),W(!1),C({url:"/game/check",method:"GET"}).then(s=>{ve(s?.data||[])}).catch(()=>{W(!0)}).finally(()=>{X(!1)})};o.useEffect(()=>{Ae()},[]),o.useEffect(()=>{if(!N||I){M([]),b(""),L(""),U(!1);return}ie()},[N,I]);const Re=T.filter(s=>s?.type==="config"),Ue=T.filter(s=>s?.type==="size"),Le=T.filter(s=>s?.type==="api"),Ee=T.filter(s=>s?.type==="performance"),ne=T.some(s=>!s?.passed),Ie=s=>l==="uploading"?s===0?"current":"pending":l==="checkingAsset"?s===0?"done":s===1?"current":"pending":l==="resolvingPreview"?s<=1?"done":s===2?"current":"pending":"pending",$e=[a("uploadGame.progress.step1"),a("uploadGame.progress.step2"),a("uploadGame.progress.step3")],ze=[a("uploadGame.guide.precheck.title"),a("uploadGame.guide.version.title"),a("uploadGame.guide.preview.title")],S=()=>{ye(s=>!s)},g=G.find(s=>String(s.asset_id)===String(v))||null,$=v&&xe[String(v)]||"";o.useEffect(()=>{if(!g||g.state!=="ready"){E(!1);return}const s=String(g.asset_id);if($){E(!1);return}let t=!1;return(async()=>{E(!0);const c=await oe(s,Date.now()+h);t||(c&&Q(p=>({...p,[s]:c})),E(!1))})(),()=>{t=!0}},[g,$]);const Fe=()=>{if(!Y.trim()){j(a("needDesc"));return}ae(!0),n("uploading"),j(""),k(""),R(""),F(""),C({method:"POST",url:"/game/upload",headers:{"ttmg-game-desc":encodeURIComponent(Y||"--")}}).then(async s=>{if(s?.code===0){await H(500),k(s?.data?.detail||"");const t=s?.data?.asset_id?String(s.data.asset_id):"",u=Date.now()+h;if(!t){n("failure"),j(a("uploadGame.failure.missingAssetId"));return}n("checkingAsset");const c=await _e(t,u);if(!c.ok){n("failure"),j(c.asset?a("uploadGame.failure.assetStatus",{status:le(c.asset)||"-"}):a("uploadGame.failure.assetTimeout"));return}n("resolvingPreview");const p=await oe(t,u);if(!p){n("failure"),j(a("uploadGame.failure.previewTimeout"));return}Q(f=>({...f,[t]:p})),ke(t),b(""),F(p),await ie(),n("success")}else n("idle"),j(s?.error?.StatusMessage||s?.detail||a("uploadPlatformFailed"))}).catch(s=>{n("idle"),j(s?.error?.StatusMessage||s?.response?.detail||s?.message||a("uploadPlatformFailed"))}).finally(()=>{ae(!1)})},Me=()=>{n("idle"),j(""),k(""),R(""),F(""),ee(""),re.current?.formApi?.reset?.()};if(we){const s=y?.has_error?y.error_code:void 0,t=y?.has_error?y.error_msg:"",u=y?.client_key||"";return e.jsx(Xe,{errorMsg:He({errorCode:s,errorMsg:t,clientKey:u,user:q}),errorState:K})}return e.jsxs("div",{className:"upload-game-page",children:[e.jsx(Ve,{title:a("uploadGame.guide.title"),subtitle:a("uploadGame.guide.desc")}),e.jsxs("section",{className:"upload-game-hero",children:[P?e.jsxs("div",{className:"upload-game-summary-panel upload-game-summary-panel-neutral",children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.summary.checkingTitle")}),e.jsx(r.Text,{style:{color:"var(--tt-text-dim)"},children:a("uploadGame.summary.checkingDesc")})]}),e.jsx(z,{size:"small"})]}):null,!P&&O?e.jsxs("div",{className:`upload-game-summary-panel upload-game-summary-panel-warn ${x?"upload-game-summary-panel-expanded":""}`,children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.summary.failedTitle")}),e.jsx(r.Text,{style:{color:"var(--tt-text-dim)"},children:a("uploadGame.checkFetchFailed")})]}),e.jsxs("span",{className:"upload-game-summary-action",role:"button",tabIndex:0,onClick:S,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),S())},children:[e.jsx(V,{style:{transform:x?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}}),e.jsx(r.Text,{children:a(x?"uploadGame.hideDetails":"uploadGame.showDetails")})]})]}):null,N?null:e.jsxs("div",{className:"upload-game-inline-notice",children:[e.jsx("div",{className:"upload-game-inline-notice-icon",children:e.jsx(Qe,{})}),e.jsxs("div",{className:"upload-game-inline-notice-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.loginNoticeTitle")}),e.jsx(r.Text,{children:a("loginToUpload")}),e.jsx("div",{className:"upload-game-inline-notice-action",children:e.jsx(w,{theme:"light",onClick:()=>m("/basic_debug_guide"),children:a("basicDebugGuide.entryAction")})})]})]}),!P&&!O&&ne?e.jsxs("div",{className:`upload-game-summary-panel upload-game-summary-panel-warn ${x?"upload-game-summary-panel-expanded":""}`,children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.issueTitle")}),e.jsx(r.Text,{style:{color:"var(--tt-text-dim)"},children:a("uploadGame.issueDesc")})]}),e.jsxs("span",{className:"upload-game-summary-action",role:"button",tabIndex:0,onClick:S,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),S())},children:[e.jsx(V,{style:{transform:x?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}}),e.jsx(r.Text,{children:a(x?"uploadGame.hideDetails":"uploadGame.showDetails")})]})]}):null,!P&&!O&&!ne?e.jsxs("div",{className:`upload-game-summary-panel upload-game-summary-panel-ok ${x?"upload-game-summary-panel-expanded":""}`,children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.readyTitle")}),e.jsx(r.Text,{style:{color:"var(--tt-text-dim)"},children:a("uploadGame.readyDesc")})]}),e.jsxs("span",{className:"upload-game-summary-action",role:"button",tabIndex:0,onClick:S,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),S())},children:[e.jsx(V,{style:{transform:x?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}}),e.jsx(r.Text,{children:a(x?"uploadGame.hideDetails":"uploadGame.showDetails")})]})]}):null,x?e.jsx("div",{className:"upload-game-inline-detail",children:e.jsx("div",{className:"upload-game-check-body upload-game-detail-card",children:P?e.jsx("div",{className:"upload-game-loading",children:e.jsx(z,{})}):e.jsxs(e.Fragment,{children:[e.jsx(as,{engine:Ne}),e.jsx(ds,{result:Ee}),e.jsx(ts,{result:Ue}),e.jsx(cs,{result:Le}),e.jsx(rs,{result:Re})]})})}):null,e.jsx("div",{className:"upload-game-flow","aria-label":a("uploadGame.guide.title"),children:ze.map((s,t)=>e.jsxs("div",{className:"upload-game-flow-item",children:[e.jsx("span",{className:"upload-game-flow-index",children:t+1}),e.jsx(r.Text,{children:s})]},s))}),e.jsxs("div",{className:`upload-game-module-card upload-game-form-wrapper upload-game-form-wrapper-main ${l==="idle"?"":"upload-game-form-wrapper-stage"}`,children:[l==="idle"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"upload-game-form-head",children:[e.jsx(r.Text,{strong:!0,children:a("gameAssetDescription")}),e.jsx(r.Text,{className:"upload-game-form-head-desc",children:a("uploadGame.uploadDescHint")})]}),e.jsx(me,{ref:re,onChange:({values:s})=>{ee(s?.gameDescription||""),j("")},children:e.jsx(me.TextArea,{noLabel:!0,placeholder:a("gameAssetDescription"),field:"gameDescription",disabled:!N})}),B&&e.jsx(r.Text,{type:"danger",style:{display:"block",marginBottom:8},children:B}),e.jsx(w,{className:"upload-game-upload-action",theme:"solid",type:"primary",disabled:!N||se,loading:se,onClick:Fe,children:a("uploadToPlatform")})]}):null,l==="uploading"||l==="checkingAsset"||l==="resolvingPreview"?e.jsxs("div",{className:"upload-game-progress-card",children:[e.jsxs("div",{className:"upload-game-progress-head",children:[e.jsxs("div",{className:"upload-game-progress-badge",children:[e.jsx("span",{className:"upload-game-progress-badge-dot"}),e.jsx(r.Text,{children:l==="uploading"?a("uploadGame.progress.badgeUploading"):l==="checkingAsset"?a("uploadGame.progress.badgeChecking"):a("uploadGame.progress.badgePreview")})]}),e.jsx("div",{className:"upload-game-progress-bar"})]}),e.jsxs("div",{className:"upload-game-progress-copy",children:[e.jsx(r.Text,{strong:!0,className:"upload-game-stage-title",children:l==="uploading"?a("uploadGame.progress.title"):l==="checkingAsset"?a("uploadGame.progress.assetTitle"):a("uploadGame.progress.previewTitle")}),e.jsx(r.Paragraph,{className:"upload-game-form-head-desc",children:l==="uploading"?a("uploadGame.progress.desc"):l==="checkingAsset"?a("uploadGame.progress.assetDesc",{status:ge||a("uploadGame.progress.statusPending")}):a("uploadGame.progress.previewDesc")}),e.jsx("div",{className:"upload-game-progress-steps",children:$e.map((s,t)=>{const u=Ie(t);return e.jsxs("div",{className:`upload-game-progress-step upload-game-progress-step-${u}`,children:[e.jsx("span",{className:"upload-game-progress-step-dot",children:t+1}),e.jsx("span",{className:"upload-game-progress-step-label",children:s})]},s)})})]})]}):null,l==="success"?e.jsx("div",{className:"upload-game-success-card",children:e.jsxs("div",{className:"upload-game-success-body",children:[e.jsxs("div",{className:"upload-game-success-content",children:[e.jsxs("div",{className:"upload-game-success-heading",children:[e.jsx("span",{className:"upload-game-success-icon","aria-hidden":"true",children:e.jsx(Je,{})}),e.jsx(r.Text,{strong:!0,className:"upload-game-stage-title",children:A?a("uploadGame.success.readyTitle"):a("uploadGame.success.title")})]}),e.jsx(r.Paragraph,{className:"upload-game-form-head-desc",children:A?a("uploadGame.success.desc"):a("uploadGame.success.pendingDesc")}),e.jsxs("div",{className:"upload-game-success-actions",children:[d?e.jsx(w,{theme:"light",onClick:()=>window.open(d,"_blank"),children:a("viewOnPlatform")}):null,e.jsx(w,{theme:"solid",type:"primary",onClick:Me,children:a("uploadGame.success.uploadAnother")})]})]}),e.jsx("div",{className:"upload-game-success-qr",children:A?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"upload-game-success-qr-box",children:e.jsx(pe,{value:A,size:156})}),e.jsx(r.Text,{className:"upload-game-success-qr-caption",children:a("uploadGame.success.qrHint")})]}):e.jsx("div",{className:"upload-game-success-qr-placeholder",children:e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.success.noQr")})})})]})}):null,l==="failure"?e.jsxs("div",{className:"upload-game-failure-card",children:[e.jsx(r.Text,{strong:!0,className:"upload-game-stage-title",children:a("uploadGame.failure.title")}),e.jsx(r.Paragraph,{className:"upload-game-form-head-desc",children:B||a("uploadPlatformFailed")}),e.jsxs("div",{className:"upload-game-success-actions",children:[d?e.jsx(w,{theme:"light",onClick:()=>window.open(d,"_blank"),children:a("viewOnPlatform")}):null,e.jsx(w,{theme:"solid",type:"primary",onClick:()=>{n("idle"),j(""),k(""),R("")},children:a("uploadGame.failure.retry")})]})]}):null]}),N?e.jsxs("div",{className:"upload-game-module-card upload-game-records",children:[e.jsx("div",{className:"upload-game-records-head",children:e.jsxs("div",{className:"upload-game-records-copy",children:[e.jsx(r.Text,{children:a("uploadGame.record.title")}),e.jsx(r.Text,{className:"upload-game-form-head-desc",children:a("uploadGame.record.desc")})]})}),Z?e.jsx(Ze,{type:"warning",description:Z,style:{marginTop:12}}):null,J&&!G.length?e.jsxs("div",{className:"upload-game-records-empty",children:[e.jsx(z,{size:"small"}),e.jsx(r.Text,{children:a("uploadGame.record.loading")})]}):null,!J&&!G.length?e.jsx("div",{className:"upload-game-records-empty",children:e.jsx(r.Text,{children:a("uploadGame.record.empty")})}):null,G.length?e.jsxs("div",{className:"upload-game-records-layout",children:[e.jsx("div",{className:"upload-game-records-toolbar",children:e.jsx(We,{value:v,className:"upload-game-record-select",placeholder:a("uploadGame.record.selectPlaceholder"),allowClear:!0,optionList:G.slice(0,12).map(s=>({value:String(s.asset_id),label:De(s)})),onChange:s=>b(String(s||""))})}),g?e.jsxs("div",{className:"upload-game-record-detail",children:[e.jsx("div",{className:"upload-game-record-detail-head",children:e.jsx("div",{className:"upload-game-record-detail-copy",children:e.jsx(r.Text,{strong:!0,children:a("uploadGame.record.detailTitle",{version:de(g)})})})}),e.jsxs("div",{className:"upload-game-record-detail-body",children:[e.jsxs("div",{className:"upload-game-record-detail-main",children:[e.jsxs("div",{className:"upload-game-record-detail-meta",children:[e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaUploadedAt")}),e.jsx(r.Text,{children:ce(g.uploaded_at)})]}),e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaAssetId")}),e.jsx(r.Text,{children:g.asset_id||a("uploadGame.record.metaUnknown")})]}),e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaSource")}),e.jsx(r.Text,{children:Te(g.source)})]}),e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaSize")}),e.jsx(r.Text,{children:Pe(g.size)})]})]}),e.jsxs("div",{className:"upload-game-record-detail-note",children:[e.jsx(r.Text,{type:"tertiary",children:a("gameAssetDescription")}),e.jsx(r.Paragraph,{children:g.desc||a("uploadGame.record.noDesc")})]})]}),e.jsx("div",{className:"upload-game-record-preview",children:g.state==="ready"?$?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"upload-game-record-qr-box",children:e.jsx(pe,{value:$,size:132})}),e.jsx(r.Text,{className:"upload-game-success-qr-caption",children:a("uploadGame.record.previewHint")})]}):e.jsx("div",{className:"upload-game-record-qr-box upload-game-record-qr-box-muted",children:je?e.jsxs("div",{className:"upload-game-record-preview-loading",children:[e.jsx(z,{size:"small"}),e.jsx(r.Text,{children:a("uploadGame.record.previewLoading")})]}):e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.previewUnavailable")})}):e.jsx("div",{className:"upload-game-record-qr-box upload-game-record-qr-box-muted",children:e.jsx(r.Text,{type:"tertiary",children:g.state==="failed"?a("uploadGame.record.failedDesc"):a("uploadGame.record.pendingDesc")})})})]}),String(g.asset_id)===String(fe)&&d?e.jsx("div",{className:"upload-game-success-actions",children:e.jsx(w,{theme:"light",onClick:()=>window.open(d,"_blank"),children:a("viewOnPlatform")})}):null]}):null]}):null]}):null]})]})};export{hs as CheckCode};