UNPKG

@picoxr/web-cli-core

Version:

Core Library to generate, build and sign TWA projects

1 lines 18.1 kB
'use strict';const _0x296d34=_0x78f5;(function(_0x90d51f,_0x4328f2){const _0x41a4ea=_0x78f5,_0x37a35d=_0x90d51f();while(!![]){try{const _0x3847b5=-parseInt(_0x41a4ea(0xee))/0x1*(parseInt(_0x41a4ea(0xac))/0x2)+parseInt(_0x41a4ea(0x103))/0x3*(parseInt(_0x41a4ea(0x11f))/0x4)+-parseInt(_0x41a4ea(0xda))/0x5+parseInt(_0x41a4ea(0x115))/0x6*(-parseInt(_0x41a4ea(0x12c))/0x7)+-parseInt(_0x41a4ea(0xf9))/0x8*(parseInt(_0x41a4ea(0x110))/0x9)+-parseInt(_0x41a4ea(0x12f))/0xa+parseInt(_0x41a4ea(0x137))/0xb*(parseInt(_0x41a4ea(0x13f))/0xc);if(_0x3847b5===_0x4328f2)break;else _0x37a35d['push'](_0x37a35d['shift']());}catch(_0x101bbe){_0x37a35d['push'](_0x37a35d['shift']());}}}(_0x366a,0xb42bc));function _0x78f5(_0x50bb84,_0x4ddfba){const _0x366ab9=_0x366a();return _0x78f5=function(_0x78f56d,_0xe7c1db){_0x78f56d=_0x78f56d-0xa1;let _0x2f2561=_0x366ab9[_0x78f56d];return _0x2f2561;},_0x78f5(_0x50bb84,_0x4ddfba);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[_0x296d34(0xfc)]=void 0x0;const path=require(_0x296d34(0xd4)),fs=require('fs'),util_1=require(_0x296d34(0x100)),CustomError_1=require(_0x296d34(0xa2)),ImageHelper_1=require(_0x296d34(0xea)),FeatureManager_1=require(_0x296d34(0x119)),util_2=require(_0x296d34(0x121)),FetchUtils_1_1=require(_0x296d34(0x132)),lodash_1=require(_0x296d34(0x124)),COPY_FILE_LIST=[_0x296d34(0xad),_0x296d34(0xd2),_0x296d34(0x13c),'gradlew.bat',_0x296d34(0x10f),_0x296d34(0xf8),'app/src/main/res/values/colors.xml',_0x296d34(0xf2),_0x296d34(0xa9),_0x296d34(0xf0),_0x296d34(0xd5)],TEMPLATE_FILE_LIST=['build.gradle',_0x296d34(0x134),_0x296d34(0xb5),'app/src/main/res/values/strings.xml'],JAVA_DIR=_0x296d34(0xe5),JAVA_FILE_LIST=[_0x296d34(0xd8),_0x296d34(0xed),'DelegationService.java'],DELETE_PROJECT_FILE_LIST=[_0x296d34(0xad),_0x296d34(0xd2),_0x296d34(0x101),_0x296d34(0x13c),_0x296d34(0x11d),_0x296d34(0x129),_0x296d34(0xe9),_0x296d34(0x102),'app-release-signed.apk','app-release-signed.apk.idsig','app-release-unsigned-aligned.apk',_0x296d34(0xf6)],DELETE_FILE_LIST=[_0x296d34(0xf0)],IMAGES=[{'dest':_0x296d34(0xc0),'size':0x30},{'dest':'app/src/main/res/mipmap-hdpi/ic_launcher.png','size':0x48},{'dest':_0x296d34(0x112),'size':0x60},{'dest':_0x296d34(0xc2),'size':0x90},{'dest':_0x296d34(0xba),'size':0xc0},{'dest':_0x296d34(0x129),'size':0x200}],ADAPTIVE_IMAGES=[{'dest':_0x296d34(0xfb),'size':0x52},{'dest':_0x296d34(0xd1),'size':0x7b},{'dest':_0x296d34(0xd7),'size':0xa4},{'dest':_0x296d34(0xd9),'size':0xf6},{'dest':'app/src/main/res/mipmap-xxxhdpi/ic_maskable.png','size':0x148}],NOTIFICATION_IMAGES=[{'dest':'app/src/main/res/drawable-mdpi/ic_notification_icon.png','size':0x18},{'dest':_0x296d34(0xa5),'size':0x24},{'dest':_0x296d34(0xaa),'size':0x30},{'dest':_0x296d34(0x120),'size':0x48},{'dest':_0x296d34(0xb3),'size':0x60}],WEB_MANIFEST_LOCATION='/app/src/main/res/raw/',WEB_MANIFEST_FILE_NAME=_0x296d34(0xa3);function shortcutMaskableTemplateFileMap(_0x277795){const _0x16056c=_0x296d34;return{'app/src/main/res/drawable-anydpi-v26/shortcut_maskable.xml':_0x16056c(0xcf)+_0x277795+_0x16056c(0x10a)};}function _0x366a(){const _0x1b8806=['ImageHelper','binary','chosenMonochromeIconUrl','app/src/main/res/xml/shortcuts.xml','app/src/main/res/drawable-xhdpi/ic_notification_icon.png','update','2ZEuXoA','settings.gradle','chosenIconUrl','generateShortcuts','imageHelper','join','shareTarget','app/src/main/res/drawable-xxxhdpi/ic_notification_icon.png','headers','app/src/main/AndroidManifest.xml','chosenMaskableIconUrl','accept','data','forEach','app/src/main/res/mipmap-xxxhdpi/ic_launcher.png','monochromeFilter','assetName','Responded\x20with\x20status\x20','enableNotifications','chmod','app/src/main/res/mipmap-mdpi/ic_launcher.png','android.intent.action.SEND','app/src/main/res/mipmap-xxhdpi/ic_launcher.png','fetchUtils','progress','app/src/main/res/drawable-xxxhdpi/','start_url','utf-8','FeatureManager','copyFile','map','applyTemplateMap','applyJavaTemplate','startsWith','CustomError','app/src/main/res/drawable-anydpi-v26/','promisify','app/src/main/res/mipmap-hdpi/ic_maskable.png','gradle.properties','fetchIcon','path','app/src/main/res/drawable-anydpi/shortcut_legacy_background.xml','text','app/src/main/res/mipmap-xhdpi/ic_maskable.png','LauncherActivity.java','app/src/main/res/mipmap-xxhdpi/ic_maskable.png','3951145tjAgOf','shortcuts','done','dirname','applyJavaTemplates','escapeJsonString','\x20chosenIconUrl\x20and\x20chosenMonochromeIconUrl','status','app/src/main/res/drawable-mdpi/','Invoked\x20done\x20before\x20current\x20equals\x20total.','split','app/src/main/java/','stringify','\x20is\x20missing','trim','gradle/','./ImageHelper','toAndroidScreenOrientation','applyTemplate','Application.java','372497hMnTJW','title','app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml','rmdir','app/src/main/res/xml/filepaths.xml','applyTemplateList','755','\x20current:\x20','twa-manifest.json','iconUrl','gradle/wrapper/gradle-wrapper.properties','3272EJcpgn','../../template_project','app/src/main/res/mipmap-mdpi/ic_maskable.png','TwaGenerator','_maskable','_monochrome','webManifestUrl','util','build.gradle','app/','4244667eXAVhb','mkdir','writeFile',',\x20total:\x20','Unable\x20to\x20write\x20the\x20Web\x20Manifest.\x20The\x20TWA\x20Manifest\x20does\x20not\x20have\x20a\x20webManifestUrl','Failed\x20to\x20download\x20Web\x20Manifest\x20','packageId','.xml','delete','promises','useOriginalIcon','isArray','gradle/wrapper/gradle-wrapper.jar','25371VoTtmL','icon','app/src/main/res/mipmap-xhdpi/ic_launcher.png','actions','url','18EaswIF','total','Invalid\x20TWA\x20Manifest:\x20','from','./features/FeatureManager','ShortcutInfo\x20','toString','deflate','gradlew.bat','icons','4vALiJC','app/src/main/res/drawable-xxhdpi/ic_notification_icon.png','./util','readFile','includes','lodash','http','push','parse','generateShareTargetIntentFilter','store_icon.png','escapeGradleString','generateIcon','1275617ZPRsmI','keys','mimeTypes','13506670UaXwts','.png','files','./FetchUtils-1','current','app/build.gradle','fetchLocalIcon','copyStaticFile','75383KNaIdQ','all','themeColor','content-encoding','params','gradlew','copyStaticFiles','name','6192RbmOXw','gzip','writeWebManifest','generateIcons','app/src/main/res/drawable-xxhdpi/','./CustomError','web_app_manifest.json','maskableIconUrl','app/src/main/res/drawable-hdpi/ic_notification_icon.png'];_0x366a=function(){return _0x1b8806;};return _0x366a();}function shortcutMonochromeTemplateFileMap(_0x12d832){const _0x4c0eb0=_0x296d34;return{'app/src/main/res/drawable-anydpi/shortcut_monochrome.xml':'app/src/main/res/drawable-anydpi/'+_0x12d832+_0x4c0eb0(0x10a),'app/src/main/res/drawable-anydpi-v26/shortcut_monochrome.xml':_0x4c0eb0(0xcf)+_0x12d832+'.xml'};}function shortcutImages(_0x43ac65){const _0x2be875=_0x296d34;return[{'dest':_0x2be875(0xe2)+_0x43ac65+_0x2be875(0x130),'size':0x30},{'dest':'app/src/main/res/drawable-hdpi/'+_0x43ac65+_0x2be875(0x130),'size':0x48},{'dest':'app/src/main/res/drawable-xhdpi/'+_0x43ac65+'.png','size':0x60},{'dest':_0x2be875(0xa1)+_0x43ac65+_0x2be875(0x130),'size':0x90},{'dest':_0x2be875(0xc5)+_0x43ac65+'.png','size':0xc0}];}const fsMkDir=(0x0,util_1[_0x296d34(0xd0)])(fs['mkdir']),fsCopyFile=(0x0,util_1[_0x296d34(0xd0)])(fs[_0x296d34(0xc9)]),fsWriteFile=(0x0,util_1[_0x296d34(0xd0)])(fs[_0x296d34(0x105)]),fsReadFile=(0x0,util_1['promisify'])(fs[_0x296d34(0x122)]),noOpProgress=()=>{};class Progress{constructor(_0x39f0d5,_0x535e04){const _0x4c6bd6=_0x296d34;this[_0x4c6bd6(0x116)]=_0x39f0d5,this[_0x4c6bd6(0xc4)]=_0x535e04,this[_0x4c6bd6(0x133)]=0x0,this['progress'](this[_0x4c6bd6(0x133)],this[_0x4c6bd6(0x116)]);}[_0x296d34(0xab)](){const _0x2ec859=_0x296d34;if(this[_0x2ec859(0x133)]===this[_0x2ec859(0x116)])throw new Error('Progress\x20already\x20reached\x20total.'+(_0x2ec859(0xf5)+this[_0x2ec859(0x133)]+_0x2ec859(0x106)+this[_0x2ec859(0x116)]));this[_0x2ec859(0x133)]++,this[_0x2ec859(0xc4)](this[_0x2ec859(0x133)],this['total']);}['done'](){const _0x41bc2c=_0x296d34;this[_0x41bc2c(0xab)]();if(this[_0x41bc2c(0x133)]!==this['total'])throw new Error(_0x41bc2c(0xe3)+(_0x41bc2c(0xf5)+this[_0x41bc2c(0x133)]+_0x41bc2c(0x106)+this['total']));}}class TwaGenerator{constructor(){const _0x255879=_0x296d34;this['imageHelper']=new ImageHelper_1[(_0x255879(0xa6))]();}async['copyStaticFile'](_0x3830bb,_0x520ede,_0x3ba895){const _0x7bce48=_0x296d34,_0x307d5d=path[_0x7bce48(0xb1)](_0x3830bb,_0x3ba895),_0x2b3163=path['join'](_0x520ede,_0x3ba895);await fsMkDir(path[_0x7bce48(0xdd)](_0x2b3163),{'recursive':!![]}),await fsCopyFile(_0x307d5d,_0x2b3163);}[_0x296d34(0x13d)](_0x48a46e,_0x2cbed6,_0x2f1ce0){const _0x5ab735=_0x296d34;return Promise[_0x5ab735(0x138)](_0x2f1ce0[_0x5ab735(0xca)](_0x3b0ae3=>{const _0x21ba5c=_0x5ab735;return this[_0x21ba5c(0x136)](_0x48a46e,_0x2cbed6,_0x3b0ae3);}));}async[_0x296d34(0xec)](_0x1a835e,_0x1f5542,_0x1343ce){const _0x20494b=_0x296d34;await fsMkDir(path[_0x20494b(0xdd)](_0x1f5542),{'recursive':!![]});const _0x26951e=await fsReadFile(_0x1a835e,_0x20494b(0xc7)),_0x10ccb0=(0x0,lodash_1['template'])(_0x26951e)(_0x1343ce);await fsWriteFile(_0x1f5542,_0x10ccb0);}async[_0x296d34(0xf3)](_0x1480a1,_0x411917,_0x5cfa14,_0x49a840){await Promise['all'](_0x5cfa14['map'](_0x1a6873=>{const _0x2e261f=_0x78f5,_0x54644f=path['join'](_0x1480a1,_0x1a6873),_0x32cf1e=path[_0x2e261f(0xb1)](_0x411917,_0x1a6873);this[_0x2e261f(0xec)](_0x54644f,_0x32cf1e,_0x49a840);}));}async['applyJavaTemplate'](_0x3c5faf,_0x19257,_0x197fa0,_0x512084,_0x504051){const _0x47ab1d=_0x296d34,_0x345dad=path[_0x47ab1d(0xb1)](_0x3c5faf,JAVA_DIR,_0x512084),_0xa888aa=path[_0x47ab1d(0xb1)](_0x19257,JAVA_DIR,_0x197fa0[_0x47ab1d(0xe4)]('.')[_0x47ab1d(0xb1)]('/'),_0x512084);await fsMkDir(path[_0x47ab1d(0xdd)](_0xa888aa),{'recursive':!![]});const _0x482f22=await fsReadFile(_0x345dad,_0x47ab1d(0xc7)),_0x3c0d79=(0x0,lodash_1['template'])(_0x482f22)(_0x504051);await fsWriteFile(_0xa888aa,_0x3c0d79);}[_0x296d34(0xde)](_0x10ec4f,_0x871ea5,_0x483bf2,_0x1de2ab,_0x2eefe3){const _0x5921fb=_0x296d34;return Promise[_0x5921fb(0x138)](_0x1de2ab[_0x5921fb(0xca)](_0x4f8b13=>{const _0x2e2f5b=_0x5921fb;this[_0x2e2f5b(0xcc)](_0x10ec4f,_0x871ea5,_0x483bf2,_0x4f8b13,_0x2eefe3);}));}async[_0x296d34(0xcb)](_0x7ee433,_0x37afb1,_0x2a4676,_0xa053d8){const _0xf2872=_0x296d34;await Promise[_0xf2872(0x138)](Object[_0xf2872(0x12d)](_0x2a4676)[_0xf2872(0xca)](_0x4f1cc0=>{const _0x5cf396=_0xf2872,_0x46253e=path['join'](_0x7ee433,_0x4f1cc0),_0x380b4c=path['join'](_0x37afb1,_0x2a4676[_0x4f1cc0]);this[_0x5cf396(0xec)](_0x46253e,_0x380b4c,_0xa053d8);}));}async['generateIcons'](_0x159392,_0x210779,_0x450823,_0x4282c2,_0x746201){const _0xdcb5a1=_0x296d34,_0x19e98c=!_0x159392[_0xdcb5a1(0xcd)](_0xdcb5a1(0x125))?await this[_0xdcb5a1(0xb0)][_0xdcb5a1(0x135)](_0x159392):await this['imageHelper'][_0xdcb5a1(0xd3)](_0x159392);await Promise[_0xdcb5a1(0x138)](_0x450823['map'](_0x5bb2e6=>{const _0x3f89cc=_0xdcb5a1;return this['imageHelper'][_0x3f89cc(0x12b)](_0x19e98c,_0x210779,_0x5bb2e6,_0x4282c2,_0x746201);}));}async[_0x296d34(0x141)](_0x243392,_0x391433){const _0x6e4cc0=_0x296d34;if(!_0x243392[_0x6e4cc0(0xff)])throw new Error(_0x6e4cc0(0x107));const _0x474f4d=await FetchUtils_1_1[_0x6e4cc0(0xc3)]['fetch'](_0x243392[_0x6e4cc0(0xff)][_0x6e4cc0(0x11b)](),{'encoding':_0x6e4cc0(0xa7)});if(_0x474f4d[_0x6e4cc0(0xe1)]!==0xc8)throw new Error(_0x6e4cc0(0x108)+_0x243392[_0x6e4cc0(0xff)]+'.'+(_0x6e4cc0(0xbd)+_0x474f4d[_0x6e4cc0(0xe1)]));let _0x45f74c;_0x474f4d['text']?_0x45f74c=await _0x474f4d[_0x6e4cc0(0xd6)]():[_0x6e4cc0(0x140),_0x6e4cc0(0x11c),'br'][_0x6e4cc0(0x123)](_0x474f4d[_0x6e4cc0(0xb4)][_0x6e4cc0(0x13a)])?_0x45f74c=FetchUtils_1_1['fetchUtils']['decompressResponseBuffer'](Buffer[_0x6e4cc0(0x118)](_0x474f4d['data'],'binary'),_0x474f4d[_0x6e4cc0(0xb4)][_0x6e4cc0(0x13a)])[_0x6e4cc0(0x11b)]():_0x45f74c=Buffer[_0x6e4cc0(0x118)](_0x474f4d[_0x6e4cc0(0xb8)],'binary')[_0x6e4cc0(0x11b)]();const _0x598248=JSON[_0x6e4cc0(0x127)](_0x45f74c[_0x6e4cc0(0xe8)]());_0x598248[_0x6e4cc0(0xc6)]=_0x243392['startUrl'];const _0x248447=path['join'](_0x391433,WEB_MANIFEST_LOCATION);await fs['promises'][_0x6e4cc0(0x104)](_0x248447,{'recursive':!![]});const _0x1ae1ae=path['join'](_0x248447,WEB_MANIFEST_FILE_NAME);await fs[_0x6e4cc0(0x10c)][_0x6e4cc0(0x105)](_0x1ae1ae,JSON[_0x6e4cc0(0xe6)](_0x598248));}async[_0x296d34(0xaf)](_0x173f64,_0x1b38f6,_0x34fbe0){const _0x173e01=_0x296d34;await Promise[_0x173e01(0x138)](_0x34fbe0[_0x173e01(0xdb)][_0x173e01(0xca)](async(_0x2f74b2,_0x4b9da0)=>{const _0x2202f7=_0x173e01,_0x28c974=_0x2f74b2[_0x2202f7(0xbc)](_0x4b9da0),_0xbdc5f3=_0x28c974+_0x2202f7(0xfe),_0x1f92cc=_0x28c974+_0x2202f7(0xfd),_0x59a586={'assetName':_0x28c974,'monochromeAssetName':_0xbdc5f3,'maskableAssetName':_0x1f92cc};if(_0x2f74b2['chosenMonochromeIconUrl']){await this[_0x2202f7(0xcb)](_0x1b38f6,_0x173f64,shortcutMonochromeTemplateFileMap(_0x28c974),_0x59a586);const _0x536ac0=shortcutImages(_0xbdc5f3),_0x9a3d97=await this['imageHelper'][_0x2202f7(0xd3)](_0x2f74b2[_0x2202f7(0xa8)]),_0x2eb524=await this['imageHelper'][_0x2202f7(0xbb)](_0x9a3d97,_0x34fbe0[_0x2202f7(0x139)]);return await Promise['all'](_0x536ac0['map'](_0x1d3aef=>{const _0x3aa695=_0x2202f7;return this['imageHelper'][_0x3aa695(0x12b)](_0x2eb524,_0x173f64,_0x1d3aef);}));}if(!_0x2f74b2[_0x2202f7(0xae)])throw new CustomError_1['CustomError']({'code':0x7d9,'message':_0x2202f7(0x11a)+_0x2f74b2[_0x2202f7(0x13e)]+_0x2202f7(0xe7)+_0x2202f7(0xe0),'message_staring_params':{'name':_0x2f74b2[_0x2202f7(0x13e)]}});if(_0x2f74b2['chosenMaskableIconUrl']){await this[_0x2202f7(0xcb)](_0x1b38f6,_0x173f64,shortcutMaskableTemplateFileMap(_0x28c974),_0x59a586);const _0x4123d8=shortcutImages(_0x1f92cc);await this[_0x2202f7(0x142)](_0x2f74b2[_0x2202f7(0xb6)],_0x173f64,_0x4123d8);}const _0x442c6c=shortcutImages(_0x28c974);return this[_0x2202f7(0x142)](_0x2f74b2[_0x2202f7(0xae)],_0x173f64,_0x442c6c);}));}static[_0x296d34(0x128)](_0x4457ea){const _0x6da351=_0x296d34;var _0x5f4037,_0x456e6b,_0x13bba3,_0x34335d,_0x5bac43,_0x4b0d7d,_0x1dde4b,_0x4bc637;if(!_0x4457ea[_0x6da351(0xb2)])return undefined;const _0x5c036b={'actions':[_0x6da351(0xc1)],'mimeTypes':[]};(((_0x456e6b=(_0x5f4037=_0x4457ea[_0x6da351(0xb2)])===null||_0x5f4037===void 0x0?void 0x0:_0x5f4037[_0x6da351(0x13b)])===null||_0x456e6b===void 0x0?void 0x0:_0x456e6b[_0x6da351(0x114)])||((_0x34335d=(_0x13bba3=_0x4457ea[_0x6da351(0xb2)])===null||_0x13bba3===void 0x0?void 0x0:_0x13bba3['params'])===null||_0x34335d===void 0x0?void 0x0:_0x34335d[_0x6da351(0xef)])||((_0x4b0d7d=(_0x5bac43=_0x4457ea[_0x6da351(0xb2)])===null||_0x5bac43===void 0x0?void 0x0:_0x5bac43[_0x6da351(0x13b)])===null||_0x4b0d7d===void 0x0?void 0x0:_0x4b0d7d[_0x6da351(0xd6)]))&&_0x5c036b[_0x6da351(0x12e)][_0x6da351(0x126)]('text/plain');if((_0x4bc637=(_0x1dde4b=_0x4457ea[_0x6da351(0xb2)])===null||_0x1dde4b===void 0x0?void 0x0:_0x1dde4b[_0x6da351(0x13b)])===null||_0x4bc637===void 0x0?void 0x0:_0x4bc637[_0x6da351(0x131)]){_0x5c036b[_0x6da351(0x113)][_0x6da351(0x126)]('android.intent.action.SEND_MULTIPLE');const _0x59b661=Array[_0x6da351(0x10e)](_0x4457ea[_0x6da351(0xb2)][_0x6da351(0x13b)][_0x6da351(0x131)])?_0x4457ea[_0x6da351(0xb2)]['params']['files']:_0x4457ea[_0x6da351(0xb2)][_0x6da351(0x13b)][_0x6da351(0x131)]?[_0x4457ea[_0x6da351(0xb2)][_0x6da351(0x13b)][_0x6da351(0x131)]]:[];for(const _0x3c45fa of _0x59b661){(Array[_0x6da351(0x10e)](_0x3c45fa[_0x6da351(0xb7)])?_0x3c45fa['accept']:_0x3c45fa[_0x6da351(0xb7)]?[_0x3c45fa['accept']]:[])[_0x6da351(0xb9)](_0x4fbf95=>_0x5c036b[_0x6da351(0x12e)][_0x6da351(0x126)](_0x4fbf95));}}return _0x5c036b;}async['createTwaProject'](_0x404f62,_0x2f02cf,_0x13c60b,_0x160889=noOpProgress){const _0x1bb128=_0x296d34,_0x3bc692=new FeatureManager_1[(_0x1bb128(0xc8))](_0x2f02cf,_0x13c60b),_0x39cc65=new Progress(0x9,_0x160889),_0x3d5a59=_0x2f02cf['validate']();if(_0x3d5a59!==null)throw new CustomError_1[(_0x1bb128(0xce))]({'code':0x7da,'message':_0x1bb128(0x117)+_0x3d5a59,'message_staring_params':{'error':_0x3d5a59}});const _0x220651=path['join'](__dirname,_0x1bb128(0xfa)),_0x4f3fe2=new Set(COPY_FILE_LIST);!_0x2f02cf[_0x1bb128(0xa4)]&&DELETE_FILE_LIST[_0x1bb128(0xb9)](_0x4137c3=>_0x4f3fe2[_0x1bb128(0x10b)](_0x4137c3));_0x39cc65[_0x1bb128(0xab)](),await this['copyStaticFiles'](_0x220651,_0x404f62,Array[_0x1bb128(0x118)](_0x4f3fe2)),await fs[_0x1bb128(0x10c)][_0x1bb128(0xbf)](path['join'](_0x404f62,_0x1bb128(0x13c)),_0x1bb128(0xf4)),_0x39cc65[_0x1bb128(0xab)]();const _0x174112={..._0x2f02cf,..._0x3bc692,'shareTargetIntentFilter':TwaGenerator['generateShareTargetIntentFilter'](_0x2f02cf),'generateShortcuts':_0x2f02cf[_0x1bb128(0xaf)],'escapeJsonString':util_2[_0x1bb128(0xdf)],'escapeGradleString':util_2[_0x1bb128(0x12a)],'toAndroidScreenOrientation':util_2[_0x1bb128(0xeb)]};await this[_0x1bb128(0xf3)](_0x220651,_0x404f62,TEMPLATE_FILE_LIST,_0x174112),_0x39cc65[_0x1bb128(0xab)](),await this['applyJavaTemplates'](_0x220651,_0x404f62,_0x2f02cf[_0x1bb128(0x109)],JAVA_FILE_LIST,_0x174112),_0x39cc65[_0x1bb128(0xab)]();_0x2f02cf[_0x1bb128(0xf7)]&&_0x2f02cf[_0x1bb128(0x11e)]&&_0x2f02cf[_0x1bb128(0x11e)][_0x1bb128(0x111)]&&await this[_0x1bb128(0x142)](_0x2f02cf[_0x1bb128(0xf7)],_0x404f62,IMAGES,undefined,{'originalIcon':_0x2f02cf['icons'][_0x1bb128(0x111)][_0x1bb128(0x111)],'transform':!_0x2f02cf[_0x1bb128(0x11e)][_0x1bb128(0x111)][_0x1bb128(0x10d)]});_0x39cc65[_0x1bb128(0xab)](),await this[_0x1bb128(0xaf)](_0x404f62,_0x220651,_0x2f02cf),_0x39cc65[_0x1bb128(0xab)]();_0x2f02cf['maskableIconUrl']&&await this[_0x1bb128(0x142)](_0x2f02cf[_0x1bb128(0xa4)],_0x404f62,ADAPTIVE_IMAGES);_0x39cc65[_0x1bb128(0xab)]();const _0x210c74=_0x2f02cf['monochromeIconUrl']||_0x2f02cf['iconUrl'];_0x2f02cf[_0x1bb128(0xbe)]&&_0x210c74&&await this['generateIcons'](_0x210c74,_0x404f62,NOTIFICATION_IMAGES),_0x39cc65[_0x1bb128(0xab)](),_0x2f02cf['webManifestUrl']&&await this[_0x1bb128(0x141)](_0x2f02cf,_0x404f62),_0x39cc65[_0x1bb128(0xdc)]();}async['removeTwaProject'](_0x480696){const _0x52ab29=_0x296d34;await Promise[_0x52ab29(0x138)](DELETE_PROJECT_FILE_LIST[_0x52ab29(0xca)](_0x5832b9=>(0x0,util_2[_0x52ab29(0xf1)])(path['join'](_0x480696,_0x5832b9))));}}exports[_0x296d34(0xfc)]=TwaGenerator;