@treasuredata/tdx 2026.4.15 → 2026.4.16

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 (220) 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-campaign-pull-command.js +1 -1
  22. package/dist/commands/engage-campaign-push-command.js +1 -1
  23. package/dist/commands/engage-campaign-validate-command.js +1 -1
  24. package/dist/commands/engage-command.js +1 -1
  25. package/dist/commands/engage-template-pull-command.js +1 -1
  26. package/dist/commands/engage-template-push-command.js +1 -1
  27. package/dist/commands/engage-template-validate-command.js +1 -1
  28. package/dist/commands/job-command.js +1 -1
  29. package/dist/commands/journey-command.js +1 -1
  30. package/dist/commands/journey-validate-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/mcp-command.js +1 -1
  33. package/dist/commands/parent-segment-command.js +1 -1
  34. package/dist/commands/policy-command.js +1 -1
  35. package/dist/commands/profile-command.js +1 -1
  36. package/dist/commands/profiles-command.js +1 -1
  37. package/dist/commands/query-command.js +1 -1
  38. package/dist/commands/schedule-command.js +1 -1
  39. package/dist/commands/segment-command.js +1 -1
  40. package/dist/commands/segment-create-command.js +1 -1
  41. package/dist/commands/segment-fields-command.js +1 -1
  42. package/dist/commands/segment-pull-command.js +1 -1
  43. package/dist/commands/segment-push-command.js +1 -1
  44. package/dist/commands/segment-update-command.js +1 -1
  45. package/dist/commands/segment-use-command.js +1 -1
  46. package/dist/commands/segment-validate-command.js +1 -1
  47. package/dist/commands/segments.js +1 -1
  48. package/dist/commands/show.js +1 -1
  49. package/dist/commands/status-command.js +1 -1
  50. package/dist/commands/tables.js +1 -1
  51. package/dist/commands/unset-command.js +1 -1
  52. package/dist/commands/upgrade-command.js +1 -1
  53. package/dist/commands/use-command.js +1 -1
  54. package/dist/commands/user-command.js +1 -1
  55. package/dist/commands/work-command.js +1 -1
  56. package/dist/commands/workflow-command.js +1 -1
  57. package/dist/core/auth.js +1 -1
  58. package/dist/core/command-output.js +1 -1
  59. package/dist/core/config.js +1 -1
  60. package/dist/core/connection-cache.js +1 -1
  61. package/dist/core/constants.js +1 -1
  62. package/dist/core/credential-cache.js +1 -1
  63. package/dist/core/global-context.js +1 -1
  64. package/dist/core/keychain.js +1 -1
  65. package/dist/core/oauth-keychain.js +1 -1
  66. package/dist/core/oauth.js +1 -1
  67. package/dist/core/profile.js +1 -1
  68. package/dist/core/project-config.js +1 -1
  69. package/dist/core/session.js +1 -1
  70. package/dist/core/user-cache.js +1 -1
  71. package/dist/core/version.js +1 -1
  72. package/dist/index.js +1 -1
  73. package/dist/mcp/server.js +1 -1
  74. package/dist/mcp/tools/index.js +1 -1
  75. package/dist/mcp/tools/tdx-run.js +1 -1
  76. package/dist/mcp/tools/tdx-search.js +1 -1
  77. package/dist/mcp/tools/work-create-item.js +1 -1
  78. package/dist/mcp/utils.js +1 -1
  79. package/dist/proxy/claude-usage-tracker.js +1 -1
  80. package/dist/proxy/passthrough-server.js +1 -1
  81. package/dist/proxy/sse-usage-parser.js +1 -1
  82. package/dist/sdk/agent/agent-config.js +1 -1
  83. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  84. package/dist/sdk/agent/agent-yaml.js +1 -1
  85. package/dist/sdk/agent/test/evaluator.js +1 -1
  86. package/dist/sdk/agent/test/executor.js +1 -1
  87. package/dist/sdk/agent/test/index.js +1 -1
  88. package/dist/sdk/agent/test/output.js +1 -1
  89. package/dist/sdk/agent/test/parser.js +1 -1
  90. package/dist/sdk/agent/tool-target-registry.js +1 -1
  91. package/dist/sdk/api.js +1 -1
  92. package/dist/sdk/cas/cas-api-client.js +1 -1
  93. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  94. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  95. package/dist/sdk/cas/index.js +1 -1
  96. package/dist/sdk/cas/pull-workflow.js +1 -1
  97. package/dist/sdk/cas/push-workflow.js +1 -1
  98. package/dist/sdk/client/cdp-api-client.js +1 -1
  99. package/dist/sdk/client/delivery-api-client.js +1 -1
  100. package/dist/sdk/client/endpoints.js +1 -1
  101. package/dist/sdk/client/engage-api-client.js +1 -1
  102. package/dist/sdk/client/http-client.js +1 -1
  103. package/dist/sdk/client/llm-api-client.js +1 -1
  104. package/dist/sdk/client/oauth-refresh.js +1 -1
  105. package/dist/sdk/client/rate-limiter.js +1 -1
  106. package/dist/sdk/client/td-api-client.js +1 -1
  107. package/dist/sdk/client/trino-api-client.js +1 -1
  108. package/dist/sdk/client/workflow-client.js +1 -1
  109. package/dist/sdk/connection-validator.js +1 -1
  110. package/dist/sdk/connection.js +1 -1
  111. package/dist/sdk/delivery.js +1 -1
  112. package/dist/sdk/engage/campaign-pull.js +1 -1
  113. package/dist/sdk/engage/campaign-push.js +1 -1
  114. package/dist/sdk/engage/campaign-validator.js +1 -1
  115. package/dist/sdk/engage/campaign-yaml.js +1 -1
  116. package/dist/sdk/engage/template-pull.js +1 -1
  117. package/dist/sdk/engage/template-push.js +1 -1
  118. package/dist/sdk/engage/template-validator.js +1 -1
  119. package/dist/sdk/engage/template-yaml.js +1 -1
  120. package/dist/sdk/engage/types/campaign-def.js +1 -1
  121. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  122. package/dist/sdk/engage/types/template-schema.js +1 -1
  123. package/dist/sdk/engage.js +1 -1
  124. package/dist/sdk/errors.js +1 -1
  125. package/dist/sdk/index.js +1 -1
  126. package/dist/sdk/io/index.js +1 -1
  127. package/dist/sdk/io/node-filesystem.js +1 -1
  128. package/dist/sdk/job.js +1 -1
  129. package/dist/sdk/journey.js +1 -1
  130. package/dist/sdk/llm/chat-cache.js +1 -1
  131. package/dist/sdk/llm/index.js +1 -1
  132. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  133. package/dist/sdk/llm/model-factors.js +1 -1
  134. package/dist/sdk/personalization.js +1 -1
  135. package/dist/sdk/policy.js +1 -1
  136. package/dist/sdk/query/index.js +1 -1
  137. package/dist/sdk/query/sql-parser.js +1 -1
  138. package/dist/sdk/realtime.js +1 -1
  139. package/dist/sdk/schedule.js +1 -1
  140. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  141. package/dist/sdk/segment/fields-display.js +1 -1
  142. package/dist/sdk/segment/file-discovery.js +1 -1
  143. package/dist/sdk/segment/journey-utils.js +1 -1
  144. package/dist/sdk/segment/journey-validator.js +1 -1
  145. package/dist/sdk/segment/journey-yaml.js +1 -1
  146. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  147. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  148. package/dist/sdk/segment/pull-workflow.js +1 -1
  149. package/dist/sdk/segment/push-recovery.js +1 -1
  150. package/dist/sdk/segment/push-workflow.js +1 -1
  151. package/dist/sdk/segment/resolution-context.js +1 -1
  152. package/dist/sdk/segment/segment-path-parser.js +1 -1
  153. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  154. package/dist/sdk/segment/segment-validator.js +1 -1
  155. package/dist/sdk/segment/target-resolution.js +1 -1
  156. package/dist/sdk/segment/tdx-config.js +1 -1
  157. package/dist/sdk/segment/types/activation-schema.js +1 -1
  158. package/dist/sdk/segment/types/journey-def.js +1 -1
  159. package/dist/sdk/segment/types/journey-schema.js +1 -1
  160. package/dist/sdk/segment/types/segment-def.js +1 -1
  161. package/dist/sdk/segment/types/segment-schema.js +1 -1
  162. package/dist/sdk/segment/validate-files.js +1 -1
  163. package/dist/sdk/segment/yaml-validator.js +1 -1
  164. package/dist/sdk/segment.js +1 -1
  165. package/dist/sdk/types/index.js +1 -1
  166. package/dist/sdk/types/progress.js +1 -1
  167. package/dist/sdk/types/workspace.js +1 -1
  168. package/dist/sdk/user.js +1 -1
  169. package/dist/sdk/util/format-detector.js +1 -1
  170. package/dist/sdk/util/formatters.js +1 -1
  171. package/dist/sdk/util/index.js +1 -1
  172. package/dist/sdk/util/paginate.js +1 -1
  173. package/dist/sdk/util/tree-formatter.js +1 -1
  174. package/dist/sdk/workflow/archive-validation.js +1 -1
  175. package/dist/sdk/workflow/clone-workflow.js +1 -1
  176. package/dist/sdk/workflow/index.js +1 -1
  177. package/dist/sdk/workflow/pull-workflow.js +1 -1
  178. package/dist/sdk/workflow/push-workflow.js +1 -1
  179. package/dist/sdk/workflow/tdx-config.js +1 -1
  180. package/dist/sdk/workflow/workflow-utils.js +1 -1
  181. package/dist/sdk/workspace/access-tracker.js +1 -1
  182. package/dist/sdk/workspace/frontmatter.js +1 -1
  183. package/dist/sdk/workspace/git.js +1 -1
  184. package/dist/sdk/workspace/index.js +1 -1
  185. package/dist/sdk/workspace/templates.js +1 -1
  186. package/dist/sdk/workspace/weekly.js +1 -1
  187. package/dist/sdk/workspace/wikilinks.js +1 -1
  188. package/dist/test-utils/command-runner.js +1 -1
  189. package/dist/test-utils/factories.js +1 -1
  190. package/dist/test-utils/fixtures.js +1 -1
  191. package/dist/test-utils/http-mock.js +1 -1
  192. package/dist/test-utils/index.js +1 -1
  193. package/dist/utils/async.js +1 -1
  194. package/dist/utils/colors.js +1 -1
  195. package/dist/utils/diff.js +1 -1
  196. package/dist/utils/file-permissions.js +1 -1
  197. package/dist/utils/file-reader.js +1 -1
  198. package/dist/utils/github-releases.js +1 -1
  199. package/dist/utils/global-cache.js +1 -1
  200. package/dist/utils/json-loader.js +1 -1
  201. package/dist/utils/local-cache.js +1 -1
  202. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  203. package/dist/utils/logger/formatters/index.js +1 -1
  204. package/dist/utils/logger/handlers/console-handler.js +1 -1
  205. package/dist/utils/logger/handlers/file-handler.js +1 -1
  206. package/dist/utils/logger/handlers/index.js +1 -1
  207. package/dist/utils/logger/handlers/null-handler.js +1 -1
  208. package/dist/utils/logger/index.js +1 -1
  209. package/dist/utils/logger/logger.js +1 -1
  210. package/dist/utils/logger/types.js +1 -1
  211. package/dist/utils/option-validation.js +1 -1
  212. package/dist/utils/process.js +1 -1
  213. package/dist/utils/prompt.js +1 -1
  214. package/dist/utils/spinner.js +1 -1
  215. package/dist/utils/sse-parser.js +1 -1
  216. package/dist/utils/string-utils.js +1 -1
  217. package/dist/utils/table-ref-parser.js +1 -1
  218. package/dist/utils/tdx-logger.js +1 -1
  219. package/dist/utils/version-check.js +1 -1
  220. package/package.json +1 -1
