@lovrabet/rabetbase-cli 2.4.4 → 2.4.5-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (330) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.d.ts +1 -0
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/{permit/index.d.ts → dataset/business-groups.d.ts} +1 -1
  63. package/lib/commands/dataset/business-groups.js +1 -0
  64. package/lib/commands/dataset/capability.js +1 -1
  65. package/lib/commands/dataset/delete.js +1 -1
  66. package/lib/commands/dataset/detail.js +1 -1
  67. package/lib/commands/dataset/extend-update.js +1 -1
  68. package/lib/commands/dataset/field-update.js +1 -1
  69. package/lib/commands/dataset/generate.js +1 -1
  70. package/lib/commands/dataset/index.js +1 -1
  71. package/lib/commands/dataset/list.js +1 -1
  72. package/lib/commands/dataset/operations.js +1 -1
  73. package/lib/commands/dataset/relation-audit.js +1 -1
  74. package/lib/commands/dataset/relation-create.js +1 -1
  75. package/lib/commands/dataset/relation-delete.js +1 -1
  76. package/lib/commands/dataset/relation-shared.js +1 -1
  77. package/lib/commands/dataset/relation-update.js +1 -1
  78. package/lib/commands/dataset/relations.js +1 -1
  79. package/lib/commands/dataset/rename.js +1 -1
  80. package/lib/commands/dataset/restore.js +1 -1
  81. package/lib/commands/db/analysis-batching.js +1 -1
  82. package/lib/commands/db/analyze-batch-plan.js +1 -1
  83. package/lib/commands/db/analyze-cancel.js +1 -1
  84. package/lib/commands/db/analyze-start.js +1 -1
  85. package/lib/commands/db/analyze-status.js +1 -1
  86. package/lib/commands/db/create.js +1 -1
  87. package/lib/commands/db/delete.js +1 -1
  88. package/lib/commands/db/detail.js +1 -1
  89. package/lib/commands/db/diff-refresh-start.js +1 -1
  90. package/lib/commands/db/diff-refresh-status.js +1 -1
  91. package/lib/commands/db/diff.js +1 -1
  92. package/lib/commands/db/index.js +1 -1
  93. package/lib/commands/db/list.js +1 -1
  94. package/lib/commands/db/shared.d.ts +15 -1
  95. package/lib/commands/db/shared.js +1 -1
  96. package/lib/commands/db/tables.js +1 -1
  97. package/lib/commands/db/test.js +1 -1
  98. package/lib/commands/db/update.js +1 -1
  99. package/lib/commands/doctor.js +1 -1
  100. package/lib/commands/file/index.js +1 -1
  101. package/lib/commands/init/index.js +1 -1
  102. package/lib/commands/issue/index.js +1 -1
  103. package/lib/commands/issue/nudge.js +1 -1
  104. package/lib/commands/issue/report.js +1 -1
  105. package/lib/commands/issue/shared.js +1 -1
  106. package/lib/commands/kb/create.js +1 -1
  107. package/lib/commands/kb/delete.js +1 -1
  108. package/lib/commands/kb/detail.js +1 -1
  109. package/lib/commands/kb/index.js +1 -1
  110. package/lib/commands/kb/list.js +1 -1
  111. package/lib/commands/kb/shared.js +1 -1
  112. package/lib/commands/kb/update.js +1 -1
  113. package/lib/commands/logs/index.js +1 -1
  114. package/lib/commands/menu/asset-update.js +1 -1
  115. package/lib/commands/menu/delete.js +1 -1
  116. package/lib/commands/menu/external-link-create.js +1 -1
  117. package/lib/commands/menu/external-link-update.js +1 -1
  118. package/lib/commands/menu/group-create.js +1 -1
  119. package/lib/commands/menu/group-update.js +1 -1
  120. package/lib/commands/menu/index.js +1 -1
  121. package/lib/commands/menu/list.js +1 -1
  122. package/lib/commands/menu/move.js +1 -1
  123. package/lib/commands/menu/regroup-start.js +1 -1
  124. package/lib/commands/menu/rename.js +1 -1
  125. package/lib/commands/menu/shared/compare-table.js +1 -1
  126. package/lib/commands/menu/shared/delete-plan.js +1 -1
  127. package/lib/commands/menu/shared/facts.js +1 -1
  128. package/lib/commands/menu/shared/index.js +1 -1
  129. package/lib/commands/menu/shared/inquirer.js +1 -1
  130. package/lib/commands/menu/shared/local-pages.js +1 -1
  131. package/lib/commands/menu/shared/logic.js +1 -1
  132. package/lib/commands/menu/shared/mutations.js +1 -1
  133. package/lib/commands/menu/shared/service.js +1 -1
  134. package/lib/commands/menu/shared/sync-core.js +1 -1
  135. package/lib/commands/menu/shared/update-core.js +1 -1
  136. package/lib/commands/menu/shared/valid-url.js +1 -1
  137. package/lib/commands/menu/sync.js +1 -1
  138. package/lib/commands/notification/config-create.js +1 -1
  139. package/lib/commands/notification/config-delete.js +1 -1
  140. package/lib/commands/notification/config-list.js +1 -1
  141. package/lib/commands/notification/config-update.js +1 -1
  142. package/lib/commands/notification/index.js +1 -1
  143. package/lib/commands/notification/shared.js +1 -1
  144. package/lib/commands/ocr/index.js +1 -1
  145. package/lib/commands/page/generate-start.js +1 -1
  146. package/lib/commands/page/generate-status.js +1 -1
  147. package/lib/commands/page/index.js +1 -1
  148. package/lib/commands/page/pull.js +1 -1
  149. package/lib/commands/page/push.js +1 -1
  150. package/lib/commands/page/react/create.js +1 -1
  151. package/lib/commands/page/react/detail.js +1 -1
  152. package/lib/commands/page/react/list.js +1 -1
  153. package/lib/commands/page/react/publish.js +1 -1
  154. package/lib/commands/page/react/shared.js +1 -1
  155. package/lib/commands/page/react/syntax.js +1 -1
  156. package/lib/commands/page/react/template.js +1 -1
  157. package/lib/commands/page/react/update.js +1 -1
  158. package/lib/commands/page/relation-audit.js +1 -1
  159. package/lib/commands/page/restore.js +1 -1
  160. package/lib/commands/page/shared.js +1 -1
  161. package/lib/commands/page/standard-page-status.js +1 -1
  162. package/lib/commands/page/sync.js +1 -1
  163. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  164. package/lib/commands/project/create/format-elapsed.js +1 -1
  165. package/lib/commands/project/create/main.js +1 -1
  166. package/lib/commands/project/create/materialize-project-template.js +1 -1
  167. package/lib/commands/project/create/project-name.js +1 -1
  168. package/lib/commands/project/create/project-template-archive.js +1 -1
  169. package/lib/commands/project/create/project-template-path.js +1 -1
  170. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  171. package/lib/commands/project/create/use-format-code.js +1 -1
  172. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  173. package/lib/commands/project/index.js +1 -1
  174. package/lib/commands/project/upgrade.js +1 -1
  175. package/lib/commands/registry.js +1 -1
  176. package/lib/commands/role/delete.js +1 -1
  177. package/lib/commands/role/detail.js +1 -1
  178. package/lib/commands/role/index.js +1 -1
  179. package/lib/commands/role/list.js +1 -1
  180. package/lib/commands/role/shared.d.ts +15 -17
  181. package/lib/commands/role/shared.js +1 -1
  182. package/lib/commands/role/update.js +1 -1
  183. package/lib/commands/role/user-add.js +1 -1
  184. package/lib/commands/role/user-remove.js +1 -1
  185. package/lib/commands/role/user-resolve.js +1 -1
  186. package/lib/commands/run/index.js +1 -1
  187. package/lib/commands/schema.js +1 -1
  188. package/lib/commands/sql/create.js +1 -1
  189. package/lib/commands/sql/delete.js +1 -1
  190. package/lib/commands/sql/detail.js +1 -1
  191. package/lib/commands/sql/exec.js +1 -1
  192. package/lib/commands/sql/index.js +1 -1
  193. package/lib/commands/sql/list.js +1 -1
  194. package/lib/commands/sql/pull.js +1 -1
  195. package/lib/commands/sql/push.js +1 -1
  196. package/lib/commands/sql/shared.js +1 -1
  197. package/lib/commands/sql/status.js +1 -1
  198. package/lib/commands/sql/validate.js +1 -1
  199. package/lib/commands/task/index.js +1 -1
  200. package/lib/commands/task/status.js +1 -1
  201. package/lib/commands/tenant/index.js +1 -1
  202. package/lib/commands/tenant/members-list.js +1 -1
  203. package/lib/commands/tenant/shared.js +1 -1
  204. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  205. package/lib/commands/user-account/index.js +1 -1
  206. package/lib/commands/workspace/add.js +1 -1
  207. package/lib/commands/workspace/index.js +1 -1
  208. package/lib/commands/workspace/remove.js +1 -1
  209. package/lib/config/schema.js +1 -1
  210. package/lib/constant/cdn.js +1 -1
  211. package/lib/constant/cli.js +1 -1
  212. package/lib/constant/defaults.js +1 -1
  213. package/lib/constant/domain.js +1 -1
  214. package/lib/constant/env.js +1 -1
  215. package/lib/constant/output.js +1 -1
  216. package/lib/constant/paths.js +1 -1
  217. package/lib/constant/risk.js +1 -1
  218. package/lib/context/app-resolver.js +1 -1
  219. package/lib/context/auth-resolver.js +1 -1
  220. package/lib/context/config-loader.js +1 -1
  221. package/lib/context.js +1 -1
  222. package/lib/core/alias-resolver.js +1 -1
  223. package/lib/core/api-client.d.ts +70 -79
  224. package/lib/core/api-client.js +1 -1
  225. package/lib/core/bff/config.js +1 -1
  226. package/lib/core/bff/file-system.d.ts +1 -0
  227. package/lib/core/bff/file-system.js +1 -1
  228. package/lib/core/bff/hash.js +1 -1
  229. package/lib/core/bff/lock.js +1 -1
  230. package/lib/core/bff/utils.js +1 -1
  231. package/lib/core/db-resolver.js +1 -1
  232. package/lib/core/page/file-system.js +1 -1
  233. package/lib/core/page/hash.js +1 -1
  234. package/lib/core/page/lock.js +1 -1
  235. package/lib/core/sql-index-auditor.js +1 -1
  236. package/lib/core/sql-sync/config.js +1 -1
  237. package/lib/core/sql-sync/file-system.js +1 -1
  238. package/lib/core/sql-sync/hash.js +1 -1
  239. package/lib/core/sql-sync/lock.js +1 -1
  240. package/lib/core/sql-sync/utils.js +1 -1
  241. package/lib/core/sql-validator.js +1 -1
  242. package/lib/errors.js +1 -1
  243. package/lib/framework/build-all-flags.js +1 -1
  244. package/lib/framework/error-output.js +1 -1
  245. package/lib/framework/explicit-yes.js +1 -1
  246. package/lib/framework/flags.js +1 -1
  247. package/lib/framework/help.js +1 -1
  248. package/lib/framework/index.js +1 -1
  249. package/lib/framework/output.js +1 -1
  250. package/lib/framework/response.js +1 -1
  251. package/lib/framework/runner-alias.js +1 -1
  252. package/lib/framework/runner.js +1 -1
  253. package/lib/framework/schema-export.js +1 -1
  254. package/lib/framework/types.js +1 -1
  255. package/lib/generated/build-info.d.ts +4 -4
  256. package/lib/generated/build-info.js +1 -1
  257. package/lib/help.js +1 -1
  258. package/lib/postinstall.js +1 -1
  259. package/lib/runtime/confirmation.js +1 -1
  260. package/lib/runtime/event.js +1 -1
  261. package/lib/runtime/index.js +1 -1
  262. package/lib/runtime/queue.js +1 -1
  263. package/lib/runtime/resolve.js +1 -1
  264. package/lib/skills/builtin-skill.js +1 -1
  265. package/lib/skills/main.js +1 -1
  266. package/lib/skills/npx-skills-add.js +1 -1
  267. package/lib/skills/skill-presence.js +1 -1
  268. package/lib/telemetry/cli-command-trace.js +1 -1
  269. package/lib/telemetry/cli-help-trace.js +1 -1
  270. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  271. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  272. package/lib/telemetry/send-cli-trace-log.js +1 -1
  273. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  274. package/lib/utils/ai_config.js +1 -1
  275. package/lib/utils/apply-jq-filter.js +1 -1
  276. package/lib/utils/cdn-config.js +1 -1
  277. package/lib/utils/check-sdk-version.js +1 -1
  278. package/lib/utils/cli-version-check.js +1 -1
  279. package/lib/utils/cli-version-policy.js +1 -1
  280. package/lib/utils/config.js +1 -1
  281. package/lib/utils/entity-with-id.js +1 -1
  282. package/lib/utils/file-utils.js +1 -1
  283. package/lib/utils/guides-cdn.js +1 -1
  284. package/lib/utils/http-client.js +1 -1
  285. package/lib/utils/is-non-interactive.js +1 -1
  286. package/lib/utils/logger.js +1 -1
  287. package/lib/utils/params.js +1 -1
  288. package/lib/utils/platform.js +1 -1
  289. package/lib/utils/rules-cdn.js +1 -1
  290. package/lib/utils/sleep.js +1 -1
  291. package/lib/utils/template-replacer.js +1 -1
  292. package/lib/utils/update-notice.js +1 -1
  293. package/lib/utils/version.js +1 -1
  294. package/lib/utils/with-active-cookie.js +1 -1
  295. package/lib/utils/write-cli-side-channel.js +1 -1
  296. package/package.json +1 -1
  297. package/skills/rabetbase/SKILL.md +18 -24
  298. package/skills/rabetbase/guides/database-connection-workflow.md +6 -2
  299. package/skills/rabetbase/references/rabetbase-dataset-business-groups.md +28 -0
  300. package/skills/rabetbase/references/rabetbase-dataset-delete.md +7 -5
  301. package/skills/rabetbase/references/rabetbase-dataset-list.md +6 -6
  302. package/skills/rabetbase/references/rabetbase-dataset-restore.md +5 -5
  303. package/skills/rabetbase/references/rabetbase-db-create.md +3 -0
  304. package/skills/rabetbase/references/rabetbase-db-delete.md +10 -2
  305. package/skills/rabetbase/references/rabetbase-db-detail.md +2 -0
  306. package/skills/rabetbase/references/rabetbase-db-list.md +3 -2
  307. package/skills/rabetbase/references/rabetbase-db-update.md +4 -2
  308. package/skills/rabetbase/references/rabetbase-role-list.md +9 -17
  309. package/skills/rabetbase/references/rabetbase-role-user-add.md +44 -16
  310. package/skills/rabetbase/references/rabetbase-role-user-resolve.md +2 -2
  311. package/skills/rabetbase.manifest.json +4 -7
  312. package/lib/commands/permit/index.js +0 -1
  313. package/lib/commands/permit/page-get.d.ts +0 -2
  314. package/lib/commands/permit/page-get.js +0 -1
  315. package/lib/commands/permit/page-set.d.ts +0 -2
  316. package/lib/commands/permit/page-set.js +0 -1
  317. package/lib/commands/permit/role-apis-set.d.ts +0 -2
  318. package/lib/commands/permit/role-apis-set.js +0 -1
  319. package/lib/commands/permit/role-menus-set.d.ts +0 -2
  320. package/lib/commands/permit/role-menus-set.js +0 -1
  321. package/lib/commands/permit/role-menus.d.ts +0 -2
  322. package/lib/commands/permit/role-menus.js +0 -1
  323. package/lib/commands/permit/shared.d.ts +0 -74
  324. package/lib/commands/permit/shared.js +0 -1
  325. package/lib/commands/role/create.d.ts +0 -2
  326. package/lib/commands/role/create.js +0 -1
  327. package/skills/rabetbase/guides/role-permit-workflow.md +0 -127
  328. package/skills/rabetbase/references/rabetbase-permit-page-set.md +0 -69
  329. package/skills/rabetbase/references/rabetbase-permit-role-apis-set.md +0 -53
  330. package/skills/rabetbase/references/rabetbase-permit-role-menus-set.md +0 -57
