@univer-cli/resource-library 1.6.2 → 1.7.0-alpha.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.
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x21b277=_0x1cb0;(function(_0x198d6f,_0x46a218){const _0x2c7861=_0x1cb0,_0x3a5490=_0x198d6f();while(!![]){try{const _0x585a5f=-parseInt(_0x2c7861(0x163))/0x1*(-parseInt(_0x2c7861(0x11e))/0x2)+parseInt(_0x2c7861(0x15a))/0x3+parseInt(_0x2c7861(0x1b0))/0x4+parseInt(_0x2c7861(0x1bd))/0x5*(-parseInt(_0x2c7861(0x178))/0x6)+-parseInt(_0x2c7861(0x1e8))/0x7*(-parseInt(_0x2c7861(0x197))/0x8)+-parseInt(_0x2c7861(0x171))/0x9*(-parseInt(_0x2c7861(0x179))/0xa)+-parseInt(_0x2c7861(0x124))/0xb*(parseInt(_0x2c7861(0x14e))/0xc);if(_0x585a5f===_0x46a218)break;else _0x3a5490['push'](_0x3a5490['shift']());}catch(_0x572525){_0x3a5490['push'](_0x3a5490['shift']());}}}(_0x48ca,0xd1394));import{randomUUID as _0x568d4c}from'node:crypto';import{mkdir as _0x229735,readFile as _0x327b2b,readdir as _0x23a838,rename as _0x18e241,rm as _0x3a1ba3,stat as _0x338b48,unlink as _0xb6b66e,writeFile as _0x5bca69}from'node:fs/promises';import{dirname as _0x3a2a08,isAbsolute as _0x37d03e,join as _0x594d1b,parse as _0x26b40e,resolve as _0x395d44}from'node:path';import{readFileSync as _0x1fcc03}from'node:fs';var h=class extends Error{[_0x21b277(0x1af)];[_0x21b277(0x15b)];constructor(_0x743bdf,_0x29b91d,_0x562aa3,_0x2f0347){const _0x181a5c=_0x21b277;super(_0x29b91d,_0x2f0347),this[_0x181a5c(0x1af)]=_0x743bdf,this[_0x181a5c(0x15b)]=_0x562aa3,this[_0x181a5c(0x127)]=_0x181a5c(0x1de);}};function g(_0x1a8121){return _0x1a8121 instanceof h;}var _=/^[A-Za-z0-9._-]+$/u,v=0xff,y=0x4;function b(_0x3ffe41){const _0xa9e824=_0x21b277;return _[_0xa9e824(0x15f)](_0x3ffe41)&&_0x3ffe41!=='.'&&_0x3ffe41!=='..';}function x(_0x35f9dc){const _0x5c7ba9=_0x21b277;if(!b(_0x35f9dc)||_0x35f9dc[_0x5c7ba9(0x19f)]('-')||_0x35f9dc[_0x5c7ba9(0x1e5)]('--')||_0x35f9dc[_0x5c7ba9(0x1b4)]>v)throw new h(_0x5c7ba9(0x143),_0x5c7ba9(0x166)+_0x35f9dc+'\x22:\x20expected\x20an\x20addressable\x20filesystem-safe\x20component\x20without\x20\x22--\x22.');}function S(_0x41072c){const _0x38ff78=_0x21b277;if(!b(_0x41072c)||_0x41072c[_0x38ff78(0x1b4)]+y>v)throw new h(_0x38ff78(0x1c5),_0x38ff78(0x151)+_0x41072c+_0x38ff78(0x1e1));}function _0x1cb0(_0x24f1aa,_0x514f49){_0x24f1aa=_0x24f1aa-0x11d;const _0x48ca62=_0x48ca();let _0x1cb0d5=_0x48ca62[_0x24f1aa];return _0x1cb0d5;}function C(_0x435b92){const _0x295b7f=_0x21b277;let _0x11120b=_0x435b92['split']('/');if(_0x11120b[_0x295b7f(0x1b4)]!==0x2||_0x11120b[0x0]===''||_0x11120b[0x1]==='')throw new h(_0x295b7f(0x17a),_0x295b7f(0x16a)+_0x435b92+'\x22;\x20expected\x20<registryId>/<resourceId>.',_0x435b92);let _0x1af40e=_0x11120b[0x0],_0x307032=_0x11120b[0x1];return x(_0x1af40e),S(_0x307032),{'registryId':_0x1af40e,'resourceId':_0x307032};}function ee(_0x463b1d,_0x5c0b96){return x(_0x463b1d),S(_0x5c0b96),_0x463b1d+'/'+_0x5c0b96;}function w(_0x519380){const _0x288ce1=_0x21b277;let {registryId:_0x701a12,resourceId:_0x1789fa}=C(_0x519380),_0x4ef26c=_0x701a12+'--'+_0x1789fa+_0x288ce1(0x1b2);if(_0x4ef26c[_0x288ce1(0x1b4)]>v)throw new h(_0x288ce1(0x1ea),_0x288ce1(0x1df)+v+'\x20bytes.',_0x519380);return _0x4ef26c;}function T(_0xf6e894){const _0x56dd67=_0x21b277;return new h(_0x56dd67(0x1e7),_0x56dd67(0x1a4)+_0xf6e894);}function _0x48ca(){const _0xae9f23=['Cannot\x20read\x20resource\x20manifest\x20at\x20','tags','group','resource-download-too-many-redirects','aborted','3381507haxQPG','handle','reference','cancel','type','test','globalIndex','utf8','\x20ID\x20\x22','1xmRXNk','resource-manifest-read-failed','resource-limit-invalid','Invalid\x20registry\x20ID\x20\x22','maxBytes','body','listRegistries','Invalid\x20resource\x20handle\x20\x22','en-US','location','resource-download-invalid-utf8','.description','cache','map','9EnIfOP','catch','set','has','\x20bytes.','isFinite','].input.registryId','2311734jQmoVj','1386020Hdlzgi','resource-invalid-handle','isArray','\x20without\x20a\x20Location\x20header.','\x20must\x20be\x20a\x20boolean.','.id','resource-invalid-svg','message','headers','.payload','intrinsicSize','\x20must\x20be\x20an\x20array.','cacheLocation','byteLength','registrations[','image','queries','\x20must\x20be\x20a\x20finite\x20number.','resources','registryById','\x22:\x20','Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.','.intrinsicSize.width','source','byteCount','\x20must\x20be\x20a\x20non-empty\x20string.','replace','utf-8','Duplicate\x20resource\x20handle\x20\x22','Resource\x20URL\x20must\x20use\x20HTTPS.','223480riTCjO','downloader','Resource\x20server\x20returned\x20HTTP\x20','description','manifest.registrations','registrationIndex','colorEditable','.name','startsWith','resource-download-insecure','Duplicate\x20','decode','.intrinsicSize.height','Invalid\x20resource\x20manifest:\x20','resource-download-invalid-svg','export','slice','catalog','\x20must\x20be\x20an\x20object.','Duplicate\x20registry\x20ID\x20\x22','.intrinsicSize\x20must\x20be\x20positive.','filter','https:','clear','code','1271904btNaOI',']\x20must\x20be\x20a\x20string.','.svg','resource-download-invalid-redirect','length','fetch','write','NFKC','].input.resources[','maxRedirects','.type\x20must\x20be\x20\x22image\x22.','text','keywords','20JSbpGW','width','output','order','status','value','done','resource','resource-invalid-resource-id','isInteger','\x20contains\x20no\x20usable\x20localized\x20text.','searchText','values','].input','size','Resource\x20search\x20needs\x20at\x20least\x20one\x20non-empty\x20query.','isFile','label','abort','.resource-','protocol','Resource\x20cache\x20root\x20must\x20be\x20an\x20absolute,\x20dedicated\x20directory\x20below\x20the\x20filesystem\x20root;\x20received\x20\x22','concat','toLowerCase','number','Resource\x20response\x20is\x20not\x20valid\x20UTF-8.','entries','.source','download','boolean','manifest','string','resource-not-found','ResourceLibraryError','Resource\x20export\x20filename\x20exceeds\x20','object','\x22:\x20expected\x20filesystem-safe\x20characters.','read','.source.type\x20must\x20be\x20\x22url\x22.','.storagePolicy\x20must\x20be\x20\x22reference\x22.','includes','resourceByHandle','resource-manifest-invalid','7DPHbAs','join','resource-export-filename-too-long','.tmp','pid','manual','isDirectory','.groupId\x20references\x20unknown\x20group\x20\x22','2986004kTfcPV','normalize','resourceCount','resourceIndex','Resource\x20exceeds\x20the\x20maximum\x20size\x20of\x20','resource-export-failed','33CqwZcu','].input.tags','options','name','.source.value\x20must\x20use\x20HTTPS.','groupId','handles','resource-registry-not-found','ENOENT','input','tagIds','registries','.groupId','Failed\x20to\x20download\x20\x22','timeoutMs','].input.groups','.source.value\x20must\x20be\x20a\x20URL.','registry','push','height','].input.resources','registryId','trim','clearCache','some','groups','Resource\x20search\x20limit\x20must\x20be\x20a\x20positive\x20integer;\x20received\x20\x22','.keywords','defaultLocale','get','signal','resource-invalid-registry-id','\x20ms.','registrations\x20must\x20not\x20be\x20empty.','.tagIds','fetchImpl','Resource\x20server\x20returned\x20an\x20invalid\x20redirect\x20URL.','.tagIds\x20references\x20unknown\x20tag\x20\x22','path','find','].id','Unknown\x20resource\x20\x22','2826192ZumIkT','url','Duplicate\x20export\x20filename\x20\x22','Invalid\x20resource\x20ID\x20\x22','Unknown\x20resource\x20registry\x20\x22','root','getReader'];_0x48ca=function(){return _0xae9f23;};return _0x48ca();}function E(_0xa85802,_0x2716c8){const _0x2eb61f=_0x21b277;if(typeof _0xa85802!=_0x2eb61f(0x1e0)||!_0xa85802||Array[_0x2eb61f(0x17b)](_0xa85802))throw T(_0x2716c8+_0x2eb61f(0x1a9));return _0xa85802;}function D(_0x90c69f,_0x2bf337,_0x10a850=!0x1){const _0x25a3a8=_0x21b277;if(_0x10a850&&_0x90c69f===void 0x0)return[];if(!Array[_0x25a3a8(0x17b)](_0x90c69f))throw T(_0x2bf337+_0x25a3a8(0x184));return _0x90c69f;}function O(_0x10a338,_0x35149b){const _0x52f34d=_0x21b277;if(typeof _0x10a338!=_0x52f34d(0x1dc)||_0x10a338==='')throw T(_0x35149b+_0x52f34d(0x192));return _0x10a338;}function k(_0x3af8b2,_0x11d466,_0x2e6057=!0x1){const _0x5e5601=_0x21b277;return D(_0x3af8b2,_0x11d466,_0x2e6057)[_0x5e5601(0x170)]((_0x1db9d4,_0x261e5e)=>O(_0x1db9d4,_0x11d466+'['+_0x261e5e+']'));}function A(_0x34d2f3,_0x538845){const _0x24afec=_0x21b277;return D(_0x34d2f3,_0x538845,!0x0)[_0x24afec(0x170)]((_0x1a54d9,_0x23c37b)=>{const _0x577a02=_0x24afec;if(typeof _0x1a54d9!='string')throw T(_0x538845+'['+_0x23c37b+_0x577a02(0x1b1));return _0x1a54d9;})[_0x24afec(0x1ac)](_0xa4cf8f=>_0xa4cf8f!=='');}function j(_0x1f1eda,_0x91c572){const _0x58ebb7=_0x21b277;if(typeof _0x1f1eda!=_0x58ebb7(0x1d5)||!Number[_0x58ebb7(0x176)](_0x1f1eda))throw T(_0x91c572+_0x58ebb7(0x18a));return _0x1f1eda;}function M(_0x4a2db0,_0x23d608){const _0x2f3b77=_0x21b277;if(typeof _0x4a2db0!=_0x2f3b77(0x1da))throw T(_0x23d608+_0x2f3b77(0x17d));return _0x4a2db0;}function N(_0x404e53,_0x130f90,_0x4db35b){const _0x5c2a97=_0x21b277;if(typeof _0x404e53=='string'&&_0x404e53!=='')return _0x404e53;let _0x49253c=E(_0x404e53,_0x130f90),_0x1ee734=_0x4db35b===void 0x0?void 0x0:_0x49253c[_0x4db35b];if(typeof _0x1ee734==_0x5c2a97(0x1dc)&&_0x1ee734!=='')return _0x1ee734;let _0x236fd4=_0x49253c[_0x5c2a97(0x16b)];if(typeof _0x236fd4==_0x5c2a97(0x1dc)&&_0x236fd4!=='')return _0x236fd4;let _0x2fb988=Object[_0x5c2a97(0x1c9)](_0x49253c)[_0x5c2a97(0x14b)](_0x3be431=>typeof _0x3be431=='string'&&_0x3be431!=='');if(_0x2fb988!==void 0x0)return _0x2fb988;throw T(_0x130f90+_0x5c2a97(0x1c7));}function P(_0x1835d2,_0x105db4,_0x5a657f){const _0x2757b1=_0x21b277;try{_0x5a657f==='registry'?x(_0x1835d2):S(_0x1835d2);}catch(_0x2edfc3){throw T(_0x105db4+':\x20'+(_0x2edfc3 instanceof Error?_0x2edfc3[_0x2757b1(0x180)]:String(_0x2edfc3)));}}function F(_0x45ebb4,_0x404e27,_0xfc89c8){const _0x173b93=_0x21b277;let _0x5655c7=new Map();for(let [_0x1c090d,_0x346c82]of D(_0x45ebb4,_0x404e27,!0x0)[_0x173b93(0x1d7)]()){let _0xf00ba=E(_0x346c82,_0x404e27+'['+_0x1c090d+']'),_0x493705=O(_0xf00ba['id'],_0x404e27+'['+_0x1c090d+_0x173b93(0x14c));if(P(_0x493705,_0x404e27+'['+_0x1c090d+_0x173b93(0x14c),'resource'),_0x5655c7[_0x173b93(0x174)](_0x493705))throw T(_0x173b93(0x1a1)+_0x404e27+_0x173b93(0x162)+_0x493705+'\x22.');_0x5655c7[_0x173b93(0x173)](_0x493705,N(_0xf00ba['label'],_0x404e27+'['+_0x1c090d+'].label',_0xfc89c8));}return _0x5655c7;}function I(_0x3dfcec,_0xf18a94){const _0x3b4255=_0x21b277;let _0x4a43ec=E(_0x3dfcec[_0x3b4255(0x183)],_0xf18a94+'.intrinsicSize'),_0x29c8b5=j(_0x4a43ec[_0x3b4255(0x1be)],_0xf18a94+_0x3b4255(0x18f)),_0x584875=j(_0x4a43ec[_0x3b4255(0x137)],_0xf18a94+_0x3b4255(0x1a3));if(_0x29c8b5<=0x0||_0x584875<=0x0)throw T(_0xf18a94+_0x3b4255(0x1ab));return{'width':_0x29c8b5,'height':_0x584875};}function L(_0x24d6e9,_0x382cab){const _0xc8815e=_0x21b277;if(_0x24d6e9['type']!==_0xc8815e(0x188))throw T(_0x382cab+_0xc8815e(0x1ba));if(_0x24d6e9['storagePolicy']!==_0xc8815e(0x15c))throw T(_0x382cab+_0xc8815e(0x1e4));let _0x2da962=E(_0x24d6e9[_0xc8815e(0x190)],_0x382cab+_0xc8815e(0x1d8));if(_0x2da962[_0xc8815e(0x15e)]!==_0xc8815e(0x14f))throw T(_0x382cab+_0xc8815e(0x1e3));let _0x53a96d=O(_0x2da962['value'],_0x382cab+'.source.value'),_0x2bac46;try{_0x2bac46=new URL(_0x53a96d);}catch{throw T(_0x382cab+_0xc8815e(0x134));}if(_0x2bac46[_0xc8815e(0x1d1)]!==_0xc8815e(0x1ad))throw T(_0x382cab+_0xc8815e(0x128));return _0x53a96d;}function R(_0x404cb5){const _0x47dfe8=_0x21b277;return _0x404cb5[_0x47dfe8(0x11f)](_0x47dfe8(0x1b7))[_0x47dfe8(0x1d4)]()[_0x47dfe8(0x13a)]()[_0x47dfe8(0x193)](/\s+/gu,'\x20');}function z(_0x44ca81){const _0x65c4cc=_0x21b277;let _0x3c878b=E(_0x44ca81,_0x65c4cc(0x1db)),_0x23a565=new Map(),_0x2d82e7=new Map(),_0x3f0d03=[],_0x1178fc=[],_0x1d15e5=new Set(),_0x4061d1=0x0;for(let [_0x5d626d,_0x1dadf6]of D(_0x3c878b['registrations'],_0x65c4cc(0x19b))['entries']()){let _0x39337b=E(E(_0x1dadf6,'registrations['+_0x5d626d+']')[_0x65c4cc(0x12d)],'registrations['+_0x5d626d+_0x65c4cc(0x1ca)),_0x15041c=O(_0x39337b[_0x65c4cc(0x139)],'registrations['+_0x5d626d+'].input.registryId');if(P(_0x15041c,_0x65c4cc(0x187)+_0x5d626d+_0x65c4cc(0x177),_0x65c4cc(0x135)),_0x23a565[_0x65c4cc(0x174)](_0x15041c))throw T(_0x65c4cc(0x1aa)+_0x15041c+'\x22.');let _0x253bee=_0x39337b[_0x65c4cc(0x140)]===void 0x0?void 0x0:O(_0x39337b['defaultLocale'],_0x65c4cc(0x187)+_0x5d626d+'].input.defaultLocale'),_0x5894d6=F(_0x39337b[_0x65c4cc(0x13d)],'registrations['+_0x5d626d+_0x65c4cc(0x133),_0x253bee),_0x59c40e=F(_0x39337b[_0x65c4cc(0x156)],_0x65c4cc(0x187)+_0x5d626d+_0x65c4cc(0x125),_0x253bee),_0x39e26c=[];for(let [_0x2b42eb,_0x4167c7]of D(_0x39337b[_0x65c4cc(0x18b)],_0x65c4cc(0x187)+_0x5d626d+_0x65c4cc(0x138))[_0x65c4cc(0x1d7)]()){let _0x2d8247=_0x65c4cc(0x187)+_0x5d626d+_0x65c4cc(0x1b8)+_0x2b42eb+']',_0x1b7479=E(_0x4167c7,_0x2d8247),_0x2aa883=O(_0x1b7479['id'],_0x2d8247+_0x65c4cc(0x17e));P(_0x2aa883,_0x2d8247+_0x65c4cc(0x17e),_0x65c4cc(0x1c4));let _0x3a2a73=ee(_0x15041c,_0x2aa883);if(_0x2d82e7['has'](_0x3a2a73))throw T(_0x65c4cc(0x195)+_0x3a2a73+'\x22.');let _0x27e414;try{_0x27e414=w(_0x3a2a73);}catch(_0xcc406e){throw T(_0x2d8247+':\x20'+(_0xcc406e instanceof Error?_0xcc406e[_0x65c4cc(0x180)]:String(_0xcc406e)));}if(_0x1d15e5[_0x65c4cc(0x174)](_0x27e414))throw T(_0x65c4cc(0x150)+_0x27e414+'\x22.');_0x1d15e5['add'](_0x27e414);let _0x30727f=_0x1b7479['groupId']===void 0x0?void 0x0:O(_0x1b7479[_0x65c4cc(0x129)],_0x2d8247+_0x65c4cc(0x130));if(_0x30727f!==void 0x0&&!_0x5894d6[_0x65c4cc(0x174)](_0x30727f))throw T(_0x2d8247+_0x65c4cc(0x11d)+_0x30727f+'\x22.');let _0x5c72a5=k(_0x1b7479[_0x65c4cc(0x12e)],_0x2d8247+_0x65c4cc(0x146),!0x0);for(let _0x2c1eae of _0x5c72a5)if(!_0x59c40e[_0x65c4cc(0x174)](_0x2c1eae))throw T(_0x2d8247+_0x65c4cc(0x149)+_0x2c1eae+'\x22.');let _0x534f67=A(_0x1b7479[_0x65c4cc(0x1bc)],_0x2d8247+_0x65c4cc(0x13f)),_0x3e4953=N(_0x1b7479[_0x65c4cc(0x127)],_0x2d8247+_0x65c4cc(0x19e),_0x253bee),_0x169b76=_0x1b7479['description']===void 0x0?void 0x0:N(_0x1b7479[_0x65c4cc(0x19a)],_0x2d8247+_0x65c4cc(0x16e),_0x253bee),_0x1dd320=_0x30727f===void 0x0?null:{'id':_0x30727f,'label':_0x5894d6[_0x65c4cc(0x141)](_0x30727f)},_0x450ae6=_0x5c72a5[_0x65c4cc(0x170)](_0x4e1a6e=>({'id':_0x4e1a6e,'label':_0x59c40e[_0x65c4cc(0x141)](_0x4e1a6e)})),_0x20716d=E(_0x1b7479['payload'],_0x2d8247+_0x65c4cc(0x182)),_0x7cdc4c=_0x1b7479['order']===void 0x0?null:j(_0x1b7479['order'],_0x2d8247+'.order'),_0x1c737c=M(_0x20716d[_0x65c4cc(0x19d)],_0x2d8247+'.payload.colorEditable'),_0x1450e3={'handle':_0x3a2a73,'registryId':_0x15041c,'id':_0x2aa883,'name':_0x3e4953,..._0x169b76===void 0x0?{}:{'description':_0x169b76},'group':_0x1dd320,'tags':_0x450ae6,'keywords':_0x534f67,'order':_0x7cdc4c,'intrinsicSize':I(_0x20716d,_0x2d8247+_0x65c4cc(0x182)),'colorEditable':_0x1c737c,'sourceUrl':L(_0x20716d,_0x2d8247+_0x65c4cc(0x182)),'registrationIndex':_0x5d626d,'resourceIndex':_0x2b42eb,'globalIndex':_0x4061d1,'searchText':R([_0x3e4953,_0x169b76,_0x1dd320?.[_0x65c4cc(0x1ce)],..._0x450ae6[_0x65c4cc(0x170)](_0x531e85=>_0x531e85[_0x65c4cc(0x1ce)]),..._0x534f67][_0x65c4cc(0x1ac)](_0x38c307=>_0x38c307!==void 0x0)[_0x65c4cc(0x1e9)]('\x20'))};_0x4061d1++,_0x39e26c['push'](_0x1450e3),_0x1178fc[_0x65c4cc(0x136)](_0x1450e3),_0x2d82e7[_0x65c4cc(0x173)](_0x3a2a73,_0x1450e3);}let _0x330842={'id':_0x15041c,'groups':_0x5894d6,'tags':_0x59c40e,'resources':_0x39e26c};_0x3f0d03['push'](_0x330842),_0x23a565[_0x65c4cc(0x173)](_0x15041c,_0x330842);}if(_0x3f0d03['length']===0x0)throw T(_0x65c4cc(0x145));return{'registries':_0x3f0d03,'registryById':_0x23a565,'resourceByHandle':_0x2d82e7,'resources':_0x1178fc};}function B(_0x35669d,_0x5dd396){const _0x391b24=_0x21b277;C(_0x5dd396);let _0x59a809=_0x35669d[_0x391b24(0x1e6)]['get'](_0x5dd396);if(_0x59a809===void 0x0)throw new h(_0x391b24(0x1dd),_0x391b24(0x14d)+_0x5dd396+'\x22;\x20try\x20resources\x20find\x20<query>.',_0x5dd396);return _0x59a809;}function te(_0x23ce7a){const _0x23277e=_0x21b277;return _0x23ce7a[_0x23277e(0x12f)]['map'](_0x14b5c6=>({'id':_0x14b5c6['id'],'resourceCount':_0x14b5c6[_0x23277e(0x18b)][_0x23277e(0x1b4)],'groupCount':_0x14b5c6[_0x23277e(0x13d)]['size'],'tagCount':_0x14b5c6[_0x23277e(0x156)]['size'],'colorEditableCount':_0x14b5c6['resources'][_0x23277e(0x1ac)](_0x37f80d=>_0x37f80d['colorEditable'])[_0x23277e(0x1b4)]}));}function ne(_0x3fc505){const _0x500361=_0x21b277;return{'handle':_0x3fc505[_0x500361(0x15b)],'registryId':_0x3fc505[_0x500361(0x139)],'id':_0x3fc505['id'],'name':_0x3fc505[_0x500361(0x127)],'group':_0x3fc505[_0x500361(0x157)],'tags':_0x3fc505['tags'],'keywords':_0x3fc505[_0x500361(0x1bc)],'order':_0x3fc505['order'],'intrinsicSize':_0x3fc505[_0x500361(0x183)],'colorEditable':_0x3fc505[_0x500361(0x19d)]};}function re(_0xc9217f,_0x6f6f55){const _0x2d1d1b=_0x21b277;let _0x5562a3=(_0xc9217f[_0x2d1d1b(0x1c0)]??_0xc9217f['globalIndex'])-(_0x6f6f55[_0x2d1d1b(0x1c0)]??_0x6f6f55[_0x2d1d1b(0x160)]);if(_0x5562a3!==0x0)return _0x5562a3;let _0x4a619a=_0xc9217f['registrationIndex']-_0x6f6f55[_0x2d1d1b(0x19c)];if(_0x4a619a!==0x0)return _0x4a619a;let _0x3bf6c0=_0xc9217f['resourceIndex']-_0x6f6f55[_0x2d1d1b(0x121)];return _0x3bf6c0===0x0?_0xc9217f[_0x2d1d1b(0x15b)]['localeCompare'](_0x6f6f55[_0x2d1d1b(0x15b)]):_0x3bf6c0;}function ie(_0x3db298,_0xac730a){const _0x39f72e=_0x21b277;let _0x4ce6f4=_0xac730a[_0x39f72e(0x189)][_0x39f72e(0x170)](R)[_0x39f72e(0x1ac)](_0x170cb5=>_0x170cb5!=='');if(_0x4ce6f4['length']===0x0)throw new h('resource-query-empty',_0x39f72e(0x1cc));let _0x1df9d2=new Set(_0xac730a[_0x39f72e(0x12f)]??[]);for(let _0x165643 of _0x1df9d2)if(!_0x3db298[_0x39f72e(0x18c)]['has'](_0x165643))throw new h(_0x39f72e(0x12b),_0x39f72e(0x152)+_0x165643+'\x22.');let _0x1b498a=_0xac730a['limit']??_0x3db298[_0x39f72e(0x18b)][_0x39f72e(0x1b4)];if(!Number[_0x39f72e(0x1c6)](_0x1b498a)||_0x1b498a<0x1)throw new h(_0x39f72e(0x165),_0x39f72e(0x13e)+_0x1b498a+'\x22.');let _0x42372b=_0x3db298[_0x39f72e(0x18b)]['filter'](_0x4e0b28=>_0x1df9d2[_0x39f72e(0x1cb)]===0x0||_0x1df9d2[_0x39f72e(0x174)](_0x4e0b28[_0x39f72e(0x139)]))['filter'](_0x47df9d=>_0x4ce6f4[_0x39f72e(0x13c)](_0x501ab4=>_0x47df9d[_0x39f72e(0x1c8)]['includes'](_0x501ab4)))['sort'](re);return{'resources':_0x42372b[_0x39f72e(0x1a7)](0x0,_0x1b498a)[_0x39f72e(0x170)](ne),'total':_0x42372b['length']};}function V(_0x3247af){const _0x146d28=_0x21b277;return/^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[^]*?-->\s*)*<svg(?:\s|>)/iu[_0x146d28(0x15f)](_0x3247af);}function H(_0x51adf4,_0x4562c2){const _0x4addd2=_0x21b277;return g(_0x4562c2)?{'handle':_0x51adf4,'code':_0x4562c2[_0x4addd2(0x1af)],'message':_0x4562c2[_0x4addd2(0x180)]}:{'handle':_0x51adf4,'code':_0x4addd2(0x123),'message':_0x4562c2 instanceof Error?_0x4562c2[_0x4addd2(0x180)]:String(_0x4562c2)};}var U=class{[_0x21b277(0x126)];[_0x21b277(0x1a8)];constructor(_0x3b461e){const _0x14b952=_0x21b277;this[_0x14b952(0x126)]=_0x3b461e,this[_0x14b952(0x1a8)]=z(_0x3b461e[_0x14b952(0x1db)]);}get[_0x21b277(0x185)](){const _0x37cce5=_0x21b277;return this['options'][_0x37cce5(0x16f)][_0x37cce5(0x16c)];}[_0x21b277(0x169)](){const _0x4699a=_0x21b277;return te(this[_0x4699a(0x1a8)]);}['find'](_0x1e76e2){return ie(this['catalog'],_0x1e76e2);}async['read'](_0x3a3322){const _0x200bf6=_0x21b277;let _0x401e3e=B(this['catalog'],_0x3a3322[_0x200bf6(0x15b)]),_0x498013=await this[_0x200bf6(0x126)][_0x200bf6(0x16f)][_0x200bf6(0x1e2)](_0x3a3322[_0x200bf6(0x15b)]);if(_0x498013!==void 0x0&&V(_0x498013))return{'handle':_0x3a3322[_0x200bf6(0x15b)],'svg':_0x498013};let _0x5e5967;try{_0x5e5967=await this[_0x200bf6(0x126)][_0x200bf6(0x198)][_0x200bf6(0x1d9)](_0x401e3e['sourceUrl']);}catch(_0x4df8fb){throw g(_0x4df8fb)?_0x4df8fb:new h('resource-download-failed',_0x200bf6(0x131)+_0x3a3322['handle']+_0x200bf6(0x18d)+(_0x4df8fb instanceof Error?_0x4df8fb[_0x200bf6(0x180)]:String(_0x4df8fb)),_0x3a3322[_0x200bf6(0x15b)],{'cause':_0x4df8fb});}if(!V(_0x5e5967))throw new h(_0x200bf6(0x17f),'Downloaded\x20resource\x20\x22'+_0x3a3322[_0x200bf6(0x15b)]+'\x22\x20is\x20not\x20an\x20SVG\x20document.',_0x3a3322['handle']);return await this[_0x200bf6(0x126)][_0x200bf6(0x16f)]['write'](_0x3a3322[_0x200bf6(0x15b)],_0x5e5967),{'handle':_0x3a3322[_0x200bf6(0x15b)],'svg':_0x5e5967};}async[_0x21b277(0x1a6)](_0x37fa4a){const _0x28ae5f=_0x21b277;let _0x81d449=[],_0x4150bf=[];for(let _0x413c21 of _0x37fa4a[_0x28ae5f(0x12a)])try{let {svg:_0xa76e99}=await this['read']({'handle':_0x413c21}),_0x2b0c87=await this['options'][_0x28ae5f(0x1bf)][_0x28ae5f(0x1b6)](_0x37fa4a['destination'],w(_0x413c21),_0xa76e99);_0x81d449[_0x28ae5f(0x136)]({'handle':_0x413c21,'path':_0x2b0c87});}catch(_0x3b2d86){_0x4150bf[_0x28ae5f(0x136)](H(_0x413c21,_0x3b2d86));}return{'exported':_0x81d449,'failed':_0x4150bf};}async[_0x21b277(0x13b)](){const _0x2fbf2f=_0x21b277;return await this[_0x2fbf2f(0x126)][_0x2fbf2f(0x16f)][_0x2fbf2f(0x1ae)]();}};function W(_0x589368){return new U(_0x589368);}function G(_0x33eb6f){return _0x33eb6f instanceof Error&&'code'in _0x33eb6f;}function K(_0x543def){const _0x9ad95=_0x21b277;let _0x32f0bc=_0x395d44(_0x543def);if(!_0x37d03e(_0x543def)||_0x32f0bc===_0x26b40e(_0x32f0bc)[_0x9ad95(0x153)])throw new h('resource-cache-root-invalid',_0x9ad95(0x1d2)+_0x543def+'\x22.');return _0x32f0bc;}async function q(_0x9a0f73){const _0x2281bd=_0x21b277;let _0x632cf0;try{_0x632cf0=await _0x23a838(_0x9a0f73,{'withFileTypes':!0x0});}catch(_0x12a781){if(G(_0x12a781)&&_0x12a781[_0x2281bd(0x1af)]===_0x2281bd(0x12c))return{'resourceCount':0x0,'byteCount':0x0};throw _0x12a781;}let _0x21042f=0x0,_0x79df33=0x0;for(let _0x261dbb of _0x632cf0){let _0x55ba84=_0x594d1b(_0x9a0f73,_0x261dbb['name']);if(_0x261dbb[_0x2281bd(0x1ee)]()){let _0x2c7a14=await q(_0x55ba84);_0x21042f+=_0x2c7a14[_0x2281bd(0x120)],_0x79df33+=_0x2c7a14[_0x2281bd(0x191)];}else{if(_0x261dbb[_0x2281bd(0x1cd)]()&&_0x261dbb[_0x2281bd(0x127)]['endsWith'](_0x2281bd(0x1b2))){let _0x534893=await _0x338b48(_0x55ba84);_0x21042f++,_0x79df33+=_0x534893[_0x2281bd(0x1cb)];}}}return{'resourceCount':_0x21042f,'byteCount':_0x79df33};}var J=class{[_0x21b277(0x16c)];constructor(_0x21b49e){this['location']=K(_0x21b49e);}[_0x21b277(0x14a)](_0x45fbe9){const _0x7c6ed7=_0x21b277;let {registryId:_0x15de7b,resourceId:_0x1999fe}=C(_0x45fbe9);return _0x594d1b(this[_0x7c6ed7(0x16c)],_0x15de7b,_0x1999fe+_0x7c6ed7(0x1b2));}async[_0x21b277(0x1e2)](_0x307a2e){const _0x44ae2c=_0x21b277;try{return await _0x327b2b(this['path'](_0x307a2e),_0x44ae2c(0x161));}catch(_0x1a06b7){if(G(_0x1a06b7)&&_0x1a06b7[_0x44ae2c(0x1af)]===_0x44ae2c(0x12c))return;throw _0x1a06b7;}}async[_0x21b277(0x1b6)](_0x47e4f0,_0x1ce930){const _0x403efe=_0x21b277;let _0x4534fd=this[_0x403efe(0x14a)](_0x47e4f0);await _0x229735(_0x3a2a08(_0x4534fd),{'recursive':!0x0});let _0x37bf04=_0x594d1b(_0x3a2a08(_0x4534fd),_0x403efe(0x1d0)+process[_0x403efe(0x1ec)]+'-'+_0x568d4c()+_0x403efe(0x1eb));try{await _0x5bca69(_0x37bf04,_0x1ce930,{'encoding':_0x403efe(0x161),'mode':0x180}),await _0x18e241(_0x37bf04,_0x4534fd);}catch(_0x287ee6){throw await _0xb6b66e(_0x37bf04)[_0x403efe(0x172)](()=>void 0x0),_0x287ee6;}}async['clear'](){const _0x1b6b24=_0x21b277;let _0x466bed=await q(this[_0x1b6b24(0x16c)]);return await _0x3a1ba3(this[_0x1b6b24(0x16c)],{'force':!0x0,'recursive':!0x0}),{'path':this['location'],..._0x466bed};}},Y=class{async[_0x21b277(0x1b6)](_0x345079,_0x46821d,_0x500335){const _0x4c125d=_0x21b277;await _0x229735(_0x345079,{'recursive':!0x0});let _0x1c6594=_0x594d1b(_0x345079,_0x46821d);return await _0x5bca69(_0x1c6594,_0x500335,_0x4c125d(0x161)),_0x1c6594;}},X=0x7530,ae=0xa00000,oe=0xa,se=new Set([0x12d,0x12e,0x12f,0x133,0x134]);function Z(_0x53a11e){const _0x782de5=_0x21b277;return new h('resource-download-too-large',_0x782de5(0x122)+_0x53a11e+_0x782de5(0x175));}async function ce(_0x1d77e5,_0x49392e){const _0x48362a=_0x21b277;let _0x4b87b3=Number(_0x1d77e5[_0x48362a(0x181)]['get']('content-length'));if(Number['isFinite'](_0x4b87b3)&&_0x4b87b3>_0x49392e)throw Z(_0x49392e);if(_0x1d77e5[_0x48362a(0x168)]===null){let _0x2d827d=await _0x1d77e5[_0x48362a(0x1bb)]();if(Buffer[_0x48362a(0x186)](_0x2d827d)>_0x49392e)throw Z(_0x49392e);return _0x2d827d;}let _0x2c9438=_0x1d77e5[_0x48362a(0x168)][_0x48362a(0x154)](),_0x505acd=[],_0xbea7a4=0x0;try{for(;;){let _0x473e8f=await _0x2c9438[_0x48362a(0x1e2)]();if(_0x473e8f[_0x48362a(0x1c3)])break;if(_0xbea7a4+=_0x473e8f[_0x48362a(0x1c2)][_0x48362a(0x186)],_0xbea7a4>_0x49392e)throw await _0x2c9438[_0x48362a(0x15d)]()['catch'](()=>void 0x0),Z(_0x49392e);_0x505acd['push'](_0x473e8f[_0x48362a(0x1c2)]);}}finally{_0x2c9438['releaseLock']();}try{return new TextDecoder(_0x48362a(0x194),{'fatal':!0x0})[_0x48362a(0x1a2)](Buffer[_0x48362a(0x1d3)](_0x505acd,_0xbea7a4));}catch{throw new h(_0x48362a(0x16d),_0x48362a(0x1d6));}}var Q=class{[_0x21b277(0x147)];['timeoutMs'];[_0x21b277(0x167)];['maxRedirects'];constructor(_0x490091={}){const _0x215b9d=_0x21b277;this[_0x215b9d(0x147)]=_0x490091[_0x215b9d(0x1b5)]??fetch,this[_0x215b9d(0x132)]=_0x490091[_0x215b9d(0x132)]??X,this[_0x215b9d(0x167)]=_0x490091[_0x215b9d(0x167)]??ae,this['maxRedirects']=_0x490091[_0x215b9d(0x1b9)]??oe;}async[_0x21b277(0x1d9)](_0x158e63){const _0x10bd92=_0x21b277;let _0x5cbb2f=new URL(_0x158e63);if(_0x5cbb2f[_0x10bd92(0x1d1)]!=='https:')throw new h(_0x10bd92(0x1a0),_0x10bd92(0x196));let _0x4d122f=new AbortController(),_0x28ebed=setTimeout(()=>_0x4d122f[_0x10bd92(0x1cf)](),this[_0x10bd92(0x132)]);try{let _0x201315=_0x5cbb2f;for(let _0x5575f4=0x0;;_0x5575f4++){let _0x22af4e=await this[_0x10bd92(0x147)](_0x201315,{'redirect':_0x10bd92(0x1ed),'signal':_0x4d122f[_0x10bd92(0x142)]});if(se[_0x10bd92(0x174)](_0x22af4e[_0x10bd92(0x1c1)])){if(_0x5575f4>=this[_0x10bd92(0x1b9)])throw new h(_0x10bd92(0x158),'Resource\x20request\x20followed\x20too\x20many\x20redirects;\x20maximum\x20'+this[_0x10bd92(0x1b9)]+'.');let _0x7a9937=_0x22af4e['headers'][_0x10bd92(0x141)](_0x10bd92(0x16c));if(_0x7a9937===null)throw new h(_0x10bd92(0x1b3),_0x10bd92(0x199)+_0x22af4e[_0x10bd92(0x1c1)]+_0x10bd92(0x17c));let _0x11af56;try{_0x11af56=new URL(_0x7a9937,_0x201315);}catch{throw new h('resource-download-invalid-redirect',_0x10bd92(0x148));}if(_0x11af56['protocol']!==_0x10bd92(0x1ad))throw new h('resource-download-insecure-redirect',_0x10bd92(0x18e));_0x201315=_0x11af56;continue;}if(!_0x22af4e['ok'])throw new h('resource-download-http',_0x10bd92(0x199)+_0x22af4e['status']+'.');if(_0x22af4e[_0x10bd92(0x14f)]!==''&&new URL(_0x22af4e['url'])[_0x10bd92(0x1d1)]!==_0x10bd92(0x1ad))throw new h('resource-download-insecure-redirect','Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.');let _0x52b4d2=await ce(_0x22af4e,this[_0x10bd92(0x167)]);if(!V(_0x52b4d2))throw new h(_0x10bd92(0x1a5),'Resource\x20response\x20is\x20not\x20an\x20SVG\x20document.');return _0x52b4d2;}}catch(_0x22c394){throw _0x4d122f[_0x10bd92(0x142)][_0x10bd92(0x159)]?new h('resource-download-timeout','Resource\x20download\x20timed\x20out\x20after\x20'+this[_0x10bd92(0x132)]+_0x10bd92(0x144)):_0x22c394;}finally{clearTimeout(_0x28ebed);}}};function $(_0x239c11){const _0x441ac9=_0x21b277;try{return JSON['parse'](_0x1fcc03(_0x239c11,'utf8'));}catch(_0x6e539b){throw new h(_0x441ac9(0x164),_0x441ac9(0x155)+_0x239c11+':\x20'+(_0x6e539b instanceof Error?_0x6e539b['message']:String(_0x6e539b)),void 0x0,{'cause':_0x6e539b});}}function le(_0x32f136){const _0x26d202=_0x21b277;let _0x1f1509;return()=>(_0x1f1509??=W({'manifest':$(_0x32f136['manifestPath']),'cache':new J(_0x32f136['cacheRoot']),'downloader':new Q(_0x32f136[_0x26d202(0x198)]),'output':new Y()}),_0x1f1509);}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 _0x475546=_0x5719;function _0x5719(_0x18aace,_0x562e3e){_0x18aace=_0x18aace-0x144;const _0x449913=_0x4499();let _0x57194b=_0x449913[_0x18aace];return _0x57194b;}(function(_0x14594b,_0x154876){const _0x38fb64=_0x5719,_0x4a8700=_0x14594b();while(!![]){try{const _0x16ee6c=-parseInt(_0x38fb64(0x152))/0x1+-parseInt(_0x38fb64(0x1a0))/0x2*(-parseInt(_0x38fb64(0x214))/0x3)+-parseInt(_0x38fb64(0x20a))/0x4+-parseInt(_0x38fb64(0x207))/0x5*(parseInt(_0x38fb64(0x165))/0x6)+parseInt(_0x38fb64(0x190))/0x7+parseInt(_0x38fb64(0x1d3))/0x8+parseInt(_0x38fb64(0x14d))/0x9;if(_0x16ee6c===_0x154876)break;else _0x4a8700['push'](_0x4a8700['shift']());}catch(_0x284cce){_0x4a8700['push'](_0x4a8700['shift']());}}}(_0x4499,0x1cfe9));import{randomUUID as _0x2893f4}from'node:crypto';import{mkdir as _0x3a3f8d,readFile as _0x13809d,readdir as _0x29b619,rename as _0x2fe6fe,rm as _0x135ca4,stat as _0x12e2ce,unlink as _0x261243,writeFile as _0x285ccc}from'node:fs/promises';import{dirname as _0x32abfa,isAbsolute as _0x3217d9,join as _0x202795,parse as _0x50a63d,resolve as _0xe6d384}from'node:path';import{readFileSync as _0x1c35fa}from'node:fs';var h=class extends Error{['code'];[_0x475546(0x1cb)];constructor(_0x410894,_0x5a7484,_0x31cd83,_0x28fc8e){const _0x14a83d=_0x475546;super(_0x5a7484,_0x28fc8e),this[_0x14a83d(0x18a)]=_0x410894,this[_0x14a83d(0x1cb)]=_0x31cd83,this[_0x14a83d(0x1ac)]=_0x14a83d(0x195);}};function g(_0x392b1b){return _0x392b1b instanceof h;}var _=/^[A-Za-z0-9._-]+$/u,v=0xff,y=0x4;function b(_0x33eb6c){return _['test'](_0x33eb6c)&&_0x33eb6c!=='.'&&_0x33eb6c!=='..';}function x(_0x31d917){const _0x20ae9b=_0x475546;if(!b(_0x31d917)||_0x31d917[_0x20ae9b(0x1ce)]('-')||_0x31d917[_0x20ae9b(0x212)]('--')||_0x31d917['length']>v)throw new h(_0x20ae9b(0x1ec),_0x20ae9b(0x15e)+_0x31d917+_0x20ae9b(0x17a));}function S(_0x351622){const _0x3d810a=_0x475546;if(!b(_0x351622)||_0x351622[_0x3d810a(0x1ee)]+y>v)throw new h(_0x3d810a(0x175),'Invalid\x20resource\x20ID\x20\x22'+_0x351622+_0x3d810a(0x172));}function C(_0x3a1788){const _0x516d52=_0x475546;let _0x236905=_0x3a1788[_0x516d52(0x16e)]('/');if(_0x236905[_0x516d52(0x1ee)]!==0x2||_0x236905[0x0]===''||_0x236905[0x1]==='')throw new h(_0x516d52(0x144),_0x516d52(0x20f)+_0x3a1788+_0x516d52(0x1e7),_0x3a1788);let _0x29d898=_0x236905[0x0],_0x133541=_0x236905[0x1];return x(_0x29d898),S(_0x133541),{'registryId':_0x29d898,'resourceId':_0x133541};}function ee(_0xfe80e6,_0x4ab574){return x(_0xfe80e6),S(_0x4ab574),_0xfe80e6+'/'+_0x4ab574;}function w(_0x4f8dae){const _0x4c2da8=_0x475546;let {registryId:_0x128a84,resourceId:_0x22e4db}=C(_0x4f8dae),_0x295759=_0x128a84+'--'+_0x22e4db+_0x4c2da8(0x150);if(_0x295759[_0x4c2da8(0x1ee)]>v)throw new h(_0x4c2da8(0x1b0),_0x4c2da8(0x1a8)+v+'\x20bytes.',_0x4f8dae);return _0x295759;}function T(_0x31e6b7){const _0xea3d88=_0x475546;return new h(_0xea3d88(0x1fe),'Invalid\x20resource\x20manifest:\x20'+_0x31e6b7);}function E(_0x23dfeb,_0x246d4b){const _0xa4a35d=_0x475546;if(typeof _0x23dfeb!='object'||!_0x23dfeb||Array[_0xa4a35d(0x1e2)](_0x23dfeb))throw T(_0x246d4b+_0xa4a35d(0x1d1));return _0x23dfeb;}function D(_0x2f4234,_0x50e2f4,_0x51278a=!0x1){const _0x4a83d8=_0x475546;if(_0x51278a&&_0x2f4234===void 0x0)return[];if(!Array[_0x4a83d8(0x1e2)](_0x2f4234))throw T(_0x50e2f4+_0x4a83d8(0x203));return _0x2f4234;}function O(_0x44ef52,_0x49941e){const _0x2bbb98=_0x475546;if(typeof _0x44ef52!='string'||_0x44ef52==='')throw T(_0x49941e+_0x2bbb98(0x1a3));return _0x44ef52;}function k(_0x5a053d,_0x216f72,_0x596569=!0x1){return D(_0x5a053d,_0x216f72,_0x596569)['map']((_0x57558a,_0x531152)=>O(_0x57558a,_0x216f72+'['+_0x531152+']'));}function A(_0x496729,_0x7305e9){const _0x1958ea=_0x475546;return D(_0x496729,_0x7305e9,!0x0)[_0x1958ea(0x1be)]((_0x5e978c,_0x57a408)=>{const _0x15750e=_0x1958ea;if(typeof _0x5e978c!=_0x15750e(0x199))throw T(_0x7305e9+'['+_0x57a408+_0x15750e(0x17e));return _0x5e978c;})[_0x1958ea(0x1ed)](_0x288d21=>_0x288d21!=='');}function j(_0x4e3ae9,_0x5d62ef){const _0x46b34b=_0x475546;if(typeof _0x4e3ae9!='number'||!Number[_0x46b34b(0x178)](_0x4e3ae9))throw T(_0x5d62ef+'\x20must\x20be\x20a\x20finite\x20number.');return _0x4e3ae9;}function M(_0x587a79,_0x33b647){const _0x561ee6=_0x475546;if(typeof _0x587a79!=_0x561ee6(0x1e0))throw T(_0x33b647+'\x20must\x20be\x20a\x20boolean.');return _0x587a79;}function N(_0x340db0,_0x19ed6b,_0x49a4ae){const _0xc13024=_0x475546;if(typeof _0x340db0==_0xc13024(0x199)&&_0x340db0!=='')return _0x340db0;let _0x447bd9=E(_0x340db0,_0x19ed6b),_0x40200d=_0x49a4ae===void 0x0?void 0x0:_0x447bd9[_0x49a4ae];if(typeof _0x40200d==_0xc13024(0x199)&&_0x40200d!=='')return _0x40200d;let _0x5df481=_0x447bd9[_0xc13024(0x163)];if(typeof _0x5df481==_0xc13024(0x199)&&_0x5df481!=='')return _0x5df481;let _0xdd7b81=Object[_0xc13024(0x1e8)](_0x447bd9)[_0xc13024(0x15a)](_0x3c5eae=>typeof _0x3c5eae==_0xc13024(0x199)&&_0x3c5eae!=='');if(_0xdd7b81!==void 0x0)return _0xdd7b81;throw T(_0x19ed6b+_0xc13024(0x1c7));}function P(_0x335a35,_0x223fd4,_0x228838){const _0x37c061=_0x475546;try{_0x228838===_0x37c061(0x157)?x(_0x335a35):S(_0x335a35);}catch(_0x2396d0){throw T(_0x223fd4+':\x20'+(_0x2396d0 instanceof Error?_0x2396d0[_0x37c061(0x1bb)]:String(_0x2396d0)));}}function F(_0x553d6e,_0x4932db,_0xdaba06){const _0x39d56c=_0x475546;let _0x570efd=new Map();for(let [_0x582ebc,_0x1e22f9]of D(_0x553d6e,_0x4932db,!0x0)[_0x39d56c(0x1b5)]()){let _0x430363=E(_0x1e22f9,_0x4932db+'['+_0x582ebc+']'),_0x3c4c8b=O(_0x430363['id'],_0x4932db+'['+_0x582ebc+_0x39d56c(0x1b8));if(P(_0x3c4c8b,_0x4932db+'['+_0x582ebc+_0x39d56c(0x1b8),_0x39d56c(0x173)),_0x570efd[_0x39d56c(0x1ad)](_0x3c4c8b))throw T(_0x39d56c(0x1d6)+_0x4932db+_0x39d56c(0x1c6)+_0x3c4c8b+'\x22.');_0x570efd['set'](_0x3c4c8b,N(_0x430363[_0x39d56c(0x1c9)],_0x4932db+'['+_0x582ebc+_0x39d56c(0x14b),_0xdaba06));}return _0x570efd;}function I(_0x463986,_0x34b662){const _0xf3c0a=_0x475546;let _0x482824=E(_0x463986[_0xf3c0a(0x197)],_0x34b662+_0xf3c0a(0x1c5)),_0x1f1872=j(_0x482824[_0xf3c0a(0x1dd)],_0x34b662+'.intrinsicSize.width'),_0x315732=j(_0x482824[_0xf3c0a(0x1ef)],_0x34b662+_0xf3c0a(0x171));if(_0x1f1872<=0x0||_0x315732<=0x0)throw T(_0x34b662+_0xf3c0a(0x1ab));return{'width':_0x1f1872,'height':_0x315732};}function L(_0x5cdebf,_0x17c6f7){const _0x3a7a77=_0x475546;if(_0x5cdebf[_0x3a7a77(0x146)]!==_0x3a7a77(0x16d))throw T(_0x17c6f7+_0x3a7a77(0x213));if(_0x5cdebf[_0x3a7a77(0x192)]!=='reference')throw T(_0x17c6f7+_0x3a7a77(0x17c));let _0x42682d=E(_0x5cdebf[_0x3a7a77(0x148)],_0x17c6f7+_0x3a7a77(0x20d));if(_0x42682d[_0x3a7a77(0x146)]!=='url')throw T(_0x17c6f7+'.source.type\x20must\x20be\x20\x22url\x22.');let _0xcfeed2=O(_0x42682d[_0x3a7a77(0x160)],_0x17c6f7+_0x3a7a77(0x169)),_0x1c3bc3;try{_0x1c3bc3=new URL(_0xcfeed2);}catch{throw T(_0x17c6f7+_0x3a7a77(0x1e1));}if(_0x1c3bc3[_0x3a7a77(0x15b)]!==_0x3a7a77(0x19b))throw T(_0x17c6f7+'.source.value\x20must\x20use\x20HTTPS.');return _0xcfeed2;}function _0x4499(){const _0x45a891=['.intrinsicSize','\x20ID\x20\x22','\x20contains\x20no\x20usable\x20localized\x20text.','sourceUrl','label','].input.groups','handle','searchText','Resource\x20URL\x20must\x20use\x20HTTPS.','startsWith','listRegistries','.payload.colorEditable','\x20must\x20be\x20an\x20object.','manifestPath','318032WgXvtv','options','payload','Duplicate\x20','push','url','registryId','pid','\x20without\x20a\x20Location\x20header.','decode','width','.resource-','isDirectory','boolean','.source.value\x20must\x20be\x20a\x20URL.','isArray','].input','\x22;\x20try\x20resources\x20find\x20<query>.','utf-8','body','\x22;\x20expected\x20<registryId>/<resourceId>.','values','Resource\x20response\x20is\x20not\x20an\x20SVG\x20document.','Resource\x20search\x20limit\x20must\x20be\x20a\x20positive\x20integer;\x20received\x20\x22','\x20ms.','resource-invalid-registry-id','filter','length','height','Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.','resource-download-http','status','catch','.tmp','normalize','Failed\x20to\x20download\x20\x22','endsWith','join','localeCompare','resource-download-too-large','Resource\x20server\x20returned\x20HTTP\x20','resources','ENOENT','resource-manifest-invalid','text','Duplicate\x20registry\x20ID\x20\x22','byteCount','].input.registryId','\x20must\x20be\x20an\x20array.','].input.resources','.keywords','output','204355vUvrKk','Cannot\x20read\x20resource\x20manifest\x20at\x20','manifest','724508yHhmJO','Resource\x20search\x20needs\x20at\x20least\x20one\x20non-empty\x20query.','timeoutMs','.source','location','Invalid\x20resource\x20handle\x20\x22','resource-registry-not-found','.tagIds\x20references\x20unknown\x20tag\x20\x22','includes','.type\x20must\x20be\x20\x22image\x22.','24099NOcmSL','resource-invalid-handle','registrations','type','].input.resources[','source','Resource\x20exceeds\x20the\x20maximum\x20size\x20of\x20','input','].label','byteLength','2101482bCqJwm','download','Resource\x20cache\x20root\x20must\x20be\x20an\x20absolute,\x20dedicated\x20directory\x20below\x20the\x20filesystem\x20root;\x20received\x20\x22','.svg','resource-download-invalid-svg','209796XgigOc','isFile','tagIds','order','registries','registry','clearCache','resource-download-insecure-redirect','find','protocol','headers','\x20bytes.','Invalid\x20registry\x20ID\x20\x22','write','value','export','destination','en-US','.description','24zkinGM','content-length','registrationIndex','concat','.source.value','description','done','\x22:\x20','image','split','Downloaded\x20resource\x20\x22','slice','.intrinsicSize.height','\x22:\x20expected\x20filesystem-safe\x20characters.','resource','Resource\x20server\x20returned\x20an\x20invalid\x20redirect\x20URL.','resource-invalid-resource-id','manual','handles','isFinite','read','\x22:\x20expected\x20an\x20addressable\x20filesystem-safe\x20component\x20without\x20\x22--\x22.','Duplicate\x20resource\x20handle\x20\x22','.storagePolicy\x20must\x20be\x20\x22reference\x22.','groups',']\x20must\x20be\x20a\x20string.','size','group','colorEditable','fetchImpl','cacheLocation','cache','get','resource-download-insecure','registrations\x20must\x20not\x20be\x20empty.','clear','resource-invalid-svg','code','maxRedirects','groupId','resource-query-empty','registryById','catalog','1618561YLCYsf','set','storagePolicy','releaseLock','resource-manifest-read-failed','ResourceLibraryError','resource-download-failed','intrinsicSize','.name','string','cacheRoot','https:','signal','utf8','path','.order','42RhhbVu','.groupId','replace','\x20must\x20be\x20a\x20non-empty\x20string.','resourceIndex','.tagIds','root','Unknown\x20resource\x20registry\x20\x22','Resource\x20export\x20filename\x20exceeds\x20','tags','downloader','.intrinsicSize\x20must\x20be\x20positive.','name','has','Resource\x20download\x20timed\x20out\x20after\x20','.groupId\x20references\x20unknown\x20group\x20\x22','resource-export-filename-too-long','defaultLocale','getReader','Unknown\x20resource\x20\x22','registrations[','entries','.id','keywords','].id','manifest.registrations','add','message','aborted','isInteger','map','.payload','maxBytes','globalIndex','\x22\x20is\x20not\x20an\x20SVG\x20document.','test','parse'];_0x4499=function(){return _0x45a891;};return _0x4499();}function R(_0x422952){const _0x187ab3=_0x475546;return _0x422952[_0x187ab3(0x1f5)]('NFKC')['toLowerCase']()['trim']()[_0x187ab3(0x1a2)](/\s+/gu,'\x20');}function z(_0xb60226){const _0x4372b8=_0x475546;let _0x433654=E(_0xb60226,_0x4372b8(0x209)),_0x1c7581=new Map(),_0x135b68=new Map(),_0xdc71f2=[],_0x3a80d5=[],_0x3a6f67=new Set(),_0x11af76=0x0;for(let [_0xfa68c5,_0x3b68f8]of D(_0x433654[_0x4372b8(0x145)],_0x4372b8(0x1b9))[_0x4372b8(0x1b5)]()){let _0x5ace41=E(E(_0x3b68f8,'registrations['+_0xfa68c5+']')[_0x4372b8(0x14a)],_0x4372b8(0x1b4)+_0xfa68c5+_0x4372b8(0x1e3)),_0x56c50c=O(_0x5ace41[_0x4372b8(0x1d9)],_0x4372b8(0x1b4)+_0xfa68c5+_0x4372b8(0x202));if(P(_0x56c50c,'registrations['+_0xfa68c5+_0x4372b8(0x202),'registry'),_0x1c7581[_0x4372b8(0x1ad)](_0x56c50c))throw T(_0x4372b8(0x200)+_0x56c50c+'\x22.');let _0x184e64=_0x5ace41[_0x4372b8(0x1b1)]===void 0x0?void 0x0:O(_0x5ace41[_0x4372b8(0x1b1)],_0x4372b8(0x1b4)+_0xfa68c5+'].input.defaultLocale'),_0x3b8988=F(_0x5ace41[_0x4372b8(0x17d)],_0x4372b8(0x1b4)+_0xfa68c5+_0x4372b8(0x1ca),_0x184e64),_0x186e25=F(_0x5ace41[_0x4372b8(0x1a9)],_0x4372b8(0x1b4)+_0xfa68c5+'].input.tags',_0x184e64),_0x4a9da3=[];for(let [_0xe8e84a,_0x1ab79a]of D(_0x5ace41['resources'],_0x4372b8(0x1b4)+_0xfa68c5+_0x4372b8(0x204))[_0x4372b8(0x1b5)]()){let _0x27b2a3=_0x4372b8(0x1b4)+_0xfa68c5+_0x4372b8(0x147)+_0xe8e84a+']',_0x5ef0f3=E(_0x1ab79a,_0x27b2a3),_0x3ffb3f=O(_0x5ef0f3['id'],_0x27b2a3+_0x4372b8(0x1b6));P(_0x3ffb3f,_0x27b2a3+_0x4372b8(0x1b6),_0x4372b8(0x173));let _0x372dd8=ee(_0x56c50c,_0x3ffb3f);if(_0x135b68[_0x4372b8(0x1ad)](_0x372dd8))throw T(_0x4372b8(0x17b)+_0x372dd8+'\x22.');let _0x47721e;try{_0x47721e=w(_0x372dd8);}catch(_0x557129){throw T(_0x27b2a3+':\x20'+(_0x557129 instanceof Error?_0x557129[_0x4372b8(0x1bb)]:String(_0x557129)));}if(_0x3a6f67[_0x4372b8(0x1ad)](_0x47721e))throw T('Duplicate\x20export\x20filename\x20\x22'+_0x47721e+'\x22.');_0x3a6f67[_0x4372b8(0x1ba)](_0x47721e);let _0x15ed39=_0x5ef0f3[_0x4372b8(0x18c)]===void 0x0?void 0x0:O(_0x5ef0f3[_0x4372b8(0x18c)],_0x27b2a3+_0x4372b8(0x1a1));if(_0x15ed39!==void 0x0&&!_0x3b8988[_0x4372b8(0x1ad)](_0x15ed39))throw T(_0x27b2a3+_0x4372b8(0x1af)+_0x15ed39+'\x22.');let _0x35f2b6=k(_0x5ef0f3[_0x4372b8(0x154)],_0x27b2a3+_0x4372b8(0x1a5),!0x0);for(let _0x59cf17 of _0x35f2b6)if(!_0x186e25['has'](_0x59cf17))throw T(_0x27b2a3+_0x4372b8(0x211)+_0x59cf17+'\x22.');let _0x2a3266=A(_0x5ef0f3['keywords'],_0x27b2a3+_0x4372b8(0x205)),_0x1997f8=N(_0x5ef0f3[_0x4372b8(0x1ac)],_0x27b2a3+_0x4372b8(0x198),_0x184e64),_0xbc4740=_0x5ef0f3[_0x4372b8(0x16a)]===void 0x0?void 0x0:N(_0x5ef0f3[_0x4372b8(0x16a)],_0x27b2a3+_0x4372b8(0x164),_0x184e64),_0x4ee1b8=_0x15ed39===void 0x0?null:{'id':_0x15ed39,'label':_0x3b8988[_0x4372b8(0x185)](_0x15ed39)},_0x4269e2=_0x35f2b6[_0x4372b8(0x1be)](_0xdfe35c=>({'id':_0xdfe35c,'label':_0x186e25[_0x4372b8(0x185)](_0xdfe35c)})),_0x238066=E(_0x5ef0f3[_0x4372b8(0x1d5)],_0x27b2a3+_0x4372b8(0x1bf)),_0x34cb5a=_0x5ef0f3[_0x4372b8(0x155)]===void 0x0?null:j(_0x5ef0f3['order'],_0x27b2a3+_0x4372b8(0x19f)),_0x1c8a48=M(_0x238066[_0x4372b8(0x181)],_0x27b2a3+_0x4372b8(0x1d0)),_0x242c88={'handle':_0x372dd8,'registryId':_0x56c50c,'id':_0x3ffb3f,'name':_0x1997f8,..._0xbc4740===void 0x0?{}:{'description':_0xbc4740},'group':_0x4ee1b8,'tags':_0x4269e2,'keywords':_0x2a3266,'order':_0x34cb5a,'intrinsicSize':I(_0x238066,_0x27b2a3+_0x4372b8(0x1bf)),'colorEditable':_0x1c8a48,'sourceUrl':L(_0x238066,_0x27b2a3+'.payload'),'registrationIndex':_0xfa68c5,'resourceIndex':_0xe8e84a,'globalIndex':_0x11af76,'searchText':R([_0x1997f8,_0xbc4740,_0x4ee1b8?.[_0x4372b8(0x1c9)],..._0x4269e2[_0x4372b8(0x1be)](_0x11cabb=>_0x11cabb[_0x4372b8(0x1c9)]),..._0x2a3266][_0x4372b8(0x1ed)](_0x591a02=>_0x591a02!==void 0x0)[_0x4372b8(0x1f8)]('\x20'))};_0x11af76++,_0x4a9da3[_0x4372b8(0x1d7)](_0x242c88),_0x3a80d5[_0x4372b8(0x1d7)](_0x242c88),_0x135b68['set'](_0x372dd8,_0x242c88);}let _0x157c82={'id':_0x56c50c,'groups':_0x3b8988,'tags':_0x186e25,'resources':_0x4a9da3};_0xdc71f2['push'](_0x157c82),_0x1c7581[_0x4372b8(0x191)](_0x56c50c,_0x157c82);}if(_0xdc71f2[_0x4372b8(0x1ee)]===0x0)throw T(_0x4372b8(0x187));return{'registries':_0xdc71f2,'registryById':_0x1c7581,'resourceByHandle':_0x135b68,'resources':_0x3a80d5};}function B(_0xf82f90,_0x1c724e){const _0x328054=_0x475546;C(_0x1c724e);let _0x3cf886=_0xf82f90['resourceByHandle'][_0x328054(0x185)](_0x1c724e);if(_0x3cf886===void 0x0)throw new h('resource-not-found',_0x328054(0x1b3)+_0x1c724e+_0x328054(0x1e4),_0x1c724e);return _0x3cf886;}function te(_0xa49a2a){const _0x5a738a=_0x475546;return _0xa49a2a['registries'][_0x5a738a(0x1be)](_0x2e9b6f=>({'id':_0x2e9b6f['id'],'resourceCount':_0x2e9b6f[_0x5a738a(0x1fc)]['length'],'groupCount':_0x2e9b6f[_0x5a738a(0x17d)][_0x5a738a(0x17f)],'tagCount':_0x2e9b6f[_0x5a738a(0x1a9)][_0x5a738a(0x17f)],'colorEditableCount':_0x2e9b6f['resources']['filter'](_0x2c4d73=>_0x2c4d73[_0x5a738a(0x181)])[_0x5a738a(0x1ee)]}));}function ne(_0x28c4ba){const _0x267061=_0x475546;return{'handle':_0x28c4ba[_0x267061(0x1cb)],'registryId':_0x28c4ba[_0x267061(0x1d9)],'id':_0x28c4ba['id'],'name':_0x28c4ba[_0x267061(0x1ac)],'group':_0x28c4ba[_0x267061(0x180)],'tags':_0x28c4ba[_0x267061(0x1a9)],'keywords':_0x28c4ba[_0x267061(0x1b7)],'order':_0x28c4ba[_0x267061(0x155)],'intrinsicSize':_0x28c4ba['intrinsicSize'],'colorEditable':_0x28c4ba['colorEditable']};}function re(_0x121cad,_0x56c3bd){const _0x1b81f3=_0x475546;let _0x49b6e8=(_0x121cad[_0x1b81f3(0x155)]??_0x121cad[_0x1b81f3(0x1c1)])-(_0x56c3bd[_0x1b81f3(0x155)]??_0x56c3bd[_0x1b81f3(0x1c1)]);if(_0x49b6e8!==0x0)return _0x49b6e8;let _0x20ec7c=_0x121cad[_0x1b81f3(0x167)]-_0x56c3bd[_0x1b81f3(0x167)];if(_0x20ec7c!==0x0)return _0x20ec7c;let _0x4160dd=_0x121cad[_0x1b81f3(0x1a4)]-_0x56c3bd[_0x1b81f3(0x1a4)];return _0x4160dd===0x0?_0x121cad[_0x1b81f3(0x1cb)][_0x1b81f3(0x1f9)](_0x56c3bd[_0x1b81f3(0x1cb)]):_0x4160dd;}function ie(_0x69a7e4,_0x589bdd){const _0x4411e1=_0x475546;let _0x15f8d8=_0x589bdd['queries'][_0x4411e1(0x1be)](R)[_0x4411e1(0x1ed)](_0x22db5f=>_0x22db5f!=='');if(_0x15f8d8[_0x4411e1(0x1ee)]===0x0)throw new h(_0x4411e1(0x18d),_0x4411e1(0x20b));let _0x224e59=new Set(_0x589bdd[_0x4411e1(0x156)]??[]);for(let _0x6350e3 of _0x224e59)if(!_0x69a7e4[_0x4411e1(0x18e)][_0x4411e1(0x1ad)](_0x6350e3))throw new h(_0x4411e1(0x210),_0x4411e1(0x1a7)+_0x6350e3+'\x22.');let _0x1e4932=_0x589bdd['limit']??_0x69a7e4[_0x4411e1(0x1fc)][_0x4411e1(0x1ee)];if(!Number[_0x4411e1(0x1bd)](_0x1e4932)||_0x1e4932<0x1)throw new h('resource-limit-invalid',_0x4411e1(0x1ea)+_0x1e4932+'\x22.');let _0x5f42b6=_0x69a7e4[_0x4411e1(0x1fc)][_0x4411e1(0x1ed)](_0x3a1e75=>_0x224e59[_0x4411e1(0x17f)]===0x0||_0x224e59[_0x4411e1(0x1ad)](_0x3a1e75[_0x4411e1(0x1d9)]))['filter'](_0x5944a1=>_0x15f8d8['some'](_0x37e9b6=>_0x5944a1[_0x4411e1(0x1cc)][_0x4411e1(0x212)](_0x37e9b6)))['sort'](re);return{'resources':_0x5f42b6[_0x4411e1(0x170)](0x0,_0x1e4932)['map'](ne),'total':_0x5f42b6[_0x4411e1(0x1ee)]};}function V(_0x51832f){const _0x3bea45=_0x475546;return/^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[^]*?-->\s*)*<svg(?:\s|>)/iu[_0x3bea45(0x1c3)](_0x51832f);}function H(_0x95646a,_0x3f8e26){const _0x4465c3=_0x475546;return g(_0x3f8e26)?{'handle':_0x95646a,'code':_0x3f8e26[_0x4465c3(0x18a)],'message':_0x3f8e26['message']}:{'handle':_0x95646a,'code':'resource-export-failed','message':_0x3f8e26 instanceof Error?_0x3f8e26['message']:String(_0x3f8e26)};}var U=class{[_0x475546(0x1d4)];[_0x475546(0x18f)];constructor(_0x440e92){const _0x3cd868=_0x475546;this['options']=_0x440e92,this[_0x3cd868(0x18f)]=z(_0x440e92['manifest']);}get[_0x475546(0x183)](){const _0x552303=_0x475546;return this['options']['cache'][_0x552303(0x20e)];}[_0x475546(0x1cf)](){const _0x394160=_0x475546;return te(this[_0x394160(0x18f)]);}[_0x475546(0x15a)](_0x1113dd){return ie(this['catalog'],_0x1113dd);}async[_0x475546(0x179)](_0x1f3dc3){const _0x2bc678=_0x475546;let _0x14fdc1=B(this['catalog'],_0x1f3dc3[_0x2bc678(0x1cb)]),_0x29e4dd=await this[_0x2bc678(0x1d4)][_0x2bc678(0x184)]['read'](_0x1f3dc3[_0x2bc678(0x1cb)]);if(_0x29e4dd!==void 0x0&&V(_0x29e4dd))return{'handle':_0x1f3dc3[_0x2bc678(0x1cb)],'svg':_0x29e4dd};let _0x5d6d49;try{_0x5d6d49=await this['options'][_0x2bc678(0x1aa)][_0x2bc678(0x14e)](_0x14fdc1[_0x2bc678(0x1c8)]);}catch(_0x375e29){throw g(_0x375e29)?_0x375e29:new h(_0x2bc678(0x196),_0x2bc678(0x1f6)+_0x1f3dc3[_0x2bc678(0x1cb)]+_0x2bc678(0x16c)+(_0x375e29 instanceof Error?_0x375e29[_0x2bc678(0x1bb)]:String(_0x375e29)),_0x1f3dc3[_0x2bc678(0x1cb)],{'cause':_0x375e29});}if(!V(_0x5d6d49))throw new h(_0x2bc678(0x189),_0x2bc678(0x16f)+_0x1f3dc3[_0x2bc678(0x1cb)]+_0x2bc678(0x1c2),_0x1f3dc3['handle']);return await this[_0x2bc678(0x1d4)][_0x2bc678(0x184)]['write'](_0x1f3dc3[_0x2bc678(0x1cb)],_0x5d6d49),{'handle':_0x1f3dc3[_0x2bc678(0x1cb)],'svg':_0x5d6d49};}async[_0x475546(0x161)](_0x1b1a47){const _0x3c95e9=_0x475546;let _0x207899=[],_0x5626b0=[];for(let _0x57630d of _0x1b1a47[_0x3c95e9(0x177)])try{let {svg:_0x5f0a5d}=await this[_0x3c95e9(0x179)]({'handle':_0x57630d}),_0xa5ab79=await this[_0x3c95e9(0x1d4)][_0x3c95e9(0x206)][_0x3c95e9(0x15f)](_0x1b1a47[_0x3c95e9(0x162)],w(_0x57630d),_0x5f0a5d);_0x207899[_0x3c95e9(0x1d7)]({'handle':_0x57630d,'path':_0xa5ab79});}catch(_0x30e150){_0x5626b0[_0x3c95e9(0x1d7)](H(_0x57630d,_0x30e150));}return{'exported':_0x207899,'failed':_0x5626b0};}async[_0x475546(0x158)](){const _0x5371ca=_0x475546;return await this[_0x5371ca(0x1d4)][_0x5371ca(0x184)][_0x5371ca(0x188)]();}};function W(_0x1a66b9){return new U(_0x1a66b9);}function G(_0x53ea27){const _0x576d05=_0x475546;return _0x53ea27 instanceof Error&&_0x576d05(0x18a)in _0x53ea27;}function K(_0x4510ea){const _0x2063f3=_0x475546;let _0x3aa660=_0xe6d384(_0x4510ea);if(!_0x3217d9(_0x4510ea)||_0x3aa660===_0x50a63d(_0x3aa660)[_0x2063f3(0x1a6)])throw new h('resource-cache-root-invalid',_0x2063f3(0x14f)+_0x4510ea+'\x22.');return _0x3aa660;}async function q(_0x487c0d){const _0x16f053=_0x475546;let _0x5a914f;try{_0x5a914f=await _0x29b619(_0x487c0d,{'withFileTypes':!0x0});}catch(_0x565fbd){if(G(_0x565fbd)&&_0x565fbd[_0x16f053(0x18a)]===_0x16f053(0x1fd))return{'resourceCount':0x0,'byteCount':0x0};throw _0x565fbd;}let _0x4380b6=0x0,_0x451696=0x0;for(let _0x436587 of _0x5a914f){let _0x4aca04=_0x202795(_0x487c0d,_0x436587[_0x16f053(0x1ac)]);if(_0x436587[_0x16f053(0x1df)]()){let _0x3679e2=await q(_0x4aca04);_0x4380b6+=_0x3679e2['resourceCount'],_0x451696+=_0x3679e2[_0x16f053(0x201)];}else{if(_0x436587[_0x16f053(0x153)]()&&_0x436587['name'][_0x16f053(0x1f7)](_0x16f053(0x150))){let _0xaa5087=await _0x12e2ce(_0x4aca04);_0x4380b6++,_0x451696+=_0xaa5087[_0x16f053(0x17f)];}}}return{'resourceCount':_0x4380b6,'byteCount':_0x451696};}var J=class{[_0x475546(0x20e)];constructor(_0x56ccfc){this['location']=K(_0x56ccfc);}[_0x475546(0x19e)](_0x10007b){const _0x1df91d=_0x475546;let {registryId:_0x4e74d,resourceId:_0x972c6f}=C(_0x10007b);return _0x202795(this[_0x1df91d(0x20e)],_0x4e74d,_0x972c6f+_0x1df91d(0x150));}async[_0x475546(0x179)](_0x373ca3){const _0x224aa1=_0x475546;try{return await _0x13809d(this[_0x224aa1(0x19e)](_0x373ca3),'utf8');}catch(_0x4f078c){if(G(_0x4f078c)&&_0x4f078c[_0x224aa1(0x18a)]===_0x224aa1(0x1fd))return;throw _0x4f078c;}}async['write'](_0x1d4f1f,_0x20fed7){const _0x21ec28=_0x475546;let _0x193c4a=this[_0x21ec28(0x19e)](_0x1d4f1f);await _0x3a3f8d(_0x32abfa(_0x193c4a),{'recursive':!0x0});let _0x29a812=_0x202795(_0x32abfa(_0x193c4a),_0x21ec28(0x1de)+process[_0x21ec28(0x1da)]+'-'+_0x2893f4()+_0x21ec28(0x1f4));try{await _0x285ccc(_0x29a812,_0x20fed7,{'encoding':_0x21ec28(0x19d),'mode':0x180}),await _0x2fe6fe(_0x29a812,_0x193c4a);}catch(_0x27fe43){throw await _0x261243(_0x29a812)['catch'](()=>void 0x0),_0x27fe43;}}async[_0x475546(0x188)](){const _0x4587bc=_0x475546;let _0x13eff6=await q(this['location']);return await _0x135ca4(this[_0x4587bc(0x20e)],{'force':!0x0,'recursive':!0x0}),{'path':this['location'],..._0x13eff6};}},Y=class{async[_0x475546(0x15f)](_0x56bf32,_0x117221,_0x28546d){const _0x1a5742=_0x475546;await _0x3a3f8d(_0x56bf32,{'recursive':!0x0});let _0xa762a7=_0x202795(_0x56bf32,_0x117221);return await _0x285ccc(_0xa762a7,_0x28546d,_0x1a5742(0x19d)),_0xa762a7;}},X=0x7530,ae=0xa00000,oe=0xa,se=new Set([0x12d,0x12e,0x12f,0x133,0x134]);function Z(_0x18c45e){const _0x18ed01=_0x475546;return new h(_0x18ed01(0x1fa),_0x18ed01(0x149)+_0x18c45e+_0x18ed01(0x15d));}async function ce(_0x4f9e1f,_0x480f7e){const _0x4245fd=_0x475546;let _0x9e619d=Number(_0x4f9e1f[_0x4245fd(0x15c)][_0x4245fd(0x185)](_0x4245fd(0x166)));if(Number[_0x4245fd(0x178)](_0x9e619d)&&_0x9e619d>_0x480f7e)throw Z(_0x480f7e);if(_0x4f9e1f[_0x4245fd(0x1e6)]===null){let _0x5811e0=await _0x4f9e1f[_0x4245fd(0x1ff)]();if(Buffer[_0x4245fd(0x14c)](_0x5811e0)>_0x480f7e)throw Z(_0x480f7e);return _0x5811e0;}let _0x591699=_0x4f9e1f[_0x4245fd(0x1e6)][_0x4245fd(0x1b2)](),_0x7da6a9=[],_0x50ee40=0x0;try{for(;;){let _0x1dda2d=await _0x591699[_0x4245fd(0x179)]();if(_0x1dda2d[_0x4245fd(0x16b)])break;if(_0x50ee40+=_0x1dda2d['value'][_0x4245fd(0x14c)],_0x50ee40>_0x480f7e)throw await _0x591699['cancel']()[_0x4245fd(0x1f3)](()=>void 0x0),Z(_0x480f7e);_0x7da6a9['push'](_0x1dda2d['value']);}}finally{_0x591699[_0x4245fd(0x193)]();}try{return new TextDecoder(_0x4245fd(0x1e5),{'fatal':!0x0})[_0x4245fd(0x1dc)](Buffer[_0x4245fd(0x168)](_0x7da6a9,_0x50ee40));}catch{throw new h('resource-download-invalid-utf8','Resource\x20response\x20is\x20not\x20valid\x20UTF-8.');}}var Q=class{[_0x475546(0x182)];['timeoutMs'];['maxBytes'];[_0x475546(0x18b)];constructor(_0x314a29={}){const _0x30e63a=_0x475546;this[_0x30e63a(0x182)]=_0x314a29['fetch']??fetch,this[_0x30e63a(0x20c)]=_0x314a29[_0x30e63a(0x20c)]??X,this[_0x30e63a(0x1c0)]=_0x314a29[_0x30e63a(0x1c0)]??ae,this['maxRedirects']=_0x314a29['maxRedirects']??oe;}async[_0x475546(0x14e)](_0x5afd19){const _0x58f6d3=_0x475546;let _0x100616=new URL(_0x5afd19);if(_0x100616[_0x58f6d3(0x15b)]!==_0x58f6d3(0x19b))throw new h(_0x58f6d3(0x186),_0x58f6d3(0x1cd));let _0x2bd3cb=new AbortController(),_0x38f15b=setTimeout(()=>_0x2bd3cb['abort'](),this['timeoutMs']);try{let _0x891e6a=_0x100616;for(let _0x1359e7=0x0;;_0x1359e7++){let _0x3e7530=await this[_0x58f6d3(0x182)](_0x891e6a,{'redirect':_0x58f6d3(0x176),'signal':_0x2bd3cb[_0x58f6d3(0x19c)]});if(se[_0x58f6d3(0x1ad)](_0x3e7530['status'])){if(_0x1359e7>=this[_0x58f6d3(0x18b)])throw new h('resource-download-too-many-redirects','Resource\x20request\x20followed\x20too\x20many\x20redirects;\x20maximum\x20'+this[_0x58f6d3(0x18b)]+'.');let _0x3da07b=_0x3e7530[_0x58f6d3(0x15c)][_0x58f6d3(0x185)](_0x58f6d3(0x20e));if(_0x3da07b===null)throw new h('resource-download-invalid-redirect',_0x58f6d3(0x1fb)+_0x3e7530[_0x58f6d3(0x1f2)]+_0x58f6d3(0x1db));let _0x41efd0;try{_0x41efd0=new URL(_0x3da07b,_0x891e6a);}catch{throw new h('resource-download-invalid-redirect',_0x58f6d3(0x174));}if(_0x41efd0[_0x58f6d3(0x15b)]!==_0x58f6d3(0x19b))throw new h(_0x58f6d3(0x159),'Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.');_0x891e6a=_0x41efd0;continue;}if(!_0x3e7530['ok'])throw new h(_0x58f6d3(0x1f1),_0x58f6d3(0x1fb)+_0x3e7530[_0x58f6d3(0x1f2)]+'.');if(_0x3e7530[_0x58f6d3(0x1d8)]!==''&&new URL(_0x3e7530[_0x58f6d3(0x1d8)])[_0x58f6d3(0x15b)]!==_0x58f6d3(0x19b))throw new h(_0x58f6d3(0x159),_0x58f6d3(0x1f0));let _0x8ad3d1=await ce(_0x3e7530,this['maxBytes']);if(!V(_0x8ad3d1))throw new h(_0x58f6d3(0x151),_0x58f6d3(0x1e9));return _0x8ad3d1;}}catch(_0x452319){throw _0x2bd3cb['signal'][_0x58f6d3(0x1bc)]?new h('resource-download-timeout',_0x58f6d3(0x1ae)+this[_0x58f6d3(0x20c)]+_0x58f6d3(0x1eb)):_0x452319;}finally{clearTimeout(_0x38f15b);}}};function $(_0x25ef18){const _0x2eebe5=_0x475546;try{return JSON[_0x2eebe5(0x1c4)](_0x1c35fa(_0x25ef18,_0x2eebe5(0x19d)));}catch(_0x484619){throw new h(_0x2eebe5(0x194),_0x2eebe5(0x208)+_0x25ef18+':\x20'+(_0x484619 instanceof Error?_0x484619[_0x2eebe5(0x1bb)]:String(_0x484619)),void 0x0,{'cause':_0x484619});}}function le(_0x218f98){const _0x10e1b2=_0x475546;let _0x1d85ea;return()=>(_0x1d85ea??=W({'manifest':$(_0x218f98[_0x10e1b2(0x1d2)]),'cache':new J(_0x218f98[_0x10e1b2(0x19a)]),'downloader':new Q(_0x218f98[_0x10e1b2(0x1aa)]),'output':new Y()}),_0x1d85ea);}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};
|