@privacyscrubber/sdk 2.1.0 → 2.2.0
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/README.md +101 -0
- package/cli.js +130 -0
- package/index.d.ts +117 -0
- package/index.js +361 -0
- package/package.json +7 -1
- package/ps-license-manager.js +1 -1
- package/ps-pii-engine.cjs +1 -1
- package/scrubber-core.cjs +21 -1
package/index.js
CHANGED
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
import { createRequire } from 'module';
|
|
12
12
|
const require = createRequire(import.meta.url);
|
|
13
|
+
import fs from 'fs';
|
|
14
|
+
import path from 'path';
|
|
15
|
+
import { execSync } from 'child_process';
|
|
16
|
+
import { Transform } from 'stream';
|
|
13
17
|
|
|
14
18
|
import './polyfill.js';
|
|
15
19
|
import './ps-license-manager.js';
|
|
@@ -557,6 +561,359 @@ ${telemetry.frameworksList.map(f => `- **${f}**`).join('\n')}
|
|
|
557
561
|
*Verify at: https://privacyscrubber.com/features/audit-receipt/*`;
|
|
558
562
|
}
|
|
559
563
|
|
|
564
|
+
/**
|
|
565
|
+
* Creates a Node.js Transform stream that sanitizes incoming text chunks line-by-line in volatile RAM.
|
|
566
|
+
* Zero external network egress. Zero memory bloat. Ideal for streaming server logs, CSVs, or HTTP responses.
|
|
567
|
+
*
|
|
568
|
+
* @param {object} [options={}] - Stream configuration or PrivacyScrubberEngine options.
|
|
569
|
+
* @param {PrivacyScrubberEngine} [options.engine] - Optional pre-configured PrivacyScrubberEngine instance.
|
|
570
|
+
* @param {string} [options.profile='General'] - Compliance detection profile.
|
|
571
|
+
* @param {string} [options.licenseKey] - Optional license key.
|
|
572
|
+
* @param {boolean} [options.detectSecrets=false] - Auto-detect cloud credentials and API keys.
|
|
573
|
+
* @param {Array} [options.customRules=[]] - Custom regex rules.
|
|
574
|
+
* @returns {Transform & { getSessionMap: () => Record<string, string>, getTelemetry: () => object, engine: PrivacyScrubberEngine }}
|
|
575
|
+
*/
|
|
576
|
+
export function createSanitizeStream(options = {}) {
|
|
577
|
+
const engine = options.engine || new PrivacyScrubberEngine(options);
|
|
578
|
+
let tail = '';
|
|
579
|
+
|
|
580
|
+
const stream = new Transform({
|
|
581
|
+
transform(chunk, encoding, callback) {
|
|
582
|
+
try {
|
|
583
|
+
const str = tail + (Buffer.isBuffer(chunk) ? chunk.toString('utf8') : String(chunk));
|
|
584
|
+
const lines = str.split('\n');
|
|
585
|
+
tail = lines.pop() || '';
|
|
586
|
+
|
|
587
|
+
for (let i = 0; i < lines.length; i++) {
|
|
588
|
+
const sanitized = engine.sanitize(lines[i], { persistSession: true, generateReceipt: false });
|
|
589
|
+
this.push(sanitized.scrubbedText + '\n');
|
|
590
|
+
}
|
|
591
|
+
callback();
|
|
592
|
+
} catch (err) {
|
|
593
|
+
callback(err);
|
|
594
|
+
}
|
|
595
|
+
},
|
|
596
|
+
flush(callback) {
|
|
597
|
+
try {
|
|
598
|
+
if (tail.length > 0) {
|
|
599
|
+
const sanitized = engine.sanitize(tail, { persistSession: true, generateReceipt: false });
|
|
600
|
+
this.push(sanitized.scrubbedText);
|
|
601
|
+
tail = '';
|
|
602
|
+
}
|
|
603
|
+
callback();
|
|
604
|
+
} catch (err) {
|
|
605
|
+
callback(err);
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
|
|
610
|
+
stream.engine = engine;
|
|
611
|
+
stream.getSessionMap = () => ({ ...engine.sessionMap });
|
|
612
|
+
stream.getTelemetry = () => buildAuditTelemetry(engine.sessionMap);
|
|
613
|
+
|
|
614
|
+
return stream;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* Restores masked tokens in AI-generated code or text locally in volatile RAM,
|
|
619
|
+
* and writes the authentic content directly to the destination file on disk.
|
|
620
|
+
*
|
|
621
|
+
* @param {string} filePath - Target file destination.
|
|
622
|
+
* @param {string} content - Code/text containing placeholder tokens (e.g. [API_KEY_1]).
|
|
623
|
+
* @param {object} [options={}] - Options: tokenMap, engine, createBackup (default: true).
|
|
624
|
+
* @returns {{ success: boolean, filePath: string, restoredCount: number, backupCreated: boolean, backupPath?: string }}
|
|
625
|
+
*/
|
|
626
|
+
export function applyPatch(filePath, content, options = {}) {
|
|
627
|
+
if (!filePath || typeof filePath !== 'string') {
|
|
628
|
+
throw new Error('[PrivacyScrubber] Missing required parameter: filePath must be a string.');
|
|
629
|
+
}
|
|
630
|
+
if (content === undefined || content === null || typeof content !== 'string') {
|
|
631
|
+
throw new Error('[PrivacyScrubber] Missing required parameter: content must be a string.');
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
const {
|
|
635
|
+
tokenMap = null,
|
|
636
|
+
engine = null,
|
|
637
|
+
createBackup = true
|
|
638
|
+
} = options;
|
|
639
|
+
|
|
640
|
+
const activeTokenMap = tokenMap || (engine && engine.sessionMap) || {};
|
|
641
|
+
const resolvedPath = path.resolve(process.cwd(), filePath);
|
|
642
|
+
const restored = unscrub(content, activeTokenMap);
|
|
643
|
+
|
|
644
|
+
let backupCreated = false;
|
|
645
|
+
let backupPath;
|
|
646
|
+
|
|
647
|
+
if (createBackup && fs.existsSync(resolvedPath)) {
|
|
648
|
+
backupPath = `${resolvedPath}.bak`;
|
|
649
|
+
fs.copyFileSync(resolvedPath, backupPath);
|
|
650
|
+
backupCreated = true;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
const parentDir = path.dirname(resolvedPath);
|
|
654
|
+
if (!fs.existsSync(parentDir)) {
|
|
655
|
+
fs.mkdirSync(parentDir, { recursive: true });
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
fs.writeFileSync(resolvedPath, restored.restoredText, 'utf8');
|
|
659
|
+
|
|
660
|
+
return {
|
|
661
|
+
success: true,
|
|
662
|
+
filePath: resolvedPath,
|
|
663
|
+
restoredCount: restored.restoredCount || 0,
|
|
664
|
+
backupCreated,
|
|
665
|
+
backupPath
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* Alias for applyPatch.
|
|
671
|
+
*/
|
|
672
|
+
export function restoreToFile(filePath, content, tokenMapOrOptions = {}, options = {}) {
|
|
673
|
+
if (tokenMapOrOptions && typeof tokenMapOrOptions === 'object' && !tokenMapOrOptions.sessionMap && !tokenMapOrOptions.tokenMap) {
|
|
674
|
+
return applyPatch(filePath, content, { ...options, tokenMap: tokenMapOrOptions });
|
|
675
|
+
}
|
|
676
|
+
return applyPatch(filePath, content, typeof tokenMapOrOptions === 'object' ? tokenMapOrOptions : options);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* Creates CISO-grade Zero-Trust Agentic Guard tools for AI agents & LLM frameworks.
|
|
681
|
+
* Compatible with Vercel AI SDK, OpenAI function calling, LangChain, and AutoGen.
|
|
682
|
+
* Intercepts terminal commands, file reads, and code writes, masking secrets into volatile RAM.
|
|
683
|
+
*
|
|
684
|
+
* @param {PrivacyScrubberEngine|object} [engineOrOptions={}] - PrivacyScrubberEngine or config options.
|
|
685
|
+
* @param {object} [toolConfig={}] - Default configuration: cwd, profile.
|
|
686
|
+
* @returns {object} Object containing guardExec, guardReadFile, guardApplyPatch, guardGitDiff, getDefinitions, and engine.
|
|
687
|
+
*/
|
|
688
|
+
export function createGuardedTools(engineOrOptions = {}, toolConfig = {}) {
|
|
689
|
+
const engine = (engineOrOptions instanceof PrivacyScrubberEngine)
|
|
690
|
+
? engineOrOptions
|
|
691
|
+
: new PrivacyScrubberEngine(engineOrOptions);
|
|
692
|
+
|
|
693
|
+
const baseCwd = toolConfig.cwd || process.cwd();
|
|
694
|
+
const defaultProfile = toolConfig.profile || engine.defaultProfile || 'Dev';
|
|
695
|
+
|
|
696
|
+
const tools = {
|
|
697
|
+
guardExec: {
|
|
698
|
+
name: 'guard_exec',
|
|
699
|
+
description: 'Executes a shell command locally, intercepts stdout/stderr line-by-line, sanitizes credentials and PII into RAM tokens, and returns clean text to model context.',
|
|
700
|
+
parameters: {
|
|
701
|
+
type: 'object',
|
|
702
|
+
properties: {
|
|
703
|
+
command: { type: 'string', description: 'Shell command to execute.' },
|
|
704
|
+
cwd: { type: 'string', description: 'Working directory.' },
|
|
705
|
+
profile: { type: 'string', description: 'Detection profile (default: Dev).' },
|
|
706
|
+
timeoutMs: { type: 'number', description: 'Execution timeout in milliseconds (default: 15000).' }
|
|
707
|
+
},
|
|
708
|
+
required: ['command']
|
|
709
|
+
},
|
|
710
|
+
execute: async ({ command, cwd, profile = defaultProfile, timeoutMs = 15000 } = {}) => {
|
|
711
|
+
if (!command || typeof command !== 'string') {
|
|
712
|
+
throw new Error('[guard_exec] Missing or invalid parameter: command must be a string.');
|
|
713
|
+
}
|
|
714
|
+
const execCwd = cwd ? path.resolve(baseCwd, cwd) : baseCwd;
|
|
715
|
+
let stdout = '';
|
|
716
|
+
let stderr = '';
|
|
717
|
+
let exitCode = 0;
|
|
718
|
+
|
|
719
|
+
try {
|
|
720
|
+
stdout = execSync(command, {
|
|
721
|
+
cwd: execCwd,
|
|
722
|
+
timeout: Math.min(Math.max(timeoutMs, 1000), 60000),
|
|
723
|
+
maxBuffer: 10 * 1024 * 1024,
|
|
724
|
+
encoding: 'utf8',
|
|
725
|
+
stdio: ['pipe', 'pipe', 'pipe']
|
|
726
|
+
});
|
|
727
|
+
} catch (err) {
|
|
728
|
+
stdout = err.stdout ? err.stdout.toString() : '';
|
|
729
|
+
stderr = err.stderr ? err.stderr.toString() : (err.message || '');
|
|
730
|
+
exitCode = typeof err.status === 'number' ? err.status : 1;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
const resCommand = engine.sanitize(command, { profile, detectSecrets: true, persistSession: true, generateReceipt: false });
|
|
734
|
+
const resStdout = engine.sanitize(stdout, { profile, detectSecrets: true, persistSession: true, generateReceipt: false });
|
|
735
|
+
const resStderr = engine.sanitize(stderr, { profile, detectSecrets: true, persistSession: true, generateReceipt: false });
|
|
736
|
+
|
|
737
|
+
const newTokens = { ...resCommand.tokenMap, ...resStdout.tokenMap, ...resStderr.tokenMap };
|
|
738
|
+
const telemetry = buildAuditTelemetry(newTokens);
|
|
739
|
+
const receipt = formatAuditReceipt(telemetry);
|
|
740
|
+
|
|
741
|
+
const responseText = `[Zero-Trust Agentic Guard: Exec]\n` +
|
|
742
|
+
`Command: ${resCommand.scrubbedText}\n` +
|
|
743
|
+
`Exit Code: ${exitCode}\n` +
|
|
744
|
+
`Tokens Redacted: ${Object.keys(newTokens).length}\n\n` +
|
|
745
|
+
(resStdout.scrubbedText ? `--- STDOUT ---\n${resStdout.scrubbedText}\n\n` : '') +
|
|
746
|
+
(resStderr.scrubbedText ? `--- STDERR ---\n${resStderr.scrubbedText}\n\n` : '') +
|
|
747
|
+
receipt;
|
|
748
|
+
|
|
749
|
+
return {
|
|
750
|
+
command: resCommand.scrubbedText,
|
|
751
|
+
stdout: resStdout.scrubbedText,
|
|
752
|
+
stderr: resStderr.scrubbedText,
|
|
753
|
+
exitCode,
|
|
754
|
+
tokenCount: Object.keys(newTokens).length,
|
|
755
|
+
telemetry,
|
|
756
|
+
receipt,
|
|
757
|
+
responseText
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
|
|
762
|
+
guardReadFile: {
|
|
763
|
+
name: 'guard_read_file',
|
|
764
|
+
description: 'Reads local file contents, tokenizing sensitive credentials and PII in volatile RAM before returning text to model context.',
|
|
765
|
+
parameters: {
|
|
766
|
+
type: 'object',
|
|
767
|
+
properties: {
|
|
768
|
+
filePath: { type: 'string', description: 'Path to target file.' },
|
|
769
|
+
maxLines: { type: 'number', description: 'Maximum lines to read (default: 500).' },
|
|
770
|
+
profile: { type: 'string', description: 'Detection profile (default: Dev).' }
|
|
771
|
+
},
|
|
772
|
+
required: ['filePath']
|
|
773
|
+
},
|
|
774
|
+
execute: async ({ filePath, maxLines = 500, profile = defaultProfile } = {}) => {
|
|
775
|
+
if (!filePath || typeof filePath !== 'string') {
|
|
776
|
+
throw new Error('[guard_read_file] Missing or invalid parameter: filePath must be a string.');
|
|
777
|
+
}
|
|
778
|
+
const resolved = path.resolve(baseCwd, filePath);
|
|
779
|
+
if (!fs.existsSync(resolved)) {
|
|
780
|
+
throw new Error(`[guard_read_file] File not found: ${resolved}`);
|
|
781
|
+
}
|
|
782
|
+
const stat = fs.statSync(resolved);
|
|
783
|
+
if (stat.isDirectory()) {
|
|
784
|
+
throw new Error(`[guard_read_file] Path is a directory, not a file: ${resolved}`);
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
const raw = fs.readFileSync(resolved, 'utf8');
|
|
788
|
+
const lines = raw.split(/\r?\n/);
|
|
789
|
+
const capped = lines.slice(0, maxLines).join('\n');
|
|
790
|
+
const wasTruncated = lines.length > maxLines;
|
|
791
|
+
|
|
792
|
+
const res = engine.sanitize(capped, { profile, detectSecrets: true, persistSession: true, generateReceipt: false });
|
|
793
|
+
const telemetry = buildAuditTelemetry(res.tokenMap);
|
|
794
|
+
const receipt = formatAuditReceipt(telemetry);
|
|
795
|
+
|
|
796
|
+
const responseText = `[Zero-Trust Agentic Guard: File Read: ${path.basename(resolved)}]\n` +
|
|
797
|
+
`Path: ${resolved}\n` +
|
|
798
|
+
`Total Lines: ${lines.length}${wasTruncated ? ` (Capped to ${maxLines} lines)` : ''}\n` +
|
|
799
|
+
`Tokens Redacted: ${res.count}\n\n` +
|
|
800
|
+
`--- SANITIZED CONTENT ---\n` +
|
|
801
|
+
res.scrubbedText + '\n\n' +
|
|
802
|
+
receipt;
|
|
803
|
+
|
|
804
|
+
return {
|
|
805
|
+
filePath: resolved,
|
|
806
|
+
content: res.scrubbedText,
|
|
807
|
+
totalLines: lines.length,
|
|
808
|
+
wasTruncated,
|
|
809
|
+
tokenCount: res.count,
|
|
810
|
+
telemetry,
|
|
811
|
+
receipt,
|
|
812
|
+
responseText
|
|
813
|
+
};
|
|
814
|
+
}
|
|
815
|
+
},
|
|
816
|
+
|
|
817
|
+
guardApplyPatch: {
|
|
818
|
+
name: 'guard_apply_patch',
|
|
819
|
+
description: 'Restores authentic secrets locally from volatile RAM session map and writes real content directly to target file with automatic .bak backup.',
|
|
820
|
+
parameters: {
|
|
821
|
+
type: 'object',
|
|
822
|
+
properties: {
|
|
823
|
+
filePath: { type: 'string', description: 'Destination file path.' },
|
|
824
|
+
content: { type: 'string', description: 'Content containing token placeholders (e.g. [API_KEY_1]).' },
|
|
825
|
+
createBackup: { type: 'boolean', description: 'Whether to create .bak backup if file exists (default: true).' }
|
|
826
|
+
},
|
|
827
|
+
required: ['filePath', 'content']
|
|
828
|
+
},
|
|
829
|
+
execute: async ({ filePath, content, createBackup = true } = {}) => {
|
|
830
|
+
const patchResult = applyPatch(filePath, content, {
|
|
831
|
+
tokenMap: engine.sessionMap,
|
|
832
|
+
createBackup
|
|
833
|
+
});
|
|
834
|
+
|
|
835
|
+
const responseText = `[Zero-Trust Agentic Guard: Patch Applied]\n` +
|
|
836
|
+
`Destination: ${patchResult.filePath}\n` +
|
|
837
|
+
`Tokens Restored Locally: ${patchResult.restoredCount}\n` +
|
|
838
|
+
`Backup Created: ${patchResult.backupCreated ? `${patchResult.filePath}.bak` : 'No'}\n` +
|
|
839
|
+
`Status: File written with 100% authentic local values. Remote LLM received zero secrets.`;
|
|
840
|
+
|
|
841
|
+
return {
|
|
842
|
+
...patchResult,
|
|
843
|
+
responseText
|
|
844
|
+
};
|
|
845
|
+
}
|
|
846
|
+
},
|
|
847
|
+
|
|
848
|
+
guardGitDiff: {
|
|
849
|
+
name: 'guard_git_diff',
|
|
850
|
+
description: 'Inspects staged or unstaged git diff changes with credentials and PII masked into volatile RAM tokens.',
|
|
851
|
+
parameters: {
|
|
852
|
+
type: 'object',
|
|
853
|
+
properties: {
|
|
854
|
+
staged: { type: 'boolean', description: 'Whether to review staged changes (--cached).' },
|
|
855
|
+
cwd: { type: 'string', description: 'Repository directory.' },
|
|
856
|
+
profile: { type: 'string', description: 'Detection profile (default: Dev).' }
|
|
857
|
+
},
|
|
858
|
+
required: []
|
|
859
|
+
},
|
|
860
|
+
execute: async ({ staged = false, cwd, profile = defaultProfile } = {}) => {
|
|
861
|
+
const repoCwd = cwd ? path.resolve(baseCwd, cwd) : baseCwd;
|
|
862
|
+
const gitCmd = staged ? 'git diff --cached' : 'git diff';
|
|
863
|
+
let diffOutput = '';
|
|
864
|
+
|
|
865
|
+
try {
|
|
866
|
+
diffOutput = execSync(gitCmd, { cwd: repoCwd, encoding: 'utf8', maxBuffer: 64 * 1024 * 1024 });
|
|
867
|
+
} catch (err) {
|
|
868
|
+
if (err.code === 'ENOBUFS' && err.stdout) {
|
|
869
|
+
diffOutput = err.stdout.toString('utf8');
|
|
870
|
+
} else {
|
|
871
|
+
throw new Error(`[guard_git_diff] Git command failed: ${err.message}`);
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
if (!diffOutput.trim()) {
|
|
876
|
+
return {
|
|
877
|
+
diff: '',
|
|
878
|
+
isStaged: !!staged,
|
|
879
|
+
tokenCount: 0,
|
|
880
|
+
responseText: `[Zero-Trust Agentic Guard: Git Diff]\nNo changes detected (${staged ? 'staged' : 'unstaged'}).`
|
|
881
|
+
};
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
const res = engine.sanitize(diffOutput, { profile, detectSecrets: true, persistSession: true, generateReceipt: false });
|
|
885
|
+
const telemetry = buildAuditTelemetry(res.tokenMap);
|
|
886
|
+
const receipt = formatAuditReceipt(telemetry);
|
|
887
|
+
|
|
888
|
+
const responseText = `[Zero-Trust Agentic Guard: Git Diff (${staged ? 'Staged' : 'Unstaged'})]\n` +
|
|
889
|
+
`Tokens Redacted: ${res.count}\n\n` +
|
|
890
|
+
`--- SANITIZED DIFF ---\n` +
|
|
891
|
+
res.scrubbedText + '\n\n' +
|
|
892
|
+
receipt;
|
|
893
|
+
|
|
894
|
+
return {
|
|
895
|
+
diff: res.scrubbedText,
|
|
896
|
+
isStaged: !!staged,
|
|
897
|
+
tokenCount: res.count,
|
|
898
|
+
telemetry,
|
|
899
|
+
receipt,
|
|
900
|
+
responseText
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
};
|
|
905
|
+
|
|
906
|
+
tools.getDefinitions = () => [
|
|
907
|
+
{ type: 'function', function: { name: tools.guardExec.name, description: tools.guardExec.description, parameters: tools.guardExec.parameters } },
|
|
908
|
+
{ type: 'function', function: { name: tools.guardReadFile.name, description: tools.guardReadFile.description, parameters: tools.guardReadFile.parameters } },
|
|
909
|
+
{ type: 'function', function: { name: tools.guardApplyPatch.name, description: tools.guardApplyPatch.description, parameters: tools.guardApplyPatch.parameters } },
|
|
910
|
+
{ type: 'function', function: { name: tools.guardGitDiff.name, description: tools.guardGitDiff.description, parameters: tools.guardGitDiff.parameters } }
|
|
911
|
+
];
|
|
912
|
+
|
|
913
|
+
tools.engine = engine;
|
|
914
|
+
return tools;
|
|
915
|
+
}
|
|
916
|
+
|
|
560
917
|
// Low-level backwards-compatible exports
|
|
561
918
|
export const scrubText = scrubberPkg.scrubText;
|
|
562
919
|
export const unscrubText = scrubberPkg.unscrubText;
|
|
@@ -575,6 +932,10 @@ export default {
|
|
|
575
932
|
PrivacyScrubberLicenseError,
|
|
576
933
|
wrapOpenAI,
|
|
577
934
|
createLangChainTransform,
|
|
935
|
+
createSanitizeStream,
|
|
936
|
+
applyPatch,
|
|
937
|
+
restoreToFile,
|
|
938
|
+
createGuardedTools,
|
|
578
939
|
scrubText,
|
|
579
940
|
unscrubText,
|
|
580
941
|
DEVOPS_SECRETS_DETECTOR
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@privacyscrubber/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Zero-dependency, in-memory PII & secrets redaction SDK for Node.js, Next.js, OpenAI, and LangChain. 100% client-side & server-side zero-trust prompt anonymization under 1ms.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -11,12 +11,18 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"index.js",
|
|
13
13
|
"index.d.ts",
|
|
14
|
+
"cli.js",
|
|
14
15
|
"polyfill.js",
|
|
15
16
|
"ps-license-manager.js",
|
|
16
17
|
"ps-pii-engine.cjs",
|
|
17
18
|
"scrubber-core.cjs",
|
|
18
19
|
"README.md"
|
|
19
20
|
],
|
|
21
|
+
"bin": {
|
|
22
|
+
"sdk": "cli.js",
|
|
23
|
+
"privacyscrubber-sdk": "cli.js",
|
|
24
|
+
"ps-sdk": "cli.js"
|
|
25
|
+
},
|
|
20
26
|
"scripts": {
|
|
21
27
|
"build": "node ../scripts/build-sdk.js",
|
|
22
28
|
"test": "node test-sdk.js",
|
package/ps-license-manager.js
CHANGED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* via any medium, is strictly prohibited. Protected by international copyright
|
|
9
9
|
* laws and treaties.
|
|
10
10
|
*/
|
|
11
|
-
function _0x1dd9(){const _0x3a1c0b=['DvbKwfy','tg9grhe','y29Uy2f0','wNDTDw8','CNfuz0m','B3rftuq','sgLQzLG','twvhr2u','C3vIC3rYAw5N','mJCWvxr0rMT2','DfLvt0K','mty3ndLMDMrgtKO','tgnwz1K','CgfYC2u','CwnJA2q','zNjVBq','BgvUz3rO','ChnFBgfZDf9ZzwvUx3rPBwu','ugLSB3qGzxHWAxjLza','sLDuigv4CgLYzwq','mJyWmty2mfLVEg1NEa','tgLJzw5Zzu1HBMfNzxi','nJaWA3nhrvzi','ru5urvjquKLtrq','ndKZmduWnhPvwenmuG','Bw9JA1rPBwu','C3vIC3rY','ufmTueLmt1qT','Cg93','mJmXndLQzvv5tLu','vLr5q08','C3bSAxq','EfrVre8','wLreu19tquXuxZiWmJzFiuaJ','CMvWBgfJzq','uLnb','ufjp','Dw5KzwzPBMvK','ufmTuLnblq','EvHLDNa','C3rVCMfNzq','odeXmtC3A1v0Efbd','zxHW','q2XVy2SGCM9SBgjHy2SGyw5VBwfSEsbKzxrLy3rLza','BM93','u0rl','zxLk','vKHtshO','uLnbigTLEsbLEhbPCMvK','t0f4yNK','C2XPy2u','ntu0ntG3zMLgtKzR','C3rHCNrZv2L0Aa','ugLSB3q','y2HHCKnVzgvbDa','tM8GA2v5ihbYB3zPzgvK','DuH1Afe','Dg9tDhjPBMC','mZbVzNPwDLK','zNjVBunOyxjdB2rL','mtHMweX6CwW','uLnbigrLy3j5ChrPB24GzMfPBgvK','vxHJrKu','v3fntM0','qMTYv1K','qwrPzwq','Beffuxy','B25bBM9TywX5','r2Xyqvy','CgfKu3rHCNq','mtuWndq1mhLuAwfpsa','Bfz1Axq','sw52ywXPzcbMB3jTyxq','BuX5wxe','zxHWB3j0CW','wLreuY1qsuXpvc0','B25fEhbPCMvK','r0LhzeK','zgPyqMi','yMLUyxj5','t0vn','ywjqyMm'];_0x1dd9=function(){return _0x3a1c0b;};return _0x1dd9();}const _0x1bad3b=_0x3d8c;function _0x3d8c(_0x1fa210,_0x5c23c0){_0x1fa210=_0x1fa210-0x90;const _0x1dd982=_0x1dd9();let _0x3d8c18=_0x1dd982[_0x1fa210];if(_0x3d8c['ZxNkru']===undefined){var _0x3dbc7c=function(_0x14e084){const _0x2d573c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x18afa8='',_0x2a8933='';for(let _0xf8f8fc=0x0,_0x4e5615,_0x48bfed,_0x34c71d=0x0;_0x48bfed=_0x14e084['charAt'](_0x34c71d++);~_0x48bfed&&(_0x4e5615=_0xf8f8fc%0x4?_0x4e5615*0x40+_0x48bfed:_0x48bfed,_0xf8f8fc++%0x4)?_0x18afa8+=String['fromCharCode'](0xff&_0x4e5615>>(-0x2*_0xf8f8fc&0x6)):0x0){_0x48bfed=_0x2d573c['indexOf'](_0x48bfed);}for(let _0x27eadc=0x0,_0x4396fe=_0x18afa8['length'];_0x27eadc<_0x4396fe;_0x27eadc++){_0x2a8933+='%'+('00'+_0x18afa8['charCodeAt'](_0x27eadc)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2a8933);};_0x3d8c['lAqnnL']=_0x3dbc7c,_0x3d8c['lacXax']={},_0x3d8c['ZxNkru']=!![];}const _0x4b8fa3=_0x1dd982[0x0],_0xae702e=_0x1fa210+_0x4b8fa3,_0x5b0434=_0x3d8c['lacXax'][_0xae702e];return!_0x5b0434?(_0x3d8c18=_0x3d8c['lAqnnL'](_0x3d8c18),_0x3d8c['lacXax'][_0xae702e]=_0x3d8c18):_0x3d8c18=_0x5b0434,_0x3d8c18;}(function(_0x2a4664,_0x125be5){const _0xf0cb6b={_0x331331:0x9e,_0x3379f3:0xdb,_0x2b1fbf:0xbb,_0x3d567a:0xa8},_0x4d6122=_0x3d8c,_0x9c65c6=_0x2a4664();while(!![]){try{const _0x3679f7=parseInt(_0x4d6122(_0xf0cb6b._0x331331))/0x1+parseInt(_0x4d6122(_0xf0cb6b._0x3379f3))/0x2+-parseInt(_0x4d6122(0xd2))/0x3*(-parseInt(_0x4d6122(0xdd))/0x4)+parseInt(_0x4d6122(_0xf0cb6b._0x2b1fbf))/0x5+-parseInt(_0x4d6122(0xaf))/0x6*(-parseInt(_0x4d6122(0x92))/0x7)+-parseInt(_0x4d6122(0xdf))/0x8*(parseInt(_0x4d6122(0xb1))/0x9)+-parseInt(_0x4d6122(0xd0))/0xa*(parseInt(_0x4d6122(_0xf0cb6b._0x3d567a))/0xb);if(_0x3679f7===_0x125be5)break;else _0x9c65c6['push'](_0x9c65c6['shift']());}catch(_0x2cb63a){_0x9c65c6['push'](_0x9c65c6['shift']());}}}(_0x1dd9,0xa44e5),function(_0x587584){const _0x372b82={_0x2e16be:0xac,_0x39786e:0xc5,_0x3c231d:0xde,_0x5ffd2e:0xda,_0xe7c775:0xbd,_0x36eeb5:0xdc,_0x2637e8:0xd5,_0x4eb87c:0xd5},_0x3d00e3={_0x50812e:0xe0,_0x2ea0d6:0xa1,_0x407cb5:0x9d,_0x327fa6:0xb9,_0x456656:0xd8,_0x186dd9:0xe0,_0x357a78:0xe0,_0x5e063a:0xa0,_0xd08296:0x90,_0xc91e56:0xd7,_0x1ad311:0xd7,_0x264a10:0xae,_0x4a9df8:0xa9,_0x400df0:0xb5,_0x395d17:0xaa,_0x482066:0xd9,_0x3236e2:0xba,_0x437b70:0xb4,_0x413c63:0x94,_0x39f16d:0xb3,_0xcef8c6:0xc1,_0x4bce95:0xc1,_0x38f1d3:0xa5,_0x4dad0e:0x99,_0x52c4bf:0xd3,_0x933bbf:0x96,_0x10eb44:0xa4,_0x2882c7:0xa3,_0x91488f:0x94,_0x1a46f1:0x97,_0xe00c16:0xad,_0x475cc1:0x95,_0xedc29b:0x9c,_0x1501e8:0xd4,_0x487ba9:0x9f},_0x263162={_0x1ef0b7:0xcc,_0x12082e:0xc3,_0x4dd2bd:0xab,_0x59c305:0xcd,_0x216764:0xbe,_0x1f0976:0xa7,_0x181609:0xc7,_0x1ed54d:0xb6,_0x54fd6d:0xcc,_0x37bd9f:0xc9,_0x379c07:0xca},_0x4a0de5={_0x3ec594:0xae},_0x597c6c={_0x1a4082:0xd7,_0x1b062b:0xe1},_0x44770d=_0x3d8c,_0x29c976={'VHSHz':function(_0x5c59d8,_0xde5803){return _0x5c59d8%_0xde5803;},'yXevp':function(_0x43d93f,_0x1420ed){return _0x43d93f+_0x1420ed;},'otEMD':function(_0x39b4fd,_0x6ddac8,_0xd13272){return _0x39b4fd(_0x6ddac8,_0xd13272);},'Zwmuo':function(_0x5a7c5a,_0x46caa0){return _0x5a7c5a|_0x46caa0;},'djXBb':function(_0x506eac,_0x3f34e2){return _0x506eac*_0x3f34e2;},'aeLVN':function(_0x3605db,_0x42348a){return _0x3605db%_0x42348a;},'HijfX':function(_0x1deb2b,_0x6cfa8e){return _0x1deb2b>>_0x6cfa8e;},'mLyYq':function(_0xd0c996,_0x46a9da){return _0xd0c996/_0x46a9da;},'uPdXV':function(_0x537b9b,_0x39624a){return _0x537b9b^_0x39624a;},'lVuit':function(_0x1ae91a,_0x39d16c){return _0x1ae91a&_0x39d16c;},'iYKyn':function(_0x61a9dc,_0xb57148){return _0x61a9dc+_0xb57148;},'Adied':function(_0x193e06,_0xc56003){return _0x193e06>>>_0xc56003;},'GlXAV':function(_0x386323,_0x14d3e8,_0x2c5c76){return _0x386323(_0x14d3e8,_0x2c5c76);},'owudR':function(_0x17bddd,_0x2fd792){return _0x17bddd&_0x2fd792;},'VTyCO':_0x44770d(_0x372b82._0x2e16be),'BkrWY':function(_0xb9b3a,_0x10afee){return _0xb9b3a<_0x10afee;},'abPbc':'Pilot\x20decryption\x20failed','GIGdI':_0x44770d(0x9b),'MeGGe':function(_0x46e9fb,_0x5ad3b9){return _0x46e9fb+_0x5ad3b9;},'WqMNm':function(_0x46d3b2,_0x55b3f9){return _0x46d3b2(_0x55b3f9);},'UxcFE':function(_0x16ec6f,_0x48098e){return _0x16ec6f(_0x48098e);},'OAxby':_0x44770d(0xa2),'LcVgY':_0x44770d(_0x372b82._0x39786e),'tYUOI':_0x44770d(_0x372b82._0x3c231d),'uHuhQ':function(_0x22b6a1,_0x242a30){return _0x22b6a1%_0x242a30;},'xToDO':function(_0x1868a9,_0x10e97b){return _0x1868a9!==_0x10e97b;},'rqTgC':function(_0x273664,_0x232910){return _0x273664%_0x232910;},'zdDUH':function(_0x495bca,_0x379046){return _0x495bca<_0x379046;},'LoFDq':_0x44770d(_0x372b82._0x5ffd2e),'lAEQv':_0x44770d(_0x372b82._0xe7c775),'qcckd':'undefined'},_0x325d1c=BigInt('21317979104050344678233452423803986868842680501941538057759536089609908024281729760556922188810565541201321990374637212776148857190553192389608364990754937991254608109727112734447704854882786946805547031142530865504430968628760311494129154950865158735816268612258108296781892583171421605668998979064782378729322077179022581884976242706169323540456286526420742434868559866211716347133681429395477256705746276962607312574959642065929462114149296066812527505837608212730874704915352119747022918247963886630350365119206627670591400728523813746184290857872958847087691236909900501703203494160206941648263514117706558791691'),_0x2f87a6=0x10001n;function _0x2639cd(_0xe64707,_0x47db1d,_0x5485b6){const _0x1e7baf=_0x44770d;let _0xbbfa73=0x1n;_0xe64707=_0xe64707%_0x5485b6;while(_0x47db1d>0x0n){if(_0x47db1d%0x2n===0x1n)_0xbbfa73=_0x29c976[_0x1e7baf(0xa4)](_0xbbfa73*_0xe64707,_0x5485b6);_0x47db1d=_0x47db1d/0x2n,_0xe64707=_0xe64707*_0xe64707%_0x5485b6;}return _0xbbfa73;}function _0x404405(_0x869cb9){const _0xa4b2a3=_0x44770d;let _0x2ea42b=_0x869cb9[_0xa4b2a3(0xae)](0x10);if(_0x2ea42b[_0xa4b2a3(0xd7)]%0x2!==0x0)_0x2ea42b='0'+_0x2ea42b;let _0x327ace='';for(let _0x58a0a1=0x0;_0x58a0a1<_0x2ea42b[_0xa4b2a3(_0x597c6c._0x1a4082)];_0x58a0a1+=0x2){_0x327ace+=String[_0xa4b2a3(0xb0)](parseInt(_0x2ea42b[_0xa4b2a3(_0x597c6c._0x1b062b)](_0x58a0a1,0x2),0x10));}return _0x327ace;}function _0x348eff(_0x48e705){const _0xc44e9a=_0x44770d;let _0x68041a='';for(let _0x3759d3=0x0;_0x3759d3<_0x48e705[_0xc44e9a(0xd7)];_0x3759d3++){_0x68041a+=_0x48e705[_0xc44e9a(0xab)](_0x3759d3)[_0xc44e9a(_0x4a0de5._0x3ec594)](0x10)['padStart'](0x2,'0');}return BigInt(_0x29c976[_0xc44e9a(0x9c)]('0x',_0x68041a));}function _0x36c501(_0x2f6896){const _0x3af7f5=_0x44770d;function _0x138c24(_0x2b29e4,_0x9ed02b){return _0x2b29e4>>>_0x9ed02b|_0x2b29e4<<0x20-_0x9ed02b;}var _0x3a6e01=Math[_0x3af7f5(0x91)],_0x2b9fbb=_0x29c976[_0x3af7f5(_0x263162._0x1ef0b7)](_0x3a6e01,0x2,0x20),_0x7fa012='length',_0x255f31,_0x32aaf6,_0x1e34c2='',_0x234068=[],_0x1ba105=_0x2f6896[_0x7fa012]*0x8,_0x25eeff=_0x36c501['h']=_0x36c501['h']||[],_0x305e31=_0x36c501['k']=_0x36c501['k']||[],_0xa1590d=_0x305e31[_0x7fa012],_0x307a59={};for(var _0x13bc11=0x2;_0xa1590d<0x40;_0x13bc11++){if(!_0x307a59[_0x13bc11]){for(_0x255f31=0x0;_0x255f31<0x139;_0x255f31+=_0x13bc11){_0x307a59[_0x255f31]=_0x13bc11;}_0x25eeff[_0xa1590d]=_0x29c976[_0x3af7f5(0xca)](_0x29c976['otEMD'](_0x3a6e01,_0x13bc11,0.5)*_0x2b9fbb,0x0),_0x305e31[_0xa1590d++]=_0x29c976[_0x3af7f5(_0x263162._0x12082e)](_0x3a6e01(_0x13bc11,0x1/0x3),_0x2b9fbb)|0x0;}}_0x2f6896+='\u0080';while(_0x29c976['aeLVN'](_0x2f6896[_0x7fa012],0x40)-0x38)_0x2f6896+='\x00';for(_0x255f31=0x0;_0x255f31<_0x2f6896[_0x7fa012];_0x255f31++){_0x32aaf6=_0x2f6896[_0x3af7f5(_0x263162._0x4dd2bd)](_0x255f31);if(_0x29c976[_0x3af7f5(_0x263162._0x59c305)](_0x32aaf6,0x8))return;_0x234068[_0x255f31>>0x2]|=_0x32aaf6<<(0x3-_0x255f31)%0x4*0x8;}_0x234068[_0x234068[_0x7fa012]]=_0x29c976[_0x3af7f5(_0x263162._0x216764)](_0x1ba105,_0x2b9fbb)|0x0,_0x234068[_0x234068[_0x7fa012]]=_0x1ba105;for(_0x32aaf6=0x0;_0x32aaf6<_0x234068[_0x7fa012];){var _0x200dda=_0x234068[_0x3af7f5(_0x263162._0x1f0976)](_0x32aaf6,_0x32aaf6+=0x10),_0xc95345=_0x25eeff;_0x25eeff=_0x25eeff['slice'](0x0,0x8);for(_0x255f31=0x0;_0x255f31<0x40;_0x255f31++){var _0x156dc0=_0x200dda[_0x255f31-0xf],_0x4889da=_0x200dda[_0x255f31-0x2],_0x45516d=_0x25eeff[0x0],_0x47d31a=_0x25eeff[0x4],_0x3c3e00=_0x25eeff[0x7]+_0x29c976[_0x3af7f5(0xc7)](_0x138c24(_0x47d31a,0x6)^_0x138c24(_0x47d31a,0xb),_0x138c24(_0x47d31a,0x19))+_0x29c976[_0x3af7f5(0xc7)](_0x47d31a&_0x25eeff[0x5],_0x29c976[_0x3af7f5(0xbc)](~_0x47d31a,_0x25eeff[0x6]))+_0x305e31[_0x255f31]+(_0x200dda[_0x255f31]=_0x255f31<0x10?_0x200dda[_0x255f31]:_0x29c976['yXevp'](_0x29c976['iYKyn'](_0x200dda[_0x255f31-0x10],_0x29c976[_0x3af7f5(0xc7)](_0x138c24(_0x156dc0,0x7)^_0x138c24(_0x156dc0,0x12),_0x156dc0>>>0x3)),_0x200dda[_0x255f31-0x7])+(_0x29c976[_0x3af7f5(_0x263162._0x181609)](_0x138c24(_0x4889da,0x11),_0x138c24(_0x4889da,0x13))^_0x29c976[_0x3af7f5(_0x263162._0x1ed54d)](_0x4889da,0xa))|0x0),_0x15fa92=(_0x29c976[_0x3af7f5(_0x263162._0x54fd6d)](_0x138c24,_0x45516d,0x2)^_0x29c976[_0x3af7f5(0xb9)](_0x138c24,_0x45516d,0xd)^_0x138c24(_0x45516d,0x16))+(_0x29c976['owudR'](_0x45516d,_0x25eeff[0x1])^_0x45516d&_0x25eeff[0x2]^_0x25eeff[0x1]&_0x25eeff[0x2]);_0x25eeff=[_0x29c976[_0x3af7f5(0x9c)](_0x3c3e00,_0x15fa92)|0x0][_0x3af7f5(_0x263162._0x37bd9f)](_0x25eeff),_0x25eeff[0x4]=_0x29c976[_0x3af7f5(_0x263162._0x379c07)](_0x25eeff[0x4]+_0x3c3e00,0x0);}for(_0x255f31=0x0;_0x255f31<0x8;_0x255f31++){_0x25eeff[_0x255f31]=_0x25eeff[_0x255f31]+_0xc95345[_0x255f31]|0x0;}}for(_0x255f31=0x0;_0x255f31<0x8;_0x255f31++){for(_0x32aaf6=0x3;_0x32aaf6+0x1;_0x32aaf6--){var _0x591dd0=_0x25eeff[_0x255f31]>>_0x32aaf6*0x8&0xff;_0x1e34c2+=(_0x591dd0<0x10?0x0:'')+_0x591dd0[_0x3af7f5(0xae)](0x10);}}return _0x1e34c2;}class LicenseManager{static validate(_0x2c7060,_0x2dbf5b={}){const _0x2d9cc6=_0x44770d;if(!_0x2c7060)return{'valid':![],'tier':null,'reason':_0x29c976[_0x2d9cc6(0x93)]};const _0x3d3180=_0x2c7060['trim'](),_0x5f496e=_0x3d3180['toUpperCase'](),_0x4c7b75=_0x5f496e[_0x2d9cc6(0x94)]('-'),_0x5033f7=_0x2dbf5b[_0x2d9cc6(_0x3d00e3._0x50812e)]!==undefined&&_0x2dbf5b['mockTime']!==null?_0x2dbf5b[_0x2d9cc6(_0x3d00e3._0x50812e)]:Date[_0x2d9cc6(_0x3d00e3._0x2ea0d6)]();let _0x50516a=0x0;_0x2dbf5b[_0x2d9cc6(_0x3d00e3._0x407cb5)]&&(_0x50516a=_0x29c976[_0x2d9cc6(_0x3d00e3._0x327fa6)](parseInt,_0x2dbf5b[_0x2d9cc6(0x9d)]['getItem'](_0x2d9cc6(_0x3d00e3._0x456656))||'0',0xa),(_0x2dbf5b['mockTime']===undefined||_0x2dbf5b[_0x2d9cc6(_0x3d00e3._0x186dd9)]===null)&&_0x2dbf5b[_0x2d9cc6(0x9d)]['setItem'](_0x2d9cc6(0xd8),_0x5033f7[_0x2d9cc6(0xae)]()));if((_0x2dbf5b[_0x2d9cc6(_0x3d00e3._0x357a78)]===undefined||_0x2dbf5b['mockTime']===null)&&_0x5033f7<_0x50516a){if(_0x2dbf5b[_0x2d9cc6(0xb8)])_0x2dbf5b['onAnomaly']();return{'valid':![],'tier':null,'reason':_0x2d9cc6(_0x3d00e3._0x5e063a)};}const _0x2875d9=typeof atob!==_0x2d9cc6(0x9a)?atob:_0x56371c=>Buffer[_0x2d9cc6(0xd6)](_0x56371c,'base64')[_0x2d9cc6(0xae)](_0x2d9cc6(0xc4));if(_0x5f496e['startsWith'](_0x2d9cc6(_0x3d00e3._0xd08296)))try{const _0x48cd97=_0x3d3180[_0x2d9cc6(0xcf)](0x9),_0xcd9538=_0x2875d9(_0x48cd97),_0x5ff1f8=new Uint8Array(_0xcd9538[_0x2d9cc6(_0x3d00e3._0xc91e56)]);for(let _0x5adbda=0x0;_0x5adbda<_0xcd9538[_0x2d9cc6(0xd7)];_0x5adbda++){_0x5ff1f8[_0x5adbda]=_0xcd9538[_0x2d9cc6(0xab)](_0x5adbda);}let _0x5e2640='';for(let _0x3cdca9=0x0;_0x3cdca9<_0x5ff1f8[_0x2d9cc6(_0x3d00e3._0x1ad311)];_0x3cdca9++){_0x5e2640+=_0x5ff1f8[_0x3cdca9][_0x2d9cc6(_0x3d00e3._0x264a10)](0x10)[_0x2d9cc6(0xba)](0x2,'0');}const _0x1c06c2=BigInt(_0x29c976[_0x2d9cc6(0x9c)]('0x',_0x5e2640)),_0x1c45dc=_0x2639cd(_0x1c06c2,_0x2f87a6,_0x325d1c),_0x14f853=_0x404405(_0x1c45dc);if(_0x14f853[_0x2d9cc6(_0x3d00e3._0x4a9df8)](_0x2d9cc6(0xc0))){const _0xe5cbc=parseInt(_0x14f853[_0x2d9cc6(0xcf)](0xb),0xa);if(!isNaN(_0xe5cbc)){if(_0x29c976[_0x2d9cc6(_0x3d00e3._0x400df0)](_0x5033f7,_0xe5cbc))return{'valid':!![],'tier':'TEAMS','expires':_0xe5cbc};if(_0x2dbf5b[_0x2d9cc6(0xc1)])_0x2dbf5b[_0x2d9cc6(0xc1)](_0x2d9cc6(_0x3d00e3._0x395d17));return{'valid':![],'tier':null,'reason':_0x2d9cc6(_0x3d00e3._0x482066)};}}}catch(_0x387bb3){return{'valid':![],'tier':null,'reason':_0x29c976[_0x2d9cc6(0xc6)]};}if(_0x5f496e[_0x2d9cc6(0xa9)](_0x29c976[_0x2d9cc6(0xc2)]))try{const _0xa474cf=_0x3d3180[_0x2d9cc6(0xcf)](0x7),_0x3a62d8=_0x2875d9(_0xa474cf),_0x4af084=new Uint8Array(_0x3a62d8[_0x2d9cc6(_0x3d00e3._0xc91e56)]);for(let _0x17e443=0x0;_0x17e443<_0x3a62d8['length'];_0x17e443++){_0x4af084[_0x17e443]=_0x3a62d8[_0x2d9cc6(0xab)](_0x17e443);}let _0x154a7e='';for(let _0x49a683=0x0;_0x49a683<_0x4af084[_0x2d9cc6(0xd7)];_0x49a683++){_0x154a7e+=_0x4af084[_0x49a683][_0x2d9cc6(_0x3d00e3._0x264a10)](0x10)[_0x2d9cc6(_0x3d00e3._0x3236e2)](0x2,'0');}const _0x4655de=BigInt(_0x29c976[_0x2d9cc6(0xce)]('0x',_0x154a7e)),_0x9e345b=_0x2639cd(_0x4655de,_0x2f87a6,_0x325d1c),_0x2c96d8=_0x29c976[_0x2d9cc6(_0x3d00e3._0x437b70)](_0x404405,_0x9e345b);if(_0x2c96d8[_0x2d9cc6(0xa9)]('ZTDS-LIC-')){const _0x2b11f1=_0x2c96d8[_0x2d9cc6(_0x3d00e3._0x413c63)]('-');if(_0x2b11f1[_0x2d9cc6(_0x3d00e3._0x1ad311)]>=0x5){const _0x527f53=_0x2b11f1[0x2],_0x3f8f75=parseInt(_0x2b11f1[0x4],0xa);if(!_0x29c976[_0x2d9cc6(_0x3d00e3._0x39f16d)](isNaN,_0x3f8f75)){if(_0x5033f7<_0x3f8f75)return{'valid':!![],'tier':_0x527f53,'expires':_0x3f8f75};if(_0x2dbf5b[_0x2d9cc6(_0x3d00e3._0xcef8c6)])_0x2dbf5b[_0x2d9cc6(_0x3d00e3._0x4bce95)](_0x2d9cc6(0x98));return{'valid':![],'tier':null,'reason':_0x2d9cc6(_0x3d00e3._0x38f1d3)};}}}}catch(_0x4a48b5){return{'valid':![],'tier':null,'reason':_0x2d9cc6(0xb2)};}if(_0x4c7b75['length']===0x4&&_0x4c7b75[0x0]==='PS'&&[_0x2d9cc6(_0x3d00e3._0x4dad0e),'TEAMS',_0x29c976[_0x2d9cc6(0xa6)],_0x29c976[_0x2d9cc6(_0x3d00e3._0x52c4bf)],_0x29c976[_0x2d9cc6(0xd1)]]['includes'](_0x4c7b75[0x1])){const _0x31e900=_0x4c7b75[0x1],_0x3c0cb3=_0x4c7b75[0x2],_0x5b68ee=_0x4c7b75[0x3],_0xbccdae=_0x2d9cc6(_0x3d00e3._0x933bbf),_0x1086c4=_0x29c976['iYKyn'](_0x3c0cb3+_0xbccdae,_0x31e900);let _0x11c3fa=0x0;for(let _0x2af9fe=0x0;_0x2af9fe<_0x1086c4[_0x2d9cc6(0xd7)];_0x2af9fe++){_0x11c3fa+=_0x1086c4[_0x2d9cc6(0xab)](_0x2af9fe)*(_0x2af9fe+0x1);}const _0x1d52d4=_0x29c976[_0x2d9cc6(_0x3d00e3._0x10eb44)](_0x11c3fa,0x270f)['toString']()['padStart'](0x4,'0');if(_0x5b68ee===_0x1d52d4)return{'valid':!![],'tier':_0x31e900};}if(_0x3d3180[_0x2d9cc6(0xa9)](_0x2d9cc6(_0x3d00e3._0x2882c7))&&_0x3d3180[_0x2d9cc6(_0x3d00e3._0x91488f)]('.')['length']===0x3)try{const [_0x55adb8,_0x1c983e,_0x36cac5]=_0x3d3180['split']('.');let _0x44600f=_0x36cac5[_0x2d9cc6(0x97)](/-/g,'+')[_0x2d9cc6(_0x3d00e3._0x1a46f1)](/_/g,'/');while(_0x29c976[_0x2d9cc6(_0x3d00e3._0xe00c16)](_0x44600f['length'],0x4))_0x44600f+='=';const _0x48a2f2=_0x29c976['WqMNm'](_0x2875d9,_0x44600f);let _0x2480f4='';for(let _0x5a9a79=0x0;_0x5a9a79<_0x48a2f2['length'];_0x5a9a79++){_0x2480f4+=_0x48a2f2[_0x2d9cc6(0xab)](_0x5a9a79)[_0x2d9cc6(0xae)](0x10)[_0x2d9cc6(_0x3d00e3._0x3236e2)](0x2,'0');}const _0xfc4c4f=BigInt('0x'+_0x2480f4),_0x75cf7f=_0x2639cd(_0xfc4c4f,_0x2f87a6,_0x325d1c);let _0xb4a870=_0x75cf7f['toString'](0x10);if(_0x29c976[_0x2d9cc6(_0x3d00e3._0x475cc1)](_0x29c976[_0x2d9cc6(0xcb)](_0xb4a870['length'],0x2),0x0))_0xb4a870='0'+_0xb4a870;const _0x3ce109=_0x36c501(_0x29c976[_0x2d9cc6(_0x3d00e3._0xedc29b)](_0x55adb8,'.')+_0x1c983e);if(_0xb4a870['endsWith'](_0x3ce109)){const _0x261276=_0x2875d9(_0x1c983e[_0x2d9cc6(_0x3d00e3._0x1a46f1)](/-/g,'+')[_0x2d9cc6(_0x3d00e3._0x1a46f1)](/_/g,'/')),_0x27ab89=JSON[_0x2d9cc6(_0x3d00e3._0x1501e8)](_0x261276);if(_0x27ab89[_0x2d9cc6(_0x3d00e3._0x487ba9)]&&_0x29c976['zdDUH'](_0x5033f7/0x3e8,_0x27ab89[_0x2d9cc6(0x9f)]))return{'valid':!![],'tier':_0x27ab89['tier']||_0x2d9cc6(_0x3d00e3._0x4dad0e),'expires':_0x27ab89['exp']*0x3e8};else{if(_0x2dbf5b['onExpired'])_0x2dbf5b[_0x2d9cc6(_0x3d00e3._0xcef8c6)]('JWT');return{'valid':![],'tier':null,'reason':_0x29c976[_0x2d9cc6(0xc8)]};}}}catch(_0x1a3e58){return{'valid':![],'tier':null,'reason':'JWT\x20validation\x20failed'};}return{'valid':![],'tier':null,'reason':_0x29c976[_0x2d9cc6(0xb7)]};}}typeof globalThis!=='undefined'&&(globalThis[_0x44770d(_0x372b82._0x36eeb5)]=LicenseManager),typeof _0x587584!==_0x44770d(0x9a)&&(_0x587584[_0x44770d(0xdc)]=LicenseManager),typeof window!==_0x29c976[_0x44770d(_0x372b82._0x2637e8)]&&(window[_0x44770d(0xdc)]=LicenseManager),typeof exports!==_0x29c976[_0x44770d(_0x372b82._0x4eb87c)]&&(_0x29c976[_0x44770d(0x95)](typeof module,_0x44770d(0x9a))&&module['exports']&&(module[_0x44770d(0xbf)]=LicenseManager),exports[_0x44770d(_0x372b82._0x36eeb5)]=LicenseManager);}(typeof globalThis!==_0x1bad3b(0x9a)?globalThis:typeof window!=='undefined'?window:this));
|
|
11
|
+
function _0x4f6d(){const _0x478569=['zNjVBunOyxjdB2rL','mJm4mtuWotbPvuDcweu','y2HHCKnVzgvbDa','y3fOrw8','y29Uy2f0','sLDuihzHBgLKyxrPB24GzMfPBgvK','Dg9tDhjPBMC','ota5nJu3ouj4EeTAwq','C1fSzem','weXVtuu','Dw5KzwzPBMvK','Dg9vChbLCKnHC2u','wfjAt0G','mZaYqvniBKT1','BgvUz3rO','zxHW','ntiWnZu1mgD3B0zIBG','ru5urvjquKLtrq','Bw9JA1rPBwu','mJeZmtC5nZKXmdqWntaZndq2nZGYmZm0nti0mJm4mdm5ody4nJG4ndi2oda1mde5nde1mZGWntC3ntK1mZyWodK2mdK5mdGWmJqYode3mJK3nJa1nty5mJiXodG4mta1nJu1ndeYmdeZmJe5otaZnZq2mZCYmti3nZyXndG4ntCXota1ntmXotiZodK2mdGZnJq5ota3ntq5mZC5oteYntq2mdGXmdK3mJCXmti3mZq0ndC3mdq4ntq4odi3ody5ndy4mdu1ndCWmZeXndi1mZa4nJu1mdq0mZa5nJG2mJG3nJaZmte0otqXmJKXntq5nta4nJuXntG3mZu4mtyYnJG2mtiYntGXmdGYoty3ode4oti1odmXnZe0mJe2mdu2nJG5otG5nZKWnJq3odiZnZG3mJKZmJiWnZCXnZKWmJi1ode4odq5nZyYndi3mdyXnJKZmJm1nda0ntyYody1mJy0mJa3ndi0mZq4nJG1ntK4nJyYmte3mtyZndCXmZm2ode0mJKZotu0nZCYnty3mdu3ndyYnZy5nJi2mdCZmti1nZq5ntK2ndiWnJu5mJK0nJiXmtqXndKYotyWnJy4mti1mJC1mdu4mZC2mdGYmti3mZa4nZq3mdq5mtuZntiXmtK3ndCWmJi5mtGYndC5nJm4ody2mZaZntaZnJuXmtKYmdy2mJC2nZa1ote0mda3mJG1mJm4mtm3ndyXodqYota4ntC4nZi5ntG4ndCWodC2oteYmZy5mdK5mda1mde3mdmYmdm0otqXnJaYmdy5nde2ndGYnJm1mtqXmtC3mdy1ntG3ote2ote','t0vn','tM8GA2v5ihbYB3zPzgvK','CvPXC0y','u3HYwva','wePhCu4','sLDu','ALbXtNa','Cg93','y3Diz08','BM93','sw52ywXPzcbMB3jTyxq','u3fwDKy','y2HSs2G','tgLJzw5Zzu1HBMfNzxi','DhjPBq','mZi5A1L6zeX3','yxzsy2u','C3bSAxq','yMfZzty0','ugLSB3q','A3reBwq','mJDfrwLTwfC','Aer0vfO','DuLQuxu','qNfHB3C','uLnbigrLy3j5ChrPB24GzMfPBgvK','sLDuigv4CgLYzwq','nta1mZHxuvHxA0m','txnTBKi','mtK3ndm2rwHJthjc','vwzoB2u','CgfYC2u','wLreu19tquXuxZiWmJzFiuaJ','Duvuwfq','CMvWBgfJzq','yMLUyxj5','EKrUDfO','uLnb','C3rVCMfNzq','vevbtvm','CgfKu3rHCNq','DhbnzMu','C3vIC3rYAw5N','wwDvAvu','DgLLCG','zMj2wuq','A3fyy2C','oty3nJa4wNDUEgzM','ndiZt01cswvm','Bvn3B3G','uLnbigTLEsbLEhbPCMvK','ugLSB3qGzxHWAxjLza','C3rHCNrZv2L0Aa','sfblvNi','rKrPA1q','zxHWB3j0CW','u0rl','ufmTuLnblq','C3vIC3rY','C2v0sxrLBq','C2XPy2u','B3LAtM4','wLreuY1qsuXpvc0','AuH6y3O','ChnFBgfZDf9ZzwvUx3rPBwu','B25fEhbPCMvK','zxLk','r2XOzhC','z1PUyMm','z2v0sxrLBq'];_0x4f6d=function(){return _0x478569;};return _0x4f6d();}const _0x3caf85=_0x270d;function _0x270d(_0x5e032c,_0x295295){_0x5e032c=_0x5e032c-0x189;const _0x4f6d97=_0x4f6d();let _0x270dd0=_0x4f6d97[_0x5e032c];if(_0x270d['nBTeUp']===undefined){var _0xee8ed=function(_0x1eaba7){const _0xba791a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1e6dbb='',_0xc3acdd='';for(let _0x70a0b1=0x0,_0x2e57d1,_0x27b19b,_0x5d7082=0x0;_0x27b19b=_0x1eaba7['charAt'](_0x5d7082++);~_0x27b19b&&(_0x2e57d1=_0x70a0b1%0x4?_0x2e57d1*0x40+_0x27b19b:_0x27b19b,_0x70a0b1++%0x4)?_0x1e6dbb+=String['fromCharCode'](0xff&_0x2e57d1>>(-0x2*_0x70a0b1&0x6)):0x0){_0x27b19b=_0xba791a['indexOf'](_0x27b19b);}for(let _0x24e01e=0x0,_0x40a2a5=_0x1e6dbb['length'];_0x24e01e<_0x40a2a5;_0x24e01e++){_0xc3acdd+='%'+('00'+_0x1e6dbb['charCodeAt'](_0x24e01e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xc3acdd);};_0x270d['XuvblX']=_0xee8ed,_0x270d['rRtYjp']={},_0x270d['nBTeUp']=!![];}const _0x3ec574=_0x4f6d97[0x0],_0x268eb2=_0x5e032c+_0x3ec574,_0x3b32c8=_0x270d['rRtYjp'][_0x268eb2];return!_0x3b32c8?(_0x270dd0=_0x270d['XuvblX'](_0x270dd0),_0x270d['rRtYjp'][_0x268eb2]=_0x270dd0):_0x270dd0=_0x3b32c8,_0x270dd0;}(function(_0x4bab35,_0x195c2f){const _0xcc0ec={_0x5c923c:0x1b8,_0x82e671:0x19d,_0x4fd97b:0x1a5,_0x47bf3a:0x1de,_0x305d49:0x1a3,_0x103828:0x1b7,_0x3decf6:0x1d5,_0xe6b6c:0x1cf},_0x28b505=_0x270d,_0x1234a9=_0x4bab35();while(!![]){try{const _0x692bb9=-parseInt(_0x28b505(_0xcc0ec._0x5c923c))/0x1*(parseInt(_0x28b505(0x1db))/0x2)+-parseInt(_0x28b505(_0xcc0ec._0x82e671))/0x3*(-parseInt(_0x28b505(_0xcc0ec._0x4fd97b))/0x4)+parseInt(_0x28b505(_0xcc0ec._0x47bf3a))/0x5+parseInt(_0x28b505(_0xcc0ec._0x305d49))/0x6*(parseInt(_0x28b505(0x197))/0x7)+parseInt(_0x28b505(_0xcc0ec._0x103828))/0x8+parseInt(_0x28b505(_0xcc0ec._0x3decf6))/0x9+-parseInt(_0x28b505(_0xcc0ec._0xe6b6c))/0xa;if(_0x692bb9===_0x195c2f)break;else _0x1234a9['push'](_0x1234a9['shift']());}catch(_0x504ec1){_0x1234a9['push'](_0x1234a9['shift']());}}}(_0x4f6d,0x8aa72),function(_0x386bb6){const _0x3e0326={_0x39f55d:0x19b,_0xc9b232:0x1ad,_0x121389:0x1e2,_0x3b6fa9:0x1ca,_0xdcd6c9:0x18d,_0x18081d:0x1d3,_0x30102e:0x192,_0x950a4b:0x1e1,_0x5713c5:0x195,_0x575008:0x1d8,_0xf812b1:0x1d8,_0x1b38ca:0x1bf,_0xa934f8:0x1bf,_0x5f376e:0x195},_0xa31cd8={_0x573f2a:0x189,_0x3692fd:0x196,_0x5a3de0:0x199,_0x74c336:0x193,_0x7a2c51:0x191,_0x26efff:0x1ae,_0x1f9b66:0x1c8,_0x5e3dc6:0x1d4,_0x3a1565:0x1e0,_0x33ee46:0x1d8,_0x141448:0x1bc,_0x4f9e22:0x1b2,_0x51203d:0x1dc,_0xe2693:0x1b0,_0x25ee33:0x1c6,_0xa4dd55:0x19e,_0x13d450:0x1af,_0x2421a7:0x1d6,_0x56fa96:0x1bb,_0x492652:0x1bc,_0x13c3d2:0x1b2,_0x118f3d:0x1dc,_0x122cfb:0x19c,_0xb438f9:0x1dc,_0x5a1c08:0x1cb,_0x3ee3ce:0x1cc,_0x514150:0x1df,_0x2a5e74:0x1a8,_0x540a0e:0x1bc,_0x64e5ab:0x199,_0x108a0a:0x1aa,_0x461e99:0x1d0,_0x502283:0x1d4,_0x5400a9:0x1da,_0x555ff2:0x18e,_0x27abda:0x1a7,_0x677e42:0x1a6,_0x20bd39:0x1b4,_0x241a4a:0x1dd,_0x3d0f71:0x1b1},_0x31c5dc={_0xe20713:0x18f,_0x3e61db:0x1dc,_0x4cd077:0x1bd,_0x71cd9c:0x1b5,_0x27b76b:0x1a0,_0x46d344:0x1c7,_0x18f2f8:0x1d7,_0x259651:0x19f,_0x594fc9:0x1d2,_0x1cad60:0x1d4},_0x36cda3={_0x3f539c:0x18a,_0x15307f:0x1c5},_0x5590d0={_0x39ac4a:0x1d4,_0x3808fc:0x18e,_0x5bfb6c:0x1dc,_0x44dd41:0x1ce,_0x9af6cc:0x1c2},_0x4b0e02=_0x270d,_0x8ed665={'NYkic':function(_0x3302eb,_0x5d48b9){return _0x3302eb===_0x5d48b9;},'jPqNp':function(_0x5bb8e4,_0x84a0){return _0x5bb8e4%_0x84a0;},'kqXcg':function(_0x4b8525,_0x1c274a){return _0x4b8525/_0x1c274a;},'avRce':function(_0x3b44d9,_0x25f9c0,_0x135a76){return _0x3b44d9(_0x25f9c0,_0x135a76);},'SxrYP':function(_0x4b84ee,_0x5ebc40){return _0x4b84ee<_0x5ebc40;},'chlKh':function(_0x4bad6c,_0x33bf00){return _0x4bad6c-_0x33bf00;},'eWGmz':function(_0x2bde74,_0x27edcb){return _0x2bde74|_0x27edcb;},'pTZHz':function(_0x961705,_0x75b2e8){return _0x961705*_0x75b2e8;},'nlptk':function(_0x65e5bc,_0x1dde0e,_0x3a7528){return _0x65e5bc(_0x1dde0e,_0x3a7528);},'HPKVr':function(_0x5dce85,_0x384cca){return _0x5dce85<<_0x384cca;},'cqhEo':function(_0x5116cc,_0x49db84){return _0x5116cc+_0x49db84;},'fbvYD':function(_0x30a096,_0x39821f){return _0x30a096+_0x39821f;},'Bqaow':function(_0x52611f,_0x2666e5){return _0x52611f+_0x2666e5;},'XLoME':function(_0x39010c,_0x2d8caa){return _0x39010c^_0x2d8caa;},'uIjQu':function(_0x3cebfa,_0x16b471){return _0x3cebfa&_0x16b471;},'Glhdw':function(_0x1000b8,_0xba4da4){return _0x1000b8<_0xba4da4;},'iHzcz':function(_0x139307,_0x9b9028){return _0x139307+_0x9b9028;},'zDntZ':function(_0x3901b5,_0x2347cc){return _0x3901b5^_0x2347cc;},'aCXfS':function(_0xd38248,_0x27bef8){return _0xd38248&_0x27bef8;},'SqVvF':function(_0x257b49,_0x1d1f1c){return _0x257b49!==_0x1d1f1c;},'uETXT':'PS-PILOT-','XRZOH':function(_0x2b6bdb,_0x1f3f30,_0x3bdc13,_0x2fcf46){return _0x2b6bdb(_0x1f3f30,_0x3bdc13,_0x2fcf46);},'hDtTZ':function(_0x2fc796,_0x15f777){return _0x2fc796<_0x15f777;},'sQldC':_0x4b0e02(_0x3e0326._0x39f55d),'ktDmd':function(_0x389313,_0x55ed13){return _0x389313+_0x55ed13;},'ItMUO':_0x4b0e02(_0x3e0326._0xc9b232),'gZnbc':_0x4b0e02(_0x3e0326._0x121389),'MsmnB':function(_0x5c6b3c,_0xd0018f){return _0x5c6b3c+_0xd0018f;},'XJGqN':_0x4b0e02(_0x3e0326._0x3b6fa9),'YgUiU':function(_0x4c1a8d,_0x5b8361){return _0x4c1a8d===_0x5b8361;},'oSKOh':function(_0x4fdb66,_0x1e78a1){return _0x4fdb66(_0x1e78a1);},'UfNoe':function(_0x1cee40,_0x127176){return _0x1cee40<_0x127176;},'mSwox':_0x4b0e02(_0x3e0326._0xdcd6c9),'tpMfe':_0x4b0e02(_0x3e0326._0x18081d),'cwHgO':_0x4b0e02(_0x3e0326._0x30102e),'FDikT':function(_0x14ee50,_0x1bd25b){return _0x14ee50(_0x1bd25b);},'vOLOr':_0x4b0e02(0x1d8)},_0x29c35c=_0x8ed665[_0x4b0e02(0x1be)](BigInt,_0x4b0e02(_0x3e0326._0x950a4b)),_0x213259=0x10001n;function _0xf69f4c(_0x315d74,_0xb6d32c,_0x13f432){const _0x4421cf=_0x4b0e02;let _0x51fe29=0x1n;_0x315d74=_0x315d74%_0x13f432;while(_0xb6d32c>0x0n){if(_0x8ed665['NYkic'](_0xb6d32c%0x2n,0x1n))_0x51fe29=_0x8ed665[_0x4421cf(0x18e)](_0x51fe29*_0x315d74,_0x13f432);_0xb6d32c=_0x8ed665[_0x4421cf(0x1b6)](_0xb6d32c,0x2n),_0x315d74=_0x315d74*_0x315d74%_0x13f432;}return _0x51fe29;}function _0x141162(_0x3b3a09){const _0xafb882=_0x4b0e02;let _0x5226b5=_0x3b3a09[_0xafb882(_0x5590d0._0x39ac4a)](0x10);if(_0x8ed665[_0xafb882(_0x5590d0._0x3808fc)](_0x5226b5[_0xafb882(_0x5590d0._0x5bfb6c)],0x2)!==0x0)_0x5226b5='0'+_0x5226b5;let _0x55bd81='';for(let _0xf3610a=0x0;_0xf3610a<_0x5226b5[_0xafb882(0x1dc)];_0xf3610a+=0x2){_0x55bd81+=String[_0xafb882(_0x5590d0._0x44dd41)](_0x8ed665[_0xafb882(0x198)](parseInt,_0x5226b5[_0xafb882(_0x5590d0._0x9af6cc)](_0xf3610a,0x2),0x10));}return _0x55bd81;}function _0x151991(_0x1ccc8a){const _0x5df4a0=_0x4b0e02;let _0x5aba0a='';for(let _0x56f3c7=0x0;_0x8ed665[_0x5df4a0(0x18b)](_0x56f3c7,_0x1ccc8a[_0x5df4a0(0x1dc)]);_0x56f3c7++){_0x5aba0a+=_0x1ccc8a[_0x5df4a0(0x1d0)](_0x56f3c7)[_0x5df4a0(0x1d4)](0x10)[_0x5df4a0(0x1b0)](0x2,'0');}return BigInt('0x'+_0x5aba0a);}function _0x33ee15(_0x1b22c2){const _0xfc4b03=_0x4b0e02,_0x8ab0c3={'qZqsF':function(_0x17a16b,_0x529588){return _0x17a16b>>>_0x529588;},'oyZNn':function(_0x28a8b0,_0x1a04d9){return _0x8ed665['chlKh'](_0x28a8b0,_0x1a04d9);}};function _0xb4cef6(_0x53fbc1,_0x331722){const _0x2ca035=_0x270d;return _0x8ab0c3[_0x2ca035(_0x36cda3._0x3f539c)](_0x53fbc1,_0x331722)|_0x53fbc1<<_0x8ab0c3[_0x2ca035(_0x36cda3._0x15307f)](0x20,_0x331722);}var _0x34a099=Math[_0xfc4b03(_0x31c5dc._0xe20713)],_0x15724c=_0x34a099(0x2,0x20),_0x13d84b=_0xfc4b03(_0x31c5dc._0x3e61db),_0x39918f,_0x4ea97a,_0x35b5c0='',_0x5a0d61=[],_0x38f5d8=_0x1b22c2[_0x13d84b]*0x8,_0x53995b=_0x33ee15['h']=_0x33ee15['h']||[],_0x51b0ac=_0x33ee15['k']=_0x33ee15['k']||[],_0x1389a1=_0x51b0ac[_0x13d84b],_0x4a46cb={};for(var _0x1d1795=0x2;_0x1389a1<0x40;_0x1d1795++){if(!_0x4a46cb[_0x1d1795]){for(_0x39918f=0x0;_0x8ed665[_0xfc4b03(0x18b)](_0x39918f,0x139);_0x39918f+=_0x1d1795){_0x4a46cb[_0x39918f]=_0x1d1795;}_0x53995b[_0x1389a1]=_0x34a099(_0x1d1795,0.5)*_0x15724c|0x0,_0x51b0ac[_0x1389a1++]=_0x8ed665['eWGmz'](_0x8ed665['pTZHz'](_0x8ed665['nlptk'](_0x34a099,_0x1d1795,_0x8ed665['kqXcg'](0x1,0x3)),_0x15724c),0x0);}}_0x1b22c2+='\u0080';while(_0x1b22c2[_0x13d84b]%0x40-0x38)_0x1b22c2+='\x00';for(_0x39918f=0x0;_0x39918f<_0x1b22c2[_0x13d84b];_0x39918f++){_0x4ea97a=_0x1b22c2[_0xfc4b03(0x1d0)](_0x39918f);if(_0x4ea97a>>0x8)return;_0x5a0d61[_0x39918f>>0x2]|=_0x8ed665[_0xfc4b03(_0x31c5dc._0x4cd077)](_0x4ea97a,_0x8ed665[_0xfc4b03(0x18e)](_0x8ed665[_0xfc4b03(0x194)](0x3,_0x39918f),0x4)*0x8);}_0x5a0d61[_0x5a0d61[_0x13d84b]]=_0x38f5d8/_0x15724c|0x0,_0x5a0d61[_0x5a0d61[_0x13d84b]]=_0x38f5d8;for(_0x4ea97a=0x0;_0x8ed665['SxrYP'](_0x4ea97a,_0x5a0d61[_0x13d84b]);){var _0x4555d1=_0x5a0d61[_0xfc4b03(0x1c4)](_0x4ea97a,_0x4ea97a+=0x10),_0x176e44=_0x53995b;_0x53995b=_0x53995b[_0xfc4b03(0x1c4)](0x0,0x8);for(_0x39918f=0x0;_0x39918f<0x40;_0x39918f++){var _0x1c8490=_0x4555d1[_0x39918f-0xf],_0x2a1fd8=_0x4555d1[_0x39918f-0x2],_0x4fa14f=_0x53995b[0x0],_0x23933c=_0x53995b[0x4],_0x4fc55f=_0x8ed665[_0xfc4b03(0x1d1)](_0x8ed665[_0xfc4b03(_0x31c5dc._0x71cd9c)](_0x8ed665[_0xfc4b03(_0x31c5dc._0x27b76b)](_0x53995b[0x7]+(_0x8ed665[_0xfc4b03(0x1d7)](_0xb4cef6(_0x23933c,0x6),_0xb4cef6(_0x23933c,0xb))^_0xb4cef6(_0x23933c,0x19)),_0x8ed665[_0xfc4b03(0x1d7)](_0x23933c&_0x53995b[0x5],_0x8ed665[_0xfc4b03(0x19f)](~_0x23933c,_0x53995b[0x6]))),_0x51b0ac[_0x39918f]),_0x4555d1[_0x39918f]=_0x8ed665[_0xfc4b03(0x1cb)](_0x39918f,0x10)?_0x4555d1[_0x39918f]:_0x8ed665[_0xfc4b03(0x1b5)](_0x8ed665[_0xfc4b03(_0x31c5dc._0x46d344)](_0x4555d1[_0x39918f-0x10]+(_0xb4cef6(_0x1c8490,0x7)^_0xb4cef6(_0x1c8490,0x12)^_0x1c8490>>>0x3),_0x4555d1[_0x39918f-0x7]),_0x8ed665[_0xfc4b03(0x1ac)](_0xb4cef6(_0x2a1fd8,0x11),_0xb4cef6(_0x2a1fd8,0x13))^_0x2a1fd8>>>0xa)|0x0),_0x44057f=_0x8ed665[_0xfc4b03(_0x31c5dc._0x71cd9c)](_0xb4cef6(_0x4fa14f,0x2)^_0xb4cef6(_0x4fa14f,0xd)^_0xb4cef6(_0x4fa14f,0x16),_0x8ed665[_0xfc4b03(_0x31c5dc._0x18f2f8)](_0x4fa14f&_0x53995b[0x1],_0x8ed665[_0xfc4b03(_0x31c5dc._0x259651)](_0x4fa14f,_0x53995b[0x2]))^_0x53995b[0x1]&_0x53995b[0x2]);_0x53995b=[_0x4fc55f+_0x44057f|0x0][_0xfc4b03(_0x31c5dc._0x594fc9)](_0x53995b),_0x53995b[0x4]=_0x53995b[0x4]+_0x4fc55f|0x0;}for(_0x39918f=0x0;_0x39918f<0x8;_0x39918f++){_0x53995b[_0x39918f]=_0x53995b[_0x39918f]+_0x176e44[_0x39918f]|0x0;}}for(_0x39918f=0x0;_0x39918f<0x8;_0x39918f++){for(_0x4ea97a=0x3;_0x4ea97a+0x1;_0x4ea97a--){var _0x2aa6d3=_0x8ed665['aCXfS'](_0x53995b[_0x39918f]>>_0x4ea97a*0x8,0xff);_0x35b5c0+=(_0x2aa6d3<0x10?0x0:'')+_0x2aa6d3[_0xfc4b03(_0x31c5dc._0x1cad60)](0x10);}}return _0x35b5c0;}class LicenseManager{static validate(_0x9c23cd,_0x1e7285={}){const _0x560674=_0x4b0e02;if(!_0x9c23cd)return{'valid':![],'tier':null,'reason':_0x560674(_0xa31cd8._0x573f2a)};const _0x3fdd67=_0x9c23cd[_0x560674(_0xa31cd8._0x3692fd)](),_0x1aa420=_0x3fdd67[_0x560674(0x1d9)](),_0x1f1f7d=_0x1aa420[_0x560674(_0xa31cd8._0x5a3de0)]('-'),_0x311cde=_0x8ed665[_0x560674(_0xa31cd8._0x74c336)](_0x1e7285[_0x560674(0x1e0)],undefined)&&_0x1e7285[_0x560674(0x1e0)]!==null?_0x1e7285['mockTime']:Date[_0x560674(_0xa31cd8._0x7a2c51)]();let _0x5b4dda=0x0;_0x1e7285[_0x560674(_0xa31cd8._0x26efff)]&&(_0x5b4dda=parseInt(_0x1e7285[_0x560674(0x1ae)][_0x560674(0x1cd)](_0x560674(0x1c8))||'0',0xa),(_0x1e7285[_0x560674(0x1e0)]===undefined||_0x1e7285[_0x560674(0x1e0)]===null)&&_0x1e7285['storage'][_0x560674(0x1c3)](_0x560674(_0xa31cd8._0x1f9b66),_0x311cde[_0x560674(_0xa31cd8._0x5e3dc6)]()));if((_0x1e7285['mockTime']===undefined||_0x1e7285[_0x560674(_0xa31cd8._0x3a1565)]===null)&&_0x311cde<_0x5b4dda){if(_0x1e7285['onAnomaly'])_0x1e7285['onAnomaly']();return{'valid':![],'tier':null,'reason':'Clock\x20rollback\x20anomaly\x20detected'};}const _0x524c0e=typeof atob!==_0x560674(_0xa31cd8._0x33ee46)?atob:_0xbdd328=>Buffer['from'](_0xbdd328,_0x560674(0x19a))['toString'](_0x560674(0x1ab));if(_0x1aa420[_0x560674(_0xa31cd8._0x141448)](_0x8ed665[_0x560674(0x1a9)]))try{const _0x2383a9=_0x3fdd67[_0x560674(_0xa31cd8._0x4f9e22)](0x9),_0x446813=_0x524c0e(_0x2383a9),_0x114e88=new Uint8Array(_0x446813[_0x560674(_0xa31cd8._0x51203d)]);for(let _0x5912bd=0x0;_0x5912bd<_0x446813[_0x560674(0x1dc)];_0x5912bd++){_0x114e88[_0x5912bd]=_0x446813[_0x560674(0x1d0)](_0x5912bd);}let _0x3ed1b2='';for(let _0x33ce98=0x0;_0x33ce98<_0x114e88[_0x560674(0x1dc)];_0x33ce98++){_0x3ed1b2+=_0x114e88[_0x33ce98][_0x560674(0x1d4)](0x10)[_0x560674(_0xa31cd8._0xe2693)](0x2,'0');}const _0x1d95b1=BigInt(_0x8ed665['Bqaow']('0x',_0x3ed1b2)),_0x2f550=_0x8ed665[_0x560674(0x1da)](_0xf69f4c,_0x1d95b1,_0x213259,_0x29c35c),_0x4467bc=_0x141162(_0x2f550);if(_0x4467bc[_0x560674(0x1bc)](_0x560674(_0xa31cd8._0x25ee33))){const _0x33c4b5=parseInt(_0x4467bc[_0x560674(0x1b2)](0xb),0xa);if(!isNaN(_0x33c4b5)){if(_0x8ed665[_0x560674(_0xa31cd8._0xa4dd55)](_0x311cde,_0x33c4b5))return{'valid':!![],'tier':_0x560674(_0xa31cd8._0x13d450),'expires':_0x33c4b5};if(_0x1e7285['onExpired'])_0x1e7285['onExpired'](_0x8ed665[_0x560674(_0xa31cd8._0x2421a7)]);return{'valid':![],'tier':null,'reason':_0x560674(_0xa31cd8._0x56fa96)};}}}catch(_0x5b2640){return{'valid':![],'tier':null,'reason':'Pilot\x20decryption\x20failed'};}if(_0x1aa420[_0x560674(_0xa31cd8._0x492652)](_0x560674(0x1c1)))try{const _0x3508bc=_0x3fdd67[_0x560674(_0xa31cd8._0x13c3d2)](0x7),_0x32fc49=_0x524c0e(_0x3508bc),_0x5a5d01=new Uint8Array(_0x32fc49[_0x560674(0x1dc)]);for(let _0x33881d=0x0;_0x33881d<_0x32fc49[_0x560674(_0xa31cd8._0x118f3d)];_0x33881d++){_0x5a5d01[_0x33881d]=_0x32fc49[_0x560674(0x1d0)](_0x33881d);}let _0x209f4b='';for(let _0x42e553=0x0;_0x42e553<_0x5a5d01[_0x560674(0x1dc)];_0x42e553++){_0x209f4b+=_0x5a5d01[_0x42e553][_0x560674(0x1d4)](0x10)[_0x560674(0x1b0)](0x2,'0');}const _0x14249e=BigInt(_0x8ed665[_0x560674(_0xa31cd8._0x122cfb)]('0x',_0x209f4b)),_0x266d02=_0xf69f4c(_0x14249e,_0x213259,_0x29c35c),_0x38d0fa=_0x141162(_0x266d02);if(_0x38d0fa['startsWith']('ZTDS-LIC-')){const _0x45bda3=_0x38d0fa[_0x560674(_0xa31cd8._0x5a3de0)]('-');if(_0x45bda3[_0x560674(_0xa31cd8._0xb438f9)]>=0x5){const _0x158e9f=_0x45bda3[0x2],_0x297848=parseInt(_0x45bda3[0x4],0xa);if(!isNaN(_0x297848)){if(_0x8ed665[_0x560674(_0xa31cd8._0x5a1c08)](_0x311cde,_0x297848))return{'valid':!![],'tier':_0x158e9f,'expires':_0x297848};if(_0x1e7285[_0x560674(0x1c9)])_0x1e7285['onExpired'](_0x8ed665['ItMUO']);return{'valid':![],'tier':null,'reason':_0x560674(0x1ba)};}}}}catch(_0x9cf17c){return{'valid':![],'tier':null,'reason':_0x560674(0x1a1)};}if(_0x1f1f7d[_0x560674(0x1dc)]===0x4&&_0x1f1f7d[0x0]==='PS'&&['PRO','TEAMS',_0x560674(0x1c0),_0x8ed665[_0x560674(_0xa31cd8._0x3ee3ce)],_0x560674(_0xa31cd8._0x514150)]['includes'](_0x1f1f7d[0x1])){const _0x4cb2fc=_0x1f1f7d[0x1],_0x18e59c=_0x1f1f7d[0x2],_0xa694fd=_0x1f1f7d[0x3],_0x50a08c=_0x560674(_0xa31cd8._0x2a5e74),_0x40030c=_0x18e59c+_0x50a08c+_0x4cb2fc;let _0x40f7d9=0x0;for(let _0x595fcd=0x0;_0x595fcd<_0x40030c['length'];_0x595fcd++){_0x40f7d9+=_0x40030c['charCodeAt'](_0x595fcd)*_0x8ed665[_0x560674(0x1a4)](_0x595fcd,0x1);}const _0x49e359=_0x8ed665['jPqNp'](_0x40f7d9,0x270f)['toString']()[_0x560674(_0xa31cd8._0xe2693)](0x4,'0');if(_0xa694fd===_0x49e359)return{'valid':!![],'tier':_0x4cb2fc};}if(_0x3fdd67[_0x560674(_0xa31cd8._0x540a0e)](_0x8ed665[_0x560674(0x18c)])&&_0x8ed665[_0x560674(0x1b3)](_0x3fdd67[_0x560674(_0xa31cd8._0x5a3de0)]('.')[_0x560674(0x1dc)],0x3))try{const [_0x26d8c7,_0x4ea01a,_0x3d8b7e]=_0x3fdd67[_0x560674(_0xa31cd8._0x64e5ab)]('.');let _0xedff11=_0x3d8b7e[_0x560674(_0xa31cd8._0x108a0a)](/-/g,'+')['replace'](/_/g,'/');while(_0xedff11['length']%0x4)_0xedff11+='=';const _0x526954=_0x524c0e(_0xedff11);let _0x2fc273='';for(let _0x1ffaa4=0x0;_0x1ffaa4<_0x526954[_0x560674(_0xa31cd8._0x118f3d)];_0x1ffaa4++){_0x2fc273+=_0x526954[_0x560674(_0xa31cd8._0x461e99)](_0x1ffaa4)[_0x560674(_0xa31cd8._0x502283)](0x10)[_0x560674(0x1b0)](0x2,'0');}const _0x29e831=_0x8ed665['oSKOh'](BigInt,'0x'+_0x2fc273),_0xfedd64=_0x8ed665[_0x560674(_0xa31cd8._0x5400a9)](_0xf69f4c,_0x29e831,_0x213259,_0x29c35c);let _0x2e401d=_0xfedd64[_0x560674(0x1d4)](0x10);if(_0x8ed665[_0x560674(_0xa31cd8._0x555ff2)](_0x2e401d[_0x560674(_0xa31cd8._0x51203d)],0x2)!==0x0)_0x2e401d=_0x8ed665['MsmnB']('0',_0x2e401d);const _0x3a67a0=_0x33ee15(_0x26d8c7+'.'+_0x4ea01a);if(_0x2e401d['endsWith'](_0x3a67a0)){const _0x50563f=_0x524c0e(_0x4ea01a[_0x560674(_0xa31cd8._0x108a0a)](/-/g,'+')[_0x560674(0x1aa)](/_/g,'/')),_0x124e44=JSON[_0x560674(_0xa31cd8._0x27abda)](_0x50563f);if(_0x124e44[_0x560674(0x1dd)]&&_0x8ed665[_0x560674(_0xa31cd8._0x677e42)](_0x311cde/0x3e8,_0x124e44[_0x560674(0x1dd)]))return{'valid':!![],'tier':_0x124e44[_0x560674(_0xa31cd8._0x20bd39)]||'PRO','expires':_0x124e44[_0x560674(_0xa31cd8._0x241a4a)]*0x3e8};else{if(_0x1e7285['onExpired'])_0x1e7285[_0x560674(0x1c9)](_0x8ed665[_0x560674(0x1b9)]);return{'valid':![],'tier':null,'reason':_0x560674(0x1a2)};}}}catch(_0x46e1f4){return{'valid':![],'tier':null,'reason':_0x8ed665[_0x560674(_0xa31cd8._0x3d0f71)]};}return{'valid':![],'tier':null,'reason':_0x8ed665[_0x560674(0x190)]};}}typeof globalThis!=='undefined'&&(globalThis[_0x4b0e02(_0x3e0326._0x5713c5)]=LicenseManager),typeof _0x386bb6!==_0x4b0e02(_0x3e0326._0x575008)&&(_0x386bb6[_0x4b0e02(_0x3e0326._0x5713c5)]=LicenseManager),_0x8ed665[_0x4b0e02(0x193)](typeof window,_0x8ed665['vOLOr'])&&(window['LicenseManager']=LicenseManager),typeof exports!==_0x4b0e02(0x1d8)&&(typeof module!==_0x4b0e02(_0x3e0326._0xf812b1)&&module[_0x4b0e02(_0x3e0326._0x1b38ca)]&&(module[_0x4b0e02(_0x3e0326._0xa934f8)]=LicenseManager),exports[_0x4b0e02(_0x3e0326._0x5f376e)]=LicenseManager);}(typeof globalThis!==_0x3caf85(0x1d8)?globalThis:typeof window!==_0x3caf85(0x1d8)?window:this));
|