@lovrabet/rabetbase-cli 2.5.5 → 2.5.6-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 (375) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/detail.js +1 -1
  77. package/lib/commands/dataset/extend-update.js +1 -1
  78. package/lib/commands/dataset/field-restore.js +1 -1
  79. package/lib/commands/dataset/field-update.js +1 -1
  80. package/lib/commands/dataset/generate.js +1 -1
  81. package/lib/commands/dataset/index.js +1 -1
  82. package/lib/commands/dataset/list.js +1 -1
  83. package/lib/commands/dataset/operations.js +1 -1
  84. package/lib/commands/dataset/relation-audit.js +1 -1
  85. package/lib/commands/dataset/relation-create.js +1 -1
  86. package/lib/commands/dataset/relation-delete.js +1 -1
  87. package/lib/commands/dataset/relation-shared.js +1 -1
  88. package/lib/commands/dataset/relation-update.js +1 -1
  89. package/lib/commands/dataset/relations.js +1 -1
  90. package/lib/commands/dataset/rename.js +1 -1
  91. package/lib/commands/dataset/restore.js +1 -1
  92. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  93. package/lib/commands/db/analysis-batching.js +1 -1
  94. package/lib/commands/db/analyze-batch-plan.js +1 -1
  95. package/lib/commands/db/analyze-cancel.js +1 -1
  96. package/lib/commands/db/analyze-start.js +1 -1
  97. package/lib/commands/db/analyze-status.js +1 -1
  98. package/lib/commands/db/create.js +1 -1
  99. package/lib/commands/db/cross-db-analysis-shared.d.ts +40 -0
  100. package/lib/commands/db/cross-db-analysis-shared.js +1 -0
  101. package/lib/commands/db/cross-db-analyze-latest.d.ts +2 -0
  102. package/lib/commands/db/cross-db-analyze-latest.js +1 -0
  103. package/lib/commands/db/cross-db-analyze-start.d.ts +2 -0
  104. package/lib/commands/db/cross-db-analyze-start.js +1 -0
  105. package/lib/commands/db/cross-db-analyze-status.d.ts +2 -0
  106. package/lib/commands/db/cross-db-analyze-status.js +1 -0
  107. package/lib/commands/db/delete.js +1 -1
  108. package/lib/commands/db/detail.js +1 -1
  109. package/lib/commands/db/diff-refresh-start.js +1 -1
  110. package/lib/commands/db/diff-refresh-status.js +1 -1
  111. package/lib/commands/db/diff.js +1 -1
  112. package/lib/commands/db/index.js +1 -1
  113. package/lib/commands/db/list.js +1 -1
  114. package/lib/commands/db/shared.js +1 -1
  115. package/lib/commands/db/table-diff-shared.js +1 -1
  116. package/lib/commands/db/tables.js +1 -1
  117. package/lib/commands/db/test.js +1 -1
  118. package/lib/commands/db/update.js +1 -1
  119. package/lib/commands/deployment/index.js +1 -1
  120. package/lib/commands/deployment/sync-all.js +1 -1
  121. package/lib/commands/deployment/sync-jobs.js +1 -1
  122. package/lib/commands/deployment/sync-status.js +1 -1
  123. package/lib/commands/doctor.js +1 -1
  124. package/lib/commands/file/index.js +1 -1
  125. package/lib/commands/flow/create.js +1 -1
  126. package/lib/commands/flow/detail.js +1 -1
  127. package/lib/commands/flow/index.js +1 -1
  128. package/lib/commands/flow/list.js +1 -1
  129. package/lib/commands/flow/publish.js +1 -1
  130. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  131. package/lib/commands/flow/runtime-role-list.js +1 -1
  132. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  133. package/lib/commands/flow/runtime-user-search.js +1 -1
  134. package/lib/commands/flow/shared.js +1 -1
  135. package/lib/commands/flow/update.js +1 -1
  136. package/lib/commands/flow/validate.js +1 -1
  137. package/lib/commands/instant-api-policy/current.js +1 -1
  138. package/lib/commands/instant-api-policy/index.js +1 -1
  139. package/lib/commands/instant-api-policy/init.js +1 -1
  140. package/lib/commands/instant-api-policy/publish.js +1 -1
  141. package/lib/commands/instant-api-policy/pull.js +1 -1
  142. package/lib/commands/instant-api-policy/revision.js +1 -1
  143. package/lib/commands/instant-api-policy/revisions.js +1 -1
  144. package/lib/commands/instant-api-policy/rollback.js +1 -1
  145. package/lib/commands/instant-api-policy/shared.js +1 -1
  146. package/lib/commands/instant-api-policy/validate.js +1 -1
  147. package/lib/commands/issue/index.js +1 -1
  148. package/lib/commands/issue/nudge.js +1 -1
  149. package/lib/commands/issue/report.js +1 -1
  150. package/lib/commands/issue/shared.js +1 -1
  151. package/lib/commands/kb/create.js +1 -1
  152. package/lib/commands/kb/delete.js +1 -1
  153. package/lib/commands/kb/detail.js +1 -1
  154. package/lib/commands/kb/index.js +1 -1
  155. package/lib/commands/kb/list.js +1 -1
  156. package/lib/commands/kb/search.js +1 -1
  157. package/lib/commands/kb/shared.js +1 -1
  158. package/lib/commands/kb/update.js +1 -1
  159. package/lib/commands/logs/index.js +1 -1
  160. package/lib/commands/menu/asset-update.js +1 -1
  161. package/lib/commands/menu/delete.js +1 -1
  162. package/lib/commands/menu/external-link-create.js +1 -1
  163. package/lib/commands/menu/external-link-update.js +1 -1
  164. package/lib/commands/menu/group-create.js +1 -1
  165. package/lib/commands/menu/group-update.js +1 -1
  166. package/lib/commands/menu/index.js +1 -1
  167. package/lib/commands/menu/list.js +1 -1
  168. package/lib/commands/menu/move.js +1 -1
  169. package/lib/commands/menu/regroup-start.js +1 -1
  170. package/lib/commands/menu/rename.js +1 -1
  171. package/lib/commands/menu/shared/compare-table.js +1 -1
  172. package/lib/commands/menu/shared/delete-plan.js +1 -1
  173. package/lib/commands/menu/shared/facts.js +1 -1
  174. package/lib/commands/menu/shared/index.js +1 -1
  175. package/lib/commands/menu/shared/inquirer.js +1 -1
  176. package/lib/commands/menu/shared/local-pages.js +1 -1
  177. package/lib/commands/menu/shared/logic.js +1 -1
  178. package/lib/commands/menu/shared/mutations.js +1 -1
  179. package/lib/commands/menu/shared/path.js +1 -1
  180. package/lib/commands/menu/shared/service.js +1 -1
  181. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  182. package/lib/commands/menu/shared/sync-core.js +1 -1
  183. package/lib/commands/menu/shared/update-core.js +1 -1
  184. package/lib/commands/menu/shared/valid-url.js +1 -1
  185. package/lib/commands/menu/subapp-assets-status.js +1 -1
  186. package/lib/commands/menu/subapp-assets-update.js +1 -1
  187. package/lib/commands/menu/sync.js +1 -1
  188. package/lib/commands/menu/visibility-update.js +1 -1
  189. package/lib/commands/notification/config-create.js +1 -1
  190. package/lib/commands/notification/config-delete.js +1 -1
  191. package/lib/commands/notification/config-list.js +1 -1
  192. package/lib/commands/notification/config-update.js +1 -1
  193. package/lib/commands/notification/index.js +1 -1
  194. package/lib/commands/notification/shared.js +1 -1
  195. package/lib/commands/ocr/index.js +1 -1
  196. package/lib/commands/page/create.js +1 -1
  197. package/lib/commands/page/custom/detail.js +1 -1
  198. package/lib/commands/page/custom/list.js +1 -1
  199. package/lib/commands/page/custom/publish.js +1 -1
  200. package/lib/commands/page/custom/shared.js +1 -1
  201. package/lib/commands/page/custom/syntax.js +1 -1
  202. package/lib/commands/page/custom/update.js +1 -1
  203. package/lib/commands/page/data-list-status.js +1 -1
  204. package/lib/commands/page/generate-start.js +1 -1
  205. package/lib/commands/page/generate-status.js +1 -1
  206. package/lib/commands/page/index.js +1 -1
  207. package/lib/commands/page/pull.js +1 -1
  208. package/lib/commands/page/push.js +1 -1
  209. package/lib/commands/page/relation-audit.js +1 -1
  210. package/lib/commands/page/restore.js +1 -1
  211. package/lib/commands/page/shared.js +1 -1
  212. package/lib/commands/page/sync.js +1 -1
  213. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  214. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  215. package/lib/commands/project/create/format-elapsed.js +1 -1
  216. package/lib/commands/project/create/main.js +1 -1
  217. package/lib/commands/project/create/materialize-project-template.js +1 -1
  218. package/lib/commands/project/create/project-name.js +1 -1
  219. package/lib/commands/project/create/project-template-archive.js +1 -1
  220. package/lib/commands/project/create/project-template-path.js +1 -1
  221. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  222. package/lib/commands/project/create/use-format-code.js +1 -1
  223. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  224. package/lib/commands/project/domain-routing-sync.js +1 -1
  225. package/lib/commands/project/index.js +1 -1
  226. package/lib/commands/project/upgrade.js +1 -1
  227. package/lib/commands/registry.js +1 -1
  228. package/lib/commands/role/delete.js +1 -1
  229. package/lib/commands/role/detail.js +1 -1
  230. package/lib/commands/role/index.js +1 -1
  231. package/lib/commands/role/list.js +1 -1
  232. package/lib/commands/role/shared.js +1 -1
  233. package/lib/commands/role/update.js +1 -1
  234. package/lib/commands/role/user-add.js +1 -1
  235. package/lib/commands/role/user-remove.js +1 -1
  236. package/lib/commands/role/user-resolve.js +1 -1
  237. package/lib/commands/rule/get.js +1 -1
  238. package/lib/commands/rule/index.js +1 -1
  239. package/lib/commands/rule/list.js +1 -1
  240. package/lib/commands/rule/set.js +1 -1
  241. package/lib/commands/rule/shared.js +1 -1
  242. package/lib/commands/run/index.js +1 -1
  243. package/lib/commands/schema.js +1 -1
  244. package/lib/commands/sql/create.js +1 -1
  245. package/lib/commands/sql/delete.js +1 -1
  246. package/lib/commands/sql/detail.js +1 -1
  247. package/lib/commands/sql/exec.js +1 -1
  248. package/lib/commands/sql/index.js +1 -1
  249. package/lib/commands/sql/list.js +1 -1
  250. package/lib/commands/sql/pull.js +1 -1
  251. package/lib/commands/sql/push.js +1 -1
  252. package/lib/commands/sql/shared.js +1 -1
  253. package/lib/commands/sql/status.js +1 -1
  254. package/lib/commands/sql/validate.js +1 -1
  255. package/lib/commands/task/index.js +1 -1
  256. package/lib/commands/task/status.js +1 -1
  257. package/lib/commands/tenant/index.js +1 -1
  258. package/lib/commands/tenant/members-list.js +1 -1
  259. package/lib/commands/tenant/shared.js +1 -1
  260. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  261. package/lib/commands/user-account/feishu-bind.js +1 -1
  262. package/lib/commands/user-account/index.js +1 -1
  263. package/lib/commands/workspace/add.js +1 -1
  264. package/lib/commands/workspace/index.js +1 -1
  265. package/lib/commands/workspace/remove.js +1 -1
  266. package/lib/config/domain-config.js +1 -1
  267. package/lib/config/project-domain-routing.js +1 -1
  268. package/lib/config/region-config.js +1 -1
  269. package/lib/config/schema.js +1 -1
  270. package/lib/constant/cdn.js +1 -1
  271. package/lib/constant/cli.js +1 -1
  272. package/lib/constant/defaults.js +1 -1
  273. package/lib/constant/domain.js +1 -1
  274. package/lib/constant/env.js +1 -1
  275. package/lib/constant/output.js +1 -1
  276. package/lib/constant/paths.js +1 -1
  277. package/lib/constant/region.js +1 -1
  278. package/lib/constant/risk.js +1 -1
  279. package/lib/constant/routing-profile.js +1 -1
  280. package/lib/context/app-resolver.js +1 -1
  281. package/lib/context/auth-resolver.js +1 -1
  282. package/lib/context/config-loader.js +1 -1
  283. package/lib/context.js +1 -1
  284. package/lib/core/alias-resolver.js +1 -1
  285. package/lib/core/api-client.d.ts +7 -0
  286. package/lib/core/api-client.js +1 -1
  287. package/lib/core/bff/config.js +1 -1
  288. package/lib/core/bff/file-system.js +1 -1
  289. package/lib/core/bff/hash.js +1 -1
  290. package/lib/core/bff/hook-directory.js +1 -1
  291. package/lib/core/bff/lock.js +1 -1
  292. package/lib/core/bff/utils.js +1 -1
  293. package/lib/core/cross-db-analysis.d.ts +17 -0
  294. package/lib/core/cross-db-analysis.js +1 -0
  295. package/lib/core/cross-db-relation.js +1 -1
  296. package/lib/core/db-resolver.js +1 -1
  297. package/lib/core/flow-config.js +1 -1
  298. package/lib/core/instant-api-policy/config.js +1 -1
  299. package/lib/core/kb-search-client.js +1 -1
  300. package/lib/core/page/file-system.js +1 -1
  301. package/lib/core/page/hash.js +1 -1
  302. package/lib/core/page/lock.js +1 -1
  303. package/lib/core/page/lr-smart-jsx.js +1 -1
  304. package/lib/core/sql-index-auditor.js +1 -1
  305. package/lib/core/sql-sync/config.js +1 -1
  306. package/lib/core/sql-sync/file-system.js +1 -1
  307. package/lib/core/sql-sync/hash.js +1 -1
  308. package/lib/core/sql-sync/lock.js +1 -1
  309. package/lib/core/sql-sync/utils.js +1 -1
  310. package/lib/core/sql-validator.js +1 -1
  311. package/lib/errors.js +1 -1
  312. package/lib/framework/build-all-flags.js +1 -1
  313. package/lib/framework/error-output.js +1 -1
  314. package/lib/framework/explicit-yes.js +1 -1
  315. package/lib/framework/flags.js +1 -1
  316. package/lib/framework/help.js +1 -1
  317. package/lib/framework/index.js +1 -1
  318. package/lib/framework/output.js +1 -1
  319. package/lib/framework/response.js +1 -1
  320. package/lib/framework/runner-alias.js +1 -1
  321. package/lib/framework/runner.js +1 -1
  322. package/lib/framework/schema-export.js +1 -1
  323. package/lib/framework/supported-flags.js +1 -1
  324. package/lib/framework/types.js +1 -1
  325. package/lib/generated/build-info.d.ts +4 -4
  326. package/lib/generated/build-info.js +1 -1
  327. package/lib/generated/official-routing.js +1 -1
  328. package/lib/generated/routing-contract.js +1 -1
  329. package/lib/help.js +1 -1
  330. package/lib/postinstall.js +1 -1
  331. package/lib/runtime/confirmation.js +1 -1
  332. package/lib/runtime/event.js +1 -1
  333. package/lib/runtime/index.js +1 -1
  334. package/lib/runtime/queue.js +1 -1
  335. package/lib/runtime/resolve.js +1 -1
  336. package/lib/skills/builtin-skill.js +1 -1
  337. package/lib/skills/main.js +1 -1
  338. package/lib/skills/npx-skills-add.js +1 -1
  339. package/lib/skills/skill-presence.js +1 -1
  340. package/lib/telemetry/cli-command-trace.js +1 -1
  341. package/lib/telemetry/cli-help-trace.js +1 -1
  342. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  343. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  344. package/lib/telemetry/send-cli-trace-log.js +1 -1
  345. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  346. package/lib/utils/ai_config.js +1 -1
  347. package/lib/utils/apply-jq-filter.js +1 -1
  348. package/lib/utils/cdn-config.js +1 -1
  349. package/lib/utils/check-sdk-version.js +1 -1
  350. package/lib/utils/cli-version-check.js +1 -1
  351. package/lib/utils/cli-version-policy.js +1 -1
  352. package/lib/utils/config.js +1 -1
  353. package/lib/utils/entity-with-id.js +1 -1
  354. package/lib/utils/file-utils.js +1 -1
  355. package/lib/utils/guides-cdn.js +1 -1
  356. package/lib/utils/http-client.js +1 -1
  357. package/lib/utils/is-non-interactive.js +1 -1
  358. package/lib/utils/logger.js +1 -1
  359. package/lib/utils/params.js +1 -1
  360. package/lib/utils/platform.js +1 -1
  361. package/lib/utils/sleep.js +1 -1
  362. package/lib/utils/template-replacer.js +1 -1
  363. package/lib/utils/update-notice.js +1 -1
  364. package/lib/utils/version.js +1 -1
  365. package/lib/utils/with-active-cookie.js +1 -1
  366. package/lib/utils/write-cli-side-channel.js +1 -1
  367. package/package.json +1 -1
  368. package/skills/rabetbase/SKILL.md +6 -4
  369. package/skills/rabetbase/guides/database-connection-workflow.md +12 -3
  370. package/skills/rabetbase/guides/independent-deployment.md +10 -2
  371. package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +2 -0
  372. package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -0
  373. package/skills/rabetbase/references/rabetbase-db-cross-analyze.md +78 -0
  374. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  375. package/skills/rabetbase.manifest.json +4 -3
