@univer-cli/resource-library 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- const _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};
1
+ const _0x36f18f=_0x41d8;function _0x41d8(_0x4be193,_0x39f98e){_0x4be193=_0x4be193-0x162;const _0x51e577=_0x51e5();let _0x41d846=_0x51e577[_0x4be193];return _0x41d846;}(function(_0x49d687,_0x29a772){const _0x463381=_0x41d8,_0x3b6137=_0x49d687();while(!![]){try{const _0x549d89=-parseInt(_0x463381(0x173))/0x1*(parseInt(_0x463381(0x200))/0x2)+parseInt(_0x463381(0x174))/0x3*(-parseInt(_0x463381(0x1d9))/0x4)+-parseInt(_0x463381(0x1bb))/0x5*(parseInt(_0x463381(0x1d3))/0x6)+parseInt(_0x463381(0x207))/0x7*(-parseInt(_0x463381(0x20f))/0x8)+parseInt(_0x463381(0x19e))/0x9*(-parseInt(_0x463381(0x206))/0xa)+-parseInt(_0x463381(0x176))/0xb*(parseInt(_0x463381(0x1f1))/0xc)+parseInt(_0x463381(0x204))/0xd;if(_0x549d89===_0x29a772)break;else _0x3b6137['push'](_0x3b6137['shift']());}catch(_0x5d41f7){_0x3b6137['push'](_0x3b6137['shift']());}}}(_0x51e5,0x90759));import{randomUUID as _0x48d2ba}from'node:crypto';import{mkdir as _0x2d6fe0,readFile as _0x500d43,readdir as _0x55d9f4,rename as _0x61a7d4,rm as _0x2f55c9,stat as _0x3baf01,unlink as _0x107d1e,writeFile as _0x5100ca}from'node:fs/promises';import{dirname as _0x7834fb,isAbsolute as _0x89782b,join as _0x1d1f2a,parse as _0x16efce,resolve as _0x1b334b}from'node:path';import{readFileSync as _0x44365f}from'node:fs';var h=class extends Error{[_0x36f18f(0x21f)];['handle'];constructor(_0x5cbbf2,_0x54f72e,_0x2f0ac0,_0x315d9d){const _0x3448b1=_0x36f18f;super(_0x54f72e,_0x315d9d),this[_0x3448b1(0x21f)]=_0x5cbbf2,this[_0x3448b1(0x217)]=_0x2f0ac0,this[_0x3448b1(0x18a)]=_0x3448b1(0x1a0);}};function g(_0x1bc98c){return _0x1bc98c instanceof h;}var _=/^[A-Za-z0-9._-]+$/u,v=0xff,y=0x4;function b(_0x1ea9d0){const _0xef1cb2=_0x36f18f;return _[_0xef1cb2(0x1e7)](_0x1ea9d0)&&_0x1ea9d0!=='.'&&_0x1ea9d0!=='..';}function x(_0x49e2e4){const _0x390fc9=_0x36f18f;if(!b(_0x49e2e4)||_0x49e2e4[_0x390fc9(0x1b6)]('-')||_0x49e2e4[_0x390fc9(0x213)]('--')||_0x49e2e4['length']>v)throw new h(_0x390fc9(0x21d),'Invalid\x20registry\x20ID\x20\x22'+_0x49e2e4+_0x390fc9(0x1ca));}function S(_0x1a761c){const _0x30ec52=_0x36f18f;if(!b(_0x1a761c)||_0x1a761c[_0x30ec52(0x1ce)]+y>v)throw new h(_0x30ec52(0x16a),'Invalid\x20resource\x20ID\x20\x22'+_0x1a761c+_0x30ec52(0x194));}function C(_0x278607){const _0x332180=_0x36f18f;let _0x25695c=_0x278607['split']('/');if(_0x25695c[_0x332180(0x1ce)]!==0x2||_0x25695c[0x0]===''||_0x25695c[0x1]==='')throw new h(_0x332180(0x1fc),_0x332180(0x1a2)+_0x278607+_0x332180(0x182),_0x278607);let _0x731cf3=_0x25695c[0x0],_0x2568dd=_0x25695c[0x1];return x(_0x731cf3),S(_0x2568dd),{'registryId':_0x731cf3,'resourceId':_0x2568dd};}function _0x51e5(){const _0x194c27=['884948rbfNwy','resourceIndex','sort','keywords','input','resource-invalid-svg','Resource\x20server\x20returned\x20HTTP\x20','fetch','localeCompare','some','aborted','\x20must\x20be\x20a\x20finite\x20number.','manifest.registrations','read','test','source','registries','string','\x22;\x20try\x20resources\x20find\x20<query>.','catch','listRegistries','].id','message','\x20must\x20be\x20a\x20non-empty\x20string.','120OlhGwl','.description','toLowerCase','searchText','registryId','Failed\x20to\x20download\x20\x22','Resource\x20export\x20filename\x20exceeds\x20','done','root','resource-download-too-large','groupId','resource-invalid-handle','\x22\x20is\x20not\x20an\x20SVG\x20document.','abort','registrationIndex','60266czGQei','.svg','.tmp','Resource\x20download\x20timed\x20out\x20after\x20','50604268FnciwX','decode','30QoFxrF','217QZZbDN','Resource\x20response\x20is\x20not\x20valid\x20UTF-8.','order','.id','resource-download-invalid-redirect','\x20ms.','https:','resource-download-invalid-utf8','268304qFyszS','url','export','content-length','includes','manual','endsWith','boolean','handle','\x20must\x20be\x20a\x20boolean.','Resource\x20URL\x20must\x20use\x20HTTPS.','maxRedirects','resource-download-http','.source','resource-invalid-registry-id','destination','code','.intrinsicSize','.groupId','registrations','isFinite','resource-download-invalid-svg','write','Resource\x20search\x20needs\x20at\x20least\x20one\x20non-empty\x20query.','label','.source.type\x20must\x20be\x20\x22url\x22.','cache','.payload.colorEditable','size','getReader','pid','Duplicate\x20resource\x20handle\x20\x22','Resource\x20exceeds\x20the\x20maximum\x20size\x20of\x20','location','resource-invalid-resource-id','.tagIds\x20references\x20unknown\x20tag\x20\x22',']\x20must\x20be\x20a\x20string.','registryById','status','byteLength','signal','resource-download-failed','storagePolicy','13zJqIuz','9oUZjHS','options','734635DViaCT','globalIndex','registry','resource-cache-root-invalid','maxBytes','Resource\x20request\x20followed\x20too\x20many\x20redirects;\x20maximum\x20','cancel','width','isInteger','isArray','resource-manifest-invalid','download','\x22;\x20expected\x20<registryId>/<resourceId>.','registrations\x20must\x20not\x20be\x20empty.','body','.source.value\x20must\x20be\x20a\x20URL.','set','.source.value','filter','resource-registry-not-found','name','headers','.groupId\x20references\x20unknown\x20group\x20\x22','downloader','fetchImpl','.intrinsicSize.width','resource-download-insecure-redirect','].input.tags','\x20bytes.','\x20contains\x20no\x20usable\x20localized\x20text.','\x22:\x20expected\x20filesystem-safe\x20characters.','Duplicate\x20registry\x20ID\x20\x22','description','\x20must\x20be\x20an\x20object.','get','.payload','Resource\x20server\x20returned\x20an\x20invalid\x20redirect\x20URL.','Resource\x20cache\x20root\x20must\x20be\x20an\x20absolute,\x20dedicated\x20directory\x20below\x20the\x20filesystem\x20root;\x20received\x20\x22','payload','protocol','1598157LTygsw','map','ResourceLibraryError','timeoutMs','Invalid\x20resource\x20handle\x20\x22','\x20without\x20a\x20Location\x20header.','resource','slice','height','defaultLocale','resource-not-found','Duplicate\x20','].input.defaultLocale','byteCount','queries','find','Invalid\x20resource\x20manifest:\x20','manifestPath','ENOENT','value','utf8','join','].input.resources[','Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.','startsWith','].input.resources','resource-download-timeout','resource-download-too-many-redirects','path','13110pgwVfb','colorEditable','].input.registryId','.name','registrations[','Duplicate\x20export\x20filename\x20\x22','output','.resource-','\x20ID\x20\x22','.keywords','catalog','Resource\x20response\x20is\x20not\x20an\x20SVG\x20document.','type','has','Unknown\x20resource\x20\x22','\x22:\x20expected\x20an\x20addressable\x20filesystem-safe\x20component\x20without\x20\x22--\x22.','utf-8','NFKC','entries','length','.source.value\x20must\x20use\x20HTTPS.','resources','.intrinsicSize\x20must\x20be\x20positive.','push','12gSdqUy','normalize','clear','manifest','number','resource-manifest-read-failed'];_0x51e5=function(){return _0x194c27;};return _0x51e5();}function ee(_0x419039,_0x219a36){return x(_0x419039),S(_0x219a36),_0x419039+'/'+_0x219a36;}function w(_0x368c65){const _0x5be645=_0x36f18f;let {registryId:_0x171761,resourceId:_0x214a6b}=C(_0x368c65),_0x514009=_0x171761+'--'+_0x214a6b+_0x5be645(0x201);if(_0x514009[_0x5be645(0x1ce)]>v)throw new h('resource-export-filename-too-long',_0x5be645(0x1f7)+v+'\x20bytes.',_0x368c65);return _0x514009;}function T(_0x107191){const _0x4268db=_0x36f18f;return new h(_0x4268db(0x180),_0x4268db(0x1ae)+_0x107191);}function E(_0x3be043,_0x3533a4){const _0x2975d2=_0x36f18f;if(typeof _0x3be043!='object'||!_0x3be043||Array['isArray'](_0x3be043))throw T(_0x3533a4+_0x2975d2(0x197));return _0x3be043;}function D(_0x4af69f,_0x416372,_0xdd96fb=!0x1){const _0x2654eb=_0x36f18f;if(_0xdd96fb&&_0x4af69f===void 0x0)return[];if(!Array[_0x2654eb(0x17f)](_0x4af69f))throw T(_0x416372+'\x20must\x20be\x20an\x20array.');return _0x4af69f;}function O(_0x4f5fba,_0x28fcee){const _0x118947=_0x36f18f;if(typeof _0x4f5fba!=_0x118947(0x1ea)||_0x4f5fba==='')throw T(_0x28fcee+_0x118947(0x1f0));return _0x4f5fba;}function k(_0x3aebf7,_0x3b5fee,_0x36481b=!0x1){const _0x40c577=_0x36f18f;return D(_0x3aebf7,_0x3b5fee,_0x36481b)[_0x40c577(0x19f)]((_0x330e0b,_0x3bfa57)=>O(_0x330e0b,_0x3b5fee+'['+_0x3bfa57+']'));}function A(_0x3fc875,_0x5b3b20){const _0x15fcdd=_0x36f18f;return D(_0x3fc875,_0x5b3b20,!0x0)['map']((_0x2bb7ed,_0x2f8825)=>{const _0x76afd4=_0x41d8;if(typeof _0x2bb7ed!=_0x76afd4(0x1ea))throw T(_0x5b3b20+'['+_0x2f8825+_0x76afd4(0x16c));return _0x2bb7ed;})[_0x15fcdd(0x188)](_0x15a0e4=>_0x15a0e4!=='');}function j(_0x4d1d0a,_0xcbd907){const _0x2cc513=_0x36f18f;if(typeof _0x4d1d0a!=_0x2cc513(0x1d7)||!Number[_0x2cc513(0x223)](_0x4d1d0a))throw T(_0xcbd907+_0x2cc513(0x1e4));return _0x4d1d0a;}function M(_0x3bf806,_0x568919){const _0x3cd1c0=_0x36f18f;if(typeof _0x3bf806!=_0x3cd1c0(0x216))throw T(_0x568919+_0x3cd1c0(0x218));return _0x3bf806;}function N(_0x47f1c4,_0x3cfd26,_0x3ff26e){const _0x25daf9=_0x36f18f;if(typeof _0x47f1c4=='string'&&_0x47f1c4!=='')return _0x47f1c4;let _0x3fe0a9=E(_0x47f1c4,_0x3cfd26),_0x16d299=_0x3ff26e===void 0x0?void 0x0:_0x3fe0a9[_0x3ff26e];if(typeof _0x16d299=='string'&&_0x16d299!=='')return _0x16d299;let _0x34bb5a=_0x3fe0a9['en-US'];if(typeof _0x34bb5a=='string'&&_0x34bb5a!=='')return _0x34bb5a;let _0x53dc11=Object['values'](_0x3fe0a9)[_0x25daf9(0x1ad)](_0x2ba21e=>typeof _0x2ba21e==_0x25daf9(0x1ea)&&_0x2ba21e!=='');if(_0x53dc11!==void 0x0)return _0x53dc11;throw T(_0x3cfd26+_0x25daf9(0x193));}function P(_0x412e7d,_0x47281b,_0x1386ee){const _0x1b5357=_0x36f18f;try{_0x1386ee===_0x1b5357(0x178)?x(_0x412e7d):S(_0x412e7d);}catch(_0x5d6709){throw T(_0x47281b+':\x20'+(_0x5d6709 instanceof Error?_0x5d6709['message']:String(_0x5d6709)));}}function F(_0x3c2b32,_0x12ec64,_0x254091){const _0x5a4964=_0x36f18f;let _0x752f9e=new Map();for(let [_0x364b3f,_0x201f79]of D(_0x3c2b32,_0x12ec64,!0x0)[_0x5a4964(0x1cd)]()){let _0x2ace26=E(_0x201f79,_0x12ec64+'['+_0x364b3f+']'),_0x10b2d6=O(_0x2ace26['id'],_0x12ec64+'['+_0x364b3f+'].id');if(P(_0x10b2d6,_0x12ec64+'['+_0x364b3f+_0x5a4964(0x1ee),_0x5a4964(0x1a4)),_0x752f9e[_0x5a4964(0x1c8)](_0x10b2d6))throw T(_0x5a4964(0x1a9)+_0x12ec64+_0x5a4964(0x1c3)+_0x10b2d6+'\x22.');_0x752f9e[_0x5a4964(0x186)](_0x10b2d6,N(_0x2ace26['label'],_0x12ec64+'['+_0x364b3f+'].label',_0x254091));}return _0x752f9e;}function I(_0xa22260,_0x48427e){const _0x3d1f54=_0x36f18f;let _0x1e3eca=E(_0xa22260['intrinsicSize'],_0x48427e+_0x3d1f54(0x220)),_0x46fb72=j(_0x1e3eca[_0x3d1f54(0x17d)],_0x48427e+_0x3d1f54(0x18f)),_0x472c44=j(_0x1e3eca[_0x3d1f54(0x1a6)],_0x48427e+'.intrinsicSize.height');if(_0x46fb72<=0x0||_0x472c44<=0x0)throw T(_0x48427e+_0x3d1f54(0x1d1));return{'width':_0x46fb72,'height':_0x472c44};}function L(_0x1768d0,_0x47193d){const _0x371580=_0x36f18f;if(_0x1768d0[_0x371580(0x1c7)]!=='image')throw T(_0x47193d+'.type\x20must\x20be\x20\x22image\x22.');if(_0x1768d0[_0x371580(0x172)]!=='reference')throw T(_0x47193d+'.storagePolicy\x20must\x20be\x20\x22reference\x22.');let _0x36693d=E(_0x1768d0[_0x371580(0x1e8)],_0x47193d+_0x371580(0x21c));if(_0x36693d[_0x371580(0x1c7)]!=='url')throw T(_0x47193d+_0x371580(0x228));let _0x9a9f07=O(_0x36693d[_0x371580(0x1b1)],_0x47193d+_0x371580(0x187)),_0x4c3b56;try{_0x4c3b56=new URL(_0x9a9f07);}catch{throw T(_0x47193d+_0x371580(0x185));}if(_0x4c3b56[_0x371580(0x19d)]!==_0x371580(0x20d))throw T(_0x47193d+_0x371580(0x1cf));return _0x9a9f07;}function R(_0x591e6c){const _0x34d54b=_0x36f18f;return _0x591e6c[_0x34d54b(0x1d4)](_0x34d54b(0x1cc))[_0x34d54b(0x1f3)]()['trim']()['replace'](/\s+/gu,'\x20');}function z(_0xca1229){const _0x4431b0=_0x36f18f;let _0x70309f=E(_0xca1229,_0x4431b0(0x1d6)),_0x296ba2=new Map(),_0x21e039=new Map(),_0x5baa3b=[],_0x4f4867=[],_0x20fba0=new Set(),_0xc6d78c=0x0;for(let [_0x25114e,_0x26b6f1]of D(_0x70309f[_0x4431b0(0x222)],_0x4431b0(0x1e5))[_0x4431b0(0x1cd)]()){let _0x4928e8=E(E(_0x26b6f1,'registrations['+_0x25114e+']')[_0x4431b0(0x1dd)],'registrations['+_0x25114e+'].input'),_0x4b0992=O(_0x4928e8['registryId'],_0x4431b0(0x1bf)+_0x25114e+_0x4431b0(0x1bd));if(P(_0x4b0992,_0x4431b0(0x1bf)+_0x25114e+_0x4431b0(0x1bd),'registry'),_0x296ba2[_0x4431b0(0x1c8)](_0x4b0992))throw T(_0x4431b0(0x195)+_0x4b0992+'\x22.');let _0x19ce9e=_0x4928e8[_0x4431b0(0x1a7)]===void 0x0?void 0x0:O(_0x4928e8[_0x4431b0(0x1a7)],'registrations['+_0x25114e+_0x4431b0(0x1aa)),_0x278ef5=F(_0x4928e8['groups'],_0x4431b0(0x1bf)+_0x25114e+'].input.groups',_0x19ce9e),_0x3a67da=F(_0x4928e8['tags'],_0x4431b0(0x1bf)+_0x25114e+_0x4431b0(0x191),_0x19ce9e),_0x20ae99=[];for(let [_0x238456,_0x2329a3]of D(_0x4928e8[_0x4431b0(0x1d0)],_0x4431b0(0x1bf)+_0x25114e+_0x4431b0(0x1b7))[_0x4431b0(0x1cd)]()){let _0x7513c2='registrations['+_0x25114e+_0x4431b0(0x1b4)+_0x238456+']',_0x2ba02b=E(_0x2329a3,_0x7513c2),_0x42bbde=O(_0x2ba02b['id'],_0x7513c2+_0x4431b0(0x20a));P(_0x42bbde,_0x7513c2+'.id',_0x4431b0(0x1a4));let _0x30af76=ee(_0x4b0992,_0x42bbde);if(_0x21e039[_0x4431b0(0x1c8)](_0x30af76))throw T(_0x4431b0(0x167)+_0x30af76+'\x22.');let _0x2bb0cb;try{_0x2bb0cb=w(_0x30af76);}catch(_0x39ad3b){throw T(_0x7513c2+':\x20'+(_0x39ad3b instanceof Error?_0x39ad3b[_0x4431b0(0x1ef)]:String(_0x39ad3b)));}if(_0x20fba0[_0x4431b0(0x1c8)](_0x2bb0cb))throw T(_0x4431b0(0x1c0)+_0x2bb0cb+'\x22.');_0x20fba0['add'](_0x2bb0cb);let _0x3bdf2c=_0x2ba02b[_0x4431b0(0x1fb)]===void 0x0?void 0x0:O(_0x2ba02b['groupId'],_0x7513c2+_0x4431b0(0x221));if(_0x3bdf2c!==void 0x0&&!_0x278ef5[_0x4431b0(0x1c8)](_0x3bdf2c))throw T(_0x7513c2+_0x4431b0(0x18c)+_0x3bdf2c+'\x22.');let _0x18f306=k(_0x2ba02b['tagIds'],_0x7513c2+'.tagIds',!0x0);for(let _0x5ef4f4 of _0x18f306)if(!_0x3a67da[_0x4431b0(0x1c8)](_0x5ef4f4))throw T(_0x7513c2+_0x4431b0(0x16b)+_0x5ef4f4+'\x22.');let _0x951fb7=A(_0x2ba02b[_0x4431b0(0x1dc)],_0x7513c2+_0x4431b0(0x1c4)),_0x4b47d4=N(_0x2ba02b[_0x4431b0(0x18a)],_0x7513c2+_0x4431b0(0x1be),_0x19ce9e),_0x59274f=_0x2ba02b[_0x4431b0(0x196)]===void 0x0?void 0x0:N(_0x2ba02b[_0x4431b0(0x196)],_0x7513c2+_0x4431b0(0x1f2),_0x19ce9e),_0x490a75=_0x3bdf2c===void 0x0?null:{'id':_0x3bdf2c,'label':_0x278ef5[_0x4431b0(0x198)](_0x3bdf2c)},_0x46ab7d=_0x18f306[_0x4431b0(0x19f)](_0x3979d9=>({'id':_0x3979d9,'label':_0x3a67da[_0x4431b0(0x198)](_0x3979d9)})),_0x2ef5f1=E(_0x2ba02b[_0x4431b0(0x19c)],_0x7513c2+_0x4431b0(0x199)),_0x2d51a4=_0x2ba02b[_0x4431b0(0x209)]===void 0x0?null:j(_0x2ba02b['order'],_0x7513c2+'.order'),_0x203826=M(_0x2ef5f1['colorEditable'],_0x7513c2+_0x4431b0(0x163)),_0x3e851d={'handle':_0x30af76,'registryId':_0x4b0992,'id':_0x42bbde,'name':_0x4b47d4,..._0x59274f===void 0x0?{}:{'description':_0x59274f},'group':_0x490a75,'tags':_0x46ab7d,'keywords':_0x951fb7,'order':_0x2d51a4,'intrinsicSize':I(_0x2ef5f1,_0x7513c2+_0x4431b0(0x199)),'colorEditable':_0x203826,'sourceUrl':L(_0x2ef5f1,_0x7513c2+_0x4431b0(0x199)),'registrationIndex':_0x25114e,'resourceIndex':_0x238456,'globalIndex':_0xc6d78c,'searchText':R([_0x4b47d4,_0x59274f,_0x490a75?.[_0x4431b0(0x227)],..._0x46ab7d[_0x4431b0(0x19f)](_0x2e081d=>_0x2e081d['label']),..._0x951fb7][_0x4431b0(0x188)](_0x4afdba=>_0x4afdba!==void 0x0)[_0x4431b0(0x1b3)]('\x20'))};_0xc6d78c++,_0x20ae99[_0x4431b0(0x1d2)](_0x3e851d),_0x4f4867[_0x4431b0(0x1d2)](_0x3e851d),_0x21e039[_0x4431b0(0x186)](_0x30af76,_0x3e851d);}let _0x4faf81={'id':_0x4b0992,'groups':_0x278ef5,'tags':_0x3a67da,'resources':_0x20ae99};_0x5baa3b[_0x4431b0(0x1d2)](_0x4faf81),_0x296ba2[_0x4431b0(0x186)](_0x4b0992,_0x4faf81);}if(_0x5baa3b[_0x4431b0(0x1ce)]===0x0)throw T(_0x4431b0(0x183));return{'registries':_0x5baa3b,'registryById':_0x296ba2,'resourceByHandle':_0x21e039,'resources':_0x4f4867};}function B(_0x2a4e05,_0xb55f8c){const _0x1637fc=_0x36f18f;C(_0xb55f8c);let _0x1c77ce=_0x2a4e05['resourceByHandle']['get'](_0xb55f8c);if(_0x1c77ce===void 0x0)throw new h(_0x1637fc(0x1a8),_0x1637fc(0x1c9)+_0xb55f8c+_0x1637fc(0x1eb),_0xb55f8c);return _0x1c77ce;}function te(_0x2a2afd){const _0x1cc255=_0x36f18f;return _0x2a2afd[_0x1cc255(0x1e9)][_0x1cc255(0x19f)](_0x46cf07=>({'id':_0x46cf07['id'],'resourceCount':_0x46cf07[_0x1cc255(0x1d0)]['length'],'groupCount':_0x46cf07['groups']['size'],'tagCount':_0x46cf07['tags'][_0x1cc255(0x164)],'colorEditableCount':_0x46cf07[_0x1cc255(0x1d0)][_0x1cc255(0x188)](_0x377f45=>_0x377f45[_0x1cc255(0x1bc)])['length']}));}function ne(_0x27804c){const _0x11804d=_0x36f18f;return{'handle':_0x27804c[_0x11804d(0x217)],'registryId':_0x27804c['registryId'],'id':_0x27804c['id'],'name':_0x27804c[_0x11804d(0x18a)],'group':_0x27804c['group'],'tags':_0x27804c['tags'],'keywords':_0x27804c[_0x11804d(0x1dc)],'order':_0x27804c['order'],'intrinsicSize':_0x27804c['intrinsicSize'],'colorEditable':_0x27804c[_0x11804d(0x1bc)]};}function re(_0x83345d,_0x3dc1bb){const _0x54e606=_0x36f18f;let _0x5d5b70=(_0x83345d[_0x54e606(0x209)]??_0x83345d['globalIndex'])-(_0x3dc1bb[_0x54e606(0x209)]??_0x3dc1bb[_0x54e606(0x177)]);if(_0x5d5b70!==0x0)return _0x5d5b70;let _0x5aedff=_0x83345d[_0x54e606(0x1ff)]-_0x3dc1bb[_0x54e606(0x1ff)];if(_0x5aedff!==0x0)return _0x5aedff;let _0x2a316d=_0x83345d[_0x54e606(0x1da)]-_0x3dc1bb[_0x54e606(0x1da)];return _0x2a316d===0x0?_0x83345d[_0x54e606(0x217)][_0x54e606(0x1e1)](_0x3dc1bb['handle']):_0x2a316d;}function ie(_0x579b1a,_0x40a63b){const _0x319477=_0x36f18f;let _0xfa9b46=_0x40a63b[_0x319477(0x1ac)][_0x319477(0x19f)](R)[_0x319477(0x188)](_0x4c0e93=>_0x4c0e93!=='');if(_0xfa9b46[_0x319477(0x1ce)]===0x0)throw new h('resource-query-empty',_0x319477(0x226));let _0x2330b8=new Set(_0x40a63b[_0x319477(0x1e9)]??[]);for(let _0x10cc2a of _0x2330b8)if(!_0x579b1a[_0x319477(0x16d)][_0x319477(0x1c8)](_0x10cc2a))throw new h(_0x319477(0x189),'Unknown\x20resource\x20registry\x20\x22'+_0x10cc2a+'\x22.');let _0x59159b=_0x40a63b['limit']??_0x579b1a[_0x319477(0x1d0)][_0x319477(0x1ce)];if(!Number[_0x319477(0x17e)](_0x59159b)||_0x59159b<0x1)throw new h('resource-limit-invalid','Resource\x20search\x20limit\x20must\x20be\x20a\x20positive\x20integer;\x20received\x20\x22'+_0x59159b+'\x22.');let _0x480b3e=_0x579b1a[_0x319477(0x1d0)][_0x319477(0x188)](_0x3d218=>_0x2330b8['size']===0x0||_0x2330b8[_0x319477(0x1c8)](_0x3d218[_0x319477(0x1f5)]))['filter'](_0x1e463b=>_0xfa9b46[_0x319477(0x1e2)](_0x46a47d=>_0x1e463b[_0x319477(0x1f4)][_0x319477(0x213)](_0x46a47d)))[_0x319477(0x1db)](re);return{'resources':_0x480b3e[_0x319477(0x1a5)](0x0,_0x59159b)[_0x319477(0x19f)](ne),'total':_0x480b3e[_0x319477(0x1ce)]};}function V(_0x4cb385){const _0x382ea1=_0x36f18f;return/^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[^]*?-->\s*)*<svg(?:\s|>)/iu[_0x382ea1(0x1e7)](_0x4cb385);}function H(_0x5975bf,_0x52b214){const _0x5dc24c=_0x36f18f;return g(_0x52b214)?{'handle':_0x5975bf,'code':_0x52b214['code'],'message':_0x52b214[_0x5dc24c(0x1ef)]}:{'handle':_0x5975bf,'code':'resource-export-failed','message':_0x52b214 instanceof Error?_0x52b214[_0x5dc24c(0x1ef)]:String(_0x52b214)};}var U=class{[_0x36f18f(0x175)];[_0x36f18f(0x1c5)];constructor(_0x5ce4d6){const _0x3dba2e=_0x36f18f;this[_0x3dba2e(0x175)]=_0x5ce4d6,this['catalog']=z(_0x5ce4d6[_0x3dba2e(0x1d6)]);}get['cacheLocation'](){const _0x5da755=_0x36f18f;return this[_0x5da755(0x175)][_0x5da755(0x162)][_0x5da755(0x169)];}[_0x36f18f(0x1ed)](){const _0x465e00=_0x36f18f;return te(this[_0x465e00(0x1c5)]);}[_0x36f18f(0x1ad)](_0x19989c){const _0x3f94dc=_0x36f18f;return ie(this[_0x3f94dc(0x1c5)],_0x19989c);}async['read'](_0x3c39bf){const _0x3cb25c=_0x36f18f;let _0x36cd1e=B(this[_0x3cb25c(0x1c5)],_0x3c39bf['handle']),_0x40ca64=await this[_0x3cb25c(0x175)][_0x3cb25c(0x162)][_0x3cb25c(0x1e6)](_0x3c39bf[_0x3cb25c(0x217)]);if(_0x40ca64!==void 0x0&&V(_0x40ca64))return{'handle':_0x3c39bf['handle'],'svg':_0x40ca64};let _0x3cbfa5;try{_0x3cbfa5=await this[_0x3cb25c(0x175)][_0x3cb25c(0x18d)]['download'](_0x36cd1e['sourceUrl']);}catch(_0x600a82){throw g(_0x600a82)?_0x600a82:new h(_0x3cb25c(0x171),_0x3cb25c(0x1f6)+_0x3c39bf['handle']+'\x22:\x20'+(_0x600a82 instanceof Error?_0x600a82[_0x3cb25c(0x1ef)]:String(_0x600a82)),_0x3c39bf['handle'],{'cause':_0x600a82});}if(!V(_0x3cbfa5))throw new h(_0x3cb25c(0x1de),'Downloaded\x20resource\x20\x22'+_0x3c39bf[_0x3cb25c(0x217)]+_0x3cb25c(0x1fd),_0x3c39bf[_0x3cb25c(0x217)]);return await this['options'][_0x3cb25c(0x162)][_0x3cb25c(0x225)](_0x3c39bf[_0x3cb25c(0x217)],_0x3cbfa5),{'handle':_0x3c39bf[_0x3cb25c(0x217)],'svg':_0x3cbfa5};}async[_0x36f18f(0x211)](_0xaa133a){const _0x44a456=_0x36f18f;let _0x927834=[],_0x428a99=[];for(let _0x2649d5 of _0xaa133a['handles'])try{let {svg:_0x5b931b}=await this[_0x44a456(0x1e6)]({'handle':_0x2649d5}),_0xf602d8=await this[_0x44a456(0x175)][_0x44a456(0x1c1)][_0x44a456(0x225)](_0xaa133a[_0x44a456(0x21e)],w(_0x2649d5),_0x5b931b);_0x927834['push']({'handle':_0x2649d5,'path':_0xf602d8});}catch(_0x5f2d1f){_0x428a99['push'](H(_0x2649d5,_0x5f2d1f));}return{'exported':_0x927834,'failed':_0x428a99};}async['clearCache'](){const _0x5abe78=_0x36f18f;return await this['options'][_0x5abe78(0x162)][_0x5abe78(0x1d5)]();}};function W(_0x5ccae1){return new U(_0x5ccae1);}function G(_0x571a4e){return _0x571a4e instanceof Error&&'code'in _0x571a4e;}function K(_0x1861a3){const _0x40c7a1=_0x36f18f;let _0x1048d6=_0x1b334b(_0x1861a3);if(!_0x89782b(_0x1861a3)||_0x1048d6===_0x16efce(_0x1048d6)[_0x40c7a1(0x1f9)])throw new h(_0x40c7a1(0x179),_0x40c7a1(0x19b)+_0x1861a3+'\x22.');return _0x1048d6;}async function q(_0x98ee93){const _0x316117=_0x36f18f;let _0x24f4a0;try{_0x24f4a0=await _0x55d9f4(_0x98ee93,{'withFileTypes':!0x0});}catch(_0x41356b){if(G(_0x41356b)&&_0x41356b[_0x316117(0x21f)]===_0x316117(0x1b0))return{'resourceCount':0x0,'byteCount':0x0};throw _0x41356b;}let _0x216aa9=0x0,_0x516abc=0x0;for(let _0x52f85b of _0x24f4a0){let _0x74b5b0=_0x1d1f2a(_0x98ee93,_0x52f85b[_0x316117(0x18a)]);if(_0x52f85b['isDirectory']()){let _0x2325bb=await q(_0x74b5b0);_0x216aa9+=_0x2325bb['resourceCount'],_0x516abc+=_0x2325bb[_0x316117(0x1ab)];}else{if(_0x52f85b['isFile']()&&_0x52f85b[_0x316117(0x18a)][_0x316117(0x215)](_0x316117(0x201))){let _0x403423=await _0x3baf01(_0x74b5b0);_0x216aa9++,_0x516abc+=_0x403423[_0x316117(0x164)];}}}return{'resourceCount':_0x216aa9,'byteCount':_0x516abc};}var J=class{[_0x36f18f(0x169)];constructor(_0x421be4){const _0x3cdb84=_0x36f18f;this[_0x3cdb84(0x169)]=K(_0x421be4);}[_0x36f18f(0x1ba)](_0x8e7fd0){const _0x1c7b4d=_0x36f18f;let {registryId:_0x2fba69,resourceId:_0x23a7c2}=C(_0x8e7fd0);return _0x1d1f2a(this[_0x1c7b4d(0x169)],_0x2fba69,_0x23a7c2+_0x1c7b4d(0x201));}async[_0x36f18f(0x1e6)](_0x3223eb){const _0x1ec978=_0x36f18f;try{return await _0x500d43(this[_0x1ec978(0x1ba)](_0x3223eb),_0x1ec978(0x1b2));}catch(_0x5b20ca){if(G(_0x5b20ca)&&_0x5b20ca[_0x1ec978(0x21f)]===_0x1ec978(0x1b0))return;throw _0x5b20ca;}}async[_0x36f18f(0x225)](_0x11f8a1,_0x5c9899){const _0x16f48c=_0x36f18f;let _0x199bdb=this['path'](_0x11f8a1);await _0x2d6fe0(_0x7834fb(_0x199bdb),{'recursive':!0x0});let _0x120c4a=_0x1d1f2a(_0x7834fb(_0x199bdb),_0x16f48c(0x1c2)+process[_0x16f48c(0x166)]+'-'+_0x48d2ba()+_0x16f48c(0x202));try{await _0x5100ca(_0x120c4a,_0x5c9899,{'encoding':_0x16f48c(0x1b2),'mode':0x180}),await _0x61a7d4(_0x120c4a,_0x199bdb);}catch(_0x4052c1){throw await _0x107d1e(_0x120c4a)[_0x16f48c(0x1ec)](()=>void 0x0),_0x4052c1;}}async['clear'](){const _0x2b8a9c=_0x36f18f;let _0x3e1aff=await q(this[_0x2b8a9c(0x169)]);return await _0x2f55c9(this[_0x2b8a9c(0x169)],{'force':!0x0,'recursive':!0x0}),{'path':this['location'],..._0x3e1aff};}},Y=class{async[_0x36f18f(0x225)](_0x4931ed,_0x22b3ad,_0x267656){const _0x32e17a=_0x36f18f;await _0x2d6fe0(_0x4931ed,{'recursive':!0x0});let _0x193205=_0x1d1f2a(_0x4931ed,_0x22b3ad);return await _0x5100ca(_0x193205,_0x267656,_0x32e17a(0x1b2)),_0x193205;}},X=0x7530,ae=0xa00000,oe=0xa,se=new Set([0x12d,0x12e,0x12f,0x133,0x134]);function Z(_0x463497){const _0x56cc00=_0x36f18f;return new h(_0x56cc00(0x1fa),_0x56cc00(0x168)+_0x463497+_0x56cc00(0x192));}async function ce(_0x4435a1,_0x5efe9b){const _0x1c8533=_0x36f18f;let _0x29ee66=Number(_0x4435a1[_0x1c8533(0x18b)][_0x1c8533(0x198)](_0x1c8533(0x212)));if(Number['isFinite'](_0x29ee66)&&_0x29ee66>_0x5efe9b)throw Z(_0x5efe9b);if(_0x4435a1['body']===null){let _0x23861e=await _0x4435a1['text']();if(Buffer[_0x1c8533(0x16f)](_0x23861e)>_0x5efe9b)throw Z(_0x5efe9b);return _0x23861e;}let _0x275326=_0x4435a1[_0x1c8533(0x184)][_0x1c8533(0x165)](),_0x198467=[],_0x51e7b2=0x0;try{for(;;){let _0x2c746b=await _0x275326['read']();if(_0x2c746b[_0x1c8533(0x1f8)])break;if(_0x51e7b2+=_0x2c746b[_0x1c8533(0x1b1)][_0x1c8533(0x16f)],_0x51e7b2>_0x5efe9b)throw await _0x275326[_0x1c8533(0x17c)]()[_0x1c8533(0x1ec)](()=>void 0x0),Z(_0x5efe9b);_0x198467[_0x1c8533(0x1d2)](_0x2c746b[_0x1c8533(0x1b1)]);}}finally{_0x275326['releaseLock']();}try{return new TextDecoder(_0x1c8533(0x1cb),{'fatal':!0x0})[_0x1c8533(0x205)](Buffer['concat'](_0x198467,_0x51e7b2));}catch{throw new h(_0x1c8533(0x20e),_0x1c8533(0x208));}}var Q=class{[_0x36f18f(0x18e)];['timeoutMs'];[_0x36f18f(0x17a)];['maxRedirects'];constructor(_0x4aceda={}){const _0x3e705e=_0x36f18f;this['fetchImpl']=_0x4aceda[_0x3e705e(0x1e0)]??fetch,this[_0x3e705e(0x1a1)]=_0x4aceda[_0x3e705e(0x1a1)]??X,this[_0x3e705e(0x17a)]=_0x4aceda[_0x3e705e(0x17a)]??ae,this[_0x3e705e(0x21a)]=_0x4aceda[_0x3e705e(0x21a)]??oe;}async[_0x36f18f(0x181)](_0xe027c2){const _0x21cf7a=_0x36f18f;let _0x3c83bf=new URL(_0xe027c2);if(_0x3c83bf[_0x21cf7a(0x19d)]!==_0x21cf7a(0x20d))throw new h('resource-download-insecure',_0x21cf7a(0x219));let _0x3fa88b=new AbortController(),_0x54c566=setTimeout(()=>_0x3fa88b[_0x21cf7a(0x1fe)](),this[_0x21cf7a(0x1a1)]);try{let _0x3f62a4=_0x3c83bf;for(let _0x3333f4=0x0;;_0x3333f4++){let _0x3fe1d4=await this['fetchImpl'](_0x3f62a4,{'redirect':_0x21cf7a(0x214),'signal':_0x3fa88b[_0x21cf7a(0x170)]});if(se[_0x21cf7a(0x1c8)](_0x3fe1d4[_0x21cf7a(0x16e)])){if(_0x3333f4>=this['maxRedirects'])throw new h(_0x21cf7a(0x1b9),_0x21cf7a(0x17b)+this[_0x21cf7a(0x21a)]+'.');let _0x368801=_0x3fe1d4[_0x21cf7a(0x18b)][_0x21cf7a(0x198)](_0x21cf7a(0x169));if(_0x368801===null)throw new h(_0x21cf7a(0x20b),_0x21cf7a(0x1df)+_0x3fe1d4[_0x21cf7a(0x16e)]+_0x21cf7a(0x1a3));let _0x12a789;try{_0x12a789=new URL(_0x368801,_0x3f62a4);}catch{throw new h('resource-download-invalid-redirect',_0x21cf7a(0x19a));}if(_0x12a789[_0x21cf7a(0x19d)]!==_0x21cf7a(0x20d))throw new h('resource-download-insecure-redirect',_0x21cf7a(0x1b5));_0x3f62a4=_0x12a789;continue;}if(!_0x3fe1d4['ok'])throw new h(_0x21cf7a(0x21b),_0x21cf7a(0x1df)+_0x3fe1d4['status']+'.');if(_0x3fe1d4['url']!==''&&new URL(_0x3fe1d4[_0x21cf7a(0x210)])[_0x21cf7a(0x19d)]!==_0x21cf7a(0x20d))throw new h(_0x21cf7a(0x190),_0x21cf7a(0x1b5));let _0x4337e6=await ce(_0x3fe1d4,this['maxBytes']);if(!V(_0x4337e6))throw new h(_0x21cf7a(0x224),_0x21cf7a(0x1c6));return _0x4337e6;}}catch(_0x51250c){throw _0x3fa88b[_0x21cf7a(0x170)][_0x21cf7a(0x1e3)]?new h(_0x21cf7a(0x1b8),_0x21cf7a(0x203)+this['timeoutMs']+_0x21cf7a(0x20c)):_0x51250c;}finally{clearTimeout(_0x54c566);}}};function $(_0x2c545b){const _0x41ec4f=_0x36f18f;try{return JSON['parse'](_0x44365f(_0x2c545b,'utf8'));}catch(_0x1c6102){throw new h(_0x41ec4f(0x1d8),'Cannot\x20read\x20resource\x20manifest\x20at\x20'+_0x2c545b+':\x20'+(_0x1c6102 instanceof Error?_0x1c6102[_0x41ec4f(0x1ef)]:String(_0x1c6102)),void 0x0,{'cause':_0x1c6102});}}function le(_0x2a935f){const _0x20a913=_0x36f18f;let _0x131375;return()=>(_0x131375??=W({'manifest':$(_0x2a935f[_0x20a913(0x1af)]),'cache':new J(_0x2a935f['cacheRoot']),'downloader':new Q(_0x2a935f[_0x20a913(0x18d)]),'output':new Y()}),_0x131375);}export{J as FilesystemResourceCache,Y as FilesystemResourceOutput,Q as HttpsResourceDownloader,h as ResourceLibraryError,le as createNodeResourceLibraryFactory,W as createResourceLibrary,g as isResourceLibraryError,$ as loadResourceManifestFromPath,K as validateResourceCacheRoot};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@univer-cli/resource-library",
3
3
  "type": "module",
4
- "version": "1.0.1",
4
+ "version": "1.0.3",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",