@univer-cli/resource-library 1.0.0 → 1.0.2
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 _0x2b7f(_0x5ecc42,_0x271a6c){_0x5ecc42=_0x5ecc42-0x1ae;const _0x54fd31=_0x54fd();let _0x2b7f7c=_0x54fd31[_0x5ecc42];return _0x2b7f7c;}const _0x19c91c=_0x2b7f;(function(_0x5abb1a,_0x254e1d){const _0x43f1bd=_0x2b7f,_0x6c601d=_0x5abb1a();while(!![]){try{const _0x461ba4=-parseInt(_0x43f1bd(0x207))/0x1*(parseInt(_0x43f1bd(0x22c))/0x2)+-parseInt(_0x43f1bd(0x237))/0x3+-parseInt(_0x43f1bd(0x20a))/0x4*(parseInt(_0x43f1bd(0x24d))/0x5)+parseInt(_0x43f1bd(0x20c))/0x6+-parseInt(_0x43f1bd(0x1e7))/0x7+-parseInt(_0x43f1bd(0x228))/0x8+parseInt(_0x43f1bd(0x273))/0x9*(parseInt(_0x43f1bd(0x217))/0xa);if(_0x461ba4===_0x254e1d)break;else _0x6c601d['push'](_0x6c601d['shift']());}catch(_0x9b2e43){_0x6c601d['push'](_0x6c601d['shift']());}}}(_0x54fd,0x8292f));function _0x54fd(){const _0x282fa8=['tags','en-US','length','manifest.registrations','body','number','catalog','concat','protocol','.source.value\x20must\x20use\x20HTTPS.','.tagIds','split','byteLength','.resource-','resource','Invalid\x20resource\x20manifest:\x20','\x20must\x20be\x20a\x20non-empty\x20string.','Failed\x20to\x20download\x20\x22','searchText','groups','].input.resources','ResourceLibraryError','get','queries','resource-registry-not-found','.groupId\x20references\x20unknown\x20group\x20\x22','\x20ms.','intrinsicSize','pid','resource-not-found','18424242WeGfiB','join','content-length','tagIds','name','filter','.groupId','].input.groups','isDirectory','\x22\x20is\x20not\x20an\x20SVG\x20document.','resource-invalid-registry-id','Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.','size','NFKC','Resource\x20search\x20needs\x20at\x20least\x20one\x20non-empty\x20query.','\x20ID\x20\x22','image','maxBytes','string','label','read','find','.payload.colorEditable','resource-export-filename-too-long','options','resource-download-too-many-redirects','registrationIndex','.order','isFile','manual','width','values','resource-cache-root-invalid','aborted','.id','resource-invalid-svg','catch','listRegistries','\x20contains\x20no\x20usable\x20localized\x20text.','Invalid\x20registry\x20ID\x20\x22','Unknown\x20resource\x20registry\x20\x22','getReader','cacheRoot','resource-manifest-invalid','registry','destination','defaultLocale','].label','Unknown\x20resource\x20\x22','isArray','.tagIds\x20references\x20unknown\x20tag\x20\x22','replace','toLowerCase','resourceIndex','].input.registryId','Resource\x20server\x20returned\x20HTTP\x20','.description','.intrinsicSize.width','https:','resource-export-failed','isFinite','.intrinsicSize.height','registries','.keywords','headers','handles','4474799AxvVhv','byteCount','Resource\x20response\x20is\x20not\x20valid\x20UTF-8.','].id','.name','Duplicate\x20registry\x20ID\x20\x22','payload','resources','cache','Invalid\x20resource\x20ID\x20\x22','includes','.tmp','download','some','registrations','height','\x20bytes.','Resource\x20request\x20followed\x20too\x20many\x20redirects;\x20maximum\x20','resource-manifest-read-failed','.intrinsicSize\x20must\x20be\x20positive.','url','map','timeoutMs','\x20without\x20a\x20Location\x20header.','Resource\x20URL\x20must\x20use\x20HTTPS.','location','description','maxRedirects','set','Invalid\x20resource\x20handle\x20\x22','ENOENT','signal','1627BCSsTI','resource-limit-invalid','\x20must\x20be\x20an\x20array.','15536mcphLC','\x20must\x20be\x20an\x20object.','563964IiRwnG','reference','Resource\x20exceeds\x20the\x20maximum\x20size\x20of\x20','Resource\x20server\x20returned\x20an\x20invalid\x20redirect\x20URL.','resource-query-empty','\x20must\x20be\x20a\x20finite\x20number.','fetchImpl','startsWith','.payload','resource-invalid-handle','].input.resources[','20hzDntu','globalIndex','code','registryById','Resource\x20response\x20is\x20not\x20an\x20SVG\x20document.','clear','type','output','Cannot\x20read\x20resource\x20manifest\x20at\x20','registrations\x20must\x20not\x20be\x20empty.','input','colorEditable','clearCache','\x22;\x20try\x20resources\x20find\x20<query>.','message','.source.value\x20must\x20be\x20a\x20URL.','export','3459792VAqXWG','registrations[','slice','Resource\x20cache\x20root\x20must\x20be\x20an\x20absolute,\x20dedicated\x20directory\x20below\x20the\x20filesystem\x20root;\x20received\x20\x22','1036xBetMQ','status','keywords','value','resource-download-too-large','.type\x20must\x20be\x20\x22image\x22.','storagePolicy','endsWith','.source.type\x20must\x20be\x20\x22url\x22.','registryId','\x22:\x20expected\x20an\x20addressable\x20filesystem-safe\x20component\x20without\x20\x22--\x22.','3177666hMdANU','resource-download-insecure-redirect','test','.source','sort','Resource\x20download\x20timed\x20out\x20after\x20','root','.svg','manifest','push','resource-download-invalid-redirect','Resource\x20search\x20limit\x20must\x20be\x20a\x20positive\x20integer;\x20received\x20\x22','downloader','path','text','handle','entries','has','write','utf8','add','order','875sKCojS','].input.tags','manifestPath','resourceCount','groupId','.storagePolicy\x20must\x20be\x20\x22reference\x22.','fetch','resource-download-invalid-svg'];_0x54fd=function(){return _0x282fa8;};return _0x54fd();}import{randomUUID as _0x2f2b18}from'node:crypto';import{mkdir as _0x147b1b,readFile as _0x2f8c48,readdir as _0x1777e5,rename as _0x3a8b8c,rm as _0x54c064,stat as _0x223d32,unlink as _0x2037ed,writeFile as _0x2c7421}from'node:fs/promises';import{dirname as _0x2f664c,isAbsolute as _0x8095c8,join as _0x29feae,parse as _0x4ce26a,resolve as _0x1f582e}from'node:path';import{readFileSync as _0x3422d9}from'node:fs';var h=class extends Error{[_0x19c91c(0x219)];[_0x19c91c(0x246)];constructor(_0x3312ec,_0x7ec013,_0xfc5f90,_0x48a711){const _0x1491f0=_0x19c91c;super(_0x7ec013,_0x48a711),this[_0x1491f0(0x219)]=_0x3312ec,this[_0x1491f0(0x246)]=_0xfc5f90,this[_0x1491f0(0x277)]=_0x1491f0(0x26a);}};function g(_0x2144f0){return _0x2144f0 instanceof h;}var _=/^[A-Za-z0-9._-]+$/u,v=0xff,y=0x4;function b(_0x2c9315){const _0x51ac93=_0x19c91c;return _[_0x51ac93(0x239)](_0x2c9315)&&_0x2c9315!=='.'&&_0x2c9315!=='..';}function x(_0x88aa52){const _0x348cf8=_0x19c91c;if(!b(_0x88aa52)||_0x88aa52[_0x348cf8(0x213)]('-')||_0x88aa52[_0x348cf8(0x1f1)]('--')||_0x88aa52[_0x348cf8(0x257)]>v)throw new h(_0x348cf8(0x1af),_0x348cf8(0x1cc)+_0x88aa52+_0x348cf8(0x236));}function S(_0xa24fff){const _0x1b1d7a=_0x19c91c;if(!b(_0xa24fff)||_0xa24fff[_0x1b1d7a(0x257)]+y>v)throw new h('resource-invalid-resource-id',_0x1b1d7a(0x1f0)+_0xa24fff+'\x22:\x20expected\x20filesystem-safe\x20characters.');}function C(_0x5b9717){const _0x31c88c=_0x19c91c;let _0x4f54c0=_0x5b9717[_0x31c88c(0x260)]('/');if(_0x4f54c0['length']!==0x2||_0x4f54c0[0x0]===''||_0x4f54c0[0x1]==='')throw new h(_0x31c88c(0x215),_0x31c88c(0x204)+_0x5b9717+'\x22;\x20expected\x20<registryId>/<resourceId>.',_0x5b9717);let _0x49c433=_0x4f54c0[0x0],_0x527032=_0x4f54c0[0x1];return x(_0x49c433),S(_0x527032),{'registryId':_0x49c433,'resourceId':_0x527032};}function ee(_0x5b1308,_0x1b2308){return x(_0x5b1308),S(_0x1b2308),_0x5b1308+'/'+_0x1b2308;}function w(_0x540fb2){const _0x547c1e=_0x19c91c;let {registryId:_0x2ef445,resourceId:_0x4090f0}=C(_0x540fb2),_0x57b762=_0x2ef445+'--'+_0x4090f0+_0x547c1e(0x23e);if(_0x57b762[_0x547c1e(0x257)]>v)throw new h(_0x547c1e(0x1bc),'Resource\x20export\x20filename\x20exceeds\x20'+v+_0x547c1e(0x1f7),_0x540fb2);return _0x57b762;}function T(_0x349904){const _0x575688=_0x19c91c;return new h(_0x575688(0x1d0),_0x575688(0x264)+_0x349904);}function E(_0x21944c,_0x2c3a45){const _0x4569eb=_0x19c91c;if(typeof _0x21944c!='object'||!_0x21944c||Array[_0x4569eb(0x1d6)](_0x21944c))throw T(_0x2c3a45+_0x4569eb(0x20b));return _0x21944c;}function D(_0x21dbd7,_0x16e1a5,_0x49a9d1=!0x1){const _0xcde75c=_0x19c91c;if(_0x49a9d1&&_0x21dbd7===void 0x0)return[];if(!Array[_0xcde75c(0x1d6)](_0x21dbd7))throw T(_0x16e1a5+_0xcde75c(0x209));return _0x21dbd7;}function O(_0x4fc67b,_0x270539){const _0x3ba532=_0x19c91c;if(typeof _0x4fc67b!=_0x3ba532(0x1b7)||_0x4fc67b==='')throw T(_0x270539+_0x3ba532(0x265));return _0x4fc67b;}function k(_0x2c961f,_0x1ff26e,_0x53f9f8=!0x1){const _0x23ccee=_0x19c91c;return D(_0x2c961f,_0x1ff26e,_0x53f9f8)[_0x23ccee(0x1fc)]((_0x49159b,_0x284ca9)=>O(_0x49159b,_0x1ff26e+'['+_0x284ca9+']'));}function A(_0x1d5217,_0x299d63){const _0x20e396=_0x19c91c;return D(_0x1d5217,_0x299d63,!0x0)[_0x20e396(0x1fc)]((_0x547d30,_0x260797)=>{if(typeof _0x547d30!='string')throw T(_0x299d63+'['+_0x260797+']\x20must\x20be\x20a\x20string.');return _0x547d30;})[_0x20e396(0x278)](_0x5b4704=>_0x5b4704!=='');}function j(_0x27d851,_0xbed9b){const _0x3be18b=_0x19c91c;if(typeof _0x27d851!=_0x3be18b(0x25a)||!Number[_0x3be18b(0x1e1)](_0x27d851))throw T(_0xbed9b+_0x3be18b(0x211));return _0x27d851;}function M(_0x2f1a41,_0x1fb5b3){if(typeof _0x2f1a41!='boolean')throw T(_0x1fb5b3+'\x20must\x20be\x20a\x20boolean.');return _0x2f1a41;}function N(_0x28e873,_0x57a5de,_0x178f3d){const _0x406d64=_0x19c91c;if(typeof _0x28e873=='string'&&_0x28e873!=='')return _0x28e873;let _0x4987b9=E(_0x28e873,_0x57a5de),_0x3e36b=_0x178f3d===void 0x0?void 0x0:_0x4987b9[_0x178f3d];if(typeof _0x3e36b==_0x406d64(0x1b7)&&_0x3e36b!=='')return _0x3e36b;let _0x2f8d93=_0x4987b9[_0x406d64(0x256)];if(typeof _0x2f8d93==_0x406d64(0x1b7)&&_0x2f8d93!=='')return _0x2f8d93;let _0x33bc6f=Object[_0x406d64(0x1c4)](_0x4987b9)[_0x406d64(0x1ba)](_0x222740=>typeof _0x222740=='string'&&_0x222740!=='');if(_0x33bc6f!==void 0x0)return _0x33bc6f;throw T(_0x57a5de+_0x406d64(0x1cb));}function P(_0x4d4afe,_0x4f9879,_0x431c7b){const _0x40be61=_0x19c91c;try{_0x431c7b===_0x40be61(0x1d1)?x(_0x4d4afe):S(_0x4d4afe);}catch(_0x1b9163){throw T(_0x4f9879+':\x20'+(_0x1b9163 instanceof Error?_0x1b9163[_0x40be61(0x225)]:String(_0x1b9163)));}}function F(_0x5a8434,_0x2e70c2,_0x1fd145){const _0x5cb2c6=_0x19c91c;let _0x389667=new Map();for(let [_0x2c053a,_0x488d24]of D(_0x5a8434,_0x2e70c2,!0x0)[_0x5cb2c6(0x247)]()){let _0x2fe00c=E(_0x488d24,_0x2e70c2+'['+_0x2c053a+']'),_0x4b39ea=O(_0x2fe00c['id'],_0x2e70c2+'['+_0x2c053a+_0x5cb2c6(0x1ea));if(P(_0x4b39ea,_0x2e70c2+'['+_0x2c053a+_0x5cb2c6(0x1ea),'resource'),_0x389667[_0x5cb2c6(0x248)](_0x4b39ea))throw T('Duplicate\x20'+_0x2e70c2+_0x5cb2c6(0x1b4)+_0x4b39ea+'\x22.');_0x389667['set'](_0x4b39ea,N(_0x2fe00c['label'],_0x2e70c2+'['+_0x2c053a+_0x5cb2c6(0x1d4),_0x1fd145));}return _0x389667;}function I(_0x118717,_0x71a2b5){const _0x1eccd6=_0x19c91c;let _0x5abf64=E(_0x118717[_0x1eccd6(0x270)],_0x71a2b5+'.intrinsicSize'),_0x3f1bfd=j(_0x5abf64[_0x1eccd6(0x1c3)],_0x71a2b5+_0x1eccd6(0x1de)),_0x491e6d=j(_0x5abf64[_0x1eccd6(0x1f6)],_0x71a2b5+_0x1eccd6(0x1e2));if(_0x3f1bfd<=0x0||_0x491e6d<=0x0)throw T(_0x71a2b5+_0x1eccd6(0x1fa));return{'width':_0x3f1bfd,'height':_0x491e6d};}function L(_0x599e62,_0x2da2ce){const _0x1ecc23=_0x19c91c;if(_0x599e62[_0x1ecc23(0x21d)]!==_0x1ecc23(0x1b5))throw T(_0x2da2ce+_0x1ecc23(0x231));if(_0x599e62[_0x1ecc23(0x232)]!==_0x1ecc23(0x20d))throw T(_0x2da2ce+_0x1ecc23(0x252));let _0x32b3bc=E(_0x599e62['source'],_0x2da2ce+_0x1ecc23(0x23a));if(_0x32b3bc[_0x1ecc23(0x21d)]!=='url')throw T(_0x2da2ce+_0x1ecc23(0x234));let _0x48e51a=O(_0x32b3bc[_0x1ecc23(0x22f)],_0x2da2ce+'.source.value'),_0x16a766;try{_0x16a766=new URL(_0x48e51a);}catch{throw T(_0x2da2ce+_0x1ecc23(0x226));}if(_0x16a766[_0x1ecc23(0x25d)]!==_0x1ecc23(0x1df))throw T(_0x2da2ce+_0x1ecc23(0x25e));return _0x48e51a;}function R(_0x1a1005){const _0x56fb23=_0x19c91c;return _0x1a1005['normalize'](_0x56fb23(0x1b2))[_0x56fb23(0x1d9)]()['trim']()[_0x56fb23(0x1d8)](/\s+/gu,'\x20');}function z(_0x2b973e){const _0x12911b=_0x19c91c;let _0x4455d0=E(_0x2b973e,_0x12911b(0x23f)),_0x22d1e3=new Map(),_0x284c4e=new Map(),_0x10906c=[],_0x5a6c67=[],_0x23d4e5=new Set(),_0x3dfab2=0x0;for(let [_0x130fa0,_0x515cba]of D(_0x4455d0[_0x12911b(0x1f5)],_0x12911b(0x258))[_0x12911b(0x247)]()){let _0x4f376e=E(E(_0x515cba,_0x12911b(0x229)+_0x130fa0+']')[_0x12911b(0x221)],'registrations['+_0x130fa0+'].input'),_0x183d30=O(_0x4f376e['registryId'],_0x12911b(0x229)+_0x130fa0+_0x12911b(0x1db));if(P(_0x183d30,_0x12911b(0x229)+_0x130fa0+_0x12911b(0x1db),_0x12911b(0x1d1)),_0x22d1e3[_0x12911b(0x248)](_0x183d30))throw T(_0x12911b(0x1ec)+_0x183d30+'\x22.');let _0x6d3087=_0x4f376e[_0x12911b(0x1d3)]===void 0x0?void 0x0:O(_0x4f376e[_0x12911b(0x1d3)],_0x12911b(0x229)+_0x130fa0+'].input.defaultLocale'),_0x1201d5=F(_0x4f376e[_0x12911b(0x268)],_0x12911b(0x229)+_0x130fa0+_0x12911b(0x27a),_0x6d3087),_0x1fe1e3=F(_0x4f376e['tags'],'registrations['+_0x130fa0+_0x12911b(0x24e),_0x6d3087),_0x52176f=[];for(let [_0x5e58c5,_0x29ba2b]of D(_0x4f376e['resources'],_0x12911b(0x229)+_0x130fa0+_0x12911b(0x269))[_0x12911b(0x247)]()){let _0x1d65fe=_0x12911b(0x229)+_0x130fa0+_0x12911b(0x216)+_0x5e58c5+']',_0x569d76=E(_0x29ba2b,_0x1d65fe),_0xa06dee=O(_0x569d76['id'],_0x1d65fe+'.id');P(_0xa06dee,_0x1d65fe+_0x12911b(0x1c7),_0x12911b(0x263));let _0x4bcdba=ee(_0x183d30,_0xa06dee);if(_0x284c4e[_0x12911b(0x248)](_0x4bcdba))throw T('Duplicate\x20resource\x20handle\x20\x22'+_0x4bcdba+'\x22.');let _0x5ab815;try{_0x5ab815=w(_0x4bcdba);}catch(_0x44bd3e){throw T(_0x1d65fe+':\x20'+(_0x44bd3e instanceof Error?_0x44bd3e[_0x12911b(0x225)]:String(_0x44bd3e)));}if(_0x23d4e5[_0x12911b(0x248)](_0x5ab815))throw T('Duplicate\x20export\x20filename\x20\x22'+_0x5ab815+'\x22.');_0x23d4e5[_0x12911b(0x24b)](_0x5ab815);let _0x417848=_0x569d76['groupId']===void 0x0?void 0x0:O(_0x569d76[_0x12911b(0x251)],_0x1d65fe+_0x12911b(0x279));if(_0x417848!==void 0x0&&!_0x1201d5[_0x12911b(0x248)](_0x417848))throw T(_0x1d65fe+_0x12911b(0x26e)+_0x417848+'\x22.');let _0x533cb3=k(_0x569d76[_0x12911b(0x276)],_0x1d65fe+_0x12911b(0x25f),!0x0);for(let _0x3f5f11 of _0x533cb3)if(!_0x1fe1e3[_0x12911b(0x248)](_0x3f5f11))throw T(_0x1d65fe+_0x12911b(0x1d7)+_0x3f5f11+'\x22.');let _0x1513ac=A(_0x569d76['keywords'],_0x1d65fe+_0x12911b(0x1e4)),_0x295c94=N(_0x569d76['name'],_0x1d65fe+_0x12911b(0x1eb),_0x6d3087),_0x3189=_0x569d76[_0x12911b(0x201)]===void 0x0?void 0x0:N(_0x569d76[_0x12911b(0x201)],_0x1d65fe+_0x12911b(0x1dd),_0x6d3087),_0x507a47=_0x417848===void 0x0?null:{'id':_0x417848,'label':_0x1201d5[_0x12911b(0x26b)](_0x417848)},_0x4458f6=_0x533cb3[_0x12911b(0x1fc)](_0x27d830=>({'id':_0x27d830,'label':_0x1fe1e3[_0x12911b(0x26b)](_0x27d830)})),_0x11a277=E(_0x569d76[_0x12911b(0x1ed)],_0x1d65fe+_0x12911b(0x214)),_0x178057=_0x569d76[_0x12911b(0x24c)]===void 0x0?null:j(_0x569d76['order'],_0x1d65fe+_0x12911b(0x1c0)),_0x418530=M(_0x11a277[_0x12911b(0x222)],_0x1d65fe+_0x12911b(0x1bb)),_0x115a12={'handle':_0x4bcdba,'registryId':_0x183d30,'id':_0xa06dee,'name':_0x295c94,..._0x3189===void 0x0?{}:{'description':_0x3189},'group':_0x507a47,'tags':_0x4458f6,'keywords':_0x1513ac,'order':_0x178057,'intrinsicSize':I(_0x11a277,_0x1d65fe+'.payload'),'colorEditable':_0x418530,'sourceUrl':L(_0x11a277,_0x1d65fe+_0x12911b(0x214)),'registrationIndex':_0x130fa0,'resourceIndex':_0x5e58c5,'globalIndex':_0x3dfab2,'searchText':R([_0x295c94,_0x3189,_0x507a47?.[_0x12911b(0x1b8)],..._0x4458f6['map'](_0x1ad7a9=>_0x1ad7a9[_0x12911b(0x1b8)]),..._0x1513ac]['filter'](_0x5d3ad9=>_0x5d3ad9!==void 0x0)[_0x12911b(0x274)]('\x20'))};_0x3dfab2++,_0x52176f['push'](_0x115a12),_0x5a6c67[_0x12911b(0x240)](_0x115a12),_0x284c4e['set'](_0x4bcdba,_0x115a12);}let _0x47660f={'id':_0x183d30,'groups':_0x1201d5,'tags':_0x1fe1e3,'resources':_0x52176f};_0x10906c['push'](_0x47660f),_0x22d1e3[_0x12911b(0x203)](_0x183d30,_0x47660f);}if(_0x10906c[_0x12911b(0x257)]===0x0)throw T(_0x12911b(0x220));return{'registries':_0x10906c,'registryById':_0x22d1e3,'resourceByHandle':_0x284c4e,'resources':_0x5a6c67};}function B(_0x578571,_0x19dcce){const _0x4a0070=_0x19c91c;C(_0x19dcce);let _0x584714=_0x578571['resourceByHandle'][_0x4a0070(0x26b)](_0x19dcce);if(_0x584714===void 0x0)throw new h(_0x4a0070(0x272),_0x4a0070(0x1d5)+_0x19dcce+_0x4a0070(0x224),_0x19dcce);return _0x584714;}function te(_0x50472e){const _0x43c980=_0x19c91c;return _0x50472e[_0x43c980(0x1e3)][_0x43c980(0x1fc)](_0x102c7b=>({'id':_0x102c7b['id'],'resourceCount':_0x102c7b['resources']['length'],'groupCount':_0x102c7b[_0x43c980(0x268)][_0x43c980(0x1b1)],'tagCount':_0x102c7b[_0x43c980(0x255)][_0x43c980(0x1b1)],'colorEditableCount':_0x102c7b[_0x43c980(0x1ee)][_0x43c980(0x278)](_0x5a2490=>_0x5a2490[_0x43c980(0x222)])['length']}));}function ne(_0xc67f93){const _0xb3800a=_0x19c91c;return{'handle':_0xc67f93[_0xb3800a(0x246)],'registryId':_0xc67f93[_0xb3800a(0x235)],'id':_0xc67f93['id'],'name':_0xc67f93[_0xb3800a(0x277)],'group':_0xc67f93['group'],'tags':_0xc67f93[_0xb3800a(0x255)],'keywords':_0xc67f93[_0xb3800a(0x22e)],'order':_0xc67f93['order'],'intrinsicSize':_0xc67f93[_0xb3800a(0x270)],'colorEditable':_0xc67f93[_0xb3800a(0x222)]};}function re(_0x1eb7e1,_0x20085a){const _0x30a735=_0x19c91c;let _0x2f2ec5=(_0x1eb7e1[_0x30a735(0x24c)]??_0x1eb7e1[_0x30a735(0x218)])-(_0x20085a[_0x30a735(0x24c)]??_0x20085a[_0x30a735(0x218)]);if(_0x2f2ec5!==0x0)return _0x2f2ec5;let _0x281922=_0x1eb7e1[_0x30a735(0x1bf)]-_0x20085a['registrationIndex'];if(_0x281922!==0x0)return _0x281922;let _0x128658=_0x1eb7e1[_0x30a735(0x1da)]-_0x20085a[_0x30a735(0x1da)];return _0x128658===0x0?_0x1eb7e1[_0x30a735(0x246)]['localeCompare'](_0x20085a[_0x30a735(0x246)]):_0x128658;}function ie(_0x5e24c0,_0x8e82c4){const _0x5c7ec6=_0x19c91c;let _0x4e0663=_0x8e82c4[_0x5c7ec6(0x26c)][_0x5c7ec6(0x1fc)](R)[_0x5c7ec6(0x278)](_0x30a5c4=>_0x30a5c4!=='');if(_0x4e0663[_0x5c7ec6(0x257)]===0x0)throw new h(_0x5c7ec6(0x210),_0x5c7ec6(0x1b3));let _0x4242e4=new Set(_0x8e82c4['registries']??[]);for(let _0x2ba7e2 of _0x4242e4)if(!_0x5e24c0[_0x5c7ec6(0x21a)][_0x5c7ec6(0x248)](_0x2ba7e2))throw new h(_0x5c7ec6(0x26d),_0x5c7ec6(0x1cd)+_0x2ba7e2+'\x22.');let _0x28dd0f=_0x8e82c4['limit']??_0x5e24c0[_0x5c7ec6(0x1ee)][_0x5c7ec6(0x257)];if(!Number['isInteger'](_0x28dd0f)||_0x28dd0f<0x1)throw new h(_0x5c7ec6(0x208),_0x5c7ec6(0x242)+_0x28dd0f+'\x22.');let _0x5458f8=_0x5e24c0[_0x5c7ec6(0x1ee)][_0x5c7ec6(0x278)](_0x13d7a9=>_0x4242e4['size']===0x0||_0x4242e4[_0x5c7ec6(0x248)](_0x13d7a9[_0x5c7ec6(0x235)]))[_0x5c7ec6(0x278)](_0x575ccc=>_0x4e0663[_0x5c7ec6(0x1f4)](_0x43b9f4=>_0x575ccc[_0x5c7ec6(0x267)][_0x5c7ec6(0x1f1)](_0x43b9f4)))[_0x5c7ec6(0x23b)](re);return{'resources':_0x5458f8[_0x5c7ec6(0x22a)](0x0,_0x28dd0f)['map'](ne),'total':_0x5458f8[_0x5c7ec6(0x257)]};}function V(_0x31855b){return/^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[^]*?-->\s*)*<svg(?:\s|>)/iu['test'](_0x31855b);}function H(_0x283137,_0x40ab9c){const _0x639676=_0x19c91c;return g(_0x40ab9c)?{'handle':_0x283137,'code':_0x40ab9c[_0x639676(0x219)],'message':_0x40ab9c['message']}:{'handle':_0x283137,'code':_0x639676(0x1e0),'message':_0x40ab9c instanceof Error?_0x40ab9c[_0x639676(0x225)]:String(_0x40ab9c)};}var U=class{[_0x19c91c(0x1bd)];[_0x19c91c(0x25b)];constructor(_0x9ece37){const _0x1b52e0=_0x19c91c;this['options']=_0x9ece37,this[_0x1b52e0(0x25b)]=z(_0x9ece37[_0x1b52e0(0x23f)]);}get['cacheLocation'](){const _0x675322=_0x19c91c;return this[_0x675322(0x1bd)]['cache']['location'];}[_0x19c91c(0x1ca)](){const _0x313c4f=_0x19c91c;return te(this[_0x313c4f(0x25b)]);}[_0x19c91c(0x1ba)](_0x1288a1){return ie(this['catalog'],_0x1288a1);}async[_0x19c91c(0x1b9)](_0x1a1f1b){const _0x340764=_0x19c91c;let _0x130c0d=B(this[_0x340764(0x25b)],_0x1a1f1b['handle']),_0x2a3810=await this[_0x340764(0x1bd)][_0x340764(0x1ef)]['read'](_0x1a1f1b[_0x340764(0x246)]);if(_0x2a3810!==void 0x0&&V(_0x2a3810))return{'handle':_0x1a1f1b['handle'],'svg':_0x2a3810};let _0x7acbdc;try{_0x7acbdc=await this[_0x340764(0x1bd)][_0x340764(0x243)][_0x340764(0x1f3)](_0x130c0d['sourceUrl']);}catch(_0x46295d){throw g(_0x46295d)?_0x46295d:new h('resource-download-failed',_0x340764(0x266)+_0x1a1f1b[_0x340764(0x246)]+'\x22:\x20'+(_0x46295d instanceof Error?_0x46295d['message']:String(_0x46295d)),_0x1a1f1b[_0x340764(0x246)],{'cause':_0x46295d});}if(!V(_0x7acbdc))throw new h(_0x340764(0x1c8),'Downloaded\x20resource\x20\x22'+_0x1a1f1b['handle']+_0x340764(0x1ae),_0x1a1f1b[_0x340764(0x246)]);return await this['options'][_0x340764(0x1ef)][_0x340764(0x249)](_0x1a1f1b[_0x340764(0x246)],_0x7acbdc),{'handle':_0x1a1f1b[_0x340764(0x246)],'svg':_0x7acbdc};}async[_0x19c91c(0x227)](_0x11cb35){const _0x4946e0=_0x19c91c;let _0x573117=[],_0x53dbc4=[];for(let _0x4501ac of _0x11cb35[_0x4946e0(0x1e6)])try{let {svg:_0x38f2c0}=await this[_0x4946e0(0x1b9)]({'handle':_0x4501ac}),_0x2235e5=await this[_0x4946e0(0x1bd)][_0x4946e0(0x21e)][_0x4946e0(0x249)](_0x11cb35[_0x4946e0(0x1d2)],w(_0x4501ac),_0x38f2c0);_0x573117[_0x4946e0(0x240)]({'handle':_0x4501ac,'path':_0x2235e5});}catch(_0x32f7e8){_0x53dbc4['push'](H(_0x4501ac,_0x32f7e8));}return{'exported':_0x573117,'failed':_0x53dbc4};}async[_0x19c91c(0x223)](){const _0x2d608e=_0x19c91c;return await this[_0x2d608e(0x1bd)][_0x2d608e(0x1ef)][_0x2d608e(0x21c)]();}};function W(_0x286d2a){return new U(_0x286d2a);}function G(_0x7032ac){return _0x7032ac instanceof Error&&'code'in _0x7032ac;}function K(_0x35016b){const _0x53e10d=_0x19c91c;let _0x424446=_0x1f582e(_0x35016b);if(!_0x8095c8(_0x35016b)||_0x424446===_0x4ce26a(_0x424446)[_0x53e10d(0x23d)])throw new h(_0x53e10d(0x1c5),_0x53e10d(0x22b)+_0x35016b+'\x22.');return _0x424446;}async function q(_0x3c678e){const _0x17e229=_0x19c91c;let _0x27b93d;try{_0x27b93d=await _0x1777e5(_0x3c678e,{'withFileTypes':!0x0});}catch(_0x150a8f){if(G(_0x150a8f)&&_0x150a8f[_0x17e229(0x219)]===_0x17e229(0x205))return{'resourceCount':0x0,'byteCount':0x0};throw _0x150a8f;}let _0x21b2ec=0x0,_0x5ad8d7=0x0;for(let _0x487b35 of _0x27b93d){let _0x2ab7d3=_0x29feae(_0x3c678e,_0x487b35[_0x17e229(0x277)]);if(_0x487b35[_0x17e229(0x27b)]()){let _0x2709d3=await q(_0x2ab7d3);_0x21b2ec+=_0x2709d3[_0x17e229(0x250)],_0x5ad8d7+=_0x2709d3[_0x17e229(0x1e8)];}else{if(_0x487b35[_0x17e229(0x1c1)]()&&_0x487b35[_0x17e229(0x277)][_0x17e229(0x233)](_0x17e229(0x23e))){let _0x59f8f9=await _0x223d32(_0x2ab7d3);_0x21b2ec++,_0x5ad8d7+=_0x59f8f9[_0x17e229(0x1b1)];}}}return{'resourceCount':_0x21b2ec,'byteCount':_0x5ad8d7};}var J=class{[_0x19c91c(0x200)];constructor(_0x33b1bc){const _0x112a08=_0x19c91c;this[_0x112a08(0x200)]=K(_0x33b1bc);}[_0x19c91c(0x244)](_0x56d153){const _0x1a4c28=_0x19c91c;let {registryId:_0x3c9cf2,resourceId:_0x2f84e0}=C(_0x56d153);return _0x29feae(this[_0x1a4c28(0x200)],_0x3c9cf2,_0x2f84e0+_0x1a4c28(0x23e));}async[_0x19c91c(0x1b9)](_0x43e7c4){const _0xbed78c=_0x19c91c;try{return await _0x2f8c48(this['path'](_0x43e7c4),_0xbed78c(0x24a));}catch(_0xe1f71){if(G(_0xe1f71)&&_0xe1f71[_0xbed78c(0x219)]===_0xbed78c(0x205))return;throw _0xe1f71;}}async[_0x19c91c(0x249)](_0x51e7d4,_0x56a884){const _0x131dc8=_0x19c91c;let _0x7534eb=this['path'](_0x51e7d4);await _0x147b1b(_0x2f664c(_0x7534eb),{'recursive':!0x0});let _0x4860d8=_0x29feae(_0x2f664c(_0x7534eb),_0x131dc8(0x262)+process[_0x131dc8(0x271)]+'-'+_0x2f2b18()+_0x131dc8(0x1f2));try{await _0x2c7421(_0x4860d8,_0x56a884,{'encoding':_0x131dc8(0x24a),'mode':0x180}),await _0x3a8b8c(_0x4860d8,_0x7534eb);}catch(_0x5e52a3){throw await _0x2037ed(_0x4860d8)[_0x131dc8(0x1c9)](()=>void 0x0),_0x5e52a3;}}async[_0x19c91c(0x21c)](){const _0x56d12c=_0x19c91c;let _0x86a72f=await q(this[_0x56d12c(0x200)]);return await _0x54c064(this[_0x56d12c(0x200)],{'force':!0x0,'recursive':!0x0}),{'path':this[_0x56d12c(0x200)],..._0x86a72f};}},Y=class{async[_0x19c91c(0x249)](_0x28ac3c,_0x32c4be,_0x4c100d){const _0xf04f5=_0x19c91c;await _0x147b1b(_0x28ac3c,{'recursive':!0x0});let _0x1e53a7=_0x29feae(_0x28ac3c,_0x32c4be);return await _0x2c7421(_0x1e53a7,_0x4c100d,_0xf04f5(0x24a)),_0x1e53a7;}},X=0x7530,ae=0xa00000,oe=0xa,se=new Set([0x12d,0x12e,0x12f,0x133,0x134]);function Z(_0x44b768){const _0x1eaf14=_0x19c91c;return new h(_0x1eaf14(0x230),_0x1eaf14(0x20e)+_0x44b768+_0x1eaf14(0x1f7));}async function ce(_0x1f7f54,_0x3f0eec){const _0x3f3351=_0x19c91c;let _0x5df6ad=Number(_0x1f7f54[_0x3f3351(0x1e5)]['get'](_0x3f3351(0x275)));if(Number[_0x3f3351(0x1e1)](_0x5df6ad)&&_0x5df6ad>_0x3f0eec)throw Z(_0x3f0eec);if(_0x1f7f54['body']===null){let _0x6ea9aa=await _0x1f7f54[_0x3f3351(0x245)]();if(Buffer[_0x3f3351(0x261)](_0x6ea9aa)>_0x3f0eec)throw Z(_0x3f0eec);return _0x6ea9aa;}let _0x31a277=_0x1f7f54[_0x3f3351(0x259)][_0x3f3351(0x1ce)](),_0x11cd20=[],_0x52ffdf=0x0;try{for(;;){let _0x17b6f1=await _0x31a277[_0x3f3351(0x1b9)]();if(_0x17b6f1['done'])break;if(_0x52ffdf+=_0x17b6f1[_0x3f3351(0x22f)][_0x3f3351(0x261)],_0x52ffdf>_0x3f0eec)throw await _0x31a277['cancel']()[_0x3f3351(0x1c9)](()=>void 0x0),Z(_0x3f0eec);_0x11cd20['push'](_0x17b6f1[_0x3f3351(0x22f)]);}}finally{_0x31a277['releaseLock']();}try{return new TextDecoder('utf-8',{'fatal':!0x0})['decode'](Buffer[_0x3f3351(0x25c)](_0x11cd20,_0x52ffdf));}catch{throw new h('resource-download-invalid-utf8',_0x3f3351(0x1e9));}}var Q=class{[_0x19c91c(0x212)];[_0x19c91c(0x1fd)];[_0x19c91c(0x1b6)];['maxRedirects'];constructor(_0x95daa9={}){const _0x501924=_0x19c91c;this['fetchImpl']=_0x95daa9[_0x501924(0x253)]??fetch,this[_0x501924(0x1fd)]=_0x95daa9[_0x501924(0x1fd)]??X,this[_0x501924(0x1b6)]=_0x95daa9[_0x501924(0x1b6)]??ae,this['maxRedirects']=_0x95daa9[_0x501924(0x202)]??oe;}async['download'](_0x129849){const _0x462e29=_0x19c91c;let _0x4803e9=new URL(_0x129849);if(_0x4803e9[_0x462e29(0x25d)]!=='https:')throw new h('resource-download-insecure',_0x462e29(0x1ff));let _0x278c69=new AbortController(),_0x3a41da=setTimeout(()=>_0x278c69['abort'](),this['timeoutMs']);try{let _0x576d5a=_0x4803e9;for(let _0x3a6560=0x0;;_0x3a6560++){let _0xee2293=await this[_0x462e29(0x212)](_0x576d5a,{'redirect':_0x462e29(0x1c2),'signal':_0x278c69[_0x462e29(0x206)]});if(se[_0x462e29(0x248)](_0xee2293[_0x462e29(0x22d)])){if(_0x3a6560>=this[_0x462e29(0x202)])throw new h(_0x462e29(0x1be),_0x462e29(0x1f8)+this[_0x462e29(0x202)]+'.');let _0x5d4c53=_0xee2293['headers']['get'](_0x462e29(0x200));if(_0x5d4c53===null)throw new h(_0x462e29(0x241),_0x462e29(0x1dc)+_0xee2293[_0x462e29(0x22d)]+_0x462e29(0x1fe));let _0x567ffd;try{_0x567ffd=new URL(_0x5d4c53,_0x576d5a);}catch{throw new h(_0x462e29(0x241),_0x462e29(0x20f));}if(_0x567ffd['protocol']!==_0x462e29(0x1df))throw new h(_0x462e29(0x238),'Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.');_0x576d5a=_0x567ffd;continue;}if(!_0xee2293['ok'])throw new h('resource-download-http','Resource\x20server\x20returned\x20HTTP\x20'+_0xee2293['status']+'.');if(_0xee2293[_0x462e29(0x1fb)]!==''&&new URL(_0xee2293[_0x462e29(0x1fb)])[_0x462e29(0x25d)]!==_0x462e29(0x1df))throw new h(_0x462e29(0x238),_0x462e29(0x1b0));let _0x38061f=await ce(_0xee2293,this[_0x462e29(0x1b6)]);if(!V(_0x38061f))throw new h(_0x462e29(0x254),_0x462e29(0x21b));return _0x38061f;}}catch(_0x1697a1){throw _0x278c69[_0x462e29(0x206)][_0x462e29(0x1c6)]?new h('resource-download-timeout',_0x462e29(0x23c)+this[_0x462e29(0x1fd)]+_0x462e29(0x26f)):_0x1697a1;}finally{clearTimeout(_0x3a41da);}}};function $(_0x19498){const _0x24587e=_0x19c91c;try{return JSON['parse'](_0x3422d9(_0x19498,_0x24587e(0x24a)));}catch(_0x79b721){throw new h(_0x24587e(0x1f9),_0x24587e(0x21f)+_0x19498+':\x20'+(_0x79b721 instanceof Error?_0x79b721[_0x24587e(0x225)]:String(_0x79b721)),void 0x0,{'cause':_0x79b721});}}function le(_0x38563d){const _0x260b34=_0x19c91c;let _0xcf51c;return()=>(_0xcf51c??=W({'manifest':$(_0x38563d[_0x260b34(0x24f)]),'cache':new J(_0x38563d[_0x260b34(0x1cf)]),'downloader':new Q(_0x38563d[_0x260b34(0x243)]),'output':new Y()}),_0xcf51c);}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 _0x3f92f0=_0x4e73;(function(_0x54f979,_0x274d35){const _0x2f58d1=_0x4e73,_0x5d2de9=_0x54f979();while(!![]){try{const _0x17e0e1=parseInt(_0x2f58d1(0x10f))/0x1+-parseInt(_0x2f58d1(0xde))/0x2*(parseInt(_0x2f58d1(0xc6))/0x3)+-parseInt(_0x2f58d1(0x161))/0x4*(parseInt(_0x2f58d1(0x145))/0x5)+parseInt(_0x2f58d1(0xd4))/0x6+parseInt(_0x2f58d1(0x111))/0x7*(parseInt(_0x2f58d1(0x14d))/0x8)+parseInt(_0x2f58d1(0x16c))/0x9*(parseInt(_0x2f58d1(0xeb))/0xa)+-parseInt(_0x2f58d1(0x15c))/0xb;if(_0x17e0e1===_0x274d35)break;else _0x5d2de9['push'](_0x5d2de9['shift']());}catch(_0x5a74dd){_0x5d2de9['push'](_0x5d2de9['shift']());}}}(_0x2d3e,0x5b0cc));import{randomUUID as _0x107d76}from'node:crypto';import{mkdir as _0x4b17cb,readFile as _0x34d870,readdir as _0x2f77cd,rename as _0x5ab312,rm as _0x56af72,stat as _0x4ba3bd,unlink as _0x534074,writeFile as _0x4cdfd2}from'node:fs/promises';function _0x2d3e(){const _0x2dbb25=['byteCount','utf8','root','\x20contains\x20no\x20usable\x20localized\x20text.','timeoutMs','Duplicate\x20registry\x20ID\x20\x22','.type\x20must\x20be\x20\x22image\x22.','.payload.colorEditable','entries','resourceIndex','utf-8','].input.groups','listRegistries','].label','].input.registryId','replace','intrinsicSize','isDirectory','\x22;\x20expected\x20<registryId>/<resourceId>.','toLowerCase','source','cacheRoot','.source.value\x20must\x20be\x20a\x20URL.','Resource\x20exceeds\x20the\x20maximum\x20size\x20of\x20','resource-download-too-many-redirects','744528LeLVyS','resource-export-failed','1542177cgxpOX','keywords','Resource\x20response\x20is\x20not\x20valid\x20UTF-8.','destination','includes','isFinite','.source','test','].input.resources','registries','storagePolicy','group','clearCache','Invalid\x20resource\x20ID\x20\x22','label','map','\x20must\x20be\x20a\x20finite\x20number.','headers','limit','.order','signal','].input.tags','en-US','Failed\x20to\x20download\x20\x22','split','has','handles','aborted','some','path','resource-download-failed','name','decode','globalIndex','manifest','Cannot\x20read\x20resource\x20manifest\x20at\x20','write','type','.groupId','push','Unknown\x20resource\x20\x22','maxBytes','.groupId\x20references\x20unknown\x20group\x20\x22','\x20without\x20a\x20Location\x20header.','.source.value','registrations[','Resource\x20URL\x20must\x20use\x20HTTPS.','text','\x20bytes.','registryById','\x20must\x20be\x20an\x20array.','ResourceLibraryError','5ncbiRv','clear','size','resource-download-insecure-redirect','handle','read','pid','resource-query-empty','16dSKgsg','output','width','find','resource-invalid-svg','resource-download-insecure','\x22\x20is\x20not\x20an\x20SVG\x20document.','searchText','body','\x20ms.','resource-invalid-resource-id','\x22:\x20expected\x20an\x20addressable\x20filesystem-safe\x20component\x20without\x20\x22--\x22.','trim','filter','Invalid\x20resource\x20handle\x20\x22','7143774VpCnHD','resource-download-http','catch','Resource\x20download\x20timed\x20out\x20after\x20','Resource\x20cache\x20root\x20must\x20be\x20an\x20absolute,\x20dedicated\x20directory\x20below\x20the\x20filesystem\x20root;\x20received\x20\x22','2316744tCYIkt','maxRedirects','protocol','\x20ID\x20\x22','resource-download-timeout','value','content-length','.source.value\x20must\x20use\x20HTTPS.','resource-invalid-registry-id','Resource\x20export\x20filename\x20exceeds\x20','.description','136062qGzHvg','code','.intrinsicSize.height','Downloaded\x20resource\x20\x22','done','image','download','resource-download-invalid-svg','registrations\x20must\x20not\x20be\x20empty.','string','resource-manifest-invalid','.id','.source.type\x20must\x20be\x20\x22url\x22.','].input.resources[','fetch','getReader','resource','set','get','manifest.registrations','.intrinsicSize.width','isInteger','options','location','export','fetchImpl','resource-registry-not-found','join','https:','resource-download-invalid-utf8','cache','boolean','manual','\x20must\x20be\x20an\x20object.','6033tWufZH','order','registry','resourceByHandle','.payload','.intrinsicSize\x20must\x20be\x20positive.','.tagIds','normalize','defaultLocale','Resource\x20server\x20returned\x20HTTP\x20','colorEditable','isArray','Invalid\x20resource\x20manifest:\x20','Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.','4374510ZOKVmC','.tmp','resource-invalid-handle','isFile','tags','catalog','Resource\x20request\x20followed\x20too\x20many\x20redirects;\x20maximum\x20','Resource\x20server\x20returned\x20an\x20invalid\x20redirect\x20URL.','resource-download-too-large','status','326cFVLCz','.resource-','resource-cache-root-invalid','message','resourceCount','cacheLocation','description','length','registrationIndex','.svg','ENOENT','].id','resource-manifest-read-failed','10eCfjIc','registryId','queries','cancel','parse','url','startsWith','resource-download-invalid-redirect','Unknown\x20resource\x20registry\x20\x22','resources','tagIds'];_0x2d3e=function(){return _0x2dbb25;};return _0x2d3e();}import{dirname as _0x4a23b9,isAbsolute as _0x1f49fc,join as _0x3f572f,parse as _0x123e1d,resolve as _0x3b7b1d}from'node:path';import{readFileSync as _0x536353}from'node:fs';var h=class extends Error{[_0x3f92f0(0x16d)];[_0x3f92f0(0x149)];constructor(_0x4b3b24,_0x41f367,_0x360d7a,_0x1637fd){const _0x30b811=_0x3f92f0;super(_0x41f367,_0x1637fd),this[_0x30b811(0x16d)]=_0x4b3b24,this[_0x30b811(0x149)]=_0x360d7a,this['name']=_0x30b811(0x144);}};function g(_0x3c7128){return _0x3c7128 instanceof h;}var _=/^[A-Za-z0-9._-]+$/u,v=0xff,y=0x4;function b(_0x5a3dfb){const _0x326aec=_0x3f92f0;return _[_0x326aec(0x118)](_0x5a3dfb)&&_0x5a3dfb!=='.'&&_0x5a3dfb!=='..';}function x(_0xbbcb9e){const _0x5182cb=_0x3f92f0;if(!b(_0xbbcb9e)||_0xbbcb9e[_0x5182cb(0xf1)]('-')||_0xbbcb9e['includes']('--')||_0xbbcb9e[_0x5182cb(0xe5)]>v)throw new h(_0x5182cb(0x169),'Invalid\x20registry\x20ID\x20\x22'+_0xbbcb9e+_0x5182cb(0x158));}function S(_0x18a211){const _0x1bf3af=_0x3f92f0;if(!b(_0x18a211)||_0x18a211['length']+y>v)throw new h(_0x1bf3af(0x157),_0x1bf3af(0x11e)+_0x18a211+'\x22:\x20expected\x20filesystem-safe\x20characters.');}function C(_0x3ebae8){const _0xc891b7=_0x3f92f0;let _0x1e8c28=_0x3ebae8[_0xc891b7(0x129)]('/');if(_0x1e8c28[_0xc891b7(0xe5)]!==0x2||_0x1e8c28[0x0]===''||_0x1e8c28[0x1]==='')throw new h(_0xc891b7(0xd6),_0xc891b7(0x15b)+_0x3ebae8+_0xc891b7(0x108),_0x3ebae8);let _0x356e2a=_0x1e8c28[0x0],_0x465791=_0x1e8c28[0x1];return x(_0x356e2a),S(_0x465791),{'registryId':_0x356e2a,'resourceId':_0x465791};}function ee(_0x4fc680,_0x3e3925){return x(_0x4fc680),S(_0x3e3925),_0x4fc680+'/'+_0x3e3925;}function w(_0x45a14a){const _0xc17152=_0x3f92f0;let {registryId:_0x40a41c,resourceId:_0x59e060}=C(_0x45a14a),_0x3bfe45=_0x40a41c+'--'+_0x59e060+_0xc17152(0xe7);if(_0x3bfe45[_0xc17152(0xe5)]>v)throw new h('resource-export-filename-too-long',_0xc17152(0x16a)+v+'\x20bytes.',_0x45a14a);return _0x3bfe45;}function T(_0x5326cd){const _0xd5f530=_0x3f92f0;return new h(_0xd5f530(0x176),_0xd5f530(0xd2)+_0x5326cd);}function E(_0x4cb784,_0x452bdd){const _0x15a0c2=_0x3f92f0;if(typeof _0x4cb784!='object'||!_0x4cb784||Array[_0x15a0c2(0xd1)](_0x4cb784))throw T(_0x452bdd+_0x15a0c2(0xc5));return _0x4cb784;}function D(_0x2e921f,_0x23d63f,_0x451329=!0x1){const _0x4970a9=_0x3f92f0;if(_0x451329&&_0x2e921f===void 0x0)return[];if(!Array[_0x4970a9(0xd1)](_0x2e921f))throw T(_0x23d63f+_0x4970a9(0x143));return _0x2e921f;}function O(_0x1f08b0,_0x55a8c4){const _0x39bef8=_0x3f92f0;if(typeof _0x1f08b0!=_0x39bef8(0x175)||_0x1f08b0==='')throw T(_0x55a8c4+'\x20must\x20be\x20a\x20non-empty\x20string.');return _0x1f08b0;}function k(_0x59bec4,_0x1f08b3,_0x2380da=!0x1){const _0x5bd75c=_0x3f92f0;return D(_0x59bec4,_0x1f08b3,_0x2380da)[_0x5bd75c(0x120)]((_0x1ffa62,_0x186223)=>O(_0x1ffa62,_0x1f08b3+'['+_0x186223+']'));}function A(_0xd30961,_0x3d17da){const _0x3fc332=_0x3f92f0;return D(_0xd30961,_0x3d17da,!0x0)[_0x3fc332(0x120)]((_0x398ea0,_0x356b7a)=>{const _0x34eb66=_0x3fc332;if(typeof _0x398ea0!=_0x34eb66(0x175))throw T(_0x3d17da+'['+_0x356b7a+']\x20must\x20be\x20a\x20string.');return _0x398ea0;})[_0x3fc332(0x15a)](_0x4c394b=>_0x4c394b!=='');}function j(_0x28f666,_0x4f6124){const _0x9dc5c8=_0x3f92f0;if(typeof _0x28f666!='number'||!Number[_0x9dc5c8(0x116)](_0x28f666))throw T(_0x4f6124+_0x9dc5c8(0x121));return _0x28f666;}function M(_0x630aa1,_0x59d9b8){const _0x4485ef=_0x3f92f0;if(typeof _0x630aa1!=_0x4485ef(0xc3))throw T(_0x59d9b8+'\x20must\x20be\x20a\x20boolean.');return _0x630aa1;}function N(_0x22de5a,_0x535ec1,_0x4fe51f){const _0x1909f7=_0x3f92f0;if(typeof _0x22de5a==_0x1909f7(0x175)&&_0x22de5a!=='')return _0x22de5a;let _0x5d4dea=E(_0x22de5a,_0x535ec1),_0x10de2f=_0x4fe51f===void 0x0?void 0x0:_0x5d4dea[_0x4fe51f];if(typeof _0x10de2f==_0x1909f7(0x175)&&_0x10de2f!=='')return _0x10de2f;let _0xa715ff=_0x5d4dea[_0x1909f7(0x127)];if(typeof _0xa715ff=='string'&&_0xa715ff!=='')return _0xa715ff;let _0x1a3fb4=Object['values'](_0x5d4dea)[_0x1909f7(0x150)](_0x4e56a8=>typeof _0x4e56a8=='string'&&_0x4e56a8!=='');if(_0x1a3fb4!==void 0x0)return _0x1a3fb4;throw T(_0x535ec1+_0x1909f7(0xf9));}function P(_0x733e9f,_0x337d65,_0xd2bb66){const _0x307ddf=_0x3f92f0;try{_0xd2bb66===_0x307ddf(0xc8)?x(_0x733e9f):S(_0x733e9f);}catch(_0x5894c2){throw T(_0x337d65+':\x20'+(_0x5894c2 instanceof Error?_0x5894c2[_0x307ddf(0xe1)]:String(_0x5894c2)));}}function F(_0x23d4f6,_0x5b5ac1,_0x36932f){const _0x300143=_0x3f92f0;let _0x4358a7=new Map();for(let [_0x1eee78,_0x2db4bf]of D(_0x23d4f6,_0x5b5ac1,!0x0)[_0x300143(0xfe)]()){let _0x1c975a=E(_0x2db4bf,_0x5b5ac1+'['+_0x1eee78+']'),_0xa3cebb=O(_0x1c975a['id'],_0x5b5ac1+'['+_0x1eee78+_0x300143(0xe9));if(P(_0xa3cebb,_0x5b5ac1+'['+_0x1eee78+'].id','resource'),_0x4358a7[_0x300143(0x12a)](_0xa3cebb))throw T('Duplicate\x20'+_0x5b5ac1+_0x300143(0x164)+_0xa3cebb+'\x22.');_0x4358a7['set'](_0xa3cebb,N(_0x1c975a['label'],_0x5b5ac1+'['+_0x1eee78+_0x300143(0x103),_0x36932f));}return _0x4358a7;}function I(_0x3f450d,_0x311b9c){const _0x4b2586=_0x3f92f0;let _0x466211=E(_0x3f450d[_0x4b2586(0x106)],_0x311b9c+'.intrinsicSize'),_0x18c894=j(_0x466211[_0x4b2586(0x14f)],_0x311b9c+_0x4b2586(0x180)),_0x480a84=j(_0x466211['height'],_0x311b9c+_0x4b2586(0x16e));if(_0x18c894<=0x0||_0x480a84<=0x0)throw T(_0x311b9c+_0x4b2586(0xcb));return{'width':_0x18c894,'height':_0x480a84};}function L(_0x5d0a5c,_0x55b40c){const _0xde957=_0x3f92f0;if(_0x5d0a5c[_0xde957(0x136)]!==_0xde957(0x171))throw T(_0x55b40c+_0xde957(0xfc));if(_0x5d0a5c[_0xde957(0x11b)]!=='reference')throw T(_0x55b40c+'.storagePolicy\x20must\x20be\x20\x22reference\x22.');let _0x1e876a=E(_0x5d0a5c[_0xde957(0x10a)],_0x55b40c+_0xde957(0x117));if(_0x1e876a[_0xde957(0x136)]!==_0xde957(0xf0))throw T(_0x55b40c+_0xde957(0x178));let _0x508e20=O(_0x1e876a['value'],_0x55b40c+_0xde957(0x13d)),_0x885651;try{_0x885651=new URL(_0x508e20);}catch{throw T(_0x55b40c+_0xde957(0x10c));}if(_0x885651[_0xde957(0x163)]!==_0xde957(0xc0))throw T(_0x55b40c+_0xde957(0x168));return _0x508e20;}function R(_0xda69f3){const _0x47a860=_0x3f92f0;return _0xda69f3[_0x47a860(0xcd)]('NFKC')[_0x47a860(0x109)]()[_0x47a860(0x159)]()[_0x47a860(0x105)](/\s+/gu,'\x20');}function z(_0x41e0f3){const _0x3beda6=_0x3f92f0;let _0x2b0983=E(_0x41e0f3,_0x3beda6(0x133)),_0x48805c=new Map(),_0x9bab84=new Map(),_0x35169e=[],_0x599098=[],_0x577277=new Set(),_0x281462=0x0;for(let [_0x1e71ae,_0x438b13]of D(_0x2b0983['registrations'],_0x3beda6(0x17f))['entries']()){let _0x247b42=E(E(_0x438b13,'registrations['+_0x1e71ae+']')['input'],_0x3beda6(0x13e)+_0x1e71ae+'].input'),_0x11d243=O(_0x247b42['registryId'],'registrations['+_0x1e71ae+'].input.registryId');if(P(_0x11d243,_0x3beda6(0x13e)+_0x1e71ae+_0x3beda6(0x104),'registry'),_0x48805c[_0x3beda6(0x12a)](_0x11d243))throw T(_0x3beda6(0xfb)+_0x11d243+'\x22.');let _0x3be7b5=_0x247b42[_0x3beda6(0xce)]===void 0x0?void 0x0:O(_0x247b42['defaultLocale'],_0x3beda6(0x13e)+_0x1e71ae+'].input.defaultLocale'),_0x27a8cb=F(_0x247b42['groups'],_0x3beda6(0x13e)+_0x1e71ae+_0x3beda6(0x101),_0x3be7b5),_0x6d2f57=F(_0x247b42[_0x3beda6(0xd8)],'registrations['+_0x1e71ae+_0x3beda6(0x126),_0x3be7b5),_0x21449a=[];for(let [_0x497200,_0x4943a6]of D(_0x247b42['resources'],'registrations['+_0x1e71ae+_0x3beda6(0x119))[_0x3beda6(0xfe)]()){let _0x2f8d82=_0x3beda6(0x13e)+_0x1e71ae+_0x3beda6(0x179)+_0x497200+']',_0x6be24f=E(_0x4943a6,_0x2f8d82),_0x3d9a2b=O(_0x6be24f['id'],_0x2f8d82+_0x3beda6(0x177));P(_0x3d9a2b,_0x2f8d82+_0x3beda6(0x177),_0x3beda6(0x17c));let _0x1c7372=ee(_0x11d243,_0x3d9a2b);if(_0x9bab84['has'](_0x1c7372))throw T('Duplicate\x20resource\x20handle\x20\x22'+_0x1c7372+'\x22.');let _0x31e968;try{_0x31e968=w(_0x1c7372);}catch(_0x2fd1b1){throw T(_0x2f8d82+':\x20'+(_0x2fd1b1 instanceof Error?_0x2fd1b1[_0x3beda6(0xe1)]:String(_0x2fd1b1)));}if(_0x577277[_0x3beda6(0x12a)](_0x31e968))throw T('Duplicate\x20export\x20filename\x20\x22'+_0x31e968+'\x22.');_0x577277['add'](_0x31e968);let _0x1f78a4=_0x6be24f['groupId']===void 0x0?void 0x0:O(_0x6be24f['groupId'],_0x2f8d82+_0x3beda6(0x137));if(_0x1f78a4!==void 0x0&&!_0x27a8cb[_0x3beda6(0x12a)](_0x1f78a4))throw T(_0x2f8d82+_0x3beda6(0x13b)+_0x1f78a4+'\x22.');let _0xb9a6f6=k(_0x6be24f[_0x3beda6(0xf5)],_0x2f8d82+_0x3beda6(0xcc),!0x0);for(let _0x28613e of _0xb9a6f6)if(!_0x6d2f57[_0x3beda6(0x12a)](_0x28613e))throw T(_0x2f8d82+'.tagIds\x20references\x20unknown\x20tag\x20\x22'+_0x28613e+'\x22.');let _0x86a427=A(_0x6be24f[_0x3beda6(0x112)],_0x2f8d82+'.keywords'),_0x49dd4c=N(_0x6be24f[_0x3beda6(0x130)],_0x2f8d82+'.name',_0x3be7b5),_0x2433c9=_0x6be24f[_0x3beda6(0xe4)]===void 0x0?void 0x0:N(_0x6be24f[_0x3beda6(0xe4)],_0x2f8d82+_0x3beda6(0x16b),_0x3be7b5),_0x1edbb2=_0x1f78a4===void 0x0?null:{'id':_0x1f78a4,'label':_0x27a8cb[_0x3beda6(0x17e)](_0x1f78a4)},_0x555308=_0xb9a6f6[_0x3beda6(0x120)](_0x2b334b=>({'id':_0x2b334b,'label':_0x6d2f57['get'](_0x2b334b)})),_0x4d054b=E(_0x6be24f['payload'],_0x2f8d82+'.payload'),_0xb3339c=_0x6be24f[_0x3beda6(0xc7)]===void 0x0?null:j(_0x6be24f[_0x3beda6(0xc7)],_0x2f8d82+_0x3beda6(0x124)),_0x28fea9=M(_0x4d054b[_0x3beda6(0xd0)],_0x2f8d82+_0x3beda6(0xfd)),_0x294e2d={'handle':_0x1c7372,'registryId':_0x11d243,'id':_0x3d9a2b,'name':_0x49dd4c,..._0x2433c9===void 0x0?{}:{'description':_0x2433c9},'group':_0x1edbb2,'tags':_0x555308,'keywords':_0x86a427,'order':_0xb3339c,'intrinsicSize':I(_0x4d054b,_0x2f8d82+_0x3beda6(0xca)),'colorEditable':_0x28fea9,'sourceUrl':L(_0x4d054b,_0x2f8d82+'.payload'),'registrationIndex':_0x1e71ae,'resourceIndex':_0x497200,'globalIndex':_0x281462,'searchText':R([_0x49dd4c,_0x2433c9,_0x1edbb2?.[_0x3beda6(0x11f)],..._0x555308[_0x3beda6(0x120)](_0x47efef=>_0x47efef[_0x3beda6(0x11f)]),..._0x86a427][_0x3beda6(0x15a)](_0x3ff654=>_0x3ff654!==void 0x0)[_0x3beda6(0xbf)]('\x20'))};_0x281462++,_0x21449a[_0x3beda6(0x138)](_0x294e2d),_0x599098[_0x3beda6(0x138)](_0x294e2d),_0x9bab84['set'](_0x1c7372,_0x294e2d);}let _0x563840={'id':_0x11d243,'groups':_0x27a8cb,'tags':_0x6d2f57,'resources':_0x21449a};_0x35169e[_0x3beda6(0x138)](_0x563840),_0x48805c[_0x3beda6(0x17d)](_0x11d243,_0x563840);}if(_0x35169e[_0x3beda6(0xe5)]===0x0)throw T(_0x3beda6(0x174));return{'registries':_0x35169e,'registryById':_0x48805c,'resourceByHandle':_0x9bab84,'resources':_0x599098};}function B(_0x161149,_0x137931){const _0x5e9ffe=_0x3f92f0;C(_0x137931);let _0x5a7b23=_0x161149[_0x5e9ffe(0xc9)][_0x5e9ffe(0x17e)](_0x137931);if(_0x5a7b23===void 0x0)throw new h('resource-not-found',_0x5e9ffe(0x139)+_0x137931+'\x22;\x20try\x20resources\x20find\x20<query>.',_0x137931);return _0x5a7b23;}function te(_0x5b1220){const _0x11dbf8=_0x3f92f0;return _0x5b1220[_0x11dbf8(0x11a)][_0x11dbf8(0x120)](_0x50a88b=>({'id':_0x50a88b['id'],'resourceCount':_0x50a88b[_0x11dbf8(0xf4)][_0x11dbf8(0xe5)],'groupCount':_0x50a88b['groups']['size'],'tagCount':_0x50a88b['tags']['size'],'colorEditableCount':_0x50a88b['resources'][_0x11dbf8(0x15a)](_0x32f6b0=>_0x32f6b0[_0x11dbf8(0xd0)])[_0x11dbf8(0xe5)]}));}function ne(_0xb333cc){const _0xd446e8=_0x3f92f0;return{'handle':_0xb333cc[_0xd446e8(0x149)],'registryId':_0xb333cc[_0xd446e8(0xec)],'id':_0xb333cc['id'],'name':_0xb333cc['name'],'group':_0xb333cc[_0xd446e8(0x11c)],'tags':_0xb333cc[_0xd446e8(0xd8)],'keywords':_0xb333cc[_0xd446e8(0x112)],'order':_0xb333cc[_0xd446e8(0xc7)],'intrinsicSize':_0xb333cc[_0xd446e8(0x106)],'colorEditable':_0xb333cc[_0xd446e8(0xd0)]};}function re(_0x49ada4,_0x490460){const _0x48038f=_0x3f92f0;let _0x3a5bcf=(_0x49ada4[_0x48038f(0xc7)]??_0x49ada4[_0x48038f(0x132)])-(_0x490460[_0x48038f(0xc7)]??_0x490460[_0x48038f(0x132)]);if(_0x3a5bcf!==0x0)return _0x3a5bcf;let _0x4a4e64=_0x49ada4[_0x48038f(0xe6)]-_0x490460['registrationIndex'];if(_0x4a4e64!==0x0)return _0x4a4e64;let _0x3306eb=_0x49ada4[_0x48038f(0xff)]-_0x490460[_0x48038f(0xff)];return _0x3306eb===0x0?_0x49ada4[_0x48038f(0x149)]['localeCompare'](_0x490460[_0x48038f(0x149)]):_0x3306eb;}function ie(_0x518371,_0x5521fd){const _0x36157d=_0x3f92f0;let _0x3c84e9=_0x5521fd[_0x36157d(0xed)][_0x36157d(0x120)](R)[_0x36157d(0x15a)](_0x2bf552=>_0x2bf552!=='');if(_0x3c84e9[_0x36157d(0xe5)]===0x0)throw new h(_0x36157d(0x14c),'Resource\x20search\x20needs\x20at\x20least\x20one\x20non-empty\x20query.');let _0x438ff7=new Set(_0x5521fd['registries']??[]);for(let _0xdb5510 of _0x438ff7)if(!_0x518371[_0x36157d(0x142)]['has'](_0xdb5510))throw new h(_0x36157d(0x186),_0x36157d(0xf3)+_0xdb5510+'\x22.');let _0x54b763=_0x5521fd[_0x36157d(0x123)]??_0x518371[_0x36157d(0xf4)][_0x36157d(0xe5)];if(!Number[_0x36157d(0x181)](_0x54b763)||_0x54b763<0x1)throw new h('resource-limit-invalid','Resource\x20search\x20limit\x20must\x20be\x20a\x20positive\x20integer;\x20received\x20\x22'+_0x54b763+'\x22.');let _0x25682a=_0x518371[_0x36157d(0xf4)]['filter'](_0xb893cc=>_0x438ff7[_0x36157d(0x147)]===0x0||_0x438ff7[_0x36157d(0x12a)](_0xb893cc[_0x36157d(0xec)]))['filter'](_0xe12e1d=>_0x3c84e9[_0x36157d(0x12d)](_0x2c9f70=>_0xe12e1d[_0x36157d(0x154)][_0x36157d(0x115)](_0x2c9f70)))['sort'](re);return{'resources':_0x25682a['slice'](0x0,_0x54b763)[_0x36157d(0x120)](ne),'total':_0x25682a[_0x36157d(0xe5)]};}function V(_0x1a7bfa){const _0x56798c=_0x3f92f0;return/^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[^]*?-->\s*)*<svg(?:\s|>)/iu[_0x56798c(0x118)](_0x1a7bfa);}function H(_0x2e51c0,_0x4d3aa4){const _0x362052=_0x3f92f0;return g(_0x4d3aa4)?{'handle':_0x2e51c0,'code':_0x4d3aa4[_0x362052(0x16d)],'message':_0x4d3aa4[_0x362052(0xe1)]}:{'handle':_0x2e51c0,'code':_0x362052(0x110),'message':_0x4d3aa4 instanceof Error?_0x4d3aa4[_0x362052(0xe1)]:String(_0x4d3aa4)};}var U=class{[_0x3f92f0(0x182)];[_0x3f92f0(0xd9)];constructor(_0x3244e9){const _0x92fe1b=_0x3f92f0;this[_0x92fe1b(0x182)]=_0x3244e9,this[_0x92fe1b(0xd9)]=z(_0x3244e9['manifest']);}get[_0x3f92f0(0xe3)](){const _0x44faa6=_0x3f92f0;return this['options']['cache'][_0x44faa6(0x183)];}[_0x3f92f0(0x102)](){const _0x263110=_0x3f92f0;return te(this[_0x263110(0xd9)]);}[_0x3f92f0(0x150)](_0x146dd6){const _0x3aaadc=_0x3f92f0;return ie(this[_0x3aaadc(0xd9)],_0x146dd6);}async[_0x3f92f0(0x14a)](_0x21eaec){const _0x42f80e=_0x3f92f0;let _0x113e4e=B(this['catalog'],_0x21eaec[_0x42f80e(0x149)]),_0x30a0a2=await this['options'][_0x42f80e(0xc2)][_0x42f80e(0x14a)](_0x21eaec['handle']);if(_0x30a0a2!==void 0x0&&V(_0x30a0a2))return{'handle':_0x21eaec[_0x42f80e(0x149)],'svg':_0x30a0a2};let _0x14c50e;try{_0x14c50e=await this[_0x42f80e(0x182)]['downloader'][_0x42f80e(0x172)](_0x113e4e['sourceUrl']);}catch(_0x2f0c24){throw g(_0x2f0c24)?_0x2f0c24:new h(_0x42f80e(0x12f),_0x42f80e(0x128)+_0x21eaec[_0x42f80e(0x149)]+'\x22:\x20'+(_0x2f0c24 instanceof Error?_0x2f0c24[_0x42f80e(0xe1)]:String(_0x2f0c24)),_0x21eaec[_0x42f80e(0x149)],{'cause':_0x2f0c24});}if(!V(_0x14c50e))throw new h(_0x42f80e(0x151),_0x42f80e(0x16f)+_0x21eaec['handle']+_0x42f80e(0x153),_0x21eaec[_0x42f80e(0x149)]);return await this[_0x42f80e(0x182)][_0x42f80e(0xc2)]['write'](_0x21eaec['handle'],_0x14c50e),{'handle':_0x21eaec[_0x42f80e(0x149)],'svg':_0x14c50e};}async[_0x3f92f0(0x184)](_0x184ed5){const _0x3c942f=_0x3f92f0;let _0x1a3d09=[],_0x50e33a=[];for(let _0x18c744 of _0x184ed5[_0x3c942f(0x12b)])try{let {svg:_0x15d564}=await this[_0x3c942f(0x14a)]({'handle':_0x18c744}),_0x39445b=await this[_0x3c942f(0x182)][_0x3c942f(0x14e)][_0x3c942f(0x135)](_0x184ed5[_0x3c942f(0x114)],w(_0x18c744),_0x15d564);_0x1a3d09[_0x3c942f(0x138)]({'handle':_0x18c744,'path':_0x39445b});}catch(_0x5752fc){_0x50e33a[_0x3c942f(0x138)](H(_0x18c744,_0x5752fc));}return{'exported':_0x1a3d09,'failed':_0x50e33a};}async[_0x3f92f0(0x11d)](){const _0x59a75d=_0x3f92f0;return await this[_0x59a75d(0x182)]['cache'][_0x59a75d(0x146)]();}};function W(_0x450b34){return new U(_0x450b34);}function G(_0x2899ed){const _0x4b9725=_0x3f92f0;return _0x2899ed instanceof Error&&_0x4b9725(0x16d)in _0x2899ed;}function K(_0x5a5ed3){const _0x290656=_0x3f92f0;let _0x508e6f=_0x3b7b1d(_0x5a5ed3);if(!_0x1f49fc(_0x5a5ed3)||_0x508e6f===_0x123e1d(_0x508e6f)[_0x290656(0xf8)])throw new h(_0x290656(0xe0),_0x290656(0x160)+_0x5a5ed3+'\x22.');return _0x508e6f;}async function q(_0x2c2094){const _0x33b3e3=_0x3f92f0;let _0x15b2f6;try{_0x15b2f6=await _0x2f77cd(_0x2c2094,{'withFileTypes':!0x0});}catch(_0x435e94){if(G(_0x435e94)&&_0x435e94[_0x33b3e3(0x16d)]===_0x33b3e3(0xe8))return{'resourceCount':0x0,'byteCount':0x0};throw _0x435e94;}let _0x14be52=0x0,_0x4a8be2=0x0;for(let _0xcbac22 of _0x15b2f6){let _0x5675c1=_0x3f572f(_0x2c2094,_0xcbac22[_0x33b3e3(0x130)]);if(_0xcbac22[_0x33b3e3(0x107)]()){let _0x1da3ed=await q(_0x5675c1);_0x14be52+=_0x1da3ed[_0x33b3e3(0xe2)],_0x4a8be2+=_0x1da3ed[_0x33b3e3(0xf6)];}else{if(_0xcbac22[_0x33b3e3(0xd7)]()&&_0xcbac22[_0x33b3e3(0x130)]['endsWith'](_0x33b3e3(0xe7))){let _0xadeb09=await _0x4ba3bd(_0x5675c1);_0x14be52++,_0x4a8be2+=_0xadeb09[_0x33b3e3(0x147)];}}}return{'resourceCount':_0x14be52,'byteCount':_0x4a8be2};}var J=class{[_0x3f92f0(0x183)];constructor(_0x219b02){const _0x2d4117=_0x3f92f0;this[_0x2d4117(0x183)]=K(_0x219b02);}[_0x3f92f0(0x12e)](_0x1f5ccc){const _0x734d10=_0x3f92f0;let {registryId:_0x1ad64d,resourceId:_0x455b9a}=C(_0x1f5ccc);return _0x3f572f(this[_0x734d10(0x183)],_0x1ad64d,_0x455b9a+_0x734d10(0xe7));}async[_0x3f92f0(0x14a)](_0x2a489f){const _0x4f66cb=_0x3f92f0;try{return await _0x34d870(this[_0x4f66cb(0x12e)](_0x2a489f),_0x4f66cb(0xf7));}catch(_0x20a515){if(G(_0x20a515)&&_0x20a515[_0x4f66cb(0x16d)]===_0x4f66cb(0xe8))return;throw _0x20a515;}}async['write'](_0x3ab2a1,_0x4e0435){const _0x285134=_0x3f92f0;let _0x468ca6=this[_0x285134(0x12e)](_0x3ab2a1);await _0x4b17cb(_0x4a23b9(_0x468ca6),{'recursive':!0x0});let _0x97b269=_0x3f572f(_0x4a23b9(_0x468ca6),_0x285134(0xdf)+process[_0x285134(0x14b)]+'-'+_0x107d76()+_0x285134(0xd5));try{await _0x4cdfd2(_0x97b269,_0x4e0435,{'encoding':_0x285134(0xf7),'mode':0x180}),await _0x5ab312(_0x97b269,_0x468ca6);}catch(_0x7f8536){throw await _0x534074(_0x97b269)[_0x285134(0x15e)](()=>void 0x0),_0x7f8536;}}async[_0x3f92f0(0x146)](){const _0x4c0944=_0x3f92f0;let _0x37daa8=await q(this['location']);return await _0x56af72(this[_0x4c0944(0x183)],{'force':!0x0,'recursive':!0x0}),{'path':this['location'],..._0x37daa8};}},Y=class{async['write'](_0x113906,_0xff4907,_0x423f39){const _0x240277=_0x3f92f0;await _0x4b17cb(_0x113906,{'recursive':!0x0});let _0x3247c2=_0x3f572f(_0x113906,_0xff4907);return await _0x4cdfd2(_0x3247c2,_0x423f39,_0x240277(0xf7)),_0x3247c2;}},X=0x7530,ae=0xa00000,oe=0xa,se=new Set([0x12d,0x12e,0x12f,0x133,0x134]);function Z(_0x3ce255){const _0x543656=_0x3f92f0;return new h(_0x543656(0xdc),_0x543656(0x10d)+_0x3ce255+_0x543656(0x141));}async function ce(_0x180719,_0x516af0){const _0x14379e=_0x3f92f0;let _0x549780=Number(_0x180719['headers']['get'](_0x14379e(0x167)));if(Number[_0x14379e(0x116)](_0x549780)&&_0x549780>_0x516af0)throw Z(_0x516af0);if(_0x180719[_0x14379e(0x155)]===null){let _0x35ae2c=await _0x180719[_0x14379e(0x140)]();if(Buffer['byteLength'](_0x35ae2c)>_0x516af0)throw Z(_0x516af0);return _0x35ae2c;}let _0x4d7eba=_0x180719[_0x14379e(0x155)][_0x14379e(0x17b)](),_0x3be087=[],_0x27bb7a=0x0;try{for(;;){let _0x3e6e8d=await _0x4d7eba[_0x14379e(0x14a)]();if(_0x3e6e8d[_0x14379e(0x170)])break;if(_0x27bb7a+=_0x3e6e8d[_0x14379e(0x166)]['byteLength'],_0x27bb7a>_0x516af0)throw await _0x4d7eba[_0x14379e(0xee)]()[_0x14379e(0x15e)](()=>void 0x0),Z(_0x516af0);_0x3be087['push'](_0x3e6e8d[_0x14379e(0x166)]);}}finally{_0x4d7eba['releaseLock']();}try{return new TextDecoder(_0x14379e(0x100),{'fatal':!0x0})[_0x14379e(0x131)](Buffer['concat'](_0x3be087,_0x27bb7a));}catch{throw new h(_0x14379e(0xc1),_0x14379e(0x113));}}var Q=class{[_0x3f92f0(0x185)];[_0x3f92f0(0xfa)];['maxBytes'];[_0x3f92f0(0x162)];constructor(_0x5100bc={}){const _0x26bb00=_0x3f92f0;this[_0x26bb00(0x185)]=_0x5100bc[_0x26bb00(0x17a)]??fetch,this[_0x26bb00(0xfa)]=_0x5100bc['timeoutMs']??X,this['maxBytes']=_0x5100bc[_0x26bb00(0x13a)]??ae,this[_0x26bb00(0x162)]=_0x5100bc[_0x26bb00(0x162)]??oe;}async[_0x3f92f0(0x172)](_0x30af96){const _0x5f61b3=_0x3f92f0;let _0x3e92dd=new URL(_0x30af96);if(_0x3e92dd['protocol']!==_0x5f61b3(0xc0))throw new h(_0x5f61b3(0x152),_0x5f61b3(0x13f));let _0x4699a6=new AbortController(),_0x369d41=setTimeout(()=>_0x4699a6['abort'](),this[_0x5f61b3(0xfa)]);try{let _0x2629b4=_0x3e92dd;for(let _0x26f7e1=0x0;;_0x26f7e1++){let _0x542b91=await this[_0x5f61b3(0x185)](_0x2629b4,{'redirect':_0x5f61b3(0xc4),'signal':_0x4699a6[_0x5f61b3(0x125)]});if(se[_0x5f61b3(0x12a)](_0x542b91[_0x5f61b3(0xdd)])){if(_0x26f7e1>=this[_0x5f61b3(0x162)])throw new h(_0x5f61b3(0x10e),_0x5f61b3(0xda)+this[_0x5f61b3(0x162)]+'.');let _0x4c47cc=_0x542b91[_0x5f61b3(0x122)][_0x5f61b3(0x17e)](_0x5f61b3(0x183));if(_0x4c47cc===null)throw new h(_0x5f61b3(0xf2),_0x5f61b3(0xcf)+_0x542b91[_0x5f61b3(0xdd)]+_0x5f61b3(0x13c));let _0x20068a;try{_0x20068a=new URL(_0x4c47cc,_0x2629b4);}catch{throw new h('resource-download-invalid-redirect',_0x5f61b3(0xdb));}if(_0x20068a[_0x5f61b3(0x163)]!==_0x5f61b3(0xc0))throw new h(_0x5f61b3(0x148),_0x5f61b3(0xd3));_0x2629b4=_0x20068a;continue;}if(!_0x542b91['ok'])throw new h(_0x5f61b3(0x15d),_0x5f61b3(0xcf)+_0x542b91[_0x5f61b3(0xdd)]+'.');if(_0x542b91[_0x5f61b3(0xf0)]!==''&&new URL(_0x542b91[_0x5f61b3(0xf0)])[_0x5f61b3(0x163)]!==_0x5f61b3(0xc0))throw new h(_0x5f61b3(0x148),_0x5f61b3(0xd3));let _0x1032c7=await ce(_0x542b91,this[_0x5f61b3(0x13a)]);if(!V(_0x1032c7))throw new h(_0x5f61b3(0x173),'Resource\x20response\x20is\x20not\x20an\x20SVG\x20document.');return _0x1032c7;}}catch(_0x1f909f){throw _0x4699a6[_0x5f61b3(0x125)][_0x5f61b3(0x12c)]?new h(_0x5f61b3(0x165),_0x5f61b3(0x15f)+this[_0x5f61b3(0xfa)]+_0x5f61b3(0x156)):_0x1f909f;}finally{clearTimeout(_0x369d41);}}};function $(_0x2d2ba3){const _0x43192e=_0x3f92f0;try{return JSON[_0x43192e(0xef)](_0x536353(_0x2d2ba3,_0x43192e(0xf7)));}catch(_0x4b923d){throw new h(_0x43192e(0xea),_0x43192e(0x134)+_0x2d2ba3+':\x20'+(_0x4b923d instanceof Error?_0x4b923d[_0x43192e(0xe1)]:String(_0x4b923d)),void 0x0,{'cause':_0x4b923d});}}function _0x4e73(_0x2fe384,_0x3baf2b){_0x2fe384=_0x2fe384-0xbf;const _0x2d3ef0=_0x2d3e();let _0x4e730e=_0x2d3ef0[_0x2fe384];return _0x4e730e;}function le(_0x4afebd){const _0x53fa61=_0x3f92f0;let _0x4697e8;return()=>(_0x4697e8??=W({'manifest':$(_0x4afebd['manifestPath']),'cache':new J(_0x4afebd[_0x53fa61(0x10b)]),'downloader':new Q(_0x4afebd['downloader']),'output':new Y()}),_0x4697e8);}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};
|