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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (374) 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/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/logs.d.ts +7 -0
  38. package/lib/commands/bff/logs.js +1 -0
  39. package/lib/commands/bff/pull.js +1 -1
  40. package/lib/commands/bff/push.js +1 -1
  41. package/lib/commands/bff/status.js +1 -1
  42. package/lib/commands/cli-skill/index.js +1 -1
  43. package/lib/commands/cli-update.js +1 -1
  44. package/lib/commands/codegen/index.js +1 -1
  45. package/lib/commands/codegen/sdk.js +1 -1
  46. package/lib/commands/codegen/sql.js +1 -1
  47. package/lib/commands/common/app-registry.js +1 -1
  48. package/lib/commands/common/app-selector.js +1 -1
  49. package/lib/commands/common/async-task.js +1 -1
  50. package/lib/commands/common/dry-run.js +1 -1
  51. package/lib/commands/common/flags.js +1 -1
  52. package/lib/commands/common/local-file.js +1 -1
  53. package/lib/commands/common/validate.js +1 -1
  54. package/lib/commands/config/delete.js +1 -1
  55. package/lib/commands/config/get.js +1 -1
  56. package/lib/commands/config/index.js +1 -1
  57. package/lib/commands/config/init.js +1 -1
  58. package/lib/commands/config/list.js +1 -1
  59. package/lib/commands/config/set.js +1 -1
  60. package/lib/commands/config/shared.js +1 -1
  61. package/lib/commands/dataset/batch-design.d.ts +21 -0
  62. package/lib/commands/dataset/batch-design.js +1 -0
  63. package/lib/commands/dataset/business-group-update.js +1 -1
  64. package/lib/commands/dataset/business-groups.js +1 -1
  65. package/lib/commands/dataset/capability.js +1 -1
  66. package/lib/commands/dataset/delete.js +1 -1
  67. package/lib/commands/dataset/detail.js +1 -1
  68. package/lib/commands/dataset/extend-update.js +1 -1
  69. package/lib/commands/dataset/field-restore.js +1 -1
  70. package/lib/commands/dataset/field-update.js +1 -1
  71. package/lib/commands/dataset/generate.js +1 -1
  72. package/lib/commands/dataset/index.js +1 -1
  73. package/lib/commands/dataset/list.js +1 -1
  74. package/lib/commands/dataset/operations.js +1 -1
  75. package/lib/commands/dataset/relation-audit.js +1 -1
  76. package/lib/commands/dataset/relation-create.js +1 -1
  77. package/lib/commands/dataset/relation-delete.js +1 -1
  78. package/lib/commands/dataset/relation-shared.js +1 -1
  79. package/lib/commands/dataset/relation-update.js +1 -1
  80. package/lib/commands/dataset/relations.js +1 -1
  81. package/lib/commands/dataset/rename.js +1 -1
  82. package/lib/commands/dataset/restore.js +1 -1
  83. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  84. package/lib/commands/db/analysis-batching.js +1 -1
  85. package/lib/commands/db/analyze-batch-plan.js +1 -1
  86. package/lib/commands/db/analyze-cancel.js +1 -1
  87. package/lib/commands/db/analyze-start.js +1 -1
  88. package/lib/commands/db/analyze-status.js +1 -1
  89. package/lib/commands/db/create.js +1 -1
  90. package/lib/commands/db/delete.js +1 -1
  91. package/lib/commands/db/detail.js +1 -1
  92. package/lib/commands/db/diff-refresh-start.js +1 -1
  93. package/lib/commands/db/diff-refresh-status.js +1 -1
  94. package/lib/commands/db/diff.js +1 -1
  95. package/lib/commands/db/index.js +1 -1
  96. package/lib/commands/db/list.js +1 -1
  97. package/lib/commands/db/shared.js +1 -1
  98. package/lib/commands/db/table-diff-shared.js +1 -1
  99. package/lib/commands/db/tables.js +1 -1
  100. package/lib/commands/db/test.js +1 -1
  101. package/lib/commands/db/update.js +1 -1
  102. package/lib/commands/deployment/index.js +1 -1
  103. package/lib/commands/deployment/sync-all.js +1 -1
  104. package/lib/commands/deployment/sync-jobs.js +1 -1
  105. package/lib/commands/deployment/sync-status.js +1 -1
  106. package/lib/commands/doctor.js +1 -1
  107. package/lib/commands/file/index.js +1 -1
  108. package/lib/commands/flow/create.d.ts +2 -0
  109. package/lib/commands/flow/create.js +1 -0
  110. package/lib/commands/flow/detail.d.ts +2 -0
  111. package/lib/commands/flow/detail.js +1 -0
  112. package/lib/commands/flow/index.d.ts +3 -0
  113. package/lib/commands/flow/index.js +1 -0
  114. package/lib/commands/flow/list.d.ts +2 -0
  115. package/lib/commands/flow/list.js +1 -0
  116. package/lib/commands/flow/publish.d.ts +2 -0
  117. package/lib/commands/flow/publish.js +1 -0
  118. package/lib/commands/flow/runtime-resources-shared.d.ts +40 -0
  119. package/lib/commands/flow/runtime-resources-shared.js +1 -0
  120. package/lib/commands/flow/runtime-role-list.d.ts +2 -0
  121. package/lib/commands/flow/runtime-role-list.js +1 -0
  122. package/lib/commands/flow/runtime-role-user-list.d.ts +2 -0
  123. package/lib/commands/flow/runtime-role-user-list.js +1 -0
  124. package/lib/commands/flow/runtime-user-search.d.ts +2 -0
  125. package/lib/commands/flow/runtime-user-search.js +1 -0
  126. package/lib/commands/flow/shared.d.ts +41 -0
  127. package/lib/commands/flow/shared.js +1 -0
  128. package/lib/commands/flow/update.d.ts +2 -0
  129. package/lib/commands/flow/update.js +1 -0
  130. package/lib/commands/flow/validate.d.ts +3 -0
  131. package/lib/commands/flow/validate.js +1 -0
  132. package/lib/commands/instant-api-policy/current.js +1 -1
  133. package/lib/commands/instant-api-policy/index.js +1 -1
  134. package/lib/commands/instant-api-policy/init.js +1 -1
  135. package/lib/commands/instant-api-policy/publish.js +1 -1
  136. package/lib/commands/instant-api-policy/pull.js +1 -1
  137. package/lib/commands/instant-api-policy/revision.js +1 -1
  138. package/lib/commands/instant-api-policy/revisions.js +1 -1
  139. package/lib/commands/instant-api-policy/rollback.js +1 -1
  140. package/lib/commands/instant-api-policy/shared.js +1 -1
  141. package/lib/commands/instant-api-policy/validate.js +1 -1
  142. package/lib/commands/issue/index.js +1 -1
  143. package/lib/commands/issue/nudge.js +1 -1
  144. package/lib/commands/issue/report.js +1 -1
  145. package/lib/commands/issue/shared.js +1 -1
  146. package/lib/commands/kb/create.js +1 -1
  147. package/lib/commands/kb/delete.js +1 -1
  148. package/lib/commands/kb/detail.js +1 -1
  149. package/lib/commands/kb/index.js +1 -1
  150. package/lib/commands/kb/list.js +1 -1
  151. package/lib/commands/kb/search.js +1 -1
  152. package/lib/commands/kb/shared.js +1 -1
  153. package/lib/commands/kb/update.js +1 -1
  154. package/lib/commands/logs/index.js +1 -1
  155. package/lib/commands/menu/asset-update.js +1 -1
  156. package/lib/commands/menu/delete.js +1 -1
  157. package/lib/commands/menu/external-link-create.js +1 -1
  158. package/lib/commands/menu/external-link-update.js +1 -1
  159. package/lib/commands/menu/group-create.js +1 -1
  160. package/lib/commands/menu/group-update.js +1 -1
  161. package/lib/commands/menu/index.js +1 -1
  162. package/lib/commands/menu/list.js +1 -1
  163. package/lib/commands/menu/move.js +1 -1
  164. package/lib/commands/menu/regroup-start.js +1 -1
  165. package/lib/commands/menu/rename.js +1 -1
  166. package/lib/commands/menu/shared/compare-table.js +1 -1
  167. package/lib/commands/menu/shared/delete-plan.js +1 -1
  168. package/lib/commands/menu/shared/facts.js +1 -1
  169. package/lib/commands/menu/shared/index.js +1 -1
  170. package/lib/commands/menu/shared/inquirer.js +1 -1
  171. package/lib/commands/menu/shared/local-pages.js +1 -1
  172. package/lib/commands/menu/shared/logic.js +1 -1
  173. package/lib/commands/menu/shared/mutations.js +1 -1
  174. package/lib/commands/menu/shared/service.js +1 -1
  175. package/lib/commands/menu/shared/sync-core.js +1 -1
  176. package/lib/commands/menu/shared/update-core.js +1 -1
  177. package/lib/commands/menu/shared/valid-url.js +1 -1
  178. package/lib/commands/menu/sync.js +1 -1
  179. package/lib/commands/menu/visibility-update.js +1 -1
  180. package/lib/commands/notification/config-create.js +1 -1
  181. package/lib/commands/notification/config-delete.js +1 -1
  182. package/lib/commands/notification/config-list.js +1 -1
  183. package/lib/commands/notification/config-update.js +1 -1
  184. package/lib/commands/notification/index.js +1 -1
  185. package/lib/commands/notification/shared.js +1 -1
  186. package/lib/commands/ocr/index.js +1 -1
  187. package/lib/commands/page/create.js +1 -1
  188. package/lib/commands/page/custom/detail.js +1 -1
  189. package/lib/commands/page/custom/list.js +1 -1
  190. package/lib/commands/page/custom/publish.js +1 -1
  191. package/lib/commands/page/custom/shared.js +1 -1
  192. package/lib/commands/page/custom/syntax.js +1 -1
  193. package/lib/commands/page/custom/update.js +1 -1
  194. package/lib/commands/page/data-list-status.js +1 -1
  195. package/lib/commands/page/generate-start.js +1 -1
  196. package/lib/commands/page/generate-status.js +1 -1
  197. package/lib/commands/page/index.js +1 -1
  198. package/lib/commands/page/pull.js +1 -1
  199. package/lib/commands/page/push.js +1 -1
  200. package/lib/commands/page/relation-audit.js +1 -1
  201. package/lib/commands/page/restore.js +1 -1
  202. package/lib/commands/page/shared.js +1 -1
  203. package/lib/commands/page/sync.js +1 -1
  204. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  205. package/lib/commands/project/create/format-elapsed.js +1 -1
  206. package/lib/commands/project/create/main.js +1 -1
  207. package/lib/commands/project/create/materialize-project-template.js +1 -1
  208. package/lib/commands/project/create/project-name.js +1 -1
  209. package/lib/commands/project/create/project-template-archive.js +1 -1
  210. package/lib/commands/project/create/project-template-path.js +1 -1
  211. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  212. package/lib/commands/project/create/use-format-code.js +1 -1
  213. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  214. package/lib/commands/project/domain-routing-sync.js +1 -1
  215. package/lib/commands/project/index.js +1 -1
  216. package/lib/commands/project/upgrade.js +1 -1
  217. package/lib/commands/registry.js +1 -1
  218. package/lib/commands/role/delete.js +1 -1
  219. package/lib/commands/role/detail.js +1 -1
  220. package/lib/commands/role/index.js +1 -1
  221. package/lib/commands/role/list.js +1 -1
  222. package/lib/commands/role/shared.js +1 -1
  223. package/lib/commands/role/update.js +1 -1
  224. package/lib/commands/role/user-add.js +1 -1
  225. package/lib/commands/role/user-remove.js +1 -1
  226. package/lib/commands/role/user-resolve.js +1 -1
  227. package/lib/commands/rule/get.js +1 -1
  228. package/lib/commands/rule/index.js +1 -1
  229. package/lib/commands/rule/list.js +1 -1
  230. package/lib/commands/rule/set.js +1 -1
  231. package/lib/commands/rule/shared.js +1 -1
  232. package/lib/commands/run/index.js +1 -1
  233. package/lib/commands/schema.js +1 -1
  234. package/lib/commands/sql/create.js +1 -1
  235. package/lib/commands/sql/delete.js +1 -1
  236. package/lib/commands/sql/detail.js +1 -1
  237. package/lib/commands/sql/exec.js +1 -1
  238. package/lib/commands/sql/index.js +1 -1
  239. package/lib/commands/sql/list.js +1 -1
  240. package/lib/commands/sql/pull.js +1 -1
  241. package/lib/commands/sql/push.js +1 -1
  242. package/lib/commands/sql/shared.js +1 -1
  243. package/lib/commands/sql/status.js +1 -1
  244. package/lib/commands/sql/validate.js +1 -1
  245. package/lib/commands/task/index.js +1 -1
  246. package/lib/commands/task/status.js +1 -1
  247. package/lib/commands/tenant/index.js +1 -1
  248. package/lib/commands/tenant/members-list.js +1 -1
  249. package/lib/commands/tenant/shared.js +1 -1
  250. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  251. package/lib/commands/user-account/index.js +1 -1
  252. package/lib/commands/workspace/add.js +1 -1
  253. package/lib/commands/workspace/index.js +1 -1
  254. package/lib/commands/workspace/remove.js +1 -1
  255. package/lib/config/domain-config.js +1 -1
  256. package/lib/config/project-domain-routing.js +1 -1
  257. package/lib/config/region-config.js +1 -1
  258. package/lib/config/schema.js +1 -1
  259. package/lib/constant/cdn.js +1 -1
  260. package/lib/constant/cli.js +1 -1
  261. package/lib/constant/defaults.js +1 -1
  262. package/lib/constant/domain.js +1 -1
  263. package/lib/constant/env.js +1 -1
  264. package/lib/constant/output.js +1 -1
  265. package/lib/constant/paths.js +1 -1
  266. package/lib/constant/region.js +1 -1
  267. package/lib/constant/risk.js +1 -1
  268. package/lib/constant/routing-profile.js +1 -1
  269. package/lib/context/app-resolver.js +1 -1
  270. package/lib/context/auth-resolver.js +1 -1
  271. package/lib/context/config-loader.js +1 -1
  272. package/lib/context.js +1 -1
  273. package/lib/core/alias-resolver.js +1 -1
  274. package/lib/core/api-client.d.ts +170 -1
  275. package/lib/core/api-client.js +1 -1
  276. package/lib/core/bff/config.js +1 -1
  277. package/lib/core/bff/file-system.js +1 -1
  278. package/lib/core/bff/hash.js +1 -1
  279. package/lib/core/bff/hook-directory.d.ts +55 -0
  280. package/lib/core/bff/hook-directory.js +1 -0
  281. package/lib/core/bff/lock.js +1 -1
  282. package/lib/core/bff/types.d.ts +15 -0
  283. package/lib/core/bff/utils.js +1 -1
  284. package/lib/core/db-resolver.js +1 -1
  285. package/lib/core/flow-config.d.ts +628 -0
  286. package/lib/core/flow-config.js +1 -0
  287. package/lib/core/instant-api-policy/config.js +1 -1
  288. package/lib/core/kb-search-client.js +1 -1
  289. package/lib/core/page/file-system.js +1 -1
  290. package/lib/core/page/hash.js +1 -1
  291. package/lib/core/page/lock.js +1 -1
  292. package/lib/core/page/lr-smart-jsx.js +1 -1
  293. package/lib/core/sql-index-auditor.js +1 -1
  294. package/lib/core/sql-sync/config.js +1 -1
  295. package/lib/core/sql-sync/file-system.js +1 -1
  296. package/lib/core/sql-sync/hash.js +1 -1
  297. package/lib/core/sql-sync/lock.js +1 -1
  298. package/lib/core/sql-sync/utils.js +1 -1
  299. package/lib/core/sql-validator.js +1 -1
  300. package/lib/errors.js +1 -1
  301. package/lib/framework/build-all-flags.js +1 -1
  302. package/lib/framework/error-output.js +1 -1
  303. package/lib/framework/explicit-yes.js +1 -1
  304. package/lib/framework/flags.js +1 -1
  305. package/lib/framework/help.js +1 -1
  306. package/lib/framework/index.js +1 -1
  307. package/lib/framework/output.js +1 -1
  308. package/lib/framework/response.js +1 -1
  309. package/lib/framework/runner-alias.js +1 -1
  310. package/lib/framework/runner.js +1 -1
  311. package/lib/framework/schema-export.js +1 -1
  312. package/lib/framework/supported-flags.js +1 -1
  313. package/lib/framework/types.js +1 -1
  314. package/lib/generated/build-info.d.ts +4 -4
  315. package/lib/generated/build-info.js +1 -1
  316. package/lib/generated/official-routing.js +1 -1
  317. package/lib/generated/routing-contract.js +1 -1
  318. package/lib/help.js +1 -1
  319. package/lib/postinstall.js +1 -1
  320. package/lib/runtime/confirmation.js +1 -1
  321. package/lib/runtime/event.js +1 -1
  322. package/lib/runtime/index.js +1 -1
  323. package/lib/runtime/queue.js +1 -1
  324. package/lib/runtime/resolve.js +1 -1
  325. package/lib/skills/builtin-skill.js +1 -1
  326. package/lib/skills/main.js +1 -1
  327. package/lib/skills/npx-skills-add.js +1 -1
  328. package/lib/skills/skill-presence.js +1 -1
  329. package/lib/telemetry/cli-command-trace.js +1 -1
  330. package/lib/telemetry/cli-help-trace.js +1 -1
  331. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  332. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  333. package/lib/telemetry/send-cli-trace-log.js +1 -1
  334. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  335. package/lib/utils/ai_config.js +1 -1
  336. package/lib/utils/apply-jq-filter.js +1 -1
  337. package/lib/utils/cdn-config.js +1 -1
  338. package/lib/utils/check-sdk-version.js +1 -1
  339. package/lib/utils/cli-version-check.js +1 -1
  340. package/lib/utils/cli-version-policy.js +1 -1
  341. package/lib/utils/config.js +1 -1
  342. package/lib/utils/entity-with-id.js +1 -1
  343. package/lib/utils/file-utils.js +1 -1
  344. package/lib/utils/guides-cdn.js +1 -1
  345. package/lib/utils/http-client.js +1 -1
  346. package/lib/utils/is-non-interactive.js +1 -1
  347. package/lib/utils/logger.js +1 -1
  348. package/lib/utils/params.js +1 -1
  349. package/lib/utils/platform.js +1 -1
  350. package/lib/utils/sleep.js +1 -1
  351. package/lib/utils/template-replacer.js +1 -1
  352. package/lib/utils/update-notice.js +1 -1
  353. package/lib/utils/version.js +1 -1
  354. package/lib/utils/with-active-cookie.js +1 -1
  355. package/lib/utils/write-cli-side-channel.js +1 -1
  356. package/package.json +1 -1
  357. package/skills/rabetbase/SKILL.md +22 -4
  358. package/skills/rabetbase/guides/approval-flow-development-workflow.md +137 -0
  359. package/skills/rabetbase/guides/backend-function.md +19 -9
  360. package/skills/rabetbase/guides/bff-creation-workflow.md +10 -1
  361. package/skills/rabetbase/guides/conflict-detection.md +2 -0
  362. package/skills/rabetbase/guides/sdk-client-generation.md +1 -0
  363. package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +290 -0
  364. package/skills/rabetbase/references/rabetbase-bff-create.md +1 -1
  365. package/skills/rabetbase/references/rabetbase-bff-logs.md +47 -0
  366. package/skills/rabetbase/references/rabetbase-bff-pull.md +7 -3
  367. package/skills/rabetbase/references/rabetbase-bff-push.md +10 -2
  368. package/skills/rabetbase/references/rabetbase-dataset-generate.md +52 -2
  369. package/skills/rabetbase/references/rabetbase-flow-commands.md +86 -0
  370. package/skills/rabetbase/references/rabetbase-flow-resources.md +83 -0
  371. package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +25 -0
  372. package/skills/rabetbase/references/rabetbase-instant-api-policy.md +103 -11
  373. package/skills/rabetbase/references/rabetbase-notification-config-list.md +17 -0
  374. package/skills/rabetbase.manifest.json +9 -3
