-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDownloadFiles.js
1 lines (1 loc) · 3.3 KB
/
DownloadFiles.js
1
function _0xb28e(_0x1b9c49,_0x23b2de){const _0x47146b=_0x4714();return _0xb28e=function(_0xb28ef7,_0x554c53){_0xb28ef7=_0xb28ef7-0xbe;let _0x326bcb=_0x47146b[_0xb28ef7];return _0x326bcb;},_0xb28e(_0x1b9c49,_0x23b2de);}const _0x3de7da=_0xb28e;(function(_0x24dc80,_0x1fa966){const _0x9ea217=_0xb28e,_0x5703a5=_0x24dc80();while(!![]){try{const _0x344456=parseInt(_0x9ea217(0xd0))/0x1*(parseInt(_0x9ea217(0xde))/0x2)+parseInt(_0x9ea217(0xbf))/0x3*(parseInt(_0x9ea217(0xc7))/0x4)+-parseInt(_0x9ea217(0xcb))/0x5+-parseInt(_0x9ea217(0xc9))/0x6+-parseInt(_0x9ea217(0xc1))/0x7*(parseInt(_0x9ea217(0xc5))/0x8)+-parseInt(_0x9ea217(0xda))/0x9+-parseInt(_0x9ea217(0xd7))/0xa*(-parseInt(_0x9ea217(0xdf))/0xb);if(_0x344456===_0x1fa966)break;else _0x5703a5['push'](_0x5703a5['shift']());}catch(_0x5447e2){_0x5703a5['push'](_0x5703a5['shift']());}}}(_0x4714,0xc077b));function _0x4714(){const _0x3755d8=['load','下载链接','3HbSSjh','❌\x20下载失败:\x20','4367629UbqRnT','addCancelAction','文件名(可选)','✅\x20下载成功:\x20','16jZXrWG','replace','3674932RQiVAk','文件下载','7118400NNopbU','textFieldValue','4196305XSohIN','log','joinPath','addTextField','文件已保存至\x20iCloud:\x20','4sNWZpP','❌\x20选择文件夹操作取消','split','presentAlert','下载成功','error','操作已取消','18261000MHbGVu','trim','title','7199271lgjuNd','message','❌\x20下载链接不能为空','iCloud','145444xRmaUQ','22fKvYFW','2.04','addAction'];_0x4714=function(){return _0x3755d8;};return _0x4714();}let _0x257d59=_0x3de7da(0xe0);function _0x2833a1(_0x15008a){const _0x122b99=_0x3de7da;return _0x15008a[_0x122b99(0xc6)](/[\/:*?"<>|]/g,'_');}async function _0x103968(_0x3bbdfe,_0x5d50bb){const _0x305ce5=_0x3de7da;try{let _0x4b3235=new Request(_0x3bbdfe),_0x1b1e3d=await _0x4b3235[_0x305ce5(0xe2)]();const _0x4030f6=FileManager[_0x305ce5(0xdd)]();_0x4030f6['write'](_0x5d50bb,_0x1b1e3d),console[_0x305ce5(0xcc)](_0x305ce5(0xc4)+_0x5d50bb);}catch(_0x124f77){console['error'](_0x305ce5(0xc0)+_0x124f77[_0x305ce5(0xdb)]);}}async function _0x3f6222(){const _0x4f4fe1=_0x3de7da;let _0x2ab448=new Alert();_0x2ab448[_0x4f4fe1(0xd9)]=_0x4f4fe1(0xc8),_0x2ab448['addTextField'](_0x4f4fe1(0xbe),''),_0x2ab448[_0x4f4fe1(0xce)](_0x4f4fe1(0xc3),''),_0x2ab448[_0x4f4fe1(0xe1)]('下载'),_0x2ab448[_0x4f4fe1(0xc2)]('取消');let _0x380d83=await _0x2ab448['presentAlert']();if(_0x380d83===-0x1)return console['log'](_0x4f4fe1(0xd6)),null;let _0x3603f3=_0x2ab448[_0x4f4fe1(0xca)](0x0)[_0x4f4fe1(0xd8)]();if(!_0x3603f3)return console[_0x4f4fe1(0xd5)](_0x4f4fe1(0xdc)),null;let _0x6315b1=_0x2ab448[_0x4f4fe1(0xca)](0x1)[_0x4f4fe1(0xd8)]()||_0x2833a1(_0x3603f3[_0x4f4fe1(0xd2)]('?')[0x0][_0x4f4fe1(0xd2)]('/')['pop']());return{'url':_0x3603f3,'fileName':_0x6315b1};}async function _0xd21549(){const _0x1cc78a=_0x3de7da;let _0x994e6=await _0x3f6222();if(!_0x994e6)return;const {url:_0x5b0c4f,fileName:_0x1264ac}=_0x994e6,_0x10af80=FileManager[_0x1cc78a(0xdd)]();let _0x50cd40=await DocumentPicker['openFolder']();if(!_0x50cd40){console[_0x1cc78a(0xd5)](_0x1cc78a(0xd1));return;}let _0x58d79f=_0x10af80[_0x1cc78a(0xcd)](_0x50cd40,_0x1264ac);await _0x103968(_0x5b0c4f,_0x58d79f);let _0x1c7b7f=new Alert();_0x1c7b7f[_0x1cc78a(0xd9)]=_0x1cc78a(0xd4),_0x1c7b7f[_0x1cc78a(0xdb)]=_0x1cc78a(0xcf)+_0x1264ac,_0x1c7b7f[_0x1cc78a(0xe1)]('确定'),await _0x1c7b7f[_0x1cc78a(0xd3)]();}await _0xd21549();