@univer-cli/resource-library 1.0.0-beta.2 → 1.0.0-rc.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
|
-
function _0x17f1(){const _0x27845=['\x20must\x20be\x20a\x20non-empty\x20string.','includes','\x20must\x20be\x20a\x20boolean.','isArray','limit','colorEditable','].id','\x20ms.','213924WtSmjM','].label','resources','isInteger','registryId','Invalid\x20resource\x20ID\x20\x22','.svg','.name','get','resource-manifest-read-failed','].input','root','724100eeajHG','message','Resource\x20cache\x20root\x20must\x20be\x20an\x20absolute,\x20dedicated\x20directory\x20below\x20the\x20filesystem\x20root;\x20received\x20\x22','resource-download-invalid-redirect','output','ENOENT','Resource\x20export\x20filename\x20exceeds\x20','resource-not-found','1403036LidpzP','Downloaded\x20resource\x20\x22','.resource-','reference','download','keywords','resource-registry-not-found','order','headers','location','.intrinsicSize.height','.tmp',']\x20must\x20be\x20a\x20string.','Failed\x20to\x20download\x20\x22','registry','join','.order','push','.storagePolicy\x20must\x20be\x20\x22reference\x22.','set','globalIndex','1282666PjqtPj','Duplicate\x20resource\x20handle\x20\x22','groups','intrinsicSize','\x20without\x20a\x20Location\x20header.','cacheRoot','tags','resource-invalid-handle','manual','maxBytes','NFKC','split','.keywords','storagePolicy','.description','filter','read','Duplicate\x20','Resource\x20search\x20limit\x20must\x20be\x20a\x20positive\x20integer;\x20received\x20\x22','maxRedirects','protocol','downloader','.intrinsicSize.width','test','sourceUrl','string','10643056YumWdT','resource-download-invalid-svg','registrations','concat','signal','cancel','\x20must\x20be\x20an\x20object.','add','Resource\x20exceeds\x20the\x20maximum\x20size\x20of\x20','timeoutMs','Unknown\x20resource\x20registry\x20\x22','registrationIndex','].input.groups','https:','slice','label','isFile','localeCompare','resourceIndex','Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.','some','boolean','resource-query-empty','\x20ID\x20\x22','height','parse','values','isDirectory','Resource\x20download\x20timed\x20out\x20after\x20','aborted','Unknown\x20resource\x20\x22','code','clear','write','content-length','.source.type\x20must\x20be\x20\x22url\x22.','resource-invalid-svg','Invalid\x20registry\x20ID\x20\x22','defaultLocale','.groupId','type','.payload.colorEditable','.tagIds\x20references\x20unknown\x20tag\x20\x22','].input.defaultLocale','Duplicate\x20export\x20filename\x20\x22','ResourceLibraryError','byteCount','resource-download-too-many-redirects','length','Resource\x20server\x20returned\x20an\x20invalid\x20redirect\x20URL.','.id','742tLJBTQ','fetchImpl','toLowerCase','groupId','resource-download-too-large','.source','Cannot\x20read\x20resource\x20manifest\x20at\x20','url','utf8','isFinite','image','searchText','source','registrations\x20must\x20not\x20be\x20empty.','registrations[','Resource\x20response\x20is\x20not\x20valid\x20UTF-8.','group','number','entries','releaseLock','pid','catalog','map','resource-download-insecure-redirect','].input.registryId','options','resource-download-failed','queries','decode','manifest.registrations','catch','status','Invalid\x20resource\x20handle\x20\x22','path','resource-download-http','name','\x20bytes.','].input.resources','453jgnEsN','registries','Resource\x20server\x20returned\x20HTTP\x20','Invalid\x20resource\x20manifest:\x20','resource-invalid-resource-id','resource-export-filename-too-long','manifest','Resource\x20request\x20followed\x20too\x20many\x20redirects;\x20maximum\x20','Duplicate\x20registry\x20ID\x20\x22','done','byteLength','handle','.tagIds','cache','sort','.source.value\x20must\x20use\x20HTTPS.','.payload','has','destination','2616372DKypiW','size','\x22\x20is\x20not\x20an\x20SVG\x20document.','object','width','resource-invalid-registry-id','description','value','endsWith','resource','resource-download-insecure'];_0x17f1=function(){return _0x27845;};return _0x17f1();}const _0x122181=_0xdc40;(function(_0x3802ae,_0x3f3448){const _0x3d5fb7=_0xdc40,_0x381b6f=_0x3802ae();while(!![]){try{const _0x3bedab=-parseInt(_0x3d5fb7(0x1bf))/0x1+-parseInt(_0x3d5fb7(0x235))/0x2*(parseInt(_0x3d5fb7(0x199))/0x3)+-parseInt(_0x3d5fb7(0x1d3))/0x4+parseInt(_0x3d5fb7(0x1cb))/0x5+-parseInt(_0x3d5fb7(0x1ac))/0x6+-parseInt(_0x3d5fb7(0x1e8))/0x7+parseInt(_0x3d5fb7(0x202))/0x8;if(_0x3bedab===_0x3f3448)break;else _0x381b6f['push'](_0x381b6f['shift']());}catch(_0x2be24b){_0x381b6f['push'](_0x381b6f['shift']());}}}(_0x17f1,0x396be));import{randomUUID as _0x1c8bca}from'node:crypto';import{mkdir as _0x39a1a4,readFile as _0x3da128,readdir as _0x135f30,rename as _0x2e1d93,rm as _0x16f7b4,stat as _0x20e29a,unlink as _0x22e0b2,writeFile as _0x5f3f74}from'node:fs/promises';import{dirname as _0x5d4545,isAbsolute as _0x2d5484,join as _0x55ac48,parse as _0x569a81,resolve as _0x2c9d4a}from'node:path';import{readFileSync as _0x4310a8}from'node:fs';var h=class extends Error{[_0x122181(0x221)];[_0x122181(0x1a4)];constructor(_0x5e5cad,_0x1829d7,_0x2bcfc0,_0x445aca){const _0x55e5d2=_0x122181;super(_0x1829d7,_0x445aca),this['code']=_0x5e5cad,this[_0x55e5d2(0x1a4)]=_0x2bcfc0,this[_0x55e5d2(0x196)]=_0x55e5d2(0x22f);}};function g(_0xff85ec){return _0xff85ec instanceof h;}var _=/^[A-Za-z0-9._-]+$/u,v=0xff,y=0x4;function b(_0x5b3f79){return _['test'](_0x5b3f79)&&_0x5b3f79!=='.'&&_0x5b3f79!=='..';}function x(_0x3d9260){const _0x565df7=_0x122181;if(!b(_0x3d9260)||_0x3d9260['startsWith']('-')||_0x3d9260[_0x565df7(0x1b8)]('--')||_0x3d9260[_0x565df7(0x232)]>v)throw new h(_0x565df7(0x1b1),_0x565df7(0x227)+_0x3d9260+'\x22:\x20expected\x20an\x20addressable\x20filesystem-safe\x20component\x20without\x20\x22--\x22.');}function S(_0xc0c9bc){const _0x2978d1=_0x122181;if(!b(_0xc0c9bc)||_0xc0c9bc['length']+y>v)throw new h(_0x2978d1(0x19d),_0x2978d1(0x1c4)+_0xc0c9bc+'\x22:\x20expected\x20filesystem-safe\x20characters.');}function C(_0x449baa){const _0x35fb34=_0x122181;let _0x547fa9=_0x449baa[_0x35fb34(0x1f3)]('/');if(_0x547fa9[_0x35fb34(0x232)]!==0x2||_0x547fa9[0x0]===''||_0x547fa9[0x1]==='')throw new h(_0x35fb34(0x1ef),_0x35fb34(0x193)+_0x449baa+'\x22;\x20expected\x20<registryId>/<resourceId>.',_0x449baa);let _0x105c52=_0x547fa9[0x0],_0x401a36=_0x547fa9[0x1];return x(_0x105c52),S(_0x401a36),{'registryId':_0x105c52,'resourceId':_0x401a36};}function ee(_0xdf9125,_0x6f55a1){return x(_0xdf9125),S(_0x6f55a1),_0xdf9125+'/'+_0x6f55a1;}function w(_0x32832f){const _0x51f58f=_0x122181;let {registryId:_0x3ad601,resourceId:_0x5a3b74}=C(_0x32832f),_0x52998b=_0x3ad601+'--'+_0x5a3b74+'.svg';if(_0x52998b[_0x51f58f(0x232)]>v)throw new h(_0x51f58f(0x19e),_0x51f58f(0x1d1)+v+_0x51f58f(0x197),_0x32832f);return _0x52998b;}function T(_0x55b916){const _0x5c4101=_0x122181;return new h('resource-manifest-invalid',_0x5c4101(0x19c)+_0x55b916);}function E(_0x64d269,_0x36095c){const _0xb29428=_0x122181;if(typeof _0x64d269!=_0xb29428(0x1af)||!_0x64d269||Array[_0xb29428(0x1ba)](_0x64d269))throw T(_0x36095c+_0xb29428(0x208));return _0x64d269;}function D(_0xad8440,_0x2e384c,_0x28cba7=!0x1){const _0x2f2ff9=_0x122181;if(_0x28cba7&&_0xad8440===void 0x0)return[];if(!Array[_0x2f2ff9(0x1ba)](_0xad8440))throw T(_0x2e384c+'\x20must\x20be\x20an\x20array.');return _0xad8440;}function O(_0x557765,_0x580864){const _0x4ca156=_0x122181;if(typeof _0x557765!=_0x4ca156(0x201)||_0x557765==='')throw T(_0x580864+_0x4ca156(0x1b7));return _0x557765;}function k(_0x2a86a2,_0x347456,_0x1a19a1=!0x1){const _0x1b9c0c=_0x122181;return D(_0x2a86a2,_0x347456,_0x1a19a1)[_0x1b9c0c(0x189)]((_0x488a8f,_0x1e668d)=>O(_0x488a8f,_0x347456+'['+_0x1e668d+']'));}function A(_0x16a583,_0x156518){const _0x127920=_0x122181;return D(_0x16a583,_0x156518,!0x0)[_0x127920(0x189)]((_0x108957,_0x29d3ac)=>{const _0x26784e=_0x127920;if(typeof _0x108957!=_0x26784e(0x201))throw T(_0x156518+'['+_0x29d3ac+_0x26784e(0x1df));return _0x108957;})[_0x127920(0x1f7)](_0x51e1d8=>_0x51e1d8!=='');}function j(_0x23830e,_0x473cb6){const _0x12ef14=_0x122181;if(typeof _0x23830e!=_0x12ef14(0x184)||!Number[_0x12ef14(0x23e)](_0x23830e))throw T(_0x473cb6+'\x20must\x20be\x20a\x20finite\x20number.');return _0x23830e;}function M(_0x5b25b,_0x5019d7){const _0x3b939e=_0x122181;if(typeof _0x5b25b!=_0x3b939e(0x217))throw T(_0x5019d7+_0x3b939e(0x1b9));return _0x5b25b;}function N(_0x373d20,_0x54ee5b,_0x5eab82){const _0x4b2f7f=_0x122181;if(typeof _0x373d20==_0x4b2f7f(0x201)&&_0x373d20!=='')return _0x373d20;let _0x3c278d=E(_0x373d20,_0x54ee5b),_0xad768b=_0x5eab82===void 0x0?void 0x0:_0x3c278d[_0x5eab82];if(typeof _0xad768b==_0x4b2f7f(0x201)&&_0xad768b!=='')return _0xad768b;let _0x10c412=_0x3c278d['en-US'];if(typeof _0x10c412==_0x4b2f7f(0x201)&&_0x10c412!=='')return _0x10c412;let _0x33d5e1=Object[_0x4b2f7f(0x21c)](_0x3c278d)['find'](_0x43878a=>typeof _0x43878a==_0x4b2f7f(0x201)&&_0x43878a!=='');if(_0x33d5e1!==void 0x0)return _0x33d5e1;throw T(_0x54ee5b+'\x20contains\x20no\x20usable\x20localized\x20text.');}function P(_0x49e1b9,_0x165cc4,_0x51ba83){const _0x367f7c=_0x122181;try{_0x51ba83===_0x367f7c(0x1e1)?x(_0x49e1b9):S(_0x49e1b9);}catch(_0x1e3062){throw T(_0x165cc4+':\x20'+(_0x1e3062 instanceof Error?_0x1e3062['message']:String(_0x1e3062)));}}function F(_0x348a38,_0x2cf3d7,_0x1222b3){const _0x257613=_0x122181;let _0x22f2f9=new Map();for(let [_0x28a7d5,_0x60f576]of D(_0x348a38,_0x2cf3d7,!0x0)[_0x257613(0x185)]()){let _0x45556d=E(_0x60f576,_0x2cf3d7+'['+_0x28a7d5+']'),_0x3c54d0=O(_0x45556d['id'],_0x2cf3d7+'['+_0x28a7d5+_0x257613(0x1bd));if(P(_0x3c54d0,_0x2cf3d7+'['+_0x28a7d5+_0x257613(0x1bd),_0x257613(0x1b5)),_0x22f2f9[_0x257613(0x1aa)](_0x3c54d0))throw T(_0x257613(0x1f9)+_0x2cf3d7+_0x257613(0x219)+_0x3c54d0+'\x22.');_0x22f2f9[_0x257613(0x1e6)](_0x3c54d0,N(_0x45556d['label'],_0x2cf3d7+'['+_0x28a7d5+_0x257613(0x1c0),_0x1222b3));}return _0x22f2f9;}function I(_0x25498a,_0x4a1781){const _0x4ad82f=_0x122181;let _0x924842=E(_0x25498a[_0x4ad82f(0x1eb)],_0x4a1781+'.intrinsicSize'),_0x29527b=j(_0x924842[_0x4ad82f(0x1b0)],_0x4a1781+_0x4ad82f(0x1fe)),_0x33a79a=j(_0x924842[_0x4ad82f(0x21a)],_0x4a1781+_0x4ad82f(0x1dd));if(_0x29527b<=0x0||_0x33a79a<=0x0)throw T(_0x4a1781+'.intrinsicSize\x20must\x20be\x20positive.');return{'width':_0x29527b,'height':_0x33a79a};}function L(_0x56cd64,_0x10dc72){const _0x16c019=_0x122181;if(_0x56cd64[_0x16c019(0x22a)]!==_0x16c019(0x23f))throw T(_0x10dc72+'.type\x20must\x20be\x20\x22image\x22.');if(_0x56cd64[_0x16c019(0x1f5)]!==_0x16c019(0x1d6))throw T(_0x10dc72+_0x16c019(0x1e5));let _0x5a556e=E(_0x56cd64[_0x16c019(0x241)],_0x10dc72+_0x16c019(0x23a));if(_0x5a556e[_0x16c019(0x22a)]!==_0x16c019(0x23c))throw T(_0x10dc72+_0x16c019(0x225));let _0x1e8e7f=O(_0x5a556e[_0x16c019(0x1b3)],_0x10dc72+'.source.value'),_0x5b80bd;try{_0x5b80bd=new URL(_0x1e8e7f);}catch{throw T(_0x10dc72+'.source.value\x20must\x20be\x20a\x20URL.');}if(_0x5b80bd[_0x16c019(0x1fc)]!==_0x16c019(0x20f))throw T(_0x10dc72+_0x16c019(0x1a8));return _0x1e8e7f;}function R(_0x338829){const _0xed712=_0x122181;return _0x338829['normalize'](_0xed712(0x1f2))[_0xed712(0x237)]()['trim']()['replace'](/\s+/gu,'\x20');}function z(_0x421780){const _0x3b2773=_0x122181;let _0x4ded96=E(_0x421780,_0x3b2773(0x19f)),_0x5bd23b=new Map(),_0x2be1d0=new Map(),_0x7e3edd=[],_0x1b4863=[],_0x368130=new Set(),_0x3b85d8=0x0;for(let [_0x5a141b,_0x58698f]of D(_0x4ded96[_0x3b2773(0x204)],_0x3b2773(0x190))[_0x3b2773(0x185)]()){let _0x79277d=E(E(_0x58698f,'registrations['+_0x5a141b+']')['input'],'registrations['+_0x5a141b+_0x3b2773(0x1c9)),_0x5ed2c5=O(_0x79277d[_0x3b2773(0x1c3)],_0x3b2773(0x181)+_0x5a141b+_0x3b2773(0x18b));if(P(_0x5ed2c5,'registrations['+_0x5a141b+_0x3b2773(0x18b),'registry'),_0x5bd23b['has'](_0x5ed2c5))throw T(_0x3b2773(0x1a1)+_0x5ed2c5+'\x22.');let _0x1f99de=_0x79277d['defaultLocale']===void 0x0?void 0x0:O(_0x79277d[_0x3b2773(0x228)],_0x3b2773(0x181)+_0x5a141b+_0x3b2773(0x22d)),_0x3658d5=F(_0x79277d['groups'],_0x3b2773(0x181)+_0x5a141b+_0x3b2773(0x20e),_0x1f99de),_0x35c547=F(_0x79277d[_0x3b2773(0x1ee)],'registrations['+_0x5a141b+'].input.tags',_0x1f99de),_0x80ed2e=[];for(let [_0x72a6cb,_0x32daea]of D(_0x79277d['resources'],'registrations['+_0x5a141b+_0x3b2773(0x198))['entries']()){let _0x13c951=_0x3b2773(0x181)+_0x5a141b+'].input.resources['+_0x72a6cb+']',_0x391d0c=E(_0x32daea,_0x13c951),_0x3b211e=O(_0x391d0c['id'],_0x13c951+_0x3b2773(0x234));P(_0x3b211e,_0x13c951+'.id','resource');let _0xe9a1c8=ee(_0x5ed2c5,_0x3b211e);if(_0x2be1d0['has'](_0xe9a1c8))throw T(_0x3b2773(0x1e9)+_0xe9a1c8+'\x22.');let _0x3e7bd4;try{_0x3e7bd4=w(_0xe9a1c8);}catch(_0x537fd5){throw T(_0x13c951+':\x20'+(_0x537fd5 instanceof Error?_0x537fd5[_0x3b2773(0x1cc)]:String(_0x537fd5)));}if(_0x368130['has'](_0x3e7bd4))throw T(_0x3b2773(0x22e)+_0x3e7bd4+'\x22.');_0x368130[_0x3b2773(0x209)](_0x3e7bd4);let _0xc74fb4=_0x391d0c[_0x3b2773(0x238)]===void 0x0?void 0x0:O(_0x391d0c['groupId'],_0x13c951+_0x3b2773(0x229));if(_0xc74fb4!==void 0x0&&!_0x3658d5[_0x3b2773(0x1aa)](_0xc74fb4))throw T(_0x13c951+'.groupId\x20references\x20unknown\x20group\x20\x22'+_0xc74fb4+'\x22.');let _0x967853=k(_0x391d0c['tagIds'],_0x13c951+_0x3b2773(0x1a5),!0x0);for(let _0x4c2214 of _0x967853)if(!_0x35c547[_0x3b2773(0x1aa)](_0x4c2214))throw T(_0x13c951+_0x3b2773(0x22c)+_0x4c2214+'\x22.');let _0x510f47=A(_0x391d0c[_0x3b2773(0x1d8)],_0x13c951+_0x3b2773(0x1f4)),_0x198bbc=N(_0x391d0c[_0x3b2773(0x196)],_0x13c951+_0x3b2773(0x1c6),_0x1f99de),_0x5210df=_0x391d0c[_0x3b2773(0x1b2)]===void 0x0?void 0x0:N(_0x391d0c[_0x3b2773(0x1b2)],_0x13c951+_0x3b2773(0x1f6),_0x1f99de),_0x587e75=_0xc74fb4===void 0x0?null:{'id':_0xc74fb4,'label':_0x3658d5[_0x3b2773(0x1c7)](_0xc74fb4)},_0x321d60=_0x967853[_0x3b2773(0x189)](_0xcc2284=>({'id':_0xcc2284,'label':_0x35c547[_0x3b2773(0x1c7)](_0xcc2284)})),_0x298300=E(_0x391d0c['payload'],_0x13c951+_0x3b2773(0x1a9)),_0x1d3e1e=_0x391d0c[_0x3b2773(0x1da)]===void 0x0?null:j(_0x391d0c['order'],_0x13c951+_0x3b2773(0x1e3)),_0x2813e6=M(_0x298300[_0x3b2773(0x1bc)],_0x13c951+_0x3b2773(0x22b)),_0x2d2b23={'handle':_0xe9a1c8,'registryId':_0x5ed2c5,'id':_0x3b211e,'name':_0x198bbc,..._0x5210df===void 0x0?{}:{'description':_0x5210df},'group':_0x587e75,'tags':_0x321d60,'keywords':_0x510f47,'order':_0x1d3e1e,'intrinsicSize':I(_0x298300,_0x13c951+_0x3b2773(0x1a9)),'colorEditable':_0x2813e6,'sourceUrl':L(_0x298300,_0x13c951+_0x3b2773(0x1a9)),'registrationIndex':_0x5a141b,'resourceIndex':_0x72a6cb,'globalIndex':_0x3b85d8,'searchText':R([_0x198bbc,_0x5210df,_0x587e75?.['label'],..._0x321d60[_0x3b2773(0x189)](_0x9a9abf=>_0x9a9abf[_0x3b2773(0x211)]),..._0x510f47]['filter'](_0x94574a=>_0x94574a!==void 0x0)[_0x3b2773(0x1e2)]('\x20'))};_0x3b85d8++,_0x80ed2e['push'](_0x2d2b23),_0x1b4863['push'](_0x2d2b23),_0x2be1d0[_0x3b2773(0x1e6)](_0xe9a1c8,_0x2d2b23);}let _0x50c4a2={'id':_0x5ed2c5,'groups':_0x3658d5,'tags':_0x35c547,'resources':_0x80ed2e};_0x7e3edd[_0x3b2773(0x1e4)](_0x50c4a2),_0x5bd23b['set'](_0x5ed2c5,_0x50c4a2);}if(_0x7e3edd['length']===0x0)throw T(_0x3b2773(0x242));return{'registries':_0x7e3edd,'registryById':_0x5bd23b,'resourceByHandle':_0x2be1d0,'resources':_0x1b4863};}function B(_0x2385ac,_0x63e13){const _0xd680f5=_0x122181;C(_0x63e13);let _0x40cde9=_0x2385ac['resourceByHandle'][_0xd680f5(0x1c7)](_0x63e13);if(_0x40cde9===void 0x0)throw new h(_0xd680f5(0x1d2),_0xd680f5(0x220)+_0x63e13+'\x22;\x20try\x20resources\x20find\x20<query>.',_0x63e13);return _0x40cde9;}function te(_0x291ae5){const _0x42077d=_0x122181;return _0x291ae5[_0x42077d(0x19a)]['map'](_0x33d2cc=>({'id':_0x33d2cc['id'],'resourceCount':_0x33d2cc['resources'][_0x42077d(0x232)],'groupCount':_0x33d2cc[_0x42077d(0x1ea)]['size'],'tagCount':_0x33d2cc['tags']['size'],'colorEditableCount':_0x33d2cc['resources'][_0x42077d(0x1f7)](_0x287787=>_0x287787[_0x42077d(0x1bc)])[_0x42077d(0x232)]}));}function _0xdc40(_0x2beb71,_0x4218c4){_0x2beb71=_0x2beb71-0x181;const _0x17f1b8=_0x17f1();let _0xdc401=_0x17f1b8[_0x2beb71];return _0xdc401;}function ne(_0x440fb9){const _0x361a6e=_0x122181;return{'handle':_0x440fb9['handle'],'registryId':_0x440fb9[_0x361a6e(0x1c3)],'id':_0x440fb9['id'],'name':_0x440fb9['name'],'group':_0x440fb9[_0x361a6e(0x183)],'tags':_0x440fb9[_0x361a6e(0x1ee)],'keywords':_0x440fb9[_0x361a6e(0x1d8)],'order':_0x440fb9[_0x361a6e(0x1da)],'intrinsicSize':_0x440fb9[_0x361a6e(0x1eb)],'colorEditable':_0x440fb9[_0x361a6e(0x1bc)]};}function re(_0x532db9,_0x672a7f){const _0x42e887=_0x122181;let _0x1db52c=(_0x532db9[_0x42e887(0x1da)]??_0x532db9['globalIndex'])-(_0x672a7f['order']??_0x672a7f[_0x42e887(0x1e7)]);if(_0x1db52c!==0x0)return _0x1db52c;let _0x2a2757=_0x532db9[_0x42e887(0x20d)]-_0x672a7f['registrationIndex'];if(_0x2a2757!==0x0)return _0x2a2757;let _0x39efc4=_0x532db9[_0x42e887(0x214)]-_0x672a7f[_0x42e887(0x214)];return _0x39efc4===0x0?_0x532db9['handle'][_0x42e887(0x213)](_0x672a7f[_0x42e887(0x1a4)]):_0x39efc4;}function ie(_0x10fdd8,_0x1b2256){const _0x2f44fa=_0x122181;let _0x1b84bc=_0x1b2256[_0x2f44fa(0x18e)][_0x2f44fa(0x189)](R)[_0x2f44fa(0x1f7)](_0x52fc40=>_0x52fc40!=='');if(_0x1b84bc[_0x2f44fa(0x232)]===0x0)throw new h(_0x2f44fa(0x218),'Resource\x20search\x20needs\x20at\x20least\x20one\x20non-empty\x20query.');let _0x2a948c=new Set(_0x1b2256[_0x2f44fa(0x19a)]??[]);for(let _0xd67a87 of _0x2a948c)if(!_0x10fdd8['registryById'][_0x2f44fa(0x1aa)](_0xd67a87))throw new h(_0x2f44fa(0x1d9),_0x2f44fa(0x20c)+_0xd67a87+'\x22.');let _0x3af645=_0x1b2256[_0x2f44fa(0x1bb)]??_0x10fdd8[_0x2f44fa(0x1c1)][_0x2f44fa(0x232)];if(!Number[_0x2f44fa(0x1c2)](_0x3af645)||_0x3af645<0x1)throw new h('resource-limit-invalid',_0x2f44fa(0x1fa)+_0x3af645+'\x22.');let _0xf18d78=_0x10fdd8['resources'][_0x2f44fa(0x1f7)](_0x2dbff9=>_0x2a948c[_0x2f44fa(0x1ad)]===0x0||_0x2a948c[_0x2f44fa(0x1aa)](_0x2dbff9[_0x2f44fa(0x1c3)]))[_0x2f44fa(0x1f7)](_0x3e8f23=>_0x1b84bc[_0x2f44fa(0x216)](_0x54e3af=>_0x3e8f23[_0x2f44fa(0x240)][_0x2f44fa(0x1b8)](_0x54e3af)))[_0x2f44fa(0x1a7)](re);return{'resources':_0xf18d78[_0x2f44fa(0x210)](0x0,_0x3af645)[_0x2f44fa(0x189)](ne),'total':_0xf18d78['length']};}function V(_0x3b2c3a){const _0x1187ad=_0x122181;return/^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[^]*?-->\s*)*<svg(?:\s|>)/iu[_0x1187ad(0x1ff)](_0x3b2c3a);}function H(_0x5120e7,_0x38f76f){const _0x50aa87=_0x122181;return g(_0x38f76f)?{'handle':_0x5120e7,'code':_0x38f76f[_0x50aa87(0x221)],'message':_0x38f76f['message']}:{'handle':_0x5120e7,'code':'resource-export-failed','message':_0x38f76f instanceof Error?_0x38f76f['message']:String(_0x38f76f)};}var U=class{[_0x122181(0x18c)];['catalog'];constructor(_0x56b4a9){const _0x32a90c=_0x122181;this['options']=_0x56b4a9,this[_0x32a90c(0x188)]=z(_0x56b4a9[_0x32a90c(0x19f)]);}get['cacheLocation'](){const _0x3a6699=_0x122181;return this[_0x3a6699(0x18c)][_0x3a6699(0x1a6)][_0x3a6699(0x1dc)];}['listRegistries'](){const _0x44c0f5=_0x122181;return te(this[_0x44c0f5(0x188)]);}['find'](_0x492e74){const _0x238532=_0x122181;return ie(this[_0x238532(0x188)],_0x492e74);}async[_0x122181(0x1f8)](_0x585915){const _0x33541e=_0x122181;let _0xa605f8=B(this[_0x33541e(0x188)],_0x585915['handle']),_0x3ad5a1=await this['options']['cache']['read'](_0x585915[_0x33541e(0x1a4)]);if(_0x3ad5a1!==void 0x0&&V(_0x3ad5a1))return{'handle':_0x585915[_0x33541e(0x1a4)],'svg':_0x3ad5a1};let _0x3abe09;try{_0x3abe09=await this['options'][_0x33541e(0x1fd)][_0x33541e(0x1d7)](_0xa605f8[_0x33541e(0x200)]);}catch(_0x360a3b){throw g(_0x360a3b)?_0x360a3b:new h(_0x33541e(0x18d),_0x33541e(0x1e0)+_0x585915[_0x33541e(0x1a4)]+'\x22:\x20'+(_0x360a3b instanceof Error?_0x360a3b[_0x33541e(0x1cc)]:String(_0x360a3b)),_0x585915[_0x33541e(0x1a4)],{'cause':_0x360a3b});}if(!V(_0x3abe09))throw new h(_0x33541e(0x226),_0x33541e(0x1d4)+_0x585915[_0x33541e(0x1a4)]+_0x33541e(0x1ae),_0x585915['handle']);return await this[_0x33541e(0x18c)]['cache'][_0x33541e(0x223)](_0x585915[_0x33541e(0x1a4)],_0x3abe09),{'handle':_0x585915[_0x33541e(0x1a4)],'svg':_0x3abe09};}async['export'](_0x28323d){const _0x2a1f8b=_0x122181;let _0x4f1dfb=[],_0x431d62=[];for(let _0x56613c of _0x28323d['handles'])try{let {svg:_0x30e191}=await this['read']({'handle':_0x56613c}),_0x20b4ca=await this[_0x2a1f8b(0x18c)][_0x2a1f8b(0x1cf)][_0x2a1f8b(0x223)](_0x28323d[_0x2a1f8b(0x1ab)],w(_0x56613c),_0x30e191);_0x4f1dfb['push']({'handle':_0x56613c,'path':_0x20b4ca});}catch(_0x2c6760){_0x431d62[_0x2a1f8b(0x1e4)](H(_0x56613c,_0x2c6760));}return{'exported':_0x4f1dfb,'failed':_0x431d62};}async['clearCache'](){const _0x13e76f=_0x122181;return await this['options'][_0x13e76f(0x1a6)][_0x13e76f(0x222)]();}};function W(_0x26c59b){return new U(_0x26c59b);}function G(_0x23df4a){const _0x5cc9f8=_0x122181;return _0x23df4a instanceof Error&&_0x5cc9f8(0x221)in _0x23df4a;}function K(_0x3a24e4){const _0xd66f80=_0x122181;let _0x4c36bc=_0x2c9d4a(_0x3a24e4);if(!_0x2d5484(_0x3a24e4)||_0x4c36bc===_0x569a81(_0x4c36bc)[_0xd66f80(0x1ca)])throw new h('resource-cache-root-invalid',_0xd66f80(0x1cd)+_0x3a24e4+'\x22.');return _0x4c36bc;}async function q(_0x27e542){const _0x14e495=_0x122181;let _0x13b257;try{_0x13b257=await _0x135f30(_0x27e542,{'withFileTypes':!0x0});}catch(_0x59026d){if(G(_0x59026d)&&_0x59026d[_0x14e495(0x221)]===_0x14e495(0x1d0))return{'resourceCount':0x0,'byteCount':0x0};throw _0x59026d;}let _0x2314b1=0x0,_0x3ceb7f=0x0;for(let _0x5f5442 of _0x13b257){let _0x3448d1=_0x55ac48(_0x27e542,_0x5f5442['name']);if(_0x5f5442[_0x14e495(0x21d)]()){let _0x5409aa=await q(_0x3448d1);_0x2314b1+=_0x5409aa['resourceCount'],_0x3ceb7f+=_0x5409aa[_0x14e495(0x230)];}else{if(_0x5f5442[_0x14e495(0x212)]()&&_0x5f5442['name'][_0x14e495(0x1b4)](_0x14e495(0x1c5))){let _0xf71c48=await _0x20e29a(_0x3448d1);_0x2314b1++,_0x3ceb7f+=_0xf71c48[_0x14e495(0x1ad)];}}}return{'resourceCount':_0x2314b1,'byteCount':_0x3ceb7f};}var J=class{['location'];constructor(_0x23a1fa){this['location']=K(_0x23a1fa);}[_0x122181(0x194)](_0x347645){const _0x181737=_0x122181;let {registryId:_0x3ad447,resourceId:_0x4549f6}=C(_0x347645);return _0x55ac48(this[_0x181737(0x1dc)],_0x3ad447,_0x4549f6+_0x181737(0x1c5));}async[_0x122181(0x1f8)](_0x28f4e0){const _0x1b3b30=_0x122181;try{return await _0x3da128(this[_0x1b3b30(0x194)](_0x28f4e0),'utf8');}catch(_0x38ce24){if(G(_0x38ce24)&&_0x38ce24['code']===_0x1b3b30(0x1d0))return;throw _0x38ce24;}}async[_0x122181(0x223)](_0x433344,_0x227a96){const _0x18bc00=_0x122181;let _0x1a28bd=this['path'](_0x433344);await _0x39a1a4(_0x5d4545(_0x1a28bd),{'recursive':!0x0});let _0x12c64d=_0x55ac48(_0x5d4545(_0x1a28bd),_0x18bc00(0x1d5)+process[_0x18bc00(0x187)]+'-'+_0x1c8bca()+_0x18bc00(0x1de));try{await _0x5f3f74(_0x12c64d,_0x227a96,{'encoding':_0x18bc00(0x23d),'mode':0x180}),await _0x2e1d93(_0x12c64d,_0x1a28bd);}catch(_0xe01c21){throw await _0x22e0b2(_0x12c64d)[_0x18bc00(0x191)](()=>void 0x0),_0xe01c21;}}async[_0x122181(0x222)](){const _0x3ec302=_0x122181;let _0x314b0d=await q(this[_0x3ec302(0x1dc)]);return await _0x16f7b4(this[_0x3ec302(0x1dc)],{'force':!0x0,'recursive':!0x0}),{'path':this[_0x3ec302(0x1dc)],..._0x314b0d};}},Y=class{async['write'](_0x36a2ea,_0x1a2f17,_0x4f86e3){const _0x2613f7=_0x122181;await _0x39a1a4(_0x36a2ea,{'recursive':!0x0});let _0x2b02f3=_0x55ac48(_0x36a2ea,_0x1a2f17);return await _0x5f3f74(_0x2b02f3,_0x4f86e3,_0x2613f7(0x23d)),_0x2b02f3;}},X=0x7530,ae=0xa00000,oe=0xa,se=new Set([0x12d,0x12e,0x12f,0x133,0x134]);function Z(_0x4613bc){const _0xddbdbf=_0x122181;return new h(_0xddbdbf(0x239),_0xddbdbf(0x20a)+_0x4613bc+'\x20bytes.');}async function ce(_0x34c2b7,_0x98761b){const _0x3d6ce5=_0x122181;let _0x3e4f78=Number(_0x34c2b7['headers'][_0x3d6ce5(0x1c7)](_0x3d6ce5(0x224)));if(Number[_0x3d6ce5(0x23e)](_0x3e4f78)&&_0x3e4f78>_0x98761b)throw Z(_0x98761b);if(_0x34c2b7['body']===null){let _0x477009=await _0x34c2b7['text']();if(Buffer['byteLength'](_0x477009)>_0x98761b)throw Z(_0x98761b);return _0x477009;}let _0x50ba84=_0x34c2b7['body']['getReader'](),_0x5091cd=[],_0x328112=0x0;try{for(;;){let _0x57bc1e=await _0x50ba84[_0x3d6ce5(0x1f8)]();if(_0x57bc1e[_0x3d6ce5(0x1a2)])break;if(_0x328112+=_0x57bc1e[_0x3d6ce5(0x1b3)][_0x3d6ce5(0x1a3)],_0x328112>_0x98761b)throw await _0x50ba84[_0x3d6ce5(0x207)]()[_0x3d6ce5(0x191)](()=>void 0x0),Z(_0x98761b);_0x5091cd[_0x3d6ce5(0x1e4)](_0x57bc1e[_0x3d6ce5(0x1b3)]);}}finally{_0x50ba84[_0x3d6ce5(0x186)]();}try{return new TextDecoder('utf-8',{'fatal':!0x0})[_0x3d6ce5(0x18f)](Buffer[_0x3d6ce5(0x205)](_0x5091cd,_0x328112));}catch{throw new h('resource-download-invalid-utf8',_0x3d6ce5(0x182));}}var Q=class{[_0x122181(0x236)];[_0x122181(0x20b)];[_0x122181(0x1f1)];['maxRedirects'];constructor(_0x3d8433={}){const _0x2d926e=_0x122181;this[_0x2d926e(0x236)]=_0x3d8433['fetch']??fetch,this[_0x2d926e(0x20b)]=_0x3d8433[_0x2d926e(0x20b)]??X,this[_0x2d926e(0x1f1)]=_0x3d8433[_0x2d926e(0x1f1)]??ae,this['maxRedirects']=_0x3d8433['maxRedirects']??oe;}async[_0x122181(0x1d7)](_0x10284a){const _0x235f0e=_0x122181;let _0x3f75b6=new URL(_0x10284a);if(_0x3f75b6[_0x235f0e(0x1fc)]!==_0x235f0e(0x20f))throw new h(_0x235f0e(0x1b6),'Resource\x20URL\x20must\x20use\x20HTTPS.');let _0x451ab1=new AbortController(),_0x4ef3c3=setTimeout(()=>_0x451ab1['abort'](),this[_0x235f0e(0x20b)]);try{let _0x46acf5=_0x3f75b6;for(let _0x34a8ec=0x0;;_0x34a8ec++){let _0x3dd46d=await this[_0x235f0e(0x236)](_0x46acf5,{'redirect':_0x235f0e(0x1f0),'signal':_0x451ab1[_0x235f0e(0x206)]});if(se[_0x235f0e(0x1aa)](_0x3dd46d['status'])){if(_0x34a8ec>=this[_0x235f0e(0x1fb)])throw new h(_0x235f0e(0x231),_0x235f0e(0x1a0)+this[_0x235f0e(0x1fb)]+'.');let _0x16a53a=_0x3dd46d[_0x235f0e(0x1db)][_0x235f0e(0x1c7)](_0x235f0e(0x1dc));if(_0x16a53a===null)throw new h(_0x235f0e(0x1ce),_0x235f0e(0x19b)+_0x3dd46d[_0x235f0e(0x192)]+_0x235f0e(0x1ec));let _0x21c98e;try{_0x21c98e=new URL(_0x16a53a,_0x46acf5);}catch{throw new h('resource-download-invalid-redirect',_0x235f0e(0x233));}if(_0x21c98e[_0x235f0e(0x1fc)]!==_0x235f0e(0x20f))throw new h(_0x235f0e(0x18a),'Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.');_0x46acf5=_0x21c98e;continue;}if(!_0x3dd46d['ok'])throw new h(_0x235f0e(0x195),_0x235f0e(0x19b)+_0x3dd46d['status']+'.');if(_0x3dd46d[_0x235f0e(0x23c)]!==''&&new URL(_0x3dd46d[_0x235f0e(0x23c)])[_0x235f0e(0x1fc)]!=='https:')throw new h(_0x235f0e(0x18a),_0x235f0e(0x215));let _0x4a630a=await ce(_0x3dd46d,this[_0x235f0e(0x1f1)]);if(!V(_0x4a630a))throw new h(_0x235f0e(0x203),'Resource\x20response\x20is\x20not\x20an\x20SVG\x20document.');return _0x4a630a;}}catch(_0x31ca45){throw _0x451ab1[_0x235f0e(0x206)][_0x235f0e(0x21f)]?new h('resource-download-timeout',_0x235f0e(0x21e)+this['timeoutMs']+_0x235f0e(0x1be)):_0x31ca45;}finally{clearTimeout(_0x4ef3c3);}}};function $(_0x3f391){const _0x2ec21c=_0x122181;try{return JSON[_0x2ec21c(0x21b)](_0x4310a8(_0x3f391,_0x2ec21c(0x23d)));}catch(_0x15719d){throw new h(_0x2ec21c(0x1c8),_0x2ec21c(0x23b)+_0x3f391+':\x20'+(_0x15719d instanceof Error?_0x15719d[_0x2ec21c(0x1cc)]:String(_0x15719d)),void 0x0,{'cause':_0x15719d});}}function le(_0x2b656a){const _0x392ae9=_0x122181;let _0x4cb040;return()=>(_0x4cb040??=W({'manifest':$(_0x2b656a['manifestPath']),'cache':new J(_0x2b656a[_0x392ae9(0x1ed)]),'downloader':new Q(_0x2b656a['downloader']),'output':new Y()}),_0x4cb040);}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 _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};
|