UNPKG

@taazkareem/clickup-mcp-server

Version:

ClickUp MCP Server - Powering AI Agents with full ClickUp task, document, and chat management capabilities.

1 lines 40.5 kB
function a0_0x2f66(_0x431fce,_0xb0c53d){_0x431fce=_0x431fce-0x105;const _0x470a83=a0_0x470a();let _0x2f6609=_0x470a83[_0x431fce];if(a0_0x2f66['hDPXJb']===undefined){var _0xe15f75=function(_0x240da6){const _0x20d0bc='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x171f04='',_0x101c41='';for(let _0x31e247=0x0,_0x3a41d0,_0x36d6db,_0xb95df4=0x0;_0x36d6db=_0x240da6['charAt'](_0xb95df4++);~_0x36d6db&&(_0x3a41d0=_0x31e247%0x4?_0x3a41d0*0x40+_0x36d6db:_0x36d6db,_0x31e247++%0x4)?_0x171f04+=String['fromCharCode'](0xff&_0x3a41d0>>(-0x2*_0x31e247&0x6)):0x0){_0x36d6db=_0x20d0bc['indexOf'](_0x36d6db);}for(let _0x340ef9=0x0,_0x521ea2=_0x171f04['length'];_0x340ef9<_0x521ea2;_0x340ef9++){_0x101c41+='%'+('00'+_0x171f04['charCodeAt'](_0x340ef9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x101c41);};a0_0x2f66['oDNqku']=_0xe15f75,a0_0x2f66['pkCpCY']={},a0_0x2f66['hDPXJb']=!![];}const _0x38b088=_0x470a83[0x0],_0x37183e=_0x431fce+_0x38b088,_0x323501=a0_0x2f66['pkCpCY'][_0x37183e];return!_0x323501?(_0x2f6609=a0_0x2f66['oDNqku'](_0x2f6609),a0_0x2f66['pkCpCY'][_0x37183e]=_0x2f6609):_0x2f6609=_0x323501,_0x2f6609;}const a0_0x4f2d02=a0_0x2f66;(function(_0x2dba3b,_0x16f624){const _0x1cef3a=a0_0x2f66,_0x2882b3=_0x2dba3b();while(!![]){try{const _0x435ce1=parseInt(_0x1cef3a(0x235))/0x1*(parseInt(_0x1cef3a(0x110))/0x2)+parseInt(_0x1cef3a(0x14f))/0x3*(-parseInt(_0x1cef3a(0x16f))/0x4)+-parseInt(_0x1cef3a(0x1fa))/0x5*(-parseInt(_0x1cef3a(0x159))/0x6)+-parseInt(_0x1cef3a(0x23c))/0x7*(-parseInt(_0x1cef3a(0x199))/0x8)+-parseInt(_0x1cef3a(0x191))/0x9*(parseInt(_0x1cef3a(0x136))/0xa)+-parseInt(_0x1cef3a(0x1c1))/0xb+parseInt(_0x1cef3a(0x20f))/0xc;if(_0x435ce1===_0x16f624)break;else _0x2882b3['push'](_0x2882b3['shift']());}catch(_0xe7d923){_0x2882b3['push'](_0x2882b3['shift']());}}}(a0_0x470a,0x9a0a0));import{BaseClickUpService,ErrorCode,ClickUpServiceError}from'../base.js';import{ListService}from'../list.js';import{findBestMatchInArray}from'../../../utils/resolver-utils.js';function a0_0x470a(){const _0x36dcc5=['zwqGkfa','CIb0yxm','DwXgEw0','C2TcEum','z2v0','AYbJywm','DhLWzxm','C2TbDhq','zw1Izxi','DxrPBgK','BgXIywm','y2f0zvq','DgvHBuK','A3mGzM8','y2HTzw4','ie11Bhq','l3rLyw0','zM11Buu','uKfor0u','igzYB20','zgf0yq','BMfTzq','Dg9mB3C','zxH0CMe','A2XPC3q','y2f0y2G','y29Kzq','zgvFBwe','Axn0ia','DwXRihq','Dxn0B20','z2v0q3u','CMnZB0K','tM9Ulwq','lI90yxm','BMvLCW','mJK4mtG1ogfHCMLgwa','tNnXENO','yw1Lvg8','Dw5Yzxm','C3rVBvq','ihjLC3a','zsb0yxm','C2XPy2u','s21YALe','BwfRzvi','CMvTB3y','BMvL','z2v0qwW','C3bSAxq','zvDMq0y','zhvLx2q','BwfW','BMfTzvq','q0fdseu','rNjVBuW','DgfZAYa','zuLK','l2j1BgS','y3jLyxq','zfrHC2S','Axn0ici','z2v0ihq','iIbMB3u','DhrHy2G','AxrLBxm','ChjPB3i','Aw5JBhu','t1vora','Bv9PDgu','Bw92zvq','CYbMB3i','yxbWzw4','A0rHDge','B25Zzq','r2LdELi','CYb3Axq','igzHAwW','l3rHC2S','x1ruta','mhW1','zxb0igm','AgfUz2u','Dg9Y','Aw5MBW','Aw1PDcK','C3rHCNq','zgvZy3i','AxrOigm','yxrL','Esb3Axq','DgLTzxO','zxf1zxm','ntCZmJvnuhboCNK','z2v0ihm','Ag1LBNq','zxj2Awm','AgvJA2W','DgfNCW','B3jPDhK','y2fJAgu','y2HLy2S','Dhj1zsy','AxrLBq','zgvFC3u','BwvUDhm','zxjdyxm','DgHLBG','BgLZDeK','AcbUyw0','y3vZDg8','z2v0ige','Bv9Pza','Bg9Nz2u','mtqZmJyZntzYrK5Rvha','Bv90yxm','sunNuhG','C2TuB0W','yxrLzee','ywrKihq','C3vJy2u','B25Zzsa','DuvOC0q','BgL6zvm','sw5tDge','zgvZ','DgfZAW','ywXS','BgTuyxm','zhvWBgK','z2v0ig0','iIbMB3i','yw1IAwC','ieLeia','Dwj0yxm','l2n1C3q','C2v0','DgLHBca','y3ruyxm','zw50CMK','x2rHDgu','yxnRihC','ihrLEhq','y2XPzw4','C3vIDge','igL0zw0','DgL0Bgu','rK9sqKK','B3fAEgK','vu5ltK8','C2SG','DgfZA0K','mJa1B2zev3f4','y3rezwu','Fdf8na','BM9YBwe','y3rqCMK','D29YA3m','rMfPBgu','nJm5mte4oxLSswz5zW','yxnRia','ignOzwm','Dgf0Dxm','Cg9ZDa','zxn0','yxnR','DgLTzv8','t0LTEgK','BgvUz3q','zunOzwm','uxzzzg4','C3rfEgK','CgfJzvm','B21FAxq','yxr0ywm','zvjLCxu','z2v0qNu','CMvZB2W','qxr0ywm','DxbKyxq','zMLLBgq','AwX0zxi','z2LMEq','C2TuExa','CgvZ','ndK0mKThBwLOBG','zMv5sMq','BNrZ','BgLZDa','ugfYyw0','l2XPC3q','B25L','y2HL','zwn0zwq','AxnbCNi','zgvSzxq','p3n1yNq','yNvPBgq','A190Exa','tgLZDca','BgLZDhm','yxrPB24','DhvZ','l3rPBwu','BL9Kzxm','l21LBwi','yMvYCW','y3jPChq','BfrHC2S','rgf0yq','B2DKB08','rcbHBMq','yxrLtgK','z2v0u3u','Bw92zsa','DgfZA3m','C2TfEgK','qLDoCfO','Axr5','C2vZ','zxjYB3i','yxnRswq','ihr5Cgu','mZa0nZbqq1LnBKW','AgfUzgW','x3rPBwu','C3rZ','yxrLvge','BMqGAw4','rNjVBvu','zM9YigW','tK9ux0y','vw5LEha','yxnRvhK','zMLSDgu','yNrHC2S','zMLUza','zxjHDgK','qND4te0','zsbZDwi','C3rYAw4','ihrHC2S','BgvHCMu','z2v0vge','CMvJCMu','zgf0zwq','l2f0Dge','v29tsfi','mtGZtMHeCuXs','DMfSAwq','DwuU','CwzluhC','igzVCIa','qvbj','uxjoBMm','z2v0igm','zuLUu3q','zvrHC2S','mJy0wfr0BM5U','lIbby2m','vgvHBsa','Bv9MAwu','x2LUx3m','BwvZC2e','z2v0igi','ChvZAa','C3rHDhu','DxjS','ywnOBwu','igXPC3q','igf0Dge','AfDHEeW','yxnZAwC','DhmUANm','ChjVEhK','BgrZ','Aw1LigK','BhvL','zM9Yrwe','DMfSDwu','nZe5nZzVC25otgS','lMPZ','x2LK','z2v0q2e','BIbZDge','z2v0tgK','DMvK','mhWYFdm','B0LKq2e','Axn0sxq','Axn0','Axb0Aw8','zuvYCM8','zxn0CNu','C2Tnzw0','AxzLrMe','C2TZ','u3rHDhu','y2XLyxi','AY1HDhq','zvrLyw0','CMTKB3C','yxbPs2u','CZ10CNu','DwL0EtO','ig5VDca','vMfSDwu','CfrHC2S','DgfZA1q','BKLxr20','B29SCY8','yxrLigm','Aw9U','CgTdv1C','mZmWm3vgtuDUza','AgvZigm','zsaI','yxr1CW','BM93','AcbHBgW','Dhj1zq','q2fJAgu','oejuuvbsBW','zcb0BYa','y3rPDMu','ug90zw4'];a0_0x470a=function(){return _0x36dcc5;};return a0_0x470a();}import a0_0x1abc5b from'qs';export class TaskServiceCore extends BaseClickUpService{constructor(_0xba30ff,_0x33ca6d,_0x5be7bd,_0x3965a7,_0x1a1abe,_0x53571e){const _0x2d21d2=a0_0x2f66,_0x2dc7b9={'eWfCF':function(_0x4814e1,_0x5cb9db){return _0x4814e1*_0x5cb9db;}},_0x4710ba=('3|2|4'+'|6|1|'+_0x2d21d2(0x1ed))[_0x2d21d2(0x1ce)]('|');let _0x30e4b0=0x0;while(!![]){switch(_0x4710ba[_0x30e4b0++]){case'0':_0x3965a7&&(this[_0x2d21d2(0x23a)+'paceS'+'ervic'+'e']=_0x3965a7);continue;case'1':this[_0x2d21d2(0x1d3)+_0x2d21d2(0x1ec)]=_0x2dc7b9[_0x2d21d2(0x1cf)](0x5*0x3c,0x3e8);continue;case'2':this[_0x2d21d2(0x23a)+_0x2d21d2(0x249)+'ervic'+'e']=null;continue;case'3':super(_0xba30ff,_0x33ca6d,_0x5be7bd,_0x53571e);continue;case'4':this[_0x2d21d2(0x150)+'ation'+_0x2d21d2(0x198)]={'tasks':new Map(),'lists':new Map(),'taskTypes':new Map()};continue;case'5':this['listS'+_0x2d21d2(0x1fd)+'e']=_0x1a1abe||new ListService(_0xba30ff,_0x33ca6d,_0x5be7bd,this[_0x2d21d2(0x23a)+_0x2d21d2(0x249)+_0x2d21d2(0x1fd)+'e']);continue;case'6':this[_0x2d21d2(0x1d2)+_0x2d21d2(0x177)+'che']=new Map();continue;}break;}}[a0_0x4f2d02(0x10a)+a0_0x4f2d02(0x183)+'Id'](_0x723bfe){const _0x24e1ef=a0_0x4f2d02,_0x26226a=(_0x24e1ef(0x176)+_0x24e1ef(0x237))[_0x24e1ef(0x1ce)]('|');let _0x5c1c42=0x0;while(!![]){switch(_0x26226a[_0x5c1c42++]){case'0':super[_0x24e1ef(0x10a)+_0x24e1ef(0x183)+'Id'](_0x723bfe);continue;case'1':this[_0x24e1ef(0x1d2)+_0x24e1ef(0x177)+_0x24e1ef(0x117)][_0x24e1ef(0x181)]();continue;case'2':this[_0x24e1ef(0x150)+'ation'+'Cache'][_0x24e1ef(0x12e)][_0x24e1ef(0x181)]();continue;case'3':this['valid'+_0x24e1ef(0x120)+'Cache']['lists'][_0x24e1ef(0x181)]();continue;case'4':this[_0x24e1ef(0x20e)+'r'][_0x24e1ef(0x1f1)](_0x24e1ef(0x15b)+'ID\x20up'+_0x24e1ef(0x14c)+',\x20tas'+_0x24e1ef(0x1a2)+_0x24e1ef(0x192)+_0x24e1ef(0x149)+'d',{'teamId':_0x723bfe});continue;}break;}}[a0_0x4f2d02(0x11c)+'TaskF'+a0_0x4f2d02(0x10c)+a0_0x4f2d02(0x114)+'s'](_0x356aed){const _0x1dcf8d=a0_0x4f2d02,_0x27968d={'OImxi':function(_0xc89341,_0x2a1560){return _0xc89341!==_0x2a1560;},'feyJd':function(_0x1c6fb2,_0x53ee62){return _0x1c6fb2>_0x53ee62;},'canzn':function(_0x1bafef,_0x714968){return _0x1bafef===_0x714968;},'fmumE':function(_0x2f4d32,_0x54a4dd){return _0x2f4d32===_0x54a4dd;}},_0x3e0fd8={};for(const [_0x2d2900,_0x269e3d]of Object[_0x1dcf8d(0x228)+'es'](_0x356aed)){_0x27968d[_0x1dcf8d(0x244)](_0x269e3d,undefined)&&_0x27968d[_0x1dcf8d(0x244)](_0x269e3d,null)&&(_0x3e0fd8[_0x2d2900]=_0x269e3d);}_0x3e0fd8['inclu'+_0x1dcf8d(0x1b8)+_0x1dcf8d(0x184)+_0x1dcf8d(0x123)+_0x1dcf8d(0x126)+_0x1dcf8d(0x18f)]&&(_0x3e0fd8[_0x1dcf8d(0x1e0)+_0x1dcf8d(0x1b8)+'rkdow'+_0x1dcf8d(0x123)+_0x1dcf8d(0x126)+_0x1dcf8d(0x18f)]='true');const _0x3f4d1c=_0x3e0fd8[_0x1dcf8d(0x20b)+_0x1dcf8d(0x15c)+'lds'];delete _0x3e0fd8[_0x1dcf8d(0x20b)+_0x1dcf8d(0x15c)+'lds'];const _0x58eae5=a0_0x1abc5b[_0x1dcf8d(0x147)+_0x1dcf8d(0x10d)](_0x3e0fd8,{'arrayFormat':'brack'+'ets','skipNulls':!![]}),_0x9e8cab=new URLSearchParams(_0x58eae5);if(Array[_0x1dcf8d(0x119)+'ay'](_0x3f4d1c)&&_0x27968d[_0x1dcf8d(0x111)](_0x3f4d1c[_0x1dcf8d(0x245)+'h'],0x0)){const _0x54ba12=[];for(const _0x59dbc7 of _0x3f4d1c){_0x27968d['canzn'](_0x59dbc7['opera'+_0x1dcf8d(0x1f0)],_0x1dcf8d(0x1af))&&Array[_0x1dcf8d(0x119)+'ay'](_0x59dbc7[_0x1dcf8d(0x16e)])&&_0x27968d[_0x1dcf8d(0x1ae)](_0x59dbc7[_0x1dcf8d(0x16e)][_0x1dcf8d(0x245)+'h'],0x2)?(_0x54ba12[_0x1dcf8d(0x160)]({'field_id':_0x59dbc7[_0x1dcf8d(0x10b)+_0x1dcf8d(0x171)],'operator':'>=','value':_0x59dbc7[_0x1dcf8d(0x16e)][0x0]}),_0x54ba12[_0x1dcf8d(0x160)]({'field_id':_0x59dbc7[_0x1dcf8d(0x10b)+_0x1dcf8d(0x171)],'operator':'<=','value':_0x59dbc7['value'][0x1]})):_0x54ba12[_0x1dcf8d(0x160)](_0x59dbc7);}_0x9e8cab[_0x1dcf8d(0x1e5)+'d'](_0x1dcf8d(0x20b)+'m_fie'+_0x1dcf8d(0x16a),JSON[_0x1dcf8d(0x147)+'gify'](_0x54ba12));}return _0x9e8cab;}async['extra'+a0_0x4f2d02(0x236)+a0_0x4f2d02(0x18a)+'Data'](_0x26b72e){const _0x58f494=a0_0x4f2d02,_0x1982b6={'tpNjp':function(_0x56f53e,_0x1f457e){return _0x56f53e>_0x1f457e;}},_0x5956fe=await this[_0x58f494(0x14a)+'sk'](_0x26b72e),_0x828df1=this[_0x58f494(0x1b4)+'ctTas'+_0x58f494(0x1e6)](_0x5956fe),_0x6f436=await this['getSu'+_0x58f494(0x142)+'s'](_0x26b72e);_0x6f436[_0x58f494(0x245)+'h']>0x0&&(_0x828df1[_0x58f494(0x22d)+'sks']=await Promise['all'](_0x6f436['map'](_0x213fc4=>this[_0x58f494(0x1b4)+_0x58f494(0x236)+_0x58f494(0x18a)+_0x58f494(0x128)](_0x213fc4['id']))));_0x5956fe[_0x58f494(0x202)+_0x58f494(0x11f)]?.[_0x58f494(0x245)+'h']&&(_0x828df1['check'+_0x58f494(0x11f)]=_0x5956fe['check'+'lists']['map'](_0x1ef120=>({'name':_0x1ef120[_0x58f494(0x1b2)],'items':_0x1ef120[_0x58f494(0x1de)][_0x58f494(0x1d1)](_0x1f9618=>({'name':_0x1f9618['name'],'resolved':_0x1f9618[_0x58f494(0x108)+_0x58f494(0x175)],'assignee':_0x1f9618[_0x58f494(0x167)+_0x58f494(0x1cc)]?.['id']}))})));const _0x1e08d9=await this[_0x58f494(0x14a)+_0x58f494(0x1a4)+_0x58f494(0x163)+'nts'](_0x26b72e);return _0x1982b6['tpNjp'](_0x1e08d9[_0x58f494(0x245)+'h'],0x0)&&(_0x828df1['attac'+_0x58f494(0x1fc)+'s']=_0x1e08d9[_0x58f494(0x1d1)](_0x5f3e31=>({'url':_0x5f3e31['url'],'title':_0x5f3e31[_0x58f494(0x22f)]}))),_0x828df1;}async['getTa'+a0_0x4f2d02(0x1a4)+a0_0x4f2d02(0x163)+a0_0x4f2d02(0x112)](_0x5b8191){const _0x5e8fbc=a0_0x4f2d02;return this[_0x5e8fbc(0x1ca)+_0x5e8fbc(0x1f9)+'t'](async()=>{const _0x266322=_0x5e8fbc,_0x4bb486=await this[_0x266322(0x22c)+'t'][_0x266322(0x1a1)](_0x266322(0x1eb)+'/'+_0x5b8191+(_0x266322(0x14d)+'chmen'+'t')),_0x54a8f1=_0x4bb486[_0x266322(0x1b1)];return _0x54a8f1[_0x266322(0x105)+_0x266322(0x1fc)+'s']||[];})['catch'](_0x3d8249=>{const _0x18476d=_0x5e8fbc;return this['logge'+'r'][_0x18476d(0x133)](_0x18476d(0x23b)+_0x18476d(0x19a)+_0x18476d(0x20c)+_0x18476d(0x1dd)+_0x18476d(0x206)+_0x18476d(0x153)+_0x18476d(0x1d5)+_0x5b8191,_0x3d8249),[];});}[a0_0x4f2d02(0x1b4)+a0_0x4f2d02(0x227)+a0_0x4f2d02(0x1e6)](_0x540ed4,_0x53836f){const _0x3f335a=a0_0x4f2d02,_0x1a6b67={'name':_0x53836f||_0x540ed4['name'],'description':_0x540ed4[_0x3f335a(0x1f4)+_0x3f335a(0x17a)+'n']||'','status':_0x540ed4[_0x3f335a(0x161)+'s']?.[_0x3f335a(0x161)+'s'],'priority':this[_0x3f335a(0x1b4)+_0x3f335a(0x239)+'ority'+_0x3f335a(0x189)](_0x540ed4),'due_date':_0x540ed4['due_d'+_0x3f335a(0x1f6)]?Number(_0x540ed4[_0x3f335a(0x1d0)+_0x3f335a(0x1f6)]):undefined,'assignees':_0x540ed4[_0x3f335a(0x167)+_0x3f335a(0x1c0)]?.['map'](_0xd651bc=>_0xd651bc['id'])||[],'tags':_0x540ed4[_0x3f335a(0x1ff)]?.[_0x3f335a(0x1d1)](_0x5379e7=>_0x5379e7[_0x3f335a(0x1b2)])||[],'time_estimate':_0x540ed4[_0x3f335a(0x243)+'estim'+_0x3f335a(0x1f6)]||undefined,'start_date':_0x540ed4['start'+_0x3f335a(0x229)]?Number(_0x540ed4[_0x3f335a(0x1f3)+_0x3f335a(0x229)]):undefined};if(Array[_0x3f335a(0x119)+'ay'](_0x540ed4[_0x3f335a(0x20b)+_0x3f335a(0x15c)+_0x3f335a(0x16a)])){const _0x607342=_0x540ed4[_0x3f335a(0x20b)+_0x3f335a(0x15c)+_0x3f335a(0x16a)][_0x3f335a(0x141)+'r'](_0x2aeb35=>_0x2aeb35['value']!==undefined&&_0x2aeb35[_0x3f335a(0x16e)]!==null)[_0x3f335a(0x1d1)](_0x3d8931=>({'id':_0x3d8931['id'],'value':_0x3d8931[_0x3f335a(0x16e)]}));_0x607342[_0x3f335a(0x245)+'h']>0x0&&(_0x1a6b67[_0x3f335a(0x20b)+_0x3f335a(0x15c)+_0x3f335a(0x16a)]=_0x607342);}return _0x1a6b67;}['extra'+'ctPri'+a0_0x4f2d02(0x200)+a0_0x4f2d02(0x189)](_0x32a84c){const _0x1fbe3b=a0_0x4f2d02,_0xab5ad3={'KmrjQ':function(_0x1ba950,_0x10e710){return _0x1ba950>_0x10e710;}};if(!_0x32a84c['prior'+_0x1fbe3b(0x131)]||!_0x32a84c[_0x1fbe3b(0x1df)+_0x1fbe3b(0x131)]['id'])return null;const _0x30d187=parseInt(_0x32a84c[_0x1fbe3b(0x1df)+_0x1fbe3b(0x131)]['id']);return isNaN(_0x30d187)||_0x30d187<0x1||_0xab5ad3[_0x1fbe3b(0x1c9)](_0x30d187,0x4)?null:_0x30d187;}async[a0_0x4f2d02(0x1bc)+a0_0x4f2d02(0x1c5)+a0_0x4f2d02(0x140)+a0_0x4f2d02(0x10f)](_0x415a0f=this[a0_0x4f2d02(0x1a9)+'d']){const _0x449b53=a0_0x4f2d02,_0x2ba537={'BwxLM':_0x449b53(0x23b)+'d\x20to\x20'+_0x449b53(0x156)+_0x449b53(0x1bb)+'\x20task'+_0x449b53(0x135)+'s'},_0x10f12d=this[_0x449b53(0x150)+_0x449b53(0x120)+'Cache'][_0x449b53(0x18b)+'ypes'][_0x449b53(0x1a1)](_0x415a0f);if(_0x10f12d&&Date[_0x449b53(0x195)]()-_0x10f12d[_0x449b53(0x150)+_0x449b53(0x213)+'t']<this[_0x449b53(0x1d3)+_0x449b53(0x1ec)])return _0x10f12d[_0x449b53(0x1a3)];return this[_0x449b53(0x1ca)+_0x449b53(0x1f9)+'t'](async()=>{const _0xfc0441=_0x449b53,_0x17aca9=await this['clien'+'t']['get'](_0xfc0441(0x1ad)+'/'+_0x415a0f+(_0xfc0441(0x224)+_0xfc0441(0x24a)+'em')),_0x2f1d26=_0x17aca9['data']['custo'+'m_ite'+'ms']||[];return this[_0xfc0441(0x150)+'ation'+_0xfc0441(0x198)][_0xfc0441(0x18b)+'ypes'][_0xfc0441(0x225)](_0x415a0f,{'types':_0x2f1d26,'validatedAt':Date['now']()}),_0x2f1d26;})[_0x449b53(0x1b6)](_0x338356=>{const _0x413de1=_0x449b53;throw this[_0x413de1(0x137)+_0x413de1(0x17b)+'r'](_0x338356,_0x2ba537[_0x413de1(0x145)]);});}async[a0_0x4f2d02(0x14a)+'skTyp'+a0_0x4f2d02(0x1d6)](_0x3ec2c8){const _0x15dbb5=a0_0x4f2d02,_0x4910d0={'ulFym':function(_0x2ead5d,_0x3c54ea,_0x5bdd42){return _0x2ead5d(_0x3c54ea,_0x5bdd42);}},_0x546bfe=await this['getCu'+_0x15dbb5(0x1c5)+_0x15dbb5(0x140)+_0x15dbb5(0x10f)](),_0x467f1e=_0x546bfe[_0x15dbb5(0x143)](_0x58731a=>_0x58731a['name']['toLow'+_0x15dbb5(0x207)+'e']()===_0x3ec2c8[_0x15dbb5(0x1b3)+_0x15dbb5(0x207)+'e']());if(_0x467f1e)return _0x467f1e['id'];const _0x1c810b=_0x4910d0[_0x15dbb5(0x19f)](findBestMatchInArray,_0x546bfe,_0x3ec2c8);return _0x1c810b?_0x1c810b[_0x15dbb5(0x204)]['id']:null;}async['creat'+a0_0x4f2d02(0x158)](_0x24db01,_0x5de818){const _0x17e81b=a0_0x4f2d02,_0x2d6771={'nIWGm':_0x17e81b(0x147)+'g','oqZxi':_0x17e81b(0x1bf)+'k-che'+'cklis'+_0x17e81b(0x168),'ICgPx':function(_0x3698db,_0x35103e){return _0x3698db>_0x35103e;},'DZTNK':function(_0x5129bf,_0x482cb0){return _0x5129bf instanceof _0x482cb0;},'pkCWW':function(_0x442095,_0x3d7334){return _0x442095(_0x3d7334);},'ZaxFO':function(_0x2995e9,_0x133cab){return _0x2995e9 instanceof _0x133cab;},'rcsoI':_0x17e81b(0x1bf)+_0x17e81b(0x182)+_0x17e81b(0x163)+'nts.j'+'s'};this['logOp'+_0x17e81b(0x144)+'on'](_0x17e81b(0x1d8)+_0x17e81b(0x158),{'listId':_0x24db01,..._0x5de818});const {subtasks:_0x4f6299,checklists:_0x4ac4d0,attachments:_0x5969c2,..._0x3b98ca}=_0x5de818;if(_0x3b98ca[_0x17e81b(0x20b)+_0x17e81b(0x210)+_0x17e81b(0x11d)+'e']&&!_0x3b98ca[_0x17e81b(0x20b)+_0x17e81b(0x1e2)+_0x17e81b(0x20d)]){const _0x9b0200=await this[_0x17e81b(0x14a)+_0x17e81b(0x10e)+_0x17e81b(0x1d6)](_0x3b98ca['custo'+_0x17e81b(0x210)+_0x17e81b(0x11d)+'e']);if(_0x9b0200!==null)_0x3b98ca['custo'+'m_ite'+_0x17e81b(0x20d)]=_0x9b0200;}if(_0x3b98ca[_0x17e81b(0x161)+'s']){await this['valid'+'ateLi'+'stExi'+_0x17e81b(0x139)](_0x24db01)[_0x17e81b(0x1b6)](()=>{});const _0x54bf71=this[_0x17e81b(0x150)+_0x17e81b(0x120)+_0x17e81b(0x198)][_0x17e81b(0x11f)]['get'](_0x24db01);_0x3b98ca[_0x17e81b(0x161)+'s']=this['norma'+'lizeS'+_0x17e81b(0x23f)](_0x3b98ca[_0x17e81b(0x161)+'s'],_0x54bf71?.[_0x17e81b(0x161)+_0x17e81b(0x132)]);}try{const _0x4a5391=await this[_0x17e81b(0x1ca)+_0x17e81b(0x1f9)+'t'](async()=>{const _0x2759cf=_0x17e81b,{custom_task_type:_0x3b528c,..._0x5d2033}=_0x3b98ca,_0x4c001b=await this['clien'+'t'][_0x2759cf(0x240)](_0x2759cf(0x115)+'/'+_0x24db01+_0x2759cf(0x1eb),_0x5d2033),_0x357da7=_0x4c001b[_0x2759cf(0x1b1)];if(typeof _0x357da7===_0x2d6771[_0x2759cf(0x18c)]){const _0x2e6acd=_0x357da7['match'](/task.*?(\w{9,10})/i);if(_0x2e6acd)return await this[_0x2759cf(0x14a)+'sk'](_0x2e6acd[0x1]);throw new ClickUpServiceError(_0x2759cf(0x13f)+_0x2759cf(0x118)+'\x20text'+_0x2759cf(0x1c6)+_0x2759cf(0x216)+'from\x20'+_0x2759cf(0x154),ErrorCode[_0x2759cf(0x232)+'WN'],_0x357da7);}if(_0x357da7?.['statu'+'s']&&_0x357da7[_0x2759cf(0x113)]?.['id'])this[_0x2759cf(0x201)+_0x2759cf(0x180)+'s'](_0x357da7[_0x2759cf(0x113)]['id'],_0x357da7[_0x2759cf(0x161)+'s'][_0x2759cf(0x161)+'s']);return _0x357da7;});if(_0x4ac4d0?.[_0x17e81b(0x245)+'h']){const {TaskChecklistsService:_0x5a201f}=await import(_0x2d6771[_0x17e81b(0x231)]),_0x2129d4=new _0x5a201f(this);for(const _0x1aefa5 of _0x4ac4d0){try{const _0xd064dd=await _0x2129d4[_0x17e81b(0x1d8)+_0x17e81b(0x246)+_0x17e81b(0x1b5)](_0x4a5391['id'],_0x1aefa5['name']);if(_0xd064dd[_0x17e81b(0x215)+'ss']&&_0xd064dd['data']){const _0x147410=_0xd064dd[_0x17e81b(0x1b1)]['id'];for(const _0x31dfc4 of _0x1aefa5[_0x17e81b(0x1de)]){try{const _0x300a00=await _0x2129d4[_0x17e81b(0x1d8)+_0x17e81b(0x246)+_0x17e81b(0x1b5)+'Item'](_0x147410,_0x31dfc4[_0x17e81b(0x1b2)],_0x31dfc4[_0x17e81b(0x167)+_0x17e81b(0x1cc)]);if(_0x300a00[_0x17e81b(0x215)+'ss']&&_0x300a00[_0x17e81b(0x1b1)]&&_0x31dfc4[_0x17e81b(0x108)+_0x17e81b(0x175)]){const _0x38d465=_0x300a00[_0x17e81b(0x1b1)][_0x17e81b(0x1de)][_0x17e81b(0x141)+'r'](_0x545b52=>_0x545b52[_0x17e81b(0x1b2)]===_0x31dfc4['name']&&!_0x545b52[_0x17e81b(0x108)+'ved']);_0x2d6771[_0x17e81b(0x211)](_0x38d465[_0x17e81b(0x245)+'h'],0x1)&&this[_0x17e81b(0x20e)+'r']['warn'](_0x17e81b(0x19c)+_0x17e81b(0x226)+_0x17e81b(0x221)+_0x17e81b(0x187)+_0x17e81b(0x1ac)+'iple\x20'+_0x17e81b(0x1c4)+'olved'+_0x17e81b(0x23e)+_0x17e81b(0x1b5)+_0x17e81b(0x22e)+_0x17e81b(0x1e9)+_0x17e81b(0x20a)+_0x17e81b(0x193)+_0x31dfc4[_0x17e81b(0x1b2)]+(_0x17e81b(0x1dc)+_0x17e81b(0x13b)+'\x20chec'+_0x17e81b(0x1b5)+'\x20\x22')+_0x1aefa5[_0x17e81b(0x1b2)]+'\x22.',{'checklistId':_0x147410,'itemName':_0x31dfc4[_0x17e81b(0x1b2)],'matchCount':_0x38d465['lengt'+'h']});const _0x4bf91e=_0x38d465[0x0];_0x4bf91e&&await _0x2129d4['editC'+_0x17e81b(0x1fe)+_0x17e81b(0x178)+'em'](_0x147410,_0x4bf91e['id'],{'resolved':!![]});}}catch(_0x47b4e1){this['logge'+'r'][_0x17e81b(0x133)](_0x17e81b(0x23b)+_0x17e81b(0x19a)+_0x17e81b(0x14b)+_0x17e81b(0x18e)+_0x17e81b(0x1fe)+'ist\x20i'+'tem\x20\x22'+_0x31dfc4[_0x17e81b(0x1b2)]+(_0x17e81b(0x220)+_0x17e81b(0x23e)+_0x17e81b(0x1b5)+'\x20\x22')+_0x1aefa5[_0x17e81b(0x1b2)]+'\x22',{'error':_0x2d6771['DZTNK'](_0x47b4e1,Error)?_0x47b4e1[_0x17e81b(0x15e)+'ge']:_0x2d6771[_0x17e81b(0x190)](String,_0x47b4e1),'checklistId':_0x147410});}}}}catch(_0x445651){this['logge'+'r'][_0x17e81b(0x133)]('Faile'+_0x17e81b(0x19a)+_0x17e81b(0x14b)+_0x17e81b(0x18e)+_0x17e81b(0x1fe)+_0x17e81b(0x1da)+_0x1aefa5[_0x17e81b(0x1b2)]+'\x22',{'error':_0x2d6771['ZaxFO'](_0x445651,Error)?_0x445651[_0x17e81b(0x15e)+'ge']:String(_0x445651),'taskId':_0x4a5391['id']});}}}if(_0x5969c2?.[_0x17e81b(0x245)+'h']){const {TaskServiceAttachments:_0x279abf}=await import(_0x2d6771[_0x17e81b(0x1bd)]),_0x23cd11=new _0x279abf(this);for(const _0x1f3c81 of _0x5969c2){try{await _0x23cd11['uploa'+_0x17e81b(0x1d9)+_0x17e81b(0x109)+_0x17e81b(0x1fc)+_0x17e81b(0x13c)+'rl'](_0x4a5391['id'],_0x1f3c81[_0x17e81b(0x162)],_0x1f3c81[_0x17e81b(0x22f)]);}catch(_0x9b0ea3){this[_0x17e81b(0x20e)+'r'][_0x17e81b(0x133)](_0x17e81b(0x23b)+'d\x20to\x20'+_0x17e81b(0x169)+_0x17e81b(0x165)+_0x17e81b(0x1ab)+'t\x20\x22'+_0x1f3c81[_0x17e81b(0x22f)]+'\x22',_0x9b0ea3);}}}if(_0x4f6299?.[_0x17e81b(0x245)+'h']){_0x4a5391[_0x17e81b(0x22d)+_0x17e81b(0x17f)]=[];for(const _0x1ea3fe of _0x4f6299){try{const _0x5562ae=await this['creat'+'eTask'](_0x24db01,{..._0x1ea3fe,'parent':_0x4a5391['id']});_0x4a5391[_0x17e81b(0x22d)+_0x17e81b(0x17f)][_0x17e81b(0x160)](_0x5562ae);}catch(_0x1be874){this['logge'+'r']['error'](_0x17e81b(0x23b)+_0x17e81b(0x19a)+_0x17e81b(0x1d8)+_0x17e81b(0x146)+_0x17e81b(0x1d5)+'\x22'+_0x1ea3fe['name']+'\x22',_0x1be874);}}}return _0x4a5391;}catch(_0x7a673f){throw this['handl'+_0x17e81b(0x17b)+'r'](_0x7a673f,_0x17e81b(0x23b)+_0x17e81b(0x19a)+'creat'+_0x17e81b(0x1c7)+'k');}}async[a0_0x4f2d02(0x14a)+'sk'](_0x446022,_0x45dfd1=![]){const _0x369441=a0_0x4f2d02,_0x30c52c={'GVokd':_0x369441(0x197),'qfKPw':_0x369441(0x147)+'g','hWaxL':'Unexp'+'ected'+_0x369441(0x22b)+_0x369441(0x1c6)+'onse'},{isCustomTaskId:_0x236ba4}=await import('../..'+'/../t'+_0x369441(0x18d)+'task/'+_0x369441(0x1a6)+'ties.'+'js');if(_0x236ba4(_0x446022))return this[_0x369441(0x14a)+_0x369441(0x1a0)+_0x369441(0x1bb)+'Id'](_0x446022,undefined,_0x45dfd1);try{return await this[_0x369441(0x1ca)+_0x369441(0x1f9)+'t'](async()=>{const _0x2f851c=_0x369441,_0x4d74c9=await this[_0x2f851c(0x22c)+'t'][_0x2f851c(0x1a1)](_0x2f851c(0x1eb)+'/'+_0x446022,{'params':_0x45dfd1?{'include_markdown_description':_0x30c52c['GVokd']}:{}}),_0x161649=_0x4d74c9[_0x2f851c(0x1b1)];if(typeof _0x161649===_0x30c52c[_0x2f851c(0x152)])throw new ClickUpServiceError(_0x30c52c[_0x2f851c(0x166)],ErrorCode[_0x2f851c(0x232)+'WN'],_0x161649);if(_0x161649?.[_0x2f851c(0x161)+'s']&&_0x161649[_0x2f851c(0x113)]?.['id'])this[_0x2f851c(0x201)+_0x2f851c(0x180)+'s'](_0x161649[_0x2f851c(0x113)]['id'],_0x161649[_0x2f851c(0x161)+'s']['statu'+'s']);return _0x161649;});}catch(_0x405939){throw this['handl'+_0x369441(0x17b)+'r'](_0x405939,_0x369441(0x23b)+_0x369441(0x19a)+'get\x20t'+'ask\x20'+_0x446022);}}async[a0_0x4f2d02(0x14a)+a0_0x4f2d02(0x17f)](_0x28ff8f,_0x3d6f4c={},_0x176cd6){const _0x1b14b2=a0_0x4f2d02,_0x3f37a5={'Nsqzz':_0x1b14b2(0x147)+'g','QrNnc':'Unexp'+_0x1b14b2(0x118)+_0x1b14b2(0x22b)+_0x1b14b2(0x1c6)+_0x1b14b2(0x1e7),'cewre':function(_0x4b53e9,_0x276098){return _0x4b53e9!==_0x276098;}};try{if(_0x3d6f4c['statu'+_0x1b14b2(0x132)]?.[_0x1b14b2(0x245)+'h']){const _0x34f47e=this['valid'+_0x1b14b2(0x120)+_0x1b14b2(0x198)]['lists'][_0x1b14b2(0x1a1)](_0x28ff8f);_0x3d6f4c[_0x1b14b2(0x161)+_0x1b14b2(0x132)]=_0x3d6f4c[_0x1b14b2(0x161)+_0x1b14b2(0x132)][_0x1b14b2(0x1d1)](_0x50f663=>this[_0x1b14b2(0x238)+_0x1b14b2(0x218)+_0x1b14b2(0x23f)](_0x50f663,_0x34f47e?.[_0x1b14b2(0x161)+_0x1b14b2(0x132)]));}if(_0x3d6f4c[_0x1b14b2(0x20b)+_0x1b14b2(0x210)+_0x1b14b2(0x11d)+'es']?.[_0x1b14b2(0x245)+'h']){const _0x5d2a9c=_0x3d6f4c['custo'+_0x1b14b2(0x1e2)+'ms']||[];for(const _0x2ddb01 of _0x3d6f4c[_0x1b14b2(0x20b)+_0x1b14b2(0x210)+'k_typ'+'es']){const _0x388bc8=await this['getTa'+_0x1b14b2(0x10e)+_0x1b14b2(0x1d6)](_0x2ddb01);if(_0x3f37a5['cewre'](_0x388bc8,null))_0x5d2a9c[_0x1b14b2(0x160)](_0x388bc8);}_0x3d6f4c[_0x1b14b2(0x20b)+_0x1b14b2(0x1e2)+'ms']=_0x5d2a9c;}return await this[_0x1b14b2(0x1ca)+_0x1b14b2(0x1f9)+'t'](async()=>{const _0x4fe738=_0x1b14b2,_0x54e149=this[_0x4fe738(0x11c)+'TaskF'+_0x4fe738(0x10c)+_0x4fe738(0x114)+'s'](_0x3d6f4c),_0x110c04=_0x176cd6||this['teamI'+'d'],_0x213112=await this[_0x4fe738(0x22c)+'t'][_0x4fe738(0x1a1)](_0x4fe738(0x115)+'/'+_0x28ff8f+_0x4fe738(0x1eb),{'params':_0x54e149}),_0x920fcb=_0x213112[_0x4fe738(0x1b1)];if(typeof _0x920fcb===_0x3f37a5[_0x4fe738(0x1c2)])throw new ClickUpServiceError(_0x3f37a5[_0x4fe738(0x155)],ErrorCode[_0x4fe738(0x232)+'WN'],_0x920fcb);if(_0x920fcb?.[_0x4fe738(0x161)+_0x4fe738(0x132)]){const _0x3ed62d=this['valid'+_0x4fe738(0x120)+_0x4fe738(0x198)]['lists'][_0x4fe738(0x1a1)](_0x28ff8f);this[_0x4fe738(0x150)+_0x4fe738(0x120)+_0x4fe738(0x198)]['lists']['set'](_0x28ff8f,{'validatedAt':Date[_0x4fe738(0x195)](),'valid':!![],'statuses':_0x920fcb[_0x4fe738(0x161)+_0x4fe738(0x132)],..._0x3ed62d});}return Array[_0x4fe738(0x119)+'ay'](_0x920fcb)?_0x920fcb:_0x920fcb[_0x4fe738(0x12e)]||[];});}catch(_0x2bf305){throw this['handl'+'eErro'+'r'](_0x2bf305,_0x1b14b2(0x23b)+_0x1b14b2(0x19a)+_0x1b14b2(0x1db)+'asks\x20'+_0x1b14b2(0x13d)+_0x1b14b2(0x1b9)+_0x28ff8f);}}async[a0_0x4f2d02(0x1cd)+a0_0x4f2d02(0x127)+'s'](_0x18c748,_0x47f47c={}){const _0x2112a0=a0_0x4f2d02,_0x5b3f66={'QvYdn':function(_0x2804aa,_0x1561a8){return _0x2804aa<_0x1561a8;},'zngNk':function(_0x526e7a,_0x58209d){return _0x526e7a===_0x58209d;}},_0x41b2dc=[];for(let _0x5dcf9c=0x0;_0x5b3f66[_0x2112a0(0x247)](_0x5dcf9c,0x64);_0x5dcf9c++){const _0x5ab137=await this[_0x2112a0(0x14a)+_0x2112a0(0x17f)](_0x18c748,{..._0x47f47c,'page':_0x5dcf9c});if(_0x5b3f66['zngNk'](_0x5ab137[_0x2112a0(0x245)+'h'],0x0))break;_0x41b2dc[_0x2112a0(0x160)](..._0x5ab137);if(_0x5ab137[_0x2112a0(0x245)+'h']<0x64)break;}return _0x41b2dc;}async[a0_0x4f2d02(0x12c)+'btask'+'s'](_0x2ceb2c){const _0x2eb4ae=a0_0x4f2d02;return this[_0x2eb4ae(0x1ca)+_0x2eb4ae(0x1f9)+'t'](async()=>{const _0x902552=_0x2eb4ae,_0x1d029c=await this[_0x902552(0x22c)+'t'][_0x902552(0x1a1)]('/task'+'/'+_0x2ceb2c+(_0x902552(0x11b)+'asks='+_0x902552(0x203)+_0x902552(0x1e0)+_0x902552(0x205)+_0x902552(0x142)+_0x902552(0x186)+'e')),_0x4fbe4f=_0x1d029c[_0x902552(0x1b1)];return _0x4fbe4f[_0x902552(0x22d)+_0x902552(0x17f)]||[];})[_0x2eb4ae(0x1b6)](_0x3f88c9=>{const _0x5076ed=_0x2eb4ae;throw this[_0x5076ed(0x137)+'eErro'+'r'](_0x3f88c9,_0x5076ed(0x23b)+_0x5076ed(0x19a)+_0x5076ed(0x1fb)+_0x5076ed(0x223)+_0x5076ed(0x1aa)+_0x5076ed(0x19e)+'k\x20'+_0x2ceb2c);});}async[a0_0x4f2d02(0x14a)+a0_0x4f2d02(0x1a0)+a0_0x4f2d02(0x1bb)+'Id'](_0x2fef18,_0x5f4b6d,_0x588580=![]){const _0x135489=a0_0x4f2d02;try{return await this[_0x135489(0x1ca)+'eques'+'t'](async()=>{const _0x257b2b=_0x135489,_0xf7f5b5=new URLSearchParams({'custom_task_ids':_0x257b2b(0x197),'team_id':this[_0x257b2b(0x1a9)+'d']});if(_0x588580)_0xf7f5b5['appen'+'d'](_0x257b2b(0x1e0)+_0x257b2b(0x1b8)+_0x257b2b(0x184)+_0x257b2b(0x123)+_0x257b2b(0x126)+_0x257b2b(0x18f),_0x257b2b(0x197));const _0x4e3faf=await this[_0x257b2b(0x22c)+'t'][_0x257b2b(0x1a1)](_0x257b2b(0x1eb)+'/'+encodeURIComponent(_0x2fef18),{'params':_0xf7f5b5});if(typeof _0x4e3faf['data']===_0x257b2b(0x147)+'g')throw new ClickUpServiceError(_0x257b2b(0x13f)+'ected'+_0x257b2b(0x22b)+_0x257b2b(0x1c6)+_0x257b2b(0x1e7),ErrorCode[_0x257b2b(0x232)+'WN'],_0x4e3faf['data']);return _0x4e3faf['data'];});}catch(_0x2866a3){throw this['handl'+_0x135489(0x17b)+'r'](_0x2866a3,_0x135489(0x23b)+_0x135489(0x19a)+_0x135489(0x1db)+_0x135489(0x22a)+_0x135489(0x1f5)+'ustom'+_0x135489(0x222)+_0x2fef18);}}async[a0_0x4f2d02(0x10a)+a0_0x4f2d02(0x158)](_0x251354,_0x3d302b){const _0x449297=a0_0x4f2d02,_0x23a942={'WoSHR':function(_0x1567b4,_0x20dc6a){return _0x1567b4===_0x20dc6a;},'ogdoO':'strin'+'g','xtFLm':_0x449297(0x13f)+_0x449297(0x118)+_0x449297(0x22b)+_0x449297(0x1c6)+_0x449297(0x1e7)};if(_0x3d302b[_0x449297(0x20b)+_0x449297(0x210)+_0x449297(0x11d)+'e']&&!_0x3d302b['custo'+_0x449297(0x1e2)+_0x449297(0x20d)]){const _0x3b79a1=await this[_0x449297(0x14a)+_0x449297(0x10e)+_0x449297(0x1d6)](_0x3d302b[_0x449297(0x20b)+_0x449297(0x210)+_0x449297(0x11d)+'e']);if(_0x3b79a1!==null)_0x3d302b[_0x449297(0x20b)+_0x449297(0x1e2)+_0x449297(0x20d)]=_0x3b79a1;}try{const {custom_fields:_0x1c2e34,assignees:_0x570e50,custom_task_type:_0x49ad1a,..._0x2077c6}=_0x3d302b;if(_0x2077c6[_0x449297(0x161)+'s']){const _0x426d60=await this[_0x449297(0x14a)+'sk'](_0x251354),_0x4f04c2=this[_0x449297(0x150)+_0x449297(0x120)+_0x449297(0x198)]['lists'][_0x449297(0x1a1)](_0x426d60['list']['id']);_0x2077c6[_0x449297(0x161)+'s']=this[_0x449297(0x238)+_0x449297(0x218)+_0x449297(0x23f)](_0x2077c6[_0x449297(0x161)+'s'],_0x4f04c2?.[_0x449297(0x161)+_0x449297(0x132)]);}if(_0x570e50!==undefined){const _0x1cd224=await this[_0x449297(0x14a)+'sk'](_0x251354),_0x4d4de6=_0x1cd224['assig'+'nees'][_0x449297(0x1d1)](_0x4f8310=>_0x4f8310['id']);_0x2077c6[_0x449297(0x167)+_0x449297(0x1c0)]=Array['isArr'+'ay'](_0x570e50)?{'add':_0x570e50['filte'+'r'](_0x57c80a=>!_0x4d4de6[_0x449297(0x1e0)+_0x449297(0x21a)](_0x57c80a)),'rem':_0x4d4de6[_0x449297(0x141)+'r'](_0x30fcea=>!_0x570e50[_0x449297(0x1e0)+_0x449297(0x21a)](_0x30fcea))}:_0x570e50;}const _0x27431a=await this[_0x449297(0x1ca)+_0x449297(0x1f9)+'t'](async()=>{const _0x5a0503=_0x449297,_0xde322c=await this[_0x5a0503(0x22c)+'t']['put']('/task'+'/'+_0x251354,_0x2077c6),_0x34820d=_0xde322c[_0x5a0503(0x1b1)];if(_0x23a942[_0x5a0503(0x14e)](typeof _0x34820d,_0x23a942[_0x5a0503(0x129)])){const _0x54b94f=_0x34820d['match'](/task.*?(\w{9,10})/i);if(_0x54b94f)return await this[_0x5a0503(0x14a)+'sk'](_0x54b94f[0x1]);throw new ClickUpServiceError(_0x23a942['xtFLm'],ErrorCode[_0x5a0503(0x232)+'WN'],_0x34820d);}return _0x34820d;});if(_0x1c2e34?.['lengt'+'h']){const {CustomFieldService:_0x4f28bd}=await import('../cu'+'stom-'+_0x449297(0x10b)+_0x449297(0x170)),_0x45f0e7=new _0x4f28bd(this[_0x449297(0x185)+'y'],this['teamI'+'d'],this['baseU'+'rl'],this[_0x449297(0x1f8)+_0x449297(0x116)]);for(const _0x4cfbc6 of _0x1c2e34){await _0x45f0e7['setFi'+'eldVa'+_0x449297(0x16c)](_0x251354,_0x4cfbc6['id'],_0x4cfbc6[_0x449297(0x16e)]);}}return _0x27431a;}catch(_0xf6d062){throw this[_0x449297(0x137)+_0x449297(0x17b)+'r'](_0xf6d062,_0x449297(0x23b)+_0x449297(0x19a)+_0x449297(0x10a)+_0x449297(0x1c7)+'k\x20'+_0x251354);}}async[a0_0x4f2d02(0x14a)+'skTim'+a0_0x4f2d02(0x157)+a0_0x4f2d02(0x194)](_0x576038){const _0x8ded52=a0_0x4f2d02;return this[_0x8ded52(0x1ca)+'eques'+'t'](()=>this[_0x8ded52(0x22c)+'t']['get'](_0x8ded52(0x1eb)+'/'+_0x576038+(_0x8ded52(0x122)+_0x8ded52(0x15d)+_0x8ded52(0x23f))))[_0x8ded52(0x208)](_0x54bfec=>_0x54bfec[_0x8ded52(0x1b1)])[_0x8ded52(0x1b6)](_0x456c64=>{const _0x4f5197=_0x8ded52;throw this[_0x4f5197(0x137)+_0x4f5197(0x17b)+'r'](_0x456c64,_0x4f5197(0x23b)+_0x4f5197(0x19a)+_0x4f5197(0x1db)+_0x4f5197(0x16b)+_0x4f5197(0x173)+'tus\x20f'+'or\x20ta'+_0x4f5197(0x233)+_0x576038);});}async[a0_0x4f2d02(0x107)+a0_0x4f2d02(0x21d)+'kTime'+a0_0x4f2d02(0x219)+'tus'](_0x54bda7,_0x57f6dd){const _0x3dd694=a0_0x4f2d02;return this['makeR'+_0x3dd694(0x1f9)+'t'](()=>this['clien'+'t'][_0x3dd694(0x1a1)](_0x3dd694(0x1eb)+_0x3dd694(0x1d7)+_0x3dd694(0x138)+_0x3dd694(0x15d)+_0x3dd694(0x23f),{'params':{'task_ids':_0x54bda7,'custom_task_ids':_0x57f6dd}}))['then'](_0xaa1d1f=>_0xaa1d1f[_0x3dd694(0x1b1)])[_0x3dd694(0x1b6)](_0x1d0d8d=>{const _0x2fefa8=_0x3dd694;throw this[_0x2fefa8(0x137)+_0x2fefa8(0x17b)+'r'](_0x1d0d8d,_0x2fefa8(0x23b)+_0x2fefa8(0x19a)+_0x2fefa8(0x15f)+_0x2fefa8(0x1ba)+'ime\x20i'+_0x2fefa8(0x173)+_0x2fefa8(0x121));});}async[a0_0x4f2d02(0x14a)+a0_0x4f2d02(0x17d)+a0_0x4f2d02(0x125)](_0x304ee3){const _0x2f0a96=a0_0x4f2d02;return this[_0x2f0a96(0x1ca)+_0x2f0a96(0x1f9)+'t'](()=>this[_0x2f0a96(0x22c)+'t'][_0x2f0a96(0x1a1)](_0x2f0a96(0x1eb)+'/'+_0x304ee3+(_0x2f0a96(0x124)+'er')))[_0x2f0a96(0x208)](_0x4b344b=>_0x4b344b[_0x2f0a96(0x1b1)])[_0x2f0a96(0x1b6)](_0x4dbc31=>{const _0x4f6164=_0x2f0a96;throw this[_0x4f6164(0x137)+_0x4f6164(0x17b)+'r'](_0x4dbc31,_0x4f6164(0x23b)+_0x4f6164(0x19a)+_0x4f6164(0x21f)+_0x4f6164(0x1a5)+_0x4f6164(0x1e4)+_0x4f6164(0x148)+'\x20'+_0x304ee3);});}async[a0_0x4f2d02(0x11a)+'eTask'](_0xe025bb){const _0x107698=a0_0x4f2d02;return this['handl'+_0x107698(0x106)+_0x107698(0x241)](_0x107698(0x11a)+_0x107698(0x158),()=>this['clien'+'t']['delet'+'e'](_0x107698(0x1eb)+'/'+_0xe025bb),_0x107698(0x23b)+_0x107698(0x19a)+'delet'+'e\x20tas'+'k\x20'+_0xe025bb);}async[a0_0x4f2d02(0x1e3)+a0_0x4f2d02(0x242)](_0x5adf3c,_0xeb2080,_0x238f73=![]){const _0x17f6d9=a0_0x4f2d02,_0x4c1554={'DODVE':function(_0x1efecc,_0x4942a9){return _0x1efecc===_0x4942a9;},'BWNpZ':function(_0x29a457,_0x4cb173){return _0x29a457===_0x4cb173;}};try{const [_0x1644ef]=await Promise['all']([this['valid'+_0x17f6d9(0x13a)+_0x17f6d9(0x12f)+'sts'](_0x5adf3c),this[_0x17f6d9(0x150)+_0x17f6d9(0x12b)+_0x17f6d9(0x248)+'sts'](_0xeb2080)]),_0x1bdfae=_0x1644ef[_0x17f6d9(0x113)]['id'];if(_0x4c1554['DODVE'](_0x1bdfae,_0xeb2080))return _0x1644ef;try{return await this['addTa'+'skToL'+_0x17f6d9(0x179)](_0x5adf3c,_0xeb2080),await this[_0x17f6d9(0x1cb)+_0x17f6d9(0x158)+_0x17f6d9(0x1d4)+_0x17f6d9(0x179)](_0x5adf3c,_0x1bdfae);}catch(_0x49aa9f){if(_0x49aa9f instanceof ClickUpServiceError&&_0x4c1554[_0x17f6d9(0x130)](_0x49aa9f[_0x17f6d9(0x1b7)],ErrorCode[_0x17f6d9(0x230)+'DDEN'])){if(!_0x238f73)throw new ClickUpServiceError(_0x17f6d9(0x1be)+_0x17f6d9(0x17c)+_0x17f6d9(0x19b)+'\x20move'+_0x17f6d9(0x1ea)+_0x17f6d9(0x19d)+'lan\x20l'+_0x17f6d9(0x1f2)+_0x17f6d9(0x15a)+_0x17f6d9(0x1ee)+_0x17f6d9(0x1ef)+'\x20in\x20T'+'ask\x20I'+_0x17f6d9(0x12a)+'\x20retr'+_0x17f6d9(0x1f7)+_0x17f6d9(0x196)+'owDes'+'truct'+_0x17f6d9(0x17e)+_0x17f6d9(0x1a7)+'k:\x20tr'+_0x17f6d9(0x151),ErrorCode[_0x17f6d9(0x230)+'DDEN']);const _0x360082=await this[_0x17f6d9(0x1b4)+'ctDee'+'pTask'+_0x17f6d9(0x128)](_0x5adf3c),_0xa597b7=await this[_0x17f6d9(0x1d8)+_0x17f6d9(0x158)](_0xeb2080,_0x360082);return await this[_0x17f6d9(0x11a)+_0x17f6d9(0x158)](_0x5adf3c),_0xa597b7;}throw _0x49aa9f;}}catch(_0x1c7835){throw this[_0x17f6d9(0x137)+_0x17f6d9(0x17b)+'r'](_0x1c7835,_0x17f6d9(0x23b)+'d\x20to\x20'+_0x17f6d9(0x12d)+_0x17f6d9(0x21b));}}async['addTa'+a0_0x4f2d02(0x212)+a0_0x4f2d02(0x179)](_0x57b84c,_0x53ca21){const _0x1c8272=a0_0x4f2d02;return this['makeR'+'eques'+'t'](async()=>{const _0x581016=a0_0x2f66;return await Promise['all']([this[_0x581016(0x150)+'ateTa'+'skExi'+_0x581016(0x139)](_0x57b84c),this[_0x581016(0x150)+_0x581016(0x12b)+_0x581016(0x248)+'sts'](_0x53ca21)]),await this['clien'+'t'][_0x581016(0x240)]('/list'+'/'+_0x53ca21+('/task'+'/')+_0x57b84c),this['valid'+_0x581016(0x120)+'Cache'][_0x581016(0x12e)][_0x581016(0x11a)+'e'](_0x57b84c),await this['getTa'+'sk'](_0x57b84c);})[_0x1c8272(0x1b6)](_0x455173=>{const _0x4a9c9d=_0x1c8272;throw this[_0x4a9c9d(0x137)+_0x4a9c9d(0x17b)+'r'](_0x455173,_0x4a9c9d(0x23b)+_0x4a9c9d(0x19a)+_0x4a9c9d(0x214)+_0x4a9c9d(0x23d)+_0x57b84c+('\x20to\x20l'+_0x4a9c9d(0x1b9))+_0x53ca21);});}async[a0_0x4f2d02(0x1cb)+'eTask'+a0_0x4f2d02(0x1d4)+'ist'](_0x3c69cc,_0x295aa6){const _0xe157fa=a0_0x4f2d02;return this[_0xe157fa(0x1ca)+_0xe157fa(0x1f9)+'t'](async()=>{const _0x20dd74=_0xe157fa;return await Promise['all']([this['valid'+_0x20dd74(0x13a)+_0x20dd74(0x12f)+_0x20dd74(0x139)](_0x3c69cc),this['valid'+_0x20dd74(0x12b)+_0x20dd74(0x248)+'sts'](_0x295aa6)]),await this['clien'+'t'][_0x20dd74(0x11a)+'e'](_0x20dd74(0x115)+'/'+_0x295aa6+('/task'+'/')+_0x3c69cc),this[_0x20dd74(0x150)+'ation'+'Cache'][_0x20dd74(0x12e)][_0x20dd74(0x11a)+'e'](_0x3c69cc),await this[_0x20dd74(0x14a)+'sk'](_0x3c69cc);})[_0xe157fa(0x1b6)](_0x419be3=>{const _0x3cb2cf=_0xe157fa;throw this[_0x3cb2cf(0x137)+_0x3cb2cf(0x17b)+'r'](_0x419be3,_0x3cb2cf(0x23b)+_0x3cb2cf(0x19a)+_0x3cb2cf(0x1cb)+_0x3cb2cf(0x1c7)+'k\x20'+_0x3c69cc+(_0x3cb2cf(0x1b0)+_0x3cb2cf(0x164)+'\x20')+_0x295aa6);});}async[a0_0x4f2d02(0x21e)+a0_0x4f2d02(0x1a8)+a0_0x4f2d02(0x242)](_0x3a7738,_0x596c15){const _0x7332e2=a0_0x4f2d02;try{const _0x4e228a=await this['getTa'+'sk'](_0x3a7738),_0x5a821f=_0x596c15||_0x4e228a[_0x7332e2(0x113)]['id'],_0x3808a2=await this[_0x7332e2(0x1b4)+'ctDee'+_0x7332e2(0x18a)+_0x7332e2(0x128)](_0x3a7738),_0x5a0c2a=await this[_0x7332e2(0x1d8)+_0x7332e2(0x158)](_0x5a821f,_0x3808a2);return _0x5a0c2a;}catch(_0x18fb2f){throw this[_0x7332e2(0x137)+_0x7332e2(0x17b)+'r'](_0x18fb2f,_0x7332e2(0x23b)+'d\x20to\x20'+_0x7332e2(0x21e)+'cate\x20'+_0x7332e2(0x1d5)+_0x3a7738);}}async[a0_0x4f2d02(0x150)+a0_0x4f2d02(0x13a)+a0_0x4f2d02(0x12f)+a0_0x4f2d02(0x139)](_0x545029){const _0x2ba4c3=a0_0x4f2d02,_0xc68edb={'uEhsD':function(_0x8dc05,_0xba75b3){return _0x8dc05<_0xba75b3;}},_0x221ce6=this[_0x2ba4c3(0x150)+_0x2ba4c3(0x120)+_0x2ba4c3(0x198)]['tasks'][_0x2ba4c3(0x1a1)](_0x545029);if(_0x221ce6&&_0xc68edb[_0x2ba4c3(0x217)](Date[_0x2ba4c3(0x195)]()-_0x221ce6[_0x2ba4c3(0x150)+'atedA'+'t'],this[_0x2ba4c3(0x1d3)+_0x2ba4c3(0x1ec)]))return _0x221ce6[_0x2ba4c3(0x21b)];const _0x1863b8=await this[_0x2ba4c3(0x14a)+'sk'](_0x545029);return this[_0x2ba4c3(0x150)+'ation'+_0x2ba4c3(0x198)][_0x2ba4c3(0x12e)][_0x2ba4c3(0x225)](_0x545029,{'validatedAt':Date[_0x2ba4c3(0x195)](),'task':_0x1863b8}),_0x1863b8;}async[a0_0x4f2d02(0x150)+a0_0x4f2d02(0x12b)+a0_0x4f2d02(0x248)+a0_0x4f2d02(0x139)](_0x5d6e52){const _0x599ccf=a0_0x4f2d02,_0x343d01={'nXdNf':function(_0x3d2cce,_0x56fb65){return _0x3d2cce-_0x56fb65;}},_0x4c3063=this[_0x599ccf(0x150)+_0x599ccf(0x120)+'Cache'][_0x599ccf(0x11f)][_0x599ccf(0x1a1)](_0x5d6e52);if(_0x4c3063&&_0x343d01['nXdNf'](Date['now'](),_0x4c3063[_0x599ccf(0x150)+_0x599ccf(0x213)+'t'])<this['CACHE'+_0x599ccf(0x1ec)]){if(!_0x4c3063[_0x599ccf(0x150)])throw new ClickUpServiceError(_0x599ccf(0x11e)+_0x5d6e52+(_0x599ccf(0x188)+'found'),ErrorCode[_0x599ccf(0x13e)+_0x599ccf(0x1e1)]);return;}try{const _0x5d007d=await this['listS'+_0x599ccf(0x1fd)+'e'][_0x599ccf(0x174)+'st'](_0x5d6e52);this[_0x599ccf(0x150)+_0x599ccf(0x120)+_0x599ccf(0x198)][_0x599ccf(0x11f)][_0x599ccf(0x225)](_0x5d6e52,{'validatedAt':Date['now'](),'valid':!![],'statuses':_0x5d007d['statu'+'ses']?.[_0x599ccf(0x1d1)](_0x3f4255=>_0x3f4255[_0x599ccf(0x161)+'s'])});}catch(_0x32e9e3){this[_0x599ccf(0x150)+_0x599ccf(0x120)+_0x599ccf(0x198)][_0x599ccf(0x11f)][_0x599ccf(0x225)](_0x5d6e52,{'validatedAt':Date[_0x599ccf(0x195)](),'valid':![]});throw _0x32e9e3;}}[a0_0x4f2d02(0x238)+a0_0x4f2d02(0x218)+'tatus'](_0xd3f4e0,_0x6df1f3){const _0x11c2bf=a0_0x4f2d02;if(!_0x6df1f3||_0x6df1f3['lengt'+'h']===0x0)return _0xd3f4e0['toLow'+_0x11c2bf(0x207)+'e']();const _0xf5db72=_0xd3f4e0[_0x11c2bf(0x1b3)+'erCas'+'e'](),_0x2a97a6=_0x6df1f3[_0x11c2bf(0x143)](_0x2ff5c2=>_0x2ff5c2[_0x11c2bf(0x1b3)+_0x11c2bf(0x207)+'e']()===_0xf5db72);if(_0x2a97a6)return _0x2a97a6;const _0x57890f=findBestMatchInArray(_0x6df1f3[_0x11c2bf(0x1d1)](_0xaebda0=>({'name':_0xaebda0})),_0xd3f4e0);return _0x57890f?_0x57890f[_0x11c2bf(0x204)]['name']:_0xd3f4e0[_0x11c2bf(0x1b3)+_0x11c2bf(0x207)+'e']();}[a0_0x4f2d02(0x201)+a0_0x4f2d02(0x180)+'s'](_0x38e1a1,_0x1e2341){const _0x5dc340=a0_0x4f2d02,_0x523e00=this[_0x5dc340(0x150)+_0x5dc340(0x120)+_0x5dc340(0x198)][_0x5dc340(0x11f)][_0x5dc340(0x1a1)](_0x38e1a1),_0x3a28a0=_0x523e00?.[_0x5dc340(0x161)+_0x5dc340(0x132)]||[];!_0x3a28a0[_0x5dc340(0x1e0)+_0x5dc340(0x21a)](_0x1e2341)&&this[_0x5dc340(0x150)+_0x5dc340(0x120)+'Cache'][_0x5dc340(0x11f)]['set'](_0x38e1a1,{'validatedAt':Date[_0x5dc340(0x195)](),'valid':!![],'statuses':[..._0x3a28a0,_0x1e2341]});}[a0_0x4f2d02(0x172)+'chedT'+a0_0x4f2d02(0x134)](_0xa38e4d,_0x2d2df1,_0x162a68){const _0x2603c8=a0_0x4f2d02,_0xe56f15={'GiCzR':function(_0x40690d,_0x5a513b){return _0x40690d<_0x5a513b;}},_0xb7491d=_0x162a68||this[_0x2603c8(0x1a9)+'d'],_0xede980=_0xb7491d+':'+_0xa38e4d,_0x57f6b1=this[_0x2603c8(0x1d2)+'oIdCa'+'che'][_0x2603c8(0x1a1)](_0xede980);return _0x57f6b1&&_0xe56f15[_0x2603c8(0x1e8)](Date[_0x2603c8(0x195)]()-_0x57f6b1[_0x2603c8(0x150)+_0x2603c8(0x213)+'t'],this[_0x2603c8(0x1d3)+_0x2603c8(0x1ec)])&&(!_0x2d2df1||_0x57f6b1[_0x2603c8(0x209)+'d']===_0x2d2df1)?_0x57f6b1[_0x2603c8(0x234)+'d']:null;}[a0_0x4f2d02(0x201)+'TaskN'+a0_0x4f2d02(0x1c3)+'Id'](_0x361d4c,_0x4e5d7b,_0x503780,_0x16d671){const _0x3abd6d=a0_0x4f2d02,_0xf4d5c2=_0x16d671||this[_0x3abd6d(0x1a9)+'d'],_0x1d6682=_0xf4d5c2+':'+_0x361d4c;this[_0x3abd6d(0x1d2)+'oIdCa'+'che'][_0x3abd6d(0x225)](_0x1d6682,{'taskId':_0x4e5d7b,'validatedAt':Date['now'](),'listId':_0x503780});}async[a0_0x4f2d02(0x150)+'ateTa'+'sksEx'+a0_0x4f2d02(0x179)](_0x1a4eb5){const _0x21384a=a0_0x4f2d02,_0x1651b3={'TZOUE':function(_0x22ffd1,_0x5ac88d){return _0x22ffd1<_0x5ac88d;},'YwkmZ':function(_0x288e58,_0x1c6dc2){return _0x288e58<_0x1c6dc2;}},_0x38d6fd=new Map(),_0x2fbbf8=_0x1a4eb5[_0x21384a(0x141)+'r'](_0x3b96df=>{const _0x44ed75=_0x21384a,_0x3ce380=this[_0x44ed75(0x150)+'ation'+_0x44ed75(0x198)]['tasks'][_0x44ed75(0x1a1)](_0x3b96df);if(_0x3ce380&&_0x1651b3['TZOUE'](Date[_0x44ed75(0x195)]()-_0x3ce380['valid'+'atedA'+'t'],this[_0x44ed75(0x1d3)+_0x44ed75(0x1ec)]))return _0x38d6fd[_0x44ed75(0x225)](_0x3b96df,_0x3ce380[_0x44ed75(0x21b)]),![];return!![];});if(_0x2fbbf8[_0x21384a(0x245)+'h'])for(let _0x5be2a9=0x0;_0x1651b3['YwkmZ'](_0x5be2a9,_0x2fbbf8[_0x21384a(0x245)+'h']);_0x5be2a9+=0x5){const _0x5b3712=_0x2fbbf8[_0x21384a(0x1c8)](_0x5be2a9,_0x5be2a9+0x5),_0x1402cc=await Promise[_0x21384a(0x21c)](_0x5b3712[_0x21384a(0x1d1)](_0xcd4285=>this[_0x21384a(0x14a)+'sk'](_0xcd4285)));_0x1402cc[_0x21384a(0x16d)+'ch']((_0x281f37,_0x4ee0d0)=>{const _0x598ab=_0x21384a;this[_0x598ab(0x150)+'ation'+'Cache'][_0x598ab(0x12e)][_0x598ab(0x225)](_0x5b3712[_0x4ee0d0],{'validatedAt':Date['now'](),'task':_0x281f37}),_0x38d6fd[_0x598ab(0x225)](_0x5b3712[_0x4ee0d0],_0x281f37);});}return _0x38d6fd;}}