@lovrabet/rabetbase-cli 2.5.5 → 2.5.6

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 (398) hide show
  1. package/README.md +15 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/api-group.js +1 -1
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.js +1 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/api/legacy-api-file.js +1 -1
  8. package/lib/api/model-registry-file.js +1 -1
  9. package/lib/api/model-registry-scaffold.js +1 -1
  10. package/lib/api/model-source.js +1 -1
  11. package/lib/auth/auth-server-ui.js +1 -1
  12. package/lib/auth/auth-server.js +1 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.js +1 -1
  16. package/lib/auth/is-session-valid.js +1 -1
  17. package/lib/auth/login-success-html.js +1 -1
  18. package/lib/auth/logout.js +1 -1
  19. package/lib/cli-flags.js +1 -1
  20. package/lib/cli.js +1 -1
  21. package/lib/commands/api/generate.js +1 -1
  22. package/lib/commands/api/index.js +1 -1
  23. package/lib/commands/api/list.js +1 -1
  24. package/lib/commands/api/pull.js +1 -1
  25. package/lib/commands/api/shared.js +1 -1
  26. package/lib/commands/app/detail.js +1 -1
  27. package/lib/commands/app/index.js +1 -1
  28. package/lib/commands/app/list.js +1 -1
  29. package/lib/commands/app/members-list.js +1 -1
  30. package/lib/commands/app/remote-directory.js +1 -1
  31. package/lib/commands/app/shared.js +1 -1
  32. package/lib/commands/app-config/delete.js +1 -1
  33. package/lib/commands/app-config/get.js +1 -1
  34. package/lib/commands/app-config/index.js +1 -1
  35. package/lib/commands/app-config/list.js +1 -1
  36. package/lib/commands/app-config/set.js +1 -1
  37. package/lib/commands/app-config/shared.js +1 -1
  38. package/lib/commands/auth/index.js +1 -1
  39. package/lib/commands/bff/create.js +1 -1
  40. package/lib/commands/bff/delete.js +1 -1
  41. package/lib/commands/bff/detail.js +1 -1
  42. package/lib/commands/bff/index.js +1 -1
  43. package/lib/commands/bff/list.js +1 -1
  44. package/lib/commands/bff/logs.js +1 -1
  45. package/lib/commands/bff/pull.js +1 -1
  46. package/lib/commands/bff/push.js +1 -1
  47. package/lib/commands/bff/status.js +1 -1
  48. package/lib/commands/cli-skill/index.js +1 -1
  49. package/lib/commands/cli-update.js +1 -1
  50. package/lib/commands/codegen/index.js +1 -1
  51. package/lib/commands/codegen/sdk.js +1 -1
  52. package/lib/commands/codegen/sql.js +1 -1
  53. package/lib/commands/common/app-registry.js +1 -1
  54. package/lib/commands/common/app-selector.js +1 -1
  55. package/lib/commands/common/async-task.js +1 -1
  56. package/lib/commands/common/dry-run.js +1 -1
  57. package/lib/commands/common/flags.js +1 -1
  58. package/lib/commands/common/local-file.js +1 -1
  59. package/lib/commands/common/validate.js +1 -1
  60. package/lib/commands/config/delete.js +1 -1
  61. package/lib/commands/config/get.js +1 -1
  62. package/lib/commands/config/index.js +1 -1
  63. package/lib/commands/config/init.js +1 -1
  64. package/lib/commands/config/list.js +1 -1
  65. package/lib/commands/config/set.js +1 -1
  66. package/lib/commands/config/shared.js +1 -1
  67. package/lib/commands/dataset/batch-design.js +1 -1
  68. package/lib/commands/dataset/business-group-update.js +1 -1
  69. package/lib/commands/dataset/business-groups.js +1 -1
  70. package/lib/commands/dataset/capability.js +1 -1
  71. package/lib/commands/dataset/cross-relation-create.js +1 -1
  72. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  73. package/lib/commands/dataset/cross-relation-list.js +1 -1
  74. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  75. package/lib/commands/dataset/cross-relation-update.js +1 -1
  76. package/lib/commands/dataset/delete.js +1 -1
  77. package/lib/commands/dataset/design-context.d.ts +1 -0
  78. package/lib/commands/dataset/design-context.js +1 -0
  79. package/lib/commands/dataset/design-start.d.ts +1 -0
  80. package/lib/commands/dataset/design-start.js +1 -0
  81. package/lib/commands/dataset/design-status.d.ts +1 -0
  82. package/lib/commands/dataset/design-status.js +1 -0
  83. package/lib/commands/dataset/design-sync-retry.d.ts +1 -0
  84. package/lib/commands/dataset/design-sync-retry.js +1 -0
  85. package/lib/commands/dataset/design-sync-status.d.ts +1 -0
  86. package/lib/commands/dataset/design-sync-status.js +1 -0
  87. package/lib/commands/dataset/design-validate.d.ts +1 -0
  88. package/lib/commands/dataset/design-validate.js +1 -0
  89. package/lib/commands/dataset/detail.js +1 -1
  90. package/lib/commands/dataset/extend-update.js +1 -1
  91. package/lib/commands/dataset/field-restore.js +1 -1
  92. package/lib/commands/dataset/field-update.js +1 -1
  93. package/lib/commands/dataset/generate.js +1 -1
  94. package/lib/commands/dataset/index.js +1 -1
  95. package/lib/commands/dataset/list.js +1 -1
  96. package/lib/commands/dataset/operations.js +1 -1
  97. package/lib/commands/dataset/relation-audit.js +1 -1
  98. package/lib/commands/dataset/relation-create.js +1 -1
  99. package/lib/commands/dataset/relation-delete.js +1 -1
  100. package/lib/commands/dataset/relation-shared.js +1 -1
  101. package/lib/commands/dataset/relation-update.js +1 -1
  102. package/lib/commands/dataset/relations.js +1 -1
  103. package/lib/commands/dataset/rename.js +1 -1
  104. package/lib/commands/dataset/restore.js +1 -1
  105. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  106. package/lib/commands/db/analysis-batching.js +1 -1
  107. package/lib/commands/db/analyze-batch-plan.js +1 -1
  108. package/lib/commands/db/analyze-cancel.js +1 -1
  109. package/lib/commands/db/analyze-start.js +1 -1
  110. package/lib/commands/db/analyze-status.js +1 -1
  111. package/lib/commands/db/create.js +1 -1
  112. package/lib/commands/db/cross-db-analysis-shared.d.ts +40 -0
  113. package/lib/commands/db/cross-db-analysis-shared.js +1 -0
  114. package/lib/commands/db/cross-db-analyze-latest.d.ts +2 -0
  115. package/lib/commands/db/cross-db-analyze-latest.js +1 -0
  116. package/lib/commands/db/cross-db-analyze-start.d.ts +2 -0
  117. package/lib/commands/db/cross-db-analyze-start.js +1 -0
  118. package/lib/commands/db/cross-db-analyze-status.d.ts +2 -0
  119. package/lib/commands/db/cross-db-analyze-status.js +1 -0
  120. package/lib/commands/db/delete.js +1 -1
  121. package/lib/commands/db/detail.js +1 -1
  122. package/lib/commands/db/diff-refresh-start.js +1 -1
  123. package/lib/commands/db/diff-refresh-status.js +1 -1
  124. package/lib/commands/db/diff.js +1 -1
  125. package/lib/commands/db/index.js +1 -1
  126. package/lib/commands/db/list.js +1 -1
  127. package/lib/commands/db/shared.js +1 -1
  128. package/lib/commands/db/table-diff-shared.js +1 -1
  129. package/lib/commands/db/tables.js +1 -1
  130. package/lib/commands/db/test.js +1 -1
  131. package/lib/commands/db/update.js +1 -1
  132. package/lib/commands/deployment/index.js +1 -1
  133. package/lib/commands/deployment/sync-all.js +1 -1
  134. package/lib/commands/deployment/sync-jobs.js +1 -1
  135. package/lib/commands/deployment/sync-status.js +1 -1
  136. package/lib/commands/doctor.js +1 -1
  137. package/lib/commands/file/index.js +1 -1
  138. package/lib/commands/flow/create.js +1 -1
  139. package/lib/commands/flow/detail.js +1 -1
  140. package/lib/commands/flow/index.js +1 -1
  141. package/lib/commands/flow/list.js +1 -1
  142. package/lib/commands/flow/publish.js +1 -1
  143. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  144. package/lib/commands/flow/runtime-role-list.js +1 -1
  145. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  146. package/lib/commands/flow/runtime-user-search.js +1 -1
  147. package/lib/commands/flow/shared.js +1 -1
  148. package/lib/commands/flow/update.js +1 -1
  149. package/lib/commands/flow/validate.js +1 -1
  150. package/lib/commands/instant-api-policy/current.js +1 -1
  151. package/lib/commands/instant-api-policy/index.js +1 -1
  152. package/lib/commands/instant-api-policy/init.js +1 -1
  153. package/lib/commands/instant-api-policy/publish.js +1 -1
  154. package/lib/commands/instant-api-policy/pull.js +1 -1
  155. package/lib/commands/instant-api-policy/revision.js +1 -1
  156. package/lib/commands/instant-api-policy/revisions.js +1 -1
  157. package/lib/commands/instant-api-policy/rollback.js +1 -1
  158. package/lib/commands/instant-api-policy/shared.js +1 -1
  159. package/lib/commands/instant-api-policy/validate.js +1 -1
  160. package/lib/commands/issue/index.js +1 -1
  161. package/lib/commands/issue/nudge.js +1 -1
  162. package/lib/commands/issue/report.js +1 -1
  163. package/lib/commands/issue/shared.js +1 -1
  164. package/lib/commands/kb/create.js +1 -1
  165. package/lib/commands/kb/delete.js +1 -1
  166. package/lib/commands/kb/detail.js +1 -1
  167. package/lib/commands/kb/index.js +1 -1
  168. package/lib/commands/kb/list.js +1 -1
  169. package/lib/commands/kb/search.js +1 -1
  170. package/lib/commands/kb/shared.js +1 -1
  171. package/lib/commands/kb/update.js +1 -1
  172. package/lib/commands/logs/index.js +1 -1
  173. package/lib/commands/menu/asset-update.js +1 -1
  174. package/lib/commands/menu/delete.js +1 -1
  175. package/lib/commands/menu/external-link-create.js +1 -1
  176. package/lib/commands/menu/external-link-update.js +1 -1
  177. package/lib/commands/menu/group-create.js +1 -1
  178. package/lib/commands/menu/group-update.js +1 -1
  179. package/lib/commands/menu/index.js +1 -1
  180. package/lib/commands/menu/list.js +1 -1
  181. package/lib/commands/menu/move.js +1 -1
  182. package/lib/commands/menu/regroup-start.js +1 -1
  183. package/lib/commands/menu/rename.js +1 -1
  184. package/lib/commands/menu/shared/compare-table.js +1 -1
  185. package/lib/commands/menu/shared/delete-plan.js +1 -1
  186. package/lib/commands/menu/shared/facts.js +1 -1
  187. package/lib/commands/menu/shared/index.js +1 -1
  188. package/lib/commands/menu/shared/inquirer.js +1 -1
  189. package/lib/commands/menu/shared/local-pages.js +1 -1
  190. package/lib/commands/menu/shared/logic.js +1 -1
  191. package/lib/commands/menu/shared/mutations.js +1 -1
  192. package/lib/commands/menu/shared/path.js +1 -1
  193. package/lib/commands/menu/shared/service.js +1 -1
  194. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  195. package/lib/commands/menu/shared/sync-core.js +1 -1
  196. package/lib/commands/menu/shared/update-core.js +1 -1
  197. package/lib/commands/menu/shared/valid-url.js +1 -1
  198. package/lib/commands/menu/subapp-assets-status.js +1 -1
  199. package/lib/commands/menu/subapp-assets-update.js +1 -1
  200. package/lib/commands/menu/sync.js +1 -1
  201. package/lib/commands/menu/visibility-update.js +1 -1
  202. package/lib/commands/notification/config-create.js +1 -1
  203. package/lib/commands/notification/config-delete.js +1 -1
  204. package/lib/commands/notification/config-list.js +1 -1
  205. package/lib/commands/notification/config-update.js +1 -1
  206. package/lib/commands/notification/index.js +1 -1
  207. package/lib/commands/notification/shared.js +1 -1
  208. package/lib/commands/ocr/index.js +1 -1
  209. package/lib/commands/page/create.js +1 -1
  210. package/lib/commands/page/custom/detail.js +1 -1
  211. package/lib/commands/page/custom/list.js +1 -1
  212. package/lib/commands/page/custom/publish.js +1 -1
  213. package/lib/commands/page/custom/shared.js +1 -1
  214. package/lib/commands/page/custom/syntax.js +1 -1
  215. package/lib/commands/page/custom/update.js +1 -1
  216. package/lib/commands/page/data-list-status.js +1 -1
  217. package/lib/commands/page/generate-start.js +1 -1
  218. package/lib/commands/page/generate-status.js +1 -1
  219. package/lib/commands/page/index.js +1 -1
  220. package/lib/commands/page/pull.js +1 -1
  221. package/lib/commands/page/push.js +1 -1
  222. package/lib/commands/page/relation-audit.js +1 -1
  223. package/lib/commands/page/restore.js +1 -1
  224. package/lib/commands/page/shared.js +1 -1
  225. package/lib/commands/page/sync.js +1 -1
  226. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  227. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  228. package/lib/commands/project/create/format-elapsed.js +1 -1
  229. package/lib/commands/project/create/main.js +1 -1
  230. package/lib/commands/project/create/materialize-project-template.js +1 -1
  231. package/lib/commands/project/create/project-name.js +1 -1
  232. package/lib/commands/project/create/project-template-archive.js +1 -1
  233. package/lib/commands/project/create/project-template-path.js +1 -1
  234. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  235. package/lib/commands/project/create/use-format-code.js +1 -1
  236. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  237. package/lib/commands/project/domain-routing-sync.js +1 -1
  238. package/lib/commands/project/index.js +1 -1
  239. package/lib/commands/project/upgrade.js +1 -1
  240. package/lib/commands/registry.js +1 -1
  241. package/lib/commands/role/delete.js +1 -1
  242. package/lib/commands/role/detail.js +1 -1
  243. package/lib/commands/role/index.js +1 -1
  244. package/lib/commands/role/list.js +1 -1
  245. package/lib/commands/role/shared.js +1 -1
  246. package/lib/commands/role/update.js +1 -1
  247. package/lib/commands/role/user-add.js +1 -1
  248. package/lib/commands/role/user-remove.js +1 -1
  249. package/lib/commands/role/user-resolve.js +1 -1
  250. package/lib/commands/rule/get.js +1 -1
  251. package/lib/commands/rule/index.js +1 -1
  252. package/lib/commands/rule/list.js +1 -1
  253. package/lib/commands/rule/set.js +1 -1
  254. package/lib/commands/rule/shared.js +1 -1
  255. package/lib/commands/run/index.js +1 -1
  256. package/lib/commands/schema.js +1 -1
  257. package/lib/commands/sql/create.js +1 -1
  258. package/lib/commands/sql/delete.js +1 -1
  259. package/lib/commands/sql/detail.js +1 -1
  260. package/lib/commands/sql/exec.js +1 -1
  261. package/lib/commands/sql/index.js +1 -1
  262. package/lib/commands/sql/list.js +1 -1
  263. package/lib/commands/sql/pull.js +1 -1
  264. package/lib/commands/sql/push.js +1 -1
  265. package/lib/commands/sql/shared.js +1 -1
  266. package/lib/commands/sql/status.js +1 -1
  267. package/lib/commands/sql/validate.js +1 -1
  268. package/lib/commands/task/index.js +1 -1
  269. package/lib/commands/task/status.js +1 -1
  270. package/lib/commands/tenant/index.js +1 -1
  271. package/lib/commands/tenant/members-list.js +1 -1
  272. package/lib/commands/tenant/shared.js +1 -1
  273. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  274. package/lib/commands/user-account/feishu-bind.js +1 -1
  275. package/lib/commands/user-account/index.js +1 -1
  276. package/lib/commands/workspace/add.js +1 -1
  277. package/lib/commands/workspace/index.js +1 -1
  278. package/lib/commands/workspace/remove.js +1 -1
  279. package/lib/config/domain-config.js +1 -1
  280. package/lib/config/project-domain-routing.js +1 -1
  281. package/lib/config/region-config.js +1 -1
  282. package/lib/config/schema.js +1 -1
  283. package/lib/constant/cdn.js +1 -1
  284. package/lib/constant/cli.js +1 -1
  285. package/lib/constant/defaults.js +1 -1
  286. package/lib/constant/domain.js +1 -1
  287. package/lib/constant/env.js +1 -1
  288. package/lib/constant/output.js +1 -1
  289. package/lib/constant/paths.js +1 -1
  290. package/lib/constant/region.js +1 -1
  291. package/lib/constant/risk.js +1 -1
  292. package/lib/constant/routing-profile.js +1 -1
  293. package/lib/context/app-resolver.js +1 -1
  294. package/lib/context/auth-resolver.js +1 -1
  295. package/lib/context/config-loader.js +1 -1
  296. package/lib/context.js +1 -1
  297. package/lib/core/alias-resolver.js +1 -1
  298. package/lib/core/api-client.d.ts +18 -0
  299. package/lib/core/api-client.js +1 -1
  300. package/lib/core/bff/config.js +1 -1
  301. package/lib/core/bff/file-system.js +1 -1
  302. package/lib/core/bff/hash.js +1 -1
  303. package/lib/core/bff/hook-directory.js +1 -1
  304. package/lib/core/bff/lock.js +1 -1
  305. package/lib/core/bff/utils.js +1 -1
  306. package/lib/core/cross-db-analysis.d.ts +17 -0
  307. package/lib/core/cross-db-analysis.js +1 -0
  308. package/lib/core/cross-db-relation.js +1 -1
  309. package/lib/core/db-resolver.js +1 -1
  310. package/lib/core/flow-config.js +1 -1
  311. package/lib/core/instant-api-policy/config.js +1 -1
  312. package/lib/core/kb-search-client.js +1 -1
  313. package/lib/core/page/file-system.js +1 -1
  314. package/lib/core/page/hash.js +1 -1
  315. package/lib/core/page/lock.js +1 -1
  316. package/lib/core/page/lr-smart-jsx.js +1 -1
  317. package/lib/core/sql-index-auditor.js +1 -1
  318. package/lib/core/sql-sync/config.js +1 -1
  319. package/lib/core/sql-sync/file-system.js +1 -1
  320. package/lib/core/sql-sync/hash.js +1 -1
  321. package/lib/core/sql-sync/lock.js +1 -1
  322. package/lib/core/sql-sync/utils.js +1 -1
  323. package/lib/core/sql-validator.js +1 -1
  324. package/lib/errors.js +1 -1
  325. package/lib/framework/build-all-flags.js +1 -1
  326. package/lib/framework/error-output.js +1 -1
  327. package/lib/framework/explicit-yes.js +1 -1
  328. package/lib/framework/flags.js +1 -1
  329. package/lib/framework/help.js +1 -1
  330. package/lib/framework/index.js +1 -1
  331. package/lib/framework/output.js +1 -1
  332. package/lib/framework/response.js +1 -1
  333. package/lib/framework/runner-alias.js +1 -1
  334. package/lib/framework/runner.js +1 -1
  335. package/lib/framework/schema-export.js +1 -1
  336. package/lib/framework/supported-flags.js +1 -1
  337. package/lib/framework/types.js +1 -1
  338. package/lib/generated/build-info.d.ts +4 -4
  339. package/lib/generated/build-info.js +1 -1
  340. package/lib/generated/official-routing.js +1 -1
  341. package/lib/generated/routing-contract.js +1 -1
  342. package/lib/help.js +1 -1
  343. package/lib/postinstall.js +1 -1
  344. package/lib/runtime/confirmation.js +1 -1
  345. package/lib/runtime/event.js +1 -1
  346. package/lib/runtime/index.js +1 -1
  347. package/lib/runtime/queue.js +1 -1
  348. package/lib/runtime/resolve.js +1 -1
  349. package/lib/services/dataset-design/checkpoint.d.ts +17 -0
  350. package/lib/services/dataset-design/checkpoint.js +1 -0
  351. package/lib/services/dataset-design/commands.d.ts +6 -0
  352. package/lib/services/dataset-design/commands.js +1 -0
  353. package/lib/services/dataset-design/contract.d.ts +7 -0
  354. package/lib/services/dataset-design/contract.js +1 -0
  355. package/lib/skills/builtin-skill.js +1 -1
  356. package/lib/skills/main.js +1 -1
  357. package/lib/skills/npx-skills-add.js +1 -1
  358. package/lib/skills/skill-presence.js +1 -1
  359. package/lib/telemetry/cli-command-trace.js +1 -1
  360. package/lib/telemetry/cli-help-trace.js +1 -1
  361. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  362. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  363. package/lib/telemetry/send-cli-trace-log.js +1 -1
  364. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  365. package/lib/utils/ai_config.js +1 -1
  366. package/lib/utils/apply-jq-filter.js +1 -1
  367. package/lib/utils/cdn-config.js +1 -1
  368. package/lib/utils/check-sdk-version.js +1 -1
  369. package/lib/utils/cli-version-check.js +1 -1
  370. package/lib/utils/cli-version-policy.js +1 -1
  371. package/lib/utils/config.js +1 -1
  372. package/lib/utils/entity-with-id.js +1 -1
  373. package/lib/utils/file-utils.js +1 -1
  374. package/lib/utils/guides-cdn.js +1 -1
  375. package/lib/utils/http-client.js +1 -1
  376. package/lib/utils/is-non-interactive.js +1 -1
  377. package/lib/utils/logger.js +1 -1
  378. package/lib/utils/params.js +1 -1
  379. package/lib/utils/platform.js +1 -1
  380. package/lib/utils/sleep.js +1 -1
  381. package/lib/utils/template-replacer.js +1 -1
  382. package/lib/utils/update-notice.js +1 -1
  383. package/lib/utils/version.js +1 -1
  384. package/lib/utils/with-active-cookie.js +1 -1
  385. package/lib/utils/write-cli-side-channel.js +1 -1
  386. package/package.json +3 -2
  387. package/skills/rabetbase/SKILL.md +9 -7
  388. package/skills/rabetbase/guides/database-connection-workflow.md +12 -3
  389. package/skills/rabetbase/guides/independent-deployment.md +10 -2
  390. package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +2 -0
  391. package/skills/rabetbase/references/rabetbase-dataset-design.md +25 -0
  392. package/skills/rabetbase/references/rabetbase-dataset-generate.md +2 -255
  393. package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -0
  394. package/skills/rabetbase/references/rabetbase-db-cross-analyze.md +78 -0
  395. package/skills/rabetbase-dataset-generation/SKILL.md +45 -0
  396. package/skills/rabetbase-dataset-generation/references/workflow.md +60 -0
  397. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  398. package/skills/rabetbase.manifest.json +5 -3
