@univer-cli/generic-keyed-instance-pool 1.0.0 → 1.0.2

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 _0x318c07=_0x9134;(function(_0x162c27,_0x485c62){const _0x3f30a6=_0x9134,_0x50397e=_0x162c27();while(!![]){try{const _0x2a84c6=-parseInt(_0x3f30a6(0x1e7))/0x1+-parseInt(_0x3f30a6(0x1dd))/0x2+parseInt(_0x3f30a6(0x1f7))/0x3*(parseInt(_0x3f30a6(0x1f8))/0x4)+-parseInt(_0x3f30a6(0x1f4))/0x5*(parseInt(_0x3f30a6(0x1d6))/0x6)+-parseInt(_0x3f30a6(0x1ca))/0x7*(-parseInt(_0x3f30a6(0x1ef))/0x8)+-parseInt(_0x3f30a6(0x1fd))/0x9+parseInt(_0x3f30a6(0x1e8))/0xa*(parseInt(_0x3f30a6(0x1cb))/0xb);if(_0x2a84c6===_0x485c62)break;else _0x50397e['push'](_0x50397e['shift']());}catch(_0x39dcc8){_0x50397e['push'](_0x50397e['shift']());}}}(_0x165e,0xe1c31));var e=class extends Error{[_0x318c07(0x1e1)];constructor(_0x429b8a,_0x1e9546,_0x4cc42b){const _0xce8f2b=_0x318c07;super(_0x1e9546,_0x4cc42b),this[_0xce8f2b(0x1f5)]=_0xce8f2b(0x1d0),this[_0xce8f2b(0x1e1)]=_0x429b8a;}},t=0x493e0,n=0x14;function _0x9134(_0x2d8313,_0x491b48){_0x2d8313=_0x2d8313-0x1b8;const _0x165eea=_0x165e();let _0x913435=_0x165eea[_0x2d8313];return _0x913435;}function _0x165e(){const _0x29d9ba=['424drruUR','delete','key\x20must\x20not\x20be\x20empty','waiters','entries','84415ddYiUu','name','Instance\x20pool\x20capacity\x20','51924bOTgBi','276vZmyWw','splice','resolve','length','clear','15113547JKtXeh','input','reject','busy','invalidate','now','values','rejected','get','create','closed','instance','status','Instance\x20pool\x20is\x20closed','invalidated','set','catch','reason','idleTtlMs','unref','197589nqczgD','36800159FCthDz','evicted','isFinite','lastIdleSequence','then','InstancePoolError','shift','acquire','cache.idleTtlMs\x20must\x20be\x20a\x20finite\x20non-negative\x20number','map','cache-hit','426rINTwA','size','maxEntries','isSafeInteger','cache.maxEntries\x20must\x20be\x20a\x20positive\x20integer','onEvent','INSTANCE_POOL_INVALID_INPUT','1529798xreAcz','lru','key','factory','code','find','allSettled','ttl','push','destroy','1468156PqbDzM','10HtKFSZ','add','destroy-start','cache','idleTimer','create-complete','INSTANCE_POOL_CLOSED'];_0x165e=function(){return _0x29d9ba;};return _0x165e();}function r(_0x3555b9){const _0x40dea6=_0x318c07;let _0x39af86=new Map(),_0x1fe5aa=new Set(),_0x1a28c1=new Map(),_0x236702=_0x3555b9['cache']?.[_0x40dea6(0x1c8)]??t,_0x3e7883=_0x3555b9[_0x40dea6(0x1eb)]?.[_0x40dea6(0x1d8)]??n,_0x12a2f2=!0x1,_0xad1e45,_0x1dbbbd=0x0;i(_0x236702,_0x3e7883);let _0x2b5b33={async 'acquire'(_0x564a12){const _0x321ddb=_0x40dea6;_0x59fd2e(),a(_0x564a12);let _0x236426=_0x39af86['get'](_0x564a12[_0x321ddb(0x1df)]);if(_0x236426)return _0x236426['busy']?await o(_0x564a12,_0x236426[_0x321ddb(0x1f2)]):(c(_0x236426),_0x236426[_0x321ddb(0x1b9)]=!0x0,_0x1d6e90({'key':_0x564a12[_0x321ddb(0x1df)],'type':_0x321ddb(0x1d5)}),_0x1cb95d(_0x564a12[_0x321ddb(0x1df)],_0x236426));let _0x4ab2ce=_0x1a28c1[_0x321ddb(0x1be)](_0x564a12[_0x321ddb(0x1df)]);if(_0x4ab2ce)return await o(_0x564a12,_0x4ab2ce);let _0x3aa659,_0x5a59b2=new Promise(_0x51bab0=>{_0x3aa659=_0x51bab0;});_0x1fe5aa[_0x321ddb(0x1e9)](_0x5a59b2),_0x1a28c1[_0x321ddb(0x1c5)](_0x564a12[_0x321ddb(0x1df)],[]);let _0x4958b8=Date[_0x321ddb(0x1bb)]();_0x1d6e90({'key':_0x564a12[_0x321ddb(0x1df)],'type':'create-start'});try{await _0x3a54b5();let _0x114e38=await _0x3555b9[_0x321ddb(0x1e0)][_0x321ddb(0x1bf)](_0x564a12);if(_0x12a2f2)throw await _0x3555b9['factory'][_0x321ddb(0x1e6)]({'instance':_0x114e38,'key':_0x564a12[_0x321ddb(0x1df)]}),l();let _0x38e06e={'busy':!0x0,'closed':!0x1,'instance':_0x114e38,'invalidated':!0x1,'lastIdleSequence':0x0,'waiters':_0x1a28c1['get'](_0x564a12['key'])??[]};return _0x39af86['set'](_0x564a12[_0x321ddb(0x1df)],_0x38e06e),_0x1d6e90({'durationMs':Date[_0x321ddb(0x1bb)]()-_0x4958b8,'key':_0x564a12[_0x321ddb(0x1df)],'type':_0x321ddb(0x1ed)}),_0x1cb95d(_0x564a12[_0x321ddb(0x1df)],_0x38e06e);}catch(_0x407b73){throw s(_0x1a28c1[_0x321ddb(0x1be)](_0x564a12['key'])??[],_0x407b73),_0x407b73;}finally{_0x1a28c1[_0x321ddb(0x1f0)](_0x564a12[_0x321ddb(0x1df)]),_0x1fe5aa[_0x321ddb(0x1f0)](_0x5a59b2),_0x3aa659();}},async 'close'(){if(_0xad1e45)return await _0xad1e45;_0x12a2f2=!0x0,_0xad1e45=_0x3f40b0(),await _0xad1e45;}};return _0x2b5b33;function _0x1cb95d(_0x16e324,_0x4bdc57){let _0xe88aca=!0x1;return{'instance':_0x4bdc57['instance'],'key':_0x16e324,async 'invalidate'(){const _0xcc2019=_0x9134;_0xe88aca||(_0xe88aca=!0x0,_0x4bdc57[_0xcc2019(0x1c4)]=!0x0,await _0x155512(_0x16e324,_0x4bdc57,_0xcc2019(0x1ba)));},async 'release'(){const _0x2bd288=_0x9134;if(_0xe88aca||(_0xe88aca=!0x0,_0x4bdc57['closed']))return;if(_0x4bdc57[_0x2bd288(0x1c4)]){await _0x155512(_0x16e324,_0x4bdc57,_0x2bd288(0x1ba));return;}let _0x5e9bee=_0x4bdc57[_0x2bd288(0x1f2)][_0x2bd288(0x1d1)]();_0x5e9bee?_0x5e9bee[_0x2bd288(0x1fa)](_0x1cb95d(_0x16e324,_0x4bdc57)):(_0x4bdc57[_0x2bd288(0x1b9)]=!0x1,_0x4bdc57[_0x2bd288(0x1ce)]=++_0x1dbbbd,_0x198cfb(_0x16e324,_0x4bdc57));}};}async function _0x155512(_0x5bfc45,_0x2bdf76,_0x5138e1){const _0xd878d6=_0x40dea6;let _0x1fa1cc=_0x2bdf76[_0xd878d6(0x1f2)][_0xd878d6(0x1f9)](0x0);_0x39af86[_0xd878d6(0x1be)](_0x5bfc45)===_0x2bdf76&&_0x39af86['delete'](_0x5bfc45);try{await _0x61ee47(_0x5bfc45,_0x2bdf76,_0x5138e1);}finally{_0x5138e1&&_0x1d6e90({'key':_0x5bfc45,'reason':_0x5138e1,'type':_0xd878d6(0x1cc)}),_0x12a2f2?s(_0x1fa1cc,l()):_0x576ae2(_0x1fa1cc);}}function _0x198cfb(_0x5053a4,_0x32ef60){const _0x5be22e=_0x40dea6;c(_0x32ef60),_0x32ef60[_0x5be22e(0x1ec)]=setTimeout(()=>{const _0x422f12=_0x5be22e;_0x32ef60[_0x422f12(0x1b9)]||_0x39af86[_0x422f12(0x1be)](_0x5053a4)!==_0x32ef60||(_0x39af86[_0x422f12(0x1f0)](_0x5053a4),_0x61ee47(_0x5053a4,_0x32ef60,'ttl')[_0x422f12(0x1cf)](()=>_0x1d6e90({'key':_0x5053a4,'reason':_0x422f12(0x1e4),'type':_0x422f12(0x1cc)}))[_0x422f12(0x1c6)](()=>void 0x0));},_0x236702),_0x32ef60[_0x5be22e(0x1ec)][_0x5be22e(0x1c9)]?.();}async function _0x3a54b5(){const _0x54a94d=_0x40dea6;for(;_0x39af86[_0x54a94d(0x1d7)]+_0x1a28c1[_0x54a94d(0x1d7)]>_0x3e7883;){let _0x44cce0;for(let _0x5c55c5 of _0x39af86)_0x5c55c5[0x1][_0x54a94d(0x1b9)]||(!_0x44cce0||_0x5c55c5[0x1][_0x54a94d(0x1ce)]<_0x44cce0[0x1][_0x54a94d(0x1ce)])&&(_0x44cce0=_0x5c55c5);if(!_0x44cce0)throw new e('INSTANCE_POOL_CAPACITY_EXCEEDED',_0x54a94d(0x1f6)+_0x3e7883+'\x20is\x20occupied\x20by\x20active\x20or\x20loading\x20instances');_0x39af86[_0x54a94d(0x1f0)](_0x44cce0[0x0]),await _0x61ee47(_0x44cce0[0x0],_0x44cce0[0x1],'lru'),_0x1d6e90({'key':_0x44cce0[0x0],'reason':_0x54a94d(0x1de),'type':'evicted'});}}async function _0x3f40b0(){const _0x19da32=_0x40dea6;let _0x41c426=l(),_0x47f093=[..._0x39af86[_0x19da32(0x1f3)]()];for(let [,_0x50351c]of _0x47f093)s(_0x50351c[_0x19da32(0x1f2)],_0x41c426);for(let _0x476cb6 of _0x1a28c1[_0x19da32(0x1bc)]())s(_0x476cb6,_0x41c426);_0x39af86[_0x19da32(0x1fc)]();let _0x3a08d3=(await Promise[_0x19da32(0x1e3)]([..._0x47f093[_0x19da32(0x1d4)](async([_0x49f901,_0x257de2])=>await _0x61ee47(_0x49f901,_0x257de2)),..._0x1fe5aa]))[_0x19da32(0x1e2)](_0x25043c=>_0x25043c[_0x19da32(0x1c2)]===_0x19da32(0x1bd));if(_0x3a08d3?.['status']===_0x19da32(0x1bd))throw _0x3a08d3[_0x19da32(0x1c7)];}function _0x1d6e90(_0xc20959){const _0x23effe=_0x40dea6;try{_0x3555b9[_0x23effe(0x1db)]?.(_0xc20959);}catch{}}function _0x59fd2e(){if(_0x12a2f2)throw l();}function _0x576ae2(_0x5e100a){const _0x18beb5=_0x40dea6;for(let _0x2954b5 of _0x5e100a)_0x2b5b33[_0x18beb5(0x1d2)](_0x2954b5[_0x18beb5(0x1fe)])[_0x18beb5(0x1cf)](_0x2954b5['resolve'],_0x2954b5[_0x18beb5(0x1b8)]);}async function _0x61ee47(_0x1e1c4e,_0x357b14,_0x2e8522){const _0x1a2fc0=_0x40dea6;_0x357b14[_0x1a2fc0(0x1c0)]||(_0x357b14['closed']=!0x0,c(_0x357b14),_0x2e8522&&_0x1d6e90({'key':_0x1e1c4e,'reason':_0x2e8522,'type':_0x1a2fc0(0x1ea)}),await _0x3555b9[_0x1a2fc0(0x1e0)][_0x1a2fc0(0x1e6)]({'instance':_0x357b14[_0x1a2fc0(0x1c1)],'key':_0x1e1c4e}));}}function i(_0x1b9d53,_0x5c1880){const _0x4dbe6f=_0x318c07;if(!Number[_0x4dbe6f(0x1cd)](_0x1b9d53)||_0x1b9d53<0x0)throw new e(_0x4dbe6f(0x1dc),_0x4dbe6f(0x1d3));if(!Number[_0x4dbe6f(0x1d9)](_0x5c1880)||_0x5c1880<=0x0)throw new e(_0x4dbe6f(0x1dc),_0x4dbe6f(0x1da));}function a(_0x147112){const _0xb01be=_0x318c07;if(_0x147112[_0xb01be(0x1df)][_0xb01be(0x1fb)]===0x0)throw new e('INSTANCE_POOL_INVALID_INPUT',_0xb01be(0x1f1));}function o(_0x3bc511,_0x27fc67){return new Promise((_0x26f8af,_0x2862d9)=>{const _0x53299c=_0x9134;_0x27fc67[_0x53299c(0x1e5)]({'input':_0x3bc511,'reject':_0x2862d9,'resolve':_0x26f8af});});}function s(_0x75cfb3,_0x15e5bc){const _0xa80a3b=_0x318c07;for(let _0x39b337 of _0x75cfb3[_0xa80a3b(0x1f9)](0x0))_0x39b337[_0xa80a3b(0x1b8)](_0x15e5bc);}function c(_0x53968f){const _0x4e1cc8=_0x318c07;_0x53968f['idleTimer']!==void 0x0&&(clearTimeout(_0x53968f['idleTimer']),delete _0x53968f[_0x4e1cc8(0x1ec)]);}function l(){const _0x6d6adf=_0x318c07;return new e(_0x6d6adf(0x1ee),_0x6d6adf(0x1c3));}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.2",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",