@ttmg/cli 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/index.js +56 -11
  2. package/dist/index.js.map +1 -1
  3. package/dist/package.json +5 -3
  4. package/dist/public/assets/Detail-CTD5OeB0.js +1 -0
  5. package/dist/public/assets/Detail-CTD5OeB0.js.br +0 -0
  6. package/dist/public/assets/{MonetizationMode-hwWN5zUT.js → MonetizationMode-DZmggvdZ.js} +1 -1
  7. package/dist/public/assets/{MonetizationModeSummary-BmvxAKbI.js → MonetizationModeSummary-7jDe4Q_6.js} +1 -1
  8. package/dist/public/assets/{SectionHeader-BL_bJf61.js → SectionHeader-Caf8qPRH.js} +1 -1
  9. package/dist/public/assets/{Tag-B4bSl-_E.js → Tag-DSB9Uput.js} +1 -1
  10. package/dist/public/assets/{baseForm-zW5Gb1OH.js → baseForm-DbKDw3IN.js} +1 -1
  11. package/dist/public/assets/baseForm-DbKDw3IN.js.br +0 -0
  12. package/dist/public/assets/{col-vAurEPaC.js → col-DlUD2IyX.js} +1 -1
  13. package/dist/public/assets/{compass-DEadzu-v.js → compass-D8bLLLSR.js} +1 -1
  14. package/dist/public/assets/{index-BCdOYP-_.js → index-B0fmVxbN.js} +1 -1
  15. package/dist/public/assets/index-B1gECabp.js +1 -0
  16. package/dist/public/assets/index-B1gECabp.js.br +0 -0
  17. package/dist/public/assets/{index-DyHfBQPm.js → index-B3TFdXWD.js} +1 -1
  18. package/dist/public/assets/{index-DhK1XTMu.js → index-BLmfGH4o.js} +1 -1
  19. package/dist/public/assets/{index-Bpx0cjfq.js → index-BR6l0C9y.js} +1 -1
  20. package/dist/public/assets/index-BV532pMK.js +1 -0
  21. package/dist/public/assets/index-BV532pMK.js.br +0 -0
  22. package/dist/public/assets/{index-DVDX92Zz.js → index-BeG7a_8l.js} +1 -1
  23. package/dist/public/assets/{index-QtH0wQu1.js → index-BlupVk90.js} +1 -1
  24. package/dist/public/assets/{index-Db3F1FgQ.js → index-BvRI6rq9.js} +1 -1
  25. package/dist/public/assets/index-BzbUu6Wd.js +1 -0
  26. package/dist/public/assets/{index-Dd2Oev0p.js → index-COLHKvH0.js} +1 -1
  27. package/dist/public/assets/{index-Do7tPKef.js → index-CPfhNCcU.js} +1 -1
  28. package/dist/public/assets/{index-BJmPZor5.js → index-CTkNRReQ.js} +1 -1
  29. package/dist/public/assets/{index-C2jjb4tf.js → index-Cf7bng8i.js} +1 -1
  30. package/dist/public/assets/index-ClU1uQYs.css +1 -0
  31. package/dist/public/assets/{index-DM7Cg9s9.css → index-CoYWdJV1.css} +1 -1
  32. package/dist/public/assets/{index-vuGJOmRn.js → index-D0iKOimx.js} +1 -1
  33. package/dist/public/assets/index-D2zLbzBh.css +1 -0
  34. package/dist/public/assets/index-D2zLbzBh.css.br +0 -0
  35. package/dist/public/assets/{index-CHODjAYV.js → index-D9-bb2oL.js} +1 -1
  36. package/dist/public/assets/{index-Dj0vBPuW.js → index-DF6WNroB.js} +1 -1
  37. package/dist/public/assets/index-DXXBlk9b.js +1 -0
  38. package/dist/public/assets/{index-P3QtE2VP.js → index-DenoanNX.js} +1 -1
  39. package/dist/public/assets/index-DenoanNX.js.br +0 -0
  40. package/dist/public/assets/{index-qycdeV7S.js → index-DnsrxgPV.js} +1 -1
  41. package/dist/public/assets/index-DnsrxgPV.js.br +0 -0
  42. package/dist/public/assets/index-Do3D3DDt.js +1 -0
  43. package/dist/public/assets/index-Do3D3DDt.js.br +0 -0
  44. package/dist/public/assets/{index-DpnThngH.js → index-DyR-YyZt.js} +1 -1
  45. package/dist/public/assets/index-Ggo1rV6S.js +1 -0
  46. package/dist/public/assets/index-OPQyWrBC.js +21 -0
  47. package/dist/public/assets/index-OPQyWrBC.js.br +0 -0
  48. package/dist/public/assets/index-eoDMPIdb.js +1 -0
  49. package/dist/public/assets/index-eoDMPIdb.js.br +0 -0
  50. package/dist/public/assets/index-y9pNuDMs.js +1 -0
  51. package/dist/public/assets/index-y9pNuDMs.js.br +0 -0
  52. package/dist/public/assets/{index-BRJFt3oz.css → index-yR_bPMcB.css} +1 -1
  53. package/dist/public/assets/index-yR_bPMcB.css.br +0 -0
  54. package/dist/public/assets/{layers-DDrUeTNf.js → layers-BQ_Tw855.js} +1 -1
  55. package/dist/public/assets/{list-checks-C4ci4EKo.js → list-checks-9HC7bocq.js} +1 -1
  56. package/dist/public/assets/{sparkles-PwlPP_sT.js → sparkles-BLHMCsIj.js} +1 -1
  57. package/dist/public/assets/{triangle-alert-BAadCxAv.js → triangle-alert-BprMFvuT.js} +1 -1
  58. package/dist/public/assets/{zap-CgIIDLY4.js → zap-Bj4LJ903.js} +1 -1
  59. package/dist/public/index.html +2 -2
  60. package/dist/scripts/docs/render.js +8 -8
  61. package/package.json +5 -3
  62. package/dist/public/assets/Detail-1nSjYvRw.js +0 -1
  63. package/dist/public/assets/Detail-1nSjYvRw.js.br +0 -0
  64. package/dist/public/assets/baseForm-zW5Gb1OH.js.br +0 -0
  65. package/dist/public/assets/index-BRJFt3oz.css.br +0 -0
  66. package/dist/public/assets/index-BXllV1mP.js +0 -1
  67. package/dist/public/assets/index-BXllV1mP.js.br +0 -0
  68. package/dist/public/assets/index-BuiCnshQ.js +0 -1
  69. package/dist/public/assets/index-C5k1IRcX.js +0 -1
  70. package/dist/public/assets/index-C5k1IRcX.js.br +0 -0
  71. package/dist/public/assets/index-CaArjQkD.js +0 -1
  72. package/dist/public/assets/index-CaArjQkD.js.br +0 -0
  73. package/dist/public/assets/index-ChtjciM4.js +0 -1
  74. package/dist/public/assets/index-ChtjciM4.js.br +0 -0
  75. package/dist/public/assets/index-CozQgXOx.js +0 -1
  76. package/dist/public/assets/index-CozQgXOx.js.br +0 -0
  77. package/dist/public/assets/index-Cw4SLGVh.js +0 -1
  78. package/dist/public/assets/index-DBDUeSB8.css +0 -1
  79. package/dist/public/assets/index-DBDUeSB8.css.br +0 -0
  80. package/dist/public/assets/index-P3QtE2VP.js.br +0 -0
  81. package/dist/public/assets/index-qycdeV7S.js.br +0 -0
  82. package/dist/public/assets/index-wqj8y8SZ.js +0 -21
  83. package/dist/public/assets/index-wqj8y8SZ.js.br +0 -0
@@ -1 +1 @@
1
- import{c as a}from"./index-wqj8y8SZ.js";const o=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],c=a("chevron-right",o);const e=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],h=a("layers",e);export{c as C,h as L};
1
+ import{c as a}from"./index-OPQyWrBC.js";const o=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],c=a("chevron-right",o);const e=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],h=a("layers",e);export{c as C,h as L};
@@ -1 +1 @@
1
- import{c}from"./index-wqj8y8SZ.js";const e=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],t=c("list-checks",e);export{t as L};
1
+ import{c}from"./index-OPQyWrBC.js";const e=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],t=c("list-checks",e);export{t as L};
@@ -1 +1 @@
1
- import{c as a}from"./index-wqj8y8SZ.js";const e=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],l=a("sparkles",e);export{l as S};
1
+ import{c as a}from"./index-OPQyWrBC.js";const e=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],l=a("sparkles",e);export{l as S};
@@ -1 +1 @@
1
- import{c as e}from"./index-wqj8y8SZ.js";const a=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],o=e("triangle-alert",a);export{o as T};
1
+ import{c as e}from"./index-OPQyWrBC.js";const a=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],o=e("triangle-alert",a);export{o as T};
@@ -1 +1 @@
1
- import{c as a}from"./index-wqj8y8SZ.js";const o=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],e=a("zap",o);export{e as Z};
1
+ import{c as a}from"./index-OPQyWrBC.js";const o=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],e=a("zap",o);export{e as Z};
@@ -12,8 +12,8 @@
12
12
  rel="stylesheet"
13
13
  />
14
14
  <title>TikTok Mini Games DevTool</title>
15
- <script type="module" crossorigin src="/assets/index-wqj8y8SZ.js"></script>
16
- <link rel="stylesheet" crossorigin href="/assets/index-BRJFt3oz.css">
15
+ <script type="module" crossorigin src="/assets/index-OPQyWrBC.js"></script>
16
+ <link rel="stylesheet" crossorigin href="/assets/index-yR_bPMcB.css">
17
17
  </head>
18
18
  <!--