@@ -1 +1 @@
1
- const a150_0x1810e1=a150_0x4036;(function(_0x271224,_0x110b7d){const _0xd3d01b=a150_0x4036,_0x361414=_0x271224();while(!![]){try{const _0x197391=-parseInt(_0xd3d01b(0x1a8))/0x1*(-parseInt(_0xd3d01b(0x1be))/0x2)+-parseInt(_0xd3d01b(0x193))/0x3*(parseInt(_0xd3d01b(0x183))/0x4)+parseInt(_0xd3d01b(0x181))/0x5+-parseInt(_0xd3d01b(0x195))/0x6+-parseInt(_0xd3d01b(0x19e))/0x7+-parseInt(_0xd3d01b(0x18f))/0x8*(parseInt(_0xd3d01b(0x194))/0x9)+parseInt(_0xd3d01b(0x1b3))/0xa;if(_0x197391===_0x110b7d)break;else _0x361414['push'](_0x361414['shift']());}catch(_0x5837d6){_0x361414['push'](_0x361414['shift']());}}}(a150_0x35f9,0x93219));function a150_0x4036(_0x187f1c,_0x2b82ae){_0x187f1c=_0x187f1c-0x17b;const _0x35f94f=a150_0x35f9();let _0x40364b=_0x35f94f[_0x187f1c];return _0x40364b;}import a150_0x156b10 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a150_0x35f9(){const _0x546bb5=['params','flag','771177TYjHqE','4421286pBgMSL','991956gAEPfm','appCode','Fetching\x20online\x20menu\x20list...','✓\x20Menu\x20sync\x20completed:\x20','\x20\x20✓\x20Selected:\x20','cyan','Would\x20create\x20','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','\x20\x20Create\x20','1101660MKmwRU','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','created','appcode','Menu\x20creation\x20failed','Menu\x20sync\x20completed:\x20','Created\x20','\x20created.','Creating\x20','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','3123XSgbkN','localPages','\x20menu(s)...','skipped','POST','length','Failed\x20to\x20fetch\x20online\x20menu\x20list','sync','\x20\x20Cancelled.','\x20failed.','\x20and\x20CSS:\x20','16245000DzMUag','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','message','\x20local\x20microfrontend\x20menu(s).','jsUrl','string','menu','rawFlags','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','\x20menu(s)\x20created','onlineMenuList','268YWxYlI','gray','write','paths','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','size','\x20menu(s)','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','cookie','map','3180290lWcVPo','targetPages','12gBJuZU','yes','/smartapi/menu/create','onlinePaths','filter','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','cssUrl','Menu\x20sync\x20skipped','\x20page(s)','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','trim','validation','16zuYwgW','selectedAppName'];a150_0x35f9=function(){return _0x546bb5;};return a150_0x35f9();}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';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a150_0x1810e1(0x1b9),'command':a150_0x1810e1(0x1af),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':a150_0x1810e1(0x1c0),'flags':[{'name':a150_0x1810e1(0x191),'type':a150_0x1810e1(0x1b8),'description':'Pre-fill\x20JS/CSS\x20URLs.\x20'+a150_0x1810e1(0x18c)},{'name':a150_0x1810e1(0x1c1),'type':'string','description':a150_0x1810e1(0x1bb)},{'name':a150_0x1810e1(0x184),'type':'boolean','description':a150_0x1810e1(0x188)}],async 'dryRun'(_0x5126bb){const _0x5485c4=a150_0x1810e1;ensureRunnableContext(_0x5126bb[_0x5485c4(0x1ba)],_0x5126bb[_0x5485c4(0x190)]);const _0x5efbbe=await runMenuSyncCore(_0x5126bb[_0x5485c4(0x196)],_0x5126bb['cookie'],parsePaths(_0x5126bb['str']('paths')),_0x5126bb['str']('params'),{'dryRun':!![]});return{'method':_0x5485c4(0x1ac),'url':_0x5485c4(0x185),'body':_0x5efbbe,'description':_0x5efbbe[_0x5485c4(0x1ab)]?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':_0x5485c4(0x19b)+_0x5efbbe[_0x5485c4(0x182)][_0x5485c4(0x1ad)]+_0x5485c4(0x1b6)};},async 'execute'(_0xc58c0d){const _0x2bad8a=a150_0x1810e1;ensureRunnableContext(_0xc58c0d[_0x2bad8a(0x1ba)],_0xc58c0d[_0x2bad8a(0x190)]);const _0x305e4e=_0xc58c0d[_0x2bad8a(0x192)](_0x2bad8a(0x184)),_0x2914f9=_0xc58c0d['str'](_0x2bad8a(0x191)),_0x3a8243=parsePaths(_0xc58c0d['str'](_0x2bad8a(0x1c1))),_0x38cbca=parseMenuSyncParams(_0x2914f9);if(_0x305e4e){const _0x4727bf=await runMenuSyncCore(_0xc58c0d['appCode'],_0xc58c0d[_0x2bad8a(0x17f)],_0x3a8243,_0x2914f9);if(_0x4727bf[_0x2bad8a(0x1ab)]){const _0x1da0e3=getLocalPages();_0x1da0e3[_0x2bad8a(0x1ad)]===0x0?writeCliSideChannelLine(_0x2bad8a(0x19c)):writeCliSideChannelLine(_0x2bad8a(0x17e));}else writeCliSideChannelLine(_0x2bad8a(0x198)+_0x4727bf['created']+_0x2bad8a(0x1bc));return{'ok':!![],'data':_0x4727bf,'message':_0x4727bf[_0x2bad8a(0x1ab)]?_0x2bad8a(0x18a):_0x2bad8a(0x1a3)+_0x4727bf[_0x2bad8a(0x1a0)]+_0x2bad8a(0x1a5)};}if(_0x3a8243[_0x2bad8a(0x1ad)]>0x0)throw CliErrors[_0x2bad8a(0x18e)]('menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.',_0x2bad8a(0x1b4));if(!isInteractive()&&_0x2914f9)throw CliErrors[_0x2bad8a(0x18e)](_0x2bad8a(0x1a7),_0x2bad8a(0x1b4));requireInteractive();const _0x53b3de=startSpinner(_0x2bad8a(0x197));let _0x3f20a0,_0x1b4b54,_0x2819f0;try{const _0x9a4654=await fetchMenuData(_0xc58c0d[_0x2bad8a(0x196)],_0xc58c0d[_0x2bad8a(0x17f)]);_0x3f20a0=_0x9a4654[_0x2bad8a(0x1a9)],_0x1b4b54=_0x9a4654[_0x2bad8a(0x186)],_0x2819f0=_0x9a4654[_0x2bad8a(0x1bd)],stopSpinner(_0x53b3de,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x85f045){stopSpinner(_0x53b3de,_0x2bad8a(0x1ae),![]);throw CliErrors[_0x2bad8a(0x18e)](_0x85f045 instanceof Error?_0x85f045[_0x2bad8a(0x1b5)]:_0x2bad8a(0x1ae));}if(_0x3f20a0[_0x2bad8a(0x1ad)]===0x0)return writeCliSideChannelLine(a150_0x156b10['yellow'](_0x2bad8a(0x17b))),{'ok':!![]};const _0x56e435=buildCompareRows(_0x3f20a0,_0x1b4b54);writeCliSideChannelLine(renderCompareTable(_0x56e435)),writeCliSideChannelLine('');const _0x3d40f5=await selectPages(_0x3f20a0,_0x1b4b54);writeCliSideChannelLine(''),writeCliSideChannelLine(a150_0x156b10[_0x2bad8a(0x19a)](_0x2bad8a(0x199)+_0x3d40f5['length']+_0x2bad8a(0x18b)));const _0x4904f9=_0x38cbca[_0x2bad8a(0x1b7)]&&_0x38cbca['cssUrl'];if(!_0x4904f9){writeCliSideChannelLine(renderSyncSummary(_0x3d40f5,_0x1b4b54[_0x2bad8a(0x17c)]>0x0));const _0x34ae7f=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x34ae7f)return writeCliSideChannelLine(a150_0x156b10[_0x2bad8a(0x1bf)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0xbfcfdd=_0x38cbca[_0x2bad8a(0x1b7)],_0x26d1b4=_0x38cbca[_0x2bad8a(0x189)];!_0xbfcfdd&&(_0xbfcfdd=await askJsUrl());!_0x26d1b4&&(_0x26d1b4=await askCssUrl());const _0x3d994c=await askConfirm(_0x2bad8a(0x19d)+_0x3d40f5[_0x2bad8a(0x1ad)]+'\x20menu(s)\x20with\x20JS:\x20'+_0xbfcfdd+_0x2bad8a(0x1b2)+_0x26d1b4+'?');if(!_0x3d994c)return writeCliSideChannelLine(a150_0x156b10['gray'](_0x2bad8a(0x1b0))),{'ok':!![]};const _0x126729=[_0xbfcfdd,_0x26d1b4],_0x45b573=startSpinner(_0x2bad8a(0x1a6)+_0x3d40f5[_0x2bad8a(0x1ad)]+_0x2bad8a(0x1aa));try{const _0x2aa464=await doCreateMenus(_0xc58c0d[_0x2bad8a(0x196)],_0xc58c0d[_0x2bad8a(0x17f)],_0x3d40f5,_0x126729);return stopSpinner(_0x45b573,_0x2bad8a(0x1a4)+_0x2aa464['created']+_0x2bad8a(0x17d),!![]),{'ok':!![],'data':_0x2aa464,'message':_0x2bad8a(0x1a3)+_0x2aa464['created']+'\x20created,\x20'+_0x2aa464['failed']+_0x2bad8a(0x1b1)};}catch(_0x29f4e6){stopSpinner(_0x45b573,_0x2bad8a(0x1a2),![]);throw CliErrors[_0x2bad8a(0x18e)](_0x29f4e6 instanceof Error?_0x29f4e6[_0x2bad8a(0x1b5)]:_0x2bad8a(0x1a2));}}};function ensureRunnableContext(_0x3d50a7,_0x41c69e){const _0x205a5c=a150_0x1810e1,_0x1de975=_0x3d50a7[_0x205a5c(0x1a1)]?String(_0x3d50a7[_0x205a5c(0x1a1)])['trim']():'';if(!isInProject()&&!_0x41c69e&&!_0x1de975)throw CliErrors['validation']('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x205a5c(0x19f));}function parsePaths(_0x450f6c){const _0x871525=a150_0x1810e1;return[...new Set(_0x450f6c['split'](',')[_0x871525(0x180)](_0x4b3fcf=>_0x4b3fcf[_0x871525(0x18d)]())[_0x871525(0x187)](Boolean))];}
1
+ const a164_0x14fbdf=a164_0x4b50;(function(_0x35727d,_0x4cc0a0){const _0x5c3449=a164_0x4b50,_0x5f0078=_0x35727d();while(!![]){try{const _0x3806aa=-parseInt(_0x5c3449(0x138))/0x1+parseInt(_0x5c3449(0x12a))/0x2*(parseInt(_0x5c3449(0x13c))/0x3)+-parseInt(_0x5c3449(0x119))/0x4+-parseInt(_0x5c3449(0x132))/0x5*(-parseInt(_0x5c3449(0xff))/0x6)+parseInt(_0x5c3449(0x131))/0x7*(parseInt(_0x5c3449(0x113))/0x8)+-parseInt(_0x5c3449(0xf6))/0x9+parseInt(_0x5c3449(0xf8))/0xa*(parseInt(_0x5c3449(0x109))/0xb);if(_0x3806aa===_0x4cc0a0)break;else _0x5f0078['push'](_0x5f0078['shift']());}catch(_0x20cc0f){_0x5f0078['push'](_0x5f0078['shift']());}}}(a164_0x582a,0x65271));import a164_0x3e731a 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';function a164_0x582a(){const _0x2532d2=['Creating\x20','1420209mHRfxR','appCode','11630FPyJth','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','Online\x20menu\x20list\x20fetched','\x20created,\x20','created','gray','40368AIzEDn','Sync\x20local\x20pages\x20as\x20platform\x20menus','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','jsUrl','length','\x20page(s)','\x20created.','message','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','cssUrl','1837lesxCb','size','skipped','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','validation','Created\x20','/smartapi/menu/create','cyan','failed','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','80CYKElB','Pre-fill\x20JS/CSS\x20URLs.\x20','trim','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','Menu\x20sync\x20completed:\x20','Menu\x20creation\x20failed','797508claQvd','map','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','\x20local\x20microfrontend\x20menu(s).','\x20menu(s)...','✓\x20Menu\x20sync\x20completed:\x20','\x20failed.','Would\x20create\x20','\x20\x20✓\x20Selected:\x20','\x20menu(s)','\x20\x20Create\x20','filter','write','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','cookie','rawFlags','paths','922cPBlRd','localPages','Menu\x20sync\x20skipped','appcode','\x20\x20Cancelled.','yes','onlinePaths','325997HlgtLl','265zjojaK','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','yellow','Fetching\x20online\x20menu\x20list...','params','320159dbOPZP','split','str','onlineMenuList','489BMMKjw','\x20and\x20CSS:\x20'];a164_0x582a=function(){return _0x2532d2;};return a164_0x582a();}import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';function a164_0x4b50(_0x404ab6,_0x3467c2){_0x404ab6=_0x404ab6-0xf5;const _0x582a4b=a164_0x582a();let _0x4b50f0=_0x582a4b[_0x404ab6];return _0x4b50f0;}import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':'sync','description':a164_0x14fbdf(0x100),'risk':a164_0x14fbdf(0x125),'flags':[{'name':a164_0x14fbdf(0x137),'type':'string','description':a164_0x14fbdf(0x114)+a164_0x14fbdf(0x126)},{'name':'paths','type':'string','description':a164_0x14fbdf(0x116)},{'name':a164_0x14fbdf(0x12f),'type':'boolean','description':a164_0x14fbdf(0x107)}],async 'dryRun'(_0x3373ce){const _0x258453=a164_0x14fbdf;ensureRunnableContext(_0x3373ce['rawFlags'],_0x3373ce['selectedAppName']);const _0x36be30=await runMenuSyncCore(_0x3373ce[_0x258453(0xf7)],_0x3373ce[_0x258453(0x127)],parsePaths(_0x3373ce['str'](_0x258453(0x129))),_0x3373ce[_0x258453(0x13a)]('params'),{'dryRun':!![]});return{'method':'POST','url':_0x258453(0x10f),'body':_0x36be30,'description':_0x36be30[_0x258453(0x10b)]?_0x258453(0x101):_0x258453(0x120)+_0x36be30['targetPages']['length']+_0x258453(0x11c)};},async 'execute'(_0x244957){const _0x1a6247=a164_0x14fbdf;ensureRunnableContext(_0x244957[_0x1a6247(0x128)],_0x244957['selectedAppName']);const _0x4f736b=_0x244957['flag'](_0x1a6247(0x12f)),_0x18252a=_0x244957[_0x1a6247(0x13a)]('params'),_0x5624d5=parsePaths(_0x244957[_0x1a6247(0x13a)](_0x1a6247(0x129))),_0x9128a2=parseMenuSyncParams(_0x18252a);if(_0x4f736b){const _0x32be7a=await runMenuSyncCore(_0x244957['appCode'],_0x244957['cookie'],_0x5624d5,_0x18252a);if(_0x32be7a[_0x1a6247(0x10b)]){const _0x21d0e6=getLocalPages();_0x21d0e6['length']===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x1a6247(0x10c));}else writeCliSideChannelLine(_0x1a6247(0x11e)+_0x32be7a[_0x1a6247(0xfd)]+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x32be7a,'message':_0x32be7a[_0x1a6247(0x10b)]?_0x1a6247(0x12c):_0x1a6247(0x117)+_0x32be7a[_0x1a6247(0xfd)]+_0x1a6247(0x105)};}if(_0x5624d5[_0x1a6247(0x103)]>0x0)throw CliErrors[_0x1a6247(0x10d)](_0x1a6247(0xfa),_0x1a6247(0x11b));if(!isInteractive()&&_0x18252a)throw CliErrors[_0x1a6247(0x10d)](_0x1a6247(0x112),_0x1a6247(0x11b));requireInteractive();const _0x3df11a=startSpinner(_0x1a6247(0x136));let _0x3b6db2,_0x34103d,_0x53ea89;try{const _0x20d96d=await fetchMenuData(_0x244957['appCode'],_0x244957[_0x1a6247(0x127)]);_0x3b6db2=_0x20d96d[_0x1a6247(0x12b)],_0x34103d=_0x20d96d[_0x1a6247(0x130)],_0x53ea89=_0x20d96d[_0x1a6247(0x13b)],stopSpinner(_0x3df11a,_0x1a6247(0xfb),!![]);}catch(_0x374047){stopSpinner(_0x3df11a,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x1a6247(0x10d)](_0x374047 instanceof Error?_0x374047[_0x1a6247(0x106)]:_0x1a6247(0x134));}if(_0x3b6db2[_0x1a6247(0x103)]===0x0)return writeCliSideChannelLine(a164_0x3e731a[_0x1a6247(0x135)](_0x1a6247(0xf9))),{'ok':!![]};const _0x14ddc2=buildCompareRows(_0x3b6db2,_0x34103d);writeCliSideChannelLine(renderCompareTable(_0x14ddc2)),writeCliSideChannelLine('');const _0x3f02a5=await selectPages(_0x3b6db2,_0x34103d);writeCliSideChannelLine(''),writeCliSideChannelLine(a164_0x3e731a[_0x1a6247(0x110)](_0x1a6247(0x121)+_0x3f02a5[_0x1a6247(0x103)]+_0x1a6247(0x104)));const _0x447b23=_0x9128a2[_0x1a6247(0x102)]&&_0x9128a2[_0x1a6247(0x108)];if(!_0x447b23){writeCliSideChannelLine(renderSyncSummary(_0x3f02a5,_0x34103d[_0x1a6247(0x10a)]>0x0));const _0x4ec8b0=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x4ec8b0)return writeCliSideChannelLine(a164_0x3e731a['gray'](_0x1a6247(0x12e))),{'ok':!![]};}let _0x50f4d1=_0x9128a2[_0x1a6247(0x102)],_0x30f4f5=_0x9128a2[_0x1a6247(0x108)];!_0x50f4d1&&(_0x50f4d1=await askJsUrl());!_0x30f4f5&&(_0x30f4f5=await askCssUrl());const _0x235d82=await askConfirm(_0x1a6247(0x123)+_0x3f02a5[_0x1a6247(0x103)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x50f4d1+_0x1a6247(0x13d)+_0x30f4f5+'?');if(!_0x235d82)return writeCliSideChannelLine(a164_0x3e731a[_0x1a6247(0xfe)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x28be26=[_0x50f4d1,_0x30f4f5],_0x309c1a=startSpinner(_0x1a6247(0xf5)+_0x3f02a5[_0x1a6247(0x103)]+_0x1a6247(0x11d));try{const _0x8d5295=await doCreateMenus(_0x244957[_0x1a6247(0xf7)],_0x244957['cookie'],_0x3f02a5,_0x28be26);return stopSpinner(_0x309c1a,_0x1a6247(0x10e)+_0x8d5295['created']+_0x1a6247(0x122),!![]),{'ok':!![],'data':_0x8d5295,'message':_0x1a6247(0x117)+_0x8d5295['created']+_0x1a6247(0xfc)+_0x8d5295[_0x1a6247(0x111)]+_0x1a6247(0x11f)};}catch(_0x30afad){stopSpinner(_0x309c1a,_0x1a6247(0x118),![]);throw CliErrors[_0x1a6247(0x10d)](_0x30afad instanceof Error?_0x30afad[_0x1a6247(0x106)]:_0x1a6247(0x118));}}};function ensureRunnableContext(_0x48a358,_0x46a58e){const _0x4b4deb=a164_0x14fbdf,_0x3a6b92=_0x48a358['appcode']?String(_0x48a358[_0x4b4deb(0x12d)])['trim']():'';if(!isInProject()&&!_0x46a58e&&!_0x3a6b92)throw CliErrors['validation'](_0x4b4deb(0x133)+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parsePaths(_0x187691){const _0x75ac48=a164_0x14fbdf;return[...new Set(_0x187691[_0x75ac48(0x139)](',')[_0x75ac48(0x11a)](_0x1fb4e5=>_0x1fb4e5[_0x75ac48(0x115)]())[_0x75ac48(0x124)](Boolean))];}
@@ -1 +1 @@
1
- const a151_0x2c6522=a151_0x2465;function a151_0x2465(_0x422b47,_0x3ddec8){_0x422b47=_0x422b47-0x1d9;const _0x25ab1f=a151_0x25ab();let _0x24651d=_0x25ab1f[_0x422b47];return _0x24651d;}(function(_0x282213,_0x47b120){const _0x4309e=a151_0x2465,_0x5a1092=_0x282213();while(!![]){try{const _0x2088cd=-parseInt(_0x4309e(0x22b))/0x1+parseInt(_0x4309e(0x21f))/0x2*(-parseInt(_0x4309e(0x208))/0x3)+parseInt(_0x4309e(0x230))/0x4*(parseInt(_0x4309e(0x214))/0x5)+-parseInt(_0x4309e(0x250))/0x6*(-parseInt(_0x4309e(0x24b))/0x7)+-parseInt(_0x4309e(0x23b))/0x8+-parseInt(_0x4309e(0x238))/0x9+parseInt(_0x4309e(0x203))/0xa*(parseInt(_0x4309e(0x228))/0xb);if(_0x2088cd===_0x47b120)break;else _0x5a1092['push'](_0x5a1092['shift']());}catch(_0x1f7b08){_0x5a1092['push'](_0x5a1092['shift']());}}}(a151_0x25ab,0x57b41));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a151_0x25ab(){const _0x4d4aa7=['rabetbase\x20menu\x20list\x20--format\x20compress','expected-count','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','pageType','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','141197CsTHrT','childrenCount','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','menu-ids','datasetCode','144xSRhph','values','stringify','url','expect-visible','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','menu_permission_denied','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','updated','expectVisible','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','\x20visibility\x20update\x20could\x20not\x20be\x20verified','menu_expected_count_mismatch','depth','Menu\x20id\x20selector(s)\x20not\x20found:\x20','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','\x20failed.','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','menu','verification','paths','split','str','visible','\x20unchanged\x20menu(s).','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','path','visibility-update','update-recovery','map','Menu\x20path\x20selector\x20not\x20found:\x20','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','flagMissing','warnings','failed','cookie','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','length','high-risk-write','\x20updated,\x20','false','byId','filter','menuIds','boolean','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','80jMCbhY','appCode','POST','menu_verification_failed','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','307947DmZIfS','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','\x20menu(s),\x20expected\x20','childrenIds','/smartapi/menu/update','\x20must\x20be\x20true\x20or\x20false.','Response\x20was\x20lost\x20for\x20menu\x20','before','parentId','Selected\x20','plan','type','635AQzYIV','\x20menu(s);\x20skipped\x20','resourcesValid','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','isSafeInteger','sort','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','push','menus','menu_selector_ambiguous','num','6Ptbxag','\x20changed\x20unexpectedly.','pageId','plannedActions','menu_selector_not_found','resources','set','code','get','1564585FJkrPb','message','join','301522UZeelR','isArray','\x20skipped,\x20','beforeById','Updated\x20visibility\x20for\x20','2728pkXRpu','Would\x20update\x20visibility\x20for\x20','label','datasetId','number','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','update\x20menu\x20visibility','requestedVisible','3597669zKZUPU','recovered','validation','2721240NEWPOr','update','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','targets','update-menu-visibility','expectedCount','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','modelType','Menu\x20','has','string'];a151_0x25ab=function(){return _0x4d4aa7;};return a151_0x25ab();}import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a151_0x2c6522(0x205),'path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a151_0x2c6522(0x1e6),'command':'visibility-update','description':a151_0x2c6522(0x1f3),'risk':a151_0x2c6522(0x1fb),'structuredErrors':!![],'flags':[{'name':a151_0x2c6522(0x24e),'type':'string','description':a151_0x2c6522(0x24a)},{'name':a151_0x2c6522(0x1e8),'type':a151_0x2c6522(0x245),'description':a151_0x2c6522(0x1f4)},{'name':a151_0x2c6522(0x1eb),'type':'boolean','required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a151_0x2c6522(0x254),'type':a151_0x2c6522(0x201),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a151_0x2c6522(0x247),'type':a151_0x2c6522(0x234),'description':a151_0x2c6522(0x23d)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3ddda8){parseInput(_0x3ddda8),requireExplicitYes(_0x3ddda8);},async 'dryRun'(_0x2ae315){const _0x1c8ec2=a151_0x2c6522,_0x38f408=await buildPlan(_0x2ae315,!![]),_0x1b5fcc=_0x38f408['plan'][_0x1c8ec2(0x222)]?.[_0x1c8ec2(0x1fa)]??0x0,_0x3fb311=_0x38f408['plan'][_0x1c8ec2(0x23e)][_0x1c8ec2(0x1fa)]-_0x1b5fcc;return menuDryRunResult(_0x38f408[_0x1c8ec2(0x212)],{'method':_0x1c8ec2(0x205),'url':_0x1c8ec2(0x20c),'body':{'updates':_0x38f408[_0x1c8ec2(0x212)][_0x1c8ec2(0x222)]?.[_0x1c8ec2(0x1f1)](_0x315490=>_0x315490['body'])??[]},'description':_0x1c8ec2(0x231)+_0x1b5fcc+'\x20menu(s);\x20skip\x20'+_0x3fb311+_0x1c8ec2(0x1ec)});},async 'execute'(_0x5e759b){const _0x10a077=a151_0x2c6522;requireExplicitYes(_0x5e759b);const _0x287d15=await buildPlan(_0x5e759b,![]);await recheckMutationSnapshot(_0x5e759b,_0x287d15['plan'],_0x10a077(0x236));const _0x2e519c=[],_0x13230d=[],_0x13a818=[];for(const _0x38893a of _0x287d15[_0x10a077(0x212)][_0x10a077(0x23e)]){if(_0x38893a[_0x10a077(0x20f)][_0x10a077(0x1eb)]===_0x287d15[_0x10a077(0x212)][_0x10a077(0x237)]){_0x2e519c[_0x10a077(0x21b)]({'id':_0x38893a['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x5e759b['appCode'],_0x5e759b[_0x10a077(0x1f8)],{'id':_0x38893a['id'],'visible':_0x287d15['plan'][_0x10a077(0x237)]}),_0x2e519c[_0x10a077(0x21b)]({'id':_0x38893a['id'],'updated':!![],'skipped':![]});}catch(_0x1ecfe5){const _0x46d529=mapMenuApiError(_0x1ecfe5,'update\x20visibility\x20for',_0x38893a['id']);if(isMenuResponseLoss(_0x1ecfe5)&&_0x46d529[_0x10a077(0x226)]!==_0x10a077(0x1d9)){_0x13a818['push'](_0x38893a['id']);continue;}_0x13230d[_0x10a077(0x21b)]({'id':_0x38893a['id'],'stage':_0x10a077(0x23c),'code':_0x46d529[_0x10a077(0x226)],'message':_0x46d529['message']});}}let _0x223952;try{_0x223952=await fetchMenuSnapshot(_0x5e759b[_0x10a077(0x204)],_0x5e759b[_0x10a077(0x1f8)]);}catch(_0xe0c97d){const _0x4c1354=describeMenuErrorCause(_0xe0c97d,'verify\x20menu\x20visibility\x20update'),_0x473565=_0x13a818[_0x10a077(0x1f1)](_0x10d03d=>({'id':_0x10d03d,'stage':_0x10a077(0x1f0),'code':_0x10a077(0x206),'message':_0x10a077(0x20e)+_0x10d03d+_0x10a077(0x1e4),'requestedStateConfirmed':![],'recovered':![]})),_0x84f14={'stage':_0x10a077(0x1e7),'code':_0x10a077(0x206),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x287d15[_0x10a077(0x212)]['targets'][_0x10a077(0x1f1)](_0x60b8f4=>_0x60b8f4['id']),'requestedStateConfirmed':![],..._0x4c1354};throw menuFailure(asVerificationError(_0xe0c97d,_0x10a077(0x207)),_0x287d15['plan'],{'stage':_0x10a077(0x1e7),'succeeded':_0x2e519c,'failedRecords':[..._0x13230d,..._0x473565,_0x84f14],'warnings':[_0x10a077(0x202)],'verification':{'status':'failed','recoveredCount':0x0,'lookupCommand':_0x10a077(0x246)}});}const _0x4a4ca7=[];for(const _0x492bac of _0x2e519c){const _0x5b7604=Number(_0x492bac['id']),_0x3f069f=_0x287d15[_0x10a077(0x22e)]['get'](_0x5b7604),_0x59f101=_0x223952[_0x10a077(0x1fe)][_0x10a077(0x227)](_0x5b7604);try{verifyVisibilityUpdate(_0x3f069f,_0x59f101,_0x287d15[_0x10a077(0x212)][_0x10a077(0x237)]);}catch(_0x3e4bf5){const _0x10c4c5=asVerificationError(_0x3e4bf5,_0x10a077(0x243)+_0x5b7604+_0x10a077(0x1de));_0x4a4ca7[_0x10a077(0x21b)]({'id':_0x5b7604,'stage':_0x10a077(0x1e7),'code':_0x10c4c5[_0x10a077(0x226)],'message':_0x10c4c5[_0x10a077(0x229)],'requestedStateConfirmed':![]});}}for(const _0x2f37f4 of _0x13a818){const _0x15c66f=_0x287d15['beforeById'][_0x10a077(0x227)](_0x2f37f4),_0x4a726b=_0x223952[_0x10a077(0x1fe)][_0x10a077(0x227)](_0x2f37f4);try{verifyVisibilityUpdate(_0x15c66f,_0x4a726b,_0x287d15['plan'][_0x10a077(0x237)]),_0x2e519c[_0x10a077(0x21b)]({'id':_0x2f37f4,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x4f15bd){const _0x5a03ce=asVerificationError(_0x4f15bd,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x2f37f4+_0x10a077(0x24d));_0x4a4ca7[_0x10a077(0x21b)]({'id':_0x2f37f4,'stage':_0x10a077(0x1f0),'code':_0x5a03ce['code'],'message':_0x5a03ce[_0x10a077(0x229)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x4a4ca7[_0x10a077(0x1fa)]>0x0){const _0x5cd76d=_0x4a4ca7['map'](_0x4f827d=>Number(_0x4f827d['id'])),_0x4fd200=_0x2e519c['filter'](_0x2533d8=>_0x2533d8[_0x10a077(0x239)]===!![])[_0x10a077(0x1fa)],_0x56c295=menuError('menu_verification_failed',_0x10a077(0x255)+_0x5cd76d[_0x10a077(0x22a)](',\x20')+'.',_0x10a077(0x248));throw menuFailure(_0x56c295,_0x287d15[_0x10a077(0x212)],{'stage':_0x10a077(0x1e7),'succeeded':_0x2e519c,'failedRecords':[..._0x13230d,..._0x4a4ca7],'warnings':[_0x10a077(0x209)],'verification':{'status':_0x10a077(0x1f7),..._0x5cd76d[_0x10a077(0x1fa)]===0x1?{'targetId':_0x5cd76d[0x0]}:{'targetIds':_0x5cd76d},'recoveredCount':_0x4fd200,'lookupCommand':_0x10a077(0x246)}});}const _0x31c125=_0x2e519c['filter'](_0x2b2043=>_0x2b2043[_0x10a077(0x1db)]===!![])[_0x10a077(0x1fa)],_0x32b0c4=_0x2e519c[_0x10a077(0x1fa)]-_0x31c125,_0x566329={..._0x287d15['plan'],'succeeded':_0x2e519c,'failed':_0x13230d,'warnings':_0x13230d[_0x10a077(0x1fa)]>0x0?[..._0x287d15[_0x10a077(0x212)][_0x10a077(0x1f6)],_0x10a077(0x217)]:_0x287d15[_0x10a077(0x212)][_0x10a077(0x1f6)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x223952['hash'],'matchesRequestedState':_0x13230d[_0x10a077(0x1fa)]===0x0,'recoveredCount':_0x13a818['length']}};return{'ok':_0x13230d[_0x10a077(0x1fa)]===0x0,'data':_0x566329,'message':_0x13230d[_0x10a077(0x1fa)]===0x0?_0x10a077(0x22f)+_0x31c125+_0x10a077(0x215)+_0x32b0c4+_0x10a077(0x1ec):'Menu\x20visibility\x20update\x20completed:\x20'+_0x31c125+_0x10a077(0x1fc)+_0x32b0c4+_0x10a077(0x22d)+_0x13230d[_0x10a077(0x1fa)]+_0x10a077(0x1e3)};}};function parseInput(_0x2d944f){const _0x15bbc8=a151_0x2c6522,_0x50676b=parseMenuIds(_0x2d944f[_0x15bbc8(0x1ea)](_0x15bbc8(0x24e))),_0x3d9b34=parseCsv(_0x2d944f[_0x15bbc8(0x1ea)](_0x15bbc8(0x1e8)));if(_0x50676b[_0x15bbc8(0x1fa)]===0x0&&_0x3d9b34[_0x15bbc8(0x1fa)]===0x0)throw CliErrors[_0x15bbc8(0x23a)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x4e7150=parseBooleanFlag(_0x2d944f,_0x15bbc8(0x1eb),!![]),_0xa8881e=parseBooleanFlag(_0x2d944f,'expect-visible',![]);let _0xec3f11;if(hasFlag(_0x2d944f,_0x15bbc8(0x247))){_0xec3f11=_0x2d944f[_0x15bbc8(0x21e)](_0x15bbc8(0x247));if(!Number[_0x15bbc8(0x218)](_0xec3f11)||_0xec3f11<0x0)throw CliErrors[_0x15bbc8(0x23a)](_0x15bbc8(0x235));}return{'menuIds':_0x50676b,'paths':_0x3d9b34,'visible':_0x4e7150,'expectVisible':_0xa8881e,'expectedCount':_0xec3f11};}async function buildPlan(_0x3f4267,_0x1cd4d7){const _0x4dc8ca=a151_0x2c6522,_0x4817d9=parseInput(_0x3f4267),_0x2ec0ae=await fetchMutationSnapshot(_0x3f4267,_0x4dc8ca(0x236)),_0x3e263e=selectTargets(_0x2ec0ae[_0x4dc8ca(0x21c)],_0x4817d9[_0x4dc8ca(0x200)],_0x4817d9[_0x4dc8ca(0x1e8)]);if(_0x4817d9['expectedCount']!==undefined&&_0x3e263e[_0x4dc8ca(0x1fa)]!==_0x4817d9[_0x4dc8ca(0x240)])throw menuError(_0x4dc8ca(0x1df),_0x4dc8ca(0x211)+_0x3e263e[_0x4dc8ca(0x1fa)]+_0x4dc8ca(0x20a)+_0x4817d9[_0x4dc8ca(0x240)]+'.',_0x4dc8ca(0x1da));if(_0x4817d9[_0x4dc8ca(0x1dc)]!==undefined){const _0x28fd95=_0x3e263e[_0x4dc8ca(0x1ff)](_0x529453=>_0x529453['visible']!==_0x4817d9[_0x4dc8ca(0x1dc)]);if(_0x28fd95[_0x4dc8ca(0x1fa)]>0x0)throw menuError('menu_state_drift',_0x4dc8ca(0x1e2)+_0x28fd95['map'](_0x52314b=>_0x52314b['id'])[_0x4dc8ca(0x22a)](',\x20')+'.',_0x4dc8ca(0x1f9));}const _0x823447=_0x3e263e[_0x4dc8ca(0x1f1)](_0x12b6ad=>({'id':_0x12b6ad['id'],'label':_0x12b6ad[_0x4dc8ca(0x232)],'path':_0x12b6ad['path'],'before':{'visible':_0x12b6ad[_0x4dc8ca(0x1eb)]},'after':{'visible':_0x4817d9[_0x4dc8ca(0x1eb)]}})),_0x4eb27a=_0x823447[_0x4dc8ca(0x1ff)](_0x58d73f=>_0x58d73f[_0x4dc8ca(0x20f)][_0x4dc8ca(0x1eb)]!==_0x4817d9[_0x4dc8ca(0x1eb)])['map'](_0x37a78f=>({'stage':_0x4dc8ca(0x23f),'method':_0x4dc8ca(0x205),'path':'/smartapi/menu/update','body':{'appCode':_0x3f4267[_0x4dc8ca(0x204)],'id':_0x37a78f['id'],'visible':_0x4817d9[_0x4dc8ca(0x1eb)]}})),_0x5279a8=mutationResult({'operation':_0x4dc8ca(0x1ef),'selector':{'menuIds':_0x4817d9['menuIds'],'paths':_0x4817d9['paths']},'before':{'menus':_0x3e263e[_0x4dc8ca(0x1f1)](_0x25477d=>({'id':_0x25477d['id'],'path':_0x25477d[_0x4dc8ca(0x1ee)],'visible':_0x25477d['visible']}))},'after':{'menus':_0x3e263e[_0x4dc8ca(0x1f1)](_0x37443e=>({'id':_0x37443e['id'],'path':_0x37443e[_0x4dc8ca(0x1ee)],'visible':_0x4817d9['visible']}))},'dryRun':_0x1cd4d7,'backend':[...BACKEND],'plannedActions':_0x4eb27a,'snapshotHash':_0x2ec0ae['hash'],'warnings':_0x4eb27a['length']===0x0?[_0x4dc8ca(0x1dd)]:[]});return{'plan':{..._0x5279a8,'requestedVisible':_0x4817d9[_0x4dc8ca(0x1eb)],'targets':_0x823447},'beforeById':new Map(_0x3e263e[_0x4dc8ca(0x1f1)](_0x1c0f08=>[_0x1c0f08['id'],_0x1c0f08]))};}function selectTargets(_0x130f36,_0x55d3f3,_0x3359d3){const _0x5e5b25=a151_0x2c6522,_0x29baf9=new Map(_0x130f36[_0x5e5b25(0x1f1)](_0x2cbc66=>[_0x2cbc66['id'],_0x2cbc66])),_0x3148c5=new Map(),_0x342a43=_0x55d3f3[_0x5e5b25(0x1ff)](_0x368c33=>!_0x29baf9[_0x5e5b25(0x244)](_0x368c33));if(_0x342a43[_0x5e5b25(0x1fa)]>0x0)throw menuError(_0x5e5b25(0x223),_0x5e5b25(0x1e1)+_0x342a43[_0x5e5b25(0x22a)](',\x20')+'.',_0x5e5b25(0x21a));for(const _0x3ff442 of _0x55d3f3){_0x3148c5['set'](_0x3ff442,_0x29baf9['get'](_0x3ff442));}for(const _0x572306 of _0x3359d3){const _0x475b30=_0x130f36[_0x5e5b25(0x1ff)](_0x34d681=>_0x34d681['path']===_0x572306);if(_0x475b30['length']===0x0)throw menuError(_0x5e5b25(0x223),_0x5e5b25(0x1f2)+JSON['stringify'](_0x572306)+'.',_0x5e5b25(0x1ed));if(_0x475b30[_0x5e5b25(0x1fa)]>0x1)throw menuError(_0x5e5b25(0x21d),_0x5e5b25(0x241)+JSON[_0x5e5b25(0x252)](_0x572306)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x475b30[_0x5e5b25(0x1f1)](_0x2ab42a=>_0x2ab42a['id'])[_0x5e5b25(0x22a)](',\x20')+'.');const _0x2fe32e=_0x475b30[0x0];_0x3148c5[_0x5e5b25(0x225)](_0x2fe32e['id'],_0x2fe32e);}return[..._0x3148c5[_0x5e5b25(0x251)]()];}function parseMenuIds(_0x492da8){const _0x3c580d=a151_0x2c6522,_0x343c66=parseCsv(_0x492da8),_0x536145=_0x343c66[_0x3c580d(0x1f1)](Number);if(_0x536145['some'](_0x590f5b=>!Number[_0x3c580d(0x218)](_0x590f5b)||_0x590f5b<=0x0))throw CliErrors[_0x3c580d(0x23a)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x536145)];}function parseCsv(_0x36817d){const _0x171900=a151_0x2c6522;return[...new Set(_0x36817d[_0x171900(0x1e9)](',')[_0x171900(0x1f1)](_0x45422c=>_0x45422c['trim']())[_0x171900(0x1ff)](Boolean))];}function parseBooleanFlag(_0x185301,_0x26b517,_0x50e992){const _0x38ce60=a151_0x2c6522;if(!hasFlag(_0x185301,_0x26b517)){if(_0x50e992)throw CliErrors[_0x38ce60(0x1f5)](_0x26b517);return undefined;}const _0x598476=_0x185301['rawFlags'][_0x26b517];if(_0x598476===!![]||_0x598476===![])return _0x598476;if(_0x598476==='true')return!![];if(_0x598476===_0x38ce60(0x1fd))return![];throw CliErrors['validation']('--'+_0x26b517+_0x38ce60(0x20d));}function verifyVisibilityUpdate(_0x5ac038,_0x268908,_0x488acb){const _0x28d42a=a151_0x2c6522;assertVerified(!!_0x268908,_0x28d42a(0x243)+_0x5ac038['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x268908[_0x28d42a(0x1eb)]===_0x488acb,_0x28d42a(0x243)+_0x5ac038['id']+_0x28d42a(0x1e5));const _0x172d7e=[['id',_0x268908['id'],_0x5ac038['id']],[_0x28d42a(0x210),_0x268908[_0x28d42a(0x210)],_0x5ac038[_0x28d42a(0x210)]],['depth',_0x268908['depth'],_0x5ac038[_0x28d42a(0x1e0)]],[_0x28d42a(0x232),_0x268908['label'],_0x5ac038['label']],[_0x28d42a(0x1ee),_0x268908['path'],_0x5ac038[_0x28d42a(0x1ee)]],[_0x28d42a(0x253),_0x268908[_0x28d42a(0x253)],_0x5ac038['url']],[_0x28d42a(0x213),_0x268908[_0x28d42a(0x213)],_0x5ac038[_0x28d42a(0x213)]],[_0x28d42a(0x219),_0x268908[_0x28d42a(0x219)],_0x5ac038[_0x28d42a(0x219)]],[_0x28d42a(0x224),_0x268908[_0x28d42a(0x224)],_0x5ac038[_0x28d42a(0x224)]],[_0x28d42a(0x216),_0x268908[_0x28d42a(0x216)],_0x5ac038[_0x28d42a(0x216)]],[_0x28d42a(0x20b),_0x268908[_0x28d42a(0x20b)],_0x5ac038[_0x28d42a(0x20b)]],[_0x28d42a(0x24c),_0x268908[_0x28d42a(0x24c)],_0x5ac038[_0x28d42a(0x24c)]],['pageId',_0x268908[_0x28d42a(0x221)],_0x5ac038[_0x28d42a(0x221)]],[_0x28d42a(0x249),_0x268908[_0x28d42a(0x249)],_0x5ac038[_0x28d42a(0x249)]],[_0x28d42a(0x242),_0x268908[_0x28d42a(0x242)],_0x5ac038['modelType']],[_0x28d42a(0x233),_0x268908[_0x28d42a(0x233)],_0x5ac038['datasetId']],[_0x28d42a(0x24f),_0x268908['datasetCode'],_0x5ac038['datasetCode']]];for(const [_0x3b1f98,_0x163bd9,_0x4b7e69]of _0x172d7e){assertVerified(sameValue(_0x163bd9,_0x4b7e69),_0x28d42a(0x243)+_0x5ac038['id']+'\x20'+_0x3b1f98+_0x28d42a(0x220));}}function sameValue(_0x3f7698,_0x35e613){const _0x264e01=a151_0x2c6522;if(Array[_0x264e01(0x22c)](_0x3f7698)||Array[_0x264e01(0x22c)](_0x35e613))return JSON[_0x264e01(0x252)](_0x3f7698)===JSON['stringify'](_0x35e613);return _0x3f7698===_0x35e613;}
1
+ const a165_0x214bdc=a165_0x391d;(function(_0x5f342b,_0x391228){const _0x5d8840=a165_0x391d,_0x2e67c1=_0x5f342b();while(!![]){try{const _0x2d74d9=-parseInt(_0x5d8840(0x149))/0x1+-parseInt(_0x5d8840(0x172))/0x2+-parseInt(_0x5d8840(0x158))/0x3*(-parseInt(_0x5d8840(0x15a))/0x4)+parseInt(_0x5d8840(0x17a))/0x5+-parseInt(_0x5d8840(0x165))/0x6*(parseInt(_0x5d8840(0x140))/0x7)+parseInt(_0x5d8840(0x147))/0x8*(parseInt(_0x5d8840(0x1a2))/0x9)+parseInt(_0x5d8840(0x183))/0xa*(parseInt(_0x5d8840(0x190))/0xb);if(_0x2d74d9===_0x391228)break;else _0x2e67c1['push'](_0x2e67c1['shift']());}catch(_0xcf3c5e){_0x2e67c1['push'](_0x2e67c1['shift']());}}}(a165_0x5b50,0xa22f3));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a165_0x5b50(){const _0x160c67=['boolean','isArray','expectedCount','Response\x20was\x20lost\x20and\x20menu\x20','Requested\x20menu\x20visibility','visible','childrenCount','pageType','update-menu-visibility','7252021JqpPwk','filter','values','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x20menu(s);\x20skip\x20','map','Updated\x20visibility\x20for\x20','75176uaffEQ','type','1064067ZLbIIm','message','plannedActions','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','code','cookie','str','menu_expected_count_mismatch','menu_selector_not_found','targets','\x20must\x20be\x20true\x20or\x20false.','\x20skipped,\x20','depth','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','expectVisible','35757uuUdJj','true','412tMbJVB','string','beforeById','verification','expect-visible','pageId','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','isSafeInteger','number','6cNgqaK','url','body','set','plan','validation','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','\x20changed\x20unexpectedly.','expected-count','has','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','resourcesValid','2391798Fejeqm','menus','num','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','rabetbase\x20menu\x20list\x20--format\x20compress','before','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','visibility-update','4365010YSJZVX','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','failed','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Menu\x20','resources','Menu\x20visibility\x20update\x20completed:\x20','Menu\x20path\x20selector\x20not\x20found:\x20','Final\x20menu\x20visibility\x20readback\x20failed.','20ywjRBv','split','byId','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','Would\x20update\x20visibility\x20for\x20','menuIds','false','menu_permission_denied','stringify','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','9452641UeSouE','get','\x20failed.','updated','update\x20visibility\x20for','verify\x20menu\x20visibility\x20update','appCode','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','menu','datasetCode','rawFlags','update-recovery','\x20unchanged\x20menu(s).','datasetId','trim','requestedVisible','warnings','menu_verification_failed','135URvOds','childrenIds','menu\x20list','recovered','sort','length','update\x20menu\x20visibility','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','push','label','\x20menu(s),\x20expected\x20','paths','parentId','menu-ids','join','some','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','POST','path','/smartapi/menu/update','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.'];a165_0x5b50=function(){return _0x160c67;};return a165_0x5b50();}import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':a165_0x214bdc(0x1b6)}];export const menuVisibilityUpdate={'service':a165_0x214bdc(0x198),'command':'visibility-update','description':a165_0x214bdc(0x188),'risk':'high-risk-write','structuredErrors':!![],'flags':[{'name':a165_0x214bdc(0x1af),'type':a165_0x214bdc(0x15b),'description':a165_0x214bdc(0x17b)},{'name':a165_0x214bdc(0x1ad),'type':'string','description':a165_0x214bdc(0x161)},{'name':a165_0x214bdc(0x13c),'type':a165_0x214bdc(0x1b8),'required':!![],'description':a165_0x214bdc(0x13b)},{'name':a165_0x214bdc(0x15e),'type':a165_0x214bdc(0x1b8),'description':a165_0x214bdc(0x1b2)},{'name':a165_0x214bdc(0x16d),'type':a165_0x214bdc(0x164),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2b5cbf){parseInput(_0x2b5cbf),requireExplicitYes(_0x2b5cbf);},async 'dryRun'(_0xcb5772){const _0x370143=a165_0x214bdc,_0x24fd3b=await buildPlan(_0xcb5772,!![]),_0x2955cc=_0x24fd3b['plan'][_0x370143(0x14b)]?.['length']??0x0,_0x4979e7=_0x24fd3b[_0x370143(0x169)][_0x370143(0x152)]['length']-_0x2955cc;return menuDryRunResult(_0x24fd3b[_0x370143(0x169)],{'method':_0x370143(0x1b4),'url':'/smartapi/menu/update','body':{'updates':_0x24fd3b['plan'][_0x370143(0x14b)]?.[_0x370143(0x145)](_0x1c8a25=>_0x1c8a25[_0x370143(0x167)])??[]},'description':_0x370143(0x18a)+_0x2955cc+_0x370143(0x144)+_0x4979e7+_0x370143(0x19c)});},async 'execute'(_0x4a9f49){const _0x5e2d4c=a165_0x214bdc;requireExplicitYes(_0x4a9f49);const _0x3a60e8=await buildPlan(_0x4a9f49,![]);await recheckMutationSnapshot(_0x4a9f49,_0x3a60e8['plan'],_0x5e2d4c(0x1a8));const _0x3b3c71=[],_0x249c4f=[],_0x178945=[];for(const _0xbf38bf of _0x3a60e8[_0x5e2d4c(0x169)][_0x5e2d4c(0x152)]){if(_0xbf38bf[_0x5e2d4c(0x177)][_0x5e2d4c(0x13c)]===_0x3a60e8['plan'][_0x5e2d4c(0x19f)]){_0x3b3c71[_0x5e2d4c(0x1aa)]({'id':_0xbf38bf['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x4a9f49['appCode'],_0x4a9f49['cookie'],{'id':_0xbf38bf['id'],'visible':_0x3a60e8[_0x5e2d4c(0x169)]['requestedVisible']}),_0x3b3c71[_0x5e2d4c(0x1aa)]({'id':_0xbf38bf['id'],'updated':!![],'skipped':![]});}catch(_0x10e610){const _0x47e92f=mapMenuApiError(_0x10e610,_0x5e2d4c(0x194),_0xbf38bf['id']);if(isMenuResponseLoss(_0x10e610)&&_0x47e92f[_0x5e2d4c(0x14d)]!==_0x5e2d4c(0x18d)){_0x178945['push'](_0xbf38bf['id']);continue;}_0x249c4f['push']({'id':_0xbf38bf['id'],'stage':'update','code':_0x47e92f['code'],'message':_0x47e92f[_0x5e2d4c(0x14a)]});}}let _0x3aa3c0;try{_0x3aa3c0=await fetchMenuSnapshot(_0x4a9f49['appCode'],_0x4a9f49[_0x5e2d4c(0x14e)]);}catch(_0x2c17ad){const _0x4a2280=describeMenuErrorCause(_0x2c17ad,_0x5e2d4c(0x195)),_0x312335=_0x178945[_0x5e2d4c(0x145)](_0x2101c7=>({'id':_0x2101c7,'stage':_0x5e2d4c(0x19b),'code':_0x5e2d4c(0x1a1),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x2101c7+_0x5e2d4c(0x16f),'requestedStateConfirmed':![],'recovered':![]})),_0x44af5f={'stage':_0x5e2d4c(0x15d),'code':_0x5e2d4c(0x1a1),'message':_0x5e2d4c(0x182),'targetIds':_0x3a60e8[_0x5e2d4c(0x169)][_0x5e2d4c(0x152)][_0x5e2d4c(0x145)](_0x335170=>_0x335170['id']),'requestedStateConfirmed':![],..._0x4a2280};throw menuFailure(asVerificationError(_0x2c17ad,_0x5e2d4c(0x178)),_0x3a60e8['plan'],{'stage':_0x5e2d4c(0x15d),'succeeded':_0x3b3c71,'failedRecords':[..._0x249c4f,..._0x312335,_0x44af5f],'warnings':[_0x5e2d4c(0x17d)],'verification':{'status':_0x5e2d4c(0x17c),'recoveredCount':0x0,'lookupCommand':_0x5e2d4c(0x176)}});}const _0x2d11a4=[];for(const _0x4614cf of _0x3b3c71){const _0x224ae6=Number(_0x4614cf['id']),_0x46991e=_0x3a60e8[_0x5e2d4c(0x15c)][_0x5e2d4c(0x191)](_0x224ae6),_0x10084c=_0x3aa3c0[_0x5e2d4c(0x185)][_0x5e2d4c(0x191)](_0x224ae6);try{verifyVisibilityUpdate(_0x46991e,_0x10084c,_0x3a60e8['plan'][_0x5e2d4c(0x19f)]);}catch(_0x3d932a){const _0x1ea0a1=asVerificationError(_0x3d932a,_0x5e2d4c(0x17e)+_0x224ae6+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x2d11a4['push']({'id':_0x224ae6,'stage':_0x5e2d4c(0x15d),'code':_0x1ea0a1[_0x5e2d4c(0x14d)],'message':_0x1ea0a1[_0x5e2d4c(0x14a)],'requestedStateConfirmed':![]});}}for(const _0x43bbc2 of _0x178945){const _0x292de1=_0x3a60e8[_0x5e2d4c(0x15c)][_0x5e2d4c(0x191)](_0x43bbc2),_0x3f3612=_0x3aa3c0[_0x5e2d4c(0x185)][_0x5e2d4c(0x191)](_0x43bbc2);try{verifyVisibilityUpdate(_0x292de1,_0x3f3612,_0x3a60e8[_0x5e2d4c(0x169)][_0x5e2d4c(0x19f)]),_0x3b3c71[_0x5e2d4c(0x1aa)]({'id':_0x43bbc2,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x24ec21){const _0x560f2b=asVerificationError(_0x24ec21,_0x5e2d4c(0x13a)+_0x43bbc2+_0x5e2d4c(0x175));_0x2d11a4['push']({'id':_0x43bbc2,'stage':_0x5e2d4c(0x19b),'code':_0x560f2b['code'],'message':_0x560f2b[_0x5e2d4c(0x14a)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x2d11a4[_0x5e2d4c(0x1a7)]>0x0){const _0x941677=_0x2d11a4[_0x5e2d4c(0x145)](_0x4bd8b7=>Number(_0x4bd8b7['id'])),_0x506bf1=_0x3b3c71['filter'](_0x5d50a8=>_0x5d50a8[_0x5e2d4c(0x1a5)]===!![])['length'],_0x5a1176=menuError(_0x5e2d4c(0x1a1),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x941677[_0x5e2d4c(0x1b0)](',\x20')+'.',_0x5e2d4c(0x1a9));throw menuFailure(_0x5a1176,_0x3a60e8[_0x5e2d4c(0x169)],{'stage':_0x5e2d4c(0x15d),'succeeded':_0x3b3c71,'failedRecords':[..._0x249c4f,..._0x2d11a4],'warnings':[_0x5e2d4c(0x18f)],'verification':{'status':_0x5e2d4c(0x17c),..._0x941677[_0x5e2d4c(0x1a7)]===0x1?{'targetId':_0x941677[0x0]}:{'targetIds':_0x941677},'recoveredCount':_0x506bf1,'lookupCommand':_0x5e2d4c(0x176)}});}const _0x3e7831=_0x3b3c71['filter'](_0xbcc99b=>_0xbcc99b[_0x5e2d4c(0x193)]===!![])['length'],_0x9dc8ed=_0x3b3c71[_0x5e2d4c(0x1a7)]-_0x3e7831,_0x1a280a={..._0x3a60e8[_0x5e2d4c(0x169)],'succeeded':_0x3b3c71,'failed':_0x249c4f,'warnings':_0x249c4f[_0x5e2d4c(0x1a7)]>0x0?[..._0x3a60e8[_0x5e2d4c(0x169)][_0x5e2d4c(0x1a0)],_0x5e2d4c(0x160)]:_0x3a60e8[_0x5e2d4c(0x169)][_0x5e2d4c(0x1a0)],'verification':{'checkedBy':_0x5e2d4c(0x1a4),'snapshotHash':_0x3aa3c0['hash'],'matchesRequestedState':_0x249c4f['length']===0x0,'recoveredCount':_0x178945[_0x5e2d4c(0x1a7)]}};return{'ok':_0x249c4f[_0x5e2d4c(0x1a7)]===0x0,'data':_0x1a280a,'message':_0x249c4f['length']===0x0?_0x5e2d4c(0x146)+_0x3e7831+'\x20menu(s);\x20skipped\x20'+_0x9dc8ed+_0x5e2d4c(0x19c):_0x5e2d4c(0x180)+_0x3e7831+'\x20updated,\x20'+_0x9dc8ed+_0x5e2d4c(0x154)+_0x249c4f[_0x5e2d4c(0x1a7)]+_0x5e2d4c(0x192)};}};function a165_0x391d(_0x1a72b7,_0x51e621){_0x1a72b7=_0x1a72b7-0x13a;const _0x5b507d=a165_0x5b50();let _0x391d0a=_0x5b507d[_0x1a72b7];return _0x391d0a;}function parseInput(_0x287d36){const _0x3b2173=a165_0x214bdc,_0x112566=parseMenuIds(_0x287d36['str'](_0x3b2173(0x1af))),_0x1f6c99=parseCsv(_0x287d36[_0x3b2173(0x14f)](_0x3b2173(0x1ad)));if(_0x112566[_0x3b2173(0x1a7)]===0x0&&_0x1f6c99[_0x3b2173(0x1a7)]===0x0)throw CliErrors[_0x3b2173(0x16a)](_0x3b2173(0x14c));const _0x1ea64b=parseBooleanFlag(_0x287d36,_0x3b2173(0x13c),!![]),_0x17d1cf=parseBooleanFlag(_0x287d36,_0x3b2173(0x15e),![]);let _0x2da380;if(hasFlag(_0x287d36,_0x3b2173(0x16d))){_0x2da380=_0x287d36[_0x3b2173(0x174)](_0x3b2173(0x16d));if(!Number[_0x3b2173(0x163)](_0x2da380)||_0x2da380<0x0)throw CliErrors[_0x3b2173(0x16a)](_0x3b2173(0x143));}return{'menuIds':_0x112566,'paths':_0x1f6c99,'visible':_0x1ea64b,'expectVisible':_0x17d1cf,'expectedCount':_0x2da380};}async function buildPlan(_0x3ff92d,_0x4c39a6){const _0x10dfc5=a165_0x214bdc,_0x4682dd=parseInput(_0x3ff92d),_0x178f03=await fetchMutationSnapshot(_0x3ff92d,_0x10dfc5(0x1a8)),_0x271d20=selectTargets(_0x178f03[_0x10dfc5(0x173)],_0x4682dd[_0x10dfc5(0x18b)],_0x4682dd[_0x10dfc5(0x1ad)]);if(_0x4682dd[_0x10dfc5(0x1ba)]!==undefined&&_0x271d20[_0x10dfc5(0x1a7)]!==_0x4682dd[_0x10dfc5(0x1ba)])throw menuError(_0x10dfc5(0x150),'Selected\x20'+_0x271d20['length']+_0x10dfc5(0x1ac)+_0x4682dd[_0x10dfc5(0x1ba)]+'.',_0x10dfc5(0x1b7));if(_0x4682dd['expectVisible']!==undefined){const _0x10e693=_0x271d20[_0x10dfc5(0x141)](_0xe5e6cd=>_0xe5e6cd[_0x10dfc5(0x13c)]!==_0x4682dd[_0x10dfc5(0x157)]);if(_0x10e693[_0x10dfc5(0x1a7)]>0x0)throw menuError('menu_state_drift',_0x10dfc5(0x187)+_0x10e693['map'](_0x22d266=>_0x22d266['id'])[_0x10dfc5(0x1b0)](',\x20')+'.',_0x10dfc5(0x197));}const _0x2f0fcd=_0x271d20[_0x10dfc5(0x145)](_0x29346c=>({'id':_0x29346c['id'],'label':_0x29346c['label'],'path':_0x29346c[_0x10dfc5(0x1b5)],'before':{'visible':_0x29346c[_0x10dfc5(0x13c)]},'after':{'visible':_0x4682dd[_0x10dfc5(0x13c)]}})),_0x311cf1=_0x2f0fcd[_0x10dfc5(0x141)](_0x2cbcf5=>_0x2cbcf5['before'][_0x10dfc5(0x13c)]!==_0x4682dd[_0x10dfc5(0x13c)])[_0x10dfc5(0x145)](_0x449ae9=>({'stage':_0x10dfc5(0x13f),'method':_0x10dfc5(0x1b4),'path':_0x10dfc5(0x1b6),'body':{'appCode':_0x3ff92d[_0x10dfc5(0x196)],'id':_0x449ae9['id'],'visible':_0x4682dd[_0x10dfc5(0x13c)]}})),_0x49ccc6=mutationResult({'operation':_0x10dfc5(0x179),'selector':{'menuIds':_0x4682dd[_0x10dfc5(0x18b)],'paths':_0x4682dd[_0x10dfc5(0x1ad)]},'before':{'menus':_0x271d20['map'](_0x28228e=>({'id':_0x28228e['id'],'path':_0x28228e[_0x10dfc5(0x1b5)],'visible':_0x28228e['visible']}))},'after':{'menus':_0x271d20[_0x10dfc5(0x145)](_0x2bbec6=>({'id':_0x2bbec6['id'],'path':_0x2bbec6[_0x10dfc5(0x1b5)],'visible':_0x4682dd[_0x10dfc5(0x13c)]}))},'dryRun':_0x4c39a6,'backend':[...BACKEND],'plannedActions':_0x311cf1,'snapshotHash':_0x178f03['hash'],'warnings':_0x311cf1['length']===0x0?[_0x10dfc5(0x189)]:[]});return{'plan':{..._0x49ccc6,'requestedVisible':_0x4682dd[_0x10dfc5(0x13c)],'targets':_0x2f0fcd},'beforeById':new Map(_0x271d20[_0x10dfc5(0x145)](_0x2c2dd9=>[_0x2c2dd9['id'],_0x2c2dd9]))};}function selectTargets(_0x4772a0,_0xfee997,_0x2ea841){const _0x2761dc=a165_0x214bdc,_0x1a8c9a=new Map(_0x4772a0[_0x2761dc(0x145)](_0x3e2820=>[_0x3e2820['id'],_0x3e2820])),_0x1ac121=new Map(),_0xf14c21=_0xfee997[_0x2761dc(0x141)](_0x6e5e4c=>!_0x1a8c9a[_0x2761dc(0x16e)](_0x6e5e4c));if(_0xf14c21[_0x2761dc(0x1a7)]>0x0)throw menuError(_0x2761dc(0x151),'Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0xf14c21[_0x2761dc(0x1b0)](',\x20')+'.',_0x2761dc(0x16b));for(const _0x9bb53e of _0xfee997){_0x1ac121['set'](_0x9bb53e,_0x1a8c9a['get'](_0x9bb53e));}for(const _0x4799bf of _0x2ea841){const _0x410ba5=_0x4772a0[_0x2761dc(0x141)](_0x5ca35a=>_0x5ca35a[_0x2761dc(0x1b5)]===_0x4799bf);if(_0x410ba5[_0x2761dc(0x1a7)]===0x0)throw menuError(_0x2761dc(0x151),_0x2761dc(0x181)+JSON[_0x2761dc(0x18e)](_0x4799bf)+'.',_0x2761dc(0x162));if(_0x410ba5['length']>0x1)throw menuError('menu_selector_ambiguous',_0x2761dc(0x156)+JSON['stringify'](_0x4799bf)+'.',_0x2761dc(0x1b3)+_0x410ba5[_0x2761dc(0x145)](_0xec8661=>_0xec8661['id'])[_0x2761dc(0x1b0)](',\x20')+'.');const _0x43a2aa=_0x410ba5[0x0];_0x1ac121[_0x2761dc(0x168)](_0x43a2aa['id'],_0x43a2aa);}return[..._0x1ac121[_0x2761dc(0x142)]()];}function parseMenuIds(_0x78b1fa){const _0x367d50=a165_0x214bdc,_0x45d717=parseCsv(_0x78b1fa),_0x502084=_0x45d717[_0x367d50(0x145)](Number);if(_0x502084[_0x367d50(0x1b1)](_0x22a5c4=>!Number[_0x367d50(0x163)](_0x22a5c4)||_0x22a5c4<=0x0))throw CliErrors[_0x367d50(0x16a)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x502084)];}function parseCsv(_0x2a7ba2){const _0x4ab817=a165_0x214bdc;return[...new Set(_0x2a7ba2[_0x4ab817(0x184)](',')['map'](_0x4d8325=>_0x4d8325[_0x4ab817(0x19e)]())[_0x4ab817(0x141)](Boolean))];}function parseBooleanFlag(_0x260d58,_0x32ec14,_0x310dbc){const _0x2714c2=a165_0x214bdc;if(!hasFlag(_0x260d58,_0x32ec14)){if(_0x310dbc)throw CliErrors['flagMissing'](_0x32ec14);return undefined;}const _0x27b135=_0x260d58[_0x2714c2(0x19a)][_0x32ec14];if(_0x27b135===!![]||_0x27b135===![])return _0x27b135;if(_0x27b135===_0x2714c2(0x159))return!![];if(_0x27b135===_0x2714c2(0x18c))return![];throw CliErrors[_0x2714c2(0x16a)]('--'+_0x32ec14+_0x2714c2(0x153));}function verifyVisibilityUpdate(_0x53297f,_0x3b7924,_0x1aa950){const _0x48ac54=a165_0x214bdc;assertVerified(!!_0x3b7924,'Menu\x20'+_0x53297f['id']+_0x48ac54(0x170)),assertVerified(_0x3b7924[_0x48ac54(0x13c)]===_0x1aa950,_0x48ac54(0x17e)+_0x53297f['id']+_0x48ac54(0x186));const _0x5575df=[['id',_0x3b7924['id'],_0x53297f['id']],[_0x48ac54(0x1ae),_0x3b7924[_0x48ac54(0x1ae)],_0x53297f[_0x48ac54(0x1ae)]],[_0x48ac54(0x155),_0x3b7924[_0x48ac54(0x155)],_0x53297f[_0x48ac54(0x155)]],[_0x48ac54(0x1ab),_0x3b7924[_0x48ac54(0x1ab)],_0x53297f[_0x48ac54(0x1ab)]],[_0x48ac54(0x1b5),_0x3b7924[_0x48ac54(0x1b5)],_0x53297f[_0x48ac54(0x1b5)]],[_0x48ac54(0x166),_0x3b7924['url'],_0x53297f[_0x48ac54(0x166)]],[_0x48ac54(0x148),_0x3b7924[_0x48ac54(0x148)],_0x53297f[_0x48ac54(0x148)]],[_0x48ac54(0x1a6),_0x3b7924[_0x48ac54(0x1a6)],_0x53297f[_0x48ac54(0x1a6)]],[_0x48ac54(0x17f),_0x3b7924[_0x48ac54(0x17f)],_0x53297f['resources']],[_0x48ac54(0x171),_0x3b7924[_0x48ac54(0x171)],_0x53297f['resourcesValid']],[_0x48ac54(0x1a3),_0x3b7924[_0x48ac54(0x1a3)],_0x53297f[_0x48ac54(0x1a3)]],[_0x48ac54(0x13d),_0x3b7924[_0x48ac54(0x13d)],_0x53297f['childrenCount']],['pageId',_0x3b7924[_0x48ac54(0x15f)],_0x53297f['pageId']],['pageType',_0x3b7924['pageType'],_0x53297f[_0x48ac54(0x13e)]],['modelType',_0x3b7924['modelType'],_0x53297f['modelType']],[_0x48ac54(0x19d),_0x3b7924[_0x48ac54(0x19d)],_0x53297f[_0x48ac54(0x19d)]],[_0x48ac54(0x199),_0x3b7924[_0x48ac54(0x199)],_0x53297f[_0x48ac54(0x199)]]];for(const [_0x10b6bc,_0x4a1802,_0x58b3a4]of _0x5575df){assertVerified(sameValue(_0x4a1802,_0x58b3a4),_0x48ac54(0x17e)+_0x53297f['id']+'\x20'+_0x10b6bc+_0x48ac54(0x16c));}}function sameValue(_0x4f5b9b,_0x2aae98){const _0x167017=a165_0x214bdc;if(Array[_0x167017(0x1b9)](_0x4f5b9b)||Array[_0x167017(0x1b9)](_0x2aae98))return JSON['stringify'](_0x4f5b9b)===JSON[_0x167017(0x18e)](_0x2aae98);return _0x4f5b9b===_0x2aae98;}
@@ -1 +1 @@
1
- function a152_0x2360(_0x1cbcc0,_0x1e1a8c){_0x1cbcc0=_0x1cbcc0-0x157;const _0x26aa6d=a152_0x26aa();let _0x236068=_0x26aa6d[_0x1cbcc0];return _0x236068;}const a152_0x31dda0=a152_0x2360;(function(_0x593ff8,_0x511443){const _0x129013=a152_0x2360,_0x12cf3e=_0x593ff8();while(!![]){try{const _0x5a71fe=parseInt(_0x129013(0x173))/0x1*(parseInt(_0x129013(0x15b))/0x2)+parseInt(_0x129013(0x15e))/0x3+-parseInt(_0x129013(0x161))/0x4+-parseInt(_0x129013(0x164))/0x5+parseInt(_0x129013(0x175))/0x6*(-parseInt(_0x129013(0x159))/0x7)+-parseInt(_0x129013(0x157))/0x8+parseInt(_0x129013(0x158))/0x9;if(_0x5a71fe===_0x511443)break;else _0x12cf3e['push'](_0x12cf3e['shift']());}catch(_0x4c2887){_0x12cf3e['push'](_0x12cf3e['shift']());}}}(a152_0x26aa,0xe2127));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a152_0x31dda0(0x15c);async function prepareCreate(_0x57cca9){const _0x1b7949=a152_0x31dda0,_0x212f56=await readNotificationDocument(_0x57cca9,'create'),_0x5b6a31=createMutationInput(_0x57cca9[_0x1b7949(0x168)],_0x212f56);return{'document':_0x212f56,'input':_0x5b6a31,'planned':projectNotificationConfig({'appCode':_0x57cca9['appCode'],'configName':_0x212f56['configName'],'channelType':_0x212f56['channelType'],'endpointUrl':_0x212f56[_0x1b7949(0x179)],'channelConfig':_0x212f56[_0x1b7949(0x169)],'description':_0x212f56[_0x1b7949(0x15f)],'connectTimeout':_0x212f56['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x212f56['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a152_0x26aa(){const _0x3f72d6=['isSafeInteger',';\x20do\x20not\x20resubmit.','appCode','channelConfig','configName','channelType','Inspect\x20with\x20','configCode','verification','notification',';\x20no\x20automatic\x20retry\x20was\x20attempted.','write','planned','7THnFjY',';\x20do\x20not\x20resubmit\x20automatically.','5514TOWRVK','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','config-create','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','endpointUrl','10672232ELeOXn','49424706OqRRVG','11767zjHcoM','POST','62926aVyjAs','/notification/channel-config/create','document','1819212fevtdp','description','create','5927116NajITR','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','notification_config_create_outcome_unknown','5158205qMBneU','mutation'];a152_0x26aa=function(){return _0x3f72d6;};return a152_0x26aa();}export const notificationConfigCreate={'service':a152_0x31dda0(0x16f),'command':a152_0x31dda0(0x177),'description':a152_0x31dda0(0x162),'risk':a152_0x31dda0(0x171),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x615730){assertSingleNotificationSource(_0x615730);},async 'dryRun'(_0x3667e9){const _0x563dfa=a152_0x31dda0,_0x274676=await prepareCreate(_0x3667e9),_0x523053=notificationLookupCommand(_0x3667e9[_0x563dfa(0x168)],_0x274676['document']['channelType']);return asDryRunResult({'operation':_0x563dfa(0x160),'selector':{'appCode':_0x3667e9['appCode'],'configName':_0x274676['document']['configName'],'channelType':_0x274676[_0x563dfa(0x15d)]['channelType']},'before':null,'after':_0x274676[_0x563dfa(0x172)],'dryRun':!![],'backend':{'method':_0x563dfa(0x15a),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x563dfa(0x172),'lookupCommand':_0x523053}},{'method':_0x563dfa(0x15a),'url':CREATE_PATH});},async 'execute'(_0x15fe7d){const _0x2aa801=a152_0x31dda0,_0x4cd41e=await prepareCreate(_0x15fe7d),_0x11f192=notificationLookupCommand(_0x15fe7d[_0x2aa801(0x168)],_0x4cd41e[_0x2aa801(0x15d)][_0x2aa801(0x16b)]);let _0x2de3d5;try{_0x2de3d5=await createNotificationChannelConfig(_0x4cd41e['input']);}catch(_0x5e4454){if(isPlatformTransportFailure(_0x5e4454))throw notificationError(_0x2aa801(0x163),_0x2aa801(0x176),_0x2aa801(0x16c)+_0x11f192+_0x2aa801(0x167));throw safeApiFailure(_0x2aa801(0x160),_0x2aa801(0x165),'Inspect\x20with\x20'+_0x11f192+_0x2aa801(0x170));}if(!Number[_0x2aa801(0x166)](_0x2de3d5)||_0x2de3d5<=0x0)throw notificationError(_0x2aa801(0x163),_0x2aa801(0x178),'Inspect\x20with\x20'+_0x11f192+';\x20do\x20not\x20resubmit.');let _0x34c728;try{const _0x399949=await getNotificationChannelConfig(_0x2de3d5,_0x15fe7d[_0x2aa801(0x168)]);_0x34c728=normalizeExactNotificationConfig(_0x399949,_0x2de3d5,_0x15fe7d[_0x2aa801(0x168)]);}catch{throw safeApiFailure(_0x2aa801(0x160),_0x2aa801(0x16e),_0x2aa801(0x16c)+_0x11f192+_0x2aa801(0x174));}return{'ok':!![],'data':{'operation':_0x2aa801(0x160),'selector':{'appCode':_0x34c728[_0x2aa801(0x168)],'id':_0x34c728['id'],'configCode':_0x34c728[_0x2aa801(0x16d)],'configName':_0x34c728[_0x2aa801(0x16a)],'channelType':_0x34c728['channelType']},'before':null,'after':projectNotificationConfig(_0x34c728),'dryRun':![],'backend':{'method':_0x2aa801(0x15a),'path':CREATE_PATH},'warnings':[],'verification':{'status':'verified','lookupCommand':_0x11f192}},'message':'Created\x20notification\x20config\x20'+_0x34c728['id']};}};
1
+ const a166_0x4da6e2=a166_0x41dc;(function(_0x3b95f8,_0x40ac15){const _0x459c11=a166_0x41dc,_0x56b566=_0x3b95f8();while(!![]){try{const _0x1ca5c9=parseInt(_0x459c11(0xd4))/0x1+parseInt(_0x459c11(0xc0))/0x2*(-parseInt(_0x459c11(0xdd))/0x3)+-parseInt(_0x459c11(0xc7))/0x4+-parseInt(_0x459c11(0xce))/0x5*(parseInt(_0x459c11(0xc9))/0x6)+parseInt(_0x459c11(0xcd))/0x7+parseInt(_0x459c11(0xd6))/0x8*(parseInt(_0x459c11(0xda))/0x9)+parseInt(_0x459c11(0xdf))/0xa*(parseInt(_0x459c11(0xd5))/0xb);if(_0x1ca5c9===_0x40ac15)break;else _0x56b566['push'](_0x56b566['shift']());}catch(_0x4556d0){_0x56b566['push'](_0x56b566['shift']());}}}(a166_0x46bc,0xf161a));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';function a166_0x41dc(_0x538d8d,_0xf50e5d){_0x538d8d=_0x538d8d-0xbd;const _0x46bcc0=a166_0x46bc();let _0x41dc43=_0x46bcc0[_0x538d8d];return _0x41dc43;}function a166_0x46bc(){const _0x35ed2d=['14385qPWbZM','document','Inspect\x20with\x20','write','notification_config_create_outcome_unknown','configName','349797hJjnyS','11445731dGUvcI','973864YQOWtk','planned',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','63VCVDHu','configCode','connectTimeout','325494uLlYYa','notification','30xVZTTN','channelConfig',';\x20do\x20not\x20resubmit\x20automatically.','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','mutation','22sOQqxb','description','appCode','POST','create','channelType','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','6565532FLsyVM','endpointUrl','2022cEMoSz','readTimeout','verification','/notification/channel-config/create','3287319fypoeD'];a166_0x46bc=function(){return _0x35ed2d;};return a166_0x46bc();}const CREATE_PATH=a166_0x4da6e2(0xcc);async function prepareCreate(_0x37d5f6){const _0x286dde=a166_0x4da6e2,_0x3b70c4=await readNotificationDocument(_0x37d5f6,_0x286dde(0xc4)),_0x24211a=createMutationInput(_0x37d5f6['appCode'],_0x3b70c4);return{'document':_0x3b70c4,'input':_0x24211a,'planned':projectNotificationConfig({'appCode':_0x37d5f6[_0x286dde(0xc2)],'configName':_0x3b70c4['configName'],'channelType':_0x3b70c4['channelType'],'endpointUrl':_0x3b70c4[_0x286dde(0xc8)],'channelConfig':_0x3b70c4[_0x286dde(0xe0)],'description':_0x3b70c4[_0x286dde(0xc1)],'connectTimeout':_0x3b70c4[_0x286dde(0xdc)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x3b70c4[_0x286dde(0xca)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a166_0x4da6e2(0xde),'command':'config-create','description':a166_0x4da6e2(0xbe),'risk':a166_0x4da6e2(0xd1),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4c04fd){assertSingleNotificationSource(_0x4c04fd);},async 'dryRun'(_0x35957e){const _0x3742e8=a166_0x4da6e2,_0x2b47c1=await prepareCreate(_0x35957e),_0x224e4c=notificationLookupCommand(_0x35957e[_0x3742e8(0xc2)],_0x2b47c1['document'][_0x3742e8(0xc5)]);return asDryRunResult({'operation':'create','selector':{'appCode':_0x35957e[_0x3742e8(0xc2)],'configName':_0x2b47c1['document']['configName'],'channelType':_0x2b47c1[_0x3742e8(0xcf)][_0x3742e8(0xc5)]},'before':null,'after':_0x2b47c1[_0x3742e8(0xd7)],'dryRun':!![],'backend':{'method':_0x3742e8(0xc3),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3742e8(0xd7),'lookupCommand':_0x224e4c}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x353762){const _0x282db9=a166_0x4da6e2,_0x576276=await prepareCreate(_0x353762),_0x22ce9c=notificationLookupCommand(_0x353762[_0x282db9(0xc2)],_0x576276[_0x282db9(0xcf)]['channelType']);let _0x2910b2;try{_0x2910b2=await createNotificationChannelConfig(_0x576276['input']);}catch(_0x218ae5){if(isPlatformTransportFailure(_0x218ae5))throw notificationError(_0x282db9(0xd2),_0x282db9(0xd9),'Inspect\x20with\x20'+_0x22ce9c+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x282db9(0xc4),_0x282db9(0xbf),_0x282db9(0xd0)+_0x22ce9c+_0x282db9(0xd8));}if(!Number['isSafeInteger'](_0x2910b2)||_0x2910b2<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x282db9(0xc6),'Inspect\x20with\x20'+_0x22ce9c+';\x20do\x20not\x20resubmit.');let _0x30d7e8;try{const _0x1edb17=await getNotificationChannelConfig(_0x2910b2,_0x353762[_0x282db9(0xc2)]);_0x30d7e8=normalizeExactNotificationConfig(_0x1edb17,_0x2910b2,_0x353762['appCode']);}catch{throw safeApiFailure(_0x282db9(0xc4),_0x282db9(0xcb),_0x282db9(0xd0)+_0x22ce9c+_0x282db9(0xbd));}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x30d7e8[_0x282db9(0xc2)],'id':_0x30d7e8['id'],'configCode':_0x30d7e8[_0x282db9(0xdb)],'configName':_0x30d7e8[_0x282db9(0xd3)],'channelType':_0x30d7e8[_0x282db9(0xc5)]},'before':null,'after':projectNotificationConfig(_0x30d7e8),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':'verified','lookupCommand':_0x22ce9c}},'message':'Created\x20notification\x20config\x20'+_0x30d7e8['id']};}};
@@ -1 +1 @@
1
- const a153_0x529a9e=a153_0x3526;(function(_0x53a350,_0x3a2856){const _0x22e206=a153_0x3526,_0x273053=_0x53a350();while(!![]){try{const _0x46b4c7=parseInt(_0x22e206(0x11a))/0x1+-parseInt(_0x22e206(0x105))/0x2*(-parseInt(_0x22e206(0x115))/0x3)+-parseInt(_0x22e206(0x10f))/0x4*(-parseInt(_0x22e206(0x102))/0x5)+-parseInt(_0x22e206(0x10c))/0x6+parseInt(_0x22e206(0x109))/0x7+-parseInt(_0x22e206(0x10d))/0x8+parseInt(_0x22e206(0x110))/0x9;if(_0x46b4c7===_0x3a2856)break;else _0x273053['push'](_0x273053['shift']());}catch(_0x3269ff){_0x273053['push'](_0x273053['shift']());}}}(a153_0x50f8,0xa6810));import{asDryRunResult}from'../../commands/common/dry-run.js';function a153_0x3526(_0x3429eb,_0x282efe){_0x3429eb=_0x3429eb-0xff;const _0x50f8a7=a153_0x50f8();let _0x35264e=_0x50f8a7[_0x3429eb];return _0x35264e;}function a153_0x50f8(){const _0x368f8d=['high-risk-write','169097rNGjaH','Notification\x20config\x20','channelType','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','notification_config_delete_verification_failed','Deleted\x20notification\x20config\x20','5WtYauI','/notification/channel-config/delete','delete','4XZQOXT','notification_config_delete_outcome_unknown','verified',';\x20no\x20automatic\x20retry\x20was\x20attempted.','3586765bdVziU','planned','before','3624840AVoIEs','4818128LJDzpp','config-delete','748164LfNDnb','2055483tlLTGa','appCode',';\x20do\x20not\x20resubmit\x20automatically.','\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20','1187229fwrMFt','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','POST','\x20delete\x20could\x20not\x20be\x20verified.'];a153_0x50f8=function(){return _0x368f8d;};return a153_0x50f8();}import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a153_0x529a9e(0x103),REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';async function prepareDelete(_0x57c579){const _0xefd15=a153_0x529a9e,_0x42fd4b=readNotificationId(_0x57c579),_0x3f48f5=await requireExactNotificationConfig(_0x57c579[_0xefd15(0x111)],_0x42fd4b,'delete');return{'id':_0x42fd4b,'before':_0x3f48f5};}export const notificationConfigDelete={'service':'notification','command':a153_0x529a9e(0x10e),'description':a153_0x529a9e(0x116),'risk':a153_0x529a9e(0x119),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x437996){readNotificationId(_0x437996),requireNotificationExplicitYes(_0x437996);},async 'dryRun'(_0x4757c4){const _0x6f144a=a153_0x529a9e,_0x5e45bd=await prepareDelete(_0x4757c4),_0xd1a2d2=notificationLookupCommand(_0x4757c4['appCode'],_0x5e45bd[_0x6f144a(0x10b)][_0x6f144a(0x11c)]);return asDryRunResult({'operation':_0x6f144a(0x104),'selector':notificationSelector(_0x5e45bd[_0x6f144a(0x10b)]),'before':projectNotificationConfig(_0x5e45bd[_0x6f144a(0x10b)]),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x6f144a(0x10a),'lookupCommand':_0xd1a2d2}},{'method':_0x6f144a(0x117),'url':DELETE_PATH});},async 'execute'(_0x5b7dd5){const _0x118147=a153_0x529a9e;requireNotificationExplicitYes(_0x5b7dd5);const _0x327500=await prepareDelete(_0x5b7dd5),_0x199031=notificationLookupCommand(_0x5b7dd5['appCode'],_0x327500[_0x118147(0x10b)][_0x118147(0x11c)]);let _0x2e6d0c=![];try{await deleteNotificationChannelConfig(_0x327500['id'],_0x5b7dd5['appCode']);}catch(_0x4ef996){if(!isPlatformTransportFailure(_0x4ef996))throw safeApiFailure(_0x118147(0x104),'mutation','Inspect\x20with\x20'+_0x199031+_0x118147(0x108));_0x2e6d0c=!![];}let _0x35b75f;try{_0x35b75f=await listNotificationChannelConfigs(_0x5b7dd5['appCode'],_0x327500[_0x118147(0x10b)][_0x118147(0x11c)]),validateNotificationDeleteReadback(_0x35b75f,_0x5b7dd5['appCode'],_0x327500[_0x118147(0x10b)][_0x118147(0x11c)]);}catch{throw notificationError(_0x2e6d0c?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable','Notification\x20config\x20'+_0x327500['id']+_0x118147(0x118),_0x118147(0x114)+_0x199031+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x35b75f['some'](_0xe53c20=>_0xe53c20['id']===_0x327500['id']))throw notificationError(_0x2e6d0c?_0x118147(0x106):_0x118147(0x100),_0x118147(0x11b)+_0x327500['id']+_0x118147(0x113),_0x118147(0x114)+_0x199031+_0x118147(0x112));const _0xb3f90d=[REFERENCE_WARNING];return _0x2e6d0c&&_0xb3f90d['unshift'](_0x118147(0xff)),{'ok':!![],'data':{'operation':_0x118147(0x104),'selector':notificationSelector(_0x327500[_0x118147(0x10b)]),'before':projectNotificationConfig(_0x327500['before']),'after':null,'dryRun':![],'backend':{'method':_0x118147(0x117),'path':DELETE_PATH},'warnings':_0xb3f90d,'verification':{'status':_0x118147(0x107),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x2e6d0c,'lookupCommand':_0x199031}},'message':_0x118147(0x101)+_0x327500['id']};}};
1
+ const a167_0x1eeb6f=a167_0x5c59;function a167_0x5c59(_0x55102e,_0x6831d0){_0x55102e=_0x55102e-0x19f;const _0xd590dc=a167_0xd590();let _0x5c59c6=_0xd590dc[_0x55102e];return _0x5c59c6;}(function(_0x25bfa4,_0x75770){const _0xb9c601=a167_0x5c59,_0x123c73=_0x25bfa4();while(!![]){try{const _0x4f2b0b=-parseInt(_0xb9c601(0x1be))/0x1*(-parseInt(_0xb9c601(0x1ba))/0x2)+parseInt(_0xb9c601(0x1b1))/0x3*(parseInt(_0xb9c601(0x1a9))/0x4)+-parseInt(_0xb9c601(0x1a7))/0x5*(parseInt(_0xb9c601(0x1bf))/0x6)+-parseInt(_0xb9c601(0x1b4))/0x7*(-parseInt(_0xb9c601(0x19f))/0x8)+-parseInt(_0xb9c601(0x1ad))/0x9*(-parseInt(_0xb9c601(0x1ae))/0xa)+parseInt(_0xb9c601(0x1b7))/0xb*(-parseInt(_0xb9c601(0x1bb))/0xc)+-parseInt(_0xb9c601(0x1af))/0xd*(-parseInt(_0xb9c601(0x1a8))/0xe);if(_0x4f2b0b===_0x75770)break;else _0x123c73['push'](_0x123c73['shift']());}catch(_0x54d405){_0x123c73['push'](_0x123c73['shift']());}}}(a167_0xd590,0x76bf6));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a167_0x1eeb6f(0x1bc),REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';function a167_0xd590(){const _0x11a4f0=['verified','42183JryDoL','150tQJLpu','799812MmUjPb','Inspect\x20with\x20','31446weNLYC','planned','before','7AqBjKG','unshift','mutation','4598dSvoNM','Deleted\x20notification\x20config\x20','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','34ulsvjv','22332OQszrO','/notification/channel-config/delete','notification_config_delete_verification_failed','478pOuvam','402XMZxJj','\x20delete\x20could\x20not\x20be\x20verified.','notification','POST','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','6282704MhoSkh','delete','high-risk-write','appCode',';\x20no\x20automatic\x20retry\x20was\x20attempted.','channelType','Notification\x20config\x20','notification_config_delete_outcome_unknown','31975rusnyL','98vvwySn','152sdPiTg',';\x20do\x20not\x20resubmit\x20automatically.','some'];a167_0xd590=function(){return _0x11a4f0;};return a167_0xd590();}async function prepareDelete(_0x2d8242){const _0x1e67c5=readNotificationId(_0x2d8242),_0x2a4ff5=await requireExactNotificationConfig(_0x2d8242['appCode'],_0x1e67c5,'delete');return{'id':_0x1e67c5,'before':_0x2a4ff5};}export const notificationConfigDelete={'service':a167_0x1eeb6f(0x1c1),'command':'config-delete','description':a167_0x1eeb6f(0x1b9),'risk':a167_0x1eeb6f(0x1a1),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x527060){readNotificationId(_0x527060),requireNotificationExplicitYes(_0x527060);},async 'dryRun'(_0x4dca04){const _0x33d585=a167_0x1eeb6f,_0x5df4a3=await prepareDelete(_0x4dca04),_0x337b7d=notificationLookupCommand(_0x4dca04[_0x33d585(0x1a2)],_0x5df4a3[_0x33d585(0x1b3)][_0x33d585(0x1a4)]);return asDryRunResult({'operation':_0x33d585(0x1a0),'selector':notificationSelector(_0x5df4a3[_0x33d585(0x1b3)]),'before':projectNotificationConfig(_0x5df4a3[_0x33d585(0x1b3)]),'after':null,'dryRun':!![],'backend':{'method':_0x33d585(0x1c2),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x33d585(0x1b2),'lookupCommand':_0x337b7d}},{'method':_0x33d585(0x1c2),'url':DELETE_PATH});},async 'execute'(_0x272d65){const _0x50f316=a167_0x1eeb6f;requireNotificationExplicitYes(_0x272d65);const _0x3dfb26=await prepareDelete(_0x272d65),_0x2281aa=notificationLookupCommand(_0x272d65[_0x50f316(0x1a2)],_0x3dfb26[_0x50f316(0x1b3)][_0x50f316(0x1a4)]);let _0x4d4348=![];try{await deleteNotificationChannelConfig(_0x3dfb26['id'],_0x272d65[_0x50f316(0x1a2)]);}catch(_0x5395b8){if(!isPlatformTransportFailure(_0x5395b8))throw safeApiFailure(_0x50f316(0x1a0),_0x50f316(0x1b6),_0x50f316(0x1b0)+_0x2281aa+_0x50f316(0x1a3));_0x4d4348=!![];}let _0x119f79;try{_0x119f79=await listNotificationChannelConfigs(_0x272d65['appCode'],_0x3dfb26['before'][_0x50f316(0x1a4)]),validateNotificationDeleteReadback(_0x119f79,_0x272d65['appCode'],_0x3dfb26[_0x50f316(0x1b3)][_0x50f316(0x1a4)]);}catch{throw notificationError(_0x4d4348?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable','Notification\x20config\x20'+_0x3dfb26['id']+_0x50f316(0x1c0),'Inspect\x20with\x20'+_0x2281aa+_0x50f316(0x1aa));}if(_0x119f79[_0x50f316(0x1ab)](_0x2d8c25=>_0x2d8c25['id']===_0x3dfb26['id']))throw notificationError(_0x4d4348?_0x50f316(0x1a6):_0x50f316(0x1bd),_0x50f316(0x1a5)+_0x3dfb26['id']+'\x20remains\x20present\x20after\x20delete.',_0x50f316(0x1b0)+_0x2281aa+';\x20do\x20not\x20resubmit\x20automatically.');const _0x1e1230=[REFERENCE_WARNING];return _0x4d4348&&_0x1e1230[_0x50f316(0x1b5)](_0x50f316(0x1c3)),{'ok':!![],'data':{'operation':_0x50f316(0x1a0),'selector':notificationSelector(_0x3dfb26['before']),'before':projectNotificationConfig(_0x3dfb26[_0x50f316(0x1b3)]),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x1e1230,'verification':{'status':_0x50f316(0x1ac),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x4d4348,'lookupCommand':_0x2281aa}},'message':_0x50f316(0x1b8)+_0x3dfb26['id']};}};
@@ -1 +1 @@
1
- const a154_0x5ea31c=a154_0x194d;(function(_0x3e2af8,_0x545d47){const _0x4ad711=a154_0x194d,_0x5a5d1d=_0x3e2af8();while(!![]){try{const _0x285645=-parseInt(_0x4ad711(0x134))/0x1*(-parseInt(_0x4ad711(0x13e))/0x2)+parseInt(_0x4ad711(0x139))/0x3+-parseInt(_0x4ad711(0x135))/0x4*(parseInt(_0x4ad711(0x13c))/0x5)+-parseInt(_0x4ad711(0x136))/0x6+-parseInt(_0x4ad711(0x13b))/0x7+-parseInt(_0x4ad711(0x137))/0x8+parseInt(_0x4ad711(0x141))/0x9;if(_0x285645===_0x545d47)break;else _0x5a5d1d['push'](_0x5a5d1d['shift']());}catch(_0x4ecdbf){_0x5a5d1d['push'](_0x5a5d1d['shift']());}}}(a154_0x5524,0xbb3c5));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a154_0x5524(){const _0x6299f4=['\x20notification\x20config(s)','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','Found\x20','length','type','appCode','3dfKENd','1296608sefEDE','2990886IPeLFN','5033728qSnGFw','map','1767411KwLShI','Notification\x20channel\x20type','3394573SfPxEO','5JYgHNW','config-list','30398juxVPh','read','string','18620739GwZhaV'];a154_0x5524=function(){return _0x6299f4;};return a154_0x5524();}function a154_0x194d(_0x45cf6e,_0x269cec){_0x45cf6e=_0x45cf6e-0x12e;const _0x5524e6=a154_0x5524();let _0x194d1c=_0x5524e6[_0x45cf6e];return _0x194d1c;}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':'notification','command':a154_0x5ea31c(0x13d),'description':a154_0x5ea31c(0x12f),'risk':a154_0x5ea31c(0x13f),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a154_0x5ea31c(0x132),'type':a154_0x5ea31c(0x140),'description':a154_0x5ea31c(0x13a),'enum':NOTIFICATION_CHANNEL_TYPES,'default':'EMAIL'}],async 'validate'(_0x4b2aa1){readNotificationChannelType(_0x4b2aa1);},async 'execute'(_0x39e735){const _0x50d969=a154_0x5ea31c,_0x26c6f6=readNotificationChannelType(_0x39e735),_0x33944a=await listNotificationChannelConfigs(_0x39e735[_0x50d969(0x133)],_0x26c6f6),_0x1baa9c=_0x33944a[_0x50d969(0x138)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x39e735[_0x50d969(0x133)],'channelType':_0x26c6f6,'count':_0x1baa9c[_0x50d969(0x131)],'configs':_0x1baa9c},'message':_0x50d969(0x130)+_0x1baa9c[_0x50d969(0x131)]+'\x20'+_0x26c6f6+_0x50d969(0x12e)};}};
1
+ const a168_0x21c1ed=a168_0x2582;function a168_0x42aa(){const _0x5b3310=['--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','6666436lzCpUN','Notification\x20channel\x20type','1486306nKHVfE','89943QhaCyX','type','validation','\x20notification\x20config(s)','bool','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','appCode','flat','config-list','785217kwBSYQ','971448LfWmuL','map','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','all','boolean','string','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','5667284wTJRZQ','6847025RLAVXZ','str','notification','length','Found\x20'];a168_0x42aa=function(){return _0x5b3310;};return a168_0x42aa();}(function(_0x344373,_0x4b979b){const _0x5d5211=a168_0x2582,_0x4de21d=_0x344373();while(!![]){try{const _0x315272=parseInt(_0x5d5211(0xa9))/0x1+-parseInt(_0x5d5211(0xa8))/0x2+-parseInt(_0x5d5211(0xb2))/0x3+parseInt(_0x5d5211(0xba))/0x4+parseInt(_0x5d5211(0xbb))/0x5+-parseInt(_0x5d5211(0xb3))/0x6+-parseInt(_0x5d5211(0xc1))/0x7;if(_0x315272===_0x4b979b)break;else _0x4de21d['push'](_0x4de21d['shift']());}catch(_0x191069){_0x4de21d['push'](_0x4de21d['shift']());}}}(a168_0x42aa,0xb8d1d));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a168_0x2582(_0x56bedf,_0x3a05c0){_0x56bedf=_0x56bedf-0xa8;const _0x42aa8a=a168_0x42aa();let _0x2582bb=_0x42aa8a[_0x56bedf];return _0x2582bb;}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a168_0x21c1ed(0xbd),'command':a168_0x21c1ed(0xb1),'description':a168_0x21c1ed(0xb9),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a168_0x21c1ed(0xaa),'type':a168_0x21c1ed(0xb8),'description':a168_0x21c1ed(0xc2),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a168_0x21c1ed(0xb6),'type':a168_0x21c1ed(0xb7),'default':![],'description':a168_0x21c1ed(0xb5)}],async 'validate'(_0x119ff9){const _0x484edd=a168_0x21c1ed;if(_0x119ff9['bool'](_0x484edd(0xb6))&&_0x119ff9[_0x484edd(0xbc)](_0x484edd(0xaa))['trim']())throw CliErrors[_0x484edd(0xab)](_0x484edd(0xc0),_0x484edd(0xae));if(_0x119ff9[_0x484edd(0xad)](_0x484edd(0xb6)))return;readNotificationChannelType(_0x119ff9);},async 'execute'(_0x18de10){const _0x30ccab=a168_0x21c1ed;if(_0x18de10[_0x30ccab(0xad)](_0x30ccab(0xb6))){const _0x53bfab=await Promise['all'](NOTIFICATION_CHANNEL_TYPES[_0x30ccab(0xb4)](_0xf4588d=>listNotificationChannelConfigs(_0x18de10[_0x30ccab(0xaf)],_0xf4588d))),_0x582c18=_0x53bfab[_0x30ccab(0xb0)]()[_0x30ccab(0xb4)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x18de10[_0x30ccab(0xaf)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x582c18[_0x30ccab(0xbe)],'configs':_0x582c18},'message':_0x30ccab(0xbf)+_0x582c18['length']+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x393825=readNotificationChannelType(_0x18de10),_0x201fac=await listNotificationChannelConfigs(_0x18de10[_0x30ccab(0xaf)],_0x393825),_0x11cf02=_0x201fac[_0x30ccab(0xb4)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x18de10[_0x30ccab(0xaf)],'channelType':_0x393825,'count':_0x11cf02[_0x30ccab(0xbe)],'configs':_0x11cf02},'message':_0x30ccab(0xbf)+_0x11cf02['length']+'\x20'+_0x393825+_0x30ccab(0xac)};}};
@@ -1 +1 @@
1
- const a155_0x36b166=a155_0x49f7;function a155_0x7311(){const _0x4dfbbe=['Inspect\x20ID\x20','update','447426gQZTlk','1830356WfTQsb','32rXfngv','5hlNuUg','config-update','1208604oOyKnY','verified','\x20with\x20','notification_config_update_outcome_unknown',';\x20do\x20not\x20resubmit\x20automatically.','before','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','2526582gyEOmE','channelType','patch','187958dJRDkc','appCode','5DZzgtL','Inspect\x20with\x20--id\x20','mutation','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','verifiedFields','planned','allMatch','\x20via\x20','high-risk-write','notification_config_update_verification_unavailable','41228sfVPgN','POST','1435791oTOsYC','330IXEWQj'];a155_0x7311=function(){return _0x4dfbbe;};return a155_0x7311();}(function(_0x516cbe,_0x436301){const _0x31869f=a155_0x49f7,_0x264b00=_0x516cbe();while(!![]){try{const _0x438cda=parseInt(_0x31869f(0xf6))/0x1*(-parseInt(_0x31869f(0xf4))/0x2)+-parseInt(_0x31869f(0xea))/0x3+parseInt(_0x31869f(0x107))/0x4+-parseInt(_0x31869f(0xe8))/0x5*(-parseInt(_0x31869f(0xf1))/0x6)+parseInt(_0x31869f(0x102))/0x7+parseInt(_0x31869f(0xe7))/0x8*(parseInt(_0x31869f(0x106))/0x9)+parseInt(_0x31869f(0x103))/0xa*(-parseInt(_0x31869f(0x100))/0xb);if(_0x438cda===_0x436301)break;else _0x264b00['push'](_0x264b00['shift']());}catch(_0x1d645e){_0x264b00['push'](_0x264b00['shift']());}}}(a155_0x7311,0x45e00));import{asDryRunResult}from'../../commands/common/dry-run.js';function a155_0x49f7(_0x8f5c68,_0x555b41){_0x8f5c68=_0x8f5c68-0xe7;const _0x731131=a155_0x7311();let _0x49f721=_0x731131[_0x8f5c68];return _0x49f721;}import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH='/notification/channel-config/update';async function prepareUpdate(_0x511e57){const _0x48f06f=a155_0x49f7,_0x46fd22=readNotificationId(_0x511e57),_0x2f93b4=await readNotificationDocument(_0x511e57,_0x48f06f(0x105)),_0xde2398=await requireExactNotificationConfig(_0x511e57['appCode'],_0x46fd22,_0x48f06f(0x105));return{'id':_0x46fd22,'patch':_0x2f93b4,'before':_0xde2398,'payload':mergeUpdateInput(_0xde2398,_0x2f93b4),'planned':plannedUpdateProjection(_0xde2398,_0x2f93b4)};}export const notificationConfigUpdate={'service':'notification','command':a155_0x36b166(0xe9),'description':a155_0x36b166(0xf0),'risk':a155_0x36b166(0xfe),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x2bd65e){readNotificationId(_0x2bd65e),assertSingleNotificationSource(_0x2bd65e),requireNotificationExplicitYes(_0x2bd65e);},async 'dryRun'(_0xf07a01){const _0xf0421=a155_0x36b166,_0x481331=await prepareUpdate(_0xf07a01),_0x1dd3fa=notificationLookupCommand(_0xf07a01[_0xf0421(0xf5)],_0x481331['before'][_0xf0421(0xf2)]);return asDryRunResult({'operation':_0xf0421(0x105),'selector':notificationSelector(_0x481331[_0xf0421(0xef)]),'before':projectNotificationConfig(_0x481331[_0xf0421(0xef)]),'after':_0x481331[_0xf0421(0xfb)],'dryRun':!![],'backend':{'method':_0xf0421(0x101),'path':UPDATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x1dd3fa}},{'method':_0xf0421(0x101),'url':UPDATE_PATH});},async 'execute'(_0x30a288){const _0x4b3a07=a155_0x36b166;requireNotificationExplicitYes(_0x30a288);const _0xf4a094=await prepareUpdate(_0x30a288),_0x138413=notificationLookupCommand(_0x30a288[_0x4b3a07(0xf5)],_0xf4a094['before'][_0x4b3a07(0xf2)]);let _0x3adc65=![];try{await updateNotificationChannelConfig(_0xf4a094['payload']);}catch(_0x11e64c){if(!isPlatformTransportFailure(_0x11e64c))throw safeApiFailure('update',_0x4b3a07(0xf8),_0x4b3a07(0x104)+_0xf4a094['id']+_0x4b3a07(0xec)+_0x138413+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x3adc65=!![];}let _0xc6b917;try{const _0x383c6b=await getNotificationChannelConfig(_0xf4a094['id'],_0x30a288['appCode']);_0xc6b917=normalizeExactNotificationConfig(_0x383c6b,_0xf4a094['id'],_0x30a288['appCode']);}catch{throw notificationError(_0x3adc65?'notification_config_update_outcome_unknown':_0x4b3a07(0xff),'Notification\x20config\x20'+_0xf4a094['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0x4b3a07(0xf7)+_0xf4a094['id']+_0x4b3a07(0xfd)+_0x138413+';\x20do\x20not\x20resubmit\x20automatically.');}const _0x116848=requestedSafeFieldsMatch(_0xf4a094[_0x4b3a07(0xef)],_0xc6b917,_0xf4a094[_0x4b3a07(0xf3)]);if(!_0x116848[_0x4b3a07(0xfc)]||_0x3adc65&&!_0x116848['provesChange'])throw notificationError(_0x3adc65?_0x4b3a07(0xed):'notification_config_update_verification_failed','Notification\x20config\x20'+_0xf4a094['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x4b3a07(0xf7)+_0xf4a094['id']+_0x4b3a07(0xfd)+_0x138413+_0x4b3a07(0xee));const _0x4e73c0=_0x3adc65?[_0x4b3a07(0xf9)]:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0xc6b917),'before':projectNotificationConfig(_0xf4a094[_0x4b3a07(0xef)]),'after':projectNotificationConfig(_0xc6b917),'dryRun':![],'backend':{'method':_0x4b3a07(0x101),'path':UPDATE_PATH},'warnings':_0x4e73c0,'verification':{'status':_0x4b3a07(0xeb),'recoveredAfterUnknownResponse':_0x3adc65,'verifiedFields':_0x116848[_0x4b3a07(0xfa)],'lookupCommand':_0x138413}},'message':'Updated\x20notification\x20config\x20'+_0xc6b917['id']};}};
1
+ const a169_0x4cfd8f=a169_0x5685;function a169_0x19bf(){const _0x559429=['notification','appCode','POST','notification_config_update_verification_unavailable','mutation','\x20via\x20','/notification/channel-config/update','213102xKJsUk','3671860xrzngl','552527ZxYWqF','\x20with\x20','7aTBnyt','1368936MDSHsd','update','verifiedFields','notification_config_update_verification_failed','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','Inspect\x20with\x20--id\x20','verified','before','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','3097408tkmPPk','2022pEHDGA','14879781PyDXyy',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Inspect\x20ID\x20','1257npEZzc','notification_config_update_outcome_unknown','planned','provesChange','channelType','config-update',';\x20do\x20not\x20resubmit\x20automatically.'];a169_0x19bf=function(){return _0x559429;};return a169_0x19bf();}(function(_0x1d5727,_0x5b4805){const _0x1855d8=a169_0x5685,_0x16b0d7=_0x1d5727();while(!![]){try{const _0x1c9795=-parseInt(_0x1855d8(0x191))/0x1+parseInt(_0x1855d8(0x19f))/0x2*(-parseInt(_0x1855d8(0x1a3))/0x3)+-parseInt(_0x1855d8(0x19e))/0x4+parseInt(_0x1855d8(0x190))/0x5+parseInt(_0x1855d8(0x1b1))/0x6+parseInt(_0x1855d8(0x193))/0x7*(-parseInt(_0x1855d8(0x194))/0x8)+parseInt(_0x1855d8(0x1a0))/0x9;if(_0x1c9795===_0x5b4805)break;else _0x16b0d7['push'](_0x16b0d7['shift']());}catch(_0x3f4a6e){_0x16b0d7['push'](_0x16b0d7['shift']());}}}(a169_0x19bf,0x7a759));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';function a169_0x5685(_0x4cd8fa,_0x41f572){_0x4cd8fa=_0x4cd8fa-0x190;const _0x19bff7=a169_0x19bf();let _0x56857a=_0x19bff7[_0x4cd8fa];return _0x56857a;}const UPDATE_PATH=a169_0x4cfd8f(0x1b0);async function prepareUpdate(_0x27f5b6){const _0x324e83=a169_0x4cfd8f,_0x119cbb=readNotificationId(_0x27f5b6),_0xa49cf5=await readNotificationDocument(_0x27f5b6,_0x324e83(0x195)),_0xabe4c1=await requireExactNotificationConfig(_0x27f5b6[_0x324e83(0x1ab)],_0x119cbb,_0x324e83(0x195));return{'id':_0x119cbb,'patch':_0xa49cf5,'before':_0xabe4c1,'payload':mergeUpdateInput(_0xabe4c1,_0xa49cf5),'planned':plannedUpdateProjection(_0xabe4c1,_0xa49cf5)};}export const notificationConfigUpdate={'service':a169_0x4cfd8f(0x1aa),'command':a169_0x4cfd8f(0x1a8),'description':'Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x13fe6d){readNotificationId(_0x13fe6d),assertSingleNotificationSource(_0x13fe6d),requireNotificationExplicitYes(_0x13fe6d);},async 'dryRun'(_0x5480fb){const _0x696ef7=a169_0x4cfd8f,_0x80292e=await prepareUpdate(_0x5480fb),_0x15937f=notificationLookupCommand(_0x5480fb['appCode'],_0x80292e[_0x696ef7(0x19c)][_0x696ef7(0x1a7)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x80292e[_0x696ef7(0x19c)]),'before':projectNotificationConfig(_0x80292e['before']),'after':_0x80292e[_0x696ef7(0x1a5)],'dryRun':!![],'backend':{'method':_0x696ef7(0x1ac),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x696ef7(0x1a5),'lookupCommand':_0x15937f}},{'method':_0x696ef7(0x1ac),'url':UPDATE_PATH});},async 'execute'(_0x1be50c){const _0xfd3a2d=a169_0x4cfd8f;requireNotificationExplicitYes(_0x1be50c);const _0x40e66c=await prepareUpdate(_0x1be50c),_0x7dd173=notificationLookupCommand(_0x1be50c['appCode'],_0x40e66c[_0xfd3a2d(0x19c)][_0xfd3a2d(0x1a7)]);let _0x3059f2=![];try{await updateNotificationChannelConfig(_0x40e66c['payload']);}catch(_0x5c26da){if(!isPlatformTransportFailure(_0x5c26da))throw safeApiFailure('update',_0xfd3a2d(0x1ae),_0xfd3a2d(0x1a2)+_0x40e66c['id']+_0xfd3a2d(0x192)+_0x7dd173+_0xfd3a2d(0x1a1));_0x3059f2=!![];}let _0x5c9e1f;try{const _0xfa3261=await getNotificationChannelConfig(_0x40e66c['id'],_0x1be50c[_0xfd3a2d(0x1ab)]);_0x5c9e1f=normalizeExactNotificationConfig(_0xfa3261,_0x40e66c['id'],_0x1be50c[_0xfd3a2d(0x1ab)]);}catch{throw notificationError(_0x3059f2?_0xfd3a2d(0x1a4):_0xfd3a2d(0x1ad),'Notification\x20config\x20'+_0x40e66c['id']+_0xfd3a2d(0x199),_0xfd3a2d(0x19a)+_0x40e66c['id']+_0xfd3a2d(0x1af)+_0x7dd173+_0xfd3a2d(0x1a9));}const _0x21ac3=requestedSafeFieldsMatch(_0x40e66c[_0xfd3a2d(0x19c)],_0x5c9e1f,_0x40e66c['patch']);if(!_0x21ac3['allMatch']||_0x3059f2&&!_0x21ac3[_0xfd3a2d(0x1a6)])throw notificationError(_0x3059f2?_0xfd3a2d(0x1a4):_0xfd3a2d(0x197),'Notification\x20config\x20'+_0x40e66c['id']+_0xfd3a2d(0x19d),'Inspect\x20with\x20--id\x20'+_0x40e66c['id']+'\x20via\x20'+_0x7dd173+_0xfd3a2d(0x1a9));const _0x3d164c=_0x3059f2?[_0xfd3a2d(0x198)]:[];return{'ok':!![],'data':{'operation':_0xfd3a2d(0x195),'selector':notificationSelector(_0x5c9e1f),'before':projectNotificationConfig(_0x40e66c[_0xfd3a2d(0x19c)]),'after':projectNotificationConfig(_0x5c9e1f),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x3d164c,'verification':{'status':_0xfd3a2d(0x19b),'recoveredAfterUnknownResponse':_0x3059f2,'verifiedFields':_0x21ac3[_0xfd3a2d(0x196)],'lookupCommand':_0x7dd173}},'message':'Updated\x20notification\x20config\x20'+_0x5c9e1f['id']};}};
@@ -1 +1 @@
1
- (function(_0x4a2228,_0x4f5da0){const _0x4ad5f2=a156_0x3c92,_0x2fd9f2=_0x4a2228();while(!![]){try{const _0x453ae9=parseInt(_0x4ad5f2(0x136))/0x1*(-parseInt(_0x4ad5f2(0x135))/0x2)+parseInt(_0x4ad5f2(0x12e))/0x3*(-parseInt(_0x4ad5f2(0x12d))/0x4)+parseInt(_0x4ad5f2(0x132))/0x5+parseInt(_0x4ad5f2(0x12c))/0x6*(parseInt(_0x4ad5f2(0x131))/0x7)+parseInt(_0x4ad5f2(0x133))/0x8+parseInt(_0x4ad5f2(0x130))/0x9*(-parseInt(_0x4ad5f2(0x134))/0xa)+-parseInt(_0x4ad5f2(0x12f))/0xb;if(_0x453ae9===_0x4f5da0)break;else _0x2fd9f2['push'](_0x2fd9f2['shift']());}catch(_0x3924ee){_0x2fd9f2['push'](_0x2fd9f2['shift']());}}}(a156_0x165c,0x739c3));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a156_0x165c(){const _0x3257dc=['109710AwWIYP','3343632HZkENn','16370jumsXV','1646qohOaF','94dGieqU','6RrLHso','576412OFINus','6eZuvwN','2837879HPTzCZ','873KCpvRc','5711923AMmVko'];a156_0x165c=function(){return _0x3257dc;};return a156_0x165c();}function a156_0x3c92(_0xb0b440,_0x483dd2){_0xb0b440=_0xb0b440-0x12c;const _0x165c9a=a156_0x165c();let _0x3c923a=_0x165c9a[_0xb0b440];return _0x3c923a;}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
1
+ (function(_0xbb5366,_0x381981){const _0x44c4d9=a170_0x4f0b,_0x3ec914=_0xbb5366();while(!![]){try{const _0x56164f=-parseInt(_0x44c4d9(0x75))/0x1*(-parseInt(_0x44c4d9(0x7b))/0x2)+-parseInt(_0x44c4d9(0x79))/0x3*(parseInt(_0x44c4d9(0x71))/0x4)+-parseInt(_0x44c4d9(0x72))/0x5*(-parseInt(_0x44c4d9(0x77))/0x6)+parseInt(_0x44c4d9(0x78))/0x7*(parseInt(_0x44c4d9(0x7a))/0x8)+-parseInt(_0x44c4d9(0x70))/0x9*(parseInt(_0x44c4d9(0x73))/0xa)+parseInt(_0x44c4d9(0x7c))/0xb+parseInt(_0x44c4d9(0x74))/0xc*(-parseInt(_0x44c4d9(0x76))/0xd);if(_0x56164f===_0x381981)break;else _0x3ec914['push'](_0x3ec914['shift']());}catch(_0x2b2521){_0x3ec914['push'](_0x3ec914['shift']());}}}(a170_0x1814,0xa3bd5));function a170_0x4f0b(_0x372453,_0x79c72c){_0x372453=_0x372453-0x70;const _0x1814ba=a170_0x1814();let _0x4f0be0=_0x1814ba[_0x372453];return _0x4f0be0;}import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];function a170_0x1814(){const _0xbeddc3=['3585360zbBBSm','2626775fGbVew','3288190JSvZgH','269340HfeeWX','43gefYgi','598NyxBUX','6YLYLyV','14yhiszh','3zcxnvk','2896184CVJixj','19954UcaQTT','13748834RcIbYi','9VSSLXL'];a170_0x1814=function(){return _0xbeddc3;};return a170_0x1814();}
@@ -1 +1 @@
1
- const a157_0x959504=a157_0x19c8;(function(_0x15a06a,_0x56c516){const _0x2fbef2=a157_0x19c8,_0x187767=_0x15a06a();while(!![]){try{const _0x5a82ef=-parseInt(_0x2fbef2(0x228))/0x1*(-parseInt(_0x2fbef2(0x225))/0x2)+-parseInt(_0x2fbef2(0x21b))/0x3+parseInt(_0x2fbef2(0x1f2))/0x4+-parseInt(_0x2fbef2(0x1d6))/0x5+-parseInt(_0x2fbef2(0x1e9))/0x6+-parseInt(_0x2fbef2(0x23d))/0x7*(parseInt(_0x2fbef2(0x1f0))/0x8)+parseInt(_0x2fbef2(0x220))/0x9*(parseInt(_0x2fbef2(0x1dc))/0xa);if(_0x5a82ef===_0x56c516)break;else _0x187767['push'](_0x187767['shift']());}catch(_0x15e209){_0x187767['push'](_0x187767['shift']());}}}(a157_0x1fc0,0x542e1));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL','FEISHU',a157_0x959504(0x21a),a157_0x959504(0x1d8),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName','channelType',a157_0x959504(0x224),a157_0x959504(0x205),a157_0x959504(0x21f),a157_0x959504(0x22e),a157_0x959504(0x22a)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode','configCode','channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a157_0x959504(0x234),'recipients',a157_0x959504(0x1db),'bccList','replyTo',a157_0x959504(0x22f),a157_0x959504(0x209),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a157_0x959504(0x204),'type':'string','required':![],'description':a157_0x959504(0x1f1)},{'name':a157_0x959504(0x20f),'type':a157_0x959504(0x1d1),'required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a157_0x959504(0x1d0),'type':a157_0x959504(0x20b),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a157_0x959504(0x23b),'required':!![],'description':a157_0x959504(0x1e6)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x2588f8,_0x2057d0,_0xa0b41a){return new CliError(_0x2588f8,0x1,_0x2057d0,_0xa0b41a);}export function readNotificationId(_0x2be0b4){const _0x4c3b2f=a157_0x959504,_0x398358=_0x2be0b4[_0x4c3b2f(0x1da)]('id');if(!Number[_0x4c3b2f(0x23e)](_0x398358)||_0x398358<=0x0)throw notificationError(_0x4c3b2f(0x229),_0x4c3b2f(0x1ed));return _0x398358;}export function requireNotificationExplicitYes(_0x20f0ef){const _0x28100a=a157_0x959504;if(_0x20f0ef[_0x28100a(0x230)](_0x28100a(0x1ce))||_0x20f0ef[_0x28100a(0x230)](_0x28100a(0x227)))return;throw notificationError(_0x28100a(0x223),_0x28100a(0x1d2),_0x28100a(0x22b));}export function readNotificationChannelType(_0x55068b,_0x144f09=a157_0x959504(0x1cc),_0x5a2abd='EMAIL'){const _0x95a55b=a157_0x959504,_0x4c0fc=_0x55068b[_0x95a55b(0x1cd)](_0x144f09)['trim']()||_0x5a2abd;if(!NOTIFICATION_CHANNEL_TYPES[_0x95a55b(0x1ee)](_0x4c0fc))throw CliErrors['validation'](_0x95a55b(0x1c9)+_0x144f09+':\x20'+_0x4c0fc,_0x95a55b(0x21d)+NOTIFICATION_CHANNEL_TYPES[_0x95a55b(0x221)](',\x20')+'.');return _0x4c0fc;}export function assertSingleNotificationSource(_0x371a24){const _0x1437ff=a157_0x959504,_0x1267e3=[],_0x33da40=_0x371a24[_0x1437ff(0x1cd)](_0x1437ff(0x204))[_0x1437ff(0x241)]();if(_0x33da40)_0x1267e3[_0x1437ff(0x242)]({'kind':_0x1437ff(0x204),'path':_0x33da40});if(_0x371a24['bool'](_0x1437ff(0x20f)))_0x1267e3['push']({'kind':_0x1437ff(0x20f)});const _0x5f27a4=_0x371a24[_0x1437ff(0x1cd)]('from-env')[_0x1437ff(0x241)]();if(_0x5f27a4)_0x1267e3[_0x1437ff(0x242)]({'kind':_0x1437ff(0x232),'name':_0x5f27a4});if(_0x1267e3[_0x1437ff(0x240)]===0x0)throw CliErrors['validation'](_0x1437ff(0x1ea),_0x1437ff(0x1e8));if(_0x1267e3[_0x1437ff(0x240)]>0x1)throw CliErrors[_0x1437ff(0x23f)](_0x1437ff(0x1f4),_0x1437ff(0x1e8));return _0x1267e3[0x0];}export async function readNotificationDocument(_0x3d7d31,_0x33b83d){const _0x468b01=a157_0x959504,_0x5605f4=assertSingleNotificationSource(_0x3d7d31),_0x3ccb36=_0x5605f4[_0x468b01(0x1fc)]===_0x468b01(0x204)?_0x468b01(0x239)+_0x5605f4[_0x468b01(0x20a)]:_0x5605f4['kind']===_0x468b01(0x232)?_0x468b01(0x237)+_0x5605f4[_0x468b01(0x211)]:_0x468b01(0x20f);let _0x4bf735;try{if(_0x5605f4[_0x468b01(0x1fc)]===_0x468b01(0x204))_0x4bf735=await readFile(_0x5605f4[_0x468b01(0x20a)],_0x468b01(0x1e2));else{if(_0x5605f4['kind']===_0x468b01(0x232)){if(!(_0x5605f4[_0x468b01(0x211)]in process.env))throw notificationError(_0x468b01(0x21e),_0x468b01(0x1f6)+_0x5605f4['name']);_0x4bf735=process.env[_0x5605f4.name]??'';}else _0x4bf735=await readStdin();}}catch(_0x438a8d){if(_0x438a8d instanceof CliError)throw _0x438a8d;throw notificationError(_0x468b01(0x21e),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0x3ccb36+'.');}let _0x2ab1f5;try{_0x2ab1f5=JSON[_0x468b01(0x236)](_0x4bf735);}catch{throw notificationError(_0x468b01(0x217),_0x468b01(0x22d)+_0x3ccb36+_0x468b01(0x1de),_0x468b01(0x1e4));}if(!isJsonObject(_0x2ab1f5))throw notificationError(_0x468b01(0x217),_0x468b01(0x22d)+_0x3ccb36+_0x468b01(0x238));return validateNotificationDocument(_0x2ab1f5,_0x33b83d);}export function projectNotificationListConfig(_0x2a0782,_0xbd4dea){const _0x219997=a157_0x959504;return{'id':typeof _0x2a0782['id']==='number'?_0x2a0782['id']:null,'configCode':requireResponseString(_0x2a0782['configCode'],_0x219997(0x1c7),_0xbd4dea),'configName':requireResponseString(_0x2a0782[_0x219997(0x200)],_0x219997(0x200),_0xbd4dea),'channelType':requireResponseString(_0x2a0782[_0x219997(0x1d9)],_0x219997(0x1d9),_0xbd4dea),'description':normalizeNullableString(_0x2a0782[_0x219997(0x21f)]),'createTime':normalizeNullableString(_0x2a0782[_0x219997(0x214)]),'updateTime':normalizeNullableString(_0x2a0782[_0x219997(0x213)])};}export function normalizeExactNotificationConfig(_0x1853ff,_0x484a1c,_0x423c12){const _0x15a774=a157_0x959504;if(!Number[_0x15a774(0x23e)](_0x1853ff['id'])||_0x1853ff['id']!==_0x484a1c)throw notificationError('notification_config_response_invalid',_0x15a774(0x1e3)+_0x484a1c+'.');if(_0x1853ff[_0x15a774(0x1f8)]!==_0x423c12)throw notificationError('notification_config_response_invalid',_0x15a774(0x1fd)+_0x484a1c+_0x15a774(0x1ca));const _0x39db79=requireExactString(_0x1853ff['configName'],_0x15a774(0x200),_0x484a1c),_0x32b83d=requireExactString(_0x1853ff[_0x15a774(0x1c7)],_0x15a774(0x1c7),_0x484a1c),_0x13ba85=requireExactString(_0x1853ff[_0x15a774(0x1d9)],'channelType',_0x484a1c);if(!NOTIFICATION_CHANNEL_TYPES[_0x15a774(0x1ee)](_0x13ba85))throw notificationError(_0x15a774(0x1d5),_0x15a774(0x1fd)+_0x484a1c+_0x15a774(0x1c8));const _0x20fb20=responseNullableString(_0x1853ff[_0x15a774(0x224)],_0x15a774(0x224),_0x484a1c),_0xbbe7cb=responseNullableString(_0x1853ff[_0x15a774(0x205)],_0x15a774(0x205),_0x484a1c),_0x5858de=responseNullableString(_0x1853ff['description'],'description',_0x484a1c),_0x2aeea1=responseNullableTimeout(_0x1853ff[_0x15a774(0x22e)],_0x15a774(0x22e),_0x484a1c),_0x749ace=responseNullableTimeout(_0x1853ff[_0x15a774(0x22a)],_0x15a774(0x22a),_0x484a1c);return{'id':_0x484a1c,'appCode':_0x423c12,'configCode':_0x32b83d,'configName':_0x39db79,'channelType':_0x13ba85,'endpointUrl':redactSensitive(_0x20fb20),'channelConfig':redactSensitive(_0xbbe7cb),'description':_0x5858de,'connectTimeout':_0x2aeea1,'readTimeout':_0x749ace,'endpointUrlRaw':_0x20fb20,'channelConfigRaw':_0xbbe7cb};}export async function requireExactNotificationConfig(_0x2ba4aa,_0x17fa21,_0x19fc2f){const _0x19da52=a157_0x959504;let _0x1588ef;try{_0x1588ef=await getNotificationChannelConfig(_0x17fa21,_0x2ba4aa);}catch{throw safeApiFailure(_0x19fc2f,'preflight',_0x19da52(0x208)+_0x2ba4aa+_0x19da52(0x1dd));}return normalizeExactNotificationConfig(_0x1588ef,_0x17fa21,_0x2ba4aa);}export function projectNotificationConfig(_0x84259c){const _0x379a4b=a157_0x959504;return{'id':_0x84259c['id']??null,'appCode':_0x84259c[_0x379a4b(0x1f8)],'configCode':_0x84259c[_0x379a4b(0x1c7)]??null,'configName':_0x84259c[_0x379a4b(0x200)],'channelType':_0x84259c['channelType'],'endpointUrl':redactSensitive(_0x84259c['endpointUrl']),'channelConfig':redactSensitive(_0x84259c[_0x379a4b(0x205)]),'description':_0x84259c[_0x379a4b(0x21f)]??null,'connectTimeout':_0x84259c[_0x379a4b(0x22e)]??null,'readTimeout':_0x84259c[_0x379a4b(0x22a)]??null};}export function notificationSelector(_0x3660c7){const _0x18b479=a157_0x959504;return{'appCode':_0x3660c7[_0x18b479(0x1f8)],'id':_0x3660c7['id'],'configCode':_0x3660c7[_0x18b479(0x1c7)],'configName':_0x3660c7[_0x18b479(0x200)],'channelType':_0x3660c7[_0x18b479(0x1d9)]};}export function createMutationInput(_0x54c000,_0x53a29e){const _0x307032=a157_0x959504;return{'appCode':_0x54c000,'configName':_0x53a29e[_0x307032(0x200)],'channelType':_0x53a29e[_0x307032(0x1d9)],...hasOwn(_0x53a29e,'endpointUrl')?{'endpointUrl':_0x53a29e[_0x307032(0x224)]}:{},...hasOwn(_0x53a29e,_0x307032(0x205))?{'channelConfig':serializeChannelConfig(_0x53a29e[_0x307032(0x205)])}:{},...hasOwn(_0x53a29e,_0x307032(0x21f))?{'description':_0x53a29e['description']}:{},...hasOwn(_0x53a29e,_0x307032(0x22e))?{'connectTimeout':_0x53a29e['connectTimeout']}:{},...hasOwn(_0x53a29e,_0x307032(0x22a))?{'readTimeout':_0x53a29e[_0x307032(0x22a)]}:{}};}export function mergeUpdateInput(_0x2ba735,_0x304083){const _0x10037d=a157_0x959504;return{'id':_0x2ba735['id'],'appCode':_0x2ba735['appCode'],'configName':_0x304083[_0x10037d(0x200)]??_0x2ba735[_0x10037d(0x200)],'channelType':_0x304083['channelType']??_0x2ba735[_0x10037d(0x1d9)],'endpointUrl':hasOwn(_0x304083,'endpointUrl')?_0x304083[_0x10037d(0x224)]:_0x2ba735[_0x10037d(0x1d3)],'channelConfig':hasOwn(_0x304083,_0x10037d(0x205))?serializeChannelConfig(_0x304083['channelConfig']):_0x2ba735[_0x10037d(0x219)],'description':hasOwn(_0x304083,'description')?_0x304083[_0x10037d(0x21f)]:_0x2ba735[_0x10037d(0x21f)],'connectTimeout':hasOwn(_0x304083,_0x10037d(0x22e))?_0x304083[_0x10037d(0x22e)]:_0x2ba735[_0x10037d(0x22e)],'readTimeout':hasOwn(_0x304083,_0x10037d(0x22a))?_0x304083[_0x10037d(0x22a)]:_0x2ba735[_0x10037d(0x22a)]};}export function plannedUpdateProjection(_0x458152,_0xbd697e){const _0x4de80d=a157_0x959504;return projectNotificationConfig({'id':_0x458152['id'],'appCode':_0x458152[_0x4de80d(0x1f8)],'configCode':_0x458152[_0x4de80d(0x1c7)],'configName':_0xbd697e['configName']??_0x458152[_0x4de80d(0x200)],'channelType':_0xbd697e[_0x4de80d(0x1d9)]??_0x458152[_0x4de80d(0x1d9)],'endpointUrl':hasOwn(_0xbd697e,_0x4de80d(0x224))?_0xbd697e[_0x4de80d(0x224)]:_0x458152[_0x4de80d(0x1d3)],'channelConfig':hasOwn(_0xbd697e,_0x4de80d(0x205))?_0xbd697e[_0x4de80d(0x205)]:_0x458152[_0x4de80d(0x219)],'description':hasOwn(_0xbd697e,_0x4de80d(0x21f))?_0xbd697e[_0x4de80d(0x21f)]:_0x458152[_0x4de80d(0x21f)],'connectTimeout':hasOwn(_0xbd697e,_0x4de80d(0x22e))?_0xbd697e[_0x4de80d(0x22e)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x458152[_0x4de80d(0x22e)],'readTimeout':hasOwn(_0xbd697e,_0x4de80d(0x22a))?_0xbd697e['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x458152['readTimeout']});}export function requestedSafeFieldsMatch(_0xf3030d,_0x8cb5c,_0x3791da){const _0x28c998=a157_0x959504,_0x3bf6a2=[],_0x466a11=[],_0x38bae6=[];for(const _0x187c51 of[_0x28c998(0x200),'channelType',_0x28c998(0x21f)]){if(!hasOwn(_0x3791da,_0x187c51))continue;_0x38bae6[_0x28c998(0x242)](_0x187c51),_0x3bf6a2[_0x28c998(0x242)](_0x8cb5c[_0x187c51]===_0x3791da[_0x187c51]),_0x466a11['push'](_0xf3030d[_0x187c51]!==_0x3791da[_0x187c51]&&_0x8cb5c[_0x187c51]===_0x3791da[_0x187c51]);}for(const _0x4dd592 of['connectTimeout','readTimeout']){if(!hasOwn(_0x3791da,_0x4dd592))continue;const _0x30c49e=_0x3791da[_0x4dd592]??(_0x4dd592===_0x28c998(0x22e)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x38bae6[_0x28c998(0x242)](_0x4dd592),_0x3bf6a2[_0x28c998(0x242)](_0x8cb5c[_0x4dd592]===_0x30c49e),_0x466a11[_0x28c998(0x242)](_0xf3030d[_0x4dd592]!==_0x30c49e&&_0x8cb5c[_0x4dd592]===_0x30c49e);}return hasOwn(_0x3791da,_0x28c998(0x224))&&_0x3791da[_0x28c998(0x224)]===null&&(_0x38bae6['push'](_0x28c998(0x22c)),_0x3bf6a2[_0x28c998(0x242)](_0x8cb5c[_0x28c998(0x1d3)]===null||_0x8cb5c['endpointUrlRaw']===''),_0x466a11[_0x28c998(0x242)](_0xf3030d['endpointUrlRaw']!==null&&_0xf3030d[_0x28c998(0x1d3)]!==''&&(_0x8cb5c[_0x28c998(0x1d3)]===null||_0x8cb5c['endpointUrlRaw']===''))),{'allMatch':_0x3bf6a2[_0x28c998(0x207)](Boolean),'provesChange':_0x466a11[_0x28c998(0x20d)](Boolean),'verifiedFields':_0x38bae6};}export function validateNotificationDeleteReadback(_0xeb700b,_0x3c7bf5,_0x405326){const _0x4cf8c4=a157_0x959504;for(const [_0x219331,_0x4034ad]of _0xeb700b[_0x4cf8c4(0x1cf)]()){if(!Number[_0x4cf8c4(0x23e)](_0x4034ad['id'])||_0x4034ad['id']<=0x0)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x219331+0x1)+_0x4cf8c4(0x202));if(_0x4034ad[_0x4cf8c4(0x1f8)]!==_0x3c7bf5)throw notificationError('notification_config_response_invalid',_0x4cf8c4(0x1e0)+(_0x219331+0x1)+_0x4cf8c4(0x23c));if(_0x4034ad[_0x4cf8c4(0x1d9)]!==_0x405326)throw notificationError('notification_config_response_invalid',_0x4cf8c4(0x1e0)+(_0x219331+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x5bae07,_0x45206b,_0x42082f){const _0x5b0168=a157_0x959504;return notificationError(_0x5b0168(0x1ec)+_0x5bae07+'_'+(_0x45206b===_0x5b0168(0x1e1)?'failed':_0x45206b+'_unavailable'),_0x5b0168(0x1fd)+_0x5bae07+'\x20'+_0x45206b+_0x5b0168(0x20c),_0x42082f);}export function notificationLookupCommand(_0x4a33b5,_0x536b95){const _0x3b6d40=a157_0x959504;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x4a33b5+_0x3b6d40(0x1f7)+_0x536b95+_0x3b6d40(0x203);}function validateNotificationDocument(_0x1f2ab7,_0x2e1b86){const _0x51c2aa=a157_0x959504;for(const _0x4aac41 of Object['keys'](_0x1f2ab7)){if(FORBIDDEN_IDENTITY_FIELDS[_0x51c2aa(0x244)](_0x4aac41))throw notificationError(_0x51c2aa(0x1d7),'Notification\x20JSON\x20field\x20\x22'+_0x4aac41+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x51c2aa(0x244)](_0x4aac41))throw notificationError(_0x51c2aa(0x1df),_0x51c2aa(0x20e)+_0x4aac41+'\x22.');}if(_0x2e1b86===_0x51c2aa(0x245)&&Object['keys'](_0x1f2ab7)[_0x51c2aa(0x240)]===0x0)throw notificationError(_0x51c2aa(0x233),'Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x19cdf6={};if(hasOwn(_0x1f2ab7,'configName'))_0x19cdf6[_0x51c2aa(0x200)]=validateRequiredString(_0x1f2ab7['configName'],'configName',0x80);else{if(_0x2e1b86===_0x51c2aa(0x1fa))throw notificationError(_0x51c2aa(0x1f5),_0x51c2aa(0x235)+_0x51c2aa(0x222));}if(hasOwn(_0x1f2ab7,_0x51c2aa(0x1d9))){if(typeof _0x1f2ab7[_0x51c2aa(0x1d9)]!==_0x51c2aa(0x20b))throw invalidFieldType(_0x51c2aa(0x1d9),_0x51c2aa(0x210));const _0x348665=_0x1f2ab7[_0x51c2aa(0x1d9)][_0x51c2aa(0x241)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x348665))throw notificationError(_0x51c2aa(0x215),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x51c2aa(0x21d)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x19cdf6['channelType']=_0x348665;}else{if(_0x2e1b86==='create')throw notificationError(_0x51c2aa(0x1f5),'Create\x20JSON\x20requires\x20field\x20'+'\x22channelType\x22.');}for(const [_0x1b99b1,_0x307447]of[[_0x51c2aa(0x224),0x200],[_0x51c2aa(0x21f),0x100]]){if(!hasOwn(_0x1f2ab7,_0x1b99b1))continue;const _0x36b285=_0x1f2ab7[_0x1b99b1];if(_0x36b285!==null&&typeof _0x36b285!==_0x51c2aa(0x20b))throw invalidFieldType(_0x1b99b1,_0x51c2aa(0x243));if(typeof _0x36b285===_0x51c2aa(0x20b)&&_0x36b285[_0x51c2aa(0x240)]>_0x307447)throw notificationError(_0x51c2aa(0x215),_0x51c2aa(0x226)+_0x1b99b1+'\x22\x20cannot\x20exceed\x20'+_0x307447+'\x20characters.');_0x19cdf6[_0x1b99b1]=_0x36b285;}if(hasOwn(_0x1f2ab7,_0x51c2aa(0x205))){const _0x398b95=_0x1f2ab7[_0x51c2aa(0x205)];if(_0x398b95===null&&_0x2e1b86===_0x51c2aa(0x1fa))throw invalidFieldType(_0x51c2aa(0x205),_0x51c2aa(0x1d4));if(_0x398b95!==null&&!isJsonObject(_0x398b95))throw invalidFieldType(_0x51c2aa(0x205),_0x2e1b86==='update'?'a\x20JSON\x20object\x20or\x20null':_0x51c2aa(0x1d4));_0x398b95!==null&&validateChannelConfigFields(_0x19cdf6[_0x51c2aa(0x1d9)],_0x398b95),_0x19cdf6['channelConfig']=_0x398b95;}for(const _0x3dc52f of[_0x51c2aa(0x22e),_0x51c2aa(0x22a)]){if(!hasOwn(_0x1f2ab7,_0x3dc52f))continue;const _0xadc9ed=_0x1f2ab7[_0x3dc52f];if(_0xadc9ed!==null&&(!Number[_0x51c2aa(0x23e)](_0xadc9ed)||_0xadc9ed<0x0))throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x3dc52f+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x19cdf6[_0x3dc52f]=_0xadc9ed;}return _0x19cdf6;}function validateRequiredString(_0x4ff3a4,_0x51e389,_0x5a564c){const _0xa527e1=a157_0x959504;if(typeof _0x4ff3a4!==_0xa527e1(0x20b))throw invalidFieldType(_0x51e389,_0xa527e1(0x1fe));const _0x445dc3=_0x4ff3a4[_0xa527e1(0x241)]();if(!_0x445dc3)throw notificationError(_0xa527e1(0x215),'Notification\x20JSON\x20field\x20\x22'+_0x51e389+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x445dc3[_0xa527e1(0x240)]>_0x5a564c)throw notificationError('notification_config_field_invalid',_0xa527e1(0x226)+_0x51e389+_0xa527e1(0x216)+_0x5a564c+_0xa527e1(0x1ef));return _0x445dc3;}function validateChannelConfigFields(_0xe7c1ab,_0x2bd387){const _0xce902b=a157_0x959504;if(hasOwn(_0x2bd387,_0xce902b(0x23a)))throw forbiddenChannelConfigField('messageTemplate');if(_0xe7c1ab==='EMAIL')for(const _0x2cbbc1 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x2bd387,_0x2cbbc1))throw forbiddenChannelConfigField(_0x2cbbc1);}}function forbiddenChannelConfigField(_0x5a92aa){const _0x19cb94=a157_0x959504;return notificationError('notification_config_channel_field_forbidden',_0x19cb94(0x1fb)+_0x5a92aa+_0x19cb94(0x1f9));}function invalidFieldType(_0x80fde4,_0x26a079){const _0x30ede2=a157_0x959504;return notificationError(_0x30ede2(0x215),_0x30ede2(0x226)+_0x80fde4+_0x30ede2(0x206)+_0x26a079+'.');}function serializeChannelConfig(_0x177c9a){const _0x1bdc6b=a157_0x959504;return _0x177c9a===null||_0x177c9a===undefined?null:JSON[_0x1bdc6b(0x201)](_0x177c9a);}function redactSensitive(_0x1d64ac){return _0x1d64ac===null||_0x1d64ac===undefined||_0x1d64ac===''?null:'<redacted>';}function requireResponseString(_0x517159,_0x24ccd1,_0x4a1cd0){const _0x24227d=a157_0x959504;if(typeof _0x517159!=='string'||_0x517159[_0x24227d(0x241)]()==='')throw CliErrors[_0x24227d(0x231)](_0x24227d(0x1eb),'Item\x20'+(_0x4a1cd0+0x1)+_0x24227d(0x1e7)+_0x24ccd1+'\x22.');return _0x517159[_0x24227d(0x241)]();}function requireExactString(_0x4f07b7,_0x22b6cc,_0x3d79f8){const _0x3962eb=a157_0x959504;if(typeof _0x4f07b7!==_0x3962eb(0x20b)||_0x4f07b7[_0x3962eb(0x241)]()==='')throw notificationError(_0x3962eb(0x1d5),'Notification\x20config\x20'+_0x3d79f8+_0x3962eb(0x1e7)+_0x22b6cc+'\x22.');return _0x4f07b7[_0x3962eb(0x241)]();}function responseNullableString(_0x469a60,_0x6e9d34,_0x2a20fc){const _0x3265cb=a157_0x959504;if(_0x469a60===undefined||_0x469a60===null)return null;if(typeof _0x469a60!==_0x3265cb(0x20b))throw notificationError(_0x3265cb(0x1d5),'Notification\x20config\x20'+_0x2a20fc+_0x3265cb(0x1e5)+_0x6e9d34+'\x22.');return _0x469a60;}function responseNullableTimeout(_0x2e28cf,_0x446c3b,_0x4d8af4){const _0x1d7ce7=a157_0x959504;if(_0x2e28cf===undefined||_0x2e28cf===null)return null;if(!Number[_0x1d7ce7(0x23e)](_0x2e28cf)||_0x2e28cf<0x0)throw notificationError(_0x1d7ce7(0x1d5),_0x1d7ce7(0x1fd)+_0x4d8af4+_0x1d7ce7(0x1e5)+_0x446c3b+'\x22.');return _0x2e28cf;}function a157_0x19c8(_0x4de368,_0x3b8639){_0x4de368=_0x4de368-0x1c7;const _0x1fc0f0=a157_0x1fc0();let _0x19c87b=_0x1fc0f0[_0x4de368];return _0x19c87b;}function normalizeNullableString(_0x385ec6){const _0xf7e520=a157_0x959504;return typeof _0x385ec6===_0xf7e520(0x20b)?_0x385ec6:null;}function isJsonObject(_0xbaa64d){const _0x133c34=a157_0x959504;return _0xbaa64d!==null&&typeof _0xbaa64d===_0x133c34(0x1f3)&&!Array[_0x133c34(0x1cb)](_0xbaa64d);}function hasOwn(_0x3fe4a7,_0x2e318f){const _0x31f9bc=a157_0x959504;return Object[_0x31f9bc(0x212)][_0x31f9bc(0x21c)][_0x31f9bc(0x218)](_0x3fe4a7,_0x2e318f);}async function readStdin(){const _0x31ef1d=a157_0x959504;let _0x3227a9='';process[_0x31ef1d(0x20f)][_0x31ef1d(0x1ff)](_0x31ef1d(0x1e2));for await(const _0x2377e4 of process[_0x31ef1d(0x20f)])_0x3227a9+=_0x2377e4;return _0x3227a9;}function a157_0x1fc0(){const _0x275463=['Notification\x20JSON\x20field\x20\x22','yes','347731SDmIFV','notification_config_id_invalid','readTimeout','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','endpointUrl:null','Notification\x20JSON\x20from\x20','connectTimeout','subjectPrefix','bool','apiError','env','notification_config_update_empty','emailTargets','Create\x20JSON\x20requires\x20field\x20','parse','environment\x20variable\x20','\x20must\x20be\x20an\x20object.','file\x20','messageTemplate','number','\x20has\x20an\x20invalid\x20appCode.','1129751PlZGPf','isSafeInteger','validation','length','trim','push','a\x20string\x20or\x20null','has','update','configCode','\x20has\x20an\x20unsupported\x20channelType.','Invalid\x20--','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','isArray','type','str','dry-run','entries','from-env','boolean','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','endpointUrlRaw','a\x20JSON\x20object','notification_config_response_invalid','1454370DtkAwL','notification_config_field_forbidden','WECOM','channelType','num','ccList','162110iomuLt','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x20is\x20invalid.','notification_config_field_unknown','Notification\x20config\x20list\x20item\x20','mutation','utf8','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x20has\x20invalid\x20field\x20\x22','Application-level\x20notification\x20config\x20ID','\x20is\x20missing\x20required\x20field\x20\x22','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','1263582HldKGP','Missing\x20notification\x20JSON\x20source.','Invalid\x20notification\x20config\x20response.','notification_config_','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','includes','\x20characters.','8TvETYX','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','718784JoZQWC','object','Notification\x20JSON\x20source\x20is\x20ambiguous.','notification_config_field_required','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','\x20--type\x20','appCode','\x22\x20is\x20forbidden.','create','Notification\x20JSON\x20channelConfig\x20field\x20\x22','kind','Notification\x20config\x20','a\x20non-empty\x20string','setEncoding','configName','stringify','\x20has\x20an\x20invalid\x20id.','\x20--format\x20compress','file','channelConfig','\x22\x20must\x20be\x20','every','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','fromName','path','string','\x20failed.','some','Unknown\x20notification\x20JSON\x20field\x20\x22','stdin','a\x20supported\x20string','name','prototype','updateTime','createTime','notification_config_field_invalid','\x22\x20cannot\x20exceed\x20','notification_config_json_invalid','call','channelConfigRaw','DINGTALK','1623165uhrrsu','hasOwnProperty','Allowed\x20values:\x20','notification_config_source_unavailable','description','567hWXFpR','join','\x22configName\x22.','notification_config_confirmation_required','endpointUrl','2ZCDPpS'];a157_0x1fc0=function(){return _0x275463;};return a157_0x1fc0();}
1
+ const a171_0x14e415=a171_0x1ae6;(function(_0x2f5269,_0x4f6e37){const _0x37c3cb=a171_0x1ae6,_0x4f96b6=_0x2f5269();while(!![]){try{const _0x49fb08=-parseInt(_0x37c3cb(0x120))/0x1*(parseInt(_0x37c3cb(0xf1))/0x2)+-parseInt(_0x37c3cb(0x123))/0x3*(-parseInt(_0x37c3cb(0x103))/0x4)+-parseInt(_0x37c3cb(0x130))/0x5*(-parseInt(_0x37c3cb(0xf3))/0x6)+parseInt(_0x37c3cb(0x16c))/0x7*(parseInt(_0x37c3cb(0x127))/0x8)+-parseInt(_0x37c3cb(0x146))/0x9*(-parseInt(_0x37c3cb(0x164))/0xa)+parseInt(_0x37c3cb(0x13c))/0xb*(-parseInt(_0x37c3cb(0x12b))/0xc)+parseInt(_0x37c3cb(0x147))/0xd;if(_0x49fb08===_0x4f6e37)break;else _0x4f96b6['push'](_0x4f96b6['shift']());}catch(_0x2b31e4){_0x4f96b6['push'](_0x4f96b6['shift']());}}}(a171_0x2e6b,0x41136));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a171_0x14e415(0x15d),a171_0x14e415(0x143),'DINGTALK',a171_0x14e415(0x116),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;function a171_0x2e6b(){const _0x200b09=['rabetbase\x20notification\x20config-list\x20--appcode\x20','replyTo','push','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','228815RAEaEs','string','\x22\x20cannot\x20exceed\x20','Notification\x20JSON\x20field\x20\x22','hasOwnProperty','connectTimeout','Allowed\x20values:\x20','\x22configName\x22.','isSafeInteger','channelConfig','\x20has\x20an\x20invalid\x20id.','<redacted>','3036pSbzsZ','endpointUrlRaw','notification_config_field_unknown','a\x20string\x20or\x20null','\x22\x20must\x20be\x20','Unknown\x20notification\x20JSON\x20field\x20\x22','Invalid\x20notification\x20config\x20response.','FEISHU','notification_config_source_unavailable','Notification\x20JSON\x20from\x20','139734YLSEjy','1201746ANmkhF','a\x20JSON\x20object','channelConfigRaw','kind','some','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','stringify','Invalid\x20--','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','\x20is\x20missing\x20required\x20field\x20\x22','notification_config_id_invalid','notification_config_field_required','bccList','yes','notification_config_update_empty','path','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','trim','Notification\x20JSON\x20source\x20is\x20ambiguous.','length','setEncoding','a\x20JSON\x20object\x20or\x20null','EMAIL','file','messageTemplate','\x20--format\x20compress','env','join','\x20has\x20an\x20unsupported\x20channelType.','70sgjYZY','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Missing\x20notification\x20JSON\x20source.','recipients','subjectPrefix','update','description','preflight','4501lAgGfr','endpointUrl','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20has\x20invalid\x20field\x20\x22','bool','214YEEfkq','validation','6MWuipu','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','parse','Application-level\x20notification\x20config\x20ID','notification_config_response_invalid','has','endpointUrl:null','ccList','create','utf8','mutation','apiError','\x20characters.','a\x20non-empty\x20string','includes','stdin','110800wdigtK','emailTargets','_unavailable','\x22\x20must\x20be\x20a\x20non-empty\x20string.','Notification\x20config\x20list\x20item\x20','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','number','every','Create\x20JSON\x20requires\x20field\x20','updateTime','\x20must\x20be\x20an\x20object.','readTimeout','str','\x20--type\x20','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x22channelType\x22.','notification_config_field_invalid','fromName','from-env','WECOM','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','notification_config_','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','entries','\x20has\x20an\x20invalid\x20channelType.','configName','name','appCode','1957xuRpZj','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','27xSyjqH','Notification\x20config\x20','notification_config_json_invalid','configCode','720NgAMmj','environment\x20variable\x20','type','channelType','3396jZbHUd'];a171_0x2e6b=function(){return _0x200b09;};return a171_0x2e6b();}export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a171_0x14e415(0x11d),'channelType',a171_0x14e415(0xed),a171_0x14e415(0x139),a171_0x14e415(0x16a),a171_0x14e415(0x135),a171_0x14e415(0x10e)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a171_0x14e415(0x126),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a171_0x14e415(0x104),a171_0x14e415(0x167),a171_0x14e415(0xfa),a171_0x14e415(0x153),a171_0x14e415(0x12d),a171_0x14e415(0x168),a171_0x14e415(0x114),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a171_0x14e415(0x15e),'type':a171_0x14e415(0x131),'required':![],'description':a171_0x14e415(0x14f)},{'name':a171_0x14e415(0x102),'type':'boolean','required':![],'default':![],'description':a171_0x14e415(0x14c)},{'name':a171_0x14e415(0x115),'type':a171_0x14e415(0x131),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a171_0x14e415(0x109),'required':!![],'description':a171_0x14e415(0xf6)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x23623f,_0x3e3f15,_0x50ee68){return new CliError(_0x23623f,0x1,_0x3e3f15,_0x50ee68);}export function readNotificationId(_0x38123e){const _0x1067cd=a171_0x14e415,_0x23038e=_0x38123e['num']('id');if(!Number[_0x1067cd(0x138)](_0x23038e)||_0x23038e<=0x0)throw notificationError(_0x1067cd(0x151),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x23038e;}export function requireNotificationExplicitYes(_0x160e4e){const _0x55d985=a171_0x14e415;if(_0x160e4e['bool']('dry-run')||_0x160e4e[_0x55d985(0xf0)](_0x55d985(0x154)))return;throw notificationError('notification_config_confirmation_required','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.',_0x55d985(0x121));}export function readNotificationChannelType(_0x354ac5,_0x155a6c=a171_0x14e415(0x129),_0x374f6d=a171_0x14e415(0x15d)){const _0x4083d6=a171_0x14e415,_0x5cabf7=_0x354ac5[_0x4083d6(0x10f)](_0x155a6c)[_0x4083d6(0x158)]()||_0x374f6d;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x5cabf7))throw CliErrors[_0x4083d6(0xf2)](_0x4083d6(0x14e)+_0x155a6c+':\x20'+_0x5cabf7,_0x4083d6(0x136)+NOTIFICATION_CHANNEL_TYPES[_0x4083d6(0x162)](',\x20')+'.');return _0x5cabf7;}export function assertSingleNotificationSource(_0x120dde){const _0x30c2b9=a171_0x14e415,_0x1b6d1b=[],_0x2a1e64=_0x120dde[_0x30c2b9(0x10f)](_0x30c2b9(0x15e))[_0x30c2b9(0x158)]();if(_0x2a1e64)_0x1b6d1b[_0x30c2b9(0x12e)]({'kind':'file','path':_0x2a1e64});if(_0x120dde[_0x30c2b9(0xf0)](_0x30c2b9(0x102)))_0x1b6d1b[_0x30c2b9(0x12e)]({'kind':_0x30c2b9(0x102)});const _0x4825f5=_0x120dde[_0x30c2b9(0x10f)](_0x30c2b9(0x115))[_0x30c2b9(0x158)]();if(_0x4825f5)_0x1b6d1b['push']({'kind':'env','name':_0x4825f5});if(_0x1b6d1b[_0x30c2b9(0x15a)]===0x0)throw CliErrors[_0x30c2b9(0xf2)](_0x30c2b9(0x166),_0x30c2b9(0x165));if(_0x1b6d1b[_0x30c2b9(0x15a)]>0x1)throw CliErrors[_0x30c2b9(0xf2)](_0x30c2b9(0x159),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0x1b6d1b[0x0];}export async function readNotificationDocument(_0x2fda1b,_0x9f2514){const _0x8dc563=a171_0x14e415,_0x4e0432=assertSingleNotificationSource(_0x2fda1b),_0x36f939=_0x4e0432['kind']===_0x8dc563(0x15e)?'file\x20'+_0x4e0432[_0x8dc563(0x156)]:_0x4e0432['kind']===_0x8dc563(0x161)?_0x8dc563(0x128)+_0x4e0432[_0x8dc563(0x11e)]:_0x8dc563(0x102);let _0x69696f;try{if(_0x4e0432[_0x8dc563(0x14a)]===_0x8dc563(0x15e))_0x69696f=await readFile(_0x4e0432['path'],_0x8dc563(0xfc));else{if(_0x4e0432['kind']===_0x8dc563(0x161)){if(!(_0x4e0432['name']in process.env))throw notificationError(_0x8dc563(0x144),_0x8dc563(0x11a)+_0x4e0432['name']);_0x69696f=process.env[_0x4e0432.name]??'';}else _0x69696f=await readStdin();}}catch(_0x5b1cb1){if(_0x5b1cb1 instanceof CliError)throw _0x5b1cb1;throw notificationError('notification_config_source_unavailable',_0x8dc563(0x118)+_0x36f939+'.');}let _0x5944eb;try{_0x5944eb=JSON[_0x8dc563(0xf5)](_0x69696f);}catch{throw notificationError('notification_config_json_invalid',_0x8dc563(0x145)+_0x36f939+'\x20is\x20invalid.',_0x8dc563(0xf4));}if(!isJsonObject(_0x5944eb))throw notificationError(_0x8dc563(0x125),_0x8dc563(0x145)+_0x36f939+_0x8dc563(0x10d));return validateNotificationDocument(_0x5944eb,_0x9f2514);}export function projectNotificationListConfig(_0x1bafa1,_0x48299a){const _0x4fac51=a171_0x14e415;return{'id':typeof _0x1bafa1['id']===_0x4fac51(0x109)?_0x1bafa1['id']:null,'configCode':requireResponseString(_0x1bafa1[_0x4fac51(0x126)],'configCode',_0x48299a),'configName':requireResponseString(_0x1bafa1[_0x4fac51(0x11d)],_0x4fac51(0x11d),_0x48299a),'channelType':requireResponseString(_0x1bafa1['channelType'],_0x4fac51(0x12a),_0x48299a),'description':normalizeNullableString(_0x1bafa1[_0x4fac51(0x16a)]),'createTime':normalizeNullableString(_0x1bafa1['createTime']),'updateTime':normalizeNullableString(_0x1bafa1[_0x4fac51(0x10c)])};}export function normalizeExactNotificationConfig(_0x120647,_0x2ca0ae,_0x434867){const _0x104ea9=a171_0x14e415;if(!Number['isSafeInteger'](_0x120647['id'])||_0x120647['id']!==_0x2ca0ae)throw notificationError(_0x104ea9(0xf7),_0x104ea9(0x12f)+_0x2ca0ae+'.');if(_0x120647[_0x104ea9(0x11f)]!==_0x434867)throw notificationError('notification_config_response_invalid',_0x104ea9(0x124)+_0x2ca0ae+_0x104ea9(0x111));const _0x378e92=requireExactString(_0x120647[_0x104ea9(0x11d)],_0x104ea9(0x11d),_0x2ca0ae),_0x50dffa=requireExactString(_0x120647['configCode'],_0x104ea9(0x126),_0x2ca0ae),_0x15a904=requireExactString(_0x120647[_0x104ea9(0x12a)],_0x104ea9(0x12a),_0x2ca0ae);if(!NOTIFICATION_CHANNEL_TYPES[_0x104ea9(0x101)](_0x15a904))throw notificationError(_0x104ea9(0xf7),_0x104ea9(0x124)+_0x2ca0ae+_0x104ea9(0x163));const _0x5ae849=responseNullableString(_0x120647['endpointUrl'],_0x104ea9(0xed),_0x2ca0ae),_0x5cc7d6=responseNullableString(_0x120647[_0x104ea9(0x139)],_0x104ea9(0x139),_0x2ca0ae),_0x10f095=responseNullableString(_0x120647[_0x104ea9(0x16a)],_0x104ea9(0x16a),_0x2ca0ae),_0x4259c5=responseNullableTimeout(_0x120647[_0x104ea9(0x135)],_0x104ea9(0x135),_0x2ca0ae),_0x3a6d6e=responseNullableTimeout(_0x120647[_0x104ea9(0x10e)],_0x104ea9(0x10e),_0x2ca0ae);return{'id':_0x2ca0ae,'appCode':_0x434867,'configCode':_0x50dffa,'configName':_0x378e92,'channelType':_0x15a904,'endpointUrl':redactSensitive(_0x5ae849),'channelConfig':redactSensitive(_0x5cc7d6),'description':_0x10f095,'connectTimeout':_0x4259c5,'readTimeout':_0x3a6d6e,'endpointUrlRaw':_0x5ae849,'channelConfigRaw':_0x5cc7d6};}export async function requireExactNotificationConfig(_0x369e15,_0x47aba5,_0x62aedf){const _0x4342f6=a171_0x14e415;let _0xea1d3b;try{_0xea1d3b=await getNotificationChannelConfig(_0x47aba5,_0x369e15);}catch{throw safeApiFailure(_0x62aedf,_0x4342f6(0x16b),_0x4342f6(0xee)+_0x369e15+_0x4342f6(0x108));}return normalizeExactNotificationConfig(_0xea1d3b,_0x47aba5,_0x369e15);}export function projectNotificationConfig(_0x15175b){const _0x2f8f1b=a171_0x14e415;return{'id':_0x15175b['id']??null,'appCode':_0x15175b[_0x2f8f1b(0x11f)],'configCode':_0x15175b[_0x2f8f1b(0x126)]??null,'configName':_0x15175b[_0x2f8f1b(0x11d)],'channelType':_0x15175b[_0x2f8f1b(0x12a)],'endpointUrl':redactSensitive(_0x15175b[_0x2f8f1b(0xed)]),'channelConfig':redactSensitive(_0x15175b[_0x2f8f1b(0x139)]),'description':_0x15175b['description']??null,'connectTimeout':_0x15175b[_0x2f8f1b(0x135)]??null,'readTimeout':_0x15175b[_0x2f8f1b(0x10e)]??null};}export function notificationSelector(_0x4ead1){const _0x5819db=a171_0x14e415;return{'appCode':_0x4ead1['appCode'],'id':_0x4ead1['id'],'configCode':_0x4ead1[_0x5819db(0x126)],'configName':_0x4ead1['configName'],'channelType':_0x4ead1[_0x5819db(0x12a)]};}export function createMutationInput(_0x1431e4,_0x410601){const _0x413c19=a171_0x14e415;return{'appCode':_0x1431e4,'configName':_0x410601['configName'],'channelType':_0x410601[_0x413c19(0x12a)],...hasOwn(_0x410601,_0x413c19(0xed))?{'endpointUrl':_0x410601[_0x413c19(0xed)]}:{},...hasOwn(_0x410601,_0x413c19(0x139))?{'channelConfig':serializeChannelConfig(_0x410601['channelConfig'])}:{},...hasOwn(_0x410601,'description')?{'description':_0x410601[_0x413c19(0x16a)]}:{},...hasOwn(_0x410601,_0x413c19(0x135))?{'connectTimeout':_0x410601['connectTimeout']}:{},...hasOwn(_0x410601,'readTimeout')?{'readTimeout':_0x410601[_0x413c19(0x10e)]}:{}};}export function mergeUpdateInput(_0xc2ac5a,_0x40de28){const _0x7d2d01=a171_0x14e415;return{'id':_0xc2ac5a['id'],'appCode':_0xc2ac5a[_0x7d2d01(0x11f)],'configName':_0x40de28['configName']??_0xc2ac5a[_0x7d2d01(0x11d)],'channelType':_0x40de28['channelType']??_0xc2ac5a[_0x7d2d01(0x12a)],'endpointUrl':hasOwn(_0x40de28,_0x7d2d01(0xed))?_0x40de28[_0x7d2d01(0xed)]:_0xc2ac5a[_0x7d2d01(0x13d)],'channelConfig':hasOwn(_0x40de28,_0x7d2d01(0x139))?serializeChannelConfig(_0x40de28[_0x7d2d01(0x139)]):_0xc2ac5a[_0x7d2d01(0x149)],'description':hasOwn(_0x40de28,_0x7d2d01(0x16a))?_0x40de28[_0x7d2d01(0x16a)]:_0xc2ac5a[_0x7d2d01(0x16a)],'connectTimeout':hasOwn(_0x40de28,_0x7d2d01(0x135))?_0x40de28[_0x7d2d01(0x135)]:_0xc2ac5a[_0x7d2d01(0x135)],'readTimeout':hasOwn(_0x40de28,_0x7d2d01(0x10e))?_0x40de28[_0x7d2d01(0x10e)]:_0xc2ac5a[_0x7d2d01(0x10e)]};}export function plannedUpdateProjection(_0x457a8c,_0x4c912a){const _0x5a41ab=a171_0x14e415;return projectNotificationConfig({'id':_0x457a8c['id'],'appCode':_0x457a8c[_0x5a41ab(0x11f)],'configCode':_0x457a8c[_0x5a41ab(0x126)],'configName':_0x4c912a[_0x5a41ab(0x11d)]??_0x457a8c[_0x5a41ab(0x11d)],'channelType':_0x4c912a[_0x5a41ab(0x12a)]??_0x457a8c['channelType'],'endpointUrl':hasOwn(_0x4c912a,_0x5a41ab(0xed))?_0x4c912a[_0x5a41ab(0xed)]:_0x457a8c[_0x5a41ab(0x13d)],'channelConfig':hasOwn(_0x4c912a,_0x5a41ab(0x139))?_0x4c912a['channelConfig']:_0x457a8c[_0x5a41ab(0x149)],'description':hasOwn(_0x4c912a,'description')?_0x4c912a['description']:_0x457a8c['description'],'connectTimeout':hasOwn(_0x4c912a,'connectTimeout')?_0x4c912a['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x457a8c[_0x5a41ab(0x135)],'readTimeout':hasOwn(_0x4c912a,'readTimeout')?_0x4c912a[_0x5a41ab(0x10e)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x457a8c['readTimeout']});}export function requestedSafeFieldsMatch(_0x16ded7,_0x5da25f,_0x404266){const _0x3f01d1=a171_0x14e415,_0x390d3a=[],_0x2fc042=[],_0x41a268=[];for(const _0x4a25c7 of[_0x3f01d1(0x11d),'channelType',_0x3f01d1(0x16a)]){if(!hasOwn(_0x404266,_0x4a25c7))continue;_0x41a268[_0x3f01d1(0x12e)](_0x4a25c7),_0x390d3a['push'](_0x5da25f[_0x4a25c7]===_0x404266[_0x4a25c7]),_0x2fc042[_0x3f01d1(0x12e)](_0x16ded7[_0x4a25c7]!==_0x404266[_0x4a25c7]&&_0x5da25f[_0x4a25c7]===_0x404266[_0x4a25c7]);}for(const _0x1641f2 of[_0x3f01d1(0x135),_0x3f01d1(0x10e)]){if(!hasOwn(_0x404266,_0x1641f2))continue;const _0x197c7b=_0x404266[_0x1641f2]??(_0x1641f2==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x41a268['push'](_0x1641f2),_0x390d3a[_0x3f01d1(0x12e)](_0x5da25f[_0x1641f2]===_0x197c7b),_0x2fc042[_0x3f01d1(0x12e)](_0x16ded7[_0x1641f2]!==_0x197c7b&&_0x5da25f[_0x1641f2]===_0x197c7b);}return hasOwn(_0x404266,_0x3f01d1(0xed))&&_0x404266[_0x3f01d1(0xed)]===null&&(_0x41a268['push'](_0x3f01d1(0xf9)),_0x390d3a[_0x3f01d1(0x12e)](_0x5da25f[_0x3f01d1(0x13d)]===null||_0x5da25f[_0x3f01d1(0x13d)]===''),_0x2fc042[_0x3f01d1(0x12e)](_0x16ded7[_0x3f01d1(0x13d)]!==null&&_0x16ded7['endpointUrlRaw']!==''&&(_0x5da25f['endpointUrlRaw']===null||_0x5da25f['endpointUrlRaw']===''))),{'allMatch':_0x390d3a[_0x3f01d1(0x10a)](Boolean),'provesChange':_0x2fc042[_0x3f01d1(0x14b)](Boolean),'verifiedFields':_0x41a268};}export function validateNotificationDeleteReadback(_0x398257,_0x29db39,_0x42fafd){const _0x2595c9=a171_0x14e415;for(const [_0x388fb5,_0x1cfc7a]of _0x398257[_0x2595c9(0x11b)]()){if(!Number[_0x2595c9(0x138)](_0x1cfc7a['id'])||_0x1cfc7a['id']<=0x0)throw notificationError(_0x2595c9(0xf7),_0x2595c9(0x107)+(_0x388fb5+0x1)+_0x2595c9(0x13a));if(_0x1cfc7a['appCode']!==_0x29db39)throw notificationError(_0x2595c9(0xf7),_0x2595c9(0x107)+(_0x388fb5+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x1cfc7a[_0x2595c9(0x12a)]!==_0x42fafd)throw notificationError(_0x2595c9(0xf7),_0x2595c9(0x107)+(_0x388fb5+0x1)+_0x2595c9(0x11c));}}export function safeApiFailure(_0x364930,_0x3fd602,_0x351967){const _0xe94512=a171_0x14e415;return notificationError(_0xe94512(0x119)+_0x364930+'_'+(_0x3fd602===_0xe94512(0xfd)?'failed':_0x3fd602+_0xe94512(0x105)),_0xe94512(0x124)+_0x364930+'\x20'+_0x3fd602+'\x20failed.',_0x351967);}export function notificationLookupCommand(_0x33c8e0,_0x1ff77a){const _0x50136c=a171_0x14e415;return _0x50136c(0x12c)+_0x33c8e0+_0x50136c(0x110)+_0x1ff77a+_0x50136c(0x160);}function validateNotificationDocument(_0x2815ec,_0x1bd98a){const _0x46c521=a171_0x14e415;for(const _0x1de85a of Object['keys'](_0x2815ec)){if(FORBIDDEN_IDENTITY_FIELDS[_0x46c521(0xf8)](_0x1de85a))throw notificationError('notification_config_field_forbidden',_0x46c521(0x133)+_0x1de85a+_0x46c521(0x122));if(!ALLOWED_INPUT_FIELDS['has'](_0x1de85a))throw notificationError(_0x46c521(0x13e),_0x46c521(0x141)+_0x1de85a+'\x22.');}if(_0x1bd98a===_0x46c521(0x169)&&Object['keys'](_0x2815ec)[_0x46c521(0x15a)]===0x0)throw notificationError(_0x46c521(0x155),'Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x40a946={};if(hasOwn(_0x2815ec,_0x46c521(0x11d)))_0x40a946[_0x46c521(0x11d)]=validateRequiredString(_0x2815ec[_0x46c521(0x11d)],'configName',0x80);else{if(_0x1bd98a==='create')throw notificationError(_0x46c521(0x152),_0x46c521(0x10b)+_0x46c521(0x137));}if(hasOwn(_0x2815ec,_0x46c521(0x12a))){if(typeof _0x2815ec[_0x46c521(0x12a)]!==_0x46c521(0x131))throw invalidFieldType(_0x46c521(0x12a),'a\x20supported\x20string');const _0x591ca3=_0x2815ec[_0x46c521(0x12a)][_0x46c521(0x158)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x591ca3))throw notificationError(_0x46c521(0x113),_0x46c521(0x117),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x46c521(0x162)](',\x20')+'.');_0x40a946[_0x46c521(0x12a)]=_0x591ca3;}else{if(_0x1bd98a===_0x46c521(0xfb))throw notificationError(_0x46c521(0x152),_0x46c521(0x10b)+_0x46c521(0x112));}for(const [_0x1ba1e3,_0x1d92de]of[[_0x46c521(0xed),0x200],[_0x46c521(0x16a),0x100]]){if(!hasOwn(_0x2815ec,_0x1ba1e3))continue;const _0x59a1b4=_0x2815ec[_0x1ba1e3];if(_0x59a1b4!==null&&typeof _0x59a1b4!==_0x46c521(0x131))throw invalidFieldType(_0x1ba1e3,_0x46c521(0x13f));if(typeof _0x59a1b4==='string'&&_0x59a1b4[_0x46c521(0x15a)]>_0x1d92de)throw notificationError(_0x46c521(0x113),'Notification\x20JSON\x20field\x20\x22'+_0x1ba1e3+_0x46c521(0x132)+_0x1d92de+_0x46c521(0xff));_0x40a946[_0x1ba1e3]=_0x59a1b4;}if(hasOwn(_0x2815ec,_0x46c521(0x139))){const _0xa48b1c=_0x2815ec[_0x46c521(0x139)];if(_0xa48b1c===null&&_0x1bd98a==='create')throw invalidFieldType(_0x46c521(0x139),_0x46c521(0x148));if(_0xa48b1c!==null&&!isJsonObject(_0xa48b1c))throw invalidFieldType(_0x46c521(0x139),_0x1bd98a==='update'?_0x46c521(0x15c):_0x46c521(0x148));_0xa48b1c!==null&&validateChannelConfigFields(_0x40a946[_0x46c521(0x12a)],_0xa48b1c),_0x40a946[_0x46c521(0x139)]=_0xa48b1c;}for(const _0x4ccbc2 of['connectTimeout',_0x46c521(0x10e)]){if(!hasOwn(_0x2815ec,_0x4ccbc2))continue;const _0xa12fe4=_0x2815ec[_0x4ccbc2];if(_0xa12fe4!==null&&(!Number['isSafeInteger'](_0xa12fe4)||_0xa12fe4<0x0))throw notificationError(_0x46c521(0x113),_0x46c521(0x133)+_0x4ccbc2+_0x46c521(0x157));_0x40a946[_0x4ccbc2]=_0xa12fe4;}return _0x40a946;}function validateRequiredString(_0x15ef49,_0xde43b6,_0x555108){const _0x461468=a171_0x14e415;if(typeof _0x15ef49!==_0x461468(0x131))throw invalidFieldType(_0xde43b6,_0x461468(0x100));const _0x3cd56f=_0x15ef49[_0x461468(0x158)]();if(!_0x3cd56f)throw notificationError(_0x461468(0x113),_0x461468(0x133)+_0xde43b6+_0x461468(0x106));if(_0x3cd56f[_0x461468(0x15a)]>_0x555108)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0xde43b6+_0x461468(0x132)+_0x555108+_0x461468(0xff));return _0x3cd56f;}function validateChannelConfigFields(_0xa27c3d,_0x59c9d3){const _0x22a984=a171_0x14e415;if(hasOwn(_0x59c9d3,'messageTemplate'))throw forbiddenChannelConfigField(_0x22a984(0x15f));if(_0xa27c3d===_0x22a984(0x15d))for(const _0x4549d1 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x59c9d3,_0x4549d1))throw forbiddenChannelConfigField(_0x4549d1);}}function forbiddenChannelConfigField(_0x4205f4){return notificationError('notification_config_channel_field_forbidden','Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x4205f4+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x33a7f0,_0x48a7af){const _0x4c4285=a171_0x14e415;return notificationError('notification_config_field_invalid',_0x4c4285(0x133)+_0x33a7f0+_0x4c4285(0x140)+_0x48a7af+'.');}function serializeChannelConfig(_0x375ba5){const _0x4c72a7=a171_0x14e415;return _0x375ba5===null||_0x375ba5===undefined?null:JSON[_0x4c72a7(0x14d)](_0x375ba5);}function redactSensitive(_0x1b6730){const _0x31ec52=a171_0x14e415;return _0x1b6730===null||_0x1b6730===undefined||_0x1b6730===''?null:_0x31ec52(0x13b);}function requireResponseString(_0x30ffca,_0x2d4cdd,_0x135fcc){const _0x16d523=a171_0x14e415;if(typeof _0x30ffca!==_0x16d523(0x131)||_0x30ffca[_0x16d523(0x158)]()==='')throw CliErrors[_0x16d523(0xfe)](_0x16d523(0x142),'Item\x20'+(_0x135fcc+0x1)+_0x16d523(0x150)+_0x2d4cdd+'\x22.');return _0x30ffca[_0x16d523(0x158)]();}function requireExactString(_0x427f24,_0x4f3b27,_0x11f9c5){const _0x4bc41e=a171_0x14e415;if(typeof _0x427f24!==_0x4bc41e(0x131)||_0x427f24['trim']()==='')throw notificationError(_0x4bc41e(0xf7),_0x4bc41e(0x124)+_0x11f9c5+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x4f3b27+'\x22.');return _0x427f24[_0x4bc41e(0x158)]();}function a171_0x1ae6(_0x562f64,_0x389363){_0x562f64=_0x562f64-0xed;const _0x2e6be2=a171_0x2e6b();let _0x1ae6e5=_0x2e6be2[_0x562f64];return _0x1ae6e5;}function responseNullableString(_0x82180a,_0x477d5a,_0x157eb7){const _0x93b89c=a171_0x14e415;if(_0x82180a===undefined||_0x82180a===null)return null;if(typeof _0x82180a!==_0x93b89c(0x131))throw notificationError(_0x93b89c(0xf7),_0x93b89c(0x124)+_0x157eb7+'\x20has\x20invalid\x20field\x20\x22'+_0x477d5a+'\x22.');return _0x82180a;}function responseNullableTimeout(_0x23019a,_0x586840,_0x7e5145){const _0x58c81f=a171_0x14e415;if(_0x23019a===undefined||_0x23019a===null)return null;if(!Number['isSafeInteger'](_0x23019a)||_0x23019a<0x0)throw notificationError(_0x58c81f(0xf7),_0x58c81f(0x124)+_0x7e5145+_0x58c81f(0xef)+_0x586840+'\x22.');return _0x23019a;}function normalizeNullableString(_0x207826){const _0x4ba658=a171_0x14e415;return typeof _0x207826===_0x4ba658(0x131)?_0x207826:null;}function isJsonObject(_0x128da7){return _0x128da7!==null&&typeof _0x128da7==='object'&&!Array['isArray'](_0x128da7);}function hasOwn(_0x5e46fd,_0x1d639e){const _0x4f6bb8=a171_0x14e415;return Object['prototype'][_0x4f6bb8(0x134)]['call'](_0x5e46fd,_0x1d639e);}async function readStdin(){const _0x40b86c=a171_0x14e415;let _0x352209='';process['stdin'][_0x40b86c(0x15b)](_0x40b86c(0xfc));for await(const _0x1ebb1f of process[_0x40b86c(0x102)])_0x352209+=_0x1ebb1f;return _0x352209;}
@@ -1 +1 @@
1
- const a158_0x49ddc7=a158_0x592f;(function(_0x3397b4,_0x34d9ee){const _0x2c6cc=a158_0x592f,_0xf7db4c=_0x3397b4();while(!![]){try{const _0x5515f4=-parseInt(_0x2c6cc(0x1d1))/0x1*(-parseInt(_0x2c6cc(0x1d0))/0x2)+parseInt(_0x2c6cc(0x1f0))/0x3+-parseInt(_0x2c6cc(0x1d3))/0x4*(parseInt(_0x2c6cc(0x1d4))/0x5)+parseInt(_0x2c6cc(0x1c1))/0x6+parseInt(_0x2c6cc(0x1c7))/0x7*(-parseInt(_0x2c6cc(0x1f1))/0x8)+-parseInt(_0x2c6cc(0x1da))/0x9+parseInt(_0x2c6cc(0x1df))/0xa;if(_0x5515f4===_0x34d9ee)break;else _0xf7db4c['push'](_0xf7db4c['shift']());}catch(_0x57737e){_0xf7db4c['push'](_0xf7db4c['shift']());}}}(a158_0x1be4,0x88a5e));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a158_0x592f(_0x3b8853,_0x4f3e64){_0x3b8853=_0x3b8853-0x1bd;const _0x1be421=a158_0x1be4();let _0x592f6a=_0x1be421[_0x3b8853];return _0x592f6a;}import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a158_0x49ddc7(0x1be),a158_0x49ddc7(0x1c0),a158_0x49ddc7(0x1cd),a158_0x49ddc7(0x1c4)],SCENE_TO_LEGACY_TYPE={'invoice':a158_0x49ddc7(0x1cb),'general':a158_0x49ddc7(0x1c9),'form':'Table','idCard':a158_0x49ddc7(0x1e6)},SCENE_FLAG={'name':a158_0x49ddc7(0x1e5),'type':a158_0x49ddc7(0x1ec),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a158_0x49ddc7(0x1d7)},IMAGE_FILE_FLAG={'name':a158_0x49ddc7(0x1db),'type':a158_0x49ddc7(0x1ec),'description':a158_0x49ddc7(0x1e4)},IMAGE_URL_FLAG={'name':a158_0x49ddc7(0x1dd),'type':a158_0x49ddc7(0x1ec),'description':a158_0x49ddc7(0x1e3)};function normalizeScene(_0x508df4){const _0x5403de=a158_0x49ddc7,_0x417b99=_0x508df4[_0x5403de(0x1c6)]()[_0x5403de(0x1ef)]();if(_0x417b99===_0x5403de(0x1e1))return'idCard';if(_0x417b99===_0x5403de(0x1be)||_0x417b99===_0x5403de(0x1c0)||_0x417b99==='form')return _0x417b99;throw CliErrors[_0x5403de(0x1cc)](_0x5403de(0x1bd)+_0x508df4+_0x5403de(0x1dc)+SUPPORTED_SCENES[_0x5403de(0x1ee)](',\x20'));}function a158_0x1be4(){const _0x410d2=['idcard','apiError','Publicly\x20accessible\x20image\x20or\x20file\x20URL','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','scene','IdCard','\x20OCR','/smartapi/common/uploadFile','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','toString','recognize','string','File\x20URL\x20response\x20missing\x20fileUrl.','join','toLowerCase','796929HWvaLf','8lkWiYC','/smartapi/ocr/recognize-text?','Unsupported\x20OCR\x20scene:\x20','invoice','appCode','general','5131656jZysGa','Preview:\x20recognize\x20','GET','idCard','fileName','trim','2000838HaKTuB','/smartapi/common/queryFileUrl','General','fileUrl','Invoice','validation','form','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','POST','8GbZzsh','76753XutMlp','path','4FiWeYH','3036065oeEcTO','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','filePath','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','str','imageUrl','122229vTYDTB','image-file','.\x20Supported\x20scenes:\x20','image-url','\x20OCR\x20from\x20URL','384070DQCAnh','imageFile'];a158_0x1be4=function(){return _0x410d2;};return a158_0x1be4();}function selectedInputs(_0x4e767a){const _0x214605=a158_0x49ddc7,_0x44dfb6=_0x4e767a['str'](_0x214605(0x1db))['trim'](),_0x12d921=_0x4e767a[_0x214605(0x1d8)]('image-url')['trim']();return{'imageFile':_0x44dfb6,'imageUrl':_0x12d921,'count':[_0x44dfb6,_0x12d921]['filter'](Boolean)['length']};}function validateInputSelection(_0x4ceb1a){const _0x546436=a158_0x49ddc7,_0x5d3b1d=selectedInputs(_0x4ceb1a);if(_0x5d3b1d['count']!==0x1)throw CliErrors[_0x546436(0x1cc)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x5d3b1d;}function withScene(_0x259f0a,_0x1fa70a,_0x339080){const _0x3ee604=a158_0x49ddc7;return{..._0x259f0a,'scene':_0x1fa70a,..._0x339080?{'sourceFile':{'fileName':_0x339080[_0x3ee604(0x1c5)],'filePath':_0x339080['filePath']}}:{}};}const ocrRecognize={'service':'ocr','command':a158_0x49ddc7(0x1eb),'description':a158_0x49ddc7(0x1e9),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3b0ab3){const _0x761f90=a158_0x49ddc7,_0x200566=normalizeScene(_0x3b0ab3['str']('scene')),_0x2d4b89=SCENE_TO_LEGACY_TYPE[_0x200566],_0x335d56=validateInputSelection(_0x3b0ab3);if(_0x335d56['imageUrl']){const _0x88f95c=new URLSearchParams({'url':_0x335d56['imageUrl'],'type':_0x2d4b89,'appCode':_0x3b0ab3[_0x761f90(0x1bf)]});return{'method':'GET','url':_0x761f90(0x1f2)+_0x88f95c[_0x761f90(0x1ea)](),'description':_0x761f90(0x1c2)+_0x200566+_0x761f90(0x1de)};}const _0x939bc8=requireDevelopmentUploadFile(_0x335d56[_0x761f90(0x1e0)],_0x761f90(0x1db));return{'method':'POST','url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x761f90(0x1cf),'url':_0x761f90(0x1e8),'body':{'appCode':_0x3b0ab3[_0x761f90(0x1bf)],'multipart':{'file':_0x939bc8}}},{'method':_0x761f90(0x1cf),'url':_0x761f90(0x1c8),'body':{'filePath':_0x761f90(0x1d5),'downloadFlag':![]}},{'method':_0x761f90(0x1c3),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x3b0ab3[_0x761f90(0x1bf)],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x2d4b89}}]},'description':_0x761f90(0x1ce)+_0x200566+_0x761f90(0x1e7)};},async 'execute'(_0x4becb8){const _0x555c2d=a158_0x49ddc7,_0xf9049c=normalizeScene(_0x4becb8[_0x555c2d(0x1d8)]('scene')),_0x5e0fb5=SCENE_TO_LEGACY_TYPE[_0xf9049c],_0x20003c=validateInputSelection(_0x4becb8);if(_0x20003c[_0x555c2d(0x1d9)]){const _0x3dbac2=await recognizeDevelopmentOcr(_0x4becb8[_0x555c2d(0x1bf)],{'url':_0x20003c[_0x555c2d(0x1d9)],'type':_0x5e0fb5});return{'ok':!![],'data':withScene(_0x3dbac2,_0xf9049c)};}const _0x5f42ab=requireDevelopmentUploadFile(_0x20003c[_0x555c2d(0x1e0)],_0x555c2d(0x1db)),_0x467df1=await uploadDevelopmentFile(_0x4becb8[_0x555c2d(0x1bf)],_0x5f42ab[_0x555c2d(0x1d2)]);if(!_0x467df1[_0x555c2d(0x1d6)])throw CliErrors[_0x555c2d(0x1e2)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x4c27d2=await queryDevelopmentFileUrl(_0x467df1[_0x555c2d(0x1d6)],{'download':![]});if(!_0x4c27d2[_0x555c2d(0x1ca)])throw CliErrors[_0x555c2d(0x1e2)](_0x555c2d(0x1ed));const _0x4a25cf=await recognizeDevelopmentOcr(_0x4becb8[_0x555c2d(0x1bf)],{'url':_0x4c27d2[_0x555c2d(0x1ca)],'type':_0x5e0fb5});return{'ok':!![],'data':withScene(_0x4a25cf,_0xf9049c,_0x467df1)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a172_0x535dca=a172_0x11b4;(function(_0xd38d92,_0x125e10){const _0x5ed806=a172_0x11b4,_0x55e2c4=_0xd38d92();while(!![]){try{const _0x2424c5=-parseInt(_0x5ed806(0x21b))/0x1*(parseInt(_0x5ed806(0x1f1))/0x2)+-parseInt(_0x5ed806(0x20c))/0x3*(-parseInt(_0x5ed806(0x20e))/0x4)+-parseInt(_0x5ed806(0x1f2))/0x5*(-parseInt(_0x5ed806(0x207))/0x6)+parseInt(_0x5ed806(0x1f0))/0x7*(-parseInt(_0x5ed806(0x200))/0x8)+-parseInt(_0x5ed806(0x20a))/0x9*(parseInt(_0x5ed806(0x210))/0xa)+parseInt(_0x5ed806(0x214))/0xb+-parseInt(_0x5ed806(0x21e))/0xc*(-parseInt(_0x5ed806(0x209))/0xd);if(_0x2424c5===_0x125e10)break;else _0x55e2c4['push'](_0x55e2c4['shift']());}catch(_0x123a66){_0x55e2c4['push'](_0x55e2c4['shift']());}}}(a172_0x3d0a,0xb2e76));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a172_0x11b4(_0x3d4c19,_0x542330){_0x3d4c19=_0x3d4c19-0x1e9;const _0x3d0aa8=a172_0x3d0a();let _0x11b432=_0x3d0aa8[_0x3d4c19];return _0x11b432;}import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a172_0x535dca(0x21d),a172_0x535dca(0x1f8),a172_0x535dca(0x1f4),a172_0x535dca(0x221)],SCENE_TO_LEGACY_TYPE={'invoice':a172_0x535dca(0x1fb),'general':'General','form':a172_0x535dca(0x1f5),'idCard':a172_0x535dca(0x20d)},SCENE_FLAG={'name':a172_0x535dca(0x1ed),'type':a172_0x535dca(0x216),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a172_0x535dca(0x1f6)},IMAGE_FILE_FLAG={'name':a172_0x535dca(0x1ef),'type':'string','description':a172_0x535dca(0x1f7)},IMAGE_URL_FLAG={'name':a172_0x535dca(0x1fa),'type':a172_0x535dca(0x216),'description':a172_0x535dca(0x1fd)};function normalizeScene(_0x34e502){const _0x1bb01e=a172_0x535dca,_0xedd0c7=_0x34e502['trim']()[_0x1bb01e(0x1fe)]();if(_0xedd0c7===_0x1bb01e(0x201))return _0x1bb01e(0x221);if(_0xedd0c7===_0x1bb01e(0x21d)||_0xedd0c7===_0x1bb01e(0x1f8)||_0xedd0c7==='form')return _0xedd0c7;throw CliErrors[_0x1bb01e(0x208)]('Unsupported\x20OCR\x20scene:\x20'+_0x34e502+_0x1bb01e(0x204)+SUPPORTED_SCENES[_0x1bb01e(0x222)](',\x20'));}function selectedInputs(_0xbde60b){const _0x32afae=a172_0x535dca,_0x102321=_0xbde60b[_0x32afae(0x218)]('image-file')[_0x32afae(0x1ee)](),_0x3ffceb=_0xbde60b[_0x32afae(0x218)]('image-url')[_0x32afae(0x1ee)]();return{'imageFile':_0x102321,'imageUrl':_0x3ffceb,'count':[_0x102321,_0x3ffceb][_0x32afae(0x20f)](Boolean)['length']};}function validateInputSelection(_0x11c5e4){const _0x5f3a33=a172_0x535dca,_0x119800=selectedInputs(_0x11c5e4);if(_0x119800[_0x5f3a33(0x1f3)]!==0x1)throw CliErrors[_0x5f3a33(0x208)](_0x5f3a33(0x223));return _0x119800;}function withScene(_0x1c042a,_0xf783f6,_0x114adf){const _0xb3ae44=a172_0x535dca;return{..._0x1c042a,'scene':_0xf783f6,..._0x114adf?{'sourceFile':{'fileName':_0x114adf['fileName'],'filePath':_0x114adf[_0xb3ae44(0x1ea)]}}:{}};}const ocrRecognize={'service':a172_0x535dca(0x202),'command':'recognize','description':a172_0x535dca(0x21f),'risk':a172_0x535dca(0x21c),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x5e0f2b){const _0x15265f=a172_0x535dca,_0xbc8f49=normalizeScene(_0x5e0f2b[_0x15265f(0x218)](_0x15265f(0x1ed))),_0x2708b9=SCENE_TO_LEGACY_TYPE[_0xbc8f49],_0x5d20a6=validateInputSelection(_0x5e0f2b);if(_0x5d20a6['imageUrl']){const _0x37effe=new URLSearchParams({'url':_0x5d20a6['imageUrl'],'type':_0x2708b9,'appCode':_0x5e0f2b[_0x15265f(0x220)]});return{'method':_0x15265f(0x1fc),'url':_0x15265f(0x1e9)+_0x37effe[_0x15265f(0x211)](),'description':_0x15265f(0x1eb)+_0xbc8f49+_0x15265f(0x1f9)};}const _0x4c0cd3=requireDevelopmentUploadFile(_0x5d20a6[_0x15265f(0x1ff)],_0x15265f(0x1ef));return{'method':_0x15265f(0x20b),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x15265f(0x20b),'url':_0x15265f(0x215),'body':{'appCode':_0x5e0f2b[_0x15265f(0x220)],'multipart':{'file':_0x4c0cd3}}},{'method':_0x15265f(0x20b),'url':_0x15265f(0x217),'body':{'filePath':_0x15265f(0x21a),'downloadFlag':![]}},{'method':_0x15265f(0x1fc),'url':_0x15265f(0x219),'query':{'appCode':_0x5e0f2b[_0x15265f(0x220)],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x2708b9}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0xbc8f49+_0x15265f(0x212)};},async 'execute'(_0x1e4262){const _0x1aa6d7=a172_0x535dca,_0x587e42=normalizeScene(_0x1e4262[_0x1aa6d7(0x218)](_0x1aa6d7(0x1ed))),_0x23d1fd=SCENE_TO_LEGACY_TYPE[_0x587e42],_0x37c74c=validateInputSelection(_0x1e4262);if(_0x37c74c[_0x1aa6d7(0x205)]){const _0x5b373d=await recognizeDevelopmentOcr(_0x1e4262[_0x1aa6d7(0x220)],{'url':_0x37c74c[_0x1aa6d7(0x205)],'type':_0x23d1fd});return{'ok':!![],'data':withScene(_0x5b373d,_0x587e42)};}const _0x61a7f3=requireDevelopmentUploadFile(_0x37c74c[_0x1aa6d7(0x1ff)],_0x1aa6d7(0x1ef)),_0x5d0d2c=await uploadDevelopmentFile(_0x1e4262[_0x1aa6d7(0x220)],_0x61a7f3[_0x1aa6d7(0x213)]);if(!_0x5d0d2c[_0x1aa6d7(0x1ea)])throw CliErrors[_0x1aa6d7(0x203)](_0x1aa6d7(0x206));const _0x421c53=await queryDevelopmentFileUrl(_0x5d0d2c[_0x1aa6d7(0x1ea)],{'download':![]});if(!_0x421c53[_0x1aa6d7(0x1ec)])throw CliErrors[_0x1aa6d7(0x203)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x5ef935=await recognizeDevelopmentOcr(_0x1e4262['appCode'],{'url':_0x421c53[_0x1aa6d7(0x1ec)],'type':_0x23d1fd});return{'ok':!![],'data':withScene(_0x5ef935,_0x587e42,_0x5d0d2c)};}};function a172_0x3d0a(){const _0xf3bd68=['toString','\x20OCR','path','8022289LrHInE','/smartapi/common/uploadFile','string','/smartapi/common/queryFileUrl','str','/smartapi/ocr/recognize-text','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','7sqNTyJ','read','invoice','199668KumfGu','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','appCode','idCard','join','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','/smartapi/ocr/recognize-text?','filePath','Preview:\x20recognize\x20','fileUrl','scene','trim','image-file','10235365StknjA','21252dSgBMk','122810adlZBW','count','form','Table','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','general','\x20OCR\x20from\x20URL','image-url','Invoice','GET','Publicly\x20accessible\x20image\x20or\x20file\x20URL','toLowerCase','imageFile','8fnCkrg','idcard','ocr','apiError','.\x20Supported\x20scenes:\x20','imageUrl','File\x20upload\x20response\x20missing\x20filePath.','186yQWBph','validation','403wUXXkC','9QrxTMT','POST','26739dRUOOh','IdCard','284BNQILv','filter','3699860IDHadt'];a172_0x3d0a=function(){return _0xf3bd68;};return a172_0x3d0a();}export const ocrDefinitions=[ocrRecognize];