@lovrabet/rabetbase-cli 2.4.6-beta.2 → 2.4.6-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/business-groups.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff-refresh-start.js +1 -1
  88. package/lib/commands/db/diff-refresh-status.js +1 -1
  89. package/lib/commands/db/diff.js +1 -1
  90. package/lib/commands/db/index.js +1 -1
  91. package/lib/commands/db/list.js +1 -1
  92. package/lib/commands/db/shared.js +1 -1
  93. package/lib/commands/db/tables.js +1 -1
  94. package/lib/commands/db/test.js +1 -1
  95. package/lib/commands/db/update.js +1 -1
  96. package/lib/commands/doctor.js +1 -1
  97. package/lib/commands/file/index.js +1 -1
  98. package/lib/commands/init/index.js +1 -1
  99. package/lib/commands/issue/index.js +1 -1
  100. package/lib/commands/issue/nudge.js +1 -1
  101. package/lib/commands/issue/report.js +1 -1
  102. package/lib/commands/issue/shared.js +1 -1
  103. package/lib/commands/kb/create.js +1 -1
  104. package/lib/commands/kb/delete.js +1 -1
  105. package/lib/commands/kb/detail.js +1 -1
  106. package/lib/commands/kb/index.js +1 -1
  107. package/lib/commands/kb/list.js +1 -1
  108. package/lib/commands/kb/shared.js +1 -1
  109. package/lib/commands/kb/update.js +1 -1
  110. package/lib/commands/logs/index.js +1 -1
  111. package/lib/commands/menu/asset-update.js +1 -1
  112. package/lib/commands/menu/delete.js +1 -1
  113. package/lib/commands/menu/external-link-create.js +1 -1
  114. package/lib/commands/menu/external-link-update.js +1 -1
  115. package/lib/commands/menu/group-create.js +1 -1
  116. package/lib/commands/menu/group-update.js +1 -1
  117. package/lib/commands/menu/index.js +1 -1
  118. package/lib/commands/menu/list.js +1 -1
  119. package/lib/commands/menu/move.js +1 -1
  120. package/lib/commands/menu/regroup-start.js +1 -1
  121. package/lib/commands/menu/rename.js +1 -1
  122. package/lib/commands/menu/shared/compare-table.js +1 -1
  123. package/lib/commands/menu/shared/delete-plan.js +1 -1
  124. package/lib/commands/menu/shared/facts.js +1 -1
  125. package/lib/commands/menu/shared/index.js +1 -1
  126. package/lib/commands/menu/shared/inquirer.js +1 -1
  127. package/lib/commands/menu/shared/local-pages.js +1 -1
  128. package/lib/commands/menu/shared/logic.js +1 -1
  129. package/lib/commands/menu/shared/mutations.js +1 -1
  130. package/lib/commands/menu/shared/service.js +1 -1
  131. package/lib/commands/menu/shared/sync-core.js +1 -1
  132. package/lib/commands/menu/shared/update-core.js +1 -1
  133. package/lib/commands/menu/shared/valid-url.js +1 -1
  134. package/lib/commands/menu/sync.js +1 -1
  135. package/lib/commands/menu/visibility-update.js +1 -1
  136. package/lib/commands/notification/config-create.js +1 -1
  137. package/lib/commands/notification/config-delete.js +1 -1
  138. package/lib/commands/notification/config-list.js +1 -1
  139. package/lib/commands/notification/config-update.js +1 -1
  140. package/lib/commands/notification/index.js +1 -1
  141. package/lib/commands/notification/shared.js +1 -1
  142. package/lib/commands/ocr/index.js +1 -1
  143. package/lib/commands/page/create.js +1 -1
  144. package/lib/commands/page/custom/detail.js +1 -1
  145. package/lib/commands/page/custom/list.js +1 -1
  146. package/lib/commands/page/custom/publish.js +1 -1
  147. package/lib/commands/page/custom/shared.js +1 -1
  148. package/lib/commands/page/custom/syntax.js +1 -1
  149. package/lib/commands/page/custom/template.js +1 -1
  150. package/lib/commands/page/custom/update.js +1 -1
  151. package/lib/commands/page/data-list-status.js +1 -1
  152. package/lib/commands/page/generate-start.js +1 -1
  153. package/lib/commands/page/generate-status.js +1 -1
  154. package/lib/commands/page/index.js +1 -1
  155. package/lib/commands/page/pull.js +1 -1
  156. package/lib/commands/page/push.js +1 -1
  157. package/lib/commands/page/relation-audit.js +1 -1
  158. package/lib/commands/page/restore.js +1 -1
  159. package/lib/commands/page/shared.js +1 -1
  160. package/lib/commands/page/sync.js +1 -1
  161. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  162. package/lib/commands/project/create/format-elapsed.js +1 -1
  163. package/lib/commands/project/create/main.js +1 -1
  164. package/lib/commands/project/create/materialize-project-template.js +1 -1
  165. package/lib/commands/project/create/project-name.js +1 -1
  166. package/lib/commands/project/create/project-template-archive.js +1 -1
  167. package/lib/commands/project/create/project-template-path.js +1 -1
  168. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  169. package/lib/commands/project/create/use-format-code.js +1 -1
  170. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  171. package/lib/commands/project/index.js +1 -1
  172. package/lib/commands/project/upgrade.js +1 -1
  173. package/lib/commands/registry.js +1 -1
  174. package/lib/commands/role/delete.js +1 -1
  175. package/lib/commands/role/detail.js +1 -1
  176. package/lib/commands/role/index.js +1 -1
  177. package/lib/commands/role/list.js +1 -1
  178. package/lib/commands/role/shared.js +1 -1
  179. package/lib/commands/role/update.js +1 -1
  180. package/lib/commands/role/user-add.js +1 -1
  181. package/lib/commands/role/user-remove.js +1 -1
  182. package/lib/commands/role/user-resolve.js +1 -1
  183. package/lib/commands/run/index.js +1 -1
  184. package/lib/commands/schema.js +1 -1
  185. package/lib/commands/sql/create.js +1 -1
  186. package/lib/commands/sql/delete.js +1 -1
  187. package/lib/commands/sql/detail.js +1 -1
  188. package/lib/commands/sql/exec.js +1 -1
  189. package/lib/commands/sql/index.js +1 -1
  190. package/lib/commands/sql/list.js +1 -1
  191. package/lib/commands/sql/pull.js +1 -1
  192. package/lib/commands/sql/push.js +1 -1
  193. package/lib/commands/sql/shared.js +1 -1
  194. package/lib/commands/sql/status.js +1 -1
  195. package/lib/commands/sql/validate.js +1 -1
  196. package/lib/commands/task/index.js +1 -1
  197. package/lib/commands/task/status.js +1 -1
  198. package/lib/commands/tenant/index.js +1 -1
  199. package/lib/commands/tenant/members-list.js +1 -1
  200. package/lib/commands/tenant/shared.js +1 -1
  201. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  202. package/lib/commands/user-account/index.js +1 -1
  203. package/lib/commands/workspace/add.js +1 -1
  204. package/lib/commands/workspace/index.js +1 -1
  205. package/lib/commands/workspace/remove.js +1 -1
  206. package/lib/config/schema.js +1 -1
  207. package/lib/constant/cdn.js +1 -1
  208. package/lib/constant/cli.js +1 -1
  209. package/lib/constant/defaults.js +1 -1
  210. package/lib/constant/domain.js +1 -1
  211. package/lib/constant/env.js +1 -1
  212. package/lib/constant/output.js +1 -1
  213. package/lib/constant/paths.js +1 -1
  214. package/lib/constant/risk.js +1 -1
  215. package/lib/context/app-resolver.js +1 -1
  216. package/lib/context/auth-resolver.js +1 -1
  217. package/lib/context/config-loader.js +1 -1
  218. package/lib/context.js +1 -1
  219. package/lib/core/alias-resolver.js +1 -1
  220. package/lib/core/api-client.js +1 -1
  221. package/lib/core/bff/config.js +1 -1
  222. package/lib/core/bff/file-system.js +1 -1
  223. package/lib/core/bff/hash.js +1 -1
  224. package/lib/core/bff/lock.js +1 -1
  225. package/lib/core/bff/utils.js +1 -1
  226. package/lib/core/db-resolver.js +1 -1
  227. package/lib/core/page/file-system.js +1 -1
  228. package/lib/core/page/hash.js +1 -1
  229. package/lib/core/page/lock.js +1 -1
  230. package/lib/core/sql-index-auditor.js +1 -1
  231. package/lib/core/sql-sync/config.js +1 -1
  232. package/lib/core/sql-sync/file-system.js +1 -1
  233. package/lib/core/sql-sync/hash.js +1 -1
  234. package/lib/core/sql-sync/lock.js +1 -1
  235. package/lib/core/sql-sync/utils.js +1 -1
  236. package/lib/core/sql-validator.js +1 -1
  237. package/lib/errors.js +1 -1
  238. package/lib/framework/build-all-flags.js +1 -1
  239. package/lib/framework/error-output.js +1 -1
  240. package/lib/framework/explicit-yes.js +1 -1
  241. package/lib/framework/flags.js +1 -1
  242. package/lib/framework/help.js +1 -1
  243. package/lib/framework/index.js +1 -1
  244. package/lib/framework/output.js +1 -1
  245. package/lib/framework/response.js +1 -1
  246. package/lib/framework/runner-alias.js +1 -1
  247. package/lib/framework/runner.js +1 -1
  248. package/lib/framework/schema-export.js +1 -1
  249. package/lib/framework/types.js +1 -1
  250. package/lib/generated/build-info.d.ts +4 -4
  251. package/lib/generated/build-info.js +1 -1
  252. package/lib/help.js +1 -1
  253. package/lib/postinstall.js +1 -1
  254. package/lib/runtime/confirmation.js +1 -1
  255. package/lib/runtime/event.js +1 -1
  256. package/lib/runtime/index.js +1 -1
  257. package/lib/runtime/queue.js +1 -1
  258. package/lib/runtime/resolve.js +1 -1
  259. package/lib/skills/builtin-skill.js +1 -1
  260. package/lib/skills/main.js +1 -1
  261. package/lib/skills/npx-skills-add.js +1 -1
  262. package/lib/skills/skill-presence.js +1 -1
  263. package/lib/telemetry/cli-command-trace.js +1 -1
  264. package/lib/telemetry/cli-help-trace.js +1 -1
  265. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  266. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  267. package/lib/telemetry/send-cli-trace-log.js +1 -1
  268. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  269. package/lib/utils/ai_config.js +1 -1
  270. package/lib/utils/apply-jq-filter.js +1 -1
  271. package/lib/utils/cdn-config.js +1 -1
  272. package/lib/utils/check-sdk-version.js +1 -1
  273. package/lib/utils/cli-version-check.js +1 -1
  274. package/lib/utils/cli-version-policy.js +1 -1
  275. package/lib/utils/config.js +1 -1
  276. package/lib/utils/entity-with-id.js +1 -1
  277. package/lib/utils/file-utils.js +1 -1
  278. package/lib/utils/guides-cdn.js +1 -1
  279. package/lib/utils/http-client.js +1 -1
  280. package/lib/utils/is-non-interactive.js +1 -1
  281. package/lib/utils/logger.js +1 -1
  282. package/lib/utils/params.js +1 -1
  283. package/lib/utils/platform.js +1 -1
  284. package/lib/utils/rules-cdn.js +1 -1
  285. package/lib/utils/sleep.js +1 -1
  286. package/lib/utils/template-replacer.js +1 -1
  287. package/lib/utils/update-notice.js +1 -1
  288. package/lib/utils/version.js +1 -1
  289. package/lib/utils/with-active-cookie.js +1 -1
  290. package/lib/utils/write-cli-side-channel.js +1 -1
  291. package/package.json +1 -1
  292. package/skills/rabetbase/SKILL.md +3 -3
  293. package/skills/rabetbase/references/rabetbase-ocr.md +17 -2
  294. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a141_0x274552=a141_0x3bb8;(function(_0x2d6fc1,_0x265e82){const _0x12d3b2=a141_0x3bb8,_0xe7093c=_0x2d6fc1();while(!![]){try{const _0x1a0b46=-parseInt(_0x12d3b2(0x239))/0x1*(-parseInt(_0x12d3b2(0x20d))/0x2)+-parseInt(_0x12d3b2(0x258))/0x3*(-parseInt(_0x12d3b2(0x225))/0x4)+parseInt(_0x12d3b2(0x22c))/0x5+-parseInt(_0x12d3b2(0x201))/0x6*(-parseInt(_0x12d3b2(0x230))/0x7)+parseInt(_0x12d3b2(0x249))/0x8*(-parseInt(_0x12d3b2(0x21e))/0x9)+parseInt(_0x12d3b2(0x203))/0xa+-parseInt(_0x12d3b2(0x267))/0xb;if(_0x1a0b46===_0x265e82)break;else _0xe7093c['push'](_0xe7093c['shift']());}catch(_0x5ced1a){_0xe7093c['push'](_0xe7093c['shift']());}}}(a141_0x20d3,0x1fe17));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL','FEISHU',a141_0x274552(0x218),'WECOM',a141_0x274552(0x22a)];function a141_0x3bb8(_0x20f447,_0xf5e5f0){_0x20f447=_0x20f447-0x1e7;const _0x20d3f6=a141_0x20d3();let _0x3bb86b=_0x20d3f6[_0x20f447];return _0x3bb86b;}export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a141_0x274552(0x243),'channelType',a141_0x274552(0x242),a141_0x274552(0x215),a141_0x274552(0x266),a141_0x274552(0x256),a141_0x274552(0x1fd)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a141_0x274552(0x1f6),'configCode',a141_0x274552(0x223)]),EMAIL_RECIPIENT_FIELDS=new Set([a141_0x274552(0x21a),a141_0x274552(0x268),a141_0x274552(0x219),'bccList',a141_0x274552(0x208),a141_0x274552(0x235),a141_0x274552(0x214),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a141_0x274552(0x1f8),'type':'string','required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a141_0x274552(0x24d),'type':a141_0x274552(0x200),'required':![],'default':![],'description':a141_0x274552(0x23c)},{'name':a141_0x274552(0x264),'type':a141_0x274552(0x21d),'required':![],'description':a141_0x274552(0x1f5)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a141_0x274552(0x206),'required':!![],'description':a141_0x274552(0x227)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x54423b,_0x2c7658,_0x570458){return new CliError(_0x54423b,0x1,_0x2c7658,_0x570458);}export function readNotificationId(_0xcd10f7){const _0x53d498=a141_0x274552,_0x520324=_0xcd10f7[_0x53d498(0x25a)]('id');if(!Number[_0x53d498(0x24a)](_0x520324)||_0x520324<=0x0)throw notificationError(_0x53d498(0x1eb),_0x53d498(0x1e8));return _0x520324;}export function requireNotificationExplicitYes(_0x3b9f79){const _0x50bcd9=a141_0x274552;if(_0x3b9f79[_0x50bcd9(0x24c)](_0x50bcd9(0x23e))||_0x3b9f79['bool'](_0x50bcd9(0x24b)))return;throw notificationError(_0x50bcd9(0x1fb),_0x50bcd9(0x1f9),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x379889,_0x47a10f=a141_0x274552(0x23d),_0x3067f3=a141_0x274552(0x20e)){const _0x5e7ea8=a141_0x274552,_0x343a69=_0x379889['str'](_0x47a10f)[_0x5e7ea8(0x220)]()||_0x3067f3;if(!NOTIFICATION_CHANNEL_TYPES[_0x5e7ea8(0x262)](_0x343a69))throw CliErrors[_0x5e7ea8(0x1e9)](_0x5e7ea8(0x263)+_0x47a10f+':\x20'+_0x343a69,_0x5e7ea8(0x269)+NOTIFICATION_CHANNEL_TYPES[_0x5e7ea8(0x204)](',\x20')+'.');return _0x343a69;}export function assertSingleNotificationSource(_0x246358){const _0x5e5b08=a141_0x274552,_0x2ed888=[],_0x444428=_0x246358[_0x5e5b08(0x22e)](_0x5e5b08(0x1f8))[_0x5e5b08(0x220)]();if(_0x444428)_0x2ed888['push']({'kind':'file','path':_0x444428});if(_0x246358[_0x5e5b08(0x24c)]('stdin'))_0x2ed888[_0x5e5b08(0x254)]({'kind':_0x5e5b08(0x24d)});const _0x2c86b9=_0x246358[_0x5e5b08(0x22e)](_0x5e5b08(0x264))[_0x5e5b08(0x220)]();if(_0x2c86b9)_0x2ed888[_0x5e5b08(0x254)]({'kind':_0x5e5b08(0x22d),'name':_0x2c86b9});if(_0x2ed888[_0x5e5b08(0x247)]===0x0)throw CliErrors[_0x5e5b08(0x1e9)](_0x5e5b08(0x1f7),_0x5e5b08(0x213));if(_0x2ed888['length']>0x1)throw CliErrors[_0x5e5b08(0x1e9)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x5e5b08(0x213));return _0x2ed888[0x0];}export async function readNotificationDocument(_0x53c7fd,_0x16145e){const _0x40d091=a141_0x274552,_0x3c3e14=assertSingleNotificationSource(_0x53c7fd),_0x43a485=_0x3c3e14[_0x40d091(0x22f)]===_0x40d091(0x1f8)?_0x40d091(0x238)+_0x3c3e14[_0x40d091(0x212)]:_0x3c3e14[_0x40d091(0x22f)]===_0x40d091(0x22d)?_0x40d091(0x240)+_0x3c3e14[_0x40d091(0x233)]:_0x40d091(0x24d);let _0x1abea3;try{if(_0x3c3e14[_0x40d091(0x22f)]===_0x40d091(0x1f8))_0x1abea3=await readFile(_0x3c3e14['path'],_0x40d091(0x26b));else{if(_0x3c3e14[_0x40d091(0x22f)]==='env'){if(!(_0x3c3e14['name']in process.env))throw notificationError(_0x40d091(0x23b),_0x40d091(0x1f3)+_0x3c3e14[_0x40d091(0x233)]);_0x1abea3=process.env[_0x3c3e14.name]??'';}else _0x1abea3=await readStdin();}}catch(_0x36f20c){if(_0x36f20c instanceof CliError)throw _0x36f20c;throw notificationError(_0x40d091(0x23b),_0x40d091(0x250)+_0x43a485+'.');}let _0x141d20;try{_0x141d20=JSON['parse'](_0x1abea3);}catch{throw notificationError(_0x40d091(0x1fc),_0x40d091(0x209)+_0x43a485+_0x40d091(0x221),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x141d20))throw notificationError(_0x40d091(0x1fc),_0x40d091(0x209)+_0x43a485+_0x40d091(0x25c));return validateNotificationDocument(_0x141d20,_0x16145e);}export function projectNotificationListConfig(_0xf9c8d,_0x24794d){const _0x532537=a141_0x274552;return{'id':typeof _0xf9c8d['id']===_0x532537(0x206)?_0xf9c8d['id']:null,'configCode':requireResponseString(_0xf9c8d['configCode'],_0x532537(0x20f),_0x24794d),'configName':requireResponseString(_0xf9c8d[_0x532537(0x243)],_0x532537(0x243),_0x24794d),'channelType':requireResponseString(_0xf9c8d[_0x532537(0x23a)],'channelType',_0x24794d),'description':normalizeNullableString(_0xf9c8d[_0x532537(0x266)]),'createTime':normalizeNullableString(_0xf9c8d[_0x532537(0x253)]),'updateTime':normalizeNullableString(_0xf9c8d['updateTime'])};}export function normalizeExactNotificationConfig(_0x4e42f1,_0x181796,_0xdab5d9){const _0xe28703=a141_0x274552;if(!Number['isSafeInteger'](_0x4e42f1['id'])||_0x4e42f1['id']!==_0x181796)throw notificationError(_0xe28703(0x226),_0xe28703(0x241)+_0x181796+'.');if(_0x4e42f1[_0xe28703(0x1f6)]!==_0xdab5d9)throw notificationError(_0xe28703(0x226),_0xe28703(0x205)+_0x181796+_0xe28703(0x251));const _0xee193e=requireExactString(_0x4e42f1['configName'],_0xe28703(0x243),_0x181796),_0x5f584a=requireExactString(_0x4e42f1['configCode'],_0xe28703(0x20f),_0x181796),_0x53f49e=requireExactString(_0x4e42f1['channelType'],'channelType',_0x181796);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x53f49e))throw notificationError(_0xe28703(0x226),_0xe28703(0x205)+_0x181796+_0xe28703(0x229));const _0x3e9a2f=responseNullableString(_0x4e42f1[_0xe28703(0x242)],_0xe28703(0x242),_0x181796),_0x1ac6cc=responseNullableString(_0x4e42f1[_0xe28703(0x215)],_0xe28703(0x215),_0x181796),_0x415aca=responseNullableString(_0x4e42f1['description'],_0xe28703(0x266),_0x181796),_0x1eefb5=responseNullableTimeout(_0x4e42f1[_0xe28703(0x256)],_0xe28703(0x256),_0x181796),_0x8e75f4=responseNullableTimeout(_0x4e42f1[_0xe28703(0x1fd)],_0xe28703(0x1fd),_0x181796);return{'id':_0x181796,'appCode':_0xdab5d9,'configCode':_0x5f584a,'configName':_0xee193e,'channelType':_0x53f49e,'endpointUrl':redactSensitive(_0x3e9a2f),'channelConfig':redactSensitive(_0x1ac6cc),'description':_0x415aca,'connectTimeout':_0x1eefb5,'readTimeout':_0x8e75f4,'endpointUrlRaw':_0x3e9a2f,'channelConfigRaw':_0x1ac6cc};}export async function requireExactNotificationConfig(_0x5b665d,_0x553644,_0x5715c5){const _0x55dad2=a141_0x274552;let _0x3ed064;try{_0x3ed064=await getNotificationChannelConfig(_0x553644,_0x5b665d);}catch{throw safeApiFailure(_0x5715c5,_0x55dad2(0x210),_0x55dad2(0x20a)+_0x5b665d+_0x55dad2(0x21c));}return normalizeExactNotificationConfig(_0x3ed064,_0x553644,_0x5b665d);}export function projectNotificationConfig(_0x5a1943){const _0x33383b=a141_0x274552;return{'id':_0x5a1943['id']??null,'appCode':_0x5a1943[_0x33383b(0x1f6)],'configCode':_0x5a1943[_0x33383b(0x20f)]??null,'configName':_0x5a1943[_0x33383b(0x243)],'channelType':_0x5a1943['channelType'],'endpointUrl':redactSensitive(_0x5a1943[_0x33383b(0x242)]),'channelConfig':redactSensitive(_0x5a1943[_0x33383b(0x215)]),'description':_0x5a1943[_0x33383b(0x266)]??null,'connectTimeout':_0x5a1943[_0x33383b(0x256)]??null,'readTimeout':_0x5a1943['readTimeout']??null};}export function notificationSelector(_0x4c4662){const _0xa162f8=a141_0x274552;return{'appCode':_0x4c4662[_0xa162f8(0x1f6)],'id':_0x4c4662['id'],'configCode':_0x4c4662[_0xa162f8(0x20f)],'configName':_0x4c4662['configName'],'channelType':_0x4c4662[_0xa162f8(0x23a)]};}export function createMutationInput(_0x1c79b0,_0x3fed9b){const _0x55322e=a141_0x274552;return{'appCode':_0x1c79b0,'configName':_0x3fed9b[_0x55322e(0x243)],'channelType':_0x3fed9b[_0x55322e(0x23a)],...hasOwn(_0x3fed9b,_0x55322e(0x242))?{'endpointUrl':_0x3fed9b[_0x55322e(0x242)]}:{},...hasOwn(_0x3fed9b,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x3fed9b[_0x55322e(0x215)])}:{},...hasOwn(_0x3fed9b,_0x55322e(0x266))?{'description':_0x3fed9b[_0x55322e(0x266)]}:{},...hasOwn(_0x3fed9b,_0x55322e(0x256))?{'connectTimeout':_0x3fed9b['connectTimeout']}:{},...hasOwn(_0x3fed9b,_0x55322e(0x1fd))?{'readTimeout':_0x3fed9b[_0x55322e(0x1fd)]}:{}};}export function mergeUpdateInput(_0x1e4038,_0x4f761b){const _0x2edf81=a141_0x274552;return{'id':_0x1e4038['id'],'appCode':_0x1e4038[_0x2edf81(0x1f6)],'configName':_0x4f761b[_0x2edf81(0x243)]??_0x1e4038[_0x2edf81(0x243)],'channelType':_0x4f761b[_0x2edf81(0x23a)]??_0x1e4038['channelType'],'endpointUrl':hasOwn(_0x4f761b,_0x2edf81(0x242))?_0x4f761b[_0x2edf81(0x242)]:_0x1e4038[_0x2edf81(0x248)],'channelConfig':hasOwn(_0x4f761b,_0x2edf81(0x215))?serializeChannelConfig(_0x4f761b[_0x2edf81(0x215)]):_0x1e4038[_0x2edf81(0x22b)],'description':hasOwn(_0x4f761b,_0x2edf81(0x266))?_0x4f761b[_0x2edf81(0x266)]:_0x1e4038[_0x2edf81(0x266)],'connectTimeout':hasOwn(_0x4f761b,_0x2edf81(0x256))?_0x4f761b[_0x2edf81(0x256)]:_0x1e4038[_0x2edf81(0x256)],'readTimeout':hasOwn(_0x4f761b,_0x2edf81(0x1fd))?_0x4f761b['readTimeout']:_0x1e4038['readTimeout']};}export function plannedUpdateProjection(_0x3dde8e,_0x5b6734){const _0x1e6c94=a141_0x274552;return projectNotificationConfig({'id':_0x3dde8e['id'],'appCode':_0x3dde8e['appCode'],'configCode':_0x3dde8e[_0x1e6c94(0x20f)],'configName':_0x5b6734[_0x1e6c94(0x243)]??_0x3dde8e[_0x1e6c94(0x243)],'channelType':_0x5b6734[_0x1e6c94(0x23a)]??_0x3dde8e[_0x1e6c94(0x23a)],'endpointUrl':hasOwn(_0x5b6734,_0x1e6c94(0x242))?_0x5b6734[_0x1e6c94(0x242)]:_0x3dde8e['endpointUrlRaw'],'channelConfig':hasOwn(_0x5b6734,_0x1e6c94(0x215))?_0x5b6734[_0x1e6c94(0x215)]:_0x3dde8e[_0x1e6c94(0x22b)],'description':hasOwn(_0x5b6734,_0x1e6c94(0x266))?_0x5b6734[_0x1e6c94(0x266)]:_0x3dde8e[_0x1e6c94(0x266)],'connectTimeout':hasOwn(_0x5b6734,_0x1e6c94(0x256))?_0x5b6734[_0x1e6c94(0x256)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x3dde8e[_0x1e6c94(0x256)],'readTimeout':hasOwn(_0x5b6734,_0x1e6c94(0x1fd))?_0x5b6734['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x3dde8e['readTimeout']});}export function requestedSafeFieldsMatch(_0x3b4bf0,_0x45daf9,_0x166162){const _0x4e3b6f=a141_0x274552,_0x2828da=[],_0x34ca6e=[],_0x55cffa=[];for(const _0x2ff133 of['configName','channelType',_0x4e3b6f(0x266)]){if(!hasOwn(_0x166162,_0x2ff133))continue;_0x55cffa[_0x4e3b6f(0x254)](_0x2ff133),_0x2828da['push'](_0x45daf9[_0x2ff133]===_0x166162[_0x2ff133]),_0x34ca6e[_0x4e3b6f(0x254)](_0x3b4bf0[_0x2ff133]!==_0x166162[_0x2ff133]&&_0x45daf9[_0x2ff133]===_0x166162[_0x2ff133]);}for(const _0x34e9a8 of[_0x4e3b6f(0x256),_0x4e3b6f(0x1fd)]){if(!hasOwn(_0x166162,_0x34e9a8))continue;const _0x37d222=_0x166162[_0x34e9a8]??(_0x34e9a8===_0x4e3b6f(0x256)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x55cffa[_0x4e3b6f(0x254)](_0x34e9a8),_0x2828da[_0x4e3b6f(0x254)](_0x45daf9[_0x34e9a8]===_0x37d222),_0x34ca6e[_0x4e3b6f(0x254)](_0x3b4bf0[_0x34e9a8]!==_0x37d222&&_0x45daf9[_0x34e9a8]===_0x37d222);}return hasOwn(_0x166162,'endpointUrl')&&_0x166162[_0x4e3b6f(0x242)]===null&&(_0x55cffa[_0x4e3b6f(0x254)](_0x4e3b6f(0x246)),_0x2828da[_0x4e3b6f(0x254)](_0x45daf9['endpointUrlRaw']===null||_0x45daf9[_0x4e3b6f(0x248)]===''),_0x34ca6e[_0x4e3b6f(0x254)](_0x3b4bf0[_0x4e3b6f(0x248)]!==null&&_0x3b4bf0['endpointUrlRaw']!==''&&(_0x45daf9['endpointUrlRaw']===null||_0x45daf9[_0x4e3b6f(0x248)]===''))),{'allMatch':_0x2828da[_0x4e3b6f(0x1f1)](Boolean),'provesChange':_0x34ca6e['some'](Boolean),'verifiedFields':_0x55cffa};}export function validateNotificationDeleteReadback(_0x541f08,_0x37bb20,_0xe45c07){const _0x4b9548=a141_0x274552;for(const [_0x19ab2d,_0x2fd21f]of _0x541f08[_0x4b9548(0x1ea)]()){if(!Number[_0x4b9548(0x24a)](_0x2fd21f['id'])||_0x2fd21f['id']<=0x0)throw notificationError(_0x4b9548(0x226),_0x4b9548(0x202)+(_0x19ab2d+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x2fd21f[_0x4b9548(0x1f6)]!==_0x37bb20)throw notificationError(_0x4b9548(0x226),_0x4b9548(0x202)+(_0x19ab2d+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x2fd21f[_0x4b9548(0x23a)]!==_0xe45c07)throw notificationError(_0x4b9548(0x226),_0x4b9548(0x202)+(_0x19ab2d+0x1)+_0x4b9548(0x24f));}}export function safeApiFailure(_0x4cb77a,_0x1bac69,_0x3e9fe5){const _0x288e24=a141_0x274552;return notificationError(_0x288e24(0x1ec)+_0x4cb77a+'_'+(_0x1bac69==='mutation'?_0x288e24(0x236):_0x1bac69+_0x288e24(0x26a)),'Notification\x20config\x20'+_0x4cb77a+'\x20'+_0x1bac69+'\x20failed.',_0x3e9fe5);}export function notificationLookupCommand(_0xbdf2c0,_0x434f33){const _0x7bf213=a141_0x274552;return _0x7bf213(0x23f)+_0xbdf2c0+_0x7bf213(0x257)+_0x434f33+'\x20--format\x20compress';}function validateNotificationDocument(_0x587e6a,_0x9794bb){const _0x6e2a43=a141_0x274552;for(const _0x2ba866 of Object['keys'](_0x587e6a)){if(FORBIDDEN_IDENTITY_FIELDS[_0x6e2a43(0x21f)](_0x2ba866))throw notificationError(_0x6e2a43(0x1fa),_0x6e2a43(0x25f)+_0x2ba866+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x6e2a43(0x21f)](_0x2ba866))throw notificationError(_0x6e2a43(0x20b),_0x6e2a43(0x1fe)+_0x2ba866+'\x22.');}if(_0x9794bb==='update'&&Object[_0x6e2a43(0x224)](_0x587e6a)[_0x6e2a43(0x247)]===0x0)throw notificationError(_0x6e2a43(0x1ed),_0x6e2a43(0x261));const _0x1dcc81={};if(hasOwn(_0x587e6a,_0x6e2a43(0x243)))_0x1dcc81[_0x6e2a43(0x243)]=validateRequiredString(_0x587e6a[_0x6e2a43(0x243)],_0x6e2a43(0x243),0x80);else{if(_0x9794bb===_0x6e2a43(0x1f2))throw notificationError(_0x6e2a43(0x237),_0x6e2a43(0x25b)+_0x6e2a43(0x234));}if(hasOwn(_0x587e6a,_0x6e2a43(0x23a))){if(typeof _0x587e6a[_0x6e2a43(0x23a)]!==_0x6e2a43(0x21d))throw invalidFieldType(_0x6e2a43(0x23a),_0x6e2a43(0x1f4));const _0x333334=_0x587e6a['channelType'][_0x6e2a43(0x220)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x6e2a43(0x262)](_0x333334))throw notificationError(_0x6e2a43(0x1e7),_0x6e2a43(0x20c),_0x6e2a43(0x269)+NOTIFICATION_CHANNEL_TYPES[_0x6e2a43(0x204)](',\x20')+'.');_0x1dcc81[_0x6e2a43(0x23a)]=_0x333334;}else{if(_0x9794bb===_0x6e2a43(0x1f2))throw notificationError(_0x6e2a43(0x237),'Create\x20JSON\x20requires\x20field\x20'+_0x6e2a43(0x1f0));}for(const [_0x4194ac,_0x40d85d]of[[_0x6e2a43(0x242),0x200],[_0x6e2a43(0x266),0x100]]){if(!hasOwn(_0x587e6a,_0x4194ac))continue;const _0x322db7=_0x587e6a[_0x4194ac];if(_0x322db7!==null&&typeof _0x322db7!==_0x6e2a43(0x21d))throw invalidFieldType(_0x4194ac,_0x6e2a43(0x217));if(typeof _0x322db7==='string'&&_0x322db7[_0x6e2a43(0x247)]>_0x40d85d)throw notificationError(_0x6e2a43(0x1e7),'Notification\x20JSON\x20field\x20\x22'+_0x4194ac+_0x6e2a43(0x255)+_0x40d85d+'\x20characters.');_0x1dcc81[_0x4194ac]=_0x322db7;}if(hasOwn(_0x587e6a,_0x6e2a43(0x215))){const _0x223001=_0x587e6a[_0x6e2a43(0x215)];if(_0x223001===null&&_0x9794bb==='create')throw invalidFieldType(_0x6e2a43(0x215),_0x6e2a43(0x244));if(_0x223001!==null&&!isJsonObject(_0x223001))throw invalidFieldType(_0x6e2a43(0x215),_0x9794bb==='update'?_0x6e2a43(0x245):'a\x20JSON\x20object');_0x223001!==null&&validateChannelConfigFields(_0x1dcc81[_0x6e2a43(0x23a)],_0x223001),_0x1dcc81[_0x6e2a43(0x215)]=_0x223001;}for(const _0x31ffbe of['connectTimeout',_0x6e2a43(0x1fd)]){if(!hasOwn(_0x587e6a,_0x31ffbe))continue;const _0x4b7927=_0x587e6a[_0x31ffbe];if(_0x4b7927!==null&&(!Number[_0x6e2a43(0x24a)](_0x4b7927)||_0x4b7927<0x0))throw notificationError('notification_config_field_invalid',_0x6e2a43(0x25f)+_0x31ffbe+_0x6e2a43(0x21b));_0x1dcc81[_0x31ffbe]=_0x4b7927;}return _0x1dcc81;}function validateRequiredString(_0x2d2d7e,_0x248219,_0x472a75){const _0x433527=a141_0x274552;if(typeof _0x2d2d7e!==_0x433527(0x21d))throw invalidFieldType(_0x248219,'a\x20non-empty\x20string');const _0x501d26=_0x2d2d7e[_0x433527(0x220)]();if(!_0x501d26)throw notificationError(_0x433527(0x1e7),'Notification\x20JSON\x20field\x20\x22'+_0x248219+_0x433527(0x222));if(_0x501d26[_0x433527(0x247)]>_0x472a75)throw notificationError('notification_config_field_invalid',_0x433527(0x25f)+_0x248219+_0x433527(0x255)+_0x472a75+_0x433527(0x265));return _0x501d26;}function validateChannelConfigFields(_0x10a2df,_0x4e174a){const _0x332080=a141_0x274552;if(hasOwn(_0x4e174a,_0x332080(0x207)))throw forbiddenChannelConfigField(_0x332080(0x207));if(_0x10a2df==='EMAIL')for(const _0xa1495e of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x4e174a,_0xa1495e))throw forbiddenChannelConfigField(_0xa1495e);}}function forbiddenChannelConfigField(_0x5322f7){const _0x1210e5=a141_0x274552;return notificationError(_0x1210e5(0x211),_0x1210e5(0x1ee)+_0x5322f7+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x4827f4,_0x20c143){const _0x528a35=a141_0x274552;return notificationError(_0x528a35(0x1e7),_0x528a35(0x25f)+_0x4827f4+_0x528a35(0x231)+_0x20c143+'.');}function serializeChannelConfig(_0x5734af){const _0x5bcaac=a141_0x274552;return _0x5734af===null||_0x5734af===undefined?null:JSON[_0x5bcaac(0x25e)](_0x5734af);}function redactSensitive(_0x471bae){const _0x503668=a141_0x274552;return _0x471bae===null||_0x471bae===undefined||_0x471bae===''?null:_0x503668(0x228);}function requireResponseString(_0x19833a,_0x57dc8d,_0x357974){const _0x3b8021=a141_0x274552;if(typeof _0x19833a!==_0x3b8021(0x21d)||_0x19833a[_0x3b8021(0x220)]()==='')throw CliErrors['apiError'](_0x3b8021(0x252),_0x3b8021(0x259)+(_0x357974+0x1)+_0x3b8021(0x216)+_0x57dc8d+'\x22.');return _0x19833a[_0x3b8021(0x220)]();}function requireExactString(_0x5d40fa,_0x565054,_0x1cac90){const _0x1a9573=a141_0x274552;if(typeof _0x5d40fa!=='string'||_0x5d40fa[_0x1a9573(0x220)]()==='')throw notificationError(_0x1a9573(0x226),_0x1a9573(0x205)+_0x1cac90+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x565054+'\x22.');return _0x5d40fa[_0x1a9573(0x220)]();}function responseNullableString(_0x33faee,_0x304e13,_0x260183){const _0x55cfc3=a141_0x274552;if(_0x33faee===undefined||_0x33faee===null)return null;if(typeof _0x33faee!==_0x55cfc3(0x21d))throw notificationError(_0x55cfc3(0x226),'Notification\x20config\x20'+_0x260183+_0x55cfc3(0x232)+_0x304e13+'\x22.');return _0x33faee;}function a141_0x20d3(){const _0xde3274=['notification_config_id_invalid','notification_config_','notification_config_update_empty','Notification\x20JSON\x20channelConfig\x20field\x20\x22','call','\x22channelType\x22.','every','create','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','a\x20supported\x20string','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','appCode','Missing\x20notification\x20JSON\x20source.','file','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','notification_config_field_forbidden','notification_config_confirmation_required','notification_config_json_invalid','readTimeout','Unknown\x20notification\x20JSON\x20field\x20\x22','prototype','boolean','96CFrGDQ','Notification\x20config\x20list\x20item\x20','1747230JNytKq','join','Notification\x20config\x20','number','messageTemplate','replyTo','Notification\x20JSON\x20from\x20','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_field_unknown','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','28698iPFUFU','EMAIL','configCode','preflight','notification_config_channel_field_forbidden','path','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','fromName','channelConfig','\x20is\x20missing\x20required\x20field\x20\x22','a\x20string\x20or\x20null','DINGTALK','ccList','emailTargets','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','string','9LjwjDo','has','trim','\x20is\x20invalid.','\x22\x20must\x20be\x20a\x20non-empty\x20string.','channelCode','keys','7532fPoavZ','notification_config_response_invalid','Application-level\x20notification\x20config\x20ID','<redacted>','\x20has\x20an\x20unsupported\x20channelType.','WEBHOOK','channelConfigRaw','866045tqlJQW','env','str','kind','54110yoNKtv','\x22\x20must\x20be\x20','\x20has\x20invalid\x20field\x20\x22','name','\x22configName\x22.','subjectPrefix','failed','notification_config_field_required','file\x20','10TNdIxV','channelType','notification_config_source_unavailable','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','type','dry-run','rabetbase\x20notification\x20config-list\x20--appcode\x20','environment\x20variable\x20','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','endpointUrl','configName','a\x20JSON\x20object','a\x20JSON\x20object\x20or\x20null','endpointUrl:null','length','endpointUrlRaw','1238560ChcGnV','isSafeInteger','yes','bool','stdin','object','\x20has\x20an\x20invalid\x20channelType.','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Invalid\x20notification\x20config\x20response.','createTime','push','\x22\x20cannot\x20exceed\x20','connectTimeout','\x20--type\x20','318RIOEnw','Item\x20','num','Create\x20JSON\x20requires\x20field\x20','\x20must\x20be\x20an\x20object.','setEncoding','stringify','Notification\x20JSON\x20field\x20\x22','isArray','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','includes','Invalid\x20--','from-env','\x20characters.','description','5822267epRpQf','recipients','Allowed\x20values:\x20','_unavailable','utf8','notification_config_field_invalid','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','validation','entries'];a141_0x20d3=function(){return _0xde3274;};return a141_0x20d3();}function responseNullableTimeout(_0x397c4d,_0x51aeaa,_0x285a2f){const _0x1e185c=a141_0x274552;if(_0x397c4d===undefined||_0x397c4d===null)return null;if(!Number['isSafeInteger'](_0x397c4d)||_0x397c4d<0x0)throw notificationError(_0x1e185c(0x226),_0x1e185c(0x205)+_0x285a2f+_0x1e185c(0x232)+_0x51aeaa+'\x22.');return _0x397c4d;}function normalizeNullableString(_0x3c24d5){const _0x1ab84e=a141_0x274552;return typeof _0x3c24d5===_0x1ab84e(0x21d)?_0x3c24d5:null;}function isJsonObject(_0x405c87){const _0x105826=a141_0x274552;return _0x405c87!==null&&typeof _0x405c87===_0x105826(0x24e)&&!Array[_0x105826(0x260)](_0x405c87);}function hasOwn(_0x38fa28,_0x217549){const _0x30a421=a141_0x274552;return Object[_0x30a421(0x1ff)]['hasOwnProperty'][_0x30a421(0x1ef)](_0x38fa28,_0x217549);}async function readStdin(){const _0x1a2ce5=a141_0x274552;let _0x406b2d='';process['stdin'][_0x1a2ce5(0x25d)](_0x1a2ce5(0x26b));for await(const _0x3832ba of process[_0x1a2ce5(0x24d)])_0x406b2d+=_0x3832ba;return _0x406b2d;}
1
+ const a141_0x3f52d5=a141_0x4fa3;(function(_0x486db6,_0x56f907){const _0x3f733e=a141_0x4fa3,_0x5a0106=_0x486db6();while(!![]){try{const _0x210e77=-parseInt(_0x3f733e(0x229))/0x1+parseInt(_0x3f733e(0x24e))/0x2+parseInt(_0x3f733e(0x216))/0x3*(parseInt(_0x3f733e(0x22b))/0x4)+parseInt(_0x3f733e(0x25b))/0x5+-parseInt(_0x3f733e(0x254))/0x6+parseInt(_0x3f733e(0x24f))/0x7*(-parseInt(_0x3f733e(0x25e))/0x8)+parseInt(_0x3f733e(0x1f6))/0x9;if(_0x210e77===_0x56f907)break;else _0x5a0106['push'](_0x5a0106['shift']());}catch(_0x5ea669){_0x5a0106['push'](_0x5a0106['shift']());}}}(a141_0x145e,0x1d036));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',a141_0x3f52d5(0x257),a141_0x3f52d5(0x20c),'WECOM',a141_0x3f52d5(0x202)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a141_0x3f52d5(0x1ee),a141_0x3f52d5(0x20d),a141_0x3f52d5(0x239),a141_0x3f52d5(0x25d),'description',a141_0x3f52d5(0x248),a141_0x3f52d5(0x219)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a141_0x3f52d5(0x251),a141_0x3f52d5(0x25c)]),EMAIL_RECIPIENT_FIELDS=new Set(['emailTargets','recipients',a141_0x3f52d5(0x203),a141_0x3f52d5(0x201),a141_0x3f52d5(0x237),a141_0x3f52d5(0x22c),a141_0x3f52d5(0x255),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a141_0x3f52d5(0x259),'type':a141_0x3f52d5(0x245),'required':![],'description':a141_0x3f52d5(0x21a)},{'name':'stdin','type':a141_0x3f52d5(0x218),'required':![],'default':![],'description':a141_0x3f52d5(0x1e4)},{'name':a141_0x3f52d5(0x22a),'type':a141_0x3f52d5(0x245),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a141_0x3f52d5(0x209),'required':!![],'description':a141_0x3f52d5(0x223)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;function a141_0x145e(){const _0x42b3a6=['dry-run','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','672897MhuMvA','\x20has\x20an\x20invalid\x20channelType.','boolean','readTimeout','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','every','Notification\x20config\x20','yes','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x20has\x20invalid\x20field\x20\x22','\x20failed.','mutation','includes','Application-level\x20notification\x20config\x20ID','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','prototype','notification_config_channel_field_forbidden','hasOwnProperty','178982iWGvbk','from-env','4tQlYsE','subjectPrefix','bool','keys','\x22\x20cannot\x20exceed\x20','\x20must\x20be\x20an\x20object.','Notification\x20JSON\x20from\x20','a\x20JSON\x20object\x20or\x20null','utf8','isArray','\x22channelType\x22.','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','replyTo','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','endpointUrl','\x22\x20is\x20forbidden.','notification_config_confirmation_required','file\x20','appCode','Item\x20','endpointUrlRaw','isSafeInteger','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','endpointUrl:null','validation','preflight','string','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','notification_config_json_invalid','connectTimeout','messageTemplate','notification_config_id_invalid','notification_config_update_empty','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','_unavailable','356498hliAXT','14ktjguZ','channelConfigRaw','configCode','some','Notification\x20JSON\x20source\x20is\x20ambiguous.','1187988TuGMbA','fromName','a\x20JSON\x20object','FEISHU','num','file','\x20is\x20missing\x20required\x20field\x20\x22','822990kXmECI','channelCode','channelConfig','798032sfGhXr','Unknown\x20notification\x20JSON\x20field\x20\x22','\x20characters.','create','a\x20non-empty\x20string','Notification\x20config\x20list\x20item\x20','notification_config_field_forbidden','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','notification_config_field_invalid','\x22configName\x22.','str','entries','EMAIL','push','env','failed','description','configName','notification_config_response_invalid','a\x20supported\x20string','Notification\x20JSON\x20field\x20\x22','stdin','notification_config_','kind','path','1153620qEOpuL','Create\x20JSON\x20requires\x20field\x20','\x22\x20must\x20be\x20','a\x20string\x20or\x20null','\x20--type\x20','setEncoding','name','trim','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','updateTime','bccList','WEBHOOK','ccList','update','environment\x20variable\x20','\x20has\x20an\x20unsupported\x20channelType.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','number','Allowed\x20values:\x20','notification_config_source_unavailable','DINGTALK','channelType','parse','\x22\x20must\x20be\x20a\x20non-empty\x20string.','createTime','length','has','join'];a141_0x145e=function(){return _0x42b3a6;};return a141_0x145e();}function a141_0x4fa3(_0x4a3794,_0x4c2a28){_0x4a3794=_0x4a3794-0x1e0;const _0x145eca=a141_0x145e();let _0x4fa35c=_0x145eca[_0x4a3794];return _0x4fa35c;}export function notificationError(_0x593951,_0x2bb944,_0x4871ac){return new CliError(_0x593951,0x1,_0x2bb944,_0x4871ac);}export function readNotificationId(_0x3d4f79){const _0x56b908=a141_0x3f52d5,_0x4a3149=_0x3d4f79[_0x56b908(0x258)]('id');if(!Number[_0x56b908(0x240)](_0x4a3149)||_0x4a3149<=0x0)throw notificationError(_0x56b908(0x24a),_0x56b908(0x241));return _0x4a3149;}export function requireNotificationExplicitYes(_0x2bdc7c){const _0x1a4866=a141_0x3f52d5;if(_0x2bdc7c[_0x1a4866(0x22d)](_0x1a4866(0x214))||_0x2bdc7c[_0x1a4866(0x22d)](_0x1a4866(0x21d)))return;throw notificationError(_0x1a4866(0x23b),_0x1a4866(0x24c),_0x1a4866(0x215));}export function readNotificationChannelType(_0x5a7a72,_0x4f2718='type',_0xd7467a=a141_0x3f52d5(0x1e9)){const _0x12e9d7=a141_0x3f52d5,_0x556172=_0x5a7a72['str'](_0x4f2718)[_0x12e9d7(0x1fd)]()||_0xd7467a;if(!NOTIFICATION_CHANNEL_TYPES[_0x12e9d7(0x222)](_0x556172))throw CliErrors[_0x12e9d7(0x243)]('Invalid\x20--'+_0x4f2718+':\x20'+_0x556172,_0x12e9d7(0x20a)+NOTIFICATION_CHANNEL_TYPES[_0x12e9d7(0x213)](',\x20')+'.');return _0x556172;}export function assertSingleNotificationSource(_0x3f372d){const _0x7536f=a141_0x3f52d5,_0x22251f=[],_0x43307b=_0x3f372d[_0x7536f(0x1e7)]('file')[_0x7536f(0x1fd)]();if(_0x43307b)_0x22251f[_0x7536f(0x1ea)]({'kind':'file','path':_0x43307b});if(_0x3f372d[_0x7536f(0x22d)](_0x7536f(0x1f2)))_0x22251f[_0x7536f(0x1ea)]({'kind':_0x7536f(0x1f2)});const _0xd3392f=_0x3f372d[_0x7536f(0x1e7)]('from-env')[_0x7536f(0x1fd)]();if(_0xd3392f)_0x22251f[_0x7536f(0x1ea)]({'kind':'env','name':_0xd3392f});if(_0x22251f['length']===0x0)throw CliErrors[_0x7536f(0x243)]('Missing\x20notification\x20JSON\x20source.',_0x7536f(0x1fe));if(_0x22251f[_0x7536f(0x211)]>0x1)throw CliErrors[_0x7536f(0x243)](_0x7536f(0x253),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0x22251f[0x0];}export async function readNotificationDocument(_0x398a49,_0x513968){const _0x581e3e=a141_0x3f52d5,_0x3de9e1=assertSingleNotificationSource(_0x398a49),_0x5c69a4=_0x3de9e1['kind']===_0x581e3e(0x259)?_0x581e3e(0x23c)+_0x3de9e1[_0x581e3e(0x1f5)]:_0x3de9e1[_0x581e3e(0x1f4)]==='env'?_0x581e3e(0x205)+_0x3de9e1['name']:_0x581e3e(0x1f2);let _0x3abd94;try{if(_0x3de9e1[_0x581e3e(0x1f4)]===_0x581e3e(0x259))_0x3abd94=await readFile(_0x3de9e1[_0x581e3e(0x1f5)],_0x581e3e(0x233));else{if(_0x3de9e1[_0x581e3e(0x1f4)]===_0x581e3e(0x1eb)){if(!(_0x3de9e1[_0x581e3e(0x1fc)]in process.env))throw notificationError('notification_config_source_unavailable',_0x581e3e(0x238)+_0x3de9e1[_0x581e3e(0x1fc)]);_0x3abd94=process.env[_0x3de9e1.name]??'';}else _0x3abd94=await readStdin();}}catch(_0x56a276){if(_0x56a276 instanceof CliError)throw _0x56a276;throw notificationError(_0x581e3e(0x20b),_0x581e3e(0x21e)+_0x5c69a4+'.');}let _0xff9282;try{_0xff9282=JSON[_0x581e3e(0x20e)](_0x3abd94);}catch{throw notificationError(_0x581e3e(0x247),_0x581e3e(0x231)+_0x5c69a4+'\x20is\x20invalid.',_0x581e3e(0x246));}if(!isJsonObject(_0xff9282))throw notificationError(_0x581e3e(0x247),_0x581e3e(0x231)+_0x5c69a4+_0x581e3e(0x230));return validateNotificationDocument(_0xff9282,_0x513968);}export function projectNotificationListConfig(_0x598670,_0xf0903a){const _0x4f930c=a141_0x3f52d5;return{'id':typeof _0x598670['id']===_0x4f930c(0x209)?_0x598670['id']:null,'configCode':requireResponseString(_0x598670[_0x4f930c(0x251)],_0x4f930c(0x251),_0xf0903a),'configName':requireResponseString(_0x598670[_0x4f930c(0x1ee)],'configName',_0xf0903a),'channelType':requireResponseString(_0x598670[_0x4f930c(0x20d)],'channelType',_0xf0903a),'description':normalizeNullableString(_0x598670['description']),'createTime':normalizeNullableString(_0x598670[_0x4f930c(0x210)]),'updateTime':normalizeNullableString(_0x598670[_0x4f930c(0x200)])};}export function normalizeExactNotificationConfig(_0x25c707,_0x488434,_0x3acaaa){const _0x22e577=a141_0x3f52d5;if(!Number[_0x22e577(0x240)](_0x25c707['id'])||_0x25c707['id']!==_0x488434)throw notificationError(_0x22e577(0x1ef),_0x22e577(0x225)+_0x488434+'.');if(_0x25c707['appCode']!==_0x3acaaa)throw notificationError(_0x22e577(0x1ef),_0x22e577(0x21c)+_0x488434+_0x22e577(0x208));const _0x34558c=requireExactString(_0x25c707['configName'],_0x22e577(0x1ee),_0x488434),_0x5e89ae=requireExactString(_0x25c707[_0x22e577(0x251)],_0x22e577(0x251),_0x488434),_0xf20f1e=requireExactString(_0x25c707[_0x22e577(0x20d)],_0x22e577(0x20d),_0x488434);if(!NOTIFICATION_CHANNEL_TYPES[_0x22e577(0x222)](_0xf20f1e))throw notificationError(_0x22e577(0x1ef),_0x22e577(0x21c)+_0x488434+_0x22e577(0x206));const _0x49c75b=responseNullableString(_0x25c707['endpointUrl'],_0x22e577(0x239),_0x488434),_0x4928f1=responseNullableString(_0x25c707[_0x22e577(0x25d)],_0x22e577(0x25d),_0x488434),_0x296e18=responseNullableString(_0x25c707[_0x22e577(0x1ed)],'description',_0x488434),_0x25de23=responseNullableTimeout(_0x25c707['connectTimeout'],_0x22e577(0x248),_0x488434),_0x431d50=responseNullableTimeout(_0x25c707[_0x22e577(0x219)],'readTimeout',_0x488434);return{'id':_0x488434,'appCode':_0x3acaaa,'configCode':_0x5e89ae,'configName':_0x34558c,'channelType':_0xf20f1e,'endpointUrl':redactSensitive(_0x49c75b),'channelConfig':redactSensitive(_0x4928f1),'description':_0x296e18,'connectTimeout':_0x25de23,'readTimeout':_0x431d50,'endpointUrlRaw':_0x49c75b,'channelConfigRaw':_0x4928f1};}export async function requireExactNotificationConfig(_0x234e16,_0xf590ce,_0x39e2b8){const _0x51be16=a141_0x3f52d5;let _0x18cb24;try{_0x18cb24=await getNotificationChannelConfig(_0xf590ce,_0x234e16);}catch{throw safeApiFailure(_0x39e2b8,_0x51be16(0x244),_0x51be16(0x236)+_0x234e16+_0x51be16(0x207));}return normalizeExactNotificationConfig(_0x18cb24,_0xf590ce,_0x234e16);}export function projectNotificationConfig(_0xff3e2){const _0x353de4=a141_0x3f52d5;return{'id':_0xff3e2['id']??null,'appCode':_0xff3e2[_0x353de4(0x23d)],'configCode':_0xff3e2[_0x353de4(0x251)]??null,'configName':_0xff3e2[_0x353de4(0x1ee)],'channelType':_0xff3e2[_0x353de4(0x20d)],'endpointUrl':redactSensitive(_0xff3e2['endpointUrl']),'channelConfig':redactSensitive(_0xff3e2[_0x353de4(0x25d)]),'description':_0xff3e2['description']??null,'connectTimeout':_0xff3e2['connectTimeout']??null,'readTimeout':_0xff3e2[_0x353de4(0x219)]??null};}export function notificationSelector(_0x4b7c41){const _0x3cff3f=a141_0x3f52d5;return{'appCode':_0x4b7c41[_0x3cff3f(0x23d)],'id':_0x4b7c41['id'],'configCode':_0x4b7c41['configCode'],'configName':_0x4b7c41[_0x3cff3f(0x1ee)],'channelType':_0x4b7c41[_0x3cff3f(0x20d)]};}export function createMutationInput(_0x222b93,_0x29c69f){const _0xe35129=a141_0x3f52d5;return{'appCode':_0x222b93,'configName':_0x29c69f[_0xe35129(0x1ee)],'channelType':_0x29c69f[_0xe35129(0x20d)],...hasOwn(_0x29c69f,_0xe35129(0x239))?{'endpointUrl':_0x29c69f['endpointUrl']}:{},...hasOwn(_0x29c69f,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x29c69f[_0xe35129(0x25d)])}:{},...hasOwn(_0x29c69f,_0xe35129(0x1ed))?{'description':_0x29c69f[_0xe35129(0x1ed)]}:{},...hasOwn(_0x29c69f,_0xe35129(0x248))?{'connectTimeout':_0x29c69f[_0xe35129(0x248)]}:{},...hasOwn(_0x29c69f,_0xe35129(0x219))?{'readTimeout':_0x29c69f[_0xe35129(0x219)]}:{}};}export function mergeUpdateInput(_0x48fab2,_0x44a4be){const _0x1826bd=a141_0x3f52d5;return{'id':_0x48fab2['id'],'appCode':_0x48fab2[_0x1826bd(0x23d)],'configName':_0x44a4be[_0x1826bd(0x1ee)]??_0x48fab2['configName'],'channelType':_0x44a4be['channelType']??_0x48fab2[_0x1826bd(0x20d)],'endpointUrl':hasOwn(_0x44a4be,'endpointUrl')?_0x44a4be[_0x1826bd(0x239)]:_0x48fab2[_0x1826bd(0x23f)],'channelConfig':hasOwn(_0x44a4be,_0x1826bd(0x25d))?serializeChannelConfig(_0x44a4be[_0x1826bd(0x25d)]):_0x48fab2[_0x1826bd(0x250)],'description':hasOwn(_0x44a4be,_0x1826bd(0x1ed))?_0x44a4be[_0x1826bd(0x1ed)]:_0x48fab2['description'],'connectTimeout':hasOwn(_0x44a4be,'connectTimeout')?_0x44a4be[_0x1826bd(0x248)]:_0x48fab2[_0x1826bd(0x248)],'readTimeout':hasOwn(_0x44a4be,_0x1826bd(0x219))?_0x44a4be['readTimeout']:_0x48fab2['readTimeout']};}export function plannedUpdateProjection(_0x16793a,_0x2ed580){const _0x5f1e96=a141_0x3f52d5;return projectNotificationConfig({'id':_0x16793a['id'],'appCode':_0x16793a['appCode'],'configCode':_0x16793a[_0x5f1e96(0x251)],'configName':_0x2ed580[_0x5f1e96(0x1ee)]??_0x16793a[_0x5f1e96(0x1ee)],'channelType':_0x2ed580['channelType']??_0x16793a[_0x5f1e96(0x20d)],'endpointUrl':hasOwn(_0x2ed580,_0x5f1e96(0x239))?_0x2ed580[_0x5f1e96(0x239)]:_0x16793a[_0x5f1e96(0x23f)],'channelConfig':hasOwn(_0x2ed580,_0x5f1e96(0x25d))?_0x2ed580[_0x5f1e96(0x25d)]:_0x16793a[_0x5f1e96(0x250)],'description':hasOwn(_0x2ed580,_0x5f1e96(0x1ed))?_0x2ed580[_0x5f1e96(0x1ed)]:_0x16793a[_0x5f1e96(0x1ed)],'connectTimeout':hasOwn(_0x2ed580,_0x5f1e96(0x248))?_0x2ed580[_0x5f1e96(0x248)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x16793a[_0x5f1e96(0x248)],'readTimeout':hasOwn(_0x2ed580,_0x5f1e96(0x219))?_0x2ed580['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x16793a[_0x5f1e96(0x219)]});}export function requestedSafeFieldsMatch(_0x227c5d,_0x4e7296,_0x2973db){const _0x52f0ce=a141_0x3f52d5,_0x3d8593=[],_0x44787c=[],_0x322b88=[];for(const _0x4ad0ec of[_0x52f0ce(0x1ee),'channelType',_0x52f0ce(0x1ed)]){if(!hasOwn(_0x2973db,_0x4ad0ec))continue;_0x322b88['push'](_0x4ad0ec),_0x3d8593[_0x52f0ce(0x1ea)](_0x4e7296[_0x4ad0ec]===_0x2973db[_0x4ad0ec]),_0x44787c[_0x52f0ce(0x1ea)](_0x227c5d[_0x4ad0ec]!==_0x2973db[_0x4ad0ec]&&_0x4e7296[_0x4ad0ec]===_0x2973db[_0x4ad0ec]);}for(const _0x415807 of[_0x52f0ce(0x248),'readTimeout']){if(!hasOwn(_0x2973db,_0x415807))continue;const _0x28e346=_0x2973db[_0x415807]??(_0x415807==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x322b88[_0x52f0ce(0x1ea)](_0x415807),_0x3d8593[_0x52f0ce(0x1ea)](_0x4e7296[_0x415807]===_0x28e346),_0x44787c[_0x52f0ce(0x1ea)](_0x227c5d[_0x415807]!==_0x28e346&&_0x4e7296[_0x415807]===_0x28e346);}return hasOwn(_0x2973db,_0x52f0ce(0x239))&&_0x2973db[_0x52f0ce(0x239)]===null&&(_0x322b88[_0x52f0ce(0x1ea)](_0x52f0ce(0x242)),_0x3d8593['push'](_0x4e7296[_0x52f0ce(0x23f)]===null||_0x4e7296[_0x52f0ce(0x23f)]===''),_0x44787c['push'](_0x227c5d[_0x52f0ce(0x23f)]!==null&&_0x227c5d[_0x52f0ce(0x23f)]!==''&&(_0x4e7296[_0x52f0ce(0x23f)]===null||_0x4e7296['endpointUrlRaw']===''))),{'allMatch':_0x3d8593[_0x52f0ce(0x21b)](Boolean),'provesChange':_0x44787c[_0x52f0ce(0x252)](Boolean),'verifiedFields':_0x322b88};}export function validateNotificationDeleteReadback(_0x36071d,_0x59ce20,_0x313533){const _0x257a0f=a141_0x3f52d5;for(const [_0x434969,_0x3b8465]of _0x36071d[_0x257a0f(0x1e8)]()){if(!Number['isSafeInteger'](_0x3b8465['id'])||_0x3b8465['id']<=0x0)throw notificationError(_0x257a0f(0x1ef),_0x257a0f(0x1e2)+(_0x434969+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x3b8465['appCode']!==_0x59ce20)throw notificationError(_0x257a0f(0x1ef),_0x257a0f(0x1e2)+(_0x434969+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x3b8465[_0x257a0f(0x20d)]!==_0x313533)throw notificationError('notification_config_response_invalid',_0x257a0f(0x1e2)+(_0x434969+0x1)+_0x257a0f(0x217));}}export function safeApiFailure(_0x1994f3,_0x3d0414,_0x2fdd62){const _0x1a59bb=a141_0x3f52d5;return notificationError(_0x1a59bb(0x1f3)+_0x1994f3+'_'+(_0x3d0414===_0x1a59bb(0x221)?_0x1a59bb(0x1ec):_0x3d0414+_0x1a59bb(0x24d)),_0x1a59bb(0x21c)+_0x1994f3+'\x20'+_0x3d0414+_0x1a59bb(0x220),_0x2fdd62);}export function notificationLookupCommand(_0x189fa6,_0x40458a){const _0x316318=a141_0x3f52d5;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x189fa6+_0x316318(0x1fa)+_0x40458a+'\x20--format\x20compress';}function validateNotificationDocument(_0x6fcc0f,_0x10d663){const _0x93e8ad=a141_0x3f52d5;for(const _0x323054 of Object[_0x93e8ad(0x22e)](_0x6fcc0f)){if(FORBIDDEN_IDENTITY_FIELDS[_0x93e8ad(0x212)](_0x323054))throw notificationError(_0x93e8ad(0x1e3),_0x93e8ad(0x1f1)+_0x323054+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x93e8ad(0x212)](_0x323054))throw notificationError('notification_config_field_unknown',_0x93e8ad(0x25f)+_0x323054+'\x22.');}if(_0x10d663===_0x93e8ad(0x204)&&Object[_0x93e8ad(0x22e)](_0x6fcc0f)[_0x93e8ad(0x211)]===0x0)throw notificationError(_0x93e8ad(0x24b),_0x93e8ad(0x224));const _0x3d2bb6={};if(hasOwn(_0x6fcc0f,_0x93e8ad(0x1ee)))_0x3d2bb6[_0x93e8ad(0x1ee)]=validateRequiredString(_0x6fcc0f[_0x93e8ad(0x1ee)],_0x93e8ad(0x1ee),0x80);else{if(_0x10d663===_0x93e8ad(0x1e0))throw notificationError('notification_config_field_required',_0x93e8ad(0x1f7)+_0x93e8ad(0x1e6));}if(hasOwn(_0x6fcc0f,'channelType')){if(typeof _0x6fcc0f[_0x93e8ad(0x20d)]!=='string')throw invalidFieldType(_0x93e8ad(0x20d),_0x93e8ad(0x1f0));const _0x2b4ce5=_0x6fcc0f[_0x93e8ad(0x20d)][_0x93e8ad(0x1fd)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x2b4ce5))throw notificationError(_0x93e8ad(0x1e5),_0x93e8ad(0x1ff),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x3d2bb6[_0x93e8ad(0x20d)]=_0x2b4ce5;}else{if(_0x10d663===_0x93e8ad(0x1e0))throw notificationError('notification_config_field_required',_0x93e8ad(0x1f7)+_0x93e8ad(0x235));}for(const [_0x1d0b6b,_0x396087]of[[_0x93e8ad(0x239),0x200],[_0x93e8ad(0x1ed),0x100]]){if(!hasOwn(_0x6fcc0f,_0x1d0b6b))continue;const _0x1d0f4d=_0x6fcc0f[_0x1d0b6b];if(_0x1d0f4d!==null&&typeof _0x1d0f4d!==_0x93e8ad(0x245))throw invalidFieldType(_0x1d0b6b,_0x93e8ad(0x1f9));if(typeof _0x1d0f4d===_0x93e8ad(0x245)&&_0x1d0f4d[_0x93e8ad(0x211)]>_0x396087)throw notificationError(_0x93e8ad(0x1e5),_0x93e8ad(0x1f1)+_0x1d0b6b+_0x93e8ad(0x22f)+_0x396087+'\x20characters.');_0x3d2bb6[_0x1d0b6b]=_0x1d0f4d;}if(hasOwn(_0x6fcc0f,'channelConfig')){const _0x4ded85=_0x6fcc0f[_0x93e8ad(0x25d)];if(_0x4ded85===null&&_0x10d663==='create')throw invalidFieldType('channelConfig','a\x20JSON\x20object');if(_0x4ded85!==null&&!isJsonObject(_0x4ded85))throw invalidFieldType(_0x93e8ad(0x25d),_0x10d663==='update'?_0x93e8ad(0x232):_0x93e8ad(0x256));_0x4ded85!==null&&validateChannelConfigFields(_0x3d2bb6[_0x93e8ad(0x20d)],_0x4ded85),_0x3d2bb6[_0x93e8ad(0x25d)]=_0x4ded85;}for(const _0x4edadc of[_0x93e8ad(0x248),_0x93e8ad(0x219)]){if(!hasOwn(_0x6fcc0f,_0x4edadc))continue;const _0x35f6ee=_0x6fcc0f[_0x4edadc];if(_0x35f6ee!==null&&(!Number[_0x93e8ad(0x240)](_0x35f6ee)||_0x35f6ee<0x0))throw notificationError(_0x93e8ad(0x1e5),_0x93e8ad(0x1f1)+_0x4edadc+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x3d2bb6[_0x4edadc]=_0x35f6ee;}return _0x3d2bb6;}function validateRequiredString(_0x173855,_0x55799b,_0x42c798){const _0x190c89=a141_0x3f52d5;if(typeof _0x173855!==_0x190c89(0x245))throw invalidFieldType(_0x55799b,_0x190c89(0x1e1));const _0xa96bd2=_0x173855[_0x190c89(0x1fd)]();if(!_0xa96bd2)throw notificationError(_0x190c89(0x1e5),_0x190c89(0x1f1)+_0x55799b+_0x190c89(0x20f));if(_0xa96bd2[_0x190c89(0x211)]>_0x42c798)throw notificationError(_0x190c89(0x1e5),'Notification\x20JSON\x20field\x20\x22'+_0x55799b+_0x190c89(0x22f)+_0x42c798+_0x190c89(0x260));return _0xa96bd2;}function validateChannelConfigFields(_0x489f04,_0x4ab034){const _0x900f97=a141_0x3f52d5;if(hasOwn(_0x4ab034,_0x900f97(0x249)))throw forbiddenChannelConfigField(_0x900f97(0x249));if(_0x489f04===_0x900f97(0x1e9))for(const _0x2f1879 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x4ab034,_0x2f1879))throw forbiddenChannelConfigField(_0x2f1879);}}function forbiddenChannelConfigField(_0x1a34ab){const _0x10a731=a141_0x3f52d5;return notificationError(_0x10a731(0x227),'Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x1a34ab+_0x10a731(0x23a));}function invalidFieldType(_0x4e6144,_0x1de7d6){const _0x249295=a141_0x3f52d5;return notificationError('notification_config_field_invalid',_0x249295(0x1f1)+_0x4e6144+_0x249295(0x1f8)+_0x1de7d6+'.');}function serializeChannelConfig(_0x12cb63){return _0x12cb63===null||_0x12cb63===undefined?null:JSON['stringify'](_0x12cb63);}function redactSensitive(_0x1408ff){return _0x1408ff===null||_0x1408ff===undefined||_0x1408ff===''?null:'<redacted>';}function requireResponseString(_0x182da4,_0x11a49f,_0x1a7381){const _0x4a62af=a141_0x3f52d5;if(typeof _0x182da4!==_0x4a62af(0x245)||_0x182da4[_0x4a62af(0x1fd)]()==='')throw CliErrors['apiError']('Invalid\x20notification\x20config\x20response.',_0x4a62af(0x23e)+(_0x1a7381+0x1)+_0x4a62af(0x25a)+_0x11a49f+'\x22.');return _0x182da4[_0x4a62af(0x1fd)]();}function requireExactString(_0x334535,_0x165b79,_0x5e2fca){const _0x4dff6a=a141_0x3f52d5;if(typeof _0x334535!==_0x4dff6a(0x245)||_0x334535['trim']()==='')throw notificationError(_0x4dff6a(0x1ef),'Notification\x20config\x20'+_0x5e2fca+_0x4dff6a(0x25a)+_0x165b79+'\x22.');return _0x334535[_0x4dff6a(0x1fd)]();}function responseNullableString(_0x498bf5,_0x1f2218,_0x382ec2){const _0x59ec6b=a141_0x3f52d5;if(_0x498bf5===undefined||_0x498bf5===null)return null;if(typeof _0x498bf5!==_0x59ec6b(0x245))throw notificationError(_0x59ec6b(0x1ef),_0x59ec6b(0x21c)+_0x382ec2+_0x59ec6b(0x21f)+_0x1f2218+'\x22.');return _0x498bf5;}function responseNullableTimeout(_0x1ae429,_0x16f0fa,_0x444b46){const _0xfb7ce4=a141_0x3f52d5;if(_0x1ae429===undefined||_0x1ae429===null)return null;if(!Number[_0xfb7ce4(0x240)](_0x1ae429)||_0x1ae429<0x0)throw notificationError(_0xfb7ce4(0x1ef),_0xfb7ce4(0x21c)+_0x444b46+_0xfb7ce4(0x21f)+_0x16f0fa+'\x22.');return _0x1ae429;}function normalizeNullableString(_0x43a44b){return typeof _0x43a44b==='string'?_0x43a44b:null;}function isJsonObject(_0x6beec5){const _0x2d2da8=a141_0x3f52d5;return _0x6beec5!==null&&typeof _0x6beec5==='object'&&!Array[_0x2d2da8(0x234)](_0x6beec5);}function hasOwn(_0x1a00b1,_0x2d8078){const _0x415c57=a141_0x3f52d5;return Object[_0x415c57(0x226)][_0x415c57(0x228)]['call'](_0x1a00b1,_0x2d8078);}async function readStdin(){const _0x2b52f6=a141_0x3f52d5;let _0x562dc4='';process[_0x2b52f6(0x1f2)][_0x2b52f6(0x1fb)]('utf8');for await(const _0x373d45 of process['stdin'])_0x562dc4+=_0x373d45;return _0x562dc4;}
@@ -1 +1 @@
1
- const a142_0x6b1f56=a142_0x304f;(function(_0xb14028,_0x349a0b){const _0x158a2e=a142_0x304f,_0x13e2f0=_0xb14028();while(!![]){try{const _0x33a976=-parseInt(_0x158a2e(0x72))/0x1*(parseInt(_0x158a2e(0xa3))/0x2)+-parseInt(_0x158a2e(0x74))/0x3+parseInt(_0x158a2e(0x85))/0x4*(parseInt(_0x158a2e(0x7c))/0x5)+-parseInt(_0x158a2e(0x76))/0x6*(parseInt(_0x158a2e(0x70))/0x7)+-parseInt(_0x158a2e(0x9f))/0x8+-parseInt(_0x158a2e(0x6e))/0x9*(parseInt(_0x158a2e(0xa4))/0xa)+parseInt(_0x158a2e(0x8c))/0xb*(parseInt(_0x158a2e(0x98))/0xc);if(_0x33a976===_0x349a0b)break;else _0x13e2f0['push'](_0x13e2f0['shift']());}catch(_0x1a6ae4){_0x13e2f0['push'](_0x13e2f0['shift']());}}}(a142_0x3937,0x3f067));function a142_0x304f(_0x3aee1e,_0x312c53){_0x3aee1e=_0x3aee1e-0x6a;const _0x39370f=a142_0x3937();let _0x304fb0=_0x39370f[_0x3aee1e];return _0x304fb0;}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=[a142_0x6b1f56(0x75),'general',a142_0x6b1f56(0x77),a142_0x6b1f56(0x73)],SCENE_TO_LEGACY_TYPE={'invoice':a142_0x6b1f56(0x7d),'general':a142_0x6b1f56(0x7f),'form':a142_0x6b1f56(0x8d),'idCard':a142_0x6b1f56(0x7e)},SCENE_FLAG={'name':a142_0x6b1f56(0x7b),'type':a142_0x6b1f56(0x7a),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':a142_0x6b1f56(0x9a),'type':a142_0x6b1f56(0x7a),'description':'Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':'image-url','type':a142_0x6b1f56(0x7a),'description':a142_0x6b1f56(0x6a)};function normalizeScene(_0x500544){const _0x3d8cfc=a142_0x6b1f56,_0x3cedbb=_0x500544[_0x3d8cfc(0x99)]()['toLowerCase']();if(_0x3cedbb===_0x3d8cfc(0x8e))return _0x3d8cfc(0x73);if(_0x3cedbb===_0x3d8cfc(0x75)||_0x3cedbb===_0x3d8cfc(0xa0)||_0x3cedbb==='form')return _0x3cedbb;throw CliErrors[_0x3d8cfc(0x97)](_0x3d8cfc(0x9e)+_0x500544+_0x3d8cfc(0x91)+SUPPORTED_SCENES[_0x3d8cfc(0x83)](',\x20'));}function selectedInputs(_0x160688){const _0x1e72dd=a142_0x6b1f56,_0x1eabf6=_0x160688[_0x1e72dd(0x87)](_0x1e72dd(0x9a))[_0x1e72dd(0x99)](),_0xe055ec=_0x160688['str']('image-url')[_0x1e72dd(0x99)]();return{'imageFile':_0x1eabf6,'imageUrl':_0xe055ec,'count':[_0x1eabf6,_0xe055ec][_0x1e72dd(0x82)](Boolean)[_0x1e72dd(0xa1)]};}function validateInputSelection(_0x560e77){const _0x5422a7=a142_0x6b1f56,_0x206089=selectedInputs(_0x560e77);if(_0x206089[_0x5422a7(0x6c)]!==0x1)throw CliErrors[_0x5422a7(0x97)](_0x5422a7(0x9d));return _0x206089;}function withScene(_0xeceae4,_0x102016,_0x7a596f){const _0x46ad80=a142_0x6b1f56;return{..._0xeceae4,'scene':_0x102016,..._0x7a596f?{'sourceFile':{'fileName':_0x7a596f[_0x46ad80(0x8b)],'filePath':_0x7a596f[_0x46ad80(0x79)]}}:{}};}const ocrRecognize={'service':a142_0x6b1f56(0xa2),'command':a142_0x6b1f56(0x78),'description':a142_0x6b1f56(0x92),'risk':a142_0x6b1f56(0x9b),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x8c2961){const _0x24189e=a142_0x6b1f56,_0x5005d3=normalizeScene(_0x8c2961['str'](_0x24189e(0x7b))),_0x357a8f=SCENE_TO_LEGACY_TYPE[_0x5005d3],_0x7ec32f=validateInputSelection(_0x8c2961);if(_0x7ec32f['imageUrl']){const _0x9d5c06=new URLSearchParams({'url':_0x7ec32f['imageUrl'],'type':_0x357a8f,'appCode':_0x8c2961[_0x24189e(0x88)]});return{'method':_0x24189e(0x93),'url':_0x24189e(0x90)+_0x9d5c06['toString'](),'description':_0x24189e(0x96)+_0x5005d3+_0x24189e(0x95)};}const _0x2b8c22=requireDevelopmentUploadFile(_0x7ec32f[_0x24189e(0x8a)],_0x24189e(0x9a));return{'method':_0x24189e(0x71),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':'POST','url':'/smartapi/common/uploadFile','body':{'appCode':_0x8c2961[_0x24189e(0x88)],'multipart':{'file':_0x2b8c22}}},{'method':_0x24189e(0x71),'url':_0x24189e(0x8f),'body':{'filePath':_0x24189e(0x80),'downloadFlag':![]}},{'method':_0x24189e(0x93),'url':_0x24189e(0x86),'query':{'appCode':_0x8c2961[_0x24189e(0x88)],'url':_0x24189e(0x6f),'type':_0x357a8f}}]},'description':_0x24189e(0x89)+_0x5005d3+'\x20OCR'};},async 'execute'(_0x2efbc4){const _0xb67014=a142_0x6b1f56,_0x16e40c=normalizeScene(_0x2efbc4[_0xb67014(0x87)](_0xb67014(0x7b))),_0x5f4ce5=SCENE_TO_LEGACY_TYPE[_0x16e40c],_0x4cb32e=validateInputSelection(_0x2efbc4);if(_0x4cb32e[_0xb67014(0x9c)]){const _0x4d37c9=await recognizeDevelopmentOcr(_0x2efbc4['appCode'],{'url':_0x4cb32e[_0xb67014(0x9c)],'type':_0x5f4ce5});return{'ok':!![],'data':withScene(_0x4d37c9,_0x16e40c)};}const _0x450088=requireDevelopmentUploadFile(_0x4cb32e[_0xb67014(0x8a)],'image-file'),_0x1cab87=await uploadDevelopmentFile(_0x2efbc4['appCode'],_0x450088[_0xb67014(0x94)]);if(!_0x1cab87[_0xb67014(0x79)])throw CliErrors[_0xb67014(0x6b)](_0xb67014(0x6d));const _0xc33a5f=await queryDevelopmentFileUrl(_0x1cab87[_0xb67014(0x79)],{'download':![]});if(!_0xc33a5f['fileUrl'])throw CliErrors[_0xb67014(0x6b)](_0xb67014(0x84));const _0x157047=await recognizeDevelopmentOcr(_0x2efbc4['appCode'],{'url':_0xc33a5f[_0xb67014(0x81)],'type':_0x5f4ce5});return{'ok':!![],'data':withScene(_0x157047,_0x16e40c,_0x1cab87)};}};function a142_0x3937(){const _0x18a346=['3082328EQjgKd','general','length','ocr','48814dGwLlS','4635460sPHlbC','Publicly\x20accessible\x20image\x20or\x20file\x20URL','apiError','count','File\x20upload\x20response\x20missing\x20filePath.','9HpbrQI','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','96719vCyqLK','POST','5opqNlr','idCard','410346vAOSnf','invoice','168rPWKpM','form','recognize','filePath','string','scene','1440015COzFTU','Invoice','IdCard','General','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','fileUrl','filter','join','File\x20URL\x20response\x20missing\x20fileUrl.','4sEqeER','/smartapi/ocr/recognize-text','str','appCode','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','imageFile','fileName','99zQyhyz','Table','idcard','/smartapi/common/queryFileUrl','/smartapi/ocr/recognize-text?','.\x20Supported\x20scenes:\x20','使用研发态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','GET','path','\x20OCR\x20from\x20URL','Preview:\x20recognize\x20','validation','1952904CIMetV','trim','image-file','read','imageUrl','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','Unsupported\x20OCR\x20scene:\x20'];a142_0x3937=function(){return _0x18a346;};return a142_0x3937();}export const ocrDefinitions=[ocrRecognize];
1
+ const a142_0x1fb84c=a142_0x5b25;(function(_0x5ead76,_0x5dc2a9){const _0x1355d1=a142_0x5b25,_0x22401d=_0x5ead76();while(!![]){try{const _0x46da92=parseInt(_0x1355d1(0x1f9))/0x1+parseInt(_0x1355d1(0x205))/0x2+-parseInt(_0x1355d1(0x1ec))/0x3*(parseInt(_0x1355d1(0x1e7))/0x4)+parseInt(_0x1355d1(0x1e4))/0x5+-parseInt(_0x1355d1(0x1ea))/0x6+-parseInt(_0x1355d1(0x1f7))/0x7+-parseInt(_0x1355d1(0x1fa))/0x8;if(_0x46da92===_0x5dc2a9)break;else _0x22401d['push'](_0x22401d['shift']());}catch(_0x58736e){_0x22401d['push'](_0x22401d['shift']());}}}(a142_0x4375,0xb9496));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=['invoice','general','form',a142_0x1fb84c(0x1f5)],SCENE_TO_LEGACY_TYPE={'invoice':a142_0x1fb84c(0x1e9),'general':'General','form':a142_0x1fb84c(0x1e6),'idCard':'IdCard'},SCENE_FLAG={'name':a142_0x1fb84c(0x1e8),'type':a142_0x1fb84c(0x204),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a142_0x1fb84c(0x1fd)},IMAGE_FILE_FLAG={'name':a142_0x1fb84c(0x1db),'type':a142_0x1fb84c(0x204),'description':a142_0x1fb84c(0x1ed)},IMAGE_URL_FLAG={'name':a142_0x1fb84c(0x1ff),'type':a142_0x1fb84c(0x204),'description':a142_0x1fb84c(0x1f3)};function normalizeScene(_0x1e5c23){const _0x2cceb4=a142_0x1fb84c,_0x1cee33=_0x1e5c23['trim']()['toLowerCase']();if(_0x1cee33===_0x2cceb4(0x1e0))return _0x2cceb4(0x1f5);if(_0x1cee33===_0x2cceb4(0x1eb)||_0x1cee33==='general'||_0x1cee33===_0x2cceb4(0x1e3))return _0x1cee33;throw CliErrors['validation'](_0x2cceb4(0x1f0)+_0x1e5c23+_0x2cceb4(0x1f2)+SUPPORTED_SCENES[_0x2cceb4(0x1d7)](',\x20'));}function selectedInputs(_0x154f5e){const _0x3497e6=a142_0x1fb84c,_0x24147f=_0x154f5e[_0x3497e6(0x1dc)](_0x3497e6(0x1db))[_0x3497e6(0x1fb)](),_0x1e8be9=_0x154f5e[_0x3497e6(0x1dc)](_0x3497e6(0x1ff))[_0x3497e6(0x1fb)]();return{'imageFile':_0x24147f,'imageUrl':_0x1e8be9,'count':[_0x24147f,_0x1e8be9]['filter'](Boolean)['length']};}function a142_0x4375(){const _0x5eccef=['\x20OCR\x20from\x20URL','imageFile','Unsupported\x20OCR\x20scene:\x20','appCode','.\x20Supported\x20scenes:\x20','Publicly\x20accessible\x20image\x20or\x20file\x20URL','Preview:\x20recognize\x20','idCard','path','6377476DCadNU','File\x20URL\x20response\x20missing\x20fileUrl.','468850UWswgF','13312jIHRzR','trim','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','POST','image-url','\x20OCR','imageUrl','GET','fileUrl','string','2898372ZerkhC','join','filePath','recognize','/smartapi/common/uploadFile','image-file','str','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','read','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','idcard','toString','File\x20upload\x20response\x20missing\x20filePath.','form','7111205bONgTn','apiError','Table','4qMQQcd','scene','Invoice','2037228wJXrqM','invoice','3987219EZzpvY','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'];a142_0x4375=function(){return _0x5eccef;};return a142_0x4375();}function validateInputSelection(_0x33341f){const _0x37eeca=a142_0x1fb84c,_0x391994=selectedInputs(_0x33341f);if(_0x391994['count']!==0x1)throw CliErrors['validation'](_0x37eeca(0x1fc));return _0x391994;}function withScene(_0x5e7faf,_0x2709a0,_0x4b0fc9){return{..._0x5e7faf,'scene':_0x2709a0,..._0x4b0fc9?{'sourceFile':{'fileName':_0x4b0fc9['fileName'],'filePath':_0x4b0fc9['filePath']}}:{}};}const ocrRecognize={'service':'ocr','command':a142_0x1fb84c(0x1d9),'description':'提取票证类业务材料中的文字与结构化字段;不用于通用图片理解','risk':a142_0x1fb84c(0x1de),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x5d1488){const _0x49be07=a142_0x1fb84c,_0x571915=normalizeScene(_0x5d1488[_0x49be07(0x1dc)](_0x49be07(0x1e8))),_0x1e49b8=SCENE_TO_LEGACY_TYPE[_0x571915],_0x66983b=validateInputSelection(_0x5d1488);if(_0x66983b[_0x49be07(0x201)]){const _0xe811d9=new URLSearchParams({'url':_0x66983b[_0x49be07(0x201)],'type':_0x1e49b8,'appCode':_0x5d1488['appCode']});return{'method':_0x49be07(0x202),'url':'/smartapi/ocr/recognize-text?'+_0xe811d9[_0x49be07(0x1e1)](),'description':_0x49be07(0x1f4)+_0x571915+_0x49be07(0x1ee)};}const _0x26aeee=requireDevelopmentUploadFile(_0x66983b[_0x49be07(0x1ef)],_0x49be07(0x1db));return{'method':_0x49be07(0x1fe),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x49be07(0x1fe),'url':_0x49be07(0x1da),'body':{'appCode':_0x5d1488['appCode'],'multipart':{'file':_0x26aeee}}},{'method':_0x49be07(0x1fe),'url':'/smartapi/common/queryFileUrl','body':{'filePath':_0x49be07(0x1df),'downloadFlag':![]}},{'method':_0x49be07(0x202),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x5d1488[_0x49be07(0x1f1)],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x1e49b8}}]},'description':_0x49be07(0x1dd)+_0x571915+_0x49be07(0x200)};},async 'execute'(_0x5d60ef){const _0x2ca85c=a142_0x1fb84c,_0x16af21=normalizeScene(_0x5d60ef['str']('scene')),_0x4f8943=SCENE_TO_LEGACY_TYPE[_0x16af21],_0x3e5f4d=validateInputSelection(_0x5d60ef);if(_0x3e5f4d[_0x2ca85c(0x201)]){const _0x332666=await recognizeDevelopmentOcr(_0x5d60ef['appCode'],{'url':_0x3e5f4d['imageUrl'],'type':_0x4f8943});return{'ok':!![],'data':withScene(_0x332666,_0x16af21)};}const _0x5a5ed8=requireDevelopmentUploadFile(_0x3e5f4d[_0x2ca85c(0x1ef)],'image-file'),_0x3c346a=await uploadDevelopmentFile(_0x5d60ef['appCode'],_0x5a5ed8[_0x2ca85c(0x1f6)]);if(!_0x3c346a[_0x2ca85c(0x1d8)])throw CliErrors['apiError'](_0x2ca85c(0x1e2));const _0x4f32c9=await queryDevelopmentFileUrl(_0x3c346a[_0x2ca85c(0x1d8)],{'download':![]});if(!_0x4f32c9[_0x2ca85c(0x203)])throw CliErrors[_0x2ca85c(0x1e5)](_0x2ca85c(0x1f8));const _0x3e32c1=await recognizeDevelopmentOcr(_0x5d60ef[_0x2ca85c(0x1f1)],{'url':_0x4f32c9['fileUrl'],'type':_0x4f8943});return{'ok':!![],'data':withScene(_0x3e32c1,_0x16af21,_0x3c346a)};}};function a142_0x5b25(_0x4e8532,_0x1f3866){_0x4e8532=_0x4e8532-0x1d7;const _0x437592=a142_0x4375();let _0x5b2567=_0x437592[_0x4e8532];return _0x5b2567;}export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a143_0x8406e7=a143_0x9310;(function(_0x4e1dce,_0x2df879){const _0x3780b5=a143_0x9310,_0x5f0a7e=_0x4e1dce();while(!![]){try{const _0x529df0=-parseInt(_0x3780b5(0xec))/0x1*(-parseInt(_0x3780b5(0xc4))/0x2)+parseInt(_0x3780b5(0xc7))/0x3+parseInt(_0x3780b5(0xb9))/0x4+-parseInt(_0x3780b5(0xed))/0x5*(parseInt(_0x3780b5(0xf4))/0x6)+-parseInt(_0x3780b5(0xbb))/0x7*(parseInt(_0x3780b5(0xbd))/0x8)+parseInt(_0x3780b5(0xc2))/0x9*(parseInt(_0x3780b5(0xc0))/0xa)+parseInt(_0x3780b5(0xd1))/0xb;if(_0x529df0===_0x2df879)break;else _0x5f0a7e['push'](_0x5f0a7e['shift']());}catch(_0x5ec539){_0x5f0a7e['push'](_0x5f0a7e['shift']());}}}(a143_0x4225,0x5669a));import{APPCODE_FLAG}from'../../commands/common/flags.js';function a143_0x4225(){const _0x45a86b=['--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','name','langs','3691402uqLIhf','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','isInteger','parentMenuId','createMenu','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20complete\x20files','Application\x20language\x20settings\x20could\x20not\x20be\x20read;\x20default\x20Chinese\x20and\x20English\x20language\x20files\x20were\x20generated.','pageId','version','自定义页面_','isNaN','Would\x20create\x20Custom\x20Page\x20','page-content','page.create','zh-CN','now','string','number','en-US','parent-menu-id','write','str','pageName','Custom\x20Page\x20pattern\x20(currently\x20BLANK;\x20conflicts\x20with\x20--page-content)','warnings','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','\x20and\x20its\x20menu\x20entry.','238366PXOwrv','310quvuAS','CUSTOM','page\x20create\x20does\x20not\x20accept\x20--page-type.','validation','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','files','Complete\x20page\x20files\x20as\x20JSON\x20(conflicts\x20with\x20--page-pattern)','57786KVRLrv','page-pattern','page','--page-pattern\x20and\x20--page-content\x20cannot\x20be\x20used\x20together.','trim','1096996tcRfpL','appCode','388654VTbvRM','menuPath','40mYNEma','POST','Provide\x20--page-pattern\x20BLANK\x20or\x20--page-content.','4780OFJLqq','compress','1548zSfVml','BLANK','4fbzWwg','enableI18n','--page-pattern\x20currently\x20supports\x20only\x20BLANK.','179697LDnRnb','menuId','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','input','stringify','length','num'];a143_0x4225=function(){return _0x45a86b;};return a143_0x4225();}import{buildInitialFiles}from'../../commands/page/custom/template.js';import{createCustomPage,getI18nInfo}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,parseCustomPageContent,validateCustomPageContent}from'./custom/shared.js';const DEFAULT_CUSTOM_PAGE_LANGUAGES=[a143_0x8406e7(0xdf),a143_0x8406e7(0xe3)];export const pageCreate={'service':a143_0x8406e7(0xf6),'command':'create','description':a143_0x8406e7(0xd6),'risk':a143_0x8406e7(0xe5),'defaultOutputFormat':a143_0x8406e7(0xc1),'structuredErrors':!![],'rejectedFlags':[{'name':'page-type','message':a143_0x8406e7(0xef),'hint':'This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK\x20or\x20--page-content.'}],'flags':[{'name':'name','type':a143_0x8406e7(0xe1),'description':a143_0x8406e7(0xd2)},{'name':'parent-menu-id','type':a143_0x8406e7(0xe2),'description':a143_0x8406e7(0xf1)},{'name':a143_0x8406e7(0xf5),'type':a143_0x8406e7(0xe1),'description':a143_0x8406e7(0xe8),'enum':[a143_0x8406e7(0xc3)]},{'name':a143_0x8406e7(0xdd),'type':'string','description':a143_0x8406e7(0xf3)},APPCODE_FLAG],async 'validate'(_0x522ea8){const _0x40f1c2=a143_0x8406e7,_0x3dda9f=readPagePattern(_0x522ea8);await validateCustomPageContent(readInput(_0x522ea8,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x3dda9f)[_0x40f1c2(0xf2)]);},async 'dryRun'(_0x5bc5bd){const _0x179ecd=a143_0x8406e7,{input:_0x3fb08b}=await prepare(_0x5bc5bd);return{'method':_0x179ecd(0xbe),'url':'/smartapi/webcode/page/create','body':{'appCode':_0x3fb08b[_0x179ecd(0xba)],'pageName':_0x3fb08b[_0x179ecd(0xe7)],..._0x3fb08b['parentMenuId']!=null?{'parentMenuId':_0x3fb08b[_0x179ecd(0xd4)]}:{},'createMenu':_0x3fb08b[_0x179ecd(0xd5)],'codeContent':_0x3fb08b[_0x179ecd(0xf2)]},'description':_0x179ecd(0xdc)+JSON[_0x179ecd(0xcb)](_0x3fb08b[_0x179ecd(0xe7)])+_0x179ecd(0xeb)};},async 'execute'(_0x53f345){const _0x50a116=a143_0x8406e7,_0x5dfe80=await prepare(_0x53f345),_0x532ca6=await createCustomPage(_0x5dfe80[_0x50a116(0xca)]);if(!Number['isInteger'](_0x532ca6[_0x50a116(0xd8)])||_0x532ca6[_0x50a116(0xd8)]<=0x0)throw CliErrors['apiError'](_0x50a116(0xc9));return{'ok':!![],'data':buildMutationData(_0x5dfe80,_0x532ca6),'message':'Created\x20Custom\x20Page\x20'+_0x532ca6['pageId']+'.'};}};async function prepare(_0x255ac2){const _0x54d293=a143_0x8406e7,_0x6ce603=readPagePattern(_0x255ac2);if(_0x6ce603===null)return{'input':readInput(_0x255ac2,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x6ce603),'warnings':[],'pagePattern':_0x6ce603};let _0x13dd6b=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x284e60=[];try{const _0x55becb=await getI18nInfo(_0x255ac2['appCode']);_0x55becb[_0x54d293(0xc5)]&&_0x55becb[_0x54d293(0xd0)]?.[_0x54d293(0xcc)]&&(_0x13dd6b=_0x55becb[_0x54d293(0xd0)]);}catch{_0x284e60=[_0x54d293(0xd7)];}return{'input':readInput(_0x255ac2,_0x13dd6b,_0x6ce603),'warnings':_0x284e60,'pagePattern':_0x6ce603};}function readPagePattern(_0x2dbcf3){const _0x4e0d60=a143_0x8406e7,_0x2fe67a=_0x2dbcf3[_0x4e0d60(0xe6)](_0x4e0d60(0xf5))[_0x4e0d60(0xf8)](),_0x5bfc87=_0x2dbcf3[_0x4e0d60(0xe6)](_0x4e0d60(0xdd))['trim']()['length']>0x0;if(_0x2fe67a&&_0x5bfc87)throw CliErrors[_0x4e0d60(0xf0)](_0x4e0d60(0xf7));if(_0x5bfc87)return null;if(!_0x2fe67a)throw CliErrors[_0x4e0d60(0xf0)](_0x4e0d60(0xbf));if(_0x2fe67a!=='BLANK')throw CliErrors[_0x4e0d60(0xf0)](_0x4e0d60(0xc6));return _0x2fe67a;}function readInput(_0x10ecc7,_0x573c2a=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x4a169e=readPagePattern(_0x10ecc7)){const _0x4b5d6e=a143_0x8406e7,_0x320540=_0x10ecc7[_0x4b5d6e(0xe6)](_0x4b5d6e(0xcf))[_0x4b5d6e(0xf8)]()||_0x4b5d6e(0xda)+Date[_0x4b5d6e(0xe0)]();if(_0x320540[_0x4b5d6e(0xcc)]>0x64)throw CliErrors['validation']('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x542827=_0x10ecc7[_0x4b5d6e(0xcd)](_0x4b5d6e(0xe4),NaN),_0x5ee75d=!Number[_0x4b5d6e(0xdb)](_0x542827);if(_0x5ee75d&&(!Number[_0x4b5d6e(0xd3)](_0x542827)||_0x542827<=0x0))throw CliErrors[_0x4b5d6e(0xf0)](_0x4b5d6e(0xce));return{'appCode':_0x10ecc7[_0x4b5d6e(0xba)],'pageName':_0x320540,..._0x5ee75d?{'parentMenuId':_0x542827}:{},'createMenu':!![],'files':_0x4a169e===null?parseCustomPageContent(_0x10ecc7['str'](_0x4b5d6e(0xdd))):buildInitialFiles(_0x320540,_0x573c2a)};}function a143_0x9310(_0x59b1c7,_0x38f6af){_0x59b1c7=_0x59b1c7-0xb9;const _0x4225a6=a143_0x4225();let _0x9310b0=_0x4225a6[_0x59b1c7];return _0x9310b0;}function buildMutationData(_0x5dbedf,_0x3a6bdd){const _0x428262=a143_0x8406e7,{input:_0x17aaa5}=_0x5dbedf,_0x967761=_0x3a6bdd&&buildCustomPageDevelopmentUrl(_0x17aaa5['appCode'],_0x3a6bdd[_0x428262(0xbc)]),_0x5f472a=_0x3a6bdd&&buildCustomPageEditUrl(_0x17aaa5['appCode'],_0x3a6bdd[_0x428262(0xd8)]);return{'operation':_0x428262(0xde),'pageType':_0x428262(0xee),'pagePattern':_0x5dbedf['pagePattern'],'selector':{'appCode':_0x17aaa5[_0x428262(0xba)],'pageName':_0x17aaa5[_0x428262(0xe7)]},'before':null,'after':{'pageId':_0x3a6bdd?.[_0x428262(0xd8)]??null,'pageName':_0x3a6bdd?.['pageName']??_0x17aaa5[_0x428262(0xe7)],'appCode':_0x3a6bdd?.[_0x428262(0xba)]??_0x17aaa5[_0x428262(0xba)],'version':_0x3a6bdd?.[_0x428262(0xd9)]??null,'menuId':_0x3a6bdd?.[_0x428262(0xc8)]??null,'menuPath':_0x3a6bdd?.[_0x428262(0xbc)]??null,'files':_0x3a6bdd?.[_0x428262(0xf2)]??Object['keys'](_0x17aaa5[_0x428262(0xf2)])},'dryRun':_0x3a6bdd===undefined,'request':_0x17aaa5,..._0x967761?{'pageUrl':_0x967761}:{},..._0x5f472a?{'editPageUrl':_0x5f472a}:{},'warnings':[..._0x5dbedf[_0x428262(0xe9)],..._0x3a6bdd&&!_0x967761?[_0x428262(0xea)]:[]]};}
1
+ const a143_0x5b61b7=a143_0xec0e;(function(_0x5b373,_0x23de4b){const _0x2ee085=a143_0xec0e,_0x659104=_0x5b373();while(!![]){try{const _0x260d8b=parseInt(_0x2ee085(0x1ee))/0x1*(parseInt(_0x2ee085(0x215))/0x2)+parseInt(_0x2ee085(0x21d))/0x3+-parseInt(_0x2ee085(0x20e))/0x4*(-parseInt(_0x2ee085(0x205))/0x5)+-parseInt(_0x2ee085(0x223))/0x6+parseInt(_0x2ee085(0x20c))/0x7+parseInt(_0x2ee085(0x1f0))/0x8+-parseInt(_0x2ee085(0x21f))/0x9;if(_0x260d8b===_0x23de4b)break;else _0x659104['push'](_0x659104['shift']());}catch(_0x232d2b){_0x659104['push'](_0x659104['shift']());}}}(a143_0x4724,0x61b48));import{APPCODE_FLAG}from'../../commands/common/flags.js';import{buildInitialFiles}from'../../commands/page/custom/template.js';import{createCustomPage,getI18nInfo}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,parseCustomPageContent,validateCustomPageContent}from'./custom/shared.js';const DEFAULT_CUSTOM_PAGE_LANGUAGES=[a143_0x5b61b7(0x225),a143_0x5b61b7(0x1e9)];export const pageCreate={'service':a143_0x5b61b7(0x1ea),'command':a143_0x5b61b7(0x1f6),'description':a143_0x5b61b7(0x1f5),'risk':a143_0x5b61b7(0x220),'defaultOutputFormat':a143_0x5b61b7(0x1ed),'structuredErrors':!![],'rejectedFlags':[{'name':a143_0x5b61b7(0x1fe),'message':'page\x20create\x20does\x20not\x20accept\x20--page-type.','hint':a143_0x5b61b7(0x20d)}],'flags':[{'name':'name','type':a143_0x5b61b7(0x217),'description':a143_0x5b61b7(0x20a)},{'name':a143_0x5b61b7(0x1e6),'type':a143_0x5b61b7(0x21b),'description':a143_0x5b61b7(0x1fc)},{'name':a143_0x5b61b7(0x1e7),'type':'string','description':a143_0x5b61b7(0x213),'enum':[a143_0x5b61b7(0x204)]},{'name':a143_0x5b61b7(0x21c),'type':a143_0x5b61b7(0x217),'description':a143_0x5b61b7(0x212)},APPCODE_FLAG],async 'validate'(_0x20f743){const _0x149f27=a143_0x5b61b7,_0x5639ad=readPagePattern(_0x20f743);await validateCustomPageContent(readInput(_0x20f743,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x5639ad)[_0x149f27(0x201)]);},async 'dryRun'(_0x2e2881){const _0x165478=a143_0x5b61b7,{input:_0x284974}=await prepare(_0x2e2881);return{'method':'POST','url':_0x165478(0x1f8),'body':{'appCode':_0x284974[_0x165478(0x21a)],'pageName':_0x284974[_0x165478(0x216)],..._0x284974[_0x165478(0x200)]!=null?{'parentMenuId':_0x284974[_0x165478(0x200)]}:{},'createMenu':_0x284974[_0x165478(0x221)],'codeContent':_0x284974[_0x165478(0x201)]},'description':_0x165478(0x219)+JSON[_0x165478(0x206)](_0x284974[_0x165478(0x216)])+_0x165478(0x210)};},async 'execute'(_0x3c2bb7){const _0x64e2ff=a143_0x5b61b7,_0x57903c=await prepare(_0x3c2bb7),_0x18f1a8=await createCustomPage(_0x57903c[_0x64e2ff(0x1e5)]);if(!Number[_0x64e2ff(0x20f)](_0x18f1a8[_0x64e2ff(0x1f4)])||_0x18f1a8[_0x64e2ff(0x1f4)]<=0x0)throw CliErrors[_0x64e2ff(0x20b)](_0x64e2ff(0x214));return{'ok':!![],'data':buildMutationData(_0x57903c,_0x18f1a8),'message':'Created\x20Custom\x20Page\x20'+_0x18f1a8['pageId']+'.'};}};async function prepare(_0x451471){const _0x48ba2c=a143_0x5b61b7,_0x1e4c8d=readPagePattern(_0x451471);if(_0x1e4c8d===null)return{'input':readInput(_0x451471,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x1e4c8d),'warnings':[],'pagePattern':_0x1e4c8d};let _0x4509e0=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x150f49=[];try{const _0x5429e8=await getI18nInfo(_0x451471[_0x48ba2c(0x21a)]);_0x5429e8[_0x48ba2c(0x207)]&&_0x5429e8[_0x48ba2c(0x1fa)]?.[_0x48ba2c(0x203)]&&(_0x4509e0=_0x5429e8['langs']);}catch{_0x150f49=[_0x48ba2c(0x1e8)];}return{'input':readInput(_0x451471,_0x4509e0,_0x1e4c8d),'warnings':_0x150f49,'pagePattern':_0x1e4c8d};}function a143_0x4724(){const _0x5bd64b=['createMenu','pagePattern','1026762GFGkBE','num','zh-CN','str','input','parent-menu-id','page-pattern','Application\x20language\x20settings\x20could\x20not\x20be\x20read;\x20default\x20Chinese\x20and\x20English\x20language\x20files\x20were\x20generated.','en-US','page','--page-pattern\x20currently\x20supports\x20only\x20BLANK.','自定义页面_','compress','6593djGJKC','version','4314184HMYVLq','menuPath','CUSTOM','validation','pageId','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20complete\x20files','create','isNaN','/smartapi/webcode/page/create','page.create','langs','trim','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','pageName\x20cannot\x20exceed\x20100\x20characters.','page-type','name','parentMenuId','files','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','length','BLANK','2663085PRMEIo','stringify','enableI18n','warnings','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','apiError','1017401uiipBG','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK\x20or\x20--page-content.','4VraOgj','isInteger','\x20and\x20its\x20menu\x20entry.','--page-pattern\x20and\x20--page-content\x20cannot\x20be\x20used\x20together.','Complete\x20page\x20files\x20as\x20JSON\x20(conflicts\x20with\x20--page-pattern)','Custom\x20Page\x20pattern\x20(currently\x20BLANK;\x20conflicts\x20with\x20--page-content)','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','56KiSNrc','pageName','string','menuId','Would\x20create\x20Custom\x20Page\x20','appCode','number','page-content','1658694hBpNBQ','Provide\x20--page-pattern\x20BLANK\x20or\x20--page-content.','12450672JeUZEf','write'];a143_0x4724=function(){return _0x5bd64b;};return a143_0x4724();}function readPagePattern(_0x4daa47){const _0x3d1ab1=a143_0x5b61b7,_0x3dd143=_0x4daa47[_0x3d1ab1(0x226)](_0x3d1ab1(0x1e7))[_0x3d1ab1(0x1fb)](),_0x295266=_0x4daa47[_0x3d1ab1(0x226)](_0x3d1ab1(0x21c))['trim']()['length']>0x0;if(_0x3dd143&&_0x295266)throw CliErrors[_0x3d1ab1(0x1f3)](_0x3d1ab1(0x211));if(_0x295266)return null;if(!_0x3dd143)throw CliErrors[_0x3d1ab1(0x1f3)](_0x3d1ab1(0x21e));if(_0x3dd143!==_0x3d1ab1(0x204))throw CliErrors['validation'](_0x3d1ab1(0x1eb));return _0x3dd143;}function readInput(_0x185d1b,_0x36eb1c=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x4b5f1f=readPagePattern(_0x185d1b)){const _0x11ed11=a143_0x5b61b7,_0x36304=_0x185d1b[_0x11ed11(0x226)](_0x11ed11(0x1ff))['trim']()||_0x11ed11(0x1ec)+Date['now']();if(_0x36304['length']>0x64)throw CliErrors[_0x11ed11(0x1f3)](_0x11ed11(0x1fd));const _0x51008b=_0x185d1b[_0x11ed11(0x224)](_0x11ed11(0x1e6),NaN),_0x259fdf=!Number[_0x11ed11(0x1f7)](_0x51008b);if(_0x259fdf&&(!Number[_0x11ed11(0x20f)](_0x51008b)||_0x51008b<=0x0))throw CliErrors[_0x11ed11(0x1f3)](_0x11ed11(0x202));return{'appCode':_0x185d1b[_0x11ed11(0x21a)],'pageName':_0x36304,..._0x259fdf?{'parentMenuId':_0x51008b}:{},'createMenu':!![],'files':_0x4b5f1f===null?parseCustomPageContent(_0x185d1b[_0x11ed11(0x226)](_0x11ed11(0x21c))):buildInitialFiles(_0x36304,_0x36eb1c)};}function a143_0xec0e(_0x556928,_0x218ecf){_0x556928=_0x556928-0x1e5;const _0x4724da=a143_0x4724();let _0xec0e0a=_0x4724da[_0x556928];return _0xec0e0a;}function buildMutationData(_0x36a336,_0x460370){const _0x5cd53f=a143_0x5b61b7,{input:_0x28735f}=_0x36a336,_0x1bfa82=_0x460370&&buildCustomPageDevelopmentUrl(_0x28735f['appCode'],_0x460370[_0x5cd53f(0x1f1)]),_0x2e171c=_0x460370&&buildCustomPageEditUrl(_0x28735f['appCode'],_0x460370['pageId']);return{'operation':_0x5cd53f(0x1f9),'pageType':_0x5cd53f(0x1f2),'pagePattern':_0x36a336[_0x5cd53f(0x222)],'selector':{'appCode':_0x28735f[_0x5cd53f(0x21a)],'pageName':_0x28735f[_0x5cd53f(0x216)]},'before':null,'after':{'pageId':_0x460370?.['pageId']??null,'pageName':_0x460370?.[_0x5cd53f(0x216)]??_0x28735f[_0x5cd53f(0x216)],'appCode':_0x460370?.[_0x5cd53f(0x21a)]??_0x28735f[_0x5cd53f(0x21a)],'version':_0x460370?.[_0x5cd53f(0x1ef)]??null,'menuId':_0x460370?.[_0x5cd53f(0x218)]??null,'menuPath':_0x460370?.[_0x5cd53f(0x1f1)]??null,'files':_0x460370?.[_0x5cd53f(0x201)]??Object['keys'](_0x28735f[_0x5cd53f(0x201)])},'dryRun':_0x460370===undefined,'request':_0x28735f,..._0x1bfa82?{'pageUrl':_0x1bfa82}:{},..._0x2e171c?{'editPageUrl':_0x2e171c}:{},'warnings':[..._0x36a336[_0x5cd53f(0x208)],..._0x460370&&!_0x1bfa82?[_0x5cd53f(0x209)]:[]]};}
@@ -1 +1 @@
1
- const a144_0x577e1d=a144_0x2212;(function(_0x1c11bc,_0x161cfd){const _0x341b83=a144_0x2212,_0x116dd1=_0x1c11bc();while(!![]){try{const _0xe77d67=-parseInt(_0x341b83(0x1e3))/0x1*(parseInt(_0x341b83(0x1e6))/0x2)+-parseInt(_0x341b83(0x1eb))/0x3*(-parseInt(_0x341b83(0x1e9))/0x4)+parseInt(_0x341b83(0x1f3))/0x5+parseInt(_0x341b83(0x1f6))/0x6*(-parseInt(_0x341b83(0x1fc))/0x7)+-parseInt(_0x341b83(0x1fd))/0x8*(parseInt(_0x341b83(0x1ed))/0x9)+-parseInt(_0x341b83(0x201))/0xa*(-parseInt(_0x341b83(0x1f9))/0xb)+-parseInt(_0x341b83(0x200))/0xc*(-parseInt(_0x341b83(0x1f0))/0xd);if(_0xe77d67===_0x161cfd)break;else _0x116dd1['push'](_0x116dd1['shift']());}catch(_0x3b0890){_0x116dd1['push'](_0x116dd1['shift']());}}}(a144_0x13fa,0x5b488));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a144_0x577e1d(0x1f8),'command':'custom-detail','description':a144_0x577e1d(0x1ee),'risk':'read','defaultOutputFormat':a144_0x577e1d(0x1fe),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a144_0x577e1d(0x1e8),'required':!![],'description':a144_0x577e1d(0x1e7)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x92c793){readCustomPageId(_0x92c793);},async 'execute'(_0x5065ff){const _0xf7654=a144_0x577e1d,_0x1c39a2=readCustomPageId(_0x5065ff),_0x226ced=await getCustomPageSource(_0x1c39a2),{bundle:_0x134431,createTime:_0x4fb41b,updateTime:_0x40aedb,..._0x1e9af1}=_0x226ced,_0x65cf99=_0x226ced['id']??_0x1c39a2,_0x3d522d=_0x226ced['appCode']?.[_0xf7654(0x1ff)]()||_0x5065ff[_0xf7654(0x1fa)](_0xf7654(0x1f1))[_0xf7654(0x1ff)](),_0x5d034c=buildCustomPageRuntimeUrl(_0x3d522d,_0x226ced[_0xf7654(0x1e2)]),_0x5f0495=buildCustomPageEditUrl(_0x3d522d,_0x65cf99),_0x4cfc8c=await resolveCustomPageDevelopmentUrl(_0x3d522d,_0x65cf99,_0x5065ff[_0xf7654(0x1e5)]);return{'ok':!![],'data':{..._0x1e9af1,..._0x5d034c?{'runtimePageUrl':_0x5d034c}:{},..._0x4cfc8c?{'pageUrl':_0x4cfc8c}:{},..._0x5f0495?{'editPageUrl':_0x5f0495}:{},..._0x4fb41b==null?{}:{'createTime':formatTime(_0x4fb41b)},..._0x40aedb==null?{}:{'updateTime':formatTime(_0x40aedb)}},'message':_0xf7654(0x1e4)+_0x1c39a2+'.'};}};function a144_0x2212(_0x292546,_0x430de0){_0x292546=_0x292546-0x1e2;const _0x13fa65=a144_0x13fa();let _0x2212a1=_0x13fa65[_0x292546];return _0x2212a1;}function formatTime(_0x1406df){const _0x47b5f3=a144_0x577e1d,_0x101cfb=new Date(_0x1406df);if(Number['isNaN'](_0x101cfb[_0x47b5f3(0x1f5)]()))return String(_0x1406df);const _0x2f23b1=[_0x101cfb['getFullYear'](),String(_0x101cfb[_0x47b5f3(0x1ec)]()+0x1)[_0x47b5f3(0x1ef)](0x2,'0'),String(_0x101cfb[_0x47b5f3(0x1ea)]())[_0x47b5f3(0x1ef)](0x2,'0')]['join']('-'),_0x1b4be3=[String(_0x101cfb[_0x47b5f3(0x1f4)]())[_0x47b5f3(0x1ef)](0x2,'0'),String(_0x101cfb[_0x47b5f3(0x1f2)]())[_0x47b5f3(0x1ef)](0x2,'0'),String(_0x101cfb[_0x47b5f3(0x1fb)]())[_0x47b5f3(0x1ef)](0x2,'0')][_0x47b5f3(0x1f7)](':');return _0x2f23b1+'\x20'+_0x1b4be3;}function a144_0x13fa(){const _0x5d1644=['40953WpxBOH','str','getSeconds','35FzqHwO','103736ebrApR','compress','trim','12yMwkLh','210hHdGaD','pageCode','327647HSZtLY','Retrieved\x20Custom\x20Page\x20','cookie','4yGVxOz','Custom\x20Page\x20ID','number','4mFLEqM','getDate','1599882iYZYaF','getMonth','450XRAEim','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','padStart','15697149YxMbkd','appcode','getMinutes','2568925ESNbWl','getHours','getTime','786234goLXEn','join','page'];a144_0x13fa=function(){return _0x5d1644;};return a144_0x13fa();}
1
+ const a144_0x2b47fd=a144_0x43e5;function a144_0x43e5(_0x49787b,_0x3c12a2){_0x49787b=_0x49787b-0x9b;const _0x1ed764=a144_0x1ed7();let _0x43e534=_0x1ed764[_0x49787b];return _0x43e534;}function a144_0x1ed7(){const _0x8d95eb=['getHours','Custom\x20Page\x20ID','50676gmfvYd','getMonth','6987483jqWtEs','number','Retrieved\x20Custom\x20Page\x20','trim','686327dbZGHX','184AkuMrf','7210PcsVsd','appCode','getFullYear','str','read','padStart','getTime','join','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','getMinutes','1635555XzRaaJ','appcode','3924bGwkfP','45068243axCwbq','4840984xffdYW','12IULVap','10FYPqsr','custom-detail'];a144_0x1ed7=function(){return _0x8d95eb;};return a144_0x1ed7();}(function(_0x46ac7b,_0xbb21b9){const _0x206a67=a144_0x43e5,_0x3e16d0=_0x46ac7b();while(!![]){try{const _0x270437=-parseInt(_0x206a67(0xb1))/0x1+parseInt(_0x206a67(0xb2))/0x2*(-parseInt(_0x206a67(0xab))/0x3)+-parseInt(_0x206a67(0xa6))/0x4*(-parseInt(_0x206a67(0xa1))/0x5)+parseInt(_0x206a67(0xa3))/0x6*(-parseInt(_0x206a67(0xb3))/0x7)+-parseInt(_0x206a67(0xa5))/0x8+-parseInt(_0x206a67(0xad))/0x9*(parseInt(_0x206a67(0xa7))/0xa)+parseInt(_0x206a67(0xa4))/0xb;if(_0x270437===_0xbb21b9)break;else _0x3e16d0['push'](_0x3e16d0['shift']());}catch(_0xe42895){_0x3e16d0['push'](_0x3e16d0['shift']());}}}(a144_0x1ed7,0xbf24d));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':'page','command':a144_0x2b47fd(0xa8),'description':a144_0x2b47fd(0x9f),'risk':a144_0x2b47fd(0x9b),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a144_0x2b47fd(0xae),'required':!![],'description':a144_0x2b47fd(0xaa)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x39e34a){readCustomPageId(_0x39e34a);},async 'execute'(_0x35c788){const _0x36f332=a144_0x2b47fd,_0x50bba9=readCustomPageId(_0x35c788),_0x2b92f9=await getCustomPageSource(_0x50bba9),{bundle:_0x3d344d,createTime:_0x140bd4,updateTime:_0x19f827,..._0x4cc151}=_0x2b92f9,_0x286884=_0x2b92f9['id']??_0x50bba9,_0x2c5b10=_0x2b92f9[_0x36f332(0xb4)]?.[_0x36f332(0xb0)]()||_0x35c788[_0x36f332(0xb6)](_0x36f332(0xa2))[_0x36f332(0xb0)](),_0x5eb2d4=buildCustomPageRuntimeUrl(_0x2c5b10,_0x2b92f9['pageCode']),_0x3db5d7=buildCustomPageEditUrl(_0x2c5b10,_0x286884),_0x3a3ae2=await resolveCustomPageDevelopmentUrl(_0x2c5b10,_0x286884,_0x35c788['cookie']);return{'ok':!![],'data':{..._0x4cc151,..._0x5eb2d4?{'runtimePageUrl':_0x5eb2d4}:{},..._0x3a3ae2?{'pageUrl':_0x3a3ae2}:{},..._0x3db5d7?{'editPageUrl':_0x3db5d7}:{},..._0x140bd4==null?{}:{'createTime':formatTime(_0x140bd4)},..._0x19f827==null?{}:{'updateTime':formatTime(_0x19f827)}},'message':_0x36f332(0xaf)+_0x50bba9+'.'};}};function formatTime(_0x2b279f){const _0x4f9f54=a144_0x2b47fd,_0x28d89b=new Date(_0x2b279f);if(Number['isNaN'](_0x28d89b[_0x4f9f54(0x9d)]()))return String(_0x2b279f);const _0xda9924=[_0x28d89b[_0x4f9f54(0xb5)](),String(_0x28d89b[_0x4f9f54(0xac)]()+0x1)[_0x4f9f54(0x9c)](0x2,'0'),String(_0x28d89b['getDate']())[_0x4f9f54(0x9c)](0x2,'0')][_0x4f9f54(0x9e)]('-'),_0x36c272=[String(_0x28d89b[_0x4f9f54(0xa9)]())['padStart'](0x2,'0'),String(_0x28d89b[_0x4f9f54(0xa0)]())[_0x4f9f54(0x9c)](0x2,'0'),String(_0x28d89b['getSeconds']())[_0x4f9f54(0x9c)](0x2,'0')]['join'](':');return _0xda9924+'\x20'+_0x36c272;}
@@ -1 +1 @@
1
- const a145_0x3969a1=a145_0x44e2;(function(_0x67c17e,_0x18ec4b){const _0x4f6882=a145_0x44e2,_0x18a8d7=_0x67c17e();while(!![]){try{const _0x467be4=-parseInt(_0x4f6882(0x122))/0x1+-parseInt(_0x4f6882(0x11f))/0x2+-parseInt(_0x4f6882(0x111))/0x3+-parseInt(_0x4f6882(0x116))/0x4+-parseInt(_0x4f6882(0x119))/0x5*(-parseInt(_0x4f6882(0x11d))/0x6)+-parseInt(_0x4f6882(0x11b))/0x7+parseInt(_0x4f6882(0x120))/0x8;if(_0x467be4===_0x18ec4b)break;else _0x18a8d7['push'](_0x18a8d7['shift']());}catch(_0x8e7a52){_0x18a8d7['push'](_0x18a8d7['shift']());}}}(a145_0x45f5,0x79d80));import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';function a145_0x45f5(){const _0x132a23=['menus','5KPeBPT','path','4133423YZBkCa','Found\x20','1596462hSlYPT','length','729068wXDQYK','24384096sDRsDu','compress','706299nRFsAt','appCode','custom-list','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','flatMap','2715264mBLIVR','read','page','type','No\x20Custom\x20Pages\x20found.','994428HcLnXW','pageId'];a145_0x45f5=function(){return _0x132a23;};return a145_0x45f5();}import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';function a145_0x44e2(_0x4ed5b9,_0x8609){_0x4ed5b9=_0x4ed5b9-0x110;const _0x45f54a=a145_0x45f5();let _0x44e2fd=_0x45f54a[_0x4ed5b9];return _0x44e2fd;}export const pageCustomList={'service':a145_0x3969a1(0x113),'command':a145_0x3969a1(0x124),'description':a145_0x3969a1(0x125),'risk':a145_0x3969a1(0x112),'defaultOutputFormat':a145_0x3969a1(0x121),'structuredErrors':!![],'flags':[APPCODE_FLAG],async 'execute'(_0x27bce7){const _0x2b89f3=a145_0x3969a1,_0x5705d4=(await fetchMenuSnapshot(_0x27bce7['appCode'],_0x27bce7['cookie']))[_0x2b89f3(0x118)][_0x2b89f3(0x110)](_0x390c7d=>{const _0xb8e6b=_0x2b89f3;if(_0x390c7d[_0xb8e6b(0x114)]!=='react'||_0x390c7d[_0xb8e6b(0x117)]==null)return[];const _0x4a8b7b=buildCustomPageDevelopmentUrl(_0x27bce7[_0xb8e6b(0x123)],_0x390c7d[_0xb8e6b(0x11a)]),_0x1dca89=buildCustomPageEditUrl(_0x27bce7[_0xb8e6b(0x123)],_0x390c7d[_0xb8e6b(0x117)]);return[{'pageId':_0x390c7d[_0xb8e6b(0x117)],'label':_0x390c7d['label'],..._0x4a8b7b?{'pageUrl':_0x4a8b7b}:{},..._0x1dca89?{'editPageUrl':_0x1dca89}:{}}];});return{'ok':!![],'data':{'pages':_0x5705d4},'message':_0x5705d4[_0x2b89f3(0x11e)]===0x0?_0x2b89f3(0x115):_0x2b89f3(0x11c)+_0x5705d4[_0x2b89f3(0x11e)]+'\x20Custom\x20Page(s).'};}};
1
+ const a145_0x16a575=a145_0x134e;(function(_0x391c3a,_0xabcbff){const _0x387f67=a145_0x134e,_0x227f4a=_0x391c3a();while(!![]){try{const _0xe3599c=parseInt(_0x387f67(0x8a))/0x1+-parseInt(_0x387f67(0x80))/0x2*(parseInt(_0x387f67(0x87))/0x3)+-parseInt(_0x387f67(0x83))/0x4+-parseInt(_0x387f67(0x7c))/0x5*(parseInt(_0x387f67(0x7b))/0x6)+-parseInt(_0x387f67(0x8d))/0x7*(-parseInt(_0x387f67(0x86))/0x8)+-parseInt(_0x387f67(0x7f))/0x9+parseInt(_0x387f67(0x79))/0xa;if(_0xe3599c===_0xabcbff)break;else _0x227f4a['push'](_0x227f4a['shift']());}catch(_0x5ab756){_0x227f4a['push'](_0x227f4a['shift']());}}}(a145_0x34ab,0x23db3));import{APPCODE_FLAG}from'../../../commands/common/flags.js';function a145_0x134e(_0x5215db,_0x5884a2){_0x5215db=_0x5215db-0x79;const _0x34ab0b=a145_0x34ab();let _0x134e3a=_0x34ab0b[_0x5215db];return _0x134e3a;}function a145_0x34ab(){const _0x239d2c=['label','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','1750311glafnU','2jUZouh','No\x20Custom\x20Pages\x20found.','cookie','946704VaCCZt','\x20Custom\x20Page(s).','appCode','133264WsBjLK','25737LBGelF','Found\x20','read','143339upMxyO','react','page','119pWukvh','menus','pageId','compress','3262550fPfQdo','length','25566kqfkUb','195mxBiEQ'];a145_0x34ab=function(){return _0x239d2c;};return a145_0x34ab();}import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';export const pageCustomList={'service':a145_0x16a575(0x8c),'command':'custom-list','description':a145_0x16a575(0x7e),'risk':a145_0x16a575(0x89),'defaultOutputFormat':a145_0x16a575(0x90),'structuredErrors':!![],'flags':[APPCODE_FLAG],async 'execute'(_0x544b3b){const _0x373233=a145_0x16a575,_0x27e761=(await fetchMenuSnapshot(_0x544b3b[_0x373233(0x85)],_0x544b3b[_0x373233(0x82)]))[_0x373233(0x8e)]['flatMap'](_0x45df38=>{const _0x4e4b26=_0x373233;if(_0x45df38['type']!==_0x4e4b26(0x8b)||_0x45df38[_0x4e4b26(0x8f)]==null)return[];const _0x4f090e=buildCustomPageDevelopmentUrl(_0x544b3b[_0x4e4b26(0x85)],_0x45df38['path']),_0xbe66d3=buildCustomPageEditUrl(_0x544b3b['appCode'],_0x45df38[_0x4e4b26(0x8f)]);return[{'pageId':_0x45df38[_0x4e4b26(0x8f)],'label':_0x45df38[_0x4e4b26(0x7d)],..._0x4f090e?{'pageUrl':_0x4f090e}:{},..._0xbe66d3?{'editPageUrl':_0xbe66d3}:{}}];});return{'ok':!![],'data':{'pages':_0x27e761},'message':_0x27e761[_0x373233(0x7a)]===0x0?_0x373233(0x81):_0x373233(0x88)+_0x27e761[_0x373233(0x7a)]+_0x373233(0x84)};}};
@@ -1 +1 @@
1
- const a146_0x1b1835=a146_0x1091;(function(_0x3bdace,_0x5b5d5a){const _0x3b37ca=a146_0x1091,_0x497b76=_0x3bdace();while(!![]){try{const _0x74759a=parseInt(_0x3b37ca(0x8b))/0x1+parseInt(_0x3b37ca(0x82))/0x2+-parseInt(_0x3b37ca(0x8c))/0x3*(-parseInt(_0x3b37ca(0x7b))/0x4)+parseInt(_0x3b37ca(0x79))/0x5+parseInt(_0x3b37ca(0x81))/0x6+parseInt(_0x3b37ca(0x74))/0x7+parseInt(_0x3b37ca(0x78))/0x8*(-parseInt(_0x3b37ca(0x92))/0x9);if(_0x74759a===_0x5b5d5a)break;else _0x497b76['push'](_0x497b76['shift']());}catch(_0x305cf2){_0x497b76['push'](_0x497b76['shift']());}}}(a146_0x3a9e,0x84bb8));function a146_0x1091(_0x30002c,_0x33dcec){_0x30002c=_0x30002c-0x6f;const _0x3a9e58=a146_0x3a9e();let _0x109161=_0x3a9e58[_0x30002c];return _0x109161;}import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a146_0x3a9e(){const _0x285a06=['appCode','apiError','5542453oLNzZj','cookie','FORMAL','remark','16ndXpoh','2083985KJlJCX','POST','118848lQpUML','unknown','status','trim','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','warnings','3460440uJaefd','1186784NcpisZ','/smartapi/webcode/file/publish','push','write','number','compress','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','pageId','string','208054ONcPwv','12ubkbic','Published\x20Custom\x20Page\x20','page','Would\x20publish\x20Custom\x20Page\x20','Custom\x20Page\x20ID','pageCode','9728721ApZNnJ','Optional\x20publish\x20remark','isInteger','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.'];a146_0x3a9e=function(){return _0x285a06;};return a146_0x3a9e();}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a146_0x1b1835(0x8e),'command':'custom-publish','description':'Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','risk':a146_0x1b1835(0x85),'defaultOutputFormat':a146_0x1b1835(0x87),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a146_0x1b1835(0x86),'required':!![],'description':a146_0x1b1835(0x90)},{'name':'remark','type':a146_0x1b1835(0x8a),'description':a146_0x1b1835(0x6f)}],async 'validate'(_0x32d299){readCustomPageId(_0x32d299);},async 'dryRun'(_0x262d51){const _0x4f665d=a146_0x1b1835,_0x40e417=readInput(_0x262d51);return{'method':_0x4f665d(0x7a),'url':_0x4f665d(0x83),'body':{'id':_0x40e417[_0x4f665d(0x89)],..._0x40e417[_0x4f665d(0x77)]?{'remark':_0x40e417[_0x4f665d(0x77)]}:{}},'description':_0x4f665d(0x8f)+_0x40e417[_0x4f665d(0x89)]+'.'};},async 'execute'(_0x112273){const _0x102bdd=a146_0x1b1835,_0x4cfbf2=readInput(_0x112273);await getCustomPageSource(_0x4cfbf2[_0x102bdd(0x89)]);const _0x4fb710=await publishCustomPage(_0x4cfbf2);if(!Number[_0x102bdd(0x70)](_0x4fb710)||_0x4fb710!==_0x4cfbf2[_0x102bdd(0x89)])throw CliErrors[_0x102bdd(0x73)](_0x102bdd(0x88));const _0x11e75d=await getCustomPageSource(_0x4cfbf2[_0x102bdd(0x89)]);if(_0x11e75d[_0x102bdd(0x7d)]!==_0x102bdd(0x76))throw CliErrors['apiError'](_0x102bdd(0x7f)+(_0x11e75d['status']??_0x102bdd(0x7c))+'.');const _0x3ddb90=_0x11e75d[_0x102bdd(0x72)]?.[_0x102bdd(0x7e)](),_0xbd3f16=buildCustomPageEditUrl(_0x3ddb90,_0x4cfbf2[_0x102bdd(0x89)]),_0x4d0012=await resolveCustomPageDevelopmentUrl(_0x3ddb90,_0x4cfbf2[_0x102bdd(0x89)],_0x112273[_0x102bdd(0x75)]),_0x443c81=buildMutationData(_0x4cfbf2,!![],_0x4d0012,_0xbd3f16);_0x3ddb90&&!_0x4d0012&&_0x443c81[_0x102bdd(0x80)]['push'](_0x102bdd(0x71));const _0x21d583=buildCustomPageRuntimeUrl(_0x11e75d[_0x102bdd(0x72)],_0x11e75d[_0x102bdd(0x91)]);return _0x21d583?_0x443c81['runtimePageUrl']=_0x21d583:_0x443c81[_0x102bdd(0x80)][_0x102bdd(0x84)]('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.'),{'ok':!![],'data':_0x443c81,'message':_0x102bdd(0x8d)+_0x4cfbf2['pageId']+'.'};}};function readInput(_0x2ba573){const _0x1df63e=a146_0x1b1835,_0x151855=readCustomPageId(_0x2ba573),_0x45d892=_0x2ba573['str'](_0x1df63e(0x77))[_0x1df63e(0x7e)]();return{'pageId':_0x151855,..._0x45d892?{'remark':_0x45d892}:{}};}function buildMutationData(_0x3cf5a0,_0x13fa5c=![],_0x198550,_0x530598){const _0x1bbd04=a146_0x1b1835;return{'operation':'page.custom-publish','selector':{'pageId':_0x3cf5a0[_0x1bbd04(0x89)]},'before':null,'after':{'pageId':_0x3cf5a0[_0x1bbd04(0x89)],'status':_0x1bbd04(0x76)},'dryRun':!_0x13fa5c,'request':_0x3cf5a0,..._0x198550?{'pageUrl':_0x198550}:{},..._0x530598?{'editPageUrl':_0x530598}:{},'warnings':[]};}
1
+ const a146_0x40d886=a146_0x3915;function a146_0x9016(){const _0x4e7902=['126uMqmQm','154SAXpel','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','36YqZveD','isInteger','number','pageCode','373EuZnPL','page','warnings','write','remark','str','3312200lXwajY','runtimePageUrl','Custom\x20Page\x20ID','Optional\x20publish\x20remark','FORMAL','push','status','4348MnaPUz','POST','487923LTOvBE','Published\x20Custom\x20Page\x20','pageId','525678UCftWR','29236VNfnUo','Would\x20publish\x20Custom\x20Page\x20','unknown','/smartapi/webcode/file/publish','515THqGov','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','3831740BefqGP','page.custom-publish','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','appCode','string','apiError','trim','2581476uJDpbb'];a146_0x9016=function(){return _0x4e7902;};return a146_0x9016();}(function(_0x4548f1,_0x5b3040){const _0x2edc82=a146_0x3915,_0x21262c=_0x4548f1();while(!![]){try{const _0x5cde6a=parseInt(_0x2edc82(0xd2))/0x1*(-parseInt(_0x2edc82(0xdf))/0x2)+-parseInt(_0x2edc82(0xe1))/0x3+-parseInt(_0x2edc82(0xe5))/0x4*(parseInt(_0x2edc82(0xe9))/0x5)+parseInt(_0x2edc82(0xe4))/0x6*(parseInt(_0x2edc82(0xcb))/0x7)+-parseInt(_0x2edc82(0xd8))/0x8+parseInt(_0x2edc82(0xce))/0x9*(-parseInt(_0x2edc82(0xeb))/0xa)+-parseInt(_0x2edc82(0xcc))/0xb*(-parseInt(_0x2edc82(0xf2))/0xc);if(_0x5cde6a===_0x5b3040)break;else _0x21262c['push'](_0x21262c['shift']());}catch(_0x2374a6){_0x21262c['push'](_0x21262c['shift']());}}}(a146_0x9016,0xdf8d1));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';function a146_0x3915(_0x5abcec,_0x458603){_0x5abcec=_0x5abcec-0xcb;const _0x901608=a146_0x9016();let _0x3915cf=_0x901608[_0x5abcec];return _0x3915cf;}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a146_0x40d886(0xd3),'command':'custom-publish','description':a146_0x40d886(0xea),'risk':a146_0x40d886(0xd5),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a146_0x40d886(0xd0),'required':!![],'description':a146_0x40d886(0xda)},{'name':a146_0x40d886(0xd6),'type':a146_0x40d886(0xef),'description':a146_0x40d886(0xdb)}],async 'validate'(_0x374506){readCustomPageId(_0x374506);},async 'dryRun'(_0x5cf296){const _0x1724cd=a146_0x40d886,_0x1d2592=readInput(_0x5cf296);return{'method':_0x1724cd(0xe0),'url':_0x1724cd(0xe8),'body':{'id':_0x1d2592[_0x1724cd(0xe3)],..._0x1d2592['remark']?{'remark':_0x1d2592[_0x1724cd(0xd6)]}:{}},'description':_0x1724cd(0xe6)+_0x1d2592[_0x1724cd(0xe3)]+'.'};},async 'execute'(_0x240003){const _0x4d192e=a146_0x40d886,_0x460278=readInput(_0x240003);await getCustomPageSource(_0x460278[_0x4d192e(0xe3)]);const _0x5f21c8=await publishCustomPage(_0x460278);if(!Number[_0x4d192e(0xcf)](_0x5f21c8)||_0x5f21c8!==_0x460278['pageId'])throw CliErrors[_0x4d192e(0xf0)]('Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.');const _0x589bfa=await getCustomPageSource(_0x460278[_0x4d192e(0xe3)]);if(_0x589bfa['status']!==_0x4d192e(0xdc))throw CliErrors[_0x4d192e(0xf0)](_0x4d192e(0xed)+(_0x589bfa[_0x4d192e(0xde)]??_0x4d192e(0xe7))+'.');const _0x1957f5=_0x589bfa[_0x4d192e(0xee)]?.['trim'](),_0x407c3b=buildCustomPageEditUrl(_0x1957f5,_0x460278[_0x4d192e(0xe3)]),_0x1ffcb9=await resolveCustomPageDevelopmentUrl(_0x1957f5,_0x460278['pageId'],_0x240003['cookie']),_0x576706=buildMutationData(_0x460278,!![],_0x1ffcb9,_0x407c3b);_0x1957f5&&!_0x1ffcb9&&_0x576706[_0x4d192e(0xd4)][_0x4d192e(0xdd)](_0x4d192e(0xcd));const _0x16a855=buildCustomPageRuntimeUrl(_0x589bfa['appCode'],_0x589bfa[_0x4d192e(0xd1)]);return _0x16a855?_0x576706[_0x4d192e(0xd9)]=_0x16a855:_0x576706[_0x4d192e(0xd4)][_0x4d192e(0xdd)]('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.'),{'ok':!![],'data':_0x576706,'message':_0x4d192e(0xe2)+_0x460278[_0x4d192e(0xe3)]+'.'};}};function readInput(_0x436e99){const _0x3cda0d=a146_0x40d886,_0x5242f7=readCustomPageId(_0x436e99),_0x2d5e8c=_0x436e99[_0x3cda0d(0xd7)](_0x3cda0d(0xd6))[_0x3cda0d(0xf1)]();return{'pageId':_0x5242f7,..._0x2d5e8c?{'remark':_0x2d5e8c}:{}};}function buildMutationData(_0x5308e3,_0x3be18b=![],_0x163e6d,_0x16a156){const _0x1fad4a=a146_0x40d886;return{'operation':_0x1fad4a(0xec),'selector':{'pageId':_0x5308e3[_0x1fad4a(0xe3)]},'before':null,'after':{'pageId':_0x5308e3[_0x1fad4a(0xe3)],'status':_0x1fad4a(0xdc)},'dryRun':!_0x3be18b,'request':_0x5308e3,..._0x163e6d?{'pageUrl':_0x163e6d}:{},..._0x16a156?{'editPageUrl':_0x16a156}:{},'warnings':[]};}
@@ -1 +1 @@
1
- function a147_0x1661(_0x39fe97,_0xe26a42){_0x39fe97=_0x39fe97-0xff;const _0x27e313=a147_0x27e3();let _0x1661a0=_0x27e313[_0x39fe97];return _0x1661a0;}const a147_0x40faaf=a147_0x1661;(function(_0x29e8d2,_0x480b88){const _0x50acdd=a147_0x1661,_0x1f91aa=_0x29e8d2();while(!![]){try{const _0x23af6d=-parseInt(_0x50acdd(0x119))/0x1*(parseInt(_0x50acdd(0x122))/0x2)+parseInt(_0x50acdd(0x118))/0x3*(parseInt(_0x50acdd(0x113))/0x4)+-parseInt(_0x50acdd(0x107))/0x5+-parseInt(_0x50acdd(0x10a))/0x6*(-parseInt(_0x50acdd(0x124))/0x7)+parseInt(_0x50acdd(0x115))/0x8+parseInt(_0x50acdd(0x111))/0x9*(-parseInt(_0x50acdd(0x10d))/0xa)+parseInt(_0x50acdd(0x11c))/0xb*(parseInt(_0x50acdd(0x102))/0xc);if(_0x23af6d===_0x480b88)break;else _0x1f91aa['push'](_0x1f91aa['shift']());}catch(_0xfbc78b){_0x1f91aa['push'](_0x1f91aa['shift']());}}}(a147_0x27e3,0xcf282));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getEnv,isProduction}from'../../../constant/env.js';import{getAppBaseUrl}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a147_0x40faaf(0x11e)};function a147_0x27e3(){const _0xc6ed5a=['validation','https://','.app.lovrabet.com','9zZrNPG','https://app.lovrabet.com','127452qGrjKp','pageId','2205248jpkgPB','values','some','111jMnaxE','799566qONgiP','isInteger','flagMissing','24182301UoqygC','length','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','trim','/ide/','object','4qMdTEO','path','2219YiMydH','menus','--page-content\x20must\x20be\x20valid\x20JSON.','/pages/','file','find','/app','parse','12tFwBCU','--page-content\x20must\x20be\x20a\x20JSON\x20object\x20whose\x20values\x20are\x20file\x20content\x20strings.','isArray','map','join','5528825NjHMFE','num','--id\x20must\x20be\x20a\x20positive\x20integer.','1212NXDkEG','/web-app/app','page-content','1636010nVjAGM'];a147_0x27e3=function(){return _0xc6ed5a;};return a147_0x27e3();}function trimOptional(_0x39a7a0){const _0x3c4c7d=a147_0x40faaf;return _0x39a7a0?.[_0x3c4c7d(0x11f)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x7fa122,_0x1dec8a){const _0x63db93=a147_0x40faaf,_0x300a0e=trimOptional(_0x7fa122),_0x55ef21=trimOptional(_0x1dec8a);if(!_0x300a0e||!_0x55ef21)return undefined;const _0x2cbd74=isProduction(getEnv())?_0x300a0e+_0x63db93(0x110):_0x300a0e+'.daily.lovrabet.com';return _0x63db93(0x10f)+_0x2cbd74+'/'+encodeURIComponent(_0x55ef21);}export function buildCustomPageDevelopmentUrl(_0x46e227,_0x2febab){const _0x507264=a147_0x40faaf,_0x579efc=trimOptional(_0x46e227),_0xd10eed=trimOptional(_0x2febab);if(!_0x579efc||!_0xd10eed)return undefined;return getAppBaseUrl(_0x579efc)+_0x507264(0x127)+encodeURIComponent(_0xd10eed);}export async function resolveCustomPageDevelopmentUrl(_0x2b64d1,_0x48dd9a,_0x218458){const _0x238e5c=a147_0x40faaf,_0x239e2d=trimOptional(_0x2b64d1);if(!_0x239e2d)return undefined;try{const _0x3681f2=(await fetchMenuSnapshot(_0x239e2d,_0x218458))[_0x238e5c(0x125)][_0x238e5c(0xff)](_0x4b6ec0=>_0x4b6ec0['type']==='react'&&_0x4b6ec0[_0x238e5c(0x114)]===_0x48dd9a);return buildCustomPageDevelopmentUrl(_0x239e2d,_0x3681f2?.[_0x238e5c(0x123)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x45d7f9,_0x1868cb){const _0x5a8eec=a147_0x40faaf,_0x11cb9f=trimOptional(_0x45d7f9);if(!_0x11cb9f)return;const _0x168035=trimOptional(_0x1868cb==null?undefined:String(_0x1868cb));if(!_0x168035)return;const _0x3fb243=isProduction(getEnv())?_0x5a8eec(0x100):_0x5a8eec(0x10b),_0x2d6e6e=isProduction(getEnv())?_0x5a8eec(0x112):'https://daily.lovrabet.com';return''+_0x2d6e6e+_0x3fb243+'/'+encodeURIComponent(_0x11cb9f)+_0x5a8eec(0x120)+encodeURIComponent(_0x168035);}export function parseCustomPageContent(_0x22f997){const _0x17b7aa=a147_0x40faaf;if(!_0x22f997[_0x17b7aa(0x11f)]())throw CliErrors[_0x17b7aa(0x11b)](_0x17b7aa(0x10c));let _0xfbbb49;try{_0xfbbb49=JSON[_0x17b7aa(0x101)](_0x22f997);}catch{throw CliErrors[_0x17b7aa(0x10e)](_0x17b7aa(0x126));}if(typeof _0xfbbb49!==_0x17b7aa(0x121)||_0xfbbb49===null||Array[_0x17b7aa(0x104)](_0xfbbb49)||Object[_0x17b7aa(0x116)](_0xfbbb49)[_0x17b7aa(0x117)](_0x1838b0=>typeof _0x1838b0!=='string'))throw CliErrors[_0x17b7aa(0x10e)](_0x17b7aa(0x103));return _0xfbbb49;}export async function validateCustomPageContent(_0x4bb38a){const _0x849c1=a147_0x40faaf,_0xe7b1ca=await validateCustomPageSourceFiles(_0x4bb38a);if(_0xe7b1ca[_0x849c1(0x11d)]>0x0)throw CliErrors['validation']('Invalid\x20Custom\x20Page\x20content:\x20'+_0xe7b1ca[_0x849c1(0x105)](_0xd2524d=>_0xd2524d[_0x849c1(0x128)]+':\x20'+_0xd2524d['message'])[_0x849c1(0x106)](';\x20'));}export function readCustomPageId(_0x25b333){const _0x4f09ce=a147_0x40faaf,_0x5e5c16=_0x25b333[_0x4f09ce(0x108)]('id');if(!Number[_0x4f09ce(0x11a)](_0x5e5c16)||_0x5e5c16<=0x0)throw CliErrors['validation'](_0x4f09ce(0x109));return _0x5e5c16;}
1
+ const a147_0x1222e2=a147_0x2036;(function(_0xcce2ba,_0xd51404){const _0x5c18bc=a147_0x2036,_0x276d93=_0xcce2ba();while(!![]){try{const _0x544b9a=parseInt(_0x5c18bc(0x138))/0x1+parseInt(_0x5c18bc(0x11e))/0x2*(parseInt(_0x5c18bc(0x12f))/0x3)+-parseInt(_0x5c18bc(0x122))/0x4+parseInt(_0x5c18bc(0x11c))/0x5*(-parseInt(_0x5c18bc(0x136))/0x6)+-parseInt(_0x5c18bc(0x12d))/0x7+-parseInt(_0x5c18bc(0x129))/0x8+parseInt(_0x5c18bc(0x13a))/0x9;if(_0x544b9a===_0xd51404)break;else _0x276d93['push'](_0x276d93['shift']());}catch(_0x32f852){_0x276d93['push'](_0x276d93['shift']());}}}(a147_0x1eaa,0x5f2d0));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getEnv,isProduction}from'../../../constant/env.js';import{getAppBaseUrl}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';function a147_0x1eaa(){const _0x1cbff6=['--page-content\x20must\x20be\x20a\x20JSON\x20object\x20whose\x20values\x20are\x20file\x20content\x20strings.','type','menus','map','--id\x20must\x20be\x20a\x20positive\x20integer.','154925rBWpEQ','isArray','10094RHVKBQ','isInteger','flagMissing','page-content','989184GOQhPT','https://daily.lovrabet.com','/pages/','file','message','/app','object','4971640qnwBNL','find','/web-app/app','--page-content\x20must\x20be\x20valid\x20JSON.','38696jwnpBB','https://app.lovrabet.com','126fIAtlX','https://','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','parse','pageId','trim','some','150UjyceY','validation','164464DsmyNl','values','14960754OhHlLG','react','path'];a147_0x1eaa=function(){return _0x1cbff6;};return a147_0x1eaa();}function a147_0x2036(_0x480ba6,_0x3d2921){_0x480ba6=_0x480ba6-0x11a;const _0x1eaa66=a147_0x1eaa();let _0x2036a8=_0x1eaa66[_0x480ba6];return _0x2036a8;}export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a147_0x1222e2(0x131)};function trimOptional(_0x2291d7){const _0x2939c1=a147_0x1222e2;return _0x2291d7?.[_0x2939c1(0x134)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x54906a,_0x565378){const _0xba03c0=a147_0x1222e2,_0xc53b05=trimOptional(_0x54906a),_0x391d37=trimOptional(_0x565378);if(!_0xc53b05||!_0x391d37)return undefined;const _0x29a625=isProduction(getEnv())?_0xc53b05+'.app.lovrabet.com':_0xc53b05+'.daily.lovrabet.com';return _0xba03c0(0x130)+_0x29a625+'/'+encodeURIComponent(_0x391d37);}export function buildCustomPageDevelopmentUrl(_0x45d741,_0x352b64){const _0x5cf87f=a147_0x1222e2,_0x4a0ad1=trimOptional(_0x45d741),_0x36845d=trimOptional(_0x352b64);if(!_0x4a0ad1||!_0x36845d)return undefined;return getAppBaseUrl(_0x4a0ad1)+_0x5cf87f(0x124)+encodeURIComponent(_0x36845d);}export async function resolveCustomPageDevelopmentUrl(_0xbd95ad,_0x28ae09,_0x2da511){const _0x398b63=a147_0x1222e2,_0x29f045=trimOptional(_0xbd95ad);if(!_0x29f045)return undefined;try{const _0x107100=(await fetchMenuSnapshot(_0x29f045,_0x2da511))[_0x398b63(0x13f)][_0x398b63(0x12a)](_0x591c97=>_0x591c97[_0x398b63(0x13e)]===_0x398b63(0x13b)&&_0x591c97[_0x398b63(0x133)]===_0x28ae09);return buildCustomPageDevelopmentUrl(_0x29f045,_0x107100?.[_0x398b63(0x13c)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x2fcb8d,_0x5cdca0){const _0xc46a7b=a147_0x1222e2,_0x3d3691=trimOptional(_0x2fcb8d);if(!_0x3d3691)return;const _0x454fbd=trimOptional(_0x5cdca0==null?undefined:String(_0x5cdca0));if(!_0x454fbd)return;const _0x41f601=isProduction(getEnv())?_0xc46a7b(0x127):_0xc46a7b(0x12b),_0x125b88=isProduction(getEnv())?_0xc46a7b(0x12e):_0xc46a7b(0x123);return''+_0x125b88+_0x41f601+'/'+encodeURIComponent(_0x3d3691)+'/ide/'+encodeURIComponent(_0x454fbd);}export function parseCustomPageContent(_0x31a859){const _0x4a487a=a147_0x1222e2;if(!_0x31a859[_0x4a487a(0x134)]())throw CliErrors[_0x4a487a(0x120)](_0x4a487a(0x121));let _0x5e8560;try{_0x5e8560=JSON[_0x4a487a(0x132)](_0x31a859);}catch{throw CliErrors[_0x4a487a(0x137)](_0x4a487a(0x12c));}if(typeof _0x5e8560!==_0x4a487a(0x128)||_0x5e8560===null||Array[_0x4a487a(0x11d)](_0x5e8560)||Object[_0x4a487a(0x139)](_0x5e8560)[_0x4a487a(0x135)](_0x422364=>typeof _0x422364!=='string'))throw CliErrors[_0x4a487a(0x137)](_0x4a487a(0x13d));return _0x5e8560;}export async function validateCustomPageContent(_0x37b2b4){const _0x520fc6=a147_0x1222e2,_0x573a94=await validateCustomPageSourceFiles(_0x37b2b4);if(_0x573a94['length']>0x0)throw CliErrors[_0x520fc6(0x137)]('Invalid\x20Custom\x20Page\x20content:\x20'+_0x573a94[_0x520fc6(0x11a)](_0x4de7c5=>_0x4de7c5[_0x520fc6(0x125)]+':\x20'+_0x4de7c5[_0x520fc6(0x126)])['join'](';\x20'));}export function readCustomPageId(_0x5c4de7){const _0xf7101c=a147_0x1222e2,_0x1c2bae=_0x5c4de7['num']('id');if(!Number[_0xf7101c(0x11f)](_0x1c2bae)||_0x1c2bae<=0x0)throw CliErrors[_0xf7101c(0x137)](_0xf7101c(0x11b));return _0x1c2bae;}
@@ -1 +1 @@
1
- const a148_0x459ff7=a148_0x7a0f;(function(_0x35ec6a,_0x548856){const _0x232464=a148_0x7a0f,_0x365d07=_0x35ec6a();while(!![]){try{const _0x56fed0=parseInt(_0x232464(0x1cd))/0x1*(-parseInt(_0x232464(0x1d8))/0x2)+parseInt(_0x232464(0x1cf))/0x3+-parseInt(_0x232464(0x1c8))/0x4*(-parseInt(_0x232464(0x1c6))/0x5)+parseInt(_0x232464(0x1d7))/0x6+-parseInt(_0x232464(0x1dd))/0x7+-parseInt(_0x232464(0x1ca))/0x8*(parseInt(_0x232464(0x1de))/0x9)+-parseInt(_0x232464(0x1cc))/0xa*(parseInt(_0x232464(0x1d0))/0xb);if(_0x56fed0===_0x548856)break;else _0x365d07['push'](_0x365d07['shift']());}catch(_0x4ac9d2){_0x365d07['push'](_0x365d07['shift']());}}}(a148_0x539b,0xf2718));function a148_0x539b(){const _0x26f535=['.jsx','endsWith','toLowerCase','entries','4207238iHASyQ','18TXCfrP','425mZkdtn','message','72484DzutYp','filter','5680032WYHZrv','typescript','4313080wHRYVA','2106phUwqv','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','3828300QBBejy','11vmFmKX','some','all','.tsx','page-content','babel','trim','5303034BwyMgz','242dxRkIj'];a148_0x539b=function(){return _0x26f535;};return a148_0x539b();}import{format}from'prettier';const SOURCE_PARSERS={'.js':a148_0x459ff7(0x1d5),'.jsx':a148_0x459ff7(0x1d5),'.ts':a148_0x459ff7(0x1cb),'.tsx':a148_0x459ff7(0x1cb)},CUSTOM_PAGE_EXTENSIONS=[a148_0x459ff7(0x1d9),a148_0x459ff7(0x1d3)];export async function validateCustomPageSourceFiles(_0x5c00bb){const _0x4da8cf=a148_0x459ff7,_0x34b605=Object[_0x4da8cf(0x1dc)](_0x5c00bb)[_0x4da8cf(0x1c9)](([_0x4e4f3c])=>getParser(_0x4e4f3c));if(!_0x34b605[_0x4da8cf(0x1d1)](([_0x46c252])=>isReactSourceFile(_0x46c252)))return[{'file':_0x4da8cf(0x1d4),'message':_0x4da8cf(0x1ce)}];const _0x31d805=await Promise[_0x4da8cf(0x1d2)](_0x34b605['map'](async([_0x352498,_0x3f86ab])=>{const _0x332e20=_0x4da8cf;try{return await format(_0x3f86ab,{'parser':getParser(_0x352498)}),undefined;}catch(_0x3fa997){return{'file':_0x352498,'message':_0x3fa997 instanceof Error?_0x3fa997[_0x332e20(0x1c7)]:String(_0x3fa997)};}}));return _0x31d805[_0x4da8cf(0x1c9)](_0x502627=>_0x502627!==undefined);}function a148_0x7a0f(_0x3a0753,_0x318dc8){_0x3a0753=_0x3a0753-0x1c6;const _0x539bd7=a148_0x539b();let _0x7a0ffd=_0x539bd7[_0x3a0753];return _0x7a0ffd;}function getParser(_0x55c8d5){const _0x3c93b7=a148_0x459ff7,_0x46885e=_0x55c8d5[_0x3c93b7(0x1d6)]()[_0x3c93b7(0x1db)]();return Object['entries'](SOURCE_PARSERS)['find'](([_0x374fb1])=>_0x46885e[_0x3c93b7(0x1da)](_0x374fb1))?.[0x1];}function isReactSourceFile(_0x1eb9e2){const _0x308aab=a148_0x459ff7,_0x1c2df2=_0x1eb9e2[_0x308aab(0x1d6)]()[_0x308aab(0x1db)]();return CUSTOM_PAGE_EXTENSIONS['some'](_0x51d0e7=>_0x1c2df2['endsWith'](_0x51d0e7));}
1
+ const a148_0x4928e3=a148_0x50ac;(function(_0x13e3eb,_0x11b90b){const _0x4d1419=a148_0x50ac,_0x35b051=_0x13e3eb();while(!![]){try{const _0x5056a0=parseInt(_0x4d1419(0x101))/0x1+parseInt(_0x4d1419(0x104))/0x2*(-parseInt(_0x4d1419(0x103))/0x3)+-parseInt(_0x4d1419(0x110))/0x4*(parseInt(_0x4d1419(0x10c))/0x5)+parseInt(_0x4d1419(0x10b))/0x6*(-parseInt(_0x4d1419(0x109))/0x7)+-parseInt(_0x4d1419(0xfa))/0x8*(parseInt(_0x4d1419(0x10a))/0x9)+-parseInt(_0x4d1419(0xfb))/0xa*(-parseInt(_0x4d1419(0x102))/0xb)+parseInt(_0x4d1419(0xf7))/0xc;if(_0x5056a0===_0x11b90b)break;else _0x35b051['push'](_0x35b051['shift']());}catch(_0x43a864){_0x35b051['push'](_0x35b051['shift']());}}}(a148_0x9bf1,0x31195));import{format}from'prettier';const SOURCE_PARSERS={'.js':'babel','.jsx':a148_0x4928e3(0x106),'.ts':'typescript','.tsx':a148_0x4928e3(0x10f)},CUSTOM_PAGE_EXTENSIONS=[a148_0x4928e3(0x105),a148_0x4928e3(0x100)];function a148_0x50ac(_0x308129,_0x38fd7c){_0x308129=_0x308129-0xf7;const _0x9bf1f3=a148_0x9bf1();let _0x50ace4=_0x9bf1f3[_0x308129];return _0x50ace4;}export async function validateCustomPageSourceFiles(_0x394102){const _0x3b3f84=a148_0x4928e3,_0x4f6a70=Object[_0x3b3f84(0x111)](_0x394102)[_0x3b3f84(0x107)](([_0x16431e])=>getParser(_0x16431e));if(!_0x4f6a70['some'](([_0x572550])=>isReactSourceFile(_0x572550)))return[{'file':_0x3b3f84(0x108),'message':_0x3b3f84(0x10e)}];const _0x476275=await Promise[_0x3b3f84(0xfc)](_0x4f6a70[_0x3b3f84(0x10d)](async([_0x27e689,_0x4c5631])=>{const _0xeae909=_0x3b3f84;try{return await format(_0x4c5631,{'parser':getParser(_0x27e689)}),undefined;}catch(_0x5ec61f){return{'file':_0x27e689,'message':_0x5ec61f instanceof Error?_0x5ec61f[_0xeae909(0xf8)]:String(_0x5ec61f)};}}));return _0x476275[_0x3b3f84(0x107)](_0x4bcb9b=>_0x4bcb9b!==undefined);}function getParser(_0x170b8f){const _0x228b7a=a148_0x4928e3,_0x54fe5c=_0x170b8f[_0x228b7a(0xf9)]()['toLowerCase']();return Object['entries'](SOURCE_PARSERS)[_0x228b7a(0xfe)](([_0x36b9fd])=>_0x54fe5c[_0x228b7a(0xfd)](_0x36b9fd))?.[0x1];}function a148_0x9bf1(){const _0x58551e=['trim','1151536ZJpDFX','10eCRkve','all','endsWith','find','some','.tsx','219381qDsadP','216887HbNjcV','7683dZzPRB','186UfncmP','.jsx','babel','filter','page-content','5215irpPvM','9MMyEfJ','966zgpabM','48090AKquOj','map','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','typescript','4bSUfoQ','entries','5684268otqUaN','message'];a148_0x9bf1=function(){return _0x58551e;};return a148_0x9bf1();}function isReactSourceFile(_0x5b473a){const _0x591178=a148_0x4928e3,_0x5298b6=_0x5b473a[_0x591178(0xf9)]()['toLowerCase']();return CUSTOM_PAGE_EXTENSIONS[_0x591178(0xff)](_0x793aa7=>_0x5298b6[_0x591178(0xfd)](_0x793aa7));}
@@ -1 +1 @@
1
- (function(_0x5de850,_0x2274f1){const _0x66756d=a149_0x1a8e,_0x4c28ab=_0x5de850();while(!![]){try{const _0x388e4d=parseInt(_0x66756d(0x19b))/0x1*(-parseInt(_0x66756d(0x195))/0x2)+-parseInt(_0x66756d(0x1a2))/0x3+parseInt(_0x66756d(0x189))/0x4*(-parseInt(_0x66756d(0x194))/0x5)+parseInt(_0x66756d(0x18b))/0x6+parseInt(_0x66756d(0x19e))/0x7+-parseInt(_0x66756d(0x19a))/0x8*(parseInt(_0x66756d(0x1a1))/0x9)+parseInt(_0x66756d(0x197))/0xa*(parseInt(_0x66756d(0x190))/0xb);if(_0x388e4d===_0x2274f1)break;else _0x4c28ab['push'](_0x4c28ab['shift']());}catch(_0x1f439a){_0x4c28ab['push'](_0x4c28ab['shift']());}}}(a149_0x3297,0xea5c1));function buildIndexFile(_0x2ad6e0){const _0x54b41b=a149_0x1a8e;return'import\x20React\x20from\x20\x27react\x27;\x0aimport\x20{\x20Card,\x20Typography\x20}\x20from\x20\x27antd\x27;\x0aimport\x20{\x20useSdkClient,\x20useI18n,\x20useNavigate,\x20useLocation\x20}\x20from\x20\x22@/context/app-context\x22;\x0aimport\x20{\x20locales\x20}\x20from\x20\x27../locales\x27;\x0aimport\x20\x27./index.css\x27;\x0a\x0aconst\x20App\x20=\x20()\x20=>\x20{\x0a\x20\x20const\x20client\x20=\x20useSdkClient();\x20//\x20client\x20可以用于获取其他数据集的数据\x0a\x20\x20const\x20$i18n\x20=\x20useI18n();\x20//\x20国际化多语言\x20i18n\x20实例\x0a\x20\x20const\x20navigate\x20=\x20useNavigate();\x20//\x20react-router\x20navigate\x20导航实例\x0a\x20\x20const\x20location\x20=\x20useLocation();\x20//\x20浏览器\x20location\x20实例\x0a\x0a\x20\x20$i18n.addLocale(locales);\x20//\x20添加多语言词包\x0a\x0a\x20\x20return\x20(\x0a\x20\x20\x20\x20<div\x20className=\x22page-container\x22>\x0a\x20\x20\x20\x20\x20\x20<Card>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<Typography>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Typography.Title\x20level={2}>{'+JSON[_0x54b41b(0x196)](_0x2ad6e0)+'}</Typography.Title>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Typography.Paragraph>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{$i18n.t(\x27pageDescription\x27,\x20\x27这是一个基础页面模板,你可以在此基础上进行开发。\x27)}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</Typography.Paragraph>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</Typography>\x0a\x20\x20\x20\x20\x20\x20</Card>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20);\x0a};\x0a\x0aexport\x20default\x20App;\x0a';}function buildStyleFile(){const _0x4b1227=a149_0x1a8e;return _0x4b1227(0x1a4);}function a149_0x1a8e(_0x386b55,_0x4b615d){_0x386b55=_0x386b55-0x189;const _0x32973f=a149_0x3297();let _0x1a8e39=_0x32973f[_0x386b55];return _0x1a8e39;}function buildLocalesFile(_0x75ff7a){const _0xa03f4a=a149_0x1a8e,_0x407da0=_0x75ff7a[_0xa03f4a(0x1a3)](_0x123c1a=>{const _0x24245c=_0xa03f4a;let _0x5e8eb8='';switch(_0x123c1a){case _0x24245c(0x19f):_0x5e8eb8=_0x24245c(0x18f);break;case _0x24245c(0x192):_0x5e8eb8=_0x24245c(0x199);break;case _0x24245c(0x18d):_0x5e8eb8=_0x24245c(0x19d);break;case _0x24245c(0x19c):_0x5e8eb8='Bu\x20bir\x20temel\x20sayfa\x20şablonudur.\x20Bu\x20temaplana\x20dayanarak\x20geliştirilebilir.';break;case _0x24245c(0x191):_0x5e8eb8='Ini\x20adalah\x20sebuah\x20halaman\x20dasar.\x20Anda\x20dapat\x20mengembangkan\x20ini.';break;default:_0x5e8eb8=_0x24245c(0x199);}return'\x20\x20'+JSON[_0x24245c(0x196)](_0x123c1a)+_0x24245c(0x198)+JSON[_0x24245c(0x196)](_0x24245c(0x18a))+':\x20'+JSON['stringify'](_0x5e8eb8)+_0x24245c(0x1a0);})[_0xa03f4a(0x18e)](',\x0a');return _0xa03f4a(0x193)+_0x407da0+_0xa03f4a(0x18c);}function a149_0x3297(){const _0x403ccf=['stringify','20NrSGni',':\x20{\x0a\x20\x20\x20\x20','This\x20is\x20a\x20basic\x20page\x20template,\x20you\x20can\x20develop\x20based\x20on\x20it.','8Zukwur','4153oLnEJW','tr-TR','これは基本ページテンプレートです。あなたは、これに基づいて開発できます。','3159982vunAZj','zh-CN',',\x0a\x20\x20}','11012193JsRZRf','1108932zZBRkm','map','.page-container\x20{\x0a\x20\x20padding:\x2024px;\x0a\x20\x20background:\x20#f0f2f5;\x0a\x20\x20min-height:\x20100vh;\x0a}\x0a','760724INWRLw','pageDescription','7528170aoXeWx','\x0a};\x0a','ja-JP','join','这是一个基础页面模板,你可以在此基础上进行开发。','15169055POmhIH','id-ID','en-US','export\x20const\x20locales\x20=\x20{\x0a','45BjLTjN','96HEZYNr'];a149_0x3297=function(){return _0x403ccf;};return a149_0x3297();}export function buildInitialFiles(_0x1aa1da,_0x58e9ea){return{'src/app/index.jsx':buildIndexFile(_0x1aa1da),'src/app/index.css':buildStyleFile(),'src/locales/index.js':buildLocalesFile(_0x58e9ea)};}
1
+ function a149_0x1c95(){const _0x2d2feb=['这是一个基础页面模板,你可以在此基础上进行开发。',',\x0a\x20\x20}','\x0a};\x0a','Ini\x20adalah\x20sebuah\x20halaman\x20dasar.\x20Anda\x20dapat\x20mengembangkan\x20ini.','55044DbPAhz','204kuSnvi','Bu\x20bir\x20temel\x20sayfa\x20şablonudur.\x20Bu\x20temaplana\x20dayanarak\x20geliştirilebilir.','en-US','join','stringify','}</Typography.Title>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Typography.Paragraph>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{$i18n.t(\x27pageDescription\x27,\x20\x27这是一个基础页面模板,你可以在此基础上进行开发。\x27)}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</Typography.Paragraph>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</Typography>\x0a\x20\x20\x20\x20\x20\x20</Card>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20);\x0a};\x0a\x0aexport\x20default\x20App;\x0a','1478625Wcctxi','101521Gxdfwh','import\x20React\x20from\x20\x27react\x27;\x0aimport\x20{\x20Card,\x20Typography\x20}\x20from\x20\x27antd\x27;\x0aimport\x20{\x20useSdkClient,\x20useI18n,\x20useNavigate,\x20useLocation\x20}\x20from\x20\x22@/context/app-context\x22;\x0aimport\x20{\x20locales\x20}\x20from\x20\x27../locales\x27;\x0aimport\x20\x27./index.css\x27;\x0a\x0aconst\x20App\x20=\x20()\x20=>\x20{\x0a\x20\x20const\x20client\x20=\x20useSdkClient();\x20//\x20client\x20可以用于获取其他数据集的数据\x0a\x20\x20const\x20$i18n\x20=\x20useI18n();\x20//\x20国际化多语言\x20i18n\x20实例\x0a\x20\x20const\x20navigate\x20=\x20useNavigate();\x20//\x20react-router\x20navigate\x20导航实例\x0a\x20\x20const\x20location\x20=\x20useLocation();\x20//\x20浏览器\x20location\x20实例\x0a\x0a\x20\x20$i18n.addLocale(locales);\x20//\x20添加多语言词包\x0a\x0a\x20\x20return\x20(\x0a\x20\x20\x20\x20<div\x20className=\x22page-container\x22>\x0a\x20\x20\x20\x20\x20\x20<Card>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<Typography>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Typography.Title\x20level={2}>{','pageDescription','This\x20is\x20a\x20basic\x20page\x20template,\x20you\x20can\x20develop\x20based\x20on\x20it.','id-ID','map','7303740SiFueh','96hsueFm','307133WSTRKI','356859GtlhrV','これは基本ページテンプレートです。あなたは、これに基づいて開発できます。','export\x20const\x20locales\x20=\x20{\x0a','9DjDtbG','147162oBFYNy'];a149_0x1c95=function(){return _0x2d2feb;};return a149_0x1c95();}(function(_0xbe1e66,_0x5c5595){const _0x271822=a149_0x5e5f,_0x362521=_0xbe1e66();while(!![]){try{const _0x13faa0=parseInt(_0x271822(0xb1))/0x1+-parseInt(_0x271822(0x9c))/0x2+-parseInt(_0x271822(0x9b))/0x3*(parseInt(_0x271822(0xa1))/0x4)+parseInt(_0x271822(0xa8))/0x5+parseInt(_0x271822(0xa2))/0x6*(-parseInt(_0x271822(0xa9))/0x7)+-parseInt(_0x271822(0xb0))/0x8*(parseInt(_0x271822(0xb2))/0x9)+parseInt(_0x271822(0xaf))/0xa;if(_0x13faa0===_0x5c5595)break;else _0x362521['push'](_0x362521['shift']());}catch(_0xa82a5d){_0x362521['push'](_0x362521['shift']());}}}(a149_0x1c95,0x3ce6e));function buildIndexFile(_0xa2a9df){const _0x4dcd94=a149_0x5e5f;return _0x4dcd94(0xaa)+JSON[_0x4dcd94(0xa6)](_0xa2a9df)+_0x4dcd94(0xa7);}function a149_0x5e5f(_0x143f91,_0x54bee1){_0x143f91=_0x143f91-0x99;const _0x1c95c8=a149_0x1c95();let _0x5e5fbe=_0x1c95c8[_0x143f91];return _0x5e5fbe;}function buildStyleFile(){return'.page-container\x20{\x0a\x20\x20padding:\x2024px;\x0a\x20\x20background:\x20#f0f2f5;\x0a\x20\x20min-height:\x20100vh;\x0a}\x0a';}function buildLocalesFile(_0x2caaad){const _0x12053f=a149_0x5e5f,_0x4cde29=_0x2caaad[_0x12053f(0xae)](_0x68ba4f=>{const _0x2103b9=_0x12053f;let _0x57f8a3='';switch(_0x68ba4f){case'zh-CN':_0x57f8a3=_0x2103b9(0x9d);break;case _0x2103b9(0xa4):_0x57f8a3='This\x20is\x20a\x20basic\x20page\x20template,\x20you\x20can\x20develop\x20based\x20on\x20it.';break;case'ja-JP':_0x57f8a3=_0x2103b9(0x99);break;case'tr-TR':_0x57f8a3=_0x2103b9(0xa3);break;case _0x2103b9(0xad):_0x57f8a3=_0x2103b9(0xa0);break;default:_0x57f8a3=_0x2103b9(0xac);}return'\x20\x20'+JSON[_0x2103b9(0xa6)](_0x68ba4f)+':\x20{\x0a\x20\x20\x20\x20'+JSON[_0x2103b9(0xa6)](_0x2103b9(0xab))+':\x20'+JSON[_0x2103b9(0xa6)](_0x57f8a3)+_0x2103b9(0x9e);})[_0x12053f(0xa5)](',\x0a');return _0x12053f(0x9a)+_0x4cde29+_0x12053f(0x9f);}export function buildInitialFiles(_0xd6425f,_0xab98c8){return{'src/app/index.jsx':buildIndexFile(_0xd6425f),'src/app/index.css':buildStyleFile(),'src/locales/index.js':buildLocalesFile(_0xab98c8)};}
@@ -1 +1 @@
1
- const a150_0xc519d1=a150_0x504c;(function(_0x13b109,_0x298b37){const _0x410c01=a150_0x504c,_0x524d32=_0x13b109();while(!![]){try{const _0x26d848=-parseInt(_0x410c01(0x161))/0x1+-parseInt(_0x410c01(0x154))/0x2+parseInt(_0x410c01(0x15d))/0x3*(parseInt(_0x410c01(0x147))/0x4)+-parseInt(_0x410c01(0x144))/0x5+parseInt(_0x410c01(0x148))/0x6+-parseInt(_0x410c01(0x15b))/0x7+parseInt(_0x410c01(0x150))/0x8*(parseInt(_0x410c01(0x160))/0x9);if(_0x26d848===_0x298b37)break;else _0x524d32['push'](_0x524d32['shift']());}catch(_0x35f4d5){_0x524d32['push'](_0x524d32['shift']());}}}(a150_0x4a11,0x54b06));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,parseCustomPageContent,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a150_0xc519d1(0x156),'command':a150_0xc519d1(0x15f),'description':'Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','risk':a150_0xc519d1(0x158),'defaultOutputFormat':a150_0xc519d1(0x157),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a150_0xc519d1(0x145),'required':!![],'description':a150_0xc519d1(0x15a)},{'name':a150_0xc519d1(0x149),'type':a150_0xc519d1(0x152),'required':!![],'description':a150_0xc519d1(0x159)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x221f5c){const _0x4dc065=a150_0xc519d1;readCustomPageId(_0x221f5c),await validateCustomPageContent(parseCustomPageContent(_0x221f5c[_0x4dc065(0x146)](_0x4dc065(0x149))));},async 'dryRun'(_0x388828){const _0x44b43d=a150_0xc519d1,_0x4987ff=await readInput(_0x388828);return{'method':_0x44b43d(0x14c),'url':_0x44b43d(0x153),'body':{'id':_0x4987ff[_0x44b43d(0x14f)],'codeContent':_0x4987ff['pageContent']},'description':'Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20'+_0x4987ff[_0x44b43d(0x14f)]+'.'};},async 'execute'(_0x3f7415){const _0x5a9b9d=a150_0xc519d1,_0xc07ca6=await readInput(_0x3f7415),_0x5b4e9b=await updateCustomPageContent({'pageId':_0xc07ca6[_0x5a9b9d(0x14f)],'pageContent':_0xc07ca6[_0x5a9b9d(0x155)]});if(!Number[_0x5a9b9d(0x14e)](_0x5b4e9b['newVersion'])||_0x5b4e9b[_0x5a9b9d(0x15e)]<=0x0)throw CliErrors[_0x5a9b9d(0x163)]('Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.');const _0x5cefd2=buildCustomPageEditUrl(_0xc07ca6[_0x5a9b9d(0x14b)],_0xc07ca6[_0x5a9b9d(0x14f)]),_0x2034b4=await resolveCustomPageDevelopmentUrl(_0xc07ca6['appCode'],_0xc07ca6[_0x5a9b9d(0x14f)],_0x3f7415[_0x5a9b9d(0x151)]);return{'ok':!![],'data':buildMutationData(_0xc07ca6,_0x5b4e9b,_0x2034b4,_0x5cefd2,_0x2034b4?[]:[_0x5a9b9d(0x162)]),'message':'Updated\x20Custom\x20Page\x20'+_0xc07ca6[_0x5a9b9d(0x14f)]+'.'};}};async function readInput(_0x1b96d2){const _0x59a8f6=a150_0xc519d1,_0x2da16d=readCustomPageId(_0x1b96d2),_0xa1ae82=_0x1b96d2[_0x59a8f6(0x146)]('appcode')[_0x59a8f6(0x15c)]()||(await getCustomPageSource(_0x2da16d))[_0x59a8f6(0x14b)]?.[_0x59a8f6(0x15c)]();if(!_0xa1ae82)throw CliErrors['validation'](_0x59a8f6(0x14d)+_0x2da16d+'.');return{'appCode':_0xa1ae82,'pageId':_0x2da16d,'pageContent':parseCustomPageContent(_0x1b96d2['str'](_0x59a8f6(0x149)))};}function buildMutationData(_0x1120f5,_0x45f26a,_0xa8cfe9,_0x780e64,_0x1d8ed2=[]){const _0xa7c5a5=a150_0xc519d1;return{'operation':_0xa7c5a5(0x14a),'selector':{'appCode':_0x1120f5[_0xa7c5a5(0x14b)],'pageId':_0x1120f5[_0xa7c5a5(0x14f)]},'before':null,'after':{'pageId':_0x45f26a?.[_0xa7c5a5(0x14f)]??_0x1120f5['pageId'],'version':_0x45f26a?.[_0xa7c5a5(0x15e)]??null,'pageContent':_0x1120f5['pageContent']},'dryRun':_0x45f26a===undefined,'request':_0x1120f5,..._0xa8cfe9?{'pageUrl':_0xa8cfe9}:{},..._0x780e64?{'editPageUrl':_0x780e64}:{},'warnings':_0x1d8ed2};}function a150_0x504c(_0x39b47a,_0x4baca6){_0x39b47a=_0x39b47a-0x144;const _0x4a1190=a150_0x4a11();let _0x504c5c=_0x4a1190[_0x39b47a];return _0x504c5c;}function a150_0x4a11(){const _0x347ecc=['cookie','string','/smartapi/webcode/page/update/content','92674YyKuvQ','pageContent','page','compress','write','Complete\x20page\x20files\x20as\x20JSON','Custom\x20Page\x20ID','282338YXSXHq','trim','115557heMAhv','newVersion','custom-update','148698hKbwpD','588058qVlMLh','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','apiError','2929450FyUxsE','number','str','20TmyOCu','2442408sIlcLp','page-content','page.custom-update','appCode','POST','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','isInteger','pageId','488nnPpMM'];a150_0x4a11=function(){return _0x347ecc;};return a150_0x4a11();}
1
+ const a150_0x504b26=a150_0x5086;(function(_0xade381,_0x9335d1){const _0xb4d9ec=a150_0x5086,_0xfa065f=_0xade381();while(!![]){try{const _0x32f682=-parseInt(_0xb4d9ec(0x17e))/0x1*(parseInt(_0xb4d9ec(0x175))/0x2)+-parseInt(_0xb4d9ec(0x17c))/0x3*(-parseInt(_0xb4d9ec(0x174))/0x4)+-parseInt(_0xb4d9ec(0x18a))/0x5+parseInt(_0xb4d9ec(0x185))/0x6*(parseInt(_0xb4d9ec(0x170))/0x7)+parseInt(_0xb4d9ec(0x189))/0x8+parseInt(_0xb4d9ec(0x176))/0x9*(parseInt(_0xb4d9ec(0x18d))/0xa)+-parseInt(_0xb4d9ec(0x179))/0xb;if(_0x32f682===_0x9335d1)break;else _0xfa065f['push'](_0xfa065f['shift']());}catch(_0x42a557){_0xfa065f['push'](_0xfa065f['shift']());}}}(a150_0xade6,0xa4fe6));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,parseCustomPageContent,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';function a150_0xade6(){const _0x150589=['9ohVJDM','page-content','appCode','13843588qPMZup','trim','pageId','102tEDLuy','POST','1168511KYFYTw','validation','Complete\x20page\x20files\x20as\x20JSON','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','cookie','compress','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','66NHineb','pageContent','str','appcode','5396456RmHJvz','3225280oHOQed','number','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','12385990eFGGkI','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','page','802011QDxJHA','newVersion','Updated\x20Custom\x20Page\x20','string','67580gDEUhr','2LvyKTE'];a150_0xade6=function(){return _0x150589;};return a150_0xade6();}function a150_0x5086(_0x30698c,_0x5855df){_0x30698c=_0x30698c-0x170;const _0xade6e0=a150_0xade6();let _0x5086f4=_0xade6e0[_0x30698c];return _0x5086f4;}export const pageCustomUpdate={'service':a150_0x504b26(0x18f),'command':'custom-update','description':a150_0x504b26(0x18e),'risk':'write','defaultOutputFormat':a150_0x504b26(0x183),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a150_0x504b26(0x18b),'required':!![],'description':'Custom\x20Page\x20ID'},{'name':'page-content','type':a150_0x504b26(0x173),'required':!![],'description':a150_0x504b26(0x180)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2d2972){const _0x1b654a=a150_0x504b26;readCustomPageId(_0x2d2972),await validateCustomPageContent(parseCustomPageContent(_0x2d2972[_0x1b654a(0x187)](_0x1b654a(0x177))));},async 'dryRun'(_0x1fb6e2){const _0x3ec68d=a150_0x504b26,_0x5e2c1d=await readInput(_0x1fb6e2);return{'method':_0x3ec68d(0x17d),'url':'/smartapi/webcode/page/update/content','body':{'id':_0x5e2c1d[_0x3ec68d(0x17b)],'codeContent':_0x5e2c1d['pageContent']},'description':_0x3ec68d(0x18c)+_0x5e2c1d['pageId']+'.'};},async 'execute'(_0x39831d){const _0x358c57=a150_0x504b26,_0x5bd24b=await readInput(_0x39831d),_0x23530d=await updateCustomPageContent({'pageId':_0x5bd24b[_0x358c57(0x17b)],'pageContent':_0x5bd24b[_0x358c57(0x186)]});if(!Number['isInteger'](_0x23530d['newVersion'])||_0x23530d[_0x358c57(0x171)]<=0x0)throw CliErrors['apiError']('Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.');const _0x1264f6=buildCustomPageEditUrl(_0x5bd24b[_0x358c57(0x178)],_0x5bd24b[_0x358c57(0x17b)]),_0x30363f=await resolveCustomPageDevelopmentUrl(_0x5bd24b['appCode'],_0x5bd24b[_0x358c57(0x17b)],_0x39831d[_0x358c57(0x182)]);return{'ok':!![],'data':buildMutationData(_0x5bd24b,_0x23530d,_0x30363f,_0x1264f6,_0x30363f?[]:[_0x358c57(0x181)]),'message':_0x358c57(0x172)+_0x5bd24b[_0x358c57(0x17b)]+'.'};}};async function readInput(_0x3ffa8b){const _0x81a3a5=a150_0x504b26,_0x5e8895=readCustomPageId(_0x3ffa8b),_0x26eb61=_0x3ffa8b[_0x81a3a5(0x187)](_0x81a3a5(0x188))[_0x81a3a5(0x17a)]()||(await getCustomPageSource(_0x5e8895))['appCode']?.['trim']();if(!_0x26eb61)throw CliErrors[_0x81a3a5(0x17f)](_0x81a3a5(0x184)+_0x5e8895+'.');return{'appCode':_0x26eb61,'pageId':_0x5e8895,'pageContent':parseCustomPageContent(_0x3ffa8b[_0x81a3a5(0x187)](_0x81a3a5(0x177)))};}function buildMutationData(_0x481520,_0xfcaf75,_0x32478c,_0x431fc8,_0x3cc6bf=[]){const _0x2ff84d=a150_0x504b26;return{'operation':'page.custom-update','selector':{'appCode':_0x481520[_0x2ff84d(0x178)],'pageId':_0x481520['pageId']},'before':null,'after':{'pageId':_0xfcaf75?.[_0x2ff84d(0x17b)]??_0x481520['pageId'],'version':_0xfcaf75?.[_0x2ff84d(0x171)]??null,'pageContent':_0x481520[_0x2ff84d(0x186)]},'dryRun':_0xfcaf75===undefined,'request':_0x481520,..._0x32478c?{'pageUrl':_0x32478c}:{},..._0x431fc8?{'editPageUrl':_0x431fc8}:{},'warnings':_0x3cc6bf};}
@@ -1 +1 @@
1
- function a151_0x4219(){const _0x3db283=['name','related-pages-fallback','data-list-status','status','read','string','2029296inDlBB','query-data-list-status','relatedPages','length','87IIrohH','699350ZolwnQ','/standard-page-status?appCode=','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','3506100Uqiyhe','1085554qzUoeF','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','143960rXXKkk','GET','manualResolutionRequired','page','78956JgRjsf','100NRmWTq','1111491gMhtFc','14tzrkOu','appCode','alias','code'];a151_0x4219=function(){return _0x3db283;};return a151_0x4219();}const a151_0x5c29e5=a151_0x2109;(function(_0x5915d5,_0x26d88d){const _0x243f7f=a151_0x2109,_0x50bbee=_0x5915d5();while(!![]){try{const _0x21c5a4=-parseInt(_0x243f7f(0x18a))/0x1+-parseInt(_0x243f7f(0x18e))/0x2+-parseInt(_0x243f7f(0x189))/0x3*(parseInt(_0x243f7f(0x194))/0x4)+parseInt(_0x243f7f(0x18d))/0x5+parseInt(_0x243f7f(0x185))/0x6+-parseInt(_0x243f7f(0x17b))/0x7*(parseInt(_0x243f7f(0x190))/0x8)+parseInt(_0x243f7f(0x196))/0x9*(parseInt(_0x243f7f(0x195))/0xa);if(_0x21c5a4===_0x26d88d)break;else _0x50bbee['push'](_0x50bbee['shift']());}catch(_0x2f08fa){_0x50bbee['push'](_0x50bbee['shift']());}}}(a151_0x4219,0x677c6));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a151_0x2109(_0x87310c,_0x1b5a0a){_0x87310c=_0x87310c-0x17b;const _0x4219c4=a151_0x4219();let _0x210992=_0x4219c4[_0x87310c];return _0x210992;}import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a151_0x5c29e5(0x193),'command':a151_0x5c29e5(0x181),'description':a151_0x5c29e5(0x18f),'risk':a151_0x5c29e5(0x183),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a151_0x5c29e5(0x17d),'type':a151_0x5c29e5(0x184),'description':a151_0x5c29e5(0x18c)}],async 'validate'(_0x489d44){validateDatasetSelector(_0x489d44);},async 'dryRun'(_0x4519fd){const _0x1fb9d0=a151_0x5c29e5,_0xb56a00=await loadDatasetDetailForPage(_0x4519fd);return{'method':_0x1fb9d0(0x191),'url':'/smartapi/lovrabet/dataset/'+_0xb56a00['code']+_0x1fb9d0(0x18b)+encodeURIComponent(_0x4519fd[_0x1fb9d0(0x17c)]),'description':serializeDryRunDescription({'dataset':{'id':_0xb56a00['id'],'code':_0xb56a00['code'],'name':_0xb56a00[_0x1fb9d0(0x17f)]},'action':_0x1fb9d0(0x186)})};},async 'execute'(_0xd3643c){const _0x441bbe=a151_0x5c29e5,_0x2f1143=await loadDatasetDetailForPage(_0xd3643c),_0x1e1ff3=await loadDataListPageStatusForGenerate(_0xd3643c,_0x2f1143[_0x441bbe(0x17e)]),_0x5a23b8=getUndeletedRelatedPages(_0x2f1143),_0x54bba9=assessDataListPageState(_0x2f1143[_0x441bbe(0x17e)],_0x1e1ff3,{'fallbackUndeletedPages':_0x5a23b8});return{'ok':!![],'data':{'datasetCode':_0x2f1143[_0x441bbe(0x17e)],'precheckSource':_0x1e1ff3?.['source']??_0x441bbe(0x180),'status':_0x54bba9[_0x441bbe(0x182)],'manualResolutionRequired':_0x54bba9[_0x441bbe(0x192)],'nextAction':_0x54bba9['nextAction'],'dataListPageStatus':_0x1e1ff3,'relatedPages':{'total':_0x2f1143[_0x441bbe(0x187)][_0x441bbe(0x188)],'undeletedCount':_0x5a23b8[_0x441bbe(0x188)]}}};}};
1
+ function a151_0x9ded(){const _0x5b6ce4=['read','3476574oNiDcY','query-data-list-status','alias','GET','175018BGDFIm','related-pages-fallback','1690300MNGcPX','length','/standard-page-status?appCode=','916350RlYTXG','77PwttVA','manualResolutionRequired','2073808pmkBdi','code','source','/smartapi/lovrabet/dataset/','nextAction','7632KYmHjL','name','string','relatedPages','5427816MxJCGg','1ynvdvc','21FMVkLU','18cTaXye','status'];a151_0x9ded=function(){return _0x5b6ce4;};return a151_0x9ded();}const a151_0x27d358=a151_0x9e9e;(function(_0x1f3b0d,_0xacbbd3){const _0x203060=a151_0x9e9e,_0xc65261=_0x1f3b0d();while(!![]){try{const _0x2797b0=-parseInt(_0x203060(0x1fc))/0x1*(-parseInt(_0x203060(0x1ea))/0x2)+parseInt(_0x203060(0x1fb))/0x3+parseInt(_0x203060(0x1f7))/0x4+-parseInt(_0x203060(0x1ec))/0x5+-parseInt(_0x203060(0x1e6))/0x6*(parseInt(_0x203060(0x1fd))/0x7)+-parseInt(_0x203060(0x1f2))/0x8*(-parseInt(_0x203060(0x1fe))/0x9)+parseInt(_0x203060(0x1ef))/0xa*(parseInt(_0x203060(0x1f0))/0xb);if(_0x2797b0===_0xacbbd3)break;else _0xc65261['push'](_0xc65261['shift']());}catch(_0x54b2e6){_0xc65261['push'](_0xc65261['shift']());}}}(a151_0x9ded,0xefcdf));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a151_0x9e9e(_0x23c166,_0x389d4d){_0x23c166=_0x23c166-0x1e4;const _0x9ded2f=a151_0x9ded();let _0x9e9e92=_0x9ded2f[_0x23c166];return _0x9e9e92;}import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':'page','command':'data-list-status','description':'Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a151_0x27d358(0x1e5),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a151_0x27d358(0x1e8),'type':a151_0x27d358(0x1f9),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0x3931d9){validateDatasetSelector(_0x3931d9);},async 'dryRun'(_0x9406f7){const _0x4256eb=a151_0x27d358,_0x43ae7e=await loadDatasetDetailForPage(_0x9406f7);return{'method':_0x4256eb(0x1e9),'url':_0x4256eb(0x1f5)+_0x43ae7e['code']+_0x4256eb(0x1ee)+encodeURIComponent(_0x9406f7['appCode']),'description':serializeDryRunDescription({'dataset':{'id':_0x43ae7e['id'],'code':_0x43ae7e['code'],'name':_0x43ae7e[_0x4256eb(0x1f8)]},'action':_0x4256eb(0x1e7)})};},async 'execute'(_0x210c1f){const _0x2502ba=a151_0x27d358,_0x2a0162=await loadDatasetDetailForPage(_0x210c1f),_0x254124=await loadDataListPageStatusForGenerate(_0x210c1f,_0x2a0162[_0x2502ba(0x1f3)]),_0x2e8e56=getUndeletedRelatedPages(_0x2a0162),_0x55dac8=assessDataListPageState(_0x2a0162[_0x2502ba(0x1f3)],_0x254124,{'fallbackUndeletedPages':_0x2e8e56});return{'ok':!![],'data':{'datasetCode':_0x2a0162['code'],'precheckSource':_0x254124?.[_0x2502ba(0x1f4)]??_0x2502ba(0x1eb),'status':_0x55dac8[_0x2502ba(0x1e4)],'manualResolutionRequired':_0x55dac8[_0x2502ba(0x1f1)],'nextAction':_0x55dac8[_0x2502ba(0x1f6)],'dataListPageStatus':_0x254124,'relatedPages':{'total':_0x2a0162[_0x2502ba(0x1fa)]['length'],'undeletedCount':_0x2e8e56[_0x2502ba(0x1ed)]}}};}};
@@ -1 +1 @@
1
- const a152_0x1a1b2b=a152_0x1568;(function(_0x5b70aa,_0x1ae36f){const _0x50a663=a152_0x1568,_0x5ea9e3=_0x5b70aa();while(!![]){try{const _0x1c8cbc=-parseInt(_0x50a663(0x1e2))/0x1*(parseInt(_0x50a663(0x1d5))/0x2)+parseInt(_0x50a663(0x1cd))/0x3*(-parseInt(_0x50a663(0x1fc))/0x4)+-parseInt(_0x50a663(0x1d3))/0x5*(-parseInt(_0x50a663(0x1eb))/0x6)+parseInt(_0x50a663(0x1e9))/0x7*(parseInt(_0x50a663(0x1d1))/0x8)+-parseInt(_0x50a663(0x1ea))/0x9*(-parseInt(_0x50a663(0x1d0))/0xa)+parseInt(_0x50a663(0x1e3))/0xb+parseInt(_0x50a663(0x1d4))/0xc*(-parseInt(_0x50a663(0x1ed))/0xd);if(_0x1c8cbc===_0x1ae36f)break;else _0x5ea9e3['push'](_0x5ea9e3['shift']());}catch(_0xe63f9b){_0x5ea9e3['push'](_0x5ea9e3['shift']());}}}(a152_0x8a72,0x506b3));function a152_0x1568(_0x4997b9,_0x152a47){_0x4997b9=_0x4997b9-0x1cb;const _0x8a726a=a152_0x8a72();let _0x1568f3=_0x8a726a[_0x4997b9];return _0x1568f3;}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a152_0x8a72(){const _0x508f5b=['number','1614aDOfJp','/generate-standard-pages/start','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','843740pCAeWi','11624CqBSuC','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','5dJDqbw','173172yuqPNH','10322ZgUGBv','appCode','dataset','source','compress','dataListPageStatus','DATA_LIST','precheck','taskId','page','message','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','37dvtjqv','1957780rjlTid','apply','dryRun','progressRate','name','page-pattern','2807REgZhA','27wVEBgT','3214734fKAonT','manualResolutionRequired','442EhQAba','related-pages-fallback','/smartapi/lovrabet/dataset/','currentStep','operationId','已提交生成任务','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','clientOperationId','status','reused','generate-start','nextAction','code','bool','CRUD_PAGE_SET','4004gfgEPc','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','write','page-type','PARTIAL_SUCCESS'];a152_0x8a72=function(){return _0x508f5b;};return a152_0x8a72();}import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a152_0x1a1b2b(0x1de),'command':'generate-start','description':'Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','risk':a152_0x1a1b2b(0x1fe),'defaultOutputFormat':a152_0x1a1b2b(0x1d9),'rejectedFlags':[{'name':a152_0x1a1b2b(0x1ff),'message':a152_0x1a1b2b(0x1fd),'hint':'This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.'},{'name':a152_0x1a1b2b(0x1e8),'message':a152_0x1a1b2b(0x1e1),'hint':a152_0x1a1b2b(0x1e0)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a152_0x1a1b2b(0x1d2)},{'name':a152_0x1a1b2b(0x1e4),'type':'boolean','description':a152_0x1a1b2b(0x1cf)}],async 'validate'(_0x3dec78){validateDatasetSelector(_0x3dec78);},async 'dryRun'(_0x3f5a82){const _0x3440c2=a152_0x1a1b2b,_0x111376=await prepare(_0x3f5a82);return{'method':'POST','url':_0x3440c2(0x1ef)+_0x111376['dataset'][_0x3440c2(0x1f9)]+_0x3440c2(0x1ce),'body':{'appCode':_0x3f5a82[_0x3440c2(0x1d6)],'clientOperationId':_0x111376[_0x3440c2(0x1f4)]},'description':serializeDryRunDescription({'dataset':{'id':_0x111376[_0x3440c2(0x1d7)]['id'],'code':_0x111376['dataset'][_0x3440c2(0x1f9)],'name':_0x111376[_0x3440c2(0x1d7)][_0x3440c2(0x1e7)],'fieldCount':_0x111376[_0x3440c2(0x1d7)]['fieldCount']},'precheckSource':_0x111376['dataListPageStatus']?.[_0x3440c2(0x1d8)]??_0x3440c2(0x1ee),'action':_0x3440c2(0x1f7),'clientOperationId':_0x111376[_0x3440c2(0x1f4)],'plannedStatus':_0x111376['precheck']['status'],'reason':_0x111376[_0x3440c2(0x1dc)][_0x3440c2(0x1df)]})};},async 'execute'(_0x490d75){const _0x1fbe04=a152_0x1a1b2b;if(!_0x490d75[_0x1fbe04(0x1fa)](_0x1fbe04(0x1e4))){const _0x392c3d=await pageGenerateStart[_0x1fbe04(0x1e5)](_0x490d75);return{'ok':!![],'message':_0x1fbe04(0x1f3),'data':_0x392c3d};}const _0x425c2f=await prepare(_0x490d75);if(!_0x425c2f[_0x1fbe04(0x1dc)]['allowGenerate'])return{'ok':![],'message':_0x425c2f['precheck'][_0x1fbe04(0x1df)],'data':{'datasetCode':_0x425c2f[_0x1fbe04(0x1d7)][_0x1fbe04(0x1f9)],'pageType':_0x1fbe04(0x1db),'pagePattern':_0x1fbe04(0x1fb),'clientOperationId':_0x425c2f[_0x1fbe04(0x1f4)],'precheckSource':_0x425c2f[_0x1fbe04(0x1da)]?.[_0x1fbe04(0x1d8)]??'related-pages-fallback','status':_0x425c2f['precheck']['status'],'manualResolutionRequired':_0x425c2f[_0x1fbe04(0x1dc)][_0x1fbe04(0x1ec)],'nextAction':_0x425c2f[_0x1fbe04(0x1dc)][_0x1fbe04(0x1f8)],'query':{'command':buildDataListPageStatusQueryCommand(_0x425c2f[_0x1fbe04(0x1d7)]['code'],_0x490d75[_0x1fbe04(0x1d6)])},'dataListPageStatus':_0x425c2f[_0x1fbe04(0x1da)]}};const _0x7df8a8=await startGenerateDataListPages(_0x490d75[_0x1fbe04(0x1d6)],_0x425c2f[_0x1fbe04(0x1d7)]['code'],{'clientOperationId':_0x425c2f[_0x1fbe04(0x1f4)]}),_0x5984aa=_0x7df8a8['status']==='SUCCESS'||_0x7df8a8[_0x1fbe04(0x1f5)]===_0x1fbe04(0x1cb)?await loadDataListPageStatusForGenerate(_0x490d75,_0x425c2f[_0x1fbe04(0x1d7)][_0x1fbe04(0x1f9)]):null,_0xec04ec=assessGenerateOperationState(_0x425c2f[_0x1fbe04(0x1d7)]['code'],_0x7df8a8[_0x1fbe04(0x1f5)],_0x5984aa);return{'ok':!![],'message':_0x7df8a8['reused']?'复用已有生成任务':_0x1fbe04(0x1f2),'data':{'datasetCode':_0x425c2f[_0x1fbe04(0x1d7)]['code'],'appCode':_0x490d75[_0x1fbe04(0x1d6)],'pageType':_0x1fbe04(0x1db),'pagePattern':'CRUD_PAGE_SET','taskId':_0x7df8a8[_0x1fbe04(0x1dd)]??null,'operationId':_0x7df8a8[_0x1fbe04(0x1f1)]??null,'clientOperationId':_0x425c2f[_0x1fbe04(0x1f4)],'jobStatus':_0x7df8a8[_0x1fbe04(0x1f5)]??null,'progressRate':typeof _0x7df8a8[_0x1fbe04(0x1e6)]===_0x1fbe04(0x1cc)?_0x7df8a8[_0x1fbe04(0x1e6)]:null,'currentStep':_0x7df8a8[_0x1fbe04(0x1f0)]??null,'reused':_0x7df8a8[_0x1fbe04(0x1f6)]===!![],'status':_0xec04ec['status'],'manualResolutionRequired':_0xec04ec[_0x1fbe04(0x1ec)],'nextAction':_0xec04ec[_0x1fbe04(0x1f8)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x425c2f['dataset']['code'],{'appCode':_0x490d75[_0x1fbe04(0x1d6)],'taskId':_0x7df8a8[_0x1fbe04(0x1dd)],'operationId':_0x7df8a8['operationId'],'clientOperationId':_0x425c2f[_0x1fbe04(0x1f4)]})},'dataListPageStatus':_0x5984aa}};}};async function prepare(_0x4479dd){const _0x42299f=a152_0x1a1b2b,_0x1efb33=await loadDatasetDetailForPage(_0x4479dd),_0x1e48ed=await loadDataListPageStatusForGenerate(_0x4479dd,_0x1efb33['code']),_0x5e8d34=getUndeletedRelatedPages(_0x1efb33);return{'dataset':_0x1efb33,'dataListPageStatus':_0x1e48ed,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x1efb33[_0x42299f(0x1f9)],_0x1e48ed,{'fallbackUndeletedPages':_0x5e8d34})};}
1
+ function a152_0x320f(_0x219fbe,_0x41f120){_0x219fbe=_0x219fbe-0xb9;const _0x36f4c1=a152_0x36f4();let _0x320f3f=_0x36f4c1[_0x219fbe];return _0x320f3f;}const a152_0xac741e=a152_0x320f;(function(_0x4ba172,_0xc7719b){const _0x5bed47=a152_0x320f,_0x48d0b3=_0x4ba172();while(!![]){try{const _0x2c5326=parseInt(_0x5bed47(0xcf))/0x1+-parseInt(_0x5bed47(0xd1))/0x2*(parseInt(_0x5bed47(0xe7))/0x3)+parseInt(_0x5bed47(0xbd))/0x4*(-parseInt(_0x5bed47(0xc9))/0x5)+-parseInt(_0x5bed47(0xb9))/0x6+parseInt(_0x5bed47(0xc3))/0x7*(-parseInt(_0x5bed47(0xe6))/0x8)+-parseInt(_0x5bed47(0xe9))/0x9*(-parseInt(_0x5bed47(0xe8))/0xa)+parseInt(_0x5bed47(0xc2))/0xb;if(_0x2c5326===_0xc7719b)break;else _0x48d0b3['push'](_0x48d0b3['shift']());}catch(_0x47d023){_0x48d0b3['push'](_0x48d0b3['shift']());}}}(a152_0x36f4,0xcc186));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a152_0x36f4(){const _0x47391d=['20SKRxLZ','6256827QqjFjh','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','已提交生成任务','CRUD_PAGE_SET','page-pattern','taskId','apply','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','1599114fQcDPE','name','manualResolutionRequired','dataListPageStatus','4dTWyAD','reused','/generate-standard-pages/start','related-pages-fallback','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','22571395onsCtP','98odXhqc','page','progressRate','dataset','status','POST','6719705WYIkJc','DATA_LIST','appCode','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','precheck','generate-start','940483qisWwx','allowGenerate','804wTtsRm','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','bool','alias','SUCCESS','source','fieldCount','number','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','clientOperationId','/smartapi/lovrabet/dataset/','operationId','page-type','nextAction','复用已有生成任务','code','PARTIAL_SUCCESS','string','compress','message','489272TWAtQk','8061PgtQie'];a152_0x36f4=function(){return _0x47391d;};return a152_0x36f4();}import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a152_0xac741e(0xc4),'command':a152_0xac741e(0xce),'description':a152_0xac741e(0xc1),'risk':'write','defaultOutputFormat':a152_0xac741e(0xe4),'rejectedFlags':[{'name':a152_0xac741e(0xde),'message':a152_0xac741e(0xea),'hint':a152_0xac741e(0xd2)},{'name':a152_0xac741e(0xed),'message':a152_0xac741e(0xf0),'hint':a152_0xac741e(0xda)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a152_0xac741e(0xd5),'type':a152_0xac741e(0xe3),'description':a152_0xac741e(0xcc)},{'name':a152_0xac741e(0xef),'type':'boolean','description':a152_0xac741e(0xd3)}],async 'validate'(_0x466c33){validateDatasetSelector(_0x466c33);},async 'dryRun'(_0x49df24){const _0x5235d1=a152_0xac741e,_0x5608c7=await prepare(_0x49df24);return{'method':_0x5235d1(0xc8),'url':_0x5235d1(0xdc)+_0x5608c7['dataset'][_0x5235d1(0xe1)]+_0x5235d1(0xbf),'body':{'appCode':_0x49df24[_0x5235d1(0xcb)],'clientOperationId':_0x5608c7[_0x5235d1(0xdb)]},'description':serializeDryRunDescription({'dataset':{'id':_0x5608c7[_0x5235d1(0xc6)]['id'],'code':_0x5608c7[_0x5235d1(0xc6)][_0x5235d1(0xe1)],'name':_0x5608c7[_0x5235d1(0xc6)][_0x5235d1(0xba)],'fieldCount':_0x5608c7['dataset'][_0x5235d1(0xd8)]},'precheckSource':_0x5608c7['dataListPageStatus']?.[_0x5235d1(0xd7)]??_0x5235d1(0xc0),'action':_0x5235d1(0xce),'clientOperationId':_0x5608c7[_0x5235d1(0xdb)],'plannedStatus':_0x5608c7[_0x5235d1(0xcd)]['status'],'reason':_0x5608c7[_0x5235d1(0xcd)][_0x5235d1(0xe5)]})};},async 'execute'(_0x51955c){const _0x4ac14a=a152_0xac741e;if(!_0x51955c[_0x4ac14a(0xd4)](_0x4ac14a(0xef))){const _0x256f00=await pageGenerateStart['dryRun'](_0x51955c);return{'ok':!![],'message':'Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','data':_0x256f00};}const _0x54e984=await prepare(_0x51955c);if(!_0x54e984[_0x4ac14a(0xcd)][_0x4ac14a(0xd0)])return{'ok':![],'message':_0x54e984[_0x4ac14a(0xcd)][_0x4ac14a(0xe5)],'data':{'datasetCode':_0x54e984[_0x4ac14a(0xc6)]['code'],'pageType':_0x4ac14a(0xca),'pagePattern':_0x4ac14a(0xec),'clientOperationId':_0x54e984[_0x4ac14a(0xdb)],'precheckSource':_0x54e984[_0x4ac14a(0xbc)]?.[_0x4ac14a(0xd7)]??'related-pages-fallback','status':_0x54e984[_0x4ac14a(0xcd)][_0x4ac14a(0xc7)],'manualResolutionRequired':_0x54e984[_0x4ac14a(0xcd)][_0x4ac14a(0xbb)],'nextAction':_0x54e984[_0x4ac14a(0xcd)][_0x4ac14a(0xdf)],'query':{'command':buildDataListPageStatusQueryCommand(_0x54e984[_0x4ac14a(0xc6)][_0x4ac14a(0xe1)],_0x51955c[_0x4ac14a(0xcb)])},'dataListPageStatus':_0x54e984[_0x4ac14a(0xbc)]}};const _0x2f2d7b=await startGenerateDataListPages(_0x51955c['appCode'],_0x54e984[_0x4ac14a(0xc6)][_0x4ac14a(0xe1)],{'clientOperationId':_0x54e984['clientOperationId']}),_0x1b3781=_0x2f2d7b[_0x4ac14a(0xc7)]===_0x4ac14a(0xd6)||_0x2f2d7b[_0x4ac14a(0xc7)]===_0x4ac14a(0xe2)?await loadDataListPageStatusForGenerate(_0x51955c,_0x54e984[_0x4ac14a(0xc6)][_0x4ac14a(0xe1)]):null,_0x22fb02=assessGenerateOperationState(_0x54e984[_0x4ac14a(0xc6)][_0x4ac14a(0xe1)],_0x2f2d7b['status'],_0x1b3781);return{'ok':!![],'message':_0x2f2d7b[_0x4ac14a(0xbe)]?_0x4ac14a(0xe0):_0x4ac14a(0xeb),'data':{'datasetCode':_0x54e984['dataset']['code'],'appCode':_0x51955c[_0x4ac14a(0xcb)],'pageType':'DATA_LIST','pagePattern':_0x4ac14a(0xec),'taskId':_0x2f2d7b[_0x4ac14a(0xee)]??null,'operationId':_0x2f2d7b[_0x4ac14a(0xdd)]??null,'clientOperationId':_0x54e984[_0x4ac14a(0xdb)],'jobStatus':_0x2f2d7b[_0x4ac14a(0xc7)]??null,'progressRate':typeof _0x2f2d7b[_0x4ac14a(0xc5)]===_0x4ac14a(0xd9)?_0x2f2d7b[_0x4ac14a(0xc5)]:null,'currentStep':_0x2f2d7b['currentStep']??null,'reused':_0x2f2d7b['reused']===!![],'status':_0x22fb02[_0x4ac14a(0xc7)],'manualResolutionRequired':_0x22fb02[_0x4ac14a(0xbb)],'nextAction':_0x22fb02[_0x4ac14a(0xdf)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x54e984[_0x4ac14a(0xc6)][_0x4ac14a(0xe1)],{'appCode':_0x51955c[_0x4ac14a(0xcb)],'taskId':_0x2f2d7b['taskId'],'operationId':_0x2f2d7b[_0x4ac14a(0xdd)],'clientOperationId':_0x54e984['clientOperationId']})},'dataListPageStatus':_0x1b3781}};}};async function prepare(_0xd30810){const _0x4172a8=a152_0xac741e,_0x23df6d=await loadDatasetDetailForPage(_0xd30810),_0xa7ba81=await loadDataListPageStatusForGenerate(_0xd30810,_0x23df6d['code']),_0x204ed9=getUndeletedRelatedPages(_0x23df6d);return{'dataset':_0x23df6d,'dataListPageStatus':_0xa7ba81,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x23df6d[_0x4172a8(0xe1)],_0xa7ba81,{'fallbackUndeletedPages':_0x204ed9})};}