@univer-cli/generic-keyed-instance-pool 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- function _0x2bf6(){const _0x50b432=['11WDMYeQ','idleTtlMs','waiters','map','isSafeInteger','find','acquire','idleTimer','input','delete','invalidated','lastIdleSequence','INSTANCE_POOL_CLOSED','rejected','clear','catch','50508QTDFCS','invalidate','73140bGaTnh','1551haZrKS','InstancePoolError','allSettled','get','length','36qYkVyj','1181068fszGSU','16359BeNIyL','cache','\x20is\x20occupied\x20by\x20active\x20or\x20loading\x20instances','cache-hit','maxEntries','add','cache.maxEntries\x20must\x20be\x20a\x20positive\x20integer','INSTANCE_POOL_INVALID_INPUT','lru','820mbdcEd','shift','INSTANCE_POOL_CAPACITY_EXCEEDED','37460obeVhS','size','closed','reason','set','factory','push','destroy','then','code','now','169DVHLzN','7xahrPZ','Instance\x20pool\x20is\x20closed','busy','66juFbbU','208262RHZimZ','cache.idleTtlMs\x20must\x20be\x20a\x20finite\x20non-negative\x20number','splice','key','status','destroy-start','resolve','9100656cnQAOg','reject','ttl'];_0x2bf6=function(){return _0x50b432;};return _0x2bf6();}(function(_0x36b7b4,_0x11f7e1){const _0x56d932=_0x5b0a,_0x1639b0=_0x36b7b4();while(!![]){try{const _0x10d07b=-parseInt(_0x56d932(0x9e))/0x1*(-parseInt(_0x56d932(0x94))/0x2)+-parseInt(_0x56d932(0xb8))/0x3*(-parseInt(_0x56d932(0xc1))/0x4)+-parseInt(_0x56d932(0xb0))/0x5*(-parseInt(_0x56d932(0x93))/0x6)+parseInt(_0x56d932(0x90))/0x7*(-parseInt(_0x56d932(0x9b))/0x8)+parseInt(_0x56d932(0xb6))/0x9*(-parseInt(_0x56d932(0xc4))/0xa)+parseInt(_0x56d932(0xb1))/0xb*(parseInt(_0x56d932(0xae))/0xc)+-parseInt(_0x56d932(0x8f))/0xd*(parseInt(_0x56d932(0xb7))/0xe);if(_0x10d07b===_0x11f7e1)break;else _0x1639b0['push'](_0x1639b0['shift']());}catch(_0x289dc5){_0x1639b0['push'](_0x1639b0['shift']());}}}(_0x2bf6,0xbb99b));var e=class extends Error{['code'];constructor(_0x19bf3a,_0x59ce12,_0xc43940){const _0x19d4a1=_0x5b0a;super(_0x59ce12,_0xc43940),this['name']=_0x19d4a1(0xb2),this[_0x19d4a1(0x8d)]=_0x19bf3a;}},t=0x493e0,n=0x14;function r(_0x34279f){const _0xf3a111=_0x5b0a;let _0x6641b6=new Map(),_0xd60387=new Set(),_0x1c478c=new Map(),_0x15fcf0=_0x34279f['cache']?.[_0xf3a111(0x9f)]??t,_0x203c6d=_0x34279f[_0xf3a111(0xb9)]?.[_0xf3a111(0xbc)]??n,_0xd1bc30=!0x1,_0x1716fa,_0x4eb9a4=0x0;i(_0x15fcf0,_0x203c6d);let _0x140b18={async 'acquire'(_0x180523){const _0x27965b=_0xf3a111;_0x3a38ad(),a(_0x180523);let _0x89a1ea=_0x6641b6[_0x27965b(0xb4)](_0x180523[_0x27965b(0x97)]);if(_0x89a1ea)return _0x89a1ea['busy']?await o(_0x180523,_0x89a1ea[_0x27965b(0xa0)]):(c(_0x89a1ea),_0x89a1ea[_0x27965b(0x92)]=!0x0,_0x177521({'key':_0x180523[_0x27965b(0x97)],'type':_0x27965b(0xbb)}),_0x3e9f1c(_0x180523[_0x27965b(0x97)],_0x89a1ea));let _0x1a77f1=_0x1c478c[_0x27965b(0xb4)](_0x180523[_0x27965b(0x97)]);if(_0x1a77f1)return await o(_0x180523,_0x1a77f1);let _0x2872cc,_0x364554=new Promise(_0x275c79=>{_0x2872cc=_0x275c79;});_0xd60387[_0x27965b(0xbd)](_0x364554),_0x1c478c[_0x27965b(0xc8)](_0x180523['key'],[]);let _0x4f7ba9=Date['now']();_0x177521({'key':_0x180523[_0x27965b(0x97)],'type':'create-start'});try{await _0x1b8459();let _0x3ebbb5=await _0x34279f['factory']['create'](_0x180523);if(_0xd1bc30)throw await _0x34279f[_0x27965b(0xc9)][_0x27965b(0xcb)]({'instance':_0x3ebbb5,'key':_0x180523['key']}),l();let _0xa03658={'busy':!0x0,'closed':!0x1,'instance':_0x3ebbb5,'invalidated':!0x1,'lastIdleSequence':0x0,'waiters':_0x1c478c[_0x27965b(0xb4)](_0x180523[_0x27965b(0x97)])??[]};return _0x6641b6[_0x27965b(0xc8)](_0x180523[_0x27965b(0x97)],_0xa03658),_0x177521({'durationMs':Date[_0x27965b(0x8e)]()-_0x4f7ba9,'key':_0x180523[_0x27965b(0x97)],'type':'create-complete'}),_0x3e9f1c(_0x180523[_0x27965b(0x97)],_0xa03658);}catch(_0x51d0f5){throw s(_0x1c478c['get'](_0x180523['key'])??[],_0x51d0f5),_0x51d0f5;}finally{_0x1c478c[_0x27965b(0xa7)](_0x180523[_0x27965b(0x97)]),_0xd60387['delete'](_0x364554),_0x2872cc();}},async 'close'(){if(_0x1716fa)return await _0x1716fa;_0xd1bc30=!0x0,_0x1716fa=_0x409f40(),await _0x1716fa;}};return _0x140b18;function _0x3e9f1c(_0x22f791,_0x3b8457){let _0x5b9a0d=!0x1;return{'instance':_0x3b8457['instance'],'key':_0x22f791,async 'invalidate'(){const _0x3dbf80=_0x5b0a;_0x5b9a0d||(_0x5b9a0d=!0x0,_0x3b8457[_0x3dbf80(0xa8)]=!0x0,await _0x57c627(_0x22f791,_0x3b8457,_0x3dbf80(0xaf)));},async 'release'(){const _0x1e2d16=_0x5b0a;if(_0x5b9a0d||(_0x5b9a0d=!0x0,_0x3b8457[_0x1e2d16(0xc6)]))return;if(_0x3b8457[_0x1e2d16(0xa8)]){await _0x57c627(_0x22f791,_0x3b8457,_0x1e2d16(0xaf));return;}let _0x65443c=_0x3b8457[_0x1e2d16(0xa0)][_0x1e2d16(0xc2)]();_0x65443c?_0x65443c[_0x1e2d16(0x9a)](_0x3e9f1c(_0x22f791,_0x3b8457)):(_0x3b8457[_0x1e2d16(0x92)]=!0x1,_0x3b8457['lastIdleSequence']=++_0x4eb9a4,_0x39c684(_0x22f791,_0x3b8457));}};}async function _0x57c627(_0x5343ed,_0x371c97,_0x1331e8){const _0x27e94f=_0xf3a111;let _0x55657e=_0x371c97[_0x27e94f(0xa0)][_0x27e94f(0x96)](0x0);_0x6641b6[_0x27e94f(0xb4)](_0x5343ed)===_0x371c97&&_0x6641b6[_0x27e94f(0xa7)](_0x5343ed);try{await _0x12006c(_0x5343ed,_0x371c97,_0x1331e8);}finally{_0x1331e8&&_0x177521({'key':_0x5343ed,'reason':_0x1331e8,'type':'evicted'}),_0xd1bc30?s(_0x55657e,l()):_0x298e16(_0x55657e);}}function _0x39c684(_0x487665,_0x550c85){const _0x15f2bc=_0xf3a111;c(_0x550c85),_0x550c85[_0x15f2bc(0xa5)]=setTimeout(()=>{const _0x4586d3=_0x15f2bc;_0x550c85[_0x4586d3(0x92)]||_0x6641b6['get'](_0x487665)!==_0x550c85||(_0x6641b6[_0x4586d3(0xa7)](_0x487665),_0x12006c(_0x487665,_0x550c85,_0x4586d3(0x9d))[_0x4586d3(0xcc)](()=>_0x177521({'key':_0x487665,'reason':_0x4586d3(0x9d),'type':'evicted'}))[_0x4586d3(0xad)](()=>void 0x0));},_0x15fcf0),_0x550c85['idleTimer']['unref']?.();}async function _0x1b8459(){const _0x360581=_0xf3a111;for(;_0x6641b6['size']+_0x1c478c[_0x360581(0xc5)]>_0x203c6d;){let _0x3b1477;for(let _0x55f5f0 of _0x6641b6)_0x55f5f0[0x1][_0x360581(0x92)]||(!_0x3b1477||_0x55f5f0[0x1]['lastIdleSequence']<_0x3b1477[0x1][_0x360581(0xa9)])&&(_0x3b1477=_0x55f5f0);if(!_0x3b1477)throw new e(_0x360581(0xc3),'Instance\x20pool\x20capacity\x20'+_0x203c6d+_0x360581(0xba));_0x6641b6[_0x360581(0xa7)](_0x3b1477[0x0]),await _0x12006c(_0x3b1477[0x0],_0x3b1477[0x1],_0x360581(0xc0)),_0x177521({'key':_0x3b1477[0x0],'reason':_0x360581(0xc0),'type':'evicted'});}}async function _0x409f40(){const _0x293a67=_0xf3a111;let _0x5342ac=l(),_0x41d7fe=[..._0x6641b6['entries']()];for(let [,_0x403728]of _0x41d7fe)s(_0x403728[_0x293a67(0xa0)],_0x5342ac);for(let _0x1096f7 of _0x1c478c['values']())s(_0x1096f7,_0x5342ac);_0x6641b6[_0x293a67(0xac)]();let _0x2d04df=(await Promise[_0x293a67(0xb3)]([..._0x41d7fe[_0x293a67(0xa1)](async([_0xadde28,_0x49b9ab])=>await _0x12006c(_0xadde28,_0x49b9ab)),..._0xd60387]))[_0x293a67(0xa3)](_0x3450bc=>_0x3450bc[_0x293a67(0x98)]===_0x293a67(0xab));if(_0x2d04df?.[_0x293a67(0x98)]===_0x293a67(0xab))throw _0x2d04df[_0x293a67(0xc7)];}function _0x177521(_0x548bcf){try{_0x34279f['onEvent']?.(_0x548bcf);}catch{}}function _0x3a38ad(){if(_0xd1bc30)throw l();}function _0x298e16(_0x4f2cf2){const _0x125b33=_0xf3a111;for(let _0x2a00db of _0x4f2cf2)_0x140b18[_0x125b33(0xa4)](_0x2a00db[_0x125b33(0xa6)])[_0x125b33(0xcc)](_0x2a00db[_0x125b33(0x9a)],_0x2a00db[_0x125b33(0x9c)]);}async function _0x12006c(_0x29758b,_0x6e6455,_0x387d6c){const _0x5d1510=_0xf3a111;_0x6e6455[_0x5d1510(0xc6)]||(_0x6e6455[_0x5d1510(0xc6)]=!0x0,c(_0x6e6455),_0x387d6c&&_0x177521({'key':_0x29758b,'reason':_0x387d6c,'type':_0x5d1510(0x99)}),await _0x34279f[_0x5d1510(0xc9)]['destroy']({'instance':_0x6e6455['instance'],'key':_0x29758b}));}}function _0x5b0a(_0x4c05dc,_0x3e227e){_0x4c05dc=_0x4c05dc-0x8d;const _0x2bf60d=_0x2bf6();let _0x5b0a60=_0x2bf60d[_0x4c05dc];return _0x5b0a60;}function i(_0x2f4f54,_0x5d2e44){const _0x28f447=_0x5b0a;if(!Number['isFinite'](_0x2f4f54)||_0x2f4f54<0x0)throw new e(_0x28f447(0xbf),_0x28f447(0x95));if(!Number[_0x28f447(0xa2)](_0x5d2e44)||_0x5d2e44<=0x0)throw new e(_0x28f447(0xbf),_0x28f447(0xbe));}function a(_0x598615){const _0x2cf786=_0x5b0a;if(_0x598615[_0x2cf786(0x97)][_0x2cf786(0xb5)]===0x0)throw new e(_0x2cf786(0xbf),'key\x20must\x20not\x20be\x20empty');}function o(_0x3ad033,_0x61eecd){return new Promise((_0x4a3d78,_0x18b3ff)=>{const _0x3f6bc1=_0x5b0a;_0x61eecd[_0x3f6bc1(0xca)]({'input':_0x3ad033,'reject':_0x18b3ff,'resolve':_0x4a3d78});});}function s(_0x38a5ea,_0x3b84a6){const _0x4fa799=_0x5b0a;for(let _0x10e205 of _0x38a5ea[_0x4fa799(0x96)](0x0))_0x10e205[_0x4fa799(0x9c)](_0x3b84a6);}function c(_0x44c222){const _0x57f339=_0x5b0a;_0x44c222[_0x57f339(0xa5)]!==void 0x0&&(clearTimeout(_0x44c222[_0x57f339(0xa5)]),delete _0x44c222[_0x57f339(0xa5)]);}function l(){const _0x53b6eb=_0x5b0a;return new e(_0x53b6eb(0xaa),_0x53b6eb(0x91));}export{e as InstancePoolError,r as createGenericKeyedInstancePool};
1
+ const _0x358417=_0x14cd;(function(_0xd54633,_0x4ea09e){const _0x7833e0=_0x14cd,_0x2453c8=_0xd54633();while(!![]){try{const _0x2bb99a=parseInt(_0x7833e0(0x175))/0x1+-parseInt(_0x7833e0(0x140))/0x2+-parseInt(_0x7833e0(0x147))/0x3*(parseInt(_0x7833e0(0x156))/0x4)+parseInt(_0x7833e0(0x14b))/0x5+parseInt(_0x7833e0(0x15f))/0x6*(-parseInt(_0x7833e0(0x15b))/0x7)+-parseInt(_0x7833e0(0x166))/0x8*(parseInt(_0x7833e0(0x13f))/0x9)+-parseInt(_0x7833e0(0x153))/0xa*(-parseInt(_0x7833e0(0x149))/0xb);if(_0x2bb99a===_0x4ea09e)break;else _0x2453c8['push'](_0x2453c8['shift']());}catch(_0x1937f1){_0x2453c8['push'](_0x2453c8['shift']());}}}(_0x1c7b,0x25c04));var e=class extends Error{[_0x358417(0x174)];constructor(_0x5d43b8,_0x2ef0f4,_0x2662fc){const _0x34a2b2=_0x358417;super(_0x2ef0f4,_0x2662fc),this['name']='InstancePoolError',this[_0x34a2b2(0x174)]=_0x5d43b8;}},t=0x493e0,n=0x14;function _0x14cd(_0x466a61,_0x1d1bba){_0x466a61=_0x466a61-0x13a;const _0x1c7bd4=_0x1c7b();let _0x14cd1b=_0x1c7bd4[_0x466a61];return _0x14cd1b;}function r(_0x48076c){const _0x2ab8e6=_0x358417;let _0x101f33=new Map(),_0x27b515=new Set(),_0x21f138=new Map(),_0x59d529=_0x48076c['cache']?.[_0x2ab8e6(0x15d)]??t,_0x37746f=_0x48076c['cache']?.['maxEntries']??n,_0x3118eb=!0x1,_0x147293,_0x28303c=0x0;i(_0x59d529,_0x37746f);let _0x167610={async 'acquire'(_0x133b68){const _0x1be1e0=_0x2ab8e6;_0x2b75e5(),a(_0x133b68);let _0xe4b9a1=_0x101f33['get'](_0x133b68[_0x1be1e0(0x16f)]);if(_0xe4b9a1)return _0xe4b9a1[_0x1be1e0(0x172)]?await o(_0x133b68,_0xe4b9a1[_0x1be1e0(0x171)]):(c(_0xe4b9a1),_0xe4b9a1['busy']=!0x0,_0x10d498({'key':_0x133b68[_0x1be1e0(0x16f)],'type':_0x1be1e0(0x14e)}),_0x16aba7(_0x133b68[_0x1be1e0(0x16f)],_0xe4b9a1));let _0x15d870=_0x21f138['get'](_0x133b68[_0x1be1e0(0x16f)]);if(_0x15d870)return await o(_0x133b68,_0x15d870);let _0x3baac8,_0x2d05a8=new Promise(_0x34664c=>{_0x3baac8=_0x34664c;});_0x27b515['add'](_0x2d05a8),_0x21f138['set'](_0x133b68['key'],[]);let _0x40ec51=Date[_0x1be1e0(0x162)]();_0x10d498({'key':_0x133b68['key'],'type':_0x1be1e0(0x14c)});try{await _0x520911();let _0x356f51=await _0x48076c['factory'][_0x1be1e0(0x13b)](_0x133b68);if(_0x3118eb)throw await _0x48076c[_0x1be1e0(0x15e)][_0x1be1e0(0x15a)]({'instance':_0x356f51,'key':_0x133b68['key']}),l();let _0x5cc68d={'busy':!0x0,'closed':!0x1,'instance':_0x356f51,'invalidated':!0x1,'lastIdleSequence':0x0,'waiters':_0x21f138[_0x1be1e0(0x14d)](_0x133b68[_0x1be1e0(0x16f)])??[]};return _0x101f33['set'](_0x133b68[_0x1be1e0(0x16f)],_0x5cc68d),_0x10d498({'durationMs':Date[_0x1be1e0(0x162)]()-_0x40ec51,'key':_0x133b68[_0x1be1e0(0x16f)],'type':_0x1be1e0(0x143)}),_0x16aba7(_0x133b68[_0x1be1e0(0x16f)],_0x5cc68d);}catch(_0x18e23e){throw s(_0x21f138[_0x1be1e0(0x14d)](_0x133b68[_0x1be1e0(0x16f)])??[],_0x18e23e),_0x18e23e;}finally{_0x21f138[_0x1be1e0(0x173)](_0x133b68['key']),_0x27b515[_0x1be1e0(0x173)](_0x2d05a8),_0x3baac8();}},async 'close'(){if(_0x147293)return await _0x147293;_0x3118eb=!0x0,_0x147293=_0x130613(),await _0x147293;}};return _0x167610;function _0x16aba7(_0x49ac29,_0x1d65d2){const _0x316ffb=_0x2ab8e6;let _0x2526cd=!0x1;return{'instance':_0x1d65d2[_0x316ffb(0x144)],'key':_0x49ac29,async 'invalidate'(){const _0xc55c3f=_0x316ffb;_0x2526cd||(_0x2526cd=!0x0,_0x1d65d2[_0xc55c3f(0x169)]=!0x0,await _0x3036fc(_0x49ac29,_0x1d65d2,_0xc55c3f(0x16e)));},async 'release'(){const _0x532935=_0x316ffb;if(_0x2526cd||(_0x2526cd=!0x0,_0x1d65d2[_0x532935(0x168)]))return;if(_0x1d65d2['invalidated']){await _0x3036fc(_0x49ac29,_0x1d65d2,_0x532935(0x16e));return;}let _0x3cae5e=_0x1d65d2['waiters']['shift']();_0x3cae5e?_0x3cae5e[_0x532935(0x151)](_0x16aba7(_0x49ac29,_0x1d65d2)):(_0x1d65d2[_0x532935(0x172)]=!0x1,_0x1d65d2[_0x532935(0x14a)]=++_0x28303c,_0x50051c(_0x49ac29,_0x1d65d2));}};}async function _0x3036fc(_0x331c68,_0x2f2fbb,_0xe21c56){const _0x8beb90=_0x2ab8e6;let _0x59f028=_0x2f2fbb[_0x8beb90(0x171)][_0x8beb90(0x163)](0x0);_0x101f33[_0x8beb90(0x14d)](_0x331c68)===_0x2f2fbb&&_0x101f33[_0x8beb90(0x173)](_0x331c68);try{await _0x38923c(_0x331c68,_0x2f2fbb,_0xe21c56);}finally{_0xe21c56&&_0x10d498({'key':_0x331c68,'reason':_0xe21c56,'type':_0x8beb90(0x13a)}),_0x3118eb?s(_0x59f028,l()):_0x52dee3(_0x59f028);}}function _0x50051c(_0x1aee77,_0x4421ef){const _0x478221=_0x2ab8e6;c(_0x4421ef),_0x4421ef[_0x478221(0x14f)]=setTimeout(()=>{const _0x185271=_0x478221;_0x4421ef[_0x185271(0x172)]||_0x101f33['get'](_0x1aee77)!==_0x4421ef||(_0x101f33[_0x185271(0x173)](_0x1aee77),_0x38923c(_0x1aee77,_0x4421ef,_0x185271(0x157))[_0x185271(0x165)](()=>_0x10d498({'key':_0x1aee77,'reason':_0x185271(0x157),'type':_0x185271(0x13a)}))[_0x185271(0x13c)](()=>void 0x0));},_0x59d529),_0x4421ef[_0x478221(0x14f)]['unref']?.();}async function _0x520911(){const _0x109361=_0x2ab8e6;for(;_0x101f33[_0x109361(0x164)]+_0x21f138['size']>_0x37746f;){let _0x453cef;for(let _0x20870e of _0x101f33)_0x20870e[0x1]['busy']||(!_0x453cef||_0x20870e[0x1][_0x109361(0x14a)]<_0x453cef[0x1][_0x109361(0x14a)])&&(_0x453cef=_0x20870e);if(!_0x453cef)throw new e(_0x109361(0x155),_0x109361(0x154)+_0x37746f+_0x109361(0x167));_0x101f33['delete'](_0x453cef[0x0]),await _0x38923c(_0x453cef[0x0],_0x453cef[0x1],_0x109361(0x148)),_0x10d498({'key':_0x453cef[0x0],'reason':_0x109361(0x148),'type':_0x109361(0x13a)});}}async function _0x130613(){const _0x3a3283=_0x2ab8e6;let _0x41d8cf=l(),_0x3cbba1=[..._0x101f33[_0x3a3283(0x146)]()];for(let [,_0x86912f]of _0x3cbba1)s(_0x86912f['waiters'],_0x41d8cf);for(let _0x4ec458 of _0x21f138[_0x3a3283(0x16a)]())s(_0x4ec458,_0x41d8cf);_0x101f33[_0x3a3283(0x170)]();let _0x317b73=(await Promise[_0x3a3283(0x145)]([..._0x3cbba1[_0x3a3283(0x159)](async([_0x33a61e,_0x15db7a])=>await _0x38923c(_0x33a61e,_0x15db7a)),..._0x27b515]))[_0x3a3283(0x16b)](_0x1cb337=>_0x1cb337[_0x3a3283(0x158)]===_0x3a3283(0x150));if(_0x317b73?.['status']===_0x3a3283(0x150))throw _0x317b73[_0x3a3283(0x16d)];}function _0x10d498(_0x14ffbd){const _0x3c5c05=_0x2ab8e6;try{_0x48076c[_0x3c5c05(0x13e)]?.(_0x14ffbd);}catch{}}function _0x2b75e5(){if(_0x3118eb)throw l();}function _0x52dee3(_0x2cfbd5){const _0x2bd7dc=_0x2ab8e6;for(let _0x43cb57 of _0x2cfbd5)_0x167610[_0x2bd7dc(0x142)](_0x43cb57[_0x2bd7dc(0x160)])[_0x2bd7dc(0x165)](_0x43cb57[_0x2bd7dc(0x151)],_0x43cb57[_0x2bd7dc(0x16c)]);}async function _0x38923c(_0x8d0396,_0x11f3e0,_0x34e48c){const _0x14e896=_0x2ab8e6;_0x11f3e0[_0x14e896(0x168)]||(_0x11f3e0[_0x14e896(0x168)]=!0x0,c(_0x11f3e0),_0x34e48c&&_0x10d498({'key':_0x8d0396,'reason':_0x34e48c,'type':'destroy-start'}),await _0x48076c[_0x14e896(0x15e)][_0x14e896(0x15a)]({'instance':_0x11f3e0[_0x14e896(0x144)],'key':_0x8d0396}));}}function i(_0x3d66cd,_0x4981ef){const _0x18b13c=_0x358417;if(!Number['isFinite'](_0x3d66cd)||_0x3d66cd<0x0)throw new e(_0x18b13c(0x15c),_0x18b13c(0x152));if(!Number[_0x18b13c(0x13d)](_0x4981ef)||_0x4981ef<=0x0)throw new e(_0x18b13c(0x15c),'cache.maxEntries\x20must\x20be\x20a\x20positive\x20integer');}function _0x1c7b(){const _0x53448e=['delete','code','129163JFPPKl','evicted','create','catch','isSafeInteger','onEvent','27wXuJsF','539024BDvVWT','INSTANCE_POOL_CLOSED','acquire','create-complete','instance','allSettled','entries','58122aHQEvH','lru','11Izfsfx','lastIdleSequence','927930hWEdFH','create-start','get','cache-hit','idleTimer','rejected','resolve','cache.idleTtlMs\x20must\x20be\x20a\x20finite\x20non-negative\x20number','4975610CduaDR','Instance\x20pool\x20capacity\x20','INSTANCE_POOL_CAPACITY_EXCEEDED','24hxCUbZ','ttl','status','map','destroy','7QWlnKP','INSTANCE_POOL_INVALID_INPUT','idleTtlMs','factory','662058Qfsefb','input','push','now','splice','size','then','430888HHpvtE','\x20is\x20occupied\x20by\x20active\x20or\x20loading\x20instances','closed','invalidated','values','find','reject','reason','invalidate','key','clear','waiters','busy'];_0x1c7b=function(){return _0x53448e;};return _0x1c7b();}function a(_0x5de168){const _0x48269b=_0x358417;if(_0x5de168[_0x48269b(0x16f)]['length']===0x0)throw new e('INSTANCE_POOL_INVALID_INPUT','key\x20must\x20not\x20be\x20empty');}function o(_0x45c99d,_0x1e447c){return new Promise((_0x17e17e,_0x3ea9eb)=>{const _0x55b566=_0x14cd;_0x1e447c[_0x55b566(0x161)]({'input':_0x45c99d,'reject':_0x3ea9eb,'resolve':_0x17e17e});});}function s(_0x493250,_0x252251){const _0x343306=_0x358417;for(let _0x3f2941 of _0x493250[_0x343306(0x163)](0x0))_0x3f2941['reject'](_0x252251);}function c(_0x2f8a91){const _0x24eb50=_0x358417;_0x2f8a91[_0x24eb50(0x14f)]!==void 0x0&&(clearTimeout(_0x2f8a91[_0x24eb50(0x14f)]),delete _0x2f8a91[_0x24eb50(0x14f)]);}function l(){const _0x298f4c=_0x358417;return new e(_0x298f4c(0x141),'Instance\x20pool\x20is\x20closed');}export{e as InstancePoolError,r as createGenericKeyedInstancePool};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@univer-cli/generic-keyed-instance-pool",
3
3
  "type": "module",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",