@@ -1 +1 @@
1
- const a287_0x5e5514=a287_0x3fc4;(function(_0x5c0732,_0x282727){const _0x200328=a287_0x3fc4,_0x55ed27=_0x5c0732();while(!![]){try{const _0x531f92=parseInt(_0x200328(0x1ca))/0x1*(parseInt(_0x200328(0x1d8))/0x2)+-parseInt(_0x200328(0x1ac))/0x3+-parseInt(_0x200328(0x14b))/0x4*(parseInt(_0x200328(0x270))/0x5)+-parseInt(_0x200328(0x1b2))/0x6+-parseInt(_0x200328(0x1af))/0x7+parseInt(_0x200328(0x13e))/0x8*(-parseInt(_0x200328(0x286))/0x9)+parseInt(_0x200328(0x16b))/0xa*(parseInt(_0x200328(0x1aa))/0xb);if(_0x531f92===_0x282727)break;else _0x55ed27['push'](_0x55ed27['shift']());}catch(_0x272000){_0x55ed27['push'](_0x55ed27['shift']());}}}(a287_0x240c,0x61bbf));import{randomUUID}from'node:crypto';import{chmod,link,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{resolve}from'node:path';export const FLOW_CONFIG_JSON_SCHEMA={'$schema':a287_0x5e5514(0x2b0),'$id':a287_0x5e5514(0x140),'title':a287_0x5e5514(0x1a1),'type':'object','required':[a287_0x5e5514(0x284),'flowType',a287_0x5e5514(0x189)],'$defs':{'userId':{'anyOf':[{'type':a287_0x5e5514(0x239),'minLength':0x1},{'type':a287_0x5e5514(0x26a),'minimum':0x1}]},'position':{'type':a287_0x5e5514(0x267),'required':['x','y'],'properties':{'x':{'type':a287_0x5e5514(0x1b5),'minimum':0x0},'y':{'type':a287_0x5e5514(0x1b5),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a287_0x5e5514(0x267),'required':[a287_0x5e5514(0x249),a287_0x5e5514(0x266)],'properties':{'value':{'type':a287_0x5e5514(0x26a),'minimum':0x1},'unit':{'enum':[a287_0x5e5514(0x289),a287_0x5e5514(0x1d2),a287_0x5e5514(0x20c),a287_0x5e5514(0x19c)]}},'additionalProperties':!![]},'flowNode':{'type':'object','required':['id','type',a287_0x5e5514(0x1fd),a287_0x5e5514(0x293)],'properties':{'id':{'type':a287_0x5e5514(0x239),'pattern':a287_0x5e5514(0x18b)},'type':{'enum':['START',a287_0x5e5514(0x243),a287_0x5e5514(0x22c),a287_0x5e5514(0x187),a287_0x5e5514(0x152),'NOTIFICATION']},'name':{'type':'string','minLength':0x1},'path':{'type':a287_0x5e5514(0x239),'minLength':0x1},'position':{'$ref':a287_0x5e5514(0x15a)},'approvalMode':{'enum':[a287_0x5e5514(0x279),a287_0x5e5514(0x17d),a287_0x5e5514(0x248)]},'taskMode':{'enum':[a287_0x5e5514(0x22c),a287_0x5e5514(0x1d0)]},'assignee':{'type':'object','required':[a287_0x5e5514(0x1e7)],'properties':{'strategy':{'enum':['FIXED',a287_0x5e5514(0x188)]},'userIds':{'type':'array','minItems':0x1,'items':{'$ref':'#/$defs/userId'}},'roleId':{'anyOf':[{'type':a287_0x5e5514(0x26a),'minimum':0x1},{'type':a287_0x5e5514(0x239),'pattern':a287_0x5e5514(0x28b)}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':[a287_0x5e5514(0x1e7),a287_0x5e5514(0x155)],'properties':{'strategy':{'const':a287_0x5e5514(0x141)},'userIds':{'type':a287_0x5e5514(0x1dc),'minItems':0x1,'items':{'$ref':a287_0x5e5514(0x1a6)}}},'additionalProperties':!![]},'sequential':{'type':'boolean'},'result':{'enum':[a287_0x5e5514(0x29f),'REJECTED']},'scriptName':{'type':a287_0x5e5514(0x239),'minLength':0x1},'resultVariable':{'type':a287_0x5e5514(0x239),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'async':{'type':a287_0x5e5514(0x267),'properties':{'enabled':{'type':a287_0x5e5514(0x27a)},'retryCount':{'type':a287_0x5e5514(0x26a),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a287_0x5e5514(0x13c)}},'additionalProperties':!![]},'timeout':{'type':a287_0x5e5514(0x267),'properties':{'enabled':{'type':a287_0x5e5514(0x27a)},'duration':{'$ref':a287_0x5e5514(0x13c)},'action':{'enum':[a287_0x5e5514(0x280),a287_0x5e5514(0x175),a287_0x5e5514(0x261)]},'interrupting':{'type':'boolean'},'scriptName':{'type':'string','minLength':0x1},'resultVariable':{'type':a287_0x5e5514(0x239),'pattern':a287_0x5e5514(0x18b)}},'additionalProperties':!![]},'cc':{'type':a287_0x5e5514(0x267),'required':[a287_0x5e5514(0x14f)],'properties':{'recipientUserIds':{'type':a287_0x5e5514(0x1dc),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a287_0x5e5514(0x239),'minLength':0x1}},'visible':{'type':a287_0x5e5514(0x1dc),'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a287_0x5e5514(0x267),'required':['configCode','template'],'properties':{'version':{'enum':['v1']},'configCode':{'type':a287_0x5e5514(0x239),'minLength':0x1},'failurePolicy':{'enum':[a287_0x5e5514(0x165),a287_0x5e5514(0x1f4)]},'template':{'type':a287_0x5e5514(0x267),'required':['title','summary'],'properties':{'title':{'type':a287_0x5e5514(0x239),'minLength':0x1},'summary':{'type':'string','minLength':0x1},'detailMarkdown':{'type':a287_0x5e5514(0x239)},'facts':{'type':a287_0x5e5514(0x1dc),'maxItems':0x8,'items':{'type':'object','required':['label','value'],'properties':{'label':{'type':'string','minLength':0x1},'value':{'type':'string','minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a287_0x5e5514(0x1dc),'maxItems':0x2,'items':{'type':'object','required':[a287_0x5e5514(0x265),a287_0x5e5514(0x1f7)],'properties':{'text':{'type':a287_0x5e5514(0x239),'minLength':0x1},'url':{'type':'string','minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':'array','items':{'type':'object','required':['type','value'],'properties':{'type':{'enum':[a287_0x5e5514(0x29d),a287_0x5e5514(0x188),a287_0x5e5514(0x246)]},'value':{'type':'string','minLength':0x1},'role':{'enum':['TO','CC','BCC']}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':'object','properties':{'id':{'type':a287_0x5e5514(0x239),'pattern':a287_0x5e5514(0x18b)},'source':{'type':a287_0x5e5514(0x239),'minLength':0x1},'target':{'type':'string','minLength':0x1},'sourceNodeId':{'type':a287_0x5e5514(0x239),'minLength':0x1},'targetNodeId':{'type':a287_0x5e5514(0x239),'minLength':0x1},'conditionType':{'enum':[a287_0x5e5514(0x212),a287_0x5e5514(0x29f),a287_0x5e5514(0x206),a287_0x5e5514(0x1a9)]},'expression':{'type':a287_0x5e5514(0x239)},'defaultFlow':{'type':a287_0x5e5514(0x27a)},'name':{'type':'string'},'waypoints':{'type':a287_0x5e5514(0x1dc),'items':{'$ref':a287_0x5e5514(0x15a)}}},'allOf':[{'anyOf':[{'required':[a287_0x5e5514(0x26c)]},{'required':[a287_0x5e5514(0x1d4)]}]},{'anyOf':[{'required':['target']},{'required':[a287_0x5e5514(0x1b9)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':'string','minLength':0x1},'flowDesc':{'type':a287_0x5e5514(0x239)},'flowType':{'enum':[a287_0x5e5514(0x1da),a287_0x5e5514(0x2ad)]},'datasetCode':{'type':a287_0x5e5514(0x239),'minLength':0x1},'pageId':{'type':'integer'},'templateName':![],'flowJson':{'type':a287_0x5e5514(0x267),'required':['nodes',a287_0x5e5514(0x14c)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':'string','const':'approval.simple-flow.v1','description':a287_0x5e5514(0x23b)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a287_0x5e5514(0x164)},'startPageId':![],'startPath':{'type':'string','minLength':0x1},'nodes':{'type':a287_0x5e5514(0x1dc),'minItems':0x1,'items':{'$ref':a287_0x5e5514(0x154)}},'edges':{'type':a287_0x5e5514(0x1dc),'minItems':0x1,'items':{'$ref':a287_0x5e5514(0x1ad)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a287_0x5e5514(0x1e9),'flowCode','flowName',a287_0x5e5514(0x1a3),a287_0x5e5514(0x2af),a287_0x5e5514(0x1c9),'pageId',a287_0x5e5514(0x28a)],REMOVED_ROOT_FIELDS=['id',a287_0x5e5514(0x1c9),'templateName'],DEFAULT_FLOW_SCHEMA_VERSION=a287_0x5e5514(0x151),NODE_TYPES=new Set([a287_0x5e5514(0x23e),a287_0x5e5514(0x243),a287_0x5e5514(0x22c),a287_0x5e5514(0x187),a287_0x5e5514(0x152),'NOTIFICATION']),CONDITION_TYPES=new Set([a287_0x5e5514(0x212),'APPROVED','REJECTED',a287_0x5e5514(0x1a9)]),APPROVAL_MODES=new Set([a287_0x5e5514(0x279),'ALL',a287_0x5e5514(0x248)]),APPROVAL_TASK_MODES=new Set([a287_0x5e5514(0x22c),a287_0x5e5514(0x1d0)]),FLOW_TIME_UNITS=new Set([a287_0x5e5514(0x289),'MINUTES',a287_0x5e5514(0x20c),'DAYS']),APPROVAL_TIMEOUT_ACTIONS=new Set([a287_0x5e5514(0x280),a287_0x5e5514(0x175),a287_0x5e5514(0x261)]),FLOW_TYPES=new Set([a287_0x5e5514(0x1da),a287_0x5e5514(0x2ad)]),FLOW_PAGE_MODES=new Set(['CUSTOM_PAGE',a287_0x5e5514(0x2a4)]),BPMN_ID_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,VARIABLE_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,NOTIFICATION_PLACEHOLDER_PATTERN=/\$\{([^{}]+)\}/g,NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN=/^\$\{(?:event|context|variables)\.[^{}]+\}$/,NOTIFICATION_FAILURE_POLICIES=new Set([a287_0x5e5514(0x165),a287_0x5e5514(0x1f4)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a287_0x5e5514(0x29d),a287_0x5e5514(0x188),a287_0x5e5514(0x246)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a287_0x5e5514(0x287)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a287_0x5e5514(0x143),UNSUPPORTED_FORM_MESSAGE=a287_0x5e5514(0x214),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a287_0x5e5514(0x159),RESERVED_RESULT_VARIABLES=new Set(['formData',a287_0x5e5514(0x292),a287_0x5e5514(0x18c),a287_0x5e5514(0x217),a287_0x5e5514(0x163),a287_0x5e5514(0x1f0),'approval_sys_datasetCode','approval_sys_pageId',a287_0x5e5514(0x297),a287_0x5e5514(0x1fa)]);export function normalizeFlowConfig(_0x51d853){const _0xb87f4f=a287_0x5e5514;if(!isRecord(_0x51d853))throw new TypeError(_0xb87f4f(0x213));const _0x3da2dc=cloneJsonValue(_0x51d853),_0x3472de=_0x3da2dc[_0xb87f4f(0x189)],_0x2019a5=isRecord(_0x3472de)?cloneJsonValue(_0x3472de):{},_0x368f1b=[],_0x392828=[];for(const _0x31206a of REMOVED_ROOT_FIELDS){if(!Object[_0xb87f4f(0x15e)][_0xb87f4f(0x264)][_0xb87f4f(0x156)](_0x3da2dc,_0x31206a))continue;delete _0x3da2dc[_0x31206a],_0x392828[_0xb87f4f(0x193)](_0x31206a),_0x368f1b[_0xb87f4f(0x193)]({'code':_0xb87f4f(0x197),'path':_0x31206a,'message':_0x31206a+_0xb87f4f(0x257)});}for(const _0x3a2c40 of REMOVED_FLOW_JSON_FIELDS){if(!Object['prototype'][_0xb87f4f(0x264)][_0xb87f4f(0x156)](_0x2019a5,_0x3a2c40))continue;const _0x5d13bc=_0xb87f4f(0x176)+_0x3a2c40;delete _0x2019a5[_0x3a2c40],_0x392828[_0xb87f4f(0x193)](_0x5d13bc),_0x368f1b[_0xb87f4f(0x193)]({'code':_0xb87f4f(0x197),'path':_0x5d13bc,'message':_0x5d13bc+_0xb87f4f(0x257)});}if(Object[_0xb87f4f(0x15e)]['hasOwnProperty'][_0xb87f4f(0x156)](_0x2019a5,_0xb87f4f(0x169))){const _0x490825=_0x2019a5['schemaVersion'],_0x2e0d5a=typeof _0x490825===_0xb87f4f(0x239)?_0x490825['trim']():_0x490825;if(isEmptyJsonValue(_0x490825)||_0x2e0d5a===DEFAULT_FLOW_SCHEMA_VERSION){const _0x468218=_0xb87f4f(0x242);delete _0x2019a5[_0xb87f4f(0x169)],_0x392828['push'](_0x468218),_0x368f1b['push']({'code':_0xb87f4f(0x197),'path':_0x468218,'message':_0x468218+_0xb87f4f(0x18e)+DEFAULT_FLOW_SCHEMA_VERSION+_0xb87f4f(0x1c0)});}}removeEmptyMetadata(_0x2019a5,_0xb87f4f(0x189),_0x368f1b,_0x392828);_0x3da2dc[_0xb87f4f(0x21f)]==='INDEPENDENT_FLOW'&&!Object[_0xb87f4f(0x15e)][_0xb87f4f(0x264)][_0xb87f4f(0x156)](_0x2019a5,_0xb87f4f(0x227))&&(_0x2019a5[_0xb87f4f(0x227)]=_0xb87f4f(0x164));_0x3da2dc['flowJson']=_0x2019a5;if(typeof _0x3da2dc[_0xb87f4f(0x284)]===_0xb87f4f(0x239))_0x3da2dc[_0xb87f4f(0x284)]=_0x3da2dc[_0xb87f4f(0x284)][_0xb87f4f(0x2aa)]();return{'config':_0x3da2dc,'warnings':_0x368f1b,'removedPaths':_0x392828};}export function validateFlowConfig(_0xde2b59){const _0xde3738=a287_0x5e5514;let _0x1b201f;try{_0x1b201f=normalizeFlowConfig(_0xde2b59);}catch(_0x33cbfc){const _0x58e279=_0x33cbfc instanceof Error?_0x33cbfc[_0xde3738(0x19d)]:String(_0x33cbfc),_0x30f146={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x58e279}],'warnings':[],'normalized':_0x30f146,'validationConfig':_0x30f146};}const _0x2cf4e3=_0x1b201f[_0xde3738(0x2a3)],_0x3136b3=cloneJsonValue(_0x2cf4e3),_0xb9ee5e=_0x3136b3[_0xde3738(0x189)];_0xb9ee5e[_0xde3738(0x1e9)]=_0xde3738(0x22e),_0xb9ee5e[_0xde3738(0x284)]=_0x2cf4e3['flowName'];typeof _0x2cf4e3['datasetCode']===_0xde3738(0x239)&&_0x2cf4e3['datasetCode'][_0xde3738(0x2aa)]()&&(_0xb9ee5e[_0xde3738(0x1a3)]=_0x2cf4e3[_0xde3738(0x2af)][_0xde3738(0x2aa)]());const _0x386f6d=[];return validateOuterMetadata(_0x2cf4e3,_0x386f6d),validateFlowClassification(_0x2cf4e3,_0x386f6d),validateGraph(_0x2cf4e3[_0xde3738(0x189)],_0x386f6d),{'valid':_0x386f6d['length']===0x0,'errors':_0x386f6d,'warnings':_0x1b201f[_0xde3738(0x232)],'normalized':_0x2cf4e3,'validationConfig':_0x3136b3};}function validateFlowClassification(_0x594ba3,_0x560f2c){const _0x41e67d=a287_0x5e5514;if(!isRecord(_0x594ba3[_0x41e67d(0x189)]))return;const _0x155020=_0x594ba3[_0x41e67d(0x21f)],_0x5177b2=_0x594ba3[_0x41e67d(0x189)]['pageMode'];_0x5177b2!==undefined&&(typeof _0x5177b2!==_0x41e67d(0x239)||!FLOW_PAGE_MODES[_0x41e67d(0x1d3)](_0x5177b2))&&_0x560f2c[_0x41e67d(0x193)]({'path':_0x41e67d(0x158),'message':_0x41e67d(0x203)+String(_0x5177b2)+'.'});_0x155020===_0x41e67d(0x1da)&&_0x5177b2!==undefined&&_0x560f2c[_0x41e67d(0x193)]({'path':_0x41e67d(0x158),'message':_0x41e67d(0x294)});_0x155020==='INDEPENDENT_FLOW'&&_0x5177b2===_0x41e67d(0x2a4)&&_0x560f2c[_0x41e67d(0x193)]({'path':_0x41e67d(0x158),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x155020===_0x41e67d(0x1da)||_0x155020===_0x41e67d(0x2ad))&&validateCustomPageNavigation(_0x594ba3,_0x155020,_0x5177b2,_0x560f2c);if(_0x155020!==_0x41e67d(0x1da)||!Array[_0x41e67d(0x19a)](_0x594ba3[_0x41e67d(0x189)]['nodes']))return;_0x594ba3[_0x41e67d(0x189)]['nodes'][_0x41e67d(0x275)]((_0x1edd7,_0x177533)=>{const _0x40f32b=_0x41e67d;isRecord(_0x1edd7)&&_0x1edd7[_0x40f32b(0x199)]===_0x40f32b(0x22c)&&_0x1edd7['taskMode']===_0x40f32b(0x1d0)&&_0x560f2c[_0x40f32b(0x193)]({'path':_0x40f32b(0x1f5)+_0x177533+_0x40f32b(0x1f3),'message':_0x40f32b(0x25f)});});}function validateCustomPageNavigation(_0x4c6487,_0x43212c,_0x5e9f7e,_0xb01db8){const _0x18a4d5=a287_0x5e5514,_0x17cdd0=_0x4c6487[_0x18a4d5(0x189)][_0x18a4d5(0x222)];_0x17cdd0!==undefined&&_0xb01db8[_0x18a4d5(0x193)]({'path':_0x18a4d5(0x23c),'message':_0x18a4d5(0x256)});const _0x167869=_0x4c6487[_0x18a4d5(0x189)]['startPath'];_0x167869!==undefined&&(typeof _0x167869!=='string'||_0x167869['trim']()==='')&&_0xb01db8[_0x18a4d5(0x193)]({'path':'flowJson.startPath','message':'startPath\x20must\x20be\x20a\x20non-empty\x20string.'});const _0x50eaf9=Array['isArray'](_0x4c6487['flowJson'][_0x18a4d5(0x16d)])?_0x4c6487['flowJson'][_0x18a4d5(0x16d)][_0x18a4d5(0x26f)]((_0x5bbd54,_0x499373)=>({'node':_0x5bbd54,'index':_0x499373}))[_0x18a4d5(0x24f)](({node:_0x1fbf68})=>isRecord(_0x1fbf68)&&_0x1fbf68['path']!==undefined):[],_0x25183f=_0x167869!==undefined||_0x50eaf9[_0x18a4d5(0x196)]>0x0,_0x4f0c99=_0x5e9f7e===undefined&&_0x43212c===_0x18a4d5(0x2ad)?'CUSTOM_PAGE':_0x5e9f7e;_0x25183f&&(_0x43212c!==_0x18a4d5(0x2ad)||_0x4f0c99!==_0x18a4d5(0x164))&&(_0x167869!==undefined&&_0xb01db8['push']({'path':_0x18a4d5(0x22b),'message':_0x18a4d5(0x2a8)}),_0x50eaf9[_0x18a4d5(0x275)](({index:_0x118fd6})=>{const _0x1ca52f=_0x18a4d5;_0xb01db8['push']({'path':_0x1ca52f(0x1f5)+_0x118fd6+_0x1ca52f(0x145),'message':'node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'});}));}export async function writeNormalizedFlowConfig(_0x48dacd,_0x1c72c7,_0x156fc9={}){const _0x670a8c=a287_0x5e5514,_0x517326=resolve(_0x48dacd),_0x3a9bb9=_0x517326+'.'+process[_0x670a8c(0x1b0)]+'.'+randomUUID()+_0x670a8c(0x24c),_0x4743c7=JSON['stringify'](_0x1c72c7,null,0x2)+'\x0a';let _0x1cb354;try{try{_0x1cb354=(await stat(_0x517326))[_0x670a8c(0x13f)]&0x1ff;}catch{_0x1cb354=undefined;}await writeFile(_0x3a9bb9,_0x4743c7,{'encoding':_0x670a8c(0x1a7),'flag':'wx','mode':_0x1cb354??0x1a4});if(_0x1cb354!==undefined)await chmod(_0x3a9bb9,_0x1cb354);_0x156fc9[_0x670a8c(0x277)]===![]?(await link(_0x3a9bb9,_0x517326),await unlink(_0x3a9bb9)):await rename(_0x3a9bb9,_0x517326);}finally{await unlink(_0x3a9bb9)[_0x670a8c(0x1c3)](()=>undefined);}}function validateOuterMetadata(_0xdb1fde,_0x40ca54){const _0x34f0b6=a287_0x5e5514;(typeof _0xdb1fde['flowName']!==_0x34f0b6(0x239)||_0xdb1fde[_0x34f0b6(0x284)][_0x34f0b6(0x2aa)]()==='')&&_0x40ca54[_0x34f0b6(0x193)]({'path':_0x34f0b6(0x284),'message':_0x34f0b6(0x228)});_0xdb1fde[_0x34f0b6(0x19e)]!==undefined&&typeof _0xdb1fde[_0x34f0b6(0x19e)]!==_0x34f0b6(0x239)&&_0x40ca54[_0x34f0b6(0x193)]({'path':_0x34f0b6(0x19e),'message':_0x34f0b6(0x259)});if(_0xdb1fde[_0x34f0b6(0x21f)]===undefined||_0xdb1fde[_0x34f0b6(0x21f)]===null)_0x40ca54[_0x34f0b6(0x193)]({'path':_0x34f0b6(0x21f),'message':_0x34f0b6(0x223)});else(typeof _0xdb1fde['flowType']!==_0x34f0b6(0x239)||!FLOW_TYPES[_0x34f0b6(0x1d3)](_0xdb1fde[_0x34f0b6(0x21f)]))&&_0x40ca54[_0x34f0b6(0x193)]({'path':'flowType','message':_0x34f0b6(0x27e)+String(_0xdb1fde[_0x34f0b6(0x21f)])+'.'});_0xdb1fde[_0x34f0b6(0x2af)]!==undefined&&typeof _0xdb1fde['datasetCode']!==_0x34f0b6(0x239)&&_0x40ca54[_0x34f0b6(0x193)]({'path':_0x34f0b6(0x2af),'message':_0x34f0b6(0x178)}),_0xdb1fde[_0x34f0b6(0x25d)]!==undefined&&(!Number[_0x34f0b6(0x278)](_0xdb1fde[_0x34f0b6(0x25d)])||_0xdb1fde[_0x34f0b6(0x25d)]<0x0)&&_0x40ca54['push']({'path':_0x34f0b6(0x25d),'message':_0x34f0b6(0x153)}),_0xdb1fde[_0x34f0b6(0x21f)]==='INDEPENDENT_FLOW'&&_0xdb1fde[_0x34f0b6(0x2af)]!==undefined&&_0x40ca54[_0x34f0b6(0x193)]({'path':_0x34f0b6(0x2af),'message':_0x34f0b6(0x26e)}),_0xdb1fde['flowType']===_0x34f0b6(0x2ad)&&_0xdb1fde[_0x34f0b6(0x25d)]!==undefined&&_0x40ca54[_0x34f0b6(0x193)]({'path':_0x34f0b6(0x25d),'message':_0x34f0b6(0x195)});}function validateGraph(_0x2fdd09,_0x26f258){const _0x23f377=a287_0x5e5514;if(!isRecord(_0x2fdd09)){_0x26f258['push']({'path':'flowJson','message':_0x23f377(0x20a)});return;}!Array[_0x23f377(0x19a)](_0x2fdd09[_0x23f377(0x16d)])&&_0x26f258[_0x23f377(0x193)]({'path':_0x23f377(0x1a8),'message':_0x23f377(0x24a)});!Array[_0x23f377(0x19a)](_0x2fdd09['edges'])&&_0x26f258[_0x23f377(0x193)]({'path':_0x23f377(0x1db),'message':_0x23f377(0x15f)});Object[_0x23f377(0x15e)][_0x23f377(0x264)][_0x23f377(0x156)](_0x2fdd09,_0x23f377(0x169))&&_0x26f258[_0x23f377(0x193)]({'path':_0x23f377(0x242),'message':_0x23f377(0x245)+String(_0x2fdd09['schemaVersion'])+'.\x20This\x20CLI\x20supports\x20only\x20'+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x355dcf of[_0x23f377(0x20e),_0x23f377(0x263),_0x23f377(0x21a)]){Object['prototype'][_0x23f377(0x264)][_0x23f377(0x156)](_0x2fdd09,_0x355dcf)&&_0x26f258[_0x23f377(0x193)]({'path':_0x23f377(0x176)+_0x355dcf,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x23f377(0x19a)](_0x2fdd09[_0x23f377(0x16d)])||!Array[_0x23f377(0x19a)](_0x2fdd09[_0x23f377(0x14c)]))return;const _0x1fb40b=new Map(),_0x4f3fe1=[],_0x2f2414=[],_0x363818=new Map(),_0x2fbfee=new Map(),_0x4248c4=new Set();let _0x98e59=0x0;_0x2fdd09[_0x23f377(0x16d)][_0x23f377(0x275)]((_0x367e01,_0x1729e4)=>{const _0x4de80a=_0x23f377,_0x46b5bc='flowJson.nodes['+_0x1729e4+']';if(!isRecord(_0x367e01)){_0x26f258['push']({'path':_0x46b5bc,'message':_0x4de80a(0x27b)});return;}const _0x5915df=_0x367e01;if(typeof _0x5915df['id']!==_0x4de80a(0x239)||!BPMN_ID_PATTERN[_0x4de80a(0x1e3)](_0x5915df['id']))_0x26f258[_0x4de80a(0x193)]({'path':_0x46b5bc+_0x4de80a(0x1d1),'message':_0x4de80a(0x268)});else _0x1fb40b[_0x4de80a(0x1d3)](_0x5915df['id'])?_0x26f258['push']({'path':_0x46b5bc+_0x4de80a(0x1d1),'message':_0x4de80a(0x190)+_0x5915df['id']+'.'}):(_0x1fb40b[_0x4de80a(0x194)](_0x5915df['id'],_0x5915df),_0x4248c4[_0x4de80a(0x1f2)](_0x5915df['id']));if(!NODE_TYPES[_0x4de80a(0x1d3)](_0x5915df[_0x4de80a(0x199)]))_0x26f258['push']({'path':_0x46b5bc+_0x4de80a(0x23d),'message':_0x4de80a(0x250)+String(_0x5915df[_0x4de80a(0x199)])+'.'});else{if(_0x5915df[_0x4de80a(0x199)]==='START')_0x4f3fe1[_0x4de80a(0x193)](_0x5915df['id']);else _0x5915df[_0x4de80a(0x199)]===_0x4de80a(0x243)&&_0x2f2414[_0x4de80a(0x193)](_0x5915df['id']);}_0x5915df[_0x4de80a(0x199)]==='APPROVAL'&&(_0x5915df[_0x4de80a(0x2a9)]===undefined||_0x5915df[_0x4de80a(0x2a9)]===_0x4de80a(0x22c))&&(_0x98e59+=0x1);validateNode(_0x5915df,_0x46b5bc,_0x26f258);if(_0x5915df[_0x4de80a(0x199)]===_0x4de80a(0x152)){const _0x4056dc=resolveEffectiveResultVariable(_0x5915df['resultVariable'],![]);_0x4056dc&&(registerResultVariableOwner(_0x2fbfee,_0x4056dc,_0x5915df['id'],_0x26f258),!_0x363818[_0x4de80a(0x1d3)](_0x4056dc)&&_0x363818[_0x4de80a(0x194)](_0x4056dc,_0x5915df['id']));}if(_0x5915df[_0x4de80a(0x199)]===_0x4de80a(0x22c)&&isRecord(_0x5915df[_0x4de80a(0x26d)])&&_0x5915df['timeout'][_0x4de80a(0x18f)]===!![]&&_0x5915df[_0x4de80a(0x26d)]['action']==='EXECUTE_BFF'){const _0xb170f3=resolveEffectiveResultVariable(_0x5915df['timeout'][_0x4de80a(0x191)],!![]);_0xb170f3&&registerResultVariableOwner(_0x2fbfee,_0xb170f3,_0x5915df['id']+_0x4de80a(0x21e),_0x26f258);}});_0x4f3fe1[_0x23f377(0x196)]!==0x1&&_0x26f258[_0x23f377(0x193)]({'path':'flowJson.nodes','message':_0x23f377(0x15b)});_0x2f2414[_0x23f377(0x196)]===0x0&&_0x26f258['push']({'path':'flowJson.nodes','message':_0x23f377(0x1bd)});const _0x46ec9e=new Map(),_0x5658e4=new Map(),_0x459c44=new Map(),_0x579218=new Set();_0x2fdd09[_0x23f377(0x14c)][_0x23f377(0x275)]((_0x41ac25,_0x52e4fc)=>{const _0x298349=_0x23f377,_0x3e327d=_0x298349(0x1c4)+_0x52e4fc+']';if(!isRecord(_0x41ac25)){_0x26f258[_0x298349(0x193)]({'path':_0x3e327d,'message':_0x298349(0x19b)});return;}const _0x489728=_0x41ac25;_0x459c44[_0x298349(0x194)](_0x489728,_0x3e327d);const _0x58183a=resolveEdgeEndpoint(_0x489728[_0x298349(0x26c)],_0x489728['sourceNodeId']),_0xe245b4=resolveEdgeEndpoint(_0x489728[_0x298349(0x1f6)],_0x489728[_0x298349(0x1b9)]);if(!_0x58183a)_0x26f258['push']({'path':_0x3e327d+_0x298349(0x21d),'message':_0x298349(0x1b1)});if(!_0xe245b4)_0x26f258[_0x298349(0x193)]({'path':_0x3e327d+_0x298349(0x299),'message':_0x298349(0x1de)});_0x58183a&&!_0x1fb40b[_0x298349(0x1d3)](_0x58183a)&&_0x26f258[_0x298349(0x193)]({'path':_0x3e327d+_0x298349(0x21d),'message':_0x298349(0x16a)+_0x58183a+'.'});_0xe245b4&&!_0x1fb40b['has'](_0xe245b4)&&_0x26f258[_0x298349(0x193)]({'path':_0x3e327d+'.target','message':_0x298349(0x21b)+_0xe245b4+'.'});if(_0x489728['id']!==undefined){if(typeof _0x489728['id']!=='string'||!BPMN_ID_PATTERN[_0x298349(0x1e3)](_0x489728['id']))_0x26f258['push']({'path':_0x3e327d+_0x298349(0x1d1),'message':_0x298349(0x224)});else{if(_0x4248c4[_0x298349(0x1d3)](_0x489728['id']))_0x26f258[_0x298349(0x193)]({'path':_0x3e327d+_0x298349(0x1d1),'message':'Duplicate\x20BPMN\x20element\x20id:\x20'+_0x489728['id']+'.'});else!_0x4248c4['has'](_0x489728['id'])&&_0x4248c4[_0x298349(0x1f2)](_0x489728['id']);}}if(_0x58183a&&_0xe245b4){const _0x5a2f57=_0x58183a+'\x00'+_0xe245b4+'\x00'+(_0x489728[_0x298349(0x273)]??_0x298349(0x212));_0x579218['has'](_0x5a2f57)?_0x26f258['push']({'path':_0x3e327d,'message':'Duplicate\x20edge\x20route:\x20'+_0x58183a+_0x298349(0x14d)+_0xe245b4+'\x20('+(_0x489728[_0x298349(0x273)]??_0x298349(0x212))+').'}):_0x579218[_0x298349(0x1f2)](_0x5a2f57);}validateEdge(_0x489728,_0x3e327d,_0x26f258),_0x58183a&&_0xe245b4&&(_0x46ec9e[_0x298349(0x146)](_0x58183a)?.['push'](_0x489728)??_0x46ec9e[_0x298349(0x194)](_0x58183a,[_0x489728]),_0x5658e4[_0x298349(0x146)](_0xe245b4)?.['push'](_0x489728)??_0x5658e4[_0x298349(0x194)](_0xe245b4,[_0x489728]));});if(_0x4f3fe1['length']!==0x1)return;validateGraphShape(_0x1fb40b,_0x4f3fe1[0x0],_0x2f2414,_0x46ec9e,_0x5658e4,_0x459c44,_0x26f258),validateScriptResultReferences(_0x1fb40b,_0x4f3fe1[0x0],_0x46ec9e,_0x5658e4,_0x459c44,_0x363818,_0x26f258),validateApprovalResults(_0x1fb40b,_0x98e59,_0x2f2414,_0x26f258);}function validateNode(_0x4bd08c,_0x3366a5,_0x4685bf){const _0x5a5077=a287_0x5e5514;for(const _0x203c23 of[_0x5a5077(0x1cb),_0x5a5077(0x1f1)]){Object[_0x5a5077(0x15e)][_0x5a5077(0x264)][_0x5a5077(0x156)](_0x4bd08c,_0x203c23)&&_0x4685bf[_0x5a5077(0x193)]({'path':_0x3366a5+'.'+_0x203c23,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x5a5077(0x1d3)](_0x4bd08c['type']))return;(typeof _0x4bd08c['name']!==_0x5a5077(0x239)||_0x4bd08c['name'][_0x5a5077(0x2aa)]()==='')&&_0x4685bf[_0x5a5077(0x193)]({'path':_0x3366a5+_0x5a5077(0x1d9),'message':_0x5a5077(0x148)});_0x4bd08c['pageId']!==undefined&&_0x4685bf[_0x5a5077(0x193)]({'path':_0x3366a5+_0x5a5077(0x28c),'message':_0x5a5077(0x1e2)});if(_0x4bd08c['path']!==undefined){if(typeof _0x4bd08c[_0x5a5077(0x1cd)]!==_0x5a5077(0x239)||_0x4bd08c['path']['trim']()==='')_0x4685bf['push']({'path':_0x3366a5+_0x5a5077(0x2a5),'message':_0x5a5077(0x179)});else _0x4bd08c['type']!==_0x5a5077(0x22c)&&_0x4bd08c[_0x5a5077(0x199)]!==_0x5a5077(0x243)&&_0x4685bf[_0x5a5077(0x193)]({'path':_0x3366a5+_0x5a5077(0x2a5),'message':_0x5a5077(0x233)});}const _0x16d015=_0x4bd08c[_0x5a5077(0x293)];if(!isRecord(_0x16d015))_0x4685bf['push']({'path':_0x3366a5+_0x5a5077(0x19f),'message':'Every\x20node\x20requires\x20position.x\x20and\x20position.y.'});else for(const _0x225eb5 of['x','y']){const _0x1bf0ea=_0x16d015[_0x225eb5];(typeof _0x1bf0ea!=='number'||!Number[_0x5a5077(0x200)](_0x1bf0ea)||_0x1bf0ea<0x0)&&_0x4685bf['push']({'path':_0x3366a5+_0x5a5077(0x1d6)+_0x225eb5,'message':_0x5a5077(0x1e4)+_0x225eb5+_0x5a5077(0x1bc)});}if(_0x4bd08c[_0x5a5077(0x199)]===_0x5a5077(0x22c)){const _0x23c075=_0x4bd08c[_0x5a5077(0x1c1)]??_0x5a5077(0x279),_0x5b9831=_0x4bd08c[_0x5a5077(0x2a9)]??'APPROVAL';!APPROVAL_TASK_MODES[_0x5a5077(0x1d3)](_0x5b9831)&&_0x4685bf[_0x5a5077(0x193)]({'path':_0x3366a5+_0x5a5077(0x17c),'message':_0x5a5077(0x1a0)+String(_0x5b9831)+'.'});!APPROVAL_MODES[_0x5a5077(0x1d3)](_0x23c075)&&_0x4685bf['push']({'path':_0x3366a5+_0x5a5077(0x147),'message':_0x5a5077(0x1b7)+String(_0x23c075)+'.'});if(!isRecord(_0x4bd08c['assignee']))_0x4685bf[_0x5a5077(0x193)]({'path':_0x3366a5+_0x5a5077(0x1ff),'message':_0x5a5077(0x180)});else{const _0x3439e0=_0x4bd08c[_0x5a5077(0x1fc)]['strategy'];_0x3439e0!==_0x5a5077(0x141)&&_0x3439e0!==_0x5a5077(0x188)&&_0x4685bf[_0x5a5077(0x193)]({'path':_0x3366a5+_0x5a5077(0x29c),'message':'assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.'});if(_0x3439e0===_0x5a5077(0x141)){const _0x4000bd=_0x4bd08c[_0x5a5077(0x1fc)][_0x5a5077(0x155)];if(!Array[_0x5a5077(0x19a)](_0x4000bd)||_0x4000bd['length']===0x0)_0x4685bf[_0x5a5077(0x193)]({'path':_0x3366a5+'.assignee.userIds','message':_0x5a5077(0x251)});else{const _0x40d811=_0x4000bd[_0x5a5077(0x25c)](_0x1c0e20=>!isValidUserId(_0x1c0e20));_0x40d811>=0x0&&_0x4685bf['push']({'path':_0x3366a5+'.assignee.userIds['+_0x40d811+']','message':_0x5a5077(0x2a0)});const _0x4b076e=new Set(_0x4000bd[_0x5a5077(0x24f)](isValidUserId)[_0x5a5077(0x26f)](_0x342d28=>String(_0x342d28)[_0x5a5077(0x2aa)]()));_0x23c075==='SINGLE'&&_0x4b076e[_0x5a5077(0x26b)]>0x1&&_0x4685bf['push']({'path':_0x3366a5+_0x5a5077(0x18d),'message':_0x5a5077(0x29e)});}}if(_0x3439e0===_0x5a5077(0x188)){const _0x2973b6=_0x4bd08c['assignee'][_0x5a5077(0x25b)],_0x46e305=typeof _0x2973b6===_0x5a5077(0x1b5)||typeof _0x2973b6===_0x5a5077(0x239)?Number(String(_0x2973b6)[_0x5a5077(0x2aa)]()):Number[_0x5a5077(0x1df)];(!Number[_0x5a5077(0x1cc)](_0x46e305)||_0x46e305<=0x0)&&_0x4685bf[_0x5a5077(0x193)]({'path':_0x3366a5+_0x5a5077(0x24b),'message':_0x5a5077(0x157)});}}if(_0x4bd08c[_0x5a5077(0x216)]!==undefined){if(!isRecord(_0x4bd08c[_0x5a5077(0x216)]))_0x4685bf['push']({'path':_0x3366a5+_0x5a5077(0x204),'message':'transferCandidates\x20must\x20be\x20an\x20object.'});else{if(_0x4bd08c[_0x5a5077(0x216)][_0x5a5077(0x1e7)]!==_0x5a5077(0x141))_0x4685bf[_0x5a5077(0x193)]({'path':_0x3366a5+_0x5a5077(0x1cf),'message':_0x5a5077(0x244)});else{const _0x1f7214=_0x4bd08c[_0x5a5077(0x216)]['userIds'];if(!Array[_0x5a5077(0x19a)](_0x1f7214)||_0x1f7214['length']===0x0)_0x4685bf[_0x5a5077(0x193)]({'path':_0x3366a5+_0x5a5077(0x22f),'message':'FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.'});else{const _0x32e872=_0x1f7214[_0x5a5077(0x25c)](_0x338025=>!isValidUserId(_0x338025));_0x32e872>=0x0&&_0x4685bf['push']({'path':_0x3366a5+'.transferCandidates.userIds['+_0x32e872+']','message':'transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.'});}}}}}_0x4bd08c[_0x5a5077(0x2a6)]!==undefined&&typeof _0x4bd08c[_0x5a5077(0x2a6)]!==_0x5a5077(0x27a)&&_0x4685bf['push']({'path':_0x3366a5+_0x5a5077(0x231),'message':_0x5a5077(0x185)});if(_0x4bd08c[_0x5a5077(0x199)]==='SCRIPT'){(typeof _0x4bd08c[_0x5a5077(0x1e1)]!==_0x5a5077(0x239)||_0x4bd08c[_0x5a5077(0x1e1)][_0x5a5077(0x2aa)]()==='')&&_0x4685bf['push']({'path':_0x3366a5+_0x5a5077(0x1b8),'message':'SCRIPT\x20node\x20requires\x20scriptName.'});if(_0x4bd08c[_0x5a5077(0x191)]!==undefined){if(typeof _0x4bd08c[_0x5a5077(0x191)]!==_0x5a5077(0x239)||!VARIABLE_PATTERN[_0x5a5077(0x1e3)](_0x4bd08c[_0x5a5077(0x191)]))_0x4685bf[_0x5a5077(0x193)]({'path':_0x3366a5+_0x5a5077(0x1bf),'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x5a5077(0x1d3)](_0x4bd08c[_0x5a5077(0x191)])||_0x4bd08c['resultVariable'][_0x5a5077(0x167)](_0x5a5077(0x1c5)))&&_0x4685bf[_0x5a5077(0x193)]({'path':_0x3366a5+'.resultVariable','message':_0x5a5077(0x247)+_0x4bd08c[_0x5a5077(0x191)]+'.'});}}validateAsyncExecution(_0x4bd08c,_0x3366a5,_0x4685bf),validateApprovalTimeout(_0x4bd08c,_0x3366a5,_0x4685bf),validateCcConfig(_0x4bd08c,_0x3366a5,_0x4685bf),_0x4bd08c[_0x5a5077(0x199)]===_0x5a5077(0x272)&&validateNotificationConfig(_0x4bd08c[_0x5a5077(0x2a3)],_0x3366a5+_0x5a5077(0x1b3),_0x4685bf);}function validateAsyncExecution(_0x1a9405,_0x45cb4f,_0x3793af){const _0x2b576a=a287_0x5e5514;if(_0x1a9405[_0x2b576a(0x20f)]===undefined)return;if(!isRecord(_0x1a9405['async'])){_0x3793af[_0x2b576a(0x193)]({'path':_0x45cb4f+_0x2b576a(0x1ae),'message':'async\x20must\x20be\x20an\x20object.'});return;}if(_0x1a9405['async'][_0x2b576a(0x18f)]!==undefined&&typeof _0x1a9405[_0x2b576a(0x20f)][_0x2b576a(0x18f)]!==_0x2b576a(0x27a)){_0x3793af['push']({'path':_0x45cb4f+_0x2b576a(0x1c2),'message':_0x2b576a(0x181)});return;}if(_0x1a9405[_0x2b576a(0x20f)][_0x2b576a(0x18f)]!==!![])return;_0x1a9405[_0x2b576a(0x199)]!==_0x2b576a(0x152)&&_0x3793af[_0x2b576a(0x193)]({'path':_0x45cb4f+_0x2b576a(0x1ae),'message':_0x2b576a(0x201)});const _0x3710b9=_0x1a9405[_0x2b576a(0x20f)][_0x2b576a(0x17f)]??0x3;(!Number[_0x2b576a(0x278)](_0x3710b9)||_0x3710b9<0x1||_0x3710b9>MAX_ASYNC_RETRY_COUNT)&&_0x3793af['push']({'path':_0x45cb4f+_0x2b576a(0x14e),'message':_0x2b576a(0x215)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x1a9405[_0x2b576a(0x20f)][_0x2b576a(0x241)]!==undefined&&validateTimeAmount(_0x1a9405[_0x2b576a(0x20f)]['retryInterval'],_0x45cb4f+_0x2b576a(0x240),_0x3793af);}function validateApprovalTimeout(_0x3d84ed,_0xcd94e8,_0xf1482){const _0x2a36ce=a287_0x5e5514;if(_0x3d84ed[_0x2a36ce(0x26d)]===undefined)return;if(!isRecord(_0x3d84ed[_0x2a36ce(0x26d)])){_0xf1482[_0x2a36ce(0x193)]({'path':_0xcd94e8+'.timeout','message':_0x2a36ce(0x25a)});return;}if(_0x3d84ed['timeout']['enabled']!==undefined&&typeof _0x3d84ed['timeout'][_0x2a36ce(0x18f)]!==_0x2a36ce(0x27a)){_0xf1482[_0x2a36ce(0x193)]({'path':_0xcd94e8+'.timeout.enabled','message':_0x2a36ce(0x2ae)});return;}if(_0x3d84ed[_0x2a36ce(0x26d)]['enabled']!==!![])return;if(_0x3d84ed['timeout'][_0x2a36ce(0x1d5)]!==undefined&&typeof _0x3d84ed[_0x2a36ce(0x26d)]['interrupting']!==_0x2a36ce(0x27a)){_0xf1482[_0x2a36ce(0x193)]({'path':_0xcd94e8+_0x2a36ce(0x16f),'message':_0x2a36ce(0x1ce)});return;}_0x3d84ed[_0x2a36ce(0x199)]!=='APPROVAL'&&_0xf1482[_0x2a36ce(0x193)]({'path':_0xcd94e8+_0x2a36ce(0x21e),'message':'timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.'});validateTimeAmount(_0x3d84ed[_0x2a36ce(0x26d)]['duration'],_0xcd94e8+_0x2a36ce(0x1b4),_0xf1482);const _0x186c04=_0x3d84ed[_0x2a36ce(0x26d)][_0x2a36ce(0x226)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x2a36ce(0x1d3)](_0x186c04)){_0xf1482[_0x2a36ce(0x193)]({'path':_0xcd94e8+'.timeout.action','message':_0x2a36ce(0x22d)});return;}(_0x3d84ed[_0x2a36ce(0x2a9)]??_0x2a36ce(0x22c))==='HANDLE'&&_0x186c04!=='EXECUTE_BFF'&&_0xf1482[_0x2a36ce(0x193)]({'path':_0xcd94e8+_0x2a36ce(0x219),'message':_0x2a36ce(0x1bb)});const _0xf30b3b=_0x3d84ed[_0x2a36ce(0x26d)][_0x2a36ce(0x1d5)]??_0x186c04!==_0x2a36ce(0x261);if(_0x186c04==='EXECUTE_BFF')_0xf30b3b&&_0xf1482['push']({'path':_0xcd94e8+'.timeout.interrupting','message':'EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.'}),(typeof _0x3d84ed[_0x2a36ce(0x26d)][_0x2a36ce(0x1e1)]!==_0x2a36ce(0x239)||_0x3d84ed[_0x2a36ce(0x26d)][_0x2a36ce(0x1e1)][_0x2a36ce(0x2aa)]()==='')&&_0xf1482[_0x2a36ce(0x193)]({'path':_0xcd94e8+'.timeout.scriptName','message':_0x2a36ce(0x205)}),validateOptionalResultVariable(_0x3d84ed['timeout'][_0x2a36ce(0x191)],_0xcd94e8+_0x2a36ce(0x27f),_0xf1482);else!_0xf30b3b&&_0xf1482[_0x2a36ce(0x193)]({'path':_0xcd94e8+_0x2a36ce(0x16f),'message':_0x186c04+_0x2a36ce(0x13d)});}function validateTimeAmount(_0x240e10,_0xac9963,_0x3cc016){const _0x5f1207=a287_0x5e5514;if(!isRecord(_0x240e10)){_0x3cc016[_0x5f1207(0x193)]({'path':_0xac9963,'message':_0x5f1207(0x2ac)});return;}(!Number[_0x5f1207(0x278)](_0x240e10[_0x5f1207(0x249)])||Number(_0x240e10[_0x5f1207(0x249)])<=0x0)&&_0x3cc016['push']({'path':_0xac9963+'.value','message':_0x5f1207(0x22a)}),!FLOW_TIME_UNITS[_0x5f1207(0x1d3)](_0x240e10[_0x5f1207(0x266)])&&_0x3cc016[_0x5f1207(0x193)]({'path':_0xac9963+'.unit','message':_0x5f1207(0x15c)});}function validateOptionalResultVariable(_0x59ba81,_0x56fb62,_0x3a37a6){const _0x12253c=a287_0x5e5514;if(_0x59ba81===undefined||_0x59ba81===null||_0x59ba81==='')return;if(typeof _0x59ba81!==_0x12253c(0x239)||!VARIABLE_PATTERN['test'](_0x59ba81))_0x3a37a6[_0x12253c(0x193)]({'path':_0x56fb62,'message':_0x12253c(0x260)});else(RESERVED_RESULT_VARIABLES[_0x12253c(0x1d3)](_0x59ba81)||_0x59ba81[_0x12253c(0x167)]('approval_sys_'))&&_0x3a37a6[_0x12253c(0x193)]({'path':_0x56fb62,'message':_0x12253c(0x247)+_0x59ba81+'.'});}function validateCcConfig(_0x2adabd,_0x4ee0c5,_0xc498d8){const _0xad4a06=a287_0x5e5514;if(_0x2adabd['cc']===undefined)return;if(!isRecord(_0x2adabd['cc'])){_0xc498d8[_0xad4a06(0x193)]({'path':_0x4ee0c5+_0xad4a06(0x202),'message':_0xad4a06(0x1f8)});return;}_0x2adabd[_0xad4a06(0x199)]!==_0xad4a06(0x243)&&_0x2adabd[_0xad4a06(0x199)]!==_0xad4a06(0x22c)&&_0xc498d8[_0xad4a06(0x193)]({'path':_0x4ee0c5+_0xad4a06(0x202),'message':_0xad4a06(0x14a)});Object[_0xad4a06(0x15e)][_0xad4a06(0x264)][_0xad4a06(0x156)](_0x2adabd['cc'],_0xad4a06(0x27d))&&_0xc498d8[_0xad4a06(0x193)]({'path':_0x4ee0c5+'.cc.readSources','message':UNSUPPORTED_FORM_MESSAGE});const _0x243add=_0x2adabd['cc']['recipientUserIds'];if(!Array[_0xad4a06(0x19a)](_0x243add)||_0x243add[_0xad4a06(0x196)]===0x0)_0xc498d8[_0xad4a06(0x193)]({'path':_0x4ee0c5+_0xad4a06(0x1a5),'message':_0xad4a06(0x1c6)});else{_0x243add['length']>MAX_CC_RECIPIENTS&&_0xc498d8['push']({'path':_0x4ee0c5+_0xad4a06(0x1a5),'message':'cc.recipientUserIds\x20supports\x20at\x20most\x20'+MAX_CC_RECIPIENTS+_0xad4a06(0x23a)});const _0x429ff6=new Set();_0x243add['forEach']((_0x5049fd,_0x54a079)=>{const _0x351d13=_0xad4a06;if(typeof _0x5049fd!=='string'||_0x5049fd['trim']()==='')_0xc498d8[_0x351d13(0x193)]({'path':_0x4ee0c5+_0x351d13(0x2ab)+_0x54a079+']','message':'cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x429ff6[_0x351d13(0x1d3)](_0x5049fd[_0x351d13(0x2aa)]())?_0xc498d8[_0x351d13(0x193)]({'path':_0x4ee0c5+'.cc.recipientUserIds['+_0x54a079+']','message':_0x351d13(0x1e8)+_0x5049fd['trim']()+'.'}):_0x429ff6[_0x351d13(0x1f2)](_0x5049fd[_0x351d13(0x2aa)]());});}validateStringArray(_0x2adabd['cc']['visible'],_0x4ee0c5+_0xad4a06(0x282),_0xc498d8);}function validateStringArray(_0x4e84e5,_0x2fdc48,_0x124c31){const _0x36f90b=a287_0x5e5514;if(_0x4e84e5===undefined)return;if(!Array[_0x36f90b(0x19a)](_0x4e84e5)){_0x124c31[_0x36f90b(0x193)]({'path':_0x2fdc48,'message':_0x36f90b(0x254)});return;}const _0x1dd34f=new Set();_0x4e84e5[_0x36f90b(0x275)]((_0x50761b,_0x4b3feb)=>{const _0x4c2021=_0x36f90b;if(typeof _0x50761b!==_0x4c2021(0x239)||_0x50761b[_0x4c2021(0x2aa)]()==='')_0x124c31[_0x4c2021(0x193)]({'path':_0x2fdc48+'['+_0x4b3feb+']','message':_0x4c2021(0x234)});else _0x1dd34f[_0x4c2021(0x1d3)](_0x50761b['trim']())?_0x124c31[_0x4c2021(0x193)]({'path':_0x2fdc48+'['+_0x4b3feb+']','message':_0x4c2021(0x29b)+_0x50761b['trim']()+'.'}):_0x1dd34f['add'](_0x50761b[_0x4c2021(0x2aa)]());});}function validateNotificationConfig(_0x4af7b0,_0x4e4f32,_0x463ee2){const _0x468e82=a287_0x5e5514;if(!isRecord(_0x4af7b0)){_0x463ee2[_0x468e82(0x193)]({'path':_0x4e4f32,'message':_0x468e82(0x25e)});return;}if(_0x4af7b0[_0x468e82(0x2a2)]!==undefined&&_0x4af7b0['version']!==null){if(typeof _0x4af7b0['version']!==_0x468e82(0x239))_0x463ee2[_0x468e82(0x193)]({'path':_0x4e4f32+_0x468e82(0x192),'message':_0x468e82(0x271)});else _0x4af7b0['version'][_0x468e82(0x2aa)]()&&_0x4af7b0[_0x468e82(0x2a2)][_0x468e82(0x2aa)]()!=='v1'&&_0x463ee2[_0x468e82(0x193)]({'path':_0x4e4f32+'.version','message':_0x468e82(0x160)+_0x4af7b0[_0x468e82(0x2a2)]+'.'});}const _0x2e81f4=requireNotificationString(_0x4af7b0[_0x468e82(0x1ef)],_0x4e4f32+'.configCode',_0x468e82(0x171),_0x463ee2);_0x2e81f4?.['includes']('${')&&_0x463ee2['push']({'path':_0x4e4f32+'.configCode','message':_0x468e82(0x21c)});if(_0x4af7b0[_0x468e82(0x1f9)]!==undefined&&_0x4af7b0[_0x468e82(0x1f9)]!==null){if(typeof _0x4af7b0[_0x468e82(0x1f9)]!=='string')_0x463ee2[_0x468e82(0x193)]({'path':_0x4e4f32+_0x468e82(0x1c8),'message':_0x468e82(0x20d)});else!NOTIFICATION_FAILURE_POLICIES[_0x468e82(0x1d3)](_0x4af7b0['failurePolicy'][_0x468e82(0x2aa)]()[_0x468e82(0x1be)]())&&_0x463ee2[_0x468e82(0x193)]({'path':_0x4e4f32+_0x468e82(0x1c8),'message':_0x468e82(0x29a)});}!isRecord(_0x4af7b0['template'])?_0x463ee2[_0x468e82(0x193)]({'path':_0x4e4f32+_0x468e82(0x17a),'message':_0x468e82(0x162)}):validateNotificationTemplate(_0x4af7b0[_0x468e82(0x20b)],_0x4e4f32+_0x468e82(0x17a),_0x463ee2),validateNotificationRecipients(_0x4af7b0['recipients'],_0x4e4f32+_0x468e82(0x274),_0x463ee2);}function validateNotificationTemplate(_0x14da0e,_0x45a529,_0x3f1579){const _0xd30b77=a287_0x5e5514;for(const _0x3ac9d2 of[_0xd30b77(0x184),'summary']){const _0x224be4=requireNotificationString(_0x14da0e[_0x3ac9d2],_0x45a529+'.'+_0x3ac9d2,'Notification\x20template.'+_0x3ac9d2+_0xd30b77(0x16c),_0x3f1579);if(_0x224be4)validateNotificationPlaceholders(_0x224be4,_0x45a529+'.'+_0x3ac9d2,_0x3f1579);}_0x14da0e[_0xd30b77(0x17e)]!==undefined&&_0x14da0e[_0xd30b77(0x17e)]!==null&&(typeof _0x14da0e['detailMarkdown']!==_0xd30b77(0x239)?_0x3f1579['push']({'path':_0x45a529+_0xd30b77(0x166),'message':_0xd30b77(0x283)}):validateNotificationPlaceholders(_0x14da0e['detailMarkdown'],_0x45a529+'.detailMarkdown',_0x3f1579)),validateNotificationFacts(_0x14da0e['facts'],_0x45a529+_0xd30b77(0x238),_0x3f1579),validateNotificationActions(_0x14da0e[_0xd30b77(0x144)],_0x45a529+_0xd30b77(0x208),_0x3f1579);}function validateNotificationFacts(_0x3b9687,_0x130704,_0x2fcb6b){const _0x3373e4=a287_0x5e5514;if(_0x3b9687===undefined||_0x3b9687===null)return;if(!Array['isArray'](_0x3b9687)){_0x2fcb6b[_0x3373e4(0x193)]({'path':_0x130704,'message':_0x3373e4(0x17b)});return;}_0x3b9687[_0x3373e4(0x196)]>MAX_NOTIFICATION_FACTS&&_0x2fcb6b[_0x3373e4(0x193)]({'path':_0x130704,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_FACTS+_0x3373e4(0x235)}),_0x3b9687['forEach']((_0x52ad07,_0x962d6d)=>{const _0x5e6dac=_0x3373e4,_0x9368e8=_0x130704+'['+_0x962d6d+']';if(!isRecord(_0x52ad07)){_0x2fcb6b[_0x5e6dac(0x193)]({'path':_0x9368e8,'message':'Notification\x20fact\x20must\x20be\x20an\x20object.'});return;}for(const _0x11f4d2 of[_0x5e6dac(0x1c7),'value']){const _0x401f6b=requireNotificationString(_0x52ad07[_0x11f4d2],_0x9368e8+'.'+_0x11f4d2,'Notification\x20fact.'+_0x11f4d2+_0x5e6dac(0x16c),_0x2fcb6b);_0x401f6b&&validateNotificationPlaceholders(_0x401f6b,_0x9368e8+'.'+_0x11f4d2,_0x2fcb6b);}});}function validateNotificationActions(_0x3c0cf7,_0x3ea523,_0x49b752){const _0x528565=a287_0x5e5514;if(_0x3c0cf7===undefined||_0x3c0cf7===null)return;if(!Array['isArray'](_0x3c0cf7)){_0x49b752['push']({'path':_0x3ea523,'message':_0x528565(0x1ec)});return;}_0x3c0cf7[_0x528565(0x196)]>MAX_NOTIFICATION_ACTIONS&&_0x49b752[_0x528565(0x193)]({'path':_0x3ea523,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_ACTIONS+_0x528565(0x1ab)}),_0x3c0cf7[_0x528565(0x275)]((_0x3b86c1,_0x3fec75)=>{const _0x22be11=_0x528565,_0x292226=_0x3ea523+'['+_0x3fec75+']';if(!isRecord(_0x3b86c1)){_0x49b752['push']({'path':_0x292226,'message':_0x22be11(0x207)});return;}const _0x144431=requireNotificationString(_0x3b86c1['text'],_0x292226+_0x22be11(0x177),'Notification\x20action.text\x20is\x20required.',_0x49b752);if(_0x144431)validateNotificationPlaceholders(_0x144431,_0x292226+_0x22be11(0x177),_0x49b752);const _0x1ec518=requireNotificationString(_0x3b86c1[_0x22be11(0x1f7)],_0x292226+_0x22be11(0x211),_0x22be11(0x16e),_0x49b752);if(!_0x1ec518)return;validateNotificationPlaceholders(_0x1ec518,_0x292226+_0x22be11(0x211),_0x49b752),!/^https?:\/\//i['test'](_0x1ec518)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x22be11(0x1e3)](_0x1ec518)&&_0x49b752[_0x22be11(0x193)]({'path':_0x292226+_0x22be11(0x211),'message':_0x22be11(0x229)});});}function validateNotificationRecipients(_0x2bcaba,_0x10bac8,_0x62ac15){const _0x23e112=a287_0x5e5514;if(_0x2bcaba===undefined||_0x2bcaba===null)return;if(!Array[_0x23e112(0x19a)](_0x2bcaba)){_0x62ac15[_0x23e112(0x193)]({'path':_0x10bac8,'message':_0x23e112(0x220)});return;}let _0x21fd1d=![];_0x2bcaba['forEach']((_0x4f5e3d,_0x1a909e)=>{const _0x3d8591=_0x23e112,_0x23cffb=_0x10bac8+'['+_0x1a909e+']';if(!isRecord(_0x4f5e3d)){_0x62ac15['push']({'path':_0x23cffb,'message':_0x3d8591(0x236)});return;}const _0x19ed7b=requireNotificationString(_0x4f5e3d['type'],_0x23cffb+_0x3d8591(0x23d),_0x3d8591(0x2a7),_0x62ac15);_0x19ed7b&&!NOTIFICATION_RECIPIENT_TYPES[_0x3d8591(0x1d3)](_0x19ed7b[_0x3d8591(0x1be)]())&&_0x62ac15['push']({'path':_0x23cffb+_0x3d8591(0x23d),'message':_0x3d8591(0x258)});let _0x3e9b5d='TO';_0x4f5e3d['role']!==undefined&&_0x4f5e3d[_0x3d8591(0x1e0)]!==null&&(typeof _0x4f5e3d[_0x3d8591(0x1e0)]!==_0x3d8591(0x239)?(_0x62ac15[_0x3d8591(0x193)]({'path':_0x23cffb+_0x3d8591(0x183),'message':_0x3d8591(0x296)}),_0x3e9b5d=''):(_0x3e9b5d=_0x4f5e3d['role'][_0x3d8591(0x2aa)]()['toUpperCase'](),!NOTIFICATION_RECIPIENT_ROLES[_0x3d8591(0x1d3)](_0x3e9b5d)&&_0x62ac15[_0x3d8591(0x193)]({'path':_0x23cffb+'.role','message':_0x3d8591(0x1e6)})));if(_0x3e9b5d==='TO')_0x21fd1d=!![];const _0x41b8c2=requireNotificationString(_0x4f5e3d[_0x3d8591(0x249)],_0x23cffb+_0x3d8591(0x18a),_0x3d8591(0x269),_0x62ac15);_0x41b8c2&&validateNotificationPlaceholders(_0x41b8c2,_0x23cffb+'.value',_0x62ac15);}),_0x2bcaba[_0x23e112(0x196)]>0x0&&!_0x21fd1d&&_0x62ac15[_0x23e112(0x193)]({'path':_0x10bac8,'message':_0x23e112(0x1a2)});}function requireNotificationString(_0xc585ea,_0x5df9d3,_0x2391b5,_0x322772){const _0x4908c3=a287_0x5e5514;if(typeof _0xc585ea!==_0x4908c3(0x239)||_0xc585ea[_0x4908c3(0x2aa)]()==='')return _0x322772[_0x4908c3(0x193)]({'path':_0x5df9d3,'message':_0x2391b5}),undefined;return _0xc585ea[_0x4908c3(0x2aa)]();}function validateNotificationPlaceholders(_0x22a9f0,_0x5f3688,_0xa3e4a9){const _0x182dc3=a287_0x5e5514;for(const _0xa4e110 of _0x22a9f0[_0x182dc3(0x1d7)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x2102ef=_0xa4e110[0x1]?.[_0x182dc3(0x2aa)]()??'',_0x2583e5=_0x2102ef[_0x182dc3(0x291)]('.'),_0x14982a=_0x2583e5>=0x0?_0x2102ef[_0x182dc3(0x221)](0x0,_0x2583e5):_0x2102ef,_0x5625e1=_0x2583e5>=0x0?_0x2102ef[_0x182dc3(0x221)](_0x2583e5+0x1)['trim']():'';(!['event',_0x182dc3(0x1a4),_0x182dc3(0x142)]['includes'](_0x14982a)||_0x5625e1==='')&&_0xa3e4a9[_0x182dc3(0x193)]({'path':_0x5f3688,'message':_0x182dc3(0x262)+_0xa4e110[0x0]+'.'});}_0x22a9f0[_0x182dc3(0x1dd)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x182dc3(0x23f)]('${')&&_0xa3e4a9[_0x182dc3(0x193)]({'path':_0x5f3688,'message':_0x182dc3(0x27c)});}function validateEdge(_0x48372b,_0x4e3e01,_0x455a63){const _0x18e907=a287_0x5e5514;_0x48372b[_0x18e907(0x1fd)]!==undefined&&typeof _0x48372b[_0x18e907(0x1fd)]!==_0x18e907(0x239)&&_0x455a63[_0x18e907(0x193)]({'path':_0x4e3e01+'.name','message':_0x18e907(0x1ed)}),_0x48372b[_0x18e907(0x173)]!==undefined&&typeof _0x48372b[_0x18e907(0x173)]!==_0x18e907(0x27a)&&_0x455a63[_0x18e907(0x193)]({'path':_0x4e3e01+_0x18e907(0x1fb),'message':_0x18e907(0x24d)}),_0x48372b[_0x18e907(0x24e)]!==undefined&&(!Array[_0x18e907(0x19a)](_0x48372b[_0x18e907(0x24e)])?_0x455a63['push']({'path':_0x4e3e01+_0x18e907(0x28e),'message':'waypoints\x20must\x20be\x20an\x20array.'}):_0x48372b['waypoints'][_0x18e907(0x275)]((_0x313ac9,_0x5a3116)=>{const _0x56d119=_0x18e907;if(!isRecord(_0x313ac9)){_0x455a63[_0x56d119(0x193)]({'path':_0x4e3e01+_0x56d119(0x1ea)+_0x5a3116+']','message':_0x56d119(0x182)});return;}for(const _0x595fa1 of['x','y']){const _0x331e2f=_0x313ac9[_0x595fa1];(typeof _0x331e2f!==_0x56d119(0x1b5)||!Number[_0x56d119(0x200)](_0x331e2f))&&_0x455a63[_0x56d119(0x193)]({'path':_0x4e3e01+'.waypoints['+_0x5a3116+'].'+_0x595fa1,'message':_0x56d119(0x168)+_0x595fa1+'\x20must\x20be\x20a\x20finite\x20number.'});}})),_0x48372b['conditionType']!==undefined&&!CONDITION_TYPES[_0x18e907(0x1d3)](_0x48372b[_0x18e907(0x273)])&&_0x455a63[_0x18e907(0x193)]({'path':_0x4e3e01+_0x18e907(0x174),'message':_0x18e907(0x218)+String(_0x48372b[_0x18e907(0x273)])+'.'}),_0x48372b[_0x18e907(0x273)]===_0x18e907(0x1a9)&&(typeof _0x48372b[_0x18e907(0x295)]!==_0x18e907(0x239)||_0x48372b[_0x18e907(0x295)][_0x18e907(0x2aa)]()==='')&&_0x455a63[_0x18e907(0x193)]({'path':_0x4e3e01+_0x18e907(0x252),'message':_0x18e907(0x149)}),_0x48372b[_0x18e907(0x173)]===!![]&&_0x48372b[_0x18e907(0x273)]!==_0x18e907(0x212)&&_0x455a63['push']({'path':_0x4e3e01+_0x18e907(0x1fb),'message':_0x18e907(0x198)}),_0x48372b[_0x18e907(0x173)]===!![]&&typeof _0x48372b['expression']===_0x18e907(0x239)&&_0x48372b[_0x18e907(0x295)][_0x18e907(0x2aa)]()!==''&&_0x455a63[_0x18e907(0x193)]({'path':_0x4e3e01+'.expression','message':_0x18e907(0x170)});}function validateGraphShape(_0x2d718d,_0x2d3df0,_0x12abd4,_0x158f45,_0x5a13e2,_0x36117e,_0x5b300f){const _0x2f2fb2=a287_0x5e5514;for(const [_0x4a7e9b,_0x42b961]of _0x2d718d){const _0x514d2d=_0x5a13e2[_0x2f2fb2(0x146)](_0x4a7e9b)??[],_0xd29863=_0x158f45[_0x2f2fb2(0x146)](_0x4a7e9b)??[];_0x42b961['type']!==_0x2f2fb2(0x23e)&&_0x514d2d[_0x2f2fb2(0x196)]===0x0&&_0x5b300f[_0x2f2fb2(0x193)]({'path':_0x2f2fb2(0x150)+_0x4a7e9b,'message':'Node\x20has\x20no\x20incoming\x20edge.'});_0x42b961[_0x2f2fb2(0x199)]!==_0x2f2fb2(0x243)&&_0xd29863['length']===0x0&&_0x5b300f[_0x2f2fb2(0x193)]({'path':_0x2f2fb2(0x150)+_0x4a7e9b,'message':'Node\x20has\x20no\x20outgoing\x20edge.'});_0x42b961[_0x2f2fb2(0x199)]==='START'&&_0x514d2d[_0x2f2fb2(0x196)]>0x0&&_0x5b300f[_0x2f2fb2(0x193)]({'path':_0x2f2fb2(0x150)+_0x4a7e9b,'message':_0x2f2fb2(0x186)});_0x42b961[_0x2f2fb2(0x199)]==='END'&&_0xd29863[_0x2f2fb2(0x196)]>0x0&&_0x5b300f[_0x2f2fb2(0x193)]({'path':'flowJson.nodes.'+_0x4a7e9b,'message':_0x2f2fb2(0x290)});if(_0x42b961[_0x2f2fb2(0x199)]===_0x2f2fb2(0x187)){_0xd29863[_0x2f2fb2(0x196)]<0x2&&_0x5b300f[_0x2f2fb2(0x193)]({'path':'flowJson.nodes.'+_0x4a7e9b,'message':_0x2f2fb2(0x172)});const _0x2296a0=_0xd29863['filter'](_0x29689b=>_0x29689b[_0x2f2fb2(0x173)]===!![]);_0x2296a0[_0x2f2fb2(0x196)]!==0x1&&_0x5b300f[_0x2f2fb2(0x193)]({'path':'flowJson.nodes.'+_0x4a7e9b,'message':_0x2f2fb2(0x210)});if(_0x2296a0['length']===0x1){const _0x5a26fe=_0x2296a0[0x0],_0x5b3060=_0x36117e[_0x2f2fb2(0x146)](_0x5a26fe)??_0x2f2fb2(0x1db);_0x5a26fe[_0x2f2fb2(0x273)]!==_0x2f2fb2(0x212)&&_0x5b300f[_0x2f2fb2(0x193)]({'path':_0x5b3060+_0x2f2fb2(0x174),'message':_0x2f2fb2(0x1ba)});_0x5a26fe['expression']!==undefined&&_0x5b300f['push']({'path':_0x5b3060+_0x2f2fb2(0x252),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x56617f of _0xd29863){if(_0x56617f===_0x5a26fe)continue;const _0x57fefe=_0x36117e['get'](_0x56617f)??'flowJson.edges';if(_0x56617f[_0x2f2fb2(0x273)]!==_0x2f2fb2(0x1a9))_0x5b300f[_0x2f2fb2(0x193)]({'path':_0x57fefe+'.conditionType','message':_0x2f2fb2(0x255)});else(typeof _0x56617f[_0x2f2fb2(0x295)]!==_0x2f2fb2(0x239)||_0x56617f[_0x2f2fb2(0x295)][_0x2f2fb2(0x2aa)]()==='')&&_0x5b300f['push']({'path':_0x57fefe+'.expression','message':_0x2f2fb2(0x209)});}}}if(_0x42b961[_0x2f2fb2(0x199)]===_0x2f2fb2(0x22c)&&(_0x42b961[_0x2f2fb2(0x2a9)]??_0x2f2fb2(0x22c))===_0x2f2fb2(0x1d0)){if(_0xd29863[_0x2f2fb2(0x196)]!==0x1)_0x5b300f['push']({'path':_0x2f2fb2(0x150)+_0x4a7e9b,'message':'HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.'});else{const _0x2a2a6a=_0xd29863[0x0];((_0x2a2a6a[_0x2f2fb2(0x273)]??'ALWAYS')!==_0x2f2fb2(0x212)||_0x2a2a6a[_0x2f2fb2(0x173)]===!![]||typeof _0x2a2a6a[_0x2f2fb2(0x295)]===_0x2f2fb2(0x239)&&_0x2a2a6a['expression']['trim']()!=='')&&_0x5b300f[_0x2f2fb2(0x193)]({'path':_0x36117e['get'](_0x2a2a6a)??_0x2f2fb2(0x1db),'message':'HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.'});}}else{if(_0x42b961[_0x2f2fb2(0x199)]===_0x2f2fb2(0x22c)){const _0x481ffe=_0xd29863[_0x2f2fb2(0x26f)](_0x4b7e7f=>_0x4b7e7f[_0x2f2fb2(0x273)]??_0x2f2fb2(0x212)),_0x414d34=_0x481ffe['filter'](_0x363210=>_0x363210!=='APPROVED'&&_0x363210!==_0x2f2fb2(0x206));_0x414d34[_0x2f2fb2(0x196)]>0x0&&_0x5b300f['push']({'path':_0x2f2fb2(0x150)+_0x4a7e9b,'message':'APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.'}),_0x481ffe[_0x2f2fb2(0x24f)](_0x2e3c3c=>_0x2e3c3c===_0x2f2fb2(0x29f))[_0x2f2fb2(0x196)]!==0x1&&_0x5b300f[_0x2f2fb2(0x193)]({'path':'flowJson.nodes.'+_0x4a7e9b,'message':_0x2f2fb2(0x285)}),_0x481ffe[_0x2f2fb2(0x24f)](_0x591c66=>_0x591c66==='REJECTED')[_0x2f2fb2(0x196)]!==0x1&&_0x5b300f[_0x2f2fb2(0x193)]({'path':_0x2f2fb2(0x150)+_0x4a7e9b,'message':_0x2f2fb2(0x298)}),_0xd29863[_0x2f2fb2(0x28d)](_0x118039=>_0x118039[_0x2f2fb2(0x173)]===!![])&&_0x5b300f[_0x2f2fb2(0x193)]({'path':_0x2f2fb2(0x150)+_0x4a7e9b,'message':_0x2f2fb2(0x15d)});}}}const _0x1843c2=new Set(),_0x2932d2=_0x43d76e=>{const _0x5948dd=_0x2f2fb2;if(_0x1843c2[_0x5948dd(0x1d3)](_0x43d76e))return;_0x1843c2['add'](_0x43d76e);for(const _0xdfe074 of _0x158f45[_0x5948dd(0x146)](_0x43d76e)??[]){const _0x1ab74e=resolveEdgeEndpoint(_0xdfe074['target'],_0xdfe074['targetNodeId']);if(_0x1ab74e&&_0x2d718d['has'](_0x1ab74e))_0x2932d2(_0x1ab74e);}};_0x2932d2(_0x2d3df0);for(const _0x36a8d8 of _0x2d718d[_0x2f2fb2(0x161)]()){!_0x1843c2[_0x2f2fb2(0x1d3)](_0x36a8d8)&&_0x5b300f[_0x2f2fb2(0x193)]({'path':'flowJson.nodes.'+_0x36a8d8,'message':_0x2f2fb2(0x1b6)});}const _0x5b0277=_0x12abd4['some'](_0x48a2df=>_0x1843c2[_0x2f2fb2(0x1d3)](_0x48a2df));if(!_0x5b0277){_0x5b300f[_0x2f2fb2(0x193)]({'path':_0x2f2fb2(0x1db),'message':_0x2f2fb2(0x2a1)});return;}const _0x17c918=new Set(),_0x3f7e57=_0x2f355c=>{const _0xd68f61=_0x2f2fb2;if(_0x17c918['has'](_0x2f355c))return;_0x17c918['add'](_0x2f355c);for(const _0x142f3b of _0x5a13e2[_0xd68f61(0x146)](_0x2f355c)??[]){const _0x11202f=resolveEdgeEndpoint(_0x142f3b[_0xd68f61(0x26c)],_0x142f3b[_0xd68f61(0x1d4)]);if(_0x11202f&&_0x2d718d[_0xd68f61(0x1d3)](_0x11202f))_0x3f7e57(_0x11202f);}};for(const _0x1376b0 of _0x12abd4){if(_0x2d718d[_0x2f2fb2(0x1d3)](_0x1376b0))_0x3f7e57(_0x1376b0);}for(const _0x184cb9 of _0x1843c2){!_0x17c918[_0x2f2fb2(0x1d3)](_0x184cb9)&&_0x5b300f['push']({'path':_0x2f2fb2(0x150)+_0x184cb9,'message':_0x2f2fb2(0x237)});}}function validateApprovalResults(_0x33a4f5,_0x31b4f8,_0x378b0d,_0x3b5d61){const _0x5ac29c=a287_0x5e5514;if(_0x31b4f8===0x0)return;const _0x5d157b=new Set(_0x378b0d[_0x5ac29c(0x26f)](_0x561247=>_0x33a4f5[_0x5ac29c(0x146)](_0x561247)?.['result'])[_0x5ac29c(0x24f)](_0x40eaf9=>typeof _0x40eaf9==='string'));for(const _0x2af118 of['APPROVED',_0x5ac29c(0x206)]){!_0x5d157b[_0x5ac29c(0x1d3)](_0x2af118)&&_0x3b5d61[_0x5ac29c(0x193)]({'path':'flowJson.nodes','message':_0x5ac29c(0x1ee)+_0x2af118+'.'});}}function validateScriptResultReferences(_0x3268bb,_0x49f393,_0x4e5e96,_0x3274a8,_0xb0c6c2,_0x1b646e,_0x4b70d6){const _0x13a8a3=a287_0x5e5514;if(_0x1b646e[_0x13a8a3(0x26b)]===0x0)return;const _0x54d5a2=new Set(),_0xc487cf=_0x109287=>{const _0x328dd7=_0x13a8a3;if(!_0x54d5a2[_0x328dd7(0x1d3)](_0x109287)&&_0x3268bb[_0x328dd7(0x1d3)](_0x109287)){_0x54d5a2['add'](_0x109287);for(const _0x1a30e8 of _0x4e5e96['get'](_0x109287)??[]){const _0x4e6a08=resolveEdgeEndpoint(_0x1a30e8[_0x328dd7(0x1f6)],_0x1a30e8[_0x328dd7(0x1b9)]);if(_0x4e6a08)_0xc487cf(_0x4e6a08);}}};_0xc487cf(_0x49f393);const _0x51541d=new Map();for(const _0x219d22 of _0x54d5a2){_0x51541d['set'](_0x219d22,_0x219d22===_0x49f393?new Set([_0x49f393]):new Set(_0x54d5a2));}let _0x66ecc9=!![];while(_0x66ecc9){_0x66ecc9=![];for(const _0x52ee02 of _0x54d5a2){if(_0x52ee02===_0x49f393)continue;const _0x3000db=(_0x3274a8[_0x13a8a3(0x146)](_0x52ee02)??[])[_0x13a8a3(0x26f)](_0xbe65e0=>resolveEdgeEndpoint(_0xbe65e0[_0x13a8a3(0x26c)],_0xbe65e0[_0x13a8a3(0x1d4)]))[_0x13a8a3(0x24f)](_0x16366a=>Boolean(_0x16366a&&_0x54d5a2[_0x13a8a3(0x1d3)](_0x16366a)));if(_0x3000db[_0x13a8a3(0x196)]===0x0)continue;const _0x2c5684=new Set(_0x51541d[_0x13a8a3(0x146)](_0x3000db[0x0])??[]);for(const _0x43b18d of _0x3000db[_0x13a8a3(0x221)](0x1)){const _0x133157=_0x51541d['get'](_0x43b18d)??new Set();for(const _0x436f3f of _0x2c5684){if(!_0x133157[_0x13a8a3(0x1d3)](_0x436f3f))_0x2c5684[_0x13a8a3(0x1eb)](_0x436f3f);}}_0x2c5684['add'](_0x52ee02);const _0x351c3c=_0x51541d[_0x13a8a3(0x146)](_0x52ee02);!setsEqual(_0x351c3c,_0x2c5684)&&(_0x51541d[_0x13a8a3(0x194)](_0x52ee02,_0x2c5684),_0x66ecc9=!![]);}}for(const [_0x425758,_0x583820]of _0x4e5e96){const _0x421db3=_0x51541d[_0x13a8a3(0x146)](_0x425758);if(!_0x421db3)continue;for(const _0x275ffb of _0x583820){if(_0x275ffb['conditionType']!=='EXPRESSION'||typeof _0x275ffb['expression']!==_0x13a8a3(0x239))continue;for(const [_0x4c0e8b,_0x581cac]of _0x1b646e){expressionReferencesVariable(_0x275ffb[_0x13a8a3(0x295)],_0x4c0e8b)&&!_0x421db3[_0x13a8a3(0x1d3)](_0x581cac)&&_0x4b70d6[_0x13a8a3(0x193)]({'path':(_0xb0c6c2[_0x13a8a3(0x146)](_0x275ffb)??'flowJson.edges')+_0x13a8a3(0x252),'message':'Expression\x20references\x20SCRIPT\x20resultVariable\x20'+_0x4c0e8b+_0x13a8a3(0x230)+_0x581cac+_0x13a8a3(0x281)+_0x425758+'.'});}}}}function expressionReferencesVariable(_0x32413a,_0x1d612){const _0x2688c4=a287_0x5e5514;let _0x193da3=0x0;while(_0x193da3<_0x32413a[_0x2688c4(0x196)]){const _0x594b39=_0x32413a[_0x193da3];if(_0x594b39==='\x27'||_0x594b39==='\x22'){_0x193da3=skipQuotedExpressionSegment(_0x32413a,_0x193da3,_0x594b39);continue;}if(!/[A-Za-z_]/[_0x2688c4(0x1e3)](_0x594b39)){_0x193da3+=0x1;continue;}const _0x2b4323=_0x193da3;_0x193da3+=0x1;while(_0x193da3<_0x32413a['length']&&/[A-Za-z0-9_]/[_0x2688c4(0x1e3)](_0x32413a[_0x193da3])){_0x193da3+=0x1;}if(_0x32413a[_0x2688c4(0x221)](_0x2b4323,_0x193da3)!==_0x1d612)continue;let _0x306702=_0x2b4323-0x1;while(_0x306702>=0x0&&/\s/['test'](_0x32413a[_0x306702])){_0x306702-=0x1;}if(_0x32413a[_0x306702]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x390e0d,_0x3cf5f4,_0x56bddb){let _0x30ea1c=_0x3cf5f4+0x1;while(_0x30ea1c<_0x390e0d['length']){if(_0x390e0d[_0x30ea1c]==='\x5c'){_0x30ea1c+=0x2;continue;}if(_0x390e0d[_0x30ea1c]===_0x56bddb)return _0x30ea1c+0x1;_0x30ea1c+=0x1;}return _0x30ea1c;}function resolveEffectiveResultVariable(_0x7c629,_0x55ab45){const _0x36d544=a287_0x5e5514;if(_0x7c629===undefined||_0x7c629===null||_0x55ab45&&_0x7c629==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x7c629!==_0x36d544(0x239)||!VARIABLE_PATTERN[_0x36d544(0x1e3)](_0x7c629)||RESERVED_RESULT_VARIABLES[_0x36d544(0x1d3)](_0x7c629)||_0x7c629[_0x36d544(0x167)](_0x36d544(0x1c5)))return undefined;return _0x7c629;}function registerResultVariableOwner(_0x218e00,_0x453d00,_0x252f99,_0x5d2aa8){const _0x30ecb4=a287_0x5e5514;if(_0x218e00[_0x30ecb4(0x1d3)](_0x453d00)){_0x5d2aa8['push']({'path':_0x30ecb4(0x1a8),'message':_0x30ecb4(0x253)+_0x453d00+'.'});return;}_0x218e00[_0x30ecb4(0x194)](_0x453d00,_0x252f99);}function a287_0x3fc4(_0x5bab47,_0x11f13d){_0x5bab47=_0x5bab47-0x13c;const _0x240cc0=a287_0x240c();let _0x3fc4eb=_0x240cc0[_0x5bab47];return _0x3fc4eb;}function setsEqual(_0x5c3280,_0x3553d4){const _0x34f378=a287_0x5e5514;return _0x5c3280[_0x34f378(0x26b)]===_0x3553d4[_0x34f378(0x26b)]&&[..._0x5c3280][_0x34f378(0x28f)](_0x5dd268=>_0x3553d4['has'](_0x5dd268));}function isValidUserId(_0x2f4b19){const _0x5c85a4=a287_0x5e5514;if(typeof _0x2f4b19===_0x5c85a4(0x239))return _0x2f4b19[_0x5c85a4(0x2aa)]()[_0x5c85a4(0x196)]>0x0;return Number[_0x5c85a4(0x1cc)](_0x2f4b19)&&Number(_0x2f4b19)>0x0;}function resolveEdgeEndpoint(_0x4b85eb,_0x33a38e){const _0x1ce7c8=a287_0x5e5514;if(typeof _0x4b85eb===_0x1ce7c8(0x239)&&_0x4b85eb[_0x1ce7c8(0x2aa)]())return _0x4b85eb[_0x1ce7c8(0x2aa)]();if(typeof _0x33a38e===_0x1ce7c8(0x239)&&_0x33a38e[_0x1ce7c8(0x2aa)]())return _0x33a38e[_0x1ce7c8(0x2aa)]();return undefined;}function removeEmptyMetadata(_0x2f01d4,_0x3357b0,_0x2d112e,_0x3a0b06){const _0x142e6b=a287_0x5e5514;if(Array[_0x142e6b(0x19a)](_0x2f01d4)){_0x2f01d4[_0x142e6b(0x275)]((_0x329978,_0x23f0ef)=>removeEmptyMetadata(_0x329978,_0x3357b0+'['+_0x23f0ef+']',_0x2d112e,_0x3a0b06));return;}if(!isRecord(_0x2f01d4))return;for(const [_0x3a7813,_0x307338]of Object[_0x142e6b(0x1fe)](_0x2f01d4)){const _0x514d37=_0x3357b0+'.'+_0x3a7813;if(_0x3a7813===_0x142e6b(0x276)&&isEmptyJsonValue(_0x307338)){delete _0x2f01d4[_0x3a7813],_0x3a0b06[_0x142e6b(0x193)](_0x514d37),_0x2d112e['push']({'code':'empty_metadata_removed','path':_0x514d37,'message':_0x514d37+_0x142e6b(0x288)});continue;}removeEmptyMetadata(_0x307338,_0x514d37,_0x2d112e,_0x3a0b06);}}function isEmptyJsonValue(_0x163bd5){const _0x631b93=a287_0x5e5514;if(_0x163bd5===null||_0x163bd5===undefined)return!![];if(typeof _0x163bd5==='string')return _0x163bd5['trim']()==='';if(Array[_0x631b93(0x19a)](_0x163bd5))return _0x163bd5['length']===0x0;return isRecord(_0x163bd5)&&Object[_0x631b93(0x161)](_0x163bd5)[_0x631b93(0x196)]===0x0;}function a287_0x240c(){const _0x14c04e=['path','timeout.interrupting\x20must\x20be\x20a\x20boolean.','.transferCandidates.strategy','HANDLE','.id','MINUTES','has','sourceNodeId','interrupting','.position.','matchAll','2TEQyUj','.name','FORM_FLOW','flowJson.edges','array','replace','edge\x20target\x20is\x20required.','NaN','role','scriptName','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','test','position.','stringify','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','strategy','Duplicate\x20cc\x20recipient\x20userId:\x20','flowKey','.waypoints[','delete','Notification\x20template.actions\x20must\x20be\x20an\x20array.','edge\x20name\x20must\x20be\x20a\x20string.','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','configCode','approval_sys_initiatorUsername','formPermission','add','].taskMode','FAIL','flowJson.nodes[','target','url','cc\x20must\x20be\x20an\x20object.','failurePolicy','approval_sys_dataId','.defaultFlow','assignee','name','entries','.assignee','isFinite','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','.cc','Unsupported\x20pageMode:\x20','.transferCandidates','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','REJECTED','Notification\x20action\x20must\x20be\x20an\x20object.','.actions','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','flowJson\x20must\x20be\x20an\x20object.','template','HOURS','failurePolicy\x20must\x20be\x20a\x20string.','formSchema','async','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','.url','ALWAYS','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','transferCandidates','approval_sys_processInstanceId','Unsupported\x20condition\x20type:\x20','.timeout.action','formPermissions','Edge\x20target\x20node\x20not\x20found:\x20','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','.source','.timeout','flowType','Notification\x20recipients\x20must\x20be\x20an\x20array.','slice','startPageId','flowType\x20is\x20required.','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','parse','action','pageMode','flowName\x20is\x20required.','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','flowJson.startPath','APPROVAL','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','__rabetbase_local_validation__','.transferCandidates.userIds',',\x20but\x20node\x20','.sequential','warnings','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','value\x20must\x20be\x20a\x20non-empty\x20string.','\x20facts.','Notification\x20recipient\x20must\x20be\x20an\x20object.','Node\x20cannot\x20reach\x20any\x20END.','.facts','string','\x20users.','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','flowJson.startPageId','.type','START','includes','.async.retryInterval','retryInterval','flowJson.schemaVersion','END','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','Unsupported\x20schemaVersion:\x20','EMAIL','Reserved\x20resultVariable:\x20','ANY','value','nodes\x20must\x20be\x20an\x20array.','.assignee.roleId','.tmp','defaultFlow\x20must\x20be\x20a\x20boolean.','waypoints','filter','Unsupported\x20node\x20type:\x20','FIXED\x20assignee\x20requires\x20userIds.','.expression','Duplicate\x20resultVariable:\x20','value\x20must\x20be\x20an\x20array.','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','flowDesc\x20must\x20be\x20a\x20string.','timeout\x20must\x20be\x20an\x20object.','roleId','findIndex','pageId','NOTIFICATION\x20node\x20requires\x20config.','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','EXECUTE_BFF','Unsupported\x20notification\x20placeholder:\x20','formDefinitions','hasOwnProperty','text','unit','object','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','Notification\x20recipient.value\x20is\x20required.','integer','size','source','timeout','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','map','5LQXfzL','Notification\x20version\x20must\x20be\x20a\x20string.','NOTIFICATION','conditionType','.recipients','forEach','metadata','overwrite','isInteger','SINGLE','boolean','node\x20must\x20be\x20an\x20object.','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','readSources','Unsupported\x20flowType:\x20','.timeout.resultVariable','AUTO_APPROVE','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','.cc.visible','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','flowName','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','45uvipCK','BCC','\x20was\x20empty\x20and\x20was\x20removed.','SECONDS','templateName','^[1-9][0-9]*$','.pageId','some','.waypoints','every','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','indexOf','approved','position','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','expression','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','approval_sys_operationType','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','.target','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','Duplicate\x20value:\x20','.assignee.strategy','USER','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','APPROVED','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','version','config','PLATFORM_FORM','.path','sequential','Notification\x20recipient.type\x20is\x20required.','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','taskMode','trim','.cc.recipientUserIds[','duration\x20requires\x20value\x20and\x20unit.','INDEPENDENT_FLOW','timeout.enabled\x20must\x20be\x20a\x20boolean.','datasetCode','https://json-schema.org/draft/2020-12/schema','#/$defs/timeAmount','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','1178416LaRhza','mode','https://lovrabet.com/schema/rabetbase-flow-config.json','FIXED','variables','scriptResult','actions','].path','get','.approvalMode','Every\x20node\x20requires\x20a\x20non-empty\x20name.','EXPRESSION\x20edge\x20requires\x20expression.','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','1383748GKoVcc','edges','\x20->\x20','.async.retryCount','recipientUserIds','flowJson.nodes.','approval.simple-flow.v1','SCRIPT','pageId\x20must\x20be\x20a\x20non-negative\x20integer.','#/$defs/flowNode','userIds','call','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','flowJson.pageMode','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','#/$defs/position','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','prototype','edges\x20must\x20be\x20an\x20array.','Unsupported\x20notification\x20version:\x20','keys','NOTIFICATION\x20node\x20requires\x20template.','approval_sys_initiatorUserId','CUSTOM_PAGE','CONTINUE','.detailMarkdown','startsWith','waypoint.','schemaVersion','Edge\x20source\x20node\x20not\x20found:\x20','10153900Emvfdn','\x20is\x20required.','nodes','Notification\x20action.url\x20is\x20required.','.timeout.interrupting','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','Notification\x20configCode\x20is\x20required.','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','defaultFlow','.conditionType','AUTO_REJECT','flowJson.','.text','datasetCode\x20must\x20be\x20a\x20string.','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','.template','Notification\x20template.facts\x20must\x20be\x20an\x20array.','.taskMode','ALL','detailMarkdown','retryCount','APPROVAL\x20node\x20requires\x20assignee.','async.enabled\x20must\x20be\x20a\x20boolean.','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','.role','title','sequential\x20must\x20be\x20a\x20boolean.','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','CONDITION','ROLE','flowJson','.value','^[A-Za-z_][A-Za-z0-9_]*$','approval_sys_appCode','.assignee.userIds','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','enabled','Duplicate\x20node\x20id:\x20','resultVariable','.version','push','set','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','length','legacy_field_removed','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','type','isArray','edge\x20must\x20be\x20an\x20object.','DAYS','message','flowDesc','.position','Unsupported\x20task\x20mode:\x20','Rabetbase\x20FlowConfig','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','bindDatasetCode','context','.cc.recipientUserIds','#/$defs/userId','utf8','flowJson.nodes','EXPRESSION','22cPACbE','\x20actions.','1588443FylhEU','#/$defs/flowEdge','.async','3300997WEuVOD','pid','edge\x20source\x20is\x20required.','417768zgjUAf','.config','.timeout.duration','number','Node\x20is\x20not\x20reachable\x20from\x20START.','Unsupported\x20approval\x20mode:\x20','.scriptName','targetNodeId','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','toUpperCase','.resultVariable','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','approvalMode','.async.enabled','catch','flowJson.edges[','approval_sys_','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','label','.failurePolicy','appCode','522666oLfXNw','form','isSafeInteger'];a287_0x240c=function(){return _0x14c04e;};return a287_0x240c();}function isRecord(_0x1664f1){const _0x956bca=a287_0x5e5514;return typeof _0x1664f1===_0x956bca(0x267)&&_0x1664f1!==null&&!Array[_0x956bca(0x19a)](_0x1664f1);}function cloneJsonValue(_0x40cbe9){const _0x58b43e=a287_0x5e5514;return JSON[_0x58b43e(0x225)](JSON[_0x58b43e(0x1e5)](_0x40cbe9));}export async function readFlowConfigFile(_0x3e5d23){const _0x1e3266=a287_0x5e5514,_0x1f7f78=await readFile(resolve(_0x3e5d23),'utf8');return JSON[_0x1e3266(0x225)](_0x1f7f78);}
1
+ const a292_0x48fe81=a292_0x308c;(function(_0x21dd57,_0x285f7b){const _0x1aaff9=a292_0x308c,_0x8c42ba=_0x21dd57();while(!![]){try{const _0x10e20f=parseInt(_0x1aaff9(0x108))/0x1*(parseInt(_0x1aaff9(0x1a1))/0x2)+-parseInt(_0x1aaff9(0x151))/0x3*(parseInt(_0x1aaff9(0x154))/0x4)+-parseInt(_0x1aaff9(0x21e))/0x5*(-parseInt(_0x1aaff9(0x1b2))/0x6)+-parseInt(_0x1aaff9(0x134))/0x7*(-parseInt(_0x1aaff9(0xec))/0x8)+parseInt(_0x1aaff9(0x121))/0x9*(-parseInt(_0x1aaff9(0x110))/0xa)+-parseInt(_0x1aaff9(0x11e))/0xb*(parseInt(_0x1aaff9(0x1c8))/0xc)+parseInt(_0x1aaff9(0x10d))/0xd;if(_0x10e20f===_0x285f7b)break;else _0x8c42ba['push'](_0x8c42ba['shift']());}catch(_0x58f34d){_0x8c42ba['push'](_0x8c42ba['shift']());}}}(a292_0x1ee7,0x76d5b));import{randomUUID}from'node:crypto';import{chmod,link,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{resolve}from'node:path';export const FLOW_CONFIG_JSON_SCHEMA={'$schema':a292_0x48fe81(0x17d),'$id':a292_0x48fe81(0x1fd),'title':a292_0x48fe81(0x1e4),'type':a292_0x48fe81(0x21c),'required':[a292_0x48fe81(0x164),a292_0x48fe81(0x20d),a292_0x48fe81(0x162)],'$defs':{'userId':{'anyOf':[{'type':a292_0x48fe81(0x106),'minLength':0x1},{'type':a292_0x48fe81(0x214),'minimum':0x1}]},'position':{'type':a292_0x48fe81(0x21c),'required':['x','y'],'properties':{'x':{'type':a292_0x48fe81(0xe7),'minimum':0x0},'y':{'type':'number','minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a292_0x48fe81(0x21c),'required':[a292_0x48fe81(0x109),a292_0x48fe81(0xfa)],'properties':{'value':{'type':a292_0x48fe81(0x214),'minimum':0x1},'unit':{'enum':[a292_0x48fe81(0x139),a292_0x48fe81(0x202),a292_0x48fe81(0xd1),'DAYS']}},'additionalProperties':!![]},'flowNode':{'type':a292_0x48fe81(0x21c),'required':['id',a292_0x48fe81(0x168),a292_0x48fe81(0x1a9),a292_0x48fe81(0x1ed)],'properties':{'id':{'type':a292_0x48fe81(0x106),'pattern':a292_0x48fe81(0x137)},'type':{'enum':['START',a292_0x48fe81(0x15a),a292_0x48fe81(0x15d),'CONDITION',a292_0x48fe81(0x179),a292_0x48fe81(0x11d)]},'name':{'type':a292_0x48fe81(0x106),'minLength':0x1},'path':{'type':a292_0x48fe81(0x106),'minLength':0x1},'position':{'$ref':a292_0x48fe81(0x21a)},'approvalMode':{'enum':['SINGLE',a292_0x48fe81(0x124),a292_0x48fe81(0x19a)]},'taskMode':{'enum':[a292_0x48fe81(0x15d),'HANDLE']},'assignee':{'type':a292_0x48fe81(0x21c),'required':['strategy'],'properties':{'strategy':{'enum':['FIXED',a292_0x48fe81(0x12c)]},'userIds':{'type':a292_0x48fe81(0x16f),'minItems':0x1,'items':{'$ref':'#/$defs/userId'}},'roleId':{'anyOf':[{'type':a292_0x48fe81(0x214),'minimum':0x1},{'type':a292_0x48fe81(0x106),'pattern':a292_0x48fe81(0x1f7)}]}},'additionalProperties':!![]},'transferCandidates':{'type':a292_0x48fe81(0x21c),'required':[a292_0x48fe81(0x174),a292_0x48fe81(0x21b)],'properties':{'strategy':{'const':a292_0x48fe81(0x1cf)},'userIds':{'type':'array','minItems':0x1,'items':{'$ref':'#/$defs/userId'}}},'additionalProperties':!![]},'sequential':{'type':'boolean'},'result':{'enum':[a292_0x48fe81(0x1d7),a292_0x48fe81(0x1c3)]},'scriptName':{'type':a292_0x48fe81(0x106),'minLength':0x1},'resultVariable':{'type':a292_0x48fe81(0x106),'pattern':a292_0x48fe81(0x137)},'async':{'type':'object','properties':{'enabled':{'type':a292_0x48fe81(0x1be)},'retryCount':{'type':a292_0x48fe81(0x214),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':'#/$defs/timeAmount'}},'additionalProperties':!![]},'timeout':{'type':a292_0x48fe81(0x21c),'properties':{'enabled':{'type':a292_0x48fe81(0x1be)},'duration':{'$ref':a292_0x48fe81(0x188)},'action':{'enum':[a292_0x48fe81(0x184),a292_0x48fe81(0x12f),a292_0x48fe81(0x1c4)]},'interrupting':{'type':'boolean'},'scriptName':{'type':a292_0x48fe81(0x106),'minLength':0x1},'resultVariable':{'type':a292_0x48fe81(0x106),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'}},'additionalProperties':!![]},'cc':{'type':a292_0x48fe81(0x21c),'required':['recipientUserIds'],'properties':{'recipientUserIds':{'type':a292_0x48fe81(0x16f),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'visible':{'type':a292_0x48fe81(0x16f),'uniqueItems':!![],'items':{'type':a292_0x48fe81(0x106),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':[a292_0x48fe81(0x1c2),'template'],'properties':{'version':{'enum':['v1']},'configCode':{'type':a292_0x48fe81(0x106),'minLength':0x1},'failurePolicy':{'enum':[a292_0x48fe81(0xe3),a292_0x48fe81(0xeb)]},'template':{'type':a292_0x48fe81(0x21c),'required':[a292_0x48fe81(0x1c0),a292_0x48fe81(0x1e3)],'properties':{'title':{'type':a292_0x48fe81(0x106),'minLength':0x1},'summary':{'type':a292_0x48fe81(0x106),'minLength':0x1},'detailMarkdown':{'type':a292_0x48fe81(0x106)},'facts':{'type':a292_0x48fe81(0x16f),'maxItems':0x8,'items':{'type':a292_0x48fe81(0x21c),'required':[a292_0x48fe81(0xf0),'value'],'properties':{'label':{'type':'string','minLength':0x1},'value':{'type':'string','minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a292_0x48fe81(0x16f),'maxItems':0x2,'items':{'type':a292_0x48fe81(0x21c),'required':[a292_0x48fe81(0x115),a292_0x48fe81(0x113)],'properties':{'text':{'type':a292_0x48fe81(0x106),'minLength':0x1},'url':{'type':a292_0x48fe81(0x106),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a292_0x48fe81(0x16f),'items':{'type':'object','required':['type',a292_0x48fe81(0x109)],'properties':{'type':{'enum':['USER',a292_0x48fe81(0x12c),a292_0x48fe81(0x17b)]},'value':{'type':a292_0x48fe81(0x106),'minLength':0x1},'role':{'enum':['TO','CC',a292_0x48fe81(0x199)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a292_0x48fe81(0x21c),'properties':{'id':{'type':a292_0x48fe81(0x106),'pattern':a292_0x48fe81(0x137)},'source':{'type':a292_0x48fe81(0x106),'minLength':0x1},'target':{'type':a292_0x48fe81(0x106),'minLength':0x1},'sourceNodeId':{'type':'string','minLength':0x1},'targetNodeId':{'type':a292_0x48fe81(0x106),'minLength':0x1},'conditionType':{'enum':[a292_0x48fe81(0x1b1),'APPROVED',a292_0x48fe81(0x1c3),a292_0x48fe81(0x1ab)]},'expression':{'type':a292_0x48fe81(0x106)},'defaultFlow':{'type':a292_0x48fe81(0x1be)},'name':{'type':a292_0x48fe81(0x106)},'waypoints':{'type':'array','items':{'$ref':a292_0x48fe81(0x21a)}}},'allOf':[{'anyOf':[{'required':[a292_0x48fe81(0x1c1)]},{'required':[a292_0x48fe81(0x1ee)]}]},{'anyOf':[{'required':['target']},{'required':[a292_0x48fe81(0x142)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a292_0x48fe81(0x106),'minLength':0x1},'flowDesc':{'type':'string'},'flowType':{'enum':[a292_0x48fe81(0x185),a292_0x48fe81(0x144)]},'datasetCode':{'type':a292_0x48fe81(0x106),'minLength':0x1},'pageId':{'type':a292_0x48fe81(0x214)},'templateName':![],'flowJson':{'type':a292_0x48fe81(0x21c),'required':['nodes',a292_0x48fe81(0x171)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a292_0x48fe81(0x106),'const':a292_0x48fe81(0x1ec),'description':a292_0x48fe81(0x105)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a292_0x48fe81(0x1e9)},'startPageId':![],'startPath':{'type':a292_0x48fe81(0x106),'minLength':0x1},'nodes':{'type':a292_0x48fe81(0x16f),'minItems':0x1,'items':{'$ref':'#/$defs/flowNode'}},'edges':{'type':a292_0x48fe81(0x16f),'minItems':0x1,'items':{'$ref':'#/$defs/flowEdge'}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=['flowKey',a292_0x48fe81(0x155),'flowName','bindDatasetCode','datasetCode','appCode','pageId',a292_0x48fe81(0x1c9)],REMOVED_ROOT_FIELDS=['id',a292_0x48fe81(0x216),a292_0x48fe81(0x1c9)],DEFAULT_FLOW_SCHEMA_VERSION=a292_0x48fe81(0x1ec),NODE_TYPES=new Set(['START',a292_0x48fe81(0x15a),a292_0x48fe81(0x15d),'CONDITION','SCRIPT',a292_0x48fe81(0x11d)]),CONDITION_TYPES=new Set([a292_0x48fe81(0x1b1),a292_0x48fe81(0x1d7),a292_0x48fe81(0x1c3),'EXPRESSION']),APPROVAL_MODES=new Set([a292_0x48fe81(0x112),'ALL',a292_0x48fe81(0x19a)]),APPROVAL_TASK_MODES=new Set(['APPROVAL',a292_0x48fe81(0x12d)]),FLOW_TIME_UNITS=new Set([a292_0x48fe81(0x139),a292_0x48fe81(0x202),a292_0x48fe81(0xd1),a292_0x48fe81(0x20a)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a292_0x48fe81(0x184),a292_0x48fe81(0x12f),a292_0x48fe81(0x1c4)]),FLOW_TYPES=new Set([a292_0x48fe81(0x185),a292_0x48fe81(0x144)]),FLOW_PAGE_MODES=new Set([a292_0x48fe81(0x1e9),a292_0x48fe81(0x17e)]),BPMN_ID_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,VARIABLE_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,NOTIFICATION_PLACEHOLDER_PATTERN=/\$\{([^{}]+)\}/g,NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN=/^\$\{(?:event|context|variables)\.[^{}]+\}$/,NOTIFICATION_FAILURE_POLICIES=new Set([a292_0x48fe81(0xe3),a292_0x48fe81(0xeb)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a292_0x48fe81(0x20b),a292_0x48fe81(0x12c),a292_0x48fe81(0x17b)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a292_0x48fe81(0x199)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a292_0x48fe81(0xde),UNSUPPORTED_FORM_MESSAGE=a292_0x48fe81(0x208),UNSUPPORTED_PLATFORM_FORM_MESSAGE='PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.',RESERVED_RESULT_VARIABLES=new Set([a292_0x48fe81(0x1e6),'approved',a292_0x48fe81(0xf7),a292_0x48fe81(0x1da),a292_0x48fe81(0x101),a292_0x48fe81(0x197),a292_0x48fe81(0x1b5),a292_0x48fe81(0x1f1),a292_0x48fe81(0x220),a292_0x48fe81(0x1cd)]);export function normalizeFlowConfig(_0x33c003){const _0x2c2f4a=a292_0x48fe81;if(!isRecord(_0x33c003))throw new TypeError(_0x2c2f4a(0x218));const _0x5236aa=cloneJsonValue(_0x33c003),_0x591cf5=_0x5236aa[_0x2c2f4a(0x162)],_0xf68ccd=isRecord(_0x591cf5)?cloneJsonValue(_0x591cf5):{},_0x296a5b=[],_0x34e8e0=[];for(const _0xb8c063 of REMOVED_ROOT_FIELDS){if(!Object[_0x2c2f4a(0x13e)][_0x2c2f4a(0x223)][_0x2c2f4a(0x13d)](_0x5236aa,_0xb8c063))continue;delete _0x5236aa[_0xb8c063],_0x34e8e0['push'](_0xb8c063),_0x296a5b[_0x2c2f4a(0x1e8)]({'code':_0x2c2f4a(0x1d5),'path':_0xb8c063,'message':_0xb8c063+_0x2c2f4a(0x1cc)});}for(const _0x116b41 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x2c2f4a(0x13e)][_0x2c2f4a(0x223)]['call'](_0xf68ccd,_0x116b41))continue;const _0x95891f=_0x2c2f4a(0x11c)+_0x116b41;delete _0xf68ccd[_0x116b41],_0x34e8e0['push'](_0x95891f),_0x296a5b[_0x2c2f4a(0x1e8)]({'code':_0x2c2f4a(0x1d5),'path':_0x95891f,'message':_0x95891f+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}if(Object[_0x2c2f4a(0x13e)][_0x2c2f4a(0x223)][_0x2c2f4a(0x13d)](_0xf68ccd,_0x2c2f4a(0x1f6))){const _0x2ff844=_0xf68ccd[_0x2c2f4a(0x1f6)],_0x390bf0=typeof _0x2ff844===_0x2c2f4a(0x106)?_0x2ff844[_0x2c2f4a(0x181)]():_0x2ff844;if(isEmptyJsonValue(_0x2ff844)||_0x390bf0===DEFAULT_FLOW_SCHEMA_VERSION){const _0x1d39b7=_0x2c2f4a(0x170);delete _0xf68ccd[_0x2c2f4a(0x1f6)],_0x34e8e0['push'](_0x1d39b7),_0x296a5b['push']({'code':_0x2c2f4a(0x1d5),'path':_0x1d39b7,'message':_0x1d39b7+'\x20was\x20empty\x20or\x20used\x20the\x20default\x20'+DEFAULT_FLOW_SCHEMA_VERSION+_0x2c2f4a(0x1d4)});}}removeEmptyMetadata(_0xf68ccd,_0x2c2f4a(0x162),_0x296a5b,_0x34e8e0);_0x5236aa[_0x2c2f4a(0x20d)]===_0x2c2f4a(0x144)&&!Object[_0x2c2f4a(0x13e)][_0x2c2f4a(0x223)]['call'](_0xf68ccd,'pageMode')&&(_0xf68ccd['pageMode']=_0x2c2f4a(0x1e9));_0x5236aa[_0x2c2f4a(0x162)]=_0xf68ccd;if(typeof _0x5236aa[_0x2c2f4a(0x164)]==='string')_0x5236aa[_0x2c2f4a(0x164)]=_0x5236aa[_0x2c2f4a(0x164)][_0x2c2f4a(0x181)]();return{'config':_0x5236aa,'warnings':_0x296a5b,'removedPaths':_0x34e8e0};}export function validateFlowConfig(_0x50edfa){const _0x389c08=a292_0x48fe81;let _0x51d3df;try{_0x51d3df=normalizeFlowConfig(_0x50edfa);}catch(_0x465ad2){const _0x47caa9=_0x465ad2 instanceof Error?_0x465ad2['message']:String(_0x465ad2),_0x25acad={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x47caa9}],'warnings':[],'normalized':_0x25acad,'validationConfig':_0x25acad};}const _0x5e01c2=_0x51d3df[_0x389c08(0x193)],_0x463ac5=cloneJsonValue(_0x5e01c2),_0x3bb088=_0x463ac5['flowJson'];_0x3bb088[_0x389c08(0x19d)]=_0x389c08(0x1fb),_0x3bb088[_0x389c08(0x164)]=_0x5e01c2[_0x389c08(0x164)];typeof _0x5e01c2['datasetCode']==='string'&&_0x5e01c2['datasetCode'][_0x389c08(0x181)]()&&(_0x3bb088['bindDatasetCode']=_0x5e01c2[_0x389c08(0x176)][_0x389c08(0x181)]());const _0x3450d7=[];return validateOuterMetadata(_0x5e01c2,_0x3450d7),validateFlowClassification(_0x5e01c2,_0x3450d7),validateGraph(_0x5e01c2['flowJson'],_0x3450d7),{'valid':_0x3450d7[_0x389c08(0x146)]===0x0,'errors':_0x3450d7,'warnings':_0x51d3df['warnings'],'normalized':_0x5e01c2,'validationConfig':_0x463ac5};}function validateFlowClassification(_0x525799,_0x250e14){const _0x36966c=a292_0x48fe81;if(!isRecord(_0x525799['flowJson']))return;const _0x22ea53=_0x525799[_0x36966c(0x20d)],_0x590d16=_0x525799[_0x36966c(0x162)]['pageMode'];_0x590d16!==undefined&&(typeof _0x590d16!==_0x36966c(0x106)||!FLOW_PAGE_MODES['has'](_0x590d16))&&_0x250e14['push']({'path':_0x36966c(0x1a6),'message':_0x36966c(0x156)+String(_0x590d16)+'.'});_0x22ea53===_0x36966c(0x185)&&_0x590d16!==undefined&&_0x250e14[_0x36966c(0x1e8)]({'path':_0x36966c(0x1a6),'message':_0x36966c(0xe6)});_0x22ea53===_0x36966c(0x144)&&_0x590d16===_0x36966c(0x17e)&&_0x250e14[_0x36966c(0x1e8)]({'path':_0x36966c(0x1a6),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x22ea53===_0x36966c(0x185)||_0x22ea53===_0x36966c(0x144))&&validateCustomPageNavigation(_0x525799,_0x22ea53,_0x590d16,_0x250e14);if(_0x22ea53!==_0x36966c(0x185)||!Array[_0x36966c(0x16b)](_0x525799[_0x36966c(0x162)][_0x36966c(0xf4)]))return;_0x525799[_0x36966c(0x162)][_0x36966c(0xf4)][_0x36966c(0x14b)]((_0x103f06,_0x5b18fd)=>{const _0xf1cbf6=_0x36966c;isRecord(_0x103f06)&&_0x103f06['type']==='APPROVAL'&&_0x103f06[_0xf1cbf6(0x201)]==='HANDLE'&&_0x250e14[_0xf1cbf6(0x1e8)]({'path':'flowJson.nodes['+_0x5b18fd+_0xf1cbf6(0xf5),'message':_0xf1cbf6(0xef)});});}function validateCustomPageNavigation(_0x1f6909,_0x1ffa27,_0x1cb483,_0x4820ae){const _0x4f0ed3=a292_0x48fe81,_0x278628=_0x1f6909[_0x4f0ed3(0x162)][_0x4f0ed3(0x16e)];_0x278628!==undefined&&_0x4820ae[_0x4f0ed3(0x1e8)]({'path':_0x4f0ed3(0x1dd),'message':_0x4f0ed3(0x17c)});const _0x41f72b=_0x1f6909[_0x4f0ed3(0x162)]['startPath'];_0x41f72b!==undefined&&(typeof _0x41f72b!==_0x4f0ed3(0x106)||_0x41f72b[_0x4f0ed3(0x181)]()==='')&&_0x4820ae[_0x4f0ed3(0x1e8)]({'path':'flowJson.startPath','message':_0x4f0ed3(0x1b6)});const _0x31f527=Array['isArray'](_0x1f6909[_0x4f0ed3(0x162)][_0x4f0ed3(0xf4)])?_0x1f6909['flowJson'][_0x4f0ed3(0xf4)]['map']((_0x3500e2,_0x29fb7b)=>({'node':_0x3500e2,'index':_0x29fb7b}))[_0x4f0ed3(0x1de)](({node:_0x354280})=>isRecord(_0x354280)&&_0x354280[_0x4f0ed3(0x18a)]!==undefined):[],_0x3a6a0c=_0x41f72b!==undefined||_0x31f527[_0x4f0ed3(0x146)]>0x0,_0x3e0c7e=_0x1cb483===undefined&&_0x1ffa27==='INDEPENDENT_FLOW'?'CUSTOM_PAGE':_0x1cb483;_0x3a6a0c&&(_0x1ffa27!==_0x4f0ed3(0x144)||_0x3e0c7e!==_0x4f0ed3(0x1e9))&&(_0x41f72b!==undefined&&_0x4820ae[_0x4f0ed3(0x1e8)]({'path':'flowJson.startPath','message':_0x4f0ed3(0x1cb)}),_0x31f527[_0x4f0ed3(0x14b)](({index:_0x1a0072})=>{const _0x435ed5=_0x4f0ed3;_0x4820ae[_0x435ed5(0x1e8)]({'path':_0x435ed5(0x11f)+_0x1a0072+_0x435ed5(0x217),'message':_0x435ed5(0x1b9)});}));}export async function writeNormalizedFlowConfig(_0xc7edf6,_0x4d9a96,_0x3c04c5={}){const _0x58c64c=a292_0x48fe81,_0x1e5026=resolve(_0xc7edf6),_0x1ab759=_0x1e5026+'.'+process[_0x58c64c(0x138)]+'.'+randomUUID()+_0x58c64c(0x1a7),_0x34645e=JSON[_0x58c64c(0x1d9)](_0x4d9a96,null,0x2)+'\x0a';let _0x252c97;try{try{_0x252c97=(await stat(_0x1e5026))['mode']&0x1ff;}catch{_0x252c97=undefined;}await writeFile(_0x1ab759,_0x34645e,{'encoding':_0x58c64c(0x166),'flag':'wx','mode':_0x252c97??0x1a4});if(_0x252c97!==undefined)await chmod(_0x1ab759,_0x252c97);_0x3c04c5[_0x58c64c(0x157)]===![]?(await link(_0x1ab759,_0x1e5026),await unlink(_0x1ab759)):await rename(_0x1ab759,_0x1e5026);}finally{await unlink(_0x1ab759)[_0x58c64c(0x100)](()=>undefined);}}function validateOuterMetadata(_0x30bd47,_0x1e934e){const _0x2fa3fd=a292_0x48fe81;(typeof _0x30bd47[_0x2fa3fd(0x164)]!=='string'||_0x30bd47[_0x2fa3fd(0x164)][_0x2fa3fd(0x181)]()==='')&&_0x1e934e[_0x2fa3fd(0x1e8)]({'path':'flowName','message':'flowName\x20is\x20required.'});_0x30bd47[_0x2fa3fd(0x140)]!==undefined&&typeof _0x30bd47['flowDesc']!==_0x2fa3fd(0x106)&&_0x1e934e[_0x2fa3fd(0x1e8)]({'path':'flowDesc','message':_0x2fa3fd(0x129)});if(_0x30bd47[_0x2fa3fd(0x20d)]===undefined||_0x30bd47['flowType']===null)_0x1e934e[_0x2fa3fd(0x1e8)]({'path':_0x2fa3fd(0x20d),'message':_0x2fa3fd(0xff)});else(typeof _0x30bd47[_0x2fa3fd(0x20d)]!=='string'||!FLOW_TYPES[_0x2fa3fd(0x1ae)](_0x30bd47[_0x2fa3fd(0x20d)]))&&_0x1e934e[_0x2fa3fd(0x1e8)]({'path':_0x2fa3fd(0x20d),'message':_0x2fa3fd(0x111)+String(_0x30bd47['flowType'])+'.'});_0x30bd47[_0x2fa3fd(0x176)]!==undefined&&typeof _0x30bd47[_0x2fa3fd(0x176)]!==_0x2fa3fd(0x106)&&_0x1e934e[_0x2fa3fd(0x1e8)]({'path':_0x2fa3fd(0x176),'message':_0x2fa3fd(0x130)}),_0x30bd47[_0x2fa3fd(0x186)]!==undefined&&(!Number[_0x2fa3fd(0x103)](_0x30bd47['pageId'])||_0x30bd47[_0x2fa3fd(0x186)]<0x0)&&_0x1e934e['push']({'path':_0x2fa3fd(0x186),'message':_0x2fa3fd(0xfb)}),_0x30bd47['flowType']===_0x2fa3fd(0x144)&&_0x30bd47[_0x2fa3fd(0x176)]!==undefined&&_0x1e934e[_0x2fa3fd(0x1e8)]({'path':_0x2fa3fd(0x176),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.'}),_0x30bd47[_0x2fa3fd(0x20d)]===_0x2fa3fd(0x144)&&_0x30bd47[_0x2fa3fd(0x186)]!==undefined&&_0x1e934e['push']({'path':'pageId','message':_0x2fa3fd(0x1b7)});}function validateGraph(_0x5a568a,_0x15643a){const _0x1d0663=a292_0x48fe81;if(!isRecord(_0x5a568a)){_0x15643a[_0x1d0663(0x1e8)]({'path':'flowJson','message':_0x1d0663(0xed)});return;}!Array[_0x1d0663(0x16b)](_0x5a568a[_0x1d0663(0xf4)])&&_0x15643a[_0x1d0663(0x1e8)]({'path':_0x1d0663(0x125),'message':'nodes\x20must\x20be\x20an\x20array.'});!Array[_0x1d0663(0x16b)](_0x5a568a[_0x1d0663(0x171)])&&_0x15643a[_0x1d0663(0x1e8)]({'path':_0x1d0663(0x126),'message':_0x1d0663(0x127)});Object[_0x1d0663(0x13e)][_0x1d0663(0x223)][_0x1d0663(0x13d)](_0x5a568a,_0x1d0663(0x1f6))&&_0x15643a[_0x1d0663(0x1e8)]({'path':_0x1d0663(0x170),'message':'Unsupported\x20schemaVersion:\x20'+String(_0x5a568a['schemaVersion'])+_0x1d0663(0x195)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x5b9a16 of[_0x1d0663(0x1a3),_0x1d0663(0x1ca),_0x1d0663(0x18e)]){Object['prototype'][_0x1d0663(0x223)][_0x1d0663(0x13d)](_0x5a568a,_0x5b9a16)&&_0x15643a[_0x1d0663(0x1e8)]({'path':_0x1d0663(0x11c)+_0x5b9a16,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array['isArray'](_0x5a568a[_0x1d0663(0xf4)])||!Array[_0x1d0663(0x16b)](_0x5a568a[_0x1d0663(0x171)]))return;const _0x516d20=new Map(),_0xec912=[],_0x2b0a11=[],_0x53a024=new Map(),_0x3eb878=new Map(),_0x1379d2=new Set();let _0x11d9fe=0x0;_0x5a568a[_0x1d0663(0xf4)][_0x1d0663(0x14b)]((_0xfaef0f,_0x1a6a48)=>{const _0x56803f=_0x1d0663,_0x536582=_0x56803f(0x11f)+_0x1a6a48+']';if(!isRecord(_0xfaef0f)){_0x15643a[_0x56803f(0x1e8)]({'path':_0x536582,'message':_0x56803f(0xf1)});return;}const _0x46c188=_0xfaef0f;if(typeof _0x46c188['id']!==_0x56803f(0x106)||!BPMN_ID_PATTERN[_0x56803f(0x14f)](_0x46c188['id']))_0x15643a[_0x56803f(0x1e8)]({'path':_0x536582+'.id','message':'node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else _0x516d20[_0x56803f(0x1ae)](_0x46c188['id'])?_0x15643a[_0x56803f(0x1e8)]({'path':_0x536582+_0x56803f(0xd5),'message':_0x56803f(0x20c)+_0x46c188['id']+'.'}):(_0x516d20['set'](_0x46c188['id'],_0x46c188),_0x1379d2[_0x56803f(0x14e)](_0x46c188['id']));if(!NODE_TYPES[_0x56803f(0x1ae)](_0x46c188[_0x56803f(0x168)]))_0x15643a[_0x56803f(0x1e8)]({'path':_0x536582+_0x56803f(0x1f5),'message':'Unsupported\x20node\x20type:\x20'+String(_0x46c188[_0x56803f(0x168)])+'.'});else{if(_0x46c188[_0x56803f(0x168)]===_0x56803f(0x192))_0xec912[_0x56803f(0x1e8)](_0x46c188['id']);else _0x46c188[_0x56803f(0x168)]===_0x56803f(0x15a)&&_0x2b0a11[_0x56803f(0x1e8)](_0x46c188['id']);}_0x46c188[_0x56803f(0x168)]===_0x56803f(0x15d)&&(_0x46c188[_0x56803f(0x201)]===undefined||_0x46c188[_0x56803f(0x201)]===_0x56803f(0x15d))&&(_0x11d9fe+=0x1);validateNode(_0x46c188,_0x536582,_0x15643a);if(_0x46c188[_0x56803f(0x168)]===_0x56803f(0x179)){const _0x482093=resolveEffectiveResultVariable(_0x46c188[_0x56803f(0x10e)],![]);_0x482093&&(registerResultVariableOwner(_0x3eb878,_0x482093,_0x46c188['id'],_0x15643a),!_0x53a024[_0x56803f(0x1ae)](_0x482093)&&_0x53a024[_0x56803f(0x153)](_0x482093,_0x46c188['id']));}if(_0x46c188['type']===_0x56803f(0x15d)&&isRecord(_0x46c188[_0x56803f(0x12a)])&&_0x46c188[_0x56803f(0x12a)][_0x56803f(0xda)]===!![]&&_0x46c188['timeout']['action']===_0x56803f(0x1c4)){const _0x2a1653=resolveEffectiveResultVariable(_0x46c188[_0x56803f(0x12a)]['resultVariable'],!![]);_0x2a1653&&registerResultVariableOwner(_0x3eb878,_0x2a1653,_0x46c188['id']+_0x56803f(0x215),_0x15643a);}});_0xec912[_0x1d0663(0x146)]!==0x1&&_0x15643a[_0x1d0663(0x1e8)]({'path':_0x1d0663(0x125),'message':_0x1d0663(0x1c7)});_0x2b0a11[_0x1d0663(0x146)]===0x0&&_0x15643a['push']({'path':_0x1d0663(0x125),'message':_0x1d0663(0x10a)});const _0x47b550=new Map(),_0x54b3e4=new Map(),_0x53c525=new Map(),_0x5d2bb8=new Set();_0x5a568a['edges'][_0x1d0663(0x14b)]((_0x59f470,_0x582e50)=>{const _0x502628=_0x1d0663,_0x295295=_0x502628(0x1a2)+_0x582e50+']';if(!isRecord(_0x59f470)){_0x15643a[_0x502628(0x1e8)]({'path':_0x295295,'message':_0x502628(0x1df)});return;}const _0x47d882=_0x59f470;_0x53c525[_0x502628(0x153)](_0x47d882,_0x295295);const _0x3ed38c=resolveEdgeEndpoint(_0x47d882[_0x502628(0x1c1)],_0x47d882[_0x502628(0x1ee)]),_0x95ddd6=resolveEdgeEndpoint(_0x47d882[_0x502628(0xfe)],_0x47d882['targetNodeId']);if(!_0x3ed38c)_0x15643a[_0x502628(0x1e8)]({'path':_0x295295+'.source','message':'edge\x20source\x20is\x20required.'});if(!_0x95ddd6)_0x15643a[_0x502628(0x1e8)]({'path':_0x295295+_0x502628(0x136),'message':'edge\x20target\x20is\x20required.'});_0x3ed38c&&!_0x516d20['has'](_0x3ed38c)&&_0x15643a[_0x502628(0x1e8)]({'path':_0x295295+_0x502628(0x20e),'message':_0x502628(0x15f)+_0x3ed38c+'.'});_0x95ddd6&&!_0x516d20[_0x502628(0x1ae)](_0x95ddd6)&&_0x15643a[_0x502628(0x1e8)]({'path':_0x295295+_0x502628(0x136),'message':_0x502628(0xf8)+_0x95ddd6+'.'});if(_0x47d882['id']!==undefined){if(typeof _0x47d882['id']!==_0x502628(0x106)||!BPMN_ID_PATTERN[_0x502628(0x14f)](_0x47d882['id']))_0x15643a[_0x502628(0x1e8)]({'path':_0x295295+_0x502628(0xd5),'message':_0x502628(0x1a5)});else{if(_0x1379d2[_0x502628(0x1ae)](_0x47d882['id']))_0x15643a[_0x502628(0x1e8)]({'path':_0x295295+_0x502628(0xd5),'message':_0x502628(0x165)+_0x47d882['id']+'.'});else!_0x1379d2['has'](_0x47d882['id'])&&_0x1379d2[_0x502628(0x14e)](_0x47d882['id']);}}if(_0x3ed38c&&_0x95ddd6){const _0xd7e24=_0x3ed38c+'\x00'+_0x95ddd6+'\x00'+(_0x47d882[_0x502628(0x167)]??_0x502628(0x1b1));_0x5d2bb8['has'](_0xd7e24)?_0x15643a[_0x502628(0x1e8)]({'path':_0x295295,'message':_0x502628(0xd0)+_0x3ed38c+_0x502628(0x205)+_0x95ddd6+'\x20('+(_0x47d882[_0x502628(0x167)]??_0x502628(0x1b1))+').'}):_0x5d2bb8['add'](_0xd7e24);}validateEdge(_0x47d882,_0x295295,_0x15643a),_0x3ed38c&&_0x95ddd6&&(_0x47b550[_0x502628(0x191)](_0x3ed38c)?.[_0x502628(0x1e8)](_0x47d882)??_0x47b550[_0x502628(0x153)](_0x3ed38c,[_0x47d882]),_0x54b3e4['get'](_0x95ddd6)?.[_0x502628(0x1e8)](_0x47d882)??_0x54b3e4[_0x502628(0x153)](_0x95ddd6,[_0x47d882]));});if(_0xec912[_0x1d0663(0x146)]!==0x1)return;validateGraphShape(_0x516d20,_0xec912[0x0],_0x2b0a11,_0x47b550,_0x54b3e4,_0x53c525,_0x15643a),validateScriptResultReferences(_0x516d20,_0xec912[0x0],_0x47b550,_0x54b3e4,_0x53c525,_0x53a024,_0x15643a),validateApprovalResults(_0x516d20,_0x11d9fe,_0x2b0a11,_0x15643a);}function validateNode(_0x359579,_0x1a4eee,_0x3e07ba){const _0x5d0706=a292_0x48fe81;for(const _0x216bbd of[_0x5d0706(0x177),_0x5d0706(0x116)]){Object[_0x5d0706(0x13e)][_0x5d0706(0x223)][_0x5d0706(0x13d)](_0x359579,_0x216bbd)&&_0x3e07ba[_0x5d0706(0x1e8)]({'path':_0x1a4eee+'.'+_0x216bbd,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES['has'](_0x359579['type']))return;(typeof _0x359579['name']!==_0x5d0706(0x106)||_0x359579[_0x5d0706(0x1a9)][_0x5d0706(0x181)]()==='')&&_0x3e07ba[_0x5d0706(0x1e8)]({'path':_0x1a4eee+_0x5d0706(0xfc),'message':_0x5d0706(0x123)});_0x359579[_0x5d0706(0x186)]!==undefined&&_0x3e07ba[_0x5d0706(0x1e8)]({'path':_0x1a4eee+_0x5d0706(0x152),'message':_0x5d0706(0x17f)});if(_0x359579[_0x5d0706(0x18a)]!==undefined){if(typeof _0x359579[_0x5d0706(0x18a)]!==_0x5d0706(0x106)||_0x359579[_0x5d0706(0x18a)][_0x5d0706(0x181)]()==='')_0x3e07ba['push']({'path':_0x1a4eee+_0x5d0706(0xd2),'message':_0x5d0706(0x147)});else _0x359579['type']!==_0x5d0706(0x15d)&&_0x359579[_0x5d0706(0x168)]!==_0x5d0706(0x15a)&&_0x3e07ba[_0x5d0706(0x1e8)]({'path':_0x1a4eee+_0x5d0706(0xd2),'message':_0x5d0706(0xd8)});}const _0x154336=_0x359579[_0x5d0706(0x1ed)];if(!isRecord(_0x154336))_0x3e07ba[_0x5d0706(0x1e8)]({'path':_0x1a4eee+'.position','message':_0x5d0706(0x1bb)});else for(const _0x708f5e of['x','y']){const _0x35c136=_0x154336[_0x708f5e];(typeof _0x35c136!==_0x5d0706(0xe7)||!Number[_0x5d0706(0x18b)](_0x35c136)||_0x35c136<0x0)&&_0x3e07ba['push']({'path':_0x1a4eee+_0x5d0706(0x169)+_0x708f5e,'message':'position.'+_0x708f5e+'\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.'});}if(_0x359579[_0x5d0706(0x168)]===_0x5d0706(0x15d)){const _0x421ea0=_0x359579['approvalMode']??_0x5d0706(0x112),_0x20c958=_0x359579[_0x5d0706(0x201)]??_0x5d0706(0x15d);!APPROVAL_TASK_MODES['has'](_0x20c958)&&_0x3e07ba[_0x5d0706(0x1e8)]({'path':_0x1a4eee+'.taskMode','message':_0x5d0706(0xce)+String(_0x20c958)+'.'});!APPROVAL_MODES[_0x5d0706(0x1ae)](_0x421ea0)&&_0x3e07ba['push']({'path':_0x1a4eee+_0x5d0706(0x19b),'message':_0x5d0706(0x1b3)+String(_0x421ea0)+'.'});if(!isRecord(_0x359579[_0x5d0706(0x1a0)]))_0x3e07ba[_0x5d0706(0x1e8)]({'path':_0x1a4eee+_0x5d0706(0x131),'message':'APPROVAL\x20node\x20requires\x20assignee.'});else{const _0x1395ba=_0x359579[_0x5d0706(0x1a0)]['strategy'];_0x1395ba!==_0x5d0706(0x1cf)&&_0x1395ba!==_0x5d0706(0x12c)&&_0x3e07ba[_0x5d0706(0x1e8)]({'path':_0x1a4eee+_0x5d0706(0xe4),'message':_0x5d0706(0x13c)});if(_0x1395ba==='FIXED'){const _0x22b66d=_0x359579[_0x5d0706(0x1a0)][_0x5d0706(0x21b)];if(!Array[_0x5d0706(0x16b)](_0x22b66d)||_0x22b66d['length']===0x0)_0x3e07ba[_0x5d0706(0x1e8)]({'path':_0x1a4eee+_0x5d0706(0x1f3),'message':_0x5d0706(0x18c)});else{const _0x34c43b=_0x22b66d[_0x5d0706(0x118)](_0x463cf5=>!isValidUserId(_0x463cf5));_0x34c43b>=0x0&&_0x3e07ba[_0x5d0706(0x1e8)]({'path':_0x1a4eee+'.assignee.userIds['+_0x34c43b+']','message':'fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.'});const _0x56d1ef=new Set(_0x22b66d['filter'](isValidUserId)[_0x5d0706(0x221)](_0x12a9e7=>String(_0x12a9e7)[_0x5d0706(0x181)]()));_0x421ea0===_0x5d0706(0x112)&&_0x56d1ef[_0x5d0706(0x14a)]>0x1&&_0x3e07ba[_0x5d0706(0x1e8)]({'path':_0x1a4eee+_0x5d0706(0x1f3),'message':'SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.'});}}if(_0x1395ba===_0x5d0706(0x12c)){const _0x55babd=_0x359579[_0x5d0706(0x1a0)][_0x5d0706(0x189)],_0x1698c9=typeof _0x55babd===_0x5d0706(0xe7)||typeof _0x55babd===_0x5d0706(0x106)?Number(String(_0x55babd)[_0x5d0706(0x181)]()):Number[_0x5d0706(0x149)];(!Number[_0x5d0706(0x1d0)](_0x1698c9)||_0x1698c9<=0x0)&&_0x3e07ba[_0x5d0706(0x1e8)]({'path':_0x1a4eee+_0x5d0706(0x1e5),'message':'ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.'});}}if(_0x359579['transferCandidates']!==undefined){if(!isRecord(_0x359579[_0x5d0706(0x104)]))_0x3e07ba[_0x5d0706(0x1e8)]({'path':_0x1a4eee+'.transferCandidates','message':_0x5d0706(0x172)});else{if(_0x359579[_0x5d0706(0x104)][_0x5d0706(0x174)]!=='FIXED')_0x3e07ba['push']({'path':_0x1a4eee+'.transferCandidates.strategy','message':_0x5d0706(0xd3)});else{const _0x2b3105=_0x359579[_0x5d0706(0x104)][_0x5d0706(0x21b)];if(!Array[_0x5d0706(0x16b)](_0x2b3105)||_0x2b3105['length']===0x0)_0x3e07ba[_0x5d0706(0x1e8)]({'path':_0x1a4eee+_0x5d0706(0x203),'message':'FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.'});else{const _0x4979af=_0x2b3105[_0x5d0706(0x118)](_0x2cfed2=>!isValidUserId(_0x2cfed2));_0x4979af>=0x0&&_0x3e07ba[_0x5d0706(0x1e8)]({'path':_0x1a4eee+_0x5d0706(0x128)+_0x4979af+']','message':_0x5d0706(0x11b)});}}}}}_0x359579['sequential']!==undefined&&typeof _0x359579['sequential']!=='boolean'&&_0x3e07ba[_0x5d0706(0x1e8)]({'path':_0x1a4eee+_0x5d0706(0x175),'message':'sequential\x20must\x20be\x20a\x20boolean.'});if(_0x359579[_0x5d0706(0x168)]===_0x5d0706(0x179)){(typeof _0x359579['scriptName']!==_0x5d0706(0x106)||_0x359579[_0x5d0706(0x1bc)]['trim']()==='')&&_0x3e07ba['push']({'path':_0x1a4eee+_0x5d0706(0x1bd),'message':'SCRIPT\x20node\x20requires\x20scriptName.'});if(_0x359579[_0x5d0706(0x10e)]!==undefined){if(typeof _0x359579[_0x5d0706(0x10e)]!=='string'||!VARIABLE_PATTERN[_0x5d0706(0x14f)](_0x359579[_0x5d0706(0x10e)]))_0x3e07ba[_0x5d0706(0x1e8)]({'path':_0x1a4eee+_0x5d0706(0xee),'message':_0x5d0706(0x107)});else(RESERVED_RESULT_VARIABLES[_0x5d0706(0x1ae)](_0x359579['resultVariable'])||_0x359579[_0x5d0706(0x10e)][_0x5d0706(0xd7)](_0x5d0706(0x1bf)))&&_0x3e07ba[_0x5d0706(0x1e8)]({'path':_0x1a4eee+_0x5d0706(0xee),'message':'Reserved\x20resultVariable:\x20'+_0x359579[_0x5d0706(0x10e)]+'.'});}}validateAsyncExecution(_0x359579,_0x1a4eee,_0x3e07ba),validateApprovalTimeout(_0x359579,_0x1a4eee,_0x3e07ba),validateCcConfig(_0x359579,_0x1a4eee,_0x3e07ba),_0x359579[_0x5d0706(0x168)]==='NOTIFICATION'&&validateNotificationConfig(_0x359579[_0x5d0706(0x193)],_0x1a4eee+'.config',_0x3e07ba);}function validateAsyncExecution(_0x1c1486,_0x1c9edc,_0x462c28){const _0x38298b=a292_0x48fe81;if(_0x1c1486[_0x38298b(0xf3)]===undefined)return;if(!isRecord(_0x1c1486[_0x38298b(0xf3)])){_0x462c28[_0x38298b(0x1e8)]({'path':_0x1c9edc+_0x38298b(0x16c),'message':_0x38298b(0x206)});return;}if(_0x1c1486[_0x38298b(0xf3)][_0x38298b(0xda)]!==undefined&&typeof _0x1c1486['async'][_0x38298b(0xda)]!==_0x38298b(0x1be)){_0x462c28[_0x38298b(0x1e8)]({'path':_0x1c9edc+_0x38298b(0xdf),'message':_0x38298b(0xdc)});return;}if(_0x1c1486[_0x38298b(0xf3)]['enabled']!==!![])return;_0x1c1486['type']!==_0x38298b(0x179)&&_0x462c28[_0x38298b(0x1e8)]({'path':_0x1c9edc+'.async','message':_0x38298b(0x161)});const _0x2fb98c=_0x1c1486['async']['retryCount']??0x3;(!Number[_0x38298b(0x103)](_0x2fb98c)||_0x2fb98c<0x1||_0x2fb98c>MAX_ASYNC_RETRY_COUNT)&&_0x462c28[_0x38298b(0x1e8)]({'path':_0x1c9edc+_0x38298b(0xd4),'message':_0x38298b(0x1b8)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x1c1486[_0x38298b(0xf3)][_0x38298b(0x12e)]!==undefined&&validateTimeAmount(_0x1c1486[_0x38298b(0xf3)][_0x38298b(0x12e)],_0x1c9edc+_0x38298b(0x14d),_0x462c28);}function validateApprovalTimeout(_0x23e4e2,_0x50e5cb,_0xbe91bf){const _0x161a9a=a292_0x48fe81;if(_0x23e4e2['timeout']===undefined)return;if(!isRecord(_0x23e4e2[_0x161a9a(0x12a)])){_0xbe91bf[_0x161a9a(0x1e8)]({'path':_0x50e5cb+'.timeout','message':_0x161a9a(0x133)});return;}if(_0x23e4e2['timeout'][_0x161a9a(0xda)]!==undefined&&typeof _0x23e4e2[_0x161a9a(0x12a)][_0x161a9a(0xda)]!=='boolean'){_0xbe91bf[_0x161a9a(0x1e8)]({'path':_0x50e5cb+_0x161a9a(0xe9),'message':_0x161a9a(0x15c)});return;}if(_0x23e4e2[_0x161a9a(0x12a)][_0x161a9a(0xda)]!==!![])return;if(_0x23e4e2['timeout'][_0x161a9a(0x1fa)]!==undefined&&typeof _0x23e4e2['timeout'][_0x161a9a(0x1fa)]!==_0x161a9a(0x1be)){_0xbe91bf['push']({'path':_0x50e5cb+'.timeout.interrupting','message':_0x161a9a(0xf2)});return;}_0x23e4e2[_0x161a9a(0x168)]!==_0x161a9a(0x15d)&&_0xbe91bf[_0x161a9a(0x1e8)]({'path':_0x50e5cb+_0x161a9a(0x215),'message':'timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.'});validateTimeAmount(_0x23e4e2[_0x161a9a(0x12a)][_0x161a9a(0x1b0)],_0x50e5cb+_0x161a9a(0x1d3),_0xbe91bf);const _0x1c1019=_0x23e4e2[_0x161a9a(0x12a)]['action'];if(!APPROVAL_TIMEOUT_ACTIONS['has'](_0x1c1019)){_0xbe91bf[_0x161a9a(0x1e8)]({'path':_0x50e5cb+_0x161a9a(0x178),'message':_0x161a9a(0xf9)});return;}(_0x23e4e2[_0x161a9a(0x201)]??_0x161a9a(0x15d))===_0x161a9a(0x12d)&&_0x1c1019!==_0x161a9a(0x1c4)&&_0xbe91bf[_0x161a9a(0x1e8)]({'path':_0x50e5cb+_0x161a9a(0x178),'message':_0x161a9a(0xe0)});const _0x330902=_0x23e4e2[_0x161a9a(0x12a)][_0x161a9a(0x1fa)]??_0x1c1019!==_0x161a9a(0x1c4);if(_0x1c1019==='EXECUTE_BFF')_0x330902&&_0xbe91bf['push']({'path':_0x50e5cb+_0x161a9a(0x1f0),'message':'EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.'}),(typeof _0x23e4e2[_0x161a9a(0x12a)][_0x161a9a(0x1bc)]!==_0x161a9a(0x106)||_0x23e4e2[_0x161a9a(0x12a)][_0x161a9a(0x1bc)]['trim']()==='')&&_0xbe91bf[_0x161a9a(0x1e8)]({'path':_0x50e5cb+_0x161a9a(0xd6),'message':_0x161a9a(0x1e1)}),validateOptionalResultVariable(_0x23e4e2[_0x161a9a(0x12a)]['resultVariable'],_0x50e5cb+_0x161a9a(0xdb),_0xbe91bf);else!_0x330902&&_0xbe91bf[_0x161a9a(0x1e8)]({'path':_0x50e5cb+_0x161a9a(0x1f0),'message':_0x1c1019+'\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.'});}function validateTimeAmount(_0x261874,_0x27bcd9,_0x472585){const _0xf36b7e=a292_0x48fe81;if(!isRecord(_0x261874)){_0x472585[_0xf36b7e(0x1e8)]({'path':_0x27bcd9,'message':_0xf36b7e(0x182)});return;}(!Number[_0xf36b7e(0x103)](_0x261874['value'])||Number(_0x261874[_0xf36b7e(0x109)])<=0x0)&&_0x472585[_0xf36b7e(0x1e8)]({'path':_0x27bcd9+_0xf36b7e(0x1e7),'message':_0xf36b7e(0x1af)}),!FLOW_TIME_UNITS[_0xf36b7e(0x1ae)](_0x261874[_0xf36b7e(0xfa)])&&_0x472585['push']({'path':_0x27bcd9+'.unit','message':'duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.'});}function validateOptionalResultVariable(_0x5140d3,_0x1cc2ad,_0x3d2d83){const _0x1b6580=a292_0x48fe81;if(_0x5140d3===undefined||_0x5140d3===null||_0x5140d3==='')return;if(typeof _0x5140d3!=='string'||!VARIABLE_PATTERN[_0x1b6580(0x14f)](_0x5140d3))_0x3d2d83[_0x1b6580(0x1e8)]({'path':_0x1cc2ad,'message':_0x1b6580(0x107)});else(RESERVED_RESULT_VARIABLES['has'](_0x5140d3)||_0x5140d3[_0x1b6580(0xd7)](_0x1b6580(0x1bf)))&&_0x3d2d83[_0x1b6580(0x1e8)]({'path':_0x1cc2ad,'message':_0x1b6580(0x18f)+_0x5140d3+'.'});}function validateCcConfig(_0x2f2c16,_0x342bfe,_0x5b64ab){const _0x1e43c5=a292_0x48fe81;if(_0x2f2c16['cc']===undefined)return;if(!isRecord(_0x2f2c16['cc'])){_0x5b64ab[_0x1e43c5(0x1e8)]({'path':_0x342bfe+'.cc','message':_0x1e43c5(0x187)});return;}_0x2f2c16[_0x1e43c5(0x168)]!==_0x1e43c5(0x15a)&&_0x2f2c16[_0x1e43c5(0x168)]!=='APPROVAL'&&_0x5b64ab[_0x1e43c5(0x1e8)]({'path':_0x342bfe+_0x1e43c5(0x16a),'message':_0x1e43c5(0x1ac)});Object[_0x1e43c5(0x13e)][_0x1e43c5(0x223)][_0x1e43c5(0x13d)](_0x2f2c16['cc'],'readSources')&&_0x5b64ab[_0x1e43c5(0x1e8)]({'path':_0x342bfe+'.cc.readSources','message':UNSUPPORTED_FORM_MESSAGE});const _0x599008=_0x2f2c16['cc'][_0x1e43c5(0x1fe)];if(!Array[_0x1e43c5(0x16b)](_0x599008)||_0x599008[_0x1e43c5(0x146)]===0x0)_0x5b64ab[_0x1e43c5(0x1e8)]({'path':_0x342bfe+_0x1e43c5(0x1b4),'message':_0x1e43c5(0x1f2)});else{_0x599008['length']>MAX_CC_RECIPIENTS&&_0x5b64ab[_0x1e43c5(0x1e8)]({'path':_0x342bfe+_0x1e43c5(0x1b4),'message':'cc.recipientUserIds\x20supports\x20at\x20most\x20'+MAX_CC_RECIPIENTS+_0x1e43c5(0x225)});const _0x36c2e2=new Set();_0x599008['forEach']((_0x465cd1,_0x52bdc0)=>{const _0x1e2ba5=_0x1e43c5;if(typeof _0x465cd1!=='string'||_0x465cd1[_0x1e2ba5(0x181)]()==='')_0x5b64ab['push']({'path':_0x342bfe+'.cc.recipientUserIds['+_0x52bdc0+']','message':_0x1e2ba5(0x196)});else _0x36c2e2[_0x1e2ba5(0x1ae)](_0x465cd1[_0x1e2ba5(0x181)]())?_0x5b64ab['push']({'path':_0x342bfe+'.cc.recipientUserIds['+_0x52bdc0+']','message':'Duplicate\x20cc\x20recipient\x20userId:\x20'+_0x465cd1[_0x1e2ba5(0x181)]()+'.'}):_0x36c2e2['add'](_0x465cd1[_0x1e2ba5(0x181)]());});}validateStringArray(_0x2f2c16['cc'][_0x1e43c5(0x18d)],_0x342bfe+_0x1e43c5(0x158),_0x5b64ab);}function validateStringArray(_0x117238,_0x17981,_0x1fa4c2){const _0x4e8cab=a292_0x48fe81;if(_0x117238===undefined)return;if(!Array[_0x4e8cab(0x16b)](_0x117238)){_0x1fa4c2[_0x4e8cab(0x1e8)]({'path':_0x17981,'message':_0x4e8cab(0x1e0)});return;}const _0x131c15=new Set();_0x117238[_0x4e8cab(0x14b)]((_0x351647,_0x380f0)=>{const _0x2838c6=_0x4e8cab;if(typeof _0x351647!==_0x2838c6(0x106)||_0x351647['trim']()==='')_0x1fa4c2[_0x2838c6(0x1e8)]({'path':_0x17981+'['+_0x380f0+']','message':_0x2838c6(0xf6)});else _0x131c15['has'](_0x351647[_0x2838c6(0x181)]())?_0x1fa4c2[_0x2838c6(0x1e8)]({'path':_0x17981+'['+_0x380f0+']','message':_0x2838c6(0x1dc)+_0x351647[_0x2838c6(0x181)]()+'.'}):_0x131c15['add'](_0x351647[_0x2838c6(0x181)]());});}function validateNotificationConfig(_0x48b442,_0x534a96,_0x5bd6d0){const _0x5aa31d=a292_0x48fe81;if(!isRecord(_0x48b442)){_0x5bd6d0['push']({'path':_0x534a96,'message':_0x5aa31d(0x22d)});return;}if(_0x48b442[_0x5aa31d(0x132)]!==undefined&&_0x48b442[_0x5aa31d(0x132)]!==null){if(typeof _0x48b442[_0x5aa31d(0x132)]!=='string')_0x5bd6d0['push']({'path':_0x534a96+_0x5aa31d(0x22a),'message':_0x5aa31d(0x10c)});else _0x48b442['version'][_0x5aa31d(0x181)]()&&_0x48b442[_0x5aa31d(0x132)][_0x5aa31d(0x181)]()!=='v1'&&_0x5bd6d0['push']({'path':_0x534a96+_0x5aa31d(0x22a),'message':_0x5aa31d(0x1d6)+_0x48b442['version']+'.'});}const _0x5daacb=requireNotificationString(_0x48b442[_0x5aa31d(0x1c2)],_0x534a96+_0x5aa31d(0x22b),_0x5aa31d(0x13a),_0x5bd6d0);_0x5daacb?.['includes']('${')&&_0x5bd6d0[_0x5aa31d(0x1e8)]({'path':_0x534a96+_0x5aa31d(0x22b),'message':_0x5aa31d(0x204)});if(_0x48b442[_0x5aa31d(0x150)]!==undefined&&_0x48b442['failurePolicy']!==null){if(typeof _0x48b442[_0x5aa31d(0x150)]!==_0x5aa31d(0x106))_0x5bd6d0['push']({'path':_0x534a96+_0x5aa31d(0x212),'message':'failurePolicy\x20must\x20be\x20a\x20string.'});else!NOTIFICATION_FAILURE_POLICIES[_0x5aa31d(0x1ae)](_0x48b442['failurePolicy'][_0x5aa31d(0x181)]()['toUpperCase']())&&_0x5bd6d0[_0x5aa31d(0x1e8)]({'path':_0x534a96+_0x5aa31d(0x212),'message':_0x5aa31d(0x1ba)});}!isRecord(_0x48b442['template'])?_0x5bd6d0['push']({'path':_0x534a96+_0x5aa31d(0x159),'message':_0x5aa31d(0x1eb)}):validateNotificationTemplate(_0x48b442[_0x5aa31d(0x183)],_0x534a96+_0x5aa31d(0x159),_0x5bd6d0),validateNotificationRecipients(_0x48b442[_0x5aa31d(0x114)],_0x534a96+_0x5aa31d(0x190),_0x5bd6d0);}function a292_0x308c(_0x4430b1,_0x5787a4){_0x4430b1=_0x4430b1-0xce;const _0x1ee769=a292_0x1ee7();let _0x308c7d=_0x1ee769[_0x4430b1];return _0x308c7d;}function validateNotificationTemplate(_0x59443d,_0x45a011,_0x1dc699){const _0x2336d4=a292_0x48fe81;for(const _0x4ab0af of['title',_0x2336d4(0x1e3)]){const _0x3c879c=requireNotificationString(_0x59443d[_0x4ab0af],_0x45a011+'.'+_0x4ab0af,'Notification\x20template.'+_0x4ab0af+_0x2336d4(0x1c5),_0x1dc699);if(_0x3c879c)validateNotificationPlaceholders(_0x3c879c,_0x45a011+'.'+_0x4ab0af,_0x1dc699);}_0x59443d['detailMarkdown']!==undefined&&_0x59443d[_0x2336d4(0x1ce)]!==null&&(typeof _0x59443d['detailMarkdown']!==_0x2336d4(0x106)?_0x1dc699[_0x2336d4(0x1e8)]({'path':_0x45a011+_0x2336d4(0x226),'message':'Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.'}):validateNotificationPlaceholders(_0x59443d[_0x2336d4(0x1ce)],_0x45a011+_0x2336d4(0x226),_0x1dc699)),validateNotificationFacts(_0x59443d[_0x2336d4(0x211)],_0x45a011+_0x2336d4(0x20f),_0x1dc699),validateNotificationActions(_0x59443d[_0x2336d4(0x1d2)],_0x45a011+_0x2336d4(0x12b),_0x1dc699);}function validateNotificationFacts(_0x30ef23,_0x55fd62,_0x560f8f){const _0x290de5=a292_0x48fe81;if(_0x30ef23===undefined||_0x30ef23===null)return;if(!Array[_0x290de5(0x16b)](_0x30ef23)){_0x560f8f[_0x290de5(0x1e8)]({'path':_0x55fd62,'message':'Notification\x20template.facts\x20must\x20be\x20an\x20array.'});return;}_0x30ef23[_0x290de5(0x146)]>MAX_NOTIFICATION_FACTS&&_0x560f8f[_0x290de5(0x1e8)]({'path':_0x55fd62,'message':_0x290de5(0x180)+MAX_NOTIFICATION_FACTS+_0x290de5(0x19c)}),_0x30ef23[_0x290de5(0x14b)]((_0x3c289a,_0x28d698)=>{const _0x4caecf=_0x290de5,_0x3ef75f=_0x55fd62+'['+_0x28d698+']';if(!isRecord(_0x3c289a)){_0x560f8f[_0x4caecf(0x1e8)]({'path':_0x3ef75f,'message':_0x4caecf(0x1a8)});return;}for(const _0x351948 of[_0x4caecf(0xf0),_0x4caecf(0x109)]){const _0x33a3ce=requireNotificationString(_0x3c289a[_0x351948],_0x3ef75f+'.'+_0x351948,_0x4caecf(0x200)+_0x351948+_0x4caecf(0x1c5),_0x560f8f);_0x33a3ce&&validateNotificationPlaceholders(_0x33a3ce,_0x3ef75f+'.'+_0x351948,_0x560f8f);}});}function validateNotificationActions(_0x11ad41,_0x5bb27f,_0x2f9c14){const _0x21a175=a292_0x48fe81;if(_0x11ad41===undefined||_0x11ad41===null)return;if(!Array[_0x21a175(0x16b)](_0x11ad41)){_0x2f9c14[_0x21a175(0x1e8)]({'path':_0x5bb27f,'message':'Notification\x20template.actions\x20must\x20be\x20an\x20array.'});return;}_0x11ad41[_0x21a175(0x146)]>MAX_NOTIFICATION_ACTIONS&&_0x2f9c14[_0x21a175(0x1e8)]({'path':_0x5bb27f,'message':_0x21a175(0x180)+MAX_NOTIFICATION_ACTIONS+_0x21a175(0x1c6)}),_0x11ad41[_0x21a175(0x14b)]((_0x4d47f3,_0x2e7d71)=>{const _0x10a8d2=_0x21a175,_0x16be86=_0x5bb27f+'['+_0x2e7d71+']';if(!isRecord(_0x4d47f3)){_0x2f9c14[_0x10a8d2(0x1e8)]({'path':_0x16be86,'message':_0x10a8d2(0xe5)});return;}const _0x276c67=requireNotificationString(_0x4d47f3[_0x10a8d2(0x115)],_0x16be86+_0x10a8d2(0x119),_0x10a8d2(0x117),_0x2f9c14);if(_0x276c67)validateNotificationPlaceholders(_0x276c67,_0x16be86+_0x10a8d2(0x119),_0x2f9c14);const _0x45b0c8=requireNotificationString(_0x4d47f3[_0x10a8d2(0x113)],_0x16be86+_0x10a8d2(0xe8),_0x10a8d2(0x15b),_0x2f9c14);if(!_0x45b0c8)return;validateNotificationPlaceholders(_0x45b0c8,_0x16be86+_0x10a8d2(0xe8),_0x2f9c14),!/^https?:\/\//i[_0x10a8d2(0x14f)](_0x45b0c8)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x10a8d2(0x14f)](_0x45b0c8)&&_0x2f9c14[_0x10a8d2(0x1e8)]({'path':_0x16be86+_0x10a8d2(0xe8),'message':_0x10a8d2(0x209)});});}function validateNotificationRecipients(_0x1812b9,_0x16ee23,_0x45b8c2){const _0x2f866c=a292_0x48fe81;if(_0x1812b9===undefined||_0x1812b9===null)return;if(!Array[_0x2f866c(0x16b)](_0x1812b9)){_0x45b8c2[_0x2f866c(0x1e8)]({'path':_0x16ee23,'message':_0x2f866c(0x213)});return;}let _0x1c491f=![];_0x1812b9[_0x2f866c(0x14b)]((_0x11cad5,_0x2221dd)=>{const _0xdb5c7d=_0x2f866c,_0x27407c=_0x16ee23+'['+_0x2221dd+']';if(!isRecord(_0x11cad5)){_0x45b8c2['push']({'path':_0x27407c,'message':_0xdb5c7d(0x122)});return;}const _0x57160b=requireNotificationString(_0x11cad5[_0xdb5c7d(0x168)],_0x27407c+_0xdb5c7d(0x1f5),_0xdb5c7d(0x173),_0x45b8c2);_0x57160b&&!NOTIFICATION_RECIPIENT_TYPES['has'](_0x57160b[_0xdb5c7d(0x1ad)]())&&_0x45b8c2['push']({'path':_0x27407c+_0xdb5c7d(0x1f5),'message':_0xdb5c7d(0xd9)});let _0x3ee27d='TO';_0x11cad5[_0xdb5c7d(0x207)]!==undefined&&_0x11cad5[_0xdb5c7d(0x207)]!==null&&(typeof _0x11cad5[_0xdb5c7d(0x207)]!==_0xdb5c7d(0x106)?(_0x45b8c2[_0xdb5c7d(0x1e8)]({'path':_0x27407c+_0xdb5c7d(0x102),'message':'Notification\x20recipient.role\x20must\x20be\x20a\x20string.'}),_0x3ee27d=''):(_0x3ee27d=_0x11cad5[_0xdb5c7d(0x207)][_0xdb5c7d(0x181)]()['toUpperCase'](),!NOTIFICATION_RECIPIENT_ROLES[_0xdb5c7d(0x1ae)](_0x3ee27d)&&_0x45b8c2[_0xdb5c7d(0x1e8)]({'path':_0x27407c+_0xdb5c7d(0x102),'message':_0xdb5c7d(0x1fc)})));if(_0x3ee27d==='TO')_0x1c491f=!![];const _0x4d62ac=requireNotificationString(_0x11cad5[_0xdb5c7d(0x109)],_0x27407c+_0xdb5c7d(0x1e7),_0xdb5c7d(0x1f8),_0x45b8c2);_0x4d62ac&&validateNotificationPlaceholders(_0x4d62ac,_0x27407c+'.value',_0x45b8c2);}),_0x1812b9[_0x2f866c(0x146)]>0x0&&!_0x1c491f&&_0x45b8c2[_0x2f866c(0x1e8)]({'path':_0x16ee23,'message':_0x2f866c(0x1f9)});}function requireNotificationString(_0x453c29,_0x68c5ee,_0x427699,_0x127f84){const _0x241b6f=a292_0x48fe81;if(typeof _0x453c29!=='string'||_0x453c29['trim']()==='')return _0x127f84[_0x241b6f(0x1e8)]({'path':_0x68c5ee,'message':_0x427699}),undefined;return _0x453c29[_0x241b6f(0x181)]();}function validateNotificationPlaceholders(_0x3b9d97,_0x194579,_0x1de974){const _0x2cf701=a292_0x48fe81;for(const _0x3fcd83 of _0x3b9d97[_0x2cf701(0x22c)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x5b7125=_0x3fcd83[0x1]?.['trim']()??'',_0x446325=_0x5b7125[_0x2cf701(0x10f)]('.'),_0x53d4de=_0x446325>=0x0?_0x5b7125[_0x2cf701(0x198)](0x0,_0x446325):_0x5b7125,_0x770ba8=_0x446325>=0x0?_0x5b7125[_0x2cf701(0x198)](_0x446325+0x1)[_0x2cf701(0x181)]():'';(![_0x2cf701(0x21d),_0x2cf701(0x1a4),_0x2cf701(0xcf)][_0x2cf701(0xe2)](_0x53d4de)||_0x770ba8==='')&&_0x1de974[_0x2cf701(0x1e8)]({'path':_0x194579,'message':_0x2cf701(0xe1)+_0x3fcd83[0x0]+'.'});}_0x3b9d97[_0x2cf701(0x16d)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x2cf701(0xe2)]('${')&&_0x1de974['push']({'path':_0x194579,'message':'Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.'});}function validateEdge(_0x17e8ce,_0x51cda6,_0x59d44a){const _0x8216b2=a292_0x48fe81;_0x17e8ce[_0x8216b2(0x1a9)]!==undefined&&typeof _0x17e8ce[_0x8216b2(0x1a9)]!=='string'&&_0x59d44a[_0x8216b2(0x1e8)]({'path':_0x51cda6+'.name','message':_0x8216b2(0x19f)}),_0x17e8ce[_0x8216b2(0x15e)]!==undefined&&typeof _0x17e8ce['defaultFlow']!==_0x8216b2(0x1be)&&_0x59d44a[_0x8216b2(0x1e8)]({'path':_0x51cda6+_0x8216b2(0x19e),'message':'defaultFlow\x20must\x20be\x20a\x20boolean.'}),_0x17e8ce[_0x8216b2(0xfd)]!==undefined&&(!Array[_0x8216b2(0x16b)](_0x17e8ce['waypoints'])?_0x59d44a['push']({'path':_0x51cda6+_0x8216b2(0x1f4),'message':_0x8216b2(0x135)}):_0x17e8ce['waypoints'][_0x8216b2(0x14b)]((_0x1a710c,_0x3d5857)=>{const _0x328174=_0x8216b2;if(!isRecord(_0x1a710c)){_0x59d44a[_0x328174(0x1e8)]({'path':_0x51cda6+'.waypoints['+_0x3d5857+']','message':'waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.'});return;}for(const _0xd2500f of['x','y']){const _0x100c49=_0x1a710c[_0xd2500f];(typeof _0x100c49!==_0x328174(0xe7)||!Number[_0x328174(0x18b)](_0x100c49))&&_0x59d44a['push']({'path':_0x51cda6+'.waypoints['+_0x3d5857+'].'+_0xd2500f,'message':'waypoint.'+_0xd2500f+_0x328174(0x224)});}})),_0x17e8ce['conditionType']!==undefined&&!CONDITION_TYPES[_0x8216b2(0x1ae)](_0x17e8ce[_0x8216b2(0x167)])&&_0x59d44a[_0x8216b2(0x1e8)]({'path':_0x51cda6+'.conditionType','message':_0x8216b2(0x1e2)+String(_0x17e8ce[_0x8216b2(0x167)])+'.'}),_0x17e8ce[_0x8216b2(0x167)]==='EXPRESSION'&&(typeof _0x17e8ce[_0x8216b2(0x11a)]!==_0x8216b2(0x106)||_0x17e8ce[_0x8216b2(0x11a)][_0x8216b2(0x181)]()==='')&&_0x59d44a[_0x8216b2(0x1e8)]({'path':_0x51cda6+_0x8216b2(0x148),'message':'EXPRESSION\x20edge\x20requires\x20expression.'}),_0x17e8ce['defaultFlow']===!![]&&_0x17e8ce['conditionType']!==_0x8216b2(0x1b1)&&_0x59d44a['push']({'path':_0x51cda6+_0x8216b2(0x19e),'message':'A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.'}),_0x17e8ce[_0x8216b2(0x15e)]===!![]&&typeof _0x17e8ce[_0x8216b2(0x11a)]===_0x8216b2(0x106)&&_0x17e8ce['expression'][_0x8216b2(0x181)]()!==''&&_0x59d44a['push']({'path':_0x51cda6+_0x8216b2(0x148),'message':'A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.'});}function validateGraphShape(_0x2aa78f,_0x1d16e2,_0x2a149a,_0x236c6a,_0x1104ef,_0x4769e2,_0x496d85){const _0x498749=a292_0x48fe81;for(const [_0x47d5ea,_0x1a2599]of _0x2aa78f){const _0x59560d=_0x1104ef[_0x498749(0x191)](_0x47d5ea)??[],_0x5d02bf=_0x236c6a[_0x498749(0x191)](_0x47d5ea)??[];_0x1a2599[_0x498749(0x168)]!==_0x498749(0x192)&&_0x59560d[_0x498749(0x146)]===0x0&&_0x496d85[_0x498749(0x1e8)]({'path':_0x498749(0x1d8)+_0x47d5ea,'message':'Node\x20has\x20no\x20incoming\x20edge.'});_0x1a2599[_0x498749(0x168)]!=='END'&&_0x5d02bf[_0x498749(0x146)]===0x0&&_0x496d85[_0x498749(0x1e8)]({'path':_0x498749(0x1d8)+_0x47d5ea,'message':_0x498749(0xdd)});_0x1a2599[_0x498749(0x168)]==='START'&&_0x59560d[_0x498749(0x146)]>0x0&&_0x496d85[_0x498749(0x1e8)]({'path':'flowJson.nodes.'+_0x47d5ea,'message':_0x498749(0x219)});_0x1a2599[_0x498749(0x168)]===_0x498749(0x15a)&&_0x5d02bf[_0x498749(0x146)]>0x0&&_0x496d85[_0x498749(0x1e8)]({'path':_0x498749(0x1d8)+_0x47d5ea,'message':_0x498749(0x163)});if(_0x1a2599[_0x498749(0x168)]===_0x498749(0x13f)){_0x5d02bf[_0x498749(0x146)]<0x2&&_0x496d85[_0x498749(0x1e8)]({'path':_0x498749(0x1d8)+_0x47d5ea,'message':_0x498749(0x143)});const _0x3ba582=_0x5d02bf[_0x498749(0x1de)](_0x4d3035=>_0x4d3035['defaultFlow']===!![]);_0x3ba582[_0x498749(0x146)]!==0x1&&_0x496d85['push']({'path':_0x498749(0x1d8)+_0x47d5ea,'message':_0x498749(0xea)});if(_0x3ba582[_0x498749(0x146)]===0x1){const _0xc0751=_0x3ba582[0x0],_0x57b6aa=_0x4769e2[_0x498749(0x191)](_0xc0751)??'flowJson.edges';_0xc0751[_0x498749(0x167)]!=='ALWAYS'&&_0x496d85['push']({'path':_0x57b6aa+'.conditionType','message':_0x498749(0x228)});_0xc0751['expression']!==undefined&&_0x496d85[_0x498749(0x1e8)]({'path':_0x57b6aa+'.expression','message':_0x498749(0x141)});for(const _0x48c61f of _0x5d02bf){if(_0x48c61f===_0xc0751)continue;const _0x31159a=_0x4769e2[_0x498749(0x191)](_0x48c61f)??'flowJson.edges';if(_0x48c61f['conditionType']!==_0x498749(0x1ab))_0x496d85[_0x498749(0x1e8)]({'path':_0x31159a+_0x498749(0x1ff),'message':_0x498749(0x1ef)});else(typeof _0x48c61f[_0x498749(0x11a)]!=='string'||_0x48c61f[_0x498749(0x11a)][_0x498749(0x181)]()==='')&&_0x496d85[_0x498749(0x1e8)]({'path':_0x31159a+_0x498749(0x148),'message':'CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.'});}}}if(_0x1a2599[_0x498749(0x168)]===_0x498749(0x15d)&&(_0x1a2599[_0x498749(0x201)]??_0x498749(0x15d))===_0x498749(0x12d)){if(_0x5d02bf[_0x498749(0x146)]!==0x1)_0x496d85['push']({'path':_0x498749(0x1d8)+_0x47d5ea,'message':_0x498749(0x1d1)});else{const _0x375a5c=_0x5d02bf[0x0];((_0x375a5c[_0x498749(0x167)]??'ALWAYS')!==_0x498749(0x1b1)||_0x375a5c[_0x498749(0x15e)]===!![]||typeof _0x375a5c[_0x498749(0x11a)]===_0x498749(0x106)&&_0x375a5c[_0x498749(0x11a)]['trim']()!=='')&&_0x496d85[_0x498749(0x1e8)]({'path':_0x4769e2[_0x498749(0x191)](_0x375a5c)??_0x498749(0x126),'message':'HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.'});}}else{if(_0x1a2599[_0x498749(0x168)]==='APPROVAL'){const _0x1e62b7=_0x5d02bf[_0x498749(0x221)](_0xf1fa3d=>_0xf1fa3d['conditionType']??'ALWAYS'),_0x290c89=_0x1e62b7['filter'](_0x39c3ff=>_0x39c3ff!==_0x498749(0x1d7)&&_0x39c3ff!==_0x498749(0x1c3));_0x290c89[_0x498749(0x146)]>0x0&&_0x496d85['push']({'path':_0x498749(0x1d8)+_0x47d5ea,'message':_0x498749(0x13b)}),_0x1e62b7['filter'](_0x6d6959=>_0x6d6959===_0x498749(0x1d7))['length']!==0x1&&_0x496d85[_0x498749(0x1e8)]({'path':_0x498749(0x1d8)+_0x47d5ea,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.'}),_0x1e62b7[_0x498749(0x1de)](_0x337cac=>_0x337cac===_0x498749(0x1c3))[_0x498749(0x146)]!==0x1&&_0x496d85[_0x498749(0x1e8)]({'path':_0x498749(0x1d8)+_0x47d5ea,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.'}),_0x5d02bf[_0x498749(0x10b)](_0x10f96a=>_0x10f96a[_0x498749(0x15e)]===!![])&&_0x496d85[_0x498749(0x1e8)]({'path':_0x498749(0x1d8)+_0x47d5ea,'message':_0x498749(0x21f)});}}}const _0x50ff21=new Set(),_0x3da3ea=_0x2d7cbd=>{const _0x5dc087=_0x498749;if(_0x50ff21[_0x5dc087(0x1ae)](_0x2d7cbd))return;_0x50ff21['add'](_0x2d7cbd);for(const _0x4a7d31 of _0x236c6a[_0x5dc087(0x191)](_0x2d7cbd)??[]){const _0x2fafbb=resolveEdgeEndpoint(_0x4a7d31[_0x5dc087(0xfe)],_0x4a7d31['targetNodeId']);if(_0x2fafbb&&_0x2aa78f[_0x5dc087(0x1ae)](_0x2fafbb))_0x3da3ea(_0x2fafbb);}};_0x3da3ea(_0x1d16e2);for(const _0x1a425a of _0x2aa78f[_0x498749(0x210)]()){!_0x50ff21['has'](_0x1a425a)&&_0x496d85[_0x498749(0x1e8)]({'path':_0x498749(0x1d8)+_0x1a425a,'message':_0x498749(0x145)});}const _0x31c381=_0x2a149a[_0x498749(0x10b)](_0x28f62d=>_0x50ff21[_0x498749(0x1ae)](_0x28f62d));if(!_0x31c381){_0x496d85[_0x498749(0x1e8)]({'path':_0x498749(0x126),'message':'No\x20END\x20node\x20is\x20reachable\x20from\x20START.'});return;}const _0x2d5984=new Set(),_0x18911d=_0x5c18ef=>{const _0x30ec8f=_0x498749;if(_0x2d5984[_0x30ec8f(0x1ae)](_0x5c18ef))return;_0x2d5984[_0x30ec8f(0x14e)](_0x5c18ef);for(const _0x39ec66 of _0x1104ef[_0x30ec8f(0x191)](_0x5c18ef)??[]){const _0x52eb71=resolveEdgeEndpoint(_0x39ec66['source'],_0x39ec66['sourceNodeId']);if(_0x52eb71&&_0x2aa78f[_0x30ec8f(0x1ae)](_0x52eb71))_0x18911d(_0x52eb71);}};for(const _0x3c6654 of _0x2a149a){if(_0x2aa78f[_0x498749(0x1ae)](_0x3c6654))_0x18911d(_0x3c6654);}for(const _0xb7ed22 of _0x50ff21){!_0x2d5984['has'](_0xb7ed22)&&_0x496d85[_0x498749(0x1e8)]({'path':_0x498749(0x1d8)+_0xb7ed22,'message':_0x498749(0x1db)});}}function validateApprovalResults(_0xafa5d3,_0x52ba87,_0xf541fa,_0x15a291){const _0x55fdba=a292_0x48fe81;if(_0x52ba87===0x0)return;const _0x3c108f=new Set(_0xf541fa[_0x55fdba(0x221)](_0xaf4518=>_0xafa5d3[_0x55fdba(0x191)](_0xaf4518)?.[_0x55fdba(0x1aa)])[_0x55fdba(0x1de)](_0xff516a=>typeof _0xff516a===_0x55fdba(0x106)));for(const _0x4aa047 of[_0x55fdba(0x1d7),_0x55fdba(0x1c3)]){!_0x3c108f[_0x55fdba(0x1ae)](_0x4aa047)&&_0x15a291[_0x55fdba(0x1e8)]({'path':_0x55fdba(0x125),'message':_0x55fdba(0x229)+_0x4aa047+'.'});}}function validateScriptResultReferences(_0x3a392e,_0x24ee8e,_0x10e4bb,_0x1038b4,_0x50aa70,_0xabb118,_0x5b3c1c){const _0xfe2c19=a292_0x48fe81;if(_0xabb118[_0xfe2c19(0x14a)]===0x0)return;const _0x3a8682=new Set(),_0x14dc76=_0x571294=>{const _0x4705ca=_0xfe2c19;if(!_0x3a8682[_0x4705ca(0x1ae)](_0x571294)&&_0x3a392e[_0x4705ca(0x1ae)](_0x571294)){_0x3a8682[_0x4705ca(0x14e)](_0x571294);for(const _0x6d33e1 of _0x10e4bb[_0x4705ca(0x191)](_0x571294)??[]){const _0x6cf5dd=resolveEdgeEndpoint(_0x6d33e1[_0x4705ca(0xfe)],_0x6d33e1[_0x4705ca(0x142)]);if(_0x6cf5dd)_0x14dc76(_0x6cf5dd);}}};_0x14dc76(_0x24ee8e);const _0x1bfb45=new Map();for(const _0x277701 of _0x3a8682){_0x1bfb45['set'](_0x277701,_0x277701===_0x24ee8e?new Set([_0x24ee8e]):new Set(_0x3a8682));}let _0x396ada=!![];while(_0x396ada){_0x396ada=![];for(const _0x3bc1ed of _0x3a8682){if(_0x3bc1ed===_0x24ee8e)continue;const _0x469435=(_0x1038b4[_0xfe2c19(0x191)](_0x3bc1ed)??[])[_0xfe2c19(0x221)](_0x2efab6=>resolveEdgeEndpoint(_0x2efab6[_0xfe2c19(0x1c1)],_0x2efab6[_0xfe2c19(0x1ee)]))[_0xfe2c19(0x1de)](_0x3456da=>Boolean(_0x3456da&&_0x3a8682['has'](_0x3456da)));if(_0x469435[_0xfe2c19(0x146)]===0x0)continue;const _0x4d9a29=new Set(_0x1bfb45[_0xfe2c19(0x191)](_0x469435[0x0])??[]);for(const _0x5311fe of _0x469435[_0xfe2c19(0x198)](0x1)){const _0x336ef7=_0x1bfb45[_0xfe2c19(0x191)](_0x5311fe)??new Set();for(const _0x902201 of _0x4d9a29){if(!_0x336ef7[_0xfe2c19(0x1ae)](_0x902201))_0x4d9a29[_0xfe2c19(0x160)](_0x902201);}}_0x4d9a29[_0xfe2c19(0x14e)](_0x3bc1ed);const _0x47becc=_0x1bfb45[_0xfe2c19(0x191)](_0x3bc1ed);!setsEqual(_0x47becc,_0x4d9a29)&&(_0x1bfb45['set'](_0x3bc1ed,_0x4d9a29),_0x396ada=!![]);}}for(const [_0x2e00dc,_0x438aee]of _0x10e4bb){const _0x5a0f17=_0x1bfb45[_0xfe2c19(0x191)](_0x2e00dc);if(!_0x5a0f17)continue;for(const _0x39db83 of _0x438aee){if(_0x39db83[_0xfe2c19(0x167)]!==_0xfe2c19(0x1ab)||typeof _0x39db83[_0xfe2c19(0x11a)]!=='string')continue;for(const [_0x3c3894,_0x20ac7a]of _0xabb118){expressionReferencesVariable(_0x39db83['expression'],_0x3c3894)&&!_0x5a0f17[_0xfe2c19(0x1ae)](_0x20ac7a)&&_0x5b3c1c['push']({'path':(_0x50aa70[_0xfe2c19(0x191)](_0x39db83)??_0xfe2c19(0x126))+_0xfe2c19(0x148),'message':_0xfe2c19(0x194)+_0x3c3894+_0xfe2c19(0x120)+_0x20ac7a+_0xfe2c19(0x17a)+_0x2e00dc+'.'});}}}}function expressionReferencesVariable(_0x530da2,_0x29742a){const _0xda40c8=a292_0x48fe81;let _0x30c00b=0x0;while(_0x30c00b<_0x530da2[_0xda40c8(0x146)]){const _0x8084bf=_0x530da2[_0x30c00b];if(_0x8084bf==='\x27'||_0x8084bf==='\x22'){_0x30c00b=skipQuotedExpressionSegment(_0x530da2,_0x30c00b,_0x8084bf);continue;}if(!/[A-Za-z_]/[_0xda40c8(0x14f)](_0x8084bf)){_0x30c00b+=0x1;continue;}const _0x693b1=_0x30c00b;_0x30c00b+=0x1;while(_0x30c00b<_0x530da2[_0xda40c8(0x146)]&&/[A-Za-z0-9_]/[_0xda40c8(0x14f)](_0x530da2[_0x30c00b])){_0x30c00b+=0x1;}if(_0x530da2['slice'](_0x693b1,_0x30c00b)!==_0x29742a)continue;let _0x1d70b2=_0x693b1-0x1;while(_0x1d70b2>=0x0&&/\s/['test'](_0x530da2[_0x1d70b2])){_0x1d70b2-=0x1;}if(_0x530da2[_0x1d70b2]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x528e3f,_0x468ad7,_0x50a3e5){let _0x3cda9b=_0x468ad7+0x1;while(_0x3cda9b<_0x528e3f['length']){if(_0x528e3f[_0x3cda9b]==='\x5c'){_0x3cda9b+=0x2;continue;}if(_0x528e3f[_0x3cda9b]===_0x50a3e5)return _0x3cda9b+0x1;_0x3cda9b+=0x1;}return _0x3cda9b;}function resolveEffectiveResultVariable(_0x39b19f,_0x5543f7){const _0x5a5938=a292_0x48fe81;if(_0x39b19f===undefined||_0x39b19f===null||_0x5543f7&&_0x39b19f==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x39b19f!==_0x5a5938(0x106)||!VARIABLE_PATTERN[_0x5a5938(0x14f)](_0x39b19f)||RESERVED_RESULT_VARIABLES['has'](_0x39b19f)||_0x39b19f['startsWith'](_0x5a5938(0x1bf)))return undefined;return _0x39b19f;}function registerResultVariableOwner(_0x301cd3,_0x59ea7c,_0x21db76,_0x2d2794){const _0x2e229e=a292_0x48fe81;if(_0x301cd3[_0x2e229e(0x1ae)](_0x59ea7c)){_0x2d2794[_0x2e229e(0x1e8)]({'path':'flowJson.nodes','message':'Duplicate\x20resultVariable:\x20'+_0x59ea7c+'.'});return;}_0x301cd3[_0x2e229e(0x153)](_0x59ea7c,_0x21db76);}function a292_0x1ee7(){const _0x494cf3=['Unsupported\x20approval\x20mode:\x20','.cc.recipientUserIds','approval_sys_datasetCode','startPath\x20must\x20be\x20a\x20non-empty\x20string.','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','scriptName','.scriptName','boolean','approval_sys_','title','source','configCode','REJECTED','EXECUTE_BFF','\x20is\x20required.','\x20actions.','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','12YhcFOz','templateName','formDefinitions','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','approval_sys_dataId','detailMarkdown','FIXED','isSafeInteger','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','actions','.timeout.duration','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','legacy_field_removed','Unsupported\x20notification\x20version:\x20','APPROVED','flowJson.nodes.','stringify','approval_sys_processInstanceId','Node\x20cannot\x20reach\x20any\x20END.','Duplicate\x20value:\x20','flowJson.startPageId','filter','edge\x20must\x20be\x20an\x20object.','value\x20must\x20be\x20an\x20array.','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','Unsupported\x20condition\x20type:\x20','summary','Rabetbase\x20FlowConfig','.assignee.roleId','formData','.value','push','CUSTOM_PAGE','metadata','NOTIFICATION\x20node\x20requires\x20template.','approval.simple-flow.v1','position','sourceNodeId','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','.timeout.interrupting','approval_sys_pageId','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','.assignee.userIds','.waypoints','.type','schemaVersion','^[1-9][0-9]*$','Notification\x20recipient.value\x20is\x20required.','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','interrupting','__rabetbase_local_validation__','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','https://lovrabet.com/schema/rabetbase-flow-config.json','recipientUserIds','.conditionType','Notification\x20fact.','taskMode','MINUTES','.transferCandidates.userIds','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','\x20->\x20','async\x20must\x20be\x20an\x20object.','role','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','DAYS','USER','Duplicate\x20node\x20id:\x20','flowType','.source','.facts','keys','facts','.failurePolicy','Notification\x20recipients\x20must\x20be\x20an\x20array.','integer','.timeout','appCode','].path','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','#/$defs/position','userIds','object','event','1688155mbdHpt','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','approval_sys_operationType','map','empty_metadata_removed','hasOwnProperty','\x20must\x20be\x20a\x20finite\x20number.','\x20users.','.detailMarkdown','parse','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','.version','.configCode','matchAll','NOTIFICATION\x20node\x20requires\x20config.','Unsupported\x20task\x20mode:\x20','variables','Duplicate\x20edge\x20route:\x20','HOURS','.path','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','.async.retryCount','.id','.timeout.scriptName','startsWith','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','enabled','.timeout.resultVariable','async.enabled\x20must\x20be\x20a\x20boolean.','Node\x20has\x20no\x20outgoing\x20edge.','scriptResult','.async.enabled','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','Unsupported\x20notification\x20placeholder:\x20','includes','CONTINUE','.assignee.strategy','Notification\x20action\x20must\x20be\x20an\x20object.','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','number','.url','.timeout.enabled','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','FAIL','246392jVAdWu','flowJson\x20must\x20be\x20an\x20object.','.resultVariable','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','label','node\x20must\x20be\x20an\x20object.','timeout.interrupting\x20must\x20be\x20a\x20boolean.','async','nodes','].taskMode','value\x20must\x20be\x20a\x20non-empty\x20string.','approval_sys_appCode','Edge\x20target\x20node\x20not\x20found:\x20','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','unit','pageId\x20must\x20be\x20a\x20non-negative\x20integer.','.name','waypoints','target','flowType\x20is\x20required.','catch','approval_sys_initiatorUserId','.role','isInteger','transferCandidates','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','string','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','1qmbjPO','value','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','some','Notification\x20version\x20must\x20be\x20a\x20string.','8080956YkKwAx','resultVariable','indexOf','1370hrHjym','Unsupported\x20flowType:\x20','SINGLE','url','recipients','text','formPermission','Notification\x20action.text\x20is\x20required.','findIndex','.text','expression','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','flowJson.','NOTIFICATION','4194179eGXGeA','flowJson.nodes[',',\x20but\x20node\x20','63621YRdGNA','Notification\x20recipient\x20must\x20be\x20an\x20object.','Every\x20node\x20requires\x20a\x20non-empty\x20name.','ALL','flowJson.nodes','flowJson.edges','edges\x20must\x20be\x20an\x20array.','.transferCandidates.userIds[','flowDesc\x20must\x20be\x20a\x20string.','timeout','.actions','ROLE','HANDLE','retryInterval','AUTO_REJECT','datasetCode\x20must\x20be\x20a\x20string.','.assignee','version','timeout\x20must\x20be\x20an\x20object.','7AICWAy','waypoints\x20must\x20be\x20an\x20array.','.target','^[A-Za-z_][A-Za-z0-9_]*$','pid','SECONDS','Notification\x20configCode\x20is\x20required.','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','call','prototype','CONDITION','flowDesc','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','targetNodeId','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','INDEPENDENT_FLOW','Node\x20is\x20not\x20reachable\x20from\x20START.','length','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','.expression','NaN','size','forEach','\x20was\x20empty\x20and\x20was\x20removed.','.async.retryInterval','add','test','failurePolicy','57jKggGq','.pageId','set','30476Ztoznn','flowCode','Unsupported\x20pageMode:\x20','overwrite','.cc.visible','.template','END','Notification\x20action.url\x20is\x20required.','timeout.enabled\x20must\x20be\x20a\x20boolean.','APPROVAL','defaultFlow','Edge\x20source\x20node\x20not\x20found:\x20','delete','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','flowJson','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','flowName','Duplicate\x20BPMN\x20element\x20id:\x20','utf8','conditionType','type','.position.','.cc','isArray','.async','replace','startPageId','array','flowJson.schemaVersion','edges','transferCandidates\x20must\x20be\x20an\x20object.','Notification\x20recipient.type\x20is\x20required.','strategy','.sequential','datasetCode','form','.timeout.action','SCRIPT','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','EMAIL','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','https://json-schema.org/draft/2020-12/schema','PLATFORM_FORM','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','Notification\x20template\x20supports\x20at\x20most\x20','trim','duration\x20requires\x20value\x20and\x20unit.','template','AUTO_APPROVE','FORM_FLOW','pageId','cc\x20must\x20be\x20an\x20object.','#/$defs/timeAmount','roleId','path','isFinite','FIXED\x20assignee\x20requires\x20userIds.','visible','formPermissions','Reserved\x20resultVariable:\x20','.recipients','get','START','config','Expression\x20references\x20SCRIPT\x20resultVariable\x20','.\x20This\x20CLI\x20supports\x20only\x20','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','approval_sys_initiatorUsername','slice','BCC','ANY','.approvalMode','\x20facts.','flowKey','.defaultFlow','edge\x20name\x20must\x20be\x20a\x20string.','assignee','1307154GbbYcQ','flowJson.edges[','formSchema','context','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','flowJson.pageMode','.tmp','Notification\x20fact\x20must\x20be\x20an\x20object.','name','result','EXPRESSION','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','toUpperCase','has','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','duration','ALWAYS','12HgZrYn'];a292_0x1ee7=function(){return _0x494cf3;};return a292_0x1ee7();}function setsEqual(_0xb6485f,_0x65a93){const _0x5b8695=a292_0x48fe81;return _0xb6485f['size']===_0x65a93[_0x5b8695(0x14a)]&&[..._0xb6485f]['every'](_0x45939d=>_0x65a93[_0x5b8695(0x1ae)](_0x45939d));}function isValidUserId(_0x5cf61d){const _0x21d488=a292_0x48fe81;if(typeof _0x5cf61d==='string')return _0x5cf61d[_0x21d488(0x181)]()[_0x21d488(0x146)]>0x0;return Number[_0x21d488(0x1d0)](_0x5cf61d)&&Number(_0x5cf61d)>0x0;}function resolveEdgeEndpoint(_0x40b728,_0x22a722){const _0xe3fda4=a292_0x48fe81;if(typeof _0x40b728===_0xe3fda4(0x106)&&_0x40b728[_0xe3fda4(0x181)]())return _0x40b728[_0xe3fda4(0x181)]();if(typeof _0x22a722===_0xe3fda4(0x106)&&_0x22a722[_0xe3fda4(0x181)]())return _0x22a722['trim']();return undefined;}function removeEmptyMetadata(_0x48bf74,_0x4bc450,_0x510336,_0x28b86b){const _0x313f11=a292_0x48fe81;if(Array[_0x313f11(0x16b)](_0x48bf74)){_0x48bf74[_0x313f11(0x14b)]((_0x10740f,_0x40b070)=>removeEmptyMetadata(_0x10740f,_0x4bc450+'['+_0x40b070+']',_0x510336,_0x28b86b));return;}if(!isRecord(_0x48bf74))return;for(const [_0xa7e80d,_0x1c61c9]of Object['entries'](_0x48bf74)){const _0x3c6287=_0x4bc450+'.'+_0xa7e80d;if(_0xa7e80d===_0x313f11(0x1ea)&&isEmptyJsonValue(_0x1c61c9)){delete _0x48bf74[_0xa7e80d],_0x28b86b[_0x313f11(0x1e8)](_0x3c6287),_0x510336[_0x313f11(0x1e8)]({'code':_0x313f11(0x222),'path':_0x3c6287,'message':_0x3c6287+_0x313f11(0x14c)});continue;}removeEmptyMetadata(_0x1c61c9,_0x3c6287,_0x510336,_0x28b86b);}}function isEmptyJsonValue(_0x2d4962){const _0x24ac05=a292_0x48fe81;if(_0x2d4962===null||_0x2d4962===undefined)return!![];if(typeof _0x2d4962===_0x24ac05(0x106))return _0x2d4962['trim']()==='';if(Array[_0x24ac05(0x16b)](_0x2d4962))return _0x2d4962[_0x24ac05(0x146)]===0x0;return isRecord(_0x2d4962)&&Object[_0x24ac05(0x210)](_0x2d4962)[_0x24ac05(0x146)]===0x0;}function isRecord(_0x57f536){const _0x3393a3=a292_0x48fe81;return typeof _0x57f536===_0x3393a3(0x21c)&&_0x57f536!==null&&!Array[_0x3393a3(0x16b)](_0x57f536);}function cloneJsonValue(_0x1c79f7){const _0x574b9e=a292_0x48fe81;return JSON[_0x574b9e(0x227)](JSON[_0x574b9e(0x1d9)](_0x1c79f7));}export async function readFlowConfigFile(_0x3d0e5f){const _0x18daef=a292_0x48fe81,_0x189e59=await readFile(resolve(_0x3d0e5f),_0x18daef(0x166));return JSON['parse'](_0x189e59);}
@@ -1 +1 @@
1
- const a288_0x109450=a288_0x448c;(function(_0x18db23,_0x188a22){const _0x158e1f=a288_0x448c,_0x3ed5f6=_0x18db23();while(!![]){try{const _0x13c3cf=parseInt(_0x158e1f(0x200))/0x1+-parseInt(_0x158e1f(0x1d5))/0x2*(-parseInt(_0x158e1f(0x212))/0x3)+-parseInt(_0x158e1f(0x20f))/0x4*(parseInt(_0x158e1f(0x1ea))/0x5)+parseInt(_0x158e1f(0x1f2))/0x6*(-parseInt(_0x158e1f(0x1df))/0x7)+-parseInt(_0x158e1f(0x1d7))/0x8*(parseInt(_0x158e1f(0x1dc))/0x9)+parseInt(_0x158e1f(0x1e6))/0xa+parseInt(_0x158e1f(0x1e0))/0xb;if(_0x13c3cf===_0x188a22)break;else _0x3ed5f6['push'](_0x3ed5f6['shift']());}catch(_0xb31275){_0x3ed5f6['push'](_0x3ed5f6['shift']());}}}(a288_0x3ee4,0x2b433));import{randomUUID}from'node:crypto';import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{TextDecoder}from'node:util';import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT=a288_0x109450(0x204);export const INSTANT_API_POLICY_FILE_NAME=a288_0x109450(0x20c);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x10301b,_0xdbbaab,_0x3ec255){return new CliError(_0x10301b,0x1,_0xdbbaab,_0x3ec255);}export function loadInstantApiPolicyLocalConfig(_0x241cc0,_0x271053){assertSafeAppCode(_0x241cc0);const _0x6267e0=resolve(_0x271053??findProjectRootDirectory()),_0x15c6aa=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x241cc0+'/'+INSTANT_API_POLICY_FILE_NAME,_0xb7a23b=resolve(_0x6267e0,INSTANT_API_POLICY_RELATIVE_ROOT,_0x241cc0),_0x161c11=resolve(_0xb7a23b,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x6267e0,'appCode':_0x241cc0,'policyRoot':_0xb7a23b,'policyFilePath':_0x161c11,'policyRelativePath':_0x15c6aa};}export function createDefaultInstantApiPolicyConfig(_0x6b1d3a,_0x464c01='allow'){return assertSafeAppCode(_0x6b1d3a),{'version':'2','appCode':_0x6b1d3a,'defaults':{'instantApi':_0x464c01},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x439315){const _0x34fd61=a288_0x109450;let _0x3531f8;try{_0x3531f8=await stat(_0x439315[_0x34fd61(0x20d)]);}catch(_0x568523){throw instantApiPolicyError(_0x34fd61(0x1e5),'Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20'+_0x439315[_0x34fd61(0x20d)],_0x34fd61(0x1d6));}if(!_0x3531f8[_0x34fd61(0x1fd)]())throw instantApiPolicyError('instant_api_policy_file_invalid',_0x34fd61(0x1e3)+_0x439315[_0x34fd61(0x20d)]);if(_0x3531f8[_0x34fd61(0x213)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x34fd61(0x1da),_0x34fd61(0x1d2));let _0x310f04;try{_0x310f04=await readFile(_0x439315[_0x34fd61(0x20d)]);}catch{throw instantApiPolicyError(_0x34fd61(0x1e2),_0x34fd61(0x1ec)+_0x439315[_0x34fd61(0x20d)]);}if(_0x310f04[_0x34fd61(0x211)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x34fd61(0x1da),_0x34fd61(0x1d2));let _0x566759;try{_0x566759=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0x34fd61(0x1ed)](_0x310f04);}catch{throw instantApiPolicyError('instant_api_policy_file_invalid',_0x34fd61(0x1e9)+_0x439315['policyFilePath']);}let _0x16a46f;try{_0x16a46f=JSON[_0x34fd61(0x1de)](_0x566759);}catch{throw instantApiPolicyError(_0x34fd61(0x1eb),_0x34fd61(0x1f9)+_0x439315[_0x34fd61(0x20d)]);}return assertLocalPolicyContract(_0x16a46f,_0x439315['appCode']);}function a288_0x448c(_0x4be3d4,_0x220a94){_0x4be3d4=_0x4be3d4-0x1d2;const _0x3ee489=a288_0x3ee4();let _0x448c67=_0x3ee489[_0x4be3d4];return _0x448c67;}export async function writeInstantApiPolicyConfigFile(_0x7141da,_0x20a23b,_0x420f76={}){const _0x50b662=a288_0x109450,_0x3d7d49=assertLocalPolicyContract(_0x20a23b,_0x7141da[_0x50b662(0x1f4)]),_0x3e09f2=JSON[_0x50b662(0x1fc)](_0x3d7d49,null,0x2)+'\x0a';if(Buffer[_0x50b662(0x211)](_0x3e09f2,_0x50b662(0x1fe))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x50b662(0x1da),_0x50b662(0x1d2));await mkdir(_0x7141da[_0x50b662(0x1e1)],{'recursive':!![]});let _0x556412;try{_0x556412=await readFile(_0x7141da[_0x50b662(0x20d)],'utf8');}catch(_0x571d34){if(!isMissingFile(_0x571d34))throw instantApiPolicyError(_0x50b662(0x1e2),'Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20'+_0x7141da[_0x50b662(0x20d)]);}if(_0x556412===_0x3e09f2)return{'action':_0x50b662(0x1dd),'filePath':_0x7141da[_0x50b662(0x20d)]};if(_0x556412!==undefined&&!_0x420f76[_0x50b662(0x1f8)])throw instantApiPolicyError(_0x50b662(0x1f6),_0x50b662(0x209)+_0x7141da[_0x50b662(0x20d)],_0x50b662(0x1d9));if(_0x556412===undefined)try{return await writeFile(_0x7141da[_0x50b662(0x20d)],_0x3e09f2,{'encoding':_0x50b662(0x1fe),'flag':'wx'}),{'action':_0x50b662(0x1db),'filePath':_0x7141da[_0x50b662(0x20d)]};}catch(_0xddbdef){if(!isAlreadyExists(_0xddbdef))throw instantApiPolicyError(_0x50b662(0x1d8),'Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20'+_0x7141da[_0x50b662(0x20d)]);if(!_0x420f76[_0x50b662(0x1f8)])throw instantApiPolicyError(_0x50b662(0x1f6),'Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20'+_0x7141da[_0x50b662(0x20d)],_0x50b662(0x1f1));}const _0x554b59=resolve(dirname(_0x7141da[_0x50b662(0x20d)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x50b662(0x20b)]+'.'+randomUUID()+_0x50b662(0x1ff));try{await writeFile(_0x554b59,_0x3e09f2,{'encoding':_0x50b662(0x1fe),'flag':'wx'}),await rename(_0x554b59,_0x7141da[_0x50b662(0x20d)]);}catch{await unlink(_0x554b59)[_0x50b662(0x202)](()=>undefined);throw instantApiPolicyError(_0x50b662(0x1d8),_0x50b662(0x1ef)+_0x7141da['policyFilePath']);}return{'action':_0x50b662(0x1d4),'filePath':_0x7141da['policyFilePath']};}function assertSafeAppCode(_0x38c64f){const _0x6a4125=a288_0x109450,_0x5b1673=_0x38c64f[_0x6a4125(0x1f3)]();if(!_0x5b1673||_0x5b1673!==_0x38c64f||_0x5b1673[_0x6a4125(0x203)]>0x64||_0x5b1673==='.'||_0x5b1673==='..'||_0x5b1673[_0x6a4125(0x1fb)]('/')||_0x5b1673[_0x6a4125(0x1fb)]('\x5c')||_0x5b1673[_0x6a4125(0x1fb)]('\x00'))throw instantApiPolicyError(_0x6a4125(0x201),_0x6a4125(0x210));}function assertLocalPolicyContract(_0x274451,_0x4e58c7){const _0x22cac1=a288_0x109450;if(!isObject(_0x274451))throw instantApiPolicyError(_0x22cac1(0x1eb),_0x22cac1(0x1f5));if(_0x274451[_0x22cac1(0x20a)]!=='1'&&_0x274451[_0x22cac1(0x20a)]!=='2')throw instantApiPolicyError(_0x22cac1(0x1e4),_0x22cac1(0x1fa),'version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.');if(_0x274451['appCode']!==_0x4e58c7)throw instantApiPolicyError(_0x22cac1(0x1d3),'Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20'+_0x4e58c7+'.');if(!isObject(_0x274451[_0x22cac1(0x1f0)])||typeof _0x274451[_0x22cac1(0x1f0)][_0x22cac1(0x205)]!==_0x22cac1(0x1e7))throw instantApiPolicyError(_0x22cac1(0x214),_0x22cac1(0x1e8));if(_0x274451[_0x22cac1(0x206)]!==undefined&&_0x274451[_0x22cac1(0x206)]!==null&&!Array[_0x22cac1(0x208)](_0x274451[_0x22cac1(0x206)]))throw instantApiPolicyError(_0x22cac1(0x207),'Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.');return _0x274451;}function isObject(_0x35269c){const _0x52e329=a288_0x109450;return _0x35269c!==null&&typeof _0x35269c==='object'&&!Array[_0x52e329(0x208)](_0x35269c);}function isMissingFile(_0x5780ca){const _0x2ec47d=a288_0x109450;return Boolean(_0x5780ca&&typeof _0x5780ca===_0x2ec47d(0x1f7)&&_0x5780ca[_0x2ec47d(0x1ee)]===_0x2ec47d(0x20e));}function isAlreadyExists(_0x3b0eb6){const _0x1d6c88=a288_0x109450;return Boolean(_0x3b0eb6&&typeof _0x3b0eb6===_0x1d6c88(0x1f7)&&_0x3b0eb6[_0x1d6c88(0x1ee)]==='EEXIST');}function a288_0x3ee4(){const _0x3fc1ef=['appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','byteLength','10407VxfkuV','size','instant_api_policy_defaults_invalid','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','instant_api_policy_app_code_mismatch','overwritten','12YbLWNq','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','2617456oJCvbK','instant_api_policy_file_unwritable','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','instant_api_policy_file_too_large','created','9WMtSuf','unchanged','parse','7ZLImCo','6662788YfzugF','policyRoot','instant_api_policy_file_unreadable','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','instant_api_policy_version_invalid','instant_api_policy_file_missing','2308230OGRoAt','string','Policy\x20defaults.instantApi\x20is\x20required.','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','12470EwUxVp','instant_api_policy_json_invalid','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','decode','code','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','defaults','Review\x20the\x20file\x20before\x20retrying.','1550370PKYaje','trim','appCode','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','instant_api_policy_file_exists','object','force','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','includes','stringify','isFile','utf8','.tmp','207OYSUPF','instant_api_policy_app_code_invalid','catch','length','.rabetbase/instant-api-policy','instantApi','rules','instant_api_policy_rules_invalid','isArray','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','version','pid','policy.json','policyFilePath','ENOENT','152gRqdPP'];a288_0x3ee4=function(){return _0x3fc1ef;};return a288_0x3ee4();}
1
+ function a293_0x1814(_0x293625,_0x441fed){_0x293625=_0x293625-0xe4;const _0xcac334=a293_0xcac3();let _0x181431=_0xcac334[_0x293625];return _0x181431;}const a293_0x1e4224=a293_0x1814;(function(_0x27f6f,_0x351eff){const _0x21af7b=a293_0x1814,_0x12f6bb=_0x27f6f();while(!![]){try{const _0x461745=-parseInt(_0x21af7b(0xed))/0x1+-parseInt(_0x21af7b(0x11f))/0x2+parseInt(_0x21af7b(0x118))/0x3+-parseInt(_0x21af7b(0xfe))/0x4+parseInt(_0x21af7b(0x125))/0x5+parseInt(_0x21af7b(0xf9))/0x6+-parseInt(_0x21af7b(0x105))/0x7*(-parseInt(_0x21af7b(0xf1))/0x8);if(_0x461745===_0x351eff)break;else _0x12f6bb['push'](_0x12f6bb['shift']());}catch(_0x42b5ee){_0x12f6bb['push'](_0x12f6bb['shift']());}}}(a293_0xcac3,0x62177));import{randomUUID}from'node:crypto';import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{TextDecoder}from'node:util';import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT=a293_0x1e4224(0x124);export const INSTANT_API_POLICY_FILE_NAME='policy.json';export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x411ac4,_0x14bcd4,_0x300e6c){return new CliError(_0x411ac4,0x1,_0x14bcd4,_0x300e6c);}export function loadInstantApiPolicyLocalConfig(_0x16c93e,_0x4c937f){assertSafeAppCode(_0x16c93e);const _0x1dd304=resolve(_0x4c937f??findProjectRootDirectory()),_0x4c312c=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x16c93e+'/'+INSTANT_API_POLICY_FILE_NAME,_0x56712d=resolve(_0x1dd304,INSTANT_API_POLICY_RELATIVE_ROOT,_0x16c93e),_0x241295=resolve(_0x56712d,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x1dd304,'appCode':_0x16c93e,'policyRoot':_0x56712d,'policyFilePath':_0x241295,'policyRelativePath':_0x4c312c};}export function createDefaultInstantApiPolicyConfig(_0x21737a,_0x322da1=a293_0x1e4224(0xf4)){return assertSafeAppCode(_0x21737a),{'version':'2','appCode':_0x21737a,'defaults':{'instantApi':_0x322da1},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x25fa60){const _0x1f369e=a293_0x1e4224;let _0x2874bc;try{_0x2874bc=await stat(_0x25fa60[_0x1f369e(0x10e)]);}catch(_0xfae4db){throw instantApiPolicyError(_0x1f369e(0x11e),_0x1f369e(0xec)+_0x25fa60[_0x1f369e(0x10e)],_0x1f369e(0x123));}if(!_0x2874bc[_0x1f369e(0xff)]())throw instantApiPolicyError('instant_api_policy_file_invalid',_0x1f369e(0x115)+_0x25fa60[_0x1f369e(0x10e)]);if(_0x2874bc[_0x1f369e(0x121)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x1f369e(0x120),_0x1f369e(0x107));let _0x1d2e5a;try{_0x1d2e5a=await readFile(_0x25fa60[_0x1f369e(0x10e)]);}catch{throw instantApiPolicyError(_0x1f369e(0xe5),_0x1f369e(0xfc)+_0x25fa60['policyFilePath']);}if(_0x1d2e5a['byteLength']>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x1f369e(0x120),_0x1f369e(0x107));let _0x1a754c;try{_0x1a754c=new TextDecoder(_0x1f369e(0xfb),{'fatal':!![],'ignoreBOM':!![]})[_0x1f369e(0x119)](_0x1d2e5a);}catch{throw instantApiPolicyError(_0x1f369e(0x104),_0x1f369e(0x11c)+_0x25fa60[_0x1f369e(0x10e)]);}let _0x48e2bd;try{_0x48e2bd=JSON[_0x1f369e(0x102)](_0x1a754c);}catch{throw instantApiPolicyError('instant_api_policy_json_invalid','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20'+_0x25fa60[_0x1f369e(0x10e)]);}return assertLocalPolicyContract(_0x48e2bd,_0x25fa60[_0x1f369e(0xf6)]);}export async function writeInstantApiPolicyConfigFile(_0xb808b6,_0x21fb4e,_0x7c43bc={}){const _0x5f24a3=a293_0x1e4224,_0x21d153=assertLocalPolicyContract(_0x21fb4e,_0xb808b6[_0x5f24a3(0xf6)]),_0x2003c0=JSON[_0x5f24a3(0x113)](_0x21d153,null,0x2)+'\x0a';if(Buffer[_0x5f24a3(0xea)](_0x2003c0,_0x5f24a3(0xe9))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x5f24a3(0x120),_0x5f24a3(0x107));await mkdir(_0xb808b6[_0x5f24a3(0xe7)],{'recursive':!![]});let _0xdaf23b;try{_0xdaf23b=await readFile(_0xb808b6[_0x5f24a3(0x10e)],_0x5f24a3(0xe9));}catch(_0x9da913){if(!isMissingFile(_0x9da913))throw instantApiPolicyError(_0x5f24a3(0xe5),_0x5f24a3(0x10c)+_0xb808b6['policyFilePath']);}if(_0xdaf23b===_0x2003c0)return{'action':_0x5f24a3(0x122),'filePath':_0xb808b6['policyFilePath']};if(_0xdaf23b!==undefined&&!_0x7c43bc[_0x5f24a3(0xee)])throw instantApiPolicyError('instant_api_policy_file_exists',_0x5f24a3(0x108)+_0xb808b6[_0x5f24a3(0x10e)],_0x5f24a3(0x11d));if(_0xdaf23b===undefined)try{return await writeFile(_0xb808b6[_0x5f24a3(0x10e)],_0x2003c0,{'encoding':'utf8','flag':'wx'}),{'action':_0x5f24a3(0xf0),'filePath':_0xb808b6['policyFilePath']};}catch(_0x229854){if(!isAlreadyExists(_0x229854))throw instantApiPolicyError(_0x5f24a3(0xef),_0x5f24a3(0x126)+_0xb808b6[_0x5f24a3(0x10e)]);if(!_0x7c43bc[_0x5f24a3(0xee)])throw instantApiPolicyError(_0x5f24a3(0xf5),_0x5f24a3(0xf7)+_0xb808b6[_0x5f24a3(0x10e)],_0x5f24a3(0x103));}const _0x1ebc62=resolve(dirname(_0xb808b6[_0x5f24a3(0x10e)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process['pid']+'.'+randomUUID()+_0x5f24a3(0x101));try{await writeFile(_0x1ebc62,_0x2003c0,{'encoding':_0x5f24a3(0xe9),'flag':'wx'}),await rename(_0x1ebc62,_0xb808b6[_0x5f24a3(0x10e)]);}catch{await unlink(_0x1ebc62)[_0x5f24a3(0xeb)](()=>undefined);throw instantApiPolicyError(_0x5f24a3(0xef),_0x5f24a3(0x110)+_0xb808b6[_0x5f24a3(0x10e)]);}return{'action':_0x5f24a3(0xfa),'filePath':_0xb808b6[_0x5f24a3(0x10e)]};}function assertSafeAppCode(_0x48392d){const _0x5d9bb9=a293_0x1e4224,_0x345f1b=_0x48392d[_0x5d9bb9(0x10d)]();if(!_0x345f1b||_0x345f1b!==_0x48392d||_0x345f1b[_0x5d9bb9(0x112)]>0x64||_0x345f1b==='.'||_0x345f1b==='..'||_0x345f1b['includes']('/')||_0x345f1b[_0x5d9bb9(0x106)]('\x5c')||_0x345f1b[_0x5d9bb9(0x106)]('\x00'))throw instantApiPolicyError(_0x5d9bb9(0xe8),_0x5d9bb9(0x10b));}function assertLocalPolicyContract(_0x380e80,_0x1e68f0){const _0x3f7e7f=a293_0x1e4224;if(!isObject(_0x380e80))throw instantApiPolicyError('instant_api_policy_json_invalid','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.');if(_0x380e80[_0x3f7e7f(0x10f)]!=='1'&&_0x380e80[_0x3f7e7f(0x10f)]!=='2')throw instantApiPolicyError(_0x3f7e7f(0xe4),_0x3f7e7f(0x114),_0x3f7e7f(0x116));if(_0x380e80[_0x3f7e7f(0xf6)]!==_0x1e68f0)throw instantApiPolicyError(_0x3f7e7f(0x11b),'Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20'+_0x1e68f0+'.');if(!isObject(_0x380e80[_0x3f7e7f(0x117)])||typeof _0x380e80[_0x3f7e7f(0x117)][_0x3f7e7f(0xf8)]!=='string')throw instantApiPolicyError(_0x3f7e7f(0x111),_0x3f7e7f(0xf3));if(_0x380e80['rules']!==undefined&&_0x380e80[_0x3f7e7f(0xfd)]!==null&&!Array[_0x3f7e7f(0x109)](_0x380e80[_0x3f7e7f(0xfd)]))throw instantApiPolicyError(_0x3f7e7f(0x10a),_0x3f7e7f(0x100));return _0x380e80;}function isObject(_0x38f680){const _0x43ae1b=a293_0x1e4224;return _0x38f680!==null&&typeof _0x38f680===_0x43ae1b(0x11a)&&!Array[_0x43ae1b(0x109)](_0x38f680);}function a293_0xcac3(){const _0x4beeaf=['instant_api_policy_file_too_large','size','unchanged','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','.rabetbase/instant-api-policy','1087910PPrKMa','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_version_invalid','instant_api_policy_file_unreadable','ENOENT','policyRoot','instant_api_policy_app_code_invalid','utf8','byteLength','catch','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','372176AKrQcr','force','instant_api_policy_file_unwritable','created','8VumOFF','code','Policy\x20defaults.instantApi\x20is\x20required.','allow','instant_api_policy_file_exists','appCode','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','instantApi','1154376CSorAM','overwritten','utf-8','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','rules','1386828GXdbVk','isFile','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','.tmp','parse','Review\x20the\x20file\x20before\x20retrying.','instant_api_policy_file_invalid','3885511wVZFeA','includes','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','isArray','instant_api_policy_rules_invalid','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','trim','policyFilePath','version','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_defaults_invalid','length','stringify','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','defaults','1706757HwGnix','decode','object','instant_api_policy_app_code_mismatch','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','instant_api_policy_file_missing','826608xgvQQW'];a293_0xcac3=function(){return _0x4beeaf;};return a293_0xcac3();}function isMissingFile(_0x1f634f){const _0x31243c=a293_0x1e4224;return Boolean(_0x1f634f&&typeof _0x1f634f==='object'&&_0x1f634f['code']===_0x31243c(0xe6));}function isAlreadyExists(_0x268120){const _0x14d2ee=a293_0x1e4224;return Boolean(_0x268120&&typeof _0x268120===_0x14d2ee(0x11a)&&_0x268120[_0x14d2ee(0xf2)]==='EEXIST');}
@@ -1 +1 @@
1
- const a289_0x5e6e62=a289_0x5be1;(function(_0x5e39a2,_0x4a945c){const _0x28e534=a289_0x5be1,_0xad8357=_0x5e39a2();while(!![]){try{const _0x44c0ff=parseInt(_0x28e534(0x1ee))/0x1+-parseInt(_0x28e534(0x1af))/0x2+parseInt(_0x28e534(0x1f2))/0x3+-parseInt(_0x28e534(0x1cc))/0x4*(parseInt(_0x28e534(0x1ba))/0x5)+parseInt(_0x28e534(0x1f4))/0x6+-parseInt(_0x28e534(0x1d0))/0x7*(-parseInt(_0x28e534(0x1ea))/0x8)+-parseInt(_0x28e534(0x1fd))/0x9;if(_0x44c0ff===_0x4a945c)break;else _0xad8357['push'](_0xad8357['shift']());}catch(_0x201e8d){_0xad8357['push'](_0xad8357['shift']());}}}(a289_0x44b0,0xb5c68));import{CliError,CliErrors}from'../errors.js';function a289_0x5be1(_0x1d67af,_0x2a18d4){_0x1d67af=_0x1d67af-0x1a7;const _0x44b080=a289_0x44b0();let _0x5be18e=_0x44b080[_0x1d67af];return _0x5be18e;}function a289_0x44b0(){const _0x162c79=['documentId','49236zWaXaO','stringify','sort','POST','7NuTyby','length','some','finalScore','json','isSafeInteger','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','public','signal','score','total','scope','authRequired','get','timingsMs','strategyFingerprint','name','revision','rank','origin','Knowledge\x20search\x20cancelled.','appCode','aborted','AbortError','entries','status','2901056xlHzco','KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.','search','response','1296252DybqSu','timeout','apiError','Knowledge\x20search\x20appCode\x20is\x20required.','4042506FvWJpl','any','2253120ncjmqT','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','title','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','profile','cli:rabetbase','toLowerCase','hits[','rawScore','13024800IMgjcp','Knowledge\x20search\x20query\x20is\x20required.','hits','query','test','TimeoutError','string','application/json','keys','927846qREhrz','schemaVersion','validation','trim','hostname','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','networkError','hash','cookie','development','KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.','295DTPGfR','company','isFinite','tags','text','scoreKind','serviceUrl','\x20contract.','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','topK','split','headers','isArray','/v2/development/apps/','map','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20'];a289_0x44b0=function(){return _0x162c79;};return a289_0x44b0();}const RESPONSE_KEYS=['schemaVersion',a289_0x5e6e62(0x1f8),a289_0x5e6e62(0x1da),a289_0x5e6e62(0x1a8),'strategyFingerprint',a289_0x5e6e62(0x1de)],HIT_KEYS=[a289_0x5e6e62(0x1cb),a289_0x5e6e62(0x1e1),'chunkId',a289_0x5e6e62(0x1db),a289_0x5e6e62(0x1f6),a289_0x5e6e62(0x1be),'tags',a289_0x5e6e62(0x1e2),a289_0x5e6e62(0x1fc),a289_0x5e6e62(0x1d3),a289_0x5e6e62(0x1bf)];export function normalizeKbServiceOrigin(_0x432eb5){const _0x3033ce=a289_0x5e6e62,_0x4ec0fc=()=>CliErrors[_0x3033ce(0x1b1)](_0x3033ce(0x1f7)),_0x29d940=_0x432eb5?.[_0x3033ce(0x1b2)]();if(!_0x29d940||/[\u0000-\u0020\u007f]/[_0x3033ce(0x1aa)](_0x29d940)||!/^https:\/\/[^/?#@\\]+\/?$/i[_0x3033ce(0x1aa)](_0x29d940))throw _0x4ec0fc();let _0x52e8ec;try{_0x52e8ec=new URL(_0x29d940);}catch{throw _0x4ec0fc();}if(_0x52e8ec['protocol']!=='https:'||!_0x52e8ec[_0x3033ce(0x1b3)]||_0x52e8ec['username']||_0x52e8ec['password']||_0x52e8ec['pathname']!=='/'||_0x52e8ec[_0x3033ce(0x1ec)]||_0x52e8ec[_0x3033ce(0x1b6)])throw _0x4ec0fc();return _0x52e8ec[_0x3033ce(0x1e3)];}export async function searchDirectKnowledge(_0x2c028f){const _0x119e30=a289_0x5e6e62,_0x304ee2=_0x2c028f[_0x119e30(0x1e5)][_0x119e30(0x1b2)](),_0x26178e=_0x2c028f[_0x119e30(0x1a9)][_0x119e30(0x1b2)]();if(!_0x304ee2)throw CliErrors[_0x119e30(0x1b1)](_0x119e30(0x1f1));if(!_0x2c028f['cookie'][_0x119e30(0x1b2)]())throw CliErrors['authRequired']();if(!_0x26178e)throw CliErrors[_0x119e30(0x1b1)](_0x119e30(0x1a7));validateTopK(_0x2c028f[_0x119e30(0x1c3)]);const _0x19977b=normalizeKbServiceOrigin(_0x2c028f[_0x119e30(0x1c0)]),_0x14109c=AbortSignal[_0x119e30(0x1ef)](0xea60),_0x51d458=_0x2c028f[_0x119e30(0x1d8)]?AbortSignal[_0x119e30(0x1f3)]([_0x2c028f[_0x119e30(0x1d8)],_0x14109c]):_0x14109c;let _0x57981b;try{_0x57981b=await fetch(_0x19977b+_0x119e30(0x1c7)+encodeURIComponent(_0x304ee2)+'/knowledge/search',{'method':_0x119e30(0x1cf),'redirect':'error','headers':{'Content-Type':'application/json','Cookie':_0x2c028f[_0x119e30(0x1b7)],'X-Invoke-Source':_0x119e30(0x1f9)},'body':JSON[_0x119e30(0x1cd)]({'query':_0x26178e,..._0x2c028f[_0x119e30(0x1c3)]!==undefined?{'topK':_0x2c028f[_0x119e30(0x1c3)]}:{}}),'signal':_0x51d458});}catch(_0x494c25){if(_0x2c028f[_0x119e30(0x1d8)]?.[_0x119e30(0x1e6)])throw new DOMException(_0x119e30(0x1e4),_0x119e30(0x1e7));if(_0x494c25 instanceof Error&&_0x494c25[_0x119e30(0x1e0)]===_0x119e30(0x1ab))throw CliErrors[_0x119e30(0x1b5)](_0x119e30(0x1d6));throw CliErrors['networkError'](_0x119e30(0x1c2));}if(_0x57981b[_0x119e30(0x1e9)]===0x191)throw CliErrors[_0x119e30(0x1dc)]();if(_0x57981b[_0x119e30(0x1e9)]===0x1ad)throw CliErrors[_0x119e30(0x1f0)]('KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).');if(!_0x57981b['ok'])throw CliErrors[_0x119e30(0x1f0)](_0x119e30(0x1ca)+_0x57981b[_0x119e30(0x1e9)]+').');if(!hasNoStore(_0x57981b['headers']))throw CliErrors[_0x119e30(0x1f0)](_0x119e30(0x1b9));if(!(_0x57981b[_0x119e30(0x1c5)][_0x119e30(0x1dd)]('content-type')??'')[_0x119e30(0x1fa)]()['includes'](_0x119e30(0x1ad)))throw CliErrors[_0x119e30(0x1f0)]('KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.');let _0x5843f6;try{_0x5843f6=await _0x57981b[_0x119e30(0x1d4)]();}catch(_0x25dbad){if(_0x2c028f[_0x119e30(0x1d8)]?.[_0x119e30(0x1e6)])throw new DOMException('Knowledge\x20search\x20cancelled.',_0x119e30(0x1e7));if(_0x14109c[_0x119e30(0x1e6)]||_0x25dbad instanceof Error&&_0x25dbad['name']===_0x119e30(0x1ab))throw CliErrors[_0x119e30(0x1b5)]('KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.');throw CliErrors[_0x119e30(0x1f0)](_0x119e30(0x1eb));}try{const _0x2743c0=requireExactRecord(_0x5843f6,[_0x119e30(0x1a8),_0x119e30(0x1df),'timingsMs'],_0x119e30(0x1ed));if(!Array[_0x119e30(0x1c6)](_0x2743c0[_0x119e30(0x1a8)]))throw invalidContract('hits');return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':_0x119e30(0x1b8),'total':_0x2743c0[_0x119e30(0x1a8)][_0x119e30(0x1d1)],'hits':_0x2743c0['hits'],'strategyFingerprint':_0x2743c0[_0x119e30(0x1df)],'timingsMs':_0x2743c0[_0x119e30(0x1de)]},_0x2c028f[_0x119e30(0x1c3)]??0xa);}catch(_0x1e57b9){if(_0x1e57b9 instanceof CliError)throw CliErrors['apiError'](_0x119e30(0x1b4));throw _0x1e57b9;}}function validateTopK(_0x211a6){const _0x364bd6=a289_0x5e6e62;if(_0x211a6!==undefined&&(!Number[_0x364bd6(0x1d5)](_0x211a6)||_0x211a6<0x1||_0x211a6>0x32))throw CliErrors['validation'](_0x364bd6(0x1c9));}function hasNoStore(_0x26dc60){const _0x4f9f51=a289_0x5e6e62;return(_0x26dc60['get']('cache-control')??'')[_0x4f9f51(0x1c4)](',')[_0x4f9f51(0x1d2)](_0x5664e8=>_0x5664e8[_0x4f9f51(0x1b2)]()[_0x4f9f51(0x1fa)]()==='no-store');}function parseDevelopmentSearchResponse(_0x499647,_0x2c5e78){const _0x2a1a92=a289_0x5e6e62,_0x1a8c57=requireExactRecord(_0x499647,RESPONSE_KEYS,_0x2a1a92(0x1ed));if(_0x1a8c57[_0x2a1a92(0x1b0)]!==0x2||_0x1a8c57[_0x2a1a92(0x1f8)]!==_0x2a1a92(0x1b8))throw invalidContract(_0x2a1a92(0x1f8));if(!Array[_0x2a1a92(0x1c6)](_0x1a8c57[_0x2a1a92(0x1a8)])||_0x1a8c57[_0x2a1a92(0x1a8)][_0x2a1a92(0x1d1)]>(_0x2c5e78??0x32))throw invalidContract(_0x2a1a92(0x1a8));if(typeof _0x1a8c57[_0x2a1a92(0x1df)]!=='string'||!/^sha256:[0-9a-f]{64}$/[_0x2a1a92(0x1aa)](_0x1a8c57[_0x2a1a92(0x1df)]))throw invalidContract(_0x2a1a92(0x1df));const _0x506986=requireRecord(_0x1a8c57[_0x2a1a92(0x1de)],_0x2a1a92(0x1de)),_0xce60ea={};for(const [_0x337041,_0x2586cc]of Object[_0x2a1a92(0x1e8)](_0x506986)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0x2a1a92(0x1aa)](_0x337041)||typeof _0x2586cc!=='number'||!Number[_0x2a1a92(0x1bc)](_0x2586cc)||_0x2586cc<0x0)throw invalidContract(_0x2a1a92(0x1de));_0xce60ea[_0x337041]=_0x2586cc;}const _0x53a121=_0x1a8c57[_0x2a1a92(0x1a8)][_0x2a1a92(0x1c8)]((_0x45544b,_0x528567)=>parseHit(_0x45544b,_0x528567));if(!Number['isSafeInteger'](_0x1a8c57[_0x2a1a92(0x1da)])||_0x1a8c57['total']!==_0x53a121[_0x2a1a92(0x1d1)])throw invalidContract(_0x2a1a92(0x1da));return{'schemaVersion':_0x1a8c57[_0x2a1a92(0x1b0)],'profile':_0x1a8c57['profile'],'total':_0x1a8c57[_0x2a1a92(0x1da)],'strategyFingerprint':_0x1a8c57[_0x2a1a92(0x1df)],'timingsMs':_0xce60ea,'hits':_0x53a121};}function parseHit(_0x40011a,_0x41bb49){const _0x486a71=a289_0x5e6e62,_0x80d6f5=requireExactRecord(_0x40011a,HIT_KEYS,_0x486a71(0x1fb)+_0x41bb49+']'),_0x2d03a8=_0x2a0037=>{const _0x3dfcce=_0x486a71,_0x5f595e=_0x80d6f5[_0x2a0037];if(typeof _0x5f595e!==_0x3dfcce(0x1ac)||!_0x5f595e)throw invalidContract(_0x2a0037);return _0x5f595e;};if(!Number['isSafeInteger'](_0x80d6f5[_0x486a71(0x1e1)])||_0x80d6f5[_0x486a71(0x1e1)]<0x1)throw invalidContract('revision');if(_0x80d6f5[_0x486a71(0x1db)]!==_0x486a71(0x1d7)&&_0x80d6f5[_0x486a71(0x1db)]!==_0x486a71(0x1bb))throw invalidContract(_0x486a71(0x1db));if(typeof _0x80d6f5[_0x486a71(0x1f6)]!==_0x486a71(0x1ac)||typeof _0x80d6f5[_0x486a71(0x1be)]!==_0x486a71(0x1ac))throw invalidContract(_0x486a71(0x1be));if(!Array[_0x486a71(0x1c6)](_0x80d6f5['tags'])||_0x80d6f5[_0x486a71(0x1bd)][_0x486a71(0x1d2)](_0x1499b8=>typeof _0x1499b8!==_0x486a71(0x1ac)))throw invalidContract('tags');if(!Number['isSafeInteger'](_0x80d6f5[_0x486a71(0x1e2)])||_0x80d6f5[_0x486a71(0x1e2)]!==_0x41bb49+0x1)throw invalidContract(_0x486a71(0x1e2));if(!isFiniteNumber(_0x80d6f5[_0x486a71(0x1fc)])||!isFiniteNumber(_0x80d6f5[_0x486a71(0x1d3)]))throw invalidContract(_0x486a71(0x1d9));return{'documentId':_0x2d03a8('documentId'),'revision':_0x80d6f5[_0x486a71(0x1e1)],'chunkId':_0x2d03a8('chunkId'),'scope':_0x80d6f5['scope'],'title':_0x80d6f5['title'],'text':_0x80d6f5[_0x486a71(0x1be)],'tags':[..._0x80d6f5[_0x486a71(0x1bd)]],'rank':_0x80d6f5[_0x486a71(0x1e2)],'rawScore':_0x80d6f5[_0x486a71(0x1fc)],'finalScore':_0x80d6f5['finalScore'],'scoreKind':_0x2d03a8(_0x486a71(0x1bf))};}function requireExactRecord(_0xb5d29f,_0x29182e,_0xf77aed){const _0x23a1bf=a289_0x5e6e62,_0x4181a6=requireRecord(_0xb5d29f,_0xf77aed),_0x3bd792=Object[_0x23a1bf(0x1ae)](_0x4181a6)[_0x23a1bf(0x1ce)](),_0x347932=[..._0x29182e][_0x23a1bf(0x1ce)]();if(_0x3bd792[_0x23a1bf(0x1d1)]!==_0x347932['length']||_0x3bd792[_0x23a1bf(0x1d2)]((_0x487fa5,_0x5947f2)=>_0x487fa5!==_0x347932[_0x5947f2]))throw invalidContract(_0xf77aed);return _0x4181a6;}function requireRecord(_0x5d0e16,_0x3ef359){const _0x3ae17c=a289_0x5e6e62;if(!_0x5d0e16||typeof _0x5d0e16!=='object'||Array[_0x3ae17c(0x1c6)](_0x5d0e16))throw invalidContract(_0x3ef359);return _0x5d0e16;}function isFiniteNumber(_0x399fc7){const _0x4494e2=a289_0x5e6e62;return typeof _0x399fc7==='number'&&Number[_0x4494e2(0x1bc)](_0x399fc7);}function invalidContract(_0x3816d2){const _0x343fea=a289_0x5e6e62;return CliErrors['apiError'](_0x343fea(0x1f5)+_0x3816d2+_0x343fea(0x1c1));}
1
+ const a294_0x4766ca=a294_0xb6cf;(function(_0x210d91,_0x1e3cc4){const _0x28b338=a294_0xb6cf,_0x46efec=_0x210d91();while(!![]){try{const _0x4c1b87=-parseInt(_0x28b338(0xea))/0x1*(parseInt(_0x28b338(0xfb))/0x2)+parseInt(_0x28b338(0xfd))/0x3+-parseInt(_0x28b338(0xcf))/0x4*(parseInt(_0x28b338(0xe2))/0x5)+-parseInt(_0x28b338(0xd7))/0x6*(parseInt(_0x28b338(0xc7))/0x7)+parseInt(_0x28b338(0xfa))/0x8+-parseInt(_0x28b338(0xff))/0x9*(-parseInt(_0x28b338(0xe8))/0xa)+parseInt(_0x28b338(0xc2))/0xb*(parseInt(_0x28b338(0xdc))/0xc);if(_0x4c1b87===_0x1e3cc4)break;else _0x46efec['push'](_0x46efec['shift']());}catch(_0x5e030c){_0x46efec['push'](_0x46efec['shift']());}}}(a294_0x3a9b,0xdd633));function a294_0xb6cf(_0x3d4968,_0x489452){_0x3d4968=_0x3d4968-0xaa;const _0x3a9be8=a294_0x3a9b();let _0xb6cfab=_0x3a9be8[_0x3d4968];return _0xb6cfab;}import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a294_0x4766ca(0xf8),a294_0x4766ca(0xb6),a294_0x4766ca(0xca),'hits','strategyFingerprint',a294_0x4766ca(0xce)],HIT_KEYS=[a294_0x4766ca(0xd6),'revision','chunkId','scope','title',a294_0x4766ca(0xc0),'tags',a294_0x4766ca(0xd5),a294_0x4766ca(0xdb),'finalScore',a294_0x4766ca(0xed)];export function normalizeKbServiceOrigin(_0x350e1b){const _0x27f855=a294_0x4766ca,_0x11f972=()=>CliErrors[_0x27f855(0xb4)]('Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.'),_0x5a43ba=_0x350e1b?.[_0x27f855(0xe1)]();if(!_0x5a43ba||/[\u0000-\u0020\u007f]/['test'](_0x5a43ba)||!/^https:\/\/[^/?#@\\]+\/?$/i[_0x27f855(0xaf)](_0x5a43ba))throw _0x11f972();let _0x4e61a7;try{_0x4e61a7=new URL(_0x5a43ba);}catch{throw _0x11f972();}if(_0x4e61a7['protocol']!==_0x27f855(0xe6)||!_0x4e61a7[_0x27f855(0xaa)]||_0x4e61a7['username']||_0x4e61a7[_0x27f855(0xf0)]||_0x4e61a7[_0x27f855(0xee)]!=='/'||_0x4e61a7[_0x27f855(0xb2)]||_0x4e61a7[_0x27f855(0xd1)])throw _0x11f972();return _0x4e61a7['origin'];}export async function searchDirectKnowledge(_0x523b6f){const _0xed8976=a294_0x4766ca,_0x3124f3=_0x523b6f[_0xed8976(0xfe)][_0xed8976(0xe1)](),_0x3a9da2=_0x523b6f[_0xed8976(0xf7)][_0xed8976(0xe1)]();if(!_0x3124f3)throw CliErrors[_0xed8976(0xb4)](_0xed8976(0xc3));if(!_0x523b6f[_0xed8976(0xf2)][_0xed8976(0xe1)]())throw CliErrors['authRequired']();if(!_0x3a9da2)throw CliErrors[_0xed8976(0xb4)](_0xed8976(0xd8));validateTopK(_0x523b6f[_0xed8976(0xae)]);const _0x4533be=normalizeKbServiceOrigin(_0x523b6f[_0xed8976(0xb1)]),_0x526029=AbortSignal[_0xed8976(0xf1)](0xea60),_0x3c760d=_0x523b6f[_0xed8976(0xcd)]?AbortSignal[_0xed8976(0x105)]([_0x523b6f[_0xed8976(0xcd)],_0x526029]):_0x526029;let _0x415647;try{_0x415647=await fetch(_0x4533be+'/v2/development/apps/'+encodeURIComponent(_0x3124f3)+'/knowledge/search',{'method':_0xed8976(0x100),'redirect':_0xed8976(0xfc),'headers':{'Content-Type':_0xed8976(0xe0),'Cookie':_0x523b6f[_0xed8976(0xf2)],'X-Invoke-Source':_0xed8976(0xd9)},'body':JSON[_0xed8976(0x106)]({'query':_0x3a9da2,..._0x523b6f[_0xed8976(0xae)]!==undefined?{'topK':_0x523b6f['topK']}:{}}),'signal':_0x3c760d});}catch(_0x5b9207){if(_0x523b6f[_0xed8976(0xcd)]?.['aborted'])throw new DOMException('Knowledge\x20search\x20cancelled.',_0xed8976(0xc1));if(_0x5b9207 instanceof Error&&_0x5b9207['name']===_0xed8976(0xbd))throw CliErrors['networkError'](_0xed8976(0xdd));throw CliErrors[_0xed8976(0x101)](_0xed8976(0xe3));}if(_0x415647[_0xed8976(0xb7)]===0x191)throw CliErrors[_0xed8976(0xeb)]();if(_0x415647[_0xed8976(0xb7)]===0x1ad)throw CliErrors[_0xed8976(0xda)]('KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).');if(!_0x415647['ok'])throw CliErrors[_0xed8976(0xda)](_0xed8976(0xb9)+_0x415647['status']+').');if(!hasNoStore(_0x415647[_0xed8976(0xba)]))throw CliErrors[_0xed8976(0xda)](_0xed8976(0xd2));if(!(_0x415647[_0xed8976(0xba)][_0xed8976(0xb0)](_0xed8976(0xe5))??'')['toLowerCase']()[_0xed8976(0xcc)](_0xed8976(0xe0)))throw CliErrors['apiError']('KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.');let _0x59def4;try{_0x59def4=await _0x415647[_0xed8976(0xb3)]();}catch(_0x43cb0a){if(_0x523b6f[_0xed8976(0xcd)]?.[_0xed8976(0xdf)])throw new DOMException(_0xed8976(0xbb),_0xed8976(0xc1));if(_0x526029[_0xed8976(0xdf)]||_0x43cb0a instanceof Error&&_0x43cb0a[_0xed8976(0xad)]===_0xed8976(0xbd))throw CliErrors['networkError'](_0xed8976(0xdd));throw CliErrors[_0xed8976(0xda)](_0xed8976(0xe9));}try{const _0x1eb76a=requireExactRecord(_0x59def4,[_0xed8976(0x102),'strategyFingerprint',_0xed8976(0xce)],_0xed8976(0xe4));if(!Array[_0xed8976(0x104)](_0x1eb76a[_0xed8976(0x102)]))throw invalidContract('hits');return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':_0xed8976(0xb5),'total':_0x1eb76a[_0xed8976(0x102)][_0xed8976(0xde)],'hits':_0x1eb76a[_0xed8976(0x102)],'strategyFingerprint':_0x1eb76a[_0xed8976(0xec)],'timingsMs':_0x1eb76a['timingsMs']},_0x523b6f[_0xed8976(0xae)]??0xa);}catch(_0x2de25e){if(_0x2de25e instanceof CliError)throw CliErrors[_0xed8976(0xda)](_0xed8976(0xc5));throw _0x2de25e;}}function validateTopK(_0x44c581){const _0x3e0d88=a294_0x4766ca;if(_0x44c581!==undefined&&(!Number[_0x3e0d88(0xc4)](_0x44c581)||_0x44c581<0x1||_0x44c581>0x32))throw CliErrors[_0x3e0d88(0xb4)](_0x3e0d88(0xbe));}function hasNoStore(_0x3ed8c1){const _0x12c852=a294_0x4766ca;return(_0x3ed8c1[_0x12c852(0xb0)](_0x12c852(0xc6))??'')[_0x12c852(0xd0)](',')[_0x12c852(0xd4)](_0xe5cd3c=>_0xe5cd3c[_0x12c852(0xe1)]()[_0x12c852(0x103)]()===_0x12c852(0xf5));}function parseDevelopmentSearchResponse(_0x4d53cc,_0x1421ac){const _0xe033bd=a294_0x4766ca,_0x231c2f=requireExactRecord(_0x4d53cc,RESPONSE_KEYS,_0xe033bd(0xe4));if(_0x231c2f['schemaVersion']!==0x2||_0x231c2f['profile']!==_0xe033bd(0xb5))throw invalidContract(_0xe033bd(0xb6));if(!Array[_0xe033bd(0x104)](_0x231c2f[_0xe033bd(0x102)])||_0x231c2f['hits']['length']>(_0x1421ac??0x32))throw invalidContract(_0xe033bd(0x102));if(typeof _0x231c2f[_0xe033bd(0xec)]!==_0xe033bd(0xf6)||!/^sha256:[0-9a-f]{64}$/[_0xe033bd(0xaf)](_0x231c2f[_0xe033bd(0xec)]))throw invalidContract(_0xe033bd(0xec));const _0x2eeee8=requireRecord(_0x231c2f[_0xe033bd(0xce)],_0xe033bd(0xce)),_0x5af08f={};for(const [_0x3ca7f4,_0x54db75]of Object[_0xe033bd(0xb8)](_0x2eeee8)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0xe033bd(0xaf)](_0x3ca7f4)||typeof _0x54db75!==_0xe033bd(0xbf)||!Number[_0xe033bd(0xbc)](_0x54db75)||_0x54db75<0x0)throw invalidContract('timingsMs');_0x5af08f[_0x3ca7f4]=_0x54db75;}const _0x3bf351=_0x231c2f['hits']['map']((_0xdd1903,_0x665286)=>parseHit(_0xdd1903,_0x665286));if(!Number[_0xe033bd(0xc4)](_0x231c2f['total'])||_0x231c2f[_0xe033bd(0xca)]!==_0x3bf351[_0xe033bd(0xde)])throw invalidContract(_0xe033bd(0xca));return{'schemaVersion':_0x231c2f[_0xe033bd(0xf8)],'profile':_0x231c2f[_0xe033bd(0xb6)],'total':_0x231c2f[_0xe033bd(0xca)],'strategyFingerprint':_0x231c2f[_0xe033bd(0xec)],'timingsMs':_0x5af08f,'hits':_0x3bf351};}function parseHit(_0x57da00,_0x43bf5a){const _0x49ca3c=a294_0x4766ca,_0x3b3ee6=requireExactRecord(_0x57da00,HIT_KEYS,'hits['+_0x43bf5a+']'),_0x32cc01=_0x2e0d3c=>{const _0x27a472=a294_0xb6cf,_0x1b3551=_0x3b3ee6[_0x2e0d3c];if(typeof _0x1b3551!==_0x27a472(0xf6)||!_0x1b3551)throw invalidContract(_0x2e0d3c);return _0x1b3551;};if(!Number[_0x49ca3c(0xc4)](_0x3b3ee6[_0x49ca3c(0xd3)])||_0x3b3ee6['revision']<0x1)throw invalidContract(_0x49ca3c(0xd3));if(_0x3b3ee6['scope']!==_0x49ca3c(0xe7)&&_0x3b3ee6[_0x49ca3c(0xab)]!=='company')throw invalidContract('scope');if(typeof _0x3b3ee6[_0x49ca3c(0xf9)]!=='string'||typeof _0x3b3ee6['text']!==_0x49ca3c(0xf6))throw invalidContract('text');if(!Array[_0x49ca3c(0x104)](_0x3b3ee6['tags'])||_0x3b3ee6[_0x49ca3c(0xf4)][_0x49ca3c(0xd4)](_0x1e36a7=>typeof _0x1e36a7!==_0x49ca3c(0xf6)))throw invalidContract(_0x49ca3c(0xf4));if(!Number[_0x49ca3c(0xc4)](_0x3b3ee6[_0x49ca3c(0xd5)])||_0x3b3ee6[_0x49ca3c(0xd5)]!==_0x43bf5a+0x1)throw invalidContract('rank');if(!isFiniteNumber(_0x3b3ee6[_0x49ca3c(0xdb)])||!isFiniteNumber(_0x3b3ee6['finalScore']))throw invalidContract(_0x49ca3c(0xef));return{'documentId':_0x32cc01(_0x49ca3c(0xd6)),'revision':_0x3b3ee6[_0x49ca3c(0xd3)],'chunkId':_0x32cc01('chunkId'),'scope':_0x3b3ee6[_0x49ca3c(0xab)],'title':_0x3b3ee6[_0x49ca3c(0xf9)],'text':_0x3b3ee6['text'],'tags':[..._0x3b3ee6[_0x49ca3c(0xf4)]],'rank':_0x3b3ee6['rank'],'rawScore':_0x3b3ee6[_0x49ca3c(0xdb)],'finalScore':_0x3b3ee6[_0x49ca3c(0xc9)],'scoreKind':_0x32cc01(_0x49ca3c(0xed))};}function requireExactRecord(_0x47a8bc,_0x299408,_0x20d524){const _0x5c39c4=a294_0x4766ca,_0x5800ec=requireRecord(_0x47a8bc,_0x20d524),_0x1acbf9=Object['keys'](_0x5800ec)[_0x5c39c4(0xcb)](),_0x4b1bd5=[..._0x299408]['sort']();if(_0x1acbf9[_0x5c39c4(0xde)]!==_0x4b1bd5[_0x5c39c4(0xde)]||_0x1acbf9[_0x5c39c4(0xd4)]((_0x47faf9,_0x1522bd)=>_0x47faf9!==_0x4b1bd5[_0x1522bd]))throw invalidContract(_0x20d524);return _0x5800ec;}function a294_0x3a9b(){const _0x1c2b02=['KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.','revision','some','rank','documentId','6OCUSMt','Knowledge\x20search\x20query\x20is\x20required.','cli:rabetbase','apiError','rawScore','252UxaAco','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','length','aborted','application/json','trim','295GYtygi','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','response','content-type','https:','public','22390PwpBlb','KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.','1082948jvTxRi','authRequired','strategyFingerprint','scoreKind','pathname','score','password','timeout','cookie','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','tags','no-store','string','query','schemaVersion','title','12144864ZAtJME','2kClKag','error','2039643JeLZFo','appCode','3006AYZtQs','POST','networkError','hits','toLowerCase','isArray','any','stringify','hostname','scope','\x20contract.','name','topK','test','get','serviceUrl','search','json','validation','development','profile','status','entries','KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20','headers','Knowledge\x20search\x20cancelled.','isFinite','TimeoutError','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','number','text','AbortError','5995ixVmqG','Knowledge\x20search\x20appCode\x20is\x20required.','isSafeInteger','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','cache-control','594496DPKzpb','object','finalScore','total','sort','includes','signal','timingsMs','59836BnbCzR','split','hash'];a294_0x3a9b=function(){return _0x1c2b02;};return a294_0x3a9b();}function requireRecord(_0x5f4f3c,_0x5512c0){const _0x5e3d91=a294_0x4766ca;if(!_0x5f4f3c||typeof _0x5f4f3c!==_0x5e3d91(0xc8)||Array[_0x5e3d91(0x104)](_0x5f4f3c))throw invalidContract(_0x5512c0);return _0x5f4f3c;}function isFiniteNumber(_0x14e0be){const _0x5c3f33=a294_0x4766ca;return typeof _0x14e0be===_0x5c3f33(0xbf)&&Number[_0x5c3f33(0xbc)](_0x14e0be);}function invalidContract(_0x1ba9d8){const _0x5e18c4=a294_0x4766ca;return CliErrors[_0x5e18c4(0xda)](_0x5e18c4(0xf3)+_0x1ba9d8+_0x5e18c4(0xac));}
@@ -1 +1 @@
1
- const a290_0x51be12=a290_0x440f;(function(_0x365767,_0x109c07){const _0x294dc9=a290_0x440f,_0x444508=_0x365767();while(!![]){try{const _0x477d9e=-parseInt(_0x294dc9(0x184))/0x1+-parseInt(_0x294dc9(0x19b))/0x2*(parseInt(_0x294dc9(0x19d))/0x3)+parseInt(_0x294dc9(0x19c))/0x4+parseInt(_0x294dc9(0x18d))/0x5+parseInt(_0x294dc9(0x194))/0x6*(parseInt(_0x294dc9(0x198))/0x7)+-parseInt(_0x294dc9(0x190))/0x8+parseInt(_0x294dc9(0x19a))/0x9;if(_0x477d9e===_0x109c07)break;else _0x444508['push'](_0x444508['shift']());}catch(_0x65c0cf){_0x444508['push'](_0x444508['shift']());}}}(a290_0x598c,0xb1948));import{constants}from'node:fs';function a290_0x598c(){const _0x412773=['560366vKebeU','1329952hgOwdV','15YplYtN','isDirectory','F_OK','925805ubMCNb','split','name','appPagesDir','join','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','flagMissing','.rabetbase','page-dir','4006670lgyIfh','localeCompare','Unsupported\x20file\x20in\x20page\x20directory:\x20','10762952OySGst','page.lock.json','Page\x20directory\x20not\x20found:\x20','isFile','8397390avMCuE','toUpperCase','validation','cwd','7VsDNAX','.json','16794630HeVsFc'];a290_0x598c=function(){return _0x412773;};return a290_0x598c();}import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a290_0x440f(_0x15288f,_0x35deaa){_0x15288f=_0x15288f-0x184;const _0x598cfb=a290_0x598c();let _0x440f68=_0x598cfb[_0x15288f];return _0x440f68;}import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x2816bc,_0x57f425=process[a290_0x51be12(0x197)]()){const _0x44228a=a290_0x51be12,_0x24f9e5=resolve(_0x57f425),_0x449f01=join(_0x24f9e5,_0x44228a(0x18b),'page');return{'projectRoot':_0x24f9e5,'pagesBaseDir':_0x449f01,'appPagesDir':join(_0x449f01,_0x2816bc),'lockFilePath':join(_0x24f9e5,'.rabetbase',_0x44228a(0x191))};}export function buildPageFileName(_0x23dbbd,_0xe5353b){const _0x5591cc=a290_0x51be12;return _0x23dbbd+'-'+_0xe5353b[_0x5591cc(0x195)]()+_0x5591cc(0x199);}export function resolvePageFilePath(_0x4b5ed8,_0x8732b0,_0x31fbe1){const _0x187f52=a290_0x51be12;return join(_0x4b5ed8[_0x187f52(0x187)],buildPageFileName(_0x8732b0,_0x31fbe1));}export async function ensureParentDirectory(_0x41c7ec){await mkdir(dirname(_0x41c7ec),{'recursive':!![]});}export async function fileExists(_0x24e664){const _0x347340=a290_0x51be12;try{return await access(_0x24e664,constants[_0x347340(0x19f)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x5035ee){const _0x8d64b3=a290_0x51be12,_0x289a65=_0x5035ee['trim']();if(!_0x289a65)throw CliErrors[_0x8d64b3(0x18a)](_0x8d64b3(0x18c));const _0xd6629b=resolve(_0x289a65);let _0x7dd681;try{_0x7dd681=await lstat(_0xd6629b);}catch{throw CliErrors[_0x8d64b3(0x196)](_0x8d64b3(0x192)+_0x289a65);}if(!_0x7dd681[_0x8d64b3(0x19e)]())throw CliErrors[_0x8d64b3(0x196)](_0x8d64b3(0x189)+_0x289a65);const _0x3e67bd={};return await readDirectory(_0xd6629b,_0xd6629b,_0x3e67bd),_0x3e67bd;}async function readDirectory(_0x2d4201,_0x4b510f,_0x545a7c){const _0x22d4d8=a290_0x51be12,_0x4182f8=await readdir(_0x4b510f,{'withFileTypes':!![]});for(const _0x5c6bce of _0x4182f8['sort']((_0x3d2f1a,_0x4fc1cd)=>_0x3d2f1a['name'][_0x22d4d8(0x18e)](_0x4fc1cd['name']))){const _0x220997=join(_0x4b510f,_0x5c6bce[_0x22d4d8(0x186)]);if(_0x5c6bce[_0x22d4d8(0x19e)]()){await readDirectory(_0x2d4201,_0x220997,_0x545a7c);continue;}if(!_0x5c6bce[_0x22d4d8(0x193)]())throw CliErrors['validation'](_0x22d4d8(0x18f)+_0x220997);_0x545a7c[relative(_0x2d4201,_0x220997)[_0x22d4d8(0x185)](sep)[_0x22d4d8(0x188)]('/')]=await readFile(_0x220997,'utf8');}}
1
+ (function(_0x460f5c,_0x57e2df){const _0x502dbd=a295_0x4737,_0x4ccf4b=_0x460f5c();while(!![]){try{const _0x3a039c=parseInt(_0x502dbd(0xc5))/0x1*(parseInt(_0x502dbd(0xbc))/0x2)+parseInt(_0x502dbd(0xc3))/0x3*(-parseInt(_0x502dbd(0xc1))/0x4)+-parseInt(_0x502dbd(0xd2))/0x5*(-parseInt(_0x502dbd(0xd3))/0x6)+-parseInt(_0x502dbd(0xd5))/0x7*(-parseInt(_0x502dbd(0xcf))/0x8)+parseInt(_0x502dbd(0xbe))/0x9+-parseInt(_0x502dbd(0xce))/0xa+-parseInt(_0x502dbd(0xbd))/0xb;if(_0x3a039c===_0x57e2df)break;else _0x4ccf4b['push'](_0x4ccf4b['shift']());}catch(_0x3e0fd2){_0x4ccf4b['push'](_0x4ccf4b['shift']());}}}(a295_0x5925,0x882f5));import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x2af931,_0x314859=process['cwd']()){const _0x4d4f57=a295_0x4737,_0x1bc632=resolve(_0x314859),_0x31a8c5=join(_0x1bc632,_0x4d4f57(0xbf),_0x4d4f57(0xca));return{'projectRoot':_0x1bc632,'pagesBaseDir':_0x31a8c5,'appPagesDir':join(_0x31a8c5,_0x2af931),'lockFilePath':join(_0x1bc632,'.rabetbase',_0x4d4f57(0xc0))};}export function buildPageFileName(_0x13cdba,_0xe38a87){return _0x13cdba+'-'+_0xe38a87['toUpperCase']()+'.json';}export function resolvePageFilePath(_0x31b14a,_0x35e68c,_0x552f4f){const _0x1d6365=a295_0x4737;return join(_0x31b14a[_0x1d6365(0xc2)],buildPageFileName(_0x35e68c,_0x552f4f));}function a295_0x5925(){const _0x49782c=['appPagesDir','76719tcRYuk','split','11138CLaJYW','flagMissing','isDirectory','utf8','trim','page','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','name','page-dir','3030890kQEMKP','424ypXwRl','Page\x20directory\x20not\x20found:\x20','sort','409185PBxjiu','78LphFXn','localeCompare','21133LQfODY','isFile','F_OK','join','validation','Unsupported\x20file\x20in\x20page\x20directory:\x20','82DIaWgG','5888817ObjphI','2504781hkUyPL','.rabetbase','page.lock.json','88KaNFBA'];a295_0x5925=function(){return _0x49782c;};return a295_0x5925();}export async function ensureParentDirectory(_0xa740ab){await mkdir(dirname(_0xa740ab),{'recursive':!![]});}function a295_0x4737(_0x185c44,_0x187747){_0x185c44=_0x185c44-0xbb;const _0x592541=a295_0x5925();let _0x473720=_0x592541[_0x185c44];return _0x473720;}export async function fileExists(_0x31062b){const _0x3fbb84=a295_0x4737;try{return await access(_0x31062b,constants[_0x3fbb84(0xd7)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x3b3a50){const _0x1721fb=a295_0x4737,_0x4bbd1e=_0x3b3a50[_0x1721fb(0xc9)]();if(!_0x4bbd1e)throw CliErrors[_0x1721fb(0xc6)](_0x1721fb(0xcd));const _0x57c3c3=resolve(_0x4bbd1e);let _0x454544;try{_0x454544=await lstat(_0x57c3c3);}catch{throw CliErrors['validation'](_0x1721fb(0xd0)+_0x4bbd1e);}if(!_0x454544[_0x1721fb(0xc7)]())throw CliErrors[_0x1721fb(0xd9)](_0x1721fb(0xcb)+_0x4bbd1e);const _0x408dbc={};return await readDirectory(_0x57c3c3,_0x57c3c3,_0x408dbc),_0x408dbc;}async function readDirectory(_0x415330,_0x2023d3,_0x58068f){const _0x11b7ca=a295_0x4737,_0x41ecce=await readdir(_0x2023d3,{'withFileTypes':!![]});for(const _0x51b16d of _0x41ecce[_0x11b7ca(0xd1)]((_0x384259,_0x4e2809)=>_0x384259['name'][_0x11b7ca(0xd4)](_0x4e2809[_0x11b7ca(0xcc)]))){const _0xf77efe=join(_0x2023d3,_0x51b16d[_0x11b7ca(0xcc)]);if(_0x51b16d[_0x11b7ca(0xc7)]()){await readDirectory(_0x415330,_0xf77efe,_0x58068f);continue;}if(!_0x51b16d[_0x11b7ca(0xd6)]())throw CliErrors[_0x11b7ca(0xd9)](_0x11b7ca(0xbb)+_0xf77efe);_0x58068f[relative(_0x415330,_0xf77efe)[_0x11b7ca(0xc4)](sep)[_0x11b7ca(0xd8)]('/')]=await readFile(_0xf77efe,_0x11b7ca(0xc8));}}
@@ -1 +1 @@
1
- (function(_0x3d5011,_0x4ad5dd){const _0x14c285=a291_0x243c,_0x5a4f31=_0x3d5011();while(!![]){try{const _0x126f59=-parseInt(_0x14c285(0x18b))/0x1+-parseInt(_0x14c285(0x187))/0x2*(-parseInt(_0x14c285(0x186))/0x3)+-parseInt(_0x14c285(0x17c))/0x4+parseInt(_0x14c285(0x185))/0x5*(parseInt(_0x14c285(0x18d))/0x6)+parseInt(_0x14c285(0x189))/0x7*(-parseInt(_0x14c285(0x18e))/0x8)+-parseInt(_0x14c285(0x183))/0x9+-parseInt(_0x14c285(0x18a))/0xa*(-parseInt(_0x14c285(0x17f))/0xb);if(_0x126f59===_0x4ad5dd)break;else _0x5a4f31['push'](_0x5a4f31['shift']());}catch(_0xed4ca){_0x5a4f31['push'](_0x5a4f31['shift']());}}}(a291_0x5689,0x89a93));import a291_0x1ee8ea from'node:crypto';import{readFile}from'node:fs/promises';function a291_0x5689(){const _0x1120a6=['106290KiKKFz','380574pGqTHW','hex','4364082bMBLeD','264dnbCyw','1989860rLYlFT','stringify','createHash','1452WgwcKv','utf8','parse','digest','3203676erQKNt','md5','5hoUror','24711IfLnIz','16TdKdjR','update','84511xoNofx'];a291_0x5689=function(){return _0x1120a6;};return a291_0x5689();}export function serializePageSchemaForFile(_0x169ba6){const _0x4d1e67=a291_0x243c;return JSON[_0x4d1e67(0x17d)](JSON[_0x4d1e67(0x181)](_0x169ba6),null,0x2)+'\x0a';}export function computePageContentHash(_0x69e531){const _0x592836=a291_0x243c;return a291_0x1ee8ea[_0x592836(0x17e)](_0x592836(0x184))[_0x592836(0x188)](_0x69e531)[_0x592836(0x182)](_0x592836(0x18c));}function a291_0x243c(_0x2a6e1f,_0xce0939){_0x2a6e1f=_0x2a6e1f-0x17c;const _0x5689e2=a291_0x5689();let _0x243caf=_0x5689e2[_0x2a6e1f];return _0x243caf;}export function computeSerializedSchemaHash(_0x44e610){return computePageContentHash(serializePageSchemaForFile(_0x44e610));}export async function computePageFileHash(_0x5db7a1){const _0x9f6c29=a291_0x243c,_0x324a8e=await readFile(_0x5db7a1,_0x9f6c29(0x180));return computePageContentHash(_0x324a8e);}
1
+ function a296_0x207c(){const _0x2959b8=['hex','md5','3176rTjqhw','update','3730770jINaLc','870zGXdWZ','42sEzFeM','stringify','360JJiAoG','7238686HJgcXk','digest','683110MwYTLc','798896nyVuwg','488825XEuxwr','146646UVjpZW','utf8'];a296_0x207c=function(){return _0x2959b8;};return a296_0x207c();}(function(_0x41ab40,_0x2cbe1c){const _0x7f6b57=a296_0x35b9,_0x2bb31f=_0x41ab40();while(!![]){try{const _0x420585=-parseInt(_0x7f6b57(0xbb))/0x1+parseInt(_0x7f6b57(0xba))/0x2+parseInt(_0x7f6b57(0xc3))/0x3*(parseInt(_0x7f6b57(0xc0))/0x4)+parseInt(_0x7f6b57(0xb9))/0x5*(-parseInt(_0x7f6b57(0xc4))/0x6)+parseInt(_0x7f6b57(0xc7))/0x7+parseInt(_0x7f6b57(0xc6))/0x8*(parseInt(_0x7f6b57(0xbc))/0x9)+-parseInt(_0x7f6b57(0xc2))/0xa;if(_0x420585===_0x2cbe1c)break;else _0x2bb31f['push'](_0x2bb31f['shift']());}catch(_0x44a6f2){_0x2bb31f['push'](_0x2bb31f['shift']());}}}(a296_0x207c,0x8d4dc));import a296_0x4193d4 from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x39088e){const _0x33c4db=a296_0x35b9;return JSON[_0x33c4db(0xc5)](JSON['parse'](_0x39088e),null,0x2)+'\x0a';}export function computePageContentHash(_0x3941cd){const _0x37e52f=a296_0x35b9;return a296_0x4193d4['createHash'](_0x37e52f(0xbf))[_0x37e52f(0xc1)](_0x3941cd)[_0x37e52f(0xb8)](_0x37e52f(0xbe));}export function computeSerializedSchemaHash(_0x7e5ae9){return computePageContentHash(serializePageSchemaForFile(_0x7e5ae9));}function a296_0x35b9(_0x222d3c,_0x173f48){_0x222d3c=_0x222d3c-0xb8;const _0x207c0e=a296_0x207c();let _0x35b93e=_0x207c0e[_0x222d3c];return _0x35b93e;}export async function computePageFileHash(_0x4a7353){const _0x3ec2e2=a296_0x35b9,_0x42e503=await readFile(_0x4a7353,_0x3ec2e2(0xbd));return computePageContentHash(_0x42e503);}