@univer-cli/resource-library 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
- const _0x1987b4=_0x8792;(function(_0x390b18,_0x509e4d){const _0x415cda=_0x8792,_0x4c1945=_0x390b18();while(!![]){try{const _0x529934=parseInt(_0x415cda(0x156))/0x1+parseInt(_0x415cda(0x1d4))/0x2+-parseInt(_0x415cda(0x1c7))/0x3*(-parseInt(_0x415cda(0x140))/0x4)+parseInt(_0x415cda(0x1ae))/0x5*(parseInt(_0x415cda(0x176))/0x6)+-parseInt(_0x415cda(0x1d6))/0x7+parseInt(_0x415cda(0x19f))/0x8*(parseInt(_0x415cda(0x16d))/0x9)+parseInt(_0x415cda(0x1a0))/0xa*(-parseInt(_0x415cda(0x1d9))/0xb);if(_0x529934===_0x509e4d)break;else _0x4c1945['push'](_0x4c1945['shift']());}catch(_0xfea372){_0x4c1945['push'](_0x4c1945['shift']());}}}(_0x4647,0x6e649));import{randomUUID as _0x13f68d}from'node:crypto';import{mkdir as _0x13b129,readFile as _0x23b84d,readdir as _0x2a572b,rename as _0x202301,rm as _0x12636a,stat as _0x55e9ef,unlink as _0x256e70,writeFile as _0x309679}from'node:fs/promises';import{dirname as _0xb78523,isAbsolute as _0x5b3c5f,join as _0x4e56ee,parse as _0x3b9698,resolve as _0x17a86b}from'node:path';import{readFileSync as _0x1b185f}from'node:fs';var h=class extends Error{[_0x1987b4(0x160)];[_0x1987b4(0x178)];constructor(_0x41d980,_0x16fde1,_0x346601,_0x45b6f0){const _0x37f39d=_0x1987b4;super(_0x16fde1,_0x45b6f0),this[_0x37f39d(0x160)]=_0x41d980,this[_0x37f39d(0x178)]=_0x346601,this['name']=_0x37f39d(0x1ca);}};function g(_0x5c7533){return _0x5c7533 instanceof h;}var _=/^[A-Za-z0-9._-]+$/u,v=0xff,y=0x4;function b(_0x2b7880){const _0x504969=_0x1987b4;return _[_0x504969(0x1bc)](_0x2b7880)&&_0x2b7880!=='.'&&_0x2b7880!=='..';}function x(_0x21fc65){const _0x219a2d=_0x1987b4;if(!b(_0x21fc65)||_0x21fc65['startsWith']('-')||_0x21fc65[_0x219a2d(0x1d5)]('--')||_0x21fc65[_0x219a2d(0x1bf)]>v)throw new h(_0x219a2d(0x180),_0x219a2d(0x14e)+_0x21fc65+_0x219a2d(0x136));}function S(_0x4222e7){const _0x4b3c05=_0x1987b4;if(!b(_0x4222e7)||_0x4222e7[_0x4b3c05(0x1bf)]+y>v)throw new h('resource-invalid-resource-id',_0x4b3c05(0x175)+_0x4222e7+_0x4b3c05(0x129));}function C(_0xbd1089){const _0x5a6a35=_0x1987b4;let _0x2dd15b=_0xbd1089['split']('/');if(_0x2dd15b['length']!==0x2||_0x2dd15b[0x0]===''||_0x2dd15b[0x1]==='')throw new h(_0x5a6a35(0x154),_0x5a6a35(0x120)+_0xbd1089+_0x5a6a35(0x19e),_0xbd1089);let _0x2c9353=_0x2dd15b[0x0],_0xce6673=_0x2dd15b[0x1];return x(_0x2c9353),S(_0xce6673),{'registryId':_0x2c9353,'resourceId':_0xce6673};}function ee(_0x3c72c7,_0x5eddf5){return x(_0x3c72c7),S(_0x5eddf5),_0x3c72c7+'/'+_0x5eddf5;}function w(_0x4d1a4b){const _0x2235a4=_0x1987b4;let {registryId:_0x44b4f2,resourceId:_0x19f43d}=C(_0x4d1a4b),_0x1043f4=_0x44b4f2+'--'+_0x19f43d+_0x2235a4(0x17e);if(_0x1043f4[_0x2235a4(0x1bf)]>v)throw new h(_0x2235a4(0x1bb),_0x2235a4(0x131)+v+_0x2235a4(0x12c),_0x4d1a4b);return _0x1043f4;}function T(_0x24c598){const _0x49fe2e=_0x1987b4;return new h(_0x49fe2e(0x17f),'Invalid\x20resource\x20manifest:\x20'+_0x24c598);}function E(_0x524b05,_0x5b47c0){const _0x1a415d=_0x1987b4;if(typeof _0x524b05!=_0x1a415d(0x1cc)||!_0x524b05||Array['isArray'](_0x524b05))throw T(_0x5b47c0+'\x20must\x20be\x20an\x20object.');return _0x524b05;}function D(_0x4e732d,_0x1ad8d4,_0x41a34d=!0x1){const _0x593b7=_0x1987b4;if(_0x41a34d&&_0x4e732d===void 0x0)return[];if(!Array[_0x593b7(0x198)](_0x4e732d))throw T(_0x1ad8d4+_0x593b7(0x174));return _0x4e732d;}function O(_0x5d18ac,_0x250146){const _0x18554a=_0x1987b4;if(typeof _0x5d18ac!='string'||_0x5d18ac==='')throw T(_0x250146+_0x18554a(0x157));return _0x5d18ac;}function k(_0x5bb176,_0x5993df,_0x38d18d=!0x1){return D(_0x5bb176,_0x5993df,_0x38d18d)['map']((_0x405e1b,_0x5a0fdb)=>O(_0x405e1b,_0x5993df+'['+_0x5a0fdb+']'));}function A(_0x26e95b,_0x406d7a){const _0x32ee2f=_0x1987b4;return D(_0x26e95b,_0x406d7a,!0x0)[_0x32ee2f(0x15b)]((_0x2fe1ea,_0x332298)=>{if(typeof _0x2fe1ea!='string')throw T(_0x406d7a+'['+_0x332298+']\x20must\x20be\x20a\x20string.');return _0x2fe1ea;})[_0x32ee2f(0x1b8)](_0x4f8c33=>_0x4f8c33!=='');}function j(_0x3f5b3c,_0xf0983c){const _0x13c944=_0x1987b4;if(typeof _0x3f5b3c!='number'||!Number['isFinite'](_0x3f5b3c))throw T(_0xf0983c+_0x13c944(0x197));return _0x3f5b3c;}function M(_0x2a6962,_0x38cab0){const _0x3ba3a5=_0x1987b4;if(typeof _0x2a6962!=_0x3ba3a5(0x1c3))throw T(_0x38cab0+_0x3ba3a5(0x1b3));return _0x2a6962;}function N(_0x30af7f,_0x190562,_0xfef78b){const _0x389b73=_0x1987b4;if(typeof _0x30af7f==_0x389b73(0x15a)&&_0x30af7f!=='')return _0x30af7f;let _0x2419eb=E(_0x30af7f,_0x190562),_0x3b372f=_0xfef78b===void 0x0?void 0x0:_0x2419eb[_0xfef78b];if(typeof _0x3b372f==_0x389b73(0x15a)&&_0x3b372f!=='')return _0x3b372f;let _0x4c8e68=_0x2419eb[_0x389b73(0x186)];if(typeof _0x4c8e68==_0x389b73(0x15a)&&_0x4c8e68!=='')return _0x4c8e68;let _0x5d5a96=Object[_0x389b73(0x182)](_0x2419eb)[_0x389b73(0x1dc)](_0x16c9fd=>typeof _0x16c9fd==_0x389b73(0x15a)&&_0x16c9fd!=='');if(_0x5d5a96!==void 0x0)return _0x5d5a96;throw T(_0x190562+'\x20contains\x20no\x20usable\x20localized\x20text.');}function _0x8792(_0x294e1b,_0x354913){_0x294e1b=_0x294e1b-0x11e;const _0x4647a6=_0x4647();let _0x879282=_0x4647a6[_0x294e1b];return _0x879282;}function P(_0x46040a,_0x401b0f,_0x3e6731){const _0x38e403=_0x1987b4;try{_0x3e6731==='registry'?x(_0x46040a):S(_0x46040a);}catch(_0x5e1dfb){throw T(_0x401b0f+':\x20'+(_0x5e1dfb instanceof Error?_0x5e1dfb[_0x38e403(0x16a)]:String(_0x5e1dfb)));}}function F(_0xb72fe3,_0x30d959,_0x33bd88){const _0x2ebc62=_0x1987b4;let _0x218c3b=new Map();for(let [_0xc9d8c9,_0x54d659]of D(_0xb72fe3,_0x30d959,!0x0)[_0x2ebc62(0x14d)]()){let _0x1524b7=E(_0x54d659,_0x30d959+'['+_0xc9d8c9+']'),_0x4ed6c4=O(_0x1524b7['id'],_0x30d959+'['+_0xc9d8c9+'].id');if(P(_0x4ed6c4,_0x30d959+'['+_0xc9d8c9+_0x2ebc62(0x194),_0x2ebc62(0x1cf)),_0x218c3b['has'](_0x4ed6c4))throw T(_0x2ebc62(0x171)+_0x30d959+_0x2ebc62(0x191)+_0x4ed6c4+'\x22.');_0x218c3b[_0x2ebc62(0x121)](_0x4ed6c4,N(_0x1524b7[_0x2ebc62(0x1e0)],_0x30d959+'['+_0xc9d8c9+_0x2ebc62(0x126),_0x33bd88));}return _0x218c3b;}function I(_0x263031,_0x49d3c5){const _0x4c05b7=_0x1987b4;let _0x1917a3=E(_0x263031[_0x4c05b7(0x1d8)],_0x49d3c5+'.intrinsicSize'),_0x3d21c4=j(_0x1917a3[_0x4c05b7(0x185)],_0x49d3c5+_0x4c05b7(0x164)),_0x450969=j(_0x1917a3[_0x4c05b7(0x150)],_0x49d3c5+_0x4c05b7(0x139));if(_0x3d21c4<=0x0||_0x450969<=0x0)throw T(_0x49d3c5+'.intrinsicSize\x20must\x20be\x20positive.');return{'width':_0x3d21c4,'height':_0x450969};}function L(_0x53ad90,_0x3de3b9){const _0x5df92f=_0x1987b4;if(_0x53ad90[_0x5df92f(0x190)]!==_0x5df92f(0x1cb))throw T(_0x3de3b9+_0x5df92f(0x17c));if(_0x53ad90[_0x5df92f(0x128)]!=='reference')throw T(_0x3de3b9+_0x5df92f(0x1bd));let _0x1e7e3b=E(_0x53ad90[_0x5df92f(0x1a9)],_0x3de3b9+_0x5df92f(0x123));if(_0x1e7e3b['type']!=='url')throw T(_0x3de3b9+'.source.type\x20must\x20be\x20\x22url\x22.');let _0x5ac088=O(_0x1e7e3b['value'],_0x3de3b9+'.source.value'),_0x196cb9;try{_0x196cb9=new URL(_0x5ac088);}catch{throw T(_0x3de3b9+_0x5df92f(0x144));}if(_0x196cb9[_0x5df92f(0x158)]!==_0x5df92f(0x147))throw T(_0x3de3b9+_0x5df92f(0x18a));return _0x5ac088;}function R(_0x188b06){const _0x469c8a=_0x1987b4;return _0x188b06[_0x469c8a(0x17b)](_0x469c8a(0x18f))[_0x469c8a(0x127)]()['trim']()[_0x469c8a(0x12a)](/\s+/gu,'\x20');}function z(_0x324d30){const _0xca312a=_0x1987b4;let _0x26a28b=E(_0x324d30,'manifest'),_0xf5cf0=new Map(),_0x22548a=new Map(),_0x367089=[],_0x3c60cc=[],_0x28781e=new Set(),_0xbbc1d1=0x0;for(let [_0x28c8af,_0x18c420]of D(_0x26a28b[_0xca312a(0x124)],'manifest.registrations')[_0xca312a(0x14d)]()){let _0x5e748f=E(E(_0x18c420,_0xca312a(0x179)+_0x28c8af+']')[_0xca312a(0x1e3)],'registrations['+_0x28c8af+_0xca312a(0x1a8)),_0xebc9af=O(_0x5e748f[_0xca312a(0x15f)],_0xca312a(0x179)+_0x28c8af+'].input.registryId');if(P(_0xebc9af,_0xca312a(0x179)+_0x28c8af+_0xca312a(0x1ab),'registry'),_0xf5cf0['has'](_0xebc9af))throw T(_0xca312a(0x1d2)+_0xebc9af+'\x22.');let _0xbba36b=_0x5e748f[_0xca312a(0x1dd)]===void 0x0?void 0x0:O(_0x5e748f[_0xca312a(0x1dd)],'registrations['+_0x28c8af+_0xca312a(0x1c6)),_0x3c697a=F(_0x5e748f['groups'],'registrations['+_0x28c8af+_0xca312a(0x1c4),_0xbba36b),_0x48fa39=F(_0x5e748f[_0xca312a(0x1d1)],_0xca312a(0x179)+_0x28c8af+_0xca312a(0x169),_0xbba36b),_0x1629bc=[];for(let [_0x2e360f,_0x484db6]of D(_0x5e748f[_0xca312a(0x13a)],_0xca312a(0x179)+_0x28c8af+_0xca312a(0x155))['entries']()){let _0x1c1c2c=_0xca312a(0x179)+_0x28c8af+_0xca312a(0x16e)+_0x2e360f+']',_0x28faf5=E(_0x484db6,_0x1c1c2c),_0x1f12a9=O(_0x28faf5['id'],_0x1c1c2c+_0xca312a(0x1b1));P(_0x1f12a9,_0x1c1c2c+_0xca312a(0x1b1),'resource');let _0x59a406=ee(_0xebc9af,_0x1f12a9);if(_0x22548a[_0xca312a(0x1b5)](_0x59a406))throw T(_0xca312a(0x1c0)+_0x59a406+'\x22.');let _0x371a92;try{_0x371a92=w(_0x59a406);}catch(_0x1c7eea){throw T(_0x1c1c2c+':\x20'+(_0x1c7eea instanceof Error?_0x1c7eea[_0xca312a(0x16a)]:String(_0x1c7eea)));}if(_0x28781e[_0xca312a(0x1b5)](_0x371a92))throw T(_0xca312a(0x1e1)+_0x371a92+'\x22.');_0x28781e[_0xca312a(0x1b6)](_0x371a92);let _0x139f16=_0x28faf5[_0xca312a(0x18b)]===void 0x0?void 0x0:O(_0x28faf5['groupId'],_0x1c1c2c+_0xca312a(0x167));if(_0x139f16!==void 0x0&&!_0x3c697a[_0xca312a(0x1b5)](_0x139f16))throw T(_0x1c1c2c+'.groupId\x20references\x20unknown\x20group\x20\x22'+_0x139f16+'\x22.');let _0x1a0dfa=k(_0x28faf5['tagIds'],_0x1c1c2c+_0xca312a(0x1be),!0x0);for(let _0x1d6dc3 of _0x1a0dfa)if(!_0x48fa39['has'](_0x1d6dc3))throw T(_0x1c1c2c+_0xca312a(0x13f)+_0x1d6dc3+'\x22.');let _0x18f879=A(_0x28faf5[_0xca312a(0x16c)],_0x1c1c2c+'.keywords'),_0x3be77c=N(_0x28faf5['name'],_0x1c1c2c+_0xca312a(0x1d3),_0xbba36b),_0x10964d=_0x28faf5[_0xca312a(0x199)]===void 0x0?void 0x0:N(_0x28faf5[_0xca312a(0x199)],_0x1c1c2c+'.description',_0xbba36b),_0x4e09f9=_0x139f16===void 0x0?null:{'id':_0x139f16,'label':_0x3c697a[_0xca312a(0x132)](_0x139f16)},_0x1e439d=_0x1a0dfa['map'](_0x4cc493=>({'id':_0x4cc493,'label':_0x48fa39['get'](_0x4cc493)})),_0x281500=E(_0x28faf5[_0xca312a(0x1db)],_0x1c1c2c+'.payload'),_0x400b92=_0x28faf5[_0xca312a(0x1a3)]===void 0x0?null:j(_0x28faf5[_0xca312a(0x1a3)],_0x1c1c2c+_0xca312a(0x13c)),_0x3088f4=M(_0x281500[_0xca312a(0x1a1)],_0x1c1c2c+_0xca312a(0x170)),_0x3f7f33={'handle':_0x59a406,'registryId':_0xebc9af,'id':_0x1f12a9,'name':_0x3be77c,..._0x10964d===void 0x0?{}:{'description':_0x10964d},'group':_0x4e09f9,'tags':_0x1e439d,'keywords':_0x18f879,'order':_0x400b92,'intrinsicSize':I(_0x281500,_0x1c1c2c+'.payload'),'colorEditable':_0x3088f4,'sourceUrl':L(_0x281500,_0x1c1c2c+_0xca312a(0x146)),'registrationIndex':_0x28c8af,'resourceIndex':_0x2e360f,'globalIndex':_0xbbc1d1,'searchText':R([_0x3be77c,_0x10964d,_0x4e09f9?.[_0xca312a(0x1e0)],..._0x1e439d[_0xca312a(0x15b)](_0x48cf10=>_0x48cf10[_0xca312a(0x1e0)]),..._0x18f879][_0xca312a(0x1b8)](_0x372495=>_0x372495!==void 0x0)['join']('\x20'))};_0xbbc1d1++,_0x1629bc[_0xca312a(0x1b4)](_0x3f7f33),_0x3c60cc[_0xca312a(0x1b4)](_0x3f7f33),_0x22548a[_0xca312a(0x121)](_0x59a406,_0x3f7f33);}let _0xd87f6c={'id':_0xebc9af,'groups':_0x3c697a,'tags':_0x48fa39,'resources':_0x1629bc};_0x367089['push'](_0xd87f6c),_0xf5cf0['set'](_0xebc9af,_0xd87f6c);}if(_0x367089[_0xca312a(0x1bf)]===0x0)throw T(_0xca312a(0x1a4));return{'registries':_0x367089,'registryById':_0xf5cf0,'resourceByHandle':_0x22548a,'resources':_0x3c60cc};}function B(_0x40ddfc,_0x143261){const _0x41bc10=_0x1987b4;C(_0x143261);let _0x47826e=_0x40ddfc[_0x41bc10(0x1af)]['get'](_0x143261);if(_0x47826e===void 0x0)throw new h(_0x41bc10(0x1a5),_0x41bc10(0x17a)+_0x143261+'\x22;\x20try\x20resources\x20find\x20<query>.',_0x143261);return _0x47826e;}function te(_0x5c6371){const _0x327dd3=_0x1987b4;return _0x5c6371[_0x327dd3(0x1ac)][_0x327dd3(0x15b)](_0x3e1641=>({'id':_0x3e1641['id'],'resourceCount':_0x3e1641[_0x327dd3(0x13a)][_0x327dd3(0x1bf)],'groupCount':_0x3e1641[_0x327dd3(0x173)][_0x327dd3(0x162)],'tagCount':_0x3e1641['tags'][_0x327dd3(0x162)],'colorEditableCount':_0x3e1641[_0x327dd3(0x13a)]['filter'](_0x1955b7=>_0x1955b7['colorEditable'])[_0x327dd3(0x1bf)]}));}function ne(_0x2a5edf){const _0x597a6e=_0x1987b4;return{'handle':_0x2a5edf[_0x597a6e(0x178)],'registryId':_0x2a5edf['registryId'],'id':_0x2a5edf['id'],'name':_0x2a5edf[_0x597a6e(0x135)],'group':_0x2a5edf['group'],'tags':_0x2a5edf[_0x597a6e(0x1d1)],'keywords':_0x2a5edf['keywords'],'order':_0x2a5edf[_0x597a6e(0x1a3)],'intrinsicSize':_0x2a5edf[_0x597a6e(0x1d8)],'colorEditable':_0x2a5edf['colorEditable']};}function re(_0x5c60eb,_0x266dc8){const _0x4ce186=_0x1987b4;let _0x1db71f=(_0x5c60eb[_0x4ce186(0x1a3)]??_0x5c60eb[_0x4ce186(0x15d)])-(_0x266dc8[_0x4ce186(0x1a3)]??_0x266dc8['globalIndex']);if(_0x1db71f!==0x0)return _0x1db71f;let _0x10e3f3=_0x5c60eb[_0x4ce186(0x1df)]-_0x266dc8[_0x4ce186(0x1df)];if(_0x10e3f3!==0x0)return _0x10e3f3;let _0x5bf9b0=_0x5c60eb[_0x4ce186(0x149)]-_0x266dc8[_0x4ce186(0x149)];return _0x5bf9b0===0x0?_0x5c60eb[_0x4ce186(0x178)]['localeCompare'](_0x266dc8['handle']):_0x5bf9b0;}function ie(_0x26fe82,_0x140929){const _0x37e2a2=_0x1987b4;let _0x41ca17=_0x140929[_0x37e2a2(0x161)][_0x37e2a2(0x15b)](R)[_0x37e2a2(0x1b8)](_0x885606=>_0x885606!=='');if(_0x41ca17[_0x37e2a2(0x1bf)]===0x0)throw new h(_0x37e2a2(0x1c9),_0x37e2a2(0x19b));let _0x21b583=new Set(_0x140929[_0x37e2a2(0x1ac)]??[]);for(let _0x40bb5b of _0x21b583)if(!_0x26fe82[_0x37e2a2(0x143)][_0x37e2a2(0x1b5)](_0x40bb5b))throw new h(_0x37e2a2(0x16b),_0x37e2a2(0x138)+_0x40bb5b+'\x22.');let _0x396a92=_0x140929[_0x37e2a2(0x1b2)]??_0x26fe82[_0x37e2a2(0x13a)][_0x37e2a2(0x1bf)];if(!Number[_0x37e2a2(0x19a)](_0x396a92)||_0x396a92<0x1)throw new h(_0x37e2a2(0x137),_0x37e2a2(0x19c)+_0x396a92+'\x22.');let _0x1a1dcf=_0x26fe82[_0x37e2a2(0x13a)][_0x37e2a2(0x1b8)](_0x4d4a58=>_0x21b583[_0x37e2a2(0x162)]===0x0||_0x21b583[_0x37e2a2(0x1b5)](_0x4d4a58[_0x37e2a2(0x15f)]))[_0x37e2a2(0x1b8)](_0x5d9b27=>_0x41ca17['some'](_0x36c13e=>_0x5d9b27['searchText'][_0x37e2a2(0x1d5)](_0x36c13e)))['sort'](re);return{'resources':_0x1a1dcf[_0x37e2a2(0x1d7)](0x0,_0x396a92)['map'](ne),'total':_0x1a1dcf['length']};}function V(_0x4b0549){const _0x1d9230=_0x1987b4;return/^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[^]*?-->\s*)*<svg(?:\s|>)/iu[_0x1d9230(0x1bc)](_0x4b0549);}function H(_0x32430d,_0x117253){const _0x1c4974=_0x1987b4;return g(_0x117253)?{'handle':_0x32430d,'code':_0x117253[_0x1c4974(0x160)],'message':_0x117253[_0x1c4974(0x16a)]}:{'handle':_0x32430d,'code':'resource-export-failed','message':_0x117253 instanceof Error?_0x117253[_0x1c4974(0x16a)]:String(_0x117253)};}var U=class{['options'];[_0x1987b4(0x1b9)];constructor(_0xe86320){const _0x71f152=_0x1987b4;this[_0x71f152(0x1aa)]=_0xe86320,this['catalog']=z(_0xe86320[_0x71f152(0x181)]);}get[_0x1987b4(0x12e)](){const _0x1f556a=_0x1987b4;return this[_0x1f556a(0x1aa)]['cache'][_0x1f556a(0x195)];}[_0x1987b4(0x1ce)](){const _0x1bb149=_0x1987b4;return te(this[_0x1bb149(0x1b9)]);}[_0x1987b4(0x1dc)](_0x103dce){return ie(this['catalog'],_0x103dce);}async[_0x1987b4(0x12b)](_0x570e37){const _0x4cfee3=_0x1987b4;let _0x2c6fcb=B(this[_0x4cfee3(0x1b9)],_0x570e37[_0x4cfee3(0x178)]),_0xf8d8f6=await this[_0x4cfee3(0x1aa)]['cache'][_0x4cfee3(0x12b)](_0x570e37['handle']);if(_0xf8d8f6!==void 0x0&&V(_0xf8d8f6))return{'handle':_0x570e37[_0x4cfee3(0x178)],'svg':_0xf8d8f6};let _0x3be789;try{_0x3be789=await this[_0x4cfee3(0x1aa)][_0x4cfee3(0x1c1)][_0x4cfee3(0x13d)](_0x2c6fcb['sourceUrl']);}catch(_0x4244dc){throw g(_0x4244dc)?_0x4244dc:new h(_0x4cfee3(0x14a),_0x4cfee3(0x16f)+_0x570e37['handle']+_0x4cfee3(0x192)+(_0x4244dc instanceof Error?_0x4244dc[_0x4cfee3(0x16a)]:String(_0x4244dc)),_0x570e37[_0x4cfee3(0x178)],{'cause':_0x4244dc});}if(!V(_0x3be789))throw new h('resource-invalid-svg','Downloaded\x20resource\x20\x22'+_0x570e37[_0x4cfee3(0x178)]+'\x22\x20is\x20not\x20an\x20SVG\x20document.',_0x570e37['handle']);return await this[_0x4cfee3(0x1aa)][_0x4cfee3(0x1da)][_0x4cfee3(0x1b0)](_0x570e37[_0x4cfee3(0x178)],_0x3be789),{'handle':_0x570e37['handle'],'svg':_0x3be789};}async['export'](_0x535a4b){const _0x2da59e=_0x1987b4;let _0x5b1611=[],_0xf858b0=[];for(let _0x1d9368 of _0x535a4b['handles'])try{let {svg:_0x22c591}=await this[_0x2da59e(0x12b)]({'handle':_0x1d9368}),_0x4fa4e6=await this[_0x2da59e(0x1aa)][_0x2da59e(0x13b)][_0x2da59e(0x1b0)](_0x535a4b['destination'],w(_0x1d9368),_0x22c591);_0x5b1611[_0x2da59e(0x1b4)]({'handle':_0x1d9368,'path':_0x4fa4e6});}catch(_0x82820b){_0xf858b0[_0x2da59e(0x1b4)](H(_0x1d9368,_0x82820b));}return{'exported':_0x5b1611,'failed':_0xf858b0};}async[_0x1987b4(0x15e)](){const _0x5f38d7=_0x1987b4;return await this[_0x5f38d7(0x1aa)][_0x5f38d7(0x1da)][_0x5f38d7(0x148)]();}};function W(_0x26e2a6){return new U(_0x26e2a6);}function G(_0x18bc78){const _0x2c7d38=_0x1987b4;return _0x18bc78 instanceof Error&&_0x2c7d38(0x160)in _0x18bc78;}function K(_0x577b27){const _0x43a342=_0x1987b4;let _0x263530=_0x17a86b(_0x577b27);if(!_0x5b3c5f(_0x577b27)||_0x263530===_0x3b9698(_0x263530)[_0x43a342(0x196)])throw new h(_0x43a342(0x177),_0x43a342(0x1de)+_0x577b27+'\x22.');return _0x263530;}async function q(_0x32e8d5){const _0x284a2f=_0x1987b4;let _0x177252;try{_0x177252=await _0x2a572b(_0x32e8d5,{'withFileTypes':!0x0});}catch(_0x2d9277){if(G(_0x2d9277)&&_0x2d9277[_0x284a2f(0x160)]==='ENOENT')return{'resourceCount':0x0,'byteCount':0x0};throw _0x2d9277;}let _0x4c2101=0x0,_0x371397=0x0;for(let _0x458b87 of _0x177252){let _0x1f3476=_0x4e56ee(_0x32e8d5,_0x458b87[_0x284a2f(0x135)]);if(_0x458b87['isDirectory']()){let _0x2f37e1=await q(_0x1f3476);_0x4c2101+=_0x2f37e1[_0x284a2f(0x189)],_0x371397+=_0x2f37e1['byteCount'];}else{if(_0x458b87['isFile']()&&_0x458b87[_0x284a2f(0x135)][_0x284a2f(0x13e)](_0x284a2f(0x17e))){let _0x4d53b6=await _0x55e9ef(_0x1f3476);_0x4c2101++,_0x371397+=_0x4d53b6[_0x284a2f(0x162)];}}}return{'resourceCount':_0x4c2101,'byteCount':_0x371397};}function _0x4647(){const _0x444c79=['values','Resource\x20response\x20is\x20not\x20an\x20SVG\x20document.','Resource\x20URL\x20must\x20use\x20HTTPS.','width','en-US','resource-download-too-many-redirects','maxRedirects','resourceCount','.source.value\x20must\x20use\x20HTTPS.','groupId','releaseLock','byteLength','manifestPath','NFKC','type','\x20ID\x20\x22','\x22:\x20','parse','].id','location','root','\x20must\x20be\x20a\x20finite\x20number.','isArray','description','isInteger','Resource\x20search\x20needs\x20at\x20least\x20one\x20non-empty\x20query.','Resource\x20search\x20limit\x20must\x20be\x20a\x20positive\x20integer;\x20received\x20\x22','Resource\x20request\x20followed\x20too\x20many\x20redirects;\x20maximum\x20','\x22;\x20expected\x20<registryId>/<resourceId>.','185760UtjhWM','213790gLKMHR','colorEditable','aborted','order','registrations\x20must\x20not\x20be\x20empty.','resource-not-found','utf-8','done','].input','source','options','].input.registryId','registries','timeoutMs','47005ePWzNG','resourceByHandle','write','.id','limit','\x20must\x20be\x20a\x20boolean.','push','has','add','cacheRoot','filter','catalog','\x20without\x20a\x20Location\x20header.','resource-export-filename-too-long','test','.storagePolicy\x20must\x20be\x20\x22reference\x22.','.tagIds','length','Duplicate\x20resource\x20handle\x20\x22','downloader','path','boolean','].input.groups','Resource\x20server\x20returned\x20HTTP\x20','].input.defaultLocale','4953lnyXxV','catch','resource-query-empty','ResourceLibraryError','image','object','resource-download-insecure-redirect','listRegistries','resource','fetchImpl','tags','Duplicate\x20registry\x20ID\x20\x22','.name','709676mGHOhE','includes','3210424CtlmPl','slice','intrinsicSize','649pZvhaq','cache','payload','find','defaultLocale','Resource\x20cache\x20root\x20must\x20be\x20an\x20absolute,\x20dedicated\x20directory\x20below\x20the\x20filesystem\x20root;\x20received\x20\x22','registrationIndex','label','Duplicate\x20export\x20filename\x20\x22','signal','input','maxBytes','value','Invalid\x20resource\x20handle\x20\x22','set','manual','.source','registrations','resource-download-insecure','].label','toLowerCase','storagePolicy','\x22:\x20expected\x20filesystem-safe\x20characters.','replace','read','\x20bytes.','body','cacheLocation','resource-download-invalid-redirect','concat','Resource\x20export\x20filename\x20exceeds\x20','get','Resource\x20response\x20is\x20not\x20valid\x20UTF-8.','status','name','\x22:\x20expected\x20an\x20addressable\x20filesystem-safe\x20component\x20without\x20\x22--\x22.','resource-limit-invalid','Unknown\x20resource\x20registry\x20\x22','.intrinsicSize.height','resources','output','.order','download','endsWith','.tagIds\x20references\x20unknown\x20tag\x20\x22','732UDZELA','cancel','pid','registryById','.source.value\x20must\x20be\x20a\x20URL.','getReader','.payload','https:','clear','resourceIndex','resource-download-failed','resource-download-too-large','resource-download-invalid-utf8','entries','Invalid\x20registry\x20ID\x20\x22','resource-download-timeout','height','utf8','Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.','url','resource-invalid-handle','].input.resources','613825aJFKvD','\x20must\x20be\x20a\x20non-empty\x20string.','protocol','decode','string','map','.resource-','globalIndex','clearCache','registryId','code','queries','size','resource-download-http','.intrinsicSize.width','text','\x20ms.','.groupId','content-length','].input.tags','message','resource-registry-not-found','keywords','36ChoAhh','].input.resources[','Failed\x20to\x20download\x20\x22','.payload.colorEditable','Duplicate\x20','Resource\x20server\x20returned\x20an\x20invalid\x20redirect\x20URL.','groups','\x20must\x20be\x20an\x20array.','Invalid\x20resource\x20ID\x20\x22','516ovVbRR','resource-cache-root-invalid','handle','registrations[','Unknown\x20resource\x20\x22','normalize','.type\x20must\x20be\x20\x22image\x22.','isFinite','.svg','resource-manifest-invalid','resource-invalid-registry-id','manifest'];_0x4647=function(){return _0x444c79;};return _0x4647();}var J=class{[_0x1987b4(0x195)];constructor(_0x163a7){const _0x56070a=_0x1987b4;this[_0x56070a(0x195)]=K(_0x163a7);}[_0x1987b4(0x1c2)](_0x3ae75f){const _0x5d2257=_0x1987b4;let {registryId:_0xdde485,resourceId:_0x4d8483}=C(_0x3ae75f);return _0x4e56ee(this[_0x5d2257(0x195)],_0xdde485,_0x4d8483+_0x5d2257(0x17e));}async[_0x1987b4(0x12b)](_0x549ef7){const _0x27747e=_0x1987b4;try{return await _0x23b84d(this[_0x27747e(0x1c2)](_0x549ef7),_0x27747e(0x151));}catch(_0x4cbb72){if(G(_0x4cbb72)&&_0x4cbb72[_0x27747e(0x160)]==='ENOENT')return;throw _0x4cbb72;}}async[_0x1987b4(0x1b0)](_0x4ddfc8,_0x2201f8){const _0xe862f6=_0x1987b4;let _0x258c61=this[_0xe862f6(0x1c2)](_0x4ddfc8);await _0x13b129(_0xb78523(_0x258c61),{'recursive':!0x0});let _0x5da5ed=_0x4e56ee(_0xb78523(_0x258c61),_0xe862f6(0x15c)+process[_0xe862f6(0x142)]+'-'+_0x13f68d()+'.tmp');try{await _0x309679(_0x5da5ed,_0x2201f8,{'encoding':_0xe862f6(0x151),'mode':0x180}),await _0x202301(_0x5da5ed,_0x258c61);}catch(_0x5e0f06){throw await _0x256e70(_0x5da5ed)[_0xe862f6(0x1c8)](()=>void 0x0),_0x5e0f06;}}async[_0x1987b4(0x148)](){const _0x5b470f=_0x1987b4;let _0x31f5c1=await q(this[_0x5b470f(0x195)]);return await _0x12636a(this[_0x5b470f(0x195)],{'force':!0x0,'recursive':!0x0}),{'path':this[_0x5b470f(0x195)],..._0x31f5c1};}},Y=class{async[_0x1987b4(0x1b0)](_0x4d37f0,_0x238284,_0x58e87b){const _0x481bd5=_0x1987b4;await _0x13b129(_0x4d37f0,{'recursive':!0x0});let _0x12f7f7=_0x4e56ee(_0x4d37f0,_0x238284);return await _0x309679(_0x12f7f7,_0x58e87b,_0x481bd5(0x151)),_0x12f7f7;}},X=0x7530,ae=0xa00000,oe=0xa,se=new Set([0x12d,0x12e,0x12f,0x133,0x134]);function Z(_0x5131a3){const _0x3bee18=_0x1987b4;return new h(_0x3bee18(0x14b),'Resource\x20exceeds\x20the\x20maximum\x20size\x20of\x20'+_0x5131a3+_0x3bee18(0x12c));}async function ce(_0x559b36,_0x1c5eeb){const _0x197eaf=_0x1987b4;let _0x333a3e=Number(_0x559b36['headers']['get'](_0x197eaf(0x168)));if(Number[_0x197eaf(0x17d)](_0x333a3e)&&_0x333a3e>_0x1c5eeb)throw Z(_0x1c5eeb);if(_0x559b36[_0x197eaf(0x12d)]===null){let _0x1a9658=await _0x559b36[_0x197eaf(0x165)]();if(Buffer['byteLength'](_0x1a9658)>_0x1c5eeb)throw Z(_0x1c5eeb);return _0x1a9658;}let _0x53be4b=_0x559b36[_0x197eaf(0x12d)][_0x197eaf(0x145)](),_0x48d1fb=[],_0x2e7ebd=0x0;try{for(;;){let _0x4dca3f=await _0x53be4b[_0x197eaf(0x12b)]();if(_0x4dca3f[_0x197eaf(0x1a7)])break;if(_0x2e7ebd+=_0x4dca3f[_0x197eaf(0x11f)][_0x197eaf(0x18d)],_0x2e7ebd>_0x1c5eeb)throw await _0x53be4b[_0x197eaf(0x141)]()['catch'](()=>void 0x0),Z(_0x1c5eeb);_0x48d1fb[_0x197eaf(0x1b4)](_0x4dca3f['value']);}}finally{_0x53be4b[_0x197eaf(0x18c)]();}try{return new TextDecoder(_0x197eaf(0x1a6),{'fatal':!0x0})[_0x197eaf(0x159)](Buffer[_0x197eaf(0x130)](_0x48d1fb,_0x2e7ebd));}catch{throw new h(_0x197eaf(0x14c),_0x197eaf(0x133));}}var Q=class{['fetchImpl'];[_0x1987b4(0x1ad)];['maxBytes'];['maxRedirects'];constructor(_0x527133={}){const _0x232201=_0x1987b4;this[_0x232201(0x1d0)]=_0x527133['fetch']??fetch,this['timeoutMs']=_0x527133[_0x232201(0x1ad)]??X,this['maxBytes']=_0x527133['maxBytes']??ae,this[_0x232201(0x188)]=_0x527133[_0x232201(0x188)]??oe;}async[_0x1987b4(0x13d)](_0x15c6ef){const _0x16ce78=_0x1987b4;let _0x307a66=new URL(_0x15c6ef);if(_0x307a66[_0x16ce78(0x158)]!==_0x16ce78(0x147))throw new h(_0x16ce78(0x125),_0x16ce78(0x184));let _0x4e8b76=new AbortController(),_0x1e4e3b=setTimeout(()=>_0x4e8b76['abort'](),this[_0x16ce78(0x1ad)]);try{let _0x1d35a7=_0x307a66;for(let _0xc7d779=0x0;;_0xc7d779++){let _0x2316e8=await this['fetchImpl'](_0x1d35a7,{'redirect':_0x16ce78(0x122),'signal':_0x4e8b76['signal']});if(se[_0x16ce78(0x1b5)](_0x2316e8['status'])){if(_0xc7d779>=this[_0x16ce78(0x188)])throw new h(_0x16ce78(0x187),_0x16ce78(0x19d)+this[_0x16ce78(0x188)]+'.');let _0x5a4412=_0x2316e8['headers']['get']('location');if(_0x5a4412===null)throw new h('resource-download-invalid-redirect','Resource\x20server\x20returned\x20HTTP\x20'+_0x2316e8[_0x16ce78(0x134)]+_0x16ce78(0x1ba));let _0x159380;try{_0x159380=new URL(_0x5a4412,_0x1d35a7);}catch{throw new h(_0x16ce78(0x12f),_0x16ce78(0x172));}if(_0x159380[_0x16ce78(0x158)]!==_0x16ce78(0x147))throw new h(_0x16ce78(0x1cd),_0x16ce78(0x152));_0x1d35a7=_0x159380;continue;}if(!_0x2316e8['ok'])throw new h(_0x16ce78(0x163),_0x16ce78(0x1c5)+_0x2316e8[_0x16ce78(0x134)]+'.');if(_0x2316e8[_0x16ce78(0x153)]!==''&&new URL(_0x2316e8[_0x16ce78(0x153)])[_0x16ce78(0x158)]!=='https:')throw new h(_0x16ce78(0x1cd),'Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.');let _0x1d28fa=await ce(_0x2316e8,this[_0x16ce78(0x11e)]);if(!V(_0x1d28fa))throw new h('resource-download-invalid-svg',_0x16ce78(0x183));return _0x1d28fa;}}catch(_0x49aaac){throw _0x4e8b76[_0x16ce78(0x1e2)][_0x16ce78(0x1a2)]?new h(_0x16ce78(0x14f),'Resource\x20download\x20timed\x20out\x20after\x20'+this[_0x16ce78(0x1ad)]+_0x16ce78(0x166)):_0x49aaac;}finally{clearTimeout(_0x1e4e3b);}}};function $(_0x548a53){const _0x1b354f=_0x1987b4;try{return JSON[_0x1b354f(0x193)](_0x1b185f(_0x548a53,_0x1b354f(0x151)));}catch(_0x4f7771){throw new h('resource-manifest-read-failed','Cannot\x20read\x20resource\x20manifest\x20at\x20'+_0x548a53+':\x20'+(_0x4f7771 instanceof Error?_0x4f7771[_0x1b354f(0x16a)]:String(_0x4f7771)),void 0x0,{'cause':_0x4f7771});}}function le(_0x1d91d6){const _0x1fb081=_0x1987b4;let _0x719b37;return()=>(_0x719b37??=W({'manifest':$(_0x1d91d6[_0x1fb081(0x18e)]),'cache':new J(_0x1d91d6[_0x1fb081(0x1b7)]),'downloader':new Q(_0x1d91d6[_0x1fb081(0x1c1)]),'output':new Y()}),_0x719b37);}export{J as FilesystemResourceCache,Y as FilesystemResourceOutput,Q as HttpsResourceDownloader,h as ResourceLibraryError,le as createNodeResourceLibraryFactory,W as createResourceLibrary,g as isResourceLibraryError,$ as loadResourceManifestFromPath,K as validateResourceCacheRoot};
1
+ const _0xa2f52a=_0x1163;(function(_0x578956,_0x58fabd){const _0x18d186=_0x1163,_0x2d45ff=_0x578956();while(!![]){try{const _0x2a25ed=parseInt(_0x18d186(0x1c7))/0x1+parseInt(_0x18d186(0x1bd))/0x2*(-parseInt(_0x18d186(0x1b6))/0x3)+parseInt(_0x18d186(0x1f9))/0x4*(parseInt(_0x18d186(0x241))/0x5)+-parseInt(_0x18d186(0x23a))/0x6+parseInt(_0x18d186(0x1e5))/0x7*(parseInt(_0x18d186(0x19f))/0x8)+-parseInt(_0x18d186(0x1f5))/0x9*(parseInt(_0x18d186(0x218))/0xa)+parseInt(_0x18d186(0x23f))/0xb;if(_0x2a25ed===_0x58fabd)break;else _0x2d45ff['push'](_0x2d45ff['shift']());}catch(_0x5128e5){_0x2d45ff['push'](_0x2d45ff['shift']());}}}(_0x355e,0xacf17));import{randomUUID as _0x3434c7}from'node:crypto';import{mkdir as _0x3dd2a4,readFile as _0x476815,readdir as _0x9ecf36,rename as _0x26d574,rm as _0x2a399d,stat as _0x29a99e,unlink as _0x27eb38,writeFile as _0x348cda}from'node:fs/promises';import{dirname as _0x1df83a,isAbsolute as _0x1499a8,join as _0x164acf,parse as _0x20ce82,resolve as _0x1181c9}from'node:path';import{readFileSync as _0x5977af}from'node:fs';var h=class extends Error{[_0xa2f52a(0x1f7)];[_0xa2f52a(0x1af)];constructor(_0x47e4b5,_0x30bdb2,_0x2cc908,_0x21bdcd){const _0x20662d=_0xa2f52a;super(_0x30bdb2,_0x21bdcd),this['code']=_0x47e4b5,this[_0x20662d(0x1af)]=_0x2cc908,this[_0x20662d(0x18f)]=_0x20662d(0x1c2);}};function g(_0x431f31){return _0x431f31 instanceof h;}var _=/^[A-Za-z0-9._-]+$/u,v=0xff,y=0x4;function b(_0xbfc080){const _0x119122=_0xa2f52a;return _[_0x119122(0x220)](_0xbfc080)&&_0xbfc080!=='.'&&_0xbfc080!=='..';}function x(_0xb224e0){const _0x563fc6=_0xa2f52a;if(!b(_0xb224e0)||_0xb224e0['startsWith']('-')||_0xb224e0[_0x563fc6(0x188)]('--')||_0xb224e0[_0x563fc6(0x1b2)]>v)throw new h(_0x563fc6(0x1f1),_0x563fc6(0x1e7)+_0xb224e0+_0x563fc6(0x1ce));}function S(_0x5626bb){const _0x2f80ec=_0xa2f52a;if(!b(_0x5626bb)||_0x5626bb['length']+y>v)throw new h(_0x2f80ec(0x1ba),_0x2f80ec(0x1e6)+_0x5626bb+_0x2f80ec(0x1b1));}function C(_0x2189ad){const _0x5a8257=_0xa2f52a;let _0x226f36=_0x2189ad[_0x5a8257(0x1a9)]('/');if(_0x226f36[_0x5a8257(0x1b2)]!==0x2||_0x226f36[0x0]===''||_0x226f36[0x1]==='')throw new h('resource-invalid-handle',_0x5a8257(0x1e4)+_0x2189ad+'\x22;\x20expected\x20<registryId>/<resourceId>.',_0x2189ad);let _0x3ed125=_0x226f36[0x0],_0x2d504d=_0x226f36[0x1];return x(_0x3ed125),S(_0x2d504d),{'registryId':_0x3ed125,'resourceId':_0x2d504d};}function ee(_0x1ca7c7,_0x5f21d4){return x(_0x1ca7c7),S(_0x5f21d4),_0x1ca7c7+'/'+_0x5f21d4;}function _0x355e(){const _0x334eb8=['.tagIds','33CoksJW','add','resource-download-insecure-redirect','\x20bytes.','resource-invalid-resource-id','\x20must\x20be\x20a\x20non-empty\x20string.','.resource-','111516QCIDyF','signal','registries','.source','].id','ResourceLibraryError','maxRedirects','boolean','ENOENT','resource-download-invalid-utf8','340844jfJbAw','tagIds','size','Resource\x20exceeds\x20the\x20maximum\x20size\x20of\x20','find','\x20must\x20be\x20an\x20array.','.tmp','\x22:\x20expected\x20an\x20addressable\x20filesystem-safe\x20component\x20without\x20\x22--\x22.','Unknown\x20resource\x20registry\x20\x22','byteCount','\x20without\x20a\x20Location\x20header.','clear','\x20ms.','resource-limit-invalid','normalize','resource-download-too-large','catalog','resource-manifest-read-failed','tags','resource-manifest-invalid','url','cancel','decode','value','.id','\x22:\x20','.svg','Resource\x20URL\x20must\x20use\x20HTTPS.','\x22\x20is\x20not\x20an\x20SVG\x20document.','Invalid\x20resource\x20handle\x20\x22','14ZkJkNy','Invalid\x20resource\x20ID\x20\x22','Invalid\x20registry\x20ID\x20\x22','entries','resource-download-invalid-svg','resource-download-http','\x20ID\x20\x22','resource-download-invalid-redirect','sourceUrl','cache','output','filter','resource-invalid-registry-id','concat','.groupId\x20references\x20unknown\x20group\x20\x22','description','1142973tkUDQh','.tagIds\x20references\x20unknown\x20tag\x20\x22','code','.keywords','4sSBDbD','resource-not-found','Failed\x20to\x20download\x20\x22','Resource\x20export\x20filename\x20exceeds\x20','intrinsicSize','label','utf8','has','Cannot\x20read\x20resource\x20manifest\x20at\x20','fetchImpl','image','aborted','resource-registry-not-found','globalIndex','join','width','root','colorEditable','isInteger','isArray','resourceIndex','registrations','maxBytes','push','values','.source.value','isDirectory','Invalid\x20resource\x20manifest:\x20','timeoutMs','registrationIndex','string','50rHIptC','storagePolicy','object','cacheLocation','.payload.colorEditable','read','https:','].input.tags','test','destination','catch','clearCache','body','content-length','getReader','registrations[','].input','Resource\x20response\x20is\x20not\x20an\x20SVG\x20document.','registrations\x20must\x20not\x20be\x20empty.','replace','resource','manual','write','].label','source','.payload','fetch','toLowerCase','keywords','set','].input.registryId','group','.intrinsicSize\x20must\x20be\x20positive.','Duplicate\x20registry\x20ID\x20\x22','3361098fwFKcB','localeCompare','number','releaseLock','options','17079656abPXUy','defaultLocale','2959185iqadOe','map','get','sort','Resource\x20download\x20timed\x20out\x20after\x20','isFile','height','manifest','\x20must\x20be\x20an\x20object.','headers','groups','cacheRoot','Resource\x20search\x20limit\x20must\x20be\x20a\x20positive\x20integer;\x20received\x20\x22','input','.intrinsicSize.width','resource-download-failed','resource-download-too-many-redirects','includes','.source.type\x20must\x20be\x20\x22url\x22.','order','Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.','Duplicate\x20','protocol','].input.resources[','name','downloader','location','byteLength','registryById','Downloaded\x20resource\x20\x22','payload','text','type','\x20must\x20be\x20a\x20boolean.','registryId','Resource\x20cache\x20root\x20must\x20be\x20an\x20absolute,\x20dedicated\x20directory\x20below\x20the\x20filesystem\x20root;\x20received\x20\x22','].input.resources','groupId','Unknown\x20resource\x20\x22','export','126016WlxpTW','.intrinsicSize','message','abort','Resource\x20search\x20needs\x20at\x20least\x20one\x20non-empty\x20query.','resource-export-filename-too-long','isFinite','.order','resource-export-failed','resources','split','.source.value\x20must\x20use\x20HTTPS.','.name','manifest.registrations','listRegistries','resource-download-timeout','handle','some','\x22:\x20expected\x20filesystem-safe\x20characters.','length','Resource\x20response\x20is\x20not\x20valid\x20UTF-8.','resource-invalid-svg'];_0x355e=function(){return _0x334eb8;};return _0x355e();}function w(_0x1fbc26){const _0x1b85d5=_0xa2f52a;let {registryId:_0x59b524,resourceId:_0x5d8ace}=C(_0x1fbc26),_0x2a3695=_0x59b524+'--'+_0x5d8ace+_0x1b85d5(0x1e1);if(_0x2a3695['length']>v)throw new h(_0x1b85d5(0x1a4),_0x1b85d5(0x1fc)+v+_0x1b85d5(0x1b9),_0x1fbc26);return _0x2a3695;}function T(_0x578ab0){const _0x394745=_0xa2f52a;return new h(_0x394745(0x1da),_0x394745(0x214)+_0x578ab0);}function E(_0x262eb9,_0x109432){const _0x63dc39=_0xa2f52a;if(typeof _0x262eb9!=_0x63dc39(0x21a)||!_0x262eb9||Array[_0x63dc39(0x20c)](_0x262eb9))throw T(_0x109432+_0x63dc39(0x249));return _0x262eb9;}function D(_0x41300a,_0x40d750,_0x34b971=!0x1){const _0x335a6f=_0xa2f52a;if(_0x34b971&&_0x41300a===void 0x0)return[];if(!Array[_0x335a6f(0x20c)](_0x41300a))throw T(_0x40d750+_0x335a6f(0x1cc));return _0x41300a;}function O(_0x217190,_0x16b205){const _0xbf12c5=_0xa2f52a;if(typeof _0x217190!=_0xbf12c5(0x217)||_0x217190==='')throw T(_0x16b205+_0xbf12c5(0x1bb));return _0x217190;}function k(_0x21e5c7,_0x1acc7f,_0x437919=!0x1){const _0x40c786=_0xa2f52a;return D(_0x21e5c7,_0x1acc7f,_0x437919)[_0x40c786(0x242)]((_0x44b363,_0x30c720)=>O(_0x44b363,_0x1acc7f+'['+_0x30c720+']'));}function A(_0x20509c,_0x4e021a){const _0x51ce36=_0xa2f52a;return D(_0x20509c,_0x4e021a,!0x0)[_0x51ce36(0x242)]((_0x178923,_0xe5838a)=>{if(typeof _0x178923!='string')throw T(_0x4e021a+'['+_0xe5838a+']\x20must\x20be\x20a\x20string.');return _0x178923;})['filter'](_0x2adb59=>_0x2adb59!=='');}function j(_0x53072b,_0x275184){const _0x35a972=_0xa2f52a;if(typeof _0x53072b!=_0x35a972(0x23c)||!Number[_0x35a972(0x1a5)](_0x53072b))throw T(_0x275184+'\x20must\x20be\x20a\x20finite\x20number.');return _0x53072b;}function M(_0x24b23c,_0x41a62d){const _0x41a445=_0xa2f52a;if(typeof _0x24b23c!=_0x41a445(0x1c4))throw T(_0x41a62d+_0x41a445(0x198));return _0x24b23c;}function N(_0x1ac4ba,_0x2a591e,_0x1d9073){const _0xd9ab0c=_0xa2f52a;if(typeof _0x1ac4ba=='string'&&_0x1ac4ba!=='')return _0x1ac4ba;let _0x390a54=E(_0x1ac4ba,_0x2a591e),_0x18c809=_0x1d9073===void 0x0?void 0x0:_0x390a54[_0x1d9073];if(typeof _0x18c809=='string'&&_0x18c809!=='')return _0x18c809;let _0x6ac72=_0x390a54['en-US'];if(typeof _0x6ac72==_0xd9ab0c(0x217)&&_0x6ac72!=='')return _0x6ac72;let _0x4c4244=Object[_0xd9ab0c(0x211)](_0x390a54)['find'](_0x4f5e04=>typeof _0x4f5e04==_0xd9ab0c(0x217)&&_0x4f5e04!=='');if(_0x4c4244!==void 0x0)return _0x4c4244;throw T(_0x2a591e+'\x20contains\x20no\x20usable\x20localized\x20text.');}function P(_0x35920f,_0x323288,_0x1845d8){const _0x9d354e=_0xa2f52a;try{_0x1845d8==='registry'?x(_0x35920f):S(_0x35920f);}catch(_0x360dd0){throw T(_0x323288+':\x20'+(_0x360dd0 instanceof Error?_0x360dd0[_0x9d354e(0x1a1)]:String(_0x360dd0)));}}function F(_0x36c2a5,_0x1db712,_0x3bce93){const _0xcd6acf=_0xa2f52a;let _0x268e53=new Map();for(let [_0x10f2e5,_0x1a0c6f]of D(_0x36c2a5,_0x1db712,!0x0)[_0xcd6acf(0x1e8)]()){let _0x2cf9f6=E(_0x1a0c6f,_0x1db712+'['+_0x10f2e5+']'),_0xb66bf7=O(_0x2cf9f6['id'],_0x1db712+'['+_0x10f2e5+_0xcd6acf(0x1c1));if(P(_0xb66bf7,_0x1db712+'['+_0x10f2e5+_0xcd6acf(0x1c1),_0xcd6acf(0x22c)),_0x268e53['has'](_0xb66bf7))throw T(_0xcd6acf(0x18c)+_0x1db712+_0xcd6acf(0x1eb)+_0xb66bf7+'\x22.');_0x268e53[_0xcd6acf(0x235)](_0xb66bf7,N(_0x2cf9f6[_0xcd6acf(0x1fe)],_0x1db712+'['+_0x10f2e5+_0xcd6acf(0x22f),_0x3bce93));}return _0x268e53;}function I(_0xa0e35e,_0x4aed5c){const _0x4cff21=_0xa2f52a;let _0x5d15dd=E(_0xa0e35e[_0x4cff21(0x1fd)],_0x4aed5c+_0x4cff21(0x1a0)),_0x5d3405=j(_0x5d15dd[_0x4cff21(0x208)],_0x4aed5c+_0x4cff21(0x24f)),_0x4ad3eb=j(_0x5d15dd[_0x4cff21(0x247)],_0x4aed5c+'.intrinsicSize.height');if(_0x5d3405<=0x0||_0x4ad3eb<=0x0)throw T(_0x4aed5c+_0x4cff21(0x238));return{'width':_0x5d3405,'height':_0x4ad3eb};}function L(_0xa77175,_0xe5fa78){const _0x4d4f6b=_0xa2f52a;if(_0xa77175[_0x4d4f6b(0x197)]!==_0x4d4f6b(0x203))throw T(_0xe5fa78+'.type\x20must\x20be\x20\x22image\x22.');if(_0xa77175[_0x4d4f6b(0x219)]!=='reference')throw T(_0xe5fa78+'.storagePolicy\x20must\x20be\x20\x22reference\x22.');let _0x2728ea=E(_0xa77175[_0x4d4f6b(0x230)],_0xe5fa78+_0x4d4f6b(0x1c0));if(_0x2728ea[_0x4d4f6b(0x197)]!==_0x4d4f6b(0x1db))throw T(_0xe5fa78+_0x4d4f6b(0x189));let _0x405c66=O(_0x2728ea['value'],_0xe5fa78+_0x4d4f6b(0x212)),_0x240c7e;try{_0x240c7e=new URL(_0x405c66);}catch{throw T(_0xe5fa78+'.source.value\x20must\x20be\x20a\x20URL.');}if(_0x240c7e[_0x4d4f6b(0x18d)]!==_0x4d4f6b(0x21e))throw T(_0xe5fa78+_0x4d4f6b(0x1aa));return _0x405c66;}function R(_0xc7a014){const _0x53ceab=_0xa2f52a;return _0xc7a014[_0x53ceab(0x1d5)]('NFKC')[_0x53ceab(0x233)]()['trim']()[_0x53ceab(0x22b)](/\s+/gu,'\x20');}function z(_0x5c596e){const _0x540062=_0xa2f52a;let _0x5bef31=E(_0x5c596e,'manifest'),_0x1d75cf=new Map(),_0x46fe3e=new Map(),_0x410562=[],_0x2186f5=[],_0x2eedb9=new Set(),_0x48ce03=0x0;for(let [_0x56ff78,_0x1f97ad]of D(_0x5bef31[_0x540062(0x20e)],_0x540062(0x1ac))[_0x540062(0x1e8)]()){let _0x495db3=E(E(_0x1f97ad,'registrations['+_0x56ff78+']')[_0x540062(0x24e)],_0x540062(0x227)+_0x56ff78+_0x540062(0x228)),_0x48ea31=O(_0x495db3[_0x540062(0x199)],'registrations['+_0x56ff78+_0x540062(0x236));if(P(_0x48ea31,'registrations['+_0x56ff78+_0x540062(0x236),'registry'),_0x1d75cf[_0x540062(0x200)](_0x48ea31))throw T(_0x540062(0x239)+_0x48ea31+'\x22.');let _0x1c34c1=_0x495db3[_0x540062(0x240)]===void 0x0?void 0x0:O(_0x495db3[_0x540062(0x240)],_0x540062(0x227)+_0x56ff78+'].input.defaultLocale'),_0x530c8a=F(_0x495db3['groups'],_0x540062(0x227)+_0x56ff78+'].input.groups',_0x1c34c1),_0x5e190d=F(_0x495db3[_0x540062(0x1d9)],_0x540062(0x227)+_0x56ff78+_0x540062(0x21f),_0x1c34c1),_0x5ed50d=[];for(let [_0x13d821,_0x31b9cc]of D(_0x495db3[_0x540062(0x1a8)],'registrations['+_0x56ff78+_0x540062(0x19b))[_0x540062(0x1e8)]()){let _0x3799e9=_0x540062(0x227)+_0x56ff78+_0x540062(0x18e)+_0x13d821+']',_0xe7f412=E(_0x31b9cc,_0x3799e9),_0x4158c1=O(_0xe7f412['id'],_0x3799e9+_0x540062(0x1df));P(_0x4158c1,_0x3799e9+_0x540062(0x1df),_0x540062(0x22c));let _0xc9e4b7=ee(_0x48ea31,_0x4158c1);if(_0x46fe3e['has'](_0xc9e4b7))throw T('Duplicate\x20resource\x20handle\x20\x22'+_0xc9e4b7+'\x22.');let _0x47ce19;try{_0x47ce19=w(_0xc9e4b7);}catch(_0x4e92bb){throw T(_0x3799e9+':\x20'+(_0x4e92bb instanceof Error?_0x4e92bb['message']:String(_0x4e92bb)));}if(_0x2eedb9[_0x540062(0x200)](_0x47ce19))throw T('Duplicate\x20export\x20filename\x20\x22'+_0x47ce19+'\x22.');_0x2eedb9[_0x540062(0x1b7)](_0x47ce19);let _0x2e22db=_0xe7f412[_0x540062(0x19c)]===void 0x0?void 0x0:O(_0xe7f412[_0x540062(0x19c)],_0x3799e9+'.groupId');if(_0x2e22db!==void 0x0&&!_0x530c8a['has'](_0x2e22db))throw T(_0x3799e9+_0x540062(0x1f3)+_0x2e22db+'\x22.');let _0x5715fa=k(_0xe7f412[_0x540062(0x1c8)],_0x3799e9+_0x540062(0x1b5),!0x0);for(let _0x533349 of _0x5715fa)if(!_0x5e190d['has'](_0x533349))throw T(_0x3799e9+_0x540062(0x1f6)+_0x533349+'\x22.');let _0x12e635=A(_0xe7f412[_0x540062(0x234)],_0x3799e9+_0x540062(0x1f8)),_0x3e191d=N(_0xe7f412[_0x540062(0x18f)],_0x3799e9+_0x540062(0x1ab),_0x1c34c1),_0x1cfff9=_0xe7f412[_0x540062(0x1f4)]===void 0x0?void 0x0:N(_0xe7f412[_0x540062(0x1f4)],_0x3799e9+'.description',_0x1c34c1),_0x3ae589=_0x2e22db===void 0x0?null:{'id':_0x2e22db,'label':_0x530c8a[_0x540062(0x243)](_0x2e22db)},_0x4c3e80=_0x5715fa[_0x540062(0x242)](_0x305bcb=>({'id':_0x305bcb,'label':_0x5e190d[_0x540062(0x243)](_0x305bcb)})),_0x47e896=E(_0xe7f412[_0x540062(0x195)],_0x3799e9+_0x540062(0x231)),_0xf90bf1=_0xe7f412['order']===void 0x0?null:j(_0xe7f412[_0x540062(0x18a)],_0x3799e9+_0x540062(0x1a6)),_0x1d2232=M(_0x47e896['colorEditable'],_0x3799e9+_0x540062(0x21c)),_0x264822={'handle':_0xc9e4b7,'registryId':_0x48ea31,'id':_0x4158c1,'name':_0x3e191d,..._0x1cfff9===void 0x0?{}:{'description':_0x1cfff9},'group':_0x3ae589,'tags':_0x4c3e80,'keywords':_0x12e635,'order':_0xf90bf1,'intrinsicSize':I(_0x47e896,_0x3799e9+'.payload'),'colorEditable':_0x1d2232,'sourceUrl':L(_0x47e896,_0x3799e9+_0x540062(0x231)),'registrationIndex':_0x56ff78,'resourceIndex':_0x13d821,'globalIndex':_0x48ce03,'searchText':R([_0x3e191d,_0x1cfff9,_0x3ae589?.[_0x540062(0x1fe)],..._0x4c3e80['map'](_0x3b1cf3=>_0x3b1cf3[_0x540062(0x1fe)]),..._0x12e635]['filter'](_0x248dcf=>_0x248dcf!==void 0x0)[_0x540062(0x207)]('\x20'))};_0x48ce03++,_0x5ed50d[_0x540062(0x210)](_0x264822),_0x2186f5[_0x540062(0x210)](_0x264822),_0x46fe3e[_0x540062(0x235)](_0xc9e4b7,_0x264822);}let _0x62ff2f={'id':_0x48ea31,'groups':_0x530c8a,'tags':_0x5e190d,'resources':_0x5ed50d};_0x410562['push'](_0x62ff2f),_0x1d75cf['set'](_0x48ea31,_0x62ff2f);}if(_0x410562[_0x540062(0x1b2)]===0x0)throw T(_0x540062(0x22a));return{'registries':_0x410562,'registryById':_0x1d75cf,'resourceByHandle':_0x46fe3e,'resources':_0x2186f5};}function B(_0x1e06f1,_0x3ae635){const _0x5d7cf5=_0xa2f52a;C(_0x3ae635);let _0x565a46=_0x1e06f1['resourceByHandle'][_0x5d7cf5(0x243)](_0x3ae635);if(_0x565a46===void 0x0)throw new h(_0x5d7cf5(0x1fa),_0x5d7cf5(0x19d)+_0x3ae635+'\x22;\x20try\x20resources\x20find\x20<query>.',_0x3ae635);return _0x565a46;}function te(_0x541b68){const _0x2ddaf5=_0xa2f52a;return _0x541b68['registries']['map'](_0x496d35=>({'id':_0x496d35['id'],'resourceCount':_0x496d35[_0x2ddaf5(0x1a8)]['length'],'groupCount':_0x496d35[_0x2ddaf5(0x24b)][_0x2ddaf5(0x1c9)],'tagCount':_0x496d35[_0x2ddaf5(0x1d9)]['size'],'colorEditableCount':_0x496d35[_0x2ddaf5(0x1a8)][_0x2ddaf5(0x1f0)](_0x20d8c0=>_0x20d8c0[_0x2ddaf5(0x20a)])[_0x2ddaf5(0x1b2)]}));}function ne(_0x109fa8){const _0x1749fb=_0xa2f52a;return{'handle':_0x109fa8['handle'],'registryId':_0x109fa8[_0x1749fb(0x199)],'id':_0x109fa8['id'],'name':_0x109fa8[_0x1749fb(0x18f)],'group':_0x109fa8[_0x1749fb(0x237)],'tags':_0x109fa8['tags'],'keywords':_0x109fa8[_0x1749fb(0x234)],'order':_0x109fa8[_0x1749fb(0x18a)],'intrinsicSize':_0x109fa8[_0x1749fb(0x1fd)],'colorEditable':_0x109fa8[_0x1749fb(0x20a)]};}function re(_0x268db5,_0x2ef402){const _0x54d506=_0xa2f52a;let _0x374f4e=(_0x268db5[_0x54d506(0x18a)]??_0x268db5['globalIndex'])-(_0x2ef402[_0x54d506(0x18a)]??_0x2ef402[_0x54d506(0x206)]);if(_0x374f4e!==0x0)return _0x374f4e;let _0x248248=_0x268db5['registrationIndex']-_0x2ef402[_0x54d506(0x216)];if(_0x248248!==0x0)return _0x248248;let _0x3ba07c=_0x268db5['resourceIndex']-_0x2ef402[_0x54d506(0x20d)];return _0x3ba07c===0x0?_0x268db5[_0x54d506(0x1af)][_0x54d506(0x23b)](_0x2ef402[_0x54d506(0x1af)]):_0x3ba07c;}function ie(_0x13d2d3,_0x3b3ada){const _0x558638=_0xa2f52a;let _0x26a8d8=_0x3b3ada['queries']['map'](R)[_0x558638(0x1f0)](_0x3c5835=>_0x3c5835!=='');if(_0x26a8d8[_0x558638(0x1b2)]===0x0)throw new h('resource-query-empty',_0x558638(0x1a3));let _0x1a5b8e=new Set(_0x3b3ada[_0x558638(0x1bf)]??[]);for(let _0x203b4f of _0x1a5b8e)if(!_0x13d2d3[_0x558638(0x193)]['has'](_0x203b4f))throw new h(_0x558638(0x205),_0x558638(0x1cf)+_0x203b4f+'\x22.');let _0x29da20=_0x3b3ada['limit']??_0x13d2d3[_0x558638(0x1a8)][_0x558638(0x1b2)];if(!Number[_0x558638(0x20b)](_0x29da20)||_0x29da20<0x1)throw new h(_0x558638(0x1d4),_0x558638(0x24d)+_0x29da20+'\x22.');let _0x28c25e=_0x13d2d3[_0x558638(0x1a8)]['filter'](_0x52d04f=>_0x1a5b8e['size']===0x0||_0x1a5b8e[_0x558638(0x200)](_0x52d04f[_0x558638(0x199)]))[_0x558638(0x1f0)](_0x4940b7=>_0x26a8d8[_0x558638(0x1b0)](_0x3303aa=>_0x4940b7['searchText'][_0x558638(0x188)](_0x3303aa)))[_0x558638(0x244)](re);return{'resources':_0x28c25e['slice'](0x0,_0x29da20)[_0x558638(0x242)](ne),'total':_0x28c25e[_0x558638(0x1b2)]};}function V(_0x42463f){const _0x367880=_0xa2f52a;return/^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[^]*?-->\s*)*<svg(?:\s|>)/iu[_0x367880(0x220)](_0x42463f);}function H(_0x2035ca,_0x2f88fd){const _0x271800=_0xa2f52a;return g(_0x2f88fd)?{'handle':_0x2035ca,'code':_0x2f88fd[_0x271800(0x1f7)],'message':_0x2f88fd[_0x271800(0x1a1)]}:{'handle':_0x2035ca,'code':_0x271800(0x1a7),'message':_0x2f88fd instanceof Error?_0x2f88fd[_0x271800(0x1a1)]:String(_0x2f88fd)};}var U=class{['options'];[_0xa2f52a(0x1d7)];constructor(_0x543aac){const _0x4debcf=_0xa2f52a;this['options']=_0x543aac,this[_0x4debcf(0x1d7)]=z(_0x543aac[_0x4debcf(0x248)]);}get[_0xa2f52a(0x21b)](){const _0x11cb73=_0xa2f52a;return this['options']['cache'][_0x11cb73(0x191)];}[_0xa2f52a(0x1ad)](){const _0x1955d7=_0xa2f52a;return te(this[_0x1955d7(0x1d7)]);}[_0xa2f52a(0x1cb)](_0x1682fd){const _0xbd2d8f=_0xa2f52a;return ie(this[_0xbd2d8f(0x1d7)],_0x1682fd);}async[_0xa2f52a(0x21d)](_0x299c6b){const _0x3edf34=_0xa2f52a;let _0x15d102=B(this[_0x3edf34(0x1d7)],_0x299c6b[_0x3edf34(0x1af)]),_0x36a796=await this[_0x3edf34(0x23e)][_0x3edf34(0x1ee)][_0x3edf34(0x21d)](_0x299c6b['handle']);if(_0x36a796!==void 0x0&&V(_0x36a796))return{'handle':_0x299c6b[_0x3edf34(0x1af)],'svg':_0x36a796};let _0x5629da;try{_0x5629da=await this[_0x3edf34(0x23e)][_0x3edf34(0x190)]['download'](_0x15d102[_0x3edf34(0x1ed)]);}catch(_0x2e433a){throw g(_0x2e433a)?_0x2e433a:new h(_0x3edf34(0x250),_0x3edf34(0x1fb)+_0x299c6b['handle']+_0x3edf34(0x1e0)+(_0x2e433a instanceof Error?_0x2e433a[_0x3edf34(0x1a1)]:String(_0x2e433a)),_0x299c6b[_0x3edf34(0x1af)],{'cause':_0x2e433a});}if(!V(_0x5629da))throw new h(_0x3edf34(0x1b4),_0x3edf34(0x194)+_0x299c6b[_0x3edf34(0x1af)]+_0x3edf34(0x1e3),_0x299c6b['handle']);return await this['options']['cache'][_0x3edf34(0x22e)](_0x299c6b[_0x3edf34(0x1af)],_0x5629da),{'handle':_0x299c6b[_0x3edf34(0x1af)],'svg':_0x5629da};}async[_0xa2f52a(0x19e)](_0x555280){const _0x2ba35e=_0xa2f52a;let _0x16c279=[],_0x2a9606=[];for(let _0x1520de of _0x555280['handles'])try{let {svg:_0x161054}=await this[_0x2ba35e(0x21d)]({'handle':_0x1520de}),_0x39e442=await this[_0x2ba35e(0x23e)][_0x2ba35e(0x1ef)][_0x2ba35e(0x22e)](_0x555280[_0x2ba35e(0x221)],w(_0x1520de),_0x161054);_0x16c279[_0x2ba35e(0x210)]({'handle':_0x1520de,'path':_0x39e442});}catch(_0x37f680){_0x2a9606[_0x2ba35e(0x210)](H(_0x1520de,_0x37f680));}return{'exported':_0x16c279,'failed':_0x2a9606};}async[_0xa2f52a(0x223)](){const _0x237ddb=_0xa2f52a;return await this[_0x237ddb(0x23e)]['cache'][_0x237ddb(0x1d2)]();}};function W(_0x16630a){return new U(_0x16630a);}function G(_0x5d7622){return _0x5d7622 instanceof Error&&'code'in _0x5d7622;}function _0x1163(_0x4a37b9,_0x556aa1){_0x4a37b9=_0x4a37b9-0x187;const _0x355e44=_0x355e();let _0x116382=_0x355e44[_0x4a37b9];return _0x116382;}function K(_0x477a42){const _0x12c364=_0xa2f52a;let _0x1aa03d=_0x1181c9(_0x477a42);if(!_0x1499a8(_0x477a42)||_0x1aa03d===_0x20ce82(_0x1aa03d)[_0x12c364(0x209)])throw new h('resource-cache-root-invalid',_0x12c364(0x19a)+_0x477a42+'\x22.');return _0x1aa03d;}async function q(_0x525430){const _0x18606b=_0xa2f52a;let _0x1e0849;try{_0x1e0849=await _0x9ecf36(_0x525430,{'withFileTypes':!0x0});}catch(_0x909c3c){if(G(_0x909c3c)&&_0x909c3c['code']===_0x18606b(0x1c5))return{'resourceCount':0x0,'byteCount':0x0};throw _0x909c3c;}let _0x2b85a0=0x0,_0x4a5cff=0x0;for(let _0x2525d1 of _0x1e0849){let _0x52ba1a=_0x164acf(_0x525430,_0x2525d1[_0x18606b(0x18f)]);if(_0x2525d1[_0x18606b(0x213)]()){let _0x25f422=await q(_0x52ba1a);_0x2b85a0+=_0x25f422['resourceCount'],_0x4a5cff+=_0x25f422[_0x18606b(0x1d0)];}else{if(_0x2525d1[_0x18606b(0x246)]()&&_0x2525d1[_0x18606b(0x18f)]['endsWith'](_0x18606b(0x1e1))){let _0xbb2e0e=await _0x29a99e(_0x52ba1a);_0x2b85a0++,_0x4a5cff+=_0xbb2e0e[_0x18606b(0x1c9)];}}}return{'resourceCount':_0x2b85a0,'byteCount':_0x4a5cff};}var J=class{[_0xa2f52a(0x191)];constructor(_0xbd72b7){const _0x3dbc3d=_0xa2f52a;this[_0x3dbc3d(0x191)]=K(_0xbd72b7);}['path'](_0x1a1c53){const _0x42eace=_0xa2f52a;let {registryId:_0x5f1246,resourceId:_0x38a012}=C(_0x1a1c53);return _0x164acf(this['location'],_0x5f1246,_0x38a012+_0x42eace(0x1e1));}async['read'](_0x2fb6fc){const _0x360aa4=_0xa2f52a;try{return await _0x476815(this['path'](_0x2fb6fc),_0x360aa4(0x1ff));}catch(_0x138e92){if(G(_0x138e92)&&_0x138e92['code']===_0x360aa4(0x1c5))return;throw _0x138e92;}}async['write'](_0x1b5615,_0x31ea3b){const _0x11dd6b=_0xa2f52a;let _0x2f4055=this['path'](_0x1b5615);await _0x3dd2a4(_0x1df83a(_0x2f4055),{'recursive':!0x0});let _0x1ec5f6=_0x164acf(_0x1df83a(_0x2f4055),_0x11dd6b(0x1bc)+process['pid']+'-'+_0x3434c7()+_0x11dd6b(0x1cd));try{await _0x348cda(_0x1ec5f6,_0x31ea3b,{'encoding':_0x11dd6b(0x1ff),'mode':0x180}),await _0x26d574(_0x1ec5f6,_0x2f4055);}catch(_0x1ffbcd){throw await _0x27eb38(_0x1ec5f6)[_0x11dd6b(0x222)](()=>void 0x0),_0x1ffbcd;}}async['clear'](){const _0x1e61dc=_0xa2f52a;let _0x518bf4=await q(this[_0x1e61dc(0x191)]);return await _0x2a399d(this[_0x1e61dc(0x191)],{'force':!0x0,'recursive':!0x0}),{'path':this[_0x1e61dc(0x191)],..._0x518bf4};}},Y=class{async[_0xa2f52a(0x22e)](_0x2dcef6,_0x40f050,_0x286d21){const _0x13743d=_0xa2f52a;await _0x3dd2a4(_0x2dcef6,{'recursive':!0x0});let _0x2faea3=_0x164acf(_0x2dcef6,_0x40f050);return await _0x348cda(_0x2faea3,_0x286d21,_0x13743d(0x1ff)),_0x2faea3;}},X=0x7530,ae=0xa00000,oe=0xa,se=new Set([0x12d,0x12e,0x12f,0x133,0x134]);function Z(_0x1e6395){const _0x156d5a=_0xa2f52a;return new h(_0x156d5a(0x1d6),_0x156d5a(0x1ca)+_0x1e6395+_0x156d5a(0x1b9));}async function ce(_0x35a0d8,_0x465448){const _0x3e1354=_0xa2f52a;let _0x2050d7=Number(_0x35a0d8[_0x3e1354(0x24a)][_0x3e1354(0x243)](_0x3e1354(0x225)));if(Number[_0x3e1354(0x1a5)](_0x2050d7)&&_0x2050d7>_0x465448)throw Z(_0x465448);if(_0x35a0d8['body']===null){let _0x3460c4=await _0x35a0d8[_0x3e1354(0x196)]();if(Buffer[_0x3e1354(0x192)](_0x3460c4)>_0x465448)throw Z(_0x465448);return _0x3460c4;}let _0x252a92=_0x35a0d8[_0x3e1354(0x224)][_0x3e1354(0x226)](),_0x567b52=[],_0x4aacbf=0x0;try{for(;;){let _0x4ba8f4=await _0x252a92[_0x3e1354(0x21d)]();if(_0x4ba8f4['done'])break;if(_0x4aacbf+=_0x4ba8f4[_0x3e1354(0x1de)]['byteLength'],_0x4aacbf>_0x465448)throw await _0x252a92[_0x3e1354(0x1dc)]()[_0x3e1354(0x222)](()=>void 0x0),Z(_0x465448);_0x567b52[_0x3e1354(0x210)](_0x4ba8f4['value']);}}finally{_0x252a92[_0x3e1354(0x23d)]();}try{return new TextDecoder('utf-8',{'fatal':!0x0})[_0x3e1354(0x1dd)](Buffer[_0x3e1354(0x1f2)](_0x567b52,_0x4aacbf));}catch{throw new h(_0x3e1354(0x1c6),_0x3e1354(0x1b3));}}var Q=class{[_0xa2f52a(0x202)];['timeoutMs'];[_0xa2f52a(0x20f)];[_0xa2f52a(0x1c3)];constructor(_0x381d13={}){const _0x42726d=_0xa2f52a;this[_0x42726d(0x202)]=_0x381d13[_0x42726d(0x232)]??fetch,this[_0x42726d(0x215)]=_0x381d13[_0x42726d(0x215)]??X,this[_0x42726d(0x20f)]=_0x381d13[_0x42726d(0x20f)]??ae,this[_0x42726d(0x1c3)]=_0x381d13[_0x42726d(0x1c3)]??oe;}async['download'](_0x4b36f8){const _0x20db43=_0xa2f52a;let _0x4ad948=new URL(_0x4b36f8);if(_0x4ad948['protocol']!==_0x20db43(0x21e))throw new h('resource-download-insecure',_0x20db43(0x1e2));let _0x2445e5=new AbortController(),_0x4f24f4=setTimeout(()=>_0x2445e5[_0x20db43(0x1a2)](),this['timeoutMs']);try{let _0x597bfb=_0x4ad948;for(let _0x4b3943=0x0;;_0x4b3943++){let _0xe4704d=await this[_0x20db43(0x202)](_0x597bfb,{'redirect':_0x20db43(0x22d),'signal':_0x2445e5[_0x20db43(0x1be)]});if(se[_0x20db43(0x200)](_0xe4704d['status'])){if(_0x4b3943>=this['maxRedirects'])throw new h(_0x20db43(0x187),'Resource\x20request\x20followed\x20too\x20many\x20redirects;\x20maximum\x20'+this[_0x20db43(0x1c3)]+'.');let _0x305bf6=_0xe4704d[_0x20db43(0x24a)][_0x20db43(0x243)]('location');if(_0x305bf6===null)throw new h(_0x20db43(0x1ec),'Resource\x20server\x20returned\x20HTTP\x20'+_0xe4704d['status']+_0x20db43(0x1d1));let _0x3f681c;try{_0x3f681c=new URL(_0x305bf6,_0x597bfb);}catch{throw new h(_0x20db43(0x1ec),'Resource\x20server\x20returned\x20an\x20invalid\x20redirect\x20URL.');}if(_0x3f681c['protocol']!==_0x20db43(0x21e))throw new h(_0x20db43(0x1b8),_0x20db43(0x18b));_0x597bfb=_0x3f681c;continue;}if(!_0xe4704d['ok'])throw new h(_0x20db43(0x1ea),'Resource\x20server\x20returned\x20HTTP\x20'+_0xe4704d['status']+'.');if(_0xe4704d['url']!==''&&new URL(_0xe4704d[_0x20db43(0x1db)])[_0x20db43(0x18d)]!==_0x20db43(0x21e))throw new h(_0x20db43(0x1b8),'Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.');let _0x5db5e8=await ce(_0xe4704d,this[_0x20db43(0x20f)]);if(!V(_0x5db5e8))throw new h(_0x20db43(0x1e9),_0x20db43(0x229));return _0x5db5e8;}}catch(_0x297f27){throw _0x2445e5[_0x20db43(0x1be)][_0x20db43(0x204)]?new h(_0x20db43(0x1ae),_0x20db43(0x245)+this['timeoutMs']+_0x20db43(0x1d3)):_0x297f27;}finally{clearTimeout(_0x4f24f4);}}};function $(_0x4f1e22){const _0x51e48c=_0xa2f52a;try{return JSON['parse'](_0x5977af(_0x4f1e22,_0x51e48c(0x1ff)));}catch(_0x2b4bd8){throw new h(_0x51e48c(0x1d8),_0x51e48c(0x201)+_0x4f1e22+':\x20'+(_0x2b4bd8 instanceof Error?_0x2b4bd8[_0x51e48c(0x1a1)]:String(_0x2b4bd8)),void 0x0,{'cause':_0x2b4bd8});}}function le(_0x2d6531){const _0x207ba9=_0xa2f52a;let _0x2c2a8c;return()=>(_0x2c2a8c??=W({'manifest':$(_0x2d6531['manifestPath']),'cache':new J(_0x2d6531[_0x207ba9(0x24c)]),'downloader':new Q(_0x2d6531[_0x207ba9(0x190)]),'output':new Y()}),_0x2c2a8c);}export{J as FilesystemResourceCache,Y as FilesystemResourceOutput,Q as HttpsResourceDownloader,h as ResourceLibraryError,le as createNodeResourceLibraryFactory,W as createResourceLibrary,g as isResourceLibraryError,$ as loadResourceManifestFromPath,K as validateResourceCacheRoot};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@univer-cli/resource-library",
3
3
  "type": "module",
4
- "version": "1.3.0",
4
+ "version": "1.4.0",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",