@univer-cli/resource-library 1.0.0-rc.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5e3730=_0x561a;(function(_0x219052,_0x4a712e){const _0x47ecb1=_0x561a,_0xa2c23=_0x219052();while(!![]){try{const _0x14e3e4=parseInt(_0x47ecb1(0x1fb))/0x1+parseInt(_0x47ecb1(0x1ba))/0x2+-parseInt(_0x47ecb1(0x214))/0x3*(-parseInt(_0x47ecb1(0x16e))/0x4)+-parseInt(_0x47ecb1(0x19c))/0x5+parseInt(_0x47ecb1(0x17c))/0x6*(parseInt(_0x47ecb1(0x18f))/0x7)+parseInt(_0x47ecb1(0x1cc))/0x8+parseInt(_0x47ecb1(0x1ea))/0x9*(-parseInt(_0x47ecb1(0x1b7))/0xa);if(_0x14e3e4===_0x4a712e)break;else _0xa2c23['push'](_0xa2c23['shift']());}catch(_0x513efa){_0xa2c23['push'](_0xa2c23['shift']());}}}(_0x191d,0x4b954));import{randomUUID as _0x2c33c3}from'node:crypto';import{mkdir as _0xce22d8,readFile as _0x1c72ca,readdir as _0x2d1c6f,rename as _0x3be09a,rm as _0x311f6b,stat as _0x8b4291,unlink as _0x19c3f1,writeFile as _0xe9db9d}from'node:fs/promises';import{dirname as _0x15aa6e,isAbsolute as _0x324a08,join as _0x553560,parse as _0xffbb55,resolve as _0x59d85e}from'node:path';function _0x191d(){const _0x3c2d18=['string','Invalid\x20resource\x20handle\x20\x22','defaultLocale','Duplicate\x20export\x20filename\x20\x22','done','.order','headers','resource-download-http','resource-invalid-resource-id','resource-invalid-handle','fetch','Resource\x20search\x20needs\x20at\x20least\x20one\x20non-empty\x20query.','3779955uMuyIb','reference','manifest','catalog','download','pid','Unknown\x20resource\x20registry\x20\x22','has','resource','parse','registrations\x20must\x20not\x20be\x20empty.','Duplicate\x20registry\x20ID\x20\x22','ENOENT','.keywords','Duplicate\x20resource\x20handle\x20\x22','Resource\x20search\x20limit\x20must\x20be\x20a\x20positive\x20integer;\x20received\x20\x22','filter','286013yEnXrG','globalIndex','read','protocol','resource-manifest-read-failed','\x22\x20is\x20not\x20an\x20SVG\x20document.','.svg','cacheRoot','concat','content-length','.payload','\x20must\x20be\x20a\x20finite\x20number.','name','input','\x22:\x20expected\x20an\x20addressable\x20filesystem-safe\x20component\x20without\x20\x22--\x22.','clearCache','listRegistries','resource-download-insecure-redirect','Resource\x20export\x20filename\x20exceeds\x20','utf8','width','order','path','.description','registrations[','488793YCqsSu','Resource\x20server\x20returned\x20an\x20invalid\x20redirect\x20URL.','entries','image','number','fetchImpl','signal','url','groups','searchText','.id','startsWith','includes','resources','Invalid\x20registry\x20ID\x20\x22','resource-download-timeout','.storagePolicy\x20must\x20be\x20\x22reference\x22.','.name','resource-cache-root-invalid','isFile','Resource\x20server\x20returned\x20HTTP\x20','isInteger','Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.','.tmp','Resource\x20download\x20timed\x20out\x20after\x20','\x20ID\x20\x22','body','ResourceLibraryError','registries','byteLength','queries','\x20must\x20be\x20an\x20object.','8bgDEJw','.source.value','destination','output','clear','.tagIds\x20references\x20unknown\x20tag\x20\x22','resourceByHandle','Downloaded\x20resource\x20\x22','colorEditable','isArray','tags','resource-manifest-invalid','\x20must\x20be\x20a\x20non-empty\x20string.','catch','18YDVGTG','storagePolicy','.intrinsicSize\x20must\x20be\x20positive.','group','decode','].id','\x22:\x20','maxBytes','registry','Resource\x20cache\x20root\x20must\x20be\x20an\x20absolute,\x20dedicated\x20directory\x20below\x20the\x20filesystem\x20root;\x20received\x20\x22','\x20bytes.','manual','value','message','resource-download-invalid-redirect','releaseLock','text','.source.value\x20must\x20be\x20a\x20URL.','timeoutMs','751261JjCpZg','].input.registryId','.intrinsicSize.width','limit','cancel','set','push','keywords','resource-not-found','resource-download-invalid-utf8','resource-query-empty','intrinsicSize','\x20must\x20be\x20an\x20array.','2625605kENlLR','registrationIndex','cache','replace','map','aborted','\x20ms.','Resource\x20response\x20is\x20not\x20an\x20SVG\x20document.','\x22;\x20expected\x20<registryId>/<resourceId>.','https:','resource-limit-invalid','add','.source.type\x20must\x20be\x20\x22url\x22.','find','utf-8','manifest.registrations','Resource\x20exceeds\x20the\x20maximum\x20size\x20of\x20','resource-invalid-registry-id','handles','sourceUrl','handle','source','Resource\x20URL\x20must\x20use\x20HTTPS.','.resource-','getReader','\x22:\x20expected\x20filesystem-safe\x20characters.','Resource\x20response\x20is\x20not\x20valid\x20UTF-8.','10WlqgQx','tagIds','\x20must\x20be\x20a\x20boolean.','21918XSxeur','resource-download-invalid-svg','resource-download-too-many-redirects','].input.defaultLocale','.intrinsicSize','].input','groupId','byteCount','normalize','resourceIndex','length','some','toLowerCase','type','location','size','height','Duplicate\x20','2479208gvjQQp','trim','NFKC','isFinite','get','description','\x20contains\x20no\x20usable\x20localized\x20text.','registryId','write','\x20without\x20a\x20Location\x20header.','options','maxRedirects','code','resourceCount','export','label','.payload.colorEditable','resource-download-failed'];_0x191d=function(){return _0x3c2d18;};return _0x191d();}import{readFileSync as _0xce1fe3}from'node:fs';var h=class extends Error{['code'];[_0x5e3730(0x1b0)];constructor(_0x335d4d,_0x40a4bf,_0x14bde5,_0x4f2b27){const _0x9d7c65=_0x5e3730;super(_0x40a4bf,_0x4f2b27),this['code']=_0x335d4d,this['handle']=_0x14bde5,this[_0x9d7c65(0x207)]=_0x9d7c65(0x169);}};function g(_0xfec357){return _0xfec357 instanceof h;}var _=/^[A-Za-z0-9._-]+$/u,v=0xff,y=0x4;function b(_0x1c9645){return _['test'](_0x1c9645)&&_0x1c9645!=='.'&&_0x1c9645!=='..';}function x(_0x4f9871){const _0x44c2a5=_0x5e3730;if(!b(_0x4f9871)||_0x4f9871[_0x44c2a5(0x159)]('-')||_0x4f9871[_0x44c2a5(0x15a)]('--')||_0x4f9871[_0x44c2a5(0x1c4)]>v)throw new h(_0x44c2a5(0x1ad),_0x44c2a5(0x15c)+_0x4f9871+_0x44c2a5(0x209));}function S(_0x431bb4){const _0x53c33e=_0x5e3730;if(!b(_0x431bb4)||_0x431bb4[_0x53c33e(0x1c4)]+y>v)throw new h(_0x53c33e(0x1e6),'Invalid\x20resource\x20ID\x20\x22'+_0x431bb4+_0x53c33e(0x1b5));}function C(_0xa8a417){const _0x1afcdf=_0x5e3730;let _0x5cde92=_0xa8a417['split']('/');if(_0x5cde92[_0x1afcdf(0x1c4)]!==0x2||_0x5cde92[0x0]===''||_0x5cde92[0x1]==='')throw new h(_0x1afcdf(0x1e7),_0x1afcdf(0x1df)+_0xa8a417+_0x1afcdf(0x1a4),_0xa8a417);let _0x4f9e60=_0x5cde92[0x0],_0x3b8bc6=_0x5cde92[0x1];return x(_0x4f9e60),S(_0x3b8bc6),{'registryId':_0x4f9e60,'resourceId':_0x3b8bc6};}function ee(_0x432497,_0x237d03){return x(_0x432497),S(_0x237d03),_0x432497+'/'+_0x237d03;}function w(_0x362b17){const _0x59a186=_0x5e3730;let {registryId:_0x10517c,resourceId:_0x1953dc}=C(_0x362b17),_0x2e257c=_0x10517c+'--'+_0x1953dc+_0x59a186(0x201);if(_0x2e257c[_0x59a186(0x1c4)]>v)throw new h('resource-export-filename-too-long',_0x59a186(0x20d)+v+_0x59a186(0x186),_0x362b17);return _0x2e257c;}function T(_0x116f94){const _0x6efcfa=_0x5e3730;return new h(_0x6efcfa(0x179),'Invalid\x20resource\x20manifest:\x20'+_0x116f94);}function E(_0x8dc81f,_0xe78460){const _0xa97589=_0x5e3730;if(typeof _0x8dc81f!='object'||!_0x8dc81f||Array['isArray'](_0x8dc81f))throw T(_0xe78460+_0xa97589(0x16d));return _0x8dc81f;}function D(_0x263b92,_0x451646,_0x68b68c=!0x1){const _0x4fefb0=_0x5e3730;if(_0x68b68c&&_0x263b92===void 0x0)return[];if(!Array[_0x4fefb0(0x177)](_0x263b92))throw T(_0x451646+_0x4fefb0(0x19b));return _0x263b92;}function O(_0x1f6d2d,_0x48dbdc){const _0x1be43b=_0x5e3730;if(typeof _0x1f6d2d!=_0x1be43b(0x1de)||_0x1f6d2d==='')throw T(_0x48dbdc+_0x1be43b(0x17a));return _0x1f6d2d;}function k(_0x376d6d,_0x54b87f,_0x5157b0=!0x1){const _0x25e717=_0x5e3730;return D(_0x376d6d,_0x54b87f,_0x5157b0)[_0x25e717(0x1a0)]((_0x424905,_0x20c574)=>O(_0x424905,_0x54b87f+'['+_0x20c574+']'));}function A(_0x2bd684,_0x198b5c){const _0x52213d=_0x5e3730;return D(_0x2bd684,_0x198b5c,!0x0)['map']((_0x482ab7,_0x27bddb)=>{const _0x31f97e=_0x561a;if(typeof _0x482ab7!=_0x31f97e(0x1de))throw T(_0x198b5c+'['+_0x27bddb+']\x20must\x20be\x20a\x20string.');return _0x482ab7;})[_0x52213d(0x1fa)](_0x3c4b7f=>_0x3c4b7f!=='');}function j(_0x2e988a,_0x2aade1){const _0x34bafd=_0x5e3730;if(typeof _0x2e988a!=_0x34bafd(0x218)||!Number[_0x34bafd(0x1cf)](_0x2e988a))throw T(_0x2aade1+_0x34bafd(0x206));return _0x2e988a;}function M(_0x5fda86,_0x305199){const _0x598738=_0x5e3730;if(typeof _0x5fda86!='boolean')throw T(_0x305199+_0x598738(0x1b9));return _0x5fda86;}function N(_0xc4ae12,_0x568694,_0x8823a1){const _0x324ea5=_0x5e3730;if(typeof _0xc4ae12==_0x324ea5(0x1de)&&_0xc4ae12!=='')return _0xc4ae12;let _0x2d4acf=E(_0xc4ae12,_0x568694),_0x451b62=_0x8823a1===void 0x0?void 0x0:_0x2d4acf[_0x8823a1];if(typeof _0x451b62==_0x324ea5(0x1de)&&_0x451b62!=='')return _0x451b62;let _0x32cad6=_0x2d4acf['en-US'];if(typeof _0x32cad6==_0x324ea5(0x1de)&&_0x32cad6!=='')return _0x32cad6;let _0x2b33a4=Object['values'](_0x2d4acf)[_0x324ea5(0x1a9)](_0x3dd72d=>typeof _0x3dd72d==_0x324ea5(0x1de)&&_0x3dd72d!=='');if(_0x2b33a4!==void 0x0)return _0x2b33a4;throw T(_0x568694+_0x324ea5(0x1d2));}function P(_0x20d0ad,_0x28293d,_0x42ee93){const _0x231c79=_0x5e3730;try{_0x42ee93===_0x231c79(0x184)?x(_0x20d0ad):S(_0x20d0ad);}catch(_0x91e373){throw T(_0x28293d+':\x20'+(_0x91e373 instanceof Error?_0x91e373['message']:String(_0x91e373)));}}function _0x561a(_0x4a5b54,_0x3286a6){_0x4a5b54=_0x4a5b54-0x159;const _0x191d12=_0x191d();let _0x561a13=_0x191d12[_0x4a5b54];return _0x561a13;}function F(_0x5e0f19,_0xaf6c17,_0x35d297){const _0x203cec=_0x5e3730;let _0x2543c0=new Map();for(let [_0x53a7c2,_0x443575]of D(_0x5e0f19,_0xaf6c17,!0x0)[_0x203cec(0x216)]()){let _0x59dc2e=E(_0x443575,_0xaf6c17+'['+_0x53a7c2+']'),_0xc902c5=O(_0x59dc2e['id'],_0xaf6c17+'['+_0x53a7c2+'].id');if(P(_0xc902c5,_0xaf6c17+'['+_0x53a7c2+_0x203cec(0x181),'resource'),_0x2543c0[_0x203cec(0x1f1)](_0xc902c5))throw T(_0x203cec(0x1cb)+_0xaf6c17+_0x203cec(0x167)+_0xc902c5+'\x22.');_0x2543c0[_0x203cec(0x194)](_0xc902c5,N(_0x59dc2e[_0x203cec(0x1db)],_0xaf6c17+'['+_0x53a7c2+'].label',_0x35d297));}return _0x2543c0;}function I(_0x778443,_0x2471b5){const _0x53cfcd=_0x5e3730;let _0x1a572c=E(_0x778443[_0x53cfcd(0x19a)],_0x2471b5+_0x53cfcd(0x1be)),_0x120ef9=j(_0x1a572c[_0x53cfcd(0x20f)],_0x2471b5+_0x53cfcd(0x191)),_0x2870f5=j(_0x1a572c[_0x53cfcd(0x1ca)],_0x2471b5+'.intrinsicSize.height');if(_0x120ef9<=0x0||_0x2870f5<=0x0)throw T(_0x2471b5+_0x53cfcd(0x17e));return{'width':_0x120ef9,'height':_0x2870f5};}function L(_0x5d36e9,_0x46a8f2){const _0x4ef293=_0x5e3730;if(_0x5d36e9[_0x4ef293(0x1c7)]!==_0x4ef293(0x217))throw T(_0x46a8f2+'.type\x20must\x20be\x20\x22image\x22.');if(_0x5d36e9[_0x4ef293(0x17d)]!==_0x4ef293(0x1eb))throw T(_0x46a8f2+_0x4ef293(0x15e));let _0x443737=E(_0x5d36e9[_0x4ef293(0x1b1)],_0x46a8f2+'.source');if(_0x443737[_0x4ef293(0x1c7)]!==_0x4ef293(0x21b))throw T(_0x46a8f2+_0x4ef293(0x1a8));let _0x1076f1=O(_0x443737[_0x4ef293(0x188)],_0x46a8f2+_0x4ef293(0x16f)),_0x45d74f;try{_0x45d74f=new URL(_0x1076f1);}catch{throw T(_0x46a8f2+_0x4ef293(0x18d));}if(_0x45d74f[_0x4ef293(0x1fe)]!==_0x4ef293(0x1a5))throw T(_0x46a8f2+'.source.value\x20must\x20use\x20HTTPS.');return _0x1076f1;}function R(_0x587bd0){const _0x139917=_0x5e3730;return _0x587bd0[_0x139917(0x1c2)](_0x139917(0x1ce))[_0x139917(0x1c6)]()[_0x139917(0x1cd)]()[_0x139917(0x19f)](/\s+/gu,'\x20');}function z(_0xf719d5){const _0x3d38f4=_0x5e3730;let _0x43a289=E(_0xf719d5,_0x3d38f4(0x1ec)),_0x4ea197=new Map(),_0x179678=new Map(),_0x19d77b=[],_0x3ab729=[],_0xf0579=new Set(),_0x1abb4e=0x0;for(let [_0x40b7a9,_0x15c359]of D(_0x43a289['registrations'],_0x3d38f4(0x1ab))[_0x3d38f4(0x216)]()){let _0x75d1ed=E(E(_0x15c359,_0x3d38f4(0x213)+_0x40b7a9+']')[_0x3d38f4(0x208)],'registrations['+_0x40b7a9+_0x3d38f4(0x1bf)),_0x3871a4=O(_0x75d1ed['registryId'],'registrations['+_0x40b7a9+_0x3d38f4(0x190));if(P(_0x3871a4,'registrations['+_0x40b7a9+_0x3d38f4(0x190),_0x3d38f4(0x184)),_0x4ea197[_0x3d38f4(0x1f1)](_0x3871a4))throw T(_0x3d38f4(0x1f5)+_0x3871a4+'\x22.');let _0x1116ab=_0x75d1ed[_0x3d38f4(0x1e0)]===void 0x0?void 0x0:O(_0x75d1ed[_0x3d38f4(0x1e0)],_0x3d38f4(0x213)+_0x40b7a9+_0x3d38f4(0x1bd)),_0x233f36=F(_0x75d1ed[_0x3d38f4(0x21c)],_0x3d38f4(0x213)+_0x40b7a9+'].input.groups',_0x1116ab),_0x13cb5d=F(_0x75d1ed[_0x3d38f4(0x178)],_0x3d38f4(0x213)+_0x40b7a9+'].input.tags',_0x1116ab),_0x5196eb=[];for(let [_0x15493a,_0x4934eb]of D(_0x75d1ed['resources'],_0x3d38f4(0x213)+_0x40b7a9+'].input.resources')['entries']()){let _0x16df47=_0x3d38f4(0x213)+_0x40b7a9+'].input.resources['+_0x15493a+']',_0x467551=E(_0x4934eb,_0x16df47),_0x359a72=O(_0x467551['id'],_0x16df47+_0x3d38f4(0x21e));P(_0x359a72,_0x16df47+_0x3d38f4(0x21e),_0x3d38f4(0x1f2));let _0x3f4f72=ee(_0x3871a4,_0x359a72);if(_0x179678[_0x3d38f4(0x1f1)](_0x3f4f72))throw T(_0x3d38f4(0x1f8)+_0x3f4f72+'\x22.');let _0x24a571;try{_0x24a571=w(_0x3f4f72);}catch(_0x41f49c){throw T(_0x16df47+':\x20'+(_0x41f49c instanceof Error?_0x41f49c[_0x3d38f4(0x189)]:String(_0x41f49c)));}if(_0xf0579[_0x3d38f4(0x1f1)](_0x24a571))throw T(_0x3d38f4(0x1e1)+_0x24a571+'\x22.');_0xf0579[_0x3d38f4(0x1a7)](_0x24a571);let _0x5752d4=_0x467551[_0x3d38f4(0x1c0)]===void 0x0?void 0x0:O(_0x467551[_0x3d38f4(0x1c0)],_0x16df47+'.groupId');if(_0x5752d4!==void 0x0&&!_0x233f36[_0x3d38f4(0x1f1)](_0x5752d4))throw T(_0x16df47+'.groupId\x20references\x20unknown\x20group\x20\x22'+_0x5752d4+'\x22.');let _0x155d41=k(_0x467551[_0x3d38f4(0x1b8)],_0x16df47+'.tagIds',!0x0);for(let _0x5d397c of _0x155d41)if(!_0x13cb5d[_0x3d38f4(0x1f1)](_0x5d397c))throw T(_0x16df47+_0x3d38f4(0x173)+_0x5d397c+'\x22.');let _0x261ea1=A(_0x467551[_0x3d38f4(0x196)],_0x16df47+_0x3d38f4(0x1f7)),_0xd7dc24=N(_0x467551[_0x3d38f4(0x207)],_0x16df47+_0x3d38f4(0x15f),_0x1116ab),_0x22e768=_0x467551['description']===void 0x0?void 0x0:N(_0x467551[_0x3d38f4(0x1d1)],_0x16df47+_0x3d38f4(0x212),_0x1116ab),_0x5af174=_0x5752d4===void 0x0?null:{'id':_0x5752d4,'label':_0x233f36[_0x3d38f4(0x1d0)](_0x5752d4)},_0xd38359=_0x155d41[_0x3d38f4(0x1a0)](_0x18ad7e=>({'id':_0x18ad7e,'label':_0x13cb5d[_0x3d38f4(0x1d0)](_0x18ad7e)})),_0x45471f=E(_0x467551['payload'],_0x16df47+_0x3d38f4(0x205)),_0x4b749d=_0x467551[_0x3d38f4(0x210)]===void 0x0?null:j(_0x467551[_0x3d38f4(0x210)],_0x16df47+_0x3d38f4(0x1e3)),_0x436510=M(_0x45471f['colorEditable'],_0x16df47+_0x3d38f4(0x1dc)),_0xaa62aa={'handle':_0x3f4f72,'registryId':_0x3871a4,'id':_0x359a72,'name':_0xd7dc24,..._0x22e768===void 0x0?{}:{'description':_0x22e768},'group':_0x5af174,'tags':_0xd38359,'keywords':_0x261ea1,'order':_0x4b749d,'intrinsicSize':I(_0x45471f,_0x16df47+_0x3d38f4(0x205)),'colorEditable':_0x436510,'sourceUrl':L(_0x45471f,_0x16df47+_0x3d38f4(0x205)),'registrationIndex':_0x40b7a9,'resourceIndex':_0x15493a,'globalIndex':_0x1abb4e,'searchText':R([_0xd7dc24,_0x22e768,_0x5af174?.[_0x3d38f4(0x1db)],..._0xd38359[_0x3d38f4(0x1a0)](_0x3df481=>_0x3df481['label']),..._0x261ea1][_0x3d38f4(0x1fa)](_0x13d5fc=>_0x13d5fc!==void 0x0)['join']('\x20'))};_0x1abb4e++,_0x5196eb[_0x3d38f4(0x195)](_0xaa62aa),_0x3ab729[_0x3d38f4(0x195)](_0xaa62aa),_0x179678[_0x3d38f4(0x194)](_0x3f4f72,_0xaa62aa);}let _0x26b730={'id':_0x3871a4,'groups':_0x233f36,'tags':_0x13cb5d,'resources':_0x5196eb};_0x19d77b['push'](_0x26b730),_0x4ea197[_0x3d38f4(0x194)](_0x3871a4,_0x26b730);}if(_0x19d77b[_0x3d38f4(0x1c4)]===0x0)throw T(_0x3d38f4(0x1f4));return{'registries':_0x19d77b,'registryById':_0x4ea197,'resourceByHandle':_0x179678,'resources':_0x3ab729};}function B(_0x8882ac,_0x3b6f13){const _0x4fa80d=_0x5e3730;C(_0x3b6f13);let _0x42508b=_0x8882ac[_0x4fa80d(0x174)][_0x4fa80d(0x1d0)](_0x3b6f13);if(_0x42508b===void 0x0)throw new h(_0x4fa80d(0x197),'Unknown\x20resource\x20\x22'+_0x3b6f13+'\x22;\x20try\x20resources\x20find\x20<query>.',_0x3b6f13);return _0x42508b;}function te(_0x3a2c0f){const _0x3221d8=_0x5e3730;return _0x3a2c0f[_0x3221d8(0x16a)]['map'](_0xcc4d74=>({'id':_0xcc4d74['id'],'resourceCount':_0xcc4d74['resources'][_0x3221d8(0x1c4)],'groupCount':_0xcc4d74['groups'][_0x3221d8(0x1c9)],'tagCount':_0xcc4d74[_0x3221d8(0x178)][_0x3221d8(0x1c9)],'colorEditableCount':_0xcc4d74['resources'][_0x3221d8(0x1fa)](_0x188c2c=>_0x188c2c[_0x3221d8(0x176)])['length']}));}function ne(_0x1c8aa7){const _0x4380cc=_0x5e3730;return{'handle':_0x1c8aa7[_0x4380cc(0x1b0)],'registryId':_0x1c8aa7[_0x4380cc(0x1d3)],'id':_0x1c8aa7['id'],'name':_0x1c8aa7['name'],'group':_0x1c8aa7[_0x4380cc(0x17f)],'tags':_0x1c8aa7[_0x4380cc(0x178)],'keywords':_0x1c8aa7[_0x4380cc(0x196)],'order':_0x1c8aa7[_0x4380cc(0x210)],'intrinsicSize':_0x1c8aa7[_0x4380cc(0x19a)],'colorEditable':_0x1c8aa7['colorEditable']};}function re(_0x5081a4,_0x29fb44){const _0x54524c=_0x5e3730;let _0x2fabb5=(_0x5081a4['order']??_0x5081a4[_0x54524c(0x1fc)])-(_0x29fb44[_0x54524c(0x210)]??_0x29fb44[_0x54524c(0x1fc)]);if(_0x2fabb5!==0x0)return _0x2fabb5;let _0x5ae8cf=_0x5081a4[_0x54524c(0x19d)]-_0x29fb44[_0x54524c(0x19d)];if(_0x5ae8cf!==0x0)return _0x5ae8cf;let _0x32d909=_0x5081a4['resourceIndex']-_0x29fb44[_0x54524c(0x1c3)];return _0x32d909===0x0?_0x5081a4['handle']['localeCompare'](_0x29fb44[_0x54524c(0x1b0)]):_0x32d909;}function ie(_0x1e656b,_0x102592){const _0x2343bd=_0x5e3730;let _0xb3d1be=_0x102592[_0x2343bd(0x16c)][_0x2343bd(0x1a0)](R)[_0x2343bd(0x1fa)](_0x239dc4=>_0x239dc4!=='');if(_0xb3d1be['length']===0x0)throw new h(_0x2343bd(0x199),_0x2343bd(0x1e9));let _0x151524=new Set(_0x102592[_0x2343bd(0x16a)]??[]);for(let _0x48917e of _0x151524)if(!_0x1e656b['registryById']['has'](_0x48917e))throw new h('resource-registry-not-found',_0x2343bd(0x1f0)+_0x48917e+'\x22.');let _0x19bb27=_0x102592[_0x2343bd(0x192)]??_0x1e656b['resources'][_0x2343bd(0x1c4)];if(!Number[_0x2343bd(0x163)](_0x19bb27)||_0x19bb27<0x1)throw new h(_0x2343bd(0x1a6),_0x2343bd(0x1f9)+_0x19bb27+'\x22.');let _0x6400d4=_0x1e656b[_0x2343bd(0x15b)][_0x2343bd(0x1fa)](_0x38b438=>_0x151524[_0x2343bd(0x1c9)]===0x0||_0x151524[_0x2343bd(0x1f1)](_0x38b438[_0x2343bd(0x1d3)]))[_0x2343bd(0x1fa)](_0x46ff9b=>_0xb3d1be[_0x2343bd(0x1c5)](_0x1a540b=>_0x46ff9b[_0x2343bd(0x21d)][_0x2343bd(0x15a)](_0x1a540b)))['sort'](re);return{'resources':_0x6400d4['slice'](0x0,_0x19bb27)[_0x2343bd(0x1a0)](ne),'total':_0x6400d4['length']};}function V(_0x17b92c){return/^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[^]*?-->\s*)*<svg(?:\s|>)/iu['test'](_0x17b92c);}function H(_0xc35c89,_0x2e49a0){const _0x167691=_0x5e3730;return g(_0x2e49a0)?{'handle':_0xc35c89,'code':_0x2e49a0[_0x167691(0x1d8)],'message':_0x2e49a0['message']}:{'handle':_0xc35c89,'code':'resource-export-failed','message':_0x2e49a0 instanceof Error?_0x2e49a0[_0x167691(0x189)]:String(_0x2e49a0)};}var U=class{['options'];[_0x5e3730(0x1ed)];constructor(_0x44cf1e){const _0x453dab=_0x5e3730;this[_0x453dab(0x1d6)]=_0x44cf1e,this[_0x453dab(0x1ed)]=z(_0x44cf1e[_0x453dab(0x1ec)]);}get['cacheLocation'](){const _0xb63ca8=_0x5e3730;return this[_0xb63ca8(0x1d6)][_0xb63ca8(0x19e)][_0xb63ca8(0x1c8)];}[_0x5e3730(0x20b)](){return te(this['catalog']);}['find'](_0xaedaff){const _0x5e5401=_0x5e3730;return ie(this[_0x5e5401(0x1ed)],_0xaedaff);}async['read'](_0xd056d5){const _0x316e00=_0x5e3730;let _0x4e6438=B(this[_0x316e00(0x1ed)],_0xd056d5['handle']),_0x5072d4=await this[_0x316e00(0x1d6)][_0x316e00(0x19e)]['read'](_0xd056d5[_0x316e00(0x1b0)]);if(_0x5072d4!==void 0x0&&V(_0x5072d4))return{'handle':_0xd056d5['handle'],'svg':_0x5072d4};let _0x4f1b9c;try{_0x4f1b9c=await this[_0x316e00(0x1d6)]['downloader'][_0x316e00(0x1ee)](_0x4e6438[_0x316e00(0x1af)]);}catch(_0x333f1a){throw g(_0x333f1a)?_0x333f1a:new h(_0x316e00(0x1dd),'Failed\x20to\x20download\x20\x22'+_0xd056d5[_0x316e00(0x1b0)]+_0x316e00(0x182)+(_0x333f1a instanceof Error?_0x333f1a[_0x316e00(0x189)]:String(_0x333f1a)),_0xd056d5[_0x316e00(0x1b0)],{'cause':_0x333f1a});}if(!V(_0x4f1b9c))throw new h('resource-invalid-svg',_0x316e00(0x175)+_0xd056d5[_0x316e00(0x1b0)]+_0x316e00(0x200),_0xd056d5[_0x316e00(0x1b0)]);return await this['options'][_0x316e00(0x19e)][_0x316e00(0x1d4)](_0xd056d5[_0x316e00(0x1b0)],_0x4f1b9c),{'handle':_0xd056d5[_0x316e00(0x1b0)],'svg':_0x4f1b9c};}async[_0x5e3730(0x1da)](_0x4906ae){const _0x3e4e2a=_0x5e3730;let _0x2ca2e2=[],_0x4ef685=[];for(let _0xd57d78 of _0x4906ae[_0x3e4e2a(0x1ae)])try{let {svg:_0x4d9fde}=await this['read']({'handle':_0xd57d78}),_0x52ae9b=await this[_0x3e4e2a(0x1d6)][_0x3e4e2a(0x171)][_0x3e4e2a(0x1d4)](_0x4906ae[_0x3e4e2a(0x170)],w(_0xd57d78),_0x4d9fde);_0x2ca2e2['push']({'handle':_0xd57d78,'path':_0x52ae9b});}catch(_0x5c160c){_0x4ef685[_0x3e4e2a(0x195)](H(_0xd57d78,_0x5c160c));}return{'exported':_0x2ca2e2,'failed':_0x4ef685};}async[_0x5e3730(0x20a)](){const _0x56e775=_0x5e3730;return await this['options'][_0x56e775(0x19e)][_0x56e775(0x172)]();}};function W(_0x1201e7){return new U(_0x1201e7);}function G(_0x5ac95d){const _0x92e771=_0x5e3730;return _0x5ac95d instanceof Error&&_0x92e771(0x1d8)in _0x5ac95d;}function K(_0x5bf119){const _0x5ae65d=_0x5e3730;let _0x4e0d65=_0x59d85e(_0x5bf119);if(!_0x324a08(_0x5bf119)||_0x4e0d65===_0xffbb55(_0x4e0d65)['root'])throw new h(_0x5ae65d(0x160),_0x5ae65d(0x185)+_0x5bf119+'\x22.');return _0x4e0d65;}async function q(_0x2a021b){const _0x5b85fd=_0x5e3730;let _0x38cef5;try{_0x38cef5=await _0x2d1c6f(_0x2a021b,{'withFileTypes':!0x0});}catch(_0x48d6ea){if(G(_0x48d6ea)&&_0x48d6ea['code']===_0x5b85fd(0x1f6))return{'resourceCount':0x0,'byteCount':0x0};throw _0x48d6ea;}let _0x101620=0x0,_0x18dfb7=0x0;for(let _0x2827fe of _0x38cef5){let _0x3dfcac=_0x553560(_0x2a021b,_0x2827fe['name']);if(_0x2827fe['isDirectory']()){let _0x2616a6=await q(_0x3dfcac);_0x101620+=_0x2616a6[_0x5b85fd(0x1d9)],_0x18dfb7+=_0x2616a6[_0x5b85fd(0x1c1)];}else{if(_0x2827fe[_0x5b85fd(0x161)]()&&_0x2827fe[_0x5b85fd(0x207)]['endsWith'](_0x5b85fd(0x201))){let _0x58a673=await _0x8b4291(_0x3dfcac);_0x101620++,_0x18dfb7+=_0x58a673[_0x5b85fd(0x1c9)];}}}return{'resourceCount':_0x101620,'byteCount':_0x18dfb7};}var J=class{['location'];constructor(_0x26cbd7){const _0x5f3425=_0x5e3730;this[_0x5f3425(0x1c8)]=K(_0x26cbd7);}[_0x5e3730(0x211)](_0x3f5929){const _0x40abcd=_0x5e3730;let {registryId:_0x5ae4f6,resourceId:_0x56f139}=C(_0x3f5929);return _0x553560(this[_0x40abcd(0x1c8)],_0x5ae4f6,_0x56f139+'.svg');}async[_0x5e3730(0x1fd)](_0x55f230){const _0x63261e=_0x5e3730;try{return await _0x1c72ca(this[_0x63261e(0x211)](_0x55f230),_0x63261e(0x20e));}catch(_0x21b397){if(G(_0x21b397)&&_0x21b397['code']===_0x63261e(0x1f6))return;throw _0x21b397;}}async[_0x5e3730(0x1d4)](_0x7f7b08,_0x244467){const _0x11af8b=_0x5e3730;let _0x20a3c7=this[_0x11af8b(0x211)](_0x7f7b08);await _0xce22d8(_0x15aa6e(_0x20a3c7),{'recursive':!0x0});let _0x196a07=_0x553560(_0x15aa6e(_0x20a3c7),_0x11af8b(0x1b3)+process[_0x11af8b(0x1ef)]+'-'+_0x2c33c3()+_0x11af8b(0x165));try{await _0xe9db9d(_0x196a07,_0x244467,{'encoding':_0x11af8b(0x20e),'mode':0x180}),await _0x3be09a(_0x196a07,_0x20a3c7);}catch(_0x494b3a){throw await _0x19c3f1(_0x196a07)[_0x11af8b(0x17b)](()=>void 0x0),_0x494b3a;}}async[_0x5e3730(0x172)](){const _0x55ffa0=_0x5e3730;let _0x59ef6e=await q(this[_0x55ffa0(0x1c8)]);return await _0x311f6b(this[_0x55ffa0(0x1c8)],{'force':!0x0,'recursive':!0x0}),{'path':this[_0x55ffa0(0x1c8)],..._0x59ef6e};}},Y=class{async['write'](_0x47b452,_0xa499ff,_0x32beb9){await _0xce22d8(_0x47b452,{'recursive':!0x0});let _0x48267f=_0x553560(_0x47b452,_0xa499ff);return await _0xe9db9d(_0x48267f,_0x32beb9,'utf8'),_0x48267f;}},X=0x7530,ae=0xa00000,oe=0xa,se=new Set([0x12d,0x12e,0x12f,0x133,0x134]);function Z(_0x3430e4){const _0x26ca3b=_0x5e3730;return new h('resource-download-too-large',_0x26ca3b(0x1ac)+_0x3430e4+_0x26ca3b(0x186));}async function ce(_0x348f95,_0x2217d3){const _0x207fed=_0x5e3730;let _0x1dd8d8=Number(_0x348f95['headers'][_0x207fed(0x1d0)](_0x207fed(0x204)));if(Number['isFinite'](_0x1dd8d8)&&_0x1dd8d8>_0x2217d3)throw Z(_0x2217d3);if(_0x348f95['body']===null){let _0x2c2a1e=await _0x348f95[_0x207fed(0x18c)]();if(Buffer[_0x207fed(0x16b)](_0x2c2a1e)>_0x2217d3)throw Z(_0x2217d3);return _0x2c2a1e;}let _0x2c2591=_0x348f95[_0x207fed(0x168)][_0x207fed(0x1b4)](),_0x27d4b5=[],_0x36b1c1=0x0;try{for(;;){let _0x975b94=await _0x2c2591[_0x207fed(0x1fd)]();if(_0x975b94[_0x207fed(0x1e2)])break;if(_0x36b1c1+=_0x975b94[_0x207fed(0x188)]['byteLength'],_0x36b1c1>_0x2217d3)throw await _0x2c2591[_0x207fed(0x193)]()['catch'](()=>void 0x0),Z(_0x2217d3);_0x27d4b5[_0x207fed(0x195)](_0x975b94[_0x207fed(0x188)]);}}finally{_0x2c2591[_0x207fed(0x18b)]();}try{return new TextDecoder(_0x207fed(0x1aa),{'fatal':!0x0})[_0x207fed(0x180)](Buffer[_0x207fed(0x203)](_0x27d4b5,_0x36b1c1));}catch{throw new h(_0x207fed(0x198),_0x207fed(0x1b6));}}var Q=class{[_0x5e3730(0x219)];[_0x5e3730(0x18e)];[_0x5e3730(0x183)];[_0x5e3730(0x1d7)];constructor(_0x4bdfe6={}){const _0x62e798=_0x5e3730;this[_0x62e798(0x219)]=_0x4bdfe6[_0x62e798(0x1e8)]??fetch,this[_0x62e798(0x18e)]=_0x4bdfe6[_0x62e798(0x18e)]??X,this[_0x62e798(0x183)]=_0x4bdfe6[_0x62e798(0x183)]??ae,this[_0x62e798(0x1d7)]=_0x4bdfe6['maxRedirects']??oe;}async[_0x5e3730(0x1ee)](_0x3b4cb6){const _0x3c5ae0=_0x5e3730;let _0x1bea4e=new URL(_0x3b4cb6);if(_0x1bea4e[_0x3c5ae0(0x1fe)]!==_0x3c5ae0(0x1a5))throw new h('resource-download-insecure',_0x3c5ae0(0x1b2));let _0x57eafc=new AbortController(),_0x2e1ce4=setTimeout(()=>_0x57eafc['abort'](),this[_0x3c5ae0(0x18e)]);try{let _0x2883ea=_0x1bea4e;for(let _0x135560=0x0;;_0x135560++){let _0x12d62d=await this[_0x3c5ae0(0x219)](_0x2883ea,{'redirect':_0x3c5ae0(0x187),'signal':_0x57eafc['signal']});if(se['has'](_0x12d62d['status'])){if(_0x135560>=this[_0x3c5ae0(0x1d7)])throw new h(_0x3c5ae0(0x1bc),'Resource\x20request\x20followed\x20too\x20many\x20redirects;\x20maximum\x20'+this['maxRedirects']+'.');let _0xe44b3b=_0x12d62d[_0x3c5ae0(0x1e4)][_0x3c5ae0(0x1d0)](_0x3c5ae0(0x1c8));if(_0xe44b3b===null)throw new h('resource-download-invalid-redirect',_0x3c5ae0(0x162)+_0x12d62d['status']+_0x3c5ae0(0x1d5));let _0x2b30f5;try{_0x2b30f5=new URL(_0xe44b3b,_0x2883ea);}catch{throw new h(_0x3c5ae0(0x18a),_0x3c5ae0(0x215));}if(_0x2b30f5[_0x3c5ae0(0x1fe)]!==_0x3c5ae0(0x1a5))throw new h(_0x3c5ae0(0x20c),_0x3c5ae0(0x164));_0x2883ea=_0x2b30f5;continue;}if(!_0x12d62d['ok'])throw new h(_0x3c5ae0(0x1e5),_0x3c5ae0(0x162)+_0x12d62d['status']+'.');if(_0x12d62d['url']!==''&&new URL(_0x12d62d[_0x3c5ae0(0x21b)])[_0x3c5ae0(0x1fe)]!=='https:')throw new h(_0x3c5ae0(0x20c),_0x3c5ae0(0x164));let _0x358fed=await ce(_0x12d62d,this[_0x3c5ae0(0x183)]);if(!V(_0x358fed))throw new h(_0x3c5ae0(0x1bb),_0x3c5ae0(0x1a3));return _0x358fed;}}catch(_0x3973ea){throw _0x57eafc[_0x3c5ae0(0x21a)][_0x3c5ae0(0x1a1)]?new h(_0x3c5ae0(0x15d),_0x3c5ae0(0x166)+this[_0x3c5ae0(0x18e)]+_0x3c5ae0(0x1a2)):_0x3973ea;}finally{clearTimeout(_0x2e1ce4);}}};function $(_0x1fed30){const _0x2aea20=_0x5e3730;try{return JSON[_0x2aea20(0x1f3)](_0xce1fe3(_0x1fed30,_0x2aea20(0x20e)));}catch(_0x583d01){throw new h(_0x2aea20(0x1ff),'Cannot\x20read\x20resource\x20manifest\x20at\x20'+_0x1fed30+':\x20'+(_0x583d01 instanceof Error?_0x583d01[_0x2aea20(0x189)]:String(_0x583d01)),void 0x0,{'cause':_0x583d01});}}function le(_0x1a8a10){const _0x2a5981=_0x5e3730;let _0x4ddec1;return()=>(_0x4ddec1??=W({'manifest':$(_0x1a8a10['manifestPath']),'cache':new J(_0x1a8a10[_0x2a5981(0x202)]),'downloader':new Q(_0x1a8a10['downloader']),'output':new Y()}),_0x4ddec1);}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 _0x10a363=_0x2349;(function(_0x2544df,_0x11741d){const _0x49e280=_0x2349,_0x12db7c=_0x2544df();while(!![]){try{const _0x205708=-parseInt(_0x49e280(0x1a7))/0x1+parseInt(_0x49e280(0x1d6))/0x2+parseInt(_0x49e280(0x1dd))/0x3*(parseInt(_0x49e280(0x164))/0x4)+-parseInt(_0x49e280(0x175))/0x5+parseInt(_0x49e280(0x16e))/0x6+-parseInt(_0x49e280(0x182))/0x7+parseInt(_0x49e280(0x146))/0x8*(parseInt(_0x49e280(0x1cd))/0x9);if(_0x205708===_0x11741d)break;else _0x12db7c['push'](_0x12db7c['shift']());}catch(_0x27378b){_0x12db7c['push'](_0x12db7c['shift']());}}}(_0x10a2,0xdcf21));import{randomUUID as _0x311077}from'node:crypto';import{mkdir as _0x4b2f34,readFile as _0x857f97,readdir as _0x495ffd,rename as _0x32a4b3,rm as _0x1b6ad8,stat as _0x1cb600,unlink as _0x47a113,writeFile as _0x4e3aa9}from'node:fs/promises';import{dirname as _0xe8ba2c,isAbsolute as _0x30918f,join as _0x175002,parse as _0x34d254,resolve as _0x5a3a0d}from'node:path';import{readFileSync as _0x2873a9}from'node:fs';var h=class extends Error{[_0x10a363(0x1ce)];['handle'];constructor(_0x3d6a81,_0x275ee9,_0x2959f9,_0x2c6370){const _0x3bd077=_0x10a363;super(_0x275ee9,_0x2c6370),this[_0x3bd077(0x1ce)]=_0x3d6a81,this[_0x3bd077(0x1cb)]=_0x2959f9,this['name']=_0x3bd077(0x17a);}};function g(_0x5cd463){return _0x5cd463 instanceof h;}var _=/^[A-Za-z0-9._-]+$/u,v=0xff,y=0x4;function b(_0x279c42){const _0x303772=_0x10a363;return _[_0x303772(0x138)](_0x279c42)&&_0x279c42!=='.'&&_0x279c42!=='..';}function x(_0x37edf4){const _0x7b7d7b=_0x10a363;if(!b(_0x37edf4)||_0x37edf4[_0x7b7d7b(0x126)]('-')||_0x37edf4['includes']('--')||_0x37edf4[_0x7b7d7b(0x171)]>v)throw new h(_0x7b7d7b(0x165),_0x7b7d7b(0x131)+_0x37edf4+'\x22:\x20expected\x20an\x20addressable\x20filesystem-safe\x20component\x20without\x20\x22--\x22.');}function S(_0x4b944c){const _0x28894a=_0x10a363;if(!b(_0x4b944c)||_0x4b944c[_0x28894a(0x171)]+y>v)throw new h(_0x28894a(0x16b),_0x28894a(0x1bf)+_0x4b944c+'\x22:\x20expected\x20filesystem-safe\x20characters.');}function C(_0x21cffe){const _0x501c0c=_0x10a363;let _0x520ed7=_0x21cffe['split']('/');if(_0x520ed7[_0x501c0c(0x171)]!==0x2||_0x520ed7[0x0]===''||_0x520ed7[0x1]==='')throw new h('resource-invalid-handle','Invalid\x20resource\x20handle\x20\x22'+_0x21cffe+_0x501c0c(0x16f),_0x21cffe);let _0x429ae9=_0x520ed7[0x0],_0x87ab3a=_0x520ed7[0x1];return x(_0x429ae9),S(_0x87ab3a),{'registryId':_0x429ae9,'resourceId':_0x87ab3a};}function ee(_0x835c1e,_0x84c79f){return x(_0x835c1e),S(_0x84c79f),_0x835c1e+'/'+_0x84c79f;}function w(_0x650c8e){const _0x5cea77=_0x10a363;let {registryId:_0x139af7,resourceId:_0x49b94c}=C(_0x650c8e),_0xec2c58=_0x139af7+'--'+_0x49b94c+_0x5cea77(0x1c1);if(_0xec2c58['length']>v)throw new h(_0x5cea77(0x161),_0x5cea77(0x144)+v+_0x5cea77(0x14e),_0x650c8e);return _0xec2c58;}function T(_0x5d526c){const _0x4eeef1=_0x10a363;return new h(_0x4eeef1(0x172),'Invalid\x20resource\x20manifest:\x20'+_0x5d526c);}function E(_0x5a480e,_0x14011c){const _0x5d5b9f=_0x10a363;if(typeof _0x5a480e!=_0x5d5b9f(0x1ba)||!_0x5a480e||Array[_0x5d5b9f(0x1ac)](_0x5a480e))throw T(_0x14011c+_0x5d5b9f(0x158));return _0x5a480e;}function D(_0xb045dd,_0x3ce14d,_0x5a87ce=!0x1){const _0x37b471=_0x10a363;if(_0x5a87ce&&_0xb045dd===void 0x0)return[];if(!Array[_0x37b471(0x1ac)](_0xb045dd))throw T(_0x3ce14d+_0x37b471(0x194));return _0xb045dd;}function O(_0x69272c,_0x500ec3){const _0x104892=_0x10a363;if(typeof _0x69272c!=_0x104892(0x129)||_0x69272c==='')throw T(_0x500ec3+'\x20must\x20be\x20a\x20non-empty\x20string.');return _0x69272c;}function k(_0x2f06f6,_0x57150e,_0x2a585b=!0x1){const _0x54a9d8=_0x10a363;return D(_0x2f06f6,_0x57150e,_0x2a585b)[_0x54a9d8(0x139)]((_0x4e148f,_0x4a25f5)=>O(_0x4e148f,_0x57150e+'['+_0x4a25f5+']'));}function A(_0x48d1e3,_0x447330){const _0x5435e3=_0x10a363;return D(_0x48d1e3,_0x447330,!0x0)[_0x5435e3(0x139)]((_0x509bbe,_0x39996a)=>{const _0xf2a755=_0x5435e3;if(typeof _0x509bbe!=_0xf2a755(0x129))throw T(_0x447330+'['+_0x39996a+_0xf2a755(0x141));return _0x509bbe;})[_0x5435e3(0x1c7)](_0x32996f=>_0x32996f!=='');}function j(_0x3edabd,_0x1da6aa){const _0x47372a=_0x10a363;if(typeof _0x3edabd!=_0x47372a(0x1e9)||!Number[_0x47372a(0x1bd)](_0x3edabd))throw T(_0x1da6aa+_0x47372a(0x12c));return _0x3edabd;}function M(_0x86ed99,_0x2b1cab){const _0x20909f=_0x10a363;if(typeof _0x86ed99!='boolean')throw T(_0x2b1cab+_0x20909f(0x1a1));return _0x86ed99;}function N(_0x308a4d,_0x2e58e2,_0x2e7d57){const _0x221c5b=_0x10a363;if(typeof _0x308a4d==_0x221c5b(0x129)&&_0x308a4d!=='')return _0x308a4d;let _0x41bd49=E(_0x308a4d,_0x2e58e2),_0x173581=_0x2e7d57===void 0x0?void 0x0:_0x41bd49[_0x2e7d57];if(typeof _0x173581==_0x221c5b(0x129)&&_0x173581!=='')return _0x173581;let _0x2b58ee=_0x41bd49[_0x221c5b(0x1c9)];if(typeof _0x2b58ee==_0x221c5b(0x129)&&_0x2b58ee!=='')return _0x2b58ee;let _0x53cd39=Object[_0x221c5b(0x174)](_0x41bd49)[_0x221c5b(0x16a)](_0x32d36e=>typeof _0x32d36e=='string'&&_0x32d36e!=='');if(_0x53cd39!==void 0x0)return _0x53cd39;throw T(_0x2e58e2+'\x20contains\x20no\x20usable\x20localized\x20text.');}function _0x10a2(){const _0xaf2ba1=['filter','storagePolicy','en-US','protocol','handle','abort','78903fzWYVh','code','Duplicate\x20registry\x20ID\x20\x22','description','join','status','.source.value\x20must\x20use\x20HTTPS.','Resource\x20response\x20is\x20not\x20an\x20SVG\x20document.','Resource\x20cache\x20root\x20must\x20be\x20an\x20absolute,\x20dedicated\x20directory\x20below\x20the\x20filesystem\x20root;\x20received\x20\x22','912582WFFllH','name','parse','includes','].input.registryId','Resource\x20request\x20followed\x20too\x20many\x20redirects;\x20maximum\x20','tags','1458579zGJbNW','registrations[','resourceIndex','replace','\x20ID\x20\x22','localeCompare','manifest.registrations','set','sort','Duplicate\x20export\x20filename\x20\x22','groupId','isDirectory','number','done','catch','].input.tags','fetch','resource-download-too-large','resourceByHandle','.intrinsicSize.height','downloader','Resource\x20server\x20returned\x20HTTP\x20','Unknown\x20resource\x20\x22','startsWith','].input.resources[','destination','string','registries','].input','\x20must\x20be\x20a\x20finite\x20number.','cacheRoot','resource-export-failed','payload','push','Invalid\x20registry\x20ID\x20\x22','fetchImpl','.source.type\x20must\x20be\x20\x22url\x22.','Resource\x20exceeds\x20the\x20maximum\x20size\x20of\x20','get','Failed\x20to\x20download\x20\x22','].id','test','map','some','Resource\x20search\x20needs\x20at\x20least\x20one\x20non-empty\x20query.','\x20ms.','\x22;\x20try\x20resources\x20find\x20<query>.','clearCache','cacheLocation','location',']\x20must\x20be\x20a\x20string.','Duplicate\x20','tagIds','Resource\x20export\x20filename\x20exceeds\x20','concat','1304ovrPrw','download','maxBytes','group','text','\x20without\x20a\x20Location\x20header.','resource-query-empty','resource-limit-invalid','\x20bytes.','resource-manifest-read-failed','catalog','.description','endsWith','Unknown\x20resource\x20registry\x20\x22','resource-download-http','.source.value\x20must\x20be\x20a\x20URL.','resource-download-too-many-redirects','export','\x20must\x20be\x20an\x20object.','.keywords','resources','colorEditable','resource-download-insecure','.type\x20must\x20be\x20\x22image\x22.','resource-download-failed','defaultLocale','Resource\x20URL\x20must\x20use\x20HTTPS.','resource-export-filename-too-long','headers','intrinsicSize','12dRWEBV','resource-invalid-registry-id','input','root','groups','resource','find','resource-invalid-resource-id','registrationIndex','manual','4906926vDEmdJ','\x22;\x20expected\x20<registryId>/<resourceId>.','registry','length','resource-manifest-invalid','].label','values','7414180VsQhUa','body','Resource\x20server\x20returned\x20an\x20invalid\x20redirect\x20URL.','entries','resource-download-invalid-utf8','ResourceLibraryError','Resource\x20search\x20limit\x20must\x20be\x20a\x20positive\x20integer;\x20received\x20\x22','read','getReader','ENOENT','listRegistries','limit','queries','1751519FhgQev','trim','\x22:\x20','value','Duplicate\x20resource\x20handle\x20\x22','normalize','toLowerCase','resource-invalid-svg','height','handles','utf8','output','.tagIds','.intrinsicSize.width','has','Resource\x20response\x20is\x20not\x20valid\x20UTF-8.','].input.defaultLocale','globalIndex','\x20must\x20be\x20an\x20array.','.source','options','write','source','cache','.groupId','searchText','utf-8','manifest','Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.','add','manifestPath','\x20must\x20be\x20a\x20boolean.','Resource\x20download\x20timed\x20out\x20after\x20','Downloaded\x20resource\x20\x22','.payload.colorEditable','resource-download-invalid-redirect','signal','1523666GpVQRC','.intrinsicSize\x20must\x20be\x20positive.','clear','byteLength','url','isArray','.name','https:','registryId','maxRedirects','.id','.storagePolicy\x20must\x20be\x20\x22reference\x22.','isInteger','pid','resource-download-insecure-redirect','sourceUrl','.payload','label','order','object','resource-registry-not-found','path','isFinite','type','Invalid\x20resource\x20ID\x20\x22','message','.svg','size','keywords','releaseLock','timeoutMs','reference'];_0x10a2=function(){return _0xaf2ba1;};return _0x10a2();}function P(_0x3040f7,_0x11daf5,_0x495891){const _0x396e8b=_0x10a363;try{_0x495891===_0x396e8b(0x170)?x(_0x3040f7):S(_0x3040f7);}catch(_0x21a9d9){throw T(_0x11daf5+':\x20'+(_0x21a9d9 instanceof Error?_0x21a9d9[_0x396e8b(0x1c0)]:String(_0x21a9d9)));}}function F(_0x4ad68f,_0x2b2926,_0x1add4a){const _0x4d419c=_0x10a363;let _0x4150a6=new Map();for(let [_0x495ea3,_0x30ff18]of D(_0x4ad68f,_0x2b2926,!0x0)['entries']()){let _0x5eb580=E(_0x30ff18,_0x2b2926+'['+_0x495ea3+']'),_0x1b97c9=O(_0x5eb580['id'],_0x2b2926+'['+_0x495ea3+_0x4d419c(0x137));if(P(_0x1b97c9,_0x2b2926+'['+_0x495ea3+_0x4d419c(0x137),_0x4d419c(0x169)),_0x4150a6[_0x4d419c(0x190)](_0x1b97c9))throw T(_0x4d419c(0x142)+_0x2b2926+_0x4d419c(0x1e1)+_0x1b97c9+'\x22.');_0x4150a6[_0x4d419c(0x1e4)](_0x1b97c9,N(_0x5eb580[_0x4d419c(0x1b8)],_0x2b2926+'['+_0x495ea3+_0x4d419c(0x173),_0x1add4a));}return _0x4150a6;}function I(_0x335d9c,_0x34a36d){const _0xcc5d4=_0x10a363;let _0x4952ee=E(_0x335d9c[_0xcc5d4(0x163)],_0x34a36d+'.intrinsicSize'),_0xeb6409=j(_0x4952ee['width'],_0x34a36d+_0xcc5d4(0x18f)),_0x35e8e1=j(_0x4952ee[_0xcc5d4(0x18a)],_0x34a36d+_0xcc5d4(0x122));if(_0xeb6409<=0x0||_0x35e8e1<=0x0)throw T(_0x34a36d+_0xcc5d4(0x1a8));return{'width':_0xeb6409,'height':_0x35e8e1};}function L(_0x540e07,_0x4c4188){const _0x2adae7=_0x10a363;if(_0x540e07[_0x2adae7(0x1be)]!=='image')throw T(_0x4c4188+_0x2adae7(0x15d));if(_0x540e07[_0x2adae7(0x1c8)]!==_0x2adae7(0x1c6))throw T(_0x4c4188+_0x2adae7(0x1b2));let _0x5e81ba=E(_0x540e07[_0x2adae7(0x198)],_0x4c4188+_0x2adae7(0x195));if(_0x5e81ba['type']!==_0x2adae7(0x1ab))throw T(_0x4c4188+_0x2adae7(0x133));let _0x1e5c54=O(_0x5e81ba[_0x2adae7(0x185)],_0x4c4188+'.source.value'),_0x162bc6;try{_0x162bc6=new URL(_0x1e5c54);}catch{throw T(_0x4c4188+_0x2adae7(0x155));}if(_0x162bc6['protocol']!=='https:')throw T(_0x4c4188+_0x2adae7(0x1d3));return _0x1e5c54;}function R(_0x51ae58){const _0x2f84ac=_0x10a363;return _0x51ae58[_0x2f84ac(0x187)]('NFKC')[_0x2f84ac(0x188)]()[_0x2f84ac(0x183)]()[_0x2f84ac(0x1e0)](/\s+/gu,'\x20');}function z(_0x4e84ae){const _0x5d3412=_0x10a363;let _0x11fe55=E(_0x4e84ae,_0x5d3412(0x19d)),_0x6ccc69=new Map(),_0x5d0d38=new Map(),_0x5e5635=[],_0x386a14=[],_0x590b16=new Set(),_0x1bb8f5=0x0;for(let [_0x1cc1d3,_0x5d453f]of D(_0x11fe55['registrations'],_0x5d3412(0x1e3))['entries']()){let _0x22908c=E(E(_0x5d453f,_0x5d3412(0x1de)+_0x1cc1d3+']')[_0x5d3412(0x166)],'registrations['+_0x1cc1d3+_0x5d3412(0x12b)),_0x89e43c=O(_0x22908c['registryId'],_0x5d3412(0x1de)+_0x1cc1d3+_0x5d3412(0x1da));if(P(_0x89e43c,_0x5d3412(0x1de)+_0x1cc1d3+_0x5d3412(0x1da),_0x5d3412(0x170)),_0x6ccc69[_0x5d3412(0x190)](_0x89e43c))throw T(_0x5d3412(0x1cf)+_0x89e43c+'\x22.');let _0xf443d9=_0x22908c[_0x5d3412(0x15f)]===void 0x0?void 0x0:O(_0x22908c['defaultLocale'],_0x5d3412(0x1de)+_0x1cc1d3+_0x5d3412(0x192)),_0x116687=F(_0x22908c[_0x5d3412(0x168)],_0x5d3412(0x1de)+_0x1cc1d3+'].input.groups',_0xf443d9),_0x3064c8=F(_0x22908c[_0x5d3412(0x1dc)],'registrations['+_0x1cc1d3+_0x5d3412(0x11e),_0xf443d9),_0x470cd3=[];for(let [_0x12a5d3,_0x52fd6c]of D(_0x22908c[_0x5d3412(0x15a)],'registrations['+_0x1cc1d3+'].input.resources')[_0x5d3412(0x178)]()){let _0x1c0ef5='registrations['+_0x1cc1d3+_0x5d3412(0x127)+_0x12a5d3+']',_0x21275d=E(_0x52fd6c,_0x1c0ef5),_0x43cbfd=O(_0x21275d['id'],_0x1c0ef5+_0x5d3412(0x1b1));P(_0x43cbfd,_0x1c0ef5+'.id','resource');let _0x68dadf=ee(_0x89e43c,_0x43cbfd);if(_0x5d0d38[_0x5d3412(0x190)](_0x68dadf))throw T(_0x5d3412(0x186)+_0x68dadf+'\x22.');let _0x4aa070;try{_0x4aa070=w(_0x68dadf);}catch(_0x2c2126){throw T(_0x1c0ef5+':\x20'+(_0x2c2126 instanceof Error?_0x2c2126[_0x5d3412(0x1c0)]:String(_0x2c2126)));}if(_0x590b16[_0x5d3412(0x190)](_0x4aa070))throw T(_0x5d3412(0x1e6)+_0x4aa070+'\x22.');_0x590b16[_0x5d3412(0x19f)](_0x4aa070);let _0x48129b=_0x21275d[_0x5d3412(0x1e7)]===void 0x0?void 0x0:O(_0x21275d['groupId'],_0x1c0ef5+_0x5d3412(0x19a));if(_0x48129b!==void 0x0&&!_0x116687[_0x5d3412(0x190)](_0x48129b))throw T(_0x1c0ef5+'.groupId\x20references\x20unknown\x20group\x20\x22'+_0x48129b+'\x22.');let _0x2b0677=k(_0x21275d[_0x5d3412(0x143)],_0x1c0ef5+_0x5d3412(0x18e),!0x0);for(let _0xf847a1 of _0x2b0677)if(!_0x3064c8[_0x5d3412(0x190)](_0xf847a1))throw T(_0x1c0ef5+'.tagIds\x20references\x20unknown\x20tag\x20\x22'+_0xf847a1+'\x22.');let _0x4f3ba7=A(_0x21275d['keywords'],_0x1c0ef5+_0x5d3412(0x159)),_0xb70f2c=N(_0x21275d[_0x5d3412(0x1d7)],_0x1c0ef5+_0x5d3412(0x1ad),_0xf443d9),_0x1ae4cf=_0x21275d[_0x5d3412(0x1d0)]===void 0x0?void 0x0:N(_0x21275d[_0x5d3412(0x1d0)],_0x1c0ef5+_0x5d3412(0x151),_0xf443d9),_0xee870e=_0x48129b===void 0x0?null:{'id':_0x48129b,'label':_0x116687[_0x5d3412(0x135)](_0x48129b)},_0x11a8f1=_0x2b0677[_0x5d3412(0x139)](_0x2e2595=>({'id':_0x2e2595,'label':_0x3064c8[_0x5d3412(0x135)](_0x2e2595)})),_0x1e3f6f=E(_0x21275d[_0x5d3412(0x12f)],_0x1c0ef5+'.payload'),_0x263103=_0x21275d['order']===void 0x0?null:j(_0x21275d[_0x5d3412(0x1b9)],_0x1c0ef5+'.order'),_0x2aefc1=M(_0x1e3f6f[_0x5d3412(0x15b)],_0x1c0ef5+_0x5d3412(0x1a4)),_0x48a7d1={'handle':_0x68dadf,'registryId':_0x89e43c,'id':_0x43cbfd,'name':_0xb70f2c,..._0x1ae4cf===void 0x0?{}:{'description':_0x1ae4cf},'group':_0xee870e,'tags':_0x11a8f1,'keywords':_0x4f3ba7,'order':_0x263103,'intrinsicSize':I(_0x1e3f6f,_0x1c0ef5+_0x5d3412(0x1b7)),'colorEditable':_0x2aefc1,'sourceUrl':L(_0x1e3f6f,_0x1c0ef5+_0x5d3412(0x1b7)),'registrationIndex':_0x1cc1d3,'resourceIndex':_0x12a5d3,'globalIndex':_0x1bb8f5,'searchText':R([_0xb70f2c,_0x1ae4cf,_0xee870e?.[_0x5d3412(0x1b8)],..._0x11a8f1[_0x5d3412(0x139)](_0x684b3d=>_0x684b3d[_0x5d3412(0x1b8)]),..._0x4f3ba7][_0x5d3412(0x1c7)](_0x27f8ea=>_0x27f8ea!==void 0x0)[_0x5d3412(0x1d1)]('\x20'))};_0x1bb8f5++,_0x470cd3['push'](_0x48a7d1),_0x386a14['push'](_0x48a7d1),_0x5d0d38[_0x5d3412(0x1e4)](_0x68dadf,_0x48a7d1);}let _0x149381={'id':_0x89e43c,'groups':_0x116687,'tags':_0x3064c8,'resources':_0x470cd3};_0x5e5635[_0x5d3412(0x130)](_0x149381),_0x6ccc69['set'](_0x89e43c,_0x149381);}if(_0x5e5635[_0x5d3412(0x171)]===0x0)throw T('registrations\x20must\x20not\x20be\x20empty.');return{'registries':_0x5e5635,'registryById':_0x6ccc69,'resourceByHandle':_0x5d0d38,'resources':_0x386a14};}function _0x2349(_0x12dd40,_0x234735){_0x12dd40=_0x12dd40-0x11e;const _0x10a242=_0x10a2();let _0x234932=_0x10a242[_0x12dd40];return _0x234932;}function B(_0x5df1b4,_0x36414f){const _0x52b079=_0x10a363;C(_0x36414f);let _0x540afb=_0x5df1b4[_0x52b079(0x121)][_0x52b079(0x135)](_0x36414f);if(_0x540afb===void 0x0)throw new h('resource-not-found',_0x52b079(0x125)+_0x36414f+_0x52b079(0x13d),_0x36414f);return _0x540afb;}function te(_0x22cdd2){const _0x1b7b70=_0x10a363;return _0x22cdd2[_0x1b7b70(0x12a)][_0x1b7b70(0x139)](_0x2a6269=>({'id':_0x2a6269['id'],'resourceCount':_0x2a6269[_0x1b7b70(0x15a)][_0x1b7b70(0x171)],'groupCount':_0x2a6269['groups'][_0x1b7b70(0x1c2)],'tagCount':_0x2a6269['tags'][_0x1b7b70(0x1c2)],'colorEditableCount':_0x2a6269['resources'][_0x1b7b70(0x1c7)](_0x1321da=>_0x1321da[_0x1b7b70(0x15b)])[_0x1b7b70(0x171)]}));}function ne(_0x58764d){const _0xc9357e=_0x10a363;return{'handle':_0x58764d[_0xc9357e(0x1cb)],'registryId':_0x58764d[_0xc9357e(0x1af)],'id':_0x58764d['id'],'name':_0x58764d[_0xc9357e(0x1d7)],'group':_0x58764d[_0xc9357e(0x149)],'tags':_0x58764d['tags'],'keywords':_0x58764d[_0xc9357e(0x1c3)],'order':_0x58764d[_0xc9357e(0x1b9)],'intrinsicSize':_0x58764d[_0xc9357e(0x163)],'colorEditable':_0x58764d[_0xc9357e(0x15b)]};}function re(_0x27ea0e,_0x977553){const _0x255d74=_0x10a363;let _0x1f3869=(_0x27ea0e[_0x255d74(0x1b9)]??_0x27ea0e['globalIndex'])-(_0x977553[_0x255d74(0x1b9)]??_0x977553[_0x255d74(0x193)]);if(_0x1f3869!==0x0)return _0x1f3869;let _0xd0cbf0=_0x27ea0e[_0x255d74(0x16c)]-_0x977553[_0x255d74(0x16c)];if(_0xd0cbf0!==0x0)return _0xd0cbf0;let _0x30a39b=_0x27ea0e[_0x255d74(0x1df)]-_0x977553['resourceIndex'];return _0x30a39b===0x0?_0x27ea0e[_0x255d74(0x1cb)][_0x255d74(0x1e2)](_0x977553[_0x255d74(0x1cb)]):_0x30a39b;}function ie(_0x287d40,_0x1e587c){const _0x136201=_0x10a363;let _0xf0791b=_0x1e587c[_0x136201(0x181)]['map'](R)[_0x136201(0x1c7)](_0x4226c9=>_0x4226c9!=='');if(_0xf0791b[_0x136201(0x171)]===0x0)throw new h(_0x136201(0x14c),_0x136201(0x13b));let _0x4ec397=new Set(_0x1e587c[_0x136201(0x12a)]??[]);for(let _0x192a6c of _0x4ec397)if(!_0x287d40['registryById']['has'](_0x192a6c))throw new h(_0x136201(0x1bb),_0x136201(0x153)+_0x192a6c+'\x22.');let _0x446f17=_0x1e587c[_0x136201(0x180)]??_0x287d40[_0x136201(0x15a)][_0x136201(0x171)];if(!Number[_0x136201(0x1b3)](_0x446f17)||_0x446f17<0x1)throw new h(_0x136201(0x14d),_0x136201(0x17b)+_0x446f17+'\x22.');let _0x4108ec=_0x287d40['resources'][_0x136201(0x1c7)](_0x3a932d=>_0x4ec397['size']===0x0||_0x4ec397['has'](_0x3a932d[_0x136201(0x1af)]))[_0x136201(0x1c7)](_0x30dace=>_0xf0791b[_0x136201(0x13a)](_0x245325=>_0x30dace[_0x136201(0x19b)][_0x136201(0x1d9)](_0x245325)))[_0x136201(0x1e5)](re);return{'resources':_0x4108ec['slice'](0x0,_0x446f17)['map'](ne),'total':_0x4108ec[_0x136201(0x171)]};}function V(_0x521642){return/^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[^]*?-->\s*)*<svg(?:\s|>)/iu['test'](_0x521642);}function H(_0x8ec3e1,_0x570ac8){const _0x46fe45=_0x10a363;return g(_0x570ac8)?{'handle':_0x8ec3e1,'code':_0x570ac8[_0x46fe45(0x1ce)],'message':_0x570ac8[_0x46fe45(0x1c0)]}:{'handle':_0x8ec3e1,'code':_0x46fe45(0x12e),'message':_0x570ac8 instanceof Error?_0x570ac8['message']:String(_0x570ac8)};}var U=class{[_0x10a363(0x196)];[_0x10a363(0x150)];constructor(_0x26184e){const _0x40015a=_0x10a363;this[_0x40015a(0x196)]=_0x26184e,this[_0x40015a(0x150)]=z(_0x26184e['manifest']);}get[_0x10a363(0x13f)](){const _0x569cd7=_0x10a363;return this[_0x569cd7(0x196)][_0x569cd7(0x199)]['location'];}[_0x10a363(0x17f)](){const _0x433a07=_0x10a363;return te(this[_0x433a07(0x150)]);}[_0x10a363(0x16a)](_0x4e555a){const _0x30a709=_0x10a363;return ie(this[_0x30a709(0x150)],_0x4e555a);}async['read'](_0x368577){const _0x8b143e=_0x10a363;let _0x21f2a5=B(this[_0x8b143e(0x150)],_0x368577['handle']),_0x309d73=await this['options']['cache']['read'](_0x368577[_0x8b143e(0x1cb)]);if(_0x309d73!==void 0x0&&V(_0x309d73))return{'handle':_0x368577[_0x8b143e(0x1cb)],'svg':_0x309d73};let _0x49d9f0;try{_0x49d9f0=await this[_0x8b143e(0x196)][_0x8b143e(0x123)][_0x8b143e(0x147)](_0x21f2a5[_0x8b143e(0x1b6)]);}catch(_0x31baea){throw g(_0x31baea)?_0x31baea:new h(_0x8b143e(0x15e),_0x8b143e(0x136)+_0x368577['handle']+_0x8b143e(0x184)+(_0x31baea instanceof Error?_0x31baea[_0x8b143e(0x1c0)]:String(_0x31baea)),_0x368577['handle'],{'cause':_0x31baea});}if(!V(_0x49d9f0))throw new h(_0x8b143e(0x189),_0x8b143e(0x1a3)+_0x368577['handle']+'\x22\x20is\x20not\x20an\x20SVG\x20document.',_0x368577['handle']);return await this[_0x8b143e(0x196)][_0x8b143e(0x199)][_0x8b143e(0x197)](_0x368577['handle'],_0x49d9f0),{'handle':_0x368577[_0x8b143e(0x1cb)],'svg':_0x49d9f0};}async[_0x10a363(0x157)](_0x1c4b66){const _0x594898=_0x10a363;let _0x44f97b=[],_0x5bd48e=[];for(let _0x59415d of _0x1c4b66[_0x594898(0x18b)])try{let {svg:_0x20beab}=await this[_0x594898(0x17c)]({'handle':_0x59415d}),_0x128296=await this[_0x594898(0x196)][_0x594898(0x18d)][_0x594898(0x197)](_0x1c4b66[_0x594898(0x128)],w(_0x59415d),_0x20beab);_0x44f97b['push']({'handle':_0x59415d,'path':_0x128296});}catch(_0x38297){_0x5bd48e[_0x594898(0x130)](H(_0x59415d,_0x38297));}return{'exported':_0x44f97b,'failed':_0x5bd48e};}async[_0x10a363(0x13e)](){const _0x47aadf=_0x10a363;return await this[_0x47aadf(0x196)]['cache'][_0x47aadf(0x1a9)]();}};function W(_0x3dd887){return new U(_0x3dd887);}function G(_0x32a77b){return _0x32a77b instanceof Error&&'code'in _0x32a77b;}function K(_0x1c15d9){const _0x19e651=_0x10a363;let _0xf52b61=_0x5a3a0d(_0x1c15d9);if(!_0x30918f(_0x1c15d9)||_0xf52b61===_0x34d254(_0xf52b61)[_0x19e651(0x167)])throw new h('resource-cache-root-invalid',_0x19e651(0x1d5)+_0x1c15d9+'\x22.');return _0xf52b61;}async function q(_0x2587ba){const _0x36b104=_0x10a363;let _0xde84e2;try{_0xde84e2=await _0x495ffd(_0x2587ba,{'withFileTypes':!0x0});}catch(_0x30e84c){if(G(_0x30e84c)&&_0x30e84c['code']===_0x36b104(0x17e))return{'resourceCount':0x0,'byteCount':0x0};throw _0x30e84c;}let _0x4f4f68=0x0,_0x38a434=0x0;for(let _0x48443e of _0xde84e2){let _0x40ba80=_0x175002(_0x2587ba,_0x48443e['name']);if(_0x48443e[_0x36b104(0x1e8)]()){let _0x13196e=await q(_0x40ba80);_0x4f4f68+=_0x13196e['resourceCount'],_0x38a434+=_0x13196e['byteCount'];}else{if(_0x48443e['isFile']()&&_0x48443e[_0x36b104(0x1d7)][_0x36b104(0x152)](_0x36b104(0x1c1))){let _0x2f911c=await _0x1cb600(_0x40ba80);_0x4f4f68++,_0x38a434+=_0x2f911c[_0x36b104(0x1c2)];}}}return{'resourceCount':_0x4f4f68,'byteCount':_0x38a434};}var J=class{[_0x10a363(0x140)];constructor(_0x1edbdf){const _0x1a8582=_0x10a363;this[_0x1a8582(0x140)]=K(_0x1edbdf);}[_0x10a363(0x1bc)](_0x527944){let {registryId:_0x5cfbbb,resourceId:_0x2fe659}=C(_0x527944);return _0x175002(this['location'],_0x5cfbbb,_0x2fe659+'.svg');}async['read'](_0x56774d){const _0x5bae2d=_0x10a363;try{return await _0x857f97(this[_0x5bae2d(0x1bc)](_0x56774d),_0x5bae2d(0x18c));}catch(_0x53723f){if(G(_0x53723f)&&_0x53723f[_0x5bae2d(0x1ce)]===_0x5bae2d(0x17e))return;throw _0x53723f;}}async[_0x10a363(0x197)](_0x487648,_0x3de400){const _0x144c84=_0x10a363;let _0x4bd4b3=this[_0x144c84(0x1bc)](_0x487648);await _0x4b2f34(_0xe8ba2c(_0x4bd4b3),{'recursive':!0x0});let _0x26cf27=_0x175002(_0xe8ba2c(_0x4bd4b3),'.resource-'+process[_0x144c84(0x1b4)]+'-'+_0x311077()+'.tmp');try{await _0x4e3aa9(_0x26cf27,_0x3de400,{'encoding':_0x144c84(0x18c),'mode':0x180}),await _0x32a4b3(_0x26cf27,_0x4bd4b3);}catch(_0x297295){throw await _0x47a113(_0x26cf27)['catch'](()=>void 0x0),_0x297295;}}async[_0x10a363(0x1a9)](){const _0x4ef5dc=_0x10a363;let _0x5b0845=await q(this[_0x4ef5dc(0x140)]);return await _0x1b6ad8(this['location'],{'force':!0x0,'recursive':!0x0}),{'path':this['location'],..._0x5b0845};}},Y=class{async[_0x10a363(0x197)](_0x19436c,_0x55392b,_0x1f069c){const _0x5a0d80=_0x10a363;await _0x4b2f34(_0x19436c,{'recursive':!0x0});let _0x24feb5=_0x175002(_0x19436c,_0x55392b);return await _0x4e3aa9(_0x24feb5,_0x1f069c,_0x5a0d80(0x18c)),_0x24feb5;}},X=0x7530,ae=0xa00000,oe=0xa,se=new Set([0x12d,0x12e,0x12f,0x133,0x134]);function Z(_0x313ec0){const _0x32a505=_0x10a363;return new h(_0x32a505(0x120),_0x32a505(0x134)+_0x313ec0+_0x32a505(0x14e));}async function ce(_0x276de6,_0x25c3f4){const _0x59a28d=_0x10a363;let _0x46b719=Number(_0x276de6[_0x59a28d(0x162)][_0x59a28d(0x135)]('content-length'));if(Number[_0x59a28d(0x1bd)](_0x46b719)&&_0x46b719>_0x25c3f4)throw Z(_0x25c3f4);if(_0x276de6[_0x59a28d(0x176)]===null){let _0x58255d=await _0x276de6[_0x59a28d(0x14a)]();if(Buffer[_0x59a28d(0x1aa)](_0x58255d)>_0x25c3f4)throw Z(_0x25c3f4);return _0x58255d;}let _0x3f3f63=_0x276de6[_0x59a28d(0x176)][_0x59a28d(0x17d)](),_0x1a4fd8=[],_0x40e88f=0x0;try{for(;;){let _0x478b84=await _0x3f3f63[_0x59a28d(0x17c)]();if(_0x478b84[_0x59a28d(0x1ea)])break;if(_0x40e88f+=_0x478b84[_0x59a28d(0x185)][_0x59a28d(0x1aa)],_0x40e88f>_0x25c3f4)throw await _0x3f3f63['cancel']()[_0x59a28d(0x1eb)](()=>void 0x0),Z(_0x25c3f4);_0x1a4fd8[_0x59a28d(0x130)](_0x478b84[_0x59a28d(0x185)]);}}finally{_0x3f3f63[_0x59a28d(0x1c4)]();}try{return new TextDecoder(_0x59a28d(0x19c),{'fatal':!0x0})['decode'](Buffer[_0x59a28d(0x145)](_0x1a4fd8,_0x40e88f));}catch{throw new h(_0x59a28d(0x179),_0x59a28d(0x191));}}var Q=class{[_0x10a363(0x132)];['timeoutMs'];[_0x10a363(0x148)];[_0x10a363(0x1b0)];constructor(_0x4ba0b5={}){const _0x3ac3c7=_0x10a363;this[_0x3ac3c7(0x132)]=_0x4ba0b5[_0x3ac3c7(0x11f)]??fetch,this[_0x3ac3c7(0x1c5)]=_0x4ba0b5['timeoutMs']??X,this[_0x3ac3c7(0x148)]=_0x4ba0b5[_0x3ac3c7(0x148)]??ae,this[_0x3ac3c7(0x1b0)]=_0x4ba0b5[_0x3ac3c7(0x1b0)]??oe;}async[_0x10a363(0x147)](_0x18011c){const _0x518e8d=_0x10a363;let _0x26f393=new URL(_0x18011c);if(_0x26f393[_0x518e8d(0x1ca)]!==_0x518e8d(0x1ae))throw new h(_0x518e8d(0x15c),_0x518e8d(0x160));let _0x310c86=new AbortController(),_0x464dff=setTimeout(()=>_0x310c86[_0x518e8d(0x1cc)](),this[_0x518e8d(0x1c5)]);try{let _0x23be30=_0x26f393;for(let _0xcf686d=0x0;;_0xcf686d++){let _0x4245b5=await this[_0x518e8d(0x132)](_0x23be30,{'redirect':_0x518e8d(0x16d),'signal':_0x310c86[_0x518e8d(0x1a6)]});if(se[_0x518e8d(0x190)](_0x4245b5[_0x518e8d(0x1d2)])){if(_0xcf686d>=this[_0x518e8d(0x1b0)])throw new h(_0x518e8d(0x156),_0x518e8d(0x1db)+this[_0x518e8d(0x1b0)]+'.');let _0x2c8ef1=_0x4245b5[_0x518e8d(0x162)][_0x518e8d(0x135)](_0x518e8d(0x140));if(_0x2c8ef1===null)throw new h('resource-download-invalid-redirect',_0x518e8d(0x124)+_0x4245b5[_0x518e8d(0x1d2)]+_0x518e8d(0x14b));let _0x2f4f6b;try{_0x2f4f6b=new URL(_0x2c8ef1,_0x23be30);}catch{throw new h(_0x518e8d(0x1a5),_0x518e8d(0x177));}if(_0x2f4f6b[_0x518e8d(0x1ca)]!==_0x518e8d(0x1ae))throw new h(_0x518e8d(0x1b5),_0x518e8d(0x19e));_0x23be30=_0x2f4f6b;continue;}if(!_0x4245b5['ok'])throw new h(_0x518e8d(0x154),'Resource\x20server\x20returned\x20HTTP\x20'+_0x4245b5[_0x518e8d(0x1d2)]+'.');if(_0x4245b5[_0x518e8d(0x1ab)]!==''&&new URL(_0x4245b5[_0x518e8d(0x1ab)])['protocol']!==_0x518e8d(0x1ae))throw new h(_0x518e8d(0x1b5),'Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.');let _0x3aeb9b=await ce(_0x4245b5,this[_0x518e8d(0x148)]);if(!V(_0x3aeb9b))throw new h('resource-download-invalid-svg',_0x518e8d(0x1d4));return _0x3aeb9b;}}catch(_0x15b96e){throw _0x310c86[_0x518e8d(0x1a6)]['aborted']?new h('resource-download-timeout',_0x518e8d(0x1a2)+this['timeoutMs']+_0x518e8d(0x13c)):_0x15b96e;}finally{clearTimeout(_0x464dff);}}};function $(_0x3e511d){const _0x9d9fb2=_0x10a363;try{return JSON[_0x9d9fb2(0x1d8)](_0x2873a9(_0x3e511d,'utf8'));}catch(_0x5da01f){throw new h(_0x9d9fb2(0x14f),'Cannot\x20read\x20resource\x20manifest\x20at\x20'+_0x3e511d+':\x20'+(_0x5da01f instanceof Error?_0x5da01f[_0x9d9fb2(0x1c0)]:String(_0x5da01f)),void 0x0,{'cause':_0x5da01f});}}function le(_0x2a26d6){const _0x4807ae=_0x10a363;let _0x55b5a2;return()=>(_0x55b5a2??=W({'manifest':$(_0x2a26d6[_0x4807ae(0x1a0)]),'cache':new J(_0x2a26d6[_0x4807ae(0x12d)]),'downloader':new Q(_0x2a26d6[_0x4807ae(0x123)]),'output':new Y()}),_0x55b5a2);}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};
|