@simosphere/tokenizer-speedup 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/analyze.js +1 -1
- package/dist/cli/config-cmd.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/init-cmd.js +1 -1
- package/dist/cli/setup-cmd.js +1 -1
- package/dist/cloud/stripe-checkout.js +1 -1
- package/dist/cloud/stripe-config.js +1 -1
- package/dist/cloud/stripe-usage.js +1 -1
- package/dist/cloud/stripe-webhooks.js +1 -1
- package/dist/cloud/subscription-store.js +1 -1
- package/dist/manifest.json +49 -49
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/resources.js +1 -1
- package/dist/mcp/session.js +1 -1
- package/dist/mcp/tools.js +1 -1
- package/dist/plugin/cli.js +1 -1
- package/dist/plugin/compression/anonymize.js +1 -1
- package/dist/plugin/compression/cache.js +1 -1
- package/dist/plugin/compression/chunked.js +1 -1
- package/dist/plugin/compression/dedup.js +1 -1
- package/dist/plugin/compression/format-optimizer.js +1 -1
- package/dist/plugin/compression/index.js +1 -1
- package/dist/plugin/compression/pipeline.js +1 -1
- package/dist/plugin/compression/quality.js +1 -1
- package/dist/plugin/compression/rule-based.js +1 -1
- package/dist/plugin/compression/structural.js +1 -1
- package/dist/plugin/compression/text-utils.js +1 -1
- package/dist/plugin/compression/token-budget.js +1 -1
- package/dist/plugin/config-loader.js +1 -1
- package/dist/plugin/context-compressor.js +1 -1
- package/dist/plugin/hook-dispatcher.js +1 -1
- package/dist/plugin/metering-client.js +1 -1
- package/dist/plugin/metrics-collector.js +1 -1
- package/dist/plugin/onboarding.js +1 -1
- package/dist/plugin/precompact-handler.js +1 -1
- package/dist/plugin/report.js +1 -1
- package/dist/plugin/rule-analytics-store.js +1 -1
- package/dist/plugin/rule-analytics.js +1 -1
- package/dist/plugin/rule-engine.js +1 -1
- package/dist/plugin/rule-sharing.js +1 -1
- package/dist/plugin/rule-suggest.js +1 -1
- package/dist/plugin/session-start.js +1 -1
- package/dist/plugin/smart-context.js +1 -1
- package/dist/shared/license.js +1 -1
- package/dist/shared/providers/claude-provider.js +1 -1
- package/dist/shared/providers/openai-provider.js +1 -1
- package/dist/shared/token-counter.js +1 -1
- package/dist/shared/token-provider.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x5f12(_0x44f92c,_0x4e3a00){_0x44f92c=_0x44f92c-0x1e2;const _0x4c1f3=_0x4c1f();let _0x5f1253=_0x4c1f3[_0x44f92c];return _0x5f1253;}const _0x3c87e1=_0x5f12;(function(_0x372a8f,_0x2d2aef){const _0x10976f=_0x5f12,_0x2dc375=_0x372a8f();while(!![]){try{const _0x661e69=-parseInt(_0x10976f(0x1ef))/0x1*(-parseInt(_0x10976f(0x1ff))/0x2)+-parseInt(_0x10976f(0x1e3))/0x3+-parseInt(_0x10976f(0x1ee))/0x4*(parseInt(_0x10976f(0x1fc))/0x5)+parseInt(_0x10976f(0x1fd))/0x6*(parseInt(_0x10976f(0x1f4))/0x7)+parseInt(_0x10976f(0x1f1))/0x8*(parseInt(_0x10976f(0x1f5))/0x9)+-parseInt(_0x10976f(0x1fb))/0xa+parseInt(_0x10976f(0x1fe))/0xb*(-parseInt(_0x10976f(0x1e4))/0xc);if(_0x661e69===_0x2d2aef)break;else _0x2dc375['push'](_0x2dc375['shift']());}catch(_0x244c38){_0x2dc375['push'](_0x2dc375['shift']());}}}(_0x4c1f,0xdb34e));import{countTokens}from'../../shared/token-counter.js';function _0x4c1f(){const _0x31c1fd=['pii-anonymize','sort','10974866aRXwps','8307FhDIyY','set','Anonymstr.\x201,\x2000000\x20Anon-','0.0.0.','customerId','add','1167430viyTBa','2113620pSsIjG','6kSaAXJ','121GzsBdu','64AZQcEy','match','jjXiW','join','fVseP','split','4893072RRcuZq','1603164ULrZWS','+49-ANON-','01.01.1970-','iban','pii-anonymize\x20(','slice','length','XMLaA','address','regex','4bVlxIZ','49492EeeUXf','phone','12016KECyVU'];_0x4c1f=function(){return _0x31c1fd;};return _0x4c1f();}function simpleHash(_0x2e7892){const _0x4f2315=_0x5f12,_0x455795={'vvVIw':function(_0xd86d0c,_0x2778f8){return _0xd86d0c+_0x2778f8;},'uKwmJ':function(_0x2ee96b,_0x39163f){return _0x2ee96b-_0x39163f;}};let _0x11dedd=0x0;for(let _0x3aef43=0x0;_0x3aef43<_0x2e7892[_0x4f2315(0x1ea)];_0x3aef43++)_0x11dedd=_0x455795['vvVIw'](_0x455795['uKwmJ'](_0x11dedd<<0x5,_0x11dedd),_0x2e7892['charCodeAt'](_0x3aef43))|0x0;return Math['abs'](_0x11dedd)['toString'](0x10)[_0x4f2315(0x1e9)](0x0,0x4)['toUpperCase']()['padStart'](0x4,'0');}const PII_PATTERNS=[{'type':'email','regex':/[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,}/g,'buildPseudonym':_0x3d2290=>'user_'+_0x3d2290+'@example.redacted'},{'type':_0x3c87e1(0x1e7),'regex':/\bDE\d{2}\s?\d{4}\s?\d{4}\s?\d{4}\s?\d{4}\s?\d{2}\b/g,'buildPseudonym':_0x1c3e67=>'DE00-ANON-'+_0x1c3e67},{'type':_0x3c87e1(0x1f0),'regex':/(?:\+\d{1,3}[\s\-]?)?(?:\(?\d{2,5}\)?[\s\-]?)?\d{3,}[\s\-]?\d{2,}/g,'buildPseudonym':_0x59ff75=>_0x3c87e1(0x1e5)+_0x59ff75},{'type':_0x3c87e1(0x1f9),'regex':/\b(?:KD|KDN|ORD)-[A-Z0-9\-]{4,12}\b/g,'buildPseudonym':_0x2ab46d=>'KD-ANON-'+_0x2ab46d},{'type':'dateOfBirth','regex':/\b(?:\d{2}\.\d{2}\.\d{4}|\d{4}-\d{2}-\d{2})\b/g,'buildPseudonym':_0x5b9fd9=>_0x3c87e1(0x1e6)+_0x5b9fd9},{'type':'ipv4','regex':/\b(?:\d{1,3}\.){3}\d{1,3}\b/g,'buildPseudonym':_0x4235d7=>_0x3c87e1(0x1f8)+_0x4235d7},{'type':_0x3c87e1(0x1ec),'regex':/[A-ZÄÖÜ][a-zäöüß]+(?:str\.|straße|stra(?:ss|ß)e|weg|gasse|platz|allee|ring|damm)\s+\d{1,4}\s*[a-z]?\s*,\s*\d{5}\s+[A-ZÄÖÜ][a-zäöüß\-]+/g,'buildPseudonym':_0xba9b04=>_0x3c87e1(0x1f7)+_0xba9b04}];export function anonymizeText(_0x6f9afb){const _0x16f36a=_0x3c87e1,_0x1da833={'XMLaA':function(_0x199915,_0x584b5e){return _0x199915(_0x584b5e);}},_0x361366=new Map(),_0x1961d9=new Set(),_0x297a9b=new Map();let _0x4bd8b7=_0x6f9afb;for(const _0x2dcfd of PII_PATTERNS){const _0x2ece19=new RegExp(_0x2dcfd[_0x16f36a(0x1ed)]['source'],_0x2dcfd['regex']['flags']),_0x54cbcd=_0x4bd8b7[_0x16f36a(0x200)](_0x2ece19);if(!_0x54cbcd)continue;const _0x2f5484=[...new Set(_0x54cbcd)][_0x16f36a(0x1f3)]((_0x1d7820,_0x295e2a)=>_0x295e2a[_0x16f36a(0x1ea)]-_0x1d7820['length']);for(const _0x5e4d0d of _0x2f5484){if(_0x297a9b['has'](_0x5e4d0d))continue;const _0x3d67e8=_0x1da833[_0x16f36a(0x1eb)](simpleHash,_0x5e4d0d),_0x3bc411=_0x2dcfd['buildPseudonym'](_0x3d67e8);_0x297a9b[_0x16f36a(0x1f6)](_0x5e4d0d,_0x3bc411),_0x361366[_0x16f36a(0x1f6)](_0x3bc411,_0x5e4d0d),_0x1961d9[_0x16f36a(0x1fa)](_0x2dcfd['type']),_0x4bd8b7=_0x4bd8b7[_0x16f36a(0x1e2)](_0x5e4d0d)[_0x16f36a(0x202)](_0x3bc411);}}return{'text':_0x4bd8b7,'map':{'replacements':_0x361366,'piiTypesFound':[..._0x1961d9]}};}export function deanonymizeText(_0x384f84,_0x15b43b){const _0x39c915=_0x3c87e1;let _0xa52861=_0x384f84;const _0x2816fc=[..._0x15b43b['replacements']['entries']()]['sort'](([_0x500bbc],[_0x563ee6])=>_0x563ee6[_0x39c915(0x1ea)]-_0x500bbc['length']);for(const [_0x163dfa,_0x12a877]of _0x2816fc)_0xa52861=_0xa52861['split'](_0x163dfa)['join'](_0x12a877);return _0xa52861;}export const anonymizeStrategy={'name':_0x3c87e1(0x1f2),'compress'(_0x58fc8b,_0x4b5e7e){const _0x50055d=_0x3c87e1,_0x3e560e={'fVseP':function(_0x1b45ae,_0x83edae){return _0x1b45ae(_0x83edae);},'QDrdU':function(_0x2859b5,_0x459851){return _0x2859b5(_0x459851);},'jjXiW':function(_0x32d173,_0x12bbb3){return _0x32d173-_0x12bbb3;},'BRbLO':function(_0x4319ff,_0x493ca9){return _0x4319ff/_0x493ca9;}},_0x1525e5=_0x3e560e[_0x50055d(0x203)](countTokens,_0x58fc8b),{text:_0x320326,map:_0x243450}=_0x3e560e['QDrdU'](anonymizeText,_0x58fc8b),_0x4b72e3=countTokens(_0x320326);return{'text':_0x320326,'originalTokens':_0x1525e5,'compressedTokens':_0x4b72e3,'compressionRatio':_0x1525e5>0x0?_0x3e560e[_0x50055d(0x201)](0x1,_0x3e560e['BRbLO'](_0x4b72e3,_0x1525e5)):0x0,'strategyUsed':_0x50055d(0x1e8)+_0x243450['piiTypesFound'][_0x50055d(0x202)](',\x20')+')','qualityEstimate':0x1,'wasTruncated':!0x1};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x3d00(){const _0x3d4da7=['996JaIpKH','entries','stats','22vkHmcz','ttlMs','keys','get','Hkwvf','jjBrH','size','5521929dMzKKz','OWSwj','now','181959wSecJE','toString','74076QLgtSO','8IJIHgA','678572FovnMr','76wUfjzs','9415gsizJo','value','wmEEj','5426930UJeMQJ','missCount','toLowerCase','AxDlF','clear','has','thDNS','iksRf','expiresAt','compress','abs','set','NgQTM','result','safrE','delete','maxEntries','11099196JnXlUO','hitCount'];_0x3d00=function(){return _0x3d4da7;};return _0x3d00();}const _0x2729c8=_0xa12d;(function(_0x15e1b8,_0x39d07c){const _0xba2d2f=_0xa12d,_0x22141c=_0x15e1b8();while(!![]){try{const _0x38c539=parseInt(_0xba2d2f(0x100))/0x1+parseInt(_0xba2d2f(0x105))/0x2*(-parseInt(_0xba2d2f(0x102))/0x3)+parseInt(_0xba2d2f(0x104))/0x4+-parseInt(_0xba2d2f(0x106))/0x5*(parseInt(_0xba2d2f(0x11c))/0x6)+-parseInt(_0xba2d2f(0x126))/0x7*(parseInt(_0xba2d2f(0x103))/0x8)+parseInt(_0xba2d2f(0x11a))/0x9+parseInt(_0xba2d2f(0x109))/0xa*(parseInt(_0xba2d2f(0x11f))/0xb);if(_0x38c539===_0x39d07c)break;else _0x22141c['push'](_0x22141c['shift']());}catch(_0x423984){_0x22141c['push'](_0x22141c['shift']());}}}(_0x3d00,0x99eef));function contentHash(_0x21269e){const _0x47ba62=_0xa12d,_0x2fc507={'iksRf':function(_0x37fc49,_0x4fa95a){return _0x37fc49+_0x4fa95a;},'jjBrH':function(_0x55a8c1,_0x533144){return _0x55a8c1-_0x533144;},'thDNS':function(_0x445ed8,_0x46ffd2){return _0x445ed8<<_0x46ffd2;}},_0x739445=_0x21269e['replace'](/\s+/g,'\x20')['trim']()[_0x47ba62(0x10b)]();let _0x1deb58=0x0;for(let _0x3cef34=0x0;_0x3cef34<_0x739445['length'];_0x3cef34++)_0x1deb58=_0x2fc507[_0x47ba62(0x110)](_0x2fc507[_0x47ba62(0x124)](_0x2fc507[_0x47ba62(0x10f)](_0x1deb58,0x5),_0x1deb58),_0x739445['charCodeAt'](_0x3cef34))|0x0;return Math[_0x47ba62(0x113)](_0x1deb58)[_0x47ba62(0x101)](0x24);}export class CompressionCache{[_0x2729c8(0x119)];['ttlMs'];['entries'];[_0x2729c8(0x11b)]=0x0;['missCount']=0x0;constructor(_0x493a7b){const _0x4b71ae=_0x2729c8;this['maxEntries']=_0x493a7b?.['maxEntries']??0x64,this[_0x4b71ae(0x120)]=_0x493a7b?.['ttlMs']??0x493e0,this['entries']=new Map();}[_0x2729c8(0x122)](_0x1a5df1){const _0x1a2c02=_0x2729c8,_0x26ff6d={'wmEEj':function(_0x4cd15c,_0x37f893){return _0x4cd15c>_0x37f893;}},_0x11a12c=contentHash(_0x1a5df1),_0x2a9c5c=this['entries'][_0x1a2c02(0x122)](_0x11a12c);if(_0x2a9c5c)return _0x26ff6d[_0x1a2c02(0x108)](Date['now'](),_0x2a9c5c['expiresAt'])?(this['entries'][_0x1a2c02(0x118)](_0x11a12c),void this['missCount']++):(this[_0x1a2c02(0x11d)][_0x1a2c02(0x118)](_0x11a12c),this[_0x1a2c02(0x11d)][_0x1a2c02(0x114)](_0x11a12c,_0x2a9c5c),this['hitCount']++,_0x2a9c5c[_0x1a2c02(0x116)]);this['missCount']++;}[_0x2729c8(0x114)](_0x245756,_0xdef437){const _0x4e6d51=_0x2729c8,_0x29f43d={'Hkwvf':function(_0xcb32ba,_0x17e64e){return _0xcb32ba(_0x17e64e);},'AxDlF':function(_0x19607e,_0x2ab34b){return _0x19607e!==_0x2ab34b;}},_0x4f5302=_0x29f43d[_0x4e6d51(0x123)](contentHash,_0x245756);if(this['entries'][_0x4e6d51(0x10e)](_0x4f5302)&&this[_0x4e6d51(0x11d)][_0x4e6d51(0x118)](_0x4f5302),this[_0x4e6d51(0x11d)]['size']>=this[_0x4e6d51(0x119)]){const _0x39c68e=this[_0x4e6d51(0x11d)][_0x4e6d51(0x121)]()['next']()[_0x4e6d51(0x107)];_0x29f43d[_0x4e6d51(0x10c)](void 0x0,_0x39c68e)&&this[_0x4e6d51(0x11d)]['delete'](_0x39c68e);}this[_0x4e6d51(0x11d)]['set'](_0x4f5302,{'result':_0xdef437,'expiresAt':Date['now']()+this['ttlMs']});}['has'](_0x5d3345){const _0x1bbafa=_0x2729c8,_0xdc36a1={'NgQTM':function(_0x5e8f9d,_0x4655ce){return _0x5e8f9d>_0x4655ce;}},_0x574da1=contentHash(_0x5d3345),_0x1f8ad3=this['entries'][_0x1bbafa(0x122)](_0x574da1);return!!_0x1f8ad3&&(!_0xdc36a1[_0x1bbafa(0x115)](Date[_0x1bbafa(0xff)](),_0x1f8ad3[_0x1bbafa(0x111)])||(this['entries']['delete'](_0x574da1),!0x1));}['clear'](){const _0x42f0ce=_0x2729c8;this[_0x42f0ce(0x11d)][_0x42f0ce(0x10d)](),this['hitCount']=0x0,this['missCount']=0x0;}get['size'](){const _0x30872a=_0x2729c8;return this[_0x30872a(0x11d)][_0x30872a(0x125)];}get[_0x2729c8(0x11e)](){const _0x58bf08=_0x2729c8,_0xbc8f5c={'OWSwj':function(_0x8d3844,_0x36765b){return _0x8d3844===_0x36765b;},'safrE':function(_0x5a595d,_0xb2f639){return _0x5a595d/_0xb2f639;}},_0x1f12bc=this['hitCount']+this['missCount'];return{'hits':this['hitCount'],'misses':this[_0x58bf08(0x10a)],'entries':this[_0x58bf08(0x11d)]['size'],'hitRate':_0xbc8f5c[_0x58bf08(0x127)](0x0,_0x1f12bc)?0x0:_0xbc8f5c[_0x58bf08(0x117)](this['hitCount'],_0x1f12bc)};}}function _0xa12d(_0x57ae99,_0x50f5f3){_0x57ae99=_0x57ae99-0xff;const _0x3d00e9=_0x3d00();let _0xa12d59=_0x3d00e9[_0x57ae99];return _0xa12d59;}export function createCachedPipeline(_0x586f84,_0x1df07e){const _0x4ad3ea=new CompressionCache(_0x1df07e);return{'compress':function(_0x3f9891,_0xbbd14d){const _0x41d30d=_0xa12d,_0x50ae00=_0x4ad3ea[_0x41d30d(0x122)](_0x3f9891);if(void 0x0!==_0x50ae00)return _0x50ae00;const _0x23e982=_0x586f84[_0x41d30d(0x112)](_0x3f9891,_0xbbd14d);return _0x4ad3ea['set'](_0x3f9891,_0x23e982),_0x23e982;},'cache':_0x4ad3ea};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x59d4ad,_0x3e5ce9){const _0x761dd4=_0x1ffc,_0x436ee0=_0x59d4ad();while(!![]){try{const _0x21423c=parseInt(_0x761dd4(0x1cc))/0x1+parseInt(_0x761dd4(0x1da))/0x2+parseInt(_0x761dd4(0x1d2))/0x3*(parseInt(_0x761dd4(0x1c9))/0x4)+-parseInt(_0x761dd4(0x1dd))/0x5*(-parseInt(_0x761dd4(0x1d4))/0x6)+-parseInt(_0x761dd4(0x1d3))/0x7*(-parseInt(_0x761dd4(0x1c8))/0x8)+-parseInt(_0x761dd4(0x1d9))/0x9*(-parseInt(_0x761dd4(0x1db))/0xa)+-parseInt(_0x761dd4(0x1c7))/0xb;if(_0x21423c===_0x3e5ce9)break;else _0x436ee0['push'](_0x436ee0['shift']());}catch(_0x17ffce){_0x436ee0['push'](_0x436ee0['shift']());}}}(_0x4ec8,0xf130e));import{encode,decode}from'gpt-tokenizer';import{countTokens}from'../../shared/token-counter.js';import{splitSentences}from'./text-utils.js';const DEFAULT_CHUNK_SIZE=0xc8,DEFAULT_OVERLAP=0x1e,DEFAULT_SENTENCES_PER_CHUNK=0x3,BASE_QUALITY_ESTIMATE=0.88,QUALITY_VARIANCE_WEIGHT=0.12;function splitIntoOverlappingChunks(_0x3f4850,_0x2505b4,_0x6ce262){const _0x207bf6=_0x1ffc,_0x13e4ab={'hLhYr':function(_0x7c0f75,_0x458cfb){return _0x7c0f75-_0x458cfb;},'thtJI':function(_0x1a4119,_0x2478e1){return _0x1a4119<_0x2478e1;},'wWIDI':function(_0x52a80a,_0x5b9854){return _0x52a80a===_0x5b9854;}},_0x566a2e=Math[_0x207bf6(0x1cb)](_0x6ce262,_0x2505b4-0x1),_0x3f966e=Math[_0x207bf6(0x1d8)](0x1,_0x13e4ab[_0x207bf6(0x1d0)](_0x2505b4,_0x566a2e)),_0x2f416a=[];let _0x18ebf4=0x0;for(;_0x13e4ab['thtJI'](_0x18ebf4,_0x3f4850['length']);){const _0x2a5052=Math[_0x207bf6(0x1cb)](_0x18ebf4+_0x2505b4,_0x3f4850['length']),_0x688aca=_0x3f4850[_0x207bf6(0x1c5)](_0x18ebf4,_0x2a5052);if(_0x2f416a['push'](decode(_0x688aca)),_0x13e4ab[_0x207bf6(0x1de)](_0x2a5052,_0x3f4850[_0x207bf6(0x1d5)]))break;_0x18ebf4+=_0x3f966e;}return _0x2f416a;}function _0x1ffc(_0x3a2e8e,_0x396600){_0x3a2e8e=_0x3a2e8e-0x1c5;const _0x4ec8fc=_0x4ec8();let _0x1ffcd8=_0x4ec8fc[_0x3a2e8e];return _0x1ffcd8;}function summarizeChunk(_0x34f7a2,_0x1ddfc){const _0x316d5e=_0x1ffc,_0x553e0d={'olbTw':function(_0x52e9e2,_0x38e2e5){return _0x52e9e2<=_0x38e2e5;},'ohuqu':function(_0x5ef1c2,_0x39b23f){return _0x5ef1c2-_0x39b23f;}},_0x533c64=splitSentences(_0x34f7a2);if(_0x553e0d[_0x316d5e(0x1ce)](_0x533c64['length'],_0x1ddfc))return _0x34f7a2;if(0x1===_0x1ddfc)return _0x533c64[0x0];return[..._0x533c64['slice'](0x0,0x1),..._0x533c64['slice'](-_0x553e0d[_0x316d5e(0x1cd)](_0x1ddfc,0x1))]['join']('.\x20');}export function compressChunked(_0x3eeefa,_0x580db4={}){const _0x20f595=_0x1ffc,_0x500343={'abVlK':function(_0x1d8e2c,_0x28a4ab,_0x4e606a){return _0x1d8e2c(_0x28a4ab,_0x4e606a);},'pCJvR':'chunked','IUnlE':function(_0x3267d0,_0x1a5721){return _0x3267d0(_0x1a5721);},'JriLY':function(_0x304239,_0xb35aa1,_0x157f81,_0x141555){return _0x304239(_0xb35aa1,_0x157f81,_0x141555);},'gcZfj':function(_0x2961e1,_0x50c683){return _0x2961e1>_0x50c683;},'HWBrE':function(_0x2dfff5,_0x56dfa6){return _0x2dfff5+_0x56dfa6;},'lWvfj':function(_0x1722c7,_0x15be11){return _0x1722c7*_0x15be11;},'weQLW':function(_0x17f025,_0x307ffd){return _0x17f025/_0x307ffd;}};if(!_0x3eeefa||!_0x3eeefa['trim']())return{'text':'','originalTokens':0x0,'compressedTokens':0x0,'compressionRatio':0x1,'strategyUsed':_0x500343['pCJvR'],'qualityEstimate':0x1,'wasTruncated':!0x1};const _0x436c10=_0x500343['IUnlE'](countTokens,_0x3eeefa),_0x445b75=_0x580db4[_0x20f595(0x1dc)]??0xc8,_0x502e16=_0x580db4['overlap']??0x1e,_0x55bc41=_0x580db4['sentencesPerChunk']??0x3;if(_0x436c10<=_0x445b75)return{'text':_0x3eeefa,'originalTokens':_0x436c10,'compressedTokens':_0x436c10,'compressionRatio':0x1,'strategyUsed':_0x20f595(0x1d1),'qualityEstimate':0x1,'wasTruncated':!0x1};const _0x351537=_0x500343[_0x20f595(0x1cf)](splitIntoOverlappingChunks,encode(_0x3eeefa),_0x445b75,_0x502e16),_0x59717c=_0x351537['map']((_0x4c5846,_0x20c87b)=>{const _0x585ff7=_0x20f595,_0x2ffd43=_0x500343[_0x585ff7(0x1d7)](summarizeChunk,_0x4c5846,_0x55bc41);return'['+(_0x20c87b+0x1)+'/'+_0x351537[_0x585ff7(0x1d5)]+']\x20'+_0x2ffd43;})[_0x20f595(0x1d6)]('\x0a\x0a'),_0x549bc7=countTokens(_0x59717c);return{'text':_0x59717c,'originalTokens':_0x436c10,'compressedTokens':_0x549bc7,'compressionRatio':_0x500343['gcZfj'](_0x549bc7,0x0)?_0x436c10/_0x549bc7:0x1,'strategyUsed':_0x500343['pCJvR'],'qualityEstimate':Math['min'](0x1,_0x500343[_0x20f595(0x1ca)](0.88,_0x500343['lWvfj'](_0x500343[_0x20f595(0x1c6)](_0x549bc7,_0x436c10),0.12))),'wasTruncated':!0x0};}export const chunkedStrategy={'name':'chunked','compress':(_0x49e94c,_0x3de92e)=>compressChunked(_0x49e94c,_0x3de92e)};function _0x4ec8(){const _0x77f3fb=['JriLY','hLhYr','chunked','433263nZZmXU','289793YEwBVL','12jpCqan','length','join','abVlK','max','9uhhunB','2297884lubwqU','15835270LAVDTb','chunkSize','1691930JiowGw','wWIDI','slice','weQLW','60605380GpKXTo','72WdAGrp','52fBgfCE','HWBrE','min','838193DdyYsr','ohuqu','olbTw'];_0x4ec8=function(){return _0x77f3fb;};return _0x4ec8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x4f16e7=_0x314c;(function(_0x4abf48,_0x13ef61){const _0x42c632=_0x314c,_0x4dc6cb=_0x4abf48();while(!![]){try{const _0x1e36ab=-parseInt(_0x42c632(0xd5))/0x1+parseInt(_0x42c632(0xca))/0x2*(-parseInt(_0x42c632(0xd2))/0x3)+-parseInt(_0x42c632(0xcd))/0x4+-parseInt(_0x42c632(0xcc))/0x5*(-parseInt(_0x42c632(0xd4))/0x6)+-parseInt(_0x42c632(0xbe))/0x7*(parseInt(_0x42c632(0xc0))/0x8)+-parseInt(_0x42c632(0xbf))/0x9+-parseInt(_0x42c632(0xbc))/0xa*(-parseInt(_0x42c632(0xcf))/0xb);if(_0x1e36ab===_0x13ef61)break;else _0x4dc6cb['push'](_0x4dc6cb['shift']());}catch(_0x14e5fb){_0x4dc6cb['push'](_0x4dc6cb['shift']());}}}(_0x46a1,0x31946));import{countTokens}from'../../shared/token-counter.js';import{extractContentWords,STOPWORDS}from'./text-utils.js';const DEFAULT_SIMILARITY_THRESHOLD=0.7,MIN_WORDS_FOR_DEDUP=0x5,CODE_FENCE_PATTERN=/^```/,HEADING_PATTERN=/^#/,BASE_QUALITY_ESTIMATE=0.95;function _0x314c(_0x1292a9,_0xd60322){_0x1292a9=_0x1292a9-0xba;const _0x46a170=_0x46a1();let _0x314c28=_0x46a170[_0x1292a9];return _0x314c28;}function isInsideCodeFence(_0x31da9a,_0x19fcf0){const _0x3d8f0d=_0x314c;let _0x1e0188=!0x1;for(let _0x4d7edf=0x0;_0x4d7edf<_0x19fcf0;_0x4d7edf++){const _0x41a232=_0x31da9a[_0x4d7edf]['split']('\x0a');for(const _0x682f01 of _0x41a232)CODE_FENCE_PATTERN['test'](_0x682f01[_0x3d8f0d(0xd1)]())&&(_0x1e0188=!_0x1e0188);}return _0x1e0188;}function hasCodeFence(_0x4e7cf3){const _0x5e980e=_0x314c;return _0x4e7cf3['split']('\x0a')['some'](_0x556472=>CODE_FENCE_PATTERN['test'](_0x556472[_0x5e980e(0xd1)]()));}function isHeading(_0x3e20bb){const _0x27d904=_0x314c;return HEADING_PATTERN['test'](_0x3e20bb[_0x27d904(0xd1)]());}function isTooShort(_0x6a8bec){const _0x49fcf1={'oGsRy':function(_0x2e8ff8,_0x478ce2){return _0x2e8ff8<_0x478ce2;}};return _0x49fcf1['oGsRy'](_0x6a8bec['trim']()['split'](/\s+/)['length'],0x5);}function computeFingerprint(_0x20e572){const _0x5e6613=_0x314c,_0x107e83=extractContentWords(_0x20e572)[_0x5e6613(0xd3)](_0x2019ae=>!STOPWORDS['has'](_0x2019ae));return new Set(_0x107e83['sort']());}function computeJaccardSimilarity(_0xaad06b,_0xcd4d1f){const _0x2cb14d=_0x314c,_0x29fd98={'RDtBW':function(_0x3cfbff,_0x3351d0){return _0x3cfbff===_0x3351d0;},'WjDwQ':function(_0x2c0edc,_0x24a6ca){return _0x2c0edc===_0x24a6ca;},'MhpAR':function(_0x4567ed,_0x428ac8){return _0x4567ed<=_0x428ac8;},'jVZhi':function(_0x18c932,_0x453c5e){return _0x18c932-_0x453c5e;},'uGhqX':function(_0x9597c1,_0x4f1ef8){return _0x9597c1+_0x4f1ef8;}};if(_0x29fd98['RDtBW'](0x0,_0xaad06b[_0x2cb14d(0xcb)])&&_0x29fd98['WjDwQ'](0x0,_0xcd4d1f[_0x2cb14d(0xcb)]))return 0x0;let _0xa1a151=0x0;const _0xaed88c=_0x29fd98[_0x2cb14d(0xc2)](_0xaad06b[_0x2cb14d(0xcb)],_0xcd4d1f[_0x2cb14d(0xcb)])?_0xaad06b:_0xcd4d1f,_0x511459=_0x29fd98['MhpAR'](_0xaad06b['size'],_0xcd4d1f[_0x2cb14d(0xcb)])?_0xcd4d1f:_0xaad06b;for(const _0xb3a17f of _0xaed88c)_0x511459['has'](_0xb3a17f)&&_0xa1a151++;const _0x3a2ea5=_0x29fd98['jVZhi'](_0x29fd98[_0x2cb14d(0xc8)](_0xaad06b[_0x2cb14d(0xcb)],_0xcd4d1f['size']),_0xa1a151);return _0x3a2ea5>0x0?_0xa1a151/_0x3a2ea5:0x0;}function _0x46a1(){const _0x52c395=['1720JLVaxD','similarityThreshold','1393BdpdyQ','3385026kKKCkw','3728uFANlh','maxTokens','MhpAR','length','min','qAHcE','fingerprint','dedup','uGhqX','MbDFO','35852nagJlK','size','95swtInd','1337640jswhOk','split','96217MNPevP','rHVBe','trim','60rQRxRq','filter','35886PvllGv','253267eefDNt','add','text'];_0x46a1=function(){return _0x52c395;};return _0x46a1();}function splitParagraphs(_0x212a99){const _0x3a28f8=_0x314c;return _0x212a99[_0x3a28f8(0xce)](/\n\n+/);}function buildParagraphEntries(_0x300814){const _0x2cc66a={'cZdEe':function(_0x14f44b,_0x13255e){return _0x14f44b(_0x13255e);}};return _0x300814['map']((_0x1c4ebf,_0x3a159f)=>{const _0x17d885=isTooShort(_0x1c4ebf)||isHeading(_0x1c4ebf)||hasCodeFence(_0x1c4ebf)||isInsideCodeFence(_0x300814,_0x3a159f);return{'index':_0x3a159f,'text':_0x1c4ebf,'fingerprint':_0x17d885?new Set():_0x2cc66a['cZdEe'](computeFingerprint,_0x1c4ebf),'isProtected':_0x17d885};});}function findDuplicates(_0x4d929d,_0x1e41fc){const _0xdb8031=_0x314c,_0x9dd6c0={'MbDFO':function(_0x301ac7,_0x47b39b){return _0x301ac7+_0x47b39b;},'qAHcE':function(_0x59b199,_0x1682ea){return _0x59b199<_0x1682ea;},'ogNgf':function(_0x51a5b6,_0x337097){return _0x51a5b6>=_0x337097;}},_0x2a2bf7=new Set();let _0x284745=0x0;for(let _0x34c192=0x0;_0x34c192<_0x4d929d[_0xdb8031(0xc3)];_0x34c192++){const _0x3b5478=_0x4d929d[_0x34c192];if(_0x3b5478['isProtected']||_0x2a2bf7['has'](_0x34c192))continue;let _0x267ff3=!0x1;for(let _0x4785c6=_0x9dd6c0[_0xdb8031(0xc9)](_0x34c192,0x1);_0x9dd6c0[_0xdb8031(0xc5)](_0x4785c6,_0x4d929d['length']);_0x4785c6++){const _0x7f3047=_0x4d929d[_0x4785c6];if(_0x7f3047['isProtected']||_0x2a2bf7['has'](_0x4785c6))continue;_0x9dd6c0['ogNgf'](computeJaccardSimilarity(_0x3b5478[_0xdb8031(0xc6)],_0x7f3047[_0xdb8031(0xc6)]),_0x1e41fc)&&(_0x2a2bf7[_0xdb8031(0xba)](_0x4785c6),_0x267ff3=!0x0);}_0x267ff3&&_0x284745++;}const _0x50e715=new Set();for(let _0x4ea424=0x0;_0x4ea424<_0x4d929d[_0xdb8031(0xc3)];_0x4ea424++)_0x2a2bf7['has'](_0x4ea424)||_0x50e715['add'](_0x4ea424);return{'keptIndices':_0x50e715,'removedIndices':_0x2a2bf7,'groupCount':_0x284745};}export function deduplicateText(_0x2d9f14,_0x5e39c9){const _0x5a83fe=_0x314c;if(!_0x2d9f14||!_0x2d9f14[_0x5a83fe(0xd1)]())return{'text':'','originalParagraphs':0x0,'keptParagraphs':0x0,'removedParagraphs':0x0,'duplicateGroups':0x0};const _0x102438=_0x5e39c9?.[_0x5a83fe(0xbd)]??0.7,_0x257563=splitParagraphs(_0x2d9f14),_0x4e3a92=buildParagraphEntries(_0x257563),{keptIndices:_0x3feb22,removedIndices:_0x32447d,groupCount:_0x37f5ff}=findDuplicates(_0x4e3a92,_0x102438),_0x3a39a2=_0x4e3a92[_0x5a83fe(0xd3)](_0xa11682=>_0x3feb22['has'](_0xa11682['index']))['map'](_0x1abf73=>_0x1abf73[_0x5a83fe(0xbb)]);return{'text':_0x3a39a2['join']('\x0a\x0a'),'originalParagraphs':_0x257563[_0x5a83fe(0xc3)],'keptParagraphs':_0x3a39a2['length'],'removedParagraphs':_0x32447d['size'],'duplicateGroups':_0x37f5ff};}export function compressDedup(_0x21261a,_0x3c63ef={}){const _0x399ac8=_0x314c,_0x2b9091={'Krgyn':_0x399ac8(0xc7),'ZoVrb':function(_0x5f2c93,_0x415d16){return _0x5f2c93(_0x415d16);},'rHVBe':function(_0x312e45,_0x440d53){return _0x312e45(_0x440d53);},'QMzgB':function(_0x4478a3,_0x56eca0){return _0x4478a3/_0x56eca0;},'xWOTS':function(_0x1e2652,_0x139ea1){return _0x1e2652>_0x139ea1;},'wgExI':function(_0x3a382f,_0x30513e){return _0x3a382f<=_0x30513e;}};if(!_0x21261a||!_0x21261a['trim']())return{'text':'','originalTokens':0x0,'compressedTokens':0x0,'compressionRatio':0x1,'strategyUsed':_0x2b9091['Krgyn'],'qualityEstimate':0x1,'wasTruncated':!0x1};const _0x563c3e=_0x2b9091['ZoVrb'](countTokens,_0x21261a),_0xbeab31=_0x2b9091[_0x399ac8(0xd0)](deduplicateText,_0x21261a),_0x447111=countTokens(_0xbeab31[_0x399ac8(0xbb)]),_0x4a5e9c=_0xbeab31['removedParagraphs']>0x0?Math[_0x399ac8(0xc4)](0x1,0.95+_0x2b9091['QMzgB'](_0x447111,_0x563c3e)*(0x1-0.95)):0x1;let _0x878f3e=_0xbeab31[_0x399ac8(0xbb)],_0x509764=!0x1;if(_0x3c63ef[_0x399ac8(0xc1)]&&_0x2b9091['xWOTS'](_0x447111,_0x3c63ef['maxTokens'])){const _0x421ac9=splitParagraphs(_0x878f3e),_0x265a7d=[];let _0x16bf10=0x0;for(const _0x5a33ec of _0x421ac9){const _0x519a45=countTokens(_0x5a33ec);if(!_0x2b9091['wgExI'](_0x16bf10+_0x519a45,_0x3c63ef['maxTokens'])){_0x509764=!0x0;break;}_0x265a7d['push'](_0x5a33ec),_0x16bf10+=_0x519a45;}_0x878f3e=_0x265a7d['join']('\x0a\x0a');}const _0x5b1737=_0x509764?_0x2b9091['rHVBe'](countTokens,_0x878f3e):_0x447111;return{'text':_0x878f3e,'originalTokens':_0x563c3e,'compressedTokens':_0x5b1737,'compressionRatio':_0x5b1737>0x0?_0x563c3e/_0x5b1737:0x1,'strategyUsed':_0x2b9091['Krgyn'],'qualityEstimate':_0x4a5e9c,'wasTruncated':_0x509764};}export const dedupStrategy={'name':_0x4f16e7(0xc7),'compress':compressDedup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x17004a,_0x31a11a){const _0x3230b9=_0x27c0,_0x15a9ee=_0x17004a();while(!![]){try{const _0x7921c1=parseInt(_0x3230b9(0xd5))/0x1*(-parseInt(_0x3230b9(0xcd))/0x2)+-parseInt(_0x3230b9(0xe6))/0x3*(parseInt(_0x3230b9(0xec))/0x4)+parseInt(_0x3230b9(0xd6))/0x5*(parseInt(_0x3230b9(0xe5))/0x6)+-parseInt(_0x3230b9(0xca))/0x7*(parseInt(_0x3230b9(0xd7))/0x8)+-parseInt(_0x3230b9(0xea))/0x9+-parseInt(_0x3230b9(0xe7))/0xa+parseInt(_0x3230b9(0xdc))/0xb;if(_0x7921c1===_0x31a11a)break;else _0x15a9ee['push'](_0x15a9ee['shift']());}catch(_0x26f45f){_0x15a9ee['push'](_0x15a9ee['shift']());}}}(_0x1220,0xd7fcf));import{countTokens}from'../../shared/token-counter.js';const FENCED_JSON_BLOCK=/```(?:json)?\s*\n([\s\S]*?)```/g,INLINE_JSON_OBJECT=/(?<![\\:a-zA-Z0-9_"'])(\{[\s\S]*?\})(?![\\a-zA-Z0-9_])/g,INLINE_JSON_ARRAY=/(?<![\\:a-zA-Z0-9_"'])(\[[\s\S]*?\])(?![\\a-zA-Z0-9_])/g,CONSECUTIVE_BLANK_LINES=/\n{3,}/g,EXCESSIVE_LIST_INDENT=/^( {4,}|\t{2,})([*\-+]|\d+\.)\s/gm,BOLD_WHOLE_PARAGRAPH=/^\*\*([^*\n]+)\*\*$/gm,ITALIC_WHOLE_PARAGRAPH=/^_([^_\n]+)_$/gm,MAX_FLATTEN_DEPTH=0x2;function isJsonLike(_0x468098){const _0x48b95c=_0x27c0,_0x3cb83a=_0x468098['trim']();return _0x3cb83a[_0x48b95c(0xc5)]('{')&&_0x3cb83a['endsWith']('}')||_0x3cb83a[_0x48b95c(0xc5)]('[')&&_0x3cb83a[_0x48b95c(0xc6)](']');}function tryParseJson(_0x47b79d){try{return JSON['parse'](_0x47b79d);}catch{return null;}}function flattenObject(_0x49d860,_0x521c29,_0x5af7ea){const _0x1f3e7b=_0x27c0,_0x7d4888={'dtnkC':function(_0x25ae4e,_0x441fe7){return _0x25ae4e==_0x441fe7;},'PrqPF':function(_0x23741b,_0x37d69f){return _0x23741b+_0x37d69f;}},_0x781464=[];for(const [_0x31b490,_0x25b445]of Object['entries'](_0x49d860)){const _0x16493b=_0x521c29?_0x521c29+'.'+_0x31b490:_0x31b490;null!==_0x25b445&&_0x7d4888[_0x1f3e7b(0xd9)]('object',typeof _0x25b445)&&!Array['isArray'](_0x25b445)&&_0x5af7ea<0x2?_0x781464[_0x1f3e7b(0xce)](...flattenObject(_0x25b445,_0x16493b,_0x7d4888[_0x1f3e7b(0xe3)](_0x5af7ea,0x1))):_0x781464['push']([_0x16493b,_0x25b445]);}return _0x781464;}function formatValue(_0x2ee06c){const _0x3adc6c=_0x27c0,_0x591ab1={'FDhHx':function(_0x1895cb,_0x2bec77){return _0x1895cb===_0x2bec77;},'WjfRm':_0x3adc6c(0xe0),'bWXXz':function(_0x26a6ed,_0x5d72d7){return _0x26a6ed===_0x5d72d7;},'KBapf':function(_0x461888,_0x3057cc){return _0x461888==_0x3057cc;}};if(_0x591ab1['FDhHx'](null,_0x2ee06c))return _0x591ab1['WjfRm'];if(_0x591ab1[_0x3adc6c(0xdb)](void 0x0,_0x2ee06c))return'undefined';if(_0x3adc6c(0xcb)==typeof _0x2ee06c)return _0x2ee06c;if(_0x591ab1['KBapf'](_0x3adc6c(0xc4),typeof _0x2ee06c)||_0x3adc6c(0xcc)==typeof _0x2ee06c)return String(_0x2ee06c);if(Array[_0x3adc6c(0xe9)](_0x2ee06c))return'['+_0x2ee06c[_0x3adc6c(0xe1)](_0x13958f=>'object'==typeof _0x13958f&&null!==_0x13958f?JSON['stringify'](_0x13958f):formatValue(_0x13958f))[_0x3adc6c(0xd3)](',\x20')+']';return JSON[_0x3adc6c(0xdd)](_0x2ee06c);}function hasDeepNesting(_0x21dff8,_0x180212){const _0x8e86e2=_0x27c0,_0x43263f={'opzeX':'object'};return _0x180212>0x2||_0x43263f[_0x8e86e2(0xc9)]==typeof _0x21dff8&&null!==_0x21dff8&&(Array[_0x8e86e2(0xe9)](_0x21dff8)?_0x21dff8['some'](_0x2389d9=>hasDeepNesting(_0x2389d9,_0x180212+0x1)):Object[_0x8e86e2(0xe2)](_0x21dff8)[_0x8e86e2(0xe8)](_0x392f4f=>hasDeepNesting(_0x392f4f,_0x180212+0x1)));}function convertJsonToCompact(_0x22a7f3){const _0x4fee2f=_0x27c0,_0x48af26={'oKQYy':function(_0x5dfd66,_0x2d9dda,_0x1002ca){return _0x5dfd66(_0x2d9dda,_0x1002ca);},'dPMTH':function(_0x39e679,_0x5966e2){return _0x39e679==_0x5966e2;},'AcQwb':'object','WwnUy':function(_0x4c9dbc,_0x4b867f){return _0x4c9dbc!==_0x4b867f;},'Llrpi':function(_0x117b9a,_0x28b812,_0x4a4f3c){return _0x117b9a(_0x28b812,_0x4a4f3c);},'qHInI':function(_0x46caa7,_0x18bd84){return _0x46caa7(_0x18bd84);}};if(Array[_0x4fee2f(0xe9)](_0x22a7f3))return _0x22a7f3['every'](_0x1705bf=>'object'!=typeof _0x1705bf||null===_0x1705bf)?'['+_0x22a7f3[_0x4fee2f(0xe1)](formatValue)['join'](',\x20')+']':_0x48af26['oKQYy'](hasDeepNesting,_0x22a7f3,0x0)?JSON[_0x4fee2f(0xdd)](_0x22a7f3):_0x22a7f3['map'](_0x5c4cc2=>_0x4fee2f(0xed)!=typeof _0x5c4cc2||null===_0x5c4cc2||Array['isArray'](_0x5c4cc2)?formatValue(_0x5c4cc2):convertObjectToCompact(_0x5c4cc2))['join']('\x0a');if(_0x48af26['dPMTH'](_0x48af26['AcQwb'],typeof _0x22a7f3)&&_0x48af26[_0x4fee2f(0xe4)](null,_0x22a7f3)){if(_0x48af26[_0x4fee2f(0xda)](hasDeepNesting,_0x22a7f3,0x0)){const _0x1b2cac=_0x22a7f3;if(!Object[_0x4fee2f(0xe2)](_0x1b2cac)[_0x4fee2f(0xe8)](_0x5c70fe=>'object'!=typeof _0x5c70fe||null===_0x5c70fe))return JSON[_0x4fee2f(0xdd)](_0x22a7f3);}return convertObjectToCompact(_0x22a7f3);}return _0x48af26['qHInI'](formatValue,_0x22a7f3);}function convertObjectToCompact(_0x2af2cf){const _0x304011=_0x27c0,_0x288bc0={'qqAMd':function(_0x52247b,_0x51f546,_0x329835,_0x52ae17){return _0x52247b(_0x51f546,_0x329835,_0x52ae17);}},_0x4f00d6=_0x288bc0['qqAMd'](flattenObject,_0x2af2cf,'',0x0)[_0x304011(0xe1)](([_0x21dc36,_0x30aff5])=>'object'==typeof _0x30aff5&&null!==_0x30aff5?_0x21dc36+':\x20'+JSON['stringify'](_0x30aff5):_0x21dc36+':\x20'+formatValue(_0x30aff5));return _0x4f00d6[_0x304011(0xef)]<=0x4&&_0x4f00d6['every'](_0x56e603=>_0x56e603['length']<0x3c)?_0x4f00d6[_0x304011(0xd3)](',\x20'):_0x4f00d6[_0x304011(0xd3)]('\x0a');}function _0x1220(){const _0x3930a9=['string','boolean','3105772RwhgrL','push','text','cleaned','xNPYj','biyvh','join','uQOma','1phRpYu','6585YXozIn','8gLYiHU','pBtMh','dtnkC','Llrpi','bWXXz','52716004QpPDgU','stringify','tnaxW','replace','null','map','values','PrqPF','WwnUy','5262nYiLBW','5254329DdUVLO','1944100SjOFUq','some','isArray','5757948OenPnt','trim','4hzDgRs','object','markdownCleaned','length','number','startsWith','endsWith','count','cydlo','opzeX','6469225YVAYIh'];_0x1220=function(){return _0x3930a9;};return _0x1220();}function replaceJsonBlocks(_0x49ccb7){const _0x557801=_0x27c0,_0x17e2b9={'biyvh':function(_0x37a915,_0x105edd){return _0x37a915(_0x105edd);},'tnaxW':function(_0x310b19,_0x5136fd){return _0x310b19===_0x5136fd;},'xNPYj':function(_0x3041f7,_0x3ffb00){return _0x3041f7!==_0x3ffb00;}};let _0x5c814e=0x0,_0x11bd3d=_0x49ccb7;return _0x11bd3d=_0x11bd3d['replace'](FENCED_JSON_BLOCK,(_0x57cc05,_0x1cf95b)=>{const _0x1c9c15=_0x27c0,_0xf7a453=_0x1cf95b[_0x1c9c15(0xeb)]();if(!_0x17e2b9['biyvh'](isJsonLike,_0xf7a453))return _0x57cc05;const _0x4b7230=tryParseJson(_0xf7a453);return _0x17e2b9[_0x1c9c15(0xde)](null,_0x4b7230)?_0x57cc05:(_0x5c814e++,_0x17e2b9[_0x1c9c15(0xd2)](convertJsonToCompact,_0x4b7230));}),_0x11bd3d=_0x11bd3d[_0x557801(0xdf)](INLINE_JSON_OBJECT,(_0x1b4ce8,_0x3615a6)=>{const _0x46414a=_0x557801,_0x1f9305=tryParseJson(_0x3615a6);return _0x17e2b9['tnaxW'](null,_0x1f9305)||_0x46414a(0xed)!=typeof _0x1f9305||Array[_0x46414a(0xe9)](_0x1f9305)?_0x1b4ce8:(_0x5c814e++,_0x17e2b9['biyvh'](convertJsonToCompact,_0x1f9305));}),_0x11bd3d=_0x11bd3d['replace'](INLINE_JSON_ARRAY,(_0x284bde,_0x450a02)=>{const _0x13029c=_0x557801,_0x390ed2=tryParseJson(_0x450a02);return _0x17e2b9[_0x13029c(0xd1)](null,_0x390ed2)&&Array[_0x13029c(0xe9)](_0x390ed2)?0x0===_0x390ed2[_0x13029c(0xef)]?_0x284bde:(_0x5c814e++,convertJsonToCompact(_0x390ed2)):_0x284bde;}),{'text':_0x11bd3d,'count':_0x5c814e};}function cleanMarkdown(_0x2f9467){const _0x1ece7e=_0x27c0,_0x39be9b={'pBtMh':function(_0x242b7d,_0x5a0b55){return _0x242b7d!==_0x5a0b55;}};let _0xfbc05e=!0x1,_0x5e16b5=_0x2f9467;const _0x4a3f3d=_0x5e16b5;_0x5e16b5=_0x5e16b5['replace'](CONSECUTIVE_BLANK_LINES,'\x0a\x0a'),_0x39be9b[_0x1ece7e(0xd8)](_0x5e16b5,_0x4a3f3d)&&(_0xfbc05e=!0x0);const _0x56ed3a=_0x5e16b5;_0x5e16b5=_0x5e16b5[_0x1ece7e(0xdf)](EXCESSIVE_LIST_INDENT,'\x20\x20$2\x20'),_0x39be9b['pBtMh'](_0x5e16b5,_0x56ed3a)&&(_0xfbc05e=!0x0);const _0x3998bc=_0x5e16b5;_0x5e16b5=_0x5e16b5['replace'](BOLD_WHOLE_PARAGRAPH,'$1'),_0x5e16b5!==_0x3998bc&&(_0xfbc05e=!0x0);const _0x5bf31e=_0x5e16b5;return _0x5e16b5=_0x5e16b5['replace'](ITALIC_WHOLE_PARAGRAPH,'$1'),_0x39be9b['pBtMh'](_0x5e16b5,_0x5bf31e)&&(_0xfbc05e=!0x0),{'text':_0x5e16b5,'cleaned':_0xfbc05e};}export function optimizeFormat(_0x448660){const _0x2f7685=_0x27c0,_0x307147={'VEomG':function(_0x3890a6,_0xe58e15){return _0x3890a6(_0xe58e15);}};if(!_0x448660||!_0x448660['trim']())return{'text':'','jsonBlocksConverted':0x0,'markdownCleaned':!0x1};const _0x1cf76f=_0x307147['VEomG'](replaceJsonBlocks,_0x448660),_0x4b2b34=_0x307147['VEomG'](cleanMarkdown,_0x1cf76f[_0x2f7685(0xcf)]);return{'text':_0x4b2b34[_0x2f7685(0xcf)],'jsonBlocksConverted':_0x1cf76f[_0x2f7685(0xc7)],'markdownCleaned':_0x4b2b34[_0x2f7685(0xd0)]};}function _0x27c0(_0x344b6c,_0x189b68){_0x344b6c=_0x344b6c-0xc4;const _0x122004=_0x1220();let _0x27c046=_0x122004[_0x344b6c];return _0x27c046;}export const formatOptimizerStrategy={'name':'format-optimizer','compress'(_0x26fa9a,_0x49ba36={}){const _0x24f177=_0x27c0,_0x2fa0fa={'cydlo':function(_0x572675,_0x4280c0){return _0x572675(_0x4280c0);},'uQOma':function(_0x5b02a0,_0x20f844){return _0x5b02a0/_0x20f844;}};if(!_0x26fa9a||!_0x26fa9a['trim']())return{'text':'','originalTokens':0x0,'compressedTokens':0x0,'compressionRatio':0x1,'strategyUsed':'format-optimizer','qualityEstimate':0x1,'wasTruncated':!0x1};const _0x212d36=_0x2fa0fa[_0x24f177(0xc8)](countTokens,_0x26fa9a),_0x3fc8fd=optimizeFormat(_0x26fa9a),_0x26dc29=_0x2fa0fa[_0x24f177(0xc8)](countTokens,_0x3fc8fd[_0x24f177(0xcf)]),_0x240eab=_0x26dc29>0x0?_0x2fa0fa[_0x24f177(0xd4)](_0x212d36,_0x26dc29):0x1,_0x15bf63=_0x3fc8fd['jsonBlocksConverted']>0x0?0.92:_0x3fc8fd[_0x24f177(0xee)]?0.98:0x1;return{'text':_0x3fc8fd['text'],'originalTokens':_0x212d36,'compressedTokens':_0x26dc29,'compressionRatio':_0x240eab,'strategyUsed':'format-optimizer','qualityEstimate':_0x15bf63,'wasTruncated':!0x1};}};
|
|
1
|
+
const _0x10acd5=_0x48bb;(function(_0x32d5b4,_0x51fa68){const _0x8cf7fd=_0x48bb,_0x35b8fc=_0x32d5b4();while(!![]){try{const _0x58e9ad=parseInt(_0x8cf7fd(0x1f9))/0x1*(-parseInt(_0x8cf7fd(0x204))/0x2)+parseInt(_0x8cf7fd(0x1f2))/0x3+-parseInt(_0x8cf7fd(0x1ea))/0x4+-parseInt(_0x8cf7fd(0x1e1))/0x5*(-parseInt(_0x8cf7fd(0x201))/0x6)+parseInt(_0x8cf7fd(0x1fe))/0x7*(-parseInt(_0x8cf7fd(0x1ec))/0x8)+-parseInt(_0x8cf7fd(0x1f8))/0x9*(parseInt(_0x8cf7fd(0x1f7))/0xa)+parseInt(_0x8cf7fd(0x1ee))/0xb;if(_0x58e9ad===_0x51fa68)break;else _0x35b8fc['push'](_0x35b8fc['shift']());}catch(_0x11ea22){_0x35b8fc['push'](_0x35b8fc['shift']());}}}(_0x4f25,0xbbc50));function _0x4f25(){const _0x5a39e9=['startsWith','map','object','1013160svgTdv','format-optimizer','cBYjr','string','jsonBlocksConverted','1517330MoMIzg','63icGvyi','8SyZrFd','split','join','every','pMOSK','2605379BhBEyj','nWYbi','SQCEU','144viPeVI','fiSFY','count','228428LtQpDX','length','KoesB','ZvhjJ','1|2|5|0|4|3','bKyDU','null','ycJHj','push','QtJVj','stringify','some','isArray','qIfio','replace','307120mKMIaS','markdownCleaned','JDixq','values','SWtFw','parse','Uzybp','\x20\x20$2\x20','SOVtJ','792272JDRBtP','NVonx','24jdvzRf','text','24724810rabwuP'];_0x4f25=function(){return _0x5a39e9;};return _0x4f25();}import{countTokens}from'../../shared/token-counter.js';const FENCED_JSON_BLOCK=/```(?:json)?\s*\n([\s\S]*?)```/g,INLINE_JSON_OBJECT=/(?<![\\:a-zA-Z0-9_"'])(\{[\s\S]*?\})(?![\\a-zA-Z0-9_])/g,INLINE_JSON_ARRAY=/(?<![\\:a-zA-Z0-9_"'])(\[[\s\S]*?\])(?![\\a-zA-Z0-9_])/g,CONSECUTIVE_BLANK_LINES=/\n{3,}/g,EXCESSIVE_LIST_INDENT=/^( {4,}|\t{2,})([*\-+]|\d+\.)\s/gm,BOLD_WHOLE_PARAGRAPH=/^\*\*([^*\n]+)\*\*$/gm,ITALIC_WHOLE_PARAGRAPH=/^_([^_\n]+)_$/gm,MAX_FLATTEN_DEPTH=0x2;function isJsonLike(_0xbd5ade){const _0x48c015=_0x48bb,_0x3b68cf=_0xbd5ade['trim']();return _0x3b68cf[_0x48c015(0x1ef)]('{')&&_0x3b68cf['endsWith']('}')||_0x3b68cf['startsWith']('[')&&_0x3b68cf['endsWith'](']');}function tryParseJson(_0x329b74){const _0x51672d=_0x48bb;try{return JSON[_0x51672d(0x1e6)](_0x329b74);}catch{return null;}}function flattenObject(_0x3548b5,_0x35fb84,_0x416752){const _0x44ac31=_0x48bb,_0x4521b3={'PzQGy':function(_0xba2dd0,_0x5df925){return _0xba2dd0!==_0x5df925;},'QtJVj':function(_0x2f2614,_0x27aa47){return _0x2f2614==_0x27aa47;},'MEBmA':_0x44ac31(0x1f1)},_0x428aa8=[];for(const [_0x54b3bd,_0x12223b]of Object['entries'](_0x3548b5)){const _0x4d1566=_0x35fb84?_0x35fb84+'.'+_0x54b3bd:_0x54b3bd;_0x4521b3['PzQGy'](null,_0x12223b)&&_0x4521b3[_0x44ac31(0x1db)](_0x4521b3['MEBmA'],typeof _0x12223b)&&!Array[_0x44ac31(0x1de)](_0x12223b)&&_0x416752<0x2?_0x428aa8['push'](...flattenObject(_0x12223b,_0x4d1566,_0x416752+0x1)):_0x428aa8[_0x44ac31(0x1da)]([_0x4d1566,_0x12223b]);}return _0x428aa8;}function formatValue(_0x16fdd2){const _0x24f6b1=_0x48bb,_0xfb00de={'KoesB':_0x24f6b1(0x208),'gAWCr':function(_0x2df880,_0xe6e4f7){return _0x2df880==_0xe6e4f7;},'Uzybp':'number','THYkp':'boolean','BoeLc':_0x24f6b1(0x1d8),'tVBYQ':function(_0x3502d3,_0x5e154f){return _0x3502d3===_0x5e154f;},'pMOSK':_0x24f6b1(0x1f5)},_0x571b05=_0xfb00de[_0x24f6b1(0x206)][_0x24f6b1(0x1fa)]('|');let _0x113e53=0x0;while(!![]){switch(_0x571b05[_0x113e53++]){case'0':if(_0xfb00de['gAWCr'](_0xfb00de[_0x24f6b1(0x1e7)],typeof _0x16fdd2)||_0xfb00de['THYkp']==typeof _0x16fdd2)return String(_0x16fdd2);continue;case'1':if(null===_0x16fdd2)return _0xfb00de['BoeLc'];continue;case'2':if(_0xfb00de['tVBYQ'](void 0x0,_0x16fdd2))return'undefined';continue;case'3':return JSON['stringify'](_0x16fdd2);case'4':if(Array['isArray'](_0x16fdd2))return'['+_0x16fdd2[_0x24f6b1(0x1f0)](_0x2868c9=>'object'==typeof _0x2868c9&&null!==_0x2868c9?JSON[_0x24f6b1(0x1dc)](_0x2868c9):formatValue(_0x2868c9))[_0x24f6b1(0x1fb)](',\x20')+']';continue;case'5':if(_0xfb00de['gAWCr'](_0xfb00de[_0x24f6b1(0x1fd)],typeof _0x16fdd2))return _0x16fdd2;continue;}break;}}function hasDeepNesting(_0x2c9d97,_0x599fb4){const _0x300da0=_0x48bb,_0x5b5675={'SOVtJ':function(_0x10920a,_0x16a72e){return _0x10920a>_0x16a72e;},'ycJHj':'object'};return _0x5b5675[_0x300da0(0x1e9)](_0x599fb4,0x2)||_0x5b5675[_0x300da0(0x1d9)]==typeof _0x2c9d97&&null!==_0x2c9d97&&(Array[_0x300da0(0x1de)](_0x2c9d97)?_0x2c9d97[_0x300da0(0x1dd)](_0x533cab=>hasDeepNesting(_0x533cab,_0x599fb4+0x1)):Object[_0x300da0(0x1e4)](_0x2c9d97)[_0x300da0(0x1dd)](_0x3bc9a7=>hasDeepNesting(_0x3bc9a7,_0x599fb4+0x1)));}function convertJsonToCompact(_0x4665a1){const _0x32a1b5=_0x48bb,_0x3619d7={'qIfio':function(_0x1c3ce2,_0x2ef2da,_0x487fc7){return _0x1c3ce2(_0x2ef2da,_0x487fc7);},'SQCEU':function(_0x3fcc85,_0x51ec3e){return _0x3fcc85(_0x51ec3e);},'zwBfK':function(_0x38c841,_0x5a1ca4){return _0x38c841(_0x5a1ca4);}};if(Array[_0x32a1b5(0x1de)](_0x4665a1))return _0x4665a1[_0x32a1b5(0x1fc)](_0x41806a=>_0x32a1b5(0x1f1)!=typeof _0x41806a||null===_0x41806a)?'['+_0x4665a1[_0x32a1b5(0x1f0)](formatValue)['join'](',\x20')+']':_0x3619d7[_0x32a1b5(0x1df)](hasDeepNesting,_0x4665a1,0x0)?JSON[_0x32a1b5(0x1dc)](_0x4665a1):_0x4665a1['map'](_0x1c8815=>'object'!=typeof _0x1c8815||null===_0x1c8815||Array['isArray'](_0x1c8815)?formatValue(_0x1c8815):convertObjectToCompact(_0x1c8815))[_0x32a1b5(0x1fb)]('\x0a');if(_0x32a1b5(0x1f1)==typeof _0x4665a1&&null!==_0x4665a1){if(_0x3619d7[_0x32a1b5(0x1df)](hasDeepNesting,_0x4665a1,0x0)){const _0x4f192a=_0x4665a1;if(!Object[_0x32a1b5(0x1e4)](_0x4f192a)[_0x32a1b5(0x1dd)](_0x49a9f4=>'object'!=typeof _0x49a9f4||null===_0x49a9f4))return JSON['stringify'](_0x4665a1);}return _0x3619d7[_0x32a1b5(0x200)](convertObjectToCompact,_0x4665a1);}return _0x3619d7['zwBfK'](formatValue,_0x4665a1);}function convertObjectToCompact(_0xaaef09){const _0x3f863c=_0x48bb,_0x4b3321={'bKyDU':function(_0xd3e93,_0x158bce,_0x2f390a,_0x474337){return _0xd3e93(_0x158bce,_0x2f390a,_0x474337);},'SWtFw':function(_0x54a363,_0x36ff85){return _0x54a363<=_0x36ff85;}},_0x4d5ccd=_0x4b3321[_0x3f863c(0x209)](flattenObject,_0xaaef09,'',0x0)['map'](([_0x5b3683,_0x412e26])=>'object'==typeof _0x412e26&&null!==_0x412e26?_0x5b3683+':\x20'+JSON[_0x3f863c(0x1dc)](_0x412e26):_0x5b3683+':\x20'+formatValue(_0x412e26));return _0x4b3321[_0x3f863c(0x1e5)](_0x4d5ccd[_0x3f863c(0x205)],0x4)&&_0x4d5ccd[_0x3f863c(0x1fc)](_0x15306b=>_0x15306b[_0x3f863c(0x205)]<0x3c)?_0x4d5ccd['join'](',\x20'):_0x4d5ccd[_0x3f863c(0x1fb)]('\x0a');}function replaceJsonBlocks(_0x5cfc59){const _0x47aec8=_0x48bb,_0x2f1436={'cBYjr':function(_0x1baa66,_0x4fbd74){return _0x1baa66(_0x4fbd74);},'LUhIq':function(_0x3e9349,_0x5c711c){return _0x3e9349===_0x5c711c;},'wDWhZ':function(_0xd4e50e,_0x53cc6f){return _0xd4e50e(_0x53cc6f);},'RRkIQ':function(_0x245321,_0x47a6ce){return _0x245321(_0x47a6ce);}};let _0x191ac0=0x0,_0x3cc497=_0x5cfc59;return _0x3cc497=_0x3cc497['replace'](FENCED_JSON_BLOCK,(_0xa0e972,_0x479877)=>{const _0xfa1693=_0x479877['trim']();if(!_0x2f1436['cBYjr'](isJsonLike,_0xfa1693))return _0xa0e972;const _0x1d5934=tryParseJson(_0xfa1693);return null===_0x1d5934?_0xa0e972:(_0x191ac0++,convertJsonToCompact(_0x1d5934));}),_0x3cc497=_0x3cc497['replace'](INLINE_JSON_OBJECT,(_0x5c318a,_0x3e284f)=>{const _0x6ed197=_0x48bb,_0x56e74d=_0x2f1436[_0x6ed197(0x1f4)](tryParseJson,_0x3e284f);return _0x2f1436['LUhIq'](null,_0x56e74d)||_0x6ed197(0x1f1)!=typeof _0x56e74d||Array[_0x6ed197(0x1de)](_0x56e74d)?_0x5c318a:(_0x191ac0++,_0x2f1436['wDWhZ'](convertJsonToCompact,_0x56e74d));}),_0x3cc497=_0x3cc497[_0x47aec8(0x1e0)](INLINE_JSON_ARRAY,(_0x1d28d8,_0x179c7e)=>{const _0x208a9c=_0x47aec8,_0x586394=tryParseJson(_0x179c7e);return null!==_0x586394&&Array[_0x208a9c(0x1de)](_0x586394)?_0x2f1436['LUhIq'](0x0,_0x586394['length'])?_0x1d28d8:(_0x191ac0++,_0x2f1436['RRkIQ'](convertJsonToCompact,_0x586394)):_0x1d28d8;}),{'text':_0x3cc497,'count':_0x191ac0};}function cleanMarkdown(_0x13b3eb){const _0x8959d5=_0x48bb,_0x3d2928={'NVonx':_0x8959d5(0x1e8)};let _0x59c78d=!0x1,_0x43016e=_0x13b3eb;const _0x151f42=_0x43016e;_0x43016e=_0x43016e[_0x8959d5(0x1e0)](CONSECUTIVE_BLANK_LINES,'\x0a\x0a'),_0x43016e!==_0x151f42&&(_0x59c78d=!0x0);const _0x284ee3=_0x43016e;_0x43016e=_0x43016e['replace'](EXCESSIVE_LIST_INDENT,_0x3d2928[_0x8959d5(0x1eb)]),_0x43016e!==_0x284ee3&&(_0x59c78d=!0x0);const _0x1849b=_0x43016e;_0x43016e=_0x43016e['replace'](BOLD_WHOLE_PARAGRAPH,'$1'),_0x43016e!==_0x1849b&&(_0x59c78d=!0x0);const _0x4e0540=_0x43016e;return _0x43016e=_0x43016e['replace'](ITALIC_WHOLE_PARAGRAPH,'$1'),_0x43016e!==_0x4e0540&&(_0x59c78d=!0x0),{'text':_0x43016e,'cleaned':_0x59c78d};}export function optimizeFormat(_0x4223f6){const _0x393ce0=_0x48bb,_0x29ac70={'ZvhjJ':function(_0x30710c,_0x22091d){return _0x30710c(_0x22091d);}};if(!_0x4223f6||!_0x4223f6['trim']())return{'text':'','jsonBlocksConverted':0x0,'markdownCleaned':!0x1};const _0x327686=_0x29ac70[_0x393ce0(0x207)](replaceJsonBlocks,_0x4223f6),_0x41a17e=cleanMarkdown(_0x327686[_0x393ce0(0x1ed)]);return{'text':_0x41a17e[_0x393ce0(0x1ed)],'jsonBlocksConverted':_0x327686[_0x393ce0(0x203)],'markdownCleaned':_0x41a17e['cleaned']};}function _0x48bb(_0x1a7a53,_0x67e083){_0x1a7a53=_0x1a7a53-0x1d8;const _0x4f2508=_0x4f25();let _0x48bbd8=_0x4f2508[_0x1a7a53];return _0x48bbd8;}export const formatOptimizerStrategy={'name':_0x10acd5(0x1f3),'compress'(_0x4986e6,_0x205d05={}){const _0x1dcba7=_0x10acd5,_0x12b655={'nWYbi':_0x1dcba7(0x1f3),'JDixq':function(_0x2115c4,_0x597d39){return _0x2115c4(_0x597d39);},'UWvXy':function(_0x20faec,_0x431b0a){return _0x20faec(_0x431b0a);},'fiSFY':function(_0x344494,_0x186303){return _0x344494>_0x186303;}};if(!_0x4986e6||!_0x4986e6['trim']())return{'text':'','originalTokens':0x0,'compressedTokens':0x0,'compressionRatio':0x1,'strategyUsed':_0x12b655['nWYbi'],'qualityEstimate':0x1,'wasTruncated':!0x1};const _0x216bbc=countTokens(_0x4986e6),_0x350aaa=_0x12b655[_0x1dcba7(0x1e3)](optimizeFormat,_0x4986e6),_0x49c67f=_0x12b655['UWvXy'](countTokens,_0x350aaa['text']),_0x1fcfdc=_0x12b655['fiSFY'](_0x49c67f,0x0)?_0x216bbc/_0x49c67f:0x1,_0x29a6c8=_0x12b655[_0x1dcba7(0x202)](_0x350aaa[_0x1dcba7(0x1f6)],0x0)?0.92:_0x350aaa[_0x1dcba7(0x1e2)]?0.98:0x1;return{'text':_0x350aaa[_0x1dcba7(0x1ed)],'originalTokens':_0x216bbc,'compressedTokens':_0x49c67f,'compressionRatio':_0x1fcfdc,'strategyUsed':_0x12b655[_0x1dcba7(0x1ff)],'qualityEstimate':_0x29a6c8,'wasTruncated':!0x1};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x526e68,_0x50f8a6){var _0x2e5edc=_0x338e,_0xdbf2ac=_0x526e68();while(!![]){try{var _0x2e7d62=parseInt(_0x2e5edc(0x1b4))/0x1*(-parseInt(_0x2e5edc(0x1af))/0x2)+parseInt(_0x2e5edc(0x1b5))/0x3*(parseInt(_0x2e5edc(0x1b7))/0x4)+parseInt(_0x2e5edc(0x1ae))/0x5*(parseInt(_0x2e5edc(0x1b0))/0x6)+-parseInt(_0x2e5edc(0x1ad))/0x7+-parseInt(_0x2e5edc(0x1b2))/0x8*(parseInt(_0x2e5edc(0x1ac))/0x9)+-parseInt(_0x2e5edc(0x1b1))/0xa*(parseInt(_0x2e5edc(0x1b3))/0xb)+parseInt(_0x2e5edc(0x1b6))/0xc;if(_0x2e7d62===_0x50f8a6)break;else _0xdbf2ac['push'](_0xdbf2ac['shift']());}catch(_0x180ee8){_0xdbf2ac['push'](_0xdbf2ac['shift']());}}}(_0x348b,0xa68f3));export{splitSentences,extractContentWords,STOPWORDS,isStopword}from'./text-utils.js';function _0x338e(_0x20ca28,_0x447e24){_0x20ca28=_0x20ca28-0x1ac;var _0x348bf3=_0x348b();var _0x338e48=_0x348bf3[_0x20ca28];return _0x338e48;}export{compressRuleBased,ruleBasedStrategy}from'./rule-based.js';export{compressStructural,structuralStrategy}from'./structural.js';export{compressTokenBudget,tokenBudgetStrategy}from'./token-budget.js';export{compressChunked,chunkedStrategy}from'./chunked.js';export{estimateQuality,quickQualityScore}from'./quality.js';export{CompressionPipeline,createDefaultPipeline}from'./pipeline.js';export{anonymizeText,deanonymizeText,anonymizeStrategy}from'./anonymize.js';export{deduplicateText,dedupStrategy}from'./dedup.js';export{CompressionCache,createCachedPipeline}from'./cache.js';function _0x348b(){var _0x887f3=['640088okudND','584837McvqOa','13WpZHKu','9HwKkml','35728356dCHpkf','496556Yjghsa','9GGolPp','4387775GpqEAK','1215oJhojc','164534EhdpiC','5562OuopND','210RnvphC'];_0x348b=function(){return _0x887f3;};return _0x348b();}export{optimizeFormat,formatOptimizerStrategy}from'./format-optimizer.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x31db(_0x2dcf43,_0xa2f0c6){_0x2dcf43=_0x2dcf43-0x157;const _0x113c05=_0x113c();let _0x31db70=_0x113c05[_0x2dcf43];return _0x31db70;}const _0x5386a7=_0x31db;(function(_0x2d93b7,_0xe1be7f){const _0x1d3062=_0x31db,_0x525634=_0x2d93b7();while(!![]){try{const _0x4d23d1=-parseInt(_0x1d3062(0x166))/0x1+parseInt(_0x1d3062(0x16f))/0x2+-parseInt(_0x1d3062(0x16a))/0x3*(-parseInt(_0x1d3062(0x177))/0x4)+parseInt(_0x1d3062(0x160))/0x5*(-parseInt(_0x1d3062(0x161))/0x6)+-parseInt(_0x1d3062(0x15a))/0x7+parseInt(_0x1d3062(0x159))/0x8*(parseInt(_0x1d3062(0x15d))/0x9)+parseInt(_0x1d3062(0x174))/0xa;if(_0x4d23d1===_0xe1be7f)break;else _0x525634['push'](_0x525634['shift']());}catch(_0x5b3f5c){_0x525634['push'](_0x525634['shift']());}}}(_0x113c,0x69f39));import{countTokens}from'../../shared/token-counter.js';import{ruleBasedStrategy}from'./rule-based.js';import{structuralStrategy}from'./structural.js';import{tokenBudgetStrategy}from'./token-budget.js';function _0x113c(){const _0x41e93e=['jWyuf','pipeline','wasTruncated','637605TBIhot','targetTokens','text','YcrlX','213YIAPgQ','name','minQuality','stopOnTarget','push','433530vzvSeE','strategyName','now','zNZSb','map','1335780DPOleA','RKdrS','strategies','10668zQFJsl','compressedTokens','length','stageMetrics','38896fAvjLg','751303gQteik','WBbBu','runStages','1395IlYRcX','LuDWD','ygOKZ','135mutiys','25422BXmioZ','trim'];_0x113c=function(){return _0x41e93e;};return _0x113c();}import{quickQualityScore}from'./quality.js';const DEFAULT_TARGET_TOKENS=0x1f4,DEFAULT_MIN_QUALITY=0.8;function buildEmptyPipelineResult(){const _0x35c668=_0x31db,_0x156940={'RKdrS':_0x35c668(0x164)};return{'text':'','originalTokens':0x0,'compressedTokens':0x0,'compressionRatio':0x1,'strategyUsed':_0x156940[_0x35c668(0x175)],'qualityEstimate':0x1,'wasTruncated':!0x1,'stages':[],'qualityReport':{'overallScore':0x1,'informationRetention':0x1,'structuralIntegrity':0x1,'keyTermPreservation':0x1},'targetMet':!0x0};}function buildPassthroughResult(_0x4c5d1f,_0x2f0eff){return{'text':_0x4c5d1f,'originalTokens':_0x2f0eff,'compressedTokens':_0x2f0eff,'compressionRatio':0x1,'strategyUsed':'pipeline','qualityEstimate':0x1,'wasTruncated':!0x1,'stages':[],'qualityReport':{'overallScore':0x1,'informationRetention':0x1,'structuralIntegrity':0x1,'keyTermPreservation':0x1},'targetMet':!0x0};}export class CompressionPipeline{[_0x5386a7(0x176)];[_0x5386a7(0x167)];['minQuality'];['stopOnTarget'];constructor(_0x59b9dd){const _0x83e9ef=_0x5386a7;this[_0x83e9ef(0x176)]=_0x59b9dd[_0x83e9ef(0x176)],this['targetTokens']=_0x59b9dd['targetTokens']??0x1f4,this['minQuality']=_0x59b9dd[_0x83e9ef(0x16c)]??0.8,this[_0x83e9ef(0x16d)]=_0x59b9dd[_0x83e9ef(0x16d)]??!0x0;}['compress'](_0x4a36b6,_0x47d66a){const _0x368b97=_0x5386a7,_0x4713b2={'WBbBu':function(_0x42f60b){return _0x42f60b();}},_0x5dae95=_0x47d66a??this['targetTokens'];if(!_0x4a36b6||!_0x4a36b6[_0x368b97(0x162)]())return _0x4713b2[_0x368b97(0x15b)](buildEmptyPipelineResult);const _0x108c2e=_0x4a36b6,_0x544297=countTokens(_0x4a36b6);if(_0x544297<=_0x5dae95)return buildPassthroughResult(_0x4a36b6,_0x544297);const {compressedText:_0x2979a7,stages:_0x3eb7b8,wasTruncated:_0x477893}=this[_0x368b97(0x15c)](_0x108c2e,_0x544297,_0x5dae95);return this['buildFinalResult'](_0x108c2e,_0x544297,_0x2979a7,_0x3eb7b8,_0x477893,_0x5dae95);}[_0x5386a7(0x15c)](_0x137b70,_0x50e4b5,_0x4462b4){const _0x48ea91=_0x5386a7,_0x44eca8={'lRYyc':function(_0x38585a,_0x2fd702){return _0x38585a<_0x2fd702;},'YcrlX':function(_0x189ed0,_0x366af6,_0x1133a4){return _0x189ed0(_0x366af6,_0x1133a4);},'ygOKZ':function(_0x120414,_0x26d851){return _0x120414>_0x26d851;}};let _0xd742ef=_0x137b70;const _0x150a23=[];let _0x36774c=!0x1;for(const _0x186ae9 of this[_0x48ea91(0x176)]){const _0x1cf7d1=countTokens(_0xd742ef);if(this['stopOnTarget']&&_0x1cf7d1<=_0x4462b4)break;const _0x299138=this['executeStage'](_0x186ae9,_0xd742ef,_0x4462b4,_0x50e4b5);if(_0x44eca8['lRYyc'](_0x44eca8[_0x48ea91(0x169)](quickQualityScore,_0x137b70,_0x299138['text']),this['minQuality'])&&_0x44eca8[_0x48ea91(0x15f)](_0x150a23[_0x48ea91(0x157)],0x0))break;_0x150a23[_0x48ea91(0x16e)](_0x299138[_0x48ea91(0x158)]),_0xd742ef=_0x299138[_0x48ea91(0x168)],_0x299138[_0x48ea91(0x165)]&&(_0x36774c=!0x0);}return{'compressedText':_0xd742ef,'stages':_0x150a23,'wasTruncated':_0x36774c};}['executeStage'](_0x5e3d58,_0x18a49d,_0x19620a,_0x42e2db){const _0x1b8474=_0x5386a7,_0x1346c4={'LuDWD':function(_0x319456,_0x4faf71){return _0x319456/_0x4faf71;}},_0x45e356=countTokens(_0x18a49d),_0x265944=performance[_0x1b8474(0x171)](),_0x8e0fd4={'maxTokens':_0x19620a,'targetRatio':_0x19620a/_0x42e2db},_0x24bc9f=_0x5e3d58['compress'](_0x18a49d,_0x8e0fd4),_0x2c94f9=performance[_0x1b8474(0x171)]()-_0x265944;return{'text':_0x24bc9f[_0x1b8474(0x168)],'wasTruncated':_0x24bc9f[_0x1b8474(0x165)],'stageMetrics':{'strategyName':_0x5e3d58[_0x1b8474(0x16b)],'inputTokens':_0x45e356,'outputTokens':_0x24bc9f[_0x1b8474(0x178)],'savingsRatio':_0x45e356>0x0?0x1-_0x1346c4[_0x1b8474(0x15e)](_0x24bc9f['compressedTokens'],_0x45e356):0x0,'durationMs':_0x2c94f9}};}['buildFinalResult'](_0x4e28a4,_0x435b47,_0x3f79fa,_0x550eb6,_0x36d0c8,_0x772399){const _0x3cf6d0=_0x5386a7,_0x641b53={'jWyuf':function(_0x3ae86a,_0x5c0ba8,_0x598456){return _0x3ae86a(_0x5c0ba8,_0x598456);},'LtTQB':function(_0x3c0fd2,_0xdcb27){return _0x3c0fd2/_0xdcb27;},'zNZSb':function(_0xa058c2,_0x43bb42){return _0xa058c2<=_0x43bb42;}},_0x443fdb=countTokens(_0x3f79fa),_0x263479=_0x641b53[_0x3cf6d0(0x163)](quickQualityScore,_0x4e28a4,_0x3f79fa);return{'text':_0x3f79fa,'originalTokens':_0x435b47,'compressedTokens':_0x443fdb,'compressionRatio':_0x443fdb>0x0?_0x641b53['LtTQB'](_0x435b47,_0x443fdb):0x1,'strategyUsed':_0x550eb6[_0x3cf6d0(0x173)](_0x1f0328=>_0x1f0328[_0x3cf6d0(0x170)])['join']('+'),'qualityEstimate':_0x263479,'wasTruncated':_0x36d0c8,'stages':_0x550eb6,'qualityReport':{'overallScore':_0x263479,'informationRetention':_0x263479,'structuralIntegrity':_0x263479,'keyTermPreservation':_0x263479},'targetMet':_0x641b53[_0x3cf6d0(0x172)](_0x443fdb,_0x772399)};}}export function createDefaultPipeline(_0x1a85f2){return new CompressionPipeline({'strategies':[ruleBasedStrategy,structuralStrategy,tokenBudgetStrategy],'targetTokens':_0x1a85f2,'minQuality':0.8,'stopOnTarget':!0x0});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1528bb,_0xa46dc4){const _0x40eac9=_0x100c,_0x49a2ba=_0x1528bb();while(!![]){try{const _0x404aab=-parseInt(_0x40eac9(0x132))/0x1+parseInt(_0x40eac9(0x128))/0x2+-parseInt(_0x40eac9(0x11e))/0x3+parseInt(_0x40eac9(0x131))/0x4+-parseInt(_0x40eac9(0x11c))/0x5+-parseInt(_0x40eac9(0x122))/0x6+-parseInt(_0x40eac9(0x11a))/0x7*(-parseInt(_0x40eac9(0x12b))/0x8);if(_0x404aab===_0xa46dc4)break;else _0x49a2ba['push'](_0x49a2ba['shift']());}catch(_0x5ec1f2){_0x49a2ba['push'](_0x49a2ba['shift']());}}}(_0x468a,0xed43d));import{extractContentWords,STOPWORDS}from'./text-utils.js';const INFORMATION_RETENTION_WEIGHT=0.4,STRUCTURAL_INTEGRITY_WEIGHT=0.3,KEY_TERM_PRESERVATION_WEIGHT=0.3,MAX_KEY_TERMS=0xa,STRUCTURAL_MARKERS=[{'pattern':/\n\n/g,'weight':0x1},{'pattern':/^[-*]\s/gm,'weight':0x1},{'pattern':/^#{1,6}\s/gm,'weight':0x1},{'pattern':/```/g,'weight':0x1},{'pattern':/\d{4}[-/.]\d{1,2}[-/.]\d{1,2}/g,'weight':0x2},{'pattern':/\d+[.,]?\d*\s*[€$%]/g,'weight':0x2},{'pattern':/\b\d{3,}\b/g,'weight':1.5}];function getContentTerms(_0x1fc745){const _0xa97091=_0x100c,_0x18f51a={'mYFQo':function(_0x4ecff7,_0x5efc3e){return _0x4ecff7(_0x5efc3e);}};return new Set(_0x18f51a[_0xa97091(0x130)](extractContentWords,_0x1fc745)['filter'](_0x3235b9=>!STOPWORDS[_0xa97091(0x11f)](_0x3235b9)));}function measureInformationRetention(_0x34128c,_0x1d1ea5){const _0xcb1c47=_0x100c,_0x3fee2a={'HTxst':function(_0x53f8f5,_0xade641){return _0x53f8f5(_0xade641);},'hzhkH':function(_0x55b480,_0x3c4f4d){return _0x55b480/_0x3c4f4d;}},_0x5496bb=_0x3fee2a[_0xcb1c47(0x12d)](getContentTerms,_0x34128c);if(0x0===_0x5496bb['size'])return 0x1;const _0x13a089=_0x3fee2a['HTxst'](getContentTerms,_0x1d1ea5);let _0x153243=0x0;for(const _0x502a48 of _0x5496bb)_0x13a089['has'](_0x502a48)&&_0x153243++;return _0x3fee2a['hzhkH'](_0x153243,_0x5496bb[_0xcb1c47(0x127)]);}function measureStructuralIntegrity(_0x15cd69,_0x119bac){const _0xc3a81a=_0x100c,_0x433b39={'BJsue':function(_0x324703,_0x15b4bf){return _0x324703>_0x15b4bf;},'dCRiP':function(_0x4415f0,_0x15497c){return _0x4415f0*_0x15497c;}};let _0x25b463=0x0,_0x192f48=0x0;for(const {pattern:_0x6832f2,weight:_0x20ec38}of STRUCTURAL_MARKERS){const _0x29b3a7=_0x15cd69['match'](_0x6832f2),_0xe172e1=_0x119bac[_0xc3a81a(0x12e)](_0x6832f2);if(_0x29b3a7&&_0x433b39[_0xc3a81a(0x124)](_0x29b3a7['length'],0x0)){const _0x104562=_0x29b3a7['length'],_0x3f77de=_0xe172e1?.['length']??0x0;_0x25b463+=_0x20ec38,_0x192f48+=_0x433b39['dCRiP'](_0x20ec38,Math['min'](0x1,_0x3f77de/_0x104562));}}return _0x25b463>0x0?_0x192f48/_0x25b463:0x1;}function _0x468a(){const _0x553a62=['HTxst','match','entries','mYFQo','1397860OEwExE','1484710zQlmJF','182rJrmHQ','rFepx','3593310ylfGcU','filter','5695740oBrckQ','has','length','RlmNa','6111204sTunSt','NFgtn','BJsue','includes','slice','size','3167120UDPhsC','map','MHHEs','1279784lTsYkJ','overallScore'];_0x468a=function(){return _0x553a62;};return _0x468a();}function _0x100c(_0x4dde2f,_0x14280b){_0x4dde2f=_0x4dde2f-0x11a;const _0x468ada=_0x468a();let _0x100c83=_0x468ada[_0x4dde2f];return _0x100c83;}function measureKeyTermPreservation(_0x2516e3,_0x447094){const _0x63f194=_0x100c,_0x1a7c4c={'MHHEs':function(_0x2e9ffe,_0x1f0985){return _0x2e9ffe(_0x1f0985);},'RlmNa':function(_0x40265e,_0x4cf444){return _0x40265e===_0x4cf444;}},_0x34865b=_0x1a7c4c[_0x63f194(0x12a)](extractContentWords,_0x2516e3)[_0x63f194(0x11d)](_0x5d05f1=>!STOPWORDS['has'](_0x5d05f1));if(_0x1a7c4c[_0x63f194(0x121)](0x0,_0x34865b[_0x63f194(0x120)]))return 0x1;const _0x1191ec={};for(const _0x370a32 of _0x34865b)_0x1191ec[_0x370a32]=(_0x1191ec[_0x370a32]||0x0)+0x1;const _0x490a82=Object[_0x63f194(0x12f)](_0x1191ec)['sort']((_0x4f4fed,_0x2002f8)=>_0x2002f8[0x1]-_0x4f4fed[0x1])[_0x63f194(0x126)](0x0,0xa)[_0x63f194(0x129)](([_0x1555b5])=>_0x1555b5);if(_0x1a7c4c[_0x63f194(0x121)](0x0,_0x490a82[_0x63f194(0x120)]))return 0x1;const _0x3bf632=_0x447094['toLowerCase']();let _0x519fb9=0x0;for(const _0x12b5d3 of _0x490a82)_0x3bf632[_0x63f194(0x125)](_0x12b5d3)&&_0x519fb9++;return _0x519fb9/_0x490a82['length'];}export function estimateQuality(_0x4b24d6,_0x6a0f7f){const _0x29201e=_0x100c,_0x159884={'rFepx':function(_0x23820a,_0x5d963d){return _0x23820a+_0x5d963d;},'NFgtn':function(_0xccb274,_0x2aedd1){return _0xccb274*_0x2aedd1;}},_0xf3b1a5=measureInformationRetention(_0x4b24d6,_0x6a0f7f),_0x4db17f=measureStructuralIntegrity(_0x4b24d6,_0x6a0f7f),_0x3e03c2=measureKeyTermPreservation(_0x4b24d6,_0x6a0f7f);return{'overallScore':_0x159884[_0x29201e(0x11b)](_0x159884[_0x29201e(0x123)](0.4,_0xf3b1a5)+0.3*_0x4db17f,_0x159884[_0x29201e(0x123)](0.3,_0x3e03c2)),'informationRetention':_0xf3b1a5,'structuralIntegrity':_0x4db17f,'keyTermPreservation':_0x3e03c2};}export function quickQualityScore(_0x3e4150,_0x4e8121){const _0x51e6eb=_0x100c;return estimateQuality(_0x3e4150,_0x4e8121)[_0x51e6eb(0x12c)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4645aa,_0x43b2cb){const _0x46bf4c=_0x4d0f,_0x2a57b4=_0x4645aa();while(!![]){try{const _0x44af2f=-parseInt(_0x46bf4c(0xa3))/0x1+-parseInt(_0x46bf4c(0xab))/0x2*(parseInt(_0x46bf4c(0x9c))/0x3)+parseInt(_0x46bf4c(0x9e))/0x4+parseInt(_0x46bf4c(0xac))/0x5+-parseInt(_0x46bf4c(0x9f))/0x6+-parseInt(_0x46bf4c(0xa7))/0x7+parseInt(_0x46bf4c(0xa1))/0x8*(parseInt(_0x46bf4c(0x99))/0x9);if(_0x44af2f===_0x43b2cb)break;else _0x2a57b4['push'](_0x2a57b4['shift']());}catch(_0x44b170){_0x2a57b4['push'](_0x2a57b4['shift']());}}}(_0x4281,0xbbd86));import{countTokens}from'../../shared/token-counter.js';import{isStopword}from'./text-utils.js';const MIN_WORDS_FOR_STOPWORD_REMOVAL=0x1e,BASE_QUALITY_ESTIMATE=0.95,QUALITY_VARIANCE_WEIGHT=0.05,GREETING_START=/^(Sehr\s+geehrte\s+(?:Damen\s+und\s+Herren|Frau|Herr)[^,]*,?\s*|Dear\s+(?:Sir|Madam|Mr|Mrs|Ms)[^,]*,?\s*|Hi\s*,?\s*|Hallo\s*,?\s*|Guten\s+Tag\s*,?\s*|Hello\s*,?\s*)/i,GREETING_END=/\s*(Mit\s+freundlichen\s+Grüßen|Freundliche\s+Grüße|Viele\s+Grüße|Best\s+regards|Kind\s+regards|Sincerely|Regards|Yours\s+(?:truly|faithfully))\s*[.,\s]*$/i,CONTACT_BLOCK=/\n\s*(?:Telefon|Tel\.?|Phone|Fax|Email|E-Mail|Kundennummer|Kd\.?-?Nr\.?):\s*[^\n]+/gi;function stripBoilerplate(_0x1a677d){const _0x28d452=_0x4d0f;let _0x33c35b=_0x1a677d;return _0x33c35b=_0x33c35b[_0x28d452(0xa6)](GREETING_START,''),_0x33c35b=_0x33c35b[_0x28d452(0xa6)](GREETING_END,''),_0x33c35b=_0x33c35b[_0x28d452(0xa6)](CONTACT_BLOCK,''),_0x33c35b;}function _0x4d0f(_0x9b1f6,_0x1626b2){_0x9b1f6=_0x9b1f6-0x99;const _0x428151=_0x4281();let _0x4d0f9a=_0x428151[_0x9b1f6];return _0x4d0f9a;}function normalizeWhitespace(_0x3c2f3a){const _0x2c5573=_0x4d0f;let _0x49b4d8=_0x3c2f3a;return _0x49b4d8=_0x49b4d8[_0x2c5573(0xa6)](/ {2,}/g,'\x20'),_0x49b4d8=_0x49b4d8[_0x2c5573(0xa6)](/\n{3,}/g,'\x0a\x0a'),_0x49b4d8=_0x49b4d8['replace'](/[ \t]+$/gm,''),_0x49b4d8['trim']();}function removeStopwordsFromText(_0x5edb6a){const _0xf5f59e=_0x4d0f,_0xfaa07d={'Wyjwg':function(_0xee6fe4,_0x49eeb1){return _0xee6fe4<=_0x49eeb1;}},_0x262326=_0x5edb6a[_0xf5f59e(0xa2)](/\s+/);if(_0xfaa07d[_0xf5f59e(0xaa)](_0x262326[_0xf5f59e(0x9a)],0x1e))return _0x5edb6a;return _0x262326['filter'](_0x44d6de=>!isStopword(_0x44d6de))[_0xf5f59e(0x9d)]('\x20');}function _0x4281(){const _0x37e9d6=['min','Wyjwg','17392kUtBbl','1677150BIVmwp','3708891nIcNdm','length','rule-based','69JPeKZs','join','5514232fOvqGd','8668608QjiglP','NmbXf','40BZITbx','split','745812wgZJYY','cQyeu','trim','replace','4301367HojvRl','hGDcK'];_0x4281=function(){return _0x37e9d6;};return _0x4281();}export function compressRuleBased(_0x5b804f,_0x23f214={}){const _0x4d3b73=_0x4d0f,_0xd75256={'fNAhE':_0x4d3b73(0x9b),'NmbXf':function(_0x100219,_0x3c6344){return _0x100219(_0x3c6344);},'GFFbB':function(_0x570d11,_0x4d6f64){return _0x570d11(_0x4d6f64);},'HBldF':function(_0x440032,_0xf9fcfb){return _0x440032>_0xf9fcfb;},'hGDcK':function(_0x179bdd,_0x514d7a){return _0x179bdd+_0x514d7a;},'cQyeu':function(_0x5f5324,_0x3cd243){return _0x5f5324/_0x3cd243;}};if(!_0x5b804f||!_0x5b804f[_0x4d3b73(0xa5)]())return{'text':'','originalTokens':0x0,'compressedTokens':0x0,'compressionRatio':0x1,'strategyUsed':_0xd75256['fNAhE'],'qualityEstimate':0x1,'wasTruncated':!0x1};const _0x3547ce=countTokens(_0x5b804f);let _0x9f76b0=_0xd75256[_0x4d3b73(0xa0)](stripBoilerplate,_0x5b804f[_0x4d3b73(0xa5)]());_0x9f76b0=normalizeWhitespace(_0x9f76b0),(_0x23f214['removeStopwords']??!0x0)&&(_0x9f76b0=removeStopwordsFromText(_0x9f76b0));const _0x34067a=_0xd75256['GFFbB'](countTokens,_0x9f76b0);return{'text':_0x9f76b0,'originalTokens':_0x3547ce,'compressedTokens':_0x34067a,'compressionRatio':_0xd75256['HBldF'](_0x34067a,0x0)?_0x3547ce/_0x34067a:0x1,'strategyUsed':'rule-based','qualityEstimate':Math[_0x4d3b73(0xa9)](0x1,_0xd75256[_0x4d3b73(0xa8)](0.95,_0xd75256[_0x4d3b73(0xa4)](_0x34067a,_0x3547ce)*0.05)),'wasTruncated':!0x1};}export const ruleBasedStrategy={'name':'rule-based','compress':compressRuleBased};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const _0x25bd93=_0x38a8;(function(_0x27d60a,_0x41c1cb){const _0x1edb68=_0x38a8,_0x4bd41d=_0x27d60a();while(!![]){try{const _0x33638f=parseInt(_0x1edb68(0x1a3))/0x1+-parseInt(_0x1edb68(0x19f))/0x2+-parseInt(_0x1edb68(0x197))/0x3*(parseInt(_0x1edb68(0x1a6))/0x4)+-parseInt(_0x1edb68(0x199))/0x5+parseInt(_0x1edb68(0x1ad))/0x6+parseInt(_0x1edb68(0x194))/0x7+parseInt(_0x1edb68(0x1a8))/0x8;if(_0x33638f===_0x41c1cb)break;else _0x4bd41d['push'](_0x4bd41d['shift']());}catch(_0x141d71){_0x4bd41d['push'](_0x4bd41d['shift']());}}}(_0x4fc3,0x674f6));import{countTokens}from'../../shared/token-counter.js';import{splitSentences,extractContentWords,STOPWORDS}from'./text-utils.js';const DEFAULT_TARGET_RATIO=0.45,MIN_EXTRACTIVE_SENTENCES=0x2,MIN_TARGET_TOKENS=0x32,BASE_QUALITY_ESTIMATE=0.85,QUALITY_VARIANCE_WEIGHT=0.15;function computeDocumentFrequency(_0x35d12b){const _0x260a19={'YSMKi':function(_0x1926cc,_0x1db19b){return _0x1926cc+_0x1db19b;}},_0x2ddd24={};for(const _0x1e94df of _0x35d12b){const _0x5cf33e=new Set(_0x1e94df);for(const _0x563faf of _0x5cf33e)STOPWORDS['has'](_0x563faf)||(_0x2ddd24[_0x563faf]=_0x260a19['YSMKi'](_0x2ddd24[_0x563faf]||0x0,0x1));}return _0x2ddd24;}function computeTermFrequency(_0x27b3bf){const _0x39e615={};for(const _0x166175 of _0x27b3bf)STOPWORDS['has'](_0x166175)||(_0x39e615[_0x166175]=(_0x39e615[_0x166175]||0x0)+0x1);return _0x39e615;}function buildTfIdfVector(_0x361406,_0x45cad2,_0x81b5e7){const _0x292207=_0x38a8,_0x2acd9a={'biSuN':function(_0x5506e4,_0x14269c){return _0x5506e4+_0x14269c;}},_0x517fdf={};for(const [_0x4644e4,_0x4a436b]of Object[_0x292207(0x1a5)](_0x361406)){const _0x76a49c=Math[_0x292207(0x19c)](_0x2acd9a[_0x292207(0x198)](_0x81b5e7,0x1)/((_0x45cad2[_0x4644e4]||0x0)+0x1));_0x517fdf[_0x4644e4]=_0x4a436b*_0x76a49c;}return _0x517fdf;}function _0x38a8(_0x220e89,_0x52c70e){_0x220e89=_0x220e89-0x18c;const _0x4fc375=_0x4fc3();let _0x38a849=_0x4fc375[_0x220e89];return _0x38a849;}function buildTfIdf(_0x3c7a1e){const _0x18205f=_0x38a8,_0x3f8537={'RKYrD':function(_0x269709,_0xdc72c6){return _0x269709(_0xdc72c6);}},_0x21bcba=_0x3c7a1e['length'],_0x1ea6b5=_0x3c7a1e['map'](extractContentWords),_0x331321=_0x3f8537[_0x18205f(0x193)](computeDocumentFrequency,_0x1ea6b5);return _0x1ea6b5[_0x18205f(0x1a2)](_0x49326c=>buildTfIdfVector(computeTermFrequency(_0x49326c),_0x331321,_0x21bcba));}function computeCentroid(_0x36edda){const _0x29f1ec=_0x38a8,_0x49d4ad={'wHshW':function(_0x381cf9,_0x376760){return _0x381cf9/_0x376760;}},_0x1d1def={},_0x653a02=_0x36edda[_0x29f1ec(0x1ac)];for(const _0x79cdee of _0x36edda)for(const [_0x96805b,_0x57df8a]of Object['entries'](_0x79cdee))_0x1d1def[_0x96805b]=(_0x1d1def[_0x96805b]||0x0)+_0x49d4ad['wHshW'](_0x57df8a,_0x653a02);return _0x1d1def;}function cosineSimilarity(_0xfbe740,_0x55afa9){const _0x50e522=_0x38a8,_0x38a199={'mqCon':function(_0x327ab0,_0x29a6ac){return _0x327ab0*_0x29a6ac;},'LPNCD':function(_0x8dab1f,_0x25ebcb){return _0x8dab1f*_0x25ebcb;}},_0x24713a=new Set([...Object['keys'](_0xfbe740),...Object['keys'](_0x55afa9)]);let _0x4015e0=0x0,_0x1e3361=0x0,_0x298444=0x0;for(const _0x12ad00 of _0x24713a){const _0x4e68e1=_0xfbe740[_0x12ad00]||0x0,_0xe6d218=_0x55afa9[_0x12ad00]||0x0;_0x4015e0+=_0x38a199[_0x50e522(0x18e)](_0x4e68e1,_0xe6d218),_0x1e3361+=_0x4e68e1*_0x4e68e1,_0x298444+=_0x38a199[_0x50e522(0x190)](_0xe6d218,_0xe6d218);}const _0x52e5d9=Math[_0x50e522(0x19e)](_0x1e3361)*Math[_0x50e522(0x19e)](_0x298444);return _0x52e5d9>0x0?_0x4015e0/_0x52e5d9:0x0;}function selectTopSentences(_0xa47751,_0x3990b9){const _0x243bfb=_0x38a8,_0x281344={'Zpgqv':function(_0x594dc7,_0x282707){return _0x594dc7(_0x282707);},'YCgRL':function(_0x600ea8,_0x471219){return _0x600ea8<=_0x471219;},'uRxCa':function(_0x4ae2ea,_0x35a540){return _0x4ae2ea+_0x35a540;}},_0x57ca69=[];let _0x7b47b7=0x0;for(const _0x3a4911 of _0xa47751){const _0x32d41c=_0x281344['Zpgqv'](countTokens,_0x3a4911[_0x243bfb(0x18d)]);if(!(_0x281344['YCgRL'](_0x281344[_0x243bfb(0x1a0)](_0x7b47b7,_0x32d41c),_0x3990b9)||_0x57ca69['length']<0x2))break;_0x57ca69[_0x243bfb(0x18f)]({'index':_0x3a4911['index'],'sentence':_0x3a4911[_0x243bfb(0x18d)]}),_0x7b47b7+=_0x281344[_0x243bfb(0x1a0)](_0x32d41c,0x1);}return _0x57ca69;}function _0x4fc3(){const _0x5c0a9f=['index','map','8643RFkaPD','zpAit','entries','4684NCkmgu','score','11359008SnODFF','join','maxTokens','twcYu','length','1043322pYbdkX','sort','sentence','mqCon','push','LPNCD','targetRatio','max','RKYrD','3610341HeQuIE','structural','floor','1959ERuMNF','biSuN','1809840tyViSq','trim','xKyNH','log','min','sqrt','1136760lcsXGL','uRxCa'];_0x4fc3=function(){return _0x5c0a9f;};return _0x4fc3();}function buildEmptyResult(_0x54d795){return{'text':'','originalTokens':0x0,'compressedTokens':0x0,'compressionRatio':0x1,'strategyUsed':_0x54d795,'qualityEstimate':0x1,'wasTruncated':!0x1};}export function compressStructural(_0x35c354,_0x1aa03a={}){const _0x10c100=_0x38a8,_0x1beba7={'vEhwc':function(_0x3d6629,_0xe15543){return _0x3d6629<=_0xe15543;},'zpAit':'structural','xKyNH':function(_0x1d727f,_0x23be1c){return _0x1d727f(_0x23be1c);},'twcYu':function(_0x403d7d,_0x43fe42,_0x5f204f){return _0x403d7d(_0x43fe42,_0x5f204f);},'tpMIf':function(_0x26983e,_0x40779d){return _0x26983e(_0x40779d);},'qcBxx':function(_0x3fe971,_0xb1f691){return _0x3fe971+_0xb1f691;}};if(!_0x35c354||!_0x35c354[_0x10c100(0x19a)]())return buildEmptyResult(_0x10c100(0x195));const _0x30f811=countTokens(_0x35c354),_0x3f13a7=_0x1aa03a[_0x10c100(0x191)]??0.45,_0x20fa04=splitSentences(_0x35c354);if(_0x1beba7['vEhwc'](_0x20fa04['length'],0x2))return{'text':_0x35c354,'originalTokens':_0x30f811,'compressedTokens':_0x30f811,'compressionRatio':0x1,'strategyUsed':_0x1beba7[_0x10c100(0x1a4)],'qualityEstimate':0x1,'wasTruncated':!0x1};const _0x104a5d=_0x1beba7[_0x10c100(0x19b)](buildTfIdf,_0x20fa04),_0x110aa7=_0x1beba7[_0x10c100(0x19b)](computeCentroid,_0x104a5d),_0x312f58=_0x20fa04['map']((_0xb3a559,_0x3bee6f)=>({'index':_0x3bee6f,'sentence':_0xb3a559,'score':cosineSimilarity(_0x104a5d[_0x3bee6f],_0x110aa7)}));_0x312f58[_0x10c100(0x18c)]((_0x3f53fd,_0x4ebe0a)=>_0x4ebe0a['score']-_0x3f53fd[_0x10c100(0x1a7)]);const _0x42faa7=_0x1beba7[_0x10c100(0x1ab)](selectTopSentences,_0x312f58,_0x1aa03a[_0x10c100(0x1aa)]?Math[_0x10c100(0x19d)](_0x1aa03a[_0x10c100(0x1aa)],Math[_0x10c100(0x196)](_0x30f811*_0x3f13a7)):Math[_0x10c100(0x192)](0x32,Math[_0x10c100(0x196)](_0x30f811*_0x3f13a7)));_0x42faa7['sort']((_0x27c5e7,_0x186ccd)=>_0x27c5e7['index']-_0x186ccd[_0x10c100(0x1a1)]);const _0x1ebe2c=_0x42faa7[_0x10c100(0x1a2)](_0x290940=>_0x290940[_0x10c100(0x18d)])[_0x10c100(0x1a9)]('.\x20'),_0x39b803=_0x1beba7['tpMIf'](countTokens,_0x1ebe2c);return{'text':_0x1ebe2c,'originalTokens':_0x30f811,'compressedTokens':_0x39b803,'compressionRatio':_0x39b803>0x0?_0x30f811/_0x39b803:0x1,'strategyUsed':_0x1beba7[_0x10c100(0x1a4)],'qualityEstimate':Math['min'](0x1,_0x1beba7['qcBxx'](0.85,_0x39b803/_0x30f811*0.15)),'wasTruncated':!0x0};}export const structuralStrategy={'name':_0x25bd93(0x195),'compress':compressStructural};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x28d4bc=_0x490a;(function(_0x4af767,_0xdac122){const _0x48d41c=_0x490a,_0x2e24a9=_0x4af767();while(!![]){try{const _0x169f0c=parseInt(_0x48d41c(0x112))/0x1*(-parseInt(_0x48d41c(0x118))/0x2)+parseInt(_0x48d41c(0xf0))/0x3*(-parseInt(_0x48d41c(0xef))/0x4)+-parseInt(_0x48d41c(0xcf))/0x5+-parseInt(_0x48d41c(0xe5))/0x6*(-parseInt(_0x48d41c(0xe0))/0x7)+parseInt(_0x48d41c(0x10f))/0x8*(parseInt(_0x48d41c(0xfe))/0x9)+-parseInt(_0x48d41c(0xd5))/0xa*(-parseInt(_0x48d41c(0x102))/0xb)+-parseInt(_0x48d41c(0xcd))/0xc*(-parseInt(_0x48d41c(0xd3))/0xd);if(_0x169f0c===_0xdac122)break;else _0x2e24a9['push'](_0x2e24a9['shift']());}catch(_0x531bfc){_0x2e24a9['push'](_0x2e24a9['shift']());}}}(_0x5bcf,0x817a1));const ABBREVIATIONS=['Nr.','z.B.',_0x28d4bc(0x11d),'u.a.','etc.',_0x28d4bc(0x116),_0x28d4bc(0xe7),_0x28d4bc(0x10e),_0x28d4bc(0xe2),'ggf.',_0x28d4bc(0xea),_0x28d4bc(0xf2),'o.ä.',_0x28d4bc(0xe4),'v.a.',_0x28d4bc(0xd1),_0x28d4bc(0x111),'i.e.','vs.','Mr.',_0x28d4bc(0x119),'Ms.',_0x28d4bc(0xce),_0x28d4bc(0xfa)],PLACEHOLDER='\x00PUNKT\x00';function _0x490a(_0xc6d5e6,_0x3d701c){_0xc6d5e6=_0xc6d5e6-0xca;const _0x5bcf57=_0x5bcf();let _0x490aa2=_0x5bcf57[_0xc6d5e6];return _0x490aa2;}export function splitSentences(_0x3d8c33){const _0x2cfa0b=_0x28d4bc,_0x48a6f9={'mBOYw':'\x00PUNKT\x00'};let _0x5bd45c=_0x3d8c33['replace'](/\s+/g,'\x20')['trim']();for(const _0x123286 of ABBREVIATIONS)_0x5bd45c=_0x5bd45c[_0x2cfa0b(0xe1)](_0x123286,_0x123286['replaceAll']('.',_0x48a6f9['mBOYw']));return _0x5bd45c['split'](/[.!?]\s+|\n+/)['map'](_0x383b52=>_0x383b52['replaceAll'](_0x2cfa0b(0xcb),'.')['trim']())[_0x2cfa0b(0xe6)](_0x39d61c=>_0x39d61c['length']>0x0);}export function extractContentWords(_0x3fc83b){return _0x3fc83b['toLowerCase']()['replace'](/[^a-zäöüß\s]/g,'')['split'](/\s+/)['filter'](_0x17069c=>_0x17069c['length']>=0x3);}export const STOPWORDS=new Set([_0x28d4bc(0xfc),_0x28d4bc(0xcc),_0x28d4bc(0x108),_0x28d4bc(0x110),_0x28d4bc(0xed),_0x28d4bc(0xe3),_0x28d4bc(0xe9),_0x28d4bc(0x11c),_0x28d4bc(0xf5),'eines',_0x28d4bc(0xd8),'oder',_0x28d4bc(0xd0),_0x28d4bc(0x107),'ist',_0x28d4bc(0x10c),'war','waren','wird','werden',_0x28d4bc(0xe8),_0x28d4bc(0xdc),_0x28d4bc(0x114),_0x28d4bc(0xf4),_0x28d4bc(0x104),'aus','auf',_0x28d4bc(0x100),_0x28d4bc(0xf6),'ich',_0x28d4bc(0x106),'sie','man','haben','hat','hatte','kann',_0x28d4bc(0x10b),_0x28d4bc(0x105),_0x28d4bc(0x109),'sollen','wollen',_0x28d4bc(0xff),_0x28d4bc(0x11b),'nur',_0x28d4bc(0xd4),'the',_0x28d4bc(0xeb),'for',_0x28d4bc(0x113),'was','were',_0x28d4bc(0xda),'being',_0x28d4bc(0xd7),_0x28d4bc(0x10a),_0x28d4bc(0xf7),'does',_0x28d4bc(0xf3),'will',_0x28d4bc(0xee),_0x28d4bc(0xdf),_0x28d4bc(0x101),_0x28d4bc(0x103),_0x28d4bc(0xdd),_0x28d4bc(0xf1),'can',_0x28d4bc(0x117),'that',_0x28d4bc(0xd2),'those','with',_0x28d4bc(0xfb),_0x28d4bc(0xec),_0x28d4bc(0xdb),_0x28d4bc(0x115),'then','them',_0x28d4bc(0x10d),_0x28d4bc(0x11a),'there',_0x28d4bc(0xca),_0x28d4bc(0xd9),'which',_0x28d4bc(0xfd),_0x28d4bc(0xf9),'who','whom','how',_0x28d4bc(0xde),'but',_0x28d4bc(0xf8)]);function _0x5bcf(){const _0x5ca5cc=['have','und','what','been','about','von','might','not','could','14wpPZqJ','replaceAll','ca.','des','u.U.','643686JGvHQw','filter','Dr.','für','ein','inkl.','and','into','dem','would','4BlehJN','32793VODuFw','shall','i.d.R.','did','bei','einer','unter','had','its','where','Sr.','from','der','when','9XbAJso','nicht','über','should','708158ywsRMe','may','nach','können','wir','dass','das','müssen','has','muss','sind','they','Prof.','1176184FhuaAN','den','e.g.','1RGEHWJ','are','mit','than','evtl.','this','410932iJvYfd','Mrs.','their','auch','eine','bzw.','here','\x00PUNKT\x00','die','875820yjTDFj','Jr.','3589420VMpwwA','aber','d.h.','these','13uSXVCA','noch','160iqZAiF','replace'];_0x5bcf=function(){return _0x5ca5cc;};return _0x5bcf();}export function isStopword(_0x17ff7b){const _0x265058=_0x28d4bc;return STOPWORDS[_0x265058(0x10a)](_0x17ff7b['toLowerCase']()[_0x265058(0xd6)](/[.,;:!?()'"'-]/g,''));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x1d71(){const _0x487984=['niMvS','8yDQrmo','length','2000ZsorGj','1908696VWAkWw','split','min','max','21593493iKRUGP','trim','365745NMBuFW','AuxcQ','tptVq','push','39088KTLiCP','26022sxccuW','GHqvP','token-budget','apPBo','score','hgQRg','Zieqa','map','izpQp','6772400BHAHMj','tokens','474295bODJRx','inHso','vgmKt','index','sort'];_0x1d71=function(){return _0x487984;};return _0x1d71();}(function(_0x27d0e0,_0x81e61a){const _0x2a0616=_0x29bd,_0x144674=_0x27d0e0();while(!![]){try{const _0x3d7aa0=-parseInt(_0x2a0616(0x183))/0x1+-parseInt(_0x2a0616(0x16d))/0x2+-parseInt(_0x2a0616(0x173))/0x3+-parseInt(_0x2a0616(0x181))/0x4+-parseInt(_0x2a0616(0x18b))/0x5*(-parseInt(_0x2a0616(0x178))/0x6)+parseInt(_0x2a0616(0x177))/0x7+parseInt(_0x2a0616(0x189))/0x8*(parseInt(_0x2a0616(0x171))/0x9);if(_0x3d7aa0===_0x81e61a)break;else _0x144674['push'](_0x144674['shift']());}catch(_0x4af798){_0x144674['push'](_0x144674['shift']());}}}(_0x1d71,0xdac03));import{countTokens}from'../../shared/token-counter.js';import{splitSentences}from'./text-utils.js';const DEFAULT_TARGET_TOKENS=0x64,MIN_QUALITY_FLOOR=0.5,QUALITY_POSITION_BONUS=0.3;function computeUCurveScore(_0x8c5bf1,_0x17aaa4){const _0x3dd817=_0x29bd,_0x2fa98b={'hgQRg':function(_0x69ab65,_0x1c9828){return _0x69ab65<=_0x1c9828;},'vgmKt':function(_0x178ffb,_0x2f9ca8){return _0x178ffb-_0x2f9ca8;}};if(_0x2fa98b[_0x3dd817(0x17d)](_0x17aaa4,0x1))return 0x1;const _0x2fbe03=(_0x8c5bf1+0x1)/_0x17aaa4;return 0x2*Math['max'](_0x2fbe03,_0x2fa98b[_0x3dd817(0x185)](0x1,_0x2fbe03));}function truncateSingleSentence(_0x51d919,_0x1b7ff1,_0x3ac1c0){const _0x5acf22=_0x29bd,_0xd78177={'vZDkm':function(_0x2520f8,_0x40d222){return _0x2520f8>_0x40d222;},'apPBo':function(_0x2a3b5e,_0x399d9c){return _0x2a3b5e(_0x399d9c);},'niMvS':function(_0x241704,_0x4c66e3){return _0x241704/_0x4c66e3;},'Xbfut':_0x5acf22(0x17a)},_0x5e06ab=_0x51d919[_0x5acf22(0x16e)](/\s+/);let _0x5ce4ac='';for(const _0x22f324 of _0x5e06ab){const _0x369066=_0x5ce4ac?_0x5ce4ac+'\x20'+_0x22f324:_0x22f324;if(_0xd78177['vZDkm'](_0xd78177[_0x5acf22(0x17b)](countTokens,_0x369066),_0x3ac1c0))break;_0x5ce4ac=_0x369066;}const _0x22f8c8=_0xd78177['apPBo'](countTokens,_0x5ce4ac);return{'text':_0x5ce4ac,'originalTokens':_0x1b7ff1,'compressedTokens':_0x22f8c8,'compressionRatio':_0x22f8c8>0x0?_0xd78177[_0x5acf22(0x188)](_0x1b7ff1,_0x22f8c8):0x1,'strategyUsed':_0xd78177['Xbfut'],'qualityEstimate':_0x22f8c8/_0x1b7ff1,'wasTruncated':!0x0};}function selectSentencesByBudget(_0x4ee43b,_0x44c02d){const _0x590166=_0x29bd,_0x18b70f={'Zieqa':function(_0x3ad4e8,_0x28153f){return _0x3ad4e8+_0x28153f;}},_0x42ac79=[];let _0x25fc81=0x0;for(const _0xa5dddd of _0x4ee43b)(_0x18b70f['Zieqa'](_0x25fc81,_0xa5dddd[_0x590166(0x182)])<=_0x44c02d||0x0===_0x42ac79[_0x590166(0x18a)])&&(_0x42ac79[_0x590166(0x176)]({'index':_0xa5dddd['index'],'sentence':_0xa5dddd['sentence']}),_0x25fc81+=_0x18b70f[_0x590166(0x17e)](_0xa5dddd[_0x590166(0x182)],0x1));return _0x42ac79;}export function compressTokenBudget(_0x54c94c,_0xf19c5f={}){const _0x3b1f18=_0x29bd,_0x213879={'GHqvP':function(_0x2ab167,_0xb5fa82){return _0x2ab167(_0xb5fa82);},'AuxcQ':function(_0x823de8,_0x5bac63){return _0x823de8<=_0x5bac63;},'izpQp':'token-budget','yqxNF':function(_0x43db3a,_0x246d33){return _0x43db3a!==_0x246d33;},'ggstt':function(_0xf0dc73,_0x3a0a7b){return _0xf0dc73(_0x3a0a7b);},'inHso':function(_0x2a63a8,_0x320da2){return _0x2a63a8>_0x320da2;},'tptVq':function(_0x5d01ba,_0x10ae92){return _0x5d01ba/_0x10ae92;}};if(!_0x54c94c||!_0x54c94c[_0x3b1f18(0x172)]())return{'text':'','originalTokens':0x0,'compressedTokens':0x0,'compressionRatio':0x1,'strategyUsed':_0x3b1f18(0x17a),'qualityEstimate':0x1,'wasTruncated':!0x1};const _0x16121c=_0x213879['GHqvP'](countTokens,_0x54c94c),_0x12ece8=_0xf19c5f['maxTokens']??0x64;if(_0x213879[_0x3b1f18(0x174)](_0x16121c,_0x12ece8))return{'text':_0x54c94c,'originalTokens':_0x16121c,'compressedTokens':_0x16121c,'compressionRatio':0x1,'strategyUsed':_0x213879[_0x3b1f18(0x180)],'qualityEstimate':0x1,'wasTruncated':!0x1};const _0x2842e8=_0x213879[_0x3b1f18(0x179)](splitSentences,_0x54c94c);if(_0x2842e8[_0x3b1f18(0x18a)]<=0x1)return truncateSingleSentence(_0x54c94c,_0x16121c,_0x12ece8);const _0x5ece78=_0x213879['yqxNF'](!0x1,_0xf19c5f['preserveStructure']),_0x20e5ed=_0x2842e8['length'],_0x89d649=_0x2842e8[_0x3b1f18(0x17f)]((_0x47a1ec,_0xb10900)=>({'index':_0xb10900,'sentence':_0x47a1ec,'tokens':countTokens(_0x47a1ec),'score':_0x5ece78?computeUCurveScore(_0xb10900,_0x20e5ed):0x1}));_0x89d649[_0x3b1f18(0x187)]((_0x153326,_0x1357c4)=>_0x1357c4[_0x3b1f18(0x17c)]-_0x153326['score']);const _0x35b368=selectSentencesByBudget(_0x89d649,_0x12ece8);_0x35b368['sort']((_0x5c8869,_0x50d09e)=>_0x5c8869[_0x3b1f18(0x186)]-_0x50d09e[_0x3b1f18(0x186)]);const _0x5e3b7d=_0x35b368['map'](_0x11b34a=>_0x11b34a['sentence'])['join']('.\x20'),_0x1a411b=_0x213879['ggstt'](countTokens,_0x5e3b7d);return{'text':_0x5e3b7d,'originalTokens':_0x16121c,'compressedTokens':_0x1a411b,'compressionRatio':_0x213879[_0x3b1f18(0x184)](_0x1a411b,0x0)?_0x16121c/_0x1a411b:0x1,'strategyUsed':_0x3b1f18(0x17a),'qualityEstimate':Math[_0x3b1f18(0x170)](0.5,Math[_0x3b1f18(0x16f)](0x1,_0x213879[_0x3b1f18(0x175)](_0x1a411b,_0x16121c)+0.3)),'wasTruncated':!0x0};}function _0x29bd(_0x460c17,_0x1a7cfd){_0x460c17=_0x460c17-0x16d;const _0x1d7184=_0x1d71();let _0x29bd5e=_0x1d7184[_0x460c17];return _0x29bd5e;}export const tokenBudgetStrategy={'name':'token-budget','compress':compressTokenBudget};
|