@lovrabet/rabetbase-cli 2.4.3 → 2.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff-refresh-start.d.ts +2 -0
  87. package/lib/commands/db/diff-refresh-start.js +1 -0
  88. package/lib/commands/db/diff-refresh-status.d.ts +2 -0
  89. package/lib/commands/db/diff-refresh-status.js +1 -0
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/tables.js +1 -1
  95. package/lib/commands/db/test.js +1 -1
  96. package/lib/commands/db/update.js +1 -1
  97. package/lib/commands/doctor.js +1 -1
  98. package/lib/commands/file/index.js +1 -1
  99. package/lib/commands/init/index.js +1 -1
  100. package/lib/commands/issue/index.js +1 -1
  101. package/lib/commands/issue/nudge.js +1 -1
  102. package/lib/commands/issue/report.js +1 -1
  103. package/lib/commands/issue/shared.js +1 -1
  104. package/lib/commands/kb/create.js +1 -1
  105. package/lib/commands/kb/delete.js +1 -1
  106. package/lib/commands/kb/detail.js +1 -1
  107. package/lib/commands/kb/index.js +1 -1
  108. package/lib/commands/kb/list.js +1 -1
  109. package/lib/commands/kb/shared.js +1 -1
  110. package/lib/commands/kb/update.js +1 -1
  111. package/lib/commands/logs/index.js +1 -1
  112. package/lib/commands/menu/asset-update.js +1 -1
  113. package/lib/commands/menu/delete.js +1 -1
  114. package/lib/commands/menu/external-link-create.js +1 -1
  115. package/lib/commands/menu/external-link-update.js +1 -1
  116. package/lib/commands/menu/group-create.js +1 -1
  117. package/lib/commands/menu/group-update.js +1 -1
  118. package/lib/commands/menu/index.js +1 -1
  119. package/lib/commands/menu/list.js +1 -1
  120. package/lib/commands/menu/move.js +1 -1
  121. package/lib/commands/menu/regroup-start.js +1 -1
  122. package/lib/commands/menu/rename.js +1 -1
  123. package/lib/commands/menu/shared/compare-table.js +1 -1
  124. package/lib/commands/menu/shared/delete-plan.js +1 -1
  125. package/lib/commands/menu/shared/facts.js +1 -1
  126. package/lib/commands/menu/shared/index.js +1 -1
  127. package/lib/commands/menu/shared/inquirer.js +1 -1
  128. package/lib/commands/menu/shared/local-pages.js +1 -1
  129. package/lib/commands/menu/shared/logic.js +1 -1
  130. package/lib/commands/menu/shared/mutations.js +1 -1
  131. package/lib/commands/menu/shared/service.js +1 -1
  132. package/lib/commands/menu/shared/sync-core.js +1 -1
  133. package/lib/commands/menu/shared/update-core.js +1 -1
  134. package/lib/commands/menu/shared/valid-url.js +1 -1
  135. package/lib/commands/menu/sync.js +1 -1
  136. package/lib/commands/notification/config-create.d.ts +2 -0
  137. package/lib/commands/notification/config-create.js +1 -0
  138. package/lib/commands/notification/config-delete.d.ts +2 -0
  139. package/lib/commands/notification/config-delete.js +1 -0
  140. package/lib/commands/notification/config-list.js +1 -1
  141. package/lib/commands/notification/config-update.d.ts +2 -0
  142. package/lib/commands/notification/config-update.js +1 -0
  143. package/lib/commands/notification/index.js +1 -1
  144. package/lib/commands/notification/shared.d.ts +97 -0
  145. package/lib/commands/notification/shared.js +1 -0
  146. package/lib/commands/ocr/index.js +1 -1
  147. package/lib/commands/page/generate-start.js +1 -1
  148. package/lib/commands/page/generate-status.js +1 -1
  149. package/lib/commands/page/index.js +1 -1
  150. package/lib/commands/page/pull.js +1 -1
  151. package/lib/commands/page/push.js +1 -1
  152. package/lib/commands/page/react/create.js +1 -1
  153. package/lib/commands/page/react/detail.js +1 -1
  154. package/lib/commands/page/react/list.js +1 -1
  155. package/lib/commands/page/react/publish.js +1 -1
  156. package/lib/commands/page/react/shared.js +1 -1
  157. package/lib/commands/page/react/syntax.js +1 -1
  158. package/lib/commands/page/react/template.js +1 -1
  159. package/lib/commands/page/react/update.js +1 -1
  160. package/lib/commands/page/relation-audit.js +1 -1
  161. package/lib/commands/page/restore.js +1 -1
  162. package/lib/commands/page/shared.js +1 -1
  163. package/lib/commands/page/standard-page-status.js +1 -1
  164. package/lib/commands/page/sync.js +1 -1
  165. package/lib/commands/permit/index.js +1 -1
  166. package/lib/commands/permit/page-get.js +1 -1
  167. package/lib/commands/permit/page-set.js +1 -1
  168. package/lib/commands/permit/role-apis-set.js +1 -1
  169. package/lib/commands/permit/role-menus-set.js +1 -1
  170. package/lib/commands/permit/role-menus.js +1 -1
  171. package/lib/commands/permit/shared.js +1 -1
  172. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  173. package/lib/commands/project/create/format-elapsed.js +1 -1
  174. package/lib/commands/project/create/main.d.ts +1 -0
  175. package/lib/commands/project/create/main.js +1 -1
  176. package/lib/commands/project/create/materialize-project-template.d.ts +11 -0
  177. package/lib/commands/project/create/materialize-project-template.js +1 -0
  178. package/lib/commands/project/create/project-name.d.ts +2 -0
  179. package/lib/commands/project/create/project-name.js +1 -0
  180. package/lib/commands/project/create/project-template-archive.d.ts +6 -0
  181. package/lib/commands/project/create/project-template-archive.js +1 -0
  182. package/lib/commands/project/create/project-template-path.d.ts +1 -3
  183. package/lib/commands/project/create/project-template-path.js +1 -1
  184. package/lib/commands/project/create/use-copy-project-template.d.ts +2 -1
  185. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  186. package/lib/commands/project/create/use-format-code.js +1 -1
  187. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  188. package/lib/commands/project/index.js +1 -1
  189. package/lib/commands/project/upgrade.js +1 -1
  190. package/lib/commands/registry.js +1 -1
  191. package/lib/commands/role/create.js +1 -1
  192. package/lib/commands/role/delete.js +1 -1
  193. package/lib/commands/role/detail.js +1 -1
  194. package/lib/commands/role/index.js +1 -1
  195. package/lib/commands/role/list.js +1 -1
  196. package/lib/commands/role/shared.js +1 -1
  197. package/lib/commands/role/update.js +1 -1
  198. package/lib/commands/role/user-add.js +1 -1
  199. package/lib/commands/role/user-remove.js +1 -1
  200. package/lib/commands/role/user-resolve.js +1 -1
  201. package/lib/commands/run/index.js +1 -1
  202. package/lib/commands/schema.js +1 -1
  203. package/lib/commands/sql/create.js +1 -1
  204. package/lib/commands/sql/delete.js +1 -1
  205. package/lib/commands/sql/detail.js +1 -1
  206. package/lib/commands/sql/exec.js +1 -1
  207. package/lib/commands/sql/index.js +1 -1
  208. package/lib/commands/sql/list.js +1 -1
  209. package/lib/commands/sql/pull.js +1 -1
  210. package/lib/commands/sql/push.js +1 -1
  211. package/lib/commands/sql/shared.js +1 -1
  212. package/lib/commands/sql/status.js +1 -1
  213. package/lib/commands/sql/validate.js +1 -1
  214. package/lib/commands/task/index.js +1 -1
  215. package/lib/commands/task/status.js +1 -1
  216. package/lib/commands/tenant/index.js +1 -1
  217. package/lib/commands/tenant/members-list.js +1 -1
  218. package/lib/commands/tenant/shared.js +1 -1
  219. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  220. package/lib/commands/user-account/index.js +1 -1
  221. package/lib/commands/workspace/add.js +1 -1
  222. package/lib/commands/workspace/index.js +1 -1
  223. package/lib/commands/workspace/remove.js +1 -1
  224. package/lib/config/schema.js +1 -1
  225. package/lib/constant/cdn.d.ts +2 -0
  226. package/lib/constant/cdn.js +1 -1
  227. package/lib/constant/cli.js +1 -1
  228. package/lib/constant/defaults.js +1 -1
  229. package/lib/constant/domain.js +1 -1
  230. package/lib/constant/env.js +1 -1
  231. package/lib/constant/output.js +1 -1
  232. package/lib/constant/paths.js +1 -1
  233. package/lib/constant/risk.js +1 -1
  234. package/lib/context/app-resolver.js +1 -1
  235. package/lib/context/auth-resolver.js +1 -1
  236. package/lib/context/config-loader.js +1 -1
  237. package/lib/context.d.ts +1 -1
  238. package/lib/context.js +1 -1
  239. package/lib/core/alias-resolver.js +1 -1
  240. package/lib/core/api-client.d.ts +29 -2
  241. package/lib/core/api-client.js +1 -1
  242. package/lib/core/bff/config.js +1 -1
  243. package/lib/core/bff/file-system.js +1 -1
  244. package/lib/core/bff/hash.js +1 -1
  245. package/lib/core/bff/lock.js +1 -1
  246. package/lib/core/bff/utils.js +1 -1
  247. package/lib/core/db-resolver.js +1 -1
  248. package/lib/core/page/file-system.js +1 -1
  249. package/lib/core/page/hash.js +1 -1
  250. package/lib/core/page/lock.js +1 -1
  251. package/lib/core/sql-index-auditor.js +1 -1
  252. package/lib/core/sql-sync/config.js +1 -1
  253. package/lib/core/sql-sync/file-system.js +1 -1
  254. package/lib/core/sql-sync/hash.js +1 -1
  255. package/lib/core/sql-sync/lock.js +1 -1
  256. package/lib/core/sql-sync/utils.js +1 -1
  257. package/lib/core/sql-validator.js +1 -1
  258. package/lib/errors.js +1 -1
  259. package/lib/framework/build-all-flags.js +1 -1
  260. package/lib/framework/error-output.js +1 -1
  261. package/lib/framework/explicit-yes.js +1 -1
  262. package/lib/framework/flags.js +1 -1
  263. package/lib/framework/help.js +1 -1
  264. package/lib/framework/index.js +1 -1
  265. package/lib/framework/output.js +1 -1
  266. package/lib/framework/response.js +1 -1
  267. package/lib/framework/runner-alias.js +1 -1
  268. package/lib/framework/runner.js +1 -1
  269. package/lib/framework/schema-export.js +1 -1
  270. package/lib/framework/types.js +1 -1
  271. package/lib/generated/build-info.d.ts +4 -4
  272. package/lib/generated/build-info.js +1 -1
  273. package/lib/help.js +1 -1
  274. package/lib/postinstall.js +1 -1
  275. package/lib/runtime/confirmation.js +1 -1
  276. package/lib/runtime/event.js +1 -1
  277. package/lib/runtime/index.js +1 -1
  278. package/lib/runtime/queue.js +1 -1
  279. package/lib/runtime/resolve.js +1 -1
  280. package/lib/skills/builtin-skill.js +1 -1
  281. package/lib/skills/main.js +1 -1
  282. package/lib/skills/npx-skills-add.js +1 -1
  283. package/lib/skills/skill-presence.js +1 -1
  284. package/lib/telemetry/cli-command-trace.js +1 -1
  285. package/lib/telemetry/cli-help-trace.js +1 -1
  286. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  287. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  288. package/lib/telemetry/send-cli-trace-log.js +1 -1
  289. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  290. package/lib/utils/ai_config.js +1 -1
  291. package/lib/utils/apply-jq-filter.js +1 -1
  292. package/lib/utils/cdn-config.js +1 -1
  293. package/lib/utils/check-sdk-version.js +1 -1
  294. package/lib/utils/cli-version-check.js +1 -1
  295. package/lib/utils/cli-version-policy.d.ts +13 -0
  296. package/lib/utils/cli-version-policy.js +1 -1
  297. package/lib/utils/config.js +1 -1
  298. package/lib/utils/entity-with-id.js +1 -1
  299. package/lib/utils/file-utils.js +1 -1
  300. package/lib/utils/guides-cdn.js +1 -1
  301. package/lib/utils/http-client.js +1 -1
  302. package/lib/utils/is-non-interactive.js +1 -1
  303. package/lib/utils/logger.js +1 -1
  304. package/lib/utils/params.js +1 -1
  305. package/lib/utils/platform.js +1 -1
  306. package/lib/utils/rules-cdn.js +1 -1
  307. package/lib/utils/sleep.js +1 -1
  308. package/lib/utils/template-replacer.js +1 -1
  309. package/lib/utils/update-notice.js +1 -1
  310. package/lib/utils/version.js +1 -1
  311. package/lib/utils/with-active-cookie.js +1 -1
  312. package/lib/utils/write-cli-side-channel.js +1 -1
  313. package/package.json +9 -4
  314. package/skills/rabetbase/SKILL.md +33 -22
  315. package/skills/rabetbase/guides/backend-function.md +5 -3
  316. package/skills/rabetbase/guides/bff-creation-workflow.md +2 -2
  317. package/skills/rabetbase/guides/conflict-detection.md +2 -2
  318. package/skills/rabetbase/guides/database-connection-workflow.md +39 -5
  319. package/skills/rabetbase/guides/react-custom-page-workflow.md +16 -4
  320. package/skills/rabetbase/guides/sql-creation-workflow.md +4 -2
  321. package/skills/rabetbase/guides/sql-mybatis.md +2 -2
  322. package/skills/rabetbase/knowledge/page-schema/YtPage.md +3 -37
  323. package/skills/rabetbase/knowledge/react-page/generation-standards.md +14 -3
  324. package/skills/rabetbase/references/rabetbase-app-config.md +2 -2
  325. package/skills/rabetbase/references/rabetbase-bff-push.md +4 -5
  326. package/skills/rabetbase/references/rabetbase-bff-save.md +3 -3
  327. package/skills/rabetbase/references/rabetbase-config.md +2 -2
  328. package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
  329. package/skills/rabetbase/references/rabetbase-db-detail.md +3 -0
  330. package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +53 -0
  331. package/skills/rabetbase/references/rabetbase-db-diff.md +40 -21
  332. package/skills/rabetbase/references/rabetbase-db-list.md +1 -1
  333. package/skills/rabetbase/references/rabetbase-kb.md +5 -3
  334. package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -10
  335. package/skills/rabetbase/references/rabetbase-menu-external-link-update.md +1 -3
  336. package/skills/rabetbase/references/rabetbase-menu-regroup-start.md +2 -3
  337. package/skills/rabetbase/references/rabetbase-notification-config-list.md +2 -2
  338. package/skills/rabetbase/references/rabetbase-notification-config-mutations.md +56 -0
  339. package/skills/rabetbase/references/rabetbase-page-react-detail.md +1 -1
  340. package/skills/rabetbase/references/rabetbase-page-react-list.md +1 -1
  341. package/skills/rabetbase/references/rabetbase-page-react-publish.md +2 -2
  342. package/skills/rabetbase/references/rabetbase-project-create.md +3 -0
  343. package/skills/rabetbase/references/rabetbase-run.md +1 -1
  344. package/skills/rabetbase/references/rabetbase-sql-create.md +1 -1
  345. package/skills/rabetbase/references/rabetbase-sql-push.md +3 -4
  346. package/skills/rabetbase/references/rabetbase-user-account.md +0 -1
  347. package/skills/rabetbase.manifest.json +5 -5
  348. package/templates/README.md +14 -2
  349. package/lib/commands/project/create/non-interactive.d.ts +0 -9
  350. package/lib/commands/project/create/non-interactive.js +0 -1
  351. package/lib/utils/copy-directory.d.ts +0 -1
  352. package/lib/utils/copy-directory.js +0 -1
  353. package/skills/rabetbase/knowledge/page-schema/LrSmartEcharts.md +0 -291
  354. package/skills/rabetbase/knowledge/page-schema/LrSmartStatistic.md +0 -223
  355. package/templates/projects/sub-app-react-demo/.prettierrc +0 -1
  356. package/templates/projects/sub-app-react-demo/CHANGELOG.md +0 -67
  357. package/templates/projects/sub-app-react-demo/README.md +0 -246
  358. package/templates/projects/sub-app-react-demo/docs/quick-start.md +0 -245
  359. package/templates/projects/sub-app-react-demo/index.html +0 -27
  360. package/templates/projects/sub-app-react-demo/package.json +0 -34
  361. package/templates/projects/sub-app-react-demo/public/logo.svg +0 -1
  362. package/templates/projects/sub-app-react-demo/public/vite.svg +0 -1
  363. package/templates/projects/sub-app-react-demo/src/api/api.ts +0 -26
  364. package/templates/projects/sub-app-react-demo/src/api/client.ts +0 -32
  365. package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.module.css +0 -28
  366. package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.tsx +0 -55
  367. package/templates/projects/sub-app-react-demo/src/layouts/MainLayout.tsx +0 -308
  368. package/templates/projects/sub-app-react-demo/src/main.tsx +0 -52
  369. package/templates/projects/sub-app-react-demo/src/pages/dashboard/index.tsx +0 -570
  370. package/templates/projects/sub-app-react-demo/src/pages/data-screen/index.tsx +0 -531
  371. package/templates/projects/sub-app-react-demo/src/pages/index.module.css +0 -500
  372. package/templates/projects/sub-app-react-demo/src/pages/index.tsx +0 -641
  373. package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +0 -536
  374. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.module.css +0 -295
  375. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.tsx +0 -242
  376. package/templates/projects/sub-app-react-demo/src/router/index.tsx +0 -30
  377. package/templates/projects/sub-app-react-demo/src/style.css +0 -108
  378. package/templates/projects/sub-app-react-demo/src/utils/api.ts +0 -12
  379. package/templates/projects/sub-app-react-demo/src/vite-env.d.ts +0 -2
  380. package/templates/projects/sub-app-react-demo/tsconfig.json +0 -26
  381. package/templates/projects/sub-app-react-demo/vite.config.ts +0 -111
