@lovrabet/rabetbase-cli 2.5.5-beta.1 → 2.5.5-beta.2

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 (363) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/detail.js +1 -1
  77. package/lib/commands/dataset/extend-update.js +1 -1
  78. package/lib/commands/dataset/field-restore.js +1 -1
  79. package/lib/commands/dataset/field-update.js +1 -1
  80. package/lib/commands/dataset/generate.js +1 -1
  81. package/lib/commands/dataset/index.js +1 -1
  82. package/lib/commands/dataset/list.js +1 -1
  83. package/lib/commands/dataset/operations.js +1 -1
  84. package/lib/commands/dataset/relation-audit.js +1 -1
  85. package/lib/commands/dataset/relation-create.js +1 -1
  86. package/lib/commands/dataset/relation-delete.js +1 -1
  87. package/lib/commands/dataset/relation-shared.js +1 -1
  88. package/lib/commands/dataset/relation-update.js +1 -1
  89. package/lib/commands/dataset/relations.js +1 -1
  90. package/lib/commands/dataset/rename.js +1 -1
  91. package/lib/commands/dataset/restore.js +1 -1
  92. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  93. package/lib/commands/db/analysis-batching.js +1 -1
  94. package/lib/commands/db/analyze-batch-plan.js +1 -1
  95. package/lib/commands/db/analyze-cancel.js +1 -1
  96. package/lib/commands/db/analyze-start.js +1 -1
  97. package/lib/commands/db/analyze-status.js +1 -1
  98. package/lib/commands/db/create.js +1 -1
  99. package/lib/commands/db/delete.js +1 -1
  100. package/lib/commands/db/detail.js +1 -1
  101. package/lib/commands/db/diff-refresh-start.js +1 -1
  102. package/lib/commands/db/diff-refresh-status.js +1 -1
  103. package/lib/commands/db/diff.js +1 -1
  104. package/lib/commands/db/index.js +1 -1
  105. package/lib/commands/db/list.js +1 -1
  106. package/lib/commands/db/shared.js +1 -1
  107. package/lib/commands/db/table-diff-shared.js +1 -1
  108. package/lib/commands/db/tables.js +1 -1
  109. package/lib/commands/db/test.js +1 -1
  110. package/lib/commands/db/update.js +1 -1
  111. package/lib/commands/deployment/index.js +1 -1
  112. package/lib/commands/deployment/sync-all.js +1 -1
  113. package/lib/commands/deployment/sync-jobs.js +1 -1
  114. package/lib/commands/deployment/sync-status.js +1 -1
  115. package/lib/commands/doctor.js +1 -1
  116. package/lib/commands/file/index.js +1 -1
  117. package/lib/commands/flow/create.js +1 -1
  118. package/lib/commands/flow/detail.js +1 -1
  119. package/lib/commands/flow/index.js +1 -1
  120. package/lib/commands/flow/list.js +1 -1
  121. package/lib/commands/flow/publish.js +1 -1
  122. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  123. package/lib/commands/flow/runtime-role-list.js +1 -1
  124. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  125. package/lib/commands/flow/runtime-user-search.js +1 -1
  126. package/lib/commands/flow/shared.js +1 -1
  127. package/lib/commands/flow/update.js +1 -1
  128. package/lib/commands/flow/validate.js +1 -1
  129. package/lib/commands/instant-api-policy/current.js +1 -1
  130. package/lib/commands/instant-api-policy/index.js +1 -1
  131. package/lib/commands/instant-api-policy/init.js +1 -1
  132. package/lib/commands/instant-api-policy/publish.js +1 -1
  133. package/lib/commands/instant-api-policy/pull.js +1 -1
  134. package/lib/commands/instant-api-policy/revision.js +1 -1
  135. package/lib/commands/instant-api-policy/revisions.js +1 -1
  136. package/lib/commands/instant-api-policy/rollback.js +1 -1
  137. package/lib/commands/instant-api-policy/shared.js +1 -1
  138. package/lib/commands/instant-api-policy/validate.js +1 -1
  139. package/lib/commands/issue/index.js +1 -1
  140. package/lib/commands/issue/nudge.js +1 -1
  141. package/lib/commands/issue/report.js +1 -1
  142. package/lib/commands/issue/shared.js +1 -1
  143. package/lib/commands/kb/create.js +1 -1
  144. package/lib/commands/kb/delete.js +1 -1
  145. package/lib/commands/kb/detail.js +1 -1
  146. package/lib/commands/kb/index.js +1 -1
  147. package/lib/commands/kb/list.js +1 -1
  148. package/lib/commands/kb/search.js +1 -1
  149. package/lib/commands/kb/shared.js +1 -1
  150. package/lib/commands/kb/update.js +1 -1
  151. package/lib/commands/logs/index.js +1 -1
  152. package/lib/commands/menu/asset-update.js +1 -1
  153. package/lib/commands/menu/delete.js +1 -1
  154. package/lib/commands/menu/external-link-create.js +1 -1
  155. package/lib/commands/menu/external-link-update.js +1 -1
  156. package/lib/commands/menu/group-create.js +1 -1
  157. package/lib/commands/menu/group-update.js +1 -1
  158. package/lib/commands/menu/index.js +1 -1
  159. package/lib/commands/menu/list.js +1 -1
  160. package/lib/commands/menu/move.js +1 -1
  161. package/lib/commands/menu/regroup-start.js +1 -1
  162. package/lib/commands/menu/rename.js +1 -1
  163. package/lib/commands/menu/shared/compare-table.js +1 -1
  164. package/lib/commands/menu/shared/delete-plan.js +1 -1
  165. package/lib/commands/menu/shared/facts.js +1 -1
  166. package/lib/commands/menu/shared/index.js +1 -1
  167. package/lib/commands/menu/shared/inquirer.js +1 -1
  168. package/lib/commands/menu/shared/local-pages.js +1 -1
  169. package/lib/commands/menu/shared/logic.js +1 -1
  170. package/lib/commands/menu/shared/mutations.js +1 -1
  171. package/lib/commands/menu/shared/path.js +1 -1
  172. package/lib/commands/menu/shared/service.js +1 -1
  173. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  174. package/lib/commands/menu/shared/sync-core.js +1 -1
  175. package/lib/commands/menu/shared/update-core.js +1 -1
  176. package/lib/commands/menu/shared/valid-url.js +1 -1
  177. package/lib/commands/menu/subapp-assets-status.js +1 -1
  178. package/lib/commands/menu/subapp-assets-update.js +1 -1
  179. package/lib/commands/menu/sync.js +1 -1
  180. package/lib/commands/menu/visibility-update.js +1 -1
  181. package/lib/commands/notification/config-create.js +1 -1
  182. package/lib/commands/notification/config-delete.js +1 -1
  183. package/lib/commands/notification/config-list.js +1 -1
  184. package/lib/commands/notification/config-update.js +1 -1
  185. package/lib/commands/notification/index.js +1 -1
  186. package/lib/commands/notification/shared.js +1 -1
  187. package/lib/commands/ocr/index.js +1 -1
  188. package/lib/commands/page/create.js +1 -1
  189. package/lib/commands/page/custom/detail.js +1 -1
  190. package/lib/commands/page/custom/list.js +1 -1
  191. package/lib/commands/page/custom/publish.js +1 -1
  192. package/lib/commands/page/custom/shared.js +1 -1
  193. package/lib/commands/page/custom/syntax.js +1 -1
  194. package/lib/commands/page/custom/update.js +1 -1
  195. package/lib/commands/page/data-list-status.js +1 -1
  196. package/lib/commands/page/generate-start.js +1 -1
  197. package/lib/commands/page/generate-status.js +1 -1
  198. package/lib/commands/page/index.js +1 -1
  199. package/lib/commands/page/pull.js +1 -1
  200. package/lib/commands/page/push.js +1 -1
  201. package/lib/commands/page/relation-audit.js +1 -1
  202. package/lib/commands/page/restore.js +1 -1
  203. package/lib/commands/page/shared.js +1 -1
  204. package/lib/commands/page/sync.js +1 -1
  205. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  206. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  207. package/lib/commands/project/create/format-elapsed.js +1 -1
  208. package/lib/commands/project/create/main.js +1 -1
  209. package/lib/commands/project/create/materialize-project-template.js +1 -1
  210. package/lib/commands/project/create/project-name.js +1 -1
  211. package/lib/commands/project/create/project-template-archive.js +1 -1
  212. package/lib/commands/project/create/project-template-path.js +1 -1
  213. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  214. package/lib/commands/project/create/use-format-code.js +1 -1
  215. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  216. package/lib/commands/project/domain-routing-sync.js +1 -1
  217. package/lib/commands/project/index.js +1 -1
  218. package/lib/commands/project/upgrade.js +1 -1
  219. package/lib/commands/registry.js +1 -1
  220. package/lib/commands/role/delete.js +1 -1
  221. package/lib/commands/role/detail.js +1 -1
  222. package/lib/commands/role/index.js +1 -1
  223. package/lib/commands/role/list.js +1 -1
  224. package/lib/commands/role/shared.js +1 -1
  225. package/lib/commands/role/update.js +1 -1
  226. package/lib/commands/role/user-add.js +1 -1
  227. package/lib/commands/role/user-remove.js +1 -1
  228. package/lib/commands/role/user-resolve.js +1 -1
  229. package/lib/commands/rule/get.js +1 -1
  230. package/lib/commands/rule/index.js +1 -1
  231. package/lib/commands/rule/list.js +1 -1
  232. package/lib/commands/rule/set.js +1 -1
  233. package/lib/commands/rule/shared.js +1 -1
  234. package/lib/commands/run/index.js +1 -1
  235. package/lib/commands/schema.js +1 -1
  236. package/lib/commands/sql/create.js +1 -1
  237. package/lib/commands/sql/delete.js +1 -1
  238. package/lib/commands/sql/detail.js +1 -1
  239. package/lib/commands/sql/exec.js +1 -1
  240. package/lib/commands/sql/index.js +1 -1
  241. package/lib/commands/sql/list.js +1 -1
  242. package/lib/commands/sql/pull.js +1 -1
  243. package/lib/commands/sql/push.js +1 -1
  244. package/lib/commands/sql/shared.js +1 -1
  245. package/lib/commands/sql/status.js +1 -1
  246. package/lib/commands/sql/validate.js +1 -1
  247. package/lib/commands/task/index.js +1 -1
  248. package/lib/commands/task/status.js +1 -1
  249. package/lib/commands/tenant/index.js +1 -1
  250. package/lib/commands/tenant/members-list.js +1 -1
  251. package/lib/commands/tenant/shared.js +1 -1
  252. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  253. package/lib/commands/user-account/feishu-bind.js +1 -1
  254. package/lib/commands/user-account/index.js +1 -1
  255. package/lib/commands/workspace/add.js +1 -1
  256. package/lib/commands/workspace/index.js +1 -1
  257. package/lib/commands/workspace/remove.js +1 -1
  258. package/lib/config/domain-config.js +1 -1
  259. package/lib/config/project-domain-routing.js +1 -1
  260. package/lib/config/region-config.js +1 -1
  261. package/lib/config/schema.js +1 -1
  262. package/lib/constant/cdn.js +1 -1
  263. package/lib/constant/cli.js +1 -1
  264. package/lib/constant/defaults.js +1 -1
  265. package/lib/constant/domain.js +1 -1
  266. package/lib/constant/env.js +1 -1
  267. package/lib/constant/output.js +1 -1
  268. package/lib/constant/paths.js +1 -1
  269. package/lib/constant/region.js +1 -1
  270. package/lib/constant/risk.js +1 -1
  271. package/lib/constant/routing-profile.js +1 -1
  272. package/lib/context/app-resolver.js +1 -1
  273. package/lib/context/auth-resolver.js +1 -1
  274. package/lib/context/config-loader.js +1 -1
  275. package/lib/context.js +1 -1
  276. package/lib/core/alias-resolver.js +1 -1
  277. package/lib/core/api-client.js +1 -1
  278. package/lib/core/bff/config.js +1 -1
  279. package/lib/core/bff/file-system.js +1 -1
  280. package/lib/core/bff/hash.js +1 -1
  281. package/lib/core/bff/hook-directory.js +1 -1
  282. package/lib/core/bff/lock.js +1 -1
  283. package/lib/core/bff/utils.js +1 -1
  284. package/lib/core/cross-db-relation.js +1 -1
  285. package/lib/core/db-resolver.js +1 -1
  286. package/lib/core/flow-config.js +1 -1
  287. package/lib/core/instant-api-policy/config.js +1 -1
  288. package/lib/core/kb-search-client.js +1 -1
  289. package/lib/core/page/file-system.js +1 -1
  290. package/lib/core/page/hash.js +1 -1
  291. package/lib/core/page/lock.js +1 -1
  292. package/lib/core/page/lr-smart-jsx.js +1 -1
  293. package/lib/core/sql-index-auditor.js +1 -1
  294. package/lib/core/sql-sync/config.js +1 -1
  295. package/lib/core/sql-sync/file-system.js +1 -1
  296. package/lib/core/sql-sync/hash.js +1 -1
  297. package/lib/core/sql-sync/lock.js +1 -1
  298. package/lib/core/sql-sync/utils.js +1 -1
  299. package/lib/core/sql-validator.js +1 -1
  300. package/lib/errors.js +1 -1
  301. package/lib/framework/build-all-flags.js +1 -1
  302. package/lib/framework/error-output.js +1 -1
  303. package/lib/framework/explicit-yes.js +1 -1
  304. package/lib/framework/flags.js +1 -1
  305. package/lib/framework/help.js +1 -1
  306. package/lib/framework/index.js +1 -1
  307. package/lib/framework/output.js +1 -1
  308. package/lib/framework/response.js +1 -1
  309. package/lib/framework/runner-alias.js +1 -1
  310. package/lib/framework/runner.js +1 -1
  311. package/lib/framework/schema-export.js +1 -1
  312. package/lib/framework/supported-flags.js +1 -1
  313. package/lib/framework/types.js +1 -1
  314. package/lib/generated/build-info.d.ts +4 -4
  315. package/lib/generated/build-info.js +1 -1
  316. package/lib/generated/official-routing.js +1 -1
  317. package/lib/generated/routing-contract.js +1 -1
  318. package/lib/help.js +1 -1
  319. package/lib/postinstall.js +1 -1
  320. package/lib/runtime/confirmation.js +1 -1
  321. package/lib/runtime/event.js +1 -1
  322. package/lib/runtime/index.js +1 -1
  323. package/lib/runtime/queue.js +1 -1
  324. package/lib/runtime/resolve.js +1 -1
  325. package/lib/skills/builtin-skill.js +1 -1
  326. package/lib/skills/main.js +1 -1
  327. package/lib/skills/npx-skills-add.js +1 -1
  328. package/lib/skills/skill-presence.js +1 -1
  329. package/lib/telemetry/cli-command-trace.js +1 -1
  330. package/lib/telemetry/cli-help-trace.js +1 -1
  331. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  332. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  333. package/lib/telemetry/send-cli-trace-log.js +1 -1
  334. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  335. package/lib/utils/ai_config.js +1 -1
  336. package/lib/utils/apply-jq-filter.js +1 -1
  337. package/lib/utils/cdn-config.js +1 -1
  338. package/lib/utils/check-sdk-version.js +1 -1
  339. package/lib/utils/cli-version-check.js +1 -1
  340. package/lib/utils/cli-version-policy.js +1 -1
  341. package/lib/utils/config.js +1 -1
  342. package/lib/utils/entity-with-id.js +1 -1
  343. package/lib/utils/file-utils.js +1 -1
  344. package/lib/utils/guides-cdn.js +1 -1
  345. package/lib/utils/http-client.js +1 -1
  346. package/lib/utils/is-non-interactive.js +1 -1
  347. package/lib/utils/logger.js +1 -1
  348. package/lib/utils/params.js +1 -1
  349. package/lib/utils/platform.js +1 -1
  350. package/lib/utils/sleep.js +1 -1
  351. package/lib/utils/template-replacer.js +1 -1
  352. package/lib/utils/update-notice.js +1 -1
  353. package/lib/utils/version.js +1 -1
  354. package/lib/utils/with-active-cookie.js +1 -1
  355. package/lib/utils/write-cli-side-channel.js +1 -1
  356. package/package.json +1 -1
  357. package/skills/rabetbase/SKILL.md +1 -1
  358. package/skills/rabetbase-page-generation/SKILL.md +13 -9
  359. package/skills/rabetbase-page-generation/references/component-baseline.md +2 -2
  360. package/skills/rabetbase-page-generation/references/generation.md +64 -15
  361. package/skills/rabetbase-page-generation/templates/onepage/build.mjs +39 -54
  362. package/skills/rabetbase-page-generation/templates/onepage/list/index.jsx +6 -2
  363. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- function a169_0x3ea1(){const _0xb7429d=['map','backend','operation','max','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','message','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','18537786xzMWnM','4cJNZvN','Sibling\x20sort\x20value\x20(non-negative\x20integer)','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','folder','Exact\x20online\x20menu\x20id','menu_sort_overflow','before','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','menu_mutation_failed','string','snapshotHash','\x20is\x20type\x20\x22','expect-parent-id','hash',',\x20current\x20','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','\x20menu\x20','menu_verification_failed','isSafeInteger','bool','menu_confirmation_required','type','prototype','succeeded','call','required','number','50160lZeHaF','10102896FexIPm','recheck\x20online\x20menu\x20facts\x20before\x20','menu_state_drift','2911447kapEIv','hint','get','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','hasOwnProperty','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','verification','parentId','code','warnings','cookie','failedRecords','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','\x22,\x20not\x20folder.','expect-path','appCode','defineProperty','stage','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','unknown','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','validation','data','10649zFcGmT','expected-children-count','menu_sort_invalid','path','2113175ExbMZz','toLowerCase','rawFlags','Online\x20menu\x20state\x20changed\x20before\x20','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','targets','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','deleteOrder','Permission\x20denied\x20while\x20attempting\x20to\x20','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','\x20child\x20count\x20changed:\x20expected\x20','test','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','after','root','yes','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','selector','12YWaKsA','planFile','7639896bMUpnY','childrenCount',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','menu_parent_not_folder','cascade',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','Menu\x20','api_error','dryRun','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','sort','length','parent-id','plannedActions','dry-run','failed','num','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','str'];a169_0x3ea1=function(){return _0xb7429d;};return a169_0x3ea1();}const a169_0x3183fb=a169_0x2790;(function(_0x59c7c1,_0x4704c2){const _0x1504e0=a169_0x2790,_0x108260=_0x59c7c1();while(!![]){try{const _0x411254=parseInt(_0x1504e0(0x122))/0x1*(-parseInt(_0x1504e0(0xec))/0x2)+parseInt(_0x1504e0(0x107))/0x3+-parseInt(_0x1504e0(0xd0))/0x4+parseInt(_0x1504e0(0x126))/0x5*(-parseInt(_0x1504e0(0x138))/0x6)+parseInt(_0x1504e0(0x10b))/0x7+parseInt(_0x1504e0(0x108))/0x8+parseInt(_0x1504e0(0xeb))/0x9;if(_0x411254===_0x4704c2)break;else _0x108260['push'](_0x108260['shift']());}catch(_0x894da2){_0x108260['push'](_0x108260['shift']());}}}(a169_0x3ea1,0xeef1b));import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':a169_0x3183fb(0x106),'required':!![],'description':a169_0x3183fb(0xf0)};export const MENU_SORT_FLAG={'name':a169_0x3183fb(0xda),'type':a169_0x3183fb(0x106),'description':a169_0x3183fb(0xed)};export const MENU_PARENT_ID_FLAG={'name':a169_0x3183fb(0xdc),'type':a169_0x3183fb(0xf5),'description':a169_0x3183fb(0x132)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a169_0x3183fb(0xf8),'type':a169_0x3183fb(0xf5),'description':a169_0x3183fb(0x11f)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a169_0x3183fb(0x119),'type':a169_0x3183fb(0xf5),'description':a169_0x3183fb(0xd9)},{'name':a169_0x3183fb(0x123),'type':a169_0x3183fb(0x106),'description':a169_0x3183fb(0x12f)}];export function validateExactId(_0x35851a){const _0x15c0b8=a169_0x3183fb,_0x6ec27=_0x35851a[_0x15c0b8(0xe0)]('id');if(!Number['isSafeInteger'](_0x6ec27)||_0x6ec27<=0x0)throw CliErrors[_0x15c0b8(0x120)](_0x15c0b8(0x136));return _0x6ec27;}export function validateSort(_0x4c4adb,_0x389d3b=a169_0x3183fb(0xda)){const _0x3454c7=a169_0x3183fb;if(!hasFlag(_0x4c4adb,_0x389d3b))return undefined;const _0x53d38f=_0x4c4adb[_0x3454c7(0xe0)](_0x389d3b);if(!Number[_0x3454c7(0xfe)](_0x53d38f)||_0x53d38f<0x0||_0x53d38f>MAX_MENU_SORT)throw menuError(_0x3454c7(0x124),'--'+_0x389d3b+_0x3454c7(0xe7)+MAX_MENU_SORT+'.',_0x3454c7(0x11d));return _0x53d38f;}export function nextSiblingSort(_0x3ebafe,_0x428607,_0x4cc6b4){const _0x3fa3ee=a169_0x3183fb,_0x5c30a6=getChildren(_0x3ebafe,_0x428607)[_0x3fa3ee(0xe3)](_0x24a268=>_0x24a268['sort'])['filter'](_0x1bc7af=>typeof _0x1bc7af===_0x3fa3ee(0x106));if(_0x5c30a6[_0x3fa3ee(0xdb)]===0x0)return 0x0;const _0x1fc772=Math[_0x3fa3ee(0xe6)](..._0x5c30a6);if(_0x1fc772>=MAX_MENU_SORT)throw menuError(_0x3fa3ee(0xf1),'Cannot\x20append\x20a\x20'+_0x4cc6b4+_0x3fa3ee(0x12a)+_0x1fc772+'.','Reorder\x20sibling\x20menus\x20below\x20'+MAX_MENU_SORT+_0x3fa3ee(0xd2));return _0x1fc772+0x1;}export function requireExplicitYes(_0xf8bffd){const _0x479e85=a169_0x3183fb;if(_0xf8bffd[_0x479e85(0xff)](_0x479e85(0xde)))return;if(!_0xf8bffd[_0x479e85(0xff)](_0x479e85(0x135)))throw menuError(_0x479e85(0x100),_0x479e85(0xfb),_0x479e85(0xee));}export async function fetchMutationSnapshot(_0x4467b3,_0x3f8edb,_0x5d3cfd){const _0x178747=a169_0x3183fb;try{return await fetchMenuSnapshot(_0x4467b3[_0x178747(0x11a)],_0x4467b3[_0x178747(0x115)]);}catch(_0x932f7b){throw mapMenuApiError(_0x932f7b,'read\x20online\x20menu\x20facts\x20before\x20'+_0x3f8edb,_0x5d3cfd);}}export async function recheckMutationSnapshot(_0x95f19,_0x23f04b,_0xd56d5a,_0x5903ed){const _0x2655f2=a169_0x3183fb;let _0x17b0f4;try{_0x17b0f4=await fetchMenuSnapshot(_0x95f19[_0x2655f2(0x11a)],_0x95f19['cookie']);}catch(_0xe5cc6c){const _0xe78d93=mapMenuApiError(_0xe5cc6c,_0x2655f2(0x109)+_0xd56d5a,_0x5903ed);throw menuFailure(_0xe78d93,_0x23f04b,{'stage':'pre-write-recheck','failed':_0x5903ed==null?{}:{'id':_0x5903ed}});}if(_0x17b0f4[_0x2655f2(0xf9)]!==_0x23f04b['snapshotHash']){const _0x9563d9=menuError(_0x2655f2(0x10a),_0x2655f2(0x129)+_0xd56d5a+_0x2655f2(0xd5),_0x2655f2(0xf3));throw menuFailure(_0x9563d9,_0x23f04b,{'stage':'pre-write-recheck','failed':{..._0x5903ed==null?{}:{'id':_0x5903ed},'expectedSnapshotHash':_0x23f04b[_0x2655f2(0xf6)],'currentSnapshotHash':_0x17b0f4[_0x2655f2(0xf9)]}});}return _0x17b0f4;}export function parseParentId(_0x3873b7,_0x2a7fa8,_0x372750={}){const _0x226484=a169_0x3183fb;if(!hasFlag(_0x3873b7,_0x2a7fa8)){if(_0x372750[_0x226484(0x105)])throw CliErrors['flagMissing'](_0x2a7fa8);return undefined;}const _0xbf0f7a=_0x3873b7[_0x226484(0xe2)](_0x2a7fa8)['trim']();if(_0xbf0f7a[_0x226484(0x127)]()===_0x226484(0x134))return null;if(!/^\d+$/[_0x226484(0x131)](_0xbf0f7a))throw CliErrors[_0x226484(0x120)]('--'+_0x2a7fa8+_0x226484(0x117));const _0x5b6476=Number(_0xbf0f7a);if(!Number[_0x226484(0xfe)](_0x5b6476)||_0x5b6476<=0x0)throw CliErrors['validation']('--'+_0x2a7fa8+'\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.');return _0x5b6476;}function a169_0x2790(_0x4b597c,_0x12a7b5){_0x4b597c=_0x4b597c-0xd0;const _0x3ea146=a169_0x3ea1();let _0x27904a=_0x3ea146[_0x4b597c];return _0x27904a;}export function requireMenu(_0x56ff5b,_0x20cfcc){const _0x127254=a169_0x3183fb,_0x5737aa=_0x56ff5b['byId'][_0x127254(0x10d)](_0x20cfcc);if(!_0x5737aa)throw menuError('menu_not_found','Online\x20menu\x20not\x20found:\x20'+_0x20cfcc,_0x127254(0xea));return _0x5737aa;}export function requireFolder(_0x4770f5,_0x5f5578){const _0x4dec9b=a169_0x3183fb,_0x232100=requireMenu(_0x4770f5,_0x5f5578);if(_0x232100[_0x4dec9b(0x101)]!==_0x4dec9b(0xef))throw menuError(_0x4dec9b(0xd3),'Menu\x20'+_0x5f5578+_0x4dec9b(0xf7)+(_0x232100[_0x4dec9b(0x101)]||_0x4dec9b(0x11e))+_0x4dec9b(0x118),'Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.');return _0x232100;}export function assertExpectedState(_0x124adc,_0x776f74){const _0x568bf2=a169_0x3183fb;if(hasFlag(_0x124adc,'expect-parent-id')){const _0x3dfb7e=parseParentId(_0x124adc,_0x568bf2(0xf8),{'required':!![]});if(_0x776f74[_0x568bf2(0x112)]!==_0x3dfb7e)throw stateDrift(_0x568bf2(0xd6)+_0x776f74['id']+'\x20parent\x20changed:\x20expected\x20'+formatParent(_0x3dfb7e)+_0x568bf2(0xfa)+formatParent(_0x776f74[_0x568bf2(0x112)])+'.');}if(hasFlag(_0x124adc,_0x568bf2(0x119))){const _0x1e13cf=_0x124adc[_0x568bf2(0xe2)](_0x568bf2(0x119));if(_0x776f74[_0x568bf2(0x125)]!==_0x1e13cf)throw stateDrift('Menu\x20'+_0x776f74['id']+'\x20path\x20changed:\x20expected\x20'+JSON['stringify'](_0x1e13cf)+',\x20current\x20'+JSON['stringify'](_0x776f74[_0x568bf2(0x125)])+'.');}if(hasFlag(_0x124adc,_0x568bf2(0x123))){const _0x48bfdd=_0x124adc['num'](_0x568bf2(0x123));if(!Number[_0x568bf2(0xfe)](_0x48bfdd)||_0x48bfdd<0x0)throw CliErrors['validation'](_0x568bf2(0x110));if(_0x776f74['childrenCount']!==_0x48bfdd)throw stateDrift('Menu\x20'+_0x776f74['id']+_0x568bf2(0x130)+_0x48bfdd+',\x20current\x20'+_0x776f74[_0x568bf2(0xd1)]+'.');}}export function assertVerified(_0x26a89e,_0x2d1f58,_0x6dccd=a169_0x3183fb(0x10e)){const _0x12d357=a169_0x3183fb;if(!_0x26a89e)throw menuError(_0x12d357(0xfd),_0x2d1f58,_0x6dccd);}export function mutationResult(_0x552b95){const _0x250fc1=a169_0x3183fb;return{'operation':_0x552b95[_0x250fc1(0xe5)],'selector':_0x552b95[_0x250fc1(0x137)],'before':_0x552b95[_0x250fc1(0xf2)],'after':_0x552b95[_0x250fc1(0x133)],'dryRun':_0x552b95[_0x250fc1(0xd8)],'backend':_0x552b95[_0x250fc1(0xe4)],..._0x552b95[_0x250fc1(0xdd)]?{'plannedActions':_0x552b95['plannedActions']}:{},..._0x552b95[_0x250fc1(0x12b)]?{'targets':_0x552b95[_0x250fc1(0x12b)]}:{},..._0x552b95[_0x250fc1(0x12d)]?{'deleteOrder':_0x552b95[_0x250fc1(0x12d)]}:{},'snapshotHash':_0x552b95['snapshotHash'],..._0x552b95[_0x250fc1(0xd4)]?{'cascade':_0x552b95[_0x250fc1(0xd4)]}:{},..._0x552b95[_0x250fc1(0x139)]?{'planFile':_0x552b95[_0x250fc1(0x139)]}:{},'succeeded':_0x552b95[_0x250fc1(0x103)]??[],'failed':_0x552b95[_0x250fc1(0xdf)]??[],'warnings':_0x552b95[_0x250fc1(0x114)]??[],'verification':_0x552b95[_0x250fc1(0x111)],'error':_0x552b95['error']};}export function menuDryRunResult(_0xf94719,_0x4d0e0a){return{..._0xf94719,..._0x4d0e0a};}export function menuFailure(_0x2e773d,_0x1f8606,_0x5cd190){const _0x3b933d=a169_0x3183fb,_0x4af263=mutationResult({..._0x1f8606,'after':_0x5cd190[_0x3b933d(0x133)]===undefined?_0x1f8606[_0x3b933d(0x133)]:_0x5cd190[_0x3b933d(0x133)],'backend':_0x5cd190['backend']??_0x1f8606[_0x3b933d(0xe4)],'dryRun':![],'succeeded':_0x5cd190['succeeded']??[],'failed':_0x5cd190[_0x3b933d(0x116)]??[{..._0x5cd190[_0x3b933d(0xdf)]??{},'stage':_0x5cd190[_0x3b933d(0x11c)],'code':_0x2e773d['code'],'message':_0x2e773d[_0x3b933d(0xe9)]}],'warnings':[..._0x1f8606['warnings'],..._0x5cd190[_0x3b933d(0x114)]??[]],'verification':_0x5cd190[_0x3b933d(0x111)],'error':{'code':_0x2e773d[_0x3b933d(0x113)],'message':_0x2e773d[_0x3b933d(0xe9)],..._0x2e773d['hint']?{'hint':_0x2e773d[_0x3b933d(0x10c)]}:{}}});return Object[_0x3b933d(0x11b)](_0x2e773d,_0x3b933d(0x121),{'value':_0x4af263,'enumerable':!![],'configurable':!![]}),_0x2e773d;}export function asVerificationError(_0x380c63,_0x28aa68){const _0x368b8b=a169_0x3183fb;if(_0x380c63 instanceof CliError&&_0x380c63['code']===_0x368b8b(0xfd))return _0x380c63;const _0x4b5eb8=_0x380c63 instanceof Error?_0x380c63[_0x368b8b(0xe9)]:String(_0x380c63);return menuError(_0x368b8b(0xfd),''+_0x28aa68+(_0x4b5eb8?':\x20'+_0x4b5eb8:''),_0x368b8b(0xe8));}export function describeMenuErrorCause(_0x43fb8c,_0x384100,_0x32afb2){const _0x2d2598=a169_0x3183fb,_0x776b15=mapMenuApiError(_0x43fb8c,_0x384100,_0x32afb2);return{'causeCode':_0x776b15[_0x2d2598(0x113)],'causeMessage':_0x776b15[_0x2d2598(0xe9)]};}export function hasFlag(_0x312f5b,_0x46505e){const _0x1aa5a1=a169_0x3183fb;return Object[_0x1aa5a1(0x102)][_0x1aa5a1(0x10f)][_0x1aa5a1(0x104)](_0x312f5b[_0x1aa5a1(0x128)],_0x46505e)&&_0x312f5b['rawFlags'][_0x46505e]!==undefined;}export function toApiParentId(_0xe1423d){return _0xe1423d??0x0;}export function formatParent(_0x3c36dd){const _0x4559b4=a169_0x3183fb;return _0x3c36dd==null?_0x4559b4(0x134):String(_0x3c36dd);}export function menuError(_0x4f3af2,_0xb92826,_0x1fc27e){return new CliError(_0x4f3af2,0x1,_0xb92826,_0x1fc27e);}export function mapMenuApiError(_0x2893df,_0x293f7e,_0x1614f1){const _0x530f05=a169_0x3183fb;if(_0x2893df instanceof CliError&&_0x2893df[_0x530f05(0x113)]!==_0x530f05(0xd7))return _0x2893df;const _0x48030c=_0x2893df instanceof Error?_0x2893df['message']:String(_0x2893df);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x530f05(0x131)](_0x48030c))return menuError('menu_permission_denied',_0x530f05(0x12e)+_0x293f7e+(_0x1614f1?_0x530f05(0xfc)+_0x1614f1:'')+'.',_0x530f05(0x12c));return menuError(_0x530f05(0xf4),'Failed\x20to\x20'+_0x293f7e+(_0x1614f1?_0x530f05(0xfc)+_0x1614f1:'')+':\x20'+_0x48030c,'Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.');}export function isMenuResponseLoss(_0x41ad6f){const _0x7fb7e8=a169_0x3183fb,_0x3b82b2=_0x41ad6f instanceof Error?_0x41ad6f[_0x7fb7e8(0xe9)]:String(_0x41ad6f);if(_0x41ad6f instanceof CliError)return _0x41ad6f['code']===_0x7fb7e8(0xd7)&&/^Request (?:failed|timeout):/i[_0x7fb7e8(0x131)](_0x3b82b2);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x7fb7e8(0x131)](_0x3b82b2);}function stateDrift(_0xfd459b){const _0x111463=a169_0x3183fb;return menuError(_0x111463(0x10a),_0xfd459b,_0x111463(0xe1));}
