a2a-memory 0.11.5 → 0.11.6
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/LICENSE +7 -19
- package/README.md +1 -1
- package/dist/a2a/client.js +1 -252
- package/dist/a2a/discovery.js +1 -115
- package/dist/a2a/index.js +1 -8
- package/dist/a2a/types.js +1 -42
- package/dist/adapters/anthropic.js +1 -117
- package/dist/chunking/chunker.js +1 -163
- package/dist/claude/sync.js +1 -298
- package/dist/cli/commands/add.js +1 -80
- package/dist/cli/commands/claude-sync.js +1 -70
- package/dist/cli/commands/cleanup.js +1 -83
- package/dist/cli/commands/config.js +1 -79
- package/dist/cli/commands/edit.js +1 -69
- package/dist/cli/commands/embed.js +1 -92
- package/dist/cli/commands/extract.js +1 -103
- package/dist/cli/commands/health.js +1 -105
- package/dist/cli/commands/list.js +1 -46
- package/dist/cli/commands/migrate-chunks.js +1 -205
- package/dist/cli/commands/migrate-file-refs.js +1 -183
- package/dist/cli/commands/proficiency.js +1 -146
- package/dist/cli/commands/rm.js +1 -64
- package/dist/cli/commands/search.js +1 -90
- package/dist/cli/commands/setup-wizard.js +1 -387
- package/dist/cli/commands/setup.js +1 -170
- package/dist/cli/commands/skill.js +1 -151
- package/dist/cli/commands/status.js +1 -70
- package/dist/cli/commands/sync.js +1 -202
- package/dist/cli/commands/team.js +1 -142
- package/dist/cli/index.js +1 -87
- package/dist/config/manager.js +1 -372
- package/dist/db/database.js +1 -1400
- package/dist/embedding/e5-provider.js +1 -147
- package/dist/embedding/index.js +1 -34
- package/dist/embedding/local-provider.js +1 -157
- package/dist/embedding/openai-provider.js +1 -92
- package/dist/embedding/quantization.js +1 -89
- package/dist/extraction/dedup-manager.js +1 -161
- package/dist/extraction/emotion-filter.js +1 -33
- package/dist/extraction/extractor.js +1 -648
- package/dist/extraction/file-reference.js +1 -77
- package/dist/extraction/filter.js +1 -86
- package/dist/extraction/scorer.js +1 -142
- package/dist/extraction/similarity.js +1 -85
- package/dist/hooks/client-factory.js +1 -44
- package/dist/hooks/post-tool-use.js +1 -518
- package/dist/hooks/pre-compact.js +1 -209
- package/dist/hooks/session-end.js +1 -633
- package/dist/hooks/session-start.js +1 -549
- package/dist/hooks/shared.js +1 -110
- package/dist/hooks/user-prompt-submit.js +1 -316
- package/dist/i18n/index.js +1 -2
- package/dist/i18n/messages.js +1 -150
- package/dist/index.js +1 -43
- package/dist/lifecycle/cleanup-scheduler.js +1 -137
- package/dist/lifecycle/cleanup.js +1 -116
- package/dist/lifecycle/index.js +1 -13
- package/dist/lifecycle/quality-scorer.js +1 -46
- package/dist/lifecycle/tiering.js +1 -246
- package/dist/llm/client.js +1 -226
- package/dist/llm/index.js +1 -5
- package/dist/proficiency/actr-engine.js +1 -106
- package/dist/proficiency/detection.js +1 -77
- package/dist/proficiency/index.js +1 -9
- package/dist/proficiency/tracker.js +1 -173
- package/dist/proficiency/types.js +1 -8
- package/dist/providers/adapters.js +1 -140
- package/dist/providers/detector.js +1 -57
- package/dist/search/adaptive-router.js +1 -93
- package/dist/search/index.js +1 -9
- package/dist/search/ranker.js +1 -171
- package/dist/search/reranker.js +1 -155
- package/dist/session/parser.js +1 -130
- package/dist/skill/evaluator.js +1 -509
- package/dist/skill/index.js +1 -7
- package/dist/skill/types.js +1 -7
- package/dist/sync/client.js +1 -597
- package/dist/sync/encryption.js +1 -203
- package/dist/sync/index.js +1 -12
- package/dist/sync/queue.js +1 -214
- package/dist/sync/scheduler.js +1 -140
- package/dist/sync/synchronizer.js +1 -241
- package/dist/sync/team-synchronizer.js +1 -204
- package/dist/sync/vector-clock.js +1 -70
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +1 -132
- package/dist/utils/keychain.js +1 -170
- package/dist/utils/logger.js +1 -128
- package/package.json +14 -10
- package/dist/a2a/client.d.ts.map +0 -1
- package/dist/a2a/client.js.map +0 -1
- package/dist/a2a/discovery.d.ts.map +0 -1
- package/dist/a2a/discovery.js.map +0 -1
- package/dist/a2a/index.d.ts.map +0 -1
- package/dist/a2a/index.js.map +0 -1
- package/dist/a2a/types.d.ts.map +0 -1
- package/dist/a2a/types.js.map +0 -1
- package/dist/adapters/anthropic.d.ts.map +0 -1
- package/dist/adapters/anthropic.js.map +0 -1
- package/dist/chunking/chunker.d.ts.map +0 -1
- package/dist/chunking/chunker.js.map +0 -1
- package/dist/claude/sync.d.ts.map +0 -1
- package/dist/claude/sync.js.map +0 -1
- package/dist/cli/commands/add.d.ts.map +0 -1
- package/dist/cli/commands/add.js.map +0 -1
- package/dist/cli/commands/claude-sync.d.ts.map +0 -1
- package/dist/cli/commands/claude-sync.js.map +0 -1
- package/dist/cli/commands/cleanup.d.ts.map +0 -1
- package/dist/cli/commands/cleanup.js.map +0 -1
- package/dist/cli/commands/config.d.ts.map +0 -1
- package/dist/cli/commands/config.js.map +0 -1
- package/dist/cli/commands/edit.d.ts.map +0 -1
- package/dist/cli/commands/edit.js.map +0 -1
- package/dist/cli/commands/embed.d.ts.map +0 -1
- package/dist/cli/commands/embed.js.map +0 -1
- package/dist/cli/commands/extract.d.ts.map +0 -1
- package/dist/cli/commands/extract.js.map +0 -1
- package/dist/cli/commands/health.d.ts.map +0 -1
- package/dist/cli/commands/health.js.map +0 -1
- package/dist/cli/commands/list.d.ts.map +0 -1
- package/dist/cli/commands/list.js.map +0 -1
- package/dist/cli/commands/migrate-chunks.d.ts.map +0 -1
- package/dist/cli/commands/migrate-chunks.js.map +0 -1
- package/dist/cli/commands/migrate-file-refs.d.ts.map +0 -1
- package/dist/cli/commands/migrate-file-refs.js.map +0 -1
- package/dist/cli/commands/proficiency.d.ts.map +0 -1
- package/dist/cli/commands/proficiency.js.map +0 -1
- package/dist/cli/commands/rm.d.ts.map +0 -1
- package/dist/cli/commands/rm.js.map +0 -1
- package/dist/cli/commands/search.d.ts.map +0 -1
- package/dist/cli/commands/search.js.map +0 -1
- package/dist/cli/commands/setup-wizard.d.ts.map +0 -1
- package/dist/cli/commands/setup-wizard.js.map +0 -1
- package/dist/cli/commands/setup.d.ts.map +0 -1
- package/dist/cli/commands/setup.js.map +0 -1
- package/dist/cli/commands/skill.d.ts.map +0 -1
- package/dist/cli/commands/skill.js.map +0 -1
- package/dist/cli/commands/status.d.ts.map +0 -1
- package/dist/cli/commands/status.js.map +0 -1
- package/dist/cli/commands/sync.d.ts.map +0 -1
- package/dist/cli/commands/sync.js.map +0 -1
- package/dist/cli/commands/team.d.ts.map +0 -1
- package/dist/cli/commands/team.js.map +0 -1
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js.map +0 -1
- package/dist/config/manager.d.ts.map +0 -1
- package/dist/config/manager.js.map +0 -1
- package/dist/db/database.d.ts.map +0 -1
- package/dist/db/database.js.map +0 -1
- package/dist/embedding/e5-provider.d.ts.map +0 -1
- package/dist/embedding/e5-provider.js.map +0 -1
- package/dist/embedding/index.d.ts.map +0 -1
- package/dist/embedding/index.js.map +0 -1
- package/dist/embedding/local-provider.d.ts.map +0 -1
- package/dist/embedding/local-provider.js.map +0 -1
- package/dist/embedding/openai-provider.d.ts.map +0 -1
- package/dist/embedding/openai-provider.js.map +0 -1
- package/dist/embedding/quantization.d.ts.map +0 -1
- package/dist/embedding/quantization.js.map +0 -1
- package/dist/extraction/dedup-manager.d.ts.map +0 -1
- package/dist/extraction/dedup-manager.js.map +0 -1
- package/dist/extraction/emotion-filter.d.ts.map +0 -1
- package/dist/extraction/emotion-filter.js.map +0 -1
- package/dist/extraction/extractor.d.ts.map +0 -1
- package/dist/extraction/extractor.js.map +0 -1
- package/dist/extraction/file-reference.d.ts.map +0 -1
- package/dist/extraction/file-reference.js.map +0 -1
- package/dist/extraction/filter.d.ts.map +0 -1
- package/dist/extraction/filter.js.map +0 -1
- package/dist/extraction/scorer.d.ts.map +0 -1
- package/dist/extraction/scorer.js.map +0 -1
- package/dist/extraction/similarity.d.ts.map +0 -1
- package/dist/extraction/similarity.js.map +0 -1
- package/dist/hooks/client-factory.d.ts.map +0 -1
- package/dist/hooks/client-factory.js.map +0 -1
- package/dist/hooks/post-tool-use.d.ts.map +0 -1
- package/dist/hooks/post-tool-use.js.map +0 -1
- package/dist/hooks/pre-compact.d.ts.map +0 -1
- package/dist/hooks/pre-compact.js.map +0 -1
- package/dist/hooks/session-end.d.ts.map +0 -1
- package/dist/hooks/session-end.js.map +0 -1
- package/dist/hooks/session-start.d.ts.map +0 -1
- package/dist/hooks/session-start.js.map +0 -1
- package/dist/hooks/shared.d.ts.map +0 -1
- package/dist/hooks/shared.js.map +0 -1
- package/dist/hooks/user-prompt-submit.d.ts.map +0 -1
- package/dist/hooks/user-prompt-submit.js.map +0 -1
- package/dist/i18n/index.d.ts.map +0 -1
- package/dist/i18n/index.js.map +0 -1
- package/dist/i18n/messages.d.ts.map +0 -1
- package/dist/i18n/messages.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lifecycle/cleanup-scheduler.d.ts.map +0 -1
- package/dist/lifecycle/cleanup-scheduler.js.map +0 -1
- package/dist/lifecycle/cleanup.d.ts.map +0 -1
- package/dist/lifecycle/cleanup.js.map +0 -1
- package/dist/lifecycle/index.d.ts.map +0 -1
- package/dist/lifecycle/index.js.map +0 -1
- package/dist/lifecycle/quality-scorer.d.ts.map +0 -1
- package/dist/lifecycle/quality-scorer.js.map +0 -1
- package/dist/lifecycle/tiering.d.ts.map +0 -1
- package/dist/lifecycle/tiering.js.map +0 -1
- package/dist/llm/client.d.ts.map +0 -1
- package/dist/llm/client.js.map +0 -1
- package/dist/llm/index.d.ts.map +0 -1
- package/dist/llm/index.js.map +0 -1
- package/dist/proficiency/actr-engine.d.ts.map +0 -1
- package/dist/proficiency/actr-engine.js.map +0 -1
- package/dist/proficiency/detection.d.ts.map +0 -1
- package/dist/proficiency/detection.js.map +0 -1
- package/dist/proficiency/index.d.ts.map +0 -1
- package/dist/proficiency/index.js.map +0 -1
- package/dist/proficiency/tracker.d.ts.map +0 -1
- package/dist/proficiency/tracker.js.map +0 -1
- package/dist/proficiency/types.d.ts.map +0 -1
- package/dist/proficiency/types.js.map +0 -1
- package/dist/providers/adapters.d.ts.map +0 -1
- package/dist/providers/adapters.js.map +0 -1
- package/dist/providers/detector.d.ts.map +0 -1
- package/dist/providers/detector.js.map +0 -1
- package/dist/search/adaptive-router.d.ts.map +0 -1
- package/dist/search/adaptive-router.js.map +0 -1
- package/dist/search/index.d.ts.map +0 -1
- package/dist/search/index.js.map +0 -1
- package/dist/search/ranker.d.ts.map +0 -1
- package/dist/search/ranker.js.map +0 -1
- package/dist/search/reranker.d.ts.map +0 -1
- package/dist/search/reranker.js.map +0 -1
- package/dist/session/parser.d.ts.map +0 -1
- package/dist/session/parser.js.map +0 -1
- package/dist/skill/evaluator.d.ts.map +0 -1
- package/dist/skill/evaluator.js.map +0 -1
- package/dist/skill/index.d.ts.map +0 -1
- package/dist/skill/index.js.map +0 -1
- package/dist/skill/types.d.ts.map +0 -1
- package/dist/skill/types.js.map +0 -1
- package/dist/sync/client.d.ts.map +0 -1
- package/dist/sync/client.js.map +0 -1
- package/dist/sync/encryption.d.ts.map +0 -1
- package/dist/sync/encryption.js.map +0 -1
- package/dist/sync/index.d.ts.map +0 -1
- package/dist/sync/index.js.map +0 -1
- package/dist/sync/queue.d.ts.map +0 -1
- package/dist/sync/queue.js.map +0 -1
- package/dist/sync/scheduler.d.ts.map +0 -1
- package/dist/sync/scheduler.js.map +0 -1
- package/dist/sync/synchronizer.d.ts.map +0 -1
- package/dist/sync/synchronizer.js.map +0 -1
- package/dist/sync/team-synchronizer.d.ts.map +0 -1
- package/dist/sync/team-synchronizer.js.map +0 -1
- package/dist/sync/vector-clock.d.ts.map +0 -1
- package/dist/sync/vector-clock.js.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/utils/keychain.d.ts.map +0 -1
- package/dist/utils/keychain.js.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js.map +0 -1
|
@@ -1,117 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Anthropic Memory API Adapter
|
|
3
|
-
*
|
|
4
|
-
* A2A 메모리를 Anthropic의 Claude Memory API 형식으로 변환합니다.
|
|
5
|
-
* Anthropic Memory API가 공개되면 실제 연동으로 전환 가능합니다.
|
|
6
|
-
*
|
|
7
|
-
* @see https://www.anthropic.com/news/contextual-retrieval
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* A2A 메모리를 Anthropic 형식으로 변환
|
|
11
|
-
*/
|
|
12
|
-
export function toAnthropicFormat(memory) {
|
|
13
|
-
return {
|
|
14
|
-
id: memory.id,
|
|
15
|
-
content: memory.content,
|
|
16
|
-
type: mapCategoryToAnthropicType(memory.category),
|
|
17
|
-
source: 'assistant', // A2A는 AI가 추출한 메모리
|
|
18
|
-
created_at: memory.createdAt,
|
|
19
|
-
updated_at: memory.updatedAt,
|
|
20
|
-
metadata: {
|
|
21
|
-
category: memory.category,
|
|
22
|
-
tier: memory.tier,
|
|
23
|
-
tags: memory.tags,
|
|
24
|
-
projectPath: memory.projectPath,
|
|
25
|
-
sessionId: memory.sessionId,
|
|
26
|
-
accessCount: memory.accessCount,
|
|
27
|
-
lastAccessedAt: memory.lastAccessedAt,
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Anthropic 형식을 A2A 메모리 생성 입력으로 변환
|
|
33
|
-
*/
|
|
34
|
-
export function fromAnthropicFormat(anthropic) {
|
|
35
|
-
const metadata = anthropic.metadata || {};
|
|
36
|
-
// tier 타입 검증 및 fallback
|
|
37
|
-
const validTiers = ['working', 'episodic', 'semantic'];
|
|
38
|
-
const tier = typeof metadata.tier === 'string' && validTiers.includes(metadata.tier)
|
|
39
|
-
? metadata.tier
|
|
40
|
-
: 'episodic';
|
|
41
|
-
return {
|
|
42
|
-
content: anthropic.content,
|
|
43
|
-
category: mapAnthropicTypeToCategory(anthropic.type),
|
|
44
|
-
tier,
|
|
45
|
-
tags: Array.isArray(metadata.tags) ? metadata.tags : [],
|
|
46
|
-
projectPath: typeof metadata.projectPath === 'string' ? metadata.projectPath : undefined,
|
|
47
|
-
sessionId: typeof metadata.sessionId === 'string' ? metadata.sessionId : undefined,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* A2A 카테고리 → Anthropic 타입 매핑
|
|
52
|
-
*
|
|
53
|
-
* A2A 카테고리:
|
|
54
|
-
* - error_solution: 에러와 해결책
|
|
55
|
-
* - code_pattern: 코드 패턴
|
|
56
|
-
* - decision: 아키텍처 결정
|
|
57
|
-
* - context: 대화 컨텍스트
|
|
58
|
-
* - project_knowledge: 프로젝트 지식
|
|
59
|
-
* - convention: 규칙/컨벤션
|
|
60
|
-
* - learning: 학습 내용
|
|
61
|
-
*
|
|
62
|
-
* Anthropic 타입:
|
|
63
|
-
* - user_preference: 사용자 선호도
|
|
64
|
-
* - learned_info: 학습된 정보
|
|
65
|
-
* - conversation_context: 대화 컨텍스트
|
|
66
|
-
*/
|
|
67
|
-
export function mapCategoryToAnthropicType(category) {
|
|
68
|
-
switch (category) {
|
|
69
|
-
case 'convention':
|
|
70
|
-
return 'user_preference';
|
|
71
|
-
case 'context':
|
|
72
|
-
return 'conversation_context';
|
|
73
|
-
case 'error_solution':
|
|
74
|
-
case 'code_pattern':
|
|
75
|
-
case 'decision':
|
|
76
|
-
case 'project_knowledge':
|
|
77
|
-
case 'learning':
|
|
78
|
-
case 'skill':
|
|
79
|
-
return 'learned_info';
|
|
80
|
-
default:
|
|
81
|
-
return 'learned_info';
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Anthropic 타입 → A2A 카테고리 매핑
|
|
86
|
-
*/
|
|
87
|
-
export function mapAnthropicTypeToCategory(type) {
|
|
88
|
-
switch (type) {
|
|
89
|
-
case 'user_preference':
|
|
90
|
-
return 'convention';
|
|
91
|
-
case 'conversation_context':
|
|
92
|
-
return 'context';
|
|
93
|
-
case 'learned_info':
|
|
94
|
-
return 'project_knowledge';
|
|
95
|
-
default:
|
|
96
|
-
return 'project_knowledge';
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* A2A 메모리 배열을 Anthropic 응답 형식으로 변환
|
|
101
|
-
*/
|
|
102
|
-
export function toAnthropicBatch(memories) {
|
|
103
|
-
const data = memories.map(toAnthropicFormat);
|
|
104
|
-
return {
|
|
105
|
-
data,
|
|
106
|
-
has_more: false, // 단일 배치 변환이므로 항상 false
|
|
107
|
-
first_id: data.length > 0 ? data[0].id : undefined,
|
|
108
|
-
last_id: data.length > 0 ? data[data.length - 1].id : undefined,
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Anthropic 응답 형식을 A2A 메모리 생성 입력 배열로 변환
|
|
113
|
-
*/
|
|
114
|
-
export function fromAnthropicBatch(response) {
|
|
115
|
-
return response.data.map(fromAnthropicFormat);
|
|
116
|
-
}
|
|
117
|
-
//# sourceMappingURL=anthropic.js.map
|
|
1
|
+
(function(_0x4698e7,_0x56c727){function _0x3aa575(_0x35c8d1,_0x5d11bd){return _0x5c2d(_0x5d11bd-0x37d,_0x35c8d1);}function _0x4bd8ea(_0x19b9a7,_0xd48467){return _0x5c2d(_0x19b9a7- -0x37c,_0xd48467);}const _0x515a9b=_0x4698e7();while(!![]){try{const _0x4e5752=-parseInt(_0x4bd8ea(-0x293,-0x283))/0x1+parseInt(_0x3aa575(0x459,0x45e))/0x2*(-parseInt(_0x4bd8ea(-0x29c,-0x2af))/0x3)+parseInt(_0x4bd8ea(-0x2aa,-0x293))/0x4+-parseInt(_0x3aa575(0x43d,0x454))/0x5*(parseInt(_0x4bd8ea(-0x291,-0x29e))/0x6)+-parseInt(_0x3aa575(0x452,0x465))/0x7*(-parseInt(_0x3aa575(0x473,0x46c))/0x8)+parseInt(_0x4bd8ea(-0x289,-0x290))/0x9+parseInt(_0x3aa575(0x456,0x44a))/0xa;if(_0x4e5752===_0x56c727)break;else _0x515a9b['push'](_0x515a9b['shift']());}catch(_0x52f2b2){_0x515a9b['push'](_0x515a9b['shift']());}}}(_0x1331,0xbf10e));export function toAnthropicFormat(_0xafac0){function _0x145d66(_0x29a546,_0x376043){return _0x5c2d(_0x29a546-0x344,_0x376043);}function _0x254b09(_0x5e53c6,_0x175964){return _0x5c2d(_0x5e53c6-0x339,_0x175964);}return{'id':_0xafac0['id'],'content':_0xafac0['content'],'type':mapCategoryToAnthropicType(_0xafac0[_0x254b09(0x40f,0x416)]),'source':_0x145d66(0x40c,0x412),'created_at':_0xafac0[_0x145d66(0x427,0x41e)],'updated_at':_0xafac0[_0x145d66(0x426,0x438)],'metadata':{'category':_0xafac0[_0x254b09(0x40f,0x40e)],'tier':_0xafac0[_0x145d66(0x431,0x43e)],'tags':_0xafac0[_0x145d66(0x422,0x419)],'projectPath':_0xafac0[_0x145d66(0x40b,0x421)+'h'],'sessionId':_0xafac0['sessionId'],'accessCount':_0xafac0[_0x254b09(0x42a,0x427)+'t'],'lastAccessedAt':_0xafac0[_0x254b09(0x402,0x414)+'edAt']}};}export function fromAnthropicFormat(_0x45fac7){function _0x23d2a3(_0x4c31a5,_0x5ea0fa){return _0x5c2d(_0x4c31a5- -0xa5,_0x5ea0fa);}const _0x4a543c={'qMyQU':'working','KcGRb':_0x23d2a3(0x25,0x2b),'dyFte':'semantic','luheJ':function(_0xc26525,_0x23fa90){return _0xc26525===_0x23fa90;},'NBYmP':function(_0x9bfa5f,_0x71ea6e){return _0x9bfa5f(_0x71ea6e);},'GjAHk':_0x23d2a3(0x2f,0x3a),'kQILa':function(_0x4fec5e,_0x408176){return _0x4fec5e===_0x408176;}},_0x550c3b=_0x45fac7[_0x3db2c2(0x3ff,0x3eb)]||{},_0x117548=[_0x4a543c[_0x3db2c2(0x3de,0x3d4)],_0x4a543c['KcGRb'],_0x4a543c[_0x3db2c2(0x3e6,0x3cf)]],_0x4eb165=_0x4a543c['luheJ'](typeof _0x550c3b['tier'],_0x3db2c2(0x3b2,0x3c9))&&_0x117548[_0x23d2a3(0x40,0x3d)](_0x550c3b['tier'])?_0x550c3b[_0x3db2c2(0x3d5,0x3e2)]:_0x4a543c[_0x23d2a3(0x45,0x3a)];function _0x3db2c2(_0x8abb1e,_0x197bfc){return _0x5c2d(_0x197bfc-0x2f5,_0x8abb1e);}return{'content':_0x45fac7[_0x23d2a3(0x27,0x15)],'category':_0x4a543c['NBYmP'](mapAnthropicTypeToCategory,_0x45fac7[_0x23d2a3(0x47,0x3b)]),'tier':_0x4eb165,'tags':Array[_0x23d2a3(0x53,0x4b)](_0x550c3b[_0x23d2a3(0x39,0x34)])?_0x550c3b[_0x3db2c2(0x3ec,0x3d3)]:[],'projectPath':typeof _0x550c3b['projectPat'+'h']===_0x4a543c['GjAHk']?_0x550c3b[_0x23d2a3(0x22,0x38)+'h']:undefined,'sessionId':_0x4a543c['kQILa'](typeof _0x550c3b[_0x3db2c2(0x3f2,0x3ea)],_0x23d2a3(0x2f,0x36))?_0x550c3b['sessionId']:undefined};}export function mapCategoryToAnthropicType(_0x423328){const _0x3d0b65={'YpkEP':_0x2d1acf(0xa1,0x95),'AXQaS':_0x2d1acf(0x89,0x92)+_0x5bb1d0(-0x7f,-0x74),'NApbS':_0x2d1acf(0xab,0xae)+'on_context','Mmuwt':'error_solu'+'tion','gPIwP':'code_patte'+'rn','lWyeh':'decision','OeDwv':'project_kn'+_0x2d1acf(0x84,0x8b),'CvZTL':_0x2d1acf(0xae,0xac),'jsARX':'learned_in'+'fo'};function _0x2d1acf(_0x38de89,_0x5ac800){return _0x5c2d(_0x5ac800- -0x46,_0x38de89);}function _0x5bb1d0(_0x1f0a63,_0x4e7fdf){return _0x5c2d(_0x4e7fdf- -0x158,_0x1f0a63);}switch(_0x423328){case _0x3d0b65[_0x5bb1d0(-0x70,-0x7f)]:return _0x3d0b65['AXQaS'];case _0x2d1acf(0xa8,0x97):return _0x3d0b65[_0x5bb1d0(-0x49,-0x61)];case _0x3d0b65['Mmuwt']:case _0x3d0b65[_0x2d1acf(0xb6,0xa1)]:case _0x3d0b65[_0x5bb1d0(-0x83,-0x83)]:case _0x3d0b65[_0x2d1acf(0xa5,0x8d)]:case'learning':case _0x3d0b65['CvZTL']:return _0x3d0b65[_0x5bb1d0(-0x82,-0x7c)];default:return'learned_in'+'fo';}}export function mapAnthropicTypeToCategory(_0x2a0391){function _0x17d77f(_0x1b78b8,_0x19fd67){return _0x5c2d(_0x1b78b8-0x2fa,_0x19fd67);}function _0x2f1ee2(_0x482a3d,_0xad3bed){return _0x5c2d(_0xad3bed- -0x1be,_0x482a3d);}const _0x514e03={'STeMW':_0x17d77f(0x3ea,0x3d3)+'fo'};switch(_0x2a0391){case _0x17d77f(0x3d2,0x3e4)+_0x2f1ee2(-0xcf,-0xda):return _0x17d77f(0x3d5,0x3d1);case'conversati'+_0x17d77f(0x3e0,0x3e0):return'context';case _0x514e03[_0x17d77f(0x3e8,0x3e9)]:return _0x2f1ee2(-0x103,-0xf3)+_0x2f1ee2(-0xdb,-0xed);default:return _0x2f1ee2(-0xef,-0xf3)+'owledge';}}function _0x1331(){const _0x242059=['B3DSzwrNzq','ndeWmJe4oenRzvzADW','t2veD3y','C3rYAw5N','BfD5zwG','y2f0zwDVCNK','odCWvhDZB0nt','DxnLCL9WCMvMzq','wxbRrva','zhLgDgu','y29UDMvUDgLVBG','ANnbuLG','y29UDgv4Da','DgfNCW','Cu15uvu','mtCZmvHTwKT1sW','mZe2nKjvB2DAEq','DxbKyxrLzef0','y3jLyxrLzef0','CMvUy2u','Aw5JBhvKzxm','B25Fy29UDgv4Da','z1bjD1a','ntq1mtqXmw9OvgHxDq','mJq5nZe3DfHZzwn6','s2nhuMi','mZC4nZHIEuTTExO','DhLWzq','DgLLCG','u1rLtvC','mtz6rKHbEgO','BgvHCM5Lzf9PBG','ywnJzxnZq291BG','C2TPBgW','mJGYndu2y29ptLLo','y29UDMvYC2f0Aq','C2vZC2LVBKLK','Bwv0ywrHDge','tKfWyLm','AxnbCNjHEq','ANHszgK','ChjVAMvJDfbHDa','yxnZAxn0yw50','BgfZDefJy2vZCW','zxbPC29KAwm','ChjVAMvJDf9RBG','y29UDgvUDa','ndi5nJK5mfvAEuPita','zgf0yq','BgvUz3rO','BwfW'];_0x1331=function(){return _0x242059;};return _0x1331();}export function toAnthropicBatch(_0xad5246){const _0x409e6e={'jxRdi':function(_0x1c5417,_0x4d3755){return _0x1c5417>_0x4d3755;},'mCgln':function(_0x5e4509,_0x59cc76){return _0x5e4509-_0x59cc76;}};function _0x64efb9(_0x432007,_0x4f3ac1){return _0x5c2d(_0x432007-0x189,_0x4f3ac1);}function _0xe7e986(_0x2093d5,_0x3b8f79){return _0x5c2d(_0x2093d5- -0x3ce,_0x3b8f79);}const _0x40245a=_0xad5246[_0xe7e986(-0x2fe,-0x2eb)](toAnthropicFormat);return{'data':_0x40245a,'has_more':![],'first_id':_0x409e6e[_0x64efb9(0x24f,0x251)](_0x40245a[_0x64efb9(0x258,0x272)],0x0)?_0x40245a[0x0]['id']:undefined,'last_id':_0x409e6e['jxRdi'](_0x40245a[_0xe7e986(-0x2ff,-0x2e9)],0x0)?_0x40245a[_0x409e6e['mCgln'](_0x40245a['length'],0x1)]['id']:undefined};}function _0x5c2d(_0x4bed57,_0x128c64){_0x4bed57=_0x4bed57-0xc6;const _0x1331ae=_0x1331();let _0x5c2da0=_0x1331ae[_0x4bed57];if(_0x5c2d['oaEpRL']===undefined){var _0x3677a8=function(_0x435c4d){const _0x4d50c6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x144267='',_0x171946='';for(let _0xc26f31=0x0,_0xa713be,_0x5dc493,_0x517584=0x0;_0x5dc493=_0x435c4d['charAt'](_0x517584++);~_0x5dc493&&(_0xa713be=_0xc26f31%0x4?_0xa713be*0x40+_0x5dc493:_0x5dc493,_0xc26f31++%0x4)?_0x144267+=String['fromCharCode'](0xff&_0xa713be>>(-0x2*_0xc26f31&0x6)):0x0){_0x5dc493=_0x4d50c6['indexOf'](_0x5dc493);}for(let _0x251085=0x0,_0x77ba2e=_0x144267['length'];_0x251085<_0x77ba2e;_0x251085++){_0x171946+='%'+('00'+_0x144267['charCodeAt'](_0x251085)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x171946);};_0x5c2d['QMFtxA']=_0x3677a8,_0x5c2d['VUMBSw']={},_0x5c2d['oaEpRL']=!![];}const _0x130972=_0x1331ae[0x0],_0x5446f1=_0x4bed57+_0x130972,_0x13f7cd=_0x5c2d['VUMBSw'][_0x5446f1];return!_0x13f7cd?(_0x5c2da0=_0x5c2d['QMFtxA'](_0x5c2da0),_0x5c2d['VUMBSw'][_0x5446f1]=_0x5c2da0):_0x5c2da0=_0x13f7cd,_0x5c2da0;}export function fromAnthropicBatch(_0x38608b){function _0xd82e5d(_0x494e2a,_0x192b7c){return _0x5c2d(_0x192b7c-0x1dd,_0x494e2a);}function _0x9c89bf(_0x4473b3,_0xd3bc55){return _0x5c2d(_0x4473b3- -0x1f0,_0xd3bc55);}return _0x38608b[_0x9c89bf(-0x122,-0x10d)][_0x9c89bf(-0x120,-0x125)](fromAnthropicFormat);}
|
package/dist/chunking/chunker.js
CHANGED
|
@@ -1,163 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Content Chunker
|
|
3
|
-
*
|
|
4
|
-
* 긴 콘텐츠를 의미 단위로 분할합니다.
|
|
5
|
-
* 전략: Header-based + Recursive Character Splitting 하이브리드
|
|
6
|
-
*/
|
|
7
|
-
/** 임베딩 모델별 프리셋 */
|
|
8
|
-
export const CHUNK_PRESETS = {
|
|
9
|
-
local: { maxChunkChars: 200, overlapChars: 20, minChunkChars: 30, chunkThreshold: 300 },
|
|
10
|
-
e5: { maxChunkChars: 800, overlapChars: 80, minChunkChars: 50, chunkThreshold: 1000 },
|
|
11
|
-
openai: { maxChunkChars: 1500, overlapChars: 150, minChunkChars: 100, chunkThreshold: 2000 },
|
|
12
|
-
};
|
|
13
|
-
const DEFAULT_CONFIG = CHUNK_PRESETS.local;
|
|
14
|
-
/**
|
|
15
|
-
* 콘텐츠를 chunking해야 하는지 판단
|
|
16
|
-
*/
|
|
17
|
-
export function shouldChunk(content, config) {
|
|
18
|
-
const cfg = { ...DEFAULT_CONFIG, ...config };
|
|
19
|
-
return content.length > cfg.chunkThreshold;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* 콘텐츠를 의미 단위 청크로 분할
|
|
23
|
-
*
|
|
24
|
-
* 1. Markdown 헤더(#, ##, ###) 기반 1차 분할
|
|
25
|
-
* 2. 각 섹션이 maxChunkChars 초과 시 → Recursive Character Splitting
|
|
26
|
-
* 3. minChunkChars 미만 청크 → 이전 청크에 병합
|
|
27
|
-
* 4. 각 청크에 오버랩 추가
|
|
28
|
-
*/
|
|
29
|
-
export function chunkContent(content, config) {
|
|
30
|
-
const cfg = { ...DEFAULT_CONFIG, ...config };
|
|
31
|
-
if (!shouldChunk(content, config)) {
|
|
32
|
-
return [content];
|
|
33
|
-
}
|
|
34
|
-
// Step 1: Markdown 헤더 기반 1차 분할
|
|
35
|
-
const sections = splitByHeaders(content);
|
|
36
|
-
// Step 2: 큰 섹션 재분할
|
|
37
|
-
const rawChunks = [];
|
|
38
|
-
for (const section of sections) {
|
|
39
|
-
if (section.length <= cfg.maxChunkChars) {
|
|
40
|
-
rawChunks.push(section);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
rawChunks.push(...recursiveSplit(section, cfg.maxChunkChars));
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
// Step 3: 작은 청크 병합
|
|
47
|
-
const merged = mergeSmallChunks(rawChunks, cfg.minChunkChars, cfg.maxChunkChars);
|
|
48
|
-
// merged가 비어있으면 원본 반환 (헤더만 있는 콘텐츠 등)
|
|
49
|
-
if (merged.length === 0) {
|
|
50
|
-
return [content];
|
|
51
|
-
}
|
|
52
|
-
// Step 4: 오버랩 추가
|
|
53
|
-
if (cfg.overlapChars > 0 && merged.length > 1) {
|
|
54
|
-
return addOverlap(merged, cfg.overlapChars);
|
|
55
|
-
}
|
|
56
|
-
return merged;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Markdown 헤더 기반 분할
|
|
60
|
-
*/
|
|
61
|
-
function splitByHeaders(content) {
|
|
62
|
-
const lines = content.split('\n');
|
|
63
|
-
const sections = [];
|
|
64
|
-
let current = [];
|
|
65
|
-
for (const line of lines) {
|
|
66
|
-
if (/^#{1,3}\s+/.test(line) && current.length > 0) {
|
|
67
|
-
const text = current.join('\n').trim();
|
|
68
|
-
if (text)
|
|
69
|
-
sections.push(text);
|
|
70
|
-
current = [line];
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
current.push(line);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
const last = current.join('\n').trim();
|
|
77
|
-
if (last)
|
|
78
|
-
sections.push(last);
|
|
79
|
-
return sections;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Recursive Character Splitting (단락 → 문장 → 단어 경계)
|
|
83
|
-
*/
|
|
84
|
-
function recursiveSplit(text, maxChars) {
|
|
85
|
-
if (text.length <= maxChars)
|
|
86
|
-
return [text];
|
|
87
|
-
// 분할 구분자 우선순위: 빈 줄 → 줄바꿈 → 문장 끝 → 단어 경계
|
|
88
|
-
const separators = ['\n\n', '\n', '. ', '? ', '! ', ', ', ' '];
|
|
89
|
-
for (const sep of separators) {
|
|
90
|
-
const parts = text.split(sep);
|
|
91
|
-
if (parts.length <= 1)
|
|
92
|
-
continue;
|
|
93
|
-
const chunks = [];
|
|
94
|
-
let buffer = '';
|
|
95
|
-
for (const part of parts) {
|
|
96
|
-
const candidate = buffer ? buffer + sep + part : part;
|
|
97
|
-
if (candidate.length > maxChars && buffer) {
|
|
98
|
-
chunks.push(buffer);
|
|
99
|
-
buffer = part;
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
buffer = candidate;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
if (buffer)
|
|
106
|
-
chunks.push(buffer);
|
|
107
|
-
// 모든 청크가 maxChars 이하인지 확인
|
|
108
|
-
if (chunks.every(c => c.length <= maxChars)) {
|
|
109
|
-
return chunks;
|
|
110
|
-
}
|
|
111
|
-
// 아직 큰 청크가 있으면 재귀 분할
|
|
112
|
-
const result = [];
|
|
113
|
-
for (const chunk of chunks) {
|
|
114
|
-
if (chunk.length > maxChars) {
|
|
115
|
-
result.push(...recursiveSplit(chunk, maxChars));
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
result.push(chunk);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
return result;
|
|
122
|
-
}
|
|
123
|
-
// 어떤 구분자로도 분할 불가 → 강제 분할
|
|
124
|
-
const result = [];
|
|
125
|
-
for (let i = 0; i < text.length; i += maxChars) {
|
|
126
|
-
result.push(text.slice(i, i + maxChars));
|
|
127
|
-
}
|
|
128
|
-
return result;
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* 작은 청크를 이전 청크에 병합
|
|
132
|
-
*/
|
|
133
|
-
function mergeSmallChunks(chunks, minChars, maxChars) {
|
|
134
|
-
if (chunks.length <= 1)
|
|
135
|
-
return chunks;
|
|
136
|
-
const result = [];
|
|
137
|
-
for (const chunk of chunks) {
|
|
138
|
-
if (result.length > 0 && chunk.length < minChars) {
|
|
139
|
-
const prev = result[result.length - 1];
|
|
140
|
-
if (prev.length + chunk.length + 1 <= maxChars) {
|
|
141
|
-
result[result.length - 1] = prev + '\n' + chunk;
|
|
142
|
-
continue;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
result.push(chunk);
|
|
146
|
-
}
|
|
147
|
-
return result;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* 청크 간 오버랩 추가
|
|
151
|
-
*/
|
|
152
|
-
function addOverlap(chunks, overlapChars) {
|
|
153
|
-
if (chunks.length <= 1)
|
|
154
|
-
return chunks;
|
|
155
|
-
return chunks.map((chunk, i) => {
|
|
156
|
-
if (i === 0)
|
|
157
|
-
return chunk;
|
|
158
|
-
const prev = chunks[i - 1];
|
|
159
|
-
const overlap = prev.slice(-overlapChars);
|
|
160
|
-
return overlap + chunk;
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
//# sourceMappingURL=chunker.js.map
|
|
1
|
+
function _0x35efd5(_0x1b0a0f,_0x1e751d){return _0x1911(_0x1e751d- -0x2c7,_0x1b0a0f);}(function(_0x3618ed,_0x4c4c3d){function _0x2f98e7(_0x2996cf,_0x40f804){return _0x1911(_0x2996cf- -0x1f,_0x40f804);}const _0x4a7276=_0x3618ed();function _0x4ffa07(_0x51a066,_0x4efd20){return _0x1911(_0x51a066-0x28c,_0x4efd20);}while(!![]){try{const _0x4224d2=-parseInt(_0x4ffa07(0x32d,0x342))/0x1+parseInt(_0x4ffa07(0x33f,0x349))/0x2+-parseInt(_0x4ffa07(0x348,0x345))/0x3+parseInt(_0x4ffa07(0x324,0x30e))/0x4+parseInt(_0x4ffa07(0x320,0x32d))/0x5*(-parseInt(_0x4ffa07(0x33d,0x357))/0x6)+parseInt(_0x4ffa07(0x331,0x348))/0x7+parseInt(_0x2f98e7(0x88,0x9c))/0x8;if(_0x4224d2===_0x4c4c3d)break;else _0x4a7276['push'](_0x4a7276['shift']());}catch(_0x297230){_0x4a7276['push'](_0x4a7276['shift']());}}}(_0x4d2d,0x1fddd));export const CHUNK_PRESETS={'local':{'maxChunkChars':0xc8,'overlapChars':0x14,'minChunkChars':0x1e,'chunkThreshold':0x12c},'e5':{'maxChunkChars':0x320,'overlapChars':0x50,'minChunkChars':0x32,'chunkThreshold':0x3e8},'openai':{'maxChunkChars':0x5dc,'overlapChars':0x96,'minChunkChars':0x64,'chunkThreshold':0x7d0}};function _0x4d2d(){const _0x3fc697=['whHOAvm','t3rcAwS','CvHXvgy','y09wsKi','ChvZAa','Ag9Sza','C0feteG','DhjPBq','AuPbvNG','mtiXndy4mLzytNncvW','Bwf4q2H1BMTdAa','ndmWmJe0B01ev1HA','vhLbDuK','BwLUq2H1BMTdAa','zMXnDfe','C3bSAxq','rgncAgS','zNz4AhK','quP3u1K','EwPyBha','ndeYmtKXwMr3EePP','zND1zeC','BxLkwLK','AvDkAha','q05ytgm','CvfvueO','seTpyxO','CMTsqKy','tw9iv1K','B3DrBvC','y2H1BMTuAhjLCW','zxzLCNK','yxjZ','nvvuwurJvG','t0Tkq28','C2XPy2u','Bg1du1y','nta0mZq0uNL4v3rS','B3zLCMXHCenOyq','DMrPt0u','C3HbzMC','BwfW','Bg9JywW','AM9PBG','DgvZDa','CK5lyui','mtq1ndKYvLfJAgPr','BgvUz3rO','rMDfuMe','sufXuKW','mti2ntmYmfnXEgzfCW','AwjXqxC','nZuXmJy0qMLXruvg'];_0x4d2d=function(){return _0x3fc697;};return _0x4d2d();}const DEFAULT_CONFIG=CHUNK_PRESETS[_0x35efd5(-0x21e,-0x22a)];export function shouldChunk(_0x593e26,_0x134660){function _0x1f89ad(_0x45bc01,_0x23fb15){return _0x35efd5(_0x45bc01,_0x23fb15- -0x35);}const _0x3fa4d0={'AJwSY':function(_0x45aca9,_0x1b1c7a){return _0x45aca9>_0x1b1c7a;}},_0x4720b1={...DEFAULT_CONFIG,..._0x134660};function _0x28ab62(_0x46f811,_0x577a33){return _0x35efd5(_0x577a33,_0x46f811-0x219);}return _0x3fa4d0[_0x28ab62(0xc,-0xd)](_0x593e26[_0x1f89ad(-0x266,-0x25a)],_0x4720b1[_0x1f89ad(-0x25f,-0x26b)+_0x28ab62(-0x1,0x6)]);}export function chunkContent(_0x200522,_0x2b9253){const _0x250f27={'fvxhy':function(_0x27fd5a,_0x1c5adb){return _0x27fd5a(_0x1c5adb);},'RrOVa':function(_0x2c3dad,_0x1dda17,_0x47e56a){return _0x2c3dad(_0x1dda17,_0x47e56a);},'qQUPJ':function(_0x1da7bd,_0xa9c6f1){return _0x1da7bd===_0xa9c6f1;},'TyAuI':function(_0x35dc42,_0x38e858){return _0x35dc42>_0x38e858;},'sxAfg':function(_0x567709,_0x950bb8,_0x27fb6){return _0x567709(_0x950bb8,_0x27fb6);}},_0xce49a4={...DEFAULT_CONFIG,..._0x2b9253};if(!shouldChunk(_0x200522,_0x2b9253))return[_0x200522];const _0x28e39b=_0x250f27[_0x459a65(0x30,0x23)](splitByHeaders,_0x200522),_0x45ec89=[];function _0x459a65(_0x5c1ef8,_0x2fc732){return _0x35efd5(_0x2fc732,_0x5c1ef8-0x23e);}for(const _0x734735 of _0x28e39b){_0x734735[_0x2f6c0a(-0xe8,-0xf4)]<=_0xce49a4[_0x2f6c0a(-0xd8,-0xec)+_0x2f6c0a(-0xf7,-0x107)]?_0x45ec89[_0x2f6c0a(-0xde,-0xd8)](_0x734735):_0x45ec89[_0x459a65(0x23,0x3b)](..._0x250f27['RrOVa'](recursiveSplit,_0x734735,_0xce49a4[_0x2f6c0a(-0xd8,-0xce)+_0x459a65(0xa,0x8)]));}const _0x22ff3e=mergeSmallChunks(_0x45ec89,_0xce49a4[_0x2f6c0a(-0xd5,-0xd0)+_0x459a65(0xa,-0xf)],_0xce49a4[_0x2f6c0a(-0xd8,-0xc0)+_0x459a65(0xa,0xa)]);function _0x2f6c0a(_0x519409,_0x4d1c87){return _0x35efd5(_0x4d1c87,_0x519409-0x13d);}if(_0x250f27[_0x2f6c0a(-0xfe,-0x107)](_0x22ff3e[_0x2f6c0a(-0xe8,-0xdd)],0x0))return[_0x200522];if(_0xce49a4[_0x2f6c0a(-0xf1,-0xdb)+'rs']>0x0&&_0x250f27[_0x459a65(0x2b,0x45)](_0x22ff3e['length'],0x1))return _0x250f27[_0x459a65(0x12,0xc)](addOverlap,_0x22ff3e,_0xce49a4[_0x459a65(0x10,0x15)+'rs']);return _0x22ff3e;}function splitByHeaders(_0x435a51){const _0x27b8d6={'rkRBF':_0x1a04ff(0x1af,0x198)};function _0x3d3066(_0x417df4,_0x2f934b){return _0x35efd5(_0x417df4,_0x2f934b-0x24d);}const _0x3c84b5=_0x435a51[_0x1a04ff(0x1ad,0x1c5)]('\x0a'),_0x33ba62=[];let _0x1c80e0=[];for(const _0x196af3 of _0x3c84b5){if(/^#{1,3}\s+/['test'](_0x196af3)&&_0x1c80e0[_0x3d3066(0x18,0x28)]>0x0){if(_0x3d3066(0x4a,0x3c)!==_0x27b8d6[_0x3d3066(0x7,0x14)]){const _0x1256d1=_0x1c80e0[_0x3d3066(0x38,0x24)]('\x0a')['trim']();if(_0x1256d1)_0x33ba62['push'](_0x1256d1);_0x1c80e0=[_0x196af3];}else return[_0xf6b238];}else _0x1c80e0['push'](_0x196af3);}function _0x1a04ff(_0x3d771b,_0x390dfc){return _0x35efd5(_0x3d771b,_0x390dfc-0x3d5);}const _0x55b2b0=_0x1c80e0[_0x3d3066(0xf,0x24)]('\x0a')[_0x1a04ff(0x1b6,0x1bd)]();if(_0x55b2b0)_0x33ba62[_0x1a04ff(0x1b3,0x1ba)](_0x55b2b0);return _0x33ba62;}function recursiveSplit(_0x4dea8a,_0x278673){const _0x3e3f5f={'FgERa':function(_0x554b18,_0x33d4){return _0x554b18>_0x33d4;},'vdiOE':function(_0x55f883,_0xbb36b3){return _0x55f883===_0xbb36b3;},'qXqTf':function(_0x54e486,_0x4c4a12){return _0x54e486<=_0x4c4a12;},'myJZY':_0x5a7c0a(0x7d,0x7e),'sADLH':function(_0x803b7a,_0x2e795d){return _0x803b7a<=_0x2e795d;},'ibqAw':'srgAI','MoHWY':function(_0x3c6fbc,_0x6fb265){return _0x3c6fbc+_0x6fb265;},'XxhiS':'EXuUa','HKOaz':function(_0x46cfd7,_0x53b871){return _0x46cfd7!==_0x53b871;},'OKJCo':_0x5a7c0a(0x84,0x7c),'efzme':function(_0x11323f,_0x5c91d8){return _0x11323f>_0x5c91d8;},'sKJWi':function(_0x2aabf6,_0x3820b4,_0x1a7950){return _0x2aabf6(_0x3820b4,_0x1a7950);},'yjXlp':function(_0x41e2a0,_0x34081d){return _0x41e2a0<_0x34081d;}};function _0x56f885(_0xf917bf,_0x3629f3){return _0x35efd5(_0xf917bf,_0x3629f3-0x466);}if(_0x3e3f5f[_0x5a7c0a(0x7e,0x64)](_0x4dea8a[_0x5a7c0a(0x76,0x8e)],_0x278673))return[_0x4dea8a];const _0xf87a27=['\x0a\x0a','\x0a','.\x20','?\x20','!\x20',',\x20','\x20'];function _0x5a7c0a(_0x4cb767,_0x3210c4){return _0x35efd5(_0x3210c4,_0x4cb767-0x29b);}for(const _0x1f0d80 of _0xf87a27){if(_0x3e3f5f[_0x56f885(0x21b,0x228)]===_0x56f885(0x24b,0x248)){const _0x44e400=_0x4dea8a[_0x56f885(0x271,0x256)](_0x1f0d80);if(_0x3e3f5f[_0x5a7c0a(0x82,0x88)](_0x44e400['length'],0x1))continue;const _0x2faabd=[];let _0x4b7789='';for(const _0x50ac97 of _0x44e400){if(_0x3e3f5f['ibqAw']!==_0x3e3f5f[_0x56f885(0x23b,0x245)])_0x33eadc[_0x5a7c0a(0x80,0x6c)](..._0x139655(_0xb5c099,_0x35aab6));else{const _0x129218=_0x4b7789?_0x3e3f5f[_0x56f885(0x22b,0x22e)](_0x4b7789+_0x1f0d80,_0x50ac97):_0x50ac97;if(_0x129218[_0x5a7c0a(0x76,0x66)]>_0x278673&&_0x4b7789)'eqmMu'===_0x3e3f5f[_0x5a7c0a(0x7c,0x61)]?_0x1044bf[_0x56f885(0x254,0x24b)](_0x25dc1f):(_0x2faabd[_0x56f885(0x252,0x24b)](_0x4b7789),_0x4b7789=_0x50ac97);else{if(_0x3e3f5f[_0x5a7c0a(0x61,0x4c)](_0x5a7c0a(0x84,0x73),_0x3e3f5f[_0x5a7c0a(0x69,0x68)])){if(/^#{1,3}\s+/[_0x56f885(0x229,0x23e)](_0x3475e1)&&YJUaJp[_0x56f885(0x255,0x242)](_0x4420e7['length'],0x0)){const _0x58be91=_0x332bfa[_0x56f885(0x239,0x23d)]('\x0a')[_0x56f885(0x233,0x24e)]();if(_0x58be91)_0x55923c[_0x5a7c0a(0x80,0x75)](_0x58be91);_0x5cd748=[_0x1b524f];}else _0x1fe39f[_0x56f885(0x23e,0x24b)](_0x2a9434);}else _0x4b7789=_0x129218;}}}if(_0x4b7789)_0x2faabd['push'](_0x4b7789);if(_0x2faabd[_0x56f885(0x246,0x231)](_0x19db6b=>_0x19db6b['length']<=_0x278673))return _0x2faabd;const _0xd9aa25=[];for(const _0x12894a of _0x2faabd){_0x3e3f5f['efzme'](_0x12894a[_0x5a7c0a(0x76,0x68)],_0x278673)?_0xd9aa25[_0x56f885(0x24f,0x24b)](..._0x3e3f5f['sKJWi'](recursiveSplit,_0x12894a,_0x278673)):_0xd9aa25[_0x5a7c0a(0x80,0x66)](_0x12894a);}return _0xd9aa25;}else{if(_0x268c00[_0x5a7c0a(0x76,0x6c)]<=0x1)return _0x1ce5f;return _0xb54661['map']((_0x21fc2f,_0x3f97ba)=>{if(_0x3e3f5f[_0x547fc9(0x24a,0x23d)](_0x3f97ba,0x0))return _0x21fc2f;function _0x547fc9(_0x2715bb,_0x3a3de1){return _0x5a7c0a(_0x3a3de1-0x1cf,_0x2715bb);}const _0x12aa5d=_0x5e099a[_0x3f97ba-0x1],_0x44e469=_0x12aa5d['slice'](-_0x3f4b3c);return _0x44e469+_0x21fc2f;});}}const _0xe12f5b=[];for(let _0xeff5b3=0x0;_0x3e3f5f[_0x56f885(0x25b,0x25a)](_0xeff5b3,_0x4dea8a['length']);_0xeff5b3+=_0x278673){_0xe12f5b[_0x5a7c0a(0x80,0x87)](_0x4dea8a[_0x5a7c0a(0x6a,0x58)](_0xeff5b3,_0x3e3f5f[_0x5a7c0a(0x63,0x5a)](_0xeff5b3,_0x278673)));}return _0xe12f5b;}function mergeSmallChunks(_0x4d8d06,_0x12c8e6,_0x17c156){function _0xaf9aa(_0x52c5c4,_0x481adc){return _0x35efd5(_0x52c5c4,_0x481adc-0xc6);}const _0x271973={'owQmW':function(_0x34bdfe,_0x16be97){return _0x34bdfe<=_0x16be97;},'cOVJB':function(_0x4d6028,_0x14a433){return _0x4d6028<_0x14a433;},'CNXLc':function(_0x38afc0,_0x518b70){return _0x38afc0===_0x518b70;},'fwudG':function(_0x580135,_0x2dbe75){return _0x580135<=_0x2dbe75;},'IAqRL':function(_0x35cae7,_0x2c307c){return _0x35cae7+_0x2c307c;},'lmCSV':function(_0x136f3f,_0x5d3a36){return _0x136f3f-_0x5d3a36;},'kyTcA':function(_0x6c247e,_0x370261){return _0x6c247e+_0x370261;}};function _0x120309(_0x5ea352,_0x7c0f5e){return _0x35efd5(_0x5ea352,_0x7c0f5e-0x18c);}if(_0x271973[_0xaf9aa(-0x16d,-0x171)](_0x4d8d06[_0x120309(-0x91,-0x99)],0x1))return _0x4d8d06;const _0x411394=[];for(const _0x276245 of _0x4d8d06){if(_0x411394[_0xaf9aa(-0x153,-0x15f)]>0x0&&_0x271973[_0xaf9aa(-0x170,-0x156)](_0x276245[_0xaf9aa(-0x179,-0x15f)],_0x12c8e6)){if(_0x271973[_0xaf9aa(-0x183,-0x176)](_0xaf9aa(-0x13b,-0x149),'DcBhk')){const _0x1fe450=_0x411394[_0x411394[_0x120309(-0xae,-0x99)]-0x1];if(_0x271973[_0xaf9aa(-0x149,-0x144)](_0x271973[_0xaf9aa(-0x16e,-0x15d)](_0x1fe450[_0xaf9aa(-0x160,-0x15f)]+_0x276245[_0x120309(-0x87,-0x99)],0x1),_0x17c156)){_0x411394[_0x271973[_0xaf9aa(-0x16c,-0x16a)](_0x411394[_0xaf9aa(-0x15d,-0x15f)],0x1)]=_0x271973['kyTcA'](_0x271973[_0xaf9aa(-0x155,-0x15d)](_0x1fe450,'\x0a'),_0x276245);continue;}}else _0x16a0bf[_0xaf9aa(-0x152,-0x15f)]>_0x520f1a?_0x516133[_0x120309(-0x7b,-0x8f)](..._0x3a5d8f(_0x45aa24,_0x3a5eec)):_0x52123f[_0x120309(-0x78,-0x8f)](_0x44e377);}_0x411394[_0x120309(-0xa9,-0x8f)](_0x276245);}return _0x411394;}function _0x1911(_0x210344,_0x413316){_0x210344=_0x210344-0x89;const _0x4d2d00=_0x4d2d();let _0x1911bb=_0x4d2d00[_0x210344];if(_0x1911['rgQBlK']===undefined){var _0x203734=function(_0x540e06){const _0x4ce7f9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1a5bba='',_0x1ed7b9='';for(let _0x2d2d6d=0x0,_0x5e087f,_0x40ace3,_0x42c7fa=0x0;_0x40ace3=_0x540e06['charAt'](_0x42c7fa++);~_0x40ace3&&(_0x5e087f=_0x2d2d6d%0x4?_0x5e087f*0x40+_0x40ace3:_0x40ace3,_0x2d2d6d++%0x4)?_0x1a5bba+=String['fromCharCode'](0xff&_0x5e087f>>(-0x2*_0x2d2d6d&0x6)):0x0){_0x40ace3=_0x4ce7f9['indexOf'](_0x40ace3);}for(let _0x1e8287=0x0,_0x4d4a74=_0x1a5bba['length'];_0x1e8287<_0x4d4a74;_0x1e8287++){_0x1ed7b9+='%'+('00'+_0x1a5bba['charCodeAt'](_0x1e8287)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1ed7b9);};_0x1911['GaGLwl']=_0x203734,_0x1911['BuFOHk']={},_0x1911['rgQBlK']=!![];}const _0x448dc3=_0x4d2d00[0x0],_0x56c613=_0x210344+_0x448dc3,_0x24d167=_0x1911['BuFOHk'][_0x56c613];return!_0x24d167?(_0x1911bb=_0x1911['GaGLwl'](_0x1911bb),_0x1911['BuFOHk'][_0x56c613]=_0x1911bb):_0x1911bb=_0x24d167,_0x1911bb;}function addOverlap(_0x40424d,_0x1d3081){function _0x414d93(_0x3eee1f,_0x1e8e50){return _0x35efd5(_0x3eee1f,_0x1e8e50-0x89);}const _0x1fc022={'TFvUB':function(_0x35fe91,_0x211169){return _0x35fe91===_0x211169;},'rNKaB':function(_0x1a212f,_0x375736){return _0x1a212f+_0x375736;}};if(_0x40424d[_0x4a9e64(-0x2a2,-0x2ab)]<=0x1)return _0x40424d;function _0x4a9e64(_0x2b4309,_0x390129){return _0x35efd5(_0x390129,_0x2b4309- -0x7d);}return _0x40424d[_0x414d93(-0x1b9,-0x1a2)]((_0x22b1f2,_0x29d2c6)=>{if(_0x1fc022['TFvUB'](_0x29d2c6,0x0))return _0x22b1f2;const _0x4ef56d=_0x40424d[_0x29d2c6-0x1];function _0x2cef83(_0x2db973,_0x3b06f1){return _0x4a9e64(_0x2db973-0x6,_0x3b06f1);}const _0x42dac9=_0x4ef56d[_0x4643c6(0x31d,0x31d)](-_0x1d3081);function _0x4643c6(_0xca5c5a,_0x2a76c2){return _0x4a9e64(_0x2a76c2-0x5cb,_0xca5c5a);}return _0x1fc022[_0x4643c6(0x329,0x327)](_0x42dac9,_0x22b1f2);});}
|