@treasuredata/tdx 0.14.6 → 0.14.8
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.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/context-signature.js +1 -1
- package/dist/proxy/conversation-utils.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.d.ts.map +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/http-client.js.map +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-aliases.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/tdx +10 -0
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
const a101_0x72dc4f=a101_0xd6a4;(function(_0x231187,_0x19ec93){const _0x21240b=a101_0xd6a4,_0x4dae55=_0x231187();while(!![]){try{const _0x12286a=parseInt(_0x21240b(0x1fb))/0x1+-parseInt(_0x21240b(0x1be))/0x2+-parseInt(_0x21240b(0x18f))/0x3+-parseInt(_0x21240b(0x209))/0x4+parseInt(_0x21240b(0x1d4))/0x5+parseInt(_0x21240b(0x1b9))/0x6*(-parseInt(_0x21240b(0x1e9))/0x7)+parseInt(_0x21240b(0x21c))/0x8;if(_0x12286a===_0x19ec93)break;else _0x4dae55['push'](_0x4dae55['shift']());}catch(_0xc17d81){_0x4dae55['push'](_0x4dae55['shift']());}}}(a101_0x3a58,0x9d59a));import{createHash}from'crypto';export const PENDING_SEGMENT_PREFIX=a101_0x72dc4f(0x219);export const PENDING_ACTIVATION_PREFIX=a101_0x72dc4f(0x1c9);export function createPendingSegmentId(_0x21d4a8){return''+PENDING_SEGMENT_PREFIX+_0x21d4a8+'__';}export function isPendingSegmentId(_0x17ab3a){const _0x228e4d=a101_0x72dc4f;return _0x17ab3a[_0x228e4d(0x1e8)](PENDING_SEGMENT_PREFIX);}export function extractPendingSegmentName(_0x429df7){const _0x2f938a=a101_0x72dc4f;return _0x429df7[_0x2f938a(0x198)](/^__pending_(.+)__$/,'$1');}function a101_0x3a58(){const _0x2c4e85=['Deleting\x20activation\x20\x27','Stage\x20\x27','segments','folder_created','data','getSegment','\x27\x20wait\x20condition','join','stringify','absolutePath','nameToType','journey_created','fetchJourney','activations','dirname','yamlActivation','null','\x0a\x20\x20','WaitStep','432981VqmRCb','segment_updating','onProgress','isArray','journey_updated','all_columns','map','./child-segment-yaml.js','Updating\x20activation\x20\x27','replace','JOURNEY_UPDATE_ERROR','\x27...','existingSegment','embedded_segment_creating','progress','draft','filter','getJourney','\x27\x20from\x20file:\x20','Activation\x20not\x20found:\x20','folderId','\x27\x20entry\x20criteria','createJourneySegment','Entry\x20criteria:\x20','segmentNameToId','../../utils/async.js','folderPath','segmentFolderId','createFolder','unchanged','Deleted\x20segment\x20\x27','embedded_activation_created','updated','embeddedSegmentNameToId','branches','split','activation_deleted','behavior','journeyStages','logDeleted','journeyId','activationContext','6CmUquH','ACTIVATION_UPDATE_ERROR','\x27\x20exit\x20criteria','DecisionPoint','sort','1651102DMoQWF','segment_deleting','created','Creating\x20activation\x20\x27','user','push','versionNumber','Updated\x20activation\x20\x27','all','skipSegments','segment_deleted','__pending_act_','description','resolveJourneyId','journeyActivationStepId','index','activation_creating','Name\x20has\x20already\x20been\x20taken','valid','embedded_segment_created','exitCriterias','listActivations','389085bZhAJR','journeys','max','Segment\x20not\x20found:\x20','entries','stages','set','Created\x20activation\x20\x27','find',').\x20','journeyById','segmentId','relationships','Creating\x20folder\x20\x27','localSegmentRules','NOT_FOUND','\x20error(s)','Deleted\x20activation\x20\x27','Created\x20journey\x20\x27','Activation','startsWith','6487082jcMrgs','nameToId','idToName','relative','milestone','existingActivation','segment_creating','values','activationsBySegmentId','activationStepsById','has','digest','update','folderPathToId','createdSegmentId','JOURNEY_SYNTAX_ERROR','with','segment_created','754151sCnHyo','\x27\x20not\x20found\x20in\x20journey\x20\x27','existingSegments','segmentByFolderAndName','journeyBundleName','flatMap','\x27\x20for\x20','getActivation','activation_deleting','trim','slice','):\x20','parse','journeyActivationNameToId','2176824qKvhfy','activation_','columns','utf-8','entry_criteria','Cannot\x20create\x20embedded\x20segment\x20for\x20existing\x20journey\x20without\x20journey\x20ID','length','withProgress','notification','deleteSegment','toLowerCase','from','action','activationActions','folder','Fetching\x20','__pending_','INTERNAL','activation_updating','18026784AzdIBy','hasChanges','activationParams','existingJourney','isNew','get','toString','updateSegmentById','Creating\x20segment\x20\x27','Cannot\x20create\x20embedded\x20activation\x20without\x20journey\x20context','size','rootFolderId','yamlConfig','\x20(referenced\x20in\x20journey\x20','steps','validatedRequest','kind','type','Updating\x20segment\x20\x27','object','create','resolveSegment','entryCriteria','segment','decision_point','attributes','SEGMENT_NOT_FOUND','state','parentSegmentFolder','connectionIdToNameMap','list','createdSegmentIds','logWarning','SEGMENT_UPDATE_ERROR','activation_template_id','journey','waitCondition','delete','stage\x20\x27','activation_updated','diff','goal','Failed\x20to\x20','schedule','deleted','effectiveFolderId','results','rule','parentId','createActivation','keys','Define\x20it\x20in\x20the\x20journey\x27s\x20\x27activations\x27\x20section\x20or\x20use\x20an\x20existing\x20activation\x20ID.','parseDocument','\x27\x20milestone','./journey-yaml.js','errors','name','idToEmailMap','reduce','goal\x20criteria','logSuccess','add','segment_updated'];a101_0x3a58=function(){return _0x2c4e85;};return a101_0x3a58();}export function createPendingActivationId(_0x3e9f1c){return''+PENDING_ACTIVATION_PREFIX+_0x3e9f1c+'__';}export function isPendingActivationId(_0x4d53d2){const _0x28964a=a101_0x72dc4f;return _0x4d53d2[_0x28964a(0x1e8)](PENDING_ACTIVATION_PREFIX);}export function extractPendingActivationName(_0x2f7db8){const _0x29f269=a101_0x72dc4f;return _0x2f7db8[_0x29f269(0x198)](/^__pending_act_(.+)__$/,'$1');}function generateDeterministicJourneySegmentName(_0x39e56b,_0x224631){const _0x4b2fc0=a101_0x72dc4f,_0x2bc9f0=_0x39e56b+'::'+(_0x224631[_0x4b2fc0(0x204)]()||'segment'),_0x268070=createHash('sha1')[_0x4b2fc0(0x1f5)](_0x2bc9f0)[_0x4b2fc0(0x1f4)]('hex')[_0x4b2fc0(0x205)](0x0,0xc);return'journey_entry_criteria_'+_0x268070;}export function ensureJourneyDefaults(_0x4c0363){const _0x58d906=a101_0x72dc4f;!_0x4c0363[_0x58d906(0x1ca)]&&(_0x4c0363[_0x58d906(0x1ca)]=''),!_0x4c0363[_0x58d906(0x237)]&&(_0x4c0363['state']=_0x58d906(0x19e));}export function resolveTDFolderPath(_0x1aab5c,_0x5b2d43,_0x5958f9){const _0x1a46cd=a101_0x72dc4f;if(!_0x5b2d43)return _0x1aab5c;if(_0x1aab5c===_0x5958f9||_0x1aab5c[_0x1a46cd(0x1e8)](_0x5958f9+'/'))return _0x1aab5c;return _0x1aab5c?_0x5958f9+'/'+_0x1aab5c:_0x5958f9;}export function addFoldersToCreate(_0x118b70,_0x5d8666,_0x46da43){const _0x10ee35=a101_0x72dc4f;if(!_0x118b70)return;if(_0x5d8666[_0x10ee35(0x1f3)](_0x118b70))return;const _0x52bb75=_0x118b70[_0x10ee35(0x1b2)]('/');let _0x168b27='';for(const _0x278010 of _0x52bb75){_0x168b27=_0x168b27?_0x168b27+'/'+_0x278010:_0x278010,!_0x5d8666[_0x10ee35(0x1f3)](_0x168b27)&&_0x46da43[_0x10ee35(0x17a)](_0x168b27);}}import*as a101_0x2819b4 from'yaml';import{readFileSync}from'fs';function a101_0xd6a4(_0x125f92,_0x5d3767){_0x125f92=_0x125f92-0x160;const _0x3a5843=a101_0x3a58();let _0xd6a4a2=_0x3a5843[_0x125f92];return _0xd6a4a2;}import a101_0x721dd5 from'path';import{isJourneyDef,parseYamlString as a101_0x36fe12,toYamlString as a101_0x773c07,normalizeJourneyDef,hasMultipleVersions,journeyResponseToDef,collectSegmentIdsFromJourneyApi}from'./journey-yaml.js';import{SEGMENT_KIND_JOURNEY,generateJourneyLocalName,sanitizeYamlKey,createJumpTargetCache,resolveJumpTarget,buildMergedJourneyDef,buildLocalRuleToNameMappingFromJourney,collectSegmentUsageCounts}from'./journey-utils.js';import{activationResponseToDef,segmentToYamlString,segmentWithActivationsToYaml,parseSegmentYamlFile,normalizeChildSegmentYaml,apiRuleToYaml,yamlRuleToApi,serializeExpandedRule,collectSegmentRefsFromRule,resolveRuleSegmentRefs,resolveRuleSegmentIds,journeyActivationStepToYaml}from'./child-segment-yaml.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';import{batchAsync}from'../../utils/async.js';import{buildFolderMaps}from'./resolution-context.js';import{SDKError,ErrorCode,isHttp400Error,getErrorMessage}from'../errors.js';import{validateSegmentDef,validateJourneyDef,formatValidationResult}from'./yaml-validator.js';function stableStringify(_0x1ed24a){const _0xa7b87c=a101_0x72dc4f;if(Array[_0xa7b87c(0x192)](_0x1ed24a))return'['+_0x1ed24a['map'](_0xa198b0=>stableStringify(_0xa198b0))[_0xa7b87c(0x183)](',')+']';if(_0x1ed24a&&typeof _0x1ed24a===_0xa7b87c(0x22f)){const _0x2b563e=_0x1ed24a,_0x5e1761=Object[_0xa7b87c(0x16f)](_0x2b563e)[_0xa7b87c(0x1bd)](),_0x2d2c42=_0x5e1761['map'](_0x572e98=>'\x22'+_0x572e98+'\x22:'+stableStringify(_0x2b563e[_0x572e98]));return'{'+_0x2d2c42[_0xa7b87c(0x183)](',')+'}';}const _0x283ed6=JSON[_0xa7b87c(0x184)](_0x1ed24a);return _0x283ed6===undefined?_0xa7b87c(0x18c):_0x283ed6;}function activationSignature(_0xc17713){const _0x8fbbd7=a101_0x72dc4f,_0x1bd2c6={'connection':_0xc17713['connection'],..._0xc17713[_0x8fbbd7(0x194)]!==undefined&&{'all_columns':_0xc17713[_0x8fbbd7(0x194)]},..._0xc17713[_0x8fbbd7(0x20b)]!==undefined&&{'columns':_0xc17713[_0x8fbbd7(0x20b)]},..._0xc17713[_0x8fbbd7(0x1b4)]!==undefined&&{'behavior':_0xc17713[_0x8fbbd7(0x1b4)]},..._0xc17713[_0x8fbbd7(0x168)]!==undefined&&{'schedule':_0xc17713[_0x8fbbd7(0x168)]},..._0xc17713[_0x8fbbd7(0x211)]!==undefined&&{'notification':_0xc17713[_0x8fbbd7(0x211)]},..._0xc17713['connector_config']!==undefined&&{'connector_config':_0xc17713['connector_config']},..._0xc17713[_0x8fbbd7(0x23e)]!==undefined&&{'activation_template_id':_0xc17713[_0x8fbbd7(0x23e)]}};return stableStringify(_0x1bd2c6);}export async function prepareSegmentFiles(_0x3fed75,_0x4f65e8,_0x5cc882,_0x20335f,_0x33d895){const _0x30f7ab=a101_0x72dc4f,{activationDefToCreateRequest:_0x3a6efe}=await import(_0x30f7ab(0x196)),_0x436627=[],_0x333792=new Set();for(const {yamlConfig:_0x4de7dd,folderPath:_0x5b74ce,sourcePath:_0x238c06}of _0x3fed75){const _0x3b9811=resolveTDFolderPath(_0x5b74ce,_0x20335f,_0x33d895),_0x307fad=_0x3b9811+':'+_0x4de7dd[_0x30f7ab(0x175)],_0xbec20c=_0x4f65e8[_0x30f7ab(0x1fe)][_0x30f7ab(0x221)](_0x307fad),_0x38facd=_0xbec20c?_0x4f65e8[_0x30f7ab(0x1f1)][_0x30f7ab(0x221)](_0xbec20c['id'])||[]:[];addFoldersToCreate(_0x3b9811,_0x4f65e8[_0x30f7ab(0x1f6)],_0x333792);const _0x5becd7=calculateActivationActions(_0x4de7dd[_0x30f7ab(0x189)]||[],_0x38facd,_0x4f65e8['idToEmailMap'],_0x4f65e8[_0x30f7ab(0x239)]);for(const _0x59691c of _0x5becd7){(_0x59691c['type']==='create'||_0x59691c[_0x30f7ab(0x22d)]==='update')&&_0x59691c[_0x30f7ab(0x18b)]&&(_0x59691c[_0x30f7ab(0x22b)]=await _0x3a6efe(_0x59691c['yamlActivation'],_0x5cc882));}const _0x3db958=calculateSegmentDiff(_0x4de7dd,_0xbec20c,_0x38facd,_0x4f65e8[_0x30f7ab(0x176)],_0x4f65e8[_0x30f7ab(0x239)]);_0x436627[_0x30f7ab(0x1c3)]({'relativePath':_0x4de7dd[_0x30f7ab(0x175)],'absolutePath':_0x238c06,'yamlConfig':_0x4de7dd,'folderPath':_0x3b9811,'existingSegment':_0xbec20c,'existingActivations':_0x38facd,'isNew':_0x3db958[_0x30f7ab(0x220)],'hasChanges':_0x3db958['hasChanges'],'diff':_0x3db958[_0x30f7ab(0x165)],'activationActions':_0x5becd7});}return{'segmentFiles':_0x436627,'foldersToCreate':_0x333792};}export async function prepareJourneyFiles(_0x4278ee,_0x27b35d,_0x39ad48,_0x3ae6ad){const _0x16a0ef=a101_0x72dc4f,_0x1edee8=[],_0x89dd4c=new Set();for(const {yamlConfig:_0x2eeb2a,folderPath:_0x1268d8,sourcePath:_0x5bc00b}of _0x4278ee){const _0x2e3541=resolveTDFolderPath(_0x1268d8,_0x39ad48,_0x3ae6ad),_0x7ca414=_0x2e3541+':'+_0x2eeb2a[_0x16a0ef(0x175)],_0x8a4857=_0x27b35d['journeyBundlesByFolderAndName'][_0x16a0ef(0x221)](_0x7ca414);let _0x44adea,_0x1f38d0;if(_0x8a4857&&_0x8a4857[_0x16a0ef(0x20f)]>0x0){const _0x395e9a=buildLocalExpandedRuleMappings(_0x2eeb2a),{createYamlContext:_0x7327ff,prefetchJourneySegments:_0x16d7ce}=createPushYamlContextForBundle(_0x27b35d['deps'],_0x27b35d['parentId'],_0x27b35d[_0x16a0ef(0x1fd)],_0x395e9a,_0x27b35d[_0x16a0ef(0x176)],_0x27b35d[_0x16a0ef(0x239)],_0x27b35d[_0x16a0ef(0x1f2)],_0x27b35d[_0x16a0ef(0x1de)]);await _0x16d7ce(_0x8a4857[_0x16a0ef(0x195)](_0x5d0f35=>_0x5d0f35['id']));const _0x4d9e7a=hasMultipleVersions(_0x2eeb2a),_0x4da83=async _0x4bea52=>{const _0xe2638f=_0x16a0ef,_0x282e2d=_0x27b35d[_0xe2638f(0x1de)]?.['get'](_0x4bea52);if(_0x282e2d)return _0x282e2d;return _0x27b35d[_0xe2638f(0x188)]({'journeyId':_0x4bea52,'journeyName':_0x2eeb2a[_0xe2638f(0x175)],'isMultiVersion':_0x8a4857[_0xe2638f(0x20f)]>0x1});};if(_0x4d9e7a&&_0x8a4857[_0x16a0ef(0x20f)]>0x1){const _0x2589f2=[];for(const _0x1eacb4 of _0x8a4857){const _0x546d01=_0x1eacb4[_0x16a0ef(0x1c4)]||0x1;_0x27b35d[_0x16a0ef(0x19d)]?.[_0x16a0ef(0x1f5)](_0x16a0ef(0x218)+_0x2eeb2a['name']+'\x20v'+_0x546d01);const _0x1e22a7=await _0x4da83(_0x1eacb4['id']),_0x238f40=_0x7327ff(_0x1eacb4['id']),_0x4c6de2=await journeyResponseToDef(_0x1e22a7,_0x238f40);_0x2589f2[_0x16a0ef(0x1c3)]({'item':_0x1eacb4,'yaml':_0x4c6de2});}const _0x222066=buildLocalRuleToNameMappingFromJourney(_0x2eeb2a);_0x1f38d0=buildMergedJourneyDef(_0x2589f2,_0x222066);const _0x339328=Math[_0x16a0ef(0x1d6)](..._0x2589f2[_0x16a0ef(0x195)](_0x45c019=>_0x45c019['item'][_0x16a0ef(0x1c4)]||0x0)),_0xe67985=_0x8a4857[_0x16a0ef(0x1dc)](_0x14d7ad=>(_0x14d7ad['versionNumber']||0x0)===_0x339328);_0xe67985&&(_0x27b35d[_0x16a0ef(0x19d)]?.[_0x16a0ef(0x1f5)]('Fetching\x20'+_0x2eeb2a[_0x16a0ef(0x175)]+'\x20v'+_0x339328),_0x44adea=await _0x4da83(_0xe67985['id']));}else{const _0x57427c=_0x8a4857[_0x8a4857['length']-0x1];_0x27b35d[_0x16a0ef(0x19d)]?.[_0x16a0ef(0x1f5)](_0x16a0ef(0x218)+_0x2eeb2a[_0x16a0ef(0x175)]),_0x44adea=await _0x4da83(_0x57427c['id']);const _0x2d93ec=_0x7327ff(_0x57427c['id']),_0x250ba4=await journeyResponseToDef(_0x44adea,_0x2d93ec),_0x58c428=buildLocalRuleToNameMappingFromJourney(_0x2eeb2a);_0x1f38d0=buildMergedJourneyDef([{'item':_0x57427c,'yaml':_0x250ba4}],_0x58c428);}}addFoldersToCreate(_0x2e3541,_0x27b35d[_0x16a0ef(0x1f6)],_0x89dd4c);const _0x39b32f=calculateJourneyDiff(_0x2eeb2a,_0x1f38d0);_0x1edee8[_0x16a0ef(0x1c3)]({'relativePath':_0x2eeb2a[_0x16a0ef(0x175)],'absolutePath':_0x5bc00b,'yamlConfig':_0x2eeb2a,'folderPath':_0x2e3541,'existingJourney':_0x44adea,'isNew':_0x39b32f[_0x16a0ef(0x220)],'hasChanges':_0x39b32f['hasChanges'],'diff':_0x39b32f[_0x16a0ef(0x165)]});}return{'journeyFiles':_0x1edee8,'foldersToCreate':_0x89dd4c};}export function calculateActivationActions(_0x108afc,_0x27b68b,_0x576075,_0x4d97f3){const _0x64110=a101_0x72dc4f,_0x4cdb03=[],_0x502c2a=new Map();for(const _0x11d096 of _0x27b68b){_0x502c2a[_0x64110(0x1da)](_0x11d096[_0x64110(0x175)],_0x11d096);}const _0x2ac1f9=new Map();for(const _0xbc5f7 of _0x108afc){_0x2ac1f9['set'](_0xbc5f7[_0x64110(0x175)],_0xbc5f7);}for(const _0x308e79 of _0x108afc){const _0x37f55a=_0x502c2a['get'](_0x308e79['name']);if(!_0x37f55a)_0x4cdb03['push']({'type':'create','name':_0x308e79[_0x64110(0x175)],'yamlActivation':_0x308e79});else{const _0x28ef3d=activationResponseToDef(_0x37f55a,_0x576075,_0x4d97f3),_0x49f58a=a101_0x2819b4[_0x64110(0x184)](_0x28ef3d),_0xdf98e3=a101_0x2819b4[_0x64110(0x184)](_0x308e79);_0x49f58a!==_0xdf98e3&&_0x4cdb03[_0x64110(0x1c3)]({'type':_0x64110(0x1f5),'name':_0x308e79[_0x64110(0x175)],'yamlActivation':_0x308e79,'existingActivation':_0x37f55a});}}for(const _0x2c42df of _0x27b68b){!_0x2ac1f9['has'](_0x2c42df[_0x64110(0x175)])&&_0x4cdb03[_0x64110(0x1c3)]({'type':_0x64110(0x162),'name':_0x2c42df[_0x64110(0x175)],'existingActivation':_0x2c42df});}return _0x4cdb03;}export function calculateSegmentDiff(_0x5c20f5,_0x25ba66,_0x1dcaf3,_0x39f31d,_0xb7e309){const _0x2f4925=segmentToYamlString(_0x5c20f5);if(_0x25ba66){const _0x3b17ef=segmentWithActivationsToYaml(_0x25ba66,_0x1dcaf3,undefined,_0x39f31d,_0xb7e309),_0x3c2a57=segmentToYamlString(_0x3b17ef),_0x1a7806=generateDiff(_0x3c2a57,_0x2f4925),_0x23f685=hasChanges(_0x1a7806);return{'isNew':![],'hasChanges':_0x23f685,'diff':_0x23f685?formatDiffWithColors(_0x1a7806):undefined};}const _0x437a45=generateDiff('',_0x2f4925);return{'isNew':!![],'hasChanges':![],'diff':formatDiffWithColors(_0x437a45)};}export function calculateJourneyDiff(_0x15ddca,_0x23893b){const _0x27b431=normalizeJourneyDef(_0x15ddca,_0x15ddca),_0x2e4a4c=a101_0x773c07(_0x27b431);if(_0x23893b){const _0x22af73=normalizeJourneyDef(_0x23893b,_0x15ddca),_0x3b5e08=a101_0x773c07(_0x22af73),_0x1fcde5=generateDiff(_0x3b5e08,_0x2e4a4c),_0x5849bc=hasChanges(_0x1fcde5);return{'isNew':![],'hasChanges':_0x5849bc,'diff':_0x5849bc?formatDiffWithColors(_0x1fcde5):undefined};}const _0x5b45e1=generateDiff('',_0x2e4a4c);return{'isNew':!![],'hasChanges':![],'diff':formatDiffWithColors(_0x5b45e1)};}export function findSegmentsToDelete(_0x1ea427,_0x14cbc2,_0x312a61,_0x3c923e,_0x6be8a3){const _0x1cb2d4=a101_0x72dc4f,_0x570c7f=new Set();for(const {yamlConfig:_0x20b9f8,folderPath:_0xe50f75}of _0x14cbc2){_0x570c7f[_0x1cb2d4(0x17a)](_0xe50f75+':'+_0x20b9f8[_0x1cb2d4(0x175)]);}return _0x1ea427[_0x1cb2d4(0x19f)](_0x19fcb0=>{const _0x283bd4=_0x1cb2d4,_0x5f2ab5=_0x19fcb0[_0x283bd4(0x1aa)]?_0x312a61['get'](_0x19fcb0[_0x283bd4(0x1aa)][_0x283bd4(0x222)]())||'':'',_0x473d8a=_0x5f2ab5+':'+_0x19fcb0[_0x283bd4(0x175)];if(_0x570c7f[_0x283bd4(0x1f3)](_0x473d8a))return![];if(_0x6be8a3)return _0x5f2ab5===_0x3c923e||_0x5f2ab5['startsWith'](_0x3c923e+'/');return!![];});}export function findJourneysToDelete(_0xa7bcb9,_0x48f9ba,_0x5870e5,_0x46bf3b,_0x244755){const _0x12a9af=a101_0x72dc4f,_0x57f7b4=new Set();for(const {yamlConfig:_0x139bfd,folderPath:_0x525dce}of _0x48f9ba){_0x57f7b4['add'](_0x525dce+':'+_0x139bfd[_0x12a9af(0x175)]);}return _0xa7bcb9[_0x12a9af(0x19f)](_0x294234=>{const _0x211438=_0x12a9af,_0x4ce7a1=_0x294234['folderId']?_0x5870e5[_0x211438(0x221)](_0x294234['folderId'])||'':'',_0x4fb3ab=_0x4ce7a1+':'+_0x294234[_0x211438(0x1ff)];if(_0x57f7b4[_0x211438(0x1f3)](_0x4fb3ab))return![];if(_0x244755)return _0x4ce7a1===_0x46bf3b||_0x4ce7a1[_0x211438(0x1e8)](_0x46bf3b+'/');return!![];});}export function buildSegmentLookupMap(_0x12d938,_0x5d9eb3){const _0x4b3a23=a101_0x72dc4f,_0x1e3e37=new Map();for(const _0x41d741 of _0x12d938){const _0x1c2650=_0x41d741[_0x4b3a23(0x1aa)]?_0x5d9eb3[_0x4b3a23(0x221)](_0x41d741['segmentFolderId'][_0x4b3a23(0x222)]())||'':'',_0x341b41=_0x1c2650+':'+_0x41d741[_0x4b3a23(0x175)];_0x1e3e37[_0x4b3a23(0x1da)](_0x341b41,_0x41d741);}return _0x1e3e37;}export function buildSegmentNameToIdMap(_0xa68ce4){const _0xd30079=a101_0x72dc4f,_0x37177b=new Map();for(const _0x37a7ee of _0xa68ce4){_0x37177b['set'](_0x37a7ee[_0xd30079(0x175)],_0x37a7ee['id']);}return _0x37177b;}export function buildJourneyBundleLookupMap(_0x2bba5f,_0x3b1fcb){const _0x16c79b=a101_0x72dc4f,_0x130ddf=new Map();for(const _0x5947ae of _0x2bba5f){const _0x2ceee1=_0x5947ae[_0x16c79b(0x1a3)]?_0x3b1fcb['get'](_0x5947ae['folderId'])||'':'',_0x5c62ff=_0x2ceee1+':'+_0x5947ae[_0x16c79b(0x1ff)];!_0x130ddf['has'](_0x5c62ff)&&_0x130ddf[_0x16c79b(0x1da)](_0x5c62ff,[]),_0x130ddf[_0x16c79b(0x221)](_0x5c62ff)[_0x16c79b(0x1c3)](_0x5947ae);}for(const _0x36b669 of _0x130ddf[_0x16c79b(0x1f0)]()){_0x36b669[_0x16c79b(0x1bd)]((_0x3fe3a6,_0x43697b)=>(_0x3fe3a6['versionNumber']||0x0)-(_0x43697b[_0x16c79b(0x1c4)]||0x0));}return _0x130ddf;}export function collectFoldersToCreate(_0x2d51af,_0x565764){const _0x4794a0=a101_0x72dc4f,_0x26fa1f=new Set();for(const _0x5a0f49 of _0x2d51af){if(!_0x5a0f49)continue;if(_0x565764[_0x4794a0(0x1f3)](_0x5a0f49))continue;const _0x41bd06=_0x5a0f49['split']('/');let _0x1c26fc='';for(const _0x1743a4 of _0x41bd06){_0x1c26fc=_0x1c26fc?_0x1c26fc+'/'+_0x1743a4:_0x1743a4,!_0x565764['has'](_0x1c26fc)&&_0x26fa1f[_0x4794a0(0x17a)](_0x1c26fc);}}return _0x26fa1f;}export function parseAndClassifyYamlFiles(_0x1c3dde,_0x4f2e28,_0xe093df){const _0x169d63=a101_0x72dc4f,_0x2fabd9=[],_0x19e95c=[];for(const _0x1ae3c8 of _0x1c3dde){const _0x40af97=a101_0x721dd5[_0x169d63(0x1ec)](_0x4f2e28,a101_0x721dd5[_0x169d63(0x18a)](_0x1ae3c8)),_0xd5e920=_0x40af97==='.'?'':_0x40af97,_0x4e587d=readFileSync(_0x1ae3c8,_0x169d63(0x20c)),_0x3ac64b=a101_0x2819b4[_0x169d63(0x207)](_0x4e587d);if(isJourneyDef(_0x3ac64b)){const _0x1244f3=a101_0x36fe12(_0x4e587d);_0x19e95c[_0x169d63(0x1c3)]({'yamlConfig':_0x1244f3,'folderPath':_0xd5e920,'sourcePath':_0x1ae3c8});}else{if(!_0xe093df?.[_0x169d63(0x1c7)]){const _0xa3ae12=parseSegmentYamlFile(_0x4e587d),_0x4517cb=normalizeChildSegmentYaml(_0xa3ae12);_0x2fabd9[_0x169d63(0x1c3)]({'yamlConfig':_0x4517cb,'folderPath':_0xd5e920,'sourcePath':_0x1ae3c8});}}}return{'segments':_0x2fabd9,'journeys':_0x19e95c};}export function validateParsedFiles(_0x29f163,_0x471e81){const _0x5d933f=a101_0x72dc4f,_0x45290e=[];for(const {yamlConfig:_0x579a99,sourcePath:_0x108e2d}of _0x29f163['segments']){const _0x5a0a7e=readFileSync(_0x108e2d,_0x5d933f(0x20c)),_0x43d21d=a101_0x2819b4['parseDocument'](_0x5a0a7e),_0x499a4f=validateSegmentDef(_0x579a99,{'source':_0x5a0a7e,'document':_0x43d21d});if(!_0x499a4f[_0x5d933f(0x1d0)]){const _0x5ea421=a101_0x721dd5[_0x5d933f(0x1ec)](_0x471e81,_0x108e2d);_0x45290e[_0x5d933f(0x1c3)]({'filePath':_0x5ea421,'source':_0x5a0a7e,'result':_0x499a4f,'isJourney':![]});}}for(const {yamlConfig:_0x40274d,sourcePath:_0x1f1afb}of _0x29f163[_0x5d933f(0x1d5)]){const _0x195561=readFileSync(_0x1f1afb,_0x5d933f(0x20c)),_0x1e33d7=a101_0x2819b4[_0x5d933f(0x171)](_0x195561),_0x34eaeb=validateJourneyDef(_0x40274d,{'source':_0x195561,'document':_0x1e33d7});if(!_0x34eaeb[_0x5d933f(0x1d0)]){const _0x23863b=a101_0x721dd5[_0x5d933f(0x1ec)](_0x471e81,_0x1f1afb);_0x45290e['push']({'filePath':_0x23863b,'source':_0x195561,'result':_0x34eaeb,'isJourney':!![]});}}return _0x45290e;}export function formatValidationErrors(_0x4cba2e){const _0x12a512=a101_0x72dc4f,_0x25b8f1=[];for(const {filePath:_0x5895cb,source:_0x479b4c,result:_0x4e1a9c,isJourney:_0x3fe683}of _0x4cba2e){const _0x50ca16=_0x3fe683?_0x12a512(0x160):_0x12a512(0x233);_0x25b8f1[_0x12a512(0x1c3)]('\x0a'+_0x5895cb+'\x20('+_0x50ca16+_0x12a512(0x206)+_0x4e1a9c[_0x12a512(0x174)]['length']+_0x12a512(0x1e4)),_0x25b8f1[_0x12a512(0x1c3)](formatValidationResult(_0x4e1a9c,_0x479b4c,_0x5895cb));}return _0x25b8f1[_0x12a512(0x183)]('\x0a');}export function buildLocalExpandedRuleMappings(_0x5dbf74){const _0x2405e5=a101_0x72dc4f,_0x519287=new Set(),_0x27d2f9=new Map(),_0x4d3149=collectSegmentUsageCounts(_0x5dbf74);if(_0x5dbf74[_0x2405e5(0x17e)])for(const [_0x29bd46,_0x3039ba]of Object[_0x2405e5(0x1d8)](_0x5dbf74[_0x2405e5(0x17e)])){_0x519287['add'](_0x29bd46);if(_0x3039ba['rule']){const _0x5f18e0=yamlRuleToApi(_0x3039ba[_0x2405e5(0x16c)]),_0x477e2d=apiRuleToYaml(_0x5f18e0);_0x27d2f9[_0x2405e5(0x1da)](_0x29bd46,_0x477e2d);}}const _0x38ace8=new Map();let _0x2b7b73=0x0;for(const [_0x5dc47e,_0x2115ae]of _0x27d2f9){const _0x20d913=serializeExpandedRule(_0x2115ae,_0x27d2f9),_0x4f39b4=_0x38ace8['get'](_0x20d913)||[];_0x4f39b4[_0x2405e5(0x1c3)]({'name':_0x5dc47e,'index':_0x2b7b73}),_0x38ace8['set'](_0x20d913,_0x4f39b4),_0x2b7b73++;}const _0x8cb506=new Map();for(const [_0x361bb7,_0x3f92d1]of _0x38ace8){const _0x466faa=_0x3f92d1[_0x2405e5(0x205)]()[_0x2405e5(0x1bd)]((_0x1e21a3,_0x413da0)=>{const _0x186930=_0x2405e5,_0x1ca97d=_0x4d3149[_0x186930(0x221)](_0x1e21a3['name'])||0x0,_0x57fa8b=_0x4d3149[_0x186930(0x221)](_0x413da0[_0x186930(0x175)])||0x0;if(_0x1ca97d!==_0x57fa8b)return _0x57fa8b-_0x1ca97d;return _0x1e21a3[_0x186930(0x1cd)]-_0x413da0[_0x186930(0x1cd)];})[_0x2405e5(0x195)](_0x56134f=>_0x56134f[_0x2405e5(0x175)]),_0x2d0777=[];for(const _0x577b98 of _0x466faa){const _0xb909ab=_0x4d3149[_0x2405e5(0x221)](_0x577b98)||0x0,_0x2e81e=Math[_0x2405e5(0x1d6)](_0xb909ab,0x1);for(let _0xba141a=0x0;_0xba141a<_0x2e81e;_0xba141a++){_0x2d0777[_0x2405e5(0x1c3)](_0x577b98);}}_0x8cb506[_0x2405e5(0x1da)](_0x361bb7,_0x2d0777);}return{'existingLocalSegmentNames':_0x519287,'localSegmentRules':_0x27d2f9,'localExpandedRuleToNames':_0x8cb506};}async function buildServerSegmentRuleMap(_0x20bdd2,_0x1719ff,_0x5dbeeb,_0x4562bb){const _0x5491a1=new Map(),_0x561416=new Set(),_0x375c75=async _0x3026d4=>{const _0x4eef0d=a101_0xd6a4;if(_0x561416[_0x4eef0d(0x1f3)](_0x3026d4))return;_0x561416[_0x4eef0d(0x17a)](_0x3026d4);let _0x157ce1=_0x5dbeeb['find'](_0x5e0186=>_0x5e0186['id']===_0x3026d4);if(!_0x157ce1)try{_0x157ce1=await _0x20bdd2[_0x4eef0d(0x233)]['getSegment'](_0x1719ff,_0x3026d4);}catch{return;}if(!_0x157ce1?.['rule'])return;const _0x4c1138=apiRuleToYaml(_0x157ce1[_0x4eef0d(0x16c)]);_0x5491a1['set'](_0x3026d4,_0x4c1138);const _0x516948=collectSegmentRefsFromRule(_0x4c1138);for(const _0x5e9cda of _0x516948){await _0x375c75(_0x5e9cda);}};for(const _0x2096c4 of _0x4562bb){await _0x375c75(_0x2096c4);}return _0x5491a1;}export function createSegmentIdResolver(_0x4ee654,_0x355f48){return async _0x25daba=>{const _0x3c4b79=a101_0xd6a4,_0x260798=_0x4ee654['get'](_0x25daba);if(!_0x260798)throw new SDKError(ErrorCode[_0x3c4b79(0x236)],_0x3c4b79(0x1d7)+_0x25daba+'\x20(referenced\x20in\x20embedded\x20segment\x20\x27'+_0x355f48+'\x27)');return _0x260798;};}export function extractRootFolderId(_0x39a0e9){const _0x3b9ced=a101_0x72dc4f;return _0x39a0e9[_0x3b9ced(0x1e0)]?.[_0x3b9ced(0x238)]?.[_0x3b9ced(0x180)]?.['id']||_0x39a0e9[_0x3b9ced(0x1e0)]?.['parentFolder']?.[_0x3b9ced(0x180)]?.['id'];}export function buildConnectionMaps(_0x3fb286){const _0x175226=a101_0x72dc4f,_0x28ceac=new Map(),_0x1985c0=new Map(),_0x3df795=new Map();for(const _0x4d8292 of _0x3fb286){_0x28ceac[_0x175226(0x1da)](_0x4d8292[_0x175226(0x175)],parseInt(_0x4d8292['id'],0xa)),_0x1985c0[_0x175226(0x1da)](_0x4d8292['id'],_0x4d8292[_0x175226(0x175)]),_0x3df795['set'](_0x4d8292[_0x175226(0x175)],_0x4d8292[_0x175226(0x22d)]);}return{'nameToId':_0x28ceac,'idToName':_0x1985c0,'nameToType':_0x3df795};}export function calculatePushStats(_0x57ef44,_0x1ff38d,_0x37b7c7,_0x1d7e61,_0x4cf9f8,_0x450da2,_0x2a5663){const _0x1252cd=a101_0x72dc4f,_0x2e46a5=_0x57ef44[_0x1252cd(0x19f)](_0x36c40d=>_0x36c40d[_0x1252cd(0x220)]),_0x15a5ec=_0x57ef44[_0x1252cd(0x19f)](_0x5a696f=>!_0x5a696f[_0x1252cd(0x220)]&&_0x5a696f[_0x1252cd(0x21d)]),_0x5767ad=_0x57ef44[_0x1252cd(0x19f)](_0x30f001=>!_0x30f001[_0x1252cd(0x220)]&&!_0x30f001[_0x1252cd(0x21d)]),_0x4f3030=_0x450da2?_0x1d7e61:[],_0x3d0c9b=_0x1ff38d['filter'](_0x19e85f=>_0x19e85f['isNew']),_0x3474b5=_0x1ff38d['filter'](_0x26babb=>!_0x26babb[_0x1252cd(0x220)]&&_0x26babb[_0x1252cd(0x21d)]),_0x7ee7c=_0x1ff38d[_0x1252cd(0x19f)](_0x492559=>!_0x492559[_0x1252cd(0x220)]&&!_0x492559[_0x1252cd(0x21d)]),_0x4813bb=_0x450da2?_0x4cf9f8:[],_0x54a681=_0x57ef44[_0x1252cd(0x200)](_0x3488c7=>_0x3488c7[_0x1252cd(0x216)]),_0x36c946=_0x54a681[_0x1252cd(0x19f)](_0x131c00=>_0x131c00[_0x1252cd(0x22d)]===_0x1252cd(0x230)),_0x1247ab=_0x54a681[_0x1252cd(0x19f)](_0x56b049=>_0x56b049[_0x1252cd(0x22d)]===_0x1252cd(0x1f5)),_0x553f44=_0x54a681[_0x1252cd(0x19f)](_0x3704bc=>_0x3704bc[_0x1252cd(0x22d)]===_0x1252cd(0x162)),_0x2edd50=Array[_0x1252cd(0x214)](_0x37b7c7)[_0x1252cd(0x1bd)](),_0x4aa219=_0x2a5663?![]:_0x2e46a5[_0x1252cd(0x20f)]>0x0||_0x15a5ec[_0x1252cd(0x20f)]>0x0||_0x4f3030[_0x1252cd(0x20f)]>0x0,_0x11b3ec=_0x3d0c9b[_0x1252cd(0x20f)]>0x0||_0x3474b5[_0x1252cd(0x20f)]>0x0||_0x4813bb[_0x1252cd(0x20f)]>0x0,_0x278d97=_0x2a5663?![]:_0x54a681[_0x1252cd(0x20f)]>0x0,_0x38b84c=_0x2edd50['length']>0x0;return{'segments':{'new':_0x2e46a5,'changed':_0x15a5ec,'unchanged':_0x5767ad,'toDelete':_0x4f3030},'journeys':{'new':_0x3d0c9b,'changed':_0x3474b5,'unchanged':_0x7ee7c,'toDelete':_0x4813bb},'activations':{'all':_0x54a681,'toCreate':_0x36c946,'toUpdate':_0x1247ab,'toDelete':_0x553f44},'folders':{'toCreate':_0x2edd50},'counts':{'segments':{'new':_0x2e46a5[_0x1252cd(0x20f)],'changed':_0x15a5ec[_0x1252cd(0x20f)],'unchanged':_0x5767ad[_0x1252cd(0x20f)],'toDelete':_0x4f3030[_0x1252cd(0x20f)]},'journeys':{'new':_0x3d0c9b[_0x1252cd(0x20f)],'changed':_0x3474b5[_0x1252cd(0x20f)],'unchanged':_0x7ee7c[_0x1252cd(0x20f)],'toDelete':_0x4813bb['length']},'activations':{'create':_0x36c946[_0x1252cd(0x20f)],'update':_0x1247ab[_0x1252cd(0x20f)],'delete':_0x553f44[_0x1252cd(0x20f)]},'folders':_0x2edd50[_0x1252cd(0x20f)]},'hasChanges':_0x4aa219||_0x11b3ec||_0x278d97||_0x38b84c};}export async function buildPushExecutionContext(_0x34b421,_0x262071,_0x4d562a,_0x5a94d4,_0x24e6b5,_0x5cf473){const _0x597756=a101_0x72dc4f,_0x38c724=extractRootFolderId(_0x4d562a),{pathToId:_0x181481,idToPath:_0x447613}=buildFolderMaps(_0x24e6b5),_0x1a93f4=buildSegmentNameToIdMap(_0x5a94d4),_0x35726c=new Map(),{batchAsync:_0x19ebf0}=await import(_0x597756(0x1a8)),[_0x3345e2,_0x1caabf]=await Promise[_0x597756(0x1c6)]([_0x34b421[_0x597756(0x1c2)]['buildUserMaps'](),_0x34b421['connection'][_0x597756(0x23a)](),((async()=>{!_0x5cf473&&_0x5a94d4['length']>0x0&&await _0x19ebf0(_0x5a94d4,async _0x4ca8b1=>{const _0x2f2087=a101_0xd6a4,_0x5a9f68=await _0x34b421[_0x2f2087(0x233)][_0x2f2087(0x1d3)](_0x262071,_0x4ca8b1['id']);_0x35726c['set'](_0x4ca8b1['id'],_0x5a9f68);});})())]),{emailToId:_0x2d0662,idToEmail:_0x2d5ea8}=_0x3345e2,_0x19fc9a=buildConnectionMaps(_0x1caabf);return{'rootFolderId':_0x38c724,'folderPathToId':_0x181481,'folderIdToPath':_0x447613,'segmentNameToId':_0x1a93f4,'activationsBySegmentId':_0x35726c,'emailToIdMap':_0x2d0662,'idToEmailMap':_0x2d5ea8,'connectionNameToIdMap':_0x19fc9a[_0x597756(0x1ea)],'connectionIdToNameMap':_0x19fc9a[_0x597756(0x1eb)],'connectionNameToTypeMap':_0x19fc9a[_0x597756(0x186)]};}export function createPushYamlContextForBundle(_0x573704,_0x35c027,_0x1ac3a1,_0x476f0b,_0x155158,_0x321517,_0x80c2b4,_0xd3b9b0){const {existingLocalSegmentNames:_0x411751,localExpandedRuleToNames:_0x5721bb}=_0x476f0b,_0x1b041b=new Set(),_0x2e0498=new Map(),_0x50de90=new Map(),_0x4bcfc9=new Map(),_0x374c34=createJumpTargetCache(),_0x320ea9=new Map(),_0x6edcec=new Map(),_0x331e63=new Set();let _0x45dff9;const _0x2ad7fe=_0x5896b2=>{const _0x4aec86={'resolveSegment':async _0x46a99e=>{const _0xdd32a3=a101_0xd6a4,_0x3e55d3=_0x4bcfc9[_0xdd32a3(0x221)](_0x46a99e);if(_0x3e55d3!==undefined)return{'name':_0x3e55d3,'isJourneyLocal':!![]};try{let _0x51912b=_0x1ac3a1['find'](_0x409b9c=>_0x409b9c['id']===_0x46a99e);!_0x51912b&&(_0x51912b=await _0x573704[_0xdd32a3(0x233)]['getSegment'](_0x35c027,_0x46a99e));const _0x4ef911=generateJourneyLocalName(_0x51912b[_0xdd32a3(0x175)]),_0x17e597=_0x51912b[_0xdd32a3(0x22c)]===SEGMENT_KIND_JOURNEY&&_0x4ef911!==undefined;let _0x2ef71d=_0x51912b[_0xdd32a3(0x175)],_0x25c3dc;if(_0x17e597&&_0x51912b[_0xdd32a3(0x16c)]){const _0x126c21=apiRuleToYaml(_0x51912b[_0xdd32a3(0x16c)]);_0x6edcec[_0xdd32a3(0x1da)](_0x46a99e,_0x126c21);const _0x18d108=async _0x3a94a7=>{const _0x5a8718=_0xdd32a3,_0xe3469=collectSegmentRefsFromRule(_0x3a94a7);for(const _0xb16d43 of _0xe3469){if(!_0x6edcec[_0x5a8718(0x1f3)](_0xb16d43))try{const _0x136ef0=await _0x573704[_0x5a8718(0x233)]['getSegment'](_0x35c027,_0xb16d43);if(_0x136ef0?.['rule']){const _0x1c7f3d=apiRuleToYaml(_0x136ef0[_0x5a8718(0x16c)]);_0x6edcec['set'](_0xb16d43,_0x1c7f3d),await _0x18d108(_0x1c7f3d);}}catch{}}};await _0x18d108(_0x126c21);const _0x2daa2c=serializeExpandedRule(_0x126c21,_0x6edcec),_0x2bbbc4=_0x5721bb[_0xdd32a3(0x221)](_0x2daa2c);if(_0x2bbbc4&&_0x2bbbc4[_0xdd32a3(0x20f)]>0x0){const _0x5d67be=_0x2e0498[_0xdd32a3(0x221)](_0x2daa2c)||0x0,_0x5d51bc=_0x2bbbc4[_0x5d67be]||_0x2bbbc4[_0x2bbbc4['length']-0x1];_0x2e0498[_0xdd32a3(0x1da)](_0x2daa2c,_0x5d67be+0x1),_0x2ef71d=_0x5d51bc,_0x1b041b['add'](_0x2ef71d),_0x4bcfc9[_0xdd32a3(0x1da)](_0x46a99e,_0x2ef71d);const _0x58c531=await resolveRuleSegmentRefs(_0x126c21,async _0x36b165=>{const _0x48e918=_0xdd32a3,_0x3de6e4=_0x4bcfc9[_0x48e918(0x221)](_0x36b165);if(_0x3de6e4)return _0x3de6e4;const _0x1a76ee=await _0x45dff9[_0x48e918(0x231)](_0x36b165);return _0x1a76ee[_0x48e918(0x175)];});_0x25c3dc={'description':_0x51912b[_0xdd32a3(0x1ca)],'rule':_0x58c531};}else{const _0x356823=_0x320ea9[_0xdd32a3(0x221)](_0x2daa2c);if(_0x356823)_0x2ef71d=_0x356823,_0x4bcfc9[_0xdd32a3(0x1da)](_0x46a99e,_0x2ef71d);else{if(_0x4ef911){let _0x5f3695=_0x4ef911,_0x35cec5=0x2;while(_0x1b041b[_0xdd32a3(0x1f3)](_0x5f3695)||_0x411751[_0xdd32a3(0x1f3)](_0x5f3695)){_0x5f3695=_0x4ef911+'_'+_0x35cec5,_0x35cec5++;}_0x1b041b[_0xdd32a3(0x17a)](_0x5f3695),_0x2ef71d=_0x5f3695;}_0x4bcfc9[_0xdd32a3(0x1da)](_0x46a99e,_0x2ef71d),_0x320ea9[_0xdd32a3(0x1da)](_0x2daa2c,_0x2ef71d);const _0x43f474=await resolveRuleSegmentRefs(_0x126c21,async _0x3dfdb1=>{const _0x214812=_0xdd32a3,_0x3a385a=_0x4bcfc9[_0x214812(0x221)](_0x3dfdb1);if(_0x3a385a)return _0x3a385a;const _0x19c125=await _0x45dff9['resolveSegment'](_0x3dfdb1);return _0x19c125[_0x214812(0x175)];});_0x25c3dc={'description':_0x51912b['description'],'rule':_0x43f474};}}}return{'name':_0x2ef71d,'isJourneyLocal':_0x17e597,'definition':_0x25c3dc};}catch{return{'name':_0x46a99e,'isJourneyLocal':![]};}},'resolveActivation':async _0xf1bdb5=>{const _0x5706a3=a101_0xd6a4,_0x2adbab=_0x50de90[_0x5706a3(0x221)](_0xf1bdb5);if(_0x2adbab!==undefined)return{'name':_0x2adbab,'isJourneyLocal':!![]};try{let _0x3b220c=_0x80c2b4?.[_0x5706a3(0x221)](_0xf1bdb5);!_0x3b220c&&(_0x3b220c=await _0x573704[_0x5706a3(0x160)][_0x5706a3(0x202)](_0x5896b2,_0xf1bdb5));const _0xec082=_0x3b220c['attributes'][_0x5706a3(0x21e)][_0x5706a3(0x175)]||_0xf1bdb5,_0x1b1196=sanitizeYamlKey(_0xec082)||_0x5706a3(0x20a)+_0xf1bdb5,_0x313423=_0x1b1196;_0x50de90[_0x5706a3(0x1da)](_0xf1bdb5,_0x313423);const _0x1acca6=journeyActivationStepToYaml(_0x3b220c,_0x155158,_0x321517);return{'name':_0x313423,'isJourneyLocal':!![],'definition':_0x1acca6};}catch{return{'name':_0xf1bdb5,'isJourneyLocal':![]};}},'resolveJumpTarget':(_0x260865,_0x1dd91d)=>resolveJumpTarget(_0x260865,_0x1dd91d,_0x374c34,async _0x2cdf4a=>{const _0x14458b=a101_0xd6a4,_0x928267=_0xd3b9b0?.[_0x14458b(0x221)](_0x2cdf4a);if(_0x928267)return _0x928267;return _0x573704[_0x14458b(0x160)]['getJourney'](_0x2cdf4a);})};return _0x45dff9=_0x4aec86,_0x4aec86;},_0x8609bc=async _0x53cb13=>{const _0x3ecd05=a101_0xd6a4,{collectSegmentIdsFromJourneyApi:_0x38dd7c}=await import(_0x3ecd05(0x173)),{batchAsync:_0x59a3eb}=await import(_0x3ecd05(0x1a8)),_0x4475b3=new Set();for(const _0x3803c1 of _0x53cb13){let _0x7bef24=_0xd3b9b0?.[_0x3ecd05(0x221)](_0x3803c1);!_0x7bef24&&(_0x7bef24=await _0x573704[_0x3ecd05(0x160)]['getJourney'](_0x3803c1));const _0x511ac0=_0x38dd7c(_0x7bef24);for(const _0x346ae8 of _0x511ac0){_0x4475b3[_0x3ecd05(0x17a)](_0x346ae8);}}let _0x469a7b=Array[_0x3ecd05(0x214)](_0x4475b3);while(_0x469a7b[_0x3ecd05(0x20f)]>0x0){const _0x4255cb=_0x469a7b[_0x3ecd05(0x19f)](_0x4e8359=>!_0x331e63[_0x3ecd05(0x1f3)](_0x4e8359));if(_0x4255cb['length']===0x0)break;const _0x448c76=await _0x59a3eb(_0x4255cb,async _0x199487=>{const _0x1396a1=_0x3ecd05;_0x331e63[_0x1396a1(0x17a)](_0x199487);let _0x36bac3=_0x1ac3a1[_0x1396a1(0x1dc)](_0x515c95=>_0x515c95['id']===_0x199487);if(!_0x36bac3)try{_0x36bac3=await _0x573704[_0x1396a1(0x233)][_0x1396a1(0x181)](_0x35c027,_0x199487);}catch{return null;}return{'segmentId':_0x199487,'segment':_0x36bac3};},0xa),_0x2cbe35=new Set();for(const _0x12b774 of _0x448c76){if(!_0x12b774?.['segment']?.['rule'])continue;const _0x326672=apiRuleToYaml(_0x12b774[_0x3ecd05(0x233)][_0x3ecd05(0x16c)]);_0x6edcec[_0x3ecd05(0x1da)](_0x12b774[_0x3ecd05(0x1df)],_0x326672);const _0x340a38=collectSegmentRefsFromRule(_0x326672);for(const _0x40d4e7 of _0x340a38){!_0x331e63[_0x3ecd05(0x1f3)](_0x40d4e7)&&_0x2cbe35['add'](_0x40d4e7);}}_0x469a7b=Array[_0x3ecd05(0x214)](_0x2cbe35);}};return{'createYamlContext':_0x2ad7fe,'prefetchJourneySegments':_0x8609bc};}export async function executePushSegments(_0x42a081,_0x3f8a28,_0x19472c,_0x2cafc0,_0x428924){const _0x5438a0=a101_0x72dc4f,{segmentDefToCreateRequest:_0x224f19,segmentDefToUpdateRequest:_0x5e130d}=await import(_0x5438a0(0x196)),_0x359e6d=_0x19472c[_0x5438a0(0x1f6)],_0x14f1be=0x5,_0xdfcc68=async _0xa120e2=>{const _0x122a4d=_0x5438a0,_0x2b15d9=_0xa120e2[_0x122a4d(0x1a9)]?_0x359e6d[_0x122a4d(0x221)](_0xa120e2[_0x122a4d(0x1a9)]):undefined;let _0x31c4d5;const _0x4150bd={'created':0x0,'updated':0x0,'activations':{'created':0x0,'updated':0x0,'deleted':0x0}};try{if(_0xa120e2[_0x122a4d(0x220)]){_0x428924['onProgress']?.({'type':_0x122a4d(0x1ef),'name':_0xa120e2[_0x122a4d(0x228)][_0x122a4d(0x175)]});const _0x2cb0b3=_0x224f19(_0xa120e2[_0x122a4d(0x228)],_0x2b15d9),_0x3a1a4e=await _0x428924[_0x122a4d(0x210)](_0x122a4d(0x224)+_0xa120e2[_0x122a4d(0x228)][_0x122a4d(0x175)]+_0x122a4d(0x19a),()=>_0x42a081[_0x122a4d(0x233)]['createSegment'](_0x2cafc0[_0x122a4d(0x16d)],_0x2cb0b3));_0x31c4d5=_0x3a1a4e[_0x122a4d(0x180)]['id'],_0x4150bd[_0x122a4d(0x1f7)]={'name':_0xa120e2[_0x122a4d(0x228)][_0x122a4d(0x175)],'id':_0x31c4d5},_0x428924[_0x122a4d(0x191)]?.({'type':_0x122a4d(0x1fa),'name':_0xa120e2[_0x122a4d(0x228)][_0x122a4d(0x175)],'segmentId':_0x31c4d5}),_0x428924[_0x122a4d(0x179)]?.('Created\x20segment\x20\x27'+_0xa120e2[_0x122a4d(0x228)][_0x122a4d(0x175)]+'\x27'),_0x4150bd[_0x122a4d(0x1c0)]=0x1;}else{if(_0xa120e2[_0x122a4d(0x21d)]){_0x428924[_0x122a4d(0x191)]?.({'type':_0x122a4d(0x190),'name':_0xa120e2[_0x122a4d(0x228)][_0x122a4d(0x175)]});const _0x196382=_0x5e130d(_0xa120e2[_0x122a4d(0x228)]);_0x2b15d9!==_0xa120e2[_0x122a4d(0x19b)]?.[_0x122a4d(0x1aa)]&&(_0x196382[_0x122a4d(0x1aa)]=_0x2b15d9?parseInt(_0x2b15d9,0xa):undefined),await _0x428924[_0x122a4d(0x210)](_0x122a4d(0x22e)+_0xa120e2[_0x122a4d(0x228)][_0x122a4d(0x175)]+'\x27...',()=>_0x42a081['segment']['updateSegmentById'](_0x2cafc0[_0x122a4d(0x16d)],_0xa120e2[_0x122a4d(0x19b)]['id'],_0x196382)),_0x31c4d5=_0xa120e2[_0x122a4d(0x19b)]['id'],_0x428924[_0x122a4d(0x191)]?.({'type':_0x122a4d(0x17b),'name':_0xa120e2[_0x122a4d(0x228)]['name']}),_0x428924['logSuccess']?.('Updated\x20segment\x20\x27'+_0xa120e2[_0x122a4d(0x228)][_0x122a4d(0x175)]+'\x27'),_0x4150bd[_0x122a4d(0x1af)]=0x1;}else _0x31c4d5=_0xa120e2[_0x122a4d(0x19b)]['id'];}}catch(_0x23c2e9){const _0x17b0f1=isHttp400Error(_0x23c2e9),_0x53dcb8=_0x17b0f1?ErrorCode['SEGMENT_SYNTAX_ERROR']:ErrorCode[_0x122a4d(0x23d)],_0x497c06=getErrorMessage(_0x23c2e9);throw new SDKError(_0x53dcb8,_0x122a4d(0x167)+(_0xa120e2[_0x122a4d(0x220)]?'create':_0x122a4d(0x1f5))+'\x20segment\x20from\x20file:\x20'+_0xa120e2[_0x122a4d(0x185)]+_0x122a4d(0x18d)+_0x497c06,_0x23c2e9);}try{const _0x568b80=await syncActivationsForSegment(_0x42a081,_0x2cafc0[_0x122a4d(0x16d)],_0x31c4d5,_0xa120e2[_0x122a4d(0x228)][_0x122a4d(0x175)],_0xa120e2['activationActions'],_0x428924,_0xa120e2[_0x122a4d(0x185)]);_0x4150bd['activations']=_0x568b80;}catch(_0x44463a){if(_0x44463a instanceof SDKError)throw _0x44463a;throw new SDKError(ErrorCode[_0x122a4d(0x1ba)],'Failed\x20to\x20sync\x20activations\x20for\x20segment\x20\x27'+_0xa120e2[_0x122a4d(0x228)][_0x122a4d(0x175)]+'\x27\x20from\x20file:\x20'+_0xa120e2[_0x122a4d(0x185)]+_0x122a4d(0x18d)+getErrorMessage(_0x44463a),_0x44463a);}return _0x4150bd;},_0x50358c=await batchAsync(_0x3f8a28,_0xdfcc68,_0x14f1be),_0x35b396={'created':0x0,'updated':0x0,'deleted':0x0,'createdSegmentIds':new Map(),'activations':{'created':0x0,'updated':0x0,'deleted':0x0}};for(const _0x3a5bab of _0x50358c){_0x35b396['created']+=_0x3a5bab['created'],_0x35b396[_0x5438a0(0x1af)]+=_0x3a5bab[_0x5438a0(0x1af)],_0x3a5bab[_0x5438a0(0x1f7)]&&_0x35b396[_0x5438a0(0x23b)][_0x5438a0(0x1da)](_0x3a5bab[_0x5438a0(0x1f7)][_0x5438a0(0x175)],_0x3a5bab[_0x5438a0(0x1f7)]['id']),_0x35b396[_0x5438a0(0x189)]['created']+=_0x3a5bab['activations']['created'],_0x35b396['activations']['updated']+=_0x3a5bab['activations']['updated'],_0x35b396[_0x5438a0(0x189)][_0x5438a0(0x169)]+=_0x3a5bab['activations'][_0x5438a0(0x169)];}return _0x35b396;}async function syncActivationsForSegment(_0x5cb633,_0x56483c,_0x37b32d,_0x4598e5,_0x26ada5,_0x106ccc,_0x1caae0){const _0x32e609=a101_0x72dc4f,_0x2dbc42={'created':0x0,'updated':0x0,'deleted':0x0};for(const _0x339cd8 of _0x26ada5){try{if(_0x339cd8['type']===_0x32e609(0x230)&&_0x339cd8[_0x32e609(0x22b)])_0x106ccc['onProgress']?.({'type':_0x32e609(0x1ce),'segmentName':_0x4598e5,'activationName':_0x339cd8[_0x32e609(0x175)]}),await _0x106ccc[_0x32e609(0x210)](_0x32e609(0x1c1)+_0x339cd8[_0x32e609(0x175)]+_0x32e609(0x19a),()=>_0x5cb633[_0x32e609(0x233)]['createActivation'](_0x56483c,_0x37b32d,_0x339cd8[_0x32e609(0x22b)])),_0x106ccc[_0x32e609(0x191)]?.({'type':'activation_created','segmentName':_0x4598e5,'activationName':_0x339cd8['name']}),_0x106ccc[_0x32e609(0x179)]?.(_0x32e609(0x1db)+_0x339cd8[_0x32e609(0x175)]+'\x27'),_0x2dbc42['created']++;else{if(_0x339cd8[_0x32e609(0x22d)]===_0x32e609(0x1f5)&&_0x339cd8[_0x32e609(0x22b)]&&_0x339cd8['existingActivation'])_0x106ccc[_0x32e609(0x191)]?.({'type':_0x32e609(0x21b),'segmentName':_0x4598e5,'activationName':_0x339cd8[_0x32e609(0x175)]}),await _0x106ccc['withProgress'](_0x32e609(0x197)+_0x339cd8[_0x32e609(0x175)]+'\x27...',()=>_0x5cb633['segment']['updateActivation'](_0x56483c,_0x37b32d,_0x339cd8['existingActivation']['id'],_0x339cd8['validatedRequest'])),_0x106ccc['onProgress']?.({'type':_0x32e609(0x164),'segmentName':_0x4598e5,'activationName':_0x339cd8[_0x32e609(0x175)]}),_0x106ccc[_0x32e609(0x179)]?.(_0x32e609(0x1c5)+_0x339cd8[_0x32e609(0x175)]+'\x27'),_0x2dbc42[_0x32e609(0x1af)]++;else _0x339cd8['type']==='delete'&&_0x339cd8[_0x32e609(0x1ee)]&&(_0x106ccc['onProgress']?.({'type':_0x32e609(0x203),'segmentName':_0x4598e5,'activationName':_0x339cd8[_0x32e609(0x175)]}),await _0x106ccc[_0x32e609(0x210)](_0x32e609(0x17c)+_0x339cd8[_0x32e609(0x175)]+_0x32e609(0x19a),()=>_0x5cb633[_0x32e609(0x233)]['deleteActivation'](_0x56483c,_0x37b32d,_0x339cd8[_0x32e609(0x1ee)]['id'])),_0x106ccc[_0x32e609(0x191)]?.({'type':_0x32e609(0x1b3),'segmentName':_0x4598e5,'activationName':_0x339cd8[_0x32e609(0x175)]}),_0x106ccc[_0x32e609(0x1b6)]?.(_0x32e609(0x1e5)+_0x339cd8[_0x32e609(0x175)]+'\x27'),_0x2dbc42['deleted']++);}}catch(_0x45ae65){const _0x57b83d=isHttp400Error(_0x45ae65),_0x356adc=_0x57b83d?ErrorCode['ACTIVATION_SYNTAX_ERROR']:ErrorCode[_0x32e609(0x1ba)],_0x326518=getErrorMessage(_0x45ae65);throw new SDKError(_0x356adc,_0x32e609(0x167)+_0x339cd8[_0x32e609(0x22d)]+'\x20activation\x20\x27'+_0x339cd8[_0x32e609(0x175)]+_0x32e609(0x1a1)+_0x1caae0+_0x32e609(0x18d)+_0x326518,_0x45ae65);}}return _0x2dbc42;}export async function executePushFolders(_0x18e190,_0x23f64f,_0xc9c33,_0x521328,_0x392a98){const _0x41ecdb=a101_0x72dc4f,_0x4b20ad=new Map(_0xc9c33);for(const _0x23efd4 of _0x23f64f){const _0x29305c=_0x23efd4[_0x41ecdb(0x1b2)]('/'),_0x3559b7=_0x29305c[_0x29305c[_0x41ecdb(0x20f)]-0x1],_0x48e151=_0x29305c[_0x41ecdb(0x205)](0x0,-0x1)[_0x41ecdb(0x183)]('/'),_0x320796=_0x4b20ad[_0x41ecdb(0x221)](_0x48e151);_0x392a98[_0x41ecdb(0x191)]?.({'type':'folder_creating','folder':_0x23efd4});const _0x44390a={'name':_0x3559b7,'parentFolderId':_0x320796},_0x31f317=await _0x392a98[_0x41ecdb(0x210)](_0x41ecdb(0x1e1)+_0x23efd4+_0x41ecdb(0x19a),()=>_0x18e190[_0x41ecdb(0x233)][_0x41ecdb(0x1ab)](_0x521328[_0x41ecdb(0x16d)],_0x44390a));_0x4b20ad[_0x41ecdb(0x1da)](_0x23efd4,_0x31f317['data']['id']),_0x392a98[_0x41ecdb(0x191)]?.({'type':_0x41ecdb(0x17f),'folder':_0x23efd4,'folderId':_0x31f317['data']['id']}),_0x392a98['logInfo']?.('Created\x20folder\x20\x27'+_0x23efd4+'\x27');}return _0x4b20ad;}export async function executePushSegmentDeletions(_0x50bda2,_0x5dc2de,_0x5760c3){const _0x322b42=a101_0x72dc4f;if(_0x5dc2de[_0x322b42(0x20f)]===0x0)return 0x0;const {batchAsync:_0xef5a17}=await import(_0x322b42(0x1a8)),_0x52d27c=0x5,_0xa69451=await _0xef5a17(_0x5dc2de,async _0x78e3ab=>{const _0xeedb14=_0x322b42;return _0x5760c3['onProgress']?.({'type':_0xeedb14(0x1bf),'name':_0x78e3ab['name']}),await _0x50bda2['segment'][_0xeedb14(0x212)](_0x78e3ab['id']),_0x5760c3[_0xeedb14(0x191)]?.({'type':_0xeedb14(0x1c8),'name':_0x78e3ab[_0xeedb14(0x175)]}),_0x5760c3[_0xeedb14(0x1b6)]?.(_0xeedb14(0x1ad)+_0x78e3ab[_0xeedb14(0x175)]+'\x27'),0x1;},_0x52d27c);return _0xa69451[_0x322b42(0x177)]((_0x4766fc,_0x824116)=>_0x4766fc+_0x824116,0x0);}export async function executePushJourneys(_0x45da7e,_0xadff29,_0x435032,_0x278d34,_0x543529){const _0xb00d7c=a101_0x72dc4f,{journeyDefToRequest:_0x4ed931}=await import(_0xb00d7c(0x173)),{activationDefToCreateRequest:_0x267b2a,yamlRuleToApi:_0xb0240c,validateSegmentRule:_0x578b18}=await import(_0xb00d7c(0x196)),_0x5b8007={'results':[],'created':0x0,'updated':0x0,'embeddedSegmentNameToId':new Map()},_0x389f6a=new Map(_0x435032[_0xb00d7c(0x1a7)]),_0x3fde6f=0x5;for(let _0x513076=0x0;_0x513076<_0xadff29['length'];_0x513076+=_0x3fde6f){const _0x209e52=_0xadff29[_0xb00d7c(0x205)](_0x513076,_0x513076+_0x3fde6f),_0xdde04=await Promise[_0xb00d7c(0x1c6)](_0x209e52[_0xb00d7c(0x195)](async _0x405617=>{const _0x4144ae=_0xb00d7c;if(!_0x405617[_0x4144ae(0x220)]&&!_0x405617[_0x4144ae(0x21d)])return{'action':_0x4144ae(0x1ac),'name':_0x405617[_0x4144ae(0x228)][_0x4144ae(0x175)],'journeyId':_0x405617[_0x4144ae(0x21f)]?.['id']};const _0x3a8eea=_0x405617[_0x4144ae(0x1a9)]?_0x435032[_0x4144ae(0x1f6)][_0x4144ae(0x221)](_0x405617['folderPath']):undefined;_0x543529[_0x4144ae(0x191)]?.({'type':_0x405617['isNew']?'journey_creating':'journey_updating','name':_0x405617[_0x4144ae(0x228)][_0x4144ae(0x175)]});try{const _0x99e9e6=await executeSingleJourneyPush(_0x45da7e,_0x405617,{..._0x435032,'segmentNameToId':_0x389f6a},{'parentId':_0x278d34[_0x4144ae(0x16d)],'rootFolderId':_0x278d34[_0x4144ae(0x227)],'folderId':_0x3a8eea,'verbose':_0x278d34['verbose']},_0x543529,{'journeyDefToRequest':_0x4ed931,'activationDefToCreateRequest':_0x267b2a,'yamlRuleToApi':_0xb0240c,'validateSegmentRule':_0x578b18});for(const [_0x2bba8e,_0x594eff]of _0x99e9e6[_0x4144ae(0x1b0)]){_0x389f6a[_0x4144ae(0x1da)](_0x2bba8e,_0x594eff),_0x5b8007[_0x4144ae(0x1b0)][_0x4144ae(0x1da)](_0x2bba8e,_0x594eff);}if(_0x99e9e6['action']===_0x4144ae(0x1c0))_0x543529[_0x4144ae(0x191)]?.({'type':_0x4144ae(0x187),'name':_0x405617[_0x4144ae(0x228)][_0x4144ae(0x175)],'journeyId':_0x99e9e6[_0x4144ae(0x1b7)]}),_0x543529[_0x4144ae(0x179)]?.(_0x4144ae(0x1e6)+_0x405617[_0x4144ae(0x228)]['name']+'\x27'),_0x5b8007[_0x4144ae(0x1c0)]++;else _0x99e9e6[_0x4144ae(0x215)]===_0x4144ae(0x1af)&&(_0x543529[_0x4144ae(0x191)]?.({'type':_0x4144ae(0x193),'name':_0x405617[_0x4144ae(0x228)][_0x4144ae(0x175)]}),_0x543529[_0x4144ae(0x179)]?.('Updated\x20journey\x20\x27'+_0x405617[_0x4144ae(0x228)][_0x4144ae(0x175)]+'\x27'),_0x5b8007[_0x4144ae(0x1af)]++);return{'action':_0x99e9e6[_0x4144ae(0x215)],'name':_0x405617[_0x4144ae(0x228)][_0x4144ae(0x175)],'journeyId':_0x99e9e6[_0x4144ae(0x1b7)]};}catch(_0x6ec341){const _0x4f2aef=isHttp400Error(_0x6ec341),_0x493874=_0x4f2aef?ErrorCode[_0x4144ae(0x1f8)]:ErrorCode[_0x4144ae(0x199)],_0x2b7539=getErrorMessage(_0x6ec341);throw new SDKError(_0x493874,_0x4144ae(0x167)+(_0x405617[_0x4144ae(0x220)]?_0x4144ae(0x230):_0x4144ae(0x1f5))+'\x20journey\x20from\x20file:\x20'+_0x405617[_0x4144ae(0x185)]+_0x4144ae(0x18d)+_0x2b7539,_0x6ec341);}}));_0x5b8007[_0xb00d7c(0x16b)][_0xb00d7c(0x1c3)](..._0xdde04);}return _0x5b8007;}async function executeSingleJourneyPush(_0x226c8d,_0xe1b7d4,_0x87e331,_0x163702,_0x3b1a65,_0x2d1a78){const _0x10d8d3=a101_0x72dc4f,{journeyDefToRequest:_0x44ac1a,activationDefToCreateRequest:_0x21ed27,yamlRuleToApi:_0x293e9d,validateSegmentRule:_0x2b1fbf}=_0x2d1a78,_0x56879a=new Map(),_0x182533=new Map(),_0x3c0cf9=new Map(),_0x28d38f=new Map(),_0x23381a=new Map();let _0xfd0da;const _0x561e76=async()=>{const _0x3199df=a101_0xd6a4;if(_0xfd0da)return;_0xfd0da=new Map();if(!_0xe1b7d4[_0x3199df(0x21f)])return;const _0x4708c4=await _0x226c8d[_0x3199df(0x160)][_0x3199df(0x1d3)](_0xe1b7d4['existingJourney']['id']);for(const _0x3faa87 of _0x4708c4){const _0x8d2d69=journeyActivationStepToYaml(_0x3faa87,_0x87e331[_0x3199df(0x176)],_0x87e331[_0x3199df(0x239)]),_0x4b2ab1=activationSignature(_0x8d2d69);!_0xfd0da[_0x3199df(0x1f3)](_0x4b2ab1)&&_0xfd0da['set'](_0x4b2ab1,_0x3faa87['id']),_0x8d2d69[_0x3199df(0x175)]&&_0x182533[_0x3199df(0x1da)](_0x8d2d69[_0x3199df(0x175)],_0x3faa87['id']);}};if(_0xe1b7d4[_0x10d8d3(0x21f)]&&_0xe1b7d4[_0x10d8d3(0x228)][_0x10d8d3(0x17e)]){const _0x156967=buildLocalExpandedRuleMappings(_0xe1b7d4['yamlConfig']),_0x111f17=_0x156967[_0x10d8d3(0x1e2)];if(_0x111f17[_0x10d8d3(0x226)]>0x0){const _0x2e1f84=new Map();for(const [_0x3d8585,_0x29c0f6]of _0x111f17){const _0x577692=serializeExpandedRule(_0x29c0f6,_0x111f17);_0x2e1f84[_0x10d8d3(0x1da)](_0x3d8585,_0x577692);}const _0x4f34ba=collectSegmentIdsFromJourneyApi(_0xe1b7d4[_0x10d8d3(0x21f)]);if(_0x4f34ba['size']>0x0){const _0x4f1f72=await buildServerSegmentRuleMap(_0x226c8d,_0x163702[_0x10d8d3(0x16d)],_0x87e331[_0x10d8d3(0x1fd)],_0x4f34ba);if(_0x4f1f72['size']>0x0){const _0x2afcb4=new Map();for(const [_0x13b052,_0x1b78e9]of _0x4f1f72){const _0x262106=serializeExpandedRule(_0x1b78e9,_0x4f1f72);!_0x2afcb4[_0x10d8d3(0x1f3)](_0x262106)&&_0x2afcb4['set'](_0x262106,_0x13b052);}for(const [_0x4fc25a,_0x40190e]of _0x2e1f84){const _0x453063=_0x2afcb4[_0x10d8d3(0x221)](_0x40190e);_0x453063&&(_0x23381a[_0x10d8d3(0x1da)](_0x4fc25a,_0x453063),_0x87e331[_0x10d8d3(0x1a7)][_0x10d8d3(0x1da)](_0x4fc25a,_0x453063));}}}}}const _0x27cc32={'resolveSegmentId':async _0x13b5d6=>{const _0xd98656=_0x10d8d3,_0x4d8b37=_0x87e331[_0xd98656(0x1a7)][_0xd98656(0x221)](_0x13b5d6);if(!_0x4d8b37)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0xd98656(0x1d7)+_0x13b5d6+'\x20(referenced\x20in\x20journey\x20'+_0xe1b7d4[_0xd98656(0x228)][_0xd98656(0x175)]+')');return _0x4d8b37;},'resolveEmbeddedSegmentId':async(_0x29f30e,_0x445afe)=>{const _0x2d3ea6=_0x10d8d3,_0x1b8ccb=_0x87e331[_0x2d3ea6(0x1a7)]['get'](_0x29f30e);if(_0x1b8ccb)return _0x1b8ccb;const _0x2ce7ca=_0x23381a[_0x2d3ea6(0x221)](_0x29f30e);if(_0x2ce7ca)return _0x87e331[_0x2d3ea6(0x1a7)][_0x2d3ea6(0x1da)](_0x29f30e,_0x2ce7ca),_0x2ce7ca;const _0x319769=_0x87e331[_0x2d3ea6(0x1fd)]['find'](_0x5b9c1c=>_0x5b9c1c[_0x2d3ea6(0x175)]===_0x29f30e);if(_0x319769)return _0x87e331[_0x2d3ea6(0x1a7)]['set'](_0x29f30e,_0x319769['id']),_0x319769['id'];if(_0xe1b7d4[_0x2d3ea6(0x220)]){const {stageName:_0xb6346c,criteriaName:_0x280f46}=findSegmentCriteriaLocation(_0xe1b7d4[_0x2d3ea6(0x228)],_0x29f30e);return _0x2b1fbf(_0x29f30e,_0x445afe['rule']),_0x3c0cf9[_0x2d3ea6(0x1da)](_0x29f30e,{'definition':_0x445afe,'stageName':_0xb6346c,'criteriaName':_0x280f46}),createPendingSegmentId(_0x29f30e);}const _0x5d53ef=_0xe1b7d4['existingJourney']?.['id'];if(!_0x5d53ef)throw new SDKError(ErrorCode[_0x2d3ea6(0x21a)],_0x2d3ea6(0x20e));_0x2b1fbf(_0x29f30e,_0x445afe['rule']);const _0x113645=generateDeterministicJourneySegmentName(_0xe1b7d4['yamlConfig']['name'],_0x29f30e),_0x5e439b=_0x87e331[_0x2d3ea6(0x1fd)][_0x2d3ea6(0x1dc)](_0x1d1c80=>_0x1d1c80[_0x2d3ea6(0x175)]===_0x113645),_0x18487f=createSegmentIdResolver(_0x87e331[_0x2d3ea6(0x1a7)],_0x29f30e),_0x5d59c1=await resolveRuleSegmentIds(_0x445afe[_0x2d3ea6(0x16c)],_0x18487f);let _0x18ba9e;if(_0x5e439b)await _0x226c8d[_0x2d3ea6(0x233)][_0x2d3ea6(0x223)](_0x163702['parentId'],_0x5e439b['id'],{'description':_0x445afe['description']||_0x2d3ea6(0x1a6)+_0x29f30e,'rule':_0x293e9d(_0x5d59c1,!![]),'countPopulation':!![]}),_0x18ba9e=_0x5e439b['id'];else try{_0x18ba9e=await _0x226c8d['segment'][_0x2d3ea6(0x1a5)]({'name':_0x113645,'description':_0x445afe[_0x2d3ea6(0x1ca)]||_0x2d3ea6(0x1a6)+_0x29f30e,'journeyId':_0x5d53ef,'rule':_0x293e9d(_0x5d59c1,!![]),'countPopulation':!![],'parentFolderId':_0x163702['rootFolderId']||'','audienceId':_0x163702['parentId']});}catch(_0x1424f7){const _0x53c3c3=_0x1424f7 instanceof Error&&_0x1424f7['message']['includes'](_0x2d3ea6(0x1cf));if(_0x53c3c3){const _0x18bd0c=await _0x226c8d[_0x2d3ea6(0x233)]['listSegments'](_0x163702[_0x2d3ea6(0x16d)]),_0x2879d7=_0x18bd0c['find'](_0x36a9c3=>_0x36a9c3[_0x2d3ea6(0x175)]===_0x113645);if(_0x2879d7)await _0x226c8d[_0x2d3ea6(0x233)]['updateSegmentById'](_0x163702[_0x2d3ea6(0x16d)],_0x2879d7['id'],{'description':_0x445afe['description']||'Entry\x20criteria:\x20'+_0x29f30e,'rule':_0x293e9d(_0x5d59c1,!![]),'countPopulation':!![]}),_0x18ba9e=_0x2879d7['id'];else throw _0x1424f7;}else throw _0x1424f7;}return _0x87e331['segmentNameToId']['set'](_0x29f30e,_0x18ba9e),_0x56879a[_0x2d3ea6(0x1da)](_0x29f30e,_0x18ba9e),_0x18ba9e;},'resolveActivationId':async _0x5d52a3=>{const _0x2b0e9=_0x10d8d3,_0x56d21d=_0x182533[_0x2b0e9(0x221)](_0x5d52a3);if(_0x56d21d)return _0x56d21d;if(_0xe1b7d4['existingJourney']){await _0x561e76();const _0x2e1fdd=_0x182533[_0x2b0e9(0x221)](_0x5d52a3);if(_0x2e1fdd)return _0x2e1fdd;}throw new SDKError(ErrorCode[_0x2b0e9(0x1e3)],_0x2b0e9(0x1a2)+_0x5d52a3+_0x2b0e9(0x229)+_0xe1b7d4[_0x2b0e9(0x228)][_0x2b0e9(0x175)]+_0x2b0e9(0x1dd)+_0x2b0e9(0x170));},'resolveEmbeddedActivationId':async(_0x138caa,_0x2f63ab)=>{const _0x4ddc53=_0x10d8d3,_0xba9af=_0x182533['get'](_0x138caa);if(_0xba9af)return _0xba9af;if(_0xe1b7d4[_0x4ddc53(0x220)])return _0x28d38f[_0x4ddc53(0x1da)](_0x138caa,_0x2f63ab),createPendingActivationId(_0x138caa);if(_0xe1b7d4[_0x4ddc53(0x21f)]){await _0x561e76();const _0x26b67a=_0x182533['get'](_0x2f63ab[_0x4ddc53(0x175)]);if(_0x26b67a)return _0x182533[_0x4ddc53(0x1da)](_0x138caa,_0x26b67a),_0x26b67a;const _0x1af481=activationSignature(_0x2f63ab),_0x5aa477=_0xfd0da?.[_0x4ddc53(0x221)](_0x1af481);if(_0x5aa477)return _0x182533[_0x4ddc53(0x1da)](_0x138caa,_0x5aa477),_0x5aa477;const _0x4d79f8=await _0x21ed27(_0x2f63ab,_0x87e331[_0x4ddc53(0x1b8)]),_0x46fb57=await _0x226c8d['journey']['createActivation'](_0xe1b7d4[_0x4ddc53(0x21f)]['id'],_0x4d79f8);return _0x182533['set'](_0x138caa,_0x46fb57['id']),_0x46fb57['id'];}throw new SDKError(ErrorCode[_0x4ddc53(0x21a)],_0x4ddc53(0x225));},'resolveJourneyId':async _0x47ba82=>{const _0x45e69c=_0x10d8d3;try{return await _0x226c8d[_0x45e69c(0x160)][_0x45e69c(0x1cb)](_0x163702[_0x45e69c(0x16d)],_0x47ba82);}catch(_0x5063f4){throw new SDKError(ErrorCode['NOT_FOUND'],'Journey\x20\x27'+_0x47ba82+'\x27\x20not\x20found\x20in\x20parent\x20segment\x20(referenced\x20in\x20jump\x20step\x20of\x20\x27'+_0xe1b7d4[_0x45e69c(0x228)][_0x45e69c(0x175)]+'\x27)',_0x5063f4);}},'resolveStageId':async(_0x4ac93f,_0x71127f)=>{const _0x5aec16=_0x10d8d3,_0xb1dc8b=await _0x226c8d[_0x5aec16(0x160)][_0x5aec16(0x1a0)](_0x4ac93f),_0x3206ff=_0xb1dc8b[_0x5aec16(0x235)][_0x5aec16(0x1b5)][_0x5aec16(0x1dc)](_0x1619d3=>_0x1619d3[_0x5aec16(0x175)][_0x5aec16(0x213)]()===_0x71127f['toLowerCase']());if(!_0x3206ff?.['id'])throw new SDKError(ErrorCode[_0x5aec16(0x1e3)],_0x5aec16(0x17d)+_0x71127f+_0x5aec16(0x1fc)+(_0xb1dc8b['attributes'][_0x5aec16(0x1ff)]||_0xb1dc8b[_0x5aec16(0x235)][_0x5aec16(0x175)])+'\x27');return _0x3206ff['id'];}},_0x24a21b=await _0x44ac1a(_0xe1b7d4[_0x10d8d3(0x228)],_0x163702[_0x10d8d3(0x16d)],_0x27cc32),_0xf4fd55=_0x163702[_0x10d8d3(0x1a3)]||_0x163702[_0x10d8d3(0x227)];_0xf4fd55&&(_0x24a21b[_0x10d8d3(0x1e0)]={'parentFolder':{'data':{'id':_0xf4fd55,'type':_0x10d8d3(0x217)}}});if(_0xe1b7d4['isNew']){if(_0x3c0cf9[_0x10d8d3(0x226)]>0x0||_0x28d38f['size']>0x0)return await executeThreeStepJourneyCreate(_0x226c8d,_0xe1b7d4,_0x24a21b,{'pendingEmbeddedSegments':_0x3c0cf9,'pendingEmbeddedActivations':_0x28d38f,'embeddedSegmentNameToId':_0x56879a,'journeyActivationNameToId':_0x182533},{..._0x163702,'effectiveFolderId':_0xf4fd55},_0x87e331,_0x3b1a65,_0x2d1a78);else{ensureJourneyDefaults(_0x24a21b['attributes']);const _0x55f856=await _0x226c8d[_0x10d8d3(0x160)][_0x10d8d3(0x230)](_0x24a21b);return{'action':_0x10d8d3(0x1c0),'journeyId':_0x55f856['id'],'embeddedSegmentNameToId':_0x56879a};}}else{if(_0xe1b7d4[_0x10d8d3(0x21d)]&&_0xe1b7d4[_0x10d8d3(0x21f)])return ensureJourneyDefaults(_0x24a21b['attributes']),await _0x226c8d['journey'][_0x10d8d3(0x1f5)](_0xe1b7d4[_0x10d8d3(0x21f)]['id'],_0x24a21b),{'action':_0x10d8d3(0x1af),'journeyId':_0xe1b7d4[_0x10d8d3(0x21f)]['id'],'embeddedSegmentNameToId':_0x56879a};}return{'action':_0x10d8d3(0x1ac),'journeyId':_0xe1b7d4['existingJourney']?.['id'],'embeddedSegmentNameToId':_0x56879a};}function findSegmentCriteriaLocation(_0xca4ce2,_0xf84bbd){const _0x84f897=a101_0x72dc4f,_0x3ca5af=_0xca4ce2[_0x84f897(0x1d9)]||_0xca4ce2[_0x84f897(0x1d5)]?.[0x0]?.['stages']||[];let _0x3602b3='entry',_0x2ed4aa=_0xf84bbd;const _0x423de0=_0xca4ce2[_0x84f897(0x166)]||_0xca4ce2['journeys']?.[0x0]?.[_0x84f897(0x166)];if(_0x423de0?.['segment']===_0xf84bbd)return{'stageName':_0x84f897(0x166),'criteriaName':_0x423de0['name']||_0xf84bbd};_0x348107:for(const _0x4701f1 of _0x3ca5af){if(_0x4701f1[_0x84f897(0x20d)]?.[_0x84f897(0x233)]===_0xf84bbd){_0x3602b3=_0x4701f1[_0x84f897(0x175)],_0x2ed4aa=_0x4701f1[_0x84f897(0x20d)]['name']||_0xf84bbd;break;}if(_0x4701f1['steps'])for(const _0x4235b3 of _0x4701f1[_0x84f897(0x22a)]){if(_0x4235b3[_0x84f897(0x22d)]===_0x84f897(0x234)&&_0x4235b3[_0x84f897(0x1f9)]?.[_0x84f897(0x1b1)])for(const _0xbe5f00 of _0x4235b3['with'][_0x84f897(0x1b1)]){if(_0xbe5f00[_0x84f897(0x233)]===_0xf84bbd){_0x3602b3=_0x4701f1['name'],_0x2ed4aa=_0xbe5f00['name']||_0xf84bbd;break _0x348107;}}}}return{'stageName':_0x3602b3,'criteriaName':_0x2ed4aa};}async function executeThreeStepJourneyCreate(_0x2a921f,_0xcfe085,_0x22499f,_0x356975,_0x15fd7a,_0x2f1def,_0x5cde78,_0x302cc1){const _0x3b91de=a101_0x72dc4f,{activationDefToCreateRequest:_0x3c2fa5,yamlRuleToApi:_0x13fb06}=_0x302cc1,{pendingEmbeddedSegments:_0x22670c,pendingEmbeddedActivations:_0x9cc18a,embeddedSegmentNameToId:_0x4ab538}=_0x356975,_0x4557b7=JSON['parse'](JSON[_0x3b91de(0x184)](_0x22499f));ensureJourneyDefaults(_0x4557b7['attributes']),stripPendingIds(_0x4557b7);const _0x484c9d=await _0x2a921f['journey'][_0x3b91de(0x230)](_0x4557b7),_0x1f1c58=_0x484c9d['id'],_0x18f1b2=new Map();for(const _0x58578c of _0x484c9d[_0x3b91de(0x235)][_0x3b91de(0x1b5)]){_0x18f1b2[_0x3b91de(0x1da)](_0x58578c[_0x3b91de(0x175)][_0x3b91de(0x213)](),_0x58578c['id']);}for(const [_0x15dd31,{definition:_0x5bc6ac}]of _0x22670c){const _0x4505f0=generateDeterministicJourneySegmentName(_0xcfe085[_0x3b91de(0x228)][_0x3b91de(0x175)],_0x15dd31);_0x5cde78[_0x3b91de(0x191)]?.({'type':_0x3b91de(0x19c),'journeyName':_0xcfe085[_0x3b91de(0x228)][_0x3b91de(0x175)],'segmentName':_0x15dd31});const _0x50f798=createSegmentIdResolver(_0x2f1def[_0x3b91de(0x1a7)],_0x15dd31),_0x1f2cb8=await resolveRuleSegmentIds(_0x5bc6ac[_0x3b91de(0x16c)],_0x50f798),_0x9dbe0d=await _0x2a921f[_0x3b91de(0x233)][_0x3b91de(0x1a5)]({'name':_0x4505f0,'description':_0x5bc6ac[_0x3b91de(0x1ca)]||_0x3b91de(0x1a6)+_0x15dd31,'journeyId':_0x1f1c58,'rule':_0x13fb06(_0x1f2cb8,!![]),'countPopulation':!![],'parentFolderId':_0x15fd7a[_0x3b91de(0x16a)]||'','audienceId':_0x15fd7a[_0x3b91de(0x16d)]});_0x4ab538[_0x3b91de(0x1da)](_0x15dd31,_0x9dbe0d),_0x2f1def[_0x3b91de(0x1a7)][_0x3b91de(0x1da)](_0x15dd31,_0x9dbe0d),_0x5cde78[_0x3b91de(0x191)]?.({'type':_0x3b91de(0x1d1),'journeyName':_0xcfe085['yamlConfig']['name'],'segmentName':_0x15dd31});}const _0x4a0b10=new Map();for(const [_0x3b0914,_0x103612]of _0x9cc18a){_0x5cde78[_0x3b91de(0x191)]?.({'type':'embedded_activation_creating','journeyName':_0xcfe085['yamlConfig'][_0x3b91de(0x175)],'activationName':_0x3b0914});const _0x4edd41=await _0x3c2fa5(_0x103612,_0x2f1def[_0x3b91de(0x1b8)]),_0x34a9c9=await _0x2a921f[_0x3b91de(0x160)][_0x3b91de(0x16e)](_0x1f1c58,_0x4edd41);_0x4a0b10[_0x3b91de(0x1da)](_0x3b0914,_0x34a9c9['id']),_0x356975[_0x3b91de(0x208)][_0x3b91de(0x1da)](_0x3b0914,_0x34a9c9['id']),_0x5cde78[_0x3b91de(0x191)]?.({'type':_0x3b91de(0x1ae),'journeyName':_0xcfe085[_0x3b91de(0x228)][_0x3b91de(0x175)],'activationName':_0x3b0914});}const _0x5c6f4f=JSON[_0x3b91de(0x207)](JSON[_0x3b91de(0x184)](_0x22499f));return _0x5c6f4f['id']=_0x1f1c58,ensureJourneyDefaults(_0x5c6f4f[_0x3b91de(0x235)]),resolvePendingIdsInRequest(_0x5c6f4f,_0x22499f,_0x18f1b2,_0x4ab538,_0x4a0b10,_0x5cde78),await _0x2a921f['journey'][_0x3b91de(0x1f5)](_0x1f1c58,_0x5c6f4f),{'action':_0x3b91de(0x1c0),'journeyId':_0x1f1c58,'embeddedSegmentNameToId':_0x4ab538};}function stripPendingIds(_0x2b1058){const _0x3a64c6=a101_0x72dc4f;for(const _0x4d1bd0 of _0x2b1058[_0x3a64c6(0x235)][_0x3a64c6(0x1b5)]||[]){_0x4d1bd0['entryCriteria']?.[_0x3a64c6(0x1df)]&&isPendingSegmentId(_0x4d1bd0[_0x3a64c6(0x232)][_0x3a64c6(0x1df)])&&delete _0x4d1bd0['entryCriteria'];if(_0x4d1bd0[_0x3a64c6(0x22a)])for(const _0x4c2fa5 of Object[_0x3a64c6(0x16f)](_0x4d1bd0[_0x3a64c6(0x22a)])){const _0x4783de=_0x4d1bd0[_0x3a64c6(0x22a)][_0x4c2fa5];_0x4783de[_0x3a64c6(0x22d)]==='Activation'&&_0x4783de[_0x3a64c6(0x1cc)]&&isPendingActivationId(_0x4783de[_0x3a64c6(0x1cc)])&&(_0x4783de['journeyActivationStepId']='');if(_0x4783de[_0x3a64c6(0x22d)]===_0x3a64c6(0x1bc)&&_0x4783de[_0x3a64c6(0x1b1)])for(const _0x4145ce of _0x4783de['branches']){_0x4145ce[_0x3a64c6(0x1df)]&&isPendingSegmentId(_0x4145ce[_0x3a64c6(0x1df)])&&(_0x4145ce[_0x3a64c6(0x1df)]='');}_0x4783de['type']===_0x3a64c6(0x18e)&&_0x4783de[_0x3a64c6(0x161)]?.[_0x3a64c6(0x1df)]&&isPendingSegmentId(_0x4783de[_0x3a64c6(0x161)][_0x3a64c6(0x1df)])&&(_0x4783de[_0x3a64c6(0x161)]['segmentId']='');}}}function resolvePendingIdsInRequest(_0x294804,_0x1415a0,_0x36c17b,_0x1aa0bd,_0x2ffe52,_0x1f4bcc){const _0x1583fc=a101_0x72dc4f,_0x4649f9=(_0x6d4ad,_0x18904f)=>{const _0x3f3688=a101_0xd6a4;if(!isPendingSegmentId(_0x6d4ad))return _0x6d4ad;const _0x48ca7e=extractPendingSegmentName(_0x6d4ad),_0x30888b=_0x1aa0bd[_0x3f3688(0x221)](_0x48ca7e);return!_0x30888b&&_0x1f4bcc[_0x3f3688(0x23c)]?.('Warning:\x20Could\x20not\x20resolve\x20embedded\x20segment\x20\x27'+_0x48ca7e+_0x3f3688(0x201)+_0x18904f),_0x30888b;};if(_0x294804[_0x1583fc(0x235)][_0x1583fc(0x166)]?.[_0x1583fc(0x1df)]&&isPendingSegmentId(_0x294804['attributes'][_0x1583fc(0x166)]['segmentId'])){const _0x39d194=_0x4649f9(_0x294804[_0x1583fc(0x235)][_0x1583fc(0x166)]['segmentId'],_0x1583fc(0x178));_0x39d194&&(_0x294804[_0x1583fc(0x235)][_0x1583fc(0x166)]['segmentId']=_0x39d194);}for(const _0x3211e7 of _0x294804[_0x1583fc(0x235)][_0x1583fc(0x1b5)]||[]){const _0x3601b1=_0x36c17b['get'](_0x3211e7[_0x1583fc(0x175)][_0x1583fc(0x213)]());_0x3601b1&&(_0x3211e7['id']=_0x3601b1);if(_0x3211e7[_0x1583fc(0x232)]?.[_0x1583fc(0x1df)]&&isPendingSegmentId(_0x3211e7[_0x1583fc(0x232)][_0x1583fc(0x1df)])){const _0x28c736=_0x4649f9(_0x3211e7[_0x1583fc(0x232)][_0x1583fc(0x1df)],_0x1583fc(0x163)+_0x3211e7[_0x1583fc(0x175)]+_0x1583fc(0x1a4));_0x28c736&&(_0x3211e7[_0x1583fc(0x232)][_0x1583fc(0x1df)]=_0x28c736);}if(_0x3211e7[_0x1583fc(0x1d2)])for(const _0x5ba52e of _0x3211e7[_0x1583fc(0x1d2)]){if(_0x5ba52e['segmentId']&&isPendingSegmentId(_0x5ba52e[_0x1583fc(0x1df)])){const _0xdf7fea=_0x4649f9(_0x5ba52e[_0x1583fc(0x1df)],_0x1583fc(0x163)+_0x3211e7['name']+_0x1583fc(0x1bb));_0xdf7fea&&(_0x5ba52e[_0x1583fc(0x1df)]=_0xdf7fea);}}if(_0x3211e7[_0x1583fc(0x1ed)]?.[_0x1583fc(0x1df)]&&isPendingSegmentId(_0x3211e7[_0x1583fc(0x1ed)][_0x1583fc(0x1df)])){const _0x20c5cc=_0x4649f9(_0x3211e7['milestone']['segmentId'],_0x1583fc(0x163)+_0x3211e7[_0x1583fc(0x175)]+_0x1583fc(0x172));_0x20c5cc&&(_0x3211e7[_0x1583fc(0x1ed)][_0x1583fc(0x1df)]=_0x20c5cc);}if(_0x3211e7['steps']){const _0x412df8=_0x557851=>_0x1415a0[_0x1583fc(0x235)][_0x1583fc(0x1b5)][_0x1583fc(0x1dc)](_0x23efc7=>_0x23efc7[_0x1583fc(0x175)]['toLowerCase']()===_0x3211e7[_0x1583fc(0x175)]['toLowerCase']())?.[_0x1583fc(0x22a)]?.[_0x557851];for(const _0x6f4277 of Object[_0x1583fc(0x16f)](_0x3211e7[_0x1583fc(0x22a)])){const _0x30d05a=_0x3211e7['steps'][_0x6f4277],_0x5335ca=_0x412df8(_0x6f4277);if(_0x30d05a[_0x1583fc(0x22d)]===_0x1583fc(0x1e7)&&_0x30d05a[_0x1583fc(0x1cc)]&&(isPendingActivationId(_0x30d05a[_0x1583fc(0x1cc)])||_0x30d05a[_0x1583fc(0x1cc)]==='')){if(_0x5335ca?.[_0x1583fc(0x1cc)]&&isPendingActivationId(_0x5335ca[_0x1583fc(0x1cc)])){const _0x246790=extractPendingActivationName(_0x5335ca[_0x1583fc(0x1cc)]),_0x49d2af=_0x2ffe52[_0x1583fc(0x221)](_0x246790);_0x49d2af&&(_0x30d05a[_0x1583fc(0x1cc)]=_0x49d2af);}}if(_0x30d05a[_0x1583fc(0x22d)]==='DecisionPoint'&&_0x30d05a['branches']&&_0x5335ca?.['branches'])for(let _0x5d74e4=0x0;_0x5d74e4<_0x30d05a[_0x1583fc(0x1b1)][_0x1583fc(0x20f)];_0x5d74e4++){const _0x1330f2=_0x30d05a[_0x1583fc(0x1b1)][_0x5d74e4],_0x12b0d4=_0x5335ca[_0x1583fc(0x1b1)][_0x5d74e4];if(_0x12b0d4?.[_0x1583fc(0x1df)]&&isPendingSegmentId(_0x12b0d4[_0x1583fc(0x1df)])){const _0x3be622=_0x4649f9(_0x12b0d4['segmentId'],_0x1583fc(0x163)+_0x3211e7[_0x1583fc(0x175)]+'\x27\x20decision\x20point\x20branch\x20\x27'+(_0x1330f2[_0x1583fc(0x175)]||_0x5d74e4)+'\x27');_0x3be622&&(_0x1330f2[_0x1583fc(0x1df)]=_0x3be622);}}if(_0x30d05a[_0x1583fc(0x22d)]===_0x1583fc(0x18e)&&_0x30d05a[_0x1583fc(0x161)]?.[_0x1583fc(0x1df)]&&_0x5335ca?.[_0x1583fc(0x161)]?.[_0x1583fc(0x1df)]&&isPendingSegmentId(_0x5335ca[_0x1583fc(0x161)]['segmentId'])){const _0x36e9b8=_0x4649f9(_0x5335ca[_0x1583fc(0x161)]['segmentId'],_0x1583fc(0x163)+_0x3211e7[_0x1583fc(0x175)]+_0x1583fc(0x182));_0x36e9b8&&(_0x30d05a[_0x1583fc(0x161)][_0x1583fc(0x1df)]=_0x36e9b8);}}}}}
|
|
1
|
+
const a101_0x152b06=a101_0x1e36;(function(_0x58327e,_0x54ddfb){const _0x311a2d=a101_0x1e36,_0x578c8c=_0x58327e();while(!![]){try{const _0x1547ba=-parseInt(_0x311a2d(0x1a9))/0x1+parseInt(_0x311a2d(0xfc))/0x2*(parseInt(_0x311a2d(0x132))/0x3)+-parseInt(_0x311a2d(0x146))/0x4*(-parseInt(_0x311a2d(0x199))/0x5)+-parseInt(_0x311a2d(0x1a5))/0x6*(-parseInt(_0x311a2d(0x18c))/0x7)+parseInt(_0x311a2d(0x14c))/0x8*(-parseInt(_0x311a2d(0xe8))/0x9)+-parseInt(_0x311a2d(0x186))/0xa*(-parseInt(_0x311a2d(0x156))/0xb)+parseInt(_0x311a2d(0x163))/0xc;if(_0x1547ba===_0x54ddfb)break;else _0x578c8c['push'](_0x578c8c['shift']());}catch(_0x21be8f){_0x578c8c['push'](_0x578c8c['shift']());}}}(a101_0x4b5d,0xb3759));import{createHash}from'crypto';export const PENDING_SEGMENT_PREFIX=a101_0x152b06(0xf9);export const PENDING_ACTIVATION_PREFIX=a101_0x152b06(0x18d);export function createPendingSegmentId(_0x4bec63){return''+PENDING_SEGMENT_PREFIX+_0x4bec63+'__';}export function isPendingSegmentId(_0x452fe8){const _0x4fd772=a101_0x152b06;return _0x452fe8[_0x4fd772(0x1c7)](PENDING_SEGMENT_PREFIX);}export function extractPendingSegmentName(_0x5987be){return _0x5987be['replace'](/^__pending_(.+)__$/,'$1');}export function createPendingActivationId(_0xe05f2){return''+PENDING_ACTIVATION_PREFIX+_0xe05f2+'__';}export function isPendingActivationId(_0xe2796a){const _0x7a0bbe=a101_0x152b06;return _0xe2796a[_0x7a0bbe(0x1c7)](PENDING_ACTIVATION_PREFIX);}export function extractPendingActivationName(_0xedd61f){const _0x45d4bb=a101_0x152b06;return _0xedd61f[_0x45d4bb(0x187)](/^__pending_act_(.+)__$/,'$1');}function generateDeterministicJourneySegmentName(_0x462748,_0x3d4516){const _0x3b681e=a101_0x152b06,_0x2f41fc=_0x462748+'::'+(_0x3d4516['trim']()||'segment'),_0x489931=createHash(_0x3b681e(0x1c2))[_0x3b681e(0x188)](_0x2f41fc)[_0x3b681e(0x12f)](_0x3b681e(0x130))['slice'](0x0,0xc);return _0x3b681e(0x14e)+_0x489931;}export function ensureJourneyDefaults(_0x13cb40){const _0x256cc9=a101_0x152b06;!_0x13cb40[_0x256cc9(0xf2)]&&(_0x13cb40['description']=''),!_0x13cb40[_0x256cc9(0x148)]&&(_0x13cb40[_0x256cc9(0x148)]=_0x256cc9(0x15f));}export function resolveTDFolderPath(_0x45bb38,_0x180ada,_0x1b5df8){if(!_0x180ada)return _0x45bb38;if(_0x45bb38===_0x1b5df8||_0x45bb38['startsWith'](_0x1b5df8+'/'))return _0x45bb38;return _0x45bb38?_0x1b5df8+'/'+_0x45bb38:_0x1b5df8;}export function addFoldersToCreate(_0x481e25,_0x346799,_0x1a57a7){const _0xf01ebf=a101_0x152b06;if(!_0x481e25)return;if(_0x346799['has'](_0x481e25))return;const _0x54b1a4=_0x481e25[_0xf01ebf(0x13f)]('/');let _0x2938da='';for(const _0x1157cc of _0x54b1a4){_0x2938da=_0x2938da?_0x2938da+'/'+_0x1157cc:_0x1157cc,!_0x346799[_0xf01ebf(0x193)](_0x2938da)&&_0x1a57a7[_0xf01ebf(0x139)](_0x2938da);}}import*as a101_0x2a924c from'yaml';import{readFileSync}from'fs';import a101_0x5b2ffe from'path';import{isJourneyDef,parseYamlString as a101_0x490132,toYamlString as a101_0x2315d0,normalizeJourneyDef,hasMultipleVersions,journeyResponseToDef,collectSegmentIdsFromJourneyApi}from'./journey-yaml.js';import{SEGMENT_KIND_JOURNEY,generateJourneyLocalName,sanitizeYamlKey,createJumpTargetCache,resolveJumpTarget,buildMergedJourneyDef,buildLocalRuleToNameMappingFromJourney,collectSegmentUsageCounts}from'./journey-utils.js';import{activationResponseToDef,segmentToYamlString,segmentWithActivationsToYaml,parseSegmentYamlFile,normalizeChildSegmentYaml,apiRuleToYaml,yamlRuleToApi,serializeExpandedRule,collectSegmentRefsFromRule,resolveRuleSegmentRefs,resolveRuleSegmentIds,journeyActivationStepToYaml}from'./child-segment-yaml.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';import{batchAsync}from'../../utils/async.js';import{buildFolderMaps}from'./resolution-context.js';import{SDKError,ErrorCode,isHttp400Error,getErrorMessage}from'../errors.js';import{validateSegmentDef,validateJourneyDef,formatValidationResult}from'./yaml-validator.js';function stableStringify(_0x27e317){const _0x45e778=a101_0x152b06;if(Array[_0x45e778(0x12b)](_0x27e317))return'['+_0x27e317[_0x45e778(0x179)](_0x17ec55=>stableStringify(_0x17ec55))[_0x45e778(0x12d)](',')+']';if(_0x27e317&&typeof _0x27e317==='object'){const _0x20a74d=_0x27e317,_0xdfc49f=Object[_0x45e778(0x11b)](_0x20a74d)[_0x45e778(0x142)](),_0x4e539e=_0xdfc49f[_0x45e778(0x179)](_0x3c301e=>'\x22'+_0x3c301e+'\x22:'+stableStringify(_0x20a74d[_0x3c301e]));return'{'+_0x4e539e[_0x45e778(0x12d)](',')+'}';}const _0x21303d=JSON['stringify'](_0x27e317);return _0x21303d===undefined?_0x45e778(0x154):_0x21303d;}function activationSignature(_0x2cd52e){const _0x5a9872=a101_0x152b06,_0x52c777={'connection':_0x2cd52e[_0x5a9872(0x164)],..._0x2cd52e['all_columns']!==undefined&&{'all_columns':_0x2cd52e[_0x5a9872(0x14f)]},..._0x2cd52e[_0x5a9872(0x160)]!==undefined&&{'columns':_0x2cd52e[_0x5a9872(0x160)]},..._0x2cd52e['behavior']!==undefined&&{'behavior':_0x2cd52e['behavior']},..._0x2cd52e[_0x5a9872(0x134)]!==undefined&&{'schedule':_0x2cd52e[_0x5a9872(0x134)]},..._0x2cd52e['notification']!==undefined&&{'notification':_0x2cd52e[_0x5a9872(0x14a)]},..._0x2cd52e[_0x5a9872(0x1b0)]!==undefined&&{'connector_config':_0x2cd52e[_0x5a9872(0x1b0)]},..._0x2cd52e['activation_template_id']!==undefined&&{'activation_template_id':_0x2cd52e[_0x5a9872(0x198)]}};return stableStringify(_0x52c777);}export async function prepareSegmentFiles(_0x2486fe,_0x11597d,_0x103cb,_0x467f00,_0x3ccf70){const _0x36ed45=a101_0x152b06,{activationDefToCreateRequest:_0x63fbe6}=await import('./child-segment-yaml.js'),_0xca6c9f=[],_0x20a86c=new Set();for(const {yamlConfig:_0xba6a2e,folderPath:_0x2d2239,sourcePath:_0x420e39}of _0x2486fe){const _0x5f4c73=resolveTDFolderPath(_0x2d2239,_0x467f00,_0x3ccf70),_0xb97dee=_0x5f4c73+':'+_0xba6a2e[_0x36ed45(0x143)],_0x374cb8=_0x11597d['segmentByFolderAndName']['get'](_0xb97dee),_0xb6c52b=_0x374cb8?_0x11597d[_0x36ed45(0xea)][_0x36ed45(0x174)](_0x374cb8['id'])||[]:[];addFoldersToCreate(_0x5f4c73,_0x11597d[_0x36ed45(0x14d)],_0x20a86c);const _0x212dde=calculateActivationActions(_0xba6a2e[_0x36ed45(0x147)]||[],_0xb6c52b,_0x11597d[_0x36ed45(0xff)],_0x11597d[_0x36ed45(0x19f)]);for(const _0x254211 of _0x212dde){(_0x254211[_0x36ed45(0xe7)]==='create'||_0x254211[_0x36ed45(0xe7)]===_0x36ed45(0x188))&&_0x254211['yamlActivation']&&(_0x254211['validatedRequest']=await _0x63fbe6(_0x254211[_0x36ed45(0xec)],_0x103cb));}const _0x438d52=calculateSegmentDiff(_0xba6a2e,_0x374cb8,_0xb6c52b,_0x11597d[_0x36ed45(0xff)],_0x11597d[_0x36ed45(0x19f)]);_0xca6c9f[_0x36ed45(0x116)]({'relativePath':_0xba6a2e[_0x36ed45(0x143)],'absolutePath':_0x420e39,'yamlConfig':_0xba6a2e,'folderPath':_0x5f4c73,'existingSegment':_0x374cb8,'existingActivations':_0xb6c52b,'isNew':_0x438d52['isNew'],'hasChanges':_0x438d52[_0x36ed45(0xde)],'diff':_0x438d52[_0x36ed45(0x189)],'activationActions':_0x212dde});}return{'segmentFiles':_0xca6c9f,'foldersToCreate':_0x20a86c};}export async function prepareJourneyFiles(_0x41907f,_0x2b9e1d,_0x454b9c,_0x5163b1){const _0x328f2b=a101_0x152b06,_0xd6a86c=[],_0x21de3d=new Set();for(const {yamlConfig:_0x588cba,folderPath:_0x504072,sourcePath:_0x1db779}of _0x41907f){const _0x57ff8f=resolveTDFolderPath(_0x504072,_0x454b9c,_0x5163b1),_0x4ac0f5=_0x57ff8f+':'+_0x588cba[_0x328f2b(0x143)],_0x43a436=_0x2b9e1d[_0x328f2b(0x185)]['get'](_0x4ac0f5);let _0xeda00f,_0x44b2f5;if(_0x43a436&&_0x43a436[_0x328f2b(0x127)]>0x0){const _0x3ac226=buildLocalExpandedRuleMappings(_0x588cba),{createYamlContext:_0x43ff0c,prefetchJourneySegments:_0x10160f}=createPushYamlContextForBundle(_0x2b9e1d['deps'],_0x2b9e1d[_0x328f2b(0x1c5)],_0x2b9e1d[_0x328f2b(0x192)],_0x3ac226,_0x2b9e1d[_0x328f2b(0xff)],_0x2b9e1d[_0x328f2b(0x19f)],_0x2b9e1d['activationStepsById'],_0x2b9e1d[_0x328f2b(0x13c)]);await _0x10160f(_0x43a436[_0x328f2b(0x179)](_0x1f34ca=>_0x1f34ca['id']));const _0x398463=hasMultipleVersions(_0x588cba),_0x4b385a=async _0x4a1f9a=>{const _0x23bbc9=_0x328f2b,_0x15a55d=_0x2b9e1d[_0x23bbc9(0x13c)]?.[_0x23bbc9(0x174)](_0x4a1f9a);if(_0x15a55d)return _0x15a55d;return _0x2b9e1d[_0x23bbc9(0x1a1)]({'journeyId':_0x4a1f9a,'journeyName':_0x588cba[_0x23bbc9(0x143)],'isMultiVersion':_0x43a436['length']>0x1});};if(_0x398463&&_0x43a436['length']>0x1){const _0x2d02b9=[];for(const _0x370340 of _0x43a436){const _0x14dec2=_0x370340[_0x328f2b(0x1b4)]||0x1;_0x2b9e1d[_0x328f2b(0x12e)]?.[_0x328f2b(0x188)]('Fetching\x20'+_0x588cba[_0x328f2b(0x143)]+'\x20v'+_0x14dec2);const _0x31ed32=await _0x4b385a(_0x370340['id']),_0x14638b=_0x43ff0c(_0x370340['id']),_0x12e6d0=await journeyResponseToDef(_0x31ed32,_0x14638b);_0x2d02b9[_0x328f2b(0x116)]({'item':_0x370340,'yaml':_0x12e6d0});}const _0x254e18=buildLocalRuleToNameMappingFromJourney(_0x588cba);_0x44b2f5=buildMergedJourneyDef(_0x2d02b9,_0x254e18);const _0x37d535=Math[_0x328f2b(0xf6)](..._0x2d02b9[_0x328f2b(0x179)](_0x3a866c=>_0x3a866c[_0x328f2b(0xeb)][_0x328f2b(0x1b4)]||0x0)),_0x3c37ba=_0x43a436[_0x328f2b(0x151)](_0x1a3ee4=>(_0x1a3ee4[_0x328f2b(0x1b4)]||0x0)===_0x37d535);_0x3c37ba&&(_0x2b9e1d['progress']?.[_0x328f2b(0x188)](_0x328f2b(0x120)+_0x588cba[_0x328f2b(0x143)]+'\x20v'+_0x37d535),_0xeda00f=await _0x4b385a(_0x3c37ba['id']));}else{const _0x224e9a=_0x43a436[_0x43a436['length']-0x1];_0x2b9e1d['progress']?.[_0x328f2b(0x188)](_0x328f2b(0x120)+_0x588cba[_0x328f2b(0x143)]),_0xeda00f=await _0x4b385a(_0x224e9a['id']);const _0x307096=_0x43ff0c(_0x224e9a['id']),_0x57e0dd=await journeyResponseToDef(_0xeda00f,_0x307096),_0x22cdfd=buildLocalRuleToNameMappingFromJourney(_0x588cba);_0x44b2f5=buildMergedJourneyDef([{'item':_0x224e9a,'yaml':_0x57e0dd}],_0x22cdfd);}}addFoldersToCreate(_0x57ff8f,_0x2b9e1d['folderPathToId'],_0x21de3d);const _0x6f62f4=calculateJourneyDiff(_0x588cba,_0x44b2f5);_0xd6a86c['push']({'relativePath':_0x588cba['name'],'absolutePath':_0x1db779,'yamlConfig':_0x588cba,'folderPath':_0x57ff8f,'existingJourney':_0xeda00f,'isNew':_0x6f62f4[_0x328f2b(0x19b)],'hasChanges':_0x6f62f4[_0x328f2b(0xde)],'diff':_0x6f62f4[_0x328f2b(0x189)]});}return{'journeyFiles':_0xd6a86c,'foldersToCreate':_0x21de3d};}export function calculateActivationActions(_0x3f8fc3,_0x5c9b3a,_0x5de8ce,_0x2d9292){const _0x3eadeb=a101_0x152b06,_0x126281=[],_0x47b2c8=new Map();for(const _0x516d89 of _0x5c9b3a){_0x47b2c8[_0x3eadeb(0x1c4)](_0x516d89[_0x3eadeb(0x143)],_0x516d89);}const _0x1605a5=new Map();for(const _0x25559f of _0x3f8fc3){_0x1605a5['set'](_0x25559f[_0x3eadeb(0x143)],_0x25559f);}for(const _0x429ed4 of _0x3f8fc3){const _0x2f4513=_0x47b2c8['get'](_0x429ed4['name']);if(!_0x2f4513)_0x126281[_0x3eadeb(0x116)]({'type':_0x3eadeb(0x1c1),'name':_0x429ed4[_0x3eadeb(0x143)],'yamlActivation':_0x429ed4});else{const _0x8a8acb=activationResponseToDef(_0x2f4513,_0x5de8ce,_0x2d9292),_0x51927d=a101_0x2a924c[_0x3eadeb(0x129)](_0x8a8acb),_0x45b406=a101_0x2a924c['stringify'](_0x429ed4);_0x51927d!==_0x45b406&&_0x126281[_0x3eadeb(0x116)]({'type':_0x3eadeb(0x188),'name':_0x429ed4[_0x3eadeb(0x143)],'yamlActivation':_0x429ed4,'existingActivation':_0x2f4513});}}for(const _0x58a11e of _0x5c9b3a){!_0x1605a5['has'](_0x58a11e['name'])&&_0x126281[_0x3eadeb(0x116)]({'type':_0x3eadeb(0x15c),'name':_0x58a11e['name'],'existingActivation':_0x58a11e});}return _0x126281;}export function calculateSegmentDiff(_0x2f890d,_0x167eeb,_0xcfde07,_0x1b0088,_0x522d94){const _0x1e68f5=segmentToYamlString(_0x2f890d);if(_0x167eeb){const _0x56d894=segmentWithActivationsToYaml(_0x167eeb,_0xcfde07,undefined,_0x1b0088,_0x522d94),_0x23393d=segmentToYamlString(_0x56d894),_0x4effe7=generateDiff(_0x23393d,_0x1e68f5),_0x2b98e6=hasChanges(_0x4effe7);return{'isNew':![],'hasChanges':_0x2b98e6,'diff':_0x2b98e6?formatDiffWithColors(_0x4effe7):undefined};}const _0x140620=generateDiff('',_0x1e68f5);return{'isNew':!![],'hasChanges':![],'diff':formatDiffWithColors(_0x140620)};}export function calculateJourneyDiff(_0x391dc9,_0x513c13){const _0x45fc99=normalizeJourneyDef(_0x391dc9,_0x391dc9),_0x5cae89=a101_0x2315d0(_0x45fc99);if(_0x513c13){const _0x550ffc=normalizeJourneyDef(_0x513c13,_0x391dc9),_0x430714=a101_0x2315d0(_0x550ffc),_0xa381a7=generateDiff(_0x430714,_0x5cae89),_0x8ea8fd=hasChanges(_0xa381a7);return{'isNew':![],'hasChanges':_0x8ea8fd,'diff':_0x8ea8fd?formatDiffWithColors(_0xa381a7):undefined};}const _0x1ba76d=generateDiff('',_0x5cae89);return{'isNew':!![],'hasChanges':![],'diff':formatDiffWithColors(_0x1ba76d)};}export function findSegmentsToDelete(_0x55dce1,_0x5e61d5,_0x49c5c0,_0x47fa2d,_0x3a295b){const _0x2ac365=a101_0x152b06,_0x355e4e=new Set();for(const {yamlConfig:_0x362cd2,folderPath:_0xdba951}of _0x5e61d5){_0x355e4e[_0x2ac365(0x139)](_0xdba951+':'+_0x362cd2[_0x2ac365(0x143)]);}return _0x55dce1['filter'](_0x27769c=>{const _0x5051f1=_0x2ac365,_0x25a83e=_0x27769c[_0x5051f1(0x190)]?_0x49c5c0[_0x5051f1(0x174)](_0x27769c['segmentFolderId']['toString']())||'':'',_0x2c5a04=_0x25a83e+':'+_0x27769c[_0x5051f1(0x143)];if(_0x355e4e[_0x5051f1(0x193)](_0x2c5a04))return![];if(_0x3a295b)return _0x25a83e===_0x47fa2d||_0x25a83e[_0x5051f1(0x1c7)](_0x47fa2d+'/');return!![];});}export function findJourneysToDelete(_0x360893,_0xdef735,_0x229c28,_0x4542be,_0x5c030){const _0x269f29=a101_0x152b06,_0x3e529b=new Set();for(const {yamlConfig:_0x355369,folderPath:_0x319b95}of _0xdef735){_0x3e529b[_0x269f29(0x139)](_0x319b95+':'+_0x355369['name']);}return _0x360893[_0x269f29(0x150)](_0x3999ac=>{const _0x43fcd5=_0x269f29,_0xdff9c=_0x3999ac['folderId']?_0x229c28[_0x43fcd5(0x174)](_0x3999ac[_0x43fcd5(0xf7)])||'':'',_0x1b54c4=_0xdff9c+':'+_0x3999ac['journeyBundleName'];if(_0x3e529b[_0x43fcd5(0x193)](_0x1b54c4))return![];if(_0x5c030)return _0xdff9c===_0x4542be||_0xdff9c[_0x43fcd5(0x1c7)](_0x4542be+'/');return!![];});}export function buildSegmentLookupMap(_0x96f0ed,_0x572cba){const _0x294faf=a101_0x152b06,_0x412a75=new Map();for(const _0x51fde2 of _0x96f0ed){const _0x4b53ef=_0x51fde2['segmentFolderId']?_0x572cba[_0x294faf(0x174)](_0x51fde2[_0x294faf(0x190)][_0x294faf(0x167)]())||'':'',_0x8535a0=_0x4b53ef+':'+_0x51fde2[_0x294faf(0x143)];_0x412a75[_0x294faf(0x1c4)](_0x8535a0,_0x51fde2);}return _0x412a75;}export function buildSegmentNameToIdMap(_0x2567b2){const _0x3852ea=a101_0x152b06,_0x5c62da=new Map();for(const _0x53a3a3 of _0x2567b2){_0x5c62da[_0x3852ea(0x1c4)](_0x53a3a3[_0x3852ea(0x143)],_0x53a3a3['id']);}return _0x5c62da;}export function buildJourneyBundleLookupMap(_0x45713b,_0x497190){const _0x3b0ca5=a101_0x152b06,_0x91c8b4=new Map();for(const _0x229019 of _0x45713b){const _0x101004=_0x229019[_0x3b0ca5(0xf7)]?_0x497190['get'](_0x229019['folderId'])||'':'',_0x4c8045=_0x101004+':'+_0x229019[_0x3b0ca5(0x1b3)];!_0x91c8b4[_0x3b0ca5(0x193)](_0x4c8045)&&_0x91c8b4[_0x3b0ca5(0x1c4)](_0x4c8045,[]),_0x91c8b4[_0x3b0ca5(0x174)](_0x4c8045)['push'](_0x229019);}for(const _0xf69a08 of _0x91c8b4['values']()){_0xf69a08[_0x3b0ca5(0x142)]((_0x52e597,_0x5111ce)=>(_0x52e597[_0x3b0ca5(0x1b4)]||0x0)-(_0x5111ce[_0x3b0ca5(0x1b4)]||0x0));}return _0x91c8b4;}export function collectFoldersToCreate(_0x3ad54c,_0x8839c4){const _0x122c5c=a101_0x152b06,_0x4b3ce5=new Set();for(const _0x2f8ffa of _0x3ad54c){if(!_0x2f8ffa)continue;if(_0x8839c4[_0x122c5c(0x193)](_0x2f8ffa))continue;const _0x1369de=_0x2f8ffa[_0x122c5c(0x13f)]('/');let _0x3cb590='';for(const _0xe10700 of _0x1369de){_0x3cb590=_0x3cb590?_0x3cb590+'/'+_0xe10700:_0xe10700,!_0x8839c4[_0x122c5c(0x193)](_0x3cb590)&&_0x4b3ce5[_0x122c5c(0x139)](_0x3cb590);}}return _0x4b3ce5;}export function parseAndClassifyYamlFiles(_0x241a22,_0x589091,_0x228a19){const _0xe9a433=a101_0x152b06,_0x5bf58e=[],_0x5d1c9c=[];for(const _0x13eb33 of _0x241a22){const _0x28cfe2=a101_0x5b2ffe[_0xe9a433(0x15a)](_0x589091,a101_0x5b2ffe[_0xe9a433(0xf8)](_0x13eb33)),_0x4cbc3c=_0x28cfe2==='.'?'':_0x28cfe2,_0x46a611=readFileSync(_0x13eb33,_0xe9a433(0xe1)),_0xd72f52=a101_0x2a924c['parse'](_0x46a611);if(isJourneyDef(_0xd72f52)){const _0x3f2e75=a101_0x490132(_0x46a611);_0x5d1c9c['push']({'yamlConfig':_0x3f2e75,'folderPath':_0x4cbc3c,'sourcePath':_0x13eb33});}else{if(!_0x228a19?.[_0xe9a433(0x131)]){const _0x496b10=parseSegmentYamlFile(_0x46a611),_0x4b722f=normalizeChildSegmentYaml(_0x496b10);_0x5bf58e[_0xe9a433(0x116)]({'yamlConfig':_0x4b722f,'folderPath':_0x4cbc3c,'sourcePath':_0x13eb33});}}}return{'segments':_0x5bf58e,'journeys':_0x5d1c9c};}export function validateParsedFiles(_0x281f4f,_0x19096e){const _0x16b139=a101_0x152b06,_0x4c46ff=[];for(const {yamlConfig:_0x2a5473,sourcePath:_0x1232cf}of _0x281f4f['segments']){const _0x4e4e6e=readFileSync(_0x1232cf,_0x16b139(0xe1)),_0x11552f=a101_0x2a924c[_0x16b139(0x162)](_0x4e4e6e),_0x1eaf13=validateSegmentDef(_0x2a5473,{'source':_0x4e4e6e,'document':_0x11552f});if(!_0x1eaf13[_0x16b139(0x112)]){const _0x45062e=a101_0x5b2ffe[_0x16b139(0x15a)](_0x19096e,_0x1232cf);_0x4c46ff[_0x16b139(0x116)]({'filePath':_0x45062e,'source':_0x4e4e6e,'result':_0x1eaf13,'isJourney':![]});}}for(const {yamlConfig:_0x5929f5,sourcePath:_0x462d46}of _0x281f4f[_0x16b139(0x18f)]){const _0x39b666=readFileSync(_0x462d46,'utf-8'),_0x399d39=a101_0x2a924c[_0x16b139(0x162)](_0x39b666),_0x2f26f3=validateJourneyDef(_0x5929f5,{'source':_0x39b666,'document':_0x399d39});if(!_0x2f26f3['valid']){const _0x2d8d09=a101_0x5b2ffe[_0x16b139(0x15a)](_0x19096e,_0x462d46);_0x4c46ff[_0x16b139(0x116)]({'filePath':_0x2d8d09,'source':_0x39b666,'result':_0x2f26f3,'isJourney':!![]});}}return _0x4c46ff;}function a101_0x1e36(_0x6acb05,_0x3ecde1){_0x6acb05=_0x6acb05-0xde;const _0x4b5d73=a101_0x4b5d();let _0x1e3680=_0x4b5d73[_0x6acb05];return _0x1e3680;}export function formatValidationErrors(_0x554db0){const _0x4e70fc=a101_0x152b06,_0x8720bf=[];for(const {filePath:_0x3eff3b,source:_0x280845,result:_0x155302,isJourney:_0x10d701}of _0x554db0){const _0x150ba9=_0x10d701?'journey':'segment';_0x8720bf['push']('\x0a'+_0x3eff3b+'\x20('+_0x150ba9+_0x4e70fc(0x149)+_0x155302[_0x4e70fc(0x166)][_0x4e70fc(0x127)]+_0x4e70fc(0x177)),_0x8720bf[_0x4e70fc(0x116)](formatValidationResult(_0x155302,_0x280845,_0x3eff3b));}return _0x8720bf['join']('\x0a');}export function buildLocalExpandedRuleMappings(_0x42a367){const _0x24699b=a101_0x152b06,_0x4b3673=new Set(),_0x2a6c3a=new Map(),_0x23642f=collectSegmentUsageCounts(_0x42a367);if(_0x42a367['segments'])for(const [_0x56dd3c,_0x3a5bc2]of Object['entries'](_0x42a367[_0x24699b(0x191)])){_0x4b3673['add'](_0x56dd3c);if(_0x3a5bc2[_0x24699b(0x1a4)]){const _0x4fff65=yamlRuleToApi(_0x3a5bc2[_0x24699b(0x1a4)]),_0x30db09=apiRuleToYaml(_0x4fff65);_0x2a6c3a[_0x24699b(0x1c4)](_0x56dd3c,_0x30db09);}}const _0x4784b0=new Map();let _0x3f66f4=0x0;for(const [_0x2145f1,_0x43ea20]of _0x2a6c3a){const _0x96ff20=serializeExpandedRule(_0x43ea20,_0x2a6c3a),_0x1142be=_0x4784b0[_0x24699b(0x174)](_0x96ff20)||[];_0x1142be['push']({'name':_0x2145f1,'index':_0x3f66f4}),_0x4784b0[_0x24699b(0x1c4)](_0x96ff20,_0x1142be),_0x3f66f4++;}const _0x57b283=new Map();for(const [_0x2a1f80,_0x4b30de]of _0x4784b0){const _0x102c1a=_0x4b30de[_0x24699b(0xee)]()[_0x24699b(0x142)]((_0x2f7228,_0x4af3c8)=>{const _0x46b011=_0x24699b,_0x40431c=_0x23642f[_0x46b011(0x174)](_0x2f7228[_0x46b011(0x143)])||0x0,_0x213a70=_0x23642f[_0x46b011(0x174)](_0x4af3c8[_0x46b011(0x143)])||0x0;if(_0x40431c!==_0x213a70)return _0x213a70-_0x40431c;return _0x2f7228[_0x46b011(0x1b2)]-_0x4af3c8[_0x46b011(0x1b2)];})[_0x24699b(0x179)](_0x4d2f1e=>_0x4d2f1e['name']),_0x9dfc8f=[];for(const _0x8f987a of _0x102c1a){const _0x3b69b8=_0x23642f[_0x24699b(0x174)](_0x8f987a)||0x0,_0x5cc5ae=Math[_0x24699b(0xf6)](_0x3b69b8,0x1);for(let _0x25ae03=0x0;_0x25ae03<_0x5cc5ae;_0x25ae03++){_0x9dfc8f[_0x24699b(0x116)](_0x8f987a);}}_0x57b283[_0x24699b(0x1c4)](_0x2a1f80,_0x9dfc8f);}return{'existingLocalSegmentNames':_0x4b3673,'localSegmentRules':_0x2a6c3a,'localExpandedRuleToNames':_0x57b283};}function a101_0x4b5d(){const _0x5f2d22=['resolveSegment','activationsBySegmentId','item','yamlActivation','folderPath','slice',').\x20','segment_updated','Creating\x20activation\x20\x27','description','milestone','Segment\x20not\x20found:\x20','SEGMENT_NOT_FOUND','max','folderId','dirname','__pending_','activation_deleted','\x0a\x20\x20','98XdeOHi','./child-segment-yaml.js','message','idToEmailMap','attributes','activation_deleting','Created\x20journey\x20\x27','from','getSegment','with','Created\x20folder\x20\x27','Activation\x20not\x20found:\x20','existingJourney','createdSegmentIds','../../utils/async.js','journey_updating','createFolder','\x27\x20exit\x20criteria','waitCondition','Updating\x20activation\x20\x27','Entry\x20criteria:\x20','Activation','valid','WaitStep','existingActivation','action','push','verbose','createActivation','embedded_activation_created','logSuccess','keys','embedded_activation_creating','rootFolderId','yamlConfig','Failed\x20to\x20','Fetching\x20','Updated\x20activation\x20\x27','getActivation','created','embedded_segment_created','Updating\x20segment\x20\x27','entry_criteria','length','activation_updating','stringify','deleteSegment','isArray','folder_creating','join','progress','digest','hex','skipSegments','21777cPFJGy','entryCriteria','schedule','DecisionPoint','Created\x20segment\x20\x27','logWarning','journey_updated','add','\x27\x20decision\x20point\x20branch\x20\x27','Name\x20has\x20already\x20been\x20taken','journeyById','JOURNEY_SYNTAX_ERROR','\x20activation\x20\x27','split','\x27...','\x20journey\x20from\x20file:\x20','sort','name','Failed\x20to\x20sync\x20activations\x20for\x20segment\x20\x27','activationActions','7916kxdmcN','activations','state','):\x20','notification','includes','266920hIXXMx','folderPathToId','journey_entry_criteria_','all_columns','filter','find','folder_created','\x27\x20milestone','null','\x27\x20from\x20file:\x20','99tiQNJb','onProgress','toLowerCase','journeyId','relative','\x27\x20entry\x20criteria','delete','Define\x20it\x20in\x20the\x20journey\x27s\x20\x27activations\x27\x20section\x20or\x20use\x20an\x20existing\x20activation\x20ID.','absolutePath','draft','columns','parse','parseDocument','17559528OHrNUa','connection','goal','errors','toString','Created\x20activation\x20\x27','segment_creating','nameToType','listSegments','Journey\x20\x27','JOURNEY_UPDATE_ERROR','\x20(referenced\x20in\x20embedded\x20segment\x20\x27','activation_creating','Creating\x20segment\x20\x27','exitCriterias','createdSegmentId','\x20(referenced\x20in\x20journey\x20','get','flatMap','Stage\x20\x27','\x20error(s)','parentFolder','map','journeyActivationStepId','activation_updated','embeddedSegmentNameToId','segment_deleting','idToName','resolveJourneyId','activation_created','Deleted\x20segment\x20\x27','Cannot\x20create\x20embedded\x20activation\x20without\x20journey\x20context','branches','SEGMENT_UPDATE_ERROR','journeyBundlesByFolderAndName','333750uGfuND','replace','update','diff','./journey-yaml.js','journey','502817NngiOb','__pending_act_','segmentNameToId','journeys','segmentFolderId','segments','existingSegments','has','reduce','createJourneySegment','segmentId','stages','activation_template_id','2335FulAEo','Updated\x20segment\x20\x27','isNew','localSegmentRules','listActivations','unchanged','connectionIdToNameMap','activationContext','fetchJourney','validatedRequest','Warning:\x20Could\x20not\x20resolve\x20embedded\x20segment\x20\x27','rule','6VfCsmY','ACTIVATION_UPDATE_ERROR','steps','INTERNAL','1145814IRgSxx','getJourney','NOT_FOUND','stage\x20\x27','updated','\x27\x20for\x20','deleteActivation','connector_config','goal\x20criteria','index','journeyBundleName','versionNumber','list','updateSegmentById','deleted','all','size','embedded_segment_creating','\x27\x20wait\x20condition','activation_','withProgress','existingSegment','relationships','updateActivation','create','sha1','logInfo','set','parentId','segment','startsWith','hasChanges','Creating\x20folder\x20\x27','data','utf-8','journeyStages','user','parentSegmentFolder','buildUserMaps','SEGMENT_SYNTAX_ERROR','type','333tlbBFk'];a101_0x4b5d=function(){return _0x5f2d22;};return a101_0x4b5d();}async function buildServerSegmentRuleMap(_0x3d02d9,_0x1dc603,_0x56746d,_0xa77636){const _0x34ce25=new Map(),_0x1e5f5e=new Set(),_0x1c5a2a=async _0x505e9=>{const _0x3c1377=a101_0x1e36;if(_0x1e5f5e[_0x3c1377(0x193)](_0x505e9))return;_0x1e5f5e[_0x3c1377(0x139)](_0x505e9);let _0x417b97=_0x56746d[_0x3c1377(0x151)](_0x448e02=>_0x448e02['id']===_0x505e9);if(!_0x417b97)try{_0x417b97=await _0x3d02d9[_0x3c1377(0x1c6)]['getSegment'](_0x1dc603,_0x505e9);}catch{return;}if(!_0x417b97?.['rule'])return;const _0x346110=apiRuleToYaml(_0x417b97[_0x3c1377(0x1a4)]);_0x34ce25[_0x3c1377(0x1c4)](_0x505e9,_0x346110);const _0x2294eb=collectSegmentRefsFromRule(_0x346110);for(const _0x134c44 of _0x2294eb){await _0x1c5a2a(_0x134c44);}};for(const _0x3a82c9 of _0xa77636){await _0x1c5a2a(_0x3a82c9);}return _0x34ce25;}export function createSegmentIdResolver(_0x30da33,_0x53cea8){return async _0x415334=>{const _0x2e419d=a101_0x1e36,_0x3698b6=_0x30da33[_0x2e419d(0x174)](_0x415334);if(!_0x3698b6)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x2e419d(0xf4)+_0x415334+_0x2e419d(0x16e)+_0x53cea8+'\x27)');return _0x3698b6;};}export function extractRootFolderId(_0x165aa5){const _0x59cde7=a101_0x152b06;return _0x165aa5['relationships']?.[_0x59cde7(0xe4)]?.[_0x59cde7(0xe0)]?.['id']||_0x165aa5[_0x59cde7(0x1bf)]?.[_0x59cde7(0x178)]?.['data']?.['id'];}export function buildConnectionMaps(_0x42ec4e){const _0x4b6e42=a101_0x152b06,_0x4f86b0=new Map(),_0x4b8273=new Map(),_0x907952=new Map();for(const _0x4e8654 of _0x42ec4e){_0x4f86b0[_0x4b6e42(0x1c4)](_0x4e8654[_0x4b6e42(0x143)],parseInt(_0x4e8654['id'],0xa)),_0x4b8273[_0x4b6e42(0x1c4)](_0x4e8654['id'],_0x4e8654['name']),_0x907952['set'](_0x4e8654[_0x4b6e42(0x143)],_0x4e8654[_0x4b6e42(0xe7)]);}return{'nameToId':_0x4f86b0,'idToName':_0x4b8273,'nameToType':_0x907952};}export function calculatePushStats(_0x960215,_0x3a1ff8,_0x3429d9,_0x3bad6f,_0x49e8d4,_0x19d1d7,_0x13cd42){const _0x2a0030=a101_0x152b06,_0x413eec=_0x960215[_0x2a0030(0x150)](_0x9e8854=>_0x9e8854[_0x2a0030(0x19b)]),_0xc2bcf7=_0x960215[_0x2a0030(0x150)](_0x24fa69=>!_0x24fa69[_0x2a0030(0x19b)]&&_0x24fa69[_0x2a0030(0xde)]),_0x2fe5a6=_0x960215[_0x2a0030(0x150)](_0x31f320=>!_0x31f320[_0x2a0030(0x19b)]&&!_0x31f320[_0x2a0030(0xde)]),_0x3cc09e=_0x19d1d7?_0x3bad6f:[],_0x382569=_0x3a1ff8['filter'](_0x4b85b6=>_0x4b85b6[_0x2a0030(0x19b)]),_0x4d28d8=_0x3a1ff8[_0x2a0030(0x150)](_0x303f40=>!_0x303f40[_0x2a0030(0x19b)]&&_0x303f40[_0x2a0030(0xde)]),_0x2c413f=_0x3a1ff8['filter'](_0x4df595=>!_0x4df595['isNew']&&!_0x4df595[_0x2a0030(0xde)]),_0x2040d7=_0x19d1d7?_0x49e8d4:[],_0x1855e4=_0x960215[_0x2a0030(0x175)](_0x37e16e=>_0x37e16e[_0x2a0030(0x145)]),_0x1a7f43=_0x1855e4[_0x2a0030(0x150)](_0x1d8714=>_0x1d8714[_0x2a0030(0xe7)]===_0x2a0030(0x1c1)),_0x21385b=_0x1855e4['filter'](_0xe91503=>_0xe91503[_0x2a0030(0xe7)]===_0x2a0030(0x188)),_0x46900a=_0x1855e4['filter'](_0x3e4281=>_0x3e4281[_0x2a0030(0xe7)]===_0x2a0030(0x15c)),_0x147d03=Array[_0x2a0030(0x103)](_0x3429d9)[_0x2a0030(0x142)](),_0x5ffdd1=_0x13cd42?![]:_0x413eec['length']>0x0||_0xc2bcf7[_0x2a0030(0x127)]>0x0||_0x3cc09e[_0x2a0030(0x127)]>0x0,_0xe0fb7b=_0x382569[_0x2a0030(0x127)]>0x0||_0x4d28d8[_0x2a0030(0x127)]>0x0||_0x2040d7[_0x2a0030(0x127)]>0x0,_0x447710=_0x13cd42?![]:_0x1855e4[_0x2a0030(0x127)]>0x0,_0x163b7e=_0x147d03[_0x2a0030(0x127)]>0x0;return{'segments':{'new':_0x413eec,'changed':_0xc2bcf7,'unchanged':_0x2fe5a6,'toDelete':_0x3cc09e},'journeys':{'new':_0x382569,'changed':_0x4d28d8,'unchanged':_0x2c413f,'toDelete':_0x2040d7},'activations':{'all':_0x1855e4,'toCreate':_0x1a7f43,'toUpdate':_0x21385b,'toDelete':_0x46900a},'folders':{'toCreate':_0x147d03},'counts':{'segments':{'new':_0x413eec[_0x2a0030(0x127)],'changed':_0xc2bcf7[_0x2a0030(0x127)],'unchanged':_0x2fe5a6[_0x2a0030(0x127)],'toDelete':_0x3cc09e[_0x2a0030(0x127)]},'journeys':{'new':_0x382569[_0x2a0030(0x127)],'changed':_0x4d28d8[_0x2a0030(0x127)],'unchanged':_0x2c413f['length'],'toDelete':_0x2040d7[_0x2a0030(0x127)]},'activations':{'create':_0x1a7f43[_0x2a0030(0x127)],'update':_0x21385b['length'],'delete':_0x46900a[_0x2a0030(0x127)]},'folders':_0x147d03['length']},'hasChanges':_0x5ffdd1||_0xe0fb7b||_0x447710||_0x163b7e};}export async function buildPushExecutionContext(_0x39a059,_0x3c7884,_0x118be2,_0x236238,_0x37675e,_0xccd355){const _0x50af83=a101_0x152b06,_0x1644fe=extractRootFolderId(_0x118be2),{pathToId:_0x3e07c7,idToPath:_0x876f8d}=buildFolderMaps(_0x37675e),_0x1d8b9a=buildSegmentNameToIdMap(_0x236238),_0x4d51bc=new Map(),{batchAsync:_0x56d79e}=await import(_0x50af83(0x10a)),[_0x20f726,_0x3814c9]=await Promise[_0x50af83(0x1b8)]([_0x39a059[_0x50af83(0xe3)][_0x50af83(0xe5)](),_0x39a059['connection'][_0x50af83(0x1b5)](),((async()=>{const _0x2b925e=_0x50af83;!_0xccd355&&_0x236238[_0x2b925e(0x127)]>0x0&&await _0x56d79e(_0x236238,async _0x570dfa=>{const _0x4d38a5=_0x2b925e,_0x42c91a=await _0x39a059[_0x4d38a5(0x1c6)][_0x4d38a5(0x19d)](_0x3c7884,_0x570dfa['id']);_0x4d51bc[_0x4d38a5(0x1c4)](_0x570dfa['id'],_0x42c91a);});})())]),{emailToId:_0x2b1cfb,idToEmail:_0x38d8e1}=_0x20f726,_0x13715b=buildConnectionMaps(_0x3814c9);return{'rootFolderId':_0x1644fe,'folderPathToId':_0x3e07c7,'folderIdToPath':_0x876f8d,'segmentNameToId':_0x1d8b9a,'activationsBySegmentId':_0x4d51bc,'emailToIdMap':_0x2b1cfb,'idToEmailMap':_0x38d8e1,'connectionNameToIdMap':_0x13715b['nameToId'],'connectionIdToNameMap':_0x13715b[_0x50af83(0x17e)],'connectionNameToTypeMap':_0x13715b[_0x50af83(0x16a)]};}export function createPushYamlContextForBundle(_0xbcbcff,_0xbff683,_0x5bb4e6,_0x55deb7,_0x1ec924,_0x123e57,_0x3b847e,_0x1ef24d){const {existingLocalSegmentNames:_0x47fea7,localExpandedRuleToNames:_0x303ac8}=_0x55deb7,_0x47edab=new Set(),_0x68fb88=new Map(),_0x142418=new Map(),_0x8713e3=new Map(),_0x2f1eae=createJumpTargetCache(),_0x154f8a=new Map(),_0x4a0f52=new Map(),_0xba34f2=new Set();let _0x1d7db9;const _0xe90eaf=_0x5d2450=>{const _0x4bbae8={'resolveSegment':async _0x27656c=>{const _0x263f21=a101_0x1e36,_0x1c6618=_0x8713e3[_0x263f21(0x174)](_0x27656c);if(_0x1c6618!==undefined)return{'name':_0x1c6618,'isJourneyLocal':!![]};try{let _0x3a0d73=_0x5bb4e6[_0x263f21(0x151)](_0x263830=>_0x263830['id']===_0x27656c);!_0x3a0d73&&(_0x3a0d73=await _0xbcbcff[_0x263f21(0x1c6)][_0x263f21(0x104)](_0xbff683,_0x27656c));const _0x2033f2=generateJourneyLocalName(_0x3a0d73[_0x263f21(0x143)]),_0x42c696=_0x3a0d73['kind']===SEGMENT_KIND_JOURNEY&&_0x2033f2!==undefined;let _0x48eb33=_0x3a0d73[_0x263f21(0x143)],_0x3e6770;if(_0x42c696&&_0x3a0d73[_0x263f21(0x1a4)]){const _0xf1cb8=apiRuleToYaml(_0x3a0d73[_0x263f21(0x1a4)]);_0x4a0f52['set'](_0x27656c,_0xf1cb8);const _0x321ef2=async _0x3666e4=>{const _0x4c60e4=_0x263f21,_0x57626f=collectSegmentRefsFromRule(_0x3666e4);for(const _0x5589a0 of _0x57626f){if(!_0x4a0f52[_0x4c60e4(0x193)](_0x5589a0))try{const _0x3a3bf5=await _0xbcbcff['segment'][_0x4c60e4(0x104)](_0xbff683,_0x5589a0);if(_0x3a3bf5?.[_0x4c60e4(0x1a4)]){const _0x18d10c=apiRuleToYaml(_0x3a3bf5[_0x4c60e4(0x1a4)]);_0x4a0f52[_0x4c60e4(0x1c4)](_0x5589a0,_0x18d10c),await _0x321ef2(_0x18d10c);}}catch{}}};await _0x321ef2(_0xf1cb8);const _0x5717df=serializeExpandedRule(_0xf1cb8,_0x4a0f52),_0x5a64c5=_0x303ac8[_0x263f21(0x174)](_0x5717df);if(_0x5a64c5&&_0x5a64c5[_0x263f21(0x127)]>0x0){const _0x408112=_0x68fb88[_0x263f21(0x174)](_0x5717df)||0x0,_0x11d874=_0x5a64c5[_0x408112]||_0x5a64c5[_0x5a64c5[_0x263f21(0x127)]-0x1];_0x68fb88[_0x263f21(0x1c4)](_0x5717df,_0x408112+0x1),_0x48eb33=_0x11d874,_0x47edab[_0x263f21(0x139)](_0x48eb33),_0x8713e3[_0x263f21(0x1c4)](_0x27656c,_0x48eb33);const _0x20020d=await resolveRuleSegmentRefs(_0xf1cb8,async _0x44939c=>{const _0x598ab5=_0x263f21,_0x11cf41=_0x8713e3[_0x598ab5(0x174)](_0x44939c);if(_0x11cf41)return _0x11cf41;const _0x3d2f92=await _0x1d7db9['resolveSegment'](_0x44939c);return _0x3d2f92[_0x598ab5(0x143)];});_0x3e6770={'description':_0x3a0d73['description'],'rule':_0x20020d};}else{const _0x40cf4c=_0x154f8a['get'](_0x5717df);if(_0x40cf4c)_0x48eb33=_0x40cf4c,_0x8713e3['set'](_0x27656c,_0x48eb33);else{if(_0x2033f2){let _0x2e647e=_0x2033f2,_0x3c51aa=0x2;while(_0x47edab[_0x263f21(0x193)](_0x2e647e)||_0x47fea7[_0x263f21(0x193)](_0x2e647e)){_0x2e647e=_0x2033f2+'_'+_0x3c51aa,_0x3c51aa++;}_0x47edab[_0x263f21(0x139)](_0x2e647e),_0x48eb33=_0x2e647e;}_0x8713e3[_0x263f21(0x1c4)](_0x27656c,_0x48eb33),_0x154f8a['set'](_0x5717df,_0x48eb33);const _0x237b68=await resolveRuleSegmentRefs(_0xf1cb8,async _0x37ef13=>{const _0x42f90f=_0x263f21,_0x4b64b7=_0x8713e3[_0x42f90f(0x174)](_0x37ef13);if(_0x4b64b7)return _0x4b64b7;const _0x42a997=await _0x1d7db9[_0x42f90f(0xe9)](_0x37ef13);return _0x42a997['name'];});_0x3e6770={'description':_0x3a0d73[_0x263f21(0xf2)],'rule':_0x237b68};}}}return{'name':_0x48eb33,'isJourneyLocal':_0x42c696,'definition':_0x3e6770};}catch{return{'name':_0x27656c,'isJourneyLocal':![]};}},'resolveActivation':async _0x510afd=>{const _0x5d17e3=a101_0x1e36,_0x11ad75=_0x142418['get'](_0x510afd);if(_0x11ad75!==undefined)return{'name':_0x11ad75,'isJourneyLocal':!![]};try{let _0x36ca27=_0x3b847e?.[_0x5d17e3(0x174)](_0x510afd);!_0x36ca27&&(_0x36ca27=await _0xbcbcff[_0x5d17e3(0x18b)][_0x5d17e3(0x122)](_0x5d2450,_0x510afd));const _0x27a349=_0x36ca27[_0x5d17e3(0x100)]['activationParams'][_0x5d17e3(0x143)]||_0x510afd,_0x10fe3b=sanitizeYamlKey(_0x27a349)||_0x5d17e3(0x1bc)+_0x510afd,_0x409169=_0x10fe3b;_0x142418[_0x5d17e3(0x1c4)](_0x510afd,_0x409169);const _0x4537df=journeyActivationStepToYaml(_0x36ca27,_0x1ec924,_0x123e57);return{'name':_0x409169,'isJourneyLocal':!![],'definition':_0x4537df};}catch{return{'name':_0x510afd,'isJourneyLocal':![]};}},'resolveJumpTarget':(_0x4b745a,_0x2332f1)=>resolveJumpTarget(_0x4b745a,_0x2332f1,_0x2f1eae,async _0x18dca4=>{const _0x312b5d=a101_0x1e36,_0x273a4c=_0x1ef24d?.[_0x312b5d(0x174)](_0x18dca4);if(_0x273a4c)return _0x273a4c;return _0xbcbcff[_0x312b5d(0x18b)]['getJourney'](_0x18dca4);})};return _0x1d7db9=_0x4bbae8,_0x4bbae8;},_0x3b0eaf=async _0x317ecb=>{const _0x37d398=a101_0x1e36,{collectSegmentIdsFromJourneyApi:_0x4114e3}=await import(_0x37d398(0x18a)),{batchAsync:_0x31ed9c}=await import('../../utils/async.js'),_0x392916=new Set();for(const _0x4ff463 of _0x317ecb){let _0x3c3feb=_0x1ef24d?.[_0x37d398(0x174)](_0x4ff463);!_0x3c3feb&&(_0x3c3feb=await _0xbcbcff[_0x37d398(0x18b)]['getJourney'](_0x4ff463));const _0x41b151=_0x4114e3(_0x3c3feb);for(const _0x44e88f of _0x41b151){_0x392916[_0x37d398(0x139)](_0x44e88f);}}let _0x5e4e45=Array['from'](_0x392916);while(_0x5e4e45[_0x37d398(0x127)]>0x0){const _0x306eb6=_0x5e4e45[_0x37d398(0x150)](_0x1ece79=>!_0xba34f2[_0x37d398(0x193)](_0x1ece79));if(_0x306eb6['length']===0x0)break;const _0x16e12c=await _0x31ed9c(_0x306eb6,async _0xc4c30e=>{const _0x440c6d=_0x37d398;_0xba34f2[_0x440c6d(0x139)](_0xc4c30e);let _0x1f3ec8=_0x5bb4e6[_0x440c6d(0x151)](_0x51dae9=>_0x51dae9['id']===_0xc4c30e);if(!_0x1f3ec8)try{_0x1f3ec8=await _0xbcbcff['segment'][_0x440c6d(0x104)](_0xbff683,_0xc4c30e);}catch{return null;}return{'segmentId':_0xc4c30e,'segment':_0x1f3ec8};},0xa),_0xf6818=new Set();for(const _0x4a93cd of _0x16e12c){if(!_0x4a93cd?.[_0x37d398(0x1c6)]?.[_0x37d398(0x1a4)])continue;const _0x161acf=apiRuleToYaml(_0x4a93cd['segment'][_0x37d398(0x1a4)]);_0x4a0f52[_0x37d398(0x1c4)](_0x4a93cd[_0x37d398(0x196)],_0x161acf);const _0x551b9c=collectSegmentRefsFromRule(_0x161acf);for(const _0xacf868 of _0x551b9c){!_0xba34f2[_0x37d398(0x193)](_0xacf868)&&_0xf6818[_0x37d398(0x139)](_0xacf868);}}_0x5e4e45=Array[_0x37d398(0x103)](_0xf6818);}};return{'createYamlContext':_0xe90eaf,'prefetchJourneySegments':_0x3b0eaf};}export async function executePushSegments(_0x238e2c,_0x814f22,_0x34da3d,_0x46dc9a,_0x23dae4){const _0xee8b44=a101_0x152b06,{segmentDefToCreateRequest:_0x1ee6b2,segmentDefToUpdateRequest:_0x442a34}=await import(_0xee8b44(0xfd)),_0x598af8=_0x34da3d[_0xee8b44(0x14d)],_0xf21bcb=0x5,_0x4ff36e=async _0x4d3089=>{const _0x38d881=_0xee8b44,_0x1facfd=_0x4d3089['folderPath']?_0x598af8[_0x38d881(0x174)](_0x4d3089[_0x38d881(0xed)]):undefined;let _0x540a2d;const _0x2d4b4d={'created':0x0,'updated':0x0,'activations':{'created':0x0,'updated':0x0,'deleted':0x0}};try{if(_0x4d3089[_0x38d881(0x19b)]){_0x23dae4['onProgress']?.({'type':_0x38d881(0x169),'name':_0x4d3089[_0x38d881(0x11e)][_0x38d881(0x143)]});const _0x1a3bbf=_0x1ee6b2(_0x4d3089['yamlConfig'],_0x1facfd),_0x4cbba6=await _0x23dae4['withProgress'](_0x38d881(0x170)+_0x4d3089['yamlConfig'][_0x38d881(0x143)]+_0x38d881(0x140),()=>_0x238e2c['segment']['createSegment'](_0x46dc9a[_0x38d881(0x1c5)],_0x1a3bbf));_0x540a2d=_0x4cbba6[_0x38d881(0xe0)]['id'],_0x2d4b4d[_0x38d881(0x172)]={'name':_0x4d3089[_0x38d881(0x11e)]['name'],'id':_0x540a2d},_0x23dae4[_0x38d881(0x157)]?.({'type':'segment_created','name':_0x4d3089[_0x38d881(0x11e)]['name'],'segmentId':_0x540a2d}),_0x23dae4[_0x38d881(0x11a)]?.(_0x38d881(0x136)+_0x4d3089[_0x38d881(0x11e)][_0x38d881(0x143)]+'\x27'),_0x2d4b4d['created']=0x1;}else{if(_0x4d3089[_0x38d881(0xde)]){_0x23dae4[_0x38d881(0x157)]?.({'type':'segment_updating','name':_0x4d3089[_0x38d881(0x11e)][_0x38d881(0x143)]});const _0x4cd256=_0x442a34(_0x4d3089['yamlConfig']);_0x1facfd!==_0x4d3089[_0x38d881(0x1be)]?.[_0x38d881(0x190)]&&(_0x4cd256['segmentFolderId']=_0x1facfd?parseInt(_0x1facfd,0xa):undefined),await _0x23dae4['withProgress'](_0x38d881(0x125)+_0x4d3089[_0x38d881(0x11e)][_0x38d881(0x143)]+'\x27...',()=>_0x238e2c[_0x38d881(0x1c6)][_0x38d881(0x1b6)](_0x46dc9a[_0x38d881(0x1c5)],_0x4d3089['existingSegment']['id'],_0x4cd256)),_0x540a2d=_0x4d3089[_0x38d881(0x1be)]['id'],_0x23dae4[_0x38d881(0x157)]?.({'type':_0x38d881(0xf0),'name':_0x4d3089[_0x38d881(0x11e)][_0x38d881(0x143)]}),_0x23dae4['logSuccess']?.(_0x38d881(0x19a)+_0x4d3089['yamlConfig'][_0x38d881(0x143)]+'\x27'),_0x2d4b4d[_0x38d881(0x1ad)]=0x1;}else _0x540a2d=_0x4d3089['existingSegment']['id'];}}catch(_0x28fe92){const _0x49fc24=isHttp400Error(_0x28fe92),_0x42579c=_0x49fc24?ErrorCode[_0x38d881(0xe6)]:ErrorCode[_0x38d881(0x184)],_0xc17d63=getErrorMessage(_0x28fe92);throw new SDKError(_0x42579c,_0x38d881(0x11f)+(_0x4d3089[_0x38d881(0x19b)]?_0x38d881(0x1c1):'update')+'\x20segment\x20from\x20file:\x20'+_0x4d3089[_0x38d881(0x15e)]+_0x38d881(0xfb)+_0xc17d63,_0x28fe92);}try{const _0x166909=await syncActivationsForSegment(_0x238e2c,_0x46dc9a['parentId'],_0x540a2d,_0x4d3089[_0x38d881(0x11e)]['name'],_0x4d3089[_0x38d881(0x145)],_0x23dae4,_0x4d3089[_0x38d881(0x15e)]);_0x2d4b4d[_0x38d881(0x147)]=_0x166909;}catch(_0x303453){if(_0x303453 instanceof SDKError)throw _0x303453;throw new SDKError(ErrorCode[_0x38d881(0x1a6)],_0x38d881(0x144)+_0x4d3089['yamlConfig'][_0x38d881(0x143)]+_0x38d881(0x155)+_0x4d3089[_0x38d881(0x15e)]+_0x38d881(0xfb)+getErrorMessage(_0x303453),_0x303453);}return _0x2d4b4d;},_0x363108=await batchAsync(_0x814f22,_0x4ff36e,_0xf21bcb),_0x1d6ebc={'created':0x0,'updated':0x0,'deleted':0x0,'createdSegmentIds':new Map(),'activations':{'created':0x0,'updated':0x0,'deleted':0x0}};for(const _0x1cffad of _0x363108){_0x1d6ebc[_0xee8b44(0x123)]+=_0x1cffad['created'],_0x1d6ebc[_0xee8b44(0x1ad)]+=_0x1cffad[_0xee8b44(0x1ad)],_0x1cffad[_0xee8b44(0x172)]&&_0x1d6ebc[_0xee8b44(0x109)]['set'](_0x1cffad[_0xee8b44(0x172)][_0xee8b44(0x143)],_0x1cffad[_0xee8b44(0x172)]['id']),_0x1d6ebc[_0xee8b44(0x147)][_0xee8b44(0x123)]+=_0x1cffad[_0xee8b44(0x147)][_0xee8b44(0x123)],_0x1d6ebc[_0xee8b44(0x147)][_0xee8b44(0x1ad)]+=_0x1cffad[_0xee8b44(0x147)][_0xee8b44(0x1ad)],_0x1d6ebc['activations'][_0xee8b44(0x1b7)]+=_0x1cffad[_0xee8b44(0x147)][_0xee8b44(0x1b7)];}return _0x1d6ebc;}async function syncActivationsForSegment(_0x1a9ffe,_0x270c83,_0x11aa6e,_0x1f1ad7,_0x458efe,_0xae09a7,_0xaa5901){const _0x18a919=a101_0x152b06,_0x2ba7df={'created':0x0,'updated':0x0,'deleted':0x0};for(const _0x1b7519 of _0x458efe){try{if(_0x1b7519['type']===_0x18a919(0x1c1)&&_0x1b7519['validatedRequest'])_0xae09a7['onProgress']?.({'type':_0x18a919(0x16f),'segmentName':_0x1f1ad7,'activationName':_0x1b7519[_0x18a919(0x143)]}),await _0xae09a7[_0x18a919(0x1bd)](_0x18a919(0xf1)+_0x1b7519[_0x18a919(0x143)]+_0x18a919(0x140),()=>_0x1a9ffe[_0x18a919(0x1c6)][_0x18a919(0x118)](_0x270c83,_0x11aa6e,_0x1b7519[_0x18a919(0x1a2)])),_0xae09a7[_0x18a919(0x157)]?.({'type':_0x18a919(0x180),'segmentName':_0x1f1ad7,'activationName':_0x1b7519[_0x18a919(0x143)]}),_0xae09a7[_0x18a919(0x11a)]?.(_0x18a919(0x168)+_0x1b7519[_0x18a919(0x143)]+'\x27'),_0x2ba7df[_0x18a919(0x123)]++;else{if(_0x1b7519[_0x18a919(0xe7)]===_0x18a919(0x188)&&_0x1b7519[_0x18a919(0x1a2)]&&_0x1b7519['existingActivation'])_0xae09a7['onProgress']?.({'type':_0x18a919(0x128),'segmentName':_0x1f1ad7,'activationName':_0x1b7519[_0x18a919(0x143)]}),await _0xae09a7['withProgress'](_0x18a919(0x10f)+_0x1b7519['name']+'\x27...',()=>_0x1a9ffe[_0x18a919(0x1c6)][_0x18a919(0x1c0)](_0x270c83,_0x11aa6e,_0x1b7519[_0x18a919(0x114)]['id'],_0x1b7519['validatedRequest'])),_0xae09a7['onProgress']?.({'type':_0x18a919(0x17b),'segmentName':_0x1f1ad7,'activationName':_0x1b7519[_0x18a919(0x143)]}),_0xae09a7[_0x18a919(0x11a)]?.(_0x18a919(0x121)+_0x1b7519[_0x18a919(0x143)]+'\x27'),_0x2ba7df['updated']++;else _0x1b7519[_0x18a919(0xe7)]==='delete'&&_0x1b7519['existingActivation']&&(_0xae09a7[_0x18a919(0x157)]?.({'type':_0x18a919(0x101),'segmentName':_0x1f1ad7,'activationName':_0x1b7519['name']}),await _0xae09a7[_0x18a919(0x1bd)]('Deleting\x20activation\x20\x27'+_0x1b7519['name']+_0x18a919(0x140),()=>_0x1a9ffe[_0x18a919(0x1c6)][_0x18a919(0x1af)](_0x270c83,_0x11aa6e,_0x1b7519[_0x18a919(0x114)]['id'])),_0xae09a7[_0x18a919(0x157)]?.({'type':_0x18a919(0xfa),'segmentName':_0x1f1ad7,'activationName':_0x1b7519[_0x18a919(0x143)]}),_0xae09a7['logDeleted']?.('Deleted\x20activation\x20\x27'+_0x1b7519[_0x18a919(0x143)]+'\x27'),_0x2ba7df[_0x18a919(0x1b7)]++);}}catch(_0x3ec43a){const _0x33d869=isHttp400Error(_0x3ec43a),_0x45386e=_0x33d869?ErrorCode['ACTIVATION_SYNTAX_ERROR']:ErrorCode['ACTIVATION_UPDATE_ERROR'],_0x395e23=getErrorMessage(_0x3ec43a);throw new SDKError(_0x45386e,_0x18a919(0x11f)+_0x1b7519[_0x18a919(0xe7)]+_0x18a919(0x13e)+_0x1b7519[_0x18a919(0x143)]+'\x27\x20from\x20file:\x20'+_0xaa5901+_0x18a919(0xfb)+_0x395e23,_0x3ec43a);}}return _0x2ba7df;}export async function executePushFolders(_0x58f4ee,_0x1897df,_0x485358,_0x5bcfe2,_0x43ff3e){const _0x21dbf2=a101_0x152b06,_0x475710=new Map(_0x485358);for(const _0x41073a of _0x1897df){const _0x104d34=_0x41073a[_0x21dbf2(0x13f)]('/'),_0x37425b=_0x104d34[_0x104d34[_0x21dbf2(0x127)]-0x1],_0x42de6d=_0x104d34[_0x21dbf2(0xee)](0x0,-0x1)[_0x21dbf2(0x12d)]('/'),_0x276a8d=_0x475710[_0x21dbf2(0x174)](_0x42de6d);_0x43ff3e[_0x21dbf2(0x157)]?.({'type':_0x21dbf2(0x12c),'folder':_0x41073a});const _0x4109fc={'name':_0x37425b,'parentFolderId':_0x276a8d},_0x5b23bf=await _0x43ff3e[_0x21dbf2(0x1bd)](_0x21dbf2(0xdf)+_0x41073a+'\x27...',()=>_0x58f4ee[_0x21dbf2(0x1c6)][_0x21dbf2(0x10c)](_0x5bcfe2[_0x21dbf2(0x1c5)],_0x4109fc));_0x475710['set'](_0x41073a,_0x5b23bf[_0x21dbf2(0xe0)]['id']),_0x43ff3e[_0x21dbf2(0x157)]?.({'type':_0x21dbf2(0x152),'folder':_0x41073a,'folderId':_0x5b23bf[_0x21dbf2(0xe0)]['id']}),_0x43ff3e[_0x21dbf2(0x1c3)]?.(_0x21dbf2(0x106)+_0x41073a+'\x27');}return _0x475710;}export async function executePushSegmentDeletions(_0xcd366f,_0x421634,_0x3c2885){const _0xddb515=a101_0x152b06;if(_0x421634[_0xddb515(0x127)]===0x0)return 0x0;const {batchAsync:_0x3d58a3}=await import(_0xddb515(0x10a)),_0x593103=0x5,_0x3f07fb=await _0x3d58a3(_0x421634,async _0x4eae6f=>{const _0x59a2ed=_0xddb515;return _0x3c2885[_0x59a2ed(0x157)]?.({'type':_0x59a2ed(0x17d),'name':_0x4eae6f['name']}),await _0xcd366f[_0x59a2ed(0x1c6)][_0x59a2ed(0x12a)](_0x4eae6f['id']),_0x3c2885[_0x59a2ed(0x157)]?.({'type':'segment_deleted','name':_0x4eae6f[_0x59a2ed(0x143)]}),_0x3c2885['logDeleted']?.(_0x59a2ed(0x181)+_0x4eae6f['name']+'\x27'),0x1;},_0x593103);return _0x3f07fb[_0xddb515(0x194)]((_0x55f4b0,_0x23a1b9)=>_0x55f4b0+_0x23a1b9,0x0);}export async function executePushJourneys(_0x43452e,_0x289133,_0x1529b4,_0x1f6ce1,_0x109c78){const _0x23d6d1=a101_0x152b06,{journeyDefToRequest:_0x4bce03}=await import('./journey-yaml.js'),{activationDefToCreateRequest:_0x34831e,yamlRuleToApi:_0xd18a07,validateSegmentRule:_0x6fc3a9}=await import(_0x23d6d1(0xfd)),_0x2f659b={'results':[],'created':0x0,'updated':0x0,'embeddedSegmentNameToId':new Map()},_0x1f9012=new Map(_0x1529b4[_0x23d6d1(0x18e)]),_0x5e211d=0x5;for(let _0x228d3b=0x0;_0x228d3b<_0x289133['length'];_0x228d3b+=_0x5e211d){const _0x5957fd=_0x289133['slice'](_0x228d3b,_0x228d3b+_0x5e211d),_0x46d84d=await Promise[_0x23d6d1(0x1b8)](_0x5957fd['map'](async _0x5b334f=>{const _0x3c719b=_0x23d6d1;if(!_0x5b334f['isNew']&&!_0x5b334f[_0x3c719b(0xde)])return{'action':_0x3c719b(0x19e),'name':_0x5b334f[_0x3c719b(0x11e)]['name'],'journeyId':_0x5b334f[_0x3c719b(0x108)]?.['id']};const _0x296d77=_0x5b334f[_0x3c719b(0xed)]?_0x1529b4[_0x3c719b(0x14d)][_0x3c719b(0x174)](_0x5b334f[_0x3c719b(0xed)]):undefined;_0x109c78[_0x3c719b(0x157)]?.({'type':_0x5b334f['isNew']?'journey_creating':_0x3c719b(0x10b),'name':_0x5b334f['yamlConfig'][_0x3c719b(0x143)]});try{const _0x43a495=await executeSingleJourneyPush(_0x43452e,_0x5b334f,{..._0x1529b4,'segmentNameToId':_0x1f9012},{'parentId':_0x1f6ce1[_0x3c719b(0x1c5)],'rootFolderId':_0x1f6ce1[_0x3c719b(0x11d)],'folderId':_0x296d77,'verbose':_0x1f6ce1[_0x3c719b(0x117)]},_0x109c78,{'journeyDefToRequest':_0x4bce03,'activationDefToCreateRequest':_0x34831e,'yamlRuleToApi':_0xd18a07,'validateSegmentRule':_0x6fc3a9});for(const [_0x279fec,_0x1ef9af]of _0x43a495[_0x3c719b(0x17c)]){_0x1f9012[_0x3c719b(0x1c4)](_0x279fec,_0x1ef9af),_0x2f659b['embeddedSegmentNameToId'][_0x3c719b(0x1c4)](_0x279fec,_0x1ef9af);}if(_0x43a495[_0x3c719b(0x115)]===_0x3c719b(0x123))_0x109c78[_0x3c719b(0x157)]?.({'type':'journey_created','name':_0x5b334f[_0x3c719b(0x11e)][_0x3c719b(0x143)],'journeyId':_0x43a495['journeyId']}),_0x109c78[_0x3c719b(0x11a)]?.(_0x3c719b(0x102)+_0x5b334f[_0x3c719b(0x11e)][_0x3c719b(0x143)]+'\x27'),_0x2f659b[_0x3c719b(0x123)]++;else _0x43a495[_0x3c719b(0x115)]===_0x3c719b(0x1ad)&&(_0x109c78[_0x3c719b(0x157)]?.({'type':_0x3c719b(0x138),'name':_0x5b334f['yamlConfig'][_0x3c719b(0x143)]}),_0x109c78['logSuccess']?.('Updated\x20journey\x20\x27'+_0x5b334f['yamlConfig']['name']+'\x27'),_0x2f659b[_0x3c719b(0x1ad)]++);return{'action':_0x43a495[_0x3c719b(0x115)],'name':_0x5b334f[_0x3c719b(0x11e)][_0x3c719b(0x143)],'journeyId':_0x43a495[_0x3c719b(0x159)]};}catch(_0x41328b){const _0x14aad0=isHttp400Error(_0x41328b),_0x8918bd=_0x14aad0?ErrorCode[_0x3c719b(0x13d)]:ErrorCode[_0x3c719b(0x16d)],_0x242e21=getErrorMessage(_0x41328b);throw new SDKError(_0x8918bd,'Failed\x20to\x20'+(_0x5b334f[_0x3c719b(0x19b)]?_0x3c719b(0x1c1):_0x3c719b(0x188))+_0x3c719b(0x141)+_0x5b334f['absolutePath']+_0x3c719b(0xfb)+_0x242e21,_0x41328b);}}));_0x2f659b['results'][_0x23d6d1(0x116)](..._0x46d84d);}return _0x2f659b;}async function executeSingleJourneyPush(_0x4835d7,_0x231838,_0x168f50,_0x38ad06,_0x546557,_0x19cc2e){const _0x537e2c=a101_0x152b06,{journeyDefToRequest:_0x5c36d8,activationDefToCreateRequest:_0x4f90b9,yamlRuleToApi:_0x2ea263,validateSegmentRule:_0xdb1fe0}=_0x19cc2e,_0x1fb3a8=new Map(),_0xa8afbe=new Map(),_0x250ab1=new Map(),_0x4548a=new Map(),_0x311c31=new Map();let _0x42096d;const _0x4aa9b3=async()=>{const _0x44e83b=a101_0x1e36;if(_0x42096d)return;_0x42096d=new Map();if(!_0x231838[_0x44e83b(0x108)])return;const _0x3a0b13=await _0x4835d7[_0x44e83b(0x18b)][_0x44e83b(0x19d)](_0x231838['existingJourney']['id']);for(const _0x4b34d2 of _0x3a0b13){const _0x1b7931=journeyActivationStepToYaml(_0x4b34d2,_0x168f50[_0x44e83b(0xff)],_0x168f50[_0x44e83b(0x19f)]),_0x57113a=activationSignature(_0x1b7931);!_0x42096d['has'](_0x57113a)&&_0x42096d['set'](_0x57113a,_0x4b34d2['id']),_0x1b7931['name']&&_0xa8afbe[_0x44e83b(0x1c4)](_0x1b7931[_0x44e83b(0x143)],_0x4b34d2['id']);}};if(_0x231838[_0x537e2c(0x108)]&&_0x231838[_0x537e2c(0x11e)]['segments']){const _0x5e191f=buildLocalExpandedRuleMappings(_0x231838[_0x537e2c(0x11e)]),_0x596326=_0x5e191f[_0x537e2c(0x19c)];if(_0x596326['size']>0x0){const _0x2c386f=new Map();for(const [_0x26d5e7,_0x5bb226]of _0x596326){const _0x8ad7fd=serializeExpandedRule(_0x5bb226,_0x596326);_0x2c386f['set'](_0x26d5e7,_0x8ad7fd);}const _0x322531=collectSegmentIdsFromJourneyApi(_0x231838[_0x537e2c(0x108)]);if(_0x322531[_0x537e2c(0x1b9)]>0x0){const _0x49d462=await buildServerSegmentRuleMap(_0x4835d7,_0x38ad06[_0x537e2c(0x1c5)],_0x168f50[_0x537e2c(0x192)],_0x322531);if(_0x49d462[_0x537e2c(0x1b9)]>0x0){const _0x5aee9f=new Map();for(const [_0x20eee0,_0x5c731c]of _0x49d462){const _0x549268=serializeExpandedRule(_0x5c731c,_0x49d462);!_0x5aee9f[_0x537e2c(0x193)](_0x549268)&&_0x5aee9f[_0x537e2c(0x1c4)](_0x549268,_0x20eee0);}for(const [_0xc95e3d,_0x3dff07]of _0x2c386f){const _0x2ffd17=_0x5aee9f[_0x537e2c(0x174)](_0x3dff07);_0x2ffd17&&(_0x311c31[_0x537e2c(0x1c4)](_0xc95e3d,_0x2ffd17),_0x168f50[_0x537e2c(0x18e)]['set'](_0xc95e3d,_0x2ffd17));}}}}}const _0xa7921f={'resolveSegmentId':async _0x1b61d0=>{const _0x490d27=_0x537e2c,_0x7c67a1=_0x168f50[_0x490d27(0x18e)]['get'](_0x1b61d0);if(!_0x7c67a1)throw new SDKError(ErrorCode[_0x490d27(0xf5)],_0x490d27(0xf4)+_0x1b61d0+_0x490d27(0x173)+_0x231838[_0x490d27(0x11e)][_0x490d27(0x143)]+')');return _0x7c67a1;},'resolveEmbeddedSegmentId':async(_0xb9874,_0x16467e)=>{const _0x26f927=_0x537e2c,_0x175558=_0x168f50['segmentNameToId'][_0x26f927(0x174)](_0xb9874);if(_0x175558)return _0x175558;const _0xb17f5f=_0x311c31['get'](_0xb9874);if(_0xb17f5f)return _0x168f50[_0x26f927(0x18e)][_0x26f927(0x1c4)](_0xb9874,_0xb17f5f),_0xb17f5f;const _0x180e3d=_0x168f50['existingSegments'][_0x26f927(0x151)](_0x3cbb7c=>_0x3cbb7c[_0x26f927(0x143)]===_0xb9874);if(_0x180e3d)return _0x168f50[_0x26f927(0x18e)][_0x26f927(0x1c4)](_0xb9874,_0x180e3d['id']),_0x180e3d['id'];if(_0x231838[_0x26f927(0x19b)]){const {stageName:_0x5b9676,criteriaName:_0x14a165}=findSegmentCriteriaLocation(_0x231838[_0x26f927(0x11e)],_0xb9874);return _0xdb1fe0(_0xb9874,_0x16467e['rule']),_0x250ab1['set'](_0xb9874,{'definition':_0x16467e,'stageName':_0x5b9676,'criteriaName':_0x14a165}),createPendingSegmentId(_0xb9874);}const _0x26f9d3=_0x231838[_0x26f927(0x108)]?.['id'];if(!_0x26f9d3)throw new SDKError(ErrorCode[_0x26f927(0x1a8)],'Cannot\x20create\x20embedded\x20segment\x20for\x20existing\x20journey\x20without\x20journey\x20ID');_0xdb1fe0(_0xb9874,_0x16467e[_0x26f927(0x1a4)]);const _0xcbea2f=generateDeterministicJourneySegmentName(_0x231838[_0x26f927(0x11e)][_0x26f927(0x143)],_0xb9874),_0x5bd7da=_0x168f50[_0x26f927(0x192)][_0x26f927(0x151)](_0x4bf126=>_0x4bf126[_0x26f927(0x143)]===_0xcbea2f),_0x5061da=createSegmentIdResolver(_0x168f50[_0x26f927(0x18e)],_0xb9874),_0x50ed57=await resolveRuleSegmentIds(_0x16467e[_0x26f927(0x1a4)],_0x5061da);let _0xf69460;if(_0x5bd7da)await _0x4835d7[_0x26f927(0x1c6)][_0x26f927(0x1b6)](_0x38ad06['parentId'],_0x5bd7da['id'],{'description':_0x16467e[_0x26f927(0xf2)]||_0x26f927(0x110)+_0xb9874,'rule':_0x2ea263(_0x50ed57,!![]),'countPopulation':!![]}),_0xf69460=_0x5bd7da['id'];else try{_0xf69460=await _0x4835d7[_0x26f927(0x1c6)][_0x26f927(0x195)]({'name':_0xcbea2f,'description':_0x16467e[_0x26f927(0xf2)]||'Entry\x20criteria:\x20'+_0xb9874,'journeyId':_0x26f9d3,'rule':_0x2ea263(_0x50ed57,!![]),'countPopulation':!![],'parentFolderId':_0x38ad06[_0x26f927(0x11d)]||'','audienceId':_0x38ad06[_0x26f927(0x1c5)]});}catch(_0x18e107){const _0x254da6=_0x18e107 instanceof Error&&_0x18e107[_0x26f927(0xfe)][_0x26f927(0x14b)](_0x26f927(0x13b));if(_0x254da6){const _0x347960=await _0x4835d7[_0x26f927(0x1c6)][_0x26f927(0x16b)](_0x38ad06['parentId']),_0x915d0e=_0x347960[_0x26f927(0x151)](_0x81bea1=>_0x81bea1[_0x26f927(0x143)]===_0xcbea2f);if(_0x915d0e)await _0x4835d7[_0x26f927(0x1c6)][_0x26f927(0x1b6)](_0x38ad06[_0x26f927(0x1c5)],_0x915d0e['id'],{'description':_0x16467e['description']||_0x26f927(0x110)+_0xb9874,'rule':_0x2ea263(_0x50ed57,!![]),'countPopulation':!![]}),_0xf69460=_0x915d0e['id'];else throw _0x18e107;}else throw _0x18e107;}return _0x168f50[_0x26f927(0x18e)][_0x26f927(0x1c4)](_0xb9874,_0xf69460),_0x1fb3a8['set'](_0xb9874,_0xf69460),_0xf69460;},'resolveActivationId':async _0x4bb1a9=>{const _0x4db2ac=_0x537e2c,_0x5551f5=_0xa8afbe[_0x4db2ac(0x174)](_0x4bb1a9);if(_0x5551f5)return _0x5551f5;if(_0x231838[_0x4db2ac(0x108)]){await _0x4aa9b3();const _0x47f19=_0xa8afbe[_0x4db2ac(0x174)](_0x4bb1a9);if(_0x47f19)return _0x47f19;}throw new SDKError(ErrorCode[_0x4db2ac(0x1ab)],_0x4db2ac(0x107)+_0x4bb1a9+_0x4db2ac(0x173)+_0x231838[_0x4db2ac(0x11e)][_0x4db2ac(0x143)]+_0x4db2ac(0xef)+_0x4db2ac(0x15d));},'resolveEmbeddedActivationId':async(_0x3f9708,_0x502e2b)=>{const _0x9f9ec5=_0x537e2c,_0x2a57af=_0xa8afbe[_0x9f9ec5(0x174)](_0x3f9708);if(_0x2a57af)return _0x2a57af;if(_0x231838['isNew'])return _0x4548a[_0x9f9ec5(0x1c4)](_0x3f9708,_0x502e2b),createPendingActivationId(_0x3f9708);if(_0x231838[_0x9f9ec5(0x108)]){await _0x4aa9b3();const _0x4049ca=_0xa8afbe[_0x9f9ec5(0x174)](_0x502e2b[_0x9f9ec5(0x143)]);if(_0x4049ca)return _0xa8afbe[_0x9f9ec5(0x1c4)](_0x3f9708,_0x4049ca),_0x4049ca;const _0x27f5a8=activationSignature(_0x502e2b),_0x78883d=_0x42096d?.[_0x9f9ec5(0x174)](_0x27f5a8);if(_0x78883d)return _0xa8afbe[_0x9f9ec5(0x1c4)](_0x3f9708,_0x78883d),_0x78883d;const _0xe39be6=await _0x4f90b9(_0x502e2b,_0x168f50[_0x9f9ec5(0x1a0)]),_0x1a15ac=await _0x4835d7[_0x9f9ec5(0x18b)][_0x9f9ec5(0x118)](_0x231838[_0x9f9ec5(0x108)]['id'],_0xe39be6);return _0xa8afbe['set'](_0x3f9708,_0x1a15ac['id']),_0x1a15ac['id'];}throw new SDKError(ErrorCode[_0x9f9ec5(0x1a8)],_0x9f9ec5(0x182));},'resolveJourneyId':async _0x140f1a=>{const _0x1ca298=_0x537e2c;try{return await _0x4835d7[_0x1ca298(0x18b)][_0x1ca298(0x17f)](_0x38ad06[_0x1ca298(0x1c5)],_0x140f1a);}catch(_0xe7a05e){throw new SDKError(ErrorCode[_0x1ca298(0x1ab)],_0x1ca298(0x16c)+_0x140f1a+'\x27\x20not\x20found\x20in\x20parent\x20segment\x20(referenced\x20in\x20jump\x20step\x20of\x20\x27'+_0x231838[_0x1ca298(0x11e)]['name']+'\x27)',_0xe7a05e);}},'resolveStageId':async(_0x295236,_0x4ee2a2)=>{const _0x1535f8=_0x537e2c,_0x14530a=await _0x4835d7[_0x1535f8(0x18b)][_0x1535f8(0x1aa)](_0x295236),_0x294a24=_0x14530a['attributes'][_0x1535f8(0xe2)][_0x1535f8(0x151)](_0x1406ea=>_0x1406ea['name'][_0x1535f8(0x158)]()===_0x4ee2a2[_0x1535f8(0x158)]());if(!_0x294a24?.['id'])throw new SDKError(ErrorCode['NOT_FOUND'],_0x1535f8(0x176)+_0x4ee2a2+'\x27\x20not\x20found\x20in\x20journey\x20\x27'+(_0x14530a[_0x1535f8(0x100)][_0x1535f8(0x1b3)]||_0x14530a[_0x1535f8(0x100)][_0x1535f8(0x143)])+'\x27');return _0x294a24['id'];}},_0x193cae=await _0x5c36d8(_0x231838[_0x537e2c(0x11e)],_0x38ad06[_0x537e2c(0x1c5)],_0xa7921f),_0x145192=_0x38ad06[_0x537e2c(0xf7)]||_0x38ad06[_0x537e2c(0x11d)];_0x145192&&(_0x193cae['relationships']={'parentFolder':{'data':{'id':_0x145192,'type':'folder'}}});if(_0x231838['isNew']){if(_0x250ab1[_0x537e2c(0x1b9)]>0x0||_0x4548a[_0x537e2c(0x1b9)]>0x0)return await executeThreeStepJourneyCreate(_0x4835d7,_0x231838,_0x193cae,{'pendingEmbeddedSegments':_0x250ab1,'pendingEmbeddedActivations':_0x4548a,'embeddedSegmentNameToId':_0x1fb3a8,'journeyActivationNameToId':_0xa8afbe},{..._0x38ad06,'effectiveFolderId':_0x145192},_0x168f50,_0x546557,_0x19cc2e);else{ensureJourneyDefaults(_0x193cae['attributes']);const _0x56358a=await _0x4835d7[_0x537e2c(0x18b)][_0x537e2c(0x1c1)](_0x193cae);return{'action':_0x537e2c(0x123),'journeyId':_0x56358a['id'],'embeddedSegmentNameToId':_0x1fb3a8};}}else{if(_0x231838[_0x537e2c(0xde)]&&_0x231838[_0x537e2c(0x108)])return ensureJourneyDefaults(_0x193cae['attributes']),await _0x4835d7[_0x537e2c(0x18b)]['update'](_0x231838['existingJourney']['id'],_0x193cae),{'action':_0x537e2c(0x1ad),'journeyId':_0x231838['existingJourney']['id'],'embeddedSegmentNameToId':_0x1fb3a8};}return{'action':_0x537e2c(0x19e),'journeyId':_0x231838[_0x537e2c(0x108)]?.['id'],'embeddedSegmentNameToId':_0x1fb3a8};}function findSegmentCriteriaLocation(_0x331ba3,_0x401cc4){const _0x4b05a5=a101_0x152b06,_0x2d57f3=_0x331ba3[_0x4b05a5(0x197)]||_0x331ba3[_0x4b05a5(0x18f)]?.[0x0]?.['stages']||[];let _0x49c747='entry',_0x2ba714=_0x401cc4;const _0x300852=_0x331ba3[_0x4b05a5(0x165)]||_0x331ba3[_0x4b05a5(0x18f)]?.[0x0]?.[_0x4b05a5(0x165)];if(_0x300852?.[_0x4b05a5(0x1c6)]===_0x401cc4)return{'stageName':_0x4b05a5(0x165),'criteriaName':_0x300852[_0x4b05a5(0x143)]||_0x401cc4};_0x1e55f7:for(const _0x557c04 of _0x2d57f3){if(_0x557c04[_0x4b05a5(0x126)]?.[_0x4b05a5(0x1c6)]===_0x401cc4){_0x49c747=_0x557c04[_0x4b05a5(0x143)],_0x2ba714=_0x557c04['entry_criteria'][_0x4b05a5(0x143)]||_0x401cc4;break;}if(_0x557c04[_0x4b05a5(0x1a7)])for(const _0x451aa9 of _0x557c04['steps']){if(_0x451aa9['type']==='decision_point'&&_0x451aa9[_0x4b05a5(0x105)]?.[_0x4b05a5(0x183)])for(const _0x3fd219 of _0x451aa9[_0x4b05a5(0x105)][_0x4b05a5(0x183)]){if(_0x3fd219[_0x4b05a5(0x1c6)]===_0x401cc4){_0x49c747=_0x557c04[_0x4b05a5(0x143)],_0x2ba714=_0x3fd219[_0x4b05a5(0x143)]||_0x401cc4;break _0x1e55f7;}}}}return{'stageName':_0x49c747,'criteriaName':_0x2ba714};}async function executeThreeStepJourneyCreate(_0x5b4052,_0x50c7ce,_0x143b5e,_0x3c4065,_0x28b267,_0x515eb6,_0x59d721,_0x42b9f9){const _0xd750a4=a101_0x152b06,{activationDefToCreateRequest:_0x4be99d,yamlRuleToApi:_0x321235}=_0x42b9f9,{pendingEmbeddedSegments:_0x1c544b,pendingEmbeddedActivations:_0x977ef1,embeddedSegmentNameToId:_0x1c0b8c}=_0x3c4065,_0x1e619e=JSON[_0xd750a4(0x161)](JSON[_0xd750a4(0x129)](_0x143b5e));ensureJourneyDefaults(_0x1e619e[_0xd750a4(0x100)]),stripPendingIds(_0x1e619e);const _0x269fdf=await _0x5b4052[_0xd750a4(0x18b)][_0xd750a4(0x1c1)](_0x1e619e),_0x3aa30d=_0x269fdf['id'],_0x5383d3=new Map();for(const _0x25d58b of _0x269fdf[_0xd750a4(0x100)]['journeyStages']){_0x5383d3[_0xd750a4(0x1c4)](_0x25d58b[_0xd750a4(0x143)][_0xd750a4(0x158)](),_0x25d58b['id']);}for(const [_0x1ab11a,{definition:_0x3a3884}]of _0x1c544b){const _0x4b5aba=generateDeterministicJourneySegmentName(_0x50c7ce[_0xd750a4(0x11e)]['name'],_0x1ab11a);_0x59d721[_0xd750a4(0x157)]?.({'type':_0xd750a4(0x1ba),'journeyName':_0x50c7ce[_0xd750a4(0x11e)][_0xd750a4(0x143)],'segmentName':_0x1ab11a});const _0x11a21a=createSegmentIdResolver(_0x515eb6[_0xd750a4(0x18e)],_0x1ab11a),_0x3fdbc7=await resolveRuleSegmentIds(_0x3a3884[_0xd750a4(0x1a4)],_0x11a21a),_0x5f18ed=await _0x5b4052[_0xd750a4(0x1c6)]['createJourneySegment']({'name':_0x4b5aba,'description':_0x3a3884[_0xd750a4(0xf2)]||'Entry\x20criteria:\x20'+_0x1ab11a,'journeyId':_0x3aa30d,'rule':_0x321235(_0x3fdbc7,!![]),'countPopulation':!![],'parentFolderId':_0x28b267['effectiveFolderId']||'','audienceId':_0x28b267[_0xd750a4(0x1c5)]});_0x1c0b8c['set'](_0x1ab11a,_0x5f18ed),_0x515eb6[_0xd750a4(0x18e)][_0xd750a4(0x1c4)](_0x1ab11a,_0x5f18ed),_0x59d721[_0xd750a4(0x157)]?.({'type':_0xd750a4(0x124),'journeyName':_0x50c7ce[_0xd750a4(0x11e)][_0xd750a4(0x143)],'segmentName':_0x1ab11a});}const _0x473a2c=new Map();for(const [_0x4a21eb,_0x45757c]of _0x977ef1){_0x59d721['onProgress']?.({'type':_0xd750a4(0x11c),'journeyName':_0x50c7ce[_0xd750a4(0x11e)][_0xd750a4(0x143)],'activationName':_0x4a21eb});const _0x4df868=await _0x4be99d(_0x45757c,_0x515eb6[_0xd750a4(0x1a0)]),_0x45a610=await _0x5b4052[_0xd750a4(0x18b)][_0xd750a4(0x118)](_0x3aa30d,_0x4df868);_0x473a2c[_0xd750a4(0x1c4)](_0x4a21eb,_0x45a610['id']),_0x3c4065['journeyActivationNameToId']['set'](_0x4a21eb,_0x45a610['id']),_0x59d721[_0xd750a4(0x157)]?.({'type':_0xd750a4(0x119),'journeyName':_0x50c7ce[_0xd750a4(0x11e)]['name'],'activationName':_0x4a21eb});}const _0xca1e19=JSON[_0xd750a4(0x161)](JSON[_0xd750a4(0x129)](_0x143b5e));return _0xca1e19['id']=_0x3aa30d,ensureJourneyDefaults(_0xca1e19['attributes']),resolvePendingIdsInRequest(_0xca1e19,_0x143b5e,_0x5383d3,_0x1c0b8c,_0x473a2c,_0x59d721),await _0x5b4052[_0xd750a4(0x18b)][_0xd750a4(0x188)](_0x3aa30d,_0xca1e19),{'action':_0xd750a4(0x123),'journeyId':_0x3aa30d,'embeddedSegmentNameToId':_0x1c0b8c};}function stripPendingIds(_0x40df0e){const _0x261279=a101_0x152b06;for(const _0xc82a22 of _0x40df0e[_0x261279(0x100)][_0x261279(0xe2)]||[]){_0xc82a22['entryCriteria']?.[_0x261279(0x196)]&&isPendingSegmentId(_0xc82a22[_0x261279(0x133)][_0x261279(0x196)])&&delete _0xc82a22[_0x261279(0x133)];if(_0xc82a22['steps'])for(const _0x56cd72 of Object[_0x261279(0x11b)](_0xc82a22[_0x261279(0x1a7)])){const _0x56f74a=_0xc82a22[_0x261279(0x1a7)][_0x56cd72];_0x56f74a[_0x261279(0xe7)]===_0x261279(0x111)&&_0x56f74a[_0x261279(0x17a)]&&isPendingActivationId(_0x56f74a[_0x261279(0x17a)])&&(_0x56f74a[_0x261279(0x17a)]='');if(_0x56f74a[_0x261279(0xe7)]==='DecisionPoint'&&_0x56f74a[_0x261279(0x183)])for(const _0x3011c7 of _0x56f74a[_0x261279(0x183)]){_0x3011c7['segmentId']&&isPendingSegmentId(_0x3011c7[_0x261279(0x196)])&&(_0x3011c7[_0x261279(0x196)]='');}_0x56f74a[_0x261279(0xe7)]===_0x261279(0x113)&&_0x56f74a[_0x261279(0x10e)]?.[_0x261279(0x196)]&&isPendingSegmentId(_0x56f74a[_0x261279(0x10e)][_0x261279(0x196)])&&(_0x56f74a[_0x261279(0x10e)]['segmentId']='');}}}function resolvePendingIdsInRequest(_0x1b5e1a,_0x370499,_0x2097d9,_0x4afb33,_0x11cad2,_0x25307b){const _0x315fe1=a101_0x152b06,_0x2b7b59=(_0x3e0303,_0x246590)=>{const _0x4f1aad=a101_0x1e36;if(!isPendingSegmentId(_0x3e0303))return _0x3e0303;const _0x88a55b=extractPendingSegmentName(_0x3e0303),_0x15e2c8=_0x4afb33[_0x4f1aad(0x174)](_0x88a55b);return!_0x15e2c8&&_0x25307b[_0x4f1aad(0x137)]?.(_0x4f1aad(0x1a3)+_0x88a55b+_0x4f1aad(0x1ae)+_0x246590),_0x15e2c8;};if(_0x1b5e1a['attributes'][_0x315fe1(0x165)]?.[_0x315fe1(0x196)]&&isPendingSegmentId(_0x1b5e1a[_0x315fe1(0x100)]['goal']['segmentId'])){const _0x456ee3=_0x2b7b59(_0x1b5e1a[_0x315fe1(0x100)][_0x315fe1(0x165)][_0x315fe1(0x196)],_0x315fe1(0x1b1));_0x456ee3&&(_0x1b5e1a[_0x315fe1(0x100)][_0x315fe1(0x165)][_0x315fe1(0x196)]=_0x456ee3);}for(const _0x1a0b86 of _0x1b5e1a[_0x315fe1(0x100)][_0x315fe1(0xe2)]||[]){const _0x5828f5=_0x2097d9[_0x315fe1(0x174)](_0x1a0b86[_0x315fe1(0x143)]['toLowerCase']());_0x5828f5&&(_0x1a0b86['id']=_0x5828f5);if(_0x1a0b86[_0x315fe1(0x133)]?.[_0x315fe1(0x196)]&&isPendingSegmentId(_0x1a0b86[_0x315fe1(0x133)][_0x315fe1(0x196)])){const _0x4ecebb=_0x2b7b59(_0x1a0b86[_0x315fe1(0x133)][_0x315fe1(0x196)],'stage\x20\x27'+_0x1a0b86[_0x315fe1(0x143)]+_0x315fe1(0x15b));_0x4ecebb&&(_0x1a0b86[_0x315fe1(0x133)][_0x315fe1(0x196)]=_0x4ecebb);}if(_0x1a0b86[_0x315fe1(0x171)])for(const _0x51d6db of _0x1a0b86[_0x315fe1(0x171)]){if(_0x51d6db[_0x315fe1(0x196)]&&isPendingSegmentId(_0x51d6db[_0x315fe1(0x196)])){const _0x40f201=_0x2b7b59(_0x51d6db[_0x315fe1(0x196)],_0x315fe1(0x1ac)+_0x1a0b86[_0x315fe1(0x143)]+_0x315fe1(0x10d));_0x40f201&&(_0x51d6db['segmentId']=_0x40f201);}}if(_0x1a0b86[_0x315fe1(0xf3)]?.[_0x315fe1(0x196)]&&isPendingSegmentId(_0x1a0b86[_0x315fe1(0xf3)][_0x315fe1(0x196)])){const _0x219e75=_0x2b7b59(_0x1a0b86[_0x315fe1(0xf3)][_0x315fe1(0x196)],_0x315fe1(0x1ac)+_0x1a0b86['name']+_0x315fe1(0x153));_0x219e75&&(_0x1a0b86[_0x315fe1(0xf3)][_0x315fe1(0x196)]=_0x219e75);}if(_0x1a0b86[_0x315fe1(0x1a7)]){const _0x8014a7=_0x13731a=>_0x370499[_0x315fe1(0x100)][_0x315fe1(0xe2)]['find'](_0x1efae0=>_0x1efae0['name'][_0x315fe1(0x158)]()===_0x1a0b86[_0x315fe1(0x143)][_0x315fe1(0x158)]())?.[_0x315fe1(0x1a7)]?.[_0x13731a];for(const _0x549fd0 of Object[_0x315fe1(0x11b)](_0x1a0b86['steps'])){const _0x455de8=_0x1a0b86[_0x315fe1(0x1a7)][_0x549fd0],_0x399643=_0x8014a7(_0x549fd0);if(_0x455de8['type']===_0x315fe1(0x111)&&_0x455de8['journeyActivationStepId']&&(isPendingActivationId(_0x455de8[_0x315fe1(0x17a)])||_0x455de8[_0x315fe1(0x17a)]==='')){if(_0x399643?.['journeyActivationStepId']&&isPendingActivationId(_0x399643[_0x315fe1(0x17a)])){const _0x239395=extractPendingActivationName(_0x399643[_0x315fe1(0x17a)]),_0x4e1c17=_0x11cad2['get'](_0x239395);_0x4e1c17&&(_0x455de8[_0x315fe1(0x17a)]=_0x4e1c17);}}if(_0x455de8['type']===_0x315fe1(0x135)&&_0x455de8[_0x315fe1(0x183)]&&_0x399643?.[_0x315fe1(0x183)])for(let _0x414f96=0x0;_0x414f96<_0x455de8['branches'][_0x315fe1(0x127)];_0x414f96++){const _0x1e8349=_0x455de8[_0x315fe1(0x183)][_0x414f96],_0x1f0f90=_0x399643[_0x315fe1(0x183)][_0x414f96];if(_0x1f0f90?.['segmentId']&&isPendingSegmentId(_0x1f0f90[_0x315fe1(0x196)])){const _0x4f629c=_0x2b7b59(_0x1f0f90[_0x315fe1(0x196)],'stage\x20\x27'+_0x1a0b86[_0x315fe1(0x143)]+_0x315fe1(0x13a)+(_0x1e8349[_0x315fe1(0x143)]||_0x414f96)+'\x27');_0x4f629c&&(_0x1e8349[_0x315fe1(0x196)]=_0x4f629c);}}if(_0x455de8['type']===_0x315fe1(0x113)&&_0x455de8[_0x315fe1(0x10e)]?.['segmentId']&&_0x399643?.[_0x315fe1(0x10e)]?.['segmentId']&&isPendingSegmentId(_0x399643[_0x315fe1(0x10e)][_0x315fe1(0x196)])){const _0x46b625=_0x2b7b59(_0x399643[_0x315fe1(0x10e)][_0x315fe1(0x196)],_0x315fe1(0x1ac)+_0x1a0b86[_0x315fe1(0x143)]+_0x315fe1(0x1bb));_0x46b625&&(_0x455de8[_0x315fe1(0x10e)][_0x315fe1(0x196)]=_0x46b625);}}}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a102_0x30ed(){const _0x33bd74=['set','2493528ApxzPX','add','297891fZIfvD','name','1955840CHGScf','35323OZcoiB','parentFolderId','has','392rWWjsO','get','46GwZWhN','8040TznjtD','8704206IAAriV','1046305cfnMBw'];a102_0x30ed=function(){return _0x33bd74;};return a102_0x30ed();}function a102_0x4b18(_0x4aaff1,_0x475802){_0x4aaff1=_0x4aaff1-0x69;const _0x30ed27=a102_0x30ed();let _0x4b1861=_0x30ed27[_0x4aaff1];return _0x4b1861;}(function(_0xcfd786,_0x35b750){const _0x198c30=a102_0x4b18,_0x406e00=_0xcfd786();while(!![]){try{const _0x1f2db2=-parseInt(_0x198c30(0x71))/0x1*(parseInt(_0x198c30(0x76))/0x2)+parseInt(_0x198c30(0x6e))/0x3+-parseInt(_0x198c30(0x70))/0x4+parseInt(_0x198c30(0x6a))/0x5+parseInt(_0x198c30(0x6c))/0x6+parseInt(_0x198c30(0x74))/0x7*(parseInt(_0x198c30(0x77))/0x8)+parseInt(_0x198c30(0x69))/0x9;if(_0x1f2db2===_0x35b750)break;else _0x406e00['push'](_0x406e00['shift']());}catch(_0x48d474){_0x406e00['push'](_0x406e00['shift']());}}}(a102_0x30ed,0x6cedb));export function buildFolderIdToPathMap(_0x274656){const _0x4e96cd=a102_0x4b18,_0x59564d=new Map(),_0x2c0cdb=new Map();for(const _0x169bea of _0x274656){_0x2c0cdb[_0x4e96cd(0x6b)](_0x169bea['id'],_0x169bea);}const _0x425c8c=new Set();for(const _0x13c343 of _0x274656){!_0x13c343[_0x4e96cd(0x72)]&&_0x425c8c[_0x4e96cd(0x6d)](_0x13c343['id']);}function _0x13631d(_0x3019cf){const _0x2e7217=_0x4e96cd;if(_0x59564d['has'](_0x3019cf['id']))return _0x59564d[_0x2e7217(0x75)](_0x3019cf['id']);if(_0x425c8c[_0x2e7217(0x73)](_0x3019cf['id']))return _0x59564d[_0x2e7217(0x6b)](_0x3019cf['id'],''),'';if(_0x3019cf[_0x2e7217(0x72)]){const _0x4b8958=_0x2c0cdb[_0x2e7217(0x75)](_0x3019cf[_0x2e7217(0x72)]);if(_0x4b8958){const _0x46cffc=_0x13631d(_0x4b8958),_0x50fbd9=_0x46cffc?_0x46cffc+'/'+_0x3019cf[_0x2e7217(0x6f)]:_0x3019cf[_0x2e7217(0x6f)];return _0x59564d['set'](_0x3019cf['id'],_0x50fbd9),_0x50fbd9;}}const _0x67ef42=_0x3019cf['name'];return _0x59564d[_0x2e7217(0x6b)](_0x3019cf['id'],_0x67ef42),_0x67ef42;}for(const _0x13a6b3 of _0x274656){_0x13631d(_0x13a6b3);}return _0x59564d;}export function buildFolderPathToIdMap(_0x21a8c2){const _0x4ab3f1=a102_0x4b18,_0x3d1d41=new Map(),_0x268017=new Map();for(const _0x1d56e9 of _0x21a8c2){_0x268017['set'](_0x1d56e9['id'],_0x1d56e9);}const _0x3b6b77=new Set();for(const _0x299140 of _0x21a8c2){!_0x299140['parentFolderId']&&_0x3b6b77[_0x4ab3f1(0x6d)](_0x299140['id']);}function _0x5c09ca(_0x4e59d5){const _0x30ca47=_0x4ab3f1;if(_0x3b6b77[_0x30ca47(0x73)](_0x4e59d5['id']))return'';if(_0x4e59d5[_0x30ca47(0x72)]){const _0x3b9ee8=_0x268017[_0x30ca47(0x75)](_0x4e59d5[_0x30ca47(0x72)]);if(_0x3b9ee8){const _0x5d5c49=_0x5c09ca(_0x3b9ee8);return _0x5d5c49?_0x5d5c49+'/'+_0x4e59d5[_0x30ca47(0x6f)]:_0x4e59d5[_0x30ca47(0x6f)];}}return _0x4e59d5[_0x30ca47(0x6f)];}for(const _0x4b159d of _0x21a8c2){const _0x9f3cc4=_0x5c09ca(_0x4b159d);_0x3d1d41[_0x4ab3f1(0x6b)](_0x9f3cc4,_0x4b159d['id']);}return _0x3d1d41;}export function buildFolderMaps(_0x3adef9){const _0x2c00ac=a102_0x4b18,_0x4b799f=buildFolderIdToPathMap(_0x3adef9),_0x43fa95=new Map();for(const [_0x1703df,_0x2d5a6c]of _0x4b799f){_0x43fa95[_0x2c00ac(0x6b)](_0x2d5a6c,_0x1703df);}return{'idToPath':_0x4b799f,'pathToId':_0x43fa95};}export function getFolderPath(_0x4ed811,_0x156e7c){if(!_0x4ed811)return'';return _0x156e7c['get'](_0x4ed811)??'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ba574,_0x39cf39){const _0x3f094d=a103_0x39c2,_0x881a01=_0x3ba574();while(!![]){try{const _0x37607=parseInt(_0x3f094d(0x113))/0x1+parseInt(_0x3f094d(0x12c))/0x2+-parseInt(_0x3f094d(0x11e))/0x3*(-parseInt(_0x3f094d(0x10f))/0x4)+parseInt(_0x3f094d(0x11a))/0x5+parseInt(_0x3f094d(0x125))/0x6+parseInt(_0x3f094d(0x11d))/0x7+-parseInt(_0x3f094d(0x115))/0x8*(parseInt(_0x3f094d(0x10b))/0x9);if(_0x37607===_0x39cf39)break;else _0x881a01['push'](_0x881a01['shift']());}catch(_0x2759fd){_0x881a01['push'](_0x881a01['shift']());}}}(a103_0xc43c,0xc858d));import a103_0x3b342b from'path';import{parse as a103_0x27c729}from'yaml';import{nodeFileSystem}from'../io/node-filesystem.js';export function parsePath(_0x194131){const _0x8d2583=a103_0x39c2;if(!_0x194131||_0x194131[_0x8d2583(0x128)]()==='')throw new Error(_0x8d2583(0x11b));const _0x2465d3=_0x194131[_0x8d2583(0x128)]();if(_0x2465d3==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x194131};const _0x2c5b2a=_0x2465d3[_0x8d2583(0x11f)]('/')?_0x2465d3[_0x8d2583(0x11c)](0x1):_0x2465d3,_0x1e2d5f=_0x2c5b2a[_0x8d2583(0x119)]('/')[_0x8d2583(0x111)](_0x557261=>_0x557261!=='');if(_0x1e2d5f[_0x8d2583(0x126)]===0x0)throw new Error(_0x8d2583(0x121));const _0x12ece4=_0x2465d3[_0x8d2583(0x11f)]('/')||!isRelativePathSegment(_0x1e2d5f[0x0]);for(const _0x2a0f8d of _0x1e2d5f){validatePathSegment(_0x2a0f8d);}return{'segments':_0x1e2d5f,'isAbsolute':_0x12ece4,'raw':_0x194131};}function isRelativePathSegment(_0x40d50a){return _0x40d50a==='.'||_0x40d50a==='..';}function validatePathSegment(_0x1d3e38){const _0x6d845f=a103_0x39c2;if(_0x1d3e38==='')throw new Error(_0x6d845f(0x106));if(_0x1d3e38==='.'||_0x1d3e38==='..')return;if(/[\x00-\x1F\x7F]/[_0x6d845f(0x10d)](_0x1d3e38))throw new Error(_0x6d845f(0x105)+_0x1d3e38);if(_0x1d3e38!==_0x1d3e38[_0x6d845f(0x128)]()){}}function a103_0x39c2(_0x2bab78,_0x202b83){_0x2bab78=_0x2bab78-0xfd;const _0xc43c8a=a103_0xc43c();let _0x39c236=_0xc43c8a[_0x2bab78];return _0x39c236;}export function validatePath(_0x37b4a9){const _0xdbd5f3=a103_0x39c2;if(_0x37b4a9[_0xdbd5f3(0x102)][_0xdbd5f3(0x126)]===0x0&&!_0x37b4a9[_0xdbd5f3(0x120)])throw new Error(_0xdbd5f3(0x108));if(_0x37b4a9[_0xdbd5f3(0x120)]){if(_0x37b4a9[_0xdbd5f3(0x102)][0x0]==='..')throw new Error(_0xdbd5f3(0x112));let _0x3fda95=0x0;for(const _0x1096ac of _0x37b4a9[_0xdbd5f3(0x102)]){if(_0x1096ac==='..'){if(_0x3fda95===0x0)throw new Error(_0xdbd5f3(0x107));_0x3fda95--;}else _0x1096ac!=='.'&&_0x3fda95++;}}}export function joinPaths(_0x40b4aa,_0x4d5b53){const _0x4f0285=a103_0x39c2;if(!_0x40b4aa||_0x40b4aa==='/')return _0x4d5b53;if(!_0x4d5b53||_0x4d5b53==='.')return _0x40b4aa;if(_0x4d5b53[_0x4f0285(0x11f)]('/'))return _0x4d5b53;const _0x201ed2=parsePath(_0x40b4aa),_0x67a16=parsePath(_0x4d5b53),_0xc50619=[..._0x201ed2[_0x4f0285(0x102)]];for(const _0x3a6fdd of _0x67a16['segments']){if(_0x3a6fdd==='.')continue;else{if(_0x3a6fdd==='..'){if(_0xc50619[_0x4f0285(0x126)]===0x0)throw new Error(_0x4f0285(0x10a));_0xc50619['pop']();}else _0xc50619[_0x4f0285(0x122)](_0x3a6fdd);}}const _0x3cffff=_0xc50619[_0x4f0285(0x110)]('/');return _0x201ed2[_0x4f0285(0x129)]['startsWith']('/')?'/'+_0x3cffff:_0x3cffff;}export function normalizePath(_0x2cdcb2){const _0x588f1e=a103_0x39c2,_0x5f0480=parsePath(_0x2cdcb2),_0x2bcbf0=[];for(const _0x315064 of _0x5f0480['segments']){if(_0x315064==='.')continue;else{if(_0x315064==='..'){if(_0x2bcbf0['length']===0x0){if(_0x5f0480['isAbsolute'])throw new Error(_0x588f1e(0x10a));_0x2bcbf0[_0x588f1e(0x122)]('..');}else _0x2bcbf0[_0x2bcbf0[_0x588f1e(0x126)]-0x1]==='..'?_0x2bcbf0[_0x588f1e(0x122)]('..'):_0x2bcbf0[_0x588f1e(0xfd)]();}else _0x2bcbf0[_0x588f1e(0x122)](_0x315064);}}if(_0x2bcbf0[_0x588f1e(0x126)]===0x0)return _0x5f0480[_0x588f1e(0x120)]?'/':'.';const _0x1c1868=_0x2bcbf0['join']('/');return _0x5f0480[_0x588f1e(0x129)][_0x588f1e(0x11f)]('/')?'/'+_0x1c1868:_0x1c1868;}export function getParentPath(_0x41ee03){const _0x5cd409=a103_0x39c2,_0x41c3fc=parsePath(_0x41ee03);if(_0x41c3fc[_0x5cd409(0x102)][_0x5cd409(0x126)]<=0x1)return'/';const _0x55874d=_0x41c3fc[_0x5cd409(0x102)]['slice'](0x0,-0x1)['join']('/');return _0x41c3fc[_0x5cd409(0x129)][_0x5cd409(0x11f)]('/')?'/'+_0x55874d:_0x55874d;}export function getBaseName(_0x2664db){const _0x2c5cc9=a103_0x39c2,_0x2d491e=parsePath(_0x2664db);return _0x2d491e[_0x2c5cc9(0x102)][_0x2d491e[_0x2c5cc9(0x102)][_0x2c5cc9(0x126)]-0x1]||'';}export function isChildPath(_0x81bc1a,_0x2ea903){const _0x52b61d=a103_0x39c2,_0x44c254=parsePath(_0x81bc1a),_0x3fb297=parsePath(_0x2ea903);if(_0x44c254[_0x52b61d(0x102)][_0x52b61d(0x126)]<=_0x3fb297[_0x52b61d(0x102)][_0x52b61d(0x126)])return![];for(let _0xbf38bc=0x0;_0xbf38bc<_0x3fb297['segments'][_0x52b61d(0x126)];_0xbf38bc++){if(_0x44c254['segments'][_0xbf38bc]!==_0x3fb297['segments'][_0xbf38bc])return![];}return!![];}export function splitPath(_0x1286f2){const _0x3e394c=a103_0x39c2,_0x131040=parsePath(_0x1286f2);if(_0x131040[_0x3e394c(0x102)][_0x3e394c(0x126)]===0x0)throw new Error(_0x3e394c(0x100));if(_0x131040['segments']['length']===0x1)return{'parent':_0x131040[_0x3e394c(0x102)][0x0]};return{'parent':_0x131040[_0x3e394c(0x102)][0x0],'child':_0x131040['segments'][_0x3e394c(0x116)](0x1)[_0x3e394c(0x110)]('/')};}function a103_0xc43c(){const _0x2f0a9a=['readFile','journey','5117172PXsEUj','length','tdx.json','trim','raw','dirname','resolve','1060892hNVtnx','pop','name','Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20','Cannot\x20split\x20empty\x20path','parent_segment','segments','type','No\x20tdx.json\x20found\x20for\x20file:\x20','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','Path\x20segment\x20cannot\x20be\x20empty','Path\x20attempts\x20to\x20navigate\x20above\x20root','Relative\x20path\x20cannot\x20be\x20empty','endsWith','Cannot\x20navigate\x20above\x20root','29299356JDEflC','.yml','test','parse','60XysJPq','join','filter','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','1095098eSONZx','Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field','8AjqFmu','slice','exists','relative','split','2021370eZVPnw','Path\x20cannot\x20be\x20empty','substring','7901845SbpUbP','12918qoWmxK','startsWith','isAbsolute','Path\x20must\x20contain\x20at\x20least\x20one\x20segment','push'];a103_0xc43c=function(){return _0x2f0a9a;};return a103_0xc43c();}export function isYamlFilePath(_0x225514){const _0x2f7697=a103_0x39c2;return _0x225514[_0x2f7697(0x109)](_0x2f7697(0x10c))||_0x225514[_0x2f7697(0x109)]('.yaml');}export async function resolveYamlFilePath(_0x49ce0f,_0x69f6c0=nodeFileSystem){const _0x34c238=a103_0x39c2,_0x5b9ebd=a103_0x3b342b[_0x34c238(0x12b)](_0x49ce0f);if(!await _0x69f6c0[_0x34c238(0x117)](_0x5b9ebd))throw new Error('File\x20not\x20found:\x20'+_0x49ce0f);let _0x8f613c=a103_0x3b342b[_0x34c238(0x12a)](_0x5b9ebd),_0x4784a3=null,_0x4046e3=null;const _0x1cdc09=a103_0x3b342b[_0x34c238(0x10e)](_0x8f613c)['root'];while(_0x8f613c!==_0x1cdc09){const _0x2be62b=a103_0x3b342b[_0x34c238(0x110)](_0x8f613c,_0x34c238(0x127));if(await _0x69f6c0[_0x34c238(0x117)](_0x2be62b)){_0x4784a3=_0x2be62b,_0x4046e3=_0x8f613c;break;}_0x8f613c=a103_0x3b342b[_0x34c238(0x12a)](_0x8f613c);}if(!_0x4784a3||!_0x4046e3)throw new Error(_0x34c238(0x104)+_0x49ce0f);const _0x152a30=await _0x69f6c0[_0x34c238(0x123)](_0x4784a3),_0x3254a3=JSON[_0x34c238(0x10e)](_0x152a30),_0x10877f=_0x3254a3[_0x34c238(0x101)];if(!_0x10877f)throw new Error(_0x34c238(0x114));const _0x4fa5be=await _0x69f6c0[_0x34c238(0x123)](_0x5b9ebd),_0x4681bb=a103_0x27c729(_0x4fa5be),_0x2c39d2=_0x4681bb[_0x34c238(0xfe)];if(!_0x2c39d2)throw new Error(_0x34c238(0xff)+_0x49ce0f);const _0x3ba1fe=_0x4681bb[_0x34c238(0x103)]===_0x34c238(0x124)?_0x34c238(0x124):'segment',_0x15037a=a103_0x3b342b[_0x34c238(0x118)](_0x4046e3,_0x5b9ebd),_0x5bc054=a103_0x3b342b['dirname'](_0x15037a),_0xef6738=_0x5bc054==='.'?'':_0x5bc054['replace'](/\\/g,'/'),_0x41a6df=_0xef6738?_0x10877f+'/'+_0xef6738+'/'+_0x2c39d2:_0x10877f+'/'+_0x2c39d2;return{'parentSegment':_0x10877f,'segmentName':_0x2c39d2,'folderPath':_0xef6738,'fullPath':_0x41a6df,'resourceType':_0x3ba1fe};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2811f2,_0x4367ec){const _0x35af60=a104_0x2628,_0x34f4f9=_0x2811f2();while(!![]){try{const _0x3fb8c1=parseInt(_0x35af60(0xc1))/0x1*(parseInt(_0x35af60(0xc0))/0x2)+-parseInt(_0x35af60(0xbb))/0x3*(-parseInt(_0x35af60(0xba))/0x4)+parseInt(_0x35af60(0xc5))/0x5*(-parseInt(_0x35af60(0xbf))/0x6)+parseInt(_0x35af60(0xc3))/0x7*(-parseInt(_0x35af60(0xc7))/0x8)+parseInt(_0x35af60(0xc8))/0x9*(-parseInt(_0x35af60(0xbe))/0xa)+parseInt(_0x35af60(0xc2))/0xb+parseInt(_0x35af60(0xc4))/0xc;if(_0x3fb8c1===_0x4367ec)break;else _0x34f4f9['push'](_0x34f4f9['shift']());}catch(_0x14b64f){_0x34f4f9['push'](_0x34f4f9['shift']());}}}(a104_0x3ba9,0x9c00f));export function parseSegmentRef(_0x505b29){const _0x4d06fd=a104_0x2628,_0xaf87bc=_0x505b29[_0x4d06fd(0xbc)]('/');if(_0xaf87bc===-0x1)return{'parentId':_0x505b29};if(_0xaf87bc===0x0)throw new Error(_0x4d06fd(0xc6)+_0x505b29+_0x4d06fd(0xbd));const _0x37ec7a=_0x505b29[_0x4d06fd(0xc9)](0x0,_0xaf87bc),_0x53711e=_0x505b29['substring'](_0xaf87bc+0x1);if(_0x53711e==='')throw new Error(_0x4d06fd(0xc6)+_0x505b29+'.\x20Child\x20name\x20cannot\x20be\x20empty');return{'parentId':_0x37ec7a,'childId':_0x53711e};}function a104_0x2628(_0x4fad5e,_0x21d943){_0x4fad5e=_0x4fad5e-0xba;const _0x3ba992=a104_0x3ba9();let _0x262804=_0x3ba992[_0x4fad5e];return _0x262804;}function a104_0x3ba9(){const _0x3a7875=['Invalid\x20segment\x20reference\x20format:\x20','1047016ODitXo','354519weLXic','substring','32EWKiHC','125340AKHJcN','indexOf','.\x20Parent\x20name\x20cannot\x20be\x20empty','110KgNcSF','258eaQzpI','10vfdWKw','140583zYsvnm','5194871TPhqqU','21lMHDgs','11727276zonHdT','118810owqBWa'];a104_0x3ba9=function(){return _0x3a7875;};return a104_0x3ba9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xe71436,_0x1cc007){const _0x3787b8=a105_0x4c89,_0xaeaf04=_0xe71436();while(!![]){try{const _0x344fac=parseInt(_0x3787b8(0x1a4))/0x1+parseInt(_0x3787b8(0x1b5))/0x2*(-parseInt(_0x3787b8(0x1ac))/0x3)+-parseInt(_0x3787b8(0x194))/0x4+-parseInt(_0x3787b8(0x1a3))/0x5*(-parseInt(_0x3787b8(0x199))/0x6)+parseInt(_0x3787b8(0x182))/0x7+-parseInt(_0x3787b8(0x188))/0x8+parseInt(_0x3787b8(0x195))/0x9;if(_0x344fac===_0x1cc007)break;else _0xaeaf04['push'](_0xaeaf04['shift']());}catch(_0x194cf0){_0xaeaf04['push'](_0xaeaf04['shift']());}}}(a105_0x51af,0x8ed79));import a105_0x568c19 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';function a105_0x4c89(_0x12cb89,_0x4bac1a){_0x12cb89=_0x12cb89-0x181;const _0x51af70=a105_0x51af();let _0x4c8950=_0x51af70[_0x12cb89];return _0x4c8950;}import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x2751b6){const _0x5e01bb=a105_0x4c89;return _0x2751b6['type']!==_0x5e01bb(0x19c);}export function isScopedResolution(_0xcbc6c5){const _0x470053=a105_0x4c89;return _0xcbc6c5[_0x470053(0x18a)]===_0x470053(0x186)||_0xcbc6c5[_0x470053(0x18a)]===_0x470053(0x19d)||_0xcbc6c5['type']==='context';}export function getScopedDetails(_0x418953){const _0x6f4a8b=a105_0x4c89;if(isScopedResolution(_0x418953))return{'isScoped':_0x418953['isScoped'],'scopedFolderPath':_0x418953[_0x6f4a8b(0x1a0)]};return undefined;}function a105_0x51af(){const _0x38091d=['parse','join','readFile','journey','9738gJBsig','No\x20tdx.json\x20found\x20for\x20file:\x20','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','dirname','invalid_yaml','isFile','parent_name','string','parent_segment','388FgDPbZ','folderPath','6874777stuVXx','isDirectory','resourceType','replace','directory','segmentName','5657624ZfVfjQ','File\x20not\x20found','type','startsWith','segment','trim','configDir','no_parent','stat','no_config','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure','1088972aljmLY','1799388qpfYIh','context','Not\x20a\x20YAML\x20file:\x20','basename','6VvgEmc','root','parentSegment','error','file','cwd','Parent\x20segment\x20not\x20specified','scopedFolderPath','message','resolve','1066705sMVzSF','798867iVQPKz','includes','No\x20tdx.json\x20found','isScoped'];a105_0x51af=function(){return _0x38091d;};return a105_0x51af();}async function findTdxConfigAsync(_0x5d8366,_0x3d7bf5){const _0x3ad864=a105_0x4c89;let _0x547f48=a105_0x568c19[_0x3ad864(0x1a2)](_0x5d8366);const _0x329706=a105_0x568c19['parse'](_0x547f48)[_0x3ad864(0x19a)];while(_0x547f48!==_0x329706){const _0x23caf9=a105_0x568c19[_0x3ad864(0x1a9)](_0x547f48,'tdx.json');if(await _0x3d7bf5['exists'](_0x23caf9))try{const _0x3c37fc=await _0x3d7bf5[_0x3ad864(0x1aa)](_0x23caf9),_0x88b9d9=JSON[_0x3ad864(0x1a8)](_0x3c37fc);if(_0x88b9d9[_0x3ad864(0x1b4)]&&typeof _0x88b9d9[_0x3ad864(0x1b4)]===_0x3ad864(0x1b3))return{'configPath':_0x23caf9,'configDir':_0x547f48,'parentSegment':_0x88b9d9['parent_segment']};}catch{}_0x547f48=a105_0x568c19['dirname'](_0x547f48);}return null;}function calculateScopedPath(_0x302d37,_0x4fdbbc){const _0x440c01=a105_0x4c89,_0x19cb88=a105_0x568c19['relative'](_0x4fdbbc,_0x302d37),_0x467bc9=_0x19cb88!==''&&_0x19cb88!=='.'&&!_0x19cb88[_0x440c01(0x18b)]('..');return{'isScoped':_0x467bc9,'scopedFolderPath':_0x467bc9?_0x19cb88[_0x440c01(0x185)](/\\/g,'/'):''};}export async function resolveTarget(_0x2866ac){const _0x27933f=a105_0x4c89,{arg:_0x18c120,contextParent:_0x4a6ee2,cwd:cwd=process[_0x27933f(0x19e)](),fs:fs=nodeFileSystem}=_0x2866ac;if(_0x18c120&&isYamlFilePath(_0x18c120))try{const _0x28f688=await resolveYamlFilePath(_0x18c120,fs),_0x3575a5=a105_0x568c19[_0x27933f(0x1a2)](_0x18c120),_0x26c182=a105_0x568c19[_0x27933f(0x1af)](_0x3575a5),_0x14994a=await findTdxConfigAsync(_0x26c182,fs);if(!_0x14994a){if(_0x4a6ee2){const _0x548df6=a105_0x568c19[_0x27933f(0x1af)](_0x3575a5);return{'type':_0x27933f(0x19d),'parentName':_0x4a6ee2,'targetDir':_0x548df6,'configRoot':_0x548df6,'filePath':_0x3575a5,'resourceName':_0x28f688[_0x27933f(0x187)],'folderPath':_0x28f688[_0x27933f(0x181)],'resourceType':_0x28f688[_0x27933f(0x184)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x27933f(0x19c),'errorCode':'no_config','message':_0x27933f(0x1ad)+_0x18c120,'arg':_0x18c120,'helpText':_0x27933f(0x1ae)};}const _0x273224=calculateScopedPath(_0x26c182,_0x14994a[_0x27933f(0x18e)]);return{'type':_0x27933f(0x19d),'parentName':_0x14994a[_0x27933f(0x19b)],'targetDir':_0x14994a[_0x27933f(0x18e)],'configRoot':_0x14994a['configDir'],'filePath':_0x3575a5,'resourceName':_0x28f688['segmentName'],'folderPath':_0x28f688[_0x27933f(0x181)],'resourceType':_0x28f688[_0x27933f(0x184)],'isScoped':_0x273224['isScoped'],'scopedFolderPath':_0x273224[_0x27933f(0x1a0)]};}catch(_0x20d6bf){const _0xf9937e=_0x20d6bf instanceof Error?_0x20d6bf[_0x27933f(0x1a1)]:String(_0x20d6bf);if(_0xf9937e[_0x27933f(0x1a5)](_0x27933f(0x189)))return{'type':_0x27933f(0x19c),'errorCode':'file_not_found','message':'File\x20not\x20found:\x20'+_0x18c120,'arg':_0x18c120};if(_0xf9937e[_0x27933f(0x1a5)](_0x27933f(0x1a6))){if(_0x4a6ee2){const _0xfb6672=a105_0x568c19[_0x27933f(0x1a2)](_0x18c120);if(await fs['exists'](_0xfb6672)){const _0x305f90=a105_0x568c19[_0x27933f(0x1af)](_0xfb6672),_0x34b9ac=await fs['readFile'](_0xfb6672),_0x1777ab=_0x34b9ac['match'](/^name:\s*["']?([^"'\n]+)["']?/m),_0x70a304=_0x34b9ac['match'](/^type:\s*["']?([^"'\n]+)["']?/m),_0x24c4ff=_0x1777ab?_0x1777ab[0x1][_0x27933f(0x18d)]():a105_0x568c19[_0x27933f(0x198)](_0x18c120,a105_0x568c19['extname'](_0x18c120)),_0x590529=_0x70a304&&_0x70a304[0x1][_0x27933f(0x18d)]()===_0x27933f(0x1ab)?'journey':_0x27933f(0x18c);return{'type':_0x27933f(0x19d),'parentName':_0x4a6ee2,'targetDir':_0x305f90,'configRoot':_0x305f90,'filePath':_0xfb6672,'resourceName':_0x24c4ff,'folderPath':'','resourceType':_0x590529,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x27933f(0x19c),'errorCode':'no_config','message':_0x27933f(0x1ad)+_0x18c120,'arg':_0x18c120,'helpText':_0x27933f(0x1ae)};}return{'type':_0x27933f(0x19c),'errorCode':_0x27933f(0x1b0),'message':_0xf9937e,'arg':_0x18c120};}if(_0x18c120){const _0x5355a3=a105_0x568c19['resolve'](cwd,_0x18c120);let _0x8d58c8=null;try{_0x8d58c8=await fs[_0x27933f(0x190)](_0x5355a3);}catch{}if(_0x8d58c8?.[_0x27933f(0x183)]()){const _0x10033c=await findTdxConfigAsync(_0x5355a3,fs);if(_0x10033c){const _0x3c4371=calculateScopedPath(_0x5355a3,_0x10033c[_0x27933f(0x18e)]);return{'type':_0x27933f(0x186),'parentName':_0x10033c[_0x27933f(0x19b)],'targetDir':_0x5355a3,'configRoot':_0x10033c[_0x27933f(0x18e)],'isScoped':_0x3c4371[_0x27933f(0x1a7)],'scopedFolderPath':_0x3c4371['scopedFolderPath']};}if(_0x4a6ee2)return{'type':'directory','parentName':_0x4a6ee2,'targetDir':_0x5355a3,'configRoot':_0x5355a3,'isScoped':![],'scopedFolderPath':''};return{'type':_0x27933f(0x19c),'errorCode':_0x27933f(0x191),'message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x18c120,'arg':_0x18c120,'helpText':_0x27933f(0x1ae)};}if(_0x8d58c8?.[_0x27933f(0x1b1)]())return{'type':_0x27933f(0x19c),'errorCode':'invalid_yaml','message':_0x27933f(0x197)+_0x18c120,'arg':_0x18c120,'helpText':_0x27933f(0x192)};const _0x4e7bb0=sanitizeFileName(_0x18c120),_0x3072c9=getSegmentRootDir(_0x4e7bb0,cwd);return{'type':_0x27933f(0x1b2),'parentName':_0x18c120,'targetDir':_0x3072c9,'configRoot':_0x3072c9};}const _0x2f49ad=await findTdxConfigAsync(cwd,fs);if(_0x2f49ad){const _0x44ceee=calculateScopedPath(cwd,_0x2f49ad[_0x27933f(0x18e)]);return{'type':_0x27933f(0x196),'parentName':_0x2f49ad[_0x27933f(0x19b)],'targetDir':cwd,'configRoot':_0x2f49ad[_0x27933f(0x18e)],'isScoped':_0x44ceee[_0x27933f(0x1a7)],'scopedFolderPath':_0x44ceee[_0x27933f(0x1a0)]};}if(_0x4a6ee2){const _0xbad9bc=sanitizeFileName(_0x4a6ee2),_0x570561=getSegmentRootDir(_0xbad9bc,cwd);return{'type':_0x27933f(0x196),'parentName':_0x4a6ee2,'targetDir':_0x570561,'configRoot':_0x570561,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x27933f(0x19c),'errorCode':_0x27933f(0x18f),'message':_0x27933f(0x19f),'helpText':_0x27933f(0x193)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a106_0x5c2305=a106_0x4f50;function a106_0x4f50(_0x41e292,_0x2c9625){_0x41e292=_0x41e292-0x6e;const _0xb27506=a106_0xb275();let _0x4f5073=_0xb27506[_0x41e292];return _0x4f5073;}(function(_0x33d400,_0x4960f2){const _0x5b7859=a106_0x4f50,_0x126719=_0x33d400();while(!![]){try{const _0x4323c5=-parseInt(_0x5b7859(0x7f))/0x1*(parseInt(_0x5b7859(0x89))/0x2)+parseInt(_0x5b7859(0x7a))/0x3+-parseInt(_0x5b7859(0x87))/0x4+parseInt(_0x5b7859(0x71))/0x5*(parseInt(_0x5b7859(0x82))/0x6)+parseInt(_0x5b7859(0x84))/0x7+-parseInt(_0x5b7859(0x7e))/0x8*(-parseInt(_0x5b7859(0x72))/0x9)+-parseInt(_0x5b7859(0x76))/0xa*(parseInt(_0x5b7859(0x7c))/0xb);if(_0x4323c5===_0x4960f2)break;else _0x126719['push'](_0x126719['shift']());}catch(_0x31f7de){_0x126719['push'](_0x126719['shift']());}}}(a106_0xb275,0x8c643));import{existsSync,readFileSync}from'fs';function a106_0xb275(){const _0x4904df=['tdx.json','resolve','cwd','7745530wHSQeu','stringify','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','utf-8','1576467OakOlE','join','11hgoNyD','object','5750224FfBGTF','1IxulSi','dirname','Invalid\x20JSON\x20in\x20','12IyZShS','replace','6272581TAdTUO','segments','relative','4063368VsAwjG','parent_segment','1803948DNJmIx','string','root','Invalid\x20tdx.json:\x20expected\x20object','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27parent_segment\x27\x20field','parse','2817655tSgWNr','9uFFKgU'];a106_0xb275=function(){return _0x4904df;};return a106_0xb275();}import a106_0x4bc916 from'path';const TDX_CONFIG_FILE=a106_0x5c2305(0x73),SEGMENTS_DIR=a106_0x5c2305(0x85);export function findTdxConfigPath(_0x2348b9=process[a106_0x5c2305(0x75)]()){const _0x42ec4e=a106_0x5c2305;let _0x42bac9=a106_0x4bc916[_0x42ec4e(0x74)](_0x2348b9);const _0x2b434e=a106_0x4bc916[_0x42ec4e(0x70)](_0x42bac9)[_0x42ec4e(0x8b)];while(_0x42bac9!==_0x2b434e){const _0x50f96e=a106_0x4bc916[_0x42ec4e(0x7b)](_0x42bac9,TDX_CONFIG_FILE);if(existsSync(_0x50f96e))return _0x50f96e;_0x42bac9=a106_0x4bc916['dirname'](_0x42bac9);}return null;}export function loadTdxConfig(_0x1e8adb){const _0x37b6de=a106_0x5c2305,_0x256f6f=readFileSync(_0x1e8adb,_0x37b6de(0x79));let _0x2f0768;try{_0x2f0768=JSON['parse'](_0x256f6f);}catch{throw new Error(_0x37b6de(0x81)+_0x1e8adb);}if(!_0x2f0768||typeof _0x2f0768!==_0x37b6de(0x7d))throw new Error(_0x37b6de(0x6e));const _0x4556a7=_0x2f0768;if(!_0x4556a7[_0x37b6de(0x88)]||typeof _0x4556a7['parent_segment']!==_0x37b6de(0x8a))throw new Error(_0x37b6de(0x6f));return{'parent_segment':_0x4556a7[_0x37b6de(0x88)]};}export function findTdxConfig(_0x5971a8=process[a106_0x5c2305(0x75)]()){const _0x23bd66=a106_0x5c2305,_0x3a52b9=findTdxConfigPath(_0x5971a8);if(!_0x3a52b9)throw new Error(_0x23bd66(0x78));const _0x1f0c3b=loadTdxConfig(_0x3a52b9),_0x507981=a106_0x4bc916[_0x23bd66(0x80)](_0x3a52b9);return{'config':_0x1f0c3b,'configPath':_0x3a52b9,'configDir':_0x507981};}export function tryFindTdxConfig(_0x44a647){try{return findTdxConfig(_0x44a647);}catch{return null;}}export function getSegmentRootDir(_0x34b1e5,_0x11a13a=process[a106_0x5c2305(0x75)]()){const _0x2432c7=a106_0x5c2305;return a106_0x4bc916[_0x2432c7(0x7b)](_0x11a13a,SEGMENTS_DIR,_0x34b1e5);}export function getTdxConfigPath(_0x31786a,_0x194e04=process[a106_0x5c2305(0x75)]()){const _0x4fdeb8=a106_0x5c2305;return a106_0x4bc916[_0x4fdeb8(0x7b)](getSegmentRootDir(_0x31786a,_0x194e04),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x33f95b,_0x4ff544){const _0x51c6b8=a106_0x5c2305,_0x104f1c=a106_0x4bc916[_0x51c6b8(0x74)](_0x33f95b),_0x584a2b=a106_0x4bc916[_0x51c6b8(0x86)](_0x4ff544,_0x104f1c);if(_0x584a2b['startsWith']('..'))return'';return _0x584a2b;}export function localPathToTdFolderPath(_0x4b22cd){const _0x35188c=a106_0x5c2305,_0x1c4a18=a106_0x4bc916[_0x35188c(0x80)](_0x4b22cd);if(_0x1c4a18==='.'||_0x1c4a18==='')return'';return _0x1c4a18[_0x35188c(0x83)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x24c0f8,_0x33859d){const _0x466108=a106_0x5c2305;if(!_0x24c0f8)return _0x33859d;return a106_0x4bc916[_0x466108(0x7b)](_0x33859d,_0x24c0f8);}export function createTdxConfigContent(_0x55aa9b){const _0xd8d23d=a106_0x5c2305,_0x72ac26={'parent_segment':_0x55aa9b};return JSON[_0xd8d23d(0x77)](_0x72ac26,null,0x2)+'\x0a';}
|