@treasuredata/tdx 2026.8.1 → 2026.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/cas-command.js +1 -1
  11. package/dist/commands/cas-segment-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-statusline-command.js +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/connection-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/delivery-command.js +1 -1
  20. package/dist/commands/describe.js +1 -1
  21. package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
  22. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  23. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  24. package/dist/commands/engage-campaign-pull-command.js +1 -1
  25. package/dist/commands/engage-campaign-push-command.js +1 -1
  26. package/dist/commands/engage-campaign-validate-command.js +1 -1
  27. package/dist/commands/engage-command.js +1 -1
  28. package/dist/commands/engage-template-pull-command.js +1 -1
  29. package/dist/commands/engage-template-push-command.js +1 -1
  30. package/dist/commands/engage-template-validate-command.js +1 -1
  31. package/dist/commands/job-command.js +1 -1
  32. package/dist/commands/journey-command.js +1 -1
  33. package/dist/commands/journey-validate-command.js +1 -1
  34. package/dist/commands/llm-command.js +1 -1
  35. package/dist/commands/mcp-command.js +1 -1
  36. package/dist/commands/parent-segment-command.js +1 -1
  37. package/dist/commands/policy-command.js +1 -1
  38. package/dist/commands/profile-command.js +1 -1
  39. package/dist/commands/profiles-command.js +1 -1
  40. package/dist/commands/query-command.js +1 -1
  41. package/dist/commands/schedule-command.js +1 -1
  42. package/dist/commands/segment-command.js +1 -1
  43. package/dist/commands/segment-create-command.js +1 -1
  44. package/dist/commands/segment-fields-command.js +1 -1
  45. package/dist/commands/segment-move-command.js +1 -1
  46. package/dist/commands/segment-pull-command.js +1 -1
  47. package/dist/commands/segment-push-command.js +1 -1
  48. package/dist/commands/segment-update-command.js +1 -1
  49. package/dist/commands/segment-use-command.js +1 -1
  50. package/dist/commands/segment-validate-command.js +1 -1
  51. package/dist/commands/segments.js +1 -1
  52. package/dist/commands/show.js +1 -1
  53. package/dist/commands/status-command.js +1 -1
  54. package/dist/commands/table-deleted.js +1 -1
  55. package/dist/commands/tables.js +1 -1
  56. package/dist/commands/unset-command.js +1 -1
  57. package/dist/commands/upgrade-command.js +1 -1
  58. package/dist/commands/use-command.js +1 -1
  59. package/dist/commands/user-command.js +1 -1
  60. package/dist/commands/work-command.js +1 -1
  61. package/dist/commands/workflow-command.js +1 -1
  62. package/dist/core/auth.js +1 -1
  63. package/dist/core/command-output.js +1 -1
  64. package/dist/core/config.js +1 -1
  65. package/dist/core/connection-cache.js +1 -1
  66. package/dist/core/constants.js +1 -1
  67. package/dist/core/credential-cache.js +1 -1
  68. package/dist/core/global-context.js +1 -1
  69. package/dist/core/keychain.js +1 -1
  70. package/dist/core/oauth-keychain.js +1 -1
  71. package/dist/core/oauth.js +1 -1
  72. package/dist/core/profile.js +1 -1
  73. package/dist/core/project-config.js +1 -1
  74. package/dist/core/session.js +1 -1
  75. package/dist/core/site-mismatch.js +1 -1
  76. package/dist/core/user-cache.js +1 -1
  77. package/dist/core/version.js +1 -1
  78. package/dist/index.js +1 -1
  79. package/dist/mcp/server.js +1 -1
  80. package/dist/mcp/tools/index.js +1 -1
  81. package/dist/mcp/tools/tdx-run.js +1 -1
  82. package/dist/mcp/tools/tdx-search.js +1 -1
  83. package/dist/mcp/tools/work-create-item.js +1 -1
  84. package/dist/mcp/utils.js +1 -1
  85. package/dist/proxy/claude-usage-tracker.js +1 -1
  86. package/dist/proxy/passthrough-server.js +1 -1
  87. package/dist/proxy/sse-usage-parser.js +1 -1
  88. package/dist/sdk/agent/agent-config.js +1 -1
  89. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  90. package/dist/sdk/agent/agent-yaml.js +1 -1
  91. package/dist/sdk/agent/test/evaluator.js +1 -1
  92. package/dist/sdk/agent/test/executor.js +1 -1
  93. package/dist/sdk/agent/test/index.js +1 -1
  94. package/dist/sdk/agent/test/output.js +1 -1
  95. package/dist/sdk/agent/test/parser.js +1 -1
  96. package/dist/sdk/agent/tool-target-registry.js +1 -1
  97. package/dist/sdk/api.js +1 -1
  98. package/dist/sdk/auth-token.js +1 -1
  99. package/dist/sdk/cas/cas-api-client.d.ts +9 -3
  100. package/dist/sdk/cas/cas-api-client.d.ts.map +1 -1
  101. package/dist/sdk/cas/cas-api-client.js +1 -1
  102. package/dist/sdk/cas/cas-api-client.js.map +1 -1
  103. package/dist/sdk/cas/cas-audience-schema.d.ts +2 -0
  104. package/dist/sdk/cas/cas-audience-schema.d.ts.map +1 -1
  105. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  106. package/dist/sdk/cas/cas-audience-schema.js.map +1 -1
  107. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  108. package/dist/sdk/cas/cas-audience-yaml.d.ts.map +1 -1
  109. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  110. package/dist/sdk/cas/cas-audience-yaml.js.map +1 -1
  111. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  112. package/dist/sdk/cas/index.d.ts +10 -0
  113. package/dist/sdk/cas/index.d.ts.map +1 -1
  114. package/dist/sdk/cas/index.js +1 -1
  115. package/dist/sdk/cas/index.js.map +1 -1
  116. package/dist/sdk/cas/pull-workflow.js +1 -1
  117. package/dist/sdk/cas/push-workflow.d.ts.map +1 -1
  118. package/dist/sdk/cas/push-workflow.js +1 -1
  119. package/dist/sdk/cas/push-workflow.js.map +1 -1
  120. package/dist/sdk/cas/types.d.ts +2 -0
  121. package/dist/sdk/cas/types.d.ts.map +1 -1
  122. package/dist/sdk/cas/validate-files.js +1 -1
  123. package/dist/sdk/client/cdp-api-client.js +1 -1
  124. package/dist/sdk/client/delivery-api-client.js +1 -1
  125. package/dist/sdk/client/endpoints.js +1 -1
  126. package/dist/sdk/client/engage-api-client.js +1 -1
  127. package/dist/sdk/client/http-client.js +1 -1
  128. package/dist/sdk/client/llm-api-client.js +1 -1
  129. package/dist/sdk/client/oauth-refresh.js +1 -1
  130. package/dist/sdk/client/rate-limiter.js +1 -1
  131. package/dist/sdk/client/td-api-client.js +1 -1
  132. package/dist/sdk/client/trino-api-client.js +1 -1
  133. package/dist/sdk/client/workflow-client.js +1 -1
  134. package/dist/sdk/connection-validator.js +1 -1
  135. package/dist/sdk/connection.js +1 -1
  136. package/dist/sdk/delivery.js +1 -1
  137. package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
  138. package/dist/sdk/engage/always-on-campaign-push.js +1 -1
  139. package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
  140. package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
  141. package/dist/sdk/engage/campaign-pull.js +1 -1
  142. package/dist/sdk/engage/campaign-push.js +1 -1
  143. package/dist/sdk/engage/campaign-validator.js +1 -1
  144. package/dist/sdk/engage/campaign-yaml.js +1 -1
  145. package/dist/sdk/engage/template-pull.js +1 -1
  146. package/dist/sdk/engage/template-push.js +1 -1
  147. package/dist/sdk/engage/template-validator.js +1 -1
  148. package/dist/sdk/engage/template-yaml.js +1 -1
  149. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  150. package/dist/sdk/engage/types/campaign-def.js +1 -1
  151. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  152. package/dist/sdk/engage/types/template-schema.js +1 -1
  153. package/dist/sdk/engage.js +1 -1
  154. package/dist/sdk/errors.js +1 -1
  155. package/dist/sdk/index.js +1 -1
  156. package/dist/sdk/io/index.js +1 -1
  157. package/dist/sdk/io/node-filesystem.js +1 -1
  158. package/dist/sdk/job.js +1 -1
  159. package/dist/sdk/journey.js +1 -1
  160. package/dist/sdk/llm/chat-cache.js +1 -1
  161. package/dist/sdk/llm/index.js +1 -1
  162. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  163. package/dist/sdk/llm/model-factors.js +1 -1
  164. package/dist/sdk/llm/user-settings.js +1 -1
  165. package/dist/sdk/personalization.js +1 -1
  166. package/dist/sdk/policy.js +1 -1
  167. package/dist/sdk/query/deleted-table-validation.js +1 -1
  168. package/dist/sdk/query/index.js +1 -1
  169. package/dist/sdk/query/sql-parser.js +1 -1
  170. package/dist/sdk/realtime.js +1 -1
  171. package/dist/sdk/schedule.js +1 -1
  172. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  173. package/dist/sdk/segment/fields-display.js +1 -1
  174. package/dist/sdk/segment/file-discovery.js +1 -1
  175. package/dist/sdk/segment/journey-utils.js +1 -1
  176. package/dist/sdk/segment/journey-validator.js +1 -1
  177. package/dist/sdk/segment/journey-yaml.js +1 -1
  178. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  179. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  180. package/dist/sdk/segment/pull-workflow.js +1 -1
  181. package/dist/sdk/segment/push-recovery.js +1 -1
  182. package/dist/sdk/segment/push-workflow.js +1 -1
  183. package/dist/sdk/segment/resolution-context.js +1 -1
  184. package/dist/sdk/segment/segment-path-parser.js +1 -1
  185. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  186. package/dist/sdk/segment/segment-validator.js +1 -1
  187. package/dist/sdk/segment/target-resolution.js +1 -1
  188. package/dist/sdk/segment/tdx-config.js +1 -1
  189. package/dist/sdk/segment/types/activation-schema.js +1 -1
  190. package/dist/sdk/segment/types/journey-def.js +1 -1
  191. package/dist/sdk/segment/types/journey-schema.js +1 -1
  192. package/dist/sdk/segment/types/segment-def.js +1 -1
  193. package/dist/sdk/segment/types/segment-schema.js +1 -1
  194. package/dist/sdk/segment/validate-files.js +1 -1
  195. package/dist/sdk/segment/yaml-validator.js +1 -1
  196. package/dist/sdk/segment.js +1 -1
  197. package/dist/sdk/types/cas.d.ts +4 -0
  198. package/dist/sdk/types/cas.d.ts.map +1 -1
  199. package/dist/sdk/types/index.js +1 -1
  200. package/dist/sdk/types/progress.js +1 -1
  201. package/dist/sdk/types/workspace.js +1 -1
  202. package/dist/sdk/user.js +1 -1
  203. package/dist/sdk/util/format-detector.js +1 -1
  204. package/dist/sdk/util/formatters.js +1 -1
  205. package/dist/sdk/util/index.js +1 -1
  206. package/dist/sdk/util/paginate.js +1 -1
  207. package/dist/sdk/util/tree-formatter.js +1 -1
  208. package/dist/sdk/util/tree-search.js +1 -1
  209. package/dist/sdk/workflow/archive-validation.js +1 -1
  210. package/dist/sdk/workflow/clone-workflow.js +1 -1
  211. package/dist/sdk/workflow/index.js +1 -1
  212. package/dist/sdk/workflow/pull-workflow.js +1 -1
  213. package/dist/sdk/workflow/push-workflow.js +1 -1
  214. package/dist/sdk/workflow/task-graph.js +1 -1
  215. package/dist/sdk/workflow/tdx-config.js +1 -1
  216. package/dist/sdk/workflow/workflow-utils.js +1 -1
  217. package/dist/sdk/workspace/access-tracker.js +1 -1
  218. package/dist/sdk/workspace/frontmatter.js +1 -1
  219. package/dist/sdk/workspace/git.js +1 -1
  220. package/dist/sdk/workspace/index.js +1 -1
  221. package/dist/sdk/workspace/templates.js +1 -1
  222. package/dist/sdk/workspace/weekly.js +1 -1
  223. package/dist/sdk/workspace/wikilinks.js +1 -1
  224. package/dist/test-utils/command-runner.js +1 -1
  225. package/dist/test-utils/factories.js +1 -1
  226. package/dist/test-utils/fixtures.js +1 -1
  227. package/dist/test-utils/http-mock.js +1 -1
  228. package/dist/test-utils/index.js +1 -1
  229. package/dist/utils/async.js +1 -1
  230. package/dist/utils/claude-code-state.js +1 -1
  231. package/dist/utils/colors.js +1 -1
  232. package/dist/utils/diff.js +1 -1
  233. package/dist/utils/file-permissions.js +1 -1
  234. package/dist/utils/file-reader.js +1 -1
  235. package/dist/utils/github-releases.js +1 -1
  236. package/dist/utils/global-cache.js +1 -1
  237. package/dist/utils/json-loader.js +1 -1
  238. package/dist/utils/local-cache.js +1 -1
  239. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  240. package/dist/utils/logger/formatters/index.js +1 -1
  241. package/dist/utils/logger/handlers/console-handler.js +1 -1
  242. package/dist/utils/logger/handlers/file-handler.js +1 -1
  243. package/dist/utils/logger/handlers/index.js +1 -1
  244. package/dist/utils/logger/handlers/null-handler.js +1 -1
  245. package/dist/utils/logger/index.js +1 -1
  246. package/dist/utils/logger/logger.js +1 -1
  247. package/dist/utils/logger/types.js +1 -1
  248. package/dist/utils/option-validation.js +1 -1
  249. package/dist/utils/process.js +1 -1
  250. package/dist/utils/prompt.js +1 -1
  251. package/dist/utils/proxy-fetch.js +1 -1
  252. package/dist/utils/spinner.js +1 -1
  253. package/dist/utils/sse-parser.js +1 -1
  254. package/dist/utils/string-utils.js +1 -1
  255. package/dist/utils/table-ref-parser.js +1 -1
  256. package/dist/utils/tdx-logger.js +1 -1
  257. package/dist/utils/version-check.js +1 -1
  258. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x4b94f3,_0x38b72b){const _0x329472=a166_0x5de8,_0x5e5f75=_0x4b94f3();while(!![]){try{const _0x1e45d6=parseInt(_0x329472(0xbb))/0x1+-parseInt(_0x329472(0xdf))/0x2*(-parseInt(_0x329472(0xa1))/0x3)+parseInt(_0x329472(0xa5))/0x4+parseInt(_0x329472(0x85))/0x5*(-parseInt(_0x329472(0xa8))/0x6)+parseInt(_0x329472(0x8d))/0x7*(parseInt(_0x329472(0x81))/0x8)+parseInt(_0x329472(0xd9))/0x9+-parseInt(_0x329472(0xac))/0xa;if(_0x1e45d6===_0x38b72b)break;else _0x5e5f75['push'](_0x5e5f75['shift']());}catch(_0x17bca8){_0x5e5f75['push'](_0x5e5f75['shift']());}}}(a166_0x1095,0xe6bba));import*as a166_0x467fd8 from'yaml';function formatScheduleTime(_0x41b6df){const _0x31ed19=a166_0x5de8;if(typeof _0x41b6df==='number'){const _0x47760b=Math['floor'](_0x41b6df);return String(_0x47760b)[_0x31ed19(0x9c)](0x2,'0')+_0x31ed19(0xdd);}if(typeof _0x41b6df===_0x31ed19(0xc3)){if(/^\d{2}:\d{2}:\d{2}$/[_0x31ed19(0xe3)](_0x41b6df))return _0x41b6df;if(/^\d{1,2}:\d{2}$/[_0x31ed19(0xe3)](_0x41b6df)){const [_0x32ad7c,_0x39fff2]=_0x41b6df['split'](':');return _0x32ad7c[_0x31ed19(0x9c)](0x2,'0')+':'+_0x39fff2+_0x31ed19(0xce);}const _0x178cbc=parseInt(_0x41b6df,0xa);if(!isNaN(_0x178cbc)&&_0x41b6df['match'](/^\d+$/))return String(_0x178cbc)[_0x31ed19(0x9c)](0x2,'0')+_0x31ed19(0xdd);return _0x41b6df;}return String(_0x41b6df);}export function apiToDef(_0x5dcd00){const _0x3f1959=a166_0x5de8,_0x1b8508={'database':_0x5dcd00[_0x3f1959(0xd8)]?.[_0x3f1959(0xd6)]||'','table':_0x5dcd00[_0x3f1959(0xd8)]?.[_0x3f1959(0xe2)]||''};_0x5dcd00[_0x3f1959(0x9e)]&&_0x5dcd00[_0x3f1959(0x9e)]['length']>0x0&&(_0x1b8508[_0x3f1959(0xd5)]=_0x5dcd00[_0x3f1959(0x9e)][_0x3f1959(0xaa)](_0x4901c2=>({'column':_0x4901c2[_0x3f1959(0x89)],'values':_0x4901c2[_0x3f1959(0xb1)]})));let _0x207ec4;_0x5dcd00[_0x3f1959(0xd3)]&&_0x5dcd00[_0x3f1959(0xd3)]!==_0x3f1959(0xd4)&&(_0x207ec4={'type':_0x5dcd00[_0x3f1959(0xd3)]},_0x5dcd00['scheduleOption']&&(_0x207ec4[_0x3f1959(0x92)]=formatScheduleTime(_0x5dcd00[_0x3f1959(0xca)])),_0x5dcd00[_0x3f1959(0xb4)]&&(_0x207ec4[_0x3f1959(0xb4)]=_0x5dcd00['timezone']));let _0x16bc71;(_0x5dcd00['workflowHiveOnly']||_0x5dcd00['hivePoolName']||_0x5dcd00[_0x3f1959(0xda)])&&(_0x16bc71={},_0x5dcd00[_0x3f1959(0x9f)]&&(_0x16bc71['hive_only']=_0x5dcd00[_0x3f1959(0x9f)]),_0x5dcd00[_0x3f1959(0xa0)]&&(_0x16bc71[_0x3f1959(0xa7)]=_0x5dcd00[_0x3f1959(0xa0)]),_0x5dcd00[_0x3f1959(0xda)]&&(_0x16bc71[_0x3f1959(0xcb)]=_0x5dcd00[_0x3f1959(0xda)]));const _0x41a8f2=_0x5dcd00[_0x3f1959(0x98)]&&_0x5dcd00['attributes'][_0x3f1959(0xe0)]>0x0?groupAttributesBySource(_0x5dcd00[_0x3f1959(0x98)]):undefined,_0x45965f=_0x5dcd00['behaviors']&&_0x5dcd00['behaviors'][_0x3f1959(0xe0)]>0x0?_0x5dcd00[_0x3f1959(0x84)][_0x3f1959(0xaa)](convertApiBehaviorToYaml):undefined;let _0x24d436;_0x5dcd00['customerGroup']&&(_0x24d436={'name':_0x5dcd00[_0x3f1959(0xde)][_0x3f1959(0xb3)],'source':{'database':_0x5dcd00[_0x3f1959(0xde)][_0x3f1959(0xd6)],'table':_0x5dcd00['customerGroup'][_0x3f1959(0xe2)]},'join':{'parent_key':_0x5dcd00['customerGroup'][_0x3f1959(0xab)],'child_key':_0x5dcd00[_0x3f1959(0xde)][_0x3f1959(0x9d)]}},_0x5dcd00[_0x3f1959(0xde)]['customerGroupAttributes']&&_0x5dcd00[_0x3f1959(0xde)][_0x3f1959(0xa3)]['length']>0x0&&(_0x24d436[_0x3f1959(0x98)]=groupAttributesBySource(_0x5dcd00[_0x3f1959(0xde)][_0x3f1959(0xa3)])),_0x5dcd00[_0x3f1959(0xde)][_0x3f1959(0xb5)]&&_0x5dcd00[_0x3f1959(0xde)][_0x3f1959(0xb5)][_0x3f1959(0xe0)]>0x0&&(_0x24d436[_0x3f1959(0x84)]=_0x5dcd00[_0x3f1959(0xde)][_0x3f1959(0xb5)]['map'](convertApiBehaviorToYaml)));const _0x41dc02={'name':_0x5dcd00[_0x3f1959(0xb3)],..._0x5dcd00[_0x3f1959(0xc1)]&&{'description':_0x5dcd00[_0x3f1959(0xc1)]},'master':_0x1b8508,..._0x207ec4&&{'schedule':_0x207ec4},..._0x16bc71&&{'engine':_0x16bc71},..._0x41a8f2&&{'attributes':_0x41a8f2},..._0x45965f&&{'behaviors':_0x45965f},..._0x24d436&&{'customer_group':_0x24d436}};return _0x41dc02;}function groupAttributesBySource(_0x4e5f5d){const _0x556aa5=a166_0x5de8,_0x3d8a90=new Map();for(const _0x151bf8 of _0x4e5f5d){const _0x2725d8=_0x151bf8[_0x556aa5(0xd6)]+'.'+_0x151bf8[_0x556aa5(0xe2)]+'.'+_0x151bf8[_0x556aa5(0x9d)]+'.'+_0x151bf8[_0x556aa5(0xab)];!_0x3d8a90[_0x556aa5(0xcc)](_0x2725d8)&&_0x3d8a90[_0x556aa5(0xaf)](_0x2725d8,[]),_0x3d8a90[_0x556aa5(0xb8)](_0x2725d8)[_0x556aa5(0x88)](_0x151bf8);}const _0x3af74c=[];for(const [,_0x54b10a]of _0x3d8a90){const _0x562d93=_0x54b10a[0x0],_0x1c740e=_0x562d93['groupingName']||_0x562d93[_0x556aa5(0xe2)];_0x3af74c[_0x556aa5(0x88)]({'name':_0x1c740e,'source':{'database':_0x562d93[_0x556aa5(0xd6)],'table':_0x562d93[_0x556aa5(0xe2)]},'join':{'parent_key':_0x562d93['foreignKey'],'child_key':_0x562d93[_0x556aa5(0x9d)]},'columns':_0x54b10a[_0x556aa5(0xaa)](_0xaa4134=>{const _0x979a35=_0x556aa5,_0x4b1fe4={'column':_0xaa4134[_0x979a35(0x8c)],'type':_0xaa4134[_0x979a35(0x90)]};return _0xaa4134[_0x979a35(0xb3)]!==_0xaa4134['parentColumn']&&(_0x4b1fe4[_0x979a35(0x82)]=_0xaa4134[_0x979a35(0xb3)]),_0x4b1fe4;})});}return _0x3af74c;}function convertApiBehaviorToYaml(_0x484a73){const _0x5b589b=a166_0x5de8,_0x16a9d8={'name':_0x484a73['name'],'source':{'database':_0x484a73['parentDatabaseName'],'table':_0x484a73[_0x5b589b(0xe2)]},'join':{'parent_key':_0x484a73['foreignKey'],'child_key':_0x484a73[_0x5b589b(0x9d)]}};if(_0x484a73[_0x5b589b(0xd1)])_0x16a9d8[_0x5b589b(0xe1)]=!![];else _0x484a73['schema']&&_0x484a73[_0x5b589b(0xb9)][_0x5b589b(0xe0)]>0x0&&(_0x16a9d8[_0x5b589b(0xe8)]=_0x484a73[_0x5b589b(0xb9)][_0x5b589b(0xaa)](_0x522b34=>{const _0x19c73a=_0x5b589b,_0xddce87={'column':_0x522b34[_0x19c73a(0x8c)],'type':_0x522b34['type']};return _0x522b34[_0x19c73a(0xb3)]!==_0x522b34[_0x19c73a(0x8c)]&&(_0xddce87[_0x19c73a(0x82)]=_0x522b34['name']),_0xddce87;}));return _0x484a73['defaultTimeFilterEnabled']&&(_0x16a9d8['default_time_filter']=_0x484a73['defaultTimeFilterEnabled']),_0x484a73[_0x5b589b(0x91)]&&(_0x16a9d8[_0x5b589b(0xc8)]=_0x484a73[_0x5b589b(0x91)]),_0x16a9d8;}function a166_0x5de8(_0x5626d9,_0x14f025){_0x5626d9=_0x5626d9-0x7e;const _0x1095c5=a166_0x1095();let _0x5de83d=_0x1095c5[_0x5626d9];return _0x5de83d;}export function defToApi(_0x38c0ae){const _0x15ac14=a166_0x5de8,_0x2677a9={'name':_0x38c0ae[_0x15ac14(0xb3)],'master':{'parentDatabaseName':_0x38c0ae[_0x15ac14(0xd8)][_0x15ac14(0xcd)],'parentTableName':_0x38c0ae[_0x15ac14(0xd8)][_0x15ac14(0x93)]}};_0x38c0ae[_0x15ac14(0xc1)]&&(_0x2677a9[_0x15ac14(0xc1)]=_0x38c0ae[_0x15ac14(0xc1)]);_0x38c0ae[_0x15ac14(0xd8)][_0x15ac14(0xd5)]&&_0x38c0ae[_0x15ac14(0xd8)][_0x15ac14(0xd5)][_0x15ac14(0xe0)]>0x0&&(_0x2677a9[_0x15ac14(0x9e)]=_0x38c0ae[_0x15ac14(0xd8)]['filters'][_0x15ac14(0xaa)](_0x4c62d7=>({'columnName':_0x4c62d7[_0x15ac14(0xa6)],'rightValues':_0x4c62d7[_0x15ac14(0xb0)]})));_0x38c0ae[_0x15ac14(0xc9)]&&(_0x2677a9[_0x15ac14(0xd3)]=_0x38c0ae[_0x15ac14(0xc9)]['type'],_0x38c0ae[_0x15ac14(0xc9)][_0x15ac14(0x92)]&&(_0x2677a9[_0x15ac14(0xca)]=_0x38c0ae[_0x15ac14(0xc9)][_0x15ac14(0x92)]),_0x38c0ae[_0x15ac14(0xc9)][_0x15ac14(0xb4)]&&(_0x2677a9[_0x15ac14(0xb4)]=_0x38c0ae['schedule']['timezone']));_0x38c0ae[_0x15ac14(0x80)]&&(_0x38c0ae[_0x15ac14(0x80)]['hive_only']!==undefined&&(_0x2677a9[_0x15ac14(0x9f)]=_0x38c0ae[_0x15ac14(0x80)][_0x15ac14(0xd7)]),_0x38c0ae[_0x15ac14(0x80)]['hive_pool']!==undefined&&(_0x2677a9['hivePoolName']=_0x38c0ae[_0x15ac14(0x80)]['hive_pool']),_0x38c0ae[_0x15ac14(0x80)][_0x15ac14(0xcb)]!==undefined&&(_0x2677a9['prestoPoolName']=_0x38c0ae[_0x15ac14(0x80)][_0x15ac14(0xcb)]));_0x38c0ae[_0x15ac14(0x98)]&&_0x38c0ae['attributes']['length']>0x0&&(_0x2677a9['attributes']=flattenAttributeGroups(_0x38c0ae[_0x15ac14(0x98)]));_0x38c0ae[_0x15ac14(0x84)]&&_0x38c0ae[_0x15ac14(0x84)]['length']>0x0&&(_0x2677a9[_0x15ac14(0x84)]=_0x38c0ae[_0x15ac14(0x84)][_0x15ac14(0xaa)](convertDefBehaviorToApi));if(_0x38c0ae['customer_group']){const _0xfd44d7=_0x38c0ae[_0x15ac14(0x9b)];_0x2677a9['customerGroup']={'name':_0xfd44d7[_0x15ac14(0xb3)],'parentDatabaseName':_0xfd44d7[_0x15ac14(0xbe)][_0x15ac14(0xcd)],'parentTableName':_0xfd44d7[_0x15ac14(0xbe)][_0x15ac14(0x93)],'parentKey':_0xfd44d7[_0x15ac14(0xad)][_0x15ac14(0xcf)],'foreignKey':_0xfd44d7[_0x15ac14(0xad)]['parent_key']},_0xfd44d7[_0x15ac14(0x98)]&&_0xfd44d7[_0x15ac14(0x98)][_0x15ac14(0xe0)]>0x0&&(_0x2677a9[_0x15ac14(0xde)][_0x15ac14(0xa3)]=flattenAttributeGroups(_0xfd44d7[_0x15ac14(0x98)])[_0x15ac14(0xaa)](_0x4e0097=>({'name':_0x4e0097[_0x15ac14(0xb3)],'type':_0x4e0097[_0x15ac14(0x90)],'parentDatabaseName':_0x4e0097[_0x15ac14(0xd6)],'parentTableName':_0x4e0097[_0x15ac14(0xe2)],'parentColumn':_0x4e0097[_0x15ac14(0x8c)],'parentKey':_0x4e0097['parentKey'],'foreignKey':_0x4e0097[_0x15ac14(0xab)]}))),_0xfd44d7[_0x15ac14(0x84)]&&_0xfd44d7[_0x15ac14(0x84)]['length']>0x0&&(_0x2677a9[_0x15ac14(0xde)][_0x15ac14(0xb5)]=_0xfd44d7['behaviors'][_0x15ac14(0xaa)](_0x44cf5d=>({'name':_0x44cf5d[_0x15ac14(0xb3)],'parentDatabaseName':_0x44cf5d[_0x15ac14(0xbe)][_0x15ac14(0xcd)],'parentTableName':_0x44cf5d[_0x15ac14(0xbe)]['table'],'parentKey':_0x44cf5d[_0x15ac14(0xad)]['child_key'],'foreignKey':_0x44cf5d[_0x15ac14(0xad)][_0x15ac14(0xc6)],'allColumns':_0x44cf5d[_0x15ac14(0xe1)],'schema':_0x44cf5d['columns']?.[_0x15ac14(0xaa)](_0x210d61=>({'name':_0x210d61[_0x15ac14(0x82)]||_0x210d61[_0x15ac14(0xa6)],'type':_0x210d61[_0x15ac14(0x90)],'parentColumn':_0x210d61['column']}))})));}return _0x2677a9;}function flattenAttributeGroups(_0x249615){const _0x5d68ce=a166_0x5de8,_0x421056=[];for(const _0x19e549 of _0x249615){for(const _0xae8ac2 of _0x19e549['columns']){_0x421056[_0x5d68ce(0x88)]({'name':_0xae8ac2['label']||_0xae8ac2[_0x5d68ce(0xa6)],'type':_0xae8ac2[_0x5d68ce(0x90)],'parentDatabaseName':_0x19e549['source'][_0x5d68ce(0xcd)],'parentTableName':_0x19e549[_0x5d68ce(0xbe)][_0x5d68ce(0x93)],'parentColumn':_0xae8ac2['column'],'parentKey':_0x19e549[_0x5d68ce(0xad)][_0x5d68ce(0xcf)],'foreignKey':_0x19e549['join'][_0x5d68ce(0xc6)],'groupingName':_0x19e549[_0x5d68ce(0xb3)]});}}return _0x421056;}function convertDefBehaviorToApi(_0x370574){const _0x5867a4=a166_0x5de8,_0x1f1b13={'name':_0x370574['name'],'parentDatabaseName':_0x370574[_0x5867a4(0xbe)][_0x5867a4(0xcd)],'parentTableName':_0x370574[_0x5867a4(0xbe)]['table'],'parentKey':_0x370574[_0x5867a4(0xad)][_0x5867a4(0xcf)],'foreignKey':_0x370574[_0x5867a4(0xad)][_0x5867a4(0xc6)]};if(_0x370574[_0x5867a4(0xe1)])_0x1f1b13[_0x5867a4(0xd1)]=!![];else _0x370574['columns']&&_0x370574[_0x5867a4(0xe8)][_0x5867a4(0xe0)]>0x0&&(_0x1f1b13['schema']=_0x370574[_0x5867a4(0xe8)][_0x5867a4(0xaa)](_0x2b4b41=>({'name':_0x2b4b41[_0x5867a4(0x82)]||_0x2b4b41[_0x5867a4(0xa6)],'type':_0x2b4b41[_0x5867a4(0x90)],'parentColumn':_0x2b4b41['column']})));return _0x370574[_0x5867a4(0x94)]!==undefined&&(_0x1f1b13[_0x5867a4(0xb7)]=_0x370574[_0x5867a4(0x94)]),_0x370574[_0x5867a4(0xc8)]!==undefined&&(_0x1f1b13[_0x5867a4(0x91)]=_0x370574[_0x5867a4(0xc8)]),_0x1f1b13;}export function serializeDef(_0xb43ce9){const _0x4d290b=a166_0x5de8,_0x53d1b7=JSON[_0x4d290b(0x8a)](JSON[_0x4d290b(0xe4)](_0xb43ce9)),_0x2e46db=a166_0x467fd8[_0x4d290b(0xe4)](_0x53d1b7,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x4d290b(0xae)}),_0x19b540=[_0x4d290b(0xba),'schedule:','engine:',_0x4d290b(0xbc),_0x4d290b(0x8b),_0x4d290b(0xc0),_0x4d290b(0x8f),_0x4d290b(0xc2)];let _0x2c61cb=_0x2e46db;for(const _0x5e8332 of _0x19b540){_0x2c61cb=_0x2c61cb[_0x4d290b(0xc5)](new RegExp('^('+_0x5e8332+')','m'),(_0x564a95,_0x125f11,_0x16d279)=>{if(_0x16d279===0x0||_0x2c61cb[_0x16d279-0x1]==='\x0a'&&_0x2c61cb[_0x16d279-0x2]==='\x0a')return _0x125f11;return'\x0a'+_0x125f11;});}return _0x2c61cb;}export function parseDef(_0x461a68){const _0x467e20=a166_0x5de8,_0x117de8=a166_0x467fd8['parse'](_0x461a68);if(!_0x117de8['name'])throw new Error('YAML\x20config\x20missing\x20required\x20field:\x20name');if(!_0x117de8[_0x467e20(0xd8)])throw new Error('YAML\x20config\x20missing\x20required\x20field:\x20master');if(!_0x117de8[_0x467e20(0xd8)][_0x467e20(0xcd)])throw new Error(_0x467e20(0x97));if(!_0x117de8['master'][_0x467e20(0x93)])throw new Error(_0x467e20(0x9a));return _0x117de8[_0x467e20(0xc8)]&&validateRealtimeSection(_0x117de8[_0x467e20(0xc8)]),_0x117de8[_0x467e20(0xb2)]&&validatePersonalizationServices(_0x117de8['personalization_services']),_0x117de8;}function validateRealtimeSection(_0x3bf0ff){const _0x1d7b2a=a166_0x5de8,_0x147342=['single',_0x1d7b2a(0xbf),_0x1d7b2a(0xaf),_0x1d7b2a(0xa2),_0x1d7b2a(0x83),_0x1d7b2a(0xd2)];_0x3bf0ff[_0x1d7b2a(0xe6)]&&Array[_0x1d7b2a(0x99)](_0x3bf0ff[_0x1d7b2a(0xe6)])&&_0x3bf0ff[_0x1d7b2a(0xe6)][_0x1d7b2a(0xbd)]((_0x5cc1cc,_0x5810cc)=>{const _0x174653=_0x1d7b2a;if(!_0x5cc1cc[_0x174653(0xb3)])throw new Error('realtime.events['+_0x5810cc+_0x174653(0xdc));});_0x3bf0ff['attributes']&&Array[_0x1d7b2a(0x99)](_0x3bf0ff[_0x1d7b2a(0x98)])&&_0x3bf0ff['attributes'][_0x1d7b2a(0xbd)]((_0x33e39a,_0x41042)=>{const _0x38ce15=_0x1d7b2a;if(!_0x33e39a[_0x38ce15(0xb3)])throw new Error('realtime.attributes['+_0x41042+']:\x20Missing\x20required\x20field\x20\x27name\x27');if(_0x33e39a[_0x38ce15(0x90)]&&!_0x147342[_0x38ce15(0xc7)](_0x33e39a[_0x38ce15(0x90)]))throw new Error(_0x38ce15(0xa4)+_0x41042+']\x20('+_0x33e39a[_0x38ce15(0xb3)]+'):\x20Invalid\x20type\x20\x27'+_0x33e39a['type']+_0x38ce15(0x86)+_0x147342['join'](',\x20'));});if(_0x3bf0ff[_0x1d7b2a(0xe9)]){if(!_0x3bf0ff[_0x1d7b2a(0xe9)][_0x1d7b2a(0x95)])throw new Error('realtime.id_stitching:\x20Missing\x20required\x20field\x20\x27primary_key\x27');}}function a166_0x1095(){const _0x5320a2=['customer_group','padStart','parentKey','audienceFilters','workflowHiveOnly','hivePoolName','4477254PCacTo','ordered_set','customerGroupAttributes','realtime.attributes[','6201276yzdRTn','column','hive_pool','33090qyLWlk','attribute_table','map','foreignKey','52837380yfVOPw','join','null','set','values','rightValues','personalization_services','name','timezone','customerGroupBehaviors','Display\x20Name','defaultTimeFilterEnabled','get','schema','master:','1126527hzHZwY','attributes:','forEach','source','counter','customer_group:','description','personalization_services:','string','03:00','replace','parent_key','includes','realtime','schedule','scheduleOption','trino_pool','has','database',':00','child_key','column_name','allColumns','imported_batch','scheduleType','none','filters','parentDatabaseName','hive_only','master','10476909nxitWf','prestoPoolName','daily',']:\x20Missing\x20required\x20field\x20\x27name\x27',':00:00','customerGroup','2wmoLUI','length','all_columns','parentTableName','test','stringify','events_table','events','UTC','columns','id_stitching','user_id','Parent\x20segment\x20description','engine','446152JgVNZD','label','list','behaviors','705WEzFdu','\x27.\x20Must\x20be\x20one\x20of:\x20','customer_id','push','columnName','parse','behaviors:','parentColumn','210nbCQFd','Example\x20Events','realtime:','type','isRealtime','time','table','default_time_filter','primary_key','Example\x20Attributes','YAML\x20config\x20missing\x20required\x20field:\x20master.database','attributes','isArray','YAML\x20config\x20missing\x20required\x20field:\x20master.table'];a166_0x1095=function(){return _0x5320a2;};return a166_0x1095();}function validatePersonalizationServices(_0x564ea4){const _0x45844a=a166_0x5de8;if(!Array[_0x45844a(0x99)](_0x564ea4))throw new Error('personalization_services\x20must\x20be\x20an\x20array');_0x564ea4[_0x45844a(0xbd)]((_0x3e4091,_0x1ad0fc)=>{const _0x3c68de=_0x45844a;if(!_0x3e4091[_0x3c68de(0xb3)])throw new Error('personalization_services['+_0x1ad0fc+']:\x20Missing\x20required\x20field\x20\x27name\x27');});}export function generateTemplate(_0x261f5b,_0x4dd03b,_0x4d218c){const _0x1be456=a166_0x5de8,_0x5e49f7={'name':_0x261f5b,'description':_0x1be456(0x7f),'master':{'database':_0x4dd03b,'table':_0x4d218c},'schedule':{'type':_0x1be456(0xdb),'time':_0x1be456(0xc4),'timezone':_0x1be456(0xe7)},'attributes':[{'name':_0x1be456(0x96),'source':{'database':_0x4dd03b,'table':_0x1be456(0xa9)},'join':{'parent_key':'id','child_key':_0x1be456(0x87)},'columns':[{'column':_0x1be456(0xd0),'label':_0x1be456(0xb6),'type':_0x1be456(0xc3)}]}],'behaviors':[{'name':_0x1be456(0x8e),'source':{'database':_0x4dd03b,'table':_0x1be456(0xe5)},'join':{'parent_key':_0x1be456(0x7e),'child_key':'customer_id'},'all_columns':!![]}]};return serializeDef(_0x5e49f7);}
