@lovrabet/rabetbase-cli 2.5.12 → 2.5.13-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) 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/context.js +1 -1
  151. package/lib/commands/issue/index.js +1 -1
  152. package/lib/commands/issue/nudge.js +1 -1
  153. package/lib/commands/issue/report.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/instant-api-policy/endpoints.js +1 -1
  301. package/lib/core/kb-management-client.js +1 -1
  302. package/lib/core/kb-search-client.js +1 -1
  303. package/lib/core/page/file-system.js +1 -1
  304. package/lib/core/page/hash.js +1 -1
  305. package/lib/core/page/lock.js +1 -1
  306. package/lib/core/page/lr-smart-jsx.js +1 -1
  307. package/lib/core/sql-index-auditor.js +1 -1
  308. package/lib/core/sql-sync/config.js +1 -1
  309. package/lib/core/sql-sync/file-system.js +1 -1
  310. package/lib/core/sql-sync/hash.js +1 -1
  311. package/lib/core/sql-sync/lock.js +1 -1
  312. package/lib/core/sql-sync/utils.js +1 -1
  313. package/lib/core/sql-validator.js +1 -1
  314. package/lib/errors.js +1 -1
  315. package/lib/framework/build-all-flags.js +1 -1
  316. package/lib/framework/error-output.js +1 -1
  317. package/lib/framework/explicit-yes.js +1 -1
  318. package/lib/framework/flags.js +1 -1
  319. package/lib/framework/help.js +1 -1
  320. package/lib/framework/index.js +1 -1
  321. package/lib/framework/output.js +1 -1
  322. package/lib/framework/response.js +1 -1
  323. package/lib/framework/runner-alias.js +1 -1
  324. package/lib/framework/runner.js +1 -1
  325. package/lib/framework/schema-export.js +1 -1
  326. package/lib/framework/supported-flags.js +1 -1
  327. package/lib/framework/types.js +1 -1
  328. package/lib/generated/build-info.d.ts +4 -4
  329. package/lib/generated/build-info.js +1 -1
  330. package/lib/generated/official-routing.js +1 -1
  331. package/lib/generated/routing-contract.js +1 -1
  332. package/lib/help.js +1 -1
  333. package/lib/postinstall.js +1 -1
  334. package/lib/runtime/confirmation.js +1 -1
  335. package/lib/runtime/event.js +1 -1
  336. package/lib/runtime/index.js +1 -1
  337. package/lib/runtime/queue.js +1 -1
  338. package/lib/runtime/resolve.js +1 -1
  339. package/lib/services/dataset-design/checkpoint.js +1 -1
  340. package/lib/services/dataset-design/commands.js +1 -1
  341. package/lib/services/dataset-design/contract.js +1 -1
  342. package/lib/skills/builtin-skill.js +1 -1
  343. package/lib/skills/main.js +1 -1
  344. package/lib/skills/npx-skills-add.js +1 -1
  345. package/lib/skills/skill-presence.js +1 -1
  346. package/lib/telemetry/cli-command-trace.js +1 -1
  347. package/lib/telemetry/cli-help-trace.js +1 -1
  348. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  349. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  350. package/lib/telemetry/send-cli-trace-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/guides/custom-page-workflow.md +32 -2
  375. package/skills/rabetbase/knowledge/custom-page/generation-standards.md +106 -6
  376. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  377. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  378. package/skills/rabetbase.manifest.json +3 -3
  379. package/templates/custom-pages/blank.json +1 -1
  380. package/templates/custom-pages/dashboard.json +1 -1
