@lovrabet/rabetbase-cli 2.5.9 → 2.5.10-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (377) hide show
  1. package/README.md +1 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/api-group.js +1 -1
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.js +1 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/api/legacy-api-file.js +1 -1
  8. package/lib/api/model-registry-file.js +1 -1
  9. package/lib/api/model-registry-scaffold.js +1 -1
  10. package/lib/api/model-source.js +1 -1
  11. package/lib/auth/auth-server-ui.js +1 -1
  12. package/lib/auth/auth-server.js +1 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.js +1 -1
  16. package/lib/auth/is-session-valid.js +1 -1
  17. package/lib/auth/login-success-html.js +1 -1
  18. package/lib/auth/logout.js +1 -1
  19. package/lib/cli-flags.js +1 -1
  20. package/lib/cli.js +1 -1
  21. package/lib/commands/api/generate.js +1 -1
  22. package/lib/commands/api/index.js +1 -1
  23. package/lib/commands/api/list.js +1 -1
  24. package/lib/commands/api/pull.js +1 -1
  25. package/lib/commands/api/shared.js +1 -1
  26. package/lib/commands/app/detail.js +1 -1
  27. package/lib/commands/app/index.js +1 -1
  28. package/lib/commands/app/list.js +1 -1
  29. package/lib/commands/app/members-list.js +1 -1
  30. package/lib/commands/app/remote-directory.js +1 -1
  31. package/lib/commands/app/shared.js +1 -1
  32. package/lib/commands/app-config/delete.js +1 -1
  33. package/lib/commands/app-config/get.js +1 -1
  34. package/lib/commands/app-config/index.js +1 -1
  35. package/lib/commands/app-config/list.js +1 -1
  36. package/lib/commands/app-config/set.js +1 -1
  37. package/lib/commands/app-config/shared.js +1 -1
  38. package/lib/commands/auth/index.js +1 -1
  39. package/lib/commands/bff/create.js +1 -1
  40. package/lib/commands/bff/delete.js +1 -1
  41. package/lib/commands/bff/detail.js +1 -1
  42. package/lib/commands/bff/index.js +1 -1
  43. package/lib/commands/bff/list.js +1 -1
  44. package/lib/commands/bff/logs.js +1 -1
  45. package/lib/commands/bff/pull.js +1 -1
  46. package/lib/commands/bff/push.js +1 -1
  47. package/lib/commands/bff/status.js +1 -1
  48. package/lib/commands/cli-skill/index.js +1 -1
  49. package/lib/commands/cli-update.js +1 -1
  50. package/lib/commands/codegen/index.js +1 -1
  51. package/lib/commands/codegen/sdk.js +1 -1
  52. package/lib/commands/codegen/sql.js +1 -1
  53. package/lib/commands/common/app-registry.js +1 -1
  54. package/lib/commands/common/app-selector.js +1 -1
  55. package/lib/commands/common/async-task.js +1 -1
  56. package/lib/commands/common/dry-run.js +1 -1
  57. package/lib/commands/common/flags.js +1 -1
  58. package/lib/commands/common/local-file.js +1 -1
  59. package/lib/commands/common/validate.js +1 -1
  60. package/lib/commands/config/delete.js +1 -1
  61. package/lib/commands/config/get.js +1 -1
  62. package/lib/commands/config/index.js +1 -1
  63. package/lib/commands/config/init.js +1 -1
  64. package/lib/commands/config/list.js +1 -1
  65. package/lib/commands/config/set.js +1 -1
  66. package/lib/commands/config/shared.js +1 -1
  67. package/lib/commands/dataset/batch-design.js +1 -1
  68. package/lib/commands/dataset/business-group-update.js +1 -1
  69. package/lib/commands/dataset/business-groups.js +1 -1
  70. package/lib/commands/dataset/capability.js +1 -1
  71. package/lib/commands/dataset/cross-relation-create.js +1 -1
  72. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  73. package/lib/commands/dataset/cross-relation-list.js +1 -1
  74. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  75. package/lib/commands/dataset/cross-relation-update.js +1 -1
  76. package/lib/commands/dataset/delete.js +1 -1
  77. package/lib/commands/dataset/design-context.js +1 -1
  78. package/lib/commands/dataset/design-start.js +1 -1
  79. package/lib/commands/dataset/design-status.js +1 -1
  80. package/lib/commands/dataset/design-sync-retry.js +1 -1
  81. package/lib/commands/dataset/design-sync-status.js +1 -1
  82. package/lib/commands/dataset/design-validate.js +1 -1
  83. package/lib/commands/dataset/detail.js +1 -1
  84. package/lib/commands/dataset/extend-update.js +1 -1
  85. package/lib/commands/dataset/field-restore.js +1 -1
  86. package/lib/commands/dataset/field-update.js +1 -1
  87. package/lib/commands/dataset/generate.js +1 -1
  88. package/lib/commands/dataset/index.js +1 -1
  89. package/lib/commands/dataset/list.js +1 -1
  90. package/lib/commands/dataset/operations.js +1 -1
  91. package/lib/commands/dataset/relation-audit.js +1 -1
  92. package/lib/commands/dataset/relation-create.js +1 -1
  93. package/lib/commands/dataset/relation-delete.js +1 -1
  94. package/lib/commands/dataset/relation-shared.js +1 -1
  95. package/lib/commands/dataset/relation-update.js +1 -1
  96. package/lib/commands/dataset/relations.js +1 -1
  97. package/lib/commands/dataset/rename.js +1 -1
  98. package/lib/commands/dataset/restore.js +1 -1
  99. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  100. package/lib/commands/db/analysis-batching.js +1 -1
  101. package/lib/commands/db/analyze-batch-plan.js +1 -1
  102. package/lib/commands/db/analyze-cancel.js +1 -1
  103. package/lib/commands/db/analyze-start.js +1 -1
  104. package/lib/commands/db/analyze-status.js +1 -1
  105. package/lib/commands/db/create.js +1 -1
  106. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  109. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  110. package/lib/commands/db/delete.js +1 -1
  111. package/lib/commands/db/detail.js +1 -1
  112. package/lib/commands/db/diff-refresh-start.js +1 -1
  113. package/lib/commands/db/diff-refresh-status.js +1 -1
  114. package/lib/commands/db/diff.js +1 -1
  115. package/lib/commands/db/index.js +1 -1
  116. package/lib/commands/db/list.js +1 -1
  117. package/lib/commands/db/shared.js +1 -1
  118. package/lib/commands/db/table-diff-shared.js +1 -1
  119. package/lib/commands/db/tables.js +1 -1
  120. package/lib/commands/db/test.js +1 -1
  121. package/lib/commands/db/update.js +1 -1
  122. package/lib/commands/deployment/index.js +1 -1
  123. package/lib/commands/deployment/sync-all.js +1 -1
  124. package/lib/commands/deployment/sync-jobs.js +1 -1
  125. package/lib/commands/deployment/sync-status.js +1 -1
  126. package/lib/commands/doctor.js +1 -1
  127. package/lib/commands/file/index.js +1 -1
  128. package/lib/commands/flow/create.js +1 -1
  129. package/lib/commands/flow/detail.js +1 -1
  130. package/lib/commands/flow/index.js +1 -1
  131. package/lib/commands/flow/list.js +1 -1
  132. package/lib/commands/flow/page-list.js +1 -1
  133. package/lib/commands/flow/publish.js +1 -1
  134. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  135. package/lib/commands/flow/runtime-role-list.js +1 -1
  136. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  137. package/lib/commands/flow/runtime-user-search.js +1 -1
  138. package/lib/commands/flow/shared.js +1 -1
  139. package/lib/commands/flow/update.js +1 -1
  140. package/lib/commands/flow/validate.js +1 -1
  141. package/lib/commands/instant-api-policy/current.js +1 -1
  142. package/lib/commands/instant-api-policy/index.js +1 -1
  143. package/lib/commands/instant-api-policy/init.js +1 -1
  144. package/lib/commands/instant-api-policy/publish.js +1 -1
  145. package/lib/commands/instant-api-policy/pull.js +1 -1
  146. package/lib/commands/instant-api-policy/revision.js +1 -1
  147. package/lib/commands/instant-api-policy/revisions.js +1 -1
  148. package/lib/commands/instant-api-policy/rollback.js +1 -1
  149. package/lib/commands/instant-api-policy/shared.js +1 -1
  150. package/lib/commands/instant-api-policy/validate.js +1 -1
  151. package/lib/commands/issue/index.js +1 -1
  152. package/lib/commands/issue/nudge.js +1 -1
  153. package/lib/commands/issue/report.js +1 -1
  154. package/lib/commands/issue/shared.js +1 -1
  155. package/lib/commands/kb/create.js +1 -1
  156. package/lib/commands/kb/delete.js +1 -1
  157. package/lib/commands/kb/detail.js +1 -1
  158. package/lib/commands/kb/index.js +1 -1
  159. package/lib/commands/kb/list.js +1 -1
  160. package/lib/commands/kb/search.js +1 -1
  161. package/lib/commands/kb/shared.js +1 -1
  162. package/lib/commands/kb/update.js +1 -1
  163. package/lib/commands/logs/index.js +1 -1
  164. package/lib/commands/menu/asset-update.js +1 -1
  165. package/lib/commands/menu/delete.js +1 -1
  166. package/lib/commands/menu/external-link-create.js +1 -1
  167. package/lib/commands/menu/external-link-update.js +1 -1
  168. package/lib/commands/menu/group-create.js +1 -1
  169. package/lib/commands/menu/group-update.js +1 -1
  170. package/lib/commands/menu/index.js +1 -1
  171. package/lib/commands/menu/list.js +1 -1
  172. package/lib/commands/menu/move.js +1 -1
  173. package/lib/commands/menu/regroup-start.js +1 -1
  174. package/lib/commands/menu/rename.js +1 -1
  175. package/lib/commands/menu/shared/compare-table.js +1 -1
  176. package/lib/commands/menu/shared/delete-plan.js +1 -1
  177. package/lib/commands/menu/shared/facts.js +1 -1
  178. package/lib/commands/menu/shared/index.js +1 -1
  179. package/lib/commands/menu/shared/inquirer.js +1 -1
  180. package/lib/commands/menu/shared/local-pages.js +1 -1
  181. package/lib/commands/menu/shared/logic.js +1 -1
  182. package/lib/commands/menu/shared/mutations.js +1 -1
  183. package/lib/commands/menu/shared/path.js +1 -1
  184. package/lib/commands/menu/shared/service.js +1 -1
  185. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  186. package/lib/commands/menu/shared/sync-core.js +1 -1
  187. package/lib/commands/menu/shared/update-core.js +1 -1
  188. package/lib/commands/menu/shared/valid-url.js +1 -1
  189. package/lib/commands/menu/subapp-assets-status.js +1 -1
  190. package/lib/commands/menu/subapp-assets-update.js +1 -1
  191. package/lib/commands/menu/sync.js +1 -1
  192. package/lib/commands/menu/visibility-update.js +1 -1
  193. package/lib/commands/notification/config-create.js +1 -1
  194. package/lib/commands/notification/config-delete.js +1 -1
  195. package/lib/commands/notification/config-list.js +1 -1
  196. package/lib/commands/notification/config-update.js +1 -1
  197. package/lib/commands/notification/index.js +1 -1
  198. package/lib/commands/notification/shared.js +1 -1
  199. package/lib/commands/ocr/index.js +1 -1
  200. package/lib/commands/page/create.js +1 -1
  201. package/lib/commands/page/custom/detail.js +1 -1
  202. package/lib/commands/page/custom/list.js +1 -1
  203. package/lib/commands/page/custom/publish.js +1 -1
  204. package/lib/commands/page/custom/shared.js +1 -1
  205. package/lib/commands/page/custom/syntax.js +1 -1
  206. package/lib/commands/page/custom/update.js +1 -1
  207. package/lib/commands/page/data-list-status.js +1 -1
  208. package/lib/commands/page/generate-start.js +1 -1
  209. package/lib/commands/page/generate-status.js +1 -1
  210. package/lib/commands/page/index.js +1 -1
  211. package/lib/commands/page/pull.js +1 -1
  212. package/lib/commands/page/push.js +1 -1
  213. package/lib/commands/page/relation-audit.js +1 -1
  214. package/lib/commands/page/restore.js +1 -1
  215. package/lib/commands/page/shared.js +1 -1
  216. package/lib/commands/page/sync.js +1 -1
  217. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  218. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  219. package/lib/commands/project/create/format-elapsed.js +1 -1
  220. package/lib/commands/project/create/main.js +1 -1
  221. package/lib/commands/project/create/materialize-project-template.js +1 -1
  222. package/lib/commands/project/create/project-name.js +1 -1
  223. package/lib/commands/project/create/project-template-archive.js +1 -1
  224. package/lib/commands/project/create/project-template-path.js +1 -1
  225. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  226. package/lib/commands/project/create/use-format-code.js +1 -1
  227. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  228. package/lib/commands/project/domain-routing-sync.js +1 -1
  229. package/lib/commands/project/index.js +1 -1
  230. package/lib/commands/project/upgrade.js +1 -1
  231. package/lib/commands/registry.js +1 -1
  232. package/lib/commands/role/delete.js +1 -1
  233. package/lib/commands/role/detail.js +1 -1
  234. package/lib/commands/role/index.js +1 -1
  235. package/lib/commands/role/list.js +1 -1
  236. package/lib/commands/role/shared.js +1 -1
  237. package/lib/commands/role/update.js +1 -1
  238. package/lib/commands/role/user-add.js +1 -1
  239. package/lib/commands/role/user-remove.js +1 -1
  240. package/lib/commands/role/user-resolve.js +1 -1
  241. package/lib/commands/rule/get.js +1 -1
  242. package/lib/commands/rule/index.js +1 -1
  243. package/lib/commands/rule/list.js +1 -1
  244. package/lib/commands/rule/set.js +1 -1
  245. package/lib/commands/rule/shared.js +1 -1
  246. package/lib/commands/run/index.js +1 -1
  247. package/lib/commands/schema.js +1 -1
  248. package/lib/commands/sql/create.js +1 -1
  249. package/lib/commands/sql/delete.js +1 -1
  250. package/lib/commands/sql/detail.js +1 -1
  251. package/lib/commands/sql/exec.js +1 -1
  252. package/lib/commands/sql/index.js +1 -1
  253. package/lib/commands/sql/list.js +1 -1
  254. package/lib/commands/sql/pull.js +1 -1
  255. package/lib/commands/sql/push.js +1 -1
  256. package/lib/commands/sql/shared.js +1 -1
  257. package/lib/commands/sql/status.js +1 -1
  258. package/lib/commands/sql/validate.js +1 -1
  259. package/lib/commands/task/index.js +1 -1
  260. package/lib/commands/task/status.js +1 -1
  261. package/lib/commands/tenant/index.js +1 -1
  262. package/lib/commands/tenant/members-list.js +1 -1
  263. package/lib/commands/tenant/shared.js +1 -1
  264. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  265. package/lib/commands/user-account/feishu-bind.js +1 -1
  266. package/lib/commands/user-account/index.js +1 -1
  267. package/lib/commands/workspace/add.js +1 -1
  268. package/lib/commands/workspace/index.js +1 -1
  269. package/lib/commands/workspace/remove.js +1 -1
  270. package/lib/config/domain-config.js +1 -1
  271. package/lib/config/project-domain-routing.js +1 -1
  272. package/lib/config/region-config.js +1 -1
  273. package/lib/config/schema.js +1 -1
  274. package/lib/constant/cdn.js +1 -1
  275. package/lib/constant/cli.js +1 -1
  276. package/lib/constant/defaults.js +1 -1
  277. package/lib/constant/domain.js +1 -1
  278. package/lib/constant/env.js +1 -1
  279. package/lib/constant/output.js +1 -1
  280. package/lib/constant/paths.js +1 -1
  281. package/lib/constant/region.js +1 -1
  282. package/lib/constant/risk.js +1 -1
  283. package/lib/constant/routing-profile.js +1 -1
  284. package/lib/context/app-resolver.js +1 -1
  285. package/lib/context/auth-resolver.js +1 -1
  286. package/lib/context/config-loader.js +1 -1
  287. package/lib/context.js +1 -1
  288. package/lib/core/alias-resolver.js +1 -1
  289. package/lib/core/api-client.js +1 -1
  290. package/lib/core/bff/config.js +1 -1
  291. package/lib/core/bff/file-system.js +1 -1
  292. package/lib/core/bff/hash.js +1 -1
  293. package/lib/core/bff/hook-directory.js +1 -1
  294. package/lib/core/bff/lock.js +1 -1
  295. package/lib/core/bff/utils.js +1 -1
  296. package/lib/core/cross-db-analysis.js +1 -1
  297. package/lib/core/cross-db-relation.js +1 -1
  298. package/lib/core/db-resolver.js +1 -1
  299. package/lib/core/flow-config.js +1 -1
  300. package/lib/core/instant-api-policy/config.js +1 -1
  301. package/lib/core/kb-management-client.js +1 -1
  302. package/lib/core/kb-search-client.js +1 -1
  303. package/lib/core/page/file-system.js +1 -1
  304. package/lib/core/page/hash.js +1 -1
  305. package/lib/core/page/lock.js +1 -1
  306. package/lib/core/page/lr-smart-jsx.js +1 -1
  307. package/lib/core/sql-index-auditor.js +1 -1
  308. package/lib/core/sql-sync/config.js +1 -1
  309. package/lib/core/sql-sync/file-system.js +1 -1
  310. package/lib/core/sql-sync/hash.js +1 -1
  311. package/lib/core/sql-sync/lock.js +1 -1
  312. package/lib/core/sql-sync/utils.js +1 -1
  313. package/lib/core/sql-validator.js +1 -1
  314. package/lib/errors.js +1 -1
  315. package/lib/framework/build-all-flags.js +1 -1
  316. package/lib/framework/error-output.js +1 -1
  317. package/lib/framework/explicit-yes.js +1 -1
  318. package/lib/framework/flags.js +1 -1
  319. package/lib/framework/help.js +1 -1
  320. package/lib/framework/index.js +1 -1
  321. package/lib/framework/output.js +1 -1
  322. package/lib/framework/response.js +1 -1
  323. package/lib/framework/runner-alias.js +1 -1
  324. package/lib/framework/runner.js +1 -1
  325. package/lib/framework/schema-export.js +1 -1
  326. package/lib/framework/supported-flags.js +1 -1
  327. package/lib/framework/types.js +1 -1
  328. package/lib/generated/build-info.d.ts +4 -4
  329. package/lib/generated/build-info.js +1 -1
  330. package/lib/generated/official-routing.js +1 -1
  331. package/lib/generated/routing-contract.js +1 -1
  332. package/lib/help.js +1 -1
  333. package/lib/postinstall.js +1 -1
  334. package/lib/runtime/confirmation.js +1 -1
  335. package/lib/runtime/event.js +1 -1
  336. package/lib/runtime/index.js +1 -1
  337. package/lib/runtime/queue.js +1 -1
  338. package/lib/runtime/resolve.js +1 -1
  339. package/lib/services/dataset-design/checkpoint.js +1 -1
  340. package/lib/services/dataset-design/commands.js +1 -1
  341. package/lib/services/dataset-design/contract.js +1 -1
  342. package/lib/skills/builtin-skill.js +1 -1
  343. package/lib/skills/main.js +1 -1
  344. package/lib/skills/npx-skills-add.js +1 -1
  345. package/lib/skills/skill-presence.js +1 -1
  346. package/lib/telemetry/cli-command-trace.js +1 -1
  347. package/lib/telemetry/cli-help-trace.js +1 -1
  348. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  349. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  350. package/lib/telemetry/send-cli-trace-log.js +1 -1
  351. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  352. package/lib/utils/ai_config.js +1 -1
  353. package/lib/utils/apply-jq-filter.js +1 -1
  354. package/lib/utils/cdn-config.js +1 -1
  355. package/lib/utils/check-sdk-version.js +1 -1
  356. package/lib/utils/cli-version-check.js +1 -1
  357. package/lib/utils/cli-version-policy.js +1 -1
  358. package/lib/utils/config.js +1 -1
  359. package/lib/utils/entity-with-id.js +1 -1
  360. package/lib/utils/file-utils.js +1 -1
  361. package/lib/utils/guides-cdn.js +1 -1
  362. package/lib/utils/http-client.js +1 -1
  363. package/lib/utils/is-non-interactive.js +1 -1
  364. package/lib/utils/logger.js +1 -1
  365. package/lib/utils/params.js +1 -1
  366. package/lib/utils/platform.js +1 -1
  367. package/lib/utils/sleep.js +1 -1
  368. package/lib/utils/template-replacer.js +1 -1
  369. package/lib/utils/update-notice.js +1 -1
  370. package/lib/utils/version.js +1 -1
  371. package/lib/utils/with-active-cookie.js +1 -1
  372. package/lib/utils/write-cli-side-channel.js +1 -1
  373. package/package.json +2 -2
  374. package/skills/rabetbase/SKILL.md +2 -2
  375. package/skills/rabetbase-dataset-generation/SKILL.md +2 -2
  376. package/skills/rabetbase-page-generation/SKILL.md +2 -2
  377. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x46439b,_0x2cbb54){const _0x445b11=a177_0x2668,_0x2f082c=_0x46439b();while(!![]){try{const _0x4f0e1f=parseInt(_0x445b11(0x1a5))/0x1+parseInt(_0x445b11(0x1c4))/0x2*(parseInt(_0x445b11(0x1a0))/0x3)+-parseInt(_0x445b11(0x19c))/0x4+parseInt(_0x445b11(0x1bc))/0x5*(-parseInt(_0x445b11(0x1c1))/0x6)+parseInt(_0x445b11(0x1ab))/0x7*(-parseInt(_0x445b11(0x1b5))/0x8)+parseInt(_0x445b11(0x1ae))/0x9*(-parseInt(_0x445b11(0x1a2))/0xa)+parseInt(_0x445b11(0x1b3))/0xb;if(_0x4f0e1f===_0x2cbb54)break;else _0x2f082c['push'](_0x2f082c['shift']());}catch(_0x5dc03f){_0x2f082c['push'](_0x2f082c['shift']());}}}(a177_0x52c8,0x35bfc));function a177_0x52c8(){const _0xdc7551=['gray','red','327710VajRgt','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','\x20\x20Checking\x20JS\x20URL\x20reachability...','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','name','12znBKkw','error','CSS\x20URL\x20checked','2BJHurV','has','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','1020064LiTnXk','JS\x20URL\x20check\x20failed','cancelled','test','1231377AmXiPT','includes','3630ZGJHyu','fail','cyan','145486dKFVuh','filter','path','isTTY','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','succeed','527023drBXHL','stdin','length','3123pjRbdT','No\x20menus\x20selected.','ExitPromptError','[new]','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','6079887NeFqcK','Cancelled.','40MrkpGn','trim','\x20\x20Checking\x20CSS\x20URL\x20reachability...','\x20\x20CSS\x20URL:','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20'];a177_0x52c8=function(){return _0xdc7551;};return a177_0x52c8();}import a177_0x5100ba from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a177_0x4b76c7 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{menuPathKey}from'../../../commands/menu/shared/path.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x1468d7){return _0x1468d7['catch'](_0x2a5ea7=>{const _0x5390e0=a177_0x2668;if(_0x2a5ea7?.[_0x5390e0(0x1c0)]===_0x5390e0(0x1b0))throw CliErrors[_0x5390e0(0x19e)](_0x5390e0(0x1b4));throw _0x2a5ea7;});}function a177_0x2668(_0x5140b1,_0x11411d){_0x5140b1=_0x5140b1-0x19c;const _0x52c85b=a177_0x52c8();let _0x2668ab=_0x52c85b[_0x5140b1];return _0x2668ab;}export function startSpinner(_0x54902d){const _0x4e72ae=a177_0x2668;return a177_0x4b76c7({'text':_0x54902d,'color':_0x4e72ae(0x1a4)})['start']();}export function stopSpinner(_0x14c9b2,_0x2f065d,_0x291fc4){const _0x1e8e43=a177_0x2668;_0x291fc4?_0x14c9b2[_0x1e8e43(0x1aa)](_0x2f065d):_0x14c9b2[_0x1e8e43(0x1a3)](_0x2f065d);}export async function askConfirm(_0x44a65e){return onCancel(confirm({'message':_0x44a65e,'theme':{'prefix':''}}));}export async function askJsUrl(_0x14b095){const _0x181be5=a177_0x2668;while(!![]){const _0x37185a=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x14b095,'theme':{'prefix':''}}));if(_0x37185a['trim']()==='')throw CliErrors['cancelled'](_0x181be5(0x1b4));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x181be5(0x19f)](_0x37185a['trim']())){console[_0x181be5(0x1c2)](a177_0x5100ba[_0x181be5(0x1bb)](_0x181be5(0x1b2)));continue;}const _0x58a59c=startSpinner(_0x181be5(0x1be));try{const _0x5c6a53=await isUrlReachable(_0x37185a[_0x181be5(0x1b6)]());stopSpinner(_0x58a59c,'JS\x20URL\x20checked',_0x5c6a53);if(!_0x5c6a53){console['error'](a177_0x5100ba['red'](_0x181be5(0x1bd)));continue;}return _0x37185a[_0x181be5(0x1b6)]();}catch(_0x2e0db2){stopSpinner(_0x58a59c,_0x181be5(0x19d),![]);throw _0x2e0db2;}}}export async function askCssUrl(_0x76832b){const _0x203802=a177_0x2668;while(!![]){const _0x2e8db2=await onCancel(input({'message':_0x203802(0x1b8),'default':_0x76832b,'theme':{'prefix':''}}));if(_0x2e8db2['trim']()==='')throw CliErrors[_0x203802(0x19e)](_0x203802(0x1b4));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x203802(0x19f)](_0x2e8db2['trim']())){console['error'](a177_0x5100ba['red']('\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'));continue;}const _0x269674=startSpinner(_0x203802(0x1b7));try{const _0x19cfdd=await isUrlReachable(_0x2e8db2[_0x203802(0x1b6)]());stopSpinner(_0x269674,_0x203802(0x1c3),_0x19cfdd);if(!_0x19cfdd){console[_0x203802(0x1c2)](a177_0x5100ba[_0x203802(0x1bb)](_0x203802(0x1bf)));continue;}return _0x2e8db2['trim']();}catch(_0x2b8778){stopSpinner(_0x269674,'CSS\x20URL\x20check\x20failed',![]);throw _0x2b8778;}}}export async function selectPages(_0x3088f6,_0x49a855){const _0x2f84fe=a177_0x2668,_0x308bfc=_0x3088f6['map'](_0x18d968=>{const _0x3125cf=a177_0x2668,_0x232d37=_0x49a855[_0x3125cf(0x1c5)](menuPathKey(_0x18d968[_0x3125cf(0x1a7)]));return{'name':_0x18d968['label']+'\x20\x20'+a177_0x5100ba[_0x3125cf(0x1ba)](_0x18d968['path'])+'\x20\x20'+(_0x232d37?a177_0x5100ba['gray']('[already\x20on\x20platform]'):a177_0x5100ba['green'](_0x3125cf(0x1b1))),'value':_0x18d968[_0x3125cf(0x1a7)],'checked':!_0x232d37,'disabled':_0x232d37};});if(_0x308bfc['length']===0x0)throw new Error('No\x20local\x20pages\x20found.');const _0x5ef9eb=await onCancel(checkbox({'message':_0x2f84fe(0x1c6),'choices':_0x308bfc,'loop':![],'theme':{'prefix':''}}));if(_0x5ef9eb[_0x2f84fe(0x1ad)]===0x0)throw new Error(_0x2f84fe(0x1af));return _0x3088f6[_0x2f84fe(0x1a6)](_0x1a8a1f=>_0x5ef9eb[_0x2f84fe(0x1a1)](_0x1a8a1f['path']));}export function isInteractive(){const _0x46b8b7=a177_0x2668;return process[_0x46b8b7(0x1ac)][_0x46b8b7(0x1a8)]===!![];}export function requireInteractive(){const _0x3e55aa=a177_0x2668;if(!isInteractive())throw new Error(_0x3e55aa(0x1b9)+_0x3e55aa(0x1a9));}