1
+ function a166_0x4599(_0x3cb11a,_0x16e8e5){_0x3cb11a=_0x3cb11a-0x19e;const _0x3bb1ad=a166_0x3bb1();let _0x4599a3=_0x3bb1ad[_0x3cb11a];return _0x4599a3;}(function(_0x101419,_0x1f5aef){const _0x37e913=a166_0x4599,_0x186992=_0x101419();while(!![]){try{const _0x113c4a=parseInt(_0x37e913(0x1f5))/0x1+parseInt(_0x37e913(0x1ba))/0x2*(parseInt(_0x37e913(0x1a5))/0x3)+parseInt(_0x37e913(0x1a7))/0x4+parseInt(_0x37e913(0x19e))/0x5*(-parseInt(_0x37e913(0x1a9))/0x6)+-parseInt(_0x37e913(0x1fb))/0x7+-parseInt(_0x37e913(0x1d3))/0x8+-parseInt(_0x37e913(0x1c4))/0x9;if(_0x113c4a===_0x1f5aef)break;else _0x186992['push'](_0x186992['shift']());}catch(_0x190460){_0x186992['push'](_0x186992['shift']());}}}(a166_0x3bb1,0x71a60));import*as a166_0x314936 from'yaml';function formatScheduleTime(_0x2e0ede){const _0x14ac87=a166_0x4599;if(typeof _0x2e0ede===_0x14ac87(0x203)){const _0x56783c=Math[_0x14ac87(0x1b3)](_0x2e0ede);return String(_0x56783c)[_0x14ac87(0x1f8)](0x2,'0')+_0x14ac87(0x201);}if(typeof _0x2e0ede==='string'){if(/^\d{2}:\d{2}:\d{2}$/[_0x14ac87(0x1d0)](_0x2e0ede))return _0x2e0ede;if(/^\d{1,2}:\d{2}$/[_0x14ac87(0x1d0)](_0x2e0ede)){const [_0x49d988,_0xc5114d]=_0x2e0ede['split'](':');return _0x49d988[_0x14ac87(0x1f8)](0x2,'0')+':'+_0xc5114d+_0x14ac87(0x1f7);}const _0x4e9013=parseInt(_0x2e0ede,0xa);if(!isNaN(_0x4e9013)&&_0x2e0ede[_0x14ac87(0x1ae)](/^\d+$/))return String(_0x4e9013)['padStart'](0x2,'0')+_0x14ac87(0x201);return _0x2e0ede;}return String(_0x2e0ede);}export function apiToDef(_0x37d4e2){const _0x517edf=a166_0x4599,_0x778504={'database':_0x37d4e2[_0x517edf(0x1d9)]?.[_0x517edf(0x208)]||'','table':_0x37d4e2[_0x517edf(0x1d9)]?.[_0x517edf(0x1dc)]||''};_0x37d4e2[_0x517edf(0x1db)]&&_0x37d4e2['audienceFilters'][_0x517edf(0x1af)]>0x0&&(_0x778504[_0x517edf(0x1be)]=_0x37d4e2['audienceFilters'][_0x517edf(0x200)](_0x554505=>({'column':_0x554505[_0x517edf(0x1ff)],'values':_0x554505[_0x517edf(0x1c9)]})));let _0x411f09;_0x37d4e2[_0x517edf(0x1df)]&&_0x37d4e2[_0x517edf(0x1df)]!=='none'&&(_0x411f09={'type':_0x37d4e2[_0x517edf(0x1df)]},_0x37d4e2['scheduleOption']&&(_0x411f09[_0x517edf(0x19f)]=formatScheduleTime(_0x37d4e2[_0x517edf(0x1f4)])),_0x37d4e2[_0x517edf(0x1cc)]&&(_0x411f09[_0x517edf(0x1cc)]=_0x37d4e2['timezone']));let _0x59361a;(_0x37d4e2['workflowHiveOnly']||_0x37d4e2['hivePoolName']||_0x37d4e2[_0x517edf(0x1a0)])&&(_0x59361a={},_0x37d4e2[_0x517edf(0x207)]&&(_0x59361a['hive_only']=_0x37d4e2[_0x517edf(0x207)]),_0x37d4e2['hivePoolName']&&(_0x59361a[_0x517edf(0x1f2)]=_0x37d4e2[_0x517edf(0x1f3)]),_0x37d4e2[_0x517edf(0x1a0)]&&(_0x59361a['trino_pool']=_0x37d4e2[_0x517edf(0x1a0)]));const _0x578851=_0x37d4e2['attributes']&&_0x37d4e2[_0x517edf(0x1cf)]['length']>0x0?groupAttributesBySource(_0x37d4e2[_0x517edf(0x1cf)]):undefined,_0x4db25c=_0x37d4e2[_0x517edf(0x1f1)]&&_0x37d4e2['behaviors'][_0x517edf(0x1af)]>0x0?_0x37d4e2['behaviors'][_0x517edf(0x200)](convertApiBehaviorToYaml):undefined;let _0x224440;_0x37d4e2[_0x517edf(0x1ec)]&&(_0x224440={'name':_0x37d4e2[_0x517edf(0x1ec)][_0x517edf(0x1a8)],'source':{'database':_0x37d4e2[_0x517edf(0x1ec)][_0x517edf(0x208)],'table':_0x37d4e2[_0x517edf(0x1ec)][_0x517edf(0x1dc)]},'join':{'parent_key':_0x37d4e2[_0x517edf(0x1ec)]['foreignKey'],'child_key':_0x37d4e2[_0x517edf(0x1ec)][_0x517edf(0x1cd)]}},_0x37d4e2[_0x517edf(0x1ec)][_0x517edf(0x1e9)]&&_0x37d4e2[_0x517edf(0x1ec)]['customerGroupAttributes'][_0x517edf(0x1af)]>0x0&&(_0x224440['attributes']=groupAttributesBySource(_0x37d4e2[_0x517edf(0x1ec)][_0x517edf(0x1e9)])),_0x37d4e2[_0x517edf(0x1ec)][_0x517edf(0x1ad)]&&_0x37d4e2['customerGroup'][_0x517edf(0x1ad)][_0x517edf(0x1af)]>0x0&&(_0x224440[_0x517edf(0x1f1)]=_0x37d4e2[_0x517edf(0x1ec)][_0x517edf(0x1ad)][_0x517edf(0x200)](convertApiBehaviorToYaml)));const _0x3e4ba8={'name':_0x37d4e2[_0x517edf(0x1a8)],..._0x37d4e2[_0x517edf(0x1bb)]&&{'description':_0x37d4e2[_0x517edf(0x1bb)]},'master':_0x778504,..._0x411f09&&{'schedule':_0x411f09},..._0x59361a&&{'engine':_0x59361a},..._0x578851&&{'attributes':_0x578851},..._0x4db25c&&{'behaviors':_0x4db25c},..._0x224440&&{'customer_group':_0x224440}};return _0x3e4ba8;}function groupAttributesBySource(_0x18626c){const _0x39c25c=a166_0x4599,_0x168b72=new Map();for(const _0x9fad43 of _0x18626c){const _0x5c2774=_0x9fad43['parentDatabaseName']+'.'+_0x9fad43[_0x39c25c(0x1dc)]+'.'+_0x9fad43[_0x39c25c(0x1cd)]+'.'+_0x9fad43[_0x39c25c(0x1fa)];!_0x168b72['has'](_0x5c2774)&&_0x168b72[_0x39c25c(0x1e1)](_0x5c2774,[]),_0x168b72[_0x39c25c(0x1c3)](_0x5c2774)[_0x39c25c(0x204)](_0x9fad43);}const _0x553e6f=[];for(const [,_0x4819d2]of _0x168b72){const _0xb17acb=_0x4819d2[0x0],_0x23faa7=_0xb17acb[_0x39c25c(0x1da)]||_0xb17acb[_0x39c25c(0x1dc)];_0x553e6f[_0x39c25c(0x204)]({'name':_0x23faa7,'source':{'database':_0xb17acb[_0x39c25c(0x208)],'table':_0xb17acb[_0x39c25c(0x1dc)]},'join':{'parent_key':_0xb17acb[_0x39c25c(0x1fa)],'child_key':_0xb17acb[_0x39c25c(0x1cd)]},'columns':_0x4819d2['map'](_0xc92b39=>{const _0x29645d=_0x39c25c,_0x980367={'column':_0xc92b39['parentColumn'],'type':_0xc92b39[_0x29645d(0x1b2)]};return _0xc92b39['name']!==_0xc92b39[_0x29645d(0x1c1)]&&(_0x980367[_0x29645d(0x1fc)]=_0xc92b39['name']),_0x980367;})});}return _0x553e6f;}function convertApiBehaviorToYaml(_0x3be3b3){const _0x18168d=a166_0x4599,_0x392fd0={'name':_0x3be3b3[_0x18168d(0x1a8)],'source':{'database':_0x3be3b3[_0x18168d(0x208)],'table':_0x3be3b3['parentTableName']},'join':{'parent_key':_0x3be3b3['foreignKey'],'child_key':_0x3be3b3[_0x18168d(0x1cd)]}};if(_0x3be3b3[_0x18168d(0x1d8)])_0x392fd0[_0x18168d(0x202)]=!![];else _0x3be3b3[_0x18168d(0x1cb)]&&_0x3be3b3[_0x18168d(0x1cb)][_0x18168d(0x1af)]>0x0&&(_0x392fd0[_0x18168d(0x1f0)]=_0x3be3b3[_0x18168d(0x1cb)][_0x18168d(0x200)](_0x5b0b6c=>{const _0x153872=_0x18168d,_0x2501d0={'column':_0x5b0b6c['parentColumn'],'type':_0x5b0b6c['type']};return _0x5b0b6c[_0x153872(0x1a8)]!==_0x5b0b6c[_0x153872(0x1c1)]&&(_0x2501d0[_0x153872(0x1fc)]=_0x5b0b6c['name']),_0x2501d0;}));return _0x3be3b3[_0x18168d(0x1b6)]&&(_0x392fd0['default_time_filter']=_0x3be3b3['defaultTimeFilterEnabled']),_0x3be3b3[_0x18168d(0x1ef)]&&(_0x392fd0[_0x18168d(0x1c6)]=_0x3be3b3['isRealtime']),_0x392fd0;}export function defToApi(_0xf46354){const _0x157d84=a166_0x4599,_0x414158={'name':_0xf46354[_0x157d84(0x1a8)],'master':{'parentDatabaseName':_0xf46354[_0x157d84(0x1d9)][_0x157d84(0x1c0)],'parentTableName':_0xf46354['master'][_0x157d84(0x1e5)]}};_0xf46354[_0x157d84(0x1bb)]&&(_0x414158[_0x157d84(0x1bb)]=_0xf46354[_0x157d84(0x1bb)]);_0xf46354['master'][_0x157d84(0x1be)]&&_0xf46354[_0x157d84(0x1d9)][_0x157d84(0x1be)][_0x157d84(0x1af)]>0x0&&(_0x414158['audienceFilters']=_0xf46354['master']['filters'][_0x157d84(0x200)](_0x305b5d=>({'columnName':_0x305b5d['column'],'rightValues':_0x305b5d[_0x157d84(0x205)]})));_0xf46354[_0x157d84(0x1bf)]&&(_0x414158[_0x157d84(0x1df)]=_0xf46354[_0x157d84(0x1bf)][_0x157d84(0x1b2)],_0xf46354['schedule'][_0x157d84(0x19f)]&&(_0x414158['scheduleOption']=_0xf46354[_0x157d84(0x1bf)][_0x157d84(0x19f)]),_0xf46354['schedule'][_0x157d84(0x1cc)]&&(_0x414158['timezone']=_0xf46354[_0x157d84(0x1bf)][_0x157d84(0x1cc)]));_0xf46354['engine']&&(_0xf46354[_0x157d84(0x1e6)][_0x157d84(0x1b1)]!==undefined&&(_0x414158[_0x157d84(0x207)]=_0xf46354[_0x157d84(0x1e6)][_0x157d84(0x1b1)]),_0xf46354[_0x157d84(0x1e6)][_0x157d84(0x1f2)]!==undefined&&(_0x414158[_0x157d84(0x1f3)]=_0xf46354['engine'][_0x157d84(0x1f2)]),_0xf46354[_0x157d84(0x1e6)][_0x157d84(0x1de)]!==undefined&&(_0x414158[_0x157d84(0x1a0)]=_0xf46354[_0x157d84(0x1e6)][_0x157d84(0x1de)]));_0xf46354[_0x157d84(0x1cf)]&&_0xf46354[_0x157d84(0x1cf)][_0x157d84(0x1af)]>0x0&&(_0x414158[_0x157d84(0x1cf)]=flattenAttributeGroups(_0xf46354['attributes']));_0xf46354['behaviors']&&_0xf46354[_0x157d84(0x1f1)][_0x157d84(0x1af)]>0x0&&(_0x414158[_0x157d84(0x1f1)]=_0xf46354[_0x157d84(0x1f1)]['map'](convertDefBehaviorToApi));if(_0xf46354['customer_group']){const _0x54aea0=_0xf46354['customer_group'];_0x414158[_0x157d84(0x1ec)]={'name':_0x54aea0[_0x157d84(0x1a8)],'parentDatabaseName':_0x54aea0['source'][_0x157d84(0x1c0)],'parentTableName':_0x54aea0[_0x157d84(0x1ed)]['table'],'parentKey':_0x54aea0[_0x157d84(0x1e8)][_0x157d84(0x1b9)],'foreignKey':_0x54aea0[_0x157d84(0x1e8)][_0x157d84(0x1bc)]},_0x54aea0[_0x157d84(0x1cf)]&&_0x54aea0[_0x157d84(0x1cf)]['length']>0x0&&(_0x414158[_0x157d84(0x1ec)][_0x157d84(0x1e9)]=flattenAttributeGroups(_0x54aea0[_0x157d84(0x1cf)])[_0x157d84(0x200)](_0x4331cb=>({'name':_0x4331cb[_0x157d84(0x1a8)],'type':_0x4331cb[_0x157d84(0x1b2)],'parentDatabaseName':_0x4331cb[_0x157d84(0x208)],'parentTableName':_0x4331cb[_0x157d84(0x1dc)],'parentColumn':_0x4331cb[_0x157d84(0x1c1)],'parentKey':_0x4331cb['parentKey'],'foreignKey':_0x4331cb['foreignKey']}))),_0x54aea0['behaviors']&&_0x54aea0[_0x157d84(0x1f1)][_0x157d84(0x1af)]>0x0&&(_0x414158[_0x157d84(0x1ec)][_0x157d84(0x1ad)]=_0x54aea0[_0x157d84(0x1f1)][_0x157d84(0x200)](_0x2cfea4=>({'name':_0x2cfea4[_0x157d84(0x1a8)],'parentDatabaseName':_0x2cfea4[_0x157d84(0x1ed)][_0x157d84(0x1c0)],'parentTableName':_0x2cfea4[_0x157d84(0x1ed)][_0x157d84(0x1e5)],'parentKey':_0x2cfea4[_0x157d84(0x1e8)][_0x157d84(0x1b9)],'foreignKey':_0x2cfea4['join']['parent_key'],'allColumns':_0x2cfea4['all_columns'],'schema':_0x2cfea4[_0x157d84(0x1f0)]?.[_0x157d84(0x200)](_0x3b6112=>({'name':_0x3b6112[_0x157d84(0x1fc)]||_0x3b6112['column'],'type':_0x3b6112[_0x157d84(0x1b2)],'parentColumn':_0x3b6112[_0x157d84(0x1dd)]}))})));}return _0x414158;}function a166_0x3bb1(){const _0x2d29c5=['697956YSzbgm','label','default_time_filter','schedule:','columnName','map',':00:00','all_columns','number','push','values','master:','workflowHiveOnly','parentDatabaseName','primary_key','5jbJsLM','time','prestoPoolName','forEach','YAML\x20config\x20missing\x20required\x20field:\x20master.table','stringify','YAML\x20config\x20missing\x20required\x20field:\x20name','1470429FEyFAs','id_stitching','1956432YlxlJp','name','1037964efABBB','includes','Parent\x20segment\x20description','single','customerGroupBehaviors','match','length','isArray','hive_only','type','floor','\x27.\x20Must\x20be\x20one\x20of:\x20','column_name','defaultTimeFilterEnabled','imported_batch','customer_id','child_key','2mgRWfj','description','parent_key','counter','filters','schedule','database','parentColumn','replace','get','9323073ugzBrY','events_table','realtime','03:00','YAML\x20config\x20missing\x20required\x20field:\x20master','rightValues','Example\x20Events','schema','timezone','parentKey','realtime.events[','attributes','test','attribute_table','personalization_services','982016anUYCi','behaviors:','):\x20Invalid\x20type\x20\x27','parse','list','allColumns','master','groupingName','audienceFilters','parentTableName','column','trino_pool','scheduleType','realtime.attributes[','set','engine:','Display\x20Name','personalization_services:','table','engine','events','join','customerGroupAttributes','attributes:','Example\x20Attributes','customerGroup','source',']:\x20Missing\x20required\x20field\x20\x27name\x27','isRealtime','columns','behaviors','hive_pool','hivePoolName','scheduleOption','917604VqRmAm','daily',':00','padStart','realtime.id_stitching:\x20Missing\x20required\x20field\x20\x27primary_key\x27','foreignKey'];a166_0x3bb1=function(){return _0x2d29c5;};return a166_0x3bb1();}function flattenAttributeGroups(_0x2d5f75){const _0x83e410=a166_0x4599,_0x4a39c7=[];for(const _0xc2dd42 of _0x2d5f75){for(const _0xb02552 of _0xc2dd42[_0x83e410(0x1f0)]){_0x4a39c7[_0x83e410(0x204)]({'name':_0xb02552[_0x83e410(0x1fc)]||_0xb02552[_0x83e410(0x1dd)],'type':_0xb02552['type'],'parentDatabaseName':_0xc2dd42['source'][_0x83e410(0x1c0)],'parentTableName':_0xc2dd42['source']['table'],'parentColumn':_0xb02552[_0x83e410(0x1dd)],'parentKey':_0xc2dd42[_0x83e410(0x1e8)]['child_key'],'foreignKey':_0xc2dd42[_0x83e410(0x1e8)][_0x83e410(0x1bc)],'groupingName':_0xc2dd42['name']});}}return _0x4a39c7;}function convertDefBehaviorToApi(_0x2fdcf){const _0x2dd156=a166_0x4599,_0x22de82={'name':_0x2fdcf[_0x2dd156(0x1a8)],'parentDatabaseName':_0x2fdcf[_0x2dd156(0x1ed)][_0x2dd156(0x1c0)],'parentTableName':_0x2fdcf['source'][_0x2dd156(0x1e5)],'parentKey':_0x2fdcf[_0x2dd156(0x1e8)][_0x2dd156(0x1b9)],'foreignKey':_0x2fdcf['join']['parent_key']};if(_0x2fdcf['all_columns'])_0x22de82[_0x2dd156(0x1d8)]=!![];else _0x2fdcf[_0x2dd156(0x1f0)]&&_0x2fdcf[_0x2dd156(0x1f0)][_0x2dd156(0x1af)]>0x0&&(_0x22de82['schema']=_0x2fdcf['columns']['map'](_0x1ae4e1=>({'name':_0x1ae4e1[_0x2dd156(0x1fc)]||_0x1ae4e1[_0x2dd156(0x1dd)],'type':_0x1ae4e1[_0x2dd156(0x1b2)],'parentColumn':_0x1ae4e1['column']})));return _0x2fdcf[_0x2dd156(0x1fd)]!==undefined&&(_0x22de82[_0x2dd156(0x1b6)]=_0x2fdcf[_0x2dd156(0x1fd)]),_0x2fdcf[_0x2dd156(0x1c6)]!==undefined&&(_0x22de82['isRealtime']=_0x2fdcf[_0x2dd156(0x1c6)]),_0x22de82;}export function serializeDef(_0x4f28e2){const _0x4c310a=a166_0x4599,_0x3bf7d2=JSON[_0x4c310a(0x1d6)](JSON['stringify'](_0x4f28e2)),_0x42e776=a166_0x314936[_0x4c310a(0x1a3)](_0x3bf7d2,{'indent':0x2,'lineWidth':0x0,'nullStr':'null'}),_0x56f722=[_0x4c310a(0x206),_0x4c310a(0x1fe),_0x4c310a(0x1e2),_0x4c310a(0x1ea),_0x4c310a(0x1d4),'customer_group:','realtime:',_0x4c310a(0x1e4)];let _0x487351=_0x42e776;for(const _0x3ac4ed of _0x56f722){_0x487351=_0x487351[_0x4c310a(0x1c2)](new RegExp('^('+_0x3ac4ed+')','m'),(_0x3c6fbd,_0x2aa885,_0x129047)=>{if(_0x129047===0x0||_0x487351[_0x129047-0x1]==='\x0a'&&_0x487351[_0x129047-0x2]==='\x0a')return _0x2aa885;return'\x0a'+_0x2aa885;});}return _0x487351;}export function parseDef(_0x239da2){const _0x35f6d3=a166_0x4599,_0x4a4d6e=a166_0x314936['parse'](_0x239da2);if(!_0x4a4d6e[_0x35f6d3(0x1a8)])throw new Error(_0x35f6d3(0x1a4));if(!_0x4a4d6e[_0x35f6d3(0x1d9)])throw new Error(_0x35f6d3(0x1c8));if(!_0x4a4d6e[_0x35f6d3(0x1d9)][_0x35f6d3(0x1c0)])throw new Error('YAML\x20config\x20missing\x20required\x20field:\x20master.database');if(!_0x4a4d6e[_0x35f6d3(0x1d9)][_0x35f6d3(0x1e5)])throw new Error(_0x35f6d3(0x1a2));return _0x4a4d6e[_0x35f6d3(0x1c6)]&&validateRealtimeSection(_0x4a4d6e[_0x35f6d3(0x1c6)]),_0x4a4d6e[_0x35f6d3(0x1d2)]&&validatePersonalizationServices(_0x4a4d6e[_0x35f6d3(0x1d2)]),_0x4a4d6e;}function validateRealtimeSection(_0xfc6de6){const _0x199b37=a166_0x4599,_0x29e0a7=[_0x199b37(0x1ac),_0x199b37(0x1bd),_0x199b37(0x1e1),'ordered_set',_0x199b37(0x1d7),_0x199b37(0x1b7)];_0xfc6de6[_0x199b37(0x1e7)]&&Array[_0x199b37(0x1b0)](_0xfc6de6[_0x199b37(0x1e7)])&&_0xfc6de6[_0x199b37(0x1e7)][_0x199b37(0x1a1)]((_0x5b0c62,_0x4d9ade)=>{const _0x33c614=_0x199b37;if(!_0x5b0c62[_0x33c614(0x1a8)])throw new Error(_0x33c614(0x1ce)+_0x4d9ade+_0x33c614(0x1ee));});_0xfc6de6['attributes']&&Array[_0x199b37(0x1b0)](_0xfc6de6[_0x199b37(0x1cf)])&&_0xfc6de6[_0x199b37(0x1cf)][_0x199b37(0x1a1)]((_0x3b3f92,_0x3bf4cb)=>{const _0x5ec348=_0x199b37;if(!_0x3b3f92[_0x5ec348(0x1a8)])throw new Error(_0x5ec348(0x1e0)+_0x3bf4cb+_0x5ec348(0x1ee));if(_0x3b3f92[_0x5ec348(0x1b2)]&&!_0x29e0a7[_0x5ec348(0x1aa)](_0x3b3f92[_0x5ec348(0x1b2)]))throw new Error('realtime.attributes['+_0x3bf4cb+']\x20('+_0x3b3f92[_0x5ec348(0x1a8)]+_0x5ec348(0x1d5)+_0x3b3f92[_0x5ec348(0x1b2)]+_0x5ec348(0x1b4)+_0x29e0a7[_0x5ec348(0x1e8)](',\x20'));});if(_0xfc6de6['id_stitching']){if(!_0xfc6de6[_0x199b37(0x1a6)][_0x199b37(0x209)])throw new Error(_0x199b37(0x1f9));}}function validatePersonalizationServices(_0x219936){const _0x43a54f=a166_0x4599;if(!Array[_0x43a54f(0x1b0)](_0x219936))throw new Error('personalization_services\x20must\x20be\x20an\x20array');_0x219936[_0x43a54f(0x1a1)]((_0x58c8ea,_0x1c6d0b)=>{if(!_0x58c8ea['name'])throw new Error('personalization_services['+_0x1c6d0b+']:\x20Missing\x20required\x20field\x20\x27name\x27');});}export function generateTemplate(_0x16cf7a,_0x1d77c3,_0x487681){const _0x2c77a8=a166_0x4599,_0x22308e={'name':_0x16cf7a,'description':_0x2c77a8(0x1ab),'master':{'database':_0x1d77c3,'table':_0x487681},'schedule':{'type':_0x2c77a8(0x1f6),'time':_0x2c77a8(0x1c7),'timezone':'UTC'},'attributes':[{'name':_0x2c77a8(0x1eb),'source':{'database':_0x1d77c3,'table':_0x2c77a8(0x1d1)},'join':{'parent_key':'id','child_key':_0x2c77a8(0x1b8)},'columns':[{'column':_0x2c77a8(0x1b5),'label':_0x2c77a8(0x1e3),'type':'string'}]}],'behaviors':[{'name':_0x2c77a8(0x1ca),'source':{'database':_0x1d77c3,'table':_0x2c77a8(0x1c5)},'join':{'parent_key':'user_id','child_key':'customer_id'},'all_columns':!![]}]};return serializeDef(_0x22308e);}
@@ -1 +1 @@
1
- (function(_0x25e556,_0x3317a1){const _0x126449=a167_0x391c,_0x2bbc3a=_0x25e556();while(!![]){try{const _0x24a103=-parseInt(_0x126449(0x1ae))/0x1+-parseInt(_0x126449(0x1de))/0x2+-parseInt(_0x126449(0x1c2))/0x3+-parseInt(_0x126449(0x1aa))/0x4+-parseInt(_0x126449(0x1a7))/0x5+-parseInt(_0x126449(0x1b7))/0x6+-parseInt(_0x126449(0x1dd))/0x7*(-parseInt(_0x126449(0x1e1))/0x8);if(_0x24a103===_0x3317a1)break;else _0x2bbc3a['push'](_0x2bbc3a['shift']());}catch(_0x52138d){_0x2bbc3a['push'](_0x2bbc3a['shift']());}}}(a167_0x4188,0x62a84));import a167_0x411541 from'path';import{existsSync,readFileSync}from'fs';import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';import{sanitizeFileName}from'../../utils/string-utils.js';import{batchAsync}from'../../utils/async.js';import{buildFolderIdToPathMap}from'./resolution-context.js';import{segmentWithActivationsToYaml,segmentToYamlString,segmentResponseToDef,journeyActivationStepToYaml}from'./child-segment-yaml.js';import{journeyResponseToDef,toYamlString as a167_0x51f37c,normalizeJourneyDef,parseYamlString as a167_0x4f6443}from'./journey-yaml.js';import{SEGMENT_KIND_JOURNEY,generateJourneyLocalName,sanitizeYamlKey,buildMergedJourneyDef,buildLocalRuleToNameMappingFromJourney,createJumpTargetCache,resolveJumpTarget}from'./journey-utils.js';import{createTdxConfigContent}from'./tdx-config.js';function prepareFile(_0x691ee0,_0x577a6d,_0x59d7ab){const _0x453689=a167_0x411541['relative'](_0x59d7ab,_0x691ee0);if(existsSync(_0x691ee0)){const _0x14de72=readFileSync(_0x691ee0,'utf-8'),_0x5f1128=generateDiff(_0x14de72,_0x577a6d),_0x2cbb1a=hasChanges(_0x5f1128);return{'relativePath':_0x453689,'absolutePath':_0x691ee0,'content':_0x577a6d,'isNew':![],'hasChanges':_0x2cbb1a,'diff':_0x2cbb1a?formatDiffWithColors(_0x5f1128):undefined};}return{'relativePath':_0x453689,'absolutePath':_0x691ee0,'content':_0x577a6d,'isNew':!![],'hasChanges':![]};}function a167_0x391c(_0x132fc8,_0x14ad00){_0x132fc8=_0x132fc8-0x1a2;const _0x41887d=a167_0x4188();let _0x391cb5=_0x41887d[_0x132fc8];return _0x391cb5;}function getUniqueFileName(_0x2a7975,_0x271728,_0x19d10e){const _0x2d9edf=a167_0x391c,_0x3e5c31=_0x2a7975+':'+_0x271728,_0x4816c5=_0x19d10e[_0x2d9edf(0x1ca)](_0x3e5c31)||0x0;_0x19d10e['set'](_0x3e5c31,_0x4816c5+0x1);if(_0x4816c5===0x0)return _0x271728;return _0x271728+'_'+(_0x4816c5+0x1);}export async function pullSegments(_0x95408b,_0x4f7bfc,_0x4ec29c={}){const _0x6c05b6=a167_0x391c,{targetDir:_0x50a1c0,progress:_0x3f5b2c}=_0x4ec29c;_0x3f5b2c?.[_0x6c05b6(0x1df)](_0x6c05b6(0x1c3));const _0xf7b0d3=await _0x95408b[_0x6c05b6(0x1a6)]['resolveParentId'](_0x4f7bfc);_0x3f5b2c?.[_0x6c05b6(0x1df)](_0x6c05b6(0x1a2));const _0xbc8d11=await _0x95408b[_0x6c05b6(0x1a6)]['getParent'](_0xf7b0d3),_0x281d68=_0xbc8d11[_0x6c05b6(0x1ce)]['name'];_0x3f5b2c?.[_0x6c05b6(0x1df)](_0x6c05b6(0x1cf));const [_0x317f1e,_0x526601,_0x5731f4]=await Promise[_0x6c05b6(0x1bc)]([_0x95408b['segment'][_0x6c05b6(0x1c8)](_0xf7b0d3),_0x95408b[_0x6c05b6(0x1a6)][_0x6c05b6(0x1b2)](_0xf7b0d3),_0x95408b[_0x6c05b6(0x1bd)]['listJourneysWithDetailsFromParentSegment'](_0xf7b0d3,{'includeAllVersions':!![]})]),{journeys:_0x3f544d,activationStepsById:_0xcdb294}=_0x5731f4,_0x1c0006=new Map();for(const _0x1ec897 of _0x3f544d){_0x1c0006[_0x6c05b6(0x1e5)](_0x1ec897['id'],_0x1ec897);}const _0x55d422=_0x3f544d[_0x6c05b6(0x1c9)](_0x2734d7=>({'id':_0x2734d7['id'],'name':_0x2734d7[_0x6c05b6(0x1ce)][_0x6c05b6(0x1c1)],'journeyBundleName':_0x2734d7[_0x6c05b6(0x1ce)][_0x6c05b6(0x1da)]||'','journeyBundleId':_0x2734d7['attributes'][_0x6c05b6(0x1b9)]||'','versionNumber':_0x2734d7[_0x6c05b6(0x1ce)][_0x6c05b6(0x1b6)],'description':_0x2734d7[_0x6c05b6(0x1ce)][_0x6c05b6(0x1d7)],'state':_0x2734d7[_0x6c05b6(0x1ce)][_0x6c05b6(0x1b3)],'paused':_0x2734d7['attributes'][_0x6c05b6(0x1a3)],'audienceId':_0x2734d7[_0x6c05b6(0x1ce)]['audienceId'],'folderId':_0x2734d7[_0x6c05b6(0x1bb)]?.[_0x6c05b6(0x1c7)]?.['data']?.['id'],'createdAt':_0x2734d7[_0x6c05b6(0x1ce)][_0x6c05b6(0x1c4)],'updatedAt':_0x2734d7[_0x6c05b6(0x1ce)][_0x6c05b6(0x1a8)]})),_0x32eae8=buildFolderIdToPathMap(_0x526601),_0x48957c=_0x50a1c0||'segments/'+sanitizeFileName(_0x281d68);_0x3f5b2c?.[_0x6c05b6(0x1df)](_0x6c05b6(0x1ac));const _0xbc235d=new Map();await batchAsync(_0x317f1e,async _0x40cc1b=>{const _0x35f25f=_0x6c05b6,_0x449f4d=await _0x95408b[_0x35f25f(0x1a6)]['listActivations'](_0xf7b0d3,_0x40cc1b['id']);_0xbc235d[_0x35f25f(0x1e5)](_0x40cc1b['id'],_0x449f4d);}),_0x3f5b2c?.['update'](_0x6c05b6(0x1d0));const [_0x1b9498,_0x3694de]=await Promise[_0x6c05b6(0x1bc)]([_0x95408b[_0x6c05b6(0x1db)][_0x6c05b6(0x1d6)](),_0x95408b[_0x6c05b6(0x1a5)]['buildIdToNameMap']()]),_0x509f17=[],_0x1f0e87=new Map(),_0x1f3265=a167_0x411541['join'](_0x48957c,_0x6c05b6(0x1d5)),_0x38a78d=createTdxConfigContent(_0x281d68);_0x509f17[_0x6c05b6(0x1cb)](prepareFile(_0x1f3265,_0x38a78d,_0x48957c));const _0xc7f8f1=new Map();for(const _0x3db639 of _0x317f1e){_0xc7f8f1['set'](_0x3db639['id'],_0x3db639);}let _0x45d042=_0x317f1e;if(_0x4ec29c[_0x6c05b6(0x1af)]){const _0x4eb249=_0x317f1e[_0x6c05b6(0x1c6)](_0x33bce9=>_0x33bce9[_0x6c05b6(0x1c1)]['toLowerCase']()===_0x4ec29c[_0x6c05b6(0x1af)]['toLowerCase']());_0x4eb249[_0x6c05b6(0x1b0)]>0x0&&(_0x45d042=_0x4eb249);}_0x3f5b2c?.['update'](_0x6c05b6(0x1cc));for(const _0x584f92 of _0x45d042){if(_0x584f92[_0x6c05b6(0x1e2)]===SEGMENT_KIND_JOURNEY)continue;const _0x3546db=_0x584f92[_0x6c05b6(0x1d1)]?_0x32eae8[_0x6c05b6(0x1ca)](_0x584f92[_0x6c05b6(0x1d1)])||'':'',_0x4bf186=_0xbc235d[_0x6c05b6(0x1ca)](_0x584f92['id'])||[],_0x2d6a1a=segmentWithActivationsToYaml(_0x584f92,_0x4bf186,undefined,_0x1b9498,_0x3694de),_0x4bc706=_0x3546db?a167_0x411541['join'](_0x48957c,_0x3546db):_0x48957c,_0x4e6694=sanitizeFileName(_0x584f92[_0x6c05b6(0x1c1)]),_0x231a91=getUniqueFileName(_0x4bc706,_0x4e6694,_0x1f0e87),_0x9ebbf1=a167_0x411541[_0x6c05b6(0x1cd)](_0x4bc706,_0x231a91+_0x6c05b6(0x1ba)),_0x1963e4=segmentToYamlString(_0x2d6a1a);_0x509f17[_0x6c05b6(0x1cb)](prepareFile(_0x9ebbf1,_0x1963e4,_0x48957c));}const _0x3bec45=new Map();for(const _0x5d66d0 of _0x55d422){const _0x1356b2=_0x5d66d0['journeyBundleId'];!_0x3bec45[_0x6c05b6(0x1ab)](_0x1356b2)&&_0x3bec45[_0x6c05b6(0x1e5)](_0x1356b2,[]),_0x3bec45[_0x6c05b6(0x1ca)](_0x1356b2)[_0x6c05b6(0x1cb)](_0x5d66d0);}for(const _0x229aa2 of _0x3bec45['values']()){_0x229aa2[_0x6c05b6(0x1e0)]((_0x3bf1f9,_0xbfc43b)=>(_0x3bf1f9[_0x6c05b6(0x1b6)]||0x0)-(_0xbfc43b['versionNumber']||0x0));}if(_0x4ec29c['targetResourceName']){const _0x21d397=new Map();for(const [_0x2ecd7c,_0x550a95]of _0x3bec45){const _0x27dfee=_0x550a95[0x0][_0x6c05b6(0x1da)];if(_0x27dfee[_0x6c05b6(0x1ad)]()===_0x4ec29c[_0x6c05b6(0x1af)][_0x6c05b6(0x1ad)]()){_0x21d397[_0x6c05b6(0x1e5)](_0x2ecd7c,_0x550a95);break;}}_0x3bec45[_0x6c05b6(0x1b4)]();for(const [_0x38efa6,_0x1419ec]of _0x21d397){_0x3bec45[_0x6c05b6(0x1e5)](_0x38efa6,_0x1419ec);}}if(_0x3bec45[_0x6c05b6(0x1dc)]>0x0){_0x3f5b2c?.['update'](_0x6c05b6(0x1d3));const _0x55de75=Array[_0x6c05b6(0x1d4)](_0x3bec45[_0x6c05b6(0x1bf)]()),_0x20177a=0x5,{createYamlContext:_0x2d8d0c}=createYamlContextForBundle(_0x95408b,_0xc7f8f1,_0x1b9498,_0x3694de,_0xcdb294,_0x1c0006);for(let _0x176f3a=0x0;_0x176f3a<_0x55de75[_0x6c05b6(0x1b0)];_0x176f3a+=_0x20177a){const _0xb24a6d=_0x55de75['slice'](_0x176f3a,_0x176f3a+_0x20177a),_0x142298=await Promise['all'](_0xb24a6d[_0x6c05b6(0x1c9)](async _0x532ee9=>{const _0x58b131=_0x6c05b6,_0x1134f7=_0x532ee9[0x0],_0x3dbd91=_0x1134f7[_0x58b131(0x1da)];_0x3f5b2c?.[_0x58b131(0x1df)]('Processing\x20journey:\x20'+_0x3dbd91);const _0x15bb76=_0x1134f7['folderId']?_0x32eae8[_0x58b131(0x1ca)](_0x1134f7[_0x58b131(0x1c0)])||'':'',_0x41e5ef=_0x15bb76?a167_0x411541[_0x58b131(0x1cd)](_0x48957c,_0x15bb76):_0x48957c,_0x2d837f=sanitizeFileName(_0x3dbd91),_0x558818=a167_0x411541[_0x58b131(0x1cd)](_0x41e5ef,_0x2d837f+_0x58b131(0x1ba));let _0x324ac5;if(existsSync(_0x558818))try{const _0x4f2eaa=readFileSync(_0x558818,_0x58b131(0x1b5)),_0xa59258=a167_0x4f6443(_0x4f2eaa);_0x324ac5=buildLocalRuleToNameMappingFromJourney(_0xa59258);}catch{}const _0x2de3b7=[];for(const _0x5e2862 of _0x532ee9){const _0x496ce6=_0x1c0006[_0x58b131(0x1ca)](_0x5e2862['id']);if(!_0x496ce6){_0x3f5b2c?.['update'](_0x58b131(0x1d2)+_0x5e2862['id']+'\x20not\x20found\x20in\x20pre-fetched\x20data,\x20skipping');continue;}const _0x35e587=_0x496ce6[_0x58b131(0x1ce)]?.[_0x58b131(0x1c5)],_0xad7993=_0x2d8d0c(_0x5e2862['id'],_0x35e587),_0x53b9c3=await journeyResponseToDef(_0x496ce6,_0xad7993);_0x2de3b7[_0x58b131(0x1cb)]({'item':_0x5e2862,'yaml':_0x53b9c3});}const _0x51257e=await _0x95408b['journey'][_0x58b131(0x1d9)](_0x1134f7[_0x58b131(0x1b9)]),_0x30c87b=buildMergedJourneyDef(_0x2de3b7,_0x324ac5,_0x51257e);return{'bundleName':_0x3dbd91,'folderPath':_0x15bb76,'finalYaml':_0x30c87b};}));for(const {bundleName:_0x2ecc82,folderPath:_0x41829e,finalYaml:_0x5d656d}of _0x142298){const _0x118bb4=normalizeJourneyDef(_0x5d656d),_0x16d8f9=a167_0x51f37c(_0x118bb4),_0x2dfa82=_0x41829e?a167_0x411541[_0x6c05b6(0x1cd)](_0x48957c,_0x41829e):_0x48957c,_0x194ca3=sanitizeFileName(_0x2ecc82),_0x3a96d8=getUniqueFileName(_0x2dfa82,_0x194ca3,_0x1f0e87),_0x38fc87=a167_0x411541['join'](_0x2dfa82,_0x3a96d8+_0x6c05b6(0x1ba));_0x509f17[_0x6c05b6(0x1cb)](prepareFile(_0x38fc87,_0x16d8f9,_0x48957c));}}}const _0x2db6dd=Array['from'](_0xbc235d[_0x6c05b6(0x1bf)]())[_0x6c05b6(0x1a4)]((_0x382505,_0x49826c)=>_0x382505+_0x49826c[_0x6c05b6(0x1b0)],0x0),_0x140c3d=_0x45d042[_0x6c05b6(0x1c6)](_0x29d6bc=>_0x29d6bc['kind']!==SEGMENT_KIND_JOURNEY),_0x32edd7=_0x509f17[_0x6c05b6(0x1c6)](_0x3de680=>_0x3de680[_0x6c05b6(0x1b1)])[_0x6c05b6(0x1b0)],_0x43c95c=_0x509f17[_0x6c05b6(0x1c6)](_0x184669=>!_0x184669[_0x6c05b6(0x1b1)]&&_0x184669[_0x6c05b6(0x1e4)])[_0x6c05b6(0x1b0)],_0x14e7fe=_0x509f17['filter'](_0x3e1346=>!_0x3e1346['isNew']&&!_0x3e1346[_0x6c05b6(0x1e4)])['length'],_0x46d5bd=Array[_0x6c05b6(0x1d4)](_0x3bec45[_0x6c05b6(0x1bf)]())[_0x6c05b6(0x1a4)]((_0x176594,_0x2fec64)=>_0x176594+_0x2fec64['length'],0x0);return{'parentName':_0x281d68,'parentId':_0xf7b0d3,'targetDir':_0x48957c,'files':_0x509f17,'counts':{'segments':_0x140c3d[_0x6c05b6(0x1b0)],'journeys':_0x3bec45[_0x6c05b6(0x1dc)],'journeyVersions':_0x46d5bd,'activations':_0x2db6dd},'newFiles':_0x32edd7,'changedFiles':_0x43c95c,'unchangedFiles':_0x14e7fe};}function a167_0x4188(){const _0x2c86aa=['listSegments','map','get','push','Processing\x20segments','join','attributes','Fetching\x20segments,\x20folders,\x20and\x20journeys','Fetching\x20users\x20and\x20connections','segmentFolderId','Warning:\x20Journey\x20','Processing\x20journeys','from','tdx.json','buildIdToEmailMap','description','rule','getLatestJourneyId','journeyBundleName','user','size','3795547Hpglzt','1378676sFnSej','update','sort','40swfSaj','kind','activationParams','hasChanges','set','Fetching\x20parent\x20segment\x20info','paused','reduce','connection','segment','375960pXLAEB','updatedAt','getActivation','1373908rmwEiS','has','Fetching\x20activations','toLowerCase','519006YowqEH','targetResourceName','length','isNew','listFolders','state','clear','utf-8','versionNumber','605310MNqbCU','activation_','journeyBundleId','.yml','relationships','all','journey','getSegment','values','folderId','name','1737321yateTV','Resolving\x20parent\x20segment','createdAt','audienceId','filter','parentFolder'];a167_0x4188=function(){return _0x2c86aa;};return a167_0x4188();}function createYamlContextForBundle(_0x3f8a90,_0x56d9fd,_0x55152b,_0x127739,_0x8570e,_0x3adbc7){const _0x124d59=new Set(),_0x1ea0f7=new Map(),_0x440adb=new Map(),_0x11466f=createJumpTargetCache(),_0x37eb93=async(_0x5c421c,_0x282704)=>{const _0x2be910=a167_0x391c,_0x34ed98=_0x1ea0f7[_0x2be910(0x1ca)](_0x5c421c);if(_0x34ed98!==undefined)return _0x34ed98;if(!_0x282704)return _0x5c421c;try{let _0x396fe6=_0x56d9fd[_0x2be910(0x1ca)](_0x5c421c);!_0x396fe6&&(_0x396fe6=await _0x3f8a90[_0x2be910(0x1a6)][_0x2be910(0x1be)](_0x282704,_0x5c421c),_0x56d9fd[_0x2be910(0x1e5)](_0x5c421c,_0x396fe6));const _0x3882ac=generateJourneyLocalName(_0x396fe6[_0x2be910(0x1c1)]),_0x110b15=_0x396fe6[_0x2be910(0x1e2)]===SEGMENT_KIND_JOURNEY&&_0x3882ac!==undefined;if(_0x110b15&&_0x3882ac){let _0x29f03d=_0x3882ac,_0x315529=0x2;while(_0x124d59[_0x2be910(0x1ab)](_0x29f03d)){_0x29f03d=_0x3882ac+'_'+_0x315529,_0x315529++;}return _0x124d59['add'](_0x29f03d),_0x1ea0f7['set'](_0x5c421c,_0x29f03d),_0x29f03d;}return _0x396fe6[_0x2be910(0x1c1)];}catch{return _0x5c421c;}},_0x1bc229=(_0xbeb1fc,_0xc3ef7d)=>({'resolveSegment':async _0x2ff264=>{const _0x1ac41d=a167_0x391c,_0x30fa87=_0x1ea0f7[_0x1ac41d(0x1ca)](_0x2ff264);if(_0x30fa87!==undefined)return{'name':_0x30fa87,'isJourneyLocal':!![]};if(!_0xc3ef7d)return{'name':_0x2ff264,'isJourneyLocal':![]};try{let _0x18cb61=_0x56d9fd[_0x1ac41d(0x1ca)](_0x2ff264);!_0x18cb61&&(_0x18cb61=await _0x3f8a90['segment'][_0x1ac41d(0x1be)](_0xc3ef7d,_0x2ff264),_0x56d9fd[_0x1ac41d(0x1e5)](_0x2ff264,_0x18cb61));const _0x4fd87c=generateJourneyLocalName(_0x18cb61[_0x1ac41d(0x1c1)]),_0x555f15=_0x18cb61[_0x1ac41d(0x1e2)]===SEGMENT_KIND_JOURNEY&&_0x4fd87c!==undefined;if(_0x555f15&&!_0x18cb61['rule']&&_0xc3ef7d)try{const _0x430c59=await _0x3f8a90[_0x1ac41d(0x1a6)]['getSegment'](_0xc3ef7d,_0x2ff264);_0x56d9fd[_0x1ac41d(0x1e5)](_0x2ff264,_0x430c59),_0x18cb61=_0x430c59;}catch{}const _0x469404=await _0x37eb93(_0x2ff264,_0xc3ef7d);let _0x20af32;if(_0x555f15&&_0x18cb61[_0x1ac41d(0x1d8)]){const _0x2fe57d=await segmentResponseToDef(_0x18cb61,{'resolveSegmentName':_0x575bad=>_0x37eb93(_0x575bad,_0xc3ef7d)});_0x20af32={'description':_0x18cb61[_0x1ac41d(0x1d7)],'rule':_0x2fe57d[_0x1ac41d(0x1d8)]};}return{'name':_0x469404,'isJourneyLocal':_0x555f15,'definition':_0x20af32};}catch{return{'name':_0x2ff264,'isJourneyLocal':![]};}},'resolveActivation':async _0x267a26=>{const _0x55b59f=a167_0x391c,_0x2721a9=_0x440adb[_0x55b59f(0x1ca)](_0x267a26);if(_0x2721a9!==undefined)return{'name':_0x2721a9,'isJourneyLocal':!![]};try{let _0xaf4ff6=_0x8570e[_0x55b59f(0x1ca)](_0x267a26);!_0xaf4ff6&&(_0xaf4ff6=await _0x3f8a90['journey'][_0x55b59f(0x1a9)](_0xbeb1fc,_0x267a26));const _0x5d3cc1=_0xaf4ff6[_0x55b59f(0x1ce)][_0x55b59f(0x1e3)][_0x55b59f(0x1c1)]||_0x267a26,_0x21b45b=sanitizeYamlKey(_0x5d3cc1)||_0x55b59f(0x1b8)+_0x267a26,_0x2e7196=_0x21b45b;_0x440adb[_0x55b59f(0x1e5)](_0x267a26,_0x2e7196);const _0x5446e8=journeyActivationStepToYaml(_0xaf4ff6,_0x55152b,_0x127739);return{'name':_0x2e7196,'isJourneyLocal':!![],'definition':_0x5446e8};}catch{return{'name':_0x267a26,'isJourneyLocal':![]};}},'resolveJumpTarget':(_0x58fbb5,_0x219a23)=>resolveJumpTarget(_0x58fbb5,_0x219a23,_0x11466f,async _0x26d18a=>{const _0x4b88a6=a167_0x391c,_0x33bc17=_0x3adbc7[_0x4b88a6(0x1ca)](_0x26d18a);if(_0x33bc17)return _0x33bc17;return _0x3f8a90['journey']['getJourney'](_0x26d18a);})});return{'createYamlContext':_0x1bc229};}
1
+ (function(_0x5ae089,_0x332371){const _0x1e6e0e=a167_0x2546,_0xa43541=_0x5ae089();while(!![]){try{const _0x33b5ef=parseInt(_0x1e6e0e(0x137))/0x1+-parseInt(_0x1e6e0e(0x145))/0x2+-parseInt(_0x1e6e0e(0x14e))/0x3+parseInt(_0x1e6e0e(0x153))/0x4*(-parseInt(_0x1e6e0e(0x131))/0x5)+parseInt(_0x1e6e0e(0x119))/0x6*(parseInt(_0x1e6e0e(0x143))/0x7)+parseInt(_0x1e6e0e(0x13c))/0x8+parseInt(_0x1e6e0e(0x12b))/0x9;if(_0x33b5ef===_0x332371)break;else _0xa43541['push'](_0xa43541['shift']());}catch(_0x8a6543){_0xa43541['push'](_0xa43541['shift']());}}}(a167_0x5837,0x193cc));function a167_0x2546(_0x15beb7,_0x5bc90a){_0x15beb7=_0x15beb7-0x117;const _0x5837a0=a167_0x5837();let _0x2546e0=_0x5837a0[_0x15beb7];return _0x2546e0;}import a167_0x26453b from'path';import{existsSync,readFileSync}from'fs';import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';import{sanitizeFileName}from'../../utils/string-utils.js';import{batchAsync}from'../../utils/async.js';import{buildFolderIdToPathMap}from'./resolution-context.js';import{segmentWithActivationsToYaml,segmentToYamlString,segmentResponseToDef,journeyActivationStepToYaml}from'./child-segment-yaml.js';import{journeyResponseToDef,toYamlString as a167_0x17b150,normalizeJourneyDef,parseYamlString as a167_0x4d7bd6}from'./journey-yaml.js';import{SEGMENT_KIND_JOURNEY,generateJourneyLocalName,sanitizeYamlKey,buildMergedJourneyDef,buildLocalRuleToNameMappingFromJourney,createJumpTargetCache,resolveJumpTarget}from'./journey-utils.js';import{createTdxConfigContent}from'./tdx-config.js';function a167_0x5837(){const _0x311338=['has','journey','listFolders','values','listActivations','state','paused','activationParams','data','.yml','size','join','hasChanges','audienceId','1505340ICbMcA','get','filter','\x20not\x20found\x20in\x20pre-fetched\x20data,\x20skipping','description','Fetching\x20activations','5Chazzd','all','versionNumber','Processing\x20journeys','Fetching\x20users\x20and\x20connections','parentFolder','78569bNmRAI','resolveParentId','Processing\x20journey:\x20','getParent','Fetching\x20parent\x20segment\x20info','371792XjElAd','createdAt','rule','buildIdToNameMap','update','set','journeyBundleName','129262LawKDl','reduce','86092HTwOXz','getSegment','targetResourceName','tdx.json','utf-8','kind','activation_','length','isNew','511578tbemKH','push','Warning:\x20Journey\x20','listSegments','Fetching\x20segments,\x20folders,\x20and\x20journeys','123028DXPklK','segmentFolderId','getLatestJourneyId','toLowerCase','from','name','journeyBundleId','segment','connection','18KjHOkb','folderId','map','attributes'];a167_0x5837=function(){return _0x311338;};return a167_0x5837();}function prepareFile(_0x1916a0,_0x3db9b5,_0x4887fc){const _0x4c4802=a167_0x2546,_0x462688=a167_0x26453b['relative'](_0x4887fc,_0x1916a0);if(existsSync(_0x1916a0)){const _0x495fca=readFileSync(_0x1916a0,_0x4c4802(0x149)),_0x262ac4=generateDiff(_0x495fca,_0x3db9b5),_0x42d778=hasChanges(_0x262ac4);return{'relativePath':_0x462688,'absolutePath':_0x1916a0,'content':_0x3db9b5,'isNew':![],'hasChanges':_0x42d778,'diff':_0x42d778?formatDiffWithColors(_0x262ac4):undefined};}return{'relativePath':_0x462688,'absolutePath':_0x1916a0,'content':_0x3db9b5,'isNew':!![],'hasChanges':![]};}function getUniqueFileName(_0x317c2d,_0x3b6fa2,_0x8dde98){const _0x31e686=a167_0x2546,_0xe91763=_0x317c2d+':'+_0x3b6fa2,_0x58b488=_0x8dde98[_0x31e686(0x12c)](_0xe91763)||0x0;_0x8dde98[_0x31e686(0x141)](_0xe91763,_0x58b488+0x1);if(_0x58b488===0x0)return _0x3b6fa2;return _0x3b6fa2+'_'+(_0x58b488+0x1);}export async function pullSegments(_0x31b894,_0x9858c2,_0x1677e1={}){const _0x2f17d2=a167_0x2546,{targetDir:_0x335769,progress:_0x22e50c}=_0x1677e1;_0x22e50c?.['update']('Resolving\x20parent\x20segment');const _0x3142fd=await _0x31b894[_0x2f17d2(0x117)][_0x2f17d2(0x138)](_0x9858c2);_0x22e50c?.[_0x2f17d2(0x140)](_0x2f17d2(0x13b));const _0x438824=await _0x31b894[_0x2f17d2(0x117)][_0x2f17d2(0x13a)](_0x3142fd),_0x11deb8=_0x438824[_0x2f17d2(0x11c)][_0x2f17d2(0x158)];_0x22e50c?.['update'](_0x2f17d2(0x152));const [_0x28e0c6,_0x139854,_0x3f2a97]=await Promise['all']([_0x31b894[_0x2f17d2(0x117)][_0x2f17d2(0x151)](_0x3142fd),_0x31b894[_0x2f17d2(0x117)][_0x2f17d2(0x11f)](_0x3142fd),_0x31b894['journey']['listJourneysWithDetailsFromParentSegment'](_0x3142fd,{'includeAllVersions':!![]})]),{journeys:_0x2f7311,activationStepsById:_0x4ada01}=_0x3f2a97,_0x2c77f5=new Map();for(const _0x41c7d4 of _0x2f7311){_0x2c77f5[_0x2f17d2(0x141)](_0x41c7d4['id'],_0x41c7d4);}const _0x2c359e=_0x2f7311[_0x2f17d2(0x11b)](_0x4fbec5=>({'id':_0x4fbec5['id'],'name':_0x4fbec5[_0x2f17d2(0x11c)][_0x2f17d2(0x158)],'journeyBundleName':_0x4fbec5[_0x2f17d2(0x11c)][_0x2f17d2(0x142)]||'','journeyBundleId':_0x4fbec5['attributes']['journeyBundleId']||'','versionNumber':_0x4fbec5['attributes'][_0x2f17d2(0x133)],'description':_0x4fbec5[_0x2f17d2(0x11c)][_0x2f17d2(0x12f)],'state':_0x4fbec5[_0x2f17d2(0x11c)][_0x2f17d2(0x122)],'paused':_0x4fbec5['attributes'][_0x2f17d2(0x123)],'audienceId':_0x4fbec5[_0x2f17d2(0x11c)][_0x2f17d2(0x12a)],'folderId':_0x4fbec5['relationships']?.[_0x2f17d2(0x136)]?.[_0x2f17d2(0x125)]?.['id'],'createdAt':_0x4fbec5[_0x2f17d2(0x11c)][_0x2f17d2(0x13d)],'updatedAt':_0x4fbec5[_0x2f17d2(0x11c)]['updatedAt']})),_0x5a48e8=buildFolderIdToPathMap(_0x139854),_0x515577=_0x335769||'segments/'+sanitizeFileName(_0x11deb8);_0x22e50c?.[_0x2f17d2(0x140)](_0x2f17d2(0x130));const _0x129c8c=new Map();await batchAsync(_0x28e0c6,async _0x4db77b=>{const _0xfd4b72=_0x2f17d2,_0x481e5a=await _0x31b894[_0xfd4b72(0x117)][_0xfd4b72(0x121)](_0x3142fd,_0x4db77b['id']);_0x129c8c['set'](_0x4db77b['id'],_0x481e5a);}),_0x22e50c?.[_0x2f17d2(0x140)](_0x2f17d2(0x135));const [_0x1ee2b7,_0x378c15]=await Promise['all']([_0x31b894['user']['buildIdToEmailMap'](),_0x31b894[_0x2f17d2(0x118)][_0x2f17d2(0x13f)]()]),_0x1248eb=[],_0x359fc2=new Map(),_0x564340=a167_0x26453b[_0x2f17d2(0x128)](_0x515577,_0x2f17d2(0x148)),_0x144bad=createTdxConfigContent(_0x11deb8);_0x1248eb[_0x2f17d2(0x14f)](prepareFile(_0x564340,_0x144bad,_0x515577));const _0x459a08=new Map();for(const _0x4f021a of _0x28e0c6){_0x459a08['set'](_0x4f021a['id'],_0x4f021a);}let _0x19f819=_0x28e0c6;if(_0x1677e1[_0x2f17d2(0x147)]){const _0x39f74e=_0x28e0c6[_0x2f17d2(0x12d)](_0x53b793=>_0x53b793[_0x2f17d2(0x158)][_0x2f17d2(0x156)]()===_0x1677e1[_0x2f17d2(0x147)][_0x2f17d2(0x156)]());_0x39f74e[_0x2f17d2(0x14c)]>0x0&&(_0x19f819=_0x39f74e);}_0x22e50c?.[_0x2f17d2(0x140)]('Processing\x20segments');for(const _0x6d7b04 of _0x19f819){if(_0x6d7b04['kind']===SEGMENT_KIND_JOURNEY)continue;const _0x18d45f=_0x6d7b04[_0x2f17d2(0x154)]?_0x5a48e8[_0x2f17d2(0x12c)](_0x6d7b04['segmentFolderId'])||'':'',_0x1345a9=_0x129c8c[_0x2f17d2(0x12c)](_0x6d7b04['id'])||[],_0x932822=segmentWithActivationsToYaml(_0x6d7b04,_0x1345a9,undefined,_0x1ee2b7,_0x378c15),_0x2018ed=_0x18d45f?a167_0x26453b[_0x2f17d2(0x128)](_0x515577,_0x18d45f):_0x515577,_0x5c0e78=sanitizeFileName(_0x6d7b04[_0x2f17d2(0x158)]),_0x488cfa=getUniqueFileName(_0x2018ed,_0x5c0e78,_0x359fc2),_0x904f19=a167_0x26453b[_0x2f17d2(0x128)](_0x2018ed,_0x488cfa+_0x2f17d2(0x126)),_0x534b4f=segmentToYamlString(_0x932822);_0x1248eb['push'](prepareFile(_0x904f19,_0x534b4f,_0x515577));}const _0x5a7e19=new Map();for(const _0x747f62 of _0x2c359e){const _0x8b6688=_0x747f62[_0x2f17d2(0x159)];!_0x5a7e19[_0x2f17d2(0x11d)](_0x8b6688)&&_0x5a7e19['set'](_0x8b6688,[]),_0x5a7e19[_0x2f17d2(0x12c)](_0x8b6688)['push'](_0x747f62);}for(const _0x4e87b5 of _0x5a7e19['values']()){_0x4e87b5['sort']((_0x3e7364,_0x5d5ec2)=>(_0x3e7364[_0x2f17d2(0x133)]||0x0)-(_0x5d5ec2[_0x2f17d2(0x133)]||0x0));}if(_0x1677e1[_0x2f17d2(0x147)]){const _0xdb01ae=new Map();for(const [_0x344f10,_0x588bfe]of _0x5a7e19){const _0x4f04c4=_0x588bfe[0x0][_0x2f17d2(0x142)];if(_0x4f04c4[_0x2f17d2(0x156)]()===_0x1677e1[_0x2f17d2(0x147)][_0x2f17d2(0x156)]()){_0xdb01ae['set'](_0x344f10,_0x588bfe);break;}}_0x5a7e19['clear']();for(const [_0x38f393,_0x2a6345]of _0xdb01ae){_0x5a7e19[_0x2f17d2(0x141)](_0x38f393,_0x2a6345);}}if(_0x5a7e19[_0x2f17d2(0x127)]>0x0){_0x22e50c?.[_0x2f17d2(0x140)](_0x2f17d2(0x134));const _0x490cce=Array[_0x2f17d2(0x157)](_0x5a7e19[_0x2f17d2(0x120)]()),_0x3e262f=0x5,{createYamlContext:_0x4bc77f}=createYamlContextForBundle(_0x31b894,_0x459a08,_0x1ee2b7,_0x378c15,_0x4ada01,_0x2c77f5);for(let _0x175a23=0x0;_0x175a23<_0x490cce['length'];_0x175a23+=_0x3e262f){const _0x56bc2e=_0x490cce['slice'](_0x175a23,_0x175a23+_0x3e262f),_0x2c3e70=await Promise[_0x2f17d2(0x132)](_0x56bc2e['map'](async _0x44459f=>{const _0x570e76=_0x2f17d2,_0x4248ae=_0x44459f[0x0],_0x497c6c=_0x4248ae[_0x570e76(0x142)];_0x22e50c?.['update'](_0x570e76(0x139)+_0x497c6c);const _0x4a5c6b=_0x4248ae[_0x570e76(0x11a)]?_0x5a48e8[_0x570e76(0x12c)](_0x4248ae[_0x570e76(0x11a)])||'':'',_0x42721b=_0x4a5c6b?a167_0x26453b[_0x570e76(0x128)](_0x515577,_0x4a5c6b):_0x515577,_0x4f3a22=sanitizeFileName(_0x497c6c),_0x46d777=a167_0x26453b[_0x570e76(0x128)](_0x42721b,_0x4f3a22+'.yml');let _0x4523a0;if(existsSync(_0x46d777))try{const _0x3c24ac=readFileSync(_0x46d777,_0x570e76(0x149)),_0x126367=a167_0x4d7bd6(_0x3c24ac);_0x4523a0=buildLocalRuleToNameMappingFromJourney(_0x126367);}catch{}const _0x140ac0=[];for(const _0x5966de of _0x44459f){const _0x5312e2=_0x2c77f5['get'](_0x5966de['id']);if(!_0x5312e2){_0x22e50c?.[_0x570e76(0x140)](_0x570e76(0x150)+_0x5966de['id']+_0x570e76(0x12e));continue;}const _0x12a3bf=_0x5312e2[_0x570e76(0x11c)]?.[_0x570e76(0x12a)],_0x191f52=_0x4bc77f(_0x5966de['id'],_0x12a3bf),_0x5533ba=await journeyResponseToDef(_0x5312e2,_0x191f52);_0x140ac0['push']({'item':_0x5966de,'yaml':_0x5533ba});}const _0x443815=await _0x31b894[_0x570e76(0x11e)][_0x570e76(0x155)](_0x4248ae['journeyBundleId']),_0x2f1656=buildMergedJourneyDef(_0x140ac0,_0x4523a0,_0x443815);return{'bundleName':_0x497c6c,'folderPath':_0x4a5c6b,'finalYaml':_0x2f1656};}));for(const {bundleName:_0x161b9f,folderPath:_0x3b85fd,finalYaml:_0x15714c}of _0x2c3e70){const _0x42f80f=normalizeJourneyDef(_0x15714c),_0x58135a=a167_0x17b150(_0x42f80f),_0x934914=_0x3b85fd?a167_0x26453b[_0x2f17d2(0x128)](_0x515577,_0x3b85fd):_0x515577,_0x2f5bb0=sanitizeFileName(_0x161b9f),_0x522d9c=getUniqueFileName(_0x934914,_0x2f5bb0,_0x359fc2),_0x4e9dd3=a167_0x26453b['join'](_0x934914,_0x522d9c+'.yml');_0x1248eb[_0x2f17d2(0x14f)](prepareFile(_0x4e9dd3,_0x58135a,_0x515577));}}}const _0x4e84e6=Array[_0x2f17d2(0x157)](_0x129c8c[_0x2f17d2(0x120)]())[_0x2f17d2(0x144)]((_0x277182,_0x3aa0da)=>_0x277182+_0x3aa0da[_0x2f17d2(0x14c)],0x0),_0x9782c7=_0x19f819['filter'](_0x4ef7cf=>_0x4ef7cf['kind']!==SEGMENT_KIND_JOURNEY),_0x38e3d9=_0x1248eb[_0x2f17d2(0x12d)](_0x59c9b6=>_0x59c9b6[_0x2f17d2(0x14d)])[_0x2f17d2(0x14c)],_0x2347c3=_0x1248eb['filter'](_0xdea34b=>!_0xdea34b[_0x2f17d2(0x14d)]&&_0xdea34b[_0x2f17d2(0x129)])[_0x2f17d2(0x14c)],_0x4b54b8=_0x1248eb[_0x2f17d2(0x12d)](_0x3b87ae=>!_0x3b87ae[_0x2f17d2(0x14d)]&&!_0x3b87ae[_0x2f17d2(0x129)])[_0x2f17d2(0x14c)],_0x5d071d=Array['from'](_0x5a7e19['values']())[_0x2f17d2(0x144)]((_0x45ee63,_0x19609d)=>_0x45ee63+_0x19609d[_0x2f17d2(0x14c)],0x0);return{'parentName':_0x11deb8,'parentId':_0x3142fd,'targetDir':_0x515577,'files':_0x1248eb,'counts':{'segments':_0x9782c7[_0x2f17d2(0x14c)],'journeys':_0x5a7e19[_0x2f17d2(0x127)],'journeyVersions':_0x5d071d,'activations':_0x4e84e6},'newFiles':_0x38e3d9,'changedFiles':_0x2347c3,'unchangedFiles':_0x4b54b8};}function createYamlContextForBundle(_0x2bd182,_0x4fe23f,_0x214feb,_0x1d79dd,_0x3bca76,_0x16c5a7){const _0xa8e181=new Set(),_0x372d78=new Map(),_0x5d558c=new Map(),_0x575d5d=createJumpTargetCache(),_0x3b5085=async(_0x23209b,_0xdfcf69)=>{const _0x4e7055=a167_0x2546,_0x3b9728=_0x372d78[_0x4e7055(0x12c)](_0x23209b);if(_0x3b9728!==undefined)return _0x3b9728;if(!_0xdfcf69)return _0x23209b;try{let _0x28977f=_0x4fe23f[_0x4e7055(0x12c)](_0x23209b);!_0x28977f&&(_0x28977f=await _0x2bd182[_0x4e7055(0x117)][_0x4e7055(0x146)](_0xdfcf69,_0x23209b),_0x4fe23f['set'](_0x23209b,_0x28977f));const _0x4048bf=generateJourneyLocalName(_0x28977f[_0x4e7055(0x158)]),_0x407b2d=_0x28977f[_0x4e7055(0x14a)]===SEGMENT_KIND_JOURNEY&&_0x4048bf!==undefined;if(_0x407b2d&&_0x4048bf){let _0x32594e=_0x4048bf,_0x2c9291=0x2;while(_0xa8e181[_0x4e7055(0x11d)](_0x32594e)){_0x32594e=_0x4048bf+'_'+_0x2c9291,_0x2c9291++;}return _0xa8e181['add'](_0x32594e),_0x372d78[_0x4e7055(0x141)](_0x23209b,_0x32594e),_0x32594e;}return _0x28977f[_0x4e7055(0x158)];}catch{return _0x23209b;}},_0x46d206=(_0x4f02f0,_0x4cc3a2)=>({'resolveSegment':async _0x1638f1=>{const _0x24b851=a167_0x2546,_0x25f20b=_0x372d78[_0x24b851(0x12c)](_0x1638f1);if(_0x25f20b!==undefined)return{'name':_0x25f20b,'isJourneyLocal':!![]};if(!_0x4cc3a2)return{'name':_0x1638f1,'isJourneyLocal':![]};try{let _0x15d1c3=_0x4fe23f[_0x24b851(0x12c)](_0x1638f1);!_0x15d1c3&&(_0x15d1c3=await _0x2bd182[_0x24b851(0x117)][_0x24b851(0x146)](_0x4cc3a2,_0x1638f1),_0x4fe23f[_0x24b851(0x141)](_0x1638f1,_0x15d1c3));const _0x500e46=generateJourneyLocalName(_0x15d1c3[_0x24b851(0x158)]),_0x213af7=_0x15d1c3[_0x24b851(0x14a)]===SEGMENT_KIND_JOURNEY&&_0x500e46!==undefined;if(_0x213af7&&!_0x15d1c3['rule']&&_0x4cc3a2)try{const _0x3af7e4=await _0x2bd182['segment'][_0x24b851(0x146)](_0x4cc3a2,_0x1638f1);_0x4fe23f[_0x24b851(0x141)](_0x1638f1,_0x3af7e4),_0x15d1c3=_0x3af7e4;}catch{}const _0x309a73=await _0x3b5085(_0x1638f1,_0x4cc3a2);let _0x3a66b1;if(_0x213af7&&_0x15d1c3['rule']){const _0x37d15d=await segmentResponseToDef(_0x15d1c3,{'resolveSegmentName':_0x219628=>_0x3b5085(_0x219628,_0x4cc3a2)});_0x3a66b1={'description':_0x15d1c3[_0x24b851(0x12f)],'rule':_0x37d15d[_0x24b851(0x13e)]};}return{'name':_0x309a73,'isJourneyLocal':_0x213af7,'definition':_0x3a66b1};}catch{return{'name':_0x1638f1,'isJourneyLocal':![]};}},'resolveActivation':async _0xfbaec=>{const _0x29df7c=a167_0x2546,_0x391865=_0x5d558c[_0x29df7c(0x12c)](_0xfbaec);if(_0x391865!==undefined)return{'name':_0x391865,'isJourneyLocal':!![]};try{let _0x5a6cec=_0x3bca76[_0x29df7c(0x12c)](_0xfbaec);!_0x5a6cec&&(_0x5a6cec=await _0x2bd182[_0x29df7c(0x11e)]['getActivation'](_0x4f02f0,_0xfbaec));const _0x5cf201=_0x5a6cec['attributes'][_0x29df7c(0x124)][_0x29df7c(0x158)]||_0xfbaec,_0x5da68a=sanitizeYamlKey(_0x5cf201)||_0x29df7c(0x14b)+_0xfbaec,_0x34f286=_0x5da68a;_0x5d558c[_0x29df7c(0x141)](_0xfbaec,_0x34f286);const _0x238a7e=journeyActivationStepToYaml(_0x5a6cec,_0x214feb,_0x1d79dd);return{'name':_0x34f286,'isJourneyLocal':!![],'definition':_0x238a7e};}catch{return{'name':_0xfbaec,'isJourneyLocal':![]};}},'resolveJumpTarget':(_0x31f252,_0x54ca8c)=>resolveJumpTarget(_0x31f252,_0x54ca8c,_0x575d5d,async _0x5aec42=>{const _0x3b985e=a167_0x2546,_0x483f21=_0x16c5a7[_0x3b985e(0x12c)](_0x5aec42);if(_0x483f21)return _0x483f21;return _0x2bd182['journey']['getJourney'](_0x5aec42);})});return{'createYamlContext':_0x46d206};}
@@ -1 +1 @@
1
- function a168_0x5f53(){const _0x2890c4=['Failed\x20to\x20read\x20push\x20recovery\x20file:\x20','Failed\x20to\x20delete\x20push\x20recovery\x20file:\x20','parse','segments','dirname','string','tdx.sdk.push-recovery','403004soANxA','213442SBKqnY','3OqQZon','warn','utf-8','debug','code','stringify','2817815DwmaoG','231gtgVSE','journeyName','join','40GGOeiQ','107802VPeCZW','version','.tmp','914832ejQpCV','ENOENT','310850SVdHYN','basename','toISOString','Failed\x20to\x20parse\x20push\x20recovery\x20file:\x20','25DMIhmd','35852yaCevW'];a168_0x5f53=function(){return _0x2890c4;};return a168_0x5f53();}const a168_0x32acd0=a168_0x48ef;(function(_0x53ef61,_0x3c52b9){const _0x4ef3e6=a168_0x48ef,_0x290f38=_0x53ef61();while(!![]){try{const _0x1bcd56=-parseInt(_0x4ef3e6(0x16c))/0x1+-parseInt(_0x4ef3e6(0x16d))/0x2*(-parseInt(_0x4ef3e6(0x16e))/0x3)+parseInt(_0x4ef3e6(0x183))/0x4*(parseInt(_0x4ef3e6(0x182))/0x5)+parseInt(_0x4ef3e6(0x17c))/0x6+-parseInt(_0x4ef3e6(0x174))/0x7+-parseInt(_0x4ef3e6(0x178))/0x8*(-parseInt(_0x4ef3e6(0x179))/0x9)+-parseInt(_0x4ef3e6(0x17e))/0xa*(-parseInt(_0x4ef3e6(0x175))/0xb);if(_0x1bcd56===_0x3c52b9)break;else _0x290f38['push'](_0x290f38['shift']());}catch(_0x1a0cf0){_0x290f38['push'](_0x290f38['shift']());}}}(a168_0x5f53,0x338be));import{readFileSync,writeFileSync,unlinkSync,existsSync,renameSync}from'fs';import a168_0xec9f81 from'path';import{Logger}from'../../utils/logger/index.js';const logger=Logger['of'](a168_0x32acd0(0x16b));export function getPushRecoveryPath(_0x26f786){const _0x44a1fd=a168_0x32acd0,_0x4d4b17=a168_0xec9f81[_0x44a1fd(0x188)](_0x26f786),_0x2a72e5=a168_0xec9f81[_0x44a1fd(0x17f)](_0x26f786);return a168_0xec9f81[_0x44a1fd(0x177)](_0x4d4b17,'.'+_0x2a72e5+'.push-recovery.json');}export function readPushRecovery(_0x52351e){const _0x22fad1=a168_0x32acd0,_0x3326ac=getPushRecoveryPath(_0x52351e);if(!existsSync(_0x3326ac))return undefined;try{const _0x44f05c=readFileSync(_0x3326ac,_0x22fad1(0x170)),_0x3065d9=JSON[_0x22fad1(0x186)](_0x44f05c);if(_0x3065d9?.[_0x22fad1(0x17a)]!==0x1||typeof _0x3065d9[_0x22fad1(0x176)]!==_0x22fad1(0x189))return undefined;return _0x3065d9;}catch(_0x3f1d8d){return _0x3f1d8d instanceof SyntaxError?logger[_0x22fad1(0x171)](_0x22fad1(0x181)+_0x3f1d8d):logger[_0x22fad1(0x16f)](_0x22fad1(0x184)+_0x3f1d8d),undefined;}}export function writePushRecovery(_0x16d212,_0x521377){const _0xe920f5=a168_0x32acd0,_0x3ae129=getPushRecoveryPath(_0x16d212),_0x53bc2c=_0x3ae129+_0xe920f5(0x17b);writeFileSync(_0x53bc2c,JSON[_0xe920f5(0x173)](_0x521377,null,0x2)+'\x0a','utf-8'),renameSync(_0x53bc2c,_0x3ae129);}function a168_0x48ef(_0x30782a,_0x3e9aaf){_0x30782a=_0x30782a-0x16b;const _0x5f531b=a168_0x5f53();let _0x48efea=_0x5f531b[_0x30782a];return _0x48efea;}export function deletePushRecovery(_0x229dea){const _0x191b1d=a168_0x32acd0,_0x16c54b=getPushRecoveryPath(_0x229dea);try{unlinkSync(_0x16c54b);}catch(_0x4a8af1){_0x4a8af1[_0x191b1d(0x172)]!==_0x191b1d(0x17d)&&logger['debug'](_0x191b1d(0x185)+_0x4a8af1);}}export function saveSegmentToPushRecovery(_0x2d72c3,_0x4af229,_0x108712,_0x13f4ff){const _0x42cfa6=a168_0x32acd0,_0x56d382=readPushRecovery(_0x2d72c3),_0x39a984=_0x56d382?.['journeyName']===_0x4af229?{..._0x56d382,'updatedAt':new Date()[_0x42cfa6(0x180)]()}:{'version':0x1,'journeyName':_0x4af229,'updatedAt':new Date()[_0x42cfa6(0x180)](),'segments':{}};_0x39a984[_0x42cfa6(0x187)][_0x108712]=_0x13f4ff,writePushRecovery(_0x2d72c3,_0x39a984);}
1
+ const a168_0x147b69=a168_0x5583;(function(_0x2370e6,_0x1fe901){const _0x20397a=a168_0x5583,_0x207f7b=_0x2370e6();while(!![]){try{const _0x176212=-parseInt(_0x20397a(0x16e))/0x1*(parseInt(_0x20397a(0x184))/0x2)+-parseInt(_0x20397a(0x175))/0x3+parseInt(_0x20397a(0x180))/0x4*(-parseInt(_0x20397a(0x16d))/0x5)+parseInt(_0x20397a(0x17a))/0x6*(parseInt(_0x20397a(0x17b))/0x7)+-parseInt(_0x20397a(0x185))/0x8+-parseInt(_0x20397a(0x171))/0x9*(parseInt(_0x20397a(0x186))/0xa)+parseInt(_0x20397a(0x174))/0xb;if(_0x176212===_0x1fe901)break;else _0x207f7b['push'](_0x207f7b['shift']());}catch(_0x14ee2f){_0x207f7b['push'](_0x207f7b['shift']());}}}(a168_0x434e,0x437a6));function a168_0x434e(){const _0x417e16=['code','ENOENT','8201985fXaUIa','928167ajhskf','parse','stringify','segments','tdx.sdk.push-recovery','24798MQDPUS','609qGqzEi','Failed\x20to\x20delete\x20push\x20recovery\x20file:\x20','dirname','utf-8','toISOString','35144qLFswl','Failed\x20to\x20read\x20push\x20recovery\x20file:\x20','version','Failed\x20to\x20parse\x20push\x20recovery\x20file:\x20','6AAzWwr','1224296eSpyTu','30NFLlgy','basename','debug','75OyOtGs','77943vkFJtL','.tmp','string','2313TQlIgu'];a168_0x434e=function(){return _0x417e16;};return a168_0x434e();}import{readFileSync,writeFileSync,unlinkSync,existsSync,renameSync}from'fs';import a168_0x4c7556 from'path';import{Logger}from'../../utils/logger/index.js';const logger=Logger['of'](a168_0x147b69(0x179));export function getPushRecoveryPath(_0x3fc4d9){const _0x589340=a168_0x147b69,_0xd1aa0b=a168_0x4c7556[_0x589340(0x17d)](_0x3fc4d9),_0x47a53e=a168_0x4c7556[_0x589340(0x187)](_0x3fc4d9);return a168_0x4c7556['join'](_0xd1aa0b,'.'+_0x47a53e+'.push-recovery.json');}export function readPushRecovery(_0x509779){const _0x1e759e=a168_0x147b69,_0x32f996=getPushRecoveryPath(_0x509779);if(!existsSync(_0x32f996))return undefined;try{const _0xa05864=readFileSync(_0x32f996,_0x1e759e(0x17e)),_0x46add7=JSON[_0x1e759e(0x176)](_0xa05864);if(_0x46add7?.[_0x1e759e(0x182)]!==0x1||typeof _0x46add7['journeyName']!==_0x1e759e(0x170))return undefined;return _0x46add7;}catch(_0x23084e){return _0x23084e instanceof SyntaxError?logger[_0x1e759e(0x188)](_0x1e759e(0x183)+_0x23084e):logger['warn'](_0x1e759e(0x181)+_0x23084e),undefined;}}export function writePushRecovery(_0x4dcca9,_0xdf8428){const _0x5be51e=a168_0x147b69,_0x2f7892=getPushRecoveryPath(_0x4dcca9),_0x49da0e=_0x2f7892+_0x5be51e(0x16f);writeFileSync(_0x49da0e,JSON[_0x5be51e(0x177)](_0xdf8428,null,0x2)+'\x0a','utf-8'),renameSync(_0x49da0e,_0x2f7892);}function a168_0x5583(_0x29e502,_0x3e3297){_0x29e502=_0x29e502-0x16d;const _0x434ee9=a168_0x434e();let _0x5583d1=_0x434ee9[_0x29e502];return _0x5583d1;}export function deletePushRecovery(_0x556de5){const _0x4b66fa=a168_0x147b69,_0x2e722f=getPushRecoveryPath(_0x556de5);try{unlinkSync(_0x2e722f);}catch(_0x2b7e27){_0x2b7e27[_0x4b66fa(0x172)]!==_0x4b66fa(0x173)&&logger[_0x4b66fa(0x188)](_0x4b66fa(0x17c)+_0x2b7e27);}}export function saveSegmentToPushRecovery(_0x48749c,_0x224863,_0x53e3e8,_0x56bc1d){const _0x390f2c=a168_0x147b69,_0x2f38b7=readPushRecovery(_0x48749c),_0x2217d2=_0x2f38b7?.['journeyName']===_0x224863?{..._0x2f38b7,'updatedAt':new Date()['toISOString']()}:{'version':0x1,'journeyName':_0x224863,'updatedAt':new Date()[_0x390f2c(0x17f)](),'segments':{}};_0x2217d2[_0x390f2c(0x178)][_0x53e3e8]=_0x56bc1d,writePushRecovery(_0x48749c,_0x2217d2);}