@treasuredata/tdx 0.14.4 → 0.14.5

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 (168) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.d.ts +1 -1
  4. package/dist/cli-categories.js +1 -1
  5. package/dist/cli-categories.js.map +1 -1
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +1 -1
  8. package/dist/cli.js.map +1 -1
  9. package/dist/commands/activations.js +1 -1
  10. package/dist/commands/agent-command.js +1 -1
  11. package/dist/commands/api-command.js +1 -1
  12. package/dist/commands/auth-command.js +1 -1
  13. package/dist/commands/chat-command.js +1 -1
  14. package/dist/commands/claude-command.d.ts +0 -4
  15. package/dist/commands/claude-command.d.ts.map +1 -1
  16. package/dist/commands/claude-command.js +1 -1
  17. package/dist/commands/claude-command.js.map +1 -1
  18. package/dist/commands/claude-statusline-command.js +1 -1
  19. package/dist/commands/claude-usage-command.js +1 -1
  20. package/dist/commands/command.js +1 -1
  21. package/dist/commands/connection-command.js +1 -1
  22. package/dist/commands/databases.js +1 -1
  23. package/dist/commands/describe.js +1 -1
  24. package/dist/commands/engage-command.js +1 -1
  25. package/dist/commands/job-command.js +1 -1
  26. package/dist/commands/journey-command.js +1 -1
  27. package/dist/commands/journey-validate-command.js +1 -1
  28. package/dist/commands/llm-command.js +1 -1
  29. package/dist/commands/llm-proxy.js +1 -1
  30. package/dist/commands/parent-segment-command.js +1 -1
  31. package/dist/commands/profile-command.d.ts +1 -1
  32. package/dist/commands/profile-command.d.ts.map +1 -1
  33. package/dist/commands/profile-command.js +1 -1
  34. package/dist/commands/profile-command.js.map +1 -1
  35. package/dist/commands/profiles-command.js +1 -1
  36. package/dist/commands/query-command.js +1 -1
  37. package/dist/commands/segment-command.js +1 -1
  38. package/dist/commands/segment-create-command.js +1 -1
  39. package/dist/commands/segment-fields-command.js +1 -1
  40. package/dist/commands/segment-pull-command.js +1 -1
  41. package/dist/commands/segment-push-command.js +1 -1
  42. package/dist/commands/segment-update-command.js +1 -1
  43. package/dist/commands/segment-use-command.js +1 -1
  44. package/dist/commands/segment-validate-command.js +1 -1
  45. package/dist/commands/segments.js +1 -1
  46. package/dist/commands/show.js +1 -1
  47. package/dist/commands/tables.js +1 -1
  48. package/dist/commands/unset-command.d.ts +18 -0
  49. package/dist/commands/unset-command.d.ts.map +1 -0
  50. package/dist/commands/unset-command.js +1 -0
  51. package/dist/commands/unset-command.js.map +1 -0
  52. package/dist/commands/use-command.d.ts.map +1 -1
  53. package/dist/commands/use-command.js +1 -1
  54. package/dist/commands/use-command.js.map +1 -1
  55. package/dist/commands/user-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/profile.d.ts +18 -0
  66. package/dist/core/profile.d.ts.map +1 -1
  67. package/dist/core/profile.js +1 -1
  68. package/dist/core/profile.js.map +1 -1
  69. package/dist/core/project-config.js +1 -1
  70. package/dist/core/session.d.ts +11 -0
  71. package/dist/core/session.d.ts.map +1 -1
  72. package/dist/core/session.js +1 -1
  73. package/dist/core/session.js.map +1 -1
  74. package/dist/core/user-cache.js +1 -1
  75. package/dist/core/version.js +1 -1
  76. package/dist/index.js +1 -1
  77. package/dist/proxy/anthropic-adapter.js +1 -1
  78. package/dist/proxy/claude-usage-tracker.js +1 -1
  79. package/dist/proxy/context-signature.js +1 -1
  80. package/dist/proxy/conversation-utils.js +1 -1
  81. package/dist/proxy/passthrough-server.js +1 -1
  82. package/dist/proxy/server.js +1 -1
  83. package/dist/proxy/session-cache.js +1 -1
  84. package/dist/proxy/sse-usage-parser.js +1 -1
  85. package/dist/sdk/agent/agent-config.js +1 -1
  86. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  87. package/dist/sdk/agent/agent-yaml.js +1 -1
  88. package/dist/sdk/api.js +1 -1
  89. package/dist/sdk/client/cdp-api-client.js +1 -1
  90. package/dist/sdk/client/endpoints.js +1 -1
  91. package/dist/sdk/client/engage-api-client.js +1 -1
  92. package/dist/sdk/client/http-client.js +1 -1
  93. package/dist/sdk/client/llm-api-client.js +1 -1
  94. package/dist/sdk/client/rate-limiter.js +1 -1
  95. package/dist/sdk/client/td-api-client.js +1 -1
  96. package/dist/sdk/client/trino-api-client.js +1 -1
  97. package/dist/sdk/client/workflow-client.js +1 -1
  98. package/dist/sdk/connection-validator.js +1 -1
  99. package/dist/sdk/connection.js +1 -1
  100. package/dist/sdk/engage.js +1 -1
  101. package/dist/sdk/errors.js +1 -1
  102. package/dist/sdk/index.js +1 -1
  103. package/dist/sdk/io/index.js +1 -1
  104. package/dist/sdk/io/node-filesystem.js +1 -1
  105. package/dist/sdk/job.js +1 -1
  106. package/dist/sdk/journey.js +1 -1
  107. package/dist/sdk/llm/chat-cache.js +1 -1
  108. package/dist/sdk/llm/index.js +1 -1
  109. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  110. package/dist/sdk/llm/model-aliases.js +1 -1
  111. package/dist/sdk/llm/model-factors.js +1 -1
  112. package/dist/sdk/query/index.js +1 -1
  113. package/dist/sdk/query/sql-parser.js +1 -1
  114. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  115. package/dist/sdk/segment/fields-display.js +1 -1
  116. package/dist/sdk/segment/file-discovery.js +1 -1
  117. package/dist/sdk/segment/journey-utils.js +1 -1
  118. package/dist/sdk/segment/journey-yaml.js +1 -1
  119. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  120. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  121. package/dist/sdk/segment/pull-workflow.js +1 -1
  122. package/dist/sdk/segment/push-workflow.js +1 -1
  123. package/dist/sdk/segment/resolution-context.js +1 -1
  124. package/dist/sdk/segment/segment-path-parser.js +1 -1
  125. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  126. package/dist/sdk/segment/target-resolution.js +1 -1
  127. package/dist/sdk/segment/tdx-config.js +1 -1
  128. package/dist/sdk/segment/validate-files.js +1 -1
  129. package/dist/sdk/segment/yaml-validator.js +1 -1
  130. package/dist/sdk/segment.js +1 -1
  131. package/dist/sdk/types/index.d.ts +1 -0
  132. package/dist/sdk/types/index.d.ts.map +1 -1
  133. package/dist/sdk/types/index.js +1 -1
  134. package/dist/sdk/types/index.js.map +1 -1
  135. package/dist/sdk/types/progress.js +1 -1
  136. package/dist/sdk/user.js +1 -1
  137. package/dist/sdk/util/format-detector.js +1 -1
  138. package/dist/sdk/util/formatters.js +1 -1
  139. package/dist/sdk/util/index.js +1 -1
  140. package/dist/sdk/util/tree-formatter.js +1 -1
  141. package/dist/sdk/workflow/clone-workflow.js +1 -1
  142. package/dist/sdk/workflow/index.js +1 -1
  143. package/dist/sdk/workflow/pull-workflow.js +1 -1
  144. package/dist/sdk/workflow/push-workflow.js +1 -1
  145. package/dist/sdk/workflow/tdx-config.js +1 -1
  146. package/dist/sdk/workflow/workflow-utils.js +1 -1
  147. package/dist/utils/async.js +1 -1
  148. package/dist/utils/colors.js +1 -1
  149. package/dist/utils/diff.js +1 -1
  150. package/dist/utils/file-permissions.js +1 -1
  151. package/dist/utils/json-loader.js +1 -1
  152. package/dist/utils/option-validation.js +1 -1
  153. package/dist/utils/port.js +1 -1
  154. package/dist/utils/process.d.ts +25 -1
  155. package/dist/utils/process.d.ts.map +1 -1
  156. package/dist/utils/process.js +1 -1
  157. package/dist/utils/process.js.map +1 -1
  158. package/dist/utils/prompt.js +1 -1
  159. package/dist/utils/spinner.d.ts +3 -0
  160. package/dist/utils/spinner.d.ts.map +1 -1
  161. package/dist/utils/spinner.js +1 -1
  162. package/dist/utils/spinner.js.map +1 -1
  163. package/dist/utils/sse-parser.js +1 -1
  164. package/dist/utils/string-utils.js +1 -1
  165. package/dist/utils/table-ref-parser.js +1 -1
  166. package/dist/utils/tdx-logger.js +1 -1
  167. package/dist/utils/version-check.js +1 -1
  168. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x254cd4,_0x3b118f){const _0x2af413=a92_0x1e89,_0x3e57e0=_0x254cd4();while(!![]){try{const _0x140a0d=parseInt(_0x2af413(0x116))/0x1+-parseInt(_0x2af413(0x154))/0x2+-parseInt(_0x2af413(0x102))/0x3*(-parseInt(_0x2af413(0x185))/0x4)+-parseInt(_0x2af413(0x17e))/0x5*(-parseInt(_0x2af413(0x141))/0x6)+parseInt(_0x2af413(0x16a))/0x7*(parseInt(_0x2af413(0x183))/0x8)+parseInt(_0x2af413(0x138))/0x9*(parseInt(_0x2af413(0x123))/0xa)+-parseInt(_0x2af413(0x155))/0xb;if(_0x140a0d===_0x3b118f)break;else _0x3e57e0['push'](_0x3e57e0['shift']());}catch(_0x3759ed){_0x3e57e0['push'](_0x3e57e0['shift']());}}}(a92_0x1513,0xc5a80));import*as a92_0x1faf5d from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';export function segmentResponseToDefSync(_0x1958c9,_0x500768){const _0x199541=a92_0x1e89,_0x2f0dab=_0x1958c9[_0x199541(0x17c)]&&_0x199541(0x152)in _0x1958c9[_0x199541(0x17c)]&&_0x1958c9[_0x199541(0x17c)][_0x199541(0x152)];return{'type':_0x199541(0x167),'name':_0x1958c9['name'],..._0x1958c9[_0x199541(0x110)]&&{'description':_0x1958c9['description']},..._0x500768&&{'folder':_0x500768},..._0x2f0dab&&{'rule':apiRuleToYaml(_0x1958c9[_0x199541(0x17c)])},..._0x1958c9[_0x199541(0x11b)]!==undefined&&{'kind':_0x1958c9['kind']===0x0?_0x199541(0x148):_0x1958c9[_0x199541(0x11b)]===0x1?_0x199541(0x113):'funnel_stage'},..._0x1958c9[_0x199541(0x151)]!==undefined&&{'visible':_0x1958c9[_0x199541(0x151)]}};}export async function segmentResponseToDef(_0x4db747,_0x16a2df,_0x1a5a63){const _0x4ca79d=a92_0x1e89,_0x1212cf=segmentResponseToDefSync(_0x4db747,_0x1a5a63);if(!_0x16a2df||!_0x16a2df[_0x4ca79d(0x16d)])return _0x1212cf;return _0x1212cf['rule']&&(_0x1212cf[_0x4ca79d(0x17c)]=await resolveRuleSegmentRefs(_0x1212cf[_0x4ca79d(0x17c)],_0x16a2df[_0x4ca79d(0x16d)])),_0x1212cf;}export function apiRuleToYaml(_0x46a384){const _0x2734b0=a92_0x1e89,_0x5023e2=(_0x46a384[_0x2734b0(0x120)]||[])[_0x2734b0(0x10d)](apiConditionToYaml);if(_0x5023e2[_0x2734b0(0x101)]===0x1&&!_0x46a384[_0x2734b0(0x110)]&&_0x2734b0(0x152)in _0x5023e2[0x0]&&(_0x5023e2[0x0][_0x2734b0(0x152)]===_0x2734b0(0x172)||_0x5023e2[0x0][_0x2734b0(0x152)]==='Or')){const _0x168c51=_0x5023e2[0x0];if(_0x168c51[_0x2734b0(0x152)]===_0x46a384[_0x2734b0(0x152)]&&_0x168c51[_0x2734b0(0x120)])return{'type':_0x46a384['type'],'conditions':_0x168c51[_0x2734b0(0x120)],..._0x168c51[_0x2734b0(0x110)]&&{'description':_0x168c51['description']}};}return{'type':_0x46a384[_0x2734b0(0x152)],'conditions':_0x5023e2,..._0x46a384[_0x2734b0(0x110)]&&{'description':_0x46a384[_0x2734b0(0x110)]}};}export async function resolveRuleSegmentRefs(_0x49d9cf,_0xcb7684){const _0x210ec0=a92_0x1e89,_0x5a5b8b=await Promise['all'](_0x49d9cf[_0x210ec0(0x120)][_0x210ec0(0x10d)](_0x4a1f4e=>resolveConditionSegmentRefs(_0x4a1f4e,_0xcb7684)));return{..._0x49d9cf,'conditions':_0x5a5b8b};}async function resolveConditionSegmentRefs(_0x4c6674,_0x3cc804){const _0x21df95=a92_0x1e89;if('segment'in _0x4c6674&&(_0x4c6674[_0x21df95(0x152)]===_0x21df95(0x186)||_0x4c6674[_0x21df95(0x152)]===_0x21df95(0x17d))){const _0x24a451=_0x4c6674;if(/^\d+$/[_0x21df95(0x15f)](_0x24a451[_0x21df95(0x167)])){const _0x41db28=await _0x3cc804(_0x24a451[_0x21df95(0x167)]);return{..._0x24a451,'segment':_0x41db28};}return _0x4c6674;}if(_0x21df95(0x120)in _0x4c6674&&_0x4c6674[_0x21df95(0x120)]){const _0x57547e=_0x4c6674,_0x175fc9=await Promise['all'](_0x57547e['conditions'][_0x21df95(0x10d)](_0x2c526b=>resolveConditionSegmentRefs(_0x2c526b,_0x3cc804)));return{..._0x57547e,'conditions':_0x175fc9};}if(_0x21df95(0x181)in _0x4c6674&&_0x4c6674['filter']){const _0x3ace1c=_0x4c6674,_0x2b3534=await resolveRuleSegmentRefs(_0x3ace1c['filter'],_0x3cc804);return{..._0x3ace1c,'filter':_0x2b3534};}return _0x4c6674;}export async function resolveRuleSegmentIds(_0x4ae7ff,_0x1c0f16){const _0x382523=a92_0x1e89,_0x258914=await Promise[_0x382523(0x143)](_0x4ae7ff[_0x382523(0x120)][_0x382523(0x10d)](_0x5c3c3d=>resolveConditionSegmentIds(_0x5c3c3d,_0x1c0f16)));return{..._0x4ae7ff,'conditions':_0x258914};}async function resolveConditionSegmentIds(_0x251f8e,_0x4985b3){const _0x14d079=a92_0x1e89;if(_0x14d079(0x167)in _0x251f8e&&(_0x251f8e[_0x14d079(0x152)]===_0x14d079(0x186)||_0x251f8e[_0x14d079(0x152)]==='exclude')){const _0x2863bb=_0x251f8e;if(!/^\d+$/['test'](_0x2863bb['segment'])){const _0x3b2f22=await _0x4985b3(_0x2863bb[_0x14d079(0x167)]);return{..._0x2863bb,'segment':_0x3b2f22};}return _0x251f8e;}if(_0x14d079(0x120)in _0x251f8e&&_0x251f8e[_0x14d079(0x120)]){const _0x4efebb=_0x251f8e,_0x488b2b=await Promise[_0x14d079(0x143)](_0x4efebb[_0x14d079(0x120)][_0x14d079(0x10d)](_0x52c073=>resolveConditionSegmentIds(_0x52c073,_0x4985b3)));return{..._0x4efebb,'conditions':_0x488b2b};}if(_0x14d079(0x181)in _0x251f8e&&_0x251f8e[_0x14d079(0x181)]){const _0x580ec0=_0x251f8e,_0x500f58=await resolveRuleSegmentIds(_0x580ec0[_0x14d079(0x181)],_0x4985b3);return{..._0x580ec0,'filter':_0x500f58};}return _0x251f8e;}function apiConditionToYaml(_0x390a94){const _0x5be13c=a92_0x1e89;if(_0x390a94[_0x5be13c(0x152)]===_0x5be13c(0x172)||_0x390a94[_0x5be13c(0x152)]==='Or'){if(_0x390a94[_0x5be13c(0x120)]){const _0x10bfab=_0x390a94['conditions'][_0x5be13c(0x10d)](apiConditionToYaml);if(_0x10bfab[_0x5be13c(0x101)]===0x1&&!_0x390a94[_0x5be13c(0x110)])return _0x10bfab[0x0];return{'type':_0x390a94[_0x5be13c(0x152)],'conditions':_0x10bfab,..._0x390a94[_0x5be13c(0x110)]&&{'description':_0x390a94[_0x5be13c(0x110)]}};}}if(_0x390a94[_0x5be13c(0x152)]===_0x5be13c(0x12f)&&_0x390a94['leftValue']&&_0x390a94[_0x5be13c(0x11e)]){const _0x38bd3b=_0x390a94['leftValue'][_0x5be13c(0x140)]?{'type':_0x390a94['leftValue'][_0x5be13c(0x140)][_0x5be13c(0x152)],..._0x390a94['leftValue'][_0x5be13c(0x140)][_0x5be13c(0x13b)]&&{'groupingColumns':_0x390a94[_0x5be13c(0x176)][_0x5be13c(0x140)][_0x5be13c(0x13b)]}}:undefined;return{'type':_0x5be13c(0x12f),'attribute':_0x390a94[_0x5be13c(0x176)][_0x5be13c(0x170)]||'','operator':apiOperatorToYaml(_0x390a94[_0x5be13c(0x11e)]),..._0x390a94[_0x5be13c(0x104)]&&_0x390a94[_0x5be13c(0x104)]!==_0x5be13c(0x106)?{'arrayMatching':_0x390a94[_0x5be13c(0x104)]}:{},..._0x390a94['exclude']?{'exclude':_0x390a94[_0x5be13c(0x17d)]}:{},..._0x38bd3b?{'aggregation':_0x38bd3b}:{},..._0x390a94[_0x5be13c(0x176)]['source']?{'source':_0x390a94[_0x5be13c(0x176)][_0x5be13c(0x108)][_0x5be13c(0x170)]}:{},..._0x390a94['leftValue']['filter']?{'filter':apiRuleToYaml(_0x390a94[_0x5be13c(0x176)][_0x5be13c(0x181)])}:{},..._0x390a94[_0x5be13c(0x14b)]!==undefined&&_0x390a94[_0x5be13c(0x14b)]!==null?{'limit':_0x390a94[_0x5be13c(0x14b)]}:{}};}if(_0x390a94[_0x5be13c(0x152)]===_0x5be13c(0x134)&&_0x390a94['id'])return{'type':_0x390a94[_0x5be13c(0x17d)]?_0x5be13c(0x17d):_0x5be13c(0x186),'segment':_0x390a94['id']};return{'type':_0x5be13c(0x172),'conditions':[]};}function isTemporalOperator(_0x1b335d){const _0x4d6297=a92_0x1e89;return _0x1b335d===_0x4d6297(0x157)||_0x1b335d===_0x4d6297(0x145);}function getEffectiveValue(_0x4c9991){const _0xa84253=a92_0x1e89,_0x121116=_0x4c9991[_0xa84253(0x142)];return _0x4c9991['value']??_0x121116;}function apiOperatorToYaml(_0xce6e74){const _0x438584=a92_0x1e89;let _0x4d0413;if(_0xce6e74[_0x438584(0x18a)]&&_0xce6e74[_0x438584(0x18a)][_0x438584(0x101)]>0x0)_0x4d0413=_0xce6e74['rightValues'];else{if(_0xce6e74[_0x438584(0x122)]!==undefined)_0x4d0413=_0xce6e74[_0x438584(0x122)];else isTemporalOperator(_0xce6e74[_0x438584(0x152)])&&_0xce6e74[_0x438584(0x17f)]!==undefined&&(_0x4d0413=_0xce6e74[_0x438584(0x17f)]);}return{'type':mapApiOperatorType(_0xce6e74[_0x438584(0x152)]),..._0xce6e74['not']&&{'not':_0xce6e74[_0x438584(0x136)]},..._0x4d0413!==undefined&&{'value':_0x4d0413},..._0xce6e74['unit']&&{'unit':_0xce6e74[_0x438584(0x18e)]}};}function mapApiOperatorType(_0x5af135){return _0x5af135;}export function segmentDefToCreateRequest(_0x3a7350,_0x4bbc6c){const _0x1999d2=a92_0x1e89,_0x134fb6={'name':_0x3a7350[_0x1999d2(0x170)]};return _0x3a7350[_0x1999d2(0x110)]&&(_0x134fb6[_0x1999d2(0x110)]=_0x3a7350[_0x1999d2(0x110)]),_0x3a7350[_0x1999d2(0x17c)]&&(_0x134fb6[_0x1999d2(0x17c)]=yamlRuleToApi(_0x3a7350[_0x1999d2(0x17c)])),_0x3a7350[_0x1999d2(0x11b)]&&(_0x134fb6['kind']=_0x3a7350[_0x1999d2(0x11b)]===_0x1999d2(0x148)?0x0:_0x3a7350['kind']===_0x1999d2(0x113)?0x1:0x2),_0x3a7350[_0x1999d2(0x112)]!==undefined&&(_0x134fb6[_0x1999d2(0x151)]=_0x3a7350[_0x1999d2(0x112)]),_0x4bbc6c&&(_0x134fb6['segmentFolderId']=_0x4bbc6c),_0x134fb6;}export function segmentDefToUpdateRequest(_0x2aa1d4){const _0x2d4e08=a92_0x1e89,_0x287550={'name':_0x2aa1d4[_0x2d4e08(0x170)]};return _0x2aa1d4['description']!==undefined&&(_0x287550['description']=_0x2aa1d4['description']),_0x2aa1d4[_0x2d4e08(0x17c)]&&(_0x287550[_0x2d4e08(0x17c)]=yamlRuleToApi(_0x2aa1d4[_0x2d4e08(0x17c)])),_0x2aa1d4['kind']&&(_0x287550['kind']=_0x2aa1d4[_0x2d4e08(0x11b)]==='batch'?0x0:_0x2aa1d4['kind']===_0x2d4e08(0x113)?0x1:0x2),_0x287550;}export function yamlRuleToApi(_0x483ac9,_0xb1bf10=![]){const _0x5f28a2=a92_0x1e89,_0x4fbead=_0x483ac9[_0x5f28a2(0x120)][_0x5f28a2(0x10d)](yamlConditionToApi);if(_0xb1bf10){const _0x1d8c76=_0x4fbead[_0x5f28a2(0x18b)](_0x2aaf8c=>_0x2aaf8c[_0x5f28a2(0x152)]===_0x5f28a2(0x172)||_0x2aaf8c[_0x5f28a2(0x152)]==='Or');if(!_0x1d8c76&&_0x4fbead[_0x5f28a2(0x101)]>0x0)return{'type':_0x483ac9[_0x5f28a2(0x152)],'conditions':[{'type':_0x5f28a2(0x172),'description':_0x483ac9['description']||'','conditions':_0x4fbead}]};}return{'type':_0x483ac9[_0x5f28a2(0x152)],'conditions':_0x4fbead,..._0x483ac9[_0x5f28a2(0x110)]&&{'description':_0x483ac9[_0x5f28a2(0x110)]}};}function yamlConditionToApi(_0x343882){const _0x2373cb=a92_0x1e89;if(_0x2373cb(0x167)in _0x343882&&(_0x343882['type']===_0x2373cb(0x186)||_0x343882['type']===_0x2373cb(0x17d))){const _0x23b317=_0x343882;return{'type':_0x2373cb(0x134),'id':_0x23b317[_0x2373cb(0x167)],'exclude':_0x23b317[_0x2373cb(0x152)]===_0x2373cb(0x17d)};}if(_0x2373cb(0x152)in _0x343882&&(_0x343882[_0x2373cb(0x152)]===_0x2373cb(0x172)||_0x343882['type']==='Or')){const _0x4d4137=_0x343882;return{'type':_0x4d4137[_0x2373cb(0x152)],'conditions':_0x4d4137[_0x2373cb(0x120)][_0x2373cb(0x10d)](yamlConditionToApi),..._0x4d4137[_0x2373cb(0x110)]&&{'description':_0x4d4137[_0x2373cb(0x110)]}};}const _0x2a6d89=_0x343882,_0x534449={'type':'Value','leftValue':buildLeftValue(_0x2a6d89),'operator':yamlOperatorToApi(_0x2a6d89[_0x2373cb(0x11e)]),'exclude':_0x2a6d89[_0x2373cb(0x17d)]??![],'arrayMatching':_0x2a6d89[_0x2373cb(0x104)]??'any'};return _0x2a6d89[_0x2373cb(0x14b)]!==undefined&&(_0x534449[_0x2373cb(0x14b)]=_0x2a6d89['limit']),_0x534449;}function buildLeftValue(_0x111319){const _0x568f74=a92_0x1e89,_0x49c3bb={'name':_0x111319['attribute']};return _0x111319[_0x568f74(0x140)]&&(_0x49c3bb[_0x568f74(0x140)]={'type':_0x111319['aggregation'][_0x568f74(0x152)],..._0x111319[_0x568f74(0x140)][_0x568f74(0x13b)]&&{'groupingColumns':_0x111319[_0x568f74(0x140)]['groupingColumns']}}),_0x111319[_0x568f74(0x108)]&&(_0x49c3bb[_0x568f74(0x108)]={'name':_0x111319[_0x568f74(0x108)]}),_0x111319[_0x568f74(0x181)]&&(_0x49c3bb['filter']=yamlRuleToApi(_0x111319[_0x568f74(0x181)])),_0x49c3bb;}function yamlOperatorToApi(_0x1d1dc6){const _0x3dbea4=a92_0x1e89,_0x5a9d26={'type':mapYamlOperatorType(_0x1d1dc6[_0x3dbea4(0x152)]),'not':_0x1d1dc6[_0x3dbea4(0x136)]??![]},_0x509ceb=getEffectiveValue(_0x1d1dc6);if(_0x509ceb!==undefined){if(Array[_0x3dbea4(0x189)](_0x509ceb))_0x5a9d26['rightValues']=_0x509ceb;else isTemporalOperator(_0x1d1dc6['type'])?_0x5a9d26[_0x3dbea4(0x17f)]=_0x509ceb:_0x5a9d26[_0x3dbea4(0x122)]=_0x509ceb;}return _0x1d1dc6[_0x3dbea4(0x18e)]&&(_0x5a9d26[_0x3dbea4(0x18e)]=_0x1d1dc6[_0x3dbea4(0x18e)]),_0x5a9d26;}function mapYamlOperatorType(_0x12b207){return _0x12b207;}export function toYamlString(_0x5670d4){const _0x32d3bd=a92_0x1e89,_0x5a851c=JSON[_0x32d3bd(0x17b)](JSON[_0x32d3bd(0x131)](_0x5670d4)),_0x1e7211=a92_0x1faf5d[_0x32d3bd(0x131)](_0x5a851c,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x32d3bd(0x10b)}),_0x456157=[_0x32d3bd(0x107)];let _0x274ab9=_0x1e7211;for(const _0x144dba of _0x456157){_0x274ab9=_0x274ab9[_0x32d3bd(0x132)](new RegExp('^('+_0x144dba+')','m'),(_0x4b3336,_0x265aaf,_0x5b8a42)=>{if(_0x5b8a42===0x0||_0x274ab9[_0x5b8a42-0x1]==='\x0a'&&_0x274ab9[_0x5b8a42-0x2]==='\x0a')return _0x265aaf;return'\x0a'+_0x265aaf;});}return _0x274ab9;}export function parseYamlString(_0x2c8179){const _0x3f65bf=a92_0x1e89,_0x594d53=a92_0x1faf5d['parse'](_0x2c8179);if(!_0x594d53['name'])throw new Error(_0x3f65bf(0x179));if(_0x594d53[_0x3f65bf(0x152)]&&_0x594d53[_0x3f65bf(0x152)]!=='segment')throw new Error(_0x3f65bf(0x10f)+_0x594d53[_0x3f65bf(0x152)]);return _0x594d53;}export function isSegmentYaml(_0x162411){const _0x1c78b4=a92_0x1e89;if(typeof _0x162411!==_0x1c78b4(0x144)||_0x162411===null)return![];const _0x46e12c=_0x162411;return _0x46e12c[_0x1c78b4(0x152)]===_0x1c78b4(0x167)||_0x46e12c[_0x1c78b4(0x152)]===undefined;}export function generateTemplate(_0x280c20='New\x20Segment'){const _0x547191=a92_0x1e89,_0x2b2ce7={'type':'segment','name':_0x280c20,'description':_0x547191(0x11a),'rule':{'type':_0x547191(0x172),'conditions':[{'type':_0x547191(0x12f),'attribute':_0x547191(0x153),'operator':{'type':_0x547191(0x162),'value':_0x547191(0x17f)}}]}};return toYamlString(_0x2b2ce7);}export function segmentToYamlString(_0x4471e2){const _0x289f06=a92_0x1e89,_0x148faf=JSON['parse'](JSON[_0x289f06(0x131)](_0x4471e2)),_0x3e616c=a92_0x1faf5d[_0x289f06(0x131)](_0x148faf,{'indent':0x2,'lineWidth':0x0,'nullStr':'null'}),_0x8dcaef=['rule:',_0x289f06(0x114)];let _0x4c74b9=_0x3e616c;for(const _0x447535 of _0x8dcaef){_0x4c74b9=_0x4c74b9[_0x289f06(0x132)](new RegExp('^('+_0x447535+')','m'),(_0x1ebabf,_0x3c2940,_0x323004)=>{if(_0x323004===0x0||_0x4c74b9[_0x323004-0x1]==='\x0a'&&_0x4c74b9[_0x323004-0x2]==='\x0a')return _0x3c2940;return'\x0a'+_0x3c2940;});}return _0x4c74b9;}export function parseSegmentYamlFile(_0x140df3){const _0x2b392d=a92_0x1e89,_0x30f6eb=a92_0x1faf5d[_0x2b392d(0x17b)](_0x140df3);if(!_0x30f6eb[_0x2b392d(0x170)])throw new Error(_0x2b392d(0x179));return _0x30f6eb;}export function normalizeChildSegmentYaml(_0x54a35e){const _0x2c7f3a=a92_0x1e89;return{'type':_0x2c7f3a(0x167),'name':_0x54a35e[_0x2c7f3a(0x170)],..._0x54a35e[_0x2c7f3a(0x110)]!==undefined&&{'description':_0x54a35e[_0x2c7f3a(0x110)]},..._0x54a35e[_0x2c7f3a(0x12a)]!==undefined&&{'folder':_0x54a35e[_0x2c7f3a(0x12a)]},..._0x54a35e['rule']&&{'rule':normalizeRule(_0x54a35e[_0x2c7f3a(0x17c)])},..._0x54a35e['kind']!==undefined&&{'kind':_0x54a35e['kind']},..._0x54a35e[_0x2c7f3a(0x112)]!==undefined&&{'visible':_0x54a35e[_0x2c7f3a(0x112)]},..._0x54a35e['activations']&&{'activations':_0x54a35e[_0x2c7f3a(0x126)]['map'](normalizeActivation)}};}function a92_0x1e89(_0x4dad1f,_0x1d7dac){_0x4dad1f=_0x4dad1f-0x101;const _0x15137d=a92_0x1513();let _0x1e8906=_0x15137d[_0x4dad1f];return _0x1e8906;}export function normalizeRule(_0x5cb551){const _0x3a8626=a92_0x1e89;return{'type':_0x5cb551[_0x3a8626(0x152)],'conditions':_0x5cb551[_0x3a8626(0x120)][_0x3a8626(0x10d)](normalizeCondition),..._0x5cb551['description']!==undefined&&{'description':_0x5cb551[_0x3a8626(0x110)]}};}function normalizeCondition(_0xd69981){const _0x1987a2=a92_0x1e89;if('segment'in _0xd69981&&(_0xd69981[_0x1987a2(0x152)]===_0x1987a2(0x186)||_0xd69981[_0x1987a2(0x152)]===_0x1987a2(0x17d))){const _0x1b3f0e=_0xd69981;return{'type':_0x1b3f0e[_0x1987a2(0x152)],'segment':_0x1b3f0e['segment']};}if('type'in _0xd69981&&(_0xd69981[_0x1987a2(0x152)]===_0x1987a2(0x172)||_0xd69981['type']==='Or')){const _0x482760=_0xd69981;return{'type':_0x482760['type'],'conditions':_0x482760['conditions'][_0x1987a2(0x10d)](normalizeCondition),..._0x482760[_0x1987a2(0x110)]!==undefined&&{'description':_0x482760[_0x1987a2(0x110)]}};}const _0x6f28ae=_0xd69981;return{'type':'Value','attribute':_0x6f28ae[_0x1987a2(0x137)],'operator':normalizeOperator(_0x6f28ae['operator']),..._0x6f28ae[_0x1987a2(0x104)]!==undefined&&{'arrayMatching':_0x6f28ae[_0x1987a2(0x104)]},..._0x6f28ae[_0x1987a2(0x17d)]!==undefined&&{'exclude':_0x6f28ae[_0x1987a2(0x17d)]},..._0x6f28ae[_0x1987a2(0x140)]!==undefined&&{'aggregation':_0x6f28ae[_0x1987a2(0x140)]},..._0x6f28ae[_0x1987a2(0x108)]!==undefined&&{'source':_0x6f28ae[_0x1987a2(0x108)]},..._0x6f28ae[_0x1987a2(0x181)]!==undefined&&{'filter':normalizeRule(_0x6f28ae['filter'])},..._0x6f28ae[_0x1987a2(0x14b)]!==undefined&&{'limit':_0x6f28ae[_0x1987a2(0x14b)]}};}function normalizeOperator(_0x5d54c8){const _0x49dcc8=a92_0x1e89,_0x3b0bd0=getEffectiveValue(_0x5d54c8);return{'type':_0x5d54c8[_0x49dcc8(0x152)],..._0x5d54c8[_0x49dcc8(0x136)]!==undefined&&{'not':_0x5d54c8['not']},..._0x3b0bd0!==undefined&&{'value':_0x3b0bd0},..._0x5d54c8[_0x49dcc8(0x187)]!==undefined&&{'min':_0x5d54c8[_0x49dcc8(0x187)]},..._0x5d54c8[_0x49dcc8(0x128)]!==undefined&&{'max':_0x5d54c8[_0x49dcc8(0x128)]},..._0x5d54c8['unit']!==undefined&&{'unit':_0x5d54c8[_0x49dcc8(0x18e)]},..._0x5d54c8['duration']!==undefined&&{'duration':_0x5d54c8[_0x49dcc8(0x156)]},..._0x5d54c8[_0x49dcc8(0x18c)]!==undefined&&{'from':_0x5d54c8[_0x49dcc8(0x18c)]}};}function normalizeActivation(_0x480d68){const _0x52ea56=a92_0x1e89;return{'name':_0x480d68[_0x52ea56(0x170)],'connection':_0x480d68[_0x52ea56(0x158)],..._0x480d68['description']!==undefined&&{'description':_0x480d68['description']},..._0x480d68[_0x52ea56(0x171)]!==undefined&&{'all_columns':_0x480d68[_0x52ea56(0x171)]},..._0x480d68[_0x52ea56(0x119)]!==undefined&&{'columns':_0x480d68[_0x52ea56(0x119)]},..._0x480d68[_0x52ea56(0x16b)]!==undefined&&{'behavior':_0x480d68[_0x52ea56(0x16b)]},..._0x480d68[_0x52ea56(0x105)]!==undefined&&{'schedule':_0x480d68[_0x52ea56(0x105)]},..._0x480d68[_0x52ea56(0x168)]!==undefined&&{'notification':_0x480d68['notification']},..._0x480d68[_0x52ea56(0x10a)]!==undefined&&{'connector_config':_0x480d68['connector_config']},..._0x480d68[_0x52ea56(0x14d)]!==undefined&&{'activation_template_id':_0x480d68[_0x52ea56(0x14d)]}};}export function activationResponseToDef(_0x241c63,_0x35f232,_0x4be20d){const _0x1ffabe=a92_0x1e89,_0x4a9757=_0x241c63[_0x1ffabe(0x15c)]||'',_0x144840=_0x4be20d?.[_0x1ffabe(0x166)](_0x4a9757)??_0x4a9757,_0x56b267={'name':_0x241c63['name'],'connection':_0x144840};_0x241c63[_0x1ffabe(0x110)]&&(_0x56b267[_0x1ffabe(0x110)]=_0x241c63[_0x1ffabe(0x110)]);let _0x5d6de1=[];_0x241c63[_0x1ffabe(0x119)]&&_0x241c63[_0x1ffabe(0x119)][_0x1ffabe(0x101)]>0x0&&(_0x5d6de1=_0x241c63[_0x1ffabe(0x119)][_0x1ffabe(0x181)](_0x5b9caa=>_0x5b9caa&&_0x5b9caa['name'])['map'](_0x509369=>{const _0xfb0480=_0x1ffabe;if(_0x509369[_0xfb0480(0x152)]||_0x509369[_0xfb0480(0x177)])return{'name':_0x509369['name'],..._0x509369[_0xfb0480(0x152)]&&{'type':_0x509369[_0xfb0480(0x152)]},..._0x509369[_0xfb0480(0x177)]&&{'visibility':_0x509369[_0xfb0480(0x177)]}};return _0x509369[_0xfb0480(0x170)];}));_0x5d6de1[_0x1ffabe(0x101)]>0x0&&(_0x56b267[_0x1ffabe(0x119)]=_0x5d6de1);_0x241c63[_0x1ffabe(0x109)]!==undefined&&(_0x241c63[_0x1ffabe(0x109)]===![]&&_0x5d6de1[_0x1ffabe(0x101)]===0x0?_0x56b267[_0x1ffabe(0x171)]=!![]:_0x56b267[_0x1ffabe(0x171)]=_0x241c63['allColumns']);const _0x5a179e={};let _0x461a23=![];_0x241c63[_0x1ffabe(0x15a)]&&(_0x5a179e['type']=_0x241c63['scheduleType'],_0x461a23=!![]);_0x241c63[_0x1ffabe(0x161)]&&(_0x5a179e[_0x1ffabe(0x103)]=_0x241c63[_0x1ffabe(0x161)],_0x461a23=!![]);_0x241c63['repeatFrequency']!==undefined&&_0x241c63[_0x1ffabe(0x175)]!==null&&(_0x5a179e[_0x1ffabe(0x12d)]=_0x241c63['repeatFrequency'],_0x461a23=!![]);_0x241c63[_0x1ffabe(0x14c)]&&_0x241c63[_0x1ffabe(0x14c)]['length']>0x0&&(_0x5a179e[_0x1ffabe(0x13a)]=_0x241c63[_0x1ffabe(0x14c)],_0x461a23=!![]);_0x241c63[_0x1ffabe(0x16e)]!==undefined&&(_0x5a179e[_0x1ffabe(0x178)]=_0x241c63[_0x1ffabe(0x16e)],_0x461a23=!![]);_0x241c63[_0x1ffabe(0x165)]!==undefined&&(_0x5a179e['end_on']=_0x241c63[_0x1ffabe(0x165)],_0x461a23=!![]);_0x241c63[_0x1ffabe(0x150)]&&(_0x5a179e[_0x1ffabe(0x150)]=_0x241c63[_0x1ffabe(0x150)],_0x461a23=!![]);_0x461a23&&(_0x56b267[_0x1ffabe(0x105)]=_0x5a179e);(_0x241c63[_0x1ffabe(0x11c)]&&_0x241c63['notifyOn'][_0x1ffabe(0x101)]>0x0||_0x241c63[_0x1ffabe(0x160)]&&_0x241c63[_0x1ffabe(0x160)][_0x1ffabe(0x101)]>0x0)&&(_0x56b267[_0x1ffabe(0x168)]={},_0x241c63[_0x1ffabe(0x11c)]&&_0x241c63['notifyOn'][_0x1ffabe(0x101)]>0x0&&(_0x56b267[_0x1ffabe(0x168)]['notify_on']=_0x241c63['notifyOn']),_0x241c63[_0x1ffabe(0x160)]&&_0x241c63[_0x1ffabe(0x160)][_0x1ffabe(0x101)]>0x0&&(_0x56b267[_0x1ffabe(0x168)]['email_recipients']=_0x241c63[_0x1ffabe(0x160)]['map'](_0x3990b2=>{const _0x371514=_0x1ffabe,_0x7e8bef=_0x35f232?.[_0x371514(0x166)](_0x3990b2);return _0x7e8bef??String(_0x3990b2);})));_0x241c63[_0x1ffabe(0x12b)]&&Object[_0x1ffabe(0x111)](_0x241c63[_0x1ffabe(0x12b)])['length']>0x0&&(_0x56b267[_0x1ffabe(0x10a)]=normalizeConnectorConfigForYaml(_0x241c63[_0x1ffabe(0x12b)]));_0x241c63['activationTemplateId']&&(_0x56b267[_0x1ffabe(0x14d)]=_0x241c63[_0x1ffabe(0x173)]);if(_0x241c63[_0x1ffabe(0x139)]){const _0x3975f4={},_0x237f7f=_0x241c63['syndicationBehavior'];_0x237f7f['columns']&&_0x237f7f['columns'][_0x1ffabe(0x101)]>0x0&&(_0x3975f4[_0x1ffabe(0x119)]=_0x237f7f[_0x1ffabe(0x119)][_0x1ffabe(0x181)](_0x493dd0=>_0x493dd0&&_0x493dd0[_0x1ffabe(0x170)])[_0x1ffabe(0x10d)](_0x4c6903=>({'name':_0x4c6903[_0x1ffabe(0x170)],..._0x4c6903['type']&&{'type':_0x4c6903['type']},..._0x4c6903['visibility']&&{'visibility':_0x4c6903[_0x1ffabe(0x177)]}}))),_0x237f7f[_0x1ffabe(0x133)]&&(_0x3975f4['behavior_table']=_0x237f7f[_0x1ffabe(0x133)]),_0x237f7f[_0x1ffabe(0x13e)]!==undefined&&(_0x3975f4[_0x1ffabe(0x13d)]=_0x237f7f['joinRow']),_0x237f7f[_0x1ffabe(0x169)]&&(_0x3975f4[_0x1ffabe(0x135)]=_0x237f7f[_0x1ffabe(0x169)]),_0x237f7f[_0x1ffabe(0x12c)]&&(_0x3975f4[_0x1ffabe(0x12c)]=_0x237f7f[_0x1ffabe(0x12c)]),_0x237f7f[_0x1ffabe(0x146)]&&_0x237f7f[_0x1ffabe(0x146)][_0x1ffabe(0x101)]>0x0&&(_0x3975f4[_0x1ffabe(0x147)]=_0x237f7f[_0x1ffabe(0x146)]),Object[_0x1ffabe(0x111)](_0x3975f4)[_0x1ffabe(0x101)]>0x0&&(_0x56b267[_0x1ffabe(0x16b)]=_0x3975f4);}return _0x56b267;}export function journeyActivationStepToYaml(_0x14c1f2,_0x2e1142,_0x3c65f8){const _0x16eb7a=a92_0x1e89,_0x14a598=_0x14c1f2[_0x16eb7a(0x149)][_0x16eb7a(0x15e)],_0x2e6850=_0x14a598['connectionId']||'',_0x2303f7=_0x3c65f8?.[_0x16eb7a(0x166)](_0x2e6850)??_0x2e6850,_0x5acbc4={'name':_0x14a598[_0x16eb7a(0x170)]||'','connection':_0x2303f7};_0x14a598['description']&&(_0x5acbc4['description']=_0x14a598[_0x16eb7a(0x110)]);let _0x78b7ab=[];_0x14a598[_0x16eb7a(0x119)]&&_0x14a598[_0x16eb7a(0x119)][_0x16eb7a(0x101)]>0x0&&(_0x78b7ab=_0x14a598['columns'][_0x16eb7a(0x181)](_0x5e3b99=>_0x5e3b99&&_0x5e3b99[_0x16eb7a(0x170)])[_0x16eb7a(0x10d)](_0x19bf4c=>{const _0x31c95b=_0x16eb7a;if(_0x19bf4c[_0x31c95b(0x152)]||_0x19bf4c[_0x31c95b(0x177)])return{'name':_0x19bf4c[_0x31c95b(0x170)],..._0x19bf4c[_0x31c95b(0x152)]&&{'type':_0x19bf4c[_0x31c95b(0x152)]},..._0x19bf4c[_0x31c95b(0x177)]&&{'visibility':_0x19bf4c[_0x31c95b(0x177)]}};return _0x19bf4c['name'];}));_0x78b7ab[_0x16eb7a(0x101)]>0x0&&(_0x5acbc4[_0x16eb7a(0x119)]=_0x78b7ab);_0x14a598[_0x16eb7a(0x109)]!==undefined&&(_0x14a598[_0x16eb7a(0x109)]===![]&&_0x78b7ab[_0x16eb7a(0x101)]===0x0?_0x5acbc4[_0x16eb7a(0x171)]=!![]:_0x5acbc4['all_columns']=_0x14a598[_0x16eb7a(0x109)]);const _0x52d886={};let _0x28ecd1=![];_0x14a598[_0x16eb7a(0x15a)]&&(_0x52d886[_0x16eb7a(0x152)]=_0x14a598['scheduleType'],_0x28ecd1=!![]);_0x14a598['repeatUnit']&&(_0x52d886['repeat_unit']=_0x14a598[_0x16eb7a(0x161)],_0x28ecd1=!![]);_0x14a598[_0x16eb7a(0x175)]!==undefined&&_0x14a598[_0x16eb7a(0x175)]!==null&&(_0x52d886[_0x16eb7a(0x12d)]=_0x14a598[_0x16eb7a(0x175)],_0x28ecd1=!![]);_0x14a598[_0x16eb7a(0x16e)]!==undefined&&(_0x52d886['start_at']=_0x14a598[_0x16eb7a(0x16e)],_0x28ecd1=!![]);_0x14a598[_0x16eb7a(0x165)]!==undefined&&(_0x52d886[_0x16eb7a(0x127)]=_0x14a598[_0x16eb7a(0x165)],_0x28ecd1=!![]);_0x14a598[_0x16eb7a(0x150)]&&(_0x52d886[_0x16eb7a(0x150)]=_0x14a598[_0x16eb7a(0x150)],_0x28ecd1=!![]);_0x28ecd1&&(_0x5acbc4[_0x16eb7a(0x105)]=_0x52d886);(_0x14a598['notifyOn']&&_0x14a598[_0x16eb7a(0x11c)][_0x16eb7a(0x101)]>0x0||_0x14a598['emailRecipients']&&_0x14a598[_0x16eb7a(0x160)][_0x16eb7a(0x101)]>0x0)&&(_0x5acbc4[_0x16eb7a(0x168)]={},_0x14a598[_0x16eb7a(0x11c)]&&_0x14a598[_0x16eb7a(0x11c)][_0x16eb7a(0x101)]>0x0&&(_0x5acbc4[_0x16eb7a(0x168)][_0x16eb7a(0x11f)]=_0x14a598['notifyOn']),_0x14a598[_0x16eb7a(0x160)]&&_0x14a598[_0x16eb7a(0x160)][_0x16eb7a(0x101)]>0x0&&(_0x5acbc4[_0x16eb7a(0x168)][_0x16eb7a(0x17a)]=_0x14a598[_0x16eb7a(0x160)][_0x16eb7a(0x10d)](_0x44fdc2=>{const _0xcb0c60=_0x16eb7a,_0xfea8a6=_0x2e1142?.[_0xcb0c60(0x166)](_0x44fdc2);return _0xfea8a6??String(_0x44fdc2);})));_0x14a598[_0x16eb7a(0x12b)]&&Object['keys'](_0x14a598[_0x16eb7a(0x12b)])['length']>0x0&&(_0x5acbc4[_0x16eb7a(0x10a)]=normalizeConnectorConfigForYaml(_0x14a598[_0x16eb7a(0x12b)]));_0x14a598[_0x16eb7a(0x173)]&&(_0x5acbc4['activation_template_id']=_0x14a598['activationTemplateId']);if(_0x14a598[_0x16eb7a(0x139)]){const _0x28bddf={},_0x1433ac=_0x14a598[_0x16eb7a(0x139)];_0x1433ac[_0x16eb7a(0x119)]&&_0x1433ac[_0x16eb7a(0x119)][_0x16eb7a(0x101)]>0x0&&(_0x28bddf[_0x16eb7a(0x119)]=_0x1433ac[_0x16eb7a(0x119)][_0x16eb7a(0x181)](_0xd36bfb=>_0xd36bfb&&_0xd36bfb['name'])[_0x16eb7a(0x10d)](_0x33a914=>({'name':_0x33a914[_0x16eb7a(0x170)],..._0x33a914[_0x16eb7a(0x152)]&&{'type':_0x33a914[_0x16eb7a(0x152)]},..._0x33a914['visibility']&&{'visibility':_0x33a914[_0x16eb7a(0x177)]}}))),_0x1433ac['behaviorTableName']&&(_0x28bddf['behavior_table']=_0x1433ac[_0x16eb7a(0x133)]),_0x1433ac[_0x16eb7a(0x13e)]!==undefined&&(_0x28bddf['join_row']=_0x1433ac[_0x16eb7a(0x13e)]),_0x1433ac[_0x16eb7a(0x169)]&&(_0x28bddf[_0x16eb7a(0x135)]=_0x1433ac['joinStrategy']),_0x1433ac[_0x16eb7a(0x12c)]&&(_0x28bddf[_0x16eb7a(0x12c)]=_0x1433ac['formatting']),_0x1433ac[_0x16eb7a(0x146)]&&_0x1433ac[_0x16eb7a(0x146)]['length']>0x0&&(_0x28bddf[_0x16eb7a(0x147)]=_0x1433ac[_0x16eb7a(0x146)]),Object[_0x16eb7a(0x111)](_0x28bddf)[_0x16eb7a(0x101)]>0x0&&(_0x5acbc4[_0x16eb7a(0x16b)]=_0x28bddf);}return _0x5acbc4;}export function segmentWithActivationsToYaml(_0x134a78,_0xf1ef1,_0x4025fa,_0x475ee5,_0x5e54be){const _0x4034fb=a92_0x1e89,_0x4a2709=segmentResponseToDefSync(_0x134a78,_0x4025fa);return _0xf1ef1[_0x4034fb(0x101)]>0x0&&(_0x4a2709[_0x4034fb(0x126)]=_0xf1ef1['map'](_0x41901b=>activationResponseToDef(_0x41901b,_0x475ee5,_0x5e54be))),_0x4a2709;}function normalizeColumn(_0x1c545b){const _0x59dc04=a92_0x1e89;if(typeof _0x1c545b===_0x59dc04(0x121))return{'name':_0x1c545b};return{'name':_0x1c545b[_0x59dc04(0x170)],..._0x1c545b[_0x59dc04(0x152)]&&{'type':_0x1c545b['type']},..._0x1c545b['visibility']&&{'visibility':_0x1c545b['visibility']}};}export async function activationDefToCreateRequest(_0x19f336,_0x580a5f){const _0xf48460=a92_0x1e89,_0x41d43c=_0x580a5f?.[_0xf48460(0x159)],_0x5acb20=_0x580a5f?.[_0xf48460(0x11d)],_0x12e2c3=_0x19f336[_0xf48460(0x158)];let _0x17d932;const _0x47b1a6=parseInt(_0x12e2c3,0xa);if(!isNaN(_0x47b1a6)&&String(_0x47b1a6)===_0x12e2c3)_0x17d932=_0x47b1a6;else{const _0x2a54ed=_0x5acb20?.[_0xf48460(0x166)](_0x12e2c3);if(_0x2a54ed===undefined)throw new SDKError(ErrorCode[_0xf48460(0x118)],_0xf48460(0x117)+_0x12e2c3,undefined,{'helpText':_0xf48460(0x14a)});_0x17d932=_0x2a54ed;}const _0x548df7={'name':_0x19f336[_0xf48460(0x170)],'connectionId':_0x17d932};_0x19f336[_0xf48460(0x110)]&&(_0x548df7[_0xf48460(0x110)]=_0x19f336[_0xf48460(0x110)]);let _0x1e3808=[];_0x19f336[_0xf48460(0x119)]&&_0x19f336[_0xf48460(0x119)][_0xf48460(0x101)]>0x0&&(_0x1e3808=_0x19f336[_0xf48460(0x119)][_0xf48460(0x181)](_0x5b83a8=>_0x5b83a8!=null)[_0xf48460(0x10d)](normalizeColumn));_0x1e3808[_0xf48460(0x101)]>0x0&&(_0x548df7[_0xf48460(0x119)]=_0x1e3808);_0x19f336[_0xf48460(0x171)]!==undefined&&(_0x19f336[_0xf48460(0x171)]===![]&&_0x1e3808[_0xf48460(0x101)]===0x0?_0x548df7[_0xf48460(0x109)]=!![]:_0x548df7[_0xf48460(0x109)]=_0x19f336[_0xf48460(0x171)]);if(_0x19f336[_0xf48460(0x105)]){const _0x45fd87=_0x19f336[_0xf48460(0x105)];_0x45fd87['type']&&(_0x548df7[_0xf48460(0x15a)]=_0x45fd87[_0xf48460(0x152)]),_0x45fd87[_0xf48460(0x103)]&&(_0x548df7['repeatUnit']=_0x45fd87['repeat_unit']),_0x45fd87[_0xf48460(0x12d)]!==undefined&&(_0x548df7['repeatFrequency']=_0x45fd87[_0xf48460(0x12d)]),_0x45fd87[_0xf48460(0x13a)]&&(_0x548df7[_0xf48460(0x14c)]=_0x45fd87[_0xf48460(0x13a)]),_0x45fd87['start_at']!==undefined&&(_0x548df7['startAt']=_0x45fd87['start_at']),_0x45fd87[_0xf48460(0x127)]!==undefined&&(_0x548df7[_0xf48460(0x165)]=_0x45fd87[_0xf48460(0x127)]),_0x45fd87[_0xf48460(0x150)]&&(_0x548df7[_0xf48460(0x150)]=_0x45fd87[_0xf48460(0x150)]);}_0x19f336['notification']&&(_0x19f336[_0xf48460(0x168)][_0xf48460(0x11f)]&&(_0x548df7[_0xf48460(0x11c)]=_0x19f336[_0xf48460(0x168)]['notify_on']),_0x19f336[_0xf48460(0x168)]['email_recipients']&&(_0x548df7[_0xf48460(0x160)]=_0x19f336[_0xf48460(0x168)][_0xf48460(0x17a)][_0xf48460(0x10d)](_0x391432=>{const _0x52b45d=_0xf48460,_0x4eb513=Number(_0x391432);if(!isNaN(_0x4eb513)&&String(_0x4eb513)===_0x391432)return _0x4eb513;const _0x4d20e3=_0x41d43c?.[_0x52b45d(0x166)](_0x391432['toLowerCase']());if(_0x4d20e3===undefined)throw new SDKError(ErrorCode[_0x52b45d(0x174)],'Unknown\x20email\x20recipient:\x20'+_0x391432+'.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.');return _0x4d20e3;})));if(_0x19f336[_0xf48460(0x10a)]){const _0x3cb063=_0x580a5f?.[_0xf48460(0x129)]?.[_0xf48460(0x166)](_0x12e2c3);if(_0x3cb063&&_0x580a5f?.[_0xf48460(0x13f)])try{const _0x17028d=await _0x580a5f[_0xf48460(0x13f)](_0x3cb063),_0x3a4fc5=validateConnectorConfig(_0x19f336[_0xf48460(0x10a)],_0x17028d);if(!_0x3a4fc5[_0xf48460(0x115)])throw new SDKError(ErrorCode['CONNECTOR_INVALID_CONFIG'],'Invalid\x20connector_config\x20for\x20activation\x20\x22'+_0x19f336[_0xf48460(0x170)]+'\x22:\x0a'+formatValidationErrors(_0x3a4fc5['errors']),undefined,{'helpText':_0xf48460(0x184)+_0x3cb063+'\x0a\x0aAvailable\x20fields:\x0a'+formatSchemaAsHelp(_0x17028d)});if(_0x3a4fc5['warnings'][_0xf48460(0x101)]>0x0){const _0x2769a6=formatValidationWarnings(_0x3a4fc5[_0xf48460(0x130)]);console[_0xf48460(0x10c)]('connector_config\x20for\x20activation\x20\x22'+_0x19f336[_0xf48460(0x170)]+_0xf48460(0x14f)+_0x2769a6);}_0x548df7[_0xf48460(0x12b)]=transformConfigToLegacy(_0x19f336[_0xf48460(0x10a)],_0x17028d);}catch(_0x4abf68){if(_0x4abf68 instanceof SDKError&&_0x4abf68[_0xf48460(0x182)]===ErrorCode[_0xf48460(0x18d)])_0x548df7[_0xf48460(0x12b)]=_0x19f336['connector_config'];else throw _0x4abf68;}else _0x548df7[_0xf48460(0x12b)]=_0x19f336[_0xf48460(0x10a)];}_0x19f336[_0xf48460(0x14d)]!==undefined&&(_0x548df7[_0xf48460(0x173)]=_0x19f336[_0xf48460(0x14d)]);if(_0x19f336[_0xf48460(0x16b)]){const _0x9fdbd0=_0x19f336[_0xf48460(0x16b)],_0x35f06b={};if(_0x9fdbd0['columns']&&_0x9fdbd0[_0xf48460(0x119)]['length']>0x0){const _0x11817b=_0x9fdbd0[_0xf48460(0x119)][_0xf48460(0x181)](_0x219a8c=>_0x219a8c&&_0x219a8c['name']);_0x11817b['length']>0x0&&(_0x35f06b['columns']=_0x11817b);}_0x9fdbd0['behavior_table']&&(_0x35f06b[_0xf48460(0x133)]=_0x9fdbd0['behavior_table']),_0x9fdbd0[_0xf48460(0x13d)]!==undefined&&(_0x35f06b['joinRow']=_0x9fdbd0[_0xf48460(0x13d)]),_0x9fdbd0[_0xf48460(0x135)]&&(_0x35f06b[_0xf48460(0x169)]=_0x9fdbd0['join_strategy']),_0x9fdbd0['formatting']&&(_0x35f06b[_0xf48460(0x12c)]=_0x9fdbd0[_0xf48460(0x12c)]),_0x9fdbd0[_0xf48460(0x147)]&&(_0x35f06b[_0xf48460(0x146)]=_0x9fdbd0[_0xf48460(0x147)]),_0x548df7[_0xf48460(0x139)]=_0x35f06b;}return _0x548df7;}export async function activationDefToUpdateRequest(_0x34e1cf,_0xf75a6){return activationDefToCreateRequest(_0x34e1cf,_0xf75a6);}export function deepSortObject(_0x323d3b){const _0x2e913c=a92_0x1e89;if(_0x323d3b===null||typeof _0x323d3b!==_0x2e913c(0x144))return _0x323d3b;if(Array[_0x2e913c(0x189)](_0x323d3b))return _0x323d3b[_0x2e913c(0x10d)](deepSortObject)['sort']((_0x5d0e6c,_0x4bd20c)=>JSON[_0x2e913c(0x131)](_0x5d0e6c)[_0x2e913c(0x12e)](JSON['stringify'](_0x4bd20c)));const _0x120075={};for(const _0x2ff60e of Object[_0x2e913c(0x111)](_0x323d3b)[_0x2e913c(0x15b)]()){_0x120075[_0x2ff60e]=deepSortObject(_0x323d3b[_0x2ff60e]);}return _0x120075;}export function serializeRule(_0x1cf6f6){const _0x53fee7=a92_0x1e89;return JSON[_0x53fee7(0x131)](deepSortObject(_0x1cf6f6));}export function normalizeRuleForMatching(_0x5481bb){return normalizeConditionsForMatching(_0x5481bb);}function normalizeConditionsForMatching(_0x37cc6e){const _0x442b84=a92_0x1e89;if(_0x37cc6e===null||typeof _0x37cc6e!==_0x442b84(0x144))return _0x37cc6e;if(Array['isArray'](_0x37cc6e))return _0x37cc6e[_0x442b84(0x10d)](normalizeConditionsForMatching);const _0x157c94=_0x37cc6e;if((_0x157c94[_0x442b84(0x152)]==='include'||_0x157c94[_0x442b84(0x152)]==='exclude')&&typeof _0x157c94['segment']==='string')return{..._0x157c94,'segment':_0x442b84(0x125)};const _0x4d04df={};for(const _0x2a77e0 of Object[_0x442b84(0x111)](_0x157c94)){_0x4d04df[_0x2a77e0]=normalizeConditionsForMatching(_0x157c94[_0x2a77e0]);}return _0x4d04df;}export function serializeRuleForMatching(_0x589b9b){const _0x338fc2=a92_0x1e89;return JSON[_0x338fc2(0x131)](deepSortObject(normalizeRuleForMatching(_0x589b9b)));}function a92_0x1513(){const _0x167761=['repeat_sub_frequency','groupingColumns','ruleHashToName','join_row','joinRow','getSchema','aggregation','132228WOiEgX','values','all','object','TimeWithinNext','orderBy','order_by','batch','attributes','Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections','limit','repeatSubFrequency','activation_template_id','add','\x22:\x0a','timezone','isVisible','type','attribute_name','1653348egPBlN','19509578QBCwKa','duration','TimeWithinPast','connection','emailToIdMap','scheduleType','sort','connectionId','JOURNEY_SYNTAX_ERROR','activationParams','test','emailRecipients','repeatUnit','Equal','conditions[','has','endOn','get','segment','notification','joinStrategy','19782BDEdHU','behavior','__UNRESOLVED__','resolveSegmentName','startAt','Please\x20specify\x20a\x20valid\x20attribute\x20name.','name','all_columns','And','activationTemplateId','INVALID_ARGUMENT','repeatFrequency','leftValue','visibility','start_at','YAML\x20config\x20missing\x20required\x20field:\x20name','email_recipients','parse','rule','exclude','155wdDNGf','value','localRuleToName','filter','code','576etFpeh','Connector:\x20','3890116PsHOwZ','include','min','forEach','isArray','rightValues','every','from','CONNECTOR_SCHEMA_NOT_FOUND','unit','length','3BKKHhd','repeat_unit','arrayMatching','schedule','any','rule:','source','allColumns','connector_config','null','warn','map','entries','YAML\x20type\x20must\x20be\x20\x27segment\x27\x20or\x20omitted,\x20got:\x20','description','keys','visible','realtime','activations:','valid','1447043nTUZun','Unknown\x20connection:\x20','CONNECTION_NOT_FOUND','columns','Segment\x20description','kind','notifyOn','connectionNameToIdMap','operator','notify_on','conditions','string','rightValue','20FlOuIu','set','__SEGMENT_REF__','activations','end_on','max','connectionNameToTypeMap','folder','connectorConfig','formatting','repeat_frequency','localeCompare','Value','warnings','stringify','replace','behaviorTableName','Reference','join_strategy','not','attribute','466425ExEDEi','syndicationBehavior'];a92_0x1513=function(){return _0x167761;};return a92_0x1513();}export function expandSegmentReferences(_0xa43833,_0x21bba6,_0x5108df=new Set()){return expandConditions(_0xa43833,_0x21bba6,_0x5108df);}function expandConditions(_0x58ec49,_0x3bcbaf,_0x126a39){const _0x1178c4=a92_0x1e89;if(_0x58ec49===null||typeof _0x58ec49!==_0x1178c4(0x144))return _0x58ec49;if(Array[_0x1178c4(0x189)](_0x58ec49))return _0x58ec49[_0x1178c4(0x10d)](_0x348ee3=>expandConditions(_0x348ee3,_0x3bcbaf,_0x126a39));const _0x22351c=_0x58ec49;if((_0x22351c[_0x1178c4(0x152)]===_0x1178c4(0x186)||_0x22351c[_0x1178c4(0x152)]===_0x1178c4(0x17d))&&typeof _0x22351c[_0x1178c4(0x167)]===_0x1178c4(0x121)){const _0x514aaa=_0x22351c[_0x1178c4(0x167)],_0x1d5d8c=_0x3bcbaf[_0x1178c4(0x166)](_0x514aaa);if(_0x1d5d8c&&!_0x126a39[_0x1178c4(0x164)](_0x514aaa)){const _0x50a825=new Set(_0x126a39);_0x50a825['add'](_0x514aaa);const _0x5df788=expandConditions(_0x1d5d8c,_0x3bcbaf,_0x50a825);return{'type':_0x22351c[_0x1178c4(0x152)],'expanded_rule':_0x5df788};}return{'type':_0x22351c[_0x1178c4(0x152)],'expanded_rule':_0x1178c4(0x16c)};}const _0xc3600d={};for(const _0x4dbfcd of Object['keys'](_0x22351c)){_0xc3600d[_0x4dbfcd]=expandConditions(_0x22351c[_0x4dbfcd],_0x3bcbaf,_0x126a39);}return _0xc3600d;}export function serializeExpandedRule(_0x56a46f,_0x275fbf){const _0x3a13b9=a92_0x1e89,_0x334773=expandSegmentReferences(_0x56a46f,_0x275fbf);return JSON[_0x3a13b9(0x131)](deepSortObject(_0x334773));}export function createSegmentNameContext(_0x326186){const _0xee9824=a92_0x1e89,_0x447d82=new Set(),_0x98be33=new Map(),_0x1c67f0=new Map();if(_0x326186)for(const [_0x4b21de,_0x4305fa]of Object[_0xee9824(0x10e)](_0x326186)){if(_0x4305fa[_0xee9824(0x17c)]){const _0x3e3de5=serializeRule(_0x4305fa[_0xee9824(0x17c)]);_0x1c67f0[_0xee9824(0x124)](_0x3e3de5,_0x4b21de),_0x447d82[_0xee9824(0x14e)](_0x4b21de);}}return{'usedNames':_0x447d82,'ruleHashToName':_0x98be33,'localRuleToName':_0x326186?_0x1c67f0:undefined};}export function resolveSegmentName(_0x100d37,_0x37dc9d,_0x4edc12,_0x1e478d){const _0x379432=a92_0x1e89,_0x1c96a8=serializeRule(_0x37dc9d);if(_0x4edc12[_0x379432(0x180)]){const _0x53c07d=_0x4edc12[_0x379432(0x180)][_0x379432(0x166)](_0x1c96a8);if(_0x53c07d)return{'name':_0x53c07d,'isDuplicate':![],'isLocalMatch':!![]};}const _0x203ed6=_0x4edc12[_0x379432(0x13c)]['get'](_0x1c96a8);if(_0x203ed6)return{'name':_0x203ed6,'isDuplicate':!![],'isLocalMatch':![]};const _0x4247d7=_0x1e478d(_0x100d37);let _0x187950=_0x4247d7||_0x100d37,_0x58f5ea=_0x187950,_0x18d09b=0x2;while(_0x4edc12['usedNames'][_0x379432(0x164)](_0x58f5ea)){_0x58f5ea=_0x187950+'_'+_0x18d09b,_0x18d09b++;}return _0x4edc12['usedNames'][_0x379432(0x14e)](_0x58f5ea),_0x4edc12[_0x379432(0x13c)]['set'](_0x1c96a8,_0x58f5ea),{'name':_0x58f5ea,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x2e3c0f){const _0x1f4f87=[],_0x2a7658=_0x3573bd=>{const _0x3acc77=a92_0x1e89;if(!_0x3573bd||typeof _0x3573bd!==_0x3acc77(0x144))return;if(Array[_0x3acc77(0x189)](_0x3573bd)){_0x3573bd[_0x3acc77(0x188)](_0x2a7658);return;}const _0x282608=_0x3573bd;(_0x282608[_0x3acc77(0x152)]==='include'||_0x282608[_0x3acc77(0x152)]==='exclude')&&typeof _0x282608[_0x3acc77(0x167)]===_0x3acc77(0x121)&&_0x1f4f87['push'](_0x282608[_0x3acc77(0x167)]);for(const _0x51246d of Object[_0x3acc77(0x142)](_0x282608)){_0x2a7658(_0x51246d);}};return _0x2a7658(_0x2e3c0f),_0x1f4f87;}export function validateSegmentRule(_0x5b3e80,_0x233055){const _0x1694a7=a92_0x1e89;if(!_0x233055||!_0x233055['conditions'])return;for(let _0x271f66=0x0;_0x271f66<_0x233055[_0x1694a7(0x120)][_0x1694a7(0x101)];_0x271f66++){const _0x6e0898=_0x233055['conditions'][_0x271f66];if(_0x1694a7(0x152)in _0x6e0898&&_0x6e0898[_0x1694a7(0x152)]===_0x1694a7(0x12f)){const _0x1c65c2=_0x6e0898;if(!_0x1c65c2[_0x1694a7(0x137)]||_0x1c65c2['attribute']==='')throw new SDKError(ErrorCode[_0x1694a7(0x15d)],'Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27'+_0x5b3e80+'\x27:\x20'+(_0x1694a7(0x163)+_0x271f66+'].attribute\x20cannot\x20be\x20empty.\x0a')+_0x1694a7(0x16f));}}}