@@ -1 +1 @@
1
- const a180_0x3f40b6=a180_0x9012;(function(_0x5e69ad,_0x151d71){const _0x2d185c=a180_0x9012,_0x88e7cc=_0x5e69ad();while(!![]){try{const _0x5a0b70=-parseInt(_0x2d185c(0xf6))/0x1*(parseInt(_0x2d185c(0x13a))/0x2)+-parseInt(_0x2d185c(0x15d))/0x3*(-parseInt(_0x2d185c(0xe7))/0x4)+parseInt(_0x2d185c(0xed))/0x5+parseInt(_0x2d185c(0x129))/0x6+parseInt(_0x2d185c(0x122))/0x7*(parseInt(_0x2d185c(0x101))/0x8)+parseInt(_0x2d185c(0x10f))/0x9*(-parseInt(_0x2d185c(0xf1))/0xa)+-parseInt(_0x2d185c(0x105))/0xb;if(_0x5a0b70===_0x151d71)break;else _0x88e7cc['push'](_0x88e7cc['shift']());}catch(_0x217541){_0x88e7cc['push'](_0x88e7cc['shift']());}}}(a180_0x41f2,0x32015));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a180_0x3f40b6(0xf5),'path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a180_0x3f40b6(0x11e),'command':'visibility-update','description':a180_0x3f40b6(0x143),'risk':a180_0x3f40b6(0x135),'structuredErrors':!![],'flags':[{'name':a180_0x3f40b6(0x155),'type':a180_0x3f40b6(0x150),'description':a180_0x3f40b6(0xec)},{'name':a180_0x3f40b6(0xe5),'type':'string','description':a180_0x3f40b6(0x15b)},{'name':a180_0x3f40b6(0x132),'type':a180_0x3f40b6(0x100),'required':!![],'description':a180_0x3f40b6(0x156)},{'name':a180_0x3f40b6(0x102),'type':'boolean','description':a180_0x3f40b6(0x145)},{'name':a180_0x3f40b6(0x10b),'type':a180_0x3f40b6(0x113),'description':a180_0x3f40b6(0x13c)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x25ebb9){parseInput(_0x25ebb9);},async 'dryRun'(_0x3fb530){const _0x3bb5fa=a180_0x3f40b6,_0x3e7051=await buildPlan(_0x3fb530,!![]),_0x27dbfa=_0x3e7051[_0x3bb5fa(0x154)]['plannedActions']?.[_0x3bb5fa(0x12e)]??0x0,_0x494749=_0x3e7051[_0x3bb5fa(0x154)][_0x3bb5fa(0x106)]['length']-_0x27dbfa;return menuDryRunResult(_0x3e7051[_0x3bb5fa(0x154)],{'method':'POST','url':'/smartapi/menu/update','body':{'updates':_0x3e7051['plan'][_0x3bb5fa(0x153)]?.[_0x3bb5fa(0xea)](_0x47c5ce=>_0x47c5ce[_0x3bb5fa(0x160)])??[]},'description':_0x3bb5fa(0xe9)+_0x27dbfa+_0x3bb5fa(0xe3)+_0x494749+_0x3bb5fa(0x139)});},async 'execute'(_0x545b06){const _0x21449b=a180_0x3f40b6,_0x29a239=await buildPlan(_0x545b06,![]);await recheckMutationSnapshot(_0x545b06,_0x29a239[_0x21449b(0x154)],'update\x20menu\x20visibility');const _0x4981de=[],_0x2650b7=[],_0x49f3f0=[];for(const _0x3793dd of _0x29a239['plan'][_0x21449b(0x106)]){if(_0x3793dd[_0x21449b(0xe8)][_0x21449b(0x132)]===_0x29a239['plan'][_0x21449b(0x12b)]){_0x4981de['push']({'id':_0x3793dd['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x545b06[_0x21449b(0xf3)],_0x545b06['cookie'],{'id':_0x3793dd['id'],'visible':_0x29a239[_0x21449b(0x154)]['requestedVisible']}),_0x4981de[_0x21449b(0x108)]({'id':_0x3793dd['id'],'updated':!![],'skipped':![]});}catch(_0x311758){const _0x5490b5=mapMenuApiError(_0x311758,'update\x20visibility\x20for',_0x3793dd['id']);if(isMenuResponseLoss(_0x311758)&&_0x5490b5[_0x21449b(0x12a)]!==_0x21449b(0x149)){_0x49f3f0[_0x21449b(0x108)](_0x3793dd['id']);continue;}_0x2650b7[_0x21449b(0x108)]({'id':_0x3793dd['id'],'stage':_0x21449b(0x124),'code':_0x5490b5[_0x21449b(0x12a)],'message':_0x5490b5[_0x21449b(0x110)]});}}let _0x5d1c1d;try{_0x5d1c1d=await fetchMenuSnapshot(_0x545b06['appCode'],_0x545b06[_0x21449b(0x157)]);}catch(_0x4657d6){const _0x535ca5=describeMenuErrorCause(_0x4657d6,_0x21449b(0x14d)),_0x500263=_0x49f3f0[_0x21449b(0xea)](_0x114f4d=>({'id':_0x114f4d,'stage':_0x21449b(0x10d),'code':_0x21449b(0x142),'message':_0x21449b(0x117)+_0x114f4d+_0x21449b(0x121),'requestedStateConfirmed':![],'recovered':![]})),_0x2e9593={'stage':_0x21449b(0x14e),'code':_0x21449b(0x142),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x29a239[_0x21449b(0x154)][_0x21449b(0x106)][_0x21449b(0xea)](_0xe13289=>_0xe13289['id']),'requestedStateConfirmed':![],..._0x535ca5};throw menuFailure(asVerificationError(_0x4657d6,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x29a239[_0x21449b(0x154)],{'stage':_0x21449b(0x14e),'succeeded':_0x4981de,'failedRecords':[..._0x2650b7,..._0x500263,_0x2e9593],'warnings':[_0x21449b(0x159)],'verification':{'status':'failed','recoveredCount':0x0,'lookupCommand':_0x21449b(0x146)}});}const _0x557891=[];for(const _0x443cc0 of _0x4981de){const _0x4c6f6b=Number(_0x443cc0['id']),_0x449a94=_0x29a239['beforeById'][_0x21449b(0xfe)](_0x4c6f6b),_0x29b0ea=_0x5d1c1d['byId']['get'](_0x4c6f6b);try{verifyVisibilityUpdate(_0x449a94,_0x29b0ea,_0x29a239[_0x21449b(0x154)][_0x21449b(0x12b)]);}catch(_0x23247c){const _0x56d6e1=asVerificationError(_0x23247c,'Menu\x20'+_0x4c6f6b+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x557891[_0x21449b(0x108)]({'id':_0x4c6f6b,'stage':_0x21449b(0x14e),'code':_0x56d6e1['code'],'message':_0x56d6e1[_0x21449b(0x110)],'requestedStateConfirmed':![]});}}for(const _0x176ce5 of _0x49f3f0){const _0x3cf7b4=_0x29a239[_0x21449b(0xf2)][_0x21449b(0xfe)](_0x176ce5),_0x124653=_0x5d1c1d['byId'][_0x21449b(0xfe)](_0x176ce5);try{verifyVisibilityUpdate(_0x3cf7b4,_0x124653,_0x29a239['plan'][_0x21449b(0x12b)]),_0x4981de['push']({'id':_0x176ce5,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x505ad7){const _0x2459ff=asVerificationError(_0x505ad7,_0x21449b(0x15c)+_0x176ce5+_0x21449b(0x12c));_0x557891[_0x21449b(0x108)]({'id':_0x176ce5,'stage':_0x21449b(0x10d),'code':_0x2459ff['code'],'message':_0x2459ff['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x557891[_0x21449b(0x12e)]>0x0){const _0x259d95=_0x557891[_0x21449b(0xea)](_0xba0d4f=>Number(_0xba0d4f['id'])),_0x16e802=_0x4981de[_0x21449b(0x133)](_0x389403=>_0x389403[_0x21449b(0x13e)]===!![])[_0x21449b(0x12e)],_0x4d8f9a=menuError(_0x21449b(0x142),_0x21449b(0x15e)+_0x259d95[_0x21449b(0xfa)](',\x20')+'.',_0x21449b(0x104));throw menuFailure(_0x4d8f9a,_0x29a239[_0x21449b(0x154)],{'stage':_0x21449b(0x14e),'succeeded':_0x4981de,'failedRecords':[..._0x2650b7,..._0x557891],'warnings':[_0x21449b(0x112)],'verification':{'status':_0x21449b(0x128),..._0x259d95[_0x21449b(0x12e)]===0x1?{'targetId':_0x259d95[0x0]}:{'targetIds':_0x259d95},'recoveredCount':_0x16e802,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x507be6=_0x4981de[_0x21449b(0x133)](_0x1f7f1e=>_0x1f7f1e[_0x21449b(0x119)]===!![])[_0x21449b(0x12e)],_0x1c360a=_0x4981de['length']-_0x507be6,_0x59eb34={..._0x29a239[_0x21449b(0x154)],'succeeded':_0x4981de,'failed':_0x2650b7,'warnings':_0x2650b7[_0x21449b(0x12e)]>0x0?[..._0x29a239['plan'][_0x21449b(0xf7)],_0x21449b(0x127)]:_0x29a239[_0x21449b(0x154)][_0x21449b(0xf7)],'verification':{'checkedBy':_0x21449b(0x11f),'snapshotHash':_0x5d1c1d[_0x21449b(0xf0)],'matchesRequestedState':_0x2650b7[_0x21449b(0x12e)]===0x0,'recoveredCount':_0x49f3f0[_0x21449b(0x12e)]}};return{'ok':_0x2650b7[_0x21449b(0x12e)]===0x0,'data':_0x59eb34,'message':_0x2650b7[_0x21449b(0x12e)]===0x0?_0x21449b(0x15a)+_0x507be6+_0x21449b(0xe1)+_0x1c360a+_0x21449b(0x139):'Menu\x20visibility\x20update\x20completed:\x20'+_0x507be6+_0x21449b(0x134)+_0x1c360a+_0x21449b(0xfd)+_0x2650b7['length']+_0x21449b(0x136)};}};function parseInput(_0x4ebe6a){const _0x39da95=a180_0x3f40b6,_0x5bb6a0=parseMenuIds(_0x4ebe6a[_0x39da95(0x12d)]('menu-ids')),_0x1fd041=parseCsv(_0x4ebe6a[_0x39da95(0x12d)](_0x39da95(0xe5)));if(_0x5bb6a0[_0x39da95(0x12e)]===0x0&&_0x1fd041[_0x39da95(0x12e)]===0x0)throw CliErrors[_0x39da95(0xfb)](_0x39da95(0x10e));const _0x1f7df5=parseBooleanFlag(_0x4ebe6a,'visible',!![]),_0x33d0cd=parseBooleanFlag(_0x4ebe6a,_0x39da95(0x102),![]);let _0x45abbf;if(hasFlag(_0x4ebe6a,_0x39da95(0x10b))){_0x45abbf=_0x4ebe6a[_0x39da95(0x140)](_0x39da95(0x10b));if(!Number[_0x39da95(0x11a)](_0x45abbf)||_0x45abbf<0x0)throw CliErrors[_0x39da95(0xfb)](_0x39da95(0x14c));}return{'menuIds':_0x5bb6a0,'paths':_0x1fd041,'visible':_0x1f7df5,'expectVisible':_0x33d0cd,'expectedCount':_0x45abbf};}function a180_0x41f2(){const _0xe8cbde=['\x20unchanged\x20menu(s).','16oaARKT','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','has','recovered','update\x20menu\x20visibility','num','childrenIds','menu_verification_failed','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','resourcesValid','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','rabetbase\x20menu\x20list\x20--format\x20compress','datasetCode','Menu\x20','menu_permission_denied','menuIds','pageType','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','verify\x20menu\x20visibility\x20update','verification','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','string','menu_selector_not_found','depth','plannedActions','plan','menu-ids','Requested\x20menu\x20visibility','cookie','type','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Updated\x20visibility\x20for\x20','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','Response\x20was\x20lost\x20and\x20menu\x20','42fDQzPl','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','\x20menu(s),\x20expected\x20','body','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','false','expectedCount','\x20menu(s);\x20skipped\x20','menu_state_drift','\x20menu(s);\x20skip\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','paths','label','85036UgOKXh','before','Would\x20update\x20visibility\x20for\x20','map','flagMissing','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','1558390uqQyTi','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','menus','hash','3536410ysPFkr','beforeById','appCode','split','POST','29813IJiprg','warnings','menu_expected_count_mismatch','parentId','join','validation','some','\x20skipped,\x20','get','menu_selector_ambiguous','boolean','24AHeFIb','expect-visible','set','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','3419878wosIlc','targets','trim','push','\x20must\x20be\x20true\x20or\x20false.','Selected\x20','expected-count','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','update-recovery','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','9RAItHq','message','path','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','number','datasetId','pageId','true','Response\x20was\x20lost\x20for\x20menu\x20','url','updated','isSafeInteger','rawFlags','Menu\x20path\x20selector\x20not\x20found:\x20','sort','menu','menu\x20list','update-menu-visibility','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','724787tUAziy','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','update','resources','stringify','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','failed','1127622FrJCmI','code','requestedVisible','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','str','length','Menu\x20id\x20selector(s)\x20not\x20found:\x20','isArray','visibility-update','visible','filter','\x20updated,\x20','write','\x20failed.','childrenCount','modelType'];a180_0x41f2=function(){return _0xe8cbde;};return a180_0x41f2();}async function buildPlan(_0x4956cd,_0x53e084){const _0x5704c5=a180_0x3f40b6,_0x47e906=parseInput(_0x4956cd),_0xf8ebd7=await fetchMutationSnapshot(_0x4956cd,_0x5704c5(0x13f)),_0x17f607=selectTargets(_0xf8ebd7[_0x5704c5(0xef)],_0x47e906['menuIds'],_0x47e906[_0x5704c5(0xe5)]);if(_0x47e906[_0x5704c5(0xe0)]!==undefined&&_0x17f607[_0x5704c5(0x12e)]!==_0x47e906[_0x5704c5(0xe0)])throw menuError(_0x5704c5(0xf8),_0x5704c5(0x10a)+_0x17f607[_0x5704c5(0x12e)]+_0x5704c5(0x15f)+_0x47e906['expectedCount']+'.',_0x5704c5(0x13b));if(_0x47e906['expectVisible']!==undefined){const _0xf440c8=_0x17f607[_0x5704c5(0x133)](_0x5b4eb8=>_0x5b4eb8[_0x5704c5(0x132)]!==_0x47e906['expectVisible']);if(_0xf440c8[_0x5704c5(0x12e)]>0x0)throw menuError(_0x5704c5(0xe2),_0x5704c5(0x10c)+_0xf440c8[_0x5704c5(0xea)](_0x44e606=>_0x44e606['id'])[_0x5704c5(0xfa)](',\x20')+'.',_0x5704c5(0xe4));}const _0x1f11fd=_0x17f607[_0x5704c5(0xea)](_0x28a0b7=>({'id':_0x28a0b7['id'],'label':_0x28a0b7[_0x5704c5(0xe6)],'path':_0x28a0b7[_0x5704c5(0x111)],'before':{'visible':_0x28a0b7[_0x5704c5(0x132)]},'after':{'visible':_0x47e906[_0x5704c5(0x132)]}})),_0x30d627=_0x1f11fd[_0x5704c5(0x133)](_0x1e5e4c=>_0x1e5e4c['before'][_0x5704c5(0x132)]!==_0x47e906[_0x5704c5(0x132)])[_0x5704c5(0xea)](_0x45df62=>({'stage':_0x5704c5(0x120),'method':_0x5704c5(0xf5),'path':'/smartapi/menu/update','body':{'appCode':_0x4956cd['appCode'],'id':_0x45df62['id'],'visible':_0x47e906['visible']}})),_0x3cde0e=mutationResult({'operation':_0x5704c5(0x131),'selector':{'menuIds':_0x47e906[_0x5704c5(0x14a)],'paths':_0x47e906[_0x5704c5(0xe5)]},'before':{'menus':_0x17f607[_0x5704c5(0xea)](_0x53f584=>({'id':_0x53f584['id'],'path':_0x53f584[_0x5704c5(0x111)],'visible':_0x53f584[_0x5704c5(0x132)]}))},'after':{'menus':_0x17f607[_0x5704c5(0xea)](_0x5d3e36=>({'id':_0x5d3e36['id'],'path':_0x5d3e36['path'],'visible':_0x47e906[_0x5704c5(0x132)]}))},'dryRun':_0x53e084,'backend':[...BACKEND],'plannedActions':_0x30d627,'snapshotHash':_0xf8ebd7[_0x5704c5(0xf0)],'warnings':_0x30d627['length']===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0x3cde0e,'requestedVisible':_0x47e906['visible'],'targets':_0x1f11fd},'beforeById':new Map(_0x17f607[_0x5704c5(0xea)](_0x585eb7=>[_0x585eb7['id'],_0x585eb7]))};}function selectTargets(_0x5435e0,_0x54eb84,_0x667e92){const _0x4632e3=a180_0x3f40b6,_0x5b0633=new Map(_0x5435e0[_0x4632e3(0xea)](_0x42ad07=>[_0x42ad07['id'],_0x42ad07])),_0x455be6=new Map(),_0x28dff8=_0x54eb84['filter'](_0xb6dc0d=>!_0x5b0633[_0x4632e3(0x13d)](_0xb6dc0d));if(_0x28dff8['length']>0x0)throw menuError(_0x4632e3(0x151),_0x4632e3(0x12f)+_0x28dff8[_0x4632e3(0xfa)](',\x20')+'.',_0x4632e3(0x123));for(const _0x1273b3 of _0x54eb84){_0x455be6[_0x4632e3(0x103)](_0x1273b3,_0x5b0633['get'](_0x1273b3));}for(const _0x21a91b of _0x667e92){const _0x5c227e=_0x5435e0[_0x4632e3(0x133)](_0x3b1a74=>_0x3b1a74['path']===_0x21a91b);if(_0x5c227e['length']===0x0)throw menuError('menu_selector_not_found',_0x4632e3(0x11c)+JSON[_0x4632e3(0x126)](_0x21a91b)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x5c227e['length']>0x1)throw menuError(_0x4632e3(0xff),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x4632e3(0x126)](_0x21a91b)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x5c227e[_0x4632e3(0xea)](_0x48a7e8=>_0x48a7e8['id'])[_0x4632e3(0xfa)](',\x20')+'.');const _0xbaded9=_0x5c227e[0x0];_0x455be6[_0x4632e3(0x103)](_0xbaded9['id'],_0xbaded9);}return[..._0x455be6['values']()];}function parseMenuIds(_0x322cdc){const _0x153b06=a180_0x3f40b6,_0x540215=parseCsv(_0x322cdc),_0x457202=_0x540215[_0x153b06(0xea)](Number);if(_0x457202[_0x153b06(0xfc)](_0x38afde=>!Number[_0x153b06(0x11a)](_0x38afde)||_0x38afde<=0x0))throw CliErrors[_0x153b06(0xfb)](_0x153b06(0xee));return[...new Set(_0x457202)];}function parseCsv(_0x36cc63){const _0x389117=a180_0x3f40b6;return[...new Set(_0x36cc63[_0x389117(0xf4)](',')[_0x389117(0xea)](_0x4e65d6=>_0x4e65d6[_0x389117(0x107)]())[_0x389117(0x133)](Boolean))];}function parseBooleanFlag(_0x3057f2,_0x540abe,_0x50d923){const _0x991bf4=a180_0x3f40b6;if(!hasFlag(_0x3057f2,_0x540abe)){if(_0x50d923)throw CliErrors[_0x991bf4(0xeb)](_0x540abe);return undefined;}const _0x380eb9=_0x3057f2[_0x991bf4(0x11b)][_0x540abe];if(_0x380eb9===!![]||_0x380eb9===![])return _0x380eb9;if(_0x380eb9===_0x991bf4(0x116))return!![];if(_0x380eb9===_0x991bf4(0x162))return![];throw CliErrors[_0x991bf4(0xfb)]('--'+_0x540abe+_0x991bf4(0x109));}function a180_0x9012(_0x3ce29e,_0x9b5ae0){_0x3ce29e=_0x3ce29e-0xe0;const _0x41f281=a180_0x41f2();let _0x9012cf=_0x41f281[_0x3ce29e];return _0x9012cf;}function verifyVisibilityUpdate(_0x1d9e56,_0x5c8565,_0x1c0622){const _0x40aa7c=a180_0x3f40b6;assertVerified(!!_0x5c8565,_0x40aa7c(0x148)+_0x1d9e56['id']+_0x40aa7c(0x161)),assertVerified(_0x5c8565[_0x40aa7c(0x132)]===_0x1c0622,_0x40aa7c(0x148)+_0x1d9e56['id']+_0x40aa7c(0x14f));const _0x4fedb9=[['id',_0x5c8565['id'],_0x1d9e56['id']],[_0x40aa7c(0xf9),_0x5c8565[_0x40aa7c(0xf9)],_0x1d9e56[_0x40aa7c(0xf9)]],[_0x40aa7c(0x152),_0x5c8565[_0x40aa7c(0x152)],_0x1d9e56[_0x40aa7c(0x152)]],[_0x40aa7c(0xe6),_0x5c8565[_0x40aa7c(0xe6)],_0x1d9e56['label']],['path',_0x5c8565[_0x40aa7c(0x111)],_0x1d9e56[_0x40aa7c(0x111)]],['url',_0x5c8565[_0x40aa7c(0x118)],_0x1d9e56[_0x40aa7c(0x118)]],[_0x40aa7c(0x158),_0x5c8565[_0x40aa7c(0x158)],_0x1d9e56[_0x40aa7c(0x158)]],[_0x40aa7c(0x11d),_0x5c8565[_0x40aa7c(0x11d)],_0x1d9e56['sort']],[_0x40aa7c(0x125),_0x5c8565[_0x40aa7c(0x125)],_0x1d9e56[_0x40aa7c(0x125)]],[_0x40aa7c(0x144),_0x5c8565[_0x40aa7c(0x144)],_0x1d9e56['resourcesValid']],[_0x40aa7c(0x141),_0x5c8565[_0x40aa7c(0x141)],_0x1d9e56[_0x40aa7c(0x141)]],[_0x40aa7c(0x137),_0x5c8565[_0x40aa7c(0x137)],_0x1d9e56[_0x40aa7c(0x137)]],[_0x40aa7c(0x115),_0x5c8565['pageId'],_0x1d9e56[_0x40aa7c(0x115)]],[_0x40aa7c(0x14b),_0x5c8565[_0x40aa7c(0x14b)],_0x1d9e56['pageType']],[_0x40aa7c(0x138),_0x5c8565[_0x40aa7c(0x138)],_0x1d9e56['modelType']],[_0x40aa7c(0x114),_0x5c8565[_0x40aa7c(0x114)],_0x1d9e56['datasetId']],[_0x40aa7c(0x147),_0x5c8565['datasetCode'],_0x1d9e56[_0x40aa7c(0x147)]]];for(const [_0xa1b10,_0x2475a8,_0xfde454]of _0x4fedb9){assertVerified(sameValue(_0x2475a8,_0xfde454),_0x40aa7c(0x148)+_0x1d9e56['id']+'\x20'+_0xa1b10+'\x20changed\x20unexpectedly.');}}function sameValue(_0x58a93a,_0x56a290){const _0x5d67ac=a180_0x3f40b6;if(Array['isArray'](_0x58a93a)||Array[_0x5d67ac(0x130)](_0x56a290))return JSON[_0x5d67ac(0x126)](_0x58a93a)===JSON[_0x5d67ac(0x126)](_0x56a290);return _0x58a93a===_0x56a290;}
1
+ const a190_0x4bca3d=a190_0x564b;(function(_0x304ac1,_0x1cb23b){const _0x5e54c9=a190_0x564b,_0x3cc19e=_0x304ac1();while(!![]){try{const _0x27326c=-parseInt(_0x5e54c9(0x17b))/0x1*(-parseInt(_0x5e54c9(0x132))/0x2)+parseInt(_0x5e54c9(0x18f))/0x3*(parseInt(_0x5e54c9(0x126))/0x4)+parseInt(_0x5e54c9(0x121))/0x5*(parseInt(_0x5e54c9(0x135))/0x6)+-parseInt(_0x5e54c9(0x158))/0x7+parseInt(_0x5e54c9(0x167))/0x8+parseInt(_0x5e54c9(0x189))/0x9*(parseInt(_0x5e54c9(0x117))/0xa)+-parseInt(_0x5e54c9(0x13d))/0xb;if(_0x27326c===_0x1cb23b)break;else _0x3cc19e['push'](_0x3cc19e['shift']());}catch(_0x5f372e){_0x3cc19e['push'](_0x3cc19e['shift']());}}}(a190_0x1f81,0x30a7f));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a190_0x1f81(){const _0x117268=['Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','2332880UsVJys','trim','Selected\x20','Menu\x20id\x20selector(s)\x20not\x20found:\x20','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','depth','flagMissing','Menu\x20path\x20selector\x20not\x20found:\x20','childrenCount','menu-ids','str','sort','length','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','resourcesValid','\x20visibility\x20update\x20could\x20not\x20be\x20verified','visibility-update','menu_verification_failed','string','\x20menu(s);\x20skip\x20','843gKKztn','number','expectedCount','before','byId','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','join','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','get','\x20updated,\x20','validation','expect-visible','body','9lsbBzd','targets','resources','menus','menu_selector_not_found','Updated\x20visibility\x20for\x20','417YnVvcl','menu_selector_ambiguous','menu\x20list','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','requestedVisible','label','2014130FjkKLJ','update-menu-visibility','childrenIds','hash','push','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','\x20changed\x20unexpectedly.','\x20failed.','appCode','Menu\x20','5kTTVGp','boolean','verify\x20menu\x20visibility\x20update','message','visible','2788DmesUe','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','menu','set','\x20skipped,\x20','pageId','url','Response\x20was\x20lost\x20for\x20menu\x20','/smartapi/menu/update','beforeById','62GUtOmw','menu_expected_count_mismatch','update','360978rRVehS','cookie','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','isArray','false','plan','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','POST','4123383TqnOkp','filter','rabetbase\x20menu\x20list\x20--format\x20compress','update\x20visibility\x20for','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','path','expected-count','split','menuIds','menu_permission_denied','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','datasetId','pageType','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','update\x20menu\x20visibility','plannedActions','parentId','\x20menu(s);\x20skipped\x20','modelType','Requested\x20menu\x20visibility','\x20unchanged\x20menu(s).','write','expectVisible','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','rawFlags','type','map','714378OPwQcO','Response\x20was\x20lost\x20and\x20menu\x20','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','verification','failed','Final\x20menu\x20visibility\x20readback\x20failed.','paths','stringify','isSafeInteger','datasetCode','recovered','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','code'];a190_0x1f81=function(){return _0x117268;};return a190_0x1f81();}import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a190_0x4bca3d(0x13c),'path':a190_0x4bca3d(0x130)}];export const menuVisibilityUpdate={'service':a190_0x4bca3d(0x12a),'command':a190_0x4bca3d(0x177),'description':a190_0x4bca3d(0x166),'risk':a190_0x4bca3d(0x152),'structuredErrors':!![],'flags':[{'name':a190_0x4bca3d(0x170),'type':a190_0x4bca3d(0x179),'description':'Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update'},{'name':a190_0x4bca3d(0x15e),'type':'string','description':a190_0x4bca3d(0x164)},{'name':a190_0x4bca3d(0x125),'type':a190_0x4bca3d(0x122),'required':!![],'description':a190_0x4bca3d(0x150)},{'name':a190_0x4bca3d(0x187),'type':a190_0x4bca3d(0x122),'description':a190_0x4bca3d(0x180)},{'name':a190_0x4bca3d(0x143),'type':a190_0x4bca3d(0x17c),'description':a190_0x4bca3d(0x183)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3a22aa){parseInput(_0x3a22aa);},async 'dryRun'(_0x55213d){const _0x299631=a190_0x4bca3d,_0x20bf28=await buildPlan(_0x55213d,!![]),_0x464a4f=_0x20bf28['plan']['plannedActions']?.[_0x299631(0x173)]??0x0,_0x785365=_0x20bf28[_0x299631(0x13a)][_0x299631(0x18a)][_0x299631(0x173)]-_0x464a4f;return menuDryRunResult(_0x20bf28[_0x299631(0x13a)],{'method':_0x299631(0x13c),'url':_0x299631(0x130),'body':{'updates':_0x20bf28[_0x299631(0x13a)][_0x299631(0x14c)]?.[_0x299631(0x157)](_0xdb5c1b=>_0xdb5c1b[_0x299631(0x188)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x464a4f+_0x299631(0x17a)+_0x785365+_0x299631(0x151)});},async 'execute'(_0xce423e){const _0x511e18=a190_0x4bca3d,_0x419e00=await buildPlan(_0xce423e,![]);await recheckMutationSnapshot(_0xce423e,_0x419e00['plan'],_0x511e18(0x14b));const _0x2d3b20=[],_0x598a2f=[],_0x31bc39=[];for(const _0xa0346f of _0x419e00['plan']['targets']){if(_0xa0346f['before'][_0x511e18(0x125)]===_0x419e00['plan'][_0x511e18(0x115)]){_0x2d3b20[_0x511e18(0x11b)]({'id':_0xa0346f['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0xce423e['appCode'],_0xce423e['cookie'],{'id':_0xa0346f['id'],'visible':_0x419e00[_0x511e18(0x13a)][_0x511e18(0x115)]}),_0x2d3b20['push']({'id':_0xa0346f['id'],'updated':!![],'skipped':![]});}catch(_0x5c81c9){const _0x475a79=mapMenuApiError(_0x5c81c9,_0x511e18(0x140),_0xa0346f['id']);if(isMenuResponseLoss(_0x5c81c9)&&_0x475a79[_0x511e18(0x165)]!==_0x511e18(0x146)){_0x31bc39[_0x511e18(0x11b)](_0xa0346f['id']);continue;}_0x598a2f['push']({'id':_0xa0346f['id'],'stage':_0x511e18(0x134),'code':_0x475a79[_0x511e18(0x165)],'message':_0x475a79[_0x511e18(0x124)]});}}let _0x526763;try{_0x526763=await fetchMenuSnapshot(_0xce423e[_0x511e18(0x11f)],_0xce423e[_0x511e18(0x136)]);}catch(_0x1aa550){const _0x29304e=describeMenuErrorCause(_0x1aa550,_0x511e18(0x123)),_0x22d254=_0x31bc39['map'](_0x1ab88a=>({'id':_0x1ab88a,'stage':'update-recovery','code':_0x511e18(0x178),'message':_0x511e18(0x12f)+_0x1ab88a+_0x511e18(0x15a),'requestedStateConfirmed':![],'recovered':![]})),_0x561538={'stage':_0x511e18(0x15b),'code':_0x511e18(0x178),'message':_0x511e18(0x15d),'targetIds':_0x419e00['plan']['targets'][_0x511e18(0x157)](_0x1bd6f1=>_0x1bd6f1['id']),'requestedStateConfirmed':![],..._0x29304e};throw menuFailure(asVerificationError(_0x1aa550,_0x511e18(0x141)),_0x419e00['plan'],{'stage':_0x511e18(0x15b),'succeeded':_0x2d3b20,'failedRecords':[..._0x598a2f,..._0x22d254,_0x561538],'warnings':[_0x511e18(0x174)],'verification':{'status':_0x511e18(0x15c),'recoveredCount':0x0,'lookupCommand':_0x511e18(0x13f)}});}const _0x58a11d=[];for(const _0x4bf6f4 of _0x2d3b20){const _0x38c398=Number(_0x4bf6f4['id']),_0x54214a=_0x419e00['beforeById'][_0x511e18(0x184)](_0x38c398),_0xb5cefe=_0x526763[_0x511e18(0x17f)]['get'](_0x38c398);try{verifyVisibilityUpdate(_0x54214a,_0xb5cefe,_0x419e00[_0x511e18(0x13a)][_0x511e18(0x115)]);}catch(_0x3f1aac){const _0x1cba37=asVerificationError(_0x3f1aac,_0x511e18(0x120)+_0x38c398+_0x511e18(0x176));_0x58a11d['push']({'id':_0x38c398,'stage':_0x511e18(0x15b),'code':_0x1cba37['code'],'message':_0x1cba37[_0x511e18(0x124)],'requestedStateConfirmed':![]});}}for(const _0x1b49dc of _0x31bc39){const _0x1fd787=_0x419e00[_0x511e18(0x131)][_0x511e18(0x184)](_0x1b49dc),_0x2dd5f2=_0x526763['byId'][_0x511e18(0x184)](_0x1b49dc);try{verifyVisibilityUpdate(_0x1fd787,_0x2dd5f2,_0x419e00[_0x511e18(0x13a)][_0x511e18(0x115)]),_0x2d3b20[_0x511e18(0x11b)]({'id':_0x1b49dc,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x8de821){const _0x365520=asVerificationError(_0x8de821,_0x511e18(0x159)+_0x1b49dc+_0x511e18(0x114));_0x58a11d['push']({'id':_0x1b49dc,'stage':'update-recovery','code':_0x365520['code'],'message':_0x365520[_0x511e18(0x124)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x58a11d[_0x511e18(0x173)]>0x0){const _0x2bb592=_0x58a11d[_0x511e18(0x157)](_0x3d7802=>Number(_0x3d7802['id'])),_0x217d36=_0x2d3b20['filter'](_0x1c1725=>_0x1c1725[_0x511e18(0x162)]===!![])[_0x511e18(0x173)],_0x18079e=menuError(_0x511e18(0x178),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x2bb592[_0x511e18(0x181)](',\x20')+'.',_0x511e18(0x11c));throw menuFailure(_0x18079e,_0x419e00[_0x511e18(0x13a)],{'stage':_0x511e18(0x15b),'succeeded':_0x2d3b20,'failedRecords':[..._0x598a2f,..._0x58a11d],'warnings':[_0x511e18(0x147)],'verification':{'status':_0x511e18(0x15c),..._0x2bb592['length']===0x1?{'targetId':_0x2bb592[0x0]}:{'targetIds':_0x2bb592},'recoveredCount':_0x217d36,'lookupCommand':_0x511e18(0x13f)}});}const _0x3893ed=_0x2d3b20['filter'](_0x13ec77=>_0x13ec77['updated']===!![])[_0x511e18(0x173)],_0x102f2e=_0x2d3b20[_0x511e18(0x173)]-_0x3893ed,_0x1e0beb={..._0x419e00[_0x511e18(0x13a)],'succeeded':_0x2d3b20,'failed':_0x598a2f,'warnings':_0x598a2f[_0x511e18(0x173)]>0x0?[..._0x419e00[_0x511e18(0x13a)]['warnings'],_0x511e18(0x13b)]:_0x419e00['plan']['warnings'],'verification':{'checkedBy':_0x511e18(0x191),'snapshotHash':_0x526763[_0x511e18(0x11a)],'matchesRequestedState':_0x598a2f[_0x511e18(0x173)]===0x0,'recoveredCount':_0x31bc39[_0x511e18(0x173)]}};return{'ok':_0x598a2f['length']===0x0,'data':_0x1e0beb,'message':_0x598a2f['length']===0x0?_0x511e18(0x18e)+_0x3893ed+_0x511e18(0x14e)+_0x102f2e+_0x511e18(0x151):'Menu\x20visibility\x20update\x20completed:\x20'+_0x3893ed+_0x511e18(0x185)+_0x102f2e+_0x511e18(0x12c)+_0x598a2f[_0x511e18(0x173)]+_0x511e18(0x11e)};}};function parseInput(_0x2e917d){const _0x6fa657=a190_0x4bca3d,_0x541f70=parseMenuIds(_0x2e917d[_0x6fa657(0x171)](_0x6fa657(0x170))),_0x1ac05d=parseCsv(_0x2e917d[_0x6fa657(0x171)]('paths'));if(_0x541f70['length']===0x0&&_0x1ac05d['length']===0x0)throw CliErrors[_0x6fa657(0x186)](_0x6fa657(0x16b));const _0x1fea37=parseBooleanFlag(_0x2e917d,_0x6fa657(0x125),!![]),_0x3f0ba9=parseBooleanFlag(_0x2e917d,_0x6fa657(0x187),![]);let _0x3a1a92;if(hasFlag(_0x2e917d,'expected-count')){_0x3a1a92=_0x2e917d['num'](_0x6fa657(0x143));if(!Number[_0x6fa657(0x160)](_0x3a1a92)||_0x3a1a92<0x0)throw CliErrors[_0x6fa657(0x186)](_0x6fa657(0x14a));}return{'menuIds':_0x541f70,'paths':_0x1ac05d,'visible':_0x1fea37,'expectVisible':_0x3f0ba9,'expectedCount':_0x3a1a92};}async function buildPlan(_0x1b0ab1,_0x24b7a5){const _0x5bc3f6=a190_0x4bca3d,_0x5d324a=parseInput(_0x1b0ab1),_0x49cb53=await fetchMutationSnapshot(_0x1b0ab1,_0x5bc3f6(0x14b)),_0x2a46db=selectTargets(_0x49cb53[_0x5bc3f6(0x18c)],_0x5d324a['menuIds'],_0x5d324a[_0x5bc3f6(0x15e)]);if(_0x5d324a[_0x5bc3f6(0x17d)]!==undefined&&_0x2a46db[_0x5bc3f6(0x173)]!==_0x5d324a[_0x5bc3f6(0x17d)])throw menuError(_0x5bc3f6(0x133),_0x5bc3f6(0x169)+_0x2a46db[_0x5bc3f6(0x173)]+'\x20menu(s),\x20expected\x20'+_0x5d324a[_0x5bc3f6(0x17d)]+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x5d324a[_0x5bc3f6(0x153)]!==undefined){const _0x2021a8=_0x2a46db[_0x5bc3f6(0x13e)](_0x5a0aac=>_0x5a0aac[_0x5bc3f6(0x125)]!==_0x5d324a[_0x5bc3f6(0x153)]);if(_0x2021a8[_0x5bc3f6(0x173)]>0x0)throw menuError('menu_state_drift',_0x5bc3f6(0x182)+_0x2021a8['map'](_0xbe439=>_0xbe439['id'])[_0x5bc3f6(0x181)](',\x20')+'.',_0x5bc3f6(0x129));}const _0x34527f=_0x2a46db[_0x5bc3f6(0x157)](_0xca9e2=>({'id':_0xca9e2['id'],'label':_0xca9e2[_0x5bc3f6(0x116)],'path':_0xca9e2[_0x5bc3f6(0x142)],'before':{'visible':_0xca9e2[_0x5bc3f6(0x125)]},'after':{'visible':_0x5d324a[_0x5bc3f6(0x125)]}})),_0x47501d=_0x34527f[_0x5bc3f6(0x13e)](_0x2246cd=>_0x2246cd[_0x5bc3f6(0x17e)][_0x5bc3f6(0x125)]!==_0x5d324a[_0x5bc3f6(0x125)])[_0x5bc3f6(0x157)](_0x1bec0b=>({'stage':_0x5bc3f6(0x118),'method':_0x5bc3f6(0x13c),'path':_0x5bc3f6(0x130),'body':{'appCode':_0x1b0ab1['appCode'],'id':_0x1bec0b['id'],'visible':_0x5d324a[_0x5bc3f6(0x125)]}})),_0x4e4a2e=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x5d324a[_0x5bc3f6(0x145)],'paths':_0x5d324a[_0x5bc3f6(0x15e)]},'before':{'menus':_0x2a46db[_0x5bc3f6(0x157)](_0x36028c=>({'id':_0x36028c['id'],'path':_0x36028c[_0x5bc3f6(0x142)],'visible':_0x36028c['visible']}))},'after':{'menus':_0x2a46db[_0x5bc3f6(0x157)](_0x522d02=>({'id':_0x522d02['id'],'path':_0x522d02[_0x5bc3f6(0x142)],'visible':_0x5d324a[_0x5bc3f6(0x125)]}))},'dryRun':_0x24b7a5,'backend':[...BACKEND],'plannedActions':_0x47501d,'snapshotHash':_0x49cb53[_0x5bc3f6(0x11a)],'warnings':_0x47501d['length']===0x0?[_0x5bc3f6(0x127)]:[]});return{'plan':{..._0x4e4a2e,'requestedVisible':_0x5d324a[_0x5bc3f6(0x125)],'targets':_0x34527f},'beforeById':new Map(_0x2a46db['map'](_0x123768=>[_0x123768['id'],_0x123768]))};}function a190_0x564b(_0x1276f5,_0x5eb0bb){_0x1276f5=_0x1276f5-0x114;const _0x1f81f6=a190_0x1f81();let _0x564bdc=_0x1f81f6[_0x1276f5];return _0x564bdc;}function selectTargets(_0x516b33,_0x5da022,_0x47dca4){const _0x48f05c=a190_0x4bca3d,_0xfeba1e=new Map(_0x516b33[_0x48f05c(0x157)](_0x2e37ff=>[_0x2e37ff['id'],_0x2e37ff])),_0x2a3d63=new Map(),_0x2293c9=_0x5da022[_0x48f05c(0x13e)](_0x182061=>!_0xfeba1e['has'](_0x182061));if(_0x2293c9[_0x48f05c(0x173)]>0x0)throw menuError(_0x48f05c(0x18d),_0x48f05c(0x16a)+_0x2293c9[_0x48f05c(0x181)](',\x20')+'.',_0x48f05c(0x163));for(const _0x4582ee of _0x5da022){_0x2a3d63[_0x48f05c(0x12b)](_0x4582ee,_0xfeba1e[_0x48f05c(0x184)](_0x4582ee));}for(const _0x134828 of _0x47dca4){const _0xc06eb9=_0x516b33[_0x48f05c(0x13e)](_0xd20697=>_0xd20697['path']===_0x134828);if(_0xc06eb9[_0x48f05c(0x173)]===0x0)throw menuError(_0x48f05c(0x18d),_0x48f05c(0x16e)+JSON[_0x48f05c(0x15f)](_0x134828)+'.',_0x48f05c(0x137));if(_0xc06eb9[_0x48f05c(0x173)]>0x1)throw menuError(_0x48f05c(0x190),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x48f05c(0x15f)](_0x134828)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0xc06eb9[_0x48f05c(0x157)](_0x59c6fe=>_0x59c6fe['id'])[_0x48f05c(0x181)](',\x20')+'.');const _0x10fa8f=_0xc06eb9[0x0];_0x2a3d63[_0x48f05c(0x12b)](_0x10fa8f['id'],_0x10fa8f);}return[..._0x2a3d63['values']()];}function parseMenuIds(_0x3094ab){const _0x9d3a8b=a190_0x4bca3d,_0x1bfdc8=parseCsv(_0x3094ab),_0x30f9bf=_0x1bfdc8[_0x9d3a8b(0x157)](Number);if(_0x30f9bf['some'](_0x49a52b=>!Number[_0x9d3a8b(0x160)](_0x49a52b)||_0x49a52b<=0x0))throw CliErrors[_0x9d3a8b(0x186)](_0x9d3a8b(0x128));return[...new Set(_0x30f9bf)];}function parseCsv(_0x5e2b37){const _0x552183=a190_0x4bca3d;return[...new Set(_0x5e2b37[_0x552183(0x144)](',')[_0x552183(0x157)](_0x15918e=>_0x15918e[_0x552183(0x168)]())['filter'](Boolean))];}function parseBooleanFlag(_0x381d89,_0x2d4cd5,_0x4942b2){const _0x188364=a190_0x4bca3d;if(!hasFlag(_0x381d89,_0x2d4cd5)){if(_0x4942b2)throw CliErrors[_0x188364(0x16d)](_0x2d4cd5);return undefined;}const _0x3aa8c9=_0x381d89[_0x188364(0x155)][_0x2d4cd5];if(_0x3aa8c9===!![]||_0x3aa8c9===![])return _0x3aa8c9;if(_0x3aa8c9==='true')return!![];if(_0x3aa8c9===_0x188364(0x139))return![];throw CliErrors[_0x188364(0x186)]('--'+_0x2d4cd5+'\x20must\x20be\x20true\x20or\x20false.');}function verifyVisibilityUpdate(_0x235cf9,_0x257050,_0x3eaf94){const _0x1eeefb=a190_0x4bca3d;assertVerified(!!_0x257050,_0x1eeefb(0x120)+_0x235cf9['id']+_0x1eeefb(0x154)),assertVerified(_0x257050[_0x1eeefb(0x125)]===_0x3eaf94,_0x1eeefb(0x120)+_0x235cf9['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x54314a=[['id',_0x257050['id'],_0x235cf9['id']],[_0x1eeefb(0x14d),_0x257050[_0x1eeefb(0x14d)],_0x235cf9[_0x1eeefb(0x14d)]],[_0x1eeefb(0x16c),_0x257050[_0x1eeefb(0x16c)],_0x235cf9[_0x1eeefb(0x16c)]],[_0x1eeefb(0x116),_0x257050[_0x1eeefb(0x116)],_0x235cf9[_0x1eeefb(0x116)]],[_0x1eeefb(0x142),_0x257050[_0x1eeefb(0x142)],_0x235cf9[_0x1eeefb(0x142)]],['url',_0x257050[_0x1eeefb(0x12e)],_0x235cf9[_0x1eeefb(0x12e)]],[_0x1eeefb(0x156),_0x257050[_0x1eeefb(0x156)],_0x235cf9[_0x1eeefb(0x156)]],[_0x1eeefb(0x172),_0x257050[_0x1eeefb(0x172)],_0x235cf9[_0x1eeefb(0x172)]],[_0x1eeefb(0x18b),_0x257050[_0x1eeefb(0x18b)],_0x235cf9[_0x1eeefb(0x18b)]],[_0x1eeefb(0x175),_0x257050[_0x1eeefb(0x175)],_0x235cf9[_0x1eeefb(0x175)]],[_0x1eeefb(0x119),_0x257050['childrenIds'],_0x235cf9['childrenIds']],[_0x1eeefb(0x16f),_0x257050[_0x1eeefb(0x16f)],_0x235cf9[_0x1eeefb(0x16f)]],[_0x1eeefb(0x12d),_0x257050[_0x1eeefb(0x12d)],_0x235cf9['pageId']],[_0x1eeefb(0x149),_0x257050[_0x1eeefb(0x149)],_0x235cf9[_0x1eeefb(0x149)]],[_0x1eeefb(0x14f),_0x257050[_0x1eeefb(0x14f)],_0x235cf9[_0x1eeefb(0x14f)]],[_0x1eeefb(0x148),_0x257050[_0x1eeefb(0x148)],_0x235cf9[_0x1eeefb(0x148)]],[_0x1eeefb(0x161),_0x257050[_0x1eeefb(0x161)],_0x235cf9[_0x1eeefb(0x161)]]];for(const [_0x3d21b6,_0x5aa4d3,_0x1132f7]of _0x54314a){assertVerified(sameValue(_0x5aa4d3,_0x1132f7),_0x1eeefb(0x120)+_0x235cf9['id']+'\x20'+_0x3d21b6+_0x1eeefb(0x11d));}}function sameValue(_0x329518,_0x1db97){const _0x476799=a190_0x4bca3d;if(Array['isArray'](_0x329518)||Array[_0x476799(0x138)](_0x1db97))return JSON[_0x476799(0x15f)](_0x329518)===JSON[_0x476799(0x15f)](_0x1db97);return _0x329518===_0x1db97;}
@@ -1 +1 @@
1
- const a181_0x3888f2=a181_0x5f45;(function(_0x7ec95c,_0x57615d){const _0x4f4fa5=a181_0x5f45,_0x5b997c=_0x7ec95c();while(!![]){try{const _0x29f097=-parseInt(_0x4f4fa5(0x116))/0x1*(-parseInt(_0x4f4fa5(0xf3))/0x2)+-parseInt(_0x4f4fa5(0xfd))/0x3+parseInt(_0x4f4fa5(0x112))/0x4+parseInt(_0x4f4fa5(0xf7))/0x5+-parseInt(_0x4f4fa5(0x10b))/0x6+-parseInt(_0x4f4fa5(0xfb))/0x7*(parseInt(_0x4f4fa5(0x10f))/0x8)+-parseInt(_0x4f4fa5(0x107))/0x9*(-parseInt(_0x4f4fa5(0x103))/0xa);if(_0x29f097===_0x57615d)break;else _0x5b997c['push'](_0x5b997c['shift']());}catch(_0x537c9b){_0x5b997c['push'](_0x5b997c['shift']());}}}(a181_0x460b,0x77e36));import{asDryRunResult}from'../../commands/common/dry-run.js';function a181_0x460b(){const _0xd3b39b=['notification_config_create_outcome_unknown','5860698CIQngT','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','endpointUrl','create','105576eMsbix','verification','configName','1365464oCzBJH','description','Inspect\x20with\x20','channelConfig','137LZigBe',';\x20do\x20not\x20resubmit\x20automatically.','10372JshdYH','verified','planned','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','2315525OVlJGO','readTimeout','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','configCode','231ZTLwcd','Created\x20notification\x20config\x20','1427856Qojfva','config-create','document','connectTimeout','/notification/channel-config/create','input','1728690sNGVkE','POST','channelType','isSafeInteger','45BdvzbK',';\x20do\x20not\x20resubmit.','appCode'];a181_0x460b=function(){return _0xd3b39b;};return a181_0x460b();}import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';function a181_0x5f45(_0x38fbec,_0x60aa08){_0x38fbec=_0x38fbec-0xf3;const _0x460bd6=a181_0x460b();let _0x5f4568=_0x460bd6[_0x38fbec];return _0x5f4568;}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=a181_0x3888f2(0x101);async function prepareCreate(_0x21d65f){const _0xfa9a25=a181_0x3888f2,_0x2263f5=await readNotificationDocument(_0x21d65f,_0xfa9a25(0x10e)),_0x46ac88=createMutationInput(_0x21d65f[_0xfa9a25(0x109)],_0x2263f5);return{'document':_0x2263f5,'input':_0x46ac88,'planned':projectNotificationConfig({'appCode':_0x21d65f[_0xfa9a25(0x109)],'configName':_0x2263f5[_0xfa9a25(0x111)],'channelType':_0x2263f5[_0xfa9a25(0x105)],'endpointUrl':_0x2263f5[_0xfa9a25(0x10d)],'channelConfig':_0x2263f5[_0xfa9a25(0x115)],'description':_0x2263f5[_0xfa9a25(0x113)],'connectTimeout':_0x2263f5[_0xfa9a25(0x100)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x2263f5[_0xfa9a25(0xf8)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':a181_0x3888f2(0xfe),'description':a181_0x3888f2(0xf9),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x1833e7){assertSingleNotificationSource(_0x1833e7);},async 'dryRun'(_0x4808ef){const _0x4cdb93=a181_0x3888f2,_0x4f3b82=await prepareCreate(_0x4808ef),_0x5ead09=notificationLookupCommand(_0x4808ef['appCode'],_0x4f3b82[_0x4cdb93(0xff)][_0x4cdb93(0x105)]);return asDryRunResult({'operation':_0x4cdb93(0x10e),'selector':{'appCode':_0x4808ef[_0x4cdb93(0x109)],'configName':_0x4f3b82[_0x4cdb93(0xff)][_0x4cdb93(0x111)],'channelType':_0x4f3b82['document'][_0x4cdb93(0x105)]},'before':null,'after':_0x4f3b82[_0x4cdb93(0xf5)],'dryRun':!![],'backend':{'method':_0x4cdb93(0x104),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x4cdb93(0xf5),'lookupCommand':_0x5ead09}},{'method':_0x4cdb93(0x104),'url':CREATE_PATH});},async 'execute'(_0x5581d4){const _0xe6f031=a181_0x3888f2,_0x12d0c1=await prepareCreate(_0x5581d4),_0x386ced=notificationLookupCommand(_0x5581d4[_0xe6f031(0x109)],_0x12d0c1['document'][_0xe6f031(0x105)]);let _0x4e947a;try{_0x4e947a=await createNotificationChannelConfig(_0x12d0c1[_0xe6f031(0x102)]);}catch(_0x3f4086){if(isPlatformTransportFailure(_0x3f4086))throw notificationError(_0xe6f031(0x10a),_0xe6f031(0x10c),_0xe6f031(0x114)+_0x386ced+_0xe6f031(0x108));throw safeApiFailure(_0xe6f031(0x10e),'mutation','Inspect\x20with\x20'+_0x386ced+';\x20no\x20automatic\x20retry\x20was\x20attempted.');}if(!Number[_0xe6f031(0x106)](_0x4e947a)||_0x4e947a<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0xe6f031(0xf6),_0xe6f031(0x114)+_0x386ced+';\x20do\x20not\x20resubmit.');let _0x259768;try{const _0x1b03ba=await getNotificationChannelConfig(_0x4e947a,_0x5581d4[_0xe6f031(0x109)]);_0x259768=normalizeExactNotificationConfig(_0x1b03ba,_0x4e947a,_0x5581d4[_0xe6f031(0x109)]);}catch{throw safeApiFailure(_0xe6f031(0x10e),_0xe6f031(0x110),_0xe6f031(0x114)+_0x386ced+_0xe6f031(0x117));}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x259768[_0xe6f031(0x109)],'id':_0x259768['id'],'configCode':_0x259768[_0xe6f031(0xfa)],'configName':_0x259768[_0xe6f031(0x111)],'channelType':_0x259768['channelType']},'before':null,'after':projectNotificationConfig(_0x259768),'dryRun':![],'backend':{'method':_0xe6f031(0x104),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0xe6f031(0xf4),'lookupCommand':_0x386ced}},'message':_0xe6f031(0xfc)+_0x259768['id']};}};
1
+ function a191_0x2eb8(_0x7dbbda,_0x552f26){_0x7dbbda=_0x7dbbda-0x18b;const _0x4e7e5b=a191_0x4e7e();let _0x2eb819=_0x4e7e5b[_0x7dbbda];return _0x2eb819;}const a191_0x43959d=a191_0x2eb8;function a191_0x4e7e(){const _0x78ec8=['Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','POST','isSafeInteger','15hVmNCo','configName','2WriCfh','config-create','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','8744877sWmeCt','5772968CxakQj','verified','7863690xptuvI','create','Created\x20notification\x20config\x20','description',';\x20do\x20not\x20resubmit.','input','connectTimeout','channelType','12587176DXxFtS',';\x20no\x20automatic\x20retry\x20was\x20attempted.','document','2793387OsZaCd','7BufNpj',';\x20do\x20not\x20resubmit\x20automatically.','verification','write','mutation','planned','3320706GuSFWQ','notification_config_create_outcome_unknown','Inspect\x20with\x20','appCode','configCode','489835xKHHkt','/notification/channel-config/create','channelConfig'];a191_0x4e7e=function(){return _0x78ec8;};return a191_0x4e7e();}(function(_0x2c981e,_0x59f220){const _0x227e4e=a191_0x2eb8,_0x154da5=_0x2c981e();while(!![]){try{const _0x2b0bd6=parseInt(_0x227e4e(0x1ac))/0x1+parseInt(_0x227e4e(0x18f))/0x2*(-parseInt(_0x227e4e(0x1a0))/0x3)+parseInt(_0x227e4e(0x193))/0x4+-parseInt(_0x227e4e(0x18d))/0x5*(-parseInt(_0x227e4e(0x1a7))/0x6)+parseInt(_0x227e4e(0x1a1))/0x7*(-parseInt(_0x227e4e(0x19d))/0x8)+-parseInt(_0x227e4e(0x192))/0x9+parseInt(_0x227e4e(0x195))/0xa;if(_0x2b0bd6===_0x59f220)break;else _0x154da5['push'](_0x154da5['shift']());}catch(_0x4b4617){_0x154da5['push'](_0x154da5['shift']());}}}(a191_0x4e7e,0xdc9c4));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=a191_0x43959d(0x1ad);async function prepareCreate(_0x578d9b){const _0x5d6858=a191_0x43959d,_0x30e1fa=await readNotificationDocument(_0x578d9b,'create'),_0xb5ba28=createMutationInput(_0x578d9b[_0x5d6858(0x1aa)],_0x30e1fa);return{'document':_0x30e1fa,'input':_0xb5ba28,'planned':projectNotificationConfig({'appCode':_0x578d9b['appCode'],'configName':_0x30e1fa['configName'],'channelType':_0x30e1fa[_0x5d6858(0x19c)],'endpointUrl':_0x30e1fa['endpointUrl'],'channelConfig':_0x30e1fa[_0x5d6858(0x1ae)],'description':_0x30e1fa[_0x5d6858(0x198)],'connectTimeout':_0x30e1fa[_0x5d6858(0x19b)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x30e1fa['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':a191_0x43959d(0x190),'description':a191_0x43959d(0x1af),'risk':a191_0x43959d(0x1a4),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x41591f){assertSingleNotificationSource(_0x41591f);},async 'dryRun'(_0x193e6d){const _0x3251c1=a191_0x43959d,_0xf998f1=await prepareCreate(_0x193e6d),_0x5320df=notificationLookupCommand(_0x193e6d['appCode'],_0xf998f1[_0x3251c1(0x19f)]['channelType']);return asDryRunResult({'operation':_0x3251c1(0x196),'selector':{'appCode':_0x193e6d[_0x3251c1(0x1aa)],'configName':_0xf998f1[_0x3251c1(0x19f)]['configName'],'channelType':_0xf998f1[_0x3251c1(0x19f)]['channelType']},'before':null,'after':_0xf998f1[_0x3251c1(0x1a6)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x5320df}},{'method':_0x3251c1(0x18b),'url':CREATE_PATH});},async 'execute'(_0x31172e){const _0x3b3195=a191_0x43959d,_0x4a9835=await prepareCreate(_0x31172e),_0x4c3e03=notificationLookupCommand(_0x31172e[_0x3b3195(0x1aa)],_0x4a9835[_0x3b3195(0x19f)][_0x3b3195(0x19c)]);let _0x19479a;try{_0x19479a=await createNotificationChannelConfig(_0x4a9835[_0x3b3195(0x19a)]);}catch(_0x230744){if(isPlatformTransportFailure(_0x230744))throw notificationError(_0x3b3195(0x1a8),_0x3b3195(0x191),'Inspect\x20with\x20'+_0x4c3e03+_0x3b3195(0x199));throw safeApiFailure('create',_0x3b3195(0x1a5),_0x3b3195(0x1a9)+_0x4c3e03+_0x3b3195(0x19e));}if(!Number[_0x3b3195(0x18c)](_0x19479a)||_0x19479a<=0x0)throw notificationError('notification_config_create_outcome_unknown','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.',_0x3b3195(0x1a9)+_0x4c3e03+_0x3b3195(0x199));let _0x207056;try{const _0x14e2c5=await getNotificationChannelConfig(_0x19479a,_0x31172e['appCode']);_0x207056=normalizeExactNotificationConfig(_0x14e2c5,_0x19479a,_0x31172e[_0x3b3195(0x1aa)]);}catch{throw safeApiFailure(_0x3b3195(0x196),_0x3b3195(0x1a3),'Inspect\x20with\x20'+_0x4c3e03+_0x3b3195(0x1a2));}return{'ok':!![],'data':{'operation':_0x3b3195(0x196),'selector':{'appCode':_0x207056[_0x3b3195(0x1aa)],'id':_0x207056['id'],'configCode':_0x207056[_0x3b3195(0x1ab)],'configName':_0x207056[_0x3b3195(0x18e)],'channelType':_0x207056['channelType']},'before':null,'after':projectNotificationConfig(_0x207056),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3b3195(0x194),'lookupCommand':_0x4c3e03}},'message':_0x3b3195(0x197)+_0x207056['id']};}};
@@ -1 +1 @@
1
- const a182_0x1c82a9=a182_0x57b8;(function(_0x507794,_0x1c9ef3){const _0x55798f=a182_0x57b8,_0x39afde=_0x507794();while(!![]){try{const _0x572249=parseInt(_0x55798f(0x1de))/0x1*(-parseInt(_0x55798f(0x1ef))/0x2)+parseInt(_0x55798f(0x1e0))/0x3*(-parseInt(_0x55798f(0x1d6))/0x4)+parseInt(_0x55798f(0x1e5))/0x5*(-parseInt(_0x55798f(0x1ea))/0x6)+-parseInt(_0x55798f(0x1e6))/0x7*(parseInt(_0x55798f(0x1f2))/0x8)+parseInt(_0x55798f(0x1db))/0x9+parseInt(_0x55798f(0x1d2))/0xa+-parseInt(_0x55798f(0x1f0))/0xb*(-parseInt(_0x55798f(0x1ec))/0xc);if(_0x572249===_0x1c9ef3)break;else _0x39afde['push'](_0x39afde['shift']());}catch(_0x1767d8){_0x39afde['push'](_0x39afde['shift']());}}}(a182_0x1ad4,0x5b594));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';function a182_0x57b8(_0x346fd9,_0x17bb80){_0x346fd9=_0x346fd9-0x1d0;const _0x1ad47c=a182_0x1ad4();let _0x57b878=_0x1ad47c[_0x346fd9];return _0x57b878;}const DELETE_PATH='/notification/channel-config/delete',REFERENCE_WARNING=a182_0x1c82a9(0x1d9);async function prepareDelete(_0x5383c3){const _0x3fb72f=a182_0x1c82a9,_0x1915ee=readNotificationId(_0x5383c3),_0x96143f=await requireExactNotificationConfig(_0x5383c3[_0x3fb72f(0x1df)],_0x1915ee,_0x3fb72f(0x1d1));return{'id':_0x1915ee,'before':_0x96143f};}function a182_0x1ad4(){const _0x53fffd=['45lgoIiQ','mutation','planned','verified','unshift','4915TfJCoB','98ALNjEW','\x20delete\x20could\x20not\x20be\x20verified.','Deleted\x20notification\x20config\x20','notification_config_delete_verification_failed','2154amaZWA','POST','1852788qygylD','before','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','8OMMufo','77GXaMGI','Notification\x20config\x20','138856djzxDf','notification_config_delete_verification_unavailable','delete','3027390arQNnV','config-delete','Inspect\x20with\x20','some','140808ymdSed','notification_config_delete_outcome_unknown',';\x20do\x20not\x20resubmit\x20automatically.','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','channelType','5611905xZqUTS',';\x20no\x20automatic\x20retry\x20was\x20attempted.','high-risk-write','127247cLHvAo','appCode'];a182_0x1ad4=function(){return _0x53fffd;};return a182_0x1ad4();}export const notificationConfigDelete={'service':'notification','command':a182_0x1c82a9(0x1d3),'description':a182_0x1c82a9(0x1ee),'risk':a182_0x1c82a9(0x1dd),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x370161){readNotificationId(_0x370161),requireNotificationExplicitYes(_0x370161);},async 'dryRun'(_0xdaec75){const _0x31f9da=a182_0x1c82a9,_0x2b1c33=await prepareDelete(_0xdaec75),_0x42b5dc=notificationLookupCommand(_0xdaec75[_0x31f9da(0x1df)],_0x2b1c33['before'][_0x31f9da(0x1da)]);return asDryRunResult({'operation':_0x31f9da(0x1d1),'selector':notificationSelector(_0x2b1c33[_0x31f9da(0x1ed)]),'before':projectNotificationConfig(_0x2b1c33[_0x31f9da(0x1ed)]),'after':null,'dryRun':!![],'backend':{'method':_0x31f9da(0x1eb),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x31f9da(0x1e2),'lookupCommand':_0x42b5dc}},{'method':_0x31f9da(0x1eb),'url':DELETE_PATH});},async 'execute'(_0x587022){const _0x4495b0=a182_0x1c82a9;requireNotificationExplicitYes(_0x587022);const _0x3318c3=await prepareDelete(_0x587022),_0x1afddf=notificationLookupCommand(_0x587022[_0x4495b0(0x1df)],_0x3318c3[_0x4495b0(0x1ed)]['channelType']);let _0xb1f44b=![];try{await deleteNotificationChannelConfig(_0x3318c3['id'],_0x587022[_0x4495b0(0x1df)]);}catch(_0x1344b6){if(!isPlatformTransportFailure(_0x1344b6))throw safeApiFailure(_0x4495b0(0x1d1),_0x4495b0(0x1e1),'Inspect\x20with\x20'+_0x1afddf+_0x4495b0(0x1dc));_0xb1f44b=!![];}let _0x5a9675;try{_0x5a9675=await listNotificationChannelConfigs(_0x587022[_0x4495b0(0x1df)],_0x3318c3[_0x4495b0(0x1ed)][_0x4495b0(0x1da)]),validateNotificationDeleteReadback(_0x5a9675,_0x587022[_0x4495b0(0x1df)],_0x3318c3[_0x4495b0(0x1ed)]['channelType']);}catch{throw notificationError(_0xb1f44b?_0x4495b0(0x1d7):_0x4495b0(0x1d0),'Notification\x20config\x20'+_0x3318c3['id']+_0x4495b0(0x1e7),_0x4495b0(0x1d4)+_0x1afddf+_0x4495b0(0x1d8));}if(_0x5a9675[_0x4495b0(0x1d5)](_0x41e6e6=>_0x41e6e6['id']===_0x3318c3['id']))throw notificationError(_0xb1f44b?_0x4495b0(0x1d7):_0x4495b0(0x1e9),_0x4495b0(0x1f1)+_0x3318c3['id']+'\x20remains\x20present\x20after\x20delete.',_0x4495b0(0x1d4)+_0x1afddf+_0x4495b0(0x1d8));const _0x43db97=[REFERENCE_WARNING];return _0xb1f44b&&_0x43db97[_0x4495b0(0x1e4)]('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0x3318c3[_0x4495b0(0x1ed)]),'before':projectNotificationConfig(_0x3318c3[_0x4495b0(0x1ed)]),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x43db97,'verification':{'status':_0x4495b0(0x1e3),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0xb1f44b,'lookupCommand':_0x1afddf}},'message':_0x4495b0(0x1e8)+_0x3318c3['id']};}};
1
+ const a192_0x31163b=a192_0x8b96;(function(_0x1d206c,_0x5d618b){const _0x34d68f=a192_0x8b96,_0x25825c=_0x1d206c();while(!![]){try{const _0x19cfc7=parseInt(_0x34d68f(0x1f6))/0x1*(parseInt(_0x34d68f(0x1f3))/0x2)+-parseInt(_0x34d68f(0x1f9))/0x3+parseInt(_0x34d68f(0x1fc))/0x4+-parseInt(_0x34d68f(0x1ea))/0x5*(parseInt(_0x34d68f(0x1ef))/0x6)+-parseInt(_0x34d68f(0x1f8))/0x7+parseInt(_0x34d68f(0x1f7))/0x8*(parseInt(_0x34d68f(0x201))/0x9)+parseInt(_0x34d68f(0x1ff))/0xa*(parseInt(_0x34d68f(0x202))/0xb);if(_0x19cfc7===_0x5d618b)break;else _0x25825c['push'](_0x25825c['shift']());}catch(_0x5cb1bb){_0x25825c['push'](_0x25825c['shift']());}}}(a192_0x8ea6,0x5d4d1));function a192_0x8b96(_0x3e5fff,_0x451f37){_0x3e5fff=_0x3e5fff-0x1e8;const _0x8ea63c=a192_0x8ea6();let _0x8b961f=_0x8ea63c[_0x3e5fff];return _0x8b961f;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a192_0x8ea6(){const _0x300cac=['1551UMmqjh','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','notification','170LIMyeC','before','Deleted\x20notification\x20config\x20','notification_config_delete_verification_unavailable','Notification\x20config\x20','31782MPMAvu','appCode','high-risk-write','Inspect\x20with\x20','1634dqCruD','delete','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','406hEVkZT','39504sdidrJ','736078MMxQAV','1880493eeaHZO',';\x20do\x20not\x20resubmit\x20automatically.','POST','729724Huxrdi','notification_config_delete_verification_failed','/notification/channel-config/delete','43770KjQapD','channelType','297uwYdPm'];a192_0x8ea6=function(){return _0x300cac;};return a192_0x8ea6();}import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a192_0x31163b(0x1fe),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(_0x5d7378){const _0x105157=a192_0x31163b,_0x4db397=readNotificationId(_0x5d7378),_0x3dd709=await requireExactNotificationConfig(_0x5d7378[_0x105157(0x1f0)],_0x4db397,_0x105157(0x1f4));return{'id':_0x4db397,'before':_0x3dd709};}export const notificationConfigDelete={'service':a192_0x31163b(0x1e9),'command':'config-delete','description':a192_0x31163b(0x1e8),'risk':a192_0x31163b(0x1f1),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x5304b2){readNotificationId(_0x5304b2),requireNotificationExplicitYes(_0x5304b2);},async 'dryRun'(_0x109a98){const _0x5b4461=a192_0x31163b,_0xa095ea=await prepareDelete(_0x109a98),_0x473845=notificationLookupCommand(_0x109a98['appCode'],_0xa095ea[_0x5b4461(0x1eb)]['channelType']);return asDryRunResult({'operation':_0x5b4461(0x1f4),'selector':notificationSelector(_0xa095ea[_0x5b4461(0x1eb)]),'before':projectNotificationConfig(_0xa095ea[_0x5b4461(0x1eb)]),'after':null,'dryRun':!![],'backend':{'method':_0x5b4461(0x1fb),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':'planned','lookupCommand':_0x473845}},{'method':_0x5b4461(0x1fb),'url':DELETE_PATH});},async 'execute'(_0x26170e){const _0x53f52a=a192_0x31163b;requireNotificationExplicitYes(_0x26170e);const _0xc3a12b=await prepareDelete(_0x26170e),_0x8f2340=notificationLookupCommand(_0x26170e['appCode'],_0xc3a12b[_0x53f52a(0x1eb)][_0x53f52a(0x200)]);let _0x1483dd=![];try{await deleteNotificationChannelConfig(_0xc3a12b['id'],_0x26170e[_0x53f52a(0x1f0)]);}catch(_0x1327e7){if(!isPlatformTransportFailure(_0x1327e7))throw safeApiFailure(_0x53f52a(0x1f4),'mutation',_0x53f52a(0x1f2)+_0x8f2340+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x1483dd=!![];}let _0x4ee2b1;try{_0x4ee2b1=await listNotificationChannelConfigs(_0x26170e[_0x53f52a(0x1f0)],_0xc3a12b[_0x53f52a(0x1eb)][_0x53f52a(0x200)]),validateNotificationDeleteReadback(_0x4ee2b1,_0x26170e[_0x53f52a(0x1f0)],_0xc3a12b[_0x53f52a(0x1eb)][_0x53f52a(0x200)]);}catch{throw notificationError(_0x1483dd?'notification_config_delete_outcome_unknown':_0x53f52a(0x1ed),_0x53f52a(0x1ee)+_0xc3a12b['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x53f52a(0x1f2)+_0x8f2340+_0x53f52a(0x1fa));}if(_0x4ee2b1['some'](_0x41ec28=>_0x41ec28['id']===_0xc3a12b['id']))throw notificationError(_0x1483dd?'notification_config_delete_outcome_unknown':_0x53f52a(0x1fd),_0x53f52a(0x1ee)+_0xc3a12b['id']+'\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20'+_0x8f2340+_0x53f52a(0x1fa));const _0x45fa1d=[REFERENCE_WARNING];return _0x1483dd&&_0x45fa1d['unshift'](_0x53f52a(0x1f5)),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0xc3a12b[_0x53f52a(0x1eb)]),'before':projectNotificationConfig(_0xc3a12b['before']),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x45fa1d,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x1483dd,'lookupCommand':_0x8f2340}},'message':_0x53f52a(0x1ec)+_0xc3a12b['id']};}};
@@ -1 +1 @@
1
- function a183_0x369c(){const _0x19b011=['170HDOmqV','type','Found\x20','22074sMWSWK','boolean','appCode','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','2erveJR','notification','read','6gvjzPe','validation','40mmzfdu','522643tDkaPE','1227240GsdEIm','994672NMFKMs','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','2162JNKoZF','map','801615iJnnqm','trim','length','all','1523880upFRnN','bool','config-list'];a183_0x369c=function(){return _0x19b011;};return a183_0x369c();}const a183_0x14bf1c=a183_0x2e4b;(function(_0xcbb3a8,_0x41715f){const _0x5b2764=a183_0x2e4b,_0x5bf276=_0xcbb3a8();while(!![]){try{const _0x54d063=parseInt(_0x5b2764(0x20b))/0x1*(-parseInt(_0x5b2764(0x1fb))/0x2)+-parseInt(_0x5b2764(0x207))/0x3*(parseInt(_0x5b2764(0x1f6))/0x4)+-parseInt(_0x5b2764(0x1fd))/0x5*(parseInt(_0x5b2764(0x1f4))/0x6)+-parseInt(_0x5b2764(0x1f8))/0x7+-parseInt(_0x5b2764(0x1f9))/0x8+-parseInt(_0x5b2764(0x201))/0x9+parseInt(_0x5b2764(0x204))/0xa*(parseInt(_0x5b2764(0x1f7))/0xb);if(_0x54d063===_0x41715f)break;else _0x5bf276['push'](_0x5bf276['shift']());}catch(_0x1583cc){_0x5bf276['push'](_0x5bf276['shift']());}}}(a183_0x369c,0x1911a));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a183_0x2e4b(_0x38c258,_0x43f70e){_0x38c258=_0x38c258-0x1f4;const _0x369c20=a183_0x369c();let _0x2e4b68=_0x369c20[_0x38c258];return _0x2e4b68;}import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a183_0x14bf1c(0x20c),'command':a183_0x14bf1c(0x203),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a183_0x14bf1c(0x20d),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a183_0x14bf1c(0x205),'type':'string','description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':a183_0x14bf1c(0x200),'type':a183_0x14bf1c(0x208),'default':![],'description':'List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type'}],async 'validate'(_0x4b359f){const _0x34144f=a183_0x14bf1c;if(_0x4b359f[_0x34144f(0x202)](_0x34144f(0x200))&&_0x4b359f['str']('type')[_0x34144f(0x1fe)]())throw CliErrors[_0x34144f(0x1f5)](_0x34144f(0x1fa),'Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.');if(_0x4b359f['bool'](_0x34144f(0x200)))return;readNotificationChannelType(_0x4b359f);},async 'execute'(_0xdc0cc8){const _0x588d07=a183_0x14bf1c;if(_0xdc0cc8[_0x588d07(0x202)](_0x588d07(0x200))){const _0x5407e1=await Promise[_0x588d07(0x200)](NOTIFICATION_CHANNEL_TYPES[_0x588d07(0x1fc)](_0x57a88d=>listNotificationChannelConfigs(_0xdc0cc8['appCode'],_0x57a88d))),_0x53a29d=_0x5407e1['flat']()[_0x588d07(0x1fc)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0xdc0cc8[_0x588d07(0x209)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x53a29d['length'],'configs':_0x53a29d},'message':_0x588d07(0x206)+_0x53a29d[_0x588d07(0x1ff)]+_0x588d07(0x20a)};}const _0x1d34eb=readNotificationChannelType(_0xdc0cc8),_0x3b1190=await listNotificationChannelConfigs(_0xdc0cc8[_0x588d07(0x209)],_0x1d34eb),_0x51af3a=_0x3b1190[_0x588d07(0x1fc)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0xdc0cc8[_0x588d07(0x209)],'channelType':_0x1d34eb,'count':_0x51af3a[_0x588d07(0x1ff)],'configs':_0x51af3a},'message':_0x588d07(0x206)+_0x51af3a[_0x588d07(0x1ff)]+'\x20'+_0x1d34eb+'\x20notification\x20config(s)'};}};
1
+ const a193_0x2a24c0=a193_0x47b7;(function(_0x46465e,_0x4ed551){const _0x27e8ad=a193_0x47b7,_0x237061=_0x46465e();while(!![]){try{const _0x528216=-parseInt(_0x27e8ad(0x1a2))/0x1+-parseInt(_0x27e8ad(0x1a3))/0x2+-parseInt(_0x27e8ad(0x19c))/0x3*(-parseInt(_0x27e8ad(0x1a9))/0x4)+-parseInt(_0x27e8ad(0x1af))/0x5+parseInt(_0x27e8ad(0x1ab))/0x6*(-parseInt(_0x27e8ad(0x1b5))/0x7)+parseInt(_0x27e8ad(0x1b3))/0x8+parseInt(_0x27e8ad(0x1a8))/0x9;if(_0x528216===_0x4ed551)break;else _0x237061['push'](_0x237061['shift']());}catch(_0x543cb6){_0x237061['push'](_0x237061['shift']());}}}(a193_0x24bb,0xcdd06));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a193_0x47b7(_0x923d03,_0x491802){_0x923d03=_0x923d03-0x19c;const _0x24bb17=a193_0x24bb();let _0x47b7f6=_0x24bb17[_0x923d03];return _0x47b7f6;}import{CliErrors}from'../../errors.js';function a193_0x24bb(){const _0x57ea74=['18NFYAkY','read','Found\x20','flat','6755860PSxmUC','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','trim','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','2300136cHkvdE','boolean','2765539onccTX','all','3UzQIrY','appCode','length','notification','bool','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','502417abSqKu','17972cVcgwh','validation','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','map','config-list','19063386VVnCSW','5940596iNjaSx','type'];a193_0x24bb=function(){return _0x57ea74;};return a193_0x24bb();}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a193_0x2a24c0(0x19f),'command':a193_0x2a24c0(0x1a7),'description':a193_0x2a24c0(0x1b0),'risk':a193_0x2a24c0(0x1ac),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a193_0x2a24c0(0x1aa),'type':'string','description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':a193_0x2a24c0(0x1b6),'type':a193_0x2a24c0(0x1b4),'default':![],'description':a193_0x2a24c0(0x1b2)}],async 'validate'(_0x444eec){const _0x16921f=a193_0x2a24c0;if(_0x444eec[_0x16921f(0x1a0)](_0x16921f(0x1b6))&&_0x444eec['str']('type')[_0x16921f(0x1b1)]())throw CliErrors[_0x16921f(0x1a4)](_0x16921f(0x1a5),_0x16921f(0x1a1));if(_0x444eec[_0x16921f(0x1a0)]('all'))return;readNotificationChannelType(_0x444eec);},async 'execute'(_0x50f36a){const _0x2f6ee5=a193_0x2a24c0;if(_0x50f36a['bool']('all')){const _0x57fb57=await Promise[_0x2f6ee5(0x1b6)](NOTIFICATION_CHANNEL_TYPES[_0x2f6ee5(0x1a6)](_0xca10f1=>listNotificationChannelConfigs(_0x50f36a[_0x2f6ee5(0x19d)],_0xca10f1))),_0x4cc694=_0x57fb57[_0x2f6ee5(0x1ae)]()[_0x2f6ee5(0x1a6)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x50f36a[_0x2f6ee5(0x19d)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x4cc694[_0x2f6ee5(0x19e)],'configs':_0x4cc694},'message':_0x2f6ee5(0x1ad)+_0x4cc694[_0x2f6ee5(0x19e)]+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x4ff85c=readNotificationChannelType(_0x50f36a),_0x3bf5c6=await listNotificationChannelConfigs(_0x50f36a[_0x2f6ee5(0x19d)],_0x4ff85c),_0x3f84cf=_0x3bf5c6[_0x2f6ee5(0x1a6)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x50f36a[_0x2f6ee5(0x19d)],'channelType':_0x4ff85c,'count':_0x3f84cf[_0x2f6ee5(0x19e)],'configs':_0x3f84cf},'message':_0x2f6ee5(0x1ad)+_0x3f84cf[_0x2f6ee5(0x19e)]+'\x20'+_0x4ff85c+'\x20notification\x20config(s)'};}};
@@ -1 +1 @@
1
- const a184_0x45e962=a184_0x4e68;(function(_0x1e9199,_0x3eab99){const _0x1cacde=a184_0x4e68,_0x3bc8c8=_0x1e9199();while(!![]){try{const _0x305de5=parseInt(_0x1cacde(0x1d7))/0x1*(parseInt(_0x1cacde(0x1f5))/0x2)+-parseInt(_0x1cacde(0x1da))/0x3*(parseInt(_0x1cacde(0x1f0))/0x4)+-parseInt(_0x1cacde(0x1ce))/0x5+-parseInt(_0x1cacde(0x1ed))/0x6+-parseInt(_0x1cacde(0x1d2))/0x7*(parseInt(_0x1cacde(0x1d4))/0x8)+parseInt(_0x1cacde(0x1cf))/0x9+-parseInt(_0x1cacde(0x1e4))/0xa*(-parseInt(_0x1cacde(0x1e1))/0xb);if(_0x305de5===_0x3eab99)break;else _0x3bc8c8['push'](_0x3bc8c8['shift']());}catch(_0x3a0894){_0x3bc8c8['push'](_0x3bc8c8['shift']());}}}(a184_0x1fb6,0xc244c));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';function a184_0x4e68(_0x378665,_0x3abe0b){_0x378665=_0x378665-0x1ce;const _0x1fb685=a184_0x1fb6();let _0x4e6821=_0x1fb685[_0x378665];return _0x4e6821;}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=a184_0x45e962(0x1e3);async function prepareUpdate(_0x4b97b2){const _0x2d1b8a=a184_0x45e962,_0x2f7d75=readNotificationId(_0x4b97b2),_0x3163cb=await readNotificationDocument(_0x4b97b2,'update'),_0x5905ff=await requireExactNotificationConfig(_0x4b97b2['appCode'],_0x2f7d75,_0x2d1b8a(0x1ec));return{'id':_0x2f7d75,'patch':_0x3163cb,'before':_0x5905ff,'payload':mergeUpdateInput(_0x5905ff,_0x3163cb),'planned':plannedUpdateProjection(_0x5905ff,_0x3163cb)};}function a184_0x1fb6(){const _0x3bdb8d=['363244LBLuwh','6385335edtOss','3213306wMrfeE','notification_config_update_outcome_unknown','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','40236pcciVq',';\x20do\x20not\x20resubmit\x20automatically.','144FTDdQt','patch','\x20with\x20','6IFpmcz','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','Inspect\x20ID\x20','134559GcvkjH','mutation','notification_config_update_verification_failed',';\x20no\x20automatic\x20retry\x20was\x20attempted.','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','high-risk-write','appCode','21714506BwQzGP','channelType','/notification/channel-config/update','10tHsvoQ','notification','before','config-update','Notification\x20config\x20','payload','POST','\x20via\x20','update','1277628ivzRyC','Updated\x20notification\x20config\x20','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','92VsVgOu','verifiedFields','provesChange','Inspect\x20with\x20--id\x20','planned'];a184_0x1fb6=function(){return _0x3bdb8d;};return a184_0x1fb6();}export const notificationConfigUpdate={'service':a184_0x45e962(0x1e5),'command':a184_0x45e962(0x1e7),'description':a184_0x45e962(0x1d8),'risk':a184_0x45e962(0x1df),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x1f75a1){readNotificationId(_0x1f75a1),assertSingleNotificationSource(_0x1f75a1),requireNotificationExplicitYes(_0x1f75a1);},async 'dryRun'(_0x5579b2){const _0x2096c0=a184_0x45e962,_0x28e248=await prepareUpdate(_0x5579b2),_0x559e24=notificationLookupCommand(_0x5579b2[_0x2096c0(0x1e0)],_0x28e248[_0x2096c0(0x1e6)][_0x2096c0(0x1e2)]);return asDryRunResult({'operation':_0x2096c0(0x1ec),'selector':notificationSelector(_0x28e248[_0x2096c0(0x1e6)]),'before':projectNotificationConfig(_0x28e248['before']),'after':_0x28e248[_0x2096c0(0x1f4)],'dryRun':!![],'backend':{'method':_0x2096c0(0x1ea),'path':UPDATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x559e24}},{'method':_0x2096c0(0x1ea),'url':UPDATE_PATH});},async 'execute'(_0x3531d6){const _0x459237=a184_0x45e962;requireNotificationExplicitYes(_0x3531d6);const _0x10bd12=await prepareUpdate(_0x3531d6),_0x32d786=notificationLookupCommand(_0x3531d6[_0x459237(0x1e0)],_0x10bd12[_0x459237(0x1e6)][_0x459237(0x1e2)]);let _0x17a05f=![];try{await updateNotificationChannelConfig(_0x10bd12[_0x459237(0x1e9)]);}catch(_0x5c24f6){if(!isPlatformTransportFailure(_0x5c24f6))throw safeApiFailure(_0x459237(0x1ec),_0x459237(0x1db),_0x459237(0x1d9)+_0x10bd12['id']+_0x459237(0x1d6)+_0x32d786+_0x459237(0x1dd));_0x17a05f=!![];}let _0x57537c;try{const _0x337e2c=await getNotificationChannelConfig(_0x10bd12['id'],_0x3531d6[_0x459237(0x1e0)]);_0x57537c=normalizeExactNotificationConfig(_0x337e2c,_0x10bd12['id'],_0x3531d6[_0x459237(0x1e0)]);}catch{throw notificationError(_0x17a05f?_0x459237(0x1d0):'notification_config_update_verification_unavailable',_0x459237(0x1e8)+_0x10bd12['id']+_0x459237(0x1de),_0x459237(0x1f3)+_0x10bd12['id']+_0x459237(0x1eb)+_0x32d786+_0x459237(0x1d3));}const _0x2b1032=requestedSafeFieldsMatch(_0x10bd12[_0x459237(0x1e6)],_0x57537c,_0x10bd12[_0x459237(0x1d5)]);if(!_0x2b1032['allMatch']||_0x17a05f&&!_0x2b1032[_0x459237(0x1f2)])throw notificationError(_0x17a05f?'notification_config_update_outcome_unknown':_0x459237(0x1dc),'Notification\x20config\x20'+_0x10bd12['id']+_0x459237(0x1ef),_0x459237(0x1f3)+_0x10bd12['id']+_0x459237(0x1eb)+_0x32d786+_0x459237(0x1d3));const _0x483ee4=_0x17a05f?[_0x459237(0x1d1)]:[];return{'ok':!![],'data':{'operation':_0x459237(0x1ec),'selector':notificationSelector(_0x57537c),'before':projectNotificationConfig(_0x10bd12[_0x459237(0x1e6)]),'after':projectNotificationConfig(_0x57537c),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x483ee4,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x17a05f,'verifiedFields':_0x2b1032[_0x459237(0x1f1)],'lookupCommand':_0x32d786}},'message':_0x459237(0x1ee)+_0x57537c['id']};}};
1
+ const a194_0x21d843=a194_0xc06e;function a194_0xc06e(_0x4b87c4,_0x2c5a2c){_0x4b87c4=_0x4b87c4-0x1dc;const _0x577bb9=a194_0x577b();let _0xc06ec5=_0x577bb9[_0x4b87c4];return _0xc06ec5;}(function(_0x105c84,_0x33d83d){const _0xb4acd0=a194_0xc06e,_0x52831b=_0x105c84();while(!![]){try{const _0x420465=parseInt(_0xb4acd0(0x1eb))/0x1+-parseInt(_0xb4acd0(0x1e2))/0x2+-parseInt(_0xb4acd0(0x1f7))/0x3+-parseInt(_0xb4acd0(0x1f1))/0x4*(parseInt(_0xb4acd0(0x1f3))/0x5)+-parseInt(_0xb4acd0(0x1e5))/0x6+parseInt(_0xb4acd0(0x1e1))/0x7*(-parseInt(_0xb4acd0(0x1f6))/0x8)+parseInt(_0xb4acd0(0x1e4))/0x9*(parseInt(_0xb4acd0(0x202))/0xa);if(_0x420465===_0x33d83d)break;else _0x52831b['push'](_0x52831b['shift']());}catch(_0x287cef){_0x52831b['push'](_0x52831b['shift']());}}}(a194_0x577b,0xdf58f));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 a194_0x577b(){const _0x223ecb=['Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch',';\x20do\x20not\x20resubmit\x20automatically.','allMatch','notification_config_update_outcome_unknown','/notification/channel-config/update','update','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','provesChange','17500390NQrOCq','verifiedFields','POST','appCode','channelType','\x20with\x20','patch','1022DFfSGb','2614108dAEHRr','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','27cAqKAp','2134260dIReYg','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','Inspect\x20ID\x20','mutation',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Notification\x20config\x20','382027psOgDt','verified','notification_config_update_verification_failed','high-risk-write','notification_config_update_verification_unavailable','Updated\x20notification\x20config\x20','1331188WtnSbT','planned','20aVnAAz','Inspect\x20with\x20--id\x20','notification','17696KQQVvn','4201227zGuXLt','before','\x20via\x20'];a194_0x577b=function(){return _0x223ecb;};return a194_0x577b();}const UPDATE_PATH=a194_0x21d843(0x1fe);async function prepareUpdate(_0x2cd78e){const _0x500268=a194_0x21d843,_0x4c9fff=readNotificationId(_0x2cd78e),_0x2b9e82=await readNotificationDocument(_0x2cd78e,_0x500268(0x1ff)),_0x50fda3=await requireExactNotificationConfig(_0x2cd78e[_0x500268(0x1dd)],_0x4c9fff,'update');return{'id':_0x4c9fff,'patch':_0x2b9e82,'before':_0x50fda3,'payload':mergeUpdateInput(_0x50fda3,_0x2b9e82),'planned':plannedUpdateProjection(_0x50fda3,_0x2b9e82)};}export const notificationConfigUpdate={'service':a194_0x21d843(0x1f5),'command':'config-update','description':a194_0x21d843(0x1fa),'risk':a194_0x21d843(0x1ee),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4293c0){readNotificationId(_0x4293c0),assertSingleNotificationSource(_0x4293c0),requireNotificationExplicitYes(_0x4293c0);},async 'dryRun'(_0x654042){const _0x4aa704=a194_0x21d843,_0x59a62d=await prepareUpdate(_0x654042),_0x20dfd9=notificationLookupCommand(_0x654042[_0x4aa704(0x1dd)],_0x59a62d[_0x4aa704(0x1f8)][_0x4aa704(0x1de)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x59a62d[_0x4aa704(0x1f8)]),'before':projectNotificationConfig(_0x59a62d['before']),'after':_0x59a62d['planned'],'dryRun':!![],'backend':{'method':_0x4aa704(0x1dc),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x4aa704(0x1f2),'lookupCommand':_0x20dfd9}},{'method':_0x4aa704(0x1dc),'url':UPDATE_PATH});},async 'execute'(_0xb73b6e){const _0x170a34=a194_0x21d843;requireNotificationExplicitYes(_0xb73b6e);const _0x486106=await prepareUpdate(_0xb73b6e),_0x4f6ca3=notificationLookupCommand(_0xb73b6e[_0x170a34(0x1dd)],_0x486106[_0x170a34(0x1f8)][_0x170a34(0x1de)]);let _0x243d65=![];try{await updateNotificationChannelConfig(_0x486106['payload']);}catch(_0x2280b8){if(!isPlatformTransportFailure(_0x2280b8))throw safeApiFailure('update',_0x170a34(0x1e8),_0x170a34(0x1e7)+_0x486106['id']+_0x170a34(0x1df)+_0x4f6ca3+_0x170a34(0x1e9));_0x243d65=!![];}let _0x3fba91;try{const _0x296960=await getNotificationChannelConfig(_0x486106['id'],_0xb73b6e[_0x170a34(0x1dd)]);_0x3fba91=normalizeExactNotificationConfig(_0x296960,_0x486106['id'],_0xb73b6e[_0x170a34(0x1dd)]);}catch{throw notificationError(_0x243d65?_0x170a34(0x1fd):_0x170a34(0x1ef),_0x170a34(0x1ea)+_0x486106['id']+_0x170a34(0x200),_0x170a34(0x1f4)+_0x486106['id']+_0x170a34(0x1f9)+_0x4f6ca3+_0x170a34(0x1fb));}const _0x2639c4=requestedSafeFieldsMatch(_0x486106[_0x170a34(0x1f8)],_0x3fba91,_0x486106[_0x170a34(0x1e0)]);if(!_0x2639c4[_0x170a34(0x1fc)]||_0x243d65&&!_0x2639c4[_0x170a34(0x201)])throw notificationError(_0x243d65?_0x170a34(0x1fd):_0x170a34(0x1ed),'Notification\x20config\x20'+_0x486106['id']+_0x170a34(0x1e6),_0x170a34(0x1f4)+_0x486106['id']+_0x170a34(0x1f9)+_0x4f6ca3+_0x170a34(0x1fb));const _0x63bc88=_0x243d65?[_0x170a34(0x1e3)]:[];return{'ok':!![],'data':{'operation':_0x170a34(0x1ff),'selector':notificationSelector(_0x3fba91),'before':projectNotificationConfig(_0x486106[_0x170a34(0x1f8)]),'after':projectNotificationConfig(_0x3fba91),'dryRun':![],'backend':{'method':_0x170a34(0x1dc),'path':UPDATE_PATH},'warnings':_0x63bc88,'verification':{'status':_0x170a34(0x1ec),'recoveredAfterUnknownResponse':_0x243d65,'verifiedFields':_0x2639c4[_0x170a34(0x203)],'lookupCommand':_0x4f6ca3}},'message':_0x170a34(0x1f0)+_0x3fba91['id']};}};
@@ -1 +1 @@
1
- (function(_0x1d765d,_0x3a53c5){const _0x57daa1=a185_0x3c6a,_0x2ea334=_0x1d765d();while(!![]){try{const _0x371290=-parseInt(_0x57daa1(0xd6))/0x1+-parseInt(_0x57daa1(0xdb))/0x2*(-parseInt(_0x57daa1(0xd8))/0x3)+parseInt(_0x57daa1(0xd5))/0x4*(-parseInt(_0x57daa1(0xda))/0x5)+parseInt(_0x57daa1(0xdd))/0x6+parseInt(_0x57daa1(0xd9))/0x7+-parseInt(_0x57daa1(0xd4))/0x8*(-parseInt(_0x57daa1(0xd7))/0x9)+-parseInt(_0x57daa1(0xdc))/0xa;if(_0x371290===_0x3a53c5)break;else _0x2ea334['push'](_0x2ea334['shift']());}catch(_0x3513e2){_0x2ea334['push'](_0x2ea334['shift']());}}}(a185_0xb6d0,0xc525e));function a185_0x3c6a(_0x133043,_0x378416){_0x133043=_0x133043-0xd4;const _0xb6d0c8=a185_0xb6d0();let _0x3c6abd=_0xb6d0c8[_0x133043];return _0x3c6abd;}function a185_0xb6d0(){const _0x565b19=['432030fgdHxw','8cMHJBo','428284PGwrRa','1024865fnntJD','4337811QTJPIJ','39TWavCG','5988549HsXzJv','25yHkaNd','172598lInBXr','1636400rsRVzw'];a185_0xb6d0=function(){return _0x565b19;};return a185_0xb6d0();}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];
1
+ (function(_0x160358,_0x1ef9eb){const _0x2034d4=a195_0x5445,_0x399acd=_0x160358();while(!![]){try{const _0x462e5b=-parseInt(_0x2034d4(0x120))/0x1+parseInt(_0x2034d4(0x11e))/0x2*(parseInt(_0x2034d4(0x121))/0x3)+parseInt(_0x2034d4(0x122))/0x4*(parseInt(_0x2034d4(0x11f))/0x5)+parseInt(_0x2034d4(0x11b))/0x6*(parseInt(_0x2034d4(0x11c))/0x7)+-parseInt(_0x2034d4(0x123))/0x8+parseInt(_0x2034d4(0x11d))/0x9+parseInt(_0x2034d4(0x125))/0xa*(-parseInt(_0x2034d4(0x124))/0xb);if(_0x462e5b===_0x1ef9eb)break;else _0x399acd['push'](_0x399acd['shift']());}catch(_0x56652c){_0x399acd['push'](_0x399acd['shift']());}}}(a195_0x5b6e,0xce407));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';function a195_0x5445(_0xb09fbb,_0xa632fe){_0xb09fbb=_0xb09fbb-0x11b;const _0x5b6e66=a195_0x5b6e();let _0x544550=_0x5b6e66[_0xb09fbb];return _0x544550;}function a195_0x5b6e(){const _0x1aaf31=['3FGgBUl','4148228gsWRdm','2738888RlHizv','6314mUJpha','22510ScbSww','12UTRYcI','1085833dapQXI','11370015GUjIjd','2261384hGJXqp','5MgMwSZ','1262080IigYCa'];a195_0x5b6e=function(){return _0x1aaf31;};return a195_0x5b6e();}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
@@ -1 +1 @@
1
- const a186_0x47cfd2=a186_0x511c;(function(_0x5bd1eb,_0x299b1c){const _0x41196c=a186_0x511c,_0x51449d=_0x5bd1eb();while(!![]){try{const _0x23c96d=-parseInt(_0x41196c(0x20c))/0x1*(-parseInt(_0x41196c(0x214))/0x2)+parseInt(_0x41196c(0x1bf))/0x3+parseInt(_0x41196c(0x208))/0x4+parseInt(_0x41196c(0x20f))/0x5+parseInt(_0x41196c(0x239))/0x6*(-parseInt(_0x41196c(0x1d6))/0x7)+-parseInt(_0x41196c(0x220))/0x8+-parseInt(_0x41196c(0x1e0))/0x9*(parseInt(_0x41196c(0x1e2))/0xa);if(_0x23c96d===_0x299b1c)break;else _0x51449d['push'](_0x51449d['shift']());}catch(_0x569eac){_0x51449d['push'](_0x51449d['shift']());}}}(a186_0x5d58,0x7c853));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=[a186_0x47cfd2(0x1e4),a186_0x47cfd2(0x21d),a186_0x47cfd2(0x1dc),'WECOM',a186_0x47cfd2(0x23a)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;function a186_0x5d58(){const _0x1fa5ba=['name','bccList','update','\x22\x20is\x20forbidden.','Notification\x20JSON\x20channelConfig\x20field\x20\x22','_unavailable','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','environment\x20variable\x20','path','a\x20string\x20or\x20null','a\x20JSON\x20object\x20or\x20null','\x20failed.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','notification_config_source_unavailable','str','3204964SpyPLh','connectTimeout','Notification\x20JSON\x20source\x20is\x20ambiguous.','from-env','1SIdJON','Notification\x20config\x20list\x20item\x20','\x20--type\x20','3228895XfGdhw','prototype','hasOwnProperty','channelCode','fromName','1333858kkPCuP','rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_response_invalid','description','\x20has\x20invalid\x20field\x20\x22','Notification\x20JSON\x20from\x20','object','\x20has\x20an\x20unsupported\x20channelType.','failed','FEISHU','\x22configName\x22.','keys','6490552AFAaKx','validation','configCode','notification_config_field_required','<redacted>','recipients','notification_config_channel_field_forbidden','has','file','\x22\x20must\x20be\x20','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','endpointUrl','\x20is\x20invalid.','file\x20','ccList','endpointUrlRaw','\x22\x20cannot\x20exceed\x20','\x22\x20must\x20be\x20a\x20non-empty\x20string.','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','number','a\x20JSON\x20object','endpointUrl:null','string','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','kind','3222qZMWYP','WEBHOOK','join','yes','parse','a\x20non-empty\x20string','apiError','replyTo','\x20must\x20be\x20an\x20object.','env','1242021BJhyhG','dry-run','notification_config_field_invalid','emailTargets','preflight','isSafeInteger','\x20has\x20an\x20invalid\x20appCode.','length','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','bool','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','some','Notification\x20config\x20','notification_config_json_invalid','\x20has\x20an\x20invalid\x20channelType.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','Allowed\x20values:\x20','trim','notification_config_field_unknown','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','entries','\x20has\x20an\x20invalid\x20id.','channelConfigRaw','5831QhXKIc','Unknown\x20notification\x20JSON\x20field\x20\x22','Missing\x20notification\x20JSON\x20source.','create','every','subjectPrefix','DINGTALK','stdin','readTimeout','push','2367nOAlfh','type','28870gXdTWV','messageTemplate','EMAIL','channelConfig','\x20is\x20missing\x20required\x20field\x20\x22','Invalid\x20--','\x20--format\x20compress','configName','notification_config_id_invalid','appCode','setEncoding','Invalid\x20notification\x20config\x20response.','notification_config_confirmation_required','call','notification_config_','Application-level\x20notification\x20config\x20ID','\x20characters.','stringify','includes','channelType','Notification\x20JSON\x20field\x20\x22','mutation','Create\x20JSON\x20requires\x20field\x20'];a186_0x5d58=function(){return _0x1fa5ba;};return a186_0x5d58();}const ALLOWED_INPUT_FIELDS=new Set(['configName',a186_0x47cfd2(0x1f5),a186_0x47cfd2(0x22b),a186_0x47cfd2(0x1e5),a186_0x47cfd2(0x217),'connectTimeout',a186_0x47cfd2(0x1de)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a186_0x47cfd2(0x1eb),a186_0x47cfd2(0x222),a186_0x47cfd2(0x212)]),EMAIL_RECIPIENT_FIELDS=new Set([a186_0x47cfd2(0x1c2),a186_0x47cfd2(0x225),a186_0x47cfd2(0x22e),a186_0x47cfd2(0x1fa),a186_0x47cfd2(0x1bc),a186_0x47cfd2(0x1db),a186_0x47cfd2(0x213),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a186_0x47cfd2(0x228),'type':a186_0x47cfd2(0x236),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a186_0x47cfd2(0x1dd),'type':'boolean','required':![],'default':![],'description':a186_0x47cfd2(0x205)},{'name':a186_0x47cfd2(0x20b),'type':a186_0x47cfd2(0x236),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a186_0x47cfd2(0x1f1)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5207d4,_0xbf5b50,_0x4343d2){return new CliError(_0x5207d4,0x1,_0xbf5b50,_0x4343d2);}export function readNotificationId(_0x49832d){const _0x116bcc=a186_0x47cfd2,_0x4e49cc=_0x49832d['num']('id');if(!Number[_0x116bcc(0x1c4)](_0x4e49cc)||_0x4e49cc<=0x0)throw notificationError(_0x116bcc(0x1ea),_0x116bcc(0x232));return _0x4e49cc;}export function requireNotificationExplicitYes(_0x23e3d2){const _0x4dadb6=a186_0x47cfd2;if(_0x23e3d2[_0x4dadb6(0x1c8)](_0x4dadb6(0x1c0))||_0x23e3d2['bool'](_0x4dadb6(0x23c)))return;throw notificationError(_0x4dadb6(0x1ee),'This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.',_0x4dadb6(0x1ce));}export function readNotificationChannelType(_0x249c14,_0x40a1a7=a186_0x47cfd2(0x1e1),_0x38bd28='EMAIL'){const _0x20ce09=a186_0x47cfd2,_0x3ef507=_0x249c14[_0x20ce09(0x207)](_0x40a1a7)[_0x20ce09(0x1d0)]()||_0x38bd28;if(!NOTIFICATION_CHANNEL_TYPES[_0x20ce09(0x1f4)](_0x3ef507))throw CliErrors[_0x20ce09(0x221)](_0x20ce09(0x1e7)+_0x40a1a7+':\x20'+_0x3ef507,_0x20ce09(0x1cf)+NOTIFICATION_CHANNEL_TYPES[_0x20ce09(0x23b)](',\x20')+'.');return _0x3ef507;}export function assertSingleNotificationSource(_0x124f6c){const _0x32fa68=a186_0x47cfd2,_0x19406b=[],_0x24038f=_0x124f6c[_0x32fa68(0x207)](_0x32fa68(0x228))[_0x32fa68(0x1d0)]();if(_0x24038f)_0x19406b['push']({'kind':_0x32fa68(0x228),'path':_0x24038f});if(_0x124f6c['bool']('stdin'))_0x19406b[_0x32fa68(0x1df)]({'kind':_0x32fa68(0x1dd)});const _0x594db3=_0x124f6c[_0x32fa68(0x207)](_0x32fa68(0x20b))[_0x32fa68(0x1d0)]();if(_0x594db3)_0x19406b[_0x32fa68(0x1df)]({'kind':_0x32fa68(0x1be),'name':_0x594db3});if(_0x19406b[_0x32fa68(0x1c6)]===0x0)throw CliErrors[_0x32fa68(0x221)](_0x32fa68(0x1d8),_0x32fa68(0x1c9));if(_0x19406b[_0x32fa68(0x1c6)]>0x1)throw CliErrors[_0x32fa68(0x221)](_0x32fa68(0x20a),_0x32fa68(0x1c9));return _0x19406b[0x0];}export async function readNotificationDocument(_0x47b19d,_0x565c57){const _0x71ceb9=a186_0x47cfd2,_0x512a82=assertSingleNotificationSource(_0x47b19d),_0x540737=_0x512a82[_0x71ceb9(0x238)]==='file'?_0x71ceb9(0x22d)+_0x512a82[_0x71ceb9(0x201)]:_0x512a82[_0x71ceb9(0x238)]===_0x71ceb9(0x1be)?_0x71ceb9(0x200)+_0x512a82['name']:_0x71ceb9(0x1dd);let _0x1bce8b;try{if(_0x512a82[_0x71ceb9(0x238)]===_0x71ceb9(0x228))_0x1bce8b=await readFile(_0x512a82[_0x71ceb9(0x201)],'utf8');else{if(_0x512a82[_0x71ceb9(0x238)]===_0x71ceb9(0x1be)){if(!(_0x512a82[_0x71ceb9(0x1f9)]in process.env))throw notificationError('notification_config_source_unavailable','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x512a82[_0x71ceb9(0x1f9)]);_0x1bce8b=process.env[_0x512a82.name]??'';}else _0x1bce8b=await readStdin();}}catch(_0x4d2dc8){if(_0x4d2dc8 instanceof CliError)throw _0x4d2dc8;throw notificationError(_0x71ceb9(0x206),_0x71ceb9(0x1c7)+_0x540737+'.');}let _0x32605b;try{_0x32605b=JSON[_0x71ceb9(0x23d)](_0x1bce8b);}catch{throw notificationError('notification_config_json_invalid',_0x71ceb9(0x219)+_0x540737+_0x71ceb9(0x22c),_0x71ceb9(0x237));}if(!isJsonObject(_0x32605b))throw notificationError(_0x71ceb9(0x1cc),_0x71ceb9(0x219)+_0x540737+_0x71ceb9(0x1bd));return validateNotificationDocument(_0x32605b,_0x565c57);}function a186_0x511c(_0x4b8c23,_0x3174f3){_0x4b8c23=_0x4b8c23-0x1ba;const _0x5d5814=a186_0x5d58();let _0x511c65=_0x5d5814[_0x4b8c23];return _0x511c65;}export function projectNotificationListConfig(_0xfc2acb,_0x1c216d){const _0x44c8c3=a186_0x47cfd2;return{'id':typeof _0xfc2acb['id']===_0x44c8c3(0x233)?_0xfc2acb['id']:null,'configCode':requireResponseString(_0xfc2acb[_0x44c8c3(0x222)],_0x44c8c3(0x222),_0x1c216d),'configName':requireResponseString(_0xfc2acb[_0x44c8c3(0x1e9)],_0x44c8c3(0x1e9),_0x1c216d),'channelType':requireResponseString(_0xfc2acb[_0x44c8c3(0x1f5)],_0x44c8c3(0x1f5),_0x1c216d),'description':normalizeNullableString(_0xfc2acb[_0x44c8c3(0x217)]),'createTime':normalizeNullableString(_0xfc2acb['createTime']),'updateTime':normalizeNullableString(_0xfc2acb['updateTime'])};}export function normalizeExactNotificationConfig(_0x4da98e,_0x1f8878,_0x15c241){const _0x105edc=a186_0x47cfd2;if(!Number[_0x105edc(0x1c4)](_0x4da98e['id'])||_0x4da98e['id']!==_0x1f8878)throw notificationError(_0x105edc(0x216),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x1f8878+'.');if(_0x4da98e['appCode']!==_0x15c241)throw notificationError(_0x105edc(0x216),_0x105edc(0x1cb)+_0x1f8878+_0x105edc(0x22a));const _0x3f4a2f=requireExactString(_0x4da98e['configName'],'configName',_0x1f8878),_0x3218e8=requireExactString(_0x4da98e[_0x105edc(0x222)],_0x105edc(0x222),_0x1f8878),_0x5f5846=requireExactString(_0x4da98e['channelType'],_0x105edc(0x1f5),_0x1f8878);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x5f5846))throw notificationError(_0x105edc(0x216),_0x105edc(0x1cb)+_0x1f8878+_0x105edc(0x21b));const _0x345a63=responseNullableString(_0x4da98e[_0x105edc(0x22b)],_0x105edc(0x22b),_0x1f8878),_0x1d0148=responseNullableString(_0x4da98e[_0x105edc(0x1e5)],_0x105edc(0x1e5),_0x1f8878),_0x31ea39=responseNullableString(_0x4da98e['description'],_0x105edc(0x217),_0x1f8878),_0x75448b=responseNullableTimeout(_0x4da98e[_0x105edc(0x209)],_0x105edc(0x209),_0x1f8878),_0x2cadb3=responseNullableTimeout(_0x4da98e[_0x105edc(0x1de)],'readTimeout',_0x1f8878);return{'id':_0x1f8878,'appCode':_0x15c241,'configCode':_0x3218e8,'configName':_0x3f4a2f,'channelType':_0x5f5846,'endpointUrl':redactSensitive(_0x345a63),'channelConfig':redactSensitive(_0x1d0148),'description':_0x31ea39,'connectTimeout':_0x75448b,'readTimeout':_0x2cadb3,'endpointUrlRaw':_0x345a63,'channelConfigRaw':_0x1d0148};}export async function requireExactNotificationConfig(_0x379da3,_0x14e38b,_0x814cd5){const _0x5d6784=a186_0x47cfd2;let _0x5b4182;try{_0x5b4182=await getNotificationChannelConfig(_0x14e38b,_0x379da3);}catch{throw safeApiFailure(_0x814cd5,_0x5d6784(0x1c3),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x379da3+_0x5d6784(0x1ff));}return normalizeExactNotificationConfig(_0x5b4182,_0x14e38b,_0x379da3);}export function projectNotificationConfig(_0x40c708){const _0x31600e=a186_0x47cfd2;return{'id':_0x40c708['id']??null,'appCode':_0x40c708['appCode'],'configCode':_0x40c708[_0x31600e(0x222)]??null,'configName':_0x40c708[_0x31600e(0x1e9)],'channelType':_0x40c708[_0x31600e(0x1f5)],'endpointUrl':redactSensitive(_0x40c708[_0x31600e(0x22b)]),'channelConfig':redactSensitive(_0x40c708[_0x31600e(0x1e5)]),'description':_0x40c708['description']??null,'connectTimeout':_0x40c708[_0x31600e(0x209)]??null,'readTimeout':_0x40c708['readTimeout']??null};}export function notificationSelector(_0x2ba3c9){const _0x2759d5=a186_0x47cfd2;return{'appCode':_0x2ba3c9[_0x2759d5(0x1eb)],'id':_0x2ba3c9['id'],'configCode':_0x2ba3c9[_0x2759d5(0x222)],'configName':_0x2ba3c9[_0x2759d5(0x1e9)],'channelType':_0x2ba3c9[_0x2759d5(0x1f5)]};}export function createMutationInput(_0x45c3d6,_0x5109e3){const _0x5df707=a186_0x47cfd2;return{'appCode':_0x45c3d6,'configName':_0x5109e3['configName'],'channelType':_0x5109e3[_0x5df707(0x1f5)],...hasOwn(_0x5109e3,_0x5df707(0x22b))?{'endpointUrl':_0x5109e3['endpointUrl']}:{},...hasOwn(_0x5109e3,_0x5df707(0x1e5))?{'channelConfig':serializeChannelConfig(_0x5109e3['channelConfig'])}:{},...hasOwn(_0x5109e3,_0x5df707(0x217))?{'description':_0x5109e3[_0x5df707(0x217)]}:{},...hasOwn(_0x5109e3,'connectTimeout')?{'connectTimeout':_0x5109e3['connectTimeout']}:{},...hasOwn(_0x5109e3,_0x5df707(0x1de))?{'readTimeout':_0x5109e3[_0x5df707(0x1de)]}:{}};}export function mergeUpdateInput(_0x2dfd66,_0x523cb3){const _0x4103d9=a186_0x47cfd2;return{'id':_0x2dfd66['id'],'appCode':_0x2dfd66['appCode'],'configName':_0x523cb3[_0x4103d9(0x1e9)]??_0x2dfd66[_0x4103d9(0x1e9)],'channelType':_0x523cb3[_0x4103d9(0x1f5)]??_0x2dfd66[_0x4103d9(0x1f5)],'endpointUrl':hasOwn(_0x523cb3,_0x4103d9(0x22b))?_0x523cb3[_0x4103d9(0x22b)]:_0x2dfd66['endpointUrlRaw'],'channelConfig':hasOwn(_0x523cb3,_0x4103d9(0x1e5))?serializeChannelConfig(_0x523cb3[_0x4103d9(0x1e5)]):_0x2dfd66['channelConfigRaw'],'description':hasOwn(_0x523cb3,_0x4103d9(0x217))?_0x523cb3[_0x4103d9(0x217)]:_0x2dfd66[_0x4103d9(0x217)],'connectTimeout':hasOwn(_0x523cb3,_0x4103d9(0x209))?_0x523cb3[_0x4103d9(0x209)]:_0x2dfd66[_0x4103d9(0x209)],'readTimeout':hasOwn(_0x523cb3,_0x4103d9(0x1de))?_0x523cb3['readTimeout']:_0x2dfd66[_0x4103d9(0x1de)]};}export function plannedUpdateProjection(_0x3aa148,_0x491d91){const _0x2a7f23=a186_0x47cfd2;return projectNotificationConfig({'id':_0x3aa148['id'],'appCode':_0x3aa148[_0x2a7f23(0x1eb)],'configCode':_0x3aa148[_0x2a7f23(0x222)],'configName':_0x491d91['configName']??_0x3aa148[_0x2a7f23(0x1e9)],'channelType':_0x491d91[_0x2a7f23(0x1f5)]??_0x3aa148[_0x2a7f23(0x1f5)],'endpointUrl':hasOwn(_0x491d91,_0x2a7f23(0x22b))?_0x491d91[_0x2a7f23(0x22b)]:_0x3aa148[_0x2a7f23(0x22f)],'channelConfig':hasOwn(_0x491d91,_0x2a7f23(0x1e5))?_0x491d91[_0x2a7f23(0x1e5)]:_0x3aa148[_0x2a7f23(0x1d5)],'description':hasOwn(_0x491d91,_0x2a7f23(0x217))?_0x491d91[_0x2a7f23(0x217)]:_0x3aa148[_0x2a7f23(0x217)],'connectTimeout':hasOwn(_0x491d91,_0x2a7f23(0x209))?_0x491d91[_0x2a7f23(0x209)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x3aa148['connectTimeout'],'readTimeout':hasOwn(_0x491d91,_0x2a7f23(0x1de))?_0x491d91[_0x2a7f23(0x1de)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x3aa148[_0x2a7f23(0x1de)]});}export function requestedSafeFieldsMatch(_0x4b735c,_0x3c8297,_0x5bd995){const _0x42183e=a186_0x47cfd2,_0x117f42=[],_0x6b1643=[],_0xa2df34=[];for(const _0x523fc9 of[_0x42183e(0x1e9),_0x42183e(0x1f5),_0x42183e(0x217)]){if(!hasOwn(_0x5bd995,_0x523fc9))continue;_0xa2df34[_0x42183e(0x1df)](_0x523fc9),_0x117f42[_0x42183e(0x1df)](_0x3c8297[_0x523fc9]===_0x5bd995[_0x523fc9]),_0x6b1643['push'](_0x4b735c[_0x523fc9]!==_0x5bd995[_0x523fc9]&&_0x3c8297[_0x523fc9]===_0x5bd995[_0x523fc9]);}for(const _0x4fab3e of[_0x42183e(0x209),'readTimeout']){if(!hasOwn(_0x5bd995,_0x4fab3e))continue;const _0x36d2a4=_0x5bd995[_0x4fab3e]??(_0x4fab3e===_0x42183e(0x209)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0xa2df34[_0x42183e(0x1df)](_0x4fab3e),_0x117f42[_0x42183e(0x1df)](_0x3c8297[_0x4fab3e]===_0x36d2a4),_0x6b1643['push'](_0x4b735c[_0x4fab3e]!==_0x36d2a4&&_0x3c8297[_0x4fab3e]===_0x36d2a4);}return hasOwn(_0x5bd995,_0x42183e(0x22b))&&_0x5bd995[_0x42183e(0x22b)]===null&&(_0xa2df34[_0x42183e(0x1df)](_0x42183e(0x235)),_0x117f42[_0x42183e(0x1df)](_0x3c8297['endpointUrlRaw']===null||_0x3c8297[_0x42183e(0x22f)]===''),_0x6b1643[_0x42183e(0x1df)](_0x4b735c['endpointUrlRaw']!==null&&_0x4b735c[_0x42183e(0x22f)]!==''&&(_0x3c8297[_0x42183e(0x22f)]===null||_0x3c8297[_0x42183e(0x22f)]===''))),{'allMatch':_0x117f42[_0x42183e(0x1da)](Boolean),'provesChange':_0x6b1643[_0x42183e(0x1ca)](Boolean),'verifiedFields':_0xa2df34};}export function validateNotificationDeleteReadback(_0x2cff55,_0x1dd3c4,_0x4b979f){const _0x229312=a186_0x47cfd2;for(const [_0x5b48cc,_0x42ec15]of _0x2cff55[_0x229312(0x1d3)]()){if(!Number[_0x229312(0x1c4)](_0x42ec15['id'])||_0x42ec15['id']<=0x0)throw notificationError(_0x229312(0x216),_0x229312(0x20d)+(_0x5b48cc+0x1)+_0x229312(0x1d4));if(_0x42ec15[_0x229312(0x1eb)]!==_0x1dd3c4)throw notificationError(_0x229312(0x216),_0x229312(0x20d)+(_0x5b48cc+0x1)+_0x229312(0x1c5));if(_0x42ec15['channelType']!==_0x4b979f)throw notificationError('notification_config_response_invalid',_0x229312(0x20d)+(_0x5b48cc+0x1)+_0x229312(0x1cd));}}export function safeApiFailure(_0x2aea11,_0x2e35d2,_0x3348a4){const _0x790e5a=a186_0x47cfd2;return notificationError(_0x790e5a(0x1f0)+_0x2aea11+'_'+(_0x2e35d2===_0x790e5a(0x1f7)?_0x790e5a(0x21c):_0x2e35d2+_0x790e5a(0x1fe)),_0x790e5a(0x1cb)+_0x2aea11+'\x20'+_0x2e35d2+_0x790e5a(0x204),_0x3348a4);}export function notificationLookupCommand(_0x159b2f,_0x4ccced){const _0x5f0b91=a186_0x47cfd2;return _0x5f0b91(0x215)+_0x159b2f+_0x5f0b91(0x20e)+_0x4ccced+_0x5f0b91(0x1e8);}function validateNotificationDocument(_0x39e524,_0x14802f){const _0xdf749a=a186_0x47cfd2;for(const _0x5b74ba of Object[_0xdf749a(0x21f)](_0x39e524)){if(FORBIDDEN_IDENTITY_FIELDS[_0xdf749a(0x227)](_0x5b74ba))throw notificationError('notification_config_field_forbidden',_0xdf749a(0x1f6)+_0x5b74ba+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS['has'](_0x5b74ba))throw notificationError(_0xdf749a(0x1d1),_0xdf749a(0x1d7)+_0x5b74ba+'\x22.');}if(_0x14802f==='update'&&Object[_0xdf749a(0x21f)](_0x39e524)[_0xdf749a(0x1c6)]===0x0)throw notificationError('notification_config_update_empty',_0xdf749a(0x1d2));const _0x35464c={};if(hasOwn(_0x39e524,'configName'))_0x35464c[_0xdf749a(0x1e9)]=validateRequiredString(_0x39e524[_0xdf749a(0x1e9)],_0xdf749a(0x1e9),0x80);else{if(_0x14802f===_0xdf749a(0x1d9))throw notificationError(_0xdf749a(0x223),'Create\x20JSON\x20requires\x20field\x20'+_0xdf749a(0x21e));}if(hasOwn(_0x39e524,_0xdf749a(0x1f5))){if(typeof _0x39e524[_0xdf749a(0x1f5)]!==_0xdf749a(0x236))throw invalidFieldType(_0xdf749a(0x1f5),'a\x20supported\x20string');const _0x42783f=_0x39e524['channelType'][_0xdf749a(0x1d0)]();if(!NOTIFICATION_CHANNEL_TYPES[_0xdf749a(0x1f4)](_0x42783f))throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0xdf749a(0x1cf)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x35464c[_0xdf749a(0x1f5)]=_0x42783f;}else{if(_0x14802f==='create')throw notificationError(_0xdf749a(0x223),_0xdf749a(0x1f8)+'\x22channelType\x22.');}for(const [_0x5c3a20,_0x2b6ccb]of[[_0xdf749a(0x22b),0x200],[_0xdf749a(0x217),0x100]]){if(!hasOwn(_0x39e524,_0x5c3a20))continue;const _0x209dce=_0x39e524[_0x5c3a20];if(_0x209dce!==null&&typeof _0x209dce!==_0xdf749a(0x236))throw invalidFieldType(_0x5c3a20,_0xdf749a(0x202));if(typeof _0x209dce===_0xdf749a(0x236)&&_0x209dce[_0xdf749a(0x1c6)]>_0x2b6ccb)throw notificationError(_0xdf749a(0x1c1),_0xdf749a(0x1f6)+_0x5c3a20+_0xdf749a(0x230)+_0x2b6ccb+_0xdf749a(0x1f2));_0x35464c[_0x5c3a20]=_0x209dce;}if(hasOwn(_0x39e524,_0xdf749a(0x1e5))){const _0xfd94bb=_0x39e524[_0xdf749a(0x1e5)];if(_0xfd94bb===null&&_0x14802f===_0xdf749a(0x1d9))throw invalidFieldType(_0xdf749a(0x1e5),'a\x20JSON\x20object');if(_0xfd94bb!==null&&!isJsonObject(_0xfd94bb))throw invalidFieldType(_0xdf749a(0x1e5),_0x14802f===_0xdf749a(0x1fb)?_0xdf749a(0x203):_0xdf749a(0x234));_0xfd94bb!==null&&validateChannelConfigFields(_0x35464c[_0xdf749a(0x1f5)],_0xfd94bb),_0x35464c[_0xdf749a(0x1e5)]=_0xfd94bb;}for(const _0x2b422a of[_0xdf749a(0x209),_0xdf749a(0x1de)]){if(!hasOwn(_0x39e524,_0x2b422a))continue;const _0x14600b=_0x39e524[_0x2b422a];if(_0x14600b!==null&&(!Number[_0xdf749a(0x1c4)](_0x14600b)||_0x14600b<0x0))throw notificationError('notification_config_field_invalid',_0xdf749a(0x1f6)+_0x2b422a+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x35464c[_0x2b422a]=_0x14600b;}return _0x35464c;}function validateRequiredString(_0x7c3fa2,_0x475c10,_0x1c533d){const _0x40dec1=a186_0x47cfd2;if(typeof _0x7c3fa2!=='string')throw invalidFieldType(_0x475c10,_0x40dec1(0x1ba));const _0x524c31=_0x7c3fa2[_0x40dec1(0x1d0)]();if(!_0x524c31)throw notificationError(_0x40dec1(0x1c1),'Notification\x20JSON\x20field\x20\x22'+_0x475c10+_0x40dec1(0x231));if(_0x524c31[_0x40dec1(0x1c6)]>_0x1c533d)throw notificationError(_0x40dec1(0x1c1),'Notification\x20JSON\x20field\x20\x22'+_0x475c10+'\x22\x20cannot\x20exceed\x20'+_0x1c533d+'\x20characters.');return _0x524c31;}function validateChannelConfigFields(_0x2fe417,_0x3eb219){const _0x569085=a186_0x47cfd2;if(hasOwn(_0x3eb219,_0x569085(0x1e3)))throw forbiddenChannelConfigField(_0x569085(0x1e3));if(_0x2fe417===_0x569085(0x1e4))for(const _0xf8ae39 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x3eb219,_0xf8ae39))throw forbiddenChannelConfigField(_0xf8ae39);}}function forbiddenChannelConfigField(_0x5463b0){const _0xe8e47d=a186_0x47cfd2;return notificationError(_0xe8e47d(0x226),_0xe8e47d(0x1fd)+_0x5463b0+_0xe8e47d(0x1fc));}function invalidFieldType(_0x34d4ef,_0x321c21){const _0x22d118=a186_0x47cfd2;return notificationError(_0x22d118(0x1c1),'Notification\x20JSON\x20field\x20\x22'+_0x34d4ef+_0x22d118(0x229)+_0x321c21+'.');}function serializeChannelConfig(_0x37b507){const _0x3c276b=a186_0x47cfd2;return _0x37b507===null||_0x37b507===undefined?null:JSON[_0x3c276b(0x1f3)](_0x37b507);}function redactSensitive(_0x1e6055){const _0x2aaad4=a186_0x47cfd2;return _0x1e6055===null||_0x1e6055===undefined||_0x1e6055===''?null:_0x2aaad4(0x224);}function requireResponseString(_0x34e63b,_0x59f36f,_0x5aa799){const _0x49fbd7=a186_0x47cfd2;if(typeof _0x34e63b!==_0x49fbd7(0x236)||_0x34e63b['trim']()==='')throw CliErrors[_0x49fbd7(0x1bb)](_0x49fbd7(0x1ed),'Item\x20'+(_0x5aa799+0x1)+_0x49fbd7(0x1e6)+_0x59f36f+'\x22.');return _0x34e63b[_0x49fbd7(0x1d0)]();}function requireExactString(_0x2d0f14,_0x4b941e,_0x3f8a0d){const _0x2a13fb=a186_0x47cfd2;if(typeof _0x2d0f14!=='string'||_0x2d0f14[_0x2a13fb(0x1d0)]()==='')throw notificationError('notification_config_response_invalid',_0x2a13fb(0x1cb)+_0x3f8a0d+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x4b941e+'\x22.');return _0x2d0f14[_0x2a13fb(0x1d0)]();}function responseNullableString(_0x5ebe1d,_0x58b129,_0x2a6f26){const _0xf8ae17=a186_0x47cfd2;if(_0x5ebe1d===undefined||_0x5ebe1d===null)return null;if(typeof _0x5ebe1d!==_0xf8ae17(0x236))throw notificationError('notification_config_response_invalid',_0xf8ae17(0x1cb)+_0x2a6f26+_0xf8ae17(0x218)+_0x58b129+'\x22.');return _0x5ebe1d;}function responseNullableTimeout(_0x52459f,_0x5c9e68,_0x5132c0){const _0x53f150=a186_0x47cfd2;if(_0x52459f===undefined||_0x52459f===null)return null;if(!Number[_0x53f150(0x1c4)](_0x52459f)||_0x52459f<0x0)throw notificationError(_0x53f150(0x216),'Notification\x20config\x20'+_0x5132c0+_0x53f150(0x218)+_0x5c9e68+'\x22.');return _0x52459f;}function normalizeNullableString(_0x254e41){const _0x5f3da1=a186_0x47cfd2;return typeof _0x254e41===_0x5f3da1(0x236)?_0x254e41:null;}function isJsonObject(_0x2a30f2){const _0x457371=a186_0x47cfd2;return _0x2a30f2!==null&&typeof _0x2a30f2===_0x457371(0x21a)&&!Array['isArray'](_0x2a30f2);}function hasOwn(_0x23ba00,_0x35c4df){const _0x58b35c=a186_0x47cfd2;return Object[_0x58b35c(0x210)][_0x58b35c(0x211)][_0x58b35c(0x1ef)](_0x23ba00,_0x35c4df);}async function readStdin(){const _0x201e43=a186_0x47cfd2;let _0x523381='';process[_0x201e43(0x1dd)][_0x201e43(0x1ec)]('utf8');for await(const _0x347f49 of process[_0x201e43(0x1dd)])_0x523381+=_0x347f49;return _0x523381;}
1
+ const a196_0x31ae33=a196_0xcda8;(function(_0x23c5a1,_0x2fba0a){const _0x5491db=a196_0xcda8,_0x554a30=_0x23c5a1();while(!![]){try{const _0x192422=-parseInt(_0x5491db(0x1bc))/0x1*(-parseInt(_0x5491db(0x1ae))/0x2)+parseInt(_0x5491db(0x179))/0x3*(-parseInt(_0x5491db(0x16c))/0x4)+parseInt(_0x5491db(0x18d))/0x5+parseInt(_0x5491db(0x19e))/0x6*(parseInt(_0x5491db(0x1b0))/0x7)+-parseInt(_0x5491db(0x1ad))/0x8*(parseInt(_0x5491db(0x1a1))/0x9)+-parseInt(_0x5491db(0x1c7))/0xa+parseInt(_0x5491db(0x198))/0xb;if(_0x192422===_0x2fba0a)break;else _0x554a30['push'](_0x554a30['shift']());}catch(_0x2043f1){_0x554a30['push'](_0x554a30['shift']());}}}(a196_0x3640,0x71930));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=[a196_0x31ae33(0x1a3),'FEISHU',a196_0x31ae33(0x14b),'WECOM',a196_0x31ae33(0x161)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a196_0x31ae33(0x163),a196_0x31ae33(0x14c),a196_0x31ae33(0x15b),a196_0x31ae33(0x1c2),a196_0x31ae33(0x1a8),a196_0x31ae33(0x1cb),a196_0x31ae33(0x185)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a196_0x31ae33(0x194),a196_0x31ae33(0x15d),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a196_0x31ae33(0x18c),'recipients','ccList',a196_0x31ae33(0x169),a196_0x31ae33(0x165),'subjectPrefix',a196_0x31ae33(0x17b),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a196_0x31ae33(0x19a),'required':![],'description':a196_0x31ae33(0x1c9)},{'name':a196_0x31ae33(0x1c3),'type':a196_0x31ae33(0x1b5),'required':![],'default':![],'description':a196_0x31ae33(0x158)},{'name':'from-env','type':a196_0x31ae33(0x19a),'required':![],'description':a196_0x31ae33(0x1cd)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a196_0x31ae33(0x1a4)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5408c6,_0x34708b,_0xef5547){return new CliError(_0x5408c6,0x1,_0x34708b,_0xef5547);}export function readNotificationId(_0x14dfac){const _0x4bc5a4=a196_0x31ae33,_0x40ad55=_0x14dfac[_0x4bc5a4(0x14a)]('id');if(!Number[_0x4bc5a4(0x167)](_0x40ad55)||_0x40ad55<=0x0)throw notificationError(_0x4bc5a4(0x196),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x40ad55;}export function requireNotificationExplicitYes(_0xe9012a){const _0x526fc8=a196_0x31ae33;if(_0xe9012a[_0x526fc8(0x1c8)](_0x526fc8(0x19d))||_0xe9012a['bool']('yes'))return;throw notificationError('notification_config_confirmation_required',_0x526fc8(0x1bb),_0x526fc8(0x153));}export function readNotificationChannelType(_0x541495,_0x4d6609=a196_0x31ae33(0x17e),_0x26bc54=a196_0x31ae33(0x1a3)){const _0x5c145d=a196_0x31ae33,_0x5d5d66=_0x541495[_0x5c145d(0x1b8)](_0x4d6609)[_0x5c145d(0x190)]()||_0x26bc54;if(!NOTIFICATION_CHANNEL_TYPES[_0x5c145d(0x1bf)](_0x5d5d66))throw CliErrors['validation'](_0x5c145d(0x1c0)+_0x4d6609+':\x20'+_0x5d5d66,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x5d5d66;}export function assertSingleNotificationSource(_0x1db64f){const _0x227947=a196_0x31ae33,_0x4920e4=[],_0x36ad00=_0x1db64f[_0x227947(0x1b8)]('file')['trim']();if(_0x36ad00)_0x4920e4[_0x227947(0x178)]({'kind':_0x227947(0x16d),'path':_0x36ad00});if(_0x1db64f[_0x227947(0x1c8)](_0x227947(0x1c3)))_0x4920e4['push']({'kind':_0x227947(0x1c3)});const _0x3061b=_0x1db64f[_0x227947(0x1b8)](_0x227947(0x160))[_0x227947(0x190)]();if(_0x3061b)_0x4920e4[_0x227947(0x178)]({'kind':_0x227947(0x1c6),'name':_0x3061b});if(_0x4920e4[_0x227947(0x17a)]===0x0)throw CliErrors[_0x227947(0x186)](_0x227947(0x199),_0x227947(0x171));if(_0x4920e4[_0x227947(0x17a)]>0x1)throw CliErrors[_0x227947(0x186)](_0x227947(0x1ba),_0x227947(0x171));return _0x4920e4[0x0];}export async function readNotificationDocument(_0x5a463d,_0x5daeb5){const _0x2ab5a0=a196_0x31ae33,_0x2652d6=assertSingleNotificationSource(_0x5a463d),_0x5e18f0=_0x2652d6[_0x2ab5a0(0x1a5)]===_0x2ab5a0(0x16d)?_0x2ab5a0(0x1ca)+_0x2652d6[_0x2ab5a0(0x18a)]:_0x2652d6[_0x2ab5a0(0x1a5)]===_0x2ab5a0(0x1c6)?_0x2ab5a0(0x1b6)+_0x2652d6[_0x2ab5a0(0x18e)]:_0x2ab5a0(0x1c3);let _0x1a8116;try{if(_0x2652d6[_0x2ab5a0(0x1a5)]===_0x2ab5a0(0x16d))_0x1a8116=await readFile(_0x2652d6[_0x2ab5a0(0x18a)],_0x2ab5a0(0x17c));else{if(_0x2652d6['kind']===_0x2ab5a0(0x1c6)){if(!(_0x2652d6[_0x2ab5a0(0x18e)]in process.env))throw notificationError(_0x2ab5a0(0x149),_0x2ab5a0(0x18f)+_0x2652d6[_0x2ab5a0(0x18e)]);_0x1a8116=process.env[_0x2652d6.name]??'';}else _0x1a8116=await readStdin();}}catch(_0x1cdb15){if(_0x1cdb15 instanceof CliError)throw _0x1cdb15;throw notificationError(_0x2ab5a0(0x149),_0x2ab5a0(0x182)+_0x5e18f0+'.');}let _0xe469d7;try{_0xe469d7=JSON['parse'](_0x1a8116);}catch{throw notificationError('notification_config_json_invalid',_0x2ab5a0(0x1a0)+_0x5e18f0+_0x2ab5a0(0x197),_0x2ab5a0(0x184));}if(!isJsonObject(_0xe469d7))throw notificationError(_0x2ab5a0(0x181),'Notification\x20JSON\x20from\x20'+_0x5e18f0+_0x2ab5a0(0x174));return validateNotificationDocument(_0xe469d7,_0x5daeb5);}export function projectNotificationListConfig(_0x67aa08,_0x5c5a19){const _0x333da7=a196_0x31ae33;return{'id':typeof _0x67aa08['id']===_0x333da7(0x191)?_0x67aa08['id']:null,'configCode':requireResponseString(_0x67aa08[_0x333da7(0x15d)],'configCode',_0x5c5a19),'configName':requireResponseString(_0x67aa08['configName'],_0x333da7(0x163),_0x5c5a19),'channelType':requireResponseString(_0x67aa08['channelType'],_0x333da7(0x14c),_0x5c5a19),'description':normalizeNullableString(_0x67aa08[_0x333da7(0x1a8)]),'createTime':normalizeNullableString(_0x67aa08[_0x333da7(0x1b3)]),'updateTime':normalizeNullableString(_0x67aa08[_0x333da7(0x156)])};}export function normalizeExactNotificationConfig(_0x31d767,_0xca975d,_0x455e82){const _0x30612c=a196_0x31ae33;if(!Number[_0x30612c(0x167)](_0x31d767['id'])||_0x31d767['id']!==_0xca975d)throw notificationError(_0x30612c(0x14f),_0x30612c(0x157)+_0xca975d+'.');if(_0x31d767[_0x30612c(0x194)]!==_0x455e82)throw notificationError('notification_config_response_invalid',_0x30612c(0x18b)+_0xca975d+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x19b8dd=requireExactString(_0x31d767[_0x30612c(0x163)],'configName',_0xca975d),_0x4516f9=requireExactString(_0x31d767[_0x30612c(0x15d)],_0x30612c(0x15d),_0xca975d),_0x57a2f0=requireExactString(_0x31d767['channelType'],'channelType',_0xca975d);if(!NOTIFICATION_CHANNEL_TYPES[_0x30612c(0x1bf)](_0x57a2f0))throw notificationError(_0x30612c(0x14f),_0x30612c(0x18b)+_0xca975d+_0x30612c(0x14e));const _0x2a4e80=responseNullableString(_0x31d767['endpointUrl'],_0x30612c(0x15b),_0xca975d),_0xdd5145=responseNullableString(_0x31d767[_0x30612c(0x1c2)],_0x30612c(0x1c2),_0xca975d),_0x217ad3=responseNullableString(_0x31d767[_0x30612c(0x1a8)],'description',_0xca975d),_0x1c8e5c=responseNullableTimeout(_0x31d767['connectTimeout'],'connectTimeout',_0xca975d),_0x213d32=responseNullableTimeout(_0x31d767[_0x30612c(0x185)],_0x30612c(0x185),_0xca975d);return{'id':_0xca975d,'appCode':_0x455e82,'configCode':_0x4516f9,'configName':_0x19b8dd,'channelType':_0x57a2f0,'endpointUrl':redactSensitive(_0x2a4e80),'channelConfig':redactSensitive(_0xdd5145),'description':_0x217ad3,'connectTimeout':_0x1c8e5c,'readTimeout':_0x213d32,'endpointUrlRaw':_0x2a4e80,'channelConfigRaw':_0xdd5145};}export async function requireExactNotificationConfig(_0x580f65,_0x247609,_0x26a7ef){const _0x32f06d=a196_0x31ae33;let _0xff1627;try{_0xff1627=await getNotificationChannelConfig(_0x247609,_0x580f65);}catch{throw safeApiFailure(_0x26a7ef,_0x32f06d(0x1a2),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x580f65+_0x32f06d(0x151));}return normalizeExactNotificationConfig(_0xff1627,_0x247609,_0x580f65);}export function projectNotificationConfig(_0x1e9ef5){const _0x25a916=a196_0x31ae33;return{'id':_0x1e9ef5['id']??null,'appCode':_0x1e9ef5['appCode'],'configCode':_0x1e9ef5[_0x25a916(0x15d)]??null,'configName':_0x1e9ef5['configName'],'channelType':_0x1e9ef5[_0x25a916(0x14c)],'endpointUrl':redactSensitive(_0x1e9ef5[_0x25a916(0x15b)]),'channelConfig':redactSensitive(_0x1e9ef5[_0x25a916(0x1c2)]),'description':_0x1e9ef5[_0x25a916(0x1a8)]??null,'connectTimeout':_0x1e9ef5['connectTimeout']??null,'readTimeout':_0x1e9ef5[_0x25a916(0x185)]??null};}export function notificationSelector(_0x5f13d2){const _0x1f7cca=a196_0x31ae33;return{'appCode':_0x5f13d2[_0x1f7cca(0x194)],'id':_0x5f13d2['id'],'configCode':_0x5f13d2[_0x1f7cca(0x15d)],'configName':_0x5f13d2[_0x1f7cca(0x163)],'channelType':_0x5f13d2[_0x1f7cca(0x14c)]};}export function createMutationInput(_0x2c2dd5,_0x4c42fd){const _0x5aee6b=a196_0x31ae33;return{'appCode':_0x2c2dd5,'configName':_0x4c42fd[_0x5aee6b(0x163)],'channelType':_0x4c42fd['channelType'],...hasOwn(_0x4c42fd,_0x5aee6b(0x15b))?{'endpointUrl':_0x4c42fd[_0x5aee6b(0x15b)]}:{},...hasOwn(_0x4c42fd,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x4c42fd[_0x5aee6b(0x1c2)])}:{},...hasOwn(_0x4c42fd,_0x5aee6b(0x1a8))?{'description':_0x4c42fd[_0x5aee6b(0x1a8)]}:{},...hasOwn(_0x4c42fd,'connectTimeout')?{'connectTimeout':_0x4c42fd[_0x5aee6b(0x1cb)]}:{},...hasOwn(_0x4c42fd,_0x5aee6b(0x185))?{'readTimeout':_0x4c42fd[_0x5aee6b(0x185)]}:{}};}export function mergeUpdateInput(_0xe5833a,_0x55ac4f){const _0x48b229=a196_0x31ae33;return{'id':_0xe5833a['id'],'appCode':_0xe5833a['appCode'],'configName':_0x55ac4f[_0x48b229(0x163)]??_0xe5833a[_0x48b229(0x163)],'channelType':_0x55ac4f[_0x48b229(0x14c)]??_0xe5833a[_0x48b229(0x14c)],'endpointUrl':hasOwn(_0x55ac4f,_0x48b229(0x15b))?_0x55ac4f[_0x48b229(0x15b)]:_0xe5833a[_0x48b229(0x159)],'channelConfig':hasOwn(_0x55ac4f,_0x48b229(0x1c2))?serializeChannelConfig(_0x55ac4f[_0x48b229(0x1c2)]):_0xe5833a[_0x48b229(0x189)],'description':hasOwn(_0x55ac4f,_0x48b229(0x1a8))?_0x55ac4f[_0x48b229(0x1a8)]:_0xe5833a['description'],'connectTimeout':hasOwn(_0x55ac4f,_0x48b229(0x1cb))?_0x55ac4f[_0x48b229(0x1cb)]:_0xe5833a[_0x48b229(0x1cb)],'readTimeout':hasOwn(_0x55ac4f,_0x48b229(0x185))?_0x55ac4f[_0x48b229(0x185)]:_0xe5833a[_0x48b229(0x185)]};}export function plannedUpdateProjection(_0x5b9818,_0x24fb33){const _0x2628e8=a196_0x31ae33;return projectNotificationConfig({'id':_0x5b9818['id'],'appCode':_0x5b9818[_0x2628e8(0x194)],'configCode':_0x5b9818[_0x2628e8(0x15d)],'configName':_0x24fb33[_0x2628e8(0x163)]??_0x5b9818['configName'],'channelType':_0x24fb33['channelType']??_0x5b9818['channelType'],'endpointUrl':hasOwn(_0x24fb33,_0x2628e8(0x15b))?_0x24fb33[_0x2628e8(0x15b)]:_0x5b9818[_0x2628e8(0x159)],'channelConfig':hasOwn(_0x24fb33,_0x2628e8(0x1c2))?_0x24fb33[_0x2628e8(0x1c2)]:_0x5b9818[_0x2628e8(0x189)],'description':hasOwn(_0x24fb33,_0x2628e8(0x1a8))?_0x24fb33[_0x2628e8(0x1a8)]:_0x5b9818[_0x2628e8(0x1a8)],'connectTimeout':hasOwn(_0x24fb33,'connectTimeout')?_0x24fb33['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x5b9818[_0x2628e8(0x1cb)],'readTimeout':hasOwn(_0x24fb33,_0x2628e8(0x185))?_0x24fb33[_0x2628e8(0x185)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x5b9818[_0x2628e8(0x185)]});}function a196_0xcda8(_0x5a454e,_0x335f31){_0x5a454e=_0x5a454e-0x149;const _0x36407b=a196_0x3640();let _0xcda806=_0x36407b[_0x5a454e];return _0xcda806;}export function requestedSafeFieldsMatch(_0xe391dc,_0x41b3f7,_0x473c12){const _0x2eaf4f=a196_0x31ae33,_0x155637=[],_0x2483f9=[],_0x4bfbf9=[];for(const _0x2b2716 of['configName',_0x2eaf4f(0x14c),_0x2eaf4f(0x1a8)]){if(!hasOwn(_0x473c12,_0x2b2716))continue;_0x4bfbf9[_0x2eaf4f(0x178)](_0x2b2716),_0x155637[_0x2eaf4f(0x178)](_0x41b3f7[_0x2b2716]===_0x473c12[_0x2b2716]),_0x2483f9[_0x2eaf4f(0x178)](_0xe391dc[_0x2b2716]!==_0x473c12[_0x2b2716]&&_0x41b3f7[_0x2b2716]===_0x473c12[_0x2b2716]);}for(const _0x3ffa7b of[_0x2eaf4f(0x1cb),_0x2eaf4f(0x185)]){if(!hasOwn(_0x473c12,_0x3ffa7b))continue;const _0x1ea7f9=_0x473c12[_0x3ffa7b]??(_0x3ffa7b==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x4bfbf9[_0x2eaf4f(0x178)](_0x3ffa7b),_0x155637[_0x2eaf4f(0x178)](_0x41b3f7[_0x3ffa7b]===_0x1ea7f9),_0x2483f9['push'](_0xe391dc[_0x3ffa7b]!==_0x1ea7f9&&_0x41b3f7[_0x3ffa7b]===_0x1ea7f9);}return hasOwn(_0x473c12,_0x2eaf4f(0x15b))&&_0x473c12['endpointUrl']===null&&(_0x4bfbf9['push']('endpointUrl:null'),_0x155637[_0x2eaf4f(0x178)](_0x41b3f7[_0x2eaf4f(0x159)]===null||_0x41b3f7[_0x2eaf4f(0x159)]===''),_0x2483f9[_0x2eaf4f(0x178)](_0xe391dc['endpointUrlRaw']!==null&&_0xe391dc[_0x2eaf4f(0x159)]!==''&&(_0x41b3f7['endpointUrlRaw']===null||_0x41b3f7['endpointUrlRaw']===''))),{'allMatch':_0x155637[_0x2eaf4f(0x1be)](Boolean),'provesChange':_0x2483f9[_0x2eaf4f(0x1b7)](Boolean),'verifiedFields':_0x4bfbf9};}export function validateNotificationDeleteReadback(_0x38c507,_0x55e06f,_0x29781b){const _0x2de69a=a196_0x31ae33;for(const [_0x188687,_0x2a2ea6]of _0x38c507[_0x2de69a(0x1ab)]()){if(!Number[_0x2de69a(0x167)](_0x2a2ea6['id'])||_0x2a2ea6['id']<=0x0)throw notificationError(_0x2de69a(0x14f),'Notification\x20config\x20list\x20item\x20'+(_0x188687+0x1)+_0x2de69a(0x15a));if(_0x2a2ea6[_0x2de69a(0x194)]!==_0x55e06f)throw notificationError(_0x2de69a(0x14f),'Notification\x20config\x20list\x20item\x20'+(_0x188687+0x1)+_0x2de69a(0x173));if(_0x2a2ea6[_0x2de69a(0x14c)]!==_0x29781b)throw notificationError(_0x2de69a(0x14f),_0x2de69a(0x19f)+(_0x188687+0x1)+_0x2de69a(0x192));}}export function safeApiFailure(_0x588bc6,_0x5a9f38,_0x31a075){const _0x58444c=a196_0x31ae33;return notificationError(_0x58444c(0x168)+_0x588bc6+'_'+(_0x5a9f38===_0x58444c(0x195)?'failed':_0x5a9f38+_0x58444c(0x15e)),_0x58444c(0x18b)+_0x588bc6+'\x20'+_0x5a9f38+_0x58444c(0x193),_0x31a075);}export function notificationLookupCommand(_0x338a3e,_0x28cf31){const _0x243a65=a196_0x31ae33;return _0x243a65(0x187)+_0x338a3e+_0x243a65(0x1af)+_0x28cf31+_0x243a65(0x155);}function validateNotificationDocument(_0x2e1c00,_0x2ed014){const _0x199260=a196_0x31ae33;for(const _0xd69e73 of Object[_0x199260(0x170)](_0x2e1c00)){if(FORBIDDEN_IDENTITY_FIELDS[_0x199260(0x150)](_0xd69e73))throw notificationError(_0x199260(0x1ac),_0x199260(0x1b2)+_0xd69e73+_0x199260(0x152));if(!ALLOWED_INPUT_FIELDS['has'](_0xd69e73))throw notificationError(_0x199260(0x15f),_0x199260(0x176)+_0xd69e73+'\x22.');}if(_0x2ed014===_0x199260(0x1a9)&&Object[_0x199260(0x170)](_0x2e1c00)['length']===0x0)throw notificationError(_0x199260(0x177),_0x199260(0x183));const _0x1b28a0={};if(hasOwn(_0x2e1c00,_0x199260(0x163)))_0x1b28a0[_0x199260(0x163)]=validateRequiredString(_0x2e1c00[_0x199260(0x163)],_0x199260(0x163),0x80);else{if(_0x2ed014==='create')throw notificationError(_0x199260(0x16e),_0x199260(0x1bd)+_0x199260(0x175));}if(hasOwn(_0x2e1c00,_0x199260(0x14c))){if(typeof _0x2e1c00[_0x199260(0x14c)]!==_0x199260(0x19a))throw invalidFieldType('channelType',_0x199260(0x162));const _0x23bf4d=_0x2e1c00[_0x199260(0x14c)][_0x199260(0x190)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x23bf4d))throw notificationError(_0x199260(0x1b9),_0x199260(0x16b),_0x199260(0x1a7)+NOTIFICATION_CHANNEL_TYPES[_0x199260(0x172)](',\x20')+'.');_0x1b28a0[_0x199260(0x14c)]=_0x23bf4d;}else{if(_0x2ed014===_0x199260(0x188))throw notificationError(_0x199260(0x16e),_0x199260(0x1bd)+'\x22channelType\x22.');}for(const [_0x19fe0c,_0x22eb11]of[[_0x199260(0x15b),0x200],[_0x199260(0x1a8),0x100]]){if(!hasOwn(_0x2e1c00,_0x19fe0c))continue;const _0x38f83c=_0x2e1c00[_0x19fe0c];if(_0x38f83c!==null&&typeof _0x38f83c!==_0x199260(0x19a))throw invalidFieldType(_0x19fe0c,_0x199260(0x17f));if(typeof _0x38f83c===_0x199260(0x19a)&&_0x38f83c['length']>_0x22eb11)throw notificationError(_0x199260(0x1b9),'Notification\x20JSON\x20field\x20\x22'+_0x19fe0c+_0x199260(0x16f)+_0x22eb11+_0x199260(0x164));_0x1b28a0[_0x19fe0c]=_0x38f83c;}if(hasOwn(_0x2e1c00,_0x199260(0x1c2))){const _0x17d93e=_0x2e1c00[_0x199260(0x1c2)];if(_0x17d93e===null&&_0x2ed014==='create')throw invalidFieldType(_0x199260(0x1c2),'a\x20JSON\x20object');if(_0x17d93e!==null&&!isJsonObject(_0x17d93e))throw invalidFieldType(_0x199260(0x1c2),_0x2ed014===_0x199260(0x1a9)?'a\x20JSON\x20object\x20or\x20null':_0x199260(0x1cc));_0x17d93e!==null&&validateChannelConfigFields(_0x1b28a0['channelType'],_0x17d93e),_0x1b28a0[_0x199260(0x1c2)]=_0x17d93e;}for(const _0x58704e of[_0x199260(0x1cb),_0x199260(0x185)]){if(!hasOwn(_0x2e1c00,_0x58704e))continue;const _0x3c8211=_0x2e1c00[_0x58704e];if(_0x3c8211!==null&&(!Number[_0x199260(0x167)](_0x3c8211)||_0x3c8211<0x0))throw notificationError(_0x199260(0x1b9),_0x199260(0x1b2)+_0x58704e+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x1b28a0[_0x58704e]=_0x3c8211;}return _0x1b28a0;}function validateRequiredString(_0x3f58cf,_0xde4945,_0xc2f5a6){const _0x27b634=a196_0x31ae33;if(typeof _0x3f58cf!==_0x27b634(0x19a))throw invalidFieldType(_0xde4945,_0x27b634(0x166));const _0x17f641=_0x3f58cf[_0x27b634(0x190)]();if(!_0x17f641)throw notificationError(_0x27b634(0x1b9),_0x27b634(0x1b2)+_0xde4945+_0x27b634(0x16a));if(_0x17f641[_0x27b634(0x17a)]>_0xc2f5a6)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0xde4945+_0x27b634(0x16f)+_0xc2f5a6+_0x27b634(0x164));return _0x17f641;}function validateChannelConfigFields(_0x2aa7c5,_0x1c3191){const _0x2330fe=a196_0x31ae33;if(hasOwn(_0x1c3191,_0x2330fe(0x154)))throw forbiddenChannelConfigField(_0x2330fe(0x154));if(_0x2aa7c5===_0x2330fe(0x1a3))for(const _0x37e246 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x1c3191,_0x37e246))throw forbiddenChannelConfigField(_0x37e246);}}function forbiddenChannelConfigField(_0x24ca90){const _0x3572df=a196_0x31ae33;return notificationError('notification_config_channel_field_forbidden',_0x3572df(0x1b1)+_0x24ca90+_0x3572df(0x180));}function invalidFieldType(_0x394c4c,_0x245c94){const _0xdba886=a196_0x31ae33;return notificationError(_0xdba886(0x1b9),_0xdba886(0x1b2)+_0x394c4c+_0xdba886(0x15c)+_0x245c94+'.');}function serializeChannelConfig(_0x21c666){const _0x4d26ca=a196_0x31ae33;return _0x21c666===null||_0x21c666===undefined?null:JSON[_0x4d26ca(0x1a6)](_0x21c666);}function redactSensitive(_0x2df796){const _0x39e6b6=a196_0x31ae33;return _0x2df796===null||_0x2df796===undefined||_0x2df796===''?null:_0x39e6b6(0x19b);}function requireResponseString(_0x12778f,_0x40034d,_0xf4aaa5){const _0x418646=a196_0x31ae33;if(typeof _0x12778f!=='string'||_0x12778f[_0x418646(0x190)]()==='')throw CliErrors[_0x418646(0x1b4)](_0x418646(0x1c5),'Item\x20'+(_0xf4aaa5+0x1)+_0x418646(0x1c4)+_0x40034d+'\x22.');return _0x12778f[_0x418646(0x190)]();}function requireExactString(_0x37f740,_0x555b5e,_0x1ad26d){const _0x1fcd18=a196_0x31ae33;if(typeof _0x37f740!=='string'||_0x37f740[_0x1fcd18(0x190)]()==='')throw notificationError(_0x1fcd18(0x14f),'Notification\x20config\x20'+_0x1ad26d+_0x1fcd18(0x1c4)+_0x555b5e+'\x22.');return _0x37f740[_0x1fcd18(0x190)]();}function responseNullableString(_0xf5dc02,_0x20a5c5,_0x56d281){const _0xe30d6e=a196_0x31ae33;if(_0xf5dc02===undefined||_0xf5dc02===null)return null;if(typeof _0xf5dc02!=='string')throw notificationError(_0xe30d6e(0x14f),_0xe30d6e(0x18b)+_0x56d281+_0xe30d6e(0x19c)+_0x20a5c5+'\x22.');return _0xf5dc02;}function responseNullableTimeout(_0x3d10a1,_0x2b11b6,_0x4ccaa8){const _0x383981=a196_0x31ae33;if(_0x3d10a1===undefined||_0x3d10a1===null)return null;if(!Number['isSafeInteger'](_0x3d10a1)||_0x3d10a1<0x0)throw notificationError('notification_config_response_invalid',_0x383981(0x18b)+_0x4ccaa8+'\x20has\x20invalid\x20field\x20\x22'+_0x2b11b6+'\x22.');return _0x3d10a1;}function normalizeNullableString(_0x6d003c){const _0xcad256=a196_0x31ae33;return typeof _0x6d003c===_0xcad256(0x19a)?_0x6d003c:null;}function a196_0x3640(){const _0x5792bd=['hasOwnProperty','\x20has\x20an\x20unsupported\x20channelType.','notification_config_response_invalid','has','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','messageTemplate','\x20--format\x20compress','updateTime','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','endpointUrlRaw','\x20has\x20an\x20invalid\x20id.','endpointUrl','\x22\x20must\x20be\x20','configCode','_unavailable','notification_config_field_unknown','from-env','WEBHOOK','a\x20supported\x20string','configName','\x20characters.','replyTo','a\x20non-empty\x20string','isSafeInteger','notification_config_','bccList','\x22\x20must\x20be\x20a\x20non-empty\x20string.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','90556XxVnWi','file','notification_config_field_required','\x22\x20cannot\x20exceed\x20','keys','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','join','\x20has\x20an\x20invalid\x20appCode.','\x20must\x20be\x20an\x20object.','\x22configName\x22.','Unknown\x20notification\x20JSON\x20field\x20\x22','notification_config_update_empty','push','114bCsgLA','length','fromName','utf8','isArray','type','a\x20string\x20or\x20null','\x22\x20is\x20forbidden.','notification_config_json_invalid','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','readTimeout','validation','rabetbase\x20notification\x20config-list\x20--appcode\x20','create','channelConfigRaw','path','Notification\x20config\x20','emailTargets','2220040PpVTMO','name','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','trim','number','\x20has\x20an\x20invalid\x20channelType.','\x20failed.','appCode','mutation','notification_config_id_invalid','\x20is\x20invalid.','18373399PpIbZG','Missing\x20notification\x20JSON\x20source.','string','<redacted>','\x20has\x20invalid\x20field\x20\x22','dry-run','36DzstQc','Notification\x20config\x20list\x20item\x20','Notification\x20JSON\x20from\x20','1611GvYJCc','preflight','EMAIL','Application-level\x20notification\x20config\x20ID','kind','stringify','Allowed\x20values:\x20','description','update','prototype','entries','notification_config_field_forbidden','34952KXCdlx','18rPOfHk','\x20--type\x20','281337XQaWhb','Notification\x20JSON\x20channelConfig\x20field\x20\x22','Notification\x20JSON\x20field\x20\x22','createTime','apiError','boolean','environment\x20variable\x20','some','str','notification_config_field_invalid','Notification\x20JSON\x20source\x20is\x20ambiguous.','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','3965UqLodZ','Create\x20JSON\x20requires\x20field\x20','every','includes','Invalid\x20--','call','channelConfig','stdin','\x20is\x20missing\x20required\x20field\x20\x22','Invalid\x20notification\x20config\x20response.','env','2836150qjRfQD','bool','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','file\x20','connectTimeout','a\x20JSON\x20object','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','notification_config_source_unavailable','num','DINGTALK','channelType'];a196_0x3640=function(){return _0x5792bd;};return a196_0x3640();}function isJsonObject(_0x1d188c){const _0x46eb85=a196_0x31ae33;return _0x1d188c!==null&&typeof _0x1d188c==='object'&&!Array[_0x46eb85(0x17d)](_0x1d188c);}function hasOwn(_0x1df4dd,_0x1b941c){const _0xcd2e35=a196_0x31ae33;return Object[_0xcd2e35(0x1aa)][_0xcd2e35(0x14d)][_0xcd2e35(0x1c1)](_0x1df4dd,_0x1b941c);}async function readStdin(){const _0x2f27a7=a196_0x31ae33;let _0x1ccf9e='';process[_0x2f27a7(0x1c3)]['setEncoding']('utf8');for await(const _0x247212 of process[_0x2f27a7(0x1c3)])_0x1ccf9e+=_0x247212;return _0x1ccf9e;}
@@ -1 +1 @@
1
- function a187_0x191d(_0x5cb291,_0x9ab94){_0x5cb291=_0x5cb291-0xf4;const _0x583242=a187_0x5832();let _0x191d06=_0x583242[_0x5cb291];return _0x191d06;}const a187_0x382fd8=a187_0x191d;(function(_0x283779,_0x43c64b){const _0x269a61=a187_0x191d,_0xa3a3f1=_0x283779();while(!![]){try{const _0x54a38c=parseInt(_0x269a61(0x121))/0x1+-parseInt(_0x269a61(0xfa))/0x2+parseInt(_0x269a61(0x10b))/0x3*(parseInt(_0x269a61(0xf6))/0x4)+-parseInt(_0x269a61(0x111))/0x5*(parseInt(_0x269a61(0x10f))/0x6)+parseInt(_0x269a61(0x10a))/0x7+parseInt(_0x269a61(0xf5))/0x8+parseInt(_0x269a61(0x110))/0x9*(parseInt(_0x269a61(0x114))/0xa);if(_0x54a38c===_0x43c64b)break;else _0xa3a3f1['push'](_0xa3a3f1['shift']());}catch(_0x1bf263){_0xa3a3f1['push'](_0xa3a3f1['shift']());}}}(a187_0x5832,0x3c8af));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a187_0x5832(){const _0xe64b6=['19497gCaacP','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','general','Invoice','join','3713488qduWiW','2860dgIKfs','/smartapi/ocr/recognize-text?','\x20OCR\x20from\x20URL','appCode','236944LySRxy','form','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','imageUrl','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','\x20OCR','path','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','invoice','scene','Publicly\x20accessible\x20image\x20or\x20file\x20URL','trim','str','idCard','/smartapi/common/queryFileUrl','607628aXmfCi','42FrgxRO','validation','string','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','6YTvHyn','1233lBErHf','1564780MluaGz','Table','imageFile','7220PriALn','filter','/smartapi/common/uploadFile','image-file','GET','ocr','filePath','length','fileUrl','apiError','File\x20URL\x20response\x20missing\x20fileUrl.','image-url','General'];a187_0x5832=function(){return _0xe64b6;};return a187_0x5832();}const SUPPORTED_SCENES=[a187_0x382fd8(0x103),a187_0x382fd8(0x123),a187_0x382fd8(0xfb),a187_0x382fd8(0x108)],SCENE_TO_LEGACY_TYPE={'invoice':a187_0x382fd8(0x124),'general':a187_0x382fd8(0x120),'form':a187_0x382fd8(0x112),'idCard':'IdCard'},SCENE_FLAG={'name':'scene','type':a187_0x382fd8(0x10d),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a187_0x382fd8(0xff)},IMAGE_FILE_FLAG={'name':a187_0x382fd8(0x117),'type':a187_0x382fd8(0x10d),'description':a187_0x382fd8(0x122)},IMAGE_URL_FLAG={'name':a187_0x382fd8(0x11f),'type':'string','description':a187_0x382fd8(0x105)};function normalizeScene(_0x13b3cd){const _0x38d51c=a187_0x382fd8,_0x86cbff=_0x13b3cd[_0x38d51c(0x106)]()['toLowerCase']();if(_0x86cbff==='idcard')return _0x38d51c(0x108);if(_0x86cbff===_0x38d51c(0x103)||_0x86cbff===_0x38d51c(0x123)||_0x86cbff==='form')return _0x86cbff;throw CliErrors['validation']('Unsupported\x20OCR\x20scene:\x20'+_0x13b3cd+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x38d51c(0xf4)](',\x20'));}function selectedInputs(_0x46fc03){const _0x7bbb42=a187_0x382fd8,_0x4b10ae=_0x46fc03['str'](_0x7bbb42(0x117))[_0x7bbb42(0x106)](),_0xc97ec3=_0x46fc03[_0x7bbb42(0x107)]('image-url')[_0x7bbb42(0x106)]();return{'imageFile':_0x4b10ae,'imageUrl':_0xc97ec3,'count':[_0x4b10ae,_0xc97ec3][_0x7bbb42(0x115)](Boolean)[_0x7bbb42(0x11b)]};}function validateInputSelection(_0x2c2a77){const _0x12913a=a187_0x382fd8,_0x2865f6=selectedInputs(_0x2c2a77);if(_0x2865f6['count']!==0x1)throw CliErrors[_0x12913a(0x10c)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x2865f6;}function withScene(_0x2224d8,_0x30b3b5,_0x39193e){const _0x34e3d4=a187_0x382fd8;return{..._0x2224d8,'scene':_0x30b3b5,..._0x39193e?{'sourceFile':{'fileName':_0x39193e['fileName'],'filePath':_0x39193e[_0x34e3d4(0x11a)]}}:{}};}const ocrRecognize={'service':a187_0x382fd8(0x119),'command':'recognize','description':a187_0x382fd8(0x10e),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x29a708){const _0xf2ae94=a187_0x382fd8,_0x580265=normalizeScene(_0x29a708['str']('scene')),_0x5e2bfc=SCENE_TO_LEGACY_TYPE[_0x580265],_0xf2b083=validateInputSelection(_0x29a708);if(_0xf2b083[_0xf2ae94(0xfd)]){const _0x1dbbb9=new URLSearchParams({'url':_0xf2b083[_0xf2ae94(0xfd)],'type':_0x5e2bfc,'appCode':_0x29a708['appCode']});return{'method':'GET','url':_0xf2ae94(0xf7)+_0x1dbbb9['toString'](),'description':'Preview:\x20recognize\x20'+_0x580265+_0xf2ae94(0xf8)};}const _0x4d101c=requireDevelopmentUploadFile(_0xf2b083[_0xf2ae94(0x113)],'image-file');return{'method':'POST','url':_0xf2ae94(0x116),'body':{'steps':[{'method':'POST','url':_0xf2ae94(0x116),'body':{'appCode':_0x29a708[_0xf2ae94(0xf9)],'multipart':{'file':_0x4d101c}}},{'method':'POST','url':_0xf2ae94(0x109),'body':{'filePath':_0xf2ae94(0xfe),'downloadFlag':![]}},{'method':_0xf2ae94(0x118),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x29a708[_0xf2ae94(0xf9)],'url':_0xf2ae94(0x102),'type':_0x5e2bfc}}]},'description':_0xf2ae94(0xfc)+_0x580265+_0xf2ae94(0x100)};},async 'execute'(_0x2b36c6){const _0x51c6bd=a187_0x382fd8,_0x45a52a=normalizeScene(_0x2b36c6[_0x51c6bd(0x107)](_0x51c6bd(0x104))),_0x140e87=SCENE_TO_LEGACY_TYPE[_0x45a52a],_0x1762b3=validateInputSelection(_0x2b36c6);if(_0x1762b3[_0x51c6bd(0xfd)]){const _0x4d8ee3=await recognizeDevelopmentOcr(_0x2b36c6[_0x51c6bd(0xf9)],{'url':_0x1762b3['imageUrl'],'type':_0x140e87});return{'ok':!![],'data':withScene(_0x4d8ee3,_0x45a52a)};}const _0x6d424c=requireDevelopmentUploadFile(_0x1762b3[_0x51c6bd(0x113)],_0x51c6bd(0x117)),_0x40c4d3=await uploadDevelopmentFile(_0x2b36c6[_0x51c6bd(0xf9)],_0x6d424c[_0x51c6bd(0x101)]);if(!_0x40c4d3[_0x51c6bd(0x11a)])throw CliErrors[_0x51c6bd(0x11d)]('File\x20upload\x20response\x20missing\x20filePath.');const _0xcc51a0=await queryDevelopmentFileUrl(_0x40c4d3[_0x51c6bd(0x11a)],{'download':![]});if(!_0xcc51a0['fileUrl'])throw CliErrors[_0x51c6bd(0x11d)](_0x51c6bd(0x11e));const _0x485b00=await recognizeDevelopmentOcr(_0x2b36c6[_0x51c6bd(0xf9)],{'url':_0xcc51a0[_0x51c6bd(0x11c)],'type':_0x140e87});return{'ok':!![],'data':withScene(_0x485b00,_0x45a52a,_0x40c4d3)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a197_0xd9c850=a197_0x3c20;(function(_0x33bbbf,_0x3e05a0){const _0x13576d=a197_0x3c20,_0x50b91a=_0x33bbbf();while(!![]){try{const _0x3d8f38=parseInt(_0x13576d(0x11a))/0x1*(parseInt(_0x13576d(0x13a))/0x2)+-parseInt(_0x13576d(0x11e))/0x3*(parseInt(_0x13576d(0x123))/0x4)+-parseInt(_0x13576d(0x125))/0x5*(parseInt(_0x13576d(0x12d))/0x6)+parseInt(_0x13576d(0x119))/0x7+-parseInt(_0x13576d(0x108))/0x8+parseInt(_0x13576d(0x121))/0x9*(-parseInt(_0x13576d(0x131))/0xa)+parseInt(_0x13576d(0x10f))/0xb*(parseInt(_0x13576d(0x106))/0xc);if(_0x3d8f38===_0x3e05a0)break;else _0x50b91a['push'](_0x50b91a['shift']());}catch(_0x2a0e59){_0x50b91a['push'](_0x50b91a['shift']());}}}(a197_0x2037,0x83110));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=['invoice',a197_0xd9c850(0x136),'form',a197_0xd9c850(0x126)],SCENE_TO_LEGACY_TYPE={'invoice':a197_0xd9c850(0x10b),'general':a197_0xd9c850(0x102),'form':a197_0xd9c850(0x10c),'idCard':a197_0xd9c850(0x120)},SCENE_FLAG={'name':a197_0xd9c850(0x134),'type':a197_0xd9c850(0x12a),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a197_0xd9c850(0x105)},IMAGE_FILE_FLAG={'name':a197_0xd9c850(0x116),'type':a197_0xd9c850(0x12a),'description':a197_0xd9c850(0x114)},IMAGE_URL_FLAG={'name':a197_0xd9c850(0x117),'type':a197_0xd9c850(0x12a),'description':a197_0xd9c850(0x109)};function normalizeScene(_0x44f484){const _0x2d628c=a197_0xd9c850,_0x18edbf=_0x44f484[_0x2d628c(0x115)]()[_0x2d628c(0x139)]();if(_0x18edbf===_0x2d628c(0x118))return'idCard';if(_0x18edbf===_0x2d628c(0x12c)||_0x18edbf===_0x2d628c(0x136)||_0x18edbf===_0x2d628c(0x11c))return _0x18edbf;throw CliErrors['validation']('Unsupported\x20OCR\x20scene:\x20'+_0x44f484+_0x2d628c(0x112)+SUPPORTED_SCENES[_0x2d628c(0x107)](',\x20'));}function a197_0x3c20(_0x249bb4,_0x24a977){_0x249bb4=_0x249bb4-0x100;const _0x203772=a197_0x2037();let _0x3c20e2=_0x203772[_0x249bb4];return _0x3c20e2;}function selectedInputs(_0x3a4d5c){const _0x3b782d=a197_0xd9c850,_0x3f7e85=_0x3a4d5c[_0x3b782d(0x128)](_0x3b782d(0x116))['trim'](),_0x516ab2=_0x3a4d5c[_0x3b782d(0x128)](_0x3b782d(0x117))[_0x3b782d(0x115)]();return{'imageFile':_0x3f7e85,'imageUrl':_0x516ab2,'count':[_0x3f7e85,_0x516ab2][_0x3b782d(0x12f)](Boolean)[_0x3b782d(0x10a)]};}function validateInputSelection(_0x509f30){const _0x78a85=a197_0xd9c850,_0x18f3a2=selectedInputs(_0x509f30);if(_0x18f3a2[_0x78a85(0x103)]!==0x1)throw CliErrors[_0x78a85(0x127)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x18f3a2;}function withScene(_0x20ce2c,_0x331cd6,_0x266e32){const _0x450c2f=a197_0xd9c850;return{..._0x20ce2c,'scene':_0x331cd6,..._0x266e32?{'sourceFile':{'fileName':_0x266e32[_0x450c2f(0x137)],'filePath':_0x266e32['filePath']}}:{}};}const ocrRecognize={'service':'ocr','command':'recognize','description':a197_0xd9c850(0x12e),'risk':a197_0xd9c850(0x110),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x4d0c1f){const _0x3b58a0=a197_0xd9c850,_0x558569=normalizeScene(_0x4d0c1f['str'](_0x3b58a0(0x134))),_0x53068c=SCENE_TO_LEGACY_TYPE[_0x558569],_0x54daa8=validateInputSelection(_0x4d0c1f);if(_0x54daa8[_0x3b58a0(0x100)]){const _0x40ec26=new URLSearchParams({'url':_0x54daa8[_0x3b58a0(0x100)],'type':_0x53068c,'appCode':_0x4d0c1f[_0x3b58a0(0x124)]});return{'method':_0x3b58a0(0x135),'url':_0x3b58a0(0x101)+_0x40ec26[_0x3b58a0(0x11d)](),'description':_0x3b58a0(0x11f)+_0x558569+'\x20OCR\x20from\x20URL'};}const _0x1016a3=requireDevelopmentUploadFile(_0x54daa8['imageFile'],'image-file');return{'method':_0x3b58a0(0x129),'url':_0x3b58a0(0x13b),'body':{'steps':[{'method':_0x3b58a0(0x129),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x4d0c1f[_0x3b58a0(0x124)],'multipart':{'file':_0x1016a3}}},{'method':_0x3b58a0(0x129),'url':_0x3b58a0(0x138),'body':{'filePath':_0x3b58a0(0x130),'downloadFlag':![]}},{'method':'GET','url':_0x3b58a0(0x132),'query':{'appCode':_0x4d0c1f[_0x3b58a0(0x124)],'url':_0x3b58a0(0x122),'type':_0x53068c}}]},'description':_0x3b58a0(0x113)+_0x558569+_0x3b58a0(0x11b)};},async 'execute'(_0x4d5ce8){const _0x5b220f=a197_0xd9c850,_0x331d45=normalizeScene(_0x4d5ce8[_0x5b220f(0x128)](_0x5b220f(0x134))),_0x1149ef=SCENE_TO_LEGACY_TYPE[_0x331d45],_0x2b242b=validateInputSelection(_0x4d5ce8);if(_0x2b242b[_0x5b220f(0x100)]){const _0x234dd1=await recognizeDevelopmentOcr(_0x4d5ce8[_0x5b220f(0x124)],{'url':_0x2b242b[_0x5b220f(0x100)],'type':_0x1149ef});return{'ok':!![],'data':withScene(_0x234dd1,_0x331d45)};}const _0x426e81=requireDevelopmentUploadFile(_0x2b242b[_0x5b220f(0x111)],'image-file'),_0x50fb2b=await uploadDevelopmentFile(_0x4d5ce8[_0x5b220f(0x124)],_0x426e81[_0x5b220f(0x10d)]);if(!_0x50fb2b['filePath'])throw CliErrors[_0x5b220f(0x12b)](_0x5b220f(0x104));const _0x18175f=await queryDevelopmentFileUrl(_0x50fb2b['filePath'],{'download':![]});if(!_0x18175f[_0x5b220f(0x10e)])throw CliErrors[_0x5b220f(0x12b)](_0x5b220f(0x133));const _0x273419=await recognizeDevelopmentOcr(_0x4d5ce8[_0x5b220f(0x124)],{'url':_0x18175f['fileUrl'],'type':_0x1149ef});return{'ok':!![],'data':withScene(_0x273419,_0x331d45,_0x50fb2b)};}};export const ocrDefinitions=[ocrRecognize];function a197_0x2037(){const _0x35a47e=['filter','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','1993550DjaquS','/smartapi/ocr/recognize-text','File\x20URL\x20response\x20missing\x20fileUrl.','scene','GET','general','fileName','/smartapi/common/queryFileUrl','toLowerCase','4DnNAHQ','/smartapi/common/uploadFile','imageUrl','/smartapi/ocr/recognize-text?','General','count','File\x20upload\x20response\x20missing\x20filePath.','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','33402516augztC','join','6449872vyjHUO','Publicly\x20accessible\x20image\x20or\x20file\x20URL','length','Invoice','Table','path','fileUrl','11hFvlSo','read','imageFile','.\x20Supported\x20scenes:\x20','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','trim','image-file','image-url','idcard','510447HxpWEK','146961toKgdc','\x20OCR','form','toString','3043995YyjDGj','Preview:\x20recognize\x20','IdCard','18daCAeo','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','4OzzTLG','appCode','1969645XJDRdc','idCard','validation','str','POST','string','apiError','invoice','6NJPOGL','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding'];a197_0x2037=function(){return _0x35a47e;};return a197_0x2037();}
@@ -1 +1 @@
1
- const a188_0x406788=a188_0x475c;(function(_0x7f3ea8,_0x1d617b){const _0x501997=a188_0x475c,_0x345c9=_0x7f3ea8();while(!![]){try{const _0x194966=-parseInt(_0x501997(0x1b8))/0x1+parseInt(_0x501997(0x1be))/0x2+parseInt(_0x501997(0x1a6))/0x3*(parseInt(_0x501997(0x191))/0x4)+parseInt(_0x501997(0x196))/0x5*(parseInt(_0x501997(0x19f))/0x6)+parseInt(_0x501997(0x19d))/0x7*(-parseInt(_0x501997(0x1b7))/0x8)+-parseInt(_0x501997(0x1ab))/0x9*(-parseInt(_0x501997(0x18f))/0xa)+-parseInt(_0x501997(0x1bd))/0xb;if(_0x194966===_0x1d617b)break;else _0x345c9['push'](_0x345c9['shift']());}catch(_0x1f5a83){_0x345c9['push'](_0x345c9['shift']());}}}(a188_0xbed4,0x6a076));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';function a188_0xbed4(){const _0xf176c7=['Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','\x20and\x20its\x20menu\x20entry.','Created\x20Custom\x20Page\x20','1096851gAzHUv','toLowerCase','127014KuCBPX','name','apiError','createMenu','page.create','validation','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','198aQhrOs','Custom_page_','ONEPAGE','string','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','18BmMFpX','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','Invalid\x20Custom\x20Page\x20pattern:\x20','create','menuPath','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','compress','DASHBOARD','../../../templates/custom-pages','.json','number','appCode','24ADNCxV','291433FiQwFW','parentMenuId','pageId','length','page-content','10682936QhQsGz','1494964rWJhTM','trim','version','now','CUSTOM','parent-menu-id','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','write','page-pattern','includes','BLANK','some','pageName\x20cannot\x20exceed\x20100\x20characters.','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','values','page-dir','page','page-type','pageName','Custom\x20Page\x20pattern\x20not\x20found:\x20','1467770BkgRKk','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','32316BHLGrq','keys','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','str','140kbvSfs','object','files','num'];a188_0xbed4=function(){return _0xf176c7;};return a188_0xbed4();}import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';function a188_0x475c(_0x4e3b2f,_0x344943){_0x4e3b2f=_0x4e3b2f-0x187;const _0xbed4b8=a188_0xbed4();let _0x475c49=_0xbed4b8[_0x4e3b2f];return _0x475c49;}const CUSTOM_PAGE_PATTERNS=[a188_0x406788(0x1c8),a188_0x406788(0x1a8),a188_0x406788(0x1b2)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a188_0x406788(0x1b3));export const pageCreate={'service':a188_0x406788(0x18b),'command':a188_0x406788(0x1ae),'description':a188_0x406788(0x1a5),'risk':a188_0x406788(0x1c5),'defaultOutputFormat':a188_0x406788(0x1b1),'structuredErrors':!![],'rejectedFlags':[{'name':a188_0x406788(0x18c),'message':'page\x20create\x20does\x20not\x20accept\x20--page-type.','hint':a188_0x406788(0x194)},{'name':a188_0x406788(0x1bc),'message':'page\x20create\x20no\x20longer\x20accepts\x20--page-content.','hint':a188_0x406788(0x1b0)}],'flags':[{'name':'name','type':a188_0x406788(0x1a9),'description':'Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)'},{'name':'parent-menu-id','type':a188_0x406788(0x1b5),'description':a188_0x406788(0x1aa)},{'name':a188_0x406788(0x1c6),'type':'string','description':a188_0x406788(0x1c4),'enum':CUSTOM_PAGE_PATTERNS},{'name':a188_0x406788(0x18a),'type':a188_0x406788(0x1a9),'description':a188_0x406788(0x193)},APPCODE_FLAG],async 'validate'(_0x38e16a){await readValidatedPageSource(_0x38e16a);},async 'dryRun'(_0x312fa3){const _0x2dc051=a188_0x406788,_0x1faa51=readInput(_0x312fa3,await readValidatedPageSource(_0x312fa3));return{'method':'POST','url':'/smartapi/webcode/page/create','body':{'appCode':_0x1faa51[_0x2dc051(0x1b6)],'pageName':_0x1faa51[_0x2dc051(0x18d)],..._0x1faa51[_0x2dc051(0x1b9)]!=null?{'parentMenuId':_0x1faa51[_0x2dc051(0x1b9)]}:{},'createMenu':_0x1faa51[_0x2dc051(0x1a2)],'codeContent':_0x1faa51[_0x2dc051(0x198)]},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON['stringify'](_0x1faa51[_0x2dc051(0x18d)])+_0x2dc051(0x19b)};},async 'execute'(_0x185974){const _0x1e5f43=a188_0x406788,_0x116a07=readInput(_0x185974,await readValidatedPageSource(_0x185974)),_0x5b485e=await createCustomPage(_0x116a07);if(!Number['isInteger'](_0x5b485e[_0x1e5f43(0x1ba)])||_0x5b485e['pageId']<=0x0)throw CliErrors[_0x1e5f43(0x1a1)](_0x1e5f43(0x19a));const _0x4ed604=buildCustomPageDevelopmentUrl(_0x116a07[_0x1e5f43(0x1b6)],_0x5b485e[_0x1e5f43(0x1af)]),_0x357a7e=buildCustomPageEditUrl(_0x116a07['appCode'],_0x5b485e[_0x1e5f43(0x1ba)]);return{'ok':!![],'data':{'operation':_0x1e5f43(0x1a3),'pageType':_0x1e5f43(0x1c2),'pagePattern':readPagePattern(_0x185974),'selector':{'appCode':_0x116a07[_0x1e5f43(0x1b6)],'pageName':_0x116a07[_0x1e5f43(0x18d)]},'before':null,'after':{'pageId':_0x5b485e[_0x1e5f43(0x1ba)],'pageName':_0x5b485e[_0x1e5f43(0x18d)],'appCode':_0x5b485e['appCode'],'version':_0x5b485e[_0x1e5f43(0x1c0)],'menuId':_0x5b485e['menuId'],'menuPath':_0x5b485e['menuPath'],'files':_0x5b485e['files']??Object[_0x1e5f43(0x192)](_0x116a07[_0x1e5f43(0x198)])},'dryRun':![],'request':_0x116a07,..._0x4ed604?{'pageUrl':_0x4ed604}:{},..._0x357a7e?{'editPageUrl':_0x357a7e}:{},'warnings':_0x4ed604?[]:['Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':_0x1e5f43(0x19c)+_0x5b485e[_0x1e5f43(0x1ba)]+'.'};}};function readPagePattern(_0x1a74cd){const _0x1dac64=a188_0x406788,_0x52a459=_0x1a74cd['str']('page-pattern')[_0x1dac64(0x1bf)](),_0x365d1f=_0x1a74cd['str'](_0x1dac64(0x18a))['trim']();if(_0x52a459&&_0x365d1f)throw CliErrors[_0x1dac64(0x1a4)](_0x1dac64(0x1ac));if(_0x365d1f)return null;if(!_0x52a459)throw CliErrors[_0x1dac64(0x1a4)](_0x1dac64(0x188));if(!CUSTOM_PAGE_PATTERNS[_0x1dac64(0x1c7)](_0x52a459))throw CliErrors[_0x1dac64(0x1a4)](_0x1dac64(0x190));return _0x52a459;}async function readPageSource(_0x5836b9){const _0x1a67ad=a188_0x406788,_0x4f7d80=_0x5836b9[_0x1a67ad(0x195)]('page-dir')[_0x1a67ad(0x1bf)](),_0x317b1f=readPagePattern(_0x5836b9);if(_0x317b1f===null){const _0x414b24=await readCustomPageDirectory(_0x4f7d80);if(Object[_0x1a67ad(0x192)](_0x414b24)['length']===0x0)throw CliErrors['validation']('--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.');return _0x414b24;}let _0x1268be;try{_0x1268be=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x317b1f[_0x1a67ad(0x19e)]()+_0x1a67ad(0x1b4)),'utf8');}catch{throw CliErrors[_0x1a67ad(0x1a4)](_0x1a67ad(0x18e)+_0x317b1f+'.');}let _0x432bce;try{_0x432bce=JSON['parse'](_0x1268be);}catch{throw CliErrors[_0x1a67ad(0x1a4)](_0x1a67ad(0x1ad)+_0x317b1f+'.');}if(!_0x432bce||typeof _0x432bce!==_0x1a67ad(0x197)||Array['isArray'](_0x432bce)||Object[_0x1a67ad(0x189)](_0x432bce)[_0x1a67ad(0x1c9)](_0x5d4fcc=>typeof _0x5d4fcc!==_0x1a67ad(0x1a9)))throw CliErrors[_0x1a67ad(0x1a4)]('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x317b1f+'.');return _0x432bce;}async function readValidatedPageSource(_0x55de57){const _0x344655=await readPageSource(_0x55de57);return await validateCustomPageContent(_0x344655),_0x344655;}function readInput(_0x47290a,_0x3e0f62){const _0x15379f=a188_0x406788,_0x106b4d=_0x47290a[_0x15379f(0x195)](_0x15379f(0x1a0))[_0x15379f(0x1bf)]()||_0x15379f(0x1a7)+Date[_0x15379f(0x1c1)]();if(_0x106b4d[_0x15379f(0x1bb)]>0x64)throw CliErrors[_0x15379f(0x1a4)](_0x15379f(0x187));const _0x1539f1=_0x47290a[_0x15379f(0x199)](_0x15379f(0x1c3),NaN),_0x4aed58=!Number['isNaN'](_0x1539f1);if(_0x4aed58&&(!Number['isInteger'](_0x1539f1)||_0x1539f1<=0x0))throw CliErrors[_0x15379f(0x1a4)]('--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.');return{'appCode':_0x47290a[_0x15379f(0x1b6)],'pageName':_0x106b4d,..._0x4aed58?{'parentMenuId':_0x1539f1}:{},'createMenu':!![],'files':_0x3e0f62};}
1
+ const a198_0x59df00=a198_0xb411;(function(_0x1143bd,_0x1c5607){const _0x37258f=a198_0xb411,_0x1214c5=_0x1143bd();while(!![]){try{const _0x342352=parseInt(_0x37258f(0xc6))/0x1*(parseInt(_0x37258f(0xd0))/0x2)+-parseInt(_0x37258f(0x9e))/0x3*(-parseInt(_0x37258f(0xd9))/0x4)+parseInt(_0x37258f(0xa7))/0x5*(parseInt(_0x37258f(0xb4))/0x6)+parseInt(_0x37258f(0xb6))/0x7*(-parseInt(_0x37258f(0xab))/0x8)+parseInt(_0x37258f(0xc4))/0x9+-parseInt(_0x37258f(0xcb))/0xa*(parseInt(_0x37258f(0xa6))/0xb)+-parseInt(_0x37258f(0xae))/0xc;if(_0x342352===_0x1c5607)break;else _0x1214c5['push'](_0x1214c5['shift']());}catch(_0x2415f7){_0x1214c5['push'](_0x1214c5['shift']());}}}(a198_0x4a3e,0x43f62));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';function a198_0x4a3e(){const _0x47c1c6=['ONEPAGE','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','some','validation','files','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','create','pageName\x20cannot\x20exceed\x20100\x20characters.','length','isArray','toLowerCase','BLANK','2023731yQYzcX','trim','843qwZohm','/smartapi/webcode/page/create','parentMenuId','isNaN','pageId','1158330ZlXRZb','menuPath','name','page-dir','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','382Xpkabh','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','appCode','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','includes','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','../../../templates/custom-pages','188EMWIOq','page-type','utf8','DASHBOARD','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','page-pattern','keys','values','parent-menu-id','pageName','now','34329KechIA','createMenu','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','write','string','str','Custom_page_','33QHeaIZ','5690DHDByZ','page.create','number','Custom\x20Page\x20pattern\x20not\x20found:\x20','1866088gMmpqs','Created\x20Custom\x20Page\x20','object','952284jGdNfl','stringify','page\x20create\x20does\x20not\x20accept\x20--page-type.','menuId','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','isInteger','78rzhvhs','compress','7ltZjbN'];a198_0x4a3e=function(){return _0x47c1c6;};return a198_0x4a3e();}import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a198_0x59df00(0xc3),a198_0x59df00(0xb7),a198_0x59df00(0xdc)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a198_0x59df00(0xd8));function a198_0xb411(_0x1eaa1e,_0x30224a){_0x1eaa1e=_0x1eaa1e-0x9e;const _0x4a3e1b=a198_0x4a3e();let _0xb411be=_0x4a3e1b[_0x1eaa1e];return _0xb411be;}export const pageCreate={'service':'page','command':a198_0x59df00(0xbe),'description':a198_0x59df00(0xd4),'risk':a198_0x59df00(0xa2),'defaultOutputFormat':a198_0x59df00(0xb5),'structuredErrors':!![],'rejectedFlags':[{'name':a198_0x59df00(0xda),'message':a198_0x59df00(0xb0),'hint':'This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.'},{'name':'page-content','message':a198_0x59df00(0xa1),'hint':a198_0x59df00(0xd1)}],'flags':[{'name':a198_0x59df00(0xcd),'type':a198_0x59df00(0xa3),'description':a198_0x59df00(0xd7)},{'name':'parent-menu-id','type':a198_0x59df00(0xa9),'description':a198_0x59df00(0xbd)},{'name':a198_0x59df00(0xde),'type':'string','description':a198_0x59df00(0xa0),'enum':CUSTOM_PAGE_PATTERNS},{'name':a198_0x59df00(0xce),'type':a198_0x59df00(0xa3),'description':a198_0x59df00(0xdd)},APPCODE_FLAG],async 'validate'(_0x318b79){await readValidatedPageSource(_0x318b79);},async 'dryRun'(_0x5194c4){const _0x5cef2f=a198_0x59df00,_0x37b6ae=readInput(_0x5194c4,await readValidatedPageSource(_0x5194c4));return{'method':'POST','url':_0x5cef2f(0xc7),'body':{'appCode':_0x37b6ae[_0x5cef2f(0xd2)],'pageName':_0x37b6ae['pageName'],..._0x37b6ae[_0x5cef2f(0xc8)]!=null?{'parentMenuId':_0x37b6ae[_0x5cef2f(0xc8)]}:{},'createMenu':_0x37b6ae[_0x5cef2f(0x9f)],'codeContent':_0x37b6ae[_0x5cef2f(0xbc)]},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON[_0x5cef2f(0xaf)](_0x37b6ae['pageName'])+'\x20and\x20its\x20menu\x20entry.'};},async 'execute'(_0x219f85){const _0x575de6=a198_0x59df00,_0x2befcb=readInput(_0x219f85,await readValidatedPageSource(_0x219f85)),_0x44dd61=await createCustomPage(_0x2befcb);if(!Number[_0x575de6(0xb3)](_0x44dd61[_0x575de6(0xca)])||_0x44dd61[_0x575de6(0xca)]<=0x0)throw CliErrors['apiError'](_0x575de6(0xb9));const _0x2fa601=buildCustomPageDevelopmentUrl(_0x2befcb['appCode'],_0x44dd61['menuPath']),_0x33d06c=buildCustomPageEditUrl(_0x2befcb[_0x575de6(0xd2)],_0x44dd61['pageId']);return{'ok':!![],'data':{'operation':_0x575de6(0xa8),'pageType':'CUSTOM','pagePattern':readPagePattern(_0x219f85),'selector':{'appCode':_0x2befcb[_0x575de6(0xd2)],'pageName':_0x2befcb[_0x575de6(0xe2)]},'before':null,'after':{'pageId':_0x44dd61[_0x575de6(0xca)],'pageName':_0x44dd61[_0x575de6(0xe2)],'appCode':_0x44dd61[_0x575de6(0xd2)],'version':_0x44dd61['version'],'menuId':_0x44dd61[_0x575de6(0xb1)],'menuPath':_0x44dd61[_0x575de6(0xcc)],'files':_0x44dd61[_0x575de6(0xbc)]??Object[_0x575de6(0xdf)](_0x2befcb['files'])},'dryRun':![],'request':_0x2befcb,..._0x2fa601?{'pageUrl':_0x2fa601}:{},..._0x33d06c?{'editPageUrl':_0x33d06c}:{},'warnings':_0x2fa601?[]:[_0x575de6(0xd3)]},'message':_0x575de6(0xac)+_0x44dd61[_0x575de6(0xca)]+'.'};}};function readPagePattern(_0x5697e0){const _0x50ae3a=a198_0x59df00,_0x26a7e2=_0x5697e0[_0x50ae3a(0xa4)]('page-pattern')[_0x50ae3a(0xc5)](),_0x32dd1f=_0x5697e0[_0x50ae3a(0xa4)](_0x50ae3a(0xce))['trim']();if(_0x26a7e2&&_0x32dd1f)throw CliErrors[_0x50ae3a(0xbb)]('--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.');if(_0x32dd1f)return null;if(!_0x26a7e2)throw CliErrors[_0x50ae3a(0xbb)](_0x50ae3a(0xb2));if(!CUSTOM_PAGE_PATTERNS[_0x50ae3a(0xd6)](_0x26a7e2))throw CliErrors[_0x50ae3a(0xbb)](_0x50ae3a(0xb8));return _0x26a7e2;}async function readPageSource(_0x322fdc){const _0xd4a46=a198_0x59df00,_0x516fb5=_0x322fdc['str']('page-dir')[_0xd4a46(0xc5)](),_0x5e3405=readPagePattern(_0x322fdc);if(_0x5e3405===null){const _0x1a7196=await readCustomPageDirectory(_0x516fb5);if(Object['keys'](_0x1a7196)[_0xd4a46(0xc0)]===0x0)throw CliErrors['validation'](_0xd4a46(0xd5));return _0x1a7196;}let _0x53f63d;try{_0x53f63d=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x5e3405[_0xd4a46(0xc2)]()+'.json'),_0xd4a46(0xdb));}catch{throw CliErrors['validation'](_0xd4a46(0xaa)+_0x5e3405+'.');}let _0x32a3a7;try{_0x32a3a7=JSON['parse'](_0x53f63d);}catch{throw CliErrors[_0xd4a46(0xbb)]('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x5e3405+'.');}if(!_0x32a3a7||typeof _0x32a3a7!==_0xd4a46(0xad)||Array[_0xd4a46(0xc1)](_0x32a3a7)||Object[_0xd4a46(0xe0)](_0x32a3a7)[_0xd4a46(0xba)](_0x2557c1=>typeof _0x2557c1!=='string'))throw CliErrors['validation']('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x5e3405+'.');return _0x32a3a7;}async function readValidatedPageSource(_0x1c4078){const _0x2e2880=await readPageSource(_0x1c4078);return await validateCustomPageContent(_0x2e2880),_0x2e2880;}function readInput(_0x27b921,_0x383821){const _0xdda99a=a198_0x59df00,_0x5759ab=_0x27b921['str'](_0xdda99a(0xcd))[_0xdda99a(0xc5)]()||_0xdda99a(0xa5)+Date[_0xdda99a(0xe3)]();if(_0x5759ab[_0xdda99a(0xc0)]>0x64)throw CliErrors[_0xdda99a(0xbb)](_0xdda99a(0xbf));const _0x2d9602=_0x27b921['num'](_0xdda99a(0xe1),NaN),_0x202bdf=!Number[_0xdda99a(0xc9)](_0x2d9602);if(_0x202bdf&&(!Number['isInteger'](_0x2d9602)||_0x2d9602<=0x0))throw CliErrors[_0xdda99a(0xbb)](_0xdda99a(0xcf));return{'appCode':_0x27b921['appCode'],'pageName':_0x5759ab,..._0x202bdf?{'parentMenuId':_0x2d9602}:{},'createMenu':!![],'files':_0x383821};}
@@ -1 +1 @@
1
- const a189_0x2d456c=a189_0x177f;(function(_0x5abb33,_0x2f1ee0){const _0x1503bc=a189_0x177f,_0x40351f=_0x5abb33();while(!![]){try{const _0x2835c1=-parseInt(_0x1503bc(0x9e))/0x1*(-parseInt(_0x1503bc(0x97))/0x2)+parseInt(_0x1503bc(0x8a))/0x3+parseInt(_0x1503bc(0xa0))/0x4+-parseInt(_0x1503bc(0xa1))/0x5*(-parseInt(_0x1503bc(0x92))/0x6)+parseInt(_0x1503bc(0x95))/0x7+parseInt(_0x1503bc(0x94))/0x8*(parseInt(_0x1503bc(0x93))/0x9)+-parseInt(_0x1503bc(0x8c))/0xa;if(_0x2835c1===_0x2f1ee0)break;else _0x40351f['push'](_0x40351f['shift']());}catch(_0x37e71b){_0x40351f['push'](_0x40351f['shift']());}}}(a189_0x179f,0x72134));import{getCustomPageSource}from'../../../core/api-client.js';function a189_0x177f(_0x426ed3,_0x4f5ab8){_0x426ed3=_0x426ed3-0x89;const _0x179f44=a189_0x179f();let _0x177f5e=_0x179f44[_0x426ed3];return _0x177f5e;}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a189_0x2d456c(0x9d),'command':a189_0x2d456c(0x9a),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':a189_0x2d456c(0x90),'defaultOutputFormat':a189_0x2d456c(0x9f),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a189_0x2d456c(0x8b),'required':!![],'description':a189_0x2d456c(0x91)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1bfbd5){readCustomPageId(_0x1bfbd5);},async 'execute'(_0xb80880){const _0x18ca28=a189_0x2d456c,_0x4ccd69=readCustomPageId(_0xb80880),_0x592b89=await getCustomPageSource(_0x4ccd69),{bundle:_0xab2eca,createTime:_0x2a3285,updateTime:_0x4b338d,..._0xaa1bc1}=_0x592b89,_0x2430d1=_0x592b89['id']??_0x4ccd69,_0x115636=_0x592b89['appCode']?.['trim']()||_0xb80880['str'](_0x18ca28(0x96))['trim'](),_0x1b6a7d=buildCustomPageRuntimeUrl(_0x115636,_0x592b89[_0x18ca28(0xa2)]),_0x2fd3a6=buildCustomPageEditUrl(_0x115636,_0x2430d1),_0x5ec702=await resolveCustomPageDevelopmentUrl(_0x115636,_0x2430d1,_0xb80880['cookie']);return{'ok':!![],'data':{..._0xaa1bc1,..._0x1b6a7d?{'runtimePageUrl':_0x1b6a7d}:{},..._0x5ec702?{'pageUrl':_0x5ec702}:{},..._0x2fd3a6?{'editPageUrl':_0x2fd3a6}:{},..._0x2a3285==null?{}:{'createTime':formatTime(_0x2a3285)},..._0x4b338d==null?{}:{'updateTime':formatTime(_0x4b338d)}},'message':_0x18ca28(0x8e)+_0x4ccd69+'.'};}};function a189_0x179f(){const _0x3477bb=['padStart','1252179xmIrio','number','11447160FaRrdo','getMinutes','Retrieved\x20Custom\x20Page\x20','getHours','read','Custom\x20Page\x20ID','13038oZqBwg','26685KNTcLt','200sTEhWQ','710892KpMaAz','appcode','1184386uVUofl','isNaN','getFullYear','custom-detail','getMonth','join','page','1iaVDCl','compress','1524272WqFrVn','105lbaQWH','pageCode'];a189_0x179f=function(){return _0x3477bb;};return a189_0x179f();}function formatTime(_0x512183){const _0x33b4f9=a189_0x2d456c,_0x1338e8=new Date(_0x512183);if(Number[_0x33b4f9(0x98)](_0x1338e8['getTime']()))return String(_0x512183);const _0x193866=[_0x1338e8[_0x33b4f9(0x99)](),String(_0x1338e8[_0x33b4f9(0x9b)]()+0x1)[_0x33b4f9(0x89)](0x2,'0'),String(_0x1338e8['getDate']())['padStart'](0x2,'0')][_0x33b4f9(0x9c)]('-'),_0x13e043=[String(_0x1338e8[_0x33b4f9(0x8f)]())[_0x33b4f9(0x89)](0x2,'0'),String(_0x1338e8[_0x33b4f9(0x8d)]())[_0x33b4f9(0x89)](0x2,'0'),String(_0x1338e8['getSeconds']())[_0x33b4f9(0x89)](0x2,'0')]['join'](':');return _0x193866+'\x20'+_0x13e043;}
1
+ const a199_0x2d31dc=a199_0x38cd;(function(_0x4f2da1,_0x1b4c9b){const _0x1f1198=a199_0x38cd,_0x1947fe=_0x4f2da1();while(!![]){try{const _0x2465b6=-parseInt(_0x1f1198(0xaf))/0x1+parseInt(_0x1f1198(0xac))/0x2+-parseInt(_0x1f1198(0x9b))/0x3*(parseInt(_0x1f1198(0xa4))/0x4)+parseInt(_0x1f1198(0xa6))/0x5*(-parseInt(_0x1f1198(0xb3))/0x6)+parseInt(_0x1f1198(0xa0))/0x7*(-parseInt(_0x1f1198(0xb2))/0x8)+parseInt(_0x1f1198(0xa3))/0x9*(-parseInt(_0x1f1198(0xa1))/0xa)+parseInt(_0x1f1198(0xae))/0xb;if(_0x2465b6===_0x1b4c9b)break;else _0x1947fe['push'](_0x1947fe['shift']());}catch(_0x2994d0){_0x1947fe['push'](_0x1947fe['shift']());}}}(a199_0xfb06,0x663d4));import{getCustomPageSource}from'../../../core/api-client.js';function a199_0x38cd(_0x9323c8,_0x6f1c8){_0x9323c8=_0x9323c8-0x99;const _0xfb06e2=a199_0xfb06();let _0x38cd70=_0xfb06e2[_0x9323c8];return _0x38cd70;}function a199_0xfb06(){const _0x46d40d=['29039802ejRQOz','571089WKwDZn','cookie','isNaN','2632FHNeSc','402sdrtkf','getHours','str','trim','getMinutes','2250510PywttJ','appcode','getFullYear','pageCode','getDate','4137VcqCqj','10ZuYqXR','Custom\x20Page\x20ID','7247061CwjKbg','4lrSaFr','padStart','13340CoAFQg','appCode','custom-detail','join','read','number','556946ozWYAU','getSeconds'];a199_0xfb06=function(){return _0x46d40d;};return a199_0xfb06();}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':'page','command':a199_0x2d31dc(0xa8),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':a199_0x2d31dc(0xaa),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a199_0x2d31dc(0xab),'required':!![],'description':a199_0x2d31dc(0xa2)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x27cabb){readCustomPageId(_0x27cabb);},async 'execute'(_0x77e727){const _0x1b3403=a199_0x2d31dc,_0x4ea17e=readCustomPageId(_0x77e727),_0x95ccd1=await getCustomPageSource(_0x4ea17e),{bundle:_0x275688,createTime:_0x490549,updateTime:_0x11fe23,..._0x1b85db}=_0x95ccd1,_0x25cc85=_0x95ccd1['id']??_0x4ea17e,_0xd375e5=_0x95ccd1[_0x1b3403(0xa7)]?.[_0x1b3403(0x99)]()||_0x77e727[_0x1b3403(0xb5)](_0x1b3403(0x9c))[_0x1b3403(0x99)](),_0x50de56=buildCustomPageRuntimeUrl(_0xd375e5,_0x95ccd1[_0x1b3403(0x9e)]),_0x204aa7=buildCustomPageEditUrl(_0xd375e5,_0x25cc85),_0x5a7edf=await resolveCustomPageDevelopmentUrl(_0xd375e5,_0x25cc85,_0x77e727[_0x1b3403(0xb0)]);return{'ok':!![],'data':{..._0x1b85db,..._0x50de56?{'runtimePageUrl':_0x50de56}:{},..._0x5a7edf?{'pageUrl':_0x5a7edf}:{},..._0x204aa7?{'editPageUrl':_0x204aa7}:{},..._0x490549==null?{}:{'createTime':formatTime(_0x490549)},..._0x11fe23==null?{}:{'updateTime':formatTime(_0x11fe23)}},'message':'Retrieved\x20Custom\x20Page\x20'+_0x4ea17e+'.'};}};function formatTime(_0x30ea96){const _0x40f1c0=a199_0x2d31dc,_0xa0deda=new Date(_0x30ea96);if(Number[_0x40f1c0(0xb1)](_0xa0deda['getTime']()))return String(_0x30ea96);const _0x220ef6=[_0xa0deda[_0x40f1c0(0x9d)](),String(_0xa0deda['getMonth']()+0x1)[_0x40f1c0(0xa5)](0x2,'0'),String(_0xa0deda[_0x40f1c0(0x9f)]())[_0x40f1c0(0xa5)](0x2,'0')][_0x40f1c0(0xa9)]('-'),_0x53813c=[String(_0xa0deda[_0x40f1c0(0xb4)]())[_0x40f1c0(0xa5)](0x2,'0'),String(_0xa0deda[_0x40f1c0(0x9a)]())['padStart'](0x2,'0'),String(_0xa0deda[_0x40f1c0(0xad)]())[_0x40f1c0(0xa5)](0x2,'0')][_0x40f1c0(0xa9)](':');return _0x220ef6+'\x20'+_0x53813c;}