UNPKG

@appzung/cli

Version:

AppZung CLI

3 lines (2 loc) 202 kB
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d1218df2-f7fe-5014-8742-38b016aecf2a")}catch(e){}}(); const _0x6d85de=_0x191b;(function(_0x31feae,_0x3d1481){const _0x1a8529=_0x191b,_0xe8e814=_0x31feae();while(!![]){try{const _0x40a562=parseInt(_0x1a8529(0x436))/0x1+-parseInt(_0x1a8529(0x417))/0x2*(-parseInt(_0x1a8529(0x258))/0x3)+-parseInt(_0x1a8529(0x326))/0x4+parseInt(_0x1a8529(0x320))/0x5*(parseInt(_0x1a8529(0x31a))/0x6)+parseInt(_0x1a8529(0x23d))/0x7+parseInt(_0x1a8529(0x4f9))/0x8*(-parseInt(_0x1a8529(0x1fd))/0x9)+parseInt(_0x1a8529(0x396))/0xa*(-parseInt(_0x1a8529(0x23e))/0xb);if(_0x40a562===_0x3d1481)break;else _0xe8e814['push'](_0xe8e814['shift']());}catch(_0x1fd323){_0xe8e814['push'](_0xe8e814['shift']());}}}(_0x2168,0xd8892));const _0x472456=(function(){let _0x43b1a2=!![];return function(_0x433234,_0x106777){const _0x3cffd7=_0x43b1a2?function(){if(_0x106777){const _0x30f152=_0x106777['apply'](_0x433234,arguments);return _0x106777=null,_0x30f152;}}:function(){};return _0x43b1a2=![],_0x3cffd7;};}()),_0x131d93=_0x472456(this,function(){const _0x3ddedf=_0x191b;return _0x131d93['toString']()[_0x3ddedf(0x583)](_0x3ddedf(0x4f5))['toString']()[_0x3ddedf(0x440)](_0x131d93)[_0x3ddedf(0x583)]('(((.+)+)+)+$');});_0x131d93();import{init as _0x110710}from'@sentry/node';var _0x2d7e24={'ENV':_0x6d85de(0x59b),'WEB_URL':process[_0x6d85de(0x45a)][_0x6d85de(0x299)]||_0x6d85de(0x4a1),'API_BASE_URL':process[_0x6d85de(0x45a)]['APPZUNG_API_URL']||_0x6d85de(0x3d1),'SIMPLE_ANALYTICS_HOSTNAME':_0x6d85de(0x1b2),'SENTRY_DSN':_0x6d85de(0x3a6)},_0x1bd683=_0x6d85de(0x3ad);!process[_0x6d85de(0x45a)][_0x6d85de(0x2c4)]&&_0x2d7e24[_0x6d85de(0x30e)]&&_0x110710({'environment':_0x2d7e24[_0x6d85de(0x3c4)],'release':_0x6d85de(0x26c)+_0x1bd683,'dsn':_0x2d7e24[_0x6d85de(0x30e)]});import{run as _0x368a28,flush as _0x2a646d,handle as _0x2145e3}from'@oclif/core';import*as _0xcba2de from'node:fs';import*as _0x2927a7 from'node:http';import*as _0x1613c9 from'node:os';import*as _0x433786 from'node:path';import*as _0x3aebf5 from'portfinder';import{cancel as _0x38c323,intro as _0x5e3373,isCancel as _0x496606,log as _0x15c582,outro as _0x51a926,password as _0x422105,spinner as _0x2fbdf7}from'@clack/prompts';import{Command as _0x2868e4,Flags as _0x3a4f2a}from'@oclif/core';import{jwtDecode as _0xbfb11c}from'jwt-decode';import _0x20556e from'open';import _0x1c61d3 from'picocolors';import{setUser as _0x288f1c}from'@sentry/node';import{jwtDecode as _0x2b691e}from'jwt-decode';import _0x477c6f from'node:fs';import _0x5a4244 from'node:os';import _0x1e00ba from'node:path';var _0x5263d6=class extends Error{},_0x23a14f=class extends _0x5263d6{[_0x6d85de(0x1d3)]=_0x6d85de(0x307);[_0x6d85de(0x497)]=_0x6d85de(0x45f);},_0xabafd3=class extends _0x5263d6{[_0x6d85de(0x1d3)]=_0x6d85de(0x30c);[_0x6d85de(0x497)]=_0x6d85de(0x56a);},_0x2b215c=class extends _0x5263d6{[_0x6d85de(0x1d3)]=_0x6d85de(0x1f7);['message']=_0x6d85de(0x21c);},_0x5166d1=class extends _0x5263d6{[_0x6d85de(0x1d3)]='InvalidApiKey';[_0x6d85de(0x497)]=_0x6d85de(0x195);},_0x5585a4=class extends _0x5263d6{constructor(_0x51a7f2){const _0x471895=_0x6d85de;super(),this['message']=_0x471895(0x246)+_0x51a7f2+_0x471895(0x269);}[_0x6d85de(0x1d3)]=_0x6d85de(0x2f8);},_0x52fd3a=class extends _0x5263d6{constructor(_0x3dfc66){const _0x481031=_0x6d85de;super(),this[_0x481031(0x497)]=_0x3dfc66;}[_0x6d85de(0x1d3)]=_0x6d85de(0x387);},_0x47757f=class extends _0x5263d6{constructor(_0x2a0126){super(),this['message']=_0x2a0126;}['name']=_0x6d85de(0x2e0);},_0x56d51b=class extends _0x5263d6{[_0x6d85de(0x1d3)]=_0x6d85de(0x1cc);[_0x6d85de(0x497)]='This\x20plan\x20is\x20not\x20available\x20anymore,\x20please\x20update\x20the\x20CLI.';},_0x2f2584=0x3*0x3c*0x3e8;function _0x3dd369(){const _0x368b2e=_0x6d85de;let _0x4cc979=_0x1e00ba[_0x368b2e(0x4bb)](_0x5a4244['homedir'](),_0x368b2e(0x1e2),_0x368b2e(0x317));if(!_0x477c6f['existsSync'](_0x4cc979))throw new _0xabafd3();let _0x4d9c23=_0x477c6f[_0x368b2e(0x44c)](_0x4cc979,_0x368b2e(0x232)),_0x4ab427=_0x2b691e(_0x4d9c23);if(!_0x4ab427[_0x368b2e(0x46b)])throw new _0x2b215c();let _0x2180fc=new Date(_0x4ab427[_0x368b2e(0x46b)]*0x3e8),_0x32e4d7=new Date();if(_0x2180fc['getTime']()-_0x2f2584<_0x32e4d7['getTime']())throw new _0x2b215c();return _0x4ab427[_0x368b2e(0x263)]&&_0x288f1c({'id':_0x4ab427[_0x368b2e(0x263)]}),{'token':_0x4d9c23,'decodedToken':_0x4ab427};}import _0x5289f8 from'debug';var _0x3ad7df=class extends Error{constructor(_0x35e9ec){const _0x1dfa45=_0x6d85de;super(),this[_0x1dfa45(0x444)]=_0x35e9ec;}get[_0x6d85de(0x497)](){const _0x384945=_0x6d85de;return this[_0x384945(0x444)][_0x384945(0x498)](_0x3fa609=>_0x3fa609['extensions']?.[_0x384945(0x565)]===_0x384945(0x55f)&&_0x3fa609[_0x384945(0x2bf)]?.[_0x384945(0x409)]?'An\x20internal\x20server\x20error\x20occurred.\x20Please\x20contact\x20support\x20with\x20this\x20error\x20ID:\x20'+_0x3fa609[_0x384945(0x2bf)]['errorId']:_0x3fa609[_0x384945(0x497)])[_0x384945(0x3c5)](Boolean)[_0x384945(0x4bb)](_0x384945(0x216));}};function _0x459767(_0x1b5114){throw _0x1b5114 instanceof _0x5263d6||_0x1b5114 instanceof _0x3ad7df||_0x5289f8(_0x1b5114 instanceof Error?JSON['stringify'](_0x1b5114):'Unknown\x20error'),_0x1b5114;}var _0x284727=_0x2d359f=>new Promise(_0x1bf057=>{setTimeout(()=>_0x1bf057(),_0x2d359f);}),_0x3ddda8=class _0xef8a0 extends _0x2868e4{static [_0x6d85de(0x29c)]=[_0x6d85de(0x219)];static [_0x6d85de(0x4cb)]=_0x6d85de(0x20e);static [_0x6d85de(0x314)]={'manual':_0x3a4f2a[_0x6d85de(0x521)]({'char':'m','description':'Skip\x20automatic\x20token\x20listening\x20and\x20use\x20manual\x20token\x20entry','default':!0x1})};['currentSpinner'];[_0x6d85de(0x373)](){const _0x3c0b53=_0x6d85de;return new URL(_0x2d7e24[_0x3c0b53(0x370)]+_0x3c0b53(0x265));}async[_0x6d85de(0x496)](){const _0x409534=_0x6d85de;_0x5e3373(_0x1c61d3[_0x409534(0x384)]('🔑\x20AppZung\x20CLI\x20Login'));let {flags:_0x536e53}=await this['parse'](_0xef8a0);try{let _0x1d926e=_0x536e53['manual']?await this[_0x409534(0x385)]():await this['listenAutomaticallyForToken']()['catch'](_0x3e0b41=>(this['debug'](_0x409534(0x48e),_0x3e0b41),this['promptForToken']()));if(_0x496606(_0x1d926e))throw new _0x23a14f();this['currentSpinner']=_0x2fbdf7(),this[_0x409534(0x2b4)][_0x409534(0x28d)]('Verifying\x20token');try{let _0x2c63ec=_0xbfb11c(_0x1d926e);if(_0x2c63ec[_0x409534(0x46b)]){let _0x3b57e0=Math[_0x409534(0x1e8)](Math['floor']((_0x2c63ec[_0x409534(0x46b)]-Date['now']()/0x3e8)/0x3c)-_0x2f2584/0xea60,0x0);this['currentSpinner'][_0x409534(0x2bb)](_0x409534(0x1c1)+_0x1c61d3[_0x409534(0x41e)](_0x3b57e0)+_0x409534(0x4ca));}}catch(_0x3cd95c){throw this[_0x409534(0x4cc)]('Invalid\x20JWT\x20error',_0x3cd95c),new Error(_0x409534(0x2e8));}this[_0x409534(0x2b4)]=_0x2fbdf7(),this[_0x409534(0x2b4)][_0x409534(0x28d)](_0x409534(0x341)),await this['storeToken'](_0x1d926e),this['currentSpinner'][_0x409534(0x2bb)]('Credentials\x20saved'),_0x51a926(_0x1c61d3[_0x409534(0x41e)](_0x409534(0x483)));}catch(_0x19b52a){this[_0x409534(0x2b4)]?.[_0x409534(0x2bb)](void 0x0,0x1),_0x19b52a instanceof _0x23a14f?_0x38c323(_0x409534(0x1eb)):_0x38c323('Login\x20failed'),_0x459767(_0x19b52a);}}async[_0x6d85de(0x596)](){const _0x3723d2=_0x6d85de;let _0x52d57c=this[_0x3723d2(0x373)](),_0xd9aaa0=await this['getOpenPort']();return _0xd9aaa0&&_0x52d57c['searchParams']['append']('port',''+_0xd9aaa0),new Promise(_0xfbf1c3=>{const _0x270e5f=_0x3723d2;let _0x611141=_0x2927a7[_0x270e5f(0x2f7)]((_0x5e7297,_0x2dcf8a)=>{const _0x10e015=_0x270e5f;if(_0x2dcf8a[_0x10e015(0x494)]('Access-Control-Allow-Origin','*'),_0x2dcf8a['setHeader']('Access-Control-Allow-Methods','GET,\x20OPTIONS'),_0x2dcf8a[_0x10e015(0x494)](_0x10e015(0x3ec),_0x10e015(0x340)),_0x5e7297[_0x10e015(0x579)]===_0x10e015(0x3df)){_0x2dcf8a[_0x10e015(0x225)](0xcc),_0x2dcf8a['end']();return;}if(!_0x5e7297['url']?.[_0x10e015(0x432)]('/callback')){_0x2dcf8a[_0x10e015(0x225)](0x194,{'Content-Type':'text/plain'}),_0x2dcf8a['end'](_0x10e015(0x36d));return;}let _0x3e6054=new URL(_0x5e7297[_0x10e015(0x239)],_0x10e015(0x21f)+_0x5e7297[_0x10e015(0x4b6)][_0x10e015(0x270)])['searchParams'][_0x10e015(0x598)](_0x10e015(0x317));if(!_0x3e6054){_0x2dcf8a[_0x10e015(0x225)](0x190,{'Content-Type':_0x10e015(0x528)}),_0x2dcf8a['end'](_0x10e015(0x380));return;}_0x2dcf8a['writeHead'](0xc8,{'Content-Type':_0x10e015(0x528)});let _0x253878=()=>{const _0x3910ce=_0x10e015;this[_0x3910ce(0x2b4)]?.['stop'](_0x3910ce(0x51a)),_0xfbf1c3(_0x3e6054);};_0x2dcf8a[_0x10e015(0x26d)]('OK',async()=>{const _0x1c6f50=_0x10e015;if(!_0x611141[_0x1c6f50(0x2f1)]){await _0x284727(0x1388),_0x611141[_0x1c6f50(0x31c)](),_0x253878();return;}_0x611141[_0x1c6f50(0x2f1)](),_0x611141[_0x1c6f50(0x31c)](()=>{_0x253878();});});});_0x611141[_0x270e5f(0x33a)](_0xd9aaa0,()=>{const _0x18c7db=_0x270e5f;_0x20556e(_0x52d57c[_0x18c7db(0x421)]())[_0x18c7db(0x254)](()=>{const _0x369405=_0x18c7db;_0x15c582[_0x369405(0x497)](_0x1c61d3[_0x369405(0x37f)](_0x369405(0x200))),_0x15c582[_0x369405(0x497)](_0x1c61d3['dim'](_0x369405(0x27b))),this[_0x369405(0x2b4)]=_0x2fbdf7(),this[_0x369405(0x2b4)]['start'](_0x369405(0x457));})[_0x18c7db(0x557)](()=>{const _0x55798c=_0x18c7db;_0x15c582[_0x55798c(0x247)](_0x1c61d3[_0x55798c(0x45d)](_0x55798c(0x37c)+_0x1c61d3['underline'](_0x52d57c[_0x55798c(0x421)]())));});});});}async[_0x6d85de(0x22d)](_0x36fc75){const _0x5f8500=_0x6d85de;let _0x5ba825=_0x433786[_0x5f8500(0x4bb)](_0x1613c9[_0x5f8500(0x197)](),_0x5f8500(0x1e2)),_0x1fad9f=_0x433786['join'](_0x5ba825,'token');try{_0xcba2de[_0x5f8500(0x1c0)](_0x5ba825,{'recursive':!0x0}),_0xcba2de[_0x5f8500(0x268)](_0x1fad9f,_0x36fc75);}catch(_0x3338f7){throw this[_0x5f8500(0x4cc)](_0x5f8500(0x229),_0x3338f7),new Error(_0x5f8500(0x321));}}async['promptForToken'](){const _0x3707f0=_0x6d85de;let _0x1f0d56=await _0x422105({'message':_0x3707f0(0x4e7)+this[_0x3707f0(0x373)]()[_0x3707f0(0x421)]()+')','validate'(_0x11e0c6){const _0x3d1699=_0x3707f0;if(!_0x11e0c6)return _0x3d1699(0x274);}});if(_0x496606(_0x1f0d56))throw new _0x23a14f();return _0x1f0d56;}async[_0x6d85de(0x4be)](){const _0x2ea1c3=_0x6d85de;let _0x1c2af1=await _0x3aebf5[_0x2ea1c3(0x39e)]()['catch'](()=>null);return _0x1c2af1&&await _0x284727(0x64),_0x1c2af1;}};import*as _0x18f6a9 from'node:fs';import*as _0x2fec3a from'node:os';import*as _0x12e9f8 from'node:path';import{cancel as _0xeede99,confirm as _0x3ffeaa,intro as _0x17fcbf,isCancel as _0x5b9b62,log as _0x403c8e,outro as _0xe89d16,spinner as _0x42fa69}from'@clack/prompts';import{Command as _0x6d3f69}from'@oclif/core';import _0x279d38 from'open';import _0x5c47e8 from'picocolors';var _0x228233=class extends _0x6d3f69{static [_0x6d85de(0x4cb)]=_0x6d85de(0x313);[_0x6d85de(0x2b4)];[_0x6d85de(0x339)](){const _0x2fc827=_0x6d85de;let _0x4e1411=_0x12e9f8[_0x2fc827(0x4bb)](_0x2fec3a[_0x2fc827(0x197)](),'.appzung',_0x2fc827(0x317));try{_0x18f6a9[_0x2fc827(0x26a)](_0x4e1411)&&_0x18f6a9[_0x2fc827(0x4c9)](_0x4e1411);}catch(_0x3d40de){throw this['debug']('Error\x20removing\x20token\x20file',_0x3d40de),new Error(_0x2fc827(0x204));}}async[_0x6d85de(0x496)](){const _0x244135=_0x6d85de;_0x17fcbf(_0x5c47e8[_0x244135(0x384)](_0x244135(0x48a)));try{this[_0x244135(0x2b4)]=_0x42fa69(),this[_0x244135(0x2b4)][_0x244135(0x28d)](_0x244135(0x2c8)),this[_0x244135(0x339)](),this[_0x244135(0x2b4)]['stop'](_0x244135(0x410));let _0x3f963a=await _0x3ffeaa({'message':_0x244135(0x4d3)});if(_0x5b9b62(_0x3f963a))throw new _0x23a14f();if(_0x3f963a){let _0x3ade25=_0x2d7e24[_0x244135(0x370)]+_0x244135(0x348);try{await _0x279d38(_0x3ade25),_0x403c8e[_0x244135(0x497)](_0x5c47e8[_0x244135(0x37f)](_0x244135(0x291)));}catch{_0x403c8e['info'](_0x5c47e8[_0x244135(0x45d)]('Please\x20visit\x20'+_0x5c47e8[_0x244135(0x283)](_0x3ade25)+_0x244135(0x43b)));}}_0xe89d16(_0x5c47e8[_0x244135(0x41e)]('✨\x20Successfully\x20logged\x20out!'));}catch(_0x1702af){this[_0x244135(0x2b4)]?.[_0x244135(0x2bb)](void 0x0,0x1),_0x1702af instanceof _0x23a14f?_0xeede99(_0x244135(0x249)):_0xeede99(_0x244135(0x34c)),_0x459767(_0x1702af);}}};import{cancel as _0x1ef939,intro as _0x4bb883,outro as _0x4d4790,spinner as _0x3ca9c2}from'@clack/prompts';import{Command as _0x32d2e3}from'@oclif/core';import _0x4f5743 from'picocolors';import{randomUUID as _0x5f52c6}from'node:crypto';function _0x1220ae(){const _0x5588a4=_0x6d85de;try{return new Intl[(_0x5588a4(0x3e3))]()[_0x5588a4(0x500)]()['timeZone'];}catch{return null;}}function _0x4f7f8a(){const _0x958f1e=_0x6d85de;return process[_0x958f1e(0x45a)]['TZ']??_0x1220ae()??null;}var _0x2ad9b8=async({url:_0x103119,query:_0x1fc881,variables:_0x4538c9,options:_0x382605={'headers':{}}})=>{const _0x3c9e7f=_0x6d85de;let _0x400dec=await fetch(_0x103119,{..._0x382605,'method':'POST','headers':{..._0x382605['headers'],'Content-Type':'application/json'},'body':JSON[_0x3c9e7f(0x4de)]({'query':_0x1fc881,'variables':_0x4538c9})}),_0xac08d1=await _0x400dec[_0x3c9e7f(0x35c)]();if(!_0x400dec['ok']){let _0xd1a188=typeof _0xac08d1==_0x3c9e7f(0x1a5)?{'error':_0xac08d1}:_0xac08d1;if(_0xac08d1[_0x3c9e7f(0x444)]?.[0x0]?.[_0x3c9e7f(0x2bf)]?.[_0x3c9e7f(0x565)]===_0x3c9e7f(0x2cf))switch(_0xac08d1[_0x3c9e7f(0x444)][0x0][_0x3c9e7f(0x2bf)][_0x3c9e7f(0x2ae)]){case'INVALID_API_KEY':throw new _0x5166d1();case'EXPIRED_TOKEN':throw new _0x2b215c();}throw _0xac08d1['errors']?.[0x0]?.['extensions']?.['code']==='BAD_USER_INPUT'?new _0x52fd3a(_0xac08d1[_0x3c9e7f(0x444)]?.[0x0][_0x3c9e7f(0x497)]):new Error(JSON[_0x3c9e7f(0x4de)](_0xd1a188));}if(_0xac08d1[_0x3c9e7f(0x444)]?.[_0x3c9e7f(0x404)])throw new _0x3ad7df(_0xac08d1[_0x3c9e7f(0x444)]);return _0xac08d1;},_0x41f2ef=class{constructor(_0x5bbda6){const _0x46d006=_0x6d85de;this[_0x46d006(0x239)]=_0x5bbda6;}[_0x6d85de(0x469)](_0x1232b2={}){const _0x3e3be9=_0x6d85de;let _0x3dcdbf=_0x1232b2[_0x3e3be9(0x207)]?{'token':_0x1232b2['apiKey'],'kind':'api_key'}:{'token':_0x3dd369()[_0x3e3be9(0x317)],'kind':_0x3e3be9(0x454)},_0x281a6a=_0x4f7f8a();return{'authorization':'Bearer\x20'+_0x3dcdbf['token'],...!!_0x281a6a&&{'az-device-timezone':_0x281a6a},'az-client-name':'cli','az-authentication-kind':_0x3dcdbf[_0x3e3be9(0x3f1)],'az-client-version':_0x1bd683};}[_0x6d85de(0x22b)](_0x3db4da,_0xea8a2d,_0x356e30={}){const _0x1e9025=_0x6d85de;return _0x2ad9b8({'url':this[_0x1e9025(0x239)],'query':_0x3db4da,'variables':_0xea8a2d,'options':{'headers':this[_0x1e9025(0x469)](_0x356e30)}});}[_0x6d85de(0x56e)](_0x39ca1a,_0x2cea68,_0x1ea95c={}){const _0x338ab=_0x6d85de;return _0x2ad9b8({'url':this[_0x338ab(0x239)],'query':_0x39ca1a,'variables':_0x2cea68,'options':{'headers':{...this[_0x338ab(0x469)](_0x1ea95c),'idempotency-key':_0x5f52c6()}}});}},_0x26ea89=new _0x41f2ef(_0x2d7e24[_0x6d85de(0x211)]+'/graphql'),_0x588606=(_0x1589f4,..._0x5ad62b)=>Array['isArray'](_0x1589f4)?_0x1589f4[_0x6d85de(0x54d)]((_0x59914e,_0x4ed52d,_0x1a9a6f)=>_0x59914e+_0x4ed52d+(_0x5ad62b[_0x1a9a6f]||''),'')[_0x6d85de(0x2dd)]():_0x1589f4,_0x3bab15=_0x588606`query Me { me { id email } }`,_0xd5693=class extends _0x32d2e3{static ['description']='Show\x20currently\x20logged\x20in\x20user';async['run'](){const _0x39827f=_0x6d85de;_0x4bb883(_0x4f5743[_0x39827f(0x384)](_0x39827f(0x2fb)));let _0x747044=_0x3ca9c2();try{_0x747044[_0x39827f(0x28d)](_0x39827f(0x4b7));let {decodedToken:_0x43c1e0}=_0x3dd369(),{data:_0x4fb1d1}=await _0x26ea89[_0x39827f(0x22b)](_0x3bab15);_0x747044['stop'](_0x39827f(0x3bb)+_0x4f5743[_0x39827f(0x41e)](_0x4fb1d1['me']['email']));let _0x299e5c=new Date(_0x43c1e0[_0x39827f(0x46b)]*0x3e8),_0x106df1=new Date(),_0x34a512=Math[_0x39827f(0x1d4)]((_0x299e5c['getTime']()-_0x106df1[_0x39827f(0x2f6)]())/(0x3e8*0x3c))-_0x2f2584/(0x3c*0x3e8);_0x4d4790(_0x4f5743[_0x39827f(0x41e)](_0x39827f(0x5a5)+_0x4f5743[_0x39827f(0x384)](_0x34a512)+_0x39827f(0x4ca)));}catch(_0x1ba66b){try{_0x747044['stop'](void 0x0,_0x1ba66b instanceof _0x23a14f?0x1:0x2);}catch{}_0x1ba66b instanceof _0xabafd3?_0x1ef939('Not\x20logged\x20in.\x20Please\x20run\x20\x22appzung\x20auth\x20login\x22\x20first.'):_0x1ba66b instanceof _0x2b215c?_0x1ef939(_0x1ba66b[_0x39827f(0x497)]):_0x1ef939(_0x39827f(0x1f0)),_0x459767(_0x1ba66b);}}};import{cancel as _0x4bcff2,confirm as _0x47ec2d,intro as _0x56f58e,isCancel as _0x55bd6c,log as _0x5a1ffc,multiselect as _0x4b6301,outro as _0x157952,password as _0x58abf2,select as _0x44980b,spinner as _0x532d46}from'@clack/prompts';import{Command as _0x4087f6,Flags as _0x3e4e2a}from'@oclif/core';import _0x50fffe from'p-limit';import _0x48dc7f from'picocolors';var _0x16b171=(_0x34e4e7=>(_0x34e4e7['Android']=_0x6d85de(0x201),_0x34e4e7[_0x6d85de(0x2b9)]=_0x6d85de(0x452),_0x34e4e7['Macos']=_0x6d85de(0x4aa),_0x34e4e7[_0x6d85de(0x459)]=_0x6d85de(0x221),_0x34e4e7['Tvos']=_0x6d85de(0x523),_0x34e4e7[_0x6d85de(0x475)]=_0x6d85de(0x4b5),_0x34e4e7))(_0x16b171||{}),_0x373941=(_0x154fe5=>(_0x154fe5[_0x6d85de(0x411)]=_0x6d85de(0x50b),_0x154fe5[_0x6d85de(0x4af)]=_0x6d85de(0x522),_0x154fe5[_0x6d85de(0x549)]=_0x6d85de(0x244),_0x154fe5[_0x6d85de(0x570)]=_0x6d85de(0x3ee),_0x154fe5[_0x6d85de(0x459)]=_0x6d85de(0x3e6),_0x154fe5[_0x6d85de(0x1db)]=_0x6d85de(0x2d6),_0x154fe5[_0x6d85de(0x2a3)]='UNITY',_0x154fe5[_0x6d85de(0x4d6)]=_0x6d85de(0x42b),_0x154fe5))(_0x373941||{}),_0x33b9d4=(_0x402326=>(_0x402326[_0x6d85de(0x336)]='Alpha',_0x402326['Beta']=_0x6d85de(0x430),_0x402326['Canary']='Canary',_0x402326['Demo']=_0x6d85de(0x568),_0x402326[_0x6d85de(0x32a)]=_0x6d85de(0x32a),_0x402326[_0x6d85de(0x442)]=_0x6d85de(0x442),_0x402326[_0x6d85de(0x215)]=_0x6d85de(0x215),_0x402326[_0x6d85de(0x574)]=_0x6d85de(0x574),_0x402326['Qa']='QA',_0x402326[_0x6d85de(0x46e)]=_0x6d85de(0x46e),_0x402326[_0x6d85de(0x57a)]=_0x6d85de(0x57a),_0x402326))(_0x33b9d4||{});function _0x422198(_0x4a5b2f,_0x5c1737){const _0x2383ce=_0x6d85de;if(!_0x4a5b2f['ok'])throw new Error(_0x5c1737??_0x2383ce(0x37b)+_0x4a5b2f['status']);}async function _0x35d3b0(_0x3a5094,_0x34474f){let _0x2a05a5=await fetch(_0x3a5094,_0x34474f);return _0x422198(_0x2a05a5),_0x2a05a5;}function _0x559cd3(_0xf9f514){const _0x125eba=_0x6d85de;return _0xf9f514[_0x125eba(0x3d3)](_0x125eba(0x29d))[_0x125eba(0x43e)](/[\u0300-\u036F]/g,'')[_0x125eba(0x43e)](/\s+/g,'')[_0x125eba(0x43e)](/[^\u0000-\u007F]/g,'');}function _0x2c718f(_0x483fd0){return _0x483fd0!=null&&_0x483fd0!=='';}var _0x3fd950=_0x588606`mutation MigrateFromAppCenter($input: MigrateFromAppcenterInput!) { migrateFromAppCenter(input: $input) { errors { appId message } upsertedApplications { id name releaseChannels(limit: 2, offset: 0) { count list { id name } } project { id name framework organization { id name } } } } }`,_0x516c82=[_0x6d85de(0x33f),_0x6d85de(0x43a),_0x6d85de(0x4f0),'Tizen',_0x6d85de(0x550),_0x6d85de(0x475),_0x6d85de(0x4b9),_0x6d85de(0x3b4)][_0x6d85de(0x498)](_0x376279=>({'os':_0x376279,'pattern':new RegExp(_0x6d85de(0x52a)+_0x376279+_0x6d85de(0x52a),'i')}));function _0x4ea5a2(_0x33f63d){const _0x5415b6=_0x6d85de;let _0x4d1c3b=new Map();return _0x33f63d[_0x5415b6(0x25d)](_0x37d51b=>{const _0x43a3ed=_0x5415b6;let _0x486cf3=_0x37d51b[_0x43a3ed(0x458)];for(let {pattern:_0x4e4e08}of _0x516c82)_0x486cf3=_0x486cf3[_0x43a3ed(0x236)](_0x4e4e08,'');_0x486cf3=_0x486cf3[_0x43a3ed(0x2dd)]()['replaceAll'](/^-+|-+$/g,'');let _0x57cece=_0x486cf3[_0x43a3ed(0x47a)](),_0x464271=_0x4d1c3b[_0x43a3ed(0x598)](_0x57cece)||{'projectName':_0x486cf3,'apps':[]};_0x4d1c3b[_0x43a3ed(0x581)](_0x57cece,{..._0x464271,'apps':[..._0x464271[_0x43a3ed(0x590)],_0x37d51b]});}),[..._0x4d1c3b[_0x5415b6(0x2ec)]()][_0x5415b6(0x3c5)](_0x2197f0=>_0x2197f0[_0x5415b6(0x590)][_0x5415b6(0x404)]>0x1)[_0x5415b6(0x4a9)]((_0xd860a5,_0x1e2a4a)=>_0xd860a5[_0x5415b6(0x5a4)][_0x5415b6(0x502)](_0x1e2a4a[_0x5415b6(0x5a4)]));}var _0x4cb06b=0xc8,_0x2a6c2a=class _0x45bec2 extends _0x4087f6{static [_0x6d85de(0x4cb)]=_0x6d85de(0x58a);static [_0x6d85de(0x314)]={'help':_0x3e4e2a[_0x6d85de(0x486)]({'char':'h'}),'appcenter-api-token':_0x3e4e2a['string']({'description':'AppCenter\x20API\x20Token\x20(create\x20one\x20at\x20https://appcenter.ms/settings/apitokens)','env':_0x6d85de(0x3f0)})};['currentSpinner'];[_0x6d85de(0x1be)](){const _0x39f9c9=_0x6d85de;_0x5a1ffc[_0x39f9c9(0x497)](_0x48dc7f[_0x39f9c9(0x37f)](_0x39f9c9(0x569)+_0x48dc7f['green']('•')+_0x39f9c9(0x59f)+_0x48dc7f[_0x39f9c9(0x41e)]('•')+_0x39f9c9(0x554)+_0x48dc7f[_0x39f9c9(0x41e)]('•')+_0x39f9c9(0x461)+_0x48dc7f['green']('•')+_0x39f9c9(0x56c)+_0x48dc7f[_0x39f9c9(0x45d)](_0x39f9c9(0x355))+_0x39f9c9(0x23a)+_0x48dc7f[_0x39f9c9(0x45d)](_0x39f9c9(0x44a))+_0x39f9c9(0x35f)));}[_0x6d85de(0x46f)](){const _0x13902d=_0x6d85de;_0x5a1ffc['message'](_0x48dc7f['bold'](_0x13902d(0x295))),_0x5a1ffc['message'](_0x48dc7f[_0x13902d(0x37f)](_0x13902d(0x58c)+_0x48dc7f[_0x13902d(0x1a0)](_0x13902d(0x3dd))+'\x0a\x20\x20\x20In\x20'+_0x48dc7f[_0x13902d(0x384)](_0x13902d(0x253))+',\x20add:\x0a\x20\x20\x20'+_0x48dc7f['green'](_0x13902d(0x45e))+_0x13902d(0x4a5)+_0x48dc7f[_0x13902d(0x1a0)](_0x13902d(0x3e8))+_0x13902d(0x19e)+_0x48dc7f[_0x13902d(0x384)](_0x13902d(0x3be))+_0x13902d(0x381)+_0x48dc7f[_0x13902d(0x41e)]('<key>CodePushServerURL</key>')+_0x13902d(0x1e5)+_0x48dc7f[_0x13902d(0x41e)](_0x13902d(0x2f4))+'\x0a\x20\x20\x20\x0a\x20\x20\x20'+_0x48dc7f['cyan'](_0x13902d(0x280))+_0x13902d(0x19e)+_0x48dc7f[_0x13902d(0x384)](_0x13902d(0x364))+_0x13902d(0x1b9)+_0x48dc7f['bold'](_0x13902d(0x2d4))+',\x20add\x20in\x20the\x20configMap\x20:\x0a\x20\x20\x20•\x20key:\x20'+_0x48dc7f[_0x13902d(0x41e)](_0x13902d(0x547))+_0x13902d(0x4d0)+_0x48dc7f[_0x13902d(0x41e)](_0x13902d(0x1da))+_0x13902d(0x4f6)+_0x48dc7f[_0x13902d(0x384)](_0x13902d(0x31b))+_0x13902d(0x360)+_0x48dc7f[_0x13902d(0x41e)]('•')+'\x20For\x20React\x20Native:\x20'+_0x48dc7f[_0x13902d(0x384)](_0x13902d(0x2c2))+_0x13902d(0x1e5)+_0x48dc7f['green']('•')+_0x13902d(0x3b8)+_0x48dc7f[_0x13902d(0x384)](_0x13902d(0x4e6))+_0x13902d(0x1ac)));}async[_0x6d85de(0x1b5)](_0x289c89){const _0x5ef4fc=_0x6d85de;let _0x1ded5d=await _0x47ec2d({'message':'Do\x20you\x20want\x20to\x20migrate\x20only\x20apps\x20that\x20have\x20CodePush\x20deployments?','initialValue':!0x0});if(_0x55bd6c(_0x1ded5d))throw new _0x23a14f();this['currentSpinner']=_0x532d46(),this[_0x5ef4fc(0x2b4)][_0x5ef4fc(0x28d)]('Looking\x20for\x20your\x20apps\x20in\x20AppCenter');let _0x55dcbc=await _0x35d3b0(_0x5ef4fc(0x264),{'headers':{'X-API-Token':_0x289c89,'Content-Type':_0x5ef4fc(0x5a1)}})[_0x5ef4fc(0x254)](_0x39b6b6=>_0x39b6b6[_0x5ef4fc(0x35c)]()),_0x559b20=new Set([_0x5ef4fc(0x586),_0x5ef4fc(0x32f)]),_0x1a60ea=_0x55dcbc[_0x5ef4fc(0x3c5)](_0x263c8d=>_0x263c8d[_0x5ef4fc(0x2c7)][_0x5ef4fc(0x4df)](_0x547da6=>_0x559b20[_0x5ef4fc(0x368)](_0x547da6)));if(_0x1ded5d){this[_0x5ef4fc(0x2b4)][_0x5ef4fc(0x2bb)](),this[_0x5ef4fc(0x2b4)][_0x5ef4fc(0x28d)](_0x5ef4fc(0x376));let _0x2e5451=_0x50fffe(0x5),_0x2ded78=_0x1a60ea[_0x5ef4fc(0x498)](_0x592554=>_0x2e5451(async()=>{const _0x5f27a9=_0x5ef4fc;try{let _0x1dd27a=await _0x35d3b0(_0x5f27a9(0x2fc)+_0x592554[_0x5f27a9(0x2cd)][_0x5f27a9(0x1d3)]+'/'+_0x592554['name']+_0x5f27a9(0x504),{'headers':{'X-API-Token':_0x289c89,'Content-Type':_0x5f27a9(0x5a1)}})[_0x5f27a9(0x254)](_0x274be4=>_0x274be4[_0x5f27a9(0x35c)]());return await _0x284727(0x32),_0x1dd27a['length']>0x0?_0x592554:null;}catch(_0x31320c){return this[_0x5f27a9(0x4cc)]('Error\x20when\x20checking\x20deployments\x20for\x20app\x20'+_0x592554[_0x5f27a9(0x1d3)],_0x31320c),_0x5a1ffc[_0x5f27a9(0x247)]('Error\x20when\x20checking\x20deployments\x20for\x20app\x20'+_0x592554[_0x5f27a9(0x1d3)]),_0x592554;}}));_0x1a60ea=(await Promise[_0x5ef4fc(0x25f)](_0x2ded78))[_0x5ef4fc(0x3c5)](_0x2c718f);}return this[_0x5ef4fc(0x2b4)][_0x5ef4fc(0x2bb)]('Found\x20'+_0x1a60ea['length']+_0x5ef4fc(0x501)),_0x1a60ea[_0x5ef4fc(0x4a9)]((_0x3cdf6d,_0x4b2a16)=>{const _0x5ac337=_0x5ef4fc;let _0x478a63=_0x3cdf6d[_0x5ac337(0x2cd)]['name'][_0x5ac337(0x502)](_0x4b2a16[_0x5ac337(0x2cd)][_0x5ac337(0x1d3)]);return _0x478a63!==0x0?_0x478a63:_0x3cdf6d[_0x5ac337(0x458)][_0x5ac337(0x502)](_0x4b2a16[_0x5ac337(0x458)]);});}async['confirmProjectGroups'](_0x5cf675){const _0x2cdaf5=_0x6d85de;let _0x209ab4=_0x4ea5a2(_0x5cf675);_0x5a1ffc[_0x2cdaf5(0x497)](_0x48dc7f['bold'](_0x2cdaf5(0x371))),_0x209ab4['length']===0x0?_0x5a1ffc[_0x2cdaf5(0x25a)](_0x2cdaf5(0x19a)):(_0x5a1ffc['message'](_0x48dc7f[_0x2cdaf5(0x384)](_0x2cdaf5(0x361))),_0x209ab4[_0x2cdaf5(0x25d)](_0x2149e3=>{const _0x151279=_0x2cdaf5;let _0x2aae3d=_0x48dc7f[_0x151279(0x41e)]('▸')+'\x20'+_0x48dc7f[_0x151279(0x384)](_0x2149e3[_0x151279(0x5a4)])+':';_0x2149e3['apps'][_0x151279(0x25d)](_0x5d1d74=>{const _0x1726d3=_0x151279;_0x2aae3d+='\x0a\x20'+_0x48dc7f[_0x1726d3(0x37f)]('•')+'\x20'+_0x5d1d74[_0x1726d3(0x458)]+'\x20'+_0x48dc7f[_0x1726d3(0x37f)]('('+_0x5d1d74[_0x1726d3(0x2cd)][_0x1726d3(0x1d3)]+'/'+_0x5d1d74['name']+')');}),_0x5a1ffc[_0x151279(0x497)](_0x2aae3d);}));let _0x1f930c=_0x5cf675['filter'](_0x32eff0=>!_0x209ab4[_0x2cdaf5(0x4df)](_0x14f14f=>_0x14f14f['apps'][_0x2cdaf5(0x4df)](_0xbcfb03=>_0xbcfb03['id']===_0x32eff0['id'])));if(_0x1f930c[_0x2cdaf5(0x404)]>0x0){let _0x246a91=_0x48dc7f[_0x2cdaf5(0x384)](_0x2cdaf5(0x4dc));_0x1f930c['forEach'](_0x462895=>{const _0xffe255=_0x2cdaf5;_0x246a91+=_0xffe255(0x50d)+_0x48dc7f[_0xffe255(0x37f)]('•')+'\x20'+_0x462895[_0xffe255(0x458)]+'\x20'+_0x48dc7f[_0xffe255(0x37f)]('('+_0x462895[_0xffe255(0x2cd)][_0xffe255(0x1d3)]+'/'+_0x462895[_0xffe255(0x1d3)]+')');}),_0x5a1ffc['message'](_0x246a91);}let _0x171451=await _0x47ec2d({'message':'Ready\x20to\x20proceed\x20with\x20migration?','initialValue':!0x0});if(_0x55bd6c(_0x171451)||!_0x171451)throw new _0x23a14f();return{'projectGroups':_0x209ab4,'singleApps':_0x1f930c};}[_0x6d85de(0x455)](_0x10c9f0){const _0x31215e=_0x6d85de;switch(_0x10c9f0[_0x31215e(0x2b5)][_0x31215e(0x3f4)]){case _0x31215e(0x2d6):return _0x10c9f0[_0x31215e(0x1d2)]['list'][_0x31215e(0x498)](_0xf125b5=>_0x31215e(0x4d5)+_0x559cd3(_0xf125b5[_0x31215e(0x1d3)])[_0x31215e(0x47a)]()+'/'+_0xf125b5['id']);case'CAPACITOR':case'CORDOVA':case'ELECTRON':case _0x31215e(0x3ee):case _0x31215e(0x3e6):case _0x31215e(0x2a2):case'XAMARIN':return _0x10c9f0[_0x31215e(0x1d2)]['list'][_0x31215e(0x498)](_0x940ffa=>'appzung\x20release\x20deploy\x20--release-channel\x20'+_0x559cd3(_0x940ffa[_0x31215e(0x1d3)])[_0x31215e(0x47a)]()+'/'+_0x940ffa['id']);}}async[_0x6d85de(0x3b6)](_0x355588){const _0x46774e=_0x6d85de;if(!_0x355588[_0x46774e(0x404)])return[];let _0x45a141=_0x355588['map'](_0x17f381=>({'label':_0x17f381[_0x46774e(0x458)]+'\x20('+_0x17f381[_0x46774e(0x2cd)][_0x46774e(0x1d3)]+'/'+_0x17f381[_0x46774e(0x1d3)]+')','value':_0x17f381,'hint':[_0x17f381[_0x46774e(0x4cb)],_0x46774e(0x505)+_0x17f381['platform'],_0x46774e(0x2f0)+_0x17f381['os'],_0x17f381[_0x46774e(0x2db)]&&'Release\x20type:\x20'+_0x17f381[_0x46774e(0x2db)]][_0x46774e(0x3c5)](Boolean)[_0x46774e(0x4bb)]('\x20|\x20')}));if(_0x355588[_0x46774e(0x404)]<=0xa){let _0x5bb85e=await _0x4b6301({'message':_0x46774e(0x202),'options':_0x45a141,'required':!0x0,'maxItems':_0x4cb06b});if(_0x55bd6c(_0x5bb85e))throw new _0x23a14f();return _0x5bb85e;}let _0x5aaadf=[...new Set(_0x355588[_0x46774e(0x498)](_0xe96b39=>_0xe96b39['owner'][_0x46774e(0x1d3)]))],_0x381db4=await _0x44980b({'message':'You\x20can\x20migrate\x20up\x20to\x20'+_0x4cb06b+_0x46774e(0x1e3),'options':[{'label':_0x46774e(0x49f),'value':'filter','hint':_0x46774e(0x541)+_0x5aaadf[_0x46774e(0x404)]+_0x46774e(0x532)},{'label':_0x46774e(0x1bc),'value':_0x46774e(0x25f),'hint':_0x46774e(0x49a)},..._0x355588['length']<=_0x4cb06b?[{'label':_0x46774e(0x282),'value':_0x46774e(0x24a),'hint':_0x46774e(0x292)+_0x355588['length']+_0x46774e(0x36a)}]:[]]});if(_0x55bd6c(_0x381db4))throw new _0x23a14f();if(_0x381db4==='selectAll')return _0x355588;if(_0x381db4==='all'){let _0x480fd8=await _0x4b6301({'message':'Select\x20apps\x20to\x20migrate\x20(Space\x20to\x20select,\x20Enter\x20to\x20confirm)','options':_0x45a141,'required':!0x0,'maxItems':_0x4cb06b});if(_0x55bd6c(_0x480fd8))throw new _0x23a14f();return _0x480fd8;}let _0x4524b6=await _0x44980b({'message':_0x46774e(0x367),'options':_0x5aaadf[_0x46774e(0x498)](_0x10a8ec=>({'label':_0x10a8ec,'value':_0x10a8ec,'hint':_0x355588[_0x46774e(0x3c5)](_0x4e45c7=>_0x4e45c7[_0x46774e(0x2cd)][_0x46774e(0x1d3)]===_0x10a8ec)[_0x46774e(0x404)]+_0x46774e(0x4b4)}))});if(_0x55bd6c(_0x4524b6))throw new _0x23a14f();let _0x45af4c=_0x45a141[_0x46774e(0x3c5)](_0x8affe6=>_0x8affe6[_0x46774e(0x349)][_0x46774e(0x2cd)][_0x46774e(0x1d3)]===_0x4524b6),_0xfef65b=await _0x4b6301({'message':'Select\x20apps\x20from\x20'+_0x4524b6+'\x20(Space\x20to\x20select,\x20Enter\x20to\x20confirm)','options':_0x45af4c,'required':!0x0,'maxItems':_0x4cb06b});if(_0x55bd6c(_0xfef65b))throw new _0x23a14f();return _0xfef65b;}async['run'](){const _0x321e94=_0x6d85de;_0x56f58e(_0x48dc7f[_0x321e94(0x384)](_0x321e94(0x230))),this[_0x321e94(0x1be)]();let {flags:_0x2922fc}=await this[_0x321e94(0x582)](_0x45bec2),_0x347ec2=_0x2922fc[_0x321e94(0x533)]??await _0x58abf2({'message':_0x321e94(0x37a),'validate'(_0x52e6ce){const _0x5d3c8b=_0x321e94;if(!_0x52e6ce)return _0x5d3c8b(0x231);}});try{if(_0x55bd6c(_0x347ec2))throw new _0x23a14f();let _0x288e8d=await this['fetchApps'](_0x347ec2);if(_0x288e8d[_0x321e94(0x404)]===0x0)throw new Error(_0x321e94(0x467));let _0x23604c=await this['selectApps'](_0x288e8d);if(_0x23604c['length']===0x0){_0x4bcff2(_0x321e94(0x257));return;}let _0x3fc115=_0x321e94(0x223)+_0x23604c[_0x321e94(0x404)]+_0x321e94(0x3ef);_0x23604c[_0x321e94(0x25d)](_0x1bd454=>{const _0x5eb720=_0x321e94;_0x3fc115+='\x0a-\x20'+_0x1bd454[_0x5eb720(0x458)]+'\x20('+_0x1bd454[_0x5eb720(0x2cd)]['name']+'/'+_0x1bd454[_0x5eb720(0x1d3)]+')';}),_0x5a1ffc[_0x321e94(0x497)](_0x3fc115);let {projectGroups:_0x72cc76,singleApps:_0x19702e}=await this[_0x321e94(0x4ba)](_0x23604c);this[_0x321e94(0x2b4)]=_0x532d46(),this[_0x321e94(0x2b4)][_0x321e94(0x28d)](_0x321e94(0x3e7));let {data:_0x5cda6c}=await _0x26ea89[_0x321e94(0x56e)](_0x3fd950,{'input':{'appcenterToken':_0x347ec2,'applications':[..._0x19702e['map'](_0x5b02a4=>({'id':_0x5b02a4['id']})),..._0x72cc76[_0x321e94(0x33d)](_0x3cf6a6=>_0x3cf6a6['apps'][_0x321e94(0x498)](_0x5bf691=>({'id':_0x5bf691['id'],'projectName':_0x3cf6a6[_0x321e94(0x5a4)]})))]}});if(this[_0x321e94(0x2b4)][_0x321e94(0x2bb)](_0x321e94(0x33b)),_0x5cda6c[_0x321e94(0x48d)][_0x321e94(0x435)][_0x321e94(0x404)]){let _0x28682f=_0x5cda6c[_0x321e94(0x48d)]['upsertedApplications'][_0x321e94(0x54d)]((_0x576ecb,_0xe73bb0)=>{const _0xb5e025=_0x321e94;let _0x4dd0d2=_0xe73bb0[_0xb5e025(0x2b5)][_0xb5e025(0x30d)][_0xb5e025(0x1d3)],_0x1b68d2=_0xe73bb0[_0xb5e025(0x2b5)][_0xb5e025(0x1d3)],_0x4889a9=_0x576ecb+(_0xb5e025(0x42e)+_0x4dd0d2+_0xb5e025(0x3e5)+_0x1b68d2+_0xb5e025(0x3e5)+_0xe73bb0[_0xb5e025(0x1d3)]);if(!_0xe73bb0[_0xb5e025(0x1d2)][_0xb5e025(0x35a)])return _0x4889a9;let _0x434ef0=this[_0xb5e025(0x455)](_0xe73bb0),_0x216d3d=_0xe73bb0[_0xb5e025(0x1d2)]['count']>_0xe73bb0[_0xb5e025(0x1d2)][_0xb5e025(0x2da)]['length']?_0x48dc7f[_0xb5e025(0x37f)](_0xb5e025(0x25b)+(_0xe73bb0[_0xb5e025(0x1d2)][_0xb5e025(0x35a)]-_0xe73bb0[_0xb5e025(0x1d2)]['list'][_0xb5e025(0x404)])+_0xb5e025(0x4ec)):'';return _0x4889a9+_0x434ef0['map'](_0x1095d5=>_0x48dc7f[_0xb5e025(0x37f)](_0xb5e025(0x20c)+_0x1095d5))['join']('')+_0x216d3d;},_0x321e94(0x19d));_0x5a1ffc[_0x321e94(0x196)](_0x28682f);}if(_0x5cda6c['migrateFromAppCenter'][_0x321e94(0x444)][_0x321e94(0x404)]){let _0x2285e8=_0x5cda6c[_0x321e94(0x48d)][_0x321e94(0x444)][_0x321e94(0x54d)]((_0x316674,_0x4b3443)=>{const _0x3bc358=_0x321e94;let _0x56d802=_0x23604c[_0x3bc358(0x2e9)](_0x26f63c=>_0x26f63c['id']===_0x4b3443[_0x3bc358(0x27c)]),_0x59cbc2=_0x56d802?_0x56d802['display_name']+'\x20('+_0x56d802['owner'][_0x3bc358(0x1d3)]+'/'+_0x56d802[_0x3bc358(0x1d3)]+')':_0x4b3443[_0x3bc358(0x27c)];return _0x316674+(_0x3bc358(0x42e)+_0x59cbc2+':\x20'+_0x4b3443[_0x3bc358(0x497)]);},_0x321e94(0x311));_0x5a1ffc[_0x321e94(0x48c)](_0x2285e8);}if(!_0x5cda6c['migrateFromAppCenter'][_0x321e94(0x435)][_0x321e94(0x404)]){_0x5a1ffc[_0x321e94(0x247)](_0x321e94(0x1a7)),_0x4bcff2();return;}this['showNextSteps'](),_0x157952(_0x48dc7f['green'](_0x321e94(0x564)+(_0x5cda6c[_0x321e94(0x48d)][_0x321e94(0x444)]['length']?'':'\x20successfully')+'!'));}catch(_0x5bd917){this[_0x321e94(0x2b4)]?.['stop'](void 0x0,0x1),_0x5bd917 instanceof _0x23a14f?_0x4bcff2(_0x321e94(0x520)):_0x4bcff2('Migration\x20failed'),_0x459767(_0x5bd917);}}};import{cancel as _0x58c361,intro as _0xf53935,log as _0x4b567c,outro as _0x3e0a84}from'@clack/prompts';import{Flags as _0x406aaf}from'@oclif/core';import{Flags as _0x438982}from'@oclif/core';import{valid as _0x5d0bfc,validRange as _0x43b4b9}from'semver';var _0x21b5f9=_0x438982[_0x6d85de(0x304)]({'char':'t','description':_0x6d85de(0x558),async 'parse'(_0x344cec,_0xca0b0b){const _0x29dcba=_0x6d85de;if(_0x5d0bfc(_0x344cec))return _0x344cec;if(_0x43b4b9(_0x344cec)){if(_0xca0b0b[_0x29dcba(0x4fc)]['includes'](_0x29dcba(0x3c2)))return _0x344cec;throw new Error(_0x344cec+_0x29dcba(0x465));}throw new Error(_0x344cec+_0x29dcba(0x1d5));}});import{outro as _0x22df52,spinner as _0x1c9dfa}from'@clack/prompts';import{Command as _0x252888,Flags as _0x4d4bcf}from'@oclif/core';import _0x15af40 from'node:crypto';import{promises as _0x4d3c81}from'node:fs';import _0x113f70 from'node:path';import _0x150275 from'picocolors';var _0x12da30=_0x588606`query ApplicationProjectInfo($input: ReleaseChannelIdentifierInput!) { releaseChannel(input: $input) { id name application { id name platform project { id framework } } } }`;async function _0x4c71c2(_0x2e19e1,_0x13b400){const _0x8f2a9=_0x6d85de;let {data:_0x14f3d8}=await _0x26ea89[_0x8f2a9(0x22b)](_0x12da30,{'input':{'byId':{'releaseChannelId':_0x2e19e1}}},{'apiKey':_0x13b400});return _0x14f3d8;}import{Flags as _0x1755e2}from'@oclif/core';var _0x4ceff1=()=>_0x1755e2['string']({'char':'s','description':_0x6d85de(0x41f),'helpGroup':_0x6d85de(0x399)});import{Flags as _0x1b593c}from'@oclif/core';var _0x56e4e1=()=>_0x1b593c[_0x6d85de(0x1a5)]({'description':'Description\x20of\x20the\x20changes\x20made\x20to\x20the\x20app\x20in\x20this\x20release',async 'parse'(_0x112b0f){const _0x462b79=_0x6d85de;if(_0x112b0f[_0x462b79(0x404)]>0xff)throw new Error(_0x112b0f+_0x462b79(0x4b3));return _0x112b0f;}});import{Flags as _0x220cc0}from'@oclif/core';var _0x197923=()=>_0x220cc0[_0x6d85de(0x521)]({'char':'x','description':_0x6d85de(0x4a4),'allowNo':!0x0});import{Flags as _0x3b9d0e}from'@oclif/core';var _0x1bc696=()=>_0x3b9d0e[_0x6d85de(0x521)]({'char':'m','description':_0x6d85de(0x44d),'allowNo':!0x0});import{Flags as _0x4b23a8}from'@oclif/core';var _0x2e31fc=/^(?:[\da-f]{8}-[\da-f]{4}-[1-8][\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}|0{8}-(?:0{4}-){3}0{12}|f{8}-(?:f{4}-){3}f{12})$/i;function _0x151db4(_0x366535){const _0x7cba51=_0x6d85de;return typeof _0x366535=='string'&&_0x2e31fc[_0x7cba51(0x4cf)](_0x366535);}var _0x2cf49c=(_0x1de8af={})=>_0x4b23a8[_0x6d85de(0x1a5)]({'description':(_0x1de8af[_0x6d85de(0x3f8)]?_0x1de8af[_0x6d85de(0x3f8)]+'\x20release':'Release')+_0x6d85de(0x513),'required':!0x1,'helpGroup':_0x1de8af[_0x6d85de(0x4ed)],async 'parse'(_0x11b380){const _0x2c6d84=_0x6d85de;let _0x34381b=_0x11b380[_0x2c6d84(0x42f)](-0x24);if(!_0x151db4(_0x34381b))throw new Error(_0x34381b+_0x2c6d84(0x428));return _0x34381b;}});import{Flags as _0x4ac84c}from'@oclif/core';var _0x44390=()=>_0x4ac84c[_0x6d85de(0x3e1)]({'char':'r','description':_0x6d85de(0x345),'min':0x1,'max':0x64});import{isCancel as _0x83a325,outro as _0x40a02c}from'@clack/prompts';import{isCancel as _0x55dcc2,outro as _0x1acbc9}from'@clack/prompts';import{isCancel as _0x41e11d,outro as _0x14f92c}from'@clack/prompts';import{isCancel as _0x258498,log as _0x28c8c6,select as _0x14337e,spinner as _0x15fc53}from'@clack/prompts';import _0x4383d1 from'picocolors';var _0x5f43f9=_0x588606`query ListMyOrganizations($limit: PositiveInt!, $offset: Int!) { me { id organizations(limit: $limit, offset: $offset) { count list { id name email slug } } } }`;async function _0x2cfb82({offset:_0x5284f3=0x0,allOrganizations:_0xbc6ad=[]}={}){const _0x13e9b5=_0x6d85de;let _0x19b59a=_0x15fc53();_0x19b59a['start'](_0x13e9b5(0x363));let {data:_0xfbf395}=await _0x26ea89['query'](_0x5f43f9,{'limit':0xa,'offset':_0x5284f3}),{list:_0x5ae60f,count:_0x3aabbc}=_0xfbf395['me'][_0x13e9b5(0x559)];if(_0x19b59a[_0x13e9b5(0x2bb)](_0x5284f3?'':_0x13e9b5(0x477)+_0x3aabbc+'\x20organization(s)'),_0x3aabbc===0x0)return;if(_0x3aabbc===0x1&&_0x5ae60f[0x0])return _0x28c8c6[_0x13e9b5(0x497)](_0x4383d1[_0x13e9b5(0x37f)](_0x5ae60f[0x0][_0x13e9b5(0x423)])),_0x5ae60f[0x0];_0xbc6ad[_0x13e9b5(0x1bf)](..._0x5ae60f);let _0x1c784c=_0xbc6ad[_0x13e9b5(0x498)](_0xd27c58=>({'value':_0xd27c58[_0x13e9b5(0x423)],'label':_0xd27c58[_0x13e9b5(0x1d3)]+'\x20'+_0x4383d1[_0x13e9b5(0x37f)]('('+_0xd27c58[_0x13e9b5(0x423)]+')')}));_0x3aabbc>(_0x5284f3+0x1)*0xa&&_0x1c784c['push']({'value':'load-more','label':_0x13e9b5(0x25e)});let _0x117178=_0x1c784c['at'](_0x5284f3),_0x12e9d3=await _0x14337e({'message':_0x13e9b5(0x3b3),'options':_0x1c784c,'initialValue':_0x117178?.[_0x13e9b5(0x349)]});if(typeof _0x12e9d3!=_0x13e9b5(0x1a5))return _0x12e9d3;if(_0x12e9d3==='load-more')return _0x2cfb82({'allOrganizations':_0xbc6ad,'offset':_0x5284f3+0xa});let _0x464011=_0xbc6ad[_0x13e9b5(0x2e9)](_0x38a89c=>_0x38a89c[_0x13e9b5(0x423)]===_0x12e9d3);if(!_0x464011)throw new Error(_0x13e9b5(0x470));return _0x464011;}async function _0x1d7379(_0x33913a={}){const _0x4da783=_0x6d85de;let _0x17ce7e=await _0x2cfb82(_0x33913a);return _0x258498(_0x17ce7e)||!_0x17ce7e?_0x17ce7e:_0x17ce7e[_0x4da783(0x423)];}import{log as _0x49340d,select as _0x4a8b41,spinner as _0x98c2b3}from'@clack/prompts';import _0x5a17b5 from'picocolors';var _0x5e6ef5=_0x588606`query ListMyProjects($input: OrganizationIdentifierInput!, $limit: PositiveInt!, $offset: Int!) { organization(input: $input) { id projects(limit: $limit, offset: $offset) { count list { id name slug framework } } } }`;async function _0x18c8ac(_0x2f77f4,{offset:_0x4c040d=0x0,allProjects:_0xbb984f=[]}={}){const _0x18f582=_0x6d85de;let _0x3a3e91=_0x98c2b3();_0x3a3e91[_0x18f582(0x28d)](_0x18f582(0x4d1));let {data:_0x515a14}=await _0x26ea89[_0x18f582(0x22b)](_0x5e6ef5,{'input':{'bySlug':{'organizationSlug':_0x2f77f4}},'limit':0xa,'offset':_0x4c040d}),{list:_0x4bf228,count:_0x2464bb}=_0x515a14[_0x18f582(0x30d)][_0x18f582(0x4ef)];if(_0x3a3e91[_0x18f582(0x2bb)](_0x4c040d?'':_0x18f582(0x477)+_0x2464bb+_0x18f582(0x2a7)),_0x2464bb===0x0)return;if(_0x2464bb===0x1&&_0x4bf228[0x0])return _0x49340d['message'](_0x5a17b5['dim'](_0x4bf228[0x0][_0x18f582(0x423)])),_0x4bf228[0x0][_0x18f582(0x423)];_0xbb984f['push'](..._0x4bf228);let _0x6ba173=_0xbb984f[_0x18f582(0x498)](_0x590521=>({'value':_0x590521[_0x18f582(0x423)],'label':_0x590521[_0x18f582(0x1d3)]+'\x20'+_0x5a17b5['dim']('('+_0x590521[_0x18f582(0x423)]+')')}));_0x2464bb>(_0x4c040d+0x1)*0xa&&_0x6ba173[_0x18f582(0x1bf)]({'value':_0x18f582(0x372),'label':_0x18f582(0x25e)});let _0x98a17a=_0x6ba173['at'](_0x4c040d),_0x538e2c=await _0x4a8b41({'message':'Select\x20a\x20project','options':_0x6ba173,'initialValue':_0x98a17a?.[_0x18f582(0x349)]});return _0x538e2c===_0x18f582(0x372)?_0x18c8ac(_0x2f77f4,{'allProjects':_0xbb984f,'offset':_0x4c040d+0xa}):_0x538e2c;}async function _0x5bdd74(_0xf60ae0={}){const _0x4d7fa7=_0x6d85de;let _0x1ea7a6=_0xf60ae0[_0x4d7fa7(0x39c)]??await _0x1d7379();if(_0x41e11d(_0x1ea7a6)||!_0x1ea7a6)throw _0x14f92c(_0x4d7fa7(0x49c)),new _0x23a14f();let _0x1095bb=_0xf60ae0[_0x4d7fa7(0x2b5)]??await _0x18c8ac(_0x1ea7a6);if(_0x41e11d(_0x1095bb)||!_0x1095bb)throw _0x14f92c(_0x4d7fa7(0x3b5)),new _0x23a14f();return{'organizationSlug':_0x1ea7a6,'projectSlug':_0x1095bb};}import{log as _0x4fc934,select as _0x37f5b5,spinner as _0x13cb87}from'@clack/prompts';import _0x1c642a from'picocolors';var _0x5ac629=_0x588606`query ListMyApplications($input: ProjectIdentifierInput!, $limit: PositiveInt!, $offset: Int!) { project(input: $input) { id applications(limit: $limit, offset: $offset) { count list { id name slug platform } } } }`;async function _0x123375(_0x60d7e1,_0x54fcac,{offset:_0x49026c=0x0,allApplications:_0x97033=[]}={}){const _0xaa6f55=_0x6d85de;let _0x341123=_0x13cb87();_0x341123['start'](_0xaa6f55(0x390));let {data:_0xbc25d9}=await _0x26ea89[_0xaa6f55(0x22b)](_0x5ac629,{'input':{'bySlug':{'organizationSlug':_0x60d7e1,'projectSlug':_0x54fcac}},'limit':0xa,'offset':_0x49026c}),{list:_0x58d2d7,count:_0xff4d4b}=_0xbc25d9[_0xaa6f55(0x2b5)][_0xaa6f55(0x3cb)];if(_0x341123['stop'](_0x49026c?'':_0xaa6f55(0x477)+_0xff4d4b+_0xaa6f55(0x3c3)),_0xff4d4b===0x0)return;if(_0xff4d4b===0x1&&_0x58d2d7[0x0])return _0x4fc934[_0xaa6f55(0x497)](_0x1c642a[_0xaa6f55(0x37f)](_0x58d2d7[0x0][_0xaa6f55(0x423)])),_0x58d2d7[0x0][_0xaa6f55(0x423)];_0x97033[_0xaa6f55(0x1bf)](..._0x58d2d7);let _0x374a91=_0x97033['map'](_0x581146=>({'value':_0x581146[_0xaa6f55(0x423)],'label':_0x581146['name']+'\x20'+_0x1c642a[_0xaa6f55(0x37f)]('('+_0x581146[_0xaa6f55(0x423)]+')')}));_0xff4d4b>(_0x49026c+0x1)*0xa&&_0x374a91[_0xaa6f55(0x1bf)]({'value':'load-more','label':'Load\x20more'});let _0x1a52f6=_0x374a91['at'](_0x49026c),_0x21fb07=await _0x37f5b5({'message':_0xaa6f55(0x38e),'options':_0x374a91,'initialValue':_0x1a52f6?.[_0xaa6f55(0x349)]});return _0x21fb07===_0xaa6f55(0x372)?_0x123375(_0x60d7e1,_0x54fcac,{'allApplications':_0x97033,'offset':_0x49026c+0xa}):_0x21fb07;}async function _0x17a416(_0x57ffc8={}){const _0x50622b=_0x6d85de;let {organizationSlug:_0x1c2772,projectSlug:_0x1194e1}=await _0x5bdd74({'org':_0x57ffc8[_0x50622b(0x39c)],'project':_0x57ffc8[_0x50622b(0x2b5)]}),_0x4fb3f8=_0x57ffc8[_0x50622b(0x4d9)]??await _0x123375(_0x1c2772,_0x1194e1);if(_0x55dcc2(_0x4fb3f8)||!_0x4fb3f8)throw _0x1acbc9(_0x50622b(0x3f2)),new _0x23a14f();return{'applicationSlug':_0x4fb3f8,'projectSlug':_0x1194e1,'organizationSlug':_0x1c2772};}import{log as _0x597bcf,select as _0x39c06c,spinner as _0xac046b}from'@clack/prompts';import _0x45f9e2 from'picocolors';var _0x5c2b9d=_0x588606`query ListMyReleaseChannels($input: ApplicationIdentifierInput!, $limit: PositiveInt!, $offset: Int!) { application(input: $input) { id releaseChannels(limit: $limit, offset: $offset) { count list { id publicId name } } } }`;async function _0xaa53c6(_0x49922c,{offset:_0x22a779=0x0,allReleaseChannels:_0x4cd0bc=[],selectMessage:_0x2e99f5=_0x6d85de(0x227)}={}){const _0x60d424=_0x6d85de;let _0x363e4b=_0xac046b();_0x363e4b['start'](_0x60d424(0x277));let {data:_0x2ee908}=await _0x26ea89[_0x60d424(0x22b)](_0x5c2b9d,{'input':{'bySlug':_0x49922c},'limit':0xa,'offset':_0x22a779}),{list:_0x56a0ff,count:_0x118ea1}=_0x2ee908['application'][_0x60d424(0x1d2)];if(_0x363e4b['stop'](_0x22a779?'':'Found\x20'+_0x118ea1+_0x60d424(0x51f)),_0x118ea1===0x0)return;if(_0x118ea1===0x1&&_0x56a0ff[0x0])return _0x597bcf[_0x60d424(0x497)](_0x45f9e2['dim'](_0x56a0ff[0x0][_0x60d424(0x1d3)])),_0x56a0ff[0x0]['id'];_0x4cd0bc[_0x60d424(0x1bf)](..._0x56a0ff);let _0x5e1108=_0x4cd0bc[_0x60d424(0x498)](_0x17362c=>({'value':_0x17362c['id'],'label':_0x17362c['name']+'\x20'+_0x45f9e2[_0x60d424(0x37f)]('('+_0x17362c[_0x60d424(0x26f)]+')')}));_0x118ea1>(_0x22a779+0x1)*0xa&&_0x5e1108[_0x60d424(0x1bf)]({'value':_0x60d424(0x372),'label':_0x60d424(0x25e)});let _0xdcce5d=_0x5e1108['at'](_0x22a779),_0x237077=await _0x39c06c({'message':_0x2e99f5,'options':_0x5e1108,'initialValue':_0xdcce5d?.[_0x60d424(0x349)]});return _0x237077===_0x60d424(0x372)?_0xaa53c6(_0x49922c,{'allReleaseChannels':_0x4cd0bc,'offset':_0x22a779+0xa,'selectMessage':_0x2e99f5}):_0x237077;}async function _0xe4cd00(_0x3ad89d={}){const _0x1b02ce=_0x6d85de;let {organizationSlug:_0x3a06f1,projectSlug:_0x2cde5c,applicationSlug:_0x32732c}=await _0x17a416({'org':_0x3ad89d['org'],'project':_0x3ad89d[_0x1b02ce(0x2b5)],'app':_0x3ad89d['app']}),_0x5e9672=_0x3ad89d[_0x1b02ce(0x324)]??await _0xaa53c6({'organizationSlug':_0x3a06f1,'projectSlug':_0x2cde5c,'applicationSlug':_0x32732c},{'selectMessage':_0x3ad89d[_0x1b02ce(0x4a0)]});if(_0x83a325(_0x5e9672)||!_0x5e9672)throw _0x40a02c(_0x1b02ce(0x250)),new _0x23a14f();return{'applicationSlug':_0x32732c,'projectSlug':_0x2cde5c,'organizationSlug':_0x3a06f1,'releaseChannelId':_0x5e9672};}import _0x4a69fb from'node:crypto';import{promises as _0x27a645}from'node:fs';import _0x20889a from'node:os';import _0x4d85b4 from'node:path';async function _0x289f61(){const _0x4b2dbb=_0x6d85de;let _0x30973b=_0x4d85b4['join'](_0x20889a[_0x4b2dbb(0x259)](),'appzung'),_0x102269=_0x4a69fb[_0x4b2dbb(0x462)](0x6)[_0x4b2dbb(0x421)](_0x4b2dbb(0x518)),_0x47bd41=_0x4d85b4[_0x4b2dbb(0x4bb)](_0x30973b,_0x102269);return await _0x27a645[_0x4b2dbb(0x2ab)](_0x47bd41,{'recursive':!0x0}),_0x47bd41;}var _0x1f99aa=_0x588606`mutation CompleteReleaseAfterUpload($input: CompleteReleaseAfterUploadInput!) { completeReleaseAfterUpload(input: $input) { release { id versionNumber targetBinaryVersionRange releaseChannel { id name } } } }`,_0x3323cc=_0x588606`mutation CreateReleaseForUpload($input: CreateReleaseForUploadInput!) { createReleaseForUpload(input: $input) { signedUploadUrl manifestSignedUploadUrl release { id } } }`;import _0x3eceb0 from'node:crypto';import _0x3a9938 from'node:path';var _0x46e36d=_0x6d85de(0x34f);import{promises as _0x1cd0e8}from'node:fs';import _0x31a7f0 from'node:path';async function _0x227406(_0xbb56f1){const _0x501c95=_0x6d85de;if(!(await _0x1cd0e8[_0x501c95(0x234)](_0xbb56f1))[_0x501c95(0x52e)]())return[_0xbb56f1];let _0x103c15=[];for(let _0x3be5b6 of await _0x1cd0e8[_0x501c95(0x51d)](_0xbb56f1))_0x103c15[_0x501c95(0x1bf)](...await _0x227406(_0x31a7f0[_0x501c95(0x4bb)](_0xbb56f1,_0x3be5b6)));return _0x103c15;}import _0x15f39a from'node:crypto';import _0x3ae3af from'node:fs';function _0x17560e(_0x44532b,_0x15863b){return new Promise((_0x5a26f4,_0x467d7a)=>{const _0x2403b8=_0x191b;let _0x363161=_0x15f39a[_0x2403b8(0x3db)](_0x15863b[_0x2403b8(0x1a1)]);_0x44532b['on'](_0x2403b8(0x48c),_0xcbf8ce=>{_0x363161['end'](),_0x467d7a(_0xcbf8ce);})['on']('end',()=>{const _0x459249=_0x2403b8;_0x363161['end']();let _0x42ec17=_0x363161['read']()['toString'](_0x15863b[_0x459249(0x2df)]);_0x5a26f4(_0x42ec17);}),_0x44532b[_0x2403b8(0x2b1)](_0x363161);});}function _0x4048e1(_0x14b570,_0x1f415e){const _0x2b0131=_0x6d85de;let _0xc6f28f=_0x3ae3af[_0x2b0131(0x382)](_0x14b570);return _0x17560e(_0xc6f28f,_0x1f415e);}function _0x3548be(_0x5d4739){return _0x5d4739['replaceAll']('\x5c','/');}var _0x2dcd5f=_0x6d85de(0x33e),_0x1c81be=class _0x4a243a{constructor(_0x70990b=new Map()){const _0xa47d7=_0x6d85de;this[_0xa47d7(0x3a3)]=_0x70990b;}static async['createFromDirectory'](_0xc2b410,_0x19fd60){const _0x1c36bd=_0x6d85de;let _0x14c55c=await _0x227406(_0xc2b410);if(!_0x14c55c[_0x1c36bd(0x404)])throw new Error(_0x1c36bd(0x2d3));let _0x11ffcb=await _0x19bc24(_0x14c55c,_0x19fd60);return new _0x4a243a(_0x11ffcb);}[_0x6d85de(0x2bd)](){const _0x5b45df=_0x6d85de;return JSON[_0x5b45df(0x4de)](Object[_0x5b45df(0x4eb)](Array[_0x5b45df(0x431)](this['fileHashesMap']['entries']())));}[_0x6d85de(0x553)](_0x168220=_0x6d85de(0x416)){const _0x3641a2=_0x6d85de;let _0x544e2e=Array[_0x3641a2(0x431)](this[_0x3641a2(0x3a3)][_0x3641a2(0x2e5)]())[_0x3641a2(0x498)](([_0x504b32,_0x299ae8])=>_0x504b32+':'+_0x299ae8)[_0x3641a2(0x4a9)]();return _0x3eceb0[_0x3641a2(0x3db)](_0x2dcd5f)[_0x3641a2(0x4b0)](JSON[_0x3641a2(0x4de)](_0x544e2e))[_0x3641a2(0x2df)](_0x168220);}};function _0x3d6fca(_0x543757){const _0x5d4117=_0x6d85de;let _0x251e27=_0x5d4117(0x4dd),_0x4348cc=_0x5d4117(0x1ba);return _0x543757[_0x5d4117(0x432)](_0x251e27)||_0x543757===_0x4348cc||_0x543757['endsWith']('/'+_0x4348cc)||_0x543757===_0x46e36d||_0x543757[_0x5d4117(0x260)]('/'+_0x46e36d);}async function _0x19bc24(_0xaf542e,_0x3616e5){const _0x1fea39=_0x6d85de;let _0x2dd477=new Map();for(let _0x4d57bd of _0xaf542e){let _0x175161=_0x3548be(_0x3a9938['relative'](_0x3616e5,_0x4d57bd));if(_0x3d6fca(_0x175161))continue;let _0x46448b=await _0x4048e1(_0x4d57bd,{'algorithm':_0x2dcd5f,'digest':_0x1fea39(0x416)});_0x2dd477[_0x1fea39(0x581)](_0x175161,_0x46448b);}return _0x2dd477;}import{promises as _0x13d4f3}from'node:fs';import _0x1fc7e7 from'node:path';import{promises as _0x142224}from'node:fs';async function _0x52e0c9(_0x15aaee){const _0x313267=_0x6d85de;return(await _0x142224[_0x313267(0x234)](_0x15aaee))['isDirectory']();}async function _0x2d4c2d(_0x790390,_0x364f10){const _0xad89e0=_0x6d85de;let _0x4f89f8=await _0x289f61(),_0xedb53d=_0x1fc7e7[_0xad89e0(0x4bb)](_0x4f89f8,_0xad89e0(0x240));if(await _0x13d4f3[_0xad89e0(0x2ab)](_0xedb53d),_0x364f10)await _0x13d4f3['cp'](_0x790390,_0xedb53d,{'recursive':!0x0});else{let _0x50fa4d=_0x1fc7e7[_0xad89e0(0x582)](_0x790390)[_0xad89e0(0x397)];await _0x13d4f3['copyFile'](_0x790390,_0x1fc7e7[_0xad89e0(0x4bb)](_0xedb53d,_0x50fa4d));}return{'temporaryDirectoryPath':_0x4f89f8,'codePushDirectoryPath':_0xedb53d};}async function _0x20a339({framework:_0x3b86c3,filePath:_0x1ebb94,willSignUsingPrivateKey:_0x1b5e69}){const _0x3660b1=_0x6d85de;let _0x375989=await _0x52e0c9(_0x1ebb94);if(_0x3b86c3!==_0x3660b1(0x2d6)&&!_0x1b5e69)return{'isDirectory':_0x375989,'filePath':_0x1ebb94};if(_0x375989&&_0x1fc7e7[_0x3660b1(0x235)](_0x1ebb94)===_0x3660b1(0x240))return{'isDirectory':_0x375989,'filePath':_0x1ebb94};let {temporaryDirectoryPath:_0x37ec1e,codePushDirectoryPath:_0x434649}=await _0x2d4c2d(_0x1ebb94,_0x375989);return{'isDirectory':!0x0,'filePath':_0x434649,'temporaryDirectoryToRemoveOnceFinished':_0x37ec1e};}import{execSync as _0x4f50e0}from'node:child_process';async function _0x32a9c0(){const _0x49572e=_0x6d85de;try{return _0x4f50e0('git\x20log\x20-1\x20--pretty=format:%s',{'encoding':_0x49572e(0x232),'windowsHide':!0x0})[_0x49572e(0x2dd)]();}catch{throw new Error(_0x49572e(0x2fa));}}import*as _0x509c3b from'jose';import*as _0x288933 from'node:fs/promises';import*as _0x5a8f50 from'node:path';import{log as _0x89312e}from'@clack/prompts';import{createPrivateKey as _0x2075ac}from'node:crypto';var _0x42b751='1.0.0';async function _0x5bd92a(_0x388232){const _0xb0d312=_0x6d85de;try{await _0x288933[_0xb0d312(0x484)](_0x388232,_0x288933[_0xb0d312(0x488)][_0xb0d312(0x1c4)]),_0x89312e[_0xb0d312(0x497)](_0xb0d312(0x539)+_0x388232),await _0x288933[_0xb0d312(0x44b)](_0x388232);}catch(_0x123371){if(_0x123371 instanceof Error&&_0xb0d312(0x565)in _0x123371&&_0x1