19
19
  Theme attributes (`theme-mode` for Semi UI + `data-theme` for our
@@ -314,7 +314,7 @@ function renderGettingStarted(locale, sectionIndex) {
314
314
  renderCommand({
315
315
  title: '安装调试工具',
316
316
  description: '在小游戏项目目录中安装并使用 `ttmg` CLI。安装完成后,后续调试、登录、配置和上传发布都通过这个工具进入。',
317
- command: 'npm install -g @ttmg/cli',
317
+ command: 'npm install -g @ttmg/cli@0.4.4-beta.1 --registry=https://registry.npmjs.org/',
318
318
  }),
319
319
  renderCommand({
320
320
  title: '登录开发账号',
@@ -343,7 +343,7 @@ function renderGettingStarted(locale, sectionIndex) {
343
343
  renderCommand({
344
344
  title: 'Install the Debugging Tool',
345
345
  description: 'Install and use the `ttmg` CLI in your mini-game project. Debugging, sign-in, configuration, and upload flows all start from this tool.',
346
- command: 'npm install -g @ttmg/cli',
346
+ command: 'npm install -g @ttmg/cli@0.4.4-beta.1 --registry=https://registry.npmjs.org/',
347
347
  }),
348
348
  renderCommand({
349
349
  title: 'Sign in with a Developer Account',
@@ -376,7 +376,7 @@ function renderIntro(locale, sectionIndex) {
376
376
  '- 如果你只是想把项目跑起来,先看“开始之前”和“开始调试”。',
377
377
  '- 如果你要确认项目配置是否完整,看“项目概览”。',
378
378
  '- 如果你要接入登录、分享、广告、内购、直玩卡等平台能力,看“接入助手”。',
379
- '- 如果你要优化 Unity Wasm 或了解待开放的非 Unity 子包收集,看“性能优化”。',
379
+ '- 如果你要优化 Unity Wasm 或使用非 Unity 子包收集,看“性能优化”。',
380
380
  '- 如果你准备提交预览版本,看“上传发布”。',
381
381
  '',
382
382
  ].join('\n');
@@ -390,7 +390,7 @@ function renderIntro(locale, sectionIndex) {
390
390
  '- To get the project running, start with “Before You Start” and “Start Debugging”.',
391
391
  '- To verify project setup, read “Project Overview”.',
392
392
  '- To integrate login, sharing, ads, IAP, direct-play cards, or other platform capabilities, read “Integration Assistant”.',
393
- '- To optimize Unity Wasm or preview the coming-soon non-Unity subpackage flow, read “Performance Optimization”.',
393
+ '- To optimize Unity Wasm or use Subpackage Collection for a non-Unity mini game, read “Performance Optimization”.',
394
394
  '- To prepare a preview build, read “Upload & Publish”.',
395
395
  '',
396
396
  ].join('\n');
@@ -487,9 +487,9 @@ function renderPerformanceOptimizationSection({ recipes, locale, sectionIndex })
487
487
  '',
488
488
  '### 如何选择',
489
489
  '',
490
- '- 非 Unity 小游戏可先了解“子包收集(待开放)”,并阅读[子包收集使用指南](https://bytedance.my.larkoffice.com/docx/MIyMdmzb0oOQAKxNHGNmR5hDyAh)。正式开放后,DevTool 会按真实启动路径采集预下载子包,并生成预加载配置。',
490
+ '- 非 Unity 小游戏可使用“子包收集”,并阅读[子包收集使用指南](https://bytedance.my.larkoffice.com/docx/MIyMdmzb0oOQAKxNHGNmR5hDyAh)DevTool 会按真实启动路径采集预下载子包,并生成预加载配置。',
491
491
  '- Unity 小游戏继续使用“Wasm 分包”,将 Wasm 代码拆分为按需加载的子包。',
492
- '- 两条链路面向不同运行时,不能混用。当前子包收集仅展示入口和边界,不代表能力已经正式开放。',
492
+ '- 两条链路面向不同运行时,不能混用。子包收集当前仅支持非 Unity 小游戏。',
493
493
  '',
494
494
  subpackage ? renderRecipeBlock(locale, subpackage, 3) : '',
495
495
  wasm ? renderRecipeBlock(locale, wasm, 3) : '',
@@ -501,9 +501,9 @@ function renderPerformanceOptimizationSection({ recipes, locale, sectionIndex })
501
501
  '',
502
502
  '### Choose the Right Flow',
503
503
  '',
504
- '- Non-Unity mini games can preview Subpackage Collection (Coming Soon) and read the [Subpackage Collection Guide](https://bytedance.my.larkoffice.com/docx/MIyMdmzb0oOQAKxNHGNmR5hDyAh). After release, DevTool will capture subpackages downloaded along the real startup path and generate preload configuration.',
504
+ '- Non-Unity mini games can use Subpackage Collection and read the [Subpackage Collection Guide](https://bytedance.my.larkoffice.com/docx/MIyMdmzb0oOQAKxNHGNmR5hDyAh). DevTool captures subpackages downloaded along the real startup path and generates preload configuration.',
505
505
  '- Unity mini games should continue to use Wasm Split to move Wasm code into on-demand subpackages.',
506
- '- These flows target different runtimes and are not interchangeable. The current Subpackage Collection page previews the entry and boundaries; it does not mean the feature is generally available.',
506
+ '- These flows target different runtimes and are not interchangeable. Subpackage Collection currently supports non-Unity mini games only.',
507
507
  '',
508
508
  subpackage ? renderRecipeBlock(locale, subpackage, 3) : '',
509
509
  wasm ? renderRecipeBlock(locale, wasm, 3) : '',
package/package.json CHANGED
@@ -1,20 +1,22 @@
1
1
  {
2
2
  "name": "@ttmg/cli",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "TikTok Mini Game Command Line Tool",
5
5
  "license": "ISC",
6
6
  "bin": {
7
- "ttmg": "./dist/index.js"
7
+ "ttmg": "dist/index.js"
8
8
  },
9
9
  "files": [
10
10
  "dist"
11
11
  ],
12
12
  "publishConfig": {
13
- "access": "public"
13
+ "access": "public",
14
+ "registry": "https://registry.npmjs.org/"
14
15
  },
15
16
  "scripts": {
16
17
  "prepublish": "npm run build",
17
18
  "build": "node scripts/build.js",
19
+ "publish:beta": "npm publish --registry=https://registry.npmjs.org/ --access public --tag beta",
18
20
  "setup": "node scripts/setup.js",
19
21
  "reset:local-state": "node scripts/resetLocalState.js",
20
22
  "dev:link": "npm run build && npm link",
@@ -1 +0,0 @@
1
- import{c as aa,b as F,f as pe,u as Oe,r as n,i as a,j as e,p as ta,k as sa,T as l,C as Z,B as L,m as S,d as ia,n as we,Q as ra,N as Ae,q as na,A as ca,P as la,D as da}from"./index-wqj8y8SZ.js";import{E as oa}from"./index-Db3F1FgQ.js";import{S as le}from"./SectionHeader-BL_bJf61.js";import{C as W,T as ua}from"./Tag-B4bSl-_E.js";import{P as pa}from"./index-QtH0wQu1.js";import{F as D}from"./baseForm-zW5Gb1OH.js";import{c as ga,i as ma}from"./index-CHODjAYV.js";import{L as ya}from"./list-checks-C4ci4EKo.js";import{S as ha}from"./sparkles-PwlPP_sT.js";import"./col-vAurEPaC.js";import"./index-BXllV1mP.js";const xa=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],fa=aa("book-open",xa);function ja(t={}){return F({url:"/game/direct-feed-card/list",method:"POST",data:t})}function _a(t={}){return F({url:"/game/direct-feed-card/scenarios",method:"POST",data:t})}function Pa(t){return F({url:"/game/direct-feed-card/create",method:"POST",data:t})}function va(t){return F({url:"/game/direct-feed-card/asset-preview",method:"POST",data:t})}function ba(t){return F({url:"/game/direct-feed-card/status",method:"POST",data:t})}function Na(t={}){return F({url:"/game/assets",method:"POST",data:t})}const Sa="fyf_promotion_direct_feed_play",De="direct-play-debug",de="__create_direct_play_card__",oe="recover_stamina_dynamic",Ca=0,ee=1,Ta=2,U=String(Ta),Ia={cardName:"",cardDesc:"",cardType:U,scenario:oe,subPkg:"__GAME__",params:""};function C(t,c){if(typeof t=="string"&&t.trim())return t;if(t&&typeof t=="object"){const i=t;if(i.errorMsg)return i.errorMsg;if(i.StatusMessage)return i.StatusMessage;if(i.message)return i.message}return c}function ka(t){return t?t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/1024/1024).toFixed(2)} MB`:"-"}function Ea(t){return t?new Date(t*1e3).toLocaleString():"-"}function wa(t){return t==="preview"?a("ia.directPlay.stage2.assetGroup.preview"):t==="live"?a("ia.directPlay.stage2.assetGroup.live"):a("ia.directPlay.stage2.assetGroup.review")}function Da(t){return{...t||Ae,scene:Sa}}function La(t){return t.pkgType==="independent"?t.independentPkg||t.pkgName||a("independentPackage"):a("gameMainPackage")}function J(t){return!t||t==="__GAME__"?a("gameMainPackage"):t}function $e(t){const c=String(t||"").trim();return c?c==="reward_issue_static"||c==="reward_issue_dynamic"?a("ia.directPlay.stage2.create.scenario.rewardIssue"):c==="recover_stamina_static"||c==="recover_stamina_dynamic"||c==="strength_recovery"?a("ia.directPlay.stage2.create.scenario.recoverStamina"):c==="unlock_level_static"||c==="unlock_level_dynamic"?a("ia.directPlay.stage2.create.scenario.unlockLevel"):c==="recall_scenario"?a("ia.directPlay.stage2.create.scenario.rewardIssue"):"":""}function R(t,c){if(!t)return"-";const i=$e(t);return i||(c?.[t]?c[t]:t)}function Ma(t){const c=String(t||"").trim();if(c.endsWith("_static"))return 1;if(c.endsWith("_dynamic"))return 2}function Le(t,c){const i=Number(c),p=t.cardType===void 0?Ma(t.value):Number(t.cardType);return p===void 0||p===i}function Me(t,c){const i=new Set;return t.filter(p=>{const d=R(p.value,c);return i.has(d)?!1:(i.add(d),!0)})}function Oa(t){return t?Number(t.audit_status)===1?a("ia.directPlay.stage2.cardStatus.approved"):Number(t.audit_status)===0||Number(t.status)===0?a("ia.directPlay.stage2.cardStatus.pending"):"":""}function ue(t){return Number(t?.status)===ee}function Aa(t){return t?ue(t)?a("ia.directPlay.stage3.cardStatus.online"):a("ia.directPlay.stage3.cardStatus.notOnline"):"-"}function $a(t,c){const i=t?.direct_feed_card||{},p=String(t?.content_id||i.content_id||"").trim();return p?{audit_status:Number(i.audit_status??1),status:Number(i.status??1),content_id:p,card_name:String(i.card_name||c.cardName),card_desc:String(i.card_desc||c.cardDesc),card_type:Number(i.card_type??c.cardType),scenario:String(i.scenario||c.scenario),sub_pkg:String(i.sub_pkg||c.subPkg),params:String(i.params||c.params||""),priority:i.priority===void 0?void 0:Number(i.priority)}:null}function X(){return[{value:oe,label:R(oe)}]}const Ka=()=>{const t=pe(),{state:{selectedLaunchOption:c,gameDetail:i,launchOptions:p,packages:d},setLaunchOptions:E,setSelectedLaunchOption:m}=Oe(),[T,B]=n.useState([]),[I,M]=n.useState([]),[_,V]=n.useState("select"),[j,Q]=n.useState(""),[O,ge]=n.useState(""),[me,Y]=n.useState(""),[ye,he]=n.useState(""),[xe,G]=n.useState(""),[fe,ae]=n.useState(""),[je,te]=n.useState(""),[_e,z]=n.useState(""),[Pe,se]=n.useState(""),[ve,be]=n.useState(!0),[Ke,Ne]=n.useState(!1),[Re,Se]=n.useState(!1),[Ce,Te]=n.useState(!1),[Ie,ie]=n.useState(U),[A,ke]=n.useState(X),k=n.useRef(null),re=n.useMemo(()=>Da(c),[c]),g=n.useMemo(()=>({appId:i?.app_id,clientKey:i?.client_key,miniGameId:i?.app_id}),[i?.app_id,i?.client_key]),u=n.useMemo(()=>T.find(s=>s.content_id===j)||null,[T,j]),$=n.useMemo(()=>I.find(s=>s.asset_id===O)||null,[I,O]),b=n.useMemo(()=>A.reduce((s,r)=>(r?.value&&(s[r.value]=$e(r.value)||(r.label&&r.label!==r.value?r.label:r.value)),s),{}),[A]),H=n.useMemo(()=>{const s=A.filter(o=>Le(o,Ie)),r=s.length>0?s:X();return Me(r,b).map(o=>({...o,label:R(o.value,b)}))},[Ie,b,A]),Fe=n.useMemo(()=>I.map(s=>({label:`${s.file_name||s.asset_id} · v${s.version||"-"}`,value:s.asset_id})),[I]),Ve=n.useMemo(()=>[{label:a("ia.directPlay.stage2.create.option"),value:de},...T.map(s=>({label:`${s.card_name} · ${R(s.scenario,b)} · ${J(s.sub_pkg)}`,value:s.content_id}))],[T,b]),Ge=n.useMemo(()=>[{label:a("ia.directPlay.stage2.create.cardType.fixed"),value:"1"},{label:a("ia.directPlay.stage2.create.cardType.dynamic"),value:"2"}],[]),qe=n.useMemo(()=>{const s=new Set(["__GAME__"]);return(d||[]).forEach(r=>{r?.type==="independent"&&r.name&&s.add(r.name)}),p.forEach(r=>{r.pkgType==="independent"&&r.independentPkg&&s.add(r.independentPkg)}),Array.from(s).map(r=>({label:J(r),value:r}))},[p,d]),Ue=n.useMemo(()=>e.jsxs("span",{className:"integration-assistant-direct-play-label-with-info",children:[e.jsx("span",{children:a("ia.directPlay.stage2.create.cardType")}),e.jsx(ta,{position:"top",trigger:"hover",showArrow:!0,content:e.jsxs("div",{className:"integration-assistant-direct-play-info-popover",children:[e.jsx(l.Text,{children:a("ia.directPlay.stage2.create.cardType.dynamicDesc")}),e.jsx(l.Text,{children:a("ia.directPlay.stage2.create.cardType.fixedDesc")})]}),children:e.jsx("span",{className:"integration-assistant-direct-play-info-icon","aria-label":"card type info",children:e.jsx(sa,{})})})]}),[]),Be=n.useCallback(s=>{const r=String(s||U);ie(r);const o=A.filter(h=>Le(h,r)),f=o.length>0?Me(o,b):X(),x=f[0]?.value,P=k.current?.getValue?.("scenario"),N=f.some(h=>h.value===P);k.current?.setValue?.("cardType",r),x&&!N&&k.current?.setValue?.("scenario",x)},[b,A]),w=n.useCallback(async s=>{be(!0),he("");try{const[r,o,f]=await Promise.allSettled([ja({appId:g.appId,clientKey:g.clientKey}),Na({appId:g.appId,miniGameId:g.miniGameId,clientKey:g.clientKey}),_a({appId:g.appId,clientKey:g.clientKey})]),x=r.status==="fulfilled"?r.value:null,P=o.status==="fulfilled"?o.value:null,N=f.status==="fulfilled"?f.value:null;if(r.status==="rejected"||x?.error||x?.code!==0||!x?.data)throw new Error(C(x?.error,a("ia.directPlay.stage2.loadCardsFailed")));if(o.status==="rejected"||P?.error||P?.code!==0||!P?.data)throw new Error(C(P?.error,a("ia.directPlay.stage2.loadAssetsFailed")));const h=x.data.cards||[],q=(P.data.preview_assets||[]).map(y=>({...y,group:"preview"}));B(h),M(q),N?.code===0&&N.data?.scenarios?.length?ke(N.data.scenarios):ke(y=>y.length>0?y:X()),Q(y=>{if(s?.contentId&&h.some(v=>v.content_id===s.contentId))return s.contentId;if(s?.cardName){const v=h.find(ce=>ce.card_name===s.cardName);if(v?.content_id)return v.content_id}return y&&h.some(v=>v.content_id===y)?y:h[0]?.content_id||""}),ge(y=>y&&q.some(v=>v.asset_id===y)?y:q[0]?.asset_id||"")}catch(r){he(C(r,a("ia.directPlay.stage2.loadResourcesFailed")))}finally{be(!1)}},[g.appId,g.clientKey,g.miniGameId]);n.useEffect(()=>{w()},[w]),n.useEffect(()=>{z(""),se("")},[j]),n.useEffect(()=>{const s=H[0]?.value;if(!s)return;const r=k.current?.getValue?.("scenario");H.some(f=>f.value===r)||k.current?.setValue?.("scenario",s)},[H]);const Qe=n.useCallback(()=>{const s={...re,id:De,name:a("ia.directPlay.stage1.generatedModeName")},r=p.filter(x=>x.id!==De),o=r.findIndex(x=>x.id==="created"),f=o>=0?[...r.slice(0,o),s,...r.slice(o)]:[...r,s];E(f),m(s),t("/")},[p,t,E,m,re]),Ye=n.useCallback(async()=>{try{const s=await k.current?.validate(),r=String(s?.cardName||"").trim(),o=String(s?.cardDesc||"").trim(),f=String(s?.scenario||"").trim(),x=String(s?.subPkg||"__GAME__").trim()||"__GAME__",P=String(s?.params||"").trim(),N=Number(s?.cardType||0);if(!r||!o||!f||!N)return;Se(!0),ae(""),te("");const h=await Pa({appId:g.appId,clientKey:g.clientKey,directFeedCard:{cardName:r,cardDesc:o,cardType:N,scenario:f,subPkg:x,params:P||void 0}});if(h?.error||h?.code!==0)throw new Error(C(h?.error,a("ia.directPlay.stage2.create.failed")));const q=String(h?.data?.content_id||h?.data?.direct_feed_card?.content_id||""),y=$a(h?.data,{cardName:r,cardDesc:o,cardType:N,scenario:f,subPkg:x,params:P});await w({contentId:q,cardName:r}),y&&(B(v=>{const ce=v.filter(ea=>ea.content_id!==y.content_id);return[y,...ce]}),Q(y.content_id)),V("select"),te(a("ia.directPlay.stage2.create.success")),G(""),Y(""),k.current?.reset?.(),ie(U)}catch(s){if(s?.name==="ValidateError")return;ae(C(s,a("ia.directPlay.stage2.create.failed")))}finally{Se(!1)}},[w,g.appId,g.clientKey]),ze=n.useCallback(s=>{if(s===de){V("create"),Q(""),G(""),Y("");return}V("select"),Q(s||"")},[]),He=n.useCallback(async()=>{if(!u?.content_id){z(a("ia.directPlay.stage3.selectRequired"));return}const s=ue(u)?Ca:ee,r=s===ee?a("ia.directPlay.stage3.publishFailed"):a("ia.directPlay.stage3.offlineFailed");Te(!0),z(""),se("");try{const o=await ba({appId:g.appId,clientKey:g.clientKey,contentStatus:{[u.content_id]:s}});if(o?.error||o?.code!==0)throw new Error(C(o?.error,r));await w({contentId:u.content_id}),se(s===ee?a("ia.directPlay.stage3.publishSuccess"):a("ia.directPlay.stage3.offlineSuccess"))}catch(o){z(C(o,r))}finally{Te(!1)}},[w,g.appId,g.clientKey,u]),We=n.useCallback(async()=>{if(!j||!O){G(a("ia.directPlay.stage2.selectRequired"));return}Ne(!0),G("");try{const s=await va({assetId:O,contentId:j});if(s?.error||s?.code!==0||!s?.data?.preview_url)throw new Error(C(s?.error,a("ia.directPlay.stage2.previewFailed")));Y(s.data.preview_url)}catch(s){Y(""),G(C(s,a("ia.directPlay.stage2.previewFailed")))}finally{Ne(!1)}},[O,j]),Je=ve||Ce,Xe=_==="select",Ze=!!u?.content_id,ne=ue(u),Ee=Je||!Xe||!Ze;return e.jsxs("div",{className:"integration-assistant-direct-play-grid",children:[e.jsxs(Z,{className:"integration-assistant-direct-play-card",bordered:!0,children:[e.jsx("div",{className:"integration-assistant-section-head",children:e.jsxs("div",{children:[e.jsx(l.Title,{heading:5,children:a("ia.directPlay.stage1.title")}),e.jsx(l.Paragraph,{className:"integration-assistant-section-desc",children:a("ia.directPlay.stage1.desc")})]})}),e.jsxs("div",{className:"integration-assistant-direct-play-summary",children:[e.jsxs("div",{className:"integration-assistant-direct-play-row",children:[e.jsx(l.Text,{strong:!0,children:a("ia.directPlay.stage1.modeName")}),e.jsx(l.Text,{children:a("ia.directPlay.stage1.modeValue")})]}),e.jsxs("div",{className:"integration-assistant-direct-play-row",children:[e.jsx(l.Text,{strong:!0,children:a("ia.directPlay.stage1.scene")}),e.jsx(l.Text,{children:a("scene_fyf_promotion_direct_feed_play")})]}),e.jsxs("div",{className:"integration-assistant-direct-play-row",children:[e.jsx(l.Text,{strong:!0,children:a("ia.directPlay.stage1.package")}),e.jsx(l.Text,{children:La(re)})]})]}),e.jsx("div",{className:"integration-assistant-actions",children:e.jsx(L,{theme:"solid",onClick:Qe,children:a("ia.directPlay.stage1.createQr")})})]}),e.jsxs(Z,{className:"integration-assistant-direct-play-card",bordered:!0,children:[e.jsx(S,{className:"integration-assistant-direct-play-banner integration-assistant-direct-play-banner-top",fullMode:!1,bordered:!1,closeIcon:null,type:"info",description:a("ia.directPlay.stage2.banner")}),e.jsx("div",{className:"integration-assistant-section-head",children:e.jsxs("div",{className:"integration-assistant-direct-play-stage-head",children:[e.jsx(l.Title,{heading:5,children:a("ia.directPlay.stage2.title")}),e.jsx(l.Paragraph,{className:"integration-assistant-section-desc",children:a("ia.directPlay.stage2.desc")})]})}),e.jsx(S,{className:"integration-assistant-direct-play-banner integration-assistant-direct-play-banner-inline",fullMode:!1,bordered:!1,closeIcon:null,type:"warning",description:a("ia.directPlay.versionNotice")}),ye?e.jsx(S,{className:"integration-assistant-direct-play-banner",fullMode:!1,bordered:!1,closeIcon:null,type:"danger",description:ye}):null,xe?e.jsx(S,{className:"integration-assistant-direct-play-banner",fullMode:!1,bordered:!1,closeIcon:null,type:"danger",description:xe}):null,fe?e.jsx(S,{className:"integration-assistant-direct-play-banner",fullMode:!1,bordered:!1,closeIcon:null,type:"danger",description:fe}):null,je?e.jsx(S,{className:"integration-assistant-direct-play-banner",fullMode:!1,bordered:!1,closeIcon:null,type:"success",description:je}):null,ve?e.jsx("div",{className:"integration-assistant-direct-play-loading",children:e.jsx(ia,{size:"large"})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"integration-assistant-direct-play-form",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"integration-assistant-direct-play-field-head",children:[e.jsx(l.Text,{strong:!0,children:a("ia.directPlay.stage2.cardSelect")}),e.jsx(L,{theme:"borderless",onClick:()=>w(),children:a("ia.directPlay.stage2.refresh")})]}),e.jsx(we,{className:"integration-assistant-direct-play-select",value:_==="create"?de:j||void 0,optionList:Ve,onChange:s=>ze(s),placeholder:a("ia.directPlay.stage2.cardSelect")})]}),_==="select"?e.jsxs("div",{children:[e.jsx(l.Text,{strong:!0,children:a("ia.directPlay.stage2.assetSelect")}),e.jsx(we,{className:"integration-assistant-direct-play-select",value:O||void 0,optionList:Fe,onChange:s=>ge(s),placeholder:a("ia.directPlay.stage2.assetSelect")})]}):null]}),_==="create"?e.jsx("div",{className:"integration-assistant-direct-play-create-wrap",children:e.jsxs("div",{className:"integration-assistant-direct-play-panel",children:[e.jsx(l.Text,{strong:!0,children:a("ia.directPlay.stage2.create.title")}),e.jsx(l.Paragraph,{className:"integration-assistant-section-desc",children:a("ia.directPlay.stage2.create.desc")}),e.jsx(D,{className:"integration-assistant-direct-play-create-form",initValues:Ia,getFormApi:s=>{k.current=s},onValueChange:s=>{if(ae(""),te(""),s&&typeof s=="object"&&"cardType"in s){const r=String(s.cardType||U);ie(r)}},children:e.jsxs("div",{className:"integration-assistant-direct-play-create-grid",children:[e.jsx(D.Input,{field:"cardName",label:a("ia.directPlay.stage2.create.cardName"),placeholder:a("ia.directPlay.stage2.create.cardNamePlaceholder"),rules:[{required:!0,message:a("notEmpty")}]}),e.jsx(D.Select,{field:"cardType",label:Ue,optionList:Ge,onChange:Be,rules:[{required:!0,message:a("notEmpty")}]}),e.jsx(D.Input,{field:"cardDesc",label:a("ia.directPlay.stage2.create.cardDesc"),placeholder:a("ia.directPlay.stage2.create.cardDescPlaceholder"),rules:[{required:!0,message:a("notEmpty")}]}),e.jsx(D.Select,{field:"subPkg",label:a("ia.directPlay.stage2.create.subPkg"),optionList:qe,rules:[{required:!0,message:a("notEmpty")}]}),e.jsx(D.Select,{field:"scenario",label:a("ia.directPlay.stage2.create.scenario"),optionList:H,rules:[{required:!0,message:a("notEmpty")}]}),e.jsx(D.Input,{field:"params",label:a("ia.directPlay.stage2.create.params"),placeholder:a("ia.directPlay.stage2.create.paramsPlaceholder")})]})}),e.jsx("div",{className:"integration-assistant-actions",children:e.jsx(L,{theme:"solid",type:"primary",loading:Re,onClick:Ye,children:a("ia.directPlay.stage2.create.submit")})})]})}):null,_==="select"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"integration-assistant-direct-play-details",children:[e.jsxs("div",{className:"integration-assistant-direct-play-panel",children:[e.jsx(l.Text,{strong:!0,children:a("ia.directPlay.stage2.selectedCard")}),u?e.jsxs("ul",{className:"integration-assistant-detail-list",children:[e.jsx("li",{children:`${a("ia.directPlay.stage2.cardName")}${u.card_name}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.cardContentId")}${u.content_id||"-"}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.cardDesc")}${u.card_desc||"-"}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.cardScenario")}${R(u.scenario,b)}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.cardStatus")}${Oa(u)||"-"}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.cardPackage")}${J(u.sub_pkg)}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.cardQueries")}${u.params||"-"}`})]}):e.jsx(l.Paragraph,{className:"integration-assistant-section-desc",children:a("ia.directPlay.stage2.emptyCard")})]}),e.jsxs("div",{className:"integration-assistant-direct-play-panel",children:[e.jsx(l.Text,{strong:!0,children:a("ia.directPlay.stage2.selectedAsset")}),$?e.jsxs("ul",{className:"integration-assistant-detail-list",children:[e.jsx("li",{children:`${a("ia.directPlay.stage2.assetGroup")}${wa($.group)}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.assetFile")}${$.file_name||"-"}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.assetVersion")}${$.version||"-"}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.assetSize")}${ka($.file_size)}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.assetUploaded")}${Ea($.uploaded_at)}`})]}):e.jsx(l.Paragraph,{className:"integration-assistant-section-desc",children:a("ia.directPlay.stage2.emptyAsset")})]})]}),e.jsx("div",{className:"integration-assistant-actions",children:e.jsx(L,{theme:"solid",loading:Ke,onClick:We,children:a("ia.directPlay.stage2.generate")})})]}):null,_==="select"&&me?e.jsxs("div",{className:"integration-assistant-direct-play-preview",children:[e.jsx("div",{className:"integration-assistant-direct-play-qr",children:e.jsx(ra,{value:me,size:180})}),e.jsx("div",{className:"integration-assistant-direct-play-preview-content",children:e.jsx(l.Text,{className:"integration-assistant-section-desc",children:a("ia.directPlay.stage2.qrDesc")})})]}):null]})]}),e.jsxs(Z,{className:"integration-assistant-direct-play-card integration-assistant-direct-play-card-wide",bordered:!0,children:[e.jsx(S,{className:"integration-assistant-direct-play-banner integration-assistant-direct-play-banner-top",fullMode:!1,bordered:!1,closeIcon:null,type:"warning",description:a("ia.directPlay.stage3.banner")}),e.jsx("div",{className:"integration-assistant-section-head",children:e.jsxs("div",{className:"integration-assistant-direct-play-stage-head",children:[e.jsx(l.Title,{heading:5,children:a("ia.directPlay.stage3.title")}),e.jsx(l.Paragraph,{className:"integration-assistant-section-desc",children:a("ia.directPlay.stage3.desc")})]})}),_e?e.jsx(S,{className:"integration-assistant-direct-play-banner",fullMode:!1,bordered:!1,closeIcon:null,type:"danger",description:_e}):null,Pe?e.jsx(S,{className:"integration-assistant-direct-play-banner",fullMode:!1,bordered:!1,closeIcon:null,type:"success",description:Pe}):null,e.jsxs("div",{className:"integration-assistant-direct-play-panel integration-assistant-direct-play-stage3-panel",children:[e.jsx(l.Text,{strong:!0,children:a("ia.directPlay.stage3.selectedCard")}),u?e.jsxs("ul",{className:"integration-assistant-detail-list",children:[e.jsx("li",{children:`${a("ia.directPlay.stage2.cardName")}${u.card_name}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.cardContentId")}${u.content_id||"-"}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.cardDesc")}${u.card_desc||"-"}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.cardScenario")}${R(u.scenario,b)}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.cardPackage")}${J(u.sub_pkg)}`}),e.jsx("li",{children:`${a("ia.directPlay.stage2.cardQueries")}${u.params||"-"}`}),e.jsx("li",{children:`${a("ia.directPlay.stage3.publishStatus")}${Aa(u)}`})]}):e.jsx(l.Paragraph,{className:"integration-assistant-section-desc",children:a("ia.directPlay.stage3.emptyCard")})]}),e.jsx("div",{className:"integration-assistant-actions",children:e.jsx(pa,{title:a(ne?"ia.directPlay.stage3.offlineConfirmTitle":"ia.directPlay.stage3.confirmTitle",{name:u?.card_name||"-",contentId:u?.content_id||"-"}),onConfirm:He,position:"topLeft",disabled:Ee,children:e.jsx(L,{theme:"solid",type:ne?"danger":"primary",loading:Ce,disabled:Ee,children:ne?a("ia.directPlay.stage3.offline"):a("ia.directPlay.stage3.publish")})})})]})]})},Ra={sidebar_revisit:{modeId:"sidebar-revisit-debug",scene:"center",sceneKey:"scene_center",titleKey:"ia.revisit.sidebar.panel.title",descKey:"ia.revisit.sidebar.panel.desc",modeValueKey:"ia.revisit.sidebar.panel.modeValue",generatedModeNameKey:"ia.revisit.sidebar.panel.generatedModeName",signalValueKey:"ia.revisit.sidebar.panel.signalValue",createQrKey:"ia.revisit.sidebar.panel.createQr"},shortcut_revisit:{modeId:"shortcut-revisit-debug",scene:"desktop_shortcut",sceneKey:"scene_shortcut",titleKey:"ia.revisit.shortcut.panel.title",descKey:"ia.revisit.shortcut.panel.desc",modeValueKey:"ia.revisit.shortcut.panel.modeValue",generatedModeNameKey:"ia.revisit.shortcut.panel.generatedModeName",signalValueKey:"ia.revisit.shortcut.panel.signalValue",createQrKey:"ia.revisit.shortcut.panel.createQr"}};function Fa(t,c){return{...t||Ae,scene:c}}function Va(t){return t.pkgType==="independent"?t.independentPkg||t.pkgName||a("independentPackage"):a("gameMainPackage")}const Ga=({capabilityKey:t})=>{const c=pe(),{state:{selectedLaunchOption:i,launchOptions:p},setLaunchOptions:d,setSelectedLaunchOption:E}=Oe(),m=Ra[t],T=n.useMemo(()=>Fa(i,m.scene),[m.scene,i]),B=n.useCallback(()=>{const I={...T,id:m.modeId,name:a(m.generatedModeNameKey)},M=p.filter(j=>j.id!==m.modeId),_=M.findIndex(j=>j.id==="created"),V=_>=0?[...M.slice(0,_),I,...M.slice(_)]:[...M,I];d(V),E(I),c("/")},[m.generatedModeNameKey,m.modeId,p,c,T,d,E]);return e.jsx("div",{className:"integration-assistant-direct-play-grid",children:e.jsxs(Z,{className:"integration-assistant-direct-play-card",bordered:!0,children:[e.jsx("div",{className:"integration-assistant-section-head",children:e.jsxs("div",{children:[e.jsx(l.Title,{heading:5,children:a(m.titleKey)}),e.jsx(l.Paragraph,{className:"integration-assistant-section-desc",children:a(m.descKey)})]})}),e.jsxs("div",{className:"integration-assistant-direct-play-summary",children:[e.jsxs("div",{className:"integration-assistant-direct-play-row",children:[e.jsx(l.Text,{strong:!0,children:a("ia.revisit.panel.modeName")}),e.jsx(l.Text,{children:a(m.modeValueKey)})]}),e.jsxs("div",{className:"integration-assistant-direct-play-row",children:[e.jsx(l.Text,{strong:!0,children:a("ia.revisit.panel.scene")}),e.jsx(l.Text,{children:a(m.sceneKey)})]}),e.jsxs("div",{className:"integration-assistant-direct-play-row",children:[e.jsx(l.Text,{strong:!0,children:a("ia.revisit.panel.launchParams")}),e.jsx(l.Text,{children:`scene=${m.scene}`})]}),e.jsxs("div",{className:"integration-assistant-direct-play-row",children:[e.jsx(l.Text,{strong:!0,children:a("ia.revisit.panel.package")}),e.jsx(l.Text,{children:Va(T)})]}),e.jsxs("div",{className:"integration-assistant-direct-play-row",children:[e.jsx(l.Text,{strong:!0,children:a("ia.revisit.panel.signal")}),e.jsx(l.Text,{children:a(m.signalValueKey)})]})]}),e.jsx("div",{className:"integration-assistant-actions",children:e.jsx(L,{theme:"solid",onClick:B,children:a(m.createQrKey)})})]})})},K=t=>a(t),et=()=>{const t=pe(),{capabilityKey:c}=na(),i=c?ga[c]:void 0;n.useEffect(()=>{i?.customPath&&t(i.customPath,{replace:!0})},[i,t]);const p=i?.actions.filter(d=>d.labelKey==="ia.action.openCapabilityDoc")||[];return!i||ma(i)?e.jsx("div",{className:"ia-page ia-page-detail",children:e.jsxs(W,{padding:"lg",children:[e.jsx(oa,{description:a("ia.detail.notFound")}),e.jsx("div",{className:"ia-back-row",children:e.jsx(L,{onClick:()=>t("/integration_assistant"),children:a("ia.detail.backToMap")})})]})}):e.jsxs("div",{className:"ia-page ia-page-detail",children:[e.jsxs("button",{type:"button",className:"ia-back-link",onClick:()=>t("/integration_assistant"),children:[e.jsx(ca,{size:14,strokeWidth:2}),e.jsx("span",{children:a("ia.detail.backToMap")})]}),e.jsx(la,{title:e.jsxs("span",{className:"ia-detail-title-row",children:[e.jsx("span",{className:"ia-detail-glyph","aria-hidden":"true",children:i.icon}),e.jsx("span",{children:K(i.titleKey)})]}),subtitle:K(i.summaryKey),action:p.length?e.jsx("div",{className:"ia-detail-actions",children:p.map(d=>d.href?e.jsx(da,{href:d.href,target:d.target||"_blank",children:K(d.labelKey)},`${d.type}:${d.href}:${d.labelKey}`):null)}):null}),i.apiTags.length?e.jsx("div",{className:"ia-detail-tags",children:i.apiTags.map(d=>e.jsx(ua,{tone:"neutral",size:"sm",children:e.jsx("code",{className:"ia-detail-tag-code",children:d})},d))}):null,e.jsxs("div",{className:"ia-detail-grid",children:[e.jsxs(W,{padding:"md",children:[e.jsx(le,{icon:fa,title:a("ia.section.prerequisites"),as:"h3"}),e.jsx("ul",{className:"ia-detail-list",children:i.prerequisiteKeys.map(d=>e.jsxs("li",{className:"ia-detail-list-item",children:[e.jsx("span",{className:"ia-detail-list-bullet","aria-hidden":"true"}),e.jsx("span",{children:K(d)})]},d))})]}),e.jsxs(W,{padding:"md",children:[e.jsx(le,{icon:ya,title:a("ia.section.steps"),as:"h3"}),e.jsx("ol",{className:"ia-detail-steps",children:i.stepKeys.map((d,E)=>e.jsxs("li",{className:"ia-detail-step",children:[e.jsx("span",{className:"ia-detail-step-index",children:E+1}),e.jsx("span",{className:"ia-detail-step-text",children:K(d)})]},d))})]}),e.jsxs(W,{padding:"md",children:[e.jsx(le,{icon:ha,title:a("ia.section.tips"),as:"h3"}),e.jsx("ul",{className:"ia-detail-list",children:i.tipKeys.map(d=>e.jsxs("li",{className:"ia-detail-list-item",children:[e.jsx("span",{className:"ia-detail-list-bullet","aria-hidden":"true"}),e.jsx("span",{children:K(d)})]},d))})]})]}),i.key==="direct_play_card"?e.jsx(Ka,{}):null,i.key==="sidebar_revisit"||i.key==="shortcut_revisit"?e.jsx(Ga,{capabilityKey:i.key}):null]})};export{et as IntegrationAssistantDetail};
@@ -1 +0,0 @@
1
- import{af as U,r as T,bF as J,bG as K,av as H,t as $,w as M,aN as _,bt as Q,R as o,z as P,M as I,J as t,y as L,aR as j,aM as ee,aS as te}from"./index-wqj8y8SZ.js";function ae(u){return T.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},u),T.createElement("path",{d:"M5 12.5c0-.83.67-1.5 1.5-1.5h11a1.5 1.5 0 0 1 0 3h-11A1.5 1.5 0 0 1 5 12.5Z",fill:"currentColor"}))}const se=U(ae,"checkbox_indeterminate");function ne(u){return T.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},u),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.41 7.3c.66.51.78 1.45.28 2.11l-6.5 8.5a1.5 1.5 0 0 1-2.37.01l-3.5-4.5a1.5 1.5 0 1 1 2.36-1.84L10 14.54l5.32-6.95a1.5 1.5 0 0 1 2.1-.28Z",fill:"currentColor"}))}const re=U(ne,"checkbox_tick");var R,w;function ie(){if(w)return R;w=1;var u=J(),e=K(),a="[object Boolean]";function s(r){return r===!0||r===!1||e(r)&&u(r)==a}return R=s,R}var oe=ie();const de=H(oe),G={PREFIX:`${$}-checkbox`,INPUT:`${$}-checkbox-input`,WRAPPER:""},le={PREFIX:`${$}-checkboxGroup`},p={DIRECTION_SET:["horizontal","vertical"],TYPE_DEFAULT:"default",TYPE_CARD:"card",TYPE_PURECARD:"pureCard",DEFAULT_DIRECTION:"vertical"};class ce extends M{constructor(e){super(Object.assign({},e)),this.clickState=!1,this.handleFocusVisible=a=>{const{target:s}=a;try{if(this.clickState){this.clickState=!1;return}s.matches(":focus-visible")&&this._adapter.setFocusVisible(!0)}catch{_(!0,"Warning: [Semi Checkbox] The current browser does not support the focus-visible")}},this.handleBlur=()=>{this.clickState=!1,this._adapter.setFocusVisible(!1)}}init(){const{children:e,extra:a,extraId:s,addonId:r}=this.getProps();e&&!r&&this._adapter.setAddonId(),a&&!s&&this._adapter.setExtraId()}notifyChange(e,a){const s=this._adapter.generateEvent(e,a);this._adapter.notifyChange(s)}handleChange(e){if(this.getProp("disabled"))return;if(e?.type==="click"&&(this.clickState=!0),this._adapter.focusCheckboxEntity(),this._adapter.getIsInGroup()){this._adapter.getGroupDisabled()||this.handleChangeInGroup(e);return}const l=!this.getState("checked");this._isControlledComponent("checked")?this.notifyChange(l,e):(this.setChecked(l),this.notifyChange(l,e))}handleChangeInGroup(e){const{value:a}=this.getProps(),l=!this._adapter.getGroupValue().includes(a),c=this._adapter.generateEvent(l,e);this._adapter.notifyChange(c),this._adapter.notifyGroupChange(c)}handleEnterPress(e){Q(e)&&this.handleChange(e)}setChecked(e){this._adapter.setNativeControlChecked(e)}destroy(){}}const N=o.createContext({});class A extends T.PureComponent{blur(){this.inputEntity.blur()}focus(){const{preventScroll:e}=this.props;this.inputEntity.focus({preventScroll:e})}render(){const{indeterminate:e,checked:a,disabled:s,prefixCls:r,name:l,isPureCardType:c,addonId:E,extraId:x,focusInner:f,onInputFocus:g,onInputBlur:m}=this.props,h=r||G.PREFIX,v=P({[`${h}-inner`]:!0,[`${h}-inner-checked`]:!!a,[`${h}-inner-pureCardType`]:c},G.WRAPPER),k=P({[`${h}-inner-display`]:!0,[`${h}-focus`]:f,[`${h}-focus-border`]:f&&!a}),C=a?o.createElement(re,null):e?o.createElement(se,null):null,i={type:"checkbox","aria-label":this.props["aria-label"],"aria-disabled":s,"aria-checked":a,"aria-labelledby":E,"aria-describedby":x||this.props["aria-describedby"],"aria-invalid":this.props["aria-invalid"],"aria-errormessage":this.props["aria-errormessage"],"aria-required":this.props["aria-required"],className:G.INPUT,onChange:I,checked:a,disabled:s,onFocus:g,onBlur:m};return l&&(i.name=l),o.createElement("span",{className:v},o.createElement("input",Object.assign({},i,{ref:b=>{this.inputEntity=b}})),o.createElement("span",{className:k},C))}}A.contextType=N;A.propTypes={"aria-describedby":t.string,"aria-errormessage":t.string,"aria-invalid":t.bool,"aria-labelledby":t.string,"aria-required":t.bool,checked:t.bool,disabled:t.bool,onChange:t.func,children:t.node,grouped:t.bool,value:t.any,isPureCardType:t.bool,addonId:t.string,extraId:t.string,focusInner:t.bool,onInputFocus:t.func,onInputBlur:t.func,preventScroll:t.bool};A.defaultProps={onChange:I};class y extends L{get adapter(){return Object.assign(Object.assign({},super.adapter),{setNativeControlChecked:e=>{this.setState({checked:e})},notifyChange:e=>{const{onChange:a}=this.props;a&&a(e)},generateEvent:(e,a)=>{const{props:s}=this;return{target:Object.assign(Object.assign({},s),{checked:e}),stopPropagation:()=>{a.stopPropagation()},preventDefault:()=>{a.preventDefault()},nativeEvent:{stopImmediatePropagation:()=>{a.nativeEvent&&typeof a.nativeEvent.stopImmediatePropagation=="function"&&a.nativeEvent.stopImmediatePropagation()}}}},getIsInGroup:()=>this.isInGroup(),getGroupValue:()=>this.context&&this.context.checkboxGroup.value||[],notifyGroupChange:e=>{this.context.checkboxGroup.onChange(e)},getGroupDisabled:()=>this.context&&this.context.checkboxGroup.disabled,setAddonId:()=>{this.setState({addonId:j({prefix:"addon"})})},setExtraId:()=>{this.setState({extraId:j({prefix:"extra"})})},setFocusVisible:e=>{this.setState({focusVisible:e})},focusCheckboxEntity:()=>{this.focus()}})}constructor(e){super(e),this.handleChange=s=>this.foundation.handleChange(s),this.handleEnterPress=s=>this.foundation.handleEnterPress(s),this.handleFocusVisible=s=>{this.foundation.handleFocusVisible(s)},this.handleBlur=s=>{this.foundation.handleBlur()};const a=!1;this.state={checked:e.checked||e.defaultChecked||a,addonId:e.addonId,extraId:e.extraId,focusVisible:!1},this.checkboxEntity=null,this.foundation=new ce(this.adapter)}componentDidUpdate(e){this.props.checked!==e.checked&&(ee(this.props.checked)?this.foundation.setChecked(!1):de(this.props.checked)&&this.foundation.setChecked(this.props.checked))}isInGroup(){return!!(this.context&&this.context.checkboxGroup&&"value"in this.props)}focus(){this.checkboxEntity&&this.checkboxEntity.focus()}blur(){this.checkboxEntity&&this.checkboxEntity.blur()}render(){const{disabled:e,style:a,prefixCls:s,className:r,indeterminate:l,children:c,onMouseEnter:E,onMouseLeave:x,extra:f,value:g,role:m,tabIndex:h,id:v,type:k}=this.props,{checked:C,addonId:i,extraId:b,focusVisible:V}=this.state,n={checked:C,disabled:e},O=this.isInGroup();if(O){if(this.context.checkboxGroup.value){const Z=(this.context.checkboxGroup.value||[]).includes(g);n.checked=Z}this.context.checkboxGroup.disabled&&(n.disabled=this.context.checkboxGroup.disabled||this.props.disabled);const{isCardType:D,isPureCardType:z}=this.context.checkboxGroup;n.isCardType=D,n.isPureCardType=z,n.name=this.context.checkboxGroup.name}else n.isPureCardType=k===p.TYPE_PURECARD,n.isCardType=k===p.TYPE_CARD||n.isPureCardType;const d=s||G.PREFIX,B=n.isCardType||n.isPureCardType,Y=P(d,{[`${d}-disabled`]:n.disabled,[`${d}-indeterminate`]:l,[`${d}-checked`]:n.checked,[`${d}-unChecked`]:!n.checked,[`${d}-cardType`]:n.isCardType,[`${d}-cardType_disabled`]:n.disabled&&n.isCardType,[`${d}-cardType_enable`]:!(n.disabled&&n.isCardType),[`${d}-cardType_checked`]:n.isCardType&&n.checked&&!n.disabled,[`${d}-cardType_checked_disabled`]:n.isCardType&&n.checked&&n.disabled,[r]:!!r,[`${d}-focus`]:V&&B}),q=P(`${d}-extra`,{[`${d}-cardType_extra_noChildren`]:n.isCardType&&!c});O&&this.context.checkboxGroup.name;const W=this.props["x-semi-children-alias"]||"children",X=()=>!c&&!f?null:o.createElement("div",{className:`${d}-content`},c?o.createElement("span",{id:i,className:`${d}-addon`,"x-semi-prop":W},c):null,f?o.createElement("div",{id:b,className:q,"x-semi-prop":"extra"},f):null);return o.createElement("span",Object.assign({role:m,tabIndex:h,style:a,className:Y,id:v,onMouseEnter:E,onMouseLeave:x,onClick:this.handleChange,onKeyPress:this.handleEnterPress,"aria-labelledby":this.props["aria-labelledby"]},this.getDataAttr(this.props)),o.createElement(A,Object.assign({},this.props,n,{addonId:c&&i,extraId:f&&b,isPureCardType:n.isPureCardType,ref:D=>{this.checkboxEntity=D},focusInner:V&&!B,onInputFocus:this.handleFocusVisible,onInputBlur:this.handleBlur})),X())}}y.contextType=N;y.propTypes={"aria-describedby":t.string,"aria-errormessage":t.string,"aria-invalid":t.bool,"aria-labelledby":t.string,"aria-required":t.bool,checked:t.bool,defaultChecked:t.bool,disabled:t.bool,indeterminate:t.bool,onChange:t.func,value:t.any,style:t.object,className:t.string,prefixCls:t.string,onMouseEnter:t.func,onMouseLeave:t.func,extra:t.node,index:t.number,"aria-label":t.string,tabIndex:t.number,preventScroll:t.bool,type:t.string};y.defaultProps={defaultChecked:!1,indeterminate:!1,onChange:I,onMouseEnter:I,onMouseLeave:I,type:"default"};y.elementType="Checkbox";class S extends M{static get checkboxGroupDefaultAdapter(){return{}}constructor(e){super(Object.assign(Object.assign({},S.checkboxGroupDefaultAdapter),e))}init(){const{defaultValue:e,value:a}=this.getProps();typeof e<"u"&&!Array.isArray(e)&&_(!0,"Warning: [Semi CheckboxGroup] defaultValue should be an Array"),typeof a<"u"&&!Array.isArray(a)&&_(!0,"Warning: [Semi CheckboxGroup] value should be an Array")}notifyChange(e){this._adapter.notifyChange(e)}handleChange(e){const a=this.getState("value");let s=[];Array.isArray(a)||(s=[a]),e.target.checked?s=[...a,e.target.value]:s=a.filter((l,c)=>l!==e.target.value),"value"in this.getProps()?this.notifyChange(s):(this._adapter.updateGroupValue(s),this.notifyChange(s))}getFormatName(){return this.getProp("name")||"default"}handlePropValueChange(e){Array.isArray(e)?this._adapter.updateGroupValue(e):(typeof e>"u"&&this._adapter.updateGroupValue([]),_(!0,"Warning: [Semi CheckboxGroup] value should be an Array"))}destroy(){}}class F extends L{get adapter(){return Object.assign(Object.assign({},super.adapter),{updateGroupValue:e=>{this.setState({value:e})},notifyChange:e=>{this.props.onChange&&this.props.onChange(e)}})}constructor(e){super(e),this.state={value:e.value||e.defaultValue},this.foundation=new S(this.adapter),this.onChange=this.onChange.bind(this)}componentDidMount(){this.foundation.init()}componentDidUpdate(e){te(e.value,this.props.value)||this.foundation.handlePropValueChange(this.props.value)}componentWillUnmount(){this.foundation.destroy()}onChange(e){this.foundation.handleChange(e)}render(){const{children:e,options:a,prefixCls:s,direction:r,className:l,id:c,style:E,type:x,disabled:f}=this.props,g=x===p.TYPE_PURECARD,m=x===p.TYPE_CARD||g,h=s||le.PREFIX,v=P({[h]:!0,[`${h}-wrapper`]:!0,[`${h}-${r}`]:r,[`${h}-${r}-cardType`]:r&&m,[`${h}-${r}-pureCardType`]:r&&g},l),k=this.state.value.slice();let C;return a?C=(a||[]).map((i,b)=>typeof i=="string"?o.createElement(y,{role:"listitem",key:b,disabled:this.props.disabled,value:i,prefixCls:s},i):o.createElement(y,{role:"listitem",key:b,disabled:i.disabled||this.props.disabled,value:i.value,prefixCls:s,extra:i.extra,className:i.className,style:i.style,onChange:i.onChange},i.label)):e&&(C=o.Children.toArray(e).map((i,b)=>o.cloneElement(i,{key:b,role:"listitem"}))),o.createElement("div",Object.assign({id:c,role:"list","aria-label":this.props["aria-label"],className:v,style:E,"aria-labelledby":this.props["aria-labelledby"],"aria-describedby":this.props["aria-describedby"]},this.getDataAttr(this.props)),o.createElement(N.Provider,{value:{checkboxGroup:{onChange:this.onChange,value:k,disabled:this.props.disabled,name:this.foundation.getFormatName(),isCardType:m,isPureCardType:g}}},C))}}F.propTypes={"aria-describedby":t.string,"aria-errormessage":t.string,"aria-invalid":t.bool,"aria-labelledby":t.string,"aria-required":t.bool,defaultValue:t.array,disabled:t.bool,name:t.string,options:t.array,value:t.array,onChange:t.func,children:t.node,prefixCls:t.string,direction:t.oneOf(p.DIRECTION_SET),className:t.string,type:t.oneOf([p.TYPE_DEFAULT,p.TYPE_CARD,p.TYPE_PURECARD]),style:t.object};F.defaultProps={disabled:!1,onChange:()=>{},type:p.TYPE_DEFAULT,defaultValue:[],direction:p.DEFAULT_DIRECTION};class he extends y{}he.Group=F;export{he as C,de as _,y as a,F as b};
@@ -1 +0,0 @@
1
- import{f as l,j as e,m as u,T as s,i,B as t,D as b}from"./index-wqj8y8SZ.js";const n="https://bytedance.larkoffice.com/wiki/PeIawT4M4ia9R8kYyLMcjwHknOg",g=[{titleKey:"basicDebugGuide.available.scan.title",descKey:"basicDebugGuide.available.scan.desc"},{titleKey:"basicDebugGuide.available.launch.title",descKey:"basicDebugGuide.available.launch.desc"},{titleKey:"basicDebugGuide.available.preview.title",descKey:"basicDebugGuide.available.preview.desc"},{titleKey:"basicDebugGuide.available.network.title",descKey:"basicDebugGuide.available.network.desc"},{titleKey:"basicDebugGuide.available.manual.title",descKey:"basicDebugGuide.available.manual.desc"}],r=[{titleKey:"basicDebugGuide.locked.project.title",descKey:"basicDebugGuide.locked.project.desc"},{titleKey:"basicDebugGuide.locked.upload.title",descKey:"basicDebugGuide.locked.upload.desc"},{titleKey:"basicDebugGuide.locked.platform.title",descKey:"basicDebugGuide.locked.platform.desc"}],o=["basicDebugGuide.step1","basicDebugGuide.step2","basicDebugGuide.step3","basicDebugGuide.step4"],m=()=>{const d=l();return e.jsxs("div",{className:"basic-debug-guide-page",children:[e.jsx(u,{className:"basic-debug-guide-banner",fullMode:!1,bordered:!1,closeIcon:null,type:"info",description:e.jsxs("div",{className:"basic-debug-guide-banner-copy",children:[e.jsx(s.Text,{strong:!0,children:i("basicDebugGuide.bannerTitle")}),e.jsx(s.Text,{children:i("basicDebugGuide.bannerDesc")})]})}),e.jsxs("section",{className:"basic-debug-guide-hero",children:[e.jsxs("div",{className:"basic-debug-guide-hero-copy",children:[e.jsx(s.Title,{heading:3,children:i("basicDebugGuide.title")}),e.jsx(s.Paragraph,{className:"basic-debug-guide-hero-desc",children:i("basicDebugGuide.desc")})]}),e.jsxs("div",{className:"basic-debug-guide-actions",children:[e.jsx(t,{theme:"solid",type:"primary",onClick:()=>d("/"),children:i("basicDebugGuide.actionScan")}),e.jsx(t,{theme:"light",onClick:()=>d("/network_diagnostics"),children:i("basicDebugGuide.actionNetwork")}),e.jsx(b,{href:n,children:i("basicDebugGuide.actionProxy")})]})]}),e.jsxs("section",{className:"basic-debug-guide-section",children:[e.jsxs("div",{className:"basic-debug-guide-section-head",children:[e.jsx(s.Text,{strong:!0,children:i("basicDebugGuide.availableTitle")}),e.jsx(s.Text,{className:"basic-debug-guide-section-desc",children:i("basicDebugGuide.availableDesc")})]}),e.jsx("div",{className:"basic-debug-guide-list",children:g.map((c,a)=>e.jsxs("div",{className:"basic-debug-guide-item",children:[e.jsx("span",{className:"basic-debug-guide-item-index",children:a+1}),e.jsxs("div",{className:"basic-debug-guide-item-copy",children:[e.jsx(s.Text,{strong:!0,children:i(c.titleKey)}),e.jsx(s.Text,{children:i(c.descKey)})]})]},c.titleKey))})]}),e.jsxs("section",{className:"basic-debug-guide-section",children:[e.jsxs("div",{className:"basic-debug-guide-section-head",children:[e.jsx(s.Text,{strong:!0,children:i("basicDebugGuide.lockedTitle")}),e.jsx(s.Text,{className:"basic-debug-guide-section-desc",children:i("basicDebugGuide.lockedDesc")})]}),e.jsx("div",{className:"basic-debug-guide-list",children:r.map((c,a)=>e.jsxs("div",{className:"basic-debug-guide-item basic-debug-guide-item-muted",children:[e.jsx("span",{className:"basic-debug-guide-item-index",children:a+1}),e.jsxs("div",{className:"basic-debug-guide-item-copy",children:[e.jsx(s.Text,{strong:!0,children:i(c.titleKey)}),e.jsx(s.Text,{children:i(c.descKey)})]})]},c.titleKey))})]}),e.jsxs("section",{className:"basic-debug-guide-section",children:[e.jsxs("div",{className:"basic-debug-guide-section-head",children:[e.jsx(s.Text,{strong:!0,children:i("basicDebugGuide.stepsTitle")}),e.jsx(s.Text,{className:"basic-debug-guide-section-desc",children:i("basicDebugGuide.stepsDesc")})]}),e.jsx("div",{className:"basic-debug-guide-steps",children:o.map((c,a)=>e.jsxs("div",{className:"basic-debug-guide-step",children:[e.jsx("span",{className:"basic-debug-guide-step-index",children:a+1}),e.jsx(s.Text,{children:i(c)})]},c))}),e.jsxs("div",{className:"basic-debug-guide-command-list",children:[e.jsxs("div",{className:"basic-debug-guide-command-item",children:[e.jsx(s.Text,{type:"tertiary",children:i("basicDebugGuide.commandProxy")}),e.jsx("code",{children:"ttmg config set proxy http://127.0.0.1:7890"}),e.jsx(s.Text,{type:"tertiary",children:i("basicDebugGuide.commandProxyHint")})]}),e.jsxs("div",{className:"basic-debug-guide-command-item",children:[e.jsx(s.Text,{type:"tertiary",children:i("basicDebugGuide.commandLogin")}),e.jsx("code",{children:"ttmg login"})]}),e.jsxs("div",{className:"basic-debug-guide-command-item",children:[e.jsx(s.Text,{type:"tertiary",children:i("basicDebugGuide.commandDev")}),e.jsx("code",{children:"ttmg dev"})]})]})]})]})};export{m as BasicDebugGuide};
@@ -1 +0,0 @@
1
- import{r as e,c as f,f as u,j as r,m as x,T as i,i as a,B as M,D as Z}from"./index-wqj8y8SZ.js";var g=Object.defineProperty,d=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,h=(c,l,t)=>l in c?g(c,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[l]=t,I=(c,l)=>{for(var t in l||(l={}))k.call(l,t)&&h(c,t,l[t]);if(d)for(var t of d(l))w.call(l,t)&&h(c,t,l[t]);return c};function _(c){return e.createElement("svg",I({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,"aria-hidden":!0},c),e.createElement("rect",{width:200,height:200,fill:"transparent"}),e.createElement("path",{d:"M74.7 78.6c20.78-6.32 57.55-12.26 71.81-9.86 4.21.7 8.12 1.98 11.36 3.42-.51-1.69-.95-3.5-1.38-5.3l-.04-.18c-1.03-4.27-2.05-8.44-3.95-10.55-4.8-5.32.67-10.12.67-10.12l.93-10.53c13.02 4.82 21.65 14.92 27 25.08 4.57 8.67 6.75 17.37 7.25 22.89 1.06 12-8.18 18.86-19.2 18.86-9.74 0-18.36-1.64-24.81-3.1.64 2.18 5.44 19.18 7.53 32.66l-46.15.58-7.58-14.68-4.66-12.26c-19.46 7.46-50.77 19.02-64.9 18.44-10.35-.42-15.68-15.68-17.44-28.7a71.55 71.55 0 0 1-.67-9.4c0-5.64.3-12.18 2.22-17.89.74-2.21 1.73-4.3 3.04-6.17a18.1 18.1 0 0 1 4.6-4.59c0 4-1.02 13.54 2.8 14.12 5.06.78 10.4-9.08 13.85-7.06 3.87 2.27-1.65 16.34-1.33 17.2.27.7.53 1.4.76 2.07a48.99 48.99 0 0 1 2.25 8.55C46.59 87.56 60 83.06 74.69 78.6Z",fill:"white"}),e.createElement("path",{d:"M181.1 60.56c4.57 8.67 6.75 17.37 7.25 22.89 1.06 12-8.18 18.86-19.2 18.86-9.74 0-18.36-1.64-24.81-3.1m36.77-38.65c-5.36-10.16-13.99-20.26-27-25.08l-.94 10.53s-5.46 4.8-.67 10.12c1.9 2.11 2.92 6.28 3.95 10.55m24.66-6.12c-6-.37-18.32.8-24.66 6.12m0 0c1.57 6.53 3.15 13.3 7.91 13.3 7.2 0-3.6-8.84-17.85-11.24-14.25-2.4-51.03 3.54-71.82 9.86-20.78 6.32-39.04 12.71-42.77 19.1-3.63 6.23 13.24 10.92 4.49-14.17m0 0c-.23-.67-.49-1.36-.76-2.08-.32-.85 5.2-14.92 1.33-17.19-3.45-2.02-8.8 7.84-13.85 7.06-3.82-.58-2.8-10.12-2.8-14.12a18.1 18.1 0 0 0-4.6 4.6M36.4 83.52c-7.27 1.58-21.92 8.1-25.27 11.73m0 0a71.55 71.55 0 0 1-.67-9.41c0-5.64.3-12.18 2.22-17.89m-1.55 27.3c1.76 13 7.09 28.27 17.45 28.7 14.12.57 45.43-10.99 64.89-18.45l4.66 12.26 7.58 14.68 46.15-.58c-2.09-13.48-6.89-30.48-7.53-32.67M15.73 61.8c-.98 3-1.08 5.5.19 7.8m-.2-7.8a24.08 24.08 0 0 0-3.03 6.16m0 0a5.43 5.43 0 0 0 1.25 4.22m130.4 27.02c-.9-3.08-3.12-9.95-4.76-12.76",stroke:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m156.89 15.66-2.04 27.96 2.57 28.1c-7.51-3.07-13.32-4.34-27.25-3.36-11.94.83-31.75 3.95-46.23 7.62-16.66 4.27-37.81 11.64-45.21 15.9-.77-4.64-2.92-10.15-2.92-10.15-.07-.7 2.63-8.32 2.73-13.06.08-3.08-.91-4.45-2.33-4.75a3.47 3.47 0 0 0-2.05.35c-.63.32-.86.48-1.38.84-1.34.98-2.38 2.02-3.95 3.34a17.14 17.14 0 0 1-3.04 2.17 4.6 4.6 0 0 1-2.89.63c-.63-.1-1.21-.47-1.71-1.58l-.07-.89c-.5-5.79-2.7-20.12-2.7-34.91 0-7.74 1.61-10.04 2.7-11.59l.13-.18c3.85-5.53 13.67-6.75 23.12-6.96 2.5-.14 5.2-.2 8.1-.17l.11.15H53.15l-.52.07 18.32 25.49-3.62 14.08 10.2 15.98-2.84-16.49 10-11.99-3.5-27.7s8.78-.5 19.47-1.77c10.69-1.28 18.47-1.9 29.42-1.83 1.64.01 3.4.1 5.23.22 9.64.65 18.55 2.56 21.46 4.4l.13.09h-.01Z",fill:"var(--semi-color-primary-light-default)"}),e.createElement("path",{d:"M143 27.91a1.38 1.38 0 0 1 1.77-.85c.5.18.98.41 1.44.71a1.38 1.38 0 0 1-1.53 2.31c-.26-.17-.53-.3-.82-.4a1.38 1.38 0 0 1-.85-1.77Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M140.65 28.12c.21.74-.21 1.5-.95 1.72-.36.1-.73.22-1.11.36a1.38 1.38 0 1 1-.95-2.6c.43-.16.87-.3 1.3-.43.74-.2 1.5.22 1.71.95Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M134.74 30.4c.37.67.14 1.51-.53 1.89l-1.07.62a1.38 1.38 0 1 1-1.41-2.38l1.12-.65a1.38 1.38 0 0 1 1.89.52Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M97.86 31.43h.76a1.38 1.38 0 1 1-.06 2.77h-.52a6.7 6.7 0 0 0-.57.1 1.38 1.38 0 0 1-.64-2.68c.33-.08.64-.14.94-.18l.09-.01Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M147.78 31.75c.73-.23 1.5.19 1.72.92.13.43.25.88.35 1.35a1.38 1.38 0 0 1-2.7.58c-.1-.4-.19-.78-.3-1.13-.22-.73.2-1.5.93-1.72Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M102.27 33.13c.19-.75.94-1.2 1.68-1.01.45.11.89.23 1.3.37a1.38 1.38 0 0 1-.84 2.63c-.36-.11-.73-.22-1.13-.32a1.38 1.38 0 0 1-1-1.67Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M129.3 33.68c.42.64.25 1.5-.4 1.92l-.52.34-.53.36a1.38 1.38 0 0 1-1.53-2.31l.32-.21.21-.14.3-.2.23-.15c.64-.42 1.5-.25 1.92.39Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M108.25 35.22c.36-.67 1.2-.92 1.88-.55a246.5 246.5 0 0 1 1.11.61 1.38 1.38 0 0 1-1.33 2.43l-.5-.28h-.01l-.6-.34a1.38 1.38 0 0 1-.55-1.87Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M92.83 35.77c.76-.01 1.4.6 1.4 1.36.01.16.03.34.07.55a1.38 1.38 0 1 1-2.7.58 5.62 5.62 0 0 1-.13-1.08c-.01-.76.6-1.4 1.36-1.4Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M124 37.2c.31.7 0 1.51-.7 1.82a6.07 6.07 0 0 1-1.44.45 1.38 1.38 0 1 1-.67-2.68l.58-.16c.1-.03.24-.07.42-.15.7-.3 1.51.02 1.82.72Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M113.9 38.14c.15-.75.89-1.22 1.63-1.06.35.07.72.13 1.1.16a1.38 1.38 0 0 1-.26 2.76c-.49-.05-.96-.12-1.41-.22a1.38 1.38 0 0 1-1.07-1.64Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M148.98 37.95c.76-.01 1.4.6 1.4 1.36a38.45 38.45 0 0 1 0 1.42 1.38 1.38 0 0 1-2.77-.08 24.28 24.28 0 0 0 0-1.3c0-.76.6-1.39 1.37-1.4Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M148.6 44.88c.75.16 1.22.9 1.06 1.65-.1.47-.22.94-.34 1.41a1.38 1.38 0 1 1-2.68-.7c.12-.43.22-.87.31-1.3.17-.75.9-1.22 1.65-1.06Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M146.69 51.6c.7.31 1 1.13.7 1.83-.2.44-.41.88-.63 1.31a1.38 1.38 0 0 1-2.48-1.24c.2-.4.4-.8.58-1.2.31-.7 1.13-1.01 1.83-.7Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M41.67 55.45c.07.77-.5 1.44-1.25 1.5-.43.04-.86.1-1.26.19a1.38 1.38 0 1 1-.54-2.72c.5-.1 1.02-.17 1.55-.22.76-.07 1.43.5 1.5 1.25Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M44.58 55.78c.22-.73 1-1.15 1.72-.93l.74.23a1.38 1.38 0 1 1-.9 2.62l-.62-.2a1.38 1.38 0 0 1-.94-1.72Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M91.9 56.9c.05.76-.52 1.42-1.29 1.47-.44.02-.89.06-1.32.11a1.38 1.38 0 0 1-.31-2.75c.48-.05.96-.1 1.45-.13.77-.05 1.42.53 1.47 1.3Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M94.72 56.95c.07-.76.74-1.33 1.5-1.26l1.43.14a1.38 1.38 0 0 1-.32 2.75c-.45-.05-.9-.1-1.35-.13a1.38 1.38 0 0 1-1.26-1.5Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M101.64 57.83c.16-.75.9-1.22 1.64-1.07l1.39.31a1.38 1.38 0 1 1-.62 2.7l-1.34-.3a1.38 1.38 0 0 1-1.07-1.64Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M34.85 57.26c.48.6.39 1.46-.2 1.94-.33.27-.63.55-.9.84a1.38 1.38 0 0 1-2.03-1.89c.36-.39.76-.75 1.18-1.1.6-.48 1.46-.39 1.95.2Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M85 57.9c.29.71-.06 1.51-.78 1.8a15.8 15.8 0 0 0-1.26.54 1.38 1.38 0 1 1-1.15-2.52 71.64 71.64 0 0 1 1.4-.6c.71-.28 1.52.07 1.8.78Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M143.4 57.76c.61.47.72 1.34.26 1.95-.3.39-.62.77-.94 1.14a1.38 1.38 0 0 1-2.09-1.81 24 24 0 0 0 .84-1.03c.47-.6 1.33-.71 1.94-.25Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M108.43 59.46c.22-.74.99-1.15 1.72-.93l1.35.41a1.38 1.38 0 1 1-.82 2.64l-1.32-.4a1.38 1.38 0 0 1-.93-1.72Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M115.08 61.58a1.38 1.38 0 0 1 1.77-.82l1.32.48a1.38 1.38 0 0 1-.97 2.6c-.43-.17-.87-.33-1.3-.48a1.38 1.38 0 0 1-.82-1.78Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M138.67 62.89c.42.64.25 1.5-.4 1.92-.41.27-.85.54-1.29.78a1.38 1.38 0 0 1-1.32-2.43c.37-.2.73-.43 1.1-.66.63-.42 1.49-.25 1.91.39Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M30.5 62.78c.77.07 1.33.74 1.26 1.5l-.03.59.01.75-1.6 1.4a1.38 1.38 0 0 1-1.16-1.32l-.02-.83c0-.28.02-.56.04-.84.07-.76.75-1.32 1.5-1.25Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M121.6 64.07c.3-.7 1.1-1.04 1.8-.75a146.8 146.8 0 0 1 1.26.52 1.38 1.38 0 1 1-.97 2.59 19.62 19.62 0 0 1-1.35-.55c-.7-.3-1.04-1.1-.74-1.81Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M72.11 64.94c.48.6.4 1.47-.2 1.95-.38.3-.74.62-1.09.92A1.38 1.38 0 1 1 69 65.73c.37-.33.76-.66 1.17-.99.59-.48 1.46-.39 1.94.2Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M132.4 65.92c.09.76-.46 1.44-1.22 1.53-.5.05-1.02.08-1.53.09a1.38 1.38 0 1 1-.02-2.77c.42 0 .84-.03 1.25-.07.76-.09 1.44.46 1.53 1.22Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M66.66 69.9c.57.52.6 1.4.09 1.96l-.73.8-.02.02-.16.18-.08.09a1.38 1.38 0 0 1-2.05-1.86l.25-.28.75-.82c.51-.56 1.39-.6 1.95-.09Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M61.6 75.28c.45.61.31 1.48-.3 1.93-.44.31-.88.61-1.36.89a1.38 1.38 0 1 1-1.4-2.4c.4-.22.77-.46 1.12-.72a1.38 1.38 0 0 1 1.94.3Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M37.67 75.97c.42.19.86.37 1.35.53a1.38 1.38 0 0 1-.89 2.62c-.56-.19-1.1-.4-1.6-.63l.72-2.63c.14.01.28.05.42.11Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M55.05 78.57c.12.75-.4 1.46-1.15 1.58-.5.08-1 .15-1.54.2a1.38 1.38 0 1 1-.28-2.75c.49-.05.95-.11 1.39-.18.75-.12 1.46.4 1.58 1.15Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M43.4 78.87c.06-.76.73-1.33 1.49-1.27a38.43 38.43 0 0 0 1.5.1 1.38 1.38 0 1 1-.12 2.76 62.94 62.94 0 0 1-1.6-.1 1.38 1.38 0 0 1-1.27-1.49Z",fill:"var(--semi-color-primary)"}),e.createElement("g",{clipPath:"url(#clip_failure_96_39_65)"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M30.9 46.87a13.45 13.45 0 0 1 9.37-16.53 13.46 13.46 0 0 1 16.52 9.39c2.64 9.56-4.76 29.27-5.14 29.9a.75.75 0 0 1-.99.27c-.64-.34-17.11-13.47-19.76-23.03Zm14.36 1.54a6.1 6.1 0 0 1-3.25-11.75 6.1 6.1 0 0 1 3.25 11.75Z",fill:"var(--semi-color-primary)"})),e.createElement("path",{d:"M102.31 100.69c-2.8 1.55-5.63 2.85-9.36 4.58l1.48 3.92c2.14-.96 6.16-6.03 7.88-8.5Z",fill:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M121 63.04c8.85 2.1 12.43-6.5 13.12-8.77.68-2.27-5.6-11.86-8-11.2l-.42.12-.23.06c-3.1.82-11.15 2.94-12.35 8-1.3 5.46 2.4 10.49 7.88 11.79Z",fill:"#515151"}),e.createElement("path",{d:"M134.5 64.73c-.43.47-1.2.74-2.33.73a12.7 12.7 0 0 1-4.06-.86 31.25 31.25 0 0 1-9.94-6.22c-3.25-2.97-5.97-5.8-7.59-8.42-1.61-2.61-2.05-4.88-.98-6.84a3.7 3.7 0 0 1 2.11-1.86 4.53 4.53 0 0 1 2.9.15c2.16.76 4.57 2.83 6.48 6.02 3.4 5.63 6.89 8.23 9.7 10.33.49.35.95.7 1.38 1.03a7.29 7.29 0 0 1 2.61 3.48c.34 1.1.16 1.97-.28 2.46Z",fill:"white",stroke:"#515151"}),e.createElement("mask",{id:"mask_failure_130_526","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:98,y:44,width:36,height:27},e.createElement("path",{d:"M130.53 62.1c-.5-3.3-9.52-14.75-16.08-15.03l-12.68 4.52 6.47 14.16 17.25 3.07c1.84-1.14 5.43-4.07 5.04-6.72Z",fill:"#C4C4C4"})),e.createElement("g",{mask:"url(#mask_failure_130_526)"},e.createElement("path",{d:"M127.2 63.62a9.74 9.74 0 0 1-13.76.5 9.74 9.74 0 0 1-.32-13.77 9.74 9.74 0 0 1 13.77-.5 9.74 9.74 0 0 1 .32 13.77Z",fill:"white",stroke:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m116.79 47.35-.02.37c2.86.5 8.57 2.59 8.58 6.87 0 5.36-7.44 9.34-14.47 3.46-.34-.28-.66-.53-.95-.74a10.09 10.09 0 0 0 3.17 7.17 10.24 10.24 0 0 0 14.47-.52 10.24 10.24 0 0 0-.34-14.47 10.16 10.16 0 0 0-10.44-2.14Z",fill:"#515151"}),e.createElement("path",{d:"M119.34 55a.79.79 0 1 0-1.1-1.12.79.79 0 0 0 1.1 1.12Z",fill:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.98 50.72c.21-.09.45.01.54.22a7.87 7.87 0 0 0 1.84 2.65.41.41 0 1 1-.55.62 8.67 8.67 0 0 1-2.05-2.95.41.41 0 0 1 .22-.54Z",fill:"#515151"}),e.createElement("path",{d:"M114.85 52.4a.79.79 0 1 0-1.1-1.1.79.79 0 0 0 1.1 1.1Z",fill:"#515151"}),e.createElement("mask",{id:"path-18-inside-1",fill:"white"},e.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)"})),e.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)",fill:"white"}),e.createElement("path",{d:"m128.42 60.04.01-.01a.03.03 0 0 1 .02 0l-4.12 4.37a5.98 5.98 0 0 0 8.45-.25l-4.36-4.11Zm.03 0v.02l-4.37-4.11a5.98 5.98 0 0 0 .25 8.45l4.12-4.37Zm0 .03h-.01a.03.03 0 0 1-.02 0l4.12-4.37a5.98 5.98 0 0 0-8.46.25l4.37 4.12Zm-.03 0v-.03l4.37 4.11a5.98 5.98 0 0 0-.25-8.45l-4.12 4.37Z",fill:"#515151",mask:"url(#path-18-inside-1)"})),e.createElement("path",{d:"M145.63 40.19c1.37-2.75 12.75 2.35 16.14 6.78 3.38 4.43 1.48 10.74-1.9 9.68-6.69-2.12-7.56-6.7-7.94-9.48-1.2-1.85-7.67-4.24-6.3-6.98Z",fill:"white",stroke:"#515151"}),e.createElement("path",{d:"m158.95 41.56 6.64 2.52 1.66 12.47-8.3 1.98-3.47-12.03 3.47-4.94Z",fill:"white"}),e.createElement("path",{d:"M167.3 151.94c5.19 1.66 23.35 35.57 19.05 35.57-13.86 0-34.5.53-71.42.53-15.63 0-17.9-5.16-11.79-22.08a353.23 353.23 0 0 1 6.14-15.76l32.5 1.26c-.43 1.53-.91 3.07-1.38 4.4a26.82 26.82 0 0 1 8.73-1.47c5.27 0 7.04 1.4 11.77 0 2.13-.62 4.8-2.97 6.4-2.45Z",fill:"white",className:""}),e.createElement("path",{d:"M140.4 155.87c.47-1.34.95-2.88 1.38-4.4l-32.5-1.27a353.23 353.23 0 0 0-6.14 15.76c-6.1 16.92-3.84 22.08 11.79 22.08 36.93 0 57.56-.53 71.42-.53 4.3 0-13.86-33.91-19.06-35.57-1.6-.52-4.26 1.83-6.4 2.45-4.72 1.4-6.5 0-11.76 0-3.08 0-6.06.55-8.72 1.48Zm0 0a26.67 26.67 0 0 1-4.44 8.38c-1.7 2.22-3.99 4.43-5.43 4.33-1.44-.1-1.42-3.18 0-5.66 1.97-3.44 6.45-5.87 9.88-7.05Z",stroke:"#1C1F23",className:""}),e.createElement("path",{d:"M149.25 131.7s3.36 19.46-12.34 21.04c-11.53 1.15-40.77-4.55-53.76-7.79 4.72 12.82 9.61 39.86 7 42.16-3.33 2.93-47.55 1.76-55.96 0-8.42-1.75 13.82-11.46 15.45-14.66 2.99-5.84-5.48-21.18-5.75-45.45-.27-24.27 18.18-24.86 34.47-21.64 13.02 2.57 41.63 18.33 52.56 26.86l18.33-.52Z",fill:"white",stroke:"#515151"}),e.createElement("path",{d:"M141.5 153.87c-3.11 2.55-27.72 5-35.58 3.53l2.75-6.8c20.23 2.85 28.08 3.34 33.46 1.16l-.63 2.11Z",fill:"#515151",className:"__web-inspector-hide-shortcut__"}),e.createElement("path",{d:"M141.5 153.87c-3.11 2.55-27.72 5-35.58 3.53l2.75-6.8c20.23 2.85 28.08 3.34 33.46 1.16l-.63 2.11Z",fill:"#515151"}),e.createElement("path",{d:"M126.02 142.7c-3.1-2.99-4.99-7.5-4.16-12.35",stroke:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M130.6 95.65c-9.03-10.98-18.97-19.74-25.5-24.56l1.63-2.22c6.7 4.95 16.81 13.86 26 25.02 9.18 11.16 17.54 24.67 20.59 38.83l-2.7.59c-2.91-13.56-10.97-26.67-20.02-37.66Z",fill:"#515151"}),e.createElement("path",{d:"m149.12 107.09-16.36 13.2 22.27 17.8 8.87-19.19c-.14-3.93-2.34-5.34-5.83-4.66l-3.12-2.5c.08-3.5-2.18-5.64-5.83-4.65Z",fill:"#E6E8EA"}),e.createElement("path",{d:"m148.24 128.62 9.45-14.34-2.91-2.33-10.94 13.07 4.4 3.6Z",stroke:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M143.67 127.98a6.93 6.93 0 1 1-10.82-8.65 6.93 6.93 0 0 1 10.82 8.65Zm12.28 9.82a6.93 6.93 0 1 1-10.82-8.66 6.93 6.93 0 0 1 10.82 8.66Z",fill:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m133.43 123.46 9.21-1.8.32 1.61-9.2 1.81-.33-1.62Z",fill:"white"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m145.5 133.11 9.21-1.8.32 1.62-9.2 1.8-.33-1.62Z",fill:"white"}),e.createElement("defs",null,e.createElement("clipPath",{id:"clip_failure_96_39_65"},e.createElement("rect",{width:44.4004,height:44.4627,transform:"matrix(0.963965 -0.266028 0.266198 0.963918 18.4214 34.6221)",fill:"white"}))))}var N=_;const R=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],P=f("shield-alert",R);const b=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],T=f("wifi-off",b),O="https://bytedance.larkoffice.com/wiki/PeIawT4M4ia9R8kYyLMcjwHknOg",D=({errorMsg:c,errorState:l="unknown"})=>{const t=u(),o=l==="notLoggedIn"||l==="loginExpired",m=l==="noPermission",n=l==="networkProxy",y=o?"projectInfo.error.login.title":m?"projectInfo.error.permission.title":n?"projectInfo.error.network.title":"projectInfo.error.general.title",v=o?"projectInfo.error.login.desc":m?"projectInfo.error.permission.desc":n?"projectInfo.error.network.desc":"projectInfo.error.general.desc",E=o?["projectInfo.error.login.stepLogin","projectInfo.error.login.stepRestart","projectInfo.error.login.stepProxy"]:m?["projectInfo.error.permission.stepCheckAccount","projectInfo.error.permission.stepApply","projectInfo.error.permission.stepRestart"]:n?["projectInfo.error.network.stepCheck","projectInfo.error.network.stepProxy","projectInfo.error.network.stepRestart"]:["projectInfo.error.general.stepCheck","projectInfo.error.general.stepRetry"],p=o?[{label:"projectInfo.error.commandLogin",command:"ttmg login",hint:""},{label:"projectInfo.error.commandRestart",command:"ttmg dev",hint:""},{label:"projectInfo.error.commandProxy",command:"ttmg config set proxy http://127.0.0.1:7890",hint:"projectInfo.error.commandProxyHint"}]:n?[{label:"projectInfo.error.commandProxy",command:"ttmg config set proxy http://127.0.0.1:7890",hint:"projectInfo.error.commandProxyHint"},{label:"projectInfo.error.commandRestart",command:"ttmg dev",hint:""}]:[];return r.jsxs("div",{className:`error-display error-display-${l}`,children:[r.jsx(x,{className:"error-display-banner",type:m||o||n?"warning":"danger",closeIcon:null,description:r.jsxs("div",{className:"error-display-banner-content",children:[r.jsx(i.Text,{strong:!0,children:a(y)}),r.jsx(i.Text,{children:a(v)})]})}),r.jsxs("div",{className:"error-display-panel",children:[r.jsxs("div",{className:"error-display-hero",children:[r.jsx("div",{className:"error-display-hero-illustration",children:m?r.jsx("div",{className:"error-display-permission-mark",children:r.jsx(P,{size:72,strokeWidth:1.8})}):n?r.jsx("div",{className:"error-display-network-mark",children:r.jsx(T,{size:72,strokeWidth:1.8})}):r.jsx(N,{})}),r.jsxs("div",{className:"error-display-hero-copy",children:[r.jsx(i.Title,{heading:4,children:a("projectInfo.error.guideTitle")}),r.jsx(i.Paragraph,{className:"error-display-main-text",children:c})]})]}),r.jsxs("div",{className:"error-display-guide-grid",children:[r.jsxs("section",{className:"error-display-guide-card",children:[r.jsx(i.Text,{strong:!0,children:a("projectInfo.error.stepTitle")}),r.jsx("div",{className:"error-display-step-list",children:E.map((s,j)=>r.jsxs("div",{className:"error-display-step-item",children:[r.jsx("span",{className:"error-display-step-index",children:j+1}),r.jsx(i.Text,{children:a(s)})]},s))}),p.length>0?r.jsx("div",{className:"error-display-command-list",children:p.map(s=>r.jsxs("div",{className:"error-display-command-item",children:[r.jsx(i.Text,{type:"tertiary",children:a(s.label)}),r.jsx("code",{children:s.command}),s.hint?r.jsx(i.Text,{type:"tertiary",className:"error-display-command-hint",children:a(s.hint)}):null]},s.command))}):null]}),r.jsxs("section",{className:"error-display-guide-card",children:[r.jsx(i.Text,{strong:!0,children:a("projectInfo.error.helpTitle")}),r.jsx(i.Paragraph,{className:"error-display-help-text",children:o?a("projectInfo.error.helpLoginDesc"):m?a("projectInfo.error.helpPermissionDesc"):n?a("projectInfo.error.helpNetworkDesc"):a("projectInfo.error.helpGeneralDesc")}),o||n?r.jsxs("div",{className:"error-display-actions",children:[o?r.jsx(M,{theme:"light",onClick:()=>t("/basic_debug_guide"),children:a("basicDebugGuide.entryAction")}):null,r.jsx(Z,{href:O,children:a("projectInfo.error.openProxyDoc")})]}):null]})]})]})]})};export{D as A};
@@ -1 +0,0 @@
1
- import{c as z,j as e,b as A,f as Ee,u as Me,r as t,i as s,a5 as ee,A as Ge,P as _e,D as U,B as d,Q as Le,a7 as Pe,a8 as ze,a9 as Ae,aa as De,ab as Re,ac as qe}from"./index-wqj8y8SZ.js";import{S as L}from"./SectionHeader-BL_bJf61.js";import{T as se,C as u}from"./Tag-B4bSl-_E.js";import{a as ae,C as te,U as Oe}from"./index-P3QtE2VP.js";import{T as ce}from"./triangle-alert-BAadCxAv.js";import"./col-vAurEPaC.js";const We=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],ne=z("boxes",We);const Ie=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Be=z("link",Ie);const Ue=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],$=z("loader",Ue);const $e=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Fe=z("refresh-cw",$e),le=({entries:n,emptyText:i})=>{if(!n.length)return e.jsx("div",{className:"subpkg-preview-empty",children:i});const m=JSON.stringify({parallelPreloadSubpackages:n},null,2);return e.jsx("pre",{className:"subpkg-json",children:m})},h="__GAME__",Ke=9999;function He(n){return A({url:"/game/preload-subpackages-config",method:"GET",data:{entry:n}})}function Ve(n){return A({url:"/game/preload-subpackage-candidates",method:"GET",data:{entry:n}})}function Qe(n,i){return A({url:"/game/collect-preload-subpackages",method:"POST",data:{entry:n,subpackages:i}})}function ie(n){return A({url:"/game/clear-preload-subpackages-config",method:"POST",data:{entry:n}})}const Ze=2e4,F="https://bytedance.my.larkoffice.com/docx/MIyMdmzb0oOQAKxNHGNmR5hDyAh",Je=!1,P=[{subPkgName:"configBundle",isStartup:!0},{subPkgName:"gameplayBundle",isStartup:!1}];function Ye(){if(!Pe())return null;switch(ze()){case"subpackage.collecting":return{shot:"subpackage-collecting",stage:"collecting",entry:h,entryLabel:s("subpackageCollect.entry.game"),isConnected:!0,windowClosed:!1,collected:P,result:[]};case"subpackage.ready":return{shot:"subpackage-ready",stage:"collecting",entry:h,entryLabel:s("subpackageCollect.entry.game"),isConnected:!0,windowClosed:!0,collected:P,result:[]};case"subpackage.success":return{shot:"subpackage-success",stage:"success",entry:h,entryLabel:s("subpackageCollect.entry.game"),isConnected:!0,windowClosed:!0,collected:P,result:P};case"subpackage.collect-ready":return{shot:"subpackage-entry",stage:"entry",entry:h,entryLabel:"",isConnected:!1,windowClosed:!1,collected:[],result:[]};default:return null}}const Xe={entry:"neutral",empty:"neutral",collecting:"accent",processing:"accent",success:"success",failed:"error"},is=()=>{const n=Ee(),i=Ye(),{state:{devSchema:m,engine:re,packages:D,isConnected:oe},setMessage:G,setShowManualBindIP:K}=Me(),R=t.useMemo(()=>{const a=(D||[]).filter(l=>l.type==="independent").map(l=>({value:l.name,label:l.name,isGame:!1}));return[{value:h,label:s("subpackageCollect.entry.game"),isGame:!0},...a]},[D]),q=(D?.length??0)>0,x=R.length>1,f=re==="unity",N=oe||!!i?.isConnected,[c,r]=t.useState(()=>i?.stage??"entry"),[de,C]=t.useState("idle"),[k,ue]=t.useState(()=>i?.entry??h),[H,pe]=t.useState(()=>i?.entryLabel??""),[p,v]=t.useState(()=>i?.collected??[]),[es,O]=t.useState([]),[b,w]=t.useState([]),[W,S]=t.useState(()=>i?.result??[]),[g,T]=t.useState(()=>i?.windowClosed??!1),[ge,_]=t.useState(!1),[ke,E]=t.useState(""),[be,M]=t.useState(""),I=t.useRef(!1),B=t.useRef("entry");I.current=g,B.current=c;const V=t.useMemo(()=>{if(!m)return"";const a=m.includes("?")?"&":"?";return`${m}${a}startupRoot=${encodeURIComponent(k)}`},[m,k]);t.useEffect(()=>{const a=ee.on("predownloadSubpackage",o=>{if(B.current!=="collecting"||I.current)return;const{subPkgName:j,isStartup:Se}=o;!j||j===h||(v(y=>y.some(Te=>Te.subPkgName===j)?y:[...y,{subPkgName:j,isStartup:Se}]),C(y=>y==="idle"?"running":y))}),l=ee.on("reportScene",o=>{B.current!=="collecting"||I.current||o.sceneId===Ke&&(T(!0),C("interactive"),G({type:"success",title:s("subpackageCollect.reportScene.toastTitle"),desc:s("subpackageCollect.reportScene.toastDesc")}))});return()=>{a(),l()}},[G]),t.useEffect(()=>{if(i||c!=="collecting"||g||!N){_(!1);return}const a=window.setTimeout(()=>_(!0),Ze);return()=>window.clearTimeout(a)},[i,c,g,N,de]);const Q=async a=>{ue(a.value),pe(a.label),v([]),S([]),T(!1),C("idle"),w([]),O([]),r("collecting");const[l,o]=await Promise.all([He(a.value),Ve(a.value)]);if(l?.code===0&&l.data){const j=l.data.parallelPreloadSubpackages||[];w(j)}o?.code===0&&o.data&&(O(o.data.candidates||[]),o.data.totalSubpackages===0&&r("empty"))};t.useEffect(()=>{f||c==="entry"&&q&&!x&&Q(R[0])},[c,q,x,f]);const Z=async()=>{M(s("subpackageCollect.processing.write")),r("processing");const a=p.slice(),l=await Qe(k,a);if(l?.code===0&&l.data){const o=l.data.parallelPreloadSubpackages||[];S(o),w(o),r("success")}else E(l?.error?.message||s("subpackageCollect.error.generic")),r("failed")},he=()=>{if(p.length===0&&b.length>0){qe.confirm({type:"warning",title:s("subpackageCollect.finish.clearTitle"),content:s("subpackageCollect.finish.clearConfirm",{existing:b.length}),okText:s("subpackageCollect.finish.okClear"),cancelText:s("subpackageCollect.finish.cancel"),onOk:Z});return}Z()},me=()=>{v([]),S([]),w([]),T(!1),C("idle"),_(!1),E(""),M(""),r("collecting")},xe=()=>{v([]),S([]),w([]),T(!1),C("idle"),_(!1),E(""),M(""),r(x?"entry":"collecting")},J=async()=>{M(s("subpackageCollect.processing.clear")),r("processing");const a=await ie(k);if(a?.code===0){me();return}E(a?.error?.message||s("subpackageCollect.error.generic")),r("failed")},Y=()=>{v([]),S([]),O([]),T(!1),C("idle"),r("entry")},Ce=async()=>{M(s("subpackageCollect.processing.cancel")),r("processing");const a=await ie(k);if(a?.code===0){xe();return}E(a?.error?.message||s("subpackageCollect.error.generic")),r("failed")},je=()=>{n("/performance")},ye=()=>{K(!0)},fe=()=>{const a=Ae();if(!De(a)){G({type:"warning",title:s("subpackageCollect.manualConnect.noRecordTitle"),desc:s("subpackageCollect.manualConnect.noRecordDesc")}),K(!0);return}Re(a),G({type:"info",title:s("subpackageCollect.manualConnect.retryTitle"),desc:s("subpackageCollect.manualConnect.retryDesc",{ip:String(a.ip),port:String(a.wsPort)})})},Ne=t.useMemo(()=>c==="success"?W:p.length?p:g?[]:b,[c,W,p,b,g]),X=c==="collecting"&&!N,ve=f?s("subpackageCollect.stage.unsupported"):X?s("subpackageCollect.stage.notStarted"):s(`subpackageCollect.stage.${c}`),we=f?"warn":X?"neutral":Xe[c];return e.jsxs("div",{className:"subpkg-page","data-doc-shot":i?.shot||"subpackage-collection",children:[e.jsxs("div",{className:"subpkg-hero-strip",children:[e.jsxs("button",{type:"button",className:"subpkg-back",onClick:()=>n("/performance"),children:[e.jsx(Ge,{size:14,strokeWidth:2}),e.jsx("span",{children:s("back")})]}),e.jsx(_e,{title:s("subpackageCollect"),subtitle:s("subpackageCollect.subtitle"),action:e.jsxs("div",{className:"subpkg-hero-actions",children:[e.jsx(U,{href:F,children:s("subpackageCollect.devGuide.link")}),e.jsx(se,{tone:we,withDot:!0,variant:"solid",children:ve})]})})]}),f?e.jsxs(u,{padding:"lg",className:"subpkg-card subpkg-unsupported-card",children:[e.jsx("div",{className:"subpkg-unsupported-icon","aria-hidden":"true",children:e.jsx(ce,{size:22,strokeWidth:1.75})}),e.jsx("h2",{className:"subpkg-unsupported-title",children:s("subpackageCollect.unsupported.unity.title")}),e.jsx("p",{className:"subpkg-unsupported-desc",children:s("subpackageCollect.unsupported.unity.desc")}),e.jsx("div",{className:"subpkg-unsupported-actions",children:e.jsx(d,{type:"primary",theme:"solid",onClick:()=>n("/wasm_split"),children:s("subpackageCollect.unsupported.unity.action")})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(u,{padding:"lg",className:"subpkg-card subpkg-dev-guide-card",children:[e.jsx(L,{className:"subpkg-section-header",title:s("subpackageCollect.devGuide.stepsTitle")}),e.jsxs("div",{className:"subpkg-required-integration",children:[e.jsx("span",{className:"subpkg-required-label",children:s("subpackageCollect.devGuide.required.badge")}),e.jsxs("div",{className:"subpkg-required-copy",children:[e.jsxs("div",{className:"subpkg-required-title",children:[s("subpackageCollect.devGuide.required.title"),e.jsx("code",{children:s("subpackageCollect.devGuide.required.code")})]}),e.jsx("div",{className:"subpkg-required-desc",children:s("subpackageCollect.devGuide.required.desc")})]}),e.jsx(U,{href:F,children:s("subpackageCollect.devGuide.required.link")})]}),e.jsxs("ol",{className:"subpkg-dev-guide-list",children:[e.jsxs("li",{children:[e.jsx("span",{className:"subpkg-dev-guide-index",children:"1"}),e.jsxs("span",{className:"subpkg-dev-guide-copy",children:[e.jsx("strong",{children:s("subpackageCollect.devGuide.step1.title")}),e.jsx("span",{children:s("subpackageCollect.devGuide.step1.desc")})]})]}),e.jsxs("li",{children:[e.jsx("span",{className:"subpkg-dev-guide-index",children:"2"}),e.jsxs("span",{className:"subpkg-dev-guide-copy",children:[e.jsx("strong",{children:s("subpackageCollect.devGuide.step2.title")}),e.jsx("span",{children:s("subpackageCollect.devGuide.step2.desc")})]})]}),e.jsxs("li",{children:[e.jsx("span",{className:"subpkg-dev-guide-index",children:"3"}),e.jsxs("span",{className:"subpkg-dev-guide-copy",children:[e.jsx("strong",{children:s("subpackageCollect.devGuide.step3.title")}),e.jsx("span",{children:s("subpackageCollect.devGuide.step3.desc")})]})]})]})]}),c==="entry"&&(q&&x?e.jsxs(u,{padding:"lg",className:"subpkg-card",children:[e.jsx(L,{icon:ne,title:s("subpackageCollect.entry.title"),subtitle:s("subpackageCollect.entry.subtitle")}),e.jsx("div",{className:"subpkg-entry-grid",children:R.map(a=>e.jsxs("button",{type:"button",className:"subpkg-entry-card",onClick:()=>Q(a),children:[e.jsx("span",{className:"subpkg-entry-name",children:a.label}),e.jsx(se,{tone:a.isGame?"accent":"info",size:"sm",variant:"outline",children:a.isGame?s("subpackageCollect.entry.gameTag"):s("subpackageCollect.entry.independentTag")})]},a.value))})]}):e.jsxs(u,{padding:"lg",className:"subpkg-card subpkg-center",children:[e.jsx($,{size:28,strokeWidth:1.75,className:"subpkg-wait-spin"}),e.jsx("p",{className:"subpkg-center-text",children:s("subpackageCollect.loading")})]})),c==="empty"&&e.jsxs(u,{padding:"lg",className:"subpkg-card subpkg-center",children:[e.jsx(ne,{size:28,strokeWidth:1.5,className:"subpkg-empty-icon"}),e.jsx("p",{className:"subpkg-empty-title",children:s("subpackageCollect.empty.title")}),e.jsx("p",{className:"subpkg-empty-desc",children:s("subpackageCollect.empty.desc")}),e.jsx("div",{className:"subpkg-actions subpkg-actions-center",children:e.jsx(d,{type:"primary",theme:"solid",onClick:()=>n("/performance"),children:s("subpackageCollect.empty.back")})})]}),c==="collecting"&&e.jsxs("div",{className:"subpkg-collect-grid",children:[e.jsxs(u,{padding:"lg",className:"subpkg-card subpkg-collect-card",children:[e.jsx(L,{className:"subpkg-section-header",title:e.jsxs("span",{className:"subpkg-entry-title",children:[e.jsx("span",{className:"subpkg-entry-title-label",children:s("subpackageCollect.preview.currentEntry")}),e.jsx("span",{className:"subpkg-entry-title-value",children:H||k})]})}),!g&&!N&&e.jsxs("div",{className:"subpkg-scan",children:[e.jsx("div",{className:"subpkg-qr",children:V?e.jsx(Le,{value:V,size:164}):e.jsx("div",{className:"subpkg-qr-empty",children:s("subpackageCollect.preview.noSchema")})}),e.jsxs("div",{className:"subpkg-scan-main",children:[e.jsxs("div",{className:"subpkg-scan-heading",children:[e.jsx("div",{className:"subpkg-scan-title",children:s("subpackageCollect.scan.title")}),e.jsx("div",{className:"subpkg-scan-subtitle",children:s("subpackageCollect.scan.subtitle")})]}),e.jsxs("ol",{className:"subpkg-guide",children:[e.jsx("li",{children:s("subpackageCollect.guide.step2")}),e.jsx("li",{className:"subpkg-guide-key",children:s("subpackageCollect.guide.step3")})]})]}),e.jsxs("div",{className:"subpkg-connect-tools",role:"group","aria-label":s("subpackageCollect.manualConnect.title"),children:[e.jsxs("div",{className:"subpkg-connect-copy",children:[e.jsx("span",{className:"subpkg-connect-icon","aria-hidden":"true",children:e.jsx(ae,{size:16,strokeWidth:2})}),e.jsxs("span",{className:"subpkg-connect-text",children:[e.jsx("span",{className:"subpkg-connect-title",children:s("subpackageCollect.manualConnect.title")}),e.jsx("span",{className:"subpkg-connect-hint",children:s("subpackageCollect.manualConnect.desc")})]})]}),e.jsxs("div",{className:"subpkg-connect-actions",children:[e.jsx(d,{className:"subpkg-connect-button subpkg-connect-button-secondary",size:"small",type:"tertiary",icon:e.jsx(Fe,{size:14,strokeWidth:2}),onClick:fe,children:s("subpackageCollect.manualConnect.retry")}),e.jsx(d,{className:"subpkg-connect-button subpkg-connect-button-primary",size:"small",theme:"light",icon:e.jsx(Be,{size:14,strokeWidth:2}),onClick:ye,children:s("subpackageCollect.manualConnect.action")})]})]})]}),g?e.jsxs("div",{className:"subpkg-banner subpkg-banner-success",role:"status",children:[e.jsx("span",{className:"subpkg-banner-bar","aria-hidden":"true"}),e.jsx("span",{className:"subpkg-banner-icon",children:e.jsx(te,{size:18,strokeWidth:2})}),e.jsxs("div",{className:"subpkg-banner-body",children:[e.jsx("div",{className:"subpkg-banner-title",children:s("subpackageCollect.reportScene.readyTitle")}),e.jsx("div",{className:"subpkg-banner-text",children:s("subpackageCollect.reportScene.readyDesc")})]}),e.jsx(d,{className:"subpkg-banner-action",size:"small",type:"primary",theme:"solid",onClick:he,children:s("subpackageCollect.action.finish")})]}):N&&(ge?e.jsxs("div",{className:"subpkg-banner subpkg-banner-warn",role:"alert",children:[e.jsx("span",{className:"subpkg-banner-bar","aria-hidden":"true"}),e.jsx("span",{className:"subpkg-banner-icon",children:e.jsx(ce,{size:18,strokeWidth:2})}),e.jsxs("div",{className:"subpkg-banner-body",children:[e.jsx("div",{className:"subpkg-banner-title",children:s("subpackageCollect.wait.timeoutTitle")}),e.jsx("div",{className:"subpkg-banner-text",children:s("subpackageCollect.wait.timeout")})]}),e.jsx(U,{className:"subpkg-banner-cta",href:F,children:s("subpackageCollect.wait.docLink")})]}):e.jsxs("div",{className:"subpkg-banner subpkg-banner-accent",role:"status",children:[e.jsx("span",{className:"subpkg-banner-bar","aria-hidden":"true"}),e.jsx("span",{className:"subpkg-banner-icon",children:e.jsx($,{size:18,strokeWidth:2,className:"subpkg-wait-spin"})}),e.jsxs("div",{className:"subpkg-banner-body",children:[e.jsx("div",{className:"subpkg-banner-title",children:s("subpackageCollect.wait.runningTitle")}),e.jsx("div",{className:"subpkg-banner-progress",children:e.jsx(Oe,{})}),e.jsx("div",{className:"subpkg-banner-text",children:s("subpackageCollect.wait.running")})]})]})),Je]}),e.jsxs(u,{padding:"lg",className:"subpkg-card subpkg-side",children:[e.jsx(L,{title:s("subpackageCollect.preview.collectedTitle"),subtitle:p.length?s("subpackageCollect.preview.collectedDesc"):s("subpackageCollect.preview.existingDesc")}),e.jsx(le,{entries:Ne,emptyText:s("subpackageCollect.preview.empty")}),g&&b.length>0&&e.jsx("p",{className:`subpkg-finish-note${p.length?"":" subpkg-finish-note-clear"}`,children:p.length?s("subpackageCollect.finish.overwriteNote",{current:p.length,existing:b.length}):s("subpackageCollect.finish.clearNote",{existing:b.length})}),!g&&e.jsxs("div",{className:"subpkg-actions",children:[e.jsx(d,{type:"tertiary",onClick:Ce,children:s("subpackageCollect.action.cancel")}),e.jsx(d,{type:"tertiary",onClick:je,children:s("subpackageCollect.action.exit")})]})]})]}),c==="processing"&&e.jsxs(u,{padding:"lg",className:"subpkg-card subpkg-center",children:[e.jsx($,{size:28,strokeWidth:1.75,className:"subpkg-wait-spin"}),e.jsx("p",{className:"subpkg-center-text",children:be||s("subpackageCollect.processing.write")})]}),c==="success"&&e.jsxs(u,{padding:"lg",className:"subpkg-card",children:[e.jsxs("div",{className:"subpkg-result-head subpkg-result-success",children:[e.jsx(te,{size:20,strokeWidth:1.75}),e.jsx("span",{children:s("subpackageCollect.success.title")})]}),e.jsxs("div",{className:"subpkg-entry-hint",children:[s("subpackageCollect.preview.currentEntry"),":",e.jsx("strong",{children:H||k})]}),e.jsx(le,{entries:W,emptyText:s("subpackageCollect.success.empty")}),e.jsxs("div",{className:"subpkg-actions",children:[e.jsx(d,{type:"primary",theme:"solid",onClick:J,children:s("subpackageCollect.action.recollect")}),x&&e.jsx(d,{type:"tertiary",onClick:Y,children:s("subpackageCollect.action.switch")})]})]}),c==="failed"&&e.jsxs(u,{padding:"lg",className:"subpkg-card",children:[e.jsxs("div",{className:"subpkg-result-head subpkg-result-failed",children:[e.jsx(ae,{size:20,strokeWidth:1.75}),e.jsx("span",{children:s("subpackageCollect.failed.title")})]}),e.jsx("p",{className:"subpkg-error-msg",children:ke}),e.jsxs("div",{className:"subpkg-actions",children:[e.jsx(d,{type:"primary",theme:"solid",onClick:J,children:s("subpackageCollect.action.recollect")}),x&&e.jsx(d,{type:"tertiary",onClick:Y,children:s("subpackageCollect.action.switch")})]})]})]})]})};export{is as SubpackageCollect};
@@ -1 +0,0 @@
1
- import{j as e,i as a,D as _,r as o,f as Oe,u as Be,h as qe,g as Ke,e as He,P as Ve,T as r,d as z,I as V,k as Qe,B as w,l as Je,Q as pe,m as Ze,n as We,b as C}from"./index-wqj8y8SZ.js";import{C as he,F as me}from"./baseForm-zW5Gb1OH.js";import{A as Xe}from"./index-C5k1IRcX.js";import"./col-vAurEPaC.js";import"./index-BXllV1mP.js";const Ye="https://bytedance.larkoffice.com/wiki/LkihwQCMfiBpr3khwNuceCBkn3e";function es(m){return String(m).replace(/^\s*\d+\s*[\.、]\s*/,"")}const ss=({engine:m})=>e.jsx("div",{className:"check-code-banner-list",children:[{show:!0,titleKey:"pkgSizeCheckDesc",desc:e.jsxs("div",{children:[e.jsx("span",{children:m==="unity"?a("unityPkgSizeCheckDescTip",{projectSize:"60MB"}):a("commonPkgSizeCheckDescTip",{projectSize:"30MB",mainPackageSize:"4MB",independentPackageSize:"4MB"})}),e.jsx(_,{className:"check-code-banner-doc-link",href:Ye,children:a("uploadGame.packageSizeDoc")})]})},{show:m!=="unity",titleKey:"mandatoryApiCheck",desc:a("mandatoryApiCheckDesc")},{show:!0,titleKey:"configFileCheck",desc:e.jsxs("div",{children:[e.jsx("code",{children:"game.json"}),":",a("gameJsonCheckDesc")]})}].filter(i=>i.show).map((i,h)=>e.jsxs("div",{className:"check-code-banner-section",children:[e.jsxs("div",{className:"check-code-banner-section-title",children:[e.jsx("span",{className:"check-code-banner-section-index",children:h+1}),e.jsx("strong",{children:es(a(i.titleKey))})]}),e.jsx("div",{className:"check-code-banner-section-desc",children:i.desc})]},i.titleKey))}),as=({engine:m})=>e.jsx("div",{className:"check-code-banner",role:"note",children:e.jsx(ss,{engine:m})}),rs=m=>{const{result:i}=m,h=i.every(d=>d?.passed),[l,n]=o.useState(!1);return e.jsxs("section",{className:`check-result-group ${h?"check-result-group-passed":"check-result-group-failed"}`,children:[e.jsxs("div",{className:"check-result-title",children:[e.jsx("span",{className:"check-result-status-dot"}),e.jsx("span",{className:"check-result-title-text",children:h?a("checkConfigPassed"):a("checkConfigFailed")})]}),e.jsxs("div",{className:`check-result-collapse ${l?"check-result-collapse-open":"check-result-collapse-closed"}`,children:[e.jsx(he,{collapseHeight:150,isOpen:l,children:e.jsx("div",{className:"check-result-list",children:i.map((d,k)=>e.jsxs("div",{className:`check-result-item ${d?.passed?"check-result-item-passed":"check-result-item-failed"}`,children:[e.jsx("span",{className:"check-result-tag",children:d?.file}),e.jsx("span",{className:"check-result-message",children:d?.msg}),d?.detail?.link?e.jsx(_,{className:"check-result-link",href:d.detail.link,children:d.detail.text||a("viewDoc")}):null]},k))})}),l?e.jsx("button",{className:"check-result-toggle",type:"button",onClick:()=>n(!1),children:a("closeCheckDetail")}):e.jsx("button",{className:"show-more-text-btn",type:"button",onClick:()=>n(!0),children:a("expandCheckDetail")})]})]})},ls={project:a("gameProject"),main_package:a("gameMainPackage"),independent_package:a("independentPackage")},ts=m=>{const{result:i}=m,h=i.every(l=>l?.passed);return e.jsxs("section",{className:`check-result-group ${h?"check-result-group-passed":"check-result-group-failed"}`,children:[e.jsxs("div",{className:"check-result-title",children:[e.jsx("span",{className:"check-result-status-dot"}),e.jsx("span",{className:"check-result-title-text",children:h?a("checkPkgSizePassed"):a("checkPkgSizeFailed")})]}),e.jsx("div",{className:"check-result-list",children:i.map((l,n)=>e.jsxs("div",{className:`check-result-item ${l?.passed?"check-result-item-passed":"check-result-item-failed"}`,children:[e.jsxs("span",{className:"check-result-tag",children:[ls[l.dimension],l.dimension==="independent_package"?`: ${l.name}`:""]}),e.jsx("span",{className:"check-result-message",children:l?.msg}),l?.detail?.link?e.jsx(_,{className:"check-result-link",href:l.detail.link,children:l.detail.text||a("viewDoc")}):null]},n))})]})},cs=m=>{const{result:i}=m;if(!Array.isArray(i)||i.length===0)return null;const h=i.every(d=>d?.passed),[l,n]=o.useState(!1);return e.jsxs("section",{className:`check-result-group ${h?"check-result-group-passed":"check-result-group-failed"}`,children:[e.jsxs("div",{className:"check-result-title",children:[e.jsx("span",{className:"check-result-status-dot"}),e.jsx("span",{className:"check-result-title-text",children:h?a("checkApiSuccess"):a("checkApiFailed")})]}),e.jsxs("div",{className:`check-result-collapse ${l?"check-result-collapse-open":"check-result-collapse-closed"}`,children:[e.jsx(he,{collapseHeight:150,isOpen:l,children:e.jsx("div",{className:"check-result-list",children:i.map((d,k)=>e.jsxs("div",{className:`check-result-item ${d?.passed?"check-result-item-passed":"check-result-item-failed"}`,children:[e.jsx("span",{className:"check-result-tag",children:d?.name}),e.jsxs("span",{className:"check-result-message",children:[a(d?.name),d?.passed?a("integrated"):a("notIntegrated")]}),d?.detail?.link?e.jsx(_,{className:"check-result-link",href:d.detail.link,children:d.detail.text||a("viewDoc")}):null]},k))})}),l?e.jsx("button",{className:"check-result-toggle",type:"button",onClick:()=>n(!1),children:a("closeCheckDetail")}):e.jsx("button",{className:"show-more-text-btn",type:"button",onClick:()=>n(!0),children:a("expandCheckDetail")})]})]})},ds=m=>{const{result:i}=m;if(!Array.isArray(i)||i.length===0)return null;const h=i.every(l=>l?.passed);return e.jsxs("section",{className:`check-result-group ${h?"check-result-group-passed":"check-result-group-failed"}`,children:[e.jsxs("div",{className:"check-result-title",children:[e.jsx("span",{className:"check-result-status-dot"}),e.jsx("span",{className:"check-result-title-text",children:h?a("checkPerformancePassed"):a("checkPerformanceFailed")})]}),e.jsx("div",{className:"check-result-list",children:i.map((l,n)=>e.jsxs("div",{className:`check-result-item ${l?.passed?"check-result-item-passed":"check-result-item-failed"}`,children:[e.jsx("span",{className:"check-result-tag",children:a("performanceCheck")}),e.jsx("span",{className:"check-result-message",children:l?.msg}),l?.detail?.link?e.jsx(_,{className:"check-result-link",href:l.detail.link,children:l.detail.text||a("viewDoc")}):null]},n))})]})},hs=()=>{const m=Oe(),i=3e3,h=600*1e3,[l,n]=o.useState("idle"),[d,k]=o.useState(""),[A,F]=o.useState(""),[ge,R]=o.useState(""),[G,M]=o.useState([]),[v,b]=o.useState(""),[xe,Q]=o.useState({}),[J,U]=o.useState(!1),[Z,L]=o.useState(""),[je,E]=o.useState(!1),[fe,ke]=o.useState(""),[T,ve]=o.useState([]),[O,W]=o.useState(!1),[P,X]=o.useState(!0),[x,ye]=o.useState(!1),[Y,ee]=o.useState(""),[se,ae]=o.useState(!1),[B,j]=o.useState(""),re=o.useRef(null),{state:{engine:Ne,user:q,gameDetail:y}}=Be(),N=qe(q),K=Ke({errorCode:y?.has_error?y.error_code:void 0,user:q}),I=K==="noPermission",we=I||K==="networkProxy",H=s=>new Promise(t=>setTimeout(t,s)),Se=s=>s?String(s.status??s.cdn_deploy_status??s.live_status??"").toLowerCase():"",le=s=>s?String(s.status??s.cdn_deploy_status??s.live_status??""):"",D=s=>{if(Number(s?.cdn_deploy_status)===2)return"ready";const t=Se(s);return t?["ready","success","succeeded","available"].includes(t)?"ready":t.includes("fail")||t.includes("error")||t.includes("reject")?"failed":"pending":"pending"},te=s=>s==="preview"?4:s==="review"?3:s==="live"?2:1,Ge=s=>{if(!s)return[];const t=[...(s.preview_assets||[]).map(c=>({...c,source:"preview",state:D(c)})),...(s.in_review_assets||[]).map(c=>({...c,source:"review",state:D(c)})),...(s.live_assets||[]).map(c=>({...c,source:"live",state:D(c)})),...(s.assets||[]).map(c=>({...c,source:"other",state:D(c)}))].sort((c,p)=>{const f=Number(p.uploaded_at||0)-Number(c.uploaded_at||0);return f!==0?f:te(p.source)-te(c.source)}),u=new Map;return t.forEach(c=>{const p=String(c.asset_id||"");p&&!u.has(p)&&u.set(p,c)}),Array.from(u.values())},be=s=>s==="ready"?a("uploadGame.record.state.ready"):s==="failed"?a("uploadGame.record.state.failed"):a("uploadGame.record.state.pending"),Te=s=>s==="preview"?a("uploadGame.record.source.preview"):s==="review"?a("uploadGame.record.source.review"):s==="live"?a("uploadGame.record.source.live"):a("uploadGame.record.source.other"),ce=s=>s?new Date(s*1e3).toLocaleString():a("uploadGame.record.metaUnknown"),Pe=s=>{if(!s)return a("uploadGame.record.metaUnknown");const t=s/1024/1024;return`${t>=10?t.toFixed(0):t.toFixed(1)} MB`},de=s=>{if(s.version)return`v${s.version}`;const t=String(s.asset_id||"");return t?`${t.slice(0,6)}...${t.slice(-4)}`:a("uploadGame.record.metaUnknown")},De=s=>`${de(s)} · ${be(s.state)} · ${ce(s.uploaded_at)}`,Ce=s=>s?[s.preview_assets||[],s.in_review_assets||[],s.live_assets||[],s.assets||[]].flat().filter(Boolean):[],ie=async()=>{if(!N||I){M([]),b(""),L(""),U(!1);return}U(!0),L("");try{const s=await C({method:"POST",url:"/game/assets"});if(s?.code!==0||!s?.data)throw new Error(a("uploadGame.record.loadFailed"));const t=Ge(s.data);M(t);const u=(v&&t.some(c=>String(c.asset_id)===String(v))?v:"")||"";b(String(u||""))}catch(s){L(s instanceof Error?s.message:a("uploadGame.record.loadFailed"))}finally{U(!1)}},_e=async(s,t)=>{for(;Date.now()<t;){const u=await C({method:"POST",url:"/game/assets",data:{assetId:s,includePending:!0}}),p=Ce(u?.data).find(f=>String(f.asset_id)===String(s))||null;if(p){const f=le(p);f&&R(f);const ue=D(p);if(ue==="ready")return{ok:!0,asset:p};if(ue==="failed")return{ok:!1,asset:p}}await H(i)}return{ok:!1,asset:null}},oe=async(s,t)=>{for(;Date.now()<t;){const u=await C({method:"POST",url:"/game/asset/preview-url",data:{assetId:s}});if(u?.code===0&&u?.data?.preview_url)return u.data.preview_url;await H(i)}return""},Ae=()=>{X(!0),W(!1),C({url:"/game/check",method:"GET"}).then(s=>{ve(s?.data||[])}).catch(()=>{W(!0)}).finally(()=>{X(!1)})};o.useEffect(()=>{Ae()},[]),o.useEffect(()=>{if(!N||I){M([]),b(""),L(""),U(!1);return}ie()},[N,I]);const Re=T.filter(s=>s?.type==="config"),Ue=T.filter(s=>s?.type==="size"),Le=T.filter(s=>s?.type==="api"),Ee=T.filter(s=>s?.type==="performance"),ne=T.some(s=>!s?.passed),Ie=s=>l==="uploading"?s===0?"current":"pending":l==="checkingAsset"?s===0?"done":s===1?"current":"pending":l==="resolvingPreview"?s<=1?"done":s===2?"current":"pending":"pending",$e=[a("uploadGame.progress.step1"),a("uploadGame.progress.step2"),a("uploadGame.progress.step3")],ze=[a("uploadGame.guide.precheck.title"),a("uploadGame.guide.version.title"),a("uploadGame.guide.preview.title")],S=()=>{ye(s=>!s)},g=G.find(s=>String(s.asset_id)===String(v))||null,$=v&&xe[String(v)]||"";o.useEffect(()=>{if(!g||g.state!=="ready"){E(!1);return}const s=String(g.asset_id);if($){E(!1);return}let t=!1;return(async()=>{E(!0);const c=await oe(s,Date.now()+h);t||(c&&Q(p=>({...p,[s]:c})),E(!1))})(),()=>{t=!0}},[g,$]);const Fe=()=>{if(!Y.trim()){j(a("needDesc"));return}ae(!0),n("uploading"),j(""),k(""),R(""),F(""),C({method:"POST",url:"/game/upload",headers:{"ttmg-game-desc":encodeURIComponent(Y||"--")}}).then(async s=>{if(s?.code===0){await H(500),k(s?.data?.detail||"");const t=s?.data?.asset_id?String(s.data.asset_id):"",u=Date.now()+h;if(!t){n("failure"),j(a("uploadGame.failure.missingAssetId"));return}n("checkingAsset");const c=await _e(t,u);if(!c.ok){n("failure"),j(c.asset?a("uploadGame.failure.assetStatus",{status:le(c.asset)||"-"}):a("uploadGame.failure.assetTimeout"));return}n("resolvingPreview");const p=await oe(t,u);if(!p){n("failure"),j(a("uploadGame.failure.previewTimeout"));return}Q(f=>({...f,[t]:p})),ke(t),b(""),F(p),await ie(),n("success")}else n("idle"),j(s?.error?.StatusMessage||s?.detail||a("uploadPlatformFailed"))}).catch(s=>{n("idle"),j(s?.error?.StatusMessage||s?.response?.detail||s?.message||a("uploadPlatformFailed"))}).finally(()=>{ae(!1)})},Me=()=>{n("idle"),j(""),k(""),R(""),F(""),ee(""),re.current?.formApi?.reset?.()};if(we){const s=y?.has_error?y.error_code:void 0,t=y?.has_error?y.error_msg:"",u=y?.client_key||"";return e.jsx(Xe,{errorMsg:He({errorCode:s,errorMsg:t,clientKey:u,user:q}),errorState:K})}return e.jsxs("div",{className:"upload-game-page",children:[e.jsx(Ve,{title:a("uploadGame.guide.title"),subtitle:a("uploadGame.guide.desc")}),e.jsxs("section",{className:"upload-game-hero",children:[P?e.jsxs("div",{className:"upload-game-summary-panel upload-game-summary-panel-neutral",children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.summary.checkingTitle")}),e.jsx(r.Text,{style:{color:"var(--tt-text-dim)"},children:a("uploadGame.summary.checkingDesc")})]}),e.jsx(z,{size:"small"})]}):null,!P&&O?e.jsxs("div",{className:`upload-game-summary-panel upload-game-summary-panel-warn ${x?"upload-game-summary-panel-expanded":""}`,children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.summary.failedTitle")}),e.jsx(r.Text,{style:{color:"var(--tt-text-dim)"},children:a("uploadGame.checkFetchFailed")})]}),e.jsxs("span",{className:"upload-game-summary-action",role:"button",tabIndex:0,onClick:S,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),S())},children:[e.jsx(V,{style:{transform:x?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}}),e.jsx(r.Text,{children:a(x?"uploadGame.hideDetails":"uploadGame.showDetails")})]})]}):null,N?null:e.jsxs("div",{className:"upload-game-inline-notice",children:[e.jsx("div",{className:"upload-game-inline-notice-icon",children:e.jsx(Qe,{})}),e.jsxs("div",{className:"upload-game-inline-notice-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.loginNoticeTitle")}),e.jsx(r.Text,{children:a("loginToUpload")}),e.jsx("div",{className:"upload-game-inline-notice-action",children:e.jsx(w,{theme:"light",onClick:()=>m("/basic_debug_guide"),children:a("basicDebugGuide.entryAction")})})]})]}),!P&&!O&&ne?e.jsxs("div",{className:`upload-game-summary-panel upload-game-summary-panel-warn ${x?"upload-game-summary-panel-expanded":""}`,children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.issueTitle")}),e.jsx(r.Text,{style:{color:"var(--tt-text-dim)"},children:a("uploadGame.issueDesc")})]}),e.jsxs("span",{className:"upload-game-summary-action",role:"button",tabIndex:0,onClick:S,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),S())},children:[e.jsx(V,{style:{transform:x?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}}),e.jsx(r.Text,{children:a(x?"uploadGame.hideDetails":"uploadGame.showDetails")})]})]}):null,!P&&!O&&!ne?e.jsxs("div",{className:`upload-game-summary-panel upload-game-summary-panel-ok ${x?"upload-game-summary-panel-expanded":""}`,children:[e.jsxs("div",{className:"upload-game-summary-copy",children:[e.jsx(r.Text,{strong:!0,children:a("uploadGame.readyTitle")}),e.jsx(r.Text,{style:{color:"var(--tt-text-dim)"},children:a("uploadGame.readyDesc")})]}),e.jsxs("span",{className:"upload-game-summary-action",role:"button",tabIndex:0,onClick:S,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),S())},children:[e.jsx(V,{style:{transform:x?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}}),e.jsx(r.Text,{children:a(x?"uploadGame.hideDetails":"uploadGame.showDetails")})]})]}):null,x?e.jsx("div",{className:"upload-game-inline-detail",children:e.jsx("div",{className:"upload-game-check-body upload-game-detail-card",children:P?e.jsx("div",{className:"upload-game-loading",children:e.jsx(z,{})}):e.jsxs(e.Fragment,{children:[e.jsx(as,{engine:Ne}),e.jsx(ds,{result:Ee}),e.jsx(ts,{result:Ue}),e.jsx(cs,{result:Le}),e.jsx(rs,{result:Re})]})})}):null,e.jsx("div",{className:"upload-game-flow","aria-label":a("uploadGame.guide.title"),children:ze.map((s,t)=>e.jsxs("div",{className:"upload-game-flow-item",children:[e.jsx("span",{className:"upload-game-flow-index",children:t+1}),e.jsx(r.Text,{children:s})]},s))}),e.jsxs("div",{className:`upload-game-module-card upload-game-form-wrapper upload-game-form-wrapper-main ${l==="idle"?"":"upload-game-form-wrapper-stage"}`,children:[l==="idle"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"upload-game-form-head",children:[e.jsx(r.Text,{strong:!0,children:a("gameAssetDescription")}),e.jsx(r.Text,{className:"upload-game-form-head-desc",children:a("uploadGame.uploadDescHint")})]}),e.jsx(me,{ref:re,onChange:({values:s})=>{ee(s?.gameDescription||""),j("")},children:e.jsx(me.TextArea,{noLabel:!0,placeholder:a("gameAssetDescription"),field:"gameDescription",disabled:!N})}),B&&e.jsx(r.Text,{type:"danger",style:{display:"block",marginBottom:8},children:B}),e.jsx(w,{className:"upload-game-upload-action",theme:"solid",type:"primary",disabled:!N||se,loading:se,onClick:Fe,children:a("uploadToPlatform")})]}):null,l==="uploading"||l==="checkingAsset"||l==="resolvingPreview"?e.jsxs("div",{className:"upload-game-progress-card",children:[e.jsxs("div",{className:"upload-game-progress-head",children:[e.jsxs("div",{className:"upload-game-progress-badge",children:[e.jsx("span",{className:"upload-game-progress-badge-dot"}),e.jsx(r.Text,{children:l==="uploading"?a("uploadGame.progress.badgeUploading"):l==="checkingAsset"?a("uploadGame.progress.badgeChecking"):a("uploadGame.progress.badgePreview")})]}),e.jsx("div",{className:"upload-game-progress-bar"})]}),e.jsxs("div",{className:"upload-game-progress-copy",children:[e.jsx(r.Text,{strong:!0,className:"upload-game-stage-title",children:l==="uploading"?a("uploadGame.progress.title"):l==="checkingAsset"?a("uploadGame.progress.assetTitle"):a("uploadGame.progress.previewTitle")}),e.jsx(r.Paragraph,{className:"upload-game-form-head-desc",children:l==="uploading"?a("uploadGame.progress.desc"):l==="checkingAsset"?a("uploadGame.progress.assetDesc",{status:ge||a("uploadGame.progress.statusPending")}):a("uploadGame.progress.previewDesc")}),e.jsx("div",{className:"upload-game-progress-steps",children:$e.map((s,t)=>{const u=Ie(t);return e.jsxs("div",{className:`upload-game-progress-step upload-game-progress-step-${u}`,children:[e.jsx("span",{className:"upload-game-progress-step-dot",children:t+1}),e.jsx("span",{className:"upload-game-progress-step-label",children:s})]},s)})})]})]}):null,l==="success"?e.jsx("div",{className:"upload-game-success-card",children:e.jsxs("div",{className:"upload-game-success-body",children:[e.jsxs("div",{className:"upload-game-success-content",children:[e.jsxs("div",{className:"upload-game-success-heading",children:[e.jsx("span",{className:"upload-game-success-icon","aria-hidden":"true",children:e.jsx(Je,{})}),e.jsx(r.Text,{strong:!0,className:"upload-game-stage-title",children:A?a("uploadGame.success.readyTitle"):a("uploadGame.success.title")})]}),e.jsx(r.Paragraph,{className:"upload-game-form-head-desc",children:A?a("uploadGame.success.desc"):a("uploadGame.success.pendingDesc")}),e.jsxs("div",{className:"upload-game-success-actions",children:[d?e.jsx(w,{theme:"light",onClick:()=>window.open(d,"_blank"),children:a("viewOnPlatform")}):null,e.jsx(w,{theme:"solid",type:"primary",onClick:Me,children:a("uploadGame.success.uploadAnother")})]})]}),e.jsx("div",{className:"upload-game-success-qr",children:A?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"upload-game-success-qr-box",children:e.jsx(pe,{value:A,size:156})}),e.jsx(r.Text,{className:"upload-game-success-qr-caption",children:a("uploadGame.success.qrHint")})]}):e.jsx("div",{className:"upload-game-success-qr-placeholder",children:e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.success.noQr")})})})]})}):null,l==="failure"?e.jsxs("div",{className:"upload-game-failure-card",children:[e.jsx(r.Text,{strong:!0,className:"upload-game-stage-title",children:a("uploadGame.failure.title")}),e.jsx(r.Paragraph,{className:"upload-game-form-head-desc",children:B||a("uploadPlatformFailed")}),e.jsxs("div",{className:"upload-game-success-actions",children:[d?e.jsx(w,{theme:"light",onClick:()=>window.open(d,"_blank"),children:a("viewOnPlatform")}):null,e.jsx(w,{theme:"solid",type:"primary",onClick:()=>{n("idle"),j(""),k(""),R("")},children:a("uploadGame.failure.retry")})]})]}):null]}),N?e.jsxs("div",{className:"upload-game-module-card upload-game-records",children:[e.jsx("div",{className:"upload-game-records-head",children:e.jsxs("div",{className:"upload-game-records-copy",children:[e.jsx(r.Text,{children:a("uploadGame.record.title")}),e.jsx(r.Text,{className:"upload-game-form-head-desc",children:a("uploadGame.record.desc")})]})}),Z?e.jsx(Ze,{type:"warning",description:Z,style:{marginTop:12}}):null,J&&!G.length?e.jsxs("div",{className:"upload-game-records-empty",children:[e.jsx(z,{size:"small"}),e.jsx(r.Text,{children:a("uploadGame.record.loading")})]}):null,!J&&!G.length?e.jsx("div",{className:"upload-game-records-empty",children:e.jsx(r.Text,{children:a("uploadGame.record.empty")})}):null,G.length?e.jsxs("div",{className:"upload-game-records-layout",children:[e.jsx("div",{className:"upload-game-records-toolbar",children:e.jsx(We,{value:v,className:"upload-game-record-select",placeholder:a("uploadGame.record.selectPlaceholder"),allowClear:!0,optionList:G.slice(0,12).map(s=>({value:String(s.asset_id),label:De(s)})),onChange:s=>b(String(s||""))})}),g?e.jsxs("div",{className:"upload-game-record-detail",children:[e.jsx("div",{className:"upload-game-record-detail-head",children:e.jsx("div",{className:"upload-game-record-detail-copy",children:e.jsx(r.Text,{strong:!0,children:a("uploadGame.record.detailTitle",{version:de(g)})})})}),e.jsxs("div",{className:"upload-game-record-detail-body",children:[e.jsxs("div",{className:"upload-game-record-detail-main",children:[e.jsxs("div",{className:"upload-game-record-detail-meta",children:[e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaUploadedAt")}),e.jsx(r.Text,{children:ce(g.uploaded_at)})]}),e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaAssetId")}),e.jsx(r.Text,{children:g.asset_id||a("uploadGame.record.metaUnknown")})]}),e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaSource")}),e.jsx(r.Text,{children:Te(g.source)})]}),e.jsxs("div",{className:"upload-game-record-detail-row",children:[e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.metaSize")}),e.jsx(r.Text,{children:Pe(g.size)})]})]}),e.jsxs("div",{className:"upload-game-record-detail-note",children:[e.jsx(r.Text,{type:"tertiary",children:a("gameAssetDescription")}),e.jsx(r.Paragraph,{children:g.desc||a("uploadGame.record.noDesc")})]})]}),e.jsx("div",{className:"upload-game-record-preview",children:g.state==="ready"?$?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"upload-game-record-qr-box",children:e.jsx(pe,{value:$,size:132})}),e.jsx(r.Text,{className:"upload-game-success-qr-caption",children:a("uploadGame.record.previewHint")})]}):e.jsx("div",{className:"upload-game-record-qr-box upload-game-record-qr-box-muted",children:je?e.jsxs("div",{className:"upload-game-record-preview-loading",children:[e.jsx(z,{size:"small"}),e.jsx(r.Text,{children:a("uploadGame.record.previewLoading")})]}):e.jsx(r.Text,{type:"tertiary",children:a("uploadGame.record.previewUnavailable")})}):e.jsx("div",{className:"upload-game-record-qr-box upload-game-record-qr-box-muted",children:e.jsx(r.Text,{type:"tertiary",children:g.state==="failed"?a("uploadGame.record.failedDesc"):a("uploadGame.record.pendingDesc")})})})]}),String(g.asset_id)===String(fe)&&d?e.jsx("div",{className:"upload-game-success-actions",children:e.jsx(w,{theme:"light",onClick:()=>window.open(d,"_blank"),children:a("viewOnPlatform")})}):null]}):null]}):null]}):null]})]})};export{hs as CheckCode};
@@ -1 +0,0 @@
1
- import{c as y,j as e,T as c,i,S as H,a as q,r as d,u as C,b as R,d as G,P as V,g as W,e as $}from"./index-wqj8y8SZ.js";import{S as I}from"./SectionHeader-BL_bJf61.js";import{T as j,C as f}from"./Tag-B4bSl-_E.js";import{A as F}from"./index-C5k1IRcX.js";import{T as U}from"./triangle-alert-BAadCxAv.js";const K=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],J=y("globe",K);const O=[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]],Q=y("image-off",O);const X=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Y=y("info",X);const Z=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],ee=y("package",Z),se=({packages:s})=>e.jsx("div",{children:s.map(({name:t,size:r},a)=>{const l=(r/1024/1024).toFixed(2)+"MB",m=r<=4*1024*1024;return e.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",borderRadius:6,backgroundColor:m?"var(--tt-success-bg)":"var(--tt-error-bg)",marginBottom:a===s.length-1?0:8,width:"fit-content"},children:[e.jsxs(c.Text,{style:{fontWeight:600,fontSize:14},children:[t,":"]}),e.jsx(c.Text,{style:{color:m?"var(--tt-success-text)":"var(--tt-error-text)",fontWeight:600},children:l}),e.jsx(c.Text,{type:"tertiary",style:{marginLeft:8},children:m?i("notExceedIndependentPkgSizeLimit",{limit:"4MB"}):i("exceedIndependentPkgSizeLimit",{limit:"4MB"})})]},t)})}),ie=({size:s,limit:t})=>{const r=(s/1024/1024).toFixed(2)+"MB",a=s<=t*1024*1024,l=a?i("notExceedSizeLimit",{limit:t+"MB"}):i("exceedSizeLimit",{limit:t+"MB"});return e.jsxs("div",{style:{display:"flex",alignItems:"center",width:"fit-content",padding:"2px 8px",borderRadius:6,backgroundColor:a?"var(--tt-success-bg)":"var(--tt-error-bg)"},children:[e.jsx(c.Text,{style:{fontWeight:600,color:a?"var(--tt-success-text)":"var(--tt-error-text)"},children:r}),e.jsx(c.Text,{type:"tertiary",style:{marginLeft:8},children:l})]})},te=({packages:s,limit:t})=>{const r=s.find(g=>g.type==="main")?.size,a=(r/1024/1024).toFixed(2)+"MB",l=r<=t*1024*1024,m=l?i("notExceedMainPkgSizeLimit",{limit:t+"MB"}):i("exceedMainPkgSizeLimit",{limit:t+"MB"});return e.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",width:"fit-content",borderRadius:6,backgroundColor:l?"var(--tt-success-bg)":"var(--tt-error-bg)"},children:[e.jsx(c.Text,{style:{fontWeight:600,color:l?"var(--tt-success-text)":"var(--tt-error-text)"},children:a}),e.jsx(c.Text,{type:"tertiary",style:{marginLeft:8},children:m})]})},re=({domains:s=[]})=>s?.length?e.jsx(H,{className:"trusted-domain-list",style:{flexWrap:"wrap"},children:s.map(t=>e.jsx(q,{className:"trusted-domain-tag",children:t},t))}):e.jsxs("div",{className:"pd-empty-config-row",children:[e.jsx(j,{tone:"warn",size:"sm",children:i("projectInfo.status.missing")}),e.jsx("span",{children:i("projectInfo.status.domainRequired")})]}),ae=({termsOfServiceLink:s})=>{const t=i("termsLabel");return s?e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(c.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsx("a",{className:"terms-privacy-value",href:s,title:s,target:"_blank",rel:"noreferrer",children:s})]}):e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(c.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsxs("span",{className:"pd-missing-inline",children:[e.jsx(j,{tone:"warn",size:"sm",children:i("projectInfo.status.missing")}),e.jsx("span",{children:i("projectInfo.status.authRequired")})]})]})},ne=({privacyPolicyLink:s})=>{const t=i("privacyLabel");return s?e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(c.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsx("a",{className:"terms-privacy-value",href:s,title:s,target:"_blank",rel:"noreferrer",children:s})]}):e.jsxs("div",{className:"terms-privacy-item",children:[e.jsx(c.Text,{type:"tertiary",className:"terms-privacy-label",children:t}),e.jsxs("span",{className:"pd-missing-inline",children:[e.jsx(j,{tone:"warn",size:"sm",children:i("projectInfo.status.missing")}),e.jsx("span",{children:i("projectInfo.status.authRequired")})]})]})},ce=({logo:s,placeholder:t})=>{const[r,a]=d.useState(!1);return s?.trim()?e.jsxs("div",{className:"pd-logo-image-frame",children:[!r&&(t||e.jsx("div",{className:"pd-logo-loading"})),e.jsx("img",{src:s,alt:"logo",className:"pd-logo-image",style:{opacity:r?1:0},onLoad:()=>a(!0)})]}):e.jsxs("div",{className:"pd-logo-placeholder",children:[e.jsx(Q,{size:20,strokeWidth:2}),e.jsx("span",{children:i("projectInfo.logoMissingShort")})]})},oe=({description:s})=>s?e.jsx("span",{children:s}):e.jsxs("span",{className:"pd-missing-inline",children:[e.jsx(j,{tone:"warn",size:"sm",children:i("projectInfo.status.missing")}),e.jsx("span",{children:i("projectInfo.status.reviewBeforeSubmit")})]}),S=({label:s,children:t,wide:r=!1})=>e.jsxs("div",{className:`pd-field ${r?"pd-field-wide":""}`,children:[e.jsx("span",{className:"pd-field-label",children:s}),e.jsx("div",{className:"pd-field-value",children:t})]}),b=({label:s,children:t})=>e.jsxs("div",{className:"pd-hero-row",children:[e.jsx("span",{className:"pd-hero-row-label",children:s}),e.jsx("div",{className:"pd-hero-row-value",children:t})]}),le=({hint:s})=>e.jsxs("span",{className:"pd-missing-inline",children:[e.jsx(j,{tone:"warn",size:"sm",children:i("projectInfo.status.missing")}),e.jsx("span",{children:s})]}),z=({title:s,issues:t})=>e.jsxs("div",{className:"pd-config-issue-group",children:[e.jsx("div",{className:"pd-config-issue-group-title",children:s}),e.jsx("div",{className:"pd-config-issue-list",children:t.map(r=>e.jsxs("div",{className:"pd-config-issue-item",children:[e.jsx("span",{className:"pd-config-issue-dot","aria-hidden":"true"}),e.jsx("span",{className:"pd-config-issue-title",children:r.title}),e.jsx("span",{className:"pd-config-issue-desc",children:r.desc})]},r.id))})]}),de=({issues:s})=>{if(!s.length)return null;const t=s.filter(a=>a.group==="review"),r=s.filter(a=>a.group==="runtime");return e.jsxs(f,{padding:"md",accent:"warn",className:"pd-config-summary",children:[e.jsxs("div",{className:"pd-config-summary-head",children:[e.jsxs("div",{className:"pd-config-summary-title-block",children:[e.jsxs("div",{className:"pd-config-summary-title",children:[e.jsx(U,{size:16,strokeWidth:2}),e.jsx("span",{children:i("projectInfo.configSummary.title")})]}),e.jsx("div",{className:"pd-config-summary-desc",children:i("projectInfo.configSummary.desc")})]}),e.jsx(j,{tone:"warn",size:"md",children:i("projectInfo.configSummary.count",{count:s.length})})]}),e.jsxs("div",{className:"pd-config-summary-grid",children:[t.length>0?e.jsx(z,{title:i("projectInfo.configSummary.reviewGroup"),issues:t}):null,r.length>0?e.jsx(z,{title:i("projectInfo.configSummary.runtimeGroup"),issues:r}):null]})]})},je=()=>{const{state:{gameDetail:s,user:t,packages:r,engine:a},setGameDetail:l}=C(),[m,g]=d.useState(!0),[w,_]=d.useState(!1),[T,D]=d.useState(""),[P,L]=d.useState("unknown"),M=({errorCode:n,errorMsg:p,clientKey:u})=>{g(!1),_(!0),L(W({errorCode:n,user:t})),D($({errorCode:n,errorMsg:p,clientKey:u,user:t}))};d.useEffect(()=>{if(s&&!s.has_error){g(!1);return}s?.has_error&&(_(!0),M({errorCode:s.error_code,errorMsg:s.error_msg,clientKey:s.client_key})),R({url:"/game/detail",method:"GET"}).then(n=>{if(n?.error)g(!1),M(n.error);else{const{data:p}=n;l(p),g(!1)}})},[]);const o=d.useMemo(()=>{if(!s||s?.has_error)return null;const{size:n,request_allowed_domains:p}=s,u=a==="unity",x=r?.length>0?r:s.packages??[],v=x.reduce((h,A)=>h+(A?.size??0),0)||n,N=u?60:30,k=x.filter(h=>h.type==="independent"),E=x.some(h=>h.type==="main");return{isUnity:u,packageList:x,projectSize:v,projectSizeLimit:N,independentPackages:k,hasMainPackage:E,domains:p}},[a,s,r]),B=d.useMemo(()=>{if(!s||s?.has_error)return[];const n=[],p=!s.display_icon_url?.trim()&&!s.icon_url?.trim(),u=!s.name?.trim(),x=!s.description?.trim(),v=!s.request_allowed_domains?.length,N=!s.terms_of_service_link?.trim(),k=!s.privacy_policy_link?.trim();return p&&n.push({id:"icon",group:"review",title:i("projectInfo.configSummary.item.icon"),desc:i("projectInfo.configSummary.reviewHint")}),u&&n.push({id:"name",group:"review",title:i("projectInfo.configSummary.item.name"),desc:i("projectInfo.configSummary.reviewHint")}),x&&n.push({id:"description",group:"review",title:i("projectInfo.configSummary.item.description"),desc:i("projectInfo.configSummary.reviewHint")}),v&&n.push({id:"domains",group:"runtime",title:i("projectInfo.configSummary.item.domain"),desc:i("projectInfo.configSummary.domainHint")}),N&&n.push({id:"terms",group:"runtime",title:i("projectInfo.configSummary.item.terms"),desc:i("projectInfo.configSummary.termsHint")}),k&&n.push({id:"privacy",group:"runtime",title:i("projectInfo.configSummary.item.privacy"),desc:i("projectInfo.configSummary.privacyHint")}),n},[s]);return m&&!s?e.jsx("div",{className:"pd-loading",children:e.jsx(G,{size:"large"})}):w?e.jsx(F,{errorMsg:T,errorState:P}):!s||!o?null:e.jsxs("div",{className:"pd-page","data-doc-shot":"project-ready",children:[e.jsx(V,{title:i("projectInfo"),subtitle:i("projectInfo.summary")}),e.jsx(de,{issues:B}),e.jsxs(f,{padding:"md",children:[e.jsx(I,{icon:Y,title:i("projectInfo.section.basic")}),e.jsxs("div",{className:"pd-hero",children:[e.jsx("div",{className:"pd-hero-logo",children:e.jsx(ce,{logo:s.display_icon_url||s.icon_url||""})}),e.jsxs("div",{className:"pd-hero-meta",children:[e.jsx(b,{label:i("gameName"),children:s.name?.trim()?e.jsx("span",{className:"pd-hero-name",children:s.name}):e.jsx(le,{hint:i("projectInfo.status.reviewBeforeSubmit")})}),e.jsx(b,{label:i("gameID"),children:e.jsx("span",{className:"pd-hero-code",children:s.client_key||"-"})}),e.jsx(b,{label:i("gameDesc"),children:e.jsx(oe,{description:s.description})})]})]})]}),e.jsxs(f,{padding:"md",children:[e.jsx(I,{icon:ee,title:i("projectInfo.section.package")}),e.jsxs("div",{className:"pd-fields-grid",children:[e.jsx(S,{label:i("gameSize"),children:e.jsx(ie,{size:o.projectSize,limit:o.projectSizeLimit})}),!o.isUnity&&o.hasMainPackage?e.jsx(S,{label:i("gameMainPackageSize"),children:e.jsx(te,{packages:o.packageList,limit:4})}):null,!o.isUnity&&o.independentPackages.length>0?e.jsx(S,{label:i("gameIndependentPackageSize"),wide:!0,children:e.jsx(se,{packages:o.independentPackages})}):null]})]}),e.jsxs(f,{padding:"md",children:[e.jsx(I,{icon:J,title:i("projectInfo.section.platform")}),e.jsxs("div",{className:"pd-platform-stack",children:[e.jsxs("div",{className:"pd-platform-subsection",children:[e.jsx("span",{className:"pd-subsection-label",children:i("gameTrustDomains")}),e.jsx(re,{domains:o.domains})]}),e.jsxs("div",{className:"pd-platform-subsection",children:[e.jsx("span",{className:"pd-subsection-label",children:i("gameTermsAndPrivacy")}),e.jsxs("div",{className:"pd-terms-stack",children:[e.jsx(ae,{termsOfServiceLink:s.terms_of_service_link}),e.jsx(ne,{privacyPolicyLink:s.privacy_policy_link})]})]})]})]})]})};export{je as ProjectDetail};
@@ -1 +0,0 @@
1
- import{c as x,b as N,u as M,r as n,s as S,j as e,d as b,P as v,i as o,m as L,T as z,D as C,o as I}from"./index-wqj8y8SZ.js";import{S as T}from"./SectionHeader-BL_bJf61.js";import{C as m,T as f}from"./Tag-B4bSl-_E.js";import{S as E}from"./sparkles-PwlPP_sT.js";const w=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],_=x("bug",w);const q=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],A=x("wrench",q);function B(){return N({url:"/game/changelog",method:"GET"})}const D=[{key:"feature",icon:E,titleI18n:"changelogFeature",tone:"success"},{key:"optimize",icon:A,titleI18n:"changelogOptimize",tone:"warn"},{key:"bugfix",icon:_,titleI18n:"changelogBugfix",tone:"error"}],V=()=>{const{state:{devToolVersion:l}}=M(),d=I,[h,p]=n.useState([]),[j,c]=n.useState(!0),[r,u]=n.useState("");return n.useEffect(()=>{l&&S(l)},[l]),n.useEffect(()=>{let a=!1;return(async()=>{c(!0),u("");const s=await B();if(!a){if(s?.error||s?.code!==0||!s?.data){p([]),u(typeof s?.error=="object"&&s.error?.errorMsg||"Failed to load changelog."),c(!1);return}p(s.data.items||[]),c(!1)}})(),()=>{a=!0}},[]),j?e.jsx("div",{className:"change-log-container change-log-loading",children:e.jsx(b,{size:"large"})}):e.jsxs("div",{className:"change-log-container",children:[e.jsx(v,{title:o("changelog"),subtitle:o("changelogTip")}),r?e.jsx(L,{fullMode:!1,bordered:!1,closeIcon:null,type:"danger",description:r}):null,!r&&h.length===0?e.jsx(m,{padding:"lg",children:e.jsx(z.Paragraph,{className:"change-log-empty",children:"No changelog entries yet."})}):null,h.map(a=>e.jsxs(m,{padding:"md",className:"change-log-item",children:[e.jsxs("div",{className:"change-log-item-head",children:[e.jsx("h2",{className:"change-log-version",children:a.title}),e.jsxs(f,{tone:"neutral",size:"sm",children:["iOS ",a.target.iOS," · Android ",a.target.Android]})]}),D.map(({key:i,icon:s,titleI18n:y,tone:k})=>{const g=a.changes?.[i]||[];return g.length?e.jsxs("section",{className:"change-log-section",children:[e.jsx(T,{icon:s,title:e.jsxs("span",{className:"change-log-section-title",children:[e.jsx("span",{children:o(y)}),e.jsx(f,{tone:k,size:"sm",children:g.length})]})}),e.jsx("ul",{className:"change-log-changes",children:g.map(t=>e.jsxs("li",{className:"change-log-change",children:[e.jsx("span",{className:"change-log-change-bullet","aria-hidden":!0}),e.jsxs("span",{className:"change-log-change-body",children:[t.desc[d],t?.link?e.jsx(C,{className:"change-log-change-link",href:t.link,iconSize:12,children:o("changelogLink")}):null]})]},t.desc[d]))})]},i):null})]},a.title))]})};export{V as ChangeLog};
@@ -1 +0,0 @@
1
- .subpkg-page{width:100%;box-sizing:border-box;display:flex;flex-direction:column;gap:24px;padding-bottom:24px}.subpkg-hero-strip{margin:-24px -32px 8px;padding:12px 28px 0;background:var(--tt-bg-panel)}.subpkg-hero-strip .tt-page-hero{margin:0;padding:12px 0 8px;background:transparent}.subpkg-back{display:inline-flex;align-items:center;gap:6px;padding:4px 8px 4px 6px;margin-left:-8px;font-size:var(--tt-text-meta);font-weight:500;color:var(--tt-text-dim);background:transparent;border:1px solid transparent;border-radius:var(--tt-radius-md);cursor:pointer;transition:var(--tt-hover-transition)}.subpkg-back:hover{color:var(--tt-text);background:var(--tt-overlay-soft);border-color:var(--tt-border)}.subpkg-back:focus-visible{outline:none;box-shadow:0 0 0 3px var(--tt-accent-soft)}.subpkg-hero-actions{display:inline-flex;align-items:center;gap:10px}.subpkg-card{display:flex;flex-direction:column;gap:16px}.subpkg-card>.tt-section-header{margin-bottom:0}.subpkg-version-card{gap:0}.subpkg-version-card .subpkg-client-version{padding:0;border:0;background:transparent}.subpkg-unsupported-card{display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;padding:40px 32px}.subpkg-unsupported-icon{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;margin-bottom:4px;border-radius:50%;border:1px solid var(--tt-warn-border);background:var(--tt-warn-bg);color:var(--tt-warn-text)}.subpkg-unsupported-title{margin:0;font-size:var(--tt-text-h2);font-weight:600;color:var(--tt-text)}.subpkg-unsupported-desc{margin:0;max-width:520px;font-size:var(--tt-text-body);line-height:1.6;color:var(--tt-text-dim)}.subpkg-unsupported-actions{margin-top:8px}.subpkg-client-version{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 12px;border-radius:var(--tt-radius-md);border:1px solid var(--tt-border);background:var(--tt-bg-sunken)}.subpkg-client-version-title{flex:1 1 160px;display:inline-flex;align-items:center;gap:6px;min-width:0;font-size:var(--tt-text-meta);font-weight:600;line-height:1.4;color:var(--tt-text)}.subpkg-client-version-title svg{flex-shrink:0;color:var(--tt-accent-text)}.subpkg-client-version-chip{flex:0 0 auto;display:inline-flex;align-items:center;height:26px;padding:0 10px;border-radius:999px;border:1px solid var(--tt-accent-border);background:var(--tt-accent-soft);color:var(--tt-accent-text);font-size:var(--tt-text-meta);font-weight:600;white-space:nowrap}.subpkg-dev-guide-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0;padding:0;list-style:none}.subpkg-required-integration{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px 12px;padding:11px 12px;border-left:3px solid var(--tt-emphasis);background:var(--tt-emphasis-soft);border-radius:var(--tt-radius-sm)}.subpkg-required-label{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:0 8px;border:1px solid var(--tt-emphasis-border);border-radius:999px;color:var(--tt-emphasis-text);background:var(--tt-bg-panel);font-size:var(--tt-text-meta);font-weight:600;line-height:1;white-space:nowrap}.subpkg-required-copy{min-width:0;display:flex;flex-direction:column;gap:2px}.subpkg-required-title{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px;color:var(--tt-text);font-size:var(--tt-text-meta);font-weight:600;line-height:1.45}.subpkg-required-title code{padding:1px 5px;border:1px solid var(--tt-emphasis-border);border-radius:var(--tt-radius-sm);color:var(--tt-emphasis-text);background:var(--tt-bg-panel);font:inherit;font-weight:600}.subpkg-required-desc{color:var(--tt-text-dim);font-size:var(--tt-text-meta);line-height:1.5}.subpkg-dev-guide-list li{min-width:0;display:flex;align-items:flex-start;gap:10px;padding:2px 0}.subpkg-dev-guide-index{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:999px;background:var(--tt-overlay-soft);color:var(--tt-text);font-size:var(--tt-text-meta);font-weight:700;line-height:1}.subpkg-dev-guide-copy{min-width:0;display:flex;flex-direction:column;gap:4px;font-size:var(--tt-text-meta);line-height:1.55;color:var(--tt-text-dim)}.subpkg-dev-guide-copy strong{font-size:var(--tt-text-meta);font-weight:600;line-height:1.45;color:var(--tt-text)}.subpkg-section-header.tt-section-header{align-items:center}.subpkg-section-header .tt-section-header-title{font-size:var(--tt-text-h3);font-weight:600;line-height:1.3}.subpkg-entry-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.subpkg-entry-card{appearance:none;font:inherit;cursor:pointer;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:16px 18px;border-radius:var(--tt-radius-md);background:var(--tt-bg-elevated);border:1px solid var(--tt-border);transition:var(--tt-hover-transition)}.subpkg-entry-card:hover{border-color:var(--tt-accent);background:var(--tt-accent-soft)}.subpkg-entry-name{font-size:var(--tt-text-body);font-weight:600;color:var(--tt-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.subpkg-collect-grid{display:flex;flex-direction:column;gap:16px}.subpkg-scan{display:grid;grid-template-columns:208px minmax(0,1fr);align-items:center;gap:16px 24px}.subpkg-qr{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:208px;max-width:208px;aspect-ratio:1;min-width:0;min-height:0;padding:14px;background:var(--tt-bg-elevated);border:1px solid var(--tt-border);border-radius:var(--tt-radius-md)}.subpkg-qr>svg{width:164px;height:164px;max-width:100%;background:var(--tt-qr-bg);padding:4px;border-radius:var(--tt-radius-sm)}.subpkg-scan-main{min-width:0;display:flex;flex-direction:column;gap:10px;padding:4px 0}.subpkg-scan-heading{display:flex;flex-direction:column;gap:2px}.subpkg-scan-title{font-size:var(--tt-text-body);font-weight:600;line-height:1.45;color:var(--tt-text)}.subpkg-scan-subtitle{font-size:var(--tt-text-meta);line-height:1.5;color:var(--tt-text-dim)}.subpkg-qr-empty{font-size:var(--tt-text-body);color:var(--tt-text-dim);text-align:center;line-height:1.6}.subpkg-entry-title{display:inline-flex;align-items:center;gap:8px}.subpkg-entry-title-label{font-size:inherit;font-weight:500;color:var(--tt-text-dim)}.subpkg-entry-title-value{font-weight:600;color:var(--tt-text)}.subpkg-entry-hint{font-size:var(--tt-text-meta);color:var(--tt-text-dim)}.subpkg-entry-hint strong{color:var(--tt-text);font-weight:600}.subpkg-guide{counter-reset:subpkg-guide-step;min-width:0;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;list-style:none;font-size:var(--tt-text-meta);line-height:1.6;color:var(--tt-text-dim)}.subpkg-guide li{counter-increment:subpkg-guide-step;min-width:0;display:grid;grid-template-columns:22px minmax(0,1fr);align-items:flex-start;gap:8px}.subpkg-guide li:before{content:counter(subpkg-guide-step);display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:999px;background:var(--tt-overlay-soft);color:var(--tt-text);font-size:12px;font-weight:700;line-height:1}.subpkg-guide-key{color:var(--tt-text);font-weight:600}.subpkg-guide-key:before{background:var(--tt-accent-soft);color:var(--tt-accent-text)}.subpkg-connect-tools{grid-column:1 / -1;box-sizing:border-box;width:100%;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px;border-radius:var(--tt-radius-md);border:1px solid var(--tt-accent-border);background:var(--tt-accent-soft)}.subpkg-connect-copy{flex:1 1 auto;min-width:0;display:flex;align-items:flex-start;justify-content:flex-start;gap:10px;text-align:left}.subpkg-connect-icon{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:999px;color:var(--tt-accent-text);background:var(--tt-bg-panel);border:1px solid var(--tt-accent-border)}.subpkg-connect-text{min-width:0;display:flex;flex-direction:column;gap:2px}.subpkg-connect-title{font-size:var(--tt-text-meta);line-height:1.5;font-weight:600;color:var(--tt-text)}.subpkg-connect-hint{min-width:0;font-size:var(--tt-text-meta);line-height:1.5;color:var(--tt-text-dim)}.subpkg-connect-actions{flex:0 0 auto;display:inline-flex;align-items:center;gap:8px}.subpkg-connect-button[class*=semi-button]{flex:0 0 auto;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;height:32px;min-width:112px;padding:0 12px;border:1px solid transparent;border-radius:var(--tt-radius-sm);font-weight:600;line-height:30px;white-space:nowrap;transform:none;transition:color .16s ease,background-color .16s ease,border-color .16s ease,box-shadow .16s ease}.subpkg-connect-button-secondary[class*=semi-button]{min-width:124px}.subpkg-connect-button-primary[class*=semi-button]{min-width:104px}.subpkg-connect-button[class*=semi-button] [class*=semi-button-content]{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:0;height:100%;line-height:30px}.subpkg-connect-button-secondary[class*=semi-button]{color:var(--tt-text-dim);background:var(--tt-bg-panel);border-color:var(--tt-border)}.subpkg-connect-button-primary[class*=semi-button]{color:var(--tt-accent-text);background:var(--tt-bg-panel);border-color:var(--tt-accent-border)}.subpkg-connect-button[class*=semi-button]:hover,.subpkg-connect-button[class*=semi-button]:active,.subpkg-connect-button[class*=semi-button]:focus{transform:none;border-width:1px;border-style:solid}.subpkg-connect-button[class*=semi-button]:hover{background:var(--tt-overlay-medium);border-color:var(--tt-border);box-shadow:none}.subpkg-connect-button-primary[class*=semi-button]:hover{border-color:var(--tt-accent-strong);background:var(--tt-bg-panel)}@media(max-width:900px){.subpkg-required-integration{grid-template-columns:auto minmax(0,1fr)}.subpkg-required-integration>.tt-document-link{grid-column:2;justify-self:start}.subpkg-dev-guide-list{grid-template-columns:repeat(2,minmax(0,1fr))}.subpkg-scan{grid-template-columns:1fr;align-items:start;gap:16px}.subpkg-qr{width:min(100%,208px);max-width:208px;min-height:0;margin:0 auto}.subpkg-connect-tools{align-items:flex-start;flex-direction:column;gap:10px}.subpkg-connect-copy{text-align:left}}@media(max-width:560px){.subpkg-hero-strip .tt-page-hero{flex-direction:column}.subpkg-hero-strip .tt-page-hero-action{align-self:flex-start}.subpkg-dev-guide-list{grid-template-columns:1fr}.subpkg-required-integration{grid-template-columns:1fr;align-items:start}.subpkg-required-label{justify-self:start}.subpkg-required-integration>.tt-document-link{grid-column:1}.subpkg-client-version{align-items:flex-start}}.subpkg-banner{position:relative;display:flex;align-items:flex-start;gap:12px;padding:12px 16px 12px 19px;border-radius:var(--tt-radius-md);border:1px solid var(--tt-border);background:var(--tt-bg-sunken);overflow:hidden}.subpkg-banner-bar{position:absolute;left:0;top:0;bottom:0;width:3px;border-top-right-radius:2px;border-bottom-right-radius:2px}.subpkg-banner-accent .subpkg-banner-bar{background:var(--tt-accent)}.subpkg-banner-warn .subpkg-banner-bar{background:var(--tt-warn-text)}.subpkg-banner-success{border-color:var(--tt-success-border);background:var(--tt-success-bg)}.subpkg-banner-success .subpkg-banner-bar{background:var(--tt-success-text)}.subpkg-banner-icon{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;margin-top:1px}.subpkg-banner-accent .subpkg-banner-icon{color:var(--tt-accent-text)}.subpkg-banner-warn .subpkg-banner-icon{color:var(--tt-warn-text)}.subpkg-banner-success .subpkg-banner-icon{color:var(--tt-success-text)}.subpkg-banner-body{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}.subpkg-banner-title{font-size:13px;font-weight:600;line-height:1.4;color:var(--tt-text)}.subpkg-banner-text{font-size:12px;line-height:1.55;color:var(--tt-text-dim);word-break:break-word}.subpkg-banner-progress:empty{display:none}.subpkg-banner-progress .tt-wasm-upload-progress{margin:4px 0 5px;padding:0;background:transparent;border:0;border-radius:0}.subpkg-banner-progress .tt-wasm-upload-progress-meta{font-size:12px}.subpkg-banner-progress .tt-wasm-upload-progress-track{height:5px}.subpkg-banner-cta{flex-shrink:0;align-self:center}.subpkg-banner-action[class*=semi-button]{flex-shrink:0;align-self:center;height:28px;padding:0 12px;border-radius:var(--tt-radius-sm)}.subpkg-wait-spin{animation:subpkg-spin 1.1s linear infinite;flex-shrink:0}@keyframes subpkg-spin{to{transform:rotate(360deg)}}.subpkg-mock{display:flex;flex-direction:column;gap:12px;padding:14px;border-radius:var(--tt-radius-md);border:1px dashed var(--tt-border);background:var(--tt-bg-sunken)}.subpkg-mock-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.subpkg-mock-input{flex:1 1 160px;min-width:140px}.subpkg-mock-empty{display:flex;flex-direction:column;gap:10px;font-size:12px;line-height:1.6;color:var(--tt-text-secondary)}.subpkg-mock-empty-action{align-self:flex-start}.subpkg-json{margin:0;padding:14px 16px;max-height:320px;overflow:auto;border-radius:var(--tt-radius-md);background:var(--tt-bg-sunken);border:1px solid var(--tt-border);color:var(--tt-text);font-family:var( --tt-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace );font-size:var(--tt-text-meta);line-height:1.6;white-space:pre;tab-size:2}.subpkg-preview-empty{padding:20px;text-align:center;font-size:var(--tt-text-meta);color:var(--tt-text-faint);border:1px dashed var(--tt-border);border-radius:var(--tt-radius-md)}.subpkg-finish-note{margin:0;padding:8px 12px;font-size:var(--tt-text-meta);line-height:1.5;color:var(--tt-text-dim);border-radius:var(--tt-radius-md);background:var(--tt-bg-sunken);border:1px solid var(--tt-border)}.subpkg-finish-note-clear{color:var(--tt-warn-text);background:var(--tt-warn-bg);border-color:var(--tt-warn-border)}.subpkg-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}.subpkg-center{align-items:center;text-align:center;padding:48px 32px}.subpkg-center-text{margin:12px 0 0;font-size:var(--tt-text-body);color:var(--tt-text-dim)}.subpkg-empty-icon{color:var(--tt-text-faint)}.subpkg-empty-title{margin:12px 0 0;font-size:var(--tt-text-body);font-weight:600;color:var(--tt-text)}.subpkg-empty-desc{margin:6px 0 0;max-width:440px;font-size:var(--tt-text-meta);line-height:1.6;color:var(--tt-text-dim)}.subpkg-actions-center{justify-content:center;margin-top:18px}.subpkg-result-head{display:flex;align-items:center;gap:8px;font-size:var(--tt-text-h3);font-weight:600}.subpkg-result-success{color:var(--tt-success-text, var(--tt-accent-text))}.subpkg-result-failed{color:var(--tt-error-text, var(--tt-warn-text))}.subpkg-error-msg{margin:0;font-size:var(--tt-text-body);color:var(--tt-text-dim);line-height:1.6;word-break:break-word}