@@ -1 +1 @@
1
- const a142_0x18a3a1=a142_0x533f;(function(_0x50234e,_0x479eea){const _0x136238=a142_0x533f,_0x171350=_0x50234e();while(!![]){try{const _0x1a9751=parseInt(_0x136238(0x297))/0x1+parseInt(_0x136238(0x20e))/0x2*(-parseInt(_0x136238(0x266))/0x3)+parseInt(_0x136238(0x257))/0x4*(-parseInt(_0x136238(0x296))/0x5)+parseInt(_0x136238(0x28e))/0x6*(-parseInt(_0x136238(0x289))/0x7)+-parseInt(_0x136238(0x21a))/0x8+parseInt(_0x136238(0x27c))/0x9+parseInt(_0x136238(0x1fd))/0xa*(parseInt(_0x136238(0x206))/0xb);if(_0x1a9751===_0x479eea)break;else _0x171350['push'](_0x171350['shift']());}catch(_0x17562d){_0x171350['push'](_0x171350['shift']());}}}(a142_0x1ed3,0x9375d));import*as a142_0x37127f from'yaml';function a142_0x1ed3(){const _0x4ddf10=['TimeWithinPast','JOURNEY_SYNTAX_ERROR','repeat_unit','timezone','And','add','forEach','visible','realtime','CountDistinct','2379eZAfeK','exclude','orderBy','flatMap','getSchema','isVisible','Warning:\x20activation\x20\x22','string','Behavior','warnings','email_recipients','operator','scheduleType','start_at','duration','localeCompare','\x22:\x0a','TimeRange','formatting','type','connectorConfig','Column','10763757VGeDqx','].attribute\x20cannot\x20be\x20empty.\x0a','localRuleToName','nested_workflow_project_name','map','order_by','all','columns','emailRecipients','minValue','kind','unit','nestedWorkflowName','105eJcZfO','activationTemplateId','join_strategy','every','First','3798QWTeAj','stringify','leftValue','arrayMatching','repeatSubFrequency','not','TimeWithinNext','Last','85vcvoDR','1146712eZIkby','\x20\x20-\x20\x22','timeWindow','match','join_row','segment','Count','repeatFrequency','nested_workflow_name','filter','schedule','Reference','reverse','batch','source','replace','.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.','sort','null','connectionId','monthly','connector_config','endOn','usedNames','ruleHashToName','behaviorTableName','attributes','scheduleOption','attribute','2274920YRoTfM','__UNRESOLVED__','conditions','activations:','repeat_sub_frequency','shape','INVALID_ARGUMENT','aggregation','segmentFolderId','11jrStAx','connector_config\x20for\x20activation\x20\x22','behavior_table','Please\x20specify\x20a\x20valid\x20attribute\x20name.','hourly','joinStrategy','push','object','1618SZmuif','\x27:\x20','connection','visibility','behavior','rule','activation_template_id','New\x20Segment','parse','none','groupingColumns','lock_enabled','9254480dTcOBV','lockEnabled','repeatUnit','min','minutes_interval','isArray','valid','funnel_stage','from','run_after_journey_refresh','resolveSegmentName','rightValues','has','name','folder','Connector:\x20','orderColumn','value','set','notifyOn','Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections','allColumns','__SEGMENT_REF__','Unknown\x20email\x20recipient:\x20','description','Value','Invalid\x20connector_config\x20for\x20activation\x20\x22','end_on','test','Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27','repeat_frequency','maxValue','syndicationBehavior','activations','max','length','notification','keys','warn','notify_on','limit','rule:','joinRow','activationParams','daily','errors','values','conditions[','CONNECTION_NOT_FOUND','rightValue','column','get','startAt','include','hour','month','isFinite','Equal','All','minute','attribute_name','37256tqkOjh','nestedWorkflowProjectName','all_columns','any','connectionNameToIdMap'];a142_0x1ed3=function(){return _0x4ddf10;};return a142_0x1ed3();}import{safeParseYaml}from'./yaml-validator.js';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';import{SegmentDefSchema}from'./types/segment-schema.js';import{ActivationDefSchema}from'./types/activation-schema.js';const SCHEDULE_TYPE_TO_REPEAT_UNIT={'daily':'day','hourly':a142_0x18a3a1(0x250),'weekly':'week','monthly':a142_0x18a3a1(0x251),'minutes_interval':a142_0x18a3a1(0x255)},REPEAT_UNIT_TO_SCHEDULE_TYPE={'day':a142_0x18a3a1(0x246),'hour':a142_0x18a3a1(0x20a),'week':'weekly','month':a142_0x18a3a1(0x1f4),'minute':a142_0x18a3a1(0x21e)};function filterRuleAsRuleDef(_0x20bafa){return _0x20bafa;}function ruleDefAsFilterRule(_0x49ebcc){return _0x49ebcc;}export function segmentResponseToDefSync(_0x3f93b6,_0x500347){const _0x282326=a142_0x18a3a1,_0x10a7b0=_0x3f93b6[_0x282326(0x213)]&&'type'in _0x3f93b6[_0x282326(0x213)]&&_0x3f93b6[_0x282326(0x213)][_0x282326(0x279)];return{'type':_0x282326(0x1e5),'name':_0x3f93b6[_0x282326(0x227)],..._0x3f93b6[_0x282326(0x232)]&&{'description':_0x3f93b6['description']},..._0x500347&&{'folder':_0x500347},..._0x10a7b0&&{'rule':apiRuleToYaml(_0x3f93b6[_0x282326(0x213)])},..._0x3f93b6[_0x282326(0x286)]!==undefined&&{'kind':_0x3f93b6[_0x282326(0x286)]===0x0?_0x282326(0x1ed):_0x3f93b6[_0x282326(0x286)]===0x1?_0x282326(0x264):_0x282326(0x221)},..._0x3f93b6['isVisible']!==undefined&&{'visible':_0x3f93b6[_0x282326(0x26b)]}};}export async function segmentResponseToDef(_0x62433d,_0x9115ff,_0x2a3f94){const _0x1804aa=a142_0x18a3a1,_0x14d94b=segmentResponseToDefSync(_0x62433d,_0x2a3f94);if(!_0x9115ff||!_0x9115ff[_0x1804aa(0x224)])return _0x14d94b;return _0x14d94b['rule']&&(_0x14d94b['rule']=await resolveRuleSegmentRefs(_0x14d94b[_0x1804aa(0x213)],_0x9115ff[_0x1804aa(0x224)])),_0x14d94b;}export function apiRuleToYaml(_0x9bff84){const _0x47a92d=a142_0x18a3a1,_0x4bbafb=(_0x9bff84[_0x47a92d(0x1ff)]||[])[_0x47a92d(0x269)](_0x5413cc=>{const _0x130ce8=_0x47a92d,_0x324421=apiConditionToYaml(_0x5413cc);if(isCompositeType(_0x324421)&&_0x324421['description']!==undefined){const _0x53e0dc=_0x324421;if(_0x53e0dc[_0x130ce8(0x1ff)]['length']===0x1)return _0x53e0dc[_0x130ce8(0x1ff)];return[{'type':_0x53e0dc['type'],'conditions':_0x53e0dc['conditions']}];}return[_0x324421];});if(_0x4bbafb[_0x47a92d(0x23d)]===0x1&&!_0x9bff84['description']&&isCompositeType(_0x4bbafb[0x0])){const _0x14553f=_0x4bbafb[0x0];if(_0x14553f['type']===_0x9bff84[_0x47a92d(0x279)]&&_0x14553f[_0x47a92d(0x1ff)]&&_0x14553f['description']===undefined)return{'type':_0x9bff84[_0x47a92d(0x279)],'conditions':_0x14553f[_0x47a92d(0x1ff)]};}return{'type':_0x9bff84['type'],'conditions':_0x4bbafb};}export async function resolveRuleSegmentRefs(_0x248b75,_0x304481){return transformRuleSegmentRefs(_0x248b75,_0x304481,_0x262337=>/^\d+$/['test'](_0x262337));}async function transformConditionSegmentRefs(_0x102879,_0x43256e,_0x1b81a4,_0x362633){const _0x5c11c4=a142_0x18a3a1;if(_0x5c11c4(0x1e5)in _0x102879&&(_0x102879['type']===_0x5c11c4(0x24f)||_0x102879[_0x5c11c4(0x279)]===_0x5c11c4(0x267))){const _0x1e0df5=_0x102879;if(_0x1b81a4(_0x1e0df5['segment']))return{..._0x1e0df5,'segment':await _0x43256e(_0x1e0df5[_0x5c11c4(0x1e5)])};return _0x102879;}if('conditions'in _0x102879&&_0x102879['conditions']){const _0x5143ab=_0x102879,_0x54053f=await Promise[_0x5c11c4(0x282)](_0x5143ab[_0x5c11c4(0x1ff)]['map'](_0x383607=>transformConditionSegmentRefs(_0x383607,_0x43256e,_0x1b81a4,_0x362633)));return{..._0x5143ab,'conditions':_0x54053f};}if(_0x5c11c4(0x1e9)in _0x102879&&_0x102879[_0x5c11c4(0x1e9)]){const _0x3ce3cd=_0x102879,_0x864ad6=await _0x362633(filterRuleAsRuleDef(_0x3ce3cd[_0x5c11c4(0x1e9)]),_0x43256e);return{..._0x3ce3cd,'filter':ruleDefAsFilterRule(_0x864ad6)};}return _0x102879;}async function transformRuleSegmentRefs(_0x5edf7b,_0x4dd2c9,_0xa6b665){const _0x50a8fe=a142_0x18a3a1,_0x2393d7=(_0x3fec28,_0xb16c34)=>transformRuleSegmentRefs(_0x3fec28,_0xb16c34,_0xa6b665),_0x404956=await Promise[_0x50a8fe(0x282)](_0x5edf7b[_0x50a8fe(0x1ff)][_0x50a8fe(0x280)](_0x51ee88=>transformConditionSegmentRefs(_0x51ee88,_0x4dd2c9,_0xa6b665,_0x2393d7)));return{..._0x5edf7b,'conditions':_0x404956};}export async function resolveRuleSegmentIds(_0x31daf0,_0x37a84a){const _0xc44874=a142_0x18a3a1;return transformRuleSegmentRefs(_0x31daf0,_0x37a84a,_0x40601d=>!/^\d+$/[_0xc44874(0x236)](_0x40601d));}function isCompositeType(_0x38c339){const _0x779497=a142_0x18a3a1;return _0x38c339['type']===_0x779497(0x260)||_0x38c339[_0x779497(0x279)]==='Or';}function isBehaviorApiCondition(_0x550812){const _0x563fc3=a142_0x18a3a1;if(!_0x550812[_0x563fc3(0x290)]?.['source']?.[_0x563fc3(0x227)])return![];return!![];}function apiConditionToYaml(_0xd389bf){const _0x460cc0=a142_0x18a3a1;if(_0xd389bf[_0x460cc0(0x279)]===_0x460cc0(0x260)||_0xd389bf[_0x460cc0(0x279)]==='Or'){if(_0xd389bf[_0x460cc0(0x1ff)]){const _0x38dd7e=_0xd389bf[_0x460cc0(0x1ff)][_0x460cc0(0x280)](apiConditionToYaml),_0x1761eb=_0xd389bf[_0x460cc0(0x232)]!==undefined;if(_0x38dd7e[_0x460cc0(0x23d)]===0x1&&!_0x1761eb)return _0x38dd7e[0x0];return{'type':_0xd389bf[_0x460cc0(0x279)],'conditions':_0x38dd7e,..._0xd389bf['description']!==undefined&&{'description':_0xd389bf[_0x460cc0(0x232)]}};}}if(_0xd389bf['type']==='Value'&&_0xd389bf[_0x460cc0(0x290)]&&_0xd389bf[_0x460cc0(0x271)]){const _0x1039ad=_0xd389bf['leftValue'][_0x460cc0(0x204)]?buildAggregationDefFromApi(_0xd389bf[_0x460cc0(0x290)][_0x460cc0(0x204)]):undefined;if(isBehaviorApiCondition(_0xd389bf)){const _0x2a33c4=_0xd389bf[_0x460cc0(0x290)][_0x460cc0(0x1ee)][_0x460cc0(0x227)];return{'type':_0x460cc0(0x26e),'attribute':'','operator':apiOperatorToYaml(_0xd389bf[_0x460cc0(0x271)]),..._0xd389bf[_0x460cc0(0x291)]&&_0xd389bf['arrayMatching']!==_0x460cc0(0x25a)?{'arrayMatching':_0xd389bf[_0x460cc0(0x291)]}:{},..._0xd389bf['exclude']?{'exclude':_0xd389bf['exclude']}:{},..._0x1039ad?{'aggregation':_0x1039ad}:{},'source':_0x2a33c4,..._0xd389bf[_0x460cc0(0x290)][_0x460cc0(0x1e9)]?{'filter':apiRuleToYaml(_0xd389bf[_0x460cc0(0x290)][_0x460cc0(0x1e9)])}:{},..._0xd389bf[_0x460cc0(0x242)]!==undefined&&_0xd389bf[_0x460cc0(0x242)]!==null?{'limit':_0xd389bf[_0x460cc0(0x242)]}:{}};}return{'type':_0x460cc0(0x233),'attribute':_0xd389bf[_0x460cc0(0x290)][_0x460cc0(0x227)]||'','operator':apiOperatorToYaml(_0xd389bf['operator']),..._0xd389bf[_0x460cc0(0x291)]&&_0xd389bf[_0x460cc0(0x291)]!==_0x460cc0(0x25a)?{'arrayMatching':_0xd389bf[_0x460cc0(0x291)]}:{},..._0xd389bf['exclude']?{'exclude':_0xd389bf['exclude']}:{},..._0x1039ad?{'aggregation':_0x1039ad}:{},..._0xd389bf[_0x460cc0(0x290)][_0x460cc0(0x1e9)]?{'filter':apiRuleToYaml(_0xd389bf[_0x460cc0(0x290)][_0x460cc0(0x1e9)])}:{},..._0xd389bf[_0x460cc0(0x242)]!==undefined&&_0xd389bf[_0x460cc0(0x242)]!==null?{'limit':_0xd389bf['limit']}:{}};}if(_0xd389bf[_0x460cc0(0x279)]==='Column'&&_0xd389bf[_0x460cc0(0x24c)]&&_0xd389bf['operator'])return{'type':_0x460cc0(0x27b),'column':_0xd389bf[_0x460cc0(0x24c)],'operator':apiOperatorToYaml(_0xd389bf[_0x460cc0(0x271)])};if(_0xd389bf[_0x460cc0(0x279)]==='Reference'&&_0xd389bf['id'])return{'type':_0xd389bf[_0x460cc0(0x267)]?_0x460cc0(0x267):'include','segment':_0xd389bf['id']};return{'type':_0x460cc0(0x260),'conditions':[]};}function isTemporalOperator(_0x40e0f8){const _0x42a824=a142_0x18a3a1;return _0x40e0f8===_0x42a824(0x25c)||_0x40e0f8===_0x42a824(0x294);}function isBetweenOperator(_0x466e8b){return _0x466e8b==='Between';}function getEffectiveValue(_0x312a1c){const _0x146569=a142_0x18a3a1,_0x11b716=_0x312a1c[_0x146569(0x248)];return _0x312a1c[_0x146569(0x22b)]??_0x11b716;}function parseNumericValue(_0x5c2287){const _0x51eaea=a142_0x18a3a1;if(typeof _0x5c2287==='object'&&_0x5c2287!==null)return _0x5c2287;if(_0x5c2287==='')return _0x5c2287;const _0x263acd=Number(_0x5c2287);return Number[_0x51eaea(0x252)](_0x263acd)?_0x263acd:_0x5c2287;}function apiOperatorToYaml(_0x5d2c3b){const _0x3356c1=a142_0x18a3a1;if(isBetweenOperator(_0x5d2c3b[_0x3356c1(0x279)]))return{'type':mapApiOperatorType(_0x5d2c3b['type']),..._0x5d2c3b['not']!==undefined&&{'not':_0x5d2c3b[_0x3356c1(0x293)]},..._0x5d2c3b[_0x3356c1(0x285)]!==undefined&&{'min':parseNumericValue(_0x5d2c3b[_0x3356c1(0x285)])},..._0x5d2c3b[_0x3356c1(0x239)]!==undefined&&{'max':parseNumericValue(_0x5d2c3b[_0x3356c1(0x239)])}};if(_0x5d2c3b[_0x3356c1(0x279)]===_0x3356c1(0x277))return{'type':_0x3356c1(0x277),..._0x5d2c3b['not']!==undefined&&{'not':_0x5d2c3b['not']},..._0x5d2c3b['duration']!==undefined&&{'duration':_0x5d2c3b[_0x3356c1(0x274)]},..._0x5d2c3b[_0x3356c1(0x222)]!==undefined&&{'from':_0x5d2c3b[_0x3356c1(0x222)]},..._0x5d2c3b[_0x3356c1(0x1ec)]!==undefined&&{'reverse':_0x5d2c3b['reverse']}};let _0x2a7f6e;if(_0x5d2c3b[_0x3356c1(0x225)]&&_0x5d2c3b[_0x3356c1(0x225)][_0x3356c1(0x23d)]>0x0)_0x2a7f6e=_0x5d2c3b[_0x3356c1(0x225)];else{if(_0x5d2c3b[_0x3356c1(0x24b)]!==undefined)_0x2a7f6e=_0x5d2c3b[_0x3356c1(0x24b)];else isTemporalOperator(_0x5d2c3b[_0x3356c1(0x279)])&&_0x5d2c3b['value']!==undefined&&(_0x2a7f6e=_0x5d2c3b['value']);}return{'type':mapApiOperatorType(_0x5d2c3b[_0x3356c1(0x279)]),..._0x5d2c3b['not']!==undefined&&{'not':_0x5d2c3b[_0x3356c1(0x293)]},..._0x2a7f6e!==undefined&&{'value':_0x2a7f6e},..._0x5d2c3b[_0x3356c1(0x287)]!==undefined&&{'unit':_0x5d2c3b[_0x3356c1(0x287)]}};}function mapApiOperatorType(_0x420329){return _0x420329;}export function segmentDefToCreateRequest(_0x96ba25,_0x1cbcf5){const _0x28a9e6=a142_0x18a3a1,_0x4d560f={'name':_0x96ba25[_0x28a9e6(0x227)]};return _0x96ba25[_0x28a9e6(0x232)]&&(_0x4d560f[_0x28a9e6(0x232)]=_0x96ba25[_0x28a9e6(0x232)]),_0x96ba25[_0x28a9e6(0x213)]&&(_0x4d560f[_0x28a9e6(0x213)]=yamlRuleToApi(_0x96ba25[_0x28a9e6(0x213)])),_0x96ba25[_0x28a9e6(0x286)]&&(_0x4d560f[_0x28a9e6(0x286)]=_0x96ba25[_0x28a9e6(0x286)]===_0x28a9e6(0x1ed)?0x0:_0x96ba25[_0x28a9e6(0x286)]===_0x28a9e6(0x264)?0x1:0x2),_0x96ba25[_0x28a9e6(0x263)]!==undefined&&(_0x4d560f[_0x28a9e6(0x26b)]=_0x96ba25[_0x28a9e6(0x263)]),_0x1cbcf5&&(_0x4d560f[_0x28a9e6(0x205)]=_0x1cbcf5),_0x4d560f;}export function segmentDefToUpdateRequest(_0x257a35){const _0x39cd3e=a142_0x18a3a1,_0x54488a={'name':_0x257a35['name']};return _0x257a35[_0x39cd3e(0x232)]!==undefined&&(_0x54488a[_0x39cd3e(0x232)]=_0x257a35[_0x39cd3e(0x232)]),_0x257a35[_0x39cd3e(0x213)]&&(_0x54488a[_0x39cd3e(0x213)]=yamlRuleToApi(_0x257a35[_0x39cd3e(0x213)])),_0x257a35[_0x39cd3e(0x286)]&&(_0x54488a[_0x39cd3e(0x286)]=_0x257a35[_0x39cd3e(0x286)]==='batch'?0x0:_0x257a35['kind']===_0x39cd3e(0x264)?0x1:0x2),_0x54488a;}export function yamlRuleToApi(_0x2d1f0a){const _0x62e216=a142_0x18a3a1,_0x53086c=_0x2d1f0a[_0x62e216(0x1ff)][_0x62e216(0x280)](yamlConditionToApi),_0x2c3aac=_0x53086c[_0x62e216(0x28c)](_0xcab24=>isCompositeType(_0xcab24)&&_0xcab24['description']!==undefined);if(!_0x2c3aac&&_0x53086c[_0x62e216(0x23d)]>0x0){const _0xba0e28=[];for(const _0x5204a2 of _0x53086c){isCompositeType(_0x5204a2)&&_0x5204a2[_0x62e216(0x232)]===undefined&&_0x5204a2[_0x62e216(0x1ff)]&&_0x5204a2[_0x62e216(0x1ff)][_0x62e216(0x28c)](_0x25643f=>!isCompositeType(_0x25643f))?_0xba0e28[_0x62e216(0x20c)]({'type':_0x5204a2['type'],'description':'','conditions':_0x5204a2[_0x62e216(0x1ff)]}):_0xba0e28[_0x62e216(0x20c)]({'type':_0x62e216(0x260),'description':_0x2d1f0a[_0x62e216(0x232)]||'','conditions':[_0x5204a2]});}return{'type':_0x2d1f0a[_0x62e216(0x279)],'conditions':_0xba0e28};}return{'type':_0x2d1f0a[_0x62e216(0x279)],'conditions':_0x53086c,..._0x2d1f0a['description']&&{'description':_0x2d1f0a[_0x62e216(0x232)]}};}function yamlFilterRuleToApi(_0x7863fb){const _0x13a643=a142_0x18a3a1,_0x2aa23f=_0x7863fb['conditions'][_0x13a643(0x280)](yamlConditionToApi);return{'type':_0x7863fb['type'],'conditions':_0x2aa23f};}function yamlConditionToApi(_0x428dfe){const _0x3592b1=a142_0x18a3a1;if(_0x3592b1(0x1e5)in _0x428dfe&&(_0x428dfe[_0x3592b1(0x279)]===_0x3592b1(0x24f)||_0x428dfe['type']===_0x3592b1(0x267))){const _0x503c34=_0x428dfe;return{'type':_0x3592b1(0x1eb),'id':_0x503c34[_0x3592b1(0x1e5)],'exclude':_0x503c34[_0x3592b1(0x279)]===_0x3592b1(0x267)};}if(_0x428dfe[_0x3592b1(0x279)]===_0x3592b1(0x260)||_0x428dfe[_0x3592b1(0x279)]==='Or'){const _0x256cc1=_0x428dfe;return{'type':_0x256cc1[_0x3592b1(0x279)],'conditions':_0x256cc1[_0x3592b1(0x1ff)][_0x3592b1(0x280)](yamlConditionToApi),..._0x256cc1['description']&&{'description':_0x256cc1[_0x3592b1(0x232)]}};}if('column'in _0x428dfe&&_0x428dfe[_0x3592b1(0x279)]===_0x3592b1(0x27b)){const _0x2ba1bb=_0x428dfe;return{'type':_0x3592b1(0x27b),'column':_0x2ba1bb['column'],'operator':yamlOperatorToApi(_0x2ba1bb[_0x3592b1(0x271)])};}const _0x3368eb=_0x428dfe,_0x4980e3={'type':_0x3592b1(0x233),'leftValue':buildLeftValue(_0x3368eb),'operator':yamlOperatorToApi(_0x3368eb[_0x3592b1(0x271)]),'exclude':_0x3368eb[_0x3592b1(0x267)]??![],'arrayMatching':_0x3368eb[_0x3592b1(0x291)]??_0x3592b1(0x25a)};return _0x3368eb[_0x3592b1(0x242)]!==undefined&&(_0x4980e3['limit']=_0x3368eb[_0x3592b1(0x242)]),_0x4980e3;}function buildAggregationDefFromApi(_0x572de2){const _0x1044f3=a142_0x18a3a1,_0x311730=_0x572de2[_0x1044f3(0x279)];if(_0x311730==='CountDistinct')return{'type':_0x311730,'columns':_0x572de2[_0x1044f3(0x283)]??[]};if(_0x311730===_0x1044f3(0x28d)||_0x311730===_0x1044f3(0x295))return{'type':_0x311730,'column':_0x572de2['column']??'','orderColumn':_0x572de2[_0x1044f3(0x22a)]??'',..._0x572de2['groupingColumns']&&{'groupingColumns':_0x572de2[_0x1044f3(0x218)]}};if(_0x311730===_0x1044f3(0x1e6))return{'type':_0x311730,..._0x572de2[_0x1044f3(0x218)]&&{'groupingColumns':_0x572de2[_0x1044f3(0x218)]}};return{'type':_0x311730,'column':_0x572de2[_0x1044f3(0x24c)]??'',..._0x572de2[_0x1044f3(0x218)]&&{'groupingColumns':_0x572de2['groupingColumns']}};}function buildLeftValue(_0x1b2e48){const _0x14944a=a142_0x18a3a1,_0x2910a5={};_0x1b2e48[_0x14944a(0x1fc)]&&_0x1b2e48[_0x14944a(0x279)]!==_0x14944a(0x26e)&&(_0x2910a5[_0x14944a(0x227)]=_0x1b2e48[_0x14944a(0x1fc)]);if(_0x1b2e48[_0x14944a(0x204)]){const _0xe6cf89=_0x1b2e48['aggregation'];if(_0xe6cf89[_0x14944a(0x279)]===_0x14944a(0x265))_0x2910a5['aggregation']={'type':_0x14944a(0x265),'columns':_0xe6cf89[_0x14944a(0x283)]};else{if(_0xe6cf89['type']===_0x14944a(0x28d)||_0xe6cf89['type']===_0x14944a(0x295))_0x2910a5['aggregation']={'type':_0xe6cf89[_0x14944a(0x279)],'column':_0xe6cf89['column'],'orderColumn':_0xe6cf89['orderColumn'],..._0xe6cf89[_0x14944a(0x218)]&&{'groupingColumns':_0xe6cf89[_0x14944a(0x218)]}};else _0xe6cf89['type']===_0x14944a(0x1e6)?_0x2910a5[_0x14944a(0x204)]={'type':_0x14944a(0x1e6),..._0xe6cf89[_0x14944a(0x218)]&&{'groupingColumns':_0xe6cf89['groupingColumns']}}:_0x2910a5['aggregation']={'type':_0xe6cf89[_0x14944a(0x279)],'column':_0xe6cf89[_0x14944a(0x24c)],..._0xe6cf89[_0x14944a(0x218)]&&{'groupingColumns':_0xe6cf89[_0x14944a(0x218)]}};}}return _0x1b2e48[_0x14944a(0x1ee)]&&(_0x2910a5[_0x14944a(0x1ee)]={'name':_0x1b2e48[_0x14944a(0x1ee)]}),_0x1b2e48[_0x14944a(0x1e9)]&&(_0x2910a5[_0x14944a(0x1e9)]=yamlFilterRuleToApi(filterRuleAsRuleDef(_0x1b2e48[_0x14944a(0x1e9)]))),_0x2910a5;}function yamlOperatorToApi(_0x18cb82){const _0x5d1284=a142_0x18a3a1,_0x2717b2={'type':mapYamlOperatorType(_0x18cb82[_0x5d1284(0x279)]),'not':_0x18cb82['not']??![]};if(isBetweenOperator(_0x18cb82['type']))return _0x18cb82[_0x5d1284(0x21d)]!==undefined&&(_0x2717b2[_0x5d1284(0x285)]=typeof _0x18cb82[_0x5d1284(0x21d)]==='object'?_0x18cb82[_0x5d1284(0x21d)]:String(_0x18cb82[_0x5d1284(0x21d)])),_0x18cb82[_0x5d1284(0x23c)]!==undefined&&(_0x2717b2[_0x5d1284(0x239)]=typeof _0x18cb82[_0x5d1284(0x23c)]===_0x5d1284(0x20d)?_0x18cb82['max']:String(_0x18cb82[_0x5d1284(0x23c)])),_0x2717b2;if(_0x18cb82[_0x5d1284(0x279)]===_0x5d1284(0x277))return _0x18cb82[_0x5d1284(0x274)]&&(_0x2717b2[_0x5d1284(0x274)]=_0x18cb82['duration']),_0x18cb82[_0x5d1284(0x222)]&&(_0x2717b2[_0x5d1284(0x222)]=_0x18cb82[_0x5d1284(0x222)]),_0x18cb82['reverse']!==undefined&&(_0x2717b2['reverse']=_0x18cb82[_0x5d1284(0x1ec)]),_0x2717b2;const _0x4c2259=getEffectiveValue(_0x18cb82);if(_0x4c2259!==undefined){if(Array[_0x5d1284(0x21f)](_0x4c2259))_0x2717b2[_0x5d1284(0x225)]=_0x4c2259;else isTemporalOperator(_0x18cb82[_0x5d1284(0x279)])?_0x2717b2[_0x5d1284(0x22b)]=_0x4c2259:_0x2717b2[_0x5d1284(0x24b)]=_0x4c2259;}return _0x18cb82[_0x5d1284(0x287)]&&(_0x2717b2[_0x5d1284(0x287)]=_0x18cb82[_0x5d1284(0x287)]),_0x2717b2;}function mapYamlOperatorType(_0x1e2204){return _0x1e2204;}export function toYamlString(_0x5d9c4){const _0x58ec38=a142_0x18a3a1,_0x3e31aa=JSON[_0x58ec38(0x216)](JSON[_0x58ec38(0x28f)](_0x5d9c4)),_0x116570=a142_0x37127f[_0x58ec38(0x28f)](_0x3e31aa,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x58ec38(0x1f2)}),_0x951e21=[_0x58ec38(0x243)];let _0x5b1216=_0x116570;for(const _0x1ad8bc of _0x951e21){_0x5b1216=_0x5b1216['replace'](new RegExp('^('+_0x1ad8bc+')','m'),(_0x297438,_0x5d77f2,_0x3a9e6b)=>{if(_0x3a9e6b===0x0||_0x5b1216[_0x3a9e6b-0x1]==='\x0a'&&_0x5b1216[_0x3a9e6b-0x2]==='\x0a')return _0x5d77f2;return'\x0a'+_0x5d77f2;});}return _0x5b1216;}function a142_0x533f(_0x370d35,_0x1eaee1){_0x370d35=_0x370d35-0x1e5;const _0x1ed3b9=a142_0x1ed3();let _0x533ff1=_0x1ed3b9[_0x370d35];return _0x533ff1;}export function parseYamlString(_0x15839b){return parseSegmentYamlFile(_0x15839b);}export function isSegmentYaml(_0x3c4458){const _0x40f2ed=a142_0x18a3a1;if(typeof _0x3c4458!==_0x40f2ed(0x20d)||_0x3c4458===null)return![];const _0x2826a5=_0x3c4458;return _0x2826a5['type']===_0x40f2ed(0x1e5)||_0x2826a5[_0x40f2ed(0x279)]===undefined;}export function generateTemplate(_0x28db8e=a142_0x18a3a1(0x215)){const _0x31a2f9=a142_0x18a3a1,_0x5e9960={'type':_0x31a2f9(0x1e5),'name':_0x28db8e,'description':'Segment\x20description','rule':{'type':'And','conditions':[{'type':_0x31a2f9(0x233),'attribute':_0x31a2f9(0x256),'operator':{'type':_0x31a2f9(0x253),'value':_0x31a2f9(0x22b)}}]}};return toYamlString(_0x5e9960);}export function segmentToYamlString(_0x3046e8){const _0x3e78ec=a142_0x18a3a1,_0x101144=JSON[_0x3e78ec(0x216)](JSON['stringify'](_0x3046e8)),_0x23b96e=a142_0x37127f[_0x3e78ec(0x28f)](_0x101144,{'indent':0x2,'lineWidth':0x0,'nullStr':'null'}),_0x15423d=[_0x3e78ec(0x243),_0x3e78ec(0x200)];let _0xb1bd8b=_0x23b96e;for(const _0x1c2da4 of _0x15423d){_0xb1bd8b=_0xb1bd8b[_0x3e78ec(0x1ef)](new RegExp('^('+_0x1c2da4+')','m'),(_0x86c43a,_0x5837d4,_0x45220e)=>{if(_0x45220e===0x0||_0xb1bd8b[_0x45220e-0x1]==='\x0a'&&_0xb1bd8b[_0x45220e-0x2]==='\x0a')return _0x5837d4;return'\x0a'+_0x5837d4;});}return _0xb1bd8b;}export function parseSegmentYamlFile(_0x4af475){return safeParseYaml(_0x4af475,SegmentDefSchema);}export function normalizeChildSegmentYaml(_0x5df844){const _0x3398b3=a142_0x18a3a1;return{'type':_0x3398b3(0x1e5),'name':_0x5df844[_0x3398b3(0x227)],..._0x5df844['description']!==undefined&&{'description':_0x5df844[_0x3398b3(0x232)]},..._0x5df844['folder']!==undefined&&{'folder':_0x5df844[_0x3398b3(0x228)]},..._0x5df844[_0x3398b3(0x213)]&&{'rule':normalizeRule(_0x5df844[_0x3398b3(0x213)])},..._0x5df844['kind']!==undefined&&{'kind':_0x5df844['kind']},..._0x5df844[_0x3398b3(0x263)]!==undefined&&{'visible':_0x5df844[_0x3398b3(0x263)]},..._0x5df844['activations']&&{'activations':_0x5df844[_0x3398b3(0x23b)][_0x3398b3(0x280)](normalizeActivation)}};}export function normalizeRule(_0x38a136){const _0x5aa769=a142_0x18a3a1;return{'type':_0x38a136[_0x5aa769(0x279)],'conditions':_0x38a136[_0x5aa769(0x1ff)][_0x5aa769(0x280)](normalizeCondition),..._0x38a136['description']!==undefined&&{'description':_0x38a136['description']}};}function normalizeCondition(_0x310c0d){const _0x5cb13e=a142_0x18a3a1;if(_0x5cb13e(0x1e5)in _0x310c0d&&(_0x310c0d[_0x5cb13e(0x279)]===_0x5cb13e(0x24f)||_0x310c0d['type']===_0x5cb13e(0x267))){const _0x1cbef1=_0x310c0d;return{'type':_0x1cbef1['type'],'segment':_0x1cbef1['segment']};}if(_0x310c0d[_0x5cb13e(0x279)]===_0x5cb13e(0x260)||_0x310c0d[_0x5cb13e(0x279)]==='Or'){const _0x318fdd=_0x310c0d;return{'type':_0x318fdd[_0x5cb13e(0x279)],'conditions':_0x318fdd['conditions']['map'](normalizeCondition),..._0x318fdd['description']!==undefined&&{'description':_0x318fdd[_0x5cb13e(0x232)]}};}if(_0x5cb13e(0x24c)in _0x310c0d&&_0x310c0d[_0x5cb13e(0x279)]===_0x5cb13e(0x27b)){const _0xad1ff1=_0x310c0d;return{'type':_0x5cb13e(0x27b),'column':_0xad1ff1[_0x5cb13e(0x24c)],'operator':normalizeOperator(_0xad1ff1[_0x5cb13e(0x271)])};}if(_0x310c0d[_0x5cb13e(0x279)]===_0x5cb13e(0x26e)){const _0x3ebd46=_0x310c0d;return{'type':_0x5cb13e(0x26e),'attribute':_0x3ebd46['attribute'],'operator':normalizeOperator(_0x3ebd46[_0x5cb13e(0x271)]),..._0x3ebd46[_0x5cb13e(0x291)]!==undefined&&{'arrayMatching':_0x3ebd46['arrayMatching']},..._0x3ebd46['exclude']!==undefined&&{'exclude':_0x3ebd46[_0x5cb13e(0x267)]},..._0x3ebd46[_0x5cb13e(0x204)]!==undefined&&{'aggregation':_0x3ebd46['aggregation']},..._0x3ebd46['source']!==undefined&&{'source':_0x3ebd46[_0x5cb13e(0x1ee)]},..._0x3ebd46[_0x5cb13e(0x1e9)]!==undefined&&{'filter':ruleDefAsFilterRule(normalizeRule(filterRuleAsRuleDef(_0x3ebd46[_0x5cb13e(0x1e9)])))},..._0x3ebd46['timeWindow']!==undefined&&{'timeWindow':_0x3ebd46[_0x5cb13e(0x299)]},..._0x3ebd46[_0x5cb13e(0x242)]!==undefined&&{'limit':_0x3ebd46['limit']}};}const _0x262487=_0x310c0d;return{'type':_0x5cb13e(0x233),'attribute':_0x262487['attribute'],'operator':normalizeOperator(_0x262487['operator']),..._0x262487[_0x5cb13e(0x291)]!==undefined&&{'arrayMatching':_0x262487['arrayMatching']},..._0x262487[_0x5cb13e(0x267)]!==undefined&&{'exclude':_0x262487['exclude']},..._0x262487['aggregation']!==undefined&&{'aggregation':_0x262487[_0x5cb13e(0x204)]},..._0x262487['source']!==undefined&&{'source':_0x262487[_0x5cb13e(0x1ee)]},..._0x262487[_0x5cb13e(0x1e9)]!==undefined&&{'filter':ruleDefAsFilterRule(normalizeRule(filterRuleAsRuleDef(_0x262487[_0x5cb13e(0x1e9)])))},..._0x262487[_0x5cb13e(0x242)]!==undefined&&{'limit':_0x262487[_0x5cb13e(0x242)]}};}function normalizeOperator(_0x49675f){const _0x3bbfeb=a142_0x18a3a1;if(isBetweenOperator(_0x49675f[_0x3bbfeb(0x279)]))return{'type':_0x49675f['type'],..._0x49675f[_0x3bbfeb(0x293)]!==undefined&&{'not':_0x49675f['not']},..._0x49675f[_0x3bbfeb(0x21d)]!==undefined&&{'min':_0x49675f[_0x3bbfeb(0x21d)]},..._0x49675f[_0x3bbfeb(0x23c)]!==undefined&&{'max':_0x49675f['max']}};const _0x2791e8=getEffectiveValue(_0x49675f);return{'type':_0x49675f[_0x3bbfeb(0x279)],..._0x49675f[_0x3bbfeb(0x293)]!==undefined&&{'not':_0x49675f[_0x3bbfeb(0x293)]},..._0x2791e8!==undefined&&{'value':_0x2791e8},..._0x49675f[_0x3bbfeb(0x287)]!==undefined&&{'unit':_0x49675f[_0x3bbfeb(0x287)]},..._0x49675f[_0x3bbfeb(0x274)]!==undefined&&{'duration':_0x49675f['duration']},..._0x49675f[_0x3bbfeb(0x222)]!==undefined&&{'from':_0x49675f[_0x3bbfeb(0x222)]},..._0x49675f['reverse']!==undefined&&{'reverse':_0x49675f[_0x3bbfeb(0x1ec)]}};}function normalizeActivation(_0x1b9dcf){const _0x5b3af4=a142_0x18a3a1;return{'name':_0x1b9dcf['name'],'connection':_0x1b9dcf[_0x5b3af4(0x210)],..._0x1b9dcf['description']!==undefined&&{'description':_0x1b9dcf[_0x5b3af4(0x232)]},..._0x1b9dcf[_0x5b3af4(0x259)]!==undefined&&{'all_columns':_0x1b9dcf[_0x5b3af4(0x259)]},..._0x1b9dcf['columns']!==undefined&&{'columns':_0x1b9dcf[_0x5b3af4(0x283)]},..._0x1b9dcf[_0x5b3af4(0x212)]!==undefined&&{'behavior':_0x1b9dcf['behavior']},..._0x1b9dcf[_0x5b3af4(0x1ea)]!==undefined&&{'schedule':_0x1b9dcf[_0x5b3af4(0x1ea)]},..._0x1b9dcf[_0x5b3af4(0x23e)]!==undefined&&{'notification':_0x1b9dcf[_0x5b3af4(0x23e)]},..._0x1b9dcf[_0x5b3af4(0x1f5)]!==undefined&&{'connector_config':_0x1b9dcf[_0x5b3af4(0x1f5)]},..._0x1b9dcf[_0x5b3af4(0x214)]!==undefined&&{'activation_template_id':_0x1b9dcf[_0x5b3af4(0x214)]},..._0x1b9dcf[_0x5b3af4(0x27f)]!==undefined&&{'nested_workflow_project_name':_0x1b9dcf[_0x5b3af4(0x27f)]},..._0x1b9dcf['nested_workflow_name']!==undefined&&{'nested_workflow_name':_0x1b9dcf[_0x5b3af4(0x1e8)]},..._0x1b9dcf[_0x5b3af4(0x219)]!==undefined&&{'lock_enabled':_0x1b9dcf[_0x5b3af4(0x219)]}};}function getColumnName(_0x5ededa){const _0xcbfdad=a142_0x18a3a1;return _0x5ededa[_0xcbfdad(0x24c)]||_0x5ededa[_0xcbfdad(0x227)];}export function activationResponseToDef(_0x371fe8,_0x3b88de,_0x5f86d5){const _0x130629=a142_0x18a3a1,_0x2624d9=_0x371fe8[_0x130629(0x1f3)]||'',_0x23f63a=_0x5f86d5?.['get'](_0x2624d9)??_0x2624d9,_0x3e6dbe={'name':_0x371fe8[_0x130629(0x227)],'connection':_0x23f63a};_0x371fe8[_0x130629(0x232)]&&(_0x3e6dbe['description']=_0x371fe8[_0x130629(0x232)]);let _0x424b74=[];_0x371fe8[_0x130629(0x283)]&&_0x371fe8['columns'][_0x130629(0x23d)]>0x0&&(_0x424b74=_0x371fe8[_0x130629(0x283)]['filter'](_0x5536a5=>_0x5536a5&&getColumnName(_0x5536a5))[_0x130629(0x280)](_0x488620=>{const _0x2fa4d5=_0x130629,_0x261fb9=getColumnName(_0x488620);if(_0x488620[_0x2fa4d5(0x279)]||_0x488620[_0x2fa4d5(0x211)])return{'name':_0x261fb9,..._0x488620[_0x2fa4d5(0x279)]&&{'type':_0x488620[_0x2fa4d5(0x279)]},..._0x488620[_0x2fa4d5(0x211)]&&{'visibility':_0x488620[_0x2fa4d5(0x211)]}};return _0x261fb9;}));_0x424b74[_0x130629(0x23d)]>0x0&&(_0x3e6dbe['columns']=_0x424b74);_0x371fe8[_0x130629(0x22f)]!==undefined&&(_0x371fe8[_0x130629(0x22f)]===![]&&_0x424b74['length']===0x0?_0x3e6dbe[_0x130629(0x259)]=!![]:_0x3e6dbe[_0x130629(0x259)]=_0x371fe8[_0x130629(0x22f)]);const _0x88b7f7={};let _0x201db6=![];_0x371fe8[_0x130629(0x272)]&&(_0x88b7f7[_0x130629(0x279)]=_0x371fe8[_0x130629(0x272)],_0x201db6=!![]);_0x371fe8['repeatUnit']&&(_0x88b7f7[_0x130629(0x25e)]=_0x371fe8[_0x130629(0x21c)],_0x201db6=!![]);_0x371fe8[_0x130629(0x1e7)]!==undefined&&_0x371fe8[_0x130629(0x1e7)]!==null&&(_0x88b7f7[_0x130629(0x238)]=_0x371fe8['repeatFrequency'],_0x201db6=!![]);_0x371fe8[_0x130629(0x292)]&&_0x371fe8['repeatSubFrequency'][_0x130629(0x23d)]>0x0&&(_0x88b7f7[_0x130629(0x201)]=_0x371fe8['repeatSubFrequency'],_0x201db6=!![]);_0x371fe8['startAt']!==undefined&&(_0x88b7f7['start_at']=_0x371fe8['startAt'],_0x201db6=!![]);_0x371fe8[_0x130629(0x1f6)]!==undefined&&(_0x88b7f7[_0x130629(0x235)]=_0x371fe8[_0x130629(0x1f6)],_0x201db6=!![]);_0x371fe8[_0x130629(0x25f)]&&(_0x88b7f7['timezone']=_0x371fe8[_0x130629(0x25f)],_0x201db6=!![]);_0x201db6&&(_0x3e6dbe['schedule']=_0x88b7f7);(_0x371fe8['notifyOn']&&_0x371fe8[_0x130629(0x22d)][_0x130629(0x23d)]>0x0||_0x371fe8[_0x130629(0x284)]&&_0x371fe8['emailRecipients']['length']>0x0)&&(_0x3e6dbe['notification']={},_0x371fe8[_0x130629(0x22d)]&&_0x371fe8[_0x130629(0x22d)][_0x130629(0x23d)]>0x0&&(_0x3e6dbe[_0x130629(0x23e)][_0x130629(0x241)]=_0x371fe8[_0x130629(0x22d)]),_0x371fe8['emailRecipients']&&_0x371fe8[_0x130629(0x284)][_0x130629(0x23d)]>0x0&&(_0x3e6dbe[_0x130629(0x23e)][_0x130629(0x270)]=_0x371fe8[_0x130629(0x284)]['map'](_0x52f6b2=>{const _0x27bca4=_0x130629,_0x3f4315=_0x3b88de?.[_0x27bca4(0x24d)](_0x52f6b2);return _0x3f4315??String(_0x52f6b2);})));_0x371fe8[_0x130629(0x27a)]&&Object[_0x130629(0x23f)](_0x371fe8[_0x130629(0x27a)])[_0x130629(0x23d)]>0x0&&(_0x3e6dbe['connector_config']=normalizeConnectorConfigForYaml(_0x371fe8[_0x130629(0x27a)]));_0x371fe8[_0x130629(0x28a)]&&(_0x3e6dbe['activation_template_id']=_0x371fe8['activationTemplateId']);if(_0x371fe8['syndicationBehavior']){const _0x4b4c0c={},_0x196c14=_0x371fe8[_0x130629(0x23a)];_0x196c14[_0x130629(0x283)]&&_0x196c14[_0x130629(0x283)][_0x130629(0x23d)]>0x0&&(_0x4b4c0c[_0x130629(0x283)]=_0x196c14['columns'][_0x130629(0x1e9)](_0x2b71a7=>_0x2b71a7&&getColumnName(_0x2b71a7))[_0x130629(0x280)](_0x4c200f=>({'name':getColumnName(_0x4c200f),..._0x4c200f['type']&&{'type':_0x4c200f[_0x130629(0x279)]},..._0x4c200f[_0x130629(0x211)]&&{'visibility':_0x4c200f[_0x130629(0x211)]}}))),_0x196c14['behaviorTableName']&&(_0x4b4c0c['behavior_table']=_0x196c14[_0x130629(0x1f9)]),_0x196c14[_0x130629(0x244)]!==undefined&&(_0x4b4c0c[_0x130629(0x29b)]=_0x196c14[_0x130629(0x244)]),_0x196c14[_0x130629(0x20b)]&&(_0x4b4c0c[_0x130629(0x28b)]=_0x196c14[_0x130629(0x20b)]),_0x196c14[_0x130629(0x278)]&&(_0x4b4c0c['formatting']=_0x196c14[_0x130629(0x278)]),_0x196c14[_0x130629(0x268)]&&_0x196c14[_0x130629(0x268)][_0x130629(0x23d)]>0x0&&(_0x4b4c0c[_0x130629(0x281)]=_0x196c14[_0x130629(0x268)]),Object['keys'](_0x4b4c0c)[_0x130629(0x23d)]>0x0&&(_0x3e6dbe[_0x130629(0x212)]=_0x4b4c0c);}return _0x371fe8[_0x130629(0x258)]&&(_0x3e6dbe['nested_workflow_project_name']=_0x371fe8['nestedWorkflowProjectName']),_0x371fe8['nestedWorkflowName']&&(_0x3e6dbe[_0x130629(0x1e8)]=_0x371fe8[_0x130629(0x288)]),_0x371fe8[_0x130629(0x21b)]!==undefined&&(_0x3e6dbe[_0x130629(0x219)]=_0x371fe8['lockEnabled']),_0x3e6dbe;}export function journeyActivationStepToYaml(_0x5c91c9,_0x567b63,_0x3592e1){const _0x4f38eb=a142_0x18a3a1,_0x1b3bf1=_0x5c91c9[_0x4f38eb(0x1fa)][_0x4f38eb(0x245)],_0x4d9cf1=_0x1b3bf1[_0x4f38eb(0x1f3)]||'',_0x21c479=_0x3592e1?.[_0x4f38eb(0x24d)](_0x4d9cf1)??_0x4d9cf1,_0x2b03d8={'name':_0x1b3bf1[_0x4f38eb(0x227)]||'','connection':_0x21c479};_0x5c91c9[_0x4f38eb(0x1fa)]['runAfterJourneyRefresh']&&(_0x2b03d8[_0x4f38eb(0x223)]=!![]);_0x1b3bf1[_0x4f38eb(0x232)]&&(_0x2b03d8[_0x4f38eb(0x232)]=_0x1b3bf1['description']);let _0x561716=[];_0x1b3bf1[_0x4f38eb(0x283)]&&_0x1b3bf1[_0x4f38eb(0x283)]['length']>0x0&&(_0x561716=_0x1b3bf1['columns'][_0x4f38eb(0x1e9)](_0x5e69fc=>_0x5e69fc&&getColumnName(_0x5e69fc))['map'](_0x484d09=>{const _0x18983a=_0x4f38eb,_0x4083be=getColumnName(_0x484d09);if(_0x484d09['type']||_0x484d09[_0x18983a(0x211)])return{'name':_0x4083be,..._0x484d09[_0x18983a(0x279)]&&{'type':_0x484d09[_0x18983a(0x279)]},..._0x484d09['visibility']&&{'visibility':_0x484d09[_0x18983a(0x211)]}};return _0x4083be;}));_0x561716['length']>0x0&&(_0x2b03d8[_0x4f38eb(0x283)]=_0x561716);_0x1b3bf1[_0x4f38eb(0x22f)]!==undefined&&(_0x1b3bf1['allColumns']===![]&&_0x561716[_0x4f38eb(0x23d)]===0x0?_0x2b03d8[_0x4f38eb(0x259)]=!![]:_0x2b03d8['all_columns']=_0x1b3bf1[_0x4f38eb(0x22f)]);const _0x19ba36={};let _0x39c995=![];_0x1b3bf1[_0x4f38eb(0x272)]&&(_0x19ba36[_0x4f38eb(0x279)]=_0x1b3bf1[_0x4f38eb(0x272)],_0x39c995=!![]);_0x1b3bf1[_0x4f38eb(0x21c)]&&(_0x19ba36[_0x4f38eb(0x25e)]=_0x1b3bf1[_0x4f38eb(0x21c)],_0x39c995=!![]);_0x1b3bf1[_0x4f38eb(0x1e7)]!==undefined&&_0x1b3bf1[_0x4f38eb(0x1e7)]!==null&&(_0x19ba36[_0x4f38eb(0x238)]=_0x1b3bf1[_0x4f38eb(0x1e7)],_0x39c995=!![]);_0x1b3bf1[_0x4f38eb(0x24e)]!==undefined&&(_0x19ba36[_0x4f38eb(0x273)]=_0x1b3bf1[_0x4f38eb(0x24e)],_0x39c995=!![]);_0x1b3bf1[_0x4f38eb(0x1f6)]!==undefined&&(_0x19ba36[_0x4f38eb(0x235)]=_0x1b3bf1['endOn'],_0x39c995=!![]);_0x1b3bf1[_0x4f38eb(0x25f)]&&(_0x19ba36[_0x4f38eb(0x25f)]=_0x1b3bf1['timezone'],_0x39c995=!![]);_0x39c995&&(_0x2b03d8[_0x4f38eb(0x1ea)]=_0x19ba36);(_0x1b3bf1['notifyOn']&&_0x1b3bf1[_0x4f38eb(0x22d)]['length']>0x0||_0x1b3bf1[_0x4f38eb(0x284)]&&_0x1b3bf1[_0x4f38eb(0x284)]['length']>0x0)&&(_0x2b03d8['notification']={},_0x1b3bf1['notifyOn']&&_0x1b3bf1[_0x4f38eb(0x22d)][_0x4f38eb(0x23d)]>0x0&&(_0x2b03d8[_0x4f38eb(0x23e)]['notify_on']=_0x1b3bf1[_0x4f38eb(0x22d)]),_0x1b3bf1[_0x4f38eb(0x284)]&&_0x1b3bf1[_0x4f38eb(0x284)]['length']>0x0&&(_0x2b03d8[_0x4f38eb(0x23e)][_0x4f38eb(0x270)]=_0x1b3bf1[_0x4f38eb(0x284)][_0x4f38eb(0x280)](_0x20e5ae=>{const _0x2e6bff=_0x4f38eb,_0x28125e=_0x567b63?.[_0x2e6bff(0x24d)](_0x20e5ae);return _0x28125e??String(_0x20e5ae);})));_0x1b3bf1[_0x4f38eb(0x27a)]&&Object['keys'](_0x1b3bf1[_0x4f38eb(0x27a)])[_0x4f38eb(0x23d)]>0x0&&(_0x2b03d8[_0x4f38eb(0x1f5)]=normalizeConnectorConfigForYaml(_0x1b3bf1[_0x4f38eb(0x27a)]));_0x1b3bf1[_0x4f38eb(0x28a)]&&(_0x2b03d8[_0x4f38eb(0x214)]=_0x1b3bf1[_0x4f38eb(0x28a)]);if(_0x1b3bf1[_0x4f38eb(0x23a)]){const _0x542717={},_0x11b8a6=_0x1b3bf1[_0x4f38eb(0x23a)];_0x11b8a6[_0x4f38eb(0x283)]&&_0x11b8a6[_0x4f38eb(0x283)]['length']>0x0&&(_0x542717[_0x4f38eb(0x283)]=_0x11b8a6[_0x4f38eb(0x283)][_0x4f38eb(0x1e9)](_0x5d7682=>_0x5d7682&&getColumnName(_0x5d7682))[_0x4f38eb(0x280)](_0x5243ff=>({'name':getColumnName(_0x5243ff),..._0x5243ff['type']&&{'type':_0x5243ff[_0x4f38eb(0x279)]},..._0x5243ff[_0x4f38eb(0x211)]&&{'visibility':_0x5243ff[_0x4f38eb(0x211)]}}))),_0x11b8a6[_0x4f38eb(0x1f9)]&&(_0x542717['behavior_table']=_0x11b8a6[_0x4f38eb(0x1f9)]),_0x11b8a6['joinRow']!==undefined&&(_0x542717[_0x4f38eb(0x29b)]=_0x11b8a6['joinRow']),_0x11b8a6[_0x4f38eb(0x20b)]&&(_0x542717[_0x4f38eb(0x28b)]=_0x11b8a6[_0x4f38eb(0x20b)]),_0x11b8a6[_0x4f38eb(0x278)]&&(_0x542717[_0x4f38eb(0x278)]=_0x11b8a6[_0x4f38eb(0x278)]),_0x11b8a6['orderBy']&&_0x11b8a6[_0x4f38eb(0x268)][_0x4f38eb(0x23d)]>0x0&&(_0x542717[_0x4f38eb(0x281)]=_0x11b8a6[_0x4f38eb(0x268)]),Object[_0x4f38eb(0x23f)](_0x542717)['length']>0x0&&(_0x2b03d8[_0x4f38eb(0x212)]=_0x542717);}return _0x2b03d8;}export function segmentWithActivationsToYaml(_0x380666,_0x42bcab,_0x330b98,_0x1a28df,_0x5a59cd){const _0x313eda=a142_0x18a3a1,_0x1886d1=segmentResponseToDefSync(_0x380666,_0x330b98);return _0x42bcab['length']>0x0&&(_0x1886d1['activations']=_0x42bcab[_0x313eda(0x280)](_0x54f12e=>activationResponseToDef(_0x54f12e,_0x1a28df,_0x5a59cd))),_0x1886d1;}function normalizeColumn(_0x3a6c5c){const _0x347c33=a142_0x18a3a1;if(typeof _0x3a6c5c==='string')return{'column':_0x3a6c5c,'source':{'column':_0x3a6c5c}};return{'column':_0x3a6c5c[_0x347c33(0x227)],'source':{'column':_0x3a6c5c['name']},..._0x3a6c5c[_0x347c33(0x279)]&&{'type':_0x3a6c5c['type']},..._0x3a6c5c['visibility']&&{'visibility':_0x3a6c5c[_0x347c33(0x211)]}};}const KNOWN_ACTIVATION_FIELDS=new Set(Object[a142_0x18a3a1(0x23f)](ActivationDefSchema[a142_0x18a3a1(0x202)]));export function warnUnrecognizedActivationFields(_0x583754,_0x20f123){const _0x3fd6f7=a142_0x18a3a1,_0x11ba6b=Object[_0x3fd6f7(0x23f)](_0x583754)['filter'](_0x111c3b=>!KNOWN_ACTIVATION_FIELDS[_0x3fd6f7(0x226)](_0x111c3b));if(_0x11ba6b[_0x3fd6f7(0x23d)]>0x0){const _0x35ee6d=_0x11ba6b['map'](_0x35bac0=>_0x3fd6f7(0x298)+_0x35bac0+'\x22')['join']('\x0a');console[_0x3fd6f7(0x240)](_0x3fd6f7(0x26c)+_0x20f123+'\x22\x20has\x20unrecognized\x20fields\x20(will\x20be\x20ignored):\x0a'+_0x35ee6d);}}export async function activationDefToCreateRequest(_0x2a4864,_0x2aa3e7){const _0x584393=a142_0x18a3a1;warnUnrecognizedActivationFields(_0x2a4864,_0x2a4864[_0x584393(0x227)]);const _0x47b266=_0x2aa3e7?.['emailToIdMap'],_0x147b53=_0x2aa3e7?.[_0x584393(0x25b)],_0x3b76a9=_0x2a4864[_0x584393(0x210)];let _0x3b0e7d;const _0x718e4d=parseInt(_0x3b76a9,0xa);if(!isNaN(_0x718e4d)&&String(_0x718e4d)===_0x3b76a9)_0x3b0e7d=_0x718e4d;else{const _0x1a4d3a=_0x147b53?.['get'](_0x3b76a9);if(_0x1a4d3a===undefined)throw new SDKError(ErrorCode[_0x584393(0x24a)],'Unknown\x20connection:\x20'+_0x3b76a9,undefined,{'helpText':_0x584393(0x22e)});_0x3b0e7d=_0x1a4d3a;}const _0x2cf8f4={'name':_0x2a4864['name'],'connectionId':_0x3b0e7d};_0x2a4864[_0x584393(0x232)]&&(_0x2cf8f4['description']=_0x2a4864[_0x584393(0x232)]);let _0xa47ca3=[];_0x2a4864[_0x584393(0x283)]&&_0x2a4864['columns'][_0x584393(0x23d)]>0x0&&(_0xa47ca3=_0x2a4864[_0x584393(0x283)][_0x584393(0x1e9)](_0x4a0859=>_0x4a0859!=null)[_0x584393(0x280)](normalizeColumn));_0xa47ca3['length']>0x0&&(_0x2cf8f4[_0x584393(0x283)]=_0xa47ca3);_0x2a4864[_0x584393(0x259)]!==undefined&&(_0x2a4864['all_columns']===![]&&_0xa47ca3[_0x584393(0x23d)]===0x0?_0x2cf8f4[_0x584393(0x22f)]=!![]:_0x2cf8f4['allColumns']=_0x2a4864[_0x584393(0x259)]);if(_0x2a4864['schedule']){const _0x3de888=_0x2a4864[_0x584393(0x1ea)],_0x4d2a49=_0x3de888[_0x584393(0x279)]??REPEAT_UNIT_TO_SCHEDULE_TYPE[_0x3de888[_0x584393(0x25e)]];_0x4d2a49&&(_0x2cf8f4[_0x584393(0x272)]=_0x4d2a49);const _0x3c61b7=_0x3de888['repeat_unit']??SCHEDULE_TYPE_TO_REPEAT_UNIT[_0x3de888[_0x584393(0x279)]];_0x3c61b7&&(_0x2cf8f4[_0x584393(0x21c)]=_0x3c61b7);_0x3de888['repeat_frequency']!==undefined&&(_0x2cf8f4[_0x584393(0x1e7)]=_0x3de888[_0x584393(0x238)]);_0x3de888[_0x584393(0x201)]&&(_0x2cf8f4[_0x584393(0x292)]=_0x3de888[_0x584393(0x201)]);_0x3de888[_0x584393(0x273)]!==undefined&&(_0x2cf8f4['startAt']=_0x3de888['start_at']);_0x3de888[_0x584393(0x235)]!==undefined&&(_0x2cf8f4[_0x584393(0x1f6)]=_0x3de888[_0x584393(0x235)]);_0x3de888['timezone']&&(_0x2cf8f4[_0x584393(0x25f)]=_0x3de888['timezone']);if(_0x4d2a49&&_0x4d2a49!==_0x584393(0x217)&&_0x4d2a49!=='cron'&&_0x3de888[_0x584393(0x273)]){const _0xb52973=_0x3de888[_0x584393(0x273)][_0x584393(0x29a)](/T(\d{2}:\d{2})/);_0xb52973&&(_0x2cf8f4[_0x584393(0x1fb)]=_0xb52973[0x1]);}}_0x2a4864[_0x584393(0x23e)]&&(_0x2a4864[_0x584393(0x23e)]['notify_on']&&(_0x2cf8f4[_0x584393(0x22d)]=_0x2a4864[_0x584393(0x23e)][_0x584393(0x241)]),_0x2a4864['notification'][_0x584393(0x270)]&&(_0x2cf8f4[_0x584393(0x284)]=_0x2a4864[_0x584393(0x23e)][_0x584393(0x270)][_0x584393(0x280)](_0x2a9926=>{const _0x2d3a27=_0x584393,_0x1904bb=Number(_0x2a9926);if(!isNaN(_0x1904bb)&&String(_0x1904bb)===_0x2a9926)return _0x1904bb;const _0xd89944=_0x47b266?.[_0x2d3a27(0x24d)](_0x2a9926['toLowerCase']());if(_0xd89944===undefined)throw new SDKError(ErrorCode[_0x2d3a27(0x203)],_0x2d3a27(0x231)+_0x2a9926+_0x2d3a27(0x1f0));return _0xd89944;})));if(_0x2a4864[_0x584393(0x1f5)]){const _0x3d33d1=_0x2aa3e7?.['connectionNameToTypeMap']?.['get'](_0x3b76a9);if(_0x3d33d1&&_0x2aa3e7?.[_0x584393(0x26a)])try{const _0x2dbe06=await _0x2aa3e7[_0x584393(0x26a)](_0x3d33d1),_0x352530=validateConnectorConfig(_0x2a4864['connector_config'],_0x2dbe06);if(!_0x352530[_0x584393(0x220)])throw new SDKError(ErrorCode['CONNECTOR_INVALID_CONFIG'],_0x584393(0x234)+_0x2a4864[_0x584393(0x227)]+_0x584393(0x276)+formatValidationErrors(_0x352530[_0x584393(0x247)]),undefined,{'helpText':_0x584393(0x229)+_0x3d33d1+'\x0a\x0aAvailable\x20fields:\x0a'+formatSchemaAsHelp(_0x2dbe06)});if(_0x352530[_0x584393(0x26f)][_0x584393(0x23d)]>0x0){const _0x1979c7=formatValidationWarnings(_0x352530[_0x584393(0x26f)]);console['warn'](_0x584393(0x207)+_0x2a4864[_0x584393(0x227)]+_0x584393(0x276)+_0x1979c7);}_0x2cf8f4[_0x584393(0x27a)]=transformConfigToLegacy(_0x2a4864[_0x584393(0x1f5)],_0x2dbe06);}catch(_0x1674f2){if(_0x1674f2 instanceof SDKError&&_0x1674f2['code']===ErrorCode['CONNECTOR_SCHEMA_NOT_FOUND'])_0x2cf8f4['connectorConfig']=_0x2a4864['connector_config'];else throw _0x1674f2;}else _0x2cf8f4[_0x584393(0x27a)]=_0x2a4864[_0x584393(0x1f5)];}_0x2a4864[_0x584393(0x214)]!==undefined&&(_0x2cf8f4[_0x584393(0x28a)]=_0x2a4864[_0x584393(0x214)]);if(_0x2a4864[_0x584393(0x212)]){const _0x170bc9=_0x2a4864[_0x584393(0x212)],_0x38a99e={};if(_0x170bc9[_0x584393(0x283)]&&_0x170bc9[_0x584393(0x283)][_0x584393(0x23d)]>0x0){const _0x43537b=_0x170bc9[_0x584393(0x283)][_0x584393(0x1e9)](_0xcc3099=>_0xcc3099&&_0xcc3099[_0x584393(0x227)])[_0x584393(0x280)](normalizeColumn);_0x43537b[_0x584393(0x23d)]>0x0&&(_0x38a99e['columns']=_0x43537b);}_0x170bc9[_0x584393(0x208)]&&(_0x38a99e[_0x584393(0x1f9)]=_0x170bc9[_0x584393(0x208)]);_0x170bc9['join_strategy']&&(_0x38a99e[_0x584393(0x20b)]=_0x170bc9[_0x584393(0x28b)]);if(_0x170bc9[_0x584393(0x29b)]!==undefined)_0x38a99e['joinRow']=_0x170bc9[_0x584393(0x29b)];else{if(_0x170bc9[_0x584393(0x28b)]===_0x584393(0x295)||_0x170bc9['join_strategy']===_0x584393(0x28d))_0x38a99e[_0x584393(0x244)]=0x1;else _0x170bc9[_0x584393(0x28b)]===_0x584393(0x254)&&(_0x38a99e[_0x584393(0x244)]=null);}_0x170bc9[_0x584393(0x278)]&&(_0x38a99e['formatting']=_0x170bc9[_0x584393(0x278)]),_0x170bc9[_0x584393(0x281)]&&(_0x38a99e[_0x584393(0x268)]=_0x170bc9[_0x584393(0x281)]),_0x2cf8f4['syndicationBehavior']=_0x38a99e;}return _0x2a4864[_0x584393(0x27f)]&&(_0x2cf8f4[_0x584393(0x258)]=_0x2a4864[_0x584393(0x27f)]),_0x2a4864[_0x584393(0x1e8)]&&(_0x2cf8f4[_0x584393(0x288)]=_0x2a4864[_0x584393(0x1e8)]),_0x2a4864[_0x584393(0x219)]!==undefined&&(_0x2cf8f4[_0x584393(0x21b)]=_0x2a4864[_0x584393(0x219)]),_0x2cf8f4;}export async function activationDefToUpdateRequest(_0x5b848a,_0x5d89b9){return activationDefToCreateRequest(_0x5b848a,_0x5d89b9);}export function deepSortObject(_0x3eea81){const _0x1b3f5b=a142_0x18a3a1;if(_0x3eea81===null||typeof _0x3eea81!==_0x1b3f5b(0x20d))return _0x3eea81;if(Array['isArray'](_0x3eea81))return _0x3eea81[_0x1b3f5b(0x280)](deepSortObject)['sort']((_0x495335,_0x2e3e91)=>JSON[_0x1b3f5b(0x28f)](_0x495335)[_0x1b3f5b(0x275)](JSON[_0x1b3f5b(0x28f)](_0x2e3e91)));const _0x4019a2={};for(const _0x42590d of Object['keys'](_0x3eea81)[_0x1b3f5b(0x1f1)]()){_0x4019a2[_0x42590d]=deepSortObject(_0x3eea81[_0x42590d]);}return _0x4019a2;}export function serializeRule(_0x57f30f){const _0x4a9f39=a142_0x18a3a1;return JSON[_0x4a9f39(0x28f)](deepSortObject(_0x57f30f));}export function normalizeRuleForMatching(_0x43488f){return normalizeConditionsForMatching(_0x43488f);}function normalizeConditionsForMatching(_0x4a5401){const _0x3cd2d7=a142_0x18a3a1;if(_0x4a5401===null||typeof _0x4a5401!=='object')return _0x4a5401;if(Array[_0x3cd2d7(0x21f)](_0x4a5401))return _0x4a5401['map'](normalizeConditionsForMatching);const _0x2447d0=_0x4a5401;if((_0x2447d0['type']===_0x3cd2d7(0x24f)||_0x2447d0['type']===_0x3cd2d7(0x267))&&typeof _0x2447d0['segment']===_0x3cd2d7(0x26d))return{..._0x2447d0,'segment':_0x3cd2d7(0x230)};const _0x3e6fac={};for(const _0x5b3d85 of Object[_0x3cd2d7(0x23f)](_0x2447d0)){_0x3e6fac[_0x5b3d85]=normalizeConditionsForMatching(_0x2447d0[_0x5b3d85]);}return _0x3e6fac;}export function serializeRuleForMatching(_0x1286ca){const _0x415ef2=a142_0x18a3a1;return JSON[_0x415ef2(0x28f)](deepSortObject(normalizeRuleForMatching(_0x1286ca)));}export function expandSegmentReferences(_0x5a196b,_0x4ffcb2,_0x42eb3b=new Set()){return expandConditions(_0x5a196b,_0x4ffcb2,_0x42eb3b);}function expandConditions(_0x478127,_0x25a0ef,_0x1498ce){const _0x33ac7e=a142_0x18a3a1;if(_0x478127===null||typeof _0x478127!==_0x33ac7e(0x20d))return _0x478127;if(Array[_0x33ac7e(0x21f)](_0x478127))return _0x478127['map'](_0x5daa71=>expandConditions(_0x5daa71,_0x25a0ef,_0x1498ce));const _0x30b676=_0x478127;if((_0x30b676['type']===_0x33ac7e(0x24f)||_0x30b676['type']===_0x33ac7e(0x267))&&typeof _0x30b676['segment']==='string'){const _0x5e1233=_0x30b676[_0x33ac7e(0x1e5)],_0x26f6bd=_0x25a0ef[_0x33ac7e(0x24d)](_0x5e1233);if(_0x26f6bd&&!_0x1498ce[_0x33ac7e(0x226)](_0x5e1233)){const _0x531b5a=new Set(_0x1498ce);_0x531b5a['add'](_0x5e1233);const _0x3f034b=expandConditions(_0x26f6bd,_0x25a0ef,_0x531b5a);return{'type':_0x30b676[_0x33ac7e(0x279)],'expanded_rule':_0x3f034b};}return{'type':_0x30b676['type'],'expanded_rule':_0x33ac7e(0x1fe)};}const _0x1a4d9a={};for(const _0x1cea02 of Object[_0x33ac7e(0x23f)](_0x30b676)){_0x1a4d9a[_0x1cea02]=expandConditions(_0x30b676[_0x1cea02],_0x25a0ef,_0x1498ce);}return _0x1a4d9a;}export function serializeExpandedRule(_0x5b5524,_0xa65e52){const _0x5b1839=expandSegmentReferences(_0x5b5524,_0xa65e52);return JSON['stringify'](deepSortObject(_0x5b1839));}export function createSegmentNameContext(_0x36604e){const _0xfb10ab=a142_0x18a3a1,_0xc5b2e7=new Set(),_0x5879a5=new Map(),_0x139f99=new Map();if(_0x36604e)for(const [_0x3c50b7,_0x5b9dad]of Object['entries'](_0x36604e)){if(_0x5b9dad[_0xfb10ab(0x213)]){const _0x569c01=serializeRule(_0x5b9dad[_0xfb10ab(0x213)]);_0x139f99[_0xfb10ab(0x22c)](_0x569c01,_0x3c50b7),_0xc5b2e7[_0xfb10ab(0x261)](_0x3c50b7);}}return{'usedNames':_0xc5b2e7,'ruleHashToName':_0x5879a5,'localRuleToName':_0x36604e?_0x139f99:undefined};}export function resolveSegmentName(_0x50f1db,_0x583dda,_0x171690,_0xe12eef){const _0x5e27be=a142_0x18a3a1,_0x547a1b=serializeRule(_0x583dda);if(_0x171690[_0x5e27be(0x27e)]){const _0x40a67b=_0x171690[_0x5e27be(0x27e)][_0x5e27be(0x24d)](_0x547a1b);if(_0x40a67b)return{'name':_0x40a67b,'isDuplicate':![],'isLocalMatch':!![]};}const _0x32a21b=_0x171690[_0x5e27be(0x1f8)]['get'](_0x547a1b);if(_0x32a21b)return{'name':_0x32a21b,'isDuplicate':!![],'isLocalMatch':![]};const _0x2274a3=_0xe12eef(_0x50f1db);let _0x307932=_0x2274a3||_0x50f1db,_0x3a08e3=_0x307932,_0x393585=0x2;while(_0x171690['usedNames'][_0x5e27be(0x226)](_0x3a08e3)){_0x3a08e3=_0x307932+'_'+_0x393585,_0x393585++;}return _0x171690[_0x5e27be(0x1f7)][_0x5e27be(0x261)](_0x3a08e3),_0x171690[_0x5e27be(0x1f8)][_0x5e27be(0x22c)](_0x547a1b,_0x3a08e3),{'name':_0x3a08e3,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x46b781){const _0x49cc44=[],_0x1f4f73=_0x1c0061=>{const _0x1f62dd=a142_0x533f;if(!_0x1c0061||typeof _0x1c0061!=='object')return;if(Array['isArray'](_0x1c0061)){_0x1c0061[_0x1f62dd(0x262)](_0x1f4f73);return;}const _0x2b7593=_0x1c0061;(_0x2b7593[_0x1f62dd(0x279)]===_0x1f62dd(0x24f)||_0x2b7593[_0x1f62dd(0x279)]===_0x1f62dd(0x267))&&typeof _0x2b7593[_0x1f62dd(0x1e5)]===_0x1f62dd(0x26d)&&_0x49cc44[_0x1f62dd(0x20c)](_0x2b7593[_0x1f62dd(0x1e5)]);for(const _0x1f3e6c of Object[_0x1f62dd(0x248)](_0x2b7593)){_0x1f4f73(_0x1f3e6c);}};return _0x1f4f73(_0x46b781),_0x49cc44;}export function validateSegmentRule(_0xcae6f3,_0x3caba1){const _0x423aec=a142_0x18a3a1;if(!_0x3caba1||!_0x3caba1[_0x423aec(0x1ff)])return;for(let _0xddc0d8=0x0;_0xddc0d8<_0x3caba1[_0x423aec(0x1ff)]['length'];_0xddc0d8++){const _0xb24f69=_0x3caba1[_0x423aec(0x1ff)][_0xddc0d8];if(_0x423aec(0x279)in _0xb24f69&&_0xb24f69[_0x423aec(0x279)]===_0x423aec(0x233)){const _0x2295c4=_0xb24f69,_0x165da3=_0x2295c4[_0x423aec(0x1ee)]||_0x2295c4[_0x423aec(0x204)];if((!_0x2295c4[_0x423aec(0x1fc)]||_0x2295c4[_0x423aec(0x1fc)]==='')&&!_0x165da3)throw new SDKError(ErrorCode[_0x423aec(0x25d)],_0x423aec(0x237)+_0xcae6f3+_0x423aec(0x20f)+(_0x423aec(0x249)+_0xddc0d8+_0x423aec(0x27d))+_0x423aec(0x209));}}}
1
+ const a142_0x24cc65=a142_0x2990;(function(_0x3fbc0d,_0x36fbbd){const _0x1c4c9f=a142_0x2990,_0x14c9b1=_0x3fbc0d();while(!![]){try{const _0x21252d=parseInt(_0x1c4c9f(0x104))/0x1*(-parseInt(_0x1c4c9f(0xec))/0x2)+parseInt(_0x1c4c9f(0x11d))/0x3*(-parseInt(_0x1c4c9f(0xd5))/0x4)+parseInt(_0x1c4c9f(0x183))/0x5*(-parseInt(_0x1c4c9f(0x16f))/0x6)+-parseInt(_0x1c4c9f(0x15e))/0x7*(-parseInt(_0x1c4c9f(0xcf))/0x8)+-parseInt(_0x1c4c9f(0xd1))/0x9*(parseInt(_0x1c4c9f(0xe2))/0xa)+parseInt(_0x1c4c9f(0x11e))/0xb+parseInt(_0x1c4c9f(0x11f))/0xc;if(_0x21252d===_0x36fbbd)break;else _0x14c9b1['push'](_0x14c9b1['shift']());}catch(_0x2f1922){_0x14c9b1['push'](_0x14c9b1['shift']());}}}(a142_0x36ba,0x85c8c));import*as a142_0x53a596 from'yaml';import{safeParseYaml}from'./yaml-validator.js';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';import{SegmentDefSchema}from'./types/segment-schema.js';import{ActivationDefSchema}from'./types/activation-schema.js';const SCHEDULE_TYPE_TO_REPEAT_UNIT={'daily':a142_0x24cc65(0xd2),'hourly':a142_0x24cc65(0xf9),'weekly':a142_0x24cc65(0x178),'monthly':a142_0x24cc65(0xdd),'minutes_interval':a142_0x24cc65(0xff)},REPEAT_UNIT_TO_SCHEDULE_TYPE={'day':a142_0x24cc65(0x131),'hour':a142_0x24cc65(0x173),'week':a142_0x24cc65(0x156),'month':'monthly','minute':a142_0x24cc65(0x174)};function filterRuleAsRuleDef(_0x141394){return _0x141394;}function ruleDefAsFilterRule(_0x309d51){return _0x309d51;}export function segmentResponseToDefSync(_0x1097bb,_0x32d850){const _0x24980b=a142_0x24cc65,_0x107d29=_0x1097bb[_0x24980b(0xe9)]&&_0x24980b(0xd9)in _0x1097bb[_0x24980b(0xe9)]&&_0x1097bb['rule'][_0x24980b(0xd9)];return{'type':'segment','name':_0x1097bb[_0x24980b(0x179)],..._0x1097bb[_0x24980b(0x175)]&&{'description':_0x1097bb[_0x24980b(0x175)]},..._0x32d850&&{'folder':_0x32d850},..._0x107d29&&{'rule':apiRuleToYaml(_0x1097bb[_0x24980b(0xe9)])},..._0x1097bb[_0x24980b(0xd4)]!==undefined&&{'kind':_0x1097bb[_0x24980b(0xd4)]===0x0?_0x24980b(0x166):_0x1097bb[_0x24980b(0xd4)]===0x1?_0x24980b(0x17a):_0x24980b(0x112)},..._0x1097bb['isVisible']!==undefined&&{'visible':_0x1097bb['isVisible']}};}export async function segmentResponseToDef(_0x21266f,_0x27398b,_0x4f00d3){const _0x5d1808=a142_0x24cc65,_0x10e12b=segmentResponseToDefSync(_0x21266f,_0x4f00d3);if(!_0x27398b||!_0x27398b[_0x5d1808(0x115)])return _0x10e12b;return _0x10e12b[_0x5d1808(0xe9)]&&(_0x10e12b[_0x5d1808(0xe9)]=await resolveRuleSegmentRefs(_0x10e12b['rule'],_0x27398b[_0x5d1808(0x115)])),_0x10e12b;}export function apiRuleToYaml(_0x4ed7bc){const _0xad1376=a142_0x24cc65,_0x27921e=(_0x4ed7bc[_0xad1376(0x154)]||[])[_0xad1376(0xdb)](_0x10429b=>{const _0x5d71dd=_0xad1376,_0x80f0a3=apiConditionToYaml(_0x10429b);if(isCompositeType(_0x80f0a3)&&_0x80f0a3[_0x5d71dd(0x175)]!==undefined){const _0x1bc836=_0x80f0a3;if(_0x1bc836[_0x5d71dd(0x154)][_0x5d71dd(0x138)]===0x1)return _0x1bc836[_0x5d71dd(0x154)];return[{'type':_0x1bc836[_0x5d71dd(0xd9)],'conditions':_0x1bc836[_0x5d71dd(0x154)]}];}return[_0x80f0a3];});if(_0x27921e['length']===0x1&&!_0x4ed7bc[_0xad1376(0x175)]&&isCompositeType(_0x27921e[0x0])){const _0x184ddb=_0x27921e[0x0];if(_0x184ddb[_0xad1376(0xd9)]===_0x4ed7bc[_0xad1376(0xd9)]&&_0x184ddb[_0xad1376(0x154)]&&_0x184ddb[_0xad1376(0x175)]===undefined)return{'type':_0x4ed7bc[_0xad1376(0xd9)],'conditions':_0x184ddb['conditions']};}return{'type':_0x4ed7bc[_0xad1376(0xd9)],'conditions':_0x27921e};}export async function resolveRuleSegmentRefs(_0x407e8a,_0x4485b0){const _0x3fc871=a142_0x24cc65;return transformRuleSegmentRefs(_0x407e8a,_0x4485b0,_0x241b18=>/^\d+$/[_0x3fc871(0x101)](_0x241b18));}async function transformConditionSegmentRefs(_0x3950d1,_0x98d687,_0x26952f,_0x36e7bc){const _0x42a4fd=a142_0x24cc65;if('segment'in _0x3950d1&&(_0x3950d1['type']===_0x42a4fd(0x159)||_0x3950d1['type']===_0x42a4fd(0x12e))){const _0x3c1d2a=_0x3950d1;if(_0x26952f(_0x3c1d2a[_0x42a4fd(0x130)]))return{..._0x3c1d2a,'segment':await _0x98d687(_0x3c1d2a[_0x42a4fd(0x130)])};return _0x3950d1;}if('conditions'in _0x3950d1&&_0x3950d1[_0x42a4fd(0x154)]){const _0x1086ac=_0x3950d1,_0x52687b=await Promise[_0x42a4fd(0x118)](_0x1086ac['conditions'][_0x42a4fd(0x152)](_0x8f78d4=>transformConditionSegmentRefs(_0x8f78d4,_0x98d687,_0x26952f,_0x36e7bc)));return{..._0x1086ac,'conditions':_0x52687b};}if('filter'in _0x3950d1&&_0x3950d1['filter']){const _0x2d6649=_0x3950d1,_0xbdd447=await _0x36e7bc(filterRuleAsRuleDef(_0x2d6649[_0x42a4fd(0x111)]),_0x98d687);return{..._0x2d6649,'filter':ruleDefAsFilterRule(_0xbdd447)};}return _0x3950d1;}async function transformRuleSegmentRefs(_0x148b95,_0x263f48,_0x1d7024){const _0x55936a=a142_0x24cc65,_0x33d883=(_0x531929,_0x35a5fe)=>transformRuleSegmentRefs(_0x531929,_0x35a5fe,_0x1d7024),_0x560b60=await Promise['all'](_0x148b95[_0x55936a(0x154)][_0x55936a(0x152)](_0x4b9624=>transformConditionSegmentRefs(_0x4b9624,_0x263f48,_0x1d7024,_0x33d883)));return{..._0x148b95,'conditions':_0x560b60};}function a142_0x2990(_0x51b6cd,_0x332d30){_0x51b6cd=_0x51b6cd-0xcc;const _0x36bafe=a142_0x36ba();let _0x299077=_0x36bafe[_0x51b6cd];return _0x299077;}export async function resolveRuleSegmentIds(_0x3fe1a1,_0x3a5c34){const _0xbd8ef1=a142_0x24cc65;return transformRuleSegmentRefs(_0x3fe1a1,_0x3a5c34,_0xe03ec3=>!/^\d+$/[_0xbd8ef1(0x101)](_0xe03ec3));}function isCompositeType(_0x3873f9){const _0x3e2980=a142_0x24cc65;return _0x3873f9[_0x3e2980(0xd9)]==='And'||_0x3873f9[_0x3e2980(0xd9)]==='Or';}function isBehaviorApiCondition(_0xde5932){const _0x16faff=a142_0x24cc65;if(!_0xde5932[_0x16faff(0xe8)]?.[_0x16faff(0xe5)]?.[_0x16faff(0x179)])return![];return!![];}function apiConditionToYaml(_0x365b7f){const _0x2af777=a142_0x24cc65;if(_0x365b7f[_0x2af777(0xd9)]===_0x2af777(0x11c)||_0x365b7f[_0x2af777(0xd9)]==='Or'){if(_0x365b7f[_0x2af777(0x154)]){const _0x323d00=_0x365b7f[_0x2af777(0x154)]['map'](apiConditionToYaml),_0x2c52b9=_0x365b7f[_0x2af777(0x175)]!==undefined;if(_0x323d00[_0x2af777(0x138)]===0x1&&!_0x2c52b9)return _0x323d00[0x0];return{'type':_0x365b7f['type'],'conditions':_0x323d00,..._0x365b7f['description']!==undefined&&{'description':_0x365b7f[_0x2af777(0x175)]}};}}if(_0x365b7f[_0x2af777(0xd9)]===_0x2af777(0x109)&&_0x365b7f['leftValue']&&_0x365b7f[_0x2af777(0x10e)]){const _0x212def=_0x365b7f[_0x2af777(0xe8)][_0x2af777(0x158)]?buildAggregationDefFromApi(_0x365b7f[_0x2af777(0xe8)][_0x2af777(0x158)]):undefined;if(isBehaviorApiCondition(_0x365b7f)){const _0xf92816=_0x365b7f['leftValue'][_0x2af777(0xe5)][_0x2af777(0x179)];return{'type':_0x2af777(0x107),'attribute':'','operator':apiOperatorToYaml(_0x365b7f[_0x2af777(0x10e)]),..._0x365b7f[_0x2af777(0x11a)]&&_0x365b7f[_0x2af777(0x11a)]!==_0x2af777(0xee)?{'arrayMatching':_0x365b7f[_0x2af777(0x11a)]}:{},..._0x365b7f[_0x2af777(0x12e)]?{'exclude':_0x365b7f[_0x2af777(0x12e)]}:{},..._0x212def?{'aggregation':_0x212def}:{},'source':_0xf92816,..._0x365b7f['leftValue'][_0x2af777(0x111)]?{'filter':apiRuleToYaml(_0x365b7f[_0x2af777(0xe8)]['filter'])}:{},..._0x365b7f[_0x2af777(0x128)]!==undefined&&_0x365b7f[_0x2af777(0x128)]!==null?{'limit':_0x365b7f[_0x2af777(0x128)]}:{}};}return{'type':'Value','attribute':_0x365b7f['leftValue'][_0x2af777(0x179)]||'','operator':apiOperatorToYaml(_0x365b7f[_0x2af777(0x10e)]),..._0x365b7f[_0x2af777(0x11a)]&&_0x365b7f[_0x2af777(0x11a)]!==_0x2af777(0xee)?{'arrayMatching':_0x365b7f[_0x2af777(0x11a)]}:{},..._0x365b7f['exclude']?{'exclude':_0x365b7f[_0x2af777(0x12e)]}:{},..._0x212def?{'aggregation':_0x212def}:{},..._0x365b7f[_0x2af777(0xe8)][_0x2af777(0x111)]?{'filter':apiRuleToYaml(_0x365b7f['leftValue'][_0x2af777(0x111)])}:{},..._0x365b7f[_0x2af777(0x128)]!==undefined&&_0x365b7f[_0x2af777(0x128)]!==null?{'limit':_0x365b7f['limit']}:{}};}if(_0x365b7f[_0x2af777(0xd9)]===_0x2af777(0xd0)&&_0x365b7f[_0x2af777(0x103)]&&_0x365b7f['operator'])return{'type':_0x2af777(0xd0),'column':_0x365b7f[_0x2af777(0x103)],'operator':apiOperatorToYaml(_0x365b7f['operator'])};if(_0x365b7f['type']===_0x2af777(0x100)&&_0x365b7f['id'])return{'type':_0x365b7f[_0x2af777(0x12e)]?_0x2af777(0x12e):_0x2af777(0x159),'segment':_0x365b7f['id']};return{'type':_0x2af777(0x11c),'conditions':[]};}function isTemporalOperator(_0x1bf9cc){return _0x1bf9cc==='TimeWithinPast'||_0x1bf9cc==='TimeWithinNext';}function isBetweenOperator(_0x43e918){return _0x43e918==='Between';}function getEffectiveValue(_0x1c5aa3){const _0x544b1a=a142_0x24cc65,_0x430995=_0x1c5aa3[_0x544b1a(0x163)];return _0x1c5aa3[_0x544b1a(0x122)]??_0x430995;}function parseNumericValue(_0x2d05f8){const _0x5428fa=a142_0x24cc65;if(typeof _0x2d05f8===_0x5428fa(0x10d)&&_0x2d05f8!==null)return _0x2d05f8;if(_0x2d05f8==='')return _0x2d05f8;const _0x4f209f=Number(_0x2d05f8);return Number[_0x5428fa(0x143)](_0x4f209f)?_0x4f209f:_0x2d05f8;}function apiOperatorToYaml(_0x3e4b29){const _0x33c09c=a142_0x24cc65;if(isBetweenOperator(_0x3e4b29['type']))return{'type':mapApiOperatorType(_0x3e4b29[_0x33c09c(0xd9)]),..._0x3e4b29['not']!==undefined&&{'not':_0x3e4b29[_0x33c09c(0x125)]},..._0x3e4b29[_0x33c09c(0xed)]!==undefined&&{'min':parseNumericValue(_0x3e4b29['minValue'])},..._0x3e4b29[_0x33c09c(0x15c)]!==undefined&&{'max':parseNumericValue(_0x3e4b29[_0x33c09c(0x15c)])}};if(_0x3e4b29[_0x33c09c(0xd9)]===_0x33c09c(0x119))return{'type':_0x33c09c(0x119),..._0x3e4b29[_0x33c09c(0x125)]!==undefined&&{'not':_0x3e4b29[_0x33c09c(0x125)]},..._0x3e4b29['duration']!==undefined&&{'duration':_0x3e4b29[_0x33c09c(0x14b)]},..._0x3e4b29[_0x33c09c(0x136)]!==undefined&&{'from':_0x3e4b29[_0x33c09c(0x136)]},..._0x3e4b29['reverse']!==undefined&&{'reverse':_0x3e4b29[_0x33c09c(0x14a)]}};let _0x154800;if(_0x3e4b29[_0x33c09c(0x12a)]&&_0x3e4b29[_0x33c09c(0x12a)][_0x33c09c(0x138)]>0x0)_0x154800=_0x3e4b29[_0x33c09c(0x12a)];else{if(_0x3e4b29[_0x33c09c(0x155)]!==undefined)_0x154800=_0x3e4b29[_0x33c09c(0x155)];else isTemporalOperator(_0x3e4b29['type'])&&_0x3e4b29[_0x33c09c(0x122)]!==undefined&&(_0x154800=_0x3e4b29[_0x33c09c(0x122)]);}return{'type':mapApiOperatorType(_0x3e4b29[_0x33c09c(0xd9)]),..._0x3e4b29[_0x33c09c(0x125)]!==undefined&&{'not':_0x3e4b29[_0x33c09c(0x125)]},..._0x154800!==undefined&&{'value':_0x154800},..._0x3e4b29['unit']!==undefined&&{'unit':_0x3e4b29['unit']}};}function mapApiOperatorType(_0x484cc6){return _0x484cc6;}export function segmentDefToCreateRequest(_0x5f4cb8,_0x5c3995){const _0x1953eb=a142_0x24cc65,_0xba00fc={'name':_0x5f4cb8[_0x1953eb(0x179)]};return _0x5f4cb8[_0x1953eb(0x175)]&&(_0xba00fc['description']=_0x5f4cb8[_0x1953eb(0x175)]),_0x5f4cb8['rule']&&(_0xba00fc[_0x1953eb(0xe9)]=yamlRuleToApi(_0x5f4cb8['rule'])),_0x5f4cb8[_0x1953eb(0xd4)]&&(_0xba00fc[_0x1953eb(0xd4)]=_0x5f4cb8[_0x1953eb(0xd4)]===_0x1953eb(0x166)?0x0:_0x5f4cb8[_0x1953eb(0xd4)]===_0x1953eb(0x17a)?0x1:0x2),_0x5f4cb8[_0x1953eb(0xf6)]!==undefined&&(_0xba00fc[_0x1953eb(0x127)]=_0x5f4cb8[_0x1953eb(0xf6)]),_0x5c3995&&(_0xba00fc[_0x1953eb(0xf3)]=_0x5c3995),_0xba00fc;}export function segmentDefToUpdateRequest(_0x1df61b){const _0x5b17e5=a142_0x24cc65,_0x390e0c={'name':_0x1df61b['name']};return _0x1df61b[_0x5b17e5(0x175)]!==undefined&&(_0x390e0c[_0x5b17e5(0x175)]=_0x1df61b['description']),_0x1df61b[_0x5b17e5(0xe9)]&&(_0x390e0c['rule']=yamlRuleToApi(_0x1df61b[_0x5b17e5(0xe9)])),_0x1df61b[_0x5b17e5(0xd4)]&&(_0x390e0c[_0x5b17e5(0xd4)]=_0x1df61b[_0x5b17e5(0xd4)]===_0x5b17e5(0x166)?0x0:_0x1df61b[_0x5b17e5(0xd4)]==='realtime'?0x1:0x2),_0x390e0c;}export function yamlRuleToApi(_0x164ca0){const _0x1aebb1=a142_0x24cc65,_0x39076a=_0x164ca0[_0x1aebb1(0x154)][_0x1aebb1(0x152)](yamlConditionToApi),_0x5b5e94=_0x39076a[_0x1aebb1(0x14e)](_0x15bf05=>isCompositeType(_0x15bf05)&&_0x15bf05[_0x1aebb1(0x175)]!==undefined);if(!_0x5b5e94&&_0x39076a[_0x1aebb1(0x138)]>0x0){const _0x93f45a=[];for(const _0x72ba96 of _0x39076a){isCompositeType(_0x72ba96)&&_0x72ba96[_0x1aebb1(0x175)]===undefined&&_0x72ba96[_0x1aebb1(0x154)]&&_0x72ba96[_0x1aebb1(0x154)][_0x1aebb1(0x14e)](_0x3e2d1b=>!isCompositeType(_0x3e2d1b))?_0x93f45a[_0x1aebb1(0x157)]({'type':_0x72ba96[_0x1aebb1(0xd9)],'description':'','conditions':_0x72ba96[_0x1aebb1(0x154)]}):_0x93f45a[_0x1aebb1(0x157)]({'type':'And','description':_0x164ca0[_0x1aebb1(0x175)]||'','conditions':[_0x72ba96]});}return{'type':_0x164ca0[_0x1aebb1(0xd9)],'conditions':_0x93f45a};}return{'type':_0x164ca0[_0x1aebb1(0xd9)],'conditions':_0x39076a,..._0x164ca0[_0x1aebb1(0x175)]&&{'description':_0x164ca0[_0x1aebb1(0x175)]}};}function yamlFilterRuleToApi(_0x269183){const _0x464405=a142_0x24cc65,_0x43c3a7=_0x269183[_0x464405(0x154)]['map'](yamlConditionToApi);return{'type':_0x269183[_0x464405(0xd9)],'conditions':_0x43c3a7};}function yamlConditionToApi(_0x3def3f){const _0x3f7772=a142_0x24cc65;if(_0x3f7772(0x130)in _0x3def3f&&(_0x3def3f[_0x3f7772(0xd9)]===_0x3f7772(0x159)||_0x3def3f[_0x3f7772(0xd9)]===_0x3f7772(0x12e))){const _0x39db1a=_0x3def3f;return{'type':_0x3f7772(0x100),'id':_0x39db1a[_0x3f7772(0x130)],'exclude':_0x39db1a[_0x3f7772(0xd9)]===_0x3f7772(0x12e)};}if(_0x3def3f[_0x3f7772(0xd9)]===_0x3f7772(0x11c)||_0x3def3f['type']==='Or'){const _0x2aa1b5=_0x3def3f;return{'type':_0x2aa1b5[_0x3f7772(0xd9)],'conditions':_0x2aa1b5[_0x3f7772(0x154)][_0x3f7772(0x152)](yamlConditionToApi),..._0x2aa1b5[_0x3f7772(0x175)]&&{'description':_0x2aa1b5['description']}};}if(_0x3f7772(0x103)in _0x3def3f&&_0x3def3f[_0x3f7772(0xd9)]===_0x3f7772(0xd0)){const _0x2c5b89=_0x3def3f;return{'type':_0x3f7772(0xd0),'column':_0x2c5b89[_0x3f7772(0x103)],'operator':yamlOperatorToApi(_0x2c5b89[_0x3f7772(0x10e)])};}const _0x665c90=_0x3def3f,_0x192ab1={'type':_0x3f7772(0x109),'leftValue':buildLeftValue(_0x665c90),'operator':yamlOperatorToApi(_0x665c90['operator']),'exclude':_0x665c90['exclude']??![],'arrayMatching':_0x665c90[_0x3f7772(0x11a)]??_0x3f7772(0xee)};return _0x665c90[_0x3f7772(0x128)]!==undefined&&(_0x192ab1[_0x3f7772(0x128)]=_0x665c90[_0x3f7772(0x128)]),_0x192ab1;}function buildAggregationDefFromApi(_0x19fa79){const _0x5b16e9=a142_0x24cc65,_0x4d2f90=_0x19fa79[_0x5b16e9(0xd9)];if(_0x4d2f90==='CountDistinct')return{'type':_0x4d2f90,'columns':_0x19fa79[_0x5b16e9(0xe1)]??[]};if(_0x4d2f90===_0x5b16e9(0xfb)||_0x4d2f90===_0x5b16e9(0xfd))return{'type':_0x4d2f90,'column':_0x19fa79[_0x5b16e9(0x103)]??'','orderColumn':_0x19fa79[_0x5b16e9(0x150)]??'',..._0x19fa79[_0x5b16e9(0x12f)]&&{'groupingColumns':_0x19fa79[_0x5b16e9(0x12f)]}};if(_0x4d2f90==='Count')return{'type':_0x4d2f90,..._0x19fa79[_0x5b16e9(0x12f)]&&{'groupingColumns':_0x19fa79[_0x5b16e9(0x12f)]}};return{'type':_0x4d2f90,'column':_0x19fa79['column']??'',..._0x19fa79[_0x5b16e9(0x12f)]&&{'groupingColumns':_0x19fa79['groupingColumns']}};}function buildLeftValue(_0x1412e2){const _0x423bc7=a142_0x24cc65,_0x390cf6={};_0x1412e2[_0x423bc7(0x114)]&&_0x1412e2[_0x423bc7(0xd9)]!==_0x423bc7(0x107)&&(_0x390cf6['name']=_0x1412e2[_0x423bc7(0x114)]);if(_0x1412e2['aggregation']){const _0x45a462=_0x1412e2['aggregation'];if(_0x45a462[_0x423bc7(0xd9)]==='CountDistinct')_0x390cf6[_0x423bc7(0x158)]={'type':'CountDistinct','columns':_0x45a462[_0x423bc7(0xe1)]};else{if(_0x45a462['type']===_0x423bc7(0xfb)||_0x45a462[_0x423bc7(0xd9)]===_0x423bc7(0xfd))_0x390cf6[_0x423bc7(0x158)]={'type':_0x45a462['type'],'column':_0x45a462[_0x423bc7(0x103)],'orderColumn':_0x45a462[_0x423bc7(0x150)],..._0x45a462[_0x423bc7(0x12f)]&&{'groupingColumns':_0x45a462[_0x423bc7(0x12f)]}};else _0x45a462[_0x423bc7(0xd9)]===_0x423bc7(0x13d)?_0x390cf6['aggregation']={'type':_0x423bc7(0x13d),..._0x45a462['groupingColumns']&&{'groupingColumns':_0x45a462[_0x423bc7(0x12f)]}}:_0x390cf6[_0x423bc7(0x158)]={'type':_0x45a462[_0x423bc7(0xd9)],'column':_0x45a462['column'],..._0x45a462['groupingColumns']&&{'groupingColumns':_0x45a462[_0x423bc7(0x12f)]}};}}return _0x1412e2['source']&&(_0x390cf6[_0x423bc7(0xe5)]={'name':_0x1412e2['source']}),_0x1412e2['filter']&&(_0x390cf6[_0x423bc7(0x111)]=yamlFilterRuleToApi(filterRuleAsRuleDef(_0x1412e2['filter']))),_0x390cf6;}function yamlOperatorToApi(_0x1ddb6c){const _0x56be35=a142_0x24cc65,_0x993153={'type':mapYamlOperatorType(_0x1ddb6c[_0x56be35(0xd9)]),'not':_0x1ddb6c[_0x56be35(0x125)]??![]};if(isBetweenOperator(_0x1ddb6c['type']))return _0x1ddb6c[_0x56be35(0x161)]!==undefined&&(_0x993153[_0x56be35(0xed)]=typeof _0x1ddb6c[_0x56be35(0x161)]==='object'?_0x1ddb6c[_0x56be35(0x161)]:String(_0x1ddb6c[_0x56be35(0x161)])),_0x1ddb6c['max']!==undefined&&(_0x993153[_0x56be35(0x15c)]=typeof _0x1ddb6c[_0x56be35(0xeb)]===_0x56be35(0x10d)?_0x1ddb6c[_0x56be35(0xeb)]:String(_0x1ddb6c[_0x56be35(0xeb)])),_0x993153;if(_0x1ddb6c[_0x56be35(0xd9)]===_0x56be35(0x119))return _0x1ddb6c[_0x56be35(0x14b)]&&(_0x993153[_0x56be35(0x14b)]=_0x1ddb6c[_0x56be35(0x14b)]),_0x1ddb6c[_0x56be35(0x136)]&&(_0x993153[_0x56be35(0x136)]=_0x1ddb6c[_0x56be35(0x136)]),_0x1ddb6c[_0x56be35(0x14a)]!==undefined&&(_0x993153[_0x56be35(0x14a)]=_0x1ddb6c['reverse']),_0x993153;const _0x2ebebc=getEffectiveValue(_0x1ddb6c);if(_0x2ebebc!==undefined){if(Array[_0x56be35(0x168)](_0x2ebebc))_0x993153[_0x56be35(0x12a)]=_0x2ebebc;else isTemporalOperator(_0x1ddb6c[_0x56be35(0xd9)])?_0x993153[_0x56be35(0x122)]=_0x2ebebc:_0x993153[_0x56be35(0x155)]=_0x2ebebc;}return _0x1ddb6c[_0x56be35(0x121)]&&(_0x993153[_0x56be35(0x121)]=_0x1ddb6c['unit']),_0x993153;}function mapYamlOperatorType(_0x4f0c83){return _0x4f0c83;}export function toYamlString(_0x4c4c1b){const _0x512e57=a142_0x24cc65,_0x47b372=JSON[_0x512e57(0xf7)](JSON['stringify'](_0x4c4c1b)),_0x7686a4=a142_0x53a596['stringify'](_0x47b372,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x512e57(0x129)}),_0x3453c1=['rule:'];let _0x34d113=_0x7686a4;for(const _0x4242db of _0x3453c1){_0x34d113=_0x34d113['replace'](new RegExp('^('+_0x4242db+')','m'),(_0x3a7a10,_0x5465e7,_0x512e32)=>{if(_0x512e32===0x0||_0x34d113[_0x512e32-0x1]==='\x0a'&&_0x34d113[_0x512e32-0x2]==='\x0a')return _0x5465e7;return'\x0a'+_0x5465e7;});}return _0x34d113;}export function parseYamlString(_0x40690e){return parseSegmentYamlFile(_0x40690e);}export function isSegmentYaml(_0x562236){const _0x3472fb=a142_0x24cc65;if(typeof _0x562236!==_0x3472fb(0x10d)||_0x562236===null)return![];const _0x12b9c0=_0x562236;return _0x12b9c0['type']===_0x3472fb(0x130)||_0x12b9c0[_0x3472fb(0xd9)]===undefined;}function a142_0x36ba(){const _0x31a3a9=['aggregation','include','Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27','].attribute\x20cannot\x20be\x20empty.\x0a','maxValue','email_recipients','96838OHTLEQ','emailRecipients','valid','min','timezone','values','Warning:\x20activation\x20\x22','connector_config\x20for\x20activation\x20\x22','batch','Please\x20specify\x20a\x20valid\x20attribute\x20name.','isArray','connectionNameToTypeMap','formatting','activation_template_id','run_after_journey_refresh','behavior','attributes','6OgCdzz','join_row','warn','start_at','hourly','minutes_interval','description','Invalid\x20connector_config\x20for\x20activation\x20\x22','join_strategy','week','name','realtime','\x22:\x0a','allColumns','INVALID_ARGUMENT','cron','orderBy','order_by','schedule','entries','5379995kVxojc','add','folder','CONNECTOR_INVALID_CONFIG','456rcWxQI','Column','801xZtJVy','day','connection','kind','7692zqEIyq','emailToIdMap','match','activationParams','type','behavior_table','flatMap','warnings','month','code','notifyOn','sort','columns','92760hlguOs','ruleHashToName','repeat_unit','source','Unknown\x20connection:\x20','repeat_sub_frequency','leftValue','rule','joinRow','max','481766jOAZxQ','minValue','any','scheduleType','notification','connectorConfig','string','segmentFolderId','all_columns','stringify','visible','parse','All','hour','shape','First','runAfterJourneyRefresh','Last','\x20\x20-\x20\x22','minute','Reference','test','joinStrategy','column','3lpkNjp','visibility','\x27:\x20','Behavior','syndicationBehavior','Value','localRuleToName','has','repeatFrequency','object','operator','end_on','behaviorTableName','filter','funnel_stage','get','attribute','resolveSegmentName','startAt','nested_workflow_name','all','TimeRange','arrayMatching','attribute_name','And','513oKVzQM','1080640hcibup','31370964RoSLXe','nested_workflow_project_name','unit','value','endOn','repeatSubFrequency','not','activationTemplateId','isVisible','limit','null','rightValues','set','CONNECTOR_SCHEMA_NOT_FOUND','connectionId','exclude','groupingColumns','segment','daily','conditions[','lockEnabled','\x22\x20has\x20unrecognized\x20fields\x20(will\x20be\x20ignored):\x0a','Equal','from','nestedWorkflowName','length','__SEGMENT_REF__','join','connector_config','activations','Count','getSchema','JOURNEY_SYNTAX_ERROR','repeatUnit','New\x20Segment','usedNames','isFinite','connectionNameToIdMap','activations:','none','Connector:\x20','repeat_frequency','lock_enabled','reverse','duration','keys','toLowerCase','every','nestedWorkflowProjectName','orderColumn','replace','map','timeWindow','conditions','rightValue','weekly','push'];a142_0x36ba=function(){return _0x31a3a9;};return a142_0x36ba();}export function generateTemplate(_0x1c6a43=a142_0x24cc65(0x141)){const _0x1bf8f9=a142_0x24cc65,_0x837c1c={'type':_0x1bf8f9(0x130),'name':_0x1c6a43,'description':'Segment\x20description','rule':{'type':_0x1bf8f9(0x11c),'conditions':[{'type':_0x1bf8f9(0x109),'attribute':_0x1bf8f9(0x11b),'operator':{'type':_0x1bf8f9(0x135),'value':'value'}}]}};return toYamlString(_0x837c1c);}export function segmentToYamlString(_0xe9f119){const _0x7fea18=a142_0x24cc65,_0xabaeab=JSON[_0x7fea18(0xf7)](JSON['stringify'](_0xe9f119)),_0x1af7cd=a142_0x53a596[_0x7fea18(0xf5)](_0xabaeab,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x7fea18(0x129)}),_0x41e7c6=['rule:',_0x7fea18(0x145)];let _0x225daa=_0x1af7cd;for(const _0x54f726 of _0x41e7c6){_0x225daa=_0x225daa[_0x7fea18(0x151)](new RegExp('^('+_0x54f726+')','m'),(_0x1c6ca5,_0x759d60,_0x20b00e)=>{if(_0x20b00e===0x0||_0x225daa[_0x20b00e-0x1]==='\x0a'&&_0x225daa[_0x20b00e-0x2]==='\x0a')return _0x759d60;return'\x0a'+_0x759d60;});}return _0x225daa;}export function parseSegmentYamlFile(_0x9221d7){return safeParseYaml(_0x9221d7,SegmentDefSchema);}export function normalizeChildSegmentYaml(_0x2ca7f5){const _0x4cde11=a142_0x24cc65;return{'type':_0x4cde11(0x130),'name':_0x2ca7f5[_0x4cde11(0x179)],..._0x2ca7f5['description']!==undefined&&{'description':_0x2ca7f5[_0x4cde11(0x175)]},..._0x2ca7f5[_0x4cde11(0xcd)]!==undefined&&{'folder':_0x2ca7f5[_0x4cde11(0xcd)]},..._0x2ca7f5[_0x4cde11(0xe9)]&&{'rule':normalizeRule(_0x2ca7f5[_0x4cde11(0xe9)])},..._0x2ca7f5[_0x4cde11(0xd4)]!==undefined&&{'kind':_0x2ca7f5[_0x4cde11(0xd4)]},..._0x2ca7f5['visible']!==undefined&&{'visible':_0x2ca7f5[_0x4cde11(0xf6)]},..._0x2ca7f5[_0x4cde11(0x13c)]&&{'activations':_0x2ca7f5[_0x4cde11(0x13c)][_0x4cde11(0x152)](normalizeActivation)}};}export function normalizeRule(_0x39a711){const _0x3e7418=a142_0x24cc65;return{'type':_0x39a711[_0x3e7418(0xd9)],'conditions':_0x39a711[_0x3e7418(0x154)][_0x3e7418(0x152)](normalizeCondition),..._0x39a711[_0x3e7418(0x175)]!==undefined&&{'description':_0x39a711[_0x3e7418(0x175)]}};}function normalizeCondition(_0x3c369d){const _0x34d963=a142_0x24cc65;if('segment'in _0x3c369d&&(_0x3c369d['type']===_0x34d963(0x159)||_0x3c369d[_0x34d963(0xd9)]===_0x34d963(0x12e))){const _0x1a1364=_0x3c369d;return{'type':_0x1a1364[_0x34d963(0xd9)],'segment':_0x1a1364[_0x34d963(0x130)]};}if(_0x3c369d[_0x34d963(0xd9)]===_0x34d963(0x11c)||_0x3c369d[_0x34d963(0xd9)]==='Or'){const _0x55f2c1=_0x3c369d;return{'type':_0x55f2c1[_0x34d963(0xd9)],'conditions':_0x55f2c1[_0x34d963(0x154)][_0x34d963(0x152)](normalizeCondition),..._0x55f2c1['description']!==undefined&&{'description':_0x55f2c1[_0x34d963(0x175)]}};}if(_0x34d963(0x103)in _0x3c369d&&_0x3c369d['type']===_0x34d963(0xd0)){const _0x15a8b1=_0x3c369d;return{'type':'Column','column':_0x15a8b1[_0x34d963(0x103)],'operator':normalizeOperator(_0x15a8b1['operator'])};}if(_0x3c369d[_0x34d963(0xd9)]==='Behavior'){const _0xae1e63=_0x3c369d;return{'type':'Behavior','attribute':_0xae1e63[_0x34d963(0x114)],'operator':normalizeOperator(_0xae1e63['operator']),..._0xae1e63[_0x34d963(0x11a)]!==undefined&&{'arrayMatching':_0xae1e63[_0x34d963(0x11a)]},..._0xae1e63[_0x34d963(0x12e)]!==undefined&&{'exclude':_0xae1e63[_0x34d963(0x12e)]},..._0xae1e63[_0x34d963(0x158)]!==undefined&&{'aggregation':_0xae1e63['aggregation']},..._0xae1e63[_0x34d963(0xe5)]!==undefined&&{'source':_0xae1e63[_0x34d963(0xe5)]},..._0xae1e63[_0x34d963(0x111)]!==undefined&&{'filter':ruleDefAsFilterRule(normalizeRule(filterRuleAsRuleDef(_0xae1e63[_0x34d963(0x111)])))},..._0xae1e63['timeWindow']!==undefined&&{'timeWindow':_0xae1e63[_0x34d963(0x153)]},..._0xae1e63['limit']!==undefined&&{'limit':_0xae1e63[_0x34d963(0x128)]}};}const _0x4b9095=_0x3c369d;return{'type':'Value','attribute':_0x4b9095[_0x34d963(0x114)],'operator':normalizeOperator(_0x4b9095[_0x34d963(0x10e)]),..._0x4b9095[_0x34d963(0x11a)]!==undefined&&{'arrayMatching':_0x4b9095[_0x34d963(0x11a)]},..._0x4b9095[_0x34d963(0x12e)]!==undefined&&{'exclude':_0x4b9095[_0x34d963(0x12e)]},..._0x4b9095[_0x34d963(0x158)]!==undefined&&{'aggregation':_0x4b9095[_0x34d963(0x158)]},..._0x4b9095[_0x34d963(0xe5)]!==undefined&&{'source':_0x4b9095[_0x34d963(0xe5)]},..._0x4b9095[_0x34d963(0x111)]!==undefined&&{'filter':ruleDefAsFilterRule(normalizeRule(filterRuleAsRuleDef(_0x4b9095[_0x34d963(0x111)])))},..._0x4b9095['limit']!==undefined&&{'limit':_0x4b9095[_0x34d963(0x128)]}};}function normalizeOperator(_0x56dc2e){const _0x58fa8a=a142_0x24cc65;if(isBetweenOperator(_0x56dc2e['type']))return{'type':_0x56dc2e[_0x58fa8a(0xd9)],..._0x56dc2e['not']!==undefined&&{'not':_0x56dc2e[_0x58fa8a(0x125)]},..._0x56dc2e[_0x58fa8a(0x161)]!==undefined&&{'min':_0x56dc2e[_0x58fa8a(0x161)]},..._0x56dc2e[_0x58fa8a(0xeb)]!==undefined&&{'max':_0x56dc2e['max']}};const _0x124ae1=getEffectiveValue(_0x56dc2e);return{'type':_0x56dc2e[_0x58fa8a(0xd9)],..._0x56dc2e['not']!==undefined&&{'not':_0x56dc2e[_0x58fa8a(0x125)]},..._0x124ae1!==undefined&&{'value':_0x124ae1},..._0x56dc2e[_0x58fa8a(0x121)]!==undefined&&{'unit':_0x56dc2e[_0x58fa8a(0x121)]},..._0x56dc2e[_0x58fa8a(0x14b)]!==undefined&&{'duration':_0x56dc2e[_0x58fa8a(0x14b)]},..._0x56dc2e[_0x58fa8a(0x136)]!==undefined&&{'from':_0x56dc2e[_0x58fa8a(0x136)]},..._0x56dc2e[_0x58fa8a(0x14a)]!==undefined&&{'reverse':_0x56dc2e[_0x58fa8a(0x14a)]}};}function normalizeActivation(_0x1c94c0){const _0x36f9c3=a142_0x24cc65;return{'name':_0x1c94c0[_0x36f9c3(0x179)],'connection':_0x1c94c0['connection'],..._0x1c94c0[_0x36f9c3(0x175)]!==undefined&&{'description':_0x1c94c0['description']},..._0x1c94c0[_0x36f9c3(0xf4)]!==undefined&&{'all_columns':_0x1c94c0['all_columns']},..._0x1c94c0[_0x36f9c3(0xe1)]!==undefined&&{'columns':_0x1c94c0[_0x36f9c3(0xe1)]},..._0x1c94c0[_0x36f9c3(0x16d)]!==undefined&&{'behavior':_0x1c94c0[_0x36f9c3(0x16d)]},..._0x1c94c0['schedule']!==undefined&&{'schedule':_0x1c94c0[_0x36f9c3(0x181)]},..._0x1c94c0[_0x36f9c3(0xf0)]!==undefined&&{'notification':_0x1c94c0[_0x36f9c3(0xf0)]},..._0x1c94c0[_0x36f9c3(0x13b)]!==undefined&&{'connector_config':_0x1c94c0[_0x36f9c3(0x13b)]},..._0x1c94c0[_0x36f9c3(0x16b)]!==undefined&&{'activation_template_id':_0x1c94c0[_0x36f9c3(0x16b)]},..._0x1c94c0[_0x36f9c3(0x120)]!==undefined&&{'nested_workflow_project_name':_0x1c94c0[_0x36f9c3(0x120)]},..._0x1c94c0['nested_workflow_name']!==undefined&&{'nested_workflow_name':_0x1c94c0[_0x36f9c3(0x117)]},..._0x1c94c0[_0x36f9c3(0x149)]!==undefined&&{'lock_enabled':_0x1c94c0[_0x36f9c3(0x149)]}};}function getColumnName(_0x86f8c1){const _0x1eadc7=a142_0x24cc65;return _0x86f8c1[_0x1eadc7(0x103)]||_0x86f8c1['name'];}export function activationResponseToDef(_0x5d3f25,_0x1bfddf,_0x2d087d){const _0x3360e6=a142_0x24cc65,_0x26e56b=_0x5d3f25[_0x3360e6(0x12d)]||'',_0x267107=_0x2d087d?.[_0x3360e6(0x113)](_0x26e56b)??_0x26e56b,_0x15dfb4={'name':_0x5d3f25[_0x3360e6(0x179)],'connection':_0x267107};_0x5d3f25['description']&&(_0x15dfb4[_0x3360e6(0x175)]=_0x5d3f25[_0x3360e6(0x175)]);let _0x2d2c89=[];_0x5d3f25[_0x3360e6(0xe1)]&&_0x5d3f25['columns'][_0x3360e6(0x138)]>0x0&&(_0x2d2c89=_0x5d3f25[_0x3360e6(0xe1)]['filter'](_0x58d88e=>_0x58d88e&&getColumnName(_0x58d88e))[_0x3360e6(0x152)](_0x137ba0=>{const _0x1522ed=_0x3360e6,_0x3b35d5=getColumnName(_0x137ba0);if(_0x137ba0['type']||_0x137ba0['visibility'])return{'name':_0x3b35d5,..._0x137ba0[_0x1522ed(0xd9)]&&{'type':_0x137ba0[_0x1522ed(0xd9)]},..._0x137ba0['visibility']&&{'visibility':_0x137ba0['visibility']}};return _0x3b35d5;}));_0x2d2c89['length']>0x0&&(_0x15dfb4[_0x3360e6(0xe1)]=_0x2d2c89);_0x5d3f25['allColumns']!==undefined&&(_0x5d3f25[_0x3360e6(0x17c)]===![]&&_0x2d2c89[_0x3360e6(0x138)]===0x0?_0x15dfb4[_0x3360e6(0xf4)]=!![]:_0x15dfb4[_0x3360e6(0xf4)]=_0x5d3f25[_0x3360e6(0x17c)]);const _0x293527={};let _0x2cd548=![];_0x5d3f25['scheduleType']&&(_0x293527['type']=_0x5d3f25[_0x3360e6(0xef)],_0x2cd548=!![]);_0x5d3f25[_0x3360e6(0x140)]&&(_0x293527['repeat_unit']=_0x5d3f25[_0x3360e6(0x140)],_0x2cd548=!![]);_0x5d3f25[_0x3360e6(0x10c)]!==undefined&&_0x5d3f25[_0x3360e6(0x10c)]!==null&&(_0x293527['repeat_frequency']=_0x5d3f25['repeatFrequency'],_0x2cd548=!![]);_0x5d3f25[_0x3360e6(0x124)]&&_0x5d3f25[_0x3360e6(0x124)][_0x3360e6(0x138)]>0x0&&(_0x293527['repeat_sub_frequency']=_0x5d3f25['repeatSubFrequency'],_0x2cd548=!![]);_0x5d3f25[_0x3360e6(0x116)]!==undefined&&(_0x293527[_0x3360e6(0x172)]=_0x5d3f25[_0x3360e6(0x116)],_0x2cd548=!![]);_0x5d3f25[_0x3360e6(0x123)]!==undefined&&(_0x293527[_0x3360e6(0x10f)]=_0x5d3f25['endOn'],_0x2cd548=!![]);_0x5d3f25['timezone']&&(_0x293527[_0x3360e6(0x162)]=_0x5d3f25[_0x3360e6(0x162)],_0x2cd548=!![]);_0x2cd548&&(_0x15dfb4[_0x3360e6(0x181)]=_0x293527);(_0x5d3f25[_0x3360e6(0xdf)]&&_0x5d3f25['notifyOn'][_0x3360e6(0x138)]>0x0||_0x5d3f25[_0x3360e6(0x15f)]&&_0x5d3f25[_0x3360e6(0x15f)][_0x3360e6(0x138)]>0x0)&&(_0x15dfb4['notification']={},_0x5d3f25[_0x3360e6(0xdf)]&&_0x5d3f25['notifyOn'][_0x3360e6(0x138)]>0x0&&(_0x15dfb4[_0x3360e6(0xf0)]['notify_on']=_0x5d3f25[_0x3360e6(0xdf)]),_0x5d3f25[_0x3360e6(0x15f)]&&_0x5d3f25[_0x3360e6(0x15f)][_0x3360e6(0x138)]>0x0&&(_0x15dfb4[_0x3360e6(0xf0)][_0x3360e6(0x15d)]=_0x5d3f25['emailRecipients'][_0x3360e6(0x152)](_0xaa39d5=>{const _0x26b1ad=_0x3360e6,_0x113400=_0x1bfddf?.[_0x26b1ad(0x113)](_0xaa39d5);return _0x113400??String(_0xaa39d5);})));_0x5d3f25['connectorConfig']&&Object[_0x3360e6(0x14c)](_0x5d3f25['connectorConfig'])[_0x3360e6(0x138)]>0x0&&(_0x15dfb4[_0x3360e6(0x13b)]=normalizeConnectorConfigForYaml(_0x5d3f25['connectorConfig']));_0x5d3f25[_0x3360e6(0x126)]&&(_0x15dfb4['activation_template_id']=_0x5d3f25[_0x3360e6(0x126)]);if(_0x5d3f25[_0x3360e6(0x108)]){const _0x4e63b5={},_0x522644=_0x5d3f25['syndicationBehavior'];_0x522644[_0x3360e6(0xe1)]&&_0x522644[_0x3360e6(0xe1)][_0x3360e6(0x138)]>0x0&&(_0x4e63b5[_0x3360e6(0xe1)]=_0x522644[_0x3360e6(0xe1)]['filter'](_0x130acb=>_0x130acb&&getColumnName(_0x130acb))[_0x3360e6(0x152)](_0xf3fde3=>({'name':getColumnName(_0xf3fde3),..._0xf3fde3['type']&&{'type':_0xf3fde3[_0x3360e6(0xd9)]},..._0xf3fde3[_0x3360e6(0x105)]&&{'visibility':_0xf3fde3['visibility']}}))),_0x522644[_0x3360e6(0x110)]&&(_0x4e63b5[_0x3360e6(0xda)]=_0x522644[_0x3360e6(0x110)]),_0x522644[_0x3360e6(0xea)]!==undefined&&(_0x4e63b5[_0x3360e6(0x170)]=_0x522644[_0x3360e6(0xea)]),_0x522644[_0x3360e6(0x102)]&&(_0x4e63b5[_0x3360e6(0x177)]=_0x522644[_0x3360e6(0x102)]),_0x522644[_0x3360e6(0x16a)]&&(_0x4e63b5[_0x3360e6(0x16a)]=_0x522644['formatting']),_0x522644[_0x3360e6(0x17f)]&&_0x522644[_0x3360e6(0x17f)][_0x3360e6(0x138)]>0x0&&(_0x4e63b5[_0x3360e6(0x180)]=_0x522644[_0x3360e6(0x17f)]),Object[_0x3360e6(0x14c)](_0x4e63b5)[_0x3360e6(0x138)]>0x0&&(_0x15dfb4[_0x3360e6(0x16d)]=_0x4e63b5);}return _0x5d3f25['nestedWorkflowProjectName']&&(_0x15dfb4[_0x3360e6(0x120)]=_0x5d3f25[_0x3360e6(0x14f)]),_0x5d3f25[_0x3360e6(0x137)]&&(_0x15dfb4[_0x3360e6(0x117)]=_0x5d3f25[_0x3360e6(0x137)]),_0x5d3f25[_0x3360e6(0x133)]!==undefined&&(_0x15dfb4[_0x3360e6(0x149)]=_0x5d3f25['lockEnabled']),_0x15dfb4;}export function journeyActivationStepToYaml(_0x4a126b,_0x96c2d8,_0x55311d){const _0x1ab91d=a142_0x24cc65,_0x487b07=_0x4a126b[_0x1ab91d(0x16e)][_0x1ab91d(0xd8)],_0x5b53cb=_0x487b07[_0x1ab91d(0x12d)]||'',_0x159d71=_0x55311d?.[_0x1ab91d(0x113)](_0x5b53cb)??_0x5b53cb,_0x1af0b0={'name':_0x487b07['name']||'','connection':_0x159d71};_0x4a126b[_0x1ab91d(0x16e)][_0x1ab91d(0xfc)]&&(_0x1af0b0[_0x1ab91d(0x16c)]=!![]);_0x487b07[_0x1ab91d(0x175)]&&(_0x1af0b0['description']=_0x487b07[_0x1ab91d(0x175)]);let _0x185483=[];_0x487b07[_0x1ab91d(0xe1)]&&_0x487b07[_0x1ab91d(0xe1)][_0x1ab91d(0x138)]>0x0&&(_0x185483=_0x487b07[_0x1ab91d(0xe1)]['filter'](_0x62e7c1=>_0x62e7c1&&getColumnName(_0x62e7c1))[_0x1ab91d(0x152)](_0x1a4843=>{const _0x10f3cf=_0x1ab91d,_0x49d35f=getColumnName(_0x1a4843);if(_0x1a4843[_0x10f3cf(0xd9)]||_0x1a4843[_0x10f3cf(0x105)])return{'name':_0x49d35f,..._0x1a4843[_0x10f3cf(0xd9)]&&{'type':_0x1a4843[_0x10f3cf(0xd9)]},..._0x1a4843['visibility']&&{'visibility':_0x1a4843[_0x10f3cf(0x105)]}};return _0x49d35f;}));_0x185483[_0x1ab91d(0x138)]>0x0&&(_0x1af0b0[_0x1ab91d(0xe1)]=_0x185483);_0x487b07[_0x1ab91d(0x17c)]!==undefined&&(_0x487b07[_0x1ab91d(0x17c)]===![]&&_0x185483[_0x1ab91d(0x138)]===0x0?_0x1af0b0[_0x1ab91d(0xf4)]=!![]:_0x1af0b0[_0x1ab91d(0xf4)]=_0x487b07[_0x1ab91d(0x17c)]);const _0x44c05b={};let _0x3d9d6b=![];_0x487b07['scheduleType']&&(_0x44c05b['type']=_0x487b07[_0x1ab91d(0xef)],_0x3d9d6b=!![]);_0x487b07[_0x1ab91d(0x140)]&&(_0x44c05b['repeat_unit']=_0x487b07[_0x1ab91d(0x140)],_0x3d9d6b=!![]);_0x487b07[_0x1ab91d(0x10c)]!==undefined&&_0x487b07[_0x1ab91d(0x10c)]!==null&&(_0x44c05b['repeat_frequency']=_0x487b07['repeatFrequency'],_0x3d9d6b=!![]);_0x487b07[_0x1ab91d(0x116)]!==undefined&&(_0x44c05b[_0x1ab91d(0x172)]=_0x487b07[_0x1ab91d(0x116)],_0x3d9d6b=!![]);_0x487b07[_0x1ab91d(0x123)]!==undefined&&(_0x44c05b['end_on']=_0x487b07[_0x1ab91d(0x123)],_0x3d9d6b=!![]);_0x487b07[_0x1ab91d(0x162)]&&(_0x44c05b[_0x1ab91d(0x162)]=_0x487b07[_0x1ab91d(0x162)],_0x3d9d6b=!![]);_0x3d9d6b&&(_0x1af0b0[_0x1ab91d(0x181)]=_0x44c05b);(_0x487b07[_0x1ab91d(0xdf)]&&_0x487b07['notifyOn'][_0x1ab91d(0x138)]>0x0||_0x487b07[_0x1ab91d(0x15f)]&&_0x487b07[_0x1ab91d(0x15f)][_0x1ab91d(0x138)]>0x0)&&(_0x1af0b0[_0x1ab91d(0xf0)]={},_0x487b07[_0x1ab91d(0xdf)]&&_0x487b07['notifyOn']['length']>0x0&&(_0x1af0b0['notification']['notify_on']=_0x487b07[_0x1ab91d(0xdf)]),_0x487b07[_0x1ab91d(0x15f)]&&_0x487b07[_0x1ab91d(0x15f)][_0x1ab91d(0x138)]>0x0&&(_0x1af0b0[_0x1ab91d(0xf0)][_0x1ab91d(0x15d)]=_0x487b07[_0x1ab91d(0x15f)][_0x1ab91d(0x152)](_0x52778a=>{const _0x185ba3=_0x1ab91d,_0x11d77a=_0x96c2d8?.[_0x185ba3(0x113)](_0x52778a);return _0x11d77a??String(_0x52778a);})));_0x487b07[_0x1ab91d(0xf1)]&&Object[_0x1ab91d(0x14c)](_0x487b07[_0x1ab91d(0xf1)])[_0x1ab91d(0x138)]>0x0&&(_0x1af0b0['connector_config']=normalizeConnectorConfigForYaml(_0x487b07['connectorConfig']));_0x487b07[_0x1ab91d(0x126)]&&(_0x1af0b0[_0x1ab91d(0x16b)]=_0x487b07['activationTemplateId']);if(_0x487b07['syndicationBehavior']){const _0xa5de99={},_0x649678=_0x487b07['syndicationBehavior'];_0x649678[_0x1ab91d(0xe1)]&&_0x649678[_0x1ab91d(0xe1)]['length']>0x0&&(_0xa5de99[_0x1ab91d(0xe1)]=_0x649678['columns'][_0x1ab91d(0x111)](_0x33a88d=>_0x33a88d&&getColumnName(_0x33a88d))[_0x1ab91d(0x152)](_0x2ad63c=>({'name':getColumnName(_0x2ad63c),..._0x2ad63c[_0x1ab91d(0xd9)]&&{'type':_0x2ad63c[_0x1ab91d(0xd9)]},..._0x2ad63c[_0x1ab91d(0x105)]&&{'visibility':_0x2ad63c[_0x1ab91d(0x105)]}}))),_0x649678['behaviorTableName']&&(_0xa5de99[_0x1ab91d(0xda)]=_0x649678['behaviorTableName']),_0x649678['joinRow']!==undefined&&(_0xa5de99[_0x1ab91d(0x170)]=_0x649678[_0x1ab91d(0xea)]),_0x649678[_0x1ab91d(0x102)]&&(_0xa5de99[_0x1ab91d(0x177)]=_0x649678[_0x1ab91d(0x102)]),_0x649678['formatting']&&(_0xa5de99[_0x1ab91d(0x16a)]=_0x649678[_0x1ab91d(0x16a)]),_0x649678[_0x1ab91d(0x17f)]&&_0x649678[_0x1ab91d(0x17f)]['length']>0x0&&(_0xa5de99[_0x1ab91d(0x180)]=_0x649678[_0x1ab91d(0x17f)]),Object[_0x1ab91d(0x14c)](_0xa5de99)[_0x1ab91d(0x138)]>0x0&&(_0x1af0b0['behavior']=_0xa5de99);}return _0x1af0b0;}export function segmentWithActivationsToYaml(_0x2976a4,_0x20559a,_0xc03e83,_0x36ced7,_0x1aa8c4){const _0x2284d7=a142_0x24cc65,_0x1f3f10=segmentResponseToDefSync(_0x2976a4,_0xc03e83);return _0x20559a['length']>0x0&&(_0x1f3f10[_0x2284d7(0x13c)]=_0x20559a[_0x2284d7(0x152)](_0x4cccb8=>activationResponseToDef(_0x4cccb8,_0x36ced7,_0x1aa8c4))),_0x1f3f10;}function normalizeColumn(_0xce03ce){const _0x4f0d41=a142_0x24cc65;if(typeof _0xce03ce===_0x4f0d41(0xf2))return{'column':_0xce03ce,'source':{'column':_0xce03ce}};return{'column':_0xce03ce[_0x4f0d41(0x179)],'source':{'column':_0xce03ce[_0x4f0d41(0x179)]},..._0xce03ce[_0x4f0d41(0xd9)]&&{'type':_0xce03ce[_0x4f0d41(0xd9)]},..._0xce03ce[_0x4f0d41(0x105)]&&{'visibility':_0xce03ce[_0x4f0d41(0x105)]}};}const KNOWN_ACTIVATION_FIELDS=new Set(Object[a142_0x24cc65(0x14c)](ActivationDefSchema[a142_0x24cc65(0xfa)]));export function warnUnrecognizedActivationFields(_0x47f266,_0x11c23c){const _0x84dd22=a142_0x24cc65,_0x3180ac=Object['keys'](_0x47f266)[_0x84dd22(0x111)](_0x14d13d=>!KNOWN_ACTIVATION_FIELDS[_0x84dd22(0x10b)](_0x14d13d));if(_0x3180ac[_0x84dd22(0x138)]>0x0){const _0x56d11a=_0x3180ac[_0x84dd22(0x152)](_0x5c440a=>_0x84dd22(0xfe)+_0x5c440a+'\x22')[_0x84dd22(0x13a)]('\x0a');console[_0x84dd22(0x171)](_0x84dd22(0x164)+_0x11c23c+_0x84dd22(0x134)+_0x56d11a);}}export async function activationDefToCreateRequest(_0x41d76d,_0x4ce43d){const _0x496fbe=a142_0x24cc65;warnUnrecognizedActivationFields(_0x41d76d,_0x41d76d['name']);const _0x117572=_0x4ce43d?.[_0x496fbe(0xd6)],_0x319a16=_0x4ce43d?.[_0x496fbe(0x144)],_0x27fccc=_0x41d76d[_0x496fbe(0xd3)];let _0x59f57c;const _0x1c9e18=parseInt(_0x27fccc,0xa);if(!isNaN(_0x1c9e18)&&String(_0x1c9e18)===_0x27fccc)_0x59f57c=_0x1c9e18;else{const _0x156759=_0x319a16?.[_0x496fbe(0x113)](_0x27fccc);if(_0x156759===undefined)throw new SDKError(ErrorCode['CONNECTION_NOT_FOUND'],_0x496fbe(0xe6)+_0x27fccc,undefined,{'helpText':'Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections'});_0x59f57c=_0x156759;}const _0x10300b={'name':_0x41d76d[_0x496fbe(0x179)],'connectionId':_0x59f57c};_0x41d76d[_0x496fbe(0x175)]&&(_0x10300b[_0x496fbe(0x175)]=_0x41d76d[_0x496fbe(0x175)]);let _0x5a006d=[];_0x41d76d[_0x496fbe(0xe1)]&&_0x41d76d[_0x496fbe(0xe1)][_0x496fbe(0x138)]>0x0&&(_0x5a006d=_0x41d76d[_0x496fbe(0xe1)][_0x496fbe(0x111)](_0x2f42f7=>_0x2f42f7!=null)['map'](normalizeColumn));_0x5a006d['length']>0x0&&(_0x10300b[_0x496fbe(0xe1)]=_0x5a006d);_0x41d76d[_0x496fbe(0xf4)]!==undefined&&(_0x41d76d[_0x496fbe(0xf4)]===![]&&_0x5a006d[_0x496fbe(0x138)]===0x0?_0x10300b[_0x496fbe(0x17c)]=!![]:_0x10300b[_0x496fbe(0x17c)]=_0x41d76d[_0x496fbe(0xf4)]);if(_0x41d76d['schedule']){const _0x3bfb4a=_0x41d76d[_0x496fbe(0x181)],_0x4e4516=_0x3bfb4a[_0x496fbe(0xd9)]??REPEAT_UNIT_TO_SCHEDULE_TYPE[_0x3bfb4a[_0x496fbe(0xe4)]];_0x4e4516&&(_0x10300b[_0x496fbe(0xef)]=_0x4e4516);const _0x176c2f=_0x3bfb4a['repeat_unit']??SCHEDULE_TYPE_TO_REPEAT_UNIT[_0x3bfb4a[_0x496fbe(0xd9)]];_0x176c2f&&(_0x10300b[_0x496fbe(0x140)]=_0x176c2f);_0x3bfb4a[_0x496fbe(0x148)]!==undefined&&(_0x10300b['repeatFrequency']=_0x3bfb4a['repeat_frequency']);_0x3bfb4a[_0x496fbe(0xe7)]&&(_0x10300b[_0x496fbe(0x124)]=_0x3bfb4a[_0x496fbe(0xe7)]);_0x3bfb4a['start_at']!==undefined&&(_0x10300b[_0x496fbe(0x116)]=_0x3bfb4a[_0x496fbe(0x172)]);_0x3bfb4a[_0x496fbe(0x10f)]!==undefined&&(_0x10300b[_0x496fbe(0x123)]=_0x3bfb4a[_0x496fbe(0x10f)]);_0x3bfb4a['timezone']&&(_0x10300b[_0x496fbe(0x162)]=_0x3bfb4a[_0x496fbe(0x162)]);if(_0x4e4516&&_0x4e4516!==_0x496fbe(0x146)&&_0x4e4516!==_0x496fbe(0x17e)&&_0x3bfb4a['start_at']){const _0x3be5db=_0x3bfb4a['start_at'][_0x496fbe(0xd7)](/T(\d{2}:\d{2})/);_0x3be5db&&(_0x10300b['scheduleOption']=_0x3be5db[0x1]);}}_0x41d76d[_0x496fbe(0xf0)]&&(_0x41d76d[_0x496fbe(0xf0)]['notify_on']&&(_0x10300b['notifyOn']=_0x41d76d[_0x496fbe(0xf0)]['notify_on']),_0x41d76d[_0x496fbe(0xf0)]['email_recipients']&&(_0x10300b[_0x496fbe(0x15f)]=_0x41d76d[_0x496fbe(0xf0)][_0x496fbe(0x15d)][_0x496fbe(0x152)](_0x47d7b1=>{const _0x14aa58=_0x496fbe,_0x1bfa6a=Number(_0x47d7b1);if(!isNaN(_0x1bfa6a)&&String(_0x1bfa6a)===_0x47d7b1)return _0x1bfa6a;const _0x52f787=_0x117572?.['get'](_0x47d7b1[_0x14aa58(0x14d)]());if(_0x52f787===undefined)throw new SDKError(ErrorCode[_0x14aa58(0x17d)],'Unknown\x20email\x20recipient:\x20'+_0x47d7b1+'.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.');return _0x52f787;})));if(_0x41d76d[_0x496fbe(0x13b)]){const _0x2aed2f=_0x4ce43d?.[_0x496fbe(0x169)]?.[_0x496fbe(0x113)](_0x27fccc);if(_0x2aed2f&&_0x4ce43d?.[_0x496fbe(0x13e)])try{const _0x313b74=await _0x4ce43d[_0x496fbe(0x13e)](_0x2aed2f),_0x61a3fb=validateConnectorConfig(_0x41d76d[_0x496fbe(0x13b)],_0x313b74);if(!_0x61a3fb[_0x496fbe(0x160)])throw new SDKError(ErrorCode[_0x496fbe(0xce)],_0x496fbe(0x176)+_0x41d76d[_0x496fbe(0x179)]+'\x22:\x0a'+formatValidationErrors(_0x61a3fb['errors']),undefined,{'helpText':_0x496fbe(0x147)+_0x2aed2f+'\x0a\x0aAvailable\x20fields:\x0a'+formatSchemaAsHelp(_0x313b74)});if(_0x61a3fb['warnings'][_0x496fbe(0x138)]>0x0){const _0x55ae1=formatValidationWarnings(_0x61a3fb[_0x496fbe(0xdc)]);console[_0x496fbe(0x171)](_0x496fbe(0x165)+_0x41d76d[_0x496fbe(0x179)]+_0x496fbe(0x17b)+_0x55ae1);}_0x10300b[_0x496fbe(0xf1)]=transformConfigToLegacy(_0x41d76d['connector_config'],_0x313b74);}catch(_0x537983){if(_0x537983 instanceof SDKError&&_0x537983[_0x496fbe(0xde)]===ErrorCode[_0x496fbe(0x12c)])_0x10300b[_0x496fbe(0xf1)]=_0x41d76d[_0x496fbe(0x13b)];else throw _0x537983;}else _0x10300b[_0x496fbe(0xf1)]=_0x41d76d[_0x496fbe(0x13b)];}_0x41d76d[_0x496fbe(0x16b)]!==undefined&&(_0x10300b[_0x496fbe(0x126)]=_0x41d76d['activation_template_id']);if(_0x41d76d[_0x496fbe(0x16d)]){const _0xdfca75=_0x41d76d[_0x496fbe(0x16d)],_0x13bf28={};if(_0xdfca75[_0x496fbe(0xe1)]&&_0xdfca75[_0x496fbe(0xe1)]['length']>0x0){const _0x213ee3=_0xdfca75[_0x496fbe(0xe1)][_0x496fbe(0x111)](_0x3849fc=>_0x3849fc&&_0x3849fc[_0x496fbe(0x179)])['map'](normalizeColumn);_0x213ee3[_0x496fbe(0x138)]>0x0&&(_0x13bf28['columns']=_0x213ee3);}_0xdfca75[_0x496fbe(0xda)]&&(_0x13bf28[_0x496fbe(0x110)]=_0xdfca75[_0x496fbe(0xda)]);_0xdfca75[_0x496fbe(0x177)]&&(_0x13bf28[_0x496fbe(0x102)]=_0xdfca75[_0x496fbe(0x177)]);if(_0xdfca75[_0x496fbe(0x170)]!==undefined)_0x13bf28['joinRow']=_0xdfca75['join_row'];else{if(_0xdfca75[_0x496fbe(0x177)]===_0x496fbe(0xfd)||_0xdfca75['join_strategy']===_0x496fbe(0xfb))_0x13bf28[_0x496fbe(0xea)]=0x1;else _0xdfca75['join_strategy']===_0x496fbe(0xf8)&&(_0x13bf28[_0x496fbe(0xea)]=null);}_0xdfca75[_0x496fbe(0x16a)]&&(_0x13bf28[_0x496fbe(0x16a)]=_0xdfca75[_0x496fbe(0x16a)]),_0xdfca75[_0x496fbe(0x180)]&&(_0x13bf28['orderBy']=_0xdfca75[_0x496fbe(0x180)]),_0x10300b[_0x496fbe(0x108)]=_0x13bf28;}return _0x41d76d[_0x496fbe(0x120)]&&(_0x10300b['nestedWorkflowProjectName']=_0x41d76d[_0x496fbe(0x120)]),_0x41d76d[_0x496fbe(0x117)]&&(_0x10300b['nestedWorkflowName']=_0x41d76d[_0x496fbe(0x117)]),_0x41d76d[_0x496fbe(0x149)]!==undefined&&(_0x10300b[_0x496fbe(0x133)]=_0x41d76d[_0x496fbe(0x149)]),_0x10300b;}export async function activationDefToUpdateRequest(_0x4c9887,_0xb41354){return activationDefToCreateRequest(_0x4c9887,_0xb41354);}export function deepSortObject(_0x3cb4bc){const _0x514df8=a142_0x24cc65;if(_0x3cb4bc===null||typeof _0x3cb4bc!=='object')return _0x3cb4bc;if(Array[_0x514df8(0x168)](_0x3cb4bc))return _0x3cb4bc[_0x514df8(0x152)](deepSortObject)[_0x514df8(0xe0)]((_0x3771bc,_0x565610)=>JSON['stringify'](_0x3771bc)['localeCompare'](JSON['stringify'](_0x565610)));const _0x5c1126={};for(const _0x58f61f of Object[_0x514df8(0x14c)](_0x3cb4bc)[_0x514df8(0xe0)]()){_0x5c1126[_0x58f61f]=deepSortObject(_0x3cb4bc[_0x58f61f]);}return _0x5c1126;}export function serializeRule(_0x4234a1){const _0x4af443=a142_0x24cc65;return JSON[_0x4af443(0xf5)](deepSortObject(_0x4234a1));}export function normalizeRuleForMatching(_0x424d7a){return normalizeConditionsForMatching(_0x424d7a);}function normalizeConditionsForMatching(_0xab0a68){const _0x3d159c=a142_0x24cc65;if(_0xab0a68===null||typeof _0xab0a68!==_0x3d159c(0x10d))return _0xab0a68;if(Array['isArray'](_0xab0a68))return _0xab0a68[_0x3d159c(0x152)](normalizeConditionsForMatching);const _0x36a158=_0xab0a68;if((_0x36a158[_0x3d159c(0xd9)]===_0x3d159c(0x159)||_0x36a158[_0x3d159c(0xd9)]==='exclude')&&typeof _0x36a158['segment']==='string')return{..._0x36a158,'segment':_0x3d159c(0x139)};const _0x1df16b={};for(const _0x47cdab of Object[_0x3d159c(0x14c)](_0x36a158)){_0x1df16b[_0x47cdab]=normalizeConditionsForMatching(_0x36a158[_0x47cdab]);}return _0x1df16b;}export function serializeRuleForMatching(_0x4a283f){const _0x494d06=a142_0x24cc65;return JSON[_0x494d06(0xf5)](deepSortObject(normalizeRuleForMatching(_0x4a283f)));}export function expandSegmentReferences(_0x2ebd2e,_0x46a4f4,_0xb8b80a=new Set()){return expandConditions(_0x2ebd2e,_0x46a4f4,_0xb8b80a);}function expandConditions(_0x2c9a57,_0x5c3bc3,_0x4558f2){const _0x314ff9=a142_0x24cc65;if(_0x2c9a57===null||typeof _0x2c9a57!=='object')return _0x2c9a57;if(Array[_0x314ff9(0x168)](_0x2c9a57))return _0x2c9a57[_0x314ff9(0x152)](_0x5c7253=>expandConditions(_0x5c7253,_0x5c3bc3,_0x4558f2));const _0x4f626f=_0x2c9a57;if((_0x4f626f[_0x314ff9(0xd9)]===_0x314ff9(0x159)||_0x4f626f['type']==='exclude')&&typeof _0x4f626f[_0x314ff9(0x130)]===_0x314ff9(0xf2)){const _0x431a75=_0x4f626f[_0x314ff9(0x130)],_0x5e18d8=_0x5c3bc3[_0x314ff9(0x113)](_0x431a75);if(_0x5e18d8&&!_0x4558f2[_0x314ff9(0x10b)](_0x431a75)){const _0x72b40b=new Set(_0x4558f2);_0x72b40b[_0x314ff9(0xcc)](_0x431a75);const _0x434358=expandConditions(_0x5e18d8,_0x5c3bc3,_0x72b40b);return{'type':_0x4f626f[_0x314ff9(0xd9)],'expanded_rule':_0x434358};}return{'type':_0x4f626f['type'],'expanded_rule':'__UNRESOLVED__'};}const _0x57d462={};for(const _0x1b6c53 of Object[_0x314ff9(0x14c)](_0x4f626f)){_0x57d462[_0x1b6c53]=expandConditions(_0x4f626f[_0x1b6c53],_0x5c3bc3,_0x4558f2);}return _0x57d462;}export function serializeExpandedRule(_0x300cee,_0x2beee7){const _0xf92201=a142_0x24cc65,_0x50eb70=expandSegmentReferences(_0x300cee,_0x2beee7);return JSON[_0xf92201(0xf5)](deepSortObject(_0x50eb70));}export function createSegmentNameContext(_0x33353f){const _0x5ba8c9=a142_0x24cc65,_0x12172b=new Set(),_0x2bb15c=new Map(),_0x99abfb=new Map();if(_0x33353f)for(const [_0x5f0960,_0x466a73]of Object[_0x5ba8c9(0x182)](_0x33353f)){if(_0x466a73[_0x5ba8c9(0xe9)]){const _0x3156ed=serializeRule(_0x466a73['rule']);_0x99abfb[_0x5ba8c9(0x12b)](_0x3156ed,_0x5f0960),_0x12172b[_0x5ba8c9(0xcc)](_0x5f0960);}}return{'usedNames':_0x12172b,'ruleHashToName':_0x2bb15c,'localRuleToName':_0x33353f?_0x99abfb:undefined};}export function resolveSegmentName(_0x276f82,_0x2f0911,_0x340552,_0x13470c){const _0xd6cf4a=a142_0x24cc65,_0x5bb532=serializeRule(_0x2f0911);if(_0x340552[_0xd6cf4a(0x10a)]){const _0x1b18ec=_0x340552[_0xd6cf4a(0x10a)]['get'](_0x5bb532);if(_0x1b18ec)return{'name':_0x1b18ec,'isDuplicate':![],'isLocalMatch':!![]};}const _0x18f23b=_0x340552[_0xd6cf4a(0xe3)]['get'](_0x5bb532);if(_0x18f23b)return{'name':_0x18f23b,'isDuplicate':!![],'isLocalMatch':![]};const _0x1e9520=_0x13470c(_0x276f82);let _0x5d948c=_0x1e9520||_0x276f82,_0x2ce86a=_0x5d948c,_0x207916=0x2;while(_0x340552[_0xd6cf4a(0x142)]['has'](_0x2ce86a)){_0x2ce86a=_0x5d948c+'_'+_0x207916,_0x207916++;}return _0x340552['usedNames']['add'](_0x2ce86a),_0x340552[_0xd6cf4a(0xe3)][_0xd6cf4a(0x12b)](_0x5bb532,_0x2ce86a),{'name':_0x2ce86a,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x1716a4){const _0x25a789=[],_0x332a41=_0x6d566e=>{const _0x324508=a142_0x2990;if(!_0x6d566e||typeof _0x6d566e!==_0x324508(0x10d))return;if(Array[_0x324508(0x168)](_0x6d566e)){_0x6d566e['forEach'](_0x332a41);return;}const _0x39fecf=_0x6d566e;(_0x39fecf[_0x324508(0xd9)]===_0x324508(0x159)||_0x39fecf[_0x324508(0xd9)]===_0x324508(0x12e))&&typeof _0x39fecf[_0x324508(0x130)]==='string'&&_0x25a789['push'](_0x39fecf['segment']);for(const _0x4bcde3 of Object[_0x324508(0x163)](_0x39fecf)){_0x332a41(_0x4bcde3);}};return _0x332a41(_0x1716a4),_0x25a789;}export function validateSegmentRule(_0x861275,_0x20abda){const _0x395408=a142_0x24cc65;if(!_0x20abda||!_0x20abda[_0x395408(0x154)])return;for(let _0x3c4853=0x0;_0x3c4853<_0x20abda['conditions']['length'];_0x3c4853++){const _0xdf6b99=_0x20abda[_0x395408(0x154)][_0x3c4853];if(_0x395408(0xd9)in _0xdf6b99&&_0xdf6b99['type']===_0x395408(0x109)){const _0x37b187=_0xdf6b99,_0x2bce3e=_0x37b187[_0x395408(0xe5)]||_0x37b187[_0x395408(0x158)];if((!_0x37b187[_0x395408(0x114)]||_0x37b187[_0x395408(0x114)]==='')&&!_0x2bce3e)throw new SDKError(ErrorCode[_0x395408(0x13f)],_0x395408(0x15a)+_0x861275+_0x395408(0x106)+(_0x395408(0x132)+_0x3c4853+_0x395408(0x15b))+_0x395408(0x167));}}}
@@ -1 +1 @@
1
- function a143_0x4fbd(){const _0x55e1c5=['sort','filter','fields','query','parentColumn','cyan','bold','matrixColumnName','82596QJjsDN','1837YbwIFv','replace','Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).','2352698TtsCzR','varchar','1919490kKSotj','get','SELECT\x20*\x20FROM\x20(\x0a','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','set','906PuTSWC','12UUMzjO','some','source','startsWith','column_type','tableName','54MxFplC','3392544HJyGie','slice','error','length','behaviorName','verbose','key','Schema\x20query:\x0a','38815BnRahq','size','behavior','2523528TQujLq','Unknown','1SfFAkE','matrixTableName','push','data','name','93222iOfKbC','null','parentTableName','type','displayName','dim','Fetching\x20schema...','Attributes','trim','entries'];a143_0x4fbd=function(){return _0x55e1c5;};return a143_0x4fbd();}(function(_0x46845b,_0x5955ea){const _0x15e6a1=a143_0x4ffc,_0x2adb13=_0x46845b();while(!![]){try{const _0x5f387e=-parseInt(_0x15e6a1(0x124))/0x1*(-parseInt(_0x15e6a1(0x13f))/0x2)+parseInt(_0x15e6a1(0x129))/0x3*(-parseInt(_0x15e6a1(0x147))/0x4)+-parseInt(_0x15e6a1(0x11f))/0x5*(-parseInt(_0x15e6a1(0x146))/0x6)+parseInt(_0x15e6a1(0x122))/0x7+parseInt(_0x15e6a1(0x14e))/0x8+parseInt(_0x15e6a1(0x14d))/0x9*(-parseInt(_0x15e6a1(0x141))/0xa)+-parseInt(_0x15e6a1(0x13c))/0xb*(parseInt(_0x15e6a1(0x13b))/0xc);if(_0x5f387e===_0x5955ea)break;else _0x2adb13['push'](_0x2adb13['shift']());}catch(_0x149644){_0x2adb13['push'](_0x2adb13['shift']());}}}(a143_0x4fbd,0xb45c5));import a143_0xd9d24d from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x1a58b7){const _0x5a436c=a143_0x4ffc,_0x58ad8b=_0x1a58b7['columns']['map'](_0xdbb15c=>({'column_name':_0xdbb15c[_0x5a436c(0x128)],'column_type':_0xdbb15c[_0x5a436c(0x12c)],'null':'YES','key':null,'default':null,'extra':null}));return{..._0x1a58b7,'columns':[{'name':'column_name','type':_0x5a436c(0x140)},{'name':_0x5a436c(0x14b),'type':_0x5a436c(0x140)},{'name':_0x5a436c(0x12a),'type':_0x5a436c(0x140)},{'name':_0x5a436c(0x11d),'type':_0x5a436c(0x140)},{'name':'default','type':_0x5a436c(0x140)},{'name':'extra','type':'varchar'}],'data':_0x58ad8b};}export async function executeSchemaQuery(_0x1e2cad,_0x2eb766,_0x3f0db5){const _0x1cef65=a143_0x4ffc,_0x431bc3=_0x1e2cad[_0x1cef65(0x131)]()[_0x1cef65(0x13d)](/;+$/,''),_0x283eeb=_0x1cef65(0x143)+_0x431bc3+_0x1cef65(0x144);_0x3f0db5[_0x1cef65(0x11c)]&&console[_0x1cef65(0x150)](_0x1cef65(0x11e)+_0x283eeb);const _0x34720f=await withProgressSpinner(_0x1cef65(0x12f),async _0x30417e=>{const _0x37e284=_0x1cef65,_0x22e79b=await _0x2eb766[_0x37e284(0x136)]['execute'](_0x283eeb,{'catalog':'td','schema':'information_schema','onJobId':_0x306e35=>{_0x30417e['setJobId'](_0x306e35);}});return _0x22e79b;},{'verbose':_0x3f0db5[_0x1cef65(0x11c)]});return buildSchemaResult(_0x34720f[_0x1cef65(0x127)]);}function columnName(_0x317dea){const _0x306e66=a143_0x4ffc;return _0x317dea[_0x306e66(0x13a)]||_0x317dea[_0x306e66(0x137)]||_0x317dea[_0x306e66(0x128)];}function a143_0x4ffc(_0x4efdbc,_0x22a867){_0x4efdbc=_0x4efdbc-0x11a;const _0x4fbde1=a143_0x4fbd();let _0x4ffc35=_0x4fbde1[_0x4efdbc];return _0x4ffc35;}function formatFieldLine(_0x9dddfa,_0x4b8c44,_0x58e83e){const _0x3ba943=a143_0x4ffc,_0x2beddb=_0x9dddfa!==_0x4b8c44?'\x20'+a143_0xd9d24d[_0x3ba943(0x12e)]('('+_0x4b8c44+')'):'';return'\x20\x20\x20\x20'+_0x9dddfa+_0x2beddb+':\x20'+a143_0xd9d24d[_0x3ba943(0x138)](_0x58e83e);}function sortByColumnName(_0x5336a4){const _0xbda917=a143_0x4ffc;return[..._0x5336a4][_0xbda917(0x133)]((_0x5b78fc,_0x226006)=>columnName(_0x5b78fc)['localeCompare'](columnName(_0x226006)));}export function displayFieldsHumanReadable(_0x3e7d4d,_0x2b7fb0){const _0x2e9154=a143_0x4ffc,_0x91db02=_0x3e7d4d[_0x2e9154(0x134)](_0x1d7c66=>_0x1d7c66[_0x2e9154(0x149)]==='attribute'),_0x5211bb=_0x3e7d4d['filter'](_0x275bbe=>_0x275bbe['source']===_0x2e9154(0x121)),_0x29e60a=new Map();for(const _0xd7bbbf of _0x91db02){const _0x73be71=_0xd7bbbf['groupingName']||_0xd7bbbf[_0x2e9154(0x12b)]||_0x2e9154(0x123),_0x3bf357=_0x29e60a[_0x2e9154(0x142)](_0x73be71);_0x3bf357?_0x3bf357[_0x2e9154(0x135)][_0x2e9154(0x126)](_0xd7bbbf):_0x29e60a[_0x2e9154(0x145)](_0x73be71,{'displayName':_0x73be71,'tableName':_0xd7bbbf[_0x2e9154(0x12b)],'fields':[_0xd7bbbf]});}const _0x671604=new Map();for(const _0x3eefb8 of _0x5211bb){const _0x27fcb4=_0x3eefb8[_0x2e9154(0x11b)]||_0x2e9154(0x123),_0x208e94=_0x671604[_0x2e9154(0x142)](_0x27fcb4)||[];_0x208e94[_0x2e9154(0x126)](_0x3eefb8),_0x671604['set'](_0x27fcb4,_0x208e94);}console['error']('\x0a'+a143_0xd9d24d['bold'](_0x2b7fb0));if(_0x29e60a[_0x2e9154(0x120)]>0x0){console['error']('\x0a'+a143_0xd9d24d['dim'](_0x2e9154(0x130)));const _0x2e2d07=[..._0x29e60a[_0x2e9154(0x132)]()][_0x2e9154(0x133)]((_0x14af65,_0x4eabac)=>_0x14af65[0x0]['localeCompare'](_0x4eabac[0x0]));for(const [,_0x3b3412]of _0x2e2d07){const _0x5b8df0=_0x3b3412[_0x2e9154(0x14c)]&&_0x3b3412[_0x2e9154(0x14c)]!==_0x3b3412[_0x2e9154(0x12d)]?'\x20'+a143_0xd9d24d[_0x2e9154(0x12e)]('('+_0x3b3412['tableName']+')'):'';console['error']('\x20\x20'+a143_0xd9d24d[_0x2e9154(0x139)](_0x3b3412[_0x2e9154(0x12d)])+_0x5b8df0);for(const _0x4f4409 of sortByColumnName(_0x3b3412[_0x2e9154(0x135)])){console[_0x2e9154(0x150)](formatFieldLine(columnName(_0x4f4409),_0x4f4409[_0x2e9154(0x128)],_0x4f4409[_0x2e9154(0x12c)]));}}}if(_0x671604['size']>0x0){console[_0x2e9154(0x150)]('\x0a'+a143_0xd9d24d[_0x2e9154(0x12e)]('Behaviors'));const _0x34e3ed=[..._0x671604[_0x2e9154(0x132)]()]['sort']((_0x3c0427,_0x536b09)=>_0x3c0427[0x0]['localeCompare'](_0x536b09[0x0]));for(const [_0x490559,_0x29efc4]of _0x34e3ed){const _0x13b12a=_0x29efc4[0x0],_0x6477a9=_0x13b12a?.[_0x2e9154(0x125)];if(_0x6477a9){const _0x3ef81d=_0x6477a9!==_0x490559?'\x20'+a143_0xd9d24d[_0x2e9154(0x12e)]('('+_0x490559+')'):'';console['error']('\x20\x20'+a143_0xd9d24d[_0x2e9154(0x139)](_0x6477a9)+_0x3ef81d);}else{const _0x480b4b=_0x13b12a?.[_0x2e9154(0x12b)]||'';console[_0x2e9154(0x150)]('\x20\x20'+a143_0xd9d24d[_0x2e9154(0x139)](_0x490559)+(_0x480b4b?'\x20'+a143_0xd9d24d[_0x2e9154(0x12e)]('('+_0x480b4b+')'):''));}for(const _0x2bc83c of sortByColumnName(_0x29efc4)){const _0x45036e=_0x2bc83c[_0x2e9154(0x128)][_0x2e9154(0x14a)](_0x490559+'.')?_0x2bc83c['name'][_0x2e9154(0x14f)](_0x490559[_0x2e9154(0x11a)]+0x1):_0x2bc83c[_0x2e9154(0x128)];console['error'](formatFieldLine(columnName(_0x2bc83c),_0x45036e,_0x2bc83c[_0x2e9154(0x12c)]));}}}const _0x574179=_0x3e7d4d[_0x2e9154(0x148)](_0x22ff3d=>_0x22ff3d['matrixColumnName']||_0x22ff3d[_0x2e9154(0x125)]);_0x574179&&(console[_0x2e9154(0x150)]('\x0a'+a143_0xd9d24d[_0x2e9154(0x12e)](_0x2e9154(0x13e))),console[_0x2e9154(0x150)](a143_0xd9d24d['dim']('\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.'))),console['error']('');}
1
+ (function(_0x36d05b,_0x261720){const _0x267830=a143_0x3a9f,_0x374af3=_0x36d05b();while(!![]){try{const _0x2f6179=-parseInt(_0x267830(0x1b4))/0x1*(parseInt(_0x267830(0x198))/0x2)+parseInt(_0x267830(0x1bc))/0x3+parseInt(_0x267830(0x1aa))/0x4*(parseInt(_0x267830(0x188))/0x5)+-parseInt(_0x267830(0x1a2))/0x6+parseInt(_0x267830(0x1af))/0x7+parseInt(_0x267830(0x19f))/0x8+parseInt(_0x267830(0x1ba))/0x9*(-parseInt(_0x267830(0x1a5))/0xa);if(_0x2f6179===_0x261720)break;else _0x374af3['push'](_0x374af3['shift']());}catch(_0x357ab8){_0x374af3['push'](_0x374af3['shift']());}}}(a143_0x3508,0x94a73));import a143_0x215d8e from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x5038c9){const _0x2b2d0e=a143_0x3a9f,_0x385fd9=_0x5038c9['columns'][_0x2b2d0e(0x19d)](_0xad7e7e=>({'column_name':_0xad7e7e[_0x2b2d0e(0x1a4)],'column_type':_0xad7e7e[_0x2b2d0e(0x1a1)],'null':'YES','key':null,'default':null,'extra':null}));return{..._0x5038c9,'columns':[{'name':_0x2b2d0e(0x18a),'type':_0x2b2d0e(0x1b7)},{'name':_0x2b2d0e(0x19a),'type':_0x2b2d0e(0x1b7)},{'name':_0x2b2d0e(0x1bf),'type':_0x2b2d0e(0x1b7)},{'name':'key','type':_0x2b2d0e(0x1b7)},{'name':_0x2b2d0e(0x1b6),'type':_0x2b2d0e(0x1b7)},{'name':'extra','type':_0x2b2d0e(0x1b7)}],'data':_0x385fd9};}function a143_0x3a9f(_0xa73678,_0x566b5c){_0xa73678=_0xa73678-0x186;const _0x3508e1=a143_0x3508();let _0x3a9f6f=_0x3508e1[_0xa73678];return _0x3a9f6f;}export async function executeSchemaQuery(_0x1e3402,_0x1e93dd,_0x205298){const _0x419c52=a143_0x3a9f,_0x41db7f=_0x1e3402[_0x419c52(0x193)]()[_0x419c52(0x19e)](/;+$/,''),_0x33fc3c=_0x419c52(0x1a0)+_0x41db7f+_0x419c52(0x1c1);_0x205298[_0x419c52(0x190)]&&console[_0x419c52(0x194)](_0x419c52(0x1a6)+_0x33fc3c);const _0xaba480=await withProgressSpinner(_0x419c52(0x18e),async _0x43c19e=>{const _0x2c08c4=_0x419c52,_0x562333=await _0x1e93dd[_0x2c08c4(0x1a3)][_0x2c08c4(0x199)](_0x33fc3c,{'catalog':'td','schema':_0x2c08c4(0x1ab),'onJobId':_0x40b591=>{const _0x477525=_0x2c08c4;_0x43c19e[_0x477525(0x197)](_0x40b591);}});return _0x562333;},{'verbose':_0x205298[_0x419c52(0x190)]});return buildSchemaResult(_0xaba480['data']);}function columnName(_0x3563ad){const _0x44f08c=a143_0x3a9f;return _0x3563ad[_0x44f08c(0x195)]||_0x3563ad[_0x44f08c(0x1b0)]||_0x3563ad[_0x44f08c(0x1a4)];}function a143_0x3508(){const _0x8c5610=['Fetching\x20schema...','displayName','verbose','fields','set','trim','error','matrixColumnName','startsWith','setJobId','246538LTrzhh','execute','column_type','source','size','map','replace','8863056FysobE','SELECT\x20*\x20FROM\x20(\x0a','type','618048gxAjnA','query','name','15422730hONXDu','Schema\x20query:\x0a','behavior','dim','get','902788kvtpzl','information_schema','groupingName','tableName','Attributes','5737613sUiGMM','parentColumn','localeCompare','slice','Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).','5DdWlDm','\x20\x20\x20\x20','default','varchar','sort','Unknown','9qTIHah','Behaviors','2151813fIpBGQ','some','bold','null','push','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','filter','matrixTableName','5NddfWt','cyan','column_name','parentTableName','behaviorName','attribute'];a143_0x3508=function(){return _0x8c5610;};return a143_0x3508();}function formatFieldLine(_0xd7b344,_0x2dbb10,_0x3a91c7){const _0x201ff9=a143_0x3a9f,_0x521a61=_0xd7b344!==_0x2dbb10?'\x20'+a143_0x215d8e[_0x201ff9(0x1a8)]('('+_0x2dbb10+')'):'';return _0x201ff9(0x1b5)+_0xd7b344+_0x521a61+':\x20'+a143_0x215d8e[_0x201ff9(0x189)](_0x3a91c7);}function sortByColumnName(_0x2c3627){const _0x59849e=a143_0x3a9f;return[..._0x2c3627][_0x59849e(0x1b8)]((_0x1bd053,_0x2a54dc)=>columnName(_0x1bd053)[_0x59849e(0x1b1)](columnName(_0x2a54dc)));}export function displayFieldsHumanReadable(_0x3c7b5b,_0x1cb4d0){const _0x1e140a=a143_0x3a9f,_0xb41713=_0x3c7b5b[_0x1e140a(0x186)](_0x216112=>_0x216112[_0x1e140a(0x19b)]===_0x1e140a(0x18d)),_0x49f680=_0x3c7b5b['filter'](_0xc708b1=>_0xc708b1[_0x1e140a(0x19b)]===_0x1e140a(0x1a7)),_0x1f33b5=new Map();for(const _0x383f92 of _0xb41713){const _0x3a0d69=_0x383f92[_0x1e140a(0x1ac)]||_0x383f92[_0x1e140a(0x18b)]||_0x1e140a(0x1b9),_0x578b02=_0x1f33b5[_0x1e140a(0x1a9)](_0x3a0d69);_0x578b02?_0x578b02[_0x1e140a(0x191)]['push'](_0x383f92):_0x1f33b5[_0x1e140a(0x192)](_0x3a0d69,{'displayName':_0x3a0d69,'tableName':_0x383f92[_0x1e140a(0x18b)],'fields':[_0x383f92]});}const _0x586812=new Map();for(const _0x14bcb7 of _0x49f680){const _0x2d0c1e=_0x14bcb7[_0x1e140a(0x18c)]||'Unknown',_0x58d494=_0x586812[_0x1e140a(0x1a9)](_0x2d0c1e)||[];_0x58d494[_0x1e140a(0x1c0)](_0x14bcb7),_0x586812[_0x1e140a(0x192)](_0x2d0c1e,_0x58d494);}console[_0x1e140a(0x194)]('\x0a'+a143_0x215d8e['bold'](_0x1cb4d0));if(_0x1f33b5[_0x1e140a(0x19c)]>0x0){console['error']('\x0a'+a143_0x215d8e[_0x1e140a(0x1a8)](_0x1e140a(0x1ae)));const _0x57f2ac=[..._0x1f33b5['entries']()]['sort']((_0xc1d0ae,_0x101ce7)=>_0xc1d0ae[0x0][_0x1e140a(0x1b1)](_0x101ce7[0x0]));for(const [,_0x5aff4a]of _0x57f2ac){const _0x4fc19a=_0x5aff4a[_0x1e140a(0x1ad)]&&_0x5aff4a[_0x1e140a(0x1ad)]!==_0x5aff4a[_0x1e140a(0x18f)]?'\x20'+a143_0x215d8e[_0x1e140a(0x1a8)]('('+_0x5aff4a[_0x1e140a(0x1ad)]+')'):'';console[_0x1e140a(0x194)]('\x20\x20'+a143_0x215d8e[_0x1e140a(0x1be)](_0x5aff4a['displayName'])+_0x4fc19a);for(const _0x1c39fc of sortByColumnName(_0x5aff4a[_0x1e140a(0x191)])){console['error'](formatFieldLine(columnName(_0x1c39fc),_0x1c39fc[_0x1e140a(0x1a4)],_0x1c39fc[_0x1e140a(0x1a1)]));}}}if(_0x586812[_0x1e140a(0x19c)]>0x0){console[_0x1e140a(0x194)]('\x0a'+a143_0x215d8e[_0x1e140a(0x1a8)](_0x1e140a(0x1bb)));const _0x1e3cab=[..._0x586812['entries']()]['sort']((_0x30a468,_0xb94179)=>_0x30a468[0x0]['localeCompare'](_0xb94179[0x0]));for(const [_0x2827df,_0x2a5b78]of _0x1e3cab){const _0x4d8204=_0x2a5b78[0x0],_0x4457c8=_0x4d8204?.['matrixTableName'];if(_0x4457c8){const _0x55671b=_0x4457c8!==_0x2827df?'\x20'+a143_0x215d8e['dim']('('+_0x2827df+')'):'';console[_0x1e140a(0x194)]('\x20\x20'+a143_0x215d8e[_0x1e140a(0x1be)](_0x4457c8)+_0x55671b);}else{const _0x21c11c=_0x4d8204?.[_0x1e140a(0x18b)]||'';console[_0x1e140a(0x194)]('\x20\x20'+a143_0x215d8e[_0x1e140a(0x1be)](_0x2827df)+(_0x21c11c?'\x20'+a143_0x215d8e['dim']('('+_0x21c11c+')'):''));}for(const _0x307850 of sortByColumnName(_0x2a5b78)){const _0x1e2efa=_0x307850[_0x1e140a(0x1a4)][_0x1e140a(0x196)](_0x2827df+'.')?_0x307850[_0x1e140a(0x1a4)][_0x1e140a(0x1b2)](_0x2827df['length']+0x1):_0x307850[_0x1e140a(0x1a4)];console[_0x1e140a(0x194)](formatFieldLine(columnName(_0x307850),_0x1e2efa,_0x307850['type']));}}}const _0x452f72=_0x3c7b5b[_0x1e140a(0x1bd)](_0x161ff3=>_0x161ff3[_0x1e140a(0x195)]||_0x161ff3[_0x1e140a(0x187)]);_0x452f72&&(console['error']('\x0a'+a143_0x215d8e[_0x1e140a(0x1a8)](_0x1e140a(0x1b3))),console[_0x1e140a(0x194)](a143_0x215d8e[_0x1e140a(0x1a8)]('\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.'))),console[_0x1e140a(0x194)]('');}
@@ -1 +1 @@
1
- (function(_0x7b732c,_0x5aff21){const _0x25d18a=a144_0x146e,_0x164565=_0x7b732c();while(!![]){try{const _0x178659=parseInt(_0x25d18a(0x1f9))/0x1*(parseInt(_0x25d18a(0x1fc))/0x2)+parseInt(_0x25d18a(0x1f5))/0x3*(-parseInt(_0x25d18a(0x1ec))/0x4)+-parseInt(_0x25d18a(0x1ed))/0x5*(parseInt(_0x25d18a(0x1e8))/0x6)+parseInt(_0x25d18a(0x1fa))/0x7+-parseInt(_0x25d18a(0x1f0))/0x8+parseInt(_0x25d18a(0x1e9))/0x9+parseInt(_0x25d18a(0x1ef))/0xa*(-parseInt(_0x25d18a(0x1f1))/0xb);if(_0x178659===_0x5aff21)break;else _0x164565['push'](_0x164565['shift']());}catch(_0x580d9d){_0x164565['push'](_0x164565['shift']());}}}(a144_0x47cf,0x99cc0));function a144_0x47cf(){const _0x35c66a=['6VmCvIB','4588857hauqNX','.yml','toLowerCase','196348NAxXUA','1315565BZXmPB','endsWith','40tHZtCm','4649784YFIOhR','838992RBfqJz','.yaml','dirname','name','3wHCsoH','relative','isDirectory','map','297649MCjeBG','7146587vUbNEH','push','2lhcrYm'];a144_0x47cf=function(){return _0x35c66a;};return a144_0x47cf();}import{readdirSync,statSync}from'fs';import a144_0x4eb7e0 from'path';export function findYamlFiles(_0x8df074){const _0x58db58=[];function _0x269640(_0x51927e){const _0x3cc16e=a144_0x146e,_0x332bf0=readdirSync(_0x51927e,{'withFileTypes':!![]});for(const _0x2c722b of _0x332bf0){const _0x37148e=a144_0x4eb7e0['join'](_0x51927e,_0x2c722b[_0x3cc16e(0x1f4)]);if(_0x2c722b[_0x3cc16e(0x1f7)]())_0x269640(_0x37148e);else(_0x2c722b[_0x3cc16e(0x1f4)][_0x3cc16e(0x1ee)](_0x3cc16e(0x1ea))||_0x2c722b[_0x3cc16e(0x1f4)][_0x3cc16e(0x1ee)](_0x3cc16e(0x1f2)))&&_0x58db58[_0x3cc16e(0x1fb)](_0x37148e);}}return _0x269640(_0x8df074),_0x58db58;}function a144_0x146e(_0x51c2e8,_0xb2d3af){_0x51c2e8=_0x51c2e8-0x1e8;const _0x47cf04=a144_0x47cf();let _0x146efc=_0x47cf04[_0x51c2e8];return _0x146efc;}export function discoverYamlFiles(_0x45fce2){const _0x10dd0c=a144_0x146e,_0x3671fa=findYamlFiles(_0x45fce2);return _0x3671fa[_0x10dd0c(0x1f8)](_0x418c69=>{const _0x24fb1e=_0x10dd0c,_0x177460=a144_0x4eb7e0[_0x24fb1e(0x1f6)](_0x45fce2,_0x418c69),_0x3987fa=a144_0x4eb7e0[_0x24fb1e(0x1f3)](_0x177460);return{'absolutePath':_0x418c69,'relativePath':_0x177460,'folderPath':_0x3987fa==='.'?'':_0x3987fa['replace'](/\\/g,'/')};});}export function isYamlFile(_0x510015){const _0x365683=a144_0x146e;try{const _0x3a4224=statSync(_0x510015);if(!_0x3a4224['isFile']())return![];const _0x222fee=a144_0x4eb7e0['extname'](_0x510015)[_0x365683(0x1eb)]();return _0x222fee===_0x365683(0x1ea)||_0x222fee==='.yaml';}catch{return![];}}
1
+ (function(_0x390341,_0x1a4199){const _0x3c606d=a144_0xcd54,_0x59f19a=_0x390341();while(!![]){try{const _0x106741=parseInt(_0x3c606d(0x1e3))/0x1*(parseInt(_0x3c606d(0x1dd))/0x2)+parseInt(_0x3c606d(0x1d7))/0x3+parseInt(_0x3c606d(0x1db))/0x4+-parseInt(_0x3c606d(0x1de))/0x5*(parseInt(_0x3c606d(0x1e1))/0x6)+parseInt(_0x3c606d(0x1e0))/0x7+-parseInt(_0x3c606d(0x1d5))/0x8+-parseInt(_0x3c606d(0x1d4))/0x9*(parseInt(_0x3c606d(0x1e4))/0xa);if(_0x106741===_0x1a4199)break;else _0x59f19a['push'](_0x59f19a['shift']());}catch(_0x156436){_0x59f19a['push'](_0x59f19a['shift']());}}}(a144_0x2ec2,0x1feb0));function a144_0x2ec2(){const _0x9d7ce6=['1830hiytBl','.yaml','21mIvliQ','3440020Awhpwt','push','endsWith','.yml','relative','name','isFile','9fccofB','344856IUSFCr','map','248328dcVQvC','join','dirname','extname','883784trYEiY','toLowerCase','24116GLBYUF','2605yFimlo','replace','838670PQAVLG'];a144_0x2ec2=function(){return _0x9d7ce6;};return a144_0x2ec2();}import{readdirSync,statSync}from'fs';import a144_0x4337f2 from'path';function a144_0xcd54(_0x2737a2,_0x3abadb){_0x2737a2=_0x2737a2-0x1cf;const _0x2ec2fc=a144_0x2ec2();let _0xcd541e=_0x2ec2fc[_0x2737a2];return _0xcd541e;}export function findYamlFiles(_0x3218eb){const _0xe60f20=[];function _0x2dea66(_0x1840b0){const _0x2deaf4=a144_0xcd54,_0x3d5f42=readdirSync(_0x1840b0,{'withFileTypes':!![]});for(const _0x464a8e of _0x3d5f42){const _0x273a9a=a144_0x4337f2[_0x2deaf4(0x1d8)](_0x1840b0,_0x464a8e['name']);if(_0x464a8e['isDirectory']())_0x2dea66(_0x273a9a);else(_0x464a8e[_0x2deaf4(0x1d2)][_0x2deaf4(0x1cf)]('.yml')||_0x464a8e[_0x2deaf4(0x1d2)][_0x2deaf4(0x1cf)](_0x2deaf4(0x1e2)))&&_0xe60f20[_0x2deaf4(0x1e5)](_0x273a9a);}}return _0x2dea66(_0x3218eb),_0xe60f20;}export function discoverYamlFiles(_0x10feb5){const _0x429280=a144_0xcd54,_0x20bb14=findYamlFiles(_0x10feb5);return _0x20bb14[_0x429280(0x1d6)](_0x5ebb8b=>{const _0x298948=_0x429280,_0xe3b89e=a144_0x4337f2[_0x298948(0x1d1)](_0x10feb5,_0x5ebb8b),_0x369149=a144_0x4337f2[_0x298948(0x1d9)](_0xe3b89e);return{'absolutePath':_0x5ebb8b,'relativePath':_0xe3b89e,'folderPath':_0x369149==='.'?'':_0x369149[_0x298948(0x1df)](/\\/g,'/')};});}export function isYamlFile(_0x3cf5e5){const _0x6c10a6=a144_0xcd54;try{const _0x591286=statSync(_0x3cf5e5);if(!_0x591286[_0x6c10a6(0x1d3)]())return![];const _0x2f81f7=a144_0x4337f2[_0x6c10a6(0x1da)](_0x3cf5e5)[_0x6c10a6(0x1dc)]();return _0x2f81f7===_0x6c10a6(0x1d0)||_0x2f81f7===_0x6c10a6(0x1e2);}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x2a7261,_0xffe4d5){const _0x1dd30e=a145_0x14a1,_0x149b70=_0x2a7261();while(!![]){try{const _0xfd9221=-parseInt(_0x1dd30e(0x131))/0x1*(-parseInt(_0x1dd30e(0x12a))/0x2)+parseInt(_0x1dd30e(0x135))/0x3+-parseInt(_0x1dd30e(0x13f))/0x4*(-parseInt(_0x1dd30e(0x160))/0x5)+parseInt(_0x1dd30e(0x128))/0x6*(-parseInt(_0x1dd30e(0x137))/0x7)+-parseInt(_0x1dd30e(0x169))/0x8*(-parseInt(_0x1dd30e(0x120))/0x9)+-parseInt(_0x1dd30e(0x130))/0xa*(-parseInt(_0x1dd30e(0x13b))/0xb)+-parseInt(_0x1dd30e(0x147))/0xc;if(_0xfd9221===_0xffe4d5)break;else _0x149b70['push'](_0x149b70['shift']());}catch(_0x1f73f1){_0x149b70['push'](_0x149b70['shift']());}}}(a145_0xec6f,0xda669));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x114cf0){const _0x914d23=a145_0x14a1;return _0x114cf0['toLowerCase']()[_0x914d23(0x149)](/\s+/g,'_')[_0x914d23(0x149)](/[^a-z0-9_\p{L}\p{N}]/gu,'')['replace'](/_+/g,'_')[_0x914d23(0x149)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x49acf2){const _0x41bbc8=a145_0x14a1,_0xc297e4=_0x49acf2[_0x41bbc8(0x129)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0xc297e4){const _0x17be32=_0xc297e4[0x1]['toLowerCase'](),_0x1e21cb=_0xc297e4[0x2],_0xf1fa19=_0x1e21cb[_0x41bbc8(0x149)](/-/g,'')[_0x41bbc8(0x11c)](0x0,0x4)['toLowerCase']();return _0x17be32+'_'+_0xf1fa19;}const _0x24a83c=_0x49acf2[_0x41bbc8(0x129)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x24a83c){const _0x4741fb=_0x24a83c[0x1],_0x4d4535=_0x24a83c[0x2][_0x41bbc8(0x12c)](),_0x2b10d5=_0x4741fb[_0x41bbc8(0x149)](/-/g,'')[_0x41bbc8(0x11c)](0x0,0x4)[_0x41bbc8(0x12c)]();return _0x4d4535+'_'+_0x2b10d5;}return undefined;}function stableStringify(_0x51bd42){const _0x2c2cae=a145_0x14a1;if(Array[_0x2c2cae(0x162)](_0x51bd42))return'['+_0x51bd42['map'](_0x3e9396=>stableStringify(_0x3e9396))[_0x2c2cae(0x126)](',')+']';if(_0x51bd42&&typeof _0x51bd42==='object'){const _0x49324e=_0x51bd42,_0x2a828f=Object[_0x2c2cae(0x12e)](_0x49324e)[_0x2c2cae(0x139)](),_0x3257a1=_0x2a828f[_0x2c2cae(0x13d)](_0x1e6f19=>'\x22'+_0x1e6f19+'\x22:'+stableStringify(_0x49324e[_0x1e6f19]));return'{'+_0x3257a1[_0x2c2cae(0x126)](',')+'}';}const _0xe428bd=JSON[_0x2c2cae(0x151)](_0x51bd42);return _0xe428bd===undefined?'null':_0xe428bd;}export function consolidateActivationsByContent(_0x3ffeb9){const _0x26f9fc=a145_0x14a1,_0x2c2c38={},_0x3c79ad=new Map(),_0x3c8206=new Map();for(const _0x31f24e of _0x3ffeb9){if(!_0x31f24e)continue;for(const [_0x262dba,_0x5bc04d]of Object[_0x26f9fc(0x127)](_0x31f24e)){const _0x15cd57={'name':_0x5bc04d['name'],'connection':_0x5bc04d[_0x26f9fc(0x152)],..._0x5bc04d['all_columns']!==undefined&&{'all_columns':_0x5bc04d[_0x26f9fc(0x11a)]},..._0x5bc04d[_0x26f9fc(0x14f)]!==undefined&&{'columns':_0x5bc04d[_0x26f9fc(0x14f)]},..._0x5bc04d['behavior']!==undefined&&{'behavior':_0x5bc04d[_0x26f9fc(0x167)]},..._0x5bc04d[_0x26f9fc(0x16a)]!==undefined&&{'schedule':_0x5bc04d[_0x26f9fc(0x16a)]},..._0x5bc04d[_0x26f9fc(0x11d)]!==undefined&&{'notification':_0x5bc04d[_0x26f9fc(0x11d)]},..._0x5bc04d['connector_config']!==undefined&&{'connector_config':_0x5bc04d['connector_config']},..._0x5bc04d[_0x26f9fc(0x11f)]!==undefined&&{'activation_template_id':_0x5bc04d[_0x26f9fc(0x11f)]}},_0x1f6c28=stableStringify(_0x15cd57),_0x2e25ea=_0x3c8206[_0x26f9fc(0x132)](_0x1f6c28);_0x2e25ea?_0x3c79ad[_0x26f9fc(0x13e)](_0x262dba,_0x2e25ea):(_0x2c2c38[_0x262dba]=_0x5bc04d,_0x3c79ad[_0x26f9fc(0x13e)](_0x262dba,_0x262dba),_0x3c8206[_0x26f9fc(0x13e)](_0x1f6c28,_0x262dba));}}return{'merged':_0x2c2c38,'nameMapping':_0x3c79ad};}export function updateActivationReferences(_0x158278,_0x4ed6d3){const _0x1d151d=a145_0x14a1;if(!_0x158278)return;for(const _0x4dc827 of _0x158278){if(!_0x4dc827[_0x1d151d(0x164)])continue;for(const _0x43a5d8 of _0x4dc827[_0x1d151d(0x164)]){if(_0x43a5d8[_0x1d151d(0x123)]===_0x1d151d(0x138)&&_0x43a5d8[_0x1d151d(0x146)]?.['activation']){const _0x51a855=_0x4ed6d3[_0x1d151d(0x132)](_0x43a5d8['with'][_0x1d151d(0x138)]);_0x51a855&&_0x51a855!==_0x43a5d8[_0x1d151d(0x146)][_0x1d151d(0x138)]&&(_0x43a5d8[_0x1d151d(0x146)][_0x1d151d(0x138)]=_0x51a855);}}}}function a145_0xec6f(){const _0x17b39e=['24114QARlgR','get','journeys','branches','1464807VmPKsu','exit_criteria','10663583ASXhvJ','activation','sort','has','88kzoomj','journeyBundleName','map','set','1277776yiRSkJ','condition','endsWith','milestone','stages','bundle_id','attributes','with','37805244sUhULz','rule','replace','versions','conditions','segment','string','.yaml','columns','wait','stringify','connection','startsWith','activations','yaml','merged','trim','name','version_number','journey','values','latest','include','entry_criteria','object','25uUvQde','length','isArray','index','steps','push','some','behavior','reentry','16igasXl','schedule','state','draft','all_columns','journeyStages','slice','notification','decision_point','activation_template_id','6381918xoEsJm','version','segments','type','nameMapping','goal','join','entries','6pqMsfN','match','146Rszqtj','description','toLowerCase','item','keys','find','380450SofwhG'];a145_0xec6f=function(){return _0x17b39e;};return a145_0xec6f();}export function consolidateSegmentsByContent(_0x14f49a,_0x4355bc){const _0x3df3b3=a145_0x14a1,_0x5ad0ef={},_0x2774d8=new Map(),_0x4bc395=new Map();for(const _0x2e7830 of _0x14f49a){if(!_0x2e7830)continue;for(const [_0x21efa5,_0x33e34c]of Object[_0x3df3b3(0x127)](_0x2e7830)){if(!_0x33e34c[_0x3df3b3(0x148)]){_0x5ad0ef[_0x21efa5]=_0x33e34c,_0x2774d8[_0x3df3b3(0x13e)](_0x21efa5,_0x21efa5);continue;}const _0x104467=_0x33e34c['description']&&_0x33e34c[_0x3df3b3(0x12b)][_0x3df3b3(0x157)]()?_0x33e34c['description']:undefined,_0x366239=JSON[_0x3df3b3(0x151)]({'description':_0x104467,'rule':deepSortObject(_0x33e34c[_0x3df3b3(0x148)])}),_0x528691=_0x4bc395[_0x3df3b3(0x132)](_0x366239);if(_0x528691){const _0x3a550f={..._0x33e34c[_0x3df3b3(0x12b)]!==undefined&&{'description':_0x33e34c[_0x3df3b3(0x12b)]},'rule':_0x33e34c[_0x3df3b3(0x148)]?deepSortObject(_0x33e34c['rule']):_0x33e34c[_0x3df3b3(0x148)]};if(_0x21efa5<_0x528691){_0x5ad0ef[_0x21efa5]=_0x3a550f,delete _0x5ad0ef[_0x528691];for(const [_0x4146ce,_0x311090]of _0x2774d8[_0x3df3b3(0x127)]()){_0x311090===_0x528691&&_0x2774d8[_0x3df3b3(0x13e)](_0x4146ce,_0x21efa5);}_0x2774d8[_0x3df3b3(0x13e)](_0x21efa5,_0x21efa5),_0x4bc395[_0x3df3b3(0x13e)](_0x366239,_0x21efa5);}else _0x5ad0ef[_0x528691]=_0x3a550f,_0x2774d8[_0x3df3b3(0x13e)](_0x21efa5,_0x528691);}else{let _0x8d6053=_0x21efa5;if(_0x4355bc){const _0x1d44bb=_0x4355bc[_0x3df3b3(0x132)](_0x366239);_0x1d44bb&&_0x1d44bb[_0x3df3b3(0x161)]>0x0&&(_0x8d6053=_0x1d44bb[_0x3df3b3(0x11c)]()[_0x3df3b3(0x139)]()[0x0]);}const _0x3560aa={..._0x33e34c['description']!==undefined&&{'description':_0x33e34c[_0x3df3b3(0x12b)]},'rule':_0x33e34c[_0x3df3b3(0x148)]?deepSortObject(_0x33e34c[_0x3df3b3(0x148)]):_0x33e34c[_0x3df3b3(0x148)]};_0x5ad0ef[_0x8d6053]=_0x3560aa,_0x2774d8[_0x3df3b3(0x13e)](_0x21efa5,_0x8d6053),_0x4bc395[_0x3df3b3(0x13e)](_0x366239,_0x8d6053);}}}return{'merged':_0x5ad0ef,'nameMapping':_0x2774d8};}export function updateSegmentReferences(_0x595159,_0x4c1916){const _0x4faa21=a145_0x14a1;if(!_0x595159)return;for(const _0x2f395c of _0x595159){if(_0x2f395c[_0x4faa21(0x15e)]?.[_0x4faa21(0x14c)]){const _0x56fc45=_0x4c1916[_0x4faa21(0x132)](_0x2f395c[_0x4faa21(0x15e)][_0x4faa21(0x14c)]);_0x56fc45&&(_0x2f395c['entry_criteria'][_0x4faa21(0x14c)]=_0x56fc45);}if(_0x2f395c[_0x4faa21(0x136)])for(const _0x3413be of _0x2f395c['exit_criteria']){if(_0x3413be[_0x4faa21(0x14c)]){const _0x5b9705=_0x4c1916[_0x4faa21(0x132)](_0x3413be[_0x4faa21(0x14c)]);_0x5b9705&&(_0x3413be[_0x4faa21(0x14c)]=_0x5b9705);}}if(_0x2f395c[_0x4faa21(0x142)]?.['segment']){const _0x3d775d=_0x4c1916[_0x4faa21(0x132)](_0x2f395c['milestone']['segment']);_0x3d775d&&(_0x2f395c[_0x4faa21(0x142)]['segment']=_0x3d775d);}if(_0x2f395c['steps'])for(const _0x12acc1 of _0x2f395c['steps']){if(_0x12acc1[_0x4faa21(0x123)]===_0x4faa21(0x11e)&&_0x12acc1[_0x4faa21(0x146)]?.['branches'])for(const _0x57ef56 of _0x12acc1[_0x4faa21(0x146)][_0x4faa21(0x134)]){if(_0x57ef56[_0x4faa21(0x14c)]){const _0x281e7b=_0x4c1916[_0x4faa21(0x132)](_0x57ef56[_0x4faa21(0x14c)]);_0x281e7b&&(_0x57ef56[_0x4faa21(0x14c)]=_0x281e7b);}}if(_0x12acc1[_0x4faa21(0x123)]===_0x4faa21(0x150)&&_0x12acc1[_0x4faa21(0x146)]?.[_0x4faa21(0x140)]?.['segment']){const _0x1088c1=_0x4c1916[_0x4faa21(0x132)](_0x12acc1[_0x4faa21(0x146)]['condition'][_0x4faa21(0x14c)]);_0x1088c1&&(_0x12acc1[_0x4faa21(0x146)][_0x4faa21(0x140)][_0x4faa21(0x14c)]=_0x1088c1);}}}}export function updateSegmentRefsInSegments(_0x4e6715,_0x3f43e8){const _0xd839c3=a145_0x14a1;for(const _0x14713c of Object[_0xd839c3(0x15b)](_0x4e6715)){_0x14713c['rule']&&updateSegmentRefsInRule(_0x14713c[_0xd839c3(0x148)],_0x3f43e8);}}function updateSegmentRefsInRule(_0x524cfd,_0x3c17b4){const _0x34eb12=a145_0x14a1;if(_0x524cfd===null||typeof _0x524cfd!==_0x34eb12(0x15f))return;if(Array[_0x34eb12(0x162)](_0x524cfd)){for(const _0x21da4a of _0x524cfd){updateSegmentRefsInRule(_0x21da4a,_0x3c17b4);}return;}const _0x1c6be7=_0x524cfd;if((_0x1c6be7[_0x34eb12(0x123)]===_0x34eb12(0x15d)||_0x1c6be7['type']==='exclude')&&typeof _0x1c6be7[_0x34eb12(0x14c)]===_0x34eb12(0x14d)){const _0x3f3a15=_0x3c17b4[_0x34eb12(0x132)](_0x1c6be7[_0x34eb12(0x14c)]);_0x3f3a15&&(_0x1c6be7[_0x34eb12(0x14c)]=_0x3f3a15);}if(_0x1c6be7['conditions']&&Array[_0x34eb12(0x162)](_0x1c6be7[_0x34eb12(0x14b)]))for(const _0x15796b of _0x1c6be7[_0x34eb12(0x14b)]){updateSegmentRefsInRule(_0x15796b,_0x3c17b4);}}function a145_0x14a1(_0x38e81e,_0x19616c){_0x38e81e=_0x38e81e-0x119;const _0xec6f40=a145_0xec6f();let _0x14a116=_0xec6f40[_0x38e81e];return _0x14a116;}export function buildJourneysArray(_0xb7e9eb,_0x2bf3c4){const _0x453f3d=a145_0x14a1;return _0xb7e9eb[_0x453f3d(0x13d)](_0x5aae97=>{const _0x3d91e2=_0x453f3d,_0x2b6b1d=_0x2bf3c4?_0x5aae97[_0x3d91e2(0x12d)]['id']===_0x2bf3c4:_0xb7e9eb[_0x3d91e2(0x161)]===0x1,_0xa65df9=_0x5aae97['yaml'][_0x3d91e2(0x133)]?.[0x0],_0x537dc1=_0xa65df9?.[_0x3d91e2(0x125)]||_0x5aae97[_0x3d91e2(0x155)][_0x3d91e2(0x125)],_0x3b9fc7={'version':_0xa65df9?.[_0x3d91e2(0x121)]||_0x5aae97['yaml'][_0x3d91e2(0x121)]||_0x5aae97[_0x3d91e2(0x12d)][_0x3d91e2(0x158)],'state':_0x5aae97['item'][_0x3d91e2(0x16b)]==='launched'?'launched':_0x3d91e2(0x119),'stages':_0xa65df9?.['stages']||_0x5aae97['yaml']['stages']||[],'id':_0xa65df9?.['id']||_0x5aae97[_0x3d91e2(0x155)]['id'],'version_number':_0xa65df9?.[_0x3d91e2(0x159)]||_0x5aae97[_0x3d91e2(0x155)]['version_number']};return _0x537dc1&&(_0x3b9fc7[_0x3d91e2(0x125)]=_0x537dc1),_0x2b6b1d&&(_0x3b9fc7[_0x3d91e2(0x15c)]=!![]),_0x3b9fc7;});}export function buildMergedJourneyDef(_0x511c0f,_0x4ac7ca,_0x317f21){const _0x15f125=a145_0x14a1,_0x1eb38e=_0x511c0f[0x0]['yaml'],_0xd7b712=buildJourneysArray(_0x511c0f,_0x317f21),{merged:_0x433d32,nameMapping:_0x461a44}=consolidateSegmentsByContent(_0x511c0f['map'](_0x3e30c4=>_0x3e30c4[_0x15f125(0x155)][_0x15f125(0x122)]),_0x4ac7ca);updateSegmentRefsInSegments(_0x433d32,_0x461a44);const _0x2cd046=Array['from'](_0x461a44[_0x15f125(0x127)]())[_0x15f125(0x166)](([_0x38fdd7,_0x40a6ae])=>_0x38fdd7!==_0x40a6ae&&_0x38fdd7[_0x15f125(0x153)](_0x15f125(0x15e)));let _0x5c6d02=_0x433d32,_0x2f5a71=new Map();if(_0x2cd046){const _0x548955=consolidateSegmentsByContent([_0x433d32],_0x4ac7ca);_0x5c6d02=_0x548955[_0x15f125(0x156)],_0x2f5a71=_0x548955[_0x15f125(0x124)];}const _0x1a8d59=new Map(_0x461a44);for(const [_0x2237fa,_0xda008e]of _0x2f5a71['entries']()){_0x1a8d59[_0x15f125(0x13e)](_0x2237fa,_0xda008e);}for(const [_0xe3d498,_0x4c0c69]of _0x1a8d59[_0x15f125(0x127)]()){let _0x58310d=_0x4c0c69,_0x3db2a4=0x0;while(_0x1a8d59[_0x15f125(0x13a)](_0x58310d)&&_0x1a8d59['get'](_0x58310d)!==_0x58310d&&_0x3db2a4<MAX_MAPPING_CHAIN_DEPTH){_0x58310d=_0x1a8d59[_0x15f125(0x132)](_0x58310d),_0x3db2a4++;}_0x58310d!==_0x4c0c69&&_0x1a8d59['set'](_0xe3d498,_0x58310d);}for(const _0x24250c of _0xd7b712){updateSegmentReferences(_0x24250c[_0x15f125(0x143)],_0x1a8d59);}const {merged:_0x55358f,nameMapping:_0xeb0e8a}=consolidateActivationsByContent(_0x511c0f[_0x15f125(0x13d)](_0x231ddf=>_0x231ddf[_0x15f125(0x155)][_0x15f125(0x154)]));for(const _0x5ea67a of _0xd7b712){updateActivationReferences(_0x5ea67a[_0x15f125(0x143)],_0xeb0e8a);}let _0x181056=_0x1eb38e['goal'];if(_0x181056?.[_0x15f125(0x14c)]){const _0x63f988=_0x1a8d59[_0x15f125(0x132)](_0x181056['segment']);_0x63f988&&(_0x181056={..._0x181056,'segment':_0x63f988});}for(const _0x515296 of _0xd7b712){if(_0x515296[_0x15f125(0x125)]?.[_0x15f125(0x14c)]){const _0x802ca=_0x1a8d59[_0x15f125(0x132)](_0x515296[_0x15f125(0x125)][_0x15f125(0x14c)]);_0x802ca&&(_0x515296[_0x15f125(0x125)]={..._0x515296[_0x15f125(0x125)],'segment':_0x802ca});}}return _0xd7b712['some'](_0x47060d=>_0x47060d['goal'])&&(_0x181056=undefined),{'type':_0x15f125(0x15a),'name':_0x1eb38e[_0x15f125(0x158)],'description':_0x1eb38e[_0x15f125(0x12b)],'goal':_0x181056,'reentry':_0x1eb38e[_0x15f125(0x168)],'segments':Object[_0x15f125(0x12e)](_0x5c6d02)[_0x15f125(0x161)]>0x0?_0x5c6d02:undefined,'activations':Object[_0x15f125(0x12e)](_0x55358f)[_0x15f125(0x161)]>0x0?_0x55358f:undefined,'journeys':_0xd7b712,'bundle_id':_0x1eb38e[_0x15f125(0x144)],'bundle_name':_0x1eb38e['bundle_name']};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x2ba962,_0x36bf33,_0x476169,_0x1b9fd7){const _0x2dca23=a145_0x14a1,_0x13d3c3=_0x2ba962+':'+_0x36bf33,_0x5f59db=_0x476169['get'](_0x13d3c3);if(_0x5f59db)return _0x5f59db;const _0xfadef8=await _0x1b9fd7(_0x2ba962),_0x4e5600=_0xfadef8[_0x2dca23(0x145)][_0x2dca23(0x13c)]||_0xfadef8['attributes'][_0x2dca23(0x158)],_0x4e5ff2=_0xfadef8[_0x2dca23(0x145)][_0x2dca23(0x11b)][_0x2dca23(0x12f)](_0x35d169=>String(_0x35d169['id'])===String(_0x36bf33)),_0x1b0a34=_0x4e5ff2?.[_0x2dca23(0x158)]||_0x36bf33,_0xbf248c={'journeyName':_0x4e5600,'stageName':_0x1b0a34};return _0x476169[_0x2dca23(0x13e)](_0x13d3c3,_0xbf248c),_0xbf248c;}export function formatApiJourneyName(_0x1686b0,_0x14ff36){return _0x14ff36+'\x20('+_0x1686b0+')';}export function isLocalJourneyRef(_0x32e7a5){const _0x3157ea=a145_0x14a1;return _0x32e7a5[_0x3157ea(0x141)]('.yml')||_0x32e7a5[_0x3157ea(0x141)](_0x3157ea(0x14e));}export function buildLocalRuleToNameMapping(_0x4d861d){const _0x1cfc28=a145_0x14a1,_0x273ed4=new Map();if(!_0x4d861d)return _0x273ed4;for(const [_0x4cd2cb,_0x16035d]of Object[_0x1cfc28(0x127)](_0x4d861d)){if(_0x16035d['rule']){const _0x5029ef=serializeRule(_0x16035d[_0x1cfc28(0x148)]),_0x2fc75e=_0x273ed4[_0x1cfc28(0x132)](_0x5029ef)||[];_0x2fc75e[_0x1cfc28(0x165)](_0x4cd2cb),_0x273ed4[_0x1cfc28(0x13e)](_0x5029ef,_0x2fc75e);}}return _0x273ed4;}export function buildLocalRuleToNameMappingFromJourney(_0x31e903){const _0x36021e=a145_0x14a1,_0x2de613=_0x31e903[_0x36021e(0x122)];if(!_0x2de613)return new Map();const _0x27e526=collectSegmentUsageCounts(_0x31e903),_0x4cd601=new Map();let _0x13bf57=0x0;for(const [_0x14d04f,_0x35c8af]of Object['entries'](_0x2de613)){if(!_0x35c8af['rule']){_0x13bf57++;continue;}const _0x21af48=serializeRule(_0x35c8af[_0x36021e(0x148)]),_0x3fc471=_0x4cd601[_0x36021e(0x132)](_0x21af48)||[];_0x3fc471[_0x36021e(0x165)]({'name':_0x14d04f,'index':_0x13bf57}),_0x4cd601['set'](_0x21af48,_0x3fc471),_0x13bf57++;}const _0x834e3b=new Map();for(const [_0x23e983,_0x53057]of _0x4cd601){const _0x5c49aa=_0x53057[_0x36021e(0x11c)]()[_0x36021e(0x139)]((_0x59dcce,_0x48b7fb)=>{const _0x19986a=_0x36021e,_0x214382=_0x27e526[_0x19986a(0x132)](_0x59dcce[_0x19986a(0x158)])||0x0,_0xba3217=_0x27e526[_0x19986a(0x132)](_0x48b7fb['name'])||0x0;if(_0x214382!==_0xba3217)return _0xba3217-_0x214382;return _0x59dcce[_0x19986a(0x163)]-_0x48b7fb['index'];})[_0x36021e(0x13d)](_0x2590f1=>_0x2590f1[_0x36021e(0x158)]);_0x834e3b[_0x36021e(0x13e)](_0x23e983,_0x5c49aa);}return _0x834e3b;}export function collectSegmentUsageCounts(_0x5227ca){const _0xc00825=a145_0x14a1,_0xc6b45f=new Map(),_0x1327e4=_0x587d21=>{const _0x54f120=a145_0x14a1;if(!_0x587d21)return;_0xc6b45f[_0x54f120(0x13e)](_0x587d21,(_0xc6b45f['get'](_0x587d21)||0x0)+0x1);},_0x2cee32=_0x14f60f=>{const _0x1dd5db=a145_0x14a1;for(const _0x552640 of _0x14f60f){_0x1327e4(_0x552640['entry_criteria']?.[_0x1dd5db(0x14c)]);if(_0x552640[_0x1dd5db(0x136)])for(const _0x14671b of _0x552640[_0x1dd5db(0x136)]){_0x1327e4(_0x14671b['segment']);}_0x1327e4(_0x552640['milestone']?.[_0x1dd5db(0x14c)]);if(_0x552640[_0x1dd5db(0x164)])for(const _0x535bde of _0x552640[_0x1dd5db(0x164)]){if(_0x535bde[_0x1dd5db(0x123)]===_0x1dd5db(0x11e))for(const _0x1085f0 of _0x535bde[_0x1dd5db(0x146)][_0x1dd5db(0x134)]){_0x1327e4(_0x1085f0[_0x1dd5db(0x14c)]);}else _0x535bde[_0x1dd5db(0x123)]===_0x1dd5db(0x150)&&_0x1327e4(_0x535bde[_0x1dd5db(0x146)][_0x1dd5db(0x140)]?.[_0x1dd5db(0x14c)]);}}};_0x1327e4(_0x5227ca['goal']?.['segment']);if(_0x5227ca['journeys'])for(const _0x5b9629 of _0x5227ca[_0xc00825(0x133)]){_0x1327e4(_0x5b9629[_0xc00825(0x125)]?.[_0xc00825(0x14c)]),_0x2cee32(_0x5b9629[_0xc00825(0x143)]);}_0x5227ca[_0xc00825(0x143)]&&_0x2cee32(_0x5227ca[_0xc00825(0x143)]);if(_0x5227ca[_0xc00825(0x14a)])for(const _0x12c78d of _0x5227ca[_0xc00825(0x14a)]){_0x2cee32(_0x12c78d[_0xc00825(0x143)]);}return _0xc6b45f;}
1
+ (function(_0x579c33,_0x5b5428){const _0x4860d0=a145_0x4b53,_0xe1d0a5=_0x579c33();while(!![]){try{const _0x5bbeec=-parseInt(_0x4860d0(0x15d))/0x1+-parseInt(_0x4860d0(0x18b))/0x2+parseInt(_0x4860d0(0x159))/0x3*(parseInt(_0x4860d0(0x153))/0x4)+parseInt(_0x4860d0(0x17d))/0x5*(parseInt(_0x4860d0(0x179))/0x6)+parseInt(_0x4860d0(0x154))/0x7*(parseInt(_0x4860d0(0x196))/0x8)+-parseInt(_0x4860d0(0x176))/0x9*(parseInt(_0x4860d0(0x14a))/0xa)+parseInt(_0x4860d0(0x178))/0xb*(parseInt(_0x4860d0(0x193))/0xc);if(_0x5bbeec===_0x5b5428)break;else _0xe1d0a5['push'](_0xe1d0a5['shift']());}catch(_0x5c237e){_0xe1d0a5['push'](_0xe1d0a5['shift']());}}}(a145_0x8cca,0x3b0be));function a145_0x4b53(_0x3a7ef7,_0x4d386d){_0x3a7ef7=_0x3a7ef7-0x143;const _0x8cca4c=a145_0x8cca();let _0x4b538d=_0x8cca4c[_0x3a7ef7];return _0x4b538d;}import{serializeRule,deepSortObject}from'./child-segment-yaml.js';function a145_0x8cca(){const _0x422140=['wait','segments','merged','stages','description','version_number','schedule','map','has','.yaml','some','join','push','exclude','milestone','draft','match','activations','length','1797732VzlXWp','name','224653IhmVRe','6cOJaBB','launched','steps','behavior','1177555UBIKce','values','include','version','yaml','string','rule','branches','nameMapping','goal','replace','type','bundle_id','find','837752bxautq','.yml','latest','all_columns','versions','null','startsWith','slice','276bOQnkw','toLowerCase','conditions','8ZvtfQS','journeys','connector_config','index','decision_point','journey','get','set','entries','exit_criteria','20hCqyym','condition','trim','columns','sort','activation','from','object','entry_criteria','4ITKkiD','1021461zmOdnz','state','attributes','segment','activation_template_id','1114977TpLRIr','notification','isArray','keys','162596vccKTI','bundle_name','reentry','item','endsWith','with'];a145_0x8cca=function(){return _0x422140;};return a145_0x8cca();}export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0xfc6339){const _0x1c54c1=a145_0x4b53;return _0xfc6339[_0x1c54c1(0x194)]()[_0x1c54c1(0x187)](/\s+/g,'_')[_0x1c54c1(0x187)](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x1c54c1(0x187)](/_+/g,'_')[_0x1c54c1(0x187)](/^_|_$/g,'');}export function generateJourneyLocalName(_0xdc2b84){const _0x4bedb6=a145_0x4b53,_0x4266a1=_0xdc2b84[_0x4bedb6(0x173)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x4266a1){const _0x29cd30=_0x4266a1[0x1][_0x4bedb6(0x194)](),_0x4f1eb6=_0x4266a1[0x2],_0x549810=_0x4f1eb6[_0x4bedb6(0x187)](/-/g,'')['slice'](0x0,0x4)[_0x4bedb6(0x194)]();return _0x29cd30+'_'+_0x549810;}const _0x46ae2b=_0xdc2b84[_0x4bedb6(0x173)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x46ae2b){const _0x5cc5d4=_0x46ae2b[0x1],_0x16bb3e=_0x46ae2b[0x2][_0x4bedb6(0x194)](),_0x54d000=_0x5cc5d4[_0x4bedb6(0x187)](/-/g,'')[_0x4bedb6(0x192)](0x0,0x4)[_0x4bedb6(0x194)]();return _0x16bb3e+'_'+_0x54d000;}return undefined;}function stableStringify(_0x3b0571){const _0x1a6dd3=a145_0x4b53;if(Array[_0x1a6dd3(0x15b)](_0x3b0571))return'['+_0x3b0571['map'](_0x272fe1=>stableStringify(_0x272fe1))[_0x1a6dd3(0x16e)](',')+']';if(_0x3b0571&&typeof _0x3b0571===_0x1a6dd3(0x151)){const _0x820a2d=_0x3b0571,_0x14d46f=Object[_0x1a6dd3(0x15c)](_0x820a2d)['sort'](),_0x434e41=_0x14d46f[_0x1a6dd3(0x16a)](_0x1c4b18=>'\x22'+_0x1c4b18+'\x22:'+stableStringify(_0x820a2d[_0x1c4b18]));return'{'+_0x434e41['join'](',')+'}';}const _0x45385d=JSON['stringify'](_0x3b0571);return _0x45385d===undefined?_0x1a6dd3(0x190):_0x45385d;}export function consolidateActivationsByContent(_0x26bcf5){const _0x5d4df7=a145_0x4b53,_0x5427b2={},_0x32d9eb=new Map(),_0x50693f=new Map();for(const _0x338964 of _0x26bcf5){if(!_0x338964)continue;for(const [_0x4aa811,_0x59570d]of Object[_0x5d4df7(0x148)](_0x338964)){const _0x124298={'name':_0x59570d['name'],'connection':_0x59570d['connection'],..._0x59570d[_0x5d4df7(0x18e)]!==undefined&&{'all_columns':_0x59570d['all_columns']},..._0x59570d[_0x5d4df7(0x14d)]!==undefined&&{'columns':_0x59570d[_0x5d4df7(0x14d)]},..._0x59570d[_0x5d4df7(0x17c)]!==undefined&&{'behavior':_0x59570d[_0x5d4df7(0x17c)]},..._0x59570d['schedule']!==undefined&&{'schedule':_0x59570d[_0x5d4df7(0x169)]},..._0x59570d[_0x5d4df7(0x15a)]!==undefined&&{'notification':_0x59570d[_0x5d4df7(0x15a)]},..._0x59570d['connector_config']!==undefined&&{'connector_config':_0x59570d[_0x5d4df7(0x198)]},..._0x59570d['activation_template_id']!==undefined&&{'activation_template_id':_0x59570d[_0x5d4df7(0x158)]}},_0x176631=stableStringify(_0x124298),_0x1caee7=_0x50693f[_0x5d4df7(0x146)](_0x176631);_0x1caee7?_0x32d9eb['set'](_0x4aa811,_0x1caee7):(_0x5427b2[_0x4aa811]=_0x59570d,_0x32d9eb[_0x5d4df7(0x147)](_0x4aa811,_0x4aa811),_0x50693f[_0x5d4df7(0x147)](_0x176631,_0x4aa811));}}return{'merged':_0x5427b2,'nameMapping':_0x32d9eb};}export function updateActivationReferences(_0x18e957,_0x4fc144){const _0x24ca50=a145_0x4b53;if(!_0x18e957)return;for(const _0x573160 of _0x18e957){if(!_0x573160[_0x24ca50(0x17b)])continue;for(const _0x36489d of _0x573160[_0x24ca50(0x17b)]){if(_0x36489d[_0x24ca50(0x188)]===_0x24ca50(0x14f)&&_0x36489d['with']?.['activation']){const _0x267965=_0x4fc144['get'](_0x36489d[_0x24ca50(0x162)]['activation']);_0x267965&&_0x267965!==_0x36489d[_0x24ca50(0x162)][_0x24ca50(0x14f)]&&(_0x36489d[_0x24ca50(0x162)]['activation']=_0x267965);}}}}export function consolidateSegmentsByContent(_0x543d1b,_0x543d95){const _0x560069=a145_0x4b53,_0x75e80f={},_0x4de82f=new Map(),_0x552f45=new Map();for(const _0x5e13d3 of _0x543d1b){if(!_0x5e13d3)continue;for(const [_0x32a596,_0xfdf93]of Object[_0x560069(0x148)](_0x5e13d3)){if(!_0xfdf93[_0x560069(0x183)]){_0x75e80f[_0x32a596]=_0xfdf93,_0x4de82f[_0x560069(0x147)](_0x32a596,_0x32a596);continue;}const _0x1d7b52=_0xfdf93[_0x560069(0x167)]&&_0xfdf93[_0x560069(0x167)][_0x560069(0x14c)]()?_0xfdf93[_0x560069(0x167)]:undefined,_0x5efdc6=JSON['stringify']({'description':_0x1d7b52,'rule':deepSortObject(_0xfdf93[_0x560069(0x183)])}),_0x4c8781=_0x552f45['get'](_0x5efdc6);if(_0x4c8781){const _0x50132c={..._0xfdf93[_0x560069(0x167)]!==undefined&&{'description':_0xfdf93['description']},'rule':_0xfdf93['rule']?deepSortObject(_0xfdf93[_0x560069(0x183)]):_0xfdf93[_0x560069(0x183)]};if(_0x32a596<_0x4c8781){_0x75e80f[_0x32a596]=_0x50132c,delete _0x75e80f[_0x4c8781];for(const [_0x264b30,_0x4b968c]of _0x4de82f['entries']()){_0x4b968c===_0x4c8781&&_0x4de82f['set'](_0x264b30,_0x32a596);}_0x4de82f['set'](_0x32a596,_0x32a596),_0x552f45[_0x560069(0x147)](_0x5efdc6,_0x32a596);}else _0x75e80f[_0x4c8781]=_0x50132c,_0x4de82f['set'](_0x32a596,_0x4c8781);}else{let _0x2e3bf9=_0x32a596;if(_0x543d95){const _0x36ce52=_0x543d95[_0x560069(0x146)](_0x5efdc6);_0x36ce52&&_0x36ce52[_0x560069(0x175)]>0x0&&(_0x2e3bf9=_0x36ce52[_0x560069(0x192)]()[_0x560069(0x14e)]()[0x0]);}const _0x33d1ef={..._0xfdf93[_0x560069(0x167)]!==undefined&&{'description':_0xfdf93[_0x560069(0x167)]},'rule':_0xfdf93['rule']?deepSortObject(_0xfdf93[_0x560069(0x183)]):_0xfdf93[_0x560069(0x183)]};_0x75e80f[_0x2e3bf9]=_0x33d1ef,_0x4de82f[_0x560069(0x147)](_0x32a596,_0x2e3bf9),_0x552f45[_0x560069(0x147)](_0x5efdc6,_0x2e3bf9);}}}return{'merged':_0x75e80f,'nameMapping':_0x4de82f};}export function updateSegmentReferences(_0x26e452,_0x2fbc73){const _0x134187=a145_0x4b53;if(!_0x26e452)return;for(const _0x9486f5 of _0x26e452){if(_0x9486f5['entry_criteria']?.[_0x134187(0x157)]){const _0x5ca1c7=_0x2fbc73[_0x134187(0x146)](_0x9486f5[_0x134187(0x152)]['segment']);_0x5ca1c7&&(_0x9486f5[_0x134187(0x152)][_0x134187(0x157)]=_0x5ca1c7);}if(_0x9486f5[_0x134187(0x149)])for(const _0x3584ed of _0x9486f5[_0x134187(0x149)]){if(_0x3584ed[_0x134187(0x157)]){const _0x3b0dc8=_0x2fbc73[_0x134187(0x146)](_0x3584ed[_0x134187(0x157)]);_0x3b0dc8&&(_0x3584ed[_0x134187(0x157)]=_0x3b0dc8);}}if(_0x9486f5[_0x134187(0x171)]?.[_0x134187(0x157)]){const _0x121f3b=_0x2fbc73[_0x134187(0x146)](_0x9486f5[_0x134187(0x171)][_0x134187(0x157)]);_0x121f3b&&(_0x9486f5[_0x134187(0x171)]['segment']=_0x121f3b);}if(_0x9486f5[_0x134187(0x17b)])for(const _0x25a0a0 of _0x9486f5[_0x134187(0x17b)]){if(_0x25a0a0[_0x134187(0x188)]===_0x134187(0x144)&&_0x25a0a0['with']?.[_0x134187(0x184)])for(const _0x10735c of _0x25a0a0[_0x134187(0x162)][_0x134187(0x184)]){if(_0x10735c['segment']){const _0x58bd9f=_0x2fbc73[_0x134187(0x146)](_0x10735c[_0x134187(0x157)]);_0x58bd9f&&(_0x10735c['segment']=_0x58bd9f);}}if(_0x25a0a0['type']===_0x134187(0x163)&&_0x25a0a0['with']?.[_0x134187(0x14b)]?.[_0x134187(0x157)]){const _0x123e65=_0x2fbc73['get'](_0x25a0a0[_0x134187(0x162)][_0x134187(0x14b)][_0x134187(0x157)]);_0x123e65&&(_0x25a0a0['with'][_0x134187(0x14b)][_0x134187(0x157)]=_0x123e65);}}}}export function updateSegmentRefsInSegments(_0x248d43,_0x1e243b){const _0x54274b=a145_0x4b53;for(const _0xa6abd0 of Object[_0x54274b(0x17e)](_0x248d43)){_0xa6abd0[_0x54274b(0x183)]&&updateSegmentRefsInRule(_0xa6abd0['rule'],_0x1e243b);}}function updateSegmentRefsInRule(_0x51ed7a,_0x1ff24e){const _0x59e602=a145_0x4b53;if(_0x51ed7a===null||typeof _0x51ed7a!==_0x59e602(0x151))return;if(Array[_0x59e602(0x15b)](_0x51ed7a)){for(const _0x1dd304 of _0x51ed7a){updateSegmentRefsInRule(_0x1dd304,_0x1ff24e);}return;}const _0x5c0022=_0x51ed7a;if((_0x5c0022[_0x59e602(0x188)]===_0x59e602(0x17f)||_0x5c0022['type']===_0x59e602(0x170))&&typeof _0x5c0022['segment']===_0x59e602(0x182)){const _0x132a00=_0x1ff24e[_0x59e602(0x146)](_0x5c0022['segment']);_0x132a00&&(_0x5c0022[_0x59e602(0x157)]=_0x132a00);}if(_0x5c0022[_0x59e602(0x195)]&&Array['isArray'](_0x5c0022[_0x59e602(0x195)]))for(const _0xc32175 of _0x5c0022[_0x59e602(0x195)]){updateSegmentRefsInRule(_0xc32175,_0x1ff24e);}}export function buildJourneysArray(_0x48fe2a,_0x4c4f4c){const _0x534bc3=a145_0x4b53;return _0x48fe2a[_0x534bc3(0x16a)](_0xf65fc6=>{const _0x328069=_0x534bc3,_0x4d86d1=_0x4c4f4c?_0xf65fc6[_0x328069(0x160)]['id']===_0x4c4f4c:_0x48fe2a['length']===0x1,_0x157591=_0xf65fc6[_0x328069(0x181)][_0x328069(0x197)]?.[0x0],_0x52d7db=_0x157591?.[_0x328069(0x186)]||_0xf65fc6[_0x328069(0x181)][_0x328069(0x186)],_0x1f1fe2={'version':_0x157591?.[_0x328069(0x180)]||_0xf65fc6[_0x328069(0x181)][_0x328069(0x180)]||_0xf65fc6[_0x328069(0x160)]['name'],'state':_0xf65fc6['item'][_0x328069(0x155)]===_0x328069(0x17a)?_0x328069(0x17a):_0x328069(0x172),'stages':_0x157591?.[_0x328069(0x166)]||_0xf65fc6[_0x328069(0x181)][_0x328069(0x166)]||[],'id':_0x157591?.['id']||_0xf65fc6[_0x328069(0x181)]['id'],'version_number':_0x157591?.[_0x328069(0x168)]||_0xf65fc6[_0x328069(0x181)][_0x328069(0x168)]};return _0x52d7db&&(_0x1f1fe2[_0x328069(0x186)]=_0x52d7db),_0x4d86d1&&(_0x1f1fe2[_0x328069(0x18d)]=!![]),_0x1f1fe2;});}export function buildMergedJourneyDef(_0xdb52d2,_0xb02824,_0x49ea6d){const _0x19de85=a145_0x4b53,_0x4a3402=_0xdb52d2[0x0]['yaml'],_0x50dc9f=buildJourneysArray(_0xdb52d2,_0x49ea6d),{merged:_0x21c56a,nameMapping:_0x234531}=consolidateSegmentsByContent(_0xdb52d2[_0x19de85(0x16a)](_0x348533=>_0x348533[_0x19de85(0x181)]['segments']),_0xb02824);updateSegmentRefsInSegments(_0x21c56a,_0x234531);const _0x5d4cf7=Array[_0x19de85(0x150)](_0x234531[_0x19de85(0x148)]())[_0x19de85(0x16d)](([_0x3899e3,_0x54df7c])=>_0x3899e3!==_0x54df7c&&_0x3899e3[_0x19de85(0x191)](_0x19de85(0x152)));let _0x66acd9=_0x21c56a,_0x484b1e=new Map();if(_0x5d4cf7){const _0x2ec269=consolidateSegmentsByContent([_0x21c56a],_0xb02824);_0x66acd9=_0x2ec269[_0x19de85(0x165)],_0x484b1e=_0x2ec269[_0x19de85(0x185)];}const _0xc40306=new Map(_0x234531);for(const [_0x11727f,_0x2e92f9]of _0x484b1e[_0x19de85(0x148)]()){_0xc40306[_0x19de85(0x147)](_0x11727f,_0x2e92f9);}for(const [_0x5432b2,_0x11d981]of _0xc40306[_0x19de85(0x148)]()){let _0x12e5e7=_0x11d981,_0x4f3fd1=0x0;while(_0xc40306[_0x19de85(0x16b)](_0x12e5e7)&&_0xc40306[_0x19de85(0x146)](_0x12e5e7)!==_0x12e5e7&&_0x4f3fd1<MAX_MAPPING_CHAIN_DEPTH){_0x12e5e7=_0xc40306[_0x19de85(0x146)](_0x12e5e7),_0x4f3fd1++;}_0x12e5e7!==_0x11d981&&_0xc40306[_0x19de85(0x147)](_0x5432b2,_0x12e5e7);}for(const _0x5127bb of _0x50dc9f){updateSegmentReferences(_0x5127bb[_0x19de85(0x166)],_0xc40306);}const {merged:_0x1234fb,nameMapping:_0x21de16}=consolidateActivationsByContent(_0xdb52d2['map'](_0x591e6c=>_0x591e6c[_0x19de85(0x181)][_0x19de85(0x174)]));for(const _0x49788d of _0x50dc9f){updateActivationReferences(_0x49788d[_0x19de85(0x166)],_0x21de16);}let _0x5e5628=_0x4a3402[_0x19de85(0x186)];if(_0x5e5628?.[_0x19de85(0x157)]){const _0x21aabf=_0xc40306['get'](_0x5e5628[_0x19de85(0x157)]);_0x21aabf&&(_0x5e5628={..._0x5e5628,'segment':_0x21aabf});}for(const _0x40820a of _0x50dc9f){if(_0x40820a['goal']?.['segment']){const _0x432707=_0xc40306[_0x19de85(0x146)](_0x40820a[_0x19de85(0x186)][_0x19de85(0x157)]);_0x432707&&(_0x40820a[_0x19de85(0x186)]={..._0x40820a[_0x19de85(0x186)],'segment':_0x432707});}}return _0x50dc9f['some'](_0x1055e2=>_0x1055e2['goal'])&&(_0x5e5628=undefined),{'type':_0x19de85(0x145),'name':_0x4a3402[_0x19de85(0x177)],'description':_0x4a3402[_0x19de85(0x167)],'goal':_0x5e5628,'reentry':_0x4a3402[_0x19de85(0x15f)],'segments':Object[_0x19de85(0x15c)](_0x66acd9)[_0x19de85(0x175)]>0x0?_0x66acd9:undefined,'activations':Object[_0x19de85(0x15c)](_0x1234fb)[_0x19de85(0x175)]>0x0?_0x1234fb:undefined,'journeys':_0x50dc9f,'bundle_id':_0x4a3402[_0x19de85(0x189)],'bundle_name':_0x4a3402[_0x19de85(0x15e)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x38c47a,_0xde26ce,_0x34d395,_0x54ba17){const _0x533b36=a145_0x4b53,_0x59500b=_0x38c47a+':'+_0xde26ce,_0xc8e139=_0x34d395['get'](_0x59500b);if(_0xc8e139)return _0xc8e139;const _0x34ab57=await _0x54ba17(_0x38c47a),_0x580eb5=_0x34ab57['attributes']['journeyBundleName']||_0x34ab57[_0x533b36(0x156)][_0x533b36(0x177)],_0x1bbe45=_0x34ab57[_0x533b36(0x156)]['journeyStages'][_0x533b36(0x18a)](_0x7daa6a=>String(_0x7daa6a['id'])===String(_0xde26ce)),_0x2eda6d=_0x1bbe45?.[_0x533b36(0x177)]||_0xde26ce,_0x3ed097={'journeyName':_0x580eb5,'stageName':_0x2eda6d};return _0x34d395[_0x533b36(0x147)](_0x59500b,_0x3ed097),_0x3ed097;}export function formatApiJourneyName(_0x4c08bd,_0x334894){return _0x334894+'\x20('+_0x4c08bd+')';}export function isLocalJourneyRef(_0x26cbac){const _0x3355d7=a145_0x4b53;return _0x26cbac[_0x3355d7(0x161)](_0x3355d7(0x18c))||_0x26cbac['endsWith'](_0x3355d7(0x16c));}export function buildLocalRuleToNameMapping(_0x4570b4){const _0x2b1bc9=a145_0x4b53,_0xd035b9=new Map();if(!_0x4570b4)return _0xd035b9;for(const [_0x1051ee,_0x22dda4]of Object['entries'](_0x4570b4)){if(_0x22dda4[_0x2b1bc9(0x183)]){const _0x220473=serializeRule(_0x22dda4[_0x2b1bc9(0x183)]),_0x1a4205=_0xd035b9[_0x2b1bc9(0x146)](_0x220473)||[];_0x1a4205[_0x2b1bc9(0x16f)](_0x1051ee),_0xd035b9[_0x2b1bc9(0x147)](_0x220473,_0x1a4205);}}return _0xd035b9;}export function buildLocalRuleToNameMappingFromJourney(_0x376a76){const _0x549e30=a145_0x4b53,_0x4fdac9=_0x376a76[_0x549e30(0x164)];if(!_0x4fdac9)return new Map();const _0x1aa5e3=collectSegmentUsageCounts(_0x376a76),_0x5c0c81=new Map();let _0x81e173=0x0;for(const [_0xfc438c,_0x54e1d5]of Object['entries'](_0x4fdac9)){if(!_0x54e1d5[_0x549e30(0x183)]){_0x81e173++;continue;}const _0xef0c3f=serializeRule(_0x54e1d5[_0x549e30(0x183)]),_0x36e0af=_0x5c0c81[_0x549e30(0x146)](_0xef0c3f)||[];_0x36e0af[_0x549e30(0x16f)]({'name':_0xfc438c,'index':_0x81e173}),_0x5c0c81[_0x549e30(0x147)](_0xef0c3f,_0x36e0af),_0x81e173++;}const _0x561e36=new Map();for(const [_0x410fbf,_0x19dc34]of _0x5c0c81){const _0x53574b=_0x19dc34[_0x549e30(0x192)]()[_0x549e30(0x14e)]((_0x115e6b,_0x411f15)=>{const _0x587e1d=_0x549e30,_0x3b3122=_0x1aa5e3[_0x587e1d(0x146)](_0x115e6b[_0x587e1d(0x177)])||0x0,_0x8b573=_0x1aa5e3[_0x587e1d(0x146)](_0x411f15[_0x587e1d(0x177)])||0x0;if(_0x3b3122!==_0x8b573)return _0x8b573-_0x3b3122;return _0x115e6b['index']-_0x411f15[_0x587e1d(0x143)];})[_0x549e30(0x16a)](_0x1c1e4d=>_0x1c1e4d[_0x549e30(0x177)]);_0x561e36['set'](_0x410fbf,_0x53574b);}return _0x561e36;}export function collectSegmentUsageCounts(_0x2f9803){const _0x1c4649=a145_0x4b53,_0x4fd647=new Map(),_0x21993d=_0x34d8f9=>{const _0x218ebe=a145_0x4b53;if(!_0x34d8f9)return;_0x4fd647[_0x218ebe(0x147)](_0x34d8f9,(_0x4fd647['get'](_0x34d8f9)||0x0)+0x1);},_0x20a685=_0x379300=>{const _0x5a75af=a145_0x4b53;for(const _0x47326f of _0x379300){_0x21993d(_0x47326f[_0x5a75af(0x152)]?.[_0x5a75af(0x157)]);if(_0x47326f[_0x5a75af(0x149)])for(const _0x32eee6 of _0x47326f[_0x5a75af(0x149)]){_0x21993d(_0x32eee6['segment']);}_0x21993d(_0x47326f['milestone']?.[_0x5a75af(0x157)]);if(_0x47326f[_0x5a75af(0x17b)])for(const _0x428961 of _0x47326f[_0x5a75af(0x17b)]){if(_0x428961['type']===_0x5a75af(0x144))for(const _0x510de2 of _0x428961[_0x5a75af(0x162)][_0x5a75af(0x184)]){_0x21993d(_0x510de2[_0x5a75af(0x157)]);}else _0x428961[_0x5a75af(0x188)]===_0x5a75af(0x163)&&_0x21993d(_0x428961[_0x5a75af(0x162)]['condition']?.[_0x5a75af(0x157)]);}}};_0x21993d(_0x2f9803[_0x1c4649(0x186)]?.['segment']);if(_0x2f9803[_0x1c4649(0x197)])for(const _0x855f8d of _0x2f9803['journeys']){_0x21993d(_0x855f8d[_0x1c4649(0x186)]?.[_0x1c4649(0x157)]),_0x20a685(_0x855f8d['stages']);}_0x2f9803[_0x1c4649(0x166)]&&_0x20a685(_0x2f9803[_0x1c4649(0x166)]);if(_0x2f9803[_0x1c4649(0x18f)])for(const _0x385aee of _0x2f9803[_0x1c4649(0x18f)]){_0x20a685(_0x385aee[_0x1c4649(0x166)]);}return _0x4fd647;}