@@ -1 +1 @@
1
- const a129_0x4d5044=a129_0x32dc;(function(_0x406255,_0x1f2ed8){const _0x549699=a129_0x32dc,_0x4a4149=_0x406255();while(!![]){try{const _0x384b8d=-parseInt(_0x549699(0xc2))/0x1*(-parseInt(_0x549699(0xdd))/0x2)+-parseInt(_0x549699(0xcd))/0x3+parseInt(_0x549699(0xc9))/0x4*(parseInt(_0x549699(0xdf))/0x5)+parseInt(_0x549699(0xbd))/0x6+-parseInt(_0x549699(0xd6))/0x7+-parseInt(_0x549699(0xcb))/0x8+parseInt(_0x549699(0xdc))/0x9;if(_0x384b8d===_0x1f2ed8)break;else _0x4a4149['push'](_0x4a4149['shift']());}catch(_0x41f908){_0x4a4149['push'](_0x4a4149['shift']());}}}(a129_0x3685,0x6c4ee));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a129_0x32dc(_0x43556e,_0xb90e7a){_0x43556e=_0x43556e-0xb2;const _0x368560=a129_0x3685();let _0x32dc90=_0x368560[_0x43556e];return _0x32dc90;}import{logger}from'../../../utils/logger.js';function a129_0x3685(){const _0x2e7382=['push','1239340gosqwN','hasOwn','Invalid\x20--params.','has','JS\x20URL\x20is\x20unreachable:\x20','jsUrl','map','Invalid\x20--params:\x20','import','Invalid\x20--params\x20fields:\x20','pages','cssUrl','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','object','1834866igtnuH','dryRun','path','message','\x0a\x20\x20Available\x20local\x20paths:\x20','1zePxww','trim','Menu\x20sync\x20completed','No\x20local\x20pages\x20matched\x20paths:\x20','procode','--params.','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','4JsMKqw','filter','4427640MMhTnW','keys','2415345yGyWnE','isArray','CSS\x20URL\x20is\x20unreachable:\x20','length','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','join','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','menu-sync','281043WZRjAj','string','field',':\x20expected\x20a\x20non-empty\x20string.','setLogPath','get','9544257UFSBzA','456394sASUKA'];a129_0x3685=function(){return _0x2e7382;};return a129_0x3685();}const MENU_SYNC_PARAM_KEYS=new Set([a129_0x4d5044(0xb4),'cssUrl']);function validateParams(_0x31e304){const _0x51e867=a129_0x4d5044,_0x69d328=[];return _0x31e304[_0x51e867(0xb4)]&&!isValidJsHttpsUrl(_0x31e304[_0x51e867(0xb4)])&&_0x69d328['push']({'field':_0x51e867(0xb4),'message':_0x51e867(0xc8)}),_0x31e304[_0x51e867(0xba)]&&!isValidCssHttpsUrl(_0x31e304['cssUrl'])&&_0x69d328[_0x51e867(0xde)]({'field':_0x51e867(0xba),'message':_0x51e867(0xd3)}),_0x69d328;}export async function runMenuSyncCore(_0x120aa1,_0x1d6627,_0x98f32c=[],_0x5e43ac,_0x55db83={}){const _0x253fbd=a129_0x4d5044,_0x24ed2a=parseMenuSyncParams(_0x5e43ac),_0x4bd814=[...new Set(_0x98f32c[_0x253fbd(0xb5)](_0xfeeaa2=>_0xfeeaa2[_0x253fbd(0xc3)]())[_0x253fbd(0xca)](Boolean))],_0x33f669=_0x24ed2a['jsUrl'],_0x5123b7=_0x24ed2a[_0x253fbd(0xba)],_0x54367e=[];if(_0x33f669)_0x54367e[_0x253fbd(0xde)](_0x33f669);if(_0x5123b7)_0x54367e[_0x253fbd(0xde)](_0x5123b7);const _0x44e8d9=validateParams(_0x24ed2a);if(_0x44e8d9[_0x253fbd(0xd0)]>0x0){const _0x488ced=_0x44e8d9[_0x253fbd(0xb5)](_0x8007f1=>_0x253fbd(0xc7)+_0x8007f1[_0x253fbd(0xd8)]+':\x20'+_0x8007f1[_0x253fbd(0xc0)])[_0x253fbd(0xd2)](';\x20');throw new Error(_0x253fbd(0xb6)+_0x488ced);}logger[_0x253fbd(0xda)](process['cwd']()),logger['info'](_0x253fbd(0xd5),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x120aa1,'selectedCount':_0x4bd814[_0x253fbd(0xd0)],'jsUrl':_0x33f669,'cssUrl':_0x5123b7});if(_0x33f669){const _0x34179d=await isUrlReachable(_0x33f669);if(!_0x34179d)throw new Error(_0x253fbd(0xb3)+_0x33f669);}if(_0x5123b7){const _0x384cd6=await isUrlReachable(_0x5123b7);if(!_0x384cd6)throw new Error(_0x253fbd(0xcf)+_0x5123b7);}const _0x505e6c=getLocalPages();if(_0x505e6c['length']===0x0){if(_0x4bd814[_0x253fbd(0xd0)]>0x0)throw new Error(_0x253fbd(0xc5)+_0x4bd814[_0x253fbd(0xd2)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x55db83[_0x253fbd(0xbe)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x45184e=await getOnlineMenuList(_0x120aa1,_0x1d6627),_0x303273=new Set(_0x45184e[_0x253fbd(0xb5)](_0x3df0c6=>_0x3df0c6[_0x253fbd(0xbf)]));let _0x46f5c4;if(_0x4bd814['length']>0x0){const _0x52e40f=new Map(_0x505e6c[_0x253fbd(0xb5)](_0x3880b2=>[_0x3880b2['path'],_0x3880b2])),_0x51b34d=_0x4bd814[_0x253fbd(0xca)](_0x359d46=>!_0x52e40f['has'](_0x359d46));if(_0x51b34d[_0x253fbd(0xd0)]>0x0){const _0x29a505=_0x505e6c['map'](_0x48c359=>_0x48c359[_0x253fbd(0xbf)])['join'](',\x20');throw new Error(_0x253fbd(0xc5)+_0x51b34d['join'](',\x20')+_0x253fbd(0xc1)+_0x29a505);}const _0x365785=_0x4bd814['filter'](_0x28e094=>_0x303273[_0x253fbd(0xb2)](_0x28e094));if(_0x365785[_0x253fbd(0xd0)]>0x0)throw new Error(_0x253fbd(0xd1)+_0x365785[_0x253fbd(0xd2)](',\x20'));_0x46f5c4=_0x4bd814[_0x253fbd(0xb5)](_0xa069cd=>_0x52e40f[_0x253fbd(0xdb)](_0xa069cd));}else _0x46f5c4=_0x505e6c[_0x253fbd(0xca)](_0x3394a4=>!_0x303273[_0x253fbd(0xb2)](_0x3394a4['path']));if(_0x46f5c4['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x55db83[_0x253fbd(0xbe)]===!![],'targetPages':[],'plannedMenus':[]};const _0x2af984=_0x46f5c4['map'](_0x4b4877=>({'type':_0x253fbd(0xc6),'path':_0x4b4877['path'],'label':_0x4b4877['label'],'loadScriptMode':_0x253fbd(0xb7),'resources':[..._0x54367e]}));if(_0x55db83[_0x253fbd(0xbe)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x46f5c4,'plannedMenus':_0x2af984};const _0xe1802b=await createMenus(_0x120aa1,_0x1d6627,_0x46f5c4,_0x54367e['length']>0x0?_0x54367e:undefined);return logger['info'](_0x253fbd(0xd5),_0x253fbd(0xc4),{'count':_0x46f5c4['length'],'resources':_0x54367e}),{'created':_0xe1802b['length'],'skipped':![],'dryRun':![],'targetPages':_0x46f5c4,'plannedMenus':_0x2af984,'menus':_0xe1802b};}export function parseMenuSyncParams(_0x10fdb8){const _0x32b69e=a129_0x4d5044;if(!_0x10fdb8||typeof _0x10fdb8!=='string')return{};let _0x5659ba;try{_0x5659ba=JSON['parse'](_0x10fdb8);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0x5659ba!==_0x32b69e(0xbc)||_0x5659ba===null||Array[_0x32b69e(0xce)](_0x5659ba))throw new Error(_0x32b69e(0xbb));const _0x53a7d1=_0x5659ba;if(Object[_0x32b69e(0xe0)](_0x53a7d1,_0x32b69e(0xb9)))throw new Error(_0x32b69e(0xd4));const _0x37d1d8=Object[_0x32b69e(0xcc)](_0x53a7d1)[_0x32b69e(0xca)](_0x18cb9f=>!MENU_SYNC_PARAM_KEYS[_0x32b69e(0xb2)](_0x18cb9f));if(_0x37d1d8[_0x32b69e(0xd0)]>0x0)throw new Error(_0x32b69e(0xb8)+_0x37d1d8['join'](',\x20')+'.');for(const _0x12106d of MENU_SYNC_PARAM_KEYS){const _0x49ecae=_0x53a7d1[_0x12106d];if(_0x49ecae!==undefined&&(typeof _0x49ecae!==_0x32b69e(0xd7)||_0x49ecae[_0x32b69e(0xc3)]()===''))throw new Error(_0x32b69e(0xe1)+_0x12106d+_0x32b69e(0xd9));}return{'jsUrl':typeof _0x53a7d1[_0x32b69e(0xb4)]===_0x32b69e(0xd7)?_0x53a7d1[_0x32b69e(0xb4)][_0x32b69e(0xc3)]():undefined,'cssUrl':typeof _0x53a7d1['cssUrl']===_0x32b69e(0xd7)?_0x53a7d1[_0x32b69e(0xba)][_0x32b69e(0xc3)]():undefined};}
1
+ const a130_0x48f8a8=a130_0x418c;(function(_0x2ac14a,_0x45c4ce){const _0xf75e5e=a130_0x418c,_0x14c70c=_0x2ac14a();while(!![]){try{const _0x4596b5=-parseInt(_0xf75e5e(0xb0))/0x1*(parseInt(_0xf75e5e(0xda))/0x2)+-parseInt(_0xf75e5e(0xd1))/0x3+parseInt(_0xf75e5e(0xd2))/0x4*(parseInt(_0xf75e5e(0xca))/0x5)+parseInt(_0xf75e5e(0xb6))/0x6+-parseInt(_0xf75e5e(0xc5))/0x7*(parseInt(_0xf75e5e(0xb2))/0x8)+parseInt(_0xf75e5e(0xad))/0x9*(-parseInt(_0xf75e5e(0xc0))/0xa)+parseInt(_0xf75e5e(0xc2))/0xb*(parseInt(_0xf75e5e(0xbf))/0xc);if(_0x4596b5===_0x45c4ce)break;else _0x14c70c['push'](_0x14c70c['shift']());}catch(_0x3a0ce2){_0x14c70c['push'](_0x14c70c['shift']());}}}(a130_0x493d,0x20428));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a130_0x493d(){const _0x3636ab=['procode','isArray','1774854lwxhou','label','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','1SrINeE','menu-sync','128HaSiZj','dryRun','Invalid\x20--params.','info','835620DPJHSW','has','map','join','push','Start\x20non-interactive\x20menu\x20sync','keys','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','filter','271056MnPnGJ','10awdvPv','pages','253EJIVUH','CSS\x20URL\x20is\x20unreachable:\x20','jsUrl','81683tQeWxQ','parse',':\x20expected\x20a\x20non-empty\x20string.','No\x20local\x20pages\x20matched\x20paths:\x20','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','1099345WfOfBZ','hasOwn','path','Invalid\x20--params:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','cssUrl','--params.','466248pYstvD','4wHBZLQ','get','JS\x20URL\x20is\x20unreachable:\x20','cwd','object','Menu\x20sync\x20completed','string','field','414402EmDRZY','trim','message','length'];a130_0x493d=function(){return _0x3636ab;};return a130_0x493d();}import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a130_0x48f8a8(0xc4),a130_0x48f8a8(0xcf)]);function validateParams(_0x5025d5){const _0x1f71ff=a130_0x48f8a8,_0x507c47=[];return _0x5025d5['jsUrl']&&!isValidJsHttpsUrl(_0x5025d5[_0x1f71ff(0xc4)])&&_0x507c47['push']({'field':_0x1f71ff(0xc4),'message':_0x1f71ff(0xc9)}),_0x5025d5[_0x1f71ff(0xcf)]&&!isValidCssHttpsUrl(_0x5025d5[_0x1f71ff(0xcf)])&&_0x507c47[_0x1f71ff(0xba)]({'field':_0x1f71ff(0xcf),'message':_0x1f71ff(0xce)}),_0x507c47;}function a130_0x418c(_0x324050,_0x989a1e){_0x324050=_0x324050-0xa8;const _0x493d95=a130_0x493d();let _0x418c47=_0x493d95[_0x324050];return _0x418c47;}export async function runMenuSyncCore(_0x486c96,_0x40e5c9,_0xa98a44=[],_0x17e916,_0x20f2ab={}){const _0x119d4b=a130_0x48f8a8,_0x5b79c0=parseMenuSyncParams(_0x17e916),_0x76586a=[...new Set(_0xa98a44[_0x119d4b(0xb8)](_0x55a482=>_0x55a482[_0x119d4b(0xa8)]())[_0x119d4b(0xbe)](Boolean))],_0x12052a=_0x5b79c0[_0x119d4b(0xc4)],_0x229b16=_0x5b79c0[_0x119d4b(0xcf)],_0x462970=[];if(_0x12052a)_0x462970['push'](_0x12052a);if(_0x229b16)_0x462970['push'](_0x229b16);const _0x5a9a60=validateParams(_0x5b79c0);if(_0x5a9a60['length']>0x0){const _0x4419c3=_0x5a9a60[_0x119d4b(0xb8)](_0x1d666f=>_0x119d4b(0xd0)+_0x1d666f[_0x119d4b(0xd9)]+':\x20'+_0x1d666f[_0x119d4b(0xa9)])[_0x119d4b(0xb9)](';\x20');throw new Error(_0x119d4b(0xcd)+_0x4419c3);}logger['setLogPath'](process[_0x119d4b(0xd5)]()),logger[_0x119d4b(0xb5)](_0x119d4b(0xb1),_0x119d4b(0xbb),{'appCode':_0x486c96,'selectedCount':_0x76586a['length'],'jsUrl':_0x12052a,'cssUrl':_0x229b16});if(_0x12052a){const _0x26cbd5=await isUrlReachable(_0x12052a);if(!_0x26cbd5)throw new Error(_0x119d4b(0xd4)+_0x12052a);}if(_0x229b16){const _0x5aedd1=await isUrlReachable(_0x229b16);if(!_0x5aedd1)throw new Error(_0x119d4b(0xc3)+_0x229b16);}const _0x4747bc=getLocalPages();if(_0x4747bc[_0x119d4b(0xaa)]===0x0){if(_0x76586a[_0x119d4b(0xaa)]>0x0)throw new Error(_0x119d4b(0xc8)+_0x76586a['join'](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x20f2ab['dryRun']===!![],'targetPages':[],'plannedMenus':[]};}const _0x3b26a0=await getOnlineMenuList(_0x486c96,_0x40e5c9),_0x5443bf=new Set(_0x3b26a0[_0x119d4b(0xb8)](_0x5256eb=>_0x5256eb[_0x119d4b(0xcc)]));let _0x9b2bac;if(_0x76586a[_0x119d4b(0xaa)]>0x0){const _0x525cc2=new Map(_0x4747bc[_0x119d4b(0xb8)](_0x359280=>[_0x359280['path'],_0x359280])),_0x5734c4=_0x76586a['filter'](_0x22c91e=>!_0x525cc2['has'](_0x22c91e));if(_0x5734c4['length']>0x0){const _0x9aec55=_0x4747bc[_0x119d4b(0xb8)](_0x256fcf=>_0x256fcf[_0x119d4b(0xcc)])['join'](',\x20');throw new Error(_0x119d4b(0xc8)+_0x5734c4[_0x119d4b(0xb9)](',\x20')+'\x0a\x20\x20Available\x20local\x20paths:\x20'+_0x9aec55);}const _0x57faed=_0x76586a[_0x119d4b(0xbe)](_0x382bdb=>_0x5443bf[_0x119d4b(0xb7)](_0x382bdb));if(_0x57faed['length']>0x0)throw new Error(_0x119d4b(0xaf)+_0x57faed['join'](',\x20'));_0x9b2bac=_0x76586a['map'](_0x3e2162=>_0x525cc2[_0x119d4b(0xd3)](_0x3e2162));}else _0x9b2bac=_0x4747bc['filter'](_0x45105b=>!_0x5443bf[_0x119d4b(0xb7)](_0x45105b['path']));if(_0x9b2bac[_0x119d4b(0xaa)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x20f2ab[_0x119d4b(0xb3)]===!![],'targetPages':[],'plannedMenus':[]};const _0x122af3=_0x9b2bac['map'](_0x332d=>({'type':_0x119d4b(0xab),'path':_0x332d[_0x119d4b(0xcc)],'label':_0x332d[_0x119d4b(0xae)],'loadScriptMode':'import','resources':[..._0x462970]}));if(_0x20f2ab[_0x119d4b(0xb3)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x9b2bac,'plannedMenus':_0x122af3};const _0xb9d72=await createMenus(_0x486c96,_0x40e5c9,_0x9b2bac,_0x462970[_0x119d4b(0xaa)]>0x0?_0x462970:undefined);return logger[_0x119d4b(0xb5)](_0x119d4b(0xb1),_0x119d4b(0xd7),{'count':_0x9b2bac[_0x119d4b(0xaa)],'resources':_0x462970}),{'created':_0xb9d72['length'],'skipped':![],'dryRun':![],'targetPages':_0x9b2bac,'plannedMenus':_0x122af3,'menus':_0xb9d72};}export function parseMenuSyncParams(_0x387e5b){const _0x154aed=a130_0x48f8a8;if(!_0x387e5b||typeof _0x387e5b!==_0x154aed(0xd8))return{};let _0x1b7d93;try{_0x1b7d93=JSON[_0x154aed(0xc6)](_0x387e5b);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0x1b7d93!==_0x154aed(0xd6)||_0x1b7d93===null||Array[_0x154aed(0xac)](_0x1b7d93))throw new Error(_0x154aed(0xbd));const _0x301521=_0x1b7d93;if(Object[_0x154aed(0xcb)](_0x301521,_0x154aed(0xc1)))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x1d1ef5=Object[_0x154aed(0xbc)](_0x301521)['filter'](_0x45906d=>!MENU_SYNC_PARAM_KEYS[_0x154aed(0xb7)](_0x45906d));if(_0x1d1ef5[_0x154aed(0xaa)]>0x0)throw new Error('Invalid\x20--params\x20fields:\x20'+_0x1d1ef5[_0x154aed(0xb9)](',\x20')+'.');for(const _0xb5a4b3 of MENU_SYNC_PARAM_KEYS){const _0x3af971=_0x301521[_0xb5a4b3];if(_0x3af971!==undefined&&(typeof _0x3af971!==_0x154aed(0xd8)||_0x3af971[_0x154aed(0xa8)]()===''))throw new Error(_0x154aed(0xb4)+_0xb5a4b3+_0x154aed(0xc7));}return{'jsUrl':typeof _0x301521['jsUrl']===_0x154aed(0xd8)?_0x301521[_0x154aed(0xc4)][_0x154aed(0xa8)]():undefined,'cssUrl':typeof _0x301521[_0x154aed(0xcf)]===_0x154aed(0xd8)?_0x301521[_0x154aed(0xcf)][_0x154aed(0xa8)]():undefined};}
@@ -1 +1 @@
1
- (function(_0x13c9da,_0x4588ad){const _0x1696ad=a131_0x557f,_0x26eb80=_0x13c9da();while(!![]){try{const _0xced495=-parseInt(_0x1696ad(0x101))/0x1*(-parseInt(_0x1696ad(0x11f))/0x2)+parseInt(_0x1696ad(0x11c))/0x3*(parseInt(_0x1696ad(0x104))/0x4)+parseInt(_0x1696ad(0x12e))/0x5*(-parseInt(_0x1696ad(0x132))/0x6)+parseInt(_0x1696ad(0x12d))/0x7*(parseInt(_0x1696ad(0x120))/0x8)+parseInt(_0x1696ad(0x12b))/0x9*(-parseInt(_0x1696ad(0xfe))/0xa)+parseInt(_0x1696ad(0x109))/0xb+parseInt(_0x1696ad(0x107))/0xc*(parseInt(_0x1696ad(0x117))/0xd);if(_0xced495===_0x4588ad)break;else _0x26eb80['push'](_0x26eb80['shift']());}catch(_0x26671b){_0x26eb80['push'](_0x26eb80['shift']());}}}(a131_0x692f,0xee6b0));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a131_0x557f(_0x342641,_0x170b4f){_0x342641=_0x342641-0xf0;const _0x692f2=a131_0x692f();let _0x557fe0=_0x692f2[_0x342641];return _0x557fe0;}function validateParams(_0x4e6cd8){const _0x1b7dec=a131_0x557f,_0x122948=[];return _0x4e6cd8[_0x1b7dec(0x121)]&&!isValidJsHttpsUrl(_0x4e6cd8[_0x1b7dec(0x121)])&&_0x122948[_0x1b7dec(0x123)]({'field':_0x1b7dec(0x121),'message':_0x1b7dec(0xf1)}),_0x4e6cd8[_0x1b7dec(0x108)]&&!isValidCssHttpsUrl(_0x4e6cd8[_0x1b7dec(0x108)])&&_0x122948[_0x1b7dec(0x123)]({'field':_0x1b7dec(0x108),'message':_0x1b7dec(0x119)}),_0x122948;}export async function runMenuUpdateCore(_0x337df3,_0x31b9fa,_0x892d9c,_0x472c0e={}){const _0x1345ec=a131_0x557f,_0x414a57=parseUpdateParamsFlag(_0x892d9c),_0x2aae4f=normalizeMode(_0x472c0e['mode']);validateSelection(_0x472c0e[_0x1345ec(0xff)]);const _0x43fcc0=[];if(_0x414a57[_0x1345ec(0x121)])_0x43fcc0[_0x1345ec(0x123)](_0x414a57[_0x1345ec(0x121)]);if(_0x414a57[_0x1345ec(0x108)])_0x43fcc0[_0x1345ec(0x123)](_0x414a57[_0x1345ec(0x108)]);const _0x543b8f=validateParams(_0x414a57);if(_0x543b8f[_0x1345ec(0xf7)]>0x0){const _0x1531a1=_0x543b8f[_0x1345ec(0x11b)](_0x1c2325=>_0x1345ec(0x127)+_0x1c2325['field']+':\x20'+_0x1c2325[_0x1345ec(0x111)])[_0x1345ec(0x12c)](';\x20');throw new Error(_0x1345ec(0xf6)+_0x1531a1);}if(_0x43fcc0[_0x1345ec(0xf7)]===0x0)throw new Error('Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+_0x1345ec(0xf4));logger[_0x1345ec(0xf3)](process[_0x1345ec(0x10e)]()),logger[_0x1345ec(0x10a)](_0x1345ec(0x131),_0x1345ec(0xfc),{'appCode':_0x337df3,'jsUrl':_0x414a57['jsUrl'],'cssUrl':_0x414a57[_0x1345ec(0x108)],'mode':_0x2aae4f,'dryRun':_0x472c0e['dryRun']===!![]});if(_0x414a57[_0x1345ec(0x121)]){const _0x457729=await isUrlReachable(_0x414a57[_0x1345ec(0x121)]);if(!_0x457729)throw new Error(_0x1345ec(0x12a)+_0x414a57[_0x1345ec(0x121)]);}if(_0x414a57[_0x1345ec(0x108)]){const _0xb696c3=await isUrlReachable(_0x414a57[_0x1345ec(0x108)]);if(!_0xb696c3)throw new Error(_0x1345ec(0x100)+_0x414a57[_0x1345ec(0x108)]);}const _0x55d5c7=await getOnlineMenuList(_0x337df3,_0x31b9fa),_0x4196c5=_0x55d5c7[_0x1345ec(0x113)](_0x1b7a95=>_0x1b7a95[_0x1345ec(0xf8)][_0x1345ec(0xf7)]>0x0),_0x58415d=selectMenusForUpdate(_0x4196c5,_0x472c0e[_0x1345ec(0xff)]);if(_0x58415d[_0x1345ec(0xf7)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x472c0e[_0x1345ec(0x10f)]===!![]};const _0x39a513=_0x58415d[_0x1345ec(0x11b)](_0x89946=>buildMenuUpdateDiff(_0x89946,_0x414a57,_0x2aae4f,_0x472c0e['force']===!![],_0x472c0e[_0x1345ec(0x122)]));if(_0x472c0e[_0x1345ec(0x10f)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x39a513};const _0x5a02dc=await Promise['allSettled'](_0x58415d[_0x1345ec(0x11b)]((_0x134dbd,_0x3588fe)=>updateMenuCdnUrl(_0x337df3,_0x31b9fa,{'id':_0x134dbd['id'],'label':_0x134dbd[_0x1345ec(0x11d)],'path':_0x134dbd[_0x1345ec(0x103)],'resources':_0x39a513[_0x3588fe][_0x1345ec(0x137)][_0x1345ec(0xf8)],'extend':_0x134dbd['extend']??null,'loadScriptMode':_0x472c0e['loadScriptMode']}))),_0x51ac85=_0x5a02dc[_0x1345ec(0x113)](_0x10bb00=>_0x10bb00['status']===_0x1345ec(0x116))[_0x1345ec(0x11b)](_0x589118=>_0x589118[_0x1345ec(0x126)]),_0x562613=_0x5a02dc[_0x1345ec(0x113)](_0x584238=>_0x584238[_0x1345ec(0x135)]==='rejected')['length'];return logger[_0x1345ec(0x10a)](_0x1345ec(0x131),_0x1345ec(0xf2),{'count':_0x58415d['length'],'resources':_0x43fcc0}),{'updated':_0x51ac85[_0x1345ec(0xf7)],'failed':_0x562613,'skipped':![],'menus':_0x51ac85};}function validateSelection(_0x28814e){const _0x32b2b7=a131_0x557f;if(!_0x28814e)throw new Error(_0x32b2b7(0x11a));if(_0x28814e[_0x32b2b7(0x110)]&&(_0x28814e[_0x32b2b7(0x124)][_0x32b2b7(0xf7)]>0x0||_0x28814e['paths'][_0x32b2b7(0xf7)]>0x0))throw new Error(_0x32b2b7(0x136));if(!_0x28814e[_0x32b2b7(0x110)]&&_0x28814e[_0x32b2b7(0x124)]['length']===0x0&&_0x28814e[_0x32b2b7(0x11e)]['length']===0x0)throw new Error(_0x32b2b7(0x11a));}export function selectMenusForUpdate(_0x576535,_0x5c0392){const _0x17ef53=a131_0x557f;validateSelection(_0x5c0392);if(_0x5c0392[_0x17ef53(0x110)])return _0x576535;const _0x1126f3=new Set(_0x576535[_0x17ef53(0x11b)](_0x5ed7e0=>_0x5ed7e0['id'])),_0x5d5957=new Set(_0x576535['map'](_0x6e8c8b=>_0x6e8c8b[_0x17ef53(0x103)])),_0x280fb1=_0x5c0392[_0x17ef53(0x124)][_0x17ef53(0x113)](_0x566ef1=>!_0x1126f3[_0x17ef53(0x129)](_0x566ef1)),_0xe0be1e=_0x5c0392[_0x17ef53(0x11e)][_0x17ef53(0x113)](_0x1457e0=>!_0x5d5957[_0x17ef53(0x129)](_0x1457e0));if(_0x280fb1[_0x17ef53(0xf7)]>0x0||_0xe0be1e[_0x17ef53(0xf7)]>0x0){const _0xa57f42=[..._0x280fb1[_0x17ef53(0x11b)](_0x5cc3c1=>String(_0x5cc3c1)),..._0xe0be1e][_0x17ef53(0x12c)](',\x20');throw new Error(_0x17ef53(0xf0)+_0xa57f42);}const _0x18e2bf=new Set(_0x5c0392[_0x17ef53(0x124)]),_0x38c55f=new Set(_0x5c0392[_0x17ef53(0x11e)]);return _0x576535[_0x17ef53(0x113)](_0x177f6f=>_0x18e2bf[_0x17ef53(0x129)](_0x177f6f['id'])||_0x38c55f[_0x17ef53(0x129)](_0x177f6f[_0x17ef53(0x103)]));}function normalizeMode(_0x104074){const _0x4e2e7f=a131_0x557f;if(!_0x104074)return _0x4e2e7f(0x133);if(_0x104074===_0x4e2e7f(0x10d)||_0x104074===_0x4e2e7f(0x133))return _0x104074;throw new Error(_0x4e2e7f(0x115)+_0x104074+_0x4e2e7f(0xfa));}function buildMenuUpdateDiff(_0x2f1c4d,_0x341eaa,_0x373827,_0x4a49d3,_0x1bc1f9){const _0x1eada2=a131_0x557f,_0x49f312=[..._0x2f1c4d[_0x1eada2(0xf8)]];_0x373827==='patch'&&assertUnambiguousPatchResources(_0x2f1c4d,_0x49f312,_0x341eaa);const _0x2479aa=_0x373827===_0x1eada2(0x133)?patchResources(_0x49f312,_0x341eaa):replaceResources(_0x341eaa),_0x464c95=[],_0x36627f=_0x49f312[_0x1eada2(0x118)](isJsResource),_0x96f8d9=_0x2479aa[_0x1eada2(0x118)](isJsResource);if(_0x36627f&&!_0x96f8d9){const _0x28b0c3='menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x2f1c4d[_0x1eada2(0x11d)]+'\x22\x20('+_0x2f1c4d[_0x1eada2(0x103)]+_0x1eada2(0x10c)+_0x1eada2(0x10b);if(!_0x4a49d3)throw new Error(_0x28b0c3);_0x464c95[_0x1eada2(0x123)](_0x28b0c3);}const _0x4cb39f=_0x49f312[_0x1eada2(0x118)](isCssResource),_0x331a9d=_0x2479aa[_0x1eada2(0x118)](isCssResource);_0x4cb39f&&!_0x331a9d&&_0x464c95[_0x1eada2(0x123)](_0x1eada2(0x130)+_0x2f1c4d[_0x1eada2(0x11d)]+'\x22\x20('+_0x2f1c4d[_0x1eada2(0x103)]+').');const _0x1f1ebe=typeof _0x2f1c4d[_0x1eada2(0x114)]?.['loadScriptMode']===_0x1eada2(0x105)?_0x2f1c4d[_0x1eada2(0x114)][_0x1eada2(0x122)]:null,_0xd4b69f=_0x1bc1f9?{'loadScriptMode':_0x1f1ebe}:{},_0x148baa=_0x1bc1f9?{'loadScriptMode':_0x1bc1f9}:{};return{'id':_0x2f1c4d['id'],'label':_0x2f1c4d['label'],'path':_0x2f1c4d['path'],'mode':_0x373827,'before':{'resources':_0x49f312,..._0xd4b69f},'after':{'resources':_0x2479aa,..._0x148baa},'warnings':_0x464c95};}function replaceResources(_0x5dcba0){const _0x95160a=a131_0x557f;return[_0x5dcba0[_0x95160a(0x121)],_0x5dcba0[_0x95160a(0x108)]][_0x95160a(0x113)](_0x1a9e2d=>!!_0x1a9e2d);}function assertUnambiguousPatchResources(_0x427b2e,_0x4112af,_0x5e2db9){const _0x292a27=a131_0x557f,_0x87dbb5=_0x4112af[_0x292a27(0x113)](isJsResource)[_0x292a27(0xf7)];if(_0x5e2db9[_0x292a27(0x121)]&&_0x87dbb5>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x87dbb5+_0x292a27(0x128)+_0x427b2e['label']+_0x292a27(0xf9)+_0x427b2e[_0x292a27(0x103)]+')\x20'+_0x292a27(0xf5));const _0x546a5f=_0x4112af['filter'](isCssResource)[_0x292a27(0xf7)];if(_0x5e2db9['cssUrl']&&_0x546a5f>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x546a5f+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x427b2e[_0x292a27(0x11d)]+_0x292a27(0xf9)+_0x427b2e[_0x292a27(0x103)]+')\x20'+_0x292a27(0x134));}function a131_0x692f(){const _0x5953de=['JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Menu\x20asset\x20update\x20completed','setLogPath','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','Invalid\x20--params:\x20','length','resources','\x22\x20(','.\x20Allowed\x20values:\x20replace,\x20patch','isArray','Start\x20non-interactive\x20menu\x20asset\x20update','object','751470CKQTQx','selection','CSS\x20URL\x20is\x20unreachable:\x20','77RpJMKF','trim','path','4xsWvLC','string','.js','4164nHfBcS','cssUrl','6803214AwbBdu','info','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.',').\x20','replace','cwd','dryRun','all','message','toLowerCase','filter','extend','Invalid\x20--mode:\x20','fulfilled','24037jlJuhg','some','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','map','780969YzbXQD','label','paths','10238kazhny','8NksKyy','jsUrl','loadScriptMode','push','menuIds','split','value','--params.','\x20existing\x20JS\x20resources\x20for\x20\x22','has','JS\x20URL\x20is\x20unreachable:\x20','99cuYnmM','join','1372301WzFFrP','145tZSWEe','endsWith','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','menu-asset-update','63606QeGWif','patch','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','status','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','after','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'];a131_0x692f=function(){return _0x5953de;};return a131_0x692f();}function patchResources(_0x36d2b5,_0x3f22b1){const _0x202744=a131_0x557f;let _0x2a322b=![],_0x3ac4fd=![];const _0x37f079=[];for(const _0x5441ef of _0x36d2b5){if(isJsResource(_0x5441ef)){if(_0x3f22b1['jsUrl']&&!_0x2a322b)_0x37f079[_0x202744(0x123)](_0x3f22b1[_0x202744(0x121)]),_0x2a322b=!![];else!_0x3f22b1['jsUrl']&&_0x37f079[_0x202744(0x123)](_0x5441ef);continue;}if(isCssResource(_0x5441ef)){if(_0x3f22b1['cssUrl']&&!_0x3ac4fd)_0x37f079[_0x202744(0x123)](_0x3f22b1[_0x202744(0x108)]),_0x3ac4fd=!![];else!_0x3f22b1[_0x202744(0x108)]&&_0x37f079[_0x202744(0x123)](_0x5441ef);continue;}_0x37f079[_0x202744(0x123)](_0x5441ef);}return _0x3f22b1['jsUrl']&&!_0x2a322b&&_0x37f079['unshift'](_0x3f22b1[_0x202744(0x121)]),_0x3f22b1[_0x202744(0x108)]&&!_0x3ac4fd&&_0x37f079['push'](_0x3f22b1[_0x202744(0x108)]),_0x37f079;}function isJsResource(_0x4d52fe){const _0x5e9986=a131_0x557f;return stripQuery(_0x4d52fe)[_0x5e9986(0x112)]()[_0x5e9986(0x12f)](_0x5e9986(0x106));}function isCssResource(_0x1c89bc){const _0x4bc97e=a131_0x557f;return stripQuery(_0x1c89bc)[_0x4bc97e(0x112)]()[_0x4bc97e(0x12f)]('.css');}function stripQuery(_0xd6ae5d){const _0x5883eb=a131_0x557f;return _0xd6ae5d[_0x5883eb(0x125)]('?')[0x0]??_0xd6ae5d;}function parseUpdateParamsFlag(_0x2019f9){const _0x1ba047=a131_0x557f;if(!_0x2019f9||typeof _0x2019f9!==_0x1ba047(0x105))return{};try{const _0x4739a8=JSON['parse'](_0x2019f9);if(typeof _0x4739a8!==_0x1ba047(0xfd)||_0x4739a8===null||Array[_0x1ba047(0xfb)](_0x4739a8))return{};return{'jsUrl':typeof _0x4739a8[_0x1ba047(0x121)]===_0x1ba047(0x105)?_0x4739a8[_0x1ba047(0x121)][_0x1ba047(0x102)]():undefined,'cssUrl':typeof _0x4739a8['cssUrl']===_0x1ba047(0x105)?_0x4739a8[_0x1ba047(0x108)][_0x1ba047(0x102)]():undefined};}catch{return{};}}
1
+ (function(_0x2c52de,_0x47d9de){const _0x532072=a132_0x2ee8,_0xc2d603=_0x2c52de();while(!![]){try{const _0xa228a3=parseInt(_0x532072(0x15d))/0x1*(parseInt(_0x532072(0x15e))/0x2)+-parseInt(_0x532072(0x169))/0x3+parseInt(_0x532072(0x173))/0x4*(parseInt(_0x532072(0x161))/0x5)+-parseInt(_0x532072(0x179))/0x6+-parseInt(_0x532072(0x16d))/0x7+parseInt(_0x532072(0x15c))/0x8+parseInt(_0x532072(0x192))/0x9;if(_0xa228a3===_0x47d9de)break;else _0xc2d603['push'](_0xc2d603['shift']());}catch(_0xb8341b){_0xc2d603['push'](_0xc2d603['shift']());}}}(a132_0x35b3,0xa9ed9));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x374206){const _0xa2adbe=a132_0x2ee8,_0x98da83=[];return _0x374206[_0xa2adbe(0x168)]&&!isValidJsHttpsUrl(_0x374206[_0xa2adbe(0x168)])&&_0x98da83[_0xa2adbe(0x178)]({'field':_0xa2adbe(0x168),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x374206['cssUrl']&&!isValidCssHttpsUrl(_0x374206[_0xa2adbe(0x16b)])&&_0x98da83[_0xa2adbe(0x178)]({'field':_0xa2adbe(0x16b),'message':_0xa2adbe(0x17c)}),_0x98da83;}export async function runMenuUpdateCore(_0xdffb5d,_0x2b4541,_0x421f62,_0x5c88ae={}){const _0x5a0eab=a132_0x2ee8,_0x18fcf2=parseUpdateParamsFlag(_0x421f62),_0x3c2fd6=normalizeMode(_0x5c88ae[_0x5a0eab(0x186)]);validateSelection(_0x5c88ae['selection']);const _0x583b85=[];if(_0x18fcf2[_0x5a0eab(0x168)])_0x583b85[_0x5a0eab(0x178)](_0x18fcf2['jsUrl']);if(_0x18fcf2['cssUrl'])_0x583b85[_0x5a0eab(0x178)](_0x18fcf2['cssUrl']);const _0x4d9c48=validateParams(_0x18fcf2);if(_0x4d9c48['length']>0x0){const _0x5cc68e=_0x4d9c48['map'](_0x3ff318=>'--params.'+_0x3ff318[_0x5a0eab(0x18c)]+':\x20'+_0x3ff318['message'])[_0x5a0eab(0x189)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x5cc68e);}if(_0x583b85[_0x5a0eab(0x183)]===0x0)throw new Error(_0x5a0eab(0x18a)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x5a0eab(0x17b)](process[_0x5a0eab(0x15f)]()),logger[_0x5a0eab(0x15b)](_0x5a0eab(0x187),_0x5a0eab(0x172),{'appCode':_0xdffb5d,'jsUrl':_0x18fcf2[_0x5a0eab(0x168)],'cssUrl':_0x18fcf2[_0x5a0eab(0x16b)],'mode':_0x3c2fd6,'dryRun':_0x5c88ae[_0x5a0eab(0x184)]===!![]});if(_0x18fcf2[_0x5a0eab(0x168)]){const _0x1780db=await isUrlReachable(_0x18fcf2[_0x5a0eab(0x168)]);if(!_0x1780db)throw new Error(_0x5a0eab(0x191)+_0x18fcf2[_0x5a0eab(0x168)]);}if(_0x18fcf2[_0x5a0eab(0x16b)]){const _0x15f850=await isUrlReachable(_0x18fcf2[_0x5a0eab(0x16b)]);if(!_0x15f850)throw new Error(_0x5a0eab(0x195)+_0x18fcf2[_0x5a0eab(0x16b)]);}const _0x3e2577=await getOnlineMenuList(_0xdffb5d,_0x2b4541),_0x5e8ad7=_0x3e2577[_0x5a0eab(0x16a)](_0xfa1559=>_0xfa1559[_0x5a0eab(0x197)][_0x5a0eab(0x183)]>0x0),_0x2173ca=selectMenusForUpdate(_0x5e8ad7,_0x5c88ae[_0x5a0eab(0x18d)]);if(_0x2173ca[_0x5a0eab(0x183)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x5c88ae[_0x5a0eab(0x184)]===!![]};const _0x2f2601=_0x2173ca[_0x5a0eab(0x159)](_0x23ab3c=>buildMenuUpdateDiff(_0x23ab3c,_0x18fcf2,_0x3c2fd6,_0x5c88ae[_0x5a0eab(0x155)]===!![],_0x5c88ae[_0x5a0eab(0x17e)]));if(_0x5c88ae[_0x5a0eab(0x184)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x2f2601};const _0xc5fb68=await Promise[_0x5a0eab(0x16e)](_0x2173ca['map']((_0x315d0c,_0x3d384c)=>updateMenuCdnUrl(_0xdffb5d,_0x2b4541,{'id':_0x315d0c['id'],'label':_0x315d0c[_0x5a0eab(0x174)],'path':_0x315d0c[_0x5a0eab(0x15a)],'resources':_0x2f2601[_0x3d384c]['after'][_0x5a0eab(0x197)],'extend':_0x315d0c[_0x5a0eab(0x193)]??null,'loadScriptMode':_0x5c88ae[_0x5a0eab(0x17e)]}))),_0x437ea2=_0xc5fb68[_0x5a0eab(0x16a)](_0x544f9b=>_0x544f9b[_0x5a0eab(0x17d)]===_0x5a0eab(0x156))[_0x5a0eab(0x159)](_0x2001ae=>_0x2001ae[_0x5a0eab(0x166)]),_0x2fbb7e=_0xc5fb68[_0x5a0eab(0x16a)](_0x412f5f=>_0x412f5f[_0x5a0eab(0x17d)]===_0x5a0eab(0x17a))[_0x5a0eab(0x183)];return logger[_0x5a0eab(0x15b)]('menu-asset-update',_0x5a0eab(0x162),{'count':_0x2173ca[_0x5a0eab(0x183)],'resources':_0x583b85}),{'updated':_0x437ea2[_0x5a0eab(0x183)],'failed':_0x2fbb7e,'skipped':![],'menus':_0x437ea2};}function validateSelection(_0x461378){const _0x4bcd55=a132_0x2ee8;if(!_0x461378)throw new Error(_0x4bcd55(0x167));if(_0x461378[_0x4bcd55(0x181)]&&(_0x461378[_0x4bcd55(0x180)][_0x4bcd55(0x183)]>0x0||_0x461378[_0x4bcd55(0x196)][_0x4bcd55(0x183)]>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0x461378[_0x4bcd55(0x181)]&&_0x461378[_0x4bcd55(0x180)][_0x4bcd55(0x183)]===0x0&&_0x461378[_0x4bcd55(0x196)][_0x4bcd55(0x183)]===0x0)throw new Error(_0x4bcd55(0x167));}export function selectMenusForUpdate(_0xe8dda,_0x17e7c5){const _0x375116=a132_0x2ee8;validateSelection(_0x17e7c5);if(_0x17e7c5[_0x375116(0x181)])return _0xe8dda;const _0x52a1c1=new Set(_0xe8dda[_0x375116(0x159)](_0x414c21=>_0x414c21['id'])),_0x415333=new Set(_0xe8dda['map'](_0x4831a9=>_0x4831a9['path'])),_0x4f89ec=_0x17e7c5[_0x375116(0x180)][_0x375116(0x16a)](_0x313a69=>!_0x52a1c1[_0x375116(0x198)](_0x313a69)),_0x237e8b=_0x17e7c5[_0x375116(0x196)]['filter'](_0x2bf372=>!_0x415333[_0x375116(0x198)](_0x2bf372));if(_0x4f89ec['length']>0x0||_0x237e8b[_0x375116(0x183)]>0x0){const _0x9fc072=[..._0x4f89ec[_0x375116(0x159)](_0x38a6fb=>String(_0x38a6fb)),..._0x237e8b][_0x375116(0x189)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x9fc072);}const _0x413631=new Set(_0x17e7c5[_0x375116(0x180)]),_0x122981=new Set(_0x17e7c5[_0x375116(0x196)]);return _0xe8dda[_0x375116(0x16a)](_0x19aece=>_0x413631[_0x375116(0x198)](_0x19aece['id'])||_0x122981[_0x375116(0x198)](_0x19aece[_0x375116(0x15a)]));}function normalizeMode(_0x2bfb43){const _0x573796=a132_0x2ee8;if(!_0x2bfb43)return _0x573796(0x17f);if(_0x2bfb43===_0x573796(0x182)||_0x2bfb43===_0x573796(0x17f))return _0x2bfb43;throw new Error(_0x573796(0x176)+_0x2bfb43+_0x573796(0x160));}function buildMenuUpdateDiff(_0x40dd10,_0x383ae1,_0x5e614c,_0xdbde01,_0x156110){const _0x268945=a132_0x2ee8,_0xa7bd75=[..._0x40dd10[_0x268945(0x197)]];_0x5e614c===_0x268945(0x17f)&&assertUnambiguousPatchResources(_0x40dd10,_0xa7bd75,_0x383ae1);const _0x50d4ea=_0x5e614c===_0x268945(0x17f)?patchResources(_0xa7bd75,_0x383ae1):replaceResources(_0x383ae1),_0xbe038a=[],_0x5f30b8=_0xa7bd75[_0x268945(0x16f)](isJsResource),_0x13861f=_0x50d4ea['some'](isJsResource);if(_0x5f30b8&&!_0x13861f){const _0x26fcec=_0x268945(0x170)+_0x40dd10[_0x268945(0x174)]+_0x268945(0x185)+_0x40dd10[_0x268945(0x15a)]+_0x268945(0x18e)+_0x268945(0x190);if(!_0xdbde01)throw new Error(_0x26fcec);_0xbe038a[_0x268945(0x178)](_0x26fcec);}const _0x35af03=_0xa7bd75[_0x268945(0x16f)](isCssResource),_0xa95216=_0x50d4ea[_0x268945(0x16f)](isCssResource);_0x35af03&&!_0xa95216&&_0xbe038a[_0x268945(0x178)](_0x268945(0x175)+_0x40dd10[_0x268945(0x174)]+_0x268945(0x185)+_0x40dd10[_0x268945(0x15a)]+').');const _0x23bf56=typeof _0x40dd10[_0x268945(0x193)]?.['loadScriptMode']===_0x268945(0x157)?_0x40dd10['extend']['loadScriptMode']:null,_0x5ed60e=_0x156110?{'loadScriptMode':_0x23bf56}:{},_0x2342f3=_0x156110?{'loadScriptMode':_0x156110}:{};return{'id':_0x40dd10['id'],'label':_0x40dd10[_0x268945(0x174)],'path':_0x40dd10[_0x268945(0x15a)],'mode':_0x5e614c,'before':{'resources':_0xa7bd75,..._0x5ed60e},'after':{'resources':_0x50d4ea,..._0x2342f3},'warnings':_0xbe038a};}function a132_0x2ee8(_0x19489c,_0x2ae83c){_0x19489c=_0x19489c-0x155;const _0x35b3a3=a132_0x35b3();let _0x2ee8e=_0x35b3a3[_0x19489c];return _0x2ee8e;}function replaceResources(_0x5ad1cc){const _0x302dbd=a132_0x2ee8;return[_0x5ad1cc[_0x302dbd(0x168)],_0x5ad1cc[_0x302dbd(0x16b)]][_0x302dbd(0x16a)](_0xd383c1=>!!_0xd383c1);}function assertUnambiguousPatchResources(_0x556432,_0x11556a,_0x4e1689){const _0x29ea25=a132_0x2ee8,_0x5dfc47=_0x11556a[_0x29ea25(0x16a)](isJsResource)[_0x29ea25(0x183)];if(_0x4e1689['jsUrl']&&_0x5dfc47>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x5dfc47+_0x29ea25(0x18f)+_0x556432[_0x29ea25(0x174)]+_0x29ea25(0x185)+_0x556432[_0x29ea25(0x15a)]+')\x20'+_0x29ea25(0x194));const _0x4ce65f=_0x11556a['filter'](isCssResource)['length'];if(_0x4e1689[_0x29ea25(0x16b)]&&_0x4ce65f>0x1)throw new Error(_0x29ea25(0x163)+_0x4ce65f+_0x29ea25(0x165)+_0x556432[_0x29ea25(0x174)]+_0x29ea25(0x185)+_0x556432[_0x29ea25(0x15a)]+')\x20'+_0x29ea25(0x18b));}function a132_0x35b3(){const _0x4673d9=['map','path','info','7881104myPMCv','75315IVDXKT','30krJmRy','cwd','.\x20Allowed\x20values:\x20replace,\x20patch','23645mgncwm','Menu\x20asset\x20update\x20completed','menu\x20asset-update\x20cannot\x20patch\x20','split','\x20existing\x20CSS\x20resources\x20for\x20\x22','value','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','jsUrl','369975IzGEOI','filter','cssUrl','.css','7984242AmFchu','allSettled','some','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','endsWith','Start\x20non-interactive\x20menu\x20asset\x20update','128KUUqFJ','label','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','Invalid\x20--mode:\x20','trim','push','6276792dkdUrz','rejected','setLogPath','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','status','loadScriptMode','patch','menuIds','all','replace','length','dryRun','\x22\x20(','mode','menu-asset-update','parse','join','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','field','selection',').\x20','\x20existing\x20JS\x20resources\x20for\x20\x22','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','JS\x20URL\x20is\x20unreachable:\x20','6659073SyHtoC','extend','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','CSS\x20URL\x20is\x20unreachable:\x20','paths','resources','has','force','fulfilled','string','object'];a132_0x35b3=function(){return _0x4673d9;};return a132_0x35b3();}function patchResources(_0xee963f,_0x8e0eea){const _0x5a2b41=a132_0x2ee8;let _0x26fdb7=![],_0x51b526=![];const _0x410cc1=[];for(const _0x1e3b6b of _0xee963f){if(isJsResource(_0x1e3b6b)){if(_0x8e0eea[_0x5a2b41(0x168)]&&!_0x26fdb7)_0x410cc1[_0x5a2b41(0x178)](_0x8e0eea['jsUrl']),_0x26fdb7=!![];else!_0x8e0eea[_0x5a2b41(0x168)]&&_0x410cc1[_0x5a2b41(0x178)](_0x1e3b6b);continue;}if(isCssResource(_0x1e3b6b)){if(_0x8e0eea[_0x5a2b41(0x16b)]&&!_0x51b526)_0x410cc1[_0x5a2b41(0x178)](_0x8e0eea[_0x5a2b41(0x16b)]),_0x51b526=!![];else!_0x8e0eea['cssUrl']&&_0x410cc1[_0x5a2b41(0x178)](_0x1e3b6b);continue;}_0x410cc1['push'](_0x1e3b6b);}return _0x8e0eea[_0x5a2b41(0x168)]&&!_0x26fdb7&&_0x410cc1['unshift'](_0x8e0eea[_0x5a2b41(0x168)]),_0x8e0eea['cssUrl']&&!_0x51b526&&_0x410cc1[_0x5a2b41(0x178)](_0x8e0eea[_0x5a2b41(0x16b)]),_0x410cc1;}function isJsResource(_0x5ab653){const _0x36d433=a132_0x2ee8;return stripQuery(_0x5ab653)['toLowerCase']()[_0x36d433(0x171)]('.js');}function isCssResource(_0xc337dc){const _0xae1850=a132_0x2ee8;return stripQuery(_0xc337dc)['toLowerCase']()['endsWith'](_0xae1850(0x16c));}function stripQuery(_0xb92708){const _0x2741f9=a132_0x2ee8;return _0xb92708[_0x2741f9(0x164)]('?')[0x0]??_0xb92708;}function parseUpdateParamsFlag(_0x1442f4){const _0x193789=a132_0x2ee8;if(!_0x1442f4||typeof _0x1442f4!==_0x193789(0x157))return{};try{const _0x3f400a=JSON[_0x193789(0x188)](_0x1442f4);if(typeof _0x3f400a!==_0x193789(0x158)||_0x3f400a===null||Array['isArray'](_0x3f400a))return{};return{'jsUrl':typeof _0x3f400a['jsUrl']===_0x193789(0x157)?_0x3f400a[_0x193789(0x168)][_0x193789(0x177)]():undefined,'cssUrl':typeof _0x3f400a[_0x193789(0x16b)]==='string'?_0x3f400a[_0x193789(0x16b)]['trim']():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x5e6a4f,_0x3d881e){const _0x336413=a132_0x4b36,_0x33f6eb=_0x5e6a4f();while(!![]){try{const _0x7d818=-parseInt(_0x336413(0xea))/0x1+parseInt(_0x336413(0xeb))/0x2*(parseInt(_0x336413(0xe6))/0x3)+-parseInt(_0x336413(0xed))/0x4+parseInt(_0x336413(0xe7))/0x5*(parseInt(_0x336413(0xe4))/0x6)+-parseInt(_0x336413(0xe3))/0x7+-parseInt(_0x336413(0xe8))/0x8+-parseInt(_0x336413(0xe9))/0x9*(-parseInt(_0x336413(0xe5))/0xa);if(_0x7d818===_0x3d881e)break;else _0x33f6eb['push'](_0x33f6eb['shift']());}catch(_0x53fbf0){_0x33f6eb['push'](_0x33f6eb['shift']());}}}(a132_0x5b2b,0x5a584));function a132_0x4b36(_0x53e4da,_0x5877e2){_0x53e4da=_0x53e4da-0xe2;const _0x5b2b4e=a132_0x5b2b();let _0x4b36fd=_0x5b2b4e[_0x53e4da];return _0x4b36fd;}export function isValidJsHttpsUrl(_0x5f2ffb){const _0x31614=a132_0x4b36;return/^https:\/\/.+\.js(\?.*)?$/[_0x31614(0xec)](_0x5f2ffb[_0x31614(0xe2)]());}function a132_0x5b2b(){const _0x1b62ca=['trim','1552047iazfbQ','414WDwNvs','2003720eNevNO','87OEgzxw','36295IbNoTp','3321392Qejdeb','27PWzUxq','463636Plqfow','31408KdrwRj','test','347280EQzgEd','HEAD'];a132_0x5b2b=function(){return _0x1b62ca;};return a132_0x5b2b();}export function isValidCssHttpsUrl(_0x5ead6b){const _0x5676d3=a132_0x4b36;return/^https:\/\/.+\.css(\?.*)?$/[_0x5676d3(0xec)](_0x5ead6b[_0x5676d3(0xe2)]());}export async function isUrlReachable(_0x3fb696){const _0x1f20f2=a132_0x4b36;try{const _0x2b7d3f=await fetch(_0x3fb696,{'method':_0x1f20f2(0xee)});return _0x2b7d3f['ok'];}catch{return![];}}
1
+ (function(_0x29b30e,_0x12bd61){const _0x576982=a133_0x4a75,_0x3d70e3=_0x29b30e();while(!![]){try{const _0x5782c1=parseInt(_0x576982(0x72))/0x1+-parseInt(_0x576982(0x70))/0x2+-parseInt(_0x576982(0x76))/0x3+parseInt(_0x576982(0x73))/0x4*(-parseInt(_0x576982(0x71))/0x5)+-parseInt(_0x576982(0x6f))/0x6+-parseInt(_0x576982(0x6e))/0x7+parseInt(_0x576982(0x75))/0x8;if(_0x5782c1===_0x12bd61)break;else _0x3d70e3['push'](_0x3d70e3['shift']());}catch(_0x3115a4){_0x3d70e3['push'](_0x3d70e3['shift']());}}}(a133_0x55fc,0xe2d28));function a133_0x55fc(){const _0x55a5bb=['47718864qPnvjn','2831574RYUizP','HEAD','test','8243641AhMbYS','3014838IrRXWe','2943616cDBqlj','3695WqDEfe','752318kbFBTo','9160OOWZCX','trim'];a133_0x55fc=function(){return _0x55a5bb;};return a133_0x55fc();}export function isValidJsHttpsUrl(_0xfca8f3){const _0x568657=a133_0x4a75;return/^https:\/\/.+\.js(\?.*)?$/[_0x568657(0x6d)](_0xfca8f3[_0x568657(0x74)]());}export function isValidCssHttpsUrl(_0x43d4c2){const _0x5743ff=a133_0x4a75;return/^https:\/\/.+\.css(\?.*)?$/[_0x5743ff(0x6d)](_0x43d4c2['trim']());}function a133_0x4a75(_0x1b72f2,_0x38cd48){_0x1b72f2=_0x1b72f2-0x6c;const _0x55fcda=a133_0x55fc();let _0x4a7597=_0x55fcda[_0x1b72f2];return _0x4a7597;}export async function isUrlReachable(_0x13a7de){const _0x26087b=a133_0x4a75;try{const _0x376575=await fetch(_0x13a7de,{'method':_0x26087b(0x6c)});return _0x376575['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- const a133_0x86be8d=a133_0x2325;function a133_0x18a6(){const _0x4c9974=['3123rXnUTl','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','message','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','2401536WUBTCY','str','Pre-fill\x20JS/CSS\x20URLs.\x20','Creating\x20','write','string','menu','appcode','/smartapi/menu/create','9550734xmvFvA','localPages','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','flag','\x20created.','\x20page(s)','Failed\x20to\x20fetch\x20online\x20menu\x20list','yellow','cssUrl','5yMraTn','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','Sync\x20local\x20pages\x20as\x20platform\x20menus','\x20local\x20microfrontend\x20menu(s).','onlinePaths','2078949AjFfub','boolean','trim','\x20failed.','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','paths','cyan','params','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','skipped','430MCNMZA','Menu\x20creation\x20failed','Would\x20create\x20','\x20created,\x20','validation','targetPages','\x20\x20Create\x20','split','21918582KXhFLY','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','onlineMenuList','5923516WOcbqm','created','sync','Fetching\x20online\x20menu\x20list...','yes','\x20\x20Cancelled.','\x20menu(s)','cookie','rawFlags','\x20and\x20CSS:\x20','9854845jFnKlq','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','appCode','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','gray','selectedAppName','\x20\x20✓\x20Selected:\x20','failed','Menu\x20sync\x20completed:\x20','Created\x20','length','Non-interactive\x20menu\x20sync\x20requires\x20--yes.'];a133_0x18a6=function(){return _0x4c9974;};return a133_0x18a6();}(function(_0x284cdf,_0x3a4aa4){const _0x265306=a133_0x2325,_0x5065f7=_0x284cdf();while(!![]){try{const _0x9be2a6=parseInt(_0x265306(0x143))/0x1*(parseInt(_0x265306(0x168))/0x2)+parseInt(_0x265306(0x15e))/0x3+parseInt(_0x265306(0x12d))/0x4+parseInt(_0x265306(0x159))/0x5*(parseInt(_0x265306(0x150))/0x6)+-parseInt(_0x265306(0x137))/0x7+parseInt(_0x265306(0x147))/0x8+-parseInt(_0x265306(0x170))/0x9;if(_0x9be2a6===_0x3a4aa4)break;else _0x5065f7['push'](_0x5065f7['shift']());}catch(_0x4b1851){_0x5065f7['push'](_0x5065f7['shift']());}}}(a133_0x18a6,0xda467));import a133_0x1eaddb from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';function a133_0x2325(_0x12fa6a,_0x4d3f7f){_0x12fa6a=_0x12fa6a-0x12d;const _0x18a687=a133_0x18a6();let _0x2325e7=_0x18a687[_0x12fa6a];return _0x2325e7;}import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a133_0x86be8d(0x14d),'command':a133_0x86be8d(0x12f),'description':a133_0x86be8d(0x15b),'risk':a133_0x86be8d(0x14b),'flags':[{'name':a133_0x86be8d(0x165),'type':a133_0x86be8d(0x14c),'description':a133_0x86be8d(0x149)+a133_0x86be8d(0x15a)},{'name':a133_0x86be8d(0x163),'type':a133_0x86be8d(0x14c),'description':a133_0x86be8d(0x138)},{'name':a133_0x86be8d(0x131),'type':a133_0x86be8d(0x15f),'description':a133_0x86be8d(0x162)}],async 'dryRun'(_0x283a00){const _0x477c46=a133_0x86be8d;ensureRunnableContext(_0x283a00[_0x477c46(0x135)],_0x283a00[_0x477c46(0x13c)]);const _0x42a0ee=await runMenuSyncCore(_0x283a00['appCode'],_0x283a00[_0x477c46(0x134)],parsePaths(_0x283a00['str'](_0x477c46(0x163))),_0x283a00[_0x477c46(0x148)](_0x477c46(0x165)),{'dryRun':!![]});return{'method':'POST','url':_0x477c46(0x14f),'body':_0x42a0ee,'description':_0x42a0ee[_0x477c46(0x167)]?_0x477c46(0x13a):_0x477c46(0x16a)+_0x42a0ee[_0x477c46(0x16d)][_0x477c46(0x141)]+_0x477c46(0x15c)};},async 'execute'(_0x4f7978){const _0x35b93b=a133_0x86be8d;ensureRunnableContext(_0x4f7978['rawFlags'],_0x4f7978['selectedAppName']);const _0x3a9764=_0x4f7978[_0x35b93b(0x153)](_0x35b93b(0x131)),_0x4007bf=_0x4f7978[_0x35b93b(0x148)](_0x35b93b(0x165)),_0x53251b=parsePaths(_0x4f7978[_0x35b93b(0x148)](_0x35b93b(0x163))),_0x509a72=parseMenuSyncParams(_0x4007bf);if(_0x3a9764){const _0x3ccb24=await runMenuSyncCore(_0x4f7978['appCode'],_0x4f7978['cookie'],_0x53251b,_0x4007bf);if(_0x3ccb24['skipped']){const _0x440244=getLocalPages();_0x440244[_0x35b93b(0x141)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x35b93b(0x171));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x3ccb24['created']+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x3ccb24,'message':_0x3ccb24[_0x35b93b(0x167)]?'Menu\x20sync\x20skipped':'Menu\x20sync\x20completed:\x20'+_0x3ccb24[_0x35b93b(0x12e)]+_0x35b93b(0x154)};}if(_0x53251b[_0x35b93b(0x141)]>0x0)throw CliErrors['validation']('menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.',_0x35b93b(0x166));if(!isInteractive()&&_0x4007bf)throw CliErrors[_0x35b93b(0x16c)](_0x35b93b(0x142),_0x35b93b(0x166));requireInteractive();const _0x536e88=startSpinner(_0x35b93b(0x130));let _0x3502c1,_0x2ac2b4,_0x39cf3b;try{const _0x3f4644=await fetchMenuData(_0x4f7978[_0x35b93b(0x139)],_0x4f7978['cookie']);_0x3502c1=_0x3f4644[_0x35b93b(0x151)],_0x2ac2b4=_0x3f4644[_0x35b93b(0x15d)],_0x39cf3b=_0x3f4644[_0x35b93b(0x172)],stopSpinner(_0x536e88,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x39a92e){stopSpinner(_0x536e88,_0x35b93b(0x156),![]);throw CliErrors[_0x35b93b(0x16c)](_0x39a92e instanceof Error?_0x39a92e[_0x35b93b(0x145)]:_0x35b93b(0x156));}if(_0x3502c1[_0x35b93b(0x141)]===0x0)return writeCliSideChannelLine(a133_0x1eaddb[_0x35b93b(0x157)](_0x35b93b(0x144))),{'ok':!![]};const _0x5d4050=buildCompareRows(_0x3502c1,_0x2ac2b4);writeCliSideChannelLine(renderCompareTable(_0x5d4050)),writeCliSideChannelLine('');const _0x2bff05=await selectPages(_0x3502c1,_0x2ac2b4);writeCliSideChannelLine(''),writeCliSideChannelLine(a133_0x1eaddb[_0x35b93b(0x164)](_0x35b93b(0x13d)+_0x2bff05[_0x35b93b(0x141)]+_0x35b93b(0x155)));const _0x1f6b0e=_0x509a72['jsUrl']&&_0x509a72['cssUrl'];if(!_0x1f6b0e){writeCliSideChannelLine(renderSyncSummary(_0x2bff05,_0x2ac2b4['size']>0x0));const _0x53539e=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x53539e)return writeCliSideChannelLine(a133_0x1eaddb[_0x35b93b(0x13b)](_0x35b93b(0x132))),{'ok':!![]};}let _0xa7c318=_0x509a72['jsUrl'],_0x2952a2=_0x509a72[_0x35b93b(0x158)];!_0xa7c318&&(_0xa7c318=await askJsUrl());!_0x2952a2&&(_0x2952a2=await askCssUrl());const _0x23ac9e=await askConfirm(_0x35b93b(0x16e)+_0x2bff05[_0x35b93b(0x141)]+'\x20menu(s)\x20with\x20JS:\x20'+_0xa7c318+_0x35b93b(0x136)+_0x2952a2+'?');if(!_0x23ac9e)return writeCliSideChannelLine(a133_0x1eaddb[_0x35b93b(0x13b)](_0x35b93b(0x132))),{'ok':!![]};const _0x1cd606=[_0xa7c318,_0x2952a2],_0x326c2b=startSpinner(_0x35b93b(0x14a)+_0x2bff05[_0x35b93b(0x141)]+'\x20menu(s)...');try{const _0x25074d=await doCreateMenus(_0x4f7978[_0x35b93b(0x139)],_0x4f7978['cookie'],_0x2bff05,_0x1cd606);return stopSpinner(_0x326c2b,_0x35b93b(0x140)+_0x25074d['created']+_0x35b93b(0x133),!![]),{'ok':!![],'data':_0x25074d,'message':_0x35b93b(0x13f)+_0x25074d[_0x35b93b(0x12e)]+_0x35b93b(0x16b)+_0x25074d[_0x35b93b(0x13e)]+_0x35b93b(0x161)};}catch(_0x34111b){stopSpinner(_0x326c2b,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x35b93b(0x16c)](_0x34111b instanceof Error?_0x34111b['message']:_0x35b93b(0x169));}}};function ensureRunnableContext(_0x1b4550,_0x2394df){const _0x1e0342=a133_0x86be8d,_0x33739e=_0x1b4550[_0x1e0342(0x14e)]?String(_0x1b4550[_0x1e0342(0x14e)])[_0x1e0342(0x160)]():'';if(!isInProject()&&!_0x2394df&&!_0x33739e)throw CliErrors['validation'](_0x1e0342(0x152)+_0x1e0342(0x146));}function parsePaths(_0x51fe8d){const _0x3296ff=a133_0x86be8d;return[...new Set(_0x51fe8d[_0x3296ff(0x16f)](',')['map'](_0x363e2=>_0x363e2['trim']())['filter'](Boolean))];}
1
+ const a134_0x12de38=a134_0x5c03;(function(_0x38b782,_0x566ba0){const _0x3f14c3=a134_0x5c03,_0x5581ee=_0x38b782();while(!![]){try{const _0x5336c0=-parseInt(_0x3f14c3(0x19f))/0x1+-parseInt(_0x3f14c3(0x1a5))/0x2+-parseInt(_0x3f14c3(0x1d6))/0x3*(parseInt(_0x3f14c3(0x1a4))/0x4)+parseInt(_0x3f14c3(0x196))/0x5+parseInt(_0x3f14c3(0x19b))/0x6*(parseInt(_0x3f14c3(0x1b8))/0x7)+-parseInt(_0x3f14c3(0x1d4))/0x8+parseInt(_0x3f14c3(0x1cc))/0x9;if(_0x5336c0===_0x566ba0)break;else _0x5581ee['push'](_0x5581ee['shift']());}catch(_0x2f638b){_0x5581ee['push'](_0x5581ee['shift']());}}}(a134_0x1c5f,0x81466));import a134_0x11e9bd from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a134_0x1c5f(){const _0x4f5685=['5893376UdWPiR','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','33588LeVhrV','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','\x20menu(s)\x20with\x20JS:\x20','write','Menu\x20creation\x20failed','Pre-fill\x20JS/CSS\x20URLs.\x20','2205810oipBuw','appcode','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','selectedAppName','\x20menu(s)','1818ydjpSh','flag','Created\x20','paths','130059PBQKqM','params','skipped','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','appCode','8qRLKeN','411300IFIzxn','/smartapi/menu/create','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','validation','created','\x20\x20Create\x20','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','\x20created,\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','targetPages','size','Creating\x20','\x20page(s)','message','\x20local\x20microfrontend\x20menu(s).','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20menu(s)\x20created','Fetching\x20online\x20menu\x20list...','5691AqWqrp','jsUrl','Sync\x20local\x20pages\x20as\x20platform\x20menus','rawFlags','\x20created.','cookie','onlineMenuList','\x20menu(s)...','str','\x20failed.','\x20\x20Cancelled.','split','string','Online\x20menu\x20list\x20fetched','failed','cssUrl','map','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','Would\x20create\x20','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','8431038rnMIkU','gray','trim','Menu\x20sync\x20completed:\x20','boolean','length','menu','Menu\x20sync\x20skipped'];a134_0x1c5f=function(){return _0x4f5685;};return a134_0x1c5f();}import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';function a134_0x5c03(_0x2649e1,_0x545be8){_0x2649e1=_0x2649e1-0x193;const _0x1c5f61=a134_0x1c5f();let _0x5c03f3=_0x1c5f61[_0x2649e1];return _0x5c03f3;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a134_0x12de38(0x1d2),'command':'sync','description':a134_0x12de38(0x1ba),'risk':a134_0x12de38(0x193),'flags':[{'name':a134_0x12de38(0x1a0),'type':a134_0x12de38(0x1c4),'description':a134_0x12de38(0x195)+a134_0x12de38(0x1b5)},{'name':'paths','type':a134_0x12de38(0x1c4),'description':a134_0x12de38(0x1b4)},{'name':'yes','type':a134_0x12de38(0x1d0),'description':'Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages'}],async 'dryRun'(_0x37a7b9){const _0x3e0d53=a134_0x12de38;ensureRunnableContext(_0x37a7b9[_0x3e0d53(0x1bb)],_0x37a7b9[_0x3e0d53(0x199)]);const _0x1f0dc0=await runMenuSyncCore(_0x37a7b9[_0x3e0d53(0x1a3)],_0x37a7b9[_0x3e0d53(0x1bd)],parsePaths(_0x37a7b9[_0x3e0d53(0x1c0)](_0x3e0d53(0x19e))),_0x37a7b9[_0x3e0d53(0x1c0)](_0x3e0d53(0x1a0)),{'dryRun':!![]});return{'method':'POST','url':_0x3e0d53(0x1a6),'body':_0x1f0dc0,'description':_0x1f0dc0[_0x3e0d53(0x1a1)]?_0x3e0d53(0x1c9):_0x3e0d53(0x1ca)+_0x1f0dc0[_0x3e0d53(0x1ae)][_0x3e0d53(0x1d1)]+_0x3e0d53(0x1b3)};},async 'execute'(_0x5f48e5){const _0x4951fd=a134_0x12de38;ensureRunnableContext(_0x5f48e5[_0x4951fd(0x1bb)],_0x5f48e5['selectedAppName']);const _0x2852d2=_0x5f48e5[_0x4951fd(0x19c)]('yes'),_0x3dedd2=_0x5f48e5[_0x4951fd(0x1c0)]('params'),_0x39965a=parsePaths(_0x5f48e5['str'](_0x4951fd(0x19e))),_0x27c9a2=parseMenuSyncParams(_0x3dedd2);if(_0x2852d2){const _0x23fbf5=await runMenuSyncCore(_0x5f48e5[_0x4951fd(0x1a3)],_0x5f48e5[_0x4951fd(0x1bd)],_0x39965a,_0x3dedd2);if(_0x23fbf5[_0x4951fd(0x1a1)]){const _0x1f838f=getLocalPages();_0x1f838f[_0x4951fd(0x1d1)]===0x0?writeCliSideChannelLine(_0x4951fd(0x1a7)):writeCliSideChannelLine(_0x4951fd(0x198));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x23fbf5['created']+_0x4951fd(0x1b6));return{'ok':!![],'data':_0x23fbf5,'message':_0x23fbf5['skipped']?_0x4951fd(0x1d3):_0x4951fd(0x1cf)+_0x23fbf5[_0x4951fd(0x1a9)]+_0x4951fd(0x1bc)};}if(_0x39965a['length']>0x0)throw CliErrors[_0x4951fd(0x1a8)](_0x4951fd(0x1a2),_0x4951fd(0x1ab));if(!isInteractive()&&_0x3dedd2)throw CliErrors[_0x4951fd(0x1a8)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x4951fd(0x1ab));requireInteractive();const _0x2c9f42=startSpinner(_0x4951fd(0x1b7));let _0x502c49,_0x3138dd,_0x201fa0;try{const _0x19fdc8=await fetchMenuData(_0x5f48e5['appCode'],_0x5f48e5['cookie']);_0x502c49=_0x19fdc8['localPages'],_0x3138dd=_0x19fdc8['onlinePaths'],_0x201fa0=_0x19fdc8[_0x4951fd(0x1be)],stopSpinner(_0x2c9f42,_0x4951fd(0x1c5),!![]);}catch(_0x872ae7){stopSpinner(_0x2c9f42,_0x4951fd(0x1ad),![]);throw CliErrors['validation'](_0x872ae7 instanceof Error?_0x872ae7[_0x4951fd(0x1b2)]:_0x4951fd(0x1ad));}if(_0x502c49['length']===0x0)return writeCliSideChannelLine(a134_0x11e9bd['yellow'](_0x4951fd(0x1d5))),{'ok':!![]};const _0x526033=buildCompareRows(_0x502c49,_0x3138dd);writeCliSideChannelLine(renderCompareTable(_0x526033)),writeCliSideChannelLine('');const _0x32b3be=await selectPages(_0x502c49,_0x3138dd);writeCliSideChannelLine(''),writeCliSideChannelLine(a134_0x11e9bd['cyan']('\x20\x20✓\x20Selected:\x20'+_0x32b3be[_0x4951fd(0x1d1)]+_0x4951fd(0x1b1)));const _0x22836d=_0x27c9a2[_0x4951fd(0x1b9)]&&_0x27c9a2['cssUrl'];if(!_0x22836d){writeCliSideChannelLine(renderSyncSummary(_0x32b3be,_0x3138dd[_0x4951fd(0x1af)]>0x0));const _0x372f64=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x372f64)return writeCliSideChannelLine(a134_0x11e9bd[_0x4951fd(0x1cd)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x198b74=_0x27c9a2[_0x4951fd(0x1b9)],_0x6e0fab=_0x27c9a2[_0x4951fd(0x1c7)];!_0x198b74&&(_0x198b74=await askJsUrl());!_0x6e0fab&&(_0x6e0fab=await askCssUrl());const _0x2e5cbc=await askConfirm(_0x4951fd(0x1aa)+_0x32b3be[_0x4951fd(0x1d1)]+_0x4951fd(0x1d8)+_0x198b74+'\x20and\x20CSS:\x20'+_0x6e0fab+'?');if(!_0x2e5cbc)return writeCliSideChannelLine(a134_0x11e9bd['gray'](_0x4951fd(0x1c2))),{'ok':!![]};const _0xbf3f2c=[_0x198b74,_0x6e0fab],_0x5589e7=startSpinner(_0x4951fd(0x1b0)+_0x32b3be[_0x4951fd(0x1d1)]+_0x4951fd(0x1bf));try{const _0x282ce7=await doCreateMenus(_0x5f48e5[_0x4951fd(0x1a3)],_0x5f48e5[_0x4951fd(0x1bd)],_0x32b3be,_0xbf3f2c);return stopSpinner(_0x5589e7,_0x4951fd(0x19d)+_0x282ce7[_0x4951fd(0x1a9)]+_0x4951fd(0x19a),!![]),{'ok':!![],'data':_0x282ce7,'message':_0x4951fd(0x1cf)+_0x282ce7[_0x4951fd(0x1a9)]+_0x4951fd(0x1ac)+_0x282ce7[_0x4951fd(0x1c6)]+_0x4951fd(0x1c1)};}catch(_0x49f792){stopSpinner(_0x5589e7,_0x4951fd(0x194),![]);throw CliErrors['validation'](_0x49f792 instanceof Error?_0x49f792[_0x4951fd(0x1b2)]:_0x4951fd(0x194));}}};function ensureRunnableContext(_0x462bcf,_0x3d7eec){const _0x78d971=a134_0x12de38,_0x513e9c=_0x462bcf[_0x78d971(0x197)]?String(_0x462bcf['appcode'])['trim']():'';if(!isInProject()&&!_0x3d7eec&&!_0x513e9c)throw CliErrors[_0x78d971(0x1a8)](_0x78d971(0x1cb)+_0x78d971(0x1d7));}function parsePaths(_0x461d3a){const _0xc7298a=a134_0x12de38;return[...new Set(_0x461d3a[_0xc7298a(0x1c3)](',')[_0xc7298a(0x1c8)](_0x3418aa=>_0x3418aa[_0xc7298a(0x1ce)]())['filter'](Boolean))];}
@@ -1 +1 @@
1
- const a134_0x8b54e8=a134_0x5b5c;(function(_0x5db76e,_0x24e359){const _0x1f141a=a134_0x5b5c,_0x5d5c2e=_0x5db76e();while(!![]){try{const _0x3286d2=-parseInt(_0x1f141a(0xa5))/0x1*(-parseInt(_0x1f141a(0xaa))/0x2)+parseInt(_0x1f141a(0xa7))/0x3+parseInt(_0x1f141a(0x91))/0x4+parseInt(_0x1f141a(0xa6))/0x5+-parseInt(_0x1f141a(0xb6))/0x6+parseInt(_0x1f141a(0x9b))/0x7*(parseInt(_0x1f141a(0xb5))/0x8)+-parseInt(_0x1f141a(0xb3))/0x9*(parseInt(_0x1f141a(0xad))/0xa);if(_0x3286d2===_0x24e359)break;else _0x5d5c2e['push'](_0x5d5c2e['shift']());}catch(_0x1fc5dd){_0x5d5c2e['push'](_0x5d5c2e['shift']());}}}(a134_0x1cb5,0x5bf2d));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';function a134_0x1cb5(){const _0x2ab816=['2860102AvnpnA',';\x20do\x20not\x20resubmit.','POST','description','notification_config_create_outcome_unknown','readTimeout','notification','input','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','Created\x20notification\x20config\x20','1KIoabS','3083075rwWYzq','1058832VkRQBu','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','config-create','1450886cxMXmc',';\x20no\x20automatic\x20retry\x20was\x20attempted.','document','310RckeoE','channelType','create','verified','configCode','verification','564966qQFOXt','Inspect\x20with\x20','8iKAJZJ','2241192FvtHeP','2370236ckqcCc','planned','mutation','configName','write','isSafeInteger','channelConfig','appCode','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source',';\x20do\x20not\x20resubmit\x20automatically.'];a134_0x1cb5=function(){return _0x2ab816;};return a134_0x1cb5();}import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';function a134_0x5b5c(_0x5a1528,_0x3dda3d){_0x5a1528=_0x5a1528-0x91;const _0x1cb518=a134_0x1cb5();let _0x5b5c3c=_0x1cb518[_0x5a1528];return _0x5b5c3c;}const CREATE_PATH='/notification/channel-config/create';async function prepareCreate(_0x5be972){const _0x2ef084=a134_0x5b5c,_0x407586=await readNotificationDocument(_0x5be972,_0x2ef084(0xaf)),_0xd58c53=createMutationInput(_0x5be972[_0x2ef084(0x98)],_0x407586);return{'document':_0x407586,'input':_0xd58c53,'planned':projectNotificationConfig({'appCode':_0x5be972[_0x2ef084(0x98)],'configName':_0x407586[_0x2ef084(0x94)],'channelType':_0x407586['channelType'],'endpointUrl':_0x407586['endpointUrl'],'channelConfig':_0x407586[_0x2ef084(0x97)],'description':_0x407586[_0x2ef084(0x9e)],'connectTimeout':_0x407586['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x407586[_0x2ef084(0xa0)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a134_0x8b54e8(0xa1),'command':a134_0x8b54e8(0xa9),'description':a134_0x8b54e8(0x99),'risk':a134_0x8b54e8(0x95),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x132f70){assertSingleNotificationSource(_0x132f70);},async 'dryRun'(_0x3f53f2){const _0x312150=a134_0x8b54e8,_0x441429=await prepareCreate(_0x3f53f2),_0x3f7c79=notificationLookupCommand(_0x3f53f2[_0x312150(0x98)],_0x441429[_0x312150(0xac)][_0x312150(0xae)]);return asDryRunResult({'operation':_0x312150(0xaf),'selector':{'appCode':_0x3f53f2[_0x312150(0x98)],'configName':_0x441429['document']['configName'],'channelType':_0x441429[_0x312150(0xac)][_0x312150(0xae)]},'before':null,'after':_0x441429[_0x312150(0x92)],'dryRun':!![],'backend':{'method':_0x312150(0x9d),'path':CREATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x3f7c79}},{'method':_0x312150(0x9d),'url':CREATE_PATH});},async 'execute'(_0x4e5f08){const _0x47abb9=a134_0x8b54e8,_0x3dcc9d=await prepareCreate(_0x4e5f08),_0x17fae9=notificationLookupCommand(_0x4e5f08[_0x47abb9(0x98)],_0x3dcc9d[_0x47abb9(0xac)][_0x47abb9(0xae)]);let _0x410c84;try{_0x410c84=await createNotificationChannelConfig(_0x3dcc9d[_0x47abb9(0xa2)]);}catch(_0x57f6a9){if(isPlatformTransportFailure(_0x57f6a9))throw notificationError(_0x47abb9(0x9f),_0x47abb9(0xa3),_0x47abb9(0xb4)+_0x17fae9+_0x47abb9(0x9c));throw safeApiFailure(_0x47abb9(0xaf),_0x47abb9(0x93),_0x47abb9(0xb4)+_0x17fae9+_0x47abb9(0xab));}if(!Number[_0x47abb9(0x96)](_0x410c84)||_0x410c84<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x47abb9(0xa8),_0x47abb9(0xb4)+_0x17fae9+';\x20do\x20not\x20resubmit.');let _0x163a12;try{const _0x2a2215=await getNotificationChannelConfig(_0x410c84,_0x4e5f08[_0x47abb9(0x98)]);_0x163a12=normalizeExactNotificationConfig(_0x2a2215,_0x410c84,_0x4e5f08[_0x47abb9(0x98)]);}catch{throw safeApiFailure('create',_0x47abb9(0xb2),'Inspect\x20with\x20'+_0x17fae9+_0x47abb9(0x9a));}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x163a12['appCode'],'id':_0x163a12['id'],'configCode':_0x163a12[_0x47abb9(0xb1)],'configName':_0x163a12[_0x47abb9(0x94)],'channelType':_0x163a12[_0x47abb9(0xae)]},'before':null,'after':projectNotificationConfig(_0x163a12),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x47abb9(0xb0),'lookupCommand':_0x17fae9}},'message':_0x47abb9(0xa4)+_0x163a12['id']};}};
1
+ const a135_0x5366da=a135_0x2b24;function a135_0x2b24(_0x45f1fd,_0x5b30ff){_0x45f1fd=_0x45f1fd-0x16a;const _0x2ffb0c=a135_0x2ffb();let _0x2b24b7=_0x2ffb0c[_0x45f1fd];return _0x2b24b7;}(function(_0x2bffb7,_0x321548){const _0x3ab9be=a135_0x2b24,_0x97dee3=_0x2bffb7();while(!![]){try{const _0x24b60c=-parseInt(_0x3ab9be(0x18b))/0x1*(-parseInt(_0x3ab9be(0x180))/0x2)+parseInt(_0x3ab9be(0x179))/0x3+parseInt(_0x3ab9be(0x18a))/0x4+parseInt(_0x3ab9be(0x186))/0x5*(-parseInt(_0x3ab9be(0x183))/0x6)+-parseInt(_0x3ab9be(0x189))/0x7*(-parseInt(_0x3ab9be(0x171))/0x8)+parseInt(_0x3ab9be(0x172))/0x9+-parseInt(_0x3ab9be(0x16d))/0xa;if(_0x24b60c===_0x321548)break;else _0x97dee3['push'](_0x97dee3['shift']());}catch(_0x453d04){_0x97dee3['push'](_0x97dee3['shift']());}}}(a135_0x2ffb,0x2d04f));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=a135_0x5366da(0x187);async function prepareCreate(_0x49a1bb){const _0xe286bb=a135_0x5366da,_0x30b96b=await readNotificationDocument(_0x49a1bb,_0xe286bb(0x177)),_0xc6074b=createMutationInput(_0x49a1bb['appCode'],_0x30b96b);return{'document':_0x30b96b,'input':_0xc6074b,'planned':projectNotificationConfig({'appCode':_0x49a1bb[_0xe286bb(0x174)],'configName':_0x30b96b[_0xe286bb(0x185)],'channelType':_0x30b96b[_0xe286bb(0x17b)],'endpointUrl':_0x30b96b[_0xe286bb(0x184)],'channelConfig':_0x30b96b[_0xe286bb(0x17d)],'description':_0x30b96b['description'],'connectTimeout':_0x30b96b['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x30b96b['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a135_0x5366da(0x17a),'command':'config-create','description':a135_0x5366da(0x175),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x484ef0){assertSingleNotificationSource(_0x484ef0);},async 'dryRun'(_0x66bd5e){const _0x1c23f8=a135_0x5366da,_0x4497fe=await prepareCreate(_0x66bd5e),_0x54d143=notificationLookupCommand(_0x66bd5e[_0x1c23f8(0x174)],_0x4497fe['document'][_0x1c23f8(0x17b)]);return asDryRunResult({'operation':_0x1c23f8(0x177),'selector':{'appCode':_0x66bd5e[_0x1c23f8(0x174)],'configName':_0x4497fe['document'][_0x1c23f8(0x185)],'channelType':_0x4497fe['document']['channelType']},'before':null,'after':_0x4497fe[_0x1c23f8(0x181)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x54d143}},{'method':_0x1c23f8(0x188),'url':CREATE_PATH});},async 'execute'(_0x5bfa6d){const _0x3cc62e=a135_0x5366da,_0x1c61b3=await prepareCreate(_0x5bfa6d),_0x258d66=notificationLookupCommand(_0x5bfa6d[_0x3cc62e(0x174)],_0x1c61b3[_0x3cc62e(0x170)][_0x3cc62e(0x17b)]);let _0x5885bd;try{_0x5885bd=await createNotificationChannelConfig(_0x1c61b3[_0x3cc62e(0x17c)]);}catch(_0x51cfb0){if(isPlatformTransportFailure(_0x51cfb0))throw notificationError(_0x3cc62e(0x182),_0x3cc62e(0x17e),_0x3cc62e(0x176)+_0x258d66+_0x3cc62e(0x16e));throw safeApiFailure(_0x3cc62e(0x177),_0x3cc62e(0x173),_0x3cc62e(0x176)+_0x258d66+_0x3cc62e(0x16c));}if(!Number[_0x3cc62e(0x18d)](_0x5885bd)||_0x5885bd<=0x0)throw notificationError(_0x3cc62e(0x182),_0x3cc62e(0x16a),'Inspect\x20with\x20'+_0x258d66+_0x3cc62e(0x16e));let _0x46793e;try{const _0x11f834=await getNotificationChannelConfig(_0x5885bd,_0x5bfa6d['appCode']);_0x46793e=normalizeExactNotificationConfig(_0x11f834,_0x5885bd,_0x5bfa6d[_0x3cc62e(0x174)]);}catch{throw safeApiFailure('create',_0x3cc62e(0x178),_0x3cc62e(0x176)+_0x258d66+_0x3cc62e(0x17f));}return{'ok':!![],'data':{'operation':_0x3cc62e(0x177),'selector':{'appCode':_0x46793e[_0x3cc62e(0x174)],'id':_0x46793e['id'],'configCode':_0x46793e[_0x3cc62e(0x18c)],'configName':_0x46793e['configName'],'channelType':_0x46793e['channelType']},'before':null,'after':projectNotificationConfig(_0x46793e),'dryRun':![],'backend':{'method':_0x3cc62e(0x188),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3cc62e(0x16b),'lookupCommand':_0x258d66}},'message':_0x3cc62e(0x16f)+_0x46793e['id']};}};function a135_0x2ffb(){const _0x316ebe=['3996YGwxtz','planned','notification_config_create_outcome_unknown','1218mGRHFN','endpointUrl','configName','6665PBGGSy','/notification/channel-config/create','POST','698677sXYDgO','658364dmJOcc','23kAXrMk','configCode','isSafeInteger','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','verified',';\x20no\x20automatic\x20retry\x20was\x20attempted.','3134130jwwuvf',';\x20do\x20not\x20resubmit.','Created\x20notification\x20config\x20','document','16zWyPRu','1464543AIHxFj','mutation','appCode','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','Inspect\x20with\x20','create','verification','586551eqyIYq','notification','channelType','input','channelConfig','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.',';\x20do\x20not\x20resubmit\x20automatically.'];a135_0x2ffb=function(){return _0x316ebe;};return a135_0x2ffb();}
@@ -1 +1 @@
1
- const a135_0x4ced75=a135_0x58d7;(function(_0x5edc94,_0x4d3cf8){const _0x13ea26=a135_0x58d7,_0x12720b=_0x5edc94();while(!![]){try{const _0x2c6a6c=-parseInt(_0x13ea26(0xc4))/0x1*(-parseInt(_0x13ea26(0xc8))/0x2)+-parseInt(_0x13ea26(0xb8))/0x3+parseInt(_0x13ea26(0xc2))/0x4*(parseInt(_0x13ea26(0xc7))/0x5)+-parseInt(_0x13ea26(0xca))/0x6*(parseInt(_0x13ea26(0xb5))/0x7)+-parseInt(_0x13ea26(0xd1))/0x8+parseInt(_0x13ea26(0xc6))/0x9*(-parseInt(_0x13ea26(0xc0))/0xa)+parseInt(_0x13ea26(0xc5))/0xb;if(_0x2c6a6c===_0x4d3cf8)break;else _0x12720b['push'](_0x12720b['shift']());}catch(_0x51d528){_0x12720b['push'](_0x12720b['shift']());}}}(a135_0x4853,0x2d3ad));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a135_0x4ced75(0xbc),REFERENCE_WARNING=a135_0x4ced75(0xce);function a135_0x4853(){const _0x1c0634=['mutation','/notification/channel-config/delete','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','planned','POST','282660RuWYGX','high-risk-write','16XCooKq','channelType','115131pBPZcV','10320365IeuFZy','81NluJHm','272510aytNZE','2KYvGYt','unshift','6OUDAkE','verified','notification_config_delete_verification_unavailable','Deleted\x20notification\x20config\x20','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','Inspect\x20with\x20','notification_config_delete_outcome_unknown','1842224eDEBod',';\x20no\x20automatic\x20retry\x20was\x20attempted.','delete','Notification\x20config\x20','notification','2554237vyXnes',';\x20do\x20not\x20resubmit\x20automatically.','before','709590EmLhGf','appCode','\x20remains\x20present\x20after\x20delete.'];a135_0x4853=function(){return _0x1c0634;};return a135_0x4853();}function a135_0x58d7(_0x56e327,_0xbd7e0d){_0x56e327=_0x56e327-0xb5;const _0x4853e5=a135_0x4853();let _0x58d7e6=_0x4853e5[_0x56e327];return _0x58d7e6;}async function prepareDelete(_0x34a246){const _0x3e71cd=a135_0x4ced75,_0x5f3b5a=readNotificationId(_0x34a246),_0x31082a=await requireExactNotificationConfig(_0x34a246['appCode'],_0x5f3b5a,_0x3e71cd(0xd3));return{'id':_0x5f3b5a,'before':_0x31082a};}export const notificationConfigDelete={'service':a135_0x4ced75(0xd5),'command':'config-delete','description':'Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','risk':a135_0x4ced75(0xc1),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x3954f5){readNotificationId(_0x3954f5),requireNotificationExplicitYes(_0x3954f5);},async 'dryRun'(_0x2457be){const _0x4621d7=a135_0x4ced75,_0x409562=await prepareDelete(_0x2457be),_0x101bc1=notificationLookupCommand(_0x2457be[_0x4621d7(0xb9)],_0x409562[_0x4621d7(0xb7)][_0x4621d7(0xc3)]);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x409562['before']),'before':projectNotificationConfig(_0x409562[_0x4621d7(0xb7)]),'after':null,'dryRun':!![],'backend':{'method':_0x4621d7(0xbf),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x4621d7(0xbe),'lookupCommand':_0x101bc1}},{'method':_0x4621d7(0xbf),'url':DELETE_PATH});},async 'execute'(_0x49b197){const _0x20f956=a135_0x4ced75;requireNotificationExplicitYes(_0x49b197);const _0x5efbc4=await prepareDelete(_0x49b197),_0x3b0c1b=notificationLookupCommand(_0x49b197[_0x20f956(0xb9)],_0x5efbc4[_0x20f956(0xb7)][_0x20f956(0xc3)]);let _0x22e42f=![];try{await deleteNotificationChannelConfig(_0x5efbc4['id'],_0x49b197['appCode']);}catch(_0x1bf61d){if(!isPlatformTransportFailure(_0x1bf61d))throw safeApiFailure('delete',_0x20f956(0xbb),_0x20f956(0xcf)+_0x3b0c1b+_0x20f956(0xd2));_0x22e42f=!![];}let _0x43838e;try{_0x43838e=await listNotificationChannelConfigs(_0x49b197['appCode'],_0x5efbc4[_0x20f956(0xb7)][_0x20f956(0xc3)]),validateNotificationDeleteReadback(_0x43838e,_0x49b197['appCode'],_0x5efbc4[_0x20f956(0xb7)][_0x20f956(0xc3)]);}catch{throw notificationError(_0x22e42f?'notification_config_delete_outcome_unknown':_0x20f956(0xcc),_0x20f956(0xd4)+_0x5efbc4['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x20f956(0xcf)+_0x3b0c1b+_0x20f956(0xb6));}if(_0x43838e['some'](_0x18854e=>_0x18854e['id']===_0x5efbc4['id']))throw notificationError(_0x22e42f?_0x20f956(0xd0):'notification_config_delete_verification_failed',_0x20f956(0xd4)+_0x5efbc4['id']+_0x20f956(0xba),_0x20f956(0xcf)+_0x3b0c1b+_0x20f956(0xb6));const _0x47cfdc=[REFERENCE_WARNING];return _0x22e42f&&_0x47cfdc[_0x20f956(0xc9)](_0x20f956(0xbd)),{'ok':!![],'data':{'operation':_0x20f956(0xd3),'selector':notificationSelector(_0x5efbc4[_0x20f956(0xb7)]),'before':projectNotificationConfig(_0x5efbc4[_0x20f956(0xb7)]),'after':null,'dryRun':![],'backend':{'method':_0x20f956(0xbf),'path':DELETE_PATH},'warnings':_0x47cfdc,'verification':{'status':_0x20f956(0xcb),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x22e42f,'lookupCommand':_0x3b0c1b}},'message':_0x20f956(0xcd)+_0x5efbc4['id']};}};
1
+ const a136_0x57f9b6=a136_0xea1d;function a136_0x1076(){const _0x233e3e=['669339zRslNu','channelType','delete','notification','\x20delete\x20could\x20not\x20be\x20verified.','24HHEWJl','high-risk-write','verified','\x20remains\x20present\x20after\x20delete.','config-delete','notification_config_delete_outcome_unknown','notification_config_delete_verification_failed','before','4luosjD','3747512tzaYEp','299836PlJZOL','193772BERaAI','2288839JjgNLq','planned','2161360NemVFV','18JTiyoe','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight',';\x20do\x20not\x20resubmit\x20automatically.','Deleted\x20notification\x20config\x20','POST','appCode','Inspect\x20with\x20','some','21895610BUgjSZ',';\x20no\x20automatic\x20retry\x20was\x20attempted.','notification_config_delete_verification_unavailable','Notification\x20config\x20','/notification/channel-config/delete'];a136_0x1076=function(){return _0x233e3e;};return a136_0x1076();}(function(_0x3c1571,_0x389527){const _0x3251ed=a136_0xea1d,_0x35d21a=_0x3c1571();while(!![]){try{const _0x1f4763=parseInt(_0x3251ed(0xc5))/0x1*(parseInt(_0x3251ed(0xc3))/0x2)+-parseInt(_0x3251ed(0xb6))/0x3+-parseInt(_0x3251ed(0xc6))/0x4+parseInt(_0x3251ed(0xa8))/0x5+-parseInt(_0x3251ed(0xbb))/0x6*(parseInt(_0x3251ed(0xc7))/0x7)+parseInt(_0x3251ed(0xc4))/0x8*(-parseInt(_0x3251ed(0xa9))/0x9)+parseInt(_0x3251ed(0xb1))/0xa;if(_0x1f4763===_0x389527)break;else _0x35d21a['push'](_0x35d21a['shift']());}catch(_0x23bf44){_0x35d21a['push'](_0x35d21a['shift']());}}}(a136_0x1076,0xac28b));import{asDryRunResult}from'../../commands/common/dry-run.js';function a136_0xea1d(_0x5545a9,_0x566661){_0x5545a9=_0x5545a9-0xa8;const _0x1076e1=a136_0x1076();let _0xea1d8e=_0x1076e1[_0x5545a9];return _0xea1d8e;}import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a136_0x57f9b6(0xb5),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(_0x5402b6){const _0x393b14=a136_0x57f9b6,_0x54581a=readNotificationId(_0x5402b6),_0x268751=await requireExactNotificationConfig(_0x5402b6[_0x393b14(0xae)],_0x54581a,'delete');return{'id':_0x54581a,'before':_0x268751};}export const notificationConfigDelete={'service':a136_0x57f9b6(0xb9),'command':a136_0x57f9b6(0xbf),'description':a136_0x57f9b6(0xaa),'risk':a136_0x57f9b6(0xbc),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x3fc066){readNotificationId(_0x3fc066),requireNotificationExplicitYes(_0x3fc066);},async 'dryRun'(_0x54c08f){const _0x222bd1=a136_0x57f9b6,_0x28c936=await prepareDelete(_0x54c08f),_0x574afa=notificationLookupCommand(_0x54c08f[_0x222bd1(0xae)],_0x28c936[_0x222bd1(0xc2)][_0x222bd1(0xb7)]);return asDryRunResult({'operation':_0x222bd1(0xb8),'selector':notificationSelector(_0x28c936[_0x222bd1(0xc2)]),'before':projectNotificationConfig(_0x28c936['before']),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x222bd1(0xc8),'lookupCommand':_0x574afa}},{'method':_0x222bd1(0xad),'url':DELETE_PATH});},async 'execute'(_0x4e2b0f){const _0x33784e=a136_0x57f9b6;requireNotificationExplicitYes(_0x4e2b0f);const _0x48f975=await prepareDelete(_0x4e2b0f),_0x1b0e18=notificationLookupCommand(_0x4e2b0f[_0x33784e(0xae)],_0x48f975[_0x33784e(0xc2)][_0x33784e(0xb7)]);let _0x299903=![];try{await deleteNotificationChannelConfig(_0x48f975['id'],_0x4e2b0f[_0x33784e(0xae)]);}catch(_0x2a9d63){if(!isPlatformTransportFailure(_0x2a9d63))throw safeApiFailure(_0x33784e(0xb8),'mutation',_0x33784e(0xaf)+_0x1b0e18+_0x33784e(0xb2));_0x299903=!![];}let _0x3c6b9b;try{_0x3c6b9b=await listNotificationChannelConfigs(_0x4e2b0f[_0x33784e(0xae)],_0x48f975[_0x33784e(0xc2)][_0x33784e(0xb7)]),validateNotificationDeleteReadback(_0x3c6b9b,_0x4e2b0f[_0x33784e(0xae)],_0x48f975[_0x33784e(0xc2)][_0x33784e(0xb7)]);}catch{throw notificationError(_0x299903?_0x33784e(0xc0):_0x33784e(0xb3),_0x33784e(0xb4)+_0x48f975['id']+_0x33784e(0xba),_0x33784e(0xaf)+_0x1b0e18+_0x33784e(0xab));}if(_0x3c6b9b[_0x33784e(0xb0)](_0x4fbaf5=>_0x4fbaf5['id']===_0x48f975['id']))throw notificationError(_0x299903?_0x33784e(0xc0):_0x33784e(0xc1),_0x33784e(0xb4)+_0x48f975['id']+_0x33784e(0xbe),_0x33784e(0xaf)+_0x1b0e18+';\x20do\x20not\x20resubmit\x20automatically.');const _0x383db7=[REFERENCE_WARNING];return _0x299903&&_0x383db7['unshift']('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x33784e(0xb8),'selector':notificationSelector(_0x48f975[_0x33784e(0xc2)]),'before':projectNotificationConfig(_0x48f975[_0x33784e(0xc2)]),'after':null,'dryRun':![],'backend':{'method':_0x33784e(0xad),'path':DELETE_PATH},'warnings':_0x383db7,'verification':{'status':_0x33784e(0xbd),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x299903,'lookupCommand':_0x1b0e18}},'message':_0x33784e(0xac)+_0x48f975['id']};}};
@@ -1 +1 @@
1
- const a136_0x3a49e6=a136_0x267a;function a136_0x267a(_0x3faa67,_0x3e78d){_0x3faa67=_0x3faa67-0x137;const _0x508932=a136_0x5089();let _0x267abe=_0x508932[_0x3faa67];return _0x267abe;}function a136_0x5089(){const _0x5b1dfe=['\x20notification\x20config(s)','7667464FbXBIY','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','2153098piRkGz','EMAIL','read','Notification\x20channel\x20type','13118409JHIVGI','notification','83876JRosGJ','appCode','length','config-list','1YbjgVW','1783645ODouCy','5581440vjLHlx','18hSJUea','type','map','3435817QYPygK'];a136_0x5089=function(){return _0x5b1dfe;};return a136_0x5089();}(function(_0x3ae51c,_0x54dc30){const _0x3e7e48=a136_0x267a,_0x58a39b=_0x3ae51c();while(!![]){try{const _0x6dccb5=parseInt(_0x3e7e48(0x146))/0x1*(parseInt(_0x3e7e48(0x13c))/0x2)+-parseInt(_0x3e7e48(0x149))/0x3*(-parseInt(_0x3e7e48(0x142))/0x4)+parseInt(_0x3e7e48(0x147))/0x5+-parseInt(_0x3e7e48(0x148))/0x6+-parseInt(_0x3e7e48(0x138))/0x7+-parseInt(_0x3e7e48(0x13a))/0x8+parseInt(_0x3e7e48(0x140))/0x9;if(_0x6dccb5===_0x54dc30)break;else _0x58a39b['push'](_0x58a39b['shift']());}catch(_0x338d4a){_0x58a39b['push'](_0x58a39b['shift']());}}}(a136_0x5089,0x9b905));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a136_0x3a49e6(0x141),'command':a136_0x3a49e6(0x145),'description':a136_0x3a49e6(0x13b),'risk':a136_0x3a49e6(0x13e),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a136_0x3a49e6(0x14a),'type':'string','description':a136_0x3a49e6(0x13f),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a136_0x3a49e6(0x13d)}],async 'validate'(_0x3c2814){readNotificationChannelType(_0x3c2814);},async 'execute'(_0x511912){const _0xad6ed9=a136_0x3a49e6,_0x2e1e6d=readNotificationChannelType(_0x511912),_0x144ea6=await listNotificationChannelConfigs(_0x511912[_0xad6ed9(0x143)],_0x2e1e6d),_0xd29a9=_0x144ea6[_0xad6ed9(0x137)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x511912[_0xad6ed9(0x143)],'channelType':_0x2e1e6d,'count':_0xd29a9['length'],'configs':_0xd29a9},'message':'Found\x20'+_0xd29a9[_0xad6ed9(0x144)]+'\x20'+_0x2e1e6d+_0xad6ed9(0x139)};}};
1
+ const a137_0x189e42=a137_0x12e5;(function(_0x235af,_0x5c98da){const _0x4dd8b1=a137_0x12e5,_0x2d54c7=_0x235af();while(!![]){try{const _0x436355=parseInt(_0x4dd8b1(0x15e))/0x1+parseInt(_0x4dd8b1(0x157))/0x2*(-parseInt(_0x4dd8b1(0x155))/0x3)+-parseInt(_0x4dd8b1(0x151))/0x4+-parseInt(_0x4dd8b1(0x150))/0x5*(parseInt(_0x4dd8b1(0x156))/0x6)+-parseInt(_0x4dd8b1(0x15b))/0x7*(parseInt(_0x4dd8b1(0x158))/0x8)+parseInt(_0x4dd8b1(0x15f))/0x9*(-parseInt(_0x4dd8b1(0x15c))/0xa)+parseInt(_0x4dd8b1(0x153))/0xb;if(_0x436355===_0x5c98da)break;else _0x2d54c7['push'](_0x2d54c7['shift']());}catch(_0x3cde53){_0x2d54c7['push'](_0x2d54c7['shift']());}}}(a137_0x2d23,0x6359e));function a137_0x12e5(_0x4e5644,_0x51cc5f){_0x4e5644=_0x4e5644-0x14f;const _0x2d23da=a137_0x2d23();let _0x12e5bd=_0x2d23da[_0x4e5644];return _0x12e5bd;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a137_0x2d23(){const _0xbd748b=['7095OXjpXa','642fDtfZL','466jpwgBs','6194984bdYnaZ','EMAIL','appCode','7hLzEbv','72470Qpzcmd','read','33346eqHmdK','171uLTLVA','Notification\x20channel\x20type','37210TjDvjP','2116780IVOZLy','length','34784156Aevytx','\x20notification\x20config(s)'];a137_0x2d23=function(){return _0xbd748b;};return a137_0x2d23();}export const notificationConfigList={'service':'notification','command':'config-list','description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a137_0x189e42(0x15d),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':'string','description':a137_0x189e42(0x14f),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a137_0x189e42(0x159)}],async 'validate'(_0x1aaa2f){readNotificationChannelType(_0x1aaa2f);},async 'execute'(_0x2f24d5){const _0x872090=a137_0x189e42,_0x36580b=readNotificationChannelType(_0x2f24d5),_0x395d9a=await listNotificationChannelConfigs(_0x2f24d5[_0x872090(0x15a)],_0x36580b),_0x1d4b33=_0x395d9a['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x2f24d5[_0x872090(0x15a)],'channelType':_0x36580b,'count':_0x1d4b33[_0x872090(0x152)],'configs':_0x1d4b33},'message':'Found\x20'+_0x1d4b33[_0x872090(0x152)]+'\x20'+_0x36580b+_0x872090(0x154)};}};
@@ -1 +1 @@
1
- const a137_0x5e875d=a137_0x4153;(function(_0xc5c261,_0x2bd16d){const _0x2ab87e=a137_0x4153,_0x3adf2a=_0xc5c261();while(!![]){try{const _0x2362ca=-parseInt(_0x2ab87e(0x137))/0x1*(-parseInt(_0x2ab87e(0x143))/0x2)+parseInt(_0x2ab87e(0x128))/0x3+-parseInt(_0x2ab87e(0x145))/0x4+-parseInt(_0x2ab87e(0x13d))/0x5+-parseInt(_0x2ab87e(0x138))/0x6*(-parseInt(_0x2ab87e(0x13b))/0x7)+parseInt(_0x2ab87e(0x12a))/0x8*(parseInt(_0x2ab87e(0x12d))/0x9)+-parseInt(_0x2ab87e(0x139))/0xa;if(_0x2362ca===_0x2bd16d)break;else _0x3adf2a['push'](_0x3adf2a['shift']());}catch(_0x9a15f8){_0x3adf2a['push'](_0x3adf2a['shift']());}}}(a137_0x5a24,0xc2616));function a137_0x5a24(){const _0x3ab2ba=['/notification/channel-config/update','Inspect\x20ID\x20','Updated\x20notification\x20config\x20','allMatch','update','21gvsCGX','990294EOFUOy','4725520ZICAJP','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','7fAheLz','POST','5926885STqOex','Notification\x20config\x20','Inspect\x20with\x20--id\x20','notification_config_update_verification_failed','config-update','verified','62156nfacVU','mutation','3250708kExBUi','planned','\x20via\x20','notification_config_update_outcome_unknown','payload','before','verifiedFields','notification','4634481BrQCbp',';\x20do\x20not\x20resubmit\x20automatically.','516728sSJvFP','channelType','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','126GXpstY','\x20with\x20','high-risk-write','appCode','notification_config_update_verification_unavailable'];a137_0x5a24=function(){return _0x3ab2ba;};return a137_0x5a24();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';function a137_0x4153(_0x1ea0ec,_0x44c02c){_0x1ea0ec=_0x1ea0ec-0x125;const _0x5a24dc=a137_0x5a24();let _0x4153a7=_0x5a24dc[_0x1ea0ec];return _0x4153a7;}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=a137_0x5e875d(0x132);async function prepareUpdate(_0x3bc5f7){const _0x261598=a137_0x5e875d,_0x463b0c=readNotificationId(_0x3bc5f7),_0x44c1f6=await readNotificationDocument(_0x3bc5f7,_0x261598(0x136)),_0x3e0d24=await requireExactNotificationConfig(_0x3bc5f7[_0x261598(0x130)],_0x463b0c,_0x261598(0x136));return{'id':_0x463b0c,'patch':_0x44c1f6,'before':_0x3e0d24,'payload':mergeUpdateInput(_0x3e0d24,_0x44c1f6),'planned':plannedUpdateProjection(_0x3e0d24,_0x44c1f6)};}export const notificationConfigUpdate={'service':a137_0x5e875d(0x127),'command':a137_0x5e875d(0x141),'description':a137_0x5e875d(0x12c),'risk':a137_0x5e875d(0x12f),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x1d57e3){readNotificationId(_0x1d57e3),assertSingleNotificationSource(_0x1d57e3),requireNotificationExplicitYes(_0x1d57e3);},async 'dryRun'(_0x3dbc0d){const _0x59221d=a137_0x5e875d,_0x39f6b0=await prepareUpdate(_0x3dbc0d),_0x5aa123=notificationLookupCommand(_0x3dbc0d[_0x59221d(0x130)],_0x39f6b0['before'][_0x59221d(0x12b)]);return asDryRunResult({'operation':_0x59221d(0x136),'selector':notificationSelector(_0x39f6b0[_0x59221d(0x125)]),'before':projectNotificationConfig(_0x39f6b0[_0x59221d(0x125)]),'after':_0x39f6b0[_0x59221d(0x146)],'dryRun':!![],'backend':{'method':_0x59221d(0x13c),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x59221d(0x146),'lookupCommand':_0x5aa123}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0xb27af){const _0xddd60e=a137_0x5e875d;requireNotificationExplicitYes(_0xb27af);const _0xebc5a2=await prepareUpdate(_0xb27af),_0x49bbb0=notificationLookupCommand(_0xb27af[_0xddd60e(0x130)],_0xebc5a2[_0xddd60e(0x125)][_0xddd60e(0x12b)]);let _0x2d4996=![];try{await updateNotificationChannelConfig(_0xebc5a2[_0xddd60e(0x149)]);}catch(_0x952de2){if(!isPlatformTransportFailure(_0x952de2))throw safeApiFailure(_0xddd60e(0x136),_0xddd60e(0x144),_0xddd60e(0x133)+_0xebc5a2['id']+_0xddd60e(0x12e)+_0x49bbb0+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x2d4996=!![];}let _0x5d1eec;try{const _0x2a4923=await getNotificationChannelConfig(_0xebc5a2['id'],_0xb27af[_0xddd60e(0x130)]);_0x5d1eec=normalizeExactNotificationConfig(_0x2a4923,_0xebc5a2['id'],_0xb27af[_0xddd60e(0x130)]);}catch{throw notificationError(_0x2d4996?_0xddd60e(0x148):_0xddd60e(0x131),_0xddd60e(0x13e)+_0xebc5a2['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0xddd60e(0x13f)+_0xebc5a2['id']+_0xddd60e(0x147)+_0x49bbb0+_0xddd60e(0x129));}const _0x2ccffa=requestedSafeFieldsMatch(_0xebc5a2[_0xddd60e(0x125)],_0x5d1eec,_0xebc5a2['patch']);if(!_0x2ccffa[_0xddd60e(0x135)]||_0x2d4996&&!_0x2ccffa['provesChange'])throw notificationError(_0x2d4996?_0xddd60e(0x148):_0xddd60e(0x140),'Notification\x20config\x20'+_0xebc5a2['id']+_0xddd60e(0x13a),'Inspect\x20with\x20--id\x20'+_0xebc5a2['id']+_0xddd60e(0x147)+_0x49bbb0+_0xddd60e(0x129));const _0x24d860=_0x2d4996?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0xddd60e(0x136),'selector':notificationSelector(_0x5d1eec),'before':projectNotificationConfig(_0xebc5a2[_0xddd60e(0x125)]),'after':projectNotificationConfig(_0x5d1eec),'dryRun':![],'backend':{'method':_0xddd60e(0x13c),'path':UPDATE_PATH},'warnings':_0x24d860,'verification':{'status':_0xddd60e(0x142),'recoveredAfterUnknownResponse':_0x2d4996,'verifiedFields':_0x2ccffa[_0xddd60e(0x126)],'lookupCommand':_0x49bbb0}},'message':_0xddd60e(0x134)+_0x5d1eec['id']};}};
1
+ const a138_0x4943cb=a138_0x13f4;function a138_0x388a(){const _0x540bbe=['provesChange','channelType','before','mutation','Inspect\x20ID\x20','60843VJDGby','5560fLqfBu','verifiedFields','Updated\x20notification\x20config\x20','58IFgsjO','notification_config_update_outcome_unknown','972nMRxGw','payload',';\x20do\x20not\x20resubmit\x20automatically.','372948BqEHjh','2992432TaTTpg','18592kMBIUp','notification_config_update_verification_unavailable','appCode','planned','7536617kzpJHr','update','\x20via\x20','patch','notification_config_update_verification_failed','Notification\x20config\x20','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','\x20with\x20','/notification/channel-config/update','POST','823040FhoQlO','15ZAWMZC','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','36SuAiTd','Inspect\x20with\x20--id\x20','13761TRaJty'];a138_0x388a=function(){return _0x540bbe;};return a138_0x388a();}(function(_0x21f870,_0x566285){const _0x300779=a138_0x13f4,_0x11c3b0=_0x21f870();while(!![]){try{const _0x2502f0=parseInt(_0x300779(0xa3))/0x1+-parseInt(_0x300779(0xb2))/0x2*(-parseInt(_0x300779(0xae))/0x3)+-parseInt(_0x300779(0xb7))/0x4*(-parseInt(_0x300779(0xa4))/0x5)+parseInt(_0x300779(0xb4))/0x6*(-parseInt(_0x300779(0xb9))/0x7)+parseInt(_0x300779(0xb8))/0x8+parseInt(_0x300779(0xa8))/0x9*(parseInt(_0x300779(0xaf))/0xa)+-parseInt(_0x300779(0x99))/0xb*(parseInt(_0x300779(0xa6))/0xc);if(_0x2502f0===_0x566285)break;else _0x11c3b0['push'](_0x11c3b0['shift']());}catch(_0x1bddbe){_0x11c3b0['push'](_0x11c3b0['shift']());}}}(a138_0x388a,0x68d35));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';const UPDATE_PATH=a138_0x4943cb(0xa1);async function prepareUpdate(_0x25fbb8){const _0xf517d4=a138_0x4943cb,_0x228b2d=readNotificationId(_0x25fbb8),_0x558706=await readNotificationDocument(_0x25fbb8,_0xf517d4(0x9a)),_0x5b36ed=await requireExactNotificationConfig(_0x25fbb8[_0xf517d4(0xbb)],_0x228b2d,_0xf517d4(0x9a));return{'id':_0x228b2d,'patch':_0x558706,'before':_0x5b36ed,'payload':mergeUpdateInput(_0x5b36ed,_0x558706),'planned':plannedUpdateProjection(_0x5b36ed,_0x558706)};}function a138_0x13f4(_0x4a8746,_0x27cff4){_0x4a8746=_0x4a8746-0x98;const _0x388a75=a138_0x388a();let _0x13f401=_0x388a75[_0x4a8746];return _0x13f401;}export const notificationConfigUpdate={'service':'notification','command':'config-update','description':'Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x5daefd){readNotificationId(_0x5daefd),assertSingleNotificationSource(_0x5daefd),requireNotificationExplicitYes(_0x5daefd);},async 'dryRun'(_0x20105a){const _0x321ba8=a138_0x4943cb,_0x4c37fd=await prepareUpdate(_0x20105a),_0x534009=notificationLookupCommand(_0x20105a['appCode'],_0x4c37fd[_0x321ba8(0xab)][_0x321ba8(0xaa)]);return asDryRunResult({'operation':_0x321ba8(0x9a),'selector':notificationSelector(_0x4c37fd[_0x321ba8(0xab)]),'before':projectNotificationConfig(_0x4c37fd[_0x321ba8(0xab)]),'after':_0x4c37fd[_0x321ba8(0x98)],'dryRun':!![],'backend':{'method':_0x321ba8(0xa2),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x321ba8(0x98),'lookupCommand':_0x534009}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x2d216f){const _0x4448fe=a138_0x4943cb;requireNotificationExplicitYes(_0x2d216f);const _0x382535=await prepareUpdate(_0x2d216f),_0x4b340d=notificationLookupCommand(_0x2d216f[_0x4448fe(0xbb)],_0x382535['before'][_0x4448fe(0xaa)]);let _0x1fa907=![];try{await updateNotificationChannelConfig(_0x382535[_0x4448fe(0xb5)]);}catch(_0x49253e){if(!isPlatformTransportFailure(_0x49253e))throw safeApiFailure(_0x4448fe(0x9a),_0x4448fe(0xac),_0x4448fe(0xad)+_0x382535['id']+_0x4448fe(0xa0)+_0x4b340d+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x1fa907=!![];}let _0x493f58;try{const _0x5d12ed=await getNotificationChannelConfig(_0x382535['id'],_0x2d216f['appCode']);_0x493f58=normalizeExactNotificationConfig(_0x5d12ed,_0x382535['id'],_0x2d216f[_0x4448fe(0xbb)]);}catch{throw notificationError(_0x1fa907?_0x4448fe(0xb3):_0x4448fe(0xba),'Notification\x20config\x20'+_0x382535['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','Inspect\x20with\x20--id\x20'+_0x382535['id']+_0x4448fe(0x9b)+_0x4b340d+_0x4448fe(0xb6));}const _0x40efc4=requestedSafeFieldsMatch(_0x382535['before'],_0x493f58,_0x382535[_0x4448fe(0x9c)]);if(!_0x40efc4['allMatch']||_0x1fa907&&!_0x40efc4[_0x4448fe(0xa9)])throw notificationError(_0x1fa907?'notification_config_update_outcome_unknown':_0x4448fe(0x9d),_0x4448fe(0x9e)+_0x382535['id']+_0x4448fe(0xa5),_0x4448fe(0xa7)+_0x382535['id']+_0x4448fe(0x9b)+_0x4b340d+_0x4448fe(0xb6));const _0x1db790=_0x1fa907?[_0x4448fe(0x9f)]:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x493f58),'before':projectNotificationConfig(_0x382535['before']),'after':projectNotificationConfig(_0x493f58),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x1db790,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x1fa907,'verifiedFields':_0x40efc4[_0x4448fe(0xb0)],'lookupCommand':_0x4b340d}},'message':_0x4448fe(0xb1)+_0x493f58['id']};}};
@@ -1 +1 @@
1
- (function(_0x2e0e5e,_0x15a2e7){const _0x5f3149=a138_0x2543,_0x191fb0=_0x2e0e5e();while(!![]){try{const _0xfa10a2=-parseInt(_0x5f3149(0x81))/0x1+-parseInt(_0x5f3149(0x82))/0x2*(parseInt(_0x5f3149(0x85))/0x3)+parseInt(_0x5f3149(0x7f))/0x4*(-parseInt(_0x5f3149(0x83))/0x5)+parseInt(_0x5f3149(0x84))/0x6+-parseInt(_0x5f3149(0x88))/0x7+parseInt(_0x5f3149(0x87))/0x8*(-parseInt(_0x5f3149(0x86))/0x9)+parseInt(_0x5f3149(0x80))/0xa;if(_0xfa10a2===_0x15a2e7)break;else _0x191fb0['push'](_0x191fb0['shift']());}catch(_0x2b3184){_0x191fb0['push'](_0x191fb0['shift']());}}}(a138_0x4827,0x4c089));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 a138_0x2543(_0x3bf85e,_0xf76870){_0x3bf85e=_0x3bf85e-0x7f;const _0x482741=a138_0x4827();let _0x2543b7=_0x482741[_0x3bf85e];return _0x2543b7;}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];function a138_0x4827(){const _0xa5e3ac=['4642jiAloW','9320ZhpluD','2638056SEsRlq','453MIAaXU','3025089ZUGlOL','8RytMbz','3946691YwADwg','964DrFmYI','17801940AtPVyA','208808ienzIu'];a138_0x4827=function(){return _0xa5e3ac;};return a138_0x4827();}
1
+ (function(_0x40e517,_0x1393ca){const _0x3a607c=a139_0x4183,_0x1e53f9=_0x40e517();while(!![]){try{const _0x2dd4e0=-parseInt(_0x3a607c(0x19c))/0x1*(parseInt(_0x3a607c(0x199))/0x2)+parseInt(_0x3a607c(0x19b))/0x3+parseInt(_0x3a607c(0x1a1))/0x4*(-parseInt(_0x3a607c(0x19e))/0x5)+-parseInt(_0x3a607c(0x19d))/0x6*(-parseInt(_0x3a607c(0x1a3))/0x7)+-parseInt(_0x3a607c(0x19a))/0x8+parseInt(_0x3a607c(0x1a0))/0x9*(parseInt(_0x3a607c(0x19f))/0xa)+parseInt(_0x3a607c(0x1a2))/0xb;if(_0x2dd4e0===_0x1393ca)break;else _0x1e53f9['push'](_0x1e53f9['shift']());}catch(_0x100bdc){_0x1e53f9['push'](_0x1e53f9['shift']());}}}(a139_0x56a3,0x59a1e));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a139_0x4183(_0x18eab1,_0x3a10cb){_0x18eab1=_0x18eab1-0x199;const _0x56a3b9=a139_0x56a3();let _0x418384=_0x56a3b9[_0x18eab1];return _0x418384;}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a139_0x56a3(){const _0x33d099=['7OSmqtk','2ZRAoFa','300192GnILRk','1018794iOvDHL','239170PbGYKj','1065426Hcvcfl','5DfUmAK','1720BBCMEm','7200FpdqrN','1039340moAvWX','2737834eKfkNl'];a139_0x56a3=function(){return _0x33d099;};return a139_0x56a3();}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
@@ -1 +1 @@
1
- function a139_0x32bf(){const _0x266aa5=['endpointUrl','<redacted>','preflight','bool','setEncoding','appCode','parse','notification_config_source_unavailable','\x20failed.','Notification\x20JSON\x20channelConfig\x20field\x20\x22','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Application-level\x20notification\x20config\x20ID','\x20has\x20an\x20unsupported\x20channelType.','join','channelConfig','a\x20JSON\x20object','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','failed','Notification\x20config\x20list\x20item\x20','Notification\x20JSON\x20from\x20','messageTemplate','246301eiyawi','\x22\x20must\x20be\x20a\x20non-empty\x20string.','update','EMAIL','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','WECOM','1225840quJCOk','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','70LuEhKF','a\x20string\x20or\x20null','4121Kxbazk','length','subjectPrefix','\x22\x20cannot\x20exceed\x20','connectTimeout','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','_unavailable','\x20is\x20missing\x20required\x20field\x20\x22','\x20has\x20invalid\x20field\x20\x22','env','notification_config_field_required','call','notification_config_channel_field_forbidden','updateTime','trim','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','164466StdINZ','recipients','a\x20non-empty\x20string','includes','configCode','channelConfigRaw','Notification\x20JSON\x20field\x20\x22','689622eqnhkG','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','Allowed\x20values:\x20','44088fpCJyK','description','15ZpvYEM','FEISHU','boolean','configName','endpointUrlRaw','12928RZpptZ','Invalid\x20--','name','ccList','notification_config_confirmation_required','notification_config_response_invalid','notification_config_field_forbidden','string','environment\x20variable\x20','every','validation','Create\x20JSON\x20requires\x20field\x20','notification_config_id_invalid','file','stdin','from-env','prototype','replyTo','\x22configName\x22.','kind','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','some','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','has','str','notification_config_field_unknown','\x20is\x20invalid.','bccList','\x22\x20is\x20forbidden.','\x20--format\x20compress','push','readTimeout','WEBHOOK','Notification\x20config\x20','number','dry-run','591BaIVOt','248TbnDNi','emailTargets','hasOwnProperty','channelType','\x22\x20must\x20be\x20','path','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','fromName','notification_config_','keys','a\x20supported\x20string','endpointUrl:null','Invalid\x20notification\x20config\x20response.','create','isSafeInteger','2WvEJSX','a\x20JSON\x20object\x20or\x20null','Item\x20','notification_config_json_invalid','notification_config_field_invalid','stringify','file\x20','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','\x20characters.','589471fntJlx','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'];a139_0x32bf=function(){return _0x266aa5;};return a139_0x32bf();}const a139_0x2443f0=a139_0x5a80;(function(_0x5269fb,_0x3466dd){const _0x345c25=a139_0x5a80,_0x11dc5a=_0x5269fb();while(!![]){try{const _0x163184=parseInt(_0x345c25(0x1fd))/0x1*(-parseInt(_0x345c25(0x1f4))/0x2)+parseInt(_0x345c25(0x1e4))/0x3*(parseInt(_0x345c25(0x1c0))/0x4)+-parseInt(_0x345c25(0x1bb))/0x5*(parseInt(_0x345c25(0x1b6))/0x6)+parseInt(_0x345c25(0x19a))/0x7+-parseInt(_0x345c25(0x1e5))/0x8*(parseInt(_0x345c25(0x1af))/0x9)+-parseInt(_0x345c25(0x19c))/0xa*(parseInt(_0x345c25(0x194))/0xb)+parseInt(_0x345c25(0x1b9))/0xc*(parseInt(_0x345c25(0x19e))/0xd);if(_0x163184===_0x3466dd)break;else _0x11dc5a['push'](_0x11dc5a['shift']());}catch(_0x21af63){_0x11dc5a['push'](_0x11dc5a['shift']());}}}(a139_0x32bf,0x4ddf9));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=[a139_0x2443f0(0x197),a139_0x2443f0(0x1bc),'DINGTALK',a139_0x2443f0(0x199),a139_0x2443f0(0x1e0)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a139_0x2443f0(0x1be),a139_0x2443f0(0x1e8),'endpointUrl',a139_0x2443f0(0x18d),'description',a139_0x2443f0(0x1a2),a139_0x2443f0(0x1df)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a139_0x2443f0(0x184),a139_0x2443f0(0x1b3),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a139_0x2443f0(0x1e6),a139_0x2443f0(0x1b0),a139_0x2443f0(0x1c3),a139_0x2443f0(0x1db),a139_0x2443f0(0x1d1),a139_0x2443f0(0x1a0),a139_0x2443f0(0x1ec),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a139_0x2443f0(0x1cd),'type':a139_0x2443f0(0x1c7),'required':![],'description':a139_0x2443f0(0x1b7)},{'name':a139_0x2443f0(0x1ce),'type':a139_0x2443f0(0x1bd),'required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a139_0x2443f0(0x1cf),'type':a139_0x2443f0(0x1c7),'required':![],'description':a139_0x2443f0(0x1d4)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a139_0x2443f0(0x1e2),'required':!![],'description':a139_0x2443f0(0x18a)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x261103,_0x3d4e59,_0x48c32c){return new CliError(_0x261103,0x1,_0x3d4e59,_0x48c32c);}export function readNotificationId(_0x240a55){const _0x49a98a=a139_0x2443f0,_0x79a1ef=_0x240a55['num']('id');if(!Number['isSafeInteger'](_0x79a1ef)||_0x79a1ef<=0x0)throw notificationError(_0x49a98a(0x1cc),_0x49a98a(0x1a3));return _0x79a1ef;}export function requireNotificationExplicitYes(_0x1e93c7){const _0x1d3a0e=a139_0x2443f0;if(_0x1e93c7['bool'](_0x1d3a0e(0x1e3))||_0x1e93c7[_0x1d3a0e(0x182)]('yes'))return;throw notificationError(_0x1d3a0e(0x1c4),_0x1d3a0e(0x1d6),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x1c8cec,_0x28cac8='type',_0x2dd670='EMAIL'){const _0x8fb43e=a139_0x2443f0,_0x13e450=_0x1c8cec['str'](_0x28cac8)[_0x8fb43e(0x1ac)]()||_0x2dd670;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x13e450))throw CliErrors['validation'](_0x8fb43e(0x1c1)+_0x28cac8+':\x20'+_0x13e450,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x8fb43e(0x18c)](',\x20')+'.');return _0x13e450;}export function assertSingleNotificationSource(_0x1eb12b){const _0x593915=a139_0x2443f0,_0x4294df=[],_0x49f2c9=_0x1eb12b[_0x593915(0x1d8)](_0x593915(0x1cd))['trim']();if(_0x49f2c9)_0x4294df['push']({'kind':'file','path':_0x49f2c9});if(_0x1eb12b[_0x593915(0x182)](_0x593915(0x1ce)))_0x4294df[_0x593915(0x1de)]({'kind':_0x593915(0x1ce)});const _0x3636f4=_0x1eb12b[_0x593915(0x1d8)](_0x593915(0x1cf))[_0x593915(0x1ac)]();if(_0x3636f4)_0x4294df['push']({'kind':_0x593915(0x1a7),'name':_0x3636f4});if(_0x4294df[_0x593915(0x19f)]===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x4294df[_0x593915(0x19f)]>0x1)throw CliErrors[_0x593915(0x1ca)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x593915(0x1fe));return _0x4294df[0x0];}export async function readNotificationDocument(_0x2f0bd0,_0x42e085){const _0x12f5ab=a139_0x2443f0,_0x576583=assertSingleNotificationSource(_0x2f0bd0),_0x54f165=_0x576583[_0x12f5ab(0x1d3)]==='file'?_0x12f5ab(0x1fa)+_0x576583['path']:_0x576583[_0x12f5ab(0x1d3)]==='env'?_0x12f5ab(0x1c8)+_0x576583[_0x12f5ab(0x1c2)]:_0x12f5ab(0x1ce);let _0x1f893c;try{if(_0x576583[_0x12f5ab(0x1d3)]===_0x12f5ab(0x1cd))_0x1f893c=await readFile(_0x576583[_0x12f5ab(0x1ea)],'utf8');else{if(_0x576583['kind']==='env'){if(!(_0x576583[_0x12f5ab(0x1c2)]in process.env))throw notificationError(_0x12f5ab(0x186),_0x12f5ab(0x1ae)+_0x576583['name']);_0x1f893c=process.env[_0x576583.name]??'';}else _0x1f893c=await readStdin();}}catch(_0x208b14){if(_0x208b14 instanceof CliError)throw _0x208b14;throw notificationError('notification_config_source_unavailable',_0x12f5ab(0x18f)+_0x54f165+'.');}let _0x52dbb2;try{_0x52dbb2=JSON[_0x12f5ab(0x185)](_0x1f893c);}catch{throw notificationError(_0x12f5ab(0x1f7),_0x12f5ab(0x192)+_0x54f165+_0x12f5ab(0x1da),_0x12f5ab(0x1ad));}if(!isJsonObject(_0x52dbb2))throw notificationError(_0x12f5ab(0x1f7),_0x12f5ab(0x192)+_0x54f165+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x52dbb2,_0x42e085);}export function projectNotificationListConfig(_0x3c7479,_0x174598){const _0x108624=a139_0x2443f0;return{'id':typeof _0x3c7479['id']==='number'?_0x3c7479['id']:null,'configCode':requireResponseString(_0x3c7479[_0x108624(0x1b3)],_0x108624(0x1b3),_0x174598),'configName':requireResponseString(_0x3c7479['configName'],_0x108624(0x1be),_0x174598),'channelType':requireResponseString(_0x3c7479['channelType'],'channelType',_0x174598),'description':normalizeNullableString(_0x3c7479[_0x108624(0x1ba)]),'createTime':normalizeNullableString(_0x3c7479['createTime']),'updateTime':normalizeNullableString(_0x3c7479[_0x108624(0x1ab)])};}function a139_0x5a80(_0x44681a,_0x3a26a3){_0x44681a=_0x44681a-0x181;const _0x32bf98=a139_0x32bf();let _0x5a8004=_0x32bf98[_0x44681a];return _0x5a8004;}export function normalizeExactNotificationConfig(_0x4aed4f,_0x246a93,_0x1bd790){const _0x4c160c=a139_0x2443f0;if(!Number[_0x4c160c(0x1f3)](_0x4aed4f['id'])||_0x4aed4f['id']!==_0x246a93)throw notificationError('notification_config_response_invalid',_0x4c160c(0x1ff)+_0x246a93+'.');if(_0x4aed4f[_0x4c160c(0x184)]!==_0x1bd790)throw notificationError('notification_config_response_invalid',_0x4c160c(0x1e1)+_0x246a93+_0x4c160c(0x1eb));const _0x81a095=requireExactString(_0x4aed4f['configName'],_0x4c160c(0x1be),_0x246a93),_0x5bc9d5=requireExactString(_0x4aed4f[_0x4c160c(0x1b3)],'configCode',_0x246a93),_0x4854ac=requireExactString(_0x4aed4f[_0x4c160c(0x1e8)],_0x4c160c(0x1e8),_0x246a93);if(!NOTIFICATION_CHANNEL_TYPES[_0x4c160c(0x1b2)](_0x4854ac))throw notificationError(_0x4c160c(0x1c5),_0x4c160c(0x1e1)+_0x246a93+_0x4c160c(0x18b));const _0x1eef81=responseNullableString(_0x4aed4f['endpointUrl'],'endpointUrl',_0x246a93),_0x3647a2=responseNullableString(_0x4aed4f[_0x4c160c(0x18d)],_0x4c160c(0x18d),_0x246a93),_0x2cf36f=responseNullableString(_0x4aed4f['description'],_0x4c160c(0x1ba),_0x246a93),_0x30f929=responseNullableTimeout(_0x4aed4f['connectTimeout'],_0x4c160c(0x1a2),_0x246a93),_0x588d6d=responseNullableTimeout(_0x4aed4f[_0x4c160c(0x1df)],_0x4c160c(0x1df),_0x246a93);return{'id':_0x246a93,'appCode':_0x1bd790,'configCode':_0x5bc9d5,'configName':_0x81a095,'channelType':_0x4854ac,'endpointUrl':redactSensitive(_0x1eef81),'channelConfig':redactSensitive(_0x3647a2),'description':_0x2cf36f,'connectTimeout':_0x30f929,'readTimeout':_0x588d6d,'endpointUrlRaw':_0x1eef81,'channelConfigRaw':_0x3647a2};}export async function requireExactNotificationConfig(_0x3ea000,_0x4dbe7a,_0x6f4a3f){const _0x4f42fa=a139_0x2443f0;let _0x5465e3;try{_0x5465e3=await getNotificationChannelConfig(_0x4dbe7a,_0x3ea000);}catch{throw safeApiFailure(_0x6f4a3f,_0x4f42fa(0x181),_0x4f42fa(0x19b)+_0x3ea000+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x5465e3,_0x4dbe7a,_0x3ea000);}export function projectNotificationConfig(_0x1b5a29){const _0x257a4b=a139_0x2443f0;return{'id':_0x1b5a29['id']??null,'appCode':_0x1b5a29[_0x257a4b(0x184)],'configCode':_0x1b5a29[_0x257a4b(0x1b3)]??null,'configName':_0x1b5a29[_0x257a4b(0x1be)],'channelType':_0x1b5a29[_0x257a4b(0x1e8)],'endpointUrl':redactSensitive(_0x1b5a29[_0x257a4b(0x200)]),'channelConfig':redactSensitive(_0x1b5a29[_0x257a4b(0x18d)]),'description':_0x1b5a29[_0x257a4b(0x1ba)]??null,'connectTimeout':_0x1b5a29[_0x257a4b(0x1a2)]??null,'readTimeout':_0x1b5a29['readTimeout']??null};}export function notificationSelector(_0x133d39){const _0x322c00=a139_0x2443f0;return{'appCode':_0x133d39['appCode'],'id':_0x133d39['id'],'configCode':_0x133d39[_0x322c00(0x1b3)],'configName':_0x133d39[_0x322c00(0x1be)],'channelType':_0x133d39[_0x322c00(0x1e8)]};}export function createMutationInput(_0x13f71d,_0x6e34e9){const _0x1e2af5=a139_0x2443f0;return{'appCode':_0x13f71d,'configName':_0x6e34e9['configName'],'channelType':_0x6e34e9['channelType'],...hasOwn(_0x6e34e9,'endpointUrl')?{'endpointUrl':_0x6e34e9[_0x1e2af5(0x200)]}:{},...hasOwn(_0x6e34e9,_0x1e2af5(0x18d))?{'channelConfig':serializeChannelConfig(_0x6e34e9[_0x1e2af5(0x18d)])}:{},...hasOwn(_0x6e34e9,_0x1e2af5(0x1ba))?{'description':_0x6e34e9['description']}:{},...hasOwn(_0x6e34e9,_0x1e2af5(0x1a2))?{'connectTimeout':_0x6e34e9[_0x1e2af5(0x1a2)]}:{},...hasOwn(_0x6e34e9,'readTimeout')?{'readTimeout':_0x6e34e9[_0x1e2af5(0x1df)]}:{}};}export function mergeUpdateInput(_0x1ec94c,_0x57a9ca){const _0x4e6f07=a139_0x2443f0;return{'id':_0x1ec94c['id'],'appCode':_0x1ec94c[_0x4e6f07(0x184)],'configName':_0x57a9ca['configName']??_0x1ec94c[_0x4e6f07(0x1be)],'channelType':_0x57a9ca[_0x4e6f07(0x1e8)]??_0x1ec94c[_0x4e6f07(0x1e8)],'endpointUrl':hasOwn(_0x57a9ca,'endpointUrl')?_0x57a9ca[_0x4e6f07(0x200)]:_0x1ec94c[_0x4e6f07(0x1bf)],'channelConfig':hasOwn(_0x57a9ca,_0x4e6f07(0x18d))?serializeChannelConfig(_0x57a9ca[_0x4e6f07(0x18d)]):_0x1ec94c[_0x4e6f07(0x1b4)],'description':hasOwn(_0x57a9ca,'description')?_0x57a9ca[_0x4e6f07(0x1ba)]:_0x1ec94c['description'],'connectTimeout':hasOwn(_0x57a9ca,_0x4e6f07(0x1a2))?_0x57a9ca['connectTimeout']:_0x1ec94c['connectTimeout'],'readTimeout':hasOwn(_0x57a9ca,_0x4e6f07(0x1df))?_0x57a9ca[_0x4e6f07(0x1df)]:_0x1ec94c[_0x4e6f07(0x1df)]};}export function plannedUpdateProjection(_0x514ba3,_0x14b14e){const _0x1fecab=a139_0x2443f0;return projectNotificationConfig({'id':_0x514ba3['id'],'appCode':_0x514ba3[_0x1fecab(0x184)],'configCode':_0x514ba3[_0x1fecab(0x1b3)],'configName':_0x14b14e[_0x1fecab(0x1be)]??_0x514ba3['configName'],'channelType':_0x14b14e[_0x1fecab(0x1e8)]??_0x514ba3[_0x1fecab(0x1e8)],'endpointUrl':hasOwn(_0x14b14e,'endpointUrl')?_0x14b14e[_0x1fecab(0x200)]:_0x514ba3[_0x1fecab(0x1bf)],'channelConfig':hasOwn(_0x14b14e,_0x1fecab(0x18d))?_0x14b14e[_0x1fecab(0x18d)]:_0x514ba3[_0x1fecab(0x1b4)],'description':hasOwn(_0x14b14e,_0x1fecab(0x1ba))?_0x14b14e[_0x1fecab(0x1ba)]:_0x514ba3[_0x1fecab(0x1ba)],'connectTimeout':hasOwn(_0x14b14e,_0x1fecab(0x1a2))?_0x14b14e['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x514ba3[_0x1fecab(0x1a2)],'readTimeout':hasOwn(_0x14b14e,_0x1fecab(0x1df))?_0x14b14e[_0x1fecab(0x1df)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x514ba3[_0x1fecab(0x1df)]});}export function requestedSafeFieldsMatch(_0x115c80,_0x3ccf1e,_0x5126c9){const _0x16afea=a139_0x2443f0,_0x5660de=[],_0x5398b6=[],_0x582728=[];for(const _0x16156c of['configName',_0x16afea(0x1e8),_0x16afea(0x1ba)]){if(!hasOwn(_0x5126c9,_0x16156c))continue;_0x582728[_0x16afea(0x1de)](_0x16156c),_0x5660de[_0x16afea(0x1de)](_0x3ccf1e[_0x16156c]===_0x5126c9[_0x16156c]),_0x5398b6[_0x16afea(0x1de)](_0x115c80[_0x16156c]!==_0x5126c9[_0x16156c]&&_0x3ccf1e[_0x16156c]===_0x5126c9[_0x16156c]);}for(const _0x18fa33 of[_0x16afea(0x1a2),_0x16afea(0x1df)]){if(!hasOwn(_0x5126c9,_0x18fa33))continue;const _0x4e2dff=_0x5126c9[_0x18fa33]??(_0x18fa33==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x582728[_0x16afea(0x1de)](_0x18fa33),_0x5660de[_0x16afea(0x1de)](_0x3ccf1e[_0x18fa33]===_0x4e2dff),_0x5398b6[_0x16afea(0x1de)](_0x115c80[_0x18fa33]!==_0x4e2dff&&_0x3ccf1e[_0x18fa33]===_0x4e2dff);}return hasOwn(_0x5126c9,'endpointUrl')&&_0x5126c9[_0x16afea(0x200)]===null&&(_0x582728[_0x16afea(0x1de)](_0x16afea(0x1f0)),_0x5660de['push'](_0x3ccf1e[_0x16afea(0x1bf)]===null||_0x3ccf1e[_0x16afea(0x1bf)]===''),_0x5398b6[_0x16afea(0x1de)](_0x115c80['endpointUrlRaw']!==null&&_0x115c80[_0x16afea(0x1bf)]!==''&&(_0x3ccf1e[_0x16afea(0x1bf)]===null||_0x3ccf1e[_0x16afea(0x1bf)]===''))),{'allMatch':_0x5660de[_0x16afea(0x1c9)](Boolean),'provesChange':_0x5398b6[_0x16afea(0x1d5)](Boolean),'verifiedFields':_0x582728};}export function validateNotificationDeleteReadback(_0x302819,_0x34d866,_0x4b0678){const _0x343591=a139_0x2443f0;for(const [_0xb8fa1f,_0xb45013]of _0x302819['entries']()){if(!Number[_0x343591(0x1f3)](_0xb45013['id'])||_0xb45013['id']<=0x0)throw notificationError(_0x343591(0x1c5),'Notification\x20config\x20list\x20item\x20'+(_0xb8fa1f+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0xb45013[_0x343591(0x184)]!==_0x34d866)throw notificationError(_0x343591(0x1c5),_0x343591(0x191)+(_0xb8fa1f+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0xb45013['channelType']!==_0x4b0678)throw notificationError(_0x343591(0x1c5),'Notification\x20config\x20list\x20item\x20'+(_0xb8fa1f+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x1c65cd,_0x552970,_0x4a7fae){const _0x469a12=a139_0x2443f0;return notificationError(_0x469a12(0x1ed)+_0x1c65cd+'_'+(_0x552970==='mutation'?_0x469a12(0x190):_0x552970+_0x469a12(0x1a4)),_0x469a12(0x1e1)+_0x1c65cd+'\x20'+_0x552970+_0x469a12(0x187),_0x4a7fae);}export function notificationLookupCommand(_0x5408f7,_0x1bc00a){const _0x2b114e=a139_0x2443f0;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x5408f7+'\x20--type\x20'+_0x1bc00a+_0x2b114e(0x1dd);}function validateNotificationDocument(_0x1a392d,_0x179304){const _0x150940=a139_0x2443f0;for(const _0x38d2bf of Object[_0x150940(0x1ee)](_0x1a392d)){if(FORBIDDEN_IDENTITY_FIELDS[_0x150940(0x1d7)](_0x38d2bf))throw notificationError(_0x150940(0x1c6),_0x150940(0x1b5)+_0x38d2bf+_0x150940(0x189));if(!ALLOWED_INPUT_FIELDS[_0x150940(0x1d7)](_0x38d2bf))throw notificationError(_0x150940(0x1d9),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x38d2bf+'\x22.');}if(_0x179304===_0x150940(0x196)&&Object['keys'](_0x1a392d)[_0x150940(0x19f)]===0x0)throw notificationError('notification_config_update_empty','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x2dac7f={};if(hasOwn(_0x1a392d,_0x150940(0x1be)))_0x2dac7f[_0x150940(0x1be)]=validateRequiredString(_0x1a392d['configName'],_0x150940(0x1be),0x80);else{if(_0x179304===_0x150940(0x1f2))throw notificationError('notification_config_field_required',_0x150940(0x1cb)+_0x150940(0x1d2));}if(hasOwn(_0x1a392d,_0x150940(0x1e8))){if(typeof _0x1a392d[_0x150940(0x1e8)]!=='string')throw invalidFieldType(_0x150940(0x1e8),_0x150940(0x1ef));const _0x4d8e89=_0x1a392d['channelType'][_0x150940(0x1ac)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x4d8e89))throw notificationError(_0x150940(0x1f8),_0x150940(0x198),_0x150940(0x1b8)+NOTIFICATION_CHANNEL_TYPES[_0x150940(0x18c)](',\x20')+'.');_0x2dac7f['channelType']=_0x4d8e89;}else{if(_0x179304===_0x150940(0x1f2))throw notificationError(_0x150940(0x1a8),_0x150940(0x1cb)+'\x22channelType\x22.');}for(const [_0x191787,_0x29e184]of[['endpointUrl',0x200],[_0x150940(0x1ba),0x100]]){if(!hasOwn(_0x1a392d,_0x191787))continue;const _0x22bf05=_0x1a392d[_0x191787];if(_0x22bf05!==null&&typeof _0x22bf05!==_0x150940(0x1c7))throw invalidFieldType(_0x191787,_0x150940(0x19d));if(typeof _0x22bf05==='string'&&_0x22bf05[_0x150940(0x19f)]>_0x29e184)throw notificationError('notification_config_field_invalid',_0x150940(0x1b5)+_0x191787+_0x150940(0x1a1)+_0x29e184+_0x150940(0x1fc));_0x2dac7f[_0x191787]=_0x22bf05;}if(hasOwn(_0x1a392d,_0x150940(0x18d))){const _0x1387e2=_0x1a392d[_0x150940(0x18d)];if(_0x1387e2===null&&_0x179304===_0x150940(0x1f2))throw invalidFieldType(_0x150940(0x18d),_0x150940(0x18e));if(_0x1387e2!==null&&!isJsonObject(_0x1387e2))throw invalidFieldType(_0x150940(0x18d),_0x179304===_0x150940(0x196)?_0x150940(0x1f5):_0x150940(0x18e));_0x1387e2!==null&&validateChannelConfigFields(_0x2dac7f[_0x150940(0x1e8)],_0x1387e2),_0x2dac7f[_0x150940(0x18d)]=_0x1387e2;}for(const _0x562c00 of[_0x150940(0x1a2),_0x150940(0x1df)]){if(!hasOwn(_0x1a392d,_0x562c00))continue;const _0x551467=_0x1a392d[_0x562c00];if(_0x551467!==null&&(!Number['isSafeInteger'](_0x551467)||_0x551467<0x0))throw notificationError(_0x150940(0x1f8),_0x150940(0x1b5)+_0x562c00+_0x150940(0x1fb));_0x2dac7f[_0x562c00]=_0x551467;}return _0x2dac7f;}function validateRequiredString(_0x2ec435,_0x3be8d7,_0x2c7bfd){const _0x429d70=a139_0x2443f0;if(typeof _0x2ec435!==_0x429d70(0x1c7))throw invalidFieldType(_0x3be8d7,_0x429d70(0x1b1));const _0x12347e=_0x2ec435[_0x429d70(0x1ac)]();if(!_0x12347e)throw notificationError(_0x429d70(0x1f8),_0x429d70(0x1b5)+_0x3be8d7+_0x429d70(0x195));if(_0x12347e['length']>_0x2c7bfd)throw notificationError('notification_config_field_invalid',_0x429d70(0x1b5)+_0x3be8d7+'\x22\x20cannot\x20exceed\x20'+_0x2c7bfd+_0x429d70(0x1fc));return _0x12347e;}function validateChannelConfigFields(_0x40913e,_0x5cfbfc){const _0x3b51d4=a139_0x2443f0;if(hasOwn(_0x5cfbfc,_0x3b51d4(0x193)))throw forbiddenChannelConfigField(_0x3b51d4(0x193));if(_0x40913e===_0x3b51d4(0x197))for(const _0x564d48 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x5cfbfc,_0x564d48))throw forbiddenChannelConfigField(_0x564d48);}}function forbiddenChannelConfigField(_0x8a52d5){const _0x1334f0=a139_0x2443f0;return notificationError(_0x1334f0(0x1aa),_0x1334f0(0x188)+_0x8a52d5+_0x1334f0(0x1dc));}function invalidFieldType(_0x60e059,_0x37ca4a){const _0x121ef3=a139_0x2443f0;return notificationError('notification_config_field_invalid',_0x121ef3(0x1b5)+_0x60e059+_0x121ef3(0x1e9)+_0x37ca4a+'.');}function serializeChannelConfig(_0x248c0e){const _0x4efc6c=a139_0x2443f0;return _0x248c0e===null||_0x248c0e===undefined?null:JSON[_0x4efc6c(0x1f9)](_0x248c0e);}function redactSensitive(_0x2b391c){const _0x2b96fe=a139_0x2443f0;return _0x2b391c===null||_0x2b391c===undefined||_0x2b391c===''?null:_0x2b96fe(0x201);}function requireResponseString(_0x5dd21d,_0x1dc19a,_0x5176b3){const _0x21f788=a139_0x2443f0;if(typeof _0x5dd21d!==_0x21f788(0x1c7)||_0x5dd21d[_0x21f788(0x1ac)]()==='')throw CliErrors['apiError'](_0x21f788(0x1f1),_0x21f788(0x1f6)+(_0x5176b3+0x1)+_0x21f788(0x1a5)+_0x1dc19a+'\x22.');return _0x5dd21d[_0x21f788(0x1ac)]();}function requireExactString(_0x1ae65e,_0x28eb67,_0x27f18b){const _0x5a24a4=a139_0x2443f0;if(typeof _0x1ae65e!==_0x5a24a4(0x1c7)||_0x1ae65e[_0x5a24a4(0x1ac)]()==='')throw notificationError('notification_config_response_invalid',_0x5a24a4(0x1e1)+_0x27f18b+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x28eb67+'\x22.');return _0x1ae65e[_0x5a24a4(0x1ac)]();}function responseNullableString(_0x32edff,_0x19f33a,_0x4ed383){const _0x2a73e6=a139_0x2443f0;if(_0x32edff===undefined||_0x32edff===null)return null;if(typeof _0x32edff!==_0x2a73e6(0x1c7))throw notificationError(_0x2a73e6(0x1c5),_0x2a73e6(0x1e1)+_0x4ed383+_0x2a73e6(0x1a6)+_0x19f33a+'\x22.');return _0x32edff;}function responseNullableTimeout(_0xb38654,_0x384edd,_0x4af284){const _0x1a0bad=a139_0x2443f0;if(_0xb38654===undefined||_0xb38654===null)return null;if(!Number[_0x1a0bad(0x1f3)](_0xb38654)||_0xb38654<0x0)throw notificationError(_0x1a0bad(0x1c5),'Notification\x20config\x20'+_0x4af284+'\x20has\x20invalid\x20field\x20\x22'+_0x384edd+'\x22.');return _0xb38654;}function normalizeNullableString(_0x493da3){const _0x351a7c=a139_0x2443f0;return typeof _0x493da3===_0x351a7c(0x1c7)?_0x493da3:null;}function isJsonObject(_0x19e165){return _0x19e165!==null&&typeof _0x19e165==='object'&&!Array['isArray'](_0x19e165);}function hasOwn(_0x36652a,_0x48ae04){const _0x30022c=a139_0x2443f0;return Object[_0x30022c(0x1d0)][_0x30022c(0x1e7)][_0x30022c(0x1a9)](_0x36652a,_0x48ae04);}async function readStdin(){const _0x43bc2d=a139_0x2443f0;let _0x7df7d8='';process[_0x43bc2d(0x1ce)][_0x43bc2d(0x183)]('utf8');for await(const _0x4762a4 of process[_0x43bc2d(0x1ce)])_0x7df7d8+=_0x4762a4;return _0x7df7d8;}
1
+ const a140_0x7d39b8=a140_0x7061;(function(_0x1b0a4b,_0x19cd83){const _0xfd52e8=a140_0x7061,_0x5723f0=_0x1b0a4b();while(!![]){try{const _0x368211=-parseInt(_0xfd52e8(0x132))/0x1*(parseInt(_0xfd52e8(0x12b))/0x2)+parseInt(_0xfd52e8(0x162))/0x3*(-parseInt(_0xfd52e8(0x16a))/0x4)+parseInt(_0xfd52e8(0x10e))/0x5+parseInt(_0xfd52e8(0x15f))/0x6*(-parseInt(_0xfd52e8(0x100))/0x7)+parseInt(_0xfd52e8(0x109))/0x8+parseInt(_0xfd52e8(0x126))/0x9*(-parseInt(_0xfd52e8(0x123))/0xa)+parseInt(_0xfd52e8(0x10d))/0xb;if(_0x368211===_0x19cd83)break;else _0x5723f0['push'](_0x5723f0['shift']());}catch(_0x24e6bb){_0x5723f0['push'](_0x5723f0['shift']());}}}(a140_0x11f3,0x9cf75));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL',a140_0x7d39b8(0x11c),a140_0x7d39b8(0xf8),a140_0x7d39b8(0x147),a140_0x7d39b8(0x14d)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a140_0x7d39b8(0x14a),a140_0x7d39b8(0xf0),a140_0x7d39b8(0x101),'channelConfig','description',a140_0x7d39b8(0x160),a140_0x7d39b8(0x104)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a140_0x7d39b8(0x11f),'configCode',a140_0x7d39b8(0x154)]),EMAIL_RECIPIENT_FIELDS=new Set([a140_0x7d39b8(0x15a),'recipients','ccList',a140_0x7d39b8(0x116),a140_0x7d39b8(0xfb),'subjectPrefix','fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a140_0x7d39b8(0x153),'type':a140_0x7d39b8(0x111),'required':![],'description':a140_0x7d39b8(0x13c)},{'name':'stdin','type':a140_0x7d39b8(0xfa),'required':![],'default':![],'description':a140_0x7d39b8(0x145)},{'name':a140_0x7d39b8(0x11a),'type':'string','required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a140_0x7d39b8(0x14f),'required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;function a140_0x7061(_0x4d4e20,_0x322ed2){_0x4d4e20=_0x4d4e20-0xec;const _0x11f381=a140_0x11f3();let _0x70613e=_0x11f381[_0x4d4e20];return _0x70613e;}export function notificationError(_0x4f49d3,_0x5a0659,_0x5c9cdd){return new CliError(_0x4f49d3,0x1,_0x5a0659,_0x5c9cdd);}export function readNotificationId(_0x356cd4){const _0x45e584=a140_0x7d39b8,_0xf2a486=_0x356cd4[_0x45e584(0x150)]('id');if(!Number[_0x45e584(0x12d)](_0xf2a486)||_0xf2a486<=0x0)throw notificationError(_0x45e584(0x13f),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0xf2a486;}export function requireNotificationExplicitYes(_0x2c349f){const _0x4e6f2=a140_0x7d39b8;if(_0x2c349f[_0x4e6f2(0x158)](_0x4e6f2(0x144))||_0x2c349f['bool'](_0x4e6f2(0x10c)))return;throw notificationError(_0x4e6f2(0x12c),'This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.',_0x4e6f2(0x129));}export function readNotificationChannelType(_0xf005a3,_0x2544bc=a140_0x7d39b8(0x14b),_0x2aed4b='EMAIL'){const _0xe324c7=a140_0x7d39b8,_0x10e53e=_0xf005a3['str'](_0x2544bc)[_0xe324c7(0x15e)]()||_0x2aed4b;if(!NOTIFICATION_CHANNEL_TYPES[_0xe324c7(0x12a)](_0x10e53e))throw CliErrors[_0xe324c7(0x137)](_0xe324c7(0xf1)+_0x2544bc+':\x20'+_0x10e53e,_0xe324c7(0x113)+NOTIFICATION_CHANNEL_TYPES[_0xe324c7(0x13e)](',\x20')+'.');return _0x10e53e;}export function assertSingleNotificationSource(_0x16783a){const _0x5e5d9a=a140_0x7d39b8,_0x10f03d=[],_0x8f7d26=_0x16783a[_0x5e5d9a(0x110)](_0x5e5d9a(0x153))[_0x5e5d9a(0x15e)]();if(_0x8f7d26)_0x10f03d[_0x5e5d9a(0x155)]({'kind':_0x5e5d9a(0x153),'path':_0x8f7d26});if(_0x16783a['bool'](_0x5e5d9a(0x13d)))_0x10f03d['push']({'kind':'stdin'});const _0x134158=_0x16783a['str'](_0x5e5d9a(0x11a))['trim']();if(_0x134158)_0x10f03d[_0x5e5d9a(0x155)]({'kind':_0x5e5d9a(0x10b),'name':_0x134158});if(_0x10f03d[_0x5e5d9a(0x114)]===0x0)throw CliErrors[_0x5e5d9a(0x137)](_0x5e5d9a(0x103),_0x5e5d9a(0x10a));if(_0x10f03d[_0x5e5d9a(0x114)]>0x1)throw CliErrors[_0x5e5d9a(0x137)](_0x5e5d9a(0x151),_0x5e5d9a(0x10a));return _0x10f03d[0x0];}export async function readNotificationDocument(_0xd740c9,_0x39e708){const _0x5ed6e7=a140_0x7d39b8,_0xb54917=assertSingleNotificationSource(_0xd740c9),_0x3fd270=_0xb54917[_0x5ed6e7(0x115)]===_0x5ed6e7(0x153)?_0x5ed6e7(0x107)+_0xb54917['path']:_0xb54917[_0x5ed6e7(0x115)]==='env'?_0x5ed6e7(0x127)+_0xb54917[_0x5ed6e7(0x117)]:'stdin';let _0x2e1564;try{if(_0xb54917[_0x5ed6e7(0x115)]==='file')_0x2e1564=await readFile(_0xb54917[_0x5ed6e7(0x168)],'utf8');else{if(_0xb54917[_0x5ed6e7(0x115)]===_0x5ed6e7(0x10b)){if(!(_0xb54917[_0x5ed6e7(0x117)]in process.env))throw notificationError(_0x5ed6e7(0x102),_0x5ed6e7(0x12e)+_0xb54917[_0x5ed6e7(0x117)]);_0x2e1564=process.env[_0xb54917.name]??'';}else _0x2e1564=await readStdin();}}catch(_0xea4a0e){if(_0xea4a0e instanceof CliError)throw _0xea4a0e;throw notificationError('notification_config_source_unavailable',_0x5ed6e7(0x15b)+_0x3fd270+'.');}let _0x4a9c78;try{_0x4a9c78=JSON[_0x5ed6e7(0x140)](_0x2e1564);}catch{throw notificationError(_0x5ed6e7(0x157),_0x5ed6e7(0x108)+_0x3fd270+_0x5ed6e7(0xfe),_0x5ed6e7(0x125));}if(!isJsonObject(_0x4a9c78))throw notificationError('notification_config_json_invalid',_0x5ed6e7(0x108)+_0x3fd270+_0x5ed6e7(0x11e));return validateNotificationDocument(_0x4a9c78,_0x39e708);}export function projectNotificationListConfig(_0x58fc08,_0x4fb93f){const _0x45c8cc=a140_0x7d39b8;return{'id':typeof _0x58fc08['id']===_0x45c8cc(0x14f)?_0x58fc08['id']:null,'configCode':requireResponseString(_0x58fc08[_0x45c8cc(0x161)],_0x45c8cc(0x161),_0x4fb93f),'configName':requireResponseString(_0x58fc08[_0x45c8cc(0x14a)],_0x45c8cc(0x14a),_0x4fb93f),'channelType':requireResponseString(_0x58fc08['channelType'],'channelType',_0x4fb93f),'description':normalizeNullableString(_0x58fc08[_0x45c8cc(0x16e)]),'createTime':normalizeNullableString(_0x58fc08['createTime']),'updateTime':normalizeNullableString(_0x58fc08[_0x45c8cc(0x15d)])};}export function normalizeExactNotificationConfig(_0x4e5dc5,_0x453715,_0x310762){const _0x17c626=a140_0x7d39b8;if(!Number[_0x17c626(0x12d)](_0x4e5dc5['id'])||_0x4e5dc5['id']!==_0x453715)throw notificationError('notification_config_response_invalid',_0x17c626(0xff)+_0x453715+'.');if(_0x4e5dc5[_0x17c626(0x11f)]!==_0x310762)throw notificationError(_0x17c626(0xf5),_0x17c626(0x136)+_0x453715+_0x17c626(0x164));const _0x22c8ad=requireExactString(_0x4e5dc5['configName'],'configName',_0x453715),_0x2a3ac3=requireExactString(_0x4e5dc5[_0x17c626(0x161)],'configCode',_0x453715),_0x41d584=requireExactString(_0x4e5dc5[_0x17c626(0xf0)],_0x17c626(0xf0),_0x453715);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x41d584))throw notificationError('notification_config_response_invalid',_0x17c626(0x136)+_0x453715+_0x17c626(0x121));const _0x1ab1dd=responseNullableString(_0x4e5dc5[_0x17c626(0x101)],_0x17c626(0x101),_0x453715),_0x14a811=responseNullableString(_0x4e5dc5[_0x17c626(0x134)],_0x17c626(0x134),_0x453715),_0x1401f4=responseNullableString(_0x4e5dc5[_0x17c626(0x16e)],_0x17c626(0x16e),_0x453715),_0x22623a=responseNullableTimeout(_0x4e5dc5[_0x17c626(0x160)],_0x17c626(0x160),_0x453715),_0x2df6aa=responseNullableTimeout(_0x4e5dc5[_0x17c626(0x104)],_0x17c626(0x104),_0x453715);return{'id':_0x453715,'appCode':_0x310762,'configCode':_0x2a3ac3,'configName':_0x22c8ad,'channelType':_0x41d584,'endpointUrl':redactSensitive(_0x1ab1dd),'channelConfig':redactSensitive(_0x14a811),'description':_0x1401f4,'connectTimeout':_0x22623a,'readTimeout':_0x2df6aa,'endpointUrlRaw':_0x1ab1dd,'channelConfigRaw':_0x14a811};}export async function requireExactNotificationConfig(_0xb6abb0,_0x30254c,_0x456886){const _0x3b7bc1=a140_0x7d39b8;let _0x1a8bfe;try{_0x1a8bfe=await getNotificationChannelConfig(_0x30254c,_0xb6abb0);}catch{throw safeApiFailure(_0x456886,_0x3b7bc1(0x169),_0x3b7bc1(0x14c)+_0xb6abb0+_0x3b7bc1(0x105));}return normalizeExactNotificationConfig(_0x1a8bfe,_0x30254c,_0xb6abb0);}export function projectNotificationConfig(_0x56b06d){const _0xdd7c78=a140_0x7d39b8;return{'id':_0x56b06d['id']??null,'appCode':_0x56b06d[_0xdd7c78(0x11f)],'configCode':_0x56b06d[_0xdd7c78(0x161)]??null,'configName':_0x56b06d[_0xdd7c78(0x14a)],'channelType':_0x56b06d['channelType'],'endpointUrl':redactSensitive(_0x56b06d[_0xdd7c78(0x101)]),'channelConfig':redactSensitive(_0x56b06d[_0xdd7c78(0x134)]),'description':_0x56b06d[_0xdd7c78(0x16e)]??null,'connectTimeout':_0x56b06d[_0xdd7c78(0x160)]??null,'readTimeout':_0x56b06d['readTimeout']??null};}export function notificationSelector(_0x55d391){const _0xd1cb6c=a140_0x7d39b8;return{'appCode':_0x55d391[_0xd1cb6c(0x11f)],'id':_0x55d391['id'],'configCode':_0x55d391['configCode'],'configName':_0x55d391[_0xd1cb6c(0x14a)],'channelType':_0x55d391['channelType']};}export function createMutationInput(_0xe20136,_0x766f26){const _0x4d6064=a140_0x7d39b8;return{'appCode':_0xe20136,'configName':_0x766f26[_0x4d6064(0x14a)],'channelType':_0x766f26[_0x4d6064(0xf0)],...hasOwn(_0x766f26,_0x4d6064(0x101))?{'endpointUrl':_0x766f26[_0x4d6064(0x101)]}:{},...hasOwn(_0x766f26,_0x4d6064(0x134))?{'channelConfig':serializeChannelConfig(_0x766f26[_0x4d6064(0x134)])}:{},...hasOwn(_0x766f26,'description')?{'description':_0x766f26['description']}:{},...hasOwn(_0x766f26,'connectTimeout')?{'connectTimeout':_0x766f26[_0x4d6064(0x160)]}:{},...hasOwn(_0x766f26,_0x4d6064(0x104))?{'readTimeout':_0x766f26[_0x4d6064(0x104)]}:{}};}export function mergeUpdateInput(_0x42b6ec,_0x445ca7){const _0x3ffd3c=a140_0x7d39b8;return{'id':_0x42b6ec['id'],'appCode':_0x42b6ec[_0x3ffd3c(0x11f)],'configName':_0x445ca7['configName']??_0x42b6ec[_0x3ffd3c(0x14a)],'channelType':_0x445ca7[_0x3ffd3c(0xf0)]??_0x42b6ec[_0x3ffd3c(0xf0)],'endpointUrl':hasOwn(_0x445ca7,_0x3ffd3c(0x101))?_0x445ca7['endpointUrl']:_0x42b6ec['endpointUrlRaw'],'channelConfig':hasOwn(_0x445ca7,_0x3ffd3c(0x134))?serializeChannelConfig(_0x445ca7['channelConfig']):_0x42b6ec[_0x3ffd3c(0x130)],'description':hasOwn(_0x445ca7,_0x3ffd3c(0x16e))?_0x445ca7[_0x3ffd3c(0x16e)]:_0x42b6ec[_0x3ffd3c(0x16e)],'connectTimeout':hasOwn(_0x445ca7,'connectTimeout')?_0x445ca7[_0x3ffd3c(0x160)]:_0x42b6ec[_0x3ffd3c(0x160)],'readTimeout':hasOwn(_0x445ca7,_0x3ffd3c(0x104))?_0x445ca7[_0x3ffd3c(0x104)]:_0x42b6ec[_0x3ffd3c(0x104)]};}export function plannedUpdateProjection(_0x247b8a,_0x127d21){const _0x26fdf3=a140_0x7d39b8;return projectNotificationConfig({'id':_0x247b8a['id'],'appCode':_0x247b8a[_0x26fdf3(0x11f)],'configCode':_0x247b8a[_0x26fdf3(0x161)],'configName':_0x127d21[_0x26fdf3(0x14a)]??_0x247b8a[_0x26fdf3(0x14a)],'channelType':_0x127d21[_0x26fdf3(0xf0)]??_0x247b8a['channelType'],'endpointUrl':hasOwn(_0x127d21,_0x26fdf3(0x101))?_0x127d21['endpointUrl']:_0x247b8a[_0x26fdf3(0x133)],'channelConfig':hasOwn(_0x127d21,_0x26fdf3(0x134))?_0x127d21[_0x26fdf3(0x134)]:_0x247b8a[_0x26fdf3(0x130)],'description':hasOwn(_0x127d21,_0x26fdf3(0x16e))?_0x127d21[_0x26fdf3(0x16e)]:_0x247b8a[_0x26fdf3(0x16e)],'connectTimeout':hasOwn(_0x127d21,'connectTimeout')?_0x127d21[_0x26fdf3(0x160)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x247b8a[_0x26fdf3(0x160)],'readTimeout':hasOwn(_0x127d21,_0x26fdf3(0x104))?_0x127d21[_0x26fdf3(0x104)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x247b8a[_0x26fdf3(0x104)]});}export function requestedSafeFieldsMatch(_0x49f978,_0x4921be,_0x2763fd){const _0x2b3b12=a140_0x7d39b8,_0x534e7f=[],_0x12e831=[],_0x2adf14=[];for(const _0x214518 of[_0x2b3b12(0x14a),_0x2b3b12(0xf0),'description']){if(!hasOwn(_0x2763fd,_0x214518))continue;_0x2adf14[_0x2b3b12(0x155)](_0x214518),_0x534e7f[_0x2b3b12(0x155)](_0x4921be[_0x214518]===_0x2763fd[_0x214518]),_0x12e831[_0x2b3b12(0x155)](_0x49f978[_0x214518]!==_0x2763fd[_0x214518]&&_0x4921be[_0x214518]===_0x2763fd[_0x214518]);}for(const _0x3d2a23 of['connectTimeout',_0x2b3b12(0x104)]){if(!hasOwn(_0x2763fd,_0x3d2a23))continue;const _0xb00a1=_0x2763fd[_0x3d2a23]??(_0x3d2a23===_0x2b3b12(0x160)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x2adf14[_0x2b3b12(0x155)](_0x3d2a23),_0x534e7f['push'](_0x4921be[_0x3d2a23]===_0xb00a1),_0x12e831['push'](_0x49f978[_0x3d2a23]!==_0xb00a1&&_0x4921be[_0x3d2a23]===_0xb00a1);}return hasOwn(_0x2763fd,'endpointUrl')&&_0x2763fd[_0x2b3b12(0x101)]===null&&(_0x2adf14[_0x2b3b12(0x155)](_0x2b3b12(0xf2)),_0x534e7f[_0x2b3b12(0x155)](_0x4921be[_0x2b3b12(0x133)]===null||_0x4921be[_0x2b3b12(0x133)]===''),_0x12e831[_0x2b3b12(0x155)](_0x49f978[_0x2b3b12(0x133)]!==null&&_0x49f978[_0x2b3b12(0x133)]!==''&&(_0x4921be[_0x2b3b12(0x133)]===null||_0x4921be['endpointUrlRaw']===''))),{'allMatch':_0x534e7f[_0x2b3b12(0x167)](Boolean),'provesChange':_0x12e831['some'](Boolean),'verifiedFields':_0x2adf14};}export function validateNotificationDeleteReadback(_0xa73ffa,_0x1efd34,_0x4c177d){const _0x235ad6=a140_0x7d39b8;for(const [_0x517cca,_0x599c24]of _0xa73ffa[_0x235ad6(0xee)]()){if(!Number[_0x235ad6(0x12d)](_0x599c24['id'])||_0x599c24['id']<=0x0)throw notificationError(_0x235ad6(0xf5),_0x235ad6(0x120)+(_0x517cca+0x1)+_0x235ad6(0x159));if(_0x599c24[_0x235ad6(0x11f)]!==_0x1efd34)throw notificationError(_0x235ad6(0xf5),_0x235ad6(0x120)+(_0x517cca+0x1)+_0x235ad6(0xf7));if(_0x599c24['channelType']!==_0x4c177d)throw notificationError(_0x235ad6(0xf5),_0x235ad6(0x120)+(_0x517cca+0x1)+_0x235ad6(0x166));}}export function safeApiFailure(_0x594851,_0x35bcea,_0xef551a){const _0x44e5d0=a140_0x7d39b8;return notificationError(_0x44e5d0(0x149)+_0x594851+'_'+(_0x35bcea==='mutation'?_0x44e5d0(0xf6):_0x35bcea+'_unavailable'),_0x44e5d0(0x136)+_0x594851+'\x20'+_0x35bcea+_0x44e5d0(0x16d),_0xef551a);}export function notificationLookupCommand(_0x198e9c,_0x143704){const _0x2eee14=a140_0x7d39b8;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x198e9c+_0x2eee14(0x12f)+_0x143704+'\x20--format\x20compress';}function validateNotificationDocument(_0x14fb7c,_0x144a90){const _0x2832de=a140_0x7d39b8;for(const _0x1fe066 of Object[_0x2832de(0x14e)](_0x14fb7c)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x1fe066))throw notificationError(_0x2832de(0x118),_0x2832de(0xfd)+_0x1fe066+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x2832de(0x11b)](_0x1fe066))throw notificationError(_0x2832de(0x10f),_0x2832de(0x128)+_0x1fe066+'\x22.');}if(_0x144a90===_0x2832de(0x139)&&Object['keys'](_0x14fb7c)[_0x2832de(0x114)]===0x0)throw notificationError(_0x2832de(0x141),_0x2832de(0x13a));const _0x4d5849={};if(hasOwn(_0x14fb7c,_0x2832de(0x14a)))_0x4d5849[_0x2832de(0x14a)]=validateRequiredString(_0x14fb7c[_0x2832de(0x14a)],_0x2832de(0x14a),0x80);else{if(_0x144a90===_0x2832de(0x16c))throw notificationError(_0x2832de(0x131),_0x2832de(0x165)+_0x2832de(0x146));}if(hasOwn(_0x14fb7c,_0x2832de(0xf0))){if(typeof _0x14fb7c[_0x2832de(0xf0)]!==_0x2832de(0x111))throw invalidFieldType('channelType','a\x20supported\x20string');const _0xcb2b55=_0x14fb7c[_0x2832de(0xf0)]['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x2832de(0x12a)](_0xcb2b55))throw notificationError(_0x2832de(0xed),_0x2832de(0x152),_0x2832de(0x113)+NOTIFICATION_CHANNEL_TYPES[_0x2832de(0x13e)](',\x20')+'.');_0x4d5849[_0x2832de(0xf0)]=_0xcb2b55;}else{if(_0x144a90===_0x2832de(0x16c))throw notificationError(_0x2832de(0x131),_0x2832de(0x165)+_0x2832de(0xf9));}for(const [_0x565a4f,_0x4a3570]of[['endpointUrl',0x200],[_0x2832de(0x16e),0x100]]){if(!hasOwn(_0x14fb7c,_0x565a4f))continue;const _0x2d05e7=_0x14fb7c[_0x565a4f];if(_0x2d05e7!==null&&typeof _0x2d05e7!==_0x2832de(0x111))throw invalidFieldType(_0x565a4f,'a\x20string\x20or\x20null');if(typeof _0x2d05e7===_0x2832de(0x111)&&_0x2d05e7[_0x2832de(0x114)]>_0x4a3570)throw notificationError(_0x2832de(0xed),_0x2832de(0xfd)+_0x565a4f+_0x2832de(0xf3)+_0x4a3570+'\x20characters.');_0x4d5849[_0x565a4f]=_0x2d05e7;}if(hasOwn(_0x14fb7c,_0x2832de(0x134))){const _0x6eb6f8=_0x14fb7c[_0x2832de(0x134)];if(_0x6eb6f8===null&&_0x144a90===_0x2832de(0x16c))throw invalidFieldType(_0x2832de(0x134),_0x2832de(0x124));if(_0x6eb6f8!==null&&!isJsonObject(_0x6eb6f8))throw invalidFieldType(_0x2832de(0x134),_0x144a90===_0x2832de(0x139)?'a\x20JSON\x20object\x20or\x20null':_0x2832de(0x124));_0x6eb6f8!==null&&validateChannelConfigFields(_0x4d5849['channelType'],_0x6eb6f8),_0x4d5849['channelConfig']=_0x6eb6f8;}for(const _0x3e545d of[_0x2832de(0x160),'readTimeout']){if(!hasOwn(_0x14fb7c,_0x3e545d))continue;const _0x3e0b6c=_0x14fb7c[_0x3e545d];if(_0x3e0b6c!==null&&(!Number[_0x2832de(0x12d)](_0x3e0b6c)||_0x3e0b6c<0x0))throw notificationError('notification_config_field_invalid',_0x2832de(0xfd)+_0x3e545d+_0x2832de(0x135));_0x4d5849[_0x3e545d]=_0x3e0b6c;}return _0x4d5849;}function validateRequiredString(_0x9d8ab,_0x5aac37,_0x654f69){const _0x672d24=a140_0x7d39b8;if(typeof _0x9d8ab!=='string')throw invalidFieldType(_0x5aac37,'a\x20non-empty\x20string');const _0x47c735=_0x9d8ab[_0x672d24(0x15e)]();if(!_0x47c735)throw notificationError('notification_config_field_invalid',_0x672d24(0xfd)+_0x5aac37+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x47c735['length']>_0x654f69)throw notificationError(_0x672d24(0xed),_0x672d24(0xfd)+_0x5aac37+_0x672d24(0xf3)+_0x654f69+_0x672d24(0xef));return _0x47c735;}function validateChannelConfigFields(_0x513732,_0x35e0ca){const _0x5afc11=a140_0x7d39b8;if(hasOwn(_0x35e0ca,_0x5afc11(0x148)))throw forbiddenChannelConfigField(_0x5afc11(0x148));if(_0x513732===_0x5afc11(0xec))for(const _0x2fc57e of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x35e0ca,_0x2fc57e))throw forbiddenChannelConfigField(_0x2fc57e);}}function forbiddenChannelConfigField(_0xa03df2){const _0x154bd6=a140_0x7d39b8;return notificationError(_0x154bd6(0x112),'Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0xa03df2+_0x154bd6(0xf4));}function invalidFieldType(_0x1bd764,_0x45f8f4){const _0x1e31ea=a140_0x7d39b8;return notificationError('notification_config_field_invalid',_0x1e31ea(0xfd)+_0x1bd764+_0x1e31ea(0x11d)+_0x45f8f4+'.');}function serializeChannelConfig(_0x4191c0){const _0xa55be=a140_0x7d39b8;return _0x4191c0===null||_0x4191c0===undefined?null:JSON[_0xa55be(0x142)](_0x4191c0);}function redactSensitive(_0x2c1743){const _0x37fb79=a140_0x7d39b8;return _0x2c1743===null||_0x2c1743===undefined||_0x2c1743===''?null:_0x37fb79(0x156);}function requireResponseString(_0x119150,_0x311f5a,_0x55488d){const _0x8b47bc=a140_0x7d39b8;if(typeof _0x119150!==_0x8b47bc(0x111)||_0x119150['trim']()==='')throw CliErrors['apiError'](_0x8b47bc(0x138),_0x8b47bc(0x143)+(_0x55488d+0x1)+_0x8b47bc(0x106)+_0x311f5a+'\x22.');return _0x119150[_0x8b47bc(0x15e)]();}function requireExactString(_0x143de0,_0x1d60c9,_0x38aa48){const _0x44fd38=a140_0x7d39b8;if(typeof _0x143de0!==_0x44fd38(0x111)||_0x143de0[_0x44fd38(0x15e)]()==='')throw notificationError(_0x44fd38(0xf5),_0x44fd38(0x136)+_0x38aa48+_0x44fd38(0x106)+_0x1d60c9+'\x22.');return _0x143de0[_0x44fd38(0x15e)]();}function a140_0x11f3(){const _0x23b90b=['parse','notification_config_update_empty','stringify','Item\x20','dry-run','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','\x22configName\x22.','WECOM','messageTemplate','notification_config_','configName','type','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','WEBHOOK','keys','number','num','Notification\x20JSON\x20source\x20is\x20ambiguous.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','file','channelCode','push','<redacted>','notification_config_json_invalid','bool','\x20has\x20an\x20invalid\x20id.','emailTargets','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','hasOwnProperty','updateTime','trim','12exAkFE','connectTimeout','configCode','2391Jokcbw','setEncoding','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Create\x20JSON\x20requires\x20field\x20','\x20has\x20an\x20invalid\x20channelType.','every','path','preflight','2284lSafFs','\x20has\x20invalid\x20field\x20\x22','create','\x20failed.','description','EMAIL','notification_config_field_invalid','entries','\x20characters.','channelType','Invalid\x20--','endpointUrl:null','\x22\x20cannot\x20exceed\x20','\x22\x20is\x20forbidden.','notification_config_response_invalid','failed','\x20has\x20an\x20invalid\x20appCode.','DINGTALK','\x22channelType\x22.','boolean','replyTo','call','Notification\x20JSON\x20field\x20\x22','\x20is\x20invalid.','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','1252538YZBlMQ','endpointUrl','notification_config_source_unavailable','Missing\x20notification\x20JSON\x20source.','readTimeout','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x20is\x20missing\x20required\x20field\x20\x22','file\x20','Notification\x20JSON\x20from\x20','7850320WWvZmo','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','env','yes','7053244RHHZHb','5666050gaSXTX','notification_config_field_unknown','str','string','notification_config_channel_field_forbidden','Allowed\x20values:\x20','length','kind','bccList','name','notification_config_field_forbidden','utf8','from-env','has','FEISHU','\x22\x20must\x20be\x20','\x20must\x20be\x20an\x20object.','appCode','Notification\x20config\x20list\x20item\x20','\x20has\x20an\x20unsupported\x20channelType.','prototype','10vGwXiR','a\x20JSON\x20object','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','7607988ggpWVU','environment\x20variable\x20','Unknown\x20notification\x20JSON\x20field\x20\x22','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','includes','4oEmNaG','notification_config_confirmation_required','isSafeInteger','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','\x20--type\x20','channelConfigRaw','notification_config_field_required','227242lRiNRi','endpointUrlRaw','channelConfig','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','Notification\x20config\x20','validation','Invalid\x20notification\x20config\x20response.','update','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','isArray','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','stdin','join','notification_config_id_invalid'];a140_0x11f3=function(){return _0x23b90b;};return a140_0x11f3();}function responseNullableString(_0x40706f,_0x56d40d,_0x4536f0){const _0x2ed895=a140_0x7d39b8;if(_0x40706f===undefined||_0x40706f===null)return null;if(typeof _0x40706f!==_0x2ed895(0x111))throw notificationError('notification_config_response_invalid',_0x2ed895(0x136)+_0x4536f0+_0x2ed895(0x16b)+_0x56d40d+'\x22.');return _0x40706f;}function responseNullableTimeout(_0x4cac65,_0x24bcc6,_0x437f09){const _0x217ba3=a140_0x7d39b8;if(_0x4cac65===undefined||_0x4cac65===null)return null;if(!Number[_0x217ba3(0x12d)](_0x4cac65)||_0x4cac65<0x0)throw notificationError(_0x217ba3(0xf5),'Notification\x20config\x20'+_0x437f09+_0x217ba3(0x16b)+_0x24bcc6+'\x22.');return _0x4cac65;}function normalizeNullableString(_0x119d50){const _0x27cfae=a140_0x7d39b8;return typeof _0x119d50===_0x27cfae(0x111)?_0x119d50:null;}function isJsonObject(_0x3eaac5){const _0x110809=a140_0x7d39b8;return _0x3eaac5!==null&&typeof _0x3eaac5==='object'&&!Array[_0x110809(0x13b)](_0x3eaac5);}function hasOwn(_0x1ee35f,_0x42d2ed){const _0x5aed1c=a140_0x7d39b8;return Object[_0x5aed1c(0x122)][_0x5aed1c(0x15c)][_0x5aed1c(0xfc)](_0x1ee35f,_0x42d2ed);}async function readStdin(){const _0x5112fe=a140_0x7d39b8;let _0x2c2adb='';process[_0x5112fe(0x13d)][_0x5112fe(0x163)](_0x5112fe(0x119));for await(const _0x503838 of process[_0x5112fe(0x13d)])_0x2c2adb+=_0x503838;return _0x2c2adb;}
@@ -1 +1 @@
1
- const a140_0x59b48b=a140_0x522d;(function(_0x13daa8,_0x169681){const _0x5c8019=a140_0x522d,_0x52ffc1=_0x13daa8();while(!![]){try{const _0x254fd8=parseInt(_0x5c8019(0x17b))/0x1*(-parseInt(_0x5c8019(0x172))/0x2)+-parseInt(_0x5c8019(0x185))/0x3*(parseInt(_0x5c8019(0x159))/0x4)+-parseInt(_0x5c8019(0x152))/0x5*(parseInt(_0x5c8019(0x17d))/0x6)+parseInt(_0x5c8019(0x16c))/0x7*(parseInt(_0x5c8019(0x160))/0x8)+-parseInt(_0x5c8019(0x151))/0x9*(-parseInt(_0x5c8019(0x15f))/0xa)+-parseInt(_0x5c8019(0x178))/0xb+parseInt(_0x5c8019(0x17f))/0xc;if(_0x254fd8===_0x169681)break;else _0x52ffc1['push'](_0x52ffc1['shift']());}catch(_0x5c16c4){_0x52ffc1['push'](_0x52ffc1['shift']());}}}(a140_0x36ac,0x2a395));function a140_0x522d(_0x430ebc,_0x5a64a0){_0x430ebc=_0x430ebc-0x14f;const _0x36ac92=a140_0x36ac();let _0x522d5a=_0x36ac92[_0x430ebc];return _0x522d5a;}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=[a140_0x59b48b(0x169),a140_0x59b48b(0x175),a140_0x59b48b(0x161),a140_0x59b48b(0x14f)],SCENE_TO_LEGACY_TYPE={'invoice':a140_0x59b48b(0x16d),'general':a140_0x59b48b(0x189),'form':a140_0x59b48b(0x15e),'idCard':'IdCard'},SCENE_FLAG={'name':a140_0x59b48b(0x16a),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a140_0x59b48b(0x181)},IMAGE_FILE_FLAG={'name':a140_0x59b48b(0x179),'type':a140_0x59b48b(0x184),'description':a140_0x59b48b(0x156)},IMAGE_URL_FLAG={'name':'image-url','type':a140_0x59b48b(0x184),'description':a140_0x59b48b(0x15a)};function normalizeScene(_0x80c8e9){const _0x15ab82=a140_0x59b48b,_0x3d635a=_0x80c8e9[_0x15ab82(0x182)]()[_0x15ab82(0x173)]();if(_0x3d635a===_0x15ab82(0x177))return _0x15ab82(0x14f);if(_0x3d635a==='invoice'||_0x3d635a===_0x15ab82(0x175)||_0x3d635a===_0x15ab82(0x161))return _0x3d635a;throw CliErrors[_0x15ab82(0x150)](_0x15ab82(0x188)+_0x80c8e9+_0x15ab82(0x16b)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x3a9e80){const _0x1bb8e1=a140_0x59b48b,_0x54729b=_0x3a9e80[_0x1bb8e1(0x180)](_0x1bb8e1(0x179))[_0x1bb8e1(0x182)](),_0x1a9aeb=_0x3a9e80[_0x1bb8e1(0x180)](_0x1bb8e1(0x15c))[_0x1bb8e1(0x182)]();return{'imageFile':_0x54729b,'imageUrl':_0x1a9aeb,'count':[_0x54729b,_0x1a9aeb][_0x1bb8e1(0x174)](Boolean)[_0x1bb8e1(0x183)]};}function validateInputSelection(_0x5a6f03){const _0x572664=a140_0x59b48b,_0x425455=selectedInputs(_0x5a6f03);if(_0x425455[_0x572664(0x16f)]!==0x1)throw CliErrors['validation'](_0x572664(0x17a));return _0x425455;}function withScene(_0x5a11ed,_0x57a4c3,_0x1b120b){const _0x7fd880=a140_0x59b48b;return{..._0x5a11ed,'scene':_0x57a4c3,..._0x1b120b?{'sourceFile':{'fileName':_0x1b120b[_0x7fd880(0x171)],'filePath':_0x1b120b[_0x7fd880(0x168)]}}:{}};}function a140_0x36ac(){const _0x305dcb=['Preview:\x20recognize\x20','fileName','2TxZUsD','toLowerCase','filter','general','toString','idcard','1893991gVXkVH','image-file','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','167644pEdrvZ','ocr','12YXcDec','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','7680kgpify','str','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','trim','length','string','723bIQdMb','/smartapi/ocr/recognize-text?','/smartapi/common/uploadFile','Unsupported\x20OCR\x20scene:\x20','General','fileUrl','idCard','validation','773622IRKBGV','21995ocECzX','imageFile','path','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','imageUrl','使用研发态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','556JcEvwQ','Publicly\x20accessible\x20image\x20or\x20file\x20URL','GET','image-url','\x20OCR','Table','40iwRMVe','8UJDave','form','read','/smartapi/common/queryFileUrl','apiError','File\x20URL\x20response\x20missing\x20fileUrl.','File\x20upload\x20response\x20missing\x20filePath.','appCode','filePath','invoice','scene','.\x20Supported\x20scenes:\x20','1474193UYIqCj','Invoice','\x20OCR\x20from\x20URL','count'];a140_0x36ac=function(){return _0x305dcb;};return a140_0x36ac();}const ocrRecognize={'service':a140_0x59b48b(0x17c),'command':'recognize','description':a140_0x59b48b(0x158),'risk':a140_0x59b48b(0x162),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x26d5a4){const _0x2c1322=a140_0x59b48b,_0x1cf0a8=normalizeScene(_0x26d5a4[_0x2c1322(0x180)](_0x2c1322(0x16a))),_0x52a919=SCENE_TO_LEGACY_TYPE[_0x1cf0a8],_0xe230cb=validateInputSelection(_0x26d5a4);if(_0xe230cb[_0x2c1322(0x157)]){const _0x1ffc24=new URLSearchParams({'url':_0xe230cb[_0x2c1322(0x157)],'type':_0x52a919,'appCode':_0x26d5a4[_0x2c1322(0x167)]});return{'method':_0x2c1322(0x15b),'url':_0x2c1322(0x186)+_0x1ffc24[_0x2c1322(0x176)](),'description':_0x2c1322(0x170)+_0x1cf0a8+_0x2c1322(0x16e)};}const _0x7e2628=requireDevelopmentUploadFile(_0xe230cb[_0x2c1322(0x153)],_0x2c1322(0x179));return{'method':'POST','url':'/smartapi/common/uploadFile','body':{'steps':[{'method':'POST','url':_0x2c1322(0x187),'body':{'appCode':_0x26d5a4[_0x2c1322(0x167)],'multipart':{'file':_0x7e2628}}},{'method':'POST','url':_0x2c1322(0x163),'body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':'GET','url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x26d5a4[_0x2c1322(0x167)],'url':_0x2c1322(0x17e),'type':_0x52a919}}]},'description':_0x2c1322(0x155)+_0x1cf0a8+_0x2c1322(0x15d)};},async 'execute'(_0x5c874f){const _0x386288=a140_0x59b48b,_0x405c35=normalizeScene(_0x5c874f[_0x386288(0x180)](_0x386288(0x16a))),_0x5d1562=SCENE_TO_LEGACY_TYPE[_0x405c35],_0x4e0170=validateInputSelection(_0x5c874f);if(_0x4e0170[_0x386288(0x157)]){const _0x15fa47=await recognizeDevelopmentOcr(_0x5c874f[_0x386288(0x167)],{'url':_0x4e0170[_0x386288(0x157)],'type':_0x5d1562});return{'ok':!![],'data':withScene(_0x15fa47,_0x405c35)};}const _0x53de16=requireDevelopmentUploadFile(_0x4e0170['imageFile'],'image-file'),_0x4a371d=await uploadDevelopmentFile(_0x5c874f['appCode'],_0x53de16[_0x386288(0x154)]);if(!_0x4a371d[_0x386288(0x168)])throw CliErrors[_0x386288(0x164)](_0x386288(0x166));const _0x4827ec=await queryDevelopmentFileUrl(_0x4a371d[_0x386288(0x168)],{'download':![]});if(!_0x4827ec[_0x386288(0x18a)])throw CliErrors[_0x386288(0x164)](_0x386288(0x165));const _0x3a502a=await recognizeDevelopmentOcr(_0x5c874f['appCode'],{'url':_0x4827ec[_0x386288(0x18a)],'type':_0x5d1562});return{'ok':!![],'data':withScene(_0x3a502a,_0x405c35,_0x4a371d)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a141_0x3a8e1c=a141_0xaaad;(function(_0x23e271,_0x361008){const _0x58c804=a141_0xaaad,_0xd0435a=_0x23e271();while(!![]){try{const _0x2317d3=-parseInt(_0x58c804(0x14e))/0x1+parseInt(_0x58c804(0x133))/0x2+-parseInt(_0x58c804(0x15d))/0x3*(parseInt(_0x58c804(0x156))/0x4)+parseInt(_0x58c804(0x154))/0x5*(parseInt(_0x58c804(0x136))/0x6)+parseInt(_0x58c804(0x12f))/0x7+parseInt(_0x58c804(0x141))/0x8*(-parseInt(_0x58c804(0x139))/0x9)+parseInt(_0x58c804(0x160))/0xa;if(_0x2317d3===_0x361008)break;else _0xd0435a['push'](_0xd0435a['shift']());}catch(_0x11f40c){_0xd0435a['push'](_0xd0435a['shift']());}}}(a141_0x591b,0x44c2a));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=[a141_0x3a8e1c(0x13d),a141_0x3a8e1c(0x147),a141_0x3a8e1c(0x135),'idCard'],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a141_0x3a8e1c(0x131),'form':a141_0x3a8e1c(0x134),'idCard':a141_0x3a8e1c(0x158)},SCENE_FLAG={'name':a141_0x3a8e1c(0x15e),'type':a141_0x3a8e1c(0x132),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a141_0x3a8e1c(0x137)},IMAGE_FILE_FLAG={'name':a141_0x3a8e1c(0x146),'type':a141_0x3a8e1c(0x132),'description':a141_0x3a8e1c(0x13c)},IMAGE_URL_FLAG={'name':'image-url','type':a141_0x3a8e1c(0x132),'description':a141_0x3a8e1c(0x13f)};function normalizeScene(_0xe537ef){const _0x39ae43=a141_0x3a8e1c,_0x1b062d=_0xe537ef[_0x39ae43(0x13b)]()[_0x39ae43(0x15c)]();if(_0x1b062d===_0x39ae43(0x140))return _0x39ae43(0x14b);if(_0x1b062d===_0x39ae43(0x13d)||_0x1b062d===_0x39ae43(0x147)||_0x1b062d==='form')return _0x1b062d;throw CliErrors[_0x39ae43(0x150)](_0x39ae43(0x13e)+_0xe537ef+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x39ae43(0x14d)](',\x20'));}function selectedInputs(_0x2b5a8e){const _0x2a6e23=a141_0x3a8e1c,_0x222cf8=_0x2b5a8e[_0x2a6e23(0x14c)](_0x2a6e23(0x146))[_0x2a6e23(0x13b)](),_0x88edcc=_0x2b5a8e['str'](_0x2a6e23(0x142))[_0x2a6e23(0x13b)]();return{'imageFile':_0x222cf8,'imageUrl':_0x88edcc,'count':[_0x222cf8,_0x88edcc][_0x2a6e23(0x138)](Boolean)['length']};}function validateInputSelection(_0x3442e0){const _0x27f3ce=a141_0x3a8e1c,_0xbf363=selectedInputs(_0x3442e0);if(_0xbf363[_0x27f3ce(0x162)]!==0x1)throw CliErrors[_0x27f3ce(0x150)](_0x27f3ce(0x12e));return _0xbf363;}function withScene(_0xd16bfc,_0x172451,_0x425798){const _0x3fe74f=a141_0x3a8e1c;return{..._0xd16bfc,'scene':_0x172451,..._0x425798?{'sourceFile':{'fileName':_0x425798[_0x3fe74f(0x130)],'filePath':_0x425798[_0x3fe74f(0x148)]}}:{}};}const ocrRecognize={'service':a141_0x3a8e1c(0x149),'command':'recognize','description':'使用研发态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','risk':a141_0x3a8e1c(0x12d),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x49ffcd){const _0x171a48=a141_0x3a8e1c,_0xbbd79c=normalizeScene(_0x49ffcd['str'](_0x171a48(0x15e))),_0x21cda0=SCENE_TO_LEGACY_TYPE[_0xbbd79c],_0x3babec=validateInputSelection(_0x49ffcd);if(_0x3babec['imageUrl']){const _0x47aff7=new URLSearchParams({'url':_0x3babec['imageUrl'],'type':_0x21cda0,'appCode':_0x49ffcd[_0x171a48(0x15b)]});return{'method':_0x171a48(0x161),'url':'/smartapi/ocr/recognize-text?'+_0x47aff7[_0x171a48(0x12c)](),'description':_0x171a48(0x144)+_0xbbd79c+_0x171a48(0x13a)};}const _0x5dcd5f=requireDevelopmentUploadFile(_0x3babec[_0x171a48(0x155)],_0x171a48(0x146));return{'method':_0x171a48(0x12b),'url':_0x171a48(0x12a),'body':{'steps':[{'method':_0x171a48(0x12b),'url':_0x171a48(0x12a),'body':{'appCode':_0x49ffcd[_0x171a48(0x15b)],'multipart':{'file':_0x5dcd5f}}},{'method':_0x171a48(0x12b),'url':_0x171a48(0x143),'body':{'filePath':_0x171a48(0x14a),'downloadFlag':![]}},{'method':_0x171a48(0x161),'url':_0x171a48(0x151),'query':{'appCode':_0x49ffcd[_0x171a48(0x15b)],'url':_0x171a48(0x145),'type':_0x21cda0}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0xbbd79c+_0x171a48(0x14f)};},async 'execute'(_0x44fc47){const _0x335e2e=a141_0x3a8e1c,_0x126014=normalizeScene(_0x44fc47['str'](_0x335e2e(0x15e))),_0x522cb7=SCENE_TO_LEGACY_TYPE[_0x126014],_0x2ddd87=validateInputSelection(_0x44fc47);if(_0x2ddd87[_0x335e2e(0x157)]){const _0x3582c4=await recognizeDevelopmentOcr(_0x44fc47[_0x335e2e(0x15b)],{'url':_0x2ddd87[_0x335e2e(0x157)],'type':_0x522cb7});return{'ok':!![],'data':withScene(_0x3582c4,_0x126014)};}const _0x932b31=requireDevelopmentUploadFile(_0x2ddd87[_0x335e2e(0x155)],_0x335e2e(0x146)),_0x1e4912=await uploadDevelopmentFile(_0x44fc47[_0x335e2e(0x15b)],_0x932b31[_0x335e2e(0x153)]);if(!_0x1e4912[_0x335e2e(0x148)])throw CliErrors[_0x335e2e(0x15f)](_0x335e2e(0x159));const _0xa9ab77=await queryDevelopmentFileUrl(_0x1e4912[_0x335e2e(0x148)],{'download':![]});if(!_0xa9ab77['fileUrl'])throw CliErrors[_0x335e2e(0x15f)](_0x335e2e(0x15a));const _0xf25840=await recognizeDevelopmentOcr(_0x44fc47['appCode'],{'url':_0xa9ab77[_0x335e2e(0x152)],'type':_0x522cb7});return{'ok':!![],'data':withScene(_0xf25840,_0x126014,_0x1e4912)};}};function a141_0xaaad(_0xbb23c1,_0x137bbf){_0xbb23c1=_0xbb23c1-0x12a;const _0x591b6e=a141_0x591b();let _0xaaad30=_0x591b6e[_0xbb23c1];return _0xaaad30;}export const ocrDefinitions=[ocrRecognize];function a141_0x591b(){const _0x20c204=['Unsupported\x20OCR\x20scene:\x20','Publicly\x20accessible\x20image\x20or\x20file\x20URL','idcard','916664JgfhbM','image-url','/smartapi/common/queryFileUrl','Preview:\x20recognize\x20','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','image-file','general','filePath','ocr','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','idCard','str','join','457530LGuMwK','\x20OCR','validation','/smartapi/ocr/recognize-text','fileUrl','path','10egjTWK','imageFile','152hviGPN','imageUrl','IdCard','File\x20upload\x20response\x20missing\x20filePath.','File\x20URL\x20response\x20missing\x20fileUrl.','appCode','toLowerCase','6330VColxj','scene','apiError','1137930wjbhhn','GET','count','/smartapi/common/uploadFile','POST','toString','read','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','3039526ZCIFnV','fileName','General','string','1095264HKoetK','Table','form','202374wCSxKa','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','filter','27xtmIts','\x20OCR\x20from\x20URL','trim','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','invoice'];a141_0x591b=function(){return _0x20c204;};return a141_0x591b();}