@lovrabet/rabetbase-cli 2.3.12 → 2.3.13-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) 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/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/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.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -1
  103. package/lib/commands/menu/external-link-create.js +1 -1
  104. package/lib/commands/menu/group-create.js +1 -1
  105. package/lib/commands/menu/group-update.js +1 -1
  106. package/lib/commands/menu/index.js +1 -1
  107. package/lib/commands/menu/list.js +1 -1
  108. package/lib/commands/menu/move.js +1 -1
  109. package/lib/commands/menu/regroup-start.js +1 -1
  110. package/lib/commands/menu/shared/compare-table.js +1 -1
  111. package/lib/commands/menu/shared/delete-plan.js +1 -1
  112. package/lib/commands/menu/shared/facts.js +1 -1
  113. package/lib/commands/menu/shared/index.js +1 -1
  114. package/lib/commands/menu/shared/inquirer.js +1 -1
  115. package/lib/commands/menu/shared/local-pages.js +1 -1
  116. package/lib/commands/menu/shared/logic.js +1 -1
  117. package/lib/commands/menu/shared/mutations.js +1 -1
  118. package/lib/commands/menu/shared/service.js +1 -1
  119. package/lib/commands/menu/shared/sync-core.js +1 -1
  120. package/lib/commands/menu/shared/update-core.js +1 -1
  121. package/lib/commands/menu/shared/valid-url.js +1 -1
  122. package/lib/commands/menu/sync.js +1 -1
  123. package/lib/commands/menu/update.js +1 -1
  124. package/lib/commands/notification/config-list.js +1 -1
  125. package/lib/commands/notification/index.js +1 -1
  126. package/lib/commands/page/generate-start.js +1 -1
  127. package/lib/commands/page/generate-status.js +1 -1
  128. package/lib/commands/page/index.js +1 -1
  129. package/lib/commands/page/pull.js +1 -1
  130. package/lib/commands/page/push.js +1 -1
  131. package/lib/commands/page/relation-audit.js +1 -1
  132. package/lib/commands/page/shared.js +1 -1
  133. package/lib/commands/page/standard-page-status.js +1 -1
  134. package/lib/commands/page/sync.js +1 -1
  135. package/lib/commands/permit/index.js +1 -1
  136. package/lib/commands/permit/page-get.js +1 -1
  137. package/lib/commands/permit/page-set.js +1 -1
  138. package/lib/commands/permit/role-apis-set.js +1 -1
  139. package/lib/commands/permit/role-menus-set.js +1 -1
  140. package/lib/commands/permit/role-menus.js +1 -1
  141. package/lib/commands/permit/shared.js +1 -1
  142. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  143. package/lib/commands/project/create/format-elapsed.js +1 -1
  144. package/lib/commands/project/create/main.js +1 -1
  145. package/lib/commands/project/create/non-interactive.js +1 -1
  146. package/lib/commands/project/create/project-template-path.js +1 -1
  147. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  148. package/lib/commands/project/create/use-format-code.js +1 -1
  149. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  150. package/lib/commands/project/index.js +1 -1
  151. package/lib/commands/project/init.js +1 -1
  152. package/lib/commands/project/upgrade.js +1 -1
  153. package/lib/commands/registry.js +1 -1
  154. package/lib/commands/role/create.js +1 -1
  155. package/lib/commands/role/delete.js +1 -1
  156. package/lib/commands/role/detail.js +1 -1
  157. package/lib/commands/role/index.js +1 -1
  158. package/lib/commands/role/list.js +1 -1
  159. package/lib/commands/role/shared.js +1 -1
  160. package/lib/commands/role/update.js +1 -1
  161. package/lib/commands/role/user-add.js +1 -1
  162. package/lib/commands/role/user-remove.js +1 -1
  163. package/lib/commands/role/user-resolve.js +1 -1
  164. package/lib/commands/run/index.js +1 -1
  165. package/lib/commands/schema.js +1 -1
  166. package/lib/commands/sql/create.js +1 -1
  167. package/lib/commands/sql/delete.js +1 -1
  168. package/lib/commands/sql/detail.js +1 -1
  169. package/lib/commands/sql/exec.js +1 -1
  170. package/lib/commands/sql/index.js +1 -1
  171. package/lib/commands/sql/list.js +1 -1
  172. package/lib/commands/sql/pull.js +1 -1
  173. package/lib/commands/sql/push.js +1 -1
  174. package/lib/commands/sql/save.js +1 -1
  175. package/lib/commands/sql/shared.js +1 -1
  176. package/lib/commands/sql/status.js +1 -1
  177. package/lib/commands/sql/validate.js +1 -1
  178. package/lib/commands/task/index.js +1 -1
  179. package/lib/commands/task/status.js +1 -1
  180. package/lib/commands/workspace/add.js +1 -1
  181. package/lib/commands/workspace/index.js +1 -1
  182. package/lib/commands/workspace/remove.js +1 -1
  183. package/lib/config/schema.js +1 -1
  184. package/lib/constant/cdn.js +1 -1
  185. package/lib/constant/cli.js +1 -1
  186. package/lib/constant/defaults.js +1 -1
  187. package/lib/constant/domain.js +1 -1
  188. package/lib/constant/env.js +1 -1
  189. package/lib/constant/output.js +1 -1
  190. package/lib/constant/paths.js +1 -1
  191. package/lib/constant/risk.js +1 -1
  192. package/lib/context/app-resolver.js +1 -1
  193. package/lib/context/auth-resolver.js +1 -1
  194. package/lib/context/config-loader.js +1 -1
  195. package/lib/context.js +1 -1
  196. package/lib/core/alias-resolver.js +1 -1
  197. package/lib/core/api-client.js +1 -1
  198. package/lib/core/bff/config.js +1 -1
  199. package/lib/core/bff/file-system.js +1 -1
  200. package/lib/core/bff/hash.js +1 -1
  201. package/lib/core/bff/lock.js +1 -1
  202. package/lib/core/bff/utils.js +1 -1
  203. package/lib/core/db-resolver.js +1 -1
  204. package/lib/core/page/file-system.js +1 -1
  205. package/lib/core/page/hash.js +1 -1
  206. package/lib/core/page/lock.js +1 -1
  207. package/lib/core/sql-index-auditor.js +1 -1
  208. package/lib/core/sql-sync/config.js +1 -1
  209. package/lib/core/sql-sync/file-system.js +1 -1
  210. package/lib/core/sql-sync/hash.js +1 -1
  211. package/lib/core/sql-sync/lock.js +1 -1
  212. package/lib/core/sql-sync/utils.js +1 -1
  213. package/lib/core/sql-validator.js +1 -1
  214. package/lib/errors.js +1 -1
  215. package/lib/framework/build-all-flags.js +1 -1
  216. package/lib/framework/error-output.js +1 -1
  217. package/lib/framework/explicit-yes.js +1 -1
  218. package/lib/framework/flags.js +1 -1
  219. package/lib/framework/help.js +1 -1
  220. package/lib/framework/index.js +1 -1
  221. package/lib/framework/output.js +1 -1
  222. package/lib/framework/response.js +1 -1
  223. package/lib/framework/runner-alias.js +1 -1
  224. package/lib/framework/runner.js +1 -1
  225. package/lib/framework/schema-export.js +1 -1
  226. package/lib/framework/types.js +1 -1
  227. package/lib/generated/build-info.js +1 -1
  228. package/lib/help.js +1 -1
  229. package/lib/skills/main.js +1 -1
  230. package/lib/skills/npx-skills-add.js +1 -1
  231. package/lib/telemetry/cli-command-trace.js +1 -1
  232. package/lib/telemetry/cli-help-trace.js +1 -1
  233. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  234. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  235. package/lib/telemetry/send-cli-trace-log.js +1 -1
  236. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  237. package/lib/utils/ai_config.js +1 -1
  238. package/lib/utils/apply-jq-filter.js +1 -1
  239. package/lib/utils/cdn-config.js +1 -1
  240. package/lib/utils/check-sdk-version.js +1 -1
  241. package/lib/utils/cli-version-check.js +1 -1
  242. package/lib/utils/cli-version-policy.js +1 -1
  243. package/lib/utils/config.js +1 -1
  244. package/lib/utils/copy-directory.js +1 -1
  245. package/lib/utils/entity-with-id.js +1 -1
  246. package/lib/utils/file-utils.js +1 -1
  247. package/lib/utils/guides-cdn.js +1 -1
  248. package/lib/utils/http-client.js +1 -1
  249. package/lib/utils/is-non-interactive.js +1 -1
  250. package/lib/utils/logger.js +1 -1
  251. package/lib/utils/params.js +1 -1
  252. package/lib/utils/platform.js +1 -1
  253. package/lib/utils/rules-cdn.js +1 -1
  254. package/lib/utils/sleep.js +1 -1
  255. package/lib/utils/template-replacer.js +1 -1
  256. package/lib/utils/update-notice.js +1 -1
  257. package/lib/utils/version.js +1 -1
  258. package/lib/utils/with-active-cookie.js +1 -1
  259. package/lib/utils/write-cli-side-channel.js +1 -1
  260. package/package.json +1 -1
