@lovrabet/rabetbase-cli 2.5.9-beta.1 → 2.5.9

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 (376) 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/design-context.js +1 -1
  77. package/lib/commands/dataset/design-start.js +1 -1
  78. package/lib/commands/dataset/design-status.js +1 -1
  79. package/lib/commands/dataset/design-sync-retry.js +1 -1
  80. package/lib/commands/dataset/design-sync-status.js +1 -1
  81. package/lib/commands/dataset/design-validate.js +1 -1
  82. package/lib/commands/dataset/detail.js +1 -1
  83. package/lib/commands/dataset/extend-update.js +1 -1
  84. package/lib/commands/dataset/field-restore.js +1 -1
  85. package/lib/commands/dataset/field-update.js +1 -1
  86. package/lib/commands/dataset/generate.js +1 -1
  87. package/lib/commands/dataset/index.js +1 -1
  88. package/lib/commands/dataset/list.js +1 -1
  89. package/lib/commands/dataset/operations.js +1 -1
  90. package/lib/commands/dataset/relation-audit.js +1 -1
  91. package/lib/commands/dataset/relation-create.js +1 -1
  92. package/lib/commands/dataset/relation-delete.js +1 -1
  93. package/lib/commands/dataset/relation-shared.js +1 -1
  94. package/lib/commands/dataset/relation-update.js +1 -1
  95. package/lib/commands/dataset/relations.js +1 -1
  96. package/lib/commands/dataset/rename.js +1 -1
  97. package/lib/commands/dataset/restore.js +1 -1
  98. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  99. package/lib/commands/db/analysis-batching.js +1 -1
  100. package/lib/commands/db/analyze-batch-plan.js +1 -1
  101. package/lib/commands/db/analyze-cancel.js +1 -1
  102. package/lib/commands/db/analyze-start.js +1 -1
  103. package/lib/commands/db/analyze-status.js +1 -1
  104. package/lib/commands/db/create.js +1 -1
  105. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  106. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  109. package/lib/commands/db/delete.js +1 -1
  110. package/lib/commands/db/detail.js +1 -1
  111. package/lib/commands/db/diff-refresh-start.js +1 -1
  112. package/lib/commands/db/diff-refresh-status.js +1 -1
  113. package/lib/commands/db/diff.js +1 -1
  114. package/lib/commands/db/index.js +1 -1
  115. package/lib/commands/db/list.js +1 -1
  116. package/lib/commands/db/shared.js +1 -1
  117. package/lib/commands/db/table-diff-shared.js +1 -1
  118. package/lib/commands/db/tables.js +1 -1
  119. package/lib/commands/db/test.js +1 -1
  120. package/lib/commands/db/update.js +1 -1
  121. package/lib/commands/deployment/index.js +1 -1
  122. package/lib/commands/deployment/sync-all.js +1 -1
  123. package/lib/commands/deployment/sync-jobs.js +1 -1
  124. package/lib/commands/deployment/sync-status.js +1 -1
  125. package/lib/commands/doctor.js +1 -1
  126. package/lib/commands/file/index.js +1 -1
  127. package/lib/commands/flow/create.js +1 -1
  128. package/lib/commands/flow/detail.js +1 -1
  129. package/lib/commands/flow/index.js +1 -1
  130. package/lib/commands/flow/list.js +1 -1
  131. package/lib/commands/flow/page-list.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/index.js +1 -1
  151. package/lib/commands/issue/nudge.js +1 -1
  152. package/lib/commands/issue/report.js +1 -1
  153. package/lib/commands/issue/shared.js +1 -1
  154. package/lib/commands/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/path.js +1 -1
  183. package/lib/commands/menu/shared/service.js +1 -1
  184. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  185. package/lib/commands/menu/shared/sync-core.js +1 -1
  186. package/lib/commands/menu/shared/update-core.js +1 -1
  187. package/lib/commands/menu/shared/valid-url.js +1 -1
  188. package/lib/commands/menu/subapp-assets-status.js +1 -1
  189. package/lib/commands/menu/subapp-assets-update.js +1 -1
  190. package/lib/commands/menu/sync.js +1 -1
  191. package/lib/commands/menu/visibility-update.js +1 -1
  192. package/lib/commands/notification/config-create.js +1 -1
  193. package/lib/commands/notification/config-delete.js +1 -1
  194. package/lib/commands/notification/config-list.js +1 -1
  195. package/lib/commands/notification/config-update.js +1 -1
  196. package/lib/commands/notification/index.js +1 -1
  197. package/lib/commands/notification/shared.js +1 -1
  198. package/lib/commands/ocr/index.js +1 -1
  199. package/lib/commands/page/create.js +1 -1
  200. package/lib/commands/page/custom/detail.js +1 -1
  201. package/lib/commands/page/custom/list.js +1 -1
  202. package/lib/commands/page/custom/publish.js +1 -1
  203. package/lib/commands/page/custom/shared.js +1 -1
  204. package/lib/commands/page/custom/syntax.js +1 -1
  205. package/lib/commands/page/custom/update.js +1 -1
  206. package/lib/commands/page/data-list-status.js +1 -1
  207. package/lib/commands/page/generate-start.js +1 -1
  208. package/lib/commands/page/generate-status.js +1 -1
  209. package/lib/commands/page/index.js +1 -1
  210. package/lib/commands/page/pull.js +1 -1
  211. package/lib/commands/page/push.js +1 -1
  212. package/lib/commands/page/relation-audit.js +1 -1
  213. package/lib/commands/page/restore.js +1 -1
  214. package/lib/commands/page/shared.js +1 -1
  215. package/lib/commands/page/sync.js +1 -1
  216. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  217. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  218. package/lib/commands/project/create/format-elapsed.js +1 -1
  219. package/lib/commands/project/create/main.js +1 -1
  220. package/lib/commands/project/create/materialize-project-template.js +1 -1
  221. package/lib/commands/project/create/project-name.js +1 -1
  222. package/lib/commands/project/create/project-template-archive.js +1 -1
  223. package/lib/commands/project/create/project-template-path.js +1 -1
  224. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  225. package/lib/commands/project/create/use-format-code.js +1 -1
  226. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  227. package/lib/commands/project/domain-routing-sync.js +1 -1
  228. package/lib/commands/project/index.js +1 -1
  229. package/lib/commands/project/upgrade.js +1 -1
  230. package/lib/commands/registry.js +1 -1
  231. package/lib/commands/role/delete.js +1 -1
  232. package/lib/commands/role/detail.js +1 -1
  233. package/lib/commands/role/index.js +1 -1
  234. package/lib/commands/role/list.js +1 -1
  235. package/lib/commands/role/shared.js +1 -1
  236. package/lib/commands/role/update.js +1 -1
  237. package/lib/commands/role/user-add.js +1 -1
  238. package/lib/commands/role/user-remove.js +1 -1
  239. package/lib/commands/role/user-resolve.js +1 -1
  240. package/lib/commands/rule/get.js +1 -1
  241. package/lib/commands/rule/index.js +1 -1
  242. package/lib/commands/rule/list.js +1 -1
  243. package/lib/commands/rule/set.js +1 -1
  244. package/lib/commands/rule/shared.js +1 -1
  245. package/lib/commands/run/index.js +1 -1
  246. package/lib/commands/schema.js +1 -1
  247. package/lib/commands/sql/create.js +1 -1
  248. package/lib/commands/sql/delete.js +1 -1
  249. package/lib/commands/sql/detail.js +1 -1
  250. package/lib/commands/sql/exec.js +1 -1
  251. package/lib/commands/sql/index.js +1 -1
  252. package/lib/commands/sql/list.js +1 -1
  253. package/lib/commands/sql/pull.js +1 -1
  254. package/lib/commands/sql/push.js +1 -1
  255. package/lib/commands/sql/shared.js +1 -1
  256. package/lib/commands/sql/status.js +1 -1
  257. package/lib/commands/sql/validate.js +1 -1
  258. package/lib/commands/task/index.js +1 -1
  259. package/lib/commands/task/status.js +1 -1
  260. package/lib/commands/tenant/index.js +1 -1
  261. package/lib/commands/tenant/members-list.js +1 -1
  262. package/lib/commands/tenant/shared.js +1 -1
  263. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  264. package/lib/commands/user-account/feishu-bind.js +1 -1
  265. package/lib/commands/user-account/index.js +1 -1
  266. package/lib/commands/workspace/add.js +1 -1
  267. package/lib/commands/workspace/index.js +1 -1
  268. package/lib/commands/workspace/remove.js +1 -1
  269. package/lib/config/domain-config.js +1 -1
  270. package/lib/config/project-domain-routing.js +1 -1
  271. package/lib/config/region-config.js +1 -1
  272. package/lib/config/schema.js +1 -1
  273. package/lib/constant/cdn.js +1 -1
  274. package/lib/constant/cli.js +1 -1
  275. package/lib/constant/defaults.js +1 -1
  276. package/lib/constant/domain.js +1 -1
  277. package/lib/constant/env.js +1 -1
  278. package/lib/constant/output.js +1 -1
  279. package/lib/constant/paths.js +1 -1
  280. package/lib/constant/region.js +1 -1
  281. package/lib/constant/risk.js +1 -1
  282. package/lib/constant/routing-profile.js +1 -1
  283. package/lib/context/app-resolver.js +1 -1
  284. package/lib/context/auth-resolver.js +1 -1
  285. package/lib/context/config-loader.js +1 -1
  286. package/lib/context.js +1 -1
  287. package/lib/core/alias-resolver.js +1 -1
  288. package/lib/core/api-client.js +1 -1
  289. package/lib/core/bff/config.js +1 -1
  290. package/lib/core/bff/file-system.js +1 -1
  291. package/lib/core/bff/hash.js +1 -1
  292. package/lib/core/bff/hook-directory.js +1 -1
  293. package/lib/core/bff/lock.js +1 -1
  294. package/lib/core/bff/utils.js +1 -1
  295. package/lib/core/cross-db-analysis.js +1 -1
  296. package/lib/core/cross-db-relation.js +1 -1
  297. package/lib/core/db-resolver.js +1 -1
  298. package/lib/core/flow-config.js +1 -1
  299. package/lib/core/instant-api-policy/config.js +1 -1
  300. package/lib/core/kb-management-client.js +1 -1
  301. package/lib/core/kb-search-client.js +1 -1
  302. package/lib/core/page/file-system.js +1 -1
  303. package/lib/core/page/hash.js +1 -1
  304. package/lib/core/page/lock.js +1 -1
  305. package/lib/core/page/lr-smart-jsx.js +1 -1
  306. package/lib/core/sql-index-auditor.js +1 -1
  307. package/lib/core/sql-sync/config.js +1 -1
  308. package/lib/core/sql-sync/file-system.js +1 -1
  309. package/lib/core/sql-sync/hash.js +1 -1
  310. package/lib/core/sql-sync/lock.js +1 -1
  311. package/lib/core/sql-sync/utils.js +1 -1
  312. package/lib/core/sql-validator.js +1 -1
  313. package/lib/errors.js +1 -1
  314. package/lib/framework/build-all-flags.js +1 -1
  315. package/lib/framework/error-output.js +1 -1
  316. package/lib/framework/explicit-yes.js +1 -1
  317. package/lib/framework/flags.js +1 -1
  318. package/lib/framework/help.js +1 -1
  319. package/lib/framework/index.js +1 -1
  320. package/lib/framework/output.js +1 -1
  321. package/lib/framework/response.js +1 -1
  322. package/lib/framework/runner-alias.js +1 -1
  323. package/lib/framework/runner.js +1 -1
  324. package/lib/framework/schema-export.js +1 -1
  325. package/lib/framework/supported-flags.js +1 -1
  326. package/lib/framework/types.js +1 -1
  327. package/lib/generated/build-info.d.ts +4 -4
  328. package/lib/generated/build-info.js +1 -1
  329. package/lib/generated/official-routing.js +1 -1
  330. package/lib/generated/routing-contract.js +1 -1
  331. package/lib/help.js +1 -1
  332. package/lib/postinstall.js +1 -1
  333. package/lib/runtime/confirmation.js +1 -1
  334. package/lib/runtime/event.js +1 -1
  335. package/lib/runtime/index.js +1 -1
  336. package/lib/runtime/queue.js +1 -1
  337. package/lib/runtime/resolve.js +1 -1
  338. package/lib/services/dataset-design/checkpoint.js +1 -1
  339. package/lib/services/dataset-design/commands.js +1 -1
  340. package/lib/services/dataset-design/contract.js +1 -1
  341. package/lib/skills/builtin-skill.js +1 -1
  342. package/lib/skills/main.js +1 -1
  343. package/lib/skills/npx-skills-add.js +1 -1
  344. package/lib/skills/skill-presence.js +1 -1
  345. package/lib/telemetry/cli-command-trace.js +1 -1
  346. package/lib/telemetry/cli-help-trace.js +1 -1
  347. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  348. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  349. package/lib/telemetry/send-cli-trace-log.js +1 -1
  350. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  351. package/lib/utils/ai_config.js +1 -1
  352. package/lib/utils/apply-jq-filter.js +1 -1
  353. package/lib/utils/cdn-config.js +1 -1
  354. package/lib/utils/check-sdk-version.js +1 -1
  355. package/lib/utils/cli-version-check.js +1 -1
  356. package/lib/utils/cli-version-policy.js +1 -1
  357. package/lib/utils/config.js +1 -1
  358. package/lib/utils/entity-with-id.js +1 -1
  359. package/lib/utils/file-utils.js +1 -1
  360. package/lib/utils/guides-cdn.js +1 -1
  361. package/lib/utils/http-client.js +1 -1
  362. package/lib/utils/is-non-interactive.js +1 -1
  363. package/lib/utils/logger.js +1 -1
  364. package/lib/utils/params.js +1 -1
  365. package/lib/utils/platform.js +1 -1
  366. package/lib/utils/sleep.js +1 -1
  367. package/lib/utils/template-replacer.js +1 -1
  368. package/lib/utils/update-notice.js +1 -1
  369. package/lib/utils/version.js +1 -1
  370. package/lib/utils/with-active-cookie.js +1 -1
  371. package/lib/utils/write-cli-side-channel.js +1 -1
  372. package/package.json +1 -1
  373. package/skills/rabetbase/SKILL.md +1 -1
  374. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  375. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  376. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a299_0x32ec5c=a299_0x380b;(function(_0x375580,_0x3a2e74){const _0x5592ab=a299_0x380b,_0x240f82=_0x375580();while(!![]){try{const _0x198d58=-parseInt(_0x5592ab(0x1f7))/0x1*(-parseInt(_0x5592ab(0xde))/0x2)+-parseInt(_0x5592ab(0x13b))/0x3+parseInt(_0x5592ab(0x14e))/0x4+parseInt(_0x5592ab(0x12a))/0x5*(parseInt(_0x5592ab(0xea))/0x6)+-parseInt(_0x5592ab(0x189))/0x7*(-parseInt(_0x5592ab(0x1ab))/0x8)+parseInt(_0x5592ab(0x1de))/0x9+-parseInt(_0x5592ab(0xeb))/0xa;if(_0x198d58===_0x3a2e74)break;else _0x240f82['push'](_0x240f82['shift']());}catch(_0x4fa401){_0x240f82['push'](_0x240f82['shift']());}}}(a299_0x58a2,0xa3fd4));import{randomUUID}from'node:crypto';import{chmod,link,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{resolve}from'node:path';function a299_0x380b(_0xe827d5,_0x583287){_0xe827d5=_0xe827d5-0xa3;const _0x58a260=a299_0x58a2();let _0x380b9c=_0x58a260[_0xe827d5];return _0x380b9c;}export const FLOW_CONFIG_JSON_SCHEMA={'$schema':a299_0x32ec5c(0x1a0),'$id':a299_0x32ec5c(0xfe),'title':a299_0x32ec5c(0xec),'type':'object','required':[a299_0x32ec5c(0xd5),a299_0x32ec5c(0x1b0),'flowJson'],'$defs':{'userId':{'anyOf':[{'type':a299_0x32ec5c(0x204),'minLength':0x1},{'type':a299_0x32ec5c(0x133),'minimum':0x1}]},'position':{'type':a299_0x32ec5c(0x1b2),'required':['x','y'],'properties':{'x':{'type':a299_0x32ec5c(0xfb),'minimum':0x0},'y':{'type':'number','minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a299_0x32ec5c(0x1b2),'required':[a299_0x32ec5c(0x14f),a299_0x32ec5c(0x1b6)],'properties':{'value':{'type':a299_0x32ec5c(0x133),'minimum':0x1},'unit':{'enum':[a299_0x32ec5c(0xc1),a299_0x32ec5c(0x148),a299_0x32ec5c(0x144),'DAYS']}},'additionalProperties':!![]},'flowNode':{'type':'object','required':['id',a299_0x32ec5c(0x1f4),a299_0x32ec5c(0xfc),a299_0x32ec5c(0xf3)],'properties':{'id':{'type':a299_0x32ec5c(0x204),'pattern':a299_0x32ec5c(0x16a)},'type':{'enum':['START',a299_0x32ec5c(0x188),a299_0x32ec5c(0xb7),a299_0x32ec5c(0x16c),'SCRIPT',a299_0x32ec5c(0x1c3)]},'name':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'path':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'position':{'$ref':a299_0x32ec5c(0xe4)},'approvalMode':{'enum':['SINGLE',a299_0x32ec5c(0xb2),'ANY']},'taskMode':{'enum':[a299_0x32ec5c(0xb7),a299_0x32ec5c(0x1b3)]},'assignee':{'type':a299_0x32ec5c(0x1b2),'required':[a299_0x32ec5c(0x193)],'properties':{'strategy':{'enum':[a299_0x32ec5c(0x10d),a299_0x32ec5c(0x1dd)]},'userIds':{'type':a299_0x32ec5c(0x1ff),'minItems':0x1,'items':{'$ref':a299_0x32ec5c(0x159)}},'roleId':{'anyOf':[{'type':'integer','minimum':0x1},{'type':a299_0x32ec5c(0x204),'pattern':a299_0x32ec5c(0x131)}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':[a299_0x32ec5c(0x193),'userIds'],'properties':{'strategy':{'const':a299_0x32ec5c(0x10d)},'userIds':{'type':a299_0x32ec5c(0x1ff),'minItems':0x1,'items':{'$ref':'#/$defs/userId'}}},'additionalProperties':!![]},'sequential':{'type':a299_0x32ec5c(0x18b)},'result':{'enum':[a299_0x32ec5c(0x1d5),a299_0x32ec5c(0x1b4)]},'scriptName':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'resultVariable':{'type':'string','pattern':a299_0x32ec5c(0x16a)},'async':{'type':a299_0x32ec5c(0x1b2),'properties':{'enabled':{'type':a299_0x32ec5c(0x18b)},'retryCount':{'type':a299_0x32ec5c(0x133),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':'#/$defs/timeAmount'}},'additionalProperties':!![]},'timeout':{'type':a299_0x32ec5c(0x1b2),'properties':{'enabled':{'type':a299_0x32ec5c(0x18b)},'duration':{'$ref':'#/$defs/timeAmount'},'action':{'enum':[a299_0x32ec5c(0x116),a299_0x32ec5c(0x150),a299_0x32ec5c(0xaf)]},'interrupting':{'type':a299_0x32ec5c(0x18b)},'scriptName':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'resultVariable':{'type':'string','pattern':a299_0x32ec5c(0x16a)}},'additionalProperties':!![]},'cc':{'type':a299_0x32ec5c(0x1b2),'required':[a299_0x32ec5c(0x1a5)],'properties':{'recipientUserIds':{'type':a299_0x32ec5c(0x1ff),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a299_0x32ec5c(0x204),'minLength':0x1}},'visible':{'type':a299_0x32ec5c(0x1ff),'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':[a299_0x32ec5c(0xa4),a299_0x32ec5c(0x1e4)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'failurePolicy':{'enum':['CONTINUE',a299_0x32ec5c(0x200)]},'template':{'type':'object','required':['title',a299_0x32ec5c(0x167)],'properties':{'title':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'summary':{'type':'string','minLength':0x1},'detailMarkdown':{'type':a299_0x32ec5c(0x204)},'facts':{'type':'array','maxItems':0x8,'items':{'type':a299_0x32ec5c(0x1b2),'required':[a299_0x32ec5c(0x112),a299_0x32ec5c(0x14f)],'properties':{'label':{'type':'string','minLength':0x1},'value':{'type':a299_0x32ec5c(0x204),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a299_0x32ec5c(0x1ff),'maxItems':0x2,'items':{'type':a299_0x32ec5c(0x1b2),'required':[a299_0x32ec5c(0x118),'url'],'properties':{'text':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'url':{'type':a299_0x32ec5c(0x204),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0x32ec5c(0x1ff),'items':{'type':a299_0x32ec5c(0x1b2),'required':[a299_0x32ec5c(0x1f4),'value'],'properties':{'type':{'enum':[a299_0x32ec5c(0x1ad),'ROLE',a299_0x32ec5c(0xae)]},'value':{'type':'string','minLength':0x1},'role':{'enum':['TO','CC',a299_0x32ec5c(0x19f)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0x32ec5c(0x1b2),'properties':{'id':{'type':a299_0x32ec5c(0x204),'pattern':a299_0x32ec5c(0x16a)},'source':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'target':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'sourceNodeId':{'type':'string','minLength':0x1},'targetNodeId':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'conditionType':{'enum':[a299_0x32ec5c(0x198),a299_0x32ec5c(0x1d5),a299_0x32ec5c(0x1b4),a299_0x32ec5c(0x180)]},'expression':{'type':a299_0x32ec5c(0x204)},'defaultFlow':{'type':a299_0x32ec5c(0x18b)},'name':{'type':a299_0x32ec5c(0x204)},'waypoints':{'type':a299_0x32ec5c(0x1ff),'items':{'$ref':'#/$defs/position'}}},'allOf':[{'anyOf':[{'required':[a299_0x32ec5c(0x199)]},{'required':[a299_0x32ec5c(0x1ca)]}]},{'anyOf':[{'required':[a299_0x32ec5c(0x20b)]},{'required':[a299_0x32ec5c(0x103)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'flowDesc':{'type':a299_0x32ec5c(0x204)},'flowType':{'enum':[a299_0x32ec5c(0x1cd),'INDEPENDENT_FLOW']},'datasetCode':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'pageId':{'type':a299_0x32ec5c(0x133),'minimum':0x1,'maximum':Number[a299_0x32ec5c(0x1b1)]},'pageIds':{'type':'array','items':{'type':a299_0x32ec5c(0x133),'minimum':0x1,'maximum':Number[a299_0x32ec5c(0x1b1)]}},'templateName':![],'flowJson':{'type':a299_0x32ec5c(0x1b2),'required':['nodes',a299_0x32ec5c(0xc4)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a299_0x32ec5c(0x204),'const':a299_0x32ec5c(0x201),'description':a299_0x32ec5c(0x19c)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0x32ec5c(0x1a2)},'startPageId':![],'startPath':{'type':a299_0x32ec5c(0x204),'minLength':0x1},'nodes':{'type':'array','minItems':0x1,'items':{'$ref':a299_0x32ec5c(0x1c9)}},'edges':{'type':'array','minItems':0x1,'items':{'$ref':a299_0x32ec5c(0x19d)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a299_0x32ec5c(0x125),a299_0x32ec5c(0xff),a299_0x32ec5c(0xd5),a299_0x32ec5c(0x174),a299_0x32ec5c(0xac),a299_0x32ec5c(0x1ae),a299_0x32ec5c(0xe8),a299_0x32ec5c(0xbc)],REMOVED_ROOT_FIELDS=['id',a299_0x32ec5c(0x1ae),a299_0x32ec5c(0xbc)],DEFAULT_FLOW_SCHEMA_VERSION=a299_0x32ec5c(0x201),NODE_TYPES=new Set([a299_0x32ec5c(0x151),a299_0x32ec5c(0x188),a299_0x32ec5c(0xb7),a299_0x32ec5c(0x16c),a299_0x32ec5c(0x115),a299_0x32ec5c(0x1c3)]),CONDITION_TYPES=new Set([a299_0x32ec5c(0x198),a299_0x32ec5c(0x1d5),a299_0x32ec5c(0x1b4),a299_0x32ec5c(0x180)]),APPROVAL_MODES=new Set([a299_0x32ec5c(0xba),a299_0x32ec5c(0xb2),a299_0x32ec5c(0x13a)]),APPROVAL_TASK_MODES=new Set([a299_0x32ec5c(0xb7),a299_0x32ec5c(0x1b3)]),FLOW_TIME_UNITS=new Set([a299_0x32ec5c(0xc1),'MINUTES',a299_0x32ec5c(0x144),a299_0x32ec5c(0x1f2)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a299_0x32ec5c(0x116),a299_0x32ec5c(0x150),a299_0x32ec5c(0xaf)]),FLOW_TYPES=new Set([a299_0x32ec5c(0x1cd),a299_0x32ec5c(0x208)]),FLOW_PAGE_MODES=new Set([a299_0x32ec5c(0x1a2),'PLATFORM_FORM']),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([a299_0x32ec5c(0xca),'FAIL']),NOTIFICATION_RECIPIENT_TYPES=new Set([a299_0x32ec5c(0x1ad),a299_0x32ec5c(0x1dd),'EMAIL']),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a299_0x32ec5c(0x19f)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE='scriptResult',UNSUPPORTED_FORM_MESSAGE=a299_0x32ec5c(0x19e),UNSUPPORTED_PLATFORM_FORM_MESSAGE='PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.',RESERVED_RESULT_VARIABLES=new Set([a299_0x32ec5c(0xd4),a299_0x32ec5c(0x14d),a299_0x32ec5c(0x1f5),a299_0x32ec5c(0x1c5),a299_0x32ec5c(0x140),a299_0x32ec5c(0x17a),a299_0x32ec5c(0x1e8),a299_0x32ec5c(0x10c),a299_0x32ec5c(0x1cb),'approval_sys_dataId']);export function normalizeFlowConfig(_0x18121d){const _0x6c5624=a299_0x32ec5c;if(!isRecord(_0x18121d))throw new TypeError(_0x6c5624(0xb0));const _0x5f4592=cloneJsonValue(_0x18121d),_0x13286d=_0x5f4592[_0x6c5624(0xb8)],_0x41a6b2=isRecord(_0x13286d)?cloneJsonValue(_0x13286d):{},_0x9ee811=[],_0x173db7=[];for(const _0x16a169 of REMOVED_ROOT_FIELDS){if(!Object['prototype'][_0x6c5624(0x16d)][_0x6c5624(0x205)](_0x5f4592,_0x16a169))continue;delete _0x5f4592[_0x16a169],_0x173db7[_0x6c5624(0x1a4)](_0x16a169),_0x9ee811[_0x6c5624(0x1a4)]({'code':_0x6c5624(0xcd),'path':_0x16a169,'message':_0x16a169+_0x6c5624(0x18a)});}for(const _0x2535ef of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x6c5624(0x15a)][_0x6c5624(0x16d)][_0x6c5624(0x205)](_0x41a6b2,_0x2535ef))continue;const _0x3db229=_0x6c5624(0x1b5)+_0x2535ef;delete _0x41a6b2[_0x2535ef],_0x173db7['push'](_0x3db229),_0x9ee811[_0x6c5624(0x1a4)]({'code':'legacy_field_removed','path':_0x3db229,'message':_0x3db229+_0x6c5624(0x18a)});}if(Object[_0x6c5624(0x15a)][_0x6c5624(0x16d)][_0x6c5624(0x205)](_0x41a6b2,'schemaVersion')){const _0xc0e93d=_0x41a6b2[_0x6c5624(0x155)],_0x2d614c=typeof _0xc0e93d==='string'?_0xc0e93d[_0x6c5624(0x104)]():_0xc0e93d;if(isEmptyJsonValue(_0xc0e93d)||_0x2d614c===DEFAULT_FLOW_SCHEMA_VERSION){const _0x2ce0cd=_0x6c5624(0x169);delete _0x41a6b2[_0x6c5624(0x155)],_0x173db7['push'](_0x2ce0cd),_0x9ee811[_0x6c5624(0x1a4)]({'code':'legacy_field_removed','path':_0x2ce0cd,'message':_0x2ce0cd+_0x6c5624(0x17e)+DEFAULT_FLOW_SCHEMA_VERSION+_0x6c5624(0x184)});}}removeEmptyMetadata(_0x41a6b2,_0x6c5624(0xb8),_0x9ee811,_0x173db7);_0x5f4592['flowType']===_0x6c5624(0x208)&&!Object[_0x6c5624(0x15a)][_0x6c5624(0x16d)]['call'](_0x41a6b2,_0x6c5624(0x13d))&&(_0x41a6b2[_0x6c5624(0x13d)]=_0x6c5624(0x1a2));_0x5f4592[_0x6c5624(0xb8)]=_0x41a6b2;if(typeof _0x5f4592[_0x6c5624(0xd5)]===_0x6c5624(0x204))_0x5f4592['flowName']=_0x5f4592[_0x6c5624(0xd5)]['trim']();return{'config':_0x5f4592,'warnings':_0x9ee811,'removedPaths':_0x173db7};}export function validateFlowConfig(_0x458398){const _0x5793b7=a299_0x32ec5c;let _0x43d58d;try{_0x43d58d=normalizeFlowConfig(_0x458398);}catch(_0x59ddf4){const _0x5b7d88=_0x59ddf4 instanceof Error?_0x59ddf4['message']:String(_0x59ddf4),_0x386f86={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x5b7d88}],'warnings':[],'normalized':_0x386f86,'validationConfig':_0x386f86};}const _0x5a345b=_0x43d58d[_0x5793b7(0x130)],_0x3bb748=cloneJsonValue(_0x5a345b),_0x9d21b1=_0x3bb748[_0x5793b7(0xb8)];_0x9d21b1[_0x5793b7(0x125)]=_0x5793b7(0x1e3),_0x9d21b1[_0x5793b7(0xd5)]=_0x5a345b[_0x5793b7(0xd5)];typeof _0x5a345b['datasetCode']===_0x5793b7(0x204)&&_0x5a345b['datasetCode'][_0x5793b7(0x104)]()&&(_0x9d21b1[_0x5793b7(0x174)]=_0x5a345b[_0x5793b7(0xac)]['trim']());const _0x20743e=[];return validateOuterMetadata(_0x5a345b,_0x20743e),validateFlowClassification(_0x5a345b,_0x20743e),validateGraph(_0x5a345b[_0x5793b7(0xb8)],_0x20743e),{'valid':_0x20743e['length']===0x0,'errors':_0x20743e,'warnings':_0x43d58d[_0x5793b7(0xc6)],'normalized':_0x5a345b,'validationConfig':_0x3bb748};}function validateFlowClassification(_0x2b3577,_0xaf8349){const _0x1470d7=a299_0x32ec5c;if(!isRecord(_0x2b3577[_0x1470d7(0xb8)]))return;const _0x3e7387=_0x2b3577[_0x1470d7(0x1b0)],_0x47d9cd=_0x2b3577['flowJson'][_0x1470d7(0x13d)];_0x47d9cd!==undefined&&(typeof _0x47d9cd!==_0x1470d7(0x204)||!FLOW_PAGE_MODES['has'](_0x47d9cd))&&_0xaf8349[_0x1470d7(0x1a4)]({'path':_0x1470d7(0x108),'message':_0x1470d7(0x17b)+String(_0x47d9cd)+'.'});_0x3e7387===_0x1470d7(0x1cd)&&_0x47d9cd!==undefined&&_0xaf8349[_0x1470d7(0x1a4)]({'path':_0x1470d7(0x108),'message':_0x1470d7(0xce)});_0x3e7387===_0x1470d7(0x208)&&_0x47d9cd==='PLATFORM_FORM'&&_0xaf8349[_0x1470d7(0x1a4)]({'path':_0x1470d7(0x108),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x3e7387===_0x1470d7(0x1cd)||_0x3e7387===_0x1470d7(0x208))&&validateCustomPageNavigation(_0x2b3577,_0x3e7387,_0x47d9cd,_0xaf8349);if(_0x3e7387!==_0x1470d7(0x1cd)||!Array[_0x1470d7(0x109)](_0x2b3577[_0x1470d7(0xb8)]['nodes']))return;_0x2b3577[_0x1470d7(0xb8)][_0x1470d7(0x156)][_0x1470d7(0x1df)]((_0x309280,_0x54bf66)=>{const _0x35dc85=_0x1470d7;isRecord(_0x309280)&&_0x309280[_0x35dc85(0x1f4)]===_0x35dc85(0xb7)&&_0x309280[_0x35dc85(0xc0)]===_0x35dc85(0x1b3)&&_0xaf8349['push']({'path':_0x35dc85(0x137)+_0x54bf66+'].taskMode','message':_0x35dc85(0x1b7)});});}function validateCustomPageNavigation(_0x2b8f79,_0x5edbfa,_0x3bd287,_0x262534){const _0x1011ab=a299_0x32ec5c,_0x2a7312=_0x2b8f79[_0x1011ab(0xb8)][_0x1011ab(0x1e2)];_0x2a7312!==undefined&&_0x262534[_0x1011ab(0x1a4)]({'path':'flowJson.startPageId','message':'startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.'});const _0x2eabf3=_0x2b8f79[_0x1011ab(0xb8)][_0x1011ab(0xe1)];_0x2eabf3!==undefined&&(typeof _0x2eabf3!=='string'||_0x2eabf3[_0x1011ab(0x104)]()==='')&&_0x262534[_0x1011ab(0x1a4)]({'path':_0x1011ab(0x1e1),'message':_0x1011ab(0x1e6)});const _0xc485c6=Array[_0x1011ab(0x109)](_0x2b8f79['flowJson'][_0x1011ab(0x156)])?_0x2b8f79[_0x1011ab(0xb8)][_0x1011ab(0x156)]['map']((_0xdc7fda,_0x3dbb88)=>({'node':_0xdc7fda,'index':_0x3dbb88}))['filter'](({node:_0x6a2a82})=>isRecord(_0x6a2a82)&&_0x6a2a82[_0x1011ab(0x1d8)]!==undefined):[],_0x49ab8d=_0x2eabf3!==undefined||_0xc485c6[_0x1011ab(0x124)]>0x0,_0xfe9103=_0x3bd287===undefined&&_0x5edbfa===_0x1011ab(0x208)?_0x1011ab(0x1a2):_0x3bd287;_0x49ab8d&&(_0x5edbfa!=='INDEPENDENT_FLOW'||_0xfe9103!==_0x1011ab(0x1a2))&&(_0x2eabf3!==undefined&&_0x262534[_0x1011ab(0x1a4)]({'path':'flowJson.startPath','message':'startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'}),_0xc485c6['forEach'](({index:_0x49fff7})=>{const _0x2f5339=_0x1011ab;_0x262534[_0x2f5339(0x1a4)]({'path':_0x2f5339(0x137)+_0x49fff7+_0x2f5339(0x1f9),'message':'node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'});}));}export async function writeNormalizedFlowConfig(_0x3aceef,_0x50710c,_0xd73d9a={}){const _0x1e8151=a299_0x32ec5c,_0x4d8147=resolve(_0x3aceef),_0x66070d=_0x4d8147+'.'+process[_0x1e8151(0x16b)]+'.'+randomUUID()+_0x1e8151(0x1a8),_0x2e7ea8=JSON[_0x1e8151(0x158)](_0x50710c,null,0x2)+'\x0a';let _0x3d65b3;try{try{_0x3d65b3=(await stat(_0x4d8147))[_0x1e8151(0x142)]&0x1ff;}catch{_0x3d65b3=undefined;}await writeFile(_0x66070d,_0x2e7ea8,{'encoding':_0x1e8151(0x164),'flag':'wx','mode':_0x3d65b3??0x1a4});if(_0x3d65b3!==undefined)await chmod(_0x66070d,_0x3d65b3);_0xd73d9a[_0x1e8151(0xbe)]===![]?(await link(_0x66070d,_0x4d8147),await unlink(_0x66070d)):await rename(_0x66070d,_0x4d8147);}finally{await unlink(_0x66070d)[_0x1e8151(0xa9)](()=>undefined);}}function validateOuterMetadata(_0x5b1247,_0x4f73d1){const _0x500138=a299_0x32ec5c;(typeof _0x5b1247[_0x500138(0xd5)]!==_0x500138(0x204)||_0x5b1247[_0x500138(0xd5)]['trim']()==='')&&_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0xd5),'message':_0x500138(0x139)});_0x5b1247[_0x500138(0x157)]!==undefined&&typeof _0x5b1247[_0x500138(0x157)]!==_0x500138(0x204)&&_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0x157),'message':_0x500138(0x1bf)});if(_0x5b1247['flowType']===undefined||_0x5b1247['flowType']===null)_0x4f73d1['push']({'path':'flowType','message':_0x500138(0x15e)});else(typeof _0x5b1247['flowType']!=='string'||!FLOW_TYPES[_0x500138(0xbf)](_0x5b1247[_0x500138(0x1b0)]))&&_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0x1b0),'message':_0x500138(0x1f3)+String(_0x5b1247[_0x500138(0x1b0)])+'.'});_0x5b1247[_0x500138(0xac)]!==undefined&&typeof _0x5b1247['datasetCode']!=='string'&&_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0xac),'message':_0x500138(0xe0)});_0x5b1247[_0x500138(0x10b)]===undefined&&_0x5b1247['pageId']!==undefined&&(!Number[_0x500138(0x175)](_0x5b1247[_0x500138(0xe8)])||_0x5b1247[_0x500138(0xe8)]<=0x0)&&_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0xe8),'message':_0x500138(0x196)});if(_0x5b1247[_0x500138(0x10b)]!==undefined){if(!Array[_0x500138(0x109)](_0x5b1247['pageIds'])||_0x5b1247[_0x500138(0x10b)][_0x500138(0x20a)](_0x4a174a=>!Number['isSafeInteger'](_0x4a174a)||_0x4a174a<=0x0))_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0x10b),'message':_0x500138(0x18c)});else[...new Set(_0x5b1247[_0x500138(0x10b)])][_0x500138(0x1d6)](',')[_0x500138(0x124)]>0x800&&_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0x10b),'message':_0x500138(0xf9)});_0x5b1247[_0x500138(0x1b0)]===_0x500138(0x208)&&Array[_0x500138(0x109)](_0x5b1247[_0x500138(0x10b)])&&_0x5b1247[_0x500138(0x10b)][_0x500138(0x124)]>0x0&&_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0x10b),'message':_0x500138(0x1d9)});}_0x5b1247[_0x500138(0x1b0)]===_0x500138(0x208)&&_0x5b1247[_0x500138(0xac)]!==undefined&&_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0xac),'message':_0x500138(0xc9)}),_0x5b1247[_0x500138(0x1b0)]===_0x500138(0x208)&&_0x5b1247[_0x500138(0x10b)]===undefined&&_0x5b1247[_0x500138(0xe8)]!==undefined&&_0x4f73d1[_0x500138(0x1a4)]({'path':_0x500138(0xe8),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.'});}function validateGraph(_0x1f2e2e,_0x59a023){const _0x4bc5cd=a299_0x32ec5c;if(!isRecord(_0x1f2e2e)){_0x59a023[_0x4bc5cd(0x1a4)]({'path':_0x4bc5cd(0xb8),'message':_0x4bc5cd(0x203)});return;}!Array['isArray'](_0x1f2e2e[_0x4bc5cd(0x156)])&&_0x59a023['push']({'path':_0x4bc5cd(0x1d2),'message':'nodes\x20must\x20be\x20an\x20array.'});!Array[_0x4bc5cd(0x109)](_0x1f2e2e[_0x4bc5cd(0xc4)])&&_0x59a023[_0x4bc5cd(0x1a4)]({'path':'flowJson.edges','message':_0x4bc5cd(0xf8)});Object['prototype'][_0x4bc5cd(0x16d)]['call'](_0x1f2e2e,_0x4bc5cd(0x155))&&_0x59a023[_0x4bc5cd(0x1a4)]({'path':_0x4bc5cd(0x169),'message':_0x4bc5cd(0x181)+String(_0x1f2e2e['schemaVersion'])+_0x4bc5cd(0xf2)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x4eceaf of[_0x4bc5cd(0x100),_0x4bc5cd(0x161),_0x4bc5cd(0xf0)]){Object[_0x4bc5cd(0x15a)][_0x4bc5cd(0x16d)]['call'](_0x1f2e2e,_0x4eceaf)&&_0x59a023['push']({'path':_0x4bc5cd(0x1b5)+_0x4eceaf,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array['isArray'](_0x1f2e2e[_0x4bc5cd(0x156)])||!Array[_0x4bc5cd(0x109)](_0x1f2e2e[_0x4bc5cd(0xc4)]))return;const _0x32b2be=new Map(),_0x46987c=[],_0x59cdd0=[],_0x53c50=new Map(),_0x54ef87=new Map(),_0x5d13b0=new Set();let _0x183dfe=0x0;_0x1f2e2e[_0x4bc5cd(0x156)]['forEach']((_0x532246,_0x5dc4d3)=>{const _0x17d8d2=_0x4bc5cd,_0x4a54b6='flowJson.nodes['+_0x5dc4d3+']';if(!isRecord(_0x532246)){_0x59a023['push']({'path':_0x4a54b6,'message':'node\x20must\x20be\x20an\x20object.'});return;}const _0x4e9876=_0x532246;if(typeof _0x4e9876['id']!==_0x17d8d2(0x204)||!BPMN_ID_PATTERN[_0x17d8d2(0xc8)](_0x4e9876['id']))_0x59a023[_0x17d8d2(0x1a4)]({'path':_0x4a54b6+_0x17d8d2(0xbb),'message':'node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else _0x32b2be[_0x17d8d2(0xbf)](_0x4e9876['id'])?_0x59a023[_0x17d8d2(0x1a4)]({'path':_0x4a54b6+_0x17d8d2(0xbb),'message':_0x17d8d2(0x170)+_0x4e9876['id']+'.'}):(_0x32b2be[_0x17d8d2(0x1d7)](_0x4e9876['id'],_0x4e9876),_0x5d13b0[_0x17d8d2(0x138)](_0x4e9876['id']));if(!NODE_TYPES[_0x17d8d2(0xbf)](_0x4e9876[_0x17d8d2(0x1f4)]))_0x59a023[_0x17d8d2(0x1a4)]({'path':_0x4a54b6+'.type','message':'Unsupported\x20node\x20type:\x20'+String(_0x4e9876[_0x17d8d2(0x1f4)])+'.'});else{if(_0x4e9876[_0x17d8d2(0x1f4)]===_0x17d8d2(0x151))_0x46987c[_0x17d8d2(0x1a4)](_0x4e9876['id']);else _0x4e9876[_0x17d8d2(0x1f4)]===_0x17d8d2(0x188)&&_0x59cdd0['push'](_0x4e9876['id']);}_0x4e9876['type']==='APPROVAL'&&(_0x4e9876[_0x17d8d2(0xc0)]===undefined||_0x4e9876[_0x17d8d2(0xc0)]===_0x17d8d2(0xb7))&&(_0x183dfe+=0x1);validateNode(_0x4e9876,_0x4a54b6,_0x59a023);if(_0x4e9876['type']===_0x17d8d2(0x115)){const _0x3b6e26=resolveEffectiveResultVariable(_0x4e9876[_0x17d8d2(0x1ec)],![]);_0x3b6e26&&(registerResultVariableOwner(_0x54ef87,_0x3b6e26,_0x4e9876['id'],_0x59a023),!_0x53c50[_0x17d8d2(0xbf)](_0x3b6e26)&&_0x53c50[_0x17d8d2(0x1d7)](_0x3b6e26,_0x4e9876['id']));}if(_0x4e9876['type']==='APPROVAL'&&isRecord(_0x4e9876[_0x17d8d2(0xa7)])&&_0x4e9876[_0x17d8d2(0xa7)][_0x17d8d2(0x1e7)]===!![]&&_0x4e9876['timeout']['action']===_0x17d8d2(0xaf)){const _0x960fc4=resolveEffectiveResultVariable(_0x4e9876[_0x17d8d2(0xa7)][_0x17d8d2(0x1ec)],!![]);_0x960fc4&&registerResultVariableOwner(_0x54ef87,_0x960fc4,_0x4e9876['id']+_0x17d8d2(0xc7),_0x59a023);}});_0x46987c['length']!==0x1&&_0x59a023[_0x4bc5cd(0x1a4)]({'path':_0x4bc5cd(0x1d2),'message':_0x4bc5cd(0x1bb)});_0x59cdd0['length']===0x0&&_0x59a023[_0x4bc5cd(0x1a4)]({'path':_0x4bc5cd(0x1d2),'message':_0x4bc5cd(0x191)});const _0x4fe95c=new Map(),_0x2b173c=new Map(),_0x13bd26=new Map(),_0x56c4cb=new Set();_0x1f2e2e['edges'][_0x4bc5cd(0x1df)]((_0x11bb51,_0x45c172)=>{const _0x11d325=_0x4bc5cd,_0x395274=_0x11d325(0xd1)+_0x45c172+']';if(!isRecord(_0x11bb51)){_0x59a023[_0x11d325(0x1a4)]({'path':_0x395274,'message':'edge\x20must\x20be\x20an\x20object.'});return;}const _0x2cc3a9=_0x11bb51;_0x13bd26[_0x11d325(0x1d7)](_0x2cc3a9,_0x395274);const _0x17972f=resolveEdgeEndpoint(_0x2cc3a9[_0x11d325(0x199)],_0x2cc3a9[_0x11d325(0x1ca)]),_0x3295ce=resolveEdgeEndpoint(_0x2cc3a9[_0x11d325(0x20b)],_0x2cc3a9[_0x11d325(0x103)]);if(!_0x17972f)_0x59a023[_0x11d325(0x1a4)]({'path':_0x395274+_0x11d325(0x132),'message':_0x11d325(0x136)});if(!_0x3295ce)_0x59a023[_0x11d325(0x1a4)]({'path':_0x395274+_0x11d325(0x1d0),'message':_0x11d325(0x1c4)});_0x17972f&&!_0x32b2be['has'](_0x17972f)&&_0x59a023['push']({'path':_0x395274+_0x11d325(0x132),'message':_0x11d325(0x1da)+_0x17972f+'.'});_0x3295ce&&!_0x32b2be[_0x11d325(0xbf)](_0x3295ce)&&_0x59a023[_0x11d325(0x1a4)]({'path':_0x395274+'.target','message':_0x11d325(0x18d)+_0x3295ce+'.'});if(_0x2cc3a9['id']!==undefined){if(typeof _0x2cc3a9['id']!==_0x11d325(0x204)||!BPMN_ID_PATTERN[_0x11d325(0xc8)](_0x2cc3a9['id']))_0x59a023['push']({'path':_0x395274+_0x11d325(0xbb),'message':_0x11d325(0x1d4)});else{if(_0x5d13b0[_0x11d325(0xbf)](_0x2cc3a9['id']))_0x59a023[_0x11d325(0x1a4)]({'path':_0x395274+_0x11d325(0xbb),'message':_0x11d325(0x16f)+_0x2cc3a9['id']+'.'});else!_0x5d13b0[_0x11d325(0xbf)](_0x2cc3a9['id'])&&_0x5d13b0['add'](_0x2cc3a9['id']);}}if(_0x17972f&&_0x3295ce){const _0x36fcf3=_0x17972f+'\x00'+_0x3295ce+'\x00'+(_0x2cc3a9[_0x11d325(0x111)]??_0x11d325(0x198));_0x56c4cb[_0x11d325(0xbf)](_0x36fcf3)?_0x59a023['push']({'path':_0x395274,'message':_0x11d325(0xab)+_0x17972f+_0x11d325(0x12f)+_0x3295ce+'\x20('+(_0x2cc3a9[_0x11d325(0x111)]??'ALWAYS')+').'}):_0x56c4cb[_0x11d325(0x138)](_0x36fcf3);}validateEdge(_0x2cc3a9,_0x395274,_0x59a023),_0x17972f&&_0x3295ce&&(_0x4fe95c[_0x11d325(0xdf)](_0x17972f)?.[_0x11d325(0x1a4)](_0x2cc3a9)??_0x4fe95c['set'](_0x17972f,[_0x2cc3a9]),_0x2b173c[_0x11d325(0xdf)](_0x3295ce)?.[_0x11d325(0x1a4)](_0x2cc3a9)??_0x2b173c[_0x11d325(0x1d7)](_0x3295ce,[_0x2cc3a9]));});if(_0x46987c[_0x4bc5cd(0x124)]!==0x1)return;validateGraphShape(_0x32b2be,_0x46987c[0x0],_0x59cdd0,_0x4fe95c,_0x2b173c,_0x13bd26,_0x59a023),validateScriptResultReferences(_0x32b2be,_0x46987c[0x0],_0x4fe95c,_0x2b173c,_0x13bd26,_0x53c50,_0x59a023),validateApprovalResults(_0x32b2be,_0x183dfe,_0x59cdd0,_0x59a023);}function validateNode(_0x178b9f,_0xe410f3,_0x3edf7f){const _0xcdf5c5=a299_0x32ec5c;for(const _0xf729bb of['form',_0xcdf5c5(0x1f0)]){Object[_0xcdf5c5(0x15a)][_0xcdf5c5(0x16d)]['call'](_0x178b9f,_0xf729bb)&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+'.'+_0xf729bb,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0xcdf5c5(0xbf)](_0x178b9f[_0xcdf5c5(0x1f4)]))return;(typeof _0x178b9f[_0xcdf5c5(0xfc)]!==_0xcdf5c5(0x204)||_0x178b9f[_0xcdf5c5(0xfc)]['trim']()==='')&&_0x3edf7f['push']({'path':_0xe410f3+_0xcdf5c5(0x153),'message':_0xcdf5c5(0x107)});_0x178b9f[_0xcdf5c5(0xe8)]!==undefined&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0x134),'message':'node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.'});if(_0x178b9f[_0xcdf5c5(0x1d8)]!==undefined){if(typeof _0x178b9f[_0xcdf5c5(0x1d8)]!=='string'||_0x178b9f[_0xcdf5c5(0x1d8)][_0xcdf5c5(0x104)]()==='')_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+'.path','message':_0xcdf5c5(0xef)});else _0x178b9f[_0xcdf5c5(0x1f4)]!==_0xcdf5c5(0xb7)&&_0x178b9f[_0xcdf5c5(0x1f4)]!==_0xcdf5c5(0x188)&&_0x3edf7f['push']({'path':_0xe410f3+_0xcdf5c5(0xb9),'message':_0xcdf5c5(0x11c)});}const _0x10581b=_0x178b9f[_0xcdf5c5(0xf3)];if(!isRecord(_0x10581b))_0x3edf7f['push']({'path':_0xe410f3+_0xcdf5c5(0xdc),'message':_0xcdf5c5(0x162)});else for(const _0x5464ad of['x','y']){const _0x47fd98=_0x10581b[_0x5464ad];(typeof _0x47fd98!==_0xcdf5c5(0xfb)||!Number['isFinite'](_0x47fd98)||_0x47fd98<0x0)&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0x122)+_0x5464ad,'message':_0xcdf5c5(0xd8)+_0x5464ad+_0xcdf5c5(0x173)});}if(_0x178b9f[_0xcdf5c5(0x1f4)]==='APPROVAL'){const _0x256d4b=_0x178b9f['approvalMode']??_0xcdf5c5(0xba),_0x75152b=_0x178b9f[_0xcdf5c5(0xc0)]??_0xcdf5c5(0xb7);!APPROVAL_TASK_MODES[_0xcdf5c5(0xbf)](_0x75152b)&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+'.taskMode','message':'Unsupported\x20task\x20mode:\x20'+String(_0x75152b)+'.'});!APPROVAL_MODES[_0xcdf5c5(0xbf)](_0x256d4b)&&_0x3edf7f['push']({'path':_0xe410f3+_0xcdf5c5(0x1d1),'message':_0xcdf5c5(0x1bc)+String(_0x256d4b)+'.'});if(!isRecord(_0x178b9f[_0xcdf5c5(0x202)]))_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0xf6),'message':'APPROVAL\x20node\x20requires\x20assignee.'});else{const _0x572a4b=_0x178b9f[_0xcdf5c5(0x202)][_0xcdf5c5(0x193)];_0x572a4b!==_0xcdf5c5(0x10d)&&_0x572a4b!=='ROLE'&&_0x3edf7f['push']({'path':_0xe410f3+_0xcdf5c5(0x152),'message':'assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.'});if(_0x572a4b==='FIXED'){const _0x50d752=_0x178b9f[_0xcdf5c5(0x202)]['userIds'];if(!Array[_0xcdf5c5(0x109)](_0x50d752)||_0x50d752[_0xcdf5c5(0x124)]===0x0)_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0x15d),'message':_0xcdf5c5(0x166)});else{const _0x19e71b=_0x50d752[_0xcdf5c5(0x143)](_0x29ca5c=>!isValidUserId(_0x29ca5c));_0x19e71b>=0x0&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0xa8)+_0x19e71b+']','message':_0xcdf5c5(0xa6)});const _0x3e6648=new Set(_0x50d752[_0xcdf5c5(0x172)](isValidUserId)[_0xcdf5c5(0x1db)](_0x370047=>String(_0x370047)[_0xcdf5c5(0x104)]()));_0x256d4b===_0xcdf5c5(0xba)&&_0x3e6648[_0xcdf5c5(0x12e)]>0x1&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+'.assignee.userIds','message':'SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.'});}}if(_0x572a4b==='ROLE'){const _0x543adf=_0x178b9f['assignee']['roleId'],_0x3a95a6=typeof _0x543adf===_0xcdf5c5(0xfb)||typeof _0x543adf===_0xcdf5c5(0x204)?Number(String(_0x543adf)[_0xcdf5c5(0x104)]()):Number[_0xcdf5c5(0x127)];(!Number[_0xcdf5c5(0x175)](_0x3a95a6)||_0x3a95a6<=0x0)&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0x17c),'message':'ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.'});}}if(_0x178b9f['transferCandidates']!==undefined){if(!isRecord(_0x178b9f[_0xcdf5c5(0xee)]))_0x3edf7f['push']({'path':_0xe410f3+_0xcdf5c5(0x19b),'message':_0xcdf5c5(0x1e0)});else{if(_0x178b9f[_0xcdf5c5(0xee)][_0xcdf5c5(0x193)]!==_0xcdf5c5(0x10d))_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0x1a3),'message':_0xcdf5c5(0x12c)});else{const _0x37be70=_0x178b9f['transferCandidates'][_0xcdf5c5(0x160)];if(!Array[_0xcdf5c5(0x109)](_0x37be70)||_0x37be70[_0xcdf5c5(0x124)]===0x0)_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0x168),'message':_0xcdf5c5(0x163)});else{const _0x35ec73=_0x37be70[_0xcdf5c5(0x143)](_0x27ce36=>!isValidUserId(_0x27ce36));_0x35ec73>=0x0&&_0x3edf7f['push']({'path':_0xe410f3+_0xcdf5c5(0x11a)+_0x35ec73+']','message':_0xcdf5c5(0xad)});}}}}}_0x178b9f[_0xcdf5c5(0xd7)]!==undefined&&typeof _0x178b9f[_0xcdf5c5(0xd7)]!==_0xcdf5c5(0x18b)&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0x1cc),'message':'sequential\x20must\x20be\x20a\x20boolean.'});if(_0x178b9f[_0xcdf5c5(0x1f4)]===_0xcdf5c5(0x115)){(typeof _0x178b9f[_0xcdf5c5(0x1a1)]!=='string'||_0x178b9f['scriptName'][_0xcdf5c5(0x104)]()==='')&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+'.scriptName','message':_0xcdf5c5(0x1cf)});if(_0x178b9f[_0xcdf5c5(0x1ec)]!==undefined){if(typeof _0x178b9f['resultVariable']!==_0xcdf5c5(0x204)||!VARIABLE_PATTERN[_0xcdf5c5(0xc8)](_0x178b9f[_0xcdf5c5(0x1ec)]))_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0x1b9),'message':_0xcdf5c5(0x1e9)});else(RESERVED_RESULT_VARIABLES['has'](_0x178b9f[_0xcdf5c5(0x1ec)])||_0x178b9f[_0xcdf5c5(0x1ec)]['startsWith'](_0xcdf5c5(0x16e)))&&_0x3edf7f[_0xcdf5c5(0x1a4)]({'path':_0xe410f3+_0xcdf5c5(0x1b9),'message':_0xcdf5c5(0x129)+_0x178b9f[_0xcdf5c5(0x1ec)]+'.'});}}validateAsyncExecution(_0x178b9f,_0xe410f3,_0x3edf7f),validateApprovalTimeout(_0x178b9f,_0xe410f3,_0x3edf7f),validateCcConfig(_0x178b9f,_0xe410f3,_0x3edf7f),_0x178b9f[_0xcdf5c5(0x1f4)]===_0xcdf5c5(0x1c3)&&validateNotificationConfig(_0x178b9f[_0xcdf5c5(0x130)],_0xe410f3+'.config',_0x3edf7f);}function validateAsyncExecution(_0x3178e9,_0x72daa4,_0x167c26){const _0x9d6810=a299_0x32ec5c;if(_0x3178e9[_0x9d6810(0xbd)]===undefined)return;if(!isRecord(_0x3178e9['async'])){_0x167c26[_0x9d6810(0x1a4)]({'path':_0x72daa4+_0x9d6810(0xda),'message':_0x9d6810(0x13f)});return;}if(_0x3178e9[_0x9d6810(0xbd)][_0x9d6810(0x1e7)]!==undefined&&typeof _0x3178e9[_0x9d6810(0xbd)][_0x9d6810(0x1e7)]!==_0x9d6810(0x18b)){_0x167c26[_0x9d6810(0x1a4)]({'path':_0x72daa4+'.async.enabled','message':_0x9d6810(0xb5)});return;}if(_0x3178e9[_0x9d6810(0xbd)]['enabled']!==!![])return;_0x3178e9['type']!=='SCRIPT'&&_0x167c26[_0x9d6810(0x1a4)]({'path':_0x72daa4+_0x9d6810(0xda),'message':'async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.'});const _0x4a2b46=_0x3178e9['async'][_0x9d6810(0x17f)]??0x3;(!Number['isInteger'](_0x4a2b46)||_0x4a2b46<0x1||_0x4a2b46>MAX_ASYNC_RETRY_COUNT)&&_0x167c26[_0x9d6810(0x1a4)]({'path':_0x72daa4+'.async.retryCount','message':_0x9d6810(0x1ea)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x3178e9[_0x9d6810(0xbd)][_0x9d6810(0x146)]!==undefined&&validateTimeAmount(_0x3178e9[_0x9d6810(0xbd)]['retryInterval'],_0x72daa4+_0x9d6810(0x147),_0x167c26);}function validateApprovalTimeout(_0x4fc753,_0x4bfcca,_0x7b536a){const _0x333e06=a299_0x32ec5c;if(_0x4fc753['timeout']===undefined)return;if(!isRecord(_0x4fc753[_0x333e06(0xa7)])){_0x7b536a['push']({'path':_0x4bfcca+_0x333e06(0xc7),'message':_0x333e06(0xfa)});return;}if(_0x4fc753['timeout'][_0x333e06(0x1e7)]!==undefined&&typeof _0x4fc753['timeout']['enabled']!==_0x333e06(0x18b)){_0x7b536a['push']({'path':_0x4bfcca+_0x333e06(0x1f6),'message':_0x333e06(0x135)});return;}if(_0x4fc753[_0x333e06(0xa7)][_0x333e06(0x1e7)]!==!![])return;if(_0x4fc753[_0x333e06(0xa7)][_0x333e06(0x13e)]!==undefined&&typeof _0x4fc753['timeout'][_0x333e06(0x13e)]!=='boolean'){_0x7b536a[_0x333e06(0x1a4)]({'path':_0x4bfcca+_0x333e06(0xcb),'message':_0x333e06(0xb1)});return;}_0x4fc753[_0x333e06(0x1f4)]!==_0x333e06(0xb7)&&_0x7b536a[_0x333e06(0x1a4)]({'path':_0x4bfcca+_0x333e06(0xc7),'message':_0x333e06(0x1ce)});validateTimeAmount(_0x4fc753[_0x333e06(0xa7)][_0x333e06(0x1af)],_0x4bfcca+'.timeout.duration',_0x7b536a);const _0x514450=_0x4fc753[_0x333e06(0xa7)][_0x333e06(0x117)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x333e06(0xbf)](_0x514450)){_0x7b536a['push']({'path':_0x4bfcca+_0x333e06(0xd6),'message':_0x333e06(0x120)});return;}(_0x4fc753[_0x333e06(0xc0)]??_0x333e06(0xb7))===_0x333e06(0x1b3)&&_0x514450!==_0x333e06(0xaf)&&_0x7b536a[_0x333e06(0x1a4)]({'path':_0x4bfcca+_0x333e06(0xd6),'message':_0x333e06(0x12b)});const _0x35da3f=_0x4fc753['timeout'][_0x333e06(0x13e)]??_0x514450!==_0x333e06(0xaf);if(_0x514450===_0x333e06(0xaf))_0x35da3f&&_0x7b536a[_0x333e06(0x1a4)]({'path':_0x4bfcca+_0x333e06(0xcb),'message':_0x333e06(0xdd)}),(typeof _0x4fc753[_0x333e06(0xa7)][_0x333e06(0x1a1)]!==_0x333e06(0x204)||_0x4fc753[_0x333e06(0xa7)][_0x333e06(0x1a1)]['trim']()==='')&&_0x7b536a[_0x333e06(0x1a4)]({'path':_0x4bfcca+_0x333e06(0x197),'message':_0x333e06(0x192)}),validateOptionalResultVariable(_0x4fc753[_0x333e06(0xa7)][_0x333e06(0x1ec)],_0x4bfcca+_0x333e06(0x18e),_0x7b536a);else!_0x35da3f&&_0x7b536a[_0x333e06(0x1a4)]({'path':_0x4bfcca+_0x333e06(0xcb),'message':_0x514450+_0x333e06(0x1ee)});}function validateTimeAmount(_0x529146,_0x43e068,_0x41c7c9){const _0x1d5b0a=a299_0x32ec5c;if(!isRecord(_0x529146)){_0x41c7c9[_0x1d5b0a(0x1a4)]({'path':_0x43e068,'message':_0x1d5b0a(0x1a9)});return;}(!Number[_0x1d5b0a(0x1aa)](_0x529146[_0x1d5b0a(0x14f)])||Number(_0x529146[_0x1d5b0a(0x14f)])<=0x0)&&_0x41c7c9[_0x1d5b0a(0x1a4)]({'path':_0x43e068+'.value','message':_0x1d5b0a(0xc2)}),!FLOW_TIME_UNITS[_0x1d5b0a(0xbf)](_0x529146['unit'])&&_0x41c7c9[_0x1d5b0a(0x1a4)]({'path':_0x43e068+_0x1d5b0a(0xe7),'message':_0x1d5b0a(0x101)});}function validateOptionalResultVariable(_0x377a4c,_0x49c1e3,_0x33c3dc){const _0x2ab9d1=a299_0x32ec5c;if(_0x377a4c===undefined||_0x377a4c===null||_0x377a4c==='')return;if(typeof _0x377a4c!=='string'||!VARIABLE_PATTERN[_0x2ab9d1(0xc8)](_0x377a4c))_0x33c3dc[_0x2ab9d1(0x1a4)]({'path':_0x49c1e3,'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x2ab9d1(0xbf)](_0x377a4c)||_0x377a4c['startsWith'](_0x2ab9d1(0x16e)))&&_0x33c3dc[_0x2ab9d1(0x1a4)]({'path':_0x49c1e3,'message':_0x2ab9d1(0x129)+_0x377a4c+'.'});}function validateCcConfig(_0x429d17,_0x2d7b72,_0xf175b5){const _0x55830c=a299_0x32ec5c;if(_0x429d17['cc']===undefined)return;if(!isRecord(_0x429d17['cc'])){_0xf175b5['push']({'path':_0x2d7b72+'.cc','message':_0x55830c(0x1fc)});return;}_0x429d17[_0x55830c(0x1f4)]!==_0x55830c(0x188)&&_0x429d17['type']!==_0x55830c(0xb7)&&_0xf175b5['push']({'path':_0x2d7b72+'.cc','message':'Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.'});Object[_0x55830c(0x15a)][_0x55830c(0x16d)][_0x55830c(0x205)](_0x429d17['cc'],_0x55830c(0xdb))&&_0xf175b5[_0x55830c(0x1a4)]({'path':_0x2d7b72+_0x55830c(0x12d),'message':UNSUPPORTED_FORM_MESSAGE});const _0x2d92e4=_0x429d17['cc'][_0x55830c(0x1a5)];if(!Array['isArray'](_0x2d92e4)||_0x2d92e4[_0x55830c(0x124)]===0x0)_0xf175b5['push']({'path':_0x2d7b72+_0x55830c(0x185),'message':'cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.'});else{_0x2d92e4[_0x55830c(0x124)]>MAX_CC_RECIPIENTS&&_0xf175b5[_0x55830c(0x1a4)]({'path':_0x2d7b72+_0x55830c(0x185),'message':_0x55830c(0xf7)+MAX_CC_RECIPIENTS+'\x20users.'});const _0x3f9b97=new Set();_0x2d92e4[_0x55830c(0x1df)]((_0x544064,_0x3ce825)=>{const _0x42ae6a=_0x55830c;if(typeof _0x544064!==_0x42ae6a(0x204)||_0x544064['trim']()==='')_0xf175b5[_0x42ae6a(0x1a4)]({'path':_0x2d7b72+_0x42ae6a(0xc5)+_0x3ce825+']','message':_0x42ae6a(0x105)});else _0x3f9b97['has'](_0x544064[_0x42ae6a(0x104)]())?_0xf175b5[_0x42ae6a(0x1a4)]({'path':_0x2d7b72+_0x42ae6a(0xc5)+_0x3ce825+']','message':_0x42ae6a(0x1e5)+_0x544064[_0x42ae6a(0x104)]()+'.'}):_0x3f9b97[_0x42ae6a(0x138)](_0x544064[_0x42ae6a(0x104)]());});}validateStringArray(_0x429d17['cc'][_0x55830c(0x195)],_0x2d7b72+_0x55830c(0x1be),_0xf175b5);}function validateStringArray(_0x335121,_0x55a8d1,_0x4a7066){const _0x456cb0=a299_0x32ec5c;if(_0x335121===undefined)return;if(!Array[_0x456cb0(0x109)](_0x335121)){_0x4a7066[_0x456cb0(0x1a4)]({'path':_0x55a8d1,'message':_0x456cb0(0x182)});return;}const _0x2b1c05=new Set();_0x335121[_0x456cb0(0x1df)]((_0x333e8e,_0x3c2edb)=>{const _0x54b6f6=_0x456cb0;if(typeof _0x333e8e!==_0x54b6f6(0x204)||_0x333e8e[_0x54b6f6(0x104)]()==='')_0x4a7066[_0x54b6f6(0x1a4)]({'path':_0x55a8d1+'['+_0x3c2edb+']','message':_0x54b6f6(0x1fe)});else _0x2b1c05['has'](_0x333e8e[_0x54b6f6(0x104)]())?_0x4a7066[_0x54b6f6(0x1a4)]({'path':_0x55a8d1+'['+_0x3c2edb+']','message':_0x54b6f6(0x1fa)+_0x333e8e[_0x54b6f6(0x104)]()+'.'}):_0x2b1c05[_0x54b6f6(0x138)](_0x333e8e[_0x54b6f6(0x104)]());});}function validateNotificationConfig(_0x5bcf01,_0x51a2f1,_0x1e1001){const _0x5254c3=a299_0x32ec5c;if(!isRecord(_0x5bcf01)){_0x1e1001[_0x5254c3(0x1a4)]({'path':_0x51a2f1,'message':'NOTIFICATION\x20node\x20requires\x20config.'});return;}if(_0x5bcf01[_0x5254c3(0x10e)]!==undefined&&_0x5bcf01[_0x5254c3(0x10e)]!==null){if(typeof _0x5bcf01[_0x5254c3(0x10e)]!==_0x5254c3(0x204))_0x1e1001[_0x5254c3(0x1a4)]({'path':_0x51a2f1+'.version','message':_0x5254c3(0x19a)});else _0x5bcf01[_0x5254c3(0x10e)][_0x5254c3(0x104)]()&&_0x5bcf01[_0x5254c3(0x10e)][_0x5254c3(0x104)]()!=='v1'&&_0x1e1001[_0x5254c3(0x1a4)]({'path':_0x51a2f1+'.version','message':'Unsupported\x20notification\x20version:\x20'+_0x5bcf01['version']+'.'});}const _0x4b26d7=requireNotificationString(_0x5bcf01[_0x5254c3(0xa4)],_0x51a2f1+_0x5254c3(0x1c2),_0x5254c3(0x1ed),_0x1e1001);_0x4b26d7?.[_0x5254c3(0xcf)]('${')&&_0x1e1001[_0x5254c3(0x1a4)]({'path':_0x51a2f1+_0x5254c3(0x1c2),'message':_0x5254c3(0x176)});if(_0x5bcf01[_0x5254c3(0x1c6)]!==undefined&&_0x5bcf01[_0x5254c3(0x1c6)]!==null){if(typeof _0x5bcf01[_0x5254c3(0x1c6)]!=='string')_0x1e1001[_0x5254c3(0x1a4)]({'path':_0x51a2f1+'.failurePolicy','message':'failurePolicy\x20must\x20be\x20a\x20string.'});else!NOTIFICATION_FAILURE_POLICIES[_0x5254c3(0xbf)](_0x5bcf01[_0x5254c3(0x1c6)][_0x5254c3(0x104)]()[_0x5254c3(0x110)]())&&_0x1e1001[_0x5254c3(0x1a4)]({'path':_0x51a2f1+_0x5254c3(0x11e),'message':'failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.'});}!isRecord(_0x5bcf01[_0x5254c3(0x1e4)])?_0x1e1001[_0x5254c3(0x1a4)]({'path':_0x51a2f1+_0x5254c3(0x171),'message':_0x5254c3(0xa3)}):validateNotificationTemplate(_0x5bcf01[_0x5254c3(0x1e4)],_0x51a2f1+_0x5254c3(0x171),_0x1e1001),validateNotificationRecipients(_0x5bcf01['recipients'],_0x51a2f1+_0x5254c3(0x1a6),_0x1e1001);}function validateNotificationTemplate(_0x4970f5,_0x36f256,_0x54acca){const _0x4153c9=a299_0x32ec5c;for(const _0x3d8476 of[_0x4153c9(0x123),'summary']){const _0x502492=requireNotificationString(_0x4970f5[_0x3d8476],_0x36f256+'.'+_0x3d8476,_0x4153c9(0xe9)+_0x3d8476+_0x4153c9(0x10a),_0x54acca);if(_0x502492)validateNotificationPlaceholders(_0x502492,_0x36f256+'.'+_0x3d8476,_0x54acca);}_0x4970f5[_0x4153c9(0xe3)]!==undefined&&_0x4970f5[_0x4153c9(0xe3)]!==null&&(typeof _0x4970f5[_0x4153c9(0xe3)]!==_0x4153c9(0x204)?_0x54acca[_0x4153c9(0x1a4)]({'path':_0x36f256+_0x4153c9(0x1d3),'message':_0x4153c9(0xd3)}):validateNotificationPlaceholders(_0x4970f5['detailMarkdown'],_0x36f256+_0x4153c9(0x1d3),_0x54acca)),validateNotificationFacts(_0x4970f5[_0x4153c9(0x154)],_0x36f256+_0x4153c9(0x14c),_0x54acca),validateNotificationActions(_0x4970f5[_0x4153c9(0xb6)],_0x36f256+_0x4153c9(0xa5),_0x54acca);}function validateNotificationFacts(_0x5641c8,_0x113d41,_0x8fe0fb){const _0x560875=a299_0x32ec5c;if(_0x5641c8===undefined||_0x5641c8===null)return;if(!Array['isArray'](_0x5641c8)){_0x8fe0fb[_0x560875(0x1a4)]({'path':_0x113d41,'message':_0x560875(0x113)});return;}_0x5641c8['length']>MAX_NOTIFICATION_FACTS&&_0x8fe0fb[_0x560875(0x1a4)]({'path':_0x113d41,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_FACTS+'\x20facts.'}),_0x5641c8[_0x560875(0x1df)]((_0x23329f,_0x11e1f9)=>{const _0x146a4c=_0x560875,_0x490573=_0x113d41+'['+_0x11e1f9+']';if(!isRecord(_0x23329f)){_0x8fe0fb[_0x146a4c(0x1a4)]({'path':_0x490573,'message':_0x146a4c(0xfd)});return;}for(const _0x2b5e9d of['label',_0x146a4c(0x14f)]){const _0x4e8d94=requireNotificationString(_0x23329f[_0x2b5e9d],_0x490573+'.'+_0x2b5e9d,_0x146a4c(0x1fb)+_0x2b5e9d+'\x20is\x20required.',_0x8fe0fb);_0x4e8d94&&validateNotificationPlaceholders(_0x4e8d94,_0x490573+'.'+_0x2b5e9d,_0x8fe0fb);}});}function validateNotificationActions(_0x1a372d,_0x37ffb9,_0x4215e9){const _0x10fba5=a299_0x32ec5c;if(_0x1a372d===undefined||_0x1a372d===null)return;if(!Array[_0x10fba5(0x109)](_0x1a372d)){_0x4215e9[_0x10fba5(0x1a4)]({'path':_0x37ffb9,'message':'Notification\x20template.actions\x20must\x20be\x20an\x20array.'});return;}_0x1a372d['length']>MAX_NOTIFICATION_ACTIONS&&_0x4215e9[_0x10fba5(0x1a4)]({'path':_0x37ffb9,'message':_0x10fba5(0x15c)+MAX_NOTIFICATION_ACTIONS+_0x10fba5(0x1a7)}),_0x1a372d[_0x10fba5(0x1df)]((_0x11bff0,_0x5391ae)=>{const _0x6dc2f6=_0x10fba5,_0x1770de=_0x37ffb9+'['+_0x5391ae+']';if(!isRecord(_0x11bff0)){_0x4215e9['push']({'path':_0x1770de,'message':_0x6dc2f6(0x178)});return;}const _0x86ac6f=requireNotificationString(_0x11bff0[_0x6dc2f6(0x118)],_0x1770de+_0x6dc2f6(0x126),'Notification\x20action.text\x20is\x20required.',_0x4215e9);if(_0x86ac6f)validateNotificationPlaceholders(_0x86ac6f,_0x1770de+_0x6dc2f6(0x126),_0x4215e9);const _0x22c081=requireNotificationString(_0x11bff0['url'],_0x1770de+'.url','Notification\x20action.url\x20is\x20required.',_0x4215e9);if(!_0x22c081)return;validateNotificationPlaceholders(_0x22c081,_0x1770de+_0x6dc2f6(0x179),_0x4215e9),!/^https?:\/\//i[_0x6dc2f6(0xc8)](_0x22c081)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x6dc2f6(0xc8)](_0x22c081)&&_0x4215e9[_0x6dc2f6(0x1a4)]({'path':_0x1770de+_0x6dc2f6(0x179),'message':_0x6dc2f6(0x128)});});}function validateNotificationRecipients(_0x155c33,_0x75bc59,_0x475932){const _0x118233=a299_0x32ec5c;if(_0x155c33===undefined||_0x155c33===null)return;if(!Array[_0x118233(0x109)](_0x155c33)){_0x475932[_0x118233(0x1a4)]({'path':_0x75bc59,'message':'Notification\x20recipients\x20must\x20be\x20an\x20array.'});return;}let _0x3c0a1a=![];_0x155c33[_0x118233(0x1df)]((_0x2e59ae,_0x46a052)=>{const _0x4a1188=_0x118233,_0xe4bdfd=_0x75bc59+'['+_0x46a052+']';if(!isRecord(_0x2e59ae)){_0x475932[_0x4a1188(0x1a4)]({'path':_0xe4bdfd,'message':_0x4a1188(0x1eb)});return;}const _0x112337=requireNotificationString(_0x2e59ae['type'],_0xe4bdfd+_0x4a1188(0x119),_0x4a1188(0xb3),_0x475932);_0x112337&&!NOTIFICATION_RECIPIENT_TYPES[_0x4a1188(0xbf)](_0x112337[_0x4a1188(0x110)]())&&_0x475932[_0x4a1188(0x1a4)]({'path':_0xe4bdfd+'.type','message':_0x4a1188(0xcc)});let _0x41c4f7='TO';_0x2e59ae[_0x4a1188(0x190)]!==undefined&&_0x2e59ae[_0x4a1188(0x190)]!==null&&(typeof _0x2e59ae[_0x4a1188(0x190)]!==_0x4a1188(0x204)?(_0x475932[_0x4a1188(0x1a4)]({'path':_0xe4bdfd+'.role','message':'Notification\x20recipient.role\x20must\x20be\x20a\x20string.'}),_0x41c4f7=''):(_0x41c4f7=_0x2e59ae[_0x4a1188(0x190)]['trim']()[_0x4a1188(0x110)](),!NOTIFICATION_RECIPIENT_ROLES['has'](_0x41c4f7)&&_0x475932[_0x4a1188(0x1a4)]({'path':_0xe4bdfd+_0x4a1188(0x1ac),'message':_0x4a1188(0x15b)})));if(_0x41c4f7==='TO')_0x3c0a1a=!![];const _0x11eccf=requireNotificationString(_0x2e59ae[_0x4a1188(0x14f)],_0xe4bdfd+'.value','Notification\x20recipient.value\x20is\x20required.',_0x475932);_0x11eccf&&validateNotificationPlaceholders(_0x11eccf,_0xe4bdfd+_0x4a1188(0x121),_0x475932);}),_0x155c33[_0x118233(0x124)]>0x0&&!_0x3c0a1a&&_0x475932[_0x118233(0x1a4)]({'path':_0x75bc59,'message':_0x118233(0xb4)});}function requireNotificationString(_0x1b154c,_0x447e59,_0x293414,_0x268b7d){const _0x433c3b=a299_0x32ec5c;if(typeof _0x1b154c!==_0x433c3b(0x204)||_0x1b154c[_0x433c3b(0x104)]()==='')return _0x268b7d[_0x433c3b(0x1a4)]({'path':_0x447e59,'message':_0x293414}),undefined;return _0x1b154c['trim']();}function validateNotificationPlaceholders(_0x4ea331,_0x551b,_0xd32780){const _0x167d75=a299_0x32ec5c;for(const _0x1e7fbc of _0x4ea331[_0x167d75(0x149)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x45d866=_0x1e7fbc[0x1]?.['trim']()??'',_0x5450b8=_0x45d866[_0x167d75(0xd9)]('.'),_0x307a49=_0x5450b8>=0x0?_0x45d866[_0x167d75(0xf1)](0x0,_0x5450b8):_0x45d866,_0x3d0288=_0x5450b8>=0x0?_0x45d866[_0x167d75(0xf1)](_0x5450b8+0x1)[_0x167d75(0x104)]():'';(!['event','context','variables'][_0x167d75(0xcf)](_0x307a49)||_0x3d0288==='')&&_0xd32780[_0x167d75(0x1a4)]({'path':_0x551b,'message':'Unsupported\x20notification\x20placeholder:\x20'+_0x1e7fbc[0x0]+'.'});}_0x4ea331[_0x167d75(0x18f)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x167d75(0xcf)]('${')&&_0xd32780[_0x167d75(0x1a4)]({'path':_0x551b,'message':'Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.'});}function validateEdge(_0x543cec,_0x5e6d60,_0x59cc0c){const _0xd331b2=a299_0x32ec5c;_0x543cec['name']!==undefined&&typeof _0x543cec[_0xd331b2(0xfc)]!=='string'&&_0x59cc0c[_0xd331b2(0x1a4)]({'path':_0x5e6d60+_0xd331b2(0x153),'message':_0xd331b2(0x1b8)}),_0x543cec['defaultFlow']!==undefined&&typeof _0x543cec['defaultFlow']!==_0xd331b2(0x18b)&&_0x59cc0c[_0xd331b2(0x1a4)]({'path':_0x5e6d60+'.defaultFlow','message':_0xd331b2(0x1c8)}),_0x543cec[_0xd331b2(0xf5)]!==undefined&&(!Array[_0xd331b2(0x109)](_0x543cec[_0xd331b2(0xf5)])?_0x59cc0c[_0xd331b2(0x1a4)]({'path':_0x5e6d60+_0xd331b2(0x10f),'message':_0xd331b2(0x206)}):_0x543cec[_0xd331b2(0xf5)]['forEach']((_0x1f78fc,_0x438c79)=>{const _0xc487e5=_0xd331b2;if(!isRecord(_0x1f78fc)){_0x59cc0c[_0xc487e5(0x1a4)]({'path':_0x5e6d60+_0xc487e5(0x11f)+_0x438c79+']','message':_0xc487e5(0x114)});return;}for(const _0x585178 of['x','y']){const _0x5c807a=_0x1f78fc[_0x585178];(typeof _0x5c807a!==_0xc487e5(0xfb)||!Number[_0xc487e5(0x1f8)](_0x5c807a))&&_0x59cc0c[_0xc487e5(0x1a4)]({'path':_0x5e6d60+_0xc487e5(0x11f)+_0x438c79+'].'+_0x585178,'message':'waypoint.'+_0x585178+_0xc487e5(0x209)});}})),_0x543cec[_0xd331b2(0x111)]!==undefined&&!CONDITION_TYPES[_0xd331b2(0xbf)](_0x543cec['conditionType'])&&_0x59cc0c['push']({'path':_0x5e6d60+'.conditionType','message':_0xd331b2(0xd0)+String(_0x543cec['conditionType'])+'.'}),_0x543cec[_0xd331b2(0x111)]===_0xd331b2(0x180)&&(typeof _0x543cec[_0xd331b2(0x187)]!=='string'||_0x543cec['expression'][_0xd331b2(0x104)]()==='')&&_0x59cc0c[_0xd331b2(0x1a4)]({'path':_0x5e6d60+_0xd331b2(0x194),'message':_0xd331b2(0xed)}),_0x543cec[_0xd331b2(0x14a)]===!![]&&_0x543cec[_0xd331b2(0x111)]!==_0xd331b2(0x198)&&_0x59cc0c['push']({'path':_0x5e6d60+_0xd331b2(0x1ef),'message':_0xd331b2(0x1dc)}),_0x543cec['defaultFlow']===!![]&&typeof _0x543cec[_0xd331b2(0x187)]===_0xd331b2(0x204)&&_0x543cec['expression'][_0xd331b2(0x104)]()!==''&&_0x59cc0c[_0xd331b2(0x1a4)]({'path':_0x5e6d60+_0xd331b2(0x194),'message':_0xd331b2(0x207)});}function validateGraphShape(_0x3e7cc3,_0x33102e,_0x268e73,_0x3b3218,_0x2fbdab,_0x5c08aa,_0x428563){const _0x3214a3=a299_0x32ec5c;for(const [_0x4fa0b0,_0x57a7fa]of _0x3e7cc3){const _0x1945a7=_0x2fbdab[_0x3214a3(0xdf)](_0x4fa0b0)??[],_0x44c983=_0x3b3218['get'](_0x4fa0b0)??[];_0x57a7fa[_0x3214a3(0x1f4)]!=='START'&&_0x1945a7[_0x3214a3(0x124)]===0x0&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':'Node\x20has\x20no\x20incoming\x20edge.'});_0x57a7fa[_0x3214a3(0x1f4)]!==_0x3214a3(0x188)&&_0x44c983['length']===0x0&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':_0x3214a3(0xe5)});_0x57a7fa[_0x3214a3(0x1f4)]===_0x3214a3(0x151)&&_0x1945a7[_0x3214a3(0x124)]>0x0&&_0x428563['push']({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':'START\x20node\x20must\x20not\x20have\x20incoming\x20edges.'});_0x57a7fa[_0x3214a3(0x1f4)]===_0x3214a3(0x188)&&_0x44c983[_0x3214a3(0x124)]>0x0&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':_0x3214a3(0x11b)});if(_0x57a7fa[_0x3214a3(0x1f4)]===_0x3214a3(0x16c)){_0x44c983[_0x3214a3(0x124)]<0x2&&_0x428563[_0x3214a3(0x1a4)]({'path':'flowJson.nodes.'+_0x4fa0b0,'message':_0x3214a3(0xe6)});const _0x351fab=_0x44c983[_0x3214a3(0x172)](_0x5d76ce=>_0x5d76ce[_0x3214a3(0x14a)]===!![]);_0x351fab[_0x3214a3(0x124)]!==0x1&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':_0x3214a3(0xd2)});if(_0x351fab[_0x3214a3(0x124)]===0x1){const _0x359320=_0x351fab[0x0],_0x58b285=_0x5c08aa['get'](_0x359320)??_0x3214a3(0x1c1);_0x359320[_0x3214a3(0x111)]!=='ALWAYS'&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x58b285+_0x3214a3(0x17d),'message':_0x3214a3(0x102)});_0x359320['expression']!==undefined&&_0x428563['push']({'path':_0x58b285+_0x3214a3(0x194),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x2befd1 of _0x44c983){if(_0x2befd1===_0x359320)continue;const _0x4af267=_0x5c08aa[_0x3214a3(0xdf)](_0x2befd1)??_0x3214a3(0x1c1);if(_0x2befd1['conditionType']!==_0x3214a3(0x180))_0x428563[_0x3214a3(0x1a4)]({'path':_0x4af267+'.conditionType','message':_0x3214a3(0x183)});else(typeof _0x2befd1[_0x3214a3(0x187)]!==_0x3214a3(0x204)||_0x2befd1['expression'][_0x3214a3(0x104)]()==='')&&_0x428563['push']({'path':_0x4af267+_0x3214a3(0x194),'message':'CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.'});}}}if(_0x57a7fa[_0x3214a3(0x1f4)]===_0x3214a3(0xb7)&&(_0x57a7fa[_0x3214a3(0xc0)]??_0x3214a3(0xb7))===_0x3214a3(0x1b3)){if(_0x44c983[_0x3214a3(0x124)]!==0x1)_0x428563[_0x3214a3(0x1a4)]({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':_0x3214a3(0x1bd)});else{const _0x354283=_0x44c983[0x0];((_0x354283[_0x3214a3(0x111)]??_0x3214a3(0x198))!==_0x3214a3(0x198)||_0x354283[_0x3214a3(0x14a)]===!![]||typeof _0x354283[_0x3214a3(0x187)]===_0x3214a3(0x204)&&_0x354283[_0x3214a3(0x187)]['trim']()!=='')&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x5c08aa[_0x3214a3(0xdf)](_0x354283)??_0x3214a3(0x1c1),'message':'HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.'});}}else{if(_0x57a7fa['type']==='APPROVAL'){const _0x39b314=_0x44c983[_0x3214a3(0x1db)](_0x52f371=>_0x52f371[_0x3214a3(0x111)]??_0x3214a3(0x198)),_0x4b8dd4=_0x39b314['filter'](_0x2d593a=>_0x2d593a!==_0x3214a3(0x1d5)&&_0x2d593a!==_0x3214a3(0x1b4));_0x4b8dd4[_0x3214a3(0x124)]>0x0&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':_0x3214a3(0x186)}),_0x39b314[_0x3214a3(0x172)](_0xaa96ae=>_0xaa96ae==='APPROVED')['length']!==0x1&&_0x428563['push']({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':_0x3214a3(0x13c)}),_0x39b314[_0x3214a3(0x172)](_0x2f4370=>_0x2f4370==='REJECTED')[_0x3214a3(0x124)]!==0x1&&_0x428563['push']({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':_0x3214a3(0x1c7)}),_0x44c983[_0x3214a3(0x20a)](_0x5f387b=>_0x5f387b[_0x3214a3(0x14a)]===!![])&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x3214a3(0x1f1)+_0x4fa0b0,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0x443b76=new Set(),_0x532664=_0x39ddac=>{const _0x1de004=_0x3214a3;if(_0x443b76[_0x1de004(0xbf)](_0x39ddac))return;_0x443b76[_0x1de004(0x138)](_0x39ddac);for(const _0x1bb0ff of _0x3b3218[_0x1de004(0xdf)](_0x39ddac)??[]){const _0x10251f=resolveEdgeEndpoint(_0x1bb0ff[_0x1de004(0x20b)],_0x1bb0ff['targetNodeId']);if(_0x10251f&&_0x3e7cc3[_0x1de004(0xbf)](_0x10251f))_0x532664(_0x10251f);}};_0x532664(_0x33102e);for(const _0x22f1a7 of _0x3e7cc3[_0x3214a3(0x165)]()){!_0x443b76[_0x3214a3(0xbf)](_0x22f1a7)&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x3214a3(0x1f1)+_0x22f1a7,'message':_0x3214a3(0x177)});}const _0xa546bb=_0x268e73[_0x3214a3(0x20a)](_0x5c5cc8=>_0x443b76['has'](_0x5c5cc8));if(!_0xa546bb){_0x428563['push']({'path':'flowJson.edges','message':_0x3214a3(0x106)});return;}const _0x1940f0=new Set(),_0x368348=_0xc06bc6=>{const _0x5ef324=_0x3214a3;if(_0x1940f0['has'](_0xc06bc6))return;_0x1940f0[_0x5ef324(0x138)](_0xc06bc6);for(const _0x2a7b58 of _0x2fbdab[_0x5ef324(0xdf)](_0xc06bc6)??[]){const _0x8dd207=resolveEdgeEndpoint(_0x2a7b58['source'],_0x2a7b58[_0x5ef324(0x1ca)]);if(_0x8dd207&&_0x3e7cc3['has'](_0x8dd207))_0x368348(_0x8dd207);}};for(const _0x21369f of _0x268e73){if(_0x3e7cc3[_0x3214a3(0xbf)](_0x21369f))_0x368348(_0x21369f);}for(const _0x91aa71 of _0x443b76){!_0x1940f0[_0x3214a3(0xbf)](_0x91aa71)&&_0x428563[_0x3214a3(0x1a4)]({'path':_0x3214a3(0x1f1)+_0x91aa71,'message':_0x3214a3(0x11d)});}}function validateApprovalResults(_0x17fcd0,_0x491b1b,_0x4adabe,_0x2c64f8){const _0x180f19=a299_0x32ec5c;if(_0x491b1b===0x0)return;const _0x50925e=new Set(_0x4adabe[_0x180f19(0x1db)](_0x15f12c=>_0x17fcd0[_0x180f19(0xdf)](_0x15f12c)?.['result'])[_0x180f19(0x172)](_0x7e68=>typeof _0x7e68===_0x180f19(0x204)));for(const _0x5e435a of[_0x180f19(0x1d5),_0x180f19(0x1b4)]){!_0x50925e[_0x180f19(0xbf)](_0x5e435a)&&_0x2c64f8['push']({'path':'flowJson.nodes','message':_0x180f19(0x1ba)+_0x5e435a+'.'});}}function validateScriptResultReferences(_0x250f2d,_0x366d66,_0x12bb4a,_0x31609b,_0x248a6c,_0x259ee8,_0x2a69d9){const _0x5936bb=a299_0x32ec5c;if(_0x259ee8[_0x5936bb(0x12e)]===0x0)return;const _0x171fd2=new Set(),_0x133e66=_0x3f8bb5=>{const _0x581ffd=_0x5936bb;if(!_0x171fd2[_0x581ffd(0xbf)](_0x3f8bb5)&&_0x250f2d[_0x581ffd(0xbf)](_0x3f8bb5)){_0x171fd2['add'](_0x3f8bb5);for(const _0x15038f of _0x12bb4a[_0x581ffd(0xdf)](_0x3f8bb5)??[]){const _0x4af98c=resolveEdgeEndpoint(_0x15038f['target'],_0x15038f[_0x581ffd(0x103)]);if(_0x4af98c)_0x133e66(_0x4af98c);}}};_0x133e66(_0x366d66);const _0x2d879d=new Map();for(const _0x8f4256 of _0x171fd2){_0x2d879d['set'](_0x8f4256,_0x8f4256===_0x366d66?new Set([_0x366d66]):new Set(_0x171fd2));}let _0x550861=!![];while(_0x550861){_0x550861=![];for(const _0x17aae1 of _0x171fd2){if(_0x17aae1===_0x366d66)continue;const _0xe7f2a0=(_0x31609b[_0x5936bb(0xdf)](_0x17aae1)??[])[_0x5936bb(0x1db)](_0x381fcb=>resolveEdgeEndpoint(_0x381fcb[_0x5936bb(0x199)],_0x381fcb[_0x5936bb(0x1ca)]))[_0x5936bb(0x172)](_0x5dbfc4=>Boolean(_0x5dbfc4&&_0x171fd2['has'](_0x5dbfc4)));if(_0xe7f2a0['length']===0x0)continue;const _0x1b62e8=new Set(_0x2d879d[_0x5936bb(0xdf)](_0xe7f2a0[0x0])??[]);for(const _0xcca957 of _0xe7f2a0['slice'](0x1)){const _0x172c26=_0x2d879d['get'](_0xcca957)??new Set();for(const _0x22dedd of _0x1b62e8){if(!_0x172c26['has'](_0x22dedd))_0x1b62e8[_0x5936bb(0x141)](_0x22dedd);}}_0x1b62e8['add'](_0x17aae1);const _0x54ee53=_0x2d879d[_0x5936bb(0xdf)](_0x17aae1);!setsEqual(_0x54ee53,_0x1b62e8)&&(_0x2d879d['set'](_0x17aae1,_0x1b62e8),_0x550861=!![]);}}for(const [_0xb450c1,_0xb33e85]of _0x12bb4a){const _0x13f461=_0x2d879d['get'](_0xb450c1);if(!_0x13f461)continue;for(const _0x149928 of _0xb33e85){if(_0x149928['conditionType']!==_0x5936bb(0x180)||typeof _0x149928[_0x5936bb(0x187)]!==_0x5936bb(0x204))continue;for(const [_0x5f35db,_0x1d3bbc]of _0x259ee8){expressionReferencesVariable(_0x149928[_0x5936bb(0x187)],_0x5f35db)&&!_0x13f461[_0x5936bb(0xbf)](_0x1d3bbc)&&_0x2a69d9[_0x5936bb(0x1a4)]({'path':(_0x248a6c['get'](_0x149928)??_0x5936bb(0x1c1))+_0x5936bb(0x194),'message':_0x5936bb(0xaa)+_0x5f35db+',\x20but\x20node\x20'+_0x1d3bbc+'\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20'+_0xb450c1+'.'});}}}}function expressionReferencesVariable(_0x2ac3d5,_0x4bad6c){const _0x9f973c=a299_0x32ec5c;let _0x20a2b1=0x0;while(_0x20a2b1<_0x2ac3d5[_0x9f973c(0x124)]){const _0x5be023=_0x2ac3d5[_0x20a2b1];if(_0x5be023==='\x27'||_0x5be023==='\x22'){_0x20a2b1=skipQuotedExpressionSegment(_0x2ac3d5,_0x20a2b1,_0x5be023);continue;}if(!/[A-Za-z_]/[_0x9f973c(0xc8)](_0x5be023)){_0x20a2b1+=0x1;continue;}const _0x49f1ae=_0x20a2b1;_0x20a2b1+=0x1;while(_0x20a2b1<_0x2ac3d5['length']&&/[A-Za-z0-9_]/[_0x9f973c(0xc8)](_0x2ac3d5[_0x20a2b1])){_0x20a2b1+=0x1;}if(_0x2ac3d5[_0x9f973c(0xf1)](_0x49f1ae,_0x20a2b1)!==_0x4bad6c)continue;let _0x45bab3=_0x49f1ae-0x1;while(_0x45bab3>=0x0&&/\s/[_0x9f973c(0xc8)](_0x2ac3d5[_0x45bab3])){_0x45bab3-=0x1;}if(_0x2ac3d5[_0x45bab3]!=='.')return!![];}return![];}function a299_0x58a2(){const _0xefefce=['set','path','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.','Edge\x20source\x20node\x20not\x20found:\x20','map','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','ROLE','10801548DdwJxB','forEach','transferCandidates\x20must\x20be\x20an\x20object.','flowJson.startPath','startPageId','__rabetbase_local_validation__','template','Duplicate\x20cc\x20recipient\x20userId:\x20','startPath\x20must\x20be\x20a\x20non-empty\x20string.','enabled','approval_sys_datasetCode','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','Notification\x20recipient\x20must\x20be\x20an\x20object.','resultVariable','Notification\x20configCode\x20is\x20required.','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','.defaultFlow','formPermission','flowJson.nodes.','DAYS','Unsupported\x20flowType:\x20','type','approval_sys_appCode','.timeout.enabled','12DPdUDT','isFinite','].path','Duplicate\x20value:\x20','Notification\x20fact.','cc\x20must\x20be\x20an\x20object.','parse','value\x20must\x20be\x20a\x20non-empty\x20string.','array','FAIL','approval.simple-flow.v1','assignee','flowJson\x20must\x20be\x20an\x20object.','string','call','waypoints\x20must\x20be\x20an\x20array.','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','INDEPENDENT_FLOW','\x20must\x20be\x20a\x20finite\x20number.','some','target','NOTIFICATION\x20node\x20requires\x20template.','configCode','.actions','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','timeout','.assignee.userIds[','catch','Expression\x20references\x20SCRIPT\x20resultVariable\x20','Duplicate\x20edge\x20route:\x20','datasetCode','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','EMAIL','EXECUTE_BFF','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','timeout.interrupting\x20must\x20be\x20a\x20boolean.','ALL','Notification\x20recipient.type\x20is\x20required.','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','async.enabled\x20must\x20be\x20a\x20boolean.','actions','APPROVAL','flowJson','.path','SINGLE','.id','templateName','async','overwrite','has','taskMode','SECONDS','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','startsWith','edges','.cc.recipientUserIds[','warnings','.timeout','test','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','CONTINUE','.timeout.interrupting','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','legacy_field_removed','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','includes','Unsupported\x20condition\x20type:\x20','flowJson.edges[','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','formData','flowName','.timeout.action','sequential','position.','indexOf','.async','readSources','.position','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','115914Fbvaho','get','datasetCode\x20must\x20be\x20a\x20string.','startPath','metadata','detailMarkdown','#/$defs/position','Node\x20has\x20no\x20outgoing\x20edge.','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','.unit','pageId','Notification\x20template.','7754142TfEkoL','33554250FcPCKt','Rabetbase\x20FlowConfig','EXPRESSION\x20edge\x20requires\x20expression.','transferCandidates','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','formPermissions','slice','.\x20This\x20CLI\x20supports\x20only\x20','position','empty_metadata_removed','waypoints','.assignee','cc.recipientUserIds\x20supports\x20at\x20most\x20','edges\x20must\x20be\x20an\x20array.','pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.','timeout\x20must\x20be\x20an\x20object.','number','name','Notification\x20fact\x20must\x20be\x20an\x20object.','https://lovrabet.com/schema/rabetbase-flow-config.json','flowCode','formSchema','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','targetNodeId','trim','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','Every\x20node\x20requires\x20a\x20non-empty\x20name.','flowJson.pageMode','isArray','\x20is\x20required.','pageIds','approval_sys_pageId','FIXED','version','.waypoints','toUpperCase','conditionType','label','Notification\x20template.facts\x20must\x20be\x20an\x20array.','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','SCRIPT','AUTO_APPROVE','action','text','.type','.transferCandidates.userIds[','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','Node\x20cannot\x20reach\x20any\x20END.','.failurePolicy','.waypoints[','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','.value','.position.','title','length','flowKey','.text','NaN','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','Reserved\x20resultVariable:\x20','5ojYrxj','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','.cc.readSources','size','\x20->\x20','config','^[1-9][0-9]*$','.source','integer','.pageId','timeout.enabled\x20must\x20be\x20a\x20boolean.','edge\x20source\x20is\x20required.','flowJson.nodes[','add','flowName\x20is\x20required.','ANY','256611PRStpb','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','pageMode','interrupting','async\x20must\x20be\x20an\x20object.','approval_sys_initiatorUserId','delete','mode','findIndex','HOURS','\x20was\x20empty\x20and\x20was\x20removed.','retryInterval','.async.retryInterval','MINUTES','matchAll','defaultFlow','entries','.facts','approved','699376tTZzPg','value','AUTO_REJECT','START','.assignee.strategy','.name','facts','schemaVersion','nodes','flowDesc','stringify','#/$defs/userId','prototype','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','Notification\x20template\x20supports\x20at\x20most\x20','.assignee.userIds','flowType\x20is\x20required.','Duplicate\x20resultVariable:\x20','userIds','formDefinitions','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','utf8','keys','FIXED\x20assignee\x20requires\x20userIds.','summary','.transferCandidates.userIds','flowJson.schemaVersion','^[A-Za-z_][A-Za-z0-9_]*$','pid','CONDITION','hasOwnProperty','approval_sys_','Duplicate\x20BPMN\x20element\x20id:\x20','Duplicate\x20node\x20id:\x20','.template','filter','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','bindDatasetCode','isSafeInteger','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','Node\x20is\x20not\x20reachable\x20from\x20START.','Notification\x20action\x20must\x20be\x20an\x20object.','.url','approval_sys_initiatorUsername','Unsupported\x20pageMode:\x20','.assignee.roleId','.conditionType','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','retryCount','EXPRESSION','Unsupported\x20schemaVersion:\x20','value\x20must\x20be\x20an\x20array.','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','.cc.recipientUserIds','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','expression','END','49tVajFG','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','boolean','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','Edge\x20target\x20node\x20not\x20found:\x20','.timeout.resultVariable','replace','role','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','strategy','.expression','visible','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','.timeout.scriptName','ALWAYS','source','Notification\x20version\x20must\x20be\x20a\x20string.','.transferCandidates','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','#/$defs/flowEdge','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','BCC','https://json-schema.org/draft/2020-12/schema','scriptName','CUSTOM_PAGE','.transferCandidates.strategy','push','recipientUserIds','.recipients','\x20actions.','.tmp','duration\x20requires\x20value\x20and\x20unit.','isInteger','856920cxCSVg','.role','USER','appCode','duration','flowType','MAX_SAFE_INTEGER','object','HANDLE','REJECTED','flowJson.','unit','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','edge\x20name\x20must\x20be\x20a\x20string.','.resultVariable','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','Unsupported\x20approval\x20mode:\x20','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','.cc.visible','flowDesc\x20must\x20be\x20a\x20string.','every','flowJson.edges','.configCode','NOTIFICATION','edge\x20target\x20is\x20required.','approval_sys_processInstanceId','failurePolicy','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','defaultFlow\x20must\x20be\x20a\x20boolean.','#/$defs/flowNode','sourceNodeId','approval_sys_operationType','.sequential','FORM_FLOW','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','SCRIPT\x20node\x20requires\x20scriptName.','.target','.approvalMode','flowJson.nodes','.detailMarkdown','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','APPROVED','join'];a299_0x58a2=function(){return _0xefefce;};return a299_0x58a2();}function skipQuotedExpressionSegment(_0xe5a922,_0x5ad3bb,_0x427f7a){let _0x31c2fc=_0x5ad3bb+0x1;while(_0x31c2fc<_0xe5a922['length']){if(_0xe5a922[_0x31c2fc]==='\x5c'){_0x31c2fc+=0x2;continue;}if(_0xe5a922[_0x31c2fc]===_0x427f7a)return _0x31c2fc+0x1;_0x31c2fc+=0x1;}return _0x31c2fc;}function resolveEffectiveResultVariable(_0x1e6525,_0x4c2be8){const _0x1197b9=a299_0x32ec5c;if(_0x1e6525===undefined||_0x1e6525===null||_0x4c2be8&&_0x1e6525==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x1e6525!==_0x1197b9(0x204)||!VARIABLE_PATTERN[_0x1197b9(0xc8)](_0x1e6525)||RESERVED_RESULT_VARIABLES[_0x1197b9(0xbf)](_0x1e6525)||_0x1e6525[_0x1197b9(0xc3)](_0x1197b9(0x16e)))return undefined;return _0x1e6525;}function registerResultVariableOwner(_0x47cf9c,_0x450b87,_0x4e5bb1,_0x49b91a){const _0x5c6f1e=a299_0x32ec5c;if(_0x47cf9c[_0x5c6f1e(0xbf)](_0x450b87)){_0x49b91a['push']({'path':_0x5c6f1e(0x1d2),'message':_0x5c6f1e(0x15f)+_0x450b87+'.'});return;}_0x47cf9c['set'](_0x450b87,_0x4e5bb1);}function setsEqual(_0x128ed7,_0x5ba870){const _0x1e3c11=a299_0x32ec5c;return _0x128ed7['size']===_0x5ba870[_0x1e3c11(0x12e)]&&[..._0x128ed7][_0x1e3c11(0x1c0)](_0x33a494=>_0x5ba870[_0x1e3c11(0xbf)](_0x33a494));}function isValidUserId(_0x207c6f){const _0x1131fe=a299_0x32ec5c;if(typeof _0x207c6f==='string')return _0x207c6f[_0x1131fe(0x104)]()[_0x1131fe(0x124)]>0x0;return Number[_0x1131fe(0x175)](_0x207c6f)&&Number(_0x207c6f)>0x0;}function resolveEdgeEndpoint(_0x3c8dd4,_0xf49c25){const _0x1bb409=a299_0x32ec5c;if(typeof _0x3c8dd4===_0x1bb409(0x204)&&_0x3c8dd4[_0x1bb409(0x104)]())return _0x3c8dd4[_0x1bb409(0x104)]();if(typeof _0xf49c25===_0x1bb409(0x204)&&_0xf49c25[_0x1bb409(0x104)]())return _0xf49c25[_0x1bb409(0x104)]();return undefined;}function removeEmptyMetadata(_0x1ac7b2,_0x346d8b,_0x3fd873,_0x1101fd){const _0x3fa620=a299_0x32ec5c;if(Array[_0x3fa620(0x109)](_0x1ac7b2)){_0x1ac7b2['forEach']((_0x2dbdfe,_0xb69050)=>removeEmptyMetadata(_0x2dbdfe,_0x346d8b+'['+_0xb69050+']',_0x3fd873,_0x1101fd));return;}if(!isRecord(_0x1ac7b2))return;for(const [_0x72e0db,_0x1e41e2]of Object[_0x3fa620(0x14b)](_0x1ac7b2)){const _0x51c1c1=_0x346d8b+'.'+_0x72e0db;if(_0x72e0db===_0x3fa620(0xe2)&&isEmptyJsonValue(_0x1e41e2)){delete _0x1ac7b2[_0x72e0db],_0x1101fd['push'](_0x51c1c1),_0x3fd873[_0x3fa620(0x1a4)]({'code':_0x3fa620(0xf4),'path':_0x51c1c1,'message':_0x51c1c1+_0x3fa620(0x145)});continue;}removeEmptyMetadata(_0x1e41e2,_0x51c1c1,_0x3fd873,_0x1101fd);}}function isEmptyJsonValue(_0x36543a){const _0x500be6=a299_0x32ec5c;if(_0x36543a===null||_0x36543a===undefined)return!![];if(typeof _0x36543a===_0x500be6(0x204))return _0x36543a['trim']()==='';if(Array[_0x500be6(0x109)](_0x36543a))return _0x36543a['length']===0x0;return isRecord(_0x36543a)&&Object['keys'](_0x36543a)[_0x500be6(0x124)]===0x0;}function isRecord(_0x3e48ce){const _0x1ea95e=a299_0x32ec5c;return typeof _0x3e48ce==='object'&&_0x3e48ce!==null&&!Array[_0x1ea95e(0x109)](_0x3e48ce);}function cloneJsonValue(_0x5f33c9){const _0x432af6=a299_0x32ec5c;return JSON[_0x432af6(0x1fd)](JSON[_0x432af6(0x158)](_0x5f33c9));}export async function readFlowConfigFile(_0x5465ad){const _0x1b7633=a299_0x32ec5c,_0x4864e2=await readFile(resolve(_0x5465ad),_0x1b7633(0x164));return JSON[_0x1b7633(0x1fd)](_0x4864e2);}
1
+ const a299_0x85c6cc=a299_0x3b20;function a299_0x3b20(_0x2648fc,_0x290d05){_0x2648fc=_0x2648fc-0x188;const _0x45b9f6=a299_0x45b9();let _0x3b206e=_0x45b9f6[_0x2648fc];return _0x3b206e;}(function(_0x53d4a9,_0x5ca5f8){const _0x13d707=a299_0x3b20,_0x2b2b51=_0x53d4a9();while(!![]){try{const _0x28512b=parseInt(_0x13d707(0x1f3))/0x1+-parseInt(_0x13d707(0x1f4))/0x2+parseInt(_0x13d707(0x26a))/0x3+parseInt(_0x13d707(0x29b))/0x4+-parseInt(_0x13d707(0x24f))/0x5*(parseInt(_0x13d707(0x18c))/0x6)+-parseInt(_0x13d707(0x2cd))/0x7*(parseInt(_0x13d707(0x27a))/0x8)+parseInt(_0x13d707(0x2bf))/0x9*(parseInt(_0x13d707(0x259))/0xa);if(_0x28512b===_0x5ca5f8)break;else _0x2b2b51['push'](_0x2b2b51['shift']());}catch(_0x6553b3){_0x2b2b51['push'](_0x2b2b51['shift']());}}}(a299_0x45b9,0xb2dee));function a299_0x45b9(){const _0x4f998c=['Notification\x20template\x20supports\x20at\x20most\x20','path','.\x20This\x20CLI\x20supports\x20only\x20','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','get','Unsupported\x20flowType:\x20','async','templateName','.sequential','#/$defs/userId','context','boolean','Reserved\x20resultVariable:\x20','MAX_SAFE_INTEGER','1783496EEUkxQ','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','Duplicate\x20node\x20id:\x20','flowJson.nodes[','Duplicate\x20value:\x20','.tmp','.cc.recipientUserIds[','startsWith','schemaVersion','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','isSafeInteger','.type','formPermission','approval_sys_datasetCode','readSources','target','assignee','.waypoints','.timeout','flowJson.pageMode','Notification\x20recipient.value\x20is\x20required.','every','text','async\x20must\x20be\x20an\x20object.','scriptName','version','enabled','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','isArray','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','.config','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','BCC','NOTIFICATION\x20node\x20requires\x20config.','detailMarkdown','6606vOIjMq','defaultFlow','configCode','number','delete','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','includes','flowName\x20is\x20required.','ALL','utf8','.assignee.roleId','Notification\x20version\x20must\x20be\x20a\x20string.','.expression','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','6671DWBtrD','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','flowJson.nodes.','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','Notification\x20configCode\x20is\x20required.','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','.text','\x20must\x20be\x20a\x20finite\x20number.','test','approval_sys_operationType','.transferCandidates.userIds','waypoints','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','.name','action','taskMode','array','config','.path','ROLE','Duplicate\x20resultVariable:\x20','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.cc','event','parse','NOTIFICATION','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','async.enabled\x20must\x20be\x20a\x20boolean.','flowJson.schemaVersion','SINGLE','INDEPENDENT_FLOW','APPROVAL\x20node\x20requires\x20assignee.','actions','flowJson.edges','.assignee.strategy','size','edge\x20target\x20is\x20required.','3936VzczgD','nodes','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','datasetCode','flowKey','type','label','flowName','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','#/$defs/flowEdge','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','.cc.visible','.assignee.userIds','.assignee.userIds[','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','ALWAYS','name','facts','value\x20must\x20be\x20an\x20array.','Notification\x20recipients\x20must\x20be\x20an\x20array.','summary','pageId','approval_sys_initiatorUsername','empty_metadata_removed','#/$defs/flowNode','toUpperCase','CUSTOM_PAGE','SECONDS','\x20actions.','.async.retryCount','DAYS','overwrite','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','sequential\x20must\x20be\x20a\x20boolean.','call','approval_sys_pageId','START','.version','Notification\x20template.facts\x20must\x20be\x20an\x20array.','approvalMode','cc\x20must\x20be\x20an\x20object.','approval_sys_processInstanceId','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','role','Duplicate\x20cc\x20recipient\x20userId:\x20','expression','Notification\x20recipient\x20must\x20be\x20an\x20object.','bindDatasetCode','string','hasOwnProperty','sequential','.url','flowJson.startPageId','position.','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','matchAll','flowType','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','object','targetNodeId','flowCode','Unsupported\x20pageMode:\x20','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','Notification\x20template.actions\x20must\x20be\x20an\x20array.','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','flowJson\x20must\x20be\x20an\x20object.','AUTO_APPROVE','length','CONDITION','.timeout.action','.resultVariable','approval_sys_initiatorUserId','findIndex','\x20is\x20required.','Node\x20has\x20no\x20outgoing\x20edge.',',\x20but\x20node\x20','SCRIPT\x20node\x20requires\x20scriptName.','END','.value','join','set','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','Unsupported\x20task\x20mode:\x20','slice','HANDLE','SCRIPT','.transferCandidates.strategy','interrupting','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','APPROVED','CONTINUE','add','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','ANY','has','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','flowJson.nodes','map','flowType\x20is\x20required.','.failurePolicy','MINUTES','#/$defs/timeAmount','catch','125837guycOk','1342314emwSEp','sourceNodeId','timeout\x20must\x20be\x20an\x20object.','formDefinitions','template','Notification\x20template.','.async.retryInterval','.pageId','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','trim','edge\x20name\x20must\x20be\x20a\x20string.','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','APPROVAL','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','.cc.readSources','EMAIL','Node\x20has\x20no\x20incoming\x20edge.','\x20was\x20empty\x20and\x20was\x20removed.','url','flowDesc','node\x20must\x20be\x20an\x20object.','.unit','pid','flowJson.edges[','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','indexOf','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','appCode','\x20->\x20','edge\x20source\x20is\x20required.','Unsupported\x20node\x20type:\x20','Notification\x20fact.','defaultFlow\x20must\x20be\x20a\x20boolean.','formPermissions','Notification\x20action\x20must\x20be\x20an\x20object.','pageMode','integer','stringify','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','duration','approval.simple-flow.v1','.target','userIds','.async','.source','.timeout.duration','.timeout.resultVariable','retryCount','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','.detailMarkdown','FIXED\x20assignee\x20requires\x20userIds.','edges','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','.id','cc.recipientUserIds\x20supports\x20at\x20most\x20','resultVariable','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','prototype','strategy','#/$defs/position','.waypoints[','USER','source','.scriptName','timeout.interrupting\x20must\x20be\x20a\x20boolean.','keys','filter','.facts','Unsupported\x20condition\x20type:\x20','.defaultFlow','.configCode','edge\x20must\x20be\x20an\x20object.','HOURS','formSchema','.assignee','position','Unsupported\x20schemaVersion:\x20','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','.role','Duplicate\x20BPMN\x20element\x20id:\x20','.approvalMode','EXPRESSION','Edge\x20target\x20node\x20not\x20found:\x20','duration\x20requires\x20value\x20and\x20unit.','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','^[A-Za-z_][A-Za-z0-9_]*$','.conditionType','mode','title','REJECTED','820xUVKFE','push','replace','unit','flowJson.','Edge\x20source\x20node\x20not\x20found:\x20','.position.','https://json-schema.org/draft/2020-12/schema','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','PLATFORM_FORM','19830fvhSXw','failurePolicy','Notification\x20fact\x20must\x20be\x20an\x20object.','approval_sys_','waypoint.','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','isInteger','retryInterval','FORM_FLOW','some','FIXED','.timeout.interrupting','].path','AUTO_REJECT','entries','startPath','\x20facts.','2034813BMxccY','conditionType','Every\x20node\x20requires\x20a\x20non-empty\x20name.','.cc.recipientUserIds','isFinite','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','legacy_field_removed','forEach','pageIds','timeout.enabled\x20must\x20be\x20a\x20boolean.','.transferCandidates','form','timeout','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','10024zZsjhK','Duplicate\x20edge\x20route:\x20','.position','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','flowJson','Unsupported\x20approval\x20mode:\x20','NaN','roleId','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','EXECUTE_BFF','.timeout.scriptName','.actions','https://lovrabet.com/schema/rabetbase-flow-config.json','recipientUserIds','transferCandidates','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','value','.async.enabled'];a299_0x45b9=function(){return _0x4f998c;};return a299_0x45b9();}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':a299_0x85c6cc(0x256),'$id':a299_0x85c6cc(0x286),'title':'Rabetbase\x20FlowConfig','type':a299_0x85c6cc(0x1c6),'required':[a299_0x85c6cc(0x193),a299_0x85c6cc(0x1c4),a299_0x85c6cc(0x27e)],'$defs':{'userId':{'anyOf':[{'type':'string','minLength':0x1},{'type':'integer','minimum':0x1}]},'position':{'type':a299_0x85c6cc(0x1c6),'required':['x','y'],'properties':{'x':{'type':a299_0x85c6cc(0x2c2),'minimum':0x0},'y':{'type':a299_0x85c6cc(0x2c2),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a299_0x85c6cc(0x1c6),'required':[a299_0x85c6cc(0x28a),'unit'],'properties':{'value':{'type':a299_0x85c6cc(0x218),'minimum':0x1},'unit':{'enum':[a299_0x85c6cc(0x1a7),a299_0x85c6cc(0x1f0),a299_0x85c6cc(0x23d),a299_0x85c6cc(0x1aa)]}},'additionalProperties':!![]},'flowNode':{'type':a299_0x85c6cc(0x1c6),'required':['id','type','name',a299_0x85c6cc(0x240)],'properties':{'id':{'type':a299_0x85c6cc(0x1bc),'pattern':a299_0x85c6cc(0x24a)},'type':{'enum':[a299_0x85c6cc(0x1b0),a299_0x85c6cc(0x1d9),a299_0x85c6cc(0x200),'CONDITION',a299_0x85c6cc(0x1e1),a299_0x85c6cc(0x2e7)]},'name':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'path':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'position':{'$ref':a299_0x85c6cc(0x230)},'approvalMode':{'enum':[a299_0x85c6cc(0x2eb),a299_0x85c6cc(0x2c7),a299_0x85c6cc(0x1e9)]},'taskMode':{'enum':['APPROVAL',a299_0x85c6cc(0x1e0)]},'assignee':{'type':a299_0x85c6cc(0x1c6),'required':[a299_0x85c6cc(0x22f)],'properties':{'strategy':{'enum':[a299_0x85c6cc(0x263),a299_0x85c6cc(0x2e1)]},'userIds':{'type':a299_0x85c6cc(0x2de),'minItems':0x1,'items':{'$ref':a299_0x85c6cc(0x296)}},'roleId':{'anyOf':[{'type':a299_0x85c6cc(0x218),'minimum':0x1},{'type':a299_0x85c6cc(0x1bc),'pattern':'^[1-9][0-9]*$'}]}},'additionalProperties':!![]},'transferCandidates':{'type':a299_0x85c6cc(0x1c6),'required':[a299_0x85c6cc(0x22f),'userIds'],'properties':{'strategy':{'const':a299_0x85c6cc(0x263)},'userIds':{'type':a299_0x85c6cc(0x2de),'minItems':0x1,'items':{'$ref':a299_0x85c6cc(0x296)}}},'additionalProperties':!![]},'sequential':{'type':a299_0x85c6cc(0x298)},'result':{'enum':[a299_0x85c6cc(0x1e5),a299_0x85c6cc(0x24e)]},'scriptName':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'resultVariable':{'type':'string','pattern':a299_0x85c6cc(0x24a)},'async':{'type':'object','properties':{'enabled':{'type':a299_0x85c6cc(0x298)},'retryCount':{'type':a299_0x85c6cc(0x218),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a299_0x85c6cc(0x1f1)}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':a299_0x85c6cc(0x298)},'duration':{'$ref':a299_0x85c6cc(0x1f1)},'action':{'enum':['AUTO_APPROVE',a299_0x85c6cc(0x266),a299_0x85c6cc(0x283)]},'interrupting':{'type':'boolean'},'scriptName':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'resultVariable':{'type':a299_0x85c6cc(0x1bc),'pattern':a299_0x85c6cc(0x24a)}},'additionalProperties':!![]},'cc':{'type':'object','required':[a299_0x85c6cc(0x287)],'properties':{'recipientUserIds':{'type':a299_0x85c6cc(0x2de),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1}},'visible':{'type':a299_0x85c6cc(0x2de),'uniqueItems':!![],'items':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a299_0x85c6cc(0x1c6),'required':[a299_0x85c6cc(0x2c1),a299_0x85c6cc(0x1f8)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'failurePolicy':{'enum':['CONTINUE','FAIL']},'template':{'type':'object','required':[a299_0x85c6cc(0x24d),a299_0x85c6cc(0x1a0)],'properties':{'title':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'summary':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'detailMarkdown':{'type':a299_0x85c6cc(0x1bc)},'facts':{'type':a299_0x85c6cc(0x2de),'maxItems':0x8,'items':{'type':a299_0x85c6cc(0x1c6),'required':[a299_0x85c6cc(0x192),a299_0x85c6cc(0x28a)],'properties':{'label':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'value':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a299_0x85c6cc(0x2de),'maxItems':0x2,'items':{'type':'object','required':[a299_0x85c6cc(0x2b1),'url'],'properties':{'text':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'url':{'type':'string','minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0x85c6cc(0x2de),'items':{'type':a299_0x85c6cc(0x1c6),'required':[a299_0x85c6cc(0x191),a299_0x85c6cc(0x28a)],'properties':{'type':{'enum':[a299_0x85c6cc(0x232),a299_0x85c6cc(0x2e1),'EMAIL']},'value':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'role':{'enum':['TO','CC',a299_0x85c6cc(0x2bc)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0x85c6cc(0x1c6),'properties':{'id':{'type':a299_0x85c6cc(0x1bc),'pattern':a299_0x85c6cc(0x24a)},'source':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'target':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'sourceNodeId':{'type':'string','minLength':0x1},'targetNodeId':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'conditionType':{'enum':[a299_0x85c6cc(0x19b),a299_0x85c6cc(0x1e5),a299_0x85c6cc(0x24e),a299_0x85c6cc(0x246)]},'expression':{'type':'string'},'defaultFlow':{'type':a299_0x85c6cc(0x298)},'name':{'type':'string'},'waypoints':{'type':a299_0x85c6cc(0x2de),'items':{'$ref':a299_0x85c6cc(0x230)}}},'allOf':[{'anyOf':[{'required':[a299_0x85c6cc(0x233)]},{'required':['sourceNodeId']}]},{'anyOf':[{'required':[a299_0x85c6cc(0x2aa)]},{'required':[a299_0x85c6cc(0x1c7)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'flowDesc':{'type':a299_0x85c6cc(0x1bc)},'flowType':{'enum':[a299_0x85c6cc(0x261),a299_0x85c6cc(0x2ec)]},'datasetCode':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'pageId':{'type':a299_0x85c6cc(0x218),'minimum':0x1,'maximum':Number[a299_0x85c6cc(0x29a)]},'pageIds':{'type':a299_0x85c6cc(0x2de),'items':{'type':a299_0x85c6cc(0x218),'minimum':0x1,'maximum':Number['MAX_SAFE_INTEGER']}},'templateName':![],'flowJson':{'type':a299_0x85c6cc(0x1c6),'required':[a299_0x85c6cc(0x18d),a299_0x85c6cc(0x228)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':'string','const':a299_0x85c6cc(0x21c),'description':a299_0x85c6cc(0x2da)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0x85c6cc(0x1a6)},'startPageId':![],'startPath':{'type':'string','minLength':0x1},'nodes':{'type':a299_0x85c6cc(0x2de),'minItems':0x1,'items':{'$ref':a299_0x85c6cc(0x1a4)}},'edges':{'type':a299_0x85c6cc(0x2de),'minItems':0x1,'items':{'$ref':a299_0x85c6cc(0x195)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a299_0x85c6cc(0x190),a299_0x85c6cc(0x1c8),'flowName',a299_0x85c6cc(0x1bb),'datasetCode',a299_0x85c6cc(0x20f),a299_0x85c6cc(0x1a1),a299_0x85c6cc(0x294)],REMOVED_ROOT_FIELDS=['id','appCode',a299_0x85c6cc(0x294)],DEFAULT_FLOW_SCHEMA_VERSION='approval.simple-flow.v1',NODE_TYPES=new Set(['START',a299_0x85c6cc(0x1d9),a299_0x85c6cc(0x200),'CONDITION','SCRIPT',a299_0x85c6cc(0x2e7)]),CONDITION_TYPES=new Set([a299_0x85c6cc(0x19b),'APPROVED',a299_0x85c6cc(0x24e),'EXPRESSION']),APPROVAL_MODES=new Set([a299_0x85c6cc(0x2eb),a299_0x85c6cc(0x2c7),a299_0x85c6cc(0x1e9)]),APPROVAL_TASK_MODES=new Set([a299_0x85c6cc(0x200),a299_0x85c6cc(0x1e0)]),FLOW_TIME_UNITS=new Set(['SECONDS',a299_0x85c6cc(0x1f0),a299_0x85c6cc(0x23d),a299_0x85c6cc(0x1aa)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a299_0x85c6cc(0x1ce),'AUTO_REJECT',a299_0x85c6cc(0x283)]),FLOW_TYPES=new Set([a299_0x85c6cc(0x261),a299_0x85c6cc(0x2ec)]),FLOW_PAGE_MODES=new Set([a299_0x85c6cc(0x1a6),a299_0x85c6cc(0x258)]),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([a299_0x85c6cc(0x1e6),'FAIL']),NOTIFICATION_RECIPIENT_TYPES=new Set([a299_0x85c6cc(0x232),a299_0x85c6cc(0x2e1),a299_0x85c6cc(0x203)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a299_0x85c6cc(0x2bc)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE='scriptResult',UNSUPPORTED_FORM_MESSAGE='Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.',UNSUPPORTED_PLATFORM_FORM_MESSAGE='PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.',RESERVED_RESULT_VARIABLES=new Set(['formData','approved','approval_sys_appCode',a299_0x85c6cc(0x1b5),a299_0x85c6cc(0x1d3),a299_0x85c6cc(0x1a2),a299_0x85c6cc(0x2a8),a299_0x85c6cc(0x1af),a299_0x85c6cc(0x2d6),'approval_sys_dataId']);export function normalizeFlowConfig(_0x26c177){const _0x3819a8=a299_0x85c6cc;if(!isRecord(_0x26c177))throw new TypeError(_0x3819a8(0x1ff));const _0x1095de=cloneJsonValue(_0x26c177),_0x5c05c8=_0x1095de['flowJson'],_0x50882d=isRecord(_0x5c05c8)?cloneJsonValue(_0x5c05c8):{},_0x313b02=[],_0x1da674=[];for(const _0x1d0332 of REMOVED_ROOT_FIELDS){if(!Object['prototype']['hasOwnProperty'][_0x3819a8(0x1ae)](_0x1095de,_0x1d0332))continue;delete _0x1095de[_0x1d0332],_0x1da674[_0x3819a8(0x250)](_0x1d0332),_0x313b02[_0x3819a8(0x250)]({'code':_0x3819a8(0x271),'path':_0x1d0332,'message':_0x1d0332+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}for(const _0x5031f0 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x3819a8(0x22e)][_0x3819a8(0x1bd)][_0x3819a8(0x1ae)](_0x50882d,_0x5031f0))continue;const _0x5cc87d=_0x3819a8(0x253)+_0x5031f0;delete _0x50882d[_0x5031f0],_0x1da674['push'](_0x5cc87d),_0x313b02[_0x3819a8(0x250)]({'code':'legacy_field_removed','path':_0x5cc87d,'message':_0x5cc87d+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}if(Object[_0x3819a8(0x22e)]['hasOwnProperty'][_0x3819a8(0x1ae)](_0x50882d,_0x3819a8(0x2a3))){const _0x2eb396=_0x50882d[_0x3819a8(0x2a3)],_0x5137fa=typeof _0x2eb396===_0x3819a8(0x1bc)?_0x2eb396[_0x3819a8(0x1fd)]():_0x2eb396;if(isEmptyJsonValue(_0x2eb396)||_0x5137fa===DEFAULT_FLOW_SCHEMA_VERSION){const _0x4eac9f=_0x3819a8(0x2ea);delete _0x50882d['schemaVersion'],_0x1da674[_0x3819a8(0x250)](_0x4eac9f),_0x313b02[_0x3819a8(0x250)]({'code':_0x3819a8(0x271),'path':_0x4eac9f,'message':_0x4eac9f+_0x3819a8(0x1cc)+DEFAULT_FLOW_SCHEMA_VERSION+'\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.'});}}removeEmptyMetadata(_0x50882d,_0x3819a8(0x27e),_0x313b02,_0x1da674);_0x1095de['flowType']===_0x3819a8(0x2ec)&&!Object[_0x3819a8(0x22e)]['hasOwnProperty'][_0x3819a8(0x1ae)](_0x50882d,_0x3819a8(0x217))&&(_0x50882d[_0x3819a8(0x217)]=_0x3819a8(0x1a6));_0x1095de['flowJson']=_0x50882d;if(typeof _0x1095de['flowName']===_0x3819a8(0x1bc))_0x1095de[_0x3819a8(0x193)]=_0x1095de[_0x3819a8(0x193)][_0x3819a8(0x1fd)]();return{'config':_0x1095de,'warnings':_0x313b02,'removedPaths':_0x1da674};}export function validateFlowConfig(_0x244972){const _0x4a6ead=a299_0x85c6cc;let _0x583dcb;try{_0x583dcb=normalizeFlowConfig(_0x244972);}catch(_0x25c6b0){const _0x46b227=_0x25c6b0 instanceof Error?_0x25c6b0['message']:String(_0x25c6b0),_0x345dbf={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x46b227}],'warnings':[],'normalized':_0x345dbf,'validationConfig':_0x345dbf};}const _0x3d6612=_0x583dcb[_0x4a6ead(0x2df)],_0x30b31d=cloneJsonValue(_0x3d6612),_0x16e501=_0x30b31d[_0x4a6ead(0x27e)];_0x16e501['flowKey']='__rabetbase_local_validation__',_0x16e501[_0x4a6ead(0x193)]=_0x3d6612[_0x4a6ead(0x193)];typeof _0x3d6612[_0x4a6ead(0x18f)]===_0x4a6ead(0x1bc)&&_0x3d6612[_0x4a6ead(0x18f)][_0x4a6ead(0x1fd)]()&&(_0x16e501['bindDatasetCode']=_0x3d6612[_0x4a6ead(0x18f)][_0x4a6ead(0x1fd)]());const _0x24556d=[];return validateOuterMetadata(_0x3d6612,_0x24556d),validateFlowClassification(_0x3d6612,_0x24556d),validateGraph(_0x3d6612[_0x4a6ead(0x27e)],_0x24556d),{'valid':_0x24556d[_0x4a6ead(0x1cf)]===0x0,'errors':_0x24556d,'warnings':_0x583dcb['warnings'],'normalized':_0x3d6612,'validationConfig':_0x30b31d};}function validateFlowClassification(_0x315bdb,_0x350544){const _0x25c489=a299_0x85c6cc;if(!isRecord(_0x315bdb[_0x25c489(0x27e)]))return;const _0x36e081=_0x315bdb[_0x25c489(0x1c4)],_0x48bb42=_0x315bdb['flowJson'][_0x25c489(0x217)];_0x48bb42!==undefined&&(typeof _0x48bb42!==_0x25c489(0x1bc)||!FLOW_PAGE_MODES[_0x25c489(0x1ea)](_0x48bb42))&&_0x350544['push']({'path':'flowJson.pageMode','message':_0x25c489(0x1c9)+String(_0x48bb42)+'.'});_0x36e081===_0x25c489(0x261)&&_0x48bb42!==undefined&&_0x350544[_0x25c489(0x250)]({'path':'flowJson.pageMode','message':_0x25c489(0x249)});_0x36e081===_0x25c489(0x2ec)&&_0x48bb42===_0x25c489(0x258)&&_0x350544[_0x25c489(0x250)]({'path':_0x25c489(0x2ae),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x36e081===_0x25c489(0x261)||_0x36e081===_0x25c489(0x2ec))&&validateCustomPageNavigation(_0x315bdb,_0x36e081,_0x48bb42,_0x350544);if(_0x36e081!=='FORM_FLOW'||!Array[_0x25c489(0x2b7)](_0x315bdb[_0x25c489(0x27e)]['nodes']))return;_0x315bdb[_0x25c489(0x27e)][_0x25c489(0x18d)][_0x25c489(0x272)]((_0x43786e,_0x551878)=>{const _0xcc8fa=_0x25c489;isRecord(_0x43786e)&&_0x43786e[_0xcc8fa(0x191)]===_0xcc8fa(0x200)&&_0x43786e[_0xcc8fa(0x2dd)]==='HANDLE'&&_0x350544[_0xcc8fa(0x250)]({'path':_0xcc8fa(0x29e)+_0x551878+'].taskMode','message':_0xcc8fa(0x225)});});}function validateCustomPageNavigation(_0x30ff44,_0x59fe04,_0x266bbb,_0x20532a){const _0x260188=a299_0x85c6cc,_0x361751=_0x30ff44[_0x260188(0x27e)]['startPageId'];_0x361751!==undefined&&_0x20532a[_0x260188(0x250)]({'path':_0x260188(0x1c0),'message':'startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.'});const _0x2a7c32=_0x30ff44[_0x260188(0x27e)][_0x260188(0x268)];_0x2a7c32!==undefined&&(typeof _0x2a7c32!=='string'||_0x2a7c32[_0x260188(0x1fd)]()==='')&&_0x20532a[_0x260188(0x250)]({'path':'flowJson.startPath','message':'startPath\x20must\x20be\x20a\x20non-empty\x20string.'});const _0xc5ff8b=Array[_0x260188(0x2b7)](_0x30ff44[_0x260188(0x27e)][_0x260188(0x18d)])?_0x30ff44[_0x260188(0x27e)][_0x260188(0x18d)]['map']((_0xa00a11,_0x35ae31)=>({'node':_0xa00a11,'index':_0x35ae31}))['filter'](({node:_0x171ce3})=>isRecord(_0x171ce3)&&_0x171ce3[_0x260188(0x28d)]!==undefined):[],_0x10d9ba=_0x2a7c32!==undefined||_0xc5ff8b[_0x260188(0x1cf)]>0x0,_0x16c5f9=_0x266bbb===undefined&&_0x59fe04==='INDEPENDENT_FLOW'?_0x260188(0x1a6):_0x266bbb;_0x10d9ba&&(_0x59fe04!==_0x260188(0x2ec)||_0x16c5f9!=='CUSTOM_PAGE')&&(_0x2a7c32!==undefined&&_0x20532a[_0x260188(0x250)]({'path':'flowJson.startPath','message':_0x260188(0x2cc)}),_0xc5ff8b[_0x260188(0x272)](({index:_0x1f1d43})=>{const _0x1f174b=_0x260188;_0x20532a[_0x1f174b(0x250)]({'path':_0x1f174b(0x29e)+_0x1f1d43+_0x1f174b(0x265),'message':_0x1f174b(0x257)});}));}export async function writeNormalizedFlowConfig(_0x3d4641,_0x1e63f1,_0x42974a={}){const _0x5ea033=a299_0x85c6cc,_0x36deb0=resolve(_0x3d4641),_0x2777c3=_0x36deb0+'.'+process[_0x5ea033(0x20a)]+'.'+randomUUID()+_0x5ea033(0x2a0),_0xe396a5=JSON[_0x5ea033(0x219)](_0x1e63f1,null,0x2)+'\x0a';let _0x34b0ad;try{try{_0x34b0ad=(await stat(_0x36deb0))[_0x5ea033(0x24c)]&0x1ff;}catch{_0x34b0ad=undefined;}await writeFile(_0x2777c3,_0xe396a5,{'encoding':'utf8','flag':'wx','mode':_0x34b0ad??0x1a4});if(_0x34b0ad!==undefined)await chmod(_0x2777c3,_0x34b0ad);_0x42974a[_0x5ea033(0x1ab)]===![]?(await link(_0x2777c3,_0x36deb0),await unlink(_0x2777c3)):await rename(_0x2777c3,_0x36deb0);}finally{await unlink(_0x2777c3)[_0x5ea033(0x1f2)](()=>undefined);}}function validateOuterMetadata(_0x16eb60,_0x4230f3){const _0x26cf9a=a299_0x85c6cc;(typeof _0x16eb60[_0x26cf9a(0x193)]!==_0x26cf9a(0x1bc)||_0x16eb60[_0x26cf9a(0x193)][_0x26cf9a(0x1fd)]()==='')&&_0x4230f3['push']({'path':_0x26cf9a(0x193),'message':_0x26cf9a(0x2c6)});_0x16eb60[_0x26cf9a(0x207)]!==undefined&&typeof _0x16eb60['flowDesc']!==_0x26cf9a(0x1bc)&&_0x4230f3[_0x26cf9a(0x250)]({'path':'flowDesc','message':'flowDesc\x20must\x20be\x20a\x20string.'});if(_0x16eb60[_0x26cf9a(0x1c4)]===undefined||_0x16eb60[_0x26cf9a(0x1c4)]===null)_0x4230f3[_0x26cf9a(0x250)]({'path':'flowType','message':_0x26cf9a(0x1ee)});else(typeof _0x16eb60[_0x26cf9a(0x1c4)]!==_0x26cf9a(0x1bc)||!FLOW_TYPES[_0x26cf9a(0x1ea)](_0x16eb60[_0x26cf9a(0x1c4)]))&&_0x4230f3[_0x26cf9a(0x250)]({'path':_0x26cf9a(0x1c4),'message':_0x26cf9a(0x292)+String(_0x16eb60[_0x26cf9a(0x1c4)])+'.'});_0x16eb60[_0x26cf9a(0x18f)]!==undefined&&typeof _0x16eb60[_0x26cf9a(0x18f)]!==_0x26cf9a(0x1bc)&&_0x4230f3[_0x26cf9a(0x250)]({'path':_0x26cf9a(0x18f),'message':'datasetCode\x20must\x20be\x20a\x20string.'});_0x16eb60['pageIds']===undefined&&_0x16eb60[_0x26cf9a(0x1a1)]!==undefined&&(!Number['isSafeInteger'](_0x16eb60['pageId'])||_0x16eb60[_0x26cf9a(0x1a1)]<=0x0)&&_0x4230f3[_0x26cf9a(0x250)]({'path':_0x26cf9a(0x1a1),'message':_0x26cf9a(0x20c)});if(_0x16eb60['pageIds']!==undefined){if(!Array[_0x26cf9a(0x2b7)](_0x16eb60['pageIds'])||_0x16eb60[_0x26cf9a(0x273)][_0x26cf9a(0x262)](_0x2ba639=>!Number[_0x26cf9a(0x2a5)](_0x2ba639)||_0x2ba639<=0x0))_0x4230f3[_0x26cf9a(0x250)]({'path':_0x26cf9a(0x273),'message':_0x26cf9a(0x1ac)});else[...new Set(_0x16eb60[_0x26cf9a(0x273)])][_0x26cf9a(0x1db)](',')[_0x26cf9a(0x1cf)]>0x800&&_0x4230f3['push']({'path':'pageIds','message':'pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.'});_0x16eb60[_0x26cf9a(0x1c4)]===_0x26cf9a(0x2ec)&&Array['isArray'](_0x16eb60[_0x26cf9a(0x273)])&&_0x16eb60[_0x26cf9a(0x273)]['length']>0x0&&_0x4230f3[_0x26cf9a(0x250)]({'path':_0x26cf9a(0x273),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.'});}_0x16eb60[_0x26cf9a(0x1c4)]===_0x26cf9a(0x2ec)&&_0x16eb60[_0x26cf9a(0x18f)]!==undefined&&_0x4230f3[_0x26cf9a(0x250)]({'path':'datasetCode','message':_0x26cf9a(0x25e)}),_0x16eb60[_0x26cf9a(0x1c4)]===_0x26cf9a(0x2ec)&&_0x16eb60['pageIds']===undefined&&_0x16eb60['pageId']!==undefined&&_0x4230f3['push']({'path':'pageId','message':_0x26cf9a(0x270)});}function validateGraph(_0x263738,_0x58715e){const _0x759e43=a299_0x85c6cc;if(!isRecord(_0x263738)){_0x58715e['push']({'path':_0x759e43(0x27e),'message':_0x759e43(0x1cd)});return;}!Array[_0x759e43(0x2b7)](_0x263738[_0x759e43(0x18d)])&&_0x58715e[_0x759e43(0x250)]({'path':_0x759e43(0x1ec),'message':'nodes\x20must\x20be\x20an\x20array.'});!Array['isArray'](_0x263738[_0x759e43(0x228)])&&_0x58715e['push']({'path':_0x759e43(0x188),'message':'edges\x20must\x20be\x20an\x20array.'});Object[_0x759e43(0x22e)]['hasOwnProperty'][_0x759e43(0x1ae)](_0x263738,_0x759e43(0x2a3))&&_0x58715e[_0x759e43(0x250)]({'path':_0x759e43(0x2ea),'message':_0x759e43(0x241)+String(_0x263738[_0x759e43(0x2a3)])+_0x759e43(0x28e)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x4c96f9 of[_0x759e43(0x23e),_0x759e43(0x1f7),_0x759e43(0x215)]){Object[_0x759e43(0x22e)]['hasOwnProperty'][_0x759e43(0x1ae)](_0x263738,_0x4c96f9)&&_0x58715e[_0x759e43(0x250)]({'path':_0x759e43(0x253)+_0x4c96f9,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x759e43(0x2b7)](_0x263738[_0x759e43(0x18d)])||!Array[_0x759e43(0x2b7)](_0x263738['edges']))return;const _0x10991e=new Map(),_0x7e2625=[],_0x560a58=[],_0x511be5=new Map(),_0x1b8c30=new Map(),_0x5d365d=new Set();let _0x44564e=0x0;_0x263738[_0x759e43(0x18d)][_0x759e43(0x272)]((_0x37198f,_0x309971)=>{const _0x311c75=_0x759e43,_0x3d9762=_0x311c75(0x29e)+_0x309971+']';if(!isRecord(_0x37198f)){_0x58715e['push']({'path':_0x3d9762,'message':_0x311c75(0x208)});return;}const _0x374e34=_0x37198f;if(typeof _0x374e34['id']!==_0x311c75(0x1bc)||!BPMN_ID_PATTERN[_0x311c75(0x2d5)](_0x374e34['id']))_0x58715e['push']({'path':_0x3d9762+'.id','message':_0x311c75(0x2e3)});else _0x10991e['has'](_0x374e34['id'])?_0x58715e[_0x311c75(0x250)]({'path':_0x3d9762+_0x311c75(0x22a),'message':_0x311c75(0x29d)+_0x374e34['id']+'.'}):(_0x10991e['set'](_0x374e34['id'],_0x374e34),_0x5d365d[_0x311c75(0x1e7)](_0x374e34['id']));if(!NODE_TYPES[_0x311c75(0x1ea)](_0x374e34[_0x311c75(0x191)]))_0x58715e[_0x311c75(0x250)]({'path':_0x3d9762+_0x311c75(0x2a6),'message':_0x311c75(0x212)+String(_0x374e34[_0x311c75(0x191)])+'.'});else{if(_0x374e34[_0x311c75(0x191)]===_0x311c75(0x1b0))_0x7e2625['push'](_0x374e34['id']);else _0x374e34[_0x311c75(0x191)]==='END'&&_0x560a58[_0x311c75(0x250)](_0x374e34['id']);}_0x374e34['type']===_0x311c75(0x200)&&(_0x374e34[_0x311c75(0x2dd)]===undefined||_0x374e34['taskMode']===_0x311c75(0x200))&&(_0x44564e+=0x1);validateNode(_0x374e34,_0x3d9762,_0x58715e);if(_0x374e34[_0x311c75(0x191)]===_0x311c75(0x1e1)){const _0x16c549=resolveEffectiveResultVariable(_0x374e34[_0x311c75(0x22c)],![]);_0x16c549&&(registerResultVariableOwner(_0x1b8c30,_0x16c549,_0x374e34['id'],_0x58715e),!_0x511be5['has'](_0x16c549)&&_0x511be5[_0x311c75(0x1dc)](_0x16c549,_0x374e34['id']));}if(_0x374e34['type']==='APPROVAL'&&isRecord(_0x374e34[_0x311c75(0x277)])&&_0x374e34[_0x311c75(0x277)][_0x311c75(0x2b5)]===!![]&&_0x374e34[_0x311c75(0x277)][_0x311c75(0x2dc)]===_0x311c75(0x283)){const _0x417a53=resolveEffectiveResultVariable(_0x374e34[_0x311c75(0x277)]['resultVariable'],!![]);_0x417a53&&registerResultVariableOwner(_0x1b8c30,_0x417a53,_0x374e34['id']+'.timeout',_0x58715e);}});_0x7e2625[_0x759e43(0x1cf)]!==0x1&&_0x58715e[_0x759e43(0x250)]({'path':'flowJson.nodes','message':'Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.'});_0x560a58[_0x759e43(0x1cf)]===0x0&&_0x58715e['push']({'path':_0x759e43(0x1ec),'message':_0x759e43(0x282)});const _0x49733b=new Map(),_0x38e512=new Map(),_0x1c4be2=new Map(),_0x24905=new Set();_0x263738[_0x759e43(0x228)]['forEach']((_0x82d864,_0x7d13c9)=>{const _0x592d31=_0x759e43,_0x1313b1=_0x592d31(0x20b)+_0x7d13c9+']';if(!isRecord(_0x82d864)){_0x58715e[_0x592d31(0x250)]({'path':_0x1313b1,'message':_0x592d31(0x23c)});return;}const _0x121f73=_0x82d864;_0x1c4be2['set'](_0x121f73,_0x1313b1);const _0x2d0a76=resolveEdgeEndpoint(_0x121f73['source'],_0x121f73[_0x592d31(0x1f5)]),_0x23a2dc=resolveEdgeEndpoint(_0x121f73['target'],_0x121f73[_0x592d31(0x1c7)]);if(!_0x2d0a76)_0x58715e[_0x592d31(0x250)]({'path':_0x1313b1+_0x592d31(0x220),'message':_0x592d31(0x211)});if(!_0x23a2dc)_0x58715e[_0x592d31(0x250)]({'path':_0x1313b1+_0x592d31(0x21d),'message':_0x592d31(0x18b)});_0x2d0a76&&!_0x10991e[_0x592d31(0x1ea)](_0x2d0a76)&&_0x58715e[_0x592d31(0x250)]({'path':_0x1313b1+'.source','message':_0x592d31(0x254)+_0x2d0a76+'.'});_0x23a2dc&&!_0x10991e['has'](_0x23a2dc)&&_0x58715e[_0x592d31(0x250)]({'path':_0x1313b1+'.target','message':_0x592d31(0x247)+_0x23a2dc+'.'});if(_0x121f73['id']!==undefined){if(typeof _0x121f73['id']!==_0x592d31(0x1bc)||!BPMN_ID_PATTERN[_0x592d31(0x2d5)](_0x121f73['id']))_0x58715e['push']({'path':_0x1313b1+_0x592d31(0x22a),'message':_0x592d31(0x1b6)});else{if(_0x5d365d['has'](_0x121f73['id']))_0x58715e[_0x592d31(0x250)]({'path':_0x1313b1+'.id','message':_0x592d31(0x244)+_0x121f73['id']+'.'});else!_0x5d365d[_0x592d31(0x1ea)](_0x121f73['id'])&&_0x5d365d[_0x592d31(0x1e7)](_0x121f73['id']);}}if(_0x2d0a76&&_0x23a2dc){const _0x58de1f=_0x2d0a76+'\x00'+_0x23a2dc+'\x00'+(_0x121f73['conditionType']??_0x592d31(0x19b));_0x24905[_0x592d31(0x1ea)](_0x58de1f)?_0x58715e[_0x592d31(0x250)]({'path':_0x1313b1,'message':_0x592d31(0x27b)+_0x2d0a76+_0x592d31(0x210)+_0x23a2dc+'\x20('+(_0x121f73['conditionType']??_0x592d31(0x19b))+').'}):_0x24905[_0x592d31(0x1e7)](_0x58de1f);}validateEdge(_0x121f73,_0x1313b1,_0x58715e),_0x2d0a76&&_0x23a2dc&&(_0x49733b[_0x592d31(0x291)](_0x2d0a76)?.[_0x592d31(0x250)](_0x121f73)??_0x49733b[_0x592d31(0x1dc)](_0x2d0a76,[_0x121f73]),_0x38e512['get'](_0x23a2dc)?.[_0x592d31(0x250)](_0x121f73)??_0x38e512[_0x592d31(0x1dc)](_0x23a2dc,[_0x121f73]));});if(_0x7e2625[_0x759e43(0x1cf)]!==0x1)return;validateGraphShape(_0x10991e,_0x7e2625[0x0],_0x560a58,_0x49733b,_0x38e512,_0x1c4be2,_0x58715e),validateScriptResultReferences(_0x10991e,_0x7e2625[0x0],_0x49733b,_0x38e512,_0x1c4be2,_0x511be5,_0x58715e),validateApprovalResults(_0x10991e,_0x44564e,_0x560a58,_0x58715e);}function validateNode(_0x30fe1f,_0xd311a4,_0x27c62a){const _0x3fa573=a299_0x85c6cc;for(const _0x18862d of[_0x3fa573(0x276),_0x3fa573(0x2a7)]){Object[_0x3fa573(0x22e)][_0x3fa573(0x1bd)][_0x3fa573(0x1ae)](_0x30fe1f,_0x18862d)&&_0x27c62a['push']({'path':_0xd311a4+'.'+_0x18862d,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x3fa573(0x1ea)](_0x30fe1f[_0x3fa573(0x191)]))return;(typeof _0x30fe1f['name']!==_0x3fa573(0x1bc)||_0x30fe1f[_0x3fa573(0x19c)][_0x3fa573(0x1fd)]()==='')&&_0x27c62a['push']({'path':_0xd311a4+_0x3fa573(0x2db),'message':_0x3fa573(0x26c)});_0x30fe1f['pageId']!==undefined&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x1fb),'message':'node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.'});if(_0x30fe1f['path']!==undefined){if(typeof _0x30fe1f['path']!==_0x3fa573(0x1bc)||_0x30fe1f[_0x3fa573(0x28d)][_0x3fa573(0x1fd)]()==='')_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x2e0),'message':_0x3fa573(0x1c5)});else _0x30fe1f[_0x3fa573(0x191)]!==_0x3fa573(0x200)&&_0x30fe1f[_0x3fa573(0x191)]!==_0x3fa573(0x1d9)&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x2e0),'message':_0x3fa573(0x2d2)});}const _0x48cbef=_0x30fe1f[_0x3fa573(0x240)];if(!isRecord(_0x48cbef))_0x27c62a['push']({'path':_0xd311a4+_0x3fa573(0x27c),'message':'Every\x20node\x20requires\x20position.x\x20and\x20position.y.'});else for(const _0x4a06be of['x','y']){const _0x437473=_0x48cbef[_0x4a06be];(typeof _0x437473!==_0x3fa573(0x2c2)||!Number[_0x3fa573(0x26e)](_0x437473)||_0x437473<0x0)&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x255)+_0x4a06be,'message':_0x3fa573(0x1c1)+_0x4a06be+_0x3fa573(0x2e8)});}if(_0x30fe1f[_0x3fa573(0x191)]===_0x3fa573(0x200)){const _0xd871b3=_0x30fe1f[_0x3fa573(0x1b3)]??_0x3fa573(0x2eb),_0x44a24a=_0x30fe1f['taskMode']??'APPROVAL';!APPROVAL_TASK_MODES[_0x3fa573(0x1ea)](_0x44a24a)&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+'.taskMode','message':_0x3fa573(0x1de)+String(_0x44a24a)+'.'});!APPROVAL_MODES['has'](_0xd871b3)&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x245),'message':_0x3fa573(0x27f)+String(_0xd871b3)+'.'});if(!isRecord(_0x30fe1f[_0x3fa573(0x2ab)]))_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x23f),'message':_0x3fa573(0x2ed)});else{const _0x2354a9=_0x30fe1f['assignee'][_0x3fa573(0x22f)];_0x2354a9!=='FIXED'&&_0x2354a9!==_0x3fa573(0x2e1)&&_0x27c62a['push']({'path':_0xd311a4+_0x3fa573(0x189),'message':_0x3fa573(0x28f)});if(_0x2354a9===_0x3fa573(0x263)){const _0xc4c55d=_0x30fe1f['assignee'][_0x3fa573(0x21e)];if(!Array[_0x3fa573(0x2b7)](_0xc4c55d)||_0xc4c55d['length']===0x0)_0x27c62a['push']({'path':_0xd311a4+_0x3fa573(0x198),'message':_0x3fa573(0x227)});else{const _0x4c44ec=_0xc4c55d[_0x3fa573(0x1d4)](_0x335ecf=>!isValidUserId(_0x335ecf));_0x4c44ec>=0x0&&_0x27c62a['push']({'path':_0xd311a4+_0x3fa573(0x199)+_0x4c44ec+']','message':_0x3fa573(0x1ca)});const _0x2aab0d=new Set(_0xc4c55d[_0x3fa573(0x237)](isValidUserId)[_0x3fa573(0x1ed)](_0x21c590=>String(_0x21c590)[_0x3fa573(0x1fd)]()));_0xd871b3===_0x3fa573(0x2eb)&&_0x2aab0d['size']>0x1&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x198),'message':_0x3fa573(0x2b6)});}}if(_0x2354a9==='ROLE'){const _0x3591b0=_0x30fe1f['assignee'][_0x3fa573(0x281)],_0x2b713a=typeof _0x3591b0===_0x3fa573(0x2c2)||typeof _0x3591b0===_0x3fa573(0x1bc)?Number(String(_0x3591b0)[_0x3fa573(0x1fd)]()):Number[_0x3fa573(0x280)];(!Number[_0x3fa573(0x2a5)](_0x2b713a)||_0x2b713a<=0x0)&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x2c9),'message':_0x3fa573(0x19a)});}}if(_0x30fe1f[_0x3fa573(0x288)]!==undefined){if(!isRecord(_0x30fe1f[_0x3fa573(0x288)]))_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x275),'message':'transferCandidates\x20must\x20be\x20an\x20object.'});else{if(_0x30fe1f[_0x3fa573(0x288)][_0x3fa573(0x22f)]!==_0x3fa573(0x263))_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x1e2),'message':_0x3fa573(0x2d9)});else{const _0x568ae6=_0x30fe1f['transferCandidates'][_0x3fa573(0x21e)];if(!Array[_0x3fa573(0x2b7)](_0x568ae6)||_0x568ae6[_0x3fa573(0x1cf)]===0x0)_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x2d7),'message':'FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.'});else{const _0x3ab2fb=_0x568ae6[_0x3fa573(0x1d4)](_0x4c7a20=>!isValidUserId(_0x4c7a20));_0x3ab2fb>=0x0&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+'.transferCandidates.userIds['+_0x3ab2fb+']','message':_0x3fa573(0x290)});}}}}}_0x30fe1f[_0x3fa573(0x1be)]!==undefined&&typeof _0x30fe1f['sequential']!=='boolean'&&_0x27c62a['push']({'path':_0xd311a4+_0x3fa573(0x295),'message':_0x3fa573(0x1ad)});if(_0x30fe1f[_0x3fa573(0x191)]===_0x3fa573(0x1e1)){(typeof _0x30fe1f[_0x3fa573(0x2b3)]!==_0x3fa573(0x1bc)||_0x30fe1f['scriptName'][_0x3fa573(0x1fd)]()==='')&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x234),'message':_0x3fa573(0x1d8)});if(_0x30fe1f[_0x3fa573(0x22c)]!==undefined){if(typeof _0x30fe1f['resultVariable']!==_0x3fa573(0x1bc)||!VARIABLE_PATTERN[_0x3fa573(0x2d5)](_0x30fe1f[_0x3fa573(0x22c)]))_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+'.resultVariable','message':_0x3fa573(0x278)});else(RESERVED_RESULT_VARIABLES[_0x3fa573(0x1ea)](_0x30fe1f['resultVariable'])||_0x30fe1f[_0x3fa573(0x22c)]['startsWith'](_0x3fa573(0x25c)))&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x1d2),'message':_0x3fa573(0x299)+_0x30fe1f[_0x3fa573(0x22c)]+'.'});}}validateAsyncExecution(_0x30fe1f,_0xd311a4,_0x27c62a),validateApprovalTimeout(_0x30fe1f,_0xd311a4,_0x27c62a),validateCcConfig(_0x30fe1f,_0xd311a4,_0x27c62a),_0x30fe1f[_0x3fa573(0x191)]===_0x3fa573(0x2e7)&&validateNotificationConfig(_0x30fe1f[_0x3fa573(0x2df)],_0xd311a4+_0x3fa573(0x2ba),_0x27c62a);}function validateAsyncExecution(_0x183344,_0x18b944,_0x1daca6){const _0x568414=a299_0x85c6cc;if(_0x183344[_0x568414(0x293)]===undefined)return;if(!isRecord(_0x183344[_0x568414(0x293)])){_0x1daca6[_0x568414(0x250)]({'path':_0x18b944+_0x568414(0x21f),'message':_0x568414(0x2b2)});return;}if(_0x183344['async']['enabled']!==undefined&&typeof _0x183344[_0x568414(0x293)][_0x568414(0x2b5)]!==_0x568414(0x298)){_0x1daca6[_0x568414(0x250)]({'path':_0x18b944+_0x568414(0x28b),'message':_0x568414(0x2e9)});return;}if(_0x183344[_0x568414(0x293)][_0x568414(0x2b5)]!==!![])return;_0x183344[_0x568414(0x191)]!==_0x568414(0x1e1)&&_0x1daca6['push']({'path':_0x18b944+_0x568414(0x21f),'message':_0x568414(0x242)});const _0x243762=_0x183344[_0x568414(0x293)][_0x568414(0x223)]??0x3;(!Number[_0x568414(0x25f)](_0x243762)||_0x243762<0x1||_0x243762>MAX_ASYNC_RETRY_COUNT)&&_0x1daca6['push']({'path':_0x18b944+_0x568414(0x1a9),'message':'SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20'+MAX_ASYNC_RETRY_COUNT+'.'}),_0x183344[_0x568414(0x293)][_0x568414(0x260)]!==undefined&&validateTimeAmount(_0x183344[_0x568414(0x293)][_0x568414(0x260)],_0x18b944+_0x568414(0x1fa),_0x1daca6);}function validateApprovalTimeout(_0x3241b8,_0x234091,_0x15a4d0){const _0x36ae36=a299_0x85c6cc;if(_0x3241b8[_0x36ae36(0x277)]===undefined)return;if(!isRecord(_0x3241b8[_0x36ae36(0x277)])){_0x15a4d0[_0x36ae36(0x250)]({'path':_0x234091+_0x36ae36(0x2ad),'message':_0x36ae36(0x1f6)});return;}if(_0x3241b8['timeout']['enabled']!==undefined&&typeof _0x3241b8[_0x36ae36(0x277)][_0x36ae36(0x2b5)]!=='boolean'){_0x15a4d0['push']({'path':_0x234091+'.timeout.enabled','message':_0x36ae36(0x274)});return;}if(_0x3241b8[_0x36ae36(0x277)][_0x36ae36(0x2b5)]!==!![])return;if(_0x3241b8[_0x36ae36(0x277)][_0x36ae36(0x1e3)]!==undefined&&typeof _0x3241b8[_0x36ae36(0x277)][_0x36ae36(0x1e3)]!==_0x36ae36(0x298)){_0x15a4d0[_0x36ae36(0x250)]({'path':_0x234091+_0x36ae36(0x264),'message':_0x36ae36(0x235)});return;}_0x3241b8[_0x36ae36(0x191)]!==_0x36ae36(0x200)&&_0x15a4d0[_0x36ae36(0x250)]({'path':_0x234091+_0x36ae36(0x2ad),'message':_0x36ae36(0x29c)});validateTimeAmount(_0x3241b8[_0x36ae36(0x277)][_0x36ae36(0x21b)],_0x234091+_0x36ae36(0x221),_0x15a4d0);const _0x475f33=_0x3241b8[_0x36ae36(0x277)][_0x36ae36(0x2dc)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x36ae36(0x1ea)](_0x475f33)){_0x15a4d0[_0x36ae36(0x250)]({'path':_0x234091+_0x36ae36(0x1d1),'message':_0x36ae36(0x194)});return;}(_0x3241b8['taskMode']??_0x36ae36(0x200))===_0x36ae36(0x1e0)&&_0x475f33!==_0x36ae36(0x283)&&_0x15a4d0[_0x36ae36(0x250)]({'path':_0x234091+_0x36ae36(0x1d1),'message':_0x36ae36(0x27d)});const _0x48130b=_0x3241b8[_0x36ae36(0x277)]['interrupting']??_0x475f33!==_0x36ae36(0x283);if(_0x475f33===_0x36ae36(0x283))_0x48130b&&_0x15a4d0[_0x36ae36(0x250)]({'path':_0x234091+_0x36ae36(0x264),'message':_0x36ae36(0x1dd)}),(typeof _0x3241b8[_0x36ae36(0x277)][_0x36ae36(0x2b3)]!==_0x36ae36(0x1bc)||_0x3241b8[_0x36ae36(0x277)][_0x36ae36(0x2b3)][_0x36ae36(0x1fd)]()==='')&&_0x15a4d0[_0x36ae36(0x250)]({'path':_0x234091+_0x36ae36(0x284),'message':'EXECUTE_BFF\x20timeout\x20requires\x20scriptName.'}),validateOptionalResultVariable(_0x3241b8[_0x36ae36(0x277)][_0x36ae36(0x22c)],_0x234091+_0x36ae36(0x222),_0x15a4d0);else!_0x48130b&&_0x15a4d0[_0x36ae36(0x250)]({'path':_0x234091+_0x36ae36(0x264),'message':_0x475f33+'\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.'});}function validateTimeAmount(_0xa317ea,_0x55cbb3,_0x2bfaa7){const _0x47f744=a299_0x85c6cc;if(!isRecord(_0xa317ea)){_0x2bfaa7[_0x47f744(0x250)]({'path':_0x55cbb3,'message':_0x47f744(0x248)});return;}(!Number['isInteger'](_0xa317ea['value'])||Number(_0xa317ea[_0x47f744(0x28a)])<=0x0)&&_0x2bfaa7[_0x47f744(0x250)]({'path':_0x55cbb3+_0x47f744(0x1da),'message':'duration\x20value\x20must\x20be\x20a\x20positive\x20integer.'}),!FLOW_TIME_UNITS[_0x47f744(0x1ea)](_0xa317ea[_0x47f744(0x252)])&&_0x2bfaa7[_0x47f744(0x250)]({'path':_0x55cbb3+_0x47f744(0x209),'message':'duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.'});}function validateOptionalResultVariable(_0x12c9ef,_0x434bd6,_0x3b14a8){const _0x422040=a299_0x85c6cc;if(_0x12c9ef===undefined||_0x12c9ef===null||_0x12c9ef==='')return;if(typeof _0x12c9ef!==_0x422040(0x1bc)||!VARIABLE_PATTERN['test'](_0x12c9ef))_0x3b14a8[_0x422040(0x250)]({'path':_0x434bd6,'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x422040(0x1ea)](_0x12c9ef)||_0x12c9ef[_0x422040(0x2a2)]('approval_sys_'))&&_0x3b14a8[_0x422040(0x250)]({'path':_0x434bd6,'message':_0x422040(0x299)+_0x12c9ef+'.'});}function validateCcConfig(_0x3f04e0,_0x55c087,_0x2b22e8){const _0x576630=a299_0x85c6cc;if(_0x3f04e0['cc']===undefined)return;if(!isRecord(_0x3f04e0['cc'])){_0x2b22e8[_0x576630(0x250)]({'path':_0x55c087+_0x576630(0x2e4),'message':_0x576630(0x1b4)});return;}_0x3f04e0[_0x576630(0x191)]!==_0x576630(0x1d9)&&_0x3f04e0[_0x576630(0x191)]!==_0x576630(0x200)&&_0x2b22e8[_0x576630(0x250)]({'path':_0x55c087+_0x576630(0x2e4),'message':'Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.'});Object[_0x576630(0x22e)][_0x576630(0x1bd)][_0x576630(0x1ae)](_0x3f04e0['cc'],_0x576630(0x2a9))&&_0x2b22e8['push']({'path':_0x55c087+_0x576630(0x202),'message':UNSUPPORTED_FORM_MESSAGE});const _0xe660d1=_0x3f04e0['cc'][_0x576630(0x287)];if(!Array[_0x576630(0x2b7)](_0xe660d1)||_0xe660d1[_0x576630(0x1cf)]===0x0)_0x2b22e8[_0x576630(0x250)]({'path':_0x55c087+_0x576630(0x26d),'message':_0x576630(0x18e)});else{_0xe660d1['length']>MAX_CC_RECIPIENTS&&_0x2b22e8[_0x576630(0x250)]({'path':_0x55c087+_0x576630(0x26d),'message':_0x576630(0x22b)+MAX_CC_RECIPIENTS+'\x20users.'});const _0x2d3ffc=new Set();_0xe660d1[_0x576630(0x272)]((_0x2020da,_0x2e9f11)=>{const _0x751727=_0x576630;if(typeof _0x2020da!=='string'||_0x2020da[_0x751727(0x1fd)]()==='')_0x2b22e8[_0x751727(0x250)]({'path':_0x55c087+'.cc.recipientUserIds['+_0x2e9f11+']','message':_0x751727(0x2c4)});else _0x2d3ffc[_0x751727(0x1ea)](_0x2020da[_0x751727(0x1fd)]())?_0x2b22e8[_0x751727(0x250)]({'path':_0x55c087+_0x751727(0x2a1)+_0x2e9f11+']','message':_0x751727(0x1b8)+_0x2020da['trim']()+'.'}):_0x2d3ffc['add'](_0x2020da[_0x751727(0x1fd)]());});}validateStringArray(_0x3f04e0['cc']['visible'],_0x55c087+_0x576630(0x197),_0x2b22e8);}function validateStringArray(_0x25179d,_0x58bfaf,_0xa1aaf8){const _0x4cb2ec=a299_0x85c6cc;if(_0x25179d===undefined)return;if(!Array[_0x4cb2ec(0x2b7)](_0x25179d)){_0xa1aaf8[_0x4cb2ec(0x250)]({'path':_0x58bfaf,'message':_0x4cb2ec(0x19e)});return;}const _0x164f9d=new Set();_0x25179d[_0x4cb2ec(0x272)]((_0x1f5e9f,_0x49a3e1)=>{const _0x18620e=_0x4cb2ec;if(typeof _0x1f5e9f!==_0x18620e(0x1bc)||_0x1f5e9f[_0x18620e(0x1fd)]()==='')_0xa1aaf8[_0x18620e(0x250)]({'path':_0x58bfaf+'['+_0x49a3e1+']','message':'value\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x164f9d['has'](_0x1f5e9f[_0x18620e(0x1fd)]())?_0xa1aaf8[_0x18620e(0x250)]({'path':_0x58bfaf+'['+_0x49a3e1+']','message':_0x18620e(0x29f)+_0x1f5e9f[_0x18620e(0x1fd)]()+'.'}):_0x164f9d['add'](_0x1f5e9f[_0x18620e(0x1fd)]());});}function validateNotificationConfig(_0x1d2834,_0x45ea8b,_0x42818e){const _0x51cad5=a299_0x85c6cc;if(!isRecord(_0x1d2834)){_0x42818e['push']({'path':_0x45ea8b,'message':_0x51cad5(0x2bd)});return;}if(_0x1d2834[_0x51cad5(0x2b4)]!==undefined&&_0x1d2834['version']!==null){if(typeof _0x1d2834[_0x51cad5(0x2b4)]!=='string')_0x42818e[_0x51cad5(0x250)]({'path':_0x45ea8b+'.version','message':_0x51cad5(0x2ca)});else _0x1d2834[_0x51cad5(0x2b4)][_0x51cad5(0x1fd)]()&&_0x1d2834[_0x51cad5(0x2b4)][_0x51cad5(0x1fd)]()!=='v1'&&_0x42818e['push']({'path':_0x45ea8b+_0x51cad5(0x1b1),'message':'Unsupported\x20notification\x20version:\x20'+_0x1d2834[_0x51cad5(0x2b4)]+'.'});}const _0x3b3f14=requireNotificationString(_0x1d2834['configCode'],_0x45ea8b+_0x51cad5(0x23b),_0x51cad5(0x2d1),_0x42818e);_0x3b3f14?.['includes']('${')&&_0x42818e[_0x51cad5(0x250)]({'path':_0x45ea8b+'.configCode','message':_0x51cad5(0x2b9)});if(_0x1d2834[_0x51cad5(0x25a)]!==undefined&&_0x1d2834[_0x51cad5(0x25a)]!==null){if(typeof _0x1d2834[_0x51cad5(0x25a)]!=='string')_0x42818e[_0x51cad5(0x250)]({'path':_0x45ea8b+_0x51cad5(0x1ef),'message':'failurePolicy\x20must\x20be\x20a\x20string.'});else!NOTIFICATION_FAILURE_POLICIES[_0x51cad5(0x1ea)](_0x1d2834[_0x51cad5(0x25a)][_0x51cad5(0x1fd)]()[_0x51cad5(0x1a5)]())&&_0x42818e[_0x51cad5(0x250)]({'path':_0x45ea8b+_0x51cad5(0x1ef),'message':_0x51cad5(0x2b8)});}!isRecord(_0x1d2834[_0x51cad5(0x1f8)])?_0x42818e[_0x51cad5(0x250)]({'path':_0x45ea8b+'.template','message':'NOTIFICATION\x20node\x20requires\x20template.'}):validateNotificationTemplate(_0x1d2834[_0x51cad5(0x1f8)],_0x45ea8b+'.template',_0x42818e),validateNotificationRecipients(_0x1d2834['recipients'],_0x45ea8b+'.recipients',_0x42818e);}function validateNotificationTemplate(_0x10ac58,_0x427007,_0x265052){const _0xbf836=a299_0x85c6cc;for(const _0x469e30 of[_0xbf836(0x24d),_0xbf836(0x1a0)]){const _0x5c6771=requireNotificationString(_0x10ac58[_0x469e30],_0x427007+'.'+_0x469e30,_0xbf836(0x1f9)+_0x469e30+_0xbf836(0x1d5),_0x265052);if(_0x5c6771)validateNotificationPlaceholders(_0x5c6771,_0x427007+'.'+_0x469e30,_0x265052);}_0x10ac58[_0xbf836(0x2be)]!==undefined&&_0x10ac58['detailMarkdown']!==null&&(typeof _0x10ac58['detailMarkdown']!=='string'?_0x265052[_0xbf836(0x250)]({'path':_0x427007+'.detailMarkdown','message':_0xbf836(0x2d0)}):validateNotificationPlaceholders(_0x10ac58[_0xbf836(0x2be)],_0x427007+_0xbf836(0x226),_0x265052)),validateNotificationFacts(_0x10ac58[_0xbf836(0x19d)],_0x427007+_0xbf836(0x238),_0x265052),validateNotificationActions(_0x10ac58[_0xbf836(0x2ee)],_0x427007+_0xbf836(0x285),_0x265052);}function validateNotificationFacts(_0x32d064,_0x34dfa2,_0x4b7c85){const _0x2973d5=a299_0x85c6cc;if(_0x32d064===undefined||_0x32d064===null)return;if(!Array['isArray'](_0x32d064)){_0x4b7c85[_0x2973d5(0x250)]({'path':_0x34dfa2,'message':_0x2973d5(0x1b2)});return;}_0x32d064[_0x2973d5(0x1cf)]>MAX_NOTIFICATION_FACTS&&_0x4b7c85[_0x2973d5(0x250)]({'path':_0x34dfa2,'message':_0x2973d5(0x28c)+MAX_NOTIFICATION_FACTS+_0x2973d5(0x269)}),_0x32d064[_0x2973d5(0x272)]((_0x51f82f,_0x5a0a01)=>{const _0x1ee1e=_0x2973d5,_0x2bc8d1=_0x34dfa2+'['+_0x5a0a01+']';if(!isRecord(_0x51f82f)){_0x4b7c85[_0x1ee1e(0x250)]({'path':_0x2bc8d1,'message':_0x1ee1e(0x25b)});return;}for(const _0x833fb of[_0x1ee1e(0x192),_0x1ee1e(0x28a)]){const _0x19f452=requireNotificationString(_0x51f82f[_0x833fb],_0x2bc8d1+'.'+_0x833fb,_0x1ee1e(0x213)+_0x833fb+_0x1ee1e(0x1d5),_0x4b7c85);_0x19f452&&validateNotificationPlaceholders(_0x19f452,_0x2bc8d1+'.'+_0x833fb,_0x4b7c85);}});}function validateNotificationActions(_0x31a52e,_0x56a61d,_0xcf2cce){const _0x5e5cea=a299_0x85c6cc;if(_0x31a52e===undefined||_0x31a52e===null)return;if(!Array[_0x5e5cea(0x2b7)](_0x31a52e)){_0xcf2cce[_0x5e5cea(0x250)]({'path':_0x56a61d,'message':_0x5e5cea(0x1cb)});return;}_0x31a52e['length']>MAX_NOTIFICATION_ACTIONS&&_0xcf2cce[_0x5e5cea(0x250)]({'path':_0x56a61d,'message':_0x5e5cea(0x28c)+MAX_NOTIFICATION_ACTIONS+_0x5e5cea(0x1a8)}),_0x31a52e[_0x5e5cea(0x272)]((_0x5ab1c7,_0x3a5aea)=>{const _0x160267=_0x5e5cea,_0xc16511=_0x56a61d+'['+_0x3a5aea+']';if(!isRecord(_0x5ab1c7)){_0xcf2cce['push']({'path':_0xc16511,'message':_0x160267(0x216)});return;}const _0x238dca=requireNotificationString(_0x5ab1c7[_0x160267(0x2b1)],_0xc16511+_0x160267(0x2d3),'Notification\x20action.text\x20is\x20required.',_0xcf2cce);if(_0x238dca)validateNotificationPlaceholders(_0x238dca,_0xc16511+_0x160267(0x2d3),_0xcf2cce);const _0x4ab284=requireNotificationString(_0x5ab1c7[_0x160267(0x206)],_0xc16511+_0x160267(0x1bf),'Notification\x20action.url\x20is\x20required.',_0xcf2cce);if(!_0x4ab284)return;validateNotificationPlaceholders(_0x4ab284,_0xc16511+_0x160267(0x1bf),_0xcf2cce),!/^https?:\/\//i[_0x160267(0x2d5)](_0x4ab284)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x160267(0x2d5)](_0x4ab284)&&_0xcf2cce[_0x160267(0x250)]({'path':_0xc16511+_0x160267(0x1bf),'message':_0x160267(0x196)});});}function validateNotificationRecipients(_0x17c640,_0x513bce,_0x114440){const _0x4ed102=a299_0x85c6cc;if(_0x17c640===undefined||_0x17c640===null)return;if(!Array['isArray'](_0x17c640)){_0x114440['push']({'path':_0x513bce,'message':_0x4ed102(0x19f)});return;}let _0x5a5445=![];_0x17c640[_0x4ed102(0x272)]((_0x1d565c,_0x190a5e)=>{const _0x5d3c21=_0x4ed102,_0x38d203=_0x513bce+'['+_0x190a5e+']';if(!isRecord(_0x1d565c)){_0x114440[_0x5d3c21(0x250)]({'path':_0x38d203,'message':_0x5d3c21(0x1ba)});return;}const _0x3db5ef=requireNotificationString(_0x1d565c[_0x5d3c21(0x191)],_0x38d203+_0x5d3c21(0x2a6),'Notification\x20recipient.type\x20is\x20required.',_0x114440);_0x3db5ef&&!NOTIFICATION_RECIPIENT_TYPES[_0x5d3c21(0x1ea)](_0x3db5ef['toUpperCase']())&&_0x114440[_0x5d3c21(0x250)]({'path':_0x38d203+'.type','message':_0x5d3c21(0x1eb)});let _0x293bad='TO';_0x1d565c[_0x5d3c21(0x1b7)]!==undefined&&_0x1d565c[_0x5d3c21(0x1b7)]!==null&&(typeof _0x1d565c[_0x5d3c21(0x1b7)]!=='string'?(_0x114440[_0x5d3c21(0x250)]({'path':_0x38d203+'.role','message':_0x5d3c21(0x201)}),_0x293bad=''):(_0x293bad=_0x1d565c['role'][_0x5d3c21(0x1fd)]()[_0x5d3c21(0x1a5)](),!NOTIFICATION_RECIPIENT_ROLES['has'](_0x293bad)&&_0x114440['push']({'path':_0x38d203+_0x5d3c21(0x243),'message':_0x5d3c21(0x21a)})));if(_0x293bad==='TO')_0x5a5445=!![];const _0x3754aa=requireNotificationString(_0x1d565c[_0x5d3c21(0x28a)],_0x38d203+_0x5d3c21(0x1da),_0x5d3c21(0x2af),_0x114440);_0x3754aa&&validateNotificationPlaceholders(_0x3754aa,_0x38d203+_0x5d3c21(0x1da),_0x114440);}),_0x17c640[_0x4ed102(0x1cf)]>0x0&&!_0x5a5445&&_0x114440[_0x4ed102(0x250)]({'path':_0x513bce,'message':_0x4ed102(0x2bb)});}function requireNotificationString(_0x3c5e89,_0x189d3c,_0x1ff43f,_0x1ec7a9){const _0x1efb93=a299_0x85c6cc;if(typeof _0x3c5e89!=='string'||_0x3c5e89[_0x1efb93(0x1fd)]()==='')return _0x1ec7a9['push']({'path':_0x189d3c,'message':_0x1ff43f}),undefined;return _0x3c5e89['trim']();}function validateNotificationPlaceholders(_0x44f653,_0x5e234b,_0x4f399d){const _0x427ef0=a299_0x85c6cc;for(const _0x21d2e5 of _0x44f653[_0x427ef0(0x1c3)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x14af57=_0x21d2e5[0x1]?.[_0x427ef0(0x1fd)]()??'',_0x181442=_0x14af57[_0x427ef0(0x20d)]('.'),_0x3fd0c3=_0x181442>=0x0?_0x14af57[_0x427ef0(0x1df)](0x0,_0x181442):_0x14af57,_0x135bf0=_0x181442>=0x0?_0x14af57[_0x427ef0(0x1df)](_0x181442+0x1)[_0x427ef0(0x1fd)]():'';(![_0x427ef0(0x2e5),_0x427ef0(0x297),'variables'][_0x427ef0(0x2c5)](_0x3fd0c3)||_0x135bf0==='')&&_0x4f399d[_0x427ef0(0x250)]({'path':_0x5e234b,'message':'Unsupported\x20notification\x20placeholder:\x20'+_0x21d2e5[0x0]+'.'});}_0x44f653[_0x427ef0(0x251)](NOTIFICATION_PLACEHOLDER_PATTERN,'')['includes']('${')&&_0x4f399d[_0x427ef0(0x250)]({'path':_0x5e234b,'message':'Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.'});}function validateEdge(_0x213596,_0x4e8532,_0x392417){const _0xbfdfb6=a299_0x85c6cc;_0x213596['name']!==undefined&&typeof _0x213596['name']!==_0xbfdfb6(0x1bc)&&_0x392417[_0xbfdfb6(0x250)]({'path':_0x4e8532+_0xbfdfb6(0x2db),'message':_0xbfdfb6(0x1fe)}),_0x213596[_0xbfdfb6(0x2c0)]!==undefined&&typeof _0x213596['defaultFlow']!==_0xbfdfb6(0x298)&&_0x392417[_0xbfdfb6(0x250)]({'path':_0x4e8532+_0xbfdfb6(0x23a),'message':_0xbfdfb6(0x214)}),_0x213596[_0xbfdfb6(0x2d8)]!==undefined&&(!Array[_0xbfdfb6(0x2b7)](_0x213596[_0xbfdfb6(0x2d8)])?_0x392417[_0xbfdfb6(0x250)]({'path':_0x4e8532+_0xbfdfb6(0x2ac),'message':'waypoints\x20must\x20be\x20an\x20array.'}):_0x213596['waypoints'][_0xbfdfb6(0x272)]((_0x132f10,_0x54722b)=>{const _0x2f563e=_0xbfdfb6;if(!isRecord(_0x132f10)){_0x392417[_0x2f563e(0x250)]({'path':_0x4e8532+_0x2f563e(0x231)+_0x54722b+']','message':_0x2f563e(0x20e)});return;}for(const _0x2ecda3 of['x','y']){const _0x235149=_0x132f10[_0x2ecda3];(typeof _0x235149!==_0x2f563e(0x2c2)||!Number[_0x2f563e(0x26e)](_0x235149))&&_0x392417['push']({'path':_0x4e8532+_0x2f563e(0x231)+_0x54722b+'].'+_0x2ecda3,'message':_0x2f563e(0x25d)+_0x2ecda3+_0x2f563e(0x2d4)});}})),_0x213596[_0xbfdfb6(0x26b)]!==undefined&&!CONDITION_TYPES[_0xbfdfb6(0x1ea)](_0x213596[_0xbfdfb6(0x26b)])&&_0x392417[_0xbfdfb6(0x250)]({'path':_0x4e8532+_0xbfdfb6(0x24b),'message':_0xbfdfb6(0x239)+String(_0x213596[_0xbfdfb6(0x26b)])+'.'}),_0x213596['conditionType']===_0xbfdfb6(0x246)&&(typeof _0x213596[_0xbfdfb6(0x1b9)]!==_0xbfdfb6(0x1bc)||_0x213596[_0xbfdfb6(0x1b9)][_0xbfdfb6(0x1fd)]()==='')&&_0x392417[_0xbfdfb6(0x250)]({'path':_0x4e8532+_0xbfdfb6(0x2cb),'message':'EXPRESSION\x20edge\x20requires\x20expression.'}),_0x213596[_0xbfdfb6(0x2c0)]===!![]&&_0x213596[_0xbfdfb6(0x26b)]!=='ALWAYS'&&_0x392417['push']({'path':_0x4e8532+_0xbfdfb6(0x23a),'message':_0xbfdfb6(0x1c2)}),_0x213596[_0xbfdfb6(0x2c0)]===!![]&&typeof _0x213596[_0xbfdfb6(0x1b9)]===_0xbfdfb6(0x1bc)&&_0x213596[_0xbfdfb6(0x1b9)][_0xbfdfb6(0x1fd)]()!==''&&_0x392417['push']({'path':_0x4e8532+_0xbfdfb6(0x2cb),'message':_0xbfdfb6(0x279)});}function validateGraphShape(_0x541ab,_0x46c4d2,_0x376dee,_0x4a1dcd,_0x4f85b9,_0x3547c5,_0x52005a){const _0x45cfb8=a299_0x85c6cc;for(const [_0x1d3e3d,_0xd62a34]of _0x541ab){const _0xe447b8=_0x4f85b9[_0x45cfb8(0x291)](_0x1d3e3d)??[],_0x5d110f=_0x4a1dcd[_0x45cfb8(0x291)](_0x1d3e3d)??[];_0xd62a34[_0x45cfb8(0x191)]!==_0x45cfb8(0x1b0)&&_0xe447b8['length']===0x0&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x1d3e3d,'message':_0x45cfb8(0x204)});_0xd62a34[_0x45cfb8(0x191)]!==_0x45cfb8(0x1d9)&&_0x5d110f[_0x45cfb8(0x1cf)]===0x0&&_0x52005a[_0x45cfb8(0x250)]({'path':'flowJson.nodes.'+_0x1d3e3d,'message':_0x45cfb8(0x1d6)});_0xd62a34[_0x45cfb8(0x191)]===_0x45cfb8(0x1b0)&&_0xe447b8[_0x45cfb8(0x1cf)]>0x0&&_0x52005a['push']({'path':_0x45cfb8(0x2cf)+_0x1d3e3d,'message':'START\x20node\x20must\x20not\x20have\x20incoming\x20edges.'});_0xd62a34[_0x45cfb8(0x191)]===_0x45cfb8(0x1d9)&&_0x5d110f[_0x45cfb8(0x1cf)]>0x0&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x1d3e3d,'message':_0x45cfb8(0x1e4)});if(_0xd62a34[_0x45cfb8(0x191)]===_0x45cfb8(0x1d0)){_0x5d110f[_0x45cfb8(0x1cf)]<0x2&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x1d3e3d,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0x5d93da=_0x5d110f[_0x45cfb8(0x237)](_0x187ddc=>_0x187ddc['defaultFlow']===!![]);_0x5d93da[_0x45cfb8(0x1cf)]!==0x1&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x1d3e3d,'message':_0x45cfb8(0x26f)});if(_0x5d93da[_0x45cfb8(0x1cf)]===0x1){const _0x227c48=_0x5d93da[0x0],_0xa8eed9=_0x3547c5[_0x45cfb8(0x291)](_0x227c48)??_0x45cfb8(0x188);_0x227c48[_0x45cfb8(0x26b)]!==_0x45cfb8(0x19b)&&_0x52005a[_0x45cfb8(0x250)]({'path':_0xa8eed9+_0x45cfb8(0x24b),'message':_0x45cfb8(0x1e8)});_0x227c48[_0x45cfb8(0x1b9)]!==undefined&&_0x52005a[_0x45cfb8(0x250)]({'path':_0xa8eed9+_0x45cfb8(0x2cb),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x4194d3 of _0x5d110f){if(_0x4194d3===_0x227c48)continue;const _0x3b796f=_0x3547c5[_0x45cfb8(0x291)](_0x4194d3)??_0x45cfb8(0x188);if(_0x4194d3[_0x45cfb8(0x26b)]!=='EXPRESSION')_0x52005a[_0x45cfb8(0x250)]({'path':_0x3b796f+'.conditionType','message':_0x45cfb8(0x2a4)});else(typeof _0x4194d3[_0x45cfb8(0x1b9)]!==_0x45cfb8(0x1bc)||_0x4194d3['expression'][_0x45cfb8(0x1fd)]()==='')&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x3b796f+_0x45cfb8(0x2cb),'message':_0x45cfb8(0x1fc)});}}}if(_0xd62a34['type']==='APPROVAL'&&(_0xd62a34[_0x45cfb8(0x2dd)]??_0x45cfb8(0x200))===_0x45cfb8(0x1e0)){if(_0x5d110f[_0x45cfb8(0x1cf)]!==0x1)_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x1d3e3d,'message':'HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.'});else{const _0x316cdf=_0x5d110f[0x0];((_0x316cdf[_0x45cfb8(0x26b)]??_0x45cfb8(0x19b))!=='ALWAYS'||_0x316cdf[_0x45cfb8(0x2c0)]===!![]||typeof _0x316cdf['expression']==='string'&&_0x316cdf['expression'][_0x45cfb8(0x1fd)]()!=='')&&_0x52005a['push']({'path':_0x3547c5[_0x45cfb8(0x291)](_0x316cdf)??_0x45cfb8(0x188),'message':'HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.'});}}else{if(_0xd62a34['type']===_0x45cfb8(0x200)){const _0x2e3372=_0x5d110f['map'](_0x1cd120=>_0x1cd120[_0x45cfb8(0x26b)]??_0x45cfb8(0x19b)),_0x21a226=_0x2e3372[_0x45cfb8(0x237)](_0x20d6b9=>_0x20d6b9!==_0x45cfb8(0x1e5)&&_0x20d6b9!==_0x45cfb8(0x24e));_0x21a226['length']>0x0&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x1d3e3d,'message':_0x45cfb8(0x2ce)}),_0x2e3372[_0x45cfb8(0x237)](_0x256122=>_0x256122===_0x45cfb8(0x1e5))[_0x45cfb8(0x1cf)]!==0x1&&_0x52005a[_0x45cfb8(0x250)]({'path':'flowJson.nodes.'+_0x1d3e3d,'message':_0x45cfb8(0x289)}),_0x2e3372[_0x45cfb8(0x237)](_0x3ed10e=>_0x3ed10e===_0x45cfb8(0x24e))[_0x45cfb8(0x1cf)]!==0x1&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x1d3e3d,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.'}),_0x5d110f[_0x45cfb8(0x262)](_0x4a7f39=>_0x4a7f39['defaultFlow']===!![])&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x1d3e3d,'message':_0x45cfb8(0x224)});}}}const _0x30f072=new Set(),_0x4ab9f4=_0x1b6763=>{const _0x46be5d=_0x45cfb8;if(_0x30f072[_0x46be5d(0x1ea)](_0x1b6763))return;_0x30f072[_0x46be5d(0x1e7)](_0x1b6763);for(const _0x26c146 of _0x4a1dcd[_0x46be5d(0x291)](_0x1b6763)??[]){const _0x7bb6bc=resolveEdgeEndpoint(_0x26c146['target'],_0x26c146[_0x46be5d(0x1c7)]);if(_0x7bb6bc&&_0x541ab[_0x46be5d(0x1ea)](_0x7bb6bc))_0x4ab9f4(_0x7bb6bc);}};_0x4ab9f4(_0x46c4d2);for(const _0x594d9d of _0x541ab['keys']()){!_0x30f072[_0x45cfb8(0x1ea)](_0x594d9d)&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x594d9d,'message':'Node\x20is\x20not\x20reachable\x20from\x20START.'});}const _0x295052=_0x376dee[_0x45cfb8(0x262)](_0x163306=>_0x30f072[_0x45cfb8(0x1ea)](_0x163306));if(!_0x295052){_0x52005a['push']({'path':_0x45cfb8(0x188),'message':_0x45cfb8(0x22d)});return;}const _0x41528f=new Set(),_0x3d1e40=_0x3c1e0b=>{const _0x37bd10=_0x45cfb8;if(_0x41528f['has'](_0x3c1e0b))return;_0x41528f['add'](_0x3c1e0b);for(const _0x509c38 of _0x4f85b9[_0x37bd10(0x291)](_0x3c1e0b)??[]){const _0x397632=resolveEdgeEndpoint(_0x509c38[_0x37bd10(0x233)],_0x509c38[_0x37bd10(0x1f5)]);if(_0x397632&&_0x541ab[_0x37bd10(0x1ea)](_0x397632))_0x3d1e40(_0x397632);}};for(const _0x42eae4 of _0x376dee){if(_0x541ab['has'](_0x42eae4))_0x3d1e40(_0x42eae4);}for(const _0x424e3f of _0x30f072){!_0x41528f[_0x45cfb8(0x1ea)](_0x424e3f)&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x424e3f,'message':'Node\x20cannot\x20reach\x20any\x20END.'});}}function validateApprovalResults(_0x3f0998,_0x15fedf,_0x1c18f7,_0x3c089d){const _0x34076c=a299_0x85c6cc;if(_0x15fedf===0x0)return;const _0x315cea=new Set(_0x1c18f7[_0x34076c(0x1ed)](_0x1e4340=>_0x3f0998[_0x34076c(0x291)](_0x1e4340)?.['result'])[_0x34076c(0x237)](_0x1cbd6b=>typeof _0x1cbd6b===_0x34076c(0x1bc)));for(const _0x30c8c2 of['APPROVED',_0x34076c(0x24e)]){!_0x315cea[_0x34076c(0x1ea)](_0x30c8c2)&&_0x3c089d[_0x34076c(0x250)]({'path':_0x34076c(0x1ec),'message':'Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20'+_0x30c8c2+'.'});}}function validateScriptResultReferences(_0x59fc72,_0x7ff29a,_0x4e7b54,_0x290ccb,_0x5529a1,_0x2661d2,_0x3912cc){const _0x543f3d=a299_0x85c6cc;if(_0x2661d2['size']===0x0)return;const _0x14bda2=new Set(),_0x470403=_0x12483f=>{const _0x3661da=a299_0x3b20;if(!_0x14bda2[_0x3661da(0x1ea)](_0x12483f)&&_0x59fc72['has'](_0x12483f)){_0x14bda2[_0x3661da(0x1e7)](_0x12483f);for(const _0x28ad23 of _0x4e7b54[_0x3661da(0x291)](_0x12483f)??[]){const _0x4553f9=resolveEdgeEndpoint(_0x28ad23['target'],_0x28ad23[_0x3661da(0x1c7)]);if(_0x4553f9)_0x470403(_0x4553f9);}}};_0x470403(_0x7ff29a);const _0xbfc942=new Map();for(const _0x49fb16 of _0x14bda2){_0xbfc942[_0x543f3d(0x1dc)](_0x49fb16,_0x49fb16===_0x7ff29a?new Set([_0x7ff29a]):new Set(_0x14bda2));}let _0x144cfc=!![];while(_0x144cfc){_0x144cfc=![];for(const _0x17c99e of _0x14bda2){if(_0x17c99e===_0x7ff29a)continue;const _0x48255a=(_0x290ccb[_0x543f3d(0x291)](_0x17c99e)??[])[_0x543f3d(0x1ed)](_0x455109=>resolveEdgeEndpoint(_0x455109[_0x543f3d(0x233)],_0x455109[_0x543f3d(0x1f5)]))[_0x543f3d(0x237)](_0x54eebc=>Boolean(_0x54eebc&&_0x14bda2['has'](_0x54eebc)));if(_0x48255a[_0x543f3d(0x1cf)]===0x0)continue;const _0x3993e1=new Set(_0xbfc942['get'](_0x48255a[0x0])??[]);for(const _0x400aa6 of _0x48255a['slice'](0x1)){const _0x3b555d=_0xbfc942['get'](_0x400aa6)??new Set();for(const _0x5644de of _0x3993e1){if(!_0x3b555d['has'](_0x5644de))_0x3993e1[_0x543f3d(0x2c3)](_0x5644de);}}_0x3993e1[_0x543f3d(0x1e7)](_0x17c99e);const _0x391378=_0xbfc942[_0x543f3d(0x291)](_0x17c99e);!setsEqual(_0x391378,_0x3993e1)&&(_0xbfc942[_0x543f3d(0x1dc)](_0x17c99e,_0x3993e1),_0x144cfc=!![]);}}for(const [_0x4c1b4c,_0x7eb097]of _0x4e7b54){const _0x1f2224=_0xbfc942[_0x543f3d(0x291)](_0x4c1b4c);if(!_0x1f2224)continue;for(const _0x510de1 of _0x7eb097){if(_0x510de1['conditionType']!==_0x543f3d(0x246)||typeof _0x510de1['expression']!==_0x543f3d(0x1bc))continue;for(const [_0x591ce8,_0xed3150]of _0x2661d2){expressionReferencesVariable(_0x510de1[_0x543f3d(0x1b9)],_0x591ce8)&&!_0x1f2224[_0x543f3d(0x1ea)](_0xed3150)&&_0x3912cc['push']({'path':(_0x5529a1[_0x543f3d(0x291)](_0x510de1)??'flowJson.edges')+_0x543f3d(0x2cb),'message':'Expression\x20references\x20SCRIPT\x20resultVariable\x20'+_0x591ce8+_0x543f3d(0x1d7)+_0xed3150+_0x543f3d(0x229)+_0x4c1b4c+'.'});}}}}function expressionReferencesVariable(_0x55528d,_0x5922e2){const _0x3f8564=a299_0x85c6cc;let _0x389146=0x0;while(_0x389146<_0x55528d[_0x3f8564(0x1cf)]){const _0x434f6a=_0x55528d[_0x389146];if(_0x434f6a==='\x27'||_0x434f6a==='\x22'){_0x389146=skipQuotedExpressionSegment(_0x55528d,_0x389146,_0x434f6a);continue;}if(!/[A-Za-z_]/['test'](_0x434f6a)){_0x389146+=0x1;continue;}const _0x37bbda=_0x389146;_0x389146+=0x1;while(_0x389146<_0x55528d['length']&&/[A-Za-z0-9_]/[_0x3f8564(0x2d5)](_0x55528d[_0x389146])){_0x389146+=0x1;}if(_0x55528d['slice'](_0x37bbda,_0x389146)!==_0x5922e2)continue;let _0xf49353=_0x37bbda-0x1;while(_0xf49353>=0x0&&/\s/[_0x3f8564(0x2d5)](_0x55528d[_0xf49353])){_0xf49353-=0x1;}if(_0x55528d[_0xf49353]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x1e483f,_0xb547d4,_0x138651){let _0x38180c=_0xb547d4+0x1;while(_0x38180c<_0x1e483f['length']){if(_0x1e483f[_0x38180c]==='\x5c'){_0x38180c+=0x2;continue;}if(_0x1e483f[_0x38180c]===_0x138651)return _0x38180c+0x1;_0x38180c+=0x1;}return _0x38180c;}function resolveEffectiveResultVariable(_0x5f3dd9,_0x2614b0){const _0x154933=a299_0x85c6cc;if(_0x5f3dd9===undefined||_0x5f3dd9===null||_0x2614b0&&_0x5f3dd9==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x5f3dd9!==_0x154933(0x1bc)||!VARIABLE_PATTERN['test'](_0x5f3dd9)||RESERVED_RESULT_VARIABLES['has'](_0x5f3dd9)||_0x5f3dd9[_0x154933(0x2a2)](_0x154933(0x25c)))return undefined;return _0x5f3dd9;}function registerResultVariableOwner(_0x2a7a57,_0x51009f,_0x19ea0a,_0x9c8542){const _0x3d90b3=a299_0x85c6cc;if(_0x2a7a57[_0x3d90b3(0x1ea)](_0x51009f)){_0x9c8542[_0x3d90b3(0x250)]({'path':_0x3d90b3(0x1ec),'message':_0x3d90b3(0x2e2)+_0x51009f+'.'});return;}_0x2a7a57[_0x3d90b3(0x1dc)](_0x51009f,_0x19ea0a);}function setsEqual(_0x5dfd3c,_0x5787bc){const _0x13d119=a299_0x85c6cc;return _0x5dfd3c[_0x13d119(0x18a)]===_0x5787bc[_0x13d119(0x18a)]&&[..._0x5dfd3c][_0x13d119(0x2b0)](_0x178702=>_0x5787bc['has'](_0x178702));}function isValidUserId(_0xb58d8e){const _0x35cfd0=a299_0x85c6cc;if(typeof _0xb58d8e==='string')return _0xb58d8e[_0x35cfd0(0x1fd)]()['length']>0x0;return Number[_0x35cfd0(0x2a5)](_0xb58d8e)&&Number(_0xb58d8e)>0x0;}function resolveEdgeEndpoint(_0x422730,_0xbe4f8f){const _0x386b0c=a299_0x85c6cc;if(typeof _0x422730===_0x386b0c(0x1bc)&&_0x422730[_0x386b0c(0x1fd)]())return _0x422730['trim']();if(typeof _0xbe4f8f===_0x386b0c(0x1bc)&&_0xbe4f8f['trim']())return _0xbe4f8f[_0x386b0c(0x1fd)]();return undefined;}function removeEmptyMetadata(_0x3d7ef8,_0x21f0c1,_0x4652b0,_0x4edb14){const _0x28f6aa=a299_0x85c6cc;if(Array[_0x28f6aa(0x2b7)](_0x3d7ef8)){_0x3d7ef8[_0x28f6aa(0x272)]((_0x587a60,_0x15c653)=>removeEmptyMetadata(_0x587a60,_0x21f0c1+'['+_0x15c653+']',_0x4652b0,_0x4edb14));return;}if(!isRecord(_0x3d7ef8))return;for(const [_0x310edf,_0x39efcc]of Object[_0x28f6aa(0x267)](_0x3d7ef8)){const _0xfd9819=_0x21f0c1+'.'+_0x310edf;if(_0x310edf==='metadata'&&isEmptyJsonValue(_0x39efcc)){delete _0x3d7ef8[_0x310edf],_0x4edb14[_0x28f6aa(0x250)](_0xfd9819),_0x4652b0[_0x28f6aa(0x250)]({'code':_0x28f6aa(0x1a3),'path':_0xfd9819,'message':_0xfd9819+_0x28f6aa(0x205)});continue;}removeEmptyMetadata(_0x39efcc,_0xfd9819,_0x4652b0,_0x4edb14);}}function isEmptyJsonValue(_0x5879c1){const _0x585bed=a299_0x85c6cc;if(_0x5879c1===null||_0x5879c1===undefined)return!![];if(typeof _0x5879c1===_0x585bed(0x1bc))return _0x5879c1[_0x585bed(0x1fd)]()==='';if(Array['isArray'](_0x5879c1))return _0x5879c1[_0x585bed(0x1cf)]===0x0;return isRecord(_0x5879c1)&&Object[_0x585bed(0x236)](_0x5879c1)[_0x585bed(0x1cf)]===0x0;}function isRecord(_0x1cb4a8){const _0x399b35=a299_0x85c6cc;return typeof _0x1cb4a8==='object'&&_0x1cb4a8!==null&&!Array[_0x399b35(0x2b7)](_0x1cb4a8);}function cloneJsonValue(_0xeff6a9){const _0x78e7c0=a299_0x85c6cc;return JSON[_0x78e7c0(0x2e6)](JSON[_0x78e7c0(0x219)](_0xeff6a9));}export async function readFlowConfigFile(_0x130b5e){const _0x5b3f5c=a299_0x85c6cc,_0x22cc55=await readFile(resolve(_0x130b5e),_0x5b3f5c(0x2c8));return JSON['parse'](_0x22cc55);}
@@ -1 +1 @@
1
- function a300_0x48f7(){const _0x10d25e=['Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','16JlDWSI','version','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_app_code_mismatch','policy.json','decode','instant_api_policy_version_invalid','45535cVBhIm','code','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','instant_api_policy_file_missing','length','.tmp','Policy\x20defaults.instantApi\x20is\x20required.','ENOENT','isArray','instant_api_policy_file_unwritable','instant_api_policy_json_invalid','rules','instant_api_policy_app_code_invalid','parse','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','string','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','instantApi','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','isFile','unchanged','instant_api_policy_file_too_large','737198PlyQSk','trim','appCode','catch','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','object','EEXIST','utf8','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','created','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','instant_api_policy_file_exists','size','policyFilePath','byteLength','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','force','instant_api_policy_file_unreadable','364839WofZbd','defaults','3672624yVgSOE','policyRoot','overwritten','Review\x20the\x20file\x20before\x20retrying.','instant_api_policy_rules_invalid','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','instant_api_policy_file_invalid','.rabetbase/instant-api-policy','411789dZlgys','431874jcSxmk','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','includes','1473920ilWJXy','instant_api_policy_defaults_invalid'];a300_0x48f7=function(){return _0x10d25e;};return a300_0x48f7();}const a300_0x2f4f81=a300_0x39ae;(function(_0x46df71,_0x403ffa){const _0x5e6c74=a300_0x39ae,_0x2b3ebe=_0x46df71();while(!![]){try{const _0x2f1edd=parseInt(_0x5e6c74(0xe4))/0x1+parseInt(_0x5e6c74(0x109))/0x2+-parseInt(_0x5e6c74(0xda))/0x3*(-parseInt(_0x5e6c74(0xec))/0x4)+-parseInt(_0x5e6c74(0xf3))/0x5+-parseInt(_0x5e6c74(0xe5))/0x6+-parseInt(_0x5e6c74(0xe9))/0x7+-parseInt(_0x5e6c74(0xdc))/0x8;if(_0x2f1edd===_0x403ffa)break;else _0x2b3ebe['push'](_0x2b3ebe['shift']());}catch(_0x3ae2e8){_0x2b3ebe['push'](_0x2b3ebe['shift']());}}}(a300_0x48f7,0x7e014));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=a300_0x2f4f81(0xe3);export const INSTANT_API_POLICY_FILE_NAME=a300_0x2f4f81(0xf0);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x26e44e,_0x28469c,_0x2673f7){return new CliError(_0x26e44e,0x1,_0x28469c,_0x2673f7);}function a300_0x39ae(_0x260cba,_0x114f1b){_0x260cba=_0x260cba-0xc8;const _0x48f749=a300_0x48f7();let _0x39ae62=_0x48f749[_0x260cba];return _0x39ae62;}export function loadInstantApiPolicyLocalConfig(_0x5a5661,_0x48c404){assertSafeAppCode(_0x5a5661);const _0x397643=resolve(_0x48c404??findProjectRootDirectory()),_0x386ab3=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x5a5661+'/'+INSTANT_API_POLICY_FILE_NAME,_0x431034=resolve(_0x397643,INSTANT_API_POLICY_RELATIVE_ROOT,_0x5a5661),_0x508dfc=resolve(_0x431034,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x397643,'appCode':_0x5a5661,'policyRoot':_0x431034,'policyFilePath':_0x508dfc,'policyRelativePath':_0x386ab3};}export function createDefaultInstantApiPolicyConfig(_0x438a9f,_0x10dc2c='allow'){return assertSafeAppCode(_0x438a9f),{'version':'2','appCode':_0x438a9f,'defaults':{'instantApi':_0x10dc2c},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x36f864){const _0x38cd07=a300_0x2f4f81;let _0xd02801;try{_0xd02801=await stat(_0x36f864[_0x38cd07(0xd4)]);}catch(_0x3df5e5){throw instantApiPolicyError(_0x38cd07(0xf6),'Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20'+_0x36f864[_0x38cd07(0xd4)],_0x38cd07(0xd7));}if(!_0xd02801[_0x38cd07(0x106)]())throw instantApiPolicyError(_0x38cd07(0xe2),_0x38cd07(0xf5)+_0x36f864['policyFilePath']);if(_0xd02801[_0x38cd07(0xd3)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x38cd07(0xeb));let _0x513555;try{_0x513555=await readFile(_0x36f864[_0x38cd07(0xd4)]);}catch{throw instantApiPolicyError(_0x38cd07(0xd9),_0x38cd07(0x105)+_0x36f864[_0x38cd07(0xd4)]);}if(_0x513555[_0x38cd07(0xd5)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x38cd07(0xeb));let _0x33f03b;try{_0x33f03b=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0x38cd07(0xf1)](_0x513555);}catch{throw instantApiPolicyError(_0x38cd07(0xe2),_0x38cd07(0xd0)+_0x36f864[_0x38cd07(0xd4)]);}let _0x5cd2b1;try{_0x5cd2b1=JSON[_0x38cd07(0x100)](_0x33f03b);}catch{throw instantApiPolicyError(_0x38cd07(0xfd),_0x38cd07(0xe1)+_0x36f864['policyFilePath']);}return assertLocalPolicyContract(_0x5cd2b1,_0x36f864[_0x38cd07(0xc8)]);}export async function writeInstantApiPolicyConfigFile(_0x510048,_0x3192f6,_0x2176ee={}){const _0x24ee85=a300_0x2f4f81,_0x1af462=assertLocalPolicyContract(_0x3192f6,_0x510048['appCode']),_0x20f56a=JSON['stringify'](_0x1af462,null,0x2)+'\x0a';if(Buffer[_0x24ee85(0xd5)](_0x20f56a,_0x24ee85(0xcd))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x24ee85(0x108),_0x24ee85(0xeb));await mkdir(_0x510048[_0x24ee85(0xdd)],{'recursive':!![]});let _0xce1e;try{_0xce1e=await readFile(_0x510048['policyFilePath'],_0x24ee85(0xcd));}catch(_0x9988c1){if(!isMissingFile(_0x9988c1))throw instantApiPolicyError(_0x24ee85(0xd9),'Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20'+_0x510048[_0x24ee85(0xd4)]);}if(_0xce1e===_0x20f56a)return{'action':_0x24ee85(0x107),'filePath':_0x510048[_0x24ee85(0xd4)]};if(_0xce1e!==undefined&&!_0x2176ee[_0x24ee85(0xd8)])throw instantApiPolicyError(_0x24ee85(0xd2),_0x24ee85(0xe7)+_0x510048[_0x24ee85(0xd4)],_0x24ee85(0xce));if(_0xce1e===undefined)try{return await writeFile(_0x510048[_0x24ee85(0xd4)],_0x20f56a,{'encoding':'utf8','flag':'wx'}),{'action':_0x24ee85(0xcf),'filePath':_0x510048[_0x24ee85(0xd4)]};}catch(_0x653497){if(!isAlreadyExists(_0x653497))throw instantApiPolicyError(_0x24ee85(0xfc),_0x24ee85(0x101)+_0x510048[_0x24ee85(0xd4)]);if(!_0x2176ee['force'])throw instantApiPolicyError(_0x24ee85(0xd2),'Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20'+_0x510048['policyFilePath'],_0x24ee85(0xdf));}const _0x54f398=resolve(dirname(_0x510048['policyFilePath']),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process['pid']+'.'+randomUUID()+_0x24ee85(0xf8));try{await writeFile(_0x54f398,_0x20f56a,{'encoding':_0x24ee85(0xcd),'flag':'wx'}),await rename(_0x54f398,_0x510048[_0x24ee85(0xd4)]);}catch{await unlink(_0x54f398)[_0x24ee85(0xc9)](()=>undefined);throw instantApiPolicyError(_0x24ee85(0xfc),_0x24ee85(0xee)+_0x510048[_0x24ee85(0xd4)]);}return{'action':_0x24ee85(0xde),'filePath':_0x510048['policyFilePath']};}function assertSafeAppCode(_0x27d0b1){const _0x30b16f=a300_0x2f4f81,_0x336886=_0x27d0b1[_0x30b16f(0x10a)]();if(!_0x336886||_0x336886!==_0x27d0b1||_0x336886[_0x30b16f(0xf7)]>0x64||_0x336886==='.'||_0x336886==='..'||_0x336886[_0x30b16f(0xe8)]('/')||_0x336886[_0x30b16f(0xe8)]('\x5c')||_0x336886[_0x30b16f(0xe8)]('\x00'))throw instantApiPolicyError(_0x30b16f(0xff),_0x30b16f(0xd6));}function assertLocalPolicyContract(_0x58de21,_0x1017e8){const _0x56d847=a300_0x2f4f81;if(!isObject(_0x58de21))throw instantApiPolicyError(_0x56d847(0xfd),_0x56d847(0xd1));if(_0x58de21['version']!=='1'&&_0x58de21[_0x56d847(0xed)]!=='2')throw instantApiPolicyError(_0x56d847(0xf2),_0x56d847(0xca),_0x56d847(0xe6));if(_0x58de21[_0x56d847(0xc8)]!==_0x1017e8)throw instantApiPolicyError(_0x56d847(0xef),_0x56d847(0x103)+_0x1017e8+'.');if(!isObject(_0x58de21[_0x56d847(0xdb)])||typeof _0x58de21[_0x56d847(0xdb)][_0x56d847(0x104)]!==_0x56d847(0x102))throw instantApiPolicyError(_0x56d847(0xea),_0x56d847(0xf9));if(_0x58de21[_0x56d847(0xfe)]!==undefined&&_0x58de21[_0x56d847(0xfe)]!==null&&!Array[_0x56d847(0xfb)](_0x58de21[_0x56d847(0xfe)]))throw instantApiPolicyError(_0x56d847(0xe0),'Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.');return _0x58de21;}function isObject(_0x33d02d){const _0x3fb2e2=a300_0x2f4f81;return _0x33d02d!==null&&typeof _0x33d02d==='object'&&!Array[_0x3fb2e2(0xfb)](_0x33d02d);}function isMissingFile(_0x4889c9){const _0x35e379=a300_0x2f4f81;return Boolean(_0x4889c9&&typeof _0x4889c9===_0x35e379(0xcb)&&_0x4889c9[_0x35e379(0xf4)]===_0x35e379(0xfa));}function isAlreadyExists(_0x26b2a2){const _0x3d3482=a300_0x2f4f81;return Boolean(_0x26b2a2&&typeof _0x26b2a2===_0x3d3482(0xcb)&&_0x26b2a2[_0x3d3482(0xf4)]===_0x3d3482(0xcc));}
1
+ const a300_0x30ab4e=a300_0x4d85;function a300_0x5923(){const _0x2d5db3=['105FyHQrX','version','trim','instant_api_policy_app_code_mismatch','policy.json','.tmp','object','catch','length','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','855202EDCeoA','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','4639710IOeSyP','instant_api_policy_app_code_invalid','allow','instant_api_policy_json_invalid','unchanged','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','code','string','policyRoot','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','appCode','size','.rabetbase/instant-api-policy','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','8YndSBM','instant_api_policy_defaults_invalid','instant_api_policy_file_missing','18WeYTxw','4074961fkOgJQ','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','utf8','force','isFile','instantApi','EEXIST','stringify','instant_api_policy_version_invalid','defaults','utf-8','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_file_unreadable','60804VMpFYt','1311765Nsxtrt','includes','byteLength','807887YNKxkT','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','instant_api_policy_file_unwritable','rules','instant_api_policy_file_too_large','isArray','instant_api_policy_file_exists','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','6tyNykD','policyFilePath','ENOENT','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','created','143784mUIVMP','instant_api_policy_file_invalid'];a300_0x5923=function(){return _0x2d5db3;};return a300_0x5923();}(function(_0x326d36,_0x330f9f){const _0x5c132d=a300_0x4d85,_0x522efd=_0x326d36();while(!![]){try{const _0x24387c=parseInt(_0x5c132d(0x1bc))/0x1+parseInt(_0x5c132d(0x1d6))/0x2*(-parseInt(_0x5c132d(0x1c4))/0x3)+-parseInt(_0x5c132d(0x1f9))/0x4*(-parseInt(_0x5c132d(0x1cb))/0x5)+parseInt(_0x5c132d(0x1ea))/0x6*(parseInt(_0x5c132d(0x1fa))/0x7)+-parseInt(_0x5c132d(0x1e7))/0x8*(parseInt(_0x5c132d(0x1c9))/0x9)+-parseInt(_0x5c132d(0x1d8))/0xa+parseInt(_0x5c132d(0x1eb))/0xb;if(_0x24387c===_0x330f9f)break;else _0x522efd['push'](_0x522efd['shift']());}catch(_0x14195d){_0x522efd['push'](_0x522efd['shift']());}}}(a300_0x5923,0xb0e73));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=a300_0x30ab4e(0x1e5);export const INSTANT_API_POLICY_FILE_NAME=a300_0x30ab4e(0x1cf);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x424e41,_0x427075,_0x31fcb8){return new CliError(_0x424e41,0x1,_0x427075,_0x31fcb8);}export function loadInstantApiPolicyLocalConfig(_0x110476,_0xa8ef0c){assertSafeAppCode(_0x110476);const _0x405177=resolve(_0xa8ef0c??findProjectRootDirectory()),_0x3e4d25=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x110476+'/'+INSTANT_API_POLICY_FILE_NAME,_0x379891=resolve(_0x405177,INSTANT_API_POLICY_RELATIVE_ROOT,_0x110476),_0x498508=resolve(_0x379891,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x405177,'appCode':_0x110476,'policyRoot':_0x379891,'policyFilePath':_0x498508,'policyRelativePath':_0x3e4d25};}export function createDefaultInstantApiPolicyConfig(_0x1c2124,_0x597850=a300_0x30ab4e(0x1da)){return assertSafeAppCode(_0x1c2124),{'version':'2','appCode':_0x1c2124,'defaults':{'instantApi':_0x597850},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x1a5f62){const _0x326287=a300_0x30ab4e;let _0x307aab;try{_0x307aab=await stat(_0x1a5f62[_0x326287(0x1c5)]);}catch(_0x2920f2){throw instantApiPolicyError(_0x326287(0x1e9),'Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20'+_0x1a5f62[_0x326287(0x1c5)],_0x326287(0x1d4));}if(!_0x307aab[_0x326287(0x1f0)]())throw instantApiPolicyError(_0x326287(0x1ca),_0x326287(0x1c7)+_0x1a5f62[_0x326287(0x1c5)]);if(_0x307aab[_0x326287(0x1e4)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x326287(0x1c0),_0x326287(0x1dd));let _0x2fde42;try{_0x2fde42=await readFile(_0x1a5f62[_0x326287(0x1c5)]);}catch{throw instantApiPolicyError(_0x326287(0x1f8),'Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20'+_0x1a5f62[_0x326287(0x1c5)]);}if(_0x2fde42[_0x326287(0x1bb)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x326287(0x1dd));let _0x47615d;try{_0x47615d=new TextDecoder(_0x326287(0x1f6),{'fatal':!![],'ignoreBOM':!![]})['decode'](_0x2fde42);}catch{throw instantApiPolicyError(_0x326287(0x1ca),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20'+_0x1a5f62[_0x326287(0x1c5)]);}let _0x2f5381;try{_0x2f5381=JSON['parse'](_0x47615d);}catch{throw instantApiPolicyError(_0x326287(0x1db),_0x326287(0x1ec)+_0x1a5f62[_0x326287(0x1c5)]);}return assertLocalPolicyContract(_0x2f5381,_0x1a5f62['appCode']);}export async function writeInstantApiPolicyConfigFile(_0x4e4799,_0x3842b5,_0x574653={}){const _0x24c4bf=a300_0x30ab4e,_0x29b589=assertLocalPolicyContract(_0x3842b5,_0x4e4799[_0x24c4bf(0x1e3)]),_0x56d20e=JSON[_0x24c4bf(0x1f3)](_0x29b589,null,0x2)+'\x0a';if(Buffer[_0x24c4bf(0x1bb)](_0x56d20e,_0x24c4bf(0x1ee))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x24c4bf(0x1c0),_0x24c4bf(0x1dd));await mkdir(_0x4e4799[_0x24c4bf(0x1e1)],{'recursive':!![]});let _0x3f9733;try{_0x3f9733=await readFile(_0x4e4799[_0x24c4bf(0x1c5)],_0x24c4bf(0x1ee));}catch(_0x2df02d){if(!isMissingFile(_0x2df02d))throw instantApiPolicyError(_0x24c4bf(0x1f8),_0x24c4bf(0x1ed)+_0x4e4799[_0x24c4bf(0x1c5)]);}if(_0x3f9733===_0x56d20e)return{'action':_0x24c4bf(0x1dc),'filePath':_0x4e4799[_0x24c4bf(0x1c5)]};if(_0x3f9733!==undefined&&!_0x574653['force'])throw instantApiPolicyError(_0x24c4bf(0x1c2),_0x24c4bf(0x1c3)+_0x4e4799[_0x24c4bf(0x1c5)],'Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.');if(_0x3f9733===undefined)try{return await writeFile(_0x4e4799[_0x24c4bf(0x1c5)],_0x56d20e,{'encoding':_0x24c4bf(0x1ee),'flag':'wx'}),{'action':_0x24c4bf(0x1c8),'filePath':_0x4e4799[_0x24c4bf(0x1c5)]};}catch(_0x298475){if(!isAlreadyExists(_0x298475))throw instantApiPolicyError(_0x24c4bf(0x1be),_0x24c4bf(0x1f7)+_0x4e4799[_0x24c4bf(0x1c5)]);if(!_0x574653[_0x24c4bf(0x1ef)])throw instantApiPolicyError('instant_api_policy_file_exists',_0x24c4bf(0x1de)+_0x4e4799[_0x24c4bf(0x1c5)],'Review\x20the\x20file\x20before\x20retrying.');}const _0x166c81=resolve(dirname(_0x4e4799[_0x24c4bf(0x1c5)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process['pid']+'.'+randomUUID()+_0x24c4bf(0x1d0));try{await writeFile(_0x166c81,_0x56d20e,{'encoding':'utf8','flag':'wx'}),await rename(_0x166c81,_0x4e4799['policyFilePath']);}catch{await unlink(_0x166c81)[_0x24c4bf(0x1d2)](()=>undefined);throw instantApiPolicyError(_0x24c4bf(0x1be),_0x24c4bf(0x1e6)+_0x4e4799[_0x24c4bf(0x1c5)]);}return{'action':'overwritten','filePath':_0x4e4799[_0x24c4bf(0x1c5)]};}function assertSafeAppCode(_0x15cbad){const _0x1f1c76=a300_0x30ab4e,_0x444396=_0x15cbad[_0x1f1c76(0x1cd)]();if(!_0x444396||_0x444396!==_0x15cbad||_0x444396[_0x1f1c76(0x1d3)]>0x64||_0x444396==='.'||_0x444396==='..'||_0x444396[_0x1f1c76(0x1fb)]('/')||_0x444396[_0x1f1c76(0x1fb)]('\x5c')||_0x444396[_0x1f1c76(0x1fb)]('\x00'))throw instantApiPolicyError(_0x1f1c76(0x1d9),'appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.');}function assertLocalPolicyContract(_0x4c83c7,_0x45667d){const _0x4f3460=a300_0x30ab4e;if(!isObject(_0x4c83c7))throw instantApiPolicyError(_0x4f3460(0x1db),_0x4f3460(0x1bd));if(_0x4c83c7[_0x4f3460(0x1cc)]!=='1'&&_0x4c83c7[_0x4f3460(0x1cc)]!=='2')throw instantApiPolicyError(_0x4f3460(0x1f4),_0x4f3460(0x1e2),_0x4f3460(0x1d7));if(_0x4c83c7[_0x4f3460(0x1e3)]!==_0x45667d)throw instantApiPolicyError(_0x4f3460(0x1ce),_0x4f3460(0x1d5)+_0x45667d+'.');if(!isObject(_0x4c83c7[_0x4f3460(0x1f5)])||typeof _0x4c83c7['defaults'][_0x4f3460(0x1f1)]!==_0x4f3460(0x1e0))throw instantApiPolicyError(_0x4f3460(0x1e8),'Policy\x20defaults.instantApi\x20is\x20required.');if(_0x4c83c7[_0x4f3460(0x1bf)]!==undefined&&_0x4c83c7['rules']!==null&&!Array[_0x4f3460(0x1c1)](_0x4c83c7[_0x4f3460(0x1bf)]))throw instantApiPolicyError('instant_api_policy_rules_invalid','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.');return _0x4c83c7;}function a300_0x4d85(_0x23adc5,_0xdda775){_0x23adc5=_0x23adc5-0x1bb;const _0x5923e2=a300_0x5923();let _0x4d8515=_0x5923e2[_0x23adc5];return _0x4d8515;}function isObject(_0x58306f){const _0xb2a5be=a300_0x30ab4e;return _0x58306f!==null&&typeof _0x58306f===_0xb2a5be(0x1d1)&&!Array[_0xb2a5be(0x1c1)](_0x58306f);}function isMissingFile(_0x26db13){const _0x13ea63=a300_0x30ab4e;return Boolean(_0x26db13&&typeof _0x26db13===_0x13ea63(0x1d1)&&_0x26db13['code']===_0x13ea63(0x1c6));}function isAlreadyExists(_0x448058){const _0x1ccde7=a300_0x30ab4e;return Boolean(_0x448058&&typeof _0x448058===_0x1ccde7(0x1d1)&&_0x448058[_0x1ccde7(0x1df)]===_0x1ccde7(0x1f2));}
@@ -1 +1 @@
1
- const a301_0x37a8c2=a301_0x107c;(function(_0x5e4663,_0x405453){const _0x67911=a301_0x107c,_0x5f23ab=_0x5e4663();while(!![]){try{const _0x305a62=-parseInt(_0x67911(0x12a))/0x1*(parseInt(_0x67911(0x154))/0x2)+parseInt(_0x67911(0x13f))/0x3*(parseInt(_0x67911(0x14a))/0x4)+-parseInt(_0x67911(0x132))/0x5*(parseInt(_0x67911(0x13a))/0x6)+parseInt(_0x67911(0x14e))/0x7*(-parseInt(_0x67911(0x125))/0x8)+-parseInt(_0x67911(0x155))/0x9*(parseInt(_0x67911(0x149))/0xa)+parseInt(_0x67911(0x12e))/0xb+-parseInt(_0x67911(0x13b))/0xc*(-parseInt(_0x67911(0x111))/0xd);if(_0x305a62===_0x405453)break;else _0x5f23ab['push'](_0x5f23ab['shift']());}catch(_0x5e9d39){_0x5f23ab['push'](_0x5f23ab['shift']());}}}(a301_0x34aa,0x3c710));import{AsyncLocalStorage}from'node:async_hooks';function a301_0x107c(_0x84e7ae,_0x2c85a1){_0x84e7ae=_0x84e7ae-0x111;const _0x34aafa=a301_0x34aa();let _0x107c64=_0x34aafa[_0x84e7ae];return _0x107c64;}import{getKbServiceDomain}from'../constant/domain.js';import{normalizeKbServiceOrigin,parseKnowledgeJson}from'../core/kb-search-client.js';import{CliError,CliErrors}from'../errors.js';const WRITE_RECONCILIATION=a301_0x37a8c2(0x14d),MAX_BODY_BYTES=0x20*0x400*0x400,session=new AsyncLocalStorage();function a301_0x34aa(){const _0xa6771a=['defineProperty','Invalid\x20knowledge\x20management\x20API\x20path.','Knowledge\x20management\x20request\x20exceeds\x20the\x2032\x20MiB\x20JSON\x20limit.\x20Keep\x20the\x20source\x20file\x20and\x20reduce\x20the\x20request\x20size.','test','content-type','method','API\x20error\x20code:\x20','pageTooLarge','appCode','byteLength','kb-browser-v1','endsWith','hasOwn','errorMsg','httpStatus','Knowledge\x20management\x20request\x20failed\x20(HTTP\x20','body','0000','8iysJOt','headers','LEGACY_LIST_TOO_LARGE','trim','Configure\x20kbServiceDomain\x20with\x20a\x20trusted\x20HTTPS\x20origin\x20for\x20knowledge\x20management.','578bXvJOX','toLowerCase','application/json','Knowledge\x20management\x20request\x20timed\x20out.','2614392onFNrm','data','isArray','get','31520OCZgqN','authRequired','transportFailure','text','cookie','Knowledge\x20management\x20response\x20was\x20interrupted.','status','POST','222DjTJHR','2784120tZJpJV','scope','Knowledge\x20management\x20request\x20cancelled.','remoteErrorCode','621051TgecCX','Knowledge\x20management\x20returned\x20an\x20invalid\x20response\x20(HTTP\x20','Knowledge\x20requests\x20require\x20POST\x20and\x20a\x20non-empty\x20body\x20appCode\x20(at\x20most\x20100\x20characters);\x20scope\x20must\x20come\x20from\x20the\x20path.','signal','length','cli:rabetbase','Invalid\x20kbServiceDomain:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','getStore','validation','any','25240yzUNyB','4garcEH','origin','error','\x20The\x20entry\x20may\x20already\x20have\x20been\x20saved.\x20Use\x20read-only\x20detail\x20or\x20list\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.','2310259GQKisV','success','105','errorCode','run','includes','260NNWWCw','81JdIXRQ','boolean','string','26aRtIvh','abort'];a301_0x34aa=function(){return _0xa6771a;};return a301_0x34aa();}export class KbManagementError extends CliError{[a301_0x37a8c2(0x134)];[a301_0x37a8c2(0x13e)];[a301_0x37a8c2(0x121)];[a301_0x37a8c2(0x11a)];constructor(_0x5732d2,_0x2b4630=![],_0x3acf5f,_0xf35e49,_0x457d96=![]){const _0x36ed60=a301_0x37a8c2;super('api_error',0x1,_0x5732d2,_0x3acf5f?_0x36ed60(0x119)+_0x3acf5f:undefined),this[_0x36ed60(0x134)]=_0x2b4630,this[_0x36ed60(0x13e)]=_0x3acf5f,this[_0x36ed60(0x121)]=_0xf35e49,this[_0x36ed60(0x11a)]=_0x457d96;if(_0x3acf5f)Object[_0x36ed60(0x113)](this,'data',{'value':{'remoteErrorCode':_0x3acf5f},'enumerable':![]});}}function resolveOrigin(){const _0x3d9359=a301_0x37a8c2,_0x4dc78f=getKbServiceDomain();if(!_0x4dc78f)throw CliErrors[_0x3d9359(0x147)](_0x3d9359(0x129));try{return normalizeKbServiceOrigin(_0x4dc78f);}catch{throw CliErrors[_0x3d9359(0x147)](_0x3d9359(0x145));}}export function withKbManagementSession(_0x42d56c,_0x25bd43){const _0x5d0f3e=a301_0x37a8c2;return session[_0x5d0f3e(0x152)]({'origin':resolveOrigin(),'signal':_0x42d56c},_0x25bd43);}export async function kbManagementRequest(_0x544f6a,_0x13f5de){const _0x107e77=a301_0x37a8c2;if(!/^\/api\/knowledge-base\/company\/(rules\/)?(page|get-one|get-by-title|create|update|delete|status|list)$/['test'](_0x544f6a))throw CliErrors[_0x107e77(0x147)](_0x107e77(0x114));if(_0x13f5de['method']!==undefined&&_0x13f5de[_0x107e77(0x118)]!==_0x107e77(0x139)||typeof _0x13f5de[_0x107e77(0x123)]?.[_0x107e77(0x11b)]!=='string'||!_0x13f5de['body']['appCode'][_0x107e77(0x128)]()||_0x13f5de['body'][_0x107e77(0x11b)][_0x107e77(0x143)]>0x64||Object['hasOwn'](_0x13f5de[_0x107e77(0x123)],_0x107e77(0x13c)))throw CliErrors[_0x107e77(0x147)](_0x107e77(0x141));const _0x55d7c6=session[_0x107e77(0x146)]()?.[_0x107e77(0x14b)]??resolveOrigin();if(!_0x13f5de['cookie'][_0x107e77(0x128)]())throw CliErrors[_0x107e77(0x133)]();const _0x1f2191=_0x13f5de['body']===undefined?undefined:JSON['stringify'](_0x13f5de['body']);if(_0x1f2191!==undefined&&Buffer[_0x107e77(0x11c)](_0x1f2191,'utf8')>MAX_BODY_BYTES)throw CliErrors[_0x107e77(0x147)](_0x107e77(0x115));const _0x3e45e7=/\/(create|update|delete)$/[_0x107e77(0x116)](_0x544f6a),_0x5b4be1=new AbortController(),_0x5b9823=_0x13f5de['signal']??session[_0x107e77(0x146)]()?.[_0x107e77(0x142)],_0x247fbd=_0x5b9823?AbortSignal[_0x107e77(0x148)]([_0x5b9823,_0x5b4be1['signal']]):_0x5b4be1[_0x107e77(0x142)];if(_0x247fbd['aborted'])throw CliErrors['cancelled'](_0x107e77(0x13d));const _0x3faf73=setTimeout(()=>_0x5b4be1[_0x107e77(0x112)](),0xea60);try{let _0x1022a1;try{_0x1022a1=await fetch(''+_0x55d7c6+_0x544f6a,{'method':_0x107e77(0x139),'redirect':_0x107e77(0x14c),'signal':_0x247fbd,'headers':{'Content-Type':'application/json','Cookie':_0x13f5de[_0x107e77(0x136)],'X-Invoke-Source':_0x107e77(0x144),..._0x3e45e7?{'X-CSRF-Token':_0x107e77(0x11d)}:{}},..._0x1f2191===undefined?{}:{'body':_0x1f2191}});}catch{throw new KbManagementError(_0x5b4be1[_0x107e77(0x142)]['aborted']?_0x107e77(0x12d):'Knowledge\x20management\x20request\x20failed\x20or\x20was\x20cancelled.',!![]);}if(_0x1022a1[_0x107e77(0x138)]===0x191)throw CliErrors['authRequired']();const _0x390d4b=()=>new KbManagementError(_0x107e77(0x140)+_0x1022a1[_0x107e77(0x138)]+').'+(_0x3e45e7?WRITE_RECONCILIATION:''),![],undefined,_0x1022a1[_0x107e77(0x138)]);if(!(_0x1022a1[_0x107e77(0x126)][_0x107e77(0x131)](_0x107e77(0x117))??'')[_0x107e77(0x12b)]()[_0x107e77(0x153)](_0x107e77(0x12c)))throw _0x390d4b();let _0xa1a7bd;try{_0xa1a7bd=await _0x1022a1[_0x107e77(0x135)]();}catch{throw new KbManagementError(_0x107e77(0x137),_0x3e45e7);}let _0x380ab1;try{_0x380ab1=parseKnowledgeJson(_0xa1a7bd);}catch{throw _0x390d4b();}if(!_0x380ab1||typeof _0x380ab1!=='object'||Array[_0x107e77(0x130)](_0x380ab1))throw _0x390d4b();const _0x3fed1c=_0x380ab1;if(typeof _0x3fed1c[_0x107e77(0x14f)]!==_0x107e77(0x156)||typeof _0x3fed1c[_0x107e77(0x151)]!==_0x107e77(0x157)||!/^\d{1,8}$/[_0x107e77(0x116)](_0x3fed1c[_0x107e77(0x151)])||!Object[_0x107e77(0x11f)](_0x3fed1c,_0x107e77(0x12f))||_0x3fed1c[_0x107e77(0x14f)]&&_0x3fed1c[_0x107e77(0x151)]!==_0x107e77(0x124)||!_0x3fed1c['success']&&_0x3fed1c[_0x107e77(0x151)]===_0x107e77(0x124))throw _0x390d4b();if(!_0x1022a1['ok']||!_0x3fed1c['success'])throw new KbManagementError(_0x107e77(0x122)+_0x1022a1[_0x107e77(0x138)]+').'+(_0x3e45e7&&_0x1022a1[_0x107e77(0x138)]>=0x1f4?WRITE_RECONCILIATION:''),![],_0x3fed1c['errorCode'],_0x1022a1[_0x107e77(0x138)],_0x544f6a[_0x107e77(0x11e)]('/page')&&_0x1022a1[_0x107e77(0x138)]===0x19d&&_0x3fed1c[_0x107e77(0x151)]===_0x107e77(0x150)&&_0x3fed1c[_0x107e77(0x120)]===_0x107e77(0x127));if(_0x1022a1[_0x107e77(0x138)]!==0xc8)throw _0x390d4b();return _0x3fed1c[_0x107e77(0x12f)];}finally{clearTimeout(_0x3faf73);}}
1
+ const a301_0x132036=a301_0x405b;function a301_0x31ba(){const _0x3964b4=['pageTooLarge','headers','status','4677760XXysNo','Knowledge\x20management\x20request\x20failed\x20or\x20was\x20cancelled.','8513289gnXDyZ','body','defineProperty','105','signal','4vAxTYq','text','stringify','byteLength','cli:rabetbase','authRequired','abort','boolean','35fOmElz','data','10leQNEM','Invalid\x20knowledge\x20management\x20API\x20path.','Knowledge\x20management\x20returned\x20an\x20invalid\x20response\x20(HTTP\x20','includes','string','isArray','LEGACY_LIST_TOO_LARGE','transportFailure','API\x20error\x20code:\x20','remoteErrorCode','aborted','hasOwn','getStore','POST','51565xYhFHA','run','method','get','0000','length','application/json','Knowledge\x20management\x20request\x20failed\x20(HTTP\x20','appCode','any','kb-browser-v1','api_error','10psuGik','Knowledge\x20requests\x20require\x20POST\x20and\x20a\x20non-empty\x20body\x20appCode\x20(at\x20most\x20100\x20characters);\x20scope\x20must\x20come\x20from\x20the\x20path.','success','Knowledge\x20management\x20request\x20exceeds\x20the\x2032\x20MiB\x20JSON\x20limit.\x20Keep\x20the\x20source\x20file\x20and\x20reduce\x20the\x20request\x20size.','errorMsg','origin','897909ylYGCe','/page','\x20The\x20entry\x20may\x20already\x20have\x20been\x20saved.\x20Use\x20read-only\x20detail\x20or\x20list\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.','validation','errorCode','cookie','11943600ufxQpx','trim','error','httpStatus','cancelled','7833496ovhUZm','93084qjFYUq','test'];a301_0x31ba=function(){return _0x3964b4;};return a301_0x31ba();}(function(_0x5c1a2a,_0x119ca7){const _0x47441b=a301_0x405b,_0x2f86e7=_0x5c1a2a();while(!![]){try{const _0x206423=parseInt(_0x47441b(0x1be))/0x1*(parseInt(_0x47441b(0x1ca))/0x2)+-parseInt(_0x47441b(0x1d0))/0x3*(-parseInt(_0x47441b(0x1e8))/0x4)+-parseInt(_0x47441b(0x1e1))/0x5+parseInt(_0x47441b(0x1dc))/0x6*(parseInt(_0x47441b(0x1f0))/0x7)+parseInt(_0x47441b(0x1d6))/0x8+-parseInt(_0x47441b(0x1e3))/0x9+-parseInt(_0x47441b(0x1f2))/0xa*(-parseInt(_0x47441b(0x1db))/0xb);if(_0x206423===_0x119ca7)break;else _0x2f86e7['push'](_0x2f86e7['shift']());}catch(_0x3a5463){_0x2f86e7['push'](_0x2f86e7['shift']());}}}(a301_0x31ba,0xe9f67));import{AsyncLocalStorage}from'node:async_hooks';import{getKbServiceDomain}from'../constant/domain.js';import{normalizeKbServiceOrigin,parseKnowledgeJson}from'../core/kb-search-client.js';import{CliError,CliErrors}from'../errors.js';const WRITE_RECONCILIATION=a301_0x132036(0x1d2),MAX_BODY_BYTES=0x20*0x400*0x400,session=new AsyncLocalStorage();function a301_0x405b(_0xe82415,_0x287c2b){_0xe82415=_0xe82415-0x1b4;const _0x31ba58=a301_0x31ba();let _0x405b9f=_0x31ba58[_0xe82415];return _0x405b9f;}export class KbManagementError extends CliError{[a301_0x132036(0x1b7)];[a301_0x132036(0x1b9)];[a301_0x132036(0x1d9)];[a301_0x132036(0x1de)];constructor(_0x5c7d99,_0x4a34b7=![],_0x5d7f2c,_0x360d52,_0x23b004=![]){const _0x2033ed=a301_0x132036;super(_0x2033ed(0x1c9),0x1,_0x5c7d99,_0x5d7f2c?_0x2033ed(0x1b8)+_0x5d7f2c:undefined),this['transportFailure']=_0x4a34b7,this[_0x2033ed(0x1b9)]=_0x5d7f2c,this['httpStatus']=_0x360d52,this[_0x2033ed(0x1de)]=_0x23b004;if(_0x5d7f2c)Object[_0x2033ed(0x1e5)](this,_0x2033ed(0x1f1),{'value':{'remoteErrorCode':_0x5d7f2c},'enumerable':![]});}}function resolveOrigin(){const _0x4b4be3=a301_0x132036,_0x44f081=getKbServiceDomain();if(!_0x44f081)throw CliErrors[_0x4b4be3(0x1d3)]('Configure\x20kbServiceDomain\x20with\x20a\x20trusted\x20HTTPS\x20origin\x20for\x20knowledge\x20management.');try{return normalizeKbServiceOrigin(_0x44f081);}catch{throw CliErrors[_0x4b4be3(0x1d3)]('Invalid\x20kbServiceDomain:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.');}}export function withKbManagementSession(_0x171fe8,_0x3298b2){const _0x29ed56=a301_0x132036;return session[_0x29ed56(0x1bf)]({'origin':resolveOrigin(),'signal':_0x171fe8},_0x3298b2);}export async function kbManagementRequest(_0x2e354d,_0x4a6187){const _0x4876bc=a301_0x132036;if(!/^\/api\/knowledge-base\/company\/(rules\/)?(page|get-one|get-by-title|create|update|delete|status|list)$/[_0x4876bc(0x1dd)](_0x2e354d))throw CliErrors[_0x4876bc(0x1d3)](_0x4876bc(0x1f3));if(_0x4a6187[_0x4876bc(0x1c0)]!==undefined&&_0x4a6187[_0x4876bc(0x1c0)]!=='POST'||typeof _0x4a6187['body']?.[_0x4876bc(0x1c6)]!==_0x4876bc(0x1b4)||!_0x4a6187['body'][_0x4876bc(0x1c6)][_0x4876bc(0x1d7)]()||_0x4a6187[_0x4876bc(0x1e4)][_0x4876bc(0x1c6)][_0x4876bc(0x1c3)]>0x64||Object[_0x4876bc(0x1bb)](_0x4a6187[_0x4876bc(0x1e4)],'scope'))throw CliErrors[_0x4876bc(0x1d3)](_0x4876bc(0x1cb));const _0x1357ce=session[_0x4876bc(0x1bc)]()?.[_0x4876bc(0x1cf)]??resolveOrigin();if(!_0x4a6187[_0x4876bc(0x1d5)]['trim']())throw CliErrors[_0x4876bc(0x1ed)]();const _0x25b4d0=_0x4a6187['body']===undefined?undefined:JSON[_0x4876bc(0x1ea)](_0x4a6187[_0x4876bc(0x1e4)]);if(_0x25b4d0!==undefined&&Buffer[_0x4876bc(0x1eb)](_0x25b4d0,'utf8')>MAX_BODY_BYTES)throw CliErrors['validation'](_0x4876bc(0x1cd));const _0x586ee7=/\/(create|update|delete)$/['test'](_0x2e354d),_0x1cc9a0=new AbortController(),_0x3a7067=_0x4a6187['signal']??session[_0x4876bc(0x1bc)]()?.[_0x4876bc(0x1e7)],_0x3765f6=_0x3a7067?AbortSignal[_0x4876bc(0x1c7)]([_0x3a7067,_0x1cc9a0[_0x4876bc(0x1e7)]]):_0x1cc9a0['signal'];if(_0x3765f6[_0x4876bc(0x1ba)])throw CliErrors[_0x4876bc(0x1da)]('Knowledge\x20management\x20request\x20cancelled.');const _0x5d6971=setTimeout(()=>_0x1cc9a0[_0x4876bc(0x1ee)](),0xea60);try{let _0x5815df;try{_0x5815df=await fetch(''+_0x1357ce+_0x2e354d,{'method':_0x4876bc(0x1bd),'redirect':_0x4876bc(0x1d8),'signal':_0x3765f6,'headers':{'Content-Type':_0x4876bc(0x1c4),'Cookie':_0x4a6187['cookie'],'X-Invoke-Source':_0x4876bc(0x1ec),..._0x586ee7?{'X-CSRF-Token':_0x4876bc(0x1c8)}:{}},..._0x25b4d0===undefined?{}:{'body':_0x25b4d0}});}catch{throw new KbManagementError(_0x1cc9a0[_0x4876bc(0x1e7)][_0x4876bc(0x1ba)]?'Knowledge\x20management\x20request\x20timed\x20out.':_0x4876bc(0x1e2),!![]);}if(_0x5815df[_0x4876bc(0x1e0)]===0x191)throw CliErrors[_0x4876bc(0x1ed)]();const _0x291cfc=()=>new KbManagementError(_0x4876bc(0x1f4)+_0x5815df[_0x4876bc(0x1e0)]+').'+(_0x586ee7?WRITE_RECONCILIATION:''),![],undefined,_0x5815df['status']);if(!(_0x5815df[_0x4876bc(0x1df)][_0x4876bc(0x1c1)]('content-type')??'')['toLowerCase']()[_0x4876bc(0x1f5)](_0x4876bc(0x1c4)))throw _0x291cfc();let _0x32e0a4;try{_0x32e0a4=await _0x5815df[_0x4876bc(0x1e9)]();}catch{throw new KbManagementError('Knowledge\x20management\x20response\x20was\x20interrupted.',_0x586ee7);}let _0x5d973e;try{_0x5d973e=parseKnowledgeJson(_0x32e0a4);}catch{throw _0x291cfc();}if(!_0x5d973e||typeof _0x5d973e!=='object'||Array[_0x4876bc(0x1b5)](_0x5d973e))throw _0x291cfc();const _0x167630=_0x5d973e;if(typeof _0x167630[_0x4876bc(0x1cc)]!==_0x4876bc(0x1ef)||typeof _0x167630[_0x4876bc(0x1d4)]!==_0x4876bc(0x1b4)||!/^\d{1,8}$/['test'](_0x167630[_0x4876bc(0x1d4)])||!Object[_0x4876bc(0x1bb)](_0x167630,_0x4876bc(0x1f1))||_0x167630[_0x4876bc(0x1cc)]&&_0x167630[_0x4876bc(0x1d4)]!==_0x4876bc(0x1c2)||!_0x167630['success']&&_0x167630[_0x4876bc(0x1d4)]===_0x4876bc(0x1c2))throw _0x291cfc();if(!_0x5815df['ok']||!_0x167630[_0x4876bc(0x1cc)])throw new KbManagementError(_0x4876bc(0x1c5)+_0x5815df['status']+').'+(_0x586ee7&&_0x5815df[_0x4876bc(0x1e0)]>=0x1f4?WRITE_RECONCILIATION:''),![],_0x167630[_0x4876bc(0x1d4)],_0x5815df[_0x4876bc(0x1e0)],_0x2e354d['endsWith'](_0x4876bc(0x1d1))&&_0x5815df[_0x4876bc(0x1e0)]===0x19d&&_0x167630[_0x4876bc(0x1d4)]===_0x4876bc(0x1e6)&&_0x167630[_0x4876bc(0x1ce)]===_0x4876bc(0x1b6));if(_0x5815df['status']!==0xc8)throw _0x291cfc();return _0x167630[_0x4876bc(0x1f1)];}finally{clearTimeout(_0x5d6971);}}