1
+ (function(_0x1f19bd,_0x130d7b){const _0x398599=a177_0x2176,_0x4c32b2=_0x1f19bd();while(!![]){try{const _0x2ebe1b=-parseInt(_0x398599(0x181))/0x1*(-parseInt(_0x398599(0x193))/0x2)+parseInt(_0x398599(0x188))/0x3+parseInt(_0x398599(0x183))/0x4+-parseInt(_0x398599(0x189))/0x5+-parseInt(_0x398599(0x180))/0x6+-parseInt(_0x398599(0x18d))/0x7+-parseInt(_0x398599(0x18b))/0x8*(parseInt(_0x398599(0x178))/0x9);if(_0x2ebe1b===_0x130d7b)break;else _0x4c32b2['push'](_0x4c32b2['shift']());}catch(_0x9e5531){_0x4c32b2['push'](_0x4c32b2['shift']());}}}(a177_0x343f,0x5c82f));function a177_0x2176(_0x566aa5,_0x4ec805){_0x566aa5=_0x566aa5-0x177;const _0x343f36=a177_0x343f();let _0x217650=_0x343f36[_0x566aa5];return _0x217650;}import a177_0x3f04c0 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a177_0x10121d from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{menuPathKey}from'../../../commands/menu/shared/path.js';import{CliErrors}from'../../../errors.js';function a177_0x343f(){const _0x86679a=['\x20\x20CSS\x20URL:','gray','703632vnnmJE','1xhFWhh','Cancelled.','1009812bMFuXj','trim','has','map','fail','1467264kEawjp','436375jjsMEu','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','3447744qpAySv','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','3043383ZyVTRR','green','start','length','filter','path','1415340mXjgeI','ExitPromptError','succeed','No\x20menus\x20selected.','includes','CSS\x20URL\x20checked','isTTY','cyan','cancelled','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','test','9bNEuxa','[already\x20on\x20platform]','red','catch','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','error'];a177_0x343f=function(){return _0x86679a;};return a177_0x343f();}function onCancel(_0x36df02){const _0x294a09=a177_0x2176;return _0x36df02[_0x294a09(0x17b)](_0xd16672=>{const _0x545fff=_0x294a09;if(_0xd16672?.['name']===_0x545fff(0x194))throw CliErrors['cancelled'](_0x545fff(0x182));throw _0xd16672;});}export function startSpinner(_0x26b571){const _0x4301ad=a177_0x2176;return a177_0x10121d({'text':_0x26b571,'color':_0x4301ad(0x19a)})[_0x4301ad(0x18f)]();}export function stopSpinner(_0x5b0e83,_0x363eae,_0x4c0d41){const _0x34d184=a177_0x2176;_0x4c0d41?_0x5b0e83[_0x34d184(0x195)](_0x363eae):_0x5b0e83[_0x34d184(0x187)](_0x363eae);}export async function askConfirm(_0x4a656c){return onCancel(confirm({'message':_0x4a656c,'theme':{'prefix':''}}));}export async function askJsUrl(_0x9b88da){const _0x515033=a177_0x2176;while(!![]){const _0x1348c6=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x9b88da,'theme':{'prefix':''}}));if(_0x1348c6['trim']()==='')throw CliErrors[_0x515033(0x19b)](_0x515033(0x182));if(!/^https:\/\/.+\.js(\?.*)?$/['test'](_0x1348c6['trim']())){console[_0x515033(0x17d)](a177_0x3f04c0['red']('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0x400f49=startSpinner('\x20\x20Checking\x20JS\x20URL\x20reachability...');try{const _0x4d6149=await isUrlReachable(_0x1348c6[_0x515033(0x184)]());stopSpinner(_0x400f49,'JS\x20URL\x20checked',_0x4d6149);if(!_0x4d6149){console[_0x515033(0x17d)](a177_0x3f04c0[_0x515033(0x17a)](_0x515033(0x19c)));continue;}return _0x1348c6[_0x515033(0x184)]();}catch(_0x2b9f83){stopSpinner(_0x400f49,'JS\x20URL\x20check\x20failed',![]);throw _0x2b9f83;}}}export async function askCssUrl(_0x25755e){const _0x35855b=a177_0x2176;while(!![]){const _0x5a2064=await onCancel(input({'message':_0x35855b(0x17e),'default':_0x25755e,'theme':{'prefix':''}}));if(_0x5a2064[_0x35855b(0x184)]()==='')throw CliErrors[_0x35855b(0x19b)](_0x35855b(0x182));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x35855b(0x177)](_0x5a2064[_0x35855b(0x184)]())){console[_0x35855b(0x17d)](a177_0x3f04c0[_0x35855b(0x17a)]('\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'));continue;}const _0x1120d0=startSpinner('\x20\x20Checking\x20CSS\x20URL\x20reachability...');try{const _0x2b8dea=await isUrlReachable(_0x5a2064[_0x35855b(0x184)]());stopSpinner(_0x1120d0,_0x35855b(0x198),_0x2b8dea);if(!_0x2b8dea){console['error'](a177_0x3f04c0['red']('\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable'));continue;}return _0x5a2064[_0x35855b(0x184)]();}catch(_0x35331b){stopSpinner(_0x1120d0,'CSS\x20URL\x20check\x20failed',![]);throw _0x35331b;}}}export async function selectPages(_0x57a524,_0x1c5280){const _0x50ec71=a177_0x2176,_0xc29622=_0x57a524[_0x50ec71(0x186)](_0x52f274=>{const _0xd3d4ff=_0x50ec71,_0x3fa93b=_0x1c5280[_0xd3d4ff(0x185)](menuPathKey(_0x52f274[_0xd3d4ff(0x192)]));return{'name':_0x52f274['label']+'\x20\x20'+a177_0x3f04c0[_0xd3d4ff(0x17f)](_0x52f274[_0xd3d4ff(0x192)])+'\x20\x20'+(_0x3fa93b?a177_0x3f04c0['gray'](_0xd3d4ff(0x179)):a177_0x3f04c0[_0xd3d4ff(0x18e)]('[new]')),'value':_0x52f274[_0xd3d4ff(0x192)],'checked':!_0x3fa93b,'disabled':_0x3fa93b};});if(_0xc29622[_0x50ec71(0x190)]===0x0)throw new Error('No\x20local\x20pages\x20found.');const _0x37bbf1=await onCancel(checkbox({'message':_0x50ec71(0x17c),'choices':_0xc29622,'loop':![],'theme':{'prefix':''}}));if(_0x37bbf1[_0x50ec71(0x190)]===0x0)throw new Error(_0x50ec71(0x196));return _0x57a524[_0x50ec71(0x191)](_0x4fcc7a=>_0x37bbf1[_0x50ec71(0x197)](_0x4fcc7a['path']));}export function isInteractive(){const _0x1294fe=a177_0x2176;return process['stdin'][_0x1294fe(0x199)]===!![];}export function requireInteractive(){const _0x25473b=a177_0x2176;if(!isInteractive())throw new Error(_0x25473b(0x18a)+_0x25473b(0x18c));}
@@ -1 +1 @@
1
- const a178_0x447df5=a178_0x2a0d;(function(_0x28938e,_0x14edf7){const _0x23a64a=a178_0x2a0d,_0x551729=_0x28938e();while(!![]){try{const _0x51c3b0=-parseInt(_0x23a64a(0x121))/0x1+parseInt(_0x23a64a(0x127))/0x2+parseInt(_0x23a64a(0x11d))/0x3+parseInt(_0x23a64a(0x111))/0x4*(-parseInt(_0x23a64a(0x137))/0x5)+-parseInt(_0x23a64a(0x10d))/0x6*(parseInt(_0x23a64a(0x13a))/0x7)+-parseInt(_0x23a64a(0x122))/0x8+-parseInt(_0x23a64a(0x110))/0x9*(-parseInt(_0x23a64a(0x132))/0xa);if(_0x51c3b0===_0x14edf7)break;else _0x551729['push'](_0x551729['shift']());}catch(_0x563cc2){_0x551729['push'](_0x551729['shift']());}}}(a178_0x2fbf,0xeeff8));import{existsSync,readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a178_0x447df5(0x13c)](),a178_0x447df5(0x131));function a178_0x2a0d(_0x5a637e,_0x2f5bb2){_0x5a637e=_0x5a637e-0x10d;const _0x2fbff8=a178_0x2fbf();let _0x2a0da8=_0x2fbff8[_0x5a637e];return _0x2a0da8;}export function extractTitleFromComment(_0x1f788a){const _0x24dadb=a178_0x447df5;try{const _0x5416f8=readFileSync(_0x1f788a,_0x24dadb(0x112)),_0x25e2c1=_0x5416f8[_0x24dadb(0x11f)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x25e2c1&&_0x25e2c1[0x1]){const _0x294843=_0x25e2c1[0x1],_0x5491aa=_0x294843['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x5491aa&&_0x5491aa[0x1])return _0x5491aa[0x1][_0x24dadb(0x13e)]();}let _0x3310e9=null;const _0x53c993=_0x5416f8[_0x24dadb(0x11f)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x53c993&&_0x53c993[0x1]&&(_0x3310e9=_0x53c993[0x1]);if(!_0x3310e9){const _0x55f9ca=_0x5416f8[_0x24dadb(0x11f)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x55f9ca&&_0x55f9ca[0x1]&&(_0x3310e9=_0x55f9ca[0x1]);}if(_0x3310e9){const _0x3cc834=new RegExp('\x5cb'+_0x3310e9+_0x24dadb(0x134)),_0x3da9e8=_0x5416f8[_0x24dadb(0x11f)](_0x3cc834);if(_0x3da9e8&&_0x3da9e8[0x1])return _0x3da9e8[0x1];return _0x3310e9;}return null;}catch(_0x7541bf){return null;}}export function getLocalPages(_0x4beb72=pagesDir,_0x2796bb=pagesDir,_0x531d02=process['cwd']()){const _0x532d9e=a178_0x447df5;if(resolve(_0x4beb72)===resolve(_0x2796bb)){const _0x3b2754=join(_0x531d02,_0x532d9e(0x124));if(existsSync(_0x3b2754))return getDeclaredPages(_0x3b2754,_0x531d02);}let _0xca9f7e=[];const _0x39e606=readdirSync(_0x4beb72);return _0x39e606[_0x532d9e(0x133)](_0x45603e=>{const _0x2dad4a=_0x532d9e,_0x461507=join(_0x4beb72,_0x45603e),_0x11da07=statSync(_0x461507);if(_0x11da07&&_0x11da07['isDirectory']())_0xca9f7e=_0xca9f7e['concat'](getLocalPages(_0x461507,_0x2796bb,_0x531d02));else{if(_0x45603e[_0x2dad4a(0x13f)](_0x2dad4a(0x126))){let _0x34caaa=relative(_0x2796bb,_0x461507);_0x34caaa['endsWith'](_0x2dad4a(0x10e))?_0x34caaa=_0x34caaa['replace'](/index\.tsx$/,''):_0x34caaa=_0x34caaa[_0x2dad4a(0x11b)](/\.tsx$/,'');_0x34caaa[_0x2dad4a(0x13f)](sep)&&(_0x34caaa=_0x34caaa['slice'](0x0,-0x1));const _0x3a3d55=_0x34caaa['split'](sep)[_0x2dad4a(0x10f)]('/'),_0x5990c0=extractTitleFromComment(_0x461507),_0x10ed07=_0x5990c0||_0x3a3d55;_0xca9f7e[_0x2dad4a(0x13d)]({'path':_0x3a3d55['replaceAll']('$',':'),'label':_0x10ed07});}}}),_0xca9f7e[_0x532d9e(0x129)](_0x6e0a89=>_0x6e0a89[_0x532d9e(0x12a)]!=='');}function a178_0x2fbf(){const _0x5a066b=['1522158XpuCem','12527144dIsyiq','Invalid\x20route\x20manifest\x20row\x20','src/features/routing/routes.json','Invalid\x20route\x20order\x20for\x20','.tsx','1523462udUEnu','parse','filter','path','Duplicate\x20route\x20path\x20in\x20manifest:\x20','index','object','Route\x20manifest\x20must\x20contain\x20an\x20array:\x20',';\x20expected\x20','has','src/pages','20HLfBGI','forEach','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','Route\x20page\x20file\x20does\x20not\x20exist:\x20','Invalid\x20route\x20manifest\x20','7738515NYdeCy','visible','isArray','13123103izyrja','src/pages/','cwd','push','trim','endsWith',':$1','6VBHBmP','index.tsx','join','24770331uNeycq','4dejiRw','utf-8','Invalid\x20route\x20group\x20for\x20',':\x20path,\x20label,\x20pageFile\x20and\x20visible\x20are\x20required','map','group','pageFile','order','test','slice','replace','isInteger','3669510JkrBbE','replaceAll','match','string'];a178_0x2fbf=function(){return _0x5a066b;};return a178_0x2fbf();}function getDeclaredPages(_0x31c4a1,_0xbe0f09){const _0xa5e276=a178_0x447df5;let _0x95be2c;try{_0x95be2c=JSON[_0xa5e276(0x128)](readFileSync(_0x31c4a1,'utf8'));}catch(_0x259e2d){throw new Error(_0xa5e276(0x136)+_0x31c4a1+':\x20'+String(_0x259e2d));}if(!Array[_0xa5e276(0x139)](_0x95be2c))throw new Error(_0xa5e276(0x12e)+_0x31c4a1);const _0x1d6bd2=new Set();return _0x95be2c[_0xa5e276(0x115)]((_0x54ce34,_0x3c20a5)=>{const _0x27b4da=_0xa5e276;if(!_0x54ce34||typeof _0x54ce34!==_0x27b4da(0x12d)||Array[_0x27b4da(0x139)](_0x54ce34))throw new Error(_0x27b4da(0x123)+(_0x3c20a5+0x1));const _0x12bc1e=_0x54ce34,_0x341c06=_0x12bc1e[_0x27b4da(0x12a)],_0x5884b2=_0x12bc1e['label'],_0x32f115=_0x12bc1e[_0x27b4da(0x117)];if(typeof _0x341c06!==_0x27b4da(0x120)||!/^\/(?!\/)[^?#]*$/['test'](_0x341c06)||typeof _0x5884b2!==_0x27b4da(0x120)||!_0x5884b2[_0x27b4da(0x13e)]()||typeof _0x32f115!=='string'||!/^src\/pages\/(?!.*\.\.)[^/].*\.tsx$/[_0x27b4da(0x119)](_0x32f115)||typeof _0x12bc1e[_0x27b4da(0x138)]!=='boolean')throw new Error(_0x27b4da(0x123)+(_0x3c20a5+0x1)+_0x27b4da(0x114));if(_0x1d6bd2[_0x27b4da(0x130)](_0x341c06))throw new Error(_0x27b4da(0x12b)+_0x341c06);_0x1d6bd2['add'](_0x341c06);if(!existsSync(resolve(_0xbe0f09,_0x32f115)))throw new Error(_0x27b4da(0x135)+_0x32f115);const _0x28fa92=_0x32f115[_0x27b4da(0x11a)](_0x27b4da(0x13b)['length'])['replace'](/\/index\.tsx$/,'')[_0x27b4da(0x11b)](/\.tsx$/,'')[_0x27b4da(0x11e)]('$',':')[_0x27b4da(0x11b)](/\[([^/\]]+)\]/g,_0x27b4da(0x140)),_0x17d596=_0x28fa92===_0x27b4da(0x12c)?'/':'/'+_0x28fa92;if(_0x341c06!==_0x17d596)throw new Error('Route\x20'+_0x341c06+'\x20disagrees\x20with\x20pageFile\x20'+_0x32f115+_0x27b4da(0x12f)+_0x17d596);if(_0x12bc1e[_0x27b4da(0x116)]!==undefined&&(typeof _0x12bc1e[_0x27b4da(0x116)]!=='string'||!_0x12bc1e['group'][_0x27b4da(0x13e)]()))throw new Error(_0x27b4da(0x113)+_0x341c06);if(_0x12bc1e[_0x27b4da(0x118)]!==undefined&&(!Number[_0x27b4da(0x11c)](_0x12bc1e[_0x27b4da(0x118)])||_0x12bc1e[_0x27b4da(0x118)]<0x0))throw new Error(_0x27b4da(0x125)+_0x341c06);return{'path':_0x341c06,'label':_0x5884b2[_0x27b4da(0x13e)](),'visible':_0x12bc1e[_0x27b4da(0x138)],..._0x12bc1e[_0x27b4da(0x116)]===undefined?{}:{'group':_0x12bc1e['group']['trim']()},..._0x12bc1e[_0x27b4da(0x118)]===undefined?{}:{'order':_0x12bc1e['order']}};});}
1
+ const a178_0x1a445b=a178_0x2555;(function(_0x2d5e6a,_0x567096){const _0x39ae2a=a178_0x2555,_0x3cc8e2=_0x2d5e6a();while(!![]){try{const _0x16aed4=-parseInt(_0x39ae2a(0x9c))/0x1*(-parseInt(_0x39ae2a(0xaf))/0x2)+-parseInt(_0x39ae2a(0xaa))/0x3+-parseInt(_0x39ae2a(0xa2))/0x4*(parseInt(_0x39ae2a(0x9f))/0x5)+parseInt(_0x39ae2a(0x90))/0x6+-parseInt(_0x39ae2a(0x97))/0x7*(parseInt(_0x39ae2a(0x98))/0x8)+parseInt(_0x39ae2a(0x85))/0x9+-parseInt(_0x39ae2a(0x84))/0xa;if(_0x16aed4===_0x567096)break;else _0x3cc8e2['push'](_0x3cc8e2['shift']());}catch(_0x3a0e59){_0x3cc8e2['push'](_0x3cc8e2['shift']());}}}(a178_0x10f5,0xe3ac2));function a178_0x2555(_0x3bbf0f,_0xa77e89){_0x3bbf0f=_0x3bbf0f-0x7b;const _0x10f5e1=a178_0x10f5();let _0x2555a7=_0x10f5e1[_0x3bbf0f];return _0x2555a7;}import{existsSync,readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a178_0x1a445b(0x92)](),a178_0x1a445b(0x82));function a178_0x10f5(){const _0x45f10a=['5UpzSav','utf8',':\x20path,\x20label,\x20pageFile\x20and\x20visible\x20are\x20required','1113612iXhroK','Invalid\x20route\x20manifest\x20','trim','Invalid\x20route\x20group\x20for\x20','.tsx','label','endsWith','join','1130004wIvzsB','isArray','path','group','string','2534JkoZLI','pageFile','\x20disagrees\x20with\x20pageFile\x20','src/pages/','Route\x20manifest\x20must\x20contain\x20an\x20array:\x20','concat','slice','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','map','Invalid\x20route\x20order\x20for\x20','visible','src/pages','Route\x20page\x20file\x20does\x20not\x20exist:\x20','15437590lorgHK','12685554VhYQze','test','order','replaceAll','index','utf-8',':$1','Route\x20',';\x20expected\x20','isInteger','Invalid\x20route\x20manifest\x20row\x20','7329516xdKuEp','replace','cwd','Duplicate\x20route\x20path\x20in\x20manifest:\x20','forEach','boolean','split','11249MANxmr','2896AsbNbV','has','isDirectory','index.tsx','854wQPpyM','match','src/features/routing/routes.json'];a178_0x10f5=function(){return _0x45f10a;};return a178_0x10f5();}export function extractTitleFromComment(_0x104a6f){const _0x411b99=a178_0x1a445b;try{const _0x5eb6d1=readFileSync(_0x104a6f,_0x411b99(0x8a)),_0x51b91b=_0x5eb6d1[_0x411b99(0x9d)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x51b91b&&_0x51b91b[0x1]){const _0x17fb19=_0x51b91b[0x1],_0x4015ad=_0x17fb19['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x4015ad&&_0x4015ad[0x1])return _0x4015ad[0x1]['trim']();}let _0x5b5078=null;const _0x422321=_0x5eb6d1[_0x411b99(0x9d)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x422321&&_0x422321[0x1]&&(_0x5b5078=_0x422321[0x1]);if(!_0x5b5078){const _0x46aa6b=_0x5eb6d1[_0x411b99(0x9d)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x46aa6b&&_0x46aa6b[0x1]&&(_0x5b5078=_0x46aa6b[0x1]);}if(_0x5b5078){const _0x4f4d9a=new RegExp('\x5cb'+_0x5b5078+_0x411b99(0x7e)),_0x3ed171=_0x5eb6d1[_0x411b99(0x9d)](_0x4f4d9a);if(_0x3ed171&&_0x3ed171[0x1])return _0x3ed171[0x1];return _0x5b5078;}return null;}catch(_0x5201af){return null;}}export function getLocalPages(_0x5f4f9d=pagesDir,_0x3af38f=pagesDir,_0x33f057=process[a178_0x1a445b(0x92)]()){const _0x59ed86=a178_0x1a445b;if(resolve(_0x5f4f9d)===resolve(_0x3af38f)){const _0x5044ad=join(_0x33f057,_0x59ed86(0x9e));if(existsSync(_0x5044ad))return getDeclaredPages(_0x5044ad,_0x33f057);}let _0x5ab5b2=[];const _0x86459f=readdirSync(_0x5f4f9d);return _0x86459f[_0x59ed86(0x94)](_0x29b13a=>{const _0x5f441e=_0x59ed86,_0x3afd1c=join(_0x5f4f9d,_0x29b13a),_0x193235=statSync(_0x3afd1c);if(_0x193235&&_0x193235[_0x5f441e(0x9a)]())_0x5ab5b2=_0x5ab5b2[_0x5f441e(0x7c)](getLocalPages(_0x3afd1c,_0x3af38f,_0x33f057));else{if(_0x29b13a['endsWith'](_0x5f441e(0xa6))){let _0x24fc38=relative(_0x3af38f,_0x3afd1c);_0x24fc38[_0x5f441e(0xa8)](_0x5f441e(0x9b))?_0x24fc38=_0x24fc38['replace'](/index\.tsx$/,''):_0x24fc38=_0x24fc38[_0x5f441e(0x91)](/\.tsx$/,'');_0x24fc38[_0x5f441e(0xa8)](sep)&&(_0x24fc38=_0x24fc38[_0x5f441e(0x7d)](0x0,-0x1));const _0x5c3cd4=_0x24fc38[_0x5f441e(0x96)](sep)[_0x5f441e(0xa9)]('/'),_0xb82897=extractTitleFromComment(_0x3afd1c),_0x4ca1db=_0xb82897||_0x5c3cd4;_0x5ab5b2['push']({'path':_0x5c3cd4['replaceAll']('$',':'),'label':_0x4ca1db});}}}),_0x5ab5b2['filter'](_0x42f3f3=>_0x42f3f3[_0x59ed86(0xac)]!=='');}function getDeclaredPages(_0x1946ca,_0x23600e){const _0x3f0da8=a178_0x1a445b;let _0x5f5823;try{_0x5f5823=JSON['parse'](readFileSync(_0x1946ca,_0x3f0da8(0xa0)));}catch(_0x21658c){throw new Error(_0x3f0da8(0xa3)+_0x1946ca+':\x20'+String(_0x21658c));}if(!Array[_0x3f0da8(0xab)](_0x5f5823))throw new Error(_0x3f0da8(0x7b)+_0x1946ca);const _0x4f1b52=new Set();return _0x5f5823[_0x3f0da8(0x7f)]((_0x2491f8,_0x13c39a)=>{const _0x1dd7ac=_0x3f0da8;if(!_0x2491f8||typeof _0x2491f8!=='object'||Array[_0x1dd7ac(0xab)](_0x2491f8))throw new Error(_0x1dd7ac(0x8f)+(_0x13c39a+0x1));const _0x3819bd=_0x2491f8,_0x1155c5=_0x3819bd[_0x1dd7ac(0xac)],_0x5211f4=_0x3819bd[_0x1dd7ac(0xa7)],_0x3906e8=_0x3819bd[_0x1dd7ac(0xb0)];if(typeof _0x1155c5!==_0x1dd7ac(0xae)||!/^\/(?!\/)[^?#]*$/[_0x1dd7ac(0x86)](_0x1155c5)||typeof _0x5211f4!=='string'||!_0x5211f4[_0x1dd7ac(0xa4)]()||typeof _0x3906e8!==_0x1dd7ac(0xae)||!/^src\/pages\/(?!.*\.\.)[^/].*\.tsx$/[_0x1dd7ac(0x86)](_0x3906e8)||typeof _0x3819bd['visible']!==_0x1dd7ac(0x95))throw new Error(_0x1dd7ac(0x8f)+(_0x13c39a+0x1)+_0x1dd7ac(0xa1));if(_0x4f1b52[_0x1dd7ac(0x99)](_0x1155c5))throw new Error(_0x1dd7ac(0x93)+_0x1155c5);_0x4f1b52['add'](_0x1155c5);if(!existsSync(resolve(_0x23600e,_0x3906e8)))throw new Error(_0x1dd7ac(0x83)+_0x3906e8);const _0x314f89=_0x3906e8[_0x1dd7ac(0x7d)](_0x1dd7ac(0xb2)['length'])[_0x1dd7ac(0x91)](/\/index\.tsx$/,'')['replace'](/\.tsx$/,'')[_0x1dd7ac(0x88)]('$',':')['replace'](/\[([^/\]]+)\]/g,_0x1dd7ac(0x8b)),_0x493005=_0x314f89===_0x1dd7ac(0x89)?'/':'/'+_0x314f89;if(_0x1155c5!==_0x493005)throw new Error(_0x1dd7ac(0x8c)+_0x1155c5+_0x1dd7ac(0xb1)+_0x3906e8+_0x1dd7ac(0x8d)+_0x493005);if(_0x3819bd['group']!==undefined&&(typeof _0x3819bd[_0x1dd7ac(0xad)]!==_0x1dd7ac(0xae)||!_0x3819bd[_0x1dd7ac(0xad)][_0x1dd7ac(0xa4)]()))throw new Error(_0x1dd7ac(0xa5)+_0x1155c5);if(_0x3819bd[_0x1dd7ac(0x87)]!==undefined&&(!Number[_0x1dd7ac(0x8e)](_0x3819bd[_0x1dd7ac(0x87)])||_0x3819bd[_0x1dd7ac(0x87)]<0x0))throw new Error(_0x1dd7ac(0x80)+_0x1155c5);return{'path':_0x1155c5,'label':_0x5211f4['trim'](),'visible':_0x3819bd[_0x1dd7ac(0x81)],..._0x3819bd['group']===undefined?{}:{'group':_0x3819bd['group']['trim']()},..._0x3819bd[_0x1dd7ac(0x87)]===undefined?{}:{'order':_0x3819bd[_0x1dd7ac(0x87)]}};});}
@@ -1 +1 @@
1
- (function(_0x134c97,_0x30fdf3){const _0x18918d=a179_0x3f5d,_0x1816a9=_0x134c97();while(!![]){try{const _0x2220a0=parseInt(_0x18918d(0x176))/0x1+parseInt(_0x18918d(0x180))/0x2*(parseInt(_0x18918d(0x173))/0x3)+-parseInt(_0x18918d(0x177))/0x4*(-parseInt(_0x18918d(0x16e))/0x5)+parseInt(_0x18918d(0x178))/0x6*(-parseInt(_0x18918d(0x17a))/0x7)+parseInt(_0x18918d(0x17e))/0x8+parseInt(_0x18918d(0x182))/0x9*(parseInt(_0x18918d(0x179))/0xa)+-parseInt(_0x18918d(0x17f))/0xb*(parseInt(_0x18918d(0x172))/0xc);if(_0x2220a0===_0x30fdf3)break;else _0x1816a9['push'](_0x1816a9['shift']());}catch(_0x528440){_0x1816a9['push'](_0x1816a9['shift']());}}}(a179_0x36cb,0xdd27b));function a179_0x36cb(){const _0x2cb475=['errors','5552576MGjkYA','244574ZCtQTN','10arRrOm','resources','1547568RrvnnI','length','CSS\x20URL\x20is\x20unreachable','20PDEqhw','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','map','JS\x20URL\x20is\x20unreachable','1452vniOgf','577506iMmxFx','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','path','1725907UzFvVx','1633580mBkPQx','672djvEcm','10LlhFFL','99491oLIgWx','label','push'];a179_0x36cb=function(){return _0x2cb475;};return a179_0x36cb();}import{menuPathKey}from'../../../commands/menu/shared/path.js';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';export function validateJsUrl(_0x4d6ff1){const _0x5ba63a=a179_0x3f5d,_0x39c201=[];return!isValidJsHttpsUrl(_0x4d6ff1)&&_0x39c201['push'](_0x5ba63a(0x16f)),{'ok':_0x39c201[_0x5ba63a(0x183)]===0x0,'errors':_0x39c201};}export function validateCssUrl(_0x4b6968){const _0x2f0fd8=a179_0x3f5d,_0x27ad0d=[];return!isValidCssHttpsUrl(_0x4b6968)&&_0x27ad0d[_0x2f0fd8(0x17c)](_0x2f0fd8(0x174)),{'ok':_0x27ad0d[_0x2f0fd8(0x183)]===0x0,'errors':_0x27ad0d};}function a179_0x3f5d(_0x2af09c,_0x4db45f){_0x2af09c=_0x2af09c-0x16e;const _0x36cb58=a179_0x36cb();let _0x3f5d85=_0x36cb58[_0x2af09c];return _0x3f5d85;}export async function validateJsUrlReachable(_0xf74cfd){const _0x3c03b3=a179_0x3f5d,_0xe3823f=validateJsUrl(_0xf74cfd);if(!_0xe3823f['ok'])return _0xe3823f;const _0x403191=await isUrlReachable(_0xf74cfd);if(!_0x403191)_0xe3823f[_0x3c03b3(0x17d)][_0x3c03b3(0x17c)](_0x3c03b3(0x171));return{'ok':_0xe3823f[_0x3c03b3(0x17d)]['length']===0x0,'errors':_0xe3823f[_0x3c03b3(0x17d)]};}export async function validateCssUrlReachable(_0x62c5ae){const _0x1a1137=a179_0x3f5d,_0x59da5a=validateCssUrl(_0x62c5ae);if(!_0x59da5a['ok'])return _0x59da5a;const _0x18bf3b=await isUrlReachable(_0x62c5ae);if(!_0x18bf3b)_0x59da5a[_0x1a1137(0x17d)][_0x1a1137(0x17c)](_0x1a1137(0x184));return{'ok':_0x59da5a['errors']['length']===0x0,'errors':_0x59da5a['errors']};}export function buildCompareRows(_0x22d4d7,_0x4e7ae8){const _0x8a3c87=a179_0x3f5d;return _0x22d4d7[_0x8a3c87(0x170)](_0x3d5e3e=>({'label':_0x3d5e3e[_0x8a3c87(0x17b)],'path':_0x3d5e3e[_0x8a3c87(0x175)],'local':!![],'online':_0x4e7ae8['has'](menuPathKey(_0x3d5e3e['path']))}));}export async function doCreateMenus(_0x48826f,_0x2dc343,_0x2db947,_0x4b0b49,_0x2d7b18){const _0x59ae81=a179_0x3f5d,_0x178b35=_0x2d7b18?await createMenus(_0x48826f,_0x2dc343,_0x2db947,_0x4b0b49,_0x2d7b18):await createMenus(_0x48826f,_0x2dc343,_0x2db947,_0x4b0b49);return{'created':_0x178b35[_0x59ae81(0x183)],'failed':0x0,'labels':_0x2db947['map'](_0xaa0e93=>_0xaa0e93[_0x59ae81(0x17b)]),'menus':_0x178b35};}export function filterMenusWithResources(_0x738d11){const _0x12c840=a179_0x3f5d;return _0x738d11['filter'](_0x187e63=>_0x187e63[_0x12c840(0x181)][_0x12c840(0x183)]>0x0);}export async function fetchMenuData(_0x2078df,_0x178143){const _0x237b4c=a179_0x3f5d,_0x179e60=getLocalPages(),_0x126d23=await getOnlineMenuList(_0x2078df,_0x178143),_0x233399=new Set(_0x126d23[_0x237b4c(0x170)](_0x2f3261=>menuPathKey(_0x2f3261['path'])));return{'localPages':_0x179e60,'onlineMenuList':_0x126d23,'onlinePaths':_0x233399};}export async function fetchOnlineMenuList(_0x2fa0f,_0x2f6066){return getOnlineMenuList(_0x2fa0f,_0x2f6066);}
1
+ (function(_0x5e7917,_0x1c8a03){const _0xd40843=a179_0x2ce5,_0x2b495c=_0x5e7917();while(!![]){try{const _0x52808a=-parseInt(_0xd40843(0x9e))/0x1+parseInt(_0xd40843(0x96))/0x2*(-parseInt(_0xd40843(0x9f))/0x3)+-parseInt(_0xd40843(0x94))/0x4+parseInt(_0xd40843(0x98))/0x5+parseInt(_0xd40843(0x92))/0x6*(parseInt(_0xd40843(0x93))/0x7)+parseInt(_0xd40843(0xa2))/0x8+parseInt(_0xd40843(0xa1))/0x9;if(_0x52808a===_0x1c8a03)break;else _0x2b495c['push'](_0x2b495c['shift']());}catch(_0x5e9218){_0x2b495c['push'](_0x2b495c['shift']());}}}(a179_0x1056,0xe07e6));import{menuPathKey}from'../../../commands/menu/shared/path.js';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';export function validateJsUrl(_0x587db7){const _0xafc7f2=a179_0x2ce5,_0x3d4397=[];return!isValidJsHttpsUrl(_0x587db7)&&_0x3d4397[_0xafc7f2(0xa4)](_0xafc7f2(0x91)),{'ok':_0x3d4397[_0xafc7f2(0x9a)]===0x0,'errors':_0x3d4397};}export function validateCssUrl(_0x1a8b46){const _0x2d50c6=a179_0x2ce5,_0x9a9f27=[];return!isValidCssHttpsUrl(_0x1a8b46)&&_0x9a9f27[_0x2d50c6(0xa4)](_0x2d50c6(0x9b)),{'ok':_0x9a9f27[_0x2d50c6(0x9a)]===0x0,'errors':_0x9a9f27};}export async function validateJsUrlReachable(_0x420bc8){const _0x2d46d1=a179_0x2ce5,_0x376113=validateJsUrl(_0x420bc8);if(!_0x376113['ok'])return _0x376113;const _0x4d5955=await isUrlReachable(_0x420bc8);if(!_0x4d5955)_0x376113['errors'][_0x2d46d1(0xa4)]('JS\x20URL\x20is\x20unreachable');return{'ok':_0x376113[_0x2d46d1(0x9d)][_0x2d46d1(0x9a)]===0x0,'errors':_0x376113[_0x2d46d1(0x9d)]};}function a179_0x2ce5(_0x2d59b1,_0x23f58f){_0x2d59b1=_0x2d59b1-0x91;const _0x105610=a179_0x1056();let _0x2ce5d9=_0x105610[_0x2d59b1];return _0x2ce5d9;}export async function validateCssUrlReachable(_0x2e2849){const _0x435b10=a179_0x2ce5,_0x47389b=validateCssUrl(_0x2e2849);if(!_0x47389b['ok'])return _0x47389b;const _0x88d584=await isUrlReachable(_0x2e2849);if(!_0x88d584)_0x47389b['errors'][_0x435b10(0xa4)]('CSS\x20URL\x20is\x20unreachable');return{'ok':_0x47389b[_0x435b10(0x9d)]['length']===0x0,'errors':_0x47389b[_0x435b10(0x9d)]};}export function buildCompareRows(_0x394960,_0x466d02){const _0x1a8cc2=a179_0x2ce5;return _0x394960[_0x1a8cc2(0xa0)](_0x472484=>({'label':_0x472484[_0x1a8cc2(0x97)],'path':_0x472484['path'],'local':!![],'online':_0x466d02[_0x1a8cc2(0x99)](menuPathKey(_0x472484[_0x1a8cc2(0xa3)]))}));}export async function doCreateMenus(_0x4f7558,_0x3523c3,_0x2acc78,_0x59e0d6,_0x2eba6b){const _0x5b7095=a179_0x2ce5,_0x5f0855=_0x2eba6b?await createMenus(_0x4f7558,_0x3523c3,_0x2acc78,_0x59e0d6,_0x2eba6b):await createMenus(_0x4f7558,_0x3523c3,_0x2acc78,_0x59e0d6);return{'created':_0x5f0855[_0x5b7095(0x9a)],'failed':0x0,'labels':_0x2acc78[_0x5b7095(0xa0)](_0x185f8d=>_0x185f8d[_0x5b7095(0x97)]),'menus':_0x5f0855};}export function filterMenusWithResources(_0x44a161){const _0xb977fc=a179_0x2ce5;return _0x44a161[_0xb977fc(0x9c)](_0x5026be=>_0x5026be[_0xb977fc(0x95)][_0xb977fc(0x9a)]>0x0);}export async function fetchMenuData(_0xca013b,_0x767f12){const _0x5638ef=a179_0x2ce5,_0xc45bd4=getLocalPages(),_0x33dadb=await getOnlineMenuList(_0xca013b,_0x767f12),_0x242e65=new Set(_0x33dadb[_0x5638ef(0xa0)](_0x2ad716=>menuPathKey(_0x2ad716[_0x5638ef(0xa3)])));return{'localPages':_0xc45bd4,'onlineMenuList':_0x33dadb,'onlinePaths':_0x242e65};}export async function fetchOnlineMenuList(_0x3d3067,_0x4fb558){return getOnlineMenuList(_0x3d3067,_0x4fb558);}function a179_0x1056(){const _0xc2f66b=['6656844zZJqeT','resources','2811874rYSMgs','label','6344385WeGxuU','has','length','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','filter','errors','988593TkRSjV','3kFbgEu','map','17320968iXYhUb','3997048xZvJJS','path','push','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','462rgVIeP','116837NUVNKf'];a179_0x1056=function(){return _0xc2f66b;};return a179_0x1056();}
@@ -1 +1 @@
1
- const a180_0x4f6c0f=a180_0x3b8b;(function(_0x581fc6,_0x19b88d){const _0x351399=a180_0x3b8b,_0x5e20fc=_0x581fc6();while(!![]){try{const _0x5788cd=-parseInt(_0x351399(0xda))/0x1+parseInt(_0x351399(0xcf))/0x2+parseInt(_0x351399(0xfa))/0x3+parseInt(_0x351399(0x118))/0x4+parseInt(_0x351399(0xd2))/0x5+-parseInt(_0x351399(0x110))/0x6*(-parseInt(_0x351399(0xdd))/0x7)+-parseInt(_0x351399(0xe0))/0x8;if(_0x5788cd===_0x19b88d)break;else _0x5e20fc['push'](_0x5e20fc['shift']());}catch(_0x31f262){_0x5e20fc['push'](_0x5e20fc['shift']());}}}(a180_0x3ca1,0x74ed8));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':a180_0x4f6c0f(0xc4),'required':!![],'description':a180_0x4f6c0f(0x10e)};export const MENU_SORT_FLAG={'name':a180_0x4f6c0f(0xf0),'type':a180_0x4f6c0f(0xc4),'description':a180_0x4f6c0f(0xc9)};export const MENU_PARENT_ID_FLAG={'name':a180_0x4f6c0f(0x105),'type':'string','description':a180_0x4f6c0f(0xf4)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a180_0x4f6c0f(0xee),'type':'string','description':a180_0x4f6c0f(0x102)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a180_0x4f6c0f(0xe1),'type':a180_0x4f6c0f(0xeb),'description':'Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches'},{'name':'expected-children-count','type':a180_0x4f6c0f(0xc4),'description':'Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches'}];export function validateExactId(_0x4a9b84){const _0x464272=a180_0x4f6c0f,_0x2d3328=_0x4a9b84[_0x464272(0xf6)]('id');if(!Number['isSafeInteger'](_0x2d3328)||_0x2d3328<=0x0)throw CliErrors[_0x464272(0xe3)](_0x464272(0x10a));return _0x2d3328;}export function validateSort(_0x526e18,_0x25c10d=a180_0x4f6c0f(0xf0)){const _0x29baf4=a180_0x4f6c0f;if(!hasFlag(_0x526e18,_0x25c10d))return undefined;const _0x5ff994=_0x526e18['num'](_0x25c10d);if(!Number[_0x29baf4(0xdf)](_0x5ff994)||_0x5ff994<0x0||_0x5ff994>MAX_MENU_SORT)throw menuError('menu_sort_invalid','--'+_0x25c10d+_0x29baf4(0xc5)+MAX_MENU_SORT+'.','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.');return _0x5ff994;}export function nextSiblingSort(_0x5cb1a9,_0x2bdd39,_0x2fcaba){const _0x12ebd2=a180_0x4f6c0f,_0x3e1c63=getChildren(_0x5cb1a9,_0x2bdd39)[_0x12ebd2(0x11c)](_0x17b4fa=>_0x17b4fa['sort'])[_0x12ebd2(0xd8)](_0x3aabc4=>typeof _0x3aabc4===_0x12ebd2(0xc4));if(_0x3e1c63[_0x12ebd2(0x104)]===0x0)return 0x0;const _0x219720=Math[_0x12ebd2(0x11a)](..._0x3e1c63);if(_0x219720>=MAX_MENU_SORT)throw menuError(_0x12ebd2(0x10d),_0x12ebd2(0x12f)+_0x2fcaba+_0x12ebd2(0xea)+_0x219720+'.',_0x12ebd2(0x113)+MAX_MENU_SORT+_0x12ebd2(0xcb));return _0x219720+0x1;}export function requireExplicitYes(_0x1ba839){const _0x3ad8b0=a180_0x4f6c0f;if(_0x1ba839['bool']('dry-run'))return;if(!_0x1ba839[_0x3ad8b0(0x108)](_0x3ad8b0(0xed)))throw menuError(_0x3ad8b0(0x107),_0x3ad8b0(0xe7),_0x3ad8b0(0xf7));}export async function fetchMutationSnapshot(_0x1fb477,_0x5658c3,_0x2b75fb){const _0x3081ed=a180_0x4f6c0f;try{return await fetchMenuSnapshot(_0x1fb477[_0x3081ed(0x124)],_0x1fb477[_0x3081ed(0x117)]);}catch(_0x51bf8b){throw mapMenuApiError(_0x51bf8b,_0x3081ed(0x128)+_0x5658c3,_0x2b75fb);}}export async function recheckMutationSnapshot(_0x22a2c2,_0x25190d,_0x35ce5c,_0x5d0cab){const _0x4a3157=a180_0x4f6c0f;let _0x4d7f57;try{_0x4d7f57=await fetchMenuSnapshot(_0x22a2c2[_0x4a3157(0x124)],_0x22a2c2[_0x4a3157(0x117)]);}catch(_0x1e2b3e){const _0x5f2fd8=mapMenuApiError(_0x1e2b3e,_0x4a3157(0x11b)+_0x35ce5c,_0x5d0cab);throw menuFailure(_0x5f2fd8,_0x25190d,{'stage':_0x4a3157(0xe5),'failed':_0x5d0cab==null?{}:{'id':_0x5d0cab}});}if(_0x4d7f57['hash']!==_0x25190d[_0x4a3157(0xf2)]){const _0x54c7db=menuError(_0x4a3157(0x119),'Online\x20menu\x20state\x20changed\x20before\x20'+_0x35ce5c+_0x4a3157(0x10c),_0x4a3157(0x115));throw menuFailure(_0x54c7db,_0x25190d,{'stage':'pre-write-recheck','failed':{..._0x5d0cab==null?{}:{'id':_0x5d0cab},'expectedSnapshotHash':_0x25190d[_0x4a3157(0xf2)],'currentSnapshotHash':_0x4d7f57[_0x4a3157(0xcc)]}});}return _0x4d7f57;}export function parseParentId(_0x487d58,_0x4413d1,_0x4b63d3={}){const _0x109f8a=a180_0x4f6c0f;if(!hasFlag(_0x487d58,_0x4413d1)){if(_0x4b63d3[_0x109f8a(0x11f)])throw CliErrors['flagMissing'](_0x4413d1);return undefined;}const _0x562aa5=_0x487d58[_0x109f8a(0xec)](_0x4413d1)[_0x109f8a(0xe4)]();if(_0x562aa5[_0x109f8a(0x10f)]()===_0x109f8a(0x100))return null;if(!/^\d+$/[_0x109f8a(0x125)](_0x562aa5))throw CliErrors['validation']('--'+_0x4413d1+_0x109f8a(0xdc));const _0x1ea2a8=Number(_0x562aa5);if(!Number[_0x109f8a(0xdf)](_0x1ea2a8)||_0x1ea2a8<=0x0)throw CliErrors['validation']('--'+_0x4413d1+_0x109f8a(0xdc));return _0x1ea2a8;}export function requireMenu(_0x2656ff,_0x34f9e7){const _0x20d3c9=a180_0x4f6c0f,_0x35d507=_0x2656ff[_0x20d3c9(0xc3)][_0x20d3c9(0xd6)](_0x34f9e7);if(!_0x35d507)throw menuError(_0x20d3c9(0xc7),_0x20d3c9(0xfb)+_0x34f9e7,_0x20d3c9(0x120));return _0x35d507;}export function requireFolder(_0x136c53,_0x2937e0){const _0x4f7ac4=a180_0x4f6c0f,_0x3d7f41=requireMenu(_0x136c53,_0x2937e0);if(_0x3d7f41[_0x4f7ac4(0xe2)]!==_0x4f7ac4(0x126))throw menuError(_0x4f7ac4(0x112),_0x4f7ac4(0x114)+_0x2937e0+_0x4f7ac4(0x10b)+(_0x3d7f41[_0x4f7ac4(0xe2)]||_0x4f7ac4(0xca))+_0x4f7ac4(0xff),_0x4f7ac4(0x103));return _0x3d7f41;}export function assertExpectedState(_0x36cc55,_0x40011a){const _0xe9fc6a=a180_0x4f6c0f;if(hasFlag(_0x36cc55,'expect-parent-id')){const _0x2e5e80=parseParentId(_0x36cc55,_0xe9fc6a(0xee),{'required':!![]});if(_0x40011a[_0xe9fc6a(0x121)]!==_0x2e5e80)throw stateDrift(_0xe9fc6a(0x114)+_0x40011a['id']+'\x20parent\x20changed:\x20expected\x20'+formatParent(_0x2e5e80)+',\x20current\x20'+formatParent(_0x40011a[_0xe9fc6a(0x121)])+'.');}if(hasFlag(_0x36cc55,_0xe9fc6a(0xe1))){const _0x4a9a7c=_0x36cc55[_0xe9fc6a(0xec)](_0xe9fc6a(0xe1));if(_0x40011a[_0xe9fc6a(0x101)]!==_0x4a9a7c)throw stateDrift('Menu\x20'+_0x40011a['id']+'\x20path\x20changed:\x20expected\x20'+JSON[_0xe9fc6a(0xd1)](_0x4a9a7c)+',\x20current\x20'+JSON['stringify'](_0x40011a[_0xe9fc6a(0x101)])+'.');}if(hasFlag(_0x36cc55,_0xe9fc6a(0xfc))){const _0xdf76c2=_0x36cc55[_0xe9fc6a(0xf6)](_0xe9fc6a(0xfc));if(!Number[_0xe9fc6a(0xdf)](_0xdf76c2)||_0xdf76c2<0x0)throw CliErrors[_0xe9fc6a(0xe3)](_0xe9fc6a(0xde));if(_0x40011a[_0xe9fc6a(0xd4)]!==_0xdf76c2)throw stateDrift('Menu\x20'+_0x40011a['id']+_0xe9fc6a(0x11e)+_0xdf76c2+_0xe9fc6a(0xd3)+_0x40011a[_0xe9fc6a(0xd4)]+'.');}}export function assertVerified(_0x340d1a,_0x4c7f82,_0x16f46d=a180_0x4f6c0f(0x123)){if(!_0x340d1a)throw menuError('menu_verification_failed',_0x4c7f82,_0x16f46d);}function a180_0x3b8b(_0xfe1cdc,_0x513f98){_0xfe1cdc=_0xfe1cdc-0xc3;const _0x3ca112=a180_0x3ca1();let _0x3b8bf1=_0x3ca112[_0xfe1cdc];return _0x3b8bf1;}export function mutationResult(_0x479457){const _0x5df7c8=a180_0x4f6c0f;return{'operation':_0x479457[_0x5df7c8(0x12a)],'selector':_0x479457[_0x5df7c8(0xd9)],'before':_0x479457[_0x5df7c8(0xd7)],'after':_0x479457[_0x5df7c8(0xce)],'dryRun':_0x479457[_0x5df7c8(0xf3)],'backend':_0x479457[_0x5df7c8(0x11d)],..._0x479457['plannedActions']?{'plannedActions':_0x479457['plannedActions']}:{},..._0x479457[_0x5df7c8(0xd5)]?{'targets':_0x479457[_0x5df7c8(0xd5)]}:{},..._0x479457[_0x5df7c8(0x12e)]?{'deleteOrder':_0x479457['deleteOrder']}:{},'snapshotHash':_0x479457['snapshotHash'],..._0x479457[_0x5df7c8(0x129)]?{'cascade':_0x479457[_0x5df7c8(0x129)]}:{},..._0x479457['planFile']?{'planFile':_0x479457[_0x5df7c8(0xe8)]}:{},'succeeded':_0x479457[_0x5df7c8(0xfd)]??[],'failed':_0x479457[_0x5df7c8(0xef)]??[],'warnings':_0x479457[_0x5df7c8(0x12c)]??[],'verification':_0x479457[_0x5df7c8(0xdb)],'error':_0x479457['error']};}export function menuDryRunResult(_0x5cdbce,_0x288341){return{..._0x5cdbce,..._0x288341};}export function menuFailure(_0x384693,_0x351441,_0x5580bf){const _0x3bd589=a180_0x4f6c0f,_0x57fa87=mutationResult({..._0x351441,'after':_0x5580bf[_0x3bd589(0xce)]===undefined?_0x351441[_0x3bd589(0xce)]:_0x5580bf[_0x3bd589(0xce)],'backend':_0x5580bf[_0x3bd589(0x11d)]??_0x351441[_0x3bd589(0x11d)],'dryRun':![],'succeeded':_0x5580bf[_0x3bd589(0xfd)]??[],'failed':_0x5580bf['failedRecords']??[{..._0x5580bf['failed']??{},'stage':_0x5580bf[_0x3bd589(0xe6)],'code':_0x384693['code'],'message':_0x384693[_0x3bd589(0xcd)]}],'warnings':[..._0x351441[_0x3bd589(0x12c)],..._0x5580bf[_0x3bd589(0x12c)]??[]],'verification':_0x5580bf['verification'],'error':{'code':_0x384693[_0x3bd589(0x106)],'message':_0x384693[_0x3bd589(0xcd)],..._0x384693[_0x3bd589(0x109)]?{'hint':_0x384693['hint']}:{}}});return Object[_0x3bd589(0x122)](_0x384693,_0x3bd589(0xf9),{'value':_0x57fa87,'enumerable':!![],'configurable':!![]}),_0x384693;}export function asVerificationError(_0x186dbb,_0x2b3796){const _0x5ba40f=a180_0x4f6c0f;if(_0x186dbb instanceof CliError&&_0x186dbb['code']===_0x5ba40f(0x127))return _0x186dbb;const _0x15843b=_0x186dbb instanceof Error?_0x186dbb[_0x5ba40f(0xcd)]:String(_0x186dbb);return menuError(_0x5ba40f(0x127),''+_0x2b3796+(_0x15843b?':\x20'+_0x15843b:''),_0x5ba40f(0xf1));}export function describeMenuErrorCause(_0x2726f8,_0x284a07,_0x2dc808){const _0x13f4b6=a180_0x4f6c0f,_0x5bcaf9=mapMenuApiError(_0x2726f8,_0x284a07,_0x2dc808);return{'causeCode':_0x5bcaf9[_0x13f4b6(0x106)],'causeMessage':_0x5bcaf9[_0x13f4b6(0xcd)]};}export function hasFlag(_0x2e1f7,_0x23be20){const _0x58277e=a180_0x4f6c0f;return Object[_0x58277e(0xf5)][_0x58277e(0xc6)][_0x58277e(0xf8)](_0x2e1f7['rawFlags'],_0x23be20)&&_0x2e1f7['rawFlags'][_0x23be20]!==undefined;}export function toApiParentId(_0x6932ff){return _0x6932ff??0x0;}function a180_0x3ca1(){const _0x1c3226=['after','474678yoPKqW','Permission\x20denied\x20while\x20attempting\x20to\x20','stringify','4040900xeoZLJ',',\x20current\x20','childrenCount','targets','get','before','filter','selector','578177DVgyru','verification','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','793709CguioT','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','isSafeInteger','20946592AaUDiy','expect-path','type','validation','trim','pre-write-recheck','stage','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','planFile','\x20menu\x20','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','string','str','yes','expect-parent-id','failed','sort','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','snapshotHash','dryRun','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','prototype','num','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','call','data','2305452DSMcAw','Online\x20menu\x20not\x20found:\x20','expected-children-count','succeeded','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','\x22,\x20not\x20folder.','root','path','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','length','parent-id','code','menu_confirmation_required','bool','hint','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','\x20is\x20type\x20\x22',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','menu_sort_overflow','Exact\x20online\x20menu\x20id','toLowerCase','48dfxOPI','Failed\x20to\x20','menu_parent_not_folder','Reorder\x20sibling\x20menus\x20below\x20','Menu\x20','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','cookie','3817352obrgSq','menu_state_drift','max','recheck\x20online\x20menu\x20facts\x20before\x20','map','backend','\x20child\x20count\x20changed:\x20expected\x20','required','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','parentId','defineProperty','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','appCode','test','folder','menu_verification_failed','read\x20online\x20menu\x20facts\x20before\x20','cascade','operation','api_error','warnings','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','deleteOrder','Cannot\x20append\x20a\x20','byId','number','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','hasOwnProperty','menu_not_found','menu_permission_denied','Sibling\x20sort\x20value\x20(non-negative\x20integer)','unknown',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','hash','message'];a180_0x3ca1=function(){return _0x1c3226;};return a180_0x3ca1();}export function formatParent(_0x956819){return _0x956819==null?'root':String(_0x956819);}export function menuError(_0x5db20a,_0x1d50d5,_0x805d8d){return new CliError(_0x5db20a,0x1,_0x1d50d5,_0x805d8d);}export function mapMenuApiError(_0x263ac9,_0x31c068,_0x1813e4){const _0x4b142f=a180_0x4f6c0f;if(_0x263ac9 instanceof CliError&&_0x263ac9[_0x4b142f(0x106)]!==_0x4b142f(0x12b))return _0x263ac9;const _0x51694a=_0x263ac9 instanceof Error?_0x263ac9[_0x4b142f(0xcd)]:String(_0x263ac9);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x4b142f(0x125)](_0x51694a))return menuError(_0x4b142f(0xc8),_0x4b142f(0xd0)+_0x31c068+(_0x1813e4?'\x20menu\x20'+_0x1813e4:'')+'.',_0x4b142f(0xfe));return menuError('menu_mutation_failed',_0x4b142f(0x111)+_0x31c068+(_0x1813e4?_0x4b142f(0xe9)+_0x1813e4:'')+':\x20'+_0x51694a,_0x4b142f(0x12d));}export function isMenuResponseLoss(_0x29ef87){const _0x5a8a38=a180_0x4f6c0f,_0x115014=_0x29ef87 instanceof Error?_0x29ef87['message']:String(_0x29ef87);if(_0x29ef87 instanceof CliError)return _0x29ef87['code']==='api_error'&&/^Request (?:failed|timeout):/i[_0x5a8a38(0x125)](_0x115014);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x5a8a38(0x125)](_0x115014);}function stateDrift(_0x1b0633){const _0x2fb8d9=a180_0x4f6c0f;return menuError('menu_state_drift',_0x1b0633,_0x2fb8d9(0x116));}
1
+ const a180_0x32a490=a180_0x408b;(function(_0x4124da,_0x5e3ba2){const _0x199dc7=a180_0x408b,_0x83b068=_0x4124da();while(!![]){try{const _0x472699=parseInt(_0x199dc7(0x108))/0x1+-parseInt(_0x199dc7(0xf2))/0x2*(parseInt(_0x199dc7(0xf7))/0x3)+parseInt(_0x199dc7(0xc5))/0x4+-parseInt(_0x199dc7(0x114))/0x5+parseInt(_0x199dc7(0xe7))/0x6*(-parseInt(_0x199dc7(0xf1))/0x7)+-parseInt(_0x199dc7(0xe3))/0x8*(-parseInt(_0x199dc7(0xf3))/0x9)+parseInt(_0x199dc7(0x115))/0xa;if(_0x472699===_0x5e3ba2)break;else _0x83b068['push'](_0x83b068['shift']());}catch(_0x2f6232){_0x83b068['push'](_0x83b068['shift']());}}}(a180_0x112c,0x6dbfe));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':a180_0x32a490(0x110),'required':!![],'description':a180_0x32a490(0xb6)};export const MENU_SORT_FLAG={'name':a180_0x32a490(0x106),'type':a180_0x32a490(0x110),'description':a180_0x32a490(0x105)};export const MENU_PARENT_ID_FLAG={'name':'parent-id','type':a180_0x32a490(0x112),'description':'Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node'};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a180_0x32a490(0xc2),'type':a180_0x32a490(0x112),'description':a180_0x32a490(0xb7)};function a180_0x112c(){const _0x4d7990=['stage','rawFlags','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','plannedActions','Exact\x20online\x20menu\x20id','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','operation','code','dryRun','planFile','Menu\x20','max','menu_confirmation_required','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','appCode','cascade','expect-parent-id','menu_sort_overflow',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','500896ZnAisL','message','childrenCount','cookie','error','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','yes','length','expect-path','hint','prototype','failedRecords','isSafeInteger','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','str','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','\x20is\x20type\x20\x22','test',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','hash','defineProperty','Failed\x20to\x20','targets','folder','call','selector','stringify','parentId','succeeded','byId','4432uvQfyM','api_error','expected-children-count','menu_not_found','852MDoSos','num','validation','menu_state_drift','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','Permission\x20denied\x20while\x20attempting\x20to\x20','\x20path\x20changed:\x20expected\x20','backend','22036lmUJhX','1264eMavUk','11250Lcqayo','get','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','menu_verification_failed','3669SAmBwv','recheck\x20online\x20menu\x20facts\x20before\x20','snapshotHash','warnings','pre-write-recheck','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','root','trim','read\x20online\x20menu\x20facts\x20before\x20','menu_mutation_failed','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','dry-run','\x20parent\x20changed:\x20expected\x20','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','Sibling\x20sort\x20value\x20(non-negative\x20integer)','sort','required','563770mGbAbi','Reorder\x20sibling\x20menus\x20below\x20','path','after',',\x20current\x20','type','flagMissing','Cannot\x20append\x20a\x20','number','bool','string','unknown','2055095PBjQGS','6990110tWRNXz'];a180_0x112c=function(){return _0x4d7990;};return a180_0x112c();}export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a180_0x32a490(0xcd),'type':a180_0x32a490(0x112),'description':'Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches'},{'name':a180_0x32a490(0xe5),'type':'number','description':a180_0x32a490(0xca)}];export function validateExactId(_0x31de5e){const _0x3c5c08=a180_0x32a490,_0x4ed583=_0x31de5e['num']('id');if(!Number[_0x3c5c08(0xd1)](_0x4ed583)||_0x4ed583<=0x0)throw CliErrors[_0x3c5c08(0xe9)](_0x3c5c08(0xd4));return _0x4ed583;}export function validateSort(_0x3dd585,_0x45f4ec=a180_0x32a490(0x106)){const _0x5888d5=a180_0x32a490;if(!hasFlag(_0x3dd585,_0x45f4ec))return undefined;const _0x3890c8=_0x3dd585['num'](_0x45f4ec);if(!Number['isSafeInteger'](_0x3890c8)||_0x3890c8<0x0||_0x3890c8>MAX_MENU_SORT)throw menuError('menu_sort_invalid','--'+_0x45f4ec+_0x5888d5(0x101)+MAX_MENU_SORT+'.','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.');return _0x3890c8;}export function nextSiblingSort(_0x32f1db,_0x21fcc7,_0x5aff9d){const _0x15a088=a180_0x32a490,_0x310000=getChildren(_0x32f1db,_0x21fcc7)['map'](_0x3b6b8c=>_0x3b6b8c[_0x15a088(0x106)])['filter'](_0x3ebd5c=>typeof _0x3ebd5c===_0x15a088(0x110));if(_0x310000[_0x15a088(0xcc)]===0x0)return 0x0;const _0x5e84df=Math[_0x15a088(0xbd)](..._0x310000);if(_0x5e84df>=MAX_MENU_SORT)throw menuError(_0x15a088(0xc3),_0x15a088(0x10f)+_0x5aff9d+'\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20'+_0x5e84df+'.',_0x15a088(0x109)+MAX_MENU_SORT+_0x15a088(0xd7));return _0x5e84df+0x1;}export function requireExplicitYes(_0x14be74){const _0x15dd54=a180_0x32a490;if(_0x14be74['bool'](_0x15dd54(0x102)))return;if(!_0x14be74[_0x15dd54(0x111)](_0x15dd54(0xcb)))throw menuError(_0x15dd54(0xbe),_0x15dd54(0xed),_0x15dd54(0xd2));}export async function fetchMutationSnapshot(_0x4ffbed,_0x4ac05c,_0x50d223){const _0x344172=a180_0x32a490;try{return await fetchMenuSnapshot(_0x4ffbed['appCode'],_0x4ffbed[_0x344172(0xc8)]);}catch(_0x374286){throw mapMenuApiError(_0x374286,_0x344172(0xff)+_0x4ac05c,_0x50d223);}}function a180_0x408b(_0x166a8c,_0x51c64a){_0x166a8c=_0x166a8c-0xb4;const _0x112c82=a180_0x112c();let _0x408b95=_0x112c82[_0x166a8c];return _0x408b95;}export async function recheckMutationSnapshot(_0x229833,_0x330195,_0x2a614a,_0x49d507){const _0x85031f=a180_0x32a490;let _0x42e9c2;try{_0x42e9c2=await fetchMenuSnapshot(_0x229833[_0x85031f(0xc0)],_0x229833['cookie']);}catch(_0x517d50){const _0xc9697d=mapMenuApiError(_0x517d50,_0x85031f(0xf8)+_0x2a614a,_0x49d507);throw menuFailure(_0xc9697d,_0x330195,{'stage':_0x85031f(0xfb),'failed':_0x49d507==null?{}:{'id':_0x49d507}});}if(_0x42e9c2[_0x85031f(0xd8)]!==_0x330195[_0x85031f(0xf9)]){const _0xb9be9b=menuError(_0x85031f(0xea),'Online\x20menu\x20state\x20changed\x20before\x20'+_0x2a614a+_0x85031f(0xc4),'Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.');throw menuFailure(_0xb9be9b,_0x330195,{'stage':_0x85031f(0xfb),'failed':{..._0x49d507==null?{}:{'id':_0x49d507},'expectedSnapshotHash':_0x330195[_0x85031f(0xf9)],'currentSnapshotHash':_0x42e9c2['hash']}});}return _0x42e9c2;}export function parseParentId(_0x44d26b,_0x5878b4,_0x531499={}){const _0x38caaf=a180_0x32a490;if(!hasFlag(_0x44d26b,_0x5878b4)){if(_0x531499[_0x38caaf(0x107)])throw CliErrors[_0x38caaf(0x10e)](_0x5878b4);return undefined;}const _0x10a92c=_0x44d26b[_0x38caaf(0xd3)](_0x5878b4)[_0x38caaf(0xfe)]();if(_0x10a92c['toLowerCase']()==='root')return null;if(!/^\d+$/[_0x38caaf(0xd6)](_0x10a92c))throw CliErrors['validation']('--'+_0x5878b4+_0x38caaf(0xeb));const _0x382e29=Number(_0x10a92c);if(!Number[_0x38caaf(0xd1)](_0x382e29)||_0x382e29<=0x0)throw CliErrors[_0x38caaf(0xe9)]('--'+_0x5878b4+_0x38caaf(0xeb));return _0x382e29;}export function requireMenu(_0x1a09b2,_0x5aec43){const _0xb49343=a180_0x32a490,_0x39746f=_0x1a09b2[_0xb49343(0xe2)][_0xb49343(0xf4)](_0x5aec43);if(!_0x39746f)throw menuError(_0xb49343(0xe6),'Online\x20menu\x20not\x20found:\x20'+_0x5aec43,_0xb49343(0xbf));return _0x39746f;}export function requireFolder(_0x11a174,_0x455c6c){const _0x151cbb=a180_0x32a490,_0x5ead72=requireMenu(_0x11a174,_0x455c6c);if(_0x5ead72[_0x151cbb(0x10d)]!==_0x151cbb(0xdc))throw menuError('menu_parent_not_folder',_0x151cbb(0xbc)+_0x455c6c+_0x151cbb(0xd5)+(_0x5ead72['type']||_0x151cbb(0x113))+'\x22,\x20not\x20folder.',_0x151cbb(0xb4));return _0x5ead72;}export function assertExpectedState(_0x364e92,_0x31ea45){const _0x219fcb=a180_0x32a490;if(hasFlag(_0x364e92,_0x219fcb(0xc2))){const _0x530484=parseParentId(_0x364e92,_0x219fcb(0xc2),{'required':!![]});if(_0x31ea45[_0x219fcb(0xe0)]!==_0x530484)throw stateDrift(_0x219fcb(0xbc)+_0x31ea45['id']+_0x219fcb(0x103)+formatParent(_0x530484)+_0x219fcb(0x10c)+formatParent(_0x31ea45[_0x219fcb(0xe0)])+'.');}if(hasFlag(_0x364e92,'expect-path')){const _0x3f5b24=_0x364e92[_0x219fcb(0xd3)]('expect-path');if(_0x31ea45['path']!==_0x3f5b24)throw stateDrift(_0x219fcb(0xbc)+_0x31ea45['id']+_0x219fcb(0xef)+JSON[_0x219fcb(0xdf)](_0x3f5b24)+',\x20current\x20'+JSON[_0x219fcb(0xdf)](_0x31ea45[_0x219fcb(0x10a)])+'.');}if(hasFlag(_0x364e92,_0x219fcb(0xe5))){const _0x2b57ee=_0x364e92[_0x219fcb(0xe8)]('expected-children-count');if(!Number[_0x219fcb(0xd1)](_0x2b57ee)||_0x2b57ee<0x0)throw CliErrors[_0x219fcb(0xe9)](_0x219fcb(0xec));if(_0x31ea45[_0x219fcb(0xc7)]!==_0x2b57ee)throw stateDrift(_0x219fcb(0xbc)+_0x31ea45['id']+'\x20child\x20count\x20changed:\x20expected\x20'+_0x2b57ee+_0x219fcb(0x10c)+_0x31ea45[_0x219fcb(0xc7)]+'.');}}export function assertVerified(_0x29be26,_0x5122a4,_0x50e06b=a180_0x32a490(0xfc)){const _0x35e3ab=a180_0x32a490;if(!_0x29be26)throw menuError(_0x35e3ab(0xf6),_0x5122a4,_0x50e06b);}export function mutationResult(_0x5aa7b8){const _0xd425aa=a180_0x32a490;return{'operation':_0x5aa7b8[_0xd425aa(0xb8)],'selector':_0x5aa7b8[_0xd425aa(0xde)],'before':_0x5aa7b8['before'],'after':_0x5aa7b8[_0xd425aa(0x10b)],'dryRun':_0x5aa7b8[_0xd425aa(0xba)],'backend':_0x5aa7b8[_0xd425aa(0xf0)],..._0x5aa7b8[_0xd425aa(0xb5)]?{'plannedActions':_0x5aa7b8[_0xd425aa(0xb5)]}:{},..._0x5aa7b8[_0xd425aa(0xdb)]?{'targets':_0x5aa7b8[_0xd425aa(0xdb)]}:{},..._0x5aa7b8['deleteOrder']?{'deleteOrder':_0x5aa7b8['deleteOrder']}:{},'snapshotHash':_0x5aa7b8['snapshotHash'],..._0x5aa7b8['cascade']?{'cascade':_0x5aa7b8[_0xd425aa(0xc1)]}:{},..._0x5aa7b8[_0xd425aa(0xbb)]?{'planFile':_0x5aa7b8['planFile']}:{},'succeeded':_0x5aa7b8['succeeded']??[],'failed':_0x5aa7b8['failed']??[],'warnings':_0x5aa7b8['warnings']??[],'verification':_0x5aa7b8['verification'],'error':_0x5aa7b8[_0xd425aa(0xc9)]};}export function menuDryRunResult(_0x28728d,_0x56b232){return{..._0x28728d,..._0x56b232};}export function menuFailure(_0x2b4646,_0x59744c,_0xfe9beb){const _0x3d2615=a180_0x32a490,_0x3287cc=mutationResult({..._0x59744c,'after':_0xfe9beb['after']===undefined?_0x59744c[_0x3d2615(0x10b)]:_0xfe9beb['after'],'backend':_0xfe9beb[_0x3d2615(0xf0)]??_0x59744c[_0x3d2615(0xf0)],'dryRun':![],'succeeded':_0xfe9beb[_0x3d2615(0xe1)]??[],'failed':_0xfe9beb[_0x3d2615(0xd0)]??[{..._0xfe9beb['failed']??{},'stage':_0xfe9beb[_0x3d2615(0x116)],'code':_0x2b4646[_0x3d2615(0xb9)],'message':_0x2b4646['message']}],'warnings':[..._0x59744c[_0x3d2615(0xfa)],..._0xfe9beb[_0x3d2615(0xfa)]??[]],'verification':_0xfe9beb['verification'],'error':{'code':_0x2b4646['code'],'message':_0x2b4646[_0x3d2615(0xc6)],..._0x2b4646[_0x3d2615(0xce)]?{'hint':_0x2b4646['hint']}:{}}});return Object[_0x3d2615(0xd9)](_0x2b4646,'data',{'value':_0x3287cc,'enumerable':!![],'configurable':!![]}),_0x2b4646;}export function asVerificationError(_0x481471,_0x1e0f0b){const _0x13a372=a180_0x32a490;if(_0x481471 instanceof CliError&&_0x481471['code']===_0x13a372(0xf6))return _0x481471;const _0x2ceb7b=_0x481471 instanceof Error?_0x481471[_0x13a372(0xc6)]:String(_0x481471);return menuError(_0x13a372(0xf6),''+_0x1e0f0b+(_0x2ceb7b?':\x20'+_0x2ceb7b:''),_0x13a372(0xf5));}export function describeMenuErrorCause(_0x7c2544,_0x26b842,_0x2f54c0){const _0x26e282=a180_0x32a490,_0x127aa6=mapMenuApiError(_0x7c2544,_0x26b842,_0x2f54c0);return{'causeCode':_0x127aa6[_0x26e282(0xb9)],'causeMessage':_0x127aa6[_0x26e282(0xc6)]};}export function hasFlag(_0x57b9c8,_0x3fb28e){const _0x532288=a180_0x32a490;return Object[_0x532288(0xcf)]['hasOwnProperty'][_0x532288(0xdd)](_0x57b9c8['rawFlags'],_0x3fb28e)&&_0x57b9c8[_0x532288(0x117)][_0x3fb28e]!==undefined;}export function toApiParentId(_0x2b7820){return _0x2b7820??0x0;}export function formatParent(_0x3ad12f){const _0x33c0cd=a180_0x32a490;return _0x3ad12f==null?_0x33c0cd(0xfd):String(_0x3ad12f);}export function menuError(_0x16e162,_0x2775fc,_0x248967){return new CliError(_0x16e162,0x1,_0x2775fc,_0x248967);}export function mapMenuApiError(_0xc8d962,_0x285826,_0x3a528b){const _0x30621c=a180_0x32a490;if(_0xc8d962 instanceof CliError&&_0xc8d962[_0x30621c(0xb9)]!=='api_error')return _0xc8d962;const _0x29e345=_0xc8d962 instanceof Error?_0xc8d962[_0x30621c(0xc6)]:String(_0xc8d962);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x30621c(0xd6)](_0x29e345))return menuError('menu_permission_denied',_0x30621c(0xee)+_0x285826+(_0x3a528b?'\x20menu\x20'+_0x3a528b:'')+'.','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.');return menuError(_0x30621c(0x100),_0x30621c(0xda)+_0x285826+(_0x3a528b?'\x20menu\x20'+_0x3a528b:'')+':\x20'+_0x29e345,_0x30621c(0x104));}export function isMenuResponseLoss(_0x5642e2){const _0x28fe6f=a180_0x32a490,_0x35e16a=_0x5642e2 instanceof Error?_0x5642e2[_0x28fe6f(0xc6)]:String(_0x5642e2);if(_0x5642e2 instanceof CliError)return _0x5642e2[_0x28fe6f(0xb9)]===_0x28fe6f(0xe4)&&/^Request (?:failed|timeout):/i[_0x28fe6f(0xd6)](_0x35e16a);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i['test'](_0x35e16a);}function stateDrift(_0x4055dd){return menuError('menu_state_drift',_0x4055dd,'Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.');}
@@ -1 +1 @@
1
- function a181_0x2226(_0x184cb9,_0x3b16b6){_0x184cb9=_0x184cb9-0x19f;const _0x219099=a181_0x2190();let _0x222605=_0x219099[_0x184cb9];return _0x222605;}(function(_0x29663a,_0x205f4f){const _0xb3d65a=a181_0x2226,_0x13eb69=_0x29663a();while(!![]){try{const _0x433a02=parseInt(_0xb3d65a(0x1a9))/0x1*(-parseInt(_0xb3d65a(0x1a2))/0x2)+-parseInt(_0xb3d65a(0x1a6))/0x3+parseInt(_0xb3d65a(0x1a1))/0x4+-parseInt(_0xb3d65a(0x1a7))/0x5*(parseInt(_0xb3d65a(0x1a4))/0x6)+-parseInt(_0xb3d65a(0x1a3))/0x7+parseInt(_0xb3d65a(0x1a0))/0x8+parseInt(_0xb3d65a(0x1a5))/0x9;if(_0x433a02===_0x205f4f)break;else _0x13eb69['push'](_0x13eb69['shift']());}catch(_0x3a38b5){_0x13eb69['push'](_0x13eb69['shift']());}}}(a181_0x2190,0x2981a));function a181_0x2190(){const _0x1ed93d=['505044nWgyDj','20050ZyNfjH','trim','109345VgNYle','replace','183368MiJOPj','258120FcAQhT','2TPULIt','1342502ebhOMx','258pjpOpc','6520212ViRGbV'];a181_0x2190=function(){return _0x1ed93d;};return a181_0x2190();}export function menuPathKey(_0x587ab5){const _0x370181=a181_0x2226,_0x3df7f6=_0x587ab5[_0x370181(0x1a8)]();if(!_0x3df7f6)return'';return _0x3df7f6[_0x370181(0x19f)](/^\/+/,'')[_0x370181(0x19f)](/\/+$/,'')||'/';}
1
+ function a181_0x1ae2(){const _0x248947=['122124bvXjNx','2426949vNBAns','150379eQMFEB','121272vKqBWz','4FpVIzf','replace','3137872JNtLCo','11492478yhqWfF','trim','35MITwGA','1425500qxWxvB'];a181_0x1ae2=function(){return _0x248947;};return a181_0x1ae2();}(function(_0x83412c,_0x3e9ad9){const _0x1b6e37=a181_0x3272,_0x55608f=_0x83412c();while(!![]){try{const _0x1b977a=parseInt(_0x1b6e37(0x1cd))/0x1*(parseInt(_0x1b6e37(0x1cf))/0x2)+-parseInt(_0x1b6e37(0x1ce))/0x3+parseInt(_0x1b6e37(0x1ca))/0x4+-parseInt(_0x1b6e37(0x1d4))/0x5*(-parseInt(_0x1b6e37(0x1cb))/0x6)+parseInt(_0x1b6e37(0x1cc))/0x7+parseInt(_0x1b6e37(0x1d1))/0x8+-parseInt(_0x1b6e37(0x1d2))/0x9;if(_0x1b977a===_0x3e9ad9)break;else _0x55608f['push'](_0x55608f['shift']());}catch(_0x88308e){_0x55608f['push'](_0x55608f['shift']());}}}(a181_0x1ae2,0x36002));function a181_0x3272(_0x409199,_0x8892e){_0x409199=_0x409199-0x1ca;const _0x1ae2a4=a181_0x1ae2();let _0x327212=_0x1ae2a4[_0x409199];return _0x327212;}export function menuPathKey(_0x11ffac){const _0x2a010a=a181_0x3272,_0x445e70=_0x11ffac[_0x2a010a(0x1d3)]();if(!_0x445e70)return'';return _0x445e70[_0x2a010a(0x1d0)](/^\/+/,'')[_0x2a010a(0x1d0)](/\/+$/,'')||'/';}
@@ -1 +1 @@
1
- (function(_0x54993f,_0x14f720){const _0x4f1edb=a182_0x38b5,_0x13e61c=_0x54993f();while(!![]){try{const _0x16b49e=parseInt(_0x4f1edb(0x13a))/0x1*(-parseInt(_0x4f1edb(0x12c))/0x2)+-parseInt(_0x4f1edb(0x12f))/0x3*(parseInt(_0x4f1edb(0x12a))/0x4)+parseInt(_0x4f1edb(0x120))/0x5+parseInt(_0x4f1edb(0x118))/0x6+-parseInt(_0x4f1edb(0x117))/0x7*(-parseInt(_0x4f1edb(0x11b))/0x8)+parseInt(_0x4f1edb(0x139))/0x9+parseInt(_0x4f1edb(0x113))/0xa;if(_0x16b49e===_0x14f720)break;else _0x13e61c['push'](_0x13e61c['shift']());}catch(_0x5bd10e){_0x13e61c['push'](_0x13e61c['shift']());}}}(a182_0x1cce,0xa316c));function a182_0x1cce(){const _0x4b1961=['Updating\x20menu\x20asset\x20links:\x20','parentId','Menu\x20assets\x20synced:\x20','914710bBRAKN','Creating\x20menu:\x20','label','update-menu-cdn-url','889TODIsO','2213118NGTEWC','path','menuGroups','12088mQKWVy','length','\x20online\x20menus\x20successfully','resources','loadScriptMode','6196040EtERMC','appName','Batch\x20menu\x20creation\x20completed,\x20total\x20','Regroup\x20','menus','visible','Menu\x20created\x20successfully:\x20','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','get-online-menu-list','number','82376JfOgAH','create-menu','2padTsk','total','map','192pomkgT','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','Start\x20batch\x20menu\x20creation,\x20total\x20','create-menus','procode','order','Fetched\x20','stringify','Create\x20menu\x20\x22','import','7684920qCQjry','759281qXoSpN','Update\x20menu\x20','info','boolean'];a182_0x1cce=function(){return _0x4b1961;};return a182_0x1cce();}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 a182_0x422c74,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x12da1b,_0x317b1c){const _0x2b1ffc=a182_0x38b5,_0x574f3d=getEnv();logger['info'](_0x2b1ffc(0x128),isProduction(_0x574f3d)?_0x2b1ffc(0x127)+_0x12da1b+')':_0x2b1ffc(0x130)+_0x12da1b+')');const _0x51467a=await fetchMenuSnapshot(_0x12da1b,_0x317b1c,{'verbose':!![]});return logger[_0x2b1ffc(0x13c)](_0x2b1ffc(0x128),_0x2b1ffc(0x135)+_0x51467a[_0x2b1ffc(0x12d)]+_0x2b1ffc(0x11d)),_0x51467a[_0x2b1ffc(0x124)]['map'](toProcessedMenuItem);}function a182_0x38b5(_0x1b3d6c,_0x515d15){_0x1b3d6c=_0x1b3d6c-0x112;const _0x1cce31=a182_0x1cce();let _0x38b57c=_0x1cce31[_0x1b3d6c];return _0x38b57c;}export async function createMenu(_0x2a1c7f,_0x54c6f7,_0x522664){const _0x588e66=a182_0x38b5;logger[_0x588e66(0x13c)](_0x588e66(0x12b),_0x588e66(0x114)+_0x522664[_0x588e66(0x115)]+'\x20('+_0x522664[_0x588e66(0x119)]+')');const _0x156fd6={'appCode':_0x2a1c7f,'type':_0x588e66(0x133),'sort':0x0,'extend':{'loadScriptMode':_0x588e66(0x138),'resources':_0x522664[_0x588e66(0x11e)]?JSON['stringify'](_0x522664['resources']):undefined},..._0x522664},_0x5cb9c1=await createMenuRecord(_0x156fd6,_0x54c6f7,_0x588e66(0x137)+_0x522664[_0x588e66(0x115)]+'\x22');return logger[_0x588e66(0x13c)](_0x588e66(0x12b),_0x588e66(0x126)+_0x522664[_0x588e66(0x115)]),_0x5cb9c1;}async function createSingleMenu(_0x33df37,_0x49d69a,_0x35d61b,_0x17a142,_0x292d62){const _0x7a85e3=a182_0x38b5,_0xbe3ec0={'appCode':_0x33df37,'type':_0x7a85e3(0x133),'sort':_0x7a85e3(0x134)in _0x35d61b&&typeof _0x35d61b[_0x7a85e3(0x134)]===_0x7a85e3(0x129)?_0x35d61b[_0x7a85e3(0x134)]:0x0,...'visible'in _0x35d61b&&typeof _0x35d61b[_0x7a85e3(0x125)]===_0x7a85e3(0x13d)?{'visible':_0x35d61b['visible']}:{},..._0x7a85e3(0x13f)in _0x35d61b&&typeof _0x35d61b[_0x7a85e3(0x13f)]===_0x7a85e3(0x129)?{'parentId':_0x35d61b[_0x7a85e3(0x13f)]}:{},'extend':{..._0x292d62?.[_0x7a85e3(0x121)]?{'appName':_0x292d62['appName']}:{},'loadScriptMode':_0x7a85e3(0x138),'resources':_0x17a142?JSON['stringify'](_0x17a142):undefined},'label':_0x35d61b['label'],'path':_0x35d61b[_0x7a85e3(0x119)]},_0x1da33b=await createMenuRecord(_0xbe3ec0,_0x49d69a,'Create\x20menu\x20\x22'+_0x35d61b[_0x7a85e3(0x115)]+'\x22');return logger[_0x7a85e3(0x13c)](_0x7a85e3(0x12b),_0x7a85e3(0x126)+_0x35d61b['label']),_0x1da33b;}export async function createMenus(_0x4359d4,_0x2e0f97,_0x41c4ed,_0x39de5d,_0x376449){const _0x40c8da=a182_0x38b5;logger['info'](_0x40c8da(0x132),_0x40c8da(0x131)+_0x41c4ed['length']);const _0x4b4f7e=await Promise['all'](_0x41c4ed[_0x40c8da(0x12e)](_0x48ea8b=>createSingleMenu(_0x4359d4,_0x2e0f97,_0x48ea8b,_0x39de5d,_0x376449)));return logger[_0x40c8da(0x13c)](_0x40c8da(0x132),_0x40c8da(0x122)+_0x41c4ed[_0x40c8da(0x11c)]),_0x4b4f7e;}export async function updateMenuCdnUrl(_0x4e710a,_0x12a007,_0x4826b5){const _0xb116d9=a182_0x38b5;logger[_0xb116d9(0x13c)](_0xb116d9(0x116),_0xb116d9(0x13e)+_0x4826b5[_0xb116d9(0x115)]+'\x20('+_0x4826b5[_0xb116d9(0x119)]+')');const _0x20aed8={'id':_0x4826b5['id'],'appCode':_0x4e710a,'extend':{..._0x4826b5['extend']??{},..._0x4826b5[_0xb116d9(0x11f)]?{'loadScriptMode':_0x4826b5['loadScriptMode']}:{},'resources':_0x4826b5[_0xb116d9(0x11e)]?JSON[_0xb116d9(0x136)](_0x4826b5[_0xb116d9(0x11e)]):undefined}},_0x3881f0=await updateMenuRecord(_0x20aed8,_0x12a007,'Update\x20menu\x20assets\x20\x22'+_0x4826b5[_0xb116d9(0x115)]+'\x22');return logger[_0xb116d9(0x13c)](_0xb116d9(0x116),_0xb116d9(0x112)+_0x4826b5['label'],undefined),_0x3881f0;}export async function createMenuEntity(_0x246626,_0x309aa0,_0xc9f9){const _0x36290f=a182_0x38b5;return createMenuRecord({'appCode':_0x246626,..._0xc9f9},_0x309aa0,_0x36290f(0x137)+_0xc9f9[_0x36290f(0x115)]+'\x22');}export async function updateMenuEntity(_0x42fa81,_0x1c7357,_0x279020){const _0x50cc6d=a182_0x38b5;return updateMenuRecord({'appCode':_0x42fa81,..._0x279020},_0x1c7357,_0x50cc6d(0x13b)+_0x279020['id']);}export async function batchDeleteMenuEntities(_0x9664b6,_0x19deb5){const _0x1a8b02=a182_0x38b5;return batchDeleteMenuRecords(_0x19deb5,_0x9664b6,'Delete\x20'+_0x19deb5[_0x1a8b02(0x11c)]+'\x20menu'+(_0x19deb5[_0x1a8b02(0x11c)]===0x1?'':'s'));}export async function startMenuRegroup(_0x1b85bb,_0x4d3869){const _0x373b75=a182_0x38b5;return a182_0x422c74(_0x4d3869,_0x1b85bb,_0x373b75(0x123)+_0x4d3869[_0x373b75(0x11a)]['length']+'\x20menu\x20group(s)');}
1
+ (function(_0x578fa4,_0x254dd9){const _0x1e2fe6=a182_0x11cb,_0x105eb3=_0x578fa4();while(!![]){try{const _0x29ece1=-parseInt(_0x1e2fe6(0x15c))/0x1*(parseInt(_0x1e2fe6(0x155))/0x2)+parseInt(_0x1e2fe6(0x136))/0x3*(parseInt(_0x1e2fe6(0x14c))/0x4)+parseInt(_0x1e2fe6(0x131))/0x5*(parseInt(_0x1e2fe6(0x132))/0x6)+-parseInt(_0x1e2fe6(0x15f))/0x7+-parseInt(_0x1e2fe6(0x135))/0x8+-parseInt(_0x1e2fe6(0x147))/0x9+-parseInt(_0x1e2fe6(0x134))/0xa*(-parseInt(_0x1e2fe6(0x15a))/0xb);if(_0x29ece1===_0x254dd9)break;else _0x105eb3['push'](_0x105eb3['shift']());}catch(_0xf43465){_0x105eb3['push'](_0x105eb3['shift']());}}}(a182_0x11e1,0xeab0d));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 a182_0x3c6fea,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x27701a,_0x4b1411){const _0x226137=a182_0x11cb,_0x57dbc1=getEnv();logger[_0x226137(0x14f)]('get-online-menu-list',isProduction(_0x57dbc1)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x27701a+')':_0x226137(0x143)+_0x27701a+')');const _0x24b79f=await fetchMenuSnapshot(_0x27701a,_0x4b1411,{'verbose':!![]});return logger[_0x226137(0x14f)](_0x226137(0x14a),_0x226137(0x157)+_0x24b79f[_0x226137(0x12f)]+_0x226137(0x153)),_0x24b79f[_0x226137(0x145)]['map'](toProcessedMenuItem);}function a182_0x11cb(_0x52494b,_0x4e914c){_0x52494b=_0x52494b-0x12f;const _0x11e156=a182_0x11e1();let _0x11cb31=_0x11e156[_0x52494b];return _0x11cb31;}export async function createMenu(_0x76a410,_0x36304b,_0x6b747b){const _0x7f7dd1=a182_0x11cb;logger[_0x7f7dd1(0x14f)](_0x7f7dd1(0x14b),_0x7f7dd1(0x141)+_0x6b747b[_0x7f7dd1(0x13c)]+'\x20('+_0x6b747b[_0x7f7dd1(0x13e)]+')');const _0x4a9039={'appCode':_0x76a410,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x7f7dd1(0x13b),'resources':_0x6b747b['resources']?JSON[_0x7f7dd1(0x151)](_0x6b747b[_0x7f7dd1(0x146)]):undefined},..._0x6b747b},_0x947f84=await createMenuRecord(_0x4a9039,_0x36304b,_0x7f7dd1(0x137)+_0x6b747b[_0x7f7dd1(0x13c)]+'\x22');return logger[_0x7f7dd1(0x14f)](_0x7f7dd1(0x14b),_0x7f7dd1(0x149)+_0x6b747b['label']),_0x947f84;}async function createSingleMenu(_0x579a09,_0x4a1584,_0x238ac4,_0x12ecbe,_0x45793a){const _0x5bbc5e=a182_0x11cb,_0x1889a5={'appCode':_0x579a09,'type':_0x5bbc5e(0x133),'sort':_0x5bbc5e(0x140)in _0x238ac4&&typeof _0x238ac4[_0x5bbc5e(0x140)]===_0x5bbc5e(0x130)?_0x238ac4['order']:0x0,..._0x5bbc5e(0x139)in _0x238ac4&&typeof _0x238ac4[_0x5bbc5e(0x139)]===_0x5bbc5e(0x15e)?{'visible':_0x238ac4[_0x5bbc5e(0x139)]}:{},..._0x5bbc5e(0x15d)in _0x238ac4&&typeof _0x238ac4[_0x5bbc5e(0x15d)]===_0x5bbc5e(0x130)?{'parentId':_0x238ac4[_0x5bbc5e(0x15d)]}:{},'extend':{..._0x45793a?.[_0x5bbc5e(0x15b)]?{'appName':_0x45793a[_0x5bbc5e(0x15b)]}:{},'loadScriptMode':_0x5bbc5e(0x13b),'resources':_0x12ecbe?JSON[_0x5bbc5e(0x151)](_0x12ecbe):undefined},'label':_0x238ac4[_0x5bbc5e(0x13c)],'path':_0x238ac4[_0x5bbc5e(0x13e)]},_0x518f44=await createMenuRecord(_0x1889a5,_0x4a1584,_0x5bbc5e(0x137)+_0x238ac4[_0x5bbc5e(0x13c)]+'\x22');return logger['info'](_0x5bbc5e(0x14b),_0x5bbc5e(0x149)+_0x238ac4[_0x5bbc5e(0x13c)]),_0x518f44;}export async function createMenus(_0x5bf6c9,_0x327867,_0x28abf2,_0x4dccd7,_0x9d2b04){const _0x2d8fa5=a182_0x11cb;logger[_0x2d8fa5(0x14f)](_0x2d8fa5(0x138),'Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x28abf2[_0x2d8fa5(0x148)]);const _0x3a9971=await Promise[_0x2d8fa5(0x152)](_0x28abf2[_0x2d8fa5(0x150)](_0x3cff92=>createSingleMenu(_0x5bf6c9,_0x327867,_0x3cff92,_0x4dccd7,_0x9d2b04)));return logger[_0x2d8fa5(0x14f)](_0x2d8fa5(0x138),_0x2d8fa5(0x154)+_0x28abf2['length']),_0x3a9971;}export async function updateMenuCdnUrl(_0x3d1de1,_0xad1782,_0x558bc1){const _0x4209f3=a182_0x11cb;logger[_0x4209f3(0x14f)](_0x4209f3(0x13f),_0x4209f3(0x13a)+_0x558bc1['label']+'\x20('+_0x558bc1[_0x4209f3(0x13e)]+')');const _0x5da3e0={'id':_0x558bc1['id'],'appCode':_0x3d1de1,'extend':{..._0x558bc1[_0x4209f3(0x14d)]??{},..._0x558bc1[_0x4209f3(0x142)]?{'loadScriptMode':_0x558bc1[_0x4209f3(0x142)]}:{},'resources':_0x558bc1[_0x4209f3(0x146)]?JSON[_0x4209f3(0x151)](_0x558bc1['resources']):undefined}},_0x5ed816=await updateMenuRecord(_0x5da3e0,_0xad1782,'Update\x20menu\x20assets\x20\x22'+_0x558bc1[_0x4209f3(0x13c)]+'\x22');return logger[_0x4209f3(0x14f)](_0x4209f3(0x13f),_0x4209f3(0x13d)+_0x558bc1[_0x4209f3(0x13c)],undefined),_0x5ed816;}export async function createMenuEntity(_0x20dd8f,_0xdfe07,_0x1e914f){const _0x428eb5=a182_0x11cb;return createMenuRecord({'appCode':_0x20dd8f,..._0x1e914f},_0xdfe07,_0x428eb5(0x137)+_0x1e914f[_0x428eb5(0x13c)]+'\x22');}export async function updateMenuEntity(_0x3cb0f1,_0x5891bd,_0x4e77d2){return updateMenuRecord({'appCode':_0x3cb0f1,..._0x4e77d2},_0x5891bd,'Update\x20menu\x20'+_0x4e77d2['id']);}function a182_0x11e1(){const _0x4c4479=['Creating\x20menu:\x20','loadScriptMode','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','menuGroups','menus','resources','9716418mFlwfn','length','Menu\x20created\x20successfully:\x20','get-online-menu-list','create-menu','8fwuJet','extend','Delete\x20','info','map','stringify','all','\x20online\x20menus\x20successfully','Batch\x20menu\x20creation\x20completed,\x20total\x20','900362zeMCfM','Regroup\x20','Fetched\x20','\x20menu\x20group(s)','\x20menu','11ayBWUH','appName','2RhnqKS','parentId','boolean','394009fWDNXY','total','number','5DRyxMU','5658972VGBiVf','procode','19046430URbQVS','7682040ldJsfe','1664991bGYMWj','Create\x20menu\x20\x22','create-menus','visible','Updating\x20menu\x20asset\x20links:\x20','import','label','Menu\x20assets\x20synced:\x20','path','update-menu-cdn-url','order'];a182_0x11e1=function(){return _0x4c4479;};return a182_0x11e1();}export async function batchDeleteMenuEntities(_0x5f386f,_0x1f1c39){const _0x24a7ac=a182_0x11cb;return batchDeleteMenuRecords(_0x1f1c39,_0x5f386f,_0x24a7ac(0x14e)+_0x1f1c39[_0x24a7ac(0x148)]+_0x24a7ac(0x159)+(_0x1f1c39[_0x24a7ac(0x148)]===0x1?'':'s'));}export async function startMenuRegroup(_0x568e64,_0x134159){const _0x41af3c=a182_0x11cb;return a182_0x3c6fea(_0x134159,_0x568e64,_0x41af3c(0x156)+_0x134159[_0x41af3c(0x144)]['length']+_0x41af3c(0x158));}
@@ -1 +1 @@
1
- const a183_0x4e9c27=a183_0x1014;(function(_0xdfe549,_0x4e2d5b){const _0xf77fe3=a183_0x1014,_0x2baca8=_0xdfe549();while(!![]){try{const _0x4092c0=-parseInt(_0xf77fe3(0x97))/0x1+-parseInt(_0xf77fe3(0xbb))/0x2*(-parseInt(_0xf77fe3(0xab))/0x3)+-parseInt(_0xf77fe3(0x93))/0x4+-parseInt(_0xf77fe3(0xbc))/0x5*(parseInt(_0xf77fe3(0xac))/0x6)+parseInt(_0xf77fe3(0xa4))/0x7*(-parseInt(_0xf77fe3(0x9b))/0x8)+parseInt(_0xf77fe3(0x92))/0x9+parseInt(_0xf77fe3(0xa2))/0xa;if(_0x4092c0===_0x4e2d5b)break;else _0x2baca8['push'](_0x2baca8['shift']());}catch(_0x56a573){_0x2baca8['push'](_0x2baca8['shift']());}}}(a183_0x37ef,0x911a9));import{getSmartAppRecord}from'../../../core/api-client.js';import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{CliErrors}from'../../../errors.js';function a183_0x1014(_0x57b1e9,_0x2be199){_0x57b1e9=_0x57b1e9-0x90;const _0x37ef70=a183_0x37ef();let _0x1014d2=_0x37ef70[_0x57b1e9];return _0x1014d2;}function a183_0x37ef(){const _0x222eec=['sharedResources','extend','846mzakxr','2938870FChJOM','app','stringify','3522348BySpHv','2122056QyYYpU','\x20must\x20be\x20an\x20array\x20of\x20URLs.','app-name','appCode','328471VnHuFn','subapp.resources','\x20must\x20be\x20a\x20JSON\x20object.','trim','32nvqDlh','\x20contains\x20invalid\x20JSON.','\x20must\x20be\x20a\x20JSON\x20string\x20of\x20URLs.','sharedConfigured','menu','appName','validation','13028210avsILf','isArray','888951GkcipV','resources','--app-name\x20is\x20required.','basename','menu\x20','assets','filter','6063XNHiBq','6TFAqSO','parse','app.extend.assets[','app.extend','loadScriptMode','Explicit\x20frontend\x20subapp\x20appName\x20matching\x20host\x20assets\x20and\x20menu\x20bindings;\x20not\x20inferred\x20from\x20package\x20name\x20or\x20app\x20code','str','app.extend.assets','length','fallbackDiffers','Menu\x20host\x20app\x20code;\x20overrides\x20the\x20selected\x20workspace\x20app','message','string'];a183_0x37ef=function(){return _0x222eec;};return a183_0x37ef();}function objectValue(_0x2e072c,_0x32c1f2){const _0x409cd0=a183_0x1014,_0x4c637f=typeof _0x2e072c===_0x409cd0(0xb8)?parseJson(_0x2e072c,_0x32c1f2):_0x2e072c;if(!_0x4c637f||typeof _0x4c637f!=='object'||Array[_0x409cd0(0xa3)](_0x4c637f))throw CliErrors[_0x409cd0(0xa1)](_0x32c1f2+_0x409cd0(0x99));return _0x4c637f;}function parseJson(_0x20d8ce,_0x57d0b8){const _0x5861ca=a183_0x1014;try{return JSON[_0x5861ca(0xad)](_0x20d8ce);}catch{throw CliErrors[_0x5861ca(0xa1)](_0x57d0b8+_0x5861ca(0x9c));}}function resourceList(_0x361a78,_0x5c9521){const _0x433584=a183_0x1014;if(typeof _0x361a78!=='string')throw CliErrors['validation'](_0x5c9521+_0x433584(0x9d));const _0x32c10d=parseJson(_0x361a78,_0x5c9521);if(!Array[_0x433584(0xa3)](_0x32c10d)||_0x32c10d['some'](_0x57c8dc=>typeof _0x57c8dc!==_0x433584(0xb8)))throw CliErrors[_0x433584(0xa1)](_0x5c9521+_0x433584(0x94));return _0x32c10d;}export function buildSubappAssetsStatus(_0x18472c,_0xe8e6e6,_0xff9616){const _0x15bc6d=a183_0x1014,_0x15d825=_0x18472c[_0x15bc6d(0xba)]==null?{}:objectValue(_0x18472c[_0x15bc6d(0xba)],_0x15bc6d(0xaf)),_0xcdd9f8=_0x15d825[_0x15bc6d(0xa9)]==null?[]:typeof _0x15d825[_0x15bc6d(0xa9)]===_0x15bc6d(0xb8)?parseJson(_0x15d825[_0x15bc6d(0xa9)],_0x15bc6d(0xb3)):_0x15d825[_0x15bc6d(0xa9)];if(!Array['isArray'](_0xcdd9f8))throw CliErrors[_0x15bc6d(0xa1)]('app.extend.assets\x20must\x20be\x20an\x20array.');const _0x367ab4=_0xcdd9f8['map']((_0x4e2e33,_0x490de9)=>objectValue(_0x4e2e33,_0x15bc6d(0xae)+_0x490de9+']')),_0x18e536=_0x367ab4[_0x15bc6d(0xaa)](_0x1683be=>_0x1683be[_0x15bc6d(0xa0)]===_0xff9616);if(_0x18e536[_0x15bc6d(0xb4)]>0x1)throw CliErrors['validation']('Duplicate\x20subapp\x20records\x20for\x20'+_0xff9616+'.');const _0x11de69=_0x18e536[0x0],_0x4ab2e7=_0x11de69?.[_0x15bc6d(0xa5)]==null?[]:resourceList(_0x11de69[_0x15bc6d(0xa5)],_0x15bc6d(0x98)),_0x1b4975=_0xe8e6e6[_0x15bc6d(0xaa)](_0x198484=>_0x198484[_0x15bc6d(0xba)]?.[_0x15bc6d(0xa0)]===_0xff9616),_0x1cdbfd=_0x1b4975['map'](_0x518833=>{const _0x5246d2=_0x15bc6d;let _0x2e659b=null,_0x4436eb=null;try{_0x2e659b=_0x518833[_0x5246d2(0xba)]?.['resources']==null?_0x518833['resources']:resourceList(_0x518833[_0x5246d2(0xba)]['resources'],_0x5246d2(0xa8)+_0x518833['id']+'\x20resources');}catch(_0x349c86){_0x4436eb=_0x349c86 instanceof Error?_0x349c86[_0x5246d2(0xb7)]:String(_0x349c86);}const _0x9c1f55=_0x4ab2e7[_0x5246d2(0xb4)]>0x0?_0x5246d2(0x90):_0x5246d2(0x9f),_0x380c7d=_0x9c1f55===_0x5246d2(0x90)?_0x4ab2e7:_0x2e659b;return{'id':_0x518833['id'],'path':_0x518833['path'],'preferredSourceIfSupported':_0x9c1f55,'preferredResourcesIfSupported':_0x380c7d,'menuFallbackResources':_0x2e659b,'menuFallbackError':_0x4436eb,'fallbackDiffers':_0x2e659b===null?null:_0x9c1f55==='app'&&_0x2e659b['length']>0x0&&JSON['stringify'](_0x2e659b)!==JSON[_0x5246d2(0x91)](_0x380c7d)};});return{'appName':_0xff9616,'hostCapabilityVerified':![],'sharedConfigured':Boolean(_0x11de69),'sharedResources':_0x4ab2e7,'loadScriptMode':_0x11de69?.[_0x15bc6d(0xb0)]??null,'basename':_0x11de69?.[_0x15bc6d(0xa7)]??null,'boundMenus':_0x1cdbfd[_0x15bc6d(0xb4)],'staleMenuFallbacks':_0x1cdbfd[_0x15bc6d(0xaa)](_0x361342=>_0x361342[_0x15bc6d(0xb5)])[_0x15bc6d(0xb4)],'menus':_0x1cdbfd};}export async function assertSharedResourcesConfigured(_0x25d534,_0x2347fa,_0x3f4eab){const _0x8f08b3=a183_0x1014,_0x2e4aee=await getSmartAppRecord(_0x25d534,_0x2347fa),_0x3fe709=buildSubappAssetsStatus(_0x2e4aee,[],_0x3f4eab);if(!_0x3fe709[_0x8f08b3(0x9e)]||_0x3fe709[_0x8f08b3(0xb9)][_0x8f08b3(0xb4)]===0x0)throw CliErrors['validation']('No\x20shared\x20resources\x20configured\x20for\x20'+_0x3f4eab+'.');}export const SUBAPP_ASSET_SELECTOR_FLAGS=[{...APPCODE_FLAG,'required':![],'description':a183_0x4e9c27(0xb6)},{'name':a183_0x4e9c27(0x95),'type':'string','required':!![],'description':a183_0x4e9c27(0xb1)}];export function getSubappSelector(_0x2f28f4){const _0x44e3ef=a183_0x4e9c27,_0x2fc0b9=_0x2f28f4[_0x44e3ef(0x96)],_0x23d989=_0x2f28f4[_0x44e3ef(0xb2)](_0x44e3ef(0x95))[_0x44e3ef(0x9a)]();if(!_0x23d989)throw CliErrors['validation'](_0x44e3ef(0xa6));return{'appCode':_0x2fc0b9,'appName':_0x23d989};}
1
+ const a183_0x140c59=a183_0x4447;(function(_0x432459,_0x10831a){const _0xee88d5=a183_0x4447,_0x4dbc64=_0x432459();while(!![]){try{const _0x126b99=-parseInt(_0xee88d5(0x11b))/0x1+parseInt(_0xee88d5(0x115))/0x2*(parseInt(_0xee88d5(0x128))/0x3)+-parseInt(_0xee88d5(0x114))/0x4+-parseInt(_0xee88d5(0xfc))/0x5*(parseInt(_0xee88d5(0x10b))/0x6)+parseInt(_0xee88d5(0x123))/0x7*(parseInt(_0xee88d5(0x11f))/0x8)+-parseInt(_0xee88d5(0x11c))/0x9*(-parseInt(_0xee88d5(0x125))/0xa)+-parseInt(_0xee88d5(0x106))/0xb;if(_0x126b99===_0x10831a)break;else _0x4dbc64['push'](_0x4dbc64['shift']());}catch(_0x94fe){_0x4dbc64['push'](_0x4dbc64['shift']());}}}(a183_0x15cb,0x2b9fc));function a183_0x4447(_0x56eee4,_0x7978ec){_0x56eee4=_0x56eee4-0xfc;const _0x15cba5=a183_0x15cb();let _0x444761=_0x15cba5[_0x56eee4];return _0x444761;}import{getSmartAppRecord}from'../../../core/api-client.js';import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{CliErrors}from'../../../errors.js';function objectValue(_0x3cda1d,_0x2e9741){const _0x27d75e=a183_0x4447,_0x575dab=typeof _0x3cda1d==='string'?parseJson(_0x3cda1d,_0x2e9741):_0x3cda1d;if(!_0x575dab||typeof _0x575dab!==_0x27d75e(0x105)||Array[_0x27d75e(0x117)](_0x575dab))throw CliErrors['validation'](_0x2e9741+_0x27d75e(0x109));return _0x575dab;}function parseJson(_0xe3dff0,_0x245a5c){const _0x2f2355=a183_0x4447;try{return JSON['parse'](_0xe3dff0);}catch{throw CliErrors[_0x2f2355(0x122)](_0x245a5c+_0x2f2355(0x100));}}function resourceList(_0x120d42,_0x51eba4){const _0x66ccaa=a183_0x4447;if(typeof _0x120d42!==_0x66ccaa(0x110))throw CliErrors[_0x66ccaa(0x122)](_0x51eba4+_0x66ccaa(0x101));const _0x1fdfea=parseJson(_0x120d42,_0x51eba4);if(!Array['isArray'](_0x1fdfea)||_0x1fdfea[_0x66ccaa(0x116)](_0x122b8d=>typeof _0x122b8d!==_0x66ccaa(0x110)))throw CliErrors[_0x66ccaa(0x122)](_0x51eba4+_0x66ccaa(0x10d));return _0x1fdfea;}export function buildSubappAssetsStatus(_0x122976,_0x3ae0f4,_0x5b48a0){const _0x4071ef=a183_0x4447,_0x34a3ed=_0x122976[_0x4071ef(0x121)]==null?{}:objectValue(_0x122976[_0x4071ef(0x121)],_0x4071ef(0x107)),_0x144df5=_0x34a3ed[_0x4071ef(0x126)]==null?[]:typeof _0x34a3ed[_0x4071ef(0x126)]===_0x4071ef(0x110)?parseJson(_0x34a3ed[_0x4071ef(0x126)],_0x4071ef(0xfe)):_0x34a3ed[_0x4071ef(0x126)];if(!Array[_0x4071ef(0x117)](_0x144df5))throw CliErrors[_0x4071ef(0x122)](_0x4071ef(0x120));const _0x15665c=_0x144df5[_0x4071ef(0x113)]((_0x1da990,_0x4bc4e8)=>objectValue(_0x1da990,_0x4071ef(0x124)+_0x4bc4e8+']')),_0x34e6d2=_0x15665c['filter'](_0x1d56f6=>_0x1d56f6['appName']===_0x5b48a0);if(_0x34e6d2[_0x4071ef(0x10a)]>0x1)throw CliErrors[_0x4071ef(0x122)](_0x4071ef(0x127)+_0x5b48a0+'.');const _0x66349d=_0x34e6d2[0x0],_0x2bfd4c=_0x66349d?.['resources']==null?[]:resourceList(_0x66349d['resources'],_0x4071ef(0x118)),_0x4f2371=_0x3ae0f4['filter'](_0x2243bf=>_0x2243bf[_0x4071ef(0x121)]?.[_0x4071ef(0x104)]===_0x5b48a0),_0x36f25f=_0x4f2371['map'](_0x2a5f41=>{const _0x556b85=_0x4071ef;let _0x14948c=null,_0x7fb7cf=null;try{_0x14948c=_0x2a5f41['extend']?.[_0x556b85(0xff)]==null?_0x2a5f41[_0x556b85(0xff)]:resourceList(_0x2a5f41['extend'][_0x556b85(0xff)],'menu\x20'+_0x2a5f41['id']+_0x556b85(0x10f));}catch(_0x537552){_0x7fb7cf=_0x537552 instanceof Error?_0x537552[_0x556b85(0xfd)]:String(_0x537552);}const _0x395efd=_0x2bfd4c['length']>0x0?_0x556b85(0x111):'menu',_0x58b3b5=_0x395efd===_0x556b85(0x111)?_0x2bfd4c:_0x14948c;return{'id':_0x2a5f41['id'],'path':_0x2a5f41['path'],'preferredSourceIfSupported':_0x395efd,'preferredResourcesIfSupported':_0x58b3b5,'menuFallbackResources':_0x14948c,'menuFallbackError':_0x7fb7cf,'fallbackDiffers':_0x14948c===null?null:_0x395efd===_0x556b85(0x111)&&_0x14948c[_0x556b85(0x10a)]>0x0&&JSON[_0x556b85(0x102)](_0x14948c)!==JSON[_0x556b85(0x102)](_0x58b3b5)};});return{'appName':_0x5b48a0,'hostCapabilityVerified':![],'sharedConfigured':Boolean(_0x66349d),'sharedResources':_0x2bfd4c,'loadScriptMode':_0x66349d?.['loadScriptMode']??null,'basename':_0x66349d?.[_0x4071ef(0x10e)]??null,'boundMenus':_0x36f25f['length'],'staleMenuFallbacks':_0x36f25f[_0x4071ef(0x112)](_0x31e4b9=>_0x31e4b9['fallbackDiffers'])[_0x4071ef(0x10a)],'menus':_0x36f25f};}function a183_0x15cb(){const _0x3d278b=['app.extend.assets[','951310CYoZhn','assets','Duplicate\x20subapp\x20records\x20for\x20','1044825bKeCNb','sharedResources','145OBunXR','message','app.extend.assets','resources','\x20contains\x20invalid\x20JSON.','\x20must\x20be\x20a\x20JSON\x20string\x20of\x20URLs.','stringify','Menu\x20host\x20app\x20code;\x20overrides\x20the\x20selected\x20workspace\x20app','appName','object','2512114TdcUKs','app.extend','appCode','\x20must\x20be\x20a\x20JSON\x20object.','length','14982CTKVev','str','\x20must\x20be\x20an\x20array\x20of\x20URLs.','basename','\x20resources','string','app','filter','map','957516oPgGnu','2OdVCKQ','some','isArray','subapp.resources','Explicit\x20frontend\x20subapp\x20appName\x20matching\x20host\x20assets\x20and\x20menu\x20bindings;\x20not\x20inferred\x20from\x20package\x20name\x20or\x20app\x20code','trim','14469gsOERl','18XDuWrN','No\x20shared\x20resources\x20configured\x20for\x20','app-name','112WvXkbF','app.extend.assets\x20must\x20be\x20an\x20array.','extend','validation','97391UShtff'];a183_0x15cb=function(){return _0x3d278b;};return a183_0x15cb();}export async function assertSharedResourcesConfigured(_0x2e11e3,_0xad686c,_0x1dd279){const _0x4fbb5d=a183_0x4447,_0x1bf368=await getSmartAppRecord(_0x2e11e3,_0xad686c),_0x4a2311=buildSubappAssetsStatus(_0x1bf368,[],_0x1dd279);if(!_0x4a2311['sharedConfigured']||_0x4a2311[_0x4fbb5d(0x129)][_0x4fbb5d(0x10a)]===0x0)throw CliErrors[_0x4fbb5d(0x122)](_0x4fbb5d(0x11d)+_0x1dd279+'.');}export const SUBAPP_ASSET_SELECTOR_FLAGS=[{...APPCODE_FLAG,'required':![],'description':a183_0x140c59(0x103)},{'name':a183_0x140c59(0x11e),'type':'string','required':!![],'description':a183_0x140c59(0x119)}];export function getSubappSelector(_0x379420){const _0x2c627d=a183_0x140c59,_0x51d5ac=_0x379420[_0x2c627d(0x108)],_0x1f15df=_0x379420[_0x2c627d(0x10c)](_0x2c627d(0x11e))[_0x2c627d(0x11a)]();if(!_0x1f15df)throw CliErrors[_0x2c627d(0x122)]('--app-name\x20is\x20required.');return{'appCode':_0x51d5ac,'appName':_0x1f15df};}
@@ -1 +1 @@
1
- const a184_0x51da87=a184_0x5e4c;(function(_0x5dfb9d,_0x3d2312){const _0x56543c=a184_0x5e4c,_0x2f0d9f=_0x5dfb9d();while(!![]){try{const _0x111f59=-parseInt(_0x56543c(0x13c))/0x1*(parseInt(_0x56543c(0x112))/0x2)+-parseInt(_0x56543c(0x106))/0x3+parseInt(_0x56543c(0x124))/0x4+-parseInt(_0x56543c(0x12c))/0x5+parseInt(_0x56543c(0x12d))/0x6+-parseInt(_0x56543c(0x138))/0x7+parseInt(_0x56543c(0x102))/0x8;if(_0x111f59===_0x3d2312)break;else _0x2f0d9f['push'](_0x2f0d9f['shift']());}catch(_0x308a14){_0x2f0d9f['push'](_0x2f0d9f['shift']());}}}(a184_0xf385,0x192c5));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';function a184_0x5e4c(_0xb8f0f7,_0x4f84fb){_0xb8f0f7=_0xb8f0f7-0x102;const _0xf38584=a184_0xf385();let _0x5e4c8b=_0xf38584[_0xb8f0f7];return _0x5e4c8b;}import{menuPathKey}from'../../../commands/menu/shared/path.js';function a184_0xf385(){const _0x52bd23=['251130meuBJh','98262QgFIxm','Invalid\x20--params:\x20','folder','visible','--params.','\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.','cwd','join','filter','path','Invalid\x20--params\x20JSON.','1018143cRyTbG',':\x20expected\x20a\x20non-empty\x20string.','appName','parse','2976WATMlQ','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','jsUrl','group','1661296HUNGHB',';\x20found\x20','Invalid\x20--params.visible:\x20expected\x20a\x20boolean.','map','27099aRDuvk','cssUrl','Invalid\x20--params\x20fields:\x20','Start\x20non-interactive\x20menu\x20sync','Invalid\x20--params.','Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','push','trim','Parent\x20','parentId','pages','isInteger','8SuKjGY','JS\x20URL\x20is\x20unreachable:\x20','label','keys','setLogPath','type','Menu\x20sync\x20completed','hasOwn','dryRun','Expected\x20one\x20folder\x20named\x20\x22','length','import','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','string','has','CSS\x20URL\x20is\x20unreachable:\x20','menu-sync','message','382728zUsFpj','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','isArray','\x22\x20for\x20','order','\x0a\x20\x20Available\x20local\x20paths:\x20','procode'];a184_0xf385=function(){return _0x52bd23;};return a184_0xf385();}import{logger}from'../../../utils/logger.js';import{assertSharedResourcesConfigured}from'../../../commands/menu/shared/subapp-assets.js';const MENU_SYNC_PARAM_KEYS=new Set([a184_0x51da87(0x13e),a184_0x51da87(0x107),a184_0x51da87(0x13a),a184_0x51da87(0x130),a184_0x51da87(0x10f)]);export function resolvePage(_0x26eee4,_0x4560cc,_0x51ff07){const _0x5dc9fa=a184_0x51da87;let _0x5441a6=_0x4560cc[_0x5dc9fa(0x10f)]??_0x26eee4[_0x5dc9fa(0x10f)];if(_0x5441a6===undefined&&_0x26eee4[_0x5dc9fa(0x13f)]){const _0x1ce2f6=_0x51ff07[_0x5dc9fa(0x135)](_0x502b98=>_0x502b98[_0x5dc9fa(0x117)]===_0x5dc9fa(0x12f)&&_0x502b98[_0x5dc9fa(0x114)]===_0x26eee4[_0x5dc9fa(0x13f)]);if(_0x1ce2f6['length']!==0x1)throw new Error(_0x5dc9fa(0x11b)+_0x26eee4[_0x5dc9fa(0x13f)]+_0x5dc9fa(0x128)+_0x26eee4['path']+_0x5dc9fa(0x103)+_0x1ce2f6[_0x5dc9fa(0x11c)]);_0x5441a6=_0x1ce2f6[0x0]['id'];}if(_0x5441a6!==undefined&&_0x5441a6!==0x0&&_0x51ff07[_0x5dc9fa(0x135)](_0x4d32d7=>_0x4d32d7['id']===_0x5441a6&&_0x4d32d7[_0x5dc9fa(0x117)]===_0x5dc9fa(0x12f))[_0x5dc9fa(0x11c)]!==0x1)throw new Error(_0x5dc9fa(0x10e)+_0x5441a6+_0x5dc9fa(0x132));return{..._0x26eee4,..._0x5441a6===undefined?{}:{'parentId':_0x5441a6},..._0x4560cc[_0x5dc9fa(0x130)]===undefined?{}:{'visible':_0x4560cc['visible']}};}function validateParams(_0x45e227){const _0x5b9740=a184_0x51da87,_0x449949=[];return _0x45e227['jsUrl']&&!isValidJsHttpsUrl(_0x45e227[_0x5b9740(0x13e)])&&_0x449949[_0x5b9740(0x10c)]({'field':'jsUrl','message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x45e227[_0x5b9740(0x107)]&&!isValidCssHttpsUrl(_0x45e227[_0x5b9740(0x107)])&&_0x449949[_0x5b9740(0x10c)]({'field':_0x5b9740(0x107),'message':_0x5b9740(0x11e)}),_0x449949;}export async function runMenuSyncCore(_0x1fc77c,_0xb924de,_0x41036c=[],_0x5c8500,_0x52910d={}){const _0x4f84e6=a184_0x51da87,_0x174ed6=parseMenuSyncParams(_0x5c8500),_0x7350f8=[...new Set(_0x41036c[_0x4f84e6(0x105)](_0x13a98e=>_0x13a98e['trim']())[_0x4f84e6(0x135)](Boolean)[_0x4f84e6(0x105)](menuPathKey))],_0xc9fa39=_0x174ed6[_0x4f84e6(0x13e)],_0x1a2e3d=_0x174ed6[_0x4f84e6(0x107)],_0x30c9e3=[];if(_0xc9fa39)_0x30c9e3[_0x4f84e6(0x10c)](_0xc9fa39);if(_0x1a2e3d)_0x30c9e3[_0x4f84e6(0x10c)](_0x1a2e3d);const _0x531b9e=validateParams(_0x174ed6);if(_0x531b9e[_0x4f84e6(0x11c)]>0x0){const _0x2da98a=_0x531b9e['map'](_0x5a2222=>_0x4f84e6(0x131)+_0x5a2222['field']+':\x20'+_0x5a2222[_0x4f84e6(0x123)])['join'](';\x20');throw new Error(_0x4f84e6(0x12e)+_0x2da98a);}logger[_0x4f84e6(0x116)](process[_0x4f84e6(0x133)]()),logger['info'](_0x4f84e6(0x122),_0x4f84e6(0x109),{'appCode':_0x1fc77c,'selectedCount':_0x7350f8[_0x4f84e6(0x11c)],'jsUrl':_0xc9fa39,'cssUrl':_0x1a2e3d});if(_0xc9fa39){const _0xa81e72=await isUrlReachable(_0xc9fa39);if(!_0xa81e72)throw new Error(_0x4f84e6(0x113)+_0xc9fa39);}if(_0x1a2e3d){const _0x4fadb1=await isUrlReachable(_0x1a2e3d);if(!_0x4fadb1)throw new Error(_0x4f84e6(0x121)+_0x1a2e3d);}const _0x2b1dbf=getLocalPages();if(_0x2b1dbf['length']===0x0){if(_0x7350f8[_0x4f84e6(0x11c)]>0x0)throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x7350f8[_0x4f84e6(0x134)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x52910d[_0x4f84e6(0x11a)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x59f480=await getOnlineMenuList(_0x1fc77c,_0xb924de),_0x183a10=new Set(_0x59f480[_0x4f84e6(0x105)](_0x392f11=>menuPathKey(_0x392f11[_0x4f84e6(0x136)])));let _0x2f114f;if(_0x7350f8[_0x4f84e6(0x11c)]>0x0){const _0x8f97c1=new Map(_0x2b1dbf['map'](_0x3abaaa=>[menuPathKey(_0x3abaaa[_0x4f84e6(0x136)]),_0x3abaaa])),_0x5f4319=_0x7350f8[_0x4f84e6(0x135)](_0x5b3d61=>!_0x8f97c1[_0x4f84e6(0x120)](_0x5b3d61));if(_0x5f4319['length']>0x0){const _0x2a2a20=_0x2b1dbf[_0x4f84e6(0x105)](_0x2326ba=>_0x2326ba[_0x4f84e6(0x136)])['join'](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x5f4319['join'](',\x20')+_0x4f84e6(0x12a)+_0x2a2a20);}const _0x4a823d=_0x7350f8[_0x4f84e6(0x135)](_0x335e34=>_0x183a10[_0x4f84e6(0x120)](_0x335e34));if(_0x4a823d[_0x4f84e6(0x11c)]>0x0)throw new Error(_0x4f84e6(0x125)+_0x4a823d[_0x4f84e6(0x134)](',\x20'));_0x2f114f=_0x7350f8[_0x4f84e6(0x105)](_0x337fb4=>_0x8f97c1['get'](_0x337fb4));}else _0x2f114f=_0x2b1dbf[_0x4f84e6(0x135)](_0x4bc18f=>!_0x183a10[_0x4f84e6(0x120)](menuPathKey(_0x4bc18f[_0x4f84e6(0x136)])));if(_0x2f114f[_0x4f84e6(0x11c)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x52910d['dryRun']===!![],'targetPages':[],'plannedMenus':[]};_0x2f114f=_0x2f114f[_0x4f84e6(0x105)](_0x3abf06=>resolvePage(_0x3abf06,_0x174ed6,_0x59f480));_0x174ed6[_0x4f84e6(0x13a)]&&_0x30c9e3[_0x4f84e6(0x11c)]===0x0&&await assertSharedResourcesConfigured(_0x1fc77c,_0xb924de,_0x174ed6[_0x4f84e6(0x13a)]);const _0x366b24=_0x2f114f[_0x4f84e6(0x105)](_0x27633f=>({'type':_0x4f84e6(0x12b),'path':_0x27633f[_0x4f84e6(0x136)],'label':_0x27633f[_0x4f84e6(0x114)],'loadScriptMode':_0x4f84e6(0x11d),'resources':[..._0x30c9e3],..._0x27633f[_0x4f84e6(0x130)]===undefined?{}:{'visible':_0x27633f[_0x4f84e6(0x130)]},..._0x27633f['parentId']===undefined?{}:{'parentId':_0x27633f[_0x4f84e6(0x10f)]},..._0x27633f[_0x4f84e6(0x129)]===undefined?{}:{'sort':_0x27633f[_0x4f84e6(0x129)]},..._0x174ed6['appName']===undefined?{}:{'appName':_0x174ed6[_0x4f84e6(0x13a)]}}));if(_0x52910d['dryRun'])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x2f114f,'plannedMenus':_0x366b24};const _0x213bb5=_0x174ed6[_0x4f84e6(0x13a)]?await createMenus(_0x1fc77c,_0xb924de,_0x2f114f,_0x30c9e3[_0x4f84e6(0x11c)]>0x0?_0x30c9e3:undefined,{'appName':_0x174ed6['appName']}):await createMenus(_0x1fc77c,_0xb924de,_0x2f114f,_0x30c9e3[_0x4f84e6(0x11c)]>0x0?_0x30c9e3:undefined);return logger['info'](_0x4f84e6(0x122),_0x4f84e6(0x118),{'count':_0x2f114f['length'],'resources':_0x30c9e3}),{'created':_0x213bb5[_0x4f84e6(0x11c)],'skipped':![],'dryRun':![],'targetPages':_0x2f114f,'plannedMenus':_0x366b24,'menus':_0x213bb5};}export function parseMenuSyncParams(_0x3c4196){const _0x470844=a184_0x51da87;if(!_0x3c4196||typeof _0x3c4196!=='string')return{};let _0x16d82f;try{_0x16d82f=JSON[_0x470844(0x13b)](_0x3c4196);}catch{throw new Error(_0x470844(0x137));}if(typeof _0x16d82f!=='object'||_0x16d82f===null||Array[_0x470844(0x127)](_0x16d82f))throw new Error(_0x470844(0x126));const _0x45ca96=_0x16d82f;if(Object[_0x470844(0x119)](_0x45ca96,_0x470844(0x110)))throw new Error(_0x470844(0x13d));const _0x4fe240=Object[_0x470844(0x115)](_0x45ca96)[_0x470844(0x135)](_0x20cdb5=>!MENU_SYNC_PARAM_KEYS[_0x470844(0x120)](_0x20cdb5));if(_0x4fe240[_0x470844(0x11c)]>0x0)throw new Error(_0x470844(0x108)+_0x4fe240[_0x470844(0x134)](',\x20')+'.');for(const _0x24611b of[_0x470844(0x13e),_0x470844(0x107),_0x470844(0x13a)]){const _0x1639a3=_0x45ca96[_0x24611b];if(_0x1639a3!==undefined&&(typeof _0x1639a3!==_0x470844(0x11f)||_0x1639a3[_0x470844(0x10d)]()===''))throw new Error(_0x470844(0x10a)+_0x24611b+_0x470844(0x139));}if(_0x45ca96[_0x470844(0x130)]!==undefined&&typeof _0x45ca96[_0x470844(0x130)]!=='boolean')throw new Error(_0x470844(0x104));if(_0x45ca96[_0x470844(0x10f)]!==undefined&&(!Number[_0x470844(0x111)](_0x45ca96[_0x470844(0x10f)])||_0x45ca96[_0x470844(0x10f)]<0x0))throw new Error(_0x470844(0x10b));return{'jsUrl':typeof _0x45ca96[_0x470844(0x13e)]==='string'?_0x45ca96['jsUrl'][_0x470844(0x10d)]():undefined,'cssUrl':typeof _0x45ca96[_0x470844(0x107)]===_0x470844(0x11f)?_0x45ca96[_0x470844(0x107)]['trim']():undefined,'appName':typeof _0x45ca96[_0x470844(0x13a)]===_0x470844(0x11f)?_0x45ca96[_0x470844(0x13a)]['trim']():undefined,'visible':typeof _0x45ca96[_0x470844(0x130)]==='boolean'?_0x45ca96[_0x470844(0x130)]:undefined,'parentId':typeof _0x45ca96[_0x470844(0x10f)]==='number'?_0x45ca96['parentId']:undefined};}
1
+ const a184_0x2e0340=a184_0x5991;function a184_0x5e9f(){const _0x23960e=['\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.','390209iuWHxS','info',':\x20expected\x20a\x20non-empty\x20string.','1472064ERSWEW','get','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','label','\x22\x20for\x20','--params.','314235GGYYJz','2ZXZmvD','push','jsUrl','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','Menu\x20sync\x20completed','pages','Invalid\x20--params.visible:\x20expected\x20a\x20boolean.','Parent\x20','dryRun','765400dilzfo','string','Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','421253MfjLFZ','boolean','join','Invalid\x20--params.','\x0a\x20\x20Available\x20local\x20paths:\x20','JS\x20URL\x20is\x20unreachable:\x20','isArray','597306ajchqm','No\x20local\x20pages\x20matched\x20paths:\x20','folder','Start\x20non-interactive\x20menu\x20sync','filter','has','procode','setLogPath','map','Invalid\x20--params:\x20','path','Expected\x20one\x20folder\x20named\x20\x22','import','message','isInteger','cssUrl','keys','group',';\x20found\x20','Invalid\x20--params\x20fields:\x20','length','appName','parentId','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','trim','visible','Invalid\x20--params\x20JSON.','4379336WOnSBQ','order'];a184_0x5e9f=function(){return _0x23960e;};return a184_0x5e9f();}(function(_0x580c93,_0x47dbdf){const _0x499ddc=a184_0x5991,_0x4a7ac9=_0x580c93();while(!![]){try{const _0x20a683=-parseInt(_0x499ddc(0x122))/0x1*(-parseInt(_0x499ddc(0x12c))/0x2)+parseInt(_0x499ddc(0x12b))/0x3+parseInt(_0x499ddc(0x125))/0x4+-parseInt(_0x499ddc(0xfa))/0x5+parseInt(_0x499ddc(0x104))/0x6+-parseInt(_0x499ddc(0xfd))/0x7+-parseInt(_0x499ddc(0x11f))/0x8;if(_0x20a683===_0x47dbdf)break;else _0x4a7ac9['push'](_0x4a7ac9['shift']());}catch(_0x4bf8f1){_0x4a7ac9['push'](_0x4a7ac9['shift']());}}}(a184_0x5e9f,0x31475));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(['jsUrl',a184_0x2e0340(0x113),'appName','visible',a184_0x2e0340(0x11a)]);function a184_0x5991(_0x155ff7,_0x5944e0){_0x155ff7=_0x155ff7-0xfa;const _0x5e9fce=a184_0x5e9f();let _0x5991e8=_0x5e9fce[_0x155ff7];return _0x5991e8;}export function resolvePage(_0x2291f2,_0x3edfc,_0x10e570){const _0x3c1ef5=a184_0x2e0340;let _0x113fcb=_0x3edfc[_0x3c1ef5(0x11a)]??_0x2291f2['parentId'];if(_0x113fcb===undefined&&_0x2291f2[_0x3c1ef5(0x115)]){const _0x3af29f=_0x10e570[_0x3c1ef5(0x108)](_0xdbcc10=>_0xdbcc10['type']===_0x3c1ef5(0x106)&&_0xdbcc10[_0x3c1ef5(0x128)]===_0x2291f2[_0x3c1ef5(0x115)]);if(_0x3af29f['length']!==0x1)throw new Error(_0x3c1ef5(0x10f)+_0x2291f2['group']+_0x3c1ef5(0x129)+_0x2291f2[_0x3c1ef5(0x10e)]+_0x3c1ef5(0x116)+_0x3af29f[_0x3c1ef5(0x118)]);_0x113fcb=_0x3af29f[0x0]['id'];}if(_0x113fcb!==undefined&&_0x113fcb!==0x0&&_0x10e570[_0x3c1ef5(0x108)](_0x3c3465=>_0x3c3465['id']===_0x113fcb&&_0x3c3465['type']===_0x3c1ef5(0x106))[_0x3c1ef5(0x118)]!==0x1)throw new Error(_0x3c1ef5(0x133)+_0x113fcb+_0x3c1ef5(0x121));return{..._0x2291f2,..._0x113fcb===undefined?{}:{'parentId':_0x113fcb},..._0x3edfc[_0x3c1ef5(0x11d)]===undefined?{}:{'visible':_0x3edfc[_0x3c1ef5(0x11d)]}};}function validateParams(_0x12d86a){const _0x19ce4d=a184_0x2e0340,_0x43a4e9=[];return _0x12d86a[_0x19ce4d(0x12e)]&&!isValidJsHttpsUrl(_0x12d86a[_0x19ce4d(0x12e)])&&_0x43a4e9[_0x19ce4d(0x12d)]({'field':_0x19ce4d(0x12e),'message':_0x19ce4d(0x11b)}),_0x12d86a[_0x19ce4d(0x113)]&&!isValidCssHttpsUrl(_0x12d86a[_0x19ce4d(0x113)])&&_0x43a4e9[_0x19ce4d(0x12d)]({'field':_0x19ce4d(0x113),'message':_0x19ce4d(0x12f)}),_0x43a4e9;}export async function runMenuSyncCore(_0x1c6db9,_0x45656b,_0x5ce146=[],_0x35cc34,_0x4bf515={}){const _0x55097c=a184_0x2e0340,_0x112a00=parseMenuSyncParams(_0x35cc34),_0x56a2f6=[...new Set(_0x5ce146[_0x55097c(0x10c)](_0x2265f1=>_0x2265f1[_0x55097c(0x11c)]())[_0x55097c(0x108)](Boolean)[_0x55097c(0x10c)](menuPathKey))],_0x2f4726=_0x112a00[_0x55097c(0x12e)],_0x558d0e=_0x112a00['cssUrl'],_0x1fb754=[];if(_0x2f4726)_0x1fb754[_0x55097c(0x12d)](_0x2f4726);if(_0x558d0e)_0x1fb754[_0x55097c(0x12d)](_0x558d0e);const _0x1d1b09=validateParams(_0x112a00);if(_0x1d1b09[_0x55097c(0x118)]>0x0){const _0x537544=_0x1d1b09[_0x55097c(0x10c)](_0x56b115=>_0x55097c(0x12a)+_0x56b115['field']+':\x20'+_0x56b115[_0x55097c(0x111)])[_0x55097c(0xff)](';\x20');throw new Error(_0x55097c(0x10d)+_0x537544);}logger[_0x55097c(0x10b)](process['cwd']()),logger[_0x55097c(0x123)]('menu-sync',_0x55097c(0x107),{'appCode':_0x1c6db9,'selectedCount':_0x56a2f6[_0x55097c(0x118)],'jsUrl':_0x2f4726,'cssUrl':_0x558d0e});if(_0x2f4726){const _0x193d83=await isUrlReachable(_0x2f4726);if(!_0x193d83)throw new Error(_0x55097c(0x102)+_0x2f4726);}if(_0x558d0e){const _0x18ac27=await isUrlReachable(_0x558d0e);if(!_0x18ac27)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x558d0e);}const _0xf337ca=getLocalPages();if(_0xf337ca[_0x55097c(0x118)]===0x0){if(_0x56a2f6[_0x55097c(0x118)]>0x0)throw new Error(_0x55097c(0x105)+_0x56a2f6[_0x55097c(0xff)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x4bf515[_0x55097c(0x134)]===!![],'targetPages':[],'plannedMenus':[]};}const _0xf54f51=await getOnlineMenuList(_0x1c6db9,_0x45656b),_0x2a5fc4=new Set(_0xf54f51[_0x55097c(0x10c)](_0x18662b=>menuPathKey(_0x18662b[_0x55097c(0x10e)])));let _0x52e0c1;if(_0x56a2f6[_0x55097c(0x118)]>0x0){const _0x574887=new Map(_0xf337ca[_0x55097c(0x10c)](_0x5394fc=>[menuPathKey(_0x5394fc[_0x55097c(0x10e)]),_0x5394fc])),_0x4edd39=_0x56a2f6[_0x55097c(0x108)](_0x4dca47=>!_0x574887['has'](_0x4dca47));if(_0x4edd39[_0x55097c(0x118)]>0x0){const _0x57d57b=_0xf337ca['map'](_0x3d9c01=>_0x3d9c01['path'])[_0x55097c(0xff)](',\x20');throw new Error(_0x55097c(0x105)+_0x4edd39[_0x55097c(0xff)](',\x20')+_0x55097c(0x101)+_0x57d57b);}const _0x8bf74d=_0x56a2f6[_0x55097c(0x108)](_0x1de664=>_0x2a5fc4[_0x55097c(0x109)](_0x1de664));if(_0x8bf74d[_0x55097c(0x118)]>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0x8bf74d[_0x55097c(0xff)](',\x20'));_0x52e0c1=_0x56a2f6[_0x55097c(0x10c)](_0x40c498=>_0x574887[_0x55097c(0x126)](_0x40c498));}else _0x52e0c1=_0xf337ca[_0x55097c(0x108)](_0x237b13=>!_0x2a5fc4[_0x55097c(0x109)](menuPathKey(_0x237b13[_0x55097c(0x10e)])));if(_0x52e0c1['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x4bf515[_0x55097c(0x134)]===!![],'targetPages':[],'plannedMenus':[]};_0x52e0c1=_0x52e0c1[_0x55097c(0x10c)](_0x3c129d=>resolvePage(_0x3c129d,_0x112a00,_0xf54f51));_0x112a00[_0x55097c(0x119)]&&_0x1fb754['length']===0x0&&await assertSharedResourcesConfigured(_0x1c6db9,_0x45656b,_0x112a00[_0x55097c(0x119)]);const _0x590d44=_0x52e0c1[_0x55097c(0x10c)](_0x113838=>({'type':_0x55097c(0x10a),'path':_0x113838[_0x55097c(0x10e)],'label':_0x113838[_0x55097c(0x128)],'loadScriptMode':_0x55097c(0x110),'resources':[..._0x1fb754],..._0x113838[_0x55097c(0x11d)]===undefined?{}:{'visible':_0x113838['visible']},..._0x113838[_0x55097c(0x11a)]===undefined?{}:{'parentId':_0x113838[_0x55097c(0x11a)]},..._0x113838[_0x55097c(0x120)]===undefined?{}:{'sort':_0x113838['order']},..._0x112a00[_0x55097c(0x119)]===undefined?{}:{'appName':_0x112a00[_0x55097c(0x119)]}}));if(_0x4bf515[_0x55097c(0x134)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x52e0c1,'plannedMenus':_0x590d44};const _0x402501=_0x112a00['appName']?await createMenus(_0x1c6db9,_0x45656b,_0x52e0c1,_0x1fb754[_0x55097c(0x118)]>0x0?_0x1fb754:undefined,{'appName':_0x112a00[_0x55097c(0x119)]}):await createMenus(_0x1c6db9,_0x45656b,_0x52e0c1,_0x1fb754[_0x55097c(0x118)]>0x0?_0x1fb754:undefined);return logger[_0x55097c(0x123)]('menu-sync',_0x55097c(0x130),{'count':_0x52e0c1['length'],'resources':_0x1fb754}),{'created':_0x402501[_0x55097c(0x118)],'skipped':![],'dryRun':![],'targetPages':_0x52e0c1,'plannedMenus':_0x590d44,'menus':_0x402501};}export function parseMenuSyncParams(_0x2bc024){const _0x12514e=a184_0x2e0340;if(!_0x2bc024||typeof _0x2bc024!==_0x12514e(0xfb))return{};let _0x595736;try{_0x595736=JSON['parse'](_0x2bc024);}catch{throw new Error(_0x12514e(0x11e));}if(typeof _0x595736!=='object'||_0x595736===null||Array[_0x12514e(0x103)](_0x595736))throw new Error(_0x12514e(0x127));const _0x666114=_0x595736;if(Object['hasOwn'](_0x666114,_0x12514e(0x131)))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x135b83=Object[_0x12514e(0x114)](_0x666114)[_0x12514e(0x108)](_0xba79c8=>!MENU_SYNC_PARAM_KEYS[_0x12514e(0x109)](_0xba79c8));if(_0x135b83[_0x12514e(0x118)]>0x0)throw new Error(_0x12514e(0x117)+_0x135b83[_0x12514e(0xff)](',\x20')+'.');for(const _0x32dfb3 of[_0x12514e(0x12e),_0x12514e(0x113),_0x12514e(0x119)]){const _0x341ff7=_0x666114[_0x32dfb3];if(_0x341ff7!==undefined&&(typeof _0x341ff7!==_0x12514e(0xfb)||_0x341ff7[_0x12514e(0x11c)]()===''))throw new Error(_0x12514e(0x100)+_0x32dfb3+_0x12514e(0x124));}if(_0x666114['visible']!==undefined&&typeof _0x666114['visible']!==_0x12514e(0xfe))throw new Error(_0x12514e(0x132));if(_0x666114[_0x12514e(0x11a)]!==undefined&&(!Number[_0x12514e(0x112)](_0x666114[_0x12514e(0x11a)])||_0x666114[_0x12514e(0x11a)]<0x0))throw new Error(_0x12514e(0xfc));return{'jsUrl':typeof _0x666114[_0x12514e(0x12e)]===_0x12514e(0xfb)?_0x666114['jsUrl']['trim']():undefined,'cssUrl':typeof _0x666114[_0x12514e(0x113)]===_0x12514e(0xfb)?_0x666114[_0x12514e(0x113)][_0x12514e(0x11c)]():undefined,'appName':typeof _0x666114[_0x12514e(0x119)]===_0x12514e(0xfb)?_0x666114[_0x12514e(0x119)]['trim']():undefined,'visible':typeof _0x666114[_0x12514e(0x11d)]===_0x12514e(0xfe)?_0x666114['visible']:undefined,'parentId':typeof _0x666114['parentId']==='number'?_0x666114['parentId']:undefined};}
@@ -1 +1 @@
1
- (function(_0x5bcea2,_0x1f770d){const _0x30a035=a186_0xc74f,_0x17fb13=_0x5bcea2();while(!![]){try{const _0x47b3e3=parseInt(_0x30a035(0x1a6))/0x1*(parseInt(_0x30a035(0x1e3))/0x2)+-parseInt(_0x30a035(0x1a5))/0x3+-parseInt(_0x30a035(0x1c8))/0x4*(parseInt(_0x30a035(0x1ac))/0x5)+parseInt(_0x30a035(0x1dc))/0x6+parseInt(_0x30a035(0x1c6))/0x7*(parseInt(_0x30a035(0x1be))/0x8)+parseInt(_0x30a035(0x1d8))/0x9*(parseInt(_0x30a035(0x1b6))/0xa)+-parseInt(_0x30a035(0x1c5))/0xb;if(_0x47b3e3===_0x1f770d)break;else _0x17fb13['push'](_0x17fb13['shift']());}catch(_0x26c55a){_0x17fb13['push'](_0x17fb13['shift']());}}}(a186_0x46b3,0x36d89));function a186_0x46b3(){const _0x4d8582=['value','66182eCaRHL','cwd','1292910TgXkok','1siFLZI','trim','cssUrl','join','string','label','116420ZXQFll','force','path','\x20existing\x20JS\x20resources\x20for\x20\x22','info','selection','some','Start\x20non-interactive\x20menu\x20asset\x20update','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','180DcvkIk',').\x20','.\x20Allowed\x20values:\x20replace,\x20patch','.js','extend','loadScriptMode','all','push','16YHdgJO','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','rejected','menuIds','jsUrl','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','paths','2851101oEegCl','624743bNiMUf','menu-asset-update','12uBvcix','map','patch','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','unshift','filter','JS\x20URL\x20is\x20unreachable:\x20','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','dryRun','after','replace','menu\x20asset-update\x20cannot\x20patch\x20','field','length','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','Invalid\x20--mode:\x20','218061jliHSN','resources','isArray','toLowerCase','2021706COpdnE','message','--params.','has','endsWith','\x22\x20('];a186_0x46b3=function(){return _0x4d8582;};return a186_0x46b3();}import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a186_0xc74f(_0x3a766a,_0x3fca6f){_0x3a766a=_0x3a766a-0x1a5;const _0x46b3fb=a186_0x46b3();let _0xc74f66=_0x46b3fb[_0x3a766a];return _0xc74f66;}import{logger}from'../../../utils/logger.js';function validateParams(_0x3f67ce){const _0x166a87=a186_0xc74f,_0x7b0a8b=[];return _0x3f67ce[_0x166a87(0x1c2)]&&!isValidJsHttpsUrl(_0x3f67ce['jsUrl'])&&_0x7b0a8b[_0x166a87(0x1bd)]({'field':_0x166a87(0x1c2),'message':_0x166a87(0x1bf)}),_0x3f67ce[_0x166a87(0x1a8)]&&!isValidCssHttpsUrl(_0x3f67ce[_0x166a87(0x1a8)])&&_0x7b0a8b['push']({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x7b0a8b;}export async function runMenuUpdateCore(_0x18d8c5,_0x4fd09f,_0x329805,_0x397b3d={}){const _0x11e108=a186_0xc74f,_0x22bd6a=parseUpdateParamsFlag(_0x329805),_0x5f2848=normalizeMode(_0x397b3d['mode']);validateSelection(_0x397b3d[_0x11e108(0x1b1)]);const _0x1680f4=[];if(_0x22bd6a[_0x11e108(0x1c2)])_0x1680f4[_0x11e108(0x1bd)](_0x22bd6a[_0x11e108(0x1c2)]);if(_0x22bd6a[_0x11e108(0x1a8)])_0x1680f4[_0x11e108(0x1bd)](_0x22bd6a[_0x11e108(0x1a8)]);const _0x1eb1e1=validateParams(_0x22bd6a);if(_0x1eb1e1[_0x11e108(0x1d5)]>0x0){const _0x52907f=_0x1eb1e1[_0x11e108(0x1c9)](_0x5a122c=>_0x11e108(0x1de)+_0x5a122c[_0x11e108(0x1d4)]+':\x20'+_0x5a122c[_0x11e108(0x1dd)])[_0x11e108(0x1a9)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x52907f);}if(_0x1680f4[_0x11e108(0x1d5)]===0x0)throw new Error(_0x11e108(0x1b4)+_0x11e108(0x1cb));logger['setLogPath'](process[_0x11e108(0x1e4)]()),logger[_0x11e108(0x1b0)](_0x11e108(0x1c7),_0x11e108(0x1b3),{'appCode':_0x18d8c5,'jsUrl':_0x22bd6a[_0x11e108(0x1c2)],'cssUrl':_0x22bd6a[_0x11e108(0x1a8)],'mode':_0x5f2848,'dryRun':_0x397b3d[_0x11e108(0x1d0)]===!![]});if(_0x22bd6a[_0x11e108(0x1c2)]){const _0x4b17e8=await isUrlReachable(_0x22bd6a[_0x11e108(0x1c2)]);if(!_0x4b17e8)throw new Error(_0x11e108(0x1ce)+_0x22bd6a[_0x11e108(0x1c2)]);}if(_0x22bd6a[_0x11e108(0x1a8)]){const _0x3f4ead=await isUrlReachable(_0x22bd6a[_0x11e108(0x1a8)]);if(!_0x3f4ead)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x22bd6a['cssUrl']);}const _0x234059=await getOnlineMenuList(_0x18d8c5,_0x4fd09f),_0x5eeb35=_0x234059[_0x11e108(0x1cd)](_0x41428c=>_0x41428c[_0x11e108(0x1d9)][_0x11e108(0x1d5)]>0x0),_0x2770c5=selectMenusForUpdate(_0x5eeb35,_0x397b3d[_0x11e108(0x1b1)]);if(_0x2770c5[_0x11e108(0x1d5)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x397b3d[_0x11e108(0x1d0)]===!![]};const _0x2437ae=_0x2770c5[_0x11e108(0x1c9)](_0x5b1eab=>buildMenuUpdateDiff(_0x5b1eab,_0x22bd6a,_0x5f2848,_0x397b3d[_0x11e108(0x1ad)]===!![],_0x397b3d[_0x11e108(0x1bb)]));if(_0x397b3d[_0x11e108(0x1d0)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x2437ae};const _0xc7b453=await Promise['allSettled'](_0x2770c5[_0x11e108(0x1c9)]((_0x2df9f8,_0x194747)=>updateMenuCdnUrl(_0x18d8c5,_0x4fd09f,{'id':_0x2df9f8['id'],'label':_0x2df9f8[_0x11e108(0x1ab)],'path':_0x2df9f8[_0x11e108(0x1ae)],'resources':_0x2437ae[_0x194747][_0x11e108(0x1d1)][_0x11e108(0x1d9)],'extend':_0x2df9f8[_0x11e108(0x1ba)]??null,'loadScriptMode':_0x397b3d[_0x11e108(0x1bb)]}))),_0x3dda0f=_0xc7b453['filter'](_0x56df90=>_0x56df90['status']==='fulfilled')[_0x11e108(0x1c9)](_0xb4929f=>_0xb4929f[_0x11e108(0x1e2)]),_0xf0746f=_0xc7b453['filter'](_0x4987c9=>_0x4987c9['status']===_0x11e108(0x1c0))[_0x11e108(0x1d5)];return logger[_0x11e108(0x1b0)](_0x11e108(0x1c7),'Menu\x20asset\x20update\x20completed',{'count':_0x2770c5[_0x11e108(0x1d5)],'resources':_0x1680f4}),{'updated':_0x3dda0f[_0x11e108(0x1d5)],'failed':_0xf0746f,'skipped':![],'menus':_0x3dda0f};}function validateSelection(_0x454c02){const _0x3eed76=a186_0xc74f;if(!_0x454c02)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x454c02[_0x3eed76(0x1bc)]&&(_0x454c02['menuIds'][_0x3eed76(0x1d5)]>0x0||_0x454c02[_0x3eed76(0x1c4)]['length']>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0x454c02[_0x3eed76(0x1bc)]&&_0x454c02[_0x3eed76(0x1c1)][_0x3eed76(0x1d5)]===0x0&&_0x454c02[_0x3eed76(0x1c4)][_0x3eed76(0x1d5)]===0x0)throw new Error(_0x3eed76(0x1b5));}export function selectMenusForUpdate(_0x376123,_0x19ce1a){const _0x45dc89=a186_0xc74f;validateSelection(_0x19ce1a);if(_0x19ce1a[_0x45dc89(0x1bc)])return _0x376123;const _0x5b62b5=new Set(_0x376123[_0x45dc89(0x1c9)](_0x5cc163=>_0x5cc163['id'])),_0x3b6363=new Set(_0x376123[_0x45dc89(0x1c9)](_0x4a1d52=>_0x4a1d52[_0x45dc89(0x1ae)])),_0xd968d0=_0x19ce1a[_0x45dc89(0x1c1)][_0x45dc89(0x1cd)](_0x568056=>!_0x5b62b5[_0x45dc89(0x1df)](_0x568056)),_0x103b57=_0x19ce1a['paths'][_0x45dc89(0x1cd)](_0x4979d8=>!_0x3b6363[_0x45dc89(0x1df)](_0x4979d8));if(_0xd968d0[_0x45dc89(0x1d5)]>0x0||_0x103b57[_0x45dc89(0x1d5)]>0x0){const _0x32a5c6=[..._0xd968d0[_0x45dc89(0x1c9)](_0x3995c9=>String(_0x3995c9)),..._0x103b57][_0x45dc89(0x1a9)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x32a5c6);}const _0x2dfb0d=new Set(_0x19ce1a[_0x45dc89(0x1c1)]),_0x123a02=new Set(_0x19ce1a[_0x45dc89(0x1c4)]);return _0x376123[_0x45dc89(0x1cd)](_0x3f8177=>_0x2dfb0d[_0x45dc89(0x1df)](_0x3f8177['id'])||_0x123a02[_0x45dc89(0x1df)](_0x3f8177[_0x45dc89(0x1ae)]));}function normalizeMode(_0x3d96cd){const _0x1a51f4=a186_0xc74f;if(!_0x3d96cd)return _0x1a51f4(0x1ca);if(_0x3d96cd===_0x1a51f4(0x1d2)||_0x3d96cd===_0x1a51f4(0x1ca))return _0x3d96cd;throw new Error(_0x1a51f4(0x1d7)+_0x3d96cd+_0x1a51f4(0x1b8));}function buildMenuUpdateDiff(_0xc661a8,_0x1669ae,_0x3aac9d,_0x53b81c,_0x3d6a19){const _0x4ff6cb=a186_0xc74f,_0x4611bd=[..._0xc661a8[_0x4ff6cb(0x1d9)]];_0x3aac9d==='patch'&&assertUnambiguousPatchResources(_0xc661a8,_0x4611bd,_0x1669ae);const _0xbdb1b6=_0x3aac9d===_0x4ff6cb(0x1ca)?patchResources(_0x4611bd,_0x1669ae):replaceResources(_0x1669ae),_0x292ce8=[],_0x35e6de=_0x4611bd[_0x4ff6cb(0x1b2)](isJsResource),_0x1457c8=_0xbdb1b6[_0x4ff6cb(0x1b2)](isJsResource);if(_0x35e6de&&!_0x1457c8){const _0x4acd2f=_0x4ff6cb(0x1c3)+_0xc661a8[_0x4ff6cb(0x1ab)]+_0x4ff6cb(0x1e1)+_0xc661a8[_0x4ff6cb(0x1ae)]+_0x4ff6cb(0x1b7)+_0x4ff6cb(0x1d6);if(!_0x53b81c)throw new Error(_0x4acd2f);_0x292ce8[_0x4ff6cb(0x1bd)](_0x4acd2f);}const _0x390a34=_0x4611bd[_0x4ff6cb(0x1b2)](isCssResource),_0x164690=_0xbdb1b6[_0x4ff6cb(0x1b2)](isCssResource);_0x390a34&&!_0x164690&&_0x292ce8[_0x4ff6cb(0x1bd)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0xc661a8['label']+'\x22\x20('+_0xc661a8['path']+').');const _0x568576=typeof _0xc661a8['extend']?.[_0x4ff6cb(0x1bb)]==='string'?_0xc661a8[_0x4ff6cb(0x1ba)][_0x4ff6cb(0x1bb)]:null,_0x59aabc=_0x3d6a19?{'loadScriptMode':_0x568576}:{},_0x5969ff=_0x3d6a19?{'loadScriptMode':_0x3d6a19}:{};return{'id':_0xc661a8['id'],'label':_0xc661a8[_0x4ff6cb(0x1ab)],'path':_0xc661a8[_0x4ff6cb(0x1ae)],'mode':_0x3aac9d,'before':{'resources':_0x4611bd,..._0x59aabc},'after':{'resources':_0xbdb1b6,..._0x5969ff},'warnings':_0x292ce8};}function replaceResources(_0xf60296){const _0x3a68a7=a186_0xc74f;return[_0xf60296['jsUrl'],_0xf60296[_0x3a68a7(0x1a8)]]['filter'](_0x329664=>!!_0x329664);}function assertUnambiguousPatchResources(_0x3cf6c3,_0x4a3359,_0x2cf874){const _0x193205=a186_0xc74f,_0x275b03=_0x4a3359['filter'](isJsResource)[_0x193205(0x1d5)];if(_0x2cf874['jsUrl']&&_0x275b03>0x1)throw new Error(_0x193205(0x1d3)+_0x275b03+_0x193205(0x1af)+_0x3cf6c3[_0x193205(0x1ab)]+_0x193205(0x1e1)+_0x3cf6c3[_0x193205(0x1ae)]+')\x20'+'with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');const _0x46c4d2=_0x4a3359[_0x193205(0x1cd)](isCssResource)[_0x193205(0x1d5)];if(_0x2cf874[_0x193205(0x1a8)]&&_0x46c4d2>0x1)throw new Error(_0x193205(0x1d3)+_0x46c4d2+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x3cf6c3['label']+'\x22\x20('+_0x3cf6c3[_0x193205(0x1ae)]+')\x20'+_0x193205(0x1cf));}function patchResources(_0x1ea2f8,_0x522362){const _0x50dc24=a186_0xc74f;let _0x2c027f=![],_0x5eb259=![];const _0x15d398=[];for(const _0x5a10c8 of _0x1ea2f8){if(isJsResource(_0x5a10c8)){if(_0x522362['jsUrl']&&!_0x2c027f)_0x15d398[_0x50dc24(0x1bd)](_0x522362[_0x50dc24(0x1c2)]),_0x2c027f=!![];else!_0x522362[_0x50dc24(0x1c2)]&&_0x15d398['push'](_0x5a10c8);continue;}if(isCssResource(_0x5a10c8)){if(_0x522362['cssUrl']&&!_0x5eb259)_0x15d398[_0x50dc24(0x1bd)](_0x522362['cssUrl']),_0x5eb259=!![];else!_0x522362[_0x50dc24(0x1a8)]&&_0x15d398[_0x50dc24(0x1bd)](_0x5a10c8);continue;}_0x15d398[_0x50dc24(0x1bd)](_0x5a10c8);}return _0x522362['jsUrl']&&!_0x2c027f&&_0x15d398[_0x50dc24(0x1cc)](_0x522362[_0x50dc24(0x1c2)]),_0x522362['cssUrl']&&!_0x5eb259&&_0x15d398[_0x50dc24(0x1bd)](_0x522362[_0x50dc24(0x1a8)]),_0x15d398;}function isJsResource(_0x1539b5){const _0x4f3f9c=a186_0xc74f;return stripQuery(_0x1539b5)[_0x4f3f9c(0x1db)]()[_0x4f3f9c(0x1e0)](_0x4f3f9c(0x1b9));}function isCssResource(_0x28af03){const _0x302270=a186_0xc74f;return stripQuery(_0x28af03)[_0x302270(0x1db)]()['endsWith']('.css');}function stripQuery(_0x20c96e){return _0x20c96e['split']('?')[0x0]??_0x20c96e;}function parseUpdateParamsFlag(_0x4a9367){const _0x6aa450=a186_0xc74f;if(!_0x4a9367||typeof _0x4a9367!=='string')return{};try{const _0x466290=JSON['parse'](_0x4a9367);if(typeof _0x466290!=='object'||_0x466290===null||Array[_0x6aa450(0x1da)](_0x466290))return{};return{'jsUrl':typeof _0x466290[_0x6aa450(0x1c2)]===_0x6aa450(0x1aa)?_0x466290['jsUrl']['trim']():undefined,'cssUrl':typeof _0x466290[_0x6aa450(0x1a8)]==='string'?_0x466290[_0x6aa450(0x1a8)][_0x6aa450(0x1a7)]():undefined};}catch{return{};}}
1
+ (function(_0x1ab9af,_0x3b9f1b){const _0x22cff7=a186_0x587d,_0x44dab4=_0x1ab9af();while(!![]){try{const _0x4befb5=parseInt(_0x22cff7(0x124))/0x1+parseInt(_0x22cff7(0x119))/0x2+-parseInt(_0x22cff7(0x101))/0x3+parseInt(_0x22cff7(0x13a))/0x4*(parseInt(_0x22cff7(0x11b))/0x5)+-parseInt(_0x22cff7(0x118))/0x6*(-parseInt(_0x22cff7(0x11d))/0x7)+-parseInt(_0x22cff7(0x10d))/0x8*(-parseInt(_0x22cff7(0x10f))/0x9)+-parseInt(_0x22cff7(0x12b))/0xa*(parseInt(_0x22cff7(0x130))/0xb);if(_0x4befb5===_0x3b9f1b)break;else _0x44dab4['push'](_0x44dab4['shift']());}catch(_0x512e79){_0x44dab4['push'](_0x44dab4['shift']());}}}(a186_0x3cc3,0xa9ee5));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';function a186_0x587d(_0x2b0773,_0x1ee50b){_0x2b0773=_0x2b0773-0x100;const _0x3cc3fa=a186_0x3cc3();let _0x587da7=_0x3cc3fa[_0x2b0773];return _0x587da7;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x357e40){const _0x6f03e1=a186_0x587d,_0xc5e3bd=[];return _0x357e40[_0x6f03e1(0x143)]&&!isValidJsHttpsUrl(_0x357e40[_0x6f03e1(0x143)])&&_0xc5e3bd['push']({'field':_0x6f03e1(0x143),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x357e40[_0x6f03e1(0x146)]&&!isValidCssHttpsUrl(_0x357e40['cssUrl'])&&_0xc5e3bd['push']({'field':'cssUrl','message':_0x6f03e1(0x126)}),_0xc5e3bd;}export async function runMenuUpdateCore(_0x553bee,_0x2ce326,_0x56b467,_0x471cbd={}){const _0x4cf071=a186_0x587d,_0x2f7d45=parseUpdateParamsFlag(_0x56b467),_0x40841b=normalizeMode(_0x471cbd[_0x4cf071(0x128)]);validateSelection(_0x471cbd[_0x4cf071(0x109)]);const _0x4e8886=[];if(_0x2f7d45[_0x4cf071(0x143)])_0x4e8886['push'](_0x2f7d45[_0x4cf071(0x143)]);if(_0x2f7d45[_0x4cf071(0x146)])_0x4e8886[_0x4cf071(0x132)](_0x2f7d45[_0x4cf071(0x146)]);const _0xe8f9b1=validateParams(_0x2f7d45);if(_0xe8f9b1[_0x4cf071(0x127)]>0x0){const _0x5d7485=_0xe8f9b1['map'](_0x452f66=>_0x4cf071(0x123)+_0x452f66[_0x4cf071(0x138)]+':\x20'+_0x452f66[_0x4cf071(0x134)])[_0x4cf071(0x120)](';\x20');throw new Error(_0x4cf071(0x147)+_0x5d7485);}if(_0x4e8886[_0x4cf071(0x127)]===0x0)throw new Error(_0x4cf071(0x12e)+_0x4cf071(0x14c));logger[_0x4cf071(0x149)](process[_0x4cf071(0x14a)]()),logger[_0x4cf071(0x13c)](_0x4cf071(0x110),_0x4cf071(0x14b),{'appCode':_0x553bee,'jsUrl':_0x2f7d45['jsUrl'],'cssUrl':_0x2f7d45[_0x4cf071(0x146)],'mode':_0x40841b,'dryRun':_0x471cbd['dryRun']===!![]});if(_0x2f7d45[_0x4cf071(0x143)]){const _0x12cc29=await isUrlReachable(_0x2f7d45[_0x4cf071(0x143)]);if(!_0x12cc29)throw new Error(_0x4cf071(0x100)+_0x2f7d45[_0x4cf071(0x143)]);}if(_0x2f7d45[_0x4cf071(0x146)]){const _0x52c8d4=await isUrlReachable(_0x2f7d45['cssUrl']);if(!_0x52c8d4)throw new Error(_0x4cf071(0x136)+_0x2f7d45[_0x4cf071(0x146)]);}const _0x15ab7b=await getOnlineMenuList(_0x553bee,_0x2ce326),_0x2f825c=_0x15ab7b['filter'](_0x5c81d6=>_0x5c81d6['resources'][_0x4cf071(0x127)]>0x0),_0x1bc672=selectMenusForUpdate(_0x2f825c,_0x471cbd['selection']);if(_0x1bc672[_0x4cf071(0x127)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x471cbd[_0x4cf071(0x10e)]===!![]};const _0x30b6e3=_0x1bc672[_0x4cf071(0x145)](_0x585e97=>buildMenuUpdateDiff(_0x585e97,_0x2f7d45,_0x40841b,_0x471cbd[_0x4cf071(0x13b)]===!![],_0x471cbd[_0x4cf071(0x148)]));if(_0x471cbd[_0x4cf071(0x10e)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x30b6e3};const _0x801fd6=await Promise[_0x4cf071(0x105)](_0x1bc672[_0x4cf071(0x145)]((_0x32645f,_0x2ecf47)=>updateMenuCdnUrl(_0x553bee,_0x2ce326,{'id':_0x32645f['id'],'label':_0x32645f[_0x4cf071(0x114)],'path':_0x32645f[_0x4cf071(0x11e)],'resources':_0x30b6e3[_0x2ecf47][_0x4cf071(0x12a)][_0x4cf071(0x103)],'extend':_0x32645f[_0x4cf071(0x10b)]??null,'loadScriptMode':_0x471cbd[_0x4cf071(0x148)]}))),_0x2d61f9=_0x801fd6['filter'](_0x263023=>_0x263023[_0x4cf071(0x115)]===_0x4cf071(0x131))['map'](_0x2dd8cd=>_0x2dd8cd[_0x4cf071(0x11c)]),_0x37ca97=_0x801fd6[_0x4cf071(0x137)](_0x2d4e41=>_0x2d4e41[_0x4cf071(0x115)]===_0x4cf071(0x13f))[_0x4cf071(0x127)];return logger[_0x4cf071(0x13c)](_0x4cf071(0x110),_0x4cf071(0x11f),{'count':_0x1bc672[_0x4cf071(0x127)],'resources':_0x4e8886}),{'updated':_0x2d61f9['length'],'failed':_0x37ca97,'skipped':![],'menus':_0x2d61f9};}function validateSelection(_0x41c715){const _0x3b1826=a186_0x587d;if(!_0x41c715)throw new Error(_0x3b1826(0x14d));if(_0x41c715[_0x3b1826(0x11a)]&&(_0x41c715[_0x3b1826(0x117)][_0x3b1826(0x127)]>0x0||_0x41c715['paths']['length']>0x0))throw new Error(_0x3b1826(0x102));if(!_0x41c715[_0x3b1826(0x11a)]&&_0x41c715[_0x3b1826(0x117)][_0x3b1826(0x127)]===0x0&&_0x41c715[_0x3b1826(0x141)][_0x3b1826(0x127)]===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}export function selectMenusForUpdate(_0xaf744c,_0x178587){const _0x347dd4=a186_0x587d;validateSelection(_0x178587);if(_0x178587['all'])return _0xaf744c;const _0x183032=new Set(_0xaf744c[_0x347dd4(0x145)](_0x37fc6f=>_0x37fc6f['id'])),_0x36645f=new Set(_0xaf744c[_0x347dd4(0x145)](_0x34da18=>_0x34da18['path'])),_0x15c2b8=_0x178587[_0x347dd4(0x117)][_0x347dd4(0x137)](_0x151581=>!_0x183032[_0x347dd4(0x12f)](_0x151581)),_0x39aa9a=_0x178587[_0x347dd4(0x141)][_0x347dd4(0x137)](_0x251f3c=>!_0x36645f['has'](_0x251f3c));if(_0x15c2b8[_0x347dd4(0x127)]>0x0||_0x39aa9a[_0x347dd4(0x127)]>0x0){const _0xd78ce3=[..._0x15c2b8[_0x347dd4(0x145)](_0x4562b6=>String(_0x4562b6)),..._0x39aa9a][_0x347dd4(0x120)](',\x20');throw new Error(_0x347dd4(0x142)+_0xd78ce3);}const _0x227a46=new Set(_0x178587[_0x347dd4(0x117)]),_0x24082c=new Set(_0x178587[_0x347dd4(0x141)]);return _0xaf744c[_0x347dd4(0x137)](_0x50c0d4=>_0x227a46[_0x347dd4(0x12f)](_0x50c0d4['id'])||_0x24082c[_0x347dd4(0x12f)](_0x50c0d4[_0x347dd4(0x11e)]));}function normalizeMode(_0x24439d){const _0x2d10b7=a186_0x587d;if(!_0x24439d)return _0x2d10b7(0x10a);if(_0x24439d==='replace'||_0x24439d===_0x2d10b7(0x10a))return _0x24439d;throw new Error(_0x2d10b7(0x135)+_0x24439d+_0x2d10b7(0x12d));}function buildMenuUpdateDiff(_0x299af8,_0x4690fa,_0x275d49,_0x251a85,_0x51512a){const _0x5c3d57=a186_0x587d,_0x1f07fa=[..._0x299af8[_0x5c3d57(0x103)]];_0x275d49===_0x5c3d57(0x10a)&&assertUnambiguousPatchResources(_0x299af8,_0x1f07fa,_0x4690fa);const _0x20eaa5=_0x275d49===_0x5c3d57(0x10a)?patchResources(_0x1f07fa,_0x4690fa):replaceResources(_0x4690fa),_0x113f86=[],_0x3e3553=_0x1f07fa['some'](isJsResource),_0x40f40f=_0x20eaa5['some'](isJsResource);if(_0x3e3553&&!_0x40f40f){const _0x1d6142=_0x5c3d57(0x106)+_0x299af8[_0x5c3d57(0x114)]+_0x5c3d57(0x112)+_0x299af8['path']+_0x5c3d57(0x133)+_0x5c3d57(0x121);if(!_0x251a85)throw new Error(_0x1d6142);_0x113f86[_0x5c3d57(0x132)](_0x1d6142);}const _0x582533=_0x1f07fa[_0x5c3d57(0x113)](isCssResource),_0x33603f=_0x20eaa5[_0x5c3d57(0x113)](isCssResource);_0x582533&&!_0x33603f&&_0x113f86[_0x5c3d57(0x132)](_0x5c3d57(0x107)+_0x299af8[_0x5c3d57(0x114)]+'\x22\x20('+_0x299af8[_0x5c3d57(0x11e)]+').');const _0x52c0c5=typeof _0x299af8['extend']?.[_0x5c3d57(0x148)]==='string'?_0x299af8[_0x5c3d57(0x10b)]['loadScriptMode']:null,_0x5b9d4f=_0x51512a?{'loadScriptMode':_0x52c0c5}:{},_0x46d194=_0x51512a?{'loadScriptMode':_0x51512a}:{};return{'id':_0x299af8['id'],'label':_0x299af8[_0x5c3d57(0x114)],'path':_0x299af8[_0x5c3d57(0x11e)],'mode':_0x275d49,'before':{'resources':_0x1f07fa,..._0x5b9d4f},'after':{'resources':_0x20eaa5,..._0x46d194},'warnings':_0x113f86};}function replaceResources(_0x520fba){const _0x45345f=a186_0x587d;return[_0x520fba['jsUrl'],_0x520fba[_0x45345f(0x146)]][_0x45345f(0x137)](_0x2df204=>!!_0x2df204);}function assertUnambiguousPatchResources(_0x55d473,_0x1b444d,_0x5227b7){const _0x58c293=a186_0x587d,_0x25ec50=_0x1b444d['filter'](isJsResource)[_0x58c293(0x127)];if(_0x5227b7[_0x58c293(0x143)]&&_0x25ec50>0x1)throw new Error(_0x58c293(0x122)+_0x25ec50+_0x58c293(0x125)+_0x55d473[_0x58c293(0x114)]+_0x58c293(0x112)+_0x55d473['path']+')\x20'+_0x58c293(0x13e));const _0x31a0de=_0x1b444d['filter'](isCssResource)[_0x58c293(0x127)];if(_0x5227b7['cssUrl']&&_0x31a0de>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x31a0de+_0x58c293(0x10c)+_0x55d473[_0x58c293(0x114)]+_0x58c293(0x112)+_0x55d473['path']+')\x20'+_0x58c293(0x108));}function patchResources(_0xd7ac01,_0x312e0c){const _0xae60fb=a186_0x587d;let _0x2055ac=![],_0x2309b2=![];const _0x3614a2=[];for(const _0x4bfa9a of _0xd7ac01){if(isJsResource(_0x4bfa9a)){if(_0x312e0c[_0xae60fb(0x143)]&&!_0x2055ac)_0x3614a2[_0xae60fb(0x132)](_0x312e0c['jsUrl']),_0x2055ac=!![];else!_0x312e0c[_0xae60fb(0x143)]&&_0x3614a2[_0xae60fb(0x132)](_0x4bfa9a);continue;}if(isCssResource(_0x4bfa9a)){if(_0x312e0c[_0xae60fb(0x146)]&&!_0x2309b2)_0x3614a2['push'](_0x312e0c['cssUrl']),_0x2309b2=!![];else!_0x312e0c['cssUrl']&&_0x3614a2[_0xae60fb(0x132)](_0x4bfa9a);continue;}_0x3614a2[_0xae60fb(0x132)](_0x4bfa9a);}return _0x312e0c[_0xae60fb(0x143)]&&!_0x2055ac&&_0x3614a2[_0xae60fb(0x13d)](_0x312e0c[_0xae60fb(0x143)]),_0x312e0c[_0xae60fb(0x146)]&&!_0x2309b2&&_0x3614a2[_0xae60fb(0x132)](_0x312e0c['cssUrl']),_0x3614a2;}function isJsResource(_0x2c29f3){const _0x51bf07=a186_0x587d;return stripQuery(_0x2c29f3)[_0x51bf07(0x129)]()[_0x51bf07(0x116)](_0x51bf07(0x144));}function a186_0x3cc3(){const _0x5499e6=['Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','menu\x20asset-update\x20cannot\x20patch\x20','--params.','454142wejspY','\x20existing\x20JS\x20resources\x20for\x20\x22','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','length','mode','toLowerCase','after','10DsjZCD','string','.\x20Allowed\x20values:\x20replace,\x20patch','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','has','14336223FMFclM','fulfilled','push',').\x20','message','Invalid\x20--mode:\x20','CSS\x20URL\x20is\x20unreachable:\x20','filter','field','trim','35572wFYpIQ','force','info','unshift','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','rejected','split','paths','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','jsUrl','.js','map','cssUrl','Invalid\x20--params:\x20','loadScriptMode','setLogPath','cwd','Start\x20non-interactive\x20menu\x20asset\x20update','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','JS\x20URL\x20is\x20unreachable:\x20','2433684YLQAgW','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','resources','object','allSettled','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','selection','patch','extend','\x20existing\x20CSS\x20resources\x20for\x20\x22','224Eqokpw','dryRun','133668VwocFT','menu-asset-update','.css','\x22\x20(','some','label','status','endsWith','menuIds','19362ujMBrO','308758ZRMQaP','all','440ZHWFZC','value','2177zMxRfd','path','Menu\x20asset\x20update\x20completed','join'];a186_0x3cc3=function(){return _0x5499e6;};return a186_0x3cc3();}function isCssResource(_0x8bbdd1){const _0x3f1983=a186_0x587d;return stripQuery(_0x8bbdd1)[_0x3f1983(0x129)]()[_0x3f1983(0x116)](_0x3f1983(0x111));}function stripQuery(_0x2f378d){const _0x511e84=a186_0x587d;return _0x2f378d[_0x511e84(0x140)]('?')[0x0]??_0x2f378d;}function parseUpdateParamsFlag(_0x4477a0){const _0x18ca4e=a186_0x587d;if(!_0x4477a0||typeof _0x4477a0!==_0x18ca4e(0x12c))return{};try{const _0x298b7d=JSON['parse'](_0x4477a0);if(typeof _0x298b7d!==_0x18ca4e(0x104)||_0x298b7d===null||Array['isArray'](_0x298b7d))return{};return{'jsUrl':typeof _0x298b7d[_0x18ca4e(0x143)]===_0x18ca4e(0x12c)?_0x298b7d[_0x18ca4e(0x143)][_0x18ca4e(0x139)]():undefined,'cssUrl':typeof _0x298b7d['cssUrl']===_0x18ca4e(0x12c)?_0x298b7d[_0x18ca4e(0x146)][_0x18ca4e(0x139)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a187_0x8b86(_0x4ee57a,_0x2afc13){_0x4ee57a=_0x4ee57a-0x1e9;const _0x2c809b=a187_0x2c80();let _0x8b867f=_0x2c809b[_0x4ee57a];return _0x8b867f;}(function(_0x13287e,_0x206837){const _0xbca10d=a187_0x8b86,_0x1c1660=_0x13287e();while(!![]){try{const _0x316b9d=parseInt(_0xbca10d(0x1f4))/0x1*(parseInt(_0xbca10d(0x1ee))/0x2)+-parseInt(_0xbca10d(0x1ea))/0x3*(parseInt(_0xbca10d(0x1eb))/0x4)+parseInt(_0xbca10d(0x1f5))/0x5*(-parseInt(_0xbca10d(0x1f6))/0x6)+parseInt(_0xbca10d(0x1e9))/0x7*(parseInt(_0xbca10d(0x1f7))/0x8)+parseInt(_0xbca10d(0x1f9))/0x9+parseInt(_0xbca10d(0x1f8))/0xa+-parseInt(_0xbca10d(0x1ed))/0xb;if(_0x316b9d===_0x206837)break;else _0x1c1660['push'](_0x1c1660['shift']());}catch(_0x353f4c){_0x1c1660['push'](_0x1c1660['shift']());}}}(a187_0x2c80,0x41e38));export function isValidJsHttpsUrl(_0x15c383){const _0x2075dc=a187_0x8b86;return/^https:\/\/.+\.js(\?.*)?$/[_0x2075dc(0x1f3)](_0x15c383[_0x2075dc(0x1f0)]());}function a187_0x2c80(){const _0x96d9a6=['test','425049MwNIne','810gmAlVi','4362CxVujt','3257256zATEbh','3682280yxcAPr','2579004SmHVcj','7gpPCAT','543qQlVRZ','60EMlPgd','GET','12062831NJXEsK','2pXlHis','bytes=0-0','trim','cancel','HEAD'];a187_0x2c80=function(){return _0x96d9a6;};return a187_0x2c80();}export function isValidCssHttpsUrl(_0x34c576){const _0x514760=a187_0x8b86;return/^https:\/\/.+\.css(\?.*)?$/[_0x514760(0x1f3)](_0x34c576[_0x514760(0x1f0)]());}export async function isUrlReachable(_0x52d30e){const _0xf374bd=a187_0x8b86;try{const _0x5cf3f4=await fetch(_0x52d30e,{'method':_0xf374bd(0x1f2)});if(_0x5cf3f4['ok'])return!![];}catch{}try{const _0x278578=await fetch(_0x52d30e,{'method':_0xf374bd(0x1ec),'headers':{'Range':_0xf374bd(0x1ef)}}),_0x59f113=_0x278578['ok'];try{await _0x278578['body']?.[_0xf374bd(0x1f1)]();}catch{}return _0x59f113;}catch{return![];}}
1
+ function a187_0x1a74(){const _0x56d73d=['trim','6UMYFdU','3818682ApHzAj','GET','8tVDNeU','bytes=0-0','1246348Hxgesg','cancel','test','3029845fMlHDJ','16383069bJjLya','3594832hIvkUk','358373aaxhJs','432357yXJCMf'];a187_0x1a74=function(){return _0x56d73d;};return a187_0x1a74();}(function(_0x6f5ab,_0x3ae708){const _0x4f46c8=a187_0x1bd6,_0x428b91=_0x6f5ab();while(!![]){try{const _0x3179ce=parseInt(_0x4f46c8(0x6b))/0x1+-parseInt(_0x4f46c8(0x73))/0x2+-parseInt(_0x4f46c8(0x6c))/0x3+-parseInt(_0x4f46c8(0x6a))/0x4+parseInt(_0x4f46c8(0x76))/0x5*(-parseInt(_0x4f46c8(0x6e))/0x6)+parseInt(_0x4f46c8(0x6f))/0x7+-parseInt(_0x4f46c8(0x71))/0x8*(-parseInt(_0x4f46c8(0x77))/0x9);if(_0x3179ce===_0x3ae708)break;else _0x428b91['push'](_0x428b91['shift']());}catch(_0x4a4f7d){_0x428b91['push'](_0x428b91['shift']());}}}(a187_0x1a74,0x6e6ae));function a187_0x1bd6(_0x3d0197,_0x555061){_0x3d0197=_0x3d0197-0x6a;const _0x1a74ce=a187_0x1a74();let _0x1bd6c0=_0x1a74ce[_0x3d0197];return _0x1bd6c0;}export function isValidJsHttpsUrl(_0xe7d473){const _0x50ccb5=a187_0x1bd6;return/^https:\/\/.+\.js(\?.*)?$/[_0x50ccb5(0x75)](_0xe7d473[_0x50ccb5(0x6d)]());}export function isValidCssHttpsUrl(_0x4a2421){const _0x1e7dff=a187_0x1bd6;return/^https:\/\/.+\.css(\?.*)?$/[_0x1e7dff(0x75)](_0x4a2421['trim']());}export async function isUrlReachable(_0x280323){const _0x2b4d6b=a187_0x1bd6;try{const _0x29410d=await fetch(_0x280323,{'method':'HEAD'});if(_0x29410d['ok'])return!![];}catch{}try{const _0x3ede46=await fetch(_0x280323,{'method':_0x2b4d6b(0x70),'headers':{'Range':_0x2b4d6b(0x72)}}),_0x4535ce=_0x3ede46['ok'];try{await _0x3ede46['body']?.[_0x2b4d6b(0x74)]();}catch{}return _0x4535ce;}catch{return![];}}
@@ -1 +1 @@
1
- function a188_0x31a8(){const _0x4101f6=['boundMenus','1265089AhqvON','105bxzhEV','Inspected\x20','1495400syVaLh','1307XaqafW','1256992mBQCOn','subapp-assets-status','856kxEUwR','\x20in\x20menu\x20host\x20','Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','3aFCJox','2080296BPSbpt','7191nipoca','274JuLpsE','cookie','\x20menu(s)\x20for\x20','22CVpprJ','read','21642RcAEws'];a188_0x31a8=function(){return _0x4101f6;};return a188_0x31a8();}const a188_0x2c5c6b=a188_0x133c;(function(_0x349382,_0x23bb34){const _0x262748=a188_0x133c,_0x3b00fc=_0x349382();while(!![]){try{const _0x5c45c6=parseInt(_0x262748(0x19e))/0x1*(parseInt(_0x262748(0x193))/0x2)+parseInt(_0x262748(0x190))/0x3*(parseInt(_0x262748(0x19f))/0x4)+-parseInt(_0x262748(0x19b))/0x5*(parseInt(_0x262748(0x198))/0x6)+parseInt(_0x262748(0x19a))/0x7+-parseInt(_0x262748(0x1a1))/0x8*(-parseInt(_0x262748(0x192))/0x9)+-parseInt(_0x262748(0x19d))/0xa+-parseInt(_0x262748(0x196))/0xb*(parseInt(_0x262748(0x191))/0xc);if(_0x5c45c6===_0x23bb34)break;else _0x3b00fc['push'](_0x3b00fc['shift']());}catch(_0x3625e3){_0x3b00fc['push'](_0x3b00fc['shift']());}}}(a188_0x31a8,0x2dc84));import{getSmartAppRecord}from'../../core/api-client.js';function a188_0x133c(_0x2d8550,_0x33fd2a){_0x2d8550=_0x2d8550-0x18f;const _0x31a8f9=a188_0x31a8();let _0x133cb6=_0x31a8f9[_0x2d8550];return _0x133cb6;}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':a188_0x2c5c6b(0x1a0),'description':a188_0x2c5c6b(0x18f),'risk':a188_0x2c5c6b(0x197),'strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x4603f2){getSubappSelector(_0x4603f2);},async 'execute'(_0x442196){const _0x1b3595=a188_0x2c5c6b,{appCode:_0x1f313b,appName:_0x5c7e10}=getSubappSelector(_0x442196),[_0x1b8a06,_0x130925]=await Promise['all']([getSmartAppRecord(_0x1f313b,_0x442196[_0x1b3595(0x194)]),getOnlineMenuList(_0x1f313b,_0x442196[_0x1b3595(0x194)])]),_0x12c8ae={'appCode':_0x1f313b,...buildSubappAssetsStatus(_0x1b8a06,_0x130925,_0x5c7e10)};return{'ok':!![],'data':_0x12c8ae,'message':_0x1b3595(0x19c)+_0x12c8ae[_0x1b3595(0x199)]+_0x1b3595(0x195)+_0x5c7e10+_0x1b3595(0x1a2)+_0x1f313b+'.'};}};
1
+ function a188_0x4a2c(_0x117c6b,_0x12b626){_0x117c6b=_0x117c6b-0x7b;const _0x227add=a188_0x227a();let _0x4a2c93=_0x227add[_0x117c6b];return _0x4a2c93;}const a188_0x47a082=a188_0x4a2c;(function(_0x1daeef,_0x2a813d){const _0x2a5c22=a188_0x4a2c,_0x48e359=_0x1daeef();while(!![]){try{const _0x3adfec=parseInt(_0x2a5c22(0x81))/0x1*(parseInt(_0x2a5c22(0x89))/0x2)+parseInt(_0x2a5c22(0x7b))/0x3+parseInt(_0x2a5c22(0x87))/0x4+-parseInt(_0x2a5c22(0x85))/0x5+-parseInt(_0x2a5c22(0x7c))/0x6*(parseInt(_0x2a5c22(0x7f))/0x7)+parseInt(_0x2a5c22(0x88))/0x8+-parseInt(_0x2a5c22(0x7e))/0x9;if(_0x3adfec===_0x2a813d)break;else _0x48e359['push'](_0x48e359['shift']());}catch(_0x58536b){_0x48e359['push'](_0x48e359['shift']());}}}(a188_0x227a,0x28efd));import{getSmartAppRecord}from'../../core/api-client.js';function a188_0x227a(){const _0x5aa573=['234xoFckB','Inspected\x20','1901583OMzRKT','24269dRKKpw','boundMenus','16610cWtEXf','Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','\x20menu(s)\x20for\x20','menu','943410ThpnLw','cookie','780396KrXomL','2399560oOHLjv','18WXkqzd','174975UAhFib'];a188_0x227a=function(){return _0x5aa573;};return a188_0x227a();}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':a188_0x47a082(0x84),'command':'subapp-assets-status','description':a188_0x47a082(0x82),'risk':'read','strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x1af213){getSubappSelector(_0x1af213);},async 'execute'(_0x3ff8da){const _0x100650=a188_0x47a082,{appCode:_0x2f6dd7,appName:_0x54ff51}=getSubappSelector(_0x3ff8da),[_0x394100,_0x3b39e9]=await Promise['all']([getSmartAppRecord(_0x2f6dd7,_0x3ff8da[_0x100650(0x86)]),getOnlineMenuList(_0x2f6dd7,_0x3ff8da[_0x100650(0x86)])]),_0x30c657={'appCode':_0x2f6dd7,...buildSubappAssetsStatus(_0x394100,_0x3b39e9,_0x54ff51)};return{'ok':!![],'data':_0x30c657,'message':_0x100650(0x7d)+_0x30c657[_0x100650(0x80)]+_0x100650(0x83)+_0x54ff51+'\x20in\x20menu\x20host\x20'+_0x2f6dd7+'.'};}};
@@ -1 +1 @@
1
- const a189_0x41ff96=a189_0x2418;function a189_0x2418(_0x3009c4,_0x314dea){_0x3009c4=_0x3009c4-0xc6;const _0x3c5880=a189_0x3c58();let _0x241805=_0x3c5880[_0x3009c4];return _0x241805;}(function(_0x516418,_0x1acd3d){const _0x3260fd=a189_0x2418,_0x28a330=_0x516418();while(!![]){try{const _0x2fd51e=parseInt(_0x3260fd(0x109))/0x1+-parseInt(_0x3260fd(0xca))/0x2*(parseInt(_0x3260fd(0x10b))/0x3)+-parseInt(_0x3260fd(0xf2))/0x4+-parseInt(_0x3260fd(0xd4))/0x5*(parseInt(_0x3260fd(0xd7))/0x6)+parseInt(_0x3260fd(0xdf))/0x7+parseInt(_0x3260fd(0x10d))/0x8*(parseInt(_0x3260fd(0xf3))/0x9)+-parseInt(_0x3260fd(0xf5))/0xa*(-parseInt(_0x3260fd(0x102))/0xb);if(_0x2fd51e===_0x1acd3d)break;else _0x28a330['push'](_0x28a330['shift']());}catch(_0xb1fa82){_0x28a330['push'](_0x28a330['shift']());}}}(a189_0x3c58,0x2824a));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([a189_0x41ff96(0xe3),a189_0x41ff96(0xd8),a189_0x41ff96(0xd1),a189_0x41ff96(0xce),a189_0x41ff96(0xd9),a189_0x41ff96(0xe1),a189_0x41ff96(0x113),a189_0x41ff96(0x118),a189_0x41ff96(0xdb),'directDbEnabled']);function parseObject(_0x5c9686,_0x1d8a32){const _0x53c11e=a189_0x41ff96;let _0x11f7df=_0x5c9686;if(typeof _0x5c9686===_0x53c11e(0x111))try{_0x11f7df=JSON[_0x53c11e(0xe6)](_0x5c9686);}catch{throw CliErrors[_0x53c11e(0xfe)](_0x1d8a32+_0x53c11e(0xef));}if(!_0x11f7df||typeof _0x11f7df!==_0x53c11e(0x101)||Array[_0x53c11e(0xde)](_0x11f7df))throw CliErrors['validation'](_0x1d8a32+_0x53c11e(0xf9));return _0x11f7df;}function parseArray(_0x485ad0,_0x4aa441){const _0x93187=a189_0x41ff96;let _0x46e1b0;try{_0x46e1b0=JSON[_0x93187(0xe6)](_0x485ad0);}catch{throw CliErrors[_0x93187(0xfe)](_0x4aa441+_0x93187(0xef));}if(!Array[_0x93187(0xde)](_0x46e1b0))throw CliErrors[_0x93187(0xfe)](_0x4aa441+_0x93187(0x10e));return _0x46e1b0[_0x93187(0xe9)]((_0x40557a,_0x30fa17)=>parseObject(_0x40557a,_0x4aa441+'['+_0x30fa17+']'));}function validateResources(_0x142688){const _0x4f69c2=a189_0x41ff96;if(_0x142688[_0x4f69c2(0xf0)]===0x0)throw CliErrors[_0x4f69c2(0xfe)](_0x4f69c2(0x115));for(const [_0x307ce1,_0x4ae508]of _0x142688[_0x4f69c2(0x112)]()){if(typeof _0x4ae508!=='string')throw CliErrors[_0x4f69c2(0xfe)](_0x4f69c2(0xf1)+_0x307ce1+']\x20must\x20be\x20a\x20URL\x20string.');try{if(new URL(_0x4ae508)[_0x4f69c2(0xee)]!=='https:')throw new Error(_0x4f69c2(0xd6));}catch{throw CliErrors[_0x4f69c2(0xfe)]('resources['+_0x307ce1+']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.');}}if(new Set(_0x142688)[_0x4f69c2(0xf4)]!==_0x142688[_0x4f69c2(0xf0)]||!_0x142688[_0x4f69c2(0x106)](_0x134b7c=>/\.m?js(?:[?#]|$)/i['test'](_0x134b7c)))throw CliErrors['validation'](_0x4f69c2(0xcb));return _0x142688;}function prepare(_0x3bb4ff,_0x360fc9,_0xfdd92c){const _0x5f28c0=a189_0x41ff96;if(!Number['isSafeInteger'](_0x3bb4ff['id'])||(_0x3bb4ff['id']??0x0)<=0x0||typeof _0x3bb4ff[_0x5f28c0(0x114)]!==_0x5f28c0(0x111)||!_0x3bb4ff[_0x5f28c0(0x114)])throw CliErrors['validation']('App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.');const _0x8f00f8=parseObject(_0x3bb4ff[_0x5f28c0(0xdc)],_0x5f28c0(0x105)),_0x1cff6f=Object[_0x5f28c0(0x10a)](_0x8f00f8)[_0x5f28c0(0xf6)](_0x216867=>!KNOWN_EXTEND_KEYS[_0x5f28c0(0xeb)](_0x216867));if(_0x1cff6f['length'])throw CliErrors['validation'](_0x5f28c0(0xe0)+_0x1cff6f[_0x5f28c0(0xd5)](',\x20')+_0x5f28c0(0xe7));if(typeof _0x8f00f8[_0x5f28c0(0xce)]!==_0x5f28c0(0x111))throw CliErrors['validation']('app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.');const _0x432c56=parseArray(_0x8f00f8[_0x5f28c0(0xce)],_0x5f28c0(0xdd)),_0x2e559a=_0x432c56[_0x5f28c0(0xf6)](_0x5e25f0=>_0x5e25f0['appName']===_0x360fc9);if(_0x2e559a[_0x5f28c0(0xf0)]!==0x1)throw CliErrors[_0x5f28c0(0xfe)](_0x5f28c0(0x116)+_0x360fc9+_0x5f28c0(0xd0)+_0x2e559a[_0x5f28c0(0xf0)]+'.');const _0x2b39ce=_0x2e559a[0x0];if(typeof _0x2b39ce[_0x5f28c0(0xc6)]!=='string')throw CliErrors[_0x5f28c0(0xfe)](_0x5f28c0(0xcd));let _0x576c2d;try{_0x576c2d=JSON[_0x5f28c0(0xe6)](_0x2b39ce[_0x5f28c0(0xc6)]);}catch{throw CliErrors[_0x5f28c0(0xfe)](_0x5f28c0(0xe5));}if(!Array[_0x5f28c0(0xde)](_0x576c2d)||_0x576c2d[_0x5f28c0(0x106)](_0x3759cb=>typeof _0x3759cb!==_0x5f28c0(0x111)))throw CliErrors[_0x5f28c0(0xfe)](_0x5f28c0(0xfc));const _0xeddafd=_0x432c56[_0x5f28c0(0xe9)](_0x4aed43=>_0x4aed43===_0x2b39ce?{..._0x4aed43,'resources':JSON[_0x5f28c0(0x103)](_0xfdd92c)}:_0x4aed43),_0x1d0a4f={..._0x8f00f8,'assets':JSON[_0x5f28c0(0x103)](_0xeddafd)},_0x2c56e0=createHash('sha256')[_0x5f28c0(0xd2)](JSON[_0x5f28c0(0x103)]({'appCode':_0x3bb4ff[_0x5f28c0(0xd3)],'id':_0x3bb4ff['id'],'appPublishStatus':_0x3bb4ff['appPublishStatus'],'extend':_0x8f00f8,'appName':_0x360fc9,'resources':_0xfdd92c}))[_0x5f28c0(0xfb)]('hex');return{'before':_0x576c2d,'nextExtend':_0x1d0a4f,'expectedHash':_0x2c56e0,'unchanged':isDeepStrictEqual(_0x576c2d,_0xfdd92c)};}function a189_0x3c58(){const _0x38fd6b=['--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','verified\x20app.extend','protocol','\x20contains\x20invalid\x20JSON.','length','resources[','939360QbzUyl','225TbZJRp','size','4998710QfQQUx','filter','subapp-assets-update','unchanged','\x20must\x20be\x20a\x20JSON\x20object.','App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.','digest','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','str','validation','menu','expected-hash','object','11LBukhn','stringify','before','app.extend','some','\x20in\x20menu\x20host\x20','--resources\x20is\x20required.','39471OULqjZ','keys','473862uqnlfx',';\x20independent\x20deployment\x20not\x20verified.','36296GSDQJy','\x20must\x20be\x20a\x20JSON\x20array.','Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes','apiError','string','entries','vipDeploy','appPublishStatus','At\x20least\x20one\x20resource\x20URL\x20is\x20required.','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20','nextExtend','enableAutoSync','resources','trim','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.','test','2dwlwBo','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','assets','Would\x20update\x20shared\x20assets\x20for\x20',';\x20found\x20','accessKey','update','appCode','1190905aPRuEQ','join','not\x20HTTPS','6QKujfj','enableOpenApi','tenantColumn','JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs','directDbId','extend','app.extend.assets','isArray','998438hSnIXg','Unknown\x20app.extend\x20fields:\x20','enableSample','Updated\x20shared\x20resources\x20for\x20','skinColor','cookie','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','parse','.\x20Refusing\x20update.','expectedHash','map','Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','has'];a189_0x3c58=function(){return _0x38fd6b;};return a189_0x3c58();}function flags(_0x35b41a){const _0x38111d=a189_0x41ff96,{appCode:_0x1bc01e,appName:_0xcf6177}=getSubappSelector(_0x35b41a),_0x4fdee6=_0x35b41a[_0x38111d(0xfd)](_0x38111d(0xc6))[_0x38111d(0xc7)]();if(!_0x4fdee6)throw CliErrors[_0x38111d(0xfe)](_0x38111d(0x108));let _0x2b8c3a;try{_0x2b8c3a=JSON[_0x38111d(0xe6)](_0x4fdee6);}catch{throw CliErrors[_0x38111d(0xfe)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');}if(!Array[_0x38111d(0xde)](_0x2b8c3a))throw CliErrors[_0x38111d(0xfe)](_0x38111d(0xec));return{'appCode':_0x1bc01e,'appName':_0xcf6177,'resources':validateResources(_0x2b8c3a)};}export const menuSubappAssetsUpdate={'service':a189_0x41ff96(0xff),'command':a189_0x41ff96(0xf7),'description':a189_0x41ff96(0xea),'risk':'write','strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a189_0x41ff96(0xc6),'type':a189_0x41ff96(0x111),'required':!![],'description':a189_0x41ff96(0xda)},{'name':a189_0x41ff96(0x100),'type':a189_0x41ff96(0x111),'description':a189_0x41ff96(0x10f)}],async 'validate'(_0x89ffdf){flags(_0x89ffdf);},async 'dryRun'(_0xd91626){const _0x587747=a189_0x41ff96,{appCode:_0x41042a,appName:_0xaabb22,resources:_0x3299c0}=flags(_0xd91626),_0x239f7e=await getSmartAppRecord(_0x41042a,_0xd91626[_0x587747(0xe4)]),_0x3102ad=prepare(_0x239f7e,_0xaabb22,_0x3299c0);return{'method':'POST','url':'/smartapi/app/update','body':{'preview':{'appCode':_0x41042a,'appName':_0xaabb22,'before':_0x3102ad[_0x587747(0x104)],'after':_0x3299c0,'expectedHash':_0x3102ad[_0x587747(0xe8)],'unchanged':_0x3102ad['unchanged'],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x3102ad['unchanged']?_0x587747(0xc8):_0x587747(0xcf)+_0xaabb22+'.'};},async 'execute'(_0x33b7c5){const _0x2701fc=a189_0x41ff96,{appCode:_0x5ad594,appName:_0xf17923,resources:_0x38880d}=flags(_0x33b7c5),_0x5c94fc=_0x33b7c5[_0x2701fc(0xfd)](_0x2701fc(0x100))[_0x2701fc(0xc7)]();if(!/^[a-f0-9]{64}$/i[_0x2701fc(0xc9)](_0x5c94fc))throw CliErrors[_0x2701fc(0xfe)]('--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.');const _0x397570=await getSmartAppRecord(_0x5ad594,_0x33b7c5[_0x2701fc(0xe4)]),_0x27fbc3=prepare(_0x397570,_0xf17923,_0x38880d);if(_0x5c94fc!==_0x27fbc3[_0x2701fc(0xe8)])throw CliErrors['validation']('App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.');if(_0x27fbc3[_0x2701fc(0xf8)])return{'ok':!![],'data':{'appCode':_0x5ad594,'appName':_0xf17923,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x2701fc(0xcc)};await updateSmartAppRecord({'id':_0x397570['id'],'appCode':_0x5ad594,'appPublishStatus':_0x397570[_0x2701fc(0x114)],'extend':_0x27fbc3[_0x2701fc(0x117)]},_0x33b7c5[_0x2701fc(0xe4)]);const _0x4a3743=await getSmartAppRecord(_0x5ad594,_0x33b7c5[_0x2701fc(0xe4)]),_0x11c6b4=parseObject(_0x4a3743[_0x2701fc(0xdc)],_0x2701fc(0xed));if(_0x4a3743['id']!==_0x397570['id']||_0x4a3743['appPublishStatus']!==_0x397570['appPublishStatus']||!isDeepStrictEqual(_0x11c6b4,_0x27fbc3[_0x2701fc(0x117)]))throw CliErrors[_0x2701fc(0x110)](_0x2701fc(0xfa));return{'ok':!![],'data':{'appCode':_0x5ad594,'appName':_0xf17923,'updated':!![],'resources':_0x38880d,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x2701fc(0xe2)+_0xf17923+_0x2701fc(0x107)+_0x5ad594+_0x2701fc(0x10c)};}};
1
+ const a189_0x5d9452=a189_0x237d;(function(_0x27dd60,_0x52a51a){const _0x695b9=a189_0x237d,_0x2e478f=_0x27dd60();while(!![]){try{const _0x1bc54b=-parseInt(_0x695b9(0x71))/0x1+parseInt(_0x695b9(0x7d))/0x2+-parseInt(_0x695b9(0xb4))/0x3+-parseInt(_0x695b9(0x92))/0x4+parseInt(_0x695b9(0xb0))/0x5*(parseInt(_0x695b9(0x98))/0x6)+-parseInt(_0x695b9(0xa6))/0x7*(parseInt(_0x695b9(0xa5))/0x8)+parseInt(_0x695b9(0xaf))/0x9;if(_0x1bc54b===_0x52a51a)break;else _0x2e478f['push'](_0x2e478f['shift']());}catch(_0x286ccc){_0x2e478f['push'](_0x2e478f['shift']());}}}(a189_0x15f2,0xe9d0d));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';function a189_0x237d(_0x36471b,_0x49822c){_0x36471b=_0x36471b-0x70;const _0x15f297=a189_0x15f2();let _0x237db0=_0x15f297[_0x36471b];return _0x237db0;}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([a189_0x5d9452(0xab),a189_0x5d9452(0xaa),'accessKey',a189_0x5d9452(0x8c),a189_0x5d9452(0xb3),'enableSample',a189_0x5d9452(0xa7),a189_0x5d9452(0x7f),'directDbId','directDbEnabled']);function parseObject(_0x3febf0,_0x8ac8bd){const _0x414cf3=a189_0x5d9452;let _0x894538=_0x3febf0;if(typeof _0x3febf0===_0x414cf3(0x93))try{_0x894538=JSON[_0x414cf3(0x7c)](_0x3febf0);}catch{throw CliErrors[_0x414cf3(0x8a)](_0x8ac8bd+'\x20contains\x20invalid\x20JSON.');}if(!_0x894538||typeof _0x894538!=='object'||Array[_0x414cf3(0xa9)](_0x894538))throw CliErrors[_0x414cf3(0x8a)](_0x8ac8bd+_0x414cf3(0x79));return _0x894538;}function parseArray(_0x9c8fc5,_0x428603){const _0x273918=a189_0x5d9452;let _0x1c5a81;try{_0x1c5a81=JSON['parse'](_0x9c8fc5);}catch{throw CliErrors['validation'](_0x428603+_0x273918(0x74));}if(!Array[_0x273918(0xa9)](_0x1c5a81))throw CliErrors[_0x273918(0x8a)](_0x428603+'\x20must\x20be\x20a\x20JSON\x20array.');return _0x1c5a81[_0x273918(0x87)]((_0x5eb4ca,_0x26343f)=>parseObject(_0x5eb4ca,_0x428603+'['+_0x26343f+']'));}function validateResources(_0x2b6e95){const _0x267d9f=a189_0x5d9452;if(_0x2b6e95[_0x267d9f(0xb8)]===0x0)throw CliErrors['validation']('At\x20least\x20one\x20resource\x20URL\x20is\x20required.');for(const [_0x30c47d,_0x92b5d0]of _0x2b6e95[_0x267d9f(0xa1)]()){if(typeof _0x92b5d0!=='string')throw CliErrors[_0x267d9f(0x8a)](_0x267d9f(0xa8)+_0x30c47d+_0x267d9f(0x7b));try{if(new URL(_0x92b5d0)[_0x267d9f(0xbd)]!=='https:')throw new Error(_0x267d9f(0xc0));}catch{throw CliErrors[_0x267d9f(0x8a)](_0x267d9f(0xa8)+_0x30c47d+_0x267d9f(0xb9));}}if(new Set(_0x2b6e95)[_0x267d9f(0x70)]!==_0x2b6e95[_0x267d9f(0xb8)]||!_0x2b6e95[_0x267d9f(0x9b)](_0xca7cdb=>/\.m?js(?:[?#]|$)/i[_0x267d9f(0xc2)](_0xca7cdb)))throw CliErrors['validation'](_0x267d9f(0x86));return _0x2b6e95;}function prepare(_0x4d5465,_0x4eb738,_0x13339c){const _0x33b1b5=a189_0x5d9452;if(!Number[_0x33b1b5(0x73)](_0x4d5465['id'])||(_0x4d5465['id']??0x0)<=0x0||typeof _0x4d5465[_0x33b1b5(0x91)]!==_0x33b1b5(0x93)||!_0x4d5465[_0x33b1b5(0x91)])throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0xad));const _0x153b5b=parseObject(_0x4d5465[_0x33b1b5(0x96)],_0x33b1b5(0x90)),_0x2d1ff6=Object[_0x33b1b5(0x9c)](_0x153b5b)[_0x33b1b5(0x72)](_0x1acf5e=>!KNOWN_EXTEND_KEYS[_0x33b1b5(0x84)](_0x1acf5e));if(_0x2d1ff6[_0x33b1b5(0xb8)])throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0x9d)+_0x2d1ff6[_0x33b1b5(0x8b)](',\x20')+_0x33b1b5(0x83));if(typeof _0x153b5b[_0x33b1b5(0x8c)]!==_0x33b1b5(0x93))throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0xb2));const _0x280241=parseArray(_0x153b5b[_0x33b1b5(0x8c)],_0x33b1b5(0xbc)),_0x5bec1a=_0x280241[_0x33b1b5(0x72)](_0x4995ab=>_0x4995ab[_0x33b1b5(0x80)]===_0x4eb738);if(_0x5bec1a[_0x33b1b5(0xb8)]!==0x1)throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0xc1)+_0x4eb738+_0x33b1b5(0xac)+_0x5bec1a[_0x33b1b5(0xb8)]+'.');const _0x4ba31a=_0x5bec1a[0x0];if(typeof _0x4ba31a[_0x33b1b5(0xb5)]!==_0x33b1b5(0x93))throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0xae));let _0x415a2d;try{_0x415a2d=JSON[_0x33b1b5(0x7c)](_0x4ba31a[_0x33b1b5(0xb5)]);}catch{throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0x77));}if(!Array['isArray'](_0x415a2d)||_0x415a2d['some'](_0x4bbc5b=>typeof _0x4bbc5b!==_0x33b1b5(0x93)))throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0x8f));const _0x24b13f=_0x280241['map'](_0x512cfc=>_0x512cfc===_0x4ba31a?{..._0x512cfc,'resources':JSON[_0x33b1b5(0xa2)](_0x13339c)}:_0x512cfc),_0x4b8500={..._0x153b5b,'assets':JSON[_0x33b1b5(0xa2)](_0x24b13f)},_0x261f88=createHash(_0x33b1b5(0x94))[_0x33b1b5(0x7a)](JSON[_0x33b1b5(0xa2)]({'appCode':_0x4d5465[_0x33b1b5(0xbb)],'id':_0x4d5465['id'],'appPublishStatus':_0x4d5465['appPublishStatus'],'extend':_0x153b5b,'appName':_0x4eb738,'resources':_0x13339c}))[_0x33b1b5(0x81)](_0x33b1b5(0x99));return{'before':_0x415a2d,'nextExtend':_0x4b8500,'expectedHash':_0x261f88,'unchanged':isDeepStrictEqual(_0x415a2d,_0x13339c)};}function flags(_0x1c2ad0){const _0x4997ad=a189_0x5d9452,{appCode:_0x5199c9,appName:_0x3cc79e}=getSubappSelector(_0x1c2ad0),_0x525c49=_0x1c2ad0[_0x4997ad(0x7e)](_0x4997ad(0xb5))['trim']();if(!_0x525c49)throw CliErrors[_0x4997ad(0x8a)](_0x4997ad(0x78));let _0x94fbee;try{_0x94fbee=JSON[_0x4997ad(0x7c)](_0x525c49);}catch{throw CliErrors[_0x4997ad(0x8a)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');}if(!Array[_0x4997ad(0xa9)](_0x94fbee))throw CliErrors['validation'](_0x4997ad(0xa4));return{'appCode':_0x5199c9,'appName':_0x3cc79e,'resources':validateResources(_0x94fbee)};}export const menuSubappAssetsUpdate={'service':'menu','command':a189_0x5d9452(0xa3),'description':'Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','risk':a189_0x5d9452(0xbe),'strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a189_0x5d9452(0xb5),'type':'string','required':!![],'description':'JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs'},{'name':'expected-hash','type':a189_0x5d9452(0x93),'description':a189_0x5d9452(0xba)}],async 'validate'(_0x3e3e18){flags(_0x3e3e18);},async 'dryRun'(_0x4fb3c4){const _0x480f7a=a189_0x5d9452,{appCode:_0x2c397e,appName:_0x51107d,resources:_0x789c0d}=flags(_0x4fb3c4),_0x6f95af=await getSmartAppRecord(_0x2c397e,_0x4fb3c4[_0x480f7a(0x76)]),_0x3891b4=prepare(_0x6f95af,_0x51107d,_0x789c0d);return{'method':_0x480f7a(0xb7),'url':_0x480f7a(0xbf),'body':{'preview':{'appCode':_0x2c397e,'appName':_0x51107d,'before':_0x3891b4[_0x480f7a(0x8d)],'after':_0x789c0d,'expectedHash':_0x3891b4[_0x480f7a(0x9a)],'unchanged':_0x3891b4[_0x480f7a(0x88)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x3891b4[_0x480f7a(0x88)]?_0x480f7a(0x9e):_0x480f7a(0xa0)+_0x51107d+'.'};},async 'execute'(_0x2ea8cf){const _0x365bd5=a189_0x5d9452,{appCode:_0x40e591,appName:_0x114849,resources:_0x5e5704}=flags(_0x2ea8cf),_0x57a12d=_0x2ea8cf[_0x365bd5(0x7e)](_0x365bd5(0x82))['trim']();if(!/^[a-f0-9]{64}$/i[_0x365bd5(0xc2)](_0x57a12d))throw CliErrors[_0x365bd5(0x8a)](_0x365bd5(0x75));const _0x44dd66=await getSmartAppRecord(_0x40e591,_0x2ea8cf['cookie']),_0x4e528b=prepare(_0x44dd66,_0x114849,_0x5e5704);if(_0x57a12d!==_0x4e528b[_0x365bd5(0x9a)])throw CliErrors['validation'](_0x365bd5(0xb6));if(_0x4e528b[_0x365bd5(0x88)])return{'ok':!![],'data':{'appCode':_0x40e591,'appName':_0x114849,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x365bd5(0x97)};await updateSmartAppRecord({'id':_0x44dd66['id'],'appCode':_0x40e591,'appPublishStatus':_0x44dd66[_0x365bd5(0x91)],'extend':_0x4e528b['nextExtend']},_0x2ea8cf[_0x365bd5(0x76)]);const _0x54e47c=await getSmartAppRecord(_0x40e591,_0x2ea8cf[_0x365bd5(0x76)]),_0x645258=parseObject(_0x54e47c[_0x365bd5(0x96)],_0x365bd5(0xb1));if(_0x54e47c['id']!==_0x44dd66['id']||_0x54e47c[_0x365bd5(0x91)]!==_0x44dd66[_0x365bd5(0x91)]||!isDeepStrictEqual(_0x645258,_0x4e528b[_0x365bd5(0x95)]))throw CliErrors[_0x365bd5(0x8e)]('App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.');return{'ok':!![],'data':{'appCode':_0x40e591,'appName':_0x114849,'updated':!![],'resources':_0x5e5704,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x365bd5(0x9f)+_0x114849+_0x365bd5(0x89)+_0x40e591+_0x365bd5(0x85)};}};function a189_0x15f2(){const _0x21157f=['test','size','1153913apinot','filter','isSafeInteger','\x20contains\x20invalid\x20JSON.','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','cookie','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','--resources\x20is\x20required.','\x20must\x20be\x20a\x20JSON\x20object.','update',']\x20must\x20be\x20a\x20URL\x20string.','parse','2901276byNcTp','str','enableAutoSync','appName','digest','expected-hash','.\x20Refusing\x20update.','has',';\x20independent\x20deployment\x20not\x20verified.','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','map','unchanged','\x20in\x20menu\x20host\x20','validation','join','assets','before','apiError','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','app.extend','appPublishStatus','3326020ARYvff','string','sha256','nextExtend','extend','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','11301486YtJhkk','hex','expectedHash','some','keys','Unknown\x20app.extend\x20fields:\x20','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.','Updated\x20shared\x20resources\x20for\x20','Would\x20update\x20shared\x20assets\x20for\x20','entries','stringify','subapp-assets-update','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','2488jsfHRd','23555nrttFL','vipDeploy','resources[','isArray','enableOpenApi','skinColor',';\x20found\x20','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','19201095vBEjuY','5MgPHcu','verified\x20app.extend','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','tenantColumn','4434096ptQLXT','resources','App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.','POST','length',']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.','Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes','appCode','app.extend.assets','protocol','write','/smartapi/app/update','not\x20HTTPS','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20'];a189_0x15f2=function(){return _0x21157f;};return a189_0x15f2();}