@@ -1 +1 @@
1
- function a93_0x440f(_0x53eaf7,_0x5acd65){_0x53eaf7=_0x53eaf7-0x18f;const _0x488761=a93_0x4887();let _0x440f84=_0x488761[_0x53eaf7];return _0x440f84;}const a93_0x2c1e55=a93_0x440f;(function(_0x2ee70f,_0x51e7bb){const _0x574dff=a93_0x440f,_0x3f341c=_0x2ee70f();while(!![]){try{const _0x4da305=-parseInt(_0x574dff(0x199))/0x1*(-parseInt(_0x574dff(0x1d6))/0x2)+parseInt(_0x574dff(0x1ab))/0x3+parseInt(_0x574dff(0x1c7))/0x4+-parseInt(_0x574dff(0x1a4))/0x5*(-parseInt(_0x574dff(0x1cf))/0x6)+parseInt(_0x574dff(0x1cb))/0x7+-parseInt(_0x574dff(0x19a))/0x8+-parseInt(_0x574dff(0x1b6))/0x9;if(_0x4da305===_0x51e7bb)break;else _0x3f341c['push'](_0x3f341c['shift']());}catch(_0xaae6c7){_0x3f341c['push'](_0x3f341c['shift']());}}}(a93_0x4887,0x86ad6));import a93_0x5e2b20 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x4d1a2b){const _0x436f89=a93_0x440f,_0x37c220=GIT_COMMIT!==_0x436f89(0x1d4)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x436f89(0x1a1)](0x0,0xa)+')':VERSION,_0x2bda57=buildConfigFromFlags({}),_0x5f3217=getCookie();console[_0x436f89(0x1bd)](),console[_0x436f89(0x1bd)](a93_0x5e2b20[_0x436f89(0x1c1)](CLI_BIN_NAME+_0x436f89(0x19b))),console[_0x436f89(0x1bd)](a93_0x5e2b20[_0x436f89(0x1a9)]('─'['repeat'](0x32))),console['log'](_0x436f89(0x1bc)+_0x37c220),console[_0x436f89(0x1bd)](_0x436f89(0x1d8)+process[_0x436f89(0x1b1)]),console[_0x436f89(0x1bd)](_0x436f89(0x19d)+process[_0x436f89(0x1bf)]+'\x20'+process['arch']),console[_0x436f89(0x1bd)](),console[_0x436f89(0x1bd)](a93_0x5e2b20[_0x436f89(0x1c1)](_0x436f89(0x1b4))),console['log'](a93_0x5e2b20[_0x436f89(0x1a9)]('\x20\x20─'[_0x436f89(0x1b7)](0x1e)));const _0x363d29=getGlobalConfigPath(),_0x433c91=getProjectConfigPath();console[_0x436f89(0x1bd)](_0x436f89(0x197)+(_0x363d29||a93_0x5e2b20[_0x436f89(0x1a9)](_0x436f89(0x1b0)))),console[_0x436f89(0x1bd)](_0x436f89(0x1af)+(_0x433c91||a93_0x5e2b20[_0x436f89(0x1a9)]('(not\x20found)'))),console[_0x436f89(0x1bd)](),console[_0x436f89(0x1bd)](a93_0x5e2b20['bold']('\x20\x20Config\x20JSON')),console[_0x436f89(0x1bd)](a93_0x5e2b20['gray'](_0x436f89(0x1e3)[_0x436f89(0x1b7)](0x1e)));const _0x40d4a1=(_0x490ede,_0x34cc13)=>{const _0x13d67e=_0x436f89;if(!_0x34cc13){console[_0x13d67e(0x1bd)]('\x20\x20'+_0x490ede[_0x13d67e(0x1b8)](0x11)+'\x20'+a93_0x5e2b20['gray'](_0x13d67e(0x1dd)));return;}const _0x52b16c=inspectCliConfigJsonFile(_0x34cc13);if(_0x52b16c['status']==='ok')console['log']('\x20\x20'+_0x490ede[_0x13d67e(0x1b8)](0x11)+'\x20'+a93_0x5e2b20[_0x13d67e(0x1cd)](_0x13d67e(0x1de)));else{if(_0x52b16c[_0x13d67e(0x190)]===_0x13d67e(0x1e1))console[_0x13d67e(0x1bd)]('\x20\x20'+_0x490ede[_0x13d67e(0x1b8)](0x11)+'\x20'+a93_0x5e2b20[_0x13d67e(0x1a7)](_0x13d67e(0x1ac)));else _0x52b16c[_0x13d67e(0x190)]===_0x13d67e(0x1a3)?console[_0x13d67e(0x1bd)]('\x20\x20'+_0x490ede[_0x13d67e(0x1b8)](0x11)+'\x20'+a93_0x5e2b20[_0x13d67e(0x1a9)](_0x13d67e(0x1a6))):(console[_0x13d67e(0x1bd)]('\x20\x20'+_0x490ede['padEnd'](0x11)+'\x20'+a93_0x5e2b20[_0x13d67e(0x1c2)]('✗\x20Invalid\x20JSON')),console[_0x13d67e(0x1bd)]('\x20\x20'+''[_0x13d67e(0x1b8)](0x11)+'\x20'+a93_0x5e2b20[_0x13d67e(0x1c2)](_0x52b16c[_0x13d67e(0x18f)])));}};_0x40d4a1(_0x436f89(0x193),_0x363d29),_0x40d4a1(_0x436f89(0x1b3),_0x433c91),console['log'](),console[_0x436f89(0x1bd)](a93_0x5e2b20[_0x436f89(0x1c1)](_0x436f89(0x192))),console[_0x436f89(0x1bd)](a93_0x5e2b20['gray'](_0x436f89(0x1e3)[_0x436f89(0x1b7)](0x1e))),console[_0x436f89(0x1bd)](_0x436f89(0x195)+(_0x2bda57[_0x436f89(0x1c5)]||a93_0x5e2b20['red'](_0x436f89(0x1da)))),console[_0x436f89(0x1bd)](_0x436f89(0x1d9)+_0x2bda57[_0x436f89(0x1c0)]),console['log'](_0x436f89(0x198)+_0x2bda57[_0x436f89(0x1ba)]),console[_0x436f89(0x1bd)]('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2bda57['apiDir']),console[_0x436f89(0x1bd)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x2bda57[_0x436f89(0x1b2)]||a93_0x5e2b20['gray'](_0x436f89(0x1c3)))),console[_0x436f89(0x1bd)](_0x436f89(0x1d0)+(_0x2bda57[_0x436f89(0x19e)]||a93_0x5e2b20[_0x436f89(0x1a9)](_0x436f89(0x1c3)))),console[_0x436f89(0x1bd)](_0x436f89(0x1a8)+(_0x2bda57[_0x436f89(0x1aa)]||a93_0x5e2b20[_0x436f89(0x1a9)](_0x436f89(0x1c3)))),console[_0x436f89(0x1bd)](_0x436f89(0x1d3)+(_0x2bda57[_0x436f89(0x196)]||a93_0x5e2b20[_0x436f89(0x1a9)](_0x436f89(0x1a0)+DEFAULT_CONFIG_VALUES[_0x436f89(0x196)]+')'))),console[_0x436f89(0x1bd)](_0x436f89(0x194)+(_0x2bda57['pageSize']??a93_0x5e2b20['gray']('(default)'))),console['log']('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x2bda57[_0x436f89(0x1cc)]),console[_0x436f89(0x1bd)](_0x436f89(0x1ad)+_0x2bda57['verbose']),console[_0x436f89(0x1bd)](_0x436f89(0x1e4)+(_0x2bda57[_0x436f89(0x1a5)]?a93_0x5e2b20[_0x436f89(0x1cd)](_0x436f89(0x1df)+_0x2bda57[_0x436f89(0x1a5)][_0x436f89(0x1ae)]+')'):_0x5f3217?a93_0x5e2b20['green'](_0x436f89(0x1c6)+_0x5f3217[_0x436f89(0x1ae)]+')'):a93_0x5e2b20['gray'](_0x436f89(0x1c3))));const _0x576f35=Object['keys'](_0x2bda57[_0x436f89(0x1b9)]);if(_0x576f35['length']>0x0){console[_0x436f89(0x1bd)](),console[_0x436f89(0x1bd)](a93_0x5e2b20[_0x436f89(0x1c1)]('\x20\x20Apps')),console[_0x436f89(0x1bd)](a93_0x5e2b20[_0x436f89(0x1a9)]('\x20\x20─'[_0x436f89(0x1b7)](0x1e)));for(const _0x1266b7 of _0x576f35){const _0x2b6d13=_0x2bda57[_0x436f89(0x1b9)][_0x1266b7],_0x5b1cf6=_0x1266b7===_0x2bda57[_0x436f89(0x1b2)],_0x404db3=_0x1266b7===_0x2bda57[_0x436f89(0x19e)],_0x11fea8=_0x404db3?a93_0x5e2b20['green'](_0x436f89(0x1dc)):'',_0x35c891=_0x5b1cf6?_0x436f89(0x1be):'';console[_0x436f89(0x1bd)]('\x20\x20'+_0x1266b7+_0x35c891+_0x11fea8),console[_0x436f89(0x1bd)](_0x436f89(0x1d5)+_0x2b6d13['appcode']);const _0x594109=buildAppDoctorFields(_0x2b6d13,{'env':_0x2bda57[_0x436f89(0x1c0)],'apiDir':_0x2bda57[_0x436f89(0x1ca)][_0x436f89(0x1b5)]||DEFAULT_CONFIG_VALUES[_0x436f89(0x1b5)],'cookie':_0x2bda57[_0x436f89(0x1a5)]||_0x5f3217||undefined,'accessKey':_0x2bda57[_0x436f89(0x1d7)]});console[_0x436f89(0x1bd)](_0x436f89(0x1a2)+_0x594109[_0x436f89(0x1c0)][_0x436f89(0x1db)]+'\x20\x20'+a93_0x5e2b20['gray']('('+_0x594109['env']['source']+')')),console[_0x436f89(0x1bd)]('\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20'+_0x594109[_0x436f89(0x1b5)][_0x436f89(0x1db)]+'\x20\x20'+a93_0x5e2b20['gray']('('+_0x594109['apiDir']['source']+')'));const _0x25d181=_0x594109[_0x436f89(0x1a5)][_0x436f89(0x1db)]?a93_0x5e2b20[_0x436f89(0x1cd)](_0x436f89(0x1df)+_0x594109[_0x436f89(0x1a5)]['value'][_0x436f89(0x1ae)]+')'):a93_0x5e2b20[_0x436f89(0x1a9)](_0x436f89(0x1c3));console[_0x436f89(0x1bd)](_0x436f89(0x1c4)+_0x25d181+'\x20\x20'+a93_0x5e2b20[_0x436f89(0x1a9)]('('+_0x594109[_0x436f89(0x1a5)]['source']+')'));const _0x1b8ce0=_0x594109['accessKey'][_0x436f89(0x1db)]?a93_0x5e2b20[_0x436f89(0x1cd)](_0x436f89(0x1df)+_0x594109[_0x436f89(0x1d7)][_0x436f89(0x1db)][_0x436f89(0x1ae)]+')'):a93_0x5e2b20[_0x436f89(0x1a9)]('(none)');console[_0x436f89(0x1bd)](_0x436f89(0x1c8)+_0x1b8ce0+'\x20\x20'+a93_0x5e2b20[_0x436f89(0x1a9)]('('+_0x594109[_0x436f89(0x1d7)][_0x436f89(0x1e2)]+')'));}}console[_0x436f89(0x1bd)](),console[_0x436f89(0x1bd)](a93_0x5e2b20[_0x436f89(0x1c1)](_0x436f89(0x19c))),console[_0x436f89(0x1bd)](a93_0x5e2b20[_0x436f89(0x1a9)]('\x20\x20─'['repeat'](0x1e))),console[_0x436f89(0x1bd)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console['log'](_0x436f89(0x1d2)+getUserDomain()),console['log'](_0x436f89(0x191)+getRuntimeDomain()),console[_0x436f89(0x1bd)](),console['log'](a93_0x5e2b20[_0x436f89(0x1c1)](_0x436f89(0x1e0))),console[_0x436f89(0x1bd)](a93_0x5e2b20['gray'](_0x436f89(0x1e3)[_0x436f89(0x1b7)](0x1e)));if(_0x5f3217){const _0x16d8ea=await getIsSessionValid();console[_0x436f89(0x1bd)](_0x436f89(0x1bb)+(_0x16d8ea?a93_0x5e2b20[_0x436f89(0x1cd)]('✓\x20Valid'):a93_0x5e2b20[_0x436f89(0x1c2)](_0x436f89(0x1d1))));}else console[_0x436f89(0x1bd)](_0x436f89(0x1bb)+a93_0x5e2b20[_0x436f89(0x1c2)]('✗\x20Not\x20logged\x20in'));return console[_0x436f89(0x1bd)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':a93_0x2c1e55(0x1ce),'description':a93_0x2c1e55(0x19f),'risk':a93_0x2c1e55(0x1c9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};function a93_0x4887(){const _0x3c54d9=['gray','explicitAppName','88431DCRJNN','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','version','defaultApp','Project','\x20\x20Config\x20Files','apiDir','14586894odVmLD','repeat','padEnd','apps','locale','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','log','\x20(default)','platform','env','bold','red','(none)','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','appCode','(set\x20via\x20file,\x20length=','2653384bqNzmz','\x20\x20\x20\x20accessKey:\x20\x20','read','raw','3406074nbExWP','riskLevel','green','check','666PmfxTf','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','✗\x20Expired','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','unknown','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','2203116YRevvS','accessKey','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20set)','value','\x20←\x20current','(no\x20file)','✓\x20Valid\x20JSON','(set,\x20length=','\x20\x20Auth','empty','source','\x20\x20─','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','message','status','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Merged\x20Config','Global','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1nGPvnJ','3851264WlyHYn','\x20doctor','\x20\x20API\x20Endpoints','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','(default:\x20','slice','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','missing','16795TdgPMw','cookie','(missing)','yellow','\x20\x20explicitAppName:\x20'];a93_0x4887=function(){return _0x3c54d9;};return a93_0x4887();}
1
+ const a93_0x45d91a=a93_0x5221;(function(_0x5ef121,_0x277422){const _0x160d2d=a93_0x5221,_0x127b14=_0x5ef121();while(!![]){try{const _0x5d397a=parseInt(_0x160d2d(0x165))/0x1*(parseInt(_0x160d2d(0x133))/0x2)+parseInt(_0x160d2d(0x11f))/0x3+-parseInt(_0x160d2d(0x16d))/0x4+parseInt(_0x160d2d(0x120))/0x5*(-parseInt(_0x160d2d(0x12b))/0x6)+-parseInt(_0x160d2d(0x11b))/0x7+-parseInt(_0x160d2d(0x134))/0x8+-parseInt(_0x160d2d(0x13a))/0x9*(-parseInt(_0x160d2d(0x156))/0xa);if(_0x5d397a===_0x277422)break;else _0x127b14['push'](_0x127b14['shift']());}catch(_0x1c5873){_0x127b14['push'](_0x127b14['shift']());}}}(a93_0x4721,0x42d18));import a93_0x1e06b2 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';function a93_0x5221(_0x28ac4d,_0x32f50b){_0x28ac4d=_0x28ac4d-0x11b;const _0x4721d9=a93_0x4721();let _0x522187=_0x4721d9[_0x28ac4d];return _0x522187;}function a93_0x4721(){const _0xf9c23e=['20356hKcutC','2163616oHaLnO','message','value','\x20\x20explicitAppName:\x20','platform','gray','1220121AkzvgN','\x20doctor','\x20\x20─','locale','repeat','yellow','\x20\x20Config\x20Files','✓\x20Valid\x20JSON','format','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Apps','missing','appcode','slice','apps','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(set\x20via\x20file,\x20length=','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','arch','verbose','read','red','bold','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','env','30bkrHbW','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','source','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','padEnd','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(set,\x20length=','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(missing)','cookie','appCode','accessKey','green','17lNthSN','pageSize','(none)','\x20←\x20current','doctor','\x20\x20runtimeDomain:\x20\x20\x20','log','⚠\x20Empty\x20(treated\x20as\x20{})','964516iJtnFu','keys','unknown','empty','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','28182KuKjoF','riskLevel','(default)','Project','1055127JuTvOy','710735erTUlK','defaultApp','length','apiDir','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20(default)','status','(not\x20found)','6nsrjIf','check','✗\x20Not\x20logged\x20in','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','(no\x20file)','(not\x20set)','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a93_0x4721=function(){return _0xf9c23e;};return a93_0x4721();}import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x570985){const _0x5894c0=a93_0x5221,_0x384585=GIT_COMMIT!==_0x5894c0(0x16f)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x5894c0(0x147)](0x0,0xa)+')':VERSION,_0x1c2d71=buildConfigFromFlags({}),_0xd3951d=getCookie();console[_0x5894c0(0x16b)](),console[_0x5894c0(0x16b)](a93_0x1e06b2['bold'](CLI_BIN_NAME+_0x5894c0(0x13b))),console[_0x5894c0(0x16b)](a93_0x1e06b2['gray']('─'[_0x5894c0(0x13e)](0x32))),console[_0x5894c0(0x16b)](_0x5894c0(0x127)+_0x384585),console['log']('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process['version']),console['log']('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x5894c0(0x138)]+'\x20'+process[_0x5894c0(0x14e)]),console[_0x5894c0(0x16b)](),console['log'](a93_0x1e06b2[_0x5894c0(0x152)](_0x5894c0(0x140))),console[_0x5894c0(0x16b)](a93_0x1e06b2[_0x5894c0(0x139)](_0x5894c0(0x13c)[_0x5894c0(0x13e)](0x1e)));const _0x971f6d=getGlobalConfigPath(),_0x336af4=getProjectConfigPath();console['log'](_0x5894c0(0x171)+(_0x971f6d||a93_0x1e06b2['gray'](_0x5894c0(0x12a)))),console[_0x5894c0(0x16b)](_0x5894c0(0x15d)+(_0x336af4||a93_0x1e06b2[_0x5894c0(0x139)](_0x5894c0(0x12a)))),console['log'](),console[_0x5894c0(0x16b)](a93_0x1e06b2[_0x5894c0(0x152)](_0x5894c0(0x126))),console['log'](a93_0x1e06b2[_0x5894c0(0x139)](_0x5894c0(0x13c)[_0x5894c0(0x13e)](0x1e)));const _0x5680ff=(_0x5a9a64,_0x3a3bbb)=>{const _0x2c5f85=_0x5894c0;if(!_0x3a3bbb){console['log']('\x20\x20'+_0x5a9a64[_0x2c5f85(0x15a)](0x11)+'\x20'+a93_0x1e06b2[_0x2c5f85(0x139)](_0x2c5f85(0x130)));return;}const _0x1454c8=inspectCliConfigJsonFile(_0x3a3bbb);if(_0x1454c8[_0x2c5f85(0x129)]==='ok')console['log']('\x20\x20'+_0x5a9a64[_0x2c5f85(0x15a)](0x11)+'\x20'+a93_0x1e06b2[_0x2c5f85(0x164)](_0x2c5f85(0x141)));else{if(_0x1454c8[_0x2c5f85(0x129)]===_0x2c5f85(0x170))console[_0x2c5f85(0x16b)]('\x20\x20'+_0x5a9a64[_0x2c5f85(0x15a)](0x11)+'\x20'+a93_0x1e06b2[_0x2c5f85(0x13f)](_0x2c5f85(0x16c)));else _0x1454c8[_0x2c5f85(0x129)]===_0x2c5f85(0x145)?console['log']('\x20\x20'+_0x5a9a64[_0x2c5f85(0x15a)](0x11)+'\x20'+a93_0x1e06b2[_0x2c5f85(0x139)](_0x2c5f85(0x160))):(console[_0x2c5f85(0x16b)]('\x20\x20'+_0x5a9a64[_0x2c5f85(0x15a)](0x11)+'\x20'+a93_0x1e06b2[_0x2c5f85(0x151)]('✗\x20Invalid\x20JSON')),console[_0x2c5f85(0x16b)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a93_0x1e06b2[_0x2c5f85(0x151)](_0x1454c8[_0x2c5f85(0x135)])));}};_0x5680ff('Global',_0x971f6d),_0x5680ff(_0x5894c0(0x11e),_0x336af4),console[_0x5894c0(0x16b)](),console[_0x5894c0(0x16b)](a93_0x1e06b2[_0x5894c0(0x152)]('\x20\x20Merged\x20Config')),console['log'](a93_0x1e06b2[_0x5894c0(0x139)]('\x20\x20─'[_0x5894c0(0x13e)](0x1e))),console[_0x5894c0(0x16b)](_0x5894c0(0x125)+(_0x1c2d71[_0x5894c0(0x162)]||a93_0x1e06b2[_0x5894c0(0x151)](_0x5894c0(0x131)))),console[_0x5894c0(0x16b)](_0x5894c0(0x153)+_0x1c2d71[_0x5894c0(0x155)]),console[_0x5894c0(0x16b)](_0x5894c0(0x132)+_0x1c2d71[_0x5894c0(0x13d)]),console[_0x5894c0(0x16b)](_0x5894c0(0x15b)+_0x1c2d71[_0x5894c0(0x123)]),console[_0x5894c0(0x16b)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x1c2d71[_0x5894c0(0x121)]||a93_0x1e06b2[_0x5894c0(0x139)](_0x5894c0(0x167)))),console[_0x5894c0(0x16b)](_0x5894c0(0x149)+(_0x1c2d71[_0x5894c0(0x15e)]||a93_0x1e06b2[_0x5894c0(0x139)]('(none)'))),console[_0x5894c0(0x16b)](_0x5894c0(0x137)+(_0x1c2d71['explicitAppName']||a93_0x1e06b2[_0x5894c0(0x139)](_0x5894c0(0x167)))),console[_0x5894c0(0x16b)](_0x5894c0(0x14d)+(_0x1c2d71['format']||a93_0x1e06b2[_0x5894c0(0x139)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x5894c0(0x142)]+')'))),console[_0x5894c0(0x16b)](_0x5894c0(0x157)+(_0x1c2d71[_0x5894c0(0x166)]??a93_0x1e06b2[_0x5894c0(0x139)](_0x5894c0(0x11d)))),console[_0x5894c0(0x16b)](_0x5894c0(0x14c)+_0x1c2d71[_0x5894c0(0x11c)]),console[_0x5894c0(0x16b)](_0x5894c0(0x15f)+_0x1c2d71[_0x5894c0(0x14f)]),console['log'](_0x5894c0(0x14a)+(_0x1c2d71[_0x5894c0(0x161)]?a93_0x1e06b2[_0x5894c0(0x164)](_0x5894c0(0x15c)+_0x1c2d71[_0x5894c0(0x161)][_0x5894c0(0x122)]+')'):_0xd3951d?a93_0x1e06b2[_0x5894c0(0x164)](_0x5894c0(0x14b)+_0xd3951d['length']+')'):a93_0x1e06b2[_0x5894c0(0x139)]('(none)')));const _0x23388b=Object[_0x5894c0(0x16e)](_0x1c2d71[_0x5894c0(0x148)]);if(_0x23388b[_0x5894c0(0x122)]>0x0){console[_0x5894c0(0x16b)](),console[_0x5894c0(0x16b)](a93_0x1e06b2[_0x5894c0(0x152)](_0x5894c0(0x144))),console[_0x5894c0(0x16b)](a93_0x1e06b2[_0x5894c0(0x139)]('\x20\x20─'[_0x5894c0(0x13e)](0x1e)));for(const _0x56fb97 of _0x23388b){const _0x5216ab=_0x1c2d71[_0x5894c0(0x148)][_0x56fb97],_0x3ce579=_0x56fb97===_0x1c2d71[_0x5894c0(0x121)],_0x13f200=_0x56fb97===_0x1c2d71[_0x5894c0(0x15e)],_0x37b92f=_0x13f200?a93_0x1e06b2[_0x5894c0(0x164)](_0x5894c0(0x168)):'',_0x7f4481=_0x3ce579?_0x5894c0(0x128):'';console[_0x5894c0(0x16b)]('\x20\x20'+_0x56fb97+_0x7f4481+_0x37b92f),console[_0x5894c0(0x16b)](_0x5894c0(0x12e)+_0x5216ab[_0x5894c0(0x146)]);const _0x48b51b=buildAppDoctorFields(_0x5216ab,{'env':_0x1c2d71[_0x5894c0(0x155)],'apiDir':_0x1c2d71['raw'][_0x5894c0(0x123)]||DEFAULT_CONFIG_VALUES[_0x5894c0(0x123)],'cookie':_0x1c2d71['cookie']||_0xd3951d||undefined,'accessKey':_0x1c2d71[_0x5894c0(0x163)]});console[_0x5894c0(0x16b)](_0x5894c0(0x143)+_0x48b51b['env'][_0x5894c0(0x136)]+'\x20\x20'+a93_0x1e06b2[_0x5894c0(0x139)]('('+_0x48b51b['env'][_0x5894c0(0x158)]+')')),console[_0x5894c0(0x16b)](_0x5894c0(0x124)+_0x48b51b[_0x5894c0(0x123)][_0x5894c0(0x136)]+'\x20\x20'+a93_0x1e06b2[_0x5894c0(0x139)]('('+_0x48b51b[_0x5894c0(0x123)]['source']+')'));const _0x1cdd9a=_0x48b51b['cookie'][_0x5894c0(0x136)]?a93_0x1e06b2[_0x5894c0(0x164)](_0x5894c0(0x15c)+_0x48b51b[_0x5894c0(0x161)][_0x5894c0(0x136)]['length']+')'):a93_0x1e06b2['gray'](_0x5894c0(0x167));console[_0x5894c0(0x16b)]('\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20'+_0x1cdd9a+'\x20\x20'+a93_0x1e06b2['gray']('('+_0x48b51b['cookie']['source']+')'));const _0x862cab=_0x48b51b[_0x5894c0(0x163)][_0x5894c0(0x136)]?a93_0x1e06b2[_0x5894c0(0x164)](_0x5894c0(0x15c)+_0x48b51b['accessKey'][_0x5894c0(0x136)][_0x5894c0(0x122)]+')'):a93_0x1e06b2[_0x5894c0(0x139)](_0x5894c0(0x167));console[_0x5894c0(0x16b)]('\x20\x20\x20\x20accessKey:\x20\x20'+_0x862cab+'\x20\x20'+a93_0x1e06b2['gray']('('+_0x48b51b[_0x5894c0(0x163)]['source']+')'));}}console[_0x5894c0(0x16b)](),console[_0x5894c0(0x16b)](a93_0x1e06b2[_0x5894c0(0x152)]('\x20\x20API\x20Endpoints')),console['log'](a93_0x1e06b2[_0x5894c0(0x139)](_0x5894c0(0x13c)[_0x5894c0(0x13e)](0x1e))),console['log'](_0x5894c0(0x159)+getApiDomain()),console['log']('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x5894c0(0x16b)](_0x5894c0(0x16a)+getRuntimeDomain()),console['log'](),console[_0x5894c0(0x16b)](a93_0x1e06b2[_0x5894c0(0x152)]('\x20\x20Auth')),console['log'](a93_0x1e06b2[_0x5894c0(0x139)](_0x5894c0(0x13c)[_0x5894c0(0x13e)](0x1e)));if(_0xd3951d){const _0x1c50b1=await getIsSessionValid();console[_0x5894c0(0x16b)](_0x5894c0(0x154)+(_0x1c50b1?a93_0x1e06b2[_0x5894c0(0x164)]('✓\x20Valid'):a93_0x1e06b2[_0x5894c0(0x151)]('✗\x20Expired')));}else console[_0x5894c0(0x16b)](_0x5894c0(0x154)+a93_0x1e06b2[_0x5894c0(0x151)](_0x5894c0(0x12d)));return console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a93_0x45d91a(0x169),'command':a93_0x45d91a(0x12c),'description':a93_0x45d91a(0x12f),'risk':a93_0x45d91a(0x150),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a94_0x949457=a94_0x5904;function a94_0x5904(_0x447b20,_0x26b983){_0x447b20=_0x447b20-0xd5;const _0x483f0a=a94_0x483f();let _0x590436=_0x483f0a[_0x447b20];return _0x590436;}(function(_0x420af8,_0x562613){const _0x5ea1b1=a94_0x5904,_0x42b629=_0x420af8();while(!![]){try{const _0x21829d=-parseInt(_0x5ea1b1(0xfa))/0x1+parseInt(_0x5ea1b1(0xe4))/0x2*(parseInt(_0x5ea1b1(0xdc))/0x3)+parseInt(_0x5ea1b1(0xe7))/0x4*(parseInt(_0x5ea1b1(0xf8))/0x5)+parseInt(_0x5ea1b1(0xea))/0x6+-parseInt(_0x5ea1b1(0xef))/0x7+-parseInt(_0x5ea1b1(0xf9))/0x8*(-parseInt(_0x5ea1b1(0xf4))/0x9)+parseInt(_0x5ea1b1(0xdd))/0xa;if(_0x21829d===_0x562613)break;else _0x42b629['push'](_0x42b629['shift']());}catch(_0x2f19f0){_0x42b629['push'](_0x42b629['shift']());}}}(a94_0x483f,0x98b55));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';function a94_0x483f(){const _0x7028c2=['str','196218dwLOpG','upload','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','92PnpPdb','file','Uploaded\x20file:\x20','1190106ktxeDt','filePath','Preview:\x20upload\x20','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','query-url','8745366wCTZoz','boolean','\x20to\x20development\x20app\x20','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','validation','6957MLlZnv','POST','File','trim','92915aCYmgJ','1416ioPUlQ','300804DyFRJG','bool','string','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','read','/smartapi/common/uploadFile','appCode','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','27mQJWUk','5300730qKMOCG','path','long-term','filePath\x20is\x20required.','filepath','download'];a94_0x483f=function(){return _0x7028c2;};return a94_0x483f();}import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':a94_0x949457(0xe8),'type':a94_0x949457(0xd6),'required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':a94_0x949457(0xe1),'type':a94_0x949457(0xd6),'required':!![],'description':'Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a94_0x949457(0xe2),'type':'boolean','description':a94_0x949457(0xf2)},LONG_TERM_FLAG={'name':a94_0x949457(0xdf),'type':a94_0x949457(0xf0),'description':a94_0x949457(0xdb)};function requireFilePath(_0x448c88){const _0x2b6726=a94_0x949457,_0x594a1b=_0x448c88[_0x2b6726(0xf7)]();if(!_0x594a1b)throw CliErrors[_0x2b6726(0xf3)](_0x2b6726(0xe0));return _0x594a1b;}const fileUpload={'service':a94_0x949457(0xe8),'command':a94_0x949457(0xe5),'description':a94_0x949457(0xd7),'risk':'write','flags':[FILE_FLAG],async 'dryRun'(_0x43aca8){const _0xf0081=a94_0x949457,_0x5b925a=requireDevelopmentUploadFile(_0x43aca8[_0xf0081(0xe3)]('file'),_0xf0081(0xf6));return{'method':_0xf0081(0xf5),'url':_0xf0081(0xd9),'body':{'appCode':_0x43aca8['appCode'],'multipart':{'file':_0x5b925a}},'description':_0xf0081(0xec)+_0x5b925a[_0xf0081(0xde)]+_0xf0081(0xf1)+_0x43aca8[_0xf0081(0xda)]};},async 'execute'(_0x371889){const _0x523c7f=a94_0x949457,_0x30202d=requireDevelopmentUploadFile(_0x371889[_0x523c7f(0xe3)]('file'),_0x523c7f(0xf6)),_0x3ea6a3=await uploadDevelopmentFile(_0x371889[_0x523c7f(0xda)],_0x30202d['path']);return{'ok':!![],'data':_0x3ea6a3,'message':_0x3ea6a3['filePath']?_0x523c7f(0xe9)+_0x3ea6a3[_0x523c7f(0xeb)]+_0x523c7f(0xe6):'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':'file','command':a94_0x949457(0xee),'description':a94_0x949457(0xed),'risk':a94_0x949457(0xd8),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x225508){const _0x283536=a94_0x949457,_0x54c086=requireFilePath(_0x225508[_0x283536(0xe3)](_0x283536(0xe1))),_0x20dbe2=await queryDevelopmentFileUrl(_0x54c086,{'download':_0x225508['bool']('download'),'longTerm':_0x225508[_0x283536(0xd5)]('long-term')});return{'ok':!![],'data':_0x20dbe2};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a94_0x321671=a94_0x2ac0;function a94_0x2ac0(_0x51dca9,_0x477ad7){_0x51dca9=_0x51dca9-0x1c7;const _0xad1b66=a94_0xad1b();let _0x2ac0ea=_0xad1b66[_0x51dca9];return _0x2ac0ea;}(function(_0x986abf,_0x132258){const _0x49a67d=a94_0x2ac0,_0x57e445=_0x986abf();while(!![]){try{const _0x41560d=-parseInt(_0x49a67d(0x1cd))/0x1*(parseInt(_0x49a67d(0x1df))/0x2)+parseInt(_0x49a67d(0x1cb))/0x3+-parseInt(_0x49a67d(0x1d5))/0x4+parseInt(_0x49a67d(0x1ca))/0x5*(parseInt(_0x49a67d(0x1e3))/0x6)+-parseInt(_0x49a67d(0x1d9))/0x7*(-parseInt(_0x49a67d(0x1d4))/0x8)+-parseInt(_0x49a67d(0x1e8))/0x9+-parseInt(_0x49a67d(0x1d3))/0xa;if(_0x41560d===_0x132258)break;else _0x57e445['push'](_0x57e445['shift']());}catch(_0x4e6bbf){_0x57e445['push'](_0x57e445['shift']());}}}(a94_0xad1b,0x94de7));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':a94_0x321671(0x1d0),'type':a94_0x321671(0x1db),'required':!![],'description':a94_0x321671(0x1da)},FILEPATH_FLAG={'name':a94_0x321671(0x1cc),'type':'string','required':!![],'description':a94_0x321671(0x1e1)},DOWNLOAD_FLAG={'name':a94_0x321671(0x1c7),'type':a94_0x321671(0x1c9),'description':a94_0x321671(0x1d7)},LONG_TERM_FLAG={'name':a94_0x321671(0x1cf),'type':'boolean','description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0x50a80d){const _0x5cec7b=a94_0x321671,_0x319d7b=_0x50a80d[_0x5cec7b(0x1d8)]();if(!_0x319d7b)throw CliErrors[_0x5cec7b(0x1ce)]('filePath\x20is\x20required.');return _0x319d7b;}const fileUpload={'service':a94_0x321671(0x1d0),'command':'upload','description':'Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','risk':a94_0x321671(0x1d2),'flags':[FILE_FLAG],async 'dryRun'(_0x13412f){const _0x249378=a94_0x321671,_0x3203dd=requireDevelopmentUploadFile(_0x13412f[_0x249378(0x1dc)](_0x249378(0x1d0)),_0x249378(0x1d6));return{'method':_0x249378(0x1e6),'url':_0x249378(0x1d1),'body':{'appCode':_0x13412f[_0x249378(0x1c8)],'multipart':{'file':_0x3203dd}},'description':_0x249378(0x1dd)+_0x3203dd[_0x249378(0x1e7)]+_0x249378(0x1e4)+_0x13412f['appCode']};},async 'execute'(_0x249562){const _0x504d43=a94_0x321671,_0x14b3db=requireDevelopmentUploadFile(_0x249562[_0x504d43(0x1dc)](_0x504d43(0x1d0)),_0x504d43(0x1d6)),_0x9cc186=await uploadDevelopmentFile(_0x249562[_0x504d43(0x1c8)],_0x14b3db[_0x504d43(0x1e7)]);return{'ok':!![],'data':_0x9cc186,'message':_0x9cc186[_0x504d43(0x1e2)]?'Uploaded\x20file:\x20'+_0x9cc186[_0x504d43(0x1e2)]+'.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.':'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':a94_0x321671(0x1d0),'command':'query-url','description':a94_0x321671(0x1de),'risk':a94_0x321671(0x1e0),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x31a961){const _0x204da5=a94_0x321671,_0x3e31b0=requireFilePath(_0x31a961[_0x204da5(0x1dc)]('filepath')),_0x2cf0a2=await queryDevelopmentFileUrl(_0x3e31b0,{'download':_0x31a961['bool']('download'),'longTerm':_0x31a961[_0x204da5(0x1e5)](_0x204da5(0x1cf))});return{'ok':!![],'data':_0x2cf0a2};}};function a94_0xad1b(){const _0x1dfea6=['118808gWnnwU','394100nPcSoF','File','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','trim','441PNLCzv','Path\x20to\x20the\x20local\x20file\x20to\x20upload','string','str','Preview:\x20upload\x20','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','42286AmqEHR','read','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','filePath','66918gnVHav','\x20to\x20development\x20app\x20','bool','POST','path','4577706MTDfcD','download','appCode','boolean','325cTFSQM','2402049EwIKbz','filepath','22AkMkJV','validation','long-term','file','/smartapi/common/uploadFile','write','7791690NYIwcM'];a94_0xad1b=function(){return _0x1dfea6;};return a94_0xad1b();}export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a95_0x5a322f=a95_0x1bd3;(function(_0x42274a,_0x4e074e){const _0xec7ffc=a95_0x1bd3,_0x51af85=_0x42274a();while(!![]){try{const _0x1a2806=-parseInt(_0xec7ffc(0x102))/0x1*(parseInt(_0xec7ffc(0xf0))/0x2)+parseInt(_0xec7ffc(0x105))/0x3+parseInt(_0xec7ffc(0x115))/0x4+-parseInt(_0xec7ffc(0xf6))/0x5*(-parseInt(_0xec7ffc(0xfd))/0x6)+parseInt(_0xec7ffc(0xff))/0x7+-parseInt(_0xec7ffc(0xf8))/0x8*(parseInt(_0xec7ffc(0xfa))/0x9)+-parseInt(_0xec7ffc(0x104))/0xa;if(_0x1a2806===_0x4e074e)break;else _0x51af85['push'](_0x51af85['shift']());}catch(_0x5483dc){_0x51af85['push'](_0x51af85['shift']());}}}(a95_0x33e4,0x6a2c2));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';function a95_0x33e4(){const _0x110306=['.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','yes','global','production','5akaoNS','custom','8BvSkzy','join','1156149gqRdrl','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','Use\x20`','3098028Pglzkl','valid','2445737ECLuix','bool','检测到旧配置文件,正在自动升级...\x0a','475Oyedns','appcode','8986300AbhTau','1954101lMdvPa','project','Target\x20environment','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','App\x20code\x20to\x20initialize\x20with','defaultApp','nonInteractive','log','some','appCode','env','\x20\x20Apps:\x20','Usage:\x20','\x20\x20Default:\x20','map','\x0a✓\x20Successfully\x20initialized\x20','2878408eWZbCo','validation','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','str','string','boolean','init','message','write','3262fioEJb','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform'];a95_0x33e4=function(){return _0x110306;};return a95_0x33e4();}import{getCookie}from'../../auth/get-cookie.js';function a95_0x1bd3(_0x17b5c8,_0x2348f7){_0x17b5c8=_0x17b5c8-0xee;const _0x33e4a8=a95_0x33e4();let _0x1bd3cb=_0x33e4a8[_0x17b5c8];return _0x1bd3cb;}import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x1ad7f2){return{'appCode':_0x1ad7f2,'appName':_0x1ad7f2};}function writeInitConfig(_0x592aed,_0x1026b2,_0x2b1b1f){const _0x15c215=a95_0x1bd3,_0x468ce8=resolveWriteConfigPath(_0x592aed),_0x2b1fa3=buildCanonicalProjectConfig({},{'appCodes':_0x1026b2['map'](_0x5e2b79=>_0x5e2b79[_0x15c215(0x10e)]),'env':_0x2b1b1f,'metadata':{'version':getCliVersion(),'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x468ce8,_0x2b1fa3);const _0x5f18db=_0x592aed===_0x15c215(0xf4)?'global':_0x15c215(0x106);console[_0x15c215(0x10c)](_0x15c215(0x114)+_0x5f18db+'\x20config'),console[_0x15c215(0x10c)](_0x15c215(0x110)+_0x1026b2[_0x15c215(0x113)](_0x736ae9=>_0x736ae9[_0x15c215(0x10e)])[_0x15c215(0xf9)](',\x20')),console[_0x15c215(0x10c)](_0x15c215(0x112)+_0x2b1fa3[_0x15c215(0x10a)]),console[_0x15c215(0x10c)]('\x20\x20Env:\x20'+_0x2b1fa3['env']),console['log']('\x20\x20Config:\x20'+_0x468ce8);}async function runSmartInit(_0x4b7f03){const _0x5d1141=a95_0x1bd3,_0xdfff69=process['cwd'](),_0x1fafcc=_0x4b7f03[_0x5d1141(0x100)](_0x5d1141(0xf4))?_0x5d1141(0xf4):'project',_0x522b97=_0x4b7f03[_0x5d1141(0x118)]('env')||_0x5d1141(0xf5),_0x1b4d26=_0x4b7f03[_0x5d1141(0x118)](_0x5d1141(0x103))||undefined,_0x81a40f=_0x4b7f03[_0x5d1141(0x100)](_0x5d1141(0x106));if(_0x81a40f){const {initConfig:_0xbd4cfc}=await import('../../commands/project/init.js');return _0xbd4cfc({'appcode':_0x1b4d26,'env':_0x522b97,'autoYes':_0x4b7f03[_0x5d1141(0x100)](_0x5d1141(0xf3))});}if(_0x1fafcc==='project'){const _0x20ce6c=existsSync(resolve(_0xdfff69,NEW_CONFIG_NAME)),_0x58a93f=LEGACY_CONFIG_NAMES[_0x5d1141(0x10d)](_0x1790a9=>existsSync(resolve(_0xdfff69,_0x1790a9)));if(_0x58a93f&&!_0x20ce6c)return console[_0x5d1141(0x10c)](_0x5d1141(0x101)),upgradeApp(_0x4b7f03[_0x5d1141(0x10b)],{'yes':_0x4b7f03[_0x5d1141(0x100)](_0x5d1141(0xf3))});if(_0x20ce6c)throw CliErrors['validation'](_0x5d1141(0xf2),_0x5d1141(0xfc)+CLI_BIN_NAME+_0x5d1141(0x117));}if(_0x1b4d26){const _0x571400=validateAppcode(_0x1b4d26);if(!_0x571400[_0x5d1141(0xfe)])throw CliErrors[_0x5d1141(0x116)](_0x571400[_0x5d1141(0xee)]);writeInitConfig(_0x1fafcc,[syntheticApp(_0x1b4d26)],_0x522b97);return;}if(_0x4b7f03[_0x5d1141(0x10b)])throw CliErrors['flagMissing'](_0x5d1141(0x103),_0x5d1141(0x111)+CLI_BIN_NAME+_0x5d1141(0xfb));const _0x4a3be8=getCookie(),_0x452a79=await selectMultipleApps(_0x4a3be8),_0x4bc6cf=_0x452a79===_0x5d1141(0xf7)?[syntheticApp(await promptCustomAppcode())]:_0x452a79;writeInitConfig(_0x1fafcc,_0x4bc6cf,_0x522b97);}const initFlags=[{'name':a95_0x5a322f(0xf4),'type':'boolean','description':'Write\x20to\x20global\x20config\x20instead\x20of\x20project','default':![]},{'name':a95_0x5a322f(0x10f),'type':a95_0x5a322f(0x119),'description':a95_0x5a322f(0x107),'default':a95_0x5a322f(0xf5),'enum':[...RABETBASE_ENV_VALUES]},{'name':a95_0x5a322f(0x103),'type':a95_0x5a322f(0x119),'description':a95_0x5a322f(0x109)},{'name':'project','type':a95_0x5a322f(0x11a),'description':a95_0x5a322f(0x108),'default':![]},{'name':a95_0x5a322f(0xf3),'type':a95_0x5a322f(0x11a),'description':'Auto-confirm\x20prompts','default':![]}];export const initDefinitions=[{'service':a95_0x5a322f(0x11b),'command':'run','description':a95_0x5a322f(0xf1),'risk':a95_0x5a322f(0xef),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x4d239f){return await runSmartInit(_0x4d239f),{'ok':!![]};}}];
1
+ const a95_0x454954=a95_0x5ca3;(function(_0xd41872,_0x5bc547){const _0x5a0712=a95_0x5ca3,_0x3266da=_0xd41872();while(!![]){try{const _0x12c92e=parseInt(_0x5a0712(0x17e))/0x1+-parseInt(_0x5a0712(0x15e))/0x2+-parseInt(_0x5a0712(0x172))/0x3+-parseInt(_0x5a0712(0x177))/0x4*(-parseInt(_0x5a0712(0x16a))/0x5)+-parseInt(_0x5a0712(0x164))/0x6+parseInt(_0x5a0712(0x184))/0x7+parseInt(_0x5a0712(0x171))/0x8;if(_0x12c92e===_0x5bc547)break;else _0x3266da['push'](_0x3266da['shift']());}catch(_0x29ac00){_0x3266da['push'](_0x3266da['shift']());}}}(a95_0x7674,0xa2d26));function a95_0x7674(){const _0x532885=['\x20\x20Env:\x20','str','Target\x20environment','319415hGJQJQ','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','toLocaleString','join','project','valid','run','668480MTqvFP','438909UkCJzO','global','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','validation','12pPhiGp','env','nonInteractive','boolean','appCode','log','\x20\x20Config:\x20','620422FWxPDR','custom','Auto-confirm\x20prompts','\x20config','bool','flagMissing','1968701UHVwZh','write','yes','Usage:\x20','Use\x20`','../../commands/project/init.js','message','检测到旧配置文件,正在自动升级...\x0a','\x0a✓\x20Successfully\x20initialized\x20','428724bJvhrg','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','some','cwd','Write\x20to\x20global\x20config\x20instead\x20of\x20project','production','895746SdLrlh','\x20\x20Default:\x20','appcode'];a95_0x7674=function(){return _0x532885;};return a95_0x7674();}import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';function a95_0x5ca3(_0x146e78,_0xfa2951){_0x146e78=_0x146e78-0x15a;const _0x76744e=a95_0x7674();let _0x5ca3bd=_0x76744e[_0x146e78];return _0x5ca3bd;}import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x1bf79c){return{'appCode':_0x1bf79c,'appName':_0x1bf79c};}function writeInitConfig(_0x20766b,_0x509a74,_0xf5c7cc){const _0x5e50ea=a95_0x5ca3,_0x333ebf=resolveWriteConfigPath(_0x20766b),_0x10dc7d=buildCanonicalProjectConfig({},{'appCodes':_0x509a74['map'](_0x3f22e1=>_0x3f22e1['appCode']),'env':_0xf5c7cc,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x5e50ea(0x16c)]()}});writeConfigFile(_0x333ebf,_0x10dc7d);const _0x33a455=_0x20766b==='global'?_0x5e50ea(0x173):_0x5e50ea(0x16e);console[_0x5e50ea(0x17c)](_0x5e50ea(0x15d)+_0x33a455+_0x5e50ea(0x181)),console['log']('\x20\x20Apps:\x20'+_0x509a74['map'](_0x2ab96b=>_0x2ab96b[_0x5e50ea(0x17b)])[_0x5e50ea(0x16d)](',\x20')),console[_0x5e50ea(0x17c)](_0x5e50ea(0x165)+_0x10dc7d['defaultApp']),console[_0x5e50ea(0x17c)](_0x5e50ea(0x167)+_0x10dc7d[_0x5e50ea(0x178)]),console['log'](_0x5e50ea(0x17d)+_0x333ebf);}async function runSmartInit(_0x3d1d5c){const _0x2eb052=a95_0x5ca3,_0xab5cbb=process[_0x2eb052(0x161)](),_0x5b3ffc=_0x3d1d5c[_0x2eb052(0x182)](_0x2eb052(0x173))?_0x2eb052(0x173):'project',_0x469c78=_0x3d1d5c[_0x2eb052(0x168)](_0x2eb052(0x178))||_0x2eb052(0x163),_0x14eb42=_0x3d1d5c[_0x2eb052(0x168)](_0x2eb052(0x166))||undefined,_0x4c75d9=_0x3d1d5c['bool'](_0x2eb052(0x16e));if(_0x4c75d9){const {initConfig:_0x9c0e78}=await import(_0x2eb052(0x15a));return _0x9c0e78({'appcode':_0x14eb42,'env':_0x469c78,'autoYes':_0x3d1d5c[_0x2eb052(0x182)]('yes')});}if(_0x5b3ffc===_0x2eb052(0x16e)){const _0xa615cf=existsSync(resolve(_0xab5cbb,NEW_CONFIG_NAME)),_0x3e46f0=LEGACY_CONFIG_NAMES[_0x2eb052(0x160)](_0x4ddb34=>existsSync(resolve(_0xab5cbb,_0x4ddb34)));if(_0x3e46f0&&!_0xa615cf)return console[_0x2eb052(0x17c)](_0x2eb052(0x15c)),upgradeApp(_0x3d1d5c[_0x2eb052(0x179)],{'yes':_0x3d1d5c[_0x2eb052(0x182)](_0x2eb052(0x186))});if(_0xa615cf)throw CliErrors['validation']('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.',_0x2eb052(0x188)+CLI_BIN_NAME+_0x2eb052(0x175));}if(_0x14eb42){const _0xd4a211=validateAppcode(_0x14eb42);if(!_0xd4a211[_0x2eb052(0x16f)])throw CliErrors[_0x2eb052(0x176)](_0xd4a211[_0x2eb052(0x15b)]);writeInitConfig(_0x5b3ffc,[syntheticApp(_0x14eb42)],_0x469c78);return;}if(_0x3d1d5c['nonInteractive'])throw CliErrors[_0x2eb052(0x183)]('appcode',_0x2eb052(0x187)+CLI_BIN_NAME+_0x2eb052(0x15f));const _0x35df79=getCookie(),_0x1f351e=await selectMultipleApps(_0x35df79),_0x6a10a6=_0x1f351e===_0x2eb052(0x17f)?[syntheticApp(await promptCustomAppcode())]:_0x1f351e;writeInitConfig(_0x5b3ffc,_0x6a10a6,_0x469c78);}const initFlags=[{'name':a95_0x454954(0x173),'type':'boolean','description':a95_0x454954(0x162),'default':![]},{'name':a95_0x454954(0x178),'type':'string','description':a95_0x454954(0x169),'default':a95_0x454954(0x163),'enum':[...RABETBASE_ENV_VALUES]},{'name':'appcode','type':'string','description':'App\x20code\x20to\x20initialize\x20with'},{'name':a95_0x454954(0x16e),'type':a95_0x454954(0x17a),'description':a95_0x454954(0x174),'default':![]},{'name':a95_0x454954(0x186),'type':a95_0x454954(0x17a),'description':a95_0x454954(0x180),'default':![]}];export const initDefinitions=[{'service':'init','command':a95_0x454954(0x170),'description':a95_0x454954(0x16b),'risk':a95_0x454954(0x185),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x3d95e2){return await runSmartInit(_0x3d95e2),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x19063a,_0x5eb68e){const _0x328ba8=a96_0x4d4d,_0x813c05=_0x19063a();while(!![]){try{const _0x59b668=-parseInt(_0x328ba8(0x17e))/0x1+-parseInt(_0x328ba8(0x17c))/0x2*(-parseInt(_0x328ba8(0x183))/0x3)+parseInt(_0x328ba8(0x17d))/0x4+parseInt(_0x328ba8(0x17b))/0x5*(parseInt(_0x328ba8(0x17f))/0x6)+-parseInt(_0x328ba8(0x184))/0x7*(parseInt(_0x328ba8(0x182))/0x8)+-parseInt(_0x328ba8(0x180))/0x9*(-parseInt(_0x328ba8(0x186))/0xa)+-parseInt(_0x328ba8(0x181))/0xb*(parseInt(_0x328ba8(0x185))/0xc);if(_0x59b668===_0x5eb68e)break;else _0x813c05['push'](_0x813c05['shift']());}catch(_0x55dd4e){_0x813c05['push'](_0x813c05['shift']());}}}(a96_0x4887,0x21467));function a96_0x4d4d(_0x39d33e,_0x154b36){_0x39d33e=_0x39d33e-0x17b;const _0x48877b=a96_0x4887();let _0x4d4d3d=_0x48877b[_0x39d33e];return _0x4d4d3d;}import{issueReport}from'../../commands/issue/report.js';function a96_0x4887(){const _0x29f6e1=['2928iCNYOr','10VVWOKv','55ZhLCSh','2dPfDDk','1005196ctZtmM','258508yvbLin','75312hqKqRx','1715454arOxTf','10593uVbbqA','7976syVzDd','744603nIJNrN','1393KeZJbZ'];a96_0x4887=function(){return _0x29f6e1;};return a96_0x4887();}export const issueDefinitions=[issueReport];
1
+ (function(_0x1de28a,_0x1f31f9){const _0x2d75ff=a96_0x5a05,_0x49b053=_0x1de28a();while(!![]){try{const _0x592d0e=parseInt(_0x2d75ff(0x130))/0x1*(-parseInt(_0x2d75ff(0x133))/0x2)+-parseInt(_0x2d75ff(0x12c))/0x3+parseInt(_0x2d75ff(0x12d))/0x4+-parseInt(_0x2d75ff(0x12e))/0x5+-parseInt(_0x2d75ff(0x132))/0x6+-parseInt(_0x2d75ff(0x131))/0x7*(parseInt(_0x2d75ff(0x12f))/0x8)+parseInt(_0x2d75ff(0x135))/0x9*(parseInt(_0x2d75ff(0x134))/0xa);if(_0x592d0e===_0x1f31f9)break;else _0x49b053['push'](_0x49b053['shift']());}catch(_0x5933f3){_0x49b053['push'](_0x49b053['shift']());}}}(a96_0x1a5a,0xe0439));function a96_0x5a05(_0x1103e5,_0x4e176b){_0x1103e5=_0x1103e5-0x12c;const _0x1a5a0f=a96_0x1a5a();let _0x5a05a9=_0x1a5a0f[_0x1103e5];return _0x5a05a9;}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];function a96_0x1a5a(){const _0x50d558=['3735630HEgNRO','2021458FxSYhT','27402730IcMDbT','9JfJdxD','3374373TcCchI','4995220WBbEZE','868440QmTqqO','110944tZEwIV','1wnhFvp','70DoOagy'];a96_0x1a5a=function(){return _0x50d558;};return a96_0x1a5a();}
@@ -1 +1 @@
1
- const a97_0x532c65=a97_0x1281;(function(_0x199e5d,_0xdb424b){const _0x1a5343=a97_0x1281,_0x4fe657=_0x199e5d();while(!![]){try{const _0x1fa7c7=-parseInt(_0x1a5343(0xf8))/0x1*(-parseInt(_0x1a5343(0xec))/0x2)+parseInt(_0x1a5343(0x101))/0x3*(parseInt(_0x1a5343(0xe0))/0x4)+-parseInt(_0x1a5343(0xe4))/0x5*(parseInt(_0x1a5343(0xfd))/0x6)+parseInt(_0x1a5343(0xe7))/0x7+-parseInt(_0x1a5343(0xfc))/0x8*(parseInt(_0x1a5343(0xe8))/0x9)+-parseInt(_0x1a5343(0xe9))/0xa*(-parseInt(_0x1a5343(0xe6))/0xb)+parseInt(_0x1a5343(0xe3))/0xc*(-parseInt(_0x1a5343(0xeb))/0xd);if(_0x1fa7c7===_0xdb424b)break;else _0x4fe657['push'](_0x4fe657['shift']());}catch(_0x59c951){_0x4fe657['push'](_0x4fe657['shift']());}}}(a97_0xebc4,0xe8dca));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV='RABETBASE_DISABLE_ISSUE_NUDGE';const NUDGE_SUPPRESSED_CODES=new Set([a97_0x532c65(0xed),a97_0x532c65(0xf3),a97_0x532c65(0xf1),a97_0x532c65(0xe5),'unknown_command','flag_missing','validation_error','network_error']),defaultWriter=_0x3d4a51=>{const _0xe2268d=a97_0x532c65;process[_0xe2268d(0xf7)]['write'](_0x3d4a51);};export function shouldNudgeForError(_0x594624,_0x53b536){const _0x9b240a=a97_0x532c65;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x53b536[_0x9b240a(0xe2)]===_0x9b240a(0xfb)&&_0x53b536[_0x9b240a(0xef)]==='report')return![];if(_0x594624 instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x9b240a(0xfa)](_0x594624['code']);return!![];}export function printIssueReportNudgeForError(_0x17f3c1,_0x1e8292,_0x54738a=defaultWriter){if(!shouldNudgeForError(_0x17f3c1,_0x1e8292))return;const _0x2aa937=buildSuggestedTitle(_0x17f3c1,_0x1e8292);_0x54738a(formatNudge(_0x2aa937));}function buildSuggestedTitle(_0x394add,_0x3fd1a4){const _0x40ad52=a97_0x532c65,_0x10ac49=_0x394add instanceof Error?_0x394add[_0x40ad52(0xea)]:String(_0x394add),_0x54ee12=_0x10ac49[_0x40ad52(0xf5)](/[\r\n]+/g,'\x20')['replace'](/\s+/g,'\x20')[_0x40ad52(0xe1)]()[_0x40ad52(0xfe)](0x0,0x78)['replace'](/"/g,'\x5c\x22'),_0x44424f=CLI_BIN_NAME+'\x20'+_0x3fd1a4['service']+'\x20'+_0x3fd1a4['command'];return _0x54ee12[_0x40ad52(0xf6)]>0x0?_0x44424f+':\x20'+_0x54ee12:_0x44424f;}function formatNudge(_0xa43420){const _0x3038de=a97_0x532c65;return['',_0x3038de(0xf0)+CLI_BIN_NAME+_0x3038de(0xf2),'\x20\x20'+CLI_BIN_NAME+_0x3038de(0xff),_0x3038de(0xf4)+_0xa43420+'\x22\x20\x5c','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22',_0x3038de(0xf9),_0x3038de(0xee)+NUDGE_OPT_OUT_ENV+'=1\x20to\x20silence\x20this\x20hint.',''][_0x3038de(0x100)]('\x0a');}function a97_0x1281(_0x43ff11,_0x50c71c){_0x43ff11=_0x43ff11-0xe0;const _0xebc44f=a97_0xebc4();let _0x1281e1=_0xebc44f[_0x43ff11];return _0x1281e1;}function a97_0xebc4(){const _0x444b22=['\x20issue\x20report\x20\x5c','join','9DSoWKD','786836SDumcb','trim','service','132cfkhmX','5PtYtLh','not_in_project','22cbaSWm','9594123OWIywd','5336073ykQFlr','7818050bzPKSL','message','4236388hfFEXR','44550OdMLlL','cancelled','\x20\x20Set\x20','command','Hit\x20a\x20','config_missing','\x20bug?\x20Help\x20us\x20fix\x20it:','auth_required','\x20\x20\x20\x20--title\x20\x22','replace','length','stderr','79XIIdkv','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','has','issue','8eEOffc','916296fBzYRy','slice'];a97_0xebc4=function(){return _0x444b22;};return a97_0xebc4();}
1
+ function a97_0x4edd(){const _0x18ad7a=['replace','360sGwwKb','write','issue','627683ZqwIOf','join','command','message','802518dvMyGn','cancelled','not_in_project','slice','flag_missing','18uVdJki','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','\x20\x20\x20\x20--title\x20\x22','Hit\x20a\x20','unknown_command','\x20issue\x20report\x20\x5c','\x22\x20\x5c','1221012kyHVlZ','10177960IkCGsR','1508yMjNrP','\x20\x20Set\x20','has','length','\x20bug?\x20Help\x20us\x20fix\x20it:','150941VOVuUn','service','trim','=1\x20to\x20silence\x20this\x20hint.','auth_required','RABETBASE_DISABLE_ISSUE_NUDGE','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','validation_error','network_error','5168670IlWpgq','16545RrdrGE'];a97_0x4edd=function(){return _0x18ad7a;};return a97_0x4edd();}const a97_0x2764b0=a97_0x231e;(function(_0x40c597,_0x1449d4){const _0x330ecc=a97_0x231e,_0x554f73=_0x40c597();while(!![]){try{const _0x3a3b4d=parseInt(_0x330ecc(0x1a1))/0x1+-parseInt(_0x330ecc(0x1a5))/0x2+-parseInt(_0x330ecc(0x1b1))/0x3+-parseInt(_0x330ecc(0x1b3))/0x4*(parseInt(_0x330ecc(0x1c2))/0x5)+-parseInt(_0x330ecc(0x1c1))/0x6+-parseInt(_0x330ecc(0x1b8))/0x7*(-parseInt(_0x330ecc(0x19e))/0x8)+parseInt(_0x330ecc(0x1aa))/0x9*(parseInt(_0x330ecc(0x1b2))/0xa);if(_0x3a3b4d===_0x1449d4)break;else _0x554f73['push'](_0x554f73['shift']());}catch(_0x2401fe){_0x554f73['push'](_0x554f73['shift']());}}}(a97_0x4edd,0xaee79));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a97_0x2764b0(0x1bd);const NUDGE_SUPPRESSED_CODES=new Set([a97_0x2764b0(0x1a6),a97_0x2764b0(0x1bc),'config_missing',a97_0x2764b0(0x1a7),a97_0x2764b0(0x1ae),a97_0x2764b0(0x1a9),a97_0x2764b0(0x1bf),a97_0x2764b0(0x1c0)]),defaultWriter=_0x2f393d=>{const _0x285436=a97_0x2764b0;process['stderr'][_0x285436(0x19f)](_0x2f393d);};export function shouldNudgeForError(_0x63b461,_0x22952e){const _0x3d0406=a97_0x2764b0;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x22952e[_0x3d0406(0x1b9)]===_0x3d0406(0x1a0)&&_0x22952e[_0x3d0406(0x1a3)]==='report')return![];if(_0x63b461 instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x3d0406(0x1b5)](_0x63b461['code']);return!![];}function a97_0x231e(_0x5cee28,_0x10a8f6){_0x5cee28=_0x5cee28-0x19d;const _0x4edd91=a97_0x4edd();let _0x231e40=_0x4edd91[_0x5cee28];return _0x231e40;}export function printIssueReportNudgeForError(_0x186692,_0x142357,_0x2e5640=defaultWriter){if(!shouldNudgeForError(_0x186692,_0x142357))return;const _0x71a48e=buildSuggestedTitle(_0x186692,_0x142357);_0x2e5640(formatNudge(_0x71a48e));}function buildSuggestedTitle(_0x3fc005,_0x5c739d){const _0x5ed51e=a97_0x2764b0,_0x549621=_0x3fc005 instanceof Error?_0x3fc005[_0x5ed51e(0x1a4)]:String(_0x3fc005),_0x438b3e=_0x549621['replace'](/[\r\n]+/g,'\x20')[_0x5ed51e(0x19d)](/\s+/g,'\x20')[_0x5ed51e(0x1ba)]()[_0x5ed51e(0x1a8)](0x0,0x78)['replace'](/"/g,'\x5c\x22'),_0x39fc2b=CLI_BIN_NAME+'\x20'+_0x5c739d['service']+'\x20'+_0x5c739d['command'];return _0x438b3e[_0x5ed51e(0x1b6)]>0x0?_0x39fc2b+':\x20'+_0x438b3e:_0x39fc2b;}function formatNudge(_0x1937b6){const _0x2fde7c=a97_0x2764b0;return['',_0x2fde7c(0x1ad)+CLI_BIN_NAME+_0x2fde7c(0x1b7),'\x20\x20'+CLI_BIN_NAME+_0x2fde7c(0x1af),_0x2fde7c(0x1ac)+_0x1937b6+_0x2fde7c(0x1b0),_0x2fde7c(0x1be),_0x2fde7c(0x1ab),_0x2fde7c(0x1b4)+NUDGE_OPT_OUT_ENV+_0x2fde7c(0x1bb),''][_0x2fde7c(0x1a2)]('\x0a');}
@@ -1 +1 @@
1
- const a98_0x22870d=a98_0x3125;(function(_0x32def4,_0x2ad1fa){const _0x37455d=a98_0x3125,_0x40c2ad=_0x32def4();while(!![]){try{const _0x4e2645=parseInt(_0x37455d(0x1d5))/0x1*(parseInt(_0x37455d(0x1d0))/0x2)+-parseInt(_0x37455d(0x207))/0x3*(-parseInt(_0x37455d(0x1fd))/0x4)+parseInt(_0x37455d(0x1e8))/0x5+-parseInt(_0x37455d(0x1cd))/0x6*(-parseInt(_0x37455d(0x1ec))/0x7)+parseInt(_0x37455d(0x1e6))/0x8*(-parseInt(_0x37455d(0x204))/0x9)+parseInt(_0x37455d(0x1f0))/0xa+parseInt(_0x37455d(0x1ed))/0xb*(-parseInt(_0x37455d(0x1e1))/0xc);if(_0x4e2645===_0x2ad1fa)break;else _0x40c2ad['push'](_0x40c2ad['shift']());}catch(_0x5a5e51){_0x40c2ad['push'](_0x40c2ad['shift']());}}}(a98_0x2b0a,0x82fff));function a98_0x2b0a(){const _0x14ee9c=['Platform\x20issue\x20reported','38224PfCAnL','validation','1118180inzWNi','file','length','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','7fkdyrm','983224uxCFRd','message','sanitize','9369890hOUtjW','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','title','issue','Platform\x20issue\x20reported\x20(','One-line\x20issue\x20summary','issue.description_truncated','inline','description-file','compress','string','issue.description_redaction_kinds','issue.description_redactions','267404qlrOoe','originalBytes','redactions:\x20','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','join','descriptionFilePath','\x20bytes','1422dQfLtQ','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','descriptionSource','24Ouptrj','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','issue.description','942762onkigz','str','truncated','2HbFzBu','redactionCount','issue.description_original_bytes','flagMissing','trim','64627LXsJKD','Issue\x20description\x20cannot\x20be\x20empty.','push','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','write','issue.title','POST','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','redacted\x20','\x20secret(s):\x20','redactionKinds','cwd','84Pznaag','filter','description','Failed\x20to\x20report\x20platform\x20issue:\x20'];a98_0x2b0a=function(){return _0x14ee9c;};return a98_0x2b0a();}function a98_0x3125(_0x6dae8c,_0x250115){_0x6dae8c=_0x6dae8c-0x1cc;const _0x2b0ac2=a98_0x2b0a();let _0x312579=_0x2b0ac2[_0x6dae8c];return _0x312579;}import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG=a98_0x22870d(0x1f8);export const issueReport={'service':a98_0x22870d(0x1f3),'command':'report','description':a98_0x22870d(0x208),'risk':a98_0x22870d(0x1d9),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a98_0x22870d(0x1f9),'flags':[{'name':a98_0x22870d(0x1f2),'type':a98_0x22870d(0x1fa),'required':!![],'description':a98_0x22870d(0x1f5)},{'name':a98_0x22870d(0x1e3),'type':'string','description':'Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)'},{'name':DESCRIPTION_FILE_FLAG,'type':a98_0x22870d(0x1fa),'description':a98_0x22870d(0x1eb)}],async 'validate'(_0x3af069){const _0xd82be4=a98_0x22870d,_0x30111a=_0x3af069[_0xd82be4(0x1ce)](_0xd82be4(0x1f2))[_0xd82be4(0x1d4)](),_0x228ec=_0x3af069['str'](_0xd82be4(0x1e3))[_0xd82be4(0x1d4)](),_0x297b6d=_0x3af069[_0xd82be4(0x1ce)](DESCRIPTION_FILE_FLAG)[_0xd82be4(0x1d4)]();if(!_0x30111a)throw CliErrors[_0xd82be4(0x1d3)](_0xd82be4(0x1f2),'Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.');const _0x9f8c10=_0x228ec['length']>0x0,_0x497932=_0x297b6d['length']>0x0;if(_0x9f8c10===_0x497932)throw CliErrors[_0xd82be4(0x1e7)](_0xd82be4(0x200),_0xd82be4(0x1d8));if(_0x497932){const _0x2e53a4=resolve(process[_0xd82be4(0x1e0)](),_0x297b6d);if(!existsSync(_0x2e53a4))throw CliErrors[_0xd82be4(0x1e7)]('File\x20not\x20found:\x20'+_0x2e53a4);}},async 'dryRun'(_0x571ee3){const _0x22e2ab=a98_0x22870d,_0x2e3829=await prepareIssueReport(_0x571ee3);return{'method':_0x22e2ab(0x1db),'url':'otel://'+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x2e3829['title'],'issue.description':_0x2e3829[_0x22e2ab(0x1e3)],'issue.description_original_bytes':_0x2e3829[_0x22e2ab(0x1ef)][_0x22e2ab(0x1fe)],'issue.description_truncated':_0x2e3829[_0x22e2ab(0x1ef)][_0x22e2ab(0x1cf)],'issue.description_redactions':_0x2e3829['sanitize']['redactionCount'],'issue.description_redaction_kinds':_0x2e3829[_0x22e2ab(0x1ef)]['redactionKinds'][_0x22e2ab(0x201)](',')}},'description':[_0x22e2ab(0x205),'descriptionSource:\x20'+_0x2e3829[_0x22e2ab(0x206)],_0x2e3829['descriptionFilePath']?'descriptionFile:\x20'+_0x2e3829[_0x22e2ab(0x202)]:null,_0x2e3829['sanitize'][_0x22e2ab(0x1cf)]?'truncated:\x20original\x20'+_0x2e3829[_0x22e2ab(0x1ef)][_0x22e2ab(0x1fe)]+_0x22e2ab(0x203):null,_0x2e3829[_0x22e2ab(0x1ef)]['redactionCount']>0x0?_0x22e2ab(0x1ff)+_0x2e3829[_0x22e2ab(0x1ef)][_0x22e2ab(0x1d1)]+'\x20('+_0x2e3829['sanitize'][_0x22e2ab(0x1df)][_0x22e2ab(0x201)](',\x20')+')':null][_0x22e2ab(0x1e2)](Boolean)['join']('\x0a')};},async 'execute'(_0x5a4652){const _0x5f1dd8=a98_0x22870d,_0x30967c=await prepareIssueReport(_0x5a4652);try{await sendPlatformIssueCollectLog({'title':_0x30967c[_0x5f1dd8(0x1f2)],'description':_0x30967c[_0x5f1dd8(0x1e3)],'sanitize':{'originalBytes':_0x30967c[_0x5f1dd8(0x1ef)]['originalBytes'],'truncated':_0x30967c['sanitize'][_0x5f1dd8(0x1cf)],'redactionCount':_0x30967c[_0x5f1dd8(0x1ef)][_0x5f1dd8(0x1d1)],'redactionKinds':_0x30967c['sanitize'][_0x5f1dd8(0x1df)]}});}catch(_0x107ab5){throw CliErrors['apiError'](_0x5f1dd8(0x1e4)+(_0x107ab5 instanceof Error?_0x107ab5[_0x5f1dd8(0x1ee)]:String(_0x107ab5)),_0x5f1dd8(0x1f1));}return{'ok':!![],'message':buildResultMessage(_0x30967c[_0x5f1dd8(0x1ef)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x5f1dd8(0x1da),_0x5f1dd8(0x1cc),_0x5f1dd8(0x1d2),_0x5f1dd8(0x1f6),_0x5f1dd8(0x1fc),_0x5f1dd8(0x1fb)],'issue':{'title':_0x30967c['title'],'descriptionLength':_0x30967c['description'][_0x5f1dd8(0x1ea)],'descriptionSource':_0x30967c[_0x5f1dd8(0x206)],..._0x30967c['descriptionFilePath']?{'descriptionFile':_0x30967c[_0x5f1dd8(0x202)]}:{},'sanitize':{'originalBytes':_0x30967c[_0x5f1dd8(0x1ef)][_0x5f1dd8(0x1fe)],'truncated':_0x30967c['sanitize'][_0x5f1dd8(0x1cf)],'redactions':_0x30967c[_0x5f1dd8(0x1ef)][_0x5f1dd8(0x1d1)],'redactionKinds':_0x30967c[_0x5f1dd8(0x1ef)]['redactionKinds']}}}};}};function buildResultMessage(_0xb9e4f0){const _0x51db4b=a98_0x22870d,_0x2e4ff1=[];return _0xb9e4f0['truncated']&&_0x2e4ff1[_0x51db4b(0x1d7)]('truncated\x20from\x20'+_0xb9e4f0['originalBytes']+_0x51db4b(0x203)),_0xb9e4f0[_0x51db4b(0x1d1)]>0x0&&_0x2e4ff1[_0x51db4b(0x1d7)](_0x51db4b(0x1dd)+_0xb9e4f0['redactionCount']+_0x51db4b(0x1de)+_0xb9e4f0[_0x51db4b(0x1df)][_0x51db4b(0x201)](',\x20')),_0x2e4ff1[_0x51db4b(0x1ea)]===0x0?_0x51db4b(0x1e5):_0x51db4b(0x1f4)+_0x2e4ff1['join'](';\x20')+')';}async function prepareIssueReport(_0x33501b){const _0x1c4dd1=a98_0x22870d,_0x2319a8=_0x33501b[_0x1c4dd1(0x1ce)]('title')[_0x1c4dd1(0x1d4)](),_0x51abe3=_0x33501b[_0x1c4dd1(0x1ce)](_0x1c4dd1(0x1e3)),_0x16229a=_0x33501b[_0x1c4dd1(0x1ce)](DESCRIPTION_FILE_FLAG)[_0x1c4dd1(0x1d4)]();if(!_0x16229a){const _0xe60e8b=_0x51abe3;if(!_0xe60e8b[_0x1c4dd1(0x1d4)]())throw CliErrors[_0x1c4dd1(0x1e7)](_0x1c4dd1(0x1d6),_0x1c4dd1(0x1dc));const _0x3e5dfd=sanitizeIssueDescription(_0xe60e8b);return{'title':_0x2319a8,'description':_0x3e5dfd[_0x1c4dd1(0x1e3)],'descriptionSource':_0x1c4dd1(0x1f7),'sanitize':_0x3e5dfd};}const _0xdfb67c=resolve(process['cwd'](),_0x16229a),_0x109a4a=await readFile(_0xdfb67c,'utf8');if(!_0x109a4a['trim']())throw CliErrors['validation']('Issue\x20description\x20file\x20is\x20empty:\x20'+_0xdfb67c,'Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.');const _0x5837e5=sanitizeIssueDescription(_0x109a4a);return{'title':_0x2319a8,'description':_0x5837e5['description'],'descriptionSource':_0x1c4dd1(0x1e9),'descriptionFilePath':_0xdfb67c,'sanitize':_0x5837e5};}
1
+ const a98_0x1bd83a=a98_0x5929;(function(_0x3a221f,_0x30a2f6){const _0x2ab9ba=a98_0x5929,_0x4f79c9=_0x3a221f();while(!![]){try{const _0x395d1a=-parseInt(_0x2ab9ba(0x1ee))/0x1+-parseInt(_0x2ab9ba(0x1e1))/0x2*(parseInt(_0x2ab9ba(0x1e0))/0x3)+-parseInt(_0x2ab9ba(0x1f4))/0x4*(-parseInt(_0x2ab9ba(0x20a))/0x5)+parseInt(_0x2ab9ba(0x20e))/0x6+-parseInt(_0x2ab9ba(0x1fa))/0x7+-parseInt(_0x2ab9ba(0x207))/0x8+parseInt(_0x2ab9ba(0x1f5))/0x9*(parseInt(_0x2ab9ba(0x1f8))/0xa);if(_0x395d1a===_0x30a2f6)break;else _0x4f79c9['push'](_0x4f79c9['shift']());}catch(_0x2c869f){_0x4f79c9['push'](_0x4f79c9['shift']());}}}(a98_0x48de,0x7c67d));function a98_0x48de(){const _0x2bfa35=['redactionKinds','report','3816384trknaJ','validation','push','40kguVCS','redacted\x20','string','issue.description','5862396BwVtlU','issue.title','issue.description_truncated','Issue\x20description\x20cannot\x20be\x20empty.','filter','POST','inline','join','Platform\x20issue\x20reported\x20(','flagMissing','otel://','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','issue','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','truncated','utf8','6PYIlAg','284902YeKyeH','compress','descriptionSource','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','Platform\x20issue\x20reported','File\x20not\x20found:\x20','descriptionFile:\x20','descriptionFilePath','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','\x20secret(s):\x20','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','611981ohyySB','originalBytes','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','trim','redactionCount','truncated:\x20original\x20','65900fysPNv','90SKjnXS','str','One-line\x20issue\x20summary','1210530zUXaAa','issue.description_redaction_kinds','3051300kvgnOl','cwd','write','Failed\x20to\x20report\x20platform\x20issue:\x20','description','\x20bytes','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','length','sanitize','truncated\x20from\x20','title'];a98_0x48de=function(){return _0x2bfa35;};return a98_0x48de();}import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG='description-file';export const issueReport={'service':a98_0x1bd83a(0x1dc),'command':a98_0x1bd83a(0x206),'description':a98_0x1bd83a(0x1f0),'risk':a98_0x1bd83a(0x1fc),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a98_0x1bd83a(0x1e2),'flags':[{'name':a98_0x1bd83a(0x204),'type':'string','required':!![],'description':a98_0x1bd83a(0x1f7)},{'name':a98_0x1bd83a(0x1fe),'type':a98_0x1bd83a(0x20c),'description':a98_0x1bd83a(0x1e4)},{'name':DESCRIPTION_FILE_FLAG,'type':'string','description':a98_0x1bd83a(0x1e9)}],async 'validate'(_0x3d6250){const _0x7340f=a98_0x1bd83a,_0x401859=_0x3d6250[_0x7340f(0x1f6)](_0x7340f(0x204))[_0x7340f(0x1f1)](),_0x584ea0=_0x3d6250['str'](_0x7340f(0x1fe))[_0x7340f(0x1f1)](),_0x523cd2=_0x3d6250[_0x7340f(0x1f6)](DESCRIPTION_FILE_FLAG)[_0x7340f(0x1f1)]();if(!_0x401859)throw CliErrors[_0x7340f(0x1d9)](_0x7340f(0x204),_0x7340f(0x200));const _0x31c755=_0x584ea0['length']>0x0,_0x198f97=_0x523cd2['length']>0x0;if(_0x31c755===_0x198f97)throw CliErrors['validation'](_0x7340f(0x1ec),_0x7340f(0x1ed));if(_0x198f97){const _0x59a8e1=resolve(process[_0x7340f(0x1fb)](),_0x523cd2);if(!existsSync(_0x59a8e1))throw CliErrors[_0x7340f(0x208)](_0x7340f(0x1e6)+_0x59a8e1);}},async 'dryRun'(_0x382f51){const _0x40c400=a98_0x1bd83a,_0x433375=await prepareIssueReport(_0x382f51);return{'method':_0x40c400(0x213),'url':_0x40c400(0x1da)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x433375[_0x40c400(0x204)],'issue.description':_0x433375[_0x40c400(0x1fe)],'issue.description_original_bytes':_0x433375['sanitize'][_0x40c400(0x1ef)],'issue.description_truncated':_0x433375['sanitize'][_0x40c400(0x1de)],'issue.description_redactions':_0x433375[_0x40c400(0x202)][_0x40c400(0x1f2)],'issue.description_redaction_kinds':_0x433375[_0x40c400(0x202)][_0x40c400(0x205)][_0x40c400(0x1d7)](',')}},'description':[_0x40c400(0x1db),'descriptionSource:\x20'+_0x433375['descriptionSource'],_0x433375[_0x40c400(0x1e8)]?_0x40c400(0x1e7)+_0x433375[_0x40c400(0x1e8)]:null,_0x433375[_0x40c400(0x202)][_0x40c400(0x1de)]?_0x40c400(0x1f3)+_0x433375['sanitize'][_0x40c400(0x1ef)]+_0x40c400(0x1ff):null,_0x433375['sanitize'][_0x40c400(0x1f2)]>0x0?'redactions:\x20'+_0x433375[_0x40c400(0x202)][_0x40c400(0x1f2)]+'\x20('+_0x433375[_0x40c400(0x202)][_0x40c400(0x205)][_0x40c400(0x1d7)](',\x20')+')':null][_0x40c400(0x212)](Boolean)['join']('\x0a')};},async 'execute'(_0x1c8472){const _0x5e1678=a98_0x1bd83a,_0x57e4cc=await prepareIssueReport(_0x1c8472);try{await sendPlatformIssueCollectLog({'title':_0x57e4cc['title'],'description':_0x57e4cc[_0x5e1678(0x1fe)],'sanitize':{'originalBytes':_0x57e4cc[_0x5e1678(0x202)]['originalBytes'],'truncated':_0x57e4cc[_0x5e1678(0x202)][_0x5e1678(0x1de)],'redactionCount':_0x57e4cc['sanitize'][_0x5e1678(0x1f2)],'redactionKinds':_0x57e4cc[_0x5e1678(0x202)]['redactionKinds']}});}catch(_0x25f594){throw CliErrors['apiError'](_0x5e1678(0x1fd)+(_0x25f594 instanceof Error?_0x25f594['message']:String(_0x25f594)),_0x5e1678(0x1dd));}return{'ok':!![],'message':buildResultMessage(_0x57e4cc[_0x5e1678(0x202)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x5e1678(0x20f),_0x5e1678(0x20d),'issue.description_original_bytes',_0x5e1678(0x210),'issue.description_redactions',_0x5e1678(0x1f9)],'issue':{'title':_0x57e4cc[_0x5e1678(0x204)],'descriptionLength':_0x57e4cc[_0x5e1678(0x1fe)]['length'],'descriptionSource':_0x57e4cc[_0x5e1678(0x1e3)],..._0x57e4cc[_0x5e1678(0x1e8)]?{'descriptionFile':_0x57e4cc[_0x5e1678(0x1e8)]}:{},'sanitize':{'originalBytes':_0x57e4cc[_0x5e1678(0x202)][_0x5e1678(0x1ef)],'truncated':_0x57e4cc[_0x5e1678(0x202)][_0x5e1678(0x1de)],'redactions':_0x57e4cc[_0x5e1678(0x202)][_0x5e1678(0x1f2)],'redactionKinds':_0x57e4cc[_0x5e1678(0x202)]['redactionKinds']}}}};}};function a98_0x5929(_0x25473d,_0x21ca93){_0x25473d=_0x25473d-0x1d6;const _0x48deba=a98_0x48de();let _0x5929fb=_0x48deba[_0x25473d];return _0x5929fb;}function buildResultMessage(_0x13ccce){const _0x543616=a98_0x1bd83a,_0x478c1f=[];return _0x13ccce['truncated']&&_0x478c1f[_0x543616(0x209)](_0x543616(0x203)+_0x13ccce[_0x543616(0x1ef)]+'\x20bytes'),_0x13ccce[_0x543616(0x1f2)]>0x0&&_0x478c1f[_0x543616(0x209)](_0x543616(0x20b)+_0x13ccce[_0x543616(0x1f2)]+_0x543616(0x1ea)+_0x13ccce[_0x543616(0x205)]['join'](',\x20')),_0x478c1f[_0x543616(0x201)]===0x0?_0x543616(0x1e5):_0x543616(0x1d8)+_0x478c1f['join'](';\x20')+')';}async function prepareIssueReport(_0x1507bd){const _0x3e0a79=a98_0x1bd83a,_0x13534e=_0x1507bd['str'](_0x3e0a79(0x204))[_0x3e0a79(0x1f1)](),_0x38e1ba=_0x1507bd['str']('description'),_0x5b974e=_0x1507bd[_0x3e0a79(0x1f6)](DESCRIPTION_FILE_FLAG)[_0x3e0a79(0x1f1)]();if(!_0x5b974e){const _0x1d13f8=_0x38e1ba;if(!_0x1d13f8[_0x3e0a79(0x1f1)]())throw CliErrors[_0x3e0a79(0x208)](_0x3e0a79(0x211),'Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.');const _0x16662a=sanitizeIssueDescription(_0x1d13f8);return{'title':_0x13534e,'description':_0x16662a['description'],'descriptionSource':_0x3e0a79(0x1d6),'sanitize':_0x16662a};}const _0x260264=resolve(process['cwd'](),_0x5b974e),_0x502b92=await readFile(_0x260264,_0x3e0a79(0x1df));if(!_0x502b92[_0x3e0a79(0x1f1)]())throw CliErrors[_0x3e0a79(0x208)]('Issue\x20description\x20file\x20is\x20empty:\x20'+_0x260264,_0x3e0a79(0x1eb));const _0x12d818=sanitizeIssueDescription(_0x502b92);return{'title':_0x13534e,'description':_0x12d818[_0x3e0a79(0x1fe)],'descriptionSource':'file','descriptionFilePath':_0x260264,'sanitize':_0x12d818};}
@@ -1 +1 @@
1
- const a99_0x21adac=a99_0x5992;(function(_0x11ce57,_0x544b3b){const _0x30a5ab=a99_0x5992,_0x25b577=_0x11ce57();while(!![]){try{const _0x33d535=-parseInt(_0x30a5ab(0x95))/0x1*(parseInt(_0x30a5ab(0x86))/0x2)+parseInt(_0x30a5ab(0x9a))/0x3*(parseInt(_0x30a5ab(0x8b))/0x4)+-parseInt(_0x30a5ab(0x9f))/0x5*(parseInt(_0x30a5ab(0x96))/0x6)+parseInt(_0x30a5ab(0x98))/0x7+parseInt(_0x30a5ab(0x7b))/0x8*(parseInt(_0x30a5ab(0x8c))/0x9)+parseInt(_0x30a5ab(0x7c))/0xa*(-parseInt(_0x30a5ab(0x8e))/0xb)+parseInt(_0x30a5ab(0x9b))/0xc;if(_0x33d535===_0x544b3b)break;else _0x25b577['push'](_0x25b577['shift']());}catch(_0x2f8762){_0x25b577['push'](_0x25b577['shift']());}}}(a99_0x1076,0x4ca91));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a99_0x21adac(0x99),REDACTION_RULES=[{'kind':a99_0x21adac(0x81),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a99_0x21adac(0x8f)},{'kind':a99_0x21adac(0x83),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a99_0x21adac(0x93)},{'kind':a99_0x21adac(0x7e),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a99_0x21adac(0x89)},{'kind':a99_0x21adac(0x82),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a99_0x21adac(0x94)},{'kind':a99_0x21adac(0x7f),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a99_0x21adac(0x91)},{'kind':a99_0x21adac(0x9e),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':'REDACTED:bearer-jwt'}];export function sanitizeIssueDescription(_0x42b8c5){const _0x459d8e=a99_0x21adac,_0x314064=Buffer[_0x459d8e(0x85)](_0x42b8c5,_0x459d8e(0x90)),_0x42ce4f=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x2f7f87=_0x42b8c5,_0x1adf00=0x0;const _0x5b2525=[];if(!_0x42ce4f){const _0xe682a9=protectOssAccessKeyIds(_0x2f7f87);_0x2f7f87=_0xe682a9[_0x459d8e(0x88)];for(const _0x316fb6 of REDACTION_RULES){let _0x536757=0x0;_0x2f7f87=_0x2f7f87[_0x459d8e(0x8d)](_0x316fb6['pattern'],(_0x45505b,_0x4c90e0)=>{const _0x21d27d=_0x459d8e;_0x536757+=0x1;const _0x62c372=typeof _0x4c90e0===_0x21d27d(0x97)?_0x4c90e0:'';return _0x62c372+'['+_0x316fb6['label']+']';}),_0x536757>0x0&&(_0x1adf00+=_0x536757,!_0x5b2525[_0x459d8e(0x9c)](_0x316fb6[_0x459d8e(0x8a)])&&_0x5b2525[_0x459d8e(0x84)](_0x316fb6[_0x459d8e(0x8a)]));}_0x2f7f87=_0xe682a9['restore'](_0x2f7f87);}let _0x4b1438=![];if(Buffer[_0x459d8e(0x85)](_0x2f7f87,'utf8')>ISSUE_DESCRIPTION_MAX_BYTES){_0x4b1438=!![];const _0x195708=Buffer[_0x459d8e(0x85)](TRUNCATION_NOTICE,'utf8'),_0x571937=Math['max'](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x195708);_0x2f7f87=sliceUtf8Bytes(_0x2f7f87,_0x571937)+TRUNCATION_NOTICE;}return{'description':_0x2f7f87,'originalBytes':_0x314064,'truncated':_0x4b1438,'redactionCount':_0x1adf00,'redactionKinds':_0x5b2525};}function a99_0x5992(_0x473428,_0x2b4941){_0x473428=_0x473428-0x7a;const _0x1076b3=a99_0x1076();let _0x599259=_0x1076b3[_0x473428];return _0x599259;}function protectOssAccessKeyIds(_0x16ab15){const _0x3edee1=a99_0x21adac,_0x126210=[],_0x2eda8f=_0x16ab15[_0x3edee1(0x8d)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x470357,_0x43dd64)=>{const _0xcfa48e=_0x3edee1,_0x11c1f8=_0x126210['push'](_0x470357[_0xcfa48e(0x7a)](_0x43dd64[_0xcfa48e(0x7d)]))-0x1;return _0x43dd64+_0xcfa48e(0x87)+_0x11c1f8+'__';});return{'description':_0x2eda8f,'restore':_0x54edd3=>_0x54edd3[_0x3edee1(0x8d)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x4cccfd,_0x584112,_0x3d3926)=>{const _0x1722b2=_0x126210[Number(_0x3d3926)];return _0x1722b2===undefined?_0x4cccfd:''+_0x584112+_0x1722b2;})};}function sliceUtf8Bytes(_0x5b813f,_0x488198){const _0x485577=a99_0x21adac;if(_0x488198<=0x0)return'';const _0x33a07f=Buffer[_0x485577(0x9d)](_0x5b813f,_0x485577(0x90));if(_0x33a07f[_0x485577(0x85)]<=_0x488198)return _0x5b813f;let _0x23975d=_0x488198;while(_0x23975d>0x0){const _0x1aed1e=_0x33a07f[_0x23975d];if(_0x1aed1e===undefined||(_0x1aed1e&0xc0)!==0x80)break;_0x23975d-=0x1;}return _0x33a07f[_0x485577(0x80)](0x0,_0x23975d)[_0x485577(0x92)](_0x485577(0x90));}function a99_0x1076(){const _0x950aa2=['private-key','password','subarray','cookie','access-key','authorization','push','byteLength','33206QwatMs','__RB_OSS_ID_','description','REDACTED:private-key','kind','4ZbdcQr','423ITMmFs','replace','33bwYVLa','REDACTED:cookie','utf8','REDACTED:password','toString','REDACTED:authorization','REDACTED:access-key','11twYNnU','1106022dXepqF','string','4368875MuJyxZ','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','154980zzBJHn','5969052uJGkWd','includes','from','bearer-jwt','10mgcEvT','slice','37480XeSdlV','1760310JVrDIJ','length'];a99_0x1076=function(){return _0x950aa2;};return a99_0x1076();}
1
+ const a99_0x4307e8=a99_0x7f12;function a99_0xca3c(){const _0x4a6861=['1384908qAXAtV','79854dKFdRU','REDACTED:password','length','byteLength','access-key','623160ztiBMb','max','kind','from','utf8','slice','5777079omWBht','description','8xrfrWO','bearer-jwt','toString','label','283565PVKbjt','restore','password','replace','cookie','__RB_OSS_ID_','private-key','646148WYJHme','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','REDACTED:private-key','string','780921KQHHEJ','subarray','REDACTED:cookie','REDACTED:bearer-jwt','push','includes'];a99_0xca3c=function(){return _0x4a6861;};return a99_0xca3c();}(function(_0x2d6307,_0x506b67){const _0x40fd1a=a99_0x7f12,_0xdfa32=_0x2d6307();while(!![]){try{const _0x2361f1=parseInt(_0x40fd1a(0xd7))/0x1+-parseInt(_0x40fd1a(0xe9))/0x2+parseInt(_0x40fd1a(0xe2))/0x3+parseInt(_0x40fd1a(0xde))/0x4+parseInt(_0x40fd1a(0xee))/0x5+parseInt(_0x40fd1a(0xe8))/0x6+-parseInt(_0x40fd1a(0xf4))/0x7*(parseInt(_0x40fd1a(0xf6))/0x8);if(_0x2361f1===_0x506b67)break;else _0xdfa32['push'](_0xdfa32['shift']());}catch(_0x674dad){_0xdfa32['push'](_0xdfa32['shift']());}}}(a99_0xca3c,0x2fc33));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a99_0x4307e8(0xdf),REDACTION_RULES=[{'kind':a99_0x4307e8(0xdb),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a99_0x4307e8(0xe4)},{'kind':'authorization','pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':'REDACTED:authorization'},{'kind':a99_0x4307e8(0xdd),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a99_0x4307e8(0xe0)},{'kind':a99_0x4307e8(0xed),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':'REDACTED:access-key'},{'kind':a99_0x4307e8(0xd9),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a99_0x4307e8(0xea)},{'kind':a99_0x4307e8(0xf7),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a99_0x4307e8(0xe5)}];export function sanitizeIssueDescription(_0x472d0a){const _0x475953=a99_0x4307e8,_0x3480c0=Buffer[_0x475953(0xec)](_0x472d0a,_0x475953(0xf2)),_0x125fd0=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0xd1ad7c=_0x472d0a,_0x523971=0x0;const _0x4efc40=[];if(!_0x125fd0){const _0x53d87a=protectOssAccessKeyIds(_0xd1ad7c);_0xd1ad7c=_0x53d87a[_0x475953(0xf5)];for(const _0xfa761e of REDACTION_RULES){let _0x155faa=0x0;_0xd1ad7c=_0xd1ad7c[_0x475953(0xda)](_0xfa761e['pattern'],(_0x54beaa,_0x4c0a69)=>{const _0x3ca33b=_0x475953;_0x155faa+=0x1;const _0x701ac4=typeof _0x4c0a69===_0x3ca33b(0xe1)?_0x4c0a69:'';return _0x701ac4+'['+_0xfa761e[_0x3ca33b(0xd6)]+']';}),_0x155faa>0x0&&(_0x523971+=_0x155faa,!_0x4efc40[_0x475953(0xe7)](_0xfa761e['kind'])&&_0x4efc40[_0x475953(0xe6)](_0xfa761e[_0x475953(0xf0)]));}_0xd1ad7c=_0x53d87a[_0x475953(0xd8)](_0xd1ad7c);}let _0x453dfe=![];if(Buffer[_0x475953(0xec)](_0xd1ad7c,_0x475953(0xf2))>ISSUE_DESCRIPTION_MAX_BYTES){_0x453dfe=!![];const _0x4c85b2=Buffer[_0x475953(0xec)](TRUNCATION_NOTICE,_0x475953(0xf2)),_0x2bdbbb=Math[_0x475953(0xef)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x4c85b2);_0xd1ad7c=sliceUtf8Bytes(_0xd1ad7c,_0x2bdbbb)+TRUNCATION_NOTICE;}return{'description':_0xd1ad7c,'originalBytes':_0x3480c0,'truncated':_0x453dfe,'redactionCount':_0x523971,'redactionKinds':_0x4efc40};}function a99_0x7f12(_0x195feb,_0x56f9e9){_0x195feb=_0x195feb-0xd6;const _0xca3c1f=a99_0xca3c();let _0x7f1232=_0xca3c1f[_0x195feb];return _0x7f1232;}function protectOssAccessKeyIds(_0x1de745){const _0x352ce2=a99_0x4307e8,_0x8564f0=[],_0x2e2e90=_0x1de745['replace'](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x202224,_0x56ea48)=>{const _0x2bba0d=a99_0x7f12,_0x7ac91e=_0x8564f0['push'](_0x202224[_0x2bba0d(0xf3)](_0x56ea48[_0x2bba0d(0xeb)]))-0x1;return _0x56ea48+_0x2bba0d(0xdc)+_0x7ac91e+'__';});return{'description':_0x2e2e90,'restore':_0x560b33=>_0x560b33[_0x352ce2(0xda)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x27f78a,_0xd16756,_0x2c79ca)=>{const _0x14dc2f=_0x8564f0[Number(_0x2c79ca)];return _0x14dc2f===undefined?_0x27f78a:''+_0xd16756+_0x14dc2f;})};}function sliceUtf8Bytes(_0x272bbd,_0x54a3ff){const _0x1b57cf=a99_0x4307e8;if(_0x54a3ff<=0x0)return'';const _0x41fe47=Buffer[_0x1b57cf(0xf1)](_0x272bbd,_0x1b57cf(0xf2));if(_0x41fe47[_0x1b57cf(0xec)]<=_0x54a3ff)return _0x272bbd;let _0x90f7d5=_0x54a3ff;while(_0x90f7d5>0x0){const _0x510b5f=_0x41fe47[_0x90f7d5];if(_0x510b5f===undefined||(_0x510b5f&0xc0)!==0x80)break;_0x90f7d5-=0x1;}return _0x41fe47[_0x1b57cf(0xe3)](0x0,_0x90f7d5)[_0x1b57cf(0xf8)]('utf8');}
@@ -1 +1 @@
1
- function a100_0x3001(){const _0x1635a4=['log','toLocaleString','\x20\x20\x20Time:\x20','*\x20Logs\x20cleared','duration','readLogs','en-US','48261kTyIOq','write','877758NjAOFU','\x20\x20\x20Duration:\x20','20BhwfVL','length','logs','clearLogs','\x20\x20\x20Details:\x20','message','476228gWnIho','32090NaTJKJ','read','warn','details','913nyUtXL','forEach','202VnCeyD','213021uQPkNw','success','error','*\x20No\x20logs\x20found','890qWSHek','level','clear','152YSECQB','5624983ktynWN','command'];a100_0x3001=function(){return _0x1635a4;};return a100_0x3001();}const a100_0xf18e49=a100_0x20d7;(function(_0x5767ae,_0x4e74c4){const _0x9f382d=a100_0x20d7,_0x5a4917=_0x5767ae();while(!![]){try{const _0x24d08b=parseInt(_0x9f382d(0x115))/0x1*(-parseInt(_0x9f382d(0x11a))/0x2)+-parseInt(_0x9f382d(0x127))/0x3+parseInt(_0x9f382d(0x10e))/0x4+-parseInt(_0x9f382d(0x108))/0x5*(-parseInt(_0x9f382d(0x106))/0x6)+-parseInt(_0x9f382d(0x11e))/0x7+parseInt(_0x9f382d(0x11d))/0x8*(parseInt(_0x9f382d(0x116))/0x9)+parseInt(_0x9f382d(0x10f))/0xa*(parseInt(_0x9f382d(0x113))/0xb);if(_0x24d08b===_0x4e74c4)break;else _0x5a4917['push'](_0x5a4917['shift']());}catch(_0x5ee39e){_0x5a4917['push'](_0x5a4917['shift']());}}}(a100_0x3001,0x7cb15));import{logger}from'../../utils/logger.js';function printLogs(_0x376fc1){const _0x77aa0c=a100_0x20d7;if(_0x376fc1[_0x77aa0c(0x109)]===0x0){console[_0x77aa0c(0x120)](_0x77aa0c(0x119));return;}console[_0x77aa0c(0x120)]('*\x20Lovrabet\x20CLI\x20logs:\x0a'),_0x376fc1[_0x77aa0c(0x114)]((_0xca2b41,_0x4993dd)=>{const _0x4d17ea=_0x77aa0c,_0x978fb0=new Date(_0xca2b41['timestamp'])[_0x4d17ea(0x121)](_0x4d17ea(0x126)),_0x266836=_0xca2b41[_0x4d17ea(0x11b)]===_0x4d17ea(0x117)?'√':_0xca2b41[_0x4d17ea(0x11b)]===_0x4d17ea(0x118)?'×':_0xca2b41['level']===_0x4d17ea(0x111)?'!':'i';console[_0x4d17ea(0x120)](_0x4993dd+0x1+'.\x20'+_0x266836+'\x20['+_0xca2b41[_0x4d17ea(0x11f)]+']\x20'+_0xca2b41[_0x4d17ea(0x10d)]),console[_0x4d17ea(0x120)](_0x4d17ea(0x122)+_0x978fb0),_0xca2b41[_0x4d17ea(0x124)]&&console[_0x4d17ea(0x120)](_0x4d17ea(0x107)+_0xca2b41['duration']+'ms'),_0xca2b41[_0x4d17ea(0x112)]&&Object['keys'](_0xca2b41[_0x4d17ea(0x112)])[_0x4d17ea(0x109)]>0x0&&console[_0x4d17ea(0x120)](_0x4d17ea(0x10c)+JSON['stringify'](_0xca2b41[_0x4d17ea(0x112)],null,0x2)),console[_0x4d17ea(0x120)]('');});}function a100_0x20d7(_0x429f02,_0x49c8a2){_0x429f02=_0x429f02-0x106;const _0x30015b=a100_0x3001();let _0x20d7be=_0x30015b[_0x429f02];return _0x20d7be;}export const logsDefinitions=[{'service':a100_0xf18e49(0x10a),'command':'show','description':'View\x20command\x20history\x20logs','risk':a100_0xf18e49(0x110),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1d7ad9){const _0x1b72a2=a100_0xf18e49;return printLogs(logger[_0x1b72a2(0x125)]()),{'ok':!![]};}},{'service':'logs','command':a100_0xf18e49(0x11c),'description':'Clear\x20command\x20history\x20logs','risk':a100_0xf18e49(0x128),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5c4c01){const _0xc482fe=a100_0xf18e49;return logger[_0xc482fe(0x10b)](),console[_0xc482fe(0x120)](_0xc482fe(0x123)),{'ok':!![]};}}];
1
+ function a100_0x1a90(){const _0x165a84=['en-US','25dYyHkw','6TWBHLt','13264620Jnazqe','logs','write','236HUrtDC','success','\x20\x20\x20Duration:\x20','readLogs','length','7707462zlLaIm','24797102lnOovR','read','clearLogs','log','error','\x20\x20\x20Details:\x20','toLocaleString','stringify','timestamp','*\x20No\x20logs\x20found','View\x20command\x20history\x20logs','warn','12symPuD','show','forEach','level','45QlrBlA','52179rnaXDN','115666VqCDZO','keys','command','details','628688CwFQzE','3930765mkEQoy','\x20\x20\x20Time:\x20'];a100_0x1a90=function(){return _0x165a84;};return a100_0x1a90();}const a100_0x30c027=a100_0x18ef;(function(_0x4547d1,_0x5f3a2b){const _0x5cd809=a100_0x18ef,_0x46fc84=_0x4547d1();while(!![]){try{const _0x37f1e2=parseInt(_0x5cd809(0x1d5))/0x1*(-parseInt(_0x5cd809(0x1cd))/0x2)+parseInt(_0x5cd809(0x1cc))/0x3*(parseInt(_0x5cd809(0x1da))/0x4)+-parseInt(_0x5cd809(0x1d2))/0x5*(-parseInt(_0x5cd809(0x1d6))/0x6)+parseInt(_0x5cd809(0x1df))/0x7+parseInt(_0x5cd809(0x1d1))/0x8*(parseInt(_0x5cd809(0x1cb))/0x9)+parseInt(_0x5cd809(0x1d7))/0xa+parseInt(_0x5cd809(0x1e0))/0xb*(-parseInt(_0x5cd809(0x1ec))/0xc);if(_0x37f1e2===_0x5f3a2b)break;else _0x46fc84['push'](_0x46fc84['shift']());}catch(_0x420778){_0x46fc84['push'](_0x46fc84['shift']());}}}(a100_0x1a90,0xe3b53));import{logger}from'../../utils/logger.js';function a100_0x18ef(_0x2f8c02,_0x5a135a){_0x2f8c02=_0x2f8c02-0x1c8;const _0x1a909b=a100_0x1a90();let _0x18eff9=_0x1a909b[_0x2f8c02];return _0x18eff9;}function printLogs(_0x20e3f5){const _0x3572ff=a100_0x18ef;if(_0x20e3f5['length']===0x0){console[_0x3572ff(0x1e3)](_0x3572ff(0x1e9));return;}console[_0x3572ff(0x1e3)]('*\x20Lovrabet\x20CLI\x20logs:\x0a'),_0x20e3f5[_0x3572ff(0x1c9)]((_0x74a3dd,_0x5e9f18)=>{const _0x39e36b=_0x3572ff,_0x1a616e=new Date(_0x74a3dd[_0x39e36b(0x1e8)])[_0x39e36b(0x1e6)](_0x39e36b(0x1d4)),_0x482d33=_0x74a3dd[_0x39e36b(0x1ca)]===_0x39e36b(0x1db)?'√':_0x74a3dd[_0x39e36b(0x1ca)]===_0x39e36b(0x1e4)?'×':_0x74a3dd[_0x39e36b(0x1ca)]===_0x39e36b(0x1eb)?'!':'i';console['log'](_0x5e9f18+0x1+'.\x20'+_0x482d33+'\x20['+_0x74a3dd[_0x39e36b(0x1cf)]+']\x20'+_0x74a3dd['message']),console[_0x39e36b(0x1e3)](_0x39e36b(0x1d3)+_0x1a616e),_0x74a3dd['duration']&&console[_0x39e36b(0x1e3)](_0x39e36b(0x1dc)+_0x74a3dd['duration']+'ms'),_0x74a3dd[_0x39e36b(0x1d0)]&&Object[_0x39e36b(0x1ce)](_0x74a3dd['details'])[_0x39e36b(0x1de)]>0x0&&console[_0x39e36b(0x1e3)](_0x39e36b(0x1e5)+JSON[_0x39e36b(0x1e7)](_0x74a3dd[_0x39e36b(0x1d0)],null,0x2)),console[_0x39e36b(0x1e3)]('');});}export const logsDefinitions=[{'service':'logs','command':a100_0x30c027(0x1c8),'description':a100_0x30c027(0x1ea),'risk':a100_0x30c027(0x1e1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x6dd00c){const _0x3a1f2c=a100_0x30c027;return printLogs(logger[_0x3a1f2c(0x1dd)]()),{'ok':!![]};}},{'service':a100_0x30c027(0x1d8),'command':'clear','description':'Clear\x20command\x20history\x20logs','risk':a100_0x30c027(0x1d9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xcae940){const _0x3e5dde=a100_0x30c027;return logger[_0x3e5dde(0x1e2)](),console[_0x3e5dde(0x1e3)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a101_0x17f711=a101_0x10e0;(function(_0x2a9e16,_0x3c7ec7){const _0x21d849=a101_0x10e0,_0x142f5a=_0x2a9e16();while(!![]){try{const _0x149084=parseInt(_0x21d849(0xd1))/0x1+-parseInt(_0x21d849(0x113))/0x2+parseInt(_0x21d849(0x12e))/0x3*(-parseInt(_0x21d849(0x117))/0x4)+parseInt(_0x21d849(0xce))/0x5*(-parseInt(_0x21d849(0x13e))/0x6)+parseInt(_0x21d849(0xee))/0x7+-parseInt(_0x21d849(0x118))/0x8*(-parseInt(_0x21d849(0x13c))/0x9)+parseInt(_0x21d849(0xff))/0xa;if(_0x149084===_0x3c7ec7)break;else _0x142f5a['push'](_0x142f5a['shift']());}catch(_0x2a24a9){_0x142f5a['push'](_0x142f5a['shift']());}}}(a101_0x5e94,0xcbeb7));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertMenuDeletePlanCurrent,assertMenuDeletePlanExecutable,createMenuDeletePlanFile,mutationPlanFromDeleteFile,readMenuDeletePlan,writeMenuDeletePlan}from'../../commands/menu/shared/delete-plan.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{MENU_EXPECT_FLAGS,MENU_ID_FLAG,asVerificationError,assertExpectedState,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,requireExplicitYes,requireMenu,validateExactId}from'../../commands/menu/shared/mutations.js';import{batchDeleteMenuEntities}from'../../commands/menu/shared/service.js';import{CliError,CliErrors}from'../../errors.js';const BACKEND=[{'method':a101_0x17f711(0x13d),'path':'/smartapi/menu/batchDelete'}],MENU_DELETE_ID_FLAG={...MENU_ID_FLAG,'required':![],'description':a101_0x17f711(0xd5)},MENU_DELETE_RECURSIVE_FLAG={'name':a101_0x17f711(0xdd),'type':'boolean','description':a101_0x17f711(0x123)},MENU_DELETE_PLAN_OUT_FLAG={'name':'plan-out','type':a101_0x17f711(0xdf),'description':a101_0x17f711(0x109)},MENU_DELETE_PLAN_FLAG={'name':a101_0x17f711(0x110),'type':a101_0x17f711(0xdf),'description':a101_0x17f711(0x130)};export const menuDelete={'service':a101_0x17f711(0x12a),'command':a101_0x17f711(0x134),'description':a101_0x17f711(0xdb),'risk':a101_0x17f711(0x13b),'structuredErrors':!![],'flags':[MENU_DELETE_ID_FLAG,MENU_DELETE_RECURSIVE_FLAG,MENU_DELETE_PLAN_OUT_FLAG,MENU_DELETE_PLAN_FLAG,...MENU_EXPECT_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x561430){const _0x2a8018=a101_0x17f711;_0x561430[_0x2a8018(0xf8)](_0x2a8018(0x138))?validateDeleteDryRunInput(_0x561430):validateDeleteExecuteInput(_0x561430),requireExplicitYes(_0x561430);},async 'dryRun'(_0x1c17ca){const _0xe5040=a101_0x17f711;validateDeleteDryRunInput(_0x1c17ca);const _0x5990c3=await buildDeletePlan(_0x1c17ca),_0x319b2d=createMenuDeletePlanFile(_0x1c17ca[_0xe5040(0x112)],_0x5990c3),_0x499de9=await writeMenuDeletePlan(_0x1c17ca[_0xe5040(0xcb)](_0xe5040(0x12b)),_0x319b2d),_0x1482c7=mutationResult({..._0x5990c3,'planFile':{'path':_0x499de9,'createdAt':_0x319b2d[_0xe5040(0x124)],'expiresAt':_0x319b2d[_0xe5040(0xd0)]}});return menuDryRunResult(_0x1482c7,{'method':_0xe5040(0x13d),'url':'/smartapi/menu/batchDelete','body':{'idList':_0x1482c7[_0xe5040(0xf2)]},'description':_0xe5040(0x114)+(_0x1482c7[_0xe5040(0xf2)]?.[_0xe5040(0xe6)]??0x1)+'\x20menu(s)\x20under\x20exact\x20id\x20'+_0x1482c7[_0xe5040(0x119)]['id']+';\x20execution\x20must\x20consume\x20'+_0x499de9+'.'});},async 'execute'(_0x49acf7){const _0x41c66a=a101_0x17f711;requireExplicitYes(_0x49acf7),validateDeleteExecuteInput(_0x49acf7);const _0x184691=await readMenuDeletePlan(_0x49acf7[_0x41c66a(0xcb)](_0x41c66a(0x110))),_0x52801f=mutationPlanFromDeleteFile(_0x184691['plan'],_0x184691[_0x41c66a(0xe0)]),_0x179cf4=_0x184691['plan'][_0x41c66a(0xc5)]['id'];try{assertMenuDeletePlanExecutable(_0x184691[_0x41c66a(0x110)],_0x49acf7[_0x41c66a(0x112)]);}catch(_0x47cddd){throw menuFailure(asMenuError(_0x47cddd),_0x52801f,{'stage':'plan-validation','failed':{'id':_0x179cf4}});}let _0x3d990d,_0x1e0d65;try{_0x3d990d=await fetchMutationSnapshot(_0x49acf7,_0x41c66a(0xf0),_0x179cf4),_0x1e0d65=assertMenuDeletePlanCurrent(_0x184691['plan'],_0x49acf7[_0x41c66a(0x112)],_0x3d990d),assertDeleteTargetsComplete(_0x184691[_0x41c66a(0x110)],_0x3d990d),_0x1e0d65[_0x41c66a(0x12d)](_0x3fe8c0=>assertDeleteSafety(_0x3fe8c0,_0x184691['plan'][_0x41c66a(0xdd)])),assertNoSharedPages(_0x3d990d,_0x1e0d65),assertCascadeMatchesPlan(_0x52801f,_0x1e0d65);}catch(_0x3d9658){throw menuFailure(asMenuError(_0x3d9658),_0x52801f,{'stage':'pre-write-plan-validation','failed':{'id':_0x179cf4}});}const _0x42bbc1=_0x184691['plan']['deleteOrder'];let _0x424b10;try{_0x424b10=await batchDeleteMenuEntities(_0x49acf7[_0x41c66a(0x10b)],_0x42bbc1);}catch(_0xbdc265){const _0x48673b=mapMenuApiError(_0xbdc265,'batch\x20delete'),_0xcd2c84=['The\x20batch\x20delete\x20may\x20have\x20partially\x20applied;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20creating\x20a\x20new\x20plan.'];let _0x42902e;try{_0x42902e=await readDeleteOutcome(_0x49acf7,_0x42bbc1);}catch(_0x1d8043){const _0x17df6b=describeMenuErrorCause(_0x1d8043,_0x41c66a(0xd6),_0x179cf4);_0xcd2c84['push'](_0x41c66a(0xeb)+_0x17df6b['causeCode']+'):\x20'+_0x17df6b[_0x41c66a(0x128)]);throw menuFailure(_0x48673b,_0x52801f,{'stage':_0x41c66a(0xc4),'failed':{'targetIds':_0x42bbc1,'targetIdsAbsent':_0x41c66a(0x11b),..._0x17df6b},'warnings':_0xcd2c84,'verification':{'status':_0x41c66a(0xc3),'lookupCommand':_0x41c66a(0xfa),'targetIds':_0x42bbc1}});}throw menuFailure(_0x48673b,_0x52801f,{'stage':_0x41c66a(0xc4),'succeeded':_0x42902e['absentIds']['map'](_0x16690d=>({'id':_0x16690d,'deleted':!![]})),'failed':{'targetIds':_0x42bbc1,'absentIds':_0x42902e['absentIds'],'remainingIds':_0x42902e['remainingIds']},'warnings':_0xcd2c84,'verification':verificationFromOutcome(_0x42902e)});}if(_0x424b10!==_0x42bbc1[_0x41c66a(0xe6)]){const _0x52afcb=menuError(_0x41c66a(0x132),_0x41c66a(0x12f)+_0x424b10+_0x41c66a(0xe9)+_0x42bbc1[_0x41c66a(0xe6)]+'.',_0x41c66a(0x10d)),_0x1bb992=[_0x41c66a(0xcd)];let _0x3a28fa;try{_0x3a28fa=await readDeleteOutcome(_0x49acf7,_0x42bbc1);}catch(_0x3a2c86){const _0xe72602=describeMenuErrorCause(_0x3a2c86,'read\x20menu\x20state\x20after\x20batch\x20delete\x20count\x20mismatch',_0x179cf4);_0x1bb992[_0x41c66a(0xd7)]('Post-mismatch\x20menu\x20readback\x20failed\x20('+_0xe72602['causeCode']+_0x41c66a(0xf9)+_0xe72602[_0x41c66a(0x128)]);throw menuFailure(_0x52afcb,_0x52801f,{'stage':'batch-delete','failed':{'targetIds':_0x42bbc1,'expectedCount':_0x42bbc1[_0x41c66a(0xe6)],'reportedDeletedCount':_0x424b10,'targetIdsAbsent':_0x41c66a(0x11b),..._0xe72602},'warnings':_0x1bb992,'verification':{'status':_0x41c66a(0xc3),'lookupCommand':_0x41c66a(0xfa),'targetIds':_0x42bbc1}});}throw menuFailure(_0x52afcb,_0x52801f,{'stage':_0x41c66a(0xc4),'succeeded':_0x3a28fa[_0x41c66a(0x121)][_0x41c66a(0xd9)](_0x447aa8=>({'id':_0x447aa8,'deleted':!![]})),'failed':{'targetIds':_0x42bbc1,'expectedCount':_0x42bbc1['length'],'reportedDeletedCount':_0x424b10,'absentIds':_0x3a28fa[_0x41c66a(0x121)],'remainingIds':_0x3a28fa[_0x41c66a(0x100)]},'warnings':_0x1bb992,'verification':verificationFromOutcome(_0x3a28fa)});}let _0x3b4f2b;try{_0x3b4f2b=await readDeleteOutcome(_0x49acf7,_0x42bbc1);}catch(_0x222a9f){const _0x2418e2=describeMenuErrorCause(_0x222a9f,_0x41c66a(0xdc),_0x179cf4),_0x34aace=asVerificationError(_0x222a9f,_0x41c66a(0xef)+_0x179cf4+_0x41c66a(0xe2));throw menuFailure(_0x34aace,_0x52801f,{'stage':_0x41c66a(0x104),'succeeded':_0x42bbc1[_0x41c66a(0xd9)](_0x5a8727=>({'id':_0x5a8727,'deleteRequested':!![]})),'failed':{'id':_0x179cf4,'targetIds':_0x42bbc1,'targetIdsAbsent':'unconfirmed',..._0x2418e2},'warnings':[_0x41c66a(0x101)],'verification':{'status':'failed','lookupCommand':_0x41c66a(0xfa),'targetIds':_0x42bbc1}});}if(_0x3b4f2b[_0x41c66a(0x100)][_0x41c66a(0xe6)]>0x0){const _0x17e41d=menuError(_0x41c66a(0xf4),_0x41c66a(0x10c)+_0x3b4f2b[_0x41c66a(0x100)][_0x41c66a(0x102)](',\x20')+'.',_0x41c66a(0x10d));throw menuFailure(_0x17e41d,_0x52801f,{'stage':_0x41c66a(0x104),'succeeded':_0x42bbc1[_0x41c66a(0xd9)](_0x33687c=>({'id':_0x33687c,'deleteRequested':!![]})),'failed':{'id':_0x179cf4,'targetIds':_0x42bbc1,'absentIds':_0x3b4f2b[_0x41c66a(0x121)],'remainingIds':_0x3b4f2b['remainingIds']},'warnings':['The\x20backend\x20acknowledged\x20the\x20batch\x20request,\x20but\x20final\x20menu\x20facts\x20did\x20not\x20confirm\x20every\x20deletion.'],'verification':verificationFromOutcome(_0x3b4f2b)});}const _0x55c8ba=_0x42bbc1[_0x41c66a(0xd9)](_0x4d08e2=>({'id':_0x4d08e2,'deleted':!![]})),_0x38f67b=mutationResult({..._0x52801f,'dryRun':![],'succeeded':_0x55c8ba,'verification':{'checkedBy':_0x41c66a(0x140),'plannedSnapshotHash':_0x52801f[_0x41c66a(0x13a)],'finalSnapshotHash':_0x3b4f2b[_0x41c66a(0xec)][_0x41c66a(0x13f)],'reportedDeletedCount':_0x424b10,'targetAbsent':!_0x3b4f2b[_0x41c66a(0xec)][_0x41c66a(0x136)][_0x41c66a(0xc9)](_0x179cf4),'allTargetsAbsent':!![],'targetIds':_0x42bbc1}});return{'ok':!![],'data':_0x38f67b,'message':'Deleted\x20'+_0x55c8ba[_0x41c66a(0xe6)]+'\x20menu(s)\x20under\x20exact\x20id\x20'+_0x179cf4+'.'};}};async function readDeleteOutcome(_0x5102d9,_0x10382a){const _0x1296ff=a101_0x17f711,_0x4511cf=await fetchMenuSnapshot(_0x5102d9[_0x1296ff(0x112)],_0x5102d9[_0x1296ff(0x10b)]);return{'snapshot':_0x4511cf,'absentIds':_0x10382a[_0x1296ff(0xe3)](_0x1c5992=>!_0x4511cf[_0x1296ff(0x136)][_0x1296ff(0xc9)](_0x1c5992)),'remainingIds':_0x10382a[_0x1296ff(0xe3)](_0x4acd85=>_0x4511cf[_0x1296ff(0x136)]['has'](_0x4acd85))};}function verificationFromOutcome(_0x4505a8){const _0x2b4d91=a101_0x17f711;return{'checkedBy':_0x2b4d91(0x140),'absentIds':_0x4505a8[_0x2b4d91(0x121)],'remainingIds':_0x4505a8[_0x2b4d91(0x100)]};}function a101_0x10e0(_0x533b57,_0x2ad9fe){_0x533b57=_0x533b57-0xc3;const _0x5e94d8=a101_0x5e94();let _0x10e033=_0x5e94d8[_0x533b57];return _0x10e033;}function a101_0x5e94(){const _0x5b6ddf=['selector','--plan\x20cannot\x20be\x20combined\x20with\x20--dry-run;\x20use\x20--plan-out.','unconfirmed','Menu\x20tree\x20contains\x20a\x20cycle\x20at\x20menu\x20','menu_folder_has_resources','--plan\x20is\x20required\x20for\x20menu\x20delete\x20execution.','\x20references\x20missing\x20child\x20','\x20still\x20references\x20','absentIds','pages','Include\x20every\x20descendant\x20of\x20the\x20exact\x20folder\x20id,\x20deleting\x20leaves\x20first','createdAt','/smartapi/menu/batchDelete','page\x20','flagMissing','causeMessage','childrenIds','menu','plan-out','size','forEach','6HVBZle','Backend\x20reported\x20','Required\x20for\x20execution;\x20consume\x20an\x20unexpired\x20plan\x20created\x20by\x20--plan-out','resources','menu_batch_delete_count_mismatch','\x20resource\x20URL(s).','delete','\x20has\x20an\x20unreadable\x20extend.resources\x20value\x20and\x20cannot\x20be\x20proven\x20empty.','byId','get','dry-run','pageId','snapshotHash','high-risk-write','65007sGTDnu','POST','1133598unVNSh','hash','menu\x20list','failed','batch-delete','target','Page\x20bindings\x20are\x20referenced\x20by\x20menus\x20outside\x20the\x20delete\x20plan:\x20','Recursive\x20menu\x20delete\x20plan\x20root\x20','batch-delete-menu','has','expect-path','str','childrenCount','The\x20batch\x20response\x20count\x20did\x20not\x20match\x20the\x20reviewed\x20target\x20count;\x20do\x20not\x20retry\x20the\x20same\x20plan.','30MSTrGG','Menu\x20delete\x20execution\x20consumes\x20only\x20--plan;\x20remove\x20','expiresAt','273796GZAPcj','--plan-out\x20is\x20required\x20for\x20menu\x20delete\x20dry-run\x20so\x20execution\x20can\x20consume\x20the\x20reviewed\x20plan.','indexOf','stringify','Exact\x20menu\x20id\x20(required\x20with\x20--dry-run)','read\x20menu\x20state\x20after\x20batch\x20delete\x20failure','push','Menu\x20delete\x20plan\x20cascade\x20does\x20not\x20match\x20the\x20reviewed\x20target\x20page\x20facts.','map','trim','Delete\x20an\x20exact\x20menu\x20or\x20a\x20folder\x20subtree\x20from\x20a\x20reviewed\x20plan','verify\x20batch\x20delete','recursive','folder','string','path','unknown','\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20absence','filter','menu_non_empty','toLowerCase','length','validation','add','\x20deleted\x20menus;\x20expected\x20','menu_folder_resources_invalid','Post-failure\x20menu\x20readback\x20failed\x20(','snapshot','menu_plan_invalid','5644639ybTITl','Batch\x20delete\x20request\x20for\x20menu\x20','execute\x20reviewed\x20delete\x20plan','type','deleteOrder','\x20->\x20menu\x20','menu_verification_failed','Remove\x20or\x20verify\x20the\x20resource\x20bindings\x20in\x20the\x20platform\x20before\x20deleting\x20the\x20folder.','Menu\x20','cascade','bool','):\x20','rabetbase\x20menu\x20list\x20--format\x20json','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out\x20and\x20do\x20not\x20remove\x20or\x20reorder\x20targets.','Keep\x20every\x20shared\x20page\x20reference\x20outside\x20this\x20operation,\x20or\x20choose\x20a\x20folder\x20whose\x20complete\x20subtree\x20contains\x20all\x20references.','expected-children-count','Deleting\x20page-bound\x20menus\x20invokes\x20the\x20platform\x27s\x20existing\x20page\x20and\x20PageSchema\x20cascade;\x20listed\x20page\x20ids\x20are\x20direct\x20menu\x20bindings.','9278380qXuNPg','remainingIds','The\x20batch\x20delete\x20request\x20was\x20accepted,\x20but\x20its\x20final\x20online\x20state\x20is\x20unconfirmed.','join','\x20direct\x20child\x20menu(s)\x20and\x20cannot\x20be\x20deleted.','verification','\x20and\x20cannot\x20be\x20deleted\x20safely.','\x20is\x20unexpectedly\x20bound\x20to\x20page\x20','Handle\x20child\x20ids\x20in\x20the\x20platform\x20first:\x20','menu_recursive_requires_folder','Required\x20with\x20--dry-run;\x20write\x20the\x20reviewed\x20plan\x20to\x20a\x20new\x20local\x20JSON\x20file','menus','cookie','One\x20or\x20more\x20planned\x20menus\x20are\x20still\x20present\x20after\x20the\x20batch\x20delete\x20request:\x20','Inspect\x20the\x20latest\x20menu\x20facts\x20and\x20generate\x20a\x20new\x20delete\x20plan;\x20do\x20not\x20retry\x20this\x20plan.','Inspect\x20the\x20folder\x20in\x20the\x20platform\x20before\x20deleting\x20it.','plan\x20delete','plan','\x20has\x20','appCode','1291216GRLAtz','Would\x20batch\x20delete\x20','Folder\x20','Inspect\x20and\x20repair\x20the\x20folder\x20resource\x20binding\x20in\x20the\x20platform\x20before\x20deleting\x20it.','491728nbwxkj','944UrWBKW'];a101_0x5e94=function(){return _0x5b6ddf;};return a101_0x5e94();}function validateDeleteDryRunInput(_0x1c44ea){const _0x131e74=a101_0x17f711;validateExactId(_0x1c44ea);if(!hasFlag(_0x1c44ea,'plan-out')||!_0x1c44ea[_0x131e74(0xcb)]('plan-out')['trim']())throw CliErrors[_0x131e74(0x127)](_0x131e74(0x12b),_0x131e74(0xd2));if(hasFlag(_0x1c44ea,'plan'))throw CliErrors[_0x131e74(0xe7)](_0x131e74(0x11a));}function validateDeleteExecuteInput(_0xf143ad){const _0x17322f=a101_0x17f711;if(!hasFlag(_0xf143ad,_0x17322f(0x110))||!_0xf143ad[_0x17322f(0xcb)](_0x17322f(0x110))['trim']())throw CliErrors[_0x17322f(0x127)](_0x17322f(0x110),_0x17322f(0x11e));const _0x5a647f=['id',_0x17322f(0xdd),_0x17322f(0x12b),'expect-parent-id',_0x17322f(0xca),_0x17322f(0xfd)]['filter'](_0x10243d=>hasFlag(_0xf143ad,_0x10243d));if(_0x5a647f[_0x17322f(0xe6)]>0x0)throw CliErrors['validation'](_0x17322f(0xcf)+_0x5a647f[_0x17322f(0xd9)](_0x8c1028=>'--'+_0x8c1028)[_0x17322f(0x102)](',\x20')+'.');}async function buildDeletePlan(_0x3ae664){const _0x35a46e=a101_0x17f711,_0x50aae4=validateExactId(_0x3ae664),_0x5ad192=await fetchMutationSnapshot(_0x3ae664,_0x35a46e(0x10f),_0x50aae4),_0x281d45=requireMenu(_0x5ad192,_0x50aae4);assertExpectedState(_0x3ae664,_0x281d45);const _0x5cc2c9=_0x3ae664['bool'](_0x35a46e(0xdd));let _0x26e08a;if(_0x5cc2c9){if(_0x281d45[_0x35a46e(0xf1)]['trim']()[_0x35a46e(0xe5)]()!=='folder')throw menuError(_0x35a46e(0x108),_0x35a46e(0xf6)+_0x281d45['id']+'\x20is\x20type\x20\x22'+(_0x281d45[_0x35a46e(0xf1)]||_0x35a46e(0xe1))+'\x22;\x20--recursive\x20requires\x20a\x20folder\x20root.');_0x26e08a=collectDeleteTargets(_0x5ad192,_0x281d45),_0x26e08a[_0x35a46e(0x12d)](_0x513eec=>assertDeleteSafety(_0x513eec,!![]));}else assertDeleteSafety(_0x281d45),_0x26e08a=[_0x281d45];assertNoSharedPages(_0x5ad192,_0x26e08a);const _0x1f11a4=_0x26e08a[_0x35a46e(0xd9)](_0x2a92b1=>_0x2a92b1['id']),_0x76f62d=cascadeForTargets(_0x26e08a),_0x39dc99=_0x76f62d[_0x35a46e(0x122)][_0x35a46e(0xe6)]>0x0?[_0x35a46e(0xfe)]:[];return mutationResult({'operation':_0x35a46e(0x134),'selector':{'id':_0x50aae4,'recursive':_0x5cc2c9},'before':_0x281d45,'after':null,'dryRun':!![],'backend':[...BACKEND],'plannedActions':[{'stage':_0x35a46e(0xc8),'method':'POST','path':_0x35a46e(0x125),'body':{'idList':_0x1f11a4}}],'targets':_0x26e08a,'deleteOrder':_0x1f11a4,'snapshotHash':_0x5ad192['hash'],'cascade':_0x76f62d,'warnings':_0x39dc99});}function assertDeleteSafety(_0x7cdd87,_0x3deda3=![]){const _0x1b207a=a101_0x17f711,_0x3c7893=_0x7cdd87[_0x1b207a(0xf1)][_0x1b207a(0xda)]()['toLowerCase']()===_0x1b207a(0xde);if(_0x7cdd87['childrenCount']>0x0&&(!_0x3deda3||!_0x3c7893))throw menuError(_0x1b207a(0xe4),_0x1b207a(0xf6)+_0x7cdd87['id']+_0x1b207a(0x111)+_0x7cdd87[_0x1b207a(0xcc)]+_0x1b207a(0x103),_0x1b207a(0x107)+_0x7cdd87[_0x1b207a(0x129)][_0x1b207a(0x102)](',\x20'));if(_0x3c7893&&_0x7cdd87[_0x1b207a(0x139)]!=null)throw menuError('menu_delete_page_bound',_0x1b207a(0x115)+_0x7cdd87['id']+_0x1b207a(0x106)+_0x7cdd87[_0x1b207a(0x139)]+_0x1b207a(0x105),_0x1b207a(0x10e));if(!_0x3c7893)return;if(!_0x7cdd87['resourcesValid'])throw menuError(_0x1b207a(0xea),_0x1b207a(0x115)+_0x7cdd87['id']+_0x1b207a(0x135),_0x1b207a(0x116));if(_0x7cdd87[_0x1b207a(0x131)]['length']>0x0)throw menuError(_0x1b207a(0x11d),_0x1b207a(0x115)+_0x7cdd87['id']+_0x1b207a(0x120)+_0x7cdd87[_0x1b207a(0x131)]['length']+_0x1b207a(0x133),_0x1b207a(0xf5));}function collectDeleteTargets(_0x252bd8,_0x218ead){const _0x21a99d=[],_0x2fc11b=new Set(),_0x5edbe7=new Set(),_0x4dab0b=_0x3265f3=>{const _0x9c9224=a101_0x10e0;if(_0x2fc11b[_0x9c9224(0xc9)](_0x3265f3['id']))throw menuError('menu_tree_invalid',_0x9c9224(0x11c)+_0x3265f3['id']+'.');if(_0x5edbe7[_0x9c9224(0xc9)](_0x3265f3['id']))return;_0x2fc11b[_0x9c9224(0xe8)](_0x3265f3['id']);for(const _0x3e476f of _0x3265f3['childrenIds']){const _0x24d368=_0x252bd8[_0x9c9224(0x136)][_0x9c9224(0x137)](_0x3e476f);if(!_0x24d368)throw menuError('menu_tree_invalid',_0x9c9224(0xf6)+_0x3265f3['id']+_0x9c9224(0x11f)+_0x3e476f+'.');_0x4dab0b(_0x24d368);}_0x2fc11b[_0x9c9224(0x134)](_0x3265f3['id']),_0x5edbe7[_0x9c9224(0xe8)](_0x3265f3['id']),_0x21a99d[_0x9c9224(0xd7)](_0x3265f3);};return _0x4dab0b(_0x218ead),_0x21a99d;}function assertDeleteTargetsComplete(_0x44aa64,_0x566a8d){const _0x4cab88=a101_0x17f711,_0x5e810e=requireMenu(_0x566a8d,_0x44aa64[_0x4cab88(0xc5)]['id']);if(_0x44aa64[_0x4cab88(0xdd)]&&_0x5e810e['type'][_0x4cab88(0xda)]()[_0x4cab88(0xe5)]()!=='folder')throw menuError(_0x4cab88(0xed),_0x4cab88(0xc7)+_0x5e810e['id']+'\x20is\x20not\x20a\x20folder.');const _0x2282a1=_0x44aa64[_0x4cab88(0xdd)]?collectDeleteTargets(_0x566a8d,_0x5e810e)['map'](_0x5ecd86=>_0x5ecd86['id']):[_0x5e810e['id']];if(JSON['stringify'](_0x44aa64[_0x4cab88(0xf2)])!==JSON[_0x4cab88(0xd4)](_0x2282a1))throw menuError(_0x4cab88(0xed),'Menu\x20delete\x20plan\x20does\x20not\x20contain\x20the\x20complete\x20current\x20subtree\x20in\x20leaf-first\x20order.',_0x4cab88(0xfb));}function assertNoSharedPages(_0x4c4ed5,_0x5753dc){const _0x5dbfc9=a101_0x17f711,_0x5881b4=new Set(_0x5753dc['map'](_0x5a1e87=>_0x5a1e87['id'])),_0x2ee121=new Set(_0x5753dc[_0x5dbfc9(0xd9)](_0x2316c4=>_0x2316c4[_0x5dbfc9(0x139)])[_0x5dbfc9(0xe3)](_0x4cbdc5=>_0x4cbdc5!=null));if(_0x2ee121[_0x5dbfc9(0x12c)]===0x0)return;const _0x3f0d12=_0x4c4ed5[_0x5dbfc9(0x10a)]['filter'](_0x1a362f=>!_0x5881b4[_0x5dbfc9(0xc9)](_0x1a362f['id'])&&_0x1a362f['pageId']!=null&&_0x2ee121[_0x5dbfc9(0xc9)](_0x1a362f[_0x5dbfc9(0x139)]));if(_0x3f0d12['length']===0x0)return;const _0x3ce699=_0x3f0d12[_0x5dbfc9(0xd9)](_0x1117ac=>_0x5dbfc9(0x126)+_0x1117ac[_0x5dbfc9(0x139)]+_0x5dbfc9(0xf3)+_0x1117ac['id'])['join'](',\x20');throw menuError('menu_page_shared',_0x5dbfc9(0xc6)+_0x3ce699+'.',_0x5dbfc9(0xfc));}function assertCascadeMatchesPlan(_0x9cc932,_0x339f77){const _0x3ee94e=a101_0x17f711,_0x312bea=cascadeForTargets(_0x339f77);if(JSON['stringify'](_0x9cc932[_0x3ee94e(0xf7)])!==JSON[_0x3ee94e(0xd4)](_0x312bea))throw menuError(_0x3ee94e(0xed),_0x3ee94e(0xd8));}function cascadeForTargets(_0x580342){const _0x37531c=a101_0x17f711,_0x5d1dd0=_0x580342[_0x37531c(0xd9)](_0x1852f6=>_0x1852f6[_0x37531c(0x139)])[_0x37531c(0xe3)](_0x2ef89a=>_0x2ef89a!=null)['filter']((_0x3fb0fa,_0x303316,_0x480ce0)=>_0x480ce0[_0x37531c(0xd3)](_0x3fb0fa)===_0x303316);return{'pages':_0x5d1dd0,'pageSchemaAffected':_0x5d1dd0['length']>0x0};}function asMenuError(_0x2d20fb){const _0x7614b1=a101_0x17f711;return _0x2d20fb instanceof CliError?_0x2d20fb:menuError(_0x7614b1(0xed),_0x2d20fb instanceof Error?_0x2d20fb['message']:String(_0x2d20fb));}
1
+ const a101_0x40d3c0=a101_0x5e5b;(function(_0x53bd66,_0x10991f){const _0x5cddb5=a101_0x5e5b,_0x6b2f99=_0x53bd66();while(!![]){try{const _0x321a4b=-parseInt(_0x5cddb5(0x16d))/0x1*(parseInt(_0x5cddb5(0x147))/0x2)+-parseInt(_0x5cddb5(0x146))/0x3+-parseInt(_0x5cddb5(0x138))/0x4*(parseInt(_0x5cddb5(0x169))/0x5)+-parseInt(_0x5cddb5(0x14d))/0x6*(parseInt(_0x5cddb5(0x150))/0x7)+-parseInt(_0x5cddb5(0x124))/0x8*(parseInt(_0x5cddb5(0x119))/0x9)+parseInt(_0x5cddb5(0x173))/0xa*(-parseInt(_0x5cddb5(0x152))/0xb)+parseInt(_0x5cddb5(0x17f))/0xc*(parseInt(_0x5cddb5(0x136))/0xd);if(_0x321a4b===_0x10991f)break;else _0x6b2f99['push'](_0x6b2f99['shift']());}catch(_0x5baff7){_0x6b2f99['push'](_0x6b2f99['shift']());}}}(a101_0x57c4,0x4bbdf));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertMenuDeletePlanCurrent,assertMenuDeletePlanExecutable,createMenuDeletePlanFile,mutationPlanFromDeleteFile,readMenuDeletePlan,writeMenuDeletePlan}from'../../commands/menu/shared/delete-plan.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a101_0x5e5b(_0x38e01a,_0x102504){_0x38e01a=_0x38e01a-0x112;const _0x57c44e=a101_0x57c4();let _0x5e5bc2=_0x57c44e[_0x38e01a];return _0x5e5bc2;}import{MENU_EXPECT_FLAGS,MENU_ID_FLAG,asVerificationError,assertExpectedState,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,requireExplicitYes,requireMenu,validateExactId}from'../../commands/menu/shared/mutations.js';import{batchDeleteMenuEntities}from'../../commands/menu/shared/service.js';import{CliError,CliErrors}from'../../errors.js';const BACKEND=[{'method':a101_0x40d3c0(0x162),'path':'/smartapi/menu/batchDelete'}],MENU_DELETE_ID_FLAG={...MENU_ID_FLAG,'required':![],'description':'Exact\x20menu\x20id\x20(required\x20with\x20--dry-run)'},MENU_DELETE_RECURSIVE_FLAG={'name':'recursive','type':a101_0x40d3c0(0x13d),'description':a101_0x40d3c0(0x18a)},MENU_DELETE_PLAN_OUT_FLAG={'name':a101_0x40d3c0(0x168),'type':a101_0x40d3c0(0x178),'description':a101_0x40d3c0(0x140)},MENU_DELETE_PLAN_FLAG={'name':a101_0x40d3c0(0x17c),'type':a101_0x40d3c0(0x178),'description':'Required\x20for\x20execution;\x20consume\x20an\x20unexpired\x20plan\x20created\x20by\x20--plan-out'};export const menuDelete={'service':a101_0x40d3c0(0x189),'command':a101_0x40d3c0(0x130),'description':a101_0x40d3c0(0x139),'risk':a101_0x40d3c0(0x11e),'structuredErrors':!![],'flags':[MENU_DELETE_ID_FLAG,MENU_DELETE_RECURSIVE_FLAG,MENU_DELETE_PLAN_OUT_FLAG,MENU_DELETE_PLAN_FLAG,...MENU_EXPECT_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x36f0fe){const _0x4d4834=a101_0x40d3c0;_0x36f0fe[_0x4d4834(0x179)](_0x4d4834(0x15b))?validateDeleteDryRunInput(_0x36f0fe):validateDeleteExecuteInput(_0x36f0fe),requireExplicitYes(_0x36f0fe);},async 'dryRun'(_0x3eb31c){const _0x1de787=a101_0x40d3c0;validateDeleteDryRunInput(_0x3eb31c);const _0x5ed6e=await buildDeletePlan(_0x3eb31c),_0x48b04a=createMenuDeletePlanFile(_0x3eb31c[_0x1de787(0x16c)],_0x5ed6e),_0x483a77=await writeMenuDeletePlan(_0x3eb31c[_0x1de787(0x184)](_0x1de787(0x168)),_0x48b04a),_0xa16631=mutationResult({..._0x5ed6e,'planFile':{'path':_0x483a77,'createdAt':_0x48b04a[_0x1de787(0x187)],'expiresAt':_0x48b04a[_0x1de787(0x12f)]}});return menuDryRunResult(_0xa16631,{'method':_0x1de787(0x162),'url':_0x1de787(0x132),'body':{'idList':_0xa16631[_0x1de787(0x17b)]},'description':_0x1de787(0x158)+(_0xa16631[_0x1de787(0x17b)]?.[_0x1de787(0x16a)]??0x1)+'\x20menu(s)\x20under\x20exact\x20id\x20'+_0xa16631[_0x1de787(0x15d)]['id']+_0x1de787(0x17e)+_0x483a77+'.'});},async 'execute'(_0x2656ea){const _0x2ead62=a101_0x40d3c0;requireExplicitYes(_0x2656ea),validateDeleteExecuteInput(_0x2656ea);const _0x5ba776=await readMenuDeletePlan(_0x2656ea[_0x2ead62(0x184)](_0x2ead62(0x17c))),_0x29f195=mutationPlanFromDeleteFile(_0x5ba776[_0x2ead62(0x17c)],_0x5ba776['path']),_0x53083b=_0x5ba776[_0x2ead62(0x17c)][_0x2ead62(0x125)]['id'];try{assertMenuDeletePlanExecutable(_0x5ba776['plan'],_0x2656ea[_0x2ead62(0x16c)]);}catch(_0x172647){throw menuFailure(asMenuError(_0x172647),_0x29f195,{'stage':_0x2ead62(0x141),'failed':{'id':_0x53083b}});}let _0x34a536,_0x268359;try{_0x34a536=await fetchMutationSnapshot(_0x2656ea,_0x2ead62(0x15e),_0x53083b),_0x268359=assertMenuDeletePlanCurrent(_0x5ba776[_0x2ead62(0x17c)],_0x2656ea[_0x2ead62(0x16c)],_0x34a536),assertDeleteTargetsComplete(_0x5ba776[_0x2ead62(0x17c)],_0x34a536),_0x268359[_0x2ead62(0x133)](_0xe2fdad=>assertDeleteSafety(_0xe2fdad,_0x5ba776[_0x2ead62(0x17c)][_0x2ead62(0x172)])),assertNoSharedPages(_0x34a536,_0x268359),assertCascadeMatchesPlan(_0x29f195,_0x268359);}catch(_0x373fab){throw menuFailure(asMenuError(_0x373fab),_0x29f195,{'stage':_0x2ead62(0x13b),'failed':{'id':_0x53083b}});}const _0xd37165=_0x5ba776[_0x2ead62(0x17c)][_0x2ead62(0x17b)];let _0x3c246d;try{_0x3c246d=await batchDeleteMenuEntities(_0x2656ea[_0x2ead62(0x142)],_0xd37165);}catch(_0xbb77b8){const _0x1e6a90=mapMenuApiError(_0xbb77b8,_0x2ead62(0x11b)),_0x587fa5=[_0x2ead62(0x175)];let _0x558fe3;try{_0x558fe3=await readDeleteOutcome(_0x2656ea,_0xd37165);}catch(_0x228cc5){const _0x1971be=describeMenuErrorCause(_0x228cc5,'read\x20menu\x20state\x20after\x20batch\x20delete\x20failure',_0x53083b);_0x587fa5['push'](_0x2ead62(0x122)+_0x1971be['causeCode']+'):\x20'+_0x1971be['causeMessage']);throw menuFailure(_0x1e6a90,_0x29f195,{'stage':'batch-delete','failed':{'targetIds':_0xd37165,'targetIdsAbsent':_0x2ead62(0x12b),..._0x1971be},'warnings':_0x587fa5,'verification':{'status':_0x2ead62(0x14e),'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20json','targetIds':_0xd37165}});}throw menuFailure(_0x1e6a90,_0x29f195,{'stage':_0x2ead62(0x176),'succeeded':_0x558fe3[_0x2ead62(0x163)][_0x2ead62(0x191)](_0x926042=>({'id':_0x926042,'deleted':!![]})),'failed':{'targetIds':_0xd37165,'absentIds':_0x558fe3[_0x2ead62(0x163)],'remainingIds':_0x558fe3['remainingIds']},'warnings':_0x587fa5,'verification':verificationFromOutcome(_0x558fe3)});}if(_0x3c246d!==_0xd37165[_0x2ead62(0x16a)]){const _0x4a555d=menuError(_0x2ead62(0x18c),_0x2ead62(0x11f)+_0x3c246d+_0x2ead62(0x143)+_0xd37165[_0x2ead62(0x16a)]+'.',_0x2ead62(0x12e)),_0x957a42=[_0x2ead62(0x121)];let _0x44dced;try{_0x44dced=await readDeleteOutcome(_0x2656ea,_0xd37165);}catch(_0x311b50){const _0xdb4444=describeMenuErrorCause(_0x311b50,'read\x20menu\x20state\x20after\x20batch\x20delete\x20count\x20mismatch',_0x53083b);_0x957a42[_0x2ead62(0x13f)]('Post-mismatch\x20menu\x20readback\x20failed\x20('+_0xdb4444[_0x2ead62(0x14a)]+_0x2ead62(0x193)+_0xdb4444[_0x2ead62(0x180)]);throw menuFailure(_0x4a555d,_0x29f195,{'stage':_0x2ead62(0x176),'failed':{'targetIds':_0xd37165,'expectedCount':_0xd37165[_0x2ead62(0x16a)],'reportedDeletedCount':_0x3c246d,'targetIdsAbsent':_0x2ead62(0x12b),..._0xdb4444},'warnings':_0x957a42,'verification':{'status':_0x2ead62(0x14e),'lookupCommand':_0x2ead62(0x128),'targetIds':_0xd37165}});}throw menuFailure(_0x4a555d,_0x29f195,{'stage':_0x2ead62(0x176),'succeeded':_0x44dced[_0x2ead62(0x163)][_0x2ead62(0x191)](_0x405d6b=>({'id':_0x405d6b,'deleted':!![]})),'failed':{'targetIds':_0xd37165,'expectedCount':_0xd37165[_0x2ead62(0x16a)],'reportedDeletedCount':_0x3c246d,'absentIds':_0x44dced[_0x2ead62(0x163)],'remainingIds':_0x44dced['remainingIds']},'warnings':_0x957a42,'verification':verificationFromOutcome(_0x44dced)});}let _0x3849dd;try{_0x3849dd=await readDeleteOutcome(_0x2656ea,_0xd37165);}catch(_0x36f91f){const _0x3d8bbd=describeMenuErrorCause(_0x36f91f,_0x2ead62(0x177),_0x53083b),_0x486cac=asVerificationError(_0x36f91f,_0x2ead62(0x165)+_0x53083b+_0x2ead62(0x12c));throw menuFailure(_0x486cac,_0x29f195,{'stage':_0x2ead62(0x12a),'succeeded':_0xd37165[_0x2ead62(0x191)](_0x3f5229=>({'id':_0x3f5229,'deleteRequested':!![]})),'failed':{'id':_0x53083b,'targetIds':_0xd37165,'targetIdsAbsent':_0x2ead62(0x12b),..._0x3d8bbd},'warnings':[_0x2ead62(0x127)],'verification':{'status':'failed','lookupCommand':_0x2ead62(0x128),'targetIds':_0xd37165}});}if(_0x3849dd[_0x2ead62(0x13e)][_0x2ead62(0x16a)]>0x0){const _0x5b9f7b=menuError(_0x2ead62(0x117),_0x2ead62(0x151)+_0x3849dd['remainingIds'][_0x2ead62(0x182)](',\x20')+'.',_0x2ead62(0x12e));throw menuFailure(_0x5b9f7b,_0x29f195,{'stage':_0x2ead62(0x12a),'succeeded':_0xd37165['map'](_0x1adfb0=>({'id':_0x1adfb0,'deleteRequested':!![]})),'failed':{'id':_0x53083b,'targetIds':_0xd37165,'absentIds':_0x3849dd[_0x2ead62(0x163)],'remainingIds':_0x3849dd[_0x2ead62(0x13e)]},'warnings':[_0x2ead62(0x174)],'verification':verificationFromOutcome(_0x3849dd)});}const _0x156003=_0xd37165[_0x2ead62(0x191)](_0x50d6bc=>({'id':_0x50d6bc,'deleted':!![]})),_0x49838d=mutationResult({..._0x29f195,'dryRun':![],'succeeded':_0x156003,'verification':{'checkedBy':_0x2ead62(0x194),'plannedSnapshotHash':_0x29f195[_0x2ead62(0x166)],'finalSnapshotHash':_0x3849dd[_0x2ead62(0x13a)][_0x2ead62(0x120)],'reportedDeletedCount':_0x3c246d,'targetAbsent':!_0x3849dd['snapshot'][_0x2ead62(0x112)][_0x2ead62(0x116)](_0x53083b),'allTargetsAbsent':!![],'targetIds':_0xd37165}});return{'ok':!![],'data':_0x49838d,'message':_0x2ead62(0x155)+_0x156003[_0x2ead62(0x16a)]+'\x20menu(s)\x20under\x20exact\x20id\x20'+_0x53083b+'.'};}};async function readDeleteOutcome(_0x56af20,_0x2e4b39){const _0x2037b3=a101_0x40d3c0,_0xf28397=await fetchMenuSnapshot(_0x56af20['appCode'],_0x56af20[_0x2037b3(0x142)]);return{'snapshot':_0xf28397,'absentIds':_0x2e4b39[_0x2037b3(0x123)](_0x5a25fc=>!_0xf28397[_0x2037b3(0x112)][_0x2037b3(0x116)](_0x5a25fc)),'remainingIds':_0x2e4b39[_0x2037b3(0x123)](_0x248d1e=>_0xf28397[_0x2037b3(0x112)][_0x2037b3(0x116)](_0x248d1e))};}function verificationFromOutcome(_0x2938f4){const _0x4337e4=a101_0x40d3c0;return{'checkedBy':_0x4337e4(0x194),'absentIds':_0x2938f4[_0x4337e4(0x163)],'remainingIds':_0x2938f4[_0x4337e4(0x13e)]};}function a101_0x57c4(){const _0x131754=['Menu\x20delete\x20plan\x20does\x20not\x20contain\x20the\x20complete\x20current\x20subtree\x20in\x20leaf-first\x20order.','--plan-out\x20is\x20required\x20for\x20menu\x20delete\x20dry-run\x20so\x20execution\x20can\x20consume\x20the\x20reviewed\x20plan.','high-risk-write','Backend\x20reported\x20','hash','The\x20batch\x20response\x20count\x20did\x20not\x20match\x20the\x20reviewed\x20target\x20count;\x20do\x20not\x20retry\x20the\x20same\x20plan.','Post-failure\x20menu\x20readback\x20failed\x20(','filter','8sVakTI','target','flagMissing','The\x20batch\x20delete\x20request\x20was\x20accepted,\x20but\x20its\x20final\x20online\x20state\x20is\x20unconfirmed.','rabetbase\x20menu\x20list\x20--format\x20json','unknown','verification','unconfirmed','\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20absence','\x20->\x20menu\x20','Inspect\x20the\x20latest\x20menu\x20facts\x20and\x20generate\x20a\x20new\x20delete\x20plan;\x20do\x20not\x20retry\x20this\x20plan.','expiresAt','delete','folder','/smartapi/menu/batchDelete','forEach','add','expected-children-count','39DbGdqy','pageId','12OaZzrj','Delete\x20an\x20exact\x20menu\x20or\x20a\x20folder\x20subtree\x20from\x20a\x20reviewed\x20plan','snapshot','pre-write-plan-validation','Deleting\x20page-bound\x20menus\x20invokes\x20the\x20platform\x27s\x20existing\x20page\x20and\x20PageSchema\x20cascade;\x20listed\x20page\x20ids\x20are\x20direct\x20menu\x20bindings.','boolean','remainingIds','push','Required\x20with\x20--dry-run;\x20write\x20the\x20reviewed\x20plan\x20to\x20a\x20new\x20local\x20JSON\x20file','plan-validation','cookie','\x20deleted\x20menus;\x20expected\x20','stringify','\x20has\x20','962079OXMAIi','8cbNdRQ','validation','\x20is\x20type\x20\x22','causeCode','Page\x20bindings\x20are\x20referenced\x20by\x20menus\x20outside\x20the\x20delete\x20plan:\x20','childrenCount','34152sqcQwl','failed','menu_folder_resources_invalid','406sVNfSg','One\x20or\x20more\x20planned\x20menus\x20are\x20still\x20present\x20after\x20the\x20batch\x20delete\x20request:\x20','341lcNnzj','\x20has\x20an\x20unreadable\x20extend.resources\x20value\x20and\x20cannot\x20be\x20proven\x20empty.','Folder\x20','Deleted\x20','get','Menu\x20tree\x20contains\x20a\x20cycle\x20at\x20menu\x20','Would\x20batch\x20delete\x20','menu_non_empty','\x20is\x20unexpectedly\x20bound\x20to\x20page\x20','dry-run','childrenIds','selector','execute\x20reviewed\x20delete\x20plan','menu_plan_invalid','menu_folder_has_resources','plan\x20delete','POST','absentIds','menu_tree_invalid','Batch\x20delete\x20request\x20for\x20menu\x20','snapshotHash','\x20is\x20not\x20a\x20folder.','plan-out','105510TtpytS','length','trim','appCode','34915sFMIcf','\x22;\x20--recursive\x20requires\x20a\x20folder\x20root.','size','Inspect\x20the\x20folder\x20in\x20the\x20platform\x20before\x20deleting\x20it.','\x20direct\x20child\x20menu(s)\x20and\x20cannot\x20be\x20deleted.','recursive','17930rggLpB','The\x20backend\x20acknowledged\x20the\x20batch\x20request,\x20but\x20final\x20menu\x20facts\x20did\x20not\x20confirm\x20every\x20deletion.','The\x20batch\x20delete\x20may\x20have\x20partially\x20applied;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20creating\x20a\x20new\x20plan.','batch-delete','verify\x20batch\x20delete','string','bool','menus','deleteOrder','plan','\x20still\x20references\x20',';\x20execution\x20must\x20consume\x20','6761688HIgbZH','causeMessage','menu_delete_page_bound','join','--plan\x20is\x20required\x20for\x20menu\x20delete\x20execution.','str','Remove\x20or\x20verify\x20the\x20resource\x20bindings\x20in\x20the\x20platform\x20before\x20deleting\x20the\x20folder.','page\x20','createdAt','toLowerCase','menu','Include\x20every\x20descendant\x20of\x20the\x20exact\x20folder\x20id,\x20deleting\x20leaves\x20first','resources','menu_batch_delete_count_mismatch','type','Inspect\x20and\x20repair\x20the\x20folder\x20resource\x20binding\x20in\x20the\x20platform\x20before\x20deleting\x20it.','menu_page_shared','expect-parent-id','map','menu_recursive_requires_folder','):\x20','menu\x20list','Recursive\x20menu\x20delete\x20plan\x20root\x20','byId','pages','resourcesValid','\x20references\x20missing\x20child\x20','has','menu_verification_failed','\x20and\x20cannot\x20be\x20deleted\x20safely.','4237245nqcijd','Menu\x20','batch\x20delete'];a101_0x57c4=function(){return _0x131754;};return a101_0x57c4();}function validateDeleteDryRunInput(_0x5f7d55){const _0x46a9f8=a101_0x40d3c0;validateExactId(_0x5f7d55);if(!hasFlag(_0x5f7d55,_0x46a9f8(0x168))||!_0x5f7d55['str'](_0x46a9f8(0x168))[_0x46a9f8(0x16b)]())throw CliErrors[_0x46a9f8(0x126)]('plan-out',_0x46a9f8(0x11d));if(hasFlag(_0x5f7d55,_0x46a9f8(0x17c)))throw CliErrors[_0x46a9f8(0x148)]('--plan\x20cannot\x20be\x20combined\x20with\x20--dry-run;\x20use\x20--plan-out.');}function validateDeleteExecuteInput(_0x122ffa){const _0x1cdbe5=a101_0x40d3c0;if(!hasFlag(_0x122ffa,_0x1cdbe5(0x17c))||!_0x122ffa[_0x1cdbe5(0x184)](_0x1cdbe5(0x17c))['trim']())throw CliErrors[_0x1cdbe5(0x126)](_0x1cdbe5(0x17c),_0x1cdbe5(0x183));const _0x43a616=['id',_0x1cdbe5(0x172),_0x1cdbe5(0x168),_0x1cdbe5(0x190),'expect-path',_0x1cdbe5(0x135)][_0x1cdbe5(0x123)](_0xdf9cfe=>hasFlag(_0x122ffa,_0xdf9cfe));if(_0x43a616[_0x1cdbe5(0x16a)]>0x0)throw CliErrors[_0x1cdbe5(0x148)]('Menu\x20delete\x20execution\x20consumes\x20only\x20--plan;\x20remove\x20'+_0x43a616['map'](_0x2a71fe=>'--'+_0x2a71fe)[_0x1cdbe5(0x182)](',\x20')+'.');}async function buildDeletePlan(_0x50d687){const _0x3c354a=a101_0x40d3c0,_0x1d35a8=validateExactId(_0x50d687),_0x9552a4=await fetchMutationSnapshot(_0x50d687,_0x3c354a(0x161),_0x1d35a8),_0x57bdad=requireMenu(_0x9552a4,_0x1d35a8);assertExpectedState(_0x50d687,_0x57bdad);const _0x2883a7=_0x50d687[_0x3c354a(0x179)](_0x3c354a(0x172));let _0x4dda96;if(_0x2883a7){if(_0x57bdad['type'][_0x3c354a(0x16b)]()[_0x3c354a(0x188)]()!==_0x3c354a(0x131))throw menuError(_0x3c354a(0x192),'Menu\x20'+_0x57bdad['id']+_0x3c354a(0x149)+(_0x57bdad['type']||_0x3c354a(0x129))+_0x3c354a(0x16e));_0x4dda96=collectDeleteTargets(_0x9552a4,_0x57bdad),_0x4dda96[_0x3c354a(0x133)](_0x5b82ab=>assertDeleteSafety(_0x5b82ab,!![]));}else assertDeleteSafety(_0x57bdad),_0x4dda96=[_0x57bdad];assertNoSharedPages(_0x9552a4,_0x4dda96);const _0x28a7d0=_0x4dda96[_0x3c354a(0x191)](_0x369474=>_0x369474['id']),_0x3406ea=cascadeForTargets(_0x4dda96),_0x316638=_0x3406ea[_0x3c354a(0x113)][_0x3c354a(0x16a)]>0x0?[_0x3c354a(0x13c)]:[];return mutationResult({'operation':'delete','selector':{'id':_0x1d35a8,'recursive':_0x2883a7},'before':_0x57bdad,'after':null,'dryRun':!![],'backend':[...BACKEND],'plannedActions':[{'stage':'batch-delete-menu','method':_0x3c354a(0x162),'path':_0x3c354a(0x132),'body':{'idList':_0x28a7d0}}],'targets':_0x4dda96,'deleteOrder':_0x28a7d0,'snapshotHash':_0x9552a4[_0x3c354a(0x120)],'cascade':_0x3406ea,'warnings':_0x316638});}function assertDeleteSafety(_0x111920,_0x162879=![]){const _0x4b7d52=a101_0x40d3c0,_0x156711=_0x111920[_0x4b7d52(0x18d)]['trim']()[_0x4b7d52(0x188)]()===_0x4b7d52(0x131);if(_0x111920[_0x4b7d52(0x14c)]>0x0&&(!_0x162879||!_0x156711))throw menuError(_0x4b7d52(0x159),_0x4b7d52(0x11a)+_0x111920['id']+_0x4b7d52(0x145)+_0x111920['childrenCount']+_0x4b7d52(0x171),'Handle\x20child\x20ids\x20in\x20the\x20platform\x20first:\x20'+_0x111920[_0x4b7d52(0x15c)][_0x4b7d52(0x182)](',\x20'));if(_0x156711&&_0x111920[_0x4b7d52(0x137)]!=null)throw menuError(_0x4b7d52(0x181),_0x4b7d52(0x154)+_0x111920['id']+_0x4b7d52(0x15a)+_0x111920[_0x4b7d52(0x137)]+_0x4b7d52(0x118),_0x4b7d52(0x170));if(!_0x156711)return;if(!_0x111920[_0x4b7d52(0x114)])throw menuError(_0x4b7d52(0x14f),_0x4b7d52(0x154)+_0x111920['id']+_0x4b7d52(0x153),_0x4b7d52(0x18e));if(_0x111920[_0x4b7d52(0x18b)][_0x4b7d52(0x16a)]>0x0)throw menuError(_0x4b7d52(0x160),_0x4b7d52(0x154)+_0x111920['id']+_0x4b7d52(0x17d)+_0x111920[_0x4b7d52(0x18b)][_0x4b7d52(0x16a)]+'\x20resource\x20URL(s).',_0x4b7d52(0x185));}function collectDeleteTargets(_0x2790d,_0x2555fb){const _0x4ef2dc=[],_0x1ab2ae=new Set(),_0x498294=new Set(),_0x183c81=_0x51a073=>{const _0x180a15=a101_0x5e5b;if(_0x1ab2ae[_0x180a15(0x116)](_0x51a073['id']))throw menuError('menu_tree_invalid',_0x180a15(0x157)+_0x51a073['id']+'.');if(_0x498294['has'](_0x51a073['id']))return;_0x1ab2ae['add'](_0x51a073['id']);for(const _0x36bc06 of _0x51a073[_0x180a15(0x15c)]){const _0x13d006=_0x2790d[_0x180a15(0x112)][_0x180a15(0x156)](_0x36bc06);if(!_0x13d006)throw menuError(_0x180a15(0x164),'Menu\x20'+_0x51a073['id']+_0x180a15(0x115)+_0x36bc06+'.');_0x183c81(_0x13d006);}_0x1ab2ae['delete'](_0x51a073['id']),_0x498294[_0x180a15(0x134)](_0x51a073['id']),_0x4ef2dc[_0x180a15(0x13f)](_0x51a073);};return _0x183c81(_0x2555fb),_0x4ef2dc;}function assertDeleteTargetsComplete(_0x3423c1,_0x5ef39a){const _0x2b78e=a101_0x40d3c0,_0x1edbce=requireMenu(_0x5ef39a,_0x3423c1['target']['id']);if(_0x3423c1[_0x2b78e(0x172)]&&_0x1edbce[_0x2b78e(0x18d)][_0x2b78e(0x16b)]()[_0x2b78e(0x188)]()!=='folder')throw menuError(_0x2b78e(0x15f),_0x2b78e(0x195)+_0x1edbce['id']+_0x2b78e(0x167));const _0x2e689e=_0x3423c1[_0x2b78e(0x172)]?collectDeleteTargets(_0x5ef39a,_0x1edbce)[_0x2b78e(0x191)](_0x20b906=>_0x20b906['id']):[_0x1edbce['id']];if(JSON[_0x2b78e(0x144)](_0x3423c1[_0x2b78e(0x17b)])!==JSON[_0x2b78e(0x144)](_0x2e689e))throw menuError(_0x2b78e(0x15f),_0x2b78e(0x11c),'Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out\x20and\x20do\x20not\x20remove\x20or\x20reorder\x20targets.');}function assertNoSharedPages(_0x355b98,_0x4c3751){const _0x384a84=a101_0x40d3c0,_0x15787e=new Set(_0x4c3751[_0x384a84(0x191)](_0x33328b=>_0x33328b['id'])),_0x3ba91a=new Set(_0x4c3751[_0x384a84(0x191)](_0x535ecf=>_0x535ecf[_0x384a84(0x137)])['filter'](_0x15e9c2=>_0x15e9c2!=null));if(_0x3ba91a[_0x384a84(0x16f)]===0x0)return;const _0x31e4f9=_0x355b98[_0x384a84(0x17a)][_0x384a84(0x123)](_0x52f94d=>!_0x15787e['has'](_0x52f94d['id'])&&_0x52f94d[_0x384a84(0x137)]!=null&&_0x3ba91a[_0x384a84(0x116)](_0x52f94d[_0x384a84(0x137)]));if(_0x31e4f9[_0x384a84(0x16a)]===0x0)return;const _0x263b3e=_0x31e4f9[_0x384a84(0x191)](_0x4cb0f4=>_0x384a84(0x186)+_0x4cb0f4['pageId']+_0x384a84(0x12d)+_0x4cb0f4['id'])[_0x384a84(0x182)](',\x20');throw menuError(_0x384a84(0x18f),_0x384a84(0x14b)+_0x263b3e+'.','Keep\x20every\x20shared\x20page\x20reference\x20outside\x20this\x20operation,\x20or\x20choose\x20a\x20folder\x20whose\x20complete\x20subtree\x20contains\x20all\x20references.');}function assertCascadeMatchesPlan(_0x3d42dc,_0xdf4dfc){const _0x281101=a101_0x40d3c0,_0x4932cb=cascadeForTargets(_0xdf4dfc);if(JSON[_0x281101(0x144)](_0x3d42dc['cascade'])!==JSON[_0x281101(0x144)](_0x4932cb))throw menuError(_0x281101(0x15f),'Menu\x20delete\x20plan\x20cascade\x20does\x20not\x20match\x20the\x20reviewed\x20target\x20page\x20facts.');}function cascadeForTargets(_0x46ba89){const _0x24b15e=a101_0x40d3c0,_0x3e01ef=_0x46ba89[_0x24b15e(0x191)](_0x39fecf=>_0x39fecf[_0x24b15e(0x137)])[_0x24b15e(0x123)](_0x14be74=>_0x14be74!=null)[_0x24b15e(0x123)]((_0x13f765,_0x2c0508,_0x2570a6)=>_0x2570a6['indexOf'](_0x13f765)===_0x2c0508);return{'pages':_0x3e01ef,'pageSchemaAffected':_0x3e01ef['length']>0x0};}function asMenuError(_0x260ca7){const _0x2ba1bb=a101_0x40d3c0;return _0x260ca7 instanceof CliError?_0x260ca7:menuError(_0x2ba1bb(0x15f),_0x260ca7 instanceof Error?_0x260ca7['message']:String(_0x260ca7));}