UNPKG

@taazkareem/clickup-mcp-server

Version:

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

1 lines 23.7 kB
function a0_0x5b34(_0x2623f9,_0x1f7c1d){_0x2623f9=_0x2623f9-0x1b1;const _0x1360a7=a0_0x1360();let _0x5b34b7=_0x1360a7[_0x2623f9];if(a0_0x5b34['sBmoPP']===undefined){var _0x15a9b4=function(_0x363fd1){const _0x107616='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x40fe4a='',_0x406397='';for(let _0xc91252=0x0,_0x204b46,_0x426117,_0xc259db=0x0;_0x426117=_0x363fd1['charAt'](_0xc259db++);~_0x426117&&(_0x204b46=_0xc91252%0x4?_0x204b46*0x40+_0x426117:_0x426117,_0xc91252++%0x4)?_0x40fe4a+=String['fromCharCode'](0xff&_0x204b46>>(-0x2*_0xc91252&0x6)):0x0){_0x426117=_0x107616['indexOf'](_0x426117);}for(let _0x1cb0a3=0x0,_0x4c2d13=_0x40fe4a['length'];_0x1cb0a3<_0x4c2d13;_0x1cb0a3++){_0x406397+='%'+('00'+_0x40fe4a['charCodeAt'](_0x1cb0a3)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x406397);};a0_0x5b34['rmBsEr']=_0x15a9b4,a0_0x5b34['dxTrzW']={},a0_0x5b34['sBmoPP']=!![];}const _0x29251e=_0x1360a7[0x0],_0x42fd7e=_0x2623f9+_0x29251e,_0x33522d=a0_0x5b34['dxTrzW'][_0x42fd7e];return!_0x33522d?(_0x5b34b7=a0_0x5b34['rmBsEr'](_0x5b34b7),a0_0x5b34['dxTrzW'][_0x42fd7e]=_0x5b34b7):_0x5b34b7=_0x33522d,_0x5b34b7;}const a0_0x23e2aa=a0_0x5b34;(function(_0x3b9ee4,_0x5ba126){const _0x5a5b89=a0_0x5b34,_0xd9b2d4=_0x3b9ee4();while(!![]){try{const _0xff549=parseInt(_0x5a5b89(0x272))/0x1+-parseInt(_0x5a5b89(0x27c))/0x2*(parseInt(_0x5a5b89(0x25a))/0x3)+parseInt(_0x5a5b89(0x265))/0x4*(-parseInt(_0x5a5b89(0x232))/0x5)+parseInt(_0x5a5b89(0x242))/0x6+-parseInt(_0x5a5b89(0x1b1))/0x7*(parseInt(_0x5a5b89(0x1d9))/0x8)+-parseInt(_0x5a5b89(0x1d4))/0x9+-parseInt(_0x5a5b89(0x249))/0xa*(-parseInt(_0x5a5b89(0x1ff))/0xb);if(_0xff549===_0x5ba126)break;else _0xd9b2d4['push'](_0xd9b2d4['shift']());}catch(_0x4928e8){_0xd9b2d4['push'](_0xd9b2d4['shift']());}}}(a0_0x1360,0xa1cb3));import{BaseClickUpService,ErrorCode,ClickUpServiceError}from'./base.js';export class ListService extends BaseClickUpService{constructor(_0x6f0967,_0x5d3543,_0x41d366,_0x157665,_0x72299c){const _0x55edd3=a0_0x5b34,_0x397b37={'Mfdew':function(_0x569f33,_0x4a041f){return _0x569f33||_0x4a041f;}};super(_0x6f0967,_0x5d3543,_0x41d366,_0x72299c),this['works'+_0x55edd3(0x233)+'ervic'+'e']=null,this[_0x55edd3(0x213)+'paceS'+_0x55edd3(0x1b7)+'e']=_0x397b37['Mfdew'](_0x157665,null);}[a0_0x23e2aa(0x234)+a0_0x23e2aa(0x25c)+'Id'](_0x5b3661){const _0x480307=a0_0x23e2aa,_0x29a04a={'JGayy':function(_0x3b3d0b,_0xf5f823){return _0x3b3d0b!==_0xf5f823;}};_0x29a04a[_0x480307(0x202)](this[_0x480307(0x1bb)+'d'],_0x5b3661)&&(super[_0x480307(0x234)+_0x480307(0x25c)+'Id'](_0x5b3661),this[_0x480307(0x213)+'paceS'+'ervic'+'e']?.['updat'+_0x480307(0x25c)+'Id'](_0x5b3661));}[a0_0x23e2aa(0x251)+a0_0x23e2aa(0x25e)+'r'](_0x2d6274,_0x13a0e3){const _0x42b6b2=a0_0x23e2aa;if(_0x2d6274 instanceof ClickUpServiceError)return _0x2d6274;return new ClickUpServiceError(_0x13a0e3||_0x42b6b2(0x1fb)+_0x42b6b2(0x206)+_0x42b6b2(0x238)+'ror:\x20'+_0x2d6274[_0x42b6b2(0x244)+'ge'],ErrorCode[_0x42b6b2(0x24f)+'WN'],_0x2d6274);}async[a0_0x23e2aa(0x269)+'eList'](_0x1e7689,_0xe3ab68){const _0x18486b=a0_0x23e2aa;this[_0x18486b(0x1db)+_0x18486b(0x1e0)+'on'](_0x18486b(0x269)+_0x18486b(0x26b),{'spaceId':_0x1e7689,..._0xe3ab68});try{return await this[_0x18486b(0x22c)+_0x18486b(0x26d)+'t'](async()=>{const _0xda70ac=_0x18486b,_0x1bcbd2=await this['clien'+'t']['post']('/spac'+'e/'+_0x1e7689+_0xda70ac(0x1e8),_0xe3ab68);return this[_0xda70ac(0x20d)+'r'][_0xda70ac(0x1f6)](_0xda70ac(0x23d)+_0xda70ac(0x230)+_0xda70ac(0x21e)+_0xda70ac(0x279)+_0xda70ac(0x1b4)+_0xda70ac(0x1e9)+_0xda70ac(0x271)+'che\x20d'+_0xda70ac(0x1c6)+_0xda70ac(0x1da)+_0xda70ac(0x203)+_0xda70ac(0x1ba)+_0xda70ac(0x227)+_0xda70ac(0x1c7),{'spaceId':_0x1e7689}),this[_0xda70ac(0x213)+'paceS'+_0xda70ac(0x1b7)+'e']?.[_0xda70ac(0x205)+_0xda70ac(0x1b9)+_0xda70ac(0x27b)+'ierar'+'chy'](),_0x1bcbd2[_0xda70ac(0x27e)];});}catch(_0x2c5cae){throw this[_0x18486b(0x251)+'eErro'+'r'](_0x2c5cae,_0x18486b(0x248)+_0x18486b(0x24e)+_0x18486b(0x269)+'e\x20lis'+_0x18486b(0x1f3)+'space'+'\x20'+_0x1e7689);}}async[a0_0x23e2aa(0x269)+a0_0x23e2aa(0x26b)+a0_0x23e2aa(0x1ef)+a0_0x23e2aa(0x1d1)](_0x56be6c,_0x52d430){const _0x29d363=a0_0x23e2aa,_0x343d10={'eQOwN':'Inval'+_0x29d363(0x230)+_0x29d363(0x21e)+_0x29d363(0x279)+_0x29d363(0x1b4)+_0x29d363(0x1e9)+_0x29d363(0x271)+'che\x20d'+_0x29d363(0x1c6)+_0x29d363(0x1da)+_0x29d363(0x203)+_0x29d363(0x1ba)+_0x29d363(0x220)+_0x29d363(0x221)};this[_0x29d363(0x1db)+_0x29d363(0x1e0)+'on']('creat'+'eList'+'InFol'+_0x29d363(0x1d1),{'folderId':_0x56be6c,..._0x52d430});try{return await this[_0x29d363(0x22c)+'eques'+'t'](async()=>{const _0x35671b=_0x29d363,_0x1209c6=await this[_0x35671b(0x214)+'t']['post']('/fold'+_0x35671b(0x23f)+_0x56be6c+_0x35671b(0x1e8),_0x52d430);return this['logge'+'r'][_0x35671b(0x1f6)](_0x343d10['eQOwN'],{'folderId':_0x56be6c}),this[_0x35671b(0x213)+_0x35671b(0x233)+_0x35671b(0x1b7)+'e']?.['clear'+_0x35671b(0x1b9)+_0x35671b(0x27b)+_0x35671b(0x219)+_0x35671b(0x268)](),_0x1209c6[_0x35671b(0x27e)];});}catch(_0x181c33){throw this[_0x29d363(0x251)+_0x29d363(0x25e)+'r'](_0x181c33,_0x29d363(0x248)+_0x29d363(0x24e)+_0x29d363(0x269)+_0x29d363(0x1f5)+'t\x20in\x20'+_0x29d363(0x25d)+'r\x20'+_0x56be6c);}}async[a0_0x23e2aa(0x21b)+'st'](_0x3389ae){const _0x1864a2=a0_0x23e2aa;this['logOp'+_0x1864a2(0x1e0)+'on'](_0x1864a2(0x21b)+'st',{'listId':_0x3389ae});try{const _0x5f467f=await this['makeR'+_0x1864a2(0x26d)+'t'](async()=>{const _0x147b37=_0x1864a2;return await this[_0x147b37(0x214)+'t'][_0x147b37(0x1ce)]('/list'+'/'+_0x3389ae);});return _0x5f467f[_0x1864a2(0x27e)];}catch(_0x4882c0){throw this[_0x1864a2(0x251)+_0x1864a2(0x25e)+'r'](_0x4882c0,_0x1864a2(0x248)+'d\x20to\x20'+'retri'+_0x1864a2(0x228)+_0x1864a2(0x204)+_0x3389ae+'\x22');}}async[a0_0x23e2aa(0x1fc)+'stomF'+'ields'](_0x3f0d5f){const _0x3a5436=a0_0x23e2aa;this[_0x3a5436(0x1db)+_0x3a5436(0x1e0)+'on']('getCu'+'stomF'+_0x3a5436(0x1d2),{'listId':_0x3f0d5f});try{const _0x2842ac=await this[_0x3a5436(0x22c)+_0x3a5436(0x26d)+'t'](async()=>{const _0x46cde7=_0x3a5436;return await this[_0x46cde7(0x214)+'t'][_0x46cde7(0x1ce)](_0x46cde7(0x1e8)+'/'+_0x3f0d5f+('/fiel'+'d'));});return _0x2842ac[_0x3a5436(0x27e)][_0x3a5436(0x1f8)+'s']||[];}catch(_0x2c842a){throw this[_0x3a5436(0x251)+_0x3a5436(0x25e)+'r'](_0x2c842a,_0x3a5436(0x248)+_0x3a5436(0x24e)+_0x3a5436(0x23c)+'eve\x20c'+_0x3a5436(0x1e2)+'\x20fiel'+'ds\x20fo'+_0x3a5436(0x1dd)+_0x3a5436(0x1c5)+_0x3f0d5f+'\x22');}}async[a0_0x23e2aa(0x234)+a0_0x23e2aa(0x26b)](_0x374fa4,_0x5e0ffb){const _0x108d9d=a0_0x23e2aa,_0x4bca79={'wIgHS':_0x108d9d(0x234)+_0x108d9d(0x26b)};this[_0x108d9d(0x1db)+_0x108d9d(0x1e0)+'on'](_0x4bca79[_0x108d9d(0x1f9)],{'listId':_0x374fa4,..._0x5e0ffb});try{return await this[_0x108d9d(0x22c)+_0x108d9d(0x26d)+'t'](async()=>{const _0x2ef1e4=_0x108d9d,_0x294bc3=await this['clien'+'t'][_0x2ef1e4(0x250)](_0x2ef1e4(0x1e8)+'/'+_0x374fa4,_0x5e0ffb);return this[_0x2ef1e4(0x20d)+'r'][_0x2ef1e4(0x1f6)]('Inval'+'idati'+_0x2ef1e4(0x21e)+_0x2ef1e4(0x279)+_0x2ef1e4(0x1b4)+_0x2ef1e4(0x1e9)+_0x2ef1e4(0x271)+'che\x20d'+_0x2ef1e4(0x1c6)+_0x2ef1e4(0x1da)+'\x20upda'+'te',{'listId':_0x374fa4}),this['works'+'paceS'+'ervic'+'e']?.[_0x2ef1e4(0x205)+_0x2ef1e4(0x1b9)+'paceH'+_0x2ef1e4(0x219)+_0x2ef1e4(0x268)](),_0x294bc3['data'];});}catch(_0x3035ae){throw this['handl'+'eErro'+'r'](_0x3035ae,_0x108d9d(0x248)+_0x108d9d(0x24e)+_0x108d9d(0x234)+_0x108d9d(0x1f5)+'t\x20'+_0x374fa4);}}async[a0_0x23e2aa(0x252)+'eList'](_0x5c00f9){const _0x5bc8e2=a0_0x23e2aa;this[_0x5bc8e2(0x1db)+_0x5bc8e2(0x1e0)+'on'](_0x5bc8e2(0x252)+_0x5bc8e2(0x26b),{'listId':_0x5c00f9});try{return await this['makeR'+_0x5bc8e2(0x26d)+'t'](async()=>{const _0xb4eb46=_0x5bc8e2;await this[_0xb4eb46(0x214)+'t'][_0xb4eb46(0x252)+'e'](_0xb4eb46(0x1e8)+'/'+_0x5c00f9),this[_0xb4eb46(0x20d)+'r'][_0xb4eb46(0x1f6)]('Inval'+_0xb4eb46(0x230)+_0xb4eb46(0x21e)+_0xb4eb46(0x279)+'ce\x20hi'+'erarc'+_0xb4eb46(0x271)+'che\x20d'+_0xb4eb46(0x1c6)+_0xb4eb46(0x1da)+'\x20dele'+'tion',{'listId':_0x5c00f9}),this['works'+_0xb4eb46(0x233)+_0xb4eb46(0x1b7)+'e']?.[_0xb4eb46(0x205)+'Works'+_0xb4eb46(0x27b)+_0xb4eb46(0x219)+_0xb4eb46(0x268)]();}),{'success':!![]};}catch(_0xec75c8){throw this[_0x5bc8e2(0x251)+_0x5bc8e2(0x25e)+'r'](_0xec75c8,_0x5bc8e2(0x248)+'d\x20to\x20'+_0x5bc8e2(0x252)+'e\x20lis'+'t\x20'+_0x5c00f9);}}async[a0_0x23e2aa(0x21b)+'stsIn'+'Space'](_0x28ccee,_0x711bca){const _0x342862=a0_0x23e2aa,_0xd9edef={'QOAPf':function(_0x44768c,_0x504cfb){return _0x44768c!==_0x504cfb;}};this[_0x342862(0x1db)+'erati'+'on'](_0x342862(0x21b)+'stsIn'+_0x342862(0x1ed),{'spaceId':_0x28ccee,'archived':_0x711bca});try{return await this[_0x342862(0x22c)+_0x342862(0x26d)+'t'](async()=>{const _0x5d8e1a=_0x342862,_0x39e0f1=await this[_0x5d8e1a(0x214)+'t']['get'](_0x5d8e1a(0x1de)+'e/'+_0x28ccee+'/list',{'params':_0xd9edef['QOAPf'](_0x711bca,undefined)?{'archived':_0x711bca}:{}});return _0x39e0f1[_0x5d8e1a(0x27e)][_0x5d8e1a(0x23e)];});}catch(_0x238f50){throw this[_0x342862(0x251)+_0x342862(0x25e)+'r'](_0x238f50,_0x342862(0x248)+'d\x20to\x20'+'get\x20l'+'ists\x20'+_0x342862(0x227)+_0x342862(0x27d)+_0x28ccee);}}async[a0_0x23e2aa(0x21b)+a0_0x23e2aa(0x223)+a0_0x23e2aa(0x21c)+'r'](_0x2e695d,_0x57fca9){const _0x4ac86c=a0_0x23e2aa;this[_0x4ac86c(0x1db)+_0x4ac86c(0x1e0)+'on'](_0x4ac86c(0x21b)+'stsIn'+'Folde'+'r',{'folderId':_0x2e695d,'archived':_0x57fca9});try{return await this[_0x4ac86c(0x22c)+_0x4ac86c(0x26d)+'t'](async()=>{const _0x2b735c=_0x4ac86c,_0x1dc529=await this['clien'+'t'][_0x2b735c(0x1ce)]('/fold'+_0x2b735c(0x23f)+_0x2e695d+_0x2b735c(0x1e8),{'params':_0x57fca9!==undefined?{'archived':_0x57fca9}:{}});return _0x1dc529['data']['lists'];});}catch(_0x59c5b0){throw this['handl'+_0x4ac86c(0x25e)+'r'](_0x59c5b0,_0x4ac86c(0x248)+_0x4ac86c(0x24e)+'get\x20l'+_0x4ac86c(0x237)+_0x4ac86c(0x220)+_0x4ac86c(0x1bd)+_0x2e695d);}}async[a0_0x23e2aa(0x215)+'istBy'+a0_0x23e2aa(0x212)+a0_0x23e2aa(0x1c3)+'e'](_0x4272d5,_0xac6e53){const _0x237b39=a0_0x23e2aa;this[_0x237b39(0x1db)+'erati'+'on'](_0x237b39(0x215)+_0x237b39(0x1cd)+_0x237b39(0x212)+'nSpac'+'e',{'spaceId':_0x4272d5,'listName':_0xac6e53});try{const _0x455a00=await this[_0x237b39(0x21b)+_0x237b39(0x223)+_0x237b39(0x1ed)](_0x4272d5),_0x20ae30=_0x455a00[_0x237b39(0x1fe)](_0x511ef3=>_0x511ef3['name'][_0x237b39(0x23a)+'erCas'+'e']()===_0xac6e53[_0x237b39(0x23a)+_0x237b39(0x24d)+'e']());return _0x20ae30||null;}catch(_0x1af867){throw this[_0x237b39(0x251)+_0x237b39(0x25e)+'r'](_0x1af867,_0x237b39(0x248)+_0x237b39(0x24e)+'find\x20'+_0x237b39(0x22e)+_0x237b39(0x263)+_0x237b39(0x1d7)+_0x237b39(0x1d5)+'e\x20'+_0x4272d5);}}async[a0_0x23e2aa(0x215)+a0_0x23e2aa(0x1cd)+a0_0x23e2aa(0x212)+a0_0x23e2aa(0x24c)+'er'](_0x538482,_0x41a69e){const _0x56af4b=a0_0x23e2aa,_0xfc166d={'cqzxf':function(_0x33a78a,_0x58c8b4){return _0x33a78a||_0x58c8b4;}};this[_0x56af4b(0x1db)+_0x56af4b(0x1e0)+'on']('findL'+_0x56af4b(0x1cd)+'NameI'+_0x56af4b(0x24c)+'er',{'folderId':_0x538482,'listName':_0x41a69e});try{const _0x404fcd=await this[_0x56af4b(0x21b)+_0x56af4b(0x223)+_0x56af4b(0x21c)+'r'](_0x538482),_0x17d65b=_0x404fcd[_0x56af4b(0x1fe)](_0x271932=>_0x271932[_0x56af4b(0x1bc)][_0x56af4b(0x23a)+_0x56af4b(0x24d)+'e']()===_0x41a69e[_0x56af4b(0x23a)+'erCas'+'e']());return _0xfc166d[_0x56af4b(0x24a)](_0x17d65b,null);}catch(_0x37a222){throw this['handl'+'eErro'+'r'](_0x37a222,_0x56af4b(0x248)+_0x56af4b(0x24e)+_0x56af4b(0x1d3)+'list\x20'+_0x56af4b(0x263)+_0x56af4b(0x1d7)+'\x20fold'+_0x56af4b(0x235)+_0x538482);}}async[a0_0x23e2aa(0x21b)+a0_0x23e2aa(0x1f7)+a0_0x23e2aa(0x22d)](_0x10a4a1){const _0x4f6e80=a0_0x23e2aa;this[_0x4f6e80(0x1db)+_0x4f6e80(0x1e0)+'on']('getLi'+_0x4f6e80(0x1f7)+_0x4f6e80(0x22d),{'listId':_0x10a4a1});try{return await this[_0x4f6e80(0x22c)+_0x4f6e80(0x26d)+'t'](async()=>{const _0x3e2877=_0x4f6e80,_0x1c2b38=await this[_0x3e2877(0x214)+'t'][_0x3e2877(0x1ce)](_0x3e2877(0x1e8)+'/'+_0x10a4a1+('/memb'+'er'));return _0x1c2b38[_0x3e2877(0x27e)];});}catch(_0x4ec911){throw this[_0x4f6e80(0x251)+_0x4f6e80(0x25e)+'r'](_0x4ec911,_0x4f6e80(0x248)+_0x4f6e80(0x24e)+_0x4f6e80(0x273)+_0x4f6e80(0x260)+_0x4f6e80(0x236)+_0x4f6e80(0x1da)+'\x20'+_0x10a4a1);}}async['getLi'+a0_0x23e2aa(0x1df)+a0_0x23e2aa(0x1b6)](_0x638ac4){const _0x226231=a0_0x23e2aa,_0x55263a={'ljAGH':'getLi'+_0x226231(0x1df)+_0x226231(0x1b6)};this['logOp'+_0x226231(0x1e0)+'on'](_0x55263a['ljAGH'],{'listId':_0x638ac4});try{return await this[_0x226231(0x22c)+_0x226231(0x26d)+'t'](async()=>{const _0x357011=_0x226231,_0x337d5d=await this[_0x357011(0x214)+'t'][_0x357011(0x1ce)](_0x357011(0x1e8)+'/'+_0x638ac4+(_0x357011(0x25b)+'ent'));return _0x337d5d['data'][_0x357011(0x26c)+_0x357011(0x21a)]||[];});}catch(_0xd45cad){throw this['handl'+_0x226231(0x25e)+'r'](_0xd45cad,_0x226231(0x248)+_0x226231(0x24e)+_0x226231(0x1c1)+_0x226231(0x240)+_0x226231(0x259)+'r\x20lis'+'t\x20'+_0x638ac4);}}async['creat'+a0_0x23e2aa(0x26b)+a0_0x23e2aa(0x1d8)+'nt'](_0x2d89ab,_0x4b45fa,_0x426b5f=![],_0x4734e0,_0x25b0a7){const _0x5d9fc8=a0_0x23e2aa,_0x4bf31={'hilgf':'creat'+'eList'+_0x5d9fc8(0x1d8)+'nt','vMAMd':function(_0x4c5ea1,_0x2af5bb){return _0x4c5ea1===_0x2af5bb;},'JYcHu':_0x5d9fc8(0x229)+'t','LocTJ':_0x5d9fc8(0x20c)+'wn'};this['logOp'+_0x5d9fc8(0x1e0)+'on'](_0x4bf31[_0x5d9fc8(0x1c9)],{'listId':_0x2d89ab,'commentText':_0x4b45fa,'notifyAll':_0x426b5f,'assignee':_0x4734e0});try{const _0x5755de={'notify_all':_0x426b5f};if(_0x4734e0)_0x5755de[_0x5d9fc8(0x20b)+_0x5d9fc8(0x216)]=_0x4734e0;if(_0x25b0a7)_0x5755de[_0x5d9fc8(0x26c)+'nt']=_0x25b0a7;else _0x4b45fa&&(_0x5755de[_0x5d9fc8(0x26c)+_0x5d9fc8(0x266)+'xt']=_0x4b45fa);const _0x2ff9c3=await this[_0x5d9fc8(0x214)+'t'][_0x5d9fc8(0x270)](_0x5d9fc8(0x1e8)+'/'+_0x2d89ab+(_0x5d9fc8(0x25b)+_0x5d9fc8(0x1ca)),_0x5755de),_0x4a06a8=_0x2ff9c3['data'];if(_0x4a06a8[_0x5d9fc8(0x26c)+'nt']&&_0x4bf31[_0x5d9fc8(0x217)](typeof _0x4a06a8[_0x5d9fc8(0x26c)+'nt'],_0x4bf31[_0x5d9fc8(0x1e1)])&&_0x4a06a8[_0x5d9fc8(0x26c)+'nt']['id'])return _0x4a06a8[_0x5d9fc8(0x26c)+'nt'];if(_0x4a06a8['id'])return _0x4a06a8;return{'id':'fallb'+_0x5d9fc8(0x20a)+Date[_0x5d9fc8(0x255)](),'comment':_0x4b45fa,'comment_text':_0x4b45fa,'user':{'id':0x0,'username':_0x4bf31[_0x5d9fc8(0x1bf)],'email':'','color':''},'date':new Date()[_0x5d9fc8(0x21f)+_0x5d9fc8(0x274)+'g'](),'resolved':![]};}catch(_0x465b45){throw this[_0x5d9fc8(0x251)+_0x5d9fc8(0x25e)+'r'](_0x465b45,_0x5d9fc8(0x248)+_0x5d9fc8(0x24e)+_0x5d9fc8(0x269)+_0x5d9fc8(0x222)+_0x5d9fc8(0x1fa)+_0x5d9fc8(0x1dc)+_0x5d9fc8(0x22f)+_0x2d89ab);}}async[a0_0x23e2aa(0x269)+a0_0x23e2aa(0x26b)+a0_0x23e2aa(0x278)+a0_0x23e2aa(0x1f4)+'te'](_0x106cf9,_0x20734a,_0x3c55b7,_0x363b03){const _0x1c5500=a0_0x23e2aa,_0x147724={'fjTjA':function(_0x59d1c0,_0x223d38){return _0x59d1c0>_0x223d38;}};this[_0x1c5500(0x1db)+'erati'+'on'](_0x1c5500(0x269)+'eList'+_0x1c5500(0x278)+_0x1c5500(0x1f4)+'te',{'spaceId':_0x106cf9,'templateId':_0x20734a,'name':_0x3c55b7});try{const _0x64a0b1={'name':_0x3c55b7};_0x363b03&&_0x147724[_0x1c5500(0x1b8)](Object['keys'](_0x363b03)[_0x1c5500(0x26e)+'h'],0x0)&&(_0x64a0b1[_0x1c5500(0x22b)+'ns']=_0x363b03);const _0x1366da=await this[_0x1c5500(0x214)+'t'][_0x1c5500(0x270)](_0x1c5500(0x1de)+'e/'+_0x106cf9+(_0x1c5500(0x1e8)+_0x1c5500(0x1cb)+'late/')+_0x20734a,_0x64a0b1);return this['works'+'paceS'+_0x1c5500(0x1b7)+'e']?.[_0x1c5500(0x205)+_0x1c5500(0x1b9)+'paceH'+_0x1c5500(0x219)+_0x1c5500(0x268)](),_0x1366da[_0x1c5500(0x27e)];}catch(_0x2adbe8){throw this['handl'+_0x1c5500(0x25e)+'r'](_0x2adbe8,_0x1c5500(0x248)+_0x1c5500(0x24e)+_0x1c5500(0x269)+_0x1c5500(0x1f5)+'t\x20fro'+_0x1c5500(0x1be)+_0x1c5500(0x277)+'\x20'+_0x20734a+('\x20in\x20s'+_0x1c5500(0x264))+_0x106cf9);}}async[a0_0x23e2aa(0x269)+a0_0x23e2aa(0x26b)+a0_0x23e2aa(0x1ef)+'derFr'+a0_0x23e2aa(0x1b5)+a0_0x23e2aa(0x277)](_0x584936,_0x31bff3,_0x5a25e0,_0x5d08c6){const _0x34792e=a0_0x23e2aa,_0x3666c1={'LVePG':'creat'+_0x34792e(0x26b)+_0x34792e(0x1ef)+_0x34792e(0x27f)+'omTem'+_0x34792e(0x277)};this[_0x34792e(0x1db)+_0x34792e(0x1e0)+'on'](_0x3666c1[_0x34792e(0x1ee)],{'folderId':_0x584936,'templateId':_0x31bff3,'name':_0x5a25e0});try{const _0x1df77a={'name':_0x5a25e0};_0x5d08c6&&Object['keys'](_0x5d08c6)['lengt'+'h']>0x0&&(_0x1df77a[_0x34792e(0x22b)+'ns']=_0x5d08c6);const _0x5431a5=await this[_0x34792e(0x214)+'t'][_0x34792e(0x270)]('/fold'+_0x34792e(0x23f)+_0x584936+(_0x34792e(0x1e8)+_0x34792e(0x1cb)+_0x34792e(0x256))+_0x31bff3,_0x1df77a);return this[_0x34792e(0x213)+_0x34792e(0x233)+_0x34792e(0x1b7)+'e']?.[_0x34792e(0x205)+'Works'+_0x34792e(0x27b)+'ierar'+_0x34792e(0x268)](),_0x5431a5[_0x34792e(0x27e)];}catch(_0x544be5){throw this['handl'+'eErro'+'r'](_0x544be5,_0x34792e(0x248)+_0x34792e(0x24e)+_0x34792e(0x269)+_0x34792e(0x1f5)+_0x34792e(0x267)+'m\x20tem'+_0x34792e(0x277)+'\x20'+_0x31bff3+(_0x34792e(0x243)+_0x34792e(0x257)+'\x20')+_0x584936);}}async[a0_0x23e2aa(0x1b2)+a0_0x23e2aa(0x1d6)](_0x9e01e0,_0x25454b,_0x2d321a,_0x333d40=![]){const _0x387990=a0_0x23e2aa,_0x2ea898={'HjwCn':function(_0xb5daf8,_0x5bd4ff){return _0xb5daf8(_0x5bd4ff);},'kesXH':function(_0x50b90f,_0x44effd){return _0x50b90f===_0x44effd;},'TolaY':_0x387990(0x1b2)+_0x387990(0x1d6),'jYQui':function(_0xa34ff8,_0x500ffd){return _0xa34ff8 instanceof _0x500ffd;},'vAZmS':function(_0x3d47cb,_0x39aa7e){return _0x3d47cb-_0x39aa7e;},'mxAcO':function(_0x4f187d,_0x568024){return _0x4f187d===_0x568024;},'xqCkg':_0x387990(0x248)+'d\x20to\x20'+_0x387990(0x1b3)+_0x387990(0x1cf)+_0x387990(0x20f)+_0x387990(0x1e5)+_0x387990(0x20e)+_0x387990(0x247)+'t'};this[_0x387990(0x1db)+_0x387990(0x1e0)+'on']('moveL'+'ist',{'listId':_0x9e01e0,'destinationId':_0x25454b,'destinationType':_0x2d321a,'allowDestructiveFallback':_0x333d40});try{const _0x3fdaa0=await this[_0x387990(0x21b)+'st'](_0x9e01e0),_0x20a957={'urgent':0x1,'high':0x2,'normal':0x3,'low':0x4},_0x223688=_0x3fdaa0['prior'+_0x387990(0x207)]?.[_0x387990(0x1eb)+'ity']?_0x20a957[_0x3fdaa0[_0x387990(0x1eb)+_0x387990(0x207)]['prior'+_0x387990(0x207)]['toLow'+_0x387990(0x24d)+'e']()]:undefined,{toTaskPriority:_0x3e7671}=await import('./typ'+_0x387990(0x26f)),_0x5392ad={'name':_0x3fdaa0[_0x387990(0x1bc)],'content':_0x3fdaa0['conte'+'nt'],'due_date':_0x3fdaa0[_0x387990(0x1e4)+'ate']?parseInt(_0x3fdaa0[_0x387990(0x1e4)+_0x387990(0x275)]):undefined,'priority':_0x2ea898[_0x387990(0x1cc)](_0x3e7671,_0x223688),'assignee':_0x3fdaa0['assig'+_0x387990(0x216)]?.['id'],'status':_0x3fdaa0[_0x387990(0x209)+'s']?.[_0x387990(0x209)+'s']};let _0x4659ef;_0x2d321a===_0x387990(0x24b)?_0x4659ef=await this[_0x387990(0x269)+'eList'](_0x25454b,_0x5392ad):_0x4659ef=await this[_0x387990(0x269)+_0x387990(0x26b)+_0x387990(0x1ef)+_0x387990(0x1d1)](_0x25454b,_0x5392ad);this[_0x387990(0x1db)+_0x387990(0x1e0)+'on'](_0x387990(0x1b2)+_0x387990(0x1d6),{'step':'creat'+'ed_ne'+'w_lis'+'t','newListId':_0x4659ef['id']});const _0x3965ae=[];let _0x3acbf4=0x0,_0x1186ce=!![];while(_0x1186ce){const _0x2b16f8=await this[_0x387990(0x22c)+_0x387990(0x26d)+'t'](async()=>this['clien'+'t']['get'](_0x387990(0x1e8)+'/'+_0x9e01e0+'/task',{'params':{'include_closed':!![],'page':_0x3acbf4}})),_0x35ba4d=_0x2b16f8[_0x387990(0x27e)][_0x387990(0x1ea)]||[];_0x3965ae[_0x387990(0x27a)](..._0x35ba4d),_0x1186ce=_0x2ea898[_0x387990(0x1d0)](_0x35ba4d[_0x387990(0x26e)+'h'],0x64),_0x3acbf4++;}this[_0x387990(0x1db)+_0x387990(0x1e0)+'on'](_0x2ea898[_0x387990(0x276)],{'step':'fetch'+_0x387990(0x239)+'asks','count':_0x3965ae[_0x387990(0x26e)+'h']});let _0x259ecb=0x0,_0x25ec3a=null;for(const _0x29bfbe of _0x3965ae){try{await this[_0x387990(0x22c)+_0x387990(0x26d)+'t'](()=>this[_0x387990(0x214)+'t'][_0x387990(0x250)](this[_0x387990(0x1c0)+'eUrl']+(_0x387990(0x26a)+_0x387990(0x24b)+'s/')+this[_0x387990(0x1bb)+'d']+(_0x387990(0x1e7)+'s/')+_0x29bfbe['id']+(_0x387990(0x210)+_0x387990(0x1c8)+'/')+_0x4659ef['id'])),_0x259ecb++;}catch(_0xa76372){if(!_0x25ec3a)_0x25ec3a=_0xa76372;this[_0x387990(0x20d)+'r'][_0x387990(0x1c2)](_0x387990(0x248)+_0x387990(0x24e)+_0x387990(0x208)+_0x387990(0x1ec)+_0x29bfbe['id']+(_0x387990(0x262)+_0x387990(0x241)+'st'),_0xa76372);if(_0x2ea898[_0x387990(0x218)](_0xa76372,ClickUpServiceError)&&_0xa76372[_0x387990(0x1e6)]===ErrorCode[_0x387990(0x211)+_0x387990(0x21d)]&&!_0x333d40)break;}}const _0x231e8e=_0x2ea898[_0x387990(0x1c4)](_0x3965ae['lengt'+'h'],_0x259ecb);if(_0x231e8e===0x0)return await this[_0x387990(0x252)+_0x387990(0x26b)](_0x9e01e0),this[_0x387990(0x1db)+'erati'+'on'](_0x2ea898[_0x387990(0x276)],{'step':_0x387990(0x252)+_0x387990(0x225)+_0x387990(0x1f1)+_0x387990(0x1f2)}),_0x4659ef;else{const _0x36ea5f=_0x387990(0x246)+_0x387990(0x22a)+_0x387990(0x261)+_0x387990(0x226)+':\x20'+_0x259ecb+('\x20task'+_0x387990(0x231)+_0x387990(0x253))+_0x231e8e+(_0x387990(0x25f)+_0x387990(0x245)+_0x387990(0x201)+_0x387990(0x1fd)+':\x20')+(_0x25ec3a?.[_0x387990(0x244)+'ge']||_0x387990(0x20c)+_0x387990(0x254)+'ror');this[_0x387990(0x20d)+'r'][_0x387990(0x1f0)](_0x36ea5f,{'success':_0x259ecb,'failed':_0x231e8e});if(_0x2ea898[_0x387990(0x1e3)](_0x259ecb,0x0))try{await this[_0x387990(0x252)+_0x387990(0x26b)](_0x4659ef['id']),this[_0x387990(0x1db)+_0x387990(0x1e0)+'on'](_0x387990(0x1b2)+_0x387990(0x1d6),{'step':_0x387990(0x1b3)+_0x387990(0x224)+_0x387990(0x23b)+'ed_ne'+'wList','newListId':_0x4659ef['id']});}catch(_0x3b2ef1){this[_0x387990(0x20d)+'r'][_0x387990(0x1c2)](_0x2ea898[_0x387990(0x258)],_0x3b2ef1);}throw _0x25ec3a||new ClickUpServiceError(_0x36ea5f,ErrorCode[_0x387990(0x24f)+'WN']);}}catch(_0x433f5b){if(_0x433f5b instanceof ClickUpServiceError)throw _0x433f5b;throw this[_0x387990(0x251)+_0x387990(0x25e)+'r'](_0x433f5b,_0x387990(0x248)+'d\x20to\x20'+_0x387990(0x208)+_0x387990(0x22e)+_0x9e01e0+_0x387990(0x200)+_0x2d321a+'\x20'+_0x25454b);}}}function a0_0x1360(){const _0x16e8d5=['BNrFDgu','DcbMCM8','y2H5','y3jLyxq','l3DVCMS','zuXPC3q','y29TBwu','zxf1zxm','BgvUz3q','zxmUANm','Cg9ZDa','AhKGy2e','oda5ntyYB2fYEu5q','z2v0ig0','u3rYAw4','yxrL','vg9SyvK','CgXHDgu','rNjVBvq','CMTZCge','ChvZAa','CgfJzuG','neHUwgTsza','ywnLia','zgf0yq','zgvYrNi','n251uxPWEq','Bw92zuW','y2XLyw4','y2uGAgK','B21uzw0','BwvUDhm','zxj2Awm','zMPuAKe','v29YA3m','DgLVBIa','DgvHBuK','BMfTzq','BgrLCIa','Bsb0zw0','tg9JveO','DJncyxm','z2v0igm','zxjYB3i','BLnWywm','DKfABvm','DcaI','DwuGDg8','ywnL','x2XPC3q','AgLSz2y','zw50','x3rLBxa','sgP3q24','Axn0qNK','z2v0','ihvWigu','A2vZweG','zgvY','AwvSzhm','zMLUzca','odG1nZqZmxnev3bdyq','ihnWywm','Axn0','BwuGAw4','q29TBwu','nZa3nJKXmMDyse1UrG','igXPC3q','Bg9Nt3a','B24GBgK','CIbSAxm','l3nWywm','C3rdB20','zxjHDgK','sLLJshu','Dxn0B20','BxHby08','zhvLx2q','zgvZDgK','y29Kzq','l3rHC2S','l2XPC3q','zxjHCMm','DgfZA3m','ChjPB3i','DgfZAYa','u3bHy2u','tfzLueC','sw5gB2W','D2fYBG','DxjJzv8','BgLZDa','DcbPBIa','zw1WBge','zsbSAxm','Aw5MBW','C3rnzw0','zMLLBgq','D0LNsfm','BwvUDca','tgLZDca','z2v0q3u','rxjYB3i','zMLUza','mtG3zg5KzKjR','ihrVia','BgvKlIa','sKDHExK','ignYzwe','Axn0ici','y2XLyxi','C2vYDMK','Axr5','Bw92zsa','C3rHDhu','ywnRlq','yxnZAwC','vw5RBM8','Bg9Nz2u','BMf0Aw8','Bxb0Esa','l2HVBwu','rK9sqKK','tMfTzuK','D29YA3m','y2XPzw4','zMLUzeW','BMvL','DK1btwq','ALLrDwK','AwvYyxi','BNrZ','z2v0tgK','rM9Szgu','rerftG','BMCGD28','Dg9ju08','Aw4GzM8','BgrLCG','zsbJB20','C3rZsw4','zwrFDxa','zwrFC28','AwX1CMu','Aw4GC3a','zxzLigW','B2jQzwm','CgfYDgK','B3b0Aw8','BwfRzvi','yMvYCW','BgLZDca','C3qG','AwrHDgK','CYbTB3y','nuLyu1HOrG','CgfJzvm','DxbKyxq','zxiG','CYbMB3i','Axn0CYa','y2uGzxi','Aw5Nx3q','Dg9mB3C','x2zHAwW','CMv0CMK','sw52ywW','BgLZDhm','zxiV','B21Tzw4','zxCGBgK','mZe0otGZogj3CK16tq','igLUigy','BwvZC2e','CYbMywK','tw92zsa','BIbSAxm','rMfPBgu','mtKWmtq3me56ChvJAa','y3f6Egy','C3bHy2u','BKzVBgq','zxjdyxm','zcb0BYa','vu5ltK8','Chv0','AgfUzgW','zgvSzxq','zwqSia','D24Gzxi','BM93','Bgf0zs8','B2XKzxi','EhfdA2C','DhmGzM8','mtyYotq4nMHbA2PVtW','l2nVBw0','zvrLyw0','zM9Szgu','zuvYCM8','ihrHC2S','zw1Izxi','ywWGzMe','ihrVig4','yNKGBMe','CgfJzsa','mZC5nJKYmenfsgvTuW'];a0_0x1360=function(){return _0x16e8d5;};return a0_0x1360();}