@treasuredata/tdx 0.28.2 → 0.28.4
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/agent-test-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.js +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/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.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/mcp-command.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/schedule-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/status-command.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/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.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/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-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.js +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/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.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-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.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.d.ts.map +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-utils.js.map +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-validator.js.map +1 -1
- package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/journey-yaml.js.map +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-recovery.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/archive-validation.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/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- 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/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x6618d1,_0x12b5c2){const _0x50fb29=a111_0x3967,_0x39e761=_0x6618d1();while(!![]){try{const _0x3254c8=parseInt(_0x50fb29(0x101))/0x1+-parseInt(_0x50fb29(0xfb))/0x2*(-parseInt(_0x50fb29(0xee))/0x3)+-parseInt(_0x50fb29(0xf4))/0x4*(parseInt(_0x50fb29(0xfc))/0x5)+-parseInt(_0x50fb29(0xf2))/0x6+parseInt(_0x50fb29(0xf8))/0x7+parseInt(_0x50fb29(0xf3))/0x8*(parseInt(_0x50fb29(0xe8))/0x9)+-parseInt(_0x50fb29(0x100))/0xa*(parseInt(_0x50fb29(0xfa))/0xb);if(_0x3254c8===_0x12b5c2)break;else _0x39e761['push'](_0x39e761['shift']());}catch(_0xf06f83){_0x39e761['push'](_0x39e761['shift']());}}}(a111_0x43c5,0x43696));export const MODEL_PRICING={'claude-opus-4-6':{'inputPricePerMTok':0x5,'outputPricePerMTok':0x19,'cacheWritePricePerMTok':6.25,'cacheReadPricePerMTok':0.5},'claude-opus-4-5-20251101':{'inputPricePerMTok':0x5,'outputPricePerMTok':0x19,'cacheWritePricePerMTok':6.25,'cacheReadPricePerMTok':0.5},'opus':{'inputPricePerMTok':0x5,'outputPricePerMTok':0x19,'cacheWritePricePerMTok':6.25,'cacheReadPricePerMTok':0.5},'claude-sonnet-4-5-20250929':{'inputPricePerMTok':0x3,'outputPricePerMTok':0xf,'cacheWritePricePerMTok':3.75,'cacheReadPricePerMTok':0.3},'sonnet':{'inputPricePerMTok':0x3,'outputPricePerMTok':0xf,'cacheWritePricePerMTok':3.75,'cacheReadPricePerMTok':0.3},'claude-haiku-4-5-20251001':{'inputPricePerMTok':0x1,'outputPricePerMTok':0x5,'cacheWritePricePerMTok':1.25,'cacheReadPricePerMTok':0.1},'haiku':{'inputPricePerMTok':0x1,'outputPricePerMTok':0x5,'cacheWritePricePerMTok':1.25,'cacheReadPricePerMTok':0.1}};function a111_0x3967(_0x4548ca,_0x219e92){_0x4548ca=_0x4548ca-0xe5;const _0x43c590=a111_0x43c5();let _0x39674c=_0x43c590[_0x4548ca];return _0x39674c;}export const EXTENDED_CONTEXT_PRICING={'inputPricePerMTok':0x6,'outputPricePerMTok':22.5,'cacheWritePricePerMTok':7.5,'cacheReadPricePerMTok':0.6};export const USD_PER_AI_CREDIT=54.24;export const CONTEXT_LIMITS={'sonnet':0x30d40,'haiku':0x30d40,'opus':0x30d40,'default':0x30d40};function a111_0x43c5(){const _0x11ceae=['opus','Opus\x204.5','4.6','includes','54mDSgXQ','4.5','sonnet','en-US','toLowerCase','cacheReadPricePerMTok','814101QfdpXY','haiku','4-5','default','1472352iTzsQq','226088Svmepd','2924KOtgNK','Sonnet\x204','Haiku\x204.5','toLocaleString','2485826svUNig','Opus\x204','5737754tHaJhN','2rhbfku','865dwPDYp','Sonnet\x204.5','Claude','cacheWritePricePerMTok','10vrKoWa','373536fkMipc'];a111_0x43c5=function(){return _0x11ceae;};return a111_0x43c5();}export function getModelPricing(_0x40960e){const _0x3d1a1d=a111_0x3967;if(MODEL_PRICING[_0x40960e])return MODEL_PRICING[_0x40960e];const _0x30f536=_0x40960e['toLowerCase']();if(_0x30f536['includes']('opus'))return MODEL_PRICING[_0x3d1a1d(0x102)];if(_0x30f536[_0x3d1a1d(0xe7)](_0x3d1a1d(0xea)))return MODEL_PRICING[_0x3d1a1d(0xea)];if(_0x30f536[_0x3d1a1d(0xe7)](_0x3d1a1d(0xef)))return MODEL_PRICING[_0x3d1a1d(0xef)];return MODEL_PRICING[_0x3d1a1d(0xea)];}export function calculateTokenCost(_0x5aa732,_0x9868b3,_0x26992c,_0x279403,_0x3a4f39){const _0x112e66=a111_0x3967,_0x10ea21=0xf4240;return _0x5aa732*_0x3a4f39['inputPricePerMTok']/_0x10ea21+_0x9868b3*_0x3a4f39['outputPricePerMTok']/_0x10ea21+_0x26992c*_0x3a4f39[_0x112e66(0xff)]/_0x10ea21+_0x279403*_0x3a4f39[_0x112e66(0xed)]/_0x10ea21;}export function usdToAiCredits(_0x47ef83){return _0x47ef83/USD_PER_AI_CREDIT;}export function calculateCreditsFromTokens(_0x474f40,_0x97bded,_0x5bd457,_0x3461b9,_0x24a75f){const _0x2b9b9a=getModelPricing(_0x24a75f),_0xa9eee4=calculateTokenCost(_0x474f40,_0x97bded,_0x5bd457,_0x3461b9,_0x2b9b9a);return usdToAiCredits(_0xa9eee4);}export function getContextLimit(_0x5596b1){const _0x2f9b38=a111_0x3967,_0x14d280=_0x5596b1[_0x2f9b38(0xec)]();if(_0x14d280[_0x2f9b38(0xe7)]('sonnet'))return CONTEXT_LIMITS[_0x2f9b38(0xea)];if(_0x14d280[_0x2f9b38(0xe7)]('haiku'))return CONTEXT_LIMITS['haiku'];if(_0x14d280[_0x2f9b38(0xe7)](_0x2f9b38(0x102)))return CONTEXT_LIMITS['opus'];return CONTEXT_LIMITS[_0x2f9b38(0xf1)];}export function getModelDisplayName(_0x1a3080){const _0x8e1ba0=a111_0x3967,_0x291fa3=_0x1a3080[_0x8e1ba0(0xec)]();if(_0x291fa3[_0x8e1ba0(0xe7)]('sonnet')){if(_0x291fa3['includes'](_0x8e1ba0(0xf0))||_0x291fa3[_0x8e1ba0(0xe7)](_0x8e1ba0(0xe9)))return _0x8e1ba0(0xfd);return _0x8e1ba0(0xf5);}if(_0x291fa3[_0x8e1ba0(0xe7)]('haiku')){if(_0x291fa3[_0x8e1ba0(0xe7)](_0x8e1ba0(0xf0))||_0x291fa3[_0x8e1ba0(0xe7)](_0x8e1ba0(0xe9)))return _0x8e1ba0(0xf6);return'Haiku\x204';}if(_0x291fa3[_0x8e1ba0(0xe7)](_0x8e1ba0(0x102))){if(_0x291fa3[_0x8e1ba0(0xe7)]('4-6')||_0x291fa3[_0x8e1ba0(0xe7)](_0x8e1ba0(0xe6)))return'Opus\x204.6';if(_0x291fa3[_0x8e1ba0(0xe7)](_0x8e1ba0(0xf0))||_0x291fa3[_0x8e1ba0(0xe7)](_0x8e1ba0(0xe9)))return _0x8e1ba0(0xe5);return _0x8e1ba0(0xf9);}return _0x8e1ba0(0xfe);}export function formatTokenCount(_0x23b75e){const _0x37184f=a111_0x3967;return _0x23b75e[_0x37184f(0xf7)](_0x37184f(0xeb));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a112_0x5f3710=a112_0x4101;(function(_0x28ece6,_0x30e7d8){const _0x376d7a=a112_0x4101,_0x540250=_0x28ece6();while(!![]){try{const _0x3a70ce=parseInt(_0x376d7a(0xbb))/0x1+parseInt(_0x376d7a(0xac))/0x2*(parseInt(_0x376d7a(0xbf))/0x3)+-parseInt(_0x376d7a(0xc0))/0x4+-parseInt(_0x376d7a(0xb4))/0x5+-parseInt(_0x376d7a(0xb7))/0x6*(parseInt(_0x376d7a(0xae))/0x7)+-parseInt(_0x376d7a(0xb6))/0x8*(parseInt(_0x376d7a(0xb8))/0x9)+parseInt(_0x376d7a(0xa6))/0xa;if(_0x3a70ce===_0x30e7d8)break;else _0x540250['push'](_0x540250['shift']());}catch(_0x84538f){_0x540250['push'](_0x540250['shift']());}}}(a112_0x245d,0xcf9aa));import{HTTPClient}from'./client/http-client.js';import{getEndpoint}from'./client/endpoints.js';function a112_0x4101(_0x51cc47,_0x2715ae){_0x51cc47=_0x51cc47-0xa4;const _0x245d7=a112_0x245d();let _0x410154=_0x245d7[_0x51cc47];return _0x410154;}import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';function a112_0x245d(){const _0x15eb74=['apiKey','31464800Kbdpsw','/realtime_personalization_services','isArray','delete','proxy','request','62VYnnil','get','7cPdPeo','data','list','create','/realtime_personalization_services?page[size]=100','PUT','5555510XSAMny','POST','88OpfqwF','5992458ckZVwi','391581GzHLSk','/audiences/','httpClient','600544obhMwu','site','GET','application/json','95430qEXHMs','5177376bvvKaV','/realtime_personalization_services/'];a112_0x245d=function(){return _0x15eb74;};return a112_0x245d();}export class PersonalizationSDK{[a112_0x5f3710(0xba)];constructor(_0xa13e04){const _0x2df3fe=a112_0x5f3710,_0x230a8c=getEndpoint(_0xa13e04['site'],'cdp'),_0x5705f2=toHeaderRecord(getAuthHeaders(_0xa13e04[_0x2df3fe(0xbc)],_0xa13e04[_0x2df3fe(0xa5)]));this[_0x2df3fe(0xba)]=new HTTPClient(_0x230a8c,{..._0x5705f2,'Accept':'application/vnd.treasuredata.v1+json','Content-Type':_0x2df3fe(0xbe)},{'proxy':_0xa13e04[_0x2df3fe(0xaa)]});}async[a112_0x5f3710(0xb0)](_0x610de0){const _0x512e5f=a112_0x5f3710,_0x15a36b=await this[_0x512e5f(0xba)][_0x512e5f(0xab)](_0x512e5f(0xbd),_0x512e5f(0xb9)+_0x610de0+_0x512e5f(0xb2));return Array[_0x512e5f(0xa8)](_0x15a36b)?_0x15a36b:_0x15a36b[_0x512e5f(0xaf)]||[];}async[a112_0x5f3710(0xad)](_0x2283ad,_0x51a2de){const _0xcaef67=a112_0x5f3710,_0x18a038=await this['httpClient'][_0xcaef67(0xab)](_0xcaef67(0xbd),_0xcaef67(0xb9)+_0x2283ad+_0xcaef67(0xa4)+_0x51a2de);return _0x18a038||{};}async[a112_0x5f3710(0xb1)](_0xd2d1e6,_0x2a9ab2){const _0x445c13=a112_0x5f3710,_0x2ee155=await this[_0x445c13(0xba)][_0x445c13(0xab)](_0x445c13(0xb5),_0x445c13(0xb9)+_0xd2d1e6+_0x445c13(0xa7),{'body':_0x2a9ab2});return _0x2ee155||{};}async['update'](_0x151ac9,_0x47962a,_0x190230){const _0x322d76=a112_0x5f3710,_0x32c05f=await this[_0x322d76(0xba)][_0x322d76(0xab)](_0x322d76(0xb3),'/audiences/'+_0x151ac9+'/realtime_personalization_services/'+_0x47962a,{'body':_0x190230});return _0x32c05f||{};}async[a112_0x5f3710(0xa9)](_0x533f40,_0xe6478c){const _0x4a2229=a112_0x5f3710;await this['httpClient']['request']('DELETE',_0x4a2229(0xb9)+_0x533f40+'/realtime_personalization_services/'+_0xe6478c);}}
|
package/dist/sdk/query/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a113_0x52e933=a113_0x46c5;(function(_0x45bdc8,_0x38bcce){const _0x460d3a=a113_0x46c5,_0x4fc945=_0x45bdc8();while(!![]){try{const _0x1af102=parseInt(_0x460d3a(0x1a3))/0x1+parseInt(_0x460d3a(0x179))/0x2*(-parseInt(_0x460d3a(0x185))/0x3)+-parseInt(_0x460d3a(0x186))/0x4*(-parseInt(_0x460d3a(0x1a2))/0x5)+-parseInt(_0x460d3a(0x17e))/0x6+-parseInt(_0x460d3a(0x17f))/0x7+-parseInt(_0x460d3a(0x18a))/0x8+parseInt(_0x460d3a(0x1a0))/0x9;if(_0x1af102===_0x38bcce)break;else _0x4fc945['push'](_0x4fc945['shift']());}catch(_0x39036d){_0x4fc945['push'](_0x4fc945['shift']());}}}(a113_0x4279,0xc93de));import{TrinoApiClient}from'../client/trino-api-client.js';function a113_0x4279(){const _0xce35b2=['\x0a\x20\x20AND\x20table_name\x20LIKE\x20','1117275MuiwWK','695849wFUklg','\x0a\x20\x20\x20\x20\x20\x20SELECT\x201\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.tables\x0a\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_schema\x20=\x20','Usage:\x20tdx\x20show\x20<database.table>','Database\x20pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','Limit\x20must\x20be\x20a\x20positive\x20number','Database\x20name\x20is\x20required','Use\x20--limit\x20<number>\x20to\x20specify\x20row\x20limit\x20(must\x20be\x20positive).','MISSING_ARGUMENT','\x0aORDER\x20BY\x20table_name\x0aLIMIT\x20','\x0a\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20table_schema\x20AS\x20database_name,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20','310742oTdEYK','executeQuery','Table\x20name\x20is\x20required','trinoApiClient','listDatabases','2659626sGHPBU','7189581wZNKrL','\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_name\x20=\x20','data','INVALID_ARGUMENT','\x0a\x20\x20\x20\x20\x20\x20SELECT\x20schema_name\x20AS\x20database_name\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.schemata\x0a\x20\x20\x20\x20\x20\x20WHERE\x20catalog_name\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20','\x0a\x20\x20AND\x20schema_name\x20LIKE\x20','6oXhtpX','20YysoWF','\x0a\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_schema\x20=\x20','describeTable','\x0a\x20\x20AND\x20table_schema\x20LIKE\x20','4536680HhBStn','length','\x0a\x20\x20\x20\x20\x20\x20SELECT\x201\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.schemata\x0a\x20\x20\x20\x20\x20\x20WHERE\x20catalog_name\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20schema_name\x20=\x20','\x0aORDER\x20BY\x20database_name\x0aLIMIT\x20','Provide\x20a\x20valid\x20glob\x20pattern\x20(e.g.,\x20\x22user_*\x22)\x20or\x20omit\x20to\x20list\x20all\x20tables.','Provide\x20a\x20positive\x20number\x20for\x20limit\x20(e.g.,\x20100).','\x0a\x20\x20\x20\x20\x20\x20','trim','validateDatabase','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','execute','Provide\x20a\x20valid\x20database\x20name\x20or\x20omit\x20to\x20list\x20tables\x20from\x20all\x20databases.','Limit\x20must\x20be\x20a\x20positive\x20integer','SQL\x20query\x20is\x20required','validateTable','listTables','Usage:\x20tdx\x20describe\x20<database.table>','\x20ESCAPE\x20\x27\x5c\x27','Database\x20name\x20cannot\x20be\x20empty\x20or\x20whitespace-only','\x0a\x20\x20\x20\x20','slice','isInteger','12234087gcgzEz'];a113_0x4279=function(){return _0xce35b2;};return a113_0x4279();}import{escapeStringLiteral,buildLikePattern}from'../../utils/string-utils.js';import{SDKError,ErrorCode}from'../errors.js';import{DEFAULT_LISTING_LIMIT}from'../../core/constants.js';function a113_0x46c5(_0x4b7c7a,_0x546029){_0x4b7c7a=_0x4b7c7a-0x173;const _0x42798a=a113_0x4279();let _0x46c578=_0x42798a[_0x4b7c7a];return _0x46c578;}export class QuerySDK{[a113_0x52e933(0x17c)];constructor(_0x528772){const _0x4e9e73=a113_0x52e933;this[_0x4e9e73(0x17c)]=new TrinoApiClient(_0x528772);}async[a113_0x52e933(0x194)](_0x149e66,_0x9510ab){const _0xd78c9f=a113_0x52e933;if(!_0x149e66||_0x149e66['trim']()[_0xd78c9f(0x18b)]===0x0)throw new SDKError(ErrorCode['MISSING_ARGUMENT'],_0xd78c9f(0x197),undefined,{'helpText':'Provide\x20SQL\x20via\x20argument\x20or\x20use\x20--file\x20option.'});return await this['trinoApiClient']['executeQuery'](_0x149e66,_0x9510ab);}async[a113_0x52e933(0x17d)](_0xf276d,_0x49b211=DEFAULT_LISTING_LIMIT){const _0x26f60f=a113_0x52e933;if(_0xf276d!==undefined&&_0xf276d['trim']()[_0x26f60f(0x18b)]===0x0)throw new SDKError(ErrorCode[_0x26f60f(0x182)],_0x26f60f(0x193),undefined,{'helpText':'Provide\x20a\x20valid\x20glob\x20pattern\x20(e.g.,\x20\x22prod_*\x22)\x20or\x20omit\x20the\x20pattern\x20to\x20list\x20all\x20databases.'});if(_0x49b211<=0x0)throw new SDKError(ErrorCode[_0x26f60f(0x182)],_0x26f60f(0x173),undefined,{'helpText':_0x26f60f(0x18f)});let _0xf0b9ca=_0x26f60f(0x183);_0xf276d&&(_0xf0b9ca+=_0x26f60f(0x184)+buildLikePattern(_0xf276d)+_0x26f60f(0x19b));_0xf0b9ca+=_0x26f60f(0x18d)+_0x49b211;const _0x20579e=await this[_0x26f60f(0x17c)][_0x26f60f(0x17a)](_0xf0b9ca[_0x26f60f(0x191)]());return _0x20579e[_0x26f60f(0x181)];}async[a113_0x52e933(0x199)](_0x32eca9,_0x4d5f8f,_0x5ae080,_0xc7991c=DEFAULT_LISTING_LIMIT){const _0x17ab2c=a113_0x52e933;if(_0x32eca9!==undefined&&_0x32eca9[_0x17ab2c(0x191)]()[_0x17ab2c(0x18b)]===0x0)throw new SDKError(ErrorCode[_0x17ab2c(0x182)],_0x17ab2c(0x19c),undefined,{'helpText':_0x17ab2c(0x195)});if(_0x4d5f8f!==undefined&&_0x4d5f8f[_0x17ab2c(0x191)]()[_0x17ab2c(0x18b)]===0x0)throw new SDKError(ErrorCode[_0x17ab2c(0x182)],_0x17ab2c(0x193),undefined,{'helpText':_0x17ab2c(0x18e)});if(_0x5ae080!==undefined&&_0x5ae080[_0x17ab2c(0x191)]()['length']===0x0)throw new SDKError(ErrorCode[_0x17ab2c(0x182)],_0x17ab2c(0x1a6),undefined,{'helpText':'Provide\x20a\x20valid\x20glob\x20pattern\x20(e.g.,\x20\x22prod_*\x22)\x20or\x20omit\x20to\x20search\x20all\x20databases.'});if(_0xc7991c<=0x0)throw new SDKError(ErrorCode[_0x17ab2c(0x182)],_0x17ab2c(0x173),undefined,{'helpText':'Provide\x20a\x20positive\x20number\x20for\x20limit\x20(e.g.,\x20100).'});let _0x14943f;_0x32eca9?(_0x14943f=_0x17ab2c(0x187)+escapeStringLiteral(_0x32eca9)+_0x17ab2c(0x190),_0x4d5f8f&&(_0x14943f+=_0x17ab2c(0x1a1)+buildLikePattern(_0x4d5f8f)+_0x17ab2c(0x19b)),_0x14943f+=_0x17ab2c(0x177)+_0xc7991c):(_0x14943f=_0x17ab2c(0x178),_0x5ae080&&(_0x14943f+=_0x17ab2c(0x189)+buildLikePattern(_0x5ae080)+_0x17ab2c(0x19b)),_0x4d5f8f&&(_0x14943f+=_0x17ab2c(0x1a1)+buildLikePattern(_0x4d5f8f)+_0x17ab2c(0x19b)),_0x14943f+='\x0aORDER\x20BY\x20database_name,\x20table_name\x0aLIMIT\x20'+_0xc7991c);const _0x3a0343=await this[_0x17ab2c(0x17c)][_0x17ab2c(0x17a)](_0x14943f['trim']());return _0x3a0343['data'];}async[a113_0x52e933(0x192)](_0x35096d){const _0x9699fc=a113_0x52e933,_0x2aa972=(_0x9699fc(0x18c)+escapeStringLiteral(_0x35096d)+_0x9699fc(0x19d))[_0x9699fc(0x191)](),_0x142058=await this['trinoApiClient']['executeQuery'](_0x2aa972);return _0x142058[_0x9699fc(0x181)][_0x9699fc(0x18b)]>0x0;}async[a113_0x52e933(0x198)](_0x2d2471,_0x368b52){const _0x920d35=a113_0x52e933,_0x4c567c=(_0x920d35(0x1a4)+escapeStringLiteral(_0x2d2471)+'\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_name\x20=\x20'+escapeStringLiteral(_0x368b52)+'\x0a\x20\x20\x20\x20')[_0x920d35(0x191)](),_0x193025=await this['trinoApiClient']['executeQuery'](_0x4c567c);return _0x193025[_0x920d35(0x181)][_0x920d35(0x18b)]>0x0;}async[a113_0x52e933(0x188)](_0x35c2d2,_0x1aea50){const _0x262e08=a113_0x52e933;if(!_0x35c2d2||_0x35c2d2['trim']()['length']===0x0)throw new SDKError(ErrorCode[_0x262e08(0x176)],'Database\x20name\x20is\x20required',undefined,{'helpText':_0x262e08(0x19a)});if(!_0x1aea50||_0x1aea50[_0x262e08(0x191)]()[_0x262e08(0x18b)]===0x0)throw new SDKError(ErrorCode[_0x262e08(0x176)],_0x262e08(0x17b),undefined,{'helpText':_0x262e08(0x19a)});const _0x58b269=('\x0a\x20\x20\x20\x20\x20\x20SELECT\x0a\x20\x20\x20\x20\x20\x20\x20\x20column_name,\x0a\x20\x20\x20\x20\x20\x20\x20\x20data_type,\x0a\x20\x20\x20\x20\x20\x20\x20\x20is_nullable\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.columns\x0a\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_schema\x20=\x20'+escapeStringLiteral(_0x35c2d2)+_0x262e08(0x180)+escapeStringLiteral(_0x1aea50)+'\x0a\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20ordinal_position\x0a\x20\x20\x20\x20')[_0x262e08(0x191)](),_0x46ca93=await this[_0x262e08(0x17c)]['executeQuery'](_0x58b269);return _0x46ca93[_0x262e08(0x181)];}async['showTable'](_0x5ab7e4,_0x50e1e2,_0x531ca=0x28,_0x441d9c){const _0x15407b=a113_0x52e933;if(!_0x5ab7e4||_0x5ab7e4[_0x15407b(0x191)]()[_0x15407b(0x18b)]===0x0)throw new SDKError(ErrorCode[_0x15407b(0x176)],_0x15407b(0x174),undefined,{'helpText':_0x15407b(0x1a5)});if(!_0x50e1e2||_0x50e1e2['trim']()[_0x15407b(0x18b)]===0x0)throw new SDKError(ErrorCode['MISSING_ARGUMENT'],'Table\x20name\x20is\x20required',undefined,{'helpText':_0x15407b(0x1a5)});if(!Number[_0x15407b(0x19f)](_0x531ca)||_0x531ca<=0x0)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x15407b(0x196),undefined,{'helpText':_0x15407b(0x175)});const _0x3caa1d=escapeStringLiteral(_0x5ab7e4)['slice'](0x1,-0x1)+'.'+escapeStringLiteral(_0x50e1e2)[_0x15407b(0x19e)](0x1,-0x1),_0x575946='SELECT\x20*\x20FROM\x20'+_0x3caa1d+'\x20LIMIT\x20'+_0x531ca,_0x1ea585=await this[_0x15407b(0x17c)]['executeQuery'](_0x575946,{'catalog':_0x441d9c,'schema':_0x5ab7e4});return _0x1ea585;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x23f695,_0x4079da){const _0x11df7b=a114_0xf69a,_0x33f77b=_0x23f695();while(!![]){try{const _0x1c4ce4=parseInt(_0x11df7b(0x1bd))/0x1*(parseInt(_0x11df7b(0x1a5))/0x2)+-parseInt(_0x11df7b(0x1ba))/0x3*(-parseInt(_0x11df7b(0x1a9))/0x4)+-parseInt(_0x11df7b(0x1bb))/0x5+-parseInt(_0x11df7b(0x19e))/0x6*(-parseInt(_0x11df7b(0x1b0))/0x7)+parseInt(_0x11df7b(0x19d))/0x8+parseInt(_0x11df7b(0x1ad))/0x9+-parseInt(_0x11df7b(0x1aa))/0xa;if(_0x1c4ce4===_0x4079da)break;else _0x33f77b['push'](_0x33f77b['shift']());}catch(_0x146cb9){_0x33f77b['push'](_0x33f77b['shift']());}}}(a114_0x2fed,0x9a570));import{readFileSync}from'fs';import{createInterface}from'readline';export function stripSqlComments(_0x415752){const _0x35513b=a114_0xf69a;let _0x48eed1=_0x415752['replace'](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x48eed1=_0x48eed1[_0x35513b(0x1b8)](/--.*$/gm,''),_0x48eed1[_0x35513b(0x1a8)]();}function a114_0x2fed(){const _0x471d6e=['stdin\x20','\x27\x20not\x20found','utf-8','message','Permission\x20denied\x20reading\x20file\x20\x27','\x27:\x20','replace','EACCES','390171ahWeGo','3545340FiEhKY','close','8TnbmLf','push','8387296DhLzPe','6dqWvKi','test','Content\x20contains\x20no\x20SQL\x20statements','line','error','join','isTTY','132390IHoKLt','code','No\x20input\x20provided.\x20Pipe\x20SQL\x20to\x20stdin\x20or\x20use\x20a\x20file.\x0aExample:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-','trim','36gjSYZr','20548730riSrLC','ENOENT','map','4483935trIzDM','length','filter','1045919AjJnun','stdin'];a114_0x2fed=function(){return _0x471d6e;};return a114_0x2fed();}function a114_0xf69a(_0x43d40d,_0x219da8){_0x43d40d=_0x43d40d-0x19d;const _0x2fedc3=a114_0x2fed();let _0xf69ac=_0x2fedc3[_0x43d40d];return _0xf69ac;}function isEscaped(_0x18ba94,_0x363627){let _0x36ac88=0x0;for(let _0x31a897=_0x363627-0x1;_0x31a897>=0x0&&_0x18ba94[_0x31a897]==='\x5c';_0x31a897--){_0x36ac88++;}return _0x36ac88%0x2===0x1;}export function splitSqlStatements(_0x33efc0){const _0x5328ff=a114_0xf69a,_0x257260=stripSqlComments(_0x33efc0);if(!_0x257260)throw new Error(_0x5328ff(0x1a0));const _0x2ad261=[];let _0x5bab76='',_0xffd39c=![],_0x234f9e=![],_0x2b3e53=![];for(let _0x143cc7=0x0;_0x143cc7<_0x33efc0[_0x5328ff(0x1ae)];_0x143cc7++){const _0x5c1ad8=_0x33efc0[_0x143cc7];if(_0x5c1ad8==='\x27'&&!isEscaped(_0x33efc0,_0x143cc7)&&!_0x234f9e&&!_0x2b3e53)_0xffd39c=!_0xffd39c;else{if(_0x5c1ad8==='\x22'&&!isEscaped(_0x33efc0,_0x143cc7)&&!_0xffd39c&&!_0x2b3e53)_0x234f9e=!_0x234f9e;else _0x5c1ad8==='`'&&!isEscaped(_0x33efc0,_0x143cc7)&&!_0xffd39c&&!_0x234f9e&&(_0x2b3e53=!_0x2b3e53);}if(_0x5c1ad8===';'&&!_0xffd39c&&!_0x234f9e&&!_0x2b3e53){const _0x319bc3=_0x5bab76[_0x5328ff(0x1a8)]();_0x319bc3&&_0x2ad261[_0x5328ff(0x1be)](_0x319bc3),_0x5bab76='';}else _0x5bab76+=_0x5c1ad8;}const _0x59302b=_0x5bab76[_0x5328ff(0x1a8)]();_0x59302b&&_0x2ad261[_0x5328ff(0x1be)](_0x59302b);const _0x201601=_0x2ad261[_0x5328ff(0x1ac)](_0x1afd61=>_0x1afd61[_0x5328ff(0x1a8)]())[_0x5328ff(0x1af)](_0x4db61f=>{const _0x2e39a0=stripSqlComments(_0x4db61f);return _0x2e39a0['length']>0x0;});if(_0x201601[_0x5328ff(0x1ae)]===0x0)throw new Error(_0x5328ff(0x1a0));return _0x201601;}export function readFileContent(_0x40ef00){const _0x106577=a114_0xf69a;try{return readFileSync(_0x40ef00,_0x106577(0x1b4));}catch(_0x2824ad){const _0x5cc5e5=_0x2824ad[_0x106577(0x1a6)];if(_0x5cc5e5===_0x106577(0x1ab))throw new Error('File\x20\x27'+_0x40ef00+_0x106577(0x1b3));else{if(_0x5cc5e5===_0x106577(0x1b9))throw new Error(_0x106577(0x1b6)+_0x40ef00+'\x27');else throw new Error('Error\x20reading\x20file\x20\x27'+_0x40ef00+_0x106577(0x1b7)+_0x2824ad[_0x106577(0x1b5)]);}}}export function readSqlStatementsFromFile(_0x27f38f){const _0x2da723=a114_0xf69a,_0x4ce0f5=readFileContent(_0x27f38f);try{return splitSqlStatements(_0x4ce0f5);}catch(_0x35d648){throw new Error('File\x20\x27'+_0x27f38f+'\x27\x20'+_0x35d648[_0x2da723(0x1b5)]['toLowerCase']());}}export async function readStdinContent(){const _0x257d13=a114_0xf69a;if(process[_0x257d13(0x1b1)][_0x257d13(0x1a4)])throw new Error(_0x257d13(0x1a7));return new Promise((_0x5d3f52,_0x31e83f)=>{const _0x39790=_0x257d13,_0x4ad3af=[],_0x5cc547=createInterface({'input':process[_0x39790(0x1b1)],'terminal':![]});_0x5cc547['on'](_0x39790(0x1a1),_0x294b4d=>{_0x4ad3af['push'](_0x294b4d);}),_0x5cc547['on'](_0x39790(0x1bc),()=>{const _0x47195d=_0x39790;_0x5d3f52(_0x4ad3af[_0x47195d(0x1a3)]('\x0a'));}),_0x5cc547['on'](_0x39790(0x1a2),_0x2a99c4=>{const _0x45c35d=_0x39790;_0x5cc547[_0x45c35d(0x1bc)](),_0x31e83f(new Error('Error\x20reading\x20from\x20stdin:\x20'+_0x2a99c4['message']));});});}export async function readSqlStatementsFromStdin(){const _0x31fa5c=a114_0xf69a,_0x10cf70=await readStdinContent();try{return splitSqlStatements(_0x10cf70);}catch(_0x222099){throw new Error(_0x31fa5c(0x1b2)+_0x222099[_0x31fa5c(0x1b5)]['toLowerCase']());}}export function isSqlFilePath(_0x178c91){const _0x98ed1d=a114_0xf69a;return/\w\.sql$/[_0x98ed1d(0x19f)](_0x178c91);}
|
package/dist/sdk/realtime.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a115_0x1e88(){const _0x2782ad=['63056iQXUGV','getStatus','proxy','listParentSegments','cdpClient','9DoVqPb','application/json','keys','scheduleType','12379380GKlYoW','34251rfdqPs','cdp','4833904PmZcmJ','request','74oVTePF','PUT','GET','/realtime_setting','list','apiKey','map','all','application/vnd.treasuredata.v1+json','/audiences/','enabled','4077160IfVkIh','413411xEitOL','disabled','name','attributes','getConfig','getParentSegment','isEnabled','318cUikkc','httpClient','4044900RArikX'];a115_0x1e88=function(){return _0x2782ad;};return a115_0x1e88();}const a115_0x349a11=a115_0x4156;(function(_0x48414a,_0x475c9c){const _0x5affa4=a115_0x4156,_0x543b21=_0x48414a();while(!![]){try{const _0x1a2024=-parseInt(_0x5affa4(0x1ed))/0x1+parseInt(_0x5affa4(0x1e1))/0x2*(parseInt(_0x5affa4(0x1dd))/0x3)+parseInt(_0x5affa4(0x1df))/0x4+-parseInt(_0x5affa4(0x1f6))/0x5+-parseInt(_0x5affa4(0x1f4))/0x6*(parseInt(_0x5affa4(0x1f7))/0x7)+parseInt(_0x5affa4(0x1ec))/0x8*(-parseInt(_0x5affa4(0x1fc))/0x9)+parseInt(_0x5affa4(0x1dc))/0xa;if(_0x1a2024===_0x475c9c)break;else _0x543b21['push'](_0x543b21['shift']());}catch(_0x282271){_0x543b21['push'](_0x543b21['shift']());}}}(a115_0x1e88,0xa0fb7));import{HTTPClient}from'./client/http-client.js';import{CDPApiClient}from'./client/cdp-api-client.js';import{getEndpoint}from'./client/endpoints.js';function a115_0x4156(_0x16905e,_0x2ed774){_0x16905e=_0x16905e-0x1db;const _0x1e8851=a115_0x1e88();let _0x4156a8=_0x1e8851[_0x16905e];return _0x4156a8;}import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';export class RealtimeSDK{[a115_0x349a11(0x1f5)];[a115_0x349a11(0x1fb)];constructor(_0x1c2c7b){const _0x34fe6a=a115_0x349a11,_0x3ce95c=getEndpoint(_0x1c2c7b['site'],_0x34fe6a(0x1de)),_0x5d3159=toHeaderRecord(getAuthHeaders(_0x1c2c7b['site'],_0x1c2c7b[_0x34fe6a(0x1e6)]));this[_0x34fe6a(0x1f5)]=new HTTPClient(_0x3ce95c,{..._0x5d3159,'Accept':_0x34fe6a(0x1e9),'Content-Type':_0x34fe6a(0x1fd)},{'proxy':_0x1c2c7b[_0x34fe6a(0x1f9)]}),this[_0x34fe6a(0x1fb)]=new CDPApiClient(_0x1c2c7b);}async['isEnabled'](_0x7fd909){const _0x280d9c=a115_0x349a11;try{const _0xc58f87=await this['httpClient']['request'](_0x280d9c(0x1e3),_0x280d9c(0x1ea)+_0x7fd909+_0x280d9c(0x1e4));return _0xc58f87!==null;}catch{return![];}}async[a115_0x349a11(0x1f8)](_0x52b1db){const _0x4e5776=a115_0x349a11,_0x28ec71=await this[_0x4e5776(0x1fb)][_0x4e5776(0x1f2)](_0x52b1db);let _0x5d174e=![],_0x5d19f6=![];try{const _0x10000f=await this[_0x4e5776(0x1f5)]['request'](_0x4e5776(0x1e3),'/audiences/'+_0x52b1db+_0x4e5776(0x1e4));_0x5d174e=!![],_0x5d19f6=!!(_0x10000f&&typeof _0x10000f==='object'&&Object[_0x4e5776(0x1fe)](_0x10000f)['length']>0x0);}catch{_0x5d174e=![],_0x5d19f6=![];}return{'parent_segment_id':_0x52b1db,'parent_segment_name':_0x28ec71[_0x4e5776(0x1f0)][_0x4e5776(0x1ef)],'realtime_enabled':_0x5d174e,'realtime_config_exists':_0x5d19f6,'status':_0x5d174e?_0x4e5776(0x1eb):_0x4e5776(0x1ee)};}async[a115_0x349a11(0x1f1)](_0x4528c6){const _0x4f5fdb=a115_0x349a11,_0x2f46ed=await this['httpClient'][_0x4f5fdb(0x1e0)](_0x4f5fdb(0x1e3),_0x4f5fdb(0x1ea)+_0x4528c6+'/realtime_setting');return _0x2f46ed||{};}async['updateConfig'](_0x485a91,_0x585a48){const _0x2c1e00=a115_0x349a11,_0x3824b0=await this[_0x2c1e00(0x1f5)][_0x2c1e00(0x1e0)](_0x2c1e00(0x1e2),_0x2c1e00(0x1ea)+_0x485a91+_0x2c1e00(0x1e4),{'body':_0x585a48});return _0x3824b0||{};}async[a115_0x349a11(0x1e5)](){const _0x2e73c7=a115_0x349a11,_0x36209f=await this[_0x2e73c7(0x1fb)][_0x2e73c7(0x1fa)](),_0xb05c16=await Promise[_0x2e73c7(0x1e8)](_0x36209f[_0x2e73c7(0x1e7)](async _0x5622cd=>{const _0x4cab01=_0x2e73c7,_0x1e4d57=await this[_0x4cab01(0x1f3)](_0x5622cd['id']);return{'id':_0x5622cd['id'],'name':_0x5622cd[_0x4cab01(0x1f0)]['name'],'population':_0x5622cd[_0x4cab01(0x1f0)]['population'],'realtime_enabled':_0x1e4d57,'schedule_type':_0x5622cd[_0x4cab01(0x1f0)][_0x4cab01(0x1db)],'updated_at':_0x5622cd[_0x4cab01(0x1f0)]['updatedAt']};}));return _0xb05c16;}}
|
package/dist/sdk/schedule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a116_0x4848(){const _0x138b07=['\x20UTC','listSchedules','num','find','string','updated_at','time','test','12BeWGwk','7437864AZipJn','774455iSiAEr','2356023zbQSoj','filter','Invalid\x20time\x20format:\x20','queries','query','6538UElzLV','history','Query\x20is\x20required','created_at','3044223ifsKAO','type','Schedule\x20not\x20found:\x20','Type\x20is\x20required','length','floor','limit','pagination','1729760JsrpRQ','list','create','now','Database\x20is\x20required','334EleaJi','getTime','client','start_at','\x5c$&','num\x20must\x20be\x20between\x201\x20and\x2010','listQueries','pattern','INVALID_ARGUMENT','replace','end_at','slice','scheduled','desc','cron','createSchedule','delete','updateSchedule','NOT_FOUND','Schedule\x20name\x20is\x20required','push','10167682qgDHie','deleteSchedule','name'];a116_0x4848=function(){return _0x138b07;};return a116_0x4848();}const a116_0x37c838=a116_0xcac5;(function(_0x2f61b8,_0x3fbade){const _0x44c8a1=a116_0xcac5,_0x4ada43=_0x2f61b8();while(!![]){try{const _0x319da1=parseInt(_0x44c8a1(0x172))/0x1*(parseInt(_0x44c8a1(0x161))/0x2)+parseInt(_0x44c8a1(0x195))/0x3+-parseInt(_0x44c8a1(0x16d))/0x4+parseInt(_0x44c8a1(0x194))/0x5*(parseInt(_0x44c8a1(0x192))/0x6)+-parseInt(_0x44c8a1(0x187))/0x7+parseInt(_0x44c8a1(0x193))/0x8+-parseInt(_0x44c8a1(0x165))/0x9;if(_0x319da1===_0x3fbade)break;else _0x4ada43['push'](_0x4ada43['shift']());}catch(_0x3cf262){_0x4ada43['push'](_0x4ada43['shift']());}}}(a116_0x4848,0xda231));function a116_0xcac5(_0x58966d,_0x348b81){_0x58966d=_0x58966d-0x15d;const _0x484837=a116_0x4848();let _0xcac5fa=_0x484837[_0x58966d];return _0xcac5fa;}import{TDApiClient}from'./client/td-api-client.js';import{SDKError,ErrorCode}from'./errors.js';function normalizeTimestamp(_0x5604a2){const _0x1336a3=a116_0xcac5;if(!_0x5604a2)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/['test'](_0x5604a2))return _0x5604a2;return _0x5604a2[_0x1336a3(0x17b)](_0x1336a3(0x18a),'Z')['replace']('\x20','T');}export class ScheduleSDK{[a116_0x37c838(0x174)];constructor(_0x2c8430){this['client']=new TDApiClient(_0x2c8430);}async[a116_0x37c838(0x16e)](_0x45da25){const _0x2afc36=a116_0x37c838,_0x5015e2=await this['client']['listSchedules'](),_0x1c7939=_0x5015e2['map'](_0x559ab4=>({..._0x559ab4,'created_at':normalizeTimestamp(_0x559ab4['created_at'])??_0x559ab4['created_at']}));if(_0x45da25?.[_0x2afc36(0x16b)]&&_0x45da25[_0x2afc36(0x16b)]>0x0)return _0x1c7939[_0x2afc36(0x17d)](0x0,_0x45da25[_0x2afc36(0x16b)]);return _0x1c7939;}async[a116_0x37c838(0x178)](_0xb77b94){const _0x3b9943=a116_0x37c838,_0x2c5ba8=0x64,_0x215b39=_0xb77b94?.['limit'],_0x5dd194=[];let _0x1db672=!![],_0xb6a8f3,_0x29b87a,_0x23f3b3;if(_0xb77b94?.[_0x3b9943(0x179)]){const _0x153a5c=_0xb77b94[_0x3b9943(0x179)]['replace'](/[.+^${}()|[\]\\]/g,_0x3b9943(0x176)),_0x4925fe=_0x153a5c['replace'](/\*/g,'.*')[_0x3b9943(0x17b)](/\?/g,'.');_0x23f3b3=new RegExp('^'+_0x4925fe+'$','i');}while(_0x1db672&&(!_0x215b39||_0x5dd194[_0x3b9943(0x169)]<_0x215b39)){const _0x2e2ceb=await this[_0x3b9943(0x174)][_0x3b9943(0x178)]({'anchor_column':_0x3b9943(0x18f),'sort_direction':_0x3b9943(0x17f),'page_size':_0x2c5ba8,'anchor_id':_0xb6a8f3,'anchor_value':_0x29b87a});let _0x155297=_0x2e2ceb[_0x3b9943(0x15f)];_0xb77b94?.[_0x3b9943(0x17e)]&&(_0x155297=_0x155297['filter'](_0x2888ff=>_0x2888ff[_0x3b9943(0x180)]!==null));_0x23f3b3&&(_0x155297=_0x155297[_0x3b9943(0x15d)](_0x48426d=>_0x48426d['name']&&_0x23f3b3[_0x3b9943(0x191)](_0x48426d[_0x3b9943(0x189)])));_0x5dd194[_0x3b9943(0x186)](..._0x155297),_0x1db672=_0x2e2ceb[_0x3b9943(0x16c)]['has_next_page'];if(_0x1db672&&_0x2e2ceb[_0x3b9943(0x15f)][_0x3b9943(0x169)]>0x0){const _0x16faed=_0x2e2ceb[_0x3b9943(0x15f)][_0x2e2ceb[_0x3b9943(0x15f)][_0x3b9943(0x169)]-0x1];_0xb6a8f3=_0x16faed['id'],_0x29b87a=_0x16faed[_0x3b9943(0x18f)];}}const _0x1863a0=_0x215b39?_0x5dd194[_0x3b9943(0x17d)](0x0,_0x215b39):_0x5dd194;return{'queries':_0x1863a0,'pagination':{'has_next_page':_0x1db672||(_0x215b39?_0x5dd194['length']>_0x215b39:![])}};}async['show'](_0x5af3f5){const _0x2bfef7=a116_0x37c838,_0x3640d5=await this['client'][_0x2bfef7(0x18b)](),_0x49429d=_0x3640d5[_0x2bfef7(0x18d)](_0x4ebb2e=>_0x4ebb2e[_0x2bfef7(0x189)]===_0x5af3f5);if(!_0x49429d)throw new SDKError(ErrorCode[_0x2bfef7(0x184)],_0x2bfef7(0x167)+_0x5af3f5);return{..._0x49429d,'created_at':normalizeTimestamp(_0x49429d[_0x2bfef7(0x164)])??_0x49429d[_0x2bfef7(0x164)]};}async[a116_0x37c838(0x16f)](_0x2b1fad,_0x275d55){const _0x2e38ab=a116_0x37c838;if(!_0x2b1fad)throw new SDKError(ErrorCode[_0x2e38ab(0x17a)],_0x2e38ab(0x185));if(!_0x275d55['database'])throw new SDKError(ErrorCode[_0x2e38ab(0x17a)],_0x2e38ab(0x171));if(!_0x275d55[_0x2e38ab(0x160)])throw new SDKError(ErrorCode[_0x2e38ab(0x17a)],_0x2e38ab(0x163));if(!_0x275d55[_0x2e38ab(0x166)])throw new SDKError(ErrorCode[_0x2e38ab(0x17a)],_0x2e38ab(0x168));return await this[_0x2e38ab(0x174)][_0x2e38ab(0x181)](_0x2b1fad,_0x275d55);}async['update'](_0x126fa5,_0x1a8115){const _0x5af3e9=a116_0x37c838;if(!_0x126fa5)throw new SDKError(ErrorCode[_0x5af3e9(0x17a)],_0x5af3e9(0x185));return await this[_0x5af3e9(0x174)][_0x5af3e9(0x183)](_0x126fa5,_0x1a8115);}async[a116_0x37c838(0x182)](_0x20d27a){const _0x1f683e=a116_0x37c838;if(!_0x20d27a)throw new SDKError(ErrorCode[_0x1f683e(0x17a)],_0x1f683e(0x185));return await this[_0x1f683e(0x174)][_0x1f683e(0x188)](_0x20d27a);}async['run'](_0x365656,_0x22fa99){const _0x1ddfbd=a116_0x37c838;if(!_0x365656)throw new SDKError(ErrorCode[_0x1ddfbd(0x17a)],_0x1ddfbd(0x185));let _0x7d4ea6;if(_0x22fa99?.[_0x1ddfbd(0x190)]){const _0xba8a9b=typeof _0x22fa99[_0x1ddfbd(0x190)]===_0x1ddfbd(0x18e)?new Date(_0x22fa99[_0x1ddfbd(0x190)]):_0x22fa99[_0x1ddfbd(0x190)];if(isNaN(_0xba8a9b[_0x1ddfbd(0x173)]()))throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x1ddfbd(0x15e)+_0x22fa99[_0x1ddfbd(0x190)]);_0x7d4ea6=Math['floor'](_0xba8a9b[_0x1ddfbd(0x173)]()/0x3e8);}else _0x7d4ea6=Math[_0x1ddfbd(0x16a)](Date[_0x1ddfbd(0x170)]()/0x3e8);if(_0x22fa99?.['num']!==undefined){if(_0x22fa99[_0x1ddfbd(0x18c)]<0x1||_0x22fa99[_0x1ddfbd(0x18c)]>0xa)throw new SDKError(ErrorCode[_0x1ddfbd(0x17a)],_0x1ddfbd(0x177));}return await this[_0x1ddfbd(0x174)]['runSchedule'](_0x365656,_0x7d4ea6,_0x22fa99?.[_0x1ddfbd(0x18c)]);}async[a116_0x37c838(0x162)](_0x14f6d7,_0x350682){const _0x4fb7de=a116_0x37c838;if(!_0x14f6d7)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x4fb7de(0x185));const _0xabf5cd=await this[_0x4fb7de(0x174)]['getScheduleHistory'](_0x14f6d7,_0x350682);return{..._0xabf5cd,'history':_0xabf5cd[_0x4fb7de(0x162)]['map'](_0x1da2f7=>({..._0x1da2f7,'created_at':normalizeTimestamp(_0x1da2f7[_0x4fb7de(0x164)]),'start_at':normalizeTimestamp(_0x1da2f7[_0x4fb7de(0x175)]),'end_at':normalizeTimestamp(_0x1da2f7[_0x4fb7de(0x17c)])}))};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a117_0x1c4ad6=a117_0x3bc9;(function(_0x541fe0,_0x48c1fa){const _0x41e080=a117_0x3bc9,_0x7985be=_0x541fe0();while(!![]){try{const _0x4b2f7f=-parseInt(_0x41e080(0x1b8))/0x1*(-parseInt(_0x41e080(0x19b))/0x2)+-parseInt(_0x41e080(0x1b3))/0x3+parseInt(_0x41e080(0x1f7))/0x4*(parseInt(_0x41e080(0x204))/0x5)+-parseInt(_0x41e080(0x1d0))/0x6*(-parseInt(_0x41e080(0x1cb))/0x7)+-parseInt(_0x41e080(0x1bf))/0x8+-parseInt(_0x41e080(0x1ad))/0x9+parseInt(_0x41e080(0x1cc))/0xa*(parseInt(_0x41e080(0x1cd))/0xb);if(_0x4b2f7f===_0x48c1fa)break;else _0x7985be['push'](_0x7985be['shift']());}catch(_0x3f5453){_0x7985be['push'](_0x7985be['shift']());}}}(a117_0x2a52,0xc7f83));import*as a117_0x4f9d32 from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';export function segmentResponseToDefSync(_0x45add6,_0x5a994f){const _0x794fc=a117_0x3bc9,_0x4c42f5=_0x45add6[_0x794fc(0x1a1)]&&_0x794fc(0x200)in _0x45add6['rule']&&_0x45add6['rule'][_0x794fc(0x200)];return{'type':_0x794fc(0x19a),'name':_0x45add6[_0x794fc(0x218)],..._0x45add6['description']&&{'description':_0x45add6[_0x794fc(0x1af)]},..._0x5a994f&&{'folder':_0x5a994f},..._0x4c42f5&&{'rule':apiRuleToYaml(_0x45add6[_0x794fc(0x1a1)])},..._0x45add6['kind']!==undefined&&{'kind':_0x45add6[_0x794fc(0x1f8)]===0x0?_0x794fc(0x192):_0x45add6[_0x794fc(0x1f8)]===0x1?_0x794fc(0x209):_0x794fc(0x21e)},..._0x45add6[_0x794fc(0x1a9)]!==undefined&&{'visible':_0x45add6['isVisible']}};}export async function segmentResponseToDef(_0x4fe072,_0x2813b6,_0x5305d){const _0x25659f=a117_0x3bc9,_0x5d32a8=segmentResponseToDefSync(_0x4fe072,_0x5305d);if(!_0x2813b6||!_0x2813b6['resolveSegmentName'])return _0x5d32a8;return _0x5d32a8[_0x25659f(0x1a1)]&&(_0x5d32a8[_0x25659f(0x1a1)]=await resolveRuleSegmentRefs(_0x5d32a8['rule'],_0x2813b6[_0x25659f(0x1f9)])),_0x5d32a8;}export function apiRuleToYaml(_0x4fcdac){const _0x3cdf2f=a117_0x3bc9,_0x473e99=(_0x4fcdac[_0x3cdf2f(0x1be)]||[])[_0x3cdf2f(0x211)](apiConditionToYaml);if(_0x473e99[_0x3cdf2f(0x1e3)]===0x1&&!_0x4fcdac[_0x3cdf2f(0x1af)]&&'type'in _0x473e99[0x0]&&(_0x473e99[0x0][_0x3cdf2f(0x200)]==='And'||_0x473e99[0x0][_0x3cdf2f(0x200)]==='Or')){const _0x3d6933=_0x473e99[0x0];if(_0x3d6933[_0x3cdf2f(0x200)]===_0x4fcdac[_0x3cdf2f(0x200)]&&_0x3d6933[_0x3cdf2f(0x1be)])return{'type':_0x4fcdac['type'],'conditions':_0x3d6933[_0x3cdf2f(0x1be)],..._0x3d6933[_0x3cdf2f(0x1af)]&&{'description':_0x3d6933[_0x3cdf2f(0x1af)]}};}return{'type':_0x4fcdac['type'],'conditions':_0x473e99,..._0x4fcdac['description']&&{'description':_0x4fcdac['description']}};}export async function resolveRuleSegmentRefs(_0x3aae59,_0x26846e){const _0x12080d=a117_0x3bc9;return transformRuleSegmentRefs(_0x3aae59,_0x26846e,_0x594256=>/^\d+$/[_0x12080d(0x193)](_0x594256));}async function transformConditionSegmentRefs(_0x5f2fcf,_0x2e2b53,_0x3c64ec,_0x2fd058){const _0x51abe4=a117_0x3bc9;if(_0x51abe4(0x19a)in _0x5f2fcf&&(_0x5f2fcf[_0x51abe4(0x200)]===_0x51abe4(0x196)||_0x5f2fcf[_0x51abe4(0x200)]===_0x51abe4(0x19d))){const _0x331c49=_0x5f2fcf;if(_0x3c64ec(_0x331c49[_0x51abe4(0x19a)]))return{..._0x331c49,'segment':await _0x2e2b53(_0x331c49[_0x51abe4(0x19a)])};return _0x5f2fcf;}if(_0x51abe4(0x1be)in _0x5f2fcf&&_0x5f2fcf['conditions']){const _0x3bb6dc=_0x5f2fcf,_0xaa6edc=await Promise[_0x51abe4(0x1e7)](_0x3bb6dc[_0x51abe4(0x1be)][_0x51abe4(0x211)](_0x2527fe=>transformConditionSegmentRefs(_0x2527fe,_0x2e2b53,_0x3c64ec,_0x2fd058)));return{..._0x3bb6dc,'conditions':_0xaa6edc};}if(_0x51abe4(0x19e)in _0x5f2fcf&&_0x5f2fcf[_0x51abe4(0x19e)]){const _0x28b9c8=_0x5f2fcf,_0x4474a6=await _0x2fd058(_0x28b9c8[_0x51abe4(0x19e)],_0x2e2b53);return{..._0x28b9c8,'filter':_0x4474a6};}return _0x5f2fcf;}async function transformRuleSegmentRefs(_0x41a916,_0x3c36d9,_0x1f58ea){const _0xb442b4=a117_0x3bc9,_0x5b2f76=(_0x314f2f,_0x1a938e)=>transformRuleSegmentRefs(_0x314f2f,_0x1a938e,_0x1f58ea),_0x545f80=await Promise[_0xb442b4(0x1e7)](_0x41a916[_0xb442b4(0x1be)]['map'](_0x37584e=>transformConditionSegmentRefs(_0x37584e,_0x3c36d9,_0x1f58ea,_0x5b2f76)));return{..._0x41a916,'conditions':_0x545f80};}export async function resolveRuleSegmentIds(_0x1e85fd,_0x386cb7){const _0x322633=a117_0x3bc9;return transformRuleSegmentRefs(_0x1e85fd,_0x386cb7,_0x288588=>!/^\d+$/[_0x322633(0x193)](_0x288588));}function apiConditionToYaml(_0x2668b6){const _0x3c0ff8=a117_0x3bc9;if(_0x2668b6[_0x3c0ff8(0x200)]===_0x3c0ff8(0x1de)||_0x2668b6[_0x3c0ff8(0x200)]==='Or'){if(_0x2668b6[_0x3c0ff8(0x1be)]){const _0x23423b=_0x2668b6['conditions']['map'](apiConditionToYaml);if(_0x23423b[_0x3c0ff8(0x1e3)]===0x1&&!_0x2668b6[_0x3c0ff8(0x1af)])return _0x23423b[0x0];return{'type':_0x2668b6['type'],'conditions':_0x23423b,..._0x2668b6[_0x3c0ff8(0x1af)]&&{'description':_0x2668b6[_0x3c0ff8(0x1af)]}};}}if(_0x2668b6[_0x3c0ff8(0x200)]===_0x3c0ff8(0x1fe)&&_0x2668b6[_0x3c0ff8(0x19c)]&&_0x2668b6[_0x3c0ff8(0x1b5)]){const _0x5a170f=_0x2668b6['leftValue'][_0x3c0ff8(0x1c6)]?{'type':_0x2668b6[_0x3c0ff8(0x19c)][_0x3c0ff8(0x1c6)][_0x3c0ff8(0x200)],..._0x2668b6[_0x3c0ff8(0x19c)]['aggregation'][_0x3c0ff8(0x1a3)]&&{'groupingColumns':_0x2668b6[_0x3c0ff8(0x19c)][_0x3c0ff8(0x1c6)][_0x3c0ff8(0x1a3)]}}:undefined;return{'type':_0x3c0ff8(0x1fe),'attribute':_0x2668b6[_0x3c0ff8(0x19c)]['name']||'','operator':apiOperatorToYaml(_0x2668b6[_0x3c0ff8(0x1b5)]),..._0x2668b6[_0x3c0ff8(0x1a5)]&&_0x2668b6[_0x3c0ff8(0x1a5)]!==_0x3c0ff8(0x1ba)?{'arrayMatching':_0x2668b6[_0x3c0ff8(0x1a5)]}:{},..._0x2668b6[_0x3c0ff8(0x19d)]?{'exclude':_0x2668b6[_0x3c0ff8(0x19d)]}:{},..._0x5a170f?{'aggregation':_0x5a170f}:{},..._0x2668b6[_0x3c0ff8(0x19c)][_0x3c0ff8(0x1dd)]?{'source':_0x2668b6[_0x3c0ff8(0x19c)][_0x3c0ff8(0x1dd)][_0x3c0ff8(0x218)]}:{},..._0x2668b6[_0x3c0ff8(0x19c)][_0x3c0ff8(0x19e)]?{'filter':apiRuleToYaml(_0x2668b6[_0x3c0ff8(0x19c)][_0x3c0ff8(0x19e)])}:{},..._0x2668b6['limit']!==undefined&&_0x2668b6[_0x3c0ff8(0x1ce)]!==null?{'limit':_0x2668b6['limit']}:{}};}if(_0x2668b6[_0x3c0ff8(0x200)]==='Column'&&_0x2668b6[_0x3c0ff8(0x1d5)]&&_0x2668b6['operator'])return{'type':'Column','column':_0x2668b6[_0x3c0ff8(0x1d5)],'operator':apiOperatorToYaml(_0x2668b6[_0x3c0ff8(0x1b5)])};if(_0x2668b6[_0x3c0ff8(0x200)]===_0x3c0ff8(0x1fa)&&_0x2668b6['id'])return{'type':_0x2668b6[_0x3c0ff8(0x19d)]?_0x3c0ff8(0x19d):_0x3c0ff8(0x196),'segment':_0x2668b6['id']};return{'type':'And','conditions':[]};}function a117_0x2a52(){const _0x475b30=['value','connectionNameToTypeMap','266WXpUTs','210LSThMQ','1834206yENOsl','limit','].attribute\x20cannot\x20be\x20empty.\x0a','85092uSgwGk','valid','get','Equal','INVALID_ARGUMENT','column','__SEGMENT_REF__','repeatSubFrequency','string','allColumns','duration','isFinite','behaviorTableName','source','And','segmentFolderId','visible','joinStrategy','toLowerCase','length','parse','attribute','repeatUnit','all','entries','order_by','stringify','schedule','joinRow','YAML\x20config\x20missing\x20required\x20field:\x20name','Invalid\x20connector_config\x20for\x20activation\x20\x22','JOURNEY_SYNTAX_ERROR','email_recipients','values','__UNRESOLVED__','connectorConfig','keys','all_columns','emailRecipients','4vcQUko','kind','resolveSegmentName','Reference','emailToIdMap','connector_config\x20for\x20activation\x20\x22','maxValue','Value','has','type','Please\x20specify\x20a\x20valid\x20attribute\x20name.','visibility','columns','3902485LAOUIv','replace','Column','endOn','\x22:\x0a','realtime','activationTemplateId','join_strategy','attribute_name','connection','notify_on','minValue','CONNECTION_NOT_FOUND','map','not','max','getSchema','add','repeat_frequency','connector_config','name','timezone','run_after_journey_refresh','runAfterJourneyRefresh','orderBy','repeatFrequency','funnel_stage','isArray','repeat_sub_frequency','warnings','attributes','localRuleToName','ruleHashToName','behavior_table','min','CONNECTOR_INVALID_CONFIG','activation_template_id','batch','test','forEach','rightValue','include','.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.','TimeWithinNext','end_on','segment','193390KxApgd','leftValue','exclude','filter','sort','notifyOn','rule','folder','groupingColumns','from','arrayMatching','repeat_unit','unit','object','isVisible','behavior','startAt','Segment\x20description','12839445FGIsNt','start_at','description','set','TimeWithinPast','activations:','3851082pTbZoD','rule:','operator','\x27:\x20','localeCompare','3UwHQzO','YAML\x20type\x20must\x20be\x20\x27segment\x27\x20or\x20omitted,\x20got:\x20','any','scheduleType','rightValues','notification','conditions','12654320EolWTV','New\x20Segment','conditions[','connectionId','syndicationBehavior','code','join_row','aggregation','formatting','activations'];a117_0x2a52=function(){return _0x475b30;};return a117_0x2a52();}function isTemporalOperator(_0x29c0a5){const _0x4c64d1=a117_0x3bc9;return _0x29c0a5===_0x4c64d1(0x1b1)||_0x29c0a5===_0x4c64d1(0x198);}function isBetweenOperator(_0x27ee4d){return _0x27ee4d==='Between';}function getEffectiveValue(_0x439f08){const _0x1bcea3=a117_0x3bc9,_0x53b397=_0x439f08[_0x1bcea3(0x1f1)];return _0x439f08[_0x1bcea3(0x1c9)]??_0x53b397;}function parseNumericValue(_0x310cfe){const _0x19a071=a117_0x3bc9;if(typeof _0x310cfe==='object'&&_0x310cfe!==null)return _0x310cfe;if(_0x310cfe==='')return _0x310cfe;const _0x5c5f9=Number(_0x310cfe);return Number[_0x19a071(0x1db)](_0x5c5f9)?_0x5c5f9:_0x310cfe;}function apiOperatorToYaml(_0x5820c7){const _0x56a9d8=a117_0x3bc9;if(isBetweenOperator(_0x5820c7[_0x56a9d8(0x200)]))return{'type':mapApiOperatorType(_0x5820c7[_0x56a9d8(0x200)]),..._0x5820c7[_0x56a9d8(0x212)]!==undefined&&{'not':_0x5820c7[_0x56a9d8(0x212)]},..._0x5820c7[_0x56a9d8(0x20f)]!==undefined&&{'min':parseNumericValue(_0x5820c7[_0x56a9d8(0x20f)])},..._0x5820c7[_0x56a9d8(0x1fd)]!==undefined&&{'max':parseNumericValue(_0x5820c7[_0x56a9d8(0x1fd)])}};let _0x16e62d;if(_0x5820c7['rightValues']&&_0x5820c7[_0x56a9d8(0x1bc)]['length']>0x0)_0x16e62d=_0x5820c7[_0x56a9d8(0x1bc)];else{if(_0x5820c7[_0x56a9d8(0x195)]!==undefined)_0x16e62d=_0x5820c7[_0x56a9d8(0x195)];else isTemporalOperator(_0x5820c7[_0x56a9d8(0x200)])&&_0x5820c7[_0x56a9d8(0x1c9)]!==undefined&&(_0x16e62d=_0x5820c7[_0x56a9d8(0x1c9)]);}return{'type':mapApiOperatorType(_0x5820c7['type']),..._0x5820c7[_0x56a9d8(0x212)]!==undefined&&{'not':_0x5820c7['not']},..._0x16e62d!==undefined&&{'value':_0x16e62d},..._0x5820c7[_0x56a9d8(0x1a7)]!==undefined&&{'unit':_0x5820c7['unit']}};}function mapApiOperatorType(_0x47e798){return _0x47e798;}export function segmentDefToCreateRequest(_0x11bd17,_0x1fc5a7){const _0x4c6252=a117_0x3bc9,_0x4dbd2e={'name':_0x11bd17[_0x4c6252(0x218)]};return _0x11bd17[_0x4c6252(0x1af)]&&(_0x4dbd2e[_0x4c6252(0x1af)]=_0x11bd17[_0x4c6252(0x1af)]),_0x11bd17[_0x4c6252(0x1a1)]&&(_0x4dbd2e[_0x4c6252(0x1a1)]=yamlRuleToApi(_0x11bd17[_0x4c6252(0x1a1)])),_0x11bd17[_0x4c6252(0x1f8)]&&(_0x4dbd2e[_0x4c6252(0x1f8)]=_0x11bd17[_0x4c6252(0x1f8)]===_0x4c6252(0x192)?0x0:_0x11bd17[_0x4c6252(0x1f8)]===_0x4c6252(0x209)?0x1:0x2),_0x11bd17[_0x4c6252(0x1e0)]!==undefined&&(_0x4dbd2e[_0x4c6252(0x1a9)]=_0x11bd17[_0x4c6252(0x1e0)]),_0x1fc5a7&&(_0x4dbd2e[_0x4c6252(0x1df)]=_0x1fc5a7),_0x4dbd2e;}export function segmentDefToUpdateRequest(_0x20156d){const _0xdf6244=a117_0x3bc9,_0xe97f41={'name':_0x20156d[_0xdf6244(0x218)]};return _0x20156d[_0xdf6244(0x1af)]!==undefined&&(_0xe97f41['description']=_0x20156d[_0xdf6244(0x1af)]),_0x20156d[_0xdf6244(0x1a1)]&&(_0xe97f41[_0xdf6244(0x1a1)]=yamlRuleToApi(_0x20156d[_0xdf6244(0x1a1)])),_0x20156d['kind']&&(_0xe97f41[_0xdf6244(0x1f8)]=_0x20156d[_0xdf6244(0x1f8)]===_0xdf6244(0x192)?0x0:_0x20156d[_0xdf6244(0x1f8)]===_0xdf6244(0x209)?0x1:0x2),_0xe97f41;}export function yamlRuleToApi(_0x3734f3,_0x299606=![]){const _0x52d58a=a117_0x3bc9,_0x4f6808=_0x3734f3['conditions'][_0x52d58a(0x211)](yamlConditionToApi);if(_0x299606){const _0x4750d8=_0x4f6808['every'](_0x46361c=>_0x46361c[_0x52d58a(0x200)]===_0x52d58a(0x1de)||_0x46361c[_0x52d58a(0x200)]==='Or');if(!_0x4750d8&&_0x4f6808['length']>0x0)return{'type':_0x3734f3[_0x52d58a(0x200)],'conditions':[{'type':'And','description':_0x3734f3[_0x52d58a(0x1af)]||'','conditions':_0x4f6808}]};}return{'type':_0x3734f3['type'],'conditions':_0x4f6808,..._0x3734f3['description']&&{'description':_0x3734f3[_0x52d58a(0x1af)]}};}function yamlConditionToApi(_0x2c2a8b){const _0x5458f3=a117_0x3bc9;if(_0x5458f3(0x19a)in _0x2c2a8b&&(_0x2c2a8b[_0x5458f3(0x200)]===_0x5458f3(0x196)||_0x2c2a8b['type']===_0x5458f3(0x19d))){const _0x1c63df=_0x2c2a8b;return{'type':_0x5458f3(0x1fa),'id':_0x1c63df[_0x5458f3(0x19a)],'exclude':_0x1c63df[_0x5458f3(0x200)]===_0x5458f3(0x19d)};}if(_0x5458f3(0x200)in _0x2c2a8b&&(_0x2c2a8b[_0x5458f3(0x200)]===_0x5458f3(0x1de)||_0x2c2a8b[_0x5458f3(0x200)]==='Or')){const _0x27980a=_0x2c2a8b;return{'type':_0x27980a[_0x5458f3(0x200)],'conditions':_0x27980a['conditions'][_0x5458f3(0x211)](yamlConditionToApi),..._0x27980a['description']&&{'description':_0x27980a[_0x5458f3(0x1af)]}};}if(_0x5458f3(0x1d5)in _0x2c2a8b&&_0x2c2a8b[_0x5458f3(0x200)]===_0x5458f3(0x206)){const _0x3d81a8=_0x2c2a8b;return{'type':_0x5458f3(0x206),'column':_0x3d81a8['column'],'operator':yamlOperatorToApi(_0x3d81a8[_0x5458f3(0x1b5)])};}const _0x1d08f7=_0x2c2a8b,_0x3ab6fd={'type':_0x5458f3(0x1fe),'leftValue':buildLeftValue(_0x1d08f7),'operator':yamlOperatorToApi(_0x1d08f7[_0x5458f3(0x1b5)]),'exclude':_0x1d08f7['exclude']??![],'arrayMatching':_0x1d08f7['arrayMatching']??_0x5458f3(0x1ba)};return _0x1d08f7['limit']!==undefined&&(_0x3ab6fd['limit']=_0x1d08f7[_0x5458f3(0x1ce)]),_0x3ab6fd;}function buildLeftValue(_0x595c68){const _0xa5a9fc=a117_0x3bc9,_0x26f741={};return _0x595c68[_0xa5a9fc(0x1e5)]&&(_0x26f741['name']=_0x595c68[_0xa5a9fc(0x1e5)]),_0x595c68[_0xa5a9fc(0x1c6)]&&(_0x26f741['aggregation']={'type':_0x595c68[_0xa5a9fc(0x1c6)][_0xa5a9fc(0x200)],..._0x595c68[_0xa5a9fc(0x1c6)]['groupingColumns']&&{'groupingColumns':_0x595c68[_0xa5a9fc(0x1c6)][_0xa5a9fc(0x1a3)]}}),_0x595c68[_0xa5a9fc(0x1dd)]&&(_0x26f741[_0xa5a9fc(0x1dd)]={'name':_0x595c68[_0xa5a9fc(0x1dd)]}),_0x595c68[_0xa5a9fc(0x19e)]&&(_0x26f741[_0xa5a9fc(0x19e)]=yamlRuleToApi(_0x595c68[_0xa5a9fc(0x19e)])),_0x26f741;}function yamlOperatorToApi(_0x75a171){const _0x501b92=a117_0x3bc9,_0x14cfd6={'type':mapYamlOperatorType(_0x75a171[_0x501b92(0x200)]),'not':_0x75a171[_0x501b92(0x212)]??![]};if(isBetweenOperator(_0x75a171['type']))return _0x75a171[_0x501b92(0x226)]!==undefined&&(_0x14cfd6[_0x501b92(0x20f)]=typeof _0x75a171[_0x501b92(0x226)]===_0x501b92(0x1a8)?_0x75a171['min']:String(_0x75a171[_0x501b92(0x226)])),_0x75a171[_0x501b92(0x213)]!==undefined&&(_0x14cfd6[_0x501b92(0x1fd)]=typeof _0x75a171[_0x501b92(0x213)]===_0x501b92(0x1a8)?_0x75a171['max']:String(_0x75a171[_0x501b92(0x213)])),_0x14cfd6;const _0x3fac5b=getEffectiveValue(_0x75a171);if(_0x3fac5b!==undefined){if(Array[_0x501b92(0x21f)](_0x3fac5b))_0x14cfd6[_0x501b92(0x1bc)]=_0x3fac5b;else isTemporalOperator(_0x75a171[_0x501b92(0x200)])?_0x14cfd6[_0x501b92(0x1c9)]=_0x3fac5b:_0x14cfd6[_0x501b92(0x195)]=_0x3fac5b;}return _0x75a171[_0x501b92(0x1a7)]&&(_0x14cfd6['unit']=_0x75a171[_0x501b92(0x1a7)]),_0x14cfd6;}function mapYamlOperatorType(_0x3d164e){return _0x3d164e;}export function toYamlString(_0x508a09){const _0x12d6e1=a117_0x3bc9,_0x2fdfb2=JSON[_0x12d6e1(0x1e4)](JSON['stringify'](_0x508a09)),_0x1cfef6=a117_0x4f9d32[_0x12d6e1(0x1ea)](_0x2fdfb2,{'indent':0x2,'lineWidth':0x0,'nullStr':'null'}),_0x5dbc06=[_0x12d6e1(0x1b4)];let _0x5a24d5=_0x1cfef6;for(const _0x5821b7 of _0x5dbc06){_0x5a24d5=_0x5a24d5[_0x12d6e1(0x205)](new RegExp('^('+_0x5821b7+')','m'),(_0x14a61f,_0x2fda0d,_0x513b1f)=>{if(_0x513b1f===0x0||_0x5a24d5[_0x513b1f-0x1]==='\x0a'&&_0x5a24d5[_0x513b1f-0x2]==='\x0a')return _0x2fda0d;return'\x0a'+_0x2fda0d;});}return _0x5a24d5;}export function parseYamlString(_0x3db151){const _0x24572d=a117_0x3bc9,_0x4f5cae=a117_0x4f9d32[_0x24572d(0x1e4)](_0x3db151);if(!_0x4f5cae[_0x24572d(0x218)])throw new Error(_0x24572d(0x1ed));if(_0x4f5cae[_0x24572d(0x200)]&&_0x4f5cae[_0x24572d(0x200)]!==_0x24572d(0x19a))throw new Error(_0x24572d(0x1b9)+_0x4f5cae[_0x24572d(0x200)]);return _0x4f5cae;}export function isSegmentYaml(_0x13b9aa){const _0xd4d5cb=a117_0x3bc9;if(typeof _0x13b9aa!==_0xd4d5cb(0x1a8)||_0x13b9aa===null)return![];const _0x444adc=_0x13b9aa;return _0x444adc[_0xd4d5cb(0x200)]===_0xd4d5cb(0x19a)||_0x444adc[_0xd4d5cb(0x200)]===undefined;}export function generateTemplate(_0x1dc0b0=a117_0x1c4ad6(0x1c0)){const _0x2f05ed=a117_0x1c4ad6,_0x26f186={'type':_0x2f05ed(0x19a),'name':_0x1dc0b0,'description':_0x2f05ed(0x1ac),'rule':{'type':_0x2f05ed(0x1de),'conditions':[{'type':'Value','attribute':_0x2f05ed(0x20c),'operator':{'type':_0x2f05ed(0x1d3),'value':_0x2f05ed(0x1c9)}}]}};return toYamlString(_0x26f186);}export function segmentToYamlString(_0x1ab240){const _0x3d7211=a117_0x1c4ad6,_0x48580c=JSON[_0x3d7211(0x1e4)](JSON[_0x3d7211(0x1ea)](_0x1ab240)),_0x2e0310=a117_0x4f9d32[_0x3d7211(0x1ea)](_0x48580c,{'indent':0x2,'lineWidth':0x0,'nullStr':'null'}),_0x176d4c=[_0x3d7211(0x1b4),_0x3d7211(0x1b2)];let _0x54ae25=_0x2e0310;for(const _0x260c35 of _0x176d4c){_0x54ae25=_0x54ae25[_0x3d7211(0x205)](new RegExp('^('+_0x260c35+')','m'),(_0x3a117f,_0x19196e,_0x1775a3)=>{if(_0x1775a3===0x0||_0x54ae25[_0x1775a3-0x1]==='\x0a'&&_0x54ae25[_0x1775a3-0x2]==='\x0a')return _0x19196e;return'\x0a'+_0x19196e;});}return _0x54ae25;}export function parseSegmentYamlFile(_0xfbae77){const _0x5b62fb=a117_0x1c4ad6,_0x5ca8ef=a117_0x4f9d32[_0x5b62fb(0x1e4)](_0xfbae77);if(!_0x5ca8ef['name'])throw new Error(_0x5b62fb(0x1ed));return _0x5ca8ef;}export function normalizeChildSegmentYaml(_0xc25a83){const _0x49fc5a=a117_0x1c4ad6;return{'type':'segment','name':_0xc25a83[_0x49fc5a(0x218)],..._0xc25a83['description']!==undefined&&{'description':_0xc25a83[_0x49fc5a(0x1af)]},..._0xc25a83[_0x49fc5a(0x1a2)]!==undefined&&{'folder':_0xc25a83[_0x49fc5a(0x1a2)]},..._0xc25a83[_0x49fc5a(0x1a1)]&&{'rule':normalizeRule(_0xc25a83[_0x49fc5a(0x1a1)])},..._0xc25a83[_0x49fc5a(0x1f8)]!==undefined&&{'kind':_0xc25a83[_0x49fc5a(0x1f8)]},..._0xc25a83['visible']!==undefined&&{'visible':_0xc25a83[_0x49fc5a(0x1e0)]},..._0xc25a83[_0x49fc5a(0x1c8)]&&{'activations':_0xc25a83[_0x49fc5a(0x1c8)]['map'](normalizeActivation)}};}export function normalizeRule(_0x275cb2){const _0xa24f75=a117_0x1c4ad6;return{'type':_0x275cb2['type'],'conditions':_0x275cb2[_0xa24f75(0x1be)][_0xa24f75(0x211)](normalizeCondition),..._0x275cb2['description']!==undefined&&{'description':_0x275cb2[_0xa24f75(0x1af)]}};}function normalizeCondition(_0x5594f7){const _0x21e642=a117_0x1c4ad6;if(_0x21e642(0x19a)in _0x5594f7&&(_0x5594f7[_0x21e642(0x200)]==='include'||_0x5594f7['type']===_0x21e642(0x19d))){const _0x180dcb=_0x5594f7;return{'type':_0x180dcb[_0x21e642(0x200)],'segment':_0x180dcb[_0x21e642(0x19a)]};}if('type'in _0x5594f7&&(_0x5594f7['type']===_0x21e642(0x1de)||_0x5594f7[_0x21e642(0x200)]==='Or')){const _0x47be3d=_0x5594f7;return{'type':_0x47be3d['type'],'conditions':_0x47be3d[_0x21e642(0x1be)][_0x21e642(0x211)](normalizeCondition),..._0x47be3d['description']!==undefined&&{'description':_0x47be3d['description']}};}if('column'in _0x5594f7&&_0x5594f7['type']==='Column'){const _0x4e25fb=_0x5594f7;return{'type':'Column','column':_0x4e25fb['column'],'operator':normalizeOperator(_0x4e25fb[_0x21e642(0x1b5)])};}const _0x5c060d=_0x5594f7;return{'type':_0x21e642(0x1fe),'attribute':_0x5c060d[_0x21e642(0x1e5)],'operator':normalizeOperator(_0x5c060d['operator']),..._0x5c060d['arrayMatching']!==undefined&&{'arrayMatching':_0x5c060d['arrayMatching']},..._0x5c060d[_0x21e642(0x19d)]!==undefined&&{'exclude':_0x5c060d['exclude']},..._0x5c060d[_0x21e642(0x1c6)]!==undefined&&{'aggregation':_0x5c060d['aggregation']},..._0x5c060d[_0x21e642(0x1dd)]!==undefined&&{'source':_0x5c060d['source']},..._0x5c060d['filter']!==undefined&&{'filter':normalizeRule(_0x5c060d[_0x21e642(0x19e)])},..._0x5c060d[_0x21e642(0x1ce)]!==undefined&&{'limit':_0x5c060d['limit']}};}function normalizeOperator(_0x24bd7d){const _0x385dca=a117_0x1c4ad6;if(isBetweenOperator(_0x24bd7d[_0x385dca(0x200)]))return{'type':_0x24bd7d[_0x385dca(0x200)],..._0x24bd7d['not']!==undefined&&{'not':_0x24bd7d[_0x385dca(0x212)]},..._0x24bd7d[_0x385dca(0x226)]!==undefined&&{'min':_0x24bd7d[_0x385dca(0x226)]},..._0x24bd7d[_0x385dca(0x213)]!==undefined&&{'max':_0x24bd7d['max']}};const _0x50dbfc=getEffectiveValue(_0x24bd7d);return{'type':_0x24bd7d['type'],..._0x24bd7d['not']!==undefined&&{'not':_0x24bd7d[_0x385dca(0x212)]},..._0x50dbfc!==undefined&&{'value':_0x50dbfc},..._0x24bd7d['unit']!==undefined&&{'unit':_0x24bd7d['unit']},..._0x24bd7d['duration']!==undefined&&{'duration':_0x24bd7d[_0x385dca(0x1da)]},..._0x24bd7d[_0x385dca(0x1a4)]!==undefined&&{'from':_0x24bd7d['from']}};}function normalizeActivation(_0x301c19){const _0x20dd01=a117_0x1c4ad6;return{'name':_0x301c19[_0x20dd01(0x218)],'connection':_0x301c19[_0x20dd01(0x20d)],..._0x301c19[_0x20dd01(0x1af)]!==undefined&&{'description':_0x301c19[_0x20dd01(0x1af)]},..._0x301c19[_0x20dd01(0x1f5)]!==undefined&&{'all_columns':_0x301c19[_0x20dd01(0x1f5)]},..._0x301c19[_0x20dd01(0x203)]!==undefined&&{'columns':_0x301c19[_0x20dd01(0x203)]},..._0x301c19[_0x20dd01(0x1aa)]!==undefined&&{'behavior':_0x301c19[_0x20dd01(0x1aa)]},..._0x301c19[_0x20dd01(0x1eb)]!==undefined&&{'schedule':_0x301c19['schedule']},..._0x301c19[_0x20dd01(0x1bd)]!==undefined&&{'notification':_0x301c19[_0x20dd01(0x1bd)]},..._0x301c19['connector_config']!==undefined&&{'connector_config':_0x301c19[_0x20dd01(0x217)]},..._0x301c19['activation_template_id']!==undefined&&{'activation_template_id':_0x301c19[_0x20dd01(0x228)]}};}export function activationResponseToDef(_0x1c8338,_0x5ead46,_0x4d2437){const _0x3a466d=a117_0x1c4ad6,_0xfb1c83=_0x1c8338['connectionId']||'',_0x4bb479=_0x4d2437?.['get'](_0xfb1c83)??_0xfb1c83,_0x2c2895={'name':_0x1c8338['name'],'connection':_0x4bb479};_0x1c8338[_0x3a466d(0x1af)]&&(_0x2c2895[_0x3a466d(0x1af)]=_0x1c8338[_0x3a466d(0x1af)]);let _0x5eb64e=[];_0x1c8338[_0x3a466d(0x203)]&&_0x1c8338[_0x3a466d(0x203)][_0x3a466d(0x1e3)]>0x0&&(_0x5eb64e=_0x1c8338[_0x3a466d(0x203)]['filter'](_0x3a0c7f=>_0x3a0c7f&&_0x3a0c7f[_0x3a466d(0x218)])['map'](_0x55aeef=>{const _0x53ebaf=_0x3a466d;if(_0x55aeef[_0x53ebaf(0x200)]||_0x55aeef[_0x53ebaf(0x202)])return{'name':_0x55aeef[_0x53ebaf(0x218)],..._0x55aeef[_0x53ebaf(0x200)]&&{'type':_0x55aeef['type']},..._0x55aeef[_0x53ebaf(0x202)]&&{'visibility':_0x55aeef[_0x53ebaf(0x202)]}};return _0x55aeef['name'];}));_0x5eb64e['length']>0x0&&(_0x2c2895[_0x3a466d(0x203)]=_0x5eb64e);_0x1c8338[_0x3a466d(0x1d9)]!==undefined&&(_0x1c8338[_0x3a466d(0x1d9)]===![]&&_0x5eb64e['length']===0x0?_0x2c2895[_0x3a466d(0x1f5)]=!![]:_0x2c2895[_0x3a466d(0x1f5)]=_0x1c8338[_0x3a466d(0x1d9)]);const _0x4d2bda={};let _0x1ed814=![];_0x1c8338[_0x3a466d(0x1bb)]&&(_0x4d2bda['type']=_0x1c8338[_0x3a466d(0x1bb)],_0x1ed814=!![]);_0x1c8338['repeatUnit']&&(_0x4d2bda[_0x3a466d(0x1a6)]=_0x1c8338[_0x3a466d(0x1e6)],_0x1ed814=!![]);_0x1c8338[_0x3a466d(0x21d)]!==undefined&&_0x1c8338[_0x3a466d(0x21d)]!==null&&(_0x4d2bda[_0x3a466d(0x216)]=_0x1c8338[_0x3a466d(0x21d)],_0x1ed814=!![]);_0x1c8338[_0x3a466d(0x1d7)]&&_0x1c8338[_0x3a466d(0x1d7)][_0x3a466d(0x1e3)]>0x0&&(_0x4d2bda[_0x3a466d(0x220)]=_0x1c8338[_0x3a466d(0x1d7)],_0x1ed814=!![]);_0x1c8338['startAt']!==undefined&&(_0x4d2bda[_0x3a466d(0x1ae)]=_0x1c8338[_0x3a466d(0x1ab)],_0x1ed814=!![]);_0x1c8338[_0x3a466d(0x207)]!==undefined&&(_0x4d2bda[_0x3a466d(0x199)]=_0x1c8338[_0x3a466d(0x207)],_0x1ed814=!![]);_0x1c8338[_0x3a466d(0x219)]&&(_0x4d2bda[_0x3a466d(0x219)]=_0x1c8338[_0x3a466d(0x219)],_0x1ed814=!![]);_0x1ed814&&(_0x2c2895[_0x3a466d(0x1eb)]=_0x4d2bda);(_0x1c8338['notifyOn']&&_0x1c8338[_0x3a466d(0x1a0)][_0x3a466d(0x1e3)]>0x0||_0x1c8338['emailRecipients']&&_0x1c8338[_0x3a466d(0x1f6)]['length']>0x0)&&(_0x2c2895[_0x3a466d(0x1bd)]={},_0x1c8338['notifyOn']&&_0x1c8338[_0x3a466d(0x1a0)][_0x3a466d(0x1e3)]>0x0&&(_0x2c2895[_0x3a466d(0x1bd)][_0x3a466d(0x20e)]=_0x1c8338[_0x3a466d(0x1a0)]),_0x1c8338[_0x3a466d(0x1f6)]&&_0x1c8338[_0x3a466d(0x1f6)][_0x3a466d(0x1e3)]>0x0&&(_0x2c2895[_0x3a466d(0x1bd)][_0x3a466d(0x1f0)]=_0x1c8338[_0x3a466d(0x1f6)][_0x3a466d(0x211)](_0x13c86c=>{const _0x5059e9=_0x3a466d,_0x587558=_0x5ead46?.[_0x5059e9(0x1d2)](_0x13c86c);return _0x587558??String(_0x13c86c);})));_0x1c8338[_0x3a466d(0x1f3)]&&Object[_0x3a466d(0x1f4)](_0x1c8338[_0x3a466d(0x1f3)])[_0x3a466d(0x1e3)]>0x0&&(_0x2c2895[_0x3a466d(0x217)]=normalizeConnectorConfigForYaml(_0x1c8338[_0x3a466d(0x1f3)]));_0x1c8338[_0x3a466d(0x20a)]&&(_0x2c2895[_0x3a466d(0x228)]=_0x1c8338['activationTemplateId']);if(_0x1c8338[_0x3a466d(0x1c3)]){const _0x4a97ea={},_0x56d61d=_0x1c8338[_0x3a466d(0x1c3)];_0x56d61d[_0x3a466d(0x203)]&&_0x56d61d[_0x3a466d(0x203)][_0x3a466d(0x1e3)]>0x0&&(_0x4a97ea['columns']=_0x56d61d[_0x3a466d(0x203)][_0x3a466d(0x19e)](_0x5bb300=>_0x5bb300&&_0x5bb300[_0x3a466d(0x218)])[_0x3a466d(0x211)](_0x13e6a6=>({'name':_0x13e6a6['name'],..._0x13e6a6[_0x3a466d(0x200)]&&{'type':_0x13e6a6[_0x3a466d(0x200)]},..._0x13e6a6[_0x3a466d(0x202)]&&{'visibility':_0x13e6a6[_0x3a466d(0x202)]}}))),_0x56d61d[_0x3a466d(0x1dc)]&&(_0x4a97ea[_0x3a466d(0x225)]=_0x56d61d[_0x3a466d(0x1dc)]),_0x56d61d[_0x3a466d(0x1ec)]!==undefined&&(_0x4a97ea['join_row']=_0x56d61d[_0x3a466d(0x1ec)]),_0x56d61d[_0x3a466d(0x1e1)]&&(_0x4a97ea['join_strategy']=_0x56d61d[_0x3a466d(0x1e1)]),_0x56d61d[_0x3a466d(0x1c7)]&&(_0x4a97ea[_0x3a466d(0x1c7)]=_0x56d61d[_0x3a466d(0x1c7)]),_0x56d61d[_0x3a466d(0x21c)]&&_0x56d61d['orderBy'][_0x3a466d(0x1e3)]>0x0&&(_0x4a97ea[_0x3a466d(0x1e9)]=_0x56d61d['orderBy']),Object[_0x3a466d(0x1f4)](_0x4a97ea)[_0x3a466d(0x1e3)]>0x0&&(_0x2c2895[_0x3a466d(0x1aa)]=_0x4a97ea);}return _0x2c2895;}export function journeyActivationStepToYaml(_0x42692e,_0x29f4bb,_0xd4e0ba){const _0x496844=a117_0x1c4ad6,_0x558080=_0x42692e[_0x496844(0x222)]['activationParams'],_0x5b6673=_0x558080[_0x496844(0x1c2)]||'',_0x443754=_0xd4e0ba?.[_0x496844(0x1d2)](_0x5b6673)??_0x5b6673,_0x2f74ba={'name':_0x558080[_0x496844(0x218)]||'','connection':_0x443754};_0x42692e['attributes'][_0x496844(0x21b)]&&(_0x2f74ba[_0x496844(0x21a)]=!![]);_0x558080['description']&&(_0x2f74ba['description']=_0x558080[_0x496844(0x1af)]);let _0x24ac1f=[];_0x558080[_0x496844(0x203)]&&_0x558080[_0x496844(0x203)][_0x496844(0x1e3)]>0x0&&(_0x24ac1f=_0x558080[_0x496844(0x203)][_0x496844(0x19e)](_0x412645=>_0x412645&&_0x412645[_0x496844(0x218)])[_0x496844(0x211)](_0x26ff64=>{const _0x53834c=_0x496844;if(_0x26ff64[_0x53834c(0x200)]||_0x26ff64[_0x53834c(0x202)])return{'name':_0x26ff64[_0x53834c(0x218)],..._0x26ff64[_0x53834c(0x200)]&&{'type':_0x26ff64['type']},..._0x26ff64[_0x53834c(0x202)]&&{'visibility':_0x26ff64[_0x53834c(0x202)]}};return _0x26ff64[_0x53834c(0x218)];}));_0x24ac1f[_0x496844(0x1e3)]>0x0&&(_0x2f74ba[_0x496844(0x203)]=_0x24ac1f);_0x558080[_0x496844(0x1d9)]!==undefined&&(_0x558080[_0x496844(0x1d9)]===![]&&_0x24ac1f[_0x496844(0x1e3)]===0x0?_0x2f74ba[_0x496844(0x1f5)]=!![]:_0x2f74ba[_0x496844(0x1f5)]=_0x558080[_0x496844(0x1d9)]);const _0x65c00a={};let _0x2cd500=![];_0x558080[_0x496844(0x1bb)]&&(_0x65c00a[_0x496844(0x200)]=_0x558080[_0x496844(0x1bb)],_0x2cd500=!![]);_0x558080['repeatUnit']&&(_0x65c00a[_0x496844(0x1a6)]=_0x558080[_0x496844(0x1e6)],_0x2cd500=!![]);_0x558080[_0x496844(0x21d)]!==undefined&&_0x558080['repeatFrequency']!==null&&(_0x65c00a[_0x496844(0x216)]=_0x558080[_0x496844(0x21d)],_0x2cd500=!![]);_0x558080['startAt']!==undefined&&(_0x65c00a[_0x496844(0x1ae)]=_0x558080[_0x496844(0x1ab)],_0x2cd500=!![]);_0x558080['endOn']!==undefined&&(_0x65c00a[_0x496844(0x199)]=_0x558080[_0x496844(0x207)],_0x2cd500=!![]);_0x558080['timezone']&&(_0x65c00a[_0x496844(0x219)]=_0x558080['timezone'],_0x2cd500=!![]);_0x2cd500&&(_0x2f74ba[_0x496844(0x1eb)]=_0x65c00a);(_0x558080[_0x496844(0x1a0)]&&_0x558080[_0x496844(0x1a0)][_0x496844(0x1e3)]>0x0||_0x558080[_0x496844(0x1f6)]&&_0x558080[_0x496844(0x1f6)]['length']>0x0)&&(_0x2f74ba[_0x496844(0x1bd)]={},_0x558080[_0x496844(0x1a0)]&&_0x558080[_0x496844(0x1a0)][_0x496844(0x1e3)]>0x0&&(_0x2f74ba['notification'][_0x496844(0x20e)]=_0x558080[_0x496844(0x1a0)]),_0x558080['emailRecipients']&&_0x558080[_0x496844(0x1f6)][_0x496844(0x1e3)]>0x0&&(_0x2f74ba[_0x496844(0x1bd)][_0x496844(0x1f0)]=_0x558080[_0x496844(0x1f6)][_0x496844(0x211)](_0x141d99=>{const _0x5e9d33=_0x496844,_0x29d990=_0x29f4bb?.[_0x5e9d33(0x1d2)](_0x141d99);return _0x29d990??String(_0x141d99);})));_0x558080['connectorConfig']&&Object[_0x496844(0x1f4)](_0x558080[_0x496844(0x1f3)])['length']>0x0&&(_0x2f74ba[_0x496844(0x217)]=normalizeConnectorConfigForYaml(_0x558080[_0x496844(0x1f3)]));_0x558080['activationTemplateId']&&(_0x2f74ba[_0x496844(0x228)]=_0x558080['activationTemplateId']);if(_0x558080[_0x496844(0x1c3)]){const _0x3d5bce={},_0x53c7a2=_0x558080[_0x496844(0x1c3)];_0x53c7a2[_0x496844(0x203)]&&_0x53c7a2[_0x496844(0x203)][_0x496844(0x1e3)]>0x0&&(_0x3d5bce[_0x496844(0x203)]=_0x53c7a2[_0x496844(0x203)][_0x496844(0x19e)](_0x428084=>_0x428084&&_0x428084[_0x496844(0x218)])[_0x496844(0x211)](_0x42ae92=>({'name':_0x42ae92['name'],..._0x42ae92[_0x496844(0x200)]&&{'type':_0x42ae92[_0x496844(0x200)]},..._0x42ae92[_0x496844(0x202)]&&{'visibility':_0x42ae92['visibility']}}))),_0x53c7a2[_0x496844(0x1dc)]&&(_0x3d5bce['behavior_table']=_0x53c7a2['behaviorTableName']),_0x53c7a2[_0x496844(0x1ec)]!==undefined&&(_0x3d5bce[_0x496844(0x1c5)]=_0x53c7a2[_0x496844(0x1ec)]),_0x53c7a2[_0x496844(0x1e1)]&&(_0x3d5bce[_0x496844(0x20b)]=_0x53c7a2['joinStrategy']),_0x53c7a2[_0x496844(0x1c7)]&&(_0x3d5bce[_0x496844(0x1c7)]=_0x53c7a2[_0x496844(0x1c7)]),_0x53c7a2[_0x496844(0x21c)]&&_0x53c7a2[_0x496844(0x21c)][_0x496844(0x1e3)]>0x0&&(_0x3d5bce[_0x496844(0x1e9)]=_0x53c7a2['orderBy']),Object['keys'](_0x3d5bce)['length']>0x0&&(_0x2f74ba[_0x496844(0x1aa)]=_0x3d5bce);}return _0x2f74ba;}export function segmentWithActivationsToYaml(_0xe70bc4,_0x1364e3,_0x9023f9,_0x5a80b1,_0x3522d9){const _0x511ebd=a117_0x1c4ad6,_0x356b95=segmentResponseToDefSync(_0xe70bc4,_0x9023f9);return _0x1364e3[_0x511ebd(0x1e3)]>0x0&&(_0x356b95['activations']=_0x1364e3[_0x511ebd(0x211)](_0x534be3=>activationResponseToDef(_0x534be3,_0x5a80b1,_0x3522d9))),_0x356b95;}function normalizeColumn(_0x4d0536){const _0x3bc575=a117_0x1c4ad6;if(typeof _0x4d0536===_0x3bc575(0x1d8))return{'name':_0x4d0536};return{'name':_0x4d0536[_0x3bc575(0x218)],..._0x4d0536[_0x3bc575(0x200)]&&{'type':_0x4d0536[_0x3bc575(0x200)]},..._0x4d0536[_0x3bc575(0x202)]&&{'visibility':_0x4d0536[_0x3bc575(0x202)]}};}export async function activationDefToCreateRequest(_0x59840a,_0x3c8852){const _0x4f5593=a117_0x1c4ad6,_0x8eca4d=_0x3c8852?.[_0x4f5593(0x1fb)],_0x1ba306=_0x3c8852?.['connectionNameToIdMap'],_0xdeb9ee=_0x59840a['connection'];let _0x2469dc;const _0x4f1061=parseInt(_0xdeb9ee,0xa);if(!isNaN(_0x4f1061)&&String(_0x4f1061)===_0xdeb9ee)_0x2469dc=_0x4f1061;else{const _0x355a14=_0x1ba306?.['get'](_0xdeb9ee);if(_0x355a14===undefined)throw new SDKError(ErrorCode[_0x4f5593(0x210)],'Unknown\x20connection:\x20'+_0xdeb9ee,undefined,{'helpText':'Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections'});_0x2469dc=_0x355a14;}const _0x4c47a9={'name':_0x59840a[_0x4f5593(0x218)],'connectionId':_0x2469dc};_0x59840a[_0x4f5593(0x1af)]&&(_0x4c47a9['description']=_0x59840a[_0x4f5593(0x1af)]);let _0x2de1f1=[];_0x59840a[_0x4f5593(0x203)]&&_0x59840a[_0x4f5593(0x203)]['length']>0x0&&(_0x2de1f1=_0x59840a[_0x4f5593(0x203)][_0x4f5593(0x19e)](_0x13a5e0=>_0x13a5e0!=null)[_0x4f5593(0x211)](normalizeColumn));_0x2de1f1[_0x4f5593(0x1e3)]>0x0&&(_0x4c47a9[_0x4f5593(0x203)]=_0x2de1f1);_0x59840a[_0x4f5593(0x1f5)]!==undefined&&(_0x59840a[_0x4f5593(0x1f5)]===![]&&_0x2de1f1[_0x4f5593(0x1e3)]===0x0?_0x4c47a9['allColumns']=!![]:_0x4c47a9[_0x4f5593(0x1d9)]=_0x59840a[_0x4f5593(0x1f5)]);if(_0x59840a[_0x4f5593(0x1eb)]){const _0x43017c=_0x59840a[_0x4f5593(0x1eb)];_0x43017c[_0x4f5593(0x200)]&&(_0x4c47a9['scheduleType']=_0x43017c['type']),_0x43017c[_0x4f5593(0x1a6)]&&(_0x4c47a9[_0x4f5593(0x1e6)]=_0x43017c[_0x4f5593(0x1a6)]),_0x43017c[_0x4f5593(0x216)]!==undefined&&(_0x4c47a9[_0x4f5593(0x21d)]=_0x43017c['repeat_frequency']),_0x43017c[_0x4f5593(0x220)]&&(_0x4c47a9[_0x4f5593(0x1d7)]=_0x43017c[_0x4f5593(0x220)]),_0x43017c[_0x4f5593(0x1ae)]!==undefined&&(_0x4c47a9[_0x4f5593(0x1ab)]=_0x43017c['start_at']),_0x43017c[_0x4f5593(0x199)]!==undefined&&(_0x4c47a9[_0x4f5593(0x207)]=_0x43017c[_0x4f5593(0x199)]),_0x43017c[_0x4f5593(0x219)]&&(_0x4c47a9[_0x4f5593(0x219)]=_0x43017c[_0x4f5593(0x219)]);}_0x59840a['notification']&&(_0x59840a[_0x4f5593(0x1bd)][_0x4f5593(0x20e)]&&(_0x4c47a9[_0x4f5593(0x1a0)]=_0x59840a[_0x4f5593(0x1bd)][_0x4f5593(0x20e)]),_0x59840a[_0x4f5593(0x1bd)][_0x4f5593(0x1f0)]&&(_0x4c47a9[_0x4f5593(0x1f6)]=_0x59840a[_0x4f5593(0x1bd)][_0x4f5593(0x1f0)][_0x4f5593(0x211)](_0x274a77=>{const _0xa48d62=_0x4f5593,_0x418463=Number(_0x274a77);if(!isNaN(_0x418463)&&String(_0x418463)===_0x274a77)return _0x418463;const _0x52707e=_0x8eca4d?.[_0xa48d62(0x1d2)](_0x274a77[_0xa48d62(0x1e2)]());if(_0x52707e===undefined)throw new SDKError(ErrorCode[_0xa48d62(0x1d4)],'Unknown\x20email\x20recipient:\x20'+_0x274a77+_0xa48d62(0x197));return _0x52707e;})));if(_0x59840a[_0x4f5593(0x217)]){const _0x291c0f=_0x3c8852?.[_0x4f5593(0x1ca)]?.[_0x4f5593(0x1d2)](_0xdeb9ee);if(_0x291c0f&&_0x3c8852?.['getSchema'])try{const _0x70faa8=await _0x3c8852[_0x4f5593(0x214)](_0x291c0f),_0xb8f342=validateConnectorConfig(_0x59840a[_0x4f5593(0x217)],_0x70faa8);if(!_0xb8f342[_0x4f5593(0x1d1)])throw new SDKError(ErrorCode[_0x4f5593(0x227)],_0x4f5593(0x1ee)+_0x59840a[_0x4f5593(0x218)]+_0x4f5593(0x208)+formatValidationErrors(_0xb8f342['errors']),undefined,{'helpText':'Connector:\x20'+_0x291c0f+'\x0a\x0aAvailable\x20fields:\x0a'+formatSchemaAsHelp(_0x70faa8)});if(_0xb8f342[_0x4f5593(0x221)][_0x4f5593(0x1e3)]>0x0){const _0x2b5770=formatValidationWarnings(_0xb8f342['warnings']);console['warn'](_0x4f5593(0x1fc)+_0x59840a[_0x4f5593(0x218)]+'\x22:\x0a'+_0x2b5770);}_0x4c47a9[_0x4f5593(0x1f3)]=transformConfigToLegacy(_0x59840a[_0x4f5593(0x217)],_0x70faa8);}catch(_0x33d60e){if(_0x33d60e instanceof SDKError&&_0x33d60e[_0x4f5593(0x1c4)]===ErrorCode['CONNECTOR_SCHEMA_NOT_FOUND'])_0x4c47a9[_0x4f5593(0x1f3)]=_0x59840a['connector_config'];else throw _0x33d60e;}else _0x4c47a9['connectorConfig']=_0x59840a[_0x4f5593(0x217)];}_0x59840a[_0x4f5593(0x228)]!==undefined&&(_0x4c47a9['activationTemplateId']=_0x59840a[_0x4f5593(0x228)]);if(_0x59840a[_0x4f5593(0x1aa)]){const _0x51df07=_0x59840a[_0x4f5593(0x1aa)],_0x7180c2={};if(_0x51df07[_0x4f5593(0x203)]&&_0x51df07[_0x4f5593(0x203)][_0x4f5593(0x1e3)]>0x0){const _0x1f9510=_0x51df07['columns'][_0x4f5593(0x19e)](_0x168ffa=>_0x168ffa&&_0x168ffa['name']);_0x1f9510[_0x4f5593(0x1e3)]>0x0&&(_0x7180c2[_0x4f5593(0x203)]=_0x1f9510);}_0x51df07[_0x4f5593(0x225)]&&(_0x7180c2[_0x4f5593(0x1dc)]=_0x51df07['behavior_table']),_0x51df07[_0x4f5593(0x1c5)]!==undefined&&(_0x7180c2[_0x4f5593(0x1ec)]=_0x51df07['join_row']),_0x51df07[_0x4f5593(0x20b)]&&(_0x7180c2[_0x4f5593(0x1e1)]=_0x51df07['join_strategy']),_0x51df07['formatting']&&(_0x7180c2[_0x4f5593(0x1c7)]=_0x51df07['formatting']),_0x51df07[_0x4f5593(0x1e9)]&&(_0x7180c2[_0x4f5593(0x21c)]=_0x51df07['order_by']),_0x4c47a9[_0x4f5593(0x1c3)]=_0x7180c2;}return _0x4c47a9;}export async function activationDefToUpdateRequest(_0x4d4333,_0x191df6){return activationDefToCreateRequest(_0x4d4333,_0x191df6);}export function deepSortObject(_0x13541e){const _0x1e2202=a117_0x1c4ad6;if(_0x13541e===null||typeof _0x13541e!=='object')return _0x13541e;if(Array['isArray'](_0x13541e))return _0x13541e[_0x1e2202(0x211)](deepSortObject)['sort']((_0x2f850b,_0xd3c6b0)=>JSON['stringify'](_0x2f850b)[_0x1e2202(0x1b7)](JSON[_0x1e2202(0x1ea)](_0xd3c6b0)));const _0x5bf157={};for(const _0x31e4e9 of Object[_0x1e2202(0x1f4)](_0x13541e)[_0x1e2202(0x19f)]()){_0x5bf157[_0x31e4e9]=deepSortObject(_0x13541e[_0x31e4e9]);}return _0x5bf157;}export function serializeRule(_0x1f3b54){const _0x53d568=a117_0x1c4ad6;return JSON[_0x53d568(0x1ea)](deepSortObject(_0x1f3b54));}export function normalizeRuleForMatching(_0x4b0f7e){return normalizeConditionsForMatching(_0x4b0f7e);}function a117_0x3bc9(_0x4adbf0,_0x48e6be){_0x4adbf0=_0x4adbf0-0x192;const _0x2a528f=a117_0x2a52();let _0x3bc9a5=_0x2a528f[_0x4adbf0];return _0x3bc9a5;}function normalizeConditionsForMatching(_0x3425f9){const _0x8be55d=a117_0x1c4ad6;if(_0x3425f9===null||typeof _0x3425f9!==_0x8be55d(0x1a8))return _0x3425f9;if(Array['isArray'](_0x3425f9))return _0x3425f9[_0x8be55d(0x211)](normalizeConditionsForMatching);const _0x1f1928=_0x3425f9;if((_0x1f1928[_0x8be55d(0x200)]===_0x8be55d(0x196)||_0x1f1928[_0x8be55d(0x200)]===_0x8be55d(0x19d))&&typeof _0x1f1928[_0x8be55d(0x19a)]==='string')return{..._0x1f1928,'segment':_0x8be55d(0x1d6)};const _0x23c58f={};for(const _0x5c4aaa of Object[_0x8be55d(0x1f4)](_0x1f1928)){_0x23c58f[_0x5c4aaa]=normalizeConditionsForMatching(_0x1f1928[_0x5c4aaa]);}return _0x23c58f;}export function serializeRuleForMatching(_0x16f13c){const _0xac062e=a117_0x1c4ad6;return JSON[_0xac062e(0x1ea)](deepSortObject(normalizeRuleForMatching(_0x16f13c)));}export function expandSegmentReferences(_0x268f2a,_0x1c9bc3,_0x2f70eb=new Set()){return expandConditions(_0x268f2a,_0x1c9bc3,_0x2f70eb);}function expandConditions(_0x3ec86f,_0x483d80,_0x139f2a){const _0x596202=a117_0x1c4ad6;if(_0x3ec86f===null||typeof _0x3ec86f!==_0x596202(0x1a8))return _0x3ec86f;if(Array[_0x596202(0x21f)](_0x3ec86f))return _0x3ec86f[_0x596202(0x211)](_0x4ca5e0=>expandConditions(_0x4ca5e0,_0x483d80,_0x139f2a));const _0x18ae90=_0x3ec86f;if((_0x18ae90[_0x596202(0x200)]===_0x596202(0x196)||_0x18ae90[_0x596202(0x200)]==='exclude')&&typeof _0x18ae90[_0x596202(0x19a)]==='string'){const _0x12d8c1=_0x18ae90[_0x596202(0x19a)],_0x3e12ea=_0x483d80[_0x596202(0x1d2)](_0x12d8c1);if(_0x3e12ea&&!_0x139f2a['has'](_0x12d8c1)){const _0x50f66c=new Set(_0x139f2a);_0x50f66c[_0x596202(0x215)](_0x12d8c1);const _0x1bad1b=expandConditions(_0x3e12ea,_0x483d80,_0x50f66c);return{'type':_0x18ae90[_0x596202(0x200)],'expanded_rule':_0x1bad1b};}return{'type':_0x18ae90[_0x596202(0x200)],'expanded_rule':_0x596202(0x1f2)};}const _0x59bc1b={};for(const _0x3f42d2 of Object['keys'](_0x18ae90)){_0x59bc1b[_0x3f42d2]=expandConditions(_0x18ae90[_0x3f42d2],_0x483d80,_0x139f2a);}return _0x59bc1b;}export function serializeExpandedRule(_0x161abf,_0x385384){const _0x33bcb7=a117_0x1c4ad6,_0x2fd925=expandSegmentReferences(_0x161abf,_0x385384);return JSON[_0x33bcb7(0x1ea)](deepSortObject(_0x2fd925));}export function createSegmentNameContext(_0x12c550){const _0x1549e0=a117_0x1c4ad6,_0x1495f1=new Set(),_0x36ba13=new Map(),_0x2a4d4b=new Map();if(_0x12c550)for(const [_0x145920,_0x353579]of Object[_0x1549e0(0x1e8)](_0x12c550)){if(_0x353579[_0x1549e0(0x1a1)]){const _0x75cb26=serializeRule(_0x353579['rule']);_0x2a4d4b[_0x1549e0(0x1b0)](_0x75cb26,_0x145920),_0x1495f1['add'](_0x145920);}}return{'usedNames':_0x1495f1,'ruleHashToName':_0x36ba13,'localRuleToName':_0x12c550?_0x2a4d4b:undefined};}export function resolveSegmentName(_0x61eb84,_0x43b61b,_0x368abb,_0x205347){const _0x57f662=a117_0x1c4ad6,_0x119151=serializeRule(_0x43b61b);if(_0x368abb[_0x57f662(0x223)]){const _0x4f7eaa=_0x368abb['localRuleToName']['get'](_0x119151);if(_0x4f7eaa)return{'name':_0x4f7eaa,'isDuplicate':![],'isLocalMatch':!![]};}const _0x2c7f93=_0x368abb['ruleHashToName']['get'](_0x119151);if(_0x2c7f93)return{'name':_0x2c7f93,'isDuplicate':!![],'isLocalMatch':![]};const _0x2d5b78=_0x205347(_0x61eb84);let _0x2ffaf2=_0x2d5b78||_0x61eb84,_0x30063e=_0x2ffaf2,_0x4dc246=0x2;while(_0x368abb['usedNames'][_0x57f662(0x1ff)](_0x30063e)){_0x30063e=_0x2ffaf2+'_'+_0x4dc246,_0x4dc246++;}return _0x368abb['usedNames'][_0x57f662(0x215)](_0x30063e),_0x368abb[_0x57f662(0x224)][_0x57f662(0x1b0)](_0x119151,_0x30063e),{'name':_0x30063e,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x20ef05){const _0x46c51c=[],_0x469f27=_0x257617=>{const _0x462a01=a117_0x3bc9;if(!_0x257617||typeof _0x257617!=='object')return;if(Array[_0x462a01(0x21f)](_0x257617)){_0x257617[_0x462a01(0x194)](_0x469f27);return;}const _0x3b09a1=_0x257617;(_0x3b09a1[_0x462a01(0x200)]===_0x462a01(0x196)||_0x3b09a1[_0x462a01(0x200)]===_0x462a01(0x19d))&&typeof _0x3b09a1['segment']===_0x462a01(0x1d8)&&_0x46c51c['push'](_0x3b09a1[_0x462a01(0x19a)]);for(const _0x4816b9 of Object[_0x462a01(0x1f1)](_0x3b09a1)){_0x469f27(_0x4816b9);}};return _0x469f27(_0x20ef05),_0x46c51c;}export function validateSegmentRule(_0x191bf6,_0x200ba9){const _0x325fad=a117_0x1c4ad6;if(!_0x200ba9||!_0x200ba9[_0x325fad(0x1be)])return;for(let _0x2b9fda=0x0;_0x2b9fda<_0x200ba9['conditions'][_0x325fad(0x1e3)];_0x2b9fda++){const _0x5c305c=_0x200ba9[_0x325fad(0x1be)][_0x2b9fda];if(_0x325fad(0x200)in _0x5c305c&&_0x5c305c[_0x325fad(0x200)]===_0x325fad(0x1fe)){const _0x1c423f=_0x5c305c,_0x47ce1d=_0x1c423f[_0x325fad(0x1dd)]||_0x1c423f[_0x325fad(0x1c6)];if((!_0x1c423f['attribute']||_0x1c423f[_0x325fad(0x1e5)]==='')&&!_0x47ce1d)throw new SDKError(ErrorCode[_0x325fad(0x1ef)],'Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27'+_0x191bf6+_0x325fad(0x1b6)+(_0x325fad(0x1c1)+_0x2b9fda+_0x325fad(0x1cf))+_0x325fad(0x201));}}}
|
|
1
|
+
(function(_0x8282e4,_0x1a4505){const _0x31e067=a117_0x49ad,_0x3fddec=_0x8282e4();while(!![]){try{const _0x5659cf=parseInt(_0x31e067(0x10e))/0x1+parseInt(_0x31e067(0xfc))/0x2+parseInt(_0x31e067(0xb8))/0x3+-parseInt(_0x31e067(0xaa))/0x4+parseInt(_0x31e067(0xa8))/0x5*(parseInt(_0x31e067(0xdf))/0x6)+parseInt(_0x31e067(0xde))/0x7+-parseInt(_0x31e067(0xf7))/0x8;if(_0x5659cf===_0x1a4505)break;else _0x3fddec['push'](_0x3fddec['shift']());}catch(_0x5a1c6a){_0x3fddec['push'](_0x3fddec['shift']());}}}(a117_0x45c5,0x3c4e2));import*as a117_0x54649c from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';export function segmentResponseToDefSync(_0x575497,_0x427032){const _0x20d63d=a117_0x49ad,_0x1e52d3=_0x575497[_0x20d63d(0x104)]&&_0x20d63d(0xeb)in _0x575497[_0x20d63d(0x104)]&&_0x575497['rule']['type'];return{'type':'segment','name':_0x575497[_0x20d63d(0xd0)],..._0x575497[_0x20d63d(0xb1)]&&{'description':_0x575497[_0x20d63d(0xb1)]},..._0x427032&&{'folder':_0x427032},..._0x1e52d3&&{'rule':apiRuleToYaml(_0x575497[_0x20d63d(0x104)])},..._0x575497[_0x20d63d(0x93)]!==undefined&&{'kind':_0x575497['kind']===0x0?'batch':_0x575497['kind']===0x1?_0x20d63d(0xbd):_0x20d63d(0xa9)},..._0x575497[_0x20d63d(0x10a)]!==undefined&&{'visible':_0x575497[_0x20d63d(0x10a)]}};}export async function segmentResponseToDef(_0x3ffc05,_0x5c0ffc,_0x5de8f5){const _0x1279f4=a117_0x49ad,_0x3e8fc0=segmentResponseToDefSync(_0x3ffc05,_0x5de8f5);if(!_0x5c0ffc||!_0x5c0ffc['resolveSegmentName'])return _0x3e8fc0;return _0x3e8fc0[_0x1279f4(0x104)]&&(_0x3e8fc0[_0x1279f4(0x104)]=await resolveRuleSegmentRefs(_0x3e8fc0[_0x1279f4(0x104)],_0x5c0ffc[_0x1279f4(0x9e)])),_0x3e8fc0;}export function apiRuleToYaml(_0x113c5e){const _0x58e7af=a117_0x49ad,_0xdd8eb9=(_0x113c5e['conditions']||[])[_0x58e7af(0xfb)](apiConditionToYaml);if(_0xdd8eb9[_0x58e7af(0xb0)]===0x1&&!_0x113c5e['description']&&_0x58e7af(0xeb)in _0xdd8eb9[0x0]&&(_0xdd8eb9[0x0][_0x58e7af(0xeb)]===_0x58e7af(0xd8)||_0xdd8eb9[0x0]['type']==='Or')){const _0x25880c=_0xdd8eb9[0x0];if(_0x25880c['type']===_0x113c5e[_0x58e7af(0xeb)]&&_0x25880c[_0x58e7af(0xbe)])return{'type':_0x113c5e[_0x58e7af(0xeb)],'conditions':_0x25880c[_0x58e7af(0xbe)],..._0x25880c['description']&&{'description':_0x25880c['description']}};}return{'type':_0x113c5e[_0x58e7af(0xeb)],'conditions':_0xdd8eb9,..._0x113c5e[_0x58e7af(0xb1)]&&{'description':_0x113c5e[_0x58e7af(0xb1)]}};}export async function resolveRuleSegmentRefs(_0x581276,_0x584d8c){return transformRuleSegmentRefs(_0x581276,_0x584d8c,_0x144d69=>/^\d+$/['test'](_0x144d69));}async function transformConditionSegmentRefs(_0xfd4697,_0x32690e,_0x40b9d4,_0x6b463b){const _0x11030a=a117_0x49ad;if(_0x11030a(0xc1)in _0xfd4697&&(_0xfd4697[_0x11030a(0xeb)]===_0x11030a(0x106)||_0xfd4697[_0x11030a(0xeb)]===_0x11030a(0xf2))){const _0x484063=_0xfd4697;if(_0x40b9d4(_0x484063['segment']))return{..._0x484063,'segment':await _0x32690e(_0x484063['segment'])};return _0xfd4697;}if(_0x11030a(0xbe)in _0xfd4697&&_0xfd4697['conditions']){const _0x46b9e5=_0xfd4697,_0x55f390=await Promise['all'](_0x46b9e5[_0x11030a(0xbe)][_0x11030a(0xfb)](_0x7557d6=>transformConditionSegmentRefs(_0x7557d6,_0x32690e,_0x40b9d4,_0x6b463b)));return{..._0x46b9e5,'conditions':_0x55f390};}if(_0x11030a(0xf0)in _0xfd4697&&_0xfd4697[_0x11030a(0xf0)]){const _0x109542=_0xfd4697,_0x1f46b7=await _0x6b463b(_0x109542[_0x11030a(0xf0)],_0x32690e);return{..._0x109542,'filter':_0x1f46b7};}return _0xfd4697;}async function transformRuleSegmentRefs(_0xd3ec2e,_0x10bb44,_0x4446b6){const _0xa7dd45=a117_0x49ad,_0x1e17d4=(_0x5c4032,_0x4d9d05)=>transformRuleSegmentRefs(_0x5c4032,_0x4d9d05,_0x4446b6),_0xe98fef=await Promise[_0xa7dd45(0x98)](_0xd3ec2e[_0xa7dd45(0xbe)][_0xa7dd45(0xfb)](_0x12f854=>transformConditionSegmentRefs(_0x12f854,_0x10bb44,_0x4446b6,_0x1e17d4)));return{..._0xd3ec2e,'conditions':_0xe98fef};}export async function resolveRuleSegmentIds(_0x20f509,_0x4fe151){return transformRuleSegmentRefs(_0x20f509,_0x4fe151,_0x2e8b41=>!/^\d+$/['test'](_0x2e8b41));}function apiConditionToYaml(_0x4815b6){const _0x41c826=a117_0x49ad;if(_0x4815b6['type']===_0x41c826(0xd8)||_0x4815b6['type']==='Or'){if(_0x4815b6[_0x41c826(0xbe)]){const _0x1c99e2=_0x4815b6['conditions']['map'](apiConditionToYaml);if(_0x1c99e2[_0x41c826(0xb0)]===0x1&&!_0x4815b6[_0x41c826(0xb1)])return _0x1c99e2[0x0];return{'type':_0x4815b6[_0x41c826(0xeb)],'conditions':_0x1c99e2,..._0x4815b6[_0x41c826(0xb1)]&&{'description':_0x4815b6[_0x41c826(0xb1)]}};}}if(_0x4815b6['type']===_0x41c826(0x84)&&_0x4815b6[_0x41c826(0xc3)]&&_0x4815b6[_0x41c826(0xb2)]){const _0x2f74cf=_0x4815b6[_0x41c826(0xc3)][_0x41c826(0xd1)]?{'type':_0x4815b6[_0x41c826(0xc3)][_0x41c826(0xd1)][_0x41c826(0xeb)],..._0x4815b6[_0x41c826(0xc3)][_0x41c826(0xd1)]['groupingColumns']&&{'groupingColumns':_0x4815b6['leftValue'][_0x41c826(0xd1)][_0x41c826(0x8e)]}}:undefined;return{'type':_0x41c826(0x84),'attribute':_0x4815b6[_0x41c826(0xc3)]['name']||'','operator':apiOperatorToYaml(_0x4815b6['operator']),..._0x4815b6[_0x41c826(0x115)]&&_0x4815b6[_0x41c826(0x115)]!==_0x41c826(0xe9)?{'arrayMatching':_0x4815b6[_0x41c826(0x115)]}:{},..._0x4815b6[_0x41c826(0xf2)]?{'exclude':_0x4815b6[_0x41c826(0xf2)]}:{},..._0x2f74cf?{'aggregation':_0x2f74cf}:{},..._0x4815b6['leftValue'][_0x41c826(0x87)]?{'source':_0x4815b6[_0x41c826(0xc3)][_0x41c826(0x87)][_0x41c826(0xd0)]}:{},..._0x4815b6['leftValue'][_0x41c826(0xf0)]?{'filter':apiRuleToYaml(_0x4815b6[_0x41c826(0xc3)]['filter'])}:{},..._0x4815b6[_0x41c826(0xab)]!==undefined&&_0x4815b6[_0x41c826(0xab)]!==null?{'limit':_0x4815b6[_0x41c826(0xab)]}:{}};}if(_0x4815b6[_0x41c826(0xeb)]==='Column'&&_0x4815b6[_0x41c826(0xff)]&&_0x4815b6[_0x41c826(0xb2)])return{'type':_0x41c826(0xf1),'column':_0x4815b6[_0x41c826(0xff)],'operator':apiOperatorToYaml(_0x4815b6[_0x41c826(0xb2)])};if(_0x4815b6[_0x41c826(0xeb)]===_0x41c826(0x8b)&&_0x4815b6['id'])return{'type':_0x4815b6[_0x41c826(0xf2)]?_0x41c826(0xf2):_0x41c826(0x106),'segment':_0x4815b6['id']};return{'type':'And','conditions':[]};}function isTemporalOperator(_0x27a6b9){const _0x38b320=a117_0x49ad;return _0x27a6b9==='TimeWithinPast'||_0x27a6b9===_0x38b320(0x90);}function isBetweenOperator(_0x559d0c){const _0x103062=a117_0x49ad;return _0x559d0c===_0x103062(0xee);}function getEffectiveValue(_0x2db6e7){const _0x4c5431=a117_0x49ad,_0x2f5687=_0x2db6e7[_0x4c5431(0x8a)];return _0x2db6e7[_0x4c5431(0xcf)]??_0x2f5687;}function parseNumericValue(_0x56f804){const _0x5db9d0=a117_0x49ad;if(typeof _0x56f804===_0x5db9d0(0x85)&&_0x56f804!==null)return _0x56f804;if(_0x56f804==='')return _0x56f804;const _0x33d2ff=Number(_0x56f804);return Number[_0x5db9d0(0xa0)](_0x33d2ff)?_0x33d2ff:_0x56f804;}function apiOperatorToYaml(_0x26ce1f){const _0x28cf89=a117_0x49ad;if(isBetweenOperator(_0x26ce1f[_0x28cf89(0xeb)]))return{'type':mapApiOperatorType(_0x26ce1f['type']),..._0x26ce1f[_0x28cf89(0x8c)]!==undefined&&{'not':_0x26ce1f[_0x28cf89(0x8c)]},..._0x26ce1f[_0x28cf89(0x113)]!==undefined&&{'min':parseNumericValue(_0x26ce1f[_0x28cf89(0x113)])},..._0x26ce1f[_0x28cf89(0xd7)]!==undefined&&{'max':parseNumericValue(_0x26ce1f[_0x28cf89(0xd7)])}};let _0x2738dd;if(_0x26ce1f[_0x28cf89(0x82)]&&_0x26ce1f[_0x28cf89(0x82)]['length']>0x0)_0x2738dd=_0x26ce1f[_0x28cf89(0x82)];else{if(_0x26ce1f[_0x28cf89(0xb4)]!==undefined)_0x2738dd=_0x26ce1f[_0x28cf89(0xb4)];else isTemporalOperator(_0x26ce1f[_0x28cf89(0xeb)])&&_0x26ce1f[_0x28cf89(0xcf)]!==undefined&&(_0x2738dd=_0x26ce1f['value']);}return{'type':mapApiOperatorType(_0x26ce1f['type']),..._0x26ce1f[_0x28cf89(0x8c)]!==undefined&&{'not':_0x26ce1f[_0x28cf89(0x8c)]},..._0x2738dd!==undefined&&{'value':_0x2738dd},..._0x26ce1f['unit']!==undefined&&{'unit':_0x26ce1f[_0x28cf89(0xb3)]}};}function mapApiOperatorType(_0x16ffff){return _0x16ffff;}export function segmentDefToCreateRequest(_0x2ea8c6,_0x2783aa){const _0x561e61=a117_0x49ad,_0x38090a={'name':_0x2ea8c6['name']};return _0x2ea8c6[_0x561e61(0xb1)]&&(_0x38090a[_0x561e61(0xb1)]=_0x2ea8c6['description']),_0x2ea8c6['rule']&&(_0x38090a[_0x561e61(0x104)]=yamlRuleToApi(_0x2ea8c6[_0x561e61(0x104)])),_0x2ea8c6['kind']&&(_0x38090a[_0x561e61(0x93)]=_0x2ea8c6[_0x561e61(0x93)]===_0x561e61(0xec)?0x0:_0x2ea8c6[_0x561e61(0x93)]===_0x561e61(0xbd)?0x1:0x2),_0x2ea8c6[_0x561e61(0xd3)]!==undefined&&(_0x38090a[_0x561e61(0x10a)]=_0x2ea8c6[_0x561e61(0xd3)]),_0x2783aa&&(_0x38090a[_0x561e61(0xe0)]=_0x2783aa),_0x38090a;}export function segmentDefToUpdateRequest(_0x24d404){const _0x2565ff=a117_0x49ad,_0x1cc88f={'name':_0x24d404[_0x2565ff(0xd0)]};return _0x24d404['description']!==undefined&&(_0x1cc88f[_0x2565ff(0xb1)]=_0x24d404[_0x2565ff(0xb1)]),_0x24d404[_0x2565ff(0x104)]&&(_0x1cc88f[_0x2565ff(0x104)]=yamlRuleToApi(_0x24d404[_0x2565ff(0x104)])),_0x24d404[_0x2565ff(0x93)]&&(_0x1cc88f[_0x2565ff(0x93)]=_0x24d404[_0x2565ff(0x93)]===_0x2565ff(0xec)?0x0:_0x24d404[_0x2565ff(0x93)]==='realtime'?0x1:0x2),_0x1cc88f;}export function yamlRuleToApi(_0x5a2994,_0x2200a6=![]){const _0x14c4d5=a117_0x49ad,_0x2a7e13=_0x5a2994[_0x14c4d5(0xbe)][_0x14c4d5(0xfb)](yamlConditionToApi);if(_0x2200a6){const _0x5c786d=_0x2a7e13['every'](_0xba97dc=>_0xba97dc['type']===_0x14c4d5(0xd8)||_0xba97dc['type']==='Or');if(!_0x5c786d&&_0x2a7e13['length']>0x0)return{'type':_0x5a2994[_0x14c4d5(0xeb)],'conditions':[{'type':_0x14c4d5(0xd8),'description':_0x5a2994[_0x14c4d5(0xb1)]||'','conditions':_0x2a7e13}]};}return{'type':_0x5a2994['type'],'conditions':_0x2a7e13,..._0x5a2994[_0x14c4d5(0xb1)]&&{'description':_0x5a2994[_0x14c4d5(0xb1)]}};}function yamlConditionToApi(_0x501a23){const _0x5bb2e2=a117_0x49ad;if(_0x5bb2e2(0xc1)in _0x501a23&&(_0x501a23[_0x5bb2e2(0xeb)]==='include'||_0x501a23[_0x5bb2e2(0xeb)]==='exclude')){const _0x5a9fd1=_0x501a23;return{'type':'Reference','id':_0x5a9fd1[_0x5bb2e2(0xc1)],'exclude':_0x5a9fd1[_0x5bb2e2(0xeb)]===_0x5bb2e2(0xf2)};}if(_0x5bb2e2(0xeb)in _0x501a23&&(_0x501a23['type']===_0x5bb2e2(0xd8)||_0x501a23[_0x5bb2e2(0xeb)]==='Or')){const _0x55bb31=_0x501a23;return{'type':_0x55bb31['type'],'conditions':_0x55bb31[_0x5bb2e2(0xbe)]['map'](yamlConditionToApi),..._0x55bb31[_0x5bb2e2(0xb1)]&&{'description':_0x55bb31[_0x5bb2e2(0xb1)]}};}if(_0x5bb2e2(0xff)in _0x501a23&&_0x501a23[_0x5bb2e2(0xeb)]==='Column'){const _0x348010=_0x501a23;return{'type':_0x5bb2e2(0xf1),'column':_0x348010[_0x5bb2e2(0xff)],'operator':yamlOperatorToApi(_0x348010[_0x5bb2e2(0xb2)])};}const _0x5285c0=_0x501a23,_0x415828={'type':_0x5bb2e2(0x84),'leftValue':buildLeftValue(_0x5285c0),'operator':yamlOperatorToApi(_0x5285c0[_0x5bb2e2(0xb2)]),'exclude':_0x5285c0[_0x5bb2e2(0xf2)]??![],'arrayMatching':_0x5285c0[_0x5bb2e2(0x115)]??_0x5bb2e2(0xe9)};return _0x5285c0['limit']!==undefined&&(_0x415828[_0x5bb2e2(0xab)]=_0x5285c0[_0x5bb2e2(0xab)]),_0x415828;}function buildLeftValue(_0x2bbdf5){const _0x10e0c5=a117_0x49ad,_0x12073e={};return _0x2bbdf5['attribute']&&(_0x12073e[_0x10e0c5(0xd0)]=_0x2bbdf5['attribute']),_0x2bbdf5['aggregation']&&(_0x12073e[_0x10e0c5(0xd1)]={'type':_0x2bbdf5['aggregation'][_0x10e0c5(0xeb)],..._0x2bbdf5['aggregation'][_0x10e0c5(0x8e)]&&{'groupingColumns':_0x2bbdf5[_0x10e0c5(0xd1)][_0x10e0c5(0x8e)]}}),_0x2bbdf5[_0x10e0c5(0x87)]&&(_0x12073e[_0x10e0c5(0x87)]={'name':_0x2bbdf5[_0x10e0c5(0x87)]}),_0x2bbdf5['filter']&&(_0x12073e[_0x10e0c5(0xf0)]=yamlRuleToApi(_0x2bbdf5[_0x10e0c5(0xf0)])),_0x12073e;}function yamlOperatorToApi(_0x2ef4a9){const _0x23cb6f=a117_0x49ad,_0x27747c={'type':mapYamlOperatorType(_0x2ef4a9['type']),'not':_0x2ef4a9['not']??![]};if(isBetweenOperator(_0x2ef4a9[_0x23cb6f(0xeb)]))return _0x2ef4a9['min']!==undefined&&(_0x27747c['minValue']=typeof _0x2ef4a9['min']===_0x23cb6f(0x85)?_0x2ef4a9[_0x23cb6f(0xa3)]:String(_0x2ef4a9[_0x23cb6f(0xa3)])),_0x2ef4a9[_0x23cb6f(0x105)]!==undefined&&(_0x27747c['maxValue']=typeof _0x2ef4a9[_0x23cb6f(0x105)]===_0x23cb6f(0x85)?_0x2ef4a9[_0x23cb6f(0x105)]:String(_0x2ef4a9[_0x23cb6f(0x105)])),_0x27747c;const _0x3ccc94=getEffectiveValue(_0x2ef4a9);if(_0x3ccc94!==undefined){if(Array[_0x23cb6f(0x9d)](_0x3ccc94))_0x27747c[_0x23cb6f(0x82)]=_0x3ccc94;else isTemporalOperator(_0x2ef4a9[_0x23cb6f(0xeb)])?_0x27747c[_0x23cb6f(0xcf)]=_0x3ccc94:_0x27747c[_0x23cb6f(0xb4)]=_0x3ccc94;}return _0x2ef4a9[_0x23cb6f(0xb3)]&&(_0x27747c[_0x23cb6f(0xb3)]=_0x2ef4a9[_0x23cb6f(0xb3)]),_0x27747c;}function mapYamlOperatorType(_0xdd5b73){return _0xdd5b73;}export function toYamlString(_0x36d717){const _0x3f0426=a117_0x49ad,_0x202739=JSON[_0x3f0426(0xb9)](JSON['stringify'](_0x36d717)),_0x46693f=a117_0x54649c[_0x3f0426(0xcd)](_0x202739,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x3f0426(0xbb)}),_0x4a73b7=[_0x3f0426(0xc0)];let _0xde4ecb=_0x46693f;for(const _0x50997b of _0x4a73b7){_0xde4ecb=_0xde4ecb[_0x3f0426(0xc4)](new RegExp('^('+_0x50997b+')','m'),(_0x2e8fb9,_0x5dc656,_0x3124b8)=>{if(_0x3124b8===0x0||_0xde4ecb[_0x3124b8-0x1]==='\x0a'&&_0xde4ecb[_0x3124b8-0x2]==='\x0a')return _0x5dc656;return'\x0a'+_0x5dc656;});}return _0xde4ecb;}export function parseYamlString(_0x473a20){const _0x3bb848=a117_0x49ad,_0xeade7c=a117_0x54649c[_0x3bb848(0xb9)](_0x473a20);if(!_0xeade7c[_0x3bb848(0xd0)])throw new Error(_0x3bb848(0x8f));if(_0xeade7c['type']&&_0xeade7c[_0x3bb848(0xeb)]!==_0x3bb848(0xc1))throw new Error(_0x3bb848(0x9f)+_0xeade7c[_0x3bb848(0xeb)]);return _0xeade7c;}export function isSegmentYaml(_0x5b6f12){const _0x488a4a=a117_0x49ad;if(typeof _0x5b6f12!=='object'||_0x5b6f12===null)return![];const _0x259dd8=_0x5b6f12;return _0x259dd8['type']===_0x488a4a(0xc1)||_0x259dd8[_0x488a4a(0xeb)]===undefined;}export function generateTemplate(_0x39566f='New\x20Segment'){const _0x2ab0d2=a117_0x49ad,_0x12227e={'type':_0x2ab0d2(0xc1),'name':_0x39566f,'description':'Segment\x20description','rule':{'type':'And','conditions':[{'type':_0x2ab0d2(0x84),'attribute':'attribute_name','operator':{'type':'Equal','value':_0x2ab0d2(0xcf)}}]}};return toYamlString(_0x12227e);}export function segmentToYamlString(_0x164da4){const _0x392771=a117_0x49ad,_0x1862fe=JSON['parse'](JSON['stringify'](_0x164da4)),_0x47ce12=a117_0x54649c[_0x392771(0xcd)](_0x1862fe,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x392771(0xbb)}),_0x424a8f=['rule:',_0x392771(0xdc)];let _0x388da6=_0x47ce12;for(const _0x4c8937 of _0x424a8f){_0x388da6=_0x388da6[_0x392771(0xc4)](new RegExp('^('+_0x4c8937+')','m'),(_0x3a698f,_0x10772e,_0xf8548c)=>{if(_0xf8548c===0x0||_0x388da6[_0xf8548c-0x1]==='\x0a'&&_0x388da6[_0xf8548c-0x2]==='\x0a')return _0x10772e;return'\x0a'+_0x10772e;});}return _0x388da6;}export function parseSegmentYamlFile(_0x188026){const _0x5e210b=a117_0x49ad,_0x2368fb=a117_0x54649c['parse'](_0x188026);if(!_0x2368fb[_0x5e210b(0xd0)])throw new Error(_0x5e210b(0x8f));return _0x2368fb;}export function normalizeChildSegmentYaml(_0x2f20ff){const _0xdb2060=a117_0x49ad;return{'type':_0xdb2060(0xc1),'name':_0x2f20ff[_0xdb2060(0xd0)],..._0x2f20ff['description']!==undefined&&{'description':_0x2f20ff['description']},..._0x2f20ff[_0xdb2060(0x9a)]!==undefined&&{'folder':_0x2f20ff[_0xdb2060(0x9a)]},..._0x2f20ff[_0xdb2060(0x104)]&&{'rule':normalizeRule(_0x2f20ff['rule'])},..._0x2f20ff[_0xdb2060(0x93)]!==undefined&&{'kind':_0x2f20ff[_0xdb2060(0x93)]},..._0x2f20ff[_0xdb2060(0xd3)]!==undefined&&{'visible':_0x2f20ff[_0xdb2060(0xd3)]},..._0x2f20ff[_0xdb2060(0xac)]&&{'activations':_0x2f20ff['activations']['map'](normalizeActivation)}};}export function normalizeRule(_0x1bf3cd){const _0x262883=a117_0x49ad;return{'type':_0x1bf3cd[_0x262883(0xeb)],'conditions':_0x1bf3cd['conditions'][_0x262883(0xfb)](normalizeCondition),..._0x1bf3cd['description']!==undefined&&{'description':_0x1bf3cd[_0x262883(0xb1)]}};}function normalizeCondition(_0x403827){const _0x3d612d=a117_0x49ad;if(_0x3d612d(0xc1)in _0x403827&&(_0x403827[_0x3d612d(0xeb)]===_0x3d612d(0x106)||_0x403827[_0x3d612d(0xeb)]===_0x3d612d(0xf2))){const _0x298308=_0x403827;return{'type':_0x298308['type'],'segment':_0x298308[_0x3d612d(0xc1)]};}if(_0x3d612d(0xeb)in _0x403827&&(_0x403827[_0x3d612d(0xeb)]===_0x3d612d(0xd8)||_0x403827['type']==='Or')){const _0x882e08=_0x403827;return{'type':_0x882e08[_0x3d612d(0xeb)],'conditions':_0x882e08['conditions'][_0x3d612d(0xfb)](normalizeCondition),..._0x882e08[_0x3d612d(0xb1)]!==undefined&&{'description':_0x882e08[_0x3d612d(0xb1)]}};}if('column'in _0x403827&&_0x403827['type']===_0x3d612d(0xf1)){const _0x45e2f3=_0x403827;return{'type':_0x3d612d(0xf1),'column':_0x45e2f3[_0x3d612d(0xff)],'operator':normalizeOperator(_0x45e2f3[_0x3d612d(0xb2)])};}const _0x1fe0ce=_0x403827;return{'type':_0x3d612d(0x84),'attribute':_0x1fe0ce[_0x3d612d(0x110)],'operator':normalizeOperator(_0x1fe0ce[_0x3d612d(0xb2)]),..._0x1fe0ce[_0x3d612d(0x115)]!==undefined&&{'arrayMatching':_0x1fe0ce[_0x3d612d(0x115)]},..._0x1fe0ce[_0x3d612d(0xf2)]!==undefined&&{'exclude':_0x1fe0ce['exclude']},..._0x1fe0ce[_0x3d612d(0xd1)]!==undefined&&{'aggregation':_0x1fe0ce[_0x3d612d(0xd1)]},..._0x1fe0ce[_0x3d612d(0x87)]!==undefined&&{'source':_0x1fe0ce[_0x3d612d(0x87)]},..._0x1fe0ce[_0x3d612d(0xf0)]!==undefined&&{'filter':normalizeRule(_0x1fe0ce[_0x3d612d(0xf0)])},..._0x1fe0ce[_0x3d612d(0xab)]!==undefined&&{'limit':_0x1fe0ce[_0x3d612d(0xab)]}};}function normalizeOperator(_0x51c8b8){const _0x4624ac=a117_0x49ad;if(isBetweenOperator(_0x51c8b8[_0x4624ac(0xeb)]))return{'type':_0x51c8b8[_0x4624ac(0xeb)],..._0x51c8b8[_0x4624ac(0x8c)]!==undefined&&{'not':_0x51c8b8[_0x4624ac(0x8c)]},..._0x51c8b8[_0x4624ac(0xa3)]!==undefined&&{'min':_0x51c8b8['min']},..._0x51c8b8[_0x4624ac(0x105)]!==undefined&&{'max':_0x51c8b8['max']}};const _0x3ccfad=getEffectiveValue(_0x51c8b8);return{'type':_0x51c8b8[_0x4624ac(0xeb)],..._0x51c8b8[_0x4624ac(0x8c)]!==undefined&&{'not':_0x51c8b8['not']},..._0x3ccfad!==undefined&&{'value':_0x3ccfad},..._0x51c8b8[_0x4624ac(0xb3)]!==undefined&&{'unit':_0x51c8b8[_0x4624ac(0xb3)]},..._0x51c8b8[_0x4624ac(0xca)]!==undefined&&{'duration':_0x51c8b8[_0x4624ac(0xca)]},..._0x51c8b8[_0x4624ac(0x10c)]!==undefined&&{'from':_0x51c8b8[_0x4624ac(0x10c)]}};}function normalizeActivation(_0x30db37){const _0x4f03d0=a117_0x49ad;return{'name':_0x30db37['name'],'connection':_0x30db37[_0x4f03d0(0xc9)],..._0x30db37[_0x4f03d0(0xb1)]!==undefined&&{'description':_0x30db37[_0x4f03d0(0xb1)]},..._0x30db37[_0x4f03d0(0xb5)]!==undefined&&{'all_columns':_0x30db37[_0x4f03d0(0xb5)]},..._0x30db37[_0x4f03d0(0xed)]!==undefined&&{'columns':_0x30db37[_0x4f03d0(0xed)]},..._0x30db37[_0x4f03d0(0x109)]!==undefined&&{'behavior':_0x30db37['behavior']},..._0x30db37['schedule']!==undefined&&{'schedule':_0x30db37[_0x4f03d0(0x89)]},..._0x30db37[_0x4f03d0(0x7f)]!==undefined&&{'notification':_0x30db37[_0x4f03d0(0x7f)]},..._0x30db37[_0x4f03d0(0x88)]!==undefined&&{'connector_config':_0x30db37['connector_config']},..._0x30db37[_0x4f03d0(0x114)]!==undefined&&{'activation_template_id':_0x30db37[_0x4f03d0(0x114)]}};}export function activationResponseToDef(_0x2d094c,_0x1a0709,_0x5bc8b0){const _0x2ecc57=a117_0x49ad,_0xc8349e=_0x2d094c[_0x2ecc57(0xc6)]||'',_0x55c5e3=_0x5bc8b0?.[_0x2ecc57(0xd9)](_0xc8349e)??_0xc8349e,_0x27d53a={'name':_0x2d094c['name'],'connection':_0x55c5e3};_0x2d094c[_0x2ecc57(0xb1)]&&(_0x27d53a['description']=_0x2d094c['description']);let _0x45f606=[];_0x2d094c[_0x2ecc57(0xed)]&&_0x2d094c[_0x2ecc57(0xed)][_0x2ecc57(0xb0)]>0x0&&(_0x45f606=_0x2d094c[_0x2ecc57(0xed)][_0x2ecc57(0xf0)](_0x395f77=>_0x395f77&&_0x395f77[_0x2ecc57(0xd0)])[_0x2ecc57(0xfb)](_0x346a98=>{const _0x50e1e9=_0x2ecc57;if(_0x346a98[_0x50e1e9(0xeb)]||_0x346a98[_0x50e1e9(0x86)])return{'name':_0x346a98[_0x50e1e9(0xd0)],..._0x346a98[_0x50e1e9(0xeb)]&&{'type':_0x346a98[_0x50e1e9(0xeb)]},..._0x346a98[_0x50e1e9(0x86)]&&{'visibility':_0x346a98[_0x50e1e9(0x86)]}};return _0x346a98['name'];}));_0x45f606[_0x2ecc57(0xb0)]>0x0&&(_0x27d53a['columns']=_0x45f606);_0x2d094c['allColumns']!==undefined&&(_0x2d094c['allColumns']===![]&&_0x45f606[_0x2ecc57(0xb0)]===0x0?_0x27d53a[_0x2ecc57(0xb5)]=!![]:_0x27d53a['all_columns']=_0x2d094c[_0x2ecc57(0xb6)]);const _0x47eb32={};let _0x58afde=![];_0x2d094c['scheduleType']&&(_0x47eb32[_0x2ecc57(0xeb)]=_0x2d094c['scheduleType'],_0x58afde=!![]);_0x2d094c['repeatUnit']&&(_0x47eb32['repeat_unit']=_0x2d094c[_0x2ecc57(0xe8)],_0x58afde=!![]);_0x2d094c[_0x2ecc57(0x99)]!==undefined&&_0x2d094c[_0x2ecc57(0x99)]!==null&&(_0x47eb32['repeat_frequency']=_0x2d094c[_0x2ecc57(0x99)],_0x58afde=!![]);_0x2d094c['repeatSubFrequency']&&_0x2d094c[_0x2ecc57(0x112)]['length']>0x0&&(_0x47eb32[_0x2ecc57(0x108)]=_0x2d094c[_0x2ecc57(0x112)],_0x58afde=!![]);_0x2d094c['startAt']!==undefined&&(_0x47eb32[_0x2ecc57(0x101)]=_0x2d094c['startAt'],_0x58afde=!![]);_0x2d094c[_0x2ecc57(0x10d)]!==undefined&&(_0x47eb32[_0x2ecc57(0xf6)]=_0x2d094c[_0x2ecc57(0x10d)],_0x58afde=!![]);_0x2d094c[_0x2ecc57(0xdd)]&&(_0x47eb32[_0x2ecc57(0xdd)]=_0x2d094c[_0x2ecc57(0xdd)],_0x58afde=!![]);_0x58afde&&(_0x27d53a[_0x2ecc57(0x89)]=_0x47eb32);(_0x2d094c[_0x2ecc57(0x9b)]&&_0x2d094c['notifyOn'][_0x2ecc57(0xb0)]>0x0||_0x2d094c['emailRecipients']&&_0x2d094c[_0x2ecc57(0xc7)][_0x2ecc57(0xb0)]>0x0)&&(_0x27d53a[_0x2ecc57(0x7f)]={},_0x2d094c[_0x2ecc57(0x9b)]&&_0x2d094c[_0x2ecc57(0x9b)][_0x2ecc57(0xb0)]>0x0&&(_0x27d53a[_0x2ecc57(0x7f)][_0x2ecc57(0x94)]=_0x2d094c['notifyOn']),_0x2d094c[_0x2ecc57(0xc7)]&&_0x2d094c[_0x2ecc57(0xc7)]['length']>0x0&&(_0x27d53a['notification']['email_recipients']=_0x2d094c['emailRecipients']['map'](_0xb25ba9=>{const _0x22accd=_0x1a0709?.['get'](_0xb25ba9);return _0x22accd??String(_0xb25ba9);})));_0x2d094c['connectorConfig']&&Object[_0x2ecc57(0xe4)](_0x2d094c[_0x2ecc57(0xe5)])[_0x2ecc57(0xb0)]>0x0&&(_0x27d53a[_0x2ecc57(0x88)]=normalizeConnectorConfigForYaml(_0x2d094c[_0x2ecc57(0xe5)]));_0x2d094c[_0x2ecc57(0xad)]&&(_0x27d53a['activation_template_id']=_0x2d094c[_0x2ecc57(0xad)]);if(_0x2d094c['syndicationBehavior']){const _0x4c2693={},_0x2b7175=_0x2d094c[_0x2ecc57(0x83)];_0x2b7175['columns']&&_0x2b7175[_0x2ecc57(0xed)][_0x2ecc57(0xb0)]>0x0&&(_0x4c2693[_0x2ecc57(0xed)]=_0x2b7175[_0x2ecc57(0xed)]['filter'](_0x44ebc4=>_0x44ebc4&&_0x44ebc4[_0x2ecc57(0xd0)])[_0x2ecc57(0xfb)](_0x36742b=>({'name':_0x36742b[_0x2ecc57(0xd0)],..._0x36742b['type']&&{'type':_0x36742b[_0x2ecc57(0xeb)]},..._0x36742b[_0x2ecc57(0x86)]&&{'visibility':_0x36742b[_0x2ecc57(0x86)]}}))),_0x2b7175[_0x2ecc57(0xa6)]&&(_0x4c2693[_0x2ecc57(0x10f)]=_0x2b7175['behaviorTableName']),_0x2b7175[_0x2ecc57(0xf5)]!==undefined&&(_0x4c2693['join_row']=_0x2b7175['joinRow']),_0x2b7175[_0x2ecc57(0xce)]&&(_0x4c2693[_0x2ecc57(0xa2)]=_0x2b7175['joinStrategy']),_0x2b7175['formatting']&&(_0x4c2693[_0x2ecc57(0xea)]=_0x2b7175[_0x2ecc57(0xea)]),_0x2b7175['orderBy']&&_0x2b7175[_0x2ecc57(0xe6)][_0x2ecc57(0xb0)]>0x0&&(_0x4c2693[_0x2ecc57(0xe2)]=_0x2b7175[_0x2ecc57(0xe6)]),Object[_0x2ecc57(0xe4)](_0x4c2693)['length']>0x0&&(_0x27d53a['behavior']=_0x4c2693);}return _0x27d53a;}export function journeyActivationStepToYaml(_0x4ed27c,_0x488405,_0x34ad03){const _0xd3ff2e=a117_0x49ad,_0x52d805=_0x4ed27c[_0xd3ff2e(0xa7)][_0xd3ff2e(0xe7)],_0x59c850=_0x52d805[_0xd3ff2e(0xc6)]||'',_0x3fe6a0=_0x34ad03?.[_0xd3ff2e(0xd9)](_0x59c850)??_0x59c850,_0x115a4b={'name':_0x52d805[_0xd3ff2e(0xd0)]||'','connection':_0x3fe6a0};_0x4ed27c[_0xd3ff2e(0xa7)][_0xd3ff2e(0xbf)]&&(_0x115a4b[_0xd3ff2e(0x107)]=!![]);_0x52d805[_0xd3ff2e(0xb1)]&&(_0x115a4b['description']=_0x52d805['description']);let _0x26bb9e=[];_0x52d805[_0xd3ff2e(0xed)]&&_0x52d805[_0xd3ff2e(0xed)][_0xd3ff2e(0xb0)]>0x0&&(_0x26bb9e=_0x52d805[_0xd3ff2e(0xed)][_0xd3ff2e(0xf0)](_0x420987=>_0x420987&&_0x420987[_0xd3ff2e(0xd0)])[_0xd3ff2e(0xfb)](_0x515b2b=>{const _0x3c5140=_0xd3ff2e;if(_0x515b2b['type']||_0x515b2b['visibility'])return{'name':_0x515b2b[_0x3c5140(0xd0)],..._0x515b2b['type']&&{'type':_0x515b2b[_0x3c5140(0xeb)]},..._0x515b2b[_0x3c5140(0x86)]&&{'visibility':_0x515b2b[_0x3c5140(0x86)]}};return _0x515b2b[_0x3c5140(0xd0)];}));_0x26bb9e[_0xd3ff2e(0xb0)]>0x0&&(_0x115a4b['columns']=_0x26bb9e);_0x52d805[_0xd3ff2e(0xb6)]!==undefined&&(_0x52d805[_0xd3ff2e(0xb6)]===![]&&_0x26bb9e['length']===0x0?_0x115a4b[_0xd3ff2e(0xb5)]=!![]:_0x115a4b['all_columns']=_0x52d805[_0xd3ff2e(0xb6)]);const _0x41b107={};let _0xd34252=![];_0x52d805['scheduleType']&&(_0x41b107[_0xd3ff2e(0xeb)]=_0x52d805[_0xd3ff2e(0xf4)],_0xd34252=!![]);_0x52d805[_0xd3ff2e(0xe8)]&&(_0x41b107[_0xd3ff2e(0x100)]=_0x52d805[_0xd3ff2e(0xe8)],_0xd34252=!![]);_0x52d805[_0xd3ff2e(0x99)]!==undefined&&_0x52d805[_0xd3ff2e(0x99)]!==null&&(_0x41b107[_0xd3ff2e(0xfd)]=_0x52d805[_0xd3ff2e(0x99)],_0xd34252=!![]);_0x52d805[_0xd3ff2e(0xd2)]!==undefined&&(_0x41b107['start_at']=_0x52d805[_0xd3ff2e(0xd2)],_0xd34252=!![]);_0x52d805['endOn']!==undefined&&(_0x41b107[_0xd3ff2e(0xf6)]=_0x52d805[_0xd3ff2e(0x10d)],_0xd34252=!![]);_0x52d805[_0xd3ff2e(0xdd)]&&(_0x41b107[_0xd3ff2e(0xdd)]=_0x52d805['timezone'],_0xd34252=!![]);_0xd34252&&(_0x115a4b[_0xd3ff2e(0x89)]=_0x41b107);(_0x52d805[_0xd3ff2e(0x9b)]&&_0x52d805[_0xd3ff2e(0x9b)][_0xd3ff2e(0xb0)]>0x0||_0x52d805[_0xd3ff2e(0xc7)]&&_0x52d805[_0xd3ff2e(0xc7)]['length']>0x0)&&(_0x115a4b[_0xd3ff2e(0x7f)]={},_0x52d805['notifyOn']&&_0x52d805[_0xd3ff2e(0x9b)]['length']>0x0&&(_0x115a4b['notification']['notify_on']=_0x52d805['notifyOn']),_0x52d805[_0xd3ff2e(0xc7)]&&_0x52d805[_0xd3ff2e(0xc7)]['length']>0x0&&(_0x115a4b[_0xd3ff2e(0x7f)]['email_recipients']=_0x52d805[_0xd3ff2e(0xc7)]['map'](_0x592c9c=>{const _0x532e4f=_0x488405?.['get'](_0x592c9c);return _0x532e4f??String(_0x592c9c);})));_0x52d805[_0xd3ff2e(0xe5)]&&Object[_0xd3ff2e(0xe4)](_0x52d805['connectorConfig'])[_0xd3ff2e(0xb0)]>0x0&&(_0x115a4b['connector_config']=normalizeConnectorConfigForYaml(_0x52d805[_0xd3ff2e(0xe5)]));_0x52d805['activationTemplateId']&&(_0x115a4b[_0xd3ff2e(0x114)]=_0x52d805[_0xd3ff2e(0xad)]);if(_0x52d805[_0xd3ff2e(0x83)]){const _0x172f04={},_0x7a5aee=_0x52d805['syndicationBehavior'];_0x7a5aee[_0xd3ff2e(0xed)]&&_0x7a5aee[_0xd3ff2e(0xed)][_0xd3ff2e(0xb0)]>0x0&&(_0x172f04[_0xd3ff2e(0xed)]=_0x7a5aee[_0xd3ff2e(0xed)]['filter'](_0x292da0=>_0x292da0&&_0x292da0[_0xd3ff2e(0xd0)])['map'](_0xee16fa=>({'name':_0xee16fa[_0xd3ff2e(0xd0)],..._0xee16fa['type']&&{'type':_0xee16fa[_0xd3ff2e(0xeb)]},..._0xee16fa[_0xd3ff2e(0x86)]&&{'visibility':_0xee16fa['visibility']}}))),_0x7a5aee[_0xd3ff2e(0xa6)]&&(_0x172f04[_0xd3ff2e(0x10f)]=_0x7a5aee[_0xd3ff2e(0xa6)]),_0x7a5aee['joinRow']!==undefined&&(_0x172f04[_0xd3ff2e(0x9c)]=_0x7a5aee[_0xd3ff2e(0xf5)]),_0x7a5aee[_0xd3ff2e(0xce)]&&(_0x172f04[_0xd3ff2e(0xa2)]=_0x7a5aee['joinStrategy']),_0x7a5aee[_0xd3ff2e(0xea)]&&(_0x172f04[_0xd3ff2e(0xea)]=_0x7a5aee[_0xd3ff2e(0xea)]),_0x7a5aee[_0xd3ff2e(0xe6)]&&_0x7a5aee[_0xd3ff2e(0xe6)]['length']>0x0&&(_0x172f04['order_by']=_0x7a5aee[_0xd3ff2e(0xe6)]),Object[_0xd3ff2e(0xe4)](_0x172f04)[_0xd3ff2e(0xb0)]>0x0&&(_0x115a4b[_0xd3ff2e(0x109)]=_0x172f04);}return _0x115a4b;}export function segmentWithActivationsToYaml(_0x339977,_0x4b1789,_0x35abb8,_0x49b224,_0x35d164){const _0x523ced=a117_0x49ad,_0x4bb132=segmentResponseToDefSync(_0x339977,_0x35abb8);return _0x4b1789[_0x523ced(0xb0)]>0x0&&(_0x4bb132[_0x523ced(0xac)]=_0x4b1789[_0x523ced(0xfb)](_0xf5e80f=>activationResponseToDef(_0xf5e80f,_0x49b224,_0x35d164))),_0x4bb132;}function normalizeColumn(_0x390325){const _0x3639f1=a117_0x49ad;if(typeof _0x390325===_0x3639f1(0xf3))return{'name':_0x390325};return{'name':_0x390325[_0x3639f1(0xd0)],..._0x390325[_0x3639f1(0xeb)]&&{'type':_0x390325['type']},..._0x390325[_0x3639f1(0x86)]&&{'visibility':_0x390325[_0x3639f1(0x86)]}};}export async function activationDefToCreateRequest(_0x18e5df,_0x31a5c1){const _0x45d649=a117_0x49ad,_0x3461fe=_0x31a5c1?.['emailToIdMap'],_0x3a9b4c=_0x31a5c1?.[_0x45d649(0xf9)],_0x139c85=_0x18e5df[_0x45d649(0xc9)];let _0x5318e3;const _0x1e9261=parseInt(_0x139c85,0xa);if(!isNaN(_0x1e9261)&&String(_0x1e9261)===_0x139c85)_0x5318e3=_0x1e9261;else{const _0xb24f31=_0x3a9b4c?.['get'](_0x139c85);if(_0xb24f31===undefined)throw new SDKError(ErrorCode[_0x45d649(0xa5)],_0x45d649(0xba)+_0x139c85,undefined,{'helpText':_0x45d649(0x95)});_0x5318e3=_0xb24f31;}const _0x17a2b5={'name':_0x18e5df[_0x45d649(0xd0)],'connectionId':_0x5318e3};_0x18e5df[_0x45d649(0xb1)]&&(_0x17a2b5['description']=_0x18e5df['description']);let _0x54c7f7=[];_0x18e5df[_0x45d649(0xed)]&&_0x18e5df['columns']['length']>0x0&&(_0x54c7f7=_0x18e5df[_0x45d649(0xed)]['filter'](_0x59ca0b=>_0x59ca0b!=null)[_0x45d649(0xfb)](normalizeColumn));_0x54c7f7[_0x45d649(0xb0)]>0x0&&(_0x17a2b5[_0x45d649(0xed)]=_0x54c7f7);_0x18e5df[_0x45d649(0xb5)]!==undefined&&(_0x18e5df[_0x45d649(0xb5)]===![]&&_0x54c7f7['length']===0x0?_0x17a2b5[_0x45d649(0xb6)]=!![]:_0x17a2b5['allColumns']=_0x18e5df[_0x45d649(0xb5)]);if(_0x18e5df['schedule']){const _0x199c5c=_0x18e5df[_0x45d649(0x89)];_0x199c5c['type']&&(_0x17a2b5[_0x45d649(0xf4)]=_0x199c5c[_0x45d649(0xeb)]),_0x199c5c[_0x45d649(0x100)]&&(_0x17a2b5[_0x45d649(0xe8)]=_0x199c5c[_0x45d649(0x100)]),_0x199c5c[_0x45d649(0xfd)]!==undefined&&(_0x17a2b5[_0x45d649(0x99)]=_0x199c5c[_0x45d649(0xfd)]),_0x199c5c['repeat_sub_frequency']&&(_0x17a2b5[_0x45d649(0x112)]=_0x199c5c[_0x45d649(0x108)]),_0x199c5c[_0x45d649(0x101)]!==undefined&&(_0x17a2b5[_0x45d649(0xd2)]=_0x199c5c[_0x45d649(0x101)]),_0x199c5c['end_on']!==undefined&&(_0x17a2b5[_0x45d649(0x10d)]=_0x199c5c[_0x45d649(0xf6)]),_0x199c5c[_0x45d649(0xdd)]&&(_0x17a2b5[_0x45d649(0xdd)]=_0x199c5c['timezone']);}_0x18e5df[_0x45d649(0x7f)]&&(_0x18e5df[_0x45d649(0x7f)][_0x45d649(0x94)]&&(_0x17a2b5[_0x45d649(0x9b)]=_0x18e5df[_0x45d649(0x7f)]['notify_on']),_0x18e5df['notification'][_0x45d649(0x97)]&&(_0x17a2b5[_0x45d649(0xc7)]=_0x18e5df[_0x45d649(0x7f)][_0x45d649(0x97)][_0x45d649(0xfb)](_0x46f7e3=>{const _0x3e72e1=_0x45d649,_0x4bfc73=Number(_0x46f7e3);if(!isNaN(_0x4bfc73)&&String(_0x4bfc73)===_0x46f7e3)return _0x4bfc73;const _0x2a0573=_0x3461fe?.['get'](_0x46f7e3[_0x3e72e1(0xf8)]());if(_0x2a0573===undefined)throw new SDKError(ErrorCode[_0x3e72e1(0xc8)],_0x3e72e1(0x91)+_0x46f7e3+_0x3e72e1(0xe1));return _0x2a0573;})));if(_0x18e5df[_0x45d649(0x88)]){const _0x7eeb4d=_0x31a5c1?.[_0x45d649(0xae)]?.[_0x45d649(0xd9)](_0x139c85);if(_0x7eeb4d&&_0x31a5c1?.['getSchema'])try{const _0x5614e6=await _0x31a5c1[_0x45d649(0xa1)](_0x7eeb4d),_0x59616a=validateConnectorConfig(_0x18e5df[_0x45d649(0x88)],_0x5614e6);if(!_0x59616a[_0x45d649(0xda)])throw new SDKError(ErrorCode['CONNECTOR_INVALID_CONFIG'],_0x45d649(0x80)+_0x18e5df['name']+'\x22:\x0a'+formatValidationErrors(_0x59616a[_0x45d649(0xcb)]),undefined,{'helpText':_0x45d649(0xdb)+_0x7eeb4d+_0x45d649(0xc5)+formatSchemaAsHelp(_0x5614e6)});if(_0x59616a[_0x45d649(0x10b)][_0x45d649(0xb0)]>0x0){const _0x2d5cd1=formatValidationWarnings(_0x59616a[_0x45d649(0x10b)]);console[_0x45d649(0xb7)](_0x45d649(0xc2)+_0x18e5df[_0x45d649(0xd0)]+_0x45d649(0xbc)+_0x2d5cd1);}_0x17a2b5[_0x45d649(0xe5)]=transformConfigToLegacy(_0x18e5df[_0x45d649(0x88)],_0x5614e6);}catch(_0x5e6d33){if(_0x5e6d33 instanceof SDKError&&_0x5e6d33['code']===ErrorCode[_0x45d649(0xef)])_0x17a2b5[_0x45d649(0xe5)]=_0x18e5df[_0x45d649(0x88)];else throw _0x5e6d33;}else _0x17a2b5[_0x45d649(0xe5)]=_0x18e5df[_0x45d649(0x88)];}_0x18e5df[_0x45d649(0x114)]!==undefined&&(_0x17a2b5[_0x45d649(0xad)]=_0x18e5df[_0x45d649(0x114)]);if(_0x18e5df[_0x45d649(0x109)]){const _0x31f52d=_0x18e5df[_0x45d649(0x109)],_0x4affbf={};if(_0x31f52d[_0x45d649(0xed)]&&_0x31f52d[_0x45d649(0xed)][_0x45d649(0xb0)]>0x0){const _0x149e9d=_0x31f52d[_0x45d649(0xed)]['filter'](_0x2a6537=>_0x2a6537&&_0x2a6537[_0x45d649(0xd0)]);_0x149e9d['length']>0x0&&(_0x4affbf['columns']=_0x149e9d);}_0x31f52d[_0x45d649(0x10f)]&&(_0x4affbf[_0x45d649(0xa6)]=_0x31f52d[_0x45d649(0x10f)]),_0x31f52d['join_row']!==undefined&&(_0x4affbf[_0x45d649(0xf5)]=_0x31f52d[_0x45d649(0x9c)]),_0x31f52d[_0x45d649(0xa2)]&&(_0x4affbf[_0x45d649(0xce)]=_0x31f52d[_0x45d649(0xa2)]),_0x31f52d[_0x45d649(0xea)]&&(_0x4affbf['formatting']=_0x31f52d[_0x45d649(0xea)]),_0x31f52d['order_by']&&(_0x4affbf[_0x45d649(0xe6)]=_0x31f52d[_0x45d649(0xe2)]),_0x17a2b5[_0x45d649(0x83)]=_0x4affbf;}return _0x17a2b5;}export async function activationDefToUpdateRequest(_0x513a2e,_0x5c9730){return activationDefToCreateRequest(_0x513a2e,_0x5c9730);}export function deepSortObject(_0x2c87f3){const _0xdd7df3=a117_0x49ad;if(_0x2c87f3===null||typeof _0x2c87f3!==_0xdd7df3(0x85))return _0x2c87f3;if(Array['isArray'](_0x2c87f3))return _0x2c87f3[_0xdd7df3(0xfb)](deepSortObject)['sort']((_0x2100fc,_0x2d8495)=>JSON['stringify'](_0x2100fc)['localeCompare'](JSON['stringify'](_0x2d8495)));const _0x54e99d={};for(const _0x231496 of Object[_0xdd7df3(0xe4)](_0x2c87f3)[_0xdd7df3(0x96)]()){_0x54e99d[_0x231496]=deepSortObject(_0x2c87f3[_0x231496]);}return _0x54e99d;}function a117_0x45c5(){const _0x36f434=['Between','CONNECTOR_SCHEMA_NOT_FOUND','filter','Column','exclude','string','scheduleType','joinRow','end_on','8364128edkRuT','toLowerCase','connectionNameToIdMap','entries','map','23856HfNMRE','repeat_frequency','set','column','repeat_unit','start_at','Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27','JOURNEY_SYNTAX_ERROR','rule','max','include','run_after_journey_refresh','repeat_sub_frequency','behavior','isVisible','warnings','from','endOn','401236Weziyz','behavior_table','attribute','usedNames','repeatSubFrequency','minValue','activation_template_id','arrayMatching','notification','Invalid\x20connector_config\x20for\x20activation\x20\x22','Please\x20specify\x20a\x20valid\x20attribute\x20name.','rightValues','syndicationBehavior','Value','object','visibility','source','connector_config','schedule','values','Reference','not','has','groupingColumns','YAML\x20config\x20missing\x20required\x20field:\x20name','TimeWithinNext','Unknown\x20email\x20recipient:\x20','localRuleToName','kind','notify_on','Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections','sort','email_recipients','all','repeatFrequency','folder','notifyOn','join_row','isArray','resolveSegmentName','YAML\x20type\x20must\x20be\x20\x27segment\x27\x20or\x20omitted,\x20got:\x20','isFinite','getSchema','join_strategy','min','push','CONNECTION_NOT_FOUND','behaviorTableName','attributes','1227365CRgPEE','funnel_stage','1372864dGoybd','limit','activations','activationTemplateId','connectionNameToTypeMap','add','length','description','operator','unit','rightValue','all_columns','allColumns','warn','1361193yoKlHz','parse','Unknown\x20connection:\x20','null','\x22:\x0a','realtime','conditions','runAfterJourneyRefresh','rule:','segment','connector_config\x20for\x20activation\x20\x22','leftValue','replace','\x0a\x0aAvailable\x20fields:\x0a','connectionId','emailRecipients','INVALID_ARGUMENT','connection','duration','errors','ruleHashToName','stringify','joinStrategy','value','name','aggregation','startAt','visible','conditions[','forEach','].attribute\x20cannot\x20be\x20empty.\x0a','maxValue','And','get','valid','Connector:\x20','activations:','timezone','1945307gpoGUn','12QpJBsi','segmentFolderId','.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.','order_by','__SEGMENT_REF__','keys','connectorConfig','orderBy','activationParams','repeatUnit','any','formatting','type','batch','columns'];a117_0x45c5=function(){return _0x36f434;};return a117_0x45c5();}function a117_0x49ad(_0x10cf30,_0x1dde49){_0x10cf30=_0x10cf30-0x7f;const _0x45c599=a117_0x45c5();let _0x49ad18=_0x45c599[_0x10cf30];return _0x49ad18;}export function serializeRule(_0x265d99){return JSON['stringify'](deepSortObject(_0x265d99));}export function normalizeRuleForMatching(_0x2849f4){return normalizeConditionsForMatching(_0x2849f4);}function normalizeConditionsForMatching(_0x52aef6){const _0x576b41=a117_0x49ad;if(_0x52aef6===null||typeof _0x52aef6!==_0x576b41(0x85))return _0x52aef6;if(Array[_0x576b41(0x9d)](_0x52aef6))return _0x52aef6['map'](normalizeConditionsForMatching);const _0x12cbd9=_0x52aef6;if((_0x12cbd9[_0x576b41(0xeb)]===_0x576b41(0x106)||_0x12cbd9[_0x576b41(0xeb)]==='exclude')&&typeof _0x12cbd9[_0x576b41(0xc1)]===_0x576b41(0xf3))return{..._0x12cbd9,'segment':_0x576b41(0xe3)};const _0x3d00b0={};for(const _0x26d67d of Object[_0x576b41(0xe4)](_0x12cbd9)){_0x3d00b0[_0x26d67d]=normalizeConditionsForMatching(_0x12cbd9[_0x26d67d]);}return _0x3d00b0;}export function serializeRuleForMatching(_0x397a46){const _0x109139=a117_0x49ad;return JSON[_0x109139(0xcd)](deepSortObject(normalizeRuleForMatching(_0x397a46)));}export function expandSegmentReferences(_0x44e65c,_0x430a5f,_0x95fe34=new Set()){return expandConditions(_0x44e65c,_0x430a5f,_0x95fe34);}function expandConditions(_0x500e17,_0x42c1f4,_0x2abbc1){const _0x557b2f=a117_0x49ad;if(_0x500e17===null||typeof _0x500e17!=='object')return _0x500e17;if(Array[_0x557b2f(0x9d)](_0x500e17))return _0x500e17[_0x557b2f(0xfb)](_0x584288=>expandConditions(_0x584288,_0x42c1f4,_0x2abbc1));const _0x515e8c=_0x500e17;if((_0x515e8c[_0x557b2f(0xeb)]===_0x557b2f(0x106)||_0x515e8c[_0x557b2f(0xeb)]==='exclude')&&typeof _0x515e8c[_0x557b2f(0xc1)]===_0x557b2f(0xf3)){const _0x21475d=_0x515e8c[_0x557b2f(0xc1)],_0x3b6619=_0x42c1f4[_0x557b2f(0xd9)](_0x21475d);if(_0x3b6619&&!_0x2abbc1[_0x557b2f(0x8d)](_0x21475d)){const _0x170f18=new Set(_0x2abbc1);_0x170f18[_0x557b2f(0xaf)](_0x21475d);const _0x2740cc=expandConditions(_0x3b6619,_0x42c1f4,_0x170f18);return{'type':_0x515e8c[_0x557b2f(0xeb)],'expanded_rule':_0x2740cc};}return{'type':_0x515e8c[_0x557b2f(0xeb)],'expanded_rule':'__UNRESOLVED__'};}const _0x9831ad={};for(const _0x4a0944 of Object[_0x557b2f(0xe4)](_0x515e8c)){_0x9831ad[_0x4a0944]=expandConditions(_0x515e8c[_0x4a0944],_0x42c1f4,_0x2abbc1);}return _0x9831ad;}export function serializeExpandedRule(_0x5cea9c,_0x34f860){const _0x242dfc=expandSegmentReferences(_0x5cea9c,_0x34f860);return JSON['stringify'](deepSortObject(_0x242dfc));}export function createSegmentNameContext(_0x5ed2e0){const _0x3c0fdb=a117_0x49ad,_0x5e907a=new Set(),_0x4ee881=new Map(),_0x87a688=new Map();if(_0x5ed2e0)for(const [_0x4715d9,_0x2b1e47]of Object[_0x3c0fdb(0xfa)](_0x5ed2e0)){if(_0x2b1e47[_0x3c0fdb(0x104)]){const _0x5354cc=serializeRule(_0x2b1e47[_0x3c0fdb(0x104)]);_0x87a688['set'](_0x5354cc,_0x4715d9),_0x5e907a[_0x3c0fdb(0xaf)](_0x4715d9);}}return{'usedNames':_0x5e907a,'ruleHashToName':_0x4ee881,'localRuleToName':_0x5ed2e0?_0x87a688:undefined};}export function resolveSegmentName(_0x35141d,_0x4e0db4,_0x31c1ba,_0x40adce){const _0x4083b3=a117_0x49ad,_0x47bdd8=serializeRule(_0x4e0db4);if(_0x31c1ba[_0x4083b3(0x92)]){const _0x1b60b2=_0x31c1ba['localRuleToName']['get'](_0x47bdd8);if(_0x1b60b2)return{'name':_0x1b60b2,'isDuplicate':![],'isLocalMatch':!![]};}const _0x59c14e=_0x31c1ba[_0x4083b3(0xcc)]['get'](_0x47bdd8);if(_0x59c14e)return{'name':_0x59c14e,'isDuplicate':!![],'isLocalMatch':![]};const _0x55503d=_0x40adce(_0x35141d);let _0xddd83=_0x55503d||_0x35141d,_0x58f3cd=_0xddd83,_0x371e6b=0x2;while(_0x31c1ba[_0x4083b3(0x111)][_0x4083b3(0x8d)](_0x58f3cd)){_0x58f3cd=_0xddd83+'_'+_0x371e6b,_0x371e6b++;}return _0x31c1ba[_0x4083b3(0x111)][_0x4083b3(0xaf)](_0x58f3cd),_0x31c1ba['ruleHashToName'][_0x4083b3(0xfe)](_0x47bdd8,_0x58f3cd),{'name':_0x58f3cd,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x27a811){const _0x15783e=[],_0x160e8e=_0x257c28=>{const _0x2cdd16=a117_0x49ad;if(!_0x257c28||typeof _0x257c28!==_0x2cdd16(0x85))return;if(Array[_0x2cdd16(0x9d)](_0x257c28)){_0x257c28[_0x2cdd16(0xd5)](_0x160e8e);return;}const _0x116e90=_0x257c28;(_0x116e90[_0x2cdd16(0xeb)]===_0x2cdd16(0x106)||_0x116e90[_0x2cdd16(0xeb)]===_0x2cdd16(0xf2))&&typeof _0x116e90[_0x2cdd16(0xc1)]===_0x2cdd16(0xf3)&&_0x15783e[_0x2cdd16(0xa4)](_0x116e90[_0x2cdd16(0xc1)]);for(const _0x3a0386 of Object[_0x2cdd16(0x8a)](_0x116e90)){_0x160e8e(_0x3a0386);}};return _0x160e8e(_0x27a811),_0x15783e;}export function validateSegmentRule(_0x58b515,_0x1a3cde){const _0xce464f=a117_0x49ad;if(!_0x1a3cde||!_0x1a3cde['conditions'])return;for(let _0x1e6663=0x0;_0x1e6663<_0x1a3cde[_0xce464f(0xbe)]['length'];_0x1e6663++){const _0x437b1c=_0x1a3cde[_0xce464f(0xbe)][_0x1e6663];if(_0xce464f(0xeb)in _0x437b1c&&_0x437b1c[_0xce464f(0xeb)]===_0xce464f(0x84)){const _0x18261d=_0x437b1c,_0x15c453=_0x18261d['source']||_0x18261d[_0xce464f(0xd1)];if((!_0x18261d[_0xce464f(0x110)]||_0x18261d['attribute']==='')&&!_0x15c453)throw new SDKError(ErrorCode[_0xce464f(0x103)],_0xce464f(0x102)+_0x58b515+'\x27:\x20'+(_0xce464f(0xd4)+_0x1e6663+_0xce464f(0xd6))+_0xce464f(0x81));}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3098af,_0x1da621){const _0x4fe4b3=a118_0x254e,_0x16225b=_0x3098af();while(!![]){try{const _0x13c4c0=parseInt(_0x4fe4b3(0x105))/0x1*(parseInt(_0x4fe4b3(0x113))/0x2)+-parseInt(_0x4fe4b3(0x12c))/0x3*(parseInt(_0x4fe4b3(0xfe))/0x4)+parseInt(_0x4fe4b3(0x118))/0x5+-parseInt(_0x4fe4b3(0x12e))/0x6+-parseInt(_0x4fe4b3(0x126))/0x7*(parseInt(_0x4fe4b3(0x12d))/0x8)+parseInt(_0x4fe4b3(0x11e))/0x9*(parseInt(_0x4fe4b3(0x102))/0xa)+parseInt(_0x4fe4b3(0x12b))/0xb;if(_0x13c4c0===_0x1da621)break;else _0x16225b['push'](_0x16225b['shift']());}catch(_0x36e0b2){_0x16225b['push'](_0x16225b['shift']());}}}(a118_0x1fc4,0x81ce7));import a118_0x1ef609 from'chalk';function a118_0x254e(_0x30e3a3,_0x4feaf1){_0x30e3a3=_0x30e3a3-0xf5;const _0x1fc4fa=a118_0x1fc4();let _0x254e98=_0x1fc4fa[_0x30e3a3];return _0x254e98;}import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x569ee5){const _0xf9e29d=a118_0x254e,_0x457682=_0x569ee5[_0xf9e29d(0x103)][_0xf9e29d(0x10c)](_0x4ed350=>({'column_name':_0x4ed350[_0xf9e29d(0x111)],'column_type':_0x4ed350['type'],'null':'YES','key':null,'default':null,'extra':null}));return{..._0x569ee5,'columns':[{'name':_0xf9e29d(0xf6),'type':_0xf9e29d(0x119)},{'name':_0xf9e29d(0xff),'type':_0xf9e29d(0x119)},{'name':_0xf9e29d(0x11a),'type':'varchar'},{'name':_0xf9e29d(0x11f),'type':'varchar'},{'name':_0xf9e29d(0x122),'type':_0xf9e29d(0x119)},{'name':_0xf9e29d(0xf9),'type':_0xf9e29d(0x119)}],'data':_0x457682};}export async function executeSchemaQuery(_0xbf0c5d,_0x59f5c2,_0x5f4c84){const _0x50975a=a118_0x254e,_0x335431=_0xbf0c5d[_0x50975a(0x129)]()[_0x50975a(0x125)](/;+$/,''),_0x1682b4=_0x50975a(0x107)+_0x335431+'\x0a)\x20AS\x20segment_query\x20LIMIT\x200';_0x5f4c84[_0x50975a(0xf8)]&&console[_0x50975a(0x117)](_0x50975a(0xfa)+_0x1682b4);const _0x63fe72=await withProgressSpinner(_0x50975a(0xf7),async _0x50ed8a=>{const _0x4e83f6=_0x50975a,_0x2be7ae=await _0x59f5c2['query'][_0x4e83f6(0x108)](_0x1682b4,{'catalog':'td','schema':_0x4e83f6(0x11c),'onJobId':_0x116baf=>{const _0x246053=_0x4e83f6;_0x50ed8a[_0x246053(0x110)](_0x116baf);}});return _0x2be7ae;},{'verbose':_0x5f4c84['verbose']});return buildSchemaResult(_0x63fe72[_0x50975a(0x120)]);}function columnName(_0x578801){const _0x3ff0b6=a118_0x254e;return _0x578801['matrixColumnName']||_0x578801[_0x3ff0b6(0x124)]||_0x578801[_0x3ff0b6(0x111)];}function formatFieldLine(_0x3aa2e3,_0x15ddaa,_0x824fae){const _0x223fec=a118_0x254e,_0xb81a48=_0x3aa2e3!==_0x15ddaa?'\x20'+a118_0x1ef609[_0x223fec(0x10d)]('('+_0x15ddaa+')'):'';return _0x223fec(0x106)+_0x3aa2e3+_0xb81a48+':\x20'+a118_0x1ef609['cyan'](_0x824fae);}function sortByColumnName(_0x14f9db){const _0x60aaf5=a118_0x254e;return[..._0x14f9db]['sort']((_0x21e7bd,_0x490490)=>columnName(_0x21e7bd)[_0x60aaf5(0xfc)](columnName(_0x490490)));}export function displayFieldsHumanReadable(_0xc16b08,_0x13ed7c){const _0x1eb626=a118_0x254e,_0x2bba9d=_0xc16b08[_0x1eb626(0x12f)](_0x91a883=>_0x91a883['source']===_0x1eb626(0x121)),_0x17520c=_0xc16b08[_0x1eb626(0x12f)](_0x4b1dc2=>_0x4b1dc2['source']==='behavior'),_0x2d0707=new Map();for(const _0x8baf1c of _0x2bba9d){const _0x53dffe=_0x8baf1c['groupingName']||_0x8baf1c['parentTableName']||_0x1eb626(0x10f),_0xa32bec=_0x2d0707[_0x1eb626(0x112)](_0x53dffe);_0xa32bec?_0xa32bec[_0x1eb626(0x128)]['push'](_0x8baf1c):_0x2d0707[_0x1eb626(0x101)](_0x53dffe,{'displayName':_0x53dffe,'tableName':_0x8baf1c[_0x1eb626(0x10b)],'fields':[_0x8baf1c]});}const _0x2f966d=new Map();for(const _0x1d0d2f of _0x17520c){const _0x1484f9=_0x1d0d2f[_0x1eb626(0x109)]||_0x1eb626(0x10f),_0x444389=_0x2f966d['get'](_0x1484f9)||[];_0x444389['push'](_0x1d0d2f),_0x2f966d[_0x1eb626(0x101)](_0x1484f9,_0x444389);}console[_0x1eb626(0x117)]('\x0a'+a118_0x1ef609['bold'](_0x13ed7c));if(_0x2d0707[_0x1eb626(0x115)]>0x0){console[_0x1eb626(0x117)]('\x0a'+a118_0x1ef609[_0x1eb626(0x10d)](_0x1eb626(0x116)));const _0x22f3bf=[..._0x2d0707['entries']()][_0x1eb626(0x104)]((_0x585a5f,_0x57bbe9)=>_0x585a5f[0x0][_0x1eb626(0xfc)](_0x57bbe9[0x0]));for(const [,_0x19fbd4]of _0x22f3bf){const _0x4687d4=_0x19fbd4['tableName']&&_0x19fbd4[_0x1eb626(0x10e)]!==_0x19fbd4[_0x1eb626(0x12a)]?'\x20'+a118_0x1ef609['dim']('('+_0x19fbd4[_0x1eb626(0x10e)]+')'):'';console[_0x1eb626(0x117)]('\x20\x20'+a118_0x1ef609['bold'](_0x19fbd4[_0x1eb626(0x12a)])+_0x4687d4);for(const _0x40d7dc of sortByColumnName(_0x19fbd4[_0x1eb626(0x128)])){console['error'](formatFieldLine(columnName(_0x40d7dc),_0x40d7dc[_0x1eb626(0x111)],_0x40d7dc[_0x1eb626(0x11b)]));}}}if(_0x2f966d[_0x1eb626(0x115)]>0x0){console[_0x1eb626(0x117)]('\x0a'+a118_0x1ef609[_0x1eb626(0x10d)](_0x1eb626(0x11d)));const _0x8e81bf=[..._0x2f966d['entries']()][_0x1eb626(0x104)]((_0x209ca6,_0x1cc117)=>_0x209ca6[0x0]['localeCompare'](_0x1cc117[0x0]));for(const [_0x16b36a,_0x560b3b]of _0x8e81bf){const _0x47f721=_0x560b3b[0x0],_0x55d57b=_0x47f721?.[_0x1eb626(0x10a)];if(_0x55d57b){const _0x1f6bf9=_0x55d57b!==_0x16b36a?'\x20'+a118_0x1ef609[_0x1eb626(0x10d)]('('+_0x16b36a+')'):'';console[_0x1eb626(0x117)]('\x20\x20'+a118_0x1ef609[_0x1eb626(0x114)](_0x55d57b)+_0x1f6bf9);}else{const _0xdcfd98=_0x47f721?.[_0x1eb626(0x10b)]||'';console[_0x1eb626(0x117)]('\x20\x20'+a118_0x1ef609[_0x1eb626(0x114)](_0x16b36a)+(_0xdcfd98?'\x20'+a118_0x1ef609[_0x1eb626(0x10d)]('('+_0xdcfd98+')'):''));}for(const _0x22c2f8 of sortByColumnName(_0x560b3b)){const _0x1a98b7=_0x22c2f8[_0x1eb626(0x111)][_0x1eb626(0x123)](_0x16b36a+'.')?_0x22c2f8[_0x1eb626(0x111)][_0x1eb626(0xfb)](_0x16b36a[_0x1eb626(0x100)]+0x1):_0x22c2f8['name'];console[_0x1eb626(0x117)](formatFieldLine(columnName(_0x22c2f8),_0x1a98b7,_0x22c2f8['type']));}}}const _0x1b0470=_0xc16b08[_0x1eb626(0x130)](_0x40d5d7=>_0x40d5d7[_0x1eb626(0xf5)]||_0x40d5d7[_0x1eb626(0x10a)]);_0x1b0470&&(console[_0x1eb626(0x117)]('\x0a'+a118_0x1ef609[_0x1eb626(0x10d)](_0x1eb626(0xfd))),console[_0x1eb626(0x117)](a118_0x1ef609[_0x1eb626(0x10d)](_0x1eb626(0x127)))),console[_0x1eb626(0x117)]('');}function a118_0x1fc4(){const _0x14dced=['175ZCmQXL','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','fields','trim','displayName','4743332ueghlI','56847npvaOG','189104LtKXYw','5097258HsVwcN','filter','some','matrixColumnName','column_name','Fetching\x20schema...','verbose','extra','Schema\x20query:\x0a','slice','localeCompare','Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).','84peFsnk','column_type','length','set','10vCwnzt','columns','sort','2uJRLPL','\x20\x20\x20\x20','SELECT\x20*\x20FROM\x20(\x0a','execute','behaviorName','matrixTableName','parentTableName','map','dim','tableName','Unknown','setJobId','name','get','960898ZDvTwj','bold','size','Attributes','error','217660JJdCjr','varchar','null','type','information_schema','Behaviors','8410203xliRrl','key','data','attribute','default','startsWith','parentColumn','replace'];a118_0x1fc4=function(){return _0x14dced;};return a118_0x1fc4();}
|