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

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 (367) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/detail.js +1 -1
  77. package/lib/commands/dataset/extend-update.js +1 -1
  78. package/lib/commands/dataset/field-restore.js +1 -1
  79. package/lib/commands/dataset/field-update.js +1 -1
  80. package/lib/commands/dataset/generate.js +1 -1
  81. package/lib/commands/dataset/index.js +1 -1
  82. package/lib/commands/dataset/list.js +1 -1
  83. package/lib/commands/dataset/operations.js +1 -1
  84. package/lib/commands/dataset/relation-audit.js +1 -1
  85. package/lib/commands/dataset/relation-create.js +1 -1
  86. package/lib/commands/dataset/relation-delete.js +1 -1
  87. package/lib/commands/dataset/relation-shared.js +1 -1
  88. package/lib/commands/dataset/relation-update.js +1 -1
  89. package/lib/commands/dataset/relations.js +1 -1
  90. package/lib/commands/dataset/rename.js +1 -1
  91. package/lib/commands/dataset/restore.js +1 -1
  92. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  93. package/lib/commands/db/analysis-batching.js +1 -1
  94. package/lib/commands/db/analyze-batch-plan.js +1 -1
  95. package/lib/commands/db/analyze-cancel.js +1 -1
  96. package/lib/commands/db/analyze-start.js +1 -1
  97. package/lib/commands/db/analyze-status.js +1 -1
  98. package/lib/commands/db/create.js +1 -1
  99. package/lib/commands/db/delete.js +1 -1
  100. package/lib/commands/db/detail.js +1 -1
  101. package/lib/commands/db/diff-refresh-start.js +1 -1
  102. package/lib/commands/db/diff-refresh-status.js +1 -1
  103. package/lib/commands/db/diff.js +1 -1
  104. package/lib/commands/db/index.js +1 -1
  105. package/lib/commands/db/list.js +1 -1
  106. package/lib/commands/db/shared.js +1 -1
  107. package/lib/commands/db/table-diff-shared.js +1 -1
  108. package/lib/commands/db/tables.js +1 -1
  109. package/lib/commands/db/test.js +1 -1
  110. package/lib/commands/db/update.js +1 -1
  111. package/lib/commands/deployment/index.js +1 -1
  112. package/lib/commands/deployment/sync-all.js +1 -1
  113. package/lib/commands/deployment/sync-jobs.js +1 -1
  114. package/lib/commands/deployment/sync-status.js +1 -1
  115. package/lib/commands/doctor.js +1 -1
  116. package/lib/commands/file/index.js +1 -1
  117. package/lib/commands/flow/create.js +1 -1
  118. package/lib/commands/flow/detail.js +1 -1
  119. package/lib/commands/flow/index.js +1 -1
  120. package/lib/commands/flow/list.js +1 -1
  121. package/lib/commands/flow/publish.js +1 -1
  122. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  123. package/lib/commands/flow/runtime-role-list.js +1 -1
  124. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  125. package/lib/commands/flow/runtime-user-search.js +1 -1
  126. package/lib/commands/flow/shared.js +1 -1
  127. package/lib/commands/flow/update.js +1 -1
  128. package/lib/commands/flow/validate.js +1 -1
  129. package/lib/commands/instant-api-policy/current.js +1 -1
  130. package/lib/commands/instant-api-policy/index.js +1 -1
  131. package/lib/commands/instant-api-policy/init.js +1 -1
  132. package/lib/commands/instant-api-policy/publish.js +1 -1
  133. package/lib/commands/instant-api-policy/pull.js +1 -1
  134. package/lib/commands/instant-api-policy/revision.js +1 -1
  135. package/lib/commands/instant-api-policy/revisions.js +1 -1
  136. package/lib/commands/instant-api-policy/rollback.js +1 -1
  137. package/lib/commands/instant-api-policy/shared.js +1 -1
  138. package/lib/commands/instant-api-policy/validate.js +1 -1
  139. package/lib/commands/issue/index.js +1 -1
  140. package/lib/commands/issue/nudge.js +1 -1
  141. package/lib/commands/issue/report.js +1 -1
  142. package/lib/commands/issue/shared.js +1 -1
  143. package/lib/commands/kb/create.js +1 -1
  144. package/lib/commands/kb/delete.js +1 -1
  145. package/lib/commands/kb/detail.js +1 -1
  146. package/lib/commands/kb/index.js +1 -1
  147. package/lib/commands/kb/list.js +1 -1
  148. package/lib/commands/kb/search.js +1 -1
  149. package/lib/commands/kb/shared.js +1 -1
  150. package/lib/commands/kb/update.js +1 -1
  151. package/lib/commands/logs/index.js +1 -1
  152. package/lib/commands/menu/asset-update.js +1 -1
  153. package/lib/commands/menu/delete.js +1 -1
  154. package/lib/commands/menu/external-link-create.js +1 -1
  155. package/lib/commands/menu/external-link-update.js +1 -1
  156. package/lib/commands/menu/group-create.js +1 -1
  157. package/lib/commands/menu/group-update.js +1 -1
  158. package/lib/commands/menu/index.js +1 -1
  159. package/lib/commands/menu/list.js +1 -1
  160. package/lib/commands/menu/move.js +1 -1
  161. package/lib/commands/menu/regroup-start.js +1 -1
  162. package/lib/commands/menu/rename.js +1 -1
  163. package/lib/commands/menu/shared/compare-table.js +1 -1
  164. package/lib/commands/menu/shared/delete-plan.js +1 -1
  165. package/lib/commands/menu/shared/facts.js +1 -1
  166. package/lib/commands/menu/shared/index.js +1 -1
  167. package/lib/commands/menu/shared/inquirer.js +1 -1
  168. package/lib/commands/menu/shared/local-pages.js +1 -1
  169. package/lib/commands/menu/shared/logic.js +1 -1
  170. package/lib/commands/menu/shared/mutations.js +1 -1
  171. package/lib/commands/menu/shared/path.js +1 -1
  172. package/lib/commands/menu/shared/service.js +1 -1
  173. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  174. package/lib/commands/menu/shared/sync-core.js +1 -1
  175. package/lib/commands/menu/shared/update-core.js +1 -1
  176. package/lib/commands/menu/shared/valid-url.js +1 -1
  177. package/lib/commands/menu/subapp-assets-status.js +1 -1
  178. package/lib/commands/menu/subapp-assets-update.js +1 -1
  179. package/lib/commands/menu/sync.js +1 -1
  180. package/lib/commands/menu/visibility-update.js +1 -1
  181. package/lib/commands/notification/config-create.js +1 -1
  182. package/lib/commands/notification/config-delete.js +1 -1
  183. package/lib/commands/notification/config-list.js +1 -1
  184. package/lib/commands/notification/config-update.js +1 -1
  185. package/lib/commands/notification/index.js +1 -1
  186. package/lib/commands/notification/shared.js +1 -1
  187. package/lib/commands/ocr/index.js +1 -1
  188. package/lib/commands/page/create.js +1 -1
  189. package/lib/commands/page/custom/detail.js +1 -1
  190. package/lib/commands/page/custom/list.js +1 -1
  191. package/lib/commands/page/custom/publish.js +1 -1
  192. package/lib/commands/page/custom/shared.js +1 -1
  193. package/lib/commands/page/custom/syntax.js +1 -1
  194. package/lib/commands/page/custom/update.js +1 -1
  195. package/lib/commands/page/data-list-status.js +1 -1
  196. package/lib/commands/page/generate-start.js +1 -1
  197. package/lib/commands/page/generate-status.js +1 -1
  198. package/lib/commands/page/index.js +1 -1
  199. package/lib/commands/page/pull.js +1 -1
  200. package/lib/commands/page/push.js +1 -1
  201. package/lib/commands/page/relation-audit.js +1 -1
  202. package/lib/commands/page/restore.js +1 -1
  203. package/lib/commands/page/shared.js +1 -1
  204. package/lib/commands/page/sync.js +1 -1
  205. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  206. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  207. package/lib/commands/project/create/format-elapsed.js +1 -1
  208. package/lib/commands/project/create/main.js +1 -1
  209. package/lib/commands/project/create/materialize-project-template.js +1 -1
  210. package/lib/commands/project/create/project-name.js +1 -1
  211. package/lib/commands/project/create/project-template-archive.js +1 -1
  212. package/lib/commands/project/create/project-template-path.js +1 -1
  213. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  214. package/lib/commands/project/create/use-format-code.js +1 -1
  215. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  216. package/lib/commands/project/domain-routing-sync.js +1 -1
  217. package/lib/commands/project/index.js +1 -1
  218. package/lib/commands/project/upgrade.js +1 -1
  219. package/lib/commands/registry.js +1 -1
  220. package/lib/commands/role/delete.js +1 -1
  221. package/lib/commands/role/detail.js +1 -1
  222. package/lib/commands/role/index.js +1 -1
  223. package/lib/commands/role/list.js +1 -1
  224. package/lib/commands/role/shared.js +1 -1
  225. package/lib/commands/role/update.js +1 -1
  226. package/lib/commands/role/user-add.js +1 -1
  227. package/lib/commands/role/user-remove.js +1 -1
  228. package/lib/commands/role/user-resolve.js +1 -1
  229. package/lib/commands/rule/get.js +1 -1
  230. package/lib/commands/rule/index.js +1 -1
  231. package/lib/commands/rule/list.js +1 -1
  232. package/lib/commands/rule/set.js +1 -1
  233. package/lib/commands/rule/shared.js +1 -1
  234. package/lib/commands/run/index.js +1 -1
  235. package/lib/commands/schema.js +1 -1
  236. package/lib/commands/sql/create.js +1 -1
  237. package/lib/commands/sql/delete.js +1 -1
  238. package/lib/commands/sql/detail.js +1 -1
  239. package/lib/commands/sql/exec.js +1 -1
  240. package/lib/commands/sql/index.js +1 -1
  241. package/lib/commands/sql/list.js +1 -1
  242. package/lib/commands/sql/pull.js +1 -1
  243. package/lib/commands/sql/push.js +1 -1
  244. package/lib/commands/sql/shared.js +1 -1
  245. package/lib/commands/sql/status.js +1 -1
  246. package/lib/commands/sql/validate.js +1 -1
  247. package/lib/commands/task/index.js +1 -1
  248. package/lib/commands/task/status.js +1 -1
  249. package/lib/commands/tenant/index.js +1 -1
  250. package/lib/commands/tenant/members-list.js +1 -1
  251. package/lib/commands/tenant/shared.js +1 -1
  252. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  253. package/lib/commands/user-account/feishu-bind.js +1 -1
  254. package/lib/commands/user-account/index.js +1 -1
  255. package/lib/commands/workspace/add.js +1 -1
  256. package/lib/commands/workspace/index.js +1 -1
  257. package/lib/commands/workspace/remove.js +1 -1
  258. package/lib/config/domain-config.js +1 -1
  259. package/lib/config/project-domain-routing.js +1 -1
  260. package/lib/config/region-config.js +1 -1
  261. package/lib/config/schema.js +1 -1
  262. package/lib/constant/cdn.js +1 -1
  263. package/lib/constant/cli.js +1 -1
  264. package/lib/constant/defaults.js +1 -1
  265. package/lib/constant/domain.js +1 -1
  266. package/lib/constant/env.js +1 -1
  267. package/lib/constant/output.js +1 -1
  268. package/lib/constant/paths.js +1 -1
  269. package/lib/constant/region.js +1 -1
  270. package/lib/constant/risk.js +1 -1
  271. package/lib/constant/routing-profile.js +1 -1
  272. package/lib/context/app-resolver.js +1 -1
  273. package/lib/context/auth-resolver.js +1 -1
  274. package/lib/context/config-loader.js +1 -1
  275. package/lib/context.js +1 -1
  276. package/lib/core/alias-resolver.js +1 -1
  277. package/lib/core/api-client.js +1 -1
  278. package/lib/core/bff/config.js +1 -1
  279. package/lib/core/bff/file-system.js +1 -1
  280. package/lib/core/bff/hash.js +1 -1
  281. package/lib/core/bff/hook-directory.js +1 -1
  282. package/lib/core/bff/lock.js +1 -1
  283. package/lib/core/bff/utils.js +1 -1
  284. package/lib/core/cross-db-relation.js +1 -1
  285. package/lib/core/db-resolver.js +1 -1
  286. package/lib/core/flow-config.js +1 -1
  287. package/lib/core/instant-api-policy/config.js +1 -1
  288. package/lib/core/kb-search-client.js +1 -1
  289. package/lib/core/page/file-system.js +1 -1
  290. package/lib/core/page/hash.js +1 -1
  291. package/lib/core/page/lock.js +1 -1
  292. package/lib/core/page/lr-smart-jsx.js +1 -1
  293. package/lib/core/sql-index-auditor.js +1 -1
  294. package/lib/core/sql-sync/config.js +1 -1
  295. package/lib/core/sql-sync/file-system.js +1 -1
  296. package/lib/core/sql-sync/hash.js +1 -1
  297. package/lib/core/sql-sync/lock.js +1 -1
  298. package/lib/core/sql-sync/utils.js +1 -1
  299. package/lib/core/sql-validator.js +1 -1
  300. package/lib/errors.js +1 -1
  301. package/lib/framework/build-all-flags.js +1 -1
  302. package/lib/framework/error-output.js +1 -1
  303. package/lib/framework/explicit-yes.js +1 -1
  304. package/lib/framework/flags.js +1 -1
  305. package/lib/framework/help.js +1 -1
  306. package/lib/framework/index.js +1 -1
  307. package/lib/framework/output.js +1 -1
  308. package/lib/framework/response.js +1 -1
  309. package/lib/framework/runner-alias.js +1 -1
  310. package/lib/framework/runner.js +1 -1
  311. package/lib/framework/schema-export.js +1 -1
  312. package/lib/framework/supported-flags.js +1 -1
  313. package/lib/framework/types.js +1 -1
  314. package/lib/generated/build-info.d.ts +4 -4
  315. package/lib/generated/build-info.js +1 -1
  316. package/lib/generated/official-routing.js +1 -1
  317. package/lib/generated/routing-contract.js +1 -1
  318. package/lib/help.js +1 -1
  319. package/lib/postinstall.js +1 -1
  320. package/lib/runtime/confirmation.js +1 -1
  321. package/lib/runtime/event.js +1 -1
  322. package/lib/runtime/index.js +1 -1
  323. package/lib/runtime/queue.js +1 -1
  324. package/lib/runtime/resolve.js +1 -1
  325. package/lib/skills/builtin-skill.js +1 -1
  326. package/lib/skills/main.js +1 -1
  327. package/lib/skills/npx-skills-add.js +1 -1
  328. package/lib/skills/skill-presence.js +1 -1
  329. package/lib/telemetry/cli-command-trace.js +1 -1
  330. package/lib/telemetry/cli-help-trace.js +1 -1
  331. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  332. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  333. package/lib/telemetry/send-cli-trace-log.js +1 -1
  334. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  335. package/lib/utils/ai_config.js +1 -1
  336. package/lib/utils/apply-jq-filter.js +1 -1
  337. package/lib/utils/cdn-config.js +1 -1
  338. package/lib/utils/check-sdk-version.js +1 -1
  339. package/lib/utils/cli-version-check.js +1 -1
  340. package/lib/utils/cli-version-policy.js +1 -1
  341. package/lib/utils/config.js +1 -1
  342. package/lib/utils/entity-with-id.js +1 -1
  343. package/lib/utils/file-utils.js +1 -1
  344. package/lib/utils/guides-cdn.js +1 -1
  345. package/lib/utils/http-client.js +1 -1
  346. package/lib/utils/is-non-interactive.js +1 -1
  347. package/lib/utils/logger.js +1 -1
  348. package/lib/utils/params.js +1 -1
  349. package/lib/utils/platform.js +1 -1
  350. package/lib/utils/sleep.js +1 -1
  351. package/lib/utils/template-replacer.js +1 -1
  352. package/lib/utils/update-notice.js +1 -1
  353. package/lib/utils/version.js +1 -1
  354. package/lib/utils/with-active-cookie.js +1 -1
  355. package/lib/utils/write-cli-side-channel.js +1 -1
  356. package/package.json +1 -1
  357. package/skills/rabetbase/SKILL.md +3 -3
  358. package/skills/rabetbase/guides/independent-deployment.md +11 -1
  359. package/skills/rabetbase/references/rabetbase-config.md +16 -19
  360. package/skills/rabetbase/references/rabetbase-menu-visibility-update.md +5 -4
  361. package/skills/rabetbase/references/rabetbase-workspace.md +3 -1
  362. package/skills/rabetbase-page-generation/SKILL.md +13 -9
  363. package/skills/rabetbase-page-generation/references/component-baseline.md +2 -2
  364. package/skills/rabetbase-page-generation/references/generation.md +64 -15
  365. package/skills/rabetbase-page-generation/templates/onepage/build.mjs +39 -54
  366. package/skills/rabetbase-page-generation/templates/onepage/list/index.jsx +6 -2
  367. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a172_0x3ca490=a172_0x3e83;(function(_0x204b15,_0xdee488){const _0x5a1416=a172_0x3e83,_0x25ccf5=_0x204b15();while(!![]){try{const _0x1920ea=parseInt(_0x5a1416(0x16c))/0x1+-parseInt(_0x5a1416(0x14f))/0x2+-parseInt(_0x5a1416(0x15f))/0x3*(parseInt(_0x5a1416(0x153))/0x4)+parseInt(_0x5a1416(0x15e))/0x5*(parseInt(_0x5a1416(0x16d))/0x6)+parseInt(_0x5a1416(0x15a))/0x7+parseInt(_0x5a1416(0x176))/0x8+parseInt(_0x5a1416(0x16b))/0x9;if(_0x1920ea===_0xdee488)break;else _0x25ccf5['push'](_0x25ccf5['shift']());}catch(_0x3b3514){_0x25ccf5['push'](_0x25ccf5['shift']());}}}(a172_0x2c4b,0x95157));import{getSmartAppRecord}from'../../../core/api-client.js';import{APPCODE_FLAG}from'../../../commands/common/flags.js';function a172_0x2c4b(){const _0x2c9b3e=['appName','\x20must\x20be\x20a\x20JSON\x20object.','trim','filter','app.extend.assets\x20must\x20be\x20an\x20array.','map','1645238ssrVmC','string','app','menu\x20','59510jmMpsD','3UcJwRv','validation','menu','\x20contains\x20invalid\x20JSON.','sharedConfigured','resources','app-name','Menu\x20host\x20app\x20code;\x20overrides\x20the\x20selected\x20workspace\x20app','sharedResources','\x20resources','basename','assets','2681973NuawYK','656591eEYoFf','6MWmnaB','app.extend','--app-name\x20is\x20required.','appCode','Duplicate\x20subapp\x20records\x20for\x20','\x20must\x20be\x20a\x20JSON\x20string\x20of\x20URLs.','extend','Explicit\x20frontend\x20subapp\x20appName\x20matching\x20host\x20assets\x20and\x20menu\x20bindings;\x20not\x20inferred\x20from\x20package\x20name\x20or\x20app\x20code','length','7091424mjATOc','object','app.extend.assets[','message','stringify','814932oYjqFW','subapp.resources','path','isArray','4279356PkMeDQ'];a172_0x2c4b=function(){return _0x2c9b3e;};return a172_0x2c4b();}import{CliErrors}from'../../../errors.js';function objectValue(_0x2f02a0,_0x2dc56a){const _0x5a1129=a172_0x3e83,_0x5f261f=typeof _0x2f02a0===_0x5a1129(0x15b)?parseJson(_0x2f02a0,_0x2dc56a):_0x2f02a0;if(!_0x5f261f||typeof _0x5f261f!==_0x5a1129(0x177)||Array['isArray'](_0x5f261f))throw CliErrors[_0x5a1129(0x160)](_0x2dc56a+_0x5a1129(0x155));return _0x5f261f;}function parseJson(_0x24d3e8,_0x1f29a0){const _0x369878=a172_0x3e83;try{return JSON['parse'](_0x24d3e8);}catch{throw CliErrors[_0x369878(0x160)](_0x1f29a0+_0x369878(0x162));}}function a172_0x3e83(_0x3a7ab5,_0x434e98){_0x3a7ab5=_0x3a7ab5-0x14c;const _0x2c4bad=a172_0x2c4b();let _0x3e8369=_0x2c4bad[_0x3a7ab5];return _0x3e8369;}function resourceList(_0x2175d2,_0x3c6f66){const _0x349826=a172_0x3e83;if(typeof _0x2175d2!=='string')throw CliErrors[_0x349826(0x160)](_0x3c6f66+_0x349826(0x172));const _0x4f291d=parseJson(_0x2175d2,_0x3c6f66);if(!Array['isArray'](_0x4f291d)||_0x4f291d['some'](_0x361c94=>typeof _0x361c94!==_0x349826(0x15b)))throw CliErrors[_0x349826(0x160)](_0x3c6f66+'\x20must\x20be\x20an\x20array\x20of\x20URLs.');return _0x4f291d;}export function buildSubappAssetsStatus(_0xc32bd7,_0x55203a,_0x4371d4){const _0x35898b=a172_0x3e83,_0x189c1c=_0xc32bd7[_0x35898b(0x173)]==null?{}:objectValue(_0xc32bd7[_0x35898b(0x173)],_0x35898b(0x16e)),_0x18abb9=_0x189c1c['assets']==null?[]:typeof _0x189c1c['assets']===_0x35898b(0x15b)?parseJson(_0x189c1c[_0x35898b(0x16a)],'app.extend.assets'):_0x189c1c[_0x35898b(0x16a)];if(!Array[_0x35898b(0x152)](_0x18abb9))throw CliErrors[_0x35898b(0x160)](_0x35898b(0x158));const _0x486e3d=_0x18abb9[_0x35898b(0x159)]((_0x1d19de,_0x3ab9f7)=>objectValue(_0x1d19de,_0x35898b(0x14c)+_0x3ab9f7+']')),_0x3183c0=_0x486e3d[_0x35898b(0x157)](_0x500bfa=>_0x500bfa[_0x35898b(0x154)]===_0x4371d4);if(_0x3183c0[_0x35898b(0x175)]>0x1)throw CliErrors[_0x35898b(0x160)](_0x35898b(0x171)+_0x4371d4+'.');const _0x3a11fc=_0x3183c0[0x0],_0x372d6b=_0x3a11fc?.[_0x35898b(0x164)]==null?[]:resourceList(_0x3a11fc['resources'],_0x35898b(0x150)),_0x3f6eab=_0x55203a[_0x35898b(0x157)](_0x31f64b=>_0x31f64b[_0x35898b(0x173)]?.[_0x35898b(0x154)]===_0x4371d4),_0x4435ee=_0x3f6eab[_0x35898b(0x159)](_0x313081=>{const _0x35fd3a=_0x35898b;let _0x2a35dc=null,_0xd2f8ac=null;try{_0x2a35dc=_0x313081[_0x35fd3a(0x173)]?.[_0x35fd3a(0x164)]==null?_0x313081['resources']:resourceList(_0x313081['extend'][_0x35fd3a(0x164)],_0x35fd3a(0x15d)+_0x313081['id']+_0x35fd3a(0x168));}catch(_0x42627e){_0xd2f8ac=_0x42627e instanceof Error?_0x42627e[_0x35fd3a(0x14d)]:String(_0x42627e);}const _0x39f724=_0x372d6b[_0x35fd3a(0x175)]>0x0?_0x35fd3a(0x15c):_0x35fd3a(0x161),_0x573473=_0x39f724==='app'?_0x372d6b:_0x2a35dc;return{'id':_0x313081['id'],'path':_0x313081[_0x35fd3a(0x151)],'preferredSourceIfSupported':_0x39f724,'preferredResourcesIfSupported':_0x573473,'menuFallbackResources':_0x2a35dc,'menuFallbackError':_0xd2f8ac,'fallbackDiffers':_0x2a35dc===null?null:_0x39f724===_0x35fd3a(0x15c)&&_0x2a35dc[_0x35fd3a(0x175)]>0x0&&JSON[_0x35fd3a(0x14e)](_0x2a35dc)!==JSON[_0x35fd3a(0x14e)](_0x573473)};});return{'appName':_0x4371d4,'hostCapabilityVerified':![],'sharedConfigured':Boolean(_0x3a11fc),'sharedResources':_0x372d6b,'loadScriptMode':_0x3a11fc?.['loadScriptMode']??null,'basename':_0x3a11fc?.[_0x35898b(0x169)]??null,'boundMenus':_0x4435ee[_0x35898b(0x175)],'staleMenuFallbacks':_0x4435ee['filter'](_0x37dfc8=>_0x37dfc8['fallbackDiffers'])[_0x35898b(0x175)],'menus':_0x4435ee};}export async function assertSharedResourcesConfigured(_0x193ecb,_0x1b9100,_0x7557b7){const _0x3c7a69=a172_0x3e83,_0x5624d1=await getSmartAppRecord(_0x193ecb,_0x1b9100),_0x1a9e9f=buildSubappAssetsStatus(_0x5624d1,[],_0x7557b7);if(!_0x1a9e9f[_0x3c7a69(0x163)]||_0x1a9e9f[_0x3c7a69(0x167)][_0x3c7a69(0x175)]===0x0)throw CliErrors[_0x3c7a69(0x160)]('No\x20shared\x20resources\x20configured\x20for\x20'+_0x7557b7+'.');}export const SUBAPP_ASSET_SELECTOR_FLAGS=[{...APPCODE_FLAG,'required':![],'description':a172_0x3ca490(0x166)},{'name':'app-name','type':a172_0x3ca490(0x15b),'required':!![],'description':a172_0x3ca490(0x174)}];export function getSubappSelector(_0x16a2c2){const _0x28bd26=a172_0x3ca490,_0x10c8de=_0x16a2c2[_0x28bd26(0x170)],_0x49955e=_0x16a2c2['str'](_0x28bd26(0x165))[_0x28bd26(0x156)]();if(!_0x49955e)throw CliErrors[_0x28bd26(0x160)](_0x28bd26(0x16f));return{'appCode':_0x10c8de,'appName':_0x49955e};}