1
+ const a93_0x4cf8e2=a93_0x5db0;(function(_0x5889fd,_0x42a409){const _0x177afb=a93_0x5db0,_0x25eff0=_0x5889fd();while(!![]){try{const _0x476c30=parseInt(_0x177afb(0x15b))/0x1*(-parseInt(_0x177afb(0x147))/0x2)+parseInt(_0x177afb(0x1a9))/0x3*(-parseInt(_0x177afb(0x12e))/0x4)+-parseInt(_0x177afb(0x130))/0x5+parseInt(_0x177afb(0x196))/0x6*(parseInt(_0x177afb(0x151))/0x7)+-parseInt(_0x177afb(0x15a))/0x8+parseInt(_0x177afb(0x134))/0x9*(-parseInt(_0x177afb(0x17b))/0xa)+-parseInt(_0x177afb(0x157))/0xb*(-parseInt(_0x177afb(0x19a))/0xc);if(_0x476c30===_0x42a409)break;else _0x25eff0['push'](_0x25eff0['shift']());}catch(_0xfe10ad){_0x25eff0['push'](_0x25eff0['shift']());}}}(a93_0x1432,0x1ca4b));import*as a93_0x1bd1eb from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';export function segmentResponseToDefSync(_0x43aaff,_0x401ad0){const _0x58862d=a93_0x5db0,_0x390a19=_0x43aaff[_0x58862d(0x1a6)]&&_0x58862d(0x133)in _0x43aaff[_0x58862d(0x1a6)]&&_0x43aaff[_0x58862d(0x1a6)][_0x58862d(0x133)];return{'type':'segment','name':_0x43aaff[_0x58862d(0x128)],..._0x43aaff[_0x58862d(0x153)]&&{'description':_0x43aaff[_0x58862d(0x153)]},..._0x401ad0&&{'folder':_0x401ad0},..._0x390a19&&{'rule':apiRuleToYaml(_0x43aaff['rule'])},..._0x43aaff[_0x58862d(0x16c)]!==undefined&&{'kind':_0x43aaff[_0x58862d(0x16c)]===0x0?_0x58862d(0x178):_0x43aaff['kind']===0x1?_0x58862d(0x1aa):_0x58862d(0x176)},..._0x43aaff[_0x58862d(0x14d)]!==undefined&&{'visible':_0x43aaff['isVisible']}};}export async function segmentResponseToDef(_0x2dbfea,_0x3f5bd0,_0x5e3e24){const _0x55ff6d=a93_0x5db0,_0x24ddbc=segmentResponseToDefSync(_0x2dbfea,_0x5e3e24);if(!_0x3f5bd0||!_0x3f5bd0['resolveSegmentName'])return _0x24ddbc;return _0x24ddbc[_0x55ff6d(0x1a6)]&&(_0x24ddbc[_0x55ff6d(0x1a6)]=await resolveRuleSegmentRefs(_0x24ddbc[_0x55ff6d(0x1a6)],_0x3f5bd0['resolveSegmentName'])),_0x24ddbc;}export function apiRuleToYaml(_0x2d38a7){const _0x3cec8c=a93_0x5db0,_0x8bb0bb=(_0x2d38a7['conditions']||[])[_0x3cec8c(0x14a)](apiConditionToYaml);if(_0x8bb0bb[_0x3cec8c(0x149)]===0x1&&!_0x2d38a7[_0x3cec8c(0x153)]&&_0x3cec8c(0x133)in _0x8bb0bb[0x0]&&(_0x8bb0bb[0x0][_0x3cec8c(0x133)]===_0x3cec8c(0x168)||_0x8bb0bb[0x0]['type']==='Or')){const _0x2ee628=_0x8bb0bb[0x0];if(_0x2ee628['type']===_0x2d38a7['type']&&_0x2ee628[_0x3cec8c(0x11f)])return{'type':_0x2d38a7[_0x3cec8c(0x133)],'conditions':_0x2ee628[_0x3cec8c(0x11f)],..._0x2ee628[_0x3cec8c(0x153)]&&{'description':_0x2ee628['description']}};}return{'type':_0x2d38a7[_0x3cec8c(0x133)],'conditions':_0x8bb0bb,..._0x2d38a7[_0x3cec8c(0x153)]&&{'description':_0x2d38a7[_0x3cec8c(0x153)]}};}export async function resolveRuleSegmentRefs(_0x7528f4,_0x506e2f){const _0x46ed25=a93_0x5db0,_0x52382d=await Promise[_0x46ed25(0x191)](_0x7528f4[_0x46ed25(0x11f)][_0x46ed25(0x14a)](_0x2f4065=>resolveConditionSegmentRefs(_0x2f4065,_0x506e2f)));return{..._0x7528f4,'conditions':_0x52382d};}async function resolveConditionSegmentRefs(_0x813533,_0x189760){const _0x30072e=a93_0x5db0;if('segment'in _0x813533&&(_0x813533[_0x30072e(0x133)]===_0x30072e(0x156)||_0x813533[_0x30072e(0x133)]===_0x30072e(0x170))){const _0xc901ab=_0x813533;if(/^\d+$/[_0x30072e(0x14c)](_0xc901ab['segment'])){const _0x524228=await _0x189760(_0xc901ab[_0x30072e(0x1a4)]);return{..._0xc901ab,'segment':_0x524228};}return _0x813533;}if(_0x30072e(0x11f)in _0x813533&&_0x813533[_0x30072e(0x11f)]){const _0x28cdb6=_0x813533,_0x167fd2=await Promise[_0x30072e(0x191)](_0x28cdb6['conditions'][_0x30072e(0x14a)](_0x44e33f=>resolveConditionSegmentRefs(_0x44e33f,_0x189760)));return{..._0x28cdb6,'conditions':_0x167fd2};}if(_0x30072e(0x19c)in _0x813533&&_0x813533['filter']){const _0x552712=_0x813533,_0x5d0bbc=await resolveRuleSegmentRefs(_0x552712[_0x30072e(0x19c)],_0x189760);return{..._0x552712,'filter':_0x5d0bbc};}return _0x813533;}export async function resolveRuleSegmentIds(_0x441d67,_0x59e05c){const _0x30c561=await Promise['all'](_0x441d67['conditions']['map'](_0x319d17=>resolveConditionSegmentIds(_0x319d17,_0x59e05c)));return{..._0x441d67,'conditions':_0x30c561};}async function resolveConditionSegmentIds(_0x7c6d4e,_0x249eb2){const _0x5dcdda=a93_0x5db0;if(_0x5dcdda(0x1a4)in _0x7c6d4e&&(_0x7c6d4e['type']===_0x5dcdda(0x156)||_0x7c6d4e[_0x5dcdda(0x133)]==='exclude')){const _0x2343c2=_0x7c6d4e;if(!/^\d+$/[_0x5dcdda(0x14c)](_0x2343c2[_0x5dcdda(0x1a4)])){const _0x5c6616=await _0x249eb2(_0x2343c2[_0x5dcdda(0x1a4)]);return{..._0x2343c2,'segment':_0x5c6616};}return _0x7c6d4e;}if('conditions'in _0x7c6d4e&&_0x7c6d4e['conditions']){const _0x584dc1=_0x7c6d4e,_0x360d47=await Promise[_0x5dcdda(0x191)](_0x584dc1[_0x5dcdda(0x11f)]['map'](_0x403231=>resolveConditionSegmentIds(_0x403231,_0x249eb2)));return{..._0x584dc1,'conditions':_0x360d47};}if(_0x5dcdda(0x19c)in _0x7c6d4e&&_0x7c6d4e[_0x5dcdda(0x19c)]){const _0xe3d951=_0x7c6d4e,_0x3dd54b=await resolveRuleSegmentIds(_0xe3d951[_0x5dcdda(0x19c)],_0x249eb2);return{..._0xe3d951,'filter':_0x3dd54b};}return _0x7c6d4e;}function apiConditionToYaml(_0x3f645d){const _0x4e355a=a93_0x5db0;if(_0x3f645d[_0x4e355a(0x133)]==='And'||_0x3f645d['type']==='Or'){if(_0x3f645d[_0x4e355a(0x11f)]){const _0x417d7d=_0x3f645d[_0x4e355a(0x11f)]['map'](apiConditionToYaml);if(_0x417d7d[_0x4e355a(0x149)]===0x1&&!_0x3f645d['description'])return _0x417d7d[0x0];return{'type':_0x3f645d[_0x4e355a(0x133)],'conditions':_0x417d7d,..._0x3f645d[_0x4e355a(0x153)]&&{'description':_0x3f645d[_0x4e355a(0x153)]}};}}if(_0x3f645d[_0x4e355a(0x133)]===_0x4e355a(0x163)&&_0x3f645d['leftValue']&&_0x3f645d[_0x4e355a(0x17f)]){const _0x254bb4=_0x3f645d[_0x4e355a(0x143)][_0x4e355a(0x12a)]?{'type':_0x3f645d['leftValue']['aggregation'][_0x4e355a(0x133)],..._0x3f645d[_0x4e355a(0x143)][_0x4e355a(0x12a)]['groupingColumns']&&{'groupingColumns':_0x3f645d[_0x4e355a(0x143)][_0x4e355a(0x12a)][_0x4e355a(0x165)]}}:undefined;return{'type':_0x4e355a(0x163),'attribute':_0x3f645d[_0x4e355a(0x143)][_0x4e355a(0x128)]||'','operator':apiOperatorToYaml(_0x3f645d[_0x4e355a(0x17f)]),..._0x3f645d[_0x4e355a(0x141)]&&_0x3f645d[_0x4e355a(0x141)]!==_0x4e355a(0x1a5)?{'arrayMatching':_0x3f645d[_0x4e355a(0x141)]}:{},..._0x3f645d[_0x4e355a(0x170)]?{'exclude':_0x3f645d['exclude']}:{},..._0x254bb4?{'aggregation':_0x254bb4}:{},..._0x3f645d['leftValue'][_0x4e355a(0x1a7)]?{'source':_0x3f645d['leftValue'][_0x4e355a(0x1a7)][_0x4e355a(0x128)]}:{},..._0x3f645d[_0x4e355a(0x143)][_0x4e355a(0x19c)]?{'filter':apiRuleToYaml(_0x3f645d[_0x4e355a(0x143)][_0x4e355a(0x19c)])}:{},..._0x3f645d[_0x4e355a(0x18a)]!==undefined&&_0x3f645d[_0x4e355a(0x18a)]!==null?{'limit':_0x3f645d[_0x4e355a(0x18a)]}:{}};}if(_0x3f645d['type']==='Reference'&&_0x3f645d['id'])return{'type':_0x3f645d['exclude']?_0x4e355a(0x170):_0x4e355a(0x156),'segment':_0x3f645d['id']};return{'type':'And','conditions':[]};}function isTemporalOperator(_0x485bd4){const _0x20234c=a93_0x5db0;return _0x485bd4===_0x20234c(0x15f)||_0x485bd4===_0x20234c(0x18c);}function getEffectiveValue(_0xfd1d27){const _0x545c91=a93_0x5db0,_0x2f3e75=_0xfd1d27[_0x545c91(0x189)];return _0xfd1d27[_0x545c91(0x125)]??_0x2f3e75;}function apiOperatorToYaml(_0x24109d){const _0x9c5217=a93_0x5db0;let _0x3ba0c1;if(_0x24109d[_0x9c5217(0x13b)]&&_0x24109d[_0x9c5217(0x13b)][_0x9c5217(0x149)]>0x0)_0x3ba0c1=_0x24109d[_0x9c5217(0x13b)];else{if(_0x24109d['rightValue']!==undefined)_0x3ba0c1=_0x24109d[_0x9c5217(0x166)];else isTemporalOperator(_0x24109d[_0x9c5217(0x133)])&&_0x24109d[_0x9c5217(0x125)]!==undefined&&(_0x3ba0c1=_0x24109d[_0x9c5217(0x125)]);}return{'type':mapApiOperatorType(_0x24109d[_0x9c5217(0x133)]),..._0x24109d[_0x9c5217(0x17d)]&&{'not':_0x24109d[_0x9c5217(0x17d)]},..._0x3ba0c1!==undefined&&{'value':_0x3ba0c1},..._0x24109d['unit']&&{'unit':_0x24109d['unit']}};}function mapApiOperatorType(_0x16d696){return _0x16d696;}export function segmentDefToCreateRequest(_0x24e65c,_0x2749a7){const _0xbfe317=a93_0x5db0,_0x5c0ca3={'name':_0x24e65c[_0xbfe317(0x128)]};return _0x24e65c['description']&&(_0x5c0ca3[_0xbfe317(0x153)]=_0x24e65c[_0xbfe317(0x153)]),_0x24e65c[_0xbfe317(0x1a6)]&&(_0x5c0ca3['rule']=yamlRuleToApi(_0x24e65c[_0xbfe317(0x1a6)])),_0x24e65c[_0xbfe317(0x16c)]&&(_0x5c0ca3['kind']=_0x24e65c[_0xbfe317(0x16c)]===_0xbfe317(0x178)?0x0:_0x24e65c['kind']==='realtime'?0x1:0x2),_0x24e65c['visible']!==undefined&&(_0x5c0ca3[_0xbfe317(0x14d)]=_0x24e65c[_0xbfe317(0x155)]),_0x2749a7&&(_0x5c0ca3[_0xbfe317(0x131)]=_0x2749a7),_0x5c0ca3;}export function segmentDefToUpdateRequest(_0x53663c){const _0x5e179c=a93_0x5db0,_0xd75df7={'name':_0x53663c['name']};return _0x53663c[_0x5e179c(0x153)]!==undefined&&(_0xd75df7[_0x5e179c(0x153)]=_0x53663c['description']),_0x53663c['rule']&&(_0xd75df7['rule']=yamlRuleToApi(_0x53663c[_0x5e179c(0x1a6)])),_0x53663c['kind']&&(_0xd75df7['kind']=_0x53663c[_0x5e179c(0x16c)]===_0x5e179c(0x178)?0x0:_0x53663c['kind']==='realtime'?0x1:0x2),_0xd75df7;}export function yamlRuleToApi(_0x11c3c0,_0x2def90=![]){const _0x233e4e=a93_0x5db0,_0x57b3ff=_0x11c3c0[_0x233e4e(0x11f)][_0x233e4e(0x14a)](yamlConditionToApi);if(_0x2def90){const _0x169da4=_0x57b3ff[_0x233e4e(0x12f)](_0xf1abc3=>_0xf1abc3[_0x233e4e(0x133)]===_0x233e4e(0x168)||_0xf1abc3[_0x233e4e(0x133)]==='Or');if(!_0x169da4&&_0x57b3ff['length']>0x0)return{'type':_0x11c3c0[_0x233e4e(0x133)],'conditions':[{'type':_0x233e4e(0x168),'description':_0x11c3c0[_0x233e4e(0x153)]||'','conditions':_0x57b3ff}]};}return{'type':_0x11c3c0[_0x233e4e(0x133)],'conditions':_0x57b3ff,..._0x11c3c0[_0x233e4e(0x153)]&&{'description':_0x11c3c0['description']}};}function yamlConditionToApi(_0x2d0521){const _0x44328b=a93_0x5db0;if(_0x44328b(0x1a4)in _0x2d0521&&(_0x2d0521['type']===_0x44328b(0x156)||_0x2d0521[_0x44328b(0x133)]==='exclude')){const _0x53cb06=_0x2d0521;return{'type':_0x44328b(0x19d),'id':_0x53cb06[_0x44328b(0x1a4)],'exclude':_0x53cb06[_0x44328b(0x133)]===_0x44328b(0x170)};}if(_0x44328b(0x133)in _0x2d0521&&(_0x2d0521['type']===_0x44328b(0x168)||_0x2d0521[_0x44328b(0x133)]==='Or')){const _0x13fb73=_0x2d0521;return{'type':_0x13fb73[_0x44328b(0x133)],'conditions':_0x13fb73[_0x44328b(0x11f)][_0x44328b(0x14a)](yamlConditionToApi),..._0x13fb73[_0x44328b(0x153)]&&{'description':_0x13fb73['description']}};}const _0x27ae35=_0x2d0521,_0x949b9e={'type':_0x44328b(0x163),'leftValue':buildLeftValue(_0x27ae35),'operator':yamlOperatorToApi(_0x27ae35[_0x44328b(0x17f)]),'exclude':_0x27ae35['exclude']??![],'arrayMatching':_0x27ae35['arrayMatching']??_0x44328b(0x1a5)};return _0x27ae35['limit']!==undefined&&(_0x949b9e[_0x44328b(0x18a)]=_0x27ae35['limit']),_0x949b9e;}function buildLeftValue(_0x5de3e2){const _0x17b0c5=a93_0x5db0,_0x1fa1e6={'name':_0x5de3e2[_0x17b0c5(0x180)]};return _0x5de3e2[_0x17b0c5(0x12a)]&&(_0x1fa1e6['aggregation']={'type':_0x5de3e2[_0x17b0c5(0x12a)][_0x17b0c5(0x133)],..._0x5de3e2['aggregation'][_0x17b0c5(0x165)]&&{'groupingColumns':_0x5de3e2['aggregation'][_0x17b0c5(0x165)]}}),_0x5de3e2[_0x17b0c5(0x1a7)]&&(_0x1fa1e6[_0x17b0c5(0x1a7)]={'name':_0x5de3e2[_0x17b0c5(0x1a7)]}),_0x5de3e2[_0x17b0c5(0x19c)]&&(_0x1fa1e6[_0x17b0c5(0x19c)]=yamlRuleToApi(_0x5de3e2['filter'])),_0x1fa1e6;}function yamlOperatorToApi(_0x203a83){const _0x4868d5=a93_0x5db0,_0x75f690={'type':mapYamlOperatorType(_0x203a83['type']),'not':_0x203a83[_0x4868d5(0x17d)]??![]},_0x56487a=getEffectiveValue(_0x203a83);if(_0x56487a!==undefined){if(Array[_0x4868d5(0x179)](_0x56487a))_0x75f690[_0x4868d5(0x13b)]=_0x56487a;else isTemporalOperator(_0x203a83[_0x4868d5(0x133)])?_0x75f690[_0x4868d5(0x125)]=_0x56487a:_0x75f690[_0x4868d5(0x166)]=_0x56487a;}return _0x203a83['unit']&&(_0x75f690[_0x4868d5(0x140)]=_0x203a83[_0x4868d5(0x140)]),_0x75f690;}function mapYamlOperatorType(_0x2f8ed1){return _0x2f8ed1;}export function toYamlString(_0x4460e0){const _0x12b68f=a93_0x5db0,_0x54055f=JSON[_0x12b68f(0x124)](JSON[_0x12b68f(0x138)](_0x4460e0)),_0x1a4c35=a93_0x1bd1eb[_0x12b68f(0x138)](_0x54055f,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x12b68f(0x190)}),_0x438e72=['rule:'];let _0x393981=_0x1a4c35;for(const _0xeb1259 of _0x438e72){_0x393981=_0x393981[_0x12b68f(0x1a3)](new RegExp('^('+_0xeb1259+')','m'),(_0x7ba810,_0x5e7122,_0x16d8c1)=>{if(_0x16d8c1===0x0||_0x393981[_0x16d8c1-0x1]==='\x0a'&&_0x393981[_0x16d8c1-0x2]==='\x0a')return _0x5e7122;return'\x0a'+_0x5e7122;});}return _0x393981;}export function parseYamlString(_0x52891d){const _0x2cbbef=a93_0x5db0,_0x244a93=a93_0x1bd1eb['parse'](_0x52891d);if(!_0x244a93[_0x2cbbef(0x128)])throw new Error('YAML\x20config\x20missing\x20required\x20field:\x20name');if(_0x244a93[_0x2cbbef(0x133)]&&_0x244a93[_0x2cbbef(0x133)]!=='segment')throw new Error(_0x2cbbef(0x1a1)+_0x244a93[_0x2cbbef(0x133)]);return _0x244a93;}export function isSegmentYaml(_0xd85eca){const _0x21d2dc=a93_0x5db0;if(typeof _0xd85eca!=='object'||_0xd85eca===null)return![];const _0x5f5080=_0xd85eca;return _0x5f5080[_0x21d2dc(0x133)]==='segment'||_0x5f5080['type']===undefined;}export function generateTemplate(_0x2f5ebf=a93_0x4cf8e2(0x161)){const _0x2e2f74=a93_0x4cf8e2,_0x49d20d={'type':_0x2e2f74(0x1a4),'name':_0x2f5ebf,'description':_0x2e2f74(0x185),'rule':{'type':_0x2e2f74(0x168),'conditions':[{'type':_0x2e2f74(0x163),'attribute':_0x2e2f74(0x17a),'operator':{'type':_0x2e2f74(0x12b),'value':'value'}}]}};return toYamlString(_0x49d20d);}export function segmentToYamlString(_0x1d465e){const _0x33ac9d=a93_0x4cf8e2,_0x2f7bdf=JSON[_0x33ac9d(0x124)](JSON[_0x33ac9d(0x138)](_0x1d465e)),_0x453e93=a93_0x1bd1eb[_0x33ac9d(0x138)](_0x2f7bdf,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x33ac9d(0x190)}),_0x52b5ae=[_0x33ac9d(0x16e),_0x33ac9d(0x129)];let _0x5cfa88=_0x453e93;for(const _0x24d767 of _0x52b5ae){_0x5cfa88=_0x5cfa88[_0x33ac9d(0x1a3)](new RegExp('^('+_0x24d767+')','m'),(_0x2d21a9,_0x4c67b0,_0x5dc22e)=>{if(_0x5dc22e===0x0||_0x5cfa88[_0x5dc22e-0x1]==='\x0a'&&_0x5cfa88[_0x5dc22e-0x2]==='\x0a')return _0x4c67b0;return'\x0a'+_0x4c67b0;});}return _0x5cfa88;}export function parseSegmentYamlFile(_0x91348f){const _0x37cb22=a93_0x4cf8e2,_0x4a5ceb=a93_0x1bd1eb['parse'](_0x91348f);if(!_0x4a5ceb[_0x37cb22(0x128)])throw new Error(_0x37cb22(0x13c));return _0x4a5ceb;}export function normalizeChildSegmentYaml(_0x33d69d){const _0x309908=a93_0x4cf8e2;return{'type':_0x309908(0x1a4),'name':_0x33d69d[_0x309908(0x128)],..._0x33d69d[_0x309908(0x153)]!==undefined&&{'description':_0x33d69d[_0x309908(0x153)]},..._0x33d69d[_0x309908(0x154)]!==undefined&&{'folder':_0x33d69d[_0x309908(0x154)]},..._0x33d69d[_0x309908(0x1a6)]&&{'rule':normalizeRule(_0x33d69d['rule'])},..._0x33d69d[_0x309908(0x16c)]!==undefined&&{'kind':_0x33d69d['kind']},..._0x33d69d[_0x309908(0x155)]!==undefined&&{'visible':_0x33d69d[_0x309908(0x155)]},..._0x33d69d[_0x309908(0x12c)]&&{'activations':_0x33d69d[_0x309908(0x12c)][_0x309908(0x14a)](normalizeActivation)}};}export function normalizeRule(_0x21c642){const _0x3657b3=a93_0x4cf8e2;return{'type':_0x21c642[_0x3657b3(0x133)],'conditions':_0x21c642[_0x3657b3(0x11f)][_0x3657b3(0x14a)](normalizeCondition),..._0x21c642['description']!==undefined&&{'description':_0x21c642[_0x3657b3(0x153)]}};}function normalizeCondition(_0x40919d){const _0x1e4020=a93_0x4cf8e2;if(_0x1e4020(0x1a4)in _0x40919d&&(_0x40919d['type']==='include'||_0x40919d[_0x1e4020(0x133)]===_0x1e4020(0x170))){const _0x159e9e=_0x40919d;return{'type':_0x159e9e[_0x1e4020(0x133)],'segment':_0x159e9e[_0x1e4020(0x1a4)]};}if(_0x1e4020(0x133)in _0x40919d&&(_0x40919d['type']==='And'||_0x40919d[_0x1e4020(0x133)]==='Or')){const _0x3d5f72=_0x40919d;return{'type':_0x3d5f72[_0x1e4020(0x133)],'conditions':_0x3d5f72[_0x1e4020(0x11f)][_0x1e4020(0x14a)](normalizeCondition),..._0x3d5f72[_0x1e4020(0x153)]!==undefined&&{'description':_0x3d5f72[_0x1e4020(0x153)]}};}const _0x13c15a=_0x40919d;return{'type':_0x1e4020(0x163),'attribute':_0x13c15a[_0x1e4020(0x180)],'operator':normalizeOperator(_0x13c15a[_0x1e4020(0x17f)]),..._0x13c15a[_0x1e4020(0x141)]!==undefined&&{'arrayMatching':_0x13c15a['arrayMatching']},..._0x13c15a[_0x1e4020(0x170)]!==undefined&&{'exclude':_0x13c15a[_0x1e4020(0x170)]},..._0x13c15a[_0x1e4020(0x12a)]!==undefined&&{'aggregation':_0x13c15a[_0x1e4020(0x12a)]},..._0x13c15a[_0x1e4020(0x1a7)]!==undefined&&{'source':_0x13c15a[_0x1e4020(0x1a7)]},..._0x13c15a['filter']!==undefined&&{'filter':normalizeRule(_0x13c15a[_0x1e4020(0x19c)])},..._0x13c15a[_0x1e4020(0x18a)]!==undefined&&{'limit':_0x13c15a[_0x1e4020(0x18a)]}};}function a93_0x5db0(_0x39f0c6,_0x15b996){_0x39f0c6=_0x39f0c6-0x11e;const _0x14325c=a93_0x1432();let _0x5db0df=_0x14325c[_0x39f0c6];return _0x5db0df;}function normalizeOperator(_0x2d5e15){const _0x35b2c7=a93_0x4cf8e2,_0x375780=getEffectiveValue(_0x2d5e15);return{'type':_0x2d5e15[_0x35b2c7(0x133)],..._0x2d5e15['not']!==undefined&&{'not':_0x2d5e15[_0x35b2c7(0x17d)]},..._0x375780!==undefined&&{'value':_0x375780},..._0x2d5e15['min']!==undefined&&{'min':_0x2d5e15['min']},..._0x2d5e15[_0x35b2c7(0x1ab)]!==undefined&&{'max':_0x2d5e15[_0x35b2c7(0x1ab)]},..._0x2d5e15[_0x35b2c7(0x140)]!==undefined&&{'unit':_0x2d5e15['unit']},..._0x2d5e15[_0x35b2c7(0x16f)]!==undefined&&{'duration':_0x2d5e15[_0x35b2c7(0x16f)]},..._0x2d5e15['from']!==undefined&&{'from':_0x2d5e15[_0x35b2c7(0x16d)]}};}function normalizeActivation(_0x578862){const _0x5daa79=a93_0x4cf8e2;return{'name':_0x578862[_0x5daa79(0x128)],'connection':_0x578862[_0x5daa79(0x192)],..._0x578862[_0x5daa79(0x153)]!==undefined&&{'description':_0x578862[_0x5daa79(0x153)]},..._0x578862[_0x5daa79(0x13e)]!==undefined&&{'all_columns':_0x578862['all_columns']},..._0x578862['columns']!==undefined&&{'columns':_0x578862[_0x5daa79(0x121)]},..._0x578862['behavior']!==undefined&&{'behavior':_0x578862[_0x5daa79(0x135)]},..._0x578862['schedule']!==undefined&&{'schedule':_0x578862['schedule']},..._0x578862[_0x5daa79(0x126)]!==undefined&&{'notification':_0x578862[_0x5daa79(0x126)]},..._0x578862[_0x5daa79(0x15d)]!==undefined&&{'connector_config':_0x578862['connector_config']},..._0x578862['activation_template_id']!==undefined&&{'activation_template_id':_0x578862[_0x5daa79(0x144)]}};}export function activationResponseToDef(_0x221945,_0x5871b6,_0x41f9fe){const _0x3d37b3=a93_0x4cf8e2,_0x420b8f=_0x221945[_0x3d37b3(0x146)]||'',_0x35994a=_0x41f9fe?.[_0x3d37b3(0x195)](_0x420b8f)??_0x420b8f,_0xce737a={'name':_0x221945[_0x3d37b3(0x128)],'connection':_0x35994a};_0x221945['description']&&(_0xce737a[_0x3d37b3(0x153)]=_0x221945[_0x3d37b3(0x153)]);let _0x2b9eac=[];_0x221945['columns']&&_0x221945[_0x3d37b3(0x121)]['length']>0x0&&(_0x2b9eac=_0x221945['columns'][_0x3d37b3(0x19c)](_0x20c8bb=>_0x20c8bb&&_0x20c8bb[_0x3d37b3(0x128)])['map'](_0x181b68=>{const _0x110cd8=_0x3d37b3;if(_0x181b68[_0x110cd8(0x133)]||_0x181b68[_0x110cd8(0x122)])return{'name':_0x181b68[_0x110cd8(0x128)],..._0x181b68[_0x110cd8(0x133)]&&{'type':_0x181b68['type']},..._0x181b68[_0x110cd8(0x122)]&&{'visibility':_0x181b68[_0x110cd8(0x122)]}};return _0x181b68[_0x110cd8(0x128)];}));_0x2b9eac[_0x3d37b3(0x149)]>0x0&&(_0xce737a[_0x3d37b3(0x121)]=_0x2b9eac);_0x221945[_0x3d37b3(0x162)]!==undefined&&(_0x221945[_0x3d37b3(0x162)]===![]&&_0x2b9eac[_0x3d37b3(0x149)]===0x0?_0xce737a[_0x3d37b3(0x13e)]=!![]:_0xce737a[_0x3d37b3(0x13e)]=_0x221945[_0x3d37b3(0x162)]);const _0x1c852c={};let _0x10af1f=![];_0x221945[_0x3d37b3(0x13d)]&&(_0x1c852c[_0x3d37b3(0x133)]=_0x221945[_0x3d37b3(0x13d)],_0x10af1f=!![]);_0x221945[_0x3d37b3(0x19b)]&&(_0x1c852c[_0x3d37b3(0x164)]=_0x221945[_0x3d37b3(0x19b)],_0x10af1f=!![]);_0x221945[_0x3d37b3(0x188)]!==undefined&&_0x221945[_0x3d37b3(0x188)]!==null&&(_0x1c852c[_0x3d37b3(0x193)]=_0x221945[_0x3d37b3(0x188)],_0x10af1f=!![]);_0x221945[_0x3d37b3(0x16b)]&&_0x221945[_0x3d37b3(0x16b)]['length']>0x0&&(_0x1c852c[_0x3d37b3(0x172)]=_0x221945[_0x3d37b3(0x16b)],_0x10af1f=!![]);_0x221945['startAt']!==undefined&&(_0x1c852c['start_at']=_0x221945[_0x3d37b3(0x132)],_0x10af1f=!![]);_0x221945['endOn']!==undefined&&(_0x1c852c[_0x3d37b3(0x199)]=_0x221945[_0x3d37b3(0x181)],_0x10af1f=!![]);_0x221945[_0x3d37b3(0x15e)]&&(_0x1c852c[_0x3d37b3(0x15e)]=_0x221945[_0x3d37b3(0x15e)],_0x10af1f=!![]);_0x10af1f&&(_0xce737a[_0x3d37b3(0x145)]=_0x1c852c);(_0x221945[_0x3d37b3(0x13a)]&&_0x221945[_0x3d37b3(0x13a)][_0x3d37b3(0x149)]>0x0||_0x221945[_0x3d37b3(0x177)]&&_0x221945[_0x3d37b3(0x177)][_0x3d37b3(0x149)]>0x0)&&(_0xce737a[_0x3d37b3(0x126)]={},_0x221945['notifyOn']&&_0x221945['notifyOn'][_0x3d37b3(0x149)]>0x0&&(_0xce737a[_0x3d37b3(0x126)][_0x3d37b3(0x18f)]=_0x221945[_0x3d37b3(0x13a)]),_0x221945[_0x3d37b3(0x177)]&&_0x221945['emailRecipients']['length']>0x0&&(_0xce737a[_0x3d37b3(0x126)]['email_recipients']=_0x221945[_0x3d37b3(0x177)][_0x3d37b3(0x14a)](_0x4f866c=>{const _0x44cc32=_0x3d37b3,_0x3218a8=_0x5871b6?.[_0x44cc32(0x195)](_0x4f866c);return _0x3218a8??String(_0x4f866c);})));_0x221945['connectorConfig']&&Object[_0x3d37b3(0x136)](_0x221945[_0x3d37b3(0x1a0)])[_0x3d37b3(0x149)]>0x0&&(_0xce737a[_0x3d37b3(0x15d)]=normalizeConnectorConfigForYaml(_0x221945['connectorConfig']));_0x221945['activationTemplateId']&&(_0xce737a[_0x3d37b3(0x144)]=_0x221945['activationTemplateId']);if(_0x221945['syndicationBehavior']){const _0x436161={},_0x5a666f=_0x221945[_0x3d37b3(0x16a)];_0x5a666f[_0x3d37b3(0x121)]&&_0x5a666f[_0x3d37b3(0x121)]['length']>0x0&&(_0x436161[_0x3d37b3(0x121)]=_0x5a666f[_0x3d37b3(0x121)]['filter'](_0x1fafb8=>_0x1fafb8&&_0x1fafb8[_0x3d37b3(0x128)])[_0x3d37b3(0x14a)](_0x555bcc=>({'name':_0x555bcc[_0x3d37b3(0x128)],..._0x555bcc[_0x3d37b3(0x133)]&&{'type':_0x555bcc[_0x3d37b3(0x133)]},..._0x555bcc[_0x3d37b3(0x122)]&&{'visibility':_0x555bcc[_0x3d37b3(0x122)]}}))),_0x5a666f[_0x3d37b3(0x14b)]&&(_0x436161[_0x3d37b3(0x18b)]=_0x5a666f[_0x3d37b3(0x14b)]),_0x5a666f[_0x3d37b3(0x1ae)]!==undefined&&(_0x436161[_0x3d37b3(0x120)]=_0x5a666f[_0x3d37b3(0x1ae)]),_0x5a666f['joinStrategy']&&(_0x436161[_0x3d37b3(0x194)]=_0x5a666f[_0x3d37b3(0x17c)]),_0x5a666f[_0x3d37b3(0x175)]&&(_0x436161[_0x3d37b3(0x175)]=_0x5a666f['formatting']),_0x5a666f[_0x3d37b3(0x158)]&&_0x5a666f[_0x3d37b3(0x158)][_0x3d37b3(0x149)]>0x0&&(_0x436161[_0x3d37b3(0x18d)]=_0x5a666f[_0x3d37b3(0x158)]),Object[_0x3d37b3(0x136)](_0x436161)[_0x3d37b3(0x149)]>0x0&&(_0xce737a['behavior']=_0x436161);}return _0xce737a;}export function journeyActivationStepToYaml(_0x11451d,_0xeab449,_0x59c33e){const _0x52a534=a93_0x4cf8e2,_0xa32d71=_0x11451d[_0x52a534(0x17e)][_0x52a534(0x186)],_0x5907f4=_0xa32d71[_0x52a534(0x146)]||'',_0x1d5115=_0x59c33e?.[_0x52a534(0x195)](_0x5907f4)??_0x5907f4,_0x4c153a={'name':_0xa32d71[_0x52a534(0x128)]||'','connection':_0x1d5115};_0xa32d71[_0x52a534(0x153)]&&(_0x4c153a[_0x52a534(0x153)]=_0xa32d71[_0x52a534(0x153)]);let _0x576ade=[];_0xa32d71[_0x52a534(0x121)]&&_0xa32d71['columns'][_0x52a534(0x149)]>0x0&&(_0x576ade=_0xa32d71[_0x52a534(0x121)][_0x52a534(0x19c)](_0x244ef7=>_0x244ef7&&_0x244ef7[_0x52a534(0x128)])[_0x52a534(0x14a)](_0x172d8a=>{const _0x29e6b6=_0x52a534;if(_0x172d8a['type']||_0x172d8a[_0x29e6b6(0x122)])return{'name':_0x172d8a[_0x29e6b6(0x128)],..._0x172d8a[_0x29e6b6(0x133)]&&{'type':_0x172d8a[_0x29e6b6(0x133)]},..._0x172d8a[_0x29e6b6(0x122)]&&{'visibility':_0x172d8a[_0x29e6b6(0x122)]}};return _0x172d8a[_0x29e6b6(0x128)];}));_0x576ade['length']>0x0&&(_0x4c153a[_0x52a534(0x121)]=_0x576ade);_0xa32d71['allColumns']!==undefined&&(_0xa32d71[_0x52a534(0x162)]===![]&&_0x576ade[_0x52a534(0x149)]===0x0?_0x4c153a[_0x52a534(0x13e)]=!![]:_0x4c153a[_0x52a534(0x13e)]=_0xa32d71[_0x52a534(0x162)]);const _0x9c2ca4={};let _0x16ac73=![];_0xa32d71[_0x52a534(0x13d)]&&(_0x9c2ca4[_0x52a534(0x133)]=_0xa32d71[_0x52a534(0x13d)],_0x16ac73=!![]);_0xa32d71[_0x52a534(0x19b)]&&(_0x9c2ca4[_0x52a534(0x164)]=_0xa32d71[_0x52a534(0x19b)],_0x16ac73=!![]);_0xa32d71['repeatFrequency']!==undefined&&_0xa32d71['repeatFrequency']!==null&&(_0x9c2ca4[_0x52a534(0x193)]=_0xa32d71[_0x52a534(0x188)],_0x16ac73=!![]);_0xa32d71[_0x52a534(0x132)]!==undefined&&(_0x9c2ca4[_0x52a534(0x14f)]=_0xa32d71[_0x52a534(0x132)],_0x16ac73=!![]);_0xa32d71[_0x52a534(0x181)]!==undefined&&(_0x9c2ca4[_0x52a534(0x199)]=_0xa32d71[_0x52a534(0x181)],_0x16ac73=!![]);_0xa32d71[_0x52a534(0x15e)]&&(_0x9c2ca4['timezone']=_0xa32d71[_0x52a534(0x15e)],_0x16ac73=!![]);_0x16ac73&&(_0x4c153a[_0x52a534(0x145)]=_0x9c2ca4);(_0xa32d71[_0x52a534(0x13a)]&&_0xa32d71[_0x52a534(0x13a)][_0x52a534(0x149)]>0x0||_0xa32d71[_0x52a534(0x177)]&&_0xa32d71[_0x52a534(0x177)][_0x52a534(0x149)]>0x0)&&(_0x4c153a[_0x52a534(0x126)]={},_0xa32d71[_0x52a534(0x13a)]&&_0xa32d71['notifyOn'][_0x52a534(0x149)]>0x0&&(_0x4c153a[_0x52a534(0x126)][_0x52a534(0x18f)]=_0xa32d71[_0x52a534(0x13a)]),_0xa32d71[_0x52a534(0x177)]&&_0xa32d71[_0x52a534(0x177)][_0x52a534(0x149)]>0x0&&(_0x4c153a['notification'][_0x52a534(0x18e)]=_0xa32d71['emailRecipients'][_0x52a534(0x14a)](_0xbea968=>{const _0x59ec95=_0xeab449?.['get'](_0xbea968);return _0x59ec95??String(_0xbea968);})));_0xa32d71[_0x52a534(0x1a0)]&&Object['keys'](_0xa32d71[_0x52a534(0x1a0)])[_0x52a534(0x149)]>0x0&&(_0x4c153a[_0x52a534(0x15d)]=normalizeConnectorConfigForYaml(_0xa32d71[_0x52a534(0x1a0)]));_0xa32d71[_0x52a534(0x152)]&&(_0x4c153a[_0x52a534(0x144)]=_0xa32d71['activationTemplateId']);if(_0xa32d71[_0x52a534(0x16a)]){const _0x1b9889={},_0x56c181=_0xa32d71[_0x52a534(0x16a)];_0x56c181[_0x52a534(0x121)]&&_0x56c181['columns']['length']>0x0&&(_0x1b9889[_0x52a534(0x121)]=_0x56c181[_0x52a534(0x121)][_0x52a534(0x19c)](_0x38a379=>_0x38a379&&_0x38a379[_0x52a534(0x128)])[_0x52a534(0x14a)](_0x353e76=>({'name':_0x353e76['name'],..._0x353e76['type']&&{'type':_0x353e76[_0x52a534(0x133)]},..._0x353e76[_0x52a534(0x122)]&&{'visibility':_0x353e76[_0x52a534(0x122)]}}))),_0x56c181[_0x52a534(0x14b)]&&(_0x1b9889[_0x52a534(0x18b)]=_0x56c181[_0x52a534(0x14b)]),_0x56c181[_0x52a534(0x1ae)]!==undefined&&(_0x1b9889[_0x52a534(0x120)]=_0x56c181['joinRow']),_0x56c181[_0x52a534(0x17c)]&&(_0x1b9889[_0x52a534(0x194)]=_0x56c181[_0x52a534(0x17c)]),_0x56c181[_0x52a534(0x175)]&&(_0x1b9889[_0x52a534(0x175)]=_0x56c181[_0x52a534(0x175)]),_0x56c181[_0x52a534(0x158)]&&_0x56c181['orderBy'][_0x52a534(0x149)]>0x0&&(_0x1b9889[_0x52a534(0x18d)]=_0x56c181['orderBy']),Object[_0x52a534(0x136)](_0x1b9889)[_0x52a534(0x149)]>0x0&&(_0x4c153a[_0x52a534(0x135)]=_0x1b9889);}return _0x4c153a;}export function segmentWithActivationsToYaml(_0x3880c0,_0x4de8fd,_0x58dd5c,_0x7fda44,_0x367aa1){const _0x1e3bec=a93_0x4cf8e2,_0x4aaa1f=segmentResponseToDefSync(_0x3880c0,_0x58dd5c);return _0x4de8fd['length']>0x0&&(_0x4aaa1f[_0x1e3bec(0x12c)]=_0x4de8fd['map'](_0x3b7242=>activationResponseToDef(_0x3b7242,_0x7fda44,_0x367aa1))),_0x4aaa1f;}function normalizeColumn(_0x49cecc){const _0x4140c2=a93_0x4cf8e2;if(typeof _0x49cecc===_0x4140c2(0x1af))return{'name':_0x49cecc};return{'name':_0x49cecc['name'],..._0x49cecc['type']&&{'type':_0x49cecc[_0x4140c2(0x133)]},..._0x49cecc[_0x4140c2(0x122)]&&{'visibility':_0x49cecc[_0x4140c2(0x122)]}};}export async function activationDefToCreateRequest(_0x2d92ef,_0x5af1d6){const _0x40a480=a93_0x4cf8e2,_0x3b720=_0x5af1d6?.[_0x40a480(0x187)],_0x2e3a51=_0x5af1d6?.['connectionNameToIdMap'],_0x2cf4c5=_0x2d92ef[_0x40a480(0x192)];let _0x4e3931;const _0x1acca3=parseInt(_0x2cf4c5,0xa);if(!isNaN(_0x1acca3)&&String(_0x1acca3)===_0x2cf4c5)_0x4e3931=_0x1acca3;else{const _0x45fd08=_0x2e3a51?.[_0x40a480(0x195)](_0x2cf4c5);if(_0x45fd08===undefined)throw new SDKError(ErrorCode[_0x40a480(0x198)],_0x40a480(0x11e)+_0x2cf4c5,undefined,{'helpText':_0x40a480(0x12d)});_0x4e3931=_0x45fd08;}const _0x141792={'name':_0x2d92ef['name'],'connectionId':_0x4e3931};_0x2d92ef[_0x40a480(0x153)]&&(_0x141792[_0x40a480(0x153)]=_0x2d92ef[_0x40a480(0x153)]);let _0x206a27=[];_0x2d92ef[_0x40a480(0x121)]&&_0x2d92ef[_0x40a480(0x121)][_0x40a480(0x149)]>0x0&&(_0x206a27=_0x2d92ef[_0x40a480(0x121)]['filter'](_0x1a3f9e=>_0x1a3f9e!=null)[_0x40a480(0x14a)](normalizeColumn));_0x206a27['length']>0x0&&(_0x141792['columns']=_0x206a27);_0x2d92ef['all_columns']!==undefined&&(_0x2d92ef[_0x40a480(0x13e)]===![]&&_0x206a27[_0x40a480(0x149)]===0x0?_0x141792[_0x40a480(0x162)]=!![]:_0x141792['allColumns']=_0x2d92ef[_0x40a480(0x13e)]);if(_0x2d92ef[_0x40a480(0x145)]){const _0x5e0089=_0x2d92ef[_0x40a480(0x145)];_0x5e0089[_0x40a480(0x133)]&&(_0x141792[_0x40a480(0x13d)]=_0x5e0089[_0x40a480(0x133)]),_0x5e0089[_0x40a480(0x164)]&&(_0x141792['repeatUnit']=_0x5e0089[_0x40a480(0x164)]),_0x5e0089[_0x40a480(0x193)]!==undefined&&(_0x141792[_0x40a480(0x188)]=_0x5e0089[_0x40a480(0x193)]),_0x5e0089[_0x40a480(0x172)]&&(_0x141792[_0x40a480(0x16b)]=_0x5e0089[_0x40a480(0x172)]),_0x5e0089[_0x40a480(0x14f)]!==undefined&&(_0x141792[_0x40a480(0x132)]=_0x5e0089[_0x40a480(0x14f)]),_0x5e0089[_0x40a480(0x199)]!==undefined&&(_0x141792['endOn']=_0x5e0089[_0x40a480(0x199)]),_0x5e0089[_0x40a480(0x15e)]&&(_0x141792[_0x40a480(0x15e)]=_0x5e0089['timezone']);}_0x2d92ef[_0x40a480(0x126)]&&(_0x2d92ef[_0x40a480(0x126)][_0x40a480(0x18f)]&&(_0x141792[_0x40a480(0x13a)]=_0x2d92ef[_0x40a480(0x126)]['notify_on']),_0x2d92ef[_0x40a480(0x126)][_0x40a480(0x18e)]&&(_0x141792[_0x40a480(0x177)]=_0x2d92ef['notification'][_0x40a480(0x18e)][_0x40a480(0x14a)](_0x2ad9c0=>{const _0x50434a=_0x40a480,_0x4d4b93=Number(_0x2ad9c0);if(!isNaN(_0x4d4b93)&&String(_0x4d4b93)===_0x2ad9c0)return _0x4d4b93;const _0x27e911=_0x3b720?.[_0x50434a(0x195)](_0x2ad9c0[_0x50434a(0x1a2)]());if(_0x27e911===undefined)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Unknown\x20email\x20recipient:\x20'+_0x2ad9c0+_0x50434a(0x19f));return _0x27e911;})));if(_0x2d92ef[_0x40a480(0x15d)]){const _0x102ed1=_0x5af1d6?.[_0x40a480(0x139)]?.[_0x40a480(0x195)](_0x2cf4c5);if(_0x102ed1&&_0x5af1d6?.[_0x40a480(0x137)])try{const _0x1dd0c1=await _0x5af1d6[_0x40a480(0x137)](_0x102ed1),_0x39794f=validateConnectorConfig(_0x2d92ef[_0x40a480(0x15d)],_0x1dd0c1);if(!_0x39794f[_0x40a480(0x159)])throw new SDKError(ErrorCode['CONNECTOR_INVALID_CONFIG'],'Invalid\x20connector_config\x20for\x20activation\x20\x22'+_0x2d92ef['name']+_0x40a480(0x1ad)+formatValidationErrors(_0x39794f['errors']),undefined,{'helpText':_0x40a480(0x197)+_0x102ed1+'\x0a\x0aAvailable\x20fields:\x0a'+formatSchemaAsHelp(_0x1dd0c1)});if(_0x39794f[_0x40a480(0x142)][_0x40a480(0x149)]>0x0){const _0xa14210=formatValidationWarnings(_0x39794f[_0x40a480(0x142)]);console['warn'](_0x40a480(0x171)+_0x2d92ef[_0x40a480(0x128)]+_0x40a480(0x1ad)+_0xa14210);}_0x141792[_0x40a480(0x1a0)]=transformConfigToLegacy(_0x2d92ef[_0x40a480(0x15d)],_0x1dd0c1);}catch(_0x7e3474){if(_0x7e3474 instanceof SDKError&&_0x7e3474[_0x40a480(0x14e)]===ErrorCode['CONNECTOR_SCHEMA_NOT_FOUND'])_0x141792[_0x40a480(0x1a0)]=_0x2d92ef[_0x40a480(0x15d)];else throw _0x7e3474;}else _0x141792[_0x40a480(0x1a0)]=_0x2d92ef[_0x40a480(0x15d)];}_0x2d92ef[_0x40a480(0x144)]!==undefined&&(_0x141792[_0x40a480(0x152)]=_0x2d92ef[_0x40a480(0x144)]);if(_0x2d92ef['behavior']){const _0x7a60f6=_0x2d92ef[_0x40a480(0x135)],_0x5de2c8={};if(_0x7a60f6[_0x40a480(0x121)]&&_0x7a60f6[_0x40a480(0x121)]['length']>0x0){const _0x5ea5dd=_0x7a60f6[_0x40a480(0x121)][_0x40a480(0x19c)](_0x234bcf=>_0x234bcf&&_0x234bcf['name']);_0x5ea5dd[_0x40a480(0x149)]>0x0&&(_0x5de2c8[_0x40a480(0x121)]=_0x5ea5dd);}_0x7a60f6[_0x40a480(0x18b)]&&(_0x5de2c8[_0x40a480(0x14b)]=_0x7a60f6[_0x40a480(0x18b)]),_0x7a60f6[_0x40a480(0x120)]!==undefined&&(_0x5de2c8[_0x40a480(0x1ae)]=_0x7a60f6[_0x40a480(0x120)]),_0x7a60f6[_0x40a480(0x194)]&&(_0x5de2c8['joinStrategy']=_0x7a60f6[_0x40a480(0x194)]),_0x7a60f6[_0x40a480(0x175)]&&(_0x5de2c8['formatting']=_0x7a60f6[_0x40a480(0x175)]),_0x7a60f6[_0x40a480(0x18d)]&&(_0x5de2c8[_0x40a480(0x158)]=_0x7a60f6[_0x40a480(0x18d)]),_0x141792['syndicationBehavior']=_0x5de2c8;}return _0x141792;}export async function activationDefToUpdateRequest(_0x180e55,_0x9df75){return activationDefToCreateRequest(_0x180e55,_0x9df75);}export function deepSortObject(_0x17e946){const _0x5399a0=a93_0x4cf8e2;if(_0x17e946===null||typeof _0x17e946!==_0x5399a0(0x184))return _0x17e946;if(Array[_0x5399a0(0x179)](_0x17e946))return _0x17e946[_0x5399a0(0x14a)](deepSortObject)[_0x5399a0(0x1a8)]((_0x54ad88,_0xb6b795)=>JSON['stringify'](_0x54ad88)[_0x5399a0(0x169)](JSON['stringify'](_0xb6b795)));const _0x474f81={};for(const _0x560a9f of Object[_0x5399a0(0x136)](_0x17e946)[_0x5399a0(0x1a8)]()){_0x474f81[_0x560a9f]=deepSortObject(_0x17e946[_0x560a9f]);}return _0x474f81;}export function serializeRule(_0x2e2516){const _0x4698d4=a93_0x4cf8e2;return JSON[_0x4698d4(0x138)](deepSortObject(_0x2e2516));}export function normalizeRuleForMatching(_0x10cc36){return normalizeConditionsForMatching(_0x10cc36);}function normalizeConditionsForMatching(_0x4c0a7e){const _0x5443f5=a93_0x4cf8e2;if(_0x4c0a7e===null||typeof _0x4c0a7e!==_0x5443f5(0x184))return _0x4c0a7e;if(Array[_0x5443f5(0x179)](_0x4c0a7e))return _0x4c0a7e[_0x5443f5(0x14a)](normalizeConditionsForMatching);const _0x3b8e46=_0x4c0a7e;if((_0x3b8e46[_0x5443f5(0x133)]===_0x5443f5(0x156)||_0x3b8e46['type']===_0x5443f5(0x170))&&typeof _0x3b8e46[_0x5443f5(0x1a4)]===_0x5443f5(0x1af))return{..._0x3b8e46,'segment':_0x5443f5(0x160)};const _0x2078b2={};for(const _0x45b700 of Object[_0x5443f5(0x136)](_0x3b8e46)){_0x2078b2[_0x45b700]=normalizeConditionsForMatching(_0x3b8e46[_0x45b700]);}return _0x2078b2;}export function serializeRuleForMatching(_0x3dae57){return JSON['stringify'](deepSortObject(normalizeRuleForMatching(_0x3dae57)));}export function expandSegmentReferences(_0x5a5054,_0x10e40b,_0x20d413=new Set()){return expandConditions(_0x5a5054,_0x10e40b,_0x20d413);}function expandConditions(_0x67f659,_0x28bb83,_0x329a74){const _0x2e8450=a93_0x4cf8e2;if(_0x67f659===null||typeof _0x67f659!=='object')return _0x67f659;if(Array[_0x2e8450(0x179)](_0x67f659))return _0x67f659[_0x2e8450(0x14a)](_0x2bd5d9=>expandConditions(_0x2bd5d9,_0x28bb83,_0x329a74));const _0x2ff7d9=_0x67f659;if((_0x2ff7d9[_0x2e8450(0x133)]===_0x2e8450(0x156)||_0x2ff7d9[_0x2e8450(0x133)]==='exclude')&&typeof _0x2ff7d9[_0x2e8450(0x1a4)]===_0x2e8450(0x1af)){const _0x258aa6=_0x2ff7d9[_0x2e8450(0x1a4)],_0x3f3027=_0x28bb83['get'](_0x258aa6);if(_0x3f3027&&!_0x329a74['has'](_0x258aa6)){const _0x92dc7=new Set(_0x329a74);_0x92dc7[_0x2e8450(0x150)](_0x258aa6);const _0x2087a2=expandConditions(_0x3f3027,_0x28bb83,_0x92dc7);return{'type':_0x2ff7d9[_0x2e8450(0x133)],'expanded_rule':_0x2087a2};}return{'type':_0x2ff7d9[_0x2e8450(0x133)],'expanded_rule':_0x2e8450(0x123)};}const _0x5240a9={};for(const _0x25dc1e of Object[_0x2e8450(0x136)](_0x2ff7d9)){_0x5240a9[_0x25dc1e]=expandConditions(_0x2ff7d9[_0x25dc1e],_0x28bb83,_0x329a74);}return _0x5240a9;}export function serializeExpandedRule(_0x150f8d,_0x3a68f5){const _0x239d07=expandSegmentReferences(_0x150f8d,_0x3a68f5);return JSON['stringify'](deepSortObject(_0x239d07));}export function createSegmentNameContext(_0x168859){const _0xab3032=a93_0x4cf8e2,_0xd641ef=new Set(),_0x1a7b07=new Map(),_0x1dbe1a=new Map();if(_0x168859)for(const [_0x5d37e0,_0xb1ae69]of Object[_0xab3032(0x127)](_0x168859)){if(_0xb1ae69[_0xab3032(0x1a6)]){const _0x274b53=serializeRule(_0xb1ae69['rule']);_0x1dbe1a[_0xab3032(0x15c)](_0x274b53,_0x5d37e0),_0xd641ef['add'](_0x5d37e0);}}return{'usedNames':_0xd641ef,'ruleHashToName':_0x1a7b07,'localRuleToName':_0x168859?_0x1dbe1a:undefined};}export function resolveSegmentName(_0x407fb3,_0x1db51d,_0x5f78f0,_0x23345e){const _0x122a98=a93_0x4cf8e2,_0x11e261=serializeRule(_0x1db51d);if(_0x5f78f0[_0x122a98(0x148)]){const _0x56701f=_0x5f78f0[_0x122a98(0x148)][_0x122a98(0x195)](_0x11e261);if(_0x56701f)return{'name':_0x56701f,'isDuplicate':![],'isLocalMatch':!![]};}const _0x5df0dc=_0x5f78f0[_0x122a98(0x174)][_0x122a98(0x195)](_0x11e261);if(_0x5df0dc)return{'name':_0x5df0dc,'isDuplicate':!![],'isLocalMatch':![]};const _0x5e1fc0=_0x23345e(_0x407fb3);let _0xdf1f0b=_0x5e1fc0||_0x407fb3,_0x4a3194=_0xdf1f0b,_0x6fa05b=0x2;while(_0x5f78f0[_0x122a98(0x182)]['has'](_0x4a3194)){_0x4a3194=_0xdf1f0b+'_'+_0x6fa05b,_0x6fa05b++;}return _0x5f78f0[_0x122a98(0x182)][_0x122a98(0x150)](_0x4a3194),_0x5f78f0[_0x122a98(0x174)]['set'](_0x11e261,_0x4a3194),{'name':_0x4a3194,'isDuplicate':![],'isLocalMatch':![]};}function a93_0x1432(){const _0x5cd068=['email_recipients','notify_on','null','all','connection','repeat_frequency','join_strategy','get','2550ThWxks','Connector:\x20','CONNECTION_NOT_FOUND','end_on','10294800EBryZJ','repeatUnit','filter','Reference','\x27:\x20','.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.','connectorConfig','YAML\x20type\x20must\x20be\x20\x27segment\x27\x20or\x20omitted,\x20got:\x20','toLowerCase','replace','segment','any','rule','source','sort','18zPpOEC','realtime','max','JOURNEY_SYNTAX_ERROR','\x22:\x0a','joinRow','string','Unknown\x20connection:\x20','conditions','join_row','columns','visibility','__UNRESOLVED__','parse','value','notification','entries','name','activations:','aggregation','Equal','activations','Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections','156192aqcCNg','every','492245qaXkQW','segmentFolderId','startAt','type','9RJCOao','behavior','keys','getSchema','stringify','connectionNameToTypeMap','notifyOn','rightValues','YAML\x20config\x20missing\x20required\x20field:\x20name','scheduleType','all_columns','Please\x20specify\x20a\x20valid\x20attribute\x20name.','unit','arrayMatching','warnings','leftValue','activation_template_id','schedule','connectionId','1176VaEpvU','localRuleToName','length','map','behaviorTableName','test','isVisible','code','start_at','add','749TjRaUH','activationTemplateId','description','folder','visible','include','11yduyMw','orderBy','valid','999568BPZfJF','204KkxVyO','set','connector_config','timezone','TimeWithinPast','__SEGMENT_REF__','New\x20Segment','allColumns','Value','repeat_unit','groupingColumns','rightValue','conditions[','And','localeCompare','syndicationBehavior','repeatSubFrequency','kind','from','rule:','duration','exclude','connector_config\x20for\x20activation\x20\x22','repeat_sub_frequency','].attribute\x20cannot\x20be\x20empty.\x0a','ruleHashToName','formatting','funnel_stage','emailRecipients','batch','isArray','attribute_name','2084170NBIBJm','joinStrategy','not','attributes','operator','attribute','endOn','usedNames','push','object','Segment\x20description','activationParams','emailToIdMap','repeatFrequency','values','limit','behavior_table','TimeWithinNext','order_by'];a93_0x1432=function(){return _0x5cd068;};return a93_0x1432();}export function collectSegmentRefsFromRule(_0x207a42){const _0x377905=[],_0x21e170=_0x2520e2=>{const _0x36c77c=a93_0x5db0;if(!_0x2520e2||typeof _0x2520e2!==_0x36c77c(0x184))return;if(Array[_0x36c77c(0x179)](_0x2520e2)){_0x2520e2['forEach'](_0x21e170);return;}const _0x26baaa=_0x2520e2;(_0x26baaa[_0x36c77c(0x133)]===_0x36c77c(0x156)||_0x26baaa[_0x36c77c(0x133)]==='exclude')&&typeof _0x26baaa[_0x36c77c(0x1a4)]===_0x36c77c(0x1af)&&_0x377905[_0x36c77c(0x183)](_0x26baaa[_0x36c77c(0x1a4)]);for(const _0x212989 of Object[_0x36c77c(0x189)](_0x26baaa)){_0x21e170(_0x212989);}};return _0x21e170(_0x207a42),_0x377905;}export function validateSegmentRule(_0x1b983f,_0x2eeeb0){const _0xb8b653=a93_0x4cf8e2;if(!_0x2eeeb0||!_0x2eeeb0[_0xb8b653(0x11f)])return;for(let _0x45e27f=0x0;_0x45e27f<_0x2eeeb0[_0xb8b653(0x11f)][_0xb8b653(0x149)];_0x45e27f++){const _0x359571=_0x2eeeb0[_0xb8b653(0x11f)][_0x45e27f];if('type'in _0x359571&&_0x359571[_0xb8b653(0x133)]==='Value'){const _0xc4aa8d=_0x359571;if(!_0xc4aa8d[_0xb8b653(0x180)]||_0xc4aa8d[_0xb8b653(0x180)]==='')throw new SDKError(ErrorCode[_0xb8b653(0x1ac)],'Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27'+_0x1b983f+_0xb8b653(0x19e)+(_0xb8b653(0x167)+_0x45e27f+_0xb8b653(0x173))+_0xb8b653(0x13f));}}}
@@ -1 +1 @@
1
- (function(_0x5082e0,_0x3575d9){const _0xbe2f17=a93_0x278b,_0x2ddd7b=_0x5082e0();while(!![]){try{const _0x3b07cf=parseInt(_0xbe2f17(0x19d))/0x1+-parseInt(_0xbe2f17(0x1bf))/0x2*(parseInt(_0xbe2f17(0x1a2))/0x3)+-parseInt(_0xbe2f17(0x1ae))/0x4+parseInt(_0xbe2f17(0x18d))/0x5*(-parseInt(_0xbe2f17(0x19b))/0x6)+parseInt(_0xbe2f17(0x191))/0x7+parseInt(_0xbe2f17(0x1a5))/0x8+-parseInt(_0xbe2f17(0x189))/0x9*(-parseInt(_0xbe2f17(0x1b7))/0xa);if(_0x3b07cf===_0x3575d9)break;else _0x2ddd7b['push'](_0x2ddd7b['shift']());}catch(_0x1cf63d){_0x2ddd7b['push'](_0x2ddd7b['shift']());}}}(a93_0x10a7,0x25e5e));import a93_0x422614 from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x5c6a84){const _0x2ed178=a93_0x278b,_0x377828=_0x5c6a84[_0x2ed178(0x1b4)][_0x2ed178(0x18f)](_0x3daca1=>({'column_name':_0x3daca1[_0x2ed178(0x194)],'column_type':_0x3daca1[_0x2ed178(0x1b8)],'null':_0x2ed178(0x1b2),'key':null,'default':null,'extra':null}));return{..._0x5c6a84,'columns':[{'name':_0x2ed178(0x1b0),'type':_0x2ed178(0x1af)},{'name':_0x2ed178(0x1bc),'type':_0x2ed178(0x1af)},{'name':_0x2ed178(0x18e),'type':_0x2ed178(0x1af)},{'name':_0x2ed178(0x1be),'type':_0x2ed178(0x1af)},{'name':'default','type':_0x2ed178(0x1af)},{'name':'extra','type':_0x2ed178(0x1af)}],'data':_0x377828};}function a93_0x278b(_0x22f0f0,_0x1154b5){_0x22f0f0=_0x22f0f0-0x189;const _0x10a73a=a93_0x10a7();let _0x278b3b=_0x10a73a[_0x22f0f0];return _0x278b3b;}export async function executeSchemaQuery(_0x241ea4,_0x38b7e1,_0x39eb2e){const _0x5eb779=a93_0x278b,_0x583fb0=_0x241ea4[_0x5eb779(0x1ad)]()[_0x5eb779(0x1ab)](/;+$/,''),_0x294aac=_0x5eb779(0x18a)+_0x583fb0+_0x5eb779(0x1aa);_0x39eb2e['verbose']&&console[_0x5eb779(0x190)](_0x5eb779(0x1bb)+_0x294aac);const _0x4bac2c=await withProgressSpinner(_0x5eb779(0x1b6),async _0x3dde29=>{const _0x48e73f=_0x5eb779,_0x249670=await _0x38b7e1['query'][_0x48e73f(0x18c)](_0x294aac,{'catalog':'td','schema':_0x48e73f(0x1b3),'onJobId':_0x2d3c07=>{const _0x2835d5=_0x48e73f;_0x3dde29[_0x2835d5(0x1a7)](_0x2d3c07);}});return _0x249670;},{'verbose':_0x39eb2e[_0x5eb779(0x197)]});return buildSchemaResult(_0x4bac2c['data']);}export function displayFieldsHumanReadable(_0x56d9b1,_0xf441b6){const _0x19fc44=a93_0x278b,_0x156f6e=_0x56d9b1[_0x19fc44(0x19f)](_0xa30ddf=>_0xa30ddf[_0x19fc44(0x19e)]===_0x19fc44(0x1b5)),_0x3bd3bc=_0x56d9b1['filter'](_0x4c05c4=>_0x4c05c4[_0x19fc44(0x19e)]===_0x19fc44(0x1a0)),_0x3f2f88=new Map();for(const _0x3d529f of _0x156f6e){const _0x4195cb=_0x3d529f[_0x19fc44(0x1ba)]||_0x3d529f[_0x19fc44(0x1a3)]||_0x19fc44(0x18b),_0x2fc38c=_0x3f2f88['get'](_0x4195cb);_0x2fc38c?_0x2fc38c['fields'][_0x19fc44(0x1a4)](_0x3d529f):_0x3f2f88['set'](_0x4195cb,{'displayName':_0x4195cb,'tableName':_0x3d529f[_0x19fc44(0x1a3)],'fields':[_0x3d529f]});}const _0x1b32d0=new Map();for(const _0x27011d of _0x3bd3bc){const _0x1e9e66=_0x27011d[_0x19fc44(0x193)]||_0x19fc44(0x18b),_0x3fa60e=_0x1b32d0['get'](_0x1e9e66)||[];_0x3fa60e[_0x19fc44(0x1a4)](_0x27011d),_0x1b32d0[_0x19fc44(0x19c)](_0x1e9e66,_0x3fa60e);}console[_0x19fc44(0x190)]('\x0a'+a93_0x422614[_0x19fc44(0x195)](_0xf441b6));if(_0x3f2f88[_0x19fc44(0x1a1)]>0x0){console[_0x19fc44(0x190)]('\x0a'+a93_0x422614['dim']('Attributes'));const _0x2ab393=[..._0x3f2f88[_0x19fc44(0x198)]()][_0x19fc44(0x19a)]((_0x1a805b,_0x26f870)=>_0x1a805b[0x0][_0x19fc44(0x192)](_0x26f870[0x0]));for(const [,_0x235792]of _0x2ab393){const _0x1d005e=_0x235792[_0x19fc44(0x1a6)]&&_0x235792['tableName']!==_0x235792[_0x19fc44(0x1a8)]?'\x20'+a93_0x422614[_0x19fc44(0x1ac)]('('+_0x235792[_0x19fc44(0x1a6)]+')'):'';console['error']('\x20\x20'+a93_0x422614[_0x19fc44(0x195)](_0x235792[_0x19fc44(0x1a8)])+_0x1d005e);const _0x49ebe1=[..._0x235792[_0x19fc44(0x196)]]['sort']((_0x17c330,_0x34c82c)=>_0x17c330[_0x19fc44(0x194)]['localeCompare'](_0x34c82c[_0x19fc44(0x194)]));for(const _0x5e44bb of _0x49ebe1){const _0x1bed5b=_0x5e44bb[_0x19fc44(0x1b9)]&&_0x5e44bb['parentColumn']!==_0x5e44bb[_0x19fc44(0x194)]?'\x20'+a93_0x422614[_0x19fc44(0x1ac)]('('+_0x5e44bb[_0x19fc44(0x1b9)]+')'):'';console['error']('\x20\x20\x20\x20'+_0x5e44bb['name']+_0x1bed5b+':\x20'+a93_0x422614[_0x19fc44(0x1a9)](_0x5e44bb[_0x19fc44(0x1b8)]));}}}if(_0x1b32d0[_0x19fc44(0x1a1)]>0x0){console['error']('\x0a'+a93_0x422614[_0x19fc44(0x1ac)](_0x19fc44(0x1b1)));const _0x536b52=[..._0x1b32d0['entries']()][_0x19fc44(0x19a)]((_0x3c3282,_0x373638)=>_0x3c3282[0x0]['localeCompare'](_0x373638[0x0]));for(const [_0x1885a7,_0x5967fc]of _0x536b52){const _0x39eace=_0x5967fc[0x0],_0x35452f=_0x39eace?.['parentTableName']||'';console[_0x19fc44(0x190)]('\x20\x20'+a93_0x422614[_0x19fc44(0x195)](_0x1885a7)+(_0x35452f?'\x20'+a93_0x422614[_0x19fc44(0x1ac)]('('+_0x35452f+')'):''));const _0x2e4325=[..._0x5967fc][_0x19fc44(0x19a)]((_0x45c1e4,_0x50953c)=>_0x45c1e4[_0x19fc44(0x194)][_0x19fc44(0x192)](_0x50953c[_0x19fc44(0x194)]));for(const _0x197012 of _0x2e4325){const _0x5a80f1=_0x197012[_0x19fc44(0x194)][_0x19fc44(0x1bd)](_0x1885a7+'.')?_0x197012[_0x19fc44(0x194)]['slice'](_0x1885a7['length']+0x1):_0x197012[_0x19fc44(0x194)],_0x27abbd=_0x197012[_0x19fc44(0x1b9)]&&_0x197012['parentColumn']!==_0x5a80f1?'\x20'+a93_0x422614[_0x19fc44(0x1ac)]('('+_0x197012[_0x19fc44(0x1b9)]+')'):'';console[_0x19fc44(0x190)](_0x19fc44(0x199)+_0x5a80f1+_0x27abbd+':\x20'+a93_0x422614[_0x19fc44(0x1a9)](_0x197012[_0x19fc44(0x1b8)]));}}}console[_0x19fc44(0x190)]('');}function a93_0x10a7(){const _0x2d2677=['SELECT\x20*\x20FROM\x20(\x0a','Unknown','execute','1205smQjDQ','null','map','error','1046143teCpya','localeCompare','behaviorName','name','bold','fields','verbose','entries','\x20\x20\x20\x20','sort','930ErFoWf','set','106801GoJXwO','source','filter','behavior','size','4335DSeaqO','parentTableName','push','676264lCBvuP','tableName','setJobId','displayName','cyan','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','replace','dim','trim','619056SpVHje','varchar','column_name','Behaviors','YES','information_schema','columns','attribute','Fetching\x20schema...','20770paPnGQ','type','parentColumn','groupingName','Schema\x20query:\x0a','column_type','startsWith','key','402idrxtm','1287Mnbldt'];a93_0x10a7=function(){return _0x2d2677;};return a93_0x10a7();}
1
+ (function(_0x2e5e00,_0x176dcc){const _0x271bcc=a94_0x2cc1,_0x44c450=_0x2e5e00();while(!![]){try{const _0x50264f=parseInt(_0x271bcc(0x130))/0x1+-parseInt(_0x271bcc(0x112))/0x2*(-parseInt(_0x271bcc(0x11e))/0x3)+-parseInt(_0x271bcc(0x136))/0x4*(parseInt(_0x271bcc(0x140))/0x5)+-parseInt(_0x271bcc(0x13e))/0x6*(parseInt(_0x271bcc(0x142))/0x7)+parseInt(_0x271bcc(0x114))/0x8*(parseInt(_0x271bcc(0x11d))/0x9)+-parseInt(_0x271bcc(0x118))/0xa*(-parseInt(_0x271bcc(0x11c))/0xb)+parseInt(_0x271bcc(0x116))/0xc*(-parseInt(_0x271bcc(0x143))/0xd);if(_0x50264f===_0x176dcc)break;else _0x44c450['push'](_0x44c450['shift']());}catch(_0x12d564){_0x44c450['push'](_0x44c450['shift']());}}}(a94_0x3358,0x1f97c));function a94_0x3358(){const _0x3a6a03=['tableName','name','push','extra','behavior','attribute','localeCompare','138kHCOkR','SELECT\x20*\x20FROM\x20(\x0a','140015DbmELy','fields','28238rRzfAI','10699leAfzn','Fetching\x20schema...','verbose','execute','displayName','replace','length','cyan','error','2aSssHO','filter','38824cJgRzV','columns','936NTmmmi','slice','10EqqKGx','default','column_type','entries','1793165rMqZuT','45FMKFgM','284223LpiBxH','bold','trim','column_name','dim','map','groupingName','data','null','type','behaviorName','Unknown','varchar','sort','set','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','startsWith','size','32362XsvQBg','parentColumn','setJobId','get','parentTableName','\x20\x20\x20\x20','4neKTuC'];a94_0x3358=function(){return _0x3a6a03;};return a94_0x3358();}import a94_0x2b2f88 from'chalk';function a94_0x2cc1(_0x269c49,_0x5b991c){_0x269c49=_0x269c49-0x112;const _0x33587=a94_0x3358();let _0x2cc140=_0x33587[_0x269c49];return _0x2cc140;}import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x9f1796){const _0x23e33b=a94_0x2cc1,_0x29d98e=_0x9f1796[_0x23e33b(0x115)][_0x23e33b(0x123)](_0x1d20bc=>({'column_name':_0x1d20bc[_0x23e33b(0x138)],'column_type':_0x1d20bc['type'],'null':'YES','key':null,'default':null,'extra':null}));return{..._0x9f1796,'columns':[{'name':_0x23e33b(0x121),'type':_0x23e33b(0x12a)},{'name':_0x23e33b(0x11a),'type':_0x23e33b(0x12a)},{'name':_0x23e33b(0x126),'type':_0x23e33b(0x12a)},{'name':'key','type':'varchar'},{'name':_0x23e33b(0x119),'type':_0x23e33b(0x12a)},{'name':_0x23e33b(0x13a),'type':_0x23e33b(0x12a)}],'data':_0x29d98e};}export async function executeSchemaQuery(_0x2acdaa,_0x3d7d9c,_0x36f5b5){const _0x4ebe4a=a94_0x2cc1,_0x33e5e3=_0x2acdaa[_0x4ebe4a(0x120)]()[_0x4ebe4a(0x148)](/;+$/,''),_0x572df2=_0x4ebe4a(0x13f)+_0x33e5e3+_0x4ebe4a(0x12d);_0x36f5b5['verbose']&&console['error']('Schema\x20query:\x0a'+_0x572df2);const _0x193fa4=await withProgressSpinner(_0x4ebe4a(0x144),async _0x325da1=>{const _0x1470e2=_0x4ebe4a,_0x42b6ab=await _0x3d7d9c['query'][_0x1470e2(0x146)](_0x572df2,{'catalog':'td','schema':'information_schema','onJobId':_0x310aea=>{const _0x4285d8=_0x1470e2;_0x325da1[_0x4285d8(0x132)](_0x310aea);}});return _0x42b6ab;},{'verbose':_0x36f5b5[_0x4ebe4a(0x145)]});return buildSchemaResult(_0x193fa4[_0x4ebe4a(0x125)]);}export function displayFieldsHumanReadable(_0x3c328a,_0x21ac2a){const _0x2e012c=a94_0x2cc1,_0x3a8265=_0x3c328a[_0x2e012c(0x113)](_0x500d8d=>_0x500d8d['source']===_0x2e012c(0x13c)),_0x38f1d8=_0x3c328a[_0x2e012c(0x113)](_0x5e88b9=>_0x5e88b9['source']===_0x2e012c(0x13b)),_0x33aa31=new Map();for(const _0x4e3ecf of _0x3a8265){const _0x19f1e5=_0x4e3ecf[_0x2e012c(0x124)]||_0x4e3ecf['parentTableName']||'Unknown',_0x27666b=_0x33aa31['get'](_0x19f1e5);_0x27666b?_0x27666b[_0x2e012c(0x141)][_0x2e012c(0x139)](_0x4e3ecf):_0x33aa31['set'](_0x19f1e5,{'displayName':_0x19f1e5,'tableName':_0x4e3ecf[_0x2e012c(0x134)],'fields':[_0x4e3ecf]});}const _0x582dbe=new Map();for(const _0x103014 of _0x38f1d8){const _0x470343=_0x103014[_0x2e012c(0x128)]||_0x2e012c(0x129),_0x3d0a69=_0x582dbe[_0x2e012c(0x133)](_0x470343)||[];_0x3d0a69[_0x2e012c(0x139)](_0x103014),_0x582dbe[_0x2e012c(0x12c)](_0x470343,_0x3d0a69);}console[_0x2e012c(0x14b)]('\x0a'+a94_0x2b2f88[_0x2e012c(0x11f)](_0x21ac2a));if(_0x33aa31[_0x2e012c(0x12f)]>0x0){console[_0x2e012c(0x14b)]('\x0a'+a94_0x2b2f88['dim']('Attributes'));const _0x36d213=[..._0x33aa31[_0x2e012c(0x11b)]()]['sort']((_0x72e657,_0x164a8e)=>_0x72e657[0x0][_0x2e012c(0x13d)](_0x164a8e[0x0]));for(const [,_0x221b22]of _0x36d213){const _0x36ea05=_0x221b22[_0x2e012c(0x137)]&&_0x221b22[_0x2e012c(0x137)]!==_0x221b22[_0x2e012c(0x147)]?'\x20'+a94_0x2b2f88[_0x2e012c(0x122)]('('+_0x221b22['tableName']+')'):'';console[_0x2e012c(0x14b)]('\x20\x20'+a94_0x2b2f88[_0x2e012c(0x11f)](_0x221b22['displayName'])+_0x36ea05);const _0x31fa25=[..._0x221b22[_0x2e012c(0x141)]][_0x2e012c(0x12b)]((_0x1f809e,_0x44a425)=>_0x1f809e[_0x2e012c(0x138)][_0x2e012c(0x13d)](_0x44a425['name']));for(const _0x532944 of _0x31fa25){const _0x3b9ac5=_0x532944['parentColumn']&&_0x532944[_0x2e012c(0x131)]!==_0x532944[_0x2e012c(0x138)]?'\x20'+a94_0x2b2f88[_0x2e012c(0x122)]('('+_0x532944[_0x2e012c(0x131)]+')'):'';console[_0x2e012c(0x14b)](_0x2e012c(0x135)+_0x532944[_0x2e012c(0x138)]+_0x3b9ac5+':\x20'+a94_0x2b2f88[_0x2e012c(0x14a)](_0x532944['type']));}}}if(_0x582dbe['size']>0x0){console[_0x2e012c(0x14b)]('\x0a'+a94_0x2b2f88['dim']('Behaviors'));const _0x3d54b9=[..._0x582dbe[_0x2e012c(0x11b)]()][_0x2e012c(0x12b)]((_0x27233d,_0x53c791)=>_0x27233d[0x0][_0x2e012c(0x13d)](_0x53c791[0x0]));for(const [_0x1ab0e7,_0x6bce1]of _0x3d54b9){const _0x2da34b=_0x6bce1[0x0],_0x47fc96=_0x2da34b?.[_0x2e012c(0x134)]||'';console[_0x2e012c(0x14b)]('\x20\x20'+a94_0x2b2f88['bold'](_0x1ab0e7)+(_0x47fc96?'\x20'+a94_0x2b2f88[_0x2e012c(0x122)]('('+_0x47fc96+')'):''));const _0x4610f9=[..._0x6bce1]['sort']((_0x1c69aa,_0x3d121a)=>_0x1c69aa[_0x2e012c(0x138)][_0x2e012c(0x13d)](_0x3d121a[_0x2e012c(0x138)]));for(const _0x36a1e1 of _0x4610f9){const _0xa1c0be=_0x36a1e1[_0x2e012c(0x138)][_0x2e012c(0x12e)](_0x1ab0e7+'.')?_0x36a1e1[_0x2e012c(0x138)][_0x2e012c(0x117)](_0x1ab0e7[_0x2e012c(0x149)]+0x1):_0x36a1e1['name'],_0x197fbe=_0x36a1e1[_0x2e012c(0x131)]&&_0x36a1e1['parentColumn']!==_0xa1c0be?'\x20'+a94_0x2b2f88[_0x2e012c(0x122)]('('+_0x36a1e1[_0x2e012c(0x131)]+')'):'';console['error'](_0x2e012c(0x135)+_0xa1c0be+_0x197fbe+':\x20'+a94_0x2b2f88[_0x2e012c(0x14a)](_0x36a1e1[_0x2e012c(0x127)]));}}}console[_0x2e012c(0x14b)]('');}
@@ -1 +1 @@
1
- (function(_0x3ffd23,_0x290630){const _0xf2d3b0=a94_0x5767,_0x5ccde4=_0x3ffd23();while(!![]){try{const _0x4ba668=parseInt(_0xf2d3b0(0x1f7))/0x1*(-parseInt(_0xf2d3b0(0x1f8))/0x2)+parseInt(_0xf2d3b0(0x1fa))/0x3*(parseInt(_0xf2d3b0(0x1f9))/0x4)+parseInt(_0xf2d3b0(0x204))/0x5*(parseInt(_0xf2d3b0(0x1ff))/0x6)+-parseInt(_0xf2d3b0(0x206))/0x7+-parseInt(_0xf2d3b0(0x202))/0x8*(-parseInt(_0xf2d3b0(0x1fc))/0x9)+parseInt(_0xf2d3b0(0x1f5))/0xa*(parseInt(_0xf2d3b0(0x203))/0xb)+parseInt(_0xf2d3b0(0x1f6))/0xc*(-parseInt(_0xf2d3b0(0x1fb))/0xd);if(_0x4ba668===_0x290630)break;else _0x5ccde4['push'](_0x5ccde4['shift']());}catch(_0x203bd4){_0x5ccde4['push'](_0x5ccde4['shift']());}}}(a94_0x1b78,0xac6dc));import{readdirSync,statSync}from'fs';import a94_0x1053d7 from'path';export function findYamlFiles(_0x402d8d){const _0x3b2bf6=[];function _0x36b7dc(_0x257095){const _0x3366dc=a94_0x5767,_0x10d399=readdirSync(_0x257095,{'withFileTypes':!![]});for(const _0x66d751 of _0x10d399){const _0x48d062=a94_0x1053d7[_0x3366dc(0x207)](_0x257095,_0x66d751[_0x3366dc(0x1f4)]);if(_0x66d751[_0x3366dc(0x201)]())_0x36b7dc(_0x48d062);else(_0x66d751['name'][_0x3366dc(0x1ef)](_0x3366dc(0x1f1))||_0x66d751[_0x3366dc(0x1f4)]['endsWith'](_0x3366dc(0x205)))&&_0x3b2bf6[_0x3366dc(0x1fe)](_0x48d062);}}return _0x36b7dc(_0x402d8d),_0x3b2bf6;}function a94_0x5767(_0x26d097,_0x4851c0){_0x26d097=_0x26d097-0x1ee;const _0x1b7859=a94_0x1b78();let _0x576729=_0x1b7859[_0x26d097];return _0x576729;}export function discoverYamlFiles(_0x1fae26){const _0x4ff0da=a94_0x5767,_0xd3bc6=findYamlFiles(_0x1fae26);return _0xd3bc6[_0x4ff0da(0x1fd)](_0x81105e=>{const _0x490860=_0x4ff0da,_0x58bbf7=a94_0x1053d7[_0x490860(0x1ee)](_0x1fae26,_0x81105e),_0x404333=a94_0x1053d7[_0x490860(0x1f3)](_0x58bbf7);return{'absolutePath':_0x81105e,'relativePath':_0x58bbf7,'folderPath':_0x404333==='.'?'':_0x404333};});}export function isYamlFile(_0x8056d9){const _0x12f8c4=a94_0x5767;try{const _0x2af013=statSync(_0x8056d9);if(!_0x2af013[_0x12f8c4(0x200)]())return![];const _0x263c1d=a94_0x1053d7[_0x12f8c4(0x1f0)](_0x8056d9)[_0x12f8c4(0x1f2)]();return _0x263c1d==='.yml'||_0x263c1d===_0x12f8c4(0x205);}catch{return![];}}function a94_0x1b78(){const _0x5a0446=['toLowerCase','dirname','name','5733800GRdgVw','4189944SBMskF','15455yQWJMD','94bZjBPi','12764YeQKGA','21oupAXs','52pzROeK','6003tDFsAW','map','push','6iAsFSO','isFile','isDirectory','11528hvbtbw','22NDdcQR','5559285zJCAcP','.yaml','2889600sGEjkm','join','relative','endsWith','extname','.yml'];a94_0x1b78=function(){return _0x5a0446;};return a94_0x1b78();}
1
+ (function(_0x45bcad,_0x31078d){const _0x93eed4=a95_0x1a77,_0xbcd661=_0x45bcad();while(!![]){try{const _0x3183af=parseInt(_0x93eed4(0x91))/0x1+parseInt(_0x93eed4(0x88))/0x2*(parseInt(_0x93eed4(0x96))/0x3)+-parseInt(_0x93eed4(0x8c))/0x4+parseInt(_0x93eed4(0x87))/0x5*(parseInt(_0x93eed4(0x8e))/0x6)+-parseInt(_0x93eed4(0x8d))/0x7+parseInt(_0x93eed4(0x84))/0x8*(parseInt(_0x93eed4(0x90))/0x9)+parseInt(_0x93eed4(0x86))/0xa;if(_0x3183af===_0x31078d)break;else _0xbcd661['push'](_0xbcd661['shift']());}catch(_0x4989f9){_0xbcd661['push'](_0xbcd661['shift']());}}}(a95_0x2ec2,0xb01b7));import{readdirSync,statSync}from'fs';import a95_0x3fa655 from'path';export function findYamlFiles(_0x1a1bfc){const _0x2e6832=[];function _0x295e76(_0x2519a4){const _0x254969=a95_0x1a77,_0x996b9d=readdirSync(_0x2519a4,{'withFileTypes':!![]});for(const _0x4a58c9 of _0x996b9d){const _0x382eb3=a95_0x3fa655[_0x254969(0x89)](_0x2519a4,_0x4a58c9['name']);if(_0x4a58c9['isDirectory']())_0x295e76(_0x382eb3);else(_0x4a58c9[_0x254969(0x85)]['endsWith']('.yml')||_0x4a58c9[_0x254969(0x85)][_0x254969(0x93)](_0x254969(0x92)))&&_0x2e6832[_0x254969(0x95)](_0x382eb3);}}return _0x295e76(_0x1a1bfc),_0x2e6832;}export function discoverYamlFiles(_0x39c882){const _0x62dfa=a95_0x1a77,_0x548a86=findYamlFiles(_0x39c882);return _0x548a86[_0x62dfa(0x8b)](_0x2c6e7c=>{const _0x36bfee=_0x62dfa,_0xf8de74=a95_0x3fa655[_0x36bfee(0x98)](_0x39c882,_0x2c6e7c),_0x45cbc1=a95_0x3fa655[_0x36bfee(0x97)](_0xf8de74);return{'absolutePath':_0x2c6e7c,'relativePath':_0xf8de74,'folderPath':_0x45cbc1==='.'?'':_0x45cbc1};});}function a95_0x1a77(_0x426ce6,_0x1aca17){_0x426ce6=_0x426ce6-0x84;const _0x2ec297=a95_0x2ec2();let _0x1a7724=_0x2ec297[_0x426ce6];return _0x1a7724;}export function isYamlFile(_0x2df069){const _0x59061a=a95_0x1a77;try{const _0x2f48ee=statSync(_0x2df069);if(!_0x2f48ee[_0x59061a(0x8f)]())return![];const _0x4a22a1=a95_0x3fa655['extname'](_0x2df069)[_0x59061a(0x94)]();return _0x4a22a1===_0x59061a(0x8a)||_0x4a22a1===_0x59061a(0x92);}catch{return![];}}function a95_0x2ec2(){const _0x372d49=['2806veZcpt','join','.yml','map','1230588hENDgh','9255155UekEVX','12xZWBEQ','isFile','45xiPbEa','201760Ufpbki','.yaml','endsWith','toLowerCase','push','1596BeeoGl','dirname','relative','252176XngAKd','name','6165590SiPNBg','1572055fLASDu'];a95_0x2ec2=function(){return _0x372d49;};return a95_0x2ec2();}
@@ -1 +1 @@
1
- function a95_0x4e7a(){const _0xacb63a=['reentry','8SvcnXg','versions','map','version','launched','notification','conditions','set','connection','steps','isArray','branches','replace','endsWith','startsWith','342372sSNxsZ','versionNumber','nameMapping','bundle_id','connector_config','name','schedule','push','condition','from','30PRXDZh','activation','journeys','columns','with','state','goal','slice','yaml','344824EIJHQv','.yaml','120445ZppPbr','all_columns','journey','entry_criteria','.yml','attributes','get','83919vzyyGD','42xLLVoG','merged','decision_point','match','keys','rule','description','behavior','entries','has','journeyBundleName','find','version_number','join','toLowerCase','1694STRpbI','bundle_name','activation_template_id','length','index','sort','23ndtJIG','segment','681264ClPHpp','type','segments','latest','include','item','object','stages','stringify','exit_criteria','643555UaRIug','string'];a95_0x4e7a=function(){return _0xacb63a;};return a95_0x4e7a();}(function(_0x187e40,_0x1cf7a3){const _0x5eb0f7=a95_0x3fa3,_0x30464f=_0x187e40();while(!![]){try{const _0x4fddd4=parseInt(_0x5eb0f7(0x10f))/0x1*(parseInt(_0x5eb0f7(0x109))/0x2)+-parseInt(_0x5eb0f7(0xf9))/0x3*(-parseInt(_0x5eb0f7(0x11e))/0x4)+parseInt(_0x5eb0f7(0xf2))/0x5+parseInt(_0x5eb0f7(0xdd))/0x6+parseInt(_0x5eb0f7(0xfa))/0x7*(-parseInt(_0x5eb0f7(0xf0))/0x8)+parseInt(_0x5eb0f7(0x111))/0x9+parseInt(_0x5eb0f7(0xe7))/0xa*(parseInt(_0x5eb0f7(0x11b))/0xb);if(_0x4fddd4===_0x1cf7a3)break;else _0x30464f['push'](_0x30464f['shift']());}catch(_0x58046b){_0x30464f['push'](_0x30464f['shift']());}}}(a95_0x4e7a,0x246b3));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;function a95_0x3fa3(_0x36fb80,_0x1cf871){_0x36fb80=_0x36fb80-0xd0;const _0x4e7af9=a95_0x4e7a();let _0x3fa3fd=_0x4e7af9[_0x36fb80];return _0x3fa3fd;}const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x12cf1e){const _0x457ccd=a95_0x3fa3;return _0x12cf1e[_0x457ccd(0x108)]()[_0x457ccd(0xda)](/\s+/g,'_')[_0x457ccd(0xda)](/[^a-z0-9_]/g,'')[_0x457ccd(0xda)](/_+/g,'_')[_0x457ccd(0xda)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x41447a){const _0x35ea55=a95_0x3fa3,_0x5adcb6=_0x41447a[_0x35ea55(0xfd)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x5adcb6){const _0x2d3fc7=_0x5adcb6[0x1][_0x35ea55(0x108)](),_0xbfa73a=_0x5adcb6[0x2],_0xb37cbd=_0xbfa73a[_0x35ea55(0xda)](/-/g,'')[_0x35ea55(0xee)](0x0,0x4)[_0x35ea55(0x108)]();return _0x2d3fc7+'_'+_0xb37cbd;}const _0xb05242=_0x41447a[_0x35ea55(0xfd)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0xb05242){const _0x4a787e=_0xb05242[0x1],_0x46a83d=_0xb05242[0x2][_0x35ea55(0x108)](),_0x31e40c=_0x4a787e[_0x35ea55(0xda)](/-/g,'')[_0x35ea55(0xee)](0x0,0x4)[_0x35ea55(0x108)]();return _0x46a83d+'_'+_0x31e40c;}return undefined;}function stableStringify(_0x26f3a3){const _0x17c6cc=a95_0x3fa3;if(Array[_0x17c6cc(0xd8)](_0x26f3a3))return'['+_0x26f3a3['map'](_0x5adad6=>stableStringify(_0x5adad6))[_0x17c6cc(0x107)](',')+']';if(_0x26f3a3&&typeof _0x26f3a3===_0x17c6cc(0x117)){const _0x5c46ce=_0x26f3a3,_0x53feca=Object['keys'](_0x5c46ce)[_0x17c6cc(0x10e)](),_0x1f9fb3=_0x53feca[_0x17c6cc(0xd0)](_0x48fec6=>'\x22'+_0x48fec6+'\x22:'+stableStringify(_0x5c46ce[_0x48fec6]));return'{'+_0x1f9fb3[_0x17c6cc(0x107)](',')+'}';}const _0x19a8e5=JSON[_0x17c6cc(0x119)](_0x26f3a3);return _0x19a8e5===undefined?'null':_0x19a8e5;}export function consolidateActivationsByContent(_0x211a55){const _0x3ff3ba=a95_0x3fa3,_0x529589={},_0x32b89a=new Map(),_0xcfa83d=new Map();for(const _0x46ac32 of _0x211a55){if(!_0x46ac32)continue;for(const [_0x4c872b,_0x2640cc]of Object['entries'](_0x46ac32)){const _0x26fefa={'connection':_0x2640cc[_0x3ff3ba(0xd6)],..._0x2640cc['all_columns']!==undefined&&{'all_columns':_0x2640cc[_0x3ff3ba(0xf3)]},..._0x2640cc[_0x3ff3ba(0xea)]!==undefined&&{'columns':_0x2640cc[_0x3ff3ba(0xea)]},..._0x2640cc[_0x3ff3ba(0x101)]!==undefined&&{'behavior':_0x2640cc['behavior']},..._0x2640cc[_0x3ff3ba(0xe3)]!==undefined&&{'schedule':_0x2640cc[_0x3ff3ba(0xe3)]},..._0x2640cc[_0x3ff3ba(0xd3)]!==undefined&&{'notification':_0x2640cc['notification']},..._0x2640cc['connector_config']!==undefined&&{'connector_config':_0x2640cc[_0x3ff3ba(0xe1)]},..._0x2640cc[_0x3ff3ba(0x10b)]!==undefined&&{'activation_template_id':_0x2640cc[_0x3ff3ba(0x10b)]}},_0x29db6=stableStringify(_0x26fefa),_0x5f4217=_0xcfa83d[_0x3ff3ba(0xf8)](_0x29db6);_0x5f4217?_0x32b89a[_0x3ff3ba(0xd5)](_0x4c872b,_0x5f4217):(_0x529589[_0x4c872b]=_0x2640cc,_0x32b89a[_0x3ff3ba(0xd5)](_0x4c872b,_0x4c872b),_0xcfa83d['set'](_0x29db6,_0x4c872b));}}return{'merged':_0x529589,'nameMapping':_0x32b89a};}export function updateActivationReferences(_0x413342,_0x2fe506){const _0x5ecac2=a95_0x3fa3;if(!_0x413342)return;for(const _0xb1501a of _0x413342){if(!_0xb1501a[_0x5ecac2(0xd7)])continue;for(const _0x2dd450 of _0xb1501a['steps']){if(_0x2dd450[_0x5ecac2(0x112)]===_0x5ecac2(0xe8)&&_0x2dd450[_0x5ecac2(0xeb)]?.['activation']){const _0xdda336=_0x2fe506[_0x5ecac2(0xf8)](_0x2dd450[_0x5ecac2(0xeb)][_0x5ecac2(0xe8)]);_0xdda336&&_0xdda336!==_0x2dd450['with']['activation']&&(_0x2dd450['with'][_0x5ecac2(0xe8)]=_0xdda336);}}}}export function consolidateSegmentsByContent(_0x403ad8,_0x23df3c){const _0x433c13=a95_0x3fa3,_0x403514={},_0x5a23e0=new Map(),_0x8175ec=new Map();for(const _0x18347d of _0x403ad8){if(!_0x18347d)continue;for(const [_0x77e430,_0x507542]of Object['entries'](_0x18347d)){if(!_0x507542[_0x433c13(0xff)]){_0x403514[_0x77e430]=_0x507542,_0x5a23e0[_0x433c13(0xd5)](_0x77e430,_0x77e430);continue;}const _0x2737b5=_0x507542[_0x433c13(0x100)]&&_0x507542[_0x433c13(0x100)]['trim']()?_0x507542[_0x433c13(0x100)]:undefined,_0x502c8a=JSON['stringify']({'description':_0x2737b5,'rule':deepSortObject(_0x507542['rule'])}),_0x236d22=_0x8175ec[_0x433c13(0xf8)](_0x502c8a);if(_0x236d22){const _0x164f4d={..._0x507542[_0x433c13(0x100)]!==undefined&&{'description':_0x507542[_0x433c13(0x100)]},'rule':_0x507542[_0x433c13(0xff)]?deepSortObject(_0x507542[_0x433c13(0xff)]):_0x507542[_0x433c13(0xff)]};if(_0x77e430<_0x236d22){_0x403514[_0x77e430]=_0x164f4d,delete _0x403514[_0x236d22];for(const [_0x4d7d94,_0x34bed7]of _0x5a23e0[_0x433c13(0x102)]()){_0x34bed7===_0x236d22&&_0x5a23e0['set'](_0x4d7d94,_0x77e430);}_0x5a23e0[_0x433c13(0xd5)](_0x77e430,_0x77e430),_0x8175ec[_0x433c13(0xd5)](_0x502c8a,_0x77e430);}else _0x403514[_0x236d22]=_0x164f4d,_0x5a23e0[_0x433c13(0xd5)](_0x77e430,_0x236d22);}else{let _0x50801d=_0x77e430;if(_0x23df3c){const _0x3cf0a2=_0x23df3c[_0x433c13(0xf8)](_0x502c8a);_0x3cf0a2&&_0x3cf0a2[_0x433c13(0x10c)]>0x0&&(_0x50801d=_0x3cf0a2['slice']()[_0x433c13(0x10e)]()[0x0]);}const _0x35d0b0={..._0x507542[_0x433c13(0x100)]!==undefined&&{'description':_0x507542[_0x433c13(0x100)]},'rule':_0x507542['rule']?deepSortObject(_0x507542[_0x433c13(0xff)]):_0x507542[_0x433c13(0xff)]};_0x403514[_0x50801d]=_0x35d0b0,_0x5a23e0[_0x433c13(0xd5)](_0x77e430,_0x50801d),_0x8175ec[_0x433c13(0xd5)](_0x502c8a,_0x50801d);}}}return{'merged':_0x403514,'nameMapping':_0x5a23e0};}export function updateSegmentReferences(_0x3fefb6,_0x5e9b65){const _0x180c88=a95_0x3fa3;if(!_0x3fefb6)return;for(const _0x415200 of _0x3fefb6){if(_0x415200[_0x180c88(0xf5)]?.[_0x180c88(0x110)]){const _0x236f6e=_0x5e9b65[_0x180c88(0xf8)](_0x415200['entry_criteria'][_0x180c88(0x110)]);_0x236f6e&&(_0x415200[_0x180c88(0xf5)][_0x180c88(0x110)]=_0x236f6e);}if(_0x415200[_0x180c88(0xd7)])for(const _0x409618 of _0x415200[_0x180c88(0xd7)]){if(_0x409618[_0x180c88(0x112)]===_0x180c88(0xfc)&&_0x409618[_0x180c88(0xeb)]?.[_0x180c88(0xd9)])for(const _0xcd6a0c of _0x409618[_0x180c88(0xeb)]['branches']){if(_0xcd6a0c[_0x180c88(0x110)]){const _0x258e89=_0x5e9b65['get'](_0xcd6a0c[_0x180c88(0x110)]);_0x258e89&&(_0xcd6a0c[_0x180c88(0x110)]=_0x258e89);}}}}}export function updateSegmentRefsInSegments(_0x2300e0,_0x4c1ba5){const _0x1e71bc=a95_0x3fa3;for(const _0x4b3d04 of Object['values'](_0x2300e0)){_0x4b3d04[_0x1e71bc(0xff)]&&updateSegmentRefsInRule(_0x4b3d04[_0x1e71bc(0xff)],_0x4c1ba5);}}function updateSegmentRefsInRule(_0x250b60,_0x529d0a){const _0x62979a=a95_0x3fa3;if(_0x250b60===null||typeof _0x250b60!==_0x62979a(0x117))return;if(Array[_0x62979a(0xd8)](_0x250b60)){for(const _0x5433dc of _0x250b60){updateSegmentRefsInRule(_0x5433dc,_0x529d0a);}return;}const _0x5c661e=_0x250b60;if((_0x5c661e[_0x62979a(0x112)]===_0x62979a(0x115)||_0x5c661e[_0x62979a(0x112)]==='exclude')&&typeof _0x5c661e[_0x62979a(0x110)]===_0x62979a(0x11c)){const _0x3051cf=_0x529d0a['get'](_0x5c661e['segment']);_0x3051cf&&(_0x5c661e[_0x62979a(0x110)]=_0x3051cf);}if(_0x5c661e[_0x62979a(0xd4)]&&Array['isArray'](_0x5c661e['conditions']))for(const _0x5f4861 of _0x5c661e['conditions']){updateSegmentRefsInRule(_0x5f4861,_0x529d0a);}}export function buildJourneysArray(_0x4a9018){const _0x296c76=a95_0x3fa3,_0x7ea0f9=Math['max'](..._0x4a9018[_0x296c76(0xd0)](_0x2a1cdb=>_0x2a1cdb['item'][_0x296c76(0xde)]||0x0));return _0x4a9018[_0x296c76(0xd0)](_0x533cd6=>{const _0x516149=_0x296c76,_0x22ef2f=(_0x533cd6['item']['versionNumber']||0x0)===_0x7ea0f9,_0x1efce5=_0x533cd6[_0x516149(0xef)][_0x516149(0xe9)]?.[0x0],_0x5de9f6={'version':_0x1efce5?.[_0x516149(0xd1)]||_0x533cd6[_0x516149(0xef)][_0x516149(0xd1)]||_0x533cd6[_0x516149(0x116)]['name'],'state':_0x533cd6[_0x516149(0x116)][_0x516149(0xec)]==='launched'?_0x516149(0xd2):'draft','stages':_0x1efce5?.[_0x516149(0x118)]||_0x533cd6[_0x516149(0xef)][_0x516149(0x118)]||[],'id':_0x1efce5?.['id']||_0x533cd6[_0x516149(0xef)]['id'],'version_number':_0x1efce5?.[_0x516149(0x106)]||_0x533cd6[_0x516149(0xef)][_0x516149(0x106)]};return _0x22ef2f&&(_0x5de9f6[_0x516149(0x114)]=!![]),_0x5de9f6;});}export function buildMergedJourneyDef(_0x259ba8,_0xd8dcbf){const _0x125f8a=a95_0x3fa3,_0x540e50=_0x259ba8[0x0][_0x125f8a(0xef)],_0x567928=buildJourneysArray(_0x259ba8),{merged:_0x457543,nameMapping:_0x3987d1}=consolidateSegmentsByContent(_0x259ba8['map'](_0x6202aa=>_0x6202aa[_0x125f8a(0xef)][_0x125f8a(0x113)]),_0xd8dcbf);updateSegmentRefsInSegments(_0x457543,_0x3987d1);const _0x58313e=Array[_0x125f8a(0xe6)](_0x3987d1[_0x125f8a(0x102)]())['some'](([_0x362b15,_0x405d97])=>_0x362b15!==_0x405d97&&_0x362b15[_0x125f8a(0xdc)]('entry_criteria'));let _0x15ae5a=_0x457543,_0x574634=new Map();if(_0x58313e){const _0x45323b=consolidateSegmentsByContent([_0x457543],_0xd8dcbf);_0x15ae5a=_0x45323b[_0x125f8a(0xfb)],_0x574634=_0x45323b[_0x125f8a(0xdf)];}const _0x28c41e=new Map(_0x3987d1);for(const [_0x228aa1,_0x3f5e66]of _0x574634[_0x125f8a(0x102)]()){_0x28c41e[_0x125f8a(0xd5)](_0x228aa1,_0x3f5e66);}for(const [_0x18888b,_0x58a296]of _0x28c41e[_0x125f8a(0x102)]()){let _0x1d477c=_0x58a296,_0x211b22=0x0;while(_0x28c41e[_0x125f8a(0x103)](_0x1d477c)&&_0x28c41e[_0x125f8a(0xf8)](_0x1d477c)!==_0x1d477c&&_0x211b22<MAX_MAPPING_CHAIN_DEPTH){_0x1d477c=_0x28c41e[_0x125f8a(0xf8)](_0x1d477c),_0x211b22++;}_0x1d477c!==_0x58a296&&_0x28c41e[_0x125f8a(0xd5)](_0x18888b,_0x1d477c);}for(const _0x3d4ed9 of _0x567928){updateSegmentReferences(_0x3d4ed9[_0x125f8a(0x118)],_0x28c41e);}const {merged:_0x45763b,nameMapping:_0x6fc408}=consolidateActivationsByContent(_0x259ba8[_0x125f8a(0xd0)](_0xe909b1=>_0xe909b1[_0x125f8a(0xef)]['activations']));for(const _0x58c96f of _0x567928){updateActivationReferences(_0x58c96f[_0x125f8a(0x118)],_0x6fc408);}let _0xcaeb20=_0x540e50['goal'];if(_0xcaeb20?.[_0x125f8a(0x110)]){const _0x41ccff=_0x28c41e[_0x125f8a(0xf8)](_0xcaeb20['segment']);_0x41ccff&&(_0xcaeb20={..._0xcaeb20,'segment':_0x41ccff});}for(const _0x439be4 of _0x567928){if(_0x439be4[_0x125f8a(0xed)]?.[_0x125f8a(0x110)]){const _0x1cc838=_0x28c41e[_0x125f8a(0xf8)](_0x439be4[_0x125f8a(0xed)][_0x125f8a(0x110)]);_0x1cc838&&(_0x439be4[_0x125f8a(0xed)]={..._0x439be4['goal'],'segment':_0x1cc838});}}return{'type':_0x125f8a(0xf4),'name':_0x540e50[_0x125f8a(0xe2)],'description':_0x540e50['description'],'goal':_0xcaeb20,'reentry':_0x540e50[_0x125f8a(0x11d)],'segments':Object[_0x125f8a(0xfe)](_0x15ae5a)[_0x125f8a(0x10c)]>0x0?_0x15ae5a:undefined,'activations':Object[_0x125f8a(0xfe)](_0x45763b)[_0x125f8a(0x10c)]>0x0?_0x45763b:undefined,'journeys':_0x567928,'bundle_id':_0x540e50[_0x125f8a(0xe0)],'bundle_name':_0x540e50[_0x125f8a(0x10a)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x42345f,_0xc741a0,_0x4df587,_0x19cddd){const _0x184548=a95_0x3fa3,_0x4e00fb=_0x42345f+':'+_0xc741a0,_0xd0459b=_0x4df587[_0x184548(0xf8)](_0x4e00fb);if(_0xd0459b)return _0xd0459b;const _0x1edcf8=await _0x19cddd(_0x42345f),_0x143cee=_0x1edcf8[_0x184548(0xf7)][_0x184548(0x104)]||_0x1edcf8[_0x184548(0xf7)][_0x184548(0xe2)],_0x1be797=_0x1edcf8[_0x184548(0xf7)]['journeyStages'][_0x184548(0x105)](_0x2c8c4f=>String(_0x2c8c4f['id'])===String(_0xc741a0)),_0x2517c0=_0x1be797?.[_0x184548(0xe2)]||_0xc741a0,_0x4360ad={'journeyName':_0x143cee,'stageName':_0x2517c0};return _0x4df587[_0x184548(0xd5)](_0x4e00fb,_0x4360ad),_0x4360ad;}export function formatApiJourneyName(_0x3dd1d1,_0x29db81){return _0x29db81+'\x20('+_0x3dd1d1+')';}export function isLocalJourneyRef(_0x6483bd){const _0x431043=a95_0x3fa3;return _0x6483bd[_0x431043(0xdb)](_0x431043(0xf6))||_0x6483bd[_0x431043(0xdb)](_0x431043(0xf1));}export function buildLocalRuleToNameMapping(_0x3a1842){const _0x9aec88=a95_0x3fa3,_0x72682e=new Map();if(!_0x3a1842)return _0x72682e;for(const [_0x497568,_0x274a95]of Object[_0x9aec88(0x102)](_0x3a1842)){if(_0x274a95['rule']){const _0x544074=serializeRule(_0x274a95['rule']),_0x4a9c20=_0x72682e[_0x9aec88(0xf8)](_0x544074)||[];_0x4a9c20[_0x9aec88(0xe4)](_0x497568),_0x72682e['set'](_0x544074,_0x4a9c20);}}return _0x72682e;}export function buildLocalRuleToNameMappingFromJourney(_0x866aec){const _0x2d5e96=a95_0x3fa3,_0xe8c2d4=_0x866aec['segments'];if(!_0xe8c2d4)return new Map();const _0x554b5e=collectSegmentUsageCounts(_0x866aec),_0x23ad9c=new Map();let _0x28b30f=0x0;for(const [_0x29929c,_0xf74fe0]of Object[_0x2d5e96(0x102)](_0xe8c2d4)){if(!_0xf74fe0[_0x2d5e96(0xff)]){_0x28b30f++;continue;}const _0x53797c=serializeRule(_0xf74fe0[_0x2d5e96(0xff)]),_0x5bf16f=_0x23ad9c[_0x2d5e96(0xf8)](_0x53797c)||[];_0x5bf16f[_0x2d5e96(0xe4)]({'name':_0x29929c,'index':_0x28b30f}),_0x23ad9c['set'](_0x53797c,_0x5bf16f),_0x28b30f++;}const _0x3e0da9=new Map();for(const [_0x945757,_0x1e96a1]of _0x23ad9c){const _0x1631da=_0x1e96a1['slice']()['sort']((_0x749f29,_0x4bf904)=>{const _0x375ae7=_0x2d5e96,_0x2a410a=_0x554b5e[_0x375ae7(0xf8)](_0x749f29['name'])||0x0,_0x907c87=_0x554b5e[_0x375ae7(0xf8)](_0x4bf904[_0x375ae7(0xe2)])||0x0;if(_0x2a410a!==_0x907c87)return _0x907c87-_0x2a410a;return _0x749f29['index']-_0x4bf904[_0x375ae7(0x10d)];})[_0x2d5e96(0xd0)](_0x4fabc4=>_0x4fabc4['name']);_0x3e0da9[_0x2d5e96(0xd5)](_0x945757,_0x1631da);}return _0x3e0da9;}export function collectSegmentUsageCounts(_0x3ed012){const _0x50a39c=a95_0x3fa3,_0x4cc0e9=new Map(),_0x357352=_0x162602=>{const _0x3751a8=a95_0x3fa3;if(!_0x162602)return;_0x4cc0e9[_0x3751a8(0xd5)](_0x162602,(_0x4cc0e9[_0x3751a8(0xf8)](_0x162602)||0x0)+0x1);},_0xa0ecc6=_0x2e3bd6=>{const _0x363423=a95_0x3fa3;for(const _0x1a28bc of _0x2e3bd6){_0x357352(_0x1a28bc[_0x363423(0xf5)]?.['segment']);if(_0x1a28bc[_0x363423(0x11a)])for(const _0x1765ba of _0x1a28bc[_0x363423(0x11a)]){_0x357352(_0x1765ba[_0x363423(0x110)]);}_0x357352(_0x1a28bc['milestone']?.[_0x363423(0x110)]);if(_0x1a28bc[_0x363423(0xd7)])for(const _0xa9bf1a of _0x1a28bc[_0x363423(0xd7)]){if(_0xa9bf1a[_0x363423(0x112)]===_0x363423(0xfc))for(const _0x47a26e of _0xa9bf1a[_0x363423(0xeb)][_0x363423(0xd9)]){_0x357352(_0x47a26e[_0x363423(0x110)]);}else _0xa9bf1a[_0x363423(0x112)]==='wait'&&_0x357352(_0xa9bf1a[_0x363423(0xeb)][_0x363423(0xe5)]?.['segment']);}}};_0x357352(_0x3ed012[_0x50a39c(0xed)]?.[_0x50a39c(0x110)]);if(_0x3ed012[_0x50a39c(0xe9)])for(const _0x4bc075 of _0x3ed012[_0x50a39c(0xe9)]){_0x357352(_0x4bc075[_0x50a39c(0xed)]?.[_0x50a39c(0x110)]),_0xa0ecc6(_0x4bc075[_0x50a39c(0x118)]);}_0x3ed012[_0x50a39c(0x118)]&&_0xa0ecc6(_0x3ed012[_0x50a39c(0x118)]);if(_0x3ed012['versions'])for(const _0x37e8da of _0x3ed012[_0x50a39c(0x11f)]){_0xa0ecc6(_0x37e8da[_0x50a39c(0x118)]);}return _0x4cc0e9;}
1
+ (function(_0x28fd3a,_0x409504){const _0x51ff7b=a96_0x1b8a,_0x2a2a46=_0x28fd3a();while(!![]){try{const _0x2ae908=parseInt(_0x51ff7b(0x13c))/0x1*(parseInt(_0x51ff7b(0x156))/0x2)+parseInt(_0x51ff7b(0x15b))/0x3*(-parseInt(_0x51ff7b(0x17d))/0x4)+-parseInt(_0x51ff7b(0x13d))/0x5*(-parseInt(_0x51ff7b(0x179))/0x6)+parseInt(_0x51ff7b(0x14c))/0x7*(-parseInt(_0x51ff7b(0x15a))/0x8)+parseInt(_0x51ff7b(0x178))/0x9*(-parseInt(_0x51ff7b(0x15e))/0xa)+parseInt(_0x51ff7b(0x169))/0xb*(-parseInt(_0x51ff7b(0x164))/0xc)+-parseInt(_0x51ff7b(0x170))/0xd*(-parseInt(_0x51ff7b(0x144))/0xe);if(_0x2ae908===_0x409504)break;else _0x2a2a46['push'](_0x2a2a46['shift']());}catch(_0x226966){_0x2a2a46['push'](_0x2a2a46['shift']());}}}(a96_0x3065,0xb9d16));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x115f8c){const _0xa91747=a96_0x1b8a;return _0x115f8c['toLowerCase']()[_0xa91747(0x12f)](/\s+/g,'_')['replace'](/[^a-z0-9_]/g,'')[_0xa91747(0x12f)](/_+/g,'_')[_0xa91747(0x12f)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x4caeca){const _0x400281=a96_0x1b8a,_0x2bab46=_0x4caeca[_0x400281(0x13e)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x2bab46){const _0x55e8f1=_0x2bab46[0x1][_0x400281(0x130)](),_0x264d8e=_0x2bab46[0x2],_0x2f7cf8=_0x264d8e[_0x400281(0x12f)](/-/g,'')['slice'](0x0,0x4)['toLowerCase']();return _0x55e8f1+'_'+_0x2f7cf8;}const _0x10458c=_0x4caeca['match'](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x10458c){const _0x4adeaf=_0x10458c[0x1],_0xa3cb52=_0x10458c[0x2]['toLowerCase'](),_0x24e275=_0x4adeaf[_0x400281(0x12f)](/-/g,'')[_0x400281(0x17c)](0x0,0x4)['toLowerCase']();return _0xa3cb52+'_'+_0x24e275;}return undefined;}function stableStringify(_0x523276){const _0x1d0916=a96_0x1b8a;if(Array[_0x1d0916(0x163)](_0x523276))return'['+_0x523276[_0x1d0916(0x14f)](_0x1c0eb9=>stableStringify(_0x1c0eb9))[_0x1d0916(0x16b)](',')+']';if(_0x523276&&typeof _0x523276==='object'){const _0x50a3ce=_0x523276,_0x1cfe12=Object['keys'](_0x50a3ce)[_0x1d0916(0x177)](),_0x4f0040=_0x1cfe12['map'](_0x5aad86=>'\x22'+_0x5aad86+'\x22:'+stableStringify(_0x50a3ce[_0x5aad86]));return'{'+_0x4f0040['join'](',')+'}';}const _0xadc4ce=JSON['stringify'](_0x523276);return _0xadc4ce===undefined?'null':_0xadc4ce;}export function consolidateActivationsByContent(_0x43eadb){const _0x7a1e0a=a96_0x1b8a,_0x51a497={},_0x373803=new Map(),_0x106be4=new Map();for(const _0x47e9f3 of _0x43eadb){if(!_0x47e9f3)continue;for(const [_0x25e9d3,_0x230a0a]of Object['entries'](_0x47e9f3)){const _0x5810a8={'connection':_0x230a0a[_0x7a1e0a(0x147)],..._0x230a0a[_0x7a1e0a(0x165)]!==undefined&&{'all_columns':_0x230a0a[_0x7a1e0a(0x165)]},..._0x230a0a['columns']!==undefined&&{'columns':_0x230a0a['columns']},..._0x230a0a[_0x7a1e0a(0x14d)]!==undefined&&{'behavior':_0x230a0a[_0x7a1e0a(0x14d)]},..._0x230a0a[_0x7a1e0a(0x149)]!==undefined&&{'schedule':_0x230a0a[_0x7a1e0a(0x149)]},..._0x230a0a[_0x7a1e0a(0x173)]!==undefined&&{'notification':_0x230a0a[_0x7a1e0a(0x173)]},..._0x230a0a[_0x7a1e0a(0x157)]!==undefined&&{'connector_config':_0x230a0a[_0x7a1e0a(0x157)]},..._0x230a0a[_0x7a1e0a(0x160)]!==undefined&&{'activation_template_id':_0x230a0a[_0x7a1e0a(0x160)]}},_0xdeeb7b=stableStringify(_0x5810a8),_0x584baf=_0x106be4[_0x7a1e0a(0x167)](_0xdeeb7b);_0x584baf?_0x373803[_0x7a1e0a(0x15d)](_0x25e9d3,_0x584baf):(_0x51a497[_0x25e9d3]=_0x230a0a,_0x373803[_0x7a1e0a(0x15d)](_0x25e9d3,_0x25e9d3),_0x106be4['set'](_0xdeeb7b,_0x25e9d3));}}return{'merged':_0x51a497,'nameMapping':_0x373803};}export function updateActivationReferences(_0x56e66e,_0x42f84d){const _0x44f89e=a96_0x1b8a;if(!_0x56e66e)return;for(const _0x4ad75e of _0x56e66e){if(!_0x4ad75e['steps'])continue;for(const _0x73b5ef of _0x4ad75e[_0x44f89e(0x15c)]){if(_0x73b5ef[_0x44f89e(0x166)]===_0x44f89e(0x172)&&_0x73b5ef[_0x44f89e(0x16f)]?.['activation']){const _0xc22835=_0x42f84d[_0x44f89e(0x167)](_0x73b5ef['with']['activation']);_0xc22835&&_0xc22835!==_0x73b5ef[_0x44f89e(0x16f)]['activation']&&(_0x73b5ef[_0x44f89e(0x16f)][_0x44f89e(0x172)]=_0xc22835);}}}}export function consolidateSegmentsByContent(_0x3ac547,_0x77a087){const _0x3f1e6f=a96_0x1b8a,_0x476d3d={},_0x361eb2=new Map(),_0x56f99a=new Map();for(const _0x2a844d of _0x3ac547){if(!_0x2a844d)continue;for(const [_0x5875aa,_0x7c31c1]of Object[_0x3f1e6f(0x138)](_0x2a844d)){if(!_0x7c31c1['rule']){_0x476d3d[_0x5875aa]=_0x7c31c1,_0x361eb2['set'](_0x5875aa,_0x5875aa);continue;}const _0x271431=_0x7c31c1[_0x3f1e6f(0x140)]&&_0x7c31c1[_0x3f1e6f(0x140)]['trim']()?_0x7c31c1[_0x3f1e6f(0x140)]:undefined,_0x15ba42=JSON[_0x3f1e6f(0x134)]({'description':_0x271431,'rule':deepSortObject(_0x7c31c1['rule'])}),_0x44c463=_0x56f99a[_0x3f1e6f(0x167)](_0x15ba42);if(_0x44c463){const _0x2b4e07={..._0x7c31c1[_0x3f1e6f(0x140)]!==undefined&&{'description':_0x7c31c1['description']},'rule':_0x7c31c1[_0x3f1e6f(0x13b)]?deepSortObject(_0x7c31c1[_0x3f1e6f(0x13b)]):_0x7c31c1['rule']};if(_0x5875aa<_0x44c463){_0x476d3d[_0x5875aa]=_0x2b4e07,delete _0x476d3d[_0x44c463];for(const [_0x30bafb,_0x4515e6]of _0x361eb2[_0x3f1e6f(0x138)]()){_0x4515e6===_0x44c463&&_0x361eb2[_0x3f1e6f(0x15d)](_0x30bafb,_0x5875aa);}_0x361eb2['set'](_0x5875aa,_0x5875aa),_0x56f99a[_0x3f1e6f(0x15d)](_0x15ba42,_0x5875aa);}else _0x476d3d[_0x44c463]=_0x2b4e07,_0x361eb2[_0x3f1e6f(0x15d)](_0x5875aa,_0x44c463);}else{let _0x1de3c3=_0x5875aa;if(_0x77a087){const _0x560bc5=_0x77a087[_0x3f1e6f(0x167)](_0x15ba42);_0x560bc5&&_0x560bc5[_0x3f1e6f(0x17b)]>0x0&&(_0x1de3c3=_0x560bc5[_0x3f1e6f(0x17c)]()[_0x3f1e6f(0x177)]()[0x0]);}const _0x55fe02={..._0x7c31c1[_0x3f1e6f(0x140)]!==undefined&&{'description':_0x7c31c1['description']},'rule':_0x7c31c1[_0x3f1e6f(0x13b)]?deepSortObject(_0x7c31c1[_0x3f1e6f(0x13b)]):_0x7c31c1[_0x3f1e6f(0x13b)]};_0x476d3d[_0x1de3c3]=_0x55fe02,_0x361eb2[_0x3f1e6f(0x15d)](_0x5875aa,_0x1de3c3),_0x56f99a[_0x3f1e6f(0x15d)](_0x15ba42,_0x1de3c3);}}}return{'merged':_0x476d3d,'nameMapping':_0x361eb2};}export function updateSegmentReferences(_0x414a34,_0x480b3e){const _0x1f527b=a96_0x1b8a;if(!_0x414a34)return;for(const _0x573d61 of _0x414a34){if(_0x573d61[_0x1f527b(0x141)]?.[_0x1f527b(0x16a)]){const _0x479c0b=_0x480b3e[_0x1f527b(0x167)](_0x573d61[_0x1f527b(0x141)]['segment']);_0x479c0b&&(_0x573d61[_0x1f527b(0x141)][_0x1f527b(0x16a)]=_0x479c0b);}if(_0x573d61[_0x1f527b(0x15c)])for(const _0x339b21 of _0x573d61[_0x1f527b(0x15c)]){if(_0x339b21[_0x1f527b(0x166)]===_0x1f527b(0x17a)&&_0x339b21[_0x1f527b(0x16f)]?.[_0x1f527b(0x176)])for(const _0x3cedf6 of _0x339b21[_0x1f527b(0x16f)][_0x1f527b(0x176)]){if(_0x3cedf6[_0x1f527b(0x16a)]){const _0xf0803a=_0x480b3e[_0x1f527b(0x167)](_0x3cedf6[_0x1f527b(0x16a)]);_0xf0803a&&(_0x3cedf6[_0x1f527b(0x16a)]=_0xf0803a);}}}}}export function updateSegmentRefsInSegments(_0x462e1e,_0x577a21){const _0x20467c=a96_0x1b8a;for(const _0x490cc9 of Object['values'](_0x462e1e)){_0x490cc9['rule']&&updateSegmentRefsInRule(_0x490cc9[_0x20467c(0x13b)],_0x577a21);}}function a96_0x1b8a(_0x3f9d6c,_0x15325e){_0x3f9d6c=_0x3f9d6c-0x12f;const _0x306582=a96_0x3065();let _0x1b8a11=_0x306582[_0x3f9d6c];return _0x1b8a11;}function updateSegmentRefsInRule(_0x3e88de,_0x126f5e){const _0x212dc7=a96_0x1b8a;if(_0x3e88de===null||typeof _0x3e88de!==_0x212dc7(0x161))return;if(Array[_0x212dc7(0x163)](_0x3e88de)){for(const _0x203ea2 of _0x3e88de){updateSegmentRefsInRule(_0x203ea2,_0x126f5e);}return;}const _0x114294=_0x3e88de;if((_0x114294[_0x212dc7(0x166)]==='include'||_0x114294[_0x212dc7(0x166)]===_0x212dc7(0x16e))&&typeof _0x114294[_0x212dc7(0x16a)]==='string'){const _0x119006=_0x126f5e[_0x212dc7(0x167)](_0x114294[_0x212dc7(0x16a)]);_0x119006&&(_0x114294[_0x212dc7(0x16a)]=_0x119006);}if(_0x114294[_0x212dc7(0x158)]&&Array['isArray'](_0x114294[_0x212dc7(0x158)]))for(const _0x392600 of _0x114294[_0x212dc7(0x158)]){updateSegmentRefsInRule(_0x392600,_0x126f5e);}}export function buildJourneysArray(_0x3c1682){const _0x3e7149=a96_0x1b8a,_0x518250=Math[_0x3e7149(0x137)](..._0x3c1682[_0x3e7149(0x14f)](_0x47c784=>_0x47c784['item'][_0x3e7149(0x155)]||0x0));return _0x3c1682[_0x3e7149(0x14f)](_0x3a5f8e=>{const _0x3ad73d=_0x3e7149,_0x3bf8c3=(_0x3a5f8e[_0x3ad73d(0x152)][_0x3ad73d(0x155)]||0x0)===_0x518250,_0x1da90f=_0x3a5f8e[_0x3ad73d(0x148)][_0x3ad73d(0x132)]?.[0x0],_0x1ce22d={'version':_0x1da90f?.[_0x3ad73d(0x153)]||_0x3a5f8e[_0x3ad73d(0x148)]['version']||_0x3a5f8e[_0x3ad73d(0x152)][_0x3ad73d(0x159)],'state':_0x3a5f8e[_0x3ad73d(0x152)][_0x3ad73d(0x162)]===_0x3ad73d(0x135)?_0x3ad73d(0x135):_0x3ad73d(0x131),'stages':_0x1da90f?.['stages']||_0x3a5f8e[_0x3ad73d(0x148)][_0x3ad73d(0x15f)]||[],'id':_0x1da90f?.['id']||_0x3a5f8e[_0x3ad73d(0x148)]['id'],'version_number':_0x1da90f?.[_0x3ad73d(0x142)]||_0x3a5f8e[_0x3ad73d(0x148)][_0x3ad73d(0x142)]};return _0x3bf8c3&&(_0x1ce22d[_0x3ad73d(0x13f)]=!![]),_0x1ce22d;});}export function buildMergedJourneyDef(_0x57d1de,_0x2349d){const _0x200fc9=a96_0x1b8a,_0x2b0acc=_0x57d1de[0x0][_0x200fc9(0x148)],_0x58d47b=buildJourneysArray(_0x57d1de),{merged:_0x559fbb,nameMapping:_0x1ca0ea}=consolidateSegmentsByContent(_0x57d1de[_0x200fc9(0x14f)](_0x40fd6a=>_0x40fd6a['yaml'][_0x200fc9(0x14e)]),_0x2349d);updateSegmentRefsInSegments(_0x559fbb,_0x1ca0ea);const _0x3dd585=Array['from'](_0x1ca0ea['entries']())[_0x200fc9(0x16c)](([_0x247f73,_0x73d8ff])=>_0x247f73!==_0x73d8ff&&_0x247f73[_0x200fc9(0x133)](_0x200fc9(0x141)));let _0x456dfc=_0x559fbb,_0x1108c4=new Map();if(_0x3dd585){const _0x1622b1=consolidateSegmentsByContent([_0x559fbb],_0x2349d);_0x456dfc=_0x1622b1[_0x200fc9(0x143)],_0x1108c4=_0x1622b1['nameMapping'];}const _0x580037=new Map(_0x1ca0ea);for(const [_0x9fbc87,_0x403cf9]of _0x1108c4[_0x200fc9(0x138)]()){_0x580037[_0x200fc9(0x15d)](_0x9fbc87,_0x403cf9);}for(const [_0x564982,_0x1826bb]of _0x580037[_0x200fc9(0x138)]()){let _0x235d5e=_0x1826bb,_0x2e4541=0x0;while(_0x580037[_0x200fc9(0x146)](_0x235d5e)&&_0x580037[_0x200fc9(0x167)](_0x235d5e)!==_0x235d5e&&_0x2e4541<MAX_MAPPING_CHAIN_DEPTH){_0x235d5e=_0x580037[_0x200fc9(0x167)](_0x235d5e),_0x2e4541++;}_0x235d5e!==_0x1826bb&&_0x580037[_0x200fc9(0x15d)](_0x564982,_0x235d5e);}for(const _0x59737a of _0x58d47b){updateSegmentReferences(_0x59737a[_0x200fc9(0x15f)],_0x580037);}const {merged:_0x690565,nameMapping:_0x8346c1}=consolidateActivationsByContent(_0x57d1de[_0x200fc9(0x14f)](_0x503ca8=>_0x503ca8[_0x200fc9(0x148)][_0x200fc9(0x175)]));for(const _0x2bd367 of _0x58d47b){updateActivationReferences(_0x2bd367[_0x200fc9(0x15f)],_0x8346c1);}let _0x51447f=_0x2b0acc['goal'];if(_0x51447f?.[_0x200fc9(0x16a)]){const _0x4a25e6=_0x580037[_0x200fc9(0x167)](_0x51447f[_0x200fc9(0x16a)]);_0x4a25e6&&(_0x51447f={..._0x51447f,'segment':_0x4a25e6});}for(const _0x1941fd of _0x58d47b){if(_0x1941fd[_0x200fc9(0x139)]?.[_0x200fc9(0x16a)]){const _0x51da7c=_0x580037[_0x200fc9(0x167)](_0x1941fd[_0x200fc9(0x139)][_0x200fc9(0x16a)]);_0x51da7c&&(_0x1941fd[_0x200fc9(0x139)]={..._0x1941fd[_0x200fc9(0x139)],'segment':_0x51da7c});}}return{'type':'journey','name':_0x2b0acc[_0x200fc9(0x159)],'description':_0x2b0acc[_0x200fc9(0x140)],'goal':_0x51447f,'reentry':_0x2b0acc[_0x200fc9(0x14a)],'segments':Object['keys'](_0x456dfc)['length']>0x0?_0x456dfc:undefined,'activations':Object['keys'](_0x690565)[_0x200fc9(0x17b)]>0x0?_0x690565:undefined,'journeys':_0x58d47b,'bundle_id':_0x2b0acc[_0x200fc9(0x17f)],'bundle_name':_0x2b0acc[_0x200fc9(0x174)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x534dcd,_0x49d7bc,_0x21d72b,_0x25162a){const _0x21dd1c=a96_0x1b8a,_0x4f512a=_0x534dcd+':'+_0x49d7bc,_0x248706=_0x21d72b['get'](_0x4f512a);if(_0x248706)return _0x248706;const _0x421f12=await _0x25162a(_0x534dcd),_0x5ae1d8=_0x421f12['attributes'][_0x21dd1c(0x14b)]||_0x421f12[_0x21dd1c(0x13a)][_0x21dd1c(0x159)],_0x2cc4e2=_0x421f12['attributes'][_0x21dd1c(0x168)]['find'](_0xba9968=>String(_0xba9968['id'])===String(_0x49d7bc)),_0x4c0ee7=_0x2cc4e2?.[_0x21dd1c(0x159)]||_0x49d7bc,_0xed0312={'journeyName':_0x5ae1d8,'stageName':_0x4c0ee7};return _0x21d72b[_0x21dd1c(0x15d)](_0x4f512a,_0xed0312),_0xed0312;}export function formatApiJourneyName(_0x5ae1f3,_0x460e7f){return _0x460e7f+'\x20('+_0x5ae1f3+')';}export function isLocalJourneyRef(_0x11eb9d){const _0x32a293=a96_0x1b8a;return _0x11eb9d['endsWith'](_0x32a293(0x136))||_0x11eb9d['endsWith'](_0x32a293(0x150));}export function buildLocalRuleToNameMapping(_0x370333){const _0x5f51d8=a96_0x1b8a,_0x2d29d2=new Map();if(!_0x370333)return _0x2d29d2;for(const [_0x2d13d0,_0xb090f6]of Object[_0x5f51d8(0x138)](_0x370333)){if(_0xb090f6['rule']){const _0xac0f5e=serializeRule(_0xb090f6[_0x5f51d8(0x13b)]),_0x5dc908=_0x2d29d2['get'](_0xac0f5e)||[];_0x5dc908[_0x5f51d8(0x154)](_0x2d13d0),_0x2d29d2[_0x5f51d8(0x15d)](_0xac0f5e,_0x5dc908);}}return _0x2d29d2;}export function buildLocalRuleToNameMappingFromJourney(_0x4dec8d){const _0x4ea50c=a96_0x1b8a,_0x36310c=_0x4dec8d[_0x4ea50c(0x14e)];if(!_0x36310c)return new Map();const _0x2ff458=collectSegmentUsageCounts(_0x4dec8d),_0x575cda=new Map();let _0x266b80=0x0;for(const [_0x12984b,_0x2ede05]of Object[_0x4ea50c(0x138)](_0x36310c)){if(!_0x2ede05[_0x4ea50c(0x13b)]){_0x266b80++;continue;}const _0x255338=serializeRule(_0x2ede05['rule']),_0x2aa9df=_0x575cda['get'](_0x255338)||[];_0x2aa9df[_0x4ea50c(0x154)]({'name':_0x12984b,'index':_0x266b80}),_0x575cda[_0x4ea50c(0x15d)](_0x255338,_0x2aa9df),_0x266b80++;}const _0x459e86=new Map();for(const [_0x5c5e6d,_0xcc0edb]of _0x575cda){const _0x2a11a7=_0xcc0edb['slice']()[_0x4ea50c(0x177)]((_0x31575c,_0x48b8b5)=>{const _0x5416e1=_0x4ea50c,_0x533304=_0x2ff458[_0x5416e1(0x167)](_0x31575c['name'])||0x0,_0x3fe631=_0x2ff458[_0x5416e1(0x167)](_0x48b8b5['name'])||0x0;if(_0x533304!==_0x3fe631)return _0x3fe631-_0x533304;return _0x31575c[_0x5416e1(0x151)]-_0x48b8b5[_0x5416e1(0x151)];})[_0x4ea50c(0x14f)](_0x124436=>_0x124436[_0x4ea50c(0x159)]);_0x459e86[_0x4ea50c(0x15d)](_0x5c5e6d,_0x2a11a7);}return _0x459e86;}export function collectSegmentUsageCounts(_0x53ae74){const _0x2033a1=a96_0x1b8a,_0x4e1eb0=new Map(),_0x47a837=_0xe58856=>{const _0x116966=a96_0x1b8a;if(!_0xe58856)return;_0x4e1eb0[_0x116966(0x15d)](_0xe58856,(_0x4e1eb0['get'](_0xe58856)||0x0)+0x1);},_0x5ee83f=_0x295e9a=>{const _0x483c59=a96_0x1b8a;for(const _0x49e165 of _0x295e9a){_0x47a837(_0x49e165[_0x483c59(0x141)]?.['segment']);if(_0x49e165['exit_criteria'])for(const _0x1dca0c of _0x49e165[_0x483c59(0x17e)]){_0x47a837(_0x1dca0c['segment']);}_0x47a837(_0x49e165[_0x483c59(0x145)]?.['segment']);if(_0x49e165[_0x483c59(0x15c)])for(const _0x4bb8ad of _0x49e165['steps']){if(_0x4bb8ad[_0x483c59(0x166)]==='decision_point')for(const _0x1777b0 of _0x4bb8ad['with'][_0x483c59(0x176)]){_0x47a837(_0x1777b0[_0x483c59(0x16a)]);}else _0x4bb8ad[_0x483c59(0x166)]==='wait'&&_0x47a837(_0x4bb8ad[_0x483c59(0x16f)][_0x483c59(0x171)]?.['segment']);}}};_0x47a837(_0x53ae74[_0x2033a1(0x139)]?.[_0x2033a1(0x16a)]);if(_0x53ae74[_0x2033a1(0x132)])for(const _0x374a98 of _0x53ae74[_0x2033a1(0x132)]){_0x47a837(_0x374a98['goal']?.['segment']),_0x5ee83f(_0x374a98[_0x2033a1(0x15f)]);}_0x53ae74['stages']&&_0x5ee83f(_0x53ae74[_0x2033a1(0x15f)]);if(_0x53ae74['versions'])for(const _0x104606 of _0x53ae74[_0x2033a1(0x16d)]){_0x5ee83f(_0x104606[_0x2033a1(0x15f)]);}return _0x4e1eb0;}function a96_0x3065(){const _0x4eb163=['activation_template_id','object','state','isArray','14919468TajTwj','all_columns','type','get','journeyStages','11UTaQpz','segment','join','some','versions','exclude','with','13hMraPe','condition','activation','notification','bundle_name','activations','branches','sort','86625KNWUIW','25866hZSbwQ','decision_point','length','slice','3322556uopsnV','exit_criteria','bundle_id','replace','toLowerCase','draft','journeys','startsWith','stringify','launched','.yml','max','entries','goal','attributes','rule','2749KSLBmV','1305DGUmiH','match','latest','description','entry_criteria','version_number','merged','56514626iaBzxy','milestone','has','connection','yaml','schedule','reentry','journeyBundleName','13097mAFWMf','behavior','segments','map','.yaml','index','item','version','push','versionNumber','314LbTPWG','connector_config','conditions','name','6280DnuzKu','3ziWLiw','steps','set','1340INxiwH','stages'];a96_0x3065=function(){return _0x4eb163;};return a96_0x3065();}