@ttmg/cli 0.4.4 → 0.4.6-vibe-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +285 -0
- package/dist/index.js +9004 -2331
- package/dist/index.js.map +1 -1
- package/dist/package.json +8 -2
- package/dist/public/assets/Card-BAsimNoh.js +1 -0
- package/dist/public/assets/Detail-rVxbEDgh.js +1 -0
- package/dist/public/assets/Detail-rVxbEDgh.js.br +0 -0
- package/dist/public/assets/MonetizationMode-B20TAE9o.js +1 -0
- package/dist/public/assets/MonetizationModeSummary-CnHqXyco.js +1 -0
- package/dist/public/assets/{SectionHeader-Caf8qPRH.js → SectionHeader-Cn3FnOqh.js} +1 -1
- package/dist/public/assets/{baseForm-DbKDw3IN.js → baseForm-kBTxn8h8.js} +1 -1
- package/dist/public/assets/baseForm-kBTxn8h8.js.br +0 -0
- package/dist/public/assets/{col-DlUD2IyX.js → col-VN3Ivd-x.js} +1 -1
- package/dist/public/assets/{compass-D8bLLLSR.js → compass-BabZVjAl.js} +1 -1
- package/dist/public/assets/{index-BvRI6rq9.js → index--6iHQzho.js} +1 -1
- package/dist/public/assets/{index-Cf7bng8i.js → index-1WjGwqIV.js} +1 -1
- package/dist/public/assets/{index-DXXBlk9b.js → index-BFFsJ47B.js} +1 -1
- package/dist/public/assets/{index-BeG7a_8l.js → index-Ba-JWe4X.js} +1 -1
- package/dist/public/assets/{index-CPfhNCcU.js → index-BjQlJrX7.js} +1 -1
- package/dist/public/assets/index-Bjn0ctEd.js +21 -0
- package/dist/public/assets/index-Bjn0ctEd.js.br +0 -0
- package/dist/public/assets/index-BnOeYQAd.js +1 -0
- package/dist/public/assets/index-BxokHznc.js +1 -0
- package/dist/public/assets/index-BxokHznc.js.br +0 -0
- package/dist/public/assets/{index-BlupVk90.js → index-BxsB5E3u.js} +1 -1
- package/dist/public/assets/{index-Ggo1rV6S.js → index-C83QHLmD.js} +1 -1
- package/dist/public/assets/{index-BLmfGH4o.js → index-CUuX90R9.js} +1 -1
- package/dist/public/assets/{index-yR_bPMcB.css → index-Ckp_mJJy.css} +1 -1
- package/dist/public/assets/index-Ckp_mJJy.css.br +0 -0
- package/dist/public/assets/{index-DenoanNX.js → index-Cl0_vMWE.js} +1 -1
- package/dist/public/assets/index-Cl0_vMWE.js.br +0 -0
- package/dist/public/assets/{index-B0fmVxbN.js → index-Clq0hTDI.js} +1 -1
- package/dist/public/assets/{index-D9-bb2oL.js → index-CpM8t743.js} +1 -1
- package/dist/public/assets/index-CzXMNZL3.js +1 -0
- package/dist/public/assets/{index-eoDMPIdb.js → index-DHdJsD10.js} +1 -1
- package/dist/public/assets/index-DHdJsD10.js.br +0 -0
- package/dist/public/assets/{index-BV532pMK.js → index-DIcz5ciL.js} +1 -1
- package/dist/public/assets/index-DIcz5ciL.js.br +0 -0
- package/dist/public/assets/{index-DF6WNroB.js → index-DK4IvdRl.js} +1 -1
- package/dist/public/assets/{index-BR6l0C9y.js → index-DXDZCuG4.js} +1 -1
- package/dist/public/assets/{index-CTkNRReQ.js → index-DnnfZ7H_.js} +1 -1
- package/dist/public/assets/index-Dohibgdp.js +1 -0
- package/dist/public/assets/{index-D0iKOimx.js → index-DulANwbq.js} +1 -1
- package/dist/public/assets/index-O_L1tU2b.js +1 -0
- package/dist/public/assets/index-O_L1tU2b.js.br +0 -0
- package/dist/public/assets/index-QNLvejKK.js +1 -0
- package/dist/public/assets/{index-D2zLbzBh.css → index-WyNc-BTG.css} +1 -1
- package/dist/public/assets/index-WyNc-BTG.css.br +0 -0
- package/dist/public/assets/index-aSl6Wdrp.js +1 -0
- package/dist/public/assets/index-aSl6Wdrp.js.br +0 -0
- package/dist/public/assets/{index-y9pNuDMs.js → index-odEI7YQF.js} +1 -1
- package/dist/public/assets/index-odEI7YQF.js.br +0 -0
- package/dist/public/assets/{layers-BQ_Tw855.js → layers-B4zhx14P.js} +1 -1
- package/dist/public/assets/{list-checks-9HC7bocq.js → list-checks-Br6imjXC.js} +1 -1
- package/dist/public/assets/{sparkles-BLHMCsIj.js → sparkles-BjIkcbAi.js} +1 -1
- package/dist/public/assets/{triangle-alert-BprMFvuT.js → triangle-alert-CgKAc3w5.js} +1 -1
- package/dist/public/assets/{zap-Bj4LJ903.js → zap-DFHw5liD.js} +1 -1
- package/dist/public/index.html +2 -2
- package/dist/scripts/run-ts-test.js +41 -0
- package/dist/scripts/verify-dist-version.js +41 -0
- package/package.json +8 -2
- package/dist/public/assets/Detail-CTD5OeB0.js +0 -1
- package/dist/public/assets/Detail-CTD5OeB0.js.br +0 -0
- package/dist/public/assets/MonetizationMode-DZmggvdZ.js +0 -1
- package/dist/public/assets/MonetizationModeSummary-7jDe4Q_6.js +0 -1
- package/dist/public/assets/Tag-DSB9Uput.js +0 -1
- package/dist/public/assets/baseForm-DbKDw3IN.js.br +0 -0
- package/dist/public/assets/index-B1gECabp.js +0 -1
- package/dist/public/assets/index-B1gECabp.js.br +0 -0
- package/dist/public/assets/index-B3TFdXWD.js +0 -1
- package/dist/public/assets/index-BV532pMK.js.br +0 -0
- package/dist/public/assets/index-BzbUu6Wd.js +0 -1
- package/dist/public/assets/index-COLHKvH0.js +0 -1
- package/dist/public/assets/index-D2zLbzBh.css.br +0 -0
- package/dist/public/assets/index-DenoanNX.js.br +0 -0
- package/dist/public/assets/index-DnsrxgPV.js +0 -1
- package/dist/public/assets/index-DnsrxgPV.js.br +0 -0
- package/dist/public/assets/index-Do3D3DDt.js +0 -1
- package/dist/public/assets/index-Do3D3DDt.js.br +0 -0
- package/dist/public/assets/index-DyR-YyZt.js +0 -1
- package/dist/public/assets/index-OPQyWrBC.js +0 -21
- package/dist/public/assets/index-OPQyWrBC.js.br +0 -0
- package/dist/public/assets/index-eoDMPIdb.js.br +0 -0
- package/dist/public/assets/index-y9pNuDMs.js.br +0 -0
- package/dist/public/assets/index-yR_bPMcB.css.br +0 -0
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as K,y as O,R as l,M as F,l as L,V as B,H as s,r as b,ad as I,c as V,j as k,i as w,a5 as A}from"./index-OPQyWrBC.js";import{I as q,C as G,R as H}from"./col-DlUD2IyX.js";const S={PREFIX:`${K}-steps`,ITEM:`${K}-steps-item`};var P;(function(t){t.small="large",t.default="extra-large"})(P||(P={}));const z=t=>{const{prefixCls:e,className:a,size:n,title:r,description:i,status:p,style:o,active:g,done:d,icon:m,stepNumber:v,onClick:$,onChange:f,onKeyDown:h}=t,u=()=>{let c,E;if("icon"in t)l.isValidElement(m)&&(c=m);else if("status"in t)switch(p){case"error":c=l.createElement(B,{size:P[n]});break;case"wait":c=l.createElement("span",{className:`${e}-number-icon`},v);break;case"process":c=l.createElement("span",{className:`${e}-number-icon`},v),E=!0;break;case"finish":c=l.createElement(L,{size:P[n]});break;case"warning":c=l.createElement(F,{size:P[n]});break;default:c=null;break}const W=O({[`${e}-icon`]:!0,[`${e}-custom-icon`]:"icon"in t,[`${e}-icon-process`]:E});return c?l.createElement("span",{className:W},c):null},C=O(e,`${e}-${p}`,{[`${e}-active`]:g,[`${e}-done`]:d,[`${e}-hover`]:f||t.onClick,[`${e}-clickable`]:f||$,[`${e}-${p}-hover`]:f||t.onClick},a),y=c=>{$?.(c),f?.()},N=c=>{c.key==="Enter"&&(h?.(c),f?.())};return l.createElement("div",{role:t.role,"aria-label":t["aria-label"],tabIndex:0,"aria-current":"step",className:C,style:o,onClick:c=>y(c),onKeyDown:N},l.createElement("div",{className:`${e}-container`},l.createElement("div",{className:`${e}-left`},u()),l.createElement("div",{className:`${e}-content`},l.createElement("div",{className:`${e}-title`},l.createElement("div",{className:`${e}-title-text`},r)),i&&l.createElement("div",{className:`${e}-description`},i))))};z.propTypes={prefixCls:s.string,description:s.node,icon:s.node,status:s.oneOf(["wait","process","finish","error","warning"]),title:s.node,className:s.string,style:s.object,onClick:s.func,active:s.bool,done:s.bool};z.defaultProps={prefixCls:S.ITEM,active:!1,done:!1,status:"wait",className:""};const _=t=>{const{prefixCls:e,className:a,title:n,description:r,status:i,style:p,onClick:o,icon:g,onChange:d,stepNumber:m,onKeyDown:v}=t,$=()=>{let u,C;if("icon"in t)u=g;else if("status"in t)switch(i){case"error":u=l.createElement(B,{size:"extra-large"});break;case"wait":u=m;break;case"process":u=m,C=!0;break;case"finish":u=l.createElement(L,{size:"extra-large"});break;case"warning":u=l.createElement(F,{size:"extra-large"});break;default:u=null;break}const y=O({[`${e}-left`]:!0,[`${e}-icon`]:"icon"in t,[`${e}-plain`]:!("icon"in t),[`${e}-icon-process`]:C,[`${e}-hover`]:d||o});return u?l.createElement("div",{className:y},u):null},f=u=>{o?.(u),d?.()},h=u=>{u.key==="Enter"&&(v?.(u),d?.())};return l.createElement("div",{role:t.role,"aria-label":t["aria-label"],"aria-current":"step",tabIndex:0,className:O({[e]:!0,[`${e}-${i}`]:!!i,[`${e}-${i}-hover`]:!!i&&(d||o),[`${e}-${i}-active`]:!!i&&(d||o),[`${e}-clickable`]:d||o},a),style:p,onClick:u=>{f(u)},onKeyDown:h},$(),l.createElement("div",{className:`${e}-content`},l.createElement("div",{className:`${e}-title`,title:typeof n=="string"?n:null},l.createElement("span",{className:`${e}-title-text`},n)),l.createElement("div",{className:`${e}-description`,title:typeof r=="string"?r:null},r)))};_.propTypes={prefixCls:s.string,description:s.node,icon:s.node,status:s.oneOf(["wait","process","finish","error","warning"]),title:s.node,className:s.string,style:s.object,onClick:s.func};_.defaultProps={prefixCls:S.ITEM,status:"wait",className:""};const T=t=>{const{prefixCls:e,className:a,title:n,style:r,active:i,index:p,total:o,onClick:g,onKeyDown:d,onChange:m}=t,v=O(e,{[`${e}-active`]:i},a),$=h=>{g?.(h),m?.()},f=h=>{h.key==="Enter"&&(d?.(h),m?.())};return l.createElement("div",{role:t.role,"aria-label":t["aria-label"],"aria-current":"step",tabIndex:0,className:v,style:r,onClick:h=>$(h),onKeyDown:f},l.createElement("div",{className:`${e}-container`},l.createElement("div",{className:`${e}-content`},l.createElement("div",{className:`${e}-title`},n)),p!==o-1&&l.createElement("div",{className:`${e}-icon`},l.createElement(q,{size:"small"}))))};T.propTypes={prefixCls:s.string,title:s.node,className:s.string,style:s.object,onClick:s.func,active:s.bool};T.defaultProps={prefixCls:S.ITEM,active:!1,className:""};const X=l.createContext(null),U=t=>{const{type:e}=b.useContext(X);return(()=>{switch(e){case"fill":return l.createElement(_,Object.assign({},t));case"basic":return l.createElement(z,Object.assign({},t));case"nav":return l.createElement(T,Object.assign({},t));default:return null}})()};var J=function(t,e){var a={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(a[n[r]]=t[n[r]]);return a};const R=t=>{const{current:e,status:a,children:n,prefixCls:r,initial:i,direction:p,className:o,style:g,onChange:d}=t,m=J(t,["current","status","children","prefixCls","initial","direction","className","style","onChange"]),v=b.useMemo(()=>{const f=b.Children.toArray(n).filter(C=>b.isValidElement(C)),h=p==="vertical"?null:{width:`${100/f.length}%`};return b.Children.map(f,(C,y)=>{if(!C)return null;const N=i+y,c=Object.assign({stepNumber:`${N+1}`,direction:p},C.props);return a==="error"&&y===e-1&&(c.className=`${r}-next-error`),C.props.status||(N===e?c.status=a:N<e?c.status="finish":c.status="wait"),c.onChange=d?()=>{y!==e&&d(y+i)}:void 0,l.createElement(G,{style:h},b.cloneElement(C,Object.assign({},c)))})},[n,i,r,p,a,e,d]),$=O(o,{[r]:!0,[`${r}-${p}`]:!0});return l.createElement("div",Object.assign({className:$,style:g,"aria-label":t["aria-label"]},I(m)),l.createElement(H,{type:"flex",justify:"start"},v))};R.propTypes={prefixCls:s.string,className:s.string,style:s.object,current:s.number,initial:s.number,direction:s.oneOf(["horizontal","vertical"]),status:s.oneOf(["wait","process","finish","error","warning"])};R.defaultProps={prefixCls:S.PREFIX,current:0,direction:"horizontal",initial:0,status:"process"};var Q=function(t,e){var a={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(a[n[r]]=t[n[r]]);return a};const M=t=>{const{size:e,current:a,status:n,children:r,prefixCls:i,initial:p,direction:o,className:g,style:d,hasLine:m,onChange:v}=t,$=Q(t,["size","current","status","children","prefixCls","initial","direction","className","style","hasLine","onChange"]),f=b.useMemo(()=>{const u=b.Children.toArray(r).filter(y=>b.isValidElement(y));return b.Children.map(u,(y,N)=>{if(!y)return null;const c=p+N,E=Object.assign({stepNumber:`${c+1}`,size:e},y.props);return n==="error"&&N===a-1&&(E.className=`${i}-next-error`),y.props.status||(c===a?E.status=n:c<a?E.status="finish":E.status="wait"),E.active=c===a,E.done=c<a,E.onChange=v?()=>{N!==a&&v(N+p)}:void 0,b.cloneElement(y,Object.assign({},E))})},[r,p,i,o,n,a,e,v]),h=O(g,{[`${i}-basic`]:!0,[`${i}-${o}`]:!0,[`${i}-${e}`]:e!=="default",[`${i}-hasline`]:m});return l.createElement("div",Object.assign({"aria-label":t["aria-label"],className:h,style:d},I($)),f)};M.propTypes={prefixCls:s.string,className:s.string,style:s.object,current:s.number,initial:s.number,direction:s.oneOf(["horizontal","vertical"]),status:s.oneOf(["wait","process","finish","error","warning"]),hasLine:s.bool};M.defaultProps={prefixCls:S.PREFIX,current:0,direction:"horizontal",size:"",initial:0,hasLine:!0,status:"process"};var Y=function(t,e){var a={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(a[n[r]]=t[n[r]]);return a};const D=t=>{const{size:e,current:a,initial:n,children:r,prefixCls:i,className:p,style:o,onChange:g}=t,d=Y(t,["size","current","initial","children","prefixCls","className","style","onChange"]),m=b.useMemo(()=>{const $=b.Children.toArray(r).filter(u=>b.isValidElement(u)),f=$.length;return b.Children.map($,(u,C)=>{if(!u)return null;const y=Object.assign({index:C,total:f},u.props);return y.active=C===a,y.onChange=g?()=>{C!==a&&g(C+n)}:void 0,b.cloneElement(u,Object.assign({},y))})},[r,i,a,e,n,g]),v=O(p,{[`${i}-nav`]:!0,[`${i}-${e}`]:e!=="default"});return l.createElement("div",Object.assign({"aria-label":t["aria-label"],className:v,style:o},I(d)),m)};D.propTypes={prefixCls:s.string,className:s.string,style:s.object,current:s.number,initial:s.number,size:s.oneOf(["small","default"])};D.defaultProps={prefixCls:S.PREFIX,current:0,direction:"horizontal",size:"default",initial:0,status:"process"};var Z=function(t,e){var a={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(a[n[r]]=t[n[r]]);return a};class j extends b.Component{renderComponent(){const e=this.props,{type:a}=e,n=Z(e,["type"]);switch(a){case"fill":return l.createElement(R,Object.assign({},n));case"basic":return l.createElement(M,Object.assign({},n));case"nav":return l.createElement(D,Object.assign({},n));default:return null}}render(){const{type:e}=this.props;return l.createElement(X.Provider,{value:{type:e}},this.renderComponent())}}j.Step=U;j.propTypes={onChange:s.func,type:s.oneOf(["fill","basic","nav"]),size:s.oneOf(["small","default"])};j.defaultProps={type:"fill",size:"default"};const ee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],se=V("circle-alert",ee);const te=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ae=V("circle-check",te),x={prepare:{number:0,title:w("splitPrepare"),description:w("splitPrepare.desc")},collect:{number:1,title:w("splitCollect"),description:w("splitCollect.desc")},split:{number:2,title:w("splitCode"),description:w("splitCode.desc")},rollback:{number:3,title:w("rollback"),description:""}},le=({stage:t})=>k.jsxs(j,{type:"basic",current:x[t].number,className:"tt-wasm-steps",children:[k.jsx(j.Step,{title:x.prepare.title,description:x.prepare.description}),k.jsx(j.Step,{title:x.collect.title,description:x.collect.description}),k.jsx(j.Step,{title:x.split.title,description:x.split.description})]}),ie=()=>{const[t,e]=b.useState({kind:"idle"}),a=b.useRef(null);if(b.useEffect(()=>{const o=()=>{a.current!==null&&(window.clearTimeout(a.current),a.current=null)},g=({status:d,msg:m,progress:v})=>{switch(d){case"start":o(),e({kind:"uploading",progress:0});break;case"process":o(),e({kind:"uploading",progress:Math.max(0,Math.min(1,v??0))});break;case"success":o(),e({kind:"success"}),a.current=window.setTimeout(()=>{e({kind:"idle"}),a.current=null},2500);break;case"restart":o(),e({kind:"restart"});break;case"error":o(),e({kind:"error",msg:m});break}};return A.on("uploadGame",g),()=>{A.off("uploadGame",g),o()}},[]),t.kind==="idle")return null;let n="",r="",i="0%",p="uploading";switch(t.kind){case"uploading":{const o=Math.round(t.progress*100);n=w("uploadStart"),r=`${o}%`,i=`${o}%`,p="uploading";break}case"success":n=w("uploadSuccess"),r="100%",i="100%",p="success";break;case"restart":n=w("uploadStart"),r="",i="0%",p="uploading";break;case"error":n=w("uploadError"),t.msg&&(n=`${n}: ${t.msg}`),r="",i="100%",p="error";break}return k.jsxs("div",{className:`tt-wasm-upload-progress tt-wasm-upload-progress--${p}`,role:"status","aria-live":"polite",title:n,children:[k.jsxs("div",{className:"tt-wasm-upload-progress-meta",children:[k.jsx("span",{className:"tt-wasm-upload-progress-label",children:n}),r&&k.jsx("span",{className:"tt-wasm-upload-progress-percent",children:r})]}),k.jsx("div",{className:"tt-wasm-upload-progress-track",children:k.jsx("div",{className:"tt-wasm-upload-progress-fill",style:{width:i}})})]})};export{ae as C,ie as U,le as W,se as a};
|
|
1
|
+
import{t as K,z as k,R as l,O as F,m as L,W as B,J as s,r as b,ae as z,c as X,j as O,i as w,a6 as A}from"./index-Bjn0ctEd.js";import{I as G,C as U,R as q}from"./col-VN3Ivd-x.js";const S={PREFIX:`${K}-steps`,ITEM:`${K}-steps-item`};var P;(function(t){t.small="large",t.default="extra-large"})(P||(P={}));const I=t=>{const{prefixCls:e,className:a,size:n,title:r,description:i,status:p,style:o,active:g,done:d,icon:m,stepNumber:v,onClick:$,onChange:f,onKeyDown:h}=t,u=()=>{let c,E;if("icon"in t)l.isValidElement(m)&&(c=m);else if("status"in t)switch(p){case"error":c=l.createElement(B,{size:P[n]});break;case"wait":c=l.createElement("span",{className:`${e}-number-icon`},v);break;case"process":c=l.createElement("span",{className:`${e}-number-icon`},v),E=!0;break;case"finish":c=l.createElement(L,{size:P[n]});break;case"warning":c=l.createElement(F,{size:P[n]});break;default:c=null;break}const W=k({[`${e}-icon`]:!0,[`${e}-custom-icon`]:"icon"in t,[`${e}-icon-process`]:E});return c?l.createElement("span",{className:W},c):null},C=k(e,`${e}-${p}`,{[`${e}-active`]:g,[`${e}-done`]:d,[`${e}-hover`]:f||t.onClick,[`${e}-clickable`]:f||$,[`${e}-${p}-hover`]:f||t.onClick},a),y=c=>{$?.(c),f?.()},N=c=>{c.key==="Enter"&&(h?.(c),f?.())};return l.createElement("div",{role:t.role,"aria-label":t["aria-label"],tabIndex:0,"aria-current":"step",className:C,style:o,onClick:c=>y(c),onKeyDown:N},l.createElement("div",{className:`${e}-container`},l.createElement("div",{className:`${e}-left`},u()),l.createElement("div",{className:`${e}-content`},l.createElement("div",{className:`${e}-title`},l.createElement("div",{className:`${e}-title-text`},r)),i&&l.createElement("div",{className:`${e}-description`},i))))};I.propTypes={prefixCls:s.string,description:s.node,icon:s.node,status:s.oneOf(["wait","process","finish","error","warning"]),title:s.node,className:s.string,style:s.object,onClick:s.func,active:s.bool,done:s.bool};I.defaultProps={prefixCls:S.ITEM,active:!1,done:!1,status:"wait",className:""};const _=t=>{const{prefixCls:e,className:a,title:n,description:r,status:i,style:p,onClick:o,icon:g,onChange:d,stepNumber:m,onKeyDown:v}=t,$=()=>{let u,C;if("icon"in t)u=g;else if("status"in t)switch(i){case"error":u=l.createElement(B,{size:"extra-large"});break;case"wait":u=m;break;case"process":u=m,C=!0;break;case"finish":u=l.createElement(L,{size:"extra-large"});break;case"warning":u=l.createElement(F,{size:"extra-large"});break;default:u=null;break}const y=k({[`${e}-left`]:!0,[`${e}-icon`]:"icon"in t,[`${e}-plain`]:!("icon"in t),[`${e}-icon-process`]:C,[`${e}-hover`]:d||o});return u?l.createElement("div",{className:y},u):null},f=u=>{o?.(u),d?.()},h=u=>{u.key==="Enter"&&(v?.(u),d?.())};return l.createElement("div",{role:t.role,"aria-label":t["aria-label"],"aria-current":"step",tabIndex:0,className:k({[e]:!0,[`${e}-${i}`]:!!i,[`${e}-${i}-hover`]:!!i&&(d||o),[`${e}-${i}-active`]:!!i&&(d||o),[`${e}-clickable`]:d||o},a),style:p,onClick:u=>{f(u)},onKeyDown:h},$(),l.createElement("div",{className:`${e}-content`},l.createElement("div",{className:`${e}-title`,title:typeof n=="string"?n:null},l.createElement("span",{className:`${e}-title-text`},n)),l.createElement("div",{className:`${e}-description`,title:typeof r=="string"?r:null},r)))};_.propTypes={prefixCls:s.string,description:s.node,icon:s.node,status:s.oneOf(["wait","process","finish","error","warning"]),title:s.node,className:s.string,style:s.object,onClick:s.func};_.defaultProps={prefixCls:S.ITEM,status:"wait",className:""};const T=t=>{const{prefixCls:e,className:a,title:n,style:r,active:i,index:p,total:o,onClick:g,onKeyDown:d,onChange:m}=t,v=k(e,{[`${e}-active`]:i},a),$=h=>{g?.(h),m?.()},f=h=>{h.key==="Enter"&&(d?.(h),m?.())};return l.createElement("div",{role:t.role,"aria-label":t["aria-label"],"aria-current":"step",tabIndex:0,className:v,style:r,onClick:h=>$(h),onKeyDown:f},l.createElement("div",{className:`${e}-container`},l.createElement("div",{className:`${e}-content`},l.createElement("div",{className:`${e}-title`},n)),p!==o-1&&l.createElement("div",{className:`${e}-icon`},l.createElement(G,{size:"small"}))))};T.propTypes={prefixCls:s.string,title:s.node,className:s.string,style:s.object,onClick:s.func,active:s.bool};T.defaultProps={prefixCls:S.ITEM,active:!1,className:""};const V=l.createContext(null),H=t=>{const{type:e}=b.useContext(V);return(()=>{switch(e){case"fill":return l.createElement(_,Object.assign({},t));case"basic":return l.createElement(I,Object.assign({},t));case"nav":return l.createElement(T,Object.assign({},t));default:return null}})()};var J=function(t,e){var a={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(a[n[r]]=t[n[r]]);return a};const R=t=>{const{current:e,status:a,children:n,prefixCls:r,initial:i,direction:p,className:o,style:g,onChange:d}=t,m=J(t,["current","status","children","prefixCls","initial","direction","className","style","onChange"]),v=b.useMemo(()=>{const f=b.Children.toArray(n).filter(C=>b.isValidElement(C)),h=p==="vertical"?null:{width:`${100/f.length}%`};return b.Children.map(f,(C,y)=>{if(!C)return null;const N=i+y,c=Object.assign({stepNumber:`${N+1}`,direction:p},C.props);return a==="error"&&y===e-1&&(c.className=`${r}-next-error`),C.props.status||(N===e?c.status=a:N<e?c.status="finish":c.status="wait"),c.onChange=d?()=>{y!==e&&d(y+i)}:void 0,l.createElement(U,{style:h},b.cloneElement(C,Object.assign({},c)))})},[n,i,r,p,a,e,d]),$=k(o,{[r]:!0,[`${r}-${p}`]:!0});return l.createElement("div",Object.assign({className:$,style:g,"aria-label":t["aria-label"]},z(m)),l.createElement(q,{type:"flex",justify:"start"},v))};R.propTypes={prefixCls:s.string,className:s.string,style:s.object,current:s.number,initial:s.number,direction:s.oneOf(["horizontal","vertical"]),status:s.oneOf(["wait","process","finish","error","warning"])};R.defaultProps={prefixCls:S.PREFIX,current:0,direction:"horizontal",initial:0,status:"process"};var Q=function(t,e){var a={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(a[n[r]]=t[n[r]]);return a};const D=t=>{const{size:e,current:a,status:n,children:r,prefixCls:i,initial:p,direction:o,className:g,style:d,hasLine:m,onChange:v}=t,$=Q(t,["size","current","status","children","prefixCls","initial","direction","className","style","hasLine","onChange"]),f=b.useMemo(()=>{const u=b.Children.toArray(r).filter(y=>b.isValidElement(y));return b.Children.map(u,(y,N)=>{if(!y)return null;const c=p+N,E=Object.assign({stepNumber:`${c+1}`,size:e},y.props);return n==="error"&&N===a-1&&(E.className=`${i}-next-error`),y.props.status||(c===a?E.status=n:c<a?E.status="finish":E.status="wait"),E.active=c===a,E.done=c<a,E.onChange=v?()=>{N!==a&&v(N+p)}:void 0,b.cloneElement(y,Object.assign({},E))})},[r,p,i,o,n,a,e,v]),h=k(g,{[`${i}-basic`]:!0,[`${i}-${o}`]:!0,[`${i}-${e}`]:e!=="default",[`${i}-hasline`]:m});return l.createElement("div",Object.assign({"aria-label":t["aria-label"],className:h,style:d},z($)),f)};D.propTypes={prefixCls:s.string,className:s.string,style:s.object,current:s.number,initial:s.number,direction:s.oneOf(["horizontal","vertical"]),status:s.oneOf(["wait","process","finish","error","warning"]),hasLine:s.bool};D.defaultProps={prefixCls:S.PREFIX,current:0,direction:"horizontal",size:"",initial:0,hasLine:!0,status:"process"};var Y=function(t,e){var a={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(a[n[r]]=t[n[r]]);return a};const M=t=>{const{size:e,current:a,initial:n,children:r,prefixCls:i,className:p,style:o,onChange:g}=t,d=Y(t,["size","current","initial","children","prefixCls","className","style","onChange"]),m=b.useMemo(()=>{const $=b.Children.toArray(r).filter(u=>b.isValidElement(u)),f=$.length;return b.Children.map($,(u,C)=>{if(!u)return null;const y=Object.assign({index:C,total:f},u.props);return y.active=C===a,y.onChange=g?()=>{C!==a&&g(C+n)}:void 0,b.cloneElement(u,Object.assign({},y))})},[r,i,a,e,n,g]),v=k(p,{[`${i}-nav`]:!0,[`${i}-${e}`]:e!=="default"});return l.createElement("div",Object.assign({"aria-label":t["aria-label"],className:v,style:o},z(d)),m)};M.propTypes={prefixCls:s.string,className:s.string,style:s.object,current:s.number,initial:s.number,size:s.oneOf(["small","default"])};M.defaultProps={prefixCls:S.PREFIX,current:0,direction:"horizontal",size:"default",initial:0,status:"process"};var Z=function(t,e){var a={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(a[n[r]]=t[n[r]]);return a};class j extends b.Component{renderComponent(){const e=this.props,{type:a}=e,n=Z(e,["type"]);switch(a){case"fill":return l.createElement(R,Object.assign({},n));case"basic":return l.createElement(D,Object.assign({},n));case"nav":return l.createElement(M,Object.assign({},n));default:return null}}render(){const{type:e}=this.props;return l.createElement(V.Provider,{value:{type:e}},this.renderComponent())}}j.Step=H;j.propTypes={onChange:s.func,type:s.oneOf(["fill","basic","nav"]),size:s.oneOf(["small","default"])};j.defaultProps={type:"fill",size:"default"};const ee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],se=X("circle-alert",ee);const te=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ae=X("circle-check",te),x={prepare:{number:0,title:w("splitPrepare"),description:w("splitPrepare.desc")},collect:{number:1,title:w("splitCollect"),description:w("splitCollect.desc")},split:{number:2,title:w("splitCode"),description:w("splitCode.desc")},rollback:{number:3,title:w("rollback"),description:""}},le=({stage:t})=>O.jsxs(j,{type:"basic",current:x[t].number,className:"tt-wasm-steps",children:[O.jsx(j.Step,{title:x.prepare.title,description:x.prepare.description}),O.jsx(j.Step,{title:x.collect.title,description:x.collect.description}),O.jsx(j.Step,{title:x.split.title,description:x.split.description})]}),ie=()=>{const[t,e]=b.useState({kind:"idle"}),a=b.useRef(null);if(b.useEffect(()=>{const o=()=>{a.current!==null&&(window.clearTimeout(a.current),a.current=null)},g=({status:d,msg:m,progress:v})=>{switch(d){case"start":o(),e({kind:"uploading",progress:0});break;case"process":o(),e({kind:"uploading",progress:Math.max(0,Math.min(1,v??0))});break;case"success":o(),e({kind:"success"}),a.current=window.setTimeout(()=>{e({kind:"idle"}),a.current=null},2500);break;case"restart":o(),e({kind:"restart"});break;case"error":o(),e({kind:"error",msg:m});break}};return A.on("uploadGame",g),()=>{A.off("uploadGame",g),o()}},[]),t.kind==="idle")return null;let n="",r="",i="0%",p="uploading";switch(t.kind){case"uploading":{const o=Math.round(t.progress*100);n=w("uploadStart"),r=`${o}%`,i=`${o}%`,p="uploading";break}case"success":n=w("uploadSuccess"),r="100%",i="100%",p="success";break;case"restart":n=w("uploadStart"),r="",i="0%",p="uploading";break;case"error":n=w("uploadError"),t.msg&&(n=`${n}: ${t.msg}`),r="",i="100%",p="error";break}return O.jsxs("div",{className:`tt-wasm-upload-progress tt-wasm-upload-progress--${p}`,role:"status","aria-live":"polite",title:n,children:[O.jsxs("div",{className:"tt-wasm-upload-progress-meta",children:[O.jsx("span",{className:"tt-wasm-upload-progress-label",children:n}),r&&O.jsx("span",{className:"tt-wasm-upload-progress-percent",children:r})]}),O.jsx("div",{className:"tt-wasm-upload-progress-track",children:O.jsx("div",{className:"tt-wasm-upload-progress-fill",style:{width:i}})})]})};export{ae as C,ie as U,le as W,se as a};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,
|
|
1
|
+
import{i as e,h as F,u as D,r as o,N as b,j as n,v as q,B as x}from"./index-Bjn0ctEd.js";import{P as w}from"./index-BxsB5E3u.js";import{F as r}from"./baseForm-kBTxn8h8.js";import"./col-VN3Ivd-x.js";import"./index-DIcz5ciL.js";const O=[{label:e("scene_scan_qrcode"),value:"scan_qrcode"},{label:e("scene_search"),value:"search"},{label:e("scene_fyf_promotion_direct_feed_play"),value:"fyf_promotion_direct_feed_play"},{label:e("scene_anchor"),value:"anchor"},{label:e("scene_center"),value:"center"},{label:e("scene_ad"),value:"ads"},{label:e("scene_shortcut"),value:"desktop_shortcut"},{label:e("scene_sharing"),value:"dm_sharing"},{label:e("scene_link"),value:"minis_link"},{label:e("scene_inbox"),value:"inbox"}];function M(c){return c.id==="normal"?e("normalLaunchMode"):c.id==="created"?e("createdLaunchMode"):c.name}function A(c){return{...c,name:M(c)}}const B=()=>{const c=F(),{state:{launchOptions:t,selectedLaunchOption:j,packages:_},setLaunchOptions:f,setSelectedLaunchOption:v}=D(),i=o.useRef(null),u=A(j||b),[g,m]=o.useState(u),[h,N]=o.useState(u.id),y=_.map(a=>{if(a.type==="main")return{label:e("gameMainPackage"),value:a.name};if(a.type==="independent")return{label:`${e("independentPackage")}: ${a.name}`,value:a.name}}).filter(Boolean),L=o.useCallback(a=>{const l={...g,...a};l.pkgType==="main"&&l.independentPkg!==void 0&&(l.independentPkg=void 0,i.current&&i.current.setValues({independentPkg:void 0})),m(l)},[g]),k=o.useCallback(()=>{if(!i.current)return;const a=i.current.getValues();a.pkgType==="main"&&(a.independentPkg=void 0);const l=t.findIndex(d=>d.name===a.name&&d.id!=="created"&&d.id!=="normal");let s;l!==-1?(s=[...t],s[l]=a):(a.id=Date.now().toString(),s=[...t.slice(0,-1),a,...t.slice(-1)]),f(s),m(a),v(a),c("/")},[t,c,f,v]),S=o.useCallback(a=>{const l=t.find(s=>s.id===a);if(l){N(a);const s={...l};a==="created"?s.name="":a==="normal"&&(s.name=e("normalLaunchMode")),m(s),i.current?.setValues(s)}},[t]),C=o.useCallback(()=>{const a=h;if(["normal","created"].includes(a))return;const l=t.filter(p=>p.id!==a);f(l);const s=l.find(p=>p.id==="normal")||l.find(p=>p.id==="created")||l[0]||b,d={...s,...s.id==="created"?{name:""}:{},...s.id==="normal"?{name:e("normalLaunchMode")}:{}};v(d),N(d.id),m(d),i.current?.setValues(d)},[t,h,f,v]),V=o.useCallback(()=>{m(u),i.current?.setValues(u),c("/")},[u,c]),P=t.find(a=>a.id===h);return n.jsxs("div",{className:"launch-mode-page",children:[n.jsxs("section",{className:"launch-mode-guide",children:[n.jsx("div",{className:"launch-mode-guide-marker"}),n.jsxs("div",{className:"launch-mode-guide-copy",children:[n.jsx("div",{className:"launch-mode-guide-title",children:e("launchMode")}),n.jsx("div",{className:"launch-mode-guide-desc",children:e("launchModeDesc")})]})]}),n.jsxs(r,{className:"launch-mode-form",initValues:g,onValueChange:L,getFormApi:a=>i.current=a,onSubmit:k,children:[n.jsxs("div",{className:"launch-mode-form-section launch-mode-current-section",children:[n.jsxs("div",{className:"launch-mode-section-head",children:[n.jsx("div",{className:"launch-mode-section-title",children:e("selectLaunchMode")}),n.jsx("div",{className:"launch-mode-section-desc",children:e("launchMode.currentDesc")})]}),n.jsx(r.Select,{className:"launch-mode-control",placeholder:e("selectLaunchMode"),rules:[{required:!0,message:e("selectLaunchMode")}],field:"id",noLabel:!0,optionList:t.map(a=>({label:M(a),value:a.id})),onChange:S,style:{width:"100%"},value:h})]}),n.jsxs("div",{className:"launch-mode-form-section",children:[n.jsxs("div",{className:"launch-mode-section-head",children:[n.jsx("div",{className:"launch-mode-section-title",children:e("customizeLaunchMode")}),n.jsx("div",{className:"launch-mode-section-desc",children:e("launchMode.configDesc")})]}),n.jsxs("div",{className:"launch-mode-field-grid",children:[n.jsx(r.Input,{className:"launch-mode-control",required:!0,placeholder:e("launchModeName"),field:"name",label:e("launchModeName"),rules:[{required:!0,message:e("notEmpty")}],style:{width:"100%"},trigger:"blur"}),n.jsx(r.Select,{className:"launch-mode-control",field:"pkgName",label:e("selectLaunchPkg"),placeholder:e("selectLaunchPkg"),rules:[{required:!0,message:e("notEmpty")}],optionList:y,style:{width:"100%"}}),n.jsx(r.Select,{className:"launch-mode-control",field:"scene",label:e("selectScene"),rules:[{required:!0,message:e("notEmpty")}],placeholder:e("selectScene"),optionList:O,style:{width:"100%"},filter:!0}),n.jsx(r.Input,{className:"launch-mode-control",field:"queries",label:e("launchQueries"),placeholder:e("launchQueriesDesc"),trigger:"blur",rules:[{validator:(a,l)=>{const{isValid:s,message:d}=q(l);return s?Promise.resolve():Promise.reject(d)}}],style:{width:"100%"}})]})]}),n.jsxs("div",{className:"launch-mode-actions",children:[["created","normal"].includes(h)?n.jsx(x,{className:"launch-mode-secondary-action",onClick:V,children:e("cancel")}):n.jsx(w,{title:e("deleteLaunchModeConfirm",{name:P?.name??""}),onConfirm:C,position:"bottomRight",children:n.jsx(x,{className:"launch-mode-danger-action",type:"danger",children:e("delete")})}),n.jsx(x,{className:"launch-mode-primary-action",htmlType:"submit",type:"primary",children:e("saveAndUse")})]})]})]})};export{B as LaunchMode};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{X as a,Y as t}from"./index-Bjn0ctEd.js";const s=[{key:"login",icon:"🔐",titleKey:"ia.menu.login",summaryKey:"ia.login.summary",sceneKey:"scene_scan_qrcode",apiTags:["tt.login","auth_code","user.info.open_id"],highlightKeys:["ia.login.highlight1","ia.login.highlight2"],prerequisiteKeys:["ia.login.prerequisite1","ia.login.prerequisite2"],stepKeys:["ia.login.step1","ia.login.step2","ia.login.step3"],tipKeys:["ia.login.tip1","ia.login.tip2"],actions:[{labelKey:"ia.action.openCapabilityDoc",type:"external",href:"https://bytedance.sg.larkoffice.com/docx/CG6wdxffcouMY3xIqQTlDEyWgBe?302from=wiki",target:"_blank",theme:"solid"}]},{key:"authorize",icon:"🛂",titleKey:"ia.menu.authorize",summaryKey:"ia.authorize.summary",sceneKey:"scene_scan_qrcode",apiTags:["tt.authorize","user.info.basic","access_token"],highlightKeys:["ia.authorize.highlight1","ia.authorize.highlight2"],prerequisiteKeys:["ia.authorize.prerequisite1","ia.authorize.prerequisite2"],stepKeys:["ia.authorize.step1","ia.authorize.step2","ia.authorize.step3"],tipKeys:["ia.authorize.tip1","ia.authorize.tip2"],actions:[{labelKey:"ia.action.openCapabilityDoc",type:"external",href:"https://bytedance.sg.larkoffice.com/docx/CewRdCPcCoxcKFxBTftlRXnSgOc",target:"_blank",theme:"solid"},{labelKey:"ia.action.goProjectDetail",type:"route",path:"/project_overview"}]},{key:"payment",icon:"💳",titleKey:"ia.menu.payment",summaryKey:"ia.payment.summary",sceneKey:"scene_scan_qrcode",apiTags:["IAP Mock","TikTok Beans","order verify"],highlightKeys:["ia.payment.highlight1","ia.payment.highlight2"],prerequisiteKeys:["ia.payment.prerequisite1","ia.payment.prerequisite2"],stepKeys:["ia.payment.step1","ia.payment.step2","ia.payment.step3"],tipKeys:["ia.payment.tip1","ia.payment.tip2"],actions:[{labelKey:"ia.action.openCapabilityDoc",type:"external",href:"https://bytedance.sg.larkoffice.com/docx/MYsLdpeGGoulzDxZ6VelG8Gggoe?302from=wiki",target:"_blank",theme:"solid"},{labelKey:"ia.action.goPrecheck",type:"route",path:"/upload_publish"}]},{key:"ad",icon:"📺",titleKey:"ia.menu.ad",summaryKey:"ia.ad.summary",sceneKey:"scene_ad",apiTags:["createRewardedVideoAd","createInterstitialAd","placement id"],highlightKeys:["ia.ad.highlight1","ia.ad.highlight2"],prerequisiteKeys:["ia.ad.prerequisite1","ia.ad.prerequisite2"],stepKeys:["ia.ad.step1","ia.ad.step2","ia.ad.step3"],tipKeys:["ia.ad.tip1","ia.ad.tip2"],actions:[{labelKey:"ia.action.openCapabilityDoc",type:"external",href:"https://bytedance.larkoffice.com/wiki/JTEiw409LiLkUSk2SltcsAqonkg",target:"_blank",theme:"solid"},{labelKey:"ia.action.goPrecheck",type:"route",path:"/upload_publish"}]},{key:"ui_adaptation",icon:"📱",titleKey:"ia.menu.uiAdaptation",summaryKey:"ia.uiAdaptation.summary",apiTags:["safeArea","screen adaptation","capsule button"],highlightKeys:["ia.uiAdaptation.highlight1","ia.uiAdaptation.highlight2"],prerequisiteKeys:["ia.uiAdaptation.prerequisite1","ia.uiAdaptation.prerequisite2"],stepKeys:["ia.uiAdaptation.step1","ia.uiAdaptation.step2","ia.uiAdaptation.step3"],tipKeys:["ia.uiAdaptation.tip1","ia.uiAdaptation.tip2"],actions:[{labelKey:"ia.action.openCapabilityDoc",type:"external",href:"https://bytedance.larkoffice.com/docx/Zes2dVS3ooIm55x67OhcXTxWnud",target:"_blank",theme:"solid"}]},{key:"share_message",icon:"🔗",titleKey:"ia.menu.shareMessage",summaryKey:"ia.shareMessage.summary",apiTags:["shareAppMessage","query","game basic info"],highlightKeys:["ia.shareMessage.highlight1","ia.shareMessage.highlight2"],prerequisiteKeys:["ia.shareMessage.prerequisite1","ia.shareMessage.prerequisite2"],stepKeys:["ia.shareMessage.step1","ia.shareMessage.step2","ia.shareMessage.step3"],tipKeys:["ia.shareMessage.tip1","ia.shareMessage.tip2"],actions:[{labelKey:"ia.action.openCapabilityDoc",type:"external",href:"https://bytedance.sg.larkoffice.com/docx/CesGdxcyJorqE1xIuf3lAXEhguh",target:"_blank",theme:"solid"}]},{key:"share_story",icon:"📣",titleKey:"ia.menu.shareStory",summaryKey:"ia.shareStory.summary",hidden:!0,apiTags:["shareToStory","query","story asset"],highlightKeys:["ia.shareStory.highlight1","ia.shareStory.highlight2"],prerequisiteKeys:["ia.shareStory.prerequisite1","ia.shareStory.prerequisite2"],stepKeys:["ia.shareStory.step1","ia.shareStory.step2","ia.shareStory.step3"],tipKeys:["ia.shareStory.tip1","ia.shareStory.tip2"],actions:[]},{key:"subpackage",icon:"📦",titleKey:"ia.menu.subpackage",summaryKey:"ia.subpackage.summary",apiTags:["preDownloadSubpackage","loadSubpackage","loadSubpackageSync"],highlightKeys:["ia.subpackage.highlight1","ia.subpackage.highlight2"],prerequisiteKeys:["ia.subpackage.prerequisite1","ia.subpackage.prerequisite2"],stepKeys:["ia.subpackage.step1","ia.subpackage.step2","ia.subpackage.step3"],tipKeys:["ia.subpackage.tip1","ia.subpackage.tip2"],actions:[]},{key:"network",icon:"🌐",titleKey:"ia.menu.network",summaryKey:"ia.network.summary",apiTags:["request","downloadFile","connectSocket"],highlightKeys:["ia.network.highlight1","ia.network.highlight2"],prerequisiteKeys:["ia.network.prerequisite1","ia.network.prerequisite2"],stepKeys:["ia.network.step1","ia.network.step2","ia.network.step3"],tipKeys:["ia.network.tip1","ia.network.tip2"],actions:[]},{key:"sidebar_revisit",icon:"🧭",titleKey:"ia.menu.sidebarRevisit",summaryKey:"ia.sidebar.summary",sceneKey:"scene_center",apiTags:["startEntranceMission","getEntranceMissionReward","canIUse"],highlightKeys:["ia.sidebar.highlight1","ia.sidebar.highlight2"],prerequisiteKeys:["ia.sidebar.prerequisite1","ia.sidebar.prerequisite2"],stepKeys:["ia.sidebar.step1","ia.sidebar.step2","ia.sidebar.step3"],tipKeys:["ia.sidebar.tip1","ia.sidebar.tip2"],actions:[{labelKey:"ia.action.openCapabilityDoc",type:"external",href:"https://bytedance.larkoffice.com/wiki/Pl9Jwg8ujiZp6ckhhQzcujujnfb",target:"_blank",theme:"solid"},{labelKey:"ia.action.goLaunchMode",type:"route",path:"/launch_mode"}]},{key:"shortcut_revisit",icon:"📌",titleKey:"ia.menu.shortcutRevisit",summaryKey:"ia.shortcut.summary",sceneKey:"scene_shortcut",apiTags:["addShortcut","getShortcutMissionReward","canIUse"],highlightKeys:["ia.shortcut.highlight1","ia.shortcut.highlight2"],prerequisiteKeys:["ia.shortcut.prerequisite1","ia.shortcut.prerequisite2"],stepKeys:["ia.shortcut.step1","ia.shortcut.step2","ia.shortcut.step3"],tipKeys:["ia.shortcut.tip1","ia.shortcut.tip2"],actions:[{labelKey:"ia.action.openCapabilityDoc",type:"external",href:"https://bytedance.larkoffice.com/wiki/AW4JwueaXiiKtTkK0c9cIo4lnud",target:"_blank",theme:"solid"},{labelKey:"ia.action.goLaunchMode",type:"route",path:"/launch_mode"}]},{key:"direct_play_card",icon:"🎯",titleKey:"ia.menu.directPlayCard",summaryKey:"ia.directPlay.summary",sceneKey:"scene_fyf_promotion_direct_feed_play",experimentOnly:!0,apiTags:["Play now","For You Feed","revisit"],highlightKeys:["ia.directPlay.highlight1","ia.directPlay.highlight2"],prerequisiteKeys:["ia.directPlay.prerequisite1","ia.directPlay.prerequisite2"],stepKeys:["ia.directPlay.step1","ia.directPlay.step2","ia.directPlay.step3"],tipKeys:["ia.directPlay.tip1","ia.directPlay.tip2"],actions:[{labelKey:"ia.action.openCapabilityDoc",type:"external",href:"https://bytedance.sg.larkoffice.com/docx/VZ3odoD8DoSxFXxANh5lLxVMgPx",target:"_blank",theme:"solid"}]},{key:"wasm_split",icon:"🧩",titleKey:"ia.menu.wasmSplit",summaryKey:"ia.wasmSplit.summary",apiTags:["Unity","Wasm"],highlightKeys:[],prerequisiteKeys:[],stepKeys:[],tipKeys:[],actions:[],customPath:"/wasm_split"}],p=s.reduce((e,i)=>(e[i.key]=i,e),{});function o(e){return!!(!e||e.hidden||e.experimentOnly&&!a()||e.localDevOnly&&!t())}export{p as c,o as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as x,d as N,u as M,r as n,s as S,j as e,e as b,P as v,i as o,T as L,b as m,D as z,o as C}from"./index-Bjn0ctEd.js";import{B as I}from"./index-C83QHLmD.js";import{S as E}from"./SectionHeader-Cn3FnOqh.js";import{C as f}from"./Card-BAsimNoh.js";import{S as T}from"./sparkles-BjIkcbAi.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"}]],B=x("bug",w);const _=[["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"}]],q=x("wrench",_);function A(){return N({url:"/game/changelog",method:"GET"})}const D=[{key:"feature",icon:T,titleI18n:"changelogFeature",tone:"success"},{key:"optimize",icon:q,titleI18n:"changelogOptimize",tone:"warn"},{key:"bugfix",icon:B,titleI18n:"changelogBugfix",tone:"error"}],G=()=>{const{state:{devToolVersion:r}}=M(),d=C,[h,p]=n.useState([]),[j,l]=n.useState(!0),[c,u]=n.useState("");return n.useEffect(()=>{r&&S(r)},[r]),n.useEffect(()=>{let a=!1;return(async()=>{l(!0),u("");const s=await A();if(!a){if(s?.error||s?.code!==0||!s?.data){p([]),u(typeof s?.error=="object"&&s.error?.errorMsg||"Failed to load changelog."),l(!1);return}p(s.data.items||[]),l(!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")}),c?e.jsx(I,{fullMode:!1,bordered:!1,closeIcon:null,type:"danger",description:c}):null,!c&&h.length===0?e.jsx(f,{padding:"lg",children:e.jsx(L.Paragraph,{className:"change-log-empty",children:"No changelog entries yet."})}):null,h.map(a=>e.jsxs(f,{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(m,{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(E,{icon:s,title:e.jsxs("span",{className:"change-log-section-title",children:[e.jsx("span",{children:o(y)}),e.jsx(m,{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(z,{className:"change-log-change-link",href:t.link,iconSize:12,children:o("changelogLink")}):null]})]},t.desc[d]))})]},i):null})]},a.title))]})};export{G as ChangeLog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as f,f as u,j as r,T as i,i as a,B as x,D as M}from"./index-OPQyWrBC.js";import{B as Z}from"./index-Ggo1rV6S.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",L=({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(Z,{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(x,{theme:"light",onClick:()=>t("/basic_debug_guide"),children:a("basicDebugGuide.entryAction")}):null,r.jsx(M,{href:O,children:a("projectInfo.error.openProxyDoc")})]}):null]})]})]})]})};export{L as A};
|
|
1
|
+
import{r as e,c as f,h as u,j as r,T as i,i as a,B as x,D as M}from"./index-Bjn0ctEd.js";import{B as Z}from"./index-C83QHLmD.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",L=({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(Z,{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(x,{theme:"light",onClick:()=>t("/basic_debug_guide"),children:a("basicDebugGuide.entryAction")}):null,r.jsx(M,{href:O,children:a("projectInfo.error.openProxyDoc")})]}):null]})]})]})]})};export{L as A};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{af as U,r as T,bE as z,bF as H,av as Q,q as $,t as M,O as _,bs as J,R as o,y as P,K as I,H as t,x as L,aQ as j,aM as ee,aR as te}from"./index-OPQyWrBC.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=z(),e=H(),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=Q(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){J(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:K}=this.context.checkboxGroup;n.isCardType=D,n.isPureCardType=K,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,q=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}),Y=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:Y,"x-semi-prop":"extra"},f):null);return o.createElement("span",Object.assign({role:m,tabIndex:h,style:a,className:q,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 F extends M{static get checkboxGroupDefaultAdapter(){return{}}constructor(e){super(Object.assign(Object.assign({},F.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 S 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 F(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))}}S.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};S.defaultProps={disabled:!1,onChange:()=>{},type:p.TYPE_DEFAULT,defaultValue:[],direction:p.DEFAULT_DIRECTION};class he extends y{}he.Group=S;export{he as C,de as _,y as a,S as b};
|
|
1
|
+
import{ag as U,r as T,bF as J,bG as K,aw as H,t as $,w as M,U as _,bt as Q,R as o,z as P,M as I,J as t,y as L,aR as w,aN as ee,aS as te}from"./index-Bjn0ctEd.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,j;function ie(){if(j)return R;j=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:w({prefix:"addon"})})},setExtraId:()=>{this.setState({extraId:w({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};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ag as v,r as m,h as w,u,k as x,g,i as t,j as e,z as b,p as f}from"./index-Bjn0ctEd.js";/* empty css */function j(a){return m.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),m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 4c0-1.1.9-2 2-2h5a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4Zm0 11c0-1.1.9-2 2-2h5a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5ZM15 2a2 2 0 0 0-2 2v5c0 1.1.9 2 2 2h5a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2h-5Zm1 12.5a1.5 1.5 0 0 1 3 0V16h1.5a1.5 1.5 0 0 1 0 3H19v1.5a1.5 1.5 0 0 1-3 0V19h-1.5a1.5 1.5 0 0 1 0-3H16v-1.5Z",fill:"currentColor"}))}const S=v(j,"customize"),N=()=>{const a=w(),{state:{user:i,gameDetail:o}}=u(),n=x(i),r=g({errorCode:o?.has_error?o.error_code:void 0,user:i}),c=r==="noPermission",l=r==="networkProxy",s=!n||c||l,p=n?c?t("wasmSplit.disabled.noPermission"):l?t("wasmSplit.disabled.networkProxy"):"":t("wasmSplit.disabled.notLoggedIn"),h=()=>{s||a("/wasm_split")},d=e.jsxs("div",{className:b("wasm-code-split","tt-wasm-entry","tt-header-chip",{"tt-wasm-entry-disabled":s}),onClick:h,"aria-disabled":s,role:"button",tabIndex:s?-1:0,children:[e.jsx("span",{className:"tt-wasm-entry-icon",children:e.jsx(S,{size:"default"})}),e.jsx("span",{className:"wasm-code-split-text",children:t("wasmSplit")})]});return s?e.jsx(f,{content:()=>e.jsx("div",{className:"wasm-code-split-disabled-tip",children:p}),children:d}):d};export{N as WasmCodeSplit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,T as o,i as c,I as s}from"./index-
|
|
1
|
+
import{j as e,T as o,i as c,I as s}from"./index-Bjn0ctEd.js";import{D as i}from"./index-1WjGwqIV.js";const t=[{node:"item",name:c("quickStart"),link:"https://bytedance.sg.larkoffice.com/docx/MarqdNvQLoihvjxN4rFllgjBgwb"},{node:"item",name:c("jsApiList"),link:"https://bytedance.larkoffice.com/wiki/GQscwDOQSiPxyjkbzyfckh2pnDg"},{node:"item",name:c("advancedGuide"),link:"https://bytedance.larkoffice.com/wiki/AGqRwu0qQiXZpVkkToUcRP99nwc"},{node:"item",name:c("faq"),link:"https://bytedance.larkoffice.com/wiki/O6aWwFhDBiEglwkcnJ4ccJpdnmb"}],d=()=>e.jsx(i,{trigger:"hover",position:"bottomRight",render:e.jsx(e.Fragment,{children:t.map(n=>e.jsx(i.Item,{onClick:()=>{window.open(n.link)},children:n.name},n.name))}),children:e.jsxs("div",{className:"access-docs tt-header-chip",role:"button",tabIndex:0,children:[e.jsx(o.Text,{className:"access-docs-text",type:"primary",children:c("docs")}),e.jsx(s,{className:"access-docs-icon"})]})});export{d as AccessDocs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as i,
|
|
1
|
+
import{c as i,h as d,af as h,r as p,j as e,i as a}from"./index-Bjn0ctEd.js";import{C as l}from"./compass-BabZVjAl.js";import{Z as u}from"./zap-DFHw5liD.js";const y=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],m=i("cloud-upload",y);const x=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],_=i("layout-dashboard",x);const k=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],g=i("qr-code",k),v=[{itemKey:"scan_qrcode",text:a("scanQRCode2Debug"),icon:g,path:"/"},{itemKey:"project_overview",text:a("projectInfo"),icon:_,path:"/project_overview"},{itemKey:"integration_assistant",text:a("integrationAssistant"),icon:l,path:"/integration_assistant"},{itemKey:"performance",text:a("performance.menu.title"),icon:u,path:"/performance"},{itemKey:"upload_publish",text:a("codePreCheck"),icon:m,path:"/upload_publish"}],w=()=>{const s=d(),r=h(),n=p.useMemo(()=>{const t=r.pathname;return t==="/"||["/basic_debug_guide","/network_diagnostics","/manual_connect","/launch_mode","/debug_setting"].includes(t)?"scan_qrcode":t.startsWith("/integration_assistant")?"integration_assistant":t==="/performance"||t==="/wasm_split"||t==="/subpackage_collect"?"performance":t==="/project_overview"||t==="/project_detail"?"project_overview":t==="/upload_publish"||t==="/version_upload"||t==="/precheck_code"?"upload_publish":""},[r.pathname]);return e.jsx("nav",{className:"tt-sidebar","aria-label":"primary",children:e.jsx("ul",{className:"tt-sidebar-list",children:v.map(t=>{const c=t.icon,o=t.itemKey===n;return e.jsx("li",{children:e.jsxs("button",{type:"button",className:o?"tt-sidebar-item tt-sidebar-item-active":"tt-sidebar-item",onClick:()=>s(t.path),"aria-current":o?"page":void 0,children:[e.jsx("span",{className:"tt-sidebar-item-icon","aria-hidden":"true",children:e.jsx(c,{size:16,strokeWidth:1.75})}),e.jsx("span",{className:"tt-sidebar-item-text",children:t.text})]})},t.itemKey)})})})};export{w as Sidebar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as o,h as c,j as e,P as r,i as a}from"./index-Bjn0ctEd.js";import{S as t}from"./SectionHeader-Cn3FnOqh.js";import{C as d,m,M as l,a as h,o as p}from"./MonetizationModeSummary-CnHqXyco.js";import"./index-CpM8t743.js";import{L as x,C as v}from"./layers-B4zhx14P.js";import{C as y}from"./compass-BabZVjAl.js";import"./Card-BAsimNoh.js";const j=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],u=o("credit-card",j);const g=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],k=o("megaphone",g),N={iaa:k,iap:u,iaap:x},C=s=>a(s),A=()=>{const s=c();return e.jsxs("div",{className:"ia-page",children:[e.jsx(r,{title:a("ia.overview.title"),subtitle:a("ia.overview.desc")}),e.jsxs("section",{className:"ia-section ia-section-modes",children:[e.jsx(t,{icon:d,title:a("ia.monetization.title"),subtitle:a("ia.monetization.desc")}),e.jsx("div",{className:"ia-mode-grid",children:m.map(i=>{const n=N[i.key];return e.jsxs("button",{type:"button",className:`ia-mode-card ia-mode-card-${i.key}`,onClick:()=>s(`/integration_assistant/mode/${i.key}`),children:[e.jsxs("header",{className:"ia-mode-card-head",children:[e.jsx("span",{className:"ia-mode-card-badge","aria-hidden":"true",children:e.jsx(n,{size:17,strokeWidth:2})}),e.jsx("h4",{className:"ia-mode-card-title",children:C(i.titleKey)}),e.jsx("span",{className:"ia-mode-card-chevron","aria-hidden":"true",children:e.jsx(v,{size:14,strokeWidth:2})})]}),e.jsx(l,{mode:i,compact:!0})]},i.key)})})]}),e.jsxs("section",{className:"ia-section",children:[e.jsx(t,{icon:y,title:a("ia.overview.groups.title"),subtitle:a("ia.overview.groups.desc")}),e.jsx("div",{className:"ia-section-stack",children:e.jsx(h,{sections:p})})]})]})};export{A as IntegrationAssistant};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as U,
|
|
1
|
+
import{u as U,k as b,r as o,j as e,p as D,i as a,z as y,ad as F,e as A,T as m,d as E,av as I}from"./index-Bjn0ctEd.js";import{I as x,F as g}from"./baseForm-kBTxn8h8.js";import"./col-VN3Ivd-x.js";import"./index-DIcz5ciL.js";const B=()=>{const{state:{user:h}}=U(),r=b(h),[f,i]=o.useState(!1),[j,l]=o.useState(!1),[v,c]=o.useState(""),[d,n]=o.useState(""),p=o.useRef(null),u=()=>{l(!1),n(""),c("")},C=()=>{i(!1),u(),p.current?.formApi?.reset?.()},S=()=>{r&&i(!0)},N=s=>{const t=s;if(t?.code===0)I.success({title:a("uploadPlatformSuccess"),content:e.jsxs(e.Fragment,{children:[e.jsx("div",{children:a("uploadPlatformDesc")}),e.jsx("div",{style:{marginTop:12,display:"flex",justifyContent:"flex-end"},children:e.jsx(m.Text,{link:!0,onClick:()=>{window.open(t?.data?.detail,"_blank")},children:a("viewOnPlatform")})})]}),duration:10}),i(!1),u();else{const P=t?.error?.StatusMessage||t?.detail||a("uploadPlatformFailed");n(P),l(!1)}},T=s=>{const t=s?.error?.StatusMessage||s?.response?.detail||s?.message||a("uploadPlatformFailed");n(t),l(!1)},k=()=>{l(!0),E({method:"POST",url:"/game/upload",headers:{"ttmg-game-desc":encodeURIComponent(v||"--")}}).then(s=>{N(s)}).catch(s=>{T(s)})};return e.jsxs(e.Fragment,{children:[e.jsx(D,{content:()=>r?null:e.jsx("div",{className:"uploader-login-tip",children:a("loginToUpload")}),children:e.jsxs("div",{className:y("resource-uploader",{"resource-uploader-disabled":!r}),onClick:S,children:[e.jsx(x,{size:"default"}),e.jsx("div",{className:"uploader-text",children:a("upload")})]})}),e.jsx(F,{footer:null,visible:f,onCancel:C,title:a("uploadToPlatform"),children:e.jsxs("div",{className:"uploader-modal-content",children:[j&&e.jsx("div",{className:"upload-loading-container",children:e.jsx("div",{className:"loading-spin",children:e.jsx(A,{size:"large"})})}),d&&e.jsx(m.Text,{style:{color:"var(--tt-error-text)",marginBottom:12,marginTop:12},children:d}),e.jsxs(g,{ref:p,onChange:({values:s})=>{c(s?.gameDescription||"--"),n("")},children:[e.jsx(g.TextArea,{label:a("gameAssetDescription"),placeholder:a("gameAssetDescription"),field:"gameDescription"}),e.jsxs("div",{className:"uploader-button-container",onClick:k,children:[e.jsx(x,{className:"uploader-button-icon"}),e.jsx("div",{className:"uploader-button-text",children:a("uploadGamePackageTip")})]})]})]})})]})};export{B as GameUploader};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as be,t as Oe,$ as Ee,y as ye,R as j,z as X,a0 as Te,V as Pe,E as Re,W as Ie,l as We,m as Me,O as Fe,H as De,J as k,K as $e,M as Z,r as g,a1 as K,a2 as re,a3 as Ae,c as V,d as E,j as e,i as a,B as w,a as ze,u as Se,a4 as Le,e as D,D as ve,Q as qe,a5 as Be,a6 as ie,a7 as le,h as Ue,A as Y,P as J,b as Ge}from"./index-Bjn0ctEd.js";import{S as oe}from"./SectionHeader-Cn3FnOqh.js";import{C as H}from"./Card-BAsimNoh.js";import{C as He,a as ce,U as Xe,W as Ve}from"./index-Cl0_vMWE.js";import{F as de}from"./baseForm-kBTxn8h8.js";/* empty css */import{L as Qe}from"./list-checks-Br6imjXC.js";import{S as Ye}from"./sparkles-BjIkcbAi.js";import"./col-VN3Ivd-x.js";import"./index-DIcz5ciL.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"]},Je={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&&Ee(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?Te(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:Z,content:"",close:Z,duration:Je.duration,textMaxWidth:450,showClose:!0,stack:!1,stackExpanded:!1,theme:"normal"});var Ze=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=Ze(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:Z})}}));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 E({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 E({url:"/game/wasm-prepare",method:"POST",data:{codePath:s,clientKey:n,codeMd5:t,desc:l}})}function ht({codeMd5:r,clientKey:s}){return E({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 E({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 E({url:"/game/wasm-split",method:"POST",data:{codeMd5:s,clientKey:t,archive:n??!1}})}function wt({codeMd5:r,clientKey:s}){return E({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 E({url:"/game/wasm-split-download-result",method:"POST",data:{clientKey:s,codeMd5:r}})}function he(r){return E({url:"/game/wasm-split-download",method:"POST",data:r})}function ke(r){const{codeMd5:s,clientKey:t,codePath:n}=r;return E({url:"/game/wasm-split-reset",method:"POST",data:{codeMd5:s,clientKey:t,codePath:n}})}function bt({codeMd5:r,clientKey:s}){return E({url:"/game/wasm-taskinfo",method:"GET",data:{codeMd5:r,clientKey:s}})}function yt({codeMd5:r,clientKey:s}){return E({url:"/game/wasm-collect-start",method:"POST",data:{codeMd5:r,clientKey:s}})}function St({codeMd5:r,clientKey:s}){return E({url:"/game/wasm-set-collect",method:"POST",data:{codeMd5:r,clientKey:s}})}function ge(r){return E({url:"/game/wasm-collect-funcids",method:"GET",data:r})}function vt(r){return E({url:"/game/wasm-collect-info",method:"GET",data:r})}function fe(r){return E({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 T=i.includes("?")?"&":"?";return`${i}${T}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 T=y?.total_wasm_func_count;return T?R/T>=P:!1},[y,R]);g.useEffect(()=>{if(o!=="collecting"){h.current&&(window.clearInterval(h.current),h.current=null);return}if(h.current)return;const T=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(T).catch(console.error),h.current=window.setInterval(()=>{ge({codeMd5:t,clientKey:n}).then(T).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(T){console.error(T),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},Et=({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})},Tt=({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})})]}),Yt=()=>{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:Q}=Wt({enableWasmSplit:C.data.enableWasmSplit,hasWasmCode:!!m});Q?(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 E({url:"/game/config",method:"GET"});!C.error&&C.data?.packages&&c(C.data.packages)}catch{}y("prepare")},[c]),F=()=>{r("/")},T=()=>{r("/")},I=(C,G,Q,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:T,children:[e.jsx(Y,{size:14,strokeWidth:2}),e.jsx("span",{children:a("back")})]}),e.jsx(J,{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:Q})})]})]});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:T,children:[e.jsx(Y,{size:14,strokeWidth:2}),e.jsx("span",{children:a("back")})]}),e.jsx(J,{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:T,children:[e.jsx(Y,{size:14,strokeWidth:2}),e.jsx("span",{children:a("back")})]}),e.jsx(J,{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(Qe,{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:Ye,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(Tt,{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:T,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(Et,{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{Yt as WasmCodeSplit};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ag as o,r as c,o as n,j as e,T as h,i as l,m,ah as d,d as g}from"./index-Bjn0ctEd.js";import{D as r}from"./index-1WjGwqIV.js";function u(a){return c.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),c.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){d(a);try{await g({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 s=t.code===n;return e.jsxs(r.Item,{onClick:()=>{p(t.code)},className:"lang-switcher-item"+(s?" lang-switcher-item-active":""),children:[e.jsx("span",{className:"lang-switcher-item-label",children:l(t.labelKey)}),s?e.jsx(m,{className:"lang-switcher-item-check"}):null]},t.code)})}),children:e.jsxs("div",{className:"lang-switcher tt-header-chip","aria-label":l("languageSwitcherLabel"),children:[e.jsx(w,{className:"lang-switcher-icon"}),e.jsx(h.Text,{className:"lang-switcher-text",children:a})]})})};export{f as LangSwitcher};
|