@@ -1 +1 @@
1
- const a299_0x3070f7=a299_0x4beb;(function(_0x4f1bf8,_0x15b078){const _0x4e6f76=a299_0x4beb,_0x463472=_0x4f1bf8();while(!![]){try{const _0x5479f3=parseInt(_0x4e6f76(0x1bd))/0x1+-parseInt(_0x4e6f76(0x256))/0x2+-parseInt(_0x4e6f76(0x145))/0x3*(parseInt(_0x4e6f76(0x19f))/0x4)+-parseInt(_0x4e6f76(0x251))/0x5*(-parseInt(_0x4e6f76(0x159))/0x6)+-parseInt(_0x4e6f76(0x1ec))/0x7+parseInt(_0x4e6f76(0x21c))/0x8*(-parseInt(_0x4e6f76(0x12d))/0x9)+-parseInt(_0x4e6f76(0x148))/0xa*(-parseInt(_0x4e6f76(0x23a))/0xb);if(_0x5479f3===_0x15b078)break;else _0x463472['push'](_0x463472['shift']());}catch(_0x4d2345){_0x463472['push'](_0x463472['shift']());}}}(a299_0x5ab3,0x4b984));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_0x3070f7(0x1d8),'$id':a299_0x3070f7(0xec),'title':a299_0x3070f7(0x179),'type':'object','required':[a299_0x3070f7(0x139),a299_0x3070f7(0x177),'flowJson'],'$defs':{'userId':{'anyOf':[{'type':'string','minLength':0x1},{'type':a299_0x3070f7(0x252),'minimum':0x1}]},'position':{'type':a299_0x3070f7(0x16c),'required':['x','y'],'properties':{'x':{'type':'number','minimum':0x0},'y':{'type':'number','minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a299_0x3070f7(0x16c),'required':[a299_0x3070f7(0x13a),'unit'],'properties':{'value':{'type':'integer','minimum':0x1},'unit':{'enum':[a299_0x3070f7(0x1f7),a299_0x3070f7(0x1d6),a299_0x3070f7(0x114),a299_0x3070f7(0x1b0)]}},'additionalProperties':!![]},'flowNode':{'type':a299_0x3070f7(0x16c),'required':['id','type','name',a299_0x3070f7(0x18f)],'properties':{'id':{'type':a299_0x3070f7(0x1e9),'pattern':a299_0x3070f7(0x18a)},'type':{'enum':[a299_0x3070f7(0x1d9),a299_0x3070f7(0xe5),a299_0x3070f7(0x158),a299_0x3070f7(0x1a7),a299_0x3070f7(0x11c),a299_0x3070f7(0x229)]},'name':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'path':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'position':{'$ref':a299_0x3070f7(0x15d)},'approvalMode':{'enum':[a299_0x3070f7(0x1fe),a299_0x3070f7(0x1ed),'ANY']},'taskMode':{'enum':['APPROVAL',a299_0x3070f7(0x16d)]},'assignee':{'type':'object','required':[a299_0x3070f7(0x1b7)],'properties':{'strategy':{'enum':['FIXED',a299_0x3070f7(0x176)]},'userIds':{'type':'array','minItems':0x1,'items':{'$ref':a299_0x3070f7(0xe3)}},'roleId':{'anyOf':[{'type':a299_0x3070f7(0x252),'minimum':0x1},{'type':a299_0x3070f7(0x1e9),'pattern':a299_0x3070f7(0x21d)}]}},'additionalProperties':!![]},'transferCandidates':{'type':a299_0x3070f7(0x16c),'required':[a299_0x3070f7(0x1b7),a299_0x3070f7(0x1b9)],'properties':{'strategy':{'const':a299_0x3070f7(0x21b)},'userIds':{'type':a299_0x3070f7(0x226),'minItems':0x1,'items':{'$ref':a299_0x3070f7(0xe3)}}},'additionalProperties':!![]},'sequential':{'type':a299_0x3070f7(0x152)},'result':{'enum':[a299_0x3070f7(0x1e1),a299_0x3070f7(0x156)]},'scriptName':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'resultVariable':{'type':'string','pattern':a299_0x3070f7(0x18a)},'async':{'type':a299_0x3070f7(0x16c),'properties':{'enabled':{'type':a299_0x3070f7(0x152)},'retryCount':{'type':a299_0x3070f7(0x252),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a299_0x3070f7(0xdf)}},'additionalProperties':!![]},'timeout':{'type':a299_0x3070f7(0x16c),'properties':{'enabled':{'type':a299_0x3070f7(0x152)},'duration':{'$ref':a299_0x3070f7(0xdf)},'action':{'enum':[a299_0x3070f7(0x1d0),a299_0x3070f7(0x103),a299_0x3070f7(0x134)]},'interrupting':{'type':a299_0x3070f7(0x152)},'scriptName':{'type':'string','minLength':0x1},'resultVariable':{'type':'string','pattern':'^[A-Za-z_][A-Za-z0-9_]*$'}},'additionalProperties':!![]},'cc':{'type':a299_0x3070f7(0x16c),'required':[a299_0x3070f7(0x16e)],'properties':{'recipientUserIds':{'type':a299_0x3070f7(0x226),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'visible':{'type':'array','uniqueItems':!![],'items':{'type':a299_0x3070f7(0x1e9),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a299_0x3070f7(0x16c),'required':[a299_0x3070f7(0x1f9),a299_0x3070f7(0x10e)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'failurePolicy':{'enum':['CONTINUE',a299_0x3070f7(0xef)]},'template':{'type':'object','required':[a299_0x3070f7(0x14c),a299_0x3070f7(0x11d)],'properties':{'title':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'summary':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'detailMarkdown':{'type':'string'},'facts':{'type':a299_0x3070f7(0x226),'maxItems':0x8,'items':{'type':a299_0x3070f7(0x16c),'required':[a299_0x3070f7(0x118),a299_0x3070f7(0x13a)],'properties':{'label':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'value':{'type':a299_0x3070f7(0x1e9),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':'array','maxItems':0x2,'items':{'type':a299_0x3070f7(0x16c),'required':['text',a299_0x3070f7(0xe4)],'properties':{'text':{'type':'string','minLength':0x1},'url':{'type':a299_0x3070f7(0x1e9),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0x3070f7(0x226),'items':{'type':'object','required':['type',a299_0x3070f7(0x13a)],'properties':{'type':{'enum':[a299_0x3070f7(0x171),a299_0x3070f7(0x176),a299_0x3070f7(0x144)]},'value':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'role':{'enum':['TO','CC',a299_0x3070f7(0x1b2)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0x3070f7(0x16c),'properties':{'id':{'type':a299_0x3070f7(0x1e9),'pattern':a299_0x3070f7(0x18a)},'source':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'target':{'type':'string','minLength':0x1},'sourceNodeId':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'targetNodeId':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'conditionType':{'enum':['ALWAYS',a299_0x3070f7(0x1e1),a299_0x3070f7(0x156),a299_0x3070f7(0xe1)]},'expression':{'type':a299_0x3070f7(0x1e9)},'defaultFlow':{'type':a299_0x3070f7(0x152)},'name':{'type':a299_0x3070f7(0x1e9)},'waypoints':{'type':a299_0x3070f7(0x226),'items':{'$ref':a299_0x3070f7(0x15d)}}},'allOf':[{'anyOf':[{'required':['source']},{'required':[a299_0x3070f7(0x17f)]}]},{'anyOf':[{'required':['target']},{'required':['targetNodeId']}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'flowDesc':{'type':a299_0x3070f7(0x1e9)},'flowType':{'enum':[a299_0x3070f7(0x122),a299_0x3070f7(0x1b8)]},'datasetCode':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'pageId':{'type':a299_0x3070f7(0x252),'minimum':0x1,'maximum':Number[a299_0x3070f7(0x11b)]},'pageIds':{'type':a299_0x3070f7(0x226),'items':{'type':'integer','minimum':0x1,'maximum':Number[a299_0x3070f7(0x11b)]}},'templateName':![],'flowJson':{'type':a299_0x3070f7(0x16c),'required':['nodes',a299_0x3070f7(0x1c9)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a299_0x3070f7(0x1e9),'const':a299_0x3070f7(0x1a2),'description':a299_0x3070f7(0x168)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0x3070f7(0x161)},'startPageId':![],'startPath':{'type':a299_0x3070f7(0x1e9),'minLength':0x1},'nodes':{'type':a299_0x3070f7(0x226),'minItems':0x1,'items':{'$ref':'#/$defs/flowNode'}},'edges':{'type':a299_0x3070f7(0x226),'minItems':0x1,'items':{'$ref':a299_0x3070f7(0x1c5)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=['flowKey',a299_0x3070f7(0x167),a299_0x3070f7(0x139),a299_0x3070f7(0x225),a299_0x3070f7(0x1ff),a299_0x3070f7(0xd8),'pageId','templateName'],REMOVED_ROOT_FIELDS=['id',a299_0x3070f7(0xd8),a299_0x3070f7(0xe9)],DEFAULT_FLOW_SCHEMA_VERSION=a299_0x3070f7(0x1a2),NODE_TYPES=new Set([a299_0x3070f7(0x1d9),a299_0x3070f7(0xe5),a299_0x3070f7(0x158),a299_0x3070f7(0x1a7),a299_0x3070f7(0x11c),a299_0x3070f7(0x229)]),CONDITION_TYPES=new Set([a299_0x3070f7(0x20e),a299_0x3070f7(0x1e1),'REJECTED',a299_0x3070f7(0xe1)]),APPROVAL_MODES=new Set(['SINGLE',a299_0x3070f7(0x1ed),a299_0x3070f7(0x1a5)]),APPROVAL_TASK_MODES=new Set([a299_0x3070f7(0x158),a299_0x3070f7(0x16d)]),FLOW_TIME_UNITS=new Set([a299_0x3070f7(0x1f7),a299_0x3070f7(0x1d6),a299_0x3070f7(0x114),a299_0x3070f7(0x1b0)]),APPROVAL_TIMEOUT_ACTIONS=new Set(['AUTO_APPROVE','AUTO_REJECT',a299_0x3070f7(0x134)]),FLOW_TYPES=new Set([a299_0x3070f7(0x122),a299_0x3070f7(0x1b8)]),FLOW_PAGE_MODES=new Set([a299_0x3070f7(0x161),'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_0x3070f7(0x173),a299_0x3070f7(0xef)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a299_0x3070f7(0x171),a299_0x3070f7(0x176),'EMAIL']),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a299_0x3070f7(0x1b2)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a299_0x3070f7(0x1d2),UNSUPPORTED_FORM_MESSAGE=a299_0x3070f7(0x240),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a299_0x3070f7(0x211),RESERVED_RESULT_VARIABLES=new Set([a299_0x3070f7(0x10b),'approved',a299_0x3070f7(0x190),a299_0x3070f7(0xee),a299_0x3070f7(0x197),a299_0x3070f7(0x186),a299_0x3070f7(0x150),'approval_sys_pageId',a299_0x3070f7(0x188),a299_0x3070f7(0xeb)]);export function normalizeFlowConfig(_0x30c60d){const _0x1039c7=a299_0x3070f7;if(!isRecord(_0x30c60d))throw new TypeError('FlowConfig\x20must\x20be\x20a\x20JSON\x20object.');const _0x2264c2=cloneJsonValue(_0x30c60d),_0x13ae75=_0x2264c2[_0x1039c7(0xf1)],_0x47eb09=isRecord(_0x13ae75)?cloneJsonValue(_0x13ae75):{},_0x11453d=[],_0x16ae09=[];for(const _0x2de512 of REMOVED_ROOT_FIELDS){if(!Object[_0x1039c7(0x183)][_0x1039c7(0x1c0)][_0x1039c7(0x107)](_0x2264c2,_0x2de512))continue;delete _0x2264c2[_0x2de512],_0x16ae09[_0x1039c7(0x235)](_0x2de512),_0x11453d[_0x1039c7(0x235)]({'code':_0x1039c7(0x24f),'path':_0x2de512,'message':_0x2de512+_0x1039c7(0x1ea)});}for(const _0x35bc6f of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x1039c7(0x183)][_0x1039c7(0x1c0)][_0x1039c7(0x107)](_0x47eb09,_0x35bc6f))continue;const _0x532758='flowJson.'+_0x35bc6f;delete _0x47eb09[_0x35bc6f],_0x16ae09[_0x1039c7(0x235)](_0x532758),_0x11453d[_0x1039c7(0x235)]({'code':'legacy_field_removed','path':_0x532758,'message':_0x532758+_0x1039c7(0x1ea)});}if(Object['prototype'][_0x1039c7(0x1c0)][_0x1039c7(0x107)](_0x47eb09,'schemaVersion')){const _0x621c1b=_0x47eb09[_0x1039c7(0x128)],_0x2bec67=typeof _0x621c1b===_0x1039c7(0x1e9)?_0x621c1b[_0x1039c7(0xf8)]():_0x621c1b;if(isEmptyJsonValue(_0x621c1b)||_0x2bec67===DEFAULT_FLOW_SCHEMA_VERSION){const _0x5df430='flowJson.schemaVersion';delete _0x47eb09[_0x1039c7(0x128)],_0x16ae09[_0x1039c7(0x235)](_0x5df430),_0x11453d[_0x1039c7(0x235)]({'code':_0x1039c7(0x24f),'path':_0x5df430,'message':_0x5df430+_0x1039c7(0x1e2)+DEFAULT_FLOW_SCHEMA_VERSION+_0x1039c7(0xed)});}}removeEmptyMetadata(_0x47eb09,_0x1039c7(0xf1),_0x11453d,_0x16ae09);_0x2264c2['flowType']==='INDEPENDENT_FLOW'&&!Object[_0x1039c7(0x183)]['hasOwnProperty'][_0x1039c7(0x107)](_0x47eb09,_0x1039c7(0x137))&&(_0x47eb09[_0x1039c7(0x137)]=_0x1039c7(0x161));_0x2264c2[_0x1039c7(0xf1)]=_0x47eb09;if(typeof _0x2264c2['flowName']===_0x1039c7(0x1e9))_0x2264c2['flowName']=_0x2264c2[_0x1039c7(0x139)]['trim']();return{'config':_0x2264c2,'warnings':_0x11453d,'removedPaths':_0x16ae09};}export function validateFlowConfig(_0x58c632){const _0x3fec39=a299_0x3070f7;let _0x2ffade;try{_0x2ffade=normalizeFlowConfig(_0x58c632);}catch(_0x52da5e){const _0x40c229=_0x52da5e instanceof Error?_0x52da5e[_0x3fec39(0x24b)]:String(_0x52da5e),_0x1b6b43={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x40c229}],'warnings':[],'normalized':_0x1b6b43,'validationConfig':_0x1b6b43};}const _0x26b537=_0x2ffade[_0x3fec39(0x1e0)],_0x3c2c69=cloneJsonValue(_0x26b537),_0x5e9d1d=_0x3c2c69[_0x3fec39(0xf1)];_0x5e9d1d[_0x3fec39(0x1b3)]=_0x3fec39(0x221),_0x5e9d1d[_0x3fec39(0x139)]=_0x26b537[_0x3fec39(0x139)];typeof _0x26b537[_0x3fec39(0x1ff)]==='string'&&_0x26b537[_0x3fec39(0x1ff)][_0x3fec39(0xf8)]()&&(_0x5e9d1d['bindDatasetCode']=_0x26b537[_0x3fec39(0x1ff)][_0x3fec39(0xf8)]());const _0x270089=[];return validateOuterMetadata(_0x26b537,_0x270089),validateFlowClassification(_0x26b537,_0x270089),validateGraph(_0x26b537[_0x3fec39(0xf1)],_0x270089),{'valid':_0x270089[_0x3fec39(0xda)]===0x0,'errors':_0x270089,'warnings':_0x2ffade[_0x3fec39(0x224)],'normalized':_0x26b537,'validationConfig':_0x3c2c69};}function validateFlowClassification(_0x3a165b,_0x1af822){const _0x15c1ee=a299_0x3070f7;if(!isRecord(_0x3a165b[_0x15c1ee(0xf1)]))return;const _0x17d9f7=_0x3a165b['flowType'],_0x52c576=_0x3a165b[_0x15c1ee(0xf1)][_0x15c1ee(0x137)];_0x52c576!==undefined&&(typeof _0x52c576!==_0x15c1ee(0x1e9)||!FLOW_PAGE_MODES[_0x15c1ee(0x196)](_0x52c576))&&_0x1af822['push']({'path':_0x15c1ee(0x1da),'message':_0x15c1ee(0x13d)+String(_0x52c576)+'.'});_0x17d9f7==='FORM_FLOW'&&_0x52c576!==undefined&&_0x1af822[_0x15c1ee(0x235)]({'path':'flowJson.pageMode','message':_0x15c1ee(0xde)});_0x17d9f7==='INDEPENDENT_FLOW'&&_0x52c576==='PLATFORM_FORM'&&_0x1af822['push']({'path':_0x15c1ee(0x1da),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x17d9f7===_0x15c1ee(0x122)||_0x17d9f7===_0x15c1ee(0x1b8))&&validateCustomPageNavigation(_0x3a165b,_0x17d9f7,_0x52c576,_0x1af822);if(_0x17d9f7!==_0x15c1ee(0x122)||!Array[_0x15c1ee(0x136)](_0x3a165b['flowJson']['nodes']))return;_0x3a165b[_0x15c1ee(0xf1)]['nodes'][_0x15c1ee(0x17b)]((_0x1f367f,_0x30df45)=>{const _0x11c95f=_0x15c1ee;isRecord(_0x1f367f)&&_0x1f367f[_0x11c95f(0x222)]===_0x11c95f(0x158)&&_0x1f367f['taskMode']===_0x11c95f(0x16d)&&_0x1af822[_0x11c95f(0x235)]({'path':'flowJson.nodes['+_0x30df45+_0x11c95f(0x162),'message':_0x11c95f(0x1ee)});});}function validateCustomPageNavigation(_0x2e9fa3,_0x2c8c0b,_0xd9c7aa,_0x491711){const _0x50980f=a299_0x3070f7,_0x55319d=_0x2e9fa3[_0x50980f(0xf1)][_0x50980f(0x143)];_0x55319d!==undefined&&_0x491711[_0x50980f(0x235)]({'path':'flowJson.startPageId','message':_0x50980f(0x178)});const _0x51a5e3=_0x2e9fa3['flowJson'][_0x50980f(0x1dc)];_0x51a5e3!==undefined&&(typeof _0x51a5e3!==_0x50980f(0x1e9)||_0x51a5e3[_0x50980f(0xf8)]()==='')&&_0x491711[_0x50980f(0x235)]({'path':_0x50980f(0x234),'message':_0x50980f(0x13b)});const _0x6f6a36=Array[_0x50980f(0x136)](_0x2e9fa3[_0x50980f(0xf1)][_0x50980f(0x244)])?_0x2e9fa3[_0x50980f(0xf1)][_0x50980f(0x244)][_0x50980f(0x200)]((_0x8d198b,_0x3dbfee)=>({'node':_0x8d198b,'index':_0x3dbfee}))['filter'](({node:_0x5bbb37})=>isRecord(_0x5bbb37)&&_0x5bbb37[_0x50980f(0x246)]!==undefined):[],_0x318b86=_0x51a5e3!==undefined||_0x6f6a36[_0x50980f(0xda)]>0x0,_0xe793b5=_0xd9c7aa===undefined&&_0x2c8c0b===_0x50980f(0x1b8)?_0x50980f(0x161):_0xd9c7aa;_0x318b86&&(_0x2c8c0b!==_0x50980f(0x1b8)||_0xe793b5!==_0x50980f(0x161))&&(_0x51a5e3!==undefined&&_0x491711[_0x50980f(0x235)]({'path':'flowJson.startPath','message':_0x50980f(0x1c2)}),_0x6f6a36[_0x50980f(0x17b)](({index:_0x5397c5})=>{const _0x368543=_0x50980f;_0x491711['push']({'path':'flowJson.nodes['+_0x5397c5+_0x368543(0x1cb),'message':'node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'});}));}export async function writeNormalizedFlowConfig(_0x2423a2,_0xf292bd,_0x25e298={}){const _0x1ffbd5=a299_0x3070f7,_0x555dc6=resolve(_0x2423a2),_0x24b449=_0x555dc6+'.'+process[_0x1ffbd5(0x16a)]+'.'+randomUUID()+_0x1ffbd5(0x18d),_0x2c32aa=JSON[_0x1ffbd5(0x247)](_0xf292bd,null,0x2)+'\x0a';let _0x4f8287;try{try{_0x4f8287=(await stat(_0x555dc6))[_0x1ffbd5(0x24a)]&0x1ff;}catch{_0x4f8287=undefined;}await writeFile(_0x24b449,_0x2c32aa,{'encoding':_0x1ffbd5(0x16f),'flag':'wx','mode':_0x4f8287??0x1a4});if(_0x4f8287!==undefined)await chmod(_0x24b449,_0x4f8287);_0x25e298['overwrite']===![]?(await link(_0x24b449,_0x555dc6),await unlink(_0x24b449)):await rename(_0x24b449,_0x555dc6);}finally{await unlink(_0x24b449)[_0x1ffbd5(0x13f)](()=>undefined);}}function validateOuterMetadata(_0x12b023,_0x361cd3){const _0x422e51=a299_0x3070f7;(typeof _0x12b023[_0x422e51(0x139)]!==_0x422e51(0x1e9)||_0x12b023[_0x422e51(0x139)]['trim']()==='')&&_0x361cd3[_0x422e51(0x235)]({'path':_0x422e51(0x139),'message':_0x422e51(0x1c8)});_0x12b023[_0x422e51(0x170)]!==undefined&&typeof _0x12b023[_0x422e51(0x170)]!==_0x422e51(0x1e9)&&_0x361cd3[_0x422e51(0x235)]({'path':_0x422e51(0x170),'message':_0x422e51(0x248)});if(_0x12b023['flowType']===undefined||_0x12b023[_0x422e51(0x177)]===null)_0x361cd3[_0x422e51(0x235)]({'path':'flowType','message':'flowType\x20is\x20required.'});else(typeof _0x12b023[_0x422e51(0x177)]!==_0x422e51(0x1e9)||!FLOW_TYPES['has'](_0x12b023[_0x422e51(0x177)]))&&_0x361cd3[_0x422e51(0x235)]({'path':_0x422e51(0x177),'message':_0x422e51(0x207)+String(_0x12b023[_0x422e51(0x177)])+'.'});_0x12b023['datasetCode']!==undefined&&typeof _0x12b023['datasetCode']!==_0x422e51(0x1e9)&&_0x361cd3['push']({'path':'datasetCode','message':_0x422e51(0x174)});_0x12b023[_0x422e51(0x1df)]===undefined&&_0x12b023[_0x422e51(0xf3)]!==undefined&&(!Number[_0x422e51(0x209)](_0x12b023[_0x422e51(0xf3)])||_0x12b023[_0x422e51(0xf3)]<=0x0)&&_0x361cd3[_0x422e51(0x235)]({'path':_0x422e51(0xf3),'message':_0x422e51(0x202)});if(_0x12b023['pageIds']!==undefined){if(!Array[_0x422e51(0x136)](_0x12b023[_0x422e51(0x1df)])||_0x12b023[_0x422e51(0x1df)][_0x422e51(0x23c)](_0x1853c5=>!Number[_0x422e51(0x209)](_0x1853c5)||_0x1853c5<=0x0))_0x361cd3[_0x422e51(0x235)]({'path':_0x422e51(0x1df),'message':_0x422e51(0x165)});else[...new Set(_0x12b023[_0x422e51(0x1df)])][_0x422e51(0x228)](',')['length']>0x800&&_0x361cd3['push']({'path':_0x422e51(0x1df),'message':_0x422e51(0x18e)});_0x12b023['flowType']===_0x422e51(0x1b8)&&Array[_0x422e51(0x136)](_0x12b023['pageIds'])&&_0x12b023[_0x422e51(0x1df)][_0x422e51(0xda)]>0x0&&_0x361cd3[_0x422e51(0x235)]({'path':'pageIds','message':_0x422e51(0x116)});}_0x12b023[_0x422e51(0x177)]===_0x422e51(0x1b8)&&_0x12b023[_0x422e51(0x1ff)]!==undefined&&_0x361cd3[_0x422e51(0x235)]({'path':_0x422e51(0x1ff),'message':_0x422e51(0x20b)}),_0x12b023[_0x422e51(0x177)]===_0x422e51(0x1b8)&&_0x12b023[_0x422e51(0x1df)]===undefined&&_0x12b023[_0x422e51(0xf3)]!==undefined&&_0x361cd3['push']({'path':_0x422e51(0xf3),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.'});}function validateGraph(_0xc00ea2,_0x1a0b1){const _0x528662=a299_0x3070f7;if(!isRecord(_0xc00ea2)){_0x1a0b1[_0x528662(0x235)]({'path':_0x528662(0xf1),'message':_0x528662(0x146)});return;}!Array[_0x528662(0x136)](_0xc00ea2[_0x528662(0x244)])&&_0x1a0b1[_0x528662(0x235)]({'path':_0x528662(0x1ac),'message':_0x528662(0x23d)});!Array[_0x528662(0x136)](_0xc00ea2['edges'])&&_0x1a0b1[_0x528662(0x235)]({'path':'flowJson.edges','message':'edges\x20must\x20be\x20an\x20array.'});Object[_0x528662(0x183)]['hasOwnProperty'][_0x528662(0x107)](_0xc00ea2,_0x528662(0x128))&&_0x1a0b1[_0x528662(0x235)]({'path':_0x528662(0x10d),'message':_0x528662(0x193)+String(_0xc00ea2[_0x528662(0x128)])+_0x528662(0x1b6)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x1cb39f of[_0x528662(0x22a),'formDefinitions',_0x528662(0x189)]){Object['prototype'][_0x528662(0x1c0)][_0x528662(0x107)](_0xc00ea2,_0x1cb39f)&&_0x1a0b1['push']({'path':_0x528662(0x141)+_0x1cb39f,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array['isArray'](_0xc00ea2[_0x528662(0x244)])||!Array[_0x528662(0x136)](_0xc00ea2[_0x528662(0x1c9)]))return;const _0x1b8653=new Map(),_0xaa21cd=[],_0x32ca85=[],_0x1b6e62=new Map(),_0x5b6d0b=new Map(),_0x1d20c7=new Set();let _0x665887=0x0;_0xc00ea2[_0x528662(0x244)][_0x528662(0x17b)]((_0x553490,_0x47b72b)=>{const _0x48fc85=_0x528662,_0x331161=_0x48fc85(0xf7)+_0x47b72b+']';if(!isRecord(_0x553490)){_0x1a0b1[_0x48fc85(0x235)]({'path':_0x331161,'message':_0x48fc85(0xe8)});return;}const _0x58bfbe=_0x553490;if(typeof _0x58bfbe['id']!==_0x48fc85(0x1e9)||!BPMN_ID_PATTERN[_0x48fc85(0x129)](_0x58bfbe['id']))_0x1a0b1[_0x48fc85(0x235)]({'path':_0x331161+'.id','message':_0x48fc85(0x13c)});else _0x1b8653[_0x48fc85(0x196)](_0x58bfbe['id'])?_0x1a0b1['push']({'path':_0x331161+_0x48fc85(0x22e),'message':_0x48fc85(0x253)+_0x58bfbe['id']+'.'}):(_0x1b8653[_0x48fc85(0x1ab)](_0x58bfbe['id'],_0x58bfbe),_0x1d20c7[_0x48fc85(0x1be)](_0x58bfbe['id']));if(!NODE_TYPES[_0x48fc85(0x196)](_0x58bfbe[_0x48fc85(0x222)]))_0x1a0b1[_0x48fc85(0x235)]({'path':_0x331161+_0x48fc85(0x1d5),'message':_0x48fc85(0xf9)+String(_0x58bfbe[_0x48fc85(0x222)])+'.'});else{if(_0x58bfbe[_0x48fc85(0x222)]==='START')_0xaa21cd[_0x48fc85(0x235)](_0x58bfbe['id']);else _0x58bfbe['type']===_0x48fc85(0xe5)&&_0x32ca85['push'](_0x58bfbe['id']);}_0x58bfbe[_0x48fc85(0x222)]===_0x48fc85(0x158)&&(_0x58bfbe['taskMode']===undefined||_0x58bfbe[_0x48fc85(0x1dd)]===_0x48fc85(0x158))&&(_0x665887+=0x1);validateNode(_0x58bfbe,_0x331161,_0x1a0b1);if(_0x58bfbe['type']===_0x48fc85(0x11c)){const _0xfdad78=resolveEffectiveResultVariable(_0x58bfbe[_0x48fc85(0x124)],![]);_0xfdad78&&(registerResultVariableOwner(_0x5b6d0b,_0xfdad78,_0x58bfbe['id'],_0x1a0b1),!_0x1b6e62[_0x48fc85(0x196)](_0xfdad78)&&_0x1b6e62[_0x48fc85(0x1ab)](_0xfdad78,_0x58bfbe['id']));}if(_0x58bfbe['type']===_0x48fc85(0x158)&&isRecord(_0x58bfbe[_0x48fc85(0x191)])&&_0x58bfbe[_0x48fc85(0x191)][_0x48fc85(0x1e8)]===!![]&&_0x58bfbe[_0x48fc85(0x191)][_0x48fc85(0x220)]===_0x48fc85(0x134)){const _0x2b7bb7=resolveEffectiveResultVariable(_0x58bfbe['timeout'][_0x48fc85(0x124)],!![]);_0x2b7bb7&&registerResultVariableOwner(_0x5b6d0b,_0x2b7bb7,_0x58bfbe['id']+_0x48fc85(0x241),_0x1a0b1);}});_0xaa21cd[_0x528662(0xda)]!==0x1&&_0x1a0b1[_0x528662(0x235)]({'path':'flowJson.nodes','message':_0x528662(0x131)});_0x32ca85[_0x528662(0xda)]===0x0&&_0x1a0b1[_0x528662(0x235)]({'path':_0x528662(0x1ac),'message':_0x528662(0x1a3)});const _0x52c8b=new Map(),_0x30aaac=new Map(),_0x1fa19e=new Map(),_0x332a5a=new Set();_0xc00ea2[_0x528662(0x1c9)][_0x528662(0x17b)]((_0x3a6aba,_0x28c238)=>{const _0x66ab65=_0x528662,_0x43f97d=_0x66ab65(0x1c6)+_0x28c238+']';if(!isRecord(_0x3a6aba)){_0x1a0b1['push']({'path':_0x43f97d,'message':'edge\x20must\x20be\x20an\x20object.'});return;}const _0x42f0b8=_0x3a6aba;_0x1fa19e['set'](_0x42f0b8,_0x43f97d);const _0x2a3e76=resolveEdgeEndpoint(_0x42f0b8['source'],_0x42f0b8['sourceNodeId']),_0x20a48b=resolveEdgeEndpoint(_0x42f0b8['target'],_0x42f0b8[_0x66ab65(0x106)]);if(!_0x2a3e76)_0x1a0b1[_0x66ab65(0x235)]({'path':_0x43f97d+_0x66ab65(0x216),'message':_0x66ab65(0x19b)});if(!_0x20a48b)_0x1a0b1[_0x66ab65(0x235)]({'path':_0x43f97d+_0x66ab65(0x175),'message':_0x66ab65(0x10a)});_0x2a3e76&&!_0x1b8653[_0x66ab65(0x196)](_0x2a3e76)&&_0x1a0b1['push']({'path':_0x43f97d+_0x66ab65(0x216),'message':_0x66ab65(0x10f)+_0x2a3e76+'.'});_0x20a48b&&!_0x1b8653[_0x66ab65(0x196)](_0x20a48b)&&_0x1a0b1[_0x66ab65(0x235)]({'path':_0x43f97d+_0x66ab65(0x175),'message':_0x66ab65(0x1cf)+_0x20a48b+'.'});if(_0x42f0b8['id']!==undefined){if(typeof _0x42f0b8['id']!==_0x66ab65(0x1e9)||!BPMN_ID_PATTERN[_0x66ab65(0x129)](_0x42f0b8['id']))_0x1a0b1[_0x66ab65(0x235)]({'path':_0x43f97d+_0x66ab65(0x22e),'message':_0x66ab65(0x245)});else{if(_0x1d20c7['has'](_0x42f0b8['id']))_0x1a0b1[_0x66ab65(0x235)]({'path':_0x43f97d+_0x66ab65(0x22e),'message':_0x66ab65(0x1af)+_0x42f0b8['id']+'.'});else!_0x1d20c7[_0x66ab65(0x196)](_0x42f0b8['id'])&&_0x1d20c7[_0x66ab65(0x1be)](_0x42f0b8['id']);}}if(_0x2a3e76&&_0x20a48b){const _0x263d19=_0x2a3e76+'\x00'+_0x20a48b+'\x00'+(_0x42f0b8[_0x66ab65(0x20d)]??_0x66ab65(0x20e));_0x332a5a[_0x66ab65(0x196)](_0x263d19)?_0x1a0b1[_0x66ab65(0x235)]({'path':_0x43f97d,'message':_0x66ab65(0x172)+_0x2a3e76+_0x66ab65(0x210)+_0x20a48b+'\x20('+(_0x42f0b8[_0x66ab65(0x20d)]??'ALWAYS')+').'}):_0x332a5a[_0x66ab65(0x1be)](_0x263d19);}validateEdge(_0x42f0b8,_0x43f97d,_0x1a0b1),_0x2a3e76&&_0x20a48b&&(_0x52c8b['get'](_0x2a3e76)?.[_0x66ab65(0x235)](_0x42f0b8)??_0x52c8b[_0x66ab65(0x1ab)](_0x2a3e76,[_0x42f0b8]),_0x30aaac[_0x66ab65(0x194)](_0x20a48b)?.[_0x66ab65(0x235)](_0x42f0b8)??_0x30aaac[_0x66ab65(0x1ab)](_0x20a48b,[_0x42f0b8]));});if(_0xaa21cd['length']!==0x1)return;validateGraphShape(_0x1b8653,_0xaa21cd[0x0],_0x32ca85,_0x52c8b,_0x30aaac,_0x1fa19e,_0x1a0b1),validateScriptResultReferences(_0x1b8653,_0xaa21cd[0x0],_0x52c8b,_0x30aaac,_0x1fa19e,_0x1b6e62,_0x1a0b1),validateApprovalResults(_0x1b8653,_0x665887,_0x32ca85,_0x1a0b1);}function validateNode(_0x19c843,_0x13f39a,_0x3d4dcb){const _0x5477cb=a299_0x3070f7;for(const _0x4cb2d9 of[_0x5477cb(0x239),'formPermission']){Object[_0x5477cb(0x183)]['hasOwnProperty']['call'](_0x19c843,_0x4cb2d9)&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+'.'+_0x4cb2d9,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x5477cb(0x196)](_0x19c843['type']))return;(typeof _0x19c843[_0x5477cb(0x215)]!==_0x5477cb(0x1e9)||_0x19c843[_0x5477cb(0x215)][_0x5477cb(0xf8)]()==='')&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x198),'message':_0x5477cb(0x155)});_0x19c843[_0x5477cb(0xf3)]!==undefined&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x199),'message':_0x5477cb(0x250)});if(_0x19c843[_0x5477cb(0x246)]!==undefined){if(typeof _0x19c843[_0x5477cb(0x246)]!==_0x5477cb(0x1e9)||_0x19c843[_0x5477cb(0x246)]['trim']()==='')_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x1a8),'message':_0x5477cb(0x108)});else _0x19c843[_0x5477cb(0x222)]!==_0x5477cb(0x158)&&_0x19c843['type']!==_0x5477cb(0xe5)&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x1a8),'message':_0x5477cb(0x19d)});}const _0xa66147=_0x19c843[_0x5477cb(0x18f)];if(!isRecord(_0xa66147))_0x3d4dcb['push']({'path':_0x13f39a+_0x5477cb(0x14e),'message':_0x5477cb(0x1ce)});else for(const _0xbf13e2 of['x','y']){const _0x404b01=_0xa66147[_0xbf13e2];(typeof _0x404b01!==_0x5477cb(0x125)||!Number['isFinite'](_0x404b01)||_0x404b01<0x0)&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x1e5)+_0xbf13e2,'message':_0x5477cb(0x1eb)+_0xbf13e2+_0x5477cb(0x11f)});}if(_0x19c843[_0x5477cb(0x222)]===_0x5477cb(0x158)){const _0x503834=_0x19c843['approvalMode']??_0x5477cb(0x1fe),_0x142d7a=_0x19c843[_0x5477cb(0x1dd)]??_0x5477cb(0x158);!APPROVAL_TASK_MODES[_0x5477cb(0x196)](_0x142d7a)&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x132),'message':'Unsupported\x20task\x20mode:\x20'+String(_0x142d7a)+'.'});!APPROVAL_MODES['has'](_0x503834)&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x147),'message':_0x5477cb(0xfd)+String(_0x503834)+'.'});if(!isRecord(_0x19c843[_0x5477cb(0x12c)]))_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x151),'message':_0x5477cb(0x16b)});else{const _0x34f07d=_0x19c843[_0x5477cb(0x12c)][_0x5477cb(0x1b7)];_0x34f07d!==_0x5477cb(0x21b)&&_0x34f07d!==_0x5477cb(0x176)&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x21e),'message':_0x5477cb(0x1d7)});if(_0x34f07d===_0x5477cb(0x21b)){const _0x235578=_0x19c843['assignee'][_0x5477cb(0x1b9)];if(!Array[_0x5477cb(0x136)](_0x235578)||_0x235578['length']===0x0)_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x24e),'message':_0x5477cb(0x22f)});else{const _0x5d4be0=_0x235578[_0x5477cb(0x169)](_0x4396aa=>!isValidUserId(_0x4396aa));_0x5d4be0>=0x0&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x102)+_0x5d4be0+']','message':_0x5477cb(0x126)});const _0x15483d=new Set(_0x235578[_0x5477cb(0x1aa)](isValidUserId)[_0x5477cb(0x200)](_0x1e054e=>String(_0x1e054e)[_0x5477cb(0xf8)]()));_0x503834===_0x5477cb(0x1fe)&&_0x15483d[_0x5477cb(0x138)]>0x1&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x24e),'message':_0x5477cb(0xd9)});}}if(_0x34f07d===_0x5477cb(0x176)){const _0x5a5ef2=_0x19c843[_0x5477cb(0x12c)][_0x5477cb(0x1fb)],_0x56d5ce=typeof _0x5a5ef2===_0x5477cb(0x125)||typeof _0x5a5ef2===_0x5477cb(0x1e9)?Number(String(_0x5a5ef2)['trim']()):Number['NaN'];(!Number['isSafeInteger'](_0x56d5ce)||_0x56d5ce<=0x0)&&_0x3d4dcb['push']({'path':_0x13f39a+_0x5477cb(0x237),'message':_0x5477cb(0x18c)});}}if(_0x19c843[_0x5477cb(0x204)]!==undefined){if(!isRecord(_0x19c843[_0x5477cb(0x204)]))_0x3d4dcb['push']({'path':_0x13f39a+'.transferCandidates','message':_0x5477cb(0x187)});else{if(_0x19c843[_0x5477cb(0x204)][_0x5477cb(0x1b7)]!==_0x5477cb(0x21b))_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x19c),'message':_0x5477cb(0x117)});else{const _0x2b1566=_0x19c843['transferCandidates'][_0x5477cb(0x1b9)];if(!Array[_0x5477cb(0x136)](_0x2b1566)||_0x2b1566['length']===0x0)_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x133),'message':'FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.'});else{const _0x3be130=_0x2b1566[_0x5477cb(0x169)](_0xec56b0=>!isValidUserId(_0xec56b0));_0x3be130>=0x0&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x205)+_0x3be130+']','message':_0x5477cb(0x195)});}}}}}_0x19c843['sequential']!==undefined&&typeof _0x19c843['sequential']!=='boolean'&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x1e7),'message':'sequential\x20must\x20be\x20a\x20boolean.'});if(_0x19c843['type']==='SCRIPT'){(typeof _0x19c843[_0x5477cb(0xdc)]!==_0x5477cb(0x1e9)||_0x19c843[_0x5477cb(0xdc)][_0x5477cb(0xf8)]()==='')&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x12e),'message':_0x5477cb(0x1f0)});if(_0x19c843[_0x5477cb(0x124)]!==undefined){if(typeof _0x19c843[_0x5477cb(0x124)]!==_0x5477cb(0x1e9)||!VARIABLE_PATTERN[_0x5477cb(0x129)](_0x19c843[_0x5477cb(0x124)]))_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+'.resultVariable','message':_0x5477cb(0x1f4)});else(RESERVED_RESULT_VARIABLES[_0x5477cb(0x196)](_0x19c843[_0x5477cb(0x124)])||_0x19c843['resultVariable'][_0x5477cb(0x218)](_0x5477cb(0x1ad)))&&_0x3d4dcb[_0x5477cb(0x235)]({'path':_0x13f39a+_0x5477cb(0x121),'message':'Reserved\x20resultVariable:\x20'+_0x19c843[_0x5477cb(0x124)]+'.'});}}validateAsyncExecution(_0x19c843,_0x13f39a,_0x3d4dcb),validateApprovalTimeout(_0x19c843,_0x13f39a,_0x3d4dcb),validateCcConfig(_0x19c843,_0x13f39a,_0x3d4dcb),_0x19c843[_0x5477cb(0x222)]===_0x5477cb(0x229)&&validateNotificationConfig(_0x19c843['config'],_0x13f39a+_0x5477cb(0x1e6),_0x3d4dcb);}function validateAsyncExecution(_0x3f4be0,_0x905a0c,_0x5b9fc3){const _0x5c11b5=a299_0x3070f7;if(_0x3f4be0['async']===undefined)return;if(!isRecord(_0x3f4be0[_0x5c11b5(0x242)])){_0x5b9fc3['push']({'path':_0x905a0c+_0x5c11b5(0x1b4),'message':_0x5c11b5(0x1f6)});return;}if(_0x3f4be0[_0x5c11b5(0x242)][_0x5c11b5(0x1e8)]!==undefined&&typeof _0x3f4be0[_0x5c11b5(0x242)][_0x5c11b5(0x1e8)]!==_0x5c11b5(0x152)){_0x5b9fc3[_0x5c11b5(0x235)]({'path':_0x905a0c+'.async.enabled','message':_0x5c11b5(0x105)});return;}if(_0x3f4be0[_0x5c11b5(0x242)][_0x5c11b5(0x1e8)]!==!![])return;_0x3f4be0['type']!==_0x5c11b5(0x11c)&&_0x5b9fc3[_0x5c11b5(0x235)]({'path':_0x905a0c+_0x5c11b5(0x1b4),'message':_0x5c11b5(0xfa)});const _0xc2e22e=_0x3f4be0[_0x5c11b5(0x242)][_0x5c11b5(0x115)]??0x3;(!Number['isInteger'](_0xc2e22e)||_0xc2e22e<0x1||_0xc2e22e>MAX_ASYNC_RETRY_COUNT)&&_0x5b9fc3['push']({'path':_0x905a0c+_0x5c11b5(0xe2),'message':_0x5c11b5(0x1db)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x3f4be0['async']['retryInterval']!==undefined&&validateTimeAmount(_0x3f4be0[_0x5c11b5(0x242)][_0x5c11b5(0xe6)],_0x905a0c+_0x5c11b5(0x15f),_0x5b9fc3);}function validateApprovalTimeout(_0x677c40,_0x1392ea,_0x5a9025){const _0x490ba6=a299_0x3070f7;if(_0x677c40[_0x490ba6(0x191)]===undefined)return;if(!isRecord(_0x677c40[_0x490ba6(0x191)])){_0x5a9025[_0x490ba6(0x235)]({'path':_0x1392ea+_0x490ba6(0x241),'message':_0x490ba6(0x19a)});return;}if(_0x677c40[_0x490ba6(0x191)][_0x490ba6(0x1e8)]!==undefined&&typeof _0x677c40[_0x490ba6(0x191)][_0x490ba6(0x1e8)]!=='boolean'){_0x5a9025['push']({'path':_0x1392ea+_0x490ba6(0x22c),'message':_0x490ba6(0x257)});return;}if(_0x677c40['timeout'][_0x490ba6(0x1e8)]!==!![])return;if(_0x677c40[_0x490ba6(0x191)][_0x490ba6(0x1ca)]!==undefined&&typeof _0x677c40['timeout'][_0x490ba6(0x1ca)]!==_0x490ba6(0x152)){_0x5a9025[_0x490ba6(0x235)]({'path':_0x1392ea+'.timeout.interrupting','message':_0x490ba6(0x1a6)});return;}_0x677c40[_0x490ba6(0x222)]!==_0x490ba6(0x158)&&_0x5a9025['push']({'path':_0x1392ea+_0x490ba6(0x241),'message':_0x490ba6(0x1a4)});validateTimeAmount(_0x677c40['timeout']['duration'],_0x1392ea+'.timeout.duration',_0x5a9025);const _0x2c2dd8=_0x677c40[_0x490ba6(0x191)]['action'];if(!APPROVAL_TIMEOUT_ACTIONS[_0x490ba6(0x196)](_0x2c2dd8)){_0x5a9025['push']({'path':_0x1392ea+_0x490ba6(0x12a),'message':_0x490ba6(0x130)});return;}(_0x677c40[_0x490ba6(0x1dd)]??_0x490ba6(0x158))==='HANDLE'&&_0x2c2dd8!==_0x490ba6(0x134)&&_0x5a9025['push']({'path':_0x1392ea+_0x490ba6(0x12a),'message':_0x490ba6(0x1c1)});const _0x1b1af5=_0x677c40['timeout'][_0x490ba6(0x1ca)]??_0x2c2dd8!==_0x490ba6(0x134);if(_0x2c2dd8==='EXECUTE_BFF')_0x1b1af5&&_0x5a9025[_0x490ba6(0x235)]({'path':_0x1392ea+_0x490ba6(0x11a),'message':_0x490ba6(0x23f)}),(typeof _0x677c40[_0x490ba6(0x191)][_0x490ba6(0xdc)]!=='string'||_0x677c40[_0x490ba6(0x191)]['scriptName'][_0x490ba6(0xf8)]()==='')&&_0x5a9025[_0x490ba6(0x235)]({'path':_0x1392ea+_0x490ba6(0x17d),'message':_0x490ba6(0x1a9)}),validateOptionalResultVariable(_0x677c40['timeout'][_0x490ba6(0x124)],_0x1392ea+_0x490ba6(0x254),_0x5a9025);else!_0x1b1af5&&_0x5a9025[_0x490ba6(0x235)]({'path':_0x1392ea+_0x490ba6(0x11a),'message':_0x2c2dd8+_0x490ba6(0x1cc)});}function validateTimeAmount(_0x543b78,_0x389a2a,_0x1d9fd2){const _0x3e07ae=a299_0x3070f7;if(!isRecord(_0x543b78)){_0x1d9fd2[_0x3e07ae(0x235)]({'path':_0x389a2a,'message':_0x3e07ae(0x232)});return;}(!Number[_0x3e07ae(0x101)](_0x543b78[_0x3e07ae(0x13a)])||Number(_0x543b78[_0x3e07ae(0x13a)])<=0x0)&&_0x1d9fd2['push']({'path':_0x389a2a+'.value','message':'duration\x20value\x20must\x20be\x20a\x20positive\x20integer.'}),!FLOW_TIME_UNITS[_0x3e07ae(0x196)](_0x543b78['unit'])&&_0x1d9fd2[_0x3e07ae(0x235)]({'path':_0x389a2a+_0x3e07ae(0x236),'message':_0x3e07ae(0x22b)});}function validateOptionalResultVariable(_0x5d0d6d,_0x295afe,_0x1b5882){const _0x739991=a299_0x3070f7;if(_0x5d0d6d===undefined||_0x5d0d6d===null||_0x5d0d6d==='')return;if(typeof _0x5d0d6d!=='string'||!VARIABLE_PATTERN[_0x739991(0x129)](_0x5d0d6d))_0x1b5882[_0x739991(0x235)]({'path':_0x295afe,'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x739991(0x196)](_0x5d0d6d)||_0x5d0d6d['startsWith'](_0x739991(0x1ad)))&&_0x1b5882[_0x739991(0x235)]({'path':_0x295afe,'message':_0x739991(0xfc)+_0x5d0d6d+'.'});}function validateCcConfig(_0x236dbd,_0x1ebc1d,_0x17be0b){const _0x259c24=a299_0x3070f7;if(_0x236dbd['cc']===undefined)return;if(!isRecord(_0x236dbd['cc'])){_0x17be0b[_0x259c24(0x235)]({'path':_0x1ebc1d+_0x259c24(0x213),'message':_0x259c24(0x1fa)});return;}_0x236dbd[_0x259c24(0x222)]!=='END'&&_0x236dbd['type']!=='APPROVAL'&&_0x17be0b[_0x259c24(0x235)]({'path':_0x1ebc1d+_0x259c24(0x213),'message':_0x259c24(0x1de)});Object[_0x259c24(0x183)][_0x259c24(0x1c0)]['call'](_0x236dbd['cc'],_0x259c24(0x185))&&_0x17be0b[_0x259c24(0x235)]({'path':_0x1ebc1d+_0x259c24(0xfe),'message':UNSUPPORTED_FORM_MESSAGE});const _0x1932b4=_0x236dbd['cc'][_0x259c24(0x16e)];if(!Array[_0x259c24(0x136)](_0x1932b4)||_0x1932b4[_0x259c24(0xda)]===0x0)_0x17be0b[_0x259c24(0x235)]({'path':_0x1ebc1d+_0x259c24(0x1b1),'message':'cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.'});else{_0x1932b4[_0x259c24(0xda)]>MAX_CC_RECIPIENTS&&_0x17be0b[_0x259c24(0x235)]({'path':_0x1ebc1d+'.cc.recipientUserIds','message':_0x259c24(0x214)+MAX_CC_RECIPIENTS+_0x259c24(0x1f3)});const _0x206b5b=new Set();_0x1932b4[_0x259c24(0x17b)]((_0x2d0102,_0x2e6773)=>{const _0x42f9d2=_0x259c24;if(typeof _0x2d0102!=='string'||_0x2d0102['trim']()==='')_0x17be0b[_0x42f9d2(0x235)]({'path':_0x1ebc1d+'.cc.recipientUserIds['+_0x2e6773+']','message':'cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x206b5b[_0x42f9d2(0x196)](_0x2d0102[_0x42f9d2(0xf8)]())?_0x17be0b[_0x42f9d2(0x235)]({'path':_0x1ebc1d+_0x42f9d2(0x1fd)+_0x2e6773+']','message':_0x42f9d2(0xfb)+_0x2d0102['trim']()+'.'}):_0x206b5b[_0x42f9d2(0x1be)](_0x2d0102[_0x42f9d2(0xf8)]());});}validateStringArray(_0x236dbd['cc'][_0x259c24(0x100)],_0x1ebc1d+_0x259c24(0x15c),_0x17be0b);}function validateStringArray(_0x3062ea,_0x1f9326,_0x1cf06c){const _0x1478aa=a299_0x3070f7;if(_0x3062ea===undefined)return;if(!Array[_0x1478aa(0x136)](_0x3062ea)){_0x1cf06c[_0x1478aa(0x235)]({'path':_0x1f9326,'message':_0x1478aa(0x1fc)});return;}const _0x47f846=new Set();_0x3062ea['forEach']((_0x238fe6,_0xffdd04)=>{const _0x15c5e7=_0x1478aa;if(typeof _0x238fe6!=='string'||_0x238fe6['trim']()==='')_0x1cf06c['push']({'path':_0x1f9326+'['+_0xffdd04+']','message':_0x15c5e7(0x181)});else _0x47f846[_0x15c5e7(0x196)](_0x238fe6[_0x15c5e7(0xf8)]())?_0x1cf06c['push']({'path':_0x1f9326+'['+_0xffdd04+']','message':'Duplicate\x20value:\x20'+_0x238fe6[_0x15c5e7(0xf8)]()+'.'}):_0x47f846['add'](_0x238fe6['trim']());});}function validateNotificationConfig(_0x4b8bc4,_0x1262fd,_0x2f9e85){const _0x491e6d=a299_0x3070f7;if(!isRecord(_0x4b8bc4)){_0x2f9e85['push']({'path':_0x1262fd,'message':_0x491e6d(0x13e)});return;}if(_0x4b8bc4[_0x491e6d(0x119)]!==undefined&&_0x4b8bc4[_0x491e6d(0x119)]!==null){if(typeof _0x4b8bc4[_0x491e6d(0x119)]!=='string')_0x2f9e85['push']({'path':_0x1262fd+'.version','message':_0x491e6d(0x154)});else _0x4b8bc4[_0x491e6d(0x119)][_0x491e6d(0xf8)]()&&_0x4b8bc4[_0x491e6d(0x119)][_0x491e6d(0xf8)]()!=='v1'&&_0x2f9e85['push']({'path':_0x1262fd+_0x491e6d(0x104),'message':_0x491e6d(0x164)+_0x4b8bc4[_0x491e6d(0x119)]+'.'});}const _0x3fba50=requireNotificationString(_0x4b8bc4['configCode'],_0x1262fd+_0x491e6d(0x1d3),'Notification\x20configCode\x20is\x20required.',_0x2f9e85);_0x3fba50?.['includes']('${')&&_0x2f9e85['push']({'path':_0x1262fd+'.configCode','message':_0x491e6d(0x1ba)});if(_0x4b8bc4['failurePolicy']!==undefined&&_0x4b8bc4[_0x491e6d(0x192)]!==null){if(typeof _0x4b8bc4['failurePolicy']!==_0x491e6d(0x1e9))_0x2f9e85[_0x491e6d(0x235)]({'path':_0x1262fd+_0x491e6d(0x1e3),'message':_0x491e6d(0x1cd)});else!NOTIFICATION_FAILURE_POLICIES[_0x491e6d(0x196)](_0x4b8bc4[_0x491e6d(0x192)][_0x491e6d(0xf8)]()[_0x491e6d(0x135)]())&&_0x2f9e85[_0x491e6d(0x235)]({'path':_0x1262fd+_0x491e6d(0x1e3),'message':_0x491e6d(0x249)});}!isRecord(_0x4b8bc4['template'])?_0x2f9e85['push']({'path':_0x1262fd+_0x491e6d(0x201),'message':_0x491e6d(0x1bf)}):validateNotificationTemplate(_0x4b8bc4[_0x491e6d(0x10e)],_0x1262fd+_0x491e6d(0x201),_0x2f9e85),validateNotificationRecipients(_0x4b8bc4[_0x491e6d(0x14f)],_0x1262fd+_0x491e6d(0x163),_0x2f9e85);}function validateNotificationTemplate(_0x578d30,_0x3c3c3d,_0x3acdda){const _0x1523c8=a299_0x3070f7;for(const _0x45b61c of['title',_0x1523c8(0x11d)]){const _0xdc4e18=requireNotificationString(_0x578d30[_0x45b61c],_0x3c3c3d+'.'+_0x45b61c,'Notification\x20template.'+_0x45b61c+_0x1523c8(0x20a),_0x3acdda);if(_0xdc4e18)validateNotificationPlaceholders(_0xdc4e18,_0x3c3c3d+'.'+_0x45b61c,_0x3acdda);}_0x578d30[_0x1523c8(0xff)]!==undefined&&_0x578d30[_0x1523c8(0xff)]!==null&&(typeof _0x578d30['detailMarkdown']!==_0x1523c8(0x1e9)?_0x3acdda[_0x1523c8(0x235)]({'path':_0x3c3c3d+_0x1523c8(0xf5),'message':_0x1523c8(0x238)}):validateNotificationPlaceholders(_0x578d30[_0x1523c8(0xff)],_0x3c3c3d+_0x1523c8(0xf5),_0x3acdda)),validateNotificationFacts(_0x578d30['facts'],_0x3c3c3d+_0x1523c8(0x230),_0x3acdda),validateNotificationActions(_0x578d30[_0x1523c8(0x112)],_0x3c3c3d+_0x1523c8(0x223),_0x3acdda);}function validateNotificationFacts(_0x58e156,_0x47fbc3,_0x5132c7){const _0x1b929c=a299_0x3070f7;if(_0x58e156===undefined||_0x58e156===null)return;if(!Array[_0x1b929c(0x136)](_0x58e156)){_0x5132c7[_0x1b929c(0x235)]({'path':_0x47fbc3,'message':_0x1b929c(0x1a0)});return;}_0x58e156[_0x1b929c(0xda)]>MAX_NOTIFICATION_FACTS&&_0x5132c7[_0x1b929c(0x235)]({'path':_0x47fbc3,'message':_0x1b929c(0x127)+MAX_NOTIFICATION_FACTS+_0x1b929c(0x1f1)}),_0x58e156[_0x1b929c(0x17b)]((_0x54819d,_0x501095)=>{const _0x5cd629=_0x1b929c,_0x3c7a9e=_0x47fbc3+'['+_0x501095+']';if(!isRecord(_0x54819d)){_0x5132c7[_0x5cd629(0x235)]({'path':_0x3c7a9e,'message':_0x5cd629(0x212)});return;}for(const _0x1169cf of[_0x5cd629(0x118),_0x5cd629(0x13a)]){const _0x4fcb8e=requireNotificationString(_0x54819d[_0x1169cf],_0x3c7a9e+'.'+_0x1169cf,_0x5cd629(0x203)+_0x1169cf+_0x5cd629(0x20a),_0x5132c7);_0x4fcb8e&&validateNotificationPlaceholders(_0x4fcb8e,_0x3c7a9e+'.'+_0x1169cf,_0x5132c7);}});}function validateNotificationActions(_0x1aa7b6,_0x38579e,_0x5d2354){const _0xa36096=a299_0x3070f7;if(_0x1aa7b6===undefined||_0x1aa7b6===null)return;if(!Array['isArray'](_0x1aa7b6)){_0x5d2354['push']({'path':_0x38579e,'message':_0xa36096(0x180)});return;}_0x1aa7b6[_0xa36096(0xda)]>MAX_NOTIFICATION_ACTIONS&&_0x5d2354[_0xa36096(0x235)]({'path':_0x38579e,'message':_0xa36096(0x127)+MAX_NOTIFICATION_ACTIONS+_0xa36096(0x1ef)}),_0x1aa7b6['forEach']((_0x20667c,_0x1d8171)=>{const _0x1293ea=_0xa36096,_0x4d2c32=_0x38579e+'['+_0x1d8171+']';if(!isRecord(_0x20667c)){_0x5d2354['push']({'path':_0x4d2c32,'message':_0x1293ea(0xe0)});return;}const _0x2e9af2=requireNotificationString(_0x20667c[_0x1293ea(0x10c)],_0x4d2c32+_0x1293ea(0x157),_0x1293ea(0x11e),_0x5d2354);if(_0x2e9af2)validateNotificationPlaceholders(_0x2e9af2,_0x4d2c32+_0x1293ea(0x157),_0x5d2354);const _0x2b2f29=requireNotificationString(_0x20667c[_0x1293ea(0xe4)],_0x4d2c32+_0x1293ea(0x23e),_0x1293ea(0x14a),_0x5d2354);if(!_0x2b2f29)return;validateNotificationPlaceholders(_0x2b2f29,_0x4d2c32+_0x1293ea(0x23e),_0x5d2354),!/^https?:\/\//i[_0x1293ea(0x129)](_0x2b2f29)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x1293ea(0x129)](_0x2b2f29)&&_0x5d2354[_0x1293ea(0x235)]({'path':_0x4d2c32+_0x1293ea(0x23e),'message':_0x1293ea(0x1c3)});});}function validateNotificationRecipients(_0x30fbbf,_0x4f02af,_0xdaca0f){const _0xb60da=a299_0x3070f7;if(_0x30fbbf===undefined||_0x30fbbf===null)return;if(!Array[_0xb60da(0x136)](_0x30fbbf)){_0xdaca0f[_0xb60da(0x235)]({'path':_0x4f02af,'message':_0xb60da(0x113)});return;}let _0x3df2f8=![];_0x30fbbf[_0xb60da(0x17b)]((_0x493870,_0x4c36a1)=>{const _0x156796=_0xb60da,_0x204d65=_0x4f02af+'['+_0x4c36a1+']';if(!isRecord(_0x493870)){_0xdaca0f[_0x156796(0x235)]({'path':_0x204d65,'message':'Notification\x20recipient\x20must\x20be\x20an\x20object.'});return;}const _0x4b8c25=requireNotificationString(_0x493870[_0x156796(0x222)],_0x204d65+_0x156796(0x1d5),_0x156796(0x227),_0xdaca0f);_0x4b8c25&&!NOTIFICATION_RECIPIENT_TYPES['has'](_0x4b8c25['toUpperCase']())&&_0xdaca0f['push']({'path':_0x204d65+_0x156796(0x1d5),'message':_0x156796(0x255)});let _0x2fe881='TO';_0x493870[_0x156796(0x140)]!==undefined&&_0x493870[_0x156796(0x140)]!==null&&(typeof _0x493870['role']!==_0x156796(0x1e9)?(_0xdaca0f['push']({'path':_0x204d65+_0x156796(0x1c4),'message':_0x156796(0x1f2)}),_0x2fe881=''):(_0x2fe881=_0x493870[_0x156796(0x140)][_0x156796(0xf8)]()[_0x156796(0x135)](),!NOTIFICATION_RECIPIENT_ROLES[_0x156796(0x196)](_0x2fe881)&&_0xdaca0f[_0x156796(0x235)]({'path':_0x204d65+'.role','message':_0x156796(0x243)})));if(_0x2fe881==='TO')_0x3df2f8=!![];const _0x376d9b=requireNotificationString(_0x493870[_0x156796(0x13a)],_0x204d65+_0x156796(0x1d4),_0x156796(0xf6),_0xdaca0f);_0x376d9b&&validateNotificationPlaceholders(_0x376d9b,_0x204d65+_0x156796(0x1d4),_0xdaca0f);}),_0x30fbbf[_0xb60da(0xda)]>0x0&&!_0x3df2f8&&_0xdaca0f[_0xb60da(0x235)]({'path':_0x4f02af,'message':_0xb60da(0x217)});}function requireNotificationString(_0x2d380a,_0x16ef97,_0x4e492b,_0xba4b0d){const _0x435ee4=a299_0x3070f7;if(typeof _0x2d380a!==_0x435ee4(0x1e9)||_0x2d380a[_0x435ee4(0xf8)]()==='')return _0xba4b0d['push']({'path':_0x16ef97,'message':_0x4e492b}),undefined;return _0x2d380a[_0x435ee4(0xf8)]();}function validateNotificationPlaceholders(_0x2deaf8,_0x6564bf,_0x572c7e){const _0x1b5f5c=a299_0x3070f7;for(const _0x376e06 of _0x2deaf8[_0x1b5f5c(0x14b)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x5c9d8b=_0x376e06[0x1]?.['trim']()??'',_0x2da334=_0x5c9d8b[_0x1b5f5c(0x142)]('.'),_0x501cbf=_0x2da334>=0x0?_0x5c9d8b[_0x1b5f5c(0x182)](0x0,_0x2da334):_0x5c9d8b,_0x1550c7=_0x2da334>=0x0?_0x5c9d8b[_0x1b5f5c(0x182)](_0x2da334+0x1)[_0x1b5f5c(0xf8)]():'';(![_0x1b5f5c(0xea),_0x1b5f5c(0x19e),_0x1b5f5c(0x12f)][_0x1b5f5c(0x1c7)](_0x501cbf)||_0x1550c7==='')&&_0x572c7e[_0x1b5f5c(0x235)]({'path':_0x6564bf,'message':_0x1b5f5c(0x24d)+_0x376e06[0x0]+'.'});}_0x2deaf8[_0x1b5f5c(0x24c)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x1b5f5c(0x1c7)]('${')&&_0x572c7e[_0x1b5f5c(0x235)]({'path':_0x6564bf,'message':_0x1b5f5c(0x22d)});}function validateEdge(_0x54583b,_0x1c25e3,_0x2df104){const _0x2222c6=a299_0x3070f7;_0x54583b[_0x2222c6(0x215)]!==undefined&&typeof _0x54583b['name']!=='string'&&_0x2df104[_0x2222c6(0x235)]({'path':_0x1c25e3+_0x2222c6(0x198),'message':_0x2222c6(0x1d1)}),_0x54583b[_0x2222c6(0x1f5)]!==undefined&&typeof _0x54583b[_0x2222c6(0x1f5)]!==_0x2222c6(0x152)&&_0x2df104['push']({'path':_0x1c25e3+_0x2222c6(0x109),'message':'defaultFlow\x20must\x20be\x20a\x20boolean.'}),_0x54583b[_0x2222c6(0x23b)]!==undefined&&(!Array[_0x2222c6(0x136)](_0x54583b[_0x2222c6(0x23b)])?_0x2df104['push']({'path':_0x1c25e3+_0x2222c6(0xe7),'message':_0x2222c6(0x1bb)}):_0x54583b[_0x2222c6(0x23b)][_0x2222c6(0x17b)]((_0x3280e3,_0x35d45f)=>{const _0x9e45f8=_0x2222c6;if(!isRecord(_0x3280e3)){_0x2df104['push']({'path':_0x1c25e3+'.waypoints['+_0x35d45f+']','message':'waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.'});return;}for(const _0x2e0708 of['x','y']){const _0x1c9e75=_0x3280e3[_0x2e0708];(typeof _0x1c9e75!=='number'||!Number[_0x9e45f8(0x17a)](_0x1c9e75))&&_0x2df104['push']({'path':_0x1c25e3+'.waypoints['+_0x35d45f+'].'+_0x2e0708,'message':_0x9e45f8(0x111)+_0x2e0708+_0x9e45f8(0x1f8)});}})),_0x54583b['conditionType']!==undefined&&!CONDITION_TYPES['has'](_0x54583b['conditionType'])&&_0x2df104['push']({'path':_0x1c25e3+_0x2222c6(0x1a1),'message':_0x2222c6(0x17c)+String(_0x54583b[_0x2222c6(0x20d)])+'.'}),_0x54583b[_0x2222c6(0x20d)]==='EXPRESSION'&&(typeof _0x54583b['expression']!==_0x2222c6(0x1e9)||_0x54583b[_0x2222c6(0x18b)][_0x2222c6(0xf8)]()==='')&&_0x2df104[_0x2222c6(0x235)]({'path':_0x1c25e3+'.expression','message':'EXPRESSION\x20edge\x20requires\x20expression.'}),_0x54583b[_0x2222c6(0x1f5)]===!![]&&_0x54583b['conditionType']!==_0x2222c6(0x20e)&&_0x2df104['push']({'path':_0x1c25e3+_0x2222c6(0x109),'message':_0x2222c6(0x17e)}),_0x54583b[_0x2222c6(0x1f5)]===!![]&&typeof _0x54583b[_0x2222c6(0x18b)]===_0x2222c6(0x1e9)&&_0x54583b[_0x2222c6(0x18b)][_0x2222c6(0xf8)]()!==''&&_0x2df104[_0x2222c6(0x235)]({'path':_0x1c25e3+'.expression','message':'A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.'});}function validateGraphShape(_0x55c933,_0x33b6ea,_0x29f1f3,_0x12283b,_0x4796e7,_0x15edd2,_0x1749b4){const _0x501f02=a299_0x3070f7;for(const [_0x14a6f2,_0x37f963]of _0x55c933){const _0x152146=_0x4796e7[_0x501f02(0x194)](_0x14a6f2)??[],_0x5f29fa=_0x12283b['get'](_0x14a6f2)??[];_0x37f963['type']!==_0x501f02(0x1d9)&&_0x152146[_0x501f02(0xda)]===0x0&&_0x1749b4[_0x501f02(0x235)]({'path':'flowJson.nodes.'+_0x14a6f2,'message':'Node\x20has\x20no\x20incoming\x20edge.'});_0x37f963[_0x501f02(0x222)]!==_0x501f02(0xe5)&&_0x5f29fa[_0x501f02(0xda)]===0x0&&_0x1749b4[_0x501f02(0x235)]({'path':_0x501f02(0x149)+_0x14a6f2,'message':'Node\x20has\x20no\x20outgoing\x20edge.'});_0x37f963[_0x501f02(0x222)]===_0x501f02(0x1d9)&&_0x152146[_0x501f02(0xda)]>0x0&&_0x1749b4[_0x501f02(0x235)]({'path':_0x501f02(0x149)+_0x14a6f2,'message':_0x501f02(0x120)});_0x37f963[_0x501f02(0x222)]===_0x501f02(0xe5)&&_0x5f29fa[_0x501f02(0xda)]>0x0&&_0x1749b4['push']({'path':_0x501f02(0x149)+_0x14a6f2,'message':_0x501f02(0x160)});if(_0x37f963[_0x501f02(0x222)]===_0x501f02(0x1a7)){_0x5f29fa[_0x501f02(0xda)]<0x2&&_0x1749b4[_0x501f02(0x235)]({'path':_0x501f02(0x149)+_0x14a6f2,'message':_0x501f02(0x15e)});const _0x4d7e2e=_0x5f29fa[_0x501f02(0x1aa)](_0x4736b9=>_0x4736b9['defaultFlow']===!![]);_0x4d7e2e[_0x501f02(0xda)]!==0x1&&_0x1749b4['push']({'path':'flowJson.nodes.'+_0x14a6f2,'message':_0x501f02(0x20f)});if(_0x4d7e2e[_0x501f02(0xda)]===0x1){const _0x2c2f03=_0x4d7e2e[0x0],_0x350340=_0x15edd2['get'](_0x2c2f03)??_0x501f02(0x14d);_0x2c2f03[_0x501f02(0x20d)]!==_0x501f02(0x20e)&&_0x1749b4[_0x501f02(0x235)]({'path':_0x350340+_0x501f02(0x1a1),'message':_0x501f02(0xdb)});_0x2c2f03['expression']!==undefined&&_0x1749b4[_0x501f02(0x235)]({'path':_0x350340+_0x501f02(0x153),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x28438d of _0x5f29fa){if(_0x28438d===_0x2c2f03)continue;const _0x3ddf73=_0x15edd2['get'](_0x28438d)??_0x501f02(0x14d);if(_0x28438d[_0x501f02(0x20d)]!==_0x501f02(0xe1))_0x1749b4['push']({'path':_0x3ddf73+_0x501f02(0x1a1),'message':_0x501f02(0x21f)});else(typeof _0x28438d['expression']!=='string'||_0x28438d['expression'][_0x501f02(0xf8)]()==='')&&_0x1749b4['push']({'path':_0x3ddf73+'.expression','message':_0x501f02(0x110)});}}}if(_0x37f963['type']===_0x501f02(0x158)&&(_0x37f963[_0x501f02(0x1dd)]??_0x501f02(0x158))===_0x501f02(0x16d)){if(_0x5f29fa[_0x501f02(0xda)]!==0x1)_0x1749b4[_0x501f02(0x235)]({'path':'flowJson.nodes.'+_0x14a6f2,'message':_0x501f02(0xf0)});else{const _0x15b224=_0x5f29fa[0x0];((_0x15b224['conditionType']??'ALWAYS')!==_0x501f02(0x20e)||_0x15b224[_0x501f02(0x1f5)]===!![]||typeof _0x15b224['expression']===_0x501f02(0x1e9)&&_0x15b224[_0x501f02(0x18b)][_0x501f02(0xf8)]()!=='')&&_0x1749b4[_0x501f02(0x235)]({'path':_0x15edd2[_0x501f02(0x194)](_0x15b224)??'flowJson.edges','message':_0x501f02(0xdd)});}}else{if(_0x37f963['type']===_0x501f02(0x158)){const _0x5a2de5=_0x5f29fa[_0x501f02(0x200)](_0x1fb11c=>_0x1fb11c[_0x501f02(0x20d)]??_0x501f02(0x20e)),_0x217174=_0x5a2de5[_0x501f02(0x1aa)](_0x49360e=>_0x49360e!=='APPROVED'&&_0x49360e!==_0x501f02(0x156));_0x217174[_0x501f02(0xda)]>0x0&&_0x1749b4[_0x501f02(0x235)]({'path':'flowJson.nodes.'+_0x14a6f2,'message':_0x501f02(0x21a)}),_0x5a2de5[_0x501f02(0x1aa)](_0x10cbc4=>_0x10cbc4===_0x501f02(0x1e1))[_0x501f02(0xda)]!==0x1&&_0x1749b4[_0x501f02(0x235)]({'path':_0x501f02(0x149)+_0x14a6f2,'message':_0x501f02(0x208)}),_0x5a2de5[_0x501f02(0x1aa)](_0x5f1da8=>_0x5f1da8===_0x501f02(0x156))[_0x501f02(0xda)]!==0x1&&_0x1749b4[_0x501f02(0x235)]({'path':'flowJson.nodes.'+_0x14a6f2,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.'}),_0x5f29fa[_0x501f02(0x23c)](_0x313b5f=>_0x313b5f[_0x501f02(0x1f5)]===!![])&&_0x1749b4[_0x501f02(0x235)]({'path':_0x501f02(0x149)+_0x14a6f2,'message':_0x501f02(0xf4)});}}}const _0x227f20=new Set(),_0xca2b37=_0x29d53d=>{const _0xa0cdbf=_0x501f02;if(_0x227f20[_0xa0cdbf(0x196)](_0x29d53d))return;_0x227f20[_0xa0cdbf(0x1be)](_0x29d53d);for(const _0x34daef of _0x12283b[_0xa0cdbf(0x194)](_0x29d53d)??[]){const _0xec1f39=resolveEdgeEndpoint(_0x34daef[_0xa0cdbf(0x166)],_0x34daef[_0xa0cdbf(0x106)]);if(_0xec1f39&&_0x55c933[_0xa0cdbf(0x196)](_0xec1f39))_0xca2b37(_0xec1f39);}};_0xca2b37(_0x33b6ea);for(const _0x422b23 of _0x55c933['keys']()){!_0x227f20[_0x501f02(0x196)](_0x422b23)&&_0x1749b4[_0x501f02(0x235)]({'path':_0x501f02(0x149)+_0x422b23,'message':_0x501f02(0x184)});}const _0x3bc4fb=_0x29f1f3['some'](_0x2e3858=>_0x227f20[_0x501f02(0x196)](_0x2e3858));if(!_0x3bc4fb){_0x1749b4[_0x501f02(0x235)]({'path':_0x501f02(0x14d),'message':_0x501f02(0x1ae)});return;}const _0x286e5b=new Set(),_0x2fa09d=_0x3215f1=>{const _0x390f8d=_0x501f02;if(_0x286e5b[_0x390f8d(0x196)](_0x3215f1))return;_0x286e5b[_0x390f8d(0x1be)](_0x3215f1);for(const _0x1598d1 of _0x4796e7[_0x390f8d(0x194)](_0x3215f1)??[]){const _0x555d81=resolveEdgeEndpoint(_0x1598d1[_0x390f8d(0x20c)],_0x1598d1['sourceNodeId']);if(_0x555d81&&_0x55c933[_0x390f8d(0x196)](_0x555d81))_0x2fa09d(_0x555d81);}};for(const _0x3d3045 of _0x29f1f3){if(_0x55c933[_0x501f02(0x196)](_0x3d3045))_0x2fa09d(_0x3d3045);}for(const _0x2653cb of _0x227f20){!_0x286e5b['has'](_0x2653cb)&&_0x1749b4['push']({'path':_0x501f02(0x149)+_0x2653cb,'message':_0x501f02(0x219)});}}function a299_0x4beb(_0x790849,_0x223e23){_0x790849=_0x790849-0xd8;const _0x5ab3e1=a299_0x5ab3();let _0x4beb48=_0x5ab3e1[_0x790849];return _0x4beb48;}function validateApprovalResults(_0x54a03c,_0x27bd9e,_0x1b7924,_0x134261){const _0x36c36c=a299_0x3070f7;if(_0x27bd9e===0x0)return;const _0x223198=new Set(_0x1b7924[_0x36c36c(0x200)](_0x3b45bf=>_0x54a03c[_0x36c36c(0x194)](_0x3b45bf)?.[_0x36c36c(0x1b5)])[_0x36c36c(0x1aa)](_0xfdcc55=>typeof _0xfdcc55===_0x36c36c(0x1e9)));for(const _0x5f5e9a of[_0x36c36c(0x1e1),_0x36c36c(0x156)]){!_0x223198[_0x36c36c(0x196)](_0x5f5e9a)&&_0x134261[_0x36c36c(0x235)]({'path':'flowJson.nodes','message':_0x36c36c(0x1e4)+_0x5f5e9a+'.'});}}function validateScriptResultReferences(_0x2f04b7,_0x186659,_0x2c3120,_0x29783c,_0x19762b,_0x359b7c,_0x150fd5){const _0x1e03fc=a299_0x3070f7;if(_0x359b7c[_0x1e03fc(0x138)]===0x0)return;const _0x31ccb4=new Set(),_0x5b740f=_0x546432=>{const _0x331ae9=_0x1e03fc;if(!_0x31ccb4['has'](_0x546432)&&_0x2f04b7[_0x331ae9(0x196)](_0x546432)){_0x31ccb4[_0x331ae9(0x1be)](_0x546432);for(const _0x4fead1 of _0x2c3120['get'](_0x546432)??[]){const _0x3fcf24=resolveEdgeEndpoint(_0x4fead1['target'],_0x4fead1[_0x331ae9(0x106)]);if(_0x3fcf24)_0x5b740f(_0x3fcf24);}}};_0x5b740f(_0x186659);const _0x5a441a=new Map();for(const _0x34d2db of _0x31ccb4){_0x5a441a['set'](_0x34d2db,_0x34d2db===_0x186659?new Set([_0x186659]):new Set(_0x31ccb4));}let _0x30394d=!![];while(_0x30394d){_0x30394d=![];for(const _0x2b01a0 of _0x31ccb4){if(_0x2b01a0===_0x186659)continue;const _0xd105cb=(_0x29783c[_0x1e03fc(0x194)](_0x2b01a0)??[])[_0x1e03fc(0x200)](_0x12db86=>resolveEdgeEndpoint(_0x12db86[_0x1e03fc(0x20c)],_0x12db86[_0x1e03fc(0x17f)]))['filter'](_0x405476=>Boolean(_0x405476&&_0x31ccb4[_0x1e03fc(0x196)](_0x405476)));if(_0xd105cb[_0x1e03fc(0xda)]===0x0)continue;const _0x927fc2=new Set(_0x5a441a[_0x1e03fc(0x194)](_0xd105cb[0x0])??[]);for(const _0x221e28 of _0xd105cb[_0x1e03fc(0x182)](0x1)){const _0x2c4638=_0x5a441a[_0x1e03fc(0x194)](_0x221e28)??new Set();for(const _0x2dcc55 of _0x927fc2){if(!_0x2c4638[_0x1e03fc(0x196)](_0x2dcc55))_0x927fc2[_0x1e03fc(0xf2)](_0x2dcc55);}}_0x927fc2[_0x1e03fc(0x1be)](_0x2b01a0);const _0x811033=_0x5a441a[_0x1e03fc(0x194)](_0x2b01a0);!setsEqual(_0x811033,_0x927fc2)&&(_0x5a441a['set'](_0x2b01a0,_0x927fc2),_0x30394d=!![]);}}for(const [_0x28896b,_0x588a3c]of _0x2c3120){const _0x436376=_0x5a441a['get'](_0x28896b);if(!_0x436376)continue;for(const _0x31fc21 of _0x588a3c){if(_0x31fc21[_0x1e03fc(0x20d)]!=='EXPRESSION'||typeof _0x31fc21[_0x1e03fc(0x18b)]!==_0x1e03fc(0x1e9))continue;for(const [_0x1cfac8,_0x10e884]of _0x359b7c){expressionReferencesVariable(_0x31fc21['expression'],_0x1cfac8)&&!_0x436376[_0x1e03fc(0x196)](_0x10e884)&&_0x150fd5[_0x1e03fc(0x235)]({'path':(_0x19762b['get'](_0x31fc21)??'flowJson.edges')+_0x1e03fc(0x153),'message':_0x1e03fc(0x233)+_0x1cfac8+',\x20but\x20node\x20'+_0x10e884+'\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20'+_0x28896b+'.'});}}}}function a299_0x5ab3(){const _0x19ac21=['utf8','flowDesc','USER','Duplicate\x20edge\x20route:\x20','CONTINUE','datasetCode\x20must\x20be\x20a\x20string.','.target','ROLE','flowType','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','Rabetbase\x20FlowConfig','isFinite','forEach','Unsupported\x20condition\x20type:\x20','.timeout.scriptName','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','sourceNodeId','Notification\x20template.actions\x20must\x20be\x20an\x20array.','value\x20must\x20be\x20a\x20non-empty\x20string.','slice','prototype','Node\x20is\x20not\x20reachable\x20from\x20START.','readSources','approval_sys_initiatorUsername','transferCandidates\x20must\x20be\x20an\x20object.','approval_sys_operationType','formPermissions','^[A-Za-z_][A-Za-z0-9_]*$','expression','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','.tmp','pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.','position','approval_sys_appCode','timeout','failurePolicy','Unsupported\x20schemaVersion:\x20','get','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','has','approval_sys_initiatorUserId','.name','.pageId','timeout\x20must\x20be\x20an\x20object.','edge\x20source\x20is\x20required.','.transferCandidates.strategy','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','context','64744jPOhci','Notification\x20template.facts\x20must\x20be\x20an\x20array.','.conditionType','approval.simple-flow.v1','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','ANY','timeout.interrupting\x20must\x20be\x20a\x20boolean.','CONDITION','.path','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','filter','set','flowJson.nodes','approval_sys_','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','Duplicate\x20BPMN\x20element\x20id:\x20','DAYS','.cc.recipientUserIds','BCC','flowKey','.async','result','.\x20This\x20CLI\x20supports\x20only\x20','strategy','INDEPENDENT_FLOW','userIds','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','waypoints\x20must\x20be\x20an\x20array.','empty_metadata_removed','462193iYjiCq','add','NOTIFICATION\x20node\x20requires\x20template.','hasOwnProperty','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','.role','#/$defs/flowEdge','flowJson.edges[','includes','flowName\x20is\x20required.','edges','interrupting','].path','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','failurePolicy\x20must\x20be\x20a\x20string.','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','Edge\x20target\x20node\x20not\x20found:\x20','AUTO_APPROVE','edge\x20name\x20must\x20be\x20a\x20string.','scriptResult','.configCode','.value','.type','MINUTES','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','https://json-schema.org/draft/2020-12/schema','START','flowJson.pageMode','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','startPath','taskMode','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','pageIds','config','APPROVED','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','.failurePolicy','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','.position.','.config','.sequential','enabled','string','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','position.','1377565LNGXJO','ALL','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','\x20actions.','SCRIPT\x20node\x20requires\x20scriptName.','\x20facts.','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','\x20users.','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','defaultFlow','async\x20must\x20be\x20an\x20object.','SECONDS','\x20must\x20be\x20a\x20finite\x20number.','configCode','cc\x20must\x20be\x20an\x20object.','roleId','value\x20must\x20be\x20an\x20array.','.cc.recipientUserIds[','SINGLE','datasetCode','map','.template','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Notification\x20fact.','transferCandidates','.transferCandidates.userIds[','entries','Unsupported\x20flowType:\x20','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','isSafeInteger','\x20is\x20required.','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','source','conditionType','ALWAYS','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','\x20->\x20','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','Notification\x20fact\x20must\x20be\x20an\x20object.','.cc','cc.recipientUserIds\x20supports\x20at\x20most\x20','name','.source','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','startsWith','Node\x20cannot\x20reach\x20any\x20END.','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','FIXED','856ydQMco','^[1-9][0-9]*$','.assignee.strategy','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','action','__rabetbase_local_validation__','type','.actions','warnings','bindDatasetCode','array','Notification\x20recipient.type\x20is\x20required.','join','NOTIFICATION','formSchema','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','.timeout.enabled','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','.id','FIXED\x20assignee\x20requires\x20userIds.','.facts','parse','duration\x20requires\x20value\x20and\x20unit.','Expression\x20references\x20SCRIPT\x20resultVariable\x20','flowJson.startPath','push','.unit','.assignee.roleId','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','form','11gUvNOp','waypoints','some','nodes\x20must\x20be\x20an\x20array.','.url','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','.timeout','async','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','nodes','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','path','stringify','flowDesc\x20must\x20be\x20a\x20string.','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','mode','message','replace','Unsupported\x20notification\x20placeholder:\x20','.assignee.userIds','legacy_field_removed','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','5molHOL','integer','Duplicate\x20node\x20id:\x20','.timeout.resultVariable','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','366614PkBHGM','timeout.enabled\x20must\x20be\x20a\x20boolean.','appCode','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','length','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','scriptName','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','#/$defs/timeAmount','Notification\x20action\x20must\x20be\x20an\x20object.','EXPRESSION','.async.retryCount','#/$defs/userId','url','END','retryInterval','.waypoints','node\x20must\x20be\x20an\x20object.','templateName','event','approval_sys_dataId','https://lovrabet.com/schema/rabetbase-flow-config.json','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','approval_sys_processInstanceId','FAIL','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','flowJson','delete','pageId','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','.detailMarkdown','Notification\x20recipient.value\x20is\x20required.','flowJson.nodes[','trim','Unsupported\x20node\x20type:\x20','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','Duplicate\x20cc\x20recipient\x20userId:\x20','Reserved\x20resultVariable:\x20','Unsupported\x20approval\x20mode:\x20','.cc.readSources','detailMarkdown','visible','isInteger','.assignee.userIds[','AUTO_REJECT','.version','async.enabled\x20must\x20be\x20a\x20boolean.','targetNodeId','call','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','.defaultFlow','edge\x20target\x20is\x20required.','formData','text','flowJson.schemaVersion','template','Edge\x20source\x20node\x20not\x20found:\x20','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','waypoint.','actions','Notification\x20recipients\x20must\x20be\x20an\x20array.','HOURS','retryCount','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','label','version','.timeout.interrupting','MAX_SAFE_INTEGER','SCRIPT','summary','Notification\x20action.text\x20is\x20required.','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','.resultVariable','FORM_FLOW','keys','resultVariable','number','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','Notification\x20template\x20supports\x20at\x20most\x20','schemaVersion','test','.timeout.action','metadata','assignee','40311NXzMqB','.scriptName','variables','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','.taskMode','.transferCandidates.userIds','EXECUTE_BFF','toUpperCase','isArray','pageMode','size','flowName','value','startPath\x20must\x20be\x20a\x20non-empty\x20string.','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','Unsupported\x20pageMode:\x20','NOTIFICATION\x20node\x20requires\x20config.','catch','role','flowJson.','indexOf','startPageId','EMAIL','102zFfLIa','flowJson\x20must\x20be\x20an\x20object.','.approvalMode','7250310EcLzwT','flowJson.nodes.','Notification\x20action.url\x20is\x20required.','matchAll','title','flowJson.edges','.position','recipients','approval_sys_datasetCode','.assignee','boolean','.expression','Notification\x20version\x20must\x20be\x20a\x20string.','Every\x20node\x20requires\x20a\x20non-empty\x20name.','REJECTED','.text','APPROVAL','3192546ZzQDPd','every','\x20was\x20empty\x20and\x20was\x20removed.','.cc.visible','#/$defs/position','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','.async.retryInterval','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','CUSTOM_PAGE','].taskMode','.recipients','Unsupported\x20notification\x20version:\x20','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','target','flowCode','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','findIndex','pid','APPROVAL\x20node\x20requires\x20assignee.','object','HANDLE','recipientUserIds'];a299_0x5ab3=function(){return _0x19ac21;};return a299_0x5ab3();}function expressionReferencesVariable(_0x235d9d,_0x5c3a9b){const _0x451585=a299_0x3070f7;let _0x479d98=0x0;while(_0x479d98<_0x235d9d[_0x451585(0xda)]){const _0x6a07b3=_0x235d9d[_0x479d98];if(_0x6a07b3==='\x27'||_0x6a07b3==='\x22'){_0x479d98=skipQuotedExpressionSegment(_0x235d9d,_0x479d98,_0x6a07b3);continue;}if(!/[A-Za-z_]/[_0x451585(0x129)](_0x6a07b3)){_0x479d98+=0x1;continue;}const _0x48651c=_0x479d98;_0x479d98+=0x1;while(_0x479d98<_0x235d9d[_0x451585(0xda)]&&/[A-Za-z0-9_]/[_0x451585(0x129)](_0x235d9d[_0x479d98])){_0x479d98+=0x1;}if(_0x235d9d[_0x451585(0x182)](_0x48651c,_0x479d98)!==_0x5c3a9b)continue;let _0x27e6d0=_0x48651c-0x1;while(_0x27e6d0>=0x0&&/\s/[_0x451585(0x129)](_0x235d9d[_0x27e6d0])){_0x27e6d0-=0x1;}if(_0x235d9d[_0x27e6d0]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x29fefa,_0x2548a6,_0x5da32b){const _0x2aef2e=a299_0x3070f7;let _0x48d227=_0x2548a6+0x1;while(_0x48d227<_0x29fefa[_0x2aef2e(0xda)]){if(_0x29fefa[_0x48d227]==='\x5c'){_0x48d227+=0x2;continue;}if(_0x29fefa[_0x48d227]===_0x5da32b)return _0x48d227+0x1;_0x48d227+=0x1;}return _0x48d227;}function resolveEffectiveResultVariable(_0x11f927,_0x28ce3f){const _0x5107d8=a299_0x3070f7;if(_0x11f927===undefined||_0x11f927===null||_0x28ce3f&&_0x11f927==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x11f927!==_0x5107d8(0x1e9)||!VARIABLE_PATTERN[_0x5107d8(0x129)](_0x11f927)||RESERVED_RESULT_VARIABLES['has'](_0x11f927)||_0x11f927[_0x5107d8(0x218)](_0x5107d8(0x1ad)))return undefined;return _0x11f927;}function registerResultVariableOwner(_0x2307fc,_0xf1e542,_0x37dd7b,_0x216950){const _0x22a1d8=a299_0x3070f7;if(_0x2307fc[_0x22a1d8(0x196)](_0xf1e542)){_0x216950[_0x22a1d8(0x235)]({'path':'flowJson.nodes','message':'Duplicate\x20resultVariable:\x20'+_0xf1e542+'.'});return;}_0x2307fc[_0x22a1d8(0x1ab)](_0xf1e542,_0x37dd7b);}function setsEqual(_0x2b30e6,_0x5ef2a0){const _0x197631=a299_0x3070f7;return _0x2b30e6[_0x197631(0x138)]===_0x5ef2a0[_0x197631(0x138)]&&[..._0x2b30e6][_0x197631(0x15a)](_0x658005=>_0x5ef2a0[_0x197631(0x196)](_0x658005));}function isValidUserId(_0x168de8){const _0x533031=a299_0x3070f7;if(typeof _0x168de8===_0x533031(0x1e9))return _0x168de8[_0x533031(0xf8)]()[_0x533031(0xda)]>0x0;return Number[_0x533031(0x209)](_0x168de8)&&Number(_0x168de8)>0x0;}function resolveEdgeEndpoint(_0x346f33,_0x3ba053){const _0xd231a9=a299_0x3070f7;if(typeof _0x346f33==='string'&&_0x346f33[_0xd231a9(0xf8)]())return _0x346f33[_0xd231a9(0xf8)]();if(typeof _0x3ba053===_0xd231a9(0x1e9)&&_0x3ba053[_0xd231a9(0xf8)]())return _0x3ba053[_0xd231a9(0xf8)]();return undefined;}function removeEmptyMetadata(_0x57cabc,_0x34bba6,_0x10929c,_0x1ec257){const _0x27971c=a299_0x3070f7;if(Array[_0x27971c(0x136)](_0x57cabc)){_0x57cabc['forEach']((_0x5f122d,_0x1517e5)=>removeEmptyMetadata(_0x5f122d,_0x34bba6+'['+_0x1517e5+']',_0x10929c,_0x1ec257));return;}if(!isRecord(_0x57cabc))return;for(const [_0x24f779,_0x4340fc]of Object[_0x27971c(0x206)](_0x57cabc)){const _0x6446ff=_0x34bba6+'.'+_0x24f779;if(_0x24f779===_0x27971c(0x12b)&&isEmptyJsonValue(_0x4340fc)){delete _0x57cabc[_0x24f779],_0x1ec257[_0x27971c(0x235)](_0x6446ff),_0x10929c[_0x27971c(0x235)]({'code':_0x27971c(0x1bc),'path':_0x6446ff,'message':_0x6446ff+_0x27971c(0x15b)});continue;}removeEmptyMetadata(_0x4340fc,_0x6446ff,_0x10929c,_0x1ec257);}}function isEmptyJsonValue(_0x5b33e0){const _0x3eaab3=a299_0x3070f7;if(_0x5b33e0===null||_0x5b33e0===undefined)return!![];if(typeof _0x5b33e0==='string')return _0x5b33e0[_0x3eaab3(0xf8)]()==='';if(Array[_0x3eaab3(0x136)](_0x5b33e0))return _0x5b33e0['length']===0x0;return isRecord(_0x5b33e0)&&Object[_0x3eaab3(0x123)](_0x5b33e0)['length']===0x0;}function isRecord(_0x4a26c7){const _0x4b33a2=a299_0x3070f7;return typeof _0x4a26c7===_0x4b33a2(0x16c)&&_0x4a26c7!==null&&!Array[_0x4b33a2(0x136)](_0x4a26c7);}function cloneJsonValue(_0x335149){const _0x16bfc0=a299_0x3070f7;return JSON['parse'](JSON[_0x16bfc0(0x247)](_0x335149));}export async function readFlowConfigFile(_0x492be5){const _0x580861=a299_0x3070f7,_0x3e0577=await readFile(resolve(_0x492be5),'utf8');return JSON[_0x580861(0x231)](_0x3e0577);}
1
+ const a299_0xf05f06=a299_0x495f;(function(_0x5aa72e,_0x509dc3){const _0x23d3fc=a299_0x495f,_0x26749b=_0x5aa72e();while(!![]){try{const _0x5e1a60=-parseInt(_0x23d3fc(0x202))/0x1*(parseInt(_0x23d3fc(0x257))/0x2)+-parseInt(_0x23d3fc(0x277))/0x3*(parseInt(_0x23d3fc(0x231))/0x4)+-parseInt(_0x23d3fc(0x221))/0x5+-parseInt(_0x23d3fc(0x2d7))/0x6*(parseInt(_0x23d3fc(0x2cc))/0x7)+-parseInt(_0x23d3fc(0x23e))/0x8+parseInt(_0x23d3fc(0x2c7))/0x9+-parseInt(_0x23d3fc(0x2d0))/0xa*(-parseInt(_0x23d3fc(0x236))/0xb);if(_0x5e1a60===_0x509dc3)break;else _0x26749b['push'](_0x26749b['shift']());}catch(_0x317159){_0x26749b['push'](_0x26749b['shift']());}}}(a299_0x40f3,0x45b98));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_0xf05f06(0x26b),'$id':a299_0xf05f06(0x225),'title':a299_0xf05f06(0x22e),'type':a299_0xf05f06(0x206),'required':[a299_0xf05f06(0x1dc),a299_0xf05f06(0x2b4),a299_0xf05f06(0x1ef)],'$defs':{'userId':{'anyOf':[{'type':a299_0xf05f06(0x2dd),'minLength':0x1},{'type':a299_0xf05f06(0x30c),'minimum':0x1}]},'position':{'type':'object','required':['x','y'],'properties':{'x':{'type':a299_0xf05f06(0x220),'minimum':0x0},'y':{'type':a299_0xf05f06(0x220),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a299_0xf05f06(0x206),'required':[a299_0xf05f06(0x2f9),a299_0xf05f06(0x2a5)],'properties':{'value':{'type':'integer','minimum':0x1},'unit':{'enum':['SECONDS','MINUTES',a299_0xf05f06(0x215),a299_0xf05f06(0x24c)]}},'additionalProperties':!![]},'flowNode':{'type':a299_0xf05f06(0x206),'required':['id','type',a299_0xf05f06(0x246),a299_0xf05f06(0x1d9)],'properties':{'id':{'type':a299_0xf05f06(0x2dd),'pattern':a299_0xf05f06(0x1ce)},'type':{'enum':['START',a299_0xf05f06(0x2ff),a299_0xf05f06(0x282),a299_0xf05f06(0x239),a299_0xf05f06(0x20f),a299_0xf05f06(0x264)]},'name':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'path':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'position':{'$ref':a299_0xf05f06(0x2be)},'approvalMode':{'enum':[a299_0xf05f06(0x22c),a299_0xf05f06(0x223),a299_0xf05f06(0x208)]},'taskMode':{'enum':[a299_0xf05f06(0x282),a299_0xf05f06(0x1d5)]},'assignee':{'type':a299_0xf05f06(0x206),'required':[a299_0xf05f06(0x31e)],'properties':{'strategy':{'enum':['FIXED',a299_0xf05f06(0x24b)]},'userIds':{'type':a299_0xf05f06(0x308),'minItems':0x1,'items':{'$ref':a299_0xf05f06(0x2b5)}},'roleId':{'anyOf':[{'type':'integer','minimum':0x1},{'type':'string','pattern':a299_0xf05f06(0x262)}]}},'additionalProperties':!![]},'transferCandidates':{'type':a299_0xf05f06(0x206),'required':[a299_0xf05f06(0x31e),a299_0xf05f06(0x256)],'properties':{'strategy':{'const':a299_0xf05f06(0x234)},'userIds':{'type':'array','minItems':0x1,'items':{'$ref':a299_0xf05f06(0x2b5)}}},'additionalProperties':!![]},'sequential':{'type':'boolean'},'result':{'enum':[a299_0xf05f06(0x28c),a299_0xf05f06(0x2a8)]},'scriptName':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'resultVariable':{'type':'string','pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'async':{'type':'object','properties':{'enabled':{'type':a299_0xf05f06(0x228)},'retryCount':{'type':'integer','minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a299_0xf05f06(0x200)}},'additionalProperties':!![]},'timeout':{'type':a299_0xf05f06(0x206),'properties':{'enabled':{'type':a299_0xf05f06(0x228)},'duration':{'$ref':'#/$defs/timeAmount'},'action':{'enum':[a299_0xf05f06(0x1e6),a299_0xf05f06(0x244),'EXECUTE_BFF']},'interrupting':{'type':a299_0xf05f06(0x228)},'scriptName':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'resultVariable':{'type':a299_0xf05f06(0x2dd),'pattern':a299_0xf05f06(0x1ce)}},'additionalProperties':!![]},'cc':{'type':a299_0xf05f06(0x206),'required':[a299_0xf05f06(0x2d6)],'properties':{'recipientUserIds':{'type':'array','minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'visible':{'type':'array','uniqueItems':!![],'items':{'type':a299_0xf05f06(0x2dd),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':[a299_0xf05f06(0x24f),a299_0xf05f06(0x334)],'properties':{'version':{'enum':['v1']},'configCode':{'type':'string','minLength':0x1},'failurePolicy':{'enum':[a299_0xf05f06(0x1f9),a299_0xf05f06(0x2fe)]},'template':{'type':'object','required':[a299_0xf05f06(0x1e9),'summary'],'properties':{'title':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'summary':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'detailMarkdown':{'type':a299_0xf05f06(0x2dd)},'facts':{'type':a299_0xf05f06(0x308),'maxItems':0x8,'items':{'type':a299_0xf05f06(0x206),'required':[a299_0xf05f06(0x301),'value'],'properties':{'label':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'value':{'type':a299_0xf05f06(0x2dd),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':'array','maxItems':0x2,'items':{'type':a299_0xf05f06(0x206),'required':[a299_0xf05f06(0x263),'url'],'properties':{'text':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'url':{'type':a299_0xf05f06(0x2dd),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':'array','items':{'type':a299_0xf05f06(0x206),'required':[a299_0xf05f06(0x265),a299_0xf05f06(0x2f9)],'properties':{'type':{'enum':[a299_0xf05f06(0x278),'ROLE',a299_0xf05f06(0x27b)]},'value':{'type':'string','minLength':0x1},'role':{'enum':['TO','CC',a299_0xf05f06(0x2bc)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0xf05f06(0x206),'properties':{'id':{'type':a299_0xf05f06(0x2dd),'pattern':a299_0xf05f06(0x1ce)},'source':{'type':'string','minLength':0x1},'target':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'sourceNodeId':{'type':'string','minLength':0x1},'targetNodeId':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'conditionType':{'enum':[a299_0xf05f06(0x2fb),a299_0xf05f06(0x28c),'REJECTED',a299_0xf05f06(0x27f)]},'expression':{'type':a299_0xf05f06(0x2dd)},'defaultFlow':{'type':a299_0xf05f06(0x228)},'name':{'type':a299_0xf05f06(0x2dd)},'waypoints':{'type':a299_0xf05f06(0x308),'items':{'$ref':a299_0xf05f06(0x2be)}}},'allOf':[{'anyOf':[{'required':[a299_0xf05f06(0x30a)]},{'required':['sourceNodeId']}]},{'anyOf':[{'required':[a299_0xf05f06(0x216)]},{'required':[a299_0xf05f06(0x23c)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'flowDesc':{'type':'string'},'flowType':{'enum':[a299_0xf05f06(0x23d),'INDEPENDENT_FLOW']},'datasetCode':{'type':'string','minLength':0x1},'pageId':{'type':a299_0xf05f06(0x30c),'minimum':0x1,'maximum':Number['MAX_SAFE_INTEGER']},'pageIds':{'type':a299_0xf05f06(0x308),'items':{'type':a299_0xf05f06(0x30c),'minimum':0x1,'maximum':Number[a299_0xf05f06(0x1cf)]}},'templateName':![],'flowJson':{'type':a299_0xf05f06(0x206),'required':[a299_0xf05f06(0x23b),a299_0xf05f06(0x329)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':'string','const':a299_0xf05f06(0x1fe),'description':a299_0xf05f06(0x1d8)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0xf05f06(0x271)},'startPageId':![],'startPath':{'type':a299_0xf05f06(0x2dd),'minLength':0x1},'nodes':{'type':'array','minItems':0x1,'items':{'$ref':a299_0xf05f06(0x280)}},'edges':{'type':a299_0xf05f06(0x308),'minItems':0x1,'items':{'$ref':'#/$defs/flowEdge'}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a299_0xf05f06(0x1c9),a299_0xf05f06(0x2b9),a299_0xf05f06(0x1dc),a299_0xf05f06(0x303),'datasetCode','appCode',a299_0xf05f06(0x1de),a299_0xf05f06(0x307)],REMOVED_ROOT_FIELDS=['id',a299_0xf05f06(0x25d),a299_0xf05f06(0x307)],DEFAULT_FLOW_SCHEMA_VERSION=a299_0xf05f06(0x1fe),NODE_TYPES=new Set([a299_0xf05f06(0x2f7),a299_0xf05f06(0x2ff),a299_0xf05f06(0x282),a299_0xf05f06(0x239),'SCRIPT','NOTIFICATION']),CONDITION_TYPES=new Set([a299_0xf05f06(0x2fb),'APPROVED',a299_0xf05f06(0x2a8),'EXPRESSION']),APPROVAL_MODES=new Set([a299_0xf05f06(0x22c),a299_0xf05f06(0x223),'ANY']),APPROVAL_TASK_MODES=new Set([a299_0xf05f06(0x282),a299_0xf05f06(0x1d5)]),FLOW_TIME_UNITS=new Set([a299_0xf05f06(0x1d3),'MINUTES',a299_0xf05f06(0x215),'DAYS']),APPROVAL_TIMEOUT_ACTIONS=new Set([a299_0xf05f06(0x1e6),'AUTO_REJECT',a299_0xf05f06(0x2a6)]),FLOW_TYPES=new Set([a299_0xf05f06(0x23d),'INDEPENDENT_FLOW']),FLOW_PAGE_MODES=new Set([a299_0xf05f06(0x271),a299_0xf05f06(0x30b)]),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_0xf05f06(0x1f9),'FAIL']),NOTIFICATION_RECIPIENT_TYPES=new Set([a299_0xf05f06(0x278),'ROLE',a299_0xf05f06(0x27b)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC','BCC']),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_0xf05f06(0x2db),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_0xf05f06(0x2aa),a299_0xf05f06(0x26f),'approval_sys_appCode',a299_0xf05f06(0x2c3),a299_0xf05f06(0x318),a299_0xf05f06(0x29d),'approval_sys_datasetCode',a299_0xf05f06(0x2e2),a299_0xf05f06(0x227),a299_0xf05f06(0x1f7)]);export function normalizeFlowConfig(_0x1e270e){const _0x497c66=a299_0xf05f06;if(!isRecord(_0x1e270e))throw new TypeError(_0x497c66(0x2b6));const _0x434ba0=cloneJsonValue(_0x1e270e),_0x2c62b3=_0x434ba0[_0x497c66(0x1ef)],_0x4aad95=isRecord(_0x2c62b3)?cloneJsonValue(_0x2c62b3):{},_0xfbb725=[],_0x3e5920=[];for(const _0x37f5c1 of REMOVED_ROOT_FIELDS){if(!Object[_0x497c66(0x30e)]['hasOwnProperty'][_0x497c66(0x331)](_0x434ba0,_0x37f5c1))continue;delete _0x434ba0[_0x37f5c1],_0x3e5920[_0x497c66(0x2b2)](_0x37f5c1),_0xfbb725['push']({'code':'legacy_field_removed','path':_0x37f5c1,'message':_0x37f5c1+_0x497c66(0x2a0)});}for(const _0x298073 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x497c66(0x30e)][_0x497c66(0x297)][_0x497c66(0x331)](_0x4aad95,_0x298073))continue;const _0x2c39db='flowJson.'+_0x298073;delete _0x4aad95[_0x298073],_0x3e5920[_0x497c66(0x2b2)](_0x2c39db),_0xfbb725[_0x497c66(0x2b2)]({'code':_0x497c66(0x336),'path':_0x2c39db,'message':_0x2c39db+_0x497c66(0x2a0)});}if(Object[_0x497c66(0x30e)][_0x497c66(0x297)][_0x497c66(0x331)](_0x4aad95,_0x497c66(0x324))){const _0x54fe48=_0x4aad95[_0x497c66(0x324)],_0x43ffea=typeof _0x54fe48==='string'?_0x54fe48[_0x497c66(0x284)]():_0x54fe48;if(isEmptyJsonValue(_0x54fe48)||_0x43ffea===DEFAULT_FLOW_SCHEMA_VERSION){const _0x5c1036=_0x497c66(0x2cf);delete _0x4aad95[_0x497c66(0x324)],_0x3e5920[_0x497c66(0x2b2)](_0x5c1036),_0xfbb725[_0x497c66(0x2b2)]({'code':'legacy_field_removed','path':_0x5c1036,'message':_0x5c1036+_0x497c66(0x2eb)+DEFAULT_FLOW_SCHEMA_VERSION+_0x497c66(0x255)});}}removeEmptyMetadata(_0x4aad95,'flowJson',_0xfbb725,_0x3e5920);_0x434ba0[_0x497c66(0x2b4)]===_0x497c66(0x249)&&!Object[_0x497c66(0x30e)][_0x497c66(0x297)][_0x497c66(0x331)](_0x4aad95,_0x497c66(0x335))&&(_0x4aad95[_0x497c66(0x335)]=_0x497c66(0x271));_0x434ba0[_0x497c66(0x1ef)]=_0x4aad95;if(typeof _0x434ba0['flowName']==='string')_0x434ba0['flowName']=_0x434ba0[_0x497c66(0x1dc)][_0x497c66(0x284)]();return{'config':_0x434ba0,'warnings':_0xfbb725,'removedPaths':_0x3e5920};}export function validateFlowConfig(_0x1d5576){const _0x2b3a72=a299_0xf05f06;let _0x5c4e75;try{_0x5c4e75=normalizeFlowConfig(_0x1d5576);}catch(_0x2e6a7b){const _0x2d0552=_0x2e6a7b instanceof Error?_0x2e6a7b[_0x2b3a72(0x1f6)]:String(_0x2e6a7b),_0x4e5495={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x2d0552}],'warnings':[],'normalized':_0x4e5495,'validationConfig':_0x4e5495};}const _0x1ee79f=_0x5c4e75[_0x2b3a72(0x27a)],_0x91f1b7=cloneJsonValue(_0x1ee79f),_0x50273c=_0x91f1b7[_0x2b3a72(0x1ef)];_0x50273c[_0x2b3a72(0x1c9)]=_0x2b3a72(0x338),_0x50273c['flowName']=_0x1ee79f[_0x2b3a72(0x1dc)];typeof _0x1ee79f[_0x2b3a72(0x2ae)]===_0x2b3a72(0x2dd)&&_0x1ee79f['datasetCode'][_0x2b3a72(0x284)]()&&(_0x50273c['bindDatasetCode']=_0x1ee79f[_0x2b3a72(0x2ae)][_0x2b3a72(0x284)]());const _0x3c5fcd=[];return validateOuterMetadata(_0x1ee79f,_0x3c5fcd),validateFlowClassification(_0x1ee79f,_0x3c5fcd),validateGraph(_0x1ee79f[_0x2b3a72(0x1ef)],_0x3c5fcd),{'valid':_0x3c5fcd[_0x2b3a72(0x2c4)]===0x0,'errors':_0x3c5fcd,'warnings':_0x5c4e75[_0x2b3a72(0x25b)],'normalized':_0x1ee79f,'validationConfig':_0x91f1b7};}function validateFlowClassification(_0x3cc59f,_0x163f56){const _0x223698=a299_0xf05f06;if(!isRecord(_0x3cc59f['flowJson']))return;const _0x3ee5b4=_0x3cc59f[_0x223698(0x2b4)],_0x482d36=_0x3cc59f[_0x223698(0x1ef)]['pageMode'];_0x482d36!==undefined&&(typeof _0x482d36!==_0x223698(0x2dd)||!FLOW_PAGE_MODES[_0x223698(0x2e6)](_0x482d36))&&_0x163f56[_0x223698(0x2b2)]({'path':_0x223698(0x2b3),'message':_0x223698(0x326)+String(_0x482d36)+'.'});_0x3ee5b4===_0x223698(0x23d)&&_0x482d36!==undefined&&_0x163f56['push']({'path':'flowJson.pageMode','message':_0x223698(0x31b)});_0x3ee5b4===_0x223698(0x249)&&_0x482d36==='PLATFORM_FORM'&&_0x163f56[_0x223698(0x2b2)]({'path':'flowJson.pageMode','message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x3ee5b4==='FORM_FLOW'||_0x3ee5b4===_0x223698(0x249))&&validateCustomPageNavigation(_0x3cc59f,_0x3ee5b4,_0x482d36,_0x163f56);if(_0x3ee5b4!=='FORM_FLOW'||!Array[_0x223698(0x213)](_0x3cc59f['flowJson'][_0x223698(0x23b)]))return;_0x3cc59f[_0x223698(0x1ef)]['nodes'][_0x223698(0x309)]((_0x232ee0,_0x54319b)=>{const _0x234e9d=_0x223698;isRecord(_0x232ee0)&&_0x232ee0[_0x234e9d(0x265)]===_0x234e9d(0x282)&&_0x232ee0[_0x234e9d(0x1fd)]==='HANDLE'&&_0x163f56['push']({'path':_0x234e9d(0x2b1)+_0x54319b+_0x234e9d(0x1da),'message':_0x234e9d(0x20a)});});}function validateCustomPageNavigation(_0x3fad7e,_0x4c0c55,_0x1d782b,_0x2e9e90){const _0x4a1838=a299_0xf05f06,_0x4c88c9=_0x3fad7e[_0x4a1838(0x1ef)][_0x4a1838(0x1e4)];_0x4c88c9!==undefined&&_0x2e9e90['push']({'path':_0x4a1838(0x230),'message':'startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.'});const _0xaf57e2=_0x3fad7e[_0x4a1838(0x1ef)][_0x4a1838(0x1e1)];_0xaf57e2!==undefined&&(typeof _0xaf57e2!==_0x4a1838(0x2dd)||_0xaf57e2[_0x4a1838(0x284)]()==='')&&_0x2e9e90[_0x4a1838(0x2b2)]({'path':_0x4a1838(0x210),'message':_0x4a1838(0x1db)});const _0x3e2594=Array[_0x4a1838(0x213)](_0x3fad7e['flowJson'][_0x4a1838(0x23b)])?_0x3fad7e['flowJson']['nodes'][_0x4a1838(0x273)]((_0xecf86a,_0x4ce29a)=>({'node':_0xecf86a,'index':_0x4ce29a}))[_0x4a1838(0x29f)](({node:_0x3ec9f1})=>isRecord(_0x3ec9f1)&&_0x3ec9f1['path']!==undefined):[],_0x457442=_0xaf57e2!==undefined||_0x3e2594[_0x4a1838(0x2c4)]>0x0,_0x193bf7=_0x1d782b===undefined&&_0x4c0c55===_0x4a1838(0x249)?_0x4a1838(0x271):_0x1d782b;_0x457442&&(_0x4c0c55!=='INDEPENDENT_FLOW'||_0x193bf7!=='CUSTOM_PAGE')&&(_0xaf57e2!==undefined&&_0x2e9e90[_0x4a1838(0x2b2)]({'path':_0x4a1838(0x210),'message':_0x4a1838(0x1d2)}),_0x3e2594['forEach'](({index:_0x37b10c})=>{const _0x115a64=_0x4a1838;_0x2e9e90[_0x115a64(0x2b2)]({'path':_0x115a64(0x2b1)+_0x37b10c+'].path','message':_0x115a64(0x21e)});}));}export async function writeNormalizedFlowConfig(_0x48f14f,_0x4d2c95,_0x10d777={}){const _0x53c2bb=a299_0xf05f06,_0xe1c717=resolve(_0x48f14f),_0xfe0bea=_0xe1c717+'.'+process[_0x53c2bb(0x247)]+'.'+randomUUID()+_0x53c2bb(0x2cb),_0x19bda3=JSON[_0x53c2bb(0x251)](_0x4d2c95,null,0x2)+'\x0a';let _0x5299d6;try{try{_0x5299d6=(await stat(_0xe1c717))[_0x53c2bb(0x2ca)]&0x1ff;}catch{_0x5299d6=undefined;}await writeFile(_0xfe0bea,_0x19bda3,{'encoding':_0x53c2bb(0x327),'flag':'wx','mode':_0x5299d6??0x1a4});if(_0x5299d6!==undefined)await chmod(_0xfe0bea,_0x5299d6);_0x10d777[_0x53c2bb(0x1d7)]===![]?(await link(_0xfe0bea,_0xe1c717),await unlink(_0xfe0bea)):await rename(_0xfe0bea,_0xe1c717);}finally{await unlink(_0xfe0bea)[_0x53c2bb(0x1ff)](()=>undefined);}}function validateOuterMetadata(_0x18eeea,_0x3d221b){const _0x55a307=a299_0xf05f06;(typeof _0x18eeea[_0x55a307(0x1dc)]!==_0x55a307(0x2dd)||_0x18eeea[_0x55a307(0x1dc)][_0x55a307(0x284)]()==='')&&_0x3d221b[_0x55a307(0x2b2)]({'path':_0x55a307(0x1dc),'message':'flowName\x20is\x20required.'});_0x18eeea['flowDesc']!==undefined&&typeof _0x18eeea[_0x55a307(0x211)]!==_0x55a307(0x2dd)&&_0x3d221b[_0x55a307(0x2b2)]({'path':_0x55a307(0x211),'message':_0x55a307(0x2d1)});if(_0x18eeea[_0x55a307(0x2b4)]===undefined||_0x18eeea[_0x55a307(0x2b4)]===null)_0x3d221b[_0x55a307(0x2b2)]({'path':'flowType','message':_0x55a307(0x315)});else(typeof _0x18eeea[_0x55a307(0x2b4)]!==_0x55a307(0x2dd)||!FLOW_TYPES[_0x55a307(0x2e6)](_0x18eeea['flowType']))&&_0x3d221b['push']({'path':'flowType','message':_0x55a307(0x2a9)+String(_0x18eeea['flowType'])+'.'});_0x18eeea['datasetCode']!==undefined&&typeof _0x18eeea[_0x55a307(0x2ae)]!==_0x55a307(0x2dd)&&_0x3d221b['push']({'path':_0x55a307(0x2ae),'message':_0x55a307(0x21b)});_0x18eeea[_0x55a307(0x302)]===undefined&&_0x18eeea[_0x55a307(0x1de)]!==undefined&&(!Number[_0x55a307(0x23a)](_0x18eeea[_0x55a307(0x1de)])||_0x18eeea[_0x55a307(0x1de)]<=0x0)&&_0x3d221b['push']({'path':_0x55a307(0x1de),'message':_0x55a307(0x312)});if(_0x18eeea[_0x55a307(0x302)]!==undefined){if(!Array[_0x55a307(0x213)](_0x18eeea[_0x55a307(0x302)])||_0x18eeea['pageIds'][_0x55a307(0x24a)](_0x3aeb65=>!Number['isSafeInteger'](_0x3aeb65)||_0x3aeb65<=0x0))_0x3d221b[_0x55a307(0x2b2)]({'path':_0x55a307(0x302),'message':_0x55a307(0x1ca)});else[...new Set(_0x18eeea[_0x55a307(0x302)])]['join'](',')[_0x55a307(0x2c4)]>0x800&&_0x3d221b[_0x55a307(0x2b2)]({'path':_0x55a307(0x302),'message':_0x55a307(0x298)});_0x18eeea['flowType']===_0x55a307(0x249)&&Array[_0x55a307(0x213)](_0x18eeea['pageIds'])&&_0x18eeea[_0x55a307(0x302)][_0x55a307(0x2c4)]>0x0&&_0x3d221b[_0x55a307(0x2b2)]({'path':_0x55a307(0x302),'message':_0x55a307(0x1e0)});}_0x18eeea[_0x55a307(0x2b4)]===_0x55a307(0x249)&&_0x18eeea[_0x55a307(0x2ae)]!==undefined&&_0x3d221b[_0x55a307(0x2b2)]({'path':'datasetCode','message':_0x55a307(0x214)}),_0x18eeea[_0x55a307(0x2b4)]===_0x55a307(0x249)&&_0x18eeea[_0x55a307(0x302)]===undefined&&_0x18eeea[_0x55a307(0x1de)]!==undefined&&_0x3d221b[_0x55a307(0x2b2)]({'path':'pageId','message':_0x55a307(0x20d)});}function validateGraph(_0x4e5afe,_0x615846){const _0x582a1=a299_0xf05f06;if(!isRecord(_0x4e5afe)){_0x615846['push']({'path':_0x582a1(0x1ef),'message':_0x582a1(0x237)});return;}!Array[_0x582a1(0x213)](_0x4e5afe[_0x582a1(0x23b)])&&_0x615846[_0x582a1(0x2b2)]({'path':_0x582a1(0x286),'message':_0x582a1(0x222)});!Array[_0x582a1(0x213)](_0x4e5afe['edges'])&&_0x615846[_0x582a1(0x2b2)]({'path':_0x582a1(0x2bb),'message':_0x582a1(0x1d6)});Object[_0x582a1(0x30e)][_0x582a1(0x297)][_0x582a1(0x331)](_0x4e5afe,_0x582a1(0x324))&&_0x615846[_0x582a1(0x2b2)]({'path':_0x582a1(0x2cf),'message':_0x582a1(0x2bd)+String(_0x4e5afe['schemaVersion'])+_0x582a1(0x285)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x5c8568 of[_0x582a1(0x299),'formDefinitions',_0x582a1(0x22a)]){Object[_0x582a1(0x30e)][_0x582a1(0x297)]['call'](_0x4e5afe,_0x5c8568)&&_0x615846[_0x582a1(0x2b2)]({'path':_0x582a1(0x25c)+_0x5c8568,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array['isArray'](_0x4e5afe[_0x582a1(0x23b)])||!Array[_0x582a1(0x213)](_0x4e5afe[_0x582a1(0x329)]))return;const _0x3a832a=new Map(),_0x538061=[],_0x3d8ba6=[],_0x2fadcb=new Map(),_0x27f8ad=new Map(),_0x1b97e2=new Set();let _0x462234=0x0;_0x4e5afe[_0x582a1(0x23b)][_0x582a1(0x309)]((_0x39fa72,_0x2634b3)=>{const _0x55ec8d=_0x582a1,_0x439533=_0x55ec8d(0x2b1)+_0x2634b3+']';if(!isRecord(_0x39fa72)){_0x615846[_0x55ec8d(0x2b2)]({'path':_0x439533,'message':'node\x20must\x20be\x20an\x20object.'});return;}const _0x29e50c=_0x39fa72;if(typeof _0x29e50c['id']!==_0x55ec8d(0x2dd)||!BPMN_ID_PATTERN[_0x55ec8d(0x288)](_0x29e50c['id']))_0x615846[_0x55ec8d(0x2b2)]({'path':_0x439533+_0x55ec8d(0x22f),'message':_0x55ec8d(0x226)});else _0x3a832a[_0x55ec8d(0x2e6)](_0x29e50c['id'])?_0x615846[_0x55ec8d(0x2b2)]({'path':_0x439533+'.id','message':_0x55ec8d(0x2ec)+_0x29e50c['id']+'.'}):(_0x3a832a[_0x55ec8d(0x328)](_0x29e50c['id'],_0x29e50c),_0x1b97e2[_0x55ec8d(0x29b)](_0x29e50c['id']));if(!NODE_TYPES['has'](_0x29e50c[_0x55ec8d(0x265)]))_0x615846[_0x55ec8d(0x2b2)]({'path':_0x439533+_0x55ec8d(0x2c5),'message':_0x55ec8d(0x314)+String(_0x29e50c[_0x55ec8d(0x265)])+'.'});else{if(_0x29e50c[_0x55ec8d(0x265)]===_0x55ec8d(0x2f7))_0x538061[_0x55ec8d(0x2b2)](_0x29e50c['id']);else _0x29e50c[_0x55ec8d(0x265)]==='END'&&_0x3d8ba6[_0x55ec8d(0x2b2)](_0x29e50c['id']);}_0x29e50c[_0x55ec8d(0x265)]===_0x55ec8d(0x282)&&(_0x29e50c['taskMode']===undefined||_0x29e50c[_0x55ec8d(0x1fd)]===_0x55ec8d(0x282))&&(_0x462234+=0x1);validateNode(_0x29e50c,_0x439533,_0x615846);if(_0x29e50c[_0x55ec8d(0x265)]===_0x55ec8d(0x20f)){const _0x221910=resolveEffectiveResultVariable(_0x29e50c[_0x55ec8d(0x252)],![]);_0x221910&&(registerResultVariableOwner(_0x27f8ad,_0x221910,_0x29e50c['id'],_0x615846),!_0x2fadcb['has'](_0x221910)&&_0x2fadcb[_0x55ec8d(0x328)](_0x221910,_0x29e50c['id']));}if(_0x29e50c[_0x55ec8d(0x265)]==='APPROVAL'&&isRecord(_0x29e50c[_0x55ec8d(0x1f1)])&&_0x29e50c[_0x55ec8d(0x1f1)][_0x55ec8d(0x2ab)]===!![]&&_0x29e50c[_0x55ec8d(0x1f1)][_0x55ec8d(0x279)]===_0x55ec8d(0x2a6)){const _0x5df128=resolveEffectiveResultVariable(_0x29e50c[_0x55ec8d(0x1f1)][_0x55ec8d(0x252)],!![]);_0x5df128&&registerResultVariableOwner(_0x27f8ad,_0x5df128,_0x29e50c['id']+_0x55ec8d(0x293),_0x615846);}});_0x538061[_0x582a1(0x2c4)]!==0x1&&_0x615846[_0x582a1(0x2b2)]({'path':'flowJson.nodes','message':_0x582a1(0x2b8)});_0x3d8ba6[_0x582a1(0x2c4)]===0x0&&_0x615846[_0x582a1(0x2b2)]({'path':_0x582a1(0x286),'message':_0x582a1(0x28b)});const _0x46fdcd=new Map(),_0x21e032=new Map(),_0x3eea26=new Map(),_0x41f17e=new Set();_0x4e5afe['edges']['forEach']((_0x43f514,_0x16ed49)=>{const _0x8f5005=_0x582a1,_0x541ce9=_0x8f5005(0x2d3)+_0x16ed49+']';if(!isRecord(_0x43f514)){_0x615846[_0x8f5005(0x2b2)]({'path':_0x541ce9,'message':_0x8f5005(0x2e8)});return;}const _0x4fed9e=_0x43f514;_0x3eea26['set'](_0x4fed9e,_0x541ce9);const _0x548071=resolveEdgeEndpoint(_0x4fed9e[_0x8f5005(0x30a)],_0x4fed9e[_0x8f5005(0x2f0)]),_0x450ca7=resolveEdgeEndpoint(_0x4fed9e[_0x8f5005(0x216)],_0x4fed9e[_0x8f5005(0x23c)]);if(!_0x548071)_0x615846[_0x8f5005(0x2b2)]({'path':_0x541ce9+_0x8f5005(0x1e3),'message':_0x8f5005(0x330)});if(!_0x450ca7)_0x615846[_0x8f5005(0x2b2)]({'path':_0x541ce9+'.target','message':_0x8f5005(0x23f)});_0x548071&&!_0x3a832a[_0x8f5005(0x2e6)](_0x548071)&&_0x615846[_0x8f5005(0x2b2)]({'path':_0x541ce9+'.source','message':_0x8f5005(0x203)+_0x548071+'.'});_0x450ca7&&!_0x3a832a[_0x8f5005(0x2e6)](_0x450ca7)&&_0x615846['push']({'path':_0x541ce9+_0x8f5005(0x205),'message':'Edge\x20target\x20node\x20not\x20found:\x20'+_0x450ca7+'.'});if(_0x4fed9e['id']!==undefined){if(typeof _0x4fed9e['id']!=='string'||!BPMN_ID_PATTERN[_0x8f5005(0x288)](_0x4fed9e['id']))_0x615846['push']({'path':_0x541ce9+_0x8f5005(0x22f),'message':'edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else{if(_0x1b97e2['has'](_0x4fed9e['id']))_0x615846[_0x8f5005(0x2b2)]({'path':_0x541ce9+_0x8f5005(0x22f),'message':_0x8f5005(0x2e9)+_0x4fed9e['id']+'.'});else!_0x1b97e2[_0x8f5005(0x2e6)](_0x4fed9e['id'])&&_0x1b97e2[_0x8f5005(0x29b)](_0x4fed9e['id']);}}if(_0x548071&&_0x450ca7){const _0x2cf12d=_0x548071+'\x00'+_0x450ca7+'\x00'+(_0x4fed9e['conditionType']??_0x8f5005(0x2fb));_0x41f17e[_0x8f5005(0x2e6)](_0x2cf12d)?_0x615846['push']({'path':_0x541ce9,'message':_0x8f5005(0x243)+_0x548071+_0x8f5005(0x20b)+_0x450ca7+'\x20('+(_0x4fed9e[_0x8f5005(0x2b7)]??_0x8f5005(0x2fb))+').'}):_0x41f17e['add'](_0x2cf12d);}validateEdge(_0x4fed9e,_0x541ce9,_0x615846),_0x548071&&_0x450ca7&&(_0x46fdcd[_0x8f5005(0x24e)](_0x548071)?.['push'](_0x4fed9e)??_0x46fdcd[_0x8f5005(0x328)](_0x548071,[_0x4fed9e]),_0x21e032['get'](_0x450ca7)?.[_0x8f5005(0x2b2)](_0x4fed9e)??_0x21e032['set'](_0x450ca7,[_0x4fed9e]));});if(_0x538061[_0x582a1(0x2c4)]!==0x1)return;validateGraphShape(_0x3a832a,_0x538061[0x0],_0x3d8ba6,_0x46fdcd,_0x21e032,_0x3eea26,_0x615846),validateScriptResultReferences(_0x3a832a,_0x538061[0x0],_0x46fdcd,_0x21e032,_0x3eea26,_0x2fadcb,_0x615846),validateApprovalResults(_0x3a832a,_0x462234,_0x3d8ba6,_0x615846);}function validateNode(_0x8480d2,_0x3aa715,_0x24cb29){const _0x33884c=a299_0xf05f06;for(const _0x4a4b22 of['form',_0x33884c(0x311)]){Object[_0x33884c(0x30e)][_0x33884c(0x297)][_0x33884c(0x331)](_0x8480d2,_0x4a4b22)&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+'.'+_0x4a4b22,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x33884c(0x2e6)](_0x8480d2[_0x33884c(0x265)]))return;(typeof _0x8480d2[_0x33884c(0x246)]!=='string'||_0x8480d2[_0x33884c(0x246)]['trim']()==='')&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+'.name','message':_0x33884c(0x250)});_0x8480d2[_0x33884c(0x1de)]!==undefined&&_0x24cb29['push']({'path':_0x3aa715+_0x33884c(0x2b0),'message':'node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.'});if(_0x8480d2['path']!==undefined){if(typeof _0x8480d2[_0x33884c(0x2a1)]!==_0x33884c(0x2dd)||_0x8480d2[_0x33884c(0x2a1)][_0x33884c(0x284)]()==='')_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x2ba),'message':'node\x20path\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x8480d2[_0x33884c(0x265)]!==_0x33884c(0x282)&&_0x8480d2[_0x33884c(0x265)]!==_0x33884c(0x2ff)&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x2ba),'message':_0x33884c(0x333)});}const _0x98d287=_0x8480d2[_0x33884c(0x1d9)];if(!isRecord(_0x98d287))_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x27d),'message':_0x33884c(0x233)});else for(const _0x820b86 of['x','y']){const _0x343390=_0x98d287[_0x820b86];(typeof _0x343390!==_0x33884c(0x220)||!Number[_0x33884c(0x275)](_0x343390)||_0x343390<0x0)&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x31f)+_0x820b86,'message':_0x33884c(0x1f4)+_0x820b86+_0x33884c(0x2ce)});}if(_0x8480d2[_0x33884c(0x265)]===_0x33884c(0x282)){const _0x445023=_0x8480d2['approvalMode']??_0x33884c(0x22c),_0x15b455=_0x8480d2['taskMode']??_0x33884c(0x282);!APPROVAL_TASK_MODES[_0x33884c(0x2e6)](_0x15b455)&&_0x24cb29['push']({'path':_0x3aa715+_0x33884c(0x2a3),'message':'Unsupported\x20task\x20mode:\x20'+String(_0x15b455)+'.'});!APPROVAL_MODES[_0x33884c(0x2e6)](_0x445023)&&_0x24cb29['push']({'path':_0x3aa715+_0x33884c(0x2c8),'message':_0x33884c(0x272)+String(_0x445023)+'.'});if(!isRecord(_0x8480d2[_0x33884c(0x25f)]))_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x248),'message':_0x33884c(0x2a2)});else{const _0x232d24=_0x8480d2[_0x33884c(0x25f)][_0x33884c(0x31e)];_0x232d24!==_0x33884c(0x234)&&_0x232d24!==_0x33884c(0x24b)&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x2ef),'message':'assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.'});if(_0x232d24===_0x33884c(0x234)){const _0xd063c9=_0x8480d2['assignee'][_0x33884c(0x256)];if(!Array[_0x33884c(0x213)](_0xd063c9)||_0xd063c9['length']===0x0)_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x201),'message':'FIXED\x20assignee\x20requires\x20userIds.'});else{const _0x1748a9=_0xd063c9[_0x33884c(0x268)](_0x3b6e62=>!isValidUserId(_0x3b6e62));_0x1748a9>=0x0&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x2e0)+_0x1748a9+']','message':_0x33884c(0x212)});const _0x5d15ea=new Set(_0xd063c9['filter'](isValidUserId)[_0x33884c(0x273)](_0x5c5a0a=>String(_0x5c5a0a)[_0x33884c(0x284)]()));_0x445023===_0x33884c(0x22c)&&_0x5d15ea[_0x33884c(0x25e)]>0x1&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x201),'message':_0x33884c(0x28d)});}}if(_0x232d24===_0x33884c(0x24b)){const _0x39185c=_0x8480d2[_0x33884c(0x25f)][_0x33884c(0x254)],_0x47688c=typeof _0x39185c===_0x33884c(0x220)||typeof _0x39185c===_0x33884c(0x2dd)?Number(String(_0x39185c)['trim']()):Number['NaN'];(!Number[_0x33884c(0x23a)](_0x47688c)||_0x47688c<=0x0)&&_0x24cb29['push']({'path':_0x3aa715+_0x33884c(0x2f2),'message':'ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.'});}}if(_0x8480d2[_0x33884c(0x325)]!==undefined){if(!isRecord(_0x8480d2[_0x33884c(0x325)]))_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x1ec),'message':_0x33884c(0x1c6)});else{if(_0x8480d2['transferCandidates'][_0x33884c(0x31e)]!==_0x33884c(0x234))_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x267),'message':_0x33884c(0x1dd)});else{const _0x3bc085=_0x8480d2[_0x33884c(0x325)]['userIds'];if(!Array[_0x33884c(0x213)](_0x3bc085)||_0x3bc085[_0x33884c(0x2c4)]===0x0)_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+'.transferCandidates.userIds','message':_0x33884c(0x294)});else{const _0x2d4200=_0x3bc085[_0x33884c(0x268)](_0x15a49b=>!isValidUserId(_0x15a49b));_0x2d4200>=0x0&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x2af)+_0x2d4200+']','message':'transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.'});}}}}}_0x8480d2[_0x33884c(0x2ed)]!==undefined&&typeof _0x8480d2['sequential']!=='boolean'&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x319),'message':_0x33884c(0x21c)});if(_0x8480d2[_0x33884c(0x265)]===_0x33884c(0x20f)){(typeof _0x8480d2[_0x33884c(0x259)]!==_0x33884c(0x2dd)||_0x8480d2[_0x33884c(0x259)][_0x33884c(0x284)]()==='')&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x31d),'message':_0x33884c(0x27e)});if(_0x8480d2[_0x33884c(0x252)]!==undefined){if(typeof _0x8480d2['resultVariable']!==_0x33884c(0x2dd)||!VARIABLE_PATTERN[_0x33884c(0x288)](_0x8480d2[_0x33884c(0x252)]))_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x32e),'message':_0x33884c(0x1cc)});else(RESERVED_RESULT_VARIABLES[_0x33884c(0x2e6)](_0x8480d2[_0x33884c(0x252)])||_0x8480d2[_0x33884c(0x252)]['startsWith'](_0x33884c(0x292)))&&_0x24cb29[_0x33884c(0x2b2)]({'path':_0x3aa715+_0x33884c(0x32e),'message':'Reserved\x20resultVariable:\x20'+_0x8480d2[_0x33884c(0x252)]+'.'});}}validateAsyncExecution(_0x8480d2,_0x3aa715,_0x24cb29),validateApprovalTimeout(_0x8480d2,_0x3aa715,_0x24cb29),validateCcConfig(_0x8480d2,_0x3aa715,_0x24cb29),_0x8480d2[_0x33884c(0x265)]===_0x33884c(0x264)&&validateNotificationConfig(_0x8480d2['config'],_0x3aa715+_0x33884c(0x2ea),_0x24cb29);}function validateAsyncExecution(_0x5910e0,_0x3d8ddc,_0x1735cf){const _0x5cb959=a299_0xf05f06;if(_0x5910e0[_0x5cb959(0x2da)]===undefined)return;if(!isRecord(_0x5910e0[_0x5cb959(0x2da)])){_0x1735cf[_0x5cb959(0x2b2)]({'path':_0x3d8ddc+_0x5cb959(0x32b),'message':_0x5cb959(0x27c)});return;}if(_0x5910e0[_0x5cb959(0x2da)][_0x5cb959(0x2ab)]!==undefined&&typeof _0x5910e0[_0x5cb959(0x2da)][_0x5cb959(0x2ab)]!==_0x5cb959(0x228)){_0x1735cf[_0x5cb959(0x2b2)]({'path':_0x3d8ddc+_0x5cb959(0x2e5),'message':_0x5cb959(0x1d1)});return;}if(_0x5910e0[_0x5cb959(0x2da)][_0x5cb959(0x2ab)]!==!![])return;_0x5910e0[_0x5cb959(0x265)]!=='SCRIPT'&&_0x1735cf[_0x5cb959(0x2b2)]({'path':_0x3d8ddc+_0x5cb959(0x32b),'message':_0x5cb959(0x269)});const _0x5ad036=_0x5910e0[_0x5cb959(0x2da)][_0x5cb959(0x1e5)]??0x3;(!Number[_0x5cb959(0x22d)](_0x5ad036)||_0x5ad036<0x1||_0x5ad036>MAX_ASYNC_RETRY_COUNT)&&_0x1735cf[_0x5cb959(0x2b2)]({'path':_0x3d8ddc+'.async.retryCount','message':_0x5cb959(0x217)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x5910e0[_0x5cb959(0x2da)][_0x5cb959(0x32c)]!==undefined&&validateTimeAmount(_0x5910e0[_0x5cb959(0x2da)][_0x5cb959(0x32c)],_0x3d8ddc+_0x5cb959(0x260),_0x1735cf);}function validateApprovalTimeout(_0x50e3fa,_0x45a3f4,_0x1c7d1b){const _0x3e25e3=a299_0xf05f06;if(_0x50e3fa[_0x3e25e3(0x1f1)]===undefined)return;if(!isRecord(_0x50e3fa[_0x3e25e3(0x1f1)])){_0x1c7d1b[_0x3e25e3(0x2b2)]({'path':_0x45a3f4+_0x3e25e3(0x293),'message':_0x3e25e3(0x2e7)});return;}if(_0x50e3fa[_0x3e25e3(0x1f1)][_0x3e25e3(0x2ab)]!==undefined&&typeof _0x50e3fa[_0x3e25e3(0x1f1)][_0x3e25e3(0x2ab)]!==_0x3e25e3(0x228)){_0x1c7d1b['push']({'path':_0x45a3f4+_0x3e25e3(0x1cb),'message':_0x3e25e3(0x289)});return;}if(_0x50e3fa[_0x3e25e3(0x1f1)]['enabled']!==!![])return;if(_0x50e3fa[_0x3e25e3(0x1f1)][_0x3e25e3(0x290)]!==undefined&&typeof _0x50e3fa[_0x3e25e3(0x1f1)][_0x3e25e3(0x290)]!=='boolean'){_0x1c7d1b[_0x3e25e3(0x2b2)]({'path':_0x45a3f4+_0x3e25e3(0x1cd),'message':_0x3e25e3(0x32f)});return;}_0x50e3fa[_0x3e25e3(0x265)]!==_0x3e25e3(0x282)&&_0x1c7d1b[_0x3e25e3(0x2b2)]({'path':_0x45a3f4+_0x3e25e3(0x293),'message':'timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.'});validateTimeAmount(_0x50e3fa[_0x3e25e3(0x1f1)][_0x3e25e3(0x323)],_0x45a3f4+'.timeout.duration',_0x1c7d1b);const _0x42f5f9=_0x50e3fa['timeout'][_0x3e25e3(0x279)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x3e25e3(0x2e6)](_0x42f5f9)){_0x1c7d1b[_0x3e25e3(0x2b2)]({'path':_0x45a3f4+'.timeout.action','message':_0x3e25e3(0x1f2)});return;}(_0x50e3fa[_0x3e25e3(0x1fd)]??_0x3e25e3(0x282))===_0x3e25e3(0x1d5)&&_0x42f5f9!==_0x3e25e3(0x2a6)&&_0x1c7d1b[_0x3e25e3(0x2b2)]({'path':_0x45a3f4+'.timeout.action','message':_0x3e25e3(0x32a)});const _0x5e1d00=_0x50e3fa['timeout'][_0x3e25e3(0x290)]??_0x42f5f9!==_0x3e25e3(0x2a6);if(_0x42f5f9==='EXECUTE_BFF')_0x5e1d00&&_0x1c7d1b['push']({'path':_0x45a3f4+_0x3e25e3(0x1cd),'message':'EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.'}),(typeof _0x50e3fa[_0x3e25e3(0x1f1)]['scriptName']!==_0x3e25e3(0x2dd)||_0x50e3fa[_0x3e25e3(0x1f1)]['scriptName'][_0x3e25e3(0x284)]()==='')&&_0x1c7d1b[_0x3e25e3(0x2b2)]({'path':_0x45a3f4+_0x3e25e3(0x304),'message':'EXECUTE_BFF\x20timeout\x20requires\x20scriptName.'}),validateOptionalResultVariable(_0x50e3fa[_0x3e25e3(0x1f1)][_0x3e25e3(0x252)],_0x45a3f4+'.timeout.resultVariable',_0x1c7d1b);else!_0x5e1d00&&_0x1c7d1b[_0x3e25e3(0x2b2)]({'path':_0x45a3f4+'.timeout.interrupting','message':_0x42f5f9+_0x3e25e3(0x1eb)});}function validateTimeAmount(_0x15f04b,_0x1832bf,_0x34494c){const _0x2cb78c=a299_0xf05f06;if(!isRecord(_0x15f04b)){_0x34494c[_0x2cb78c(0x2b2)]({'path':_0x1832bf,'message':_0x2cb78c(0x2e4)});return;}(!Number[_0x2cb78c(0x22d)](_0x15f04b[_0x2cb78c(0x2f9)])||Number(_0x15f04b['value'])<=0x0)&&_0x34494c['push']({'path':_0x1832bf+_0x2cb78c(0x1df),'message':_0x2cb78c(0x300)}),!FLOW_TIME_UNITS[_0x2cb78c(0x2e6)](_0x15f04b[_0x2cb78c(0x2a5)])&&_0x34494c[_0x2cb78c(0x2b2)]({'path':_0x1832bf+_0x2cb78c(0x2a7),'message':'duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.'});}function validateOptionalResultVariable(_0x434522,_0x4848bc,_0x4ac8fc){const _0x30d413=a299_0xf05f06;if(_0x434522===undefined||_0x434522===null||_0x434522==='')return;if(typeof _0x434522!==_0x30d413(0x2dd)||!VARIABLE_PATTERN['test'](_0x434522))_0x4ac8fc[_0x30d413(0x2b2)]({'path':_0x4848bc,'message':_0x30d413(0x1cc)});else(RESERVED_RESULT_VARIABLES[_0x30d413(0x2e6)](_0x434522)||_0x434522[_0x30d413(0x2f4)]('approval_sys_'))&&_0x4ac8fc[_0x30d413(0x2b2)]({'path':_0x4848bc,'message':_0x30d413(0x291)+_0x434522+'.'});}function a299_0x40f3(){const _0x57fd14=['pageId','.value','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.','startPath','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','.source','startPageId','retryCount','AUTO_APPROVE','waypoint.','.detailMarkdown','title','defaultFlow','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','.transferCandidates','expression','delete','flowJson','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','timeout','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','.url','position.','.defaultFlow','message','approval_sys_dataId','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','CONTINUE','failurePolicy','waypoints\x20must\x20be\x20an\x20array.','.cc','taskMode','approval.simple-flow.v1','catch','#/$defs/timeAmount','.assignee.userIds','752oJfzix','Edge\x20source\x20node\x20not\x20found:\x20','readSources','.target','object','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','ANY','\x20is\x20required.','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','\x20->\x20','detailMarkdown','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','metadata','SCRIPT','flowJson.startPath','flowDesc','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','isArray','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','HOURS','target','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','Notification\x20action.url\x20is\x20required.','empty_metadata_removed','datasetCode\x20must\x20be\x20a\x20string.','sequential\x20must\x20be\x20a\x20boolean.','actions','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','.waypoints[','number','833200oZLLgu','nodes\x20must\x20be\x20an\x20array.','ALL','Notification\x20recipient\x20must\x20be\x20an\x20object.','https://lovrabet.com/schema/rabetbase-flow-config.json','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','approval_sys_operationType','boolean','.configCode','formPermissions','.facts','SINGLE','isInteger','Rabetbase\x20FlowConfig','.id','flowJson.startPageId','4lNQZwa','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','FIXED','Node\x20has\x20no\x20incoming\x20edge.','2699620AzIIRt','flowJson\x20must\x20be\x20an\x20object.','value\x20must\x20be\x20a\x20non-empty\x20string.','CONDITION','isSafeInteger','nodes','targetNodeId','FORM_FLOW','1597216iiXzqL','edge\x20target\x20is\x20required.','Notification\x20action\x20must\x20be\x20an\x20object.',',\x20but\x20node\x20','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','Duplicate\x20edge\x20route:\x20','AUTO_REJECT','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','name','pid','.assignee','INDEPENDENT_FLOW','some','ROLE','DAYS','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','get','configCode','Every\x20node\x20requires\x20a\x20non-empty\x20name.','stringify','resultVariable','flowJson.nodes.','roleId','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','userIds','1388jtUbrH','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','scriptName','.waypoints','warnings','flowJson.','appCode','size','assignee','.async.retryInterval','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','^[1-9][0-9]*$','text','NOTIFICATION','type','defaultFlow\x20must\x20be\x20a\x20boolean.','.transferCandidates.strategy','findIndex','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','\x20users.','https://json-schema.org/draft/2020-12/schema','.role','.expression','.conditionType','approved','Notification\x20template.facts\x20must\x20be\x20an\x20array.','CUSTOM_PAGE','Unsupported\x20approval\x20mode:\x20','map','Notification\x20recipients\x20must\x20be\x20an\x20array.','isFinite','.text','547626hixkaF','USER','action','config','EMAIL','async\x20must\x20be\x20an\x20object.','.position','SCRIPT\x20node\x20requires\x20scriptName.','EXPRESSION','#/$defs/flowNode','Expression\x20references\x20SCRIPT\x20resultVariable\x20','APPROVAL','.version','trim','.\x20This\x20CLI\x20supports\x20only\x20','flowJson.nodes','.recipients','test','timeout.enabled\x20must\x20be\x20a\x20boolean.','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','APPROVED','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','\x20actions.','.cc.visible','interrupting','Reserved\x20resultVariable:\x20','approval_sys_','.timeout','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','Notification\x20template\x20supports\x20at\x20most\x20','hasOwnProperty','pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.','formSchema','recipients','add','failurePolicy\x20must\x20be\x20a\x20string.','approval_sys_initiatorUsername','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','filter','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','path','APPROVAL\x20node\x20requires\x20assignee.','.taskMode','variables','unit','EXECUTE_BFF','.unit','REJECTED','Unsupported\x20flowType:\x20','formData','enabled','.cc.recipientUserIds','summary','datasetCode','.transferCandidates.userIds[','.pageId','flowJson.nodes[','push','flowJson.pageMode','flowType','#/$defs/userId','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','conditionType','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','flowCode','.path','flowJson.edges','BCC','Unsupported\x20schemaVersion:\x20','#/$defs/position','Unsupported\x20notification\x20version:\x20','slice','Notification\x20version\x20must\x20be\x20a\x20string.','every','approval_sys_processInstanceId','length','.type','Notification\x20action.text\x20is\x20required.','5070348Oakllu','.approvalMode','indexOf','mode','.tmp','60053rFanZP','Notification\x20fact.','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','flowJson.schemaVersion','40fYlynH','flowDesc\x20must\x20be\x20a\x20string.','.cc.recipientUserIds[','flowJson.edges[','\x20was\x20empty\x20and\x20was\x20removed.','Node\x20is\x20not\x20reachable\x20from\x20START.','recipientUserIds','132PTIhyp','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','waypoints','async','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','edge\x20name\x20must\x20be\x20a\x20string.','string','includes','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','.assignee.userIds[','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','approval_sys_pageId','NOTIFICATION\x20node\x20requires\x20config.','duration\x20requires\x20value\x20and\x20unit.','.async.enabled','has','timeout\x20must\x20be\x20an\x20object.','edge\x20must\x20be\x20an\x20object.','Duplicate\x20BPMN\x20element\x20id:\x20','.config','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','Duplicate\x20node\x20id:\x20','sequential','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','.assignee.strategy','sourceNodeId','event','.assignee.roleId','.name','startsWith','version','cc\x20must\x20be\x20an\x20object.','START','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','value','toUpperCase','ALWAYS','Notification\x20template.','facts','FAIL','END','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','label','pageIds','bindDatasetCode','.timeout.scriptName','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','url','templateName','array','forEach','source','PLATFORM_FORM','integer','keys','prototype','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','.failurePolicy','formPermission','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','Unsupported\x20node\x20type:\x20','flowType\x20is\x20required.','role','result','approval_sys_initiatorUserId','.sequential','Unsupported\x20notification\x20placeholder:\x20','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','parse','.scriptName','strategy','.position.','Duplicate\x20cc\x20recipient\x20userId:\x20','entries','Node\x20has\x20no\x20outgoing\x20edge.','duration','schemaVersion','transferCandidates','Unsupported\x20pageMode:\x20','utf8','set','edges','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','.async','retryInterval','Node\x20cannot\x20reach\x20any\x20END.','.resultVariable','timeout.interrupting\x20must\x20be\x20a\x20boolean.','edge\x20source\x20is\x20required.','call','.template','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','template','pageMode','legacy_field_removed','matchAll','__rabetbase_local_validation__','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','transferCandidates\x20must\x20be\x20an\x20object.','\x20must\x20be\x20a\x20finite\x20number.','.cc.readSources','flowKey','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','.timeout.enabled','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.timeout.interrupting','^[A-Za-z_][A-Za-z0-9_]*$','MAX_SAFE_INTEGER','Notification\x20recipient.value\x20is\x20required.','async.enabled\x20must\x20be\x20a\x20boolean.','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','SECONDS','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','HANDLE','edges\x20must\x20be\x20an\x20array.','overwrite','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','position','].taskMode','startPath\x20must\x20be\x20a\x20non-empty\x20string.','flowName','transferCandidates\x20currently\x20supports\x20FIXED\x20only.'];a299_0x40f3=function(){return _0x57fd14;};return a299_0x40f3();}function validateCcConfig(_0x29140b,_0x45aead,_0x2dda6f){const _0x489c4f=a299_0xf05f06;if(_0x29140b['cc']===undefined)return;if(!isRecord(_0x29140b['cc'])){_0x2dda6f[_0x489c4f(0x2b2)]({'path':_0x45aead+_0x489c4f(0x1fc),'message':_0x489c4f(0x2f6)});return;}_0x29140b[_0x489c4f(0x265)]!=='END'&&_0x29140b[_0x489c4f(0x265)]!==_0x489c4f(0x282)&&_0x2dda6f[_0x489c4f(0x2b2)]({'path':_0x45aead+_0x489c4f(0x1fc),'message':_0x489c4f(0x1e2)});Object['prototype'][_0x489c4f(0x297)][_0x489c4f(0x331)](_0x29140b['cc'],_0x489c4f(0x204))&&_0x2dda6f[_0x489c4f(0x2b2)]({'path':_0x45aead+_0x489c4f(0x1c8),'message':UNSUPPORTED_FORM_MESSAGE});const _0x3f732c=_0x29140b['cc'][_0x489c4f(0x2d6)];if(!Array['isArray'](_0x3f732c)||_0x3f732c[_0x489c4f(0x2c4)]===0x0)_0x2dda6f[_0x489c4f(0x2b2)]({'path':_0x45aead+_0x489c4f(0x2ac),'message':_0x489c4f(0x1d4)});else{_0x3f732c['length']>MAX_CC_RECIPIENTS&&_0x2dda6f[_0x489c4f(0x2b2)]({'path':_0x45aead+_0x489c4f(0x2ac),'message':'cc.recipientUserIds\x20supports\x20at\x20most\x20'+MAX_CC_RECIPIENTS+_0x489c4f(0x26a)});const _0x2f75b1=new Set();_0x3f732c[_0x489c4f(0x309)]((_0x23e0a9,_0x2f868c)=>{const _0x1144c7=_0x489c4f;if(typeof _0x23e0a9!=='string'||_0x23e0a9[_0x1144c7(0x284)]()==='')_0x2dda6f['push']({'path':_0x45aead+_0x1144c7(0x2d2)+_0x2f868c+']','message':'cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x2f75b1[_0x1144c7(0x2e6)](_0x23e0a9['trim']())?_0x2dda6f[_0x1144c7(0x2b2)]({'path':_0x45aead+'.cc.recipientUserIds['+_0x2f868c+']','message':_0x1144c7(0x320)+_0x23e0a9[_0x1144c7(0x284)]()+'.'}):_0x2f75b1[_0x1144c7(0x29b)](_0x23e0a9['trim']());});}validateStringArray(_0x29140b['cc']['visible'],_0x45aead+_0x489c4f(0x28f),_0x2dda6f);}function validateStringArray(_0x12511a,_0x25254f,_0xb8aabd){const _0x334ea5=a299_0xf05f06;if(_0x12511a===undefined)return;if(!Array[_0x334ea5(0x213)](_0x12511a)){_0xb8aabd['push']({'path':_0x25254f,'message':'value\x20must\x20be\x20an\x20array.'});return;}const _0x30e4a1=new Set();_0x12511a[_0x334ea5(0x309)]((_0x3617e1,_0x2f7395)=>{const _0x363c73=_0x334ea5;if(typeof _0x3617e1!=='string'||_0x3617e1[_0x363c73(0x284)]()==='')_0xb8aabd[_0x363c73(0x2b2)]({'path':_0x25254f+'['+_0x2f7395+']','message':_0x363c73(0x238)});else _0x30e4a1[_0x363c73(0x2e6)](_0x3617e1['trim']())?_0xb8aabd[_0x363c73(0x2b2)]({'path':_0x25254f+'['+_0x2f7395+']','message':'Duplicate\x20value:\x20'+_0x3617e1[_0x363c73(0x284)]()+'.'}):_0x30e4a1[_0x363c73(0x29b)](_0x3617e1[_0x363c73(0x284)]());});}function validateNotificationConfig(_0x541fc3,_0x5cb27e,_0x17f96f){const _0x5ba426=a299_0xf05f06;if(!isRecord(_0x541fc3)){_0x17f96f[_0x5ba426(0x2b2)]({'path':_0x5cb27e,'message':_0x5ba426(0x2e3)});return;}if(_0x541fc3['version']!==undefined&&_0x541fc3[_0x5ba426(0x2f5)]!==null){if(typeof _0x541fc3[_0x5ba426(0x2f5)]!==_0x5ba426(0x2dd))_0x17f96f[_0x5ba426(0x2b2)]({'path':_0x5cb27e+_0x5ba426(0x283),'message':_0x5ba426(0x2c1)});else _0x541fc3['version'][_0x5ba426(0x284)]()&&_0x541fc3[_0x5ba426(0x2f5)]['trim']()!=='v1'&&_0x17f96f[_0x5ba426(0x2b2)]({'path':_0x5cb27e+_0x5ba426(0x283),'message':_0x5ba426(0x2bf)+_0x541fc3[_0x5ba426(0x2f5)]+'.'});}const _0x1079ef=requireNotificationString(_0x541fc3[_0x5ba426(0x24f)],_0x5cb27e+_0x5ba426(0x229),'Notification\x20configCode\x20is\x20required.',_0x17f96f);_0x1079ef?.['includes']('${')&&_0x17f96f[_0x5ba426(0x2b2)]({'path':_0x5cb27e+'.configCode','message':_0x5ba426(0x24d)});if(_0x541fc3['failurePolicy']!==undefined&&_0x541fc3[_0x5ba426(0x1fa)]!==null){if(typeof _0x541fc3[_0x5ba426(0x1fa)]!==_0x5ba426(0x2dd))_0x17f96f[_0x5ba426(0x2b2)]({'path':_0x5cb27e+_0x5ba426(0x310),'message':_0x5ba426(0x29c)});else!NOTIFICATION_FAILURE_POLICIES[_0x5ba426(0x2e6)](_0x541fc3[_0x5ba426(0x1fa)][_0x5ba426(0x284)]()[_0x5ba426(0x2fa)]())&&_0x17f96f[_0x5ba426(0x2b2)]({'path':_0x5cb27e+_0x5ba426(0x310),'message':_0x5ba426(0x29e)});}!isRecord(_0x541fc3[_0x5ba426(0x334)])?_0x17f96f['push']({'path':_0x5cb27e+_0x5ba426(0x332),'message':'NOTIFICATION\x20node\x20requires\x20template.'}):validateNotificationTemplate(_0x541fc3[_0x5ba426(0x334)],_0x5cb27e+_0x5ba426(0x332),_0x17f96f),validateNotificationRecipients(_0x541fc3[_0x5ba426(0x29a)],_0x5cb27e+_0x5ba426(0x287),_0x17f96f);}function validateNotificationTemplate(_0x18cc2d,_0x55a23a,_0x1fae7b){const _0x22f449=a299_0xf05f06;for(const _0x166189 of[_0x22f449(0x1e9),_0x22f449(0x2ad)]){const _0x531c1a=requireNotificationString(_0x18cc2d[_0x166189],_0x55a23a+'.'+_0x166189,_0x22f449(0x2fc)+_0x166189+_0x22f449(0x209),_0x1fae7b);if(_0x531c1a)validateNotificationPlaceholders(_0x531c1a,_0x55a23a+'.'+_0x166189,_0x1fae7b);}_0x18cc2d[_0x22f449(0x20c)]!==undefined&&_0x18cc2d[_0x22f449(0x20c)]!==null&&(typeof _0x18cc2d[_0x22f449(0x20c)]!=='string'?_0x1fae7b[_0x22f449(0x2b2)]({'path':_0x55a23a+_0x22f449(0x1e8),'message':_0x22f449(0x2d8)}):validateNotificationPlaceholders(_0x18cc2d['detailMarkdown'],_0x55a23a+'.detailMarkdown',_0x1fae7b)),validateNotificationFacts(_0x18cc2d[_0x22f449(0x2fd)],_0x55a23a+_0x22f449(0x22b),_0x1fae7b),validateNotificationActions(_0x18cc2d[_0x22f449(0x21d)],_0x55a23a+'.actions',_0x1fae7b);}function validateNotificationFacts(_0x507ea4,_0x80d0ae,_0x2da7be){const _0x363118=a299_0xf05f06;if(_0x507ea4===undefined||_0x507ea4===null)return;if(!Array['isArray'](_0x507ea4)){_0x2da7be[_0x363118(0x2b2)]({'path':_0x80d0ae,'message':_0x363118(0x270)});return;}_0x507ea4[_0x363118(0x2c4)]>MAX_NOTIFICATION_FACTS&&_0x2da7be['push']({'path':_0x80d0ae,'message':_0x363118(0x296)+MAX_NOTIFICATION_FACTS+'\x20facts.'}),_0x507ea4[_0x363118(0x309)]((_0x8ae1ab,_0x1e7fd8)=>{const _0x3b8800=_0x363118,_0x2f1bd6=_0x80d0ae+'['+_0x1e7fd8+']';if(!isRecord(_0x8ae1ab)){_0x2da7be[_0x3b8800(0x2b2)]({'path':_0x2f1bd6,'message':'Notification\x20fact\x20must\x20be\x20an\x20object.'});return;}for(const _0x49ee70 of[_0x3b8800(0x301),_0x3b8800(0x2f9)]){const _0x392789=requireNotificationString(_0x8ae1ab[_0x49ee70],_0x2f1bd6+'.'+_0x49ee70,_0x3b8800(0x2cd)+_0x49ee70+'\x20is\x20required.',_0x2da7be);_0x392789&&validateNotificationPlaceholders(_0x392789,_0x2f1bd6+'.'+_0x49ee70,_0x2da7be);}});}function validateNotificationActions(_0x12b30b,_0x347aad,_0x9d8876){const _0x544fe3=a299_0xf05f06;if(_0x12b30b===undefined||_0x12b30b===null)return;if(!Array[_0x544fe3(0x213)](_0x12b30b)){_0x9d8876[_0x544fe3(0x2b2)]({'path':_0x347aad,'message':'Notification\x20template.actions\x20must\x20be\x20an\x20array.'});return;}_0x12b30b[_0x544fe3(0x2c4)]>MAX_NOTIFICATION_ACTIONS&&_0x9d8876[_0x544fe3(0x2b2)]({'path':_0x347aad,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_ACTIONS+_0x544fe3(0x28e)}),_0x12b30b[_0x544fe3(0x309)]((_0x1cc75e,_0xb1a007)=>{const _0x7a3f0=_0x544fe3,_0x284ec3=_0x347aad+'['+_0xb1a007+']';if(!isRecord(_0x1cc75e)){_0x9d8876[_0x7a3f0(0x2b2)]({'path':_0x284ec3,'message':_0x7a3f0(0x240)});return;}const _0x59e4bd=requireNotificationString(_0x1cc75e[_0x7a3f0(0x263)],_0x284ec3+_0x7a3f0(0x276),_0x7a3f0(0x2c6),_0x9d8876);if(_0x59e4bd)validateNotificationPlaceholders(_0x59e4bd,_0x284ec3+_0x7a3f0(0x276),_0x9d8876);const _0x3eea14=requireNotificationString(_0x1cc75e[_0x7a3f0(0x306)],_0x284ec3+_0x7a3f0(0x1f3),_0x7a3f0(0x219),_0x9d8876);if(!_0x3eea14)return;validateNotificationPlaceholders(_0x3eea14,_0x284ec3+_0x7a3f0(0x1f3),_0x9d8876),!/^https?:\/\//i[_0x7a3f0(0x288)](_0x3eea14)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN['test'](_0x3eea14)&&_0x9d8876[_0x7a3f0(0x2b2)]({'path':_0x284ec3+_0x7a3f0(0x1f3),'message':_0x7a3f0(0x261)});});}function validateNotificationRecipients(_0x10c925,_0x44e43c,_0x4b38c3){const _0x252695=a299_0xf05f06;if(_0x10c925===undefined||_0x10c925===null)return;if(!Array['isArray'](_0x10c925)){_0x4b38c3[_0x252695(0x2b2)]({'path':_0x44e43c,'message':_0x252695(0x274)});return;}let _0x3023be=![];_0x10c925[_0x252695(0x309)]((_0x1fbcb8,_0x28c036)=>{const _0x1c0b86=_0x252695,_0x51d62a=_0x44e43c+'['+_0x28c036+']';if(!isRecord(_0x1fbcb8)){_0x4b38c3[_0x1c0b86(0x2b2)]({'path':_0x51d62a,'message':_0x1c0b86(0x224)});return;}const _0x265aef=requireNotificationString(_0x1fbcb8[_0x1c0b86(0x265)],_0x51d62a+_0x1c0b86(0x2c5),'Notification\x20recipient.type\x20is\x20required.',_0x4b38c3);_0x265aef&&!NOTIFICATION_RECIPIENT_TYPES[_0x1c0b86(0x2e6)](_0x265aef[_0x1c0b86(0x2fa)]())&&_0x4b38c3[_0x1c0b86(0x2b2)]({'path':_0x51d62a+'.type','message':'Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.'});let _0x522bc8='TO';_0x1fbcb8[_0x1c0b86(0x316)]!==undefined&&_0x1fbcb8['role']!==null&&(typeof _0x1fbcb8[_0x1c0b86(0x316)]!=='string'?(_0x4b38c3[_0x1c0b86(0x2b2)]({'path':_0x51d62a+_0x1c0b86(0x26c),'message':_0x1c0b86(0x305)}),_0x522bc8=''):(_0x522bc8=_0x1fbcb8[_0x1c0b86(0x316)][_0x1c0b86(0x284)]()[_0x1c0b86(0x2fa)](),!NOTIFICATION_RECIPIENT_ROLES[_0x1c0b86(0x2e6)](_0x522bc8)&&_0x4b38c3[_0x1c0b86(0x2b2)]({'path':_0x51d62a+_0x1c0b86(0x26c),'message':_0x1c0b86(0x258)})));if(_0x522bc8==='TO')_0x3023be=!![];const _0x28b134=requireNotificationString(_0x1fbcb8[_0x1c0b86(0x2f9)],_0x51d62a+_0x1c0b86(0x1df),_0x1c0b86(0x1d0),_0x4b38c3);_0x28b134&&validateNotificationPlaceholders(_0x28b134,_0x51d62a+_0x1c0b86(0x1df),_0x4b38c3);}),_0x10c925['length']>0x0&&!_0x3023be&&_0x4b38c3[_0x252695(0x2b2)]({'path':_0x44e43c,'message':_0x252695(0x28a)});}function requireNotificationString(_0x5c4683,_0x520626,_0x425139,_0x4a09aa){const _0x48ff56=a299_0xf05f06;if(typeof _0x5c4683!=='string'||_0x5c4683['trim']()==='')return _0x4a09aa['push']({'path':_0x520626,'message':_0x425139}),undefined;return _0x5c4683[_0x48ff56(0x284)]();}function validateNotificationPlaceholders(_0x2bc1de,_0x8100cc,_0x429874){const _0x516a31=a299_0xf05f06;for(const _0x4915a2 of _0x2bc1de[_0x516a31(0x337)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x3c0593=_0x4915a2[0x1]?.['trim']()??'',_0x3e0a95=_0x3c0593[_0x516a31(0x2c9)]('.'),_0x2c5510=_0x3e0a95>=0x0?_0x3c0593[_0x516a31(0x2c0)](0x0,_0x3e0a95):_0x3c0593,_0x32bc33=_0x3e0a95>=0x0?_0x3c0593['slice'](_0x3e0a95+0x1)[_0x516a31(0x284)]():'';(![_0x516a31(0x2f1),'context',_0x516a31(0x2a4)][_0x516a31(0x2de)](_0x2c5510)||_0x32bc33==='')&&_0x429874['push']({'path':_0x8100cc,'message':_0x516a31(0x31a)+_0x4915a2[0x0]+'.'});}_0x2bc1de['replace'](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x516a31(0x2de)]('${')&&_0x429874['push']({'path':_0x8100cc,'message':_0x516a31(0x2f8)});}function validateEdge(_0xba11c8,_0xb6ba94,_0x478750){const _0x1bbd31=a299_0xf05f06;_0xba11c8[_0x1bbd31(0x246)]!==undefined&&typeof _0xba11c8['name']!==_0x1bbd31(0x2dd)&&_0x478750[_0x1bbd31(0x2b2)]({'path':_0xb6ba94+_0x1bbd31(0x2f3),'message':_0x1bbd31(0x2dc)}),_0xba11c8[_0x1bbd31(0x1ea)]!==undefined&&typeof _0xba11c8[_0x1bbd31(0x1ea)]!==_0x1bbd31(0x228)&&_0x478750['push']({'path':_0xb6ba94+_0x1bbd31(0x1f5),'message':_0x1bbd31(0x266)}),_0xba11c8[_0x1bbd31(0x2d9)]!==undefined&&(!Array['isArray'](_0xba11c8[_0x1bbd31(0x2d9)])?_0x478750[_0x1bbd31(0x2b2)]({'path':_0xb6ba94+_0x1bbd31(0x25a),'message':_0x1bbd31(0x1fb)}):_0xba11c8[_0x1bbd31(0x2d9)][_0x1bbd31(0x309)]((_0x14a0b7,_0x16937e)=>{const _0x23ed1a=_0x1bbd31;if(!isRecord(_0x14a0b7)){_0x478750['push']({'path':_0xb6ba94+'.waypoints['+_0x16937e+']','message':_0x23ed1a(0x2e1)});return;}for(const _0x4a1c05 of['x','y']){const _0x53f839=_0x14a0b7[_0x4a1c05];(typeof _0x53f839!=='number'||!Number[_0x23ed1a(0x275)](_0x53f839))&&_0x478750[_0x23ed1a(0x2b2)]({'path':_0xb6ba94+_0x23ed1a(0x21f)+_0x16937e+'].'+_0x4a1c05,'message':_0x23ed1a(0x1e7)+_0x4a1c05+_0x23ed1a(0x1c7)});}})),_0xba11c8[_0x1bbd31(0x2b7)]!==undefined&&!CONDITION_TYPES[_0x1bbd31(0x2e6)](_0xba11c8[_0x1bbd31(0x2b7)])&&_0x478750[_0x1bbd31(0x2b2)]({'path':_0xb6ba94+_0x1bbd31(0x26e),'message':'Unsupported\x20condition\x20type:\x20'+String(_0xba11c8[_0x1bbd31(0x2b7)])+'.'}),_0xba11c8[_0x1bbd31(0x2b7)]==='EXPRESSION'&&(typeof _0xba11c8[_0x1bbd31(0x1ed)]!==_0x1bbd31(0x2dd)||_0xba11c8[_0x1bbd31(0x1ed)][_0x1bbd31(0x284)]()==='')&&_0x478750[_0x1bbd31(0x2b2)]({'path':_0xb6ba94+_0x1bbd31(0x26d),'message':'EXPRESSION\x20edge\x20requires\x20expression.'}),_0xba11c8[_0x1bbd31(0x1ea)]===!![]&&_0xba11c8[_0x1bbd31(0x2b7)]!==_0x1bbd31(0x2fb)&&_0x478750['push']({'path':_0xb6ba94+_0x1bbd31(0x1f5),'message':_0x1bbd31(0x1f0)}),_0xba11c8['defaultFlow']===!![]&&typeof _0xba11c8[_0x1bbd31(0x1ed)]===_0x1bbd31(0x2dd)&&_0xba11c8['expression'][_0x1bbd31(0x284)]()!==''&&_0x478750[_0x1bbd31(0x2b2)]({'path':_0xb6ba94+_0x1bbd31(0x26d),'message':'A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.'});}function validateGraphShape(_0x6ef129,_0x2a31cb,_0x3f06de,_0x3429c3,_0x1da8a0,_0x1d8f4c,_0x50d01c){const _0x30bae0=a299_0xf05f06;for(const [_0x4ae2d9,_0x996446]of _0x6ef129){const _0x27e39d=_0x1da8a0[_0x30bae0(0x24e)](_0x4ae2d9)??[],_0x5919c6=_0x3429c3[_0x30bae0(0x24e)](_0x4ae2d9)??[];_0x996446[_0x30bae0(0x265)]!==_0x30bae0(0x2f7)&&_0x27e39d[_0x30bae0(0x2c4)]===0x0&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':_0x30bae0(0x235)});_0x996446['type']!==_0x30bae0(0x2ff)&&_0x5919c6['length']===0x0&&_0x50d01c['push']({'path':'flowJson.nodes.'+_0x4ae2d9,'message':_0x30bae0(0x322)});_0x996446[_0x30bae0(0x265)]===_0x30bae0(0x2f7)&&_0x27e39d['length']>0x0&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':'START\x20node\x20must\x20not\x20have\x20incoming\x20edges.'});_0x996446[_0x30bae0(0x265)]===_0x30bae0(0x2ff)&&_0x5919c6['length']>0x0&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':_0x30bae0(0x1c5)});if(_0x996446['type']===_0x30bae0(0x239)){_0x5919c6[_0x30bae0(0x2c4)]<0x2&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0x1e6c62=_0x5919c6[_0x30bae0(0x29f)](_0x3ab121=>_0x3ab121['defaultFlow']===!![]);_0x1e6c62[_0x30bae0(0x2c4)]!==0x1&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':_0x30bae0(0x2ee)});if(_0x1e6c62[_0x30bae0(0x2c4)]===0x1){const _0x123c40=_0x1e6c62[0x0],_0x45ee33=_0x1d8f4c[_0x30bae0(0x24e)](_0x123c40)??_0x30bae0(0x2bb);_0x123c40[_0x30bae0(0x2b7)]!=='ALWAYS'&&_0x50d01c['push']({'path':_0x45ee33+_0x30bae0(0x26e),'message':_0x30bae0(0x207)});_0x123c40['expression']!==undefined&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x45ee33+_0x30bae0(0x26d),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x2d8380 of _0x5919c6){if(_0x2d8380===_0x123c40)continue;const _0x1b343a=_0x1d8f4c['get'](_0x2d8380)??_0x30bae0(0x2bb);if(_0x2d8380['conditionType']!==_0x30bae0(0x27f))_0x50d01c['push']({'path':_0x1b343a+_0x30bae0(0x26e),'message':_0x30bae0(0x245)});else(typeof _0x2d8380[_0x30bae0(0x1ed)]!=='string'||_0x2d8380['expression'][_0x30bae0(0x284)]()==='')&&_0x50d01c['push']({'path':_0x1b343a+'.expression','message':_0x30bae0(0x2df)});}}}if(_0x996446['type']===_0x30bae0(0x282)&&(_0x996446[_0x30bae0(0x1fd)]??_0x30bae0(0x282))===_0x30bae0(0x1d5)){if(_0x5919c6[_0x30bae0(0x2c4)]!==0x1)_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':_0x30bae0(0x30f)});else{const _0x58b273=_0x5919c6[0x0];((_0x58b273[_0x30bae0(0x2b7)]??_0x30bae0(0x2fb))!==_0x30bae0(0x2fb)||_0x58b273[_0x30bae0(0x1ea)]===!![]||typeof _0x58b273[_0x30bae0(0x1ed)]==='string'&&_0x58b273['expression']['trim']()!=='')&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x1d8f4c['get'](_0x58b273)??_0x30bae0(0x2bb),'message':_0x30bae0(0x295)});}}else{if(_0x996446['type']===_0x30bae0(0x282)){const _0x2813b6=_0x5919c6['map'](_0x3b1d0c=>_0x3b1d0c[_0x30bae0(0x2b7)]??'ALWAYS'),_0x5c69da=_0x2813b6['filter'](_0x18c892=>_0x18c892!==_0x30bae0(0x28c)&&_0x18c892!=='REJECTED');_0x5c69da[_0x30bae0(0x2c4)]>0x0&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':_0x30bae0(0x218)}),_0x2813b6['filter'](_0x165a9a=>_0x165a9a===_0x30bae0(0x28c))[_0x30bae0(0x2c4)]!==0x1&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.'}),_0x2813b6['filter'](_0x106a1e=>_0x106a1e===_0x30bae0(0x2a8))[_0x30bae0(0x2c4)]!==0x1&&_0x50d01c['push']({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':_0x30bae0(0x242)}),_0x5919c6[_0x30bae0(0x24a)](_0x1b5beb=>_0x1b5beb[_0x30bae0(0x1ea)]===!![])&&_0x50d01c['push']({'path':_0x30bae0(0x253)+_0x4ae2d9,'message':_0x30bae0(0x1f8)});}}}const _0x317010=new Set(),_0x430d48=_0x26f8be=>{const _0x4baed4=_0x30bae0;if(_0x317010[_0x4baed4(0x2e6)](_0x26f8be))return;_0x317010[_0x4baed4(0x29b)](_0x26f8be);for(const _0x52c2a2 of _0x3429c3[_0x4baed4(0x24e)](_0x26f8be)??[]){const _0x5a25b3=resolveEdgeEndpoint(_0x52c2a2[_0x4baed4(0x216)],_0x52c2a2[_0x4baed4(0x23c)]);if(_0x5a25b3&&_0x6ef129[_0x4baed4(0x2e6)](_0x5a25b3))_0x430d48(_0x5a25b3);}};_0x430d48(_0x2a31cb);for(const _0x24b46c of _0x6ef129[_0x30bae0(0x30d)]()){!_0x317010[_0x30bae0(0x2e6)](_0x24b46c)&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x24b46c,'message':_0x30bae0(0x2d5)});}const _0x48eb82=_0x3f06de['some'](_0x3d182c=>_0x317010[_0x30bae0(0x2e6)](_0x3d182c));if(!_0x48eb82){_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x2bb),'message':_0x30bae0(0x232)});return;}const _0x22f6bf=new Set(),_0xf7cd0=_0x20e950=>{const _0x1bbe01=_0x30bae0;if(_0x22f6bf[_0x1bbe01(0x2e6)](_0x20e950))return;_0x22f6bf[_0x1bbe01(0x29b)](_0x20e950);for(const _0x1b5983 of _0x1da8a0[_0x1bbe01(0x24e)](_0x20e950)??[]){const _0x3934ce=resolveEdgeEndpoint(_0x1b5983[_0x1bbe01(0x30a)],_0x1b5983[_0x1bbe01(0x2f0)]);if(_0x3934ce&&_0x6ef129[_0x1bbe01(0x2e6)](_0x3934ce))_0xf7cd0(_0x3934ce);}};for(const _0x330af6 of _0x3f06de){if(_0x6ef129[_0x30bae0(0x2e6)](_0x330af6))_0xf7cd0(_0x330af6);}for(const _0x5d4ce1 of _0x317010){!_0x22f6bf['has'](_0x5d4ce1)&&_0x50d01c[_0x30bae0(0x2b2)]({'path':_0x30bae0(0x253)+_0x5d4ce1,'message':_0x30bae0(0x32d)});}}function validateApprovalResults(_0x238d63,_0x1201e0,_0x4bbb4e,_0x44d27d){const _0x220656=a299_0xf05f06;if(_0x1201e0===0x0)return;const _0x110989=new Set(_0x4bbb4e[_0x220656(0x273)](_0x5639eb=>_0x238d63['get'](_0x5639eb)?.[_0x220656(0x317)])[_0x220656(0x29f)](_0x373d04=>typeof _0x373d04===_0x220656(0x2dd)));for(const _0x287bb0 of['APPROVED',_0x220656(0x2a8)]){!_0x110989['has'](_0x287bb0)&&_0x44d27d['push']({'path':_0x220656(0x286),'message':_0x220656(0x313)+_0x287bb0+'.'});}}function validateScriptResultReferences(_0x4e1dcd,_0x1eede4,_0x2c861b,_0x4666ff,_0x54717e,_0x43213a,_0x48f007){const _0x5335cd=a299_0xf05f06;if(_0x43213a[_0x5335cd(0x25e)]===0x0)return;const _0x76631a=new Set(),_0x460a64=_0xae85d2=>{const _0x3ee938=_0x5335cd;if(!_0x76631a['has'](_0xae85d2)&&_0x4e1dcd['has'](_0xae85d2)){_0x76631a[_0x3ee938(0x29b)](_0xae85d2);for(const _0x55a0c5 of _0x2c861b[_0x3ee938(0x24e)](_0xae85d2)??[]){const _0x1e4861=resolveEdgeEndpoint(_0x55a0c5['target'],_0x55a0c5[_0x3ee938(0x23c)]);if(_0x1e4861)_0x460a64(_0x1e4861);}}};_0x460a64(_0x1eede4);const _0x578e5b=new Map();for(const _0xb4fe9e of _0x76631a){_0x578e5b[_0x5335cd(0x328)](_0xb4fe9e,_0xb4fe9e===_0x1eede4?new Set([_0x1eede4]):new Set(_0x76631a));}let _0x111bab=!![];while(_0x111bab){_0x111bab=![];for(const _0x53b5eb of _0x76631a){if(_0x53b5eb===_0x1eede4)continue;const _0x2cba2b=(_0x4666ff['get'](_0x53b5eb)??[])['map'](_0x1b67f3=>resolveEdgeEndpoint(_0x1b67f3[_0x5335cd(0x30a)],_0x1b67f3[_0x5335cd(0x2f0)]))[_0x5335cd(0x29f)](_0x2339c5=>Boolean(_0x2339c5&&_0x76631a[_0x5335cd(0x2e6)](_0x2339c5)));if(_0x2cba2b[_0x5335cd(0x2c4)]===0x0)continue;const _0x332b4c=new Set(_0x578e5b[_0x5335cd(0x24e)](_0x2cba2b[0x0])??[]);for(const _0x1914ba of _0x2cba2b[_0x5335cd(0x2c0)](0x1)){const _0xcd7c3a=_0x578e5b[_0x5335cd(0x24e)](_0x1914ba)??new Set();for(const _0x48904f of _0x332b4c){if(!_0xcd7c3a[_0x5335cd(0x2e6)](_0x48904f))_0x332b4c[_0x5335cd(0x1ee)](_0x48904f);}}_0x332b4c[_0x5335cd(0x29b)](_0x53b5eb);const _0x3a0776=_0x578e5b[_0x5335cd(0x24e)](_0x53b5eb);!setsEqual(_0x3a0776,_0x332b4c)&&(_0x578e5b[_0x5335cd(0x328)](_0x53b5eb,_0x332b4c),_0x111bab=!![]);}}for(const [_0x3a0c05,_0x1b6131]of _0x2c861b){const _0x41ef44=_0x578e5b['get'](_0x3a0c05);if(!_0x41ef44)continue;for(const _0x39b4ba of _0x1b6131){if(_0x39b4ba[_0x5335cd(0x2b7)]!==_0x5335cd(0x27f)||typeof _0x39b4ba[_0x5335cd(0x1ed)]!==_0x5335cd(0x2dd))continue;for(const [_0x4e48dd,_0x4f8d2a]of _0x43213a){expressionReferencesVariable(_0x39b4ba['expression'],_0x4e48dd)&&!_0x41ef44[_0x5335cd(0x2e6)](_0x4f8d2a)&&_0x48f007[_0x5335cd(0x2b2)]({'path':(_0x54717e[_0x5335cd(0x24e)](_0x39b4ba)??_0x5335cd(0x2bb))+_0x5335cd(0x26d),'message':_0x5335cd(0x281)+_0x4e48dd+_0x5335cd(0x241)+_0x4f8d2a+'\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20'+_0x3a0c05+'.'});}}}}function expressionReferencesVariable(_0x2e0412,_0x2a87f6){const _0x1cf92b=a299_0xf05f06;let _0x4540a3=0x0;while(_0x4540a3<_0x2e0412[_0x1cf92b(0x2c4)]){const _0x2c9809=_0x2e0412[_0x4540a3];if(_0x2c9809==='\x27'||_0x2c9809==='\x22'){_0x4540a3=skipQuotedExpressionSegment(_0x2e0412,_0x4540a3,_0x2c9809);continue;}if(!/[A-Za-z_]/[_0x1cf92b(0x288)](_0x2c9809)){_0x4540a3+=0x1;continue;}const _0x5eef13=_0x4540a3;_0x4540a3+=0x1;while(_0x4540a3<_0x2e0412[_0x1cf92b(0x2c4)]&&/[A-Za-z0-9_]/[_0x1cf92b(0x288)](_0x2e0412[_0x4540a3])){_0x4540a3+=0x1;}if(_0x2e0412[_0x1cf92b(0x2c0)](_0x5eef13,_0x4540a3)!==_0x2a87f6)continue;let _0x1b08f2=_0x5eef13-0x1;while(_0x1b08f2>=0x0&&/\s/[_0x1cf92b(0x288)](_0x2e0412[_0x1b08f2])){_0x1b08f2-=0x1;}if(_0x2e0412[_0x1b08f2]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x102d2b,_0x53ecbc,_0x384ce4){let _0xf8f02b=_0x53ecbc+0x1;while(_0xf8f02b<_0x102d2b['length']){if(_0x102d2b[_0xf8f02b]==='\x5c'){_0xf8f02b+=0x2;continue;}if(_0x102d2b[_0xf8f02b]===_0x384ce4)return _0xf8f02b+0x1;_0xf8f02b+=0x1;}return _0xf8f02b;}function resolveEffectiveResultVariable(_0x1f26fb,_0x379185){const _0x283f6c=a299_0xf05f06;if(_0x1f26fb===undefined||_0x1f26fb===null||_0x379185&&_0x1f26fb==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x1f26fb!==_0x283f6c(0x2dd)||!VARIABLE_PATTERN['test'](_0x1f26fb)||RESERVED_RESULT_VARIABLES[_0x283f6c(0x2e6)](_0x1f26fb)||_0x1f26fb[_0x283f6c(0x2f4)]('approval_sys_'))return undefined;return _0x1f26fb;}function a299_0x495f(_0x1ed31c,_0x35b416){_0x1ed31c=_0x1ed31c-0x1c5;const _0x40f3ed=a299_0x40f3();let _0x495f0a=_0x40f3ed[_0x1ed31c];return _0x495f0a;}function registerResultVariableOwner(_0x51367a,_0x547b77,_0x4c5fb6,_0x37729f){const _0xdac1ec=a299_0xf05f06;if(_0x51367a['has'](_0x547b77)){_0x37729f[_0xdac1ec(0x2b2)]({'path':_0xdac1ec(0x286),'message':'Duplicate\x20resultVariable:\x20'+_0x547b77+'.'});return;}_0x51367a[_0xdac1ec(0x328)](_0x547b77,_0x4c5fb6);}function setsEqual(_0x3c5fbb,_0x24c90b){const _0x321fe5=a299_0xf05f06;return _0x3c5fbb[_0x321fe5(0x25e)]===_0x24c90b[_0x321fe5(0x25e)]&&[..._0x3c5fbb][_0x321fe5(0x2c2)](_0x11b1ae=>_0x24c90b[_0x321fe5(0x2e6)](_0x11b1ae));}function isValidUserId(_0x292f52){const _0x23d4a7=a299_0xf05f06;if(typeof _0x292f52===_0x23d4a7(0x2dd))return _0x292f52[_0x23d4a7(0x284)]()[_0x23d4a7(0x2c4)]>0x0;return Number[_0x23d4a7(0x23a)](_0x292f52)&&Number(_0x292f52)>0x0;}function resolveEdgeEndpoint(_0x1e2d7e,_0x2b514c){const _0x575249=a299_0xf05f06;if(typeof _0x1e2d7e==='string'&&_0x1e2d7e[_0x575249(0x284)]())return _0x1e2d7e['trim']();if(typeof _0x2b514c===_0x575249(0x2dd)&&_0x2b514c[_0x575249(0x284)]())return _0x2b514c[_0x575249(0x284)]();return undefined;}function removeEmptyMetadata(_0x5e7d94,_0x3fd1cb,_0x5526eb,_0x561890){const _0x1ada0b=a299_0xf05f06;if(Array[_0x1ada0b(0x213)](_0x5e7d94)){_0x5e7d94[_0x1ada0b(0x309)]((_0x308d3b,_0x5ae966)=>removeEmptyMetadata(_0x308d3b,_0x3fd1cb+'['+_0x5ae966+']',_0x5526eb,_0x561890));return;}if(!isRecord(_0x5e7d94))return;for(const [_0x5c0e6b,_0x1c4988]of Object[_0x1ada0b(0x321)](_0x5e7d94)){const _0x227b71=_0x3fd1cb+'.'+_0x5c0e6b;if(_0x5c0e6b===_0x1ada0b(0x20e)&&isEmptyJsonValue(_0x1c4988)){delete _0x5e7d94[_0x5c0e6b],_0x561890[_0x1ada0b(0x2b2)](_0x227b71),_0x5526eb[_0x1ada0b(0x2b2)]({'code':_0x1ada0b(0x21a),'path':_0x227b71,'message':_0x227b71+_0x1ada0b(0x2d4)});continue;}removeEmptyMetadata(_0x1c4988,_0x227b71,_0x5526eb,_0x561890);}}function isEmptyJsonValue(_0x1a0175){const _0x56873b=a299_0xf05f06;if(_0x1a0175===null||_0x1a0175===undefined)return!![];if(typeof _0x1a0175===_0x56873b(0x2dd))return _0x1a0175[_0x56873b(0x284)]()==='';if(Array[_0x56873b(0x213)](_0x1a0175))return _0x1a0175[_0x56873b(0x2c4)]===0x0;return isRecord(_0x1a0175)&&Object[_0x56873b(0x30d)](_0x1a0175)['length']===0x0;}function isRecord(_0x409ee8){const _0x14f69f=a299_0xf05f06;return typeof _0x409ee8===_0x14f69f(0x206)&&_0x409ee8!==null&&!Array[_0x14f69f(0x213)](_0x409ee8);}function cloneJsonValue(_0x498313){const _0x55a3c7=a299_0xf05f06;return JSON[_0x55a3c7(0x31c)](JSON[_0x55a3c7(0x251)](_0x498313));}export async function readFlowConfigFile(_0x477bf4){const _0x4efc2c=a299_0xf05f06,_0x40f5b3=await readFile(resolve(_0x477bf4),_0x4efc2c(0x327));return JSON[_0x4efc2c(0x31c)](_0x40f5b3);}
@@ -1 +1 @@
1
- const a300_0x12cc09=a300_0xecb3;(function(_0xb6d557,_0x53276c){const _0x167c6c=a300_0xecb3,_0x1eecd1=_0xb6d557();while(!![]){try{const _0x2da8b1=-parseInt(_0x167c6c(0x7f))/0x1*(-parseInt(_0x167c6c(0x8a))/0x2)+-parseInt(_0x167c6c(0x7d))/0x3+parseInt(_0x167c6c(0x96))/0x4*(-parseInt(_0x167c6c(0x9e))/0x5)+parseInt(_0x167c6c(0x74))/0x6+-parseInt(_0x167c6c(0x99))/0x7*(parseInt(_0x167c6c(0x77))/0x8)+parseInt(_0x167c6c(0x83))/0x9+parseInt(_0x167c6c(0x97))/0xa;if(_0x2da8b1===_0x53276c)break;else _0x1eecd1['push'](_0x1eecd1['shift']());}catch(_0x14c712){_0x1eecd1['push'](_0x1eecd1['shift']());}}}(a300_0xcdec,0x67f1b));import{randomUUID}from'node:crypto';function a300_0xecb3(_0x2459ef,_0x7c5777){_0x2459ef=_0x2459ef-0x6e;const _0xcdecdb=a300_0xcdec();let _0xecb3f9=_0xcdecdb[_0x2459ef];return _0xecb3f9;}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='.rabetbase/instant-api-policy';export const INSTANT_API_POLICY_FILE_NAME=a300_0x12cc09(0x89);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x3d7278,_0x4ec488,_0x5db2ef){return new CliError(_0x3d7278,0x1,_0x4ec488,_0x5db2ef);}function a300_0xcdec(){const _0x40b3f3=['defaults','Policy\x20defaults.instantApi\x20is\x20required.','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_rules_invalid','289185zxrSpg','instant_api_policy_file_exists','instant_api_policy_file_unwritable','instant_api_policy_app_code_mismatch','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','instant_api_policy_json_invalid','instant_api_policy_file_invalid','stringify','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_version_invalid','code','object','pid','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','instant_api_policy_app_code_invalid','rules','overwritten','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','length','created','1085730AyAsNm','instant_api_policy_file_unreadable','.tmp','11664pJdkHL','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','force','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','Review\x20the\x20file\x20before\x20retrying.','instantApi','1460952NWkwSp','includes','1hwTXnw','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','instant_api_policy_defaults_invalid','5927517ssZAyZ','isArray','policyFilePath','trim','instant_api_policy_file_too_large','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','policy.json','760462utsHfh','unchanged','catch','parse','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','isFile','version','utf8','utf-8','byteLength','ENOENT','appCode','16hpFwwW','7597220mnPzbh','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','4011dPsSXx'];a300_0xcdec=function(){return _0x40b3f3;};return a300_0xcdec();}export function loadInstantApiPolicyLocalConfig(_0xfb2a96,_0x5166a8){assertSafeAppCode(_0xfb2a96);const _0x56bd89=resolve(_0x5166a8??findProjectRootDirectory()),_0x582810=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0xfb2a96+'/'+INSTANT_API_POLICY_FILE_NAME,_0x5a13bc=resolve(_0x56bd89,INSTANT_API_POLICY_RELATIVE_ROOT,_0xfb2a96),_0x16ee29=resolve(_0x5a13bc,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x56bd89,'appCode':_0xfb2a96,'policyRoot':_0x5a13bc,'policyFilePath':_0x16ee29,'policyRelativePath':_0x582810};}export function createDefaultInstantApiPolicyConfig(_0x547137,_0x3eb9f8='allow'){return assertSafeAppCode(_0x547137),{'version':'2','appCode':_0x547137,'defaults':{'instantApi':_0x3eb9f8},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x2d0cb3){const _0x324dc0=a300_0x12cc09;let _0x500fb9;try{_0x500fb9=await stat(_0x2d0cb3['policyFilePath']);}catch(_0x1fa127){throw instantApiPolicyError('instant_api_policy_file_missing',_0x324dc0(0x71)+_0x2d0cb3[_0x324dc0(0x85)],'Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.');}if(!_0x500fb9[_0x324dc0(0x8f)]())throw instantApiPolicyError(_0x324dc0(0xa4),'Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x2d0cb3[_0x324dc0(0x85)]);if(_0x500fb9['size']>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x324dc0(0x87),_0x324dc0(0x98));let _0x535103;try{_0x535103=await readFile(_0x2d0cb3[_0x324dc0(0x85)]);}catch{throw instantApiPolicyError('instant_api_policy_file_unreadable','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20'+_0x2d0cb3[_0x324dc0(0x85)]);}if(_0x535103[_0x324dc0(0x93)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x324dc0(0x87),_0x324dc0(0x98));let _0xa14ed6;try{_0xa14ed6=new TextDecoder(_0x324dc0(0x92),{'fatal':!![],'ignoreBOM':!![]})['decode'](_0x535103);}catch{throw instantApiPolicyError(_0x324dc0(0xa4),_0x324dc0(0xac)+_0x2d0cb3[_0x324dc0(0x85)]);}let _0x374e26;try{_0x374e26=JSON[_0x324dc0(0x8d)](_0xa14ed6);}catch{throw instantApiPolicyError(_0x324dc0(0xa3),_0x324dc0(0xa2)+_0x2d0cb3[_0x324dc0(0x85)]);}return assertLocalPolicyContract(_0x374e26,_0x2d0cb3[_0x324dc0(0x95)]);}export async function writeInstantApiPolicyConfigFile(_0x3e2ed7,_0x5476e7,_0x2122b2={}){const _0x35a2de=a300_0x12cc09,_0x4edc02=assertLocalPolicyContract(_0x5476e7,_0x3e2ed7[_0x35a2de(0x95)]),_0x5924ea=JSON[_0x35a2de(0xa5)](_0x4edc02,null,0x2)+'\x0a';if(Buffer[_0x35a2de(0x93)](_0x5924ea,_0x35a2de(0x91))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x35a2de(0x87),_0x35a2de(0x98));await mkdir(_0x3e2ed7['policyRoot'],{'recursive':!![]});let _0x4876f6;try{_0x4876f6=await readFile(_0x3e2ed7['policyFilePath'],_0x35a2de(0x91));}catch(_0x230c33){if(!isMissingFile(_0x230c33))throw instantApiPolicyError(_0x35a2de(0x75),_0x35a2de(0xa6)+_0x3e2ed7['policyFilePath']);}if(_0x4876f6===_0x5924ea)return{'action':_0x35a2de(0x8b),'filePath':_0x3e2ed7[_0x35a2de(0x85)]};if(_0x4876f6!==undefined&&!_0x2122b2[_0x35a2de(0x79)])throw instantApiPolicyError(_0x35a2de(0x9f),_0x35a2de(0x81)+_0x3e2ed7[_0x35a2de(0x85)],_0x35a2de(0x8e));if(_0x4876f6===undefined)try{return await writeFile(_0x3e2ed7[_0x35a2de(0x85)],_0x5924ea,{'encoding':_0x35a2de(0x91),'flag':'wx'}),{'action':_0x35a2de(0x73),'filePath':_0x3e2ed7[_0x35a2de(0x85)]};}catch(_0x1aab49){if(!isAlreadyExists(_0x1aab49))throw instantApiPolicyError(_0x35a2de(0xa0),_0x35a2de(0x70)+_0x3e2ed7[_0x35a2de(0x85)]);if(!_0x2122b2[_0x35a2de(0x79)])throw instantApiPolicyError(_0x35a2de(0x9f),_0x35a2de(0xab)+_0x3e2ed7[_0x35a2de(0x85)],_0x35a2de(0x7b));}const _0x72dd94=resolve(dirname(_0x3e2ed7[_0x35a2de(0x85)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x35a2de(0xaa)]+'.'+randomUUID()+_0x35a2de(0x76));try{await writeFile(_0x72dd94,_0x5924ea,{'encoding':_0x35a2de(0x91),'flag':'wx'}),await rename(_0x72dd94,_0x3e2ed7['policyFilePath']);}catch{await unlink(_0x72dd94)[_0x35a2de(0x8c)](()=>undefined);throw instantApiPolicyError('instant_api_policy_file_unwritable',_0x35a2de(0x9c)+_0x3e2ed7[_0x35a2de(0x85)]);}return{'action':_0x35a2de(0x6f),'filePath':_0x3e2ed7[_0x35a2de(0x85)]};}function assertSafeAppCode(_0x31ff57){const _0x400d43=a300_0x12cc09,_0x44ce62=_0x31ff57[_0x400d43(0x86)]();if(!_0x44ce62||_0x44ce62!==_0x31ff57||_0x44ce62[_0x400d43(0x72)]>0x64||_0x44ce62==='.'||_0x44ce62==='..'||_0x44ce62['includes']('/')||_0x44ce62[_0x400d43(0x7e)]('\x5c')||_0x44ce62['includes']('\x00'))throw instantApiPolicyError(_0x400d43(0xae),_0x400d43(0x78));}function assertLocalPolicyContract(_0x1b2575,_0x5cf2a7){const _0x30dde0=a300_0x12cc09;if(!isObject(_0x1b2575))throw instantApiPolicyError(_0x30dde0(0xa3),_0x30dde0(0x80));if(_0x1b2575[_0x30dde0(0x90)]!=='1'&&_0x1b2575[_0x30dde0(0x90)]!=='2')throw instantApiPolicyError(_0x30dde0(0xa7),_0x30dde0(0x7a),_0x30dde0(0xad));if(_0x1b2575[_0x30dde0(0x95)]!==_0x5cf2a7)throw instantApiPolicyError(_0x30dde0(0xa1),'Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20'+_0x5cf2a7+'.');if(!isObject(_0x1b2575['defaults'])||typeof _0x1b2575[_0x30dde0(0x9a)][_0x30dde0(0x7c)]!=='string')throw instantApiPolicyError(_0x30dde0(0x82),_0x30dde0(0x9b));if(_0x1b2575[_0x30dde0(0x6e)]!==undefined&&_0x1b2575[_0x30dde0(0x6e)]!==null&&!Array[_0x30dde0(0x84)](_0x1b2575[_0x30dde0(0x6e)]))throw instantApiPolicyError(_0x30dde0(0x9d),_0x30dde0(0x88));return _0x1b2575;}function isObject(_0x4a6c6b){return _0x4a6c6b!==null&&typeof _0x4a6c6b==='object'&&!Array['isArray'](_0x4a6c6b);}function isMissingFile(_0x5c313c){const _0x1dfe83=a300_0x12cc09;return Boolean(_0x5c313c&&typeof _0x5c313c===_0x1dfe83(0xa9)&&_0x5c313c[_0x1dfe83(0xa8)]===_0x1dfe83(0x94));}function isAlreadyExists(_0x332ea9){const _0x1dc63a=a300_0x12cc09;return Boolean(_0x332ea9&&typeof _0x332ea9===_0x1dc63a(0xa9)&&_0x332ea9['code']==='EEXIST');}
1
+ const a300_0x109505=a300_0x43cf;(function(_0x3d5c73,_0x218fbf){const _0x5c0c59=a300_0x43cf,_0x108c4d=_0x3d5c73();while(!![]){try{const _0x226277=-parseInt(_0x5c0c59(0x16e))/0x1+parseInt(_0x5c0c59(0x163))/0x2+parseInt(_0x5c0c59(0x188))/0x3*(-parseInt(_0x5c0c59(0x160))/0x4)+-parseInt(_0x5c0c59(0x16c))/0x5+-parseInt(_0x5c0c59(0x17c))/0x6*(-parseInt(_0x5c0c59(0x175))/0x7)+parseInt(_0x5c0c59(0x167))/0x8*(-parseInt(_0x5c0c59(0x172))/0x9)+parseInt(_0x5c0c59(0x181))/0xa;if(_0x226277===_0x218fbf)break;else _0x108c4d['push'](_0x108c4d['shift']());}catch(_0x171589){_0x108c4d['push'](_0x108c4d['shift']());}}}(a300_0x129f,0x90435));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_0x109505(0x174);export const INSTANT_API_POLICY_FILE_NAME=a300_0x109505(0x155);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x31f4b8,_0x1f410c,_0x426a1f){return new CliError(_0x31f4b8,0x1,_0x1f410c,_0x426a1f);}export function loadInstantApiPolicyLocalConfig(_0xe0ddd3,_0x2f8435){assertSafeAppCode(_0xe0ddd3);const _0x4cbd9d=resolve(_0x2f8435??findProjectRootDirectory()),_0x2b2078=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0xe0ddd3+'/'+INSTANT_API_POLICY_FILE_NAME,_0x3ad15a=resolve(_0x4cbd9d,INSTANT_API_POLICY_RELATIVE_ROOT,_0xe0ddd3),_0x391b1e=resolve(_0x3ad15a,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x4cbd9d,'appCode':_0xe0ddd3,'policyRoot':_0x3ad15a,'policyFilePath':_0x391b1e,'policyRelativePath':_0x2b2078};}function a300_0x43cf(_0x1e3122,_0x189aa8){_0x1e3122=_0x1e3122-0x150;const _0x129fe6=a300_0x129f();let _0x43cfe6=_0x129fe6[_0x1e3122];return _0x43cfe6;}export function createDefaultInstantApiPolicyConfig(_0x41abf3,_0x21d615='allow'){return assertSafeAppCode(_0x41abf3),{'version':'2','appCode':_0x41abf3,'defaults':{'instantApi':_0x21d615},'rules':[]};}function a300_0x129f(){const _0x1dc394=['version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','defaults','198hHQxci','Policy\x20defaults.instantApi\x20is\x20required.','.rabetbase/instant-api-policy','21wOrQPV','version','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','instant_api_policy_version_invalid','.tmp','includes','303522gCnUuw','instant_api_policy_app_code_invalid','policyFilePath','instant_api_policy_rules_invalid','instant_api_policy_file_exists','12882440JSRgDq','object','force','decode','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','length','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','126ZOfcUj','pid','parse','trim','isArray','instant_api_policy_file_invalid','policyRoot','ENOENT','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','instant_api_policy_defaults_invalid','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','instant_api_policy_app_code_mismatch','instantApi','utf8','instant_api_policy_json_invalid','policy.json','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','EEXIST','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','overwritten','size','appCode','instant_api_policy_file_missing','instant_api_policy_file_too_large','Review\x20the\x20file\x20before\x20retrying.','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','33584LtReUc','created','code','1955200qsNxqb','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','63624uzzNyx','instant_api_policy_file_unwritable','unchanged','string','rules','4262350duucOd','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','446636CiXdxx'];a300_0x129f=function(){return _0x1dc394;};return a300_0x129f();}export async function readInstantApiPolicyConfigFile(_0x3d9d90){const _0x5586b4=a300_0x109505;let _0x1f9ec2;try{_0x1f9ec2=await stat(_0x3d9d90[_0x5586b4(0x17e)]);}catch(_0x3296b8){throw instantApiPolicyError(_0x5586b4(0x15c),_0x5586b4(0x164)+_0x3d9d90[_0x5586b4(0x17e)],_0x5586b4(0x190));}if(!_0x1f9ec2['isFile']())throw instantApiPolicyError(_0x5586b4(0x18d),_0x5586b4(0x16d)+_0x3d9d90[_0x5586b4(0x17e)]);if(_0x1f9ec2[_0x5586b4(0x15a)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x5586b4(0x15f));let _0x12cf48;try{_0x12cf48=await readFile(_0x3d9d90[_0x5586b4(0x17e)]);}catch{throw instantApiPolicyError('instant_api_policy_file_unreadable',_0x5586b4(0x156)+_0x3d9d90[_0x5586b4(0x17e)]);}if(_0x12cf48['byteLength']>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x5586b4(0x15d),_0x5586b4(0x15f));let _0x30bd76;try{_0x30bd76=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0x5586b4(0x184)](_0x12cf48);}catch{throw instantApiPolicyError(_0x5586b4(0x18d),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20'+_0x3d9d90[_0x5586b4(0x17e)]);}let _0x1fa1fc;try{_0x1fa1fc=JSON[_0x5586b4(0x18a)](_0x30bd76);}catch{throw instantApiPolicyError(_0x5586b4(0x154),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20'+_0x3d9d90[_0x5586b4(0x17e)]);}return assertLocalPolicyContract(_0x1fa1fc,_0x3d9d90[_0x5586b4(0x15b)]);}export async function writeInstantApiPolicyConfigFile(_0x5ddbf5,_0x48c693,_0x45b71e={}){const _0x22e732=a300_0x109505,_0x118bac=assertLocalPolicyContract(_0x48c693,_0x5ddbf5[_0x22e732(0x15b)]),_0x3abdd8=JSON['stringify'](_0x118bac,null,0x2)+'\x0a';if(Buffer['byteLength'](_0x3abdd8,_0x22e732(0x153))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x22e732(0x15f));await mkdir(_0x5ddbf5[_0x22e732(0x18e)],{'recursive':!![]});let _0x1a63d6;try{_0x1a63d6=await readFile(_0x5ddbf5[_0x22e732(0x17e)],_0x22e732(0x153));}catch(_0x3f6800){if(!isMissingFile(_0x3f6800))throw instantApiPolicyError('instant_api_policy_file_unreadable','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20'+_0x5ddbf5[_0x22e732(0x17e)]);}if(_0x1a63d6===_0x3abdd8)return{'action':_0x22e732(0x169),'filePath':_0x5ddbf5[_0x22e732(0x17e)]};if(_0x1a63d6!==undefined&&!_0x45b71e[_0x22e732(0x183)])throw instantApiPolicyError(_0x22e732(0x180),_0x22e732(0x158)+_0x5ddbf5[_0x22e732(0x17e)],_0x22e732(0x187));if(_0x1a63d6===undefined)try{return await writeFile(_0x5ddbf5[_0x22e732(0x17e)],_0x3abdd8,{'encoding':_0x22e732(0x153),'flag':'wx'}),{'action':_0x22e732(0x161),'filePath':_0x5ddbf5[_0x22e732(0x17e)]};}catch(_0x795f4a){if(!isAlreadyExists(_0x795f4a))throw instantApiPolicyError(_0x22e732(0x168),_0x22e732(0x166)+_0x5ddbf5[_0x22e732(0x17e)]);if(!_0x45b71e['force'])throw instantApiPolicyError(_0x22e732(0x180),_0x22e732(0x170)+_0x5ddbf5[_0x22e732(0x17e)],_0x22e732(0x15e));}const _0x4dc7c0=resolve(dirname(_0x5ddbf5[_0x22e732(0x17e)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x22e732(0x189)]+'.'+randomUUID()+_0x22e732(0x17a));try{await writeFile(_0x4dc7c0,_0x3abdd8,{'encoding':'utf8','flag':'wx'}),await rename(_0x4dc7c0,_0x5ddbf5[_0x22e732(0x17e)]);}catch{await unlink(_0x4dc7c0)['catch'](()=>undefined);throw instantApiPolicyError(_0x22e732(0x168),'Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20'+_0x5ddbf5['policyFilePath']);}return{'action':_0x22e732(0x159),'filePath':_0x5ddbf5[_0x22e732(0x17e)]};}function assertSafeAppCode(_0x593e29){const _0x4e7a89=a300_0x109505,_0x319494=_0x593e29[_0x4e7a89(0x18b)]();if(!_0x319494||_0x319494!==_0x593e29||_0x319494[_0x4e7a89(0x186)]>0x64||_0x319494==='.'||_0x319494==='..'||_0x319494[_0x4e7a89(0x17b)]('/')||_0x319494['includes']('\x5c')||_0x319494['includes']('\x00'))throw instantApiPolicyError(_0x4e7a89(0x17d),_0x4e7a89(0x177));}function assertLocalPolicyContract(_0x1fb7cd,_0x595914){const _0x53eed8=a300_0x109505;if(!isObject(_0x1fb7cd))throw instantApiPolicyError(_0x53eed8(0x154),_0x53eed8(0x185));if(_0x1fb7cd[_0x53eed8(0x176)]!=='1'&&_0x1fb7cd['version']!=='2')throw instantApiPolicyError(_0x53eed8(0x179),_0x53eed8(0x165),_0x53eed8(0x16f));if(_0x1fb7cd[_0x53eed8(0x15b)]!==_0x595914)throw instantApiPolicyError(_0x53eed8(0x151),_0x53eed8(0x150)+_0x595914+'.');if(!isObject(_0x1fb7cd[_0x53eed8(0x171)])||typeof _0x1fb7cd['defaults'][_0x53eed8(0x152)]!==_0x53eed8(0x16a))throw instantApiPolicyError(_0x53eed8(0x191),_0x53eed8(0x173));if(_0x1fb7cd[_0x53eed8(0x16b)]!==undefined&&_0x1fb7cd[_0x53eed8(0x16b)]!==null&&!Array[_0x53eed8(0x18c)](_0x1fb7cd[_0x53eed8(0x16b)]))throw instantApiPolicyError(_0x53eed8(0x17f),_0x53eed8(0x178));return _0x1fb7cd;}function isObject(_0x1fb582){const _0x3ef9c3=a300_0x109505;return _0x1fb582!==null&&typeof _0x1fb582===_0x3ef9c3(0x182)&&!Array['isArray'](_0x1fb582);}function isMissingFile(_0x46dc81){const _0x515e96=a300_0x109505;return Boolean(_0x46dc81&&typeof _0x46dc81===_0x515e96(0x182)&&_0x46dc81[_0x515e96(0x162)]===_0x515e96(0x18f));}function isAlreadyExists(_0x3bab2a){const _0x46ab66=a300_0x109505;return Boolean(_0x3bab2a&&typeof _0x3bab2a==='object'&&_0x3bab2a[_0x46ab66(0x162)]===_0x46ab66(0x157));}
@@ -1 +1 @@
1
- const a301_0x576073=a301_0x438e;(function(_0x2c284c,_0x5fe142){const _0x508245=a301_0x438e,_0x585be4=_0x2c284c();while(!![]){try{const _0x10c8b7=parseInt(_0x508245(0x179))/0x1+parseInt(_0x508245(0x184))/0x2+-parseInt(_0x508245(0x17b))/0x3+-parseInt(_0x508245(0x17a))/0x4*(parseInt(_0x508245(0x180))/0x5)+parseInt(_0x508245(0x186))/0x6*(-parseInt(_0x508245(0x17e))/0x7)+-parseInt(_0x508245(0x182))/0x8*(-parseInt(_0x508245(0x177))/0x9)+-parseInt(_0x508245(0x185))/0xa*(-parseInt(_0x508245(0x17d))/0xb);if(_0x10c8b7===_0x5fe142)break;else _0x585be4['push'](_0x585be4['shift']());}catch(_0x2b2e67){_0x585be4['push'](_0x585be4['shift']());}}}(a301_0x4986,0xe1c88));function a301_0x438e(_0x264c62,_0x22b8e0){_0x264c62=_0x264c62-0x176;const _0x498650=a301_0x4986();let _0x438e15=_0x498650[_0x264c62];return _0x438e15;}const base=a301_0x576073(0x17c);function a301_0x4986(){const _0x23e060=['1506ixOBZE','/publish','freeze','8824266CugRyw','/revision','1328928ppkchC','542828eOHPyy','4140537DNcgks','/smartapi/instant-api-policy','11RKltFi','16009CCkVGb','/rollback','25tXNKFg','/validate','8JdkhBg','/revisions','2118072ZfDnWJ','1891210mOiKlL'];a301_0x4986=function(){return _0x23e060;};return a301_0x4986();}export const INSTANT_API_POLICY_PATHS=Object[a301_0x576073(0x176)]({'current':base+'/current','validate':base+a301_0x576073(0x181),'publish':base+a301_0x576073(0x187),'revisions':base+a301_0x576073(0x183),'revision':base+a301_0x576073(0x178),'rollback':base+a301_0x576073(0x17f)});
1
+ function a301_0x149c(_0x403171,_0x4db955){_0x403171=_0x403171-0xf2;const _0x13e4ad=a301_0x13e4();let _0x149c04=_0x13e4ad[_0x403171];return _0x149c04;}const a301_0x4dd46a=a301_0x149c;(function(_0x156a8e,_0x462929){const _0x12d6a9=a301_0x149c,_0x3a2ae9=_0x156a8e();while(!![]){try{const _0x2f1586=-parseInt(_0x12d6a9(0xf7))/0x1*(-parseInt(_0x12d6a9(0xfd))/0x2)+-parseInt(_0x12d6a9(0x102))/0x3*(parseInt(_0x12d6a9(0xfb))/0x4)+-parseInt(_0x12d6a9(0x101))/0x5*(-parseInt(_0x12d6a9(0xfe))/0x6)+-parseInt(_0x12d6a9(0xf9))/0x7+parseInt(_0x12d6a9(0xf2))/0x8*(-parseInt(_0x12d6a9(0xfc))/0x9)+-parseInt(_0x12d6a9(0xf6))/0xa*(-parseInt(_0x12d6a9(0xf8))/0xb)+parseInt(_0x12d6a9(0xff))/0xc;if(_0x2f1586===_0x462929)break;else _0x3a2ae9['push'](_0x3a2ae9['shift']());}catch(_0x455695){_0x3a2ae9['push'](_0x3a2ae9['shift']());}}}(a301_0x13e4,0x4c309));const base='/smartapi/instant-api-policy';function a301_0x13e4(){const _0x4b36b2=['9186TTgneW','375216tvgaeO','/revision','1905BtXUQI','3fxPnit','/rollback','224flfhlE','/publish','/revisions','/validate','5240OsiMsr','11083kgujcp','4719ofTapz','593418GTxGyM','freeze','1944604WBPDOL','46539MoMkdy','34usMOVs'];a301_0x13e4=function(){return _0x4b36b2;};return a301_0x13e4();}export const INSTANT_API_POLICY_PATHS=Object[a301_0x4dd46a(0xfa)]({'current':base+'/current','validate':base+a301_0x4dd46a(0xf5),'publish':base+a301_0x4dd46a(0xf3),'revisions':base+a301_0x4dd46a(0xf4),'revision':base+a301_0x4dd46a(0x100),'rollback':base+a301_0x4dd46a(0x103)});
@@ -1 +1 @@
1
- function a302_0xd6c4(){const _0xb048a9=['cancelled','cli:rabetbase','defineProperty','code','2691493vuexIb','kind','data','102852ghGDbm','1749830eWYJAa','network','pageTooLarge','status','auth','message','1124324ztzkra','aborted','520RPhvVJ','1094256sreJyi','run','validation','origin','trim','1yiPixM','getStore','12ALShOw','1581349CLexOK','timeout','api_error','httpStatus','190xWBTBi','Invalid\x20kbServiceDomain:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','authRequired','1774616lLQnhO','remoteErrorCode'];a302_0xd6c4=function(){return _0xb048a9;};return a302_0xd6c4();}const a302_0x100d8e=a302_0x1558;(function(_0x4fc487,_0x14bdec){const _0x2a0368=a302_0x1558,_0x188f66=_0x4fc487();while(!![]){try{const _0x4e18a6=-parseInt(_0x2a0368(0xb9))/0x1*(parseInt(_0x2a0368(0xb1))/0x2)+-parseInt(_0x2a0368(0xb4))/0x3+parseInt(_0x2a0368(0xc3))/0x4+-parseInt(_0x2a0368(0xab))/0x5+parseInt(_0x2a0368(0xbb))/0x6*(-parseInt(_0x2a0368(0xa7))/0x7)+-parseInt(_0x2a0368(0xb3))/0x8*(parseInt(_0x2a0368(0xaa))/0x9)+parseInt(_0x2a0368(0xc0))/0xa*(parseInt(_0x2a0368(0xbc))/0xb);if(_0x4e18a6===_0x14bdec)break;else _0x188f66['push'](_0x188f66['shift']());}catch(_0x2f0c47){_0x188f66['push'](_0x188f66['shift']());}}}(a302_0xd6c4,0x5e549));import{createKnowledgeClient,KnowledgeServiceError}from'@lovrabet/sdk';import{AsyncLocalStorage}from'node:async_hooks';import{getKbServiceDomain}from'../constant/domain.js';import{normalizeKbServiceOrigin}from'../core/kb-search-client.js';import{CliError,CliErrors}from'../errors.js';const WRITE_RECONCILIATION='\x20The\x20entry\x20may\x20already\x20have\x20been\x20saved.\x20Use\x20read-only\x20detail\x20or\x20list\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.',session=new AsyncLocalStorage();export class KbManagementError extends CliError{['transportFailure'];['remoteErrorCode'];[a302_0x100d8e(0xbf)];[a302_0x100d8e(0xad)];constructor(_0x3dabe0,_0x38c677=![],_0x48e8ea,_0x3943ba,_0x15e193=![]){const _0x5d27a0=a302_0x100d8e;super(_0x5d27a0(0xbe),0x1,_0x3dabe0,_0x48e8ea?'API\x20error\x20code:\x20'+_0x48e8ea:undefined),this['transportFailure']=_0x38c677,this[_0x5d27a0(0xc4)]=_0x48e8ea,this[_0x5d27a0(0xbf)]=_0x3943ba,this['pageTooLarge']=_0x15e193;if(_0x48e8ea)Object[_0x5d27a0(0xa5)](this,_0x5d27a0(0xa9),{'value':{'remoteErrorCode':_0x48e8ea},'enumerable':![]});}}function resolveOrigin(){const _0x57a629=a302_0x100d8e,_0x1f5372=getKbServiceDomain();if(!_0x1f5372)throw CliErrors[_0x57a629(0xb6)]('Configure\x20kbServiceDomain\x20with\x20a\x20trusted\x20HTTPS\x20origin\x20for\x20knowledge\x20management.');try{return normalizeKbServiceOrigin(_0x1f5372);}catch{throw CliErrors[_0x57a629(0xb6)](_0x57a629(0xc1));}}function a302_0x1558(_0x2368fd,_0x3cc498){_0x2368fd=_0x2368fd-0xa3;const _0xd6c4e2=a302_0xd6c4();let _0x1558b6=_0xd6c4e2[_0x2368fd];return _0x1558b6;}export function withKbManagementSession(_0x3f16f8,_0x3fbe8d){const _0x53dedc=a302_0x100d8e;return session[_0x53dedc(0xb5)]({'origin':resolveOrigin(),'signal':_0x3f16f8},_0x3fbe8d);}export async function withKbManagementClient(_0x26b45d,_0x5f25a4,_0x4b3e4d={}){const _0x273372=a302_0x100d8e,_0x3528b7=session['getStore']()?.[_0x273372(0xb7)]??resolveOrigin();if(!_0x26b45d[_0x273372(0xb8)]())throw CliErrors[_0x273372(0xc2)]();const _0x3bfc2c=_0x4b3e4d['signal']??session[_0x273372(0xba)]()?.['signal'];if(_0x3bfc2c?.[_0x273372(0xb2)])throw CliErrors[_0x273372(0xa3)]('Knowledge\x20management\x20request\x20cancelled.');try{const _0x454bbe=createKnowledgeClient({'kbServiceDomain':_0x3528b7,'authMode':'cookie','cookie':_0x26b45d,'invokeSource':_0x273372(0xa4)});return await _0x5f25a4(_0x454bbe,{'signal':_0x3bfc2c});}catch(_0x29993a){if(!(_0x29993a instanceof KnowledgeServiceError))throw _0x29993a;if(_0x29993a[_0x273372(0xa8)]===_0x273372(0xaf))throw CliErrors[_0x273372(0xc2)]();if(_0x29993a['kind']===_0x273372(0xb6))throw CliErrors[_0x273372(0xb6)](_0x29993a['message']);const _0x4b2d6b=_0x29993a[_0x273372(0xa8)]===_0x273372(0xac)||_0x29993a[_0x273372(0xa8)]===_0x273372(0xbd)||_0x29993a[_0x273372(0xa8)]===_0x273372(0xa3);throw new KbManagementError(_0x29993a[_0x273372(0xb0)]+(_0x29993a['writeUncertain']?WRITE_RECONCILIATION:''),_0x4b2d6b,/^\d+$/['test'](_0x29993a['code']??'')?_0x29993a[_0x273372(0xa6)]:undefined,_0x29993a[_0x273372(0xae)],_0x29993a[_0x273372(0xad)]);}}
1
+ function a302_0x1657(_0x361ec2,_0x11b266){_0x361ec2=_0x361ec2-0x15a;const _0x4e6419=a302_0x4e64();let _0x1657ce=_0x4e6419[_0x361ec2];return _0x1657ce;}const a302_0x39c7c6=a302_0x1657;(function(_0x150633,_0x20f33b){const _0x1934d6=a302_0x1657,_0xb996a4=_0x150633();while(!![]){try{const _0x45244e=-parseInt(_0x1934d6(0x176))/0x1+parseInt(_0x1934d6(0x15a))/0x2*(-parseInt(_0x1934d6(0x161))/0x3)+-parseInt(_0x1934d6(0x172))/0x4+-parseInt(_0x1934d6(0x173))/0x5+parseInt(_0x1934d6(0x179))/0x6+parseInt(_0x1934d6(0x17b))/0x7+-parseInt(_0x1934d6(0x15f))/0x8*(-parseInt(_0x1934d6(0x178))/0x9);if(_0x45244e===_0x20f33b)break;else _0xb996a4['push'](_0xb996a4['shift']());}catch(_0x2c4060){_0xb996a4['push'](_0xb996a4['shift']());}}}(a302_0x4e64,0xca088));import{createKnowledgeClient,KnowledgeServiceError}from'@lovrabet/sdk';import{AsyncLocalStorage}from'node:async_hooks';import{getKbServiceDomain}from'../constant/domain.js';import{normalizeKbServiceOrigin}from'../core/kb-search-client.js';import{CliError,CliErrors}from'../errors.js';function a302_0x4e64(){const _0x302719=['getStore','pageTooLarge','test','cookie','status','transportFailure','message','timeout','signal','api_error','httpStatus','\x20The\x20entry\x20may\x20already\x20have\x20been\x20saved.\x20Use\x20read-only\x20detail\x20or\x20list\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.','validation','6137936cnBZiV','1017920YmaIGK','origin','Invalid\x20kbServiceDomain:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','616338twGzEV','Knowledge\x20management\x20request\x20cancelled.','408825fCQBvr','9035256HUDHbB','defineProperty','8150709gFiZiH','run','authRequired','5596letjUr','kind','remoteErrorCode','trim','network','200WZWasg','code','669rrIqEG','Configure\x20kbServiceDomain\x20with\x20a\x20trusted\x20HTTPS\x20origin\x20for\x20knowledge\x20management.','cancelled','API\x20error\x20code:\x20'];a302_0x4e64=function(){return _0x302719;};return a302_0x4e64();}const WRITE_RECONCILIATION=a302_0x39c7c6(0x170),session=new AsyncLocalStorage();export class KbManagementError extends CliError{[a302_0x39c7c6(0x16a)];[a302_0x39c7c6(0x15c)];[a302_0x39c7c6(0x16f)];[a302_0x39c7c6(0x166)];constructor(_0x4fdef6,_0x1f310c=![],_0x43c833,_0x1bb556,_0x1334f5=![]){const _0x1c29b1=a302_0x39c7c6;super(_0x1c29b1(0x16e),0x1,_0x4fdef6,_0x43c833?_0x1c29b1(0x164)+_0x43c833:undefined),this[_0x1c29b1(0x16a)]=_0x1f310c,this[_0x1c29b1(0x15c)]=_0x43c833,this['httpStatus']=_0x1bb556,this[_0x1c29b1(0x166)]=_0x1334f5;if(_0x43c833)Object[_0x1c29b1(0x17a)](this,'data',{'value':{'remoteErrorCode':_0x43c833},'enumerable':![]});}}function resolveOrigin(){const _0xeae02f=a302_0x39c7c6,_0x285827=getKbServiceDomain();if(!_0x285827)throw CliErrors[_0xeae02f(0x171)](_0xeae02f(0x162));try{return normalizeKbServiceOrigin(_0x285827);}catch{throw CliErrors[_0xeae02f(0x171)](_0xeae02f(0x175));}}export function withKbManagementSession(_0x27abd9,_0x26a992){const _0x42e097=a302_0x39c7c6;return session[_0x42e097(0x17c)]({'origin':resolveOrigin(),'signal':_0x27abd9},_0x26a992);}export async function withKbManagementClient(_0x18a456,_0x203bfa,_0x2eecbb={}){const _0x273fb3=a302_0x39c7c6,_0x278896=session[_0x273fb3(0x165)]()?.[_0x273fb3(0x174)]??resolveOrigin();if(!_0x18a456[_0x273fb3(0x15d)]())throw CliErrors[_0x273fb3(0x17d)]();const _0x22c367=_0x2eecbb[_0x273fb3(0x16d)]??session[_0x273fb3(0x165)]()?.['signal'];if(_0x22c367?.['aborted'])throw CliErrors['cancelled'](_0x273fb3(0x177));try{const _0x5be64c=createKnowledgeClient({'kbServiceDomain':_0x278896,'authMode':_0x273fb3(0x168),'cookie':_0x18a456,'invokeSource':'cli:rabetbase'});return await _0x203bfa(_0x5be64c,{'signal':_0x22c367});}catch(_0x4d7a53){if(!(_0x4d7a53 instanceof KnowledgeServiceError))throw _0x4d7a53;if(_0x4d7a53['kind']==='auth')throw CliErrors[_0x273fb3(0x17d)]();if(_0x4d7a53[_0x273fb3(0x15b)]===_0x273fb3(0x171))throw CliErrors[_0x273fb3(0x171)](_0x4d7a53[_0x273fb3(0x16b)]);const _0x23aa1d=_0x4d7a53[_0x273fb3(0x15b)]===_0x273fb3(0x15e)||_0x4d7a53['kind']===_0x273fb3(0x16c)||_0x4d7a53[_0x273fb3(0x15b)]===_0x273fb3(0x163);throw new KbManagementError(_0x4d7a53[_0x273fb3(0x16b)]+(_0x4d7a53['writeUncertain']?WRITE_RECONCILIATION:''),_0x23aa1d,/^\d+$/[_0x273fb3(0x167)](_0x4d7a53['code']??'')?_0x4d7a53[_0x273fb3(0x160)]:undefined,_0x4d7a53[_0x273fb3(0x169)],_0x4d7a53[_0x273fb3(0x166)]);}}
@@ -1 +1 @@
1
- function a303_0x1a47(_0x404a0d,_0x2c769d){_0x404a0d=_0x404a0d-0xb3;const _0x5b62d2=a303_0x5b62();let _0x1a47b0=_0x5b62d2[_0x404a0d];return _0x1a47b0;}(function(_0x4b4e9e,_0x57d400){const _0x3e8a21=a303_0x1a47,_0x52200b=_0x4b4e9e();while(!![]){try{const _0x2ec873=-parseInt(_0x3e8a21(0xc1))/0x1+parseInt(_0x3e8a21(0xd0))/0x2+-parseInt(_0x3e8a21(0xbd))/0x3*(-parseInt(_0x3e8a21(0xcd))/0x4)+parseInt(_0x3e8a21(0xc9))/0x5+-parseInt(_0x3e8a21(0xc0))/0x6+-parseInt(_0x3e8a21(0xcc))/0x7+parseInt(_0x3e8a21(0xd2))/0x8;if(_0x2ec873===_0x57d400)break;else _0x52200b['push'](_0x52200b['shift']());}catch(_0x2d9235){_0x52200b['push'](_0x52200b['shift']());}}}(a303_0x5b62,0x56828));import{createKnowledgeClient,KnowledgeServiceError,normalizeKnowledgeServiceOrigin}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function normalizeKbServiceOrigin(_0x3875e7){const _0x5de1f5=a303_0x1a47;try{return normalizeKnowledgeServiceOrigin(_0x3875e7);}catch{throw CliErrors['validation'](_0x5de1f5(0xb6));}}export async function searchDirectKnowledge(_0x32e161){const _0x3be56c=a303_0x1a47,_0x4e0f79=_0x32e161['appCode']['trim'](),_0x4bfb21=_0x32e161[_0x3be56c(0xba)][_0x3be56c(0xd8)]();if(!_0x4e0f79)throw CliErrors[_0x3be56c(0xc7)](_0x3be56c(0xb9));if(!_0x4bfb21)throw CliErrors[_0x3be56c(0xc7)]('Knowledge\x20search\x20query\x20is\x20required.');if(!_0x32e161[_0x3be56c(0xb8)][_0x3be56c(0xd8)]())throw CliErrors[_0x3be56c(0xc2)]();const _0x1ca9d1=normalizeKbServiceOrigin(_0x32e161[_0x3be56c(0xb5)]);try{const _0x1df3d1=createKnowledgeClient({'kbServiceDomain':_0x1ca9d1,'authMode':_0x3be56c(0xb8),'cookie':_0x32e161[_0x3be56c(0xb8)],'invokeSource':'cli:rabetbase'}),_0x97bc1f=await _0x1df3d1['search']({'appCode':_0x4e0f79,'query':_0x4bfb21,'scopes':['public','company'],..._0x32e161[_0x3be56c(0xd4)]!==undefined?{'topK':_0x32e161[_0x3be56c(0xd4)]}:{}},{'signal':_0x32e161['signal']});return{..._0x97bc1f,'hits':_0x97bc1f[_0x3be56c(0xbe)],'schemaVersion':0x2,'profile':'development','total':_0x97bc1f[_0x3be56c(0xbe)][_0x3be56c(0xc5)]};}catch(_0x3977ad){if(!(_0x3977ad instanceof KnowledgeServiceError))throw _0x3977ad;if(_0x3977ad[_0x3be56c(0xbf)]==='auth')throw CliErrors[_0x3be56c(0xc2)]();if(_0x3977ad[_0x3be56c(0xbf)]===_0x3be56c(0xc7))throw CliErrors[_0x3be56c(0xc7)](_0x3977ad[_0x3be56c(0xd6)]);if(_0x3977ad[_0x3be56c(0xbf)]===_0x3be56c(0xc6))throw new DOMException('Knowledge\x20search\x20cancelled.',_0x3be56c(0xd5));if(_0x3977ad['kind']===_0x3be56c(0xcb)||_0x3977ad[_0x3be56c(0xbf)]===_0x3be56c(0xb4))throw CliErrors[_0x3be56c(0xd7)](_0x3977ad[_0x3be56c(0xbf)]==='timeout'?_0x3be56c(0xb7):_0x3be56c(0xd3));const _0x40a4df=_0x3977ad[_0x3be56c(0xbf)]==='contract'&&_0x3977ad[_0x3be56c(0xd6)][_0x3be56c(0xb3)](_0x3be56c(0xbb))?_0x3be56c(0xce):_0x3977ad[_0x3be56c(0xd6)],_0x36363e=CliErrors['apiError'](_0x3977ad[_0x3be56c(0xca)]!==undefined&&_0x3977ad['status']!==0xc8&&!_0x40a4df[_0x3be56c(0xb3)](_0x3be56c(0xc3)+_0x3977ad[_0x3be56c(0xca)])?_0x40a4df+_0x3be56c(0xc8)+_0x3977ad['status']+')':_0x40a4df);if(/^\d+$/[_0x3be56c(0xcf)](_0x3977ad[_0x3be56c(0xd1)]??''))Object[_0x3be56c(0xbc)](_0x36363e,_0x3be56c(0xc4),{'value':{'remoteErrorCode':_0x3977ad[_0x3be56c(0xd1)]},'enumerable':![]});throw _0x36363e;}}function a303_0x5b62(){const _0x30244f=['includes','timeout','serviceUrl','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','cookie','Knowledge\x20search\x20appCode\x20is\x20required.','query','out-of-scope','defineProperty','141ULHtKJ','hits','kind','3966342tliGOC','227678ujhXDh','authRequired','HTTP\x20','data','length','cancelled','validation','\x20(HTTP\x20','2230805CnkBbP','status','network','1416737JbVmvc','40736QbOEcF','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','test','860864PJrvjV','code','721832rvKtVZ','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','topK','AbortError','message','networkError','trim'];a303_0x5b62=function(){return _0x30244f;};return a303_0x5b62();}
1
+ (function(_0x377638,_0x387fb2){const _0x26354a=a303_0x8ab6,_0x1b6766=_0x377638();while(!![]){try{const _0xc8061e=parseInt(_0x26354a(0x1b0))/0x1*(parseInt(_0x26354a(0x1b8))/0x2)+parseInt(_0x26354a(0x1af))/0x3*(parseInt(_0x26354a(0x1b9))/0x4)+parseInt(_0x26354a(0x1ae))/0x5+-parseInt(_0x26354a(0x1c6))/0x6+parseInt(_0x26354a(0x1b3))/0x7+parseInt(_0x26354a(0x1c8))/0x8+-parseInt(_0x26354a(0x1ad))/0x9*(parseInt(_0x26354a(0x1c9))/0xa);if(_0xc8061e===_0x387fb2)break;else _0x1b6766['push'](_0x1b6766['shift']());}catch(_0x58b06){_0x1b6766['push'](_0x1b6766['shift']());}}}(a303_0x2a42,0x81413));import{createKnowledgeClient,KnowledgeServiceError,normalizeKnowledgeServiceOrigin}from'@lovrabet/sdk';function a303_0x2a42(){const _0x3dddf9=['search','validation','Knowledge\x20search\x20cancelled.','976962YPVnHv','341556rEPbqd','out-of-scope','cookie','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','serviceUrl','data','HTTP\x20','includes','Knowledge\x20search\x20appCode\x20is\x20required.','hits','length','code','1748988giqvhN','signal','7178968aVhJZE','1202860mvdbrH','status','apiError','networkError','\x20(HTTP\x20','company','query','topK','message','kind','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','appCode','AbortError','development','171vxoAnh','134935HodanM','9EFogTJ','2DSqOTW','trim','network','6642104UwSZxW','authRequired'];a303_0x2a42=function(){return _0x3dddf9;};return a303_0x2a42();}import{CliErrors}from'../errors.js';function a303_0x8ab6(_0x5e53f8,_0x19aa3b){_0x5e53f8=_0x5e53f8-0x1a4;const _0x2a429e=a303_0x2a42();let _0x8ab633=_0x2a429e[_0x5e53f8];return _0x8ab633;}export function normalizeKbServiceOrigin(_0x28d88f){const _0x44b974=a303_0x8ab6;try{return normalizeKnowledgeServiceOrigin(_0x28d88f);}catch{throw CliErrors[_0x44b974(0x1b6)]('Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.');}}export async function searchDirectKnowledge(_0x389fe6){const _0x2e66b8=a303_0x8ab6,_0x2a5474=_0x389fe6[_0x2e66b8(0x1aa)][_0x2e66b8(0x1b1)](),_0x52ca95=_0x389fe6[_0x2e66b8(0x1a5)]['trim']();if(!_0x2a5474)throw CliErrors[_0x2e66b8(0x1b6)](_0x2e66b8(0x1c2));if(!_0x52ca95)throw CliErrors[_0x2e66b8(0x1b6)]('Knowledge\x20search\x20query\x20is\x20required.');if(!_0x389fe6[_0x2e66b8(0x1bb)][_0x2e66b8(0x1b1)]())throw CliErrors[_0x2e66b8(0x1b4)]();const _0x11ff7e=normalizeKbServiceOrigin(_0x389fe6[_0x2e66b8(0x1be)]);try{const _0x479c8e=createKnowledgeClient({'kbServiceDomain':_0x11ff7e,'authMode':_0x2e66b8(0x1bb),'cookie':_0x389fe6[_0x2e66b8(0x1bb)],'invokeSource':'cli:rabetbase'}),_0x49191d=await _0x479c8e[_0x2e66b8(0x1b5)]({'appCode':_0x2a5474,'query':_0x52ca95,'scopes':['public',_0x2e66b8(0x1a4)],..._0x389fe6[_0x2e66b8(0x1a6)]!==undefined?{'topK':_0x389fe6[_0x2e66b8(0x1a6)]}:{}},{'signal':_0x389fe6[_0x2e66b8(0x1c7)]});return{..._0x49191d,'hits':_0x49191d['hits'],'schemaVersion':0x2,'profile':_0x2e66b8(0x1ac),'total':_0x49191d[_0x2e66b8(0x1c3)][_0x2e66b8(0x1c4)]};}catch(_0x1d0bf9){if(!(_0x1d0bf9 instanceof KnowledgeServiceError))throw _0x1d0bf9;if(_0x1d0bf9[_0x2e66b8(0x1a8)]==='auth')throw CliErrors[_0x2e66b8(0x1b4)]();if(_0x1d0bf9[_0x2e66b8(0x1a8)]==='validation')throw CliErrors[_0x2e66b8(0x1b6)](_0x1d0bf9[_0x2e66b8(0x1a7)]);if(_0x1d0bf9[_0x2e66b8(0x1a8)]==='cancelled')throw new DOMException(_0x2e66b8(0x1b7),_0x2e66b8(0x1ab));if(_0x1d0bf9[_0x2e66b8(0x1a8)]===_0x2e66b8(0x1b2)||_0x1d0bf9[_0x2e66b8(0x1a8)]==='timeout')throw CliErrors[_0x2e66b8(0x1cc)](_0x1d0bf9[_0x2e66b8(0x1a8)]==='timeout'?_0x2e66b8(0x1bc):_0x2e66b8(0x1bd));const _0x3ebc96=_0x1d0bf9[_0x2e66b8(0x1a8)]==='contract'&&_0x1d0bf9[_0x2e66b8(0x1a7)][_0x2e66b8(0x1c1)](_0x2e66b8(0x1ba))?_0x2e66b8(0x1a9):_0x1d0bf9[_0x2e66b8(0x1a7)],_0x50dafe=CliErrors[_0x2e66b8(0x1cb)](_0x1d0bf9[_0x2e66b8(0x1ca)]!==undefined&&_0x1d0bf9[_0x2e66b8(0x1ca)]!==0xc8&&!_0x3ebc96[_0x2e66b8(0x1c1)](_0x2e66b8(0x1c0)+_0x1d0bf9[_0x2e66b8(0x1ca)])?_0x3ebc96+_0x2e66b8(0x1cd)+_0x1d0bf9[_0x2e66b8(0x1ca)]+')':_0x3ebc96);if(/^\d+$/['test'](_0x1d0bf9[_0x2e66b8(0x1c5)]??''))Object['defineProperty'](_0x50dafe,_0x2e66b8(0x1bf),{'value':{'remoteErrorCode':_0x1d0bf9['code']},'enumerable':![]});throw _0x50dafe;}}