1
+ function a172_0x1b64(){const _0x415f95=['isArray','4679397uZzxnb','Explicit\x20frontend\x20subapp\x20appName\x20matching\x20host\x20assets\x20and\x20menu\x20bindings;\x20not\x20inferred\x20from\x20package\x20name\x20or\x20app\x20code','app-name','loadScriptMode','some','appCode','menu\x20','extend','resources','map','15276SCUCdM','124HFeWdx','parse','No\x20shared\x20resources\x20configured\x20for\x20','sharedResources','\x20must\x20be\x20a\x20JSON\x20object.','trim','147505tnolAn','882RREMyr','subapp.resources','assets','19454340VhJKIO','length','12258832zpZKAR','app.extend.assets','app.extend.assets\x20must\x20be\x20an\x20array.','stringify','13626675jSGzez','filter','app','string','appName','app.extend','fallbackDiffers','message','Duplicate\x20subapp\x20records\x20for\x20','object','validation','\x20resources','str','app.extend.assets[','15104zClcsi','152HpLZwY'];a172_0x1b64=function(){return _0x415f95;};return a172_0x1b64();}const a172_0x5beeff=a172_0xb0d1;(function(_0x49ce97,_0x2e5178){const _0xc7df47=a172_0xb0d1,_0x306534=_0x49ce97();while(!![]){try{const _0x323bf7=parseInt(_0xc7df47(0x129))/0x1*(parseInt(_0xc7df47(0x128))/0x2)+-parseInt(_0xc7df47(0xff))/0x3+-parseInt(_0xc7df47(0x10a))/0x4*(parseInt(_0xc7df47(0x110))/0x5)+-parseInt(_0xc7df47(0x109))/0x6*(-parseInt(_0xc7df47(0x111))/0x7)+parseInt(_0xc7df47(0x116))/0x8+-parseInt(_0xc7df47(0x11a))/0x9+parseInt(_0xc7df47(0x114))/0xa;if(_0x323bf7===_0x2e5178)break;else _0x306534['push'](_0x306534['shift']());}catch(_0x24c9fa){_0x306534['push'](_0x306534['shift']());}}}(a172_0x1b64,0xe9e83));import{getSmartAppRecord}from'../../../core/api-client.js';function a172_0xb0d1(_0x3594d9,_0x365ebb){_0x3594d9=_0x3594d9-0xfe;const _0x1b6482=a172_0x1b64();let _0xb0d1b0=_0x1b6482[_0x3594d9];return _0xb0d1b0;}import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{CliErrors}from'../../../errors.js';function objectValue(_0x4a6ee5,_0x1cc5c4){const _0xd364e3=a172_0xb0d1,_0x14ea7c=typeof _0x4a6ee5===_0xd364e3(0x11d)?parseJson(_0x4a6ee5,_0x1cc5c4):_0x4a6ee5;if(!_0x14ea7c||typeof _0x14ea7c!==_0xd364e3(0x123)||Array[_0xd364e3(0xfe)](_0x14ea7c))throw CliErrors[_0xd364e3(0x124)](_0x1cc5c4+_0xd364e3(0x10e));return _0x14ea7c;}function parseJson(_0x3cd3df,_0x2a6b03){const _0x14bdaf=a172_0xb0d1;try{return JSON[_0x14bdaf(0x10b)](_0x3cd3df);}catch{throw CliErrors['validation'](_0x2a6b03+'\x20contains\x20invalid\x20JSON.');}}function resourceList(_0x542285,_0x1f05f5){const _0x3c3d71=a172_0xb0d1;if(typeof _0x542285!==_0x3c3d71(0x11d))throw CliErrors['validation'](_0x1f05f5+'\x20must\x20be\x20a\x20JSON\x20string\x20of\x20URLs.');const _0x522f90=parseJson(_0x542285,_0x1f05f5);if(!Array[_0x3c3d71(0xfe)](_0x522f90)||_0x522f90[_0x3c3d71(0x103)](_0x1b685e=>typeof _0x1b685e!==_0x3c3d71(0x11d)))throw CliErrors[_0x3c3d71(0x124)](_0x1f05f5+'\x20must\x20be\x20an\x20array\x20of\x20URLs.');return _0x522f90;}export function buildSubappAssetsStatus(_0x548f73,_0x13613f,_0x43041a){const _0x3f6985=a172_0xb0d1,_0x41f31d=_0x548f73['extend']==null?{}:objectValue(_0x548f73[_0x3f6985(0x106)],_0x3f6985(0x11f)),_0x3726bc=_0x41f31d[_0x3f6985(0x113)]==null?[]:typeof _0x41f31d[_0x3f6985(0x113)]==='string'?parseJson(_0x41f31d[_0x3f6985(0x113)],_0x3f6985(0x117)):_0x41f31d[_0x3f6985(0x113)];if(!Array['isArray'](_0x3726bc))throw CliErrors[_0x3f6985(0x124)](_0x3f6985(0x118));const _0x5c09ca=_0x3726bc[_0x3f6985(0x108)]((_0x5bcb11,_0xa7804d)=>objectValue(_0x5bcb11,_0x3f6985(0x127)+_0xa7804d+']')),_0x33a99b=_0x5c09ca[_0x3f6985(0x11b)](_0x45cbad=>_0x45cbad[_0x3f6985(0x11e)]===_0x43041a);if(_0x33a99b[_0x3f6985(0x115)]>0x1)throw CliErrors[_0x3f6985(0x124)](_0x3f6985(0x122)+_0x43041a+'.');const _0x42c8db=_0x33a99b[0x0],_0x5c12a9=_0x42c8db?.[_0x3f6985(0x107)]==null?[]:resourceList(_0x42c8db[_0x3f6985(0x107)],_0x3f6985(0x112)),_0x292e20=_0x13613f['filter'](_0x20fa72=>_0x20fa72[_0x3f6985(0x106)]?.[_0x3f6985(0x11e)]===_0x43041a),_0x4bd13d=_0x292e20[_0x3f6985(0x108)](_0x2612b4=>{const _0x1d4111=_0x3f6985;let _0x1aef07=null,_0x562afb=null;try{_0x1aef07=_0x2612b4[_0x1d4111(0x106)]?.[_0x1d4111(0x107)]==null?_0x2612b4[_0x1d4111(0x107)]:resourceList(_0x2612b4[_0x1d4111(0x106)][_0x1d4111(0x107)],_0x1d4111(0x105)+_0x2612b4['id']+_0x1d4111(0x125));}catch(_0x32b99d){_0x562afb=_0x32b99d instanceof Error?_0x32b99d[_0x1d4111(0x121)]:String(_0x32b99d);}const _0x48b0bf=_0x5c12a9['length']>0x0?_0x1d4111(0x11c):'menu',_0x29ff8a=_0x48b0bf===_0x1d4111(0x11c)?_0x5c12a9:_0x1aef07;return{'id':_0x2612b4['id'],'path':_0x2612b4['path'],'preferredSourceIfSupported':_0x48b0bf,'preferredResourcesIfSupported':_0x29ff8a,'menuFallbackResources':_0x1aef07,'menuFallbackError':_0x562afb,'fallbackDiffers':_0x1aef07===null?null:_0x48b0bf===_0x1d4111(0x11c)&&_0x1aef07['length']>0x0&&JSON[_0x1d4111(0x119)](_0x1aef07)!==JSON[_0x1d4111(0x119)](_0x29ff8a)};});return{'appName':_0x43041a,'hostCapabilityVerified':![],'sharedConfigured':Boolean(_0x42c8db),'sharedResources':_0x5c12a9,'loadScriptMode':_0x42c8db?.[_0x3f6985(0x102)]??null,'basename':_0x42c8db?.['basename']??null,'boundMenus':_0x4bd13d[_0x3f6985(0x115)],'staleMenuFallbacks':_0x4bd13d['filter'](_0x385863=>_0x385863[_0x3f6985(0x120)])['length'],'menus':_0x4bd13d};}export async function assertSharedResourcesConfigured(_0x5a9a74,_0x311f08,_0xef6e65){const _0x4dfc69=a172_0xb0d1,_0x4c7ceb=await getSmartAppRecord(_0x5a9a74,_0x311f08),_0x3aecb2=buildSubappAssetsStatus(_0x4c7ceb,[],_0xef6e65);if(!_0x3aecb2['sharedConfigured']||_0x3aecb2[_0x4dfc69(0x10d)][_0x4dfc69(0x115)]===0x0)throw CliErrors['validation'](_0x4dfc69(0x10c)+_0xef6e65+'.');}export const SUBAPP_ASSET_SELECTOR_FLAGS=[{...APPCODE_FLAG,'required':![],'description':'Menu\x20host\x20app\x20code;\x20overrides\x20the\x20selected\x20workspace\x20app'},{'name':a172_0x5beeff(0x101),'type':a172_0x5beeff(0x11d),'required':!![],'description':a172_0x5beeff(0x100)}];export function getSubappSelector(_0x5b93ec){const _0x385aa4=a172_0x5beeff,_0x1219b1=_0x5b93ec[_0x385aa4(0x104)],_0x4b2773=_0x5b93ec[_0x385aa4(0x126)](_0x385aa4(0x101))[_0x385aa4(0x10f)]();if(!_0x4b2773)throw CliErrors[_0x385aa4(0x124)]('--app-name\x20is\x20required.');return{'appCode':_0x1219b1,'appName':_0x4b2773};}
@@ -1 +1 @@
1
- const a173_0x58f940=a173_0x9770;(function(_0x45a2e1,_0x2da662){const _0x2f21a1=a173_0x9770,_0x425de4=_0x45a2e1();while(!![]){try{const _0x44cf2b=-parseInt(_0x2f21a1(0x9e))/0x1+parseInt(_0x2f21a1(0x99))/0x2+parseInt(_0x2f21a1(0xa9))/0x3*(parseInt(_0x2f21a1(0xb9))/0x4)+-parseInt(_0x2f21a1(0xbf))/0x5*(-parseInt(_0x2f21a1(0xc1))/0x6)+-parseInt(_0x2f21a1(0x96))/0x7+parseInt(_0x2f21a1(0x91))/0x8*(-parseInt(_0x2f21a1(0xab))/0x9)+parseInt(_0x2f21a1(0x98))/0xa;if(_0x44cf2b===_0x2da662)break;else _0x425de4['push'](_0x425de4['shift']());}catch(_0x4db163){_0x425de4['push'](_0x425de4['shift']());}}}(a173_0x590f,0x91ae8));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';function a173_0x590f(){const _0x123d76=['Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','visible','cssUrl','5goJdin','\x0a\x20\x20Available\x20local\x20paths:\x20','5478chEwTB','isArray','get','jsUrl','filter','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','No\x20local\x20pages\x20matched\x20paths:\x20','Menu\x20sync\x20completed','order','folder','push','menu-sync','8lquvhg','Expected\x20one\x20folder\x20named\x20\x22','\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.','type','message','1010933erZFbU','--params.','18426520oEJGWA','328036wMlRST','field','number','join','Invalid\x20--params:\x20','993172LdsWBQ','length','boolean','Start\x20non-interactive\x20menu\x20sync','cwd','dryRun','setLogPath','import','trim','label','string','538527SlJqNs','object','7306263pWymgW','appName',';\x20found\x20','path','info','Invalid\x20--params.','Invalid\x20--params\x20JSON.','map','group','parse','Parent\x20','has','\x22\x20for\x20','procode','12lUXWNJ','parentId','hasOwn'];a173_0x590f=function(){return _0x123d76;};return a173_0x590f();}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{menuPathKey}from'../../../commands/menu/shared/path.js';import{logger}from'../../../utils/logger.js';import{assertSharedResourcesConfigured}from'../../../commands/menu/shared/subapp-assets.js';function a173_0x9770(_0x3c227c,_0x55a491){_0x3c227c=_0x3c227c-0x8c;const _0x590fb3=a173_0x590f();let _0x9770a6=_0x590fb3[_0x3c227c];return _0x9770a6;}const MENU_SYNC_PARAM_KEYS=new Set([a173_0x58f940(0xc4),a173_0x58f940(0xbe),a173_0x58f940(0xac),'visible','parentId']);export function resolvePage(_0x3c9da5,_0x55936d,_0x272c7e){const _0x41ef89=a173_0x58f940;let _0x1fe1d0=_0x55936d[_0x41ef89(0xba)]??_0x3c9da5[_0x41ef89(0xba)];if(_0x1fe1d0===undefined&&_0x3c9da5[_0x41ef89(0xb3)]){const _0x1d1ba9=_0x272c7e['filter'](_0x5aeca4=>_0x5aeca4[_0x41ef89(0x94)]===_0x41ef89(0x8e)&&_0x5aeca4[_0x41ef89(0xa7)]===_0x3c9da5[_0x41ef89(0xb3)]);if(_0x1d1ba9[_0x41ef89(0x9f)]!==0x1)throw new Error(_0x41ef89(0x92)+_0x3c9da5[_0x41ef89(0xb3)]+_0x41ef89(0xb7)+_0x3c9da5['path']+_0x41ef89(0xad)+_0x1d1ba9[_0x41ef89(0x9f)]);_0x1fe1d0=_0x1d1ba9[0x0]['id'];}if(_0x1fe1d0!==undefined&&_0x1fe1d0!==0x0&&_0x272c7e[_0x41ef89(0xc5)](_0x44464c=>_0x44464c['id']===_0x1fe1d0&&_0x44464c[_0x41ef89(0x94)]===_0x41ef89(0x8e))[_0x41ef89(0x9f)]!==0x1)throw new Error(_0x41ef89(0xb5)+_0x1fe1d0+_0x41ef89(0x93));return{..._0x3c9da5,..._0x1fe1d0===undefined?{}:{'parentId':_0x1fe1d0},..._0x55936d[_0x41ef89(0xbd)]===undefined?{}:{'visible':_0x55936d['visible']}};}function validateParams(_0x34000e){const _0x4623bd=a173_0x58f940,_0x25b41c=[];return _0x34000e[_0x4623bd(0xc4)]&&!isValidJsHttpsUrl(_0x34000e[_0x4623bd(0xc4)])&&_0x25b41c[_0x4623bd(0x8f)]({'field':'jsUrl','message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x34000e[_0x4623bd(0xbe)]&&!isValidCssHttpsUrl(_0x34000e['cssUrl'])&&_0x25b41c[_0x4623bd(0x8f)]({'field':_0x4623bd(0xbe),'message':_0x4623bd(0xc6)}),_0x25b41c;}export async function runMenuSyncCore(_0x1f012f,_0x1b7ff3,_0x112c68=[],_0x153898,_0x26463f={}){const _0x566f65=a173_0x58f940,_0x7dea0e=parseMenuSyncParams(_0x153898),_0x3b75b0=[...new Set(_0x112c68[_0x566f65(0xb2)](_0x255ece=>_0x255ece['trim']())[_0x566f65(0xc5)](Boolean)[_0x566f65(0xb2)](menuPathKey))],_0x5bbda2=_0x7dea0e['jsUrl'],_0x2f5d20=_0x7dea0e['cssUrl'],_0x141c75=[];if(_0x5bbda2)_0x141c75['push'](_0x5bbda2);if(_0x2f5d20)_0x141c75['push'](_0x2f5d20);const _0x1c3950=validateParams(_0x7dea0e);if(_0x1c3950[_0x566f65(0x9f)]>0x0){const _0x183db9=_0x1c3950[_0x566f65(0xb2)](_0x3041bf=>_0x566f65(0x97)+_0x3041bf[_0x566f65(0x9a)]+':\x20'+_0x3041bf[_0x566f65(0x95)])[_0x566f65(0x9c)](';\x20');throw new Error(_0x566f65(0x9d)+_0x183db9);}logger[_0x566f65(0xa4)](process[_0x566f65(0xa2)]()),logger['info']('menu-sync',_0x566f65(0xa1),{'appCode':_0x1f012f,'selectedCount':_0x3b75b0[_0x566f65(0x9f)],'jsUrl':_0x5bbda2,'cssUrl':_0x2f5d20});if(_0x5bbda2){const _0x39cd04=await isUrlReachable(_0x5bbda2);if(!_0x39cd04)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x5bbda2);}if(_0x2f5d20){const _0x4fd237=await isUrlReachable(_0x2f5d20);if(!_0x4fd237)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x2f5d20);}const _0x54d9aa=getLocalPages();if(_0x54d9aa['length']===0x0){if(_0x3b75b0[_0x566f65(0x9f)]>0x0)throw new Error(_0x566f65(0xc7)+_0x3b75b0['join'](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x26463f[_0x566f65(0xa3)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x319442=await getOnlineMenuList(_0x1f012f,_0x1b7ff3),_0x240206=new Set(_0x319442[_0x566f65(0xb2)](_0x210425=>menuPathKey(_0x210425[_0x566f65(0xae)])));let _0x2cf348;if(_0x3b75b0[_0x566f65(0x9f)]>0x0){const _0x590c38=new Map(_0x54d9aa[_0x566f65(0xb2)](_0x4774fc=>[menuPathKey(_0x4774fc['path']),_0x4774fc])),_0x514e6b=_0x3b75b0[_0x566f65(0xc5)](_0x2be184=>!_0x590c38[_0x566f65(0xb6)](_0x2be184));if(_0x514e6b[_0x566f65(0x9f)]>0x0){const _0x342805=_0x54d9aa['map'](_0x11cb30=>_0x11cb30['path'])[_0x566f65(0x9c)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x514e6b['join'](',\x20')+_0x566f65(0xc0)+_0x342805);}const _0xb489bd=_0x3b75b0[_0x566f65(0xc5)](_0xabb53=>_0x240206[_0x566f65(0xb6)](_0xabb53));if(_0xb489bd[_0x566f65(0x9f)]>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0xb489bd[_0x566f65(0x9c)](',\x20'));_0x2cf348=_0x3b75b0[_0x566f65(0xb2)](_0x23cd4d=>_0x590c38[_0x566f65(0xc3)](_0x23cd4d));}else _0x2cf348=_0x54d9aa[_0x566f65(0xc5)](_0x5dd5ca=>!_0x240206['has'](menuPathKey(_0x5dd5ca['path'])));if(_0x2cf348['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x26463f[_0x566f65(0xa3)]===!![],'targetPages':[],'plannedMenus':[]};_0x2cf348=_0x2cf348['map'](_0x5470f9=>resolvePage(_0x5470f9,_0x7dea0e,_0x319442));_0x7dea0e[_0x566f65(0xac)]&&_0x141c75[_0x566f65(0x9f)]===0x0&&await assertSharedResourcesConfigured(_0x1f012f,_0x1b7ff3,_0x7dea0e['appName']);const _0x23d935=_0x2cf348[_0x566f65(0xb2)](_0x57b6fa=>({'type':_0x566f65(0xb8),'path':_0x57b6fa[_0x566f65(0xae)],'label':_0x57b6fa[_0x566f65(0xa7)],'loadScriptMode':_0x566f65(0xa5),'resources':[..._0x141c75],..._0x57b6fa[_0x566f65(0xbd)]===undefined?{}:{'visible':_0x57b6fa[_0x566f65(0xbd)]},..._0x57b6fa[_0x566f65(0xba)]===undefined?{}:{'parentId':_0x57b6fa[_0x566f65(0xba)]},..._0x57b6fa[_0x566f65(0x8d)]===undefined?{}:{'sort':_0x57b6fa[_0x566f65(0x8d)]},..._0x7dea0e['appName']===undefined?{}:{'appName':_0x7dea0e['appName']}}));if(_0x26463f[_0x566f65(0xa3)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x2cf348,'plannedMenus':_0x23d935};const _0x44fb06=_0x7dea0e[_0x566f65(0xac)]?await createMenus(_0x1f012f,_0x1b7ff3,_0x2cf348,_0x141c75[_0x566f65(0x9f)]>0x0?_0x141c75:undefined,{'appName':_0x7dea0e[_0x566f65(0xac)]}):await createMenus(_0x1f012f,_0x1b7ff3,_0x2cf348,_0x141c75['length']>0x0?_0x141c75:undefined);return logger[_0x566f65(0xaf)](_0x566f65(0x90),_0x566f65(0x8c),{'count':_0x2cf348[_0x566f65(0x9f)],'resources':_0x141c75}),{'created':_0x44fb06[_0x566f65(0x9f)],'skipped':![],'dryRun':![],'targetPages':_0x2cf348,'plannedMenus':_0x23d935,'menus':_0x44fb06};}export function parseMenuSyncParams(_0x48579a){const _0x30b787=a173_0x58f940;if(!_0x48579a||typeof _0x48579a!==_0x30b787(0xa8))return{};let _0x1bca6b;try{_0x1bca6b=JSON[_0x30b787(0xb4)](_0x48579a);}catch{throw new Error(_0x30b787(0xb1));}if(typeof _0x1bca6b!==_0x30b787(0xaa)||_0x1bca6b===null||Array[_0x30b787(0xc2)](_0x1bca6b))throw new Error('Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.');const _0x4d26a5=_0x1bca6b;if(Object[_0x30b787(0xbb)](_0x4d26a5,'pages'))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x50f48f=Object['keys'](_0x4d26a5)[_0x30b787(0xc5)](_0x19d2ac=>!MENU_SYNC_PARAM_KEYS[_0x30b787(0xb6)](_0x19d2ac));if(_0x50f48f[_0x30b787(0x9f)]>0x0)throw new Error('Invalid\x20--params\x20fields:\x20'+_0x50f48f[_0x30b787(0x9c)](',\x20')+'.');for(const _0x188b70 of['jsUrl',_0x30b787(0xbe),_0x30b787(0xac)]){const _0x4a45f4=_0x4d26a5[_0x188b70];if(_0x4a45f4!==undefined&&(typeof _0x4a45f4!=='string'||_0x4a45f4['trim']()===''))throw new Error(_0x30b787(0xb0)+_0x188b70+':\x20expected\x20a\x20non-empty\x20string.');}if(_0x4d26a5['visible']!==undefined&&typeof _0x4d26a5[_0x30b787(0xbd)]!==_0x30b787(0xa0))throw new Error('Invalid\x20--params.visible:\x20expected\x20a\x20boolean.');if(_0x4d26a5[_0x30b787(0xba)]!==undefined&&(!Number['isInteger'](_0x4d26a5['parentId'])||_0x4d26a5[_0x30b787(0xba)]<0x0))throw new Error(_0x30b787(0xbc));return{'jsUrl':typeof _0x4d26a5[_0x30b787(0xc4)]===_0x30b787(0xa8)?_0x4d26a5[_0x30b787(0xc4)][_0x30b787(0xa6)]():undefined,'cssUrl':typeof _0x4d26a5['cssUrl']==='string'?_0x4d26a5[_0x30b787(0xbe)][_0x30b787(0xa6)]():undefined,'appName':typeof _0x4d26a5[_0x30b787(0xac)]===_0x30b787(0xa8)?_0x4d26a5[_0x30b787(0xac)][_0x30b787(0xa6)]():undefined,'visible':typeof _0x4d26a5[_0x30b787(0xbd)]==='boolean'?_0x4d26a5['visible']:undefined,'parentId':typeof _0x4d26a5[_0x30b787(0xba)]===_0x30b787(0x9b)?_0x4d26a5[_0x30b787(0xba)]:undefined};}
1
+ const a173_0x5bea17=a173_0x41a3;(function(_0x3470db,_0x484a04){const _0x4be0fb=a173_0x41a3,_0x322119=_0x3470db();while(!![]){try{const _0x435c25=parseInt(_0x4be0fb(0x15c))/0x1*(-parseInt(_0x4be0fb(0x138))/0x2)+-parseInt(_0x4be0fb(0x14e))/0x3+parseInt(_0x4be0fb(0x14d))/0x4+parseInt(_0x4be0fb(0x167))/0x5+-parseInt(_0x4be0fb(0x169))/0x6*(-parseInt(_0x4be0fb(0x131))/0x7)+-parseInt(_0x4be0fb(0x162))/0x8+parseInt(_0x4be0fb(0x154))/0x9*(parseInt(_0x4be0fb(0x128))/0xa);if(_0x435c25===_0x484a04)break;else _0x322119['push'](_0x322119['shift']());}catch(_0x11a8b4){_0x322119['push'](_0x322119['shift']());}}}(a173_0x8586,0x480cd));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',a173_0x5bea17(0x142),'appName',a173_0x5bea17(0x12b),'parentId']);export function resolvePage(_0x4547b2,_0x396f42,_0x33b43a){const _0x116541=a173_0x5bea17;let _0x55cd6d=_0x396f42[_0x116541(0x165)]??_0x4547b2[_0x116541(0x165)];if(_0x55cd6d===undefined&&_0x4547b2[_0x116541(0x13f)]){const _0x2f6b67=_0x33b43a[_0x116541(0x137)](_0x5b7405=>_0x5b7405['type']===_0x116541(0x14a)&&_0x5b7405[_0x116541(0x15a)]===_0x4547b2[_0x116541(0x13f)]);if(_0x2f6b67['length']!==0x1)throw new Error(_0x116541(0x140)+_0x4547b2[_0x116541(0x13f)]+_0x116541(0x151)+_0x4547b2[_0x116541(0x134)]+';\x20found\x20'+_0x2f6b67[_0x116541(0x149)]);_0x55cd6d=_0x2f6b67[0x0]['id'];}if(_0x55cd6d!==undefined&&_0x55cd6d!==0x0&&_0x33b43a[_0x116541(0x137)](_0x4776e8=>_0x4776e8['id']===_0x55cd6d&&_0x4776e8[_0x116541(0x14f)]===_0x116541(0x14a))[_0x116541(0x149)]!==0x1)throw new Error(_0x116541(0x129)+_0x55cd6d+_0x116541(0x135));return{..._0x4547b2,..._0x55cd6d===undefined?{}:{'parentId':_0x55cd6d},..._0x396f42[_0x116541(0x12b)]===undefined?{}:{'visible':_0x396f42[_0x116541(0x12b)]}};}function a173_0x41a3(_0x38596f,_0x2ded51){_0x38596f=_0x38596f-0x128;const _0x8586b=a173_0x8586();let _0x41a315=_0x8586b[_0x38596f];return _0x41a315;}function validateParams(_0x5a99da){const _0x1e846d=a173_0x5bea17,_0xe48018=[];return _0x5a99da['jsUrl']&&!isValidJsHttpsUrl(_0x5a99da[_0x1e846d(0x164)])&&_0xe48018[_0x1e846d(0x157)]({'field':_0x1e846d(0x164),'message':_0x1e846d(0x136)}),_0x5a99da[_0x1e846d(0x142)]&&!isValidCssHttpsUrl(_0x5a99da[_0x1e846d(0x142)])&&_0xe48018[_0x1e846d(0x157)]({'field':'cssUrl','message':_0x1e846d(0x12a)}),_0xe48018;}function a173_0x8586(){const _0xb1f1ee=['number','dryRun','order','3749008DTqJzD','import','jsUrl','parentId','keys','1635060cvpupw','menu-sync','6jIHsvX','10eOyEHq','Parent\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','visible','parse','Menu\x20sync\x20completed','appName','trim','has','2997099CcFsXq','Invalid\x20--params.visible:\x20expected\x20a\x20boolean.','Start\x20non-interactive\x20menu\x20sync','path','\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','filter','4vGPkFl','Invalid\x20--params.','Invalid\x20--params\x20JSON.','--params.','CSS\x20URL\x20is\x20unreachable:\x20','join','Invalid\x20--params\x20fields:\x20','group','Expected\x20one\x20folder\x20named\x20\x22','get','cssUrl','message','Invalid\x20--params:\x20','setLogPath','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','length','folder','field','info','1131636WzjAIV','1304721MNCExX','type','\x0a\x20\x20Available\x20local\x20paths:\x20','\x22\x20for\x20',':\x20expected\x20a\x20non-empty\x20string.','map','4797972kZQyqd','string','isArray','push','boolean','cwd','label','pages','186268FPIfWx','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','No\x20local\x20pages\x20matched\x20paths:\x20'];a173_0x8586=function(){return _0xb1f1ee;};return a173_0x8586();}export async function runMenuSyncCore(_0x4aa978,_0x1f7462,_0x5a1170=[],_0x4ef57d,_0x4bb1c1={}){const _0x3da71f=a173_0x5bea17,_0x1abb2f=parseMenuSyncParams(_0x4ef57d),_0x57f7ee=[...new Set(_0x5a1170[_0x3da71f(0x153)](_0x22809d=>_0x22809d[_0x3da71f(0x12f)]())[_0x3da71f(0x137)](Boolean)['map'](menuPathKey))],_0xcb7501=_0x1abb2f[_0x3da71f(0x164)],_0x1a6bbd=_0x1abb2f[_0x3da71f(0x142)],_0x469016=[];if(_0xcb7501)_0x469016[_0x3da71f(0x157)](_0xcb7501);if(_0x1a6bbd)_0x469016[_0x3da71f(0x157)](_0x1a6bbd);const _0x323605=validateParams(_0x1abb2f);if(_0x323605['length']>0x0){const _0x26380b=_0x323605[_0x3da71f(0x153)](_0xc5bab2=>_0x3da71f(0x13b)+_0xc5bab2[_0x3da71f(0x14b)]+':\x20'+_0xc5bab2[_0x3da71f(0x143)])['join'](';\x20');throw new Error(_0x3da71f(0x144)+_0x26380b);}logger[_0x3da71f(0x145)](process[_0x3da71f(0x159)]()),logger[_0x3da71f(0x14c)](_0x3da71f(0x168),_0x3da71f(0x133),{'appCode':_0x4aa978,'selectedCount':_0x57f7ee[_0x3da71f(0x149)],'jsUrl':_0xcb7501,'cssUrl':_0x1a6bbd});if(_0xcb7501){const _0x48ce96=await isUrlReachable(_0xcb7501);if(!_0x48ce96)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0xcb7501);}if(_0x1a6bbd){const _0x2a6b86=await isUrlReachable(_0x1a6bbd);if(!_0x2a6b86)throw new Error(_0x3da71f(0x13c)+_0x1a6bbd);}const _0x4c62cc=getLocalPages();if(_0x4c62cc[_0x3da71f(0x149)]===0x0){if(_0x57f7ee['length']>0x0)throw new Error(_0x3da71f(0x15e)+_0x57f7ee['join'](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x4bb1c1[_0x3da71f(0x160)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x44c851=await getOnlineMenuList(_0x4aa978,_0x1f7462),_0x1b3170=new Set(_0x44c851[_0x3da71f(0x153)](_0x2e1edc=>menuPathKey(_0x2e1edc[_0x3da71f(0x134)])));let _0x34bc7e;if(_0x57f7ee[_0x3da71f(0x149)]>0x0){const _0x1ec557=new Map(_0x4c62cc[_0x3da71f(0x153)](_0x25ab99=>[menuPathKey(_0x25ab99[_0x3da71f(0x134)]),_0x25ab99])),_0x34a44c=_0x57f7ee[_0x3da71f(0x137)](_0x475c45=>!_0x1ec557[_0x3da71f(0x130)](_0x475c45));if(_0x34a44c['length']>0x0){const _0x48e650=_0x4c62cc['map'](_0x1989b7=>_0x1989b7[_0x3da71f(0x134)])['join'](',\x20');throw new Error(_0x3da71f(0x15e)+_0x34a44c[_0x3da71f(0x13d)](',\x20')+_0x3da71f(0x150)+_0x48e650);}const _0x2e448b=_0x57f7ee[_0x3da71f(0x137)](_0x5ed7a4=>_0x1b3170[_0x3da71f(0x130)](_0x5ed7a4));if(_0x2e448b[_0x3da71f(0x149)]>0x0)throw new Error(_0x3da71f(0x147)+_0x2e448b[_0x3da71f(0x13d)](',\x20'));_0x34bc7e=_0x57f7ee['map'](_0x165521=>_0x1ec557[_0x3da71f(0x141)](_0x165521));}else _0x34bc7e=_0x4c62cc[_0x3da71f(0x137)](_0x291579=>!_0x1b3170['has'](menuPathKey(_0x291579['path'])));if(_0x34bc7e[_0x3da71f(0x149)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x4bb1c1[_0x3da71f(0x160)]===!![],'targetPages':[],'plannedMenus':[]};_0x34bc7e=_0x34bc7e[_0x3da71f(0x153)](_0x4cf6ef=>resolvePage(_0x4cf6ef,_0x1abb2f,_0x44c851));_0x1abb2f['appName']&&_0x469016[_0x3da71f(0x149)]===0x0&&await assertSharedResourcesConfigured(_0x4aa978,_0x1f7462,_0x1abb2f[_0x3da71f(0x12e)]);const _0x23060e=_0x34bc7e['map'](_0x2d2e57=>({'type':'procode','path':_0x2d2e57[_0x3da71f(0x134)],'label':_0x2d2e57[_0x3da71f(0x15a)],'loadScriptMode':_0x3da71f(0x163),'resources':[..._0x469016],..._0x2d2e57[_0x3da71f(0x12b)]===undefined?{}:{'visible':_0x2d2e57[_0x3da71f(0x12b)]},..._0x2d2e57[_0x3da71f(0x165)]===undefined?{}:{'parentId':_0x2d2e57[_0x3da71f(0x165)]},..._0x2d2e57[_0x3da71f(0x161)]===undefined?{}:{'sort':_0x2d2e57['order']},..._0x1abb2f[_0x3da71f(0x12e)]===undefined?{}:{'appName':_0x1abb2f['appName']}}));if(_0x4bb1c1['dryRun'])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x34bc7e,'plannedMenus':_0x23060e};const _0x35c132=_0x1abb2f['appName']?await createMenus(_0x4aa978,_0x1f7462,_0x34bc7e,_0x469016[_0x3da71f(0x149)]>0x0?_0x469016:undefined,{'appName':_0x1abb2f[_0x3da71f(0x12e)]}):await createMenus(_0x4aa978,_0x1f7462,_0x34bc7e,_0x469016['length']>0x0?_0x469016:undefined);return logger['info'](_0x3da71f(0x168),_0x3da71f(0x12d),{'count':_0x34bc7e[_0x3da71f(0x149)],'resources':_0x469016}),{'created':_0x35c132[_0x3da71f(0x149)],'skipped':![],'dryRun':![],'targetPages':_0x34bc7e,'plannedMenus':_0x23060e,'menus':_0x35c132};}export function parseMenuSyncParams(_0x5b8839){const _0x5c033e=a173_0x5bea17;if(!_0x5b8839||typeof _0x5b8839!==_0x5c033e(0x155))return{};let _0x238549;try{_0x238549=JSON[_0x5c033e(0x12c)](_0x5b8839);}catch{throw new Error(_0x5c033e(0x13a));}if(typeof _0x238549!=='object'||_0x238549===null||Array[_0x5c033e(0x156)](_0x238549))throw new Error(_0x5c033e(0x15d));const _0xbd8684=_0x238549;if(Object['hasOwn'](_0xbd8684,_0x5c033e(0x15b)))throw new Error(_0x5c033e(0x146));const _0x2ddf35=Object[_0x5c033e(0x166)](_0xbd8684)['filter'](_0x28e952=>!MENU_SYNC_PARAM_KEYS[_0x5c033e(0x130)](_0x28e952));if(_0x2ddf35[_0x5c033e(0x149)]>0x0)throw new Error(_0x5c033e(0x13e)+_0x2ddf35['join'](',\x20')+'.');for(const _0x55518 of[_0x5c033e(0x164),_0x5c033e(0x142),_0x5c033e(0x12e)]){const _0x3402af=_0xbd8684[_0x55518];if(_0x3402af!==undefined&&(typeof _0x3402af!==_0x5c033e(0x155)||_0x3402af[_0x5c033e(0x12f)]()===''))throw new Error(_0x5c033e(0x139)+_0x55518+_0x5c033e(0x152));}if(_0xbd8684[_0x5c033e(0x12b)]!==undefined&&typeof _0xbd8684['visible']!==_0x5c033e(0x158))throw new Error(_0x5c033e(0x132));if(_0xbd8684['parentId']!==undefined&&(!Number['isInteger'](_0xbd8684[_0x5c033e(0x165)])||_0xbd8684[_0x5c033e(0x165)]<0x0))throw new Error(_0x5c033e(0x148));return{'jsUrl':typeof _0xbd8684[_0x5c033e(0x164)]===_0x5c033e(0x155)?_0xbd8684[_0x5c033e(0x164)][_0x5c033e(0x12f)]():undefined,'cssUrl':typeof _0xbd8684['cssUrl']===_0x5c033e(0x155)?_0xbd8684[_0x5c033e(0x142)][_0x5c033e(0x12f)]():undefined,'appName':typeof _0xbd8684['appName']===_0x5c033e(0x155)?_0xbd8684[_0x5c033e(0x12e)][_0x5c033e(0x12f)]():undefined,'visible':typeof _0xbd8684[_0x5c033e(0x12b)]===_0x5c033e(0x158)?_0xbd8684[_0x5c033e(0x12b)]:undefined,'parentId':typeof _0xbd8684[_0x5c033e(0x165)]===_0x5c033e(0x15f)?_0xbd8684[_0x5c033e(0x165)]:undefined};}
@@ -1 +1 @@
1
- (function(_0x622895,_0x5f0fb1){const _0x26797e=a175_0x3c91,_0x371b1f=_0x622895();while(!![]){try{const _0x1e9e1d=parseInt(_0x26797e(0xd8))/0x1+-parseInt(_0x26797e(0xbd))/0x2+parseInt(_0x26797e(0xdb))/0x3*(parseInt(_0x26797e(0xcb))/0x4)+parseInt(_0x26797e(0xd0))/0x5+-parseInt(_0x26797e(0xb7))/0x6*(parseInt(_0x26797e(0xa8))/0x7)+-parseInt(_0x26797e(0xd4))/0x8+-parseInt(_0x26797e(0x9d))/0x9*(-parseInt(_0x26797e(0xdd))/0xa);if(_0x1e9e1d===_0x5f0fb1)break;else _0x371b1f['push'](_0x371b1f['shift']());}catch(_0x59bf39){_0x371b1f['push'](_0x371b1f['shift']());}}}(a175_0x2131,0x50c17));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a175_0x3c91(_0x30d078,_0x1b4bf4){_0x30d078=_0x30d078-0x92;const _0x2131a3=a175_0x2131();let _0x3c9140=_0x2131a3[_0x30d078];return _0x3c9140;}import{logger}from'../../../utils/logger.js';function validateParams(_0x171e7a){const _0x1063bb=a175_0x3c91,_0x1f4590=[];return _0x171e7a[_0x1063bb(0xad)]&&!isValidJsHttpsUrl(_0x171e7a[_0x1063bb(0xad)])&&_0x1f4590['push']({'field':_0x1063bb(0xad),'message':_0x1063bb(0xc5)}),_0x171e7a[_0x1063bb(0x9a)]&&!isValidCssHttpsUrl(_0x171e7a[_0x1063bb(0x9a)])&&_0x1f4590['push']({'field':_0x1063bb(0x9a),'message':_0x1063bb(0x95)}),_0x1f4590;}export async function runMenuUpdateCore(_0x121469,_0x216fa1,_0x50ab57,_0x780f53={}){const _0x51aa1c=a175_0x3c91,_0x1c5a82=parseUpdateParamsFlag(_0x50ab57),_0x39babd=normalizeMode(_0x780f53[_0x51aa1c(0xa0)]);validateSelection(_0x780f53[_0x51aa1c(0xbc)]);const _0x2e4cbc=[];if(_0x1c5a82[_0x51aa1c(0xad)])_0x2e4cbc['push'](_0x1c5a82['jsUrl']);if(_0x1c5a82['cssUrl'])_0x2e4cbc[_0x51aa1c(0xa6)](_0x1c5a82[_0x51aa1c(0x9a)]);const _0x145d8d=validateParams(_0x1c5a82);if(_0x145d8d[_0x51aa1c(0xa3)]>0x0){const _0xaa9560=_0x145d8d[_0x51aa1c(0x9e)](_0x4682dd=>_0x51aa1c(0xac)+_0x4682dd[_0x51aa1c(0xce)]+':\x20'+_0x4682dd['message'])[_0x51aa1c(0xc1)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0xaa9560);}if(_0x2e4cbc[_0x51aa1c(0xa3)]===0x0)throw new Error(_0x51aa1c(0xc4)+_0x51aa1c(0x99));logger[_0x51aa1c(0xc9)](process[_0x51aa1c(0xb5)]()),logger['info'](_0x51aa1c(0xa9),_0x51aa1c(0xba),{'appCode':_0x121469,'jsUrl':_0x1c5a82[_0x51aa1c(0xad)],'cssUrl':_0x1c5a82[_0x51aa1c(0x9a)],'mode':_0x39babd,'dryRun':_0x780f53[_0x51aa1c(0xb3)]===!![]});if(_0x1c5a82['jsUrl']){const _0x2b4b6c=await isUrlReachable(_0x1c5a82[_0x51aa1c(0xad)]);if(!_0x2b4b6c)throw new Error(_0x51aa1c(0xcf)+_0x1c5a82[_0x51aa1c(0xad)]);}if(_0x1c5a82[_0x51aa1c(0x9a)]){const _0x4b61a7=await isUrlReachable(_0x1c5a82[_0x51aa1c(0x9a)]);if(!_0x4b61a7)throw new Error(_0x51aa1c(0xb2)+_0x1c5a82['cssUrl']);}const _0x33af67=await getOnlineMenuList(_0x121469,_0x216fa1),_0x19cf28=_0x33af67[_0x51aa1c(0xaf)](_0x1e359e=>_0x1e359e['resources'][_0x51aa1c(0xa3)]>0x0),_0x30a169=selectMenusForUpdate(_0x19cf28,_0x780f53[_0x51aa1c(0xbc)]);if(_0x30a169[_0x51aa1c(0xa3)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x780f53[_0x51aa1c(0xb3)]===!![]};const _0x1f50ea=_0x30a169['map'](_0x546a5e=>buildMenuUpdateDiff(_0x546a5e,_0x1c5a82,_0x39babd,_0x780f53[_0x51aa1c(0xd9)]===!![],_0x780f53[_0x51aa1c(0xaa)]));if(_0x780f53[_0x51aa1c(0xb3)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x1f50ea};const _0x32f728=await Promise[_0x51aa1c(0xc6)](_0x30a169[_0x51aa1c(0x9e)]((_0x3183c8,_0x708c34)=>updateMenuCdnUrl(_0x121469,_0x216fa1,{'id':_0x3183c8['id'],'label':_0x3183c8[_0x51aa1c(0xa7)],'path':_0x3183c8['path'],'resources':_0x1f50ea[_0x708c34][_0x51aa1c(0xab)][_0x51aa1c(0xb9)],'extend':_0x3183c8[_0x51aa1c(0xa5)]??null,'loadScriptMode':_0x780f53[_0x51aa1c(0xaa)]}))),_0x5c01fa=_0x32f728[_0x51aa1c(0xaf)](_0x11e494=>_0x11e494[_0x51aa1c(0xc3)]===_0x51aa1c(0xd2))[_0x51aa1c(0x9e)](_0x5023b4=>_0x5023b4[_0x51aa1c(0xae)]),_0x5c7739=_0x32f728[_0x51aa1c(0xaf)](_0x3b3edc=>_0x3b3edc[_0x51aa1c(0xc3)]===_0x51aa1c(0x97))[_0x51aa1c(0xa3)];return logger[_0x51aa1c(0xc2)](_0x51aa1c(0xa9),_0x51aa1c(0xbf),{'count':_0x30a169[_0x51aa1c(0xa3)],'resources':_0x2e4cbc}),{'updated':_0x5c01fa['length'],'failed':_0x5c7739,'skipped':![],'menus':_0x5c01fa};}function validateSelection(_0xb8fba1){const _0x124c24=a175_0x3c91;if(!_0xb8fba1)throw new Error(_0x124c24(0x96));if(_0xb8fba1[_0x124c24(0xd3)]&&(_0xb8fba1[_0x124c24(0xa4)][_0x124c24(0xa3)]>0x0||_0xb8fba1[_0x124c24(0xb4)][_0x124c24(0xa3)]>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0xb8fba1[_0x124c24(0xd3)]&&_0xb8fba1['menuIds']['length']===0x0&&_0xb8fba1[_0x124c24(0xb4)]['length']===0x0)throw new Error(_0x124c24(0x96));}export function selectMenusForUpdate(_0x23348f,_0x46c2bf){const _0x4828b1=a175_0x3c91;validateSelection(_0x46c2bf);if(_0x46c2bf[_0x4828b1(0xd3)])return _0x23348f;const _0x1710da=new Set(_0x23348f[_0x4828b1(0x9e)](_0x582d56=>_0x582d56['id'])),_0x4e30c2=new Set(_0x23348f['map'](_0x220d50=>_0x220d50[_0x4828b1(0xdc)])),_0xd31332=_0x46c2bf['menuIds'][_0x4828b1(0xaf)](_0x408186=>!_0x1710da[_0x4828b1(0xa2)](_0x408186)),_0x1510c2=_0x46c2bf[_0x4828b1(0xb4)]['filter'](_0x2100bf=>!_0x4e30c2[_0x4828b1(0xa2)](_0x2100bf));if(_0xd31332[_0x4828b1(0xa3)]>0x0||_0x1510c2[_0x4828b1(0xa3)]>0x0){const _0x4806df=[..._0xd31332['map'](_0x552d24=>String(_0x552d24)),..._0x1510c2][_0x4828b1(0xc1)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x4806df);}const _0x52c11c=new Set(_0x46c2bf['menuIds']),_0x55453b=new Set(_0x46c2bf[_0x4828b1(0xb4)]);return _0x23348f[_0x4828b1(0xaf)](_0xc44a3e=>_0x52c11c[_0x4828b1(0xa2)](_0xc44a3e['id'])||_0x55453b[_0x4828b1(0xa2)](_0xc44a3e[_0x4828b1(0xdc)]));}function normalizeMode(_0xc6fb3b){const _0x416d26=a175_0x3c91;if(!_0xc6fb3b)return _0x416d26(0xcd);if(_0xc6fb3b===_0x416d26(0xa1)||_0xc6fb3b===_0x416d26(0xcd))return _0xc6fb3b;throw new Error(_0x416d26(0x93)+_0xc6fb3b+_0x416d26(0xc0));}function buildMenuUpdateDiff(_0x29defb,_0x49d6a0,_0x594dd9,_0x31bfa1,_0x11e595){const _0x439aaa=a175_0x3c91,_0x51912b=[..._0x29defb[_0x439aaa(0xb9)]];_0x594dd9===_0x439aaa(0xcd)&&assertUnambiguousPatchResources(_0x29defb,_0x51912b,_0x49d6a0);const _0x4bb5a2=_0x594dd9===_0x439aaa(0xcd)?patchResources(_0x51912b,_0x49d6a0):replaceResources(_0x49d6a0),_0x22c74a=[],_0x1df8e9=_0x51912b[_0x439aaa(0x9c)](isJsResource),_0x4edb35=_0x4bb5a2[_0x439aaa(0x9c)](isJsResource);if(_0x1df8e9&&!_0x4edb35){const _0x3ad2f5=_0x439aaa(0xbb)+_0x29defb[_0x439aaa(0xa7)]+_0x439aaa(0x92)+_0x29defb[_0x439aaa(0xdc)]+_0x439aaa(0x9b)+_0x439aaa(0xb6);if(!_0x31bfa1)throw new Error(_0x3ad2f5);_0x22c74a[_0x439aaa(0xa6)](_0x3ad2f5);}const _0x2af8e1=_0x51912b[_0x439aaa(0x9c)](isCssResource),_0x45e6c9=_0x4bb5a2[_0x439aaa(0x9c)](isCssResource);_0x2af8e1&&!_0x45e6c9&&_0x22c74a[_0x439aaa(0xa6)](_0x439aaa(0xbe)+_0x29defb[_0x439aaa(0xa7)]+_0x439aaa(0x92)+_0x29defb[_0x439aaa(0xdc)]+').');const _0x57974a=typeof _0x29defb[_0x439aaa(0xa5)]?.[_0x439aaa(0xaa)]===_0x439aaa(0xca)?_0x29defb[_0x439aaa(0xa5)][_0x439aaa(0xaa)]:null,_0x2828eb=_0x11e595?{'loadScriptMode':_0x57974a}:{},_0x386f4f=_0x11e595?{'loadScriptMode':_0x11e595}:{};return{'id':_0x29defb['id'],'label':_0x29defb['label'],'path':_0x29defb[_0x439aaa(0xdc)],'mode':_0x594dd9,'before':{'resources':_0x51912b,..._0x2828eb},'after':{'resources':_0x4bb5a2,..._0x386f4f},'warnings':_0x22c74a};}function replaceResources(_0x2c010d){const _0x4eafa1=a175_0x3c91;return[_0x2c010d['jsUrl'],_0x2c010d[_0x4eafa1(0x9a)]][_0x4eafa1(0xaf)](_0x366613=>!!_0x366613);}function assertUnambiguousPatchResources(_0x415d10,_0x426e65,_0x510468){const _0x26813f=a175_0x3c91,_0x1ed715=_0x426e65[_0x26813f(0xaf)](isJsResource)[_0x26813f(0xa3)];if(_0x510468[_0x26813f(0xad)]&&_0x1ed715>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x1ed715+_0x26813f(0xd5)+_0x415d10['label']+'\x22\x20('+_0x415d10['path']+')\x20'+_0x26813f(0xc7));const _0xd733e0=_0x426e65['filter'](isCssResource)[_0x26813f(0xa3)];if(_0x510468[_0x26813f(0x9a)]&&_0xd733e0>0x1)throw new Error(_0x26813f(0xd6)+_0xd733e0+_0x26813f(0xb8)+_0x415d10[_0x26813f(0xa7)]+'\x22\x20('+_0x415d10[_0x26813f(0xdc)]+')\x20'+_0x26813f(0xd7));}function patchResources(_0xf877d1,_0x554718){const _0x330e06=a175_0x3c91;let _0x34ad3c=![],_0x4bf76c=![];const _0x41bc52=[];for(const _0x84b43f of _0xf877d1){if(isJsResource(_0x84b43f)){if(_0x554718[_0x330e06(0xad)]&&!_0x34ad3c)_0x41bc52['push'](_0x554718['jsUrl']),_0x34ad3c=!![];else!_0x554718['jsUrl']&&_0x41bc52['push'](_0x84b43f);continue;}if(isCssResource(_0x84b43f)){if(_0x554718[_0x330e06(0x9a)]&&!_0x4bf76c)_0x41bc52[_0x330e06(0xa6)](_0x554718['cssUrl']),_0x4bf76c=!![];else!_0x554718[_0x330e06(0x9a)]&&_0x41bc52[_0x330e06(0xa6)](_0x84b43f);continue;}_0x41bc52[_0x330e06(0xa6)](_0x84b43f);}return _0x554718[_0x330e06(0xad)]&&!_0x34ad3c&&_0x41bc52[_0x330e06(0xda)](_0x554718[_0x330e06(0xad)]),_0x554718[_0x330e06(0x9a)]&&!_0x4bf76c&&_0x41bc52[_0x330e06(0xa6)](_0x554718[_0x330e06(0x9a)]),_0x41bc52;}function isJsResource(_0x2bc64e){const _0xcdb221=a175_0x3c91;return stripQuery(_0x2bc64e)[_0xcdb221(0x94)]()['endsWith'](_0xcdb221(0xd1));}function isCssResource(_0x508ed9){const _0x459a54=a175_0x3c91;return stripQuery(_0x508ed9)[_0x459a54(0x94)]()[_0x459a54(0x9f)](_0x459a54(0xc8));}function stripQuery(_0x3809d5){const _0x50b0d2=a175_0x3c91;return _0x3809d5[_0x50b0d2(0xcc)]('?')[0x0]??_0x3809d5;}function parseUpdateParamsFlag(_0x1016c4){const _0x495dc7=a175_0x3c91;if(!_0x1016c4||typeof _0x1016c4!==_0x495dc7(0xca))return{};try{const _0x22199d=JSON['parse'](_0x1016c4);if(typeof _0x22199d!==_0x495dc7(0x98)||_0x22199d===null||Array[_0x495dc7(0xb0)](_0x22199d))return{};return{'jsUrl':typeof _0x22199d[_0x495dc7(0xad)]===_0x495dc7(0xca)?_0x22199d['jsUrl'][_0x495dc7(0xb1)]():undefined,'cssUrl':typeof _0x22199d[_0x495dc7(0x9a)]===_0x495dc7(0xca)?_0x22199d[_0x495dc7(0x9a)][_0x495dc7(0xb1)]():undefined};}catch{return{};}}function a175_0x2131(){const _0x2e15c8=['toLowerCase','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','rejected','object','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','cssUrl',').\x20','some','186381WnsheY','map','endsWith','mode','replace','has','length','menuIds','extend','push','label','763AxmosM','menu-asset-update','loadScriptMode','after','--params.','jsUrl','value','filter','isArray','trim','CSS\x20URL\x20is\x20unreachable:\x20','dryRun','paths','cwd','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','21498ioCEmR','\x20existing\x20CSS\x20resources\x20for\x20\x22','resources','Start\x20non-interactive\x20menu\x20asset\x20update','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','selection','904948zRjTHM','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','Menu\x20asset\x20update\x20completed','.\x20Allowed\x20values:\x20replace,\x20patch','join','info','status','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','allSettled','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','.css','setLogPath','string','251848OQAyoZ','split','patch','field','JS\x20URL\x20is\x20unreachable:\x20','2612820DrYXlk','.js','fulfilled','all','4593432EaDedJ','\x20existing\x20JS\x20resources\x20for\x20\x22','menu\x20asset-update\x20cannot\x20patch\x20','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','390371llAJyV','force','unshift','24MYMGVl','path','160posHyJ','\x22\x20(','Invalid\x20--mode:\x20'];a175_0x2131=function(){return _0x2e15c8;};return a175_0x2131();}
1
+ (function(_0xb8ae26,_0x29dcda){const _0x2e3db9=a175_0x3d0e,_0x1c4aa9=_0xb8ae26();while(!![]){try{const _0x30157b=-parseInt(_0x2e3db9(0x161))/0x1*(-parseInt(_0x2e3db9(0x168))/0x2)+-parseInt(_0x2e3db9(0x15b))/0x3*(parseInt(_0x2e3db9(0x18c))/0x4)+-parseInt(_0x2e3db9(0x14c))/0x5+-parseInt(_0x2e3db9(0x152))/0x6*(parseInt(_0x2e3db9(0x16e))/0x7)+-parseInt(_0x2e3db9(0x150))/0x8+-parseInt(_0x2e3db9(0x17a))/0x9+-parseInt(_0x2e3db9(0x178))/0xa*(-parseInt(_0x2e3db9(0x186))/0xb);if(_0x30157b===_0x29dcda)break;else _0x1c4aa9['push'](_0x1c4aa9['shift']());}catch(_0x103e48){_0x1c4aa9['push'](_0x1c4aa9['shift']());}}}(a175_0x4c20,0xcd2c7));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x3a924e){const _0x1e5295=a175_0x3d0e,_0x4d1383=[];return _0x3a924e[_0x1e5295(0x172)]&&!isValidJsHttpsUrl(_0x3a924e[_0x1e5295(0x172)])&&_0x4d1383[_0x1e5295(0x163)]({'field':'jsUrl','message':_0x1e5295(0x156)}),_0x3a924e[_0x1e5295(0x155)]&&!isValidCssHttpsUrl(_0x3a924e[_0x1e5295(0x155)])&&_0x4d1383[_0x1e5295(0x163)]({'field':'cssUrl','message':_0x1e5295(0x162)}),_0x4d1383;}export async function runMenuUpdateCore(_0x14c653,_0x3320a1,_0x51838a,_0x18c6a4={}){const _0x4e9915=a175_0x3d0e,_0x1247b4=parseUpdateParamsFlag(_0x51838a),_0x3607d0=normalizeMode(_0x18c6a4['mode']);validateSelection(_0x18c6a4[_0x4e9915(0x181)]);const _0x4d964b=[];if(_0x1247b4['jsUrl'])_0x4d964b['push'](_0x1247b4[_0x4e9915(0x172)]);if(_0x1247b4[_0x4e9915(0x155)])_0x4d964b[_0x4e9915(0x163)](_0x1247b4[_0x4e9915(0x155)]);const _0x46462c=validateParams(_0x1247b4);if(_0x46462c[_0x4e9915(0x14d)]>0x0){const _0x55a2e4=_0x46462c[_0x4e9915(0x157)](_0x456c8f=>_0x4e9915(0x14e)+_0x456c8f[_0x4e9915(0x166)]+':\x20'+_0x456c8f[_0x4e9915(0x15d)])['join'](';\x20');throw new Error(_0x4e9915(0x189)+_0x55a2e4);}if(_0x4d964b[_0x4e9915(0x14d)]===0x0)throw new Error(_0x4e9915(0x175)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger['setLogPath'](process[_0x4e9915(0x16d)]()),logger['info'](_0x4e9915(0x18b),'Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0x14c653,'jsUrl':_0x1247b4[_0x4e9915(0x172)],'cssUrl':_0x1247b4[_0x4e9915(0x155)],'mode':_0x3607d0,'dryRun':_0x18c6a4[_0x4e9915(0x151)]===!![]});if(_0x1247b4[_0x4e9915(0x172)]){const _0x4286a3=await isUrlReachable(_0x1247b4[_0x4e9915(0x172)]);if(!_0x4286a3)throw new Error(_0x4e9915(0x183)+_0x1247b4[_0x4e9915(0x172)]);}if(_0x1247b4[_0x4e9915(0x155)]){const _0x212b65=await isUrlReachable(_0x1247b4[_0x4e9915(0x155)]);if(!_0x212b65)throw new Error(_0x4e9915(0x174)+_0x1247b4[_0x4e9915(0x155)]);}const _0x1899fb=await getOnlineMenuList(_0x14c653,_0x3320a1),_0x50a1fb=_0x1899fb[_0x4e9915(0x180)](_0x1cb798=>_0x1cb798[_0x4e9915(0x159)][_0x4e9915(0x14d)]>0x0),_0x521ff4=selectMenusForUpdate(_0x50a1fb,_0x18c6a4[_0x4e9915(0x181)]);if(_0x521ff4[_0x4e9915(0x14d)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x18c6a4[_0x4e9915(0x151)]===!![]};const _0x4c7736=_0x521ff4['map'](_0x53394a=>buildMenuUpdateDiff(_0x53394a,_0x1247b4,_0x3607d0,_0x18c6a4['force']===!![],_0x18c6a4[_0x4e9915(0x17d)]));if(_0x18c6a4['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x4c7736};const _0x299fab=await Promise['allSettled'](_0x521ff4[_0x4e9915(0x157)]((_0x4eee11,_0x3212fc)=>updateMenuCdnUrl(_0x14c653,_0x3320a1,{'id':_0x4eee11['id'],'label':_0x4eee11[_0x4e9915(0x17f)],'path':_0x4eee11[_0x4e9915(0x15f)],'resources':_0x4c7736[_0x3212fc][_0x4e9915(0x164)]['resources'],'extend':_0x4eee11['extend']??null,'loadScriptMode':_0x18c6a4['loadScriptMode']}))),_0x1f3be2=_0x299fab['filter'](_0x37c21d=>_0x37c21d[_0x4e9915(0x15a)]===_0x4e9915(0x16b))['map'](_0xdb5761=>_0xdb5761['value']),_0x296a5b=_0x299fab[_0x4e9915(0x180)](_0x280901=>_0x280901[_0x4e9915(0x15a)]==='rejected')[_0x4e9915(0x14d)];return logger['info'](_0x4e9915(0x18b),_0x4e9915(0x15e),{'count':_0x521ff4[_0x4e9915(0x14d)],'resources':_0x4d964b}),{'updated':_0x1f3be2[_0x4e9915(0x14d)],'failed':_0x296a5b,'skipped':![],'menus':_0x1f3be2};}function validateSelection(_0x6a0b49){const _0xcbd5e0=a175_0x3d0e;if(!_0x6a0b49)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x6a0b49['all']&&(_0x6a0b49['menuIds']['length']>0x0||_0x6a0b49['paths']['length']>0x0))throw new Error(_0xcbd5e0(0x173));if(!_0x6a0b49[_0xcbd5e0(0x17b)]&&_0x6a0b49[_0xcbd5e0(0x188)]['length']===0x0&&_0x6a0b49[_0xcbd5e0(0x18a)][_0xcbd5e0(0x14d)]===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}export function selectMenusForUpdate(_0x523db7,_0x1968c4){const _0x3639b6=a175_0x3d0e;validateSelection(_0x1968c4);if(_0x1968c4[_0x3639b6(0x17b)])return _0x523db7;const _0x10dc4b=new Set(_0x523db7[_0x3639b6(0x157)](_0x361674=>_0x361674['id'])),_0x53e7b0=new Set(_0x523db7[_0x3639b6(0x157)](_0x1fb3ab=>_0x1fb3ab[_0x3639b6(0x15f)])),_0x53c96b=_0x1968c4[_0x3639b6(0x188)]['filter'](_0x3e115a=>!_0x10dc4b['has'](_0x3e115a)),_0x54403f=_0x1968c4[_0x3639b6(0x18a)]['filter'](_0x7e592b=>!_0x53e7b0[_0x3639b6(0x182)](_0x7e592b));if(_0x53c96b['length']>0x0||_0x54403f[_0x3639b6(0x14d)]>0x0){const _0x4a417f=[..._0x53c96b[_0x3639b6(0x157)](_0x145ef4=>String(_0x145ef4)),..._0x54403f][_0x3639b6(0x154)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x4a417f);}const _0x482c79=new Set(_0x1968c4['menuIds']),_0x487155=new Set(_0x1968c4['paths']);return _0x523db7['filter'](_0x48915e=>_0x482c79[_0x3639b6(0x182)](_0x48915e['id'])||_0x487155['has'](_0x48915e[_0x3639b6(0x15f)]));}function normalizeMode(_0xa4427a){const _0x17392c=a175_0x3d0e;if(!_0xa4427a)return _0x17392c(0x17c);if(_0xa4427a==='replace'||_0xa4427a==='patch')return _0xa4427a;throw new Error(_0x17392c(0x16c)+_0xa4427a+_0x17392c(0x167));}function a175_0x4c20(){const _0x311dae=['\x20existing\x20CSS\x20resources\x20for\x20\x22','8360015YYPonX','length','--params.','parse','1648272xplKel','dryRun','114eMfiTK','isArray','join','cssUrl','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','map','.js','resources','status','3383925cGPccC','unshift','message','Menu\x20asset\x20update\x20completed','path','object','72635LpBbpR','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','push','after','trim','field','.\x20Allowed\x20values:\x20replace,\x20patch','2mRcfAs','endsWith','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','fulfilled','Invalid\x20--mode:\x20','cwd','459515YYXIWf','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','some','string','jsUrl','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','CSS\x20URL\x20is\x20unreachable:\x20','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','menu\x20asset-update\x20cannot\x20patch\x20','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','1020MzoEdR','extend','3678687QCJRPB','all','patch','loadScriptMode','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','label','filter','selection','has','JS\x20URL\x20is\x20unreachable:\x20','\x22\x20(',').\x20','585563MGPLMg','split','menuIds','Invalid\x20--params:\x20','paths','menu-asset-update','4wbpqGs'];a175_0x4c20=function(){return _0x311dae;};return a175_0x4c20();}function buildMenuUpdateDiff(_0x2a6da4,_0xf85bad,_0x392576,_0x55bb5d,_0x3c6e3b){const _0x44588a=a175_0x3d0e,_0x2746f7=[..._0x2a6da4[_0x44588a(0x159)]];_0x392576===_0x44588a(0x17c)&&assertUnambiguousPatchResources(_0x2a6da4,_0x2746f7,_0xf85bad);const _0x2e080b=_0x392576==='patch'?patchResources(_0x2746f7,_0xf85bad):replaceResources(_0xf85bad),_0x434fbc=[],_0x29956d=_0x2746f7['some'](isJsResource),_0x5ab2ff=_0x2e080b['some'](isJsResource);if(_0x29956d&&!_0x5ab2ff){const _0xd5b690=_0x44588a(0x177)+_0x2a6da4[_0x44588a(0x17f)]+_0x44588a(0x184)+_0x2a6da4[_0x44588a(0x15f)]+_0x44588a(0x185)+_0x44588a(0x17e);if(!_0x55bb5d)throw new Error(_0xd5b690);_0x434fbc[_0x44588a(0x163)](_0xd5b690);}const _0x4ad293=_0x2746f7['some'](isCssResource),_0x1cbbbe=_0x2e080b[_0x44588a(0x170)](isCssResource);_0x4ad293&&!_0x1cbbbe&&_0x434fbc['push'](_0x44588a(0x16a)+_0x2a6da4[_0x44588a(0x17f)]+'\x22\x20('+_0x2a6da4[_0x44588a(0x15f)]+').');const _0x3da8f2=typeof _0x2a6da4['extend']?.[_0x44588a(0x17d)]===_0x44588a(0x171)?_0x2a6da4[_0x44588a(0x179)][_0x44588a(0x17d)]:null,_0x2520af=_0x3c6e3b?{'loadScriptMode':_0x3da8f2}:{},_0x4be498=_0x3c6e3b?{'loadScriptMode':_0x3c6e3b}:{};return{'id':_0x2a6da4['id'],'label':_0x2a6da4['label'],'path':_0x2a6da4['path'],'mode':_0x392576,'before':{'resources':_0x2746f7,..._0x2520af},'after':{'resources':_0x2e080b,..._0x4be498},'warnings':_0x434fbc};}function replaceResources(_0x1ff141){const _0x48a769=a175_0x3d0e;return[_0x1ff141[_0x48a769(0x172)],_0x1ff141[_0x48a769(0x155)]]['filter'](_0x4978e5=>!!_0x4978e5);}function a175_0x3d0e(_0x4884d5,_0x156903){_0x4884d5=_0x4884d5-0x14c;const _0x4c2066=a175_0x4c20();let _0x3d0e2c=_0x4c2066[_0x4884d5];return _0x3d0e2c;}function assertUnambiguousPatchResources(_0x1cba48,_0x3a4ac1,_0x3eb6dc){const _0x25a89a=a175_0x3d0e,_0x283d05=_0x3a4ac1[_0x25a89a(0x180)](isJsResource)['length'];if(_0x3eb6dc[_0x25a89a(0x172)]&&_0x283d05>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x283d05+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x1cba48[_0x25a89a(0x17f)]+_0x25a89a(0x184)+_0x1cba48[_0x25a89a(0x15f)]+')\x20'+_0x25a89a(0x16f));const _0x5c5bdc=_0x3a4ac1[_0x25a89a(0x180)](isCssResource)[_0x25a89a(0x14d)];if(_0x3eb6dc[_0x25a89a(0x155)]&&_0x5c5bdc>0x1)throw new Error(_0x25a89a(0x176)+_0x5c5bdc+_0x25a89a(0x18d)+_0x1cba48[_0x25a89a(0x17f)]+'\x22\x20('+_0x1cba48[_0x25a89a(0x15f)]+')\x20'+'with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');}function patchResources(_0x2e2cd6,_0x43fce8){const _0x255d1b=a175_0x3d0e;let _0x37bdb4=![],_0x220939=![];const _0x363a39=[];for(const _0x4c066a of _0x2e2cd6){if(isJsResource(_0x4c066a)){if(_0x43fce8[_0x255d1b(0x172)]&&!_0x37bdb4)_0x363a39[_0x255d1b(0x163)](_0x43fce8[_0x255d1b(0x172)]),_0x37bdb4=!![];else!_0x43fce8[_0x255d1b(0x172)]&&_0x363a39[_0x255d1b(0x163)](_0x4c066a);continue;}if(isCssResource(_0x4c066a)){if(_0x43fce8[_0x255d1b(0x155)]&&!_0x220939)_0x363a39[_0x255d1b(0x163)](_0x43fce8['cssUrl']),_0x220939=!![];else!_0x43fce8['cssUrl']&&_0x363a39[_0x255d1b(0x163)](_0x4c066a);continue;}_0x363a39[_0x255d1b(0x163)](_0x4c066a);}return _0x43fce8[_0x255d1b(0x172)]&&!_0x37bdb4&&_0x363a39[_0x255d1b(0x15c)](_0x43fce8[_0x255d1b(0x172)]),_0x43fce8[_0x255d1b(0x155)]&&!_0x220939&&_0x363a39[_0x255d1b(0x163)](_0x43fce8['cssUrl']),_0x363a39;}function isJsResource(_0x1e85a3){const _0xcbee8e=a175_0x3d0e;return stripQuery(_0x1e85a3)['toLowerCase']()['endsWith'](_0xcbee8e(0x158));}function isCssResource(_0x24dda8){const _0x2ecae2=a175_0x3d0e;return stripQuery(_0x24dda8)['toLowerCase']()[_0x2ecae2(0x169)]('.css');}function stripQuery(_0x7eca5b){const _0x20078b=a175_0x3d0e;return _0x7eca5b[_0x20078b(0x187)]('?')[0x0]??_0x7eca5b;}function parseUpdateParamsFlag(_0x24f34b){const _0x33ba61=a175_0x3d0e;if(!_0x24f34b||typeof _0x24f34b!==_0x33ba61(0x171))return{};try{const _0x1daa19=JSON[_0x33ba61(0x14f)](_0x24f34b);if(typeof _0x1daa19!==_0x33ba61(0x160)||_0x1daa19===null||Array[_0x33ba61(0x153)](_0x1daa19))return{};return{'jsUrl':typeof _0x1daa19[_0x33ba61(0x172)]===_0x33ba61(0x171)?_0x1daa19[_0x33ba61(0x172)][_0x33ba61(0x165)]():undefined,'cssUrl':typeof _0x1daa19[_0x33ba61(0x155)]===_0x33ba61(0x171)?_0x1daa19[_0x33ba61(0x155)]['trim']():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a176_0x3e8f(){const _0x4a6eb7=['body','trim','2058296VtngHx','997352YTaecY','6852132QqzNlL','10405764dNVOgT','HEAD','8682gAMsHN','test','cancel','6UnDIEs','4371785NCrIDN','159OOLrFX','10403904ZPuGdG'];a176_0x3e8f=function(){return _0x4a6eb7;};return a176_0x3e8f();}(function(_0x261fab,_0x381604){const _0x535d4d=a176_0xcd7b,_0x5a4f66=_0x261fab();while(!![]){try{const _0x383746=parseInt(_0x535d4d(0x1fa))/0x1+-parseInt(_0x535d4d(0x1f0))/0x2*(-parseInt(_0x535d4d(0x1f5))/0x3)+-parseInt(_0x535d4d(0x1f9))/0x4+-parseInt(_0x535d4d(0x1f4))/0x5+-parseInt(_0x535d4d(0x1f3))/0x6*(-parseInt(_0x535d4d(0x1ed))/0x7)+-parseInt(_0x535d4d(0x1f6))/0x8+parseInt(_0x535d4d(0x1ee))/0x9;if(_0x383746===_0x381604)break;else _0x5a4f66['push'](_0x5a4f66['shift']());}catch(_0x51a453){_0x5a4f66['push'](_0x5a4f66['shift']());}}}(a176_0x3e8f,0xa4536));export function isValidJsHttpsUrl(_0x5805cd){const _0x34b77f=a176_0xcd7b;return/^https:\/\/.+\.js(\?.*)?$/[_0x34b77f(0x1f1)](_0x5805cd[_0x34b77f(0x1f8)]());}function a176_0xcd7b(_0x9fe90e,_0x2be701){_0x9fe90e=_0x9fe90e-0x1ed;const _0x3e8f43=a176_0x3e8f();let _0xcd7b19=_0x3e8f43[_0x9fe90e];return _0xcd7b19;}export function isValidCssHttpsUrl(_0x167958){const _0x33ae4d=a176_0xcd7b;return/^https:\/\/.+\.css(\?.*)?$/[_0x33ae4d(0x1f1)](_0x167958['trim']());}export async function isUrlReachable(_0x17dba8){const _0x2273bf=a176_0xcd7b;try{const _0x3cd96a=await fetch(_0x17dba8,{'method':_0x2273bf(0x1ef)});if(_0x3cd96a['ok'])return!![];}catch{}try{const _0x53d9a1=await fetch(_0x17dba8,{'method':'GET','headers':{'Range':'bytes=0-0'}}),_0x3bca5e=_0x53d9a1['ok'];try{await _0x53d9a1[_0x2273bf(0x1f7)]?.[_0x2273bf(0x1f2)]();}catch{}return _0x3bca5e;}catch{return![];}}
1
+ (function(_0x59c228,_0x42402e){const _0x44ac16=a176_0xcc9a,_0x4193ba=_0x59c228();while(!![]){try{const _0x324407=-parseInt(_0x44ac16(0x1d5))/0x1+parseInt(_0x44ac16(0x1dc))/0x2*(parseInt(_0x44ac16(0x1e1))/0x3)+parseInt(_0x44ac16(0x1d6))/0x4+parseInt(_0x44ac16(0x1d7))/0x5*(-parseInt(_0x44ac16(0x1d9))/0x6)+-parseInt(_0x44ac16(0x1e2))/0x7*(parseInt(_0x44ac16(0x1d4))/0x8)+parseInt(_0x44ac16(0x1d2))/0x9+parseInt(_0x44ac16(0x1de))/0xa*(-parseInt(_0x44ac16(0x1df))/0xb);if(_0x324407===_0x42402e)break;else _0x4193ba['push'](_0x4193ba['shift']());}catch(_0x59f619){_0x4193ba['push'](_0x4193ba['shift']());}}}(a176_0x5dc5,0x29860));function a176_0x5dc5(){const _0xc4199=['HEAD','208XJnCer','43361JszBiP','897892LdxkWj','25urbzfI','body','206754pLJVGU','cancel','test','4kpXWft','trim','42190WerfGK','781FboceC','GET','331014PWxtiF','10675JgAuVc','2518074nPtBqG'];a176_0x5dc5=function(){return _0xc4199;};return a176_0x5dc5();}export function isValidJsHttpsUrl(_0x5710fd){const _0x2c730c=a176_0xcc9a;return/^https:\/\/.+\.js(\?.*)?$/[_0x2c730c(0x1db)](_0x5710fd['trim']());}export function isValidCssHttpsUrl(_0x2eacf8){const _0x3922c6=a176_0xcc9a;return/^https:\/\/.+\.css(\?.*)?$/[_0x3922c6(0x1db)](_0x2eacf8[_0x3922c6(0x1dd)]());}function a176_0xcc9a(_0x2f7b7a,_0x39cc33){_0x2f7b7a=_0x2f7b7a-0x1d2;const _0x5dc593=a176_0x5dc5();let _0xcc9a10=_0x5dc593[_0x2f7b7a];return _0xcc9a10;}export async function isUrlReachable(_0x656b4f){const _0x3c314e=a176_0xcc9a;try{const _0x420d24=await fetch(_0x656b4f,{'method':_0x3c314e(0x1d3)});if(_0x420d24['ok'])return!![];}catch{}try{const _0x22725c=await fetch(_0x656b4f,{'method':_0x3c314e(0x1e0),'headers':{'Range':'bytes=0-0'}}),_0x5e8ce7=_0x22725c['ok'];try{await _0x22725c[_0x3c314e(0x1d8)]?.[_0x3c314e(0x1da)]();}catch{}return _0x5e8ce7;}catch{return![];}}
@@ -1 +1 @@
1
- function a177_0x354f(_0x28c793,_0x519af6){_0x28c793=_0x28c793-0x12d;const _0x19ecfc=a177_0x19ec();let _0x354f57=_0x19ecfc[_0x28c793];return _0x354f57;}const a177_0xc959f6=a177_0x354f;(function(_0x3e2aa7,_0x597f26){const _0x158d2e=a177_0x354f,_0x53cf93=_0x3e2aa7();while(!![]){try{const _0x3cee7f=-parseInt(_0x158d2e(0x135))/0x1+-parseInt(_0x158d2e(0x134))/0x2*(parseInt(_0x158d2e(0x13b))/0x3)+parseInt(_0x158d2e(0x130))/0x4+-parseInt(_0x158d2e(0x13d))/0x5+-parseInt(_0x158d2e(0x138))/0x6+parseInt(_0x158d2e(0x12e))/0x7+parseInt(_0x158d2e(0x133))/0x8;if(_0x3cee7f===_0x597f26)break;else _0x53cf93['push'](_0x53cf93['shift']());}catch(_0x54328e){_0x53cf93['push'](_0x53cf93['shift']());}}}(a177_0x19ec,0xabf6b));import{getSmartAppRecord}from'../../core/api-client.js';import{getOnlineMenuList}from'../../commands/menu/shared/service.js';function a177_0x19ec(){const _0x4e3ca3=['8190912kznHFc','all','Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','303LTUKky','\x20in\x20menu\x20host\x20','4540780teMgeP','read','6104063NfPUiM','Inspected\x20','925460oWBqmr','boundMenus','subapp-assets-status','18988240UcNfgP','1142JzRPtU','441562uicYET','\x20menu(s)\x20for\x20','cookie'];a177_0x19ec=function(){return _0x4e3ca3;};return a177_0x19ec();}import{buildSubappAssetsStatus,getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';export const menuSubappAssetsStatus={'service':'menu','command':a177_0xc959f6(0x132),'description':a177_0xc959f6(0x13a),'risk':a177_0xc959f6(0x12d),'strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x2772d5){getSubappSelector(_0x2772d5);},async 'execute'(_0x340396){const _0x416e38=a177_0xc959f6,{appCode:_0x96ebf8,appName:_0x5d9701}=getSubappSelector(_0x340396),[_0xcc2add,_0x2e91ca]=await Promise[_0x416e38(0x139)]([getSmartAppRecord(_0x96ebf8,_0x340396[_0x416e38(0x137)]),getOnlineMenuList(_0x96ebf8,_0x340396['cookie'])]),_0x19d00e={'appCode':_0x96ebf8,...buildSubappAssetsStatus(_0xcc2add,_0x2e91ca,_0x5d9701)};return{'ok':!![],'data':_0x19d00e,'message':_0x416e38(0x12f)+_0x19d00e[_0x416e38(0x131)]+_0x416e38(0x136)+_0x5d9701+_0x416e38(0x13c)+_0x96ebf8+'.'};}};
1
+ const a177_0x5833df=a177_0x4832;(function(_0x211bff,_0x1dad75){const _0x907fac=a177_0x4832,_0x512342=_0x211bff();while(!![]){try{const _0x37fd43=-parseInt(_0x907fac(0x85))/0x1*(parseInt(_0x907fac(0x83))/0x2)+parseInt(_0x907fac(0x88))/0x3*(parseInt(_0x907fac(0x8a))/0x4)+-parseInt(_0x907fac(0x84))/0x5+parseInt(_0x907fac(0x92))/0x6+parseInt(_0x907fac(0x8b))/0x7+parseInt(_0x907fac(0x91))/0x8*(-parseInt(_0x907fac(0x89))/0x9)+parseInt(_0x907fac(0x8e))/0xa*(-parseInt(_0x907fac(0x93))/0xb);if(_0x37fd43===_0x1dad75)break;else _0x512342['push'](_0x512342['shift']());}catch(_0x5adf45){_0x512342['push'](_0x512342['shift']());}}}(a177_0x45a3,0x669e8));function a177_0x4832(_0x57c54b,_0xf2cbef){_0x57c54b=_0x57c54b-0x82;const _0x45a32d=a177_0x45a3();let _0x4832bc=_0x45a32d[_0x57c54b];return _0x4832bc;}import{getSmartAppRecord}from'../../core/api-client.js';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':a177_0x5833df(0x8f),'command':a177_0x5833df(0x82),'description':a177_0x5833df(0x87),'risk':a177_0x5833df(0x90),'strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x16af4a){getSubappSelector(_0x16af4a);},async 'execute'(_0x52ee38){const _0x3257a8=a177_0x5833df,{appCode:_0x41f8f0,appName:_0x5eacac}=getSubappSelector(_0x52ee38),[_0x2c2e95,_0x1cdde1]=await Promise[_0x3257a8(0x94)]([getSmartAppRecord(_0x41f8f0,_0x52ee38[_0x3257a8(0x95)]),getOnlineMenuList(_0x41f8f0,_0x52ee38['cookie'])]),_0xdeea3c={'appCode':_0x41f8f0,...buildSubappAssetsStatus(_0x2c2e95,_0x1cdde1,_0x5eacac)};return{'ok':!![],'data':_0xdeea3c,'message':'Inspected\x20'+_0xdeea3c[_0x3257a8(0x8c)]+_0x3257a8(0x8d)+_0x5eacac+_0x3257a8(0x86)+_0x41f8f0+'.'};}};function a177_0x45a3(){const _0x55070b=['2OABUaZ','\x20in\x20menu\x20host\x20','Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','129JoOJDb','2510559EuKwCP','74772ackoXH','5155080IwcfhE','boundMenus','\x20menu(s)\x20for\x20','6601990QYGNHe','menu','read','16zkGGlc','2306778UrcrkL','11gpfpdf','all','cookie','subapp-assets-status','184246ZiLeTn','510135HsnaeT'];a177_0x45a3=function(){return _0x55070b;};return a177_0x45a3();}
@@ -1 +1 @@
1
- function a178_0x4dd8(){const _0x18aaa4=['isSafeInteger','assets','\x20contains\x20invalid\x20JSON.','--resources\x20is\x20required.','string','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.',';\x20found\x20','4142636YqIpQw','entries','3027447uoNlsH',';\x20independent\x20deployment\x20not\x20verified.',']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.','Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','directDbEnabled','109034STJfiV','protocol','nextExtend','object','\x20must\x20be\x20a\x20JSON\x20array.','extend','apiError','hex','write','skinColor','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.','5510520NgMGYP','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20','cookie','App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.','menu','map','str','appCode','validation','/smartapi/app/update','not\x20HTTPS','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs','2vPruVJ','resources','trim','5eahyVq','has','unchanged','accessKey','isArray','resources[','appPublishStatus','tenantColumn','.\x20Refusing\x20update.','\x20in\x20menu\x20host\x20','4688892oRgaZi','vipDeploy','enableAutoSync',']\x20must\x20be\x20a\x20URL\x20string.','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','Unknown\x20app.extend\x20fields:\x20','some','test','subapp-assets-update','sha256','expectedHash','expected-hash','verified\x20app.extend','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','Updated\x20shared\x20resources\x20for\x20','POST','app.extend.assets','stringify','1029618WYOFht','parse','enableOpenApi','enableSample','length','3124821oYjSzV'];a178_0x4dd8=function(){return _0x18aaa4;};return a178_0x4dd8();}function a178_0x1afb(_0x18c686,_0x399d30){_0x18c686=_0x18c686-0x74;const _0x4dd833=a178_0x4dd8();let _0x1afbe1=_0x4dd833[_0x18c686];return _0x1afbe1;}const a178_0x46b043=a178_0x1afb;(function(_0x5a4489,_0x481bc6){const _0x344d9d=a178_0x1afb,_0x368f43=_0x5a4489();while(!![]){try{const _0x1baa91=parseInt(_0x344d9d(0xbf))/0x1*(-parseInt(_0x344d9d(0xa4))/0x2)+parseInt(_0x344d9d(0x8f))/0x3+parseInt(_0x344d9d(0x9d))/0x4*(parseInt(_0x344d9d(0xc2))/0x5)+-parseInt(_0x344d9d(0x7d))/0x6+parseInt(_0x344d9d(0x94))/0x7+-parseInt(_0x344d9d(0xaf))/0x8+parseInt(_0x344d9d(0x9f))/0x9;if(_0x1baa91===_0x481bc6)break;else _0x368f43['push'](_0x368f43['shift']());}catch(_0x3e5825){_0x368f43['push'](_0x368f43['shift']());}}}(a178_0x4dd8,0x8e2b0));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set([a178_0x46b043(0xad),a178_0x46b043(0x91),a178_0x46b043(0x76),a178_0x46b043(0x96),a178_0x46b043(0x7a),a178_0x46b043(0x92),a178_0x46b043(0x7e),a178_0x46b043(0x7f),'directDbId',a178_0x46b043(0xa3)]);function parseObject(_0x5a96ef,_0x42db68){const _0x1f01c1=a178_0x46b043;let _0x5123d8=_0x5a96ef;if(typeof _0x5a96ef===_0x1f01c1(0x99))try{_0x5123d8=JSON['parse'](_0x5a96ef);}catch{throw CliErrors[_0x1f01c1(0xb7)](_0x42db68+_0x1f01c1(0x97));}if(!_0x5123d8||typeof _0x5123d8!==_0x1f01c1(0xa7)||Array[_0x1f01c1(0x77)](_0x5123d8))throw CliErrors[_0x1f01c1(0xb7)](_0x42db68+'\x20must\x20be\x20a\x20JSON\x20object.');return _0x5123d8;}function parseArray(_0x466081,_0x2dcc79){const _0x2a2558=a178_0x46b043;let _0x1f4b38;try{_0x1f4b38=JSON[_0x2a2558(0x90)](_0x466081);}catch{throw CliErrors[_0x2a2558(0xb7)](_0x2dcc79+_0x2a2558(0x97));}if(!Array[_0x2a2558(0x77)](_0x1f4b38))throw CliErrors['validation'](_0x2dcc79+_0x2a2558(0xa8));return _0x1f4b38[_0x2a2558(0xb4)]((_0x352ac1,_0x490ac3)=>parseObject(_0x352ac1,_0x2dcc79+'['+_0x490ac3+']'));}function validateResources(_0x4fefa7){const _0x5533de=a178_0x46b043;if(_0x4fefa7[_0x5533de(0x93)]===0x0)throw CliErrors[_0x5533de(0xb7)]('At\x20least\x20one\x20resource\x20URL\x20is\x20required.');for(const [_0x442c2d,_0x3ce276]of _0x4fefa7[_0x5533de(0x9e)]()){if(typeof _0x3ce276!==_0x5533de(0x99))throw CliErrors[_0x5533de(0xb7)](_0x5533de(0x78)+_0x442c2d+_0x5533de(0x80));try{if(new URL(_0x3ce276)[_0x5533de(0xa5)]!=='https:')throw new Error(_0x5533de(0xb9));}catch{throw CliErrors[_0x5533de(0xb7)](_0x5533de(0x78)+_0x442c2d+_0x5533de(0xa1));}}if(new Set(_0x4fefa7)['size']!==_0x4fefa7[_0x5533de(0x93)]||!_0x4fefa7[_0x5533de(0x83)](_0x284b63=>/\.m?js(?:[?#]|$)/i['test'](_0x284b63)))throw CliErrors[_0x5533de(0xb7)](_0x5533de(0xbc));return _0x4fefa7;}function prepare(_0x79067,_0x27dcc2,_0x1d310d){const _0x3cc091=a178_0x46b043;if(!Number[_0x3cc091(0x95)](_0x79067['id'])||(_0x79067['id']??0x0)<=0x0||typeof _0x79067[_0x3cc091(0x79)]!==_0x3cc091(0x99)||!_0x79067['appPublishStatus'])throw CliErrors[_0x3cc091(0xb7)](_0x3cc091(0x9b));const _0x348cce=parseObject(_0x79067[_0x3cc091(0xa9)],'app.extend'),_0x1f367e=Object['keys'](_0x348cce)['filter'](_0x413c71=>!KNOWN_EXTEND_KEYS[_0x3cc091(0x74)](_0x413c71));if(_0x1f367e[_0x3cc091(0x93)])throw CliErrors['validation'](_0x3cc091(0x82)+_0x1f367e['join'](',\x20')+_0x3cc091(0x7b));if(typeof _0x348cce[_0x3cc091(0x96)]!==_0x3cc091(0x99))throw CliErrors['validation'](_0x3cc091(0x8a));const _0xca74c6=parseArray(_0x348cce[_0x3cc091(0x96)],_0x3cc091(0x8d)),_0x12073f=_0xca74c6['filter'](_0xac129e=>_0xac129e['appName']===_0x27dcc2);if(_0x12073f[_0x3cc091(0x93)]!==0x1)throw CliErrors[_0x3cc091(0xb7)](_0x3cc091(0xb0)+_0x27dcc2+_0x3cc091(0x9c)+_0x12073f['length']+'.');const _0x58338a=_0x12073f[0x0];if(typeof _0x58338a[_0x3cc091(0xc0)]!==_0x3cc091(0x99))throw CliErrors[_0x3cc091(0xb7)]('Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.');let _0x2b689c;try{_0x2b689c=JSON[_0x3cc091(0x90)](_0x58338a[_0x3cc091(0xc0)]);}catch{throw CliErrors['validation'](_0x3cc091(0x81));}if(!Array[_0x3cc091(0x77)](_0x2b689c)||_0x2b689c[_0x3cc091(0x83)](_0x4a270f=>typeof _0x4a270f!==_0x3cc091(0x99)))throw CliErrors['validation'](_0x3cc091(0xbd));const _0x3d4026=_0xca74c6[_0x3cc091(0xb4)](_0x4b7949=>_0x4b7949===_0x58338a?{..._0x4b7949,'resources':JSON[_0x3cc091(0x8e)](_0x1d310d)}:_0x4b7949),_0x5f25e4={..._0x348cce,'assets':JSON['stringify'](_0x3d4026)},_0x177579=createHash(_0x3cc091(0x86))['update'](JSON[_0x3cc091(0x8e)]({'appCode':_0x79067[_0x3cc091(0xb6)],'id':_0x79067['id'],'appPublishStatus':_0x79067[_0x3cc091(0x79)],'extend':_0x348cce,'appName':_0x27dcc2,'resources':_0x1d310d}))['digest'](_0x3cc091(0xab));return{'before':_0x2b689c,'nextExtend':_0x5f25e4,'expectedHash':_0x177579,'unchanged':isDeepStrictEqual(_0x2b689c,_0x1d310d)};}function flags(_0x1a5123){const _0x289abc=a178_0x46b043,{appCode:_0x9e2bcf,appName:_0x5c5fc5}=getSubappSelector(_0x1a5123),_0x57092e=_0x1a5123[_0x289abc(0xb5)](_0x289abc(0xc0))[_0x289abc(0xc1)]();if(!_0x57092e)throw CliErrors[_0x289abc(0xb7)](_0x289abc(0x98));let _0x201695;try{_0x201695=JSON[_0x289abc(0x90)](_0x57092e);}catch{throw CliErrors[_0x289abc(0xb7)](_0x289abc(0xbb));}if(!Array[_0x289abc(0x77)](_0x201695))throw CliErrors[_0x289abc(0xb7)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');return{'appCode':_0x9e2bcf,'appName':_0x5c5fc5,'resources':validateResources(_0x201695)};}export const menuSubappAssetsUpdate={'service':a178_0x46b043(0xb3),'command':a178_0x46b043(0x85),'description':a178_0x46b043(0xa2),'risk':a178_0x46b043(0xac),'strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':'resources','type':a178_0x46b043(0x99),'required':!![],'description':a178_0x46b043(0xbe)},{'name':a178_0x46b043(0x88),'type':a178_0x46b043(0x99),'description':'Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes'}],async 'validate'(_0x1d8e78){flags(_0x1d8e78);},async 'dryRun'(_0xb46148){const _0x4cbbc5=a178_0x46b043,{appCode:_0x447ccc,appName:_0x359ee6,resources:_0x4052ee}=flags(_0xb46148),_0x55326b=await getSmartAppRecord(_0x447ccc,_0xb46148['cookie']),_0x2ca0a3=prepare(_0x55326b,_0x359ee6,_0x4052ee);return{'method':_0x4cbbc5(0x8c),'url':_0x4cbbc5(0xb8),'body':{'preview':{'appCode':_0x447ccc,'appName':_0x359ee6,'before':_0x2ca0a3['before'],'after':_0x4052ee,'expectedHash':_0x2ca0a3[_0x4cbbc5(0x87)],'unchanged':_0x2ca0a3[_0x4cbbc5(0x75)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x2ca0a3[_0x4cbbc5(0x75)]?_0x4cbbc5(0xae):'Would\x20update\x20shared\x20assets\x20for\x20'+_0x359ee6+'.'};},async 'execute'(_0x4def22){const _0x262c67=a178_0x46b043,{appCode:_0x183be6,appName:_0x40dd9c,resources:_0x38ec2e}=flags(_0x4def22),_0x505d7d=_0x4def22['str'](_0x262c67(0x88))[_0x262c67(0xc1)]();if(!/^[a-f0-9]{64}$/i[_0x262c67(0x84)](_0x505d7d))throw CliErrors[_0x262c67(0xb7)](_0x262c67(0xba));const _0x3e2a02=await getSmartAppRecord(_0x183be6,_0x4def22[_0x262c67(0xb1)]),_0x1c4b2a=prepare(_0x3e2a02,_0x40dd9c,_0x38ec2e);if(_0x505d7d!==_0x1c4b2a[_0x262c67(0x87)])throw CliErrors[_0x262c67(0xb7)]('App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.');if(_0x1c4b2a[_0x262c67(0x75)])return{'ok':!![],'data':{'appCode':_0x183be6,'appName':_0x40dd9c,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x262c67(0x9a)};await updateSmartAppRecord({'id':_0x3e2a02['id'],'appCode':_0x183be6,'appPublishStatus':_0x3e2a02[_0x262c67(0x79)],'extend':_0x1c4b2a[_0x262c67(0xa6)]},_0x4def22[_0x262c67(0xb1)]);const _0x3d568f=await getSmartAppRecord(_0x183be6,_0x4def22[_0x262c67(0xb1)]),_0x23a3f0=parseObject(_0x3d568f[_0x262c67(0xa9)],_0x262c67(0x89));if(_0x3d568f['id']!==_0x3e2a02['id']||_0x3d568f['appPublishStatus']!==_0x3e2a02[_0x262c67(0x79)]||!isDeepStrictEqual(_0x23a3f0,_0x1c4b2a[_0x262c67(0xa6)]))throw CliErrors[_0x262c67(0xaa)](_0x262c67(0xb2));return{'ok':!![],'data':{'appCode':_0x183be6,'appName':_0x40dd9c,'updated':!![],'resources':_0x38ec2e,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x262c67(0x8b)+_0x40dd9c+_0x262c67(0x7c)+_0x183be6+_0x262c67(0xa0)};}};
1
+ const a178_0x114fc2=a178_0x2666;(function(_0xb58db1,_0x587c95){const _0x31a9bb=a178_0x2666,_0x254593=_0xb58db1();while(!![]){try{const _0x5c4bf5=parseInt(_0x31a9bb(0xf2))/0x1*(parseInt(_0x31a9bb(0xd5))/0x2)+parseInt(_0x31a9bb(0xc0))/0x3+-parseInt(_0x31a9bb(0xb8))/0x4+parseInt(_0x31a9bb(0xcf))/0x5*(parseInt(_0x31a9bb(0xb9))/0x6)+-parseInt(_0x31a9bb(0xe6))/0x7*(parseInt(_0x31a9bb(0xd2))/0x8)+-parseInt(_0x31a9bb(0xbd))/0x9*(-parseInt(_0x31a9bb(0xb6))/0xa)+-parseInt(_0x31a9bb(0xff))/0xb;if(_0x5c4bf5===_0x587c95)break;else _0x254593['push'](_0x254593['shift']());}catch(_0x1aca98){_0x254593['push'](_0x254593['shift']());}}}(a178_0xd364,0x6e429));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set([a178_0x114fc2(0xf3),a178_0x114fc2(0xc9),'accessKey',a178_0x114fc2(0xf9),'tenantColumn','enableSample',a178_0x114fc2(0xbb),a178_0x114fc2(0xe9),a178_0x114fc2(0xdd),a178_0x114fc2(0xdb)]);function a178_0xd364(){const _0x923101=['appName','digest','menu','object','assets','string','some',']\x20must\x20be\x20a\x20URL\x20string.','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','sha256','3456574LdngEc','\x20in\x20menu\x20host\x20','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','not\x20HTTPS','validation','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','Would\x20update\x20shared\x20assets\x20for\x20','resources[','10WfPran','map','1030692ZoLbrR','18gCxTLY','test','vipDeploy','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','2494746SsVtbv','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20','2169441SYYmZX','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','stringify','update','hex','has','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','apiError','Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','enableOpenApi','nextExtend','\x20must\x20be\x20a\x20JSON\x20array.','expected-hash','Unknown\x20app.extend\x20fields:\x20','filter','731625tZCdeR','POST','Updated\x20shared\x20resources\x20for\x20','136MCjVcO','entries','write','852486rbaYdm','app.extend.assets','str','.\x20Refusing\x20update.','verified\x20app.extend','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','directDbEnabled','expectedHash','directDbId','join','\x20contains\x20invalid\x20JSON.','extend','At\x20least\x20one\x20resource\x20URL\x20is\x20required.','appCode','isArray','parse','before','346717JMhEou','length','appPublishStatus','enableAutoSync','subapp-assets-update','app.extend','/smartapi/app/update','trim','size','cookie','resources','unchanged','1uepBpa','skinColor',';\x20independent\x20deployment\x20not\x20verified.'];a178_0xd364=function(){return _0x923101;};return a178_0xd364();}function parseObject(_0x1d703a,_0x5db873){const _0x5c0ec1=a178_0x114fc2;let _0x245f80=_0x1d703a;if(typeof _0x1d703a===_0x5c0ec1(0xfa))try{_0x245f80=JSON[_0x5c0ec1(0xe4)](_0x1d703a);}catch{throw CliErrors[_0x5c0ec1(0xb2)](_0x5db873+_0x5c0ec1(0xdf));}if(!_0x245f80||typeof _0x245f80!==_0x5c0ec1(0xf8)||Array['isArray'](_0x245f80))throw CliErrors[_0x5c0ec1(0xb2)](_0x5db873+'\x20must\x20be\x20a\x20JSON\x20object.');return _0x245f80;}function a178_0x2666(_0x5333da,_0x12f7c1){_0x5333da=_0x5333da-0xb2;const _0xd3649c=a178_0xd364();let _0x2666f5=_0xd3649c[_0x5333da];return _0x2666f5;}function parseArray(_0x21aa2a,_0x54f671){const _0x1bb00a=a178_0x114fc2;let _0x405f16;try{_0x405f16=JSON[_0x1bb00a(0xe4)](_0x21aa2a);}catch{throw CliErrors[_0x1bb00a(0xb2)](_0x54f671+'\x20contains\x20invalid\x20JSON.');}if(!Array['isArray'](_0x405f16))throw CliErrors[_0x1bb00a(0xb2)](_0x54f671+_0x1bb00a(0xcb));return _0x405f16[_0x1bb00a(0xb7)]((_0xc63dd3,_0x15b126)=>parseObject(_0xc63dd3,_0x54f671+'['+_0x15b126+']'));}function validateResources(_0x270339){const _0x37c270=a178_0x114fc2;if(_0x270339[_0x37c270(0xe7)]===0x0)throw CliErrors[_0x37c270(0xb2)](_0x37c270(0xe1));for(const [_0x50e8ba,_0x2f02a8]of _0x270339[_0x37c270(0xd3)]()){if(typeof _0x2f02a8!==_0x37c270(0xfa))throw CliErrors[_0x37c270(0xb2)](_0x37c270(0xb5)+_0x50e8ba+_0x37c270(0xfc));try{if(new URL(_0x2f02a8)['protocol']!=='https:')throw new Error(_0x37c270(0x102));}catch{throw CliErrors['validation'](_0x37c270(0xb5)+_0x50e8ba+']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.');}}if(new Set(_0x270339)[_0x37c270(0xee)]!==_0x270339['length']||!_0x270339[_0x37c270(0xfb)](_0x136f62=>/\.m?js(?:[?#]|$)/i['test'](_0x136f62)))throw CliErrors[_0x37c270(0xb2)]('Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.');return _0x270339;}function prepare(_0x1bce7f,_0x4ad892,_0x5e568c){const _0x211436=a178_0x114fc2;if(!Number['isSafeInteger'](_0x1bce7f['id'])||(_0x1bce7f['id']??0x0)<=0x0||typeof _0x1bce7f['appPublishStatus']!==_0x211436(0xfa)||!_0x1bce7f[_0x211436(0xe8)])throw CliErrors[_0x211436(0xb2)](_0x211436(0xb3));const _0x266cc4=parseObject(_0x1bce7f[_0x211436(0xe0)],_0x211436(0xeb)),_0x5b59cd=Object['keys'](_0x266cc4)[_0x211436(0xce)](_0x447a5f=>!KNOWN_EXTEND_KEYS[_0x211436(0xc5)](_0x447a5f));if(_0x5b59cd['length'])throw CliErrors[_0x211436(0xb2)](_0x211436(0xcd)+_0x5b59cd[_0x211436(0xde)](',\x20')+_0x211436(0xd8));if(typeof _0x266cc4[_0x211436(0xf9)]!==_0x211436(0xfa))throw CliErrors[_0x211436(0xb2)](_0x211436(0xc1));const _0x2f2089=parseArray(_0x266cc4[_0x211436(0xf9)],_0x211436(0xd6)),_0x13e826=_0x2f2089[_0x211436(0xce)](_0x5cdac4=>_0x5cdac4[_0x211436(0xf5)]===_0x4ad892);if(_0x13e826[_0x211436(0xe7)]!==0x1)throw CliErrors[_0x211436(0xb2)](_0x211436(0xbf)+_0x4ad892+';\x20found\x20'+_0x13e826[_0x211436(0xe7)]+'.');const _0x41fa31=_0x13e826[0x0];if(typeof _0x41fa31['resources']!==_0x211436(0xfa))throw CliErrors[_0x211436(0xb2)](_0x211436(0xfd));let _0x2c09e9;try{_0x2c09e9=JSON['parse'](_0x41fa31[_0x211436(0xf0)]);}catch{throw CliErrors[_0x211436(0xb2)](_0x211436(0xbe));}if(!Array[_0x211436(0xe3)](_0x2c09e9)||_0x2c09e9[_0x211436(0xfb)](_0x26cb10=>typeof _0x26cb10!==_0x211436(0xfa)))throw CliErrors[_0x211436(0xb2)](_0x211436(0xc6));const _0x1cbeb5=_0x2f2089[_0x211436(0xb7)](_0x398877=>_0x398877===_0x41fa31?{..._0x398877,'resources':JSON['stringify'](_0x5e568c)}:_0x398877),_0x179737={..._0x266cc4,'assets':JSON[_0x211436(0xc2)](_0x1cbeb5)},_0x161e3f=createHash(_0x211436(0xfe))[_0x211436(0xc3)](JSON['stringify']({'appCode':_0x1bce7f[_0x211436(0xe2)],'id':_0x1bce7f['id'],'appPublishStatus':_0x1bce7f[_0x211436(0xe8)],'extend':_0x266cc4,'appName':_0x4ad892,'resources':_0x5e568c}))[_0x211436(0xf6)](_0x211436(0xc4));return{'before':_0x2c09e9,'nextExtend':_0x179737,'expectedHash':_0x161e3f,'unchanged':isDeepStrictEqual(_0x2c09e9,_0x5e568c)};}function flags(_0x37e35f){const _0x2edfea=a178_0x114fc2,{appCode:_0x3b333e,appName:_0x2706ee}=getSubappSelector(_0x37e35f),_0x4b876a=_0x37e35f[_0x2edfea(0xd7)](_0x2edfea(0xf0))[_0x2edfea(0xed)]();if(!_0x4b876a)throw CliErrors['validation']('--resources\x20is\x20required.');let _0x42e33e;try{_0x42e33e=JSON['parse'](_0x4b876a);}catch{throw CliErrors[_0x2edfea(0xb2)](_0x2edfea(0x101));}if(!Array[_0x2edfea(0xe3)](_0x42e33e))throw CliErrors['validation']('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');return{'appCode':_0x3b333e,'appName':_0x2706ee,'resources':validateResources(_0x42e33e)};}export const menuSubappAssetsUpdate={'service':a178_0x114fc2(0xf7),'command':a178_0x114fc2(0xea),'description':a178_0x114fc2(0xc8),'risk':a178_0x114fc2(0xd4),'strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a178_0x114fc2(0xf0),'type':'string','required':!![],'description':'JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs'},{'name':a178_0x114fc2(0xcc),'type':'string','description':'Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes'}],async 'validate'(_0x5f54a2){flags(_0x5f54a2);},async 'dryRun'(_0x16d44a){const _0x314494=a178_0x114fc2,{appCode:_0x5554aa,appName:_0x4f67f9,resources:_0x554bfe}=flags(_0x16d44a),_0x1d7885=await getSmartAppRecord(_0x5554aa,_0x16d44a['cookie']),_0x530157=prepare(_0x1d7885,_0x4f67f9,_0x554bfe);return{'method':_0x314494(0xd0),'url':_0x314494(0xec),'body':{'preview':{'appCode':_0x5554aa,'appName':_0x4f67f9,'before':_0x530157[_0x314494(0xe5)],'after':_0x554bfe,'expectedHash':_0x530157[_0x314494(0xdc)],'unchanged':_0x530157[_0x314494(0xf1)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x530157['unchanged']?'Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.':_0x314494(0xb4)+_0x4f67f9+'.'};},async 'execute'(_0xc45570){const _0x39f03d=a178_0x114fc2,{appCode:_0x3f2370,appName:_0x4556a4,resources:_0x1bcb72}=flags(_0xc45570),_0x4de72a=_0xc45570[_0x39f03d(0xd7)](_0x39f03d(0xcc))[_0x39f03d(0xed)]();if(!/^[a-f0-9]{64}$/i[_0x39f03d(0xba)](_0x4de72a))throw CliErrors['validation'](_0x39f03d(0xbc));const _0x86b4e7=await getSmartAppRecord(_0x3f2370,_0xc45570[_0x39f03d(0xef)]),_0x1802ce=prepare(_0x86b4e7,_0x4556a4,_0x1bcb72);if(_0x4de72a!==_0x1802ce[_0x39f03d(0xdc)])throw CliErrors[_0x39f03d(0xb2)]('App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.');if(_0x1802ce[_0x39f03d(0xf1)])return{'ok':!![],'data':{'appCode':_0x3f2370,'appName':_0x4556a4,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x39f03d(0xda)};await updateSmartAppRecord({'id':_0x86b4e7['id'],'appCode':_0x3f2370,'appPublishStatus':_0x86b4e7[_0x39f03d(0xe8)],'extend':_0x1802ce['nextExtend']},_0xc45570[_0x39f03d(0xef)]);const _0x110455=await getSmartAppRecord(_0x3f2370,_0xc45570[_0x39f03d(0xef)]),_0x19f46e=parseObject(_0x110455[_0x39f03d(0xe0)],_0x39f03d(0xd9));if(_0x110455['id']!==_0x86b4e7['id']||_0x110455[_0x39f03d(0xe8)]!==_0x86b4e7[_0x39f03d(0xe8)]||!isDeepStrictEqual(_0x19f46e,_0x1802ce[_0x39f03d(0xca)]))throw CliErrors[_0x39f03d(0xc7)]('App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.');return{'ok':!![],'data':{'appCode':_0x3f2370,'appName':_0x4556a4,'updated':!![],'resources':_0x1bcb72,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x39f03d(0xd1)+_0x4556a4+_0x39f03d(0x100)+_0x3f2370+_0x39f03d(0xf4)};}};
@@ -1 +1 @@
1
- const a179_0x161e46=a179_0x471a;(function(_0x3558f0,_0x3a00eb){const _0x34073a=a179_0x471a,_0x560ff2=_0x3558f0();while(!![]){try{const _0x539234=parseInt(_0x34073a(0xbb))/0x1+-parseInt(_0x34073a(0xa5))/0x2+parseInt(_0x34073a(0xdf))/0x3+parseInt(_0x34073a(0xe3))/0x4+parseInt(_0x34073a(0xb3))/0x5*(-parseInt(_0x34073a(0xbe))/0x6)+parseInt(_0x34073a(0xe6))/0x7+-parseInt(_0x34073a(0xae))/0x8;if(_0x539234===_0x3a00eb)break;else _0x560ff2['push'](_0x560ff2['shift']());}catch(_0x517d99){_0x560ff2['push'](_0x560ff2['shift']());}}}(a179_0x343d,0x21402));import a179_0x1eba5b from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';function a179_0x343d(){const _0x300158=['cssUrl','flag','\x20local\x20microfrontend\x20menu(s).','message','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','validation','gray','write','368022LLPhTc','localPages','trim','rawFlags','544608FCHoNM','\x20created.','Online\x20menu\x20list\x20fetched','302372qwmqzd','onlineMenuList','length','sync','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','menu','skipped','Fetching\x20online\x20menu\x20list...','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','\x20\x20Create\x20','315630zkvRmA','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','\x20\x20✓\x20Selected:\x20','selectedAppName','\x20created,\x20','jsUrl','\x20menu(s)...','appCode','\x20menu(s)\x20created','216264GyvuoG','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','cookie','appcode','\x20failed.','990rBaQLh','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','filter','\x20page(s)','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','yellow','Created\x20','87726UWcoHO','split','cyan','2082enwfYK','string','Menu\x20sync\x20completed:\x20','Register\x20local\x20pages\x20as\x20platform\x20menus','map','created','\x20menu(s)\x20with\x20JS:\x20','onlinePaths','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','str','size','failed','Menu\x20creation\x20failed','paths','\x20\x20Cancelled.','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','yes','appName','Creating\x20','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','\x20and\x20CSS:\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','\x20menu(s)'];a179_0x343d=function(){return _0x300158;};return a179_0x343d();}import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a179_0x471a(_0x4b63c6,_0x287501){_0x4b63c6=_0x4b63c6-0xa4;const _0x343dfe=a179_0x343d();let _0x471ab0=_0x343dfe[_0x4b63c6];return _0x471ab0;}import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':a179_0x161e46(0xeb),'command':a179_0x161e46(0xe9),'description':a179_0x161e46(0xc1),'risk':a179_0x161e46(0xde),'flags':[{'name':'params','type':a179_0x161e46(0xbf),'description':a179_0x161e46(0xaf)+a179_0x161e46(0xd1)},{'name':a179_0x161e46(0xcb),'type':'string','description':a179_0x161e46(0xd5)},{'name':a179_0x161e46(0xce),'type':'boolean','description':a179_0x161e46(0xb5)}],async 'dryRun'(_0x4c716a){const _0x472a52=a179_0x161e46;ensureRunnableContext(_0x4c716a[_0x472a52(0xe2)],_0x4c716a[_0x472a52(0xa8)]);const _0x57a3b2=await runMenuSyncCore(_0x4c716a[_0x472a52(0xac)],_0x4c716a[_0x472a52(0xb0)],parsePaths(_0x4c716a[_0x472a52(0xc7)](_0x472a52(0xcb))),_0x4c716a[_0x472a52(0xc7)]('params'),{'dryRun':!![]});return{'method':'POST','url':'/smartapi/menu/create','body':_0x57a3b2,'description':_0x57a3b2[_0x472a52(0xec)]?_0x472a52(0xdb):'Would\x20create\x20'+_0x57a3b2['targetPages']['length']+_0x472a52(0xd9)};},async 'execute'(_0x4d4de7){const _0x570d89=a179_0x161e46;ensureRunnableContext(_0x4d4de7['rawFlags'],_0x4d4de7[_0x570d89(0xa8)]);const _0x5d008e=_0x4d4de7[_0x570d89(0xd8)]('yes'),_0x138945=_0x4d4de7[_0x570d89(0xc7)]('params'),_0x1738cd=parsePaths(_0x4d4de7[_0x570d89(0xc7)](_0x570d89(0xcb))),_0x5ceb66=parseMenuSyncParams(_0x138945);if(_0x5d008e){const _0x28532b=await runMenuSyncCore(_0x4d4de7[_0x570d89(0xac)],_0x4d4de7[_0x570d89(0xb0)],_0x1738cd,_0x138945);if(_0x28532b[_0x570d89(0xec)]){const _0x4c741f=getLocalPages();_0x4c741f[_0x570d89(0xe8)]===0x0?writeCliSideChannelLine(_0x570d89(0xc6)):writeCliSideChannelLine(_0x570d89(0xcd));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x28532b['created']+_0x570d89(0xad));return{'ok':!![],'data':_0x28532b,'message':_0x28532b['skipped']?'Menu\x20sync\x20skipped':_0x570d89(0xc0)+_0x28532b['created']+_0x570d89(0xe4)};}if(_0x1738cd['length']>0x0)throw CliErrors[_0x570d89(0xdc)](_0x570d89(0xee),_0x570d89(0xea));if(!isInteractive()&&_0x138945)throw CliErrors[_0x570d89(0xdc)](_0x570d89(0xb4),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');requireInteractive(),writeCliSideChannelLine(_0x570d89(0xa6));const _0x5d7c35=startSpinner(_0x570d89(0xed));let _0x1c9492,_0x28a845,_0x3f2a36;try{const _0x58d54d=await fetchMenuData(_0x4d4de7[_0x570d89(0xac)],_0x4d4de7['cookie']);_0x1c9492=_0x58d54d[_0x570d89(0xe0)],_0x28a845=_0x58d54d[_0x570d89(0xc5)],_0x3f2a36=_0x58d54d[_0x570d89(0xe7)],stopSpinner(_0x5d7c35,_0x570d89(0xe5),!![]);}catch(_0x5a29d9){stopSpinner(_0x5d7c35,_0x570d89(0xd4),![]);throw CliErrors[_0x570d89(0xdc)](_0x5a29d9 instanceof Error?_0x5a29d9[_0x570d89(0xda)]:_0x570d89(0xd4));}if(_0x1c9492[_0x570d89(0xe8)]===0x0)return writeCliSideChannelLine(a179_0x1eba5b[_0x570d89(0xb9)](_0x570d89(0xd2))),{'ok':!![]};const _0x3bc086=buildCompareRows(_0x1c9492,_0x28a845);writeCliSideChannelLine(renderCompareTable(_0x3bc086)),writeCliSideChannelLine('');const _0x3ec33d=await selectPages(_0x1c9492,_0x28a845);writeCliSideChannelLine(''),writeCliSideChannelLine(a179_0x1eba5b[_0x570d89(0xbd)](_0x570d89(0xa7)+_0x3ec33d[_0x570d89(0xe8)]+_0x570d89(0xb7)));const _0x5466d9=_0x5ceb66[_0x570d89(0xaa)]&&_0x5ceb66[_0x570d89(0xd7)];if(!_0x5466d9){writeCliSideChannelLine(renderSyncSummary(_0x3ec33d,_0x28a845[_0x570d89(0xc8)]>0x0));const _0x3ee419=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x3ee419)return writeCliSideChannelLine(a179_0x1eba5b[_0x570d89(0xdd)](_0x570d89(0xcc))),{'ok':!![]};}let _0x507c2c=_0x5ceb66['jsUrl'],_0x3eceaf=_0x5ceb66['cssUrl'];!_0x507c2c&&!_0x5ceb66[_0x570d89(0xcf)]&&(_0x507c2c=await askJsUrl());!_0x3eceaf&&!_0x5ceb66[_0x570d89(0xcf)]&&(_0x3eceaf=await askCssUrl());const _0x3a3227=await askConfirm(_0x5ceb66[_0x570d89(0xcf)]?_0x570d89(0xa4)+_0x3ec33d['length']+'\x20menu(s)\x20bound\x20to\x20'+_0x5ceb66['appName']+'?':'\x20\x20Create\x20'+_0x3ec33d['length']+_0x570d89(0xc4)+_0x507c2c+_0x570d89(0xd3)+_0x3eceaf+'?');if(!_0x3a3227)return writeCliSideChannelLine(a179_0x1eba5b[_0x570d89(0xdd)](_0x570d89(0xcc))),{'ok':!![]};const _0x263729=[_0x507c2c,_0x3eceaf][_0x570d89(0xb6)](_0x1466eb=>Boolean(_0x1466eb));_0x5ceb66[_0x570d89(0xcf)]&&_0x263729[_0x570d89(0xe8)]===0x0&&await assertSharedResourcesConfigured(_0x4d4de7[_0x570d89(0xac)],_0x4d4de7[_0x570d89(0xb0)],_0x5ceb66[_0x570d89(0xcf)]);const _0x4a8e7f=startSpinner(_0x570d89(0xd0)+_0x3ec33d['length']+_0x570d89(0xab));try{const _0x2d2a22=_0x3ec33d[_0x570d89(0xc2)](_0x48b3fd=>resolvePage(_0x48b3fd,_0x5ceb66,_0x3f2a36)),_0xceb727=await doCreateMenus(_0x4d4de7['appCode'],_0x4d4de7[_0x570d89(0xb0)],_0x2d2a22,_0x263729,_0x5ceb66[_0x570d89(0xcf)]?{'appName':_0x5ceb66[_0x570d89(0xcf)]}:undefined);return stopSpinner(_0x4a8e7f,_0x570d89(0xba)+_0xceb727[_0x570d89(0xc3)]+_0x570d89(0xd6),!![]),{'ok':!![],'data':_0xceb727,'message':'Menu\x20sync\x20completed:\x20'+_0xceb727[_0x570d89(0xc3)]+_0x570d89(0xa9)+_0xceb727[_0x570d89(0xc9)]+_0x570d89(0xb2)};}catch(_0x538cc9){stopSpinner(_0x4a8e7f,_0x570d89(0xca),![]);throw CliErrors['validation'](_0x538cc9 instanceof Error?_0x538cc9[_0x570d89(0xda)]:_0x570d89(0xca));}}};function ensureRunnableContext(_0x3e95e7,_0x450f7c){const _0x3338b0=a179_0x161e46,_0x461e90=_0x3e95e7['appcode']?String(_0x3e95e7[_0x3338b0(0xb1)])[_0x3338b0(0xe1)]():'';if(!isInProject()&&!_0x450f7c&&!_0x461e90)throw CliErrors[_0x3338b0(0xdc)](_0x3338b0(0xb8)+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parsePaths(_0x2ad525){const _0x2d1954=a179_0x161e46;return[...new Set(_0x2ad525[_0x2d1954(0xbc)](',')[_0x2d1954(0xc2)](_0x38f94c=>_0x38f94c[_0x2d1954(0xe1)]())['filter'](Boolean))];}
1
+ const a179_0x1517b2=a179_0x2039;(function(_0x3feb0d,_0xf526bb){const _0x46df52=a179_0x2039,_0x2bf329=_0x3feb0d();while(!![]){try{const _0x2b808c=-parseInt(_0x46df52(0x15e))/0x1*(-parseInt(_0x46df52(0x17f))/0x2)+-parseInt(_0x46df52(0x155))/0x3*(-parseInt(_0x46df52(0x15f))/0x4)+parseInt(_0x46df52(0x195))/0x5+parseInt(_0x46df52(0x187))/0x6+-parseInt(_0x46df52(0x15c))/0x7*(parseInt(_0x46df52(0x151))/0x8)+parseInt(_0x46df52(0x188))/0x9*(-parseInt(_0x46df52(0x170))/0xa)+-parseInt(_0x46df52(0x175))/0xb*(-parseInt(_0x46df52(0x197))/0xc);if(_0x2b808c===_0xf526bb)break;else _0x2bf329['push'](_0x2bf329['shift']());}catch(_0x5a4cd5){_0x2bf329['push'](_0x2bf329['shift']());}}}(a179_0x5bdb,0x1f1ee));import a179_0x3915cf from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';function a179_0x2039(_0x4a9c3e,_0x158481){_0x4a9c3e=_0x4a9c3e-0x150;const _0x5bdba7=a179_0x5bdb();let _0x2039e2=_0x5bdba7[_0x4a9c3e];return _0x2039e2;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':a179_0x1517b2(0x153),'command':a179_0x1517b2(0x179),'description':a179_0x1517b2(0x167),'risk':a179_0x1517b2(0x17c),'flags':[{'name':a179_0x1517b2(0x16c),'type':'string','description':a179_0x1517b2(0x198)+'JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.'},{'name':'paths','type':a179_0x1517b2(0x18a),'description':a179_0x1517b2(0x178)},{'name':'yes','type':a179_0x1517b2(0x19d),'description':a179_0x1517b2(0x174)}],async 'dryRun'(_0x118ad2){const _0x265191=a179_0x1517b2;ensureRunnableContext(_0x118ad2[_0x265191(0x173)],_0x118ad2[_0x265191(0x185)]);const _0x10c3bf=await runMenuSyncCore(_0x118ad2[_0x265191(0x152)],_0x118ad2['cookie'],parsePaths(_0x118ad2[_0x265191(0x189)](_0x265191(0x177))),_0x118ad2['str'](_0x265191(0x16c)),{'dryRun':!![]});return{'method':_0x265191(0x157),'url':'/smartapi/menu/create','body':_0x10c3bf,'description':_0x10c3bf['skipped']?_0x265191(0x180):_0x265191(0x16d)+_0x10c3bf[_0x265191(0x16e)][_0x265191(0x162)]+_0x265191(0x17a)};},async 'execute'(_0x5357d2){const _0x31dacb=a179_0x1517b2;ensureRunnableContext(_0x5357d2[_0x31dacb(0x173)],_0x5357d2['selectedAppName']);const _0x30ac81=_0x5357d2[_0x31dacb(0x17b)](_0x31dacb(0x154)),_0x557675=_0x5357d2[_0x31dacb(0x189)]('params'),_0x21d442=parsePaths(_0x5357d2['str'](_0x31dacb(0x177))),_0x11b53e=parseMenuSyncParams(_0x557675);if(_0x30ac81){const _0x57f1aa=await runMenuSyncCore(_0x5357d2[_0x31dacb(0x152)],_0x5357d2[_0x31dacb(0x19b)],_0x21d442,_0x557675);if(_0x57f1aa[_0x31dacb(0x17e)]){const _0x6b6df7=getLocalPages();_0x6b6df7[_0x31dacb(0x162)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x31dacb(0x150));}else writeCliSideChannelLine(_0x31dacb(0x163)+_0x57f1aa['created']+_0x31dacb(0x172));return{'ok':!![],'data':_0x57f1aa,'message':_0x57f1aa[_0x31dacb(0x17e)]?_0x31dacb(0x16f):_0x31dacb(0x191)+_0x57f1aa[_0x31dacb(0x181)]+_0x31dacb(0x159)};}if(_0x21d442[_0x31dacb(0x162)]>0x0)throw CliErrors[_0x31dacb(0x192)](_0x31dacb(0x18c),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x557675)throw CliErrors[_0x31dacb(0x192)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x31dacb(0x176));requireInteractive(),writeCliSideChannelLine(_0x31dacb(0x18e));const _0x537045=startSpinner(_0x31dacb(0x199));let _0x1baf40,_0x34b6e7,_0x230f54;try{const _0x5c4686=await fetchMenuData(_0x5357d2[_0x31dacb(0x152)],_0x5357d2[_0x31dacb(0x19b)]);_0x1baf40=_0x5c4686[_0x31dacb(0x168)],_0x34b6e7=_0x5c4686[_0x31dacb(0x19c)],_0x230f54=_0x5c4686[_0x31dacb(0x15a)],stopSpinner(_0x537045,_0x31dacb(0x17d),!![]);}catch(_0x3877ea){stopSpinner(_0x537045,_0x31dacb(0x190),![]);throw CliErrors[_0x31dacb(0x192)](_0x3877ea instanceof Error?_0x3877ea['message']:_0x31dacb(0x190));}if(_0x1baf40[_0x31dacb(0x162)]===0x0)return writeCliSideChannelLine(a179_0x3915cf['yellow'](_0x31dacb(0x169))),{'ok':!![]};const _0x554921=buildCompareRows(_0x1baf40,_0x34b6e7);writeCliSideChannelLine(renderCompareTable(_0x554921)),writeCliSideChannelLine('');const _0x507d72=await selectPages(_0x1baf40,_0x34b6e7);writeCliSideChannelLine(''),writeCliSideChannelLine(a179_0x3915cf['cyan'](_0x31dacb(0x15b)+_0x507d72['length']+_0x31dacb(0x160)));const _0x485b9b=_0x11b53e[_0x31dacb(0x184)]&&_0x11b53e[_0x31dacb(0x156)];if(!_0x485b9b){writeCliSideChannelLine(renderSyncSummary(_0x507d72,_0x34b6e7[_0x31dacb(0x164)]>0x0));const _0x4da0a5=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x4da0a5)return writeCliSideChannelLine(a179_0x3915cf[_0x31dacb(0x18b)](_0x31dacb(0x171))),{'ok':!![]};}let _0x289ade=_0x11b53e[_0x31dacb(0x184)],_0xbf604f=_0x11b53e[_0x31dacb(0x156)];!_0x289ade&&!_0x11b53e[_0x31dacb(0x18f)]&&(_0x289ade=await askJsUrl());!_0xbf604f&&!_0x11b53e[_0x31dacb(0x18f)]&&(_0xbf604f=await askCssUrl());const _0xb322b2=await askConfirm(_0x11b53e[_0x31dacb(0x18f)]?_0x31dacb(0x158)+_0x507d72['length']+'\x20menu(s)\x20bound\x20to\x20'+_0x11b53e[_0x31dacb(0x18f)]+'?':'\x20\x20Create\x20'+_0x507d72[_0x31dacb(0x162)]+_0x31dacb(0x183)+_0x289ade+'\x20and\x20CSS:\x20'+_0xbf604f+'?');if(!_0xb322b2)return writeCliSideChannelLine(a179_0x3915cf[_0x31dacb(0x18b)](_0x31dacb(0x171))),{'ok':!![]};const _0x31ca29=[_0x289ade,_0xbf604f][_0x31dacb(0x194)](_0x2a5760=>Boolean(_0x2a5760));_0x11b53e['appName']&&_0x31ca29[_0x31dacb(0x162)]===0x0&&await assertSharedResourcesConfigured(_0x5357d2[_0x31dacb(0x152)],_0x5357d2[_0x31dacb(0x19b)],_0x11b53e[_0x31dacb(0x18f)]);const _0x1d11fb=startSpinner(_0x31dacb(0x186)+_0x507d72[_0x31dacb(0x162)]+_0x31dacb(0x19a));try{const _0x2ea2cc=_0x507d72[_0x31dacb(0x19e)](_0x3afb26=>resolvePage(_0x3afb26,_0x11b53e,_0x230f54)),_0xf0b48d=await doCreateMenus(_0x5357d2[_0x31dacb(0x152)],_0x5357d2['cookie'],_0x2ea2cc,_0x31ca29,_0x11b53e[_0x31dacb(0x18f)]?{'appName':_0x11b53e[_0x31dacb(0x18f)]}:undefined);return stopSpinner(_0x1d11fb,'Created\x20'+_0xf0b48d['created']+_0x31dacb(0x182),!![]),{'ok':!![],'data':_0xf0b48d,'message':_0x31dacb(0x191)+_0xf0b48d[_0x31dacb(0x181)]+_0x31dacb(0x15d)+_0xf0b48d[_0x31dacb(0x161)]+'\x20failed.'};}catch(_0x46f146){stopSpinner(_0x1d11fb,_0x31dacb(0x16a),![]);throw CliErrors[_0x31dacb(0x192)](_0x46f146 instanceof Error?_0x46f146[_0x31dacb(0x165)]:_0x31dacb(0x16a));}}};function ensureRunnableContext(_0x2c9843,_0x3e80c4){const _0x437b3c=a179_0x1517b2,_0x2a7912=_0x2c9843[_0x437b3c(0x18d)]?String(_0x2c9843[_0x437b3c(0x18d)])[_0x437b3c(0x16b)]():'';if(!isInProject()&&!_0x3e80c4&&!_0x2a7912)throw CliErrors[_0x437b3c(0x192)](_0x437b3c(0x193)+_0x437b3c(0x196));}function a179_0x5bdb(){const _0x455d8f=['Register\x20local\x20pages\x20as\x20platform\x20menus','localPages','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','Menu\x20creation\x20failed','trim','params','Would\x20create\x20','targetPages','Menu\x20sync\x20skipped','85010XtmHyH','\x20\x20Cancelled.','\x20menu(s)\x20created','rawFlags','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','594PdiSdx','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','paths','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','sync','\x20local\x20microfrontend\x20menu(s).','flag','write','Online\x20menu\x20list\x20fetched','skipped','4PJKFzJ','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','created','\x20menu(s)','\x20menu(s)\x20with\x20JS:\x20','jsUrl','selectedAppName','Creating\x20','357342zQoBGR','234pzCXwQ','str','string','gray','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','appcode','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','appName','Failed\x20to\x20fetch\x20online\x20menu\x20list','Menu\x20sync\x20completed:\x20','validation','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','filter','459265iyYfyl','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','32952WAyYae','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','Fetching\x20online\x20menu\x20list...','\x20menu(s)...','cookie','onlinePaths','boolean','map','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','1181176IGVeka','appCode','menu','yes','13551JshiVl','cssUrl','POST','\x20\x20Create\x20','\x20created.','onlineMenuList','\x20\x20✓\x20Selected:\x20','7ZSCXhk','\x20created,\x20','28211SRUfoL','124CnYTEq','\x20page(s)','failed','length','✓\x20Menu\x20sync\x20completed:\x20','size','message','split'];a179_0x5bdb=function(){return _0x455d8f;};return a179_0x5bdb();}function parsePaths(_0x381a31){const _0x3057b1=a179_0x1517b2;return[...new Set(_0x381a31[_0x3057b1(0x166)](',')['map'](_0x59f2b2=>_0x59f2b2['trim']())[_0x3057b1(0x194)](Boolean))];}
@@ -1 +1 @@
1
- const a180_0x1f637a=a180_0x5c13;(function(_0x48b7c7,_0x5b1859){const _0x1a08fa=a180_0x5c13,_0xc1c05b=_0x48b7c7();while(!![]){try{const _0x1b49af=-parseInt(_0x1a08fa(0x22c))/0x1+-parseInt(_0x1a08fa(0x1bc))/0x2+parseInt(_0x1a08fa(0x1b3))/0x3+parseInt(_0x1a08fa(0x206))/0x4*(parseInt(_0x1a08fa(0x222))/0x5)+-parseInt(_0x1a08fa(0x1f0))/0x6+-parseInt(_0x1a08fa(0x21c))/0x7*(parseInt(_0x1a08fa(0x1fa))/0x8)+parseInt(_0x1a08fa(0x1ff))/0x9;if(_0x1b49af===_0x5b1859)break;else _0xc1c05b['push'](_0xc1c05b['shift']());}catch(_0x111cd8){_0xc1c05b['push'](_0xc1c05b['shift']());}}}(a180_0x5aaf,0x343da));function a180_0x5aaf(){const _0x11d70a=['hash','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','/smartapi/menu/update','depth','\x20changed\x20unexpectedly.','expectedCount','boolean','childrenIds','isSafeInteger','\x20menu(s),\x20expected\x20','\x20menu(s);\x20skipped\x20','warnings','verification','menu_expected_count_mismatch','datasetCode','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','Menu\x20path\x20selector\x20not\x20found:\x20','url','modelType','label','Response\x20was\x20lost\x20for\x20menu\x20','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','visibility-update','expected-count','some','menu\x20list','number','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','resources','before','sort','flagMissing','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','parentId','pageId','str','1805556KpvURr','pageType','rabetbase\x20menu\x20list\x20--format\x20compress','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','requestedVisible','\x20menu(s);\x20skip\x20','message','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','update-recovery','resourcesValid','2120Yjqowr','validation','Final\x20menu\x20visibility\x20readback\x20failed.','appCode','\x20unchanged\x20menu(s).','6969006WpHfEx','expectVisible','set','map','childrenCount','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','68RlDAOQ','\x20updated,\x20','filter','datasetId','type','high-risk-write','POST','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','visible','plan','expect-visible','menu_selector_ambiguous','stringify','\x20visibility\x20update\x20could\x20not\x20be\x20verified','body','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','join','false','byId','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','6580zaGHIg','menus','menu_selector_not_found','Menu\x20','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','push','98435jwaNcy','length','beforeById','true','recovered','Selected\x20','\x20skipped,\x20','failed','update-menu-visibility','menuIds','387361EJmlQN','trim','update\x20menu\x20visibility','cookie','\x20must\x20be\x20true\x20or\x20false.','num','1182828rZelsh','get','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Requested\x20menu\x20visibility','path','string','plannedActions','Would\x20update\x20visibility\x20for\x20','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','703848DmbpNT','menu_verification_failed','has','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','isArray','menu-ids','code','paths','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','targets','updated','menu_state_drift','update','Menu\x20visibility\x20update\x20completed:\x20','verify\x20menu\x20visibility\x20update'];a180_0x5aaf=function(){return _0x11d70a;};return a180_0x5aaf();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a180_0x5c13(_0x4f82a2,_0x445fde){_0x4f82a2=_0x4f82a2-0x1af;const _0x5aaf94=a180_0x5aaf();let _0x5c13ae=_0x5aaf94[_0x4f82a2];return _0x5c13ae;}import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':a180_0x1f637a(0x1ce)}];export const menuVisibilityUpdate={'service':'menu','command':'visibility-update','description':a180_0x1f637a(0x21a),'risk':a180_0x1f637a(0x20b),'structuredErrors':!![],'flags':[{'name':a180_0x1f637a(0x1c2),'type':a180_0x1f637a(0x1b8),'description':a180_0x1f637a(0x220)},{'name':a180_0x1f637a(0x1c4),'type':a180_0x1f637a(0x1b8),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a180_0x1f637a(0x20f),'type':'boolean','required':!![],'description':a180_0x1f637a(0x1b6)},{'name':'expect-visible','type':a180_0x1f637a(0x1d2),'description':a180_0x1f637a(0x1db)},{'name':a180_0x1f637a(0x1e3),'type':a180_0x1f637a(0x1e6),'description':a180_0x1f637a(0x1c5)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x143d89){parseInput(_0x143d89),requireExplicitYes(_0x143d89);},async 'dryRun'(_0x1a7306){const _0x33990f=a180_0x1f637a,_0x3398a6=await buildPlan(_0x1a7306,!![]),_0x1ea7ba=_0x3398a6[_0x33990f(0x210)][_0x33990f(0x1b9)]?.[_0x33990f(0x223)]??0x0,_0x491680=_0x3398a6[_0x33990f(0x210)][_0x33990f(0x1c6)][_0x33990f(0x223)]-_0x1ea7ba;return menuDryRunResult(_0x3398a6[_0x33990f(0x210)],{'method':_0x33990f(0x20c),'url':_0x33990f(0x1ce),'body':{'updates':_0x3398a6['plan'][_0x33990f(0x1b9)]?.[_0x33990f(0x202)](_0x51e3b2=>_0x51e3b2[_0x33990f(0x215)])??[]},'description':_0x33990f(0x1ba)+_0x1ea7ba+_0x33990f(0x1f5)+_0x491680+_0x33990f(0x1fe)});},async 'execute'(_0x1cd43b){const _0x4ce22a=a180_0x1f637a;requireExplicitYes(_0x1cd43b);const _0xcb6199=await buildPlan(_0x1cd43b,![]);await recheckMutationSnapshot(_0x1cd43b,_0xcb6199[_0x4ce22a(0x210)],_0x4ce22a(0x1af));const _0x537135=[],_0x4289c5=[],_0x3a4e00=[];for(const _0xf9d12 of _0xcb6199[_0x4ce22a(0x210)][_0x4ce22a(0x1c6)]){if(_0xf9d12[_0x4ce22a(0x1e9)][_0x4ce22a(0x20f)]===_0xcb6199[_0x4ce22a(0x210)]['requestedVisible']){_0x537135['push']({'id':_0xf9d12['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x1cd43b['appCode'],_0x1cd43b['cookie'],{'id':_0xf9d12['id'],'visible':_0xcb6199[_0x4ce22a(0x210)][_0x4ce22a(0x1f4)]}),_0x537135[_0x4ce22a(0x221)]({'id':_0xf9d12['id'],'updated':!![],'skipped':![]});}catch(_0x2dd787){const _0x4cd82d=mapMenuApiError(_0x2dd787,'update\x20visibility\x20for',_0xf9d12['id']);if(isMenuResponseLoss(_0x2dd787)&&_0x4cd82d[_0x4ce22a(0x1c3)]!=='menu_permission_denied'){_0x3a4e00['push'](_0xf9d12['id']);continue;}_0x4289c5[_0x4ce22a(0x221)]({'id':_0xf9d12['id'],'stage':_0x4ce22a(0x1c9),'code':_0x4cd82d[_0x4ce22a(0x1c3)],'message':_0x4cd82d['message']});}}let _0x4e370e;try{_0x4e370e=await fetchMenuSnapshot(_0x1cd43b[_0x4ce22a(0x1fd)],_0x1cd43b[_0x4ce22a(0x1b0)]);}catch(_0x32a5e5){const _0x1ef263=describeMenuErrorCause(_0x32a5e5,_0x4ce22a(0x1cb)),_0x1aaf81=_0x3a4e00[_0x4ce22a(0x202)](_0x4475e2=>({'id':_0x4475e2,'stage':_0x4ce22a(0x1f8),'code':_0x4ce22a(0x1bd),'message':_0x4ce22a(0x1e0)+_0x4475e2+_0x4ce22a(0x1e1),'requestedStateConfirmed':![],'recovered':![]})),_0x525b25={'stage':_0x4ce22a(0x1d8),'code':'menu_verification_failed','message':_0x4ce22a(0x1fc),'targetIds':_0xcb6199[_0x4ce22a(0x210)][_0x4ce22a(0x1c6)]['map'](_0x4a5055=>_0x4a5055['id']),'requestedStateConfirmed':![],..._0x1ef263};throw menuFailure(asVerificationError(_0x32a5e5,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0xcb6199[_0x4ce22a(0x210)],{'stage':_0x4ce22a(0x1d8),'succeeded':_0x537135,'failedRecords':[..._0x4289c5,..._0x1aaf81,_0x525b25],'warnings':[_0x4ce22a(0x205)],'verification':{'status':_0x4ce22a(0x229),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x2a5d1a=[];for(const _0x17754b of _0x537135){const _0x43c042=Number(_0x17754b['id']),_0x49c4d6=_0xcb6199[_0x4ce22a(0x224)][_0x4ce22a(0x1b4)](_0x43c042),_0x31fd30=_0x4e370e['byId'][_0x4ce22a(0x1b4)](_0x43c042);try{verifyVisibilityUpdate(_0x49c4d6,_0x31fd30,_0xcb6199['plan'][_0x4ce22a(0x1f4)]);}catch(_0x2f4f07){const _0x484758=asVerificationError(_0x2f4f07,'Menu\x20'+_0x43c042+_0x4ce22a(0x214));_0x2a5d1a[_0x4ce22a(0x221)]({'id':_0x43c042,'stage':_0x4ce22a(0x1d8),'code':_0x484758[_0x4ce22a(0x1c3)],'message':_0x484758[_0x4ce22a(0x1f6)],'requestedStateConfirmed':![]});}}for(const _0x56ee2f of _0x3a4e00){const _0x2a9d52=_0xcb6199[_0x4ce22a(0x224)][_0x4ce22a(0x1b4)](_0x56ee2f),_0x171dc3=_0x4e370e[_0x4ce22a(0x219)][_0x4ce22a(0x1b4)](_0x56ee2f);try{verifyVisibilityUpdate(_0x2a9d52,_0x171dc3,_0xcb6199['plan'][_0x4ce22a(0x1f4)]),_0x537135[_0x4ce22a(0x221)]({'id':_0x56ee2f,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x43501f){const _0x31abe3=asVerificationError(_0x43501f,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x56ee2f+_0x4ce22a(0x1cd));_0x2a5d1a['push']({'id':_0x56ee2f,'stage':'update-recovery','code':_0x31abe3[_0x4ce22a(0x1c3)],'message':_0x31abe3['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x2a5d1a[_0x4ce22a(0x223)]>0x0){const _0x34da62=_0x2a5d1a[_0x4ce22a(0x202)](_0x4909db=>Number(_0x4909db['id'])),_0x14506c=_0x537135[_0x4ce22a(0x208)](_0x5eb946=>_0x5eb946[_0x4ce22a(0x226)]===!![])['length'],_0x1558c3=menuError(_0x4ce22a(0x1bd),_0x4ce22a(0x1bb)+_0x34da62[_0x4ce22a(0x217)](',\x20')+'.',_0x4ce22a(0x20d));throw menuFailure(_0x1558c3,_0xcb6199[_0x4ce22a(0x210)],{'stage':_0x4ce22a(0x1d8),'succeeded':_0x537135,'failedRecords':[..._0x4289c5,..._0x2a5d1a],'warnings':[_0x4ce22a(0x1e7)],'verification':{'status':_0x4ce22a(0x229),..._0x34da62[_0x4ce22a(0x223)]===0x1?{'targetId':_0x34da62[0x0]}:{'targetIds':_0x34da62},'recoveredCount':_0x14506c,'lookupCommand':_0x4ce22a(0x1f2)}});}const _0x1b3b20=_0x537135['filter'](_0x5d8030=>_0x5d8030[_0x4ce22a(0x1c7)]===!![])['length'],_0x2c4d59=_0x537135[_0x4ce22a(0x223)]-_0x1b3b20,_0xaf2ac4={..._0xcb6199[_0x4ce22a(0x210)],'succeeded':_0x537135,'failed':_0x4289c5,'warnings':_0x4289c5['length']>0x0?[..._0xcb6199[_0x4ce22a(0x210)][_0x4ce22a(0x1d7)],_0x4ce22a(0x1f7)]:_0xcb6199[_0x4ce22a(0x210)][_0x4ce22a(0x1d7)],'verification':{'checkedBy':_0x4ce22a(0x1e5),'snapshotHash':_0x4e370e[_0x4ce22a(0x1cc)],'matchesRequestedState':_0x4289c5[_0x4ce22a(0x223)]===0x0,'recoveredCount':_0x3a4e00[_0x4ce22a(0x223)]}};return{'ok':_0x4289c5['length']===0x0,'data':_0xaf2ac4,'message':_0x4289c5[_0x4ce22a(0x223)]===0x0?'Updated\x20visibility\x20for\x20'+_0x1b3b20+_0x4ce22a(0x1d6)+_0x2c4d59+_0x4ce22a(0x1fe):_0x4ce22a(0x1ca)+_0x1b3b20+_0x4ce22a(0x207)+_0x2c4d59+_0x4ce22a(0x228)+_0x4289c5['length']+'\x20failed.'};}};function parseInput(_0x309b8c){const _0x28dc60=a180_0x1f637a,_0x164805=parseMenuIds(_0x309b8c[_0x28dc60(0x1ef)]('menu-ids')),_0x3096b3=parseCsv(_0x309b8c[_0x28dc60(0x1ef)](_0x28dc60(0x1c4)));if(_0x164805[_0x28dc60(0x223)]===0x0&&_0x3096b3['length']===0x0)throw CliErrors['validation']('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x47f084=parseBooleanFlag(_0x309b8c,_0x28dc60(0x20f),!![]),_0x217a4b=parseBooleanFlag(_0x309b8c,_0x28dc60(0x211),![]);let _0x2041b7;if(hasFlag(_0x309b8c,'expected-count')){_0x2041b7=_0x309b8c[_0x28dc60(0x1b2)]('expected-count');if(!Number[_0x28dc60(0x1d4)](_0x2041b7)||_0x2041b7<0x0)throw CliErrors[_0x28dc60(0x1fb)](_0x28dc60(0x20e));}return{'menuIds':_0x164805,'paths':_0x3096b3,'visible':_0x47f084,'expectVisible':_0x217a4b,'expectedCount':_0x2041b7};}async function buildPlan(_0xbf6dec,_0x9e69){const _0x29c05a=a180_0x1f637a,_0x3cd18d=parseInput(_0xbf6dec),_0x1ef1c9=await fetchMutationSnapshot(_0xbf6dec,_0x29c05a(0x1af)),_0x4ed217=selectTargets(_0x1ef1c9[_0x29c05a(0x21d)],_0x3cd18d[_0x29c05a(0x22b)],_0x3cd18d[_0x29c05a(0x1c4)]);if(_0x3cd18d[_0x29c05a(0x1d1)]!==undefined&&_0x4ed217[_0x29c05a(0x223)]!==_0x3cd18d[_0x29c05a(0x1d1)])throw menuError(_0x29c05a(0x1d9),_0x29c05a(0x227)+_0x4ed217[_0x29c05a(0x223)]+_0x29c05a(0x1d5)+_0x3cd18d[_0x29c05a(0x1d1)]+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x3cd18d[_0x29c05a(0x200)]!==undefined){const _0xedfb57=_0x4ed217[_0x29c05a(0x208)](_0x4f00f3=>_0x4f00f3[_0x29c05a(0x20f)]!==_0x3cd18d[_0x29c05a(0x200)]);if(_0xedfb57[_0x29c05a(0x223)]>0x0)throw menuError(_0x29c05a(0x1c8),_0x29c05a(0x1b5)+_0xedfb57[_0x29c05a(0x202)](_0xb640ef=>_0xb640ef['id'])['join'](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x31776c=_0x4ed217[_0x29c05a(0x202)](_0x14507b=>({'id':_0x14507b['id'],'label':_0x14507b[_0x29c05a(0x1df)],'path':_0x14507b[_0x29c05a(0x1b7)],'before':{'visible':_0x14507b[_0x29c05a(0x20f)]},'after':{'visible':_0x3cd18d[_0x29c05a(0x20f)]}})),_0x28c702=_0x31776c[_0x29c05a(0x208)](_0x52f82d=>_0x52f82d['before'][_0x29c05a(0x20f)]!==_0x3cd18d['visible'])[_0x29c05a(0x202)](_0x1a5313=>({'stage':_0x29c05a(0x22a),'method':_0x29c05a(0x20c),'path':_0x29c05a(0x1ce),'body':{'appCode':_0xbf6dec[_0x29c05a(0x1fd)],'id':_0x1a5313['id'],'visible':_0x3cd18d[_0x29c05a(0x20f)]}})),_0x23d9f1=mutationResult({'operation':_0x29c05a(0x1e2),'selector':{'menuIds':_0x3cd18d['menuIds'],'paths':_0x3cd18d[_0x29c05a(0x1c4)]},'before':{'menus':_0x4ed217[_0x29c05a(0x202)](_0x318d50=>({'id':_0x318d50['id'],'path':_0x318d50[_0x29c05a(0x1b7)],'visible':_0x318d50['visible']}))},'after':{'menus':_0x4ed217[_0x29c05a(0x202)](_0x4c99b8=>({'id':_0x4c99b8['id'],'path':_0x4c99b8[_0x29c05a(0x1b7)],'visible':_0x3cd18d[_0x29c05a(0x20f)]}))},'dryRun':_0x9e69,'backend':[...BACKEND],'plannedActions':_0x28c702,'snapshotHash':_0x1ef1c9['hash'],'warnings':_0x28c702[_0x29c05a(0x223)]===0x0?[_0x29c05a(0x1f3)]:[]});return{'plan':{..._0x23d9f1,'requestedVisible':_0x3cd18d['visible'],'targets':_0x31776c},'beforeById':new Map(_0x4ed217[_0x29c05a(0x202)](_0x1dbcec=>[_0x1dbcec['id'],_0x1dbcec]))};}function selectTargets(_0x31264b,_0x15d188,_0x2ec998){const _0x5c53c6=a180_0x1f637a,_0x2584a4=new Map(_0x31264b[_0x5c53c6(0x202)](_0x39f744=>[_0x39f744['id'],_0x39f744])),_0x3636bf=new Map(),_0x3bac00=_0x15d188['filter'](_0xa3d0e4=>!_0x2584a4[_0x5c53c6(0x1be)](_0xa3d0e4));if(_0x3bac00['length']>0x0)throw menuError(_0x5c53c6(0x21e),'Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0x3bac00[_0x5c53c6(0x217)](',\x20')+'.',_0x5c53c6(0x1bf));for(const _0x4b71d9 of _0x15d188){_0x3636bf[_0x5c53c6(0x201)](_0x4b71d9,_0x2584a4['get'](_0x4b71d9));}for(const _0x5361da of _0x2ec998){const _0x357df7=_0x31264b[_0x5c53c6(0x208)](_0x15178c=>_0x15178c[_0x5c53c6(0x1b7)]===_0x5361da);if(_0x357df7[_0x5c53c6(0x223)]===0x0)throw menuError(_0x5c53c6(0x21e),_0x5c53c6(0x1dc)+JSON[_0x5c53c6(0x213)](_0x5361da)+'.',_0x5c53c6(0x216));if(_0x357df7[_0x5c53c6(0x223)]>0x1)throw menuError(_0x5c53c6(0x212),_0x5c53c6(0x21b)+JSON[_0x5c53c6(0x213)](_0x5361da)+'.',_0x5c53c6(0x1c0)+_0x357df7[_0x5c53c6(0x202)](_0x2cebb6=>_0x2cebb6['id'])[_0x5c53c6(0x217)](',\x20')+'.');const _0x3d5336=_0x357df7[0x0];_0x3636bf[_0x5c53c6(0x201)](_0x3d5336['id'],_0x3d5336);}return[..._0x3636bf['values']()];}function parseMenuIds(_0x177b25){const _0x2189ee=a180_0x1f637a,_0x52f43f=parseCsv(_0x177b25),_0x4ca8ad=_0x52f43f[_0x2189ee(0x202)](Number);if(_0x4ca8ad[_0x2189ee(0x1e4)](_0x508bc9=>!Number[_0x2189ee(0x1d4)](_0x508bc9)||_0x508bc9<=0x0))throw CliErrors['validation'](_0x2189ee(0x204));return[...new Set(_0x4ca8ad)];}function parseCsv(_0x590ab3){const _0x4e3b36=a180_0x1f637a;return[...new Set(_0x590ab3['split'](',')[_0x4e3b36(0x202)](_0x414bc7=>_0x414bc7[_0x4e3b36(0x22d)]())['filter'](Boolean))];}function parseBooleanFlag(_0xf7f892,_0x413f92,_0x2221d3){const _0x2a336a=a180_0x1f637a;if(!hasFlag(_0xf7f892,_0x413f92)){if(_0x2221d3)throw CliErrors[_0x2a336a(0x1eb)](_0x413f92);return undefined;}const _0x7f07ba=_0xf7f892['rawFlags'][_0x413f92];if(_0x7f07ba===!![]||_0x7f07ba===![])return _0x7f07ba;if(_0x7f07ba===_0x2a336a(0x225))return!![];if(_0x7f07ba===_0x2a336a(0x218))return![];throw CliErrors[_0x2a336a(0x1fb)]('--'+_0x413f92+_0x2a336a(0x1b1));}function verifyVisibilityUpdate(_0x396a7d,_0xa156d6,_0x51f4fe){const _0x439550=a180_0x1f637a;assertVerified(!!_0xa156d6,'Menu\x20'+_0x396a7d['id']+_0x439550(0x1ec)),assertVerified(_0xa156d6[_0x439550(0x20f)]===_0x51f4fe,_0x439550(0x21f)+_0x396a7d['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x1b280f=[['id',_0xa156d6['id'],_0x396a7d['id']],['parentId',_0xa156d6['parentId'],_0x396a7d[_0x439550(0x1ed)]],['depth',_0xa156d6[_0x439550(0x1cf)],_0x396a7d['depth']],['label',_0xa156d6[_0x439550(0x1df)],_0x396a7d['label']],[_0x439550(0x1b7),_0xa156d6[_0x439550(0x1b7)],_0x396a7d[_0x439550(0x1b7)]],[_0x439550(0x1dd),_0xa156d6[_0x439550(0x1dd)],_0x396a7d[_0x439550(0x1dd)]],[_0x439550(0x20a),_0xa156d6[_0x439550(0x20a)],_0x396a7d[_0x439550(0x20a)]],['sort',_0xa156d6[_0x439550(0x1ea)],_0x396a7d[_0x439550(0x1ea)]],[_0x439550(0x1e8),_0xa156d6[_0x439550(0x1e8)],_0x396a7d[_0x439550(0x1e8)]],[_0x439550(0x1f9),_0xa156d6[_0x439550(0x1f9)],_0x396a7d[_0x439550(0x1f9)]],[_0x439550(0x1d3),_0xa156d6[_0x439550(0x1d3)],_0x396a7d[_0x439550(0x1d3)]],[_0x439550(0x203),_0xa156d6[_0x439550(0x203)],_0x396a7d['childrenCount']],['pageId',_0xa156d6[_0x439550(0x1ee)],_0x396a7d['pageId']],[_0x439550(0x1f1),_0xa156d6['pageType'],_0x396a7d[_0x439550(0x1f1)]],[_0x439550(0x1de),_0xa156d6[_0x439550(0x1de)],_0x396a7d[_0x439550(0x1de)]],['datasetId',_0xa156d6[_0x439550(0x209)],_0x396a7d['datasetId']],[_0x439550(0x1da),_0xa156d6[_0x439550(0x1da)],_0x396a7d[_0x439550(0x1da)]]];for(const [_0x403a11,_0xad15c5,_0x242b73]of _0x1b280f){assertVerified(sameValue(_0xad15c5,_0x242b73),_0x439550(0x21f)+_0x396a7d['id']+'\x20'+_0x403a11+_0x439550(0x1d0));}}function sameValue(_0x2bacb5,_0x17fb72){const _0xcb5378=a180_0x1f637a;if(Array['isArray'](_0x2bacb5)||Array[_0xcb5378(0x1c1)](_0x17fb72))return JSON[_0xcb5378(0x213)](_0x2bacb5)===JSON['stringify'](_0x17fb72);return _0x2bacb5===_0x17fb72;}
1
+ const a180_0x5141ef=a180_0x42a8;(function(_0x275d3b,_0x2cb11f){const _0x551889=a180_0x42a8,_0x4043a9=_0x275d3b();while(!![]){try{const _0x400865=parseInt(_0x551889(0x1b3))/0x1+-parseInt(_0x551889(0x1d0))/0x2*(-parseInt(_0x551889(0x1ac))/0x3)+parseInt(_0x551889(0x1f3))/0x4+-parseInt(_0x551889(0x1f9))/0x5+parseInt(_0x551889(0x1b2))/0x6*(parseInt(_0x551889(0x1ee))/0x7)+parseInt(_0x551889(0x1ba))/0x8*(-parseInt(_0x551889(0x1a2))/0x9)+-parseInt(_0x551889(0x1a8))/0xa;if(_0x400865===_0x2cb11f)break;else _0x4043a9['push'](_0x4043a9['shift']());}catch(_0x59458c){_0x4043a9['push'](_0x4043a9['shift']());}}}(a180_0x4c97,0x4d612));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a180_0x4c97(){const _0x7a2df4=['push','split','cookie','menu-ids','visibility-update','depth','set','string','verification','stringify','validation','\x20must\x20be\x20true\x20or\x20false.','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','childrenCount','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','num','verify\x20menu\x20visibility\x20update','sort','expected-count','menu_state_drift','isArray','boolean','parentId','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','join','\x20visibility\x20update\x20could\x20not\x20be\x20verified','1372epBEtx','Selected\x20','paths','\x20menu(s),\x20expected\x20','update','1737380XdtpCS','datasetId','pageType','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','modelType','397195SvpjNK','plannedActions','menu_verification_failed','Response\x20was\x20lost\x20for\x20menu\x20','hash','trim','failed','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','Menu\x20path\x20selector\x20not\x20found:\x20','filter','menu','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','\x20menu(s);\x20skip\x20','beforeById','/smartapi/menu/update','menu_selector_ambiguous','menu_selector_not_found','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','url','update\x20menu\x20visibility','appCode','Response\x20was\x20lost\x20and\x20menu\x20','expectVisible','pageId','before','plan','expectedCount','Menu\x20id\x20selector(s)\x20not\x20found:\x20','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','message','warnings','number','label','body','byId','datasetCode','rabetbase\x20menu\x20list\x20--format\x20compress','menu_permission_denied','3195GeRmHY','resources','Menu\x20visibility\x20update\x20completed:\x20','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','menuIds','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','6395530gKxOzb','resourcesValid','requestedVisible','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','84666BwreoI','visible','\x20unchanged\x20menu(s).','has','path','update-recovery','13206QHzqYP','310423FnLvoS','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','expect-visible','\x20skipped,\x20','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','targets','Updated\x20visibility\x20for\x20','4432oPWdnB','true','Would\x20update\x20visibility\x20for\x20','\x20updated,\x20','update-menu-visibility','write','recovered','map','update\x20visibility\x20for','POST','childrenIds','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','type','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','some','updated','length','\x20menu(s);\x20skipped\x20','flagMissing','code','Menu\x20','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','4lIbzjj','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','get','false'];a180_0x4c97=function(){return _0x7a2df4;};return a180_0x4c97();}import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':a180_0x5141ef(0x207)}];export const menuVisibilityUpdate={'service':a180_0x5141ef(0x203),'command':a180_0x5141ef(0x1d8),'description':a180_0x5141ef(0x198),'risk':a180_0x5141ef(0x1bf),'structuredErrors':!![],'flags':[{'name':a180_0x5141ef(0x1d7),'type':a180_0x5141ef(0x1db),'description':a180_0x5141ef(0x1e0)},{'name':a180_0x5141ef(0x1f0),'type':a180_0x5141ef(0x1db),'description':a180_0x5141ef(0x1eb)},{'name':a180_0x5141ef(0x1ad),'type':'boolean','required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a180_0x5141ef(0x1b5),'type':a180_0x5141ef(0x1e9),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a180_0x5141ef(0x1e6),'type':a180_0x5141ef(0x19b),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5155f9){parseInput(_0x5155f9);},async 'dryRun'(_0x403514){const _0x8c50ac=a180_0x5141ef,_0x343811=await buildPlan(_0x403514,!![]),_0x2f880d=_0x343811['plan'][_0x8c50ac(0x1fa)]?.[_0x8c50ac(0x1ca)]??0x0,_0x1c42eb=_0x343811[_0x8c50ac(0x195)][_0x8c50ac(0x1b8)][_0x8c50ac(0x1ca)]-_0x2f880d;return menuDryRunResult(_0x343811[_0x8c50ac(0x195)],{'method':_0x8c50ac(0x1c3),'url':_0x8c50ac(0x207),'body':{'updates':_0x343811[_0x8c50ac(0x195)]['plannedActions']?.[_0x8c50ac(0x1c1)](_0x5907f1=>_0x5907f1[_0x8c50ac(0x19d)])??[]},'description':_0x8c50ac(0x1bc)+_0x2f880d+_0x8c50ac(0x205)+_0x1c42eb+_0x8c50ac(0x1ae)});},async 'execute'(_0x25781a){const _0x59fe3f=a180_0x5141ef,_0x2b7497=await buildPlan(_0x25781a,![]);await recheckMutationSnapshot(_0x25781a,_0x2b7497[_0x59fe3f(0x195)],'update\x20menu\x20visibility');const _0x7d88ac=[],_0x2fe931=[],_0x29e3c9=[];for(const _0x1aa992 of _0x2b7497[_0x59fe3f(0x195)][_0x59fe3f(0x1b8)]){if(_0x1aa992[_0x59fe3f(0x194)][_0x59fe3f(0x1ad)]===_0x2b7497[_0x59fe3f(0x195)][_0x59fe3f(0x1aa)]){_0x7d88ac[_0x59fe3f(0x1d4)]({'id':_0x1aa992['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x25781a[_0x59fe3f(0x190)],_0x25781a['cookie'],{'id':_0x1aa992['id'],'visible':_0x2b7497['plan'][_0x59fe3f(0x1aa)]}),_0x7d88ac['push']({'id':_0x1aa992['id'],'updated':!![],'skipped':![]});}catch(_0xda28cc){const _0x26eb8a=mapMenuApiError(_0xda28cc,_0x59fe3f(0x1c2),_0x1aa992['id']);if(isMenuResponseLoss(_0xda28cc)&&_0x26eb8a[_0x59fe3f(0x1cd)]!==_0x59fe3f(0x1a1)){_0x29e3c9[_0x59fe3f(0x1d4)](_0x1aa992['id']);continue;}_0x2fe931[_0x59fe3f(0x1d4)]({'id':_0x1aa992['id'],'stage':_0x59fe3f(0x1f2),'code':_0x26eb8a[_0x59fe3f(0x1cd)],'message':_0x26eb8a[_0x59fe3f(0x199)]});}}let _0x454662;try{_0x454662=await fetchMenuSnapshot(_0x25781a[_0x59fe3f(0x190)],_0x25781a[_0x59fe3f(0x1d6)]);}catch(_0x4ab7aa){const _0x4ea226=describeMenuErrorCause(_0x4ab7aa,_0x59fe3f(0x1e4)),_0x35347a=_0x29e3c9[_0x59fe3f(0x1c1)](_0x4835d9=>({'id':_0x4835d9,'stage':'update-recovery','code':_0x59fe3f(0x1fb),'message':_0x59fe3f(0x1fc)+_0x4835d9+_0x59fe3f(0x1ab),'requestedStateConfirmed':![],'recovered':![]})),_0x5f4fe1={'stage':_0x59fe3f(0x1dc),'code':_0x59fe3f(0x1fb),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x2b7497[_0x59fe3f(0x195)][_0x59fe3f(0x1b8)]['map'](_0x100abe=>_0x100abe['id']),'requestedStateConfirmed':![],..._0x4ea226};throw menuFailure(asVerificationError(_0x4ab7aa,_0x59fe3f(0x1d1)),_0x2b7497['plan'],{'stage':'verification','succeeded':_0x7d88ac,'failedRecords':[..._0x2fe931,..._0x35347a,_0x5f4fe1],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x59fe3f(0x1ff),'recoveredCount':0x0,'lookupCommand':_0x59fe3f(0x1a0)}});}const _0x16c227=[];for(const _0x3c5a72 of _0x7d88ac){const _0x150af5=Number(_0x3c5a72['id']),_0x8b3a12=_0x2b7497[_0x59fe3f(0x206)][_0x59fe3f(0x1d2)](_0x150af5),_0x5b9d72=_0x454662['byId']['get'](_0x150af5);try{verifyVisibilityUpdate(_0x8b3a12,_0x5b9d72,_0x2b7497[_0x59fe3f(0x195)]['requestedVisible']);}catch(_0x3a960b){const _0x1f4fa0=asVerificationError(_0x3a960b,'Menu\x20'+_0x150af5+_0x59fe3f(0x1ed));_0x16c227[_0x59fe3f(0x1d4)]({'id':_0x150af5,'stage':_0x59fe3f(0x1dc),'code':_0x1f4fa0[_0x59fe3f(0x1cd)],'message':_0x1f4fa0[_0x59fe3f(0x199)],'requestedStateConfirmed':![]});}}for(const _0x154bc1 of _0x29e3c9){const _0x2405c8=_0x2b7497[_0x59fe3f(0x206)][_0x59fe3f(0x1d2)](_0x154bc1),_0x1a5280=_0x454662[_0x59fe3f(0x19e)][_0x59fe3f(0x1d2)](_0x154bc1);try{verifyVisibilityUpdate(_0x2405c8,_0x1a5280,_0x2b7497[_0x59fe3f(0x195)][_0x59fe3f(0x1aa)]),_0x7d88ac[_0x59fe3f(0x1d4)]({'id':_0x154bc1,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x626d00){const _0x35a323=asVerificationError(_0x626d00,_0x59fe3f(0x191)+_0x154bc1+_0x59fe3f(0x1cf));_0x16c227[_0x59fe3f(0x1d4)]({'id':_0x154bc1,'stage':_0x59fe3f(0x1b1),'code':_0x35a323['code'],'message':_0x35a323[_0x59fe3f(0x199)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x16c227[_0x59fe3f(0x1ca)]>0x0){const _0x1bf808=_0x16c227['map'](_0x1f4905=>Number(_0x1f4905['id'])),_0x8ad6a3=_0x7d88ac[_0x59fe3f(0x202)](_0x15d32c=>_0x15d32c[_0x59fe3f(0x1c0)]===!![])[_0x59fe3f(0x1ca)],_0x35edc2=menuError('menu_verification_failed',_0x59fe3f(0x1b7)+_0x1bf808[_0x59fe3f(0x1ec)](',\x20')+'.',_0x59fe3f(0x1a7));throw menuFailure(_0x35edc2,_0x2b7497[_0x59fe3f(0x195)],{'stage':_0x59fe3f(0x1dc),'succeeded':_0x7d88ac,'failedRecords':[..._0x2fe931,..._0x16c227],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x59fe3f(0x1ff),..._0x1bf808[_0x59fe3f(0x1ca)]===0x1?{'targetId':_0x1bf808[0x0]}:{'targetIds':_0x1bf808},'recoveredCount':_0x8ad6a3,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x37962e=_0x7d88ac['filter'](_0x1798cc=>_0x1798cc[_0x59fe3f(0x1c9)]===!![])[_0x59fe3f(0x1ca)],_0x3ad338=_0x7d88ac[_0x59fe3f(0x1ca)]-_0x37962e,_0x39e583={..._0x2b7497[_0x59fe3f(0x195)],'succeeded':_0x7d88ac,'failed':_0x2fe931,'warnings':_0x2fe931['length']>0x0?[..._0x2b7497[_0x59fe3f(0x195)][_0x59fe3f(0x19a)],_0x59fe3f(0x1e2)]:_0x2b7497[_0x59fe3f(0x195)][_0x59fe3f(0x19a)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x454662[_0x59fe3f(0x1fd)],'matchesRequestedState':_0x2fe931[_0x59fe3f(0x1ca)]===0x0,'recoveredCount':_0x29e3c9[_0x59fe3f(0x1ca)]}};return{'ok':_0x2fe931['length']===0x0,'data':_0x39e583,'message':_0x2fe931[_0x59fe3f(0x1ca)]===0x0?_0x59fe3f(0x1b9)+_0x37962e+_0x59fe3f(0x1cb)+_0x3ad338+_0x59fe3f(0x1ae):_0x59fe3f(0x1a4)+_0x37962e+_0x59fe3f(0x1bd)+_0x3ad338+_0x59fe3f(0x1b6)+_0x2fe931[_0x59fe3f(0x1ca)]+'\x20failed.'};}};function parseInput(_0x1bb83e){const _0x36bfdd=a180_0x5141ef,_0x4377fa=parseMenuIds(_0x1bb83e['str'](_0x36bfdd(0x1d7))),_0x515967=parseCsv(_0x1bb83e['str'](_0x36bfdd(0x1f0)));if(_0x4377fa['length']===0x0&&_0x515967[_0x36bfdd(0x1ca)]===0x0)throw CliErrors[_0x36bfdd(0x1de)](_0x36bfdd(0x1c5));const _0x5dda9d=parseBooleanFlag(_0x1bb83e,_0x36bfdd(0x1ad),!![]),_0x39a030=parseBooleanFlag(_0x1bb83e,_0x36bfdd(0x1b5),![]);let _0x12a269;if(hasFlag(_0x1bb83e,_0x36bfdd(0x1e6))){_0x12a269=_0x1bb83e[_0x36bfdd(0x1e3)](_0x36bfdd(0x1e6));if(!Number['isSafeInteger'](_0x12a269)||_0x12a269<0x0)throw CliErrors[_0x36bfdd(0x1de)](_0x36bfdd(0x20a));}return{'menuIds':_0x4377fa,'paths':_0x515967,'visible':_0x5dda9d,'expectVisible':_0x39a030,'expectedCount':_0x12a269};}async function buildPlan(_0x764ff1,_0x443d4a){const _0x5e0747=a180_0x5141ef,_0xa9e419=parseInput(_0x764ff1),_0x567304=await fetchMutationSnapshot(_0x764ff1,_0x5e0747(0x18f)),_0x54b2ce=selectTargets(_0x567304['menus'],_0xa9e419[_0x5e0747(0x1a6)],_0xa9e419[_0x5e0747(0x1f0)]);if(_0xa9e419[_0x5e0747(0x196)]!==undefined&&_0x54b2ce[_0x5e0747(0x1ca)]!==_0xa9e419[_0x5e0747(0x196)])throw menuError('menu_expected_count_mismatch',_0x5e0747(0x1ef)+_0x54b2ce[_0x5e0747(0x1ca)]+_0x5e0747(0x1f1)+_0xa9e419[_0x5e0747(0x196)]+'.',_0x5e0747(0x1c7));if(_0xa9e419[_0x5e0747(0x192)]!==undefined){const _0x3cee15=_0x54b2ce['filter'](_0x4ddd10=>_0x4ddd10[_0x5e0747(0x1ad)]!==_0xa9e419['expectVisible']);if(_0x3cee15['length']>0x0)throw menuError(_0x5e0747(0x1e7),_0x5e0747(0x204)+_0x3cee15[_0x5e0747(0x1c1)](_0xc5e4b0=>_0xc5e4b0['id'])[_0x5e0747(0x1ec)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x462ebb=_0x54b2ce[_0x5e0747(0x1c1)](_0x3bc959=>({'id':_0x3bc959['id'],'label':_0x3bc959['label'],'path':_0x3bc959[_0x5e0747(0x1b0)],'before':{'visible':_0x3bc959[_0x5e0747(0x1ad)]},'after':{'visible':_0xa9e419[_0x5e0747(0x1ad)]}})),_0x1b45c7=_0x462ebb[_0x5e0747(0x202)](_0x22db4f=>_0x22db4f[_0x5e0747(0x194)][_0x5e0747(0x1ad)]!==_0xa9e419[_0x5e0747(0x1ad)])['map'](_0xcfcdb7=>({'stage':_0x5e0747(0x1be),'method':_0x5e0747(0x1c3),'path':_0x5e0747(0x207),'body':{'appCode':_0x764ff1['appCode'],'id':_0xcfcdb7['id'],'visible':_0xa9e419['visible']}})),_0x1694e9=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0xa9e419[_0x5e0747(0x1a6)],'paths':_0xa9e419[_0x5e0747(0x1f0)]},'before':{'menus':_0x54b2ce['map'](_0xfa71ad=>({'id':_0xfa71ad['id'],'path':_0xfa71ad['path'],'visible':_0xfa71ad[_0x5e0747(0x1ad)]}))},'after':{'menus':_0x54b2ce['map'](_0x2e0781=>({'id':_0x2e0781['id'],'path':_0x2e0781[_0x5e0747(0x1b0)],'visible':_0xa9e419[_0x5e0747(0x1ad)]}))},'dryRun':_0x443d4a,'backend':[...BACKEND],'plannedActions':_0x1b45c7,'snapshotHash':_0x567304[_0x5e0747(0x1fd)],'warnings':_0x1b45c7[_0x5e0747(0x1ca)]===0x0?[_0x5e0747(0x1f7)]:[]});return{'plan':{..._0x1694e9,'requestedVisible':_0xa9e419[_0x5e0747(0x1ad)],'targets':_0x462ebb},'beforeById':new Map(_0x54b2ce['map'](_0x313b0d=>[_0x313b0d['id'],_0x313b0d]))};}function selectTargets(_0xecb66,_0x2df2c6,_0x360765){const _0x14d363=a180_0x5141ef,_0x53a6b2=new Map(_0xecb66[_0x14d363(0x1c1)](_0x354373=>[_0x354373['id'],_0x354373])),_0x277ef8=new Map(),_0xaf1dbf=_0x2df2c6[_0x14d363(0x202)](_0x102870=>!_0x53a6b2[_0x14d363(0x1af)](_0x102870));if(_0xaf1dbf[_0x14d363(0x1ca)]>0x0)throw menuError(_0x14d363(0x209),_0x14d363(0x197)+_0xaf1dbf['join'](',\x20')+'.',_0x14d363(0x1f6));for(const _0x4f5bc5 of _0x2df2c6){_0x277ef8[_0x14d363(0x1da)](_0x4f5bc5,_0x53a6b2[_0x14d363(0x1d2)](_0x4f5bc5));}for(const _0x3704dc of _0x360765){const _0x1c80fb=_0xecb66['filter'](_0x1955c5=>_0x1955c5[_0x14d363(0x1b0)]===_0x3704dc);if(_0x1c80fb[_0x14d363(0x1ca)]===0x0)throw menuError(_0x14d363(0x209),_0x14d363(0x201)+JSON[_0x14d363(0x1dd)](_0x3704dc)+'.',_0x14d363(0x200));if(_0x1c80fb[_0x14d363(0x1ca)]>0x1)throw menuError(_0x14d363(0x208),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON['stringify'](_0x3704dc)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x1c80fb[_0x14d363(0x1c1)](_0x30cc7d=>_0x30cc7d['id'])[_0x14d363(0x1ec)](',\x20')+'.');const _0x3235b0=_0x1c80fb[0x0];_0x277ef8[_0x14d363(0x1da)](_0x3235b0['id'],_0x3235b0);}return[..._0x277ef8['values']()];}function a180_0x42a8(_0x1c6195,_0x357eae){_0x1c6195=_0x1c6195-0x18e;const _0x4c976d=a180_0x4c97();let _0x42a8a2=_0x4c976d[_0x1c6195];return _0x42a8a2;}function parseMenuIds(_0x2c302f){const _0x4f71fc=a180_0x5141ef,_0x1b7034=parseCsv(_0x2c302f),_0x2869ab=_0x1b7034[_0x4f71fc(0x1c1)](Number);if(_0x2869ab[_0x4f71fc(0x1c8)](_0x1c590e=>!Number['isSafeInteger'](_0x1c590e)||_0x1c590e<=0x0))throw CliErrors[_0x4f71fc(0x1de)](_0x4f71fc(0x1b4));return[...new Set(_0x2869ab)];}function parseCsv(_0x45519b){const _0x228420=a180_0x5141ef;return[...new Set(_0x45519b[_0x228420(0x1d5)](',')[_0x228420(0x1c1)](_0x1efaea=>_0x1efaea[_0x228420(0x1fe)]())['filter'](Boolean))];}function parseBooleanFlag(_0x5d988d,_0xcbee2f,_0xbfd04b){const _0x1cf75c=a180_0x5141ef;if(!hasFlag(_0x5d988d,_0xcbee2f)){if(_0xbfd04b)throw CliErrors[_0x1cf75c(0x1cc)](_0xcbee2f);return undefined;}const _0x1db3bf=_0x5d988d['rawFlags'][_0xcbee2f];if(_0x1db3bf===!![]||_0x1db3bf===![])return _0x1db3bf;if(_0x1db3bf===_0x1cf75c(0x1bb))return!![];if(_0x1db3bf===_0x1cf75c(0x1d3))return![];throw CliErrors['validation']('--'+_0xcbee2f+_0x1cf75c(0x1df));}function verifyVisibilityUpdate(_0x4c5717,_0x476882,_0x410b8a){const _0x44dbc9=a180_0x5141ef;assertVerified(!!_0x476882,_0x44dbc9(0x1ce)+_0x4c5717['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x476882[_0x44dbc9(0x1ad)]===_0x410b8a,_0x44dbc9(0x1ce)+_0x4c5717['id']+_0x44dbc9(0x1a5));const _0x1eb256=[['id',_0x476882['id'],_0x4c5717['id']],[_0x44dbc9(0x1ea),_0x476882[_0x44dbc9(0x1ea)],_0x4c5717[_0x44dbc9(0x1ea)]],[_0x44dbc9(0x1d9),_0x476882[_0x44dbc9(0x1d9)],_0x4c5717[_0x44dbc9(0x1d9)]],[_0x44dbc9(0x19c),_0x476882[_0x44dbc9(0x19c)],_0x4c5717[_0x44dbc9(0x19c)]],[_0x44dbc9(0x1b0),_0x476882[_0x44dbc9(0x1b0)],_0x4c5717['path']],[_0x44dbc9(0x18e),_0x476882[_0x44dbc9(0x18e)],_0x4c5717[_0x44dbc9(0x18e)]],[_0x44dbc9(0x1c6),_0x476882[_0x44dbc9(0x1c6)],_0x4c5717[_0x44dbc9(0x1c6)]],[_0x44dbc9(0x1e5),_0x476882[_0x44dbc9(0x1e5)],_0x4c5717['sort']],[_0x44dbc9(0x1a3),_0x476882['resources'],_0x4c5717[_0x44dbc9(0x1a3)]],[_0x44dbc9(0x1a9),_0x476882['resourcesValid'],_0x4c5717[_0x44dbc9(0x1a9)]],[_0x44dbc9(0x1c4),_0x476882['childrenIds'],_0x4c5717[_0x44dbc9(0x1c4)]],['childrenCount',_0x476882[_0x44dbc9(0x1e1)],_0x4c5717[_0x44dbc9(0x1e1)]],[_0x44dbc9(0x193),_0x476882['pageId'],_0x4c5717[_0x44dbc9(0x193)]],[_0x44dbc9(0x1f5),_0x476882[_0x44dbc9(0x1f5)],_0x4c5717[_0x44dbc9(0x1f5)]],[_0x44dbc9(0x1f8),_0x476882[_0x44dbc9(0x1f8)],_0x4c5717[_0x44dbc9(0x1f8)]],[_0x44dbc9(0x1f4),_0x476882[_0x44dbc9(0x1f4)],_0x4c5717['datasetId']],['datasetCode',_0x476882[_0x44dbc9(0x19f)],_0x4c5717['datasetCode']]];for(const [_0x44b92c,_0x4c0352,_0x32b763]of _0x1eb256){assertVerified(sameValue(_0x4c0352,_0x32b763),_0x44dbc9(0x1ce)+_0x4c5717['id']+'\x20'+_0x44b92c+'\x20changed\x20unexpectedly.');}}function sameValue(_0x60ee85,_0x2ad9b9){const _0xa6f36a=a180_0x5141ef;if(Array[_0xa6f36a(0x1e8)](_0x60ee85)||Array[_0xa6f36a(0x1e8)](_0x2ad9b9))return JSON[_0xa6f36a(0x1dd)](_0x60ee85)===JSON[_0xa6f36a(0x1dd)](_0x2ad9b9);return _0x60ee85===_0x2ad9b9;}
@@ -1 +1 @@
1
- function a181_0x228e(){const _0x1a6a59=['Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','107056PGGBmp','create','endpointUrl','config-create','notification_config_create_outcome_unknown','Inspect\x20with\x20','write','document','notification','readTimeout','mutation','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','channelType','14GijOEt','isSafeInteger','2488TcqjKU','277551MAtEcQ','input','10CUVsNL',';\x20no\x20automatic\x20retry\x20was\x20attempted.','planned','102036uyiIan','verified','channelConfig','POST','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','appCode','310XHhSfl','4457904ROOzHx',';\x20do\x20not\x20resubmit.','verification','configName','942036pjAjdT','Created\x20notification\x20config\x20','889017YUtcMM','48gngZTO'];a181_0x228e=function(){return _0x1a6a59;};return a181_0x228e();}function a181_0x3c8b(_0x353092,_0x424a4d){_0x353092=_0x353092-0xe4;const _0x228e4f=a181_0x228e();let _0x3c8b49=_0x228e4f[_0x353092];return _0x3c8b49;}const a181_0x39169c=a181_0x3c8b;(function(_0x56b121,_0x5e5f42){const _0x1222cd=a181_0x3c8b,_0x1a632d=_0x56b121();while(!![]){try{const _0x14fcac=-parseInt(_0x1222cd(0xe4))/0x1+-parseInt(_0x1222cd(0xf4))/0x2+parseInt(_0x1222cd(0xf1))/0x3+parseInt(_0x1222cd(0x103))/0x4*(-parseInt(_0x1222cd(0xea))/0x5)+parseInt(_0x1222cd(0xef))/0x6*(parseInt(_0x1222cd(0x101))/0x7)+-parseInt(_0x1222cd(0xf2))/0x8*(-parseInt(_0x1222cd(0x104))/0x9)+parseInt(_0x1222cd(0x106))/0xa*(-parseInt(_0x1222cd(0xeb))/0xb);if(_0x14fcac===_0x5e5f42)break;else _0x1a632d['push'](_0x1a632d['shift']());}catch(_0x596512){_0x1a632d['push'](_0x1a632d['shift']());}}}(a181_0x228e,0x2fd99));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH='/notification/channel-config/create';async function prepareCreate(_0x1b0472){const _0x177686=a181_0x3c8b,_0x50ccc8=await readNotificationDocument(_0x1b0472,'create'),_0x3affd2=createMutationInput(_0x1b0472[_0x177686(0xe9)],_0x50ccc8);return{'document':_0x50ccc8,'input':_0x3affd2,'planned':projectNotificationConfig({'appCode':_0x1b0472[_0x177686(0xe9)],'configName':_0x50ccc8[_0x177686(0xee)],'channelType':_0x50ccc8[_0x177686(0x100)],'endpointUrl':_0x50ccc8[_0x177686(0xf6)],'channelConfig':_0x50ccc8[_0x177686(0xe6)],'description':_0x50ccc8['description'],'connectTimeout':_0x50ccc8['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x50ccc8[_0x177686(0xfd)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a181_0x39169c(0xfc),'command':a181_0x39169c(0xf7),'description':a181_0x39169c(0xe8),'risk':a181_0x39169c(0xfa),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x249a0b){assertSingleNotificationSource(_0x249a0b);},async 'dryRun'(_0x1f5efd){const _0x3f63db=a181_0x39169c,_0x1da5b7=await prepareCreate(_0x1f5efd),_0x110527=notificationLookupCommand(_0x1f5efd[_0x3f63db(0xe9)],_0x1da5b7['document'][_0x3f63db(0x100)]);return asDryRunResult({'operation':_0x3f63db(0xf5),'selector':{'appCode':_0x1f5efd[_0x3f63db(0xe9)],'configName':_0x1da5b7['document']['configName'],'channelType':_0x1da5b7[_0x3f63db(0xfb)][_0x3f63db(0x100)]},'before':null,'after':_0x1da5b7[_0x3f63db(0x108)],'dryRun':!![],'backend':{'method':_0x3f63db(0xe7),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3f63db(0x108),'lookupCommand':_0x110527}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x5678f1){const _0x46e190=a181_0x39169c,_0x26c44c=await prepareCreate(_0x5678f1),_0x30aef3=notificationLookupCommand(_0x5678f1[_0x46e190(0xe9)],_0x26c44c[_0x46e190(0xfb)][_0x46e190(0x100)]);let _0x269ac6;try{_0x269ac6=await createNotificationChannelConfig(_0x26c44c[_0x46e190(0x105)]);}catch(_0x5e9af2){if(isPlatformTransportFailure(_0x5e9af2))throw notificationError(_0x46e190(0xf8),_0x46e190(0xf3),_0x46e190(0xf9)+_0x30aef3+_0x46e190(0xec));throw safeApiFailure(_0x46e190(0xf5),_0x46e190(0xfe),_0x46e190(0xf9)+_0x30aef3+_0x46e190(0x107));}if(!Number[_0x46e190(0x102)](_0x269ac6)||_0x269ac6<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x46e190(0xff),'Inspect\x20with\x20'+_0x30aef3+_0x46e190(0xec));let _0x540e7d;try{const _0x246381=await getNotificationChannelConfig(_0x269ac6,_0x5678f1['appCode']);_0x540e7d=normalizeExactNotificationConfig(_0x246381,_0x269ac6,_0x5678f1[_0x46e190(0xe9)]);}catch{throw safeApiFailure(_0x46e190(0xf5),_0x46e190(0xed),'Inspect\x20with\x20'+_0x30aef3+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x46e190(0xf5),'selector':{'appCode':_0x540e7d[_0x46e190(0xe9)],'id':_0x540e7d['id'],'configCode':_0x540e7d['configCode'],'configName':_0x540e7d['configName'],'channelType':_0x540e7d[_0x46e190(0x100)]},'before':null,'after':projectNotificationConfig(_0x540e7d),'dryRun':![],'backend':{'method':_0x46e190(0xe7),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x46e190(0xe5),'lookupCommand':_0x30aef3}},'message':_0x46e190(0xf0)+_0x540e7d['id']};}};
1
+ const a181_0x5b841e=a181_0xde0e;function a181_0x346d(){const _0x3e6692=['description','channelConfig','932SrTDAa','planned','11013330tCYIgK','mutation','721490mZnSSQ','config-create','document','configName','write','6264vdvBPJ','notification','channelType','verification','create','9PVXFRl','35934pBFLRi','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','Inspect\x20with\x20','10715096UBXvnM','POST','verified','2864UJvrZg','readTimeout','6zADIjo','20ouxPOp','input','isSafeInteger','appCode','Created\x20notification\x20config\x20',';\x20no\x20automatic\x20retry\x20was\x20attempted.','2462160juEEup','notification_config_create_outcome_unknown','configCode','28512EGSQFt',';\x20do\x20not\x20resubmit.'];a181_0x346d=function(){return _0x3e6692;};return a181_0x346d();}function a181_0xde0e(_0x4476db,_0xf10373){_0x4476db=_0x4476db-0x17d;const _0x346d6c=a181_0x346d();let _0xde0e6b=_0x346d6c[_0x4476db];return _0xde0e6b;}(function(_0x4b498f,_0x1e4f16){const _0x3c4871=a181_0xde0e,_0x288c2a=_0x4b498f();while(!![]){try{const _0x53ee91=parseInt(_0x3c4871(0x18d))/0x1*(-parseInt(_0x3c4871(0x19d))/0x2)+-parseInt(_0x3c4871(0x187))/0x3*(-parseInt(_0x3c4871(0x190))/0x4)+-parseInt(_0x3c4871(0x196))/0x5*(-parseInt(_0x3c4871(0x18f))/0x6)+-parseInt(_0x3c4871(0x1a1))/0x7+parseInt(_0x3c4871(0x18a))/0x8+parseInt(_0x3c4871(0x186))/0x9*(-parseInt(_0x3c4871(0x19f))/0xa)+parseInt(_0x3c4871(0x199))/0xb*(parseInt(_0x3c4871(0x181))/0xc);if(_0x53ee91===_0x1e4f16)break;else _0x288c2a['push'](_0x288c2a['shift']());}catch(_0x445173){_0x288c2a['push'](_0x288c2a['shift']());}}}(a181_0x346d,0xac4aa));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH='/notification/channel-config/create';async function prepareCreate(_0x3a3234){const _0x3ba6ae=a181_0xde0e,_0x1de5c4=await readNotificationDocument(_0x3a3234,'create'),_0x3f868b=createMutationInput(_0x3a3234[_0x3ba6ae(0x193)],_0x1de5c4);return{'document':_0x1de5c4,'input':_0x3f868b,'planned':projectNotificationConfig({'appCode':_0x3a3234[_0x3ba6ae(0x193)],'configName':_0x1de5c4[_0x3ba6ae(0x17f)],'channelType':_0x1de5c4[_0x3ba6ae(0x183)],'endpointUrl':_0x1de5c4['endpointUrl'],'channelConfig':_0x1de5c4[_0x3ba6ae(0x19c)],'description':_0x1de5c4[_0x3ba6ae(0x19b)],'connectTimeout':_0x1de5c4['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x1de5c4[_0x3ba6ae(0x18e)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a181_0x5b841e(0x182),'command':a181_0x5b841e(0x17d),'description':a181_0x5b841e(0x188),'risk':a181_0x5b841e(0x180),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x27f7f0){assertSingleNotificationSource(_0x27f7f0);},async 'dryRun'(_0x32c756){const _0x4f215a=a181_0x5b841e,_0x275b77=await prepareCreate(_0x32c756),_0x43640=notificationLookupCommand(_0x32c756[_0x4f215a(0x193)],_0x275b77[_0x4f215a(0x17e)]['channelType']);return asDryRunResult({'operation':_0x4f215a(0x185),'selector':{'appCode':_0x32c756[_0x4f215a(0x193)],'configName':_0x275b77[_0x4f215a(0x17e)][_0x4f215a(0x17f)],'channelType':_0x275b77[_0x4f215a(0x17e)][_0x4f215a(0x183)]},'before':null,'after':_0x275b77[_0x4f215a(0x19e)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x4f215a(0x19e),'lookupCommand':_0x43640}},{'method':_0x4f215a(0x18b),'url':CREATE_PATH});},async 'execute'(_0x289036){const _0xebd7fa=a181_0x5b841e,_0x15a197=await prepareCreate(_0x289036),_0x5bbaf8=notificationLookupCommand(_0x289036[_0xebd7fa(0x193)],_0x15a197['document'][_0xebd7fa(0x183)]);let _0x2e9a45;try{_0x2e9a45=await createNotificationChannelConfig(_0x15a197[_0xebd7fa(0x191)]);}catch(_0x7a115d){if(isPlatformTransportFailure(_0x7a115d))throw notificationError('notification_config_create_outcome_unknown','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','Inspect\x20with\x20'+_0x5bbaf8+_0xebd7fa(0x19a));throw safeApiFailure(_0xebd7fa(0x185),_0xebd7fa(0x1a0),'Inspect\x20with\x20'+_0x5bbaf8+_0xebd7fa(0x195));}if(!Number[_0xebd7fa(0x192)](_0x2e9a45)||_0x2e9a45<=0x0)throw notificationError(_0xebd7fa(0x197),'Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Inspect\x20with\x20'+_0x5bbaf8+_0xebd7fa(0x19a));let _0x5b0f53;try{const _0x18991b=await getNotificationChannelConfig(_0x2e9a45,_0x289036[_0xebd7fa(0x193)]);_0x5b0f53=normalizeExactNotificationConfig(_0x18991b,_0x2e9a45,_0x289036[_0xebd7fa(0x193)]);}catch{throw safeApiFailure(_0xebd7fa(0x185),_0xebd7fa(0x184),_0xebd7fa(0x189)+_0x5bbaf8+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0xebd7fa(0x185),'selector':{'appCode':_0x5b0f53['appCode'],'id':_0x5b0f53['id'],'configCode':_0x5b0f53[_0xebd7fa(0x198)],'configName':_0x5b0f53[_0xebd7fa(0x17f)],'channelType':_0x5b0f53[_0xebd7fa(0x183)]},'before':null,'after':projectNotificationConfig(_0x5b0f53),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0xebd7fa(0x18c),'lookupCommand':_0x5bbaf8}},'message':_0xebd7fa(0x194)+_0x5b0f53['id']};}};
@@ -1 +1 @@
1
- const a182_0xe56ccd=a182_0x535b;(function(_0x1cfdb3,_0x3091de){const _0x1ff7db=a182_0x535b,_0x40ca2d=_0x1cfdb3();while(!![]){try{const _0x4be6f8=-parseInt(_0x1ff7db(0x1df))/0x1+parseInt(_0x1ff7db(0x1e5))/0x2*(-parseInt(_0x1ff7db(0x1eb))/0x3)+-parseInt(_0x1ff7db(0x1f0))/0x4+parseInt(_0x1ff7db(0x1da))/0x5+-parseInt(_0x1ff7db(0x1d8))/0x6+parseInt(_0x1ff7db(0x1dd))/0x7*(-parseInt(_0x1ff7db(0x1e0))/0x8)+parseInt(_0x1ff7db(0x1ed))/0x9*(parseInt(_0x1ff7db(0x1f5))/0xa);if(_0x4be6f8===_0x3091de)break;else _0x40ca2d['push'](_0x40ca2d['shift']());}catch(_0xdc1397){_0x40ca2d['push'](_0x40ca2d['shift']());}}}(a182_0x3c7f,0xc29e4));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';function a182_0x535b(_0x4c1a9b,_0xd81587){_0x4c1a9b=_0x4c1a9b-0x1d8;const _0x3c7f12=a182_0x3c7f();let _0x535b70=_0x3c7f12[_0x4c1a9b];return _0x535b70;}const DELETE_PATH=a182_0xe56ccd(0x1f1),REFERENCE_WARNING=a182_0xe56ccd(0x1e7);async function prepareDelete(_0x4778e6){const _0xad1be5=a182_0xe56ccd,_0x35dda6=readNotificationId(_0x4778e6),_0x12833b=await requireExactNotificationConfig(_0x4778e6[_0xad1be5(0x1f6)],_0x35dda6,_0xad1be5(0x1e6));return{'id':_0x35dda6,'before':_0x12833b};}export const notificationConfigDelete={'service':'notification','command':a182_0xe56ccd(0x1de),'description':a182_0xe56ccd(0x1ef),'risk':a182_0xe56ccd(0x1f2),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x412c0a){readNotificationId(_0x412c0a),requireNotificationExplicitYes(_0x412c0a);},async 'dryRun'(_0x1d1833){const _0x370a13=a182_0xe56ccd,_0x550aa3=await prepareDelete(_0x1d1833),_0x59bab6=notificationLookupCommand(_0x1d1833[_0x370a13(0x1f6)],_0x550aa3['before'][_0x370a13(0x1e2)]);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x550aa3[_0x370a13(0x1dc)]),'before':projectNotificationConfig(_0x550aa3['before']),'after':null,'dryRun':!![],'backend':{'method':_0x370a13(0x1f3),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x370a13(0x1f4),'lookupCommand':_0x59bab6}},{'method':_0x370a13(0x1f3),'url':DELETE_PATH});},async 'execute'(_0x8e4bdc){const _0x46315c=a182_0xe56ccd;requireNotificationExplicitYes(_0x8e4bdc);const _0x194cda=await prepareDelete(_0x8e4bdc),_0x2aad13=notificationLookupCommand(_0x8e4bdc[_0x46315c(0x1f6)],_0x194cda[_0x46315c(0x1dc)][_0x46315c(0x1e2)]);let _0x32b70d=![];try{await deleteNotificationChannelConfig(_0x194cda['id'],_0x8e4bdc[_0x46315c(0x1f6)]);}catch(_0x2f7141){if(!isPlatformTransportFailure(_0x2f7141))throw safeApiFailure('delete',_0x46315c(0x1e9),_0x46315c(0x1d9)+_0x2aad13+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x32b70d=!![];}let _0x25b5c3;try{_0x25b5c3=await listNotificationChannelConfigs(_0x8e4bdc['appCode'],_0x194cda[_0x46315c(0x1dc)]['channelType']),validateNotificationDeleteReadback(_0x25b5c3,_0x8e4bdc[_0x46315c(0x1f6)],_0x194cda[_0x46315c(0x1dc)][_0x46315c(0x1e2)]);}catch{throw notificationError(_0x32b70d?_0x46315c(0x1e1):'notification_config_delete_verification_unavailable',_0x46315c(0x1e4)+_0x194cda['id']+_0x46315c(0x1ee),_0x46315c(0x1d9)+_0x2aad13+_0x46315c(0x1e8));}if(_0x25b5c3[_0x46315c(0x1db)](_0x4c9517=>_0x4c9517['id']===_0x194cda['id']))throw notificationError(_0x32b70d?_0x46315c(0x1e1):'notification_config_delete_verification_failed',_0x46315c(0x1e4)+_0x194cda['id']+'\x20remains\x20present\x20after\x20delete.',_0x46315c(0x1d9)+_0x2aad13+_0x46315c(0x1e8));const _0x5f5c8f=[REFERENCE_WARNING];return _0x32b70d&&_0x5f5c8f[_0x46315c(0x1e3)]('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x46315c(0x1e6),'selector':notificationSelector(_0x194cda['before']),'before':projectNotificationConfig(_0x194cda['before']),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x5f5c8f,'verification':{'status':_0x46315c(0x1ec),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x32b70d,'lookupCommand':_0x2aad13}},'message':_0x46315c(0x1ea)+_0x194cda['id']};}};function a182_0x3c7f(){const _0x1ca190=['verified','75024nozbeC','\x20delete\x20could\x20not\x20be\x20verified.','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','2733936IZSkRA','/notification/channel-config/delete','high-risk-write','POST','planned','6260MHbuiP','appCode','4982862bveDsc','Inspect\x20with\x20','132835VrJhFJ','some','before','8551823lWHhsP','config-delete','961713shsqFm','8pLLhcp','notification_config_delete_outcome_unknown','channelType','unshift','Notification\x20config\x20','31266ZgqCcy','delete','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.',';\x20do\x20not\x20resubmit\x20automatically.','mutation','Deleted\x20notification\x20config\x20','144xXXNQh'];a182_0x3c7f=function(){return _0x1ca190;};return a182_0x3c7f();}
1
+ const a182_0x18fc5c=a182_0x20d7;(function(_0x6fbfe7,_0x55fe7){const _0x190541=a182_0x20d7,_0xd6cbff=_0x6fbfe7();while(!![]){try{const _0x41f397=parseInt(_0x190541(0x1cf))/0x1*(-parseInt(_0x190541(0x1ce))/0x2)+-parseInt(_0x190541(0x1b7))/0x3*(parseInt(_0x190541(0x1c0))/0x4)+parseInt(_0x190541(0x1b8))/0x5*(-parseInt(_0x190541(0x1c5))/0x6)+parseInt(_0x190541(0x1d2))/0x7*(-parseInt(_0x190541(0x1cb))/0x8)+-parseInt(_0x190541(0x1c2))/0x9*(-parseInt(_0x190541(0x1bf))/0xa)+parseInt(_0x190541(0x1c1))/0xb*(-parseInt(_0x190541(0x1ca))/0xc)+parseInt(_0x190541(0x1b4))/0xd;if(_0x41f397===_0x55fe7)break;else _0xd6cbff['push'](_0xd6cbff['shift']());}catch(_0x17194a){_0xd6cbff['push'](_0xd6cbff['shift']());}}}(a182_0x13f2,0x42d4b));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a182_0x18fc5c(0x1c6),REFERENCE_WARNING=a182_0x18fc5c(0x1d1);async function prepareDelete(_0x582f53){const _0x1b4206=a182_0x18fc5c,_0x5355de=readNotificationId(_0x582f53),_0x2004ff=await requireExactNotificationConfig(_0x582f53['appCode'],_0x5355de,_0x1b4206(0x1c9));return{'id':_0x5355de,'before':_0x2004ff};}function a182_0x13f2(){const _0x121334=['\x20remains\x20present\x20after\x20delete.','389720stMbgz','1436muKdZT','22HnGBiS','81NsjzZu','POST','config-delete','6BzdDCB','/notification/channel-config/delete','planned','Deleted\x20notification\x20config\x20','delete','1990104KZKgze','7664pGEUEC','\x20delete\x20could\x20not\x20be\x20verified.','mutation','424NQuxWl','2143XwJZgA','unshift','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','742CihDhb','before','verified','Inspect\x20with\x20','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','Notification\x20config\x20','appCode','high-risk-write','16760029OwVSaw','notification_config_delete_outcome_unknown',';\x20do\x20not\x20resubmit\x20automatically.','3231pGSVZN','460255xOgghE','notification_config_delete_verification_failed','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','channelType','notification_config_delete_verification_unavailable'];a182_0x13f2=function(){return _0x121334;};return a182_0x13f2();}function a182_0x20d7(_0x44e2d7,_0x3be0a5){_0x44e2d7=_0x44e2d7-0x1b2;const _0x13f21c=a182_0x13f2();let _0x20d7bc=_0x13f21c[_0x44e2d7];return _0x20d7bc;}export const notificationConfigDelete={'service':'notification','command':a182_0x18fc5c(0x1c4),'description':a182_0x18fc5c(0x1d6),'risk':a182_0x18fc5c(0x1b3),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0xa5f1d9){readNotificationId(_0xa5f1d9),requireNotificationExplicitYes(_0xa5f1d9);},async 'dryRun'(_0x8dc6ea){const _0xc5438f=a182_0x18fc5c,_0x63422d=await prepareDelete(_0x8dc6ea),_0x1e71e9=notificationLookupCommand(_0x8dc6ea[_0xc5438f(0x1b2)],_0x63422d[_0xc5438f(0x1d3)][_0xc5438f(0x1bc)]);return asDryRunResult({'operation':_0xc5438f(0x1c9),'selector':notificationSelector(_0x63422d[_0xc5438f(0x1d3)]),'before':projectNotificationConfig(_0x63422d[_0xc5438f(0x1d3)]),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0xc5438f(0x1c7),'lookupCommand':_0x1e71e9}},{'method':_0xc5438f(0x1c3),'url':DELETE_PATH});},async 'execute'(_0x5e1ea4){const _0x53246e=a182_0x18fc5c;requireNotificationExplicitYes(_0x5e1ea4);const _0x4b695f=await prepareDelete(_0x5e1ea4),_0x5045c7=notificationLookupCommand(_0x5e1ea4[_0x53246e(0x1b2)],_0x4b695f[_0x53246e(0x1d3)][_0x53246e(0x1bc)]);let _0x578fff=![];try{await deleteNotificationChannelConfig(_0x4b695f['id'],_0x5e1ea4['appCode']);}catch(_0x17739f){if(!isPlatformTransportFailure(_0x17739f))throw safeApiFailure(_0x53246e(0x1c9),_0x53246e(0x1cd),'Inspect\x20with\x20'+_0x5045c7+_0x53246e(0x1bb));_0x578fff=!![];}let _0x579870;try{_0x579870=await listNotificationChannelConfigs(_0x5e1ea4[_0x53246e(0x1b2)],_0x4b695f[_0x53246e(0x1d3)]['channelType']),validateNotificationDeleteReadback(_0x579870,_0x5e1ea4['appCode'],_0x4b695f[_0x53246e(0x1d3)]['channelType']);}catch{throw notificationError(_0x578fff?'notification_config_delete_outcome_unknown':_0x53246e(0x1bd),'Notification\x20config\x20'+_0x4b695f['id']+_0x53246e(0x1cc),_0x53246e(0x1d5)+_0x5045c7+_0x53246e(0x1b6));}if(_0x579870['some'](_0x2c1d21=>_0x2c1d21['id']===_0x4b695f['id']))throw notificationError(_0x578fff?_0x53246e(0x1b5):_0x53246e(0x1b9),_0x53246e(0x1d7)+_0x4b695f['id']+_0x53246e(0x1be),_0x53246e(0x1d5)+_0x5045c7+_0x53246e(0x1b6));const _0x5bab9e=[REFERENCE_WARNING];return _0x578fff&&_0x5bab9e[_0x53246e(0x1d0)](_0x53246e(0x1ba)),{'ok':!![],'data':{'operation':_0x53246e(0x1c9),'selector':notificationSelector(_0x4b695f['before']),'before':projectNotificationConfig(_0x4b695f[_0x53246e(0x1d3)]),'after':null,'dryRun':![],'backend':{'method':_0x53246e(0x1c3),'path':DELETE_PATH},'warnings':_0x5bab9e,'verification':{'status':_0x53246e(0x1d4),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x578fff,'lookupCommand':_0x5045c7}},'message':_0x53246e(0x1c8)+_0x4b695f['id']};}};
@@ -1 +1 @@
1
- const a183_0xb5ce85=a183_0x1d60;(function(_0x1570ea,_0x10ff8d){const _0x3a74a9=a183_0x1d60,_0x5be78b=_0x1570ea();while(!![]){try{const _0x14a1d2=-parseInt(_0x3a74a9(0x170))/0x1+-parseInt(_0x3a74a9(0x17c))/0x2+-parseInt(_0x3a74a9(0x179))/0x3*(-parseInt(_0x3a74a9(0x16d))/0x4)+-parseInt(_0x3a74a9(0x181))/0x5+parseInt(_0x3a74a9(0x180))/0x6+-parseInt(_0x3a74a9(0x17a))/0x7*(parseInt(_0x3a74a9(0x178))/0x8)+parseInt(_0x3a74a9(0x177))/0x9;if(_0x14a1d2===_0x10ff8d)break;else _0x5be78b['push'](_0x5be78b['shift']());}catch(_0x3f79ba){_0x5be78b['push'](_0x5be78b['shift']());}}}(a183_0x1a0c,0xa22e6));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a183_0x1d60(_0x5421d4,_0x1b6216){_0x5421d4=_0x5421d4-0x166;const _0x1a0c0a=a183_0x1a0c();let _0x1d6030=_0x1a0c0a[_0x5421d4];return _0x1d6030;}function a183_0x1a0c(){const _0x289e19=['flat','length','Found\x20','6207588oqxuIq','3299260gzdkNg','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','str','string','all','map','appCode','trim','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','1036JICRzD','read','notification','1008505jIZFZr','Notification\x20channel\x20type','config-list','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','bool','13484997TVtllI','280CUrepd','7347nwITPO','33999dKqnee','type','1329152gcFcUw'];a183_0x1a0c=function(){return _0x289e19;};return a183_0x1a0c();}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a183_0xb5ce85(0x16f),'command':a183_0xb5ce85(0x172),'description':a183_0xb5ce85(0x182),'risk':a183_0xb5ce85(0x16e),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a183_0xb5ce85(0x17b),'type':a183_0xb5ce85(0x167),'description':a183_0xb5ce85(0x171),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a183_0xb5ce85(0x168),'type':'boolean','default':![],'description':a183_0xb5ce85(0x175)}],async 'validate'(_0x3b9778){const _0x16350d=a183_0xb5ce85;if(_0x3b9778[_0x16350d(0x176)](_0x16350d(0x168))&&_0x3b9778[_0x16350d(0x166)](_0x16350d(0x17b))[_0x16350d(0x16b)]())throw CliErrors['validation'](_0x16350d(0x16c),_0x16350d(0x174));if(_0x3b9778[_0x16350d(0x176)]('all'))return;readNotificationChannelType(_0x3b9778);},async 'execute'(_0x508938){const _0x3aa0d6=a183_0xb5ce85;if(_0x508938['bool']('all')){const _0x2c549f=await Promise[_0x3aa0d6(0x168)](NOTIFICATION_CHANNEL_TYPES[_0x3aa0d6(0x169)](_0x31893e=>listNotificationChannelConfigs(_0x508938[_0x3aa0d6(0x16a)],_0x31893e))),_0x2acbbd=_0x2c549f[_0x3aa0d6(0x17d)]()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x508938[_0x3aa0d6(0x16a)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x2acbbd['length'],'configs':_0x2acbbd},'message':_0x3aa0d6(0x17f)+_0x2acbbd[_0x3aa0d6(0x17e)]+_0x3aa0d6(0x173)};}const _0x175f28=readNotificationChannelType(_0x508938),_0x2bbf28=await listNotificationChannelConfigs(_0x508938[_0x3aa0d6(0x16a)],_0x175f28),_0x772842=_0x2bbf28[_0x3aa0d6(0x169)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x508938['appCode'],'channelType':_0x175f28,'count':_0x772842[_0x3aa0d6(0x17e)],'configs':_0x772842},'message':'Found\x20'+_0x772842[_0x3aa0d6(0x17e)]+'\x20'+_0x175f28+'\x20notification\x20config(s)'};}};
1
+ const a183_0x177296=a183_0x2ee1;(function(_0x3c33b0,_0x51b78a){const _0x32c3f9=a183_0x2ee1,_0x5365f9=_0x3c33b0();while(!![]){try{const _0x5b0ad4=parseInt(_0x32c3f9(0x126))/0x1*(-parseInt(_0x32c3f9(0x11e))/0x2)+-parseInt(_0x32c3f9(0x122))/0x3+-parseInt(_0x32c3f9(0x124))/0x4*(-parseInt(_0x32c3f9(0x12c))/0x5)+parseInt(_0x32c3f9(0x114))/0x6+parseInt(_0x32c3f9(0x125))/0x7+-parseInt(_0x32c3f9(0x11b))/0x8+-parseInt(_0x32c3f9(0x11f))/0x9*(-parseInt(_0x32c3f9(0x11c))/0xa);if(_0x5b0ad4===_0x51b78a)break;else _0x5365f9['push'](_0x5365f9['shift']());}catch(_0x42766c){_0x5365f9['push'](_0x5365f9['shift']());}}}(a183_0x2033,0xef328));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a183_0x177296(0x11d),'command':a183_0x177296(0x12b),'description':a183_0x177296(0x121),'risk':a183_0x177296(0x123),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a183_0x177296(0x120),'type':a183_0x177296(0x12d),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':a183_0x177296(0x129),'type':a183_0x177296(0x128),'default':![],'description':a183_0x177296(0x112)}],async 'validate'(_0x11e6c0){const _0x22ca42=a183_0x177296;if(_0x11e6c0[_0x22ca42(0x117)]('all')&&_0x11e6c0['str'](_0x22ca42(0x120))[_0x22ca42(0x115)]())throw CliErrors[_0x22ca42(0x12a)]('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.',_0x22ca42(0x119));if(_0x11e6c0['bool'](_0x22ca42(0x129)))return;readNotificationChannelType(_0x11e6c0);},async 'execute'(_0xd5ef53){const _0x411625=a183_0x177296;if(_0xd5ef53['bool'](_0x411625(0x129))){const _0x592fb7=await Promise[_0x411625(0x129)](NOTIFICATION_CHANNEL_TYPES[_0x411625(0x111)](_0x399c22=>listNotificationChannelConfigs(_0xd5ef53[_0x411625(0x11a)],_0x399c22))),_0x55ffe6=_0x592fb7[_0x411625(0x113)]()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0xd5ef53[_0x411625(0x11a)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x55ffe6[_0x411625(0x118)],'configs':_0x55ffe6},'message':'Found\x20'+_0x55ffe6[_0x411625(0x118)]+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x17bcec=readNotificationChannelType(_0xd5ef53),_0x4a1ee8=await listNotificationChannelConfigs(_0xd5ef53[_0x411625(0x11a)],_0x17bcec),_0x420e63=_0x4a1ee8['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0xd5ef53[_0x411625(0x11a)],'channelType':_0x17bcec,'count':_0x420e63['length'],'configs':_0x420e63},'message':_0x411625(0x127)+_0x420e63[_0x411625(0x118)]+'\x20'+_0x17bcec+_0x411625(0x116)};}};function a183_0x2ee1(_0x1ec29f,_0x5e8e67){_0x1ec29f=_0x1ec29f-0x111;const _0x2033cf=a183_0x2033();let _0x2ee1d0=_0x2033cf[_0x1ec29f];return _0x2ee1d0;}function a183_0x2033(){const _0x127bff=['config-list','704210IaGPiP','string','map','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','flat','1659372KZivEw','trim','\x20notification\x20config(s)','bool','length','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','appCode','8396472MaZIMC','4733070ineXos','notification','550QcuOaJ','54fwOOfK','type','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','5469324PlzBsq','read','36CHhHab','4793334QLvyMt','4423HnOaoJ','Found\x20','boolean','all','validation'];a183_0x2033=function(){return _0x127bff;};return a183_0x2033();}