1
+ const a169_0x395969=a169_0x1eab;(function(_0x58f2a4,_0x5b94ee){const _0x244cd0=a169_0x1eab,_0x695d87=_0x58f2a4();while(!![]){try{const _0x923d0f=parseInt(_0x244cd0(0x192))/0x1*(parseInt(_0x244cd0(0x194))/0x2)+-parseInt(_0x244cd0(0x1ba))/0x3*(-parseInt(_0x244cd0(0x1e1))/0x4)+-parseInt(_0x244cd0(0x19c))/0x5+parseInt(_0x244cd0(0x18a))/0x6*(-parseInt(_0x244cd0(0x1cc))/0x7)+parseInt(_0x244cd0(0x1c2))/0x8+-parseInt(_0x244cd0(0x1d1))/0x9+parseInt(_0x244cd0(0x1c0))/0xa;if(_0x923d0f===_0x5b94ee)break;else _0x695d87['push'](_0x695d87['shift']());}catch(_0x141406){_0x695d87['push'](_0x695d87['shift']());}}}(a169_0x4356,0x5e4b7));import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':a169_0x395969(0x198),'required':!![],'description':a169_0x395969(0x1c8)};export const MENU_SORT_FLAG={'name':a169_0x395969(0x1cd),'type':a169_0x395969(0x198),'description':a169_0x395969(0x1d3)};export const MENU_PARENT_ID_FLAG={'name':a169_0x395969(0x1c3),'type':'string','description':a169_0x395969(0x1f4)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a169_0x395969(0x1ec),'type':a169_0x395969(0x1db),'description':a169_0x395969(0x1be)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a169_0x395969(0x1e7),'type':a169_0x395969(0x1db),'description':a169_0x395969(0x1ef)},{'name':'expected-children-count','type':a169_0x395969(0x198),'description':a169_0x395969(0x1e8)}];function a169_0x1eab(_0x4879de,_0x4a724b){_0x4879de=_0x4879de-0x186;const _0x435682=a169_0x4356();let _0x1eabbd=_0x435682[_0x4879de];return _0x1eabbd;}export function validateExactId(_0x5aef6f){const _0x5e6d3b=a169_0x395969,_0x3d8ff0=_0x5aef6f['num']('id');if(!Number[_0x5e6d3b(0x1f2)](_0x3d8ff0)||_0x3d8ff0<=0x0)throw CliErrors[_0x5e6d3b(0x1a6)](_0x5e6d3b(0x1ee));return _0x3d8ff0;}export function validateSort(_0x305773,_0x2b2193=a169_0x395969(0x1cd)){const _0x4061af=a169_0x395969;if(!hasFlag(_0x305773,_0x2b2193))return undefined;const _0x577517=_0x305773[_0x4061af(0x1b1)](_0x2b2193);if(!Number[_0x4061af(0x1f2)](_0x577517)||_0x577517<0x0||_0x577517>MAX_MENU_SORT)throw menuError(_0x4061af(0x1d4),'--'+_0x2b2193+_0x4061af(0x1e0)+MAX_MENU_SORT+'.',_0x4061af(0x1a2));return _0x577517;}export function nextSiblingSort(_0x2ec4b6,_0x38093c,_0x5b6a84){const _0x3f5ab1=a169_0x395969,_0x3884f4=getChildren(_0x2ec4b6,_0x38093c)[_0x3f5ab1(0x1a5)](_0x161ceb=>_0x161ceb[_0x3f5ab1(0x1cd)])['filter'](_0x2b745e=>typeof _0x2b745e===_0x3f5ab1(0x198));if(_0x3884f4[_0x3f5ab1(0x1a1)]===0x0)return 0x0;const _0x5c497a=Math[_0x3f5ab1(0x1f0)](..._0x3884f4);if(_0x5c497a>=MAX_MENU_SORT)throw menuError(_0x3f5ab1(0x1bb),_0x3f5ab1(0x1d0)+_0x5b6a84+_0x3f5ab1(0x199)+_0x5c497a+'.',_0x3f5ab1(0x1d6)+MAX_MENU_SORT+_0x3f5ab1(0x1e9));return _0x5c497a+0x1;}export function requireExplicitYes(_0x402a76){const _0x55605a=a169_0x395969;if(_0x402a76['bool']('dry-run'))return;if(!_0x402a76[_0x55605a(0x18e)](_0x55605a(0x1a9)))throw menuError(_0x55605a(0x18f),_0x55605a(0x1b8),'Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export async function fetchMutationSnapshot(_0x34728b,_0x5d8f64,_0x5c5ffc){const _0x1b7715=a169_0x395969;try{return await fetchMenuSnapshot(_0x34728b['appCode'],_0x34728b[_0x1b7715(0x1f3)]);}catch(_0xb8d07d){throw mapMenuApiError(_0xb8d07d,_0x1b7715(0x189)+_0x5d8f64,_0x5c5ffc);}}export async function recheckMutationSnapshot(_0x1b8d90,_0x497db1,_0x50ecaa,_0x5c6cc0){const _0x18c8be=a169_0x395969;let _0x3f900d;try{_0x3f900d=await fetchMenuSnapshot(_0x1b8d90['appCode'],_0x1b8d90[_0x18c8be(0x1f3)]);}catch(_0x135d78){const _0x4b551e=mapMenuApiError(_0x135d78,_0x18c8be(0x1c9)+_0x50ecaa,_0x5c6cc0);throw menuFailure(_0x4b551e,_0x497db1,{'stage':_0x18c8be(0x1ab),'failed':_0x5c6cc0==null?{}:{'id':_0x5c6cc0}});}if(_0x3f900d[_0x18c8be(0x19d)]!==_0x497db1[_0x18c8be(0x1d7)]){const _0x284754=menuError(_0x18c8be(0x1e3),_0x18c8be(0x1ae)+_0x50ecaa+_0x18c8be(0x1c4),_0x18c8be(0x1ca));throw menuFailure(_0x284754,_0x497db1,{'stage':_0x18c8be(0x1ab),'failed':{..._0x5c6cc0==null?{}:{'id':_0x5c6cc0},'expectedSnapshotHash':_0x497db1[_0x18c8be(0x1d7)],'currentSnapshotHash':_0x3f900d[_0x18c8be(0x19d)]}});}return _0x3f900d;}export function parseParentId(_0xb6d708,_0x1e99c1,_0x8b2a31={}){const _0x2e4312=a169_0x395969;if(!hasFlag(_0xb6d708,_0x1e99c1)){if(_0x8b2a31['required'])throw CliErrors['flagMissing'](_0x1e99c1);return undefined;}const _0x2243f6=_0xb6d708[_0x2e4312(0x1ea)](_0x1e99c1)[_0x2e4312(0x1b4)]();if(_0x2243f6[_0x2e4312(0x1c7)]()==='root')return null;if(!/^\d+$/['test'](_0x2243f6))throw CliErrors['validation']('--'+_0x1e99c1+_0x2e4312(0x1bc));const _0x26a11e=Number(_0x2243f6);if(!Number[_0x2e4312(0x1f2)](_0x26a11e)||_0x26a11e<=0x0)throw CliErrors[_0x2e4312(0x1a6)]('--'+_0x1e99c1+_0x2e4312(0x1bc));return _0x26a11e;}export function requireMenu(_0x43d54b,_0x480709){const _0x5e639e=a169_0x395969,_0x1b05c0=_0x43d54b['byId'][_0x5e639e(0x1de)](_0x480709);if(!_0x1b05c0)throw menuError(_0x5e639e(0x1d2),_0x5e639e(0x1cb)+_0x480709,_0x5e639e(0x1d5));return _0x1b05c0;}export function requireFolder(_0x365235,_0x163ec1){const _0x5e1b5b=a169_0x395969,_0x787f6a=requireMenu(_0x365235,_0x163ec1);if(_0x787f6a[_0x5e1b5b(0x188)]!==_0x5e1b5b(0x1f5))throw menuError(_0x5e1b5b(0x1b0),_0x5e1b5b(0x1eb)+_0x163ec1+_0x5e1b5b(0x1dd)+(_0x787f6a[_0x5e1b5b(0x188)]||_0x5e1b5b(0x1a8))+_0x5e1b5b(0x1b7),'Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.');return _0x787f6a;}export function assertExpectedState(_0x24a857,_0xf2aa49){const _0x2c1778=a169_0x395969;if(hasFlag(_0x24a857,_0x2c1778(0x1ec))){const _0x3efee2=parseParentId(_0x24a857,_0x2c1778(0x1ec),{'required':!![]});if(_0xf2aa49[_0x2c1778(0x19e)]!==_0x3efee2)throw stateDrift('Menu\x20'+_0xf2aa49['id']+_0x2c1778(0x187)+formatParent(_0x3efee2)+_0x2c1778(0x1c1)+formatParent(_0xf2aa49[_0x2c1778(0x19e)])+'.');}if(hasFlag(_0x24a857,'expect-path')){const _0xf73add=_0x24a857['str'](_0x2c1778(0x1e7));if(_0xf2aa49[_0x2c1778(0x1a4)]!==_0xf73add)throw stateDrift(_0x2c1778(0x1eb)+_0xf2aa49['id']+_0x2c1778(0x1b2)+JSON[_0x2c1778(0x197)](_0xf73add)+',\x20current\x20'+JSON[_0x2c1778(0x197)](_0xf2aa49[_0x2c1778(0x1a4)])+'.');}if(hasFlag(_0x24a857,_0x2c1778(0x1ad))){const _0x4d10c8=_0x24a857['num'](_0x2c1778(0x1ad));if(!Number[_0x2c1778(0x1f2)](_0x4d10c8)||_0x4d10c8<0x0)throw CliErrors[_0x2c1778(0x1a6)](_0x2c1778(0x1e5));if(_0xf2aa49[_0x2c1778(0x1bd)]!==_0x4d10c8)throw stateDrift(_0x2c1778(0x1eb)+_0xf2aa49['id']+_0x2c1778(0x1bf)+_0x4d10c8+_0x2c1778(0x1c1)+_0xf2aa49[_0x2c1778(0x1bd)]+'.');}}export function assertVerified(_0x557067,_0x186054,_0x365537=a169_0x395969(0x1da)){const _0x246fb6=a169_0x395969;if(!_0x557067)throw menuError(_0x246fb6(0x1e2),_0x186054,_0x365537);}export function mutationResult(_0x34aae0){const _0x3306cb=a169_0x395969;return{'operation':_0x34aae0['operation'],'selector':_0x34aae0[_0x3306cb(0x1e4)],'before':_0x34aae0['before'],'after':_0x34aae0['after'],'dryRun':_0x34aae0[_0x3306cb(0x193)],'backend':_0x34aae0[_0x3306cb(0x1c5)],..._0x34aae0[_0x3306cb(0x191)]?{'plannedActions':_0x34aae0[_0x3306cb(0x191)]}:{},..._0x34aae0['targets']?{'targets':_0x34aae0['targets']}:{},..._0x34aae0[_0x3306cb(0x196)]?{'deleteOrder':_0x34aae0[_0x3306cb(0x196)]}:{},'snapshotHash':_0x34aae0[_0x3306cb(0x1d7)],..._0x34aae0[_0x3306cb(0x19f)]?{'cascade':_0x34aae0[_0x3306cb(0x19f)]}:{},..._0x34aae0['planFile']?{'planFile':_0x34aae0[_0x3306cb(0x18b)]}:{},'succeeded':_0x34aae0[_0x3306cb(0x1a7)]??[],'failed':_0x34aae0['failed']??[],'warnings':_0x34aae0[_0x3306cb(0x1ed)]??[],'verification':_0x34aae0[_0x3306cb(0x1c6)],'error':_0x34aae0[_0x3306cb(0x18d)]};}export function menuDryRunResult(_0x418b23,_0x1f5181){return{..._0x418b23,..._0x1f5181};}export function menuFailure(_0x291ac1,_0x44a578,_0x4c57d6){const _0x2ecb80=a169_0x395969,_0x447872=mutationResult({..._0x44a578,'after':_0x4c57d6['after']===undefined?_0x44a578[_0x2ecb80(0x1d9)]:_0x4c57d6[_0x2ecb80(0x1d9)],'backend':_0x4c57d6[_0x2ecb80(0x1c5)]??_0x44a578[_0x2ecb80(0x1c5)],'dryRun':![],'succeeded':_0x4c57d6['succeeded']??[],'failed':_0x4c57d6[_0x2ecb80(0x1e6)]??[{..._0x4c57d6['failed']??{},'stage':_0x4c57d6[_0x2ecb80(0x195)],'code':_0x291ac1['code'],'message':_0x291ac1[_0x2ecb80(0x1af)]}],'warnings':[..._0x44a578[_0x2ecb80(0x1ed)],..._0x4c57d6[_0x2ecb80(0x1ed)]??[]],'verification':_0x4c57d6[_0x2ecb80(0x1c6)],'error':{'code':_0x291ac1[_0x2ecb80(0x19a)],'message':_0x291ac1[_0x2ecb80(0x1af)],..._0x291ac1[_0x2ecb80(0x1df)]?{'hint':_0x291ac1[_0x2ecb80(0x1df)]}:{}}});return Object[_0x2ecb80(0x1f1)](_0x291ac1,_0x2ecb80(0x18c),{'value':_0x447872,'enumerable':!![],'configurable':!![]}),_0x291ac1;}export function asVerificationError(_0x5e0116,_0x1eded1){const _0x13d4bd=a169_0x395969;if(_0x5e0116 instanceof CliError&&_0x5e0116[_0x13d4bd(0x19a)]===_0x13d4bd(0x1e2))return _0x5e0116;const _0x958d0=_0x5e0116 instanceof Error?_0x5e0116[_0x13d4bd(0x1af)]:String(_0x5e0116);return menuError(_0x13d4bd(0x1e2),''+_0x1eded1+(_0x958d0?':\x20'+_0x958d0:''),_0x13d4bd(0x19b));}function a169_0x4356(){const _0x4fcf50=['Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','Reorder\x20sibling\x20menus\x20below\x20','snapshotHash','api_error','after','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','string','hasOwnProperty','\x20is\x20type\x20\x22','get','hint','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','2336996wqJVsx','menu_verification_failed','menu_state_drift','selector','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','failedRecords','expect-path','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','str','Menu\x20','expect-parent-id','warnings','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','max','defineProperty','isSafeInteger','cookie','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','folder','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','\x20parent\x20changed:\x20expected\x20','type','read\x20online\x20menu\x20facts\x20before\x20','19194GeTVcW','planFile','data','error','bool','menu_confirmation_required','Failed\x20to\x20','plannedActions','3RJABKF','dryRun','107444cliVsm','stage','deleteOrder','stringify','number','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','code','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','1206995ojMqsC','hash','parentId','cascade','prototype','length','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','root','path','map','validation','succeeded','unknown','yes','\x20menu\x20','pre-write-recheck','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','expected-children-count','Online\x20menu\x20state\x20changed\x20before\x20','message','menu_parent_not_folder','num','\x20path\x20changed:\x20expected\x20','test','trim','Permission\x20denied\x20while\x20attempting\x20to\x20','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','\x22,\x20not\x20folder.','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','call','3MTyvVC','menu_sort_overflow','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','childrenCount','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','\x20child\x20count\x20changed:\x20expected\x20','1505040CqrOOu',',\x20current\x20','540248QxqRlx','parent-id',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','backend','verification','toLowerCase','Exact\x20online\x20menu\x20id','recheck\x20online\x20menu\x20facts\x20before\x20','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','Online\x20menu\x20not\x20found:\x20','301xhRiNx','sort','rawFlags','menu_permission_denied','Cannot\x20append\x20a\x20','1784367qFVhLK','menu_not_found','Sibling\x20sort\x20value\x20(non-negative\x20integer)','menu_sort_invalid'];a169_0x4356=function(){return _0x4fcf50;};return a169_0x4356();}export function describeMenuErrorCause(_0x33ad9e,_0x46ca5f,_0x565457){const _0x857d9a=a169_0x395969,_0x836b7c=mapMenuApiError(_0x33ad9e,_0x46ca5f,_0x565457);return{'causeCode':_0x836b7c['code'],'causeMessage':_0x836b7c[_0x857d9a(0x1af)]};}export function hasFlag(_0x282717,_0x5a92ee){const _0x5d7e11=a169_0x395969;return Object[_0x5d7e11(0x1a0)][_0x5d7e11(0x1dc)][_0x5d7e11(0x1b9)](_0x282717['rawFlags'],_0x5a92ee)&&_0x282717[_0x5d7e11(0x1ce)][_0x5a92ee]!==undefined;}export function toApiParentId(_0x2869e6){return _0x2869e6??0x0;}export function formatParent(_0x152920){const _0x2c8c9a=a169_0x395969;return _0x152920==null?_0x2c8c9a(0x1a3):String(_0x152920);}export function menuError(_0x155e5c,_0x5a0705,_0x38e0c2){return new CliError(_0x155e5c,0x1,_0x5a0705,_0x38e0c2);}export function mapMenuApiError(_0xc7f012,_0x411052,_0x3dbbb5){const _0x5d3127=a169_0x395969;if(_0xc7f012 instanceof CliError&&_0xc7f012[_0x5d3127(0x19a)]!==_0x5d3127(0x1d8))return _0xc7f012;const _0xfea93a=_0xc7f012 instanceof Error?_0xc7f012['message']:String(_0xc7f012);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x5d3127(0x1b3)](_0xfea93a))return menuError(_0x5d3127(0x1cf),_0x5d3127(0x1b5)+_0x411052+(_0x3dbbb5?_0x5d3127(0x1aa)+_0x3dbbb5:'')+'.',_0x5d3127(0x1b6));return menuError('menu_mutation_failed',_0x5d3127(0x190)+_0x411052+(_0x3dbbb5?_0x5d3127(0x1aa)+_0x3dbbb5:'')+':\x20'+_0xfea93a,_0x5d3127(0x1ac));}export function isMenuResponseLoss(_0x27e796){const _0x6d3d29=a169_0x395969,_0x288308=_0x27e796 instanceof Error?_0x27e796[_0x6d3d29(0x1af)]:String(_0x27e796);if(_0x27e796 instanceof CliError)return _0x27e796[_0x6d3d29(0x19a)]==='api_error'&&/^Request (?:failed|timeout):/i[_0x6d3d29(0x1b3)](_0x288308);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x6d3d29(0x1b3)](_0x288308);}function stateDrift(_0x12a28b){const _0x33eb72=a169_0x395969;return menuError(_0x33eb72(0x1e3),_0x12a28b,_0x33eb72(0x186));}
@@ -1 +1 @@
1
- (function(_0x53d611,_0x5cd147){const _0x1d5e19=a170_0x19ad,_0x1693e0=_0x53d611();while(!![]){try{const _0x12a5a5=parseInt(_0x1d5e19(0x17f))/0x1*(-parseInt(_0x1d5e19(0x176))/0x2)+parseInt(_0x1d5e19(0x17b))/0x3+-parseInt(_0x1d5e19(0x178))/0x4+-parseInt(_0x1d5e19(0x17a))/0x5+-parseInt(_0x1d5e19(0x17d))/0x6+-parseInt(_0x1d5e19(0x17c))/0x7+-parseInt(_0x1d5e19(0x177))/0x8*(-parseInt(_0x1d5e19(0x17e))/0x9);if(_0x12a5a5===_0x5cd147)break;else _0x1693e0['push'](_0x1693e0['shift']());}catch(_0x79e205){_0x1693e0['push'](_0x1693e0['shift']());}}}(a170_0x428e,0x8f9b3));function a170_0x428e(){const _0x4fd8f9=['561843TZouQh','411QWvuFV','802hMWYrU','464oqFQLH','3080768ReKqpJ','replace','5502375GLuXQi','2038980wcuLKX','5441821HNKjjB','5396004XkOZPN'];a170_0x428e=function(){return _0x4fd8f9;};return a170_0x428e();}function a170_0x19ad(_0x5383db,_0x4ab118){_0x5383db=_0x5383db-0x176;const _0x428e09=a170_0x428e();let _0x19ad5a=_0x428e09[_0x5383db];return _0x19ad5a;}export function menuPathKey(_0x5e29c6){const _0x29178a=a170_0x19ad,_0x4029a3=_0x5e29c6['trim']();if(!_0x4029a3)return'';return _0x4029a3[_0x29178a(0x179)](/^\/+/,'')['replace'](/\/+$/,'')||'/';}
1
+ function a170_0x3482(_0xbbb58e,_0x32ef15){_0xbbb58e=_0xbbb58e-0xc1;const _0x306fd1=a170_0x306f();let _0x348266=_0x306fd1[_0xbbb58e];return _0x348266;}(function(_0x17dcf2,_0x1cae7e){const _0x4452e5=a170_0x3482,_0xa58000=_0x17dcf2();while(!![]){try{const _0x161200=parseInt(_0x4452e5(0xc5))/0x1*(-parseInt(_0x4452e5(0xc3))/0x2)+parseInt(_0x4452e5(0xc6))/0x3*(parseInt(_0x4452e5(0xcc))/0x4)+-parseInt(_0x4452e5(0xca))/0x5*(-parseInt(_0x4452e5(0xc8))/0x6)+-parseInt(_0x4452e5(0xc9))/0x7+-parseInt(_0x4452e5(0xc4))/0x8+-parseInt(_0x4452e5(0xcb))/0x9+parseInt(_0x4452e5(0xc7))/0xa;if(_0x161200===_0x1cae7e)break;else _0xa58000['push'](_0xa58000['shift']());}catch(_0x136979){_0xa58000['push'](_0xa58000['shift']());}}}(a170_0x306f,0xc1e51));function a170_0x306f(){const _0x3aa197=['trim','replace','2184328AHpvzu','10623056nmrlZQ','1MtYNSt','896724CiDhCy','42066500iBrRLA','24372tgUBwk','8571808UnRQms','55sMLrAX','11763801HBnEfZ','20BPwzDE'];a170_0x306f=function(){return _0x3aa197;};return a170_0x306f();}export function menuPathKey(_0x52831e){const _0x54f567=a170_0x3482,_0x5a15f2=_0x52831e[_0x54f567(0xc1)]();if(!_0x5a15f2)return'';return _0x5a15f2['replace'](/^\/+/,'')[_0x54f567(0xc2)](/\/+$/,'')||'/';}
@@ -1 +1 @@
1
- (function(_0x55170f,_0x5c6840){const _0x518646=a171_0x3923,_0xabceb=_0x55170f();while(!![]){try{const _0x293e8d=-parseInt(_0x518646(0xdd))/0x1+-parseInt(_0x518646(0xd7))/0x2+-parseInt(_0x518646(0xdb))/0x3*(-parseInt(_0x518646(0xf6))/0x4)+parseInt(_0x518646(0xef))/0x5*(-parseInt(_0x518646(0xe2))/0x6)+-parseInt(_0x518646(0xee))/0x7+parseInt(_0x518646(0xfe))/0x8*(-parseInt(_0x518646(0xfb))/0x9)+parseInt(_0x518646(0xf3))/0xa;if(_0x293e8d===_0x5c6840)break;else _0xabceb['push'](_0xabceb['shift']());}catch(_0x189a11){_0xabceb['push'](_0xabceb['shift']());}}}(a171_0x3bfb,0xc9804));import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a171_0x109a43,updateMenuRecord}from'../../../core/api-client.js';function a171_0x3bfb(){const _0x227245=['stringify','Fetched\x20','number','procode','path','Batch\x20menu\x20creation\x20completed,\x20total\x20','4533053NwLxxC','10aaZKme','menus','visible','create-menu','57148540wMkbVt','label','Delete\x20','1132PZtTMT','menuGroups','Update\x20menu\x20assets\x20\x22','\x20menu','info','19287UJaEvX','\x20menu\x20group(s)','loadScriptMode','5864XUFbRZ','Update\x20menu\x20','create-menus','import','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','parentId','resources','get-online-menu-list','length','587570DkdDES','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','\x20online\x20menus\x20successfully','all','6081EpjypE','extend','1594666uPOamT','update-menu-cdn-url','appName','map','boolean','4068894WPtWDW','Updating\x20menu\x20asset\x20links:\x20','total','order','Create\x20menu\x20\x22','Menu\x20created\x20successfully:\x20'];a171_0x3bfb=function(){return _0x227245;};return a171_0x3bfb();}function a171_0x3923(_0x4d81ac,_0x181dc5){_0x4d81ac=_0x4d81ac-0xd5;const _0x3bfb3a=a171_0x3bfb();let _0x3923bf=_0x3bfb3a[_0x4d81ac];return _0x3923bf;}export async function getOnlineMenuList(_0x28b7b5,_0x1ca5c7){const _0x2fbbb4=a171_0x3923,_0x2aee23=getEnv();logger['info'](_0x2fbbb4(0xd5),isProduction(_0x2aee23)?_0x2fbbb4(0x102)+_0x28b7b5+')':_0x2fbbb4(0xd8)+_0x28b7b5+')');const _0x3cc209=await fetchMenuSnapshot(_0x28b7b5,_0x1ca5c7,{'verbose':!![]});return logger[_0x2fbbb4(0xfa)](_0x2fbbb4(0xd5),_0x2fbbb4(0xe9)+_0x3cc209[_0x2fbbb4(0xe4)]+_0x2fbbb4(0xd9)),_0x3cc209[_0x2fbbb4(0xf0)]['map'](toProcessedMenuItem);}export async function createMenu(_0x4b210c,_0xb4d1af,_0x3d196b){const _0x565f1a=a171_0x3923;logger[_0x565f1a(0xfa)](_0x565f1a(0xf2),'Creating\x20menu:\x20'+_0x3d196b['label']+'\x20('+_0x3d196b['path']+')');const _0x451e30={'appCode':_0x4b210c,'type':_0x565f1a(0xeb),'sort':0x0,'extend':{'loadScriptMode':_0x565f1a(0x101),'resources':_0x3d196b[_0x565f1a(0x104)]?JSON['stringify'](_0x3d196b[_0x565f1a(0x104)]):undefined},..._0x3d196b},_0x40bf86=await createMenuRecord(_0x451e30,_0xb4d1af,_0x565f1a(0xe6)+_0x3d196b[_0x565f1a(0xf4)]+'\x22');return logger['info'](_0x565f1a(0xf2),_0x565f1a(0xe7)+_0x3d196b[_0x565f1a(0xf4)]),_0x40bf86;}async function createSingleMenu(_0x1f8a15,_0x17873b,_0x98ab0f,_0xa617ec,_0x1b9884){const _0x5638b2=a171_0x3923,_0x353998={'appCode':_0x1f8a15,'type':'procode','sort':_0x5638b2(0xe5)in _0x98ab0f&&typeof _0x98ab0f[_0x5638b2(0xe5)]==='number'?_0x98ab0f[_0x5638b2(0xe5)]:0x0,..._0x5638b2(0xf1)in _0x98ab0f&&typeof _0x98ab0f[_0x5638b2(0xf1)]===_0x5638b2(0xe1)?{'visible':_0x98ab0f[_0x5638b2(0xf1)]}:{},..._0x5638b2(0x103)in _0x98ab0f&&typeof _0x98ab0f[_0x5638b2(0x103)]===_0x5638b2(0xea)?{'parentId':_0x98ab0f['parentId']}:{},'extend':{..._0x1b9884?.[_0x5638b2(0xdf)]?{'appName':_0x1b9884[_0x5638b2(0xdf)]}:{},'loadScriptMode':_0x5638b2(0x101),'resources':_0xa617ec?JSON[_0x5638b2(0xe8)](_0xa617ec):undefined},'label':_0x98ab0f[_0x5638b2(0xf4)],'path':_0x98ab0f[_0x5638b2(0xec)]},_0x32fa8f=await createMenuRecord(_0x353998,_0x17873b,_0x5638b2(0xe6)+_0x98ab0f[_0x5638b2(0xf4)]+'\x22');return logger[_0x5638b2(0xfa)](_0x5638b2(0xf2),_0x5638b2(0xe7)+_0x98ab0f['label']),_0x32fa8f;}export async function createMenus(_0x1f3275,_0x3cfb30,_0x513ca5,_0xfe2ae7,_0x37e45f){const _0x40a478=a171_0x3923;logger[_0x40a478(0xfa)](_0x40a478(0x100),'Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x513ca5[_0x40a478(0xd6)]);const _0x3b878d=await Promise[_0x40a478(0xda)](_0x513ca5[_0x40a478(0xe0)](_0x110d02=>createSingleMenu(_0x1f3275,_0x3cfb30,_0x110d02,_0xfe2ae7,_0x37e45f)));return logger[_0x40a478(0xfa)](_0x40a478(0x100),_0x40a478(0xed)+_0x513ca5['length']),_0x3b878d;}export async function updateMenuCdnUrl(_0x11225b,_0x2e1f84,_0xe7d0da){const _0x40d95d=a171_0x3923;logger[_0x40d95d(0xfa)](_0x40d95d(0xde),_0x40d95d(0xe3)+_0xe7d0da[_0x40d95d(0xf4)]+'\x20('+_0xe7d0da[_0x40d95d(0xec)]+')');const _0xc56b65={'id':_0xe7d0da['id'],'appCode':_0x11225b,'extend':{..._0xe7d0da[_0x40d95d(0xdc)]??{},..._0xe7d0da['loadScriptMode']?{'loadScriptMode':_0xe7d0da[_0x40d95d(0xfd)]}:{},'resources':_0xe7d0da[_0x40d95d(0x104)]?JSON['stringify'](_0xe7d0da[_0x40d95d(0x104)]):undefined}},_0x30e1b2=await updateMenuRecord(_0xc56b65,_0x2e1f84,_0x40d95d(0xf8)+_0xe7d0da[_0x40d95d(0xf4)]+'\x22');return logger[_0x40d95d(0xfa)]('update-menu-cdn-url','Menu\x20assets\x20synced:\x20'+_0xe7d0da[_0x40d95d(0xf4)],undefined),_0x30e1b2;}export async function createMenuEntity(_0x1f1d97,_0x422e5f,_0x24883c){const _0x1f18c1=a171_0x3923;return createMenuRecord({'appCode':_0x1f1d97,..._0x24883c},_0x422e5f,_0x1f18c1(0xe6)+_0x24883c[_0x1f18c1(0xf4)]+'\x22');}export async function updateMenuEntity(_0x216771,_0x23abf1,_0x12d456){const _0xd8970d=a171_0x3923;return updateMenuRecord({'appCode':_0x216771,..._0x12d456},_0x23abf1,_0xd8970d(0xff)+_0x12d456['id']);}export async function batchDeleteMenuEntities(_0x302daa,_0x50b295){const _0x3a2144=a171_0x3923;return batchDeleteMenuRecords(_0x50b295,_0x302daa,_0x3a2144(0xf5)+_0x50b295[_0x3a2144(0xd6)]+_0x3a2144(0xf9)+(_0x50b295[_0x3a2144(0xd6)]===0x1?'':'s'));}export async function startMenuRegroup(_0x38a2dc,_0x8e47c){const _0x2b903e=a171_0x3923;return a171_0x109a43(_0x8e47c,_0x38a2dc,'Regroup\x20'+_0x8e47c[_0x2b903e(0xf7)]['length']+_0x2b903e(0xfc));}
1
+ (function(_0xc0030b,_0x34cb02){const _0x5aded9=a171_0x4d72,_0x4137ca=_0xc0030b();while(!![]){try{const _0xfac9a1=-parseInt(_0x5aded9(0x7f))/0x1+-parseInt(_0x5aded9(0x77))/0x2+-parseInt(_0x5aded9(0x80))/0x3*(parseInt(_0x5aded9(0x6a))/0x4)+-parseInt(_0x5aded9(0x71))/0x5+-parseInt(_0x5aded9(0x89))/0x6+parseInt(_0x5aded9(0x85))/0x7*(parseInt(_0x5aded9(0x75))/0x8)+parseInt(_0x5aded9(0x87))/0x9;if(_0xfac9a1===_0x34cb02)break;else _0x4137ca['push'](_0x4137ca['shift']());}catch(_0x48af74){_0x4137ca['push'](_0x4137ca['shift']());}}}(a171_0x5b01,0x699b8));import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a171_0x592217,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x7ff540,_0x251504){const _0x1dda46=a171_0x4d72,_0xeda938=getEnv();logger['info'](_0x1dda46(0x69),isProduction(_0xeda938)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x7ff540+')':_0x1dda46(0x70)+_0x7ff540+')');const _0xd2c78=await fetchMenuSnapshot(_0x7ff540,_0x251504,{'verbose':!![]});return logger[_0x1dda46(0x6c)](_0x1dda46(0x69),_0x1dda46(0x8b)+_0xd2c78['total']+_0x1dda46(0x76)),_0xd2c78[_0x1dda46(0x7a)][_0x1dda46(0x90)](toProcessedMenuItem);}export async function createMenu(_0x4178fb,_0x1c6b15,_0x46222f){const _0x50503d=a171_0x4d72;logger['info'](_0x50503d(0x88),'Creating\x20menu:\x20'+_0x46222f[_0x50503d(0x8c)]+'\x20('+_0x46222f['path']+')');const _0x457a65={'appCode':_0x4178fb,'type':_0x50503d(0x68),'sort':0x0,'extend':{'loadScriptMode':_0x50503d(0x81),'resources':_0x46222f[_0x50503d(0x73)]?JSON['stringify'](_0x46222f[_0x50503d(0x73)]):undefined},..._0x46222f},_0x414902=await createMenuRecord(_0x457a65,_0x1c6b15,'Create\x20menu\x20\x22'+_0x46222f['label']+'\x22');return logger[_0x50503d(0x6c)](_0x50503d(0x88),_0x50503d(0x72)+_0x46222f[_0x50503d(0x8c)]),_0x414902;}async function createSingleMenu(_0x1fad43,_0x7b87db,_0x23ab33,_0x15b9b5,_0x12c611){const _0x39db43=a171_0x4d72,_0x513d35={'appCode':_0x1fad43,'type':_0x39db43(0x68),'sort':_0x39db43(0x8e)in _0x23ab33&&typeof _0x23ab33[_0x39db43(0x8e)]===_0x39db43(0x84)?_0x23ab33[_0x39db43(0x8e)]:0x0,..._0x39db43(0x6d)in _0x23ab33&&typeof _0x23ab33[_0x39db43(0x6d)]===_0x39db43(0x6f)?{'visible':_0x23ab33[_0x39db43(0x6d)]}:{},...'parentId'in _0x23ab33&&typeof _0x23ab33[_0x39db43(0x6e)]===_0x39db43(0x84)?{'parentId':_0x23ab33[_0x39db43(0x6e)]}:{},'extend':{..._0x12c611?.[_0x39db43(0x83)]?{'appName':_0x12c611['appName']}:{},'loadScriptMode':_0x39db43(0x81),'resources':_0x15b9b5?JSON[_0x39db43(0x8d)](_0x15b9b5):undefined},'label':_0x23ab33[_0x39db43(0x8c)],'path':_0x23ab33['path']},_0x3fa7c0=await createMenuRecord(_0x513d35,_0x7b87db,_0x39db43(0x7d)+_0x23ab33[_0x39db43(0x8c)]+'\x22');return logger[_0x39db43(0x6c)](_0x39db43(0x88),_0x39db43(0x72)+_0x23ab33['label']),_0x3fa7c0;}export async function createMenus(_0x51266b,_0x444c70,_0x3555b2,_0x21510b,_0x4e09fd){const _0x4c0801=a171_0x4d72;logger['info']('create-menus',_0x4c0801(0x8a)+_0x3555b2[_0x4c0801(0x82)]);const _0x1eb1f1=await Promise['all'](_0x3555b2['map'](_0x5a4ba7=>createSingleMenu(_0x51266b,_0x444c70,_0x5a4ba7,_0x21510b,_0x4e09fd)));return logger[_0x4c0801(0x6c)]('create-menus',_0x4c0801(0x78)+_0x3555b2[_0x4c0801(0x82)]),_0x1eb1f1;}export async function updateMenuCdnUrl(_0x5c7d68,_0x3a0712,_0x2e5dab){const _0x5a5826=a171_0x4d72;logger['info'](_0x5a5826(0x6b),_0x5a5826(0x7b)+_0x2e5dab['label']+'\x20('+_0x2e5dab['path']+')');const _0x5ec8ec={'id':_0x2e5dab['id'],'appCode':_0x5c7d68,'extend':{..._0x2e5dab['extend']??{},..._0x2e5dab[_0x5a5826(0x7c)]?{'loadScriptMode':_0x2e5dab[_0x5a5826(0x7c)]}:{},'resources':_0x2e5dab['resources']?JSON[_0x5a5826(0x8d)](_0x2e5dab[_0x5a5826(0x73)]):undefined}},_0x17e68b=await updateMenuRecord(_0x5ec8ec,_0x3a0712,_0x5a5826(0x7e)+_0x2e5dab['label']+'\x22');return logger[_0x5a5826(0x6c)](_0x5a5826(0x6b),'Menu\x20assets\x20synced:\x20'+_0x2e5dab[_0x5a5826(0x8c)],undefined),_0x17e68b;}export async function createMenuEntity(_0x205054,_0x21ac4e,_0xb1c25f){return createMenuRecord({'appCode':_0x205054,..._0xb1c25f},_0x21ac4e,'Create\x20menu\x20\x22'+_0xb1c25f['label']+'\x22');}function a171_0x4d72(_0x41dd9d,_0x4a4df6){_0x41dd9d=_0x41dd9d-0x68;const _0x5b01da=a171_0x5b01();let _0x4d72b6=_0x5b01da[_0x41dd9d];return _0x4d72b6;}export async function updateMenuEntity(_0x2adff6,_0x3ad60b,_0x5740a2){const _0x564c73=a171_0x4d72;return updateMenuRecord({'appCode':_0x2adff6,..._0x5740a2},_0x3ad60b,_0x564c73(0x8f)+_0x5740a2['id']);}export async function batchDeleteMenuEntities(_0x2faa2a,_0x4921f5){const _0x569e29=a171_0x4d72;return batchDeleteMenuRecords(_0x4921f5,_0x2faa2a,_0x569e29(0x86)+_0x4921f5['length']+'\x20menu'+(_0x4921f5['length']===0x1?'':'s'));}export async function startMenuRegroup(_0x55756c,_0x4cd5ea){const _0x2af7c1=a171_0x4d72;return a171_0x592217(_0x4cd5ea,_0x55756c,_0x2af7c1(0x79)+_0x4cd5ea['menuGroups'][_0x2af7c1(0x82)]+_0x2af7c1(0x74));}function a171_0x5b01(){const _0x282716=['visible','parentId','boolean','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','836210BqswjQ','Menu\x20created\x20successfully:\x20','resources','\x20menu\x20group(s)','705384irxSbu','\x20online\x20menus\x20successfully','1142434qEUKtr','Batch\x20menu\x20creation\x20completed,\x20total\x20','Regroup\x20','menus','Updating\x20menu\x20asset\x20links:\x20','loadScriptMode','Create\x20menu\x20\x22','Update\x20menu\x20assets\x20\x22','835524aUXDub','564348VueeLM','import','length','appName','number','14HZtdWq','Delete\x20','26155728DKGBpj','create-menu','4198530FLPzWH','Start\x20batch\x20menu\x20creation,\x20total\x20','Fetched\x20','label','stringify','order','Update\x20menu\x20','map','procode','get-online-menu-list','8XNvSjK','update-menu-cdn-url','info'];a171_0x5b01=function(){return _0x282716;};return a171_0x5b01();}
@@ -1 +1 @@
1
- const a172_0x3ca490=a172_0x3e83;(function(_0x204b15,_0xdee488){const _0x5a1416=a172_0x3e83,_0x25ccf5=_0x204b15();while(!![]){try{const _0x1920ea=parseInt(_0x5a1416(0x16c))/0x1+-parseInt(_0x5a1416(0x14f))/0x2+-parseInt(_0x5a1416(0x15f))/0x3*(parseInt(_0x5a1416(0x153))/0x4)+parseInt(_0x5a1416(0x15e))/0x5*(parseInt(_0x5a1416(0x16d))/0x6)+parseInt(_0x5a1416(0x15a))/0x7+parseInt(_0x5a1416(0x176))/0x8+parseInt(_0x5a1416(0x16b))/0x9;if(_0x1920ea===_0xdee488)break;else _0x25ccf5['push'](_0x25ccf5['shift']());}catch(_0x3b3514){_0x25ccf5['push'](_0x25ccf5['shift']());}}}(a172_0x2c4b,0x95157));import{getSmartAppRecord}from'../../../core/api-client.js';import{APPCODE_FLAG}from'../../../commands/common/flags.js';function a172_0x2c4b(){const _0x2c9b3e=['appName','\x20must\x20be\x20a\x20JSON\x20object.','trim','filter','app.extend.assets\x20must\x20be\x20an\x20array.','map','1645238ssrVmC','string','app','menu\x20','59510jmMpsD','3UcJwRv','validation','menu','\x20contains\x20invalid\x20JSON.','sharedConfigured','resources','app-name','Menu\x20host\x20app\x20code;\x20overrides\x20the\x20selected\x20workspace\x20app','sharedResources','\x20resources','basename','assets','2681973NuawYK','656591eEYoFf','6MWmnaB','app.extend','--app-name\x20is\x20required.','appCode','Duplicate\x20subapp\x20records\x20for\x20','\x20must\x20be\x20a\x20JSON\x20string\x20of\x20URLs.','extend','Explicit\x20frontend\x20subapp\x20appName\x20matching\x20host\x20assets\x20and\x20menu\x20bindings;\x20not\x20inferred\x20from\x20package\x20name\x20or\x20app\x20code','length','7091424mjATOc','object','app.extend.assets[','message','stringify','814932oYjqFW','subapp.resources','path','isArray','4279356PkMeDQ'];a172_0x2c4b=function(){return _0x2c9b3e;};return a172_0x2c4b();}import{CliErrors}from'../../../errors.js';function objectValue(_0x2f02a0,_0x2dc56a){const _0x5a1129=a172_0x3e83,_0x5f261f=typeof _0x2f02a0===_0x5a1129(0x15b)?parseJson(_0x2f02a0,_0x2dc56a):_0x2f02a0;if(!_0x5f261f||typeof _0x5f261f!==_0x5a1129(0x177)||Array['isArray'](_0x5f261f))throw CliErrors[_0x5a1129(0x160)](_0x2dc56a+_0x5a1129(0x155));return _0x5f261f;}function parseJson(_0x24d3e8,_0x1f29a0){const _0x369878=a172_0x3e83;try{return JSON['parse'](_0x24d3e8);}catch{throw CliErrors[_0x369878(0x160)](_0x1f29a0+_0x369878(0x162));}}function a172_0x3e83(_0x3a7ab5,_0x434e98){_0x3a7ab5=_0x3a7ab5-0x14c;const _0x2c4bad=a172_0x2c4b();let _0x3e8369=_0x2c4bad[_0x3a7ab5];return _0x3e8369;}function resourceList(_0x2175d2,_0x3c6f66){const _0x349826=a172_0x3e83;if(typeof _0x2175d2!=='string')throw CliErrors[_0x349826(0x160)](_0x3c6f66+_0x349826(0x172));const _0x4f291d=parseJson(_0x2175d2,_0x3c6f66);if(!Array['isArray'](_0x4f291d)||_0x4f291d['some'](_0x361c94=>typeof _0x361c94!==_0x349826(0x15b)))throw CliErrors[_0x349826(0x160)](_0x3c6f66+'\x20must\x20be\x20an\x20array\x20of\x20URLs.');return _0x4f291d;}export function buildSubappAssetsStatus(_0xc32bd7,_0x55203a,_0x4371d4){const _0x35898b=a172_0x3e83,_0x189c1c=_0xc32bd7[_0x35898b(0x173)]==null?{}:objectValue(_0xc32bd7[_0x35898b(0x173)],_0x35898b(0x16e)),_0x18abb9=_0x189c1c['assets']==null?[]:typeof _0x189c1c['assets']===_0x35898b(0x15b)?parseJson(_0x189c1c[_0x35898b(0x16a)],'app.extend.assets'):_0x189c1c[_0x35898b(0x16a)];if(!Array[_0x35898b(0x152)](_0x18abb9))throw CliErrors[_0x35898b(0x160)](_0x35898b(0x158));const _0x486e3d=_0x18abb9[_0x35898b(0x159)]((_0x1d19de,_0x3ab9f7)=>objectValue(_0x1d19de,_0x35898b(0x14c)+_0x3ab9f7+']')),_0x3183c0=_0x486e3d[_0x35898b(0x157)](_0x500bfa=>_0x500bfa[_0x35898b(0x154)]===_0x4371d4);if(_0x3183c0[_0x35898b(0x175)]>0x1)throw CliErrors[_0x35898b(0x160)](_0x35898b(0x171)+_0x4371d4+'.');const _0x3a11fc=_0x3183c0[0x0],_0x372d6b=_0x3a11fc?.[_0x35898b(0x164)]==null?[]:resourceList(_0x3a11fc['resources'],_0x35898b(0x150)),_0x3f6eab=_0x55203a[_0x35898b(0x157)](_0x31f64b=>_0x31f64b[_0x35898b(0x173)]?.[_0x35898b(0x154)]===_0x4371d4),_0x4435ee=_0x3f6eab[_0x35898b(0x159)](_0x313081=>{const _0x35fd3a=_0x35898b;let _0x2a35dc=null,_0xd2f8ac=null;try{_0x2a35dc=_0x313081[_0x35fd3a(0x173)]?.[_0x35fd3a(0x164)]==null?_0x313081['resources']:resourceList(_0x313081['extend'][_0x35fd3a(0x164)],_0x35fd3a(0x15d)+_0x313081['id']+_0x35fd3a(0x168));}catch(_0x42627e){_0xd2f8ac=_0x42627e instanceof Error?_0x42627e[_0x35fd3a(0x14d)]:String(_0x42627e);}const _0x39f724=_0x372d6b[_0x35fd3a(0x175)]>0x0?_0x35fd3a(0x15c):_0x35fd3a(0x161),_0x573473=_0x39f724==='app'?_0x372d6b:_0x2a35dc;return{'id':_0x313081['id'],'path':_0x313081[_0x35fd3a(0x151)],'preferredSourceIfSupported':_0x39f724,'preferredResourcesIfSupported':_0x573473,'menuFallbackResources':_0x2a35dc,'menuFallbackError':_0xd2f8ac,'fallbackDiffers':_0x2a35dc===null?null:_0x39f724===_0x35fd3a(0x15c)&&_0x2a35dc[_0x35fd3a(0x175)]>0x0&&JSON[_0x35fd3a(0x14e)](_0x2a35dc)!==JSON[_0x35fd3a(0x14e)](_0x573473)};});return{'appName':_0x4371d4,'hostCapabilityVerified':![],'sharedConfigured':Boolean(_0x3a11fc),'sharedResources':_0x372d6b,'loadScriptMode':_0x3a11fc?.['loadScriptMode']??null,'basename':_0x3a11fc?.[_0x35898b(0x169)]??null,'boundMenus':_0x4435ee[_0x35898b(0x175)],'staleMenuFallbacks':_0x4435ee['filter'](_0x37dfc8=>_0x37dfc8['fallbackDiffers'])[_0x35898b(0x175)],'menus':_0x4435ee};}export async function assertSharedResourcesConfigured(_0x193ecb,_0x1b9100,_0x7557b7){const _0x3c7a69=a172_0x3e83,_0x5624d1=await getSmartAppRecord(_0x193ecb,_0x1b9100),_0x1a9e9f=buildSubappAssetsStatus(_0x5624d1,[],_0x7557b7);if(!_0x1a9e9f[_0x3c7a69(0x163)]||_0x1a9e9f[_0x3c7a69(0x167)][_0x3c7a69(0x175)]===0x0)throw CliErrors[_0x3c7a69(0x160)]('No\x20shared\x20resources\x20configured\x20for\x20'+_0x7557b7+'.');}export const SUBAPP_ASSET_SELECTOR_FLAGS=[{...APPCODE_FLAG,'required':![],'description':a172_0x3ca490(0x166)},{'name':'app-name','type':a172_0x3ca490(0x15b),'required':!![],'description':a172_0x3ca490(0x174)}];export function getSubappSelector(_0x16a2c2){const _0x28bd26=a172_0x3ca490,_0x10c8de=_0x16a2c2[_0x28bd26(0x170)],_0x49955e=_0x16a2c2['str'](_0x28bd26(0x165))[_0x28bd26(0x156)]();if(!_0x49955e)throw CliErrors[_0x28bd26(0x160)](_0x28bd26(0x16f));return{'appCode':_0x10c8de,'appName':_0x49955e};}
1
+ const a172_0x58259e=a172_0x3212;(function(_0x63bef,_0x349252){const _0x4af907=a172_0x3212,_0x3cfe80=_0x63bef();while(!![]){try{const _0x385b18=parseInt(_0x4af907(0x13d))/0x1*(-parseInt(_0x4af907(0x13f))/0x2)+-parseInt(_0x4af907(0x13a))/0x3*(-parseInt(_0x4af907(0x137))/0x4)+parseInt(_0x4af907(0x121))/0x5*(-parseInt(_0x4af907(0x114))/0x6)+parseInt(_0x4af907(0x123))/0x7+parseInt(_0x4af907(0x127))/0x8+parseInt(_0x4af907(0x120))/0x9*(parseInt(_0x4af907(0x116))/0xa)+-parseInt(_0x4af907(0x12a))/0xb;if(_0x385b18===_0x349252)break;else _0x3cfe80['push'](_0x3cfe80['shift']());}catch(_0x420cbb){_0x3cfe80['push'](_0x3cfe80['shift']());}}}(a172_0x42b4,0xe2252));import{getSmartAppRecord}from'../../../core/api-client.js';function a172_0x42b4(){const _0x40b8f1=['\x20contains\x20invalid\x20JSON.','length','message','basename','isArray','\x20must\x20be\x20an\x20array\x20of\x20URLs.','11365569xBEHTk','10NiPMLr','resources','4622548rLTdSs','app.extend.assets[','string','trim','11790144zbmebd','filter','appName','10228889wokgBu','appCode','app','parse','object','loadScriptMode','validation','Menu\x20host\x20app\x20code;\x20overrides\x20the\x20selected\x20workspace\x20app','No\x20shared\x20resources\x20configured\x20for\x20','sharedResources','sharedConfigured','Explicit\x20frontend\x20subapp\x20appName\x20matching\x20host\x20assets\x20and\x20menu\x20bindings;\x20not\x20inferred\x20from\x20package\x20name\x20or\x20app\x20code','str','387052BdMkyN','menu\x20','some','15PwJwNV','--app-name\x20is\x20required.','assets','15389gqBwUb','menu','218WHIkZt','path','extend','app.extend.assets','\x20resources','1041594ETOpjP','fallbackDiffers','10LIvdjf','stringify','map','\x20must\x20be\x20a\x20JSON\x20object.'];a172_0x42b4=function(){return _0x40b8f1;};return a172_0x42b4();}import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{CliErrors}from'../../../errors.js';function objectValue(_0x207470,_0x5c7b88){const _0x15b15e=a172_0x3212,_0x163b95=typeof _0x207470===_0x15b15e(0x125)?parseJson(_0x207470,_0x5c7b88):_0x207470;if(!_0x163b95||typeof _0x163b95!==_0x15b15e(0x12e)||Array[_0x15b15e(0x11e)](_0x163b95))throw CliErrors[_0x15b15e(0x130)](_0x5c7b88+_0x15b15e(0x119));return _0x163b95;}function a172_0x3212(_0x52d201,_0x45ac0c){_0x52d201=_0x52d201-0x112;const _0x42b4ac=a172_0x42b4();let _0x3212c0=_0x42b4ac[_0x52d201];return _0x3212c0;}function parseJson(_0x40084b,_0x54517c){const _0xebbc74=a172_0x3212;try{return JSON[_0xebbc74(0x12d)](_0x40084b);}catch{throw CliErrors[_0xebbc74(0x130)](_0x54517c+_0xebbc74(0x11a));}}function resourceList(_0x16dc20,_0x4279b8){const _0x283674=a172_0x3212;if(typeof _0x16dc20!==_0x283674(0x125))throw CliErrors[_0x283674(0x130)](_0x4279b8+'\x20must\x20be\x20a\x20JSON\x20string\x20of\x20URLs.');const _0x18d496=parseJson(_0x16dc20,_0x4279b8);if(!Array[_0x283674(0x11e)](_0x18d496)||_0x18d496[_0x283674(0x139)](_0x4b9ec8=>typeof _0x4b9ec8!==_0x283674(0x125)))throw CliErrors[_0x283674(0x130)](_0x4279b8+_0x283674(0x11f));return _0x18d496;}export function buildSubappAssetsStatus(_0x43bed0,_0x1305ff,_0xfd0f34){const _0x5cf808=a172_0x3212,_0x51850d=_0x43bed0['extend']==null?{}:objectValue(_0x43bed0[_0x5cf808(0x141)],'app.extend'),_0x502efc=_0x51850d[_0x5cf808(0x13c)]==null?[]:typeof _0x51850d[_0x5cf808(0x13c)]==='string'?parseJson(_0x51850d[_0x5cf808(0x13c)],_0x5cf808(0x112)):_0x51850d['assets'];if(!Array[_0x5cf808(0x11e)](_0x502efc))throw CliErrors[_0x5cf808(0x130)]('app.extend.assets\x20must\x20be\x20an\x20array.');const _0x15b2c8=_0x502efc[_0x5cf808(0x118)]((_0x391f2d,_0x4253de)=>objectValue(_0x391f2d,_0x5cf808(0x124)+_0x4253de+']')),_0x33f6c9=_0x15b2c8[_0x5cf808(0x128)](_0x5f44ca=>_0x5f44ca[_0x5cf808(0x129)]===_0xfd0f34);if(_0x33f6c9['length']>0x1)throw CliErrors['validation']('Duplicate\x20subapp\x20records\x20for\x20'+_0xfd0f34+'.');const _0x24268e=_0x33f6c9[0x0],_0x108efc=_0x24268e?.['resources']==null?[]:resourceList(_0x24268e['resources'],'subapp.resources'),_0x4605bb=_0x1305ff[_0x5cf808(0x128)](_0x1881b4=>_0x1881b4[_0x5cf808(0x141)]?.['appName']===_0xfd0f34),_0x298fc7=_0x4605bb[_0x5cf808(0x118)](_0x5c6816=>{const _0x22e51b=_0x5cf808;let _0x1b3a31=null,_0x1a9584=null;try{_0x1b3a31=_0x5c6816[_0x22e51b(0x141)]?.['resources']==null?_0x5c6816[_0x22e51b(0x122)]:resourceList(_0x5c6816[_0x22e51b(0x141)]['resources'],_0x22e51b(0x138)+_0x5c6816['id']+_0x22e51b(0x113));}catch(_0x25367e){_0x1a9584=_0x25367e instanceof Error?_0x25367e[_0x22e51b(0x11c)]:String(_0x25367e);}const _0x23de36=_0x108efc[_0x22e51b(0x11b)]>0x0?_0x22e51b(0x12c):_0x22e51b(0x13e),_0x2f5a3f=_0x23de36===_0x22e51b(0x12c)?_0x108efc:_0x1b3a31;return{'id':_0x5c6816['id'],'path':_0x5c6816[_0x22e51b(0x140)],'preferredSourceIfSupported':_0x23de36,'preferredResourcesIfSupported':_0x2f5a3f,'menuFallbackResources':_0x1b3a31,'menuFallbackError':_0x1a9584,'fallbackDiffers':_0x1b3a31===null?null:_0x23de36===_0x22e51b(0x12c)&&_0x1b3a31[_0x22e51b(0x11b)]>0x0&&JSON[_0x22e51b(0x117)](_0x1b3a31)!==JSON[_0x22e51b(0x117)](_0x2f5a3f)};});return{'appName':_0xfd0f34,'hostCapabilityVerified':![],'sharedConfigured':Boolean(_0x24268e),'sharedResources':_0x108efc,'loadScriptMode':_0x24268e?.[_0x5cf808(0x12f)]??null,'basename':_0x24268e?.[_0x5cf808(0x11d)]??null,'boundMenus':_0x298fc7['length'],'staleMenuFallbacks':_0x298fc7[_0x5cf808(0x128)](_0x49fbe7=>_0x49fbe7[_0x5cf808(0x115)])['length'],'menus':_0x298fc7};}export async function assertSharedResourcesConfigured(_0x20d9e7,_0x234354,_0x2f9cae){const _0x35c276=a172_0x3212,_0x127f3a=await getSmartAppRecord(_0x20d9e7,_0x234354),_0x3aa471=buildSubappAssetsStatus(_0x127f3a,[],_0x2f9cae);if(!_0x3aa471[_0x35c276(0x134)]||_0x3aa471[_0x35c276(0x133)][_0x35c276(0x11b)]===0x0)throw CliErrors[_0x35c276(0x130)](_0x35c276(0x132)+_0x2f9cae+'.');}export const SUBAPP_ASSET_SELECTOR_FLAGS=[{...APPCODE_FLAG,'required':![],'description':a172_0x58259e(0x131)},{'name':'app-name','type':'string','required':!![],'description':a172_0x58259e(0x135)}];export function getSubappSelector(_0x187dbc){const _0x2a08c3=a172_0x58259e,_0x40c26f=_0x187dbc[_0x2a08c3(0x12b)],_0x478084=_0x187dbc[_0x2a08c3(0x136)]('app-name')[_0x2a08c3(0x126)]();if(!_0x478084)throw CliErrors[_0x2a08c3(0x130)](_0x2a08c3(0x13b));return{'appCode':_0x40c26f,'appName':_0x478084};}
@@ -1 +1 @@
1
- const a173_0x58f940=a173_0x9770;(function(_0x45a2e1,_0x2da662){const _0x2f21a1=a173_0x9770,_0x425de4=_0x45a2e1();while(!![]){try{const _0x44cf2b=-parseInt(_0x2f21a1(0x9e))/0x1+parseInt(_0x2f21a1(0x99))/0x2+parseInt(_0x2f21a1(0xa9))/0x3*(parseInt(_0x2f21a1(0xb9))/0x4)+-parseInt(_0x2f21a1(0xbf))/0x5*(-parseInt(_0x2f21a1(0xc1))/0x6)+-parseInt(_0x2f21a1(0x96))/0x7+parseInt(_0x2f21a1(0x91))/0x8*(-parseInt(_0x2f21a1(0xab))/0x9)+parseInt(_0x2f21a1(0x98))/0xa;if(_0x44cf2b===_0x2da662)break;else _0x425de4['push'](_0x425de4['shift']());}catch(_0x4db163){_0x425de4['push'](_0x425de4['shift']());}}}(a173_0x590f,0x91ae8));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';function a173_0x590f(){const _0x123d76=['Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','visible','cssUrl','5goJdin','\x0a\x20\x20Available\x20local\x20paths:\x20','5478chEwTB','isArray','get','jsUrl','filter','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','No\x20local\x20pages\x20matched\x20paths:\x20','Menu\x20sync\x20completed','order','folder','push','menu-sync','8lquvhg','Expected\x20one\x20folder\x20named\x20\x22','\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.','type','message','1010933erZFbU','--params.','18426520oEJGWA','328036wMlRST','field','number','join','Invalid\x20--params:\x20','993172LdsWBQ','length','boolean','Start\x20non-interactive\x20menu\x20sync','cwd','dryRun','setLogPath','import','trim','label','string','538527SlJqNs','object','7306263pWymgW','appName',';\x20found\x20','path','info','Invalid\x20--params.','Invalid\x20--params\x20JSON.','map','group','parse','Parent\x20','has','\x22\x20for\x20','procode','12lUXWNJ','parentId','hasOwn'];a173_0x590f=function(){return _0x123d76;};return a173_0x590f();}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{menuPathKey}from'../../../commands/menu/shared/path.js';import{logger}from'../../../utils/logger.js';import{assertSharedResourcesConfigured}from'../../../commands/menu/shared/subapp-assets.js';function a173_0x9770(_0x3c227c,_0x55a491){_0x3c227c=_0x3c227c-0x8c;const _0x590fb3=a173_0x590f();let _0x9770a6=_0x590fb3[_0x3c227c];return _0x9770a6;}const MENU_SYNC_PARAM_KEYS=new Set([a173_0x58f940(0xc4),a173_0x58f940(0xbe),a173_0x58f940(0xac),'visible','parentId']);export function resolvePage(_0x3c9da5,_0x55936d,_0x272c7e){const _0x41ef89=a173_0x58f940;let _0x1fe1d0=_0x55936d[_0x41ef89(0xba)]??_0x3c9da5[_0x41ef89(0xba)];if(_0x1fe1d0===undefined&&_0x3c9da5[_0x41ef89(0xb3)]){const _0x1d1ba9=_0x272c7e['filter'](_0x5aeca4=>_0x5aeca4[_0x41ef89(0x94)]===_0x41ef89(0x8e)&&_0x5aeca4[_0x41ef89(0xa7)]===_0x3c9da5[_0x41ef89(0xb3)]);if(_0x1d1ba9[_0x41ef89(0x9f)]!==0x1)throw new Error(_0x41ef89(0x92)+_0x3c9da5[_0x41ef89(0xb3)]+_0x41ef89(0xb7)+_0x3c9da5['path']+_0x41ef89(0xad)+_0x1d1ba9[_0x41ef89(0x9f)]);_0x1fe1d0=_0x1d1ba9[0x0]['id'];}if(_0x1fe1d0!==undefined&&_0x1fe1d0!==0x0&&_0x272c7e[_0x41ef89(0xc5)](_0x44464c=>_0x44464c['id']===_0x1fe1d0&&_0x44464c[_0x41ef89(0x94)]===_0x41ef89(0x8e))[_0x41ef89(0x9f)]!==0x1)throw new Error(_0x41ef89(0xb5)+_0x1fe1d0+_0x41ef89(0x93));return{..._0x3c9da5,..._0x1fe1d0===undefined?{}:{'parentId':_0x1fe1d0},..._0x55936d[_0x41ef89(0xbd)]===undefined?{}:{'visible':_0x55936d['visible']}};}function validateParams(_0x34000e){const _0x4623bd=a173_0x58f940,_0x25b41c=[];return _0x34000e[_0x4623bd(0xc4)]&&!isValidJsHttpsUrl(_0x34000e[_0x4623bd(0xc4)])&&_0x25b41c[_0x4623bd(0x8f)]({'field':'jsUrl','message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x34000e[_0x4623bd(0xbe)]&&!isValidCssHttpsUrl(_0x34000e['cssUrl'])&&_0x25b41c[_0x4623bd(0x8f)]({'field':_0x4623bd(0xbe),'message':_0x4623bd(0xc6)}),_0x25b41c;}export async function runMenuSyncCore(_0x1f012f,_0x1b7ff3,_0x112c68=[],_0x153898,_0x26463f={}){const _0x566f65=a173_0x58f940,_0x7dea0e=parseMenuSyncParams(_0x153898),_0x3b75b0=[...new Set(_0x112c68[_0x566f65(0xb2)](_0x255ece=>_0x255ece['trim']())[_0x566f65(0xc5)](Boolean)[_0x566f65(0xb2)](menuPathKey))],_0x5bbda2=_0x7dea0e['jsUrl'],_0x2f5d20=_0x7dea0e['cssUrl'],_0x141c75=[];if(_0x5bbda2)_0x141c75['push'](_0x5bbda2);if(_0x2f5d20)_0x141c75['push'](_0x2f5d20);const _0x1c3950=validateParams(_0x7dea0e);if(_0x1c3950[_0x566f65(0x9f)]>0x0){const _0x183db9=_0x1c3950[_0x566f65(0xb2)](_0x3041bf=>_0x566f65(0x97)+_0x3041bf[_0x566f65(0x9a)]+':\x20'+_0x3041bf[_0x566f65(0x95)])[_0x566f65(0x9c)](';\x20');throw new Error(_0x566f65(0x9d)+_0x183db9);}logger[_0x566f65(0xa4)](process[_0x566f65(0xa2)]()),logger['info']('menu-sync',_0x566f65(0xa1),{'appCode':_0x1f012f,'selectedCount':_0x3b75b0[_0x566f65(0x9f)],'jsUrl':_0x5bbda2,'cssUrl':_0x2f5d20});if(_0x5bbda2){const _0x39cd04=await isUrlReachable(_0x5bbda2);if(!_0x39cd04)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x5bbda2);}if(_0x2f5d20){const _0x4fd237=await isUrlReachable(_0x2f5d20);if(!_0x4fd237)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x2f5d20);}const _0x54d9aa=getLocalPages();if(_0x54d9aa['length']===0x0){if(_0x3b75b0[_0x566f65(0x9f)]>0x0)throw new Error(_0x566f65(0xc7)+_0x3b75b0['join'](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x26463f[_0x566f65(0xa3)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x319442=await getOnlineMenuList(_0x1f012f,_0x1b7ff3),_0x240206=new Set(_0x319442[_0x566f65(0xb2)](_0x210425=>menuPathKey(_0x210425[_0x566f65(0xae)])));let _0x2cf348;if(_0x3b75b0[_0x566f65(0x9f)]>0x0){const _0x590c38=new Map(_0x54d9aa[_0x566f65(0xb2)](_0x4774fc=>[menuPathKey(_0x4774fc['path']),_0x4774fc])),_0x514e6b=_0x3b75b0[_0x566f65(0xc5)](_0x2be184=>!_0x590c38[_0x566f65(0xb6)](_0x2be184));if(_0x514e6b[_0x566f65(0x9f)]>0x0){const _0x342805=_0x54d9aa['map'](_0x11cb30=>_0x11cb30['path'])[_0x566f65(0x9c)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x514e6b['join'](',\x20')+_0x566f65(0xc0)+_0x342805);}const _0xb489bd=_0x3b75b0[_0x566f65(0xc5)](_0xabb53=>_0x240206[_0x566f65(0xb6)](_0xabb53));if(_0xb489bd[_0x566f65(0x9f)]>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0xb489bd[_0x566f65(0x9c)](',\x20'));_0x2cf348=_0x3b75b0[_0x566f65(0xb2)](_0x23cd4d=>_0x590c38[_0x566f65(0xc3)](_0x23cd4d));}else _0x2cf348=_0x54d9aa[_0x566f65(0xc5)](_0x5dd5ca=>!_0x240206['has'](menuPathKey(_0x5dd5ca['path'])));if(_0x2cf348['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x26463f[_0x566f65(0xa3)]===!![],'targetPages':[],'plannedMenus':[]};_0x2cf348=_0x2cf348['map'](_0x5470f9=>resolvePage(_0x5470f9,_0x7dea0e,_0x319442));_0x7dea0e[_0x566f65(0xac)]&&_0x141c75[_0x566f65(0x9f)]===0x0&&await assertSharedResourcesConfigured(_0x1f012f,_0x1b7ff3,_0x7dea0e['appName']);const _0x23d935=_0x2cf348[_0x566f65(0xb2)](_0x57b6fa=>({'type':_0x566f65(0xb8),'path':_0x57b6fa[_0x566f65(0xae)],'label':_0x57b6fa[_0x566f65(0xa7)],'loadScriptMode':_0x566f65(0xa5),'resources':[..._0x141c75],..._0x57b6fa[_0x566f65(0xbd)]===undefined?{}:{'visible':_0x57b6fa[_0x566f65(0xbd)]},..._0x57b6fa[_0x566f65(0xba)]===undefined?{}:{'parentId':_0x57b6fa[_0x566f65(0xba)]},..._0x57b6fa[_0x566f65(0x8d)]===undefined?{}:{'sort':_0x57b6fa[_0x566f65(0x8d)]},..._0x7dea0e['appName']===undefined?{}:{'appName':_0x7dea0e['appName']}}));if(_0x26463f[_0x566f65(0xa3)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x2cf348,'plannedMenus':_0x23d935};const _0x44fb06=_0x7dea0e[_0x566f65(0xac)]?await createMenus(_0x1f012f,_0x1b7ff3,_0x2cf348,_0x141c75[_0x566f65(0x9f)]>0x0?_0x141c75:undefined,{'appName':_0x7dea0e[_0x566f65(0xac)]}):await createMenus(_0x1f012f,_0x1b7ff3,_0x2cf348,_0x141c75['length']>0x0?_0x141c75:undefined);return logger[_0x566f65(0xaf)](_0x566f65(0x90),_0x566f65(0x8c),{'count':_0x2cf348[_0x566f65(0x9f)],'resources':_0x141c75}),{'created':_0x44fb06[_0x566f65(0x9f)],'skipped':![],'dryRun':![],'targetPages':_0x2cf348,'plannedMenus':_0x23d935,'menus':_0x44fb06};}export function parseMenuSyncParams(_0x48579a){const _0x30b787=a173_0x58f940;if(!_0x48579a||typeof _0x48579a!==_0x30b787(0xa8))return{};let _0x1bca6b;try{_0x1bca6b=JSON[_0x30b787(0xb4)](_0x48579a);}catch{throw new Error(_0x30b787(0xb1));}if(typeof _0x1bca6b!==_0x30b787(0xaa)||_0x1bca6b===null||Array[_0x30b787(0xc2)](_0x1bca6b))throw new Error('Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.');const _0x4d26a5=_0x1bca6b;if(Object[_0x30b787(0xbb)](_0x4d26a5,'pages'))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x50f48f=Object['keys'](_0x4d26a5)[_0x30b787(0xc5)](_0x19d2ac=>!MENU_SYNC_PARAM_KEYS[_0x30b787(0xb6)](_0x19d2ac));if(_0x50f48f[_0x30b787(0x9f)]>0x0)throw new Error('Invalid\x20--params\x20fields:\x20'+_0x50f48f[_0x30b787(0x9c)](',\x20')+'.');for(const _0x188b70 of['jsUrl',_0x30b787(0xbe),_0x30b787(0xac)]){const _0x4a45f4=_0x4d26a5[_0x188b70];if(_0x4a45f4!==undefined&&(typeof _0x4a45f4!=='string'||_0x4a45f4['trim']()===''))throw new Error(_0x30b787(0xb0)+_0x188b70+':\x20expected\x20a\x20non-empty\x20string.');}if(_0x4d26a5['visible']!==undefined&&typeof _0x4d26a5[_0x30b787(0xbd)]!==_0x30b787(0xa0))throw new Error('Invalid\x20--params.visible:\x20expected\x20a\x20boolean.');if(_0x4d26a5[_0x30b787(0xba)]!==undefined&&(!Number['isInteger'](_0x4d26a5['parentId'])||_0x4d26a5[_0x30b787(0xba)]<0x0))throw new Error(_0x30b787(0xbc));return{'jsUrl':typeof _0x4d26a5[_0x30b787(0xc4)]===_0x30b787(0xa8)?_0x4d26a5[_0x30b787(0xc4)][_0x30b787(0xa6)]():undefined,'cssUrl':typeof _0x4d26a5['cssUrl']==='string'?_0x4d26a5[_0x30b787(0xbe)][_0x30b787(0xa6)]():undefined,'appName':typeof _0x4d26a5[_0x30b787(0xac)]===_0x30b787(0xa8)?_0x4d26a5[_0x30b787(0xac)][_0x30b787(0xa6)]():undefined,'visible':typeof _0x4d26a5[_0x30b787(0xbd)]==='boolean'?_0x4d26a5['visible']:undefined,'parentId':typeof _0x4d26a5[_0x30b787(0xba)]===_0x30b787(0x9b)?_0x4d26a5[_0x30b787(0xba)]:undefined};}
1
+ const a173_0x400a3c=a173_0x82c8;(function(_0x11c732,_0x2a528b){const _0x1f827c=a173_0x82c8,_0x4466d9=_0x11c732();while(!![]){try{const _0xc7053e=-parseInt(_0x1f827c(0xac))/0x1*(parseInt(_0x1f827c(0x99))/0x2)+parseInt(_0x1f827c(0x95))/0x3*(-parseInt(_0x1f827c(0xa4))/0x4)+-parseInt(_0x1f827c(0xaa))/0x5+parseInt(_0x1f827c(0xb4))/0x6+-parseInt(_0x1f827c(0x9f))/0x7*(parseInt(_0x1f827c(0xbe))/0x8)+-parseInt(_0x1f827c(0xbb))/0x9+parseInt(_0x1f827c(0xb9))/0xa;if(_0xc7053e===_0x2a528b)break;else _0x4466d9['push'](_0x4466d9['shift']());}catch(_0x2bd7ef){_0x4466d9['push'](_0x4466d9['shift']());}}}(a173_0x1add,0x8a058));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{menuPathKey}from'../../../commands/menu/shared/path.js';import{logger}from'../../../utils/logger.js';import{assertSharedResourcesConfigured}from'../../../commands/menu/shared/subapp-assets.js';const MENU_SYNC_PARAM_KEYS=new Set([a173_0x400a3c(0xc2),a173_0x400a3c(0xbc),a173_0x400a3c(0xa6),'visible',a173_0x400a3c(0x8e)]);function a173_0x1add(){const _0x39ccbc=['jsUrl','Invalid\x20--params\x20JSON.','menu-sync','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','folder','Invalid\x20--params:\x20','parentId','filter',';\x20found\x20','pages','procode','\x0a\x20\x20Available\x20local\x20paths:\x20','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','412668xTyJqv','trim','JS\x20URL\x20is\x20unreachable:\x20','get','628206tmviBR','\x22\x20for\x20','path','No\x20local\x20pages\x20matched\x20paths:\x20','type','string','7rxqccS','group','cwd','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','join','16IphAPH','field','appName','info','keys','Menu\x20sync\x20completed','1048620ATLAlG','object','1kINUoB','parse','visible','Parent\x20','push','CSS\x20URL\x20is\x20unreachable:\x20','boolean','Invalid\x20--params\x20fields:\x20','5283654jxSoYj','has','Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','Invalid\x20--params.visible:\x20expected\x20a\x20boolean.','number','11923240uDDAwW','length','2994615pvERBX','cssUrl','Invalid\x20--params.','806488ebVfTE','label','map','order'];a173_0x1add=function(){return _0x39ccbc;};return a173_0x1add();}export function resolvePage(_0x5aef15,_0x291118,_0x5113ae){const _0x3c4f99=a173_0x400a3c;let _0x5189dd=_0x291118[_0x3c4f99(0x8e)]??_0x5aef15[_0x3c4f99(0x8e)];if(_0x5189dd===undefined&&_0x5aef15['group']){const _0x1de383=_0x5113ae['filter'](_0x4204c9=>_0x4204c9['type']===_0x3c4f99(0x8c)&&_0x4204c9[_0x3c4f99(0xbf)]===_0x5aef15['group']);if(_0x1de383[_0x3c4f99(0xba)]!==0x1)throw new Error('Expected\x20one\x20folder\x20named\x20\x22'+_0x5aef15[_0x3c4f99(0xa0)]+_0x3c4f99(0x9a)+_0x5aef15[_0x3c4f99(0x9b)]+_0x3c4f99(0x90)+_0x1de383[_0x3c4f99(0xba)]);_0x5189dd=_0x1de383[0x0]['id'];}if(_0x5189dd!==undefined&&_0x5189dd!==0x0&&_0x5113ae['filter'](_0x555dc6=>_0x555dc6['id']===_0x5189dd&&_0x555dc6[_0x3c4f99(0x9d)]===_0x3c4f99(0x8c))[_0x3c4f99(0xba)]!==0x1)throw new Error(_0x3c4f99(0xaf)+_0x5189dd+'\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.');return{..._0x5aef15,..._0x5189dd===undefined?{}:{'parentId':_0x5189dd},..._0x291118[_0x3c4f99(0xae)]===undefined?{}:{'visible':_0x291118['visible']}};}function a173_0x82c8(_0x315e65,_0x3c600a){_0x315e65=_0x315e65-0x8a;const _0x1add80=a173_0x1add();let _0x82c8=_0x1add80[_0x315e65];return _0x82c8;}function validateParams(_0x31e51f){const _0x5cc397=a173_0x400a3c,_0x342269=[];return _0x31e51f[_0x5cc397(0xc2)]&&!isValidJsHttpsUrl(_0x31e51f[_0x5cc397(0xc2)])&&_0x342269[_0x5cc397(0xb0)]({'field':_0x5cc397(0xc2),'message':_0x5cc397(0x94)}),_0x31e51f[_0x5cc397(0xbc)]&&!isValidCssHttpsUrl(_0x31e51f['cssUrl'])&&_0x342269[_0x5cc397(0xb0)]({'field':_0x5cc397(0xbc),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x342269;}export async function runMenuSyncCore(_0xddc55b,_0x325923,_0x1d93c7=[],_0x486429,_0x156bd9={}){const _0x188138=a173_0x400a3c,_0x161de2=parseMenuSyncParams(_0x486429),_0x4904ce=[...new Set(_0x1d93c7[_0x188138(0xc0)](_0x561c79=>_0x561c79[_0x188138(0x96)]())[_0x188138(0x8f)](Boolean)['map'](menuPathKey))],_0x3db513=_0x161de2['jsUrl'],_0x2f3544=_0x161de2['cssUrl'],_0x58d7d4=[];if(_0x3db513)_0x58d7d4[_0x188138(0xb0)](_0x3db513);if(_0x2f3544)_0x58d7d4[_0x188138(0xb0)](_0x2f3544);const _0x2ef5a2=validateParams(_0x161de2);if(_0x2ef5a2[_0x188138(0xba)]>0x0){const _0x509415=_0x2ef5a2[_0x188138(0xc0)](_0x16d6f6=>'--params.'+_0x16d6f6[_0x188138(0xa5)]+':\x20'+_0x16d6f6['message'])['join'](';\x20');throw new Error(_0x188138(0x8d)+_0x509415);}logger['setLogPath'](process[_0x188138(0xa1)]()),logger[_0x188138(0xa7)](_0x188138(0x8a),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0xddc55b,'selectedCount':_0x4904ce[_0x188138(0xba)],'jsUrl':_0x3db513,'cssUrl':_0x2f3544});if(_0x3db513){const _0x3ddda3=await isUrlReachable(_0x3db513);if(!_0x3ddda3)throw new Error(_0x188138(0x97)+_0x3db513);}if(_0x2f3544){const _0x55c930=await isUrlReachable(_0x2f3544);if(!_0x55c930)throw new Error(_0x188138(0xb1)+_0x2f3544);}const _0x533989=getLocalPages();if(_0x533989['length']===0x0){if(_0x4904ce[_0x188138(0xba)]>0x0)throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x4904ce[_0x188138(0xa3)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x156bd9['dryRun']===!![],'targetPages':[],'plannedMenus':[]};}const _0x374981=await getOnlineMenuList(_0xddc55b,_0x325923),_0x5ae841=new Set(_0x374981['map'](_0x466896=>menuPathKey(_0x466896[_0x188138(0x9b)])));let _0x4cd56f;if(_0x4904ce[_0x188138(0xba)]>0x0){const _0x404731=new Map(_0x533989[_0x188138(0xc0)](_0x5bfdba=>[menuPathKey(_0x5bfdba[_0x188138(0x9b)]),_0x5bfdba])),_0x443c52=_0x4904ce[_0x188138(0x8f)](_0x5f05f0=>!_0x404731['has'](_0x5f05f0));if(_0x443c52['length']>0x0){const _0x49768a=_0x533989[_0x188138(0xc0)](_0x36e77d=>_0x36e77d[_0x188138(0x9b)])[_0x188138(0xa3)](',\x20');throw new Error(_0x188138(0x9c)+_0x443c52[_0x188138(0xa3)](',\x20')+_0x188138(0x93)+_0x49768a);}const _0x4cd4a0=_0x4904ce[_0x188138(0x8f)](_0x243e46=>_0x5ae841[_0x188138(0xb5)](_0x243e46));if(_0x4cd4a0[_0x188138(0xba)]>0x0)throw new Error(_0x188138(0x8b)+_0x4cd4a0[_0x188138(0xa3)](',\x20'));_0x4cd56f=_0x4904ce[_0x188138(0xc0)](_0x53268b=>_0x404731[_0x188138(0x98)](_0x53268b));}else _0x4cd56f=_0x533989[_0x188138(0x8f)](_0x38a783=>!_0x5ae841[_0x188138(0xb5)](menuPathKey(_0x38a783[_0x188138(0x9b)])));if(_0x4cd56f[_0x188138(0xba)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x156bd9['dryRun']===!![],'targetPages':[],'plannedMenus':[]};_0x4cd56f=_0x4cd56f[_0x188138(0xc0)](_0x8a2c0b=>resolvePage(_0x8a2c0b,_0x161de2,_0x374981));_0x161de2[_0x188138(0xa6)]&&_0x58d7d4['length']===0x0&&await assertSharedResourcesConfigured(_0xddc55b,_0x325923,_0x161de2['appName']);const _0x118f91=_0x4cd56f[_0x188138(0xc0)](_0x25e772=>({'type':_0x188138(0x92),'path':_0x25e772['path'],'label':_0x25e772[_0x188138(0xbf)],'loadScriptMode':'import','resources':[..._0x58d7d4],..._0x25e772[_0x188138(0xae)]===undefined?{}:{'visible':_0x25e772[_0x188138(0xae)]},..._0x25e772[_0x188138(0x8e)]===undefined?{}:{'parentId':_0x25e772[_0x188138(0x8e)]},..._0x25e772[_0x188138(0xc1)]===undefined?{}:{'sort':_0x25e772[_0x188138(0xc1)]},..._0x161de2[_0x188138(0xa6)]===undefined?{}:{'appName':_0x161de2[_0x188138(0xa6)]}}));if(_0x156bd9['dryRun'])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x4cd56f,'plannedMenus':_0x118f91};const _0x55c50a=_0x161de2[_0x188138(0xa6)]?await createMenus(_0xddc55b,_0x325923,_0x4cd56f,_0x58d7d4[_0x188138(0xba)]>0x0?_0x58d7d4:undefined,{'appName':_0x161de2[_0x188138(0xa6)]}):await createMenus(_0xddc55b,_0x325923,_0x4cd56f,_0x58d7d4[_0x188138(0xba)]>0x0?_0x58d7d4:undefined);return logger[_0x188138(0xa7)](_0x188138(0x8a),_0x188138(0xa9),{'count':_0x4cd56f[_0x188138(0xba)],'resources':_0x58d7d4}),{'created':_0x55c50a['length'],'skipped':![],'dryRun':![],'targetPages':_0x4cd56f,'plannedMenus':_0x118f91,'menus':_0x55c50a};}export function parseMenuSyncParams(_0x4feab8){const _0x4d3924=a173_0x400a3c;if(!_0x4feab8||typeof _0x4feab8!==_0x4d3924(0x9e))return{};let _0x28f384;try{_0x28f384=JSON[_0x4d3924(0xad)](_0x4feab8);}catch{throw new Error(_0x4d3924(0xc3));}if(typeof _0x28f384!==_0x4d3924(0xab)||_0x28f384===null||Array['isArray'](_0x28f384))throw new Error(_0x4d3924(0xa2));const _0x4df2f2=_0x28f384;if(Object['hasOwn'](_0x4df2f2,_0x4d3924(0x91)))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x1d46e7=Object[_0x4d3924(0xa8)](_0x4df2f2)[_0x4d3924(0x8f)](_0x34dcbb=>!MENU_SYNC_PARAM_KEYS[_0x4d3924(0xb5)](_0x34dcbb));if(_0x1d46e7['length']>0x0)throw new Error(_0x4d3924(0xb3)+_0x1d46e7[_0x4d3924(0xa3)](',\x20')+'.');for(const _0x430e5d of[_0x4d3924(0xc2),_0x4d3924(0xbc),'appName']){const _0x2e7740=_0x4df2f2[_0x430e5d];if(_0x2e7740!==undefined&&(typeof _0x2e7740!=='string'||_0x2e7740[_0x4d3924(0x96)]()===''))throw new Error(_0x4d3924(0xbd)+_0x430e5d+':\x20expected\x20a\x20non-empty\x20string.');}if(_0x4df2f2[_0x4d3924(0xae)]!==undefined&&typeof _0x4df2f2[_0x4d3924(0xae)]!=='boolean')throw new Error(_0x4d3924(0xb7));if(_0x4df2f2[_0x4d3924(0x8e)]!==undefined&&(!Number['isInteger'](_0x4df2f2[_0x4d3924(0x8e)])||_0x4df2f2[_0x4d3924(0x8e)]<0x0))throw new Error(_0x4d3924(0xb6));return{'jsUrl':typeof _0x4df2f2['jsUrl']==='string'?_0x4df2f2[_0x4d3924(0xc2)][_0x4d3924(0x96)]():undefined,'cssUrl':typeof _0x4df2f2[_0x4d3924(0xbc)]===_0x4d3924(0x9e)?_0x4df2f2[_0x4d3924(0xbc)][_0x4d3924(0x96)]():undefined,'appName':typeof _0x4df2f2[_0x4d3924(0xa6)]===_0x4d3924(0x9e)?_0x4df2f2['appName'][_0x4d3924(0x96)]():undefined,'visible':typeof _0x4df2f2[_0x4d3924(0xae)]===_0x4d3924(0xb2)?_0x4df2f2[_0x4d3924(0xae)]:undefined,'parentId':typeof _0x4df2f2[_0x4d3924(0x8e)]===_0x4d3924(0xb8)?_0x4df2f2[_0x4d3924(0x8e)]:undefined};}
@@ -1 +1 @@
1
- (function(_0x622895,_0x5f0fb1){const _0x26797e=a175_0x3c91,_0x371b1f=_0x622895();while(!![]){try{const _0x1e9e1d=parseInt(_0x26797e(0xd8))/0x1+-parseInt(_0x26797e(0xbd))/0x2+parseInt(_0x26797e(0xdb))/0x3*(parseInt(_0x26797e(0xcb))/0x4)+parseInt(_0x26797e(0xd0))/0x5+-parseInt(_0x26797e(0xb7))/0x6*(parseInt(_0x26797e(0xa8))/0x7)+-parseInt(_0x26797e(0xd4))/0x8+-parseInt(_0x26797e(0x9d))/0x9*(-parseInt(_0x26797e(0xdd))/0xa);if(_0x1e9e1d===_0x5f0fb1)break;else _0x371b1f['push'](_0x371b1f['shift']());}catch(_0x59bf39){_0x371b1f['push'](_0x371b1f['shift']());}}}(a175_0x2131,0x50c17));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a175_0x3c91(_0x30d078,_0x1b4bf4){_0x30d078=_0x30d078-0x92;const _0x2131a3=a175_0x2131();let _0x3c9140=_0x2131a3[_0x30d078];return _0x3c9140;}import{logger}from'../../../utils/logger.js';function validateParams(_0x171e7a){const _0x1063bb=a175_0x3c91,_0x1f4590=[];return _0x171e7a[_0x1063bb(0xad)]&&!isValidJsHttpsUrl(_0x171e7a[_0x1063bb(0xad)])&&_0x1f4590['push']({'field':_0x1063bb(0xad),'message':_0x1063bb(0xc5)}),_0x171e7a[_0x1063bb(0x9a)]&&!isValidCssHttpsUrl(_0x171e7a[_0x1063bb(0x9a)])&&_0x1f4590['push']({'field':_0x1063bb(0x9a),'message':_0x1063bb(0x95)}),_0x1f4590;}export async function runMenuUpdateCore(_0x121469,_0x216fa1,_0x50ab57,_0x780f53={}){const _0x51aa1c=a175_0x3c91,_0x1c5a82=parseUpdateParamsFlag(_0x50ab57),_0x39babd=normalizeMode(_0x780f53[_0x51aa1c(0xa0)]);validateSelection(_0x780f53[_0x51aa1c(0xbc)]);const _0x2e4cbc=[];if(_0x1c5a82[_0x51aa1c(0xad)])_0x2e4cbc['push'](_0x1c5a82['jsUrl']);if(_0x1c5a82['cssUrl'])_0x2e4cbc[_0x51aa1c(0xa6)](_0x1c5a82[_0x51aa1c(0x9a)]);const _0x145d8d=validateParams(_0x1c5a82);if(_0x145d8d[_0x51aa1c(0xa3)]>0x0){const _0xaa9560=_0x145d8d[_0x51aa1c(0x9e)](_0x4682dd=>_0x51aa1c(0xac)+_0x4682dd[_0x51aa1c(0xce)]+':\x20'+_0x4682dd['message'])[_0x51aa1c(0xc1)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0xaa9560);}if(_0x2e4cbc[_0x51aa1c(0xa3)]===0x0)throw new Error(_0x51aa1c(0xc4)+_0x51aa1c(0x99));logger[_0x51aa1c(0xc9)](process[_0x51aa1c(0xb5)]()),logger['info'](_0x51aa1c(0xa9),_0x51aa1c(0xba),{'appCode':_0x121469,'jsUrl':_0x1c5a82[_0x51aa1c(0xad)],'cssUrl':_0x1c5a82[_0x51aa1c(0x9a)],'mode':_0x39babd,'dryRun':_0x780f53[_0x51aa1c(0xb3)]===!![]});if(_0x1c5a82['jsUrl']){const _0x2b4b6c=await isUrlReachable(_0x1c5a82[_0x51aa1c(0xad)]);if(!_0x2b4b6c)throw new Error(_0x51aa1c(0xcf)+_0x1c5a82[_0x51aa1c(0xad)]);}if(_0x1c5a82[_0x51aa1c(0x9a)]){const _0x4b61a7=await isUrlReachable(_0x1c5a82[_0x51aa1c(0x9a)]);if(!_0x4b61a7)throw new Error(_0x51aa1c(0xb2)+_0x1c5a82['cssUrl']);}const _0x33af67=await getOnlineMenuList(_0x121469,_0x216fa1),_0x19cf28=_0x33af67[_0x51aa1c(0xaf)](_0x1e359e=>_0x1e359e['resources'][_0x51aa1c(0xa3)]>0x0),_0x30a169=selectMenusForUpdate(_0x19cf28,_0x780f53[_0x51aa1c(0xbc)]);if(_0x30a169[_0x51aa1c(0xa3)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x780f53[_0x51aa1c(0xb3)]===!![]};const _0x1f50ea=_0x30a169['map'](_0x546a5e=>buildMenuUpdateDiff(_0x546a5e,_0x1c5a82,_0x39babd,_0x780f53[_0x51aa1c(0xd9)]===!![],_0x780f53[_0x51aa1c(0xaa)]));if(_0x780f53[_0x51aa1c(0xb3)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x1f50ea};const _0x32f728=await Promise[_0x51aa1c(0xc6)](_0x30a169[_0x51aa1c(0x9e)]((_0x3183c8,_0x708c34)=>updateMenuCdnUrl(_0x121469,_0x216fa1,{'id':_0x3183c8['id'],'label':_0x3183c8[_0x51aa1c(0xa7)],'path':_0x3183c8['path'],'resources':_0x1f50ea[_0x708c34][_0x51aa1c(0xab)][_0x51aa1c(0xb9)],'extend':_0x3183c8[_0x51aa1c(0xa5)]??null,'loadScriptMode':_0x780f53[_0x51aa1c(0xaa)]}))),_0x5c01fa=_0x32f728[_0x51aa1c(0xaf)](_0x11e494=>_0x11e494[_0x51aa1c(0xc3)]===_0x51aa1c(0xd2))[_0x51aa1c(0x9e)](_0x5023b4=>_0x5023b4[_0x51aa1c(0xae)]),_0x5c7739=_0x32f728[_0x51aa1c(0xaf)](_0x3b3edc=>_0x3b3edc[_0x51aa1c(0xc3)]===_0x51aa1c(0x97))[_0x51aa1c(0xa3)];return logger[_0x51aa1c(0xc2)](_0x51aa1c(0xa9),_0x51aa1c(0xbf),{'count':_0x30a169[_0x51aa1c(0xa3)],'resources':_0x2e4cbc}),{'updated':_0x5c01fa['length'],'failed':_0x5c7739,'skipped':![],'menus':_0x5c01fa};}function validateSelection(_0xb8fba1){const _0x124c24=a175_0x3c91;if(!_0xb8fba1)throw new Error(_0x124c24(0x96));if(_0xb8fba1[_0x124c24(0xd3)]&&(_0xb8fba1[_0x124c24(0xa4)][_0x124c24(0xa3)]>0x0||_0xb8fba1[_0x124c24(0xb4)][_0x124c24(0xa3)]>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0xb8fba1[_0x124c24(0xd3)]&&_0xb8fba1['menuIds']['length']===0x0&&_0xb8fba1[_0x124c24(0xb4)]['length']===0x0)throw new Error(_0x124c24(0x96));}export function selectMenusForUpdate(_0x23348f,_0x46c2bf){const _0x4828b1=a175_0x3c91;validateSelection(_0x46c2bf);if(_0x46c2bf[_0x4828b1(0xd3)])return _0x23348f;const _0x1710da=new Set(_0x23348f[_0x4828b1(0x9e)](_0x582d56=>_0x582d56['id'])),_0x4e30c2=new Set(_0x23348f['map'](_0x220d50=>_0x220d50[_0x4828b1(0xdc)])),_0xd31332=_0x46c2bf['menuIds'][_0x4828b1(0xaf)](_0x408186=>!_0x1710da[_0x4828b1(0xa2)](_0x408186)),_0x1510c2=_0x46c2bf[_0x4828b1(0xb4)]['filter'](_0x2100bf=>!_0x4e30c2[_0x4828b1(0xa2)](_0x2100bf));if(_0xd31332[_0x4828b1(0xa3)]>0x0||_0x1510c2[_0x4828b1(0xa3)]>0x0){const _0x4806df=[..._0xd31332['map'](_0x552d24=>String(_0x552d24)),..._0x1510c2][_0x4828b1(0xc1)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x4806df);}const _0x52c11c=new Set(_0x46c2bf['menuIds']),_0x55453b=new Set(_0x46c2bf[_0x4828b1(0xb4)]);return _0x23348f[_0x4828b1(0xaf)](_0xc44a3e=>_0x52c11c[_0x4828b1(0xa2)](_0xc44a3e['id'])||_0x55453b[_0x4828b1(0xa2)](_0xc44a3e[_0x4828b1(0xdc)]));}function normalizeMode(_0xc6fb3b){const _0x416d26=a175_0x3c91;if(!_0xc6fb3b)return _0x416d26(0xcd);if(_0xc6fb3b===_0x416d26(0xa1)||_0xc6fb3b===_0x416d26(0xcd))return _0xc6fb3b;throw new Error(_0x416d26(0x93)+_0xc6fb3b+_0x416d26(0xc0));}function buildMenuUpdateDiff(_0x29defb,_0x49d6a0,_0x594dd9,_0x31bfa1,_0x11e595){const _0x439aaa=a175_0x3c91,_0x51912b=[..._0x29defb[_0x439aaa(0xb9)]];_0x594dd9===_0x439aaa(0xcd)&&assertUnambiguousPatchResources(_0x29defb,_0x51912b,_0x49d6a0);const _0x4bb5a2=_0x594dd9===_0x439aaa(0xcd)?patchResources(_0x51912b,_0x49d6a0):replaceResources(_0x49d6a0),_0x22c74a=[],_0x1df8e9=_0x51912b[_0x439aaa(0x9c)](isJsResource),_0x4edb35=_0x4bb5a2[_0x439aaa(0x9c)](isJsResource);if(_0x1df8e9&&!_0x4edb35){const _0x3ad2f5=_0x439aaa(0xbb)+_0x29defb[_0x439aaa(0xa7)]+_0x439aaa(0x92)+_0x29defb[_0x439aaa(0xdc)]+_0x439aaa(0x9b)+_0x439aaa(0xb6);if(!_0x31bfa1)throw new Error(_0x3ad2f5);_0x22c74a[_0x439aaa(0xa6)](_0x3ad2f5);}const _0x2af8e1=_0x51912b[_0x439aaa(0x9c)](isCssResource),_0x45e6c9=_0x4bb5a2[_0x439aaa(0x9c)](isCssResource);_0x2af8e1&&!_0x45e6c9&&_0x22c74a[_0x439aaa(0xa6)](_0x439aaa(0xbe)+_0x29defb[_0x439aaa(0xa7)]+_0x439aaa(0x92)+_0x29defb[_0x439aaa(0xdc)]+').');const _0x57974a=typeof _0x29defb[_0x439aaa(0xa5)]?.[_0x439aaa(0xaa)]===_0x439aaa(0xca)?_0x29defb[_0x439aaa(0xa5)][_0x439aaa(0xaa)]:null,_0x2828eb=_0x11e595?{'loadScriptMode':_0x57974a}:{},_0x386f4f=_0x11e595?{'loadScriptMode':_0x11e595}:{};return{'id':_0x29defb['id'],'label':_0x29defb['label'],'path':_0x29defb[_0x439aaa(0xdc)],'mode':_0x594dd9,'before':{'resources':_0x51912b,..._0x2828eb},'after':{'resources':_0x4bb5a2,..._0x386f4f},'warnings':_0x22c74a};}function replaceResources(_0x2c010d){const _0x4eafa1=a175_0x3c91;return[_0x2c010d['jsUrl'],_0x2c010d[_0x4eafa1(0x9a)]][_0x4eafa1(0xaf)](_0x366613=>!!_0x366613);}function assertUnambiguousPatchResources(_0x415d10,_0x426e65,_0x510468){const _0x26813f=a175_0x3c91,_0x1ed715=_0x426e65[_0x26813f(0xaf)](isJsResource)[_0x26813f(0xa3)];if(_0x510468[_0x26813f(0xad)]&&_0x1ed715>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x1ed715+_0x26813f(0xd5)+_0x415d10['label']+'\x22\x20('+_0x415d10['path']+')\x20'+_0x26813f(0xc7));const _0xd733e0=_0x426e65['filter'](isCssResource)[_0x26813f(0xa3)];if(_0x510468[_0x26813f(0x9a)]&&_0xd733e0>0x1)throw new Error(_0x26813f(0xd6)+_0xd733e0+_0x26813f(0xb8)+_0x415d10[_0x26813f(0xa7)]+'\x22\x20('+_0x415d10[_0x26813f(0xdc)]+')\x20'+_0x26813f(0xd7));}function patchResources(_0xf877d1,_0x554718){const _0x330e06=a175_0x3c91;let _0x34ad3c=![],_0x4bf76c=![];const _0x41bc52=[];for(const _0x84b43f of _0xf877d1){if(isJsResource(_0x84b43f)){if(_0x554718[_0x330e06(0xad)]&&!_0x34ad3c)_0x41bc52['push'](_0x554718['jsUrl']),_0x34ad3c=!![];else!_0x554718['jsUrl']&&_0x41bc52['push'](_0x84b43f);continue;}if(isCssResource(_0x84b43f)){if(_0x554718[_0x330e06(0x9a)]&&!_0x4bf76c)_0x41bc52[_0x330e06(0xa6)](_0x554718['cssUrl']),_0x4bf76c=!![];else!_0x554718[_0x330e06(0x9a)]&&_0x41bc52[_0x330e06(0xa6)](_0x84b43f);continue;}_0x41bc52[_0x330e06(0xa6)](_0x84b43f);}return _0x554718[_0x330e06(0xad)]&&!_0x34ad3c&&_0x41bc52[_0x330e06(0xda)](_0x554718[_0x330e06(0xad)]),_0x554718[_0x330e06(0x9a)]&&!_0x4bf76c&&_0x41bc52[_0x330e06(0xa6)](_0x554718[_0x330e06(0x9a)]),_0x41bc52;}function isJsResource(_0x2bc64e){const _0xcdb221=a175_0x3c91;return stripQuery(_0x2bc64e)[_0xcdb221(0x94)]()['endsWith'](_0xcdb221(0xd1));}function isCssResource(_0x508ed9){const _0x459a54=a175_0x3c91;return stripQuery(_0x508ed9)[_0x459a54(0x94)]()[_0x459a54(0x9f)](_0x459a54(0xc8));}function stripQuery(_0x3809d5){const _0x50b0d2=a175_0x3c91;return _0x3809d5[_0x50b0d2(0xcc)]('?')[0x0]??_0x3809d5;}function parseUpdateParamsFlag(_0x1016c4){const _0x495dc7=a175_0x3c91;if(!_0x1016c4||typeof _0x1016c4!==_0x495dc7(0xca))return{};try{const _0x22199d=JSON['parse'](_0x1016c4);if(typeof _0x22199d!==_0x495dc7(0x98)||_0x22199d===null||Array[_0x495dc7(0xb0)](_0x22199d))return{};return{'jsUrl':typeof _0x22199d[_0x495dc7(0xad)]===_0x495dc7(0xca)?_0x22199d['jsUrl'][_0x495dc7(0xb1)]():undefined,'cssUrl':typeof _0x22199d[_0x495dc7(0x9a)]===_0x495dc7(0xca)?_0x22199d[_0x495dc7(0x9a)][_0x495dc7(0xb1)]():undefined};}catch{return{};}}function a175_0x2131(){const _0x2e15c8=['toLowerCase','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','rejected','object','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','cssUrl',').\x20','some','186381WnsheY','map','endsWith','mode','replace','has','length','menuIds','extend','push','label','763AxmosM','menu-asset-update','loadScriptMode','after','--params.','jsUrl','value','filter','isArray','trim','CSS\x20URL\x20is\x20unreachable:\x20','dryRun','paths','cwd','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','21498ioCEmR','\x20existing\x20CSS\x20resources\x20for\x20\x22','resources','Start\x20non-interactive\x20menu\x20asset\x20update','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','selection','904948zRjTHM','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','Menu\x20asset\x20update\x20completed','.\x20Allowed\x20values:\x20replace,\x20patch','join','info','status','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','allSettled','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','.css','setLogPath','string','251848OQAyoZ','split','patch','field','JS\x20URL\x20is\x20unreachable:\x20','2612820DrYXlk','.js','fulfilled','all','4593432EaDedJ','\x20existing\x20JS\x20resources\x20for\x20\x22','menu\x20asset-update\x20cannot\x20patch\x20','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','390371llAJyV','force','unshift','24MYMGVl','path','160posHyJ','\x22\x20(','Invalid\x20--mode:\x20'];a175_0x2131=function(){return _0x2e15c8;};return a175_0x2131();}
1
+ (function(_0xacbf53,_0x42ae51){const _0x3d5033=a175_0x15f7,_0x3297d5=_0xacbf53();while(!![]){try{const _0x227bc5=parseInt(_0x3d5033(0xa1))/0x1*(parseInt(_0x3d5033(0xc6))/0x2)+-parseInt(_0x3d5033(0xdf))/0x3*(parseInt(_0x3d5033(0xd2))/0x4)+parseInt(_0x3d5033(0xc0))/0x5+parseInt(_0x3d5033(0xa8))/0x6+-parseInt(_0x3d5033(0xce))/0x7*(-parseInt(_0x3d5033(0xbb))/0x8)+parseInt(_0x3d5033(0xcb))/0x9*(parseInt(_0x3d5033(0xc2))/0xa)+-parseInt(_0x3d5033(0xa3))/0xb;if(_0x227bc5===_0x42ae51)break;else _0x3297d5['push'](_0x3297d5['shift']());}catch(_0xa5a325){_0x3297d5['push'](_0x3297d5['shift']());}}}(a175_0x1f11,0x841c8));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x4b5bf4){const _0x354fe0=a175_0x15f7,_0x4a2161=[];return _0x4b5bf4[_0x354fe0(0xa0)]&&!isValidJsHttpsUrl(_0x4b5bf4['jsUrl'])&&_0x4a2161['push']({'field':_0x354fe0(0xa0),'message':_0x354fe0(0xa6)}),_0x4b5bf4[_0x354fe0(0xc5)]&&!isValidCssHttpsUrl(_0x4b5bf4[_0x354fe0(0xc5)])&&_0x4a2161[_0x354fe0(0x9e)]({'field':_0x354fe0(0xc5),'message':_0x354fe0(0xab)}),_0x4a2161;}export async function runMenuUpdateCore(_0x5a7d35,_0x4a5fa0,_0x109938,_0x1b56f4={}){const _0x2f6458=a175_0x15f7,_0x195255=parseUpdateParamsFlag(_0x109938),_0x209da5=normalizeMode(_0x1b56f4['mode']);validateSelection(_0x1b56f4[_0x2f6458(0xda)]);const _0x1926a=[];if(_0x195255['jsUrl'])_0x1926a[_0x2f6458(0x9e)](_0x195255[_0x2f6458(0xa0)]);if(_0x195255[_0x2f6458(0xc5)])_0x1926a['push'](_0x195255[_0x2f6458(0xc5)]);const _0x10727b=validateParams(_0x195255);if(_0x10727b[_0x2f6458(0xd9)]>0x0){const _0x48ff7b=_0x10727b[_0x2f6458(0xaa)](_0x4488ea=>_0x2f6458(0xdc)+_0x4488ea['field']+':\x20'+_0x4488ea[_0x2f6458(0xd0)])['join'](';\x20');throw new Error(_0x2f6458(0xca)+_0x48ff7b);}if(_0x1926a[_0x2f6458(0xd9)]===0x0)throw new Error(_0x2f6458(0x9f)+_0x2f6458(0xa7));logger[_0x2f6458(0xae)](process[_0x2f6458(0xe0)]()),logger['info'](_0x2f6458(0xbd),_0x2f6458(0xc7),{'appCode':_0x5a7d35,'jsUrl':_0x195255[_0x2f6458(0xa0)],'cssUrl':_0x195255[_0x2f6458(0xc5)],'mode':_0x209da5,'dryRun':_0x1b56f4[_0x2f6458(0xa5)]===!![]});if(_0x195255[_0x2f6458(0xa0)]){const _0x1bb127=await isUrlReachable(_0x195255[_0x2f6458(0xa0)]);if(!_0x1bb127)throw new Error(_0x2f6458(0xd1)+_0x195255[_0x2f6458(0xa0)]);}if(_0x195255[_0x2f6458(0xc5)]){const _0x3fa8c9=await isUrlReachable(_0x195255[_0x2f6458(0xc5)]);if(!_0x3fa8c9)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x195255[_0x2f6458(0xc5)]);}const _0x2de5fe=await getOnlineMenuList(_0x5a7d35,_0x4a5fa0),_0x260c58=_0x2de5fe[_0x2f6458(0xbf)](_0x344797=>_0x344797[_0x2f6458(0xa2)][_0x2f6458(0xd9)]>0x0),_0xa24995=selectMenusForUpdate(_0x260c58,_0x1b56f4['selection']);if(_0xa24995['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x1b56f4['dryRun']===!![]};const _0x505dd6=_0xa24995[_0x2f6458(0xaa)](_0x973b03=>buildMenuUpdateDiff(_0x973b03,_0x195255,_0x209da5,_0x1b56f4[_0x2f6458(0xb8)]===!![],_0x1b56f4[_0x2f6458(0xc1)]));if(_0x1b56f4[_0x2f6458(0xa5)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x505dd6};const _0x5c8771=await Promise[_0x2f6458(0xad)](_0xa24995[_0x2f6458(0xaa)]((_0x559b69,_0x4255f4)=>updateMenuCdnUrl(_0x5a7d35,_0x4a5fa0,{'id':_0x559b69['id'],'label':_0x559b69[_0x2f6458(0xcd)],'path':_0x559b69[_0x2f6458(0xb9)],'resources':_0x505dd6[_0x4255f4]['after'][_0x2f6458(0xa2)],'extend':_0x559b69[_0x2f6458(0xd5)]??null,'loadScriptMode':_0x1b56f4[_0x2f6458(0xc1)]}))),_0x17a6d0=_0x5c8771['filter'](_0x4063b7=>_0x4063b7[_0x2f6458(0xdd)]===_0x2f6458(0x9c))['map'](_0x5c8101=>_0x5c8101[_0x2f6458(0x9d)]),_0x537dde=_0x5c8771[_0x2f6458(0xbf)](_0xaadbcc=>_0xaadbcc[_0x2f6458(0xdd)]==='rejected')[_0x2f6458(0xd9)];return logger[_0x2f6458(0xa9)](_0x2f6458(0xbd),_0x2f6458(0xb5),{'count':_0xa24995[_0x2f6458(0xd9)],'resources':_0x1926a}),{'updated':_0x17a6d0[_0x2f6458(0xd9)],'failed':_0x537dde,'skipped':![],'menus':_0x17a6d0};}function validateSelection(_0x51a989){const _0x4bb447=a175_0x15f7;if(!_0x51a989)throw new Error(_0x4bb447(0xb0));if(_0x51a989['all']&&(_0x51a989[_0x4bb447(0xc3)]['length']>0x0||_0x51a989[_0x4bb447(0xc8)]['length']>0x0))throw new Error(_0x4bb447(0xb1));if(!_0x51a989[_0x4bb447(0xc4)]&&_0x51a989[_0x4bb447(0xc3)]['length']===0x0&&_0x51a989[_0x4bb447(0xc8)]['length']===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}export function selectMenusForUpdate(_0x1fca6f,_0x534dda){const _0x121e16=a175_0x15f7;validateSelection(_0x534dda);if(_0x534dda[_0x121e16(0xc4)])return _0x1fca6f;const _0x4851f5=new Set(_0x1fca6f[_0x121e16(0xaa)](_0x47388b=>_0x47388b['id'])),_0x237275=new Set(_0x1fca6f[_0x121e16(0xaa)](_0x1e5d35=>_0x1e5d35[_0x121e16(0xb9)])),_0x2a3bed=_0x534dda['menuIds'][_0x121e16(0xbf)](_0x42e003=>!_0x4851f5[_0x121e16(0xd3)](_0x42e003)),_0x524512=_0x534dda[_0x121e16(0xc8)]['filter'](_0x3d3140=>!_0x237275[_0x121e16(0xd3)](_0x3d3140));if(_0x2a3bed['length']>0x0||_0x524512['length']>0x0){const _0x2adccd=[..._0x2a3bed['map'](_0x280eec=>String(_0x280eec)),..._0x524512][_0x121e16(0xc9)](',\x20');throw new Error(_0x121e16(0xcc)+_0x2adccd);}const _0x25c5c7=new Set(_0x534dda[_0x121e16(0xc3)]),_0x526eec=new Set(_0x534dda['paths']);return _0x1fca6f[_0x121e16(0xbf)](_0x1f335b=>_0x25c5c7[_0x121e16(0xd3)](_0x1f335b['id'])||_0x526eec[_0x121e16(0xd3)](_0x1f335b[_0x121e16(0xb9)]));}function normalizeMode(_0x1a193e){const _0x47ffec=a175_0x15f7;if(!_0x1a193e)return _0x47ffec(0xb4);if(_0x1a193e===_0x47ffec(0xd7)||_0x1a193e===_0x47ffec(0xb4))return _0x1a193e;throw new Error(_0x47ffec(0xd6)+_0x1a193e+_0x47ffec(0xac));}function buildMenuUpdateDiff(_0x21b445,_0x1120c5,_0xf6acf7,_0x238cbc,_0x15d0cd){const _0x3cbe44=a175_0x15f7,_0x292e86=[..._0x21b445[_0x3cbe44(0xa2)]];_0xf6acf7===_0x3cbe44(0xb4)&&assertUnambiguousPatchResources(_0x21b445,_0x292e86,_0x1120c5);const _0x404d3e=_0xf6acf7===_0x3cbe44(0xb4)?patchResources(_0x292e86,_0x1120c5):replaceResources(_0x1120c5),_0x3920a7=[],_0x553371=_0x292e86['some'](isJsResource),_0x1cbc59=_0x404d3e['some'](isJsResource);if(_0x553371&&!_0x1cbc59){const _0x464230='menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x21b445[_0x3cbe44(0xcd)]+'\x22\x20('+_0x21b445[_0x3cbe44(0xb9)]+').\x20'+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x238cbc)throw new Error(_0x464230);_0x3920a7[_0x3cbe44(0x9e)](_0x464230);}const _0x2c17e3=_0x292e86[_0x3cbe44(0xdb)](isCssResource),_0x2c8f35=_0x404d3e[_0x3cbe44(0xdb)](isCssResource);_0x2c17e3&&!_0x2c8f35&&_0x3920a7[_0x3cbe44(0x9e)](_0x3cbe44(0xd4)+_0x21b445[_0x3cbe44(0xcd)]+_0x3cbe44(0xcf)+_0x21b445[_0x3cbe44(0xb9)]+').');const _0x2491da=typeof _0x21b445[_0x3cbe44(0xd5)]?.[_0x3cbe44(0xc1)]===_0x3cbe44(0xba)?_0x21b445[_0x3cbe44(0xd5)][_0x3cbe44(0xc1)]:null,_0x6da538=_0x15d0cd?{'loadScriptMode':_0x2491da}:{},_0x19b41e=_0x15d0cd?{'loadScriptMode':_0x15d0cd}:{};return{'id':_0x21b445['id'],'label':_0x21b445[_0x3cbe44(0xcd)],'path':_0x21b445['path'],'mode':_0xf6acf7,'before':{'resources':_0x292e86,..._0x6da538},'after':{'resources':_0x404d3e,..._0x19b41e},'warnings':_0x3920a7};}function replaceResources(_0xab2539){const _0x3f8fe4=a175_0x15f7;return[_0xab2539['jsUrl'],_0xab2539[_0x3f8fe4(0xc5)]][_0x3f8fe4(0xbf)](_0xe999d6=>!!_0xe999d6);}function a175_0x15f7(_0x143fd9,_0x181633){_0x143fd9=_0x143fd9-0x9b;const _0x1f1127=a175_0x1f11();let _0x15f7cd=_0x1f1127[_0x143fd9];return _0x15f7cd;}function assertUnambiguousPatchResources(_0x592aa5,_0x16913a,_0x3d3728){const _0x2b0cd3=a175_0x15f7,_0x3798f4=_0x16913a[_0x2b0cd3(0xbf)](isJsResource)['length'];if(_0x3d3728[_0x2b0cd3(0xa0)]&&_0x3798f4>0x1)throw new Error(_0x2b0cd3(0xde)+_0x3798f4+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x592aa5['label']+_0x2b0cd3(0xcf)+_0x592aa5[_0x2b0cd3(0xb9)]+')\x20'+_0x2b0cd3(0xa4));const _0x412dc1=_0x16913a[_0x2b0cd3(0xbf)](isCssResource)[_0x2b0cd3(0xd9)];if(_0x3d3728[_0x2b0cd3(0xc5)]&&_0x412dc1>0x1)throw new Error(_0x2b0cd3(0xde)+_0x412dc1+_0x2b0cd3(0xaf)+_0x592aa5['label']+_0x2b0cd3(0xcf)+_0x592aa5['path']+')\x20'+_0x2b0cd3(0xb7));}function patchResources(_0x1c9e78,_0x25f623){const _0x52a1cb=a175_0x15f7;let _0x34b652=![],_0x2f62ed=![];const _0x522eb4=[];for(const _0x31cc82 of _0x1c9e78){if(isJsResource(_0x31cc82)){if(_0x25f623[_0x52a1cb(0xa0)]&&!_0x34b652)_0x522eb4[_0x52a1cb(0x9e)](_0x25f623[_0x52a1cb(0xa0)]),_0x34b652=!![];else!_0x25f623[_0x52a1cb(0xa0)]&&_0x522eb4[_0x52a1cb(0x9e)](_0x31cc82);continue;}if(isCssResource(_0x31cc82)){if(_0x25f623[_0x52a1cb(0xc5)]&&!_0x2f62ed)_0x522eb4[_0x52a1cb(0x9e)](_0x25f623[_0x52a1cb(0xc5)]),_0x2f62ed=!![];else!_0x25f623[_0x52a1cb(0xc5)]&&_0x522eb4[_0x52a1cb(0x9e)](_0x31cc82);continue;}_0x522eb4[_0x52a1cb(0x9e)](_0x31cc82);}return _0x25f623[_0x52a1cb(0xa0)]&&!_0x34b652&&_0x522eb4[_0x52a1cb(0xbc)](_0x25f623[_0x52a1cb(0xa0)]),_0x25f623['cssUrl']&&!_0x2f62ed&&_0x522eb4['push'](_0x25f623[_0x52a1cb(0xc5)]),_0x522eb4;}function a175_0x1f11(){const _0x5e9656=['284901BKyHqR','cwd','isArray','fulfilled','value','push','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','jsUrl','1231jrDxor','resources','18205418usmNAr','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','dryRun','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','5409540FLplLU','info','map','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','.\x20Allowed\x20values:\x20replace,\x20patch','allSettled','setLogPath','\x20existing\x20CSS\x20resources\x20for\x20\x22','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','.js','split','patch','Menu\x20asset\x20update\x20completed','trim','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','force','path','string','8qsaxJd','unshift','menu-asset-update','endsWith','filter','1431530HvAiow','loadScriptMode','20poDFsS','menuIds','all','cssUrl','812RPIjhj','Start\x20non-interactive\x20menu\x20asset\x20update','paths','join','Invalid\x20--params:\x20','2414619xmdIcY','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','label','7115773ZePHyZ','\x22\x20(','message','JS\x20URL\x20is\x20unreachable:\x20','44XgliUZ','has','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','extend','Invalid\x20--mode:\x20','replace','toLowerCase','length','selection','some','--params.','status','menu\x20asset-update\x20cannot\x20patch\x20'];a175_0x1f11=function(){return _0x5e9656;};return a175_0x1f11();}function isJsResource(_0x193117){const _0x58a457=a175_0x15f7;return stripQuery(_0x193117)[_0x58a457(0xd8)]()[_0x58a457(0xbe)](_0x58a457(0xb2));}function isCssResource(_0x3c03dc){const _0x24b347=a175_0x15f7;return stripQuery(_0x3c03dc)[_0x24b347(0xd8)]()[_0x24b347(0xbe)]('.css');}function stripQuery(_0x48ff9a){const _0x12fc73=a175_0x15f7;return _0x48ff9a[_0x12fc73(0xb3)]('?')[0x0]??_0x48ff9a;}function parseUpdateParamsFlag(_0x33bc17){const _0x22c448=a175_0x15f7;if(!_0x33bc17||typeof _0x33bc17!==_0x22c448(0xba))return{};try{const _0x163f1f=JSON['parse'](_0x33bc17);if(typeof _0x163f1f!=='object'||_0x163f1f===null||Array[_0x22c448(0x9b)](_0x163f1f))return{};return{'jsUrl':typeof _0x163f1f[_0x22c448(0xa0)]===_0x22c448(0xba)?_0x163f1f[_0x22c448(0xa0)][_0x22c448(0xb6)]():undefined,'cssUrl':typeof _0x163f1f['cssUrl']===_0x22c448(0xba)?_0x163f1f['cssUrl']['trim']():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a176_0x3e8f(){const _0x4a6eb7=['body','trim','2058296VtngHx','997352YTaecY','6852132QqzNlL','10405764dNVOgT','HEAD','8682gAMsHN','test','cancel','6UnDIEs','4371785NCrIDN','159OOLrFX','10403904ZPuGdG'];a176_0x3e8f=function(){return _0x4a6eb7;};return a176_0x3e8f();}(function(_0x261fab,_0x381604){const _0x535d4d=a176_0xcd7b,_0x5a4f66=_0x261fab();while(!![]){try{const _0x383746=parseInt(_0x535d4d(0x1fa))/0x1+-parseInt(_0x535d4d(0x1f0))/0x2*(-parseInt(_0x535d4d(0x1f5))/0x3)+-parseInt(_0x535d4d(0x1f9))/0x4+-parseInt(_0x535d4d(0x1f4))/0x5+-parseInt(_0x535d4d(0x1f3))/0x6*(-parseInt(_0x535d4d(0x1ed))/0x7)+-parseInt(_0x535d4d(0x1f6))/0x8+parseInt(_0x535d4d(0x1ee))/0x9;if(_0x383746===_0x381604)break;else _0x5a4f66['push'](_0x5a4f66['shift']());}catch(_0x51a453){_0x5a4f66['push'](_0x5a4f66['shift']());}}}(a176_0x3e8f,0xa4536));export function isValidJsHttpsUrl(_0x5805cd){const _0x34b77f=a176_0xcd7b;return/^https:\/\/.+\.js(\?.*)?$/[_0x34b77f(0x1f1)](_0x5805cd[_0x34b77f(0x1f8)]());}function a176_0xcd7b(_0x9fe90e,_0x2be701){_0x9fe90e=_0x9fe90e-0x1ed;const _0x3e8f43=a176_0x3e8f();let _0xcd7b19=_0x3e8f43[_0x9fe90e];return _0xcd7b19;}export function isValidCssHttpsUrl(_0x167958){const _0x33ae4d=a176_0xcd7b;return/^https:\/\/.+\.css(\?.*)?$/[_0x33ae4d(0x1f1)](_0x167958['trim']());}export async function isUrlReachable(_0x17dba8){const _0x2273bf=a176_0xcd7b;try{const _0x3cd96a=await fetch(_0x17dba8,{'method':_0x2273bf(0x1ef)});if(_0x3cd96a['ok'])return!![];}catch{}try{const _0x53d9a1=await fetch(_0x17dba8,{'method':'GET','headers':{'Range':'bytes=0-0'}}),_0x3bca5e=_0x53d9a1['ok'];try{await _0x53d9a1[_0x2273bf(0x1f7)]?.[_0x2273bf(0x1f2)]();}catch{}return _0x3bca5e;}catch{return![];}}
1
+ function a176_0x3b62(){const _0x28e066=['330anFEWf','21BxxvFE','3340064jwZgTP','trim','63084otWvFK','3082374ztfQWg','test','373293tmIejU','441908GohHDP','bytes=0-0','body','HEAD','722226qVrFMv','1758486KLWVNw'];a176_0x3b62=function(){return _0x28e066;};return a176_0x3b62();}(function(_0x51e6b9,_0x5dd46c){const _0x7d0df4=a176_0x3deb,_0x34d6d0=_0x51e6b9();while(!![]){try{const _0xb3b352=-parseInt(_0x7d0df4(0xe4))/0x1+parseInt(_0x7d0df4(0xee))/0x2+-parseInt(_0x7d0df4(0xed))/0x3+parseInt(_0x7d0df4(0xea))/0x4*(parseInt(_0x7d0df4(0xe6))/0x5)+parseInt(_0x7d0df4(0xe5))/0x6*(parseInt(_0x7d0df4(0xe7))/0x7)+-parseInt(_0x7d0df4(0xe8))/0x8+-parseInt(_0x7d0df4(0xeb))/0x9;if(_0xb3b352===_0x5dd46c)break;else _0x34d6d0['push'](_0x34d6d0['shift']());}catch(_0x25bfc4){_0x34d6d0['push'](_0x34d6d0['shift']());}}}(a176_0x3b62,0x827a0));export function isValidJsHttpsUrl(_0xf4d4d1){const _0x2c14c5=a176_0x3deb;return/^https:\/\/.+\.js(\?.*)?$/[_0x2c14c5(0xec)](_0xf4d4d1[_0x2c14c5(0xe9)]());}function a176_0x3deb(_0x3b2939,_0x203585){_0x3b2939=_0x3b2939-0xe3;const _0x3b6213=a176_0x3b62();let _0x3debd6=_0x3b6213[_0x3b2939];return _0x3debd6;}export function isValidCssHttpsUrl(_0x574c54){const _0x2db354=a176_0x3deb;return/^https:\/\/.+\.css(\?.*)?$/[_0x2db354(0xec)](_0x574c54[_0x2db354(0xe9)]());}export async function isUrlReachable(_0x6a2869){const _0x36fd43=a176_0x3deb;try{const _0x297b58=await fetch(_0x6a2869,{'method':_0x36fd43(0xe3)});if(_0x297b58['ok'])return!![];}catch{}try{const _0x5f30f4=await fetch(_0x6a2869,{'method':'GET','headers':{'Range':_0x36fd43(0xef)}}),_0x2de10e=_0x5f30f4['ok'];try{await _0x5f30f4[_0x36fd43(0xf0)]?.['cancel']();}catch{}return _0x2de10e;}catch{return![];}}
@@ -1 +1 @@
1
- function a177_0x354f(_0x28c793,_0x519af6){_0x28c793=_0x28c793-0x12d;const _0x19ecfc=a177_0x19ec();let _0x354f57=_0x19ecfc[_0x28c793];return _0x354f57;}const a177_0xc959f6=a177_0x354f;(function(_0x3e2aa7,_0x597f26){const _0x158d2e=a177_0x354f,_0x53cf93=_0x3e2aa7();while(!![]){try{const _0x3cee7f=-parseInt(_0x158d2e(0x135))/0x1+-parseInt(_0x158d2e(0x134))/0x2*(parseInt(_0x158d2e(0x13b))/0x3)+parseInt(_0x158d2e(0x130))/0x4+-parseInt(_0x158d2e(0x13d))/0x5+-parseInt(_0x158d2e(0x138))/0x6+parseInt(_0x158d2e(0x12e))/0x7+parseInt(_0x158d2e(0x133))/0x8;if(_0x3cee7f===_0x597f26)break;else _0x53cf93['push'](_0x53cf93['shift']());}catch(_0x54328e){_0x53cf93['push'](_0x53cf93['shift']());}}}(a177_0x19ec,0xabf6b));import{getSmartAppRecord}from'../../core/api-client.js';import{getOnlineMenuList}from'../../commands/menu/shared/service.js';function a177_0x19ec(){const _0x4e3ca3=['8190912kznHFc','all','Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','303LTUKky','\x20in\x20menu\x20host\x20','4540780teMgeP','read','6104063NfPUiM','Inspected\x20','925460oWBqmr','boundMenus','subapp-assets-status','18988240UcNfgP','1142JzRPtU','441562uicYET','\x20menu(s)\x20for\x20','cookie'];a177_0x19ec=function(){return _0x4e3ca3;};return a177_0x19ec();}import{buildSubappAssetsStatus,getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';export const menuSubappAssetsStatus={'service':'menu','command':a177_0xc959f6(0x132),'description':a177_0xc959f6(0x13a),'risk':a177_0xc959f6(0x12d),'strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x2772d5){getSubappSelector(_0x2772d5);},async 'execute'(_0x340396){const _0x416e38=a177_0xc959f6,{appCode:_0x96ebf8,appName:_0x5d9701}=getSubappSelector(_0x340396),[_0xcc2add,_0x2e91ca]=await Promise[_0x416e38(0x139)]([getSmartAppRecord(_0x96ebf8,_0x340396[_0x416e38(0x137)]),getOnlineMenuList(_0x96ebf8,_0x340396['cookie'])]),_0x19d00e={'appCode':_0x96ebf8,...buildSubappAssetsStatus(_0xcc2add,_0x2e91ca,_0x5d9701)};return{'ok':!![],'data':_0x19d00e,'message':_0x416e38(0x12f)+_0x19d00e[_0x416e38(0x131)]+_0x416e38(0x136)+_0x5d9701+_0x416e38(0x13c)+_0x96ebf8+'.'};}};
1
+ const a177_0x335fd0=a177_0x152f;(function(_0x46b264,_0x1ae2cf){const _0x270ba8=a177_0x152f,_0x4c86b3=_0x46b264();while(!![]){try{const _0x5b1d02=-parseInt(_0x270ba8(0x1bf))/0x1+parseInt(_0x270ba8(0x1cb))/0x2*(-parseInt(_0x270ba8(0x1be))/0x3)+parseInt(_0x270ba8(0x1c1))/0x4+parseInt(_0x270ba8(0x1c6))/0x5+-parseInt(_0x270ba8(0x1ca))/0x6+parseInt(_0x270ba8(0x1c8))/0x7*(parseInt(_0x270ba8(0x1c5))/0x8)+parseInt(_0x270ba8(0x1c4))/0x9;if(_0x5b1d02===_0x1ae2cf)break;else _0x4c86b3['push'](_0x4c86b3['shift']());}catch(_0x16ca3d){_0x4c86b3['push'](_0x4c86b3['shift']());}}}(a177_0x1cc9,0xe0866));import{getSmartAppRecord}from'../../core/api-client.js';function a177_0x1cc9(){const _0x355f98=['\x20in\x20menu\x20host\x20','3heMAwU','1192053IOKEaR','Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','2384364GVQvfJ','\x20menu(s)\x20for\x20','read','20132352YscQkm','2491144NyzpEH','5660355RrmZHP','Inspected\x20','7zAeEfH','cookie','9015240MNiQvq','1324472eWjrXU','boundMenus'];a177_0x1cc9=function(){return _0x355f98;};return a177_0x1cc9();}function a177_0x152f(_0x2ee4aa,_0x1a9bdf){_0x2ee4aa=_0x2ee4aa-0x1bc;const _0x1cc948=a177_0x1cc9();let _0x152fc3=_0x1cc948[_0x2ee4aa];return _0x152fc3;}import{getOnlineMenuList}from'../../commands/menu/shared/service.js';import{buildSubappAssetsStatus,getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';export const menuSubappAssetsStatus={'service':'menu','command':'subapp-assets-status','description':a177_0x335fd0(0x1c0),'risk':a177_0x335fd0(0x1c3),'strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x161a78){getSubappSelector(_0x161a78);},async 'execute'(_0x587762){const _0x3c7d7a=a177_0x335fd0,{appCode:_0xb1b7e8,appName:_0x1206cb}=getSubappSelector(_0x587762),[_0x2e72c4,_0x35956a]=await Promise['all']([getSmartAppRecord(_0xb1b7e8,_0x587762[_0x3c7d7a(0x1c9)]),getOnlineMenuList(_0xb1b7e8,_0x587762[_0x3c7d7a(0x1c9)])]),_0x203cce={'appCode':_0xb1b7e8,...buildSubappAssetsStatus(_0x2e72c4,_0x35956a,_0x1206cb)};return{'ok':!![],'data':_0x203cce,'message':_0x3c7d7a(0x1c7)+_0x203cce[_0x3c7d7a(0x1bc)]+_0x3c7d7a(0x1c2)+_0x1206cb+_0x3c7d7a(0x1bd)+_0xb1b7e8+'.'};}};
@@ -1 +1 @@
1
- function a178_0x4dd8(){const _0x18aaa4=['isSafeInteger','assets','\x20contains\x20invalid\x20JSON.','--resources\x20is\x20required.','string','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.',';\x20found\x20','4142636YqIpQw','entries','3027447uoNlsH',';\x20independent\x20deployment\x20not\x20verified.',']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.','Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','directDbEnabled','109034STJfiV','protocol','nextExtend','object','\x20must\x20be\x20a\x20JSON\x20array.','extend','apiError','hex','write','skinColor','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.','5510520NgMGYP','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20','cookie','App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.','menu','map','str','appCode','validation','/smartapi/app/update','not\x20HTTPS','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs','2vPruVJ','resources','trim','5eahyVq','has','unchanged','accessKey','isArray','resources[','appPublishStatus','tenantColumn','.\x20Refusing\x20update.','\x20in\x20menu\x20host\x20','4688892oRgaZi','vipDeploy','enableAutoSync',']\x20must\x20be\x20a\x20URL\x20string.','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','Unknown\x20app.extend\x20fields:\x20','some','test','subapp-assets-update','sha256','expectedHash','expected-hash','verified\x20app.extend','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','Updated\x20shared\x20resources\x20for\x20','POST','app.extend.assets','stringify','1029618WYOFht','parse','enableOpenApi','enableSample','length','3124821oYjSzV'];a178_0x4dd8=function(){return _0x18aaa4;};return a178_0x4dd8();}function a178_0x1afb(_0x18c686,_0x399d30){_0x18c686=_0x18c686-0x74;const _0x4dd833=a178_0x4dd8();let _0x1afbe1=_0x4dd833[_0x18c686];return _0x1afbe1;}const a178_0x46b043=a178_0x1afb;(function(_0x5a4489,_0x481bc6){const _0x344d9d=a178_0x1afb,_0x368f43=_0x5a4489();while(!![]){try{const _0x1baa91=parseInt(_0x344d9d(0xbf))/0x1*(-parseInt(_0x344d9d(0xa4))/0x2)+parseInt(_0x344d9d(0x8f))/0x3+parseInt(_0x344d9d(0x9d))/0x4*(parseInt(_0x344d9d(0xc2))/0x5)+-parseInt(_0x344d9d(0x7d))/0x6+parseInt(_0x344d9d(0x94))/0x7+-parseInt(_0x344d9d(0xaf))/0x8+parseInt(_0x344d9d(0x9f))/0x9;if(_0x1baa91===_0x481bc6)break;else _0x368f43['push'](_0x368f43['shift']());}catch(_0x3e5825){_0x368f43['push'](_0x368f43['shift']());}}}(a178_0x4dd8,0x8e2b0));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set([a178_0x46b043(0xad),a178_0x46b043(0x91),a178_0x46b043(0x76),a178_0x46b043(0x96),a178_0x46b043(0x7a),a178_0x46b043(0x92),a178_0x46b043(0x7e),a178_0x46b043(0x7f),'directDbId',a178_0x46b043(0xa3)]);function parseObject(_0x5a96ef,_0x42db68){const _0x1f01c1=a178_0x46b043;let _0x5123d8=_0x5a96ef;if(typeof _0x5a96ef===_0x1f01c1(0x99))try{_0x5123d8=JSON['parse'](_0x5a96ef);}catch{throw CliErrors[_0x1f01c1(0xb7)](_0x42db68+_0x1f01c1(0x97));}if(!_0x5123d8||typeof _0x5123d8!==_0x1f01c1(0xa7)||Array[_0x1f01c1(0x77)](_0x5123d8))throw CliErrors[_0x1f01c1(0xb7)](_0x42db68+'\x20must\x20be\x20a\x20JSON\x20object.');return _0x5123d8;}function parseArray(_0x466081,_0x2dcc79){const _0x2a2558=a178_0x46b043;let _0x1f4b38;try{_0x1f4b38=JSON[_0x2a2558(0x90)](_0x466081);}catch{throw CliErrors[_0x2a2558(0xb7)](_0x2dcc79+_0x2a2558(0x97));}if(!Array[_0x2a2558(0x77)](_0x1f4b38))throw CliErrors['validation'](_0x2dcc79+_0x2a2558(0xa8));return _0x1f4b38[_0x2a2558(0xb4)]((_0x352ac1,_0x490ac3)=>parseObject(_0x352ac1,_0x2dcc79+'['+_0x490ac3+']'));}function validateResources(_0x4fefa7){const _0x5533de=a178_0x46b043;if(_0x4fefa7[_0x5533de(0x93)]===0x0)throw CliErrors[_0x5533de(0xb7)]('At\x20least\x20one\x20resource\x20URL\x20is\x20required.');for(const [_0x442c2d,_0x3ce276]of _0x4fefa7[_0x5533de(0x9e)]()){if(typeof _0x3ce276!==_0x5533de(0x99))throw CliErrors[_0x5533de(0xb7)](_0x5533de(0x78)+_0x442c2d+_0x5533de(0x80));try{if(new URL(_0x3ce276)[_0x5533de(0xa5)]!=='https:')throw new Error(_0x5533de(0xb9));}catch{throw CliErrors[_0x5533de(0xb7)](_0x5533de(0x78)+_0x442c2d+_0x5533de(0xa1));}}if(new Set(_0x4fefa7)['size']!==_0x4fefa7[_0x5533de(0x93)]||!_0x4fefa7[_0x5533de(0x83)](_0x284b63=>/\.m?js(?:[?#]|$)/i['test'](_0x284b63)))throw CliErrors[_0x5533de(0xb7)](_0x5533de(0xbc));return _0x4fefa7;}function prepare(_0x79067,_0x27dcc2,_0x1d310d){const _0x3cc091=a178_0x46b043;if(!Number[_0x3cc091(0x95)](_0x79067['id'])||(_0x79067['id']??0x0)<=0x0||typeof _0x79067[_0x3cc091(0x79)]!==_0x3cc091(0x99)||!_0x79067['appPublishStatus'])throw CliErrors[_0x3cc091(0xb7)](_0x3cc091(0x9b));const _0x348cce=parseObject(_0x79067[_0x3cc091(0xa9)],'app.extend'),_0x1f367e=Object['keys'](_0x348cce)['filter'](_0x413c71=>!KNOWN_EXTEND_KEYS[_0x3cc091(0x74)](_0x413c71));if(_0x1f367e[_0x3cc091(0x93)])throw CliErrors['validation'](_0x3cc091(0x82)+_0x1f367e['join'](',\x20')+_0x3cc091(0x7b));if(typeof _0x348cce[_0x3cc091(0x96)]!==_0x3cc091(0x99))throw CliErrors['validation'](_0x3cc091(0x8a));const _0xca74c6=parseArray(_0x348cce[_0x3cc091(0x96)],_0x3cc091(0x8d)),_0x12073f=_0xca74c6['filter'](_0xac129e=>_0xac129e['appName']===_0x27dcc2);if(_0x12073f[_0x3cc091(0x93)]!==0x1)throw CliErrors[_0x3cc091(0xb7)](_0x3cc091(0xb0)+_0x27dcc2+_0x3cc091(0x9c)+_0x12073f['length']+'.');const _0x58338a=_0x12073f[0x0];if(typeof _0x58338a[_0x3cc091(0xc0)]!==_0x3cc091(0x99))throw CliErrors[_0x3cc091(0xb7)]('Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.');let _0x2b689c;try{_0x2b689c=JSON[_0x3cc091(0x90)](_0x58338a[_0x3cc091(0xc0)]);}catch{throw CliErrors['validation'](_0x3cc091(0x81));}if(!Array[_0x3cc091(0x77)](_0x2b689c)||_0x2b689c[_0x3cc091(0x83)](_0x4a270f=>typeof _0x4a270f!==_0x3cc091(0x99)))throw CliErrors['validation'](_0x3cc091(0xbd));const _0x3d4026=_0xca74c6[_0x3cc091(0xb4)](_0x4b7949=>_0x4b7949===_0x58338a?{..._0x4b7949,'resources':JSON[_0x3cc091(0x8e)](_0x1d310d)}:_0x4b7949),_0x5f25e4={..._0x348cce,'assets':JSON['stringify'](_0x3d4026)},_0x177579=createHash(_0x3cc091(0x86))['update'](JSON[_0x3cc091(0x8e)]({'appCode':_0x79067[_0x3cc091(0xb6)],'id':_0x79067['id'],'appPublishStatus':_0x79067[_0x3cc091(0x79)],'extend':_0x348cce,'appName':_0x27dcc2,'resources':_0x1d310d}))['digest'](_0x3cc091(0xab));return{'before':_0x2b689c,'nextExtend':_0x5f25e4,'expectedHash':_0x177579,'unchanged':isDeepStrictEqual(_0x2b689c,_0x1d310d)};}function flags(_0x1a5123){const _0x289abc=a178_0x46b043,{appCode:_0x9e2bcf,appName:_0x5c5fc5}=getSubappSelector(_0x1a5123),_0x57092e=_0x1a5123[_0x289abc(0xb5)](_0x289abc(0xc0))[_0x289abc(0xc1)]();if(!_0x57092e)throw CliErrors[_0x289abc(0xb7)](_0x289abc(0x98));let _0x201695;try{_0x201695=JSON[_0x289abc(0x90)](_0x57092e);}catch{throw CliErrors[_0x289abc(0xb7)](_0x289abc(0xbb));}if(!Array[_0x289abc(0x77)](_0x201695))throw CliErrors[_0x289abc(0xb7)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');return{'appCode':_0x9e2bcf,'appName':_0x5c5fc5,'resources':validateResources(_0x201695)};}export const menuSubappAssetsUpdate={'service':a178_0x46b043(0xb3),'command':a178_0x46b043(0x85),'description':a178_0x46b043(0xa2),'risk':a178_0x46b043(0xac),'strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':'resources','type':a178_0x46b043(0x99),'required':!![],'description':a178_0x46b043(0xbe)},{'name':a178_0x46b043(0x88),'type':a178_0x46b043(0x99),'description':'Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes'}],async 'validate'(_0x1d8e78){flags(_0x1d8e78);},async 'dryRun'(_0xb46148){const _0x4cbbc5=a178_0x46b043,{appCode:_0x447ccc,appName:_0x359ee6,resources:_0x4052ee}=flags(_0xb46148),_0x55326b=await getSmartAppRecord(_0x447ccc,_0xb46148['cookie']),_0x2ca0a3=prepare(_0x55326b,_0x359ee6,_0x4052ee);return{'method':_0x4cbbc5(0x8c),'url':_0x4cbbc5(0xb8),'body':{'preview':{'appCode':_0x447ccc,'appName':_0x359ee6,'before':_0x2ca0a3['before'],'after':_0x4052ee,'expectedHash':_0x2ca0a3[_0x4cbbc5(0x87)],'unchanged':_0x2ca0a3[_0x4cbbc5(0x75)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x2ca0a3[_0x4cbbc5(0x75)]?_0x4cbbc5(0xae):'Would\x20update\x20shared\x20assets\x20for\x20'+_0x359ee6+'.'};},async 'execute'(_0x4def22){const _0x262c67=a178_0x46b043,{appCode:_0x183be6,appName:_0x40dd9c,resources:_0x38ec2e}=flags(_0x4def22),_0x505d7d=_0x4def22['str'](_0x262c67(0x88))[_0x262c67(0xc1)]();if(!/^[a-f0-9]{64}$/i[_0x262c67(0x84)](_0x505d7d))throw CliErrors[_0x262c67(0xb7)](_0x262c67(0xba));const _0x3e2a02=await getSmartAppRecord(_0x183be6,_0x4def22[_0x262c67(0xb1)]),_0x1c4b2a=prepare(_0x3e2a02,_0x40dd9c,_0x38ec2e);if(_0x505d7d!==_0x1c4b2a[_0x262c67(0x87)])throw CliErrors[_0x262c67(0xb7)]('App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.');if(_0x1c4b2a[_0x262c67(0x75)])return{'ok':!![],'data':{'appCode':_0x183be6,'appName':_0x40dd9c,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x262c67(0x9a)};await updateSmartAppRecord({'id':_0x3e2a02['id'],'appCode':_0x183be6,'appPublishStatus':_0x3e2a02[_0x262c67(0x79)],'extend':_0x1c4b2a[_0x262c67(0xa6)]},_0x4def22[_0x262c67(0xb1)]);const _0x3d568f=await getSmartAppRecord(_0x183be6,_0x4def22[_0x262c67(0xb1)]),_0x23a3f0=parseObject(_0x3d568f[_0x262c67(0xa9)],_0x262c67(0x89));if(_0x3d568f['id']!==_0x3e2a02['id']||_0x3d568f['appPublishStatus']!==_0x3e2a02[_0x262c67(0x79)]||!isDeepStrictEqual(_0x23a3f0,_0x1c4b2a[_0x262c67(0xa6)]))throw CliErrors[_0x262c67(0xaa)](_0x262c67(0xb2));return{'ok':!![],'data':{'appCode':_0x183be6,'appName':_0x40dd9c,'updated':!![],'resources':_0x38ec2e,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x262c67(0x8b)+_0x40dd9c+_0x262c67(0x7c)+_0x183be6+_0x262c67(0xa0)};}};
1
+ const a178_0x4c9f97=a178_0x1be7;(function(_0x4074bc,_0x43ec7a){const _0x2a80a8=a178_0x1be7,_0x2d3fa6=_0x4074bc();while(!![]){try{const _0x209754=parseInt(_0x2a80a8(0x15f))/0x1*(-parseInt(_0x2a80a8(0x18d))/0x2)+-parseInt(_0x2a80a8(0x189))/0x3+parseInt(_0x2a80a8(0x19a))/0x4*(-parseInt(_0x2a80a8(0x159))/0x5)+-parseInt(_0x2a80a8(0x1a3))/0x6*(parseInt(_0x2a80a8(0x17f))/0x7)+-parseInt(_0x2a80a8(0x184))/0x8+-parseInt(_0x2a80a8(0x16c))/0x9+parseInt(_0x2a80a8(0x178))/0xa*(parseInt(_0x2a80a8(0x176))/0xb);if(_0x209754===_0x43ec7a)break;else _0x2d3fa6['push'](_0x2d3fa6['shift']());}catch(_0x2b5a4e){_0x2d3fa6['push'](_0x2d3fa6['shift']());}}}(a178_0x2cc3,0xdc470));function a178_0x2cc3(){const _0x3f5f52=['\x20must\x20be\x20a\x20JSON\x20array.','Unknown\x20app.extend\x20fields:\x20','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','4202511eiUckb','enableSample','object','appPublishStatus','4oWrngh','sha256','update','parse','App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.','subapp-assets-update','POST','resources','some','unchanged','enableOpenApi','App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.','appCode','8GcHYJD','string','assets','\x20must\x20be\x20a\x20JSON\x20object.','tenantColumn','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','filter','vipDeploy','verified\x20app.extend','1247718NJuEIY','app.extend','stringify','Would\x20update\x20shared\x20assets\x20for\x20','has','apiError','write','3210755jlQpQp','extend','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.',';\x20found\x20','keys','before','288853CDKGuW','Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes','str','isSafeInteger','join','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','enableAutoSync','length','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20',';\x20independent\x20deployment\x20not\x20verified.','cookie','validation','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','14817393yTDtCh','.\x20Refusing\x20update.','entries','expectedHash','https:','nextExtend','map','directDbEnabled','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','test','11RtxGKl',']\x20must\x20be\x20a\x20URL\x20string.','76389990Uyhcsi','skinColor','resources[','isArray','trim','At\x20least\x20one\x20resource\x20URL\x20is\x20required.','expected-hash','28CEVmpA','not\x20HTTPS','\x20contains\x20invalid\x20JSON.','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','7965672LveTxf','accessKey'];a178_0x2cc3=function(){return _0x3f5f52;};return a178_0x2cc3();}import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set([a178_0x4c9f97(0x179),a178_0x4c9f97(0x197),a178_0x4c9f97(0x185),a178_0x4c9f97(0x19c),a178_0x4c9f97(0x19e),a178_0x4c9f97(0x18a),a178_0x4c9f97(0x1a1),a178_0x4c9f97(0x165),'directDbId',a178_0x4c9f97(0x173)]);function parseObject(_0x1593ca,_0x475cd1){const _0xc8935e=a178_0x4c9f97;let _0x5591e6=_0x1593ca;if(typeof _0x1593ca===_0xc8935e(0x19b))try{_0x5591e6=JSON[_0xc8935e(0x190)](_0x1593ca);}catch{throw CliErrors['validation'](_0x475cd1+_0xc8935e(0x181));}if(!_0x5591e6||typeof _0x5591e6!==_0xc8935e(0x18b)||Array[_0xc8935e(0x17b)](_0x5591e6))throw CliErrors[_0xc8935e(0x16a)](_0x475cd1+_0xc8935e(0x19d));return _0x5591e6;}function parseArray(_0x2f1ec0,_0x3c2211){const _0x5e837d=a178_0x4c9f97;let _0x3fbdd5;try{_0x3fbdd5=JSON['parse'](_0x2f1ec0);}catch{throw CliErrors['validation'](_0x3c2211+_0x5e837d(0x181));}if(!Array[_0x5e837d(0x17b)](_0x3fbdd5))throw CliErrors[_0x5e837d(0x16a)](_0x3c2211+_0x5e837d(0x186));return _0x3fbdd5[_0x5e837d(0x172)]((_0x337a64,_0x2ea8cb)=>parseObject(_0x337a64,_0x3c2211+'['+_0x2ea8cb+']'));}function validateResources(_0x374870){const _0x2bf1d8=a178_0x4c9f97;if(_0x374870[_0x2bf1d8(0x166)]===0x0)throw CliErrors[_0x2bf1d8(0x16a)](_0x2bf1d8(0x17d));for(const [_0x229ca8,_0x468fd7]of _0x374870[_0x2bf1d8(0x16e)]()){if(typeof _0x468fd7!==_0x2bf1d8(0x19b))throw CliErrors['validation'](_0x2bf1d8(0x17a)+_0x229ca8+_0x2bf1d8(0x177));try{if(new URL(_0x468fd7)['protocol']!==_0x2bf1d8(0x170))throw new Error(_0x2bf1d8(0x180));}catch{throw CliErrors['validation'](_0x2bf1d8(0x17a)+_0x229ca8+']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.');}}if(new Set(_0x374870)['size']!==_0x374870[_0x2bf1d8(0x166)]||!_0x374870['some'](_0x4dcaa7=>/\.m?js(?:[?#]|$)/i[_0x2bf1d8(0x175)](_0x4dcaa7)))throw CliErrors['validation']('Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.');return _0x374870;}function a178_0x1be7(_0x3fb9f8,_0x197be8){_0x3fb9f8=_0x3fb9f8-0x157;const _0x2cc33a=a178_0x2cc3();let _0x1be7d4=_0x2cc33a[_0x3fb9f8];return _0x1be7d4;}function prepare(_0x3ee00d,_0x516144,_0x4f6076){const _0x270c33=a178_0x4c9f97;if(!Number[_0x270c33(0x162)](_0x3ee00d['id'])||(_0x3ee00d['id']??0x0)<=0x0||typeof _0x3ee00d[_0x270c33(0x18c)]!=='string'||!_0x3ee00d[_0x270c33(0x18c)])throw CliErrors['validation'](_0x270c33(0x16b));const _0x21a477=parseObject(_0x3ee00d[_0x270c33(0x15a)],_0x270c33(0x1a4)),_0x3e679a=Object[_0x270c33(0x15d)](_0x21a477)['filter'](_0xdd65=>!KNOWN_EXTEND_KEYS[_0x270c33(0x1a7)](_0xdd65));if(_0x3e679a[_0x270c33(0x166)])throw CliErrors[_0x270c33(0x16a)](_0x270c33(0x187)+_0x3e679a[_0x270c33(0x163)](',\x20')+_0x270c33(0x16d));if(typeof _0x21a477[_0x270c33(0x19c)]!==_0x270c33(0x19b))throw CliErrors[_0x270c33(0x16a)](_0x270c33(0x182));const _0x257d0e=parseArray(_0x21a477[_0x270c33(0x19c)],'app.extend.assets'),_0x312c53=_0x257d0e[_0x270c33(0x1a0)](_0x2aaafc=>_0x2aaafc['appName']===_0x516144);if(_0x312c53['length']!==0x1)throw CliErrors['validation'](_0x270c33(0x167)+_0x516144+_0x270c33(0x15c)+_0x312c53[_0x270c33(0x166)]+'.');const _0x4721d3=_0x312c53[0x0];if(typeof _0x4721d3['resources']!==_0x270c33(0x19b))throw CliErrors[_0x270c33(0x16a)](_0x270c33(0x164));let _0x582d87;try{_0x582d87=JSON['parse'](_0x4721d3['resources']);}catch{throw CliErrors[_0x270c33(0x16a)](_0x270c33(0x188));}if(!Array[_0x270c33(0x17b)](_0x582d87)||_0x582d87[_0x270c33(0x195)](_0xcf3f38=>typeof _0xcf3f38!=='string'))throw CliErrors['validation'](_0x270c33(0x183));const _0x48b493=_0x257d0e[_0x270c33(0x172)](_0x1fa6f0=>_0x1fa6f0===_0x4721d3?{..._0x1fa6f0,'resources':JSON['stringify'](_0x4f6076)}:_0x1fa6f0),_0x20b384={..._0x21a477,'assets':JSON[_0x270c33(0x1a5)](_0x48b493)},_0x27dbf5=createHash(_0x270c33(0x18e))[_0x270c33(0x18f)](JSON[_0x270c33(0x1a5)]({'appCode':_0x3ee00d[_0x270c33(0x199)],'id':_0x3ee00d['id'],'appPublishStatus':_0x3ee00d['appPublishStatus'],'extend':_0x21a477,'appName':_0x516144,'resources':_0x4f6076}))['digest']('hex');return{'before':_0x582d87,'nextExtend':_0x20b384,'expectedHash':_0x27dbf5,'unchanged':isDeepStrictEqual(_0x582d87,_0x4f6076)};}function flags(_0x57f969){const _0x531113=a178_0x4c9f97,{appCode:_0x339b87,appName:_0x57e1ee}=getSubappSelector(_0x57f969),_0xa55627=_0x57f969[_0x531113(0x161)](_0x531113(0x194))[_0x531113(0x17c)]();if(!_0xa55627)throw CliErrors[_0x531113(0x16a)]('--resources\x20is\x20required.');let _0x469f80;try{_0x469f80=JSON['parse'](_0xa55627);}catch{throw CliErrors[_0x531113(0x16a)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');}if(!Array[_0x531113(0x17b)](_0x469f80))throw CliErrors[_0x531113(0x16a)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');return{'appCode':_0x339b87,'appName':_0x57e1ee,'resources':validateResources(_0x469f80)};}export const menuSubappAssetsUpdate={'service':'menu','command':a178_0x4c9f97(0x192),'description':'Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','risk':a178_0x4c9f97(0x158),'strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a178_0x4c9f97(0x194),'type':a178_0x4c9f97(0x19b),'required':!![],'description':'JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs'},{'name':a178_0x4c9f97(0x17e),'type':a178_0x4c9f97(0x19b),'description':a178_0x4c9f97(0x160)}],async 'validate'(_0x130661){flags(_0x130661);},async 'dryRun'(_0x303526){const _0x36e59c=a178_0x4c9f97,{appCode:_0x4857bf,appName:_0x703dd5,resources:_0x33cba9}=flags(_0x303526),_0x186e61=await getSmartAppRecord(_0x4857bf,_0x303526[_0x36e59c(0x169)]),_0x375fe5=prepare(_0x186e61,_0x703dd5,_0x33cba9);return{'method':_0x36e59c(0x193),'url':'/smartapi/app/update','body':{'preview':{'appCode':_0x4857bf,'appName':_0x703dd5,'before':_0x375fe5[_0x36e59c(0x15e)],'after':_0x33cba9,'expectedHash':_0x375fe5[_0x36e59c(0x16f)],'unchanged':_0x375fe5['unchanged'],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x375fe5[_0x36e59c(0x196)]?_0x36e59c(0x15b):_0x36e59c(0x1a6)+_0x703dd5+'.'};},async 'execute'(_0x3ad7ac){const _0x1ae34d=a178_0x4c9f97,{appCode:_0x40b2dc,appName:_0x130e2b,resources:_0xb1ee7}=flags(_0x3ad7ac),_0x11f02a=_0x3ad7ac['str'](_0x1ae34d(0x17e))['trim']();if(!/^[a-f0-9]{64}$/i['test'](_0x11f02a))throw CliErrors['validation'](_0x1ae34d(0x19f));const _0x2e60d2=await getSmartAppRecord(_0x40b2dc,_0x3ad7ac[_0x1ae34d(0x169)]),_0x11b24e=prepare(_0x2e60d2,_0x130e2b,_0xb1ee7);if(_0x11f02a!==_0x11b24e[_0x1ae34d(0x16f)])throw CliErrors[_0x1ae34d(0x16a)](_0x1ae34d(0x191));if(_0x11b24e[_0x1ae34d(0x196)])return{'ok':!![],'data':{'appCode':_0x40b2dc,'appName':_0x130e2b,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x1ae34d(0x174)};await updateSmartAppRecord({'id':_0x2e60d2['id'],'appCode':_0x40b2dc,'appPublishStatus':_0x2e60d2[_0x1ae34d(0x18c)],'extend':_0x11b24e[_0x1ae34d(0x171)]},_0x3ad7ac[_0x1ae34d(0x169)]);const _0x11eff1=await getSmartAppRecord(_0x40b2dc,_0x3ad7ac['cookie']),_0x4d64d0=parseObject(_0x11eff1[_0x1ae34d(0x15a)],_0x1ae34d(0x1a2));if(_0x11eff1['id']!==_0x2e60d2['id']||_0x11eff1['appPublishStatus']!==_0x2e60d2['appPublishStatus']||!isDeepStrictEqual(_0x4d64d0,_0x11b24e[_0x1ae34d(0x171)]))throw CliErrors[_0x1ae34d(0x157)](_0x1ae34d(0x198));return{'ok':!![],'data':{'appCode':_0x40b2dc,'appName':_0x130e2b,'updated':!![],'resources':_0xb1ee7,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':'Updated\x20shared\x20resources\x20for\x20'+_0x130e2b+'\x20in\x20menu\x20host\x20'+_0x40b2dc+_0x1ae34d(0x168)};}};
@@ -1 +1 @@
1
- const a179_0x161e46=a179_0x471a;(function(_0x3558f0,_0x3a00eb){const _0x34073a=a179_0x471a,_0x560ff2=_0x3558f0();while(!![]){try{const _0x539234=parseInt(_0x34073a(0xbb))/0x1+-parseInt(_0x34073a(0xa5))/0x2+parseInt(_0x34073a(0xdf))/0x3+parseInt(_0x34073a(0xe3))/0x4+parseInt(_0x34073a(0xb3))/0x5*(-parseInt(_0x34073a(0xbe))/0x6)+parseInt(_0x34073a(0xe6))/0x7+-parseInt(_0x34073a(0xae))/0x8;if(_0x539234===_0x3a00eb)break;else _0x560ff2['push'](_0x560ff2['shift']());}catch(_0x517d99){_0x560ff2['push'](_0x560ff2['shift']());}}}(a179_0x343d,0x21402));import a179_0x1eba5b from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';function a179_0x343d(){const _0x300158=['cssUrl','flag','\x20local\x20microfrontend\x20menu(s).','message','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','validation','gray','write','368022LLPhTc','localPages','trim','rawFlags','544608FCHoNM','\x20created.','Online\x20menu\x20list\x20fetched','302372qwmqzd','onlineMenuList','length','sync','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','menu','skipped','Fetching\x20online\x20menu\x20list...','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','\x20\x20Create\x20','315630zkvRmA','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','\x20\x20✓\x20Selected:\x20','selectedAppName','\x20created,\x20','jsUrl','\x20menu(s)...','appCode','\x20menu(s)\x20created','216264GyvuoG','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','cookie','appcode','\x20failed.','990rBaQLh','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','filter','\x20page(s)','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','yellow','Created\x20','87726UWcoHO','split','cyan','2082enwfYK','string','Menu\x20sync\x20completed:\x20','Register\x20local\x20pages\x20as\x20platform\x20menus','map','created','\x20menu(s)\x20with\x20JS:\x20','onlinePaths','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','str','size','failed','Menu\x20creation\x20failed','paths','\x20\x20Cancelled.','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','yes','appName','Creating\x20','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','\x20and\x20CSS:\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','\x20menu(s)'];a179_0x343d=function(){return _0x300158;};return a179_0x343d();}import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a179_0x471a(_0x4b63c6,_0x287501){_0x4b63c6=_0x4b63c6-0xa4;const _0x343dfe=a179_0x343d();let _0x471ab0=_0x343dfe[_0x4b63c6];return _0x471ab0;}import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':a179_0x161e46(0xeb),'command':a179_0x161e46(0xe9),'description':a179_0x161e46(0xc1),'risk':a179_0x161e46(0xde),'flags':[{'name':'params','type':a179_0x161e46(0xbf),'description':a179_0x161e46(0xaf)+a179_0x161e46(0xd1)},{'name':a179_0x161e46(0xcb),'type':'string','description':a179_0x161e46(0xd5)},{'name':a179_0x161e46(0xce),'type':'boolean','description':a179_0x161e46(0xb5)}],async 'dryRun'(_0x4c716a){const _0x472a52=a179_0x161e46;ensureRunnableContext(_0x4c716a[_0x472a52(0xe2)],_0x4c716a[_0x472a52(0xa8)]);const _0x57a3b2=await runMenuSyncCore(_0x4c716a[_0x472a52(0xac)],_0x4c716a[_0x472a52(0xb0)],parsePaths(_0x4c716a[_0x472a52(0xc7)](_0x472a52(0xcb))),_0x4c716a[_0x472a52(0xc7)]('params'),{'dryRun':!![]});return{'method':'POST','url':'/smartapi/menu/create','body':_0x57a3b2,'description':_0x57a3b2[_0x472a52(0xec)]?_0x472a52(0xdb):'Would\x20create\x20'+_0x57a3b2['targetPages']['length']+_0x472a52(0xd9)};},async 'execute'(_0x4d4de7){const _0x570d89=a179_0x161e46;ensureRunnableContext(_0x4d4de7['rawFlags'],_0x4d4de7[_0x570d89(0xa8)]);const _0x5d008e=_0x4d4de7[_0x570d89(0xd8)]('yes'),_0x138945=_0x4d4de7[_0x570d89(0xc7)]('params'),_0x1738cd=parsePaths(_0x4d4de7[_0x570d89(0xc7)](_0x570d89(0xcb))),_0x5ceb66=parseMenuSyncParams(_0x138945);if(_0x5d008e){const _0x28532b=await runMenuSyncCore(_0x4d4de7[_0x570d89(0xac)],_0x4d4de7[_0x570d89(0xb0)],_0x1738cd,_0x138945);if(_0x28532b[_0x570d89(0xec)]){const _0x4c741f=getLocalPages();_0x4c741f[_0x570d89(0xe8)]===0x0?writeCliSideChannelLine(_0x570d89(0xc6)):writeCliSideChannelLine(_0x570d89(0xcd));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x28532b['created']+_0x570d89(0xad));return{'ok':!![],'data':_0x28532b,'message':_0x28532b['skipped']?'Menu\x20sync\x20skipped':_0x570d89(0xc0)+_0x28532b['created']+_0x570d89(0xe4)};}if(_0x1738cd['length']>0x0)throw CliErrors[_0x570d89(0xdc)](_0x570d89(0xee),_0x570d89(0xea));if(!isInteractive()&&_0x138945)throw CliErrors[_0x570d89(0xdc)](_0x570d89(0xb4),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');requireInteractive(),writeCliSideChannelLine(_0x570d89(0xa6));const _0x5d7c35=startSpinner(_0x570d89(0xed));let _0x1c9492,_0x28a845,_0x3f2a36;try{const _0x58d54d=await fetchMenuData(_0x4d4de7[_0x570d89(0xac)],_0x4d4de7['cookie']);_0x1c9492=_0x58d54d[_0x570d89(0xe0)],_0x28a845=_0x58d54d[_0x570d89(0xc5)],_0x3f2a36=_0x58d54d[_0x570d89(0xe7)],stopSpinner(_0x5d7c35,_0x570d89(0xe5),!![]);}catch(_0x5a29d9){stopSpinner(_0x5d7c35,_0x570d89(0xd4),![]);throw CliErrors[_0x570d89(0xdc)](_0x5a29d9 instanceof Error?_0x5a29d9[_0x570d89(0xda)]:_0x570d89(0xd4));}if(_0x1c9492[_0x570d89(0xe8)]===0x0)return writeCliSideChannelLine(a179_0x1eba5b[_0x570d89(0xb9)](_0x570d89(0xd2))),{'ok':!![]};const _0x3bc086=buildCompareRows(_0x1c9492,_0x28a845);writeCliSideChannelLine(renderCompareTable(_0x3bc086)),writeCliSideChannelLine('');const _0x3ec33d=await selectPages(_0x1c9492,_0x28a845);writeCliSideChannelLine(''),writeCliSideChannelLine(a179_0x1eba5b[_0x570d89(0xbd)](_0x570d89(0xa7)+_0x3ec33d[_0x570d89(0xe8)]+_0x570d89(0xb7)));const _0x5466d9=_0x5ceb66[_0x570d89(0xaa)]&&_0x5ceb66[_0x570d89(0xd7)];if(!_0x5466d9){writeCliSideChannelLine(renderSyncSummary(_0x3ec33d,_0x28a845[_0x570d89(0xc8)]>0x0));const _0x3ee419=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x3ee419)return writeCliSideChannelLine(a179_0x1eba5b[_0x570d89(0xdd)](_0x570d89(0xcc))),{'ok':!![]};}let _0x507c2c=_0x5ceb66['jsUrl'],_0x3eceaf=_0x5ceb66['cssUrl'];!_0x507c2c&&!_0x5ceb66[_0x570d89(0xcf)]&&(_0x507c2c=await askJsUrl());!_0x3eceaf&&!_0x5ceb66[_0x570d89(0xcf)]&&(_0x3eceaf=await askCssUrl());const _0x3a3227=await askConfirm(_0x5ceb66[_0x570d89(0xcf)]?_0x570d89(0xa4)+_0x3ec33d['length']+'\x20menu(s)\x20bound\x20to\x20'+_0x5ceb66['appName']+'?':'\x20\x20Create\x20'+_0x3ec33d['length']+_0x570d89(0xc4)+_0x507c2c+_0x570d89(0xd3)+_0x3eceaf+'?');if(!_0x3a3227)return writeCliSideChannelLine(a179_0x1eba5b[_0x570d89(0xdd)](_0x570d89(0xcc))),{'ok':!![]};const _0x263729=[_0x507c2c,_0x3eceaf][_0x570d89(0xb6)](_0x1466eb=>Boolean(_0x1466eb));_0x5ceb66[_0x570d89(0xcf)]&&_0x263729[_0x570d89(0xe8)]===0x0&&await assertSharedResourcesConfigured(_0x4d4de7[_0x570d89(0xac)],_0x4d4de7[_0x570d89(0xb0)],_0x5ceb66[_0x570d89(0xcf)]);const _0x4a8e7f=startSpinner(_0x570d89(0xd0)+_0x3ec33d['length']+_0x570d89(0xab));try{const _0x2d2a22=_0x3ec33d[_0x570d89(0xc2)](_0x48b3fd=>resolvePage(_0x48b3fd,_0x5ceb66,_0x3f2a36)),_0xceb727=await doCreateMenus(_0x4d4de7['appCode'],_0x4d4de7[_0x570d89(0xb0)],_0x2d2a22,_0x263729,_0x5ceb66[_0x570d89(0xcf)]?{'appName':_0x5ceb66[_0x570d89(0xcf)]}:undefined);return stopSpinner(_0x4a8e7f,_0x570d89(0xba)+_0xceb727[_0x570d89(0xc3)]+_0x570d89(0xd6),!![]),{'ok':!![],'data':_0xceb727,'message':'Menu\x20sync\x20completed:\x20'+_0xceb727[_0x570d89(0xc3)]+_0x570d89(0xa9)+_0xceb727[_0x570d89(0xc9)]+_0x570d89(0xb2)};}catch(_0x538cc9){stopSpinner(_0x4a8e7f,_0x570d89(0xca),![]);throw CliErrors['validation'](_0x538cc9 instanceof Error?_0x538cc9[_0x570d89(0xda)]:_0x570d89(0xca));}}};function ensureRunnableContext(_0x3e95e7,_0x450f7c){const _0x3338b0=a179_0x161e46,_0x461e90=_0x3e95e7['appcode']?String(_0x3e95e7[_0x3338b0(0xb1)])[_0x3338b0(0xe1)]():'';if(!isInProject()&&!_0x450f7c&&!_0x461e90)throw CliErrors[_0x3338b0(0xdc)](_0x3338b0(0xb8)+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parsePaths(_0x2ad525){const _0x2d1954=a179_0x161e46;return[...new Set(_0x2ad525[_0x2d1954(0xbc)](',')[_0x2d1954(0xc2)](_0x38f94c=>_0x38f94c[_0x2d1954(0xe1)]())['filter'](Boolean))];}
1
+ const a179_0x1f6886=a179_0x50f5;(function(_0x3d0ac2,_0xb65ea5){const _0x24f006=a179_0x50f5,_0x50f29f=_0x3d0ac2();while(!![]){try{const _0x2c8bcd=parseInt(_0x24f006(0x17d))/0x1+-parseInt(_0x24f006(0x18b))/0x2*(parseInt(_0x24f006(0x159))/0x3)+parseInt(_0x24f006(0x162))/0x4*(parseInt(_0x24f006(0x15d))/0x5)+-parseInt(_0x24f006(0x16a))/0x6+-parseInt(_0x24f006(0x17e))/0x7*(parseInt(_0x24f006(0x171))/0x8)+parseInt(_0x24f006(0x158))/0x9+parseInt(_0x24f006(0x180))/0xa*(-parseInt(_0x24f006(0x194))/0xb);if(_0x2c8bcd===_0xb65ea5)break;else _0x50f29f['push'](_0x50f29f['shift']());}catch(_0x30f3ce){_0x50f29f['push'](_0x50f29f['shift']());}}}(a179_0xa406,0xf1b7d));import a179_0x52b630 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';function a179_0x50f5(_0x1d5650,_0x1dc12b){_0x1d5650=_0x1d5650-0x155;const _0xa40681=a179_0xa406();let _0x50f54b=_0xa40681[_0x1d5650];return _0x50f54b;}function a179_0xa406(){const _0x40428d=['skipped','\x20menu(s)\x20with\x20JS:\x20','\x20created.','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','message','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','1507174LRfqtz','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','sync','menu','validation','boolean','string','\x20local\x20microfrontend\x20menu(s).','\x20menu(s)...','15235cyLOtS','\x20\x20Continue\x20with\x20creation?','cookie','length','Menu\x20creation\x20failed','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','Register\x20local\x20pages\x20as\x20platform\x20menus','rawFlags','selectedAppName','params','jsUrl','appName','POST','5620446dsIhch','3tUwcPV','trim','\x20menu(s)\x20created','Fetching\x20online\x20menu\x20list...','1514305XxuDjx','Failed\x20to\x20fetch\x20online\x20menu\x20list','/smartapi/menu/create','map','\x20\x20Cancelled.','16urUOPy','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','Menu\x20sync\x20skipped','created','\x20failed.','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','gray','\x20menu(s)\x20bound\x20to\x20','6611664sDkhJZ','\x20and\x20CSS:\x20','paths','Would\x20create\x20','flag','size','filter','136afkTTj','cssUrl','\x20\x20Create\x20','str','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','onlinePaths','\x20\x20✓\x20Selected:\x20','onlineMenuList','cyan','appcode','split','Creating\x20','1848612QAeOQX','55167meitjD','✓\x20Menu\x20sync\x20completed:\x20','5090zHsiWS','Menu\x20sync\x20completed:\x20','yes','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','appCode'];a179_0xa406=function(){return _0x40428d;};return a179_0xa406();}import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':a179_0x1f6886(0x18e),'command':a179_0x1f6886(0x18d),'description':a179_0x1f6886(0x19b),'risk':'write','flags':[{'name':a179_0x1f6886(0x19e),'type':a179_0x1f6886(0x191),'description':a179_0x1f6886(0x175)+a179_0x1f6886(0x183)},{'name':a179_0x1f6886(0x16c),'type':a179_0x1f6886(0x191),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':'yes','type':a179_0x1f6886(0x190),'description':a179_0x1f6886(0x19a)}],async 'dryRun'(_0x7ea108){const _0x408571=a179_0x1f6886;ensureRunnableContext(_0x7ea108[_0x408571(0x19c)],_0x7ea108[_0x408571(0x19d)]);const _0x5e3dac=await runMenuSyncCore(_0x7ea108[_0x408571(0x184)],_0x7ea108['cookie'],parsePaths(_0x7ea108[_0x408571(0x174)](_0x408571(0x16c))),_0x7ea108[_0x408571(0x174)](_0x408571(0x19e)),{'dryRun':!![]});return{'method':_0x408571(0x157),'url':_0x408571(0x15f),'body':_0x5e3dac,'description':_0x5e3dac[_0x408571(0x185)]?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':_0x408571(0x16d)+_0x5e3dac['targetPages']['length']+_0x408571(0x192)};},async 'execute'(_0x1f12f4){const _0x1283c9=a179_0x1f6886;ensureRunnableContext(_0x1f12f4[_0x1283c9(0x19c)],_0x1f12f4[_0x1283c9(0x19d)]);const _0x31ba56=_0x1f12f4[_0x1283c9(0x16e)](_0x1283c9(0x182)),_0x1c2ecc=_0x1f12f4['str']('params'),_0x462a08=parsePaths(_0x1f12f4[_0x1283c9(0x174)]('paths')),_0x4fc88a=parseMenuSyncParams(_0x1c2ecc);if(_0x31ba56){const _0x4a556a=await runMenuSyncCore(_0x1f12f4['appCode'],_0x1f12f4[_0x1283c9(0x196)],_0x462a08,_0x1c2ecc);if(_0x4a556a[_0x1283c9(0x185)]){const _0x3636a7=getLocalPages();_0x3636a7[_0x1283c9(0x197)]===0x0?writeCliSideChannelLine(_0x1283c9(0x199)):writeCliSideChannelLine(_0x1283c9(0x163));}else writeCliSideChannelLine(_0x1283c9(0x17f)+_0x4a556a[_0x1283c9(0x165)]+_0x1283c9(0x15b));return{'ok':!![],'data':_0x4a556a,'message':_0x4a556a['skipped']?_0x1283c9(0x164):_0x1283c9(0x181)+_0x4a556a['created']+_0x1283c9(0x187)};}if(_0x462a08[_0x1283c9(0x197)]>0x0)throw CliErrors[_0x1283c9(0x18f)](_0x1283c9(0x18c),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x1c2ecc)throw CliErrors[_0x1283c9(0x18f)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x1283c9(0x188));requireInteractive(),writeCliSideChannelLine(_0x1283c9(0x18a));const _0x4e901c=startSpinner(_0x1283c9(0x15c));let _0x153cda,_0x59cc5c,_0x331c89;try{const _0x412f54=await fetchMenuData(_0x1f12f4['appCode'],_0x1f12f4[_0x1283c9(0x196)]);_0x153cda=_0x412f54['localPages'],_0x59cc5c=_0x412f54[_0x1283c9(0x176)],_0x331c89=_0x412f54[_0x1283c9(0x178)],stopSpinner(_0x4e901c,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x4e4d3d){stopSpinner(_0x4e901c,_0x1283c9(0x15e),![]);throw CliErrors[_0x1283c9(0x18f)](_0x4e4d3d instanceof Error?_0x4e4d3d[_0x1283c9(0x189)]:_0x1283c9(0x15e));}if(_0x153cda[_0x1283c9(0x197)]===0x0)return writeCliSideChannelLine(a179_0x52b630['yellow'](_0x1283c9(0x167))),{'ok':!![]};const _0x2cc7a3=buildCompareRows(_0x153cda,_0x59cc5c);writeCliSideChannelLine(renderCompareTable(_0x2cc7a3)),writeCliSideChannelLine('');const _0x3b66b1=await selectPages(_0x153cda,_0x59cc5c);writeCliSideChannelLine(''),writeCliSideChannelLine(a179_0x52b630[_0x1283c9(0x179)](_0x1283c9(0x177)+_0x3b66b1[_0x1283c9(0x197)]+'\x20page(s)'));const _0x46e868=_0x4fc88a[_0x1283c9(0x155)]&&_0x4fc88a[_0x1283c9(0x172)];if(!_0x46e868){writeCliSideChannelLine(renderSyncSummary(_0x3b66b1,_0x59cc5c[_0x1283c9(0x16f)]>0x0));const _0x3ef60e=await askConfirm(_0x1283c9(0x195));if(!_0x3ef60e)return writeCliSideChannelLine(a179_0x52b630[_0x1283c9(0x168)](_0x1283c9(0x161))),{'ok':!![]};}let _0x14b6ea=_0x4fc88a[_0x1283c9(0x155)],_0x326076=_0x4fc88a[_0x1283c9(0x172)];!_0x14b6ea&&!_0x4fc88a[_0x1283c9(0x156)]&&(_0x14b6ea=await askJsUrl());!_0x326076&&!_0x4fc88a['appName']&&(_0x326076=await askCssUrl());const _0x4c7cd5=await askConfirm(_0x4fc88a[_0x1283c9(0x156)]?_0x1283c9(0x173)+_0x3b66b1[_0x1283c9(0x197)]+_0x1283c9(0x169)+_0x4fc88a[_0x1283c9(0x156)]+'?':_0x1283c9(0x173)+_0x3b66b1[_0x1283c9(0x197)]+_0x1283c9(0x186)+_0x14b6ea+_0x1283c9(0x16b)+_0x326076+'?');if(!_0x4c7cd5)return writeCliSideChannelLine(a179_0x52b630[_0x1283c9(0x168)](_0x1283c9(0x161))),{'ok':!![]};const _0x5e4a94=[_0x14b6ea,_0x326076][_0x1283c9(0x170)](_0x121713=>Boolean(_0x121713));_0x4fc88a['appName']&&_0x5e4a94[_0x1283c9(0x197)]===0x0&&await assertSharedResourcesConfigured(_0x1f12f4[_0x1283c9(0x184)],_0x1f12f4[_0x1283c9(0x196)],_0x4fc88a['appName']);const _0x29192c=startSpinner(_0x1283c9(0x17c)+_0x3b66b1[_0x1283c9(0x197)]+_0x1283c9(0x193));try{const _0x312372=_0x3b66b1['map'](_0x2a286d=>resolvePage(_0x2a286d,_0x4fc88a,_0x331c89)),_0x44a007=await doCreateMenus(_0x1f12f4[_0x1283c9(0x184)],_0x1f12f4['cookie'],_0x312372,_0x5e4a94,_0x4fc88a[_0x1283c9(0x156)]?{'appName':_0x4fc88a[_0x1283c9(0x156)]}:undefined);return stopSpinner(_0x29192c,'Created\x20'+_0x44a007['created']+'\x20menu(s)',!![]),{'ok':!![],'data':_0x44a007,'message':_0x1283c9(0x181)+_0x44a007[_0x1283c9(0x165)]+'\x20created,\x20'+_0x44a007['failed']+_0x1283c9(0x166)};}catch(_0x5673b7){stopSpinner(_0x29192c,_0x1283c9(0x198),![]);throw CliErrors[_0x1283c9(0x18f)](_0x5673b7 instanceof Error?_0x5673b7[_0x1283c9(0x189)]:_0x1283c9(0x198));}}};function ensureRunnableContext(_0x2cbdcd,_0x1196ef){const _0x5a6d34=a179_0x1f6886,_0x317ed0=_0x2cbdcd[_0x5a6d34(0x17a)]?String(_0x2cbdcd['appcode'])[_0x5a6d34(0x15a)]():'';if(!isInProject()&&!_0x1196ef&&!_0x317ed0)throw CliErrors[_0x5a6d34(0x18f)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parsePaths(_0x590f5f){const _0xc06e37=a179_0x1f6886;return[...new Set(_0x590f5f[_0xc06e37(0x17b)](',')[_0xc06e37(0x160)](_0x24a0b8=>_0x24a0b8[_0xc06e37(0x15a)]())[_0xc06e37(0x170)](Boolean))];}