@@ -1 +1 @@
1
- (function(_0x24ffcf,_0x278bfb){const _0x447922=a120_0x58b8,_0x54ba75=_0x24ffcf();while(!![]){try{const _0x4446bf=-parseInt(_0x447922(0x1a1))/0x1*(parseInt(_0x447922(0x187))/0x2)+parseInt(_0x447922(0x196))/0x3+parseInt(_0x447922(0x177))/0x4+-parseInt(_0x447922(0x197))/0x5*(-parseInt(_0x447922(0x17e))/0x6)+-parseInt(_0x447922(0x18d))/0x7+parseInt(_0x447922(0x178))/0x8+-parseInt(_0x447922(0x19e))/0x9*(-parseInt(_0x447922(0x176))/0xa);if(_0x4446bf===_0x278bfb)break;else _0x54ba75['push'](_0x54ba75['shift']());}catch(_0x382df2){_0x54ba75['push'](_0x54ba75['shift']());}}}(a120_0xe96a,0x626ad));import{createHash}from'node:crypto';import{getMenuTree}from'../../../core/api-client.js';function a120_0xe96a(){const _0x20dd5b=['1orhHuA','resources','values','number','350UcyGge','244984rkMDAA','720Yskbiy','verbose','boolean','digest','updateTime','parse','165588PkLDse','sort','length','label','POSITIVE_INFINITY','url','depth','push','stringify','1055550eieLGk','isFinite','childrenIds','menus','path','sha256:','3966431xiZfRu','updateUserId','index','parentId','datasetCode','updateUserName','isArray','string','pageType','699858dRXKNN','55diPWfC','datasetId','type','extend','map','item','valid','231255ZaUoeR','modelType','children'];a120_0xe96a=function(){return _0x20dd5b;};return a120_0xe96a();}export async function fetchMenuSnapshot(_0x3fc7bf,_0x210eae,_0x71c6ef={}){const _0x425d73=a120_0x58b8,_0x8b418b=await getMenuTree(_0x3fc7bf,_0x210eae);return buildMenuSnapshot(Array[_0x425d73(0x193)](_0x8b418b)?_0x8b418b:[],_0x71c6ef);}export function buildMenuSnapshot(_0xecc137,_0x251b69={}){const _0x514ac7=a120_0x58b8,_0x2fde3e=flattenMenuItems(_0xecc137,{'verbose':_0x251b69[_0x514ac7(0x179)]===!![],'parentId':null,'depth':0x0}),_0x22a36d=new Map(_0x2fde3e[_0x514ac7(0x19b)](_0x1786c2=>[_0x1786c2['id'],_0x1786c2])),_0x4a72da=createHash('sha256')['update'](JSON[_0x514ac7(0x186)](_0x2fde3e[_0x514ac7(0x19b)](toHashInput)))[_0x514ac7(0x17b)]('hex');return{'total':_0x2fde3e[_0x514ac7(0x180)],'hash':_0x514ac7(0x18c)+_0x4a72da,'menus':_0x2fde3e,'byId':_0x22a36d};}export function toProcessedMenuItem(_0x5b1236){const _0x2b4f11=a120_0x58b8;return{'id':_0x5b1236['id'],'path':_0x5b1236[_0x2b4f11(0x18b)],'label':_0x5b1236[_0x2b4f11(0x181)],'resources':[..._0x5b1236['resources']],'extend':_0x5b1236['extend']??null};}export function toMenuListItem(_0x369e8e){const {modelType:_0x1ca6f5,datasetId:_0x5745f5,datasetCode:_0x54cf08,resourcesValid:_0x3ff089,..._0x57db28}=_0x369e8e;return _0x57db28;}export function getChildren(_0x17f74f,_0xf7e4a5){const _0x135886=a120_0x58b8;return _0x17f74f[_0x135886(0x18a)]['filter'](_0x43b060=>_0x43b060[_0x135886(0x190)]===_0xf7e4a5);}function a120_0x58b8(_0x4e756e,_0xf4ab8b){_0x4e756e=_0x4e756e-0x176;const _0xe96a20=a120_0xe96a();let _0x58b81a=_0xe96a20[_0x4e756e];return _0x58b81a;}function flattenMenuItems(_0x43f859,_0x3aedd5){const _0x417879=a120_0x58b8,_0x3c839d=sortMenuItems(_0x43f859),_0x448bcc=[];for(const _0xfc956b of _0x3c839d){const _0x4b67c3=sortMenuItems(Array['isArray'](_0xfc956b['children'])?_0xfc956b[_0x417879(0x1a0)]:[]);_0x448bcc[_0x417879(0x185)](toMenuFact(_0xfc956b,_0x4b67c3,_0x3aedd5)),_0x4b67c3[_0x417879(0x180)]>0x0&&_0x448bcc[_0x417879(0x185)](...flattenMenuItems(_0x4b67c3,{'verbose':_0x3aedd5[_0x417879(0x179)],'parentId':_0xfc956b['id'],'depth':_0x3aedd5[_0x417879(0x184)]+0x1}));}return _0x448bcc;}function sortMenuItems(_0x1c7d78){const _0x3ecc8e=a120_0x58b8;return _0x1c7d78[_0x3ecc8e(0x19b)]((_0x350bca,_0x4fa7ee)=>({'item':_0x350bca,'index':_0x4fa7ee}))[_0x3ecc8e(0x17f)]((_0x91f3a0,_0x555e72)=>{const _0x2b18a5=_0x3ecc8e,_0x205299=normalizeSort(_0x91f3a0['item'][_0x2b18a5(0x17f)]),_0x19ee5d=normalizeSort(_0x555e72[_0x2b18a5(0x19c)][_0x2b18a5(0x17f)]);if(_0x205299!==_0x19ee5d)return _0x205299-_0x19ee5d;return _0x91f3a0[_0x2b18a5(0x18f)]-_0x555e72[_0x2b18a5(0x18f)];})['map'](({item:_0x4b16ac})=>_0x4b16ac);}function toMenuFact(_0x502f45,_0x479b0f,_0x5a1c53){const _0x548416=a120_0x58b8,_0x51df43=normalizeResourceValue(_0x502f45[_0x548416(0x19a)]?.[_0x548416(0x1a2)]),_0x12b742={'id':_0x502f45['id'],'parentId':_0x5a1c53['parentId'],'depth':_0x5a1c53[_0x548416(0x184)],'label':normalizeString(_0x502f45[_0x548416(0x181)]),'path':normalizeString(_0x502f45[_0x548416(0x18b)]),'url':normalizeString(_0x502f45[_0x548416(0x183)]),'type':normalizeString(_0x502f45[_0x548416(0x199)]),'visible':typeof _0x502f45['visible']===_0x548416(0x17a)?_0x502f45['visible']:null,'sort':typeof _0x502f45['sort']==='number'&&Number[_0x548416(0x188)](_0x502f45[_0x548416(0x17f)])?_0x502f45[_0x548416(0x17f)]:null,'resources':_0x51df43[_0x548416(0x1a3)],'resourcesValid':_0x51df43[_0x548416(0x19d)],'childrenIds':_0x479b0f[_0x548416(0x19b)](_0x2ec1eb=>_0x2ec1eb['id']),'childrenCount':_0x479b0f['length'],'pageId':normalizeNullableNumber(_0x502f45['pageId']),'pageType':normalizeString(_0x502f45[_0x548416(0x195)]),'modelType':normalizeString(_0x502f45['modelType']),'datasetId':normalizeNullableNumber(_0x502f45[_0x548416(0x198)]),'datasetCode':normalizeString(_0x502f45[_0x548416(0x191)]),'updateUserId':normalizeNullableString(_0x502f45[_0x548416(0x18e)]),'updateUserName':normalizeNullableString(_0x502f45[_0x548416(0x192)]),'updateTime':normalizeNullableTimestamp(_0x502f45[_0x548416(0x17c)])};return _0x5a1c53[_0x548416(0x179)]&&(_0x12b742['extend']=_0x502f45[_0x548416(0x19a)]??null),_0x12b742;}function toHashInput(_0x4eff6e){const _0xffb647=a120_0x58b8;return{'id':_0x4eff6e['id'],'parentId':_0x4eff6e[_0xffb647(0x190)],'label':_0x4eff6e['label'],'path':_0x4eff6e[_0xffb647(0x18b)],'url':_0x4eff6e[_0xffb647(0x183)],'type':_0x4eff6e[_0xffb647(0x199)],'visible':_0x4eff6e['visible'],'sort':_0x4eff6e[_0xffb647(0x17f)],'resources':_0x4eff6e[_0xffb647(0x1a2)],'resourcesValid':_0x4eff6e['resourcesValid'],'childrenIds':_0x4eff6e[_0xffb647(0x189)],'pageId':_0x4eff6e['pageId'],'pageType':_0x4eff6e['pageType'],'modelType':_0x4eff6e[_0xffb647(0x19f)],'datasetId':_0x4eff6e[_0xffb647(0x198)],'datasetCode':_0x4eff6e['datasetCode'],'updateUserId':_0x4eff6e[_0xffb647(0x18e)],'updateUserName':_0x4eff6e[_0xffb647(0x192)],'updateTime':_0x4eff6e['updateTime']};}function normalizeSort(_0x5722c5){const _0x1236b3=a120_0x58b8;return typeof _0x5722c5===_0x1236b3(0x1a4)&&Number[_0x1236b3(0x188)](_0x5722c5)?_0x5722c5:Number[_0x1236b3(0x182)];}function normalizeString(_0x331148){const _0x2162f5=a120_0x58b8;return typeof _0x331148===_0x2162f5(0x194)?_0x331148:'';}function normalizeNullableNumber(_0x387554){const _0x40983c=a120_0x58b8;return typeof _0x387554===_0x40983c(0x1a4)&&Number[_0x40983c(0x188)](_0x387554)?_0x387554:null;}function normalizeNullableString(_0x44702f){const _0x4a563d=a120_0x58b8;return typeof _0x44702f==='string'&&_0x44702f[_0x4a563d(0x180)]>0x0?_0x44702f:null;}function normalizeNullableTimestamp(_0x42b94f){const _0x52d51e=a120_0x58b8;if(typeof _0x42b94f==='string')return _0x42b94f[_0x52d51e(0x180)]>0x0?_0x42b94f:null;return typeof _0x42b94f===_0x52d51e(0x1a4)&&Number[_0x52d51e(0x188)](_0x42b94f)?_0x42b94f:null;}export function normalizeResources(_0xe270a){const _0x23f5a0=a120_0x58b8;return normalizeResourceValue(_0xe270a)[_0x23f5a0(0x1a3)];}function normalizeResourceValue(_0x58cbd6){const _0x24e921=a120_0x58b8;if(_0x58cbd6==null)return{'values':[],'valid':!![]};if(Array[_0x24e921(0x193)](_0x58cbd6))return{'values':_0x58cbd6['map'](String),'valid':!![]};if(typeof _0x58cbd6!==_0x24e921(0x194))return{'values':[],'valid':![]};try{const _0x4ca861=JSON[_0x24e921(0x17d)](_0x58cbd6);return Array[_0x24e921(0x193)](_0x4ca861)?{'values':_0x4ca861[_0x24e921(0x19b)](String),'valid':!![]}:{'values':[],'valid':![]};}catch{return{'values':[],'valid':![]};}}
1
+ (function(_0x3cecbe,_0x3cfec3){const _0x43807c=a122_0x1f74,_0x2f7580=_0x3cecbe();while(!![]){try{const _0x4be366=-parseInt(_0x43807c(0x1c1))/0x1*(parseInt(_0x43807c(0x19b))/0x2)+-parseInt(_0x43807c(0x19f))/0x3+-parseInt(_0x43807c(0x19d))/0x4+parseInt(_0x43807c(0x1c3))/0x5+-parseInt(_0x43807c(0x195))/0x6*(parseInt(_0x43807c(0x1b0))/0x7)+parseInt(_0x43807c(0x19c))/0x8+parseInt(_0x43807c(0x1a6))/0x9*(parseInt(_0x43807c(0x1c0))/0xa);if(_0x4be366===_0x3cfec3)break;else _0x2f7580['push'](_0x2f7580['shift']());}catch(_0x8c6bc){_0x2f7580['push'](_0x2f7580['shift']());}}}(a122_0x4edd,0xb298b));import{createHash}from'node:crypto';import{getMenuTree}from'../../../core/api-client.js';export async function fetchMenuSnapshot(_0xf79544,_0xfcd2ca,_0x252228={}){const _0x444bcd=a122_0x1f74,_0x1f6850=await getMenuTree(_0xf79544,_0xfcd2ca);return buildMenuSnapshot(Array[_0x444bcd(0x199)](_0x1f6850)?_0x1f6850:[],_0x252228);}export function buildMenuSnapshot(_0x963f7c,_0x57302c={}){const _0x11cd31=a122_0x1f74,_0x29aed8=flattenMenuItems(_0x963f7c,{'verbose':_0x57302c[_0x11cd31(0x1aa)]===!![],'parentId':null,'depth':0x0}),_0x3e2834=new Map(_0x29aed8[_0x11cd31(0x1bb)](_0x17a96e=>[_0x17a96e['id'],_0x17a96e])),_0x17099a=createHash(_0x11cd31(0x1b4))[_0x11cd31(0x1b7)](JSON[_0x11cd31(0x1bf)](_0x29aed8[_0x11cd31(0x1bb)](toHashInput)))['digest'](_0x11cd31(0x196));return{'total':_0x29aed8[_0x11cd31(0x19a)],'hash':_0x11cd31(0x1b3)+_0x17099a,'menus':_0x29aed8,'byId':_0x3e2834};}export function toProcessedMenuItem(_0x38c8e2){const _0x575e3a=a122_0x1f74;return{'id':_0x38c8e2['id'],'path':_0x38c8e2[_0x575e3a(0x1c2)],'label':_0x38c8e2[_0x575e3a(0x1ac)],'resources':[..._0x38c8e2['resources']],'extend':_0x38c8e2[_0x575e3a(0x1b2)]??null};}export function toMenuListItem(_0x47eadb){const {modelType:_0x5896e3,datasetId:_0x1c55c5,datasetCode:_0x4a1da1,resourcesValid:_0x4e91e4,..._0x3a4a23}=_0x47eadb;return _0x3a4a23;}export function getChildren(_0x2ed320,_0x71a3e7){const _0xe31c94=a122_0x1f74;return _0x2ed320['menus'][_0xe31c94(0x1be)](_0x4770bf=>_0x4770bf[_0xe31c94(0x1b6)]===_0x71a3e7);}function a122_0x4edd(){const _0x4344f3=['7563000qEuYvX','3515056vUrsvN','datasetCode','3254451SkJVYt','parse','pageType','updateUserName','childrenIds','updateTime','string','45ORdnzJ','datasetId','depth','number','verbose','type','label','values','resources','sort','9814126ZiXbxF','push','extend','sha256:','sha256','isFinite','parentId','update','valid','children','pageId','map','item','visible','filter','stringify','6502570pOQitb','196561sJHvOa','path','2450765mhvKeo','updateUserId','index','modelType','POSITIVE_INFINITY','6UutyfP','hex','resourcesValid','url','isArray','length','6GARhOS'];a122_0x4edd=function(){return _0x4344f3;};return a122_0x4edd();}function flattenMenuItems(_0x52dc30,_0x233bd4){const _0x17533d=a122_0x1f74,_0xb7c416=sortMenuItems(_0x52dc30),_0x464695=[];for(const _0x58d95e of _0xb7c416){const _0x1516f8=sortMenuItems(Array[_0x17533d(0x199)](_0x58d95e[_0x17533d(0x1b9)])?_0x58d95e[_0x17533d(0x1b9)]:[]);_0x464695['push'](toMenuFact(_0x58d95e,_0x1516f8,_0x233bd4)),_0x1516f8[_0x17533d(0x19a)]>0x0&&_0x464695[_0x17533d(0x1b1)](...flattenMenuItems(_0x1516f8,{'verbose':_0x233bd4[_0x17533d(0x1aa)],'parentId':_0x58d95e['id'],'depth':_0x233bd4[_0x17533d(0x1a8)]+0x1}));}return _0x464695;}function sortMenuItems(_0x478bce){const _0x390039=a122_0x1f74;return _0x478bce[_0x390039(0x1bb)]((_0x5ca1ea,_0x1558f9)=>({'item':_0x5ca1ea,'index':_0x1558f9}))[_0x390039(0x1af)]((_0x12b17f,_0x5f3e0d)=>{const _0x19495b=_0x390039,_0x484e2b=normalizeSort(_0x12b17f[_0x19495b(0x1bc)][_0x19495b(0x1af)]),_0x10431b=normalizeSort(_0x5f3e0d[_0x19495b(0x1bc)][_0x19495b(0x1af)]);if(_0x484e2b!==_0x10431b)return _0x484e2b-_0x10431b;return _0x12b17f[_0x19495b(0x192)]-_0x5f3e0d['index'];})['map'](({item:_0x536f11})=>_0x536f11);}function toMenuFact(_0x5eb4e1,_0x1117c5,_0x2b03f0){const _0x429db4=a122_0x1f74,_0x100ae4=normalizeResourceValue(_0x5eb4e1[_0x429db4(0x1b2)]?.[_0x429db4(0x1ae)]),_0x48339e={'id':_0x5eb4e1['id'],'parentId':_0x2b03f0[_0x429db4(0x1b6)],'depth':_0x2b03f0['depth'],'label':normalizeString(_0x5eb4e1['label']),'path':normalizeString(_0x5eb4e1[_0x429db4(0x1c2)]),'url':normalizeString(_0x5eb4e1[_0x429db4(0x198)]),'type':normalizeString(_0x5eb4e1['type']),'visible':typeof _0x5eb4e1[_0x429db4(0x1bd)]==='boolean'?_0x5eb4e1[_0x429db4(0x1bd)]:null,'sort':typeof _0x5eb4e1['sort']===_0x429db4(0x1a9)&&Number['isFinite'](_0x5eb4e1[_0x429db4(0x1af)])?_0x5eb4e1['sort']:null,'resources':_0x100ae4['values'],'resourcesValid':_0x100ae4[_0x429db4(0x1b8)],'childrenIds':_0x1117c5[_0x429db4(0x1bb)](_0x2a3ab2=>_0x2a3ab2['id']),'childrenCount':_0x1117c5['length'],'pageId':normalizeNullableNumber(_0x5eb4e1[_0x429db4(0x1ba)]),'pageType':normalizeString(_0x5eb4e1[_0x429db4(0x1a1)]),'modelType':normalizeString(_0x5eb4e1[_0x429db4(0x193)]),'datasetId':normalizeNullableNumber(_0x5eb4e1[_0x429db4(0x1a7)]),'datasetCode':normalizeString(_0x5eb4e1[_0x429db4(0x19e)]),'updateUserId':normalizeNullableString(_0x5eb4e1[_0x429db4(0x1c4)]),'updateUserName':normalizeNullableString(_0x5eb4e1[_0x429db4(0x1a2)]),'updateTime':normalizeNullableTimestamp(_0x5eb4e1[_0x429db4(0x1a4)])};return _0x2b03f0['verbose']&&(_0x48339e[_0x429db4(0x1b2)]=_0x5eb4e1[_0x429db4(0x1b2)]??null),_0x48339e;}function toHashInput(_0x52c28c){const _0x43562a=a122_0x1f74;return{'id':_0x52c28c['id'],'parentId':_0x52c28c['parentId'],'label':_0x52c28c['label'],'path':_0x52c28c[_0x43562a(0x1c2)],'url':_0x52c28c[_0x43562a(0x198)],'type':_0x52c28c[_0x43562a(0x1ab)],'visible':_0x52c28c['visible'],'sort':_0x52c28c[_0x43562a(0x1af)],'resources':_0x52c28c[_0x43562a(0x1ae)],'resourcesValid':_0x52c28c[_0x43562a(0x197)],'childrenIds':_0x52c28c[_0x43562a(0x1a3)],'pageId':_0x52c28c[_0x43562a(0x1ba)],'pageType':_0x52c28c[_0x43562a(0x1a1)],'modelType':_0x52c28c[_0x43562a(0x193)],'datasetId':_0x52c28c[_0x43562a(0x1a7)],'datasetCode':_0x52c28c[_0x43562a(0x19e)],'updateUserId':_0x52c28c[_0x43562a(0x1c4)],'updateUserName':_0x52c28c[_0x43562a(0x1a2)],'updateTime':_0x52c28c[_0x43562a(0x1a4)]};}function normalizeSort(_0x3f99bb){const _0x399049=a122_0x1f74;return typeof _0x3f99bb===_0x399049(0x1a9)&&Number[_0x399049(0x1b5)](_0x3f99bb)?_0x3f99bb:Number[_0x399049(0x194)];}function normalizeString(_0x5acf0d){const _0x2c5145=a122_0x1f74;return typeof _0x5acf0d===_0x2c5145(0x1a5)?_0x5acf0d:'';}function normalizeNullableNumber(_0x1c8a32){const _0x171152=a122_0x1f74;return typeof _0x1c8a32==='number'&&Number[_0x171152(0x1b5)](_0x1c8a32)?_0x1c8a32:null;}function normalizeNullableString(_0xa5ee9d){const _0x2fe352=a122_0x1f74;return typeof _0xa5ee9d===_0x2fe352(0x1a5)&&_0xa5ee9d['length']>0x0?_0xa5ee9d:null;}function a122_0x1f74(_0x214e70,_0x8888e1){_0x214e70=_0x214e70-0x192;const _0x4edd92=a122_0x4edd();let _0x1f740c=_0x4edd92[_0x214e70];return _0x1f740c;}function normalizeNullableTimestamp(_0x5ca5d2){const _0x3547d3=a122_0x1f74;if(typeof _0x5ca5d2===_0x3547d3(0x1a5))return _0x5ca5d2['length']>0x0?_0x5ca5d2:null;return typeof _0x5ca5d2===_0x3547d3(0x1a9)&&Number[_0x3547d3(0x1b5)](_0x5ca5d2)?_0x5ca5d2:null;}export function normalizeResources(_0x147ac8){const _0x22233f=a122_0x1f74;return normalizeResourceValue(_0x147ac8)[_0x22233f(0x1ad)];}function normalizeResourceValue(_0x22fae0){const _0x19dc42=a122_0x1f74;if(_0x22fae0==null)return{'values':[],'valid':!![]};if(Array[_0x19dc42(0x199)](_0x22fae0))return{'values':_0x22fae0[_0x19dc42(0x1bb)](String),'valid':!![]};if(typeof _0x22fae0!=='string')return{'values':[],'valid':![]};try{const _0xedc09a=JSON[_0x19dc42(0x1a0)](_0x22fae0);return Array[_0x19dc42(0x199)](_0xedc09a)?{'values':_0xedc09a[_0x19dc42(0x1bb)](String),'valid':!![]}:{'values':[],'valid':![]};}catch{return{'values':[],'valid':![]};}}
@@ -1 +1 @@
1
- (function(_0x1b4eb4,_0x27df54){var _0x4b085d=a121_0x2d93,_0xfe2a6a=_0x1b4eb4();while(!![]){try{var _0x425991=parseInt(_0x4b085d(0x144))/0x1+parseInt(_0x4b085d(0x145))/0x2*(-parseInt(_0x4b085d(0x14d))/0x3)+-parseInt(_0x4b085d(0x148))/0x4+-parseInt(_0x4b085d(0x14c))/0x5*(parseInt(_0x4b085d(0x14a))/0x6)+parseInt(_0x4b085d(0x146))/0x7*(-parseInt(_0x4b085d(0x14b))/0x8)+parseInt(_0x4b085d(0x149))/0x9*(-parseInt(_0x4b085d(0x143))/0xa)+parseInt(_0x4b085d(0x14e))/0xb*(parseInt(_0x4b085d(0x147))/0xc);if(_0x425991===_0x27df54)break;else _0xfe2a6a['push'](_0xfe2a6a['shift']());}catch(_0x5d5373){_0xfe2a6a['push'](_0xfe2a6a['shift']());}}}(a121_0x3cb6,0x6154f));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';function a121_0x3cb6(){var _0x471d4b=['224aGOALN','5069748BCrKjs','3068880cMalue','5495220OoDNCF','1261470NbYPwM','123928nUjPXJ','15XtsnYB','559347tVnFKW','88GuvtFa','10KWUKKy','82433iCIhUI','6kMuAKZ'];a121_0x3cb6=function(){return _0x471d4b;};return a121_0x3cb6();}export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';function a121_0x2d93(_0x347d30,_0x328f67){_0x347d30=_0x347d30-0x143;var _0x3cb632=a121_0x3cb6();var _0x2d9336=_0x3cb632[_0x347d30];return _0x2d9336;}export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
1
+ (function(_0xe14061,_0x14831f){var _0x57e50f=a123_0x24b2,_0x343f4e=_0xe14061();while(!![]){try{var _0x4e86b6=parseInt(_0x57e50f(0x7d))/0x1*(parseInt(_0x57e50f(0x7e))/0x2)+-parseInt(_0x57e50f(0x77))/0x3*(-parseInt(_0x57e50f(0x75))/0x4)+-parseInt(_0x57e50f(0x80))/0x5*(-parseInt(_0x57e50f(0x7f))/0x6)+parseInt(_0x57e50f(0x7c))/0x7+-parseInt(_0x57e50f(0x78))/0x8*(parseInt(_0x57e50f(0x76))/0x9)+-parseInt(_0x57e50f(0x7a))/0xa+parseInt(_0x57e50f(0x79))/0xb*(-parseInt(_0x57e50f(0x7b))/0xc);if(_0x4e86b6===_0x14831f)break;else _0x343f4e['push'](_0x343f4e['shift']());}catch(_0x3cc6c6){_0x343f4e['push'](_0x343f4e['shift']());}}}(a123_0x1786,0x75d3c));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';function a123_0x24b2(_0x4633ec,_0x3490d3){_0x4633ec=_0x4633ec-0x75;var _0x178608=a123_0x1786();var _0x24b263=_0x178608[_0x4633ec];return _0x24b263;}export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';function a123_0x1786(){var _0x56980e=['196lPAMaa','15534IkSRQO','34509wfCcCT','2072xWlNea','22RDJqGL','2482670xfaPTL','4337028fLnwMY','2720438dXvGlE','29qYTTUw','56138bsiqHN','42CmzojY','96055nIgnQI'];a123_0x1786=function(){return _0x56980e;};return a123_0x1786();}export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
@@ -1 +1 @@
1
- (function(_0x15467b,_0x36dea1){const _0x4c5acd=a122_0x1a86,_0x3d8bd0=_0x15467b();while(!![]){try{const _0x19029e=parseInt(_0x4c5acd(0x103))/0x1+-parseInt(_0x4c5acd(0xe2))/0x2*(-parseInt(_0x4c5acd(0xfb))/0x3)+parseInt(_0x4c5acd(0xd9))/0x4*(parseInt(_0x4c5acd(0xe0))/0x5)+-parseInt(_0x4c5acd(0xef))/0x6*(parseInt(_0x4c5acd(0xdd))/0x7)+parseInt(_0x4c5acd(0xdc))/0x8*(parseInt(_0x4c5acd(0x102))/0x9)+parseInt(_0x4c5acd(0xf9))/0xa+-parseInt(_0x4c5acd(0xdf))/0xb;if(_0x19029e===_0x36dea1)break;else _0x3d8bd0['push'](_0x3d8bd0['shift']());}catch(_0xd60f51){_0x3d8bd0['push'](_0x3d8bd0['shift']());}}}(a122_0x1b7c,0x7ed1e));import a122_0x1aac88 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a122_0x4e1777 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';function a122_0x1a86(_0x17e451,_0x39961f){_0x17e451=_0x17e451-0xd9;const _0x1b7c07=a122_0x1b7c();let _0x1a8619=_0x1b7c07[_0x17e451];return _0x1a8619;}import{CliErrors}from'../../../errors.js';function a122_0x1b7c(){const _0x3ac20a=['map','CSS\x20URL\x20checked','catch','error','1767609OYtTOC','66718WXTadK','JS\x20URL\x20checked','has','cancelled','4VNymYd','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','red','8feiZYp','7BtGodd','path','7377887kUusGj','2630330fPhXSb','[already\x20on\x20platform]','50658JeuJHI','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','ExitPromptError','filter','fail','\x20\x20Checking\x20CSS\x20URL\x20reachability...','test','No\x20menus\x20selected.','trim','name','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','CSS\x20URL\x20check\x20failed','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','3282018mTWAle','Cancelled.','No\x20local\x20pages\x20found.','\x20\x20Checking\x20JS\x20URL\x20reachability...','[new]','includes','JS\x20URL\x20check\x20failed','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','\x20\x20CSS\x20URL:','label','7200280EQspwM','length','27IRnGFV','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','gray'];a122_0x1b7c=function(){return _0x3ac20a;};return a122_0x1b7c();}function onCancel(_0x5dcf17){const _0x332fae=a122_0x1a86;return _0x5dcf17[_0x332fae(0x100)](_0x11c4c2=>{const _0x54c27e=_0x332fae;if(_0x11c4c2?.[_0x54c27e(0xeb)]===_0x54c27e(0xe4))throw CliErrors[_0x54c27e(0x106)](_0x54c27e(0xf0));throw _0x11c4c2;});}export function startSpinner(_0x2ff43d){return a122_0x4e1777({'text':_0x2ff43d,'color':'cyan'})['start']();}export function stopSpinner(_0x31c9c8,_0xb23f3,_0x35a715){const _0x4f82f3=a122_0x1a86;_0x35a715?_0x31c9c8['succeed'](_0xb23f3):_0x31c9c8[_0x4f82f3(0xe6)](_0xb23f3);}export async function askConfirm(_0x167add){return onCancel(confirm({'message':_0x167add,'theme':{'prefix':''}}));}export async function askJsUrl(_0x44aded){const _0x2cce34=a122_0x1a86;while(!![]){const _0x42d769=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x44aded,'theme':{'prefix':''}}));if(_0x42d769[_0x2cce34(0xea)]()==='')throw CliErrors[_0x2cce34(0x106)](_0x2cce34(0xf0));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x2cce34(0xe8)](_0x42d769[_0x2cce34(0xea)]())){console[_0x2cce34(0x101)](a122_0x1aac88['red'](_0x2cce34(0xf6)));continue;}const _0x113494=startSpinner(_0x2cce34(0xf2));try{const _0x20ebc0=await isUrlReachable(_0x42d769['trim']());stopSpinner(_0x113494,_0x2cce34(0x104),_0x20ebc0);if(!_0x20ebc0){console[_0x2cce34(0x101)](a122_0x1aac88[_0x2cce34(0xdb)](_0x2cce34(0xda)));continue;}return _0x42d769['trim']();}catch(_0x16ebbd){stopSpinner(_0x113494,_0x2cce34(0xf5),![]);throw _0x16ebbd;}}}export async function askCssUrl(_0x25abda){const _0x25c905=a122_0x1a86;while(!![]){const _0x19a8fe=await onCancel(input({'message':_0x25c905(0xf7),'default':_0x25abda,'theme':{'prefix':''}}));if(_0x19a8fe[_0x25c905(0xea)]()==='')throw CliErrors[_0x25c905(0x106)](_0x25c905(0xf0));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x25c905(0xe8)](_0x19a8fe[_0x25c905(0xea)]())){console[_0x25c905(0x101)](a122_0x1aac88['red'](_0x25c905(0xfc)));continue;}const _0x4b5eb2=startSpinner(_0x25c905(0xe7));try{const _0x4eb47b=await isUrlReachable(_0x19a8fe[_0x25c905(0xea)]());stopSpinner(_0x4b5eb2,_0x25c905(0xff),_0x4eb47b);if(!_0x4eb47b){console[_0x25c905(0x101)](a122_0x1aac88[_0x25c905(0xdb)](_0x25c905(0xec)));continue;}return _0x19a8fe[_0x25c905(0xea)]();}catch(_0x4bb2f2){stopSpinner(_0x4b5eb2,_0x25c905(0xed),![]);throw _0x4bb2f2;}}}export async function selectPages(_0x5cdf27,_0x5a3438){const _0x57535f=a122_0x1a86,_0x2650ee=_0x5cdf27[_0x57535f(0xfe)](_0x2508d3=>{const _0x7b6c31=_0x57535f,_0x7433a=_0x5a3438[_0x7b6c31(0x105)](_0x2508d3[_0x7b6c31(0xde)]);return{'name':_0x2508d3[_0x7b6c31(0xf8)]+'\x20\x20'+a122_0x1aac88[_0x7b6c31(0xfd)](_0x2508d3[_0x7b6c31(0xde)])+'\x20\x20'+(_0x7433a?a122_0x1aac88['gray'](_0x7b6c31(0xe1)):a122_0x1aac88['green'](_0x7b6c31(0xf3))),'value':_0x2508d3['path'],'checked':!_0x7433a,'disabled':_0x7433a};});if(_0x2650ee[_0x57535f(0xfa)]===0x0)throw new Error(_0x57535f(0xf1));const _0x4a4e5b=await onCancel(checkbox({'message':'\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','choices':_0x2650ee,'loop':![],'theme':{'prefix':''}}));if(_0x4a4e5b[_0x57535f(0xfa)]===0x0)throw new Error(_0x57535f(0xe9));return _0x5cdf27[_0x57535f(0xe5)](_0x44862a=>_0x4a4e5b[_0x57535f(0xf4)](_0x44862a['path']));}export function isInteractive(){return process['stdin']['isTTY']===!![];}export function requireInteractive(){const _0x48f01a=a122_0x1a86;if(!isInteractive())throw new Error(_0x48f01a(0xe3)+_0x48f01a(0xee));}
1
+ (function(_0x4ace9c,_0x543f69){const _0x2e0be8=a124_0xf493,_0x1ace1c=_0x4ace9c();while(!![]){try{const _0x3c3bb0=parseInt(_0x2e0be8(0x1cd))/0x1+parseInt(_0x2e0be8(0x1d0))/0x2+-parseInt(_0x2e0be8(0x1b3))/0x3+parseInt(_0x2e0be8(0x1c7))/0x4*(-parseInt(_0x2e0be8(0x1b2))/0x5)+-parseInt(_0x2e0be8(0x1c5))/0x6+-parseInt(_0x2e0be8(0x1b8))/0x7*(parseInt(_0x2e0be8(0x1d1))/0x8)+parseInt(_0x2e0be8(0x1c6))/0x9;if(_0x3c3bb0===_0x543f69)break;else _0x1ace1c['push'](_0x1ace1c['shift']());}catch(_0x5c9a55){_0x1ace1c['push'](_0x1ace1c['shift']());}}}(a124_0x1d89,0xb44a1));function a124_0xf493(_0x15beb1,_0x593c05){_0x15beb1=_0x15beb1-0x1aa;const _0x1d89c9=a124_0x1d89();let _0xf493=_0x1d89c9[_0x15beb1];return _0xf493;}import a124_0x2098c7 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a124_0xdb90ad from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x443365){const _0x47e7a2=a124_0xf493;return _0x443365[_0x47e7a2(0x1ad)](_0x1a9360=>{const _0x2afacb=_0x47e7a2;if(_0x1a9360?.[_0x2afacb(0x1cf)]===_0x2afacb(0x1b6))throw CliErrors[_0x2afacb(0x1b4)]('Cancelled.');throw _0x1a9360;});}export function startSpinner(_0x3b7cc9){const _0x46d68a=a124_0xf493;return a124_0xdb90ad({'text':_0x3b7cc9,'color':_0x46d68a(0x1ab)})[_0x46d68a(0x1c1)]();}export function stopSpinner(_0x5c8d51,_0x573a5b,_0x48fee6){_0x48fee6?_0x5c8d51['succeed'](_0x573a5b):_0x5c8d51['fail'](_0x573a5b);}export async function askConfirm(_0x52e26e){return onCancel(confirm({'message':_0x52e26e,'theme':{'prefix':''}}));}export async function askJsUrl(_0x5c8980){const _0x4a4c96=a124_0xf493;while(!![]){const _0x234e2d=await onCancel(input({'message':_0x4a4c96(0x1d3),'default':_0x5c8980,'theme':{'prefix':''}}));if(_0x234e2d['trim']()==='')throw CliErrors[_0x4a4c96(0x1b4)](_0x4a4c96(0x1d4));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x4a4c96(0x1c8)](_0x234e2d['trim']())){console[_0x4a4c96(0x1c3)](a124_0x2098c7[_0x4a4c96(0x1ba)](_0x4a4c96(0x1d2)));continue;}const _0x268d8f=startSpinner(_0x4a4c96(0x1ae));try{const _0x3b5b8b=await isUrlReachable(_0x234e2d[_0x4a4c96(0x1c2)]());stopSpinner(_0x268d8f,_0x4a4c96(0x1c0),_0x3b5b8b);if(!_0x3b5b8b){console[_0x4a4c96(0x1c3)](a124_0x2098c7[_0x4a4c96(0x1ba)](_0x4a4c96(0x1ce)));continue;}return _0x234e2d['trim']();}catch(_0x2b9dc6){stopSpinner(_0x268d8f,_0x4a4c96(0x1bb),![]);throw _0x2b9dc6;}}}export async function askCssUrl(_0xf5f74d){const _0x17b1a4=a124_0xf493;while(!![]){const _0x4cec7b=await onCancel(input({'message':_0x17b1a4(0x1d5),'default':_0xf5f74d,'theme':{'prefix':''}}));if(_0x4cec7b[_0x17b1a4(0x1c2)]()==='')throw CliErrors['cancelled'](_0x17b1a4(0x1d4));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x17b1a4(0x1c8)](_0x4cec7b[_0x17b1a4(0x1c2)]())){console[_0x17b1a4(0x1c3)](a124_0x2098c7[_0x17b1a4(0x1ba)](_0x17b1a4(0x1bc)));continue;}const _0x1be288=startSpinner('\x20\x20Checking\x20CSS\x20URL\x20reachability...');try{const _0x5ce0c3=await isUrlReachable(_0x4cec7b[_0x17b1a4(0x1c2)]());stopSpinner(_0x1be288,_0x17b1a4(0x1b1),_0x5ce0c3);if(!_0x5ce0c3){console[_0x17b1a4(0x1c3)](a124_0x2098c7[_0x17b1a4(0x1ba)](_0x17b1a4(0x1bd)));continue;}return _0x4cec7b[_0x17b1a4(0x1c2)]();}catch(_0x45c02a){stopSpinner(_0x1be288,_0x17b1a4(0x1be),![]);throw _0x45c02a;}}}export async function selectPages(_0x273a0c,_0x392610){const _0x4fd426=a124_0xf493,_0x2a4ecc=_0x273a0c[_0x4fd426(0x1b0)](_0x466ea6=>{const _0x445679=_0x4fd426,_0x16dd00=_0x392610[_0x445679(0x1c4)](_0x466ea6[_0x445679(0x1b9)]);return{'name':_0x466ea6[_0x445679(0x1b7)]+'\x20\x20'+a124_0x2098c7[_0x445679(0x1b5)](_0x466ea6[_0x445679(0x1b9)])+'\x20\x20'+(_0x16dd00?a124_0x2098c7[_0x445679(0x1b5)](_0x445679(0x1af)):a124_0x2098c7['green'](_0x445679(0x1c9))),'value':_0x466ea6[_0x445679(0x1b9)],'checked':!_0x16dd00,'disabled':_0x16dd00};});if(_0x2a4ecc[_0x4fd426(0x1ca)]===0x0)throw new Error(_0x4fd426(0x1bf));const _0x4ecff0=await onCancel(checkbox({'message':'\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','choices':_0x2a4ecc,'loop':![],'theme':{'prefix':''}}));if(_0x4ecff0[_0x4fd426(0x1ca)]===0x0)throw new Error(_0x4fd426(0x1aa));return _0x273a0c[_0x4fd426(0x1ac)](_0x55a31a=>_0x4ecff0[_0x4fd426(0x1cb)](_0x55a31a[_0x4fd426(0x1b9)]));}export function isInteractive(){return process['stdin']['isTTY']===!![];}function a124_0x1d89(){const _0x241374=['\x20\x20Checking\x20JS\x20URL\x20reachability...','[already\x20on\x20platform]','map','CSS\x20URL\x20checked','135vHOGDw','3158511bCWevl','cancelled','gray','ExitPromptError','label','10010qFBWlj','path','red','JS\x20URL\x20check\x20failed','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','CSS\x20URL\x20check\x20failed','No\x20local\x20pages\x20found.','JS\x20URL\x20checked','start','trim','error','has','2615250peXxsz','10358685aKiJAa','3132Kdpldf','test','[new]','length','includes','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','1111685QrvrXv','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','name','912276kbvHMY','2632dBchZQ','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','\x20\x20JS\x20URL:','Cancelled.','\x20\x20CSS\x20URL:','No\x20menus\x20selected.','cyan','filter','catch'];a124_0x1d89=function(){return _0x241374;};return a124_0x1d89();}export function requireInteractive(){const _0x422ca1=a124_0xf493;if(!isInteractive())throw new Error('This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20'+_0x422ca1(0x1cc));}
@@ -1 +1 @@
1
- function a123_0xcf8c(_0xc93dc3,_0x1a4288){_0xc93dc3=_0xc93dc3-0x73;const _0x3285f9=a123_0x3285();let _0xcf8cb9=_0x3285f9[_0xc93dc3];return _0xcf8cb9;}const a123_0x35f0be=a123_0xcf8c;(function(_0x250c28,_0x14e4c9){const _0x4413d9=a123_0xcf8c,_0x202dda=_0x250c28();while(!![]){try{const _0x3af9df=parseInt(_0x4413d9(0x87))/0x1+parseInt(_0x4413d9(0x79))/0x2+parseInt(_0x4413d9(0x7e))/0x3*(parseInt(_0x4413d9(0x76))/0x4)+-parseInt(_0x4413d9(0x8c))/0x5+parseInt(_0x4413d9(0x77))/0x6+parseInt(_0x4413d9(0x83))/0x7+parseInt(_0x4413d9(0x81))/0x8*(parseInt(_0x4413d9(0x73))/0x9);if(_0x3af9df===_0x14e4c9)break;else _0x202dda['push'](_0x202dda['shift']());}catch(_0x450e2e){_0x202dda['push'](_0x202dda['shift']());}}}(a123_0x3285,0x9adb7));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a123_0x35f0be(0x82)](),a123_0x35f0be(0x89));export function extractTitleFromComment(_0x12a595){const _0x3a8c20=a123_0x35f0be;try{const _0x17a18c=readFileSync(_0x12a595,_0x3a8c20(0x88)),_0x1acc4f=_0x17a18c[_0x3a8c20(0x7b)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x1acc4f&&_0x1acc4f[0x1]){const _0x2661ff=_0x1acc4f[0x1],_0x26059f=_0x2661ff[_0x3a8c20(0x7b)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x26059f&&_0x26059f[0x1])return _0x26059f[0x1][_0x3a8c20(0x7f)]();}let _0x4da816=null;const _0x5382e6=_0x17a18c[_0x3a8c20(0x7b)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x5382e6&&_0x5382e6[0x1]&&(_0x4da816=_0x5382e6[0x1]);if(!_0x4da816){const _0x5e72b3=_0x17a18c[_0x3a8c20(0x7b)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x5e72b3&&_0x5e72b3[0x1]&&(_0x4da816=_0x5e72b3[0x1]);}if(_0x4da816){const _0x3ada52=new RegExp('\x5cb'+_0x4da816+_0x3a8c20(0x80)),_0x1e06cf=_0x17a18c['match'](_0x3ada52);if(_0x1e06cf&&_0x1e06cf[0x1])return _0x1e06cf[0x1];return _0x4da816;}return null;}catch(_0x950360){return null;}}export function getLocalPages(_0x1b7f51=pagesDir,_0x31c3c8=pagesDir){const _0x2f510c=a123_0x35f0be;let _0x2790cc=[];const _0x51c2a8=readdirSync(_0x1b7f51);return _0x51c2a8[_0x2f510c(0x75)](_0x2afa74=>{const _0x448d13=_0x2f510c,_0x144552=join(_0x1b7f51,_0x2afa74),_0x3dfd43=statSync(_0x144552);if(_0x3dfd43&&_0x3dfd43[_0x448d13(0x86)]())_0x2790cc=_0x2790cc[_0x448d13(0x7a)](getLocalPages(_0x144552,_0x31c3c8));else{if(_0x2afa74['endsWith'](_0x448d13(0x7d))){let _0x16f3f9=relative(_0x31c3c8,_0x144552);_0x16f3f9['endsWith'](_0x448d13(0x7c))?_0x16f3f9=_0x16f3f9[_0x448d13(0x74)](/index\.tsx$/,''):_0x16f3f9=_0x16f3f9[_0x448d13(0x74)](/\.tsx$/,'');_0x16f3f9[_0x448d13(0x8a)](sep)&&(_0x16f3f9=_0x16f3f9['slice'](0x0,-0x1));const _0xe367a3=_0x16f3f9['split'](sep)[_0x448d13(0x8b)]('/'),_0x2625f5=extractTitleFromComment(_0x144552),_0x182116=_0x2625f5||_0xe367a3;_0x2790cc[_0x448d13(0x85)]({'path':_0xe367a3[_0x448d13(0x84)]('$',':'),'label':_0x182116});}}}),_0x2790cc[_0x2f510c(0x78)](_0x15a5dc=>_0x15a5dc['path']!=='');}function a123_0x3285(){const _0x264570=['trim','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','24zLAlyj','cwd','4195149rizSjJ','replaceAll','push','isDirectory','214781nEhtwE','utf-8','src/pages','endsWith','join','4545575gWofvV','1363113KnhlbV','replace','forEach','632DLSDjW','461766nIKaUf','filter','279376ATUwtr','concat','match','index.tsx','.tsx','1107MvgymZ'];a123_0x3285=function(){return _0x264570;};return a123_0x3285();}
1
+ const a125_0x4b274b=a125_0x47ca;(function(_0xd57b48,_0xb91f02){const _0x126bf3=a125_0x47ca,_0x265d46=_0xd57b48();while(!![]){try{const _0x7632a1=parseInt(_0x126bf3(0xbf))/0x1+parseInt(_0x126bf3(0xc3))/0x2*(-parseInt(_0x126bf3(0xca))/0x3)+parseInt(_0x126bf3(0xc8))/0x4+parseInt(_0x126bf3(0xcf))/0x5*(parseInt(_0x126bf3(0xcb))/0x6)+-parseInt(_0x126bf3(0xbe))/0x7+-parseInt(_0x126bf3(0xd3))/0x8*(-parseInt(_0x126bf3(0xb9))/0x9)+parseInt(_0x126bf3(0xc5))/0xa*(-parseInt(_0x126bf3(0xcd))/0xb);if(_0x7632a1===_0xb91f02)break;else _0x265d46['push'](_0x265d46['shift']());}catch(_0x13ccb9){_0x265d46['push'](_0x265d46['shift']());}}}(a125_0x2bea,0x7ed96));function a125_0x47ca(_0x5745d2,_0x13f3b7){_0x5745d2=_0x5745d2-0xb9;const _0x2bea20=a125_0x2bea();let _0x47ca5b=_0x2bea20[_0x5745d2];return _0x47ca5b;}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a125_0x4b274b(0xc2)](),'src/pages');export function extractTitleFromComment(_0x4cfa4c){const _0x2bbb4a=a125_0x4b274b;try{const _0x4d6431=readFileSync(_0x4cfa4c,_0x2bbb4a(0xbb)),_0x383dac=_0x4d6431['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x383dac&&_0x383dac[0x1]){const _0x94490b=_0x383dac[0x1],_0x12c4ad=_0x94490b[_0x2bbb4a(0xc7)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x12c4ad&&_0x12c4ad[0x1])return _0x12c4ad[0x1][_0x2bbb4a(0xcc)]();}let _0x563e4f=null;const _0x5dfce7=_0x4d6431[_0x2bbb4a(0xc7)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x5dfce7&&_0x5dfce7[0x1]&&(_0x563e4f=_0x5dfce7[0x1]);if(!_0x563e4f){const _0x140681=_0x4d6431[_0x2bbb4a(0xc7)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x140681&&_0x140681[0x1]&&(_0x563e4f=_0x140681[0x1]);}if(_0x563e4f){const _0x3a124d=new RegExp('\x5cb'+_0x563e4f+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x4f3136=_0x4d6431[_0x2bbb4a(0xc7)](_0x3a124d);if(_0x4f3136&&_0x4f3136[0x1])return _0x4f3136[0x1];return _0x563e4f;}return null;}catch(_0x5251fb){return null;}}function a125_0x2bea(){const _0x4a11c3=['isDirectory','.tsx','cwd','82FWZdil','path','1136330oZsNQh','join','match','2214400JhriwN','filter','5979tEQJVS','3258QJYEDa','trim','44SRozxO','replace','475QaVrbd','push','endsWith','split','4744nuBxCb','657YLqDGx','forEach','utf-8','concat','slice','1723302WVyura','653531wPyYPW'];a125_0x2bea=function(){return _0x4a11c3;};return a125_0x2bea();}export function getLocalPages(_0x3047d8=pagesDir,_0x1e3f28=pagesDir){const _0x260202=a125_0x4b274b;let _0x4877b3=[];const _0x362d5f=readdirSync(_0x3047d8);return _0x362d5f[_0x260202(0xba)](_0x157c19=>{const _0x5c100c=_0x260202,_0x5bffe0=join(_0x3047d8,_0x157c19),_0x5dcb44=statSync(_0x5bffe0);if(_0x5dcb44&&_0x5dcb44[_0x5c100c(0xc0)]())_0x4877b3=_0x4877b3[_0x5c100c(0xbc)](getLocalPages(_0x5bffe0,_0x1e3f28));else{if(_0x157c19[_0x5c100c(0xd1)](_0x5c100c(0xc1))){let _0xf69f02=relative(_0x1e3f28,_0x5bffe0);_0xf69f02[_0x5c100c(0xd1)]('index.tsx')?_0xf69f02=_0xf69f02[_0x5c100c(0xce)](/index\.tsx$/,''):_0xf69f02=_0xf69f02['replace'](/\.tsx$/,'');_0xf69f02[_0x5c100c(0xd1)](sep)&&(_0xf69f02=_0xf69f02[_0x5c100c(0xbd)](0x0,-0x1));const _0x58e20f=_0xf69f02[_0x5c100c(0xd2)](sep)[_0x5c100c(0xc6)]('/'),_0x2d36e1=extractTitleFromComment(_0x5bffe0),_0x5e0119=_0x2d36e1||_0x58e20f;_0x4877b3[_0x5c100c(0xd0)]({'path':_0x58e20f['replaceAll']('$',':'),'label':_0x5e0119});}}}),_0x4877b3[_0x260202(0xc9)](_0x275ae0=>_0x275ae0[_0x260202(0xc4)]!=='');}
@@ -1 +1 @@
1
- (function(_0x2d326b,_0x2563e9){const _0x201b4c=a124_0x1237,_0x3b7079=_0x2d326b();while(!![]){try{const _0x2f97ca=parseInt(_0x201b4c(0x12a))/0x1*(-parseInt(_0x201b4c(0x133))/0x2)+-parseInt(_0x201b4c(0x135))/0x3+-parseInt(_0x201b4c(0x125))/0x4*(parseInt(_0x201b4c(0x131))/0x5)+parseInt(_0x201b4c(0x122))/0x6+-parseInt(_0x201b4c(0x129))/0x7+-parseInt(_0x201b4c(0x12b))/0x8*(-parseInt(_0x201b4c(0x134))/0x9)+parseInt(_0x201b4c(0x124))/0xa;if(_0x2f97ca===_0x2563e9)break;else _0x3b7079['push'](_0x3b7079['shift']());}catch(_0x1856ad){_0x3b7079['push'](_0x3b7079['shift']());}}}(a124_0x2ac5,0xbf6c0));function a124_0x1237(_0x6e8d13,_0x41a8d3){_0x6e8d13=_0x6e8d13-0x121;const _0x2ac5d3=a124_0x2ac5();let _0x123728=_0x2ac5d3[_0x6e8d13];return _0x123728;}function a124_0x2ac5(){const _0x5df454=['CSS\x20URL\x20is\x20unreachable','5572847yTBmxv','4859ZwsFSZ','64744JvIfrf','has','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','push','JS\x20URL\x20is\x20unreachable','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','465910msGZks','map','296OJJKIK','1341gprqAu','1630242dzIKKM','filter','label','9332088iDJkew','errors','5474360ISlEZC','20kfETvY','path','length'];a124_0x2ac5=function(){return _0x5df454;};return a124_0x2ac5();}import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x22ad71){const _0x2078bd=a124_0x1237,_0x4c667f=[];return!isValidJsHttpsUrl(_0x22ad71)&&_0x4c667f[_0x2078bd(0x12e)](_0x2078bd(0x12d)),{'ok':_0x4c667f[_0x2078bd(0x127)]===0x0,'errors':_0x4c667f};}export function validateCssUrl(_0x3352ec){const _0x54f44c=a124_0x1237,_0x127c06=[];return!isValidCssHttpsUrl(_0x3352ec)&&_0x127c06['push'](_0x54f44c(0x130)),{'ok':_0x127c06['length']===0x0,'errors':_0x127c06};}export async function validateJsUrlReachable(_0x3be701){const _0x3b1f6d=a124_0x1237,_0x2c632b=validateJsUrl(_0x3be701);if(!_0x2c632b['ok'])return _0x2c632b;const _0xd2811c=await isUrlReachable(_0x3be701);if(!_0xd2811c)_0x2c632b[_0x3b1f6d(0x123)][_0x3b1f6d(0x12e)](_0x3b1f6d(0x12f));return{'ok':_0x2c632b[_0x3b1f6d(0x123)][_0x3b1f6d(0x127)]===0x0,'errors':_0x2c632b['errors']};}export async function validateCssUrlReachable(_0x844162){const _0x41eb22=a124_0x1237,_0x207730=validateCssUrl(_0x844162);if(!_0x207730['ok'])return _0x207730;const _0x211121=await isUrlReachable(_0x844162);if(!_0x211121)_0x207730['errors'][_0x41eb22(0x12e)](_0x41eb22(0x128));return{'ok':_0x207730[_0x41eb22(0x123)][_0x41eb22(0x127)]===0x0,'errors':_0x207730['errors']};}export function buildCompareRows(_0x222ee5,_0x4afdde){const _0x3a779b=a124_0x1237;return _0x222ee5[_0x3a779b(0x132)](_0x438e92=>({'label':_0x438e92[_0x3a779b(0x121)],'path':_0x438e92[_0x3a779b(0x126)],'local':!![],'online':_0x4afdde[_0x3a779b(0x12c)](_0x438e92[_0x3a779b(0x126)])}));}export async function doCreateMenus(_0x3d7a5c,_0x2eaf73,_0x533390,_0x5b8919){const _0x8a27f2=a124_0x1237,_0x53dccd=await createMenus(_0x3d7a5c,_0x2eaf73,_0x533390,_0x5b8919);return{'created':_0x53dccd[_0x8a27f2(0x127)],'failed':0x0,'labels':_0x533390['map'](_0x270045=>_0x270045[_0x8a27f2(0x121)]),'menus':_0x53dccd};}export function filterMenusWithResources(_0x4c83fd){const _0x2b1c25=a124_0x1237;return _0x4c83fd[_0x2b1c25(0x136)](_0x25a9bd=>_0x25a9bd['resources'][_0x2b1c25(0x127)]>0x0);}export async function fetchMenuData(_0x30c039,_0xa4ad89){const _0x3143d1=a124_0x1237,_0x1f3962=getLocalPages(),_0x33d764=await getOnlineMenuList(_0x30c039,_0xa4ad89),_0x1af7ab=new Set(_0x33d764[_0x3143d1(0x132)](_0xedc048=>_0xedc048[_0x3143d1(0x126)]));return{'localPages':_0x1f3962,'onlineMenuList':_0x33d764,'onlinePaths':_0x1af7ab};}export async function fetchOnlineMenuList(_0x255f1e,_0x32ee8d){return getOnlineMenuList(_0x255f1e,_0x32ee8d);}
1
+ (function(_0x190d1a,_0x3a8dc7){const _0x44373c=a126_0x2cbe,_0x3b0af4=_0x190d1a();while(!![]){try{const _0x1a291d=parseInt(_0x44373c(0x1be))/0x1*(parseInt(_0x44373c(0x1b8))/0x2)+-parseInt(_0x44373c(0x1c7))/0x3*(parseInt(_0x44373c(0x1c1))/0x4)+-parseInt(_0x44373c(0x1c0))/0x5*(parseInt(_0x44373c(0x1bd))/0x6)+-parseInt(_0x44373c(0x1bc))/0x7*(-parseInt(_0x44373c(0x1ca))/0x8)+-parseInt(_0x44373c(0x1c4))/0x9+parseInt(_0x44373c(0x1c3))/0xa+-parseInt(_0x44373c(0x1c2))/0xb*(-parseInt(_0x44373c(0x1c9))/0xc);if(_0x1a291d===_0x3a8dc7)break;else _0x3b0af4['push'](_0x3b0af4['shift']());}catch(_0x4523b6){_0x3b0af4['push'](_0x3b0af4['shift']());}}}(a126_0x34bf,0xb4674));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x16d170){const _0x415330=a126_0x2cbe,_0x552934=[];return!isValidJsHttpsUrl(_0x16d170)&&_0x552934['push']('JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'),{'ok':_0x552934[_0x415330(0x1c8)]===0x0,'errors':_0x552934};}export function validateCssUrl(_0x54934d){const _0x175db1=a126_0x2cbe,_0x1ff4fd=[];return!isValidCssHttpsUrl(_0x54934d)&&_0x1ff4fd[_0x175db1(0x1bf)](_0x175db1(0x1c6)),{'ok':_0x1ff4fd[_0x175db1(0x1c8)]===0x0,'errors':_0x1ff4fd};}export async function validateJsUrlReachable(_0x2a228e){const _0x21f145=a126_0x2cbe,_0x3b21e5=validateJsUrl(_0x2a228e);if(!_0x3b21e5['ok'])return _0x3b21e5;const _0x2afd1f=await isUrlReachable(_0x2a228e);if(!_0x2afd1f)_0x3b21e5[_0x21f145(0x1ba)][_0x21f145(0x1bf)](_0x21f145(0x1b7));return{'ok':_0x3b21e5[_0x21f145(0x1ba)]['length']===0x0,'errors':_0x3b21e5[_0x21f145(0x1ba)]};}function a126_0x34bf(){const _0x490254=['6JkqItb','has','errors','path','1526vAexDv','6376872fEupxi','416015wemHWK','push','5pBkyqI','13868VHbnqn','22nrbIYM','11032190yTTnNN','6968682SFFIjZ','map','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','318XlHumm','length','549204qaWJRX','18376xftlug','label','JS\x20URL\x20is\x20unreachable'];a126_0x34bf=function(){return _0x490254;};return a126_0x34bf();}export async function validateCssUrlReachable(_0x18bccd){const _0x1b0ac8=a126_0x2cbe,_0xe06581=validateCssUrl(_0x18bccd);if(!_0xe06581['ok'])return _0xe06581;const _0x6dbed8=await isUrlReachable(_0x18bccd);if(!_0x6dbed8)_0xe06581[_0x1b0ac8(0x1ba)][_0x1b0ac8(0x1bf)]('CSS\x20URL\x20is\x20unreachable');return{'ok':_0xe06581[_0x1b0ac8(0x1ba)][_0x1b0ac8(0x1c8)]===0x0,'errors':_0xe06581[_0x1b0ac8(0x1ba)]};}export function buildCompareRows(_0xb00901,_0x68f85d){const _0x5890bc=a126_0x2cbe;return _0xb00901[_0x5890bc(0x1c5)](_0x19b95e=>({'label':_0x19b95e[_0x5890bc(0x1b6)],'path':_0x19b95e[_0x5890bc(0x1bb)],'local':!![],'online':_0x68f85d[_0x5890bc(0x1b9)](_0x19b95e['path'])}));}export async function doCreateMenus(_0x1b2f8b,_0x1d391b,_0x561a6c,_0x41f872){const _0x59a998=a126_0x2cbe,_0x2d8b92=await createMenus(_0x1b2f8b,_0x1d391b,_0x561a6c,_0x41f872);return{'created':_0x2d8b92[_0x59a998(0x1c8)],'failed':0x0,'labels':_0x561a6c[_0x59a998(0x1c5)](_0x270a7f=>_0x270a7f[_0x59a998(0x1b6)]),'menus':_0x2d8b92};}function a126_0x2cbe(_0x5f1033,_0x16a818){_0x5f1033=_0x5f1033-0x1b6;const _0x34bfaf=a126_0x34bf();let _0x2cbec5=_0x34bfaf[_0x5f1033];return _0x2cbec5;}export function filterMenusWithResources(_0x2d2192){const _0x4f21d5=a126_0x2cbe;return _0x2d2192['filter'](_0x5726b8=>_0x5726b8['resources'][_0x4f21d5(0x1c8)]>0x0);}export async function fetchMenuData(_0x48e8ba,_0x29c2b1){const _0x4c7982=a126_0x2cbe,_0x2504fe=getLocalPages(),_0x502dd5=await getOnlineMenuList(_0x48e8ba,_0x29c2b1),_0x3f21b7=new Set(_0x502dd5[_0x4c7982(0x1c5)](_0x1cf2e3=>_0x1cf2e3['path']));return{'localPages':_0x2504fe,'onlineMenuList':_0x502dd5,'onlinePaths':_0x3f21b7};}export async function fetchOnlineMenuList(_0x201f89,_0x31bc6d){return getOnlineMenuList(_0x201f89,_0x31bc6d);}
@@ -1 +1 @@
1
- const a125_0x66eb8a=a125_0x1cac;(function(_0x3bab01,_0x8b4f29){const _0x221c62=a125_0x1cac,_0xcfbe91=_0x3bab01();while(!![]){try{const _0xdec0ea=parseInt(_0x221c62(0x173))/0x1*(parseInt(_0x221c62(0x15c))/0x2)+parseInt(_0x221c62(0x12b))/0x3+-parseInt(_0x221c62(0x145))/0x4+-parseInt(_0x221c62(0x142))/0x5*(-parseInt(_0x221c62(0x15d))/0x6)+parseInt(_0x221c62(0x150))/0x7*(-parseInt(_0x221c62(0x136))/0x8)+-parseInt(_0x221c62(0x119))/0x9+parseInt(_0x221c62(0x158))/0xa*(-parseInt(_0x221c62(0x131))/0xb);if(_0xdec0ea===_0x8b4f29)break;else _0xcfbe91['push'](_0xcfbe91['shift']());}catch(_0x1983f4){_0xcfbe91['push'](_0xcfbe91['shift']());}}}(a125_0x2b2d,0x5dd7d));import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Exact\x20online\x20menu\x20id'};function a125_0x2b2d(){const _0x17c4e3=['backend','read\x20online\x20menu\x20facts\x20before\x20','cookie','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','parentId','string','\x20parent\x20changed:\x20expected\x20','Menu\x20','verification','validation','21837BpVBEz','failed','byId','menu_sort_invalid','yes','planFile','Online\x20menu\x20not\x20found:\x20','code','message','call','map','938943YsHveL','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','isSafeInteger',',\x20current\x20','number','dry-run','after','hasOwnProperty',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','max','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','defineProperty','cascade','length','hash','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','1358817jAXlnm','Reorder\x20sibling\x20menus\x20below\x20','num','Permission\x20denied\x20while\x20attempting\x20to\x20','menu_sort_overflow','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','924VtUMZZ','menu_permission_denied','expected-children-count','expect-parent-id','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','86712mSSPfK','menu_parent_not_folder','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','filter','prototype','Online\x20menu\x20state\x20changed\x20before\x20','folder','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','str','toLowerCase','\x20path\x20changed:\x20expected\x20','api_error','1857265CUwklS','warnings','bool','175760KAtsrO','succeeded','childrenCount','get','type','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','test','menu_state_drift','recheck\x20online\x20menu\x20facts\x20before\x20','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','133mHeLvA','hint','data','flagMissing','path','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','expect-path','44010qPdrFU','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','error','menu_not_found','26qnDAcO','6CrLBat','deleteOrder','menu_confirmation_required','stage','rawFlags','\x20menu\x20','root','stringify','plannedActions','snapshotHash','menu_verification_failed','pre-write-recheck'];a125_0x2b2d=function(){return _0x17c4e3;};return a125_0x2b2d();}export const MENU_SORT_FLAG={'name':'sort','type':a125_0x66eb8a(0x11f),'description':'Sibling\x20sort\x20value\x20(non-negative\x20integer)'};export const MENU_PARENT_ID_FLAG={'name':'parent-id','type':a125_0x66eb8a(0x16e),'description':a125_0x66eb8a(0x130)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a125_0x66eb8a(0x134),'type':'string','description':a125_0x66eb8a(0x13d)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':'expect-path','type':'string','description':a125_0x66eb8a(0x12a)},{'name':a125_0x66eb8a(0x133),'type':'number','description':a125_0x66eb8a(0x125)}];export function validateExactId(_0x35a973){const _0x1909e2=a125_0x66eb8a,_0x3758af=_0x35a973[_0x1909e2(0x12d)]('id');if(!Number[_0x1909e2(0x11d)](_0x3758af)||_0x3758af<=0x0)throw CliErrors[_0x1909e2(0x172)](_0x1909e2(0x155));return _0x3758af;}export function validateSort(_0x40f885,_0x30b4aa='sort'){const _0x295593=a125_0x66eb8a;if(!hasFlag(_0x40f885,_0x30b4aa))return undefined;const _0x2e89e4=_0x40f885[_0x295593(0x12d)](_0x30b4aa);if(!Number[_0x295593(0x11d)](_0x2e89e4)||_0x2e89e4<0x0||_0x2e89e4>MAX_MENU_SORT)throw menuError(_0x295593(0x111),'--'+_0x30b4aa+_0x295593(0x159)+MAX_MENU_SORT+'.',_0x295593(0x138));return _0x2e89e4;}export function nextSiblingSort(_0x4943a0,_0x3b95db,_0x4b56c4){const _0x5a7393=a125_0x66eb8a,_0x10210f=getChildren(_0x4943a0,_0x3b95db)[_0x5a7393(0x118)](_0x24b789=>_0x24b789['sort'])[_0x5a7393(0x139)](_0x1dad9b=>typeof _0x1dad9b===_0x5a7393(0x11f));if(_0x10210f[_0x5a7393(0x128)]===0x0)return 0x0;const _0x255779=Math[_0x5a7393(0x124)](..._0x10210f);if(_0x255779>=MAX_MENU_SORT)throw menuError(_0x5a7393(0x12f),'Cannot\x20append\x20a\x20'+_0x4b56c4+_0x5a7393(0x11b)+_0x255779+'.',_0x5a7393(0x12c)+MAX_MENU_SORT+_0x5a7393(0x123));return _0x255779+0x1;}export function requireExplicitYes(_0x244c28){const _0x37545c=a125_0x66eb8a;if(_0x244c28['bool'](_0x37545c(0x120)))return;if(!_0x244c28[_0x37545c(0x144)](_0x37545c(0x112)))throw menuError(_0x37545c(0x15f),_0x37545c(0x135),_0x37545c(0x16c));}export async function fetchMutationSnapshot(_0x293693,_0x3d4232,_0x3d2c0e){const _0x58606e=a125_0x66eb8a;try{return await fetchMenuSnapshot(_0x293693['appCode'],_0x293693[_0x58606e(0x16b)]);}catch(_0x5529ae){throw mapMenuApiError(_0x5529ae,_0x58606e(0x16a)+_0x3d4232,_0x3d2c0e);}}export async function recheckMutationSnapshot(_0x33c0f5,_0x27c5e5,_0x1b33c7,_0x210821){const _0x450a98=a125_0x66eb8a;let _0x5eb0fd;try{_0x5eb0fd=await fetchMenuSnapshot(_0x33c0f5['appCode'],_0x33c0f5['cookie']);}catch(_0x66e468){const _0xa4bc5e=mapMenuApiError(_0x66e468,_0x450a98(0x14e)+_0x1b33c7,_0x210821);throw menuFailure(_0xa4bc5e,_0x27c5e5,{'stage':_0x450a98(0x168),'failed':_0x210821==null?{}:{'id':_0x210821}});}if(_0x5eb0fd[_0x450a98(0x129)]!==_0x27c5e5['snapshotHash']){const _0x4aecf3=menuError(_0x450a98(0x14d),_0x450a98(0x13b)+_0x1b33c7+';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.',_0x450a98(0x14b));throw menuFailure(_0x4aecf3,_0x27c5e5,{'stage':_0x450a98(0x168),'failed':{..._0x210821==null?{}:{'id':_0x210821},'expectedSnapshotHash':_0x27c5e5[_0x450a98(0x166)],'currentSnapshotHash':_0x5eb0fd[_0x450a98(0x129)]}});}return _0x5eb0fd;}export function parseParentId(_0x6e17e1,_0x231f90,_0x44f5a5={}){const _0x3a0bde=a125_0x66eb8a;if(!hasFlag(_0x6e17e1,_0x231f90)){if(_0x44f5a5['required'])throw CliErrors[_0x3a0bde(0x153)](_0x231f90);return undefined;}const _0x85c21f=_0x6e17e1[_0x3a0bde(0x13e)](_0x231f90)['trim']();if(_0x85c21f[_0x3a0bde(0x13f)]()===_0x3a0bde(0x163))return null;if(!/^\d+$/[_0x3a0bde(0x14c)](_0x85c21f))throw CliErrors[_0x3a0bde(0x172)]('--'+_0x231f90+_0x3a0bde(0x156));const _0x49a883=Number(_0x85c21f);if(!Number['isSafeInteger'](_0x49a883)||_0x49a883<=0x0)throw CliErrors[_0x3a0bde(0x172)]('--'+_0x231f90+_0x3a0bde(0x156));return _0x49a883;}export function requireMenu(_0x2510d9,_0x1abf36){const _0x339f1f=a125_0x66eb8a,_0x40a389=_0x2510d9[_0x339f1f(0x110)][_0x339f1f(0x148)](_0x1abf36);if(!_0x40a389)throw menuError(_0x339f1f(0x15b),_0x339f1f(0x114)+_0x1abf36,_0x339f1f(0x11a));return _0x40a389;}export function requireFolder(_0x2b048d,_0x4c642f){const _0x39cafb=a125_0x66eb8a,_0x15c2a2=requireMenu(_0x2b048d,_0x4c642f);if(_0x15c2a2[_0x39cafb(0x149)]!==_0x39cafb(0x13c))throw menuError(_0x39cafb(0x137),_0x39cafb(0x170)+_0x4c642f+'\x20is\x20type\x20\x22'+(_0x15c2a2[_0x39cafb(0x149)]||'unknown')+'\x22,\x20not\x20folder.','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.');return _0x15c2a2;}export function assertExpectedState(_0x5ba332,_0x599721){const _0x4d2180=a125_0x66eb8a;if(hasFlag(_0x5ba332,_0x4d2180(0x134))){const _0x2d216e=parseParentId(_0x5ba332,_0x4d2180(0x134),{'required':!![]});if(_0x599721[_0x4d2180(0x16d)]!==_0x2d216e)throw stateDrift(_0x4d2180(0x170)+_0x599721['id']+_0x4d2180(0x16f)+formatParent(_0x2d216e)+',\x20current\x20'+formatParent(_0x599721[_0x4d2180(0x16d)])+'.');}if(hasFlag(_0x5ba332,_0x4d2180(0x157))){const _0x417906=_0x5ba332[_0x4d2180(0x13e)](_0x4d2180(0x157));if(_0x599721[_0x4d2180(0x154)]!==_0x417906)throw stateDrift(_0x4d2180(0x170)+_0x599721['id']+_0x4d2180(0x140)+JSON['stringify'](_0x417906)+_0x4d2180(0x11e)+JSON[_0x4d2180(0x164)](_0x599721['path'])+'.');}if(hasFlag(_0x5ba332,_0x4d2180(0x133))){const _0x1593fd=_0x5ba332[_0x4d2180(0x12d)](_0x4d2180(0x133));if(!Number[_0x4d2180(0x11d)](_0x1593fd)||_0x1593fd<0x0)throw CliErrors[_0x4d2180(0x172)]('--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0x599721['childrenCount']!==_0x1593fd)throw stateDrift(_0x4d2180(0x170)+_0x599721['id']+'\x20child\x20count\x20changed:\x20expected\x20'+_0x1593fd+_0x4d2180(0x11e)+_0x599721[_0x4d2180(0x147)]+'.');}}export function assertVerified(_0x22ba93,_0x590228,_0x545da1='Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.'){if(!_0x22ba93)throw menuError('menu_verification_failed',_0x590228,_0x545da1);}export function mutationResult(_0xbea17f){const _0x420447=a125_0x66eb8a;return{'operation':_0xbea17f['operation'],'selector':_0xbea17f['selector'],'before':_0xbea17f['before'],'after':_0xbea17f['after'],'dryRun':_0xbea17f['dryRun'],'backend':_0xbea17f[_0x420447(0x169)],..._0xbea17f[_0x420447(0x165)]?{'plannedActions':_0xbea17f[_0x420447(0x165)]}:{},..._0xbea17f['targets']?{'targets':_0xbea17f['targets']}:{},..._0xbea17f[_0x420447(0x15e)]?{'deleteOrder':_0xbea17f[_0x420447(0x15e)]}:{},'snapshotHash':_0xbea17f[_0x420447(0x166)],..._0xbea17f[_0x420447(0x127)]?{'cascade':_0xbea17f['cascade']}:{},..._0xbea17f[_0x420447(0x113)]?{'planFile':_0xbea17f['planFile']}:{},'succeeded':_0xbea17f[_0x420447(0x146)]??[],'failed':_0xbea17f[_0x420447(0x10f)]??[],'warnings':_0xbea17f['warnings']??[],'verification':_0xbea17f['verification'],'error':_0xbea17f[_0x420447(0x15a)]};}export function menuDryRunResult(_0x23c930,_0x54ed4e){return{..._0x23c930,..._0x54ed4e};}export function menuFailure(_0x16fb8e,_0x1d1d42,_0x5c4ada){const _0x1ac368=a125_0x66eb8a,_0x20e2b8=mutationResult({..._0x1d1d42,'after':_0x5c4ada['after']===undefined?_0x1d1d42[_0x1ac368(0x121)]:_0x5c4ada[_0x1ac368(0x121)],'backend':_0x5c4ada[_0x1ac368(0x169)]??_0x1d1d42[_0x1ac368(0x169)],'dryRun':![],'succeeded':_0x5c4ada['succeeded']??[],'failed':[{..._0x5c4ada[_0x1ac368(0x10f)]??{},'stage':_0x5c4ada[_0x1ac368(0x160)],'code':_0x16fb8e[_0x1ac368(0x115)],'message':_0x16fb8e[_0x1ac368(0x116)]}],'warnings':[..._0x1d1d42[_0x1ac368(0x143)],..._0x5c4ada[_0x1ac368(0x143)]??[]],'verification':_0x5c4ada[_0x1ac368(0x171)],'error':{'code':_0x16fb8e['code'],'message':_0x16fb8e[_0x1ac368(0x116)],..._0x16fb8e['hint']?{'hint':_0x16fb8e[_0x1ac368(0x151)]}:{}}});return Object[_0x1ac368(0x126)](_0x16fb8e,_0x1ac368(0x152),{'value':_0x20e2b8,'enumerable':!![],'configurable':!![]}),_0x16fb8e;}function a125_0x1cac(_0x33a518,_0x589112){_0x33a518=_0x33a518-0x10f;const _0x2b2d74=a125_0x2b2d();let _0x1cacbf=_0x2b2d74[_0x33a518];return _0x1cacbf;}export function asVerificationError(_0x345546,_0x46da4f){const _0x5a92b5=a125_0x66eb8a;if(_0x345546 instanceof CliError&&_0x345546[_0x5a92b5(0x115)]===_0x5a92b5(0x167))return _0x345546;const _0x38aae4=_0x345546 instanceof Error?_0x345546[_0x5a92b5(0x116)]:String(_0x345546);return menuError(_0x5a92b5(0x167),''+_0x46da4f+(_0x38aae4?':\x20'+_0x38aae4:''),_0x5a92b5(0x11c));}export function describeMenuErrorCause(_0x5f0b5a,_0x119404,_0x4c837a){const _0x14e9ce=a125_0x66eb8a,_0x3b52dc=mapMenuApiError(_0x5f0b5a,_0x119404,_0x4c837a);return{'causeCode':_0x3b52dc[_0x14e9ce(0x115)],'causeMessage':_0x3b52dc[_0x14e9ce(0x116)]};}export function hasFlag(_0xa63a4d,_0x2235cb){const _0x3889ad=a125_0x66eb8a;return Object[_0x3889ad(0x13a)][_0x3889ad(0x122)][_0x3889ad(0x117)](_0xa63a4d[_0x3889ad(0x161)],_0x2235cb)&&_0xa63a4d[_0x3889ad(0x161)][_0x2235cb]!==undefined;}export function toApiParentId(_0x5e76e0){return _0x5e76e0??0x0;}export function formatParent(_0x480b48){const _0x16c5c8=a125_0x66eb8a;return _0x480b48==null?_0x16c5c8(0x163):String(_0x480b48);}export function menuError(_0x1e5d39,_0x2e591a,_0x2d3ef4){return new CliError(_0x1e5d39,0x1,_0x2e591a,_0x2d3ef4);}export function mapMenuApiError(_0x83aeb,_0x5e8bb0,_0x505dcd){const _0x53e4a2=a125_0x66eb8a;if(_0x83aeb instanceof CliError&&_0x83aeb[_0x53e4a2(0x115)]!==_0x53e4a2(0x141))return _0x83aeb;const _0x2f4df9=_0x83aeb instanceof Error?_0x83aeb[_0x53e4a2(0x116)]:String(_0x83aeb);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x53e4a2(0x14c)](_0x2f4df9))return menuError(_0x53e4a2(0x132),_0x53e4a2(0x12e)+_0x5e8bb0+(_0x505dcd?_0x53e4a2(0x162)+_0x505dcd:'')+'.',_0x53e4a2(0x14a));return menuError('menu_mutation_failed','Failed\x20to\x20'+_0x5e8bb0+(_0x505dcd?_0x53e4a2(0x162)+_0x505dcd:'')+':\x20'+_0x2f4df9,_0x53e4a2(0x14f));}export function isMenuResponseLoss(_0x217fc2){const _0x8470e0=a125_0x66eb8a,_0x4edfdb=_0x217fc2 instanceof Error?_0x217fc2[_0x8470e0(0x116)]:String(_0x217fc2);if(_0x217fc2 instanceof CliError)return _0x217fc2[_0x8470e0(0x115)]===_0x8470e0(0x141)&&/^Request (?:failed|timeout):/i['test'](_0x4edfdb);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x8470e0(0x14c)](_0x4edfdb);}function stateDrift(_0x47a11a){return menuError('menu_state_drift',_0x47a11a,'Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.');}
1
+ const a127_0xebbd7a=a127_0x2671;(function(_0x12e6ca,_0x275651){const _0x2c6136=a127_0x2671,_0x1303dc=_0x12e6ca();while(!![]){try{const _0x8ae6d6=-parseInt(_0x2c6136(0x1cc))/0x1+-parseInt(_0x2c6136(0x1d1))/0x2*(-parseInt(_0x2c6136(0x209))/0x3)+parseInt(_0x2c6136(0x1c4))/0x4+parseInt(_0x2c6136(0x20c))/0x5+parseInt(_0x2c6136(0x1e6))/0x6+-parseInt(_0x2c6136(0x1ff))/0x7*(parseInt(_0x2c6136(0x1e1))/0x8)+-parseInt(_0x2c6136(0x1b7))/0x9;if(_0x8ae6d6===_0x275651)break;else _0x1303dc['push'](_0x1303dc['shift']());}catch(_0x2059e2){_0x1303dc['push'](_0x1303dc['shift']());}}}(a127_0x28d9,0x952fc));import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':a127_0xebbd7a(0x1fb),'required':!![],'description':'Exact\x20online\x20menu\x20id'};export const MENU_SORT_FLAG={'name':a127_0xebbd7a(0x1bb),'type':a127_0xebbd7a(0x1fb),'description':a127_0xebbd7a(0x1fe)};function a127_0x2671(_0x53a02d,_0xb787b2){_0x53a02d=_0x53a02d-0x1a8;const _0x28d9d5=a127_0x28d9();let _0x2671a9=_0x28d9d5[_0x53a02d];return _0x2671a9;}export const MENU_PARENT_ID_FLAG={'name':a127_0xebbd7a(0x207),'type':'string','description':a127_0xebbd7a(0x1d4)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':'expect-parent-id','type':'string','description':a127_0xebbd7a(0x1f8)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a127_0xebbd7a(0x1b6),'type':a127_0xebbd7a(0x1b3),'description':'Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches'},{'name':'expected-children-count','type':a127_0xebbd7a(0x1fb),'description':a127_0xebbd7a(0x1dd)}];export function validateExactId(_0x8d27ba){const _0x5afe08=a127_0xebbd7a,_0x13d8a0=_0x8d27ba[_0x5afe08(0x1f6)]('id');if(!Number['isSafeInteger'](_0x13d8a0)||_0x13d8a0<=0x0)throw CliErrors[_0x5afe08(0x201)](_0x5afe08(0x1f2));return _0x13d8a0;}export function validateSort(_0x27b0f0,_0x8b4915=a127_0xebbd7a(0x1bb)){const _0x3b5397=a127_0xebbd7a;if(!hasFlag(_0x27b0f0,_0x8b4915))return undefined;const _0x2d36c6=_0x27b0f0['num'](_0x8b4915);if(!Number['isSafeInteger'](_0x2d36c6)||_0x2d36c6<0x0||_0x2d36c6>MAX_MENU_SORT)throw menuError(_0x3b5397(0x1ea),'--'+_0x8b4915+_0x3b5397(0x1c7)+MAX_MENU_SORT+'.',_0x3b5397(0x1ba));return _0x2d36c6;}export function nextSiblingSort(_0x4de7f6,_0x4f6c75,_0x512e6b){const _0x48c074=a127_0xebbd7a,_0x46a978=getChildren(_0x4de7f6,_0x4f6c75)[_0x48c074(0x1d2)](_0x58fe12=>_0x58fe12[_0x48c074(0x1bb)])[_0x48c074(0x1ab)](_0xfb0ac8=>typeof _0xfb0ac8===_0x48c074(0x1fb));if(_0x46a978[_0x48c074(0x1f9)]===0x0)return 0x0;const _0x36e6b1=Math[_0x48c074(0x20e)](..._0x46a978);if(_0x36e6b1>=MAX_MENU_SORT)throw menuError(_0x48c074(0x1bc),_0x48c074(0x1e7)+_0x512e6b+_0x48c074(0x20d)+_0x36e6b1+'.','Reorder\x20sibling\x20menus\x20below\x20'+MAX_MENU_SORT+_0x48c074(0x1da));return _0x36e6b1+0x1;}export function requireExplicitYes(_0x1a0aaf){const _0x17e130=a127_0xebbd7a;if(_0x1a0aaf['bool']('dry-run'))return;if(!_0x1a0aaf['bool']('yes'))throw menuError(_0x17e130(0x1ae),_0x17e130(0x20a),'Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export async function fetchMutationSnapshot(_0x4b3bbb,_0x122fda,_0x366552){const _0x36be7d=a127_0xebbd7a;try{return await fetchMenuSnapshot(_0x4b3bbb[_0x36be7d(0x1d0)],_0x4b3bbb[_0x36be7d(0x1bd)]);}catch(_0x10aea8){throw mapMenuApiError(_0x10aea8,'read\x20online\x20menu\x20facts\x20before\x20'+_0x122fda,_0x366552);}}export async function recheckMutationSnapshot(_0x4def58,_0x4f39b8,_0x5b0b25,_0x3b4e31){const _0x294512=a127_0xebbd7a;let _0x2db6f0;try{_0x2db6f0=await fetchMenuSnapshot(_0x4def58[_0x294512(0x1d0)],_0x4def58[_0x294512(0x1bd)]);}catch(_0x13721a){const _0x12ecc7=mapMenuApiError(_0x13721a,_0x294512(0x1fc)+_0x5b0b25,_0x3b4e31);throw menuFailure(_0x12ecc7,_0x4f39b8,{'stage':_0x294512(0x1c0),'failed':_0x3b4e31==null?{}:{'id':_0x3b4e31}});}if(_0x2db6f0[_0x294512(0x1e9)]!==_0x4f39b8[_0x294512(0x1c6)]){const _0xe17a35=menuError(_0x294512(0x1a9),_0x294512(0x1ee)+_0x5b0b25+_0x294512(0x1ed),'Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.');throw menuFailure(_0xe17a35,_0x4f39b8,{'stage':_0x294512(0x1c0),'failed':{..._0x3b4e31==null?{}:{'id':_0x3b4e31},'expectedSnapshotHash':_0x4f39b8[_0x294512(0x1c6)],'currentSnapshotHash':_0x2db6f0['hash']}});}return _0x2db6f0;}export function parseParentId(_0x4c2b09,_0x514d33,_0x2788e0={}){const _0x21ba43=a127_0xebbd7a;if(!hasFlag(_0x4c2b09,_0x514d33)){if(_0x2788e0[_0x21ba43(0x1cf)])throw CliErrors['flagMissing'](_0x514d33);return undefined;}const _0x4880ed=_0x4c2b09[_0x21ba43(0x1b5)](_0x514d33)['trim']();if(_0x4880ed[_0x21ba43(0x1d7)]()===_0x21ba43(0x1f0))return null;if(!/^\d+$/['test'](_0x4880ed))throw CliErrors['validation']('--'+_0x514d33+'\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.');const _0x571206=Number(_0x4880ed);if(!Number['isSafeInteger'](_0x571206)||_0x571206<=0x0)throw CliErrors[_0x21ba43(0x201)]('--'+_0x514d33+_0x21ba43(0x1e2));return _0x571206;}export function requireMenu(_0x264dbe,_0x5a469b){const _0x1d0a32=a127_0xebbd7a,_0xb68bc5=_0x264dbe[_0x1d0a32(0x1ac)][_0x1d0a32(0x1e4)](_0x5a469b);if(!_0xb68bc5)throw menuError('menu_not_found',_0x1d0a32(0x204)+_0x5a469b,_0x1d0a32(0x208));return _0xb68bc5;}export function requireFolder(_0x49733e,_0x68cd5a){const _0x16f35d=a127_0xebbd7a,_0xd26d56=requireMenu(_0x49733e,_0x68cd5a);if(_0xd26d56[_0x16f35d(0x20f)]!==_0x16f35d(0x1d5))throw menuError(_0x16f35d(0x1c5),'Menu\x20'+_0x68cd5a+_0x16f35d(0x203)+(_0xd26d56[_0x16f35d(0x20f)]||_0x16f35d(0x1df))+_0x16f35d(0x1b4),_0x16f35d(0x1de));return _0xd26d56;}function a127_0x28d9(){const _0xe86efb=['hash','menu_sort_invalid','succeeded','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','Online\x20menu\x20state\x20changed\x20before\x20','\x20child\x20count\x20changed:\x20expected\x20','root','operation','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','hint','error','Permission\x20denied\x20while\x20attempting\x20to\x20','num','stringify','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','length','backend','number','recheck\x20online\x20menu\x20facts\x20before\x20','Menu\x20','Sibling\x20sort\x20value\x20(non-negative\x20integer)','7qfaxZR','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','validation','stage','\x20is\x20type\x20\x22','Online\x20menu\x20not\x20found:\x20','menu_mutation_failed','childrenCount','parent-id','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','87783gXZeGl','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','expect-parent-id','606105jkSdWP','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','max','type','cascade','plannedActions','menu_state_drift','selector','filter','byId','hasOwnProperty','menu_confirmation_required',',\x20current\x20','parentId','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','menu_permission_denied','string','\x22,\x20not\x20folder.','str','expect-path','8694450kYpNiU','verification','deleteOrder','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','sort','menu_sort_overflow','cookie','Failed\x20to\x20','before','pre-write-recheck','rawFlags','expected-children-count','warnings','4521220yPUqsD','menu_parent_not_folder','snapshotHash','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','dryRun','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','isSafeInteger','\x20menu\x20','373495wzhpmw','failed','after','required','appCode','56KnbWHE','map','path','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','folder','planFile','toLowerCase','code','test',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','prototype','api_error','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','unknown','data','8577848KAdyVb','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','targets','get','menu_verification_failed','5712060fnyhij','Cannot\x20append\x20a\x20','message'];a127_0x28d9=function(){return _0xe86efb;};return a127_0x28d9();}export function assertExpectedState(_0x37950a,_0x49989c){const _0x5ec1fe=a127_0xebbd7a;if(hasFlag(_0x37950a,_0x5ec1fe(0x20b))){const _0x135763=parseParentId(_0x37950a,_0x5ec1fe(0x20b),{'required':!![]});if(_0x49989c[_0x5ec1fe(0x1b0)]!==_0x135763)throw stateDrift(_0x5ec1fe(0x1fd)+_0x49989c['id']+'\x20parent\x20changed:\x20expected\x20'+formatParent(_0x135763)+_0x5ec1fe(0x1af)+formatParent(_0x49989c[_0x5ec1fe(0x1b0)])+'.');}if(hasFlag(_0x37950a,'expect-path')){const _0x58b3e5=_0x37950a[_0x5ec1fe(0x1b5)](_0x5ec1fe(0x1b6));if(_0x49989c['path']!==_0x58b3e5)throw stateDrift(_0x5ec1fe(0x1fd)+_0x49989c['id']+'\x20path\x20changed:\x20expected\x20'+JSON[_0x5ec1fe(0x1f7)](_0x58b3e5)+_0x5ec1fe(0x1af)+JSON['stringify'](_0x49989c[_0x5ec1fe(0x1d3)])+'.');}if(hasFlag(_0x37950a,_0x5ec1fe(0x1c2))){const _0xf82b91=_0x37950a[_0x5ec1fe(0x1f6)](_0x5ec1fe(0x1c2));if(!Number[_0x5ec1fe(0x1ca)](_0xf82b91)||_0xf82b91<0x0)throw CliErrors['validation']('--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0x49989c[_0x5ec1fe(0x206)]!==_0xf82b91)throw stateDrift('Menu\x20'+_0x49989c['id']+_0x5ec1fe(0x1ef)+_0xf82b91+_0x5ec1fe(0x1af)+_0x49989c[_0x5ec1fe(0x206)]+'.');}}export function assertVerified(_0x4cbb7d,_0x3c2bd5,_0x888372=a127_0xebbd7a(0x1b1)){const _0x5d0733=a127_0xebbd7a;if(!_0x4cbb7d)throw menuError(_0x5d0733(0x1e5),_0x3c2bd5,_0x888372);}export function mutationResult(_0x1c1e70){const _0x26cb77=a127_0xebbd7a;return{'operation':_0x1c1e70[_0x26cb77(0x1f1)],'selector':_0x1c1e70[_0x26cb77(0x1aa)],'before':_0x1c1e70[_0x26cb77(0x1bf)],'after':_0x1c1e70[_0x26cb77(0x1ce)],'dryRun':_0x1c1e70[_0x26cb77(0x1c8)],'backend':_0x1c1e70[_0x26cb77(0x1fa)],..._0x1c1e70[_0x26cb77(0x1a8)]?{'plannedActions':_0x1c1e70[_0x26cb77(0x1a8)]}:{},..._0x1c1e70[_0x26cb77(0x1e3)]?{'targets':_0x1c1e70[_0x26cb77(0x1e3)]}:{},..._0x1c1e70[_0x26cb77(0x1b9)]?{'deleteOrder':_0x1c1e70[_0x26cb77(0x1b9)]}:{},'snapshotHash':_0x1c1e70[_0x26cb77(0x1c6)],..._0x1c1e70[_0x26cb77(0x210)]?{'cascade':_0x1c1e70[_0x26cb77(0x210)]}:{},..._0x1c1e70['planFile']?{'planFile':_0x1c1e70[_0x26cb77(0x1d6)]}:{},'succeeded':_0x1c1e70[_0x26cb77(0x1eb)]??[],'failed':_0x1c1e70[_0x26cb77(0x1cd)]??[],'warnings':_0x1c1e70['warnings']??[],'verification':_0x1c1e70['verification'],'error':_0x1c1e70[_0x26cb77(0x1f4)]};}export function menuDryRunResult(_0x1c3772,_0x2b045a){return{..._0x1c3772,..._0x2b045a};}export function menuFailure(_0x1d2346,_0x26c968,_0x1c10ff){const _0x2e16c8=a127_0xebbd7a,_0x407b9c=mutationResult({..._0x26c968,'after':_0x1c10ff[_0x2e16c8(0x1ce)]===undefined?_0x26c968[_0x2e16c8(0x1ce)]:_0x1c10ff[_0x2e16c8(0x1ce)],'backend':_0x1c10ff[_0x2e16c8(0x1fa)]??_0x26c968['backend'],'dryRun':![],'succeeded':_0x1c10ff[_0x2e16c8(0x1eb)]??[],'failed':[{..._0x1c10ff[_0x2e16c8(0x1cd)]??{},'stage':_0x1c10ff[_0x2e16c8(0x202)],'code':_0x1d2346['code'],'message':_0x1d2346[_0x2e16c8(0x1e8)]}],'warnings':[..._0x26c968[_0x2e16c8(0x1c3)],..._0x1c10ff[_0x2e16c8(0x1c3)]??[]],'verification':_0x1c10ff[_0x2e16c8(0x1b8)],'error':{'code':_0x1d2346[_0x2e16c8(0x1d8)],'message':_0x1d2346[_0x2e16c8(0x1e8)],..._0x1d2346[_0x2e16c8(0x1f3)]?{'hint':_0x1d2346[_0x2e16c8(0x1f3)]}:{}}});return Object['defineProperty'](_0x1d2346,_0x2e16c8(0x1e0),{'value':_0x407b9c,'enumerable':!![],'configurable':!![]}),_0x1d2346;}export function asVerificationError(_0x100ebf,_0x467bd5){const _0xb0e0bb=a127_0xebbd7a;if(_0x100ebf instanceof CliError&&_0x100ebf[_0xb0e0bb(0x1d8)]===_0xb0e0bb(0x1e5))return _0x100ebf;const _0x5476ea=_0x100ebf instanceof Error?_0x100ebf['message']:String(_0x100ebf);return menuError('menu_verification_failed',''+_0x467bd5+(_0x5476ea?':\x20'+_0x5476ea:''),'The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.');}export function describeMenuErrorCause(_0x141c1f,_0x3df321,_0x3ec381){const _0x4d72f5=a127_0xebbd7a,_0x24fd3f=mapMenuApiError(_0x141c1f,_0x3df321,_0x3ec381);return{'causeCode':_0x24fd3f['code'],'causeMessage':_0x24fd3f[_0x4d72f5(0x1e8)]};}export function hasFlag(_0x3da294,_0x447168){const _0x1535f0=a127_0xebbd7a;return Object[_0x1535f0(0x1db)][_0x1535f0(0x1ad)]['call'](_0x3da294['rawFlags'],_0x447168)&&_0x3da294[_0x1535f0(0x1c1)][_0x447168]!==undefined;}export function toApiParentId(_0x613084){return _0x613084??0x0;}export function formatParent(_0x20ec2d){return _0x20ec2d==null?'root':String(_0x20ec2d);}export function menuError(_0x1371ed,_0x238e07,_0x3a615e){return new CliError(_0x1371ed,0x1,_0x238e07,_0x3a615e);}export function mapMenuApiError(_0xd0e73d,_0x50a353,_0x42f74d){const _0x571ab7=a127_0xebbd7a;if(_0xd0e73d instanceof CliError&&_0xd0e73d[_0x571ab7(0x1d8)]!==_0x571ab7(0x1dc))return _0xd0e73d;const _0x50ea87=_0xd0e73d instanceof Error?_0xd0e73d[_0x571ab7(0x1e8)]:String(_0xd0e73d);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x571ab7(0x1d9)](_0x50ea87))return menuError(_0x571ab7(0x1b2),_0x571ab7(0x1f5)+_0x50a353+(_0x42f74d?_0x571ab7(0x1cb)+_0x42f74d:'')+'.',_0x571ab7(0x200));return menuError(_0x571ab7(0x205),_0x571ab7(0x1be)+_0x50a353+(_0x42f74d?_0x571ab7(0x1cb)+_0x42f74d:'')+':\x20'+_0x50ea87,_0x571ab7(0x1ec));}export function isMenuResponseLoss(_0x38de72){const _0x2a1898=a127_0xebbd7a,_0x1d9d55=_0x38de72 instanceof Error?_0x38de72[_0x2a1898(0x1e8)]:String(_0x38de72);if(_0x38de72 instanceof CliError)return _0x38de72[_0x2a1898(0x1d8)]===_0x2a1898(0x1dc)&&/^Request (?:failed|timeout):/i['test'](_0x1d9d55);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x2a1898(0x1d9)](_0x1d9d55);}function stateDrift(_0x43b022){const _0x2c9f91=a127_0xebbd7a;return menuError(_0x2c9f91(0x1a9),_0x43b022,_0x2c9f91(0x1c9));}
@@ -1 +1 @@
1
- (function(_0x313321,_0x4b583d){const _0x3084ed=a126_0x31d8,_0x3a39e4=_0x313321();while(!![]){try{const _0x2f1d00=-parseInt(_0x3084ed(0x124))/0x1*(-parseInt(_0x3084ed(0x133))/0x2)+parseInt(_0x3084ed(0x122))/0x3+-parseInt(_0x3084ed(0x125))/0x4*(-parseInt(_0x3084ed(0x11f))/0x5)+-parseInt(_0x3084ed(0x12c))/0x6+-parseInt(_0x3084ed(0x134))/0x7*(-parseInt(_0x3084ed(0x136))/0x8)+parseInt(_0x3084ed(0x132))/0x9*(-parseInt(_0x3084ed(0x116))/0xa)+parseInt(_0x3084ed(0x12b))/0xb;if(_0x2f1d00===_0x4b583d)break;else _0x3a39e4['push'](_0x3a39e4['shift']());}catch(_0x155f1c){_0x3a39e4['push'](_0x3a39e4['shift']());}}}(a126_0x906d,0x9efe1));import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a126_0x18bd05,updateMenuRecord}from'../../../core/api-client.js';function a126_0x906d(){const _0x57241e=['16945Gpmgvr','stringify','update-menu-cdn-url','1243782bBhwPj','extend','1WnILUt','164dXMddZ','label','Batch\x20menu\x20creation\x20completed,\x20total\x20','menus','total','Menu\x20assets\x20synced:\x20','3674066Qrhnfs','2784438iRJxza','create-menu','\x20menu','procode','Delete\x20','Creating\x20menu:\x20','28206wSZlUo','1209262tgaEKO','488096aeyxZM','Update\x20menu\x20','24jQMBJk','Create\x20menu\x20\x22','\x20menu\x20group(s)','Start\x20batch\x20menu\x20creation,\x20total\x20','info','Regroup\x20','path','menuGroups','all','loadScriptMode','\x20online\x20menus\x20successfully','get-online-menu-list','Menu\x20created\x20successfully:\x20','1870zbWdPm','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','map','Fetched\x20','resources','Updating\x20menu\x20asset\x20links:\x20','create-menus','import','length'];a126_0x906d=function(){return _0x57241e;};return a126_0x906d();}export async function getOnlineMenuList(_0x560f49,_0x5a7f97){const _0x185438=a126_0x31d8,_0x585c60=getEnv();logger[_0x185438(0x10d)](_0x185438(0x114),isProduction(_0x585c60)?_0x185438(0x117)+_0x560f49+')':'Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'+_0x560f49+')');const _0x3401b7=await fetchMenuSnapshot(_0x560f49,_0x5a7f97,{'verbose':!![]});return logger['info']('get-online-menu-list',_0x185438(0x119)+_0x3401b7[_0x185438(0x129)]+_0x185438(0x113)),_0x3401b7[_0x185438(0x128)]['map'](toProcessedMenuItem);}export async function createMenu(_0xa703ad,_0x503acc,_0x3f2234){const _0x48ca82=a126_0x31d8;logger[_0x48ca82(0x10d)](_0x48ca82(0x12d),_0x48ca82(0x131)+_0x3f2234[_0x48ca82(0x126)]+'\x20('+_0x3f2234[_0x48ca82(0x10f)]+')');const _0xdc9d1c={'appCode':_0xa703ad,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x48ca82(0x11d),'resources':_0x3f2234[_0x48ca82(0x11a)]?JSON[_0x48ca82(0x120)](_0x3f2234['resources']):undefined},..._0x3f2234},_0x15c03b=await createMenuRecord(_0xdc9d1c,_0x503acc,'Create\x20menu\x20\x22'+_0x3f2234[_0x48ca82(0x126)]+'\x22');return logger[_0x48ca82(0x10d)](_0x48ca82(0x12d),_0x48ca82(0x115)+_0x3f2234[_0x48ca82(0x126)]),_0x15c03b;}async function createSingleMenu(_0x428018,_0x47733a,_0x1bec2c,_0x66f519){const _0x478e2d=a126_0x31d8,_0x42ee55={'appCode':_0x428018,'type':_0x478e2d(0x12f),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x66f519?JSON[_0x478e2d(0x120)](_0x66f519):undefined},'label':_0x1bec2c[_0x478e2d(0x126)],'path':_0x1bec2c[_0x478e2d(0x10f)]},_0x2dd97e=await createMenuRecord(_0x42ee55,_0x47733a,_0x478e2d(0x137)+_0x1bec2c[_0x478e2d(0x126)]+'\x22');return logger[_0x478e2d(0x10d)]('create-menu',_0x478e2d(0x115)+_0x1bec2c[_0x478e2d(0x126)]),_0x2dd97e;}export async function createMenus(_0x1e6d9f,_0x4f6f79,_0x2027cf,_0x31fdc5){const _0x89e957=a126_0x31d8;logger['info']('create-menus',_0x89e957(0x10c)+_0x2027cf[_0x89e957(0x11e)]);const _0x4df405=await Promise[_0x89e957(0x111)](_0x2027cf[_0x89e957(0x118)](_0x10f149=>createSingleMenu(_0x1e6d9f,_0x4f6f79,_0x10f149,_0x31fdc5)));return logger[_0x89e957(0x10d)](_0x89e957(0x11c),_0x89e957(0x127)+_0x2027cf[_0x89e957(0x11e)]),_0x4df405;}export async function updateMenuCdnUrl(_0x5e7e08,_0x5391ac,_0x39e127){const _0x3793e7=a126_0x31d8;logger['info'](_0x3793e7(0x121),_0x3793e7(0x11b)+_0x39e127['label']+'\x20('+_0x39e127[_0x3793e7(0x10f)]+')');const _0x245377={'id':_0x39e127['id'],'appCode':_0x5e7e08,'extend':{..._0x39e127[_0x3793e7(0x123)]??{},..._0x39e127[_0x3793e7(0x112)]?{'loadScriptMode':_0x39e127[_0x3793e7(0x112)]}:{},'resources':_0x39e127[_0x3793e7(0x11a)]?JSON[_0x3793e7(0x120)](_0x39e127[_0x3793e7(0x11a)]):undefined}},_0x332014=await updateMenuRecord(_0x245377,_0x5391ac,'Update\x20menu\x20assets\x20\x22'+_0x39e127[_0x3793e7(0x126)]+'\x22');return logger['info'](_0x3793e7(0x121),_0x3793e7(0x12a)+_0x39e127['label'],undefined),_0x332014;}export async function createMenuEntity(_0x4dcb1e,_0x59266,_0x2c23cb){const _0x18cd8e=a126_0x31d8;return createMenuRecord({'appCode':_0x4dcb1e,..._0x2c23cb},_0x59266,_0x18cd8e(0x137)+_0x2c23cb[_0x18cd8e(0x126)]+'\x22');}export async function updateMenuEntity(_0x4fe703,_0x500563,_0x4d8364){const _0x41daf2=a126_0x31d8;return updateMenuRecord({'appCode':_0x4fe703,..._0x4d8364},_0x500563,_0x41daf2(0x135)+_0x4d8364['id']);}export async function batchDeleteMenuEntities(_0x44633c,_0x5ed3e6){const _0x55a460=a126_0x31d8;return batchDeleteMenuRecords(_0x5ed3e6,_0x44633c,_0x55a460(0x130)+_0x5ed3e6['length']+_0x55a460(0x12e)+(_0x5ed3e6[_0x55a460(0x11e)]===0x1?'':'s'));}function a126_0x31d8(_0x526e8c,_0x429759){_0x526e8c=_0x526e8c-0x10c;const _0x906d80=a126_0x906d();let _0x31d828=_0x906d80[_0x526e8c];return _0x31d828;}export async function startMenuRegroup(_0xbe6828,_0x11db6b){const _0x46d55d=a126_0x31d8;return a126_0x18bd05(_0x11db6b,_0xbe6828,_0x46d55d(0x10e)+_0x11db6b[_0x46d55d(0x110)][_0x46d55d(0x11e)]+_0x46d55d(0x138));}
1
+ (function(_0x2a3569,_0x52c111){const _0x431b48=a128_0x2f56,_0x3189dc=_0x2a3569();while(!![]){try{const _0x4a9295=parseInt(_0x431b48(0x138))/0x1+parseInt(_0x431b48(0x12d))/0x2*(-parseInt(_0x431b48(0x135))/0x3)+-parseInt(_0x431b48(0x122))/0x4*(-parseInt(_0x431b48(0x130))/0x5)+-parseInt(_0x431b48(0x133))/0x6+-parseInt(_0x431b48(0x112))/0x7*(parseInt(_0x431b48(0x120))/0x8)+-parseInt(_0x431b48(0x116))/0x9*(-parseInt(_0x431b48(0x121))/0xa)+parseInt(_0x431b48(0x131))/0xb;if(_0x4a9295===_0x52c111)break;else _0x3189dc['push'](_0x3189dc['shift']());}catch(_0x31f83b){_0x3189dc['push'](_0x3189dc['shift']());}}}(a128_0x4d2d,0x54525));import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';function a128_0x4d2d(){const _0x4dffcd=['3199880fMfUYH','2098996AqeUGZ','update-menu-cdn-url','create-menu','import','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','Batch\x20menu\x20creation\x20completed,\x20total\x20','Delete\x20','\x20online\x20menus\x20successfully','path','Creating\x20menu:\x20','Menu\x20assets\x20synced:\x20','558364QqKmtG','info','menus','5iovnbQ','76516OWwkoG','label','2804928dYkBxw','extend','3zSyqQH','resources','Regroup\x20','484608umPAHH','menuGroups','Updating\x20menu\x20asset\x20links:\x20','total','\x20menu\x20group(s)','14rXpgHN','Update\x20menu\x20assets\x20\x22','all','map','18XJaFfk','get-online-menu-list','loadScriptMode','length','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','create-menus','\x20menu','Start\x20batch\x20menu\x20creation,\x20total\x20','Create\x20menu\x20\x22','stringify','2256952PTfiew'];a128_0x4d2d=function(){return _0x4dffcd;};return a128_0x4d2d();}import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a128_0x3bd91c,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x585bc5,_0x2d0dc2){const _0x9415ff=a128_0x2f56,_0x9af45b=getEnv();logger[_0x9415ff(0x12e)](_0x9415ff(0x117),isProduction(_0x9af45b)?_0x9415ff(0x126)+_0x585bc5+')':_0x9415ff(0x11a)+_0x585bc5+')');const _0x1d03e9=await fetchMenuSnapshot(_0x585bc5,_0x2d0dc2,{'verbose':!![]});return logger[_0x9415ff(0x12e)]('get-online-menu-list','Fetched\x20'+_0x1d03e9[_0x9415ff(0x13b)]+_0x9415ff(0x129)),_0x1d03e9[_0x9415ff(0x12f)][_0x9415ff(0x115)](toProcessedMenuItem);}export async function createMenu(_0x5bfffb,_0x5e97ac,_0x1dbb27){const _0x2fd9d7=a128_0x2f56;logger[_0x2fd9d7(0x12e)](_0x2fd9d7(0x124),_0x2fd9d7(0x12b)+_0x1dbb27[_0x2fd9d7(0x132)]+'\x20('+_0x1dbb27[_0x2fd9d7(0x12a)]+')');const _0x4bd611={'appCode':_0x5bfffb,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x2fd9d7(0x125),'resources':_0x1dbb27[_0x2fd9d7(0x136)]?JSON[_0x2fd9d7(0x11f)](_0x1dbb27[_0x2fd9d7(0x136)]):undefined},..._0x1dbb27},_0x463519=await createMenuRecord(_0x4bd611,_0x5e97ac,_0x2fd9d7(0x11e)+_0x1dbb27[_0x2fd9d7(0x132)]+'\x22');return logger['info'](_0x2fd9d7(0x124),'Menu\x20created\x20successfully:\x20'+_0x1dbb27[_0x2fd9d7(0x132)]),_0x463519;}function a128_0x2f56(_0x1ec5dd,_0x1ff1d0){_0x1ec5dd=_0x1ec5dd-0x112;const _0x4d2db8=a128_0x4d2d();let _0x2f56bb=_0x4d2db8[_0x1ec5dd];return _0x2f56bb;}async function createSingleMenu(_0x30d425,_0x5ab009,_0x356186,_0x1fdc36){const _0x36a932=a128_0x2f56,_0x3c324f={'appCode':_0x30d425,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x36a932(0x125),'resources':_0x1fdc36?JSON['stringify'](_0x1fdc36):undefined},'label':_0x356186['label'],'path':_0x356186[_0x36a932(0x12a)]},_0x2ba99f=await createMenuRecord(_0x3c324f,_0x5ab009,_0x36a932(0x11e)+_0x356186[_0x36a932(0x132)]+'\x22');return logger[_0x36a932(0x12e)]('create-menu','Menu\x20created\x20successfully:\x20'+_0x356186[_0x36a932(0x132)]),_0x2ba99f;}export async function createMenus(_0x300684,_0x2e206f,_0x36a2c6,_0x415549){const _0x4e24c4=a128_0x2f56;logger[_0x4e24c4(0x12e)](_0x4e24c4(0x11b),_0x4e24c4(0x11d)+_0x36a2c6['length']);const _0x29b657=await Promise[_0x4e24c4(0x114)](_0x36a2c6[_0x4e24c4(0x115)](_0x2337b1=>createSingleMenu(_0x300684,_0x2e206f,_0x2337b1,_0x415549)));return logger['info'](_0x4e24c4(0x11b),_0x4e24c4(0x127)+_0x36a2c6[_0x4e24c4(0x119)]),_0x29b657;}export async function updateMenuCdnUrl(_0x22a435,_0xd06b55,_0x12a7e1){const _0x431836=a128_0x2f56;logger[_0x431836(0x12e)](_0x431836(0x123),_0x431836(0x13a)+_0x12a7e1[_0x431836(0x132)]+'\x20('+_0x12a7e1[_0x431836(0x12a)]+')');const _0x323a37={'id':_0x12a7e1['id'],'appCode':_0x22a435,'extend':{..._0x12a7e1[_0x431836(0x134)]??{},..._0x12a7e1[_0x431836(0x118)]?{'loadScriptMode':_0x12a7e1['loadScriptMode']}:{},'resources':_0x12a7e1[_0x431836(0x136)]?JSON[_0x431836(0x11f)](_0x12a7e1[_0x431836(0x136)]):undefined}},_0x5e69fc=await updateMenuRecord(_0x323a37,_0xd06b55,_0x431836(0x113)+_0x12a7e1[_0x431836(0x132)]+'\x22');return logger[_0x431836(0x12e)](_0x431836(0x123),_0x431836(0x12c)+_0x12a7e1[_0x431836(0x132)],undefined),_0x5e69fc;}export async function createMenuEntity(_0x4e090a,_0xa8238,_0x46c7b5){const _0x1564d5=a128_0x2f56;return createMenuRecord({'appCode':_0x4e090a,..._0x46c7b5},_0xa8238,_0x1564d5(0x11e)+_0x46c7b5[_0x1564d5(0x132)]+'\x22');}export async function updateMenuEntity(_0x1a3961,_0x3e1a4c,_0x16f39a){return updateMenuRecord({'appCode':_0x1a3961,..._0x16f39a},_0x3e1a4c,'Update\x20menu\x20'+_0x16f39a['id']);}export async function batchDeleteMenuEntities(_0x1a920f,_0x472a65){const _0x580e8e=a128_0x2f56;return batchDeleteMenuRecords(_0x472a65,_0x1a920f,_0x580e8e(0x128)+_0x472a65[_0x580e8e(0x119)]+_0x580e8e(0x11c)+(_0x472a65['length']===0x1?'':'s'));}export async function startMenuRegroup(_0x25048f,_0x35e6c8){const _0x1fcb3d=a128_0x2f56;return a128_0x3bd91c(_0x35e6c8,_0x25048f,_0x1fcb3d(0x137)+_0x35e6c8[_0x1fcb3d(0x139)][_0x1fcb3d(0x119)]+_0x1fcb3d(0x13c));}
@@ -1 +1 @@
1
- const a127_0x3056d4=a127_0xea9a;(function(_0x1220ff,_0x2310db){const _0x212ac8=a127_0xea9a,_0x15a73b=_0x1220ff();while(!![]){try{const _0x39a77c=-parseInt(_0x212ac8(0x1ed))/0x1+parseInt(_0x212ac8(0x1fc))/0x2*(parseInt(_0x212ac8(0x1fe))/0x3)+-parseInt(_0x212ac8(0x212))/0x4*(-parseInt(_0x212ac8(0x201))/0x5)+-parseInt(_0x212ac8(0x1fa))/0x6*(-parseInt(_0x212ac8(0x1eb))/0x7)+-parseInt(_0x212ac8(0x20f))/0x8+parseInt(_0x212ac8(0x20c))/0x9+parseInt(_0x212ac8(0x217))/0xa*(parseInt(_0x212ac8(0x1f8))/0xb);if(_0x39a77c===_0x2310db)break;else _0x15a73b['push'](_0x15a73b['shift']());}catch(_0x2468a2){_0x15a73b['push'](_0x15a73b['shift']());}}}(a127_0x5263,0x8b34d));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{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a127_0x3056d4(0x211),a127_0x3056d4(0x207)]);function a127_0xea9a(_0x1c1252,_0x53d856){_0x1c1252=_0x1c1252-0x1ea;const _0x526317=a127_0x5263();let _0xea9a19=_0x526317[_0x1c1252];return _0xea9a19;}function a127_0x5263(){const _0x115c17=['Invalid\x20--params:\x20','6296456WElJih','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','jsUrl','11668EeVwql','Menu\x20sync\x20completed','map','path','message','53630ATxZEr','info','2789731GMMmfc','isArray','495936jnnWJc','has','string','object','filter','Invalid\x20--params.','label','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','\x0a\x20\x20Available\x20local\x20paths:\x20','Invalid\x20--params\x20fields:\x20',':\x20expected\x20a\x20non-empty\x20string.','1298oeTxoJ','menu-sync','6akIyLS','--params.','36482bpwLru','get','129pjFlPp','field','length','25fLDkUl','dryRun','procode','push','Start\x20non-interactive\x20menu\x20sync','setLogPath','cssUrl','pages','import','No\x20local\x20pages\x20matched\x20paths:\x20','trim','205803TZAKeE','join'];a127_0x5263=function(){return _0x115c17;};return a127_0x5263();}function validateParams(_0x36f0b5){const _0x3c639a=a127_0x3056d4,_0x201ef7=[];return _0x36f0b5[_0x3c639a(0x211)]&&!isValidJsHttpsUrl(_0x36f0b5[_0x3c639a(0x211)])&&_0x201ef7['push']({'field':_0x3c639a(0x211),'message':_0x3c639a(0x1f4)}),_0x36f0b5['cssUrl']&&!isValidCssHttpsUrl(_0x36f0b5[_0x3c639a(0x207)])&&_0x201ef7[_0x3c639a(0x204)]({'field':_0x3c639a(0x207),'message':_0x3c639a(0x210)}),_0x201ef7;}export async function runMenuSyncCore(_0x2d88f3,_0x15d7ed,_0x4b5f27=[],_0x982309,_0x363396={}){const _0x17f240=a127_0x3056d4,_0x45e86c=parseMenuSyncParams(_0x982309),_0x401af9=[...new Set(_0x4b5f27[_0x17f240(0x214)](_0x468fb9=>_0x468fb9[_0x17f240(0x20b)]())['filter'](Boolean))],_0x3e8904=_0x45e86c[_0x17f240(0x211)],_0x939ef=_0x45e86c['cssUrl'],_0x2fafc5=[];if(_0x3e8904)_0x2fafc5[_0x17f240(0x204)](_0x3e8904);if(_0x939ef)_0x2fafc5[_0x17f240(0x204)](_0x939ef);const _0x571fe7=validateParams(_0x45e86c);if(_0x571fe7[_0x17f240(0x200)]>0x0){const _0x238e60=_0x571fe7[_0x17f240(0x214)](_0x5b3800=>_0x17f240(0x1fb)+_0x5b3800[_0x17f240(0x1ff)]+':\x20'+_0x5b3800[_0x17f240(0x216)])[_0x17f240(0x20d)](';\x20');throw new Error(_0x17f240(0x20e)+_0x238e60);}logger[_0x17f240(0x206)](process['cwd']()),logger[_0x17f240(0x1ea)]('menu-sync',_0x17f240(0x205),{'appCode':_0x2d88f3,'selectedCount':_0x401af9[_0x17f240(0x200)],'jsUrl':_0x3e8904,'cssUrl':_0x939ef});if(_0x3e8904){const _0x3b0f83=await isUrlReachable(_0x3e8904);if(!_0x3b0f83)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x3e8904);}if(_0x939ef){const _0x5648ba=await isUrlReachable(_0x939ef);if(!_0x5648ba)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x939ef);}const _0x4ccb21=getLocalPages();if(_0x4ccb21[_0x17f240(0x200)]===0x0){if(_0x401af9['length']>0x0)throw new Error(_0x17f240(0x20a)+_0x401af9[_0x17f240(0x20d)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x363396[_0x17f240(0x202)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x20e54a=await getOnlineMenuList(_0x2d88f3,_0x15d7ed),_0x45bdab=new Set(_0x20e54a[_0x17f240(0x214)](_0x4c9e2b=>_0x4c9e2b[_0x17f240(0x215)]));let _0x179422;if(_0x401af9[_0x17f240(0x200)]>0x0){const _0x3beeaf=new Map(_0x4ccb21[_0x17f240(0x214)](_0x4e8cfb=>[_0x4e8cfb['path'],_0x4e8cfb])),_0x2b6b82=_0x401af9[_0x17f240(0x1f1)](_0x450e0d=>!_0x3beeaf['has'](_0x450e0d));if(_0x2b6b82[_0x17f240(0x200)]>0x0){const _0x4bc10c=_0x4ccb21[_0x17f240(0x214)](_0x368cd8=>_0x368cd8[_0x17f240(0x215)])[_0x17f240(0x20d)](',\x20');throw new Error(_0x17f240(0x20a)+_0x2b6b82[_0x17f240(0x20d)](',\x20')+_0x17f240(0x1f5)+_0x4bc10c);}const _0x3845d8=_0x401af9[_0x17f240(0x1f1)](_0x28d497=>_0x45bdab['has'](_0x28d497));if(_0x3845d8[_0x17f240(0x200)]>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0x3845d8[_0x17f240(0x20d)](',\x20'));_0x179422=_0x401af9[_0x17f240(0x214)](_0x597879=>_0x3beeaf[_0x17f240(0x1fd)](_0x597879));}else _0x179422=_0x4ccb21[_0x17f240(0x1f1)](_0x31a1b6=>!_0x45bdab[_0x17f240(0x1ee)](_0x31a1b6[_0x17f240(0x215)]));if(_0x179422[_0x17f240(0x200)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x363396[_0x17f240(0x202)]===!![],'targetPages':[],'plannedMenus':[]};const _0x30f659=_0x179422[_0x17f240(0x214)](_0x38f1b3=>({'type':_0x17f240(0x203),'path':_0x38f1b3['path'],'label':_0x38f1b3[_0x17f240(0x1f3)],'loadScriptMode':_0x17f240(0x209),'resources':[..._0x2fafc5]}));if(_0x363396[_0x17f240(0x202)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x179422,'plannedMenus':_0x30f659};const _0x38a761=await createMenus(_0x2d88f3,_0x15d7ed,_0x179422,_0x2fafc5['length']>0x0?_0x2fafc5:undefined);return logger[_0x17f240(0x1ea)](_0x17f240(0x1f9),_0x17f240(0x213),{'count':_0x179422['length'],'resources':_0x2fafc5}),{'created':_0x38a761[_0x17f240(0x200)],'skipped':![],'dryRun':![],'targetPages':_0x179422,'plannedMenus':_0x30f659,'menus':_0x38a761};}export function parseMenuSyncParams(_0x33b061){const _0xe25a46=a127_0x3056d4;if(!_0x33b061||typeof _0x33b061!==_0xe25a46(0x1ef))return{};let _0x2e1720;try{_0x2e1720=JSON['parse'](_0x33b061);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0x2e1720!==_0xe25a46(0x1f0)||_0x2e1720===null||Array[_0xe25a46(0x1ec)](_0x2e1720))throw new Error('Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.');const _0x16d876=_0x2e1720;if(Object['hasOwn'](_0x16d876,_0xe25a46(0x208)))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x10d453=Object['keys'](_0x16d876)['filter'](_0x5c55cf=>!MENU_SYNC_PARAM_KEYS[_0xe25a46(0x1ee)](_0x5c55cf));if(_0x10d453[_0xe25a46(0x200)]>0x0)throw new Error(_0xe25a46(0x1f6)+_0x10d453[_0xe25a46(0x20d)](',\x20')+'.');for(const _0x1e4cf7 of MENU_SYNC_PARAM_KEYS){const _0x10190c=_0x16d876[_0x1e4cf7];if(_0x10190c!==undefined&&(typeof _0x10190c!==_0xe25a46(0x1ef)||_0x10190c[_0xe25a46(0x20b)]()===''))throw new Error(_0xe25a46(0x1f2)+_0x1e4cf7+_0xe25a46(0x1f7));}return{'jsUrl':typeof _0x16d876[_0xe25a46(0x211)]===_0xe25a46(0x1ef)?_0x16d876[_0xe25a46(0x211)]['trim']():undefined,'cssUrl':typeof _0x16d876[_0xe25a46(0x207)]===_0xe25a46(0x1ef)?_0x16d876[_0xe25a46(0x207)][_0xe25a46(0x20b)]():undefined};}
1
+ const a129_0x4d5044=a129_0x32dc;(function(_0x406255,_0x1f2ed8){const _0x549699=a129_0x32dc,_0x4a4149=_0x406255();while(!![]){try{const _0x384b8d=-parseInt(_0x549699(0xc2))/0x1*(-parseInt(_0x549699(0xdd))/0x2)+-parseInt(_0x549699(0xcd))/0x3+parseInt(_0x549699(0xc9))/0x4*(parseInt(_0x549699(0xdf))/0x5)+parseInt(_0x549699(0xbd))/0x6+-parseInt(_0x549699(0xd6))/0x7+-parseInt(_0x549699(0xcb))/0x8+parseInt(_0x549699(0xdc))/0x9;if(_0x384b8d===_0x1f2ed8)break;else _0x4a4149['push'](_0x4a4149['shift']());}catch(_0x41f908){_0x4a4149['push'](_0x4a4149['shift']());}}}(a129_0x3685,0x6c4ee));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a129_0x32dc(_0x43556e,_0xb90e7a){_0x43556e=_0x43556e-0xb2;const _0x368560=a129_0x3685();let _0x32dc90=_0x368560[_0x43556e];return _0x32dc90;}import{logger}from'../../../utils/logger.js';function a129_0x3685(){const _0x2e7382=['push','1239340gosqwN','hasOwn','Invalid\x20--params.','has','JS\x20URL\x20is\x20unreachable:\x20','jsUrl','map','Invalid\x20--params:\x20','import','Invalid\x20--params\x20fields:\x20','pages','cssUrl','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','object','1834866igtnuH','dryRun','path','message','\x0a\x20\x20Available\x20local\x20paths:\x20','1zePxww','trim','Menu\x20sync\x20completed','No\x20local\x20pages\x20matched\x20paths:\x20','procode','--params.','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','4JsMKqw','filter','4427640MMhTnW','keys','2415345yGyWnE','isArray','CSS\x20URL\x20is\x20unreachable:\x20','length','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','join','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','menu-sync','281043WZRjAj','string','field',':\x20expected\x20a\x20non-empty\x20string.','setLogPath','get','9544257UFSBzA','456394sASUKA'];a129_0x3685=function(){return _0x2e7382;};return a129_0x3685();}const MENU_SYNC_PARAM_KEYS=new Set([a129_0x4d5044(0xb4),'cssUrl']);function validateParams(_0x31e304){const _0x51e867=a129_0x4d5044,_0x69d328=[];return _0x31e304[_0x51e867(0xb4)]&&!isValidJsHttpsUrl(_0x31e304[_0x51e867(0xb4)])&&_0x69d328['push']({'field':_0x51e867(0xb4),'message':_0x51e867(0xc8)}),_0x31e304[_0x51e867(0xba)]&&!isValidCssHttpsUrl(_0x31e304['cssUrl'])&&_0x69d328[_0x51e867(0xde)]({'field':_0x51e867(0xba),'message':_0x51e867(0xd3)}),_0x69d328;}export async function runMenuSyncCore(_0x120aa1,_0x1d6627,_0x98f32c=[],_0x5e43ac,_0x55db83={}){const _0x253fbd=a129_0x4d5044,_0x24ed2a=parseMenuSyncParams(_0x5e43ac),_0x4bd814=[...new Set(_0x98f32c[_0x253fbd(0xb5)](_0xfeeaa2=>_0xfeeaa2[_0x253fbd(0xc3)]())[_0x253fbd(0xca)](Boolean))],_0x33f669=_0x24ed2a['jsUrl'],_0x5123b7=_0x24ed2a[_0x253fbd(0xba)],_0x54367e=[];if(_0x33f669)_0x54367e[_0x253fbd(0xde)](_0x33f669);if(_0x5123b7)_0x54367e[_0x253fbd(0xde)](_0x5123b7);const _0x44e8d9=validateParams(_0x24ed2a);if(_0x44e8d9[_0x253fbd(0xd0)]>0x0){const _0x488ced=_0x44e8d9[_0x253fbd(0xb5)](_0x8007f1=>_0x253fbd(0xc7)+_0x8007f1[_0x253fbd(0xd8)]+':\x20'+_0x8007f1[_0x253fbd(0xc0)])[_0x253fbd(0xd2)](';\x20');throw new Error(_0x253fbd(0xb6)+_0x488ced);}logger[_0x253fbd(0xda)](process['cwd']()),logger['info'](_0x253fbd(0xd5),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x120aa1,'selectedCount':_0x4bd814[_0x253fbd(0xd0)],'jsUrl':_0x33f669,'cssUrl':_0x5123b7});if(_0x33f669){const _0x34179d=await isUrlReachable(_0x33f669);if(!_0x34179d)throw new Error(_0x253fbd(0xb3)+_0x33f669);}if(_0x5123b7){const _0x384cd6=await isUrlReachable(_0x5123b7);if(!_0x384cd6)throw new Error(_0x253fbd(0xcf)+_0x5123b7);}const _0x505e6c=getLocalPages();if(_0x505e6c['length']===0x0){if(_0x4bd814[_0x253fbd(0xd0)]>0x0)throw new Error(_0x253fbd(0xc5)+_0x4bd814[_0x253fbd(0xd2)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x55db83[_0x253fbd(0xbe)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x45184e=await getOnlineMenuList(_0x120aa1,_0x1d6627),_0x303273=new Set(_0x45184e[_0x253fbd(0xb5)](_0x3df0c6=>_0x3df0c6[_0x253fbd(0xbf)]));let _0x46f5c4;if(_0x4bd814['length']>0x0){const _0x52e40f=new Map(_0x505e6c[_0x253fbd(0xb5)](_0x3880b2=>[_0x3880b2['path'],_0x3880b2])),_0x51b34d=_0x4bd814[_0x253fbd(0xca)](_0x359d46=>!_0x52e40f['has'](_0x359d46));if(_0x51b34d[_0x253fbd(0xd0)]>0x0){const _0x29a505=_0x505e6c['map'](_0x48c359=>_0x48c359[_0x253fbd(0xbf)])['join'](',\x20');throw new Error(_0x253fbd(0xc5)+_0x51b34d['join'](',\x20')+_0x253fbd(0xc1)+_0x29a505);}const _0x365785=_0x4bd814['filter'](_0x28e094=>_0x303273[_0x253fbd(0xb2)](_0x28e094));if(_0x365785[_0x253fbd(0xd0)]>0x0)throw new Error(_0x253fbd(0xd1)+_0x365785[_0x253fbd(0xd2)](',\x20'));_0x46f5c4=_0x4bd814[_0x253fbd(0xb5)](_0xa069cd=>_0x52e40f[_0x253fbd(0xdb)](_0xa069cd));}else _0x46f5c4=_0x505e6c[_0x253fbd(0xca)](_0x3394a4=>!_0x303273[_0x253fbd(0xb2)](_0x3394a4['path']));if(_0x46f5c4['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x55db83[_0x253fbd(0xbe)]===!![],'targetPages':[],'plannedMenus':[]};const _0x2af984=_0x46f5c4['map'](_0x4b4877=>({'type':_0x253fbd(0xc6),'path':_0x4b4877['path'],'label':_0x4b4877['label'],'loadScriptMode':_0x253fbd(0xb7),'resources':[..._0x54367e]}));if(_0x55db83[_0x253fbd(0xbe)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x46f5c4,'plannedMenus':_0x2af984};const _0xe1802b=await createMenus(_0x120aa1,_0x1d6627,_0x46f5c4,_0x54367e['length']>0x0?_0x54367e:undefined);return logger['info'](_0x253fbd(0xd5),_0x253fbd(0xc4),{'count':_0x46f5c4['length'],'resources':_0x54367e}),{'created':_0xe1802b['length'],'skipped':![],'dryRun':![],'targetPages':_0x46f5c4,'plannedMenus':_0x2af984,'menus':_0xe1802b};}export function parseMenuSyncParams(_0x10fdb8){const _0x32b69e=a129_0x4d5044;if(!_0x10fdb8||typeof _0x10fdb8!=='string')return{};let _0x5659ba;try{_0x5659ba=JSON['parse'](_0x10fdb8);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0x5659ba!==_0x32b69e(0xbc)||_0x5659ba===null||Array[_0x32b69e(0xce)](_0x5659ba))throw new Error(_0x32b69e(0xbb));const _0x53a7d1=_0x5659ba;if(Object[_0x32b69e(0xe0)](_0x53a7d1,_0x32b69e(0xb9)))throw new Error(_0x32b69e(0xd4));const _0x37d1d8=Object[_0x32b69e(0xcc)](_0x53a7d1)[_0x32b69e(0xca)](_0x18cb9f=>!MENU_SYNC_PARAM_KEYS[_0x32b69e(0xb2)](_0x18cb9f));if(_0x37d1d8[_0x32b69e(0xd0)]>0x0)throw new Error(_0x32b69e(0xb8)+_0x37d1d8['join'](',\x20')+'.');for(const _0x12106d of MENU_SYNC_PARAM_KEYS){const _0x49ecae=_0x53a7d1[_0x12106d];if(_0x49ecae!==undefined&&(typeof _0x49ecae!==_0x32b69e(0xd7)||_0x49ecae[_0x32b69e(0xc3)]()===''))throw new Error(_0x32b69e(0xe1)+_0x12106d+_0x32b69e(0xd9));}return{'jsUrl':typeof _0x53a7d1[_0x32b69e(0xb4)]===_0x32b69e(0xd7)?_0x53a7d1[_0x32b69e(0xb4)][_0x32b69e(0xc3)]():undefined,'cssUrl':typeof _0x53a7d1['cssUrl']===_0x32b69e(0xd7)?_0x53a7d1[_0x32b69e(0xba)][_0x32b69e(0xc3)]():undefined};}
@@ -1 +1 @@
1
- (function(_0x43ab48,_0x41fa1b){const _0x2b3390=a129_0x1b19,_0x4fe94e=_0x43ab48();while(!![]){try{const _0x1d759b=parseInt(_0x2b3390(0xd0))/0x1+-parseInt(_0x2b3390(0x103))/0x2+-parseInt(_0x2b3390(0xf4))/0x3*(parseInt(_0x2b3390(0xf1))/0x4)+parseInt(_0x2b3390(0xe2))/0x5*(parseInt(_0x2b3390(0xcf))/0x6)+parseInt(_0x2b3390(0xd7))/0x7*(-parseInt(_0x2b3390(0xc6))/0x8)+parseInt(_0x2b3390(0xc5))/0x9*(-parseInt(_0x2b3390(0xdb))/0xa)+parseInt(_0x2b3390(0xe5))/0xb*(parseInt(_0x2b3390(0xf5))/0xc);if(_0x1d759b===_0x41fa1b)break;else _0x4fe94e['push'](_0x4fe94e['shift']());}catch(_0x69b909){_0x4fe94e['push'](_0x4fe94e['shift']());}}}(a129_0x529c,0xe0eb0));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 a129_0x1b19(_0x1b2fb1,_0x2e31b6){_0x1b2fb1=_0x1b2fb1-0xbb;const _0x529cc1=a129_0x529c();let _0x1b1987=_0x529cc1[_0x1b2fb1];return _0x1b1987;}function validateParams(_0x1a4569){const _0x41ed18=a129_0x1b19,_0x36e89d=[];return _0x1a4569[_0x41ed18(0xd8)]&&!isValidJsHttpsUrl(_0x1a4569[_0x41ed18(0xd8)])&&_0x36e89d[_0x41ed18(0xdd)]({'field':'jsUrl','message':_0x41ed18(0xbd)}),_0x1a4569[_0x41ed18(0xfd)]&&!isValidCssHttpsUrl(_0x1a4569[_0x41ed18(0xfd)])&&_0x36e89d['push']({'field':_0x41ed18(0xfd),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x36e89d;}export async function runMenuUpdateCore(_0x37f535,_0xe9f61e,_0x341def,_0x275a86={}){const _0x128d24=a129_0x1b19,_0x553776=parseUpdateParamsFlag(_0x341def),_0x1a2b26=normalizeMode(_0x275a86[_0x128d24(0xc2)]);validateSelection(_0x275a86[_0x128d24(0xf8)]);const _0x19250d=[];if(_0x553776['jsUrl'])_0x19250d[_0x128d24(0xdd)](_0x553776['jsUrl']);if(_0x553776[_0x128d24(0xfd)])_0x19250d[_0x128d24(0xdd)](_0x553776[_0x128d24(0xfd)]);const _0x13934b=validateParams(_0x553776);if(_0x13934b[_0x128d24(0xbf)]>0x0){const _0xf4bfe8=_0x13934b[_0x128d24(0xf7)](_0x331309=>_0x128d24(0xe9)+_0x331309[_0x128d24(0xdf)]+':\x20'+_0x331309[_0x128d24(0x101)])['join'](';\x20');throw new Error(_0x128d24(0xc8)+_0xf4bfe8);}if(_0x19250d[_0x128d24(0xbf)]===0x0)throw new Error(_0x128d24(0xf3)+_0x128d24(0xd2));logger[_0x128d24(0xee)](process['cwd']()),logger[_0x128d24(0xcc)](_0x128d24(0xfc),'Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0x37f535,'jsUrl':_0x553776[_0x128d24(0xd8)],'cssUrl':_0x553776['cssUrl'],'mode':_0x1a2b26,'dryRun':_0x275a86[_0x128d24(0xe8)]===!![]});if(_0x553776['jsUrl']){const _0x1509d1=await isUrlReachable(_0x553776[_0x128d24(0xd8)]);if(!_0x1509d1)throw new Error(_0x128d24(0xd5)+_0x553776[_0x128d24(0xd8)]);}if(_0x553776['cssUrl']){const _0x3b5622=await isUrlReachable(_0x553776[_0x128d24(0xfd)]);if(!_0x3b5622)throw new Error(_0x128d24(0xd3)+_0x553776['cssUrl']);}const _0x15b02b=await getOnlineMenuList(_0x37f535,_0xe9f61e),_0x2d9ee4=_0x15b02b[_0x128d24(0xdc)](_0x492dac=>_0x492dac[_0x128d24(0xea)][_0x128d24(0xbf)]>0x0),_0x6b8436=selectMenusForUpdate(_0x2d9ee4,_0x275a86[_0x128d24(0xf8)]);if(_0x6b8436[_0x128d24(0xbf)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x275a86[_0x128d24(0xe8)]===!![]};const _0x49d2ca=_0x6b8436[_0x128d24(0xf7)](_0x559f7b=>buildMenuUpdateDiff(_0x559f7b,_0x553776,_0x1a2b26,_0x275a86[_0x128d24(0xe1)]===!![],_0x275a86['loadScriptMode']));if(_0x275a86['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x49d2ca};const _0x431b25=await Promise['allSettled'](_0x6b8436[_0x128d24(0xf7)]((_0x430095,_0x5717ec)=>updateMenuCdnUrl(_0x37f535,_0xe9f61e,{'id':_0x430095['id'],'label':_0x430095['label'],'path':_0x430095['path'],'resources':_0x49d2ca[_0x5717ec][_0x128d24(0xd1)][_0x128d24(0xea)],'extend':_0x430095[_0x128d24(0xfb)]??null,'loadScriptMode':_0x275a86[_0x128d24(0x102)]}))),_0x1fa52a=_0x431b25['filter'](_0x39914c=>_0x39914c[_0x128d24(0xce)]===_0x128d24(0xf2))[_0x128d24(0xf7)](_0x7241c=>_0x7241c[_0x128d24(0xd4)]),_0xfb424b=_0x431b25['filter'](_0x1f76f5=>_0x1f76f5[_0x128d24(0xce)]===_0x128d24(0xc0))[_0x128d24(0xbf)];return logger[_0x128d24(0xcc)]('menu-asset-update',_0x128d24(0xbe),{'count':_0x6b8436[_0x128d24(0xbf)],'resources':_0x19250d}),{'updated':_0x1fa52a[_0x128d24(0xbf)],'failed':_0xfb424b,'skipped':![],'menus':_0x1fa52a};}function validateSelection(_0x2c3c2d){const _0x595b97=a129_0x1b19;if(!_0x2c3c2d)throw new Error(_0x595b97(0x104));if(_0x2c3c2d['all']&&(_0x2c3c2d['menuIds']['length']>0x0||_0x2c3c2d[_0x595b97(0xeb)]['length']>0x0))throw new Error(_0x595b97(0xff));if(!_0x2c3c2d[_0x595b97(0xfe)]&&_0x2c3c2d['menuIds'][_0x595b97(0xbf)]===0x0&&_0x2c3c2d[_0x595b97(0xeb)][_0x595b97(0xbf)]===0x0)throw new Error(_0x595b97(0x104));}export function selectMenusForUpdate(_0xcee3f5,_0x1849d6){const _0xd5e8cc=a129_0x1b19;validateSelection(_0x1849d6);if(_0x1849d6[_0xd5e8cc(0xfe)])return _0xcee3f5;const _0x1e5290=new Set(_0xcee3f5[_0xd5e8cc(0xf7)](_0xd17097=>_0xd17097['id'])),_0x5f3aa6=new Set(_0xcee3f5['map'](_0x50924c=>_0x50924c['path'])),_0x1f9294=_0x1849d6[_0xd5e8cc(0xc9)][_0xd5e8cc(0xdc)](_0x5e3b2c=>!_0x1e5290['has'](_0x5e3b2c)),_0xaf00d5=_0x1849d6['paths'][_0xd5e8cc(0xdc)](_0x5a6dbc=>!_0x5f3aa6['has'](_0x5a6dbc));if(_0x1f9294[_0xd5e8cc(0xbf)]>0x0||_0xaf00d5[_0xd5e8cc(0xbf)]>0x0){const _0x34f738=[..._0x1f9294['map'](_0x30c3f6=>String(_0x30c3f6)),..._0xaf00d5][_0xd5e8cc(0xf9)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x34f738);}const _0x31fa2a=new Set(_0x1849d6['menuIds']),_0xb93eb5=new Set(_0x1849d6[_0xd5e8cc(0xeb)]);return _0xcee3f5['filter'](_0x2a8277=>_0x31fa2a[_0xd5e8cc(0xd9)](_0x2a8277['id'])||_0xb93eb5['has'](_0x2a8277[_0xd5e8cc(0xbb)]));}function a129_0x529c(){const _0x166aa3=['Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','136020SLDwLF','25893408YXLYsS','some','map','selection','join','\x20existing\x20JS\x20resources\x20for\x20\x22','extend','menu-asset-update','cssUrl','all','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','label','message','loadScriptMode','1058506kKDOnh','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','path','parse','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Menu\x20asset\x20update\x20completed','length','rejected','string','mode','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','.\x20Allowed\x20values:\x20replace,\x20patch','9tRGuxL','1387208pIdVDf','endsWith','Invalid\x20--params:\x20','menuIds','.css','\x22\x20(','info','menu\x20asset-update\x20cannot\x20patch\x20','status','533886LOCKQd','1679736JoGEKh','after','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','CSS\x20URL\x20is\x20unreachable:\x20','value','JS\x20URL\x20is\x20unreachable:\x20','isArray','21xoHZQw','jsUrl','has','unshift','17438390hVJMWg','filter','push','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','field','object','force','95fTzulA','replace','patch','11vZySNT','toLowerCase','split','dryRun','--params.','resources','paths','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','.js','setLogPath','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','Invalid\x20--mode:\x20','160QzKNeR','fulfilled'];a129_0x529c=function(){return _0x166aa3;};return a129_0x529c();}function normalizeMode(_0x27f45a){const _0x442546=a129_0x1b19;if(!_0x27f45a)return _0x442546(0xe4);if(_0x27f45a===_0x442546(0xe3)||_0x27f45a===_0x442546(0xe4))return _0x27f45a;throw new Error(_0x442546(0xf0)+_0x27f45a+_0x442546(0xc4));}function buildMenuUpdateDiff(_0x1f71bc,_0x1f3c6a,_0x2ce3be,_0x3cd85f,_0x4da31e){const _0x4c35ff=a129_0x1b19,_0x3eb021=[..._0x1f71bc['resources']];_0x2ce3be===_0x4c35ff(0xe4)&&assertUnambiguousPatchResources(_0x1f71bc,_0x3eb021,_0x1f3c6a);const _0x1dcab0=_0x2ce3be===_0x4c35ff(0xe4)?patchResources(_0x3eb021,_0x1f3c6a):replaceResources(_0x1f3c6a),_0x5c7dd0=[],_0x45fdf1=_0x3eb021['some'](isJsResource),_0x276154=_0x1dcab0[_0x4c35ff(0xf6)](isJsResource);if(_0x45fdf1&&!_0x276154){const _0x227c05=_0x4c35ff(0xc3)+_0x1f71bc[_0x4c35ff(0x100)]+_0x4c35ff(0xcb)+_0x1f71bc['path']+').\x20'+_0x4c35ff(0xde);if(!_0x3cd85f)throw new Error(_0x227c05);_0x5c7dd0[_0x4c35ff(0xdd)](_0x227c05);}const _0x8ad16=_0x3eb021['some'](isCssResource),_0x5cb8ef=_0x1dcab0[_0x4c35ff(0xf6)](isCssResource);_0x8ad16&&!_0x5cb8ef&&_0x5c7dd0[_0x4c35ff(0xdd)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x1f71bc['label']+_0x4c35ff(0xcb)+_0x1f71bc[_0x4c35ff(0xbb)]+').');const _0x591c97=typeof _0x1f71bc[_0x4c35ff(0xfb)]?.[_0x4c35ff(0x102)]===_0x4c35ff(0xc1)?_0x1f71bc[_0x4c35ff(0xfb)][_0x4c35ff(0x102)]:null,_0x18c1ce=_0x4da31e?{'loadScriptMode':_0x591c97}:{},_0x285871=_0x4da31e?{'loadScriptMode':_0x4da31e}:{};return{'id':_0x1f71bc['id'],'label':_0x1f71bc['label'],'path':_0x1f71bc[_0x4c35ff(0xbb)],'mode':_0x2ce3be,'before':{'resources':_0x3eb021,..._0x18c1ce},'after':{'resources':_0x1dcab0,..._0x285871},'warnings':_0x5c7dd0};}function replaceResources(_0x55a8ec){const _0x31a525=a129_0x1b19;return[_0x55a8ec[_0x31a525(0xd8)],_0x55a8ec[_0x31a525(0xfd)]]['filter'](_0x32ffa8=>!!_0x32ffa8);}function assertUnambiguousPatchResources(_0xf0f3f3,_0x1e891d,_0x560d70){const _0x5ef08b=a129_0x1b19,_0x1473d5=_0x1e891d[_0x5ef08b(0xdc)](isJsResource)['length'];if(_0x560d70[_0x5ef08b(0xd8)]&&_0x1473d5>0x1)throw new Error(_0x5ef08b(0xcd)+_0x1473d5+_0x5ef08b(0xfa)+_0xf0f3f3['label']+_0x5ef08b(0xcb)+_0xf0f3f3[_0x5ef08b(0xbb)]+')\x20'+_0x5ef08b(0xef));const _0x1780c1=_0x1e891d[_0x5ef08b(0xdc)](isCssResource)['length'];if(_0x560d70[_0x5ef08b(0xfd)]&&_0x1780c1>0x1)throw new Error(_0x5ef08b(0xcd)+_0x1780c1+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0xf0f3f3['label']+_0x5ef08b(0xcb)+_0xf0f3f3['path']+')\x20'+_0x5ef08b(0xec));}function patchResources(_0x91df4,_0x180bdf){const _0x14f1f8=a129_0x1b19;let _0x5927ef=![],_0x2ddee4=![];const _0x40c353=[];for(const _0x10989b of _0x91df4){if(isJsResource(_0x10989b)){if(_0x180bdf[_0x14f1f8(0xd8)]&&!_0x5927ef)_0x40c353[_0x14f1f8(0xdd)](_0x180bdf['jsUrl']),_0x5927ef=!![];else!_0x180bdf[_0x14f1f8(0xd8)]&&_0x40c353['push'](_0x10989b);continue;}if(isCssResource(_0x10989b)){if(_0x180bdf[_0x14f1f8(0xfd)]&&!_0x2ddee4)_0x40c353['push'](_0x180bdf[_0x14f1f8(0xfd)]),_0x2ddee4=!![];else!_0x180bdf[_0x14f1f8(0xfd)]&&_0x40c353[_0x14f1f8(0xdd)](_0x10989b);continue;}_0x40c353['push'](_0x10989b);}return _0x180bdf[_0x14f1f8(0xd8)]&&!_0x5927ef&&_0x40c353[_0x14f1f8(0xda)](_0x180bdf['jsUrl']),_0x180bdf[_0x14f1f8(0xfd)]&&!_0x2ddee4&&_0x40c353['push'](_0x180bdf['cssUrl']),_0x40c353;}function isJsResource(_0x27a2f4){const _0x3c03e7=a129_0x1b19;return stripQuery(_0x27a2f4)[_0x3c03e7(0xe6)]()[_0x3c03e7(0xc7)](_0x3c03e7(0xed));}function isCssResource(_0x2f9954){const _0x372225=a129_0x1b19;return stripQuery(_0x2f9954)[_0x372225(0xe6)]()['endsWith'](_0x372225(0xca));}function stripQuery(_0x3bf777){const _0xcd1fa9=a129_0x1b19;return _0x3bf777[_0xcd1fa9(0xe7)]('?')[0x0]??_0x3bf777;}function parseUpdateParamsFlag(_0x13f8b0){const _0x2961cb=a129_0x1b19;if(!_0x13f8b0||typeof _0x13f8b0!==_0x2961cb(0xc1))return{};try{const _0x3a2cf2=JSON[_0x2961cb(0xbc)](_0x13f8b0);if(typeof _0x3a2cf2!==_0x2961cb(0xe0)||_0x3a2cf2===null||Array[_0x2961cb(0xd6)](_0x3a2cf2))return{};return{'jsUrl':typeof _0x3a2cf2[_0x2961cb(0xd8)]===_0x2961cb(0xc1)?_0x3a2cf2['jsUrl']['trim']():undefined,'cssUrl':typeof _0x3a2cf2[_0x2961cb(0xfd)]===_0x2961cb(0xc1)?_0x3a2cf2[_0x2961cb(0xfd)]['trim']():undefined};}catch{return{};}}
1
+ (function(_0x13c9da,_0x4588ad){const _0x1696ad=a131_0x557f,_0x26eb80=_0x13c9da();while(!![]){try{const _0xced495=-parseInt(_0x1696ad(0x101))/0x1*(-parseInt(_0x1696ad(0x11f))/0x2)+parseInt(_0x1696ad(0x11c))/0x3*(parseInt(_0x1696ad(0x104))/0x4)+parseInt(_0x1696ad(0x12e))/0x5*(-parseInt(_0x1696ad(0x132))/0x6)+parseInt(_0x1696ad(0x12d))/0x7*(parseInt(_0x1696ad(0x120))/0x8)+parseInt(_0x1696ad(0x12b))/0x9*(-parseInt(_0x1696ad(0xfe))/0xa)+parseInt(_0x1696ad(0x109))/0xb+parseInt(_0x1696ad(0x107))/0xc*(parseInt(_0x1696ad(0x117))/0xd);if(_0xced495===_0x4588ad)break;else _0x26eb80['push'](_0x26eb80['shift']());}catch(_0x26671b){_0x26eb80['push'](_0x26eb80['shift']());}}}(a131_0x692f,0xee6b0));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 a131_0x557f(_0x342641,_0x170b4f){_0x342641=_0x342641-0xf0;const _0x692f2=a131_0x692f();let _0x557fe0=_0x692f2[_0x342641];return _0x557fe0;}function validateParams(_0x4e6cd8){const _0x1b7dec=a131_0x557f,_0x122948=[];return _0x4e6cd8[_0x1b7dec(0x121)]&&!isValidJsHttpsUrl(_0x4e6cd8[_0x1b7dec(0x121)])&&_0x122948[_0x1b7dec(0x123)]({'field':_0x1b7dec(0x121),'message':_0x1b7dec(0xf1)}),_0x4e6cd8[_0x1b7dec(0x108)]&&!isValidCssHttpsUrl(_0x4e6cd8[_0x1b7dec(0x108)])&&_0x122948[_0x1b7dec(0x123)]({'field':_0x1b7dec(0x108),'message':_0x1b7dec(0x119)}),_0x122948;}export async function runMenuUpdateCore(_0x337df3,_0x31b9fa,_0x892d9c,_0x472c0e={}){const _0x1345ec=a131_0x557f,_0x414a57=parseUpdateParamsFlag(_0x892d9c),_0x2aae4f=normalizeMode(_0x472c0e['mode']);validateSelection(_0x472c0e[_0x1345ec(0xff)]);const _0x43fcc0=[];if(_0x414a57[_0x1345ec(0x121)])_0x43fcc0[_0x1345ec(0x123)](_0x414a57[_0x1345ec(0x121)]);if(_0x414a57[_0x1345ec(0x108)])_0x43fcc0[_0x1345ec(0x123)](_0x414a57[_0x1345ec(0x108)]);const _0x543b8f=validateParams(_0x414a57);if(_0x543b8f[_0x1345ec(0xf7)]>0x0){const _0x1531a1=_0x543b8f[_0x1345ec(0x11b)](_0x1c2325=>_0x1345ec(0x127)+_0x1c2325['field']+':\x20'+_0x1c2325[_0x1345ec(0x111)])[_0x1345ec(0x12c)](';\x20');throw new Error(_0x1345ec(0xf6)+_0x1531a1);}if(_0x43fcc0[_0x1345ec(0xf7)]===0x0)throw new Error('Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+_0x1345ec(0xf4));logger[_0x1345ec(0xf3)](process[_0x1345ec(0x10e)]()),logger[_0x1345ec(0x10a)](_0x1345ec(0x131),_0x1345ec(0xfc),{'appCode':_0x337df3,'jsUrl':_0x414a57['jsUrl'],'cssUrl':_0x414a57[_0x1345ec(0x108)],'mode':_0x2aae4f,'dryRun':_0x472c0e['dryRun']===!![]});if(_0x414a57[_0x1345ec(0x121)]){const _0x457729=await isUrlReachable(_0x414a57[_0x1345ec(0x121)]);if(!_0x457729)throw new Error(_0x1345ec(0x12a)+_0x414a57[_0x1345ec(0x121)]);}if(_0x414a57[_0x1345ec(0x108)]){const _0xb696c3=await isUrlReachable(_0x414a57[_0x1345ec(0x108)]);if(!_0xb696c3)throw new Error(_0x1345ec(0x100)+_0x414a57[_0x1345ec(0x108)]);}const _0x55d5c7=await getOnlineMenuList(_0x337df3,_0x31b9fa),_0x4196c5=_0x55d5c7[_0x1345ec(0x113)](_0x1b7a95=>_0x1b7a95[_0x1345ec(0xf8)][_0x1345ec(0xf7)]>0x0),_0x58415d=selectMenusForUpdate(_0x4196c5,_0x472c0e[_0x1345ec(0xff)]);if(_0x58415d[_0x1345ec(0xf7)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x472c0e[_0x1345ec(0x10f)]===!![]};const _0x39a513=_0x58415d[_0x1345ec(0x11b)](_0x89946=>buildMenuUpdateDiff(_0x89946,_0x414a57,_0x2aae4f,_0x472c0e['force']===!![],_0x472c0e[_0x1345ec(0x122)]));if(_0x472c0e[_0x1345ec(0x10f)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x39a513};const _0x5a02dc=await Promise['allSettled'](_0x58415d[_0x1345ec(0x11b)]((_0x134dbd,_0x3588fe)=>updateMenuCdnUrl(_0x337df3,_0x31b9fa,{'id':_0x134dbd['id'],'label':_0x134dbd[_0x1345ec(0x11d)],'path':_0x134dbd[_0x1345ec(0x103)],'resources':_0x39a513[_0x3588fe][_0x1345ec(0x137)][_0x1345ec(0xf8)],'extend':_0x134dbd['extend']??null,'loadScriptMode':_0x472c0e['loadScriptMode']}))),_0x51ac85=_0x5a02dc[_0x1345ec(0x113)](_0x10bb00=>_0x10bb00['status']===_0x1345ec(0x116))[_0x1345ec(0x11b)](_0x589118=>_0x589118[_0x1345ec(0x126)]),_0x562613=_0x5a02dc[_0x1345ec(0x113)](_0x584238=>_0x584238[_0x1345ec(0x135)]==='rejected')['length'];return logger[_0x1345ec(0x10a)](_0x1345ec(0x131),_0x1345ec(0xf2),{'count':_0x58415d['length'],'resources':_0x43fcc0}),{'updated':_0x51ac85[_0x1345ec(0xf7)],'failed':_0x562613,'skipped':![],'menus':_0x51ac85};}function validateSelection(_0x28814e){const _0x32b2b7=a131_0x557f;if(!_0x28814e)throw new Error(_0x32b2b7(0x11a));if(_0x28814e[_0x32b2b7(0x110)]&&(_0x28814e[_0x32b2b7(0x124)][_0x32b2b7(0xf7)]>0x0||_0x28814e['paths'][_0x32b2b7(0xf7)]>0x0))throw new Error(_0x32b2b7(0x136));if(!_0x28814e[_0x32b2b7(0x110)]&&_0x28814e[_0x32b2b7(0x124)]['length']===0x0&&_0x28814e[_0x32b2b7(0x11e)]['length']===0x0)throw new Error(_0x32b2b7(0x11a));}export function selectMenusForUpdate(_0x576535,_0x5c0392){const _0x17ef53=a131_0x557f;validateSelection(_0x5c0392);if(_0x5c0392[_0x17ef53(0x110)])return _0x576535;const _0x1126f3=new Set(_0x576535[_0x17ef53(0x11b)](_0x5ed7e0=>_0x5ed7e0['id'])),_0x5d5957=new Set(_0x576535['map'](_0x6e8c8b=>_0x6e8c8b[_0x17ef53(0x103)])),_0x280fb1=_0x5c0392[_0x17ef53(0x124)][_0x17ef53(0x113)](_0x566ef1=>!_0x1126f3[_0x17ef53(0x129)](_0x566ef1)),_0xe0be1e=_0x5c0392[_0x17ef53(0x11e)][_0x17ef53(0x113)](_0x1457e0=>!_0x5d5957[_0x17ef53(0x129)](_0x1457e0));if(_0x280fb1[_0x17ef53(0xf7)]>0x0||_0xe0be1e[_0x17ef53(0xf7)]>0x0){const _0xa57f42=[..._0x280fb1[_0x17ef53(0x11b)](_0x5cc3c1=>String(_0x5cc3c1)),..._0xe0be1e][_0x17ef53(0x12c)](',\x20');throw new Error(_0x17ef53(0xf0)+_0xa57f42);}const _0x18e2bf=new Set(_0x5c0392[_0x17ef53(0x124)]),_0x38c55f=new Set(_0x5c0392[_0x17ef53(0x11e)]);return _0x576535[_0x17ef53(0x113)](_0x177f6f=>_0x18e2bf[_0x17ef53(0x129)](_0x177f6f['id'])||_0x38c55f[_0x17ef53(0x129)](_0x177f6f[_0x17ef53(0x103)]));}function normalizeMode(_0x104074){const _0x4e2e7f=a131_0x557f;if(!_0x104074)return _0x4e2e7f(0x133);if(_0x104074===_0x4e2e7f(0x10d)||_0x104074===_0x4e2e7f(0x133))return _0x104074;throw new Error(_0x4e2e7f(0x115)+_0x104074+_0x4e2e7f(0xfa));}function buildMenuUpdateDiff(_0x2f1c4d,_0x341eaa,_0x373827,_0x4a49d3,_0x1bc1f9){const _0x1eada2=a131_0x557f,_0x49f312=[..._0x2f1c4d[_0x1eada2(0xf8)]];_0x373827==='patch'&&assertUnambiguousPatchResources(_0x2f1c4d,_0x49f312,_0x341eaa);const _0x2479aa=_0x373827===_0x1eada2(0x133)?patchResources(_0x49f312,_0x341eaa):replaceResources(_0x341eaa),_0x464c95=[],_0x36627f=_0x49f312[_0x1eada2(0x118)](isJsResource),_0x96f8d9=_0x2479aa[_0x1eada2(0x118)](isJsResource);if(_0x36627f&&!_0x96f8d9){const _0x28b0c3='menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x2f1c4d[_0x1eada2(0x11d)]+'\x22\x20('+_0x2f1c4d[_0x1eada2(0x103)]+_0x1eada2(0x10c)+_0x1eada2(0x10b);if(!_0x4a49d3)throw new Error(_0x28b0c3);_0x464c95[_0x1eada2(0x123)](_0x28b0c3);}const _0x4cb39f=_0x49f312[_0x1eada2(0x118)](isCssResource),_0x331a9d=_0x2479aa[_0x1eada2(0x118)](isCssResource);_0x4cb39f&&!_0x331a9d&&_0x464c95[_0x1eada2(0x123)](_0x1eada2(0x130)+_0x2f1c4d[_0x1eada2(0x11d)]+'\x22\x20('+_0x2f1c4d[_0x1eada2(0x103)]+').');const _0x1f1ebe=typeof _0x2f1c4d[_0x1eada2(0x114)]?.['loadScriptMode']===_0x1eada2(0x105)?_0x2f1c4d[_0x1eada2(0x114)][_0x1eada2(0x122)]:null,_0xd4b69f=_0x1bc1f9?{'loadScriptMode':_0x1f1ebe}:{},_0x148baa=_0x1bc1f9?{'loadScriptMode':_0x1bc1f9}:{};return{'id':_0x2f1c4d['id'],'label':_0x2f1c4d['label'],'path':_0x2f1c4d['path'],'mode':_0x373827,'before':{'resources':_0x49f312,..._0xd4b69f},'after':{'resources':_0x2479aa,..._0x148baa},'warnings':_0x464c95};}function replaceResources(_0x5dcba0){const _0x95160a=a131_0x557f;return[_0x5dcba0[_0x95160a(0x121)],_0x5dcba0[_0x95160a(0x108)]][_0x95160a(0x113)](_0x1a9e2d=>!!_0x1a9e2d);}function assertUnambiguousPatchResources(_0x427b2e,_0x4112af,_0x5e2db9){const _0x292a27=a131_0x557f,_0x87dbb5=_0x4112af[_0x292a27(0x113)](isJsResource)[_0x292a27(0xf7)];if(_0x5e2db9[_0x292a27(0x121)]&&_0x87dbb5>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x87dbb5+_0x292a27(0x128)+_0x427b2e['label']+_0x292a27(0xf9)+_0x427b2e[_0x292a27(0x103)]+')\x20'+_0x292a27(0xf5));const _0x546a5f=_0x4112af['filter'](isCssResource)[_0x292a27(0xf7)];if(_0x5e2db9['cssUrl']&&_0x546a5f>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x546a5f+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x427b2e[_0x292a27(0x11d)]+_0x292a27(0xf9)+_0x427b2e[_0x292a27(0x103)]+')\x20'+_0x292a27(0x134));}function a131_0x692f(){const _0x5953de=['JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Menu\x20asset\x20update\x20completed','setLogPath','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','Invalid\x20--params:\x20','length','resources','\x22\x20(','.\x20Allowed\x20values:\x20replace,\x20patch','isArray','Start\x20non-interactive\x20menu\x20asset\x20update','object','751470CKQTQx','selection','CSS\x20URL\x20is\x20unreachable:\x20','77RpJMKF','trim','path','4xsWvLC','string','.js','4164nHfBcS','cssUrl','6803214AwbBdu','info','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.',').\x20','replace','cwd','dryRun','all','message','toLowerCase','filter','extend','Invalid\x20--mode:\x20','fulfilled','24037jlJuhg','some','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.','map','780969YzbXQD','label','paths','10238kazhny','8NksKyy','jsUrl','loadScriptMode','push','menuIds','split','value','--params.','\x20existing\x20JS\x20resources\x20for\x20\x22','has','JS\x20URL\x20is\x20unreachable:\x20','99cuYnmM','join','1372301WzFFrP','145tZSWEe','endsWith','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','menu-asset-update','63606QeGWif','patch','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','status','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','after','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'];a131_0x692f=function(){return _0x5953de;};return a131_0x692f();}function patchResources(_0x36d2b5,_0x3f22b1){const _0x202744=a131_0x557f;let _0x2a322b=![],_0x3ac4fd=![];const _0x37f079=[];for(const _0x5441ef of _0x36d2b5){if(isJsResource(_0x5441ef)){if(_0x3f22b1['jsUrl']&&!_0x2a322b)_0x37f079[_0x202744(0x123)](_0x3f22b1[_0x202744(0x121)]),_0x2a322b=!![];else!_0x3f22b1['jsUrl']&&_0x37f079[_0x202744(0x123)](_0x5441ef);continue;}if(isCssResource(_0x5441ef)){if(_0x3f22b1['cssUrl']&&!_0x3ac4fd)_0x37f079[_0x202744(0x123)](_0x3f22b1[_0x202744(0x108)]),_0x3ac4fd=!![];else!_0x3f22b1[_0x202744(0x108)]&&_0x37f079[_0x202744(0x123)](_0x5441ef);continue;}_0x37f079[_0x202744(0x123)](_0x5441ef);}return _0x3f22b1['jsUrl']&&!_0x2a322b&&_0x37f079['unshift'](_0x3f22b1[_0x202744(0x121)]),_0x3f22b1[_0x202744(0x108)]&&!_0x3ac4fd&&_0x37f079['push'](_0x3f22b1[_0x202744(0x108)]),_0x37f079;}function isJsResource(_0x4d52fe){const _0x5e9986=a131_0x557f;return stripQuery(_0x4d52fe)[_0x5e9986(0x112)]()[_0x5e9986(0x12f)](_0x5e9986(0x106));}function isCssResource(_0x1c89bc){const _0x4bc97e=a131_0x557f;return stripQuery(_0x1c89bc)[_0x4bc97e(0x112)]()[_0x4bc97e(0x12f)]('.css');}function stripQuery(_0xd6ae5d){const _0x5883eb=a131_0x557f;return _0xd6ae5d[_0x5883eb(0x125)]('?')[0x0]??_0xd6ae5d;}function parseUpdateParamsFlag(_0x2019f9){const _0x1ba047=a131_0x557f;if(!_0x2019f9||typeof _0x2019f9!==_0x1ba047(0x105))return{};try{const _0x4739a8=JSON['parse'](_0x2019f9);if(typeof _0x4739a8!==_0x1ba047(0xfd)||_0x4739a8===null||Array[_0x1ba047(0xfb)](_0x4739a8))return{};return{'jsUrl':typeof _0x4739a8[_0x1ba047(0x121)]===_0x1ba047(0x105)?_0x4739a8[_0x1ba047(0x121)][_0x1ba047(0x102)]():undefined,'cssUrl':typeof _0x4739a8['cssUrl']===_0x1ba047(0x105)?_0x4739a8[_0x1ba047(0x108)][_0x1ba047(0x102)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x503287,_0x2dcc34){const _0x149283=a130_0x4509,_0x4b099c=_0x503287();while(!![]){try{const _0x18472e=-parseInt(_0x149283(0x1a3))/0x1*(parseInt(_0x149283(0x1a7))/0x2)+-parseInt(_0x149283(0x19f))/0x3+-parseInt(_0x149283(0x1a5))/0x4+-parseInt(_0x149283(0x19d))/0x5*(-parseInt(_0x149283(0x19c))/0x6)+parseInt(_0x149283(0x1a1))/0x7+-parseInt(_0x149283(0x1a8))/0x8*(parseInt(_0x149283(0x19e))/0x9)+parseInt(_0x149283(0x1a0))/0xa*(parseInt(_0x149283(0x1a6))/0xb);if(_0x18472e===_0x2dcc34)break;else _0x4b099c['push'](_0x4b099c['shift']());}catch(_0x3b11bf){_0x4b099c['push'](_0x4b099c['shift']());}}}(a130_0x4c29,0xba594));export function isValidJsHttpsUrl(_0x17ab1b){const _0x41122e=a130_0x4509;return/^https:\/\/.+\.js(\?.*)?$/[_0x41122e(0x1a9)](_0x17ab1b[_0x41122e(0x1a4)]());}export function isValidCssHttpsUrl(_0x8ff6aa){const _0x4a8309=a130_0x4509;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x8ff6aa[_0x4a8309(0x1a4)]());}function a130_0x4509(_0x396c8c,_0x5894a2){_0x396c8c=_0x396c8c-0x19c;const _0x4c29bc=a130_0x4c29();let _0x45097d=_0x4c29bc[_0x396c8c];return _0x45097d;}function a130_0x4c29(){const _0x47f025=['29488019twoxLs','36154FMUEZL','248iHDTlo','test','12zvjuRm','2693295TAFqtT','442899zzlYev','644994sSUOwp','10mHIElm','830312byVqJI','HEAD','18KwgHQD','trim','4189816dqMUpK'];a130_0x4c29=function(){return _0x47f025;};return a130_0x4c29();}export async function isUrlReachable(_0x5abfd4){const _0x157bb0=a130_0x4509;try{const _0x2bd7d6=await fetch(_0x5abfd4,{'method':_0x157bb0(0x1a2)});return _0x2bd7d6['ok'];}catch{return![];}}
1
+ (function(_0x5e6a4f,_0x3d881e){const _0x336413=a132_0x4b36,_0x33f6eb=_0x5e6a4f();while(!![]){try{const _0x7d818=-parseInt(_0x336413(0xea))/0x1+parseInt(_0x336413(0xeb))/0x2*(parseInt(_0x336413(0xe6))/0x3)+-parseInt(_0x336413(0xed))/0x4+parseInt(_0x336413(0xe7))/0x5*(parseInt(_0x336413(0xe4))/0x6)+-parseInt(_0x336413(0xe3))/0x7+-parseInt(_0x336413(0xe8))/0x8+-parseInt(_0x336413(0xe9))/0x9*(-parseInt(_0x336413(0xe5))/0xa);if(_0x7d818===_0x3d881e)break;else _0x33f6eb['push'](_0x33f6eb['shift']());}catch(_0x53fbf0){_0x33f6eb['push'](_0x33f6eb['shift']());}}}(a132_0x5b2b,0x5a584));function a132_0x4b36(_0x53e4da,_0x5877e2){_0x53e4da=_0x53e4da-0xe2;const _0x5b2b4e=a132_0x5b2b();let _0x4b36fd=_0x5b2b4e[_0x53e4da];return _0x4b36fd;}export function isValidJsHttpsUrl(_0x5f2ffb){const _0x31614=a132_0x4b36;return/^https:\/\/.+\.js(\?.*)?$/[_0x31614(0xec)](_0x5f2ffb[_0x31614(0xe2)]());}function a132_0x5b2b(){const _0x1b62ca=['trim','1552047iazfbQ','414WDwNvs','2003720eNevNO','87OEgzxw','36295IbNoTp','3321392Qejdeb','27PWzUxq','463636Plqfow','31408KdrwRj','test','347280EQzgEd','HEAD'];a132_0x5b2b=function(){return _0x1b62ca;};return a132_0x5b2b();}export function isValidCssHttpsUrl(_0x5ead6b){const _0x5676d3=a132_0x4b36;return/^https:\/\/.+\.css(\?.*)?$/[_0x5676d3(0xec)](_0x5ead6b[_0x5676d3(0xe2)]());}export async function isUrlReachable(_0x3fb696){const _0x1f20f2=a132_0x4b36;try{const _0x2b7d3f=await fetch(_0x3fb696,{'method':_0x1f20f2(0xee)});return _0x2b7d3f['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- const a131_0x2cddf5=a131_0x3565;function a131_0x3565(_0x558339,_0x2929a3){_0x558339=_0x558339-0x18b;const _0xd9fe12=a131_0xd9fe();let _0x3565b8=_0xd9fe12[_0x558339];return _0x3565b8;}(function(_0x50b98e,_0x7c1ef7){const _0x5621be=a131_0x3565,_0xd00eb2=_0x50b98e();while(!![]){try{const _0x4ea4e1=-parseInt(_0x5621be(0x1ab))/0x1+-parseInt(_0x5621be(0x1b6))/0x2*(-parseInt(_0x5621be(0x1d2))/0x3)+-parseInt(_0x5621be(0x1c2))/0x4*(-parseInt(_0x5621be(0x19b))/0x5)+-parseInt(_0x5621be(0x1a1))/0x6+parseInt(_0x5621be(0x1ba))/0x7*(-parseInt(_0x5621be(0x1ca))/0x8)+-parseInt(_0x5621be(0x1a3))/0x9*(-parseInt(_0x5621be(0x1b4))/0xa)+parseInt(_0x5621be(0x1be))/0xb*(-parseInt(_0x5621be(0x1d1))/0xc);if(_0x4ea4e1===_0x7c1ef7)break;else _0xd00eb2['push'](_0xd00eb2['shift']());}catch(_0x55efd4){_0xd00eb2['push'](_0xd00eb2['shift']());}}}(a131_0xd9fe,0xb4fcd));import a131_0x4fff0c from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';function a131_0xd9fe(){const _0x33b874=['900392CpyzgQ','\x20menu(s)\x20created','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','map','POST','appCode','trim','72BObsYi','20598fmNKti','Created\x20','\x20menu(s)\x20with\x20JS:\x20','boolean','\x20created.','sync','validation','str','Menu\x20sync\x20skipped','\x20menu(s)...','\x20local\x20microfrontend\x20menu(s).','\x20\x20Cancelled.','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','localPages','/smartapi/menu/create','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','write','\x20and\x20CSS:\x20','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','rawFlags','2555hqqPLs','size','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','\x20\x20Create\x20','Pre-fill\x20JS/CSS\x20URLs.\x20','cookie','4289160VlxUoM','split','18UAnYrF','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','Menu\x20sync\x20completed:\x20','Would\x20create\x20','✓\x20Menu\x20sync\x20completed:\x20','\x20menu(s)','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','skipped','343025xsQVWp','\x20\x20✓\x20Selected:\x20','Fetching\x20online\x20menu\x20list...','Failed\x20to\x20fetch\x20online\x20menu\x20list','filter','cssUrl','gray','length','\x20\x20Continue\x20with\x20creation?','5469370aEPCJt','Creating\x20','148QXUPpC','appcode','message','Menu\x20creation\x20failed','7CviFIM','cyan','Online\x20menu\x20list\x20fetched','string','1874356lVlUis','flag','\x20failed.','created','10428KkgcXL','Sync\x20local\x20pages\x20as\x20platform\x20menus','selectedAppName','params','jsUrl','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','paths'];a131_0xd9fe=function(){return _0x33b874;};return a131_0xd9fe();}import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':a131_0x2cddf5(0x18b),'description':a131_0x2cddf5(0x1c3),'risk':a131_0x2cddf5(0x196),'flags':[{'name':a131_0x2cddf5(0x1c5),'type':a131_0x2cddf5(0x1bd),'description':a131_0x2cddf5(0x19f)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':a131_0x2cddf5(0x1c9),'type':a131_0x2cddf5(0x1bd),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':'yes','type':a131_0x2cddf5(0x1d5),'description':a131_0x2cddf5(0x198)}],async 'dryRun'(_0x1f75f8){const _0x2a8cad=a131_0x2cddf5;ensureRunnableContext(_0x1f75f8[_0x2a8cad(0x19a)],_0x1f75f8[_0x2a8cad(0x1c4)]);const _0x1e8ff9=await runMenuSyncCore(_0x1f75f8['appCode'],_0x1f75f8['cookie'],parsePaths(_0x1f75f8['str']('paths')),_0x1f75f8['str']('params'),{'dryRun':!![]});return{'method':_0x2a8cad(0x1ce),'url':_0x2a8cad(0x194),'body':_0x1e8ff9,'description':_0x1e8ff9[_0x2a8cad(0x1aa)]?_0x2a8cad(0x199):_0x2a8cad(0x1a6)+_0x1e8ff9['targetPages'][_0x2a8cad(0x1b2)]+_0x2a8cad(0x190)};},async 'execute'(_0x5232dd){const _0x6a903f=a131_0x2cddf5;ensureRunnableContext(_0x5232dd[_0x6a903f(0x19a)],_0x5232dd['selectedAppName']);const _0xad6a93=_0x5232dd[_0x6a903f(0x1bf)]('yes'),_0x1bc743=_0x5232dd[_0x6a903f(0x18d)](_0x6a903f(0x1c5)),_0x3456f2=parsePaths(_0x5232dd[_0x6a903f(0x18d)](_0x6a903f(0x1c9))),_0x138291=parseMenuSyncParams(_0x1bc743);if(_0xad6a93){const _0x3b7ab9=await runMenuSyncCore(_0x5232dd[_0x6a903f(0x1cf)],_0x5232dd[_0x6a903f(0x1a0)],_0x3456f2,_0x1bc743);if(_0x3b7ab9['skipped']){const _0x36881c=getLocalPages();_0x36881c[_0x6a903f(0x1b2)]===0x0?writeCliSideChannelLine(_0x6a903f(0x1c8)):writeCliSideChannelLine(_0x6a903f(0x195));}else writeCliSideChannelLine(_0x6a903f(0x1a7)+_0x3b7ab9['created']+_0x6a903f(0x1cb));return{'ok':!![],'data':_0x3b7ab9,'message':_0x3b7ab9[_0x6a903f(0x1aa)]?_0x6a903f(0x18e):_0x6a903f(0x1a5)+_0x3b7ab9['created']+_0x6a903f(0x1d6)};}if(_0x3456f2['length']>0x0)throw CliErrors[_0x6a903f(0x18c)](_0x6a903f(0x192),_0x6a903f(0x1a9));if(!isInteractive()&&_0x1bc743)throw CliErrors[_0x6a903f(0x18c)](_0x6a903f(0x1c7),_0x6a903f(0x1a9));requireInteractive();const _0x35063e=startSpinner(_0x6a903f(0x1ad));let _0x240454,_0x5c0cfa,_0x150415;try{const _0x271d70=await fetchMenuData(_0x5232dd[_0x6a903f(0x1cf)],_0x5232dd['cookie']);_0x240454=_0x271d70[_0x6a903f(0x193)],_0x5c0cfa=_0x271d70['onlinePaths'],_0x150415=_0x271d70['onlineMenuList'],stopSpinner(_0x35063e,_0x6a903f(0x1bc),!![]);}catch(_0x2fbe96){stopSpinner(_0x35063e,_0x6a903f(0x1ae),![]);throw CliErrors[_0x6a903f(0x18c)](_0x2fbe96 instanceof Error?_0x2fbe96[_0x6a903f(0x1b8)]:_0x6a903f(0x1ae));}if(_0x240454[_0x6a903f(0x1b2)]===0x0)return writeCliSideChannelLine(a131_0x4fff0c['yellow'](_0x6a903f(0x19d))),{'ok':!![]};const _0x480ef6=buildCompareRows(_0x240454,_0x5c0cfa);writeCliSideChannelLine(renderCompareTable(_0x480ef6)),writeCliSideChannelLine('');const _0x5a69b9=await selectPages(_0x240454,_0x5c0cfa);writeCliSideChannelLine(''),writeCliSideChannelLine(a131_0x4fff0c[_0x6a903f(0x1bb)](_0x6a903f(0x1ac)+_0x5a69b9[_0x6a903f(0x1b2)]+'\x20page(s)'));const _0x1097c0=_0x138291[_0x6a903f(0x1c6)]&&_0x138291[_0x6a903f(0x1b0)];if(!_0x1097c0){writeCliSideChannelLine(renderSyncSummary(_0x5a69b9,_0x5c0cfa[_0x6a903f(0x19c)]>0x0));const _0x4c47b0=await askConfirm(_0x6a903f(0x1b3));if(!_0x4c47b0)return writeCliSideChannelLine(a131_0x4fff0c['gray'](_0x6a903f(0x191))),{'ok':!![]};}let _0x448426=_0x138291['jsUrl'],_0x1a2d34=_0x138291[_0x6a903f(0x1b0)];!_0x448426&&(_0x448426=await askJsUrl());!_0x1a2d34&&(_0x1a2d34=await askCssUrl());const _0x37c720=await askConfirm(_0x6a903f(0x19e)+_0x5a69b9['length']+_0x6a903f(0x1d4)+_0x448426+_0x6a903f(0x197)+_0x1a2d34+'?');if(!_0x37c720)return writeCliSideChannelLine(a131_0x4fff0c[_0x6a903f(0x1b1)](_0x6a903f(0x191))),{'ok':!![]};const _0x31d127=[_0x448426,_0x1a2d34],_0x266141=startSpinner(_0x6a903f(0x1b5)+_0x5a69b9[_0x6a903f(0x1b2)]+_0x6a903f(0x18f));try{const _0x30cb35=await doCreateMenus(_0x5232dd[_0x6a903f(0x1cf)],_0x5232dd[_0x6a903f(0x1a0)],_0x5a69b9,_0x31d127);return stopSpinner(_0x266141,_0x6a903f(0x1d3)+_0x30cb35['created']+_0x6a903f(0x1a8),!![]),{'ok':!![],'data':_0x30cb35,'message':_0x6a903f(0x1a5)+_0x30cb35[_0x6a903f(0x1c1)]+'\x20created,\x20'+_0x30cb35['failed']+_0x6a903f(0x1c0)};}catch(_0x17d7b9){stopSpinner(_0x266141,_0x6a903f(0x1b9),![]);throw CliErrors['validation'](_0x17d7b9 instanceof Error?_0x17d7b9[_0x6a903f(0x1b8)]:_0x6a903f(0x1b9));}}};function ensureRunnableContext(_0x56e36c,_0xb1497f){const _0x104528=a131_0x2cddf5,_0x22da3e=_0x56e36c['appcode']?String(_0x56e36c[_0x104528(0x1b7)])['trim']():'';if(!isInProject()&&!_0xb1497f&&!_0x22da3e)throw CliErrors['validation'](_0x104528(0x1cc)+_0x104528(0x1a4));}function parsePaths(_0x2ab70c){const _0x17dd00=a131_0x2cddf5;return[...new Set(_0x2ab70c[_0x17dd00(0x1a2)](',')[_0x17dd00(0x1cd)](_0x3555eb=>_0x3555eb[_0x17dd00(0x1d0)]())[_0x17dd00(0x1af)](Boolean))];}
1
+ const a133_0x86be8d=a133_0x2325;function a133_0x18a6(){const _0x4c9974=['3123rXnUTl','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','message','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','2401536WUBTCY','str','Pre-fill\x20JS/CSS\x20URLs.\x20','Creating\x20','write','string','menu','appcode','/smartapi/menu/create','9550734xmvFvA','localPages','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','flag','\x20created.','\x20page(s)','Failed\x20to\x20fetch\x20online\x20menu\x20list','yellow','cssUrl','5yMraTn','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','Sync\x20local\x20pages\x20as\x20platform\x20menus','\x20local\x20microfrontend\x20menu(s).','onlinePaths','2078949AjFfub','boolean','trim','\x20failed.','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','paths','cyan','params','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','skipped','430MCNMZA','Menu\x20creation\x20failed','Would\x20create\x20','\x20created,\x20','validation','targetPages','\x20\x20Create\x20','split','21918582KXhFLY','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','onlineMenuList','5923516WOcbqm','created','sync','Fetching\x20online\x20menu\x20list...','yes','\x20\x20Cancelled.','\x20menu(s)','cookie','rawFlags','\x20and\x20CSS:\x20','9854845jFnKlq','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','appCode','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','gray','selectedAppName','\x20\x20✓\x20Selected:\x20','failed','Menu\x20sync\x20completed:\x20','Created\x20','length','Non-interactive\x20menu\x20sync\x20requires\x20--yes.'];a133_0x18a6=function(){return _0x4c9974;};return a133_0x18a6();}(function(_0x284cdf,_0x3a4aa4){const _0x265306=a133_0x2325,_0x5065f7=_0x284cdf();while(!![]){try{const _0x9be2a6=parseInt(_0x265306(0x143))/0x1*(parseInt(_0x265306(0x168))/0x2)+parseInt(_0x265306(0x15e))/0x3+parseInt(_0x265306(0x12d))/0x4+parseInt(_0x265306(0x159))/0x5*(parseInt(_0x265306(0x150))/0x6)+-parseInt(_0x265306(0x137))/0x7+parseInt(_0x265306(0x147))/0x8+-parseInt(_0x265306(0x170))/0x9;if(_0x9be2a6===_0x3a4aa4)break;else _0x5065f7['push'](_0x5065f7['shift']());}catch(_0x4b1851){_0x5065f7['push'](_0x5065f7['shift']());}}}(a133_0x18a6,0xda467));import a133_0x1eaddb 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';function a133_0x2325(_0x12fa6a,_0x4d3f7f){_0x12fa6a=_0x12fa6a-0x12d;const _0x18a687=a133_0x18a6();let _0x2325e7=_0x18a687[_0x12fa6a];return _0x2325e7;}import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a133_0x86be8d(0x14d),'command':a133_0x86be8d(0x12f),'description':a133_0x86be8d(0x15b),'risk':a133_0x86be8d(0x14b),'flags':[{'name':a133_0x86be8d(0x165),'type':a133_0x86be8d(0x14c),'description':a133_0x86be8d(0x149)+a133_0x86be8d(0x15a)},{'name':a133_0x86be8d(0x163),'type':a133_0x86be8d(0x14c),'description':a133_0x86be8d(0x138)},{'name':a133_0x86be8d(0x131),'type':a133_0x86be8d(0x15f),'description':a133_0x86be8d(0x162)}],async 'dryRun'(_0x283a00){const _0x477c46=a133_0x86be8d;ensureRunnableContext(_0x283a00[_0x477c46(0x135)],_0x283a00[_0x477c46(0x13c)]);const _0x42a0ee=await runMenuSyncCore(_0x283a00['appCode'],_0x283a00[_0x477c46(0x134)],parsePaths(_0x283a00['str'](_0x477c46(0x163))),_0x283a00[_0x477c46(0x148)](_0x477c46(0x165)),{'dryRun':!![]});return{'method':'POST','url':_0x477c46(0x14f),'body':_0x42a0ee,'description':_0x42a0ee[_0x477c46(0x167)]?_0x477c46(0x13a):_0x477c46(0x16a)+_0x42a0ee[_0x477c46(0x16d)][_0x477c46(0x141)]+_0x477c46(0x15c)};},async 'execute'(_0x4f7978){const _0x35b93b=a133_0x86be8d;ensureRunnableContext(_0x4f7978['rawFlags'],_0x4f7978['selectedAppName']);const _0x3a9764=_0x4f7978[_0x35b93b(0x153)](_0x35b93b(0x131)),_0x4007bf=_0x4f7978[_0x35b93b(0x148)](_0x35b93b(0x165)),_0x53251b=parsePaths(_0x4f7978[_0x35b93b(0x148)](_0x35b93b(0x163))),_0x509a72=parseMenuSyncParams(_0x4007bf);if(_0x3a9764){const _0x3ccb24=await runMenuSyncCore(_0x4f7978['appCode'],_0x4f7978['cookie'],_0x53251b,_0x4007bf);if(_0x3ccb24['skipped']){const _0x440244=getLocalPages();_0x440244[_0x35b93b(0x141)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x35b93b(0x171));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x3ccb24['created']+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x3ccb24,'message':_0x3ccb24[_0x35b93b(0x167)]?'Menu\x20sync\x20skipped':'Menu\x20sync\x20completed:\x20'+_0x3ccb24[_0x35b93b(0x12e)]+_0x35b93b(0x154)};}if(_0x53251b[_0x35b93b(0x141)]>0x0)throw CliErrors['validation']('menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.',_0x35b93b(0x166));if(!isInteractive()&&_0x4007bf)throw CliErrors[_0x35b93b(0x16c)](_0x35b93b(0x142),_0x35b93b(0x166));requireInteractive();const _0x536e88=startSpinner(_0x35b93b(0x130));let _0x3502c1,_0x2ac2b4,_0x39cf3b;try{const _0x3f4644=await fetchMenuData(_0x4f7978[_0x35b93b(0x139)],_0x4f7978['cookie']);_0x3502c1=_0x3f4644[_0x35b93b(0x151)],_0x2ac2b4=_0x3f4644[_0x35b93b(0x15d)],_0x39cf3b=_0x3f4644[_0x35b93b(0x172)],stopSpinner(_0x536e88,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x39a92e){stopSpinner(_0x536e88,_0x35b93b(0x156),![]);throw CliErrors[_0x35b93b(0x16c)](_0x39a92e instanceof Error?_0x39a92e[_0x35b93b(0x145)]:_0x35b93b(0x156));}if(_0x3502c1[_0x35b93b(0x141)]===0x0)return writeCliSideChannelLine(a133_0x1eaddb[_0x35b93b(0x157)](_0x35b93b(0x144))),{'ok':!![]};const _0x5d4050=buildCompareRows(_0x3502c1,_0x2ac2b4);writeCliSideChannelLine(renderCompareTable(_0x5d4050)),writeCliSideChannelLine('');const _0x2bff05=await selectPages(_0x3502c1,_0x2ac2b4);writeCliSideChannelLine(''),writeCliSideChannelLine(a133_0x1eaddb[_0x35b93b(0x164)](_0x35b93b(0x13d)+_0x2bff05[_0x35b93b(0x141)]+_0x35b93b(0x155)));const _0x1f6b0e=_0x509a72['jsUrl']&&_0x509a72['cssUrl'];if(!_0x1f6b0e){writeCliSideChannelLine(renderSyncSummary(_0x2bff05,_0x2ac2b4['size']>0x0));const _0x53539e=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x53539e)return writeCliSideChannelLine(a133_0x1eaddb[_0x35b93b(0x13b)](_0x35b93b(0x132))),{'ok':!![]};}let _0xa7c318=_0x509a72['jsUrl'],_0x2952a2=_0x509a72[_0x35b93b(0x158)];!_0xa7c318&&(_0xa7c318=await askJsUrl());!_0x2952a2&&(_0x2952a2=await askCssUrl());const _0x23ac9e=await askConfirm(_0x35b93b(0x16e)+_0x2bff05[_0x35b93b(0x141)]+'\x20menu(s)\x20with\x20JS:\x20'+_0xa7c318+_0x35b93b(0x136)+_0x2952a2+'?');if(!_0x23ac9e)return writeCliSideChannelLine(a133_0x1eaddb[_0x35b93b(0x13b)](_0x35b93b(0x132))),{'ok':!![]};const _0x1cd606=[_0xa7c318,_0x2952a2],_0x326c2b=startSpinner(_0x35b93b(0x14a)+_0x2bff05[_0x35b93b(0x141)]+'\x20menu(s)...');try{const _0x25074d=await doCreateMenus(_0x4f7978[_0x35b93b(0x139)],_0x4f7978['cookie'],_0x2bff05,_0x1cd606);return stopSpinner(_0x326c2b,_0x35b93b(0x140)+_0x25074d['created']+_0x35b93b(0x133),!![]),{'ok':!![],'data':_0x25074d,'message':_0x35b93b(0x13f)+_0x25074d[_0x35b93b(0x12e)]+_0x35b93b(0x16b)+_0x25074d[_0x35b93b(0x13e)]+_0x35b93b(0x161)};}catch(_0x34111b){stopSpinner(_0x326c2b,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x35b93b(0x16c)](_0x34111b instanceof Error?_0x34111b['message']:_0x35b93b(0x169));}}};function ensureRunnableContext(_0x1b4550,_0x2394df){const _0x1e0342=a133_0x86be8d,_0x33739e=_0x1b4550[_0x1e0342(0x14e)]?String(_0x1b4550[_0x1e0342(0x14e)])[_0x1e0342(0x160)]():'';if(!isInProject()&&!_0x2394df&&!_0x33739e)throw CliErrors['validation'](_0x1e0342(0x152)+_0x1e0342(0x146));}function parsePaths(_0x51fe8d){const _0x3296ff=a133_0x86be8d;return[...new Set(_0x51fe8d[_0x3296ff(0x16f)](',')['map'](_0x363e2=>_0x363e2['trim']())['filter'](Boolean))];}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const notificationConfigCreate: CommandDefinition;
@@ -0,0 +1 @@
1
+ const a134_0x8b54e8=a134_0x5b5c;(function(_0x5db76e,_0x24e359){const _0x1f141a=a134_0x5b5c,_0x5d5c2e=_0x5db76e();while(!![]){try{const _0x3286d2=-parseInt(_0x1f141a(0xa5))/0x1*(-parseInt(_0x1f141a(0xaa))/0x2)+parseInt(_0x1f141a(0xa7))/0x3+parseInt(_0x1f141a(0x91))/0x4+parseInt(_0x1f141a(0xa6))/0x5+-parseInt(_0x1f141a(0xb6))/0x6+parseInt(_0x1f141a(0x9b))/0x7*(parseInt(_0x1f141a(0xb5))/0x8)+-parseInt(_0x1f141a(0xb3))/0x9*(parseInt(_0x1f141a(0xad))/0xa);if(_0x3286d2===_0x24e359)break;else _0x5d5c2e['push'](_0x5d5c2e['shift']());}catch(_0x1fc5dd){_0x5d5c2e['push'](_0x5d5c2e['shift']());}}}(a134_0x1cb5,0x5bf2d));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';function a134_0x1cb5(){const _0x2ab816=['2860102AvnpnA',';\x20do\x20not\x20resubmit.','POST','description','notification_config_create_outcome_unknown','readTimeout','notification','input','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','Created\x20notification\x20config\x20','1KIoabS','3083075rwWYzq','1058832VkRQBu','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','config-create','1450886cxMXmc',';\x20no\x20automatic\x20retry\x20was\x20attempted.','document','310RckeoE','channelType','create','verified','configCode','verification','564966qQFOXt','Inspect\x20with\x20','8iKAJZJ','2241192FvtHeP','2370236ckqcCc','planned','mutation','configName','write','isSafeInteger','channelConfig','appCode','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source',';\x20do\x20not\x20resubmit\x20automatically.'];a134_0x1cb5=function(){return _0x2ab816;};return a134_0x1cb5();}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';function a134_0x5b5c(_0x5a1528,_0x3dda3d){_0x5a1528=_0x5a1528-0x91;const _0x1cb518=a134_0x1cb5();let _0x5b5c3c=_0x1cb518[_0x5a1528];return _0x5b5c3c;}const CREATE_PATH='/notification/channel-config/create';async function prepareCreate(_0x5be972){const _0x2ef084=a134_0x5b5c,_0x407586=await readNotificationDocument(_0x5be972,_0x2ef084(0xaf)),_0xd58c53=createMutationInput(_0x5be972[_0x2ef084(0x98)],_0x407586);return{'document':_0x407586,'input':_0xd58c53,'planned':projectNotificationConfig({'appCode':_0x5be972[_0x2ef084(0x98)],'configName':_0x407586[_0x2ef084(0x94)],'channelType':_0x407586['channelType'],'endpointUrl':_0x407586['endpointUrl'],'channelConfig':_0x407586[_0x2ef084(0x97)],'description':_0x407586[_0x2ef084(0x9e)],'connectTimeout':_0x407586['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x407586[_0x2ef084(0xa0)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a134_0x8b54e8(0xa1),'command':a134_0x8b54e8(0xa9),'description':a134_0x8b54e8(0x99),'risk':a134_0x8b54e8(0x95),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x132f70){assertSingleNotificationSource(_0x132f70);},async 'dryRun'(_0x3f53f2){const _0x312150=a134_0x8b54e8,_0x441429=await prepareCreate(_0x3f53f2),_0x3f7c79=notificationLookupCommand(_0x3f53f2[_0x312150(0x98)],_0x441429[_0x312150(0xac)][_0x312150(0xae)]);return asDryRunResult({'operation':_0x312150(0xaf),'selector':{'appCode':_0x3f53f2[_0x312150(0x98)],'configName':_0x441429['document']['configName'],'channelType':_0x441429[_0x312150(0xac)][_0x312150(0xae)]},'before':null,'after':_0x441429[_0x312150(0x92)],'dryRun':!![],'backend':{'method':_0x312150(0x9d),'path':CREATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x3f7c79}},{'method':_0x312150(0x9d),'url':CREATE_PATH});},async 'execute'(_0x4e5f08){const _0x47abb9=a134_0x8b54e8,_0x3dcc9d=await prepareCreate(_0x4e5f08),_0x17fae9=notificationLookupCommand(_0x4e5f08[_0x47abb9(0x98)],_0x3dcc9d[_0x47abb9(0xac)][_0x47abb9(0xae)]);let _0x410c84;try{_0x410c84=await createNotificationChannelConfig(_0x3dcc9d[_0x47abb9(0xa2)]);}catch(_0x57f6a9){if(isPlatformTransportFailure(_0x57f6a9))throw notificationError(_0x47abb9(0x9f),_0x47abb9(0xa3),_0x47abb9(0xb4)+_0x17fae9+_0x47abb9(0x9c));throw safeApiFailure(_0x47abb9(0xaf),_0x47abb9(0x93),_0x47abb9(0xb4)+_0x17fae9+_0x47abb9(0xab));}if(!Number[_0x47abb9(0x96)](_0x410c84)||_0x410c84<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x47abb9(0xa8),_0x47abb9(0xb4)+_0x17fae9+';\x20do\x20not\x20resubmit.');let _0x163a12;try{const _0x2a2215=await getNotificationChannelConfig(_0x410c84,_0x4e5f08[_0x47abb9(0x98)]);_0x163a12=normalizeExactNotificationConfig(_0x2a2215,_0x410c84,_0x4e5f08[_0x47abb9(0x98)]);}catch{throw safeApiFailure('create',_0x47abb9(0xb2),'Inspect\x20with\x20'+_0x17fae9+_0x47abb9(0x9a));}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x163a12['appCode'],'id':_0x163a12['id'],'configCode':_0x163a12[_0x47abb9(0xb1)],'configName':_0x163a12[_0x47abb9(0x94)],'channelType':_0x163a12[_0x47abb9(0xae)]},'before':null,'after':projectNotificationConfig(_0x163a12),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x47abb9(0xb0),'lookupCommand':_0x17fae9}},'message':_0x47abb9(0xa4)+_0x163a12['id']};}};
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const notificationConfigDelete: CommandDefinition;