@univerjs-pro/thread-comment-datasource 0.6.9-experimental.20250409-e08c696 → 0.6.9-experimental.20250409-52b9ab8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x3c1c0b=_0x3853;(function(_0x1c385c,_0x2abe09){const _0x3c64cc=_0x3853,_0xe56bfa=_0x1c385c();while(!![]){try{const _0x108232=-parseInt(_0x3c64cc(0x152))/0x1+-parseInt(_0x3c64cc(0x133))/0x2*(-parseInt(_0x3c64cc(0x136))/0x3)+-parseInt(_0x3c64cc(0x14a))/0x4+parseInt(_0x3c64cc(0x176))/0x5+parseInt(_0x3c64cc(0x168))/0x6*(-parseInt(_0x3c64cc(0x12a))/0x7)+parseInt(_0x3c64cc(0x11e))/0x8+-parseInt(_0x3c64cc(0x181))/0x9*(parseInt(_0x3c64cc(0x16b))/0xa);if(_0x108232===_0x2abe09)break;else _0xe56bfa['push'](_0xe56bfa['shift']());}catch(_0x4176ec){_0xe56bfa['push'](_0xe56bfa['shift']());}}}(_0x35b9,0x54d4a));Object[_0x3c1c0b(0x175)](exports,Symbol[_0x3c1c0b(0x167)],{'value':_0x3c1c0b(0x113)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x3c1c0b(0x12d)),c=require(_0x3c1c0b(0x135)),j=require(_0x3c1c0b(0x156)),M=require('@univerjs/thread-comment'),w=require(_0x3c1c0b(0x157)),P=require(_0x3c1c0b(0x144)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x112cbb=>(_0x112cbb[_0x112cbb['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x112cbb[_0x112cbb[_0x3c1c0b(0x158)]=0x1]=_0x3c1c0b(0x158),_0x112cbb[_0x112cbb['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x112cbb))(I||{}),v=(_0x4db106=>(_0x4db106[_0x4db106['Unknown']=0x0]=_0x3c1c0b(0x11f),_0x4db106[_0x4db106[_0x3c1c0b(0x10b)]=0x1]=_0x3c1c0b(0x10b),_0x4db106[_0x4db106[_0x3c1c0b(0x12b)]=0x2]='Reply',_0x4db106[_0x4db106[_0x3c1c0b(0x12f)]=0x3]=_0x3c1c0b(0x12f),_0x4db106[_0x4db106[_0x3c1c0b(0x10c)]=0x4]=_0x3c1c0b(0x10c),_0x4db106[_0x4db106[_0x3c1c0b(0x149)]=0x5]=_0x3c1c0b(0x149),_0x4db106[_0x4db106[_0x3c1c0b(0x132)]=-0x1]=_0x3c1c0b(0x132),_0x4db106))(v||{});const f=_0x3d6dbd=>c[_0x3c1c0b(0x17c)](new Date(+_0x3d6dbd))[_0x3c1c0b(0x128)](_0x3c1c0b(0x145)),R=async(_0x425db9,_0x2e5e69)=>{const _0x23b318=_0x3c1c0b,_0x1d4634=_0x425db9['get'](c[_0x23b318(0x122)]),_0x3b5d4b=_0x425db9[_0x23b318(0x160)](P[_0x23b318(0x159)]);_0x2e5e69[_0x23b318(0x17e)](_0x2e2853=>{const _0x2f7c04=_0x23b318;_0x1d4634[_0x2f7c04(0x174)](_0x2e2853)&&_0x2e5e69[_0x2f7c04(0x169)](_0x2e2853);}),_0x2e5e69[_0x23b318(0x13e)]&&(await _0x3b5d4b[_0x23b318(0x160)](_0x23b318(0x125),{'params':{'userIDs':[..._0x2e5e69]}}))[_0x23b318(0x16e)][_0x23b318(0x17d)]['forEach'](_0x1cadfa=>{_0x1cadfa&&_0x1d4634['addUser'](_0x1cadfa);});};var $=Object[_0x3c1c0b(0x126)],E=(_0x1e625f,_0x248ac1,_0x516a08,_0x1a6763)=>{const _0xe15b3f=_0x3c1c0b;for(var _0x280658=_0x1a6763>0x1?void 0x0:_0x1a6763?$(_0x248ac1,_0x516a08):_0x248ac1,_0x291f7c=_0x1e625f[_0xe15b3f(0x182)]-0x1,_0x726f37;_0x291f7c>=0x0;_0x291f7c--)(_0x726f37=_0x1e625f[_0x291f7c])&&(_0x280658=_0x726f37(_0x280658)||_0x280658);return _0x280658;},S=(_0x10a0a8,_0x21f565)=>(_0x48102c,_0x42fc55)=>_0x21f565(_0x48102c,_0x42fc55,_0x10a0a8);let p=class extends c['Disposable']{constructor(_0x406cbe,_0x479d93,_0xe81488,_0xb7041d){const _0x2ae140=_0x3c1c0b;super(),this[_0x2ae140(0x15e)]=_0x406cbe,this[_0x2ae140(0x12e)]=_0x479d93,this[_0x2ae140(0x15c)]=_0xe81488,this['_injector']=_0xb7041d,this[_0x2ae140(0x11b)](),this[_0x2ae140(0x112)]();}[_0x3c1c0b(0x112)](){const _0x739868=_0x3c1c0b;this[_0x739868(0x10d)](this[_0x739868(0x12e)]['commentUpdate$'][_0x739868(0x114)](w[_0x739868(0x11a)](0x10))[_0x739868(0x116)](_0x4a1ff0=>{const _0x54b5c3=_0x739868,_0x4b32d2=new Set();_0x4a1ff0['forEach'](_0x366e21=>{const _0x44b48b=_0x3853;switch(_0x366e21[_0x44b48b(0x15a)]){case _0x44b48b(0x179):{const _0x4d5048=_0x366e21['payload'][_0x44b48b(0x166)];_0x4b32d2[_0x44b48b(0x179)](_0x4d5048);break;}}}),R(this[_0x54b5c3(0x121)],_0x4b32d2);}));}['_init'](){const _0x1d7df0=_0x3c1c0b;this[_0x1d7df0(0x10d)](this[_0x1d7df0(0x15e)][_0x1d7df0(0x109)]['subscribe'](async _0x33115c=>{const _0x59c5f7=_0x1d7df0;var _0x4cdd20,_0x10d9e1,_0x103930,_0x22c095;const _0x5b5ccf=(_0x4cdd20=this[_0x59c5f7(0x12e)][_0x59c5f7(0x142)](_0x33115c['unitId'])[_0x59c5f7(0x146)](_0x31d887=>_0x31d887[_0x59c5f7(0x180)]===_0x33115c[_0x59c5f7(0x180)]))==null?void 0x0:_0x4cdd20[_0x59c5f7(0x12c)];if(!_0x5b5ccf)return;const {unitId:_0x428fc8,subUnitId:_0x2914a5}=_0x5b5ccf;switch(_0x33115c[_0x59c5f7(0x118)]&&this[_0x59c5f7(0x15c)][_0x59c5f7(0x139)](_0x33115c[_0x59c5f7(0x118)]),_0x33115c['type']){case v[_0x59c5f7(0x10b)]:break;case v[_0x59c5f7(0x12b)]:{this['_threadCommentModel'][_0x59c5f7(0x16f)](_0x428fc8,_0x2914a5,{'unitId':_0x428fc8,'subUnitId':_0x2914a5,'ref':'','id':_0x33115c['replyId'],'dT':f(+_0x33115c['createTimestamp']),'threadId':_0x33115c[_0x59c5f7(0x180)],'personId':(_0x103930=(_0x10d9e1=_0x33115c[_0x59c5f7(0x118)])==null?void 0x0:_0x10d9e1[_0x59c5f7(0x13f)])!=null?_0x103930:_0x33115c[_0x59c5f7(0x163)],'text':JSON[_0x59c5f7(0x15b)](_0x33115c['content']),'parentId':_0x5b5ccf['id']});break;}case v[_0x59c5f7(0x10c)]:{const _0x4e5d1b=this['_threadCommentModel'][_0x59c5f7(0x137)](_0x428fc8,_0x2914a5,_0x33115c[_0x59c5f7(0x131)]);_0x4e5d1b&&_0x4e5d1b[_0x59c5f7(0x13d)]&&this[_0x59c5f7(0x12e)][_0x59c5f7(0x13b)](_0x428fc8,_0x2914a5,_0x33115c[_0x59c5f7(0x131)]);break;}case v[_0x59c5f7(0x12f)]:{this['_threadCommentModel']['updateComment'](_0x428fc8,_0x2914a5,{'commentId':_0x33115c[_0x59c5f7(0x131)],'text':JSON[_0x59c5f7(0x15b)](_0x33115c[_0x59c5f7(0x170)])});break;}case v[_0x59c5f7(0x149)]:{const _0x1f05ba=(_0x22c095=this[_0x59c5f7(0x12e)][_0x59c5f7(0x142)](_0x33115c[_0x59c5f7(0x107)])['find'](_0x4260c1=>_0x4260c1[_0x59c5f7(0x180)]===_0x33115c[_0x59c5f7(0x180)]))==null?void 0x0:_0x22c095[_0x59c5f7(0x12c)];_0x1f05ba&&this[_0x59c5f7(0x12e)][_0x59c5f7(0x151)](_0x428fc8,_0x2914a5,_0x1f05ba['id'],_0x33115c[_0x59c5f7(0x15d)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x3c1c0b(0x143)](b['CommentService'])),S(0x1,c[_0x3c1c0b(0x143)](M[_0x3c1c0b(0x183)])),S(0x2,c[_0x3c1c0b(0x143)](c[_0x3c1c0b(0x122)])),S(0x3,c[_0x3c1c0b(0x143)](c[_0x3c1c0b(0x138)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x3c1c0b(0x126)],x=(_0x21977a,_0x532695,_0x4a7c5b,_0x4a9c58)=>{const _0x1a4f8b=_0x3c1c0b;for(var _0x32fd9d=_0x4a9c58>0x1?void 0x0:_0x4a9c58?A(_0x532695,_0x4a7c5b):_0x532695,_0x13d365=_0x21977a[_0x1a4f8b(0x182)]-0x1,_0x3488b6;_0x13d365>=0x0;_0x13d365--)(_0x3488b6=_0x21977a[_0x13d365])&&(_0x32fd9d=_0x3488b6(_0x32fd9d)||_0x32fd9d);return _0x32fd9d;},_=(_0x3b9deb,_0x454ac8)=>(_0x30accf,_0x5d63e8)=>_0x454ac8(_0x30accf,_0x5d63e8,_0x3b9deb);function Y(_0x48b9a5,_0xc65269){const _0x2254ce=_0x3c1c0b,_0x1bc505=_0x48b9a5[_0x2254ce(0x14d)][0x0];return{..._0xc65269,'id':_0x1bc505[_0x2254ce(0x131)],'resolved':_0x48b9a5[_0x2254ce(0x15d)]===0x1,'dT':f(_0x1bc505[_0x2254ce(0x148)]),'personId':_0x1bc505[_0x2254ce(0x163)],'threadId':_0x1bc505[_0x2254ce(0x180)]};}function G(_0x287fb5,_0x24bdd8,_0x3bd5cc){const _0x5656c2=_0x3c1c0b;var _0x5dc4cb,_0x1f1c3c;if(((_0x1f1c3c=(_0x5dc4cb=_0x287fb5==null?void 0x0:_0x287fb5['replies'])==null?void 0x0:_0x5dc4cb[_0x5656c2(0x182)])!=null?_0x1f1c3c:0x0)>0x0){const _0x519296=(_0x3abadb,_0x185e72)=>({'id':_0x3abadb[_0x5656c2(0x131)],'threadId':_0x3abadb['threadId'],'dT':f(_0x3abadb[_0x5656c2(0x148)]),'personId':_0x3abadb[_0x5656c2(0x163)],'resolved':_0x287fb5[_0x5656c2(0x15d)]===I[_0x5656c2(0x158)],'unitId':_0x24bdd8,'subUnitId':_0x3bd5cc,'text':JSON['parse'](_0x3abadb[_0x5656c2(0x170)]),'parentId':_0x185e72}),_0x59ac3b=_0x519296(_0x287fb5[_0x5656c2(0x14d)][0x0]);return{..._0x59ac3b,'children':_0x287fb5[_0x5656c2(0x14d)][_0x5656c2(0x17b)](0x1)[_0x5656c2(0x129)](_0x2d2001=>_0x519296(_0x2d2001,_0x59ac3b['id']))};}return null;}function _0x3853(_0x372652,_0x2a9d62){const _0x35b979=_0x35b9();return _0x3853=function(_0x385366,_0x24875b){_0x385366=_0x385366-0x106;let _0x11c5c7=_0x35b979[_0x385366];return _0x11c5c7;},_0x3853(_0x372652,_0x2a9d62);}let g=class{constructor(_0x284c23,_0x4a1309,_0x175d3e,_0x4215ad){const _0x3c477f=_0x3c1c0b;this[_0x3c477f(0x110)]=_0x284c23,this[_0x3c477f(0x15c)]=_0x4a1309,this[_0x3c477f(0x140)]=_0x175d3e,this[_0x3c477f(0x121)]=_0x4215ad;}async['addComment'](_0x5f1a3d){const _0x4595a8=_0x3c1c0b;var _0x1df8c4,_0x309517;const {parentId:_0x3f70e5,unitId:_0x30333a,text:_0x5902de,threadId:_0x28e4e1}=_0x5f1a3d,_0x2f8142=(_0x309517=(_0x1df8c4=_0x5902de[_0x4595a8(0x153)])==null?void 0x0:_0x1df8c4[_0x4595a8(0x10a)](_0x14cbef=>_0x14cbef[_0x4595a8(0x123)]===c['CustomRangeType'][_0x4595a8(0x111)])[_0x4595a8(0x129)](_0x3c6a50=>_0x3c6a50['rangeId']))!=null?_0x309517:[],_0x29e3ba=JSON[_0x4595a8(0x11c)](_0x5902de),_0x5251f0=(await this['_sessionService'][_0x4595a8(0x16d)](_0x30333a))[_0x4595a8(0x14e)]();if(_0x3f70e5){const _0x500cde={'memberId':_0x5251f0,'unitId':_0x30333a,'content':_0x29e3ba,'mention':_0x2f8142,'threadId':_0x28e4e1},_0x5dc134=(await this['_httpService'][_0x4595a8(0x171)](_0x4595a8(0x117)+_0x30333a+_0x4595a8(0x17f),{'body':_0x500cde}))[_0x4595a8(0x16e)][_0x4595a8(0x13c)];return{..._0x5f1a3d,'id':_0x5dc134[_0x4595a8(0x131)],'dT':c[_0x4595a8(0x17c)](+_0x5dc134[_0x4595a8(0x148)])[_0x4595a8(0x128)](_0x4595a8(0x145)),'personId':_0x5dc134[_0x4595a8(0x163)]};}else{const _0x2e96dd={'memberId':_0x5251f0,'unitId':_0x30333a,'content':_0x29e3ba,'mention':_0x2f8142},_0x3d878d=await this[_0x4595a8(0x110)][_0x4595a8(0x171)](_0x4595a8(0x117)+_0x30333a+_0x4595a8(0x11d),{'body':_0x2e96dd});return Y(_0x3d878d[_0x4595a8(0x16e)][_0x4595a8(0x16a)],_0x5f1a3d);}}async[_0x3c1c0b(0x130)](_0x507f20){const _0xb16cd5=_0x3c1c0b;var _0x1a2184,_0x3dabea;const {text:_0x35ed2c,unitId:_0x320e7a}=_0x507f20,_0x166275=(_0x3dabea=(_0x1a2184=_0x35ed2c[_0xb16cd5(0x153)])==null?void 0x0:_0x1a2184['filter'](_0x26a441=>_0x26a441[_0xb16cd5(0x123)]===c[_0xb16cd5(0x119)]['COMMENT'])['map'](_0x4af9be=>_0x4af9be['rangeId']))!=null?_0x3dabea:[],_0x14e044=JSON[_0xb16cd5(0x11c)](_0x35ed2c),_0x4baf30=_0x507f20[_0xb16cd5(0x180)],_0x54d8ba=_0x507f20['id'],_0x846a5e={'memberId':(await this[_0xb16cd5(0x140)][_0xb16cd5(0x16d)](_0x320e7a))[_0xb16cd5(0x14e)](),'unitId':_0x320e7a,'threadId':_0x4baf30,'mention':_0x166275,'content':_0x14e044,'replyId':_0x54d8ba},_0x529680=await this[_0xb16cd5(0x110)][_0xb16cd5(0x171)]('/universer-api/comment/unit/'+_0x320e7a+_0xb16cd5(0x154),{'body':_0x846a5e});return!_0x529680[_0xb16cd5(0x16e)][_0xb16cd5(0x164)]||_0x529680[_0xb16cd5(0x16e)][_0xb16cd5(0x164)][_0xb16cd5(0x134)]===0x1;}async['resolveComment'](_0x361866){const _0x5d962f=_0x3c1c0b,{unitId:_0x460a54}=_0x361866,_0x3c0a0d=_0x361866[_0x5d962f(0x180)],_0x253627={'memberId':this[_0x5d962f(0x15c)][_0x5d962f(0x14f)]()['userID'],'unitId':_0x460a54,'threadId':_0x3c0a0d,'solved':_0x361866['resolved']?I[_0x5d962f(0x158)]:I[_0x5d962f(0x16c)]},_0x1ad817=await this[_0x5d962f(0x110)]['post']('/universer-api/comment/unit/'+_0x460a54+_0x5d962f(0x184),{'body':_0x253627});return!_0x1ad817[_0x5d962f(0x16e)][_0x5d962f(0x164)]||_0x1ad817['body'][_0x5d962f(0x164)][_0x5d962f(0x134)]===0x1;}async[_0x3c1c0b(0x13b)](_0x417b95,_0x557579,_0x489254,_0x4df585){const _0xec9c52=_0x3c1c0b,_0x38fb9f={'memberId':(await this[_0xec9c52(0x140)]['requireSession'](_0x417b95))[_0xec9c52(0x14e)](),'threadId':_0x489254,'replyId':_0x4df585,'unitId':_0x417b95},_0x1573d4=await this[_0xec9c52(0x110)][_0xec9c52(0x171)](_0xec9c52(0x117)+_0x417b95+_0xec9c52(0x165),{'body':_0x38fb9f});return!_0x1573d4['body']['error']||_0x1573d4[_0xec9c52(0x16e)][_0xec9c52(0x164)][_0xec9c52(0x134)]===0x1;}async['listComments'](_0x12dce1,_0x5cb7ee,_0x41e634){const _0x22fa62=_0x3c1c0b,_0x225906={'unitId':_0x12dce1,'threadId':_0x41e634},_0x753232=await this[_0x22fa62(0x110)][_0x22fa62(0x171)](_0x22fa62(0x117)+_0x12dce1+'/list',{'body':_0x225906}),_0xe780c9=_0x41e634[_0x22fa62(0x129)](_0x35145c=>G(_0x753232[_0x22fa62(0x16e)][_0x22fa62(0x147)][_0x35145c],_0x12dce1,_0x5cb7ee))[_0x22fa62(0x10a)](Boolean);return Object[_0x22fa62(0x178)](_0x753232[_0x22fa62(0x16e)]['users'])[_0x22fa62(0x17e)](_0x38a398=>{const _0x8a0251=_0x22fa62;this[_0x8a0251(0x15c)]['addUser'](_0x38a398);}),_0xe780c9;}[_0x3c1c0b(0x161)](_0x5a82ca){const _0x4a5906=_0x3c1c0b;return{'id':_0x5a82ca['id'],'threadId':_0x5a82ca['threadId'],'ref':_0x5a82ca[_0x4a5906(0x150)]};}};g=x([_(0x0,c[_0x3c1c0b(0x143)](P[_0x3c1c0b(0x159)])),_(0x1,c[_0x3c1c0b(0x143)](c[_0x3c1c0b(0x122)])),_(0x2,c[_0x3c1c0b(0x143)](b[_0x3c1c0b(0x10f)])),_(0x3,c[_0x3c1c0b(0x143)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x521a71,_0x74da72,_0x4b5abf,_0x12e1e8)=>{const _0x235af0=_0x3c1c0b;for(var _0xf5e6f=_0x12e1e8>0x1?void 0x0:_0x12e1e8?H(_0x74da72,_0x4b5abf):_0x74da72,_0x29feea=_0x521a71[_0x235af0(0x182)]-0x1,_0x29553d;_0x29feea>=0x0;_0x29feea--)(_0x29553d=_0x521a71[_0x29feea])&&(_0xf5e6f=_0x29553d(_0xf5e6f)||_0xf5e6f);return _0xf5e6f;},y=(_0x3b19bd,_0x14bae8)=>(_0x2ee740,_0x35b8c8)=>_0x14bae8(_0x2ee740,_0x35b8c8,_0x3b19bd);let C=class extends c[_0x3c1c0b(0x14c)]{constructor(_0x50d258,_0x26ab8c){const _0x26cd84=_0x3c1c0b;super(),this[_0x26cd84(0x10e)]=_0x50d258,this[_0x26cd84(0x177)]=_0x26ab8c,this['_initDataSource']();}[_0x3c1c0b(0x115)](){const _0x4a4ee5=_0x3c1c0b;this[_0x4a4ee5(0x10e)][_0x4a4ee5(0x17a)]=this[_0x4a4ee5(0x177)],this['_threadCommentDataSourceService'][_0x4a4ee5(0x14b)]=!0x1;}};C=J([y(0x0,M[_0x3c1c0b(0x186)]),y(0x1,c[_0x3c1c0b(0x143)](g))],C);var F=Object[_0x3c1c0b(0x175)],L=Object[_0x3c1c0b(0x126)],Z=(_0x4613e4,_0x2fe8eb,_0x444d16)=>_0x2fe8eb in _0x4613e4?F(_0x4613e4,_0x2fe8eb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x444d16}):_0x4613e4[_0x2fe8eb]=_0x444d16,W=(_0x25f354,_0xf95aba,_0x3d952b,_0x2dbfc1)=>{const _0x5c25b3=_0x3c1c0b;for(var _0xd358bd=_0x2dbfc1>0x1?void 0x0:_0x2dbfc1?L(_0xf95aba,_0x3d952b):_0xf95aba,_0x44b20c=_0x25f354[_0x5c25b3(0x182)]-0x1,_0x79f05a;_0x44b20c>=0x0;_0x44b20c--)(_0x79f05a=_0x25f354[_0x44b20c])&&(_0xd358bd=_0x79f05a(_0xd358bd)||_0xd358bd);return _0xd358bd;},O=(_0x553026,_0x5c9f3e)=>(_0x27b9d6,_0x131bd4)=>_0x5c9f3e(_0x27b9d6,_0x131bd4,_0x553026),N=(_0x26c779,_0x55bb92,_0x348030)=>Z(_0x26c779,typeof _0x55bb92!=_0x3c1c0b(0x155)?_0x55bb92+'':_0x55bb92,_0x348030);function _0x35b9(){const _0xd84d4e=['subscribe','/universer-api/comment/unit/','user','CustomRangeType','bufferTime','_init','stringify','/add','5299840qPEuBx','Unknown','onReady','_injector','UserManagerService','rangeType','setConfig','/universer-api/user/list','getOwnPropertyDescriptor','_configService','format','map','7ZZkoKu','Reply','root','@univerjs-pro/license','_threadCommentModel','Edit','updateComment','replyId','UNRECOGNIZED','342368feUaSo','code','@univerjs/core','12uevjox','getComment','Injector','addUser','UniverLicensePlugin','deleteComment','reply','parentId','size','userID','_sessionService','UniverThreadCommentDataSourcePlugin','getUnit','Inject','@univerjs/network','YYYY/MM/DD\x20HH:mm','find','comments','createTimestamp','Solve','1228280CTKwmJ','syncUpdateMutationToColla','Disposable','replies','getMemberID','getCurrentUser','ref','resolveComment','515019LONVRh','customRanges','/edit','symbol','@univerjs/thread-comment-ui','rxjs','Solved','HTTPService','type','parse','_userService','solved','_commentService','merge','get','saveCommentToSnapshot','_config','userId','error','/delete','personId','toStringTag','1709358TtzHss','delete','comment','328010uVpjKb','OpenOrReOpen','requireSession','body','addComment','content','post','Plugin','onStarting','getUser','defineProperty','700165zopvJh','_threadCommentDataSource','values','add','dataSource','slice','dayjs','users','forEach','/reply','threadId','9EFyQyF','length','ThreadCommentModel','/solved','IConfigService','IThreadCommentDataSourceService','UniverThreadCommentUIPlugin','unitId','DependentOn','commentUpdate$','filter','Add','Delete','disposeWithMe','_threadCommentDataSourceService','CollaborationSessionService','_httpService','COMMENT','_initUserSync','Module','pipe','_initDataSource'];_0x35b9=function(){return _0xd84d4e;};return _0x35b9();}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x3c1c0b(0x172)]{constructor(_0x234a08=D,_0x53ad79,_0x4511ee){const _0x33096a=_0x3c1c0b;super(),this[_0x33096a(0x162)]=_0x234a08,this[_0x33096a(0x121)]=_0x53ad79,this[_0x33096a(0x127)]=_0x4511ee;const {..._0x247870}=c[_0x33096a(0x15f)]({},D,this['_config']);this[_0x33096a(0x127)][_0x33096a(0x124)](q,_0x247870);}[_0x3c1c0b(0x173)](){const _0x977ebf=_0x3c1c0b;[[g],[C],[p]][_0x977ebf(0x17e)](_0x2b6a83=>{const _0x2af999=_0x977ebf;this['_injector'][_0x2af999(0x179)](_0x2b6a83);});}[_0x3c1c0b(0x120)](){const _0x5849c3=_0x3c1c0b;this['_injector'][_0x5849c3(0x160)](C),this[_0x5849c3(0x121)]['get'](p);}},N(exports[_0x3c1c0b(0x141)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x3c1c0b(0x15a),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3c1c0b(0x108)](j[_0x3c1c0b(0x106)],b['UniverCollaborationClientPlugin'],T[_0x3c1c0b(0x13a)]),O(0x1,c[_0x3c1c0b(0x143)](c['Injector'])),O(0x2,c[_0x3c1c0b(0x185)])],exports[_0x3c1c0b(0x141)]);
1
+ 'use strict';const _0x3f4857=_0x10cd;(function(_0x44608f,_0x353950){const _0x1e5ed7=_0x10cd,_0x3355de=_0x44608f();while(!![]){try{const _0x1a8b79=parseInt(_0x1e5ed7(0x165))/0x1*(-parseInt(_0x1e5ed7(0x171))/0x2)+-parseInt(_0x1e5ed7(0x134))/0x3*(parseInt(_0x1e5ed7(0x151))/0x4)+-parseInt(_0x1e5ed7(0x162))/0x5*(parseInt(_0x1e5ed7(0x1a5))/0x6)+-parseInt(_0x1e5ed7(0x136))/0x7+parseInt(_0x1e5ed7(0x182))/0x8*(parseInt(_0x1e5ed7(0x14a))/0x9)+parseInt(_0x1e5ed7(0x191))/0xa+parseInt(_0x1e5ed7(0x198))/0xb;if(_0x1a8b79===_0x353950)break;else _0x3355de['push'](_0x3355de['shift']());}catch(_0x597409){_0x3355de['push'](_0x3355de['shift']());}}}(_0x46ac,0xc862d));Object[_0x3f4857(0x13f)](exports,Symbol[_0x3f4857(0x1ae)],{'value':_0x3f4857(0x18c)});function _0x10cd(_0x13692d,_0x238c96){const _0x46ac68=_0x46ac();return _0x10cd=function(_0x10cd0d,_0x2e5a80){_0x10cd0d=_0x10cd0d-0x12f;let _0x3c7827=_0x46ac68[_0x10cd0d];return _0x3c7827;},_0x10cd(_0x13692d,_0x238c96);}const b=require(_0x3f4857(0x1a0)),T=require(_0x3f4857(0x15a)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require(_0x3f4857(0x145)),P=require(_0x3f4857(0x1ad)),U=_0x3f4857(0x1ac);var I=(_0xcf9366=>(_0xcf9366[_0xcf9366[_0x3f4857(0x155)]=0x0]=_0x3f4857(0x155),_0xcf9366[_0xcf9366[_0x3f4857(0x157)]=0x1]='Solved',_0xcf9366[_0xcf9366[_0x3f4857(0x195)]=-0x1]='UNRECOGNIZED',_0xcf9366))(I||{}),v=(_0x28b824=>(_0x28b824[_0x28b824['Unknown']=0x0]=_0x3f4857(0x15d),_0x28b824[_0x28b824[_0x3f4857(0x1a9)]=0x1]=_0x3f4857(0x1a9),_0x28b824[_0x28b824[_0x3f4857(0x135)]=0x2]=_0x3f4857(0x135),_0x28b824[_0x28b824[_0x3f4857(0x16b)]=0x3]=_0x3f4857(0x16b),_0x28b824[_0x28b824[_0x3f4857(0x16a)]=0x4]='Delete',_0x28b824[_0x28b824[_0x3f4857(0x14d)]=0x5]='Solve',_0x28b824[_0x28b824['UNRECOGNIZED']=-0x1]=_0x3f4857(0x195),_0x28b824))(v||{});const f=_0x1b8c25=>c[_0x3f4857(0x137)](new Date(+_0x1b8c25))[_0x3f4857(0x194)](_0x3f4857(0x183)),R=async(_0x311f6d,_0x26ba92)=>{const _0x466267=_0x3f4857,_0x10645c=_0x311f6d[_0x466267(0x173)](c[_0x466267(0x13c)]),_0x25885a=_0x311f6d['get'](P[_0x466267(0x169)]);_0x26ba92[_0x466267(0x17e)](_0x50459f=>{const _0x3ee72c=_0x466267;_0x10645c[_0x3ee72c(0x14f)](_0x50459f)&&_0x26ba92['delete'](_0x50459f);}),_0x26ba92['size']&&(await _0x25885a[_0x466267(0x173)](_0x466267(0x14c),{'params':{'userIDs':[..._0x26ba92]}}))['body'][_0x466267(0x168)][_0x466267(0x17e)](_0x4d87b7=>{const _0x36e328=_0x466267;_0x4d87b7&&_0x10645c[_0x36e328(0x141)](_0x4d87b7);});};var $=Object[_0x3f4857(0x199)],E=(_0x306f6a,_0x37e9d2,_0x565253,_0x4419c7)=>{const _0x2a23d9=_0x3f4857;for(var _0x5a3d1a=_0x4419c7>0x1?void 0x0:_0x4419c7?$(_0x37e9d2,_0x565253):_0x37e9d2,_0x328fd1=_0x306f6a[_0x2a23d9(0x193)]-0x1,_0x15e174;_0x328fd1>=0x0;_0x328fd1--)(_0x15e174=_0x306f6a[_0x328fd1])&&(_0x5a3d1a=_0x15e174(_0x5a3d1a)||_0x5a3d1a);return _0x5a3d1a;},S=(_0x12c0f9,_0x337a50)=>(_0x485eb0,_0x19db04)=>_0x337a50(_0x485eb0,_0x19db04,_0x12c0f9);let p=class extends c[_0x3f4857(0x12f)]{constructor(_0x46fa09,_0x5d5a7f,_0x3c531a,_0x15969a){const _0x5d4f3c=_0x3f4857;super(),this['_commentService']=_0x46fa09,this[_0x5d4f3c(0x19c)]=_0x5d5a7f,this[_0x5d4f3c(0x17a)]=_0x3c531a,this[_0x5d4f3c(0x19b)]=_0x15969a,this[_0x5d4f3c(0x148)](),this['_initUserSync']();}[_0x3f4857(0x178)](){const _0x1d1a24=_0x3f4857;this[_0x1d1a24(0x172)](this[_0x1d1a24(0x19c)][_0x1d1a24(0x138)]['pipe'](w[_0x1d1a24(0x1a1)](0x10))['subscribe'](_0x4bb7fd=>{const _0x17f57c=_0x1d1a24,_0x2f3c0e=new Set();_0x4bb7fd[_0x17f57c(0x17e)](_0x499ddd=>{const _0x36ea8d=_0x17f57c;switch(_0x499ddd['type']){case _0x36ea8d(0x152):{const _0x16a2a4=_0x499ddd[_0x36ea8d(0x167)][_0x36ea8d(0x16f)];_0x2f3c0e[_0x36ea8d(0x152)](_0x16a2a4);break;}}}),R(this['_injector'],_0x2f3c0e);}));}['_init'](){const _0x5258b5=_0x3f4857;this['disposeWithMe'](this[_0x5258b5(0x166)][_0x5258b5(0x138)][_0x5258b5(0x17c)](async _0x120400=>{const _0x4a8fa3=_0x5258b5;var _0x24bb32,_0x4989bc,_0x1380f0,_0x2e72aa;const _0x2b9194=(_0x24bb32=this[_0x4a8fa3(0x19c)]['getUnit'](_0x120400[_0x4a8fa3(0x1ab)])['find'](_0x35248e=>_0x35248e[_0x4a8fa3(0x197)]===_0x120400['threadId']))==null?void 0x0:_0x24bb32[_0x4a8fa3(0x1a2)];if(!_0x2b9194)return;const {unitId:_0x563b63,subUnitId:_0x5af2f6}=_0x2b9194;switch(_0x120400['user']&&this[_0x4a8fa3(0x17a)][_0x4a8fa3(0x141)](_0x120400['user']),_0x120400[_0x4a8fa3(0x190)]){case v['Add']:break;case v[_0x4a8fa3(0x135)]:{this[_0x4a8fa3(0x19c)][_0x4a8fa3(0x154)](_0x563b63,_0x5af2f6,{'unitId':_0x563b63,'subUnitId':_0x5af2f6,'ref':'','id':_0x120400[_0x4a8fa3(0x147)],'dT':f(+_0x120400['createTimestamp']),'threadId':_0x120400[_0x4a8fa3(0x197)],'personId':(_0x1380f0=(_0x4989bc=_0x120400[_0x4a8fa3(0x156)])==null?void 0x0:_0x4989bc[_0x4a8fa3(0x160)])!=null?_0x1380f0:_0x120400[_0x4a8fa3(0x18a)],'text':JSON[_0x4a8fa3(0x1a6)](_0x120400['content']),'parentId':_0x2b9194['id']});break;}case v['Delete']:{const _0x3a5c3f=this['_threadCommentModel']['getComment'](_0x563b63,_0x5af2f6,_0x120400[_0x4a8fa3(0x147)]);_0x3a5c3f&&_0x3a5c3f[_0x4a8fa3(0x15c)]&&this[_0x4a8fa3(0x19c)]['deleteComment'](_0x563b63,_0x5af2f6,_0x120400[_0x4a8fa3(0x147)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x4a8fa3(0x189)](_0x563b63,_0x5af2f6,{'commentId':_0x120400[_0x4a8fa3(0x147)],'text':JSON[_0x4a8fa3(0x1a6)](_0x120400[_0x4a8fa3(0x139)])});break;}case v[_0x4a8fa3(0x14d)]:{const _0x19caa7=(_0x2e72aa=this[_0x4a8fa3(0x19c)]['getUnit'](_0x120400[_0x4a8fa3(0x1ab)])['find'](_0x515ea9=>_0x515ea9[_0x4a8fa3(0x197)]===_0x120400[_0x4a8fa3(0x197)]))==null?void 0x0:_0x2e72aa['root'];_0x19caa7&&this[_0x4a8fa3(0x19c)]['resolveComment'](_0x563b63,_0x5af2f6,_0x19caa7['id'],_0x120400[_0x4a8fa3(0x17b)]===I[_0x4a8fa3(0x157)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x3f4857(0x16c)])),S(0x1,c[_0x3f4857(0x1a7)](M[_0x3f4857(0x161)])),S(0x2,c[_0x3f4857(0x1a7)](c[_0x3f4857(0x13c)])),S(0x3,c[_0x3f4857(0x1a7)](c['Injector']))],p);const q=_0x3f4857(0x181),D={};function _0x46ac(){const _0x567046=['UserManagerService','_httpService','saveCommentToSnapshot','defineProperty','stringify','addUser','UniverLicensePlugin','IConfigService','UniverThreadCommentDataSourcePlugin','rxjs','comments','replyId','_init','createTimestamp','13758039ICHrRR','_configService','/universer-api/user/list','Solve','IThreadCommentDataSourceService','getUser','post','2033644sSlMGv','add','dataSource','addComment','OpenOrReOpen','user','Solved','/universer-api/comment/unit/','_threadCommentDataSourceService','@univerjs-pro/license','/edit','parentId','Unknown','/reply','deleteComment','userID','ThreadCommentModel','1915JCEUhn','Injector','_sessionService','1376337oylFok','_commentService','payload','users','HTTPService','Delete','Edit','CommentService','rangeId','pluginName','personId','DependentOn','2yibMso','disposeWithMe','get','resolved','values','setConfig','Plugin','_initUserSync','_config','_userService','solved','subscribe','/list','forEach','ref','listComments','thread-comment-data-source.config','8xSapMt','YYYY/MM/DD\x20HH:mm','UNIVER_UNKNOWN','error','syncUpdateMutationToColla','/delete','reply','updateComment','userId','UniverInstanceType','Module','customRanges','code','CollaborationSessionService','type','4371440ffzrtZ','slice','length','format','UNRECOGNIZED','requireSession','threadId','14146880qBbbwV','getOwnPropertyDescriptor','onReady','_injector','_threadCommentModel','COMMENT','onStarting','rangeType','@univerjs-pro/collaboration-client','bufferTime','root','filter','comment','8292VpKxbK','parse','Inject','_threadCommentDataSource','Add','UniverThreadCommentUIPlugin','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs/network','toStringTag','body','Disposable','CustomRangeType','map','replies','/add','3QeCDVt','Reply','119420drlkCt','dayjs','commentUpdate$','content','/solved','getMemberID'];_0x46ac=function(){return _0x567046;};return _0x46ac();}var A=Object[_0x3f4857(0x199)],x=(_0x11ab46,_0x17cefa,_0x332c3c,_0x58e82e)=>{const _0x5f317c=_0x3f4857;for(var _0x48db4d=_0x58e82e>0x1?void 0x0:_0x58e82e?A(_0x17cefa,_0x332c3c):_0x17cefa,_0x309585=_0x11ab46[_0x5f317c(0x193)]-0x1,_0xcde44f;_0x309585>=0x0;_0x309585--)(_0xcde44f=_0x11ab46[_0x309585])&&(_0x48db4d=_0xcde44f(_0x48db4d)||_0x48db4d);return _0x48db4d;},_=(_0x46e19d,_0x1135c8)=>(_0x2a8488,_0x63400c)=>_0x1135c8(_0x2a8488,_0x63400c,_0x46e19d);function Y(_0xb44856,_0x5a5e91){const _0x11ce82=_0x3f4857,_0xd95f4d=_0xb44856[_0x11ce82(0x132)][0x0];return{..._0x5a5e91,'id':_0xd95f4d[_0x11ce82(0x147)],'resolved':_0xb44856[_0x11ce82(0x17b)]===0x1,'dT':f(_0xd95f4d['createTimestamp']),'personId':_0xd95f4d[_0x11ce82(0x18a)],'threadId':_0xd95f4d[_0x11ce82(0x197)]};}function G(_0x4ee6af,_0x43f511,_0x1b9621){const _0x5a12ca=_0x3f4857;var _0x426064,_0x46873b;if(((_0x46873b=(_0x426064=_0x4ee6af==null?void 0x0:_0x4ee6af[_0x5a12ca(0x132)])==null?void 0x0:_0x426064['length'])!=null?_0x46873b:0x0)>0x0){const _0x572d7e=(_0x228f6a,_0x1699c6)=>({'id':_0x228f6a[_0x5a12ca(0x147)],'threadId':_0x228f6a[_0x5a12ca(0x197)],'dT':f(_0x228f6a[_0x5a12ca(0x149)]),'personId':_0x228f6a[_0x5a12ca(0x18a)],'resolved':_0x4ee6af['solved']===I[_0x5a12ca(0x157)],'unitId':_0x43f511,'subUnitId':_0x1b9621,'text':JSON[_0x5a12ca(0x1a6)](_0x228f6a[_0x5a12ca(0x139)]),'parentId':_0x1699c6}),_0x2b1526=_0x572d7e(_0x4ee6af[_0x5a12ca(0x132)][0x0]);return{..._0x2b1526,'children':_0x4ee6af[_0x5a12ca(0x132)][_0x5a12ca(0x192)](0x1)[_0x5a12ca(0x131)](_0x369075=>_0x572d7e(_0x369075,_0x2b1526['id']))};}return null;}let g=class{constructor(_0x2d30b4,_0x11f4c2,_0x28a17b,_0xb2b836){const _0x42e576=_0x3f4857;this[_0x42e576(0x13d)]=_0x2d30b4,this[_0x42e576(0x17a)]=_0x11f4c2,this[_0x42e576(0x164)]=_0x28a17b,this[_0x42e576(0x19b)]=_0xb2b836;}async[_0x3f4857(0x154)](_0x281305){const _0x1c8f97=_0x3f4857;var _0x28847b,_0x4ea7b4;const {parentId:_0x5972cc,unitId:_0x35fafb,text:_0x9c2f73,threadId:_0x52ff05}=_0x281305,_0xd15569=(_0x4ea7b4=(_0x28847b=_0x9c2f73[_0x1c8f97(0x18d)])==null?void 0x0:_0x28847b['filter'](_0x591f46=>_0x591f46[_0x1c8f97(0x19f)]===c[_0x1c8f97(0x130)][_0x1c8f97(0x19d)])[_0x1c8f97(0x131)](_0x208d7e=>_0x208d7e[_0x1c8f97(0x16d)]))!=null?_0x4ea7b4:[],_0x2d3299=JSON[_0x1c8f97(0x140)](_0x9c2f73),_0x3941a3=(await this['_sessionService'][_0x1c8f97(0x196)](_0x35fafb))[_0x1c8f97(0x13b)]();if(_0x5972cc){const _0x484c79={'memberId':_0x3941a3,'unitId':_0x35fafb,'content':_0x2d3299,'mention':_0xd15569,'threadId':_0x52ff05},_0x4d0c79=(await this[_0x1c8f97(0x13d)]['post'](_0x1c8f97(0x158)+_0x35fafb+_0x1c8f97(0x15e),{'body':_0x484c79}))[_0x1c8f97(0x1af)][_0x1c8f97(0x188)];return{..._0x281305,'id':_0x4d0c79['replyId'],'dT':c[_0x1c8f97(0x137)](+_0x4d0c79[_0x1c8f97(0x149)])['format'](_0x1c8f97(0x183)),'personId':_0x4d0c79['userId']};}else{const _0x1b3f6e={'memberId':_0x3941a3,'unitId':_0x35fafb,'content':_0x2d3299,'mention':_0xd15569},_0x4558f9=await this[_0x1c8f97(0x13d)][_0x1c8f97(0x150)]('/universer-api/comment/unit/'+_0x35fafb+_0x1c8f97(0x133),{'body':_0x1b3f6e});return Y(_0x4558f9[_0x1c8f97(0x1af)][_0x1c8f97(0x1a4)],_0x281305);}}async[_0x3f4857(0x189)](_0x52bd81){const _0x445004=_0x3f4857;var _0x1ad682,_0x35acce;const {text:_0x1118d6,unitId:_0x43659c}=_0x52bd81,_0x54cf9a=(_0x35acce=(_0x1ad682=_0x1118d6[_0x445004(0x18d)])==null?void 0x0:_0x1ad682[_0x445004(0x1a3)](_0x3e4e44=>_0x3e4e44[_0x445004(0x19f)]===c[_0x445004(0x130)][_0x445004(0x19d)])[_0x445004(0x131)](_0x33109b=>_0x33109b[_0x445004(0x16d)]))!=null?_0x35acce:[],_0x52226d=JSON[_0x445004(0x140)](_0x1118d6),_0x27da1e=_0x52bd81[_0x445004(0x197)],_0x4796e4=_0x52bd81['id'],_0x1c1431={'memberId':(await this[_0x445004(0x164)][_0x445004(0x196)](_0x43659c))[_0x445004(0x13b)](),'unitId':_0x43659c,'threadId':_0x27da1e,'mention':_0x54cf9a,'content':_0x52226d,'replyId':_0x4796e4},_0x475a1c=await this['_httpService'][_0x445004(0x150)](_0x445004(0x158)+_0x43659c+_0x445004(0x15b),{'body':_0x1c1431});return!_0x475a1c[_0x445004(0x1af)][_0x445004(0x185)]||_0x475a1c[_0x445004(0x1af)][_0x445004(0x185)][_0x445004(0x18e)]===0x1;}async['resolveComment'](_0x1bc713){const _0x1205b0=_0x3f4857,{unitId:_0x4d88fd}=_0x1bc713,_0x4e0f37=_0x1bc713[_0x1205b0(0x197)],_0x44141f={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x4d88fd,'threadId':_0x4e0f37,'solved':_0x1bc713[_0x1205b0(0x174)]?I['Solved']:I[_0x1205b0(0x155)]},_0x5aa4ec=await this['_httpService'][_0x1205b0(0x150)](_0x1205b0(0x158)+_0x4d88fd+_0x1205b0(0x13a),{'body':_0x44141f});return!_0x5aa4ec[_0x1205b0(0x1af)][_0x1205b0(0x185)]||_0x5aa4ec['body'][_0x1205b0(0x185)][_0x1205b0(0x18e)]===0x1;}async[_0x3f4857(0x15f)](_0x587bc0,_0x5988a5,_0x43005b,_0x429ada){const _0x1e33c3=_0x3f4857,_0x4f8047={'memberId':(await this[_0x1e33c3(0x164)]['requireSession'](_0x587bc0))[_0x1e33c3(0x13b)](),'threadId':_0x43005b,'replyId':_0x429ada,'unitId':_0x587bc0},_0x17f088=await this[_0x1e33c3(0x13d)][_0x1e33c3(0x150)]('/universer-api/comment/unit/'+_0x587bc0+_0x1e33c3(0x187),{'body':_0x4f8047});return!_0x17f088[_0x1e33c3(0x1af)][_0x1e33c3(0x185)]||_0x17f088['body'][_0x1e33c3(0x185)][_0x1e33c3(0x18e)]===0x1;}async[_0x3f4857(0x180)](_0x5f3312,_0x615aa1,_0x28102a){const _0x2eb4bb=_0x3f4857,_0x1a811a={'unitId':_0x5f3312,'threadId':_0x28102a},_0x256bb8=await this['_httpService'][_0x2eb4bb(0x150)](_0x2eb4bb(0x158)+_0x5f3312+_0x2eb4bb(0x17d),{'body':_0x1a811a}),_0x5aa6a5=_0x28102a[_0x2eb4bb(0x131)](_0x134f0b=>G(_0x256bb8[_0x2eb4bb(0x1af)][_0x2eb4bb(0x146)][_0x134f0b],_0x5f3312,_0x615aa1))[_0x2eb4bb(0x1a3)](Boolean);return Object[_0x2eb4bb(0x175)](_0x256bb8[_0x2eb4bb(0x1af)][_0x2eb4bb(0x168)])[_0x2eb4bb(0x17e)](_0x579fff=>{const _0x3fb8ae=_0x2eb4bb;this[_0x3fb8ae(0x17a)]['addUser'](_0x579fff);}),_0x5aa6a5;}[_0x3f4857(0x13e)](_0x39d9d0){const _0x11092c=_0x3f4857;return{'id':_0x39d9d0['id'],'threadId':_0x39d9d0[_0x11092c(0x197)],'ref':_0x39d9d0[_0x11092c(0x17f)]};}};g=x([_(0x0,c[_0x3f4857(0x1a7)](P[_0x3f4857(0x169)])),_(0x1,c[_0x3f4857(0x1a7)](c[_0x3f4857(0x13c)])),_(0x2,c[_0x3f4857(0x1a7)](b[_0x3f4857(0x18f)])),_(0x3,c['Inject'](c[_0x3f4857(0x163)]))],g);var H=Object[_0x3f4857(0x199)],J=(_0x1f475a,_0x29e505,_0x1f6b4f,_0x55b5d2)=>{const _0x2c6cfe=_0x3f4857;for(var _0x32a449=_0x55b5d2>0x1?void 0x0:_0x55b5d2?H(_0x29e505,_0x1f6b4f):_0x29e505,_0x1c07b3=_0x1f475a[_0x2c6cfe(0x193)]-0x1,_0x36daaf;_0x1c07b3>=0x0;_0x1c07b3--)(_0x36daaf=_0x1f475a[_0x1c07b3])&&(_0x32a449=_0x36daaf(_0x32a449)||_0x32a449);return _0x32a449;},y=(_0x5637c0,_0xd49276)=>(_0x55dd3b,_0x1d3dfe)=>_0xd49276(_0x55dd3b,_0x1d3dfe,_0x5637c0);let C=class extends c[_0x3f4857(0x12f)]{constructor(_0x202e58,_0x1aa4b0){const _0x36526a=_0x3f4857;super(),this[_0x36526a(0x159)]=_0x202e58,this[_0x36526a(0x1a8)]=_0x1aa4b0,this['_initDataSource']();}['_initDataSource'](){const _0x5d6068=_0x3f4857;this[_0x5d6068(0x159)][_0x5d6068(0x153)]=this[_0x5d6068(0x1a8)],this['_threadCommentDataSourceService'][_0x5d6068(0x186)]=!0x1;}};C=J([y(0x0,M[_0x3f4857(0x14e)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x3f4857(0x13f)],L=Object[_0x3f4857(0x199)],Z=(_0x3615cb,_0xfff5e3,_0x1627eb)=>_0xfff5e3 in _0x3615cb?F(_0x3615cb,_0xfff5e3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1627eb}):_0x3615cb[_0xfff5e3]=_0x1627eb,W=(_0x111468,_0x107a40,_0x1e5776,_0x5c6346)=>{const _0x2a0f9d=_0x3f4857;for(var _0x4253de=_0x5c6346>0x1?void 0x0:_0x5c6346?L(_0x107a40,_0x1e5776):_0x107a40,_0x52b1ea=_0x111468[_0x2a0f9d(0x193)]-0x1,_0x2c83fc;_0x52b1ea>=0x0;_0x52b1ea--)(_0x2c83fc=_0x111468[_0x52b1ea])&&(_0x4253de=_0x2c83fc(_0x4253de)||_0x4253de);return _0x4253de;},O=(_0x2eaa1d,_0x440eb2)=>(_0x15f686,_0x4d1b2f)=>_0x440eb2(_0x15f686,_0x4d1b2f,_0x2eaa1d),N=(_0xff7144,_0x4e8bc0,_0x402307)=>Z(_0xff7144,typeof _0x4e8bc0!='symbol'?_0x4e8bc0+'':_0x4e8bc0,_0x402307);exports[_0x3f4857(0x144)]=class extends c[_0x3f4857(0x177)]{constructor(_0x7875e3=D,_0x93a820,_0x4090f8){const _0x186da0=_0x3f4857;super(),this[_0x186da0(0x179)]=_0x7875e3,this[_0x186da0(0x19b)]=_0x93a820,this[_0x186da0(0x14b)]=_0x4090f8;const {..._0x2eabd6}=c['merge']({},D,this[_0x186da0(0x179)]);this['_configService'][_0x186da0(0x176)](q,_0x2eabd6);}[_0x3f4857(0x19e)](){const _0x2b213a=_0x3f4857;[[g],[C],[p]][_0x2b213a(0x17e)](_0x591da9=>{const _0x519473=_0x2b213a;this['_injector'][_0x519473(0x152)](_0x591da9);});}[_0x3f4857(0x19a)](){const _0x31da54=_0x3f4857;this[_0x31da54(0x19b)][_0x31da54(0x173)](C),this[_0x31da54(0x19b)]['get'](p);}},N(exports[_0x3f4857(0x144)],_0x3f4857(0x16e),U),N(exports[_0x3f4857(0x144)],_0x3f4857(0x190),c[_0x3f4857(0x18b)][_0x3f4857(0x184)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3f4857(0x170)](j[_0x3f4857(0x1aa)],b['UniverCollaborationClientPlugin'],T[_0x3f4857(0x142)]),O(0x1,c[_0x3f4857(0x1a7)](c[_0x3f4857(0x163)])),O(0x2,c[_0x3f4857(0x143)])],exports[_0x3f4857(0x144)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5d47f7=_0x224b;(function(_0x34b563,_0x5d1c36){const _0x2a423f=_0x224b,_0x4ce73e=_0x34b563();while(!![]){try{const _0x130ba2=-parseInt(_0x2a423f(0x1c8))/0x1+-parseInt(_0x2a423f(0x1c7))/0x2+parseInt(_0x2a423f(0x1fc))/0x3+parseInt(_0x2a423f(0x221))/0x4*(-parseInt(_0x2a423f(0x1d6))/0x5)+parseInt(_0x2a423f(0x1f9))/0x6+-parseInt(_0x2a423f(0x200))/0x7*(-parseInt(_0x2a423f(0x1fe))/0x8)+parseInt(_0x2a423f(0x1e4))/0x9*(parseInt(_0x2a423f(0x1c0))/0xa);if(_0x130ba2===_0x5d1c36)break;else _0x4ce73e['push'](_0x4ce73e['shift']());}catch(_0x2d12d8){_0x4ce73e['push'](_0x4ce73e['shift']());}}}(_0x4a97,0x63c31));import{CommentService as _0x5b5cb2,CollaborationSessionService as _0xff52e3,UniverCollaborationClientPlugin as _0x31a28b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x104cb6}from'@univerjs-pro/license';import{dayjs as _0x4892bc,UserManagerService as _0x4ec60f,Inject as _0x485985,Injector as _0x17ace1,Disposable as _0x3e4cea,CustomRangeType as _0x5108c3,UniverInstanceType as _0x5d649f,DependentOn as _0x5d59fb,IConfigService as _0x253407,Plugin as _0x28570a,merge as _0x43a2d8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x22014a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x508dd5,IThreadCommentDataSourceService as _0x596221}from'@univerjs/thread-comment';import{bufferTime as _0x38892e}from'rxjs';import{HTTPService as _0x166e15}from'@univerjs/network';const W=_0x5d47f7(0x205);var I=(_0x2ad048=>(_0x2ad048[_0x2ad048[_0x5d47f7(0x1e0)]=0x0]=_0x5d47f7(0x1e0),_0x2ad048[_0x2ad048['Solved']=0x1]=_0x5d47f7(0x1f5),_0x2ad048[_0x2ad048[_0x5d47f7(0x1d7)]=-0x1]=_0x5d47f7(0x1d7),_0x2ad048))(I||{}),v=(_0x5893ba=>(_0x5893ba[_0x5893ba['Unknown']=0x0]=_0x5d47f7(0x21e),_0x5893ba[_0x5893ba[_0x5d47f7(0x216)]=0x1]=_0x5d47f7(0x216),_0x5893ba[_0x5893ba[_0x5d47f7(0x20d)]=0x2]=_0x5d47f7(0x20d),_0x5893ba[_0x5893ba[_0x5d47f7(0x1c1)]=0x3]='Edit',_0x5893ba[_0x5893ba[_0x5d47f7(0x1bc)]=0x4]=_0x5d47f7(0x1bc),_0x5893ba[_0x5893ba['Solve']=0x5]=_0x5d47f7(0x1e8),_0x5893ba[_0x5893ba[_0x5d47f7(0x1d7)]=-0x1]=_0x5d47f7(0x1d7),_0x5893ba))(v||{});const D=_0xff3b01=>_0x4892bc(new Date(+_0xff3b01))[_0x5d47f7(0x1e6)](_0x5d47f7(0x1dd)),B=async(_0x18f1c4,_0x31ff46)=>{const _0x196e9e=_0x5d47f7,_0x3b0438=_0x18f1c4[_0x196e9e(0x206)](_0x4ec60f),_0x4256a7=_0x18f1c4[_0x196e9e(0x206)](_0x166e15);_0x31ff46[_0x196e9e(0x20a)](_0x2a8250=>{const _0xd01244=_0x196e9e;_0x3b0438[_0xd01244(0x1ef)](_0x2a8250)&&_0x31ff46['delete'](_0x2a8250);}),_0x31ff46[_0x196e9e(0x1ee)]&&(await _0x4256a7[_0x196e9e(0x206)](_0x196e9e(0x1f3),{'params':{'userIDs':[..._0x31ff46]}}))['body'][_0x196e9e(0x1de)]['forEach'](_0x3142f3=>{const _0x409850=_0x196e9e;_0x3142f3&&_0x3b0438[_0x409850(0x1d4)](_0x3142f3);});};var K=Object[_0x5d47f7(0x219)],V=(_0xe8b149,_0x27a239,_0x13da1c,_0x317ce8)=>{const _0x478706=_0x5d47f7;for(var _0x32e9db=_0x317ce8>0x1?void 0x0:_0x317ce8?K(_0x27a239,_0x13da1c):_0x27a239,_0x294f8c=_0xe8b149[_0x478706(0x1cc)]-0x1,_0x7c295b;_0x294f8c>=0x0;_0x294f8c--)(_0x7c295b=_0xe8b149[_0x294f8c])&&(_0x32e9db=_0x7c295b(_0x32e9db)||_0x32e9db);return _0x32e9db;},p=(_0x3e0ac1,_0x517b08)=>(_0x4e2493,_0x4c3d0a)=>_0x517b08(_0x4e2493,_0x4c3d0a,_0x3e0ac1);let S=class extends _0x3e4cea{constructor(_0x18558d,_0x46a022,_0x7ffe0f,_0x241782){const _0x2ad117=_0x5d47f7;super(),this[_0x2ad117(0x20e)]=_0x18558d,this[_0x2ad117(0x1c3)]=_0x46a022,this[_0x2ad117(0x1f4)]=_0x7ffe0f,this['_injector']=_0x241782,this[_0x2ad117(0x1f8)](),this[_0x2ad117(0x1e3)]();}[_0x5d47f7(0x1e3)](){const _0x389ee9=_0x5d47f7;this[_0x389ee9(0x21b)](this[_0x389ee9(0x1c3)][_0x389ee9(0x1dc)][_0x389ee9(0x211)](_0x38892e(0x10))[_0x389ee9(0x1cb)](_0x28e391=>{const _0x45d5e0=_0x389ee9,_0x588aa5=new Set();_0x28e391['forEach'](_0x2b74e8=>{const _0x2160b3=_0x224b;switch(_0x2b74e8['type']){case _0x2160b3(0x1bb):{const _0x9db2fb=_0x2b74e8[_0x2160b3(0x1ce)][_0x2160b3(0x213)];_0x588aa5[_0x2160b3(0x1bb)](_0x9db2fb);break;}}}),B(this[_0x45d5e0(0x1cd)],_0x588aa5);}));}[_0x5d47f7(0x1f8)](){const _0x43610f=_0x5d47f7;this[_0x43610f(0x21b)](this['_commentService']['commentUpdate$'][_0x43610f(0x1cb)](async _0xd954c1=>{const _0xea04b6=_0x43610f;var _0x2f3c75,_0x11a35b,_0x43385b,_0x3b40c3;const _0x4c3d57=(_0x2f3c75=this['_threadCommentModel']['getUnit'](_0xd954c1[_0xea04b6(0x1c2)])['find'](_0x13cd3d=>_0x13cd3d[_0xea04b6(0x1f2)]===_0xd954c1['threadId']))==null?void 0x0:_0x2f3c75[_0xea04b6(0x1c6)];if(!_0x4c3d57)return;const {unitId:_0x4d4990,subUnitId:_0x31a111}=_0x4c3d57;switch(_0xd954c1[_0xea04b6(0x1fb)]&&this['_userService'][_0xea04b6(0x1d4)](_0xd954c1['user']),_0xd954c1['type']){case v[_0xea04b6(0x216)]:break;case v[_0xea04b6(0x20d)]:{this[_0xea04b6(0x1c3)][_0xea04b6(0x1d2)](_0x4d4990,_0x31a111,{'unitId':_0x4d4990,'subUnitId':_0x31a111,'ref':'','id':_0xd954c1[_0xea04b6(0x1da)],'dT':D(+_0xd954c1[_0xea04b6(0x1ec)]),'threadId':_0xd954c1[_0xea04b6(0x1f2)],'personId':(_0x43385b=(_0x11a35b=_0xd954c1[_0xea04b6(0x1fb)])==null?void 0x0:_0x11a35b[_0xea04b6(0x212)])!=null?_0x43385b:_0xd954c1['userId'],'text':JSON[_0xea04b6(0x1d9)](_0xd954c1['content']),'parentId':_0x4c3d57['id']});break;}case v[_0xea04b6(0x1bc)]:{const _0x25a717=this[_0xea04b6(0x1c3)][_0xea04b6(0x1c9)](_0x4d4990,_0x31a111,_0xd954c1['replyId']);_0x25a717&&_0x25a717[_0xea04b6(0x21f)]&&this[_0xea04b6(0x1c3)][_0xea04b6(0x1f6)](_0x4d4990,_0x31a111,_0xd954c1['replyId']);break;}case v[_0xea04b6(0x1c1)]:{this[_0xea04b6(0x1c3)]['updateComment'](_0x4d4990,_0x31a111,{'commentId':_0xd954c1[_0xea04b6(0x1da)],'text':JSON[_0xea04b6(0x1d9)](_0xd954c1['content'])});break;}case v[_0xea04b6(0x1e8)]:{const _0xc9187=(_0x3b40c3=this[_0xea04b6(0x1c3)][_0xea04b6(0x1ea)](_0xd954c1['unitId'])[_0xea04b6(0x207)](_0x2f12ec=>_0x2f12ec[_0xea04b6(0x1f2)]===_0xd954c1[_0xea04b6(0x1f2)]))==null?void 0x0:_0x3b40c3[_0xea04b6(0x1c6)];_0xc9187&&this[_0xea04b6(0x1c3)][_0xea04b6(0x202)](_0x4d4990,_0x31a111,_0xc9187['id'],_0xd954c1['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x485985(_0x5b5cb2)),p(0x1,_0x485985(_0x508dd5)),p(0x2,_0x485985(_0x4ec60f)),p(0x3,_0x485985(_0x17ace1))],S);const z=_0x5d47f7(0x1ca),M={};var k=Object[_0x5d47f7(0x219)],Q=(_0x2fa068,_0x31385a,_0x47307f,_0x1cb765)=>{const _0x168d28=_0x5d47f7;for(var _0x49129c=_0x1cb765>0x1?void 0x0:_0x1cb765?k(_0x31385a,_0x47307f):_0x31385a,_0x1127c9=_0x2fa068[_0x168d28(0x1cc)]-0x1,_0x364bf5;_0x1127c9>=0x0;_0x1127c9--)(_0x364bf5=_0x2fa068[_0x1127c9])&&(_0x49129c=_0x364bf5(_0x49129c)||_0x49129c);return _0x49129c;},_=(_0x202aea,_0x19ed85)=>(_0x58949b,_0x580c04)=>_0x19ed85(_0x58949b,_0x580c04,_0x202aea);function _0x4a97(){const _0x23bda0=['setConfig','requireSession','listComments','70yCuEHH','Edit','unitId','_threadCommentModel','rangeId','_config','root','1489384LJXPSo','743096EoCseq','getComment','thread-comment-data-source.config','subscribe','length','_injector','payload','_configService','code','COMMENT','addComment','error','addUser','dataSource','8815uzAPHn','UNRECOGNIZED','_threadCommentDataSource','parse','replyId','symbol','commentUpdate$','YYYY/MM/DD\x20HH:mm','users','solved','OpenOrReOpen','getMemberID','UNIVER_UNKNOWN','_initUserSync','1422585MeTzuE','defineProperty','format','userId','Solve','values','getUnit','map','createTimestamp','_httpService','size','getUser','filter','syncUpdateMutationToColla','threadId','/universer-api/user/list','_userService','Solved','deleteComment','rangeType','_init','2356656YijQem','saveCommentToSnapshot','user','1963389OFDTFN','/delete','16rVwNjf','content','808745NVGwig','/solved','resolveComment','pluginName','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','find','/edit','type','forEach','_sessionService','customRanges','Reply','_commentService','/reply','/universer-api/comment/unit/','pipe','userID','personId','ref','resolved','Add','/list','stringify','getOwnPropertyDescriptor','replies','disposeWithMe','post','_threadCommentDataSourceService','Unknown','parentId','/add','1108oisWBF','body','add','Delete'];_0x4a97=function(){return _0x23bda0;};return _0x4a97();}function X(_0x2853ff,_0x4efc93){const _0x39877e=_0x5d47f7,_0x1ad1dd=_0x2853ff[_0x39877e(0x21a)][0x0];return{..._0x4efc93,'id':_0x1ad1dd[_0x39877e(0x1da)],'resolved':_0x2853ff[_0x39877e(0x1df)]===0x1,'dT':D(_0x1ad1dd[_0x39877e(0x1ec)]),'personId':_0x1ad1dd[_0x39877e(0x1e7)],'threadId':_0x1ad1dd[_0x39877e(0x1f2)]};}function ee(_0x161cf9,_0x104e35,_0x33390b){const _0x4e3082=_0x5d47f7;var _0x52b2c2,_0x2e7d0c;if(((_0x2e7d0c=(_0x52b2c2=_0x161cf9==null?void 0x0:_0x161cf9[_0x4e3082(0x21a)])==null?void 0x0:_0x52b2c2['length'])!=null?_0x2e7d0c:0x0)>0x0){const _0x5c1f53=(_0x843475,_0xc7a9b5)=>({'id':_0x843475[_0x4e3082(0x1da)],'threadId':_0x843475[_0x4e3082(0x1f2)],'dT':D(_0x843475[_0x4e3082(0x1ec)]),'personId':_0x843475['userId'],'resolved':_0x161cf9[_0x4e3082(0x1df)]===I['Solved'],'unitId':_0x104e35,'subUnitId':_0x33390b,'text':JSON[_0x4e3082(0x1d9)](_0x843475[_0x4e3082(0x1ff)]),'parentId':_0xc7a9b5}),_0xd4ae6f=_0x5c1f53(_0x161cf9[_0x4e3082(0x21a)][0x0]);return{..._0xd4ae6f,'children':_0x161cf9[_0x4e3082(0x21a)]['slice'](0x1)[_0x4e3082(0x1eb)](_0x4108fe=>_0x5c1f53(_0x4108fe,_0xd4ae6f['id']))};}return null;}let f=class{constructor(_0x5f578d,_0x4fd9fe,_0x45f46e,_0x586ae3){const _0x3e06e9=_0x5d47f7;this[_0x3e06e9(0x1ed)]=_0x5f578d,this[_0x3e06e9(0x1f4)]=_0x4fd9fe,this['_sessionService']=_0x45f46e,this[_0x3e06e9(0x1cd)]=_0x586ae3;}async[_0x5d47f7(0x1d2)](_0x517c38){const _0x300896=_0x5d47f7;var _0x1d5f83,_0x2302dc;const {parentId:_0x59487b,unitId:_0x5b6976,text:_0x1d06c8,threadId:_0x515c10}=_0x517c38,_0x14de92=(_0x2302dc=(_0x1d5f83=_0x1d06c8[_0x300896(0x20c)])==null?void 0x0:_0x1d5f83[_0x300896(0x1f0)](_0x57cab6=>_0x57cab6[_0x300896(0x1f7)]===_0x5108c3[_0x300896(0x1d1)])[_0x300896(0x1eb)](_0x2be1de=>_0x2be1de[_0x300896(0x1c4)]))!=null?_0x2302dc:[],_0x2a1650=JSON[_0x300896(0x218)](_0x1d06c8),_0x50a64d=(await this[_0x300896(0x20b)][_0x300896(0x1be)](_0x5b6976))[_0x300896(0x1e1)]();if(_0x59487b){const _0xfa2b35={'memberId':_0x50a64d,'unitId':_0x5b6976,'content':_0x2a1650,'mention':_0x14de92,'threadId':_0x515c10},_0x1bb879=(await this[_0x300896(0x1ed)][_0x300896(0x21c)](_0x300896(0x210)+_0x5b6976+_0x300896(0x20f),{'body':_0xfa2b35}))[_0x300896(0x222)]['reply'];return{..._0x517c38,'id':_0x1bb879['replyId'],'dT':_0x4892bc(+_0x1bb879[_0x300896(0x1ec)])[_0x300896(0x1e6)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1bb879[_0x300896(0x1e7)]};}else{const _0x230492={'memberId':_0x50a64d,'unitId':_0x5b6976,'content':_0x2a1650,'mention':_0x14de92},_0x4593bc=await this[_0x300896(0x1ed)][_0x300896(0x21c)](_0x300896(0x210)+_0x5b6976+_0x300896(0x220),{'body':_0x230492});return X(_0x4593bc[_0x300896(0x222)]['comment'],_0x517c38);}}async['updateComment'](_0x1d667a){const _0xe37e36=_0x5d47f7;var _0x2152b5,_0x25abb1;const {text:_0x4d99a3,unitId:_0x57573e}=_0x1d667a,_0x2c8c74=(_0x25abb1=(_0x2152b5=_0x4d99a3[_0xe37e36(0x20c)])==null?void 0x0:_0x2152b5[_0xe37e36(0x1f0)](_0xf05851=>_0xf05851[_0xe37e36(0x1f7)]===_0x5108c3[_0xe37e36(0x1d1)])[_0xe37e36(0x1eb)](_0x287918=>_0x287918[_0xe37e36(0x1c4)]))!=null?_0x25abb1:[],_0x3be6e3=JSON[_0xe37e36(0x218)](_0x4d99a3),_0x314092=_0x1d667a[_0xe37e36(0x1f2)],_0x40d215=_0x1d667a['id'],_0x3da70f={'memberId':(await this[_0xe37e36(0x20b)]['requireSession'](_0x57573e))[_0xe37e36(0x1e1)](),'unitId':_0x57573e,'threadId':_0x314092,'mention':_0x2c8c74,'content':_0x3be6e3,'replyId':_0x40d215},_0x2a8f82=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x57573e+_0xe37e36(0x208),{'body':_0x3da70f});return!_0x2a8f82[_0xe37e36(0x222)]['error']||_0x2a8f82[_0xe37e36(0x222)][_0xe37e36(0x1d3)][_0xe37e36(0x1d0)]===0x1;}async['resolveComment'](_0x253ac0){const _0x1f870a=_0x5d47f7,{unitId:_0x4ed73d}=_0x253ac0,_0x4a0286=_0x253ac0[_0x1f870a(0x1f2)],_0x14d47d={'memberId':this[_0x1f870a(0x1f4)]['getCurrentUser']()[_0x1f870a(0x212)],'unitId':_0x4ed73d,'threadId':_0x4a0286,'solved':_0x253ac0[_0x1f870a(0x215)]?I['Solved']:I[_0x1f870a(0x1e0)]},_0x2db48f=await this[_0x1f870a(0x1ed)][_0x1f870a(0x21c)](_0x1f870a(0x210)+_0x4ed73d+_0x1f870a(0x201),{'body':_0x14d47d});return!_0x2db48f['body'][_0x1f870a(0x1d3)]||_0x2db48f[_0x1f870a(0x222)][_0x1f870a(0x1d3)][_0x1f870a(0x1d0)]===0x1;}async[_0x5d47f7(0x1f6)](_0x59f5c7,_0x69c44a,_0x1d96a0,_0x4d92dc){const _0xb5c3f6=_0x5d47f7,_0x49f40e={'memberId':(await this[_0xb5c3f6(0x20b)][_0xb5c3f6(0x1be)](_0x59f5c7))[_0xb5c3f6(0x1e1)](),'threadId':_0x1d96a0,'replyId':_0x4d92dc,'unitId':_0x59f5c7},_0x167d5e=await this['_httpService'][_0xb5c3f6(0x21c)](_0xb5c3f6(0x210)+_0x59f5c7+_0xb5c3f6(0x1fd),{'body':_0x49f40e});return!_0x167d5e[_0xb5c3f6(0x222)]['error']||_0x167d5e[_0xb5c3f6(0x222)][_0xb5c3f6(0x1d3)][_0xb5c3f6(0x1d0)]===0x1;}async[_0x5d47f7(0x1bf)](_0x43e237,_0x4df04e,_0xda9039){const _0x3615fc=_0x5d47f7,_0x3fcdda={'unitId':_0x43e237,'threadId':_0xda9039},_0x1245d0=await this[_0x3615fc(0x1ed)][_0x3615fc(0x21c)](_0x3615fc(0x210)+_0x43e237+_0x3615fc(0x217),{'body':_0x3fcdda}),_0x4ebe4f=_0xda9039[_0x3615fc(0x1eb)](_0x5aa8b4=>ee(_0x1245d0[_0x3615fc(0x222)][_0x3615fc(0x204)][_0x5aa8b4],_0x43e237,_0x4df04e))[_0x3615fc(0x1f0)](Boolean);return Object[_0x3615fc(0x1e9)](_0x1245d0[_0x3615fc(0x222)]['users'])[_0x3615fc(0x20a)](_0xd59a04=>{const _0x136ac4=_0x3615fc;this[_0x136ac4(0x1f4)]['addUser'](_0xd59a04);}),_0x4ebe4f;}[_0x5d47f7(0x1fa)](_0x140357){const _0x2f3ba3=_0x5d47f7;return{'id':_0x140357['id'],'threadId':_0x140357[_0x2f3ba3(0x1f2)],'ref':_0x140357[_0x2f3ba3(0x214)]};}};f=Q([_(0x0,_0x485985(_0x166e15)),_(0x1,_0x485985(_0x4ec60f)),_(0x2,_0x485985(_0xff52e3)),_(0x3,_0x485985(_0x17ace1))],f);var re=Object[_0x5d47f7(0x219)],te=(_0x350f38,_0x57aaa4,_0x1003f5,_0x442795)=>{for(var _0x44c311=_0x442795>0x1?void 0x0:_0x442795?re(_0x57aaa4,_0x1003f5):_0x57aaa4,_0x363e11=_0x350f38['length']-0x1,_0x41c654;_0x363e11>=0x0;_0x363e11--)(_0x41c654=_0x350f38[_0x363e11])&&(_0x44c311=_0x41c654(_0x44c311)||_0x44c311);return _0x44c311;},N=(_0x1e6260,_0x5d7b47)=>(_0x4caee4,_0x59fb72)=>_0x5d7b47(_0x4caee4,_0x59fb72,_0x1e6260);function _0x224b(_0x1bfbe0,_0x324bfb){const _0x4a975f=_0x4a97();return _0x224b=function(_0x224b7e,_0x1aa131){_0x224b7e=_0x224b7e-0x1bb;let _0x1c5243=_0x4a975f[_0x224b7e];return _0x1c5243;},_0x224b(_0x1bfbe0,_0x324bfb);}let g=class extends _0x3e4cea{constructor(_0x32c99c,_0xa2b5c3){const _0x2cb612=_0x5d47f7;super(),this['_threadCommentDataSourceService']=_0x32c99c,this[_0x2cb612(0x1d8)]=_0xa2b5c3,this['_initDataSource']();}['_initDataSource'](){const _0x301852=_0x5d47f7;this[_0x301852(0x21d)][_0x301852(0x1d5)]=this[_0x301852(0x1d8)],this[_0x301852(0x21d)][_0x301852(0x1f1)]=!0x1;}};g=te([N(0x0,_0x596221),N(0x1,_0x485985(f))],g);var se=Object[_0x5d47f7(0x1e5)],oe=Object[_0x5d47f7(0x219)],ne=(_0x667073,_0x4b235e,_0x3f9984)=>_0x4b235e in _0x667073?se(_0x667073,_0x4b235e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3f9984}):_0x667073[_0x4b235e]=_0x3f9984,ie=(_0x3a53f7,_0x2f87f1,_0x1065a5,_0x4e2ab)=>{const _0x2cc0ff=_0x5d47f7;for(var _0xb72658=_0x4e2ab>0x1?void 0x0:_0x4e2ab?oe(_0x2f87f1,_0x1065a5):_0x2f87f1,_0x531771=_0x3a53f7[_0x2cc0ff(0x1cc)]-0x1,_0x549758;_0x531771>=0x0;_0x531771--)(_0x549758=_0x3a53f7[_0x531771])&&(_0xb72658=_0x549758(_0xb72658)||_0xb72658);return _0xb72658;},w=(_0x77fef1,_0x2e63b6)=>(_0x4a806f,_0x3e6a5b)=>_0x2e63b6(_0x4a806f,_0x3e6a5b,_0x77fef1),$=(_0x37545b,_0x33f974,_0x59e734)=>ne(_0x37545b,typeof _0x33f974!=_0x5d47f7(0x1db)?_0x33f974+'':_0x33f974,_0x59e734);let b=class extends _0x28570a{constructor(_0x924144=M,_0x3994e0,_0x366957){const _0x1c068d=_0x5d47f7;super(),this[_0x1c068d(0x1c5)]=_0x924144,this[_0x1c068d(0x1cd)]=_0x3994e0,this['_configService']=_0x366957;const {..._0x4d7eef}=_0x43a2d8({},M,this[_0x1c068d(0x1c5)]);this[_0x1c068d(0x1cf)][_0x1c068d(0x1bd)](z,_0x4d7eef);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x116fd0=>{const _0x37d78d=_0x224b;this[_0x37d78d(0x1cd)][_0x37d78d(0x1bb)](_0x116fd0);});}['onReady'](){const _0x4ba9b8=_0x5d47f7;this[_0x4ba9b8(0x1cd)]['get'](g),this[_0x4ba9b8(0x1cd)][_0x4ba9b8(0x206)](S);}};$(b,_0x5d47f7(0x203),W),$(b,_0x5d47f7(0x209),_0x5d649f[_0x5d47f7(0x1e2)]),b=ie([_0x5d59fb(_0x22014a,_0x31a28b,_0x104cb6),w(0x1,_0x485985(_0x17ace1)),w(0x2,_0x253407)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x174a38=_0x1f81;(function(_0x3177d9,_0x3b0693){const _0x3f4739=_0x1f81,_0x5ca7a0=_0x3177d9();while(!![]){try{const _0x10f980=parseInt(_0x3f4739(0xa1))/0x1*(-parseInt(_0x3f4739(0x9b))/0x2)+parseInt(_0x3f4739(0xd7))/0x3+parseInt(_0x3f4739(0xc4))/0x4*(parseInt(_0x3f4739(0xc8))/0x5)+parseInt(_0x3f4739(0xc7))/0x6*(-parseInt(_0x3f4739(0xb2))/0x7)+-parseInt(_0x3f4739(0xe8))/0x8*(-parseInt(_0x3f4739(0xdf))/0x9)+-parseInt(_0x3f4739(0xb1))/0xa*(parseInt(_0x3f4739(0xca))/0xb)+parseInt(_0x3f4739(0xa0))/0xc;if(_0x10f980===_0x3b0693)break;else _0x5ca7a0['push'](_0x5ca7a0['shift']());}catch(_0x1b1f6f){_0x5ca7a0['push'](_0x5ca7a0['shift']());}}}(_0x3059,0xf1852));import{CommentService as _0x2f2e9e,CollaborationSessionService as _0x487023,UniverCollaborationClientPlugin as _0x1c0658}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x552060}from'@univerjs-pro/license';import{dayjs as _0x5a07fa,UserManagerService as _0x1bfd5b,Inject as _0x558fff,Injector as _0x497805,Disposable as _0x4d9099,CustomRangeType as _0x715877,UniverInstanceType as _0x5cde7f,DependentOn as _0x16cf16,IConfigService as _0x34cab2,Plugin as _0x1ba826,merge as _0x239f10}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e0955}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x188ba0,IThreadCommentDataSourceService as _0x1ab4ba}from'@univerjs/thread-comment';import{bufferTime as _0x21deb5}from'rxjs';import{HTTPService as _0x1cc5be}from'@univerjs/network';const W=_0x174a38(0xb6);var I=(_0x30648c=>(_0x30648c[_0x30648c[_0x174a38(0xab)]=0x0]=_0x174a38(0xab),_0x30648c[_0x30648c[_0x174a38(0xbc)]=0x1]='Solved',_0x30648c[_0x30648c[_0x174a38(0xef)]=-0x1]='UNRECOGNIZED',_0x30648c))(I||{}),v=(_0x488274=>(_0x488274[_0x488274[_0x174a38(0xeb)]=0x0]=_0x174a38(0xeb),_0x488274[_0x488274[_0x174a38(0xf1)]=0x1]='Add',_0x488274[_0x488274[_0x174a38(0xb4)]=0x2]=_0x174a38(0xb4),_0x488274[_0x488274[_0x174a38(0xf2)]=0x3]=_0x174a38(0xf2),_0x488274[_0x488274[_0x174a38(0xa4)]=0x4]=_0x174a38(0xa4),_0x488274[_0x488274[_0x174a38(0xd0)]=0x5]=_0x174a38(0xd0),_0x488274[_0x488274[_0x174a38(0xef)]=-0x1]=_0x174a38(0xef),_0x488274))(v||{});const D=_0x320ec1=>_0x5a07fa(new Date(+_0x320ec1))[_0x174a38(0xea)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x227bdf,_0x407f84)=>{const _0x4ede25=_0x174a38,_0x934775=_0x227bdf['get'](_0x1bfd5b),_0x16c6b9=_0x227bdf[_0x4ede25(0xba)](_0x1cc5be);_0x407f84['forEach'](_0x1bd805=>{const _0x558465=_0x4ede25;_0x934775[_0x558465(0xc2)](_0x1bd805)&&_0x407f84[_0x558465(0xa8)](_0x1bd805);}),_0x407f84[_0x4ede25(0xa9)]&&(await _0x16c6b9[_0x4ede25(0xba)]('/universer-api/user/list',{'params':{'userIDs':[..._0x407f84]}}))[_0x4ede25(0xf0)][_0x4ede25(0x9f)][_0x4ede25(0xc5)](_0x46068d=>{const _0x347d57=_0x4ede25;_0x46068d&&_0x934775[_0x347d57(0x96)](_0x46068d);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x39e1d4,_0x6f11e9,_0x2733ca,_0x14ed6e)=>{const _0x2f254b=_0x174a38;for(var _0x40bd79=_0x14ed6e>0x1?void 0x0:_0x14ed6e?K(_0x6f11e9,_0x2733ca):_0x6f11e9,_0x1b1414=_0x39e1d4[_0x2f254b(0x94)]-0x1,_0x4e6669;_0x1b1414>=0x0;_0x1b1414--)(_0x4e6669=_0x39e1d4[_0x1b1414])&&(_0x40bd79=_0x4e6669(_0x40bd79)||_0x40bd79);return _0x40bd79;},p=(_0x513513,_0x2bdeb4)=>(_0x5f5c37,_0x284b36)=>_0x2bdeb4(_0x5f5c37,_0x284b36,_0x513513);let S=class extends _0x4d9099{constructor(_0x44244a,_0x33ba19,_0x2b8046,_0x2439b4){const _0x11f5fb=_0x174a38;super(),this['_commentService']=_0x44244a,this['_threadCommentModel']=_0x33ba19,this[_0x11f5fb(0xde)]=_0x2b8046,this[_0x11f5fb(0xe5)]=_0x2439b4,this[_0x11f5fb(0xf5)](),this[_0x11f5fb(0xcd)]();}[_0x174a38(0xcd)](){const _0x358312=_0x174a38;this['disposeWithMe'](this[_0x358312(0xf7)][_0x358312(0xb5)][_0x358312(0xcf)](_0x21deb5(0x10))[_0x358312(0xc0)](_0x44cda7=>{const _0x2495d4=new Set();_0x44cda7['forEach'](_0x478ad2=>{const _0x5867fa=_0x1f81;switch(_0x478ad2[_0x5867fa(0xd6)]){case'add':{const _0x1bae8b=_0x478ad2[_0x5867fa(0xed)][_0x5867fa(0xcb)];_0x2495d4[_0x5867fa(0xe3)](_0x1bae8b);break;}}}),B(this['_injector'],_0x2495d4);}));}[_0x174a38(0xf5)](){const _0x1f42a9=_0x174a38;this[_0x1f42a9(0xbe)](this[_0x1f42a9(0xe2)][_0x1f42a9(0xb5)][_0x1f42a9(0xc0)](async _0x1586b0=>{const _0xd0e96d=_0x1f42a9;var _0x5b62a1,_0x58d708,_0x15bafe,_0x105f42;const _0x34f9ab=(_0x5b62a1=this[_0xd0e96d(0xf7)]['getUnit'](_0x1586b0[_0xd0e96d(0xdb)])['find'](_0x25cdd4=>_0x25cdd4['threadId']===_0x1586b0[_0xd0e96d(0xa5)]))==null?void 0x0:_0x5b62a1[_0xd0e96d(0x9d)];if(!_0x34f9ab)return;const {unitId:_0x5b7886,subUnitId:_0x3738a4}=_0x34f9ab;switch(_0x1586b0[_0xd0e96d(0x92)]&&this[_0xd0e96d(0xde)][_0xd0e96d(0x96)](_0x1586b0['user']),_0x1586b0[_0xd0e96d(0xd6)]){case v[_0xd0e96d(0xf1)]:break;case v[_0xd0e96d(0xb4)]:{this[_0xd0e96d(0xf7)]['addComment'](_0x5b7886,_0x3738a4,{'unitId':_0x5b7886,'subUnitId':_0x3738a4,'ref':'','id':_0x1586b0[_0xd0e96d(0xe7)],'dT':D(+_0x1586b0['createTimestamp']),'threadId':_0x1586b0['threadId'],'personId':(_0x15bafe=(_0x58d708=_0x1586b0['user'])==null?void 0x0:_0x58d708[_0xd0e96d(0xb0)])!=null?_0x15bafe:_0x1586b0[_0xd0e96d(0xad)],'text':JSON[_0xd0e96d(0xf6)](_0x1586b0[_0xd0e96d(0xee)]),'parentId':_0x34f9ab['id']});break;}case v[_0xd0e96d(0xa4)]:{const _0x3ffcfc=this[_0xd0e96d(0xf7)]['getComment'](_0x5b7886,_0x3738a4,_0x1586b0[_0xd0e96d(0xe7)]);_0x3ffcfc&&_0x3ffcfc['parentId']&&this[_0xd0e96d(0xf7)][_0xd0e96d(0xbf)](_0x5b7886,_0x3738a4,_0x1586b0['replyId']);break;}case v[_0xd0e96d(0xf2)]:{this[_0xd0e96d(0xf7)][_0xd0e96d(0x93)](_0x5b7886,_0x3738a4,{'commentId':_0x1586b0['replyId'],'text':JSON[_0xd0e96d(0xf6)](_0x1586b0[_0xd0e96d(0xee)])});break;}case v[_0xd0e96d(0xd0)]:{const _0x8386e4=(_0x105f42=this[_0xd0e96d(0xf7)][_0xd0e96d(0xf3)](_0x1586b0['unitId'])[_0xd0e96d(0xd1)](_0x37e030=>_0x37e030[_0xd0e96d(0xa5)]===_0x1586b0[_0xd0e96d(0xa5)]))==null?void 0x0:_0x105f42['root'];_0x8386e4&&this['_threadCommentModel']['resolveComment'](_0x5b7886,_0x3738a4,_0x8386e4['id'],_0x1586b0[_0xd0e96d(0xd5)]===I['Solved']);break;}}}));}};function _0x1f81(_0x2663e5,_0x4feef4){const _0x30593f=_0x3059();return _0x1f81=function(_0x1f8197,_0x31d14d){_0x1f8197=_0x1f8197-0x92;let _0x54272c=_0x30593f[_0x1f8197];return _0x54272c;},_0x1f81(_0x2663e5,_0x4feef4);}S=V([p(0x0,_0x558fff(_0x2f2e9e)),p(0x1,_0x558fff(_0x188ba0)),p(0x2,_0x558fff(_0x1bfd5b)),p(0x3,_0x558fff(_0x497805))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x174a38(0xb7)],Q=(_0x26b5d0,_0x355da4,_0x218280,_0x19109c)=>{const _0x21c970=_0x174a38;for(var _0x4da9ac=_0x19109c>0x1?void 0x0:_0x19109c?k(_0x355da4,_0x218280):_0x355da4,_0x3b412b=_0x26b5d0[_0x21c970(0x94)]-0x1,_0x44c32b;_0x3b412b>=0x0;_0x3b412b--)(_0x44c32b=_0x26b5d0[_0x3b412b])&&(_0x4da9ac=_0x44c32b(_0x4da9ac)||_0x4da9ac);return _0x4da9ac;},_=(_0x45bb31,_0x1c5853)=>(_0x1acf23,_0x29cd99)=>_0x1c5853(_0x1acf23,_0x29cd99,_0x45bb31);function X(_0x55fab7,_0x2fbb1f){const _0x15f9dd=_0x174a38,_0x459de3=_0x55fab7[_0x15f9dd(0xf8)][0x0];return{..._0x2fbb1f,'id':_0x459de3[_0x15f9dd(0xe7)],'resolved':_0x55fab7['solved']===0x1,'dT':D(_0x459de3[_0x15f9dd(0x9c)]),'personId':_0x459de3['userId'],'threadId':_0x459de3[_0x15f9dd(0xa5)]};}function ee(_0x428f60,_0x1329d0,_0x1d1b38){const _0x1952aa=_0x174a38;var _0x5be968,_0x35a762;if(((_0x35a762=(_0x5be968=_0x428f60==null?void 0x0:_0x428f60[_0x1952aa(0xf8)])==null?void 0x0:_0x5be968[_0x1952aa(0x94)])!=null?_0x35a762:0x0)>0x0){const _0x2ea6e3=(_0x46cafb,_0x1d10a2)=>({'id':_0x46cafb['replyId'],'threadId':_0x46cafb[_0x1952aa(0xa5)],'dT':D(_0x46cafb['createTimestamp']),'personId':_0x46cafb[_0x1952aa(0xad)],'resolved':_0x428f60[_0x1952aa(0xd5)]===I[_0x1952aa(0xbc)],'unitId':_0x1329d0,'subUnitId':_0x1d1b38,'text':JSON['parse'](_0x46cafb[_0x1952aa(0xee)]),'parentId':_0x1d10a2}),_0xbfaf11=_0x2ea6e3(_0x428f60[_0x1952aa(0xf8)][0x0]);return{..._0xbfaf11,'children':_0x428f60[_0x1952aa(0xf8)][_0x1952aa(0xa6)](0x1)[_0x1952aa(0xe1)](_0x372eab=>_0x2ea6e3(_0x372eab,_0xbfaf11['id']))};}return null;}let f=class{constructor(_0xb3554e,_0x9bb8b2,_0x1f7b40,_0x3623a2){const _0x2be56f=_0x174a38;this['_httpService']=_0xb3554e,this[_0x2be56f(0xde)]=_0x9bb8b2,this[_0x2be56f(0xdd)]=_0x1f7b40,this[_0x2be56f(0xe5)]=_0x3623a2;}async[_0x174a38(0xaa)](_0x3c12a9){const _0x30e90b=_0x174a38;var _0xdb65a9,_0x548738;const {parentId:_0x3434ad,unitId:_0x45277d,text:_0x579de9,threadId:_0xa12bc9}=_0x3c12a9,_0x3d5a53=(_0x548738=(_0xdb65a9=_0x579de9[_0x30e90b(0xa2)])==null?void 0x0:_0xdb65a9[_0x30e90b(0xb9)](_0x193d32=>_0x193d32[_0x30e90b(0x9a)]===_0x715877['COMMENT'])[_0x30e90b(0xe1)](_0x287359=>_0x287359[_0x30e90b(0xc9)]))!=null?_0x548738:[],_0x52a5c1=JSON[_0x30e90b(0x99)](_0x579de9),_0x84a52f=(await this['_sessionService'][_0x30e90b(0xd9)](_0x45277d))[_0x30e90b(0xf4)]();if(_0x3434ad){const _0x11a516={'memberId':_0x84a52f,'unitId':_0x45277d,'content':_0x52a5c1,'mention':_0x3d5a53,'threadId':_0xa12bc9},_0x5f0fe1=(await this[_0x30e90b(0xa7)][_0x30e90b(0xbd)](_0x30e90b(0xc6)+_0x45277d+_0x30e90b(0x9e),{'body':_0x11a516}))[_0x30e90b(0xf0)]['reply'];return{..._0x3c12a9,'id':_0x5f0fe1['replyId'],'dT':_0x5a07fa(+_0x5f0fe1[_0x30e90b(0x9c)])[_0x30e90b(0xea)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5f0fe1['userId']};}else{const _0xd64940={'memberId':_0x84a52f,'unitId':_0x45277d,'content':_0x52a5c1,'mention':_0x3d5a53},_0x2813da=await this[_0x30e90b(0xa7)][_0x30e90b(0xbd)](_0x30e90b(0xc6)+_0x45277d+'/add',{'body':_0xd64940});return X(_0x2813da[_0x30e90b(0xf0)][_0x30e90b(0xb3)],_0x3c12a9);}}async['updateComment'](_0x5b4763){const _0x3e5196=_0x174a38;var _0x4bb9b2,_0x4ffb5b;const {text:_0x247ba0,unitId:_0x2cda72}=_0x5b4763,_0x1756d9=(_0x4ffb5b=(_0x4bb9b2=_0x247ba0[_0x3e5196(0xa2)])==null?void 0x0:_0x4bb9b2['filter'](_0x4ca286=>_0x4ca286[_0x3e5196(0x9a)]===_0x715877[_0x3e5196(0x95)])[_0x3e5196(0xe1)](_0x4fabed=>_0x4fabed[_0x3e5196(0xc9)]))!=null?_0x4ffb5b:[],_0x3a71e1=JSON[_0x3e5196(0x99)](_0x247ba0),_0x557e25=_0x5b4763[_0x3e5196(0xa5)],_0x12ae54=_0x5b4763['id'],_0x1c5c80={'memberId':(await this['_sessionService'][_0x3e5196(0xd9)](_0x2cda72))[_0x3e5196(0xf4)](),'unitId':_0x2cda72,'threadId':_0x557e25,'mention':_0x1756d9,'content':_0x3a71e1,'replyId':_0x12ae54},_0x10d062=await this['_httpService'][_0x3e5196(0xbd)](_0x3e5196(0xc6)+_0x2cda72+_0x3e5196(0xe6),{'body':_0x1c5c80});return!_0x10d062['body'][_0x3e5196(0xe0)]||_0x10d062['body'][_0x3e5196(0xe0)]['code']===0x1;}async[_0x174a38(0xb8)](_0x39a518){const _0x45c6a9=_0x174a38,{unitId:_0x2aea30}=_0x39a518,_0x115c22=_0x39a518[_0x45c6a9(0xa5)],_0x17ffcd={'memberId':this[_0x45c6a9(0xde)][_0x45c6a9(0xec)]()['userID'],'unitId':_0x2aea30,'threadId':_0x115c22,'solved':_0x39a518[_0x45c6a9(0xa3)]?I[_0x45c6a9(0xbc)]:I[_0x45c6a9(0xab)]},_0x19d37a=await this[_0x45c6a9(0xa7)]['post'](_0x45c6a9(0xc6)+_0x2aea30+_0x45c6a9(0xda),{'body':_0x17ffcd});return!_0x19d37a[_0x45c6a9(0xf0)][_0x45c6a9(0xe0)]||_0x19d37a[_0x45c6a9(0xf0)][_0x45c6a9(0xe0)][_0x45c6a9(0xe9)]===0x1;}async[_0x174a38(0xbf)](_0xcc389e,_0x29b4ff,_0x3bc1bb,_0x22343f){const _0x40d8d5=_0x174a38,_0x1ba347={'memberId':(await this['_sessionService'][_0x40d8d5(0xd9)](_0xcc389e))[_0x40d8d5(0xf4)](),'threadId':_0x3bc1bb,'replyId':_0x22343f,'unitId':_0xcc389e},_0x4c467a=await this[_0x40d8d5(0xa7)][_0x40d8d5(0xbd)](_0x40d8d5(0xc6)+_0xcc389e+_0x40d8d5(0xae),{'body':_0x1ba347});return!_0x4c467a[_0x40d8d5(0xf0)][_0x40d8d5(0xe0)]||_0x4c467a[_0x40d8d5(0xf0)][_0x40d8d5(0xe0)][_0x40d8d5(0xe9)]===0x1;}async['listComments'](_0x4b0b10,_0x50ecd4,_0x148b3d){const _0x540628=_0x174a38,_0x18d6d1={'unitId':_0x4b0b10,'threadId':_0x148b3d},_0x3741de=await this[_0x540628(0xa7)][_0x540628(0xbd)](_0x540628(0xc6)+_0x4b0b10+_0x540628(0xd3),{'body':_0x18d6d1}),_0x1225fd=_0x148b3d['map'](_0x49e938=>ee(_0x3741de[_0x540628(0xf0)]['comments'][_0x49e938],_0x4b0b10,_0x50ecd4))[_0x540628(0xb9)](Boolean);return Object['values'](_0x3741de[_0x540628(0xf0)][_0x540628(0x9f)])[_0x540628(0xc5)](_0x643e77=>{const _0x3f323b=_0x540628;this[_0x3f323b(0xde)]['addUser'](_0x643e77);}),_0x1225fd;}[_0x174a38(0xce)](_0x56914a){return{'id':_0x56914a['id'],'threadId':_0x56914a['threadId'],'ref':_0x56914a['ref']};}};f=Q([_(0x0,_0x558fff(_0x1cc5be)),_(0x1,_0x558fff(_0x1bfd5b)),_(0x2,_0x558fff(_0x487023)),_(0x3,_0x558fff(_0x497805))],f);var re=Object[_0x174a38(0xb7)],te=(_0x9e478,_0xc406d8,_0x2e7743,_0x1aaa78)=>{const _0x3c86d8=_0x174a38;for(var _0x1cc30c=_0x1aaa78>0x1?void 0x0:_0x1aaa78?re(_0xc406d8,_0x2e7743):_0xc406d8,_0x2150cc=_0x9e478[_0x3c86d8(0x94)]-0x1,_0x5ad99d;_0x2150cc>=0x0;_0x2150cc--)(_0x5ad99d=_0x9e478[_0x2150cc])&&(_0x1cc30c=_0x5ad99d(_0x1cc30c)||_0x1cc30c);return _0x1cc30c;},N=(_0x265574,_0x264495)=>(_0x255d78,_0x571333)=>_0x264495(_0x255d78,_0x571333,_0x265574);function _0x3059(){const _0x2e4bdf=['_sessionService','_userService','297SFgjUJ','error','map','_commentService','add','UNIVER_UNKNOWN','_injector','/edit','replyId','374480HWcBHB','code','format','Unknown','getCurrentUser','payload','content','UNRECOGNIZED','body','Add','Edit','getUnit','getMemberID','_init','parse','_threadCommentModel','replies','user','updateComment','length','COMMENT','addUser','syncUpdateMutationToColla','defineProperty','stringify','rangeType','2444zOstBq','createTimestamp','root','/reply','users','6549720TzBqXy','569fwOJbi','customRanges','resolved','Delete','threadId','slice','_httpService','delete','size','addComment','OpenOrReOpen','_config','userId','/delete','_configService','userID','1379320xKcjro','7UYDAaW','comment','Reply','commentUpdate$','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','resolveComment','filter','get','_threadCommentDataSourceService','Solved','post','disposeWithMe','deleteComment','subscribe','symbol','getUser','onStarting','21932FvYfnQ','forEach','/universer-api/comment/unit/','9856842pnwnLx','215toASyi','rangeId','11XNZheR','personId','pluginName','_initUserSync','saveCommentToSnapshot','pipe','Solve','find','_initDataSource','/list','dataSource','solved','type','3417042vsHzIc','_threadCommentDataSource','requireSession','/solved','unitId','setConfig'];_0x3059=function(){return _0x2e4bdf;};return _0x3059();}let g=class extends _0x4d9099{constructor(_0x357780,_0x4148c7){const _0x37e2f0=_0x174a38;super(),this['_threadCommentDataSourceService']=_0x357780,this[_0x37e2f0(0xd8)]=_0x4148c7,this['_initDataSource']();}[_0x174a38(0xd2)](){const _0x2c90e1=_0x174a38;this[_0x2c90e1(0xbb)][_0x2c90e1(0xd4)]=this['_threadCommentDataSource'],this[_0x2c90e1(0xbb)][_0x2c90e1(0x97)]=!0x1;}};g=te([N(0x0,_0x1ab4ba),N(0x1,_0x558fff(f))],g);var se=Object[_0x174a38(0x98)],oe=Object[_0x174a38(0xb7)],ne=(_0x41f721,_0x2813eb,_0x253ceb)=>_0x2813eb in _0x41f721?se(_0x41f721,_0x2813eb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x253ceb}):_0x41f721[_0x2813eb]=_0x253ceb,ie=(_0x38ba6d,_0x3a6986,_0x3036fb,_0x5b1c17)=>{const _0xf38a84=_0x174a38;for(var _0x1420d5=_0x5b1c17>0x1?void 0x0:_0x5b1c17?oe(_0x3a6986,_0x3036fb):_0x3a6986,_0x45b019=_0x38ba6d[_0xf38a84(0x94)]-0x1,_0x267eb6;_0x45b019>=0x0;_0x45b019--)(_0x267eb6=_0x38ba6d[_0x45b019])&&(_0x1420d5=_0x267eb6(_0x1420d5)||_0x1420d5);return _0x1420d5;},w=(_0x814f62,_0x5dc2f)=>(_0x1bc567,_0x1d3074)=>_0x5dc2f(_0x1bc567,_0x1d3074,_0x814f62),$=(_0x4920f6,_0x41c760,_0x29011d)=>ne(_0x4920f6,typeof _0x41c760!=_0x174a38(0xc1)?_0x41c760+'':_0x41c760,_0x29011d);let b=class extends _0x1ba826{constructor(_0x5a2a8f=M,_0x557704,_0x21ea1c){const _0x38ec34=_0x174a38;super(),this[_0x38ec34(0xac)]=_0x5a2a8f,this[_0x38ec34(0xe5)]=_0x557704,this[_0x38ec34(0xaf)]=_0x21ea1c;const {..._0x51087e}=_0x239f10({},M,this[_0x38ec34(0xac)]);this[_0x38ec34(0xaf)][_0x38ec34(0xdc)](z,_0x51087e);}[_0x174a38(0xc3)](){[[f],[g],[S]]['forEach'](_0x3c549a=>{const _0x18eed6=_0x1f81;this[_0x18eed6(0xe5)][_0x18eed6(0xe3)](_0x3c549a);});}['onReady'](){const _0x385660=_0x174a38;this['_injector'][_0x385660(0xba)](g),this[_0x385660(0xe5)][_0x385660(0xba)](S);}};$(b,_0x174a38(0xcc),W),$(b,_0x174a38(0xd6),_0x5cde7f[_0x174a38(0xe4)]),b=ie([_0x16cf16(_0x5e0955,_0x1c0658,_0x552060),w(0x1,_0x558fff(_0x497805)),w(0x2,_0x34cab2)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5d47f7=_0x224b;(function(_0x34b563,_0x5d1c36){const _0x2a423f=_0x224b,_0x4ce73e=_0x34b563();while(!![]){try{const _0x130ba2=-parseInt(_0x2a423f(0x1c8))/0x1+-parseInt(_0x2a423f(0x1c7))/0x2+parseInt(_0x2a423f(0x1fc))/0x3+parseInt(_0x2a423f(0x221))/0x4*(-parseInt(_0x2a423f(0x1d6))/0x5)+parseInt(_0x2a423f(0x1f9))/0x6+-parseInt(_0x2a423f(0x200))/0x7*(-parseInt(_0x2a423f(0x1fe))/0x8)+parseInt(_0x2a423f(0x1e4))/0x9*(parseInt(_0x2a423f(0x1c0))/0xa);if(_0x130ba2===_0x5d1c36)break;else _0x4ce73e['push'](_0x4ce73e['shift']());}catch(_0x2d12d8){_0x4ce73e['push'](_0x4ce73e['shift']());}}}(_0x4a97,0x63c31));import{CommentService as _0x5b5cb2,CollaborationSessionService as _0xff52e3,UniverCollaborationClientPlugin as _0x31a28b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x104cb6}from'@univerjs-pro/license';import{dayjs as _0x4892bc,UserManagerService as _0x4ec60f,Inject as _0x485985,Injector as _0x17ace1,Disposable as _0x3e4cea,CustomRangeType as _0x5108c3,UniverInstanceType as _0x5d649f,DependentOn as _0x5d59fb,IConfigService as _0x253407,Plugin as _0x28570a,merge as _0x43a2d8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x22014a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x508dd5,IThreadCommentDataSourceService as _0x596221}from'@univerjs/thread-comment';import{bufferTime as _0x38892e}from'rxjs';import{HTTPService as _0x166e15}from'@univerjs/network';const W=_0x5d47f7(0x205);var I=(_0x2ad048=>(_0x2ad048[_0x2ad048[_0x5d47f7(0x1e0)]=0x0]=_0x5d47f7(0x1e0),_0x2ad048[_0x2ad048['Solved']=0x1]=_0x5d47f7(0x1f5),_0x2ad048[_0x2ad048[_0x5d47f7(0x1d7)]=-0x1]=_0x5d47f7(0x1d7),_0x2ad048))(I||{}),v=(_0x5893ba=>(_0x5893ba[_0x5893ba['Unknown']=0x0]=_0x5d47f7(0x21e),_0x5893ba[_0x5893ba[_0x5d47f7(0x216)]=0x1]=_0x5d47f7(0x216),_0x5893ba[_0x5893ba[_0x5d47f7(0x20d)]=0x2]=_0x5d47f7(0x20d),_0x5893ba[_0x5893ba[_0x5d47f7(0x1c1)]=0x3]='Edit',_0x5893ba[_0x5893ba[_0x5d47f7(0x1bc)]=0x4]=_0x5d47f7(0x1bc),_0x5893ba[_0x5893ba['Solve']=0x5]=_0x5d47f7(0x1e8),_0x5893ba[_0x5893ba[_0x5d47f7(0x1d7)]=-0x1]=_0x5d47f7(0x1d7),_0x5893ba))(v||{});const D=_0xff3b01=>_0x4892bc(new Date(+_0xff3b01))[_0x5d47f7(0x1e6)](_0x5d47f7(0x1dd)),B=async(_0x18f1c4,_0x31ff46)=>{const _0x196e9e=_0x5d47f7,_0x3b0438=_0x18f1c4[_0x196e9e(0x206)](_0x4ec60f),_0x4256a7=_0x18f1c4[_0x196e9e(0x206)](_0x166e15);_0x31ff46[_0x196e9e(0x20a)](_0x2a8250=>{const _0xd01244=_0x196e9e;_0x3b0438[_0xd01244(0x1ef)](_0x2a8250)&&_0x31ff46['delete'](_0x2a8250);}),_0x31ff46[_0x196e9e(0x1ee)]&&(await _0x4256a7[_0x196e9e(0x206)](_0x196e9e(0x1f3),{'params':{'userIDs':[..._0x31ff46]}}))['body'][_0x196e9e(0x1de)]['forEach'](_0x3142f3=>{const _0x409850=_0x196e9e;_0x3142f3&&_0x3b0438[_0x409850(0x1d4)](_0x3142f3);});};var K=Object[_0x5d47f7(0x219)],V=(_0xe8b149,_0x27a239,_0x13da1c,_0x317ce8)=>{const _0x478706=_0x5d47f7;for(var _0x32e9db=_0x317ce8>0x1?void 0x0:_0x317ce8?K(_0x27a239,_0x13da1c):_0x27a239,_0x294f8c=_0xe8b149[_0x478706(0x1cc)]-0x1,_0x7c295b;_0x294f8c>=0x0;_0x294f8c--)(_0x7c295b=_0xe8b149[_0x294f8c])&&(_0x32e9db=_0x7c295b(_0x32e9db)||_0x32e9db);return _0x32e9db;},p=(_0x3e0ac1,_0x517b08)=>(_0x4e2493,_0x4c3d0a)=>_0x517b08(_0x4e2493,_0x4c3d0a,_0x3e0ac1);let S=class extends _0x3e4cea{constructor(_0x18558d,_0x46a022,_0x7ffe0f,_0x241782){const _0x2ad117=_0x5d47f7;super(),this[_0x2ad117(0x20e)]=_0x18558d,this[_0x2ad117(0x1c3)]=_0x46a022,this[_0x2ad117(0x1f4)]=_0x7ffe0f,this['_injector']=_0x241782,this[_0x2ad117(0x1f8)](),this[_0x2ad117(0x1e3)]();}[_0x5d47f7(0x1e3)](){const _0x389ee9=_0x5d47f7;this[_0x389ee9(0x21b)](this[_0x389ee9(0x1c3)][_0x389ee9(0x1dc)][_0x389ee9(0x211)](_0x38892e(0x10))[_0x389ee9(0x1cb)](_0x28e391=>{const _0x45d5e0=_0x389ee9,_0x588aa5=new Set();_0x28e391['forEach'](_0x2b74e8=>{const _0x2160b3=_0x224b;switch(_0x2b74e8['type']){case _0x2160b3(0x1bb):{const _0x9db2fb=_0x2b74e8[_0x2160b3(0x1ce)][_0x2160b3(0x213)];_0x588aa5[_0x2160b3(0x1bb)](_0x9db2fb);break;}}}),B(this[_0x45d5e0(0x1cd)],_0x588aa5);}));}[_0x5d47f7(0x1f8)](){const _0x43610f=_0x5d47f7;this[_0x43610f(0x21b)](this['_commentService']['commentUpdate$'][_0x43610f(0x1cb)](async _0xd954c1=>{const _0xea04b6=_0x43610f;var _0x2f3c75,_0x11a35b,_0x43385b,_0x3b40c3;const _0x4c3d57=(_0x2f3c75=this['_threadCommentModel']['getUnit'](_0xd954c1[_0xea04b6(0x1c2)])['find'](_0x13cd3d=>_0x13cd3d[_0xea04b6(0x1f2)]===_0xd954c1['threadId']))==null?void 0x0:_0x2f3c75[_0xea04b6(0x1c6)];if(!_0x4c3d57)return;const {unitId:_0x4d4990,subUnitId:_0x31a111}=_0x4c3d57;switch(_0xd954c1[_0xea04b6(0x1fb)]&&this['_userService'][_0xea04b6(0x1d4)](_0xd954c1['user']),_0xd954c1['type']){case v[_0xea04b6(0x216)]:break;case v[_0xea04b6(0x20d)]:{this[_0xea04b6(0x1c3)][_0xea04b6(0x1d2)](_0x4d4990,_0x31a111,{'unitId':_0x4d4990,'subUnitId':_0x31a111,'ref':'','id':_0xd954c1[_0xea04b6(0x1da)],'dT':D(+_0xd954c1[_0xea04b6(0x1ec)]),'threadId':_0xd954c1[_0xea04b6(0x1f2)],'personId':(_0x43385b=(_0x11a35b=_0xd954c1[_0xea04b6(0x1fb)])==null?void 0x0:_0x11a35b[_0xea04b6(0x212)])!=null?_0x43385b:_0xd954c1['userId'],'text':JSON[_0xea04b6(0x1d9)](_0xd954c1['content']),'parentId':_0x4c3d57['id']});break;}case v[_0xea04b6(0x1bc)]:{const _0x25a717=this[_0xea04b6(0x1c3)][_0xea04b6(0x1c9)](_0x4d4990,_0x31a111,_0xd954c1['replyId']);_0x25a717&&_0x25a717[_0xea04b6(0x21f)]&&this[_0xea04b6(0x1c3)][_0xea04b6(0x1f6)](_0x4d4990,_0x31a111,_0xd954c1['replyId']);break;}case v[_0xea04b6(0x1c1)]:{this[_0xea04b6(0x1c3)]['updateComment'](_0x4d4990,_0x31a111,{'commentId':_0xd954c1[_0xea04b6(0x1da)],'text':JSON[_0xea04b6(0x1d9)](_0xd954c1['content'])});break;}case v[_0xea04b6(0x1e8)]:{const _0xc9187=(_0x3b40c3=this[_0xea04b6(0x1c3)][_0xea04b6(0x1ea)](_0xd954c1['unitId'])[_0xea04b6(0x207)](_0x2f12ec=>_0x2f12ec[_0xea04b6(0x1f2)]===_0xd954c1[_0xea04b6(0x1f2)]))==null?void 0x0:_0x3b40c3[_0xea04b6(0x1c6)];_0xc9187&&this[_0xea04b6(0x1c3)][_0xea04b6(0x202)](_0x4d4990,_0x31a111,_0xc9187['id'],_0xd954c1['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x485985(_0x5b5cb2)),p(0x1,_0x485985(_0x508dd5)),p(0x2,_0x485985(_0x4ec60f)),p(0x3,_0x485985(_0x17ace1))],S);const z=_0x5d47f7(0x1ca),M={};var k=Object[_0x5d47f7(0x219)],Q=(_0x2fa068,_0x31385a,_0x47307f,_0x1cb765)=>{const _0x168d28=_0x5d47f7;for(var _0x49129c=_0x1cb765>0x1?void 0x0:_0x1cb765?k(_0x31385a,_0x47307f):_0x31385a,_0x1127c9=_0x2fa068[_0x168d28(0x1cc)]-0x1,_0x364bf5;_0x1127c9>=0x0;_0x1127c9--)(_0x364bf5=_0x2fa068[_0x1127c9])&&(_0x49129c=_0x364bf5(_0x49129c)||_0x49129c);return _0x49129c;},_=(_0x202aea,_0x19ed85)=>(_0x58949b,_0x580c04)=>_0x19ed85(_0x58949b,_0x580c04,_0x202aea);function _0x4a97(){const _0x23bda0=['setConfig','requireSession','listComments','70yCuEHH','Edit','unitId','_threadCommentModel','rangeId','_config','root','1489384LJXPSo','743096EoCseq','getComment','thread-comment-data-source.config','subscribe','length','_injector','payload','_configService','code','COMMENT','addComment','error','addUser','dataSource','8815uzAPHn','UNRECOGNIZED','_threadCommentDataSource','parse','replyId','symbol','commentUpdate$','YYYY/MM/DD\x20HH:mm','users','solved','OpenOrReOpen','getMemberID','UNIVER_UNKNOWN','_initUserSync','1422585MeTzuE','defineProperty','format','userId','Solve','values','getUnit','map','createTimestamp','_httpService','size','getUser','filter','syncUpdateMutationToColla','threadId','/universer-api/user/list','_userService','Solved','deleteComment','rangeType','_init','2356656YijQem','saveCommentToSnapshot','user','1963389OFDTFN','/delete','16rVwNjf','content','808745NVGwig','/solved','resolveComment','pluginName','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','find','/edit','type','forEach','_sessionService','customRanges','Reply','_commentService','/reply','/universer-api/comment/unit/','pipe','userID','personId','ref','resolved','Add','/list','stringify','getOwnPropertyDescriptor','replies','disposeWithMe','post','_threadCommentDataSourceService','Unknown','parentId','/add','1108oisWBF','body','add','Delete'];_0x4a97=function(){return _0x23bda0;};return _0x4a97();}function X(_0x2853ff,_0x4efc93){const _0x39877e=_0x5d47f7,_0x1ad1dd=_0x2853ff[_0x39877e(0x21a)][0x0];return{..._0x4efc93,'id':_0x1ad1dd[_0x39877e(0x1da)],'resolved':_0x2853ff[_0x39877e(0x1df)]===0x1,'dT':D(_0x1ad1dd[_0x39877e(0x1ec)]),'personId':_0x1ad1dd[_0x39877e(0x1e7)],'threadId':_0x1ad1dd[_0x39877e(0x1f2)]};}function ee(_0x161cf9,_0x104e35,_0x33390b){const _0x4e3082=_0x5d47f7;var _0x52b2c2,_0x2e7d0c;if(((_0x2e7d0c=(_0x52b2c2=_0x161cf9==null?void 0x0:_0x161cf9[_0x4e3082(0x21a)])==null?void 0x0:_0x52b2c2['length'])!=null?_0x2e7d0c:0x0)>0x0){const _0x5c1f53=(_0x843475,_0xc7a9b5)=>({'id':_0x843475[_0x4e3082(0x1da)],'threadId':_0x843475[_0x4e3082(0x1f2)],'dT':D(_0x843475[_0x4e3082(0x1ec)]),'personId':_0x843475['userId'],'resolved':_0x161cf9[_0x4e3082(0x1df)]===I['Solved'],'unitId':_0x104e35,'subUnitId':_0x33390b,'text':JSON[_0x4e3082(0x1d9)](_0x843475[_0x4e3082(0x1ff)]),'parentId':_0xc7a9b5}),_0xd4ae6f=_0x5c1f53(_0x161cf9[_0x4e3082(0x21a)][0x0]);return{..._0xd4ae6f,'children':_0x161cf9[_0x4e3082(0x21a)]['slice'](0x1)[_0x4e3082(0x1eb)](_0x4108fe=>_0x5c1f53(_0x4108fe,_0xd4ae6f['id']))};}return null;}let f=class{constructor(_0x5f578d,_0x4fd9fe,_0x45f46e,_0x586ae3){const _0x3e06e9=_0x5d47f7;this[_0x3e06e9(0x1ed)]=_0x5f578d,this[_0x3e06e9(0x1f4)]=_0x4fd9fe,this['_sessionService']=_0x45f46e,this[_0x3e06e9(0x1cd)]=_0x586ae3;}async[_0x5d47f7(0x1d2)](_0x517c38){const _0x300896=_0x5d47f7;var _0x1d5f83,_0x2302dc;const {parentId:_0x59487b,unitId:_0x5b6976,text:_0x1d06c8,threadId:_0x515c10}=_0x517c38,_0x14de92=(_0x2302dc=(_0x1d5f83=_0x1d06c8[_0x300896(0x20c)])==null?void 0x0:_0x1d5f83[_0x300896(0x1f0)](_0x57cab6=>_0x57cab6[_0x300896(0x1f7)]===_0x5108c3[_0x300896(0x1d1)])[_0x300896(0x1eb)](_0x2be1de=>_0x2be1de[_0x300896(0x1c4)]))!=null?_0x2302dc:[],_0x2a1650=JSON[_0x300896(0x218)](_0x1d06c8),_0x50a64d=(await this[_0x300896(0x20b)][_0x300896(0x1be)](_0x5b6976))[_0x300896(0x1e1)]();if(_0x59487b){const _0xfa2b35={'memberId':_0x50a64d,'unitId':_0x5b6976,'content':_0x2a1650,'mention':_0x14de92,'threadId':_0x515c10},_0x1bb879=(await this[_0x300896(0x1ed)][_0x300896(0x21c)](_0x300896(0x210)+_0x5b6976+_0x300896(0x20f),{'body':_0xfa2b35}))[_0x300896(0x222)]['reply'];return{..._0x517c38,'id':_0x1bb879['replyId'],'dT':_0x4892bc(+_0x1bb879[_0x300896(0x1ec)])[_0x300896(0x1e6)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1bb879[_0x300896(0x1e7)]};}else{const _0x230492={'memberId':_0x50a64d,'unitId':_0x5b6976,'content':_0x2a1650,'mention':_0x14de92},_0x4593bc=await this[_0x300896(0x1ed)][_0x300896(0x21c)](_0x300896(0x210)+_0x5b6976+_0x300896(0x220),{'body':_0x230492});return X(_0x4593bc[_0x300896(0x222)]['comment'],_0x517c38);}}async['updateComment'](_0x1d667a){const _0xe37e36=_0x5d47f7;var _0x2152b5,_0x25abb1;const {text:_0x4d99a3,unitId:_0x57573e}=_0x1d667a,_0x2c8c74=(_0x25abb1=(_0x2152b5=_0x4d99a3[_0xe37e36(0x20c)])==null?void 0x0:_0x2152b5[_0xe37e36(0x1f0)](_0xf05851=>_0xf05851[_0xe37e36(0x1f7)]===_0x5108c3[_0xe37e36(0x1d1)])[_0xe37e36(0x1eb)](_0x287918=>_0x287918[_0xe37e36(0x1c4)]))!=null?_0x25abb1:[],_0x3be6e3=JSON[_0xe37e36(0x218)](_0x4d99a3),_0x314092=_0x1d667a[_0xe37e36(0x1f2)],_0x40d215=_0x1d667a['id'],_0x3da70f={'memberId':(await this[_0xe37e36(0x20b)]['requireSession'](_0x57573e))[_0xe37e36(0x1e1)](),'unitId':_0x57573e,'threadId':_0x314092,'mention':_0x2c8c74,'content':_0x3be6e3,'replyId':_0x40d215},_0x2a8f82=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x57573e+_0xe37e36(0x208),{'body':_0x3da70f});return!_0x2a8f82[_0xe37e36(0x222)]['error']||_0x2a8f82[_0xe37e36(0x222)][_0xe37e36(0x1d3)][_0xe37e36(0x1d0)]===0x1;}async['resolveComment'](_0x253ac0){const _0x1f870a=_0x5d47f7,{unitId:_0x4ed73d}=_0x253ac0,_0x4a0286=_0x253ac0[_0x1f870a(0x1f2)],_0x14d47d={'memberId':this[_0x1f870a(0x1f4)]['getCurrentUser']()[_0x1f870a(0x212)],'unitId':_0x4ed73d,'threadId':_0x4a0286,'solved':_0x253ac0[_0x1f870a(0x215)]?I['Solved']:I[_0x1f870a(0x1e0)]},_0x2db48f=await this[_0x1f870a(0x1ed)][_0x1f870a(0x21c)](_0x1f870a(0x210)+_0x4ed73d+_0x1f870a(0x201),{'body':_0x14d47d});return!_0x2db48f['body'][_0x1f870a(0x1d3)]||_0x2db48f[_0x1f870a(0x222)][_0x1f870a(0x1d3)][_0x1f870a(0x1d0)]===0x1;}async[_0x5d47f7(0x1f6)](_0x59f5c7,_0x69c44a,_0x1d96a0,_0x4d92dc){const _0xb5c3f6=_0x5d47f7,_0x49f40e={'memberId':(await this[_0xb5c3f6(0x20b)][_0xb5c3f6(0x1be)](_0x59f5c7))[_0xb5c3f6(0x1e1)](),'threadId':_0x1d96a0,'replyId':_0x4d92dc,'unitId':_0x59f5c7},_0x167d5e=await this['_httpService'][_0xb5c3f6(0x21c)](_0xb5c3f6(0x210)+_0x59f5c7+_0xb5c3f6(0x1fd),{'body':_0x49f40e});return!_0x167d5e[_0xb5c3f6(0x222)]['error']||_0x167d5e[_0xb5c3f6(0x222)][_0xb5c3f6(0x1d3)][_0xb5c3f6(0x1d0)]===0x1;}async[_0x5d47f7(0x1bf)](_0x43e237,_0x4df04e,_0xda9039){const _0x3615fc=_0x5d47f7,_0x3fcdda={'unitId':_0x43e237,'threadId':_0xda9039},_0x1245d0=await this[_0x3615fc(0x1ed)][_0x3615fc(0x21c)](_0x3615fc(0x210)+_0x43e237+_0x3615fc(0x217),{'body':_0x3fcdda}),_0x4ebe4f=_0xda9039[_0x3615fc(0x1eb)](_0x5aa8b4=>ee(_0x1245d0[_0x3615fc(0x222)][_0x3615fc(0x204)][_0x5aa8b4],_0x43e237,_0x4df04e))[_0x3615fc(0x1f0)](Boolean);return Object[_0x3615fc(0x1e9)](_0x1245d0[_0x3615fc(0x222)]['users'])[_0x3615fc(0x20a)](_0xd59a04=>{const _0x136ac4=_0x3615fc;this[_0x136ac4(0x1f4)]['addUser'](_0xd59a04);}),_0x4ebe4f;}[_0x5d47f7(0x1fa)](_0x140357){const _0x2f3ba3=_0x5d47f7;return{'id':_0x140357['id'],'threadId':_0x140357[_0x2f3ba3(0x1f2)],'ref':_0x140357[_0x2f3ba3(0x214)]};}};f=Q([_(0x0,_0x485985(_0x166e15)),_(0x1,_0x485985(_0x4ec60f)),_(0x2,_0x485985(_0xff52e3)),_(0x3,_0x485985(_0x17ace1))],f);var re=Object[_0x5d47f7(0x219)],te=(_0x350f38,_0x57aaa4,_0x1003f5,_0x442795)=>{for(var _0x44c311=_0x442795>0x1?void 0x0:_0x442795?re(_0x57aaa4,_0x1003f5):_0x57aaa4,_0x363e11=_0x350f38['length']-0x1,_0x41c654;_0x363e11>=0x0;_0x363e11--)(_0x41c654=_0x350f38[_0x363e11])&&(_0x44c311=_0x41c654(_0x44c311)||_0x44c311);return _0x44c311;},N=(_0x1e6260,_0x5d7b47)=>(_0x4caee4,_0x59fb72)=>_0x5d7b47(_0x4caee4,_0x59fb72,_0x1e6260);function _0x224b(_0x1bfbe0,_0x324bfb){const _0x4a975f=_0x4a97();return _0x224b=function(_0x224b7e,_0x1aa131){_0x224b7e=_0x224b7e-0x1bb;let _0x1c5243=_0x4a975f[_0x224b7e];return _0x1c5243;},_0x224b(_0x1bfbe0,_0x324bfb);}let g=class extends _0x3e4cea{constructor(_0x32c99c,_0xa2b5c3){const _0x2cb612=_0x5d47f7;super(),this['_threadCommentDataSourceService']=_0x32c99c,this[_0x2cb612(0x1d8)]=_0xa2b5c3,this['_initDataSource']();}['_initDataSource'](){const _0x301852=_0x5d47f7;this[_0x301852(0x21d)][_0x301852(0x1d5)]=this[_0x301852(0x1d8)],this[_0x301852(0x21d)][_0x301852(0x1f1)]=!0x1;}};g=te([N(0x0,_0x596221),N(0x1,_0x485985(f))],g);var se=Object[_0x5d47f7(0x1e5)],oe=Object[_0x5d47f7(0x219)],ne=(_0x667073,_0x4b235e,_0x3f9984)=>_0x4b235e in _0x667073?se(_0x667073,_0x4b235e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3f9984}):_0x667073[_0x4b235e]=_0x3f9984,ie=(_0x3a53f7,_0x2f87f1,_0x1065a5,_0x4e2ab)=>{const _0x2cc0ff=_0x5d47f7;for(var _0xb72658=_0x4e2ab>0x1?void 0x0:_0x4e2ab?oe(_0x2f87f1,_0x1065a5):_0x2f87f1,_0x531771=_0x3a53f7[_0x2cc0ff(0x1cc)]-0x1,_0x549758;_0x531771>=0x0;_0x531771--)(_0x549758=_0x3a53f7[_0x531771])&&(_0xb72658=_0x549758(_0xb72658)||_0xb72658);return _0xb72658;},w=(_0x77fef1,_0x2e63b6)=>(_0x4a806f,_0x3e6a5b)=>_0x2e63b6(_0x4a806f,_0x3e6a5b,_0x77fef1),$=(_0x37545b,_0x33f974,_0x59e734)=>ne(_0x37545b,typeof _0x33f974!=_0x5d47f7(0x1db)?_0x33f974+'':_0x33f974,_0x59e734);let b=class extends _0x28570a{constructor(_0x924144=M,_0x3994e0,_0x366957){const _0x1c068d=_0x5d47f7;super(),this[_0x1c068d(0x1c5)]=_0x924144,this[_0x1c068d(0x1cd)]=_0x3994e0,this['_configService']=_0x366957;const {..._0x4d7eef}=_0x43a2d8({},M,this[_0x1c068d(0x1c5)]);this[_0x1c068d(0x1cf)][_0x1c068d(0x1bd)](z,_0x4d7eef);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x116fd0=>{const _0x37d78d=_0x224b;this[_0x37d78d(0x1cd)][_0x37d78d(0x1bb)](_0x116fd0);});}['onReady'](){const _0x4ba9b8=_0x5d47f7;this[_0x4ba9b8(0x1cd)]['get'](g),this[_0x4ba9b8(0x1cd)][_0x4ba9b8(0x206)](S);}};$(b,_0x5d47f7(0x203),W),$(b,_0x5d47f7(0x209),_0x5d649f[_0x5d47f7(0x1e2)]),b=ie([_0x5d59fb(_0x22014a,_0x31a28b,_0x104cb6),w(0x1,_0x485985(_0x17ace1)),w(0x2,_0x253407)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x174a38=_0x1f81;(function(_0x3177d9,_0x3b0693){const _0x3f4739=_0x1f81,_0x5ca7a0=_0x3177d9();while(!![]){try{const _0x10f980=parseInt(_0x3f4739(0xa1))/0x1*(-parseInt(_0x3f4739(0x9b))/0x2)+parseInt(_0x3f4739(0xd7))/0x3+parseInt(_0x3f4739(0xc4))/0x4*(parseInt(_0x3f4739(0xc8))/0x5)+parseInt(_0x3f4739(0xc7))/0x6*(-parseInt(_0x3f4739(0xb2))/0x7)+-parseInt(_0x3f4739(0xe8))/0x8*(-parseInt(_0x3f4739(0xdf))/0x9)+-parseInt(_0x3f4739(0xb1))/0xa*(parseInt(_0x3f4739(0xca))/0xb)+parseInt(_0x3f4739(0xa0))/0xc;if(_0x10f980===_0x3b0693)break;else _0x5ca7a0['push'](_0x5ca7a0['shift']());}catch(_0x1b1f6f){_0x5ca7a0['push'](_0x5ca7a0['shift']());}}}(_0x3059,0xf1852));import{CommentService as _0x2f2e9e,CollaborationSessionService as _0x487023,UniverCollaborationClientPlugin as _0x1c0658}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x552060}from'@univerjs-pro/license';import{dayjs as _0x5a07fa,UserManagerService as _0x1bfd5b,Inject as _0x558fff,Injector as _0x497805,Disposable as _0x4d9099,CustomRangeType as _0x715877,UniverInstanceType as _0x5cde7f,DependentOn as _0x16cf16,IConfigService as _0x34cab2,Plugin as _0x1ba826,merge as _0x239f10}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e0955}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x188ba0,IThreadCommentDataSourceService as _0x1ab4ba}from'@univerjs/thread-comment';import{bufferTime as _0x21deb5}from'rxjs';import{HTTPService as _0x1cc5be}from'@univerjs/network';const W=_0x174a38(0xb6);var I=(_0x30648c=>(_0x30648c[_0x30648c[_0x174a38(0xab)]=0x0]=_0x174a38(0xab),_0x30648c[_0x30648c[_0x174a38(0xbc)]=0x1]='Solved',_0x30648c[_0x30648c[_0x174a38(0xef)]=-0x1]='UNRECOGNIZED',_0x30648c))(I||{}),v=(_0x488274=>(_0x488274[_0x488274[_0x174a38(0xeb)]=0x0]=_0x174a38(0xeb),_0x488274[_0x488274[_0x174a38(0xf1)]=0x1]='Add',_0x488274[_0x488274[_0x174a38(0xb4)]=0x2]=_0x174a38(0xb4),_0x488274[_0x488274[_0x174a38(0xf2)]=0x3]=_0x174a38(0xf2),_0x488274[_0x488274[_0x174a38(0xa4)]=0x4]=_0x174a38(0xa4),_0x488274[_0x488274[_0x174a38(0xd0)]=0x5]=_0x174a38(0xd0),_0x488274[_0x488274[_0x174a38(0xef)]=-0x1]=_0x174a38(0xef),_0x488274))(v||{});const D=_0x320ec1=>_0x5a07fa(new Date(+_0x320ec1))[_0x174a38(0xea)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x227bdf,_0x407f84)=>{const _0x4ede25=_0x174a38,_0x934775=_0x227bdf['get'](_0x1bfd5b),_0x16c6b9=_0x227bdf[_0x4ede25(0xba)](_0x1cc5be);_0x407f84['forEach'](_0x1bd805=>{const _0x558465=_0x4ede25;_0x934775[_0x558465(0xc2)](_0x1bd805)&&_0x407f84[_0x558465(0xa8)](_0x1bd805);}),_0x407f84[_0x4ede25(0xa9)]&&(await _0x16c6b9[_0x4ede25(0xba)]('/universer-api/user/list',{'params':{'userIDs':[..._0x407f84]}}))[_0x4ede25(0xf0)][_0x4ede25(0x9f)][_0x4ede25(0xc5)](_0x46068d=>{const _0x347d57=_0x4ede25;_0x46068d&&_0x934775[_0x347d57(0x96)](_0x46068d);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x39e1d4,_0x6f11e9,_0x2733ca,_0x14ed6e)=>{const _0x2f254b=_0x174a38;for(var _0x40bd79=_0x14ed6e>0x1?void 0x0:_0x14ed6e?K(_0x6f11e9,_0x2733ca):_0x6f11e9,_0x1b1414=_0x39e1d4[_0x2f254b(0x94)]-0x1,_0x4e6669;_0x1b1414>=0x0;_0x1b1414--)(_0x4e6669=_0x39e1d4[_0x1b1414])&&(_0x40bd79=_0x4e6669(_0x40bd79)||_0x40bd79);return _0x40bd79;},p=(_0x513513,_0x2bdeb4)=>(_0x5f5c37,_0x284b36)=>_0x2bdeb4(_0x5f5c37,_0x284b36,_0x513513);let S=class extends _0x4d9099{constructor(_0x44244a,_0x33ba19,_0x2b8046,_0x2439b4){const _0x11f5fb=_0x174a38;super(),this['_commentService']=_0x44244a,this['_threadCommentModel']=_0x33ba19,this[_0x11f5fb(0xde)]=_0x2b8046,this[_0x11f5fb(0xe5)]=_0x2439b4,this[_0x11f5fb(0xf5)](),this[_0x11f5fb(0xcd)]();}[_0x174a38(0xcd)](){const _0x358312=_0x174a38;this['disposeWithMe'](this[_0x358312(0xf7)][_0x358312(0xb5)][_0x358312(0xcf)](_0x21deb5(0x10))[_0x358312(0xc0)](_0x44cda7=>{const _0x2495d4=new Set();_0x44cda7['forEach'](_0x478ad2=>{const _0x5867fa=_0x1f81;switch(_0x478ad2[_0x5867fa(0xd6)]){case'add':{const _0x1bae8b=_0x478ad2[_0x5867fa(0xed)][_0x5867fa(0xcb)];_0x2495d4[_0x5867fa(0xe3)](_0x1bae8b);break;}}}),B(this['_injector'],_0x2495d4);}));}[_0x174a38(0xf5)](){const _0x1f42a9=_0x174a38;this[_0x1f42a9(0xbe)](this[_0x1f42a9(0xe2)][_0x1f42a9(0xb5)][_0x1f42a9(0xc0)](async _0x1586b0=>{const _0xd0e96d=_0x1f42a9;var _0x5b62a1,_0x58d708,_0x15bafe,_0x105f42;const _0x34f9ab=(_0x5b62a1=this[_0xd0e96d(0xf7)]['getUnit'](_0x1586b0[_0xd0e96d(0xdb)])['find'](_0x25cdd4=>_0x25cdd4['threadId']===_0x1586b0[_0xd0e96d(0xa5)]))==null?void 0x0:_0x5b62a1[_0xd0e96d(0x9d)];if(!_0x34f9ab)return;const {unitId:_0x5b7886,subUnitId:_0x3738a4}=_0x34f9ab;switch(_0x1586b0[_0xd0e96d(0x92)]&&this[_0xd0e96d(0xde)][_0xd0e96d(0x96)](_0x1586b0['user']),_0x1586b0[_0xd0e96d(0xd6)]){case v[_0xd0e96d(0xf1)]:break;case v[_0xd0e96d(0xb4)]:{this[_0xd0e96d(0xf7)]['addComment'](_0x5b7886,_0x3738a4,{'unitId':_0x5b7886,'subUnitId':_0x3738a4,'ref':'','id':_0x1586b0[_0xd0e96d(0xe7)],'dT':D(+_0x1586b0['createTimestamp']),'threadId':_0x1586b0['threadId'],'personId':(_0x15bafe=(_0x58d708=_0x1586b0['user'])==null?void 0x0:_0x58d708[_0xd0e96d(0xb0)])!=null?_0x15bafe:_0x1586b0[_0xd0e96d(0xad)],'text':JSON[_0xd0e96d(0xf6)](_0x1586b0[_0xd0e96d(0xee)]),'parentId':_0x34f9ab['id']});break;}case v[_0xd0e96d(0xa4)]:{const _0x3ffcfc=this[_0xd0e96d(0xf7)]['getComment'](_0x5b7886,_0x3738a4,_0x1586b0[_0xd0e96d(0xe7)]);_0x3ffcfc&&_0x3ffcfc['parentId']&&this[_0xd0e96d(0xf7)][_0xd0e96d(0xbf)](_0x5b7886,_0x3738a4,_0x1586b0['replyId']);break;}case v[_0xd0e96d(0xf2)]:{this[_0xd0e96d(0xf7)][_0xd0e96d(0x93)](_0x5b7886,_0x3738a4,{'commentId':_0x1586b0['replyId'],'text':JSON[_0xd0e96d(0xf6)](_0x1586b0[_0xd0e96d(0xee)])});break;}case v[_0xd0e96d(0xd0)]:{const _0x8386e4=(_0x105f42=this[_0xd0e96d(0xf7)][_0xd0e96d(0xf3)](_0x1586b0['unitId'])[_0xd0e96d(0xd1)](_0x37e030=>_0x37e030[_0xd0e96d(0xa5)]===_0x1586b0[_0xd0e96d(0xa5)]))==null?void 0x0:_0x105f42['root'];_0x8386e4&&this['_threadCommentModel']['resolveComment'](_0x5b7886,_0x3738a4,_0x8386e4['id'],_0x1586b0[_0xd0e96d(0xd5)]===I['Solved']);break;}}}));}};function _0x1f81(_0x2663e5,_0x4feef4){const _0x30593f=_0x3059();return _0x1f81=function(_0x1f8197,_0x31d14d){_0x1f8197=_0x1f8197-0x92;let _0x54272c=_0x30593f[_0x1f8197];return _0x54272c;},_0x1f81(_0x2663e5,_0x4feef4);}S=V([p(0x0,_0x558fff(_0x2f2e9e)),p(0x1,_0x558fff(_0x188ba0)),p(0x2,_0x558fff(_0x1bfd5b)),p(0x3,_0x558fff(_0x497805))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x174a38(0xb7)],Q=(_0x26b5d0,_0x355da4,_0x218280,_0x19109c)=>{const _0x21c970=_0x174a38;for(var _0x4da9ac=_0x19109c>0x1?void 0x0:_0x19109c?k(_0x355da4,_0x218280):_0x355da4,_0x3b412b=_0x26b5d0[_0x21c970(0x94)]-0x1,_0x44c32b;_0x3b412b>=0x0;_0x3b412b--)(_0x44c32b=_0x26b5d0[_0x3b412b])&&(_0x4da9ac=_0x44c32b(_0x4da9ac)||_0x4da9ac);return _0x4da9ac;},_=(_0x45bb31,_0x1c5853)=>(_0x1acf23,_0x29cd99)=>_0x1c5853(_0x1acf23,_0x29cd99,_0x45bb31);function X(_0x55fab7,_0x2fbb1f){const _0x15f9dd=_0x174a38,_0x459de3=_0x55fab7[_0x15f9dd(0xf8)][0x0];return{..._0x2fbb1f,'id':_0x459de3[_0x15f9dd(0xe7)],'resolved':_0x55fab7['solved']===0x1,'dT':D(_0x459de3[_0x15f9dd(0x9c)]),'personId':_0x459de3['userId'],'threadId':_0x459de3[_0x15f9dd(0xa5)]};}function ee(_0x428f60,_0x1329d0,_0x1d1b38){const _0x1952aa=_0x174a38;var _0x5be968,_0x35a762;if(((_0x35a762=(_0x5be968=_0x428f60==null?void 0x0:_0x428f60[_0x1952aa(0xf8)])==null?void 0x0:_0x5be968[_0x1952aa(0x94)])!=null?_0x35a762:0x0)>0x0){const _0x2ea6e3=(_0x46cafb,_0x1d10a2)=>({'id':_0x46cafb['replyId'],'threadId':_0x46cafb[_0x1952aa(0xa5)],'dT':D(_0x46cafb['createTimestamp']),'personId':_0x46cafb[_0x1952aa(0xad)],'resolved':_0x428f60[_0x1952aa(0xd5)]===I[_0x1952aa(0xbc)],'unitId':_0x1329d0,'subUnitId':_0x1d1b38,'text':JSON['parse'](_0x46cafb[_0x1952aa(0xee)]),'parentId':_0x1d10a2}),_0xbfaf11=_0x2ea6e3(_0x428f60[_0x1952aa(0xf8)][0x0]);return{..._0xbfaf11,'children':_0x428f60[_0x1952aa(0xf8)][_0x1952aa(0xa6)](0x1)[_0x1952aa(0xe1)](_0x372eab=>_0x2ea6e3(_0x372eab,_0xbfaf11['id']))};}return null;}let f=class{constructor(_0xb3554e,_0x9bb8b2,_0x1f7b40,_0x3623a2){const _0x2be56f=_0x174a38;this['_httpService']=_0xb3554e,this[_0x2be56f(0xde)]=_0x9bb8b2,this[_0x2be56f(0xdd)]=_0x1f7b40,this[_0x2be56f(0xe5)]=_0x3623a2;}async[_0x174a38(0xaa)](_0x3c12a9){const _0x30e90b=_0x174a38;var _0xdb65a9,_0x548738;const {parentId:_0x3434ad,unitId:_0x45277d,text:_0x579de9,threadId:_0xa12bc9}=_0x3c12a9,_0x3d5a53=(_0x548738=(_0xdb65a9=_0x579de9[_0x30e90b(0xa2)])==null?void 0x0:_0xdb65a9[_0x30e90b(0xb9)](_0x193d32=>_0x193d32[_0x30e90b(0x9a)]===_0x715877['COMMENT'])[_0x30e90b(0xe1)](_0x287359=>_0x287359[_0x30e90b(0xc9)]))!=null?_0x548738:[],_0x52a5c1=JSON[_0x30e90b(0x99)](_0x579de9),_0x84a52f=(await this['_sessionService'][_0x30e90b(0xd9)](_0x45277d))[_0x30e90b(0xf4)]();if(_0x3434ad){const _0x11a516={'memberId':_0x84a52f,'unitId':_0x45277d,'content':_0x52a5c1,'mention':_0x3d5a53,'threadId':_0xa12bc9},_0x5f0fe1=(await this[_0x30e90b(0xa7)][_0x30e90b(0xbd)](_0x30e90b(0xc6)+_0x45277d+_0x30e90b(0x9e),{'body':_0x11a516}))[_0x30e90b(0xf0)]['reply'];return{..._0x3c12a9,'id':_0x5f0fe1['replyId'],'dT':_0x5a07fa(+_0x5f0fe1[_0x30e90b(0x9c)])[_0x30e90b(0xea)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5f0fe1['userId']};}else{const _0xd64940={'memberId':_0x84a52f,'unitId':_0x45277d,'content':_0x52a5c1,'mention':_0x3d5a53},_0x2813da=await this[_0x30e90b(0xa7)][_0x30e90b(0xbd)](_0x30e90b(0xc6)+_0x45277d+'/add',{'body':_0xd64940});return X(_0x2813da[_0x30e90b(0xf0)][_0x30e90b(0xb3)],_0x3c12a9);}}async['updateComment'](_0x5b4763){const _0x3e5196=_0x174a38;var _0x4bb9b2,_0x4ffb5b;const {text:_0x247ba0,unitId:_0x2cda72}=_0x5b4763,_0x1756d9=(_0x4ffb5b=(_0x4bb9b2=_0x247ba0[_0x3e5196(0xa2)])==null?void 0x0:_0x4bb9b2['filter'](_0x4ca286=>_0x4ca286[_0x3e5196(0x9a)]===_0x715877[_0x3e5196(0x95)])[_0x3e5196(0xe1)](_0x4fabed=>_0x4fabed[_0x3e5196(0xc9)]))!=null?_0x4ffb5b:[],_0x3a71e1=JSON[_0x3e5196(0x99)](_0x247ba0),_0x557e25=_0x5b4763[_0x3e5196(0xa5)],_0x12ae54=_0x5b4763['id'],_0x1c5c80={'memberId':(await this['_sessionService'][_0x3e5196(0xd9)](_0x2cda72))[_0x3e5196(0xf4)](),'unitId':_0x2cda72,'threadId':_0x557e25,'mention':_0x1756d9,'content':_0x3a71e1,'replyId':_0x12ae54},_0x10d062=await this['_httpService'][_0x3e5196(0xbd)](_0x3e5196(0xc6)+_0x2cda72+_0x3e5196(0xe6),{'body':_0x1c5c80});return!_0x10d062['body'][_0x3e5196(0xe0)]||_0x10d062['body'][_0x3e5196(0xe0)]['code']===0x1;}async[_0x174a38(0xb8)](_0x39a518){const _0x45c6a9=_0x174a38,{unitId:_0x2aea30}=_0x39a518,_0x115c22=_0x39a518[_0x45c6a9(0xa5)],_0x17ffcd={'memberId':this[_0x45c6a9(0xde)][_0x45c6a9(0xec)]()['userID'],'unitId':_0x2aea30,'threadId':_0x115c22,'solved':_0x39a518[_0x45c6a9(0xa3)]?I[_0x45c6a9(0xbc)]:I[_0x45c6a9(0xab)]},_0x19d37a=await this[_0x45c6a9(0xa7)]['post'](_0x45c6a9(0xc6)+_0x2aea30+_0x45c6a9(0xda),{'body':_0x17ffcd});return!_0x19d37a[_0x45c6a9(0xf0)][_0x45c6a9(0xe0)]||_0x19d37a[_0x45c6a9(0xf0)][_0x45c6a9(0xe0)][_0x45c6a9(0xe9)]===0x1;}async[_0x174a38(0xbf)](_0xcc389e,_0x29b4ff,_0x3bc1bb,_0x22343f){const _0x40d8d5=_0x174a38,_0x1ba347={'memberId':(await this['_sessionService'][_0x40d8d5(0xd9)](_0xcc389e))[_0x40d8d5(0xf4)](),'threadId':_0x3bc1bb,'replyId':_0x22343f,'unitId':_0xcc389e},_0x4c467a=await this[_0x40d8d5(0xa7)][_0x40d8d5(0xbd)](_0x40d8d5(0xc6)+_0xcc389e+_0x40d8d5(0xae),{'body':_0x1ba347});return!_0x4c467a[_0x40d8d5(0xf0)][_0x40d8d5(0xe0)]||_0x4c467a[_0x40d8d5(0xf0)][_0x40d8d5(0xe0)][_0x40d8d5(0xe9)]===0x1;}async['listComments'](_0x4b0b10,_0x50ecd4,_0x148b3d){const _0x540628=_0x174a38,_0x18d6d1={'unitId':_0x4b0b10,'threadId':_0x148b3d},_0x3741de=await this[_0x540628(0xa7)][_0x540628(0xbd)](_0x540628(0xc6)+_0x4b0b10+_0x540628(0xd3),{'body':_0x18d6d1}),_0x1225fd=_0x148b3d['map'](_0x49e938=>ee(_0x3741de[_0x540628(0xf0)]['comments'][_0x49e938],_0x4b0b10,_0x50ecd4))[_0x540628(0xb9)](Boolean);return Object['values'](_0x3741de[_0x540628(0xf0)][_0x540628(0x9f)])[_0x540628(0xc5)](_0x643e77=>{const _0x3f323b=_0x540628;this[_0x3f323b(0xde)]['addUser'](_0x643e77);}),_0x1225fd;}[_0x174a38(0xce)](_0x56914a){return{'id':_0x56914a['id'],'threadId':_0x56914a['threadId'],'ref':_0x56914a['ref']};}};f=Q([_(0x0,_0x558fff(_0x1cc5be)),_(0x1,_0x558fff(_0x1bfd5b)),_(0x2,_0x558fff(_0x487023)),_(0x3,_0x558fff(_0x497805))],f);var re=Object[_0x174a38(0xb7)],te=(_0x9e478,_0xc406d8,_0x2e7743,_0x1aaa78)=>{const _0x3c86d8=_0x174a38;for(var _0x1cc30c=_0x1aaa78>0x1?void 0x0:_0x1aaa78?re(_0xc406d8,_0x2e7743):_0xc406d8,_0x2150cc=_0x9e478[_0x3c86d8(0x94)]-0x1,_0x5ad99d;_0x2150cc>=0x0;_0x2150cc--)(_0x5ad99d=_0x9e478[_0x2150cc])&&(_0x1cc30c=_0x5ad99d(_0x1cc30c)||_0x1cc30c);return _0x1cc30c;},N=(_0x265574,_0x264495)=>(_0x255d78,_0x571333)=>_0x264495(_0x255d78,_0x571333,_0x265574);function _0x3059(){const _0x2e4bdf=['_sessionService','_userService','297SFgjUJ','error','map','_commentService','add','UNIVER_UNKNOWN','_injector','/edit','replyId','374480HWcBHB','code','format','Unknown','getCurrentUser','payload','content','UNRECOGNIZED','body','Add','Edit','getUnit','getMemberID','_init','parse','_threadCommentModel','replies','user','updateComment','length','COMMENT','addUser','syncUpdateMutationToColla','defineProperty','stringify','rangeType','2444zOstBq','createTimestamp','root','/reply','users','6549720TzBqXy','569fwOJbi','customRanges','resolved','Delete','threadId','slice','_httpService','delete','size','addComment','OpenOrReOpen','_config','userId','/delete','_configService','userID','1379320xKcjro','7UYDAaW','comment','Reply','commentUpdate$','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','resolveComment','filter','get','_threadCommentDataSourceService','Solved','post','disposeWithMe','deleteComment','subscribe','symbol','getUser','onStarting','21932FvYfnQ','forEach','/universer-api/comment/unit/','9856842pnwnLx','215toASyi','rangeId','11XNZheR','personId','pluginName','_initUserSync','saveCommentToSnapshot','pipe','Solve','find','_initDataSource','/list','dataSource','solved','type','3417042vsHzIc','_threadCommentDataSource','requireSession','/solved','unitId','setConfig'];_0x3059=function(){return _0x2e4bdf;};return _0x3059();}let g=class extends _0x4d9099{constructor(_0x357780,_0x4148c7){const _0x37e2f0=_0x174a38;super(),this['_threadCommentDataSourceService']=_0x357780,this[_0x37e2f0(0xd8)]=_0x4148c7,this['_initDataSource']();}[_0x174a38(0xd2)](){const _0x2c90e1=_0x174a38;this[_0x2c90e1(0xbb)][_0x2c90e1(0xd4)]=this['_threadCommentDataSource'],this[_0x2c90e1(0xbb)][_0x2c90e1(0x97)]=!0x1;}};g=te([N(0x0,_0x1ab4ba),N(0x1,_0x558fff(f))],g);var se=Object[_0x174a38(0x98)],oe=Object[_0x174a38(0xb7)],ne=(_0x41f721,_0x2813eb,_0x253ceb)=>_0x2813eb in _0x41f721?se(_0x41f721,_0x2813eb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x253ceb}):_0x41f721[_0x2813eb]=_0x253ceb,ie=(_0x38ba6d,_0x3a6986,_0x3036fb,_0x5b1c17)=>{const _0xf38a84=_0x174a38;for(var _0x1420d5=_0x5b1c17>0x1?void 0x0:_0x5b1c17?oe(_0x3a6986,_0x3036fb):_0x3a6986,_0x45b019=_0x38ba6d[_0xf38a84(0x94)]-0x1,_0x267eb6;_0x45b019>=0x0;_0x45b019--)(_0x267eb6=_0x38ba6d[_0x45b019])&&(_0x1420d5=_0x267eb6(_0x1420d5)||_0x1420d5);return _0x1420d5;},w=(_0x814f62,_0x5dc2f)=>(_0x1bc567,_0x1d3074)=>_0x5dc2f(_0x1bc567,_0x1d3074,_0x814f62),$=(_0x4920f6,_0x41c760,_0x29011d)=>ne(_0x4920f6,typeof _0x41c760!=_0x174a38(0xc1)?_0x41c760+'':_0x41c760,_0x29011d);let b=class extends _0x1ba826{constructor(_0x5a2a8f=M,_0x557704,_0x21ea1c){const _0x38ec34=_0x174a38;super(),this[_0x38ec34(0xac)]=_0x5a2a8f,this[_0x38ec34(0xe5)]=_0x557704,this[_0x38ec34(0xaf)]=_0x21ea1c;const {..._0x51087e}=_0x239f10({},M,this[_0x38ec34(0xac)]);this[_0x38ec34(0xaf)][_0x38ec34(0xdc)](z,_0x51087e);}[_0x174a38(0xc3)](){[[f],[g],[S]]['forEach'](_0x3c549a=>{const _0x18eed6=_0x1f81;this[_0x18eed6(0xe5)][_0x18eed6(0xe3)](_0x3c549a);});}['onReady'](){const _0x385660=_0x174a38;this['_injector'][_0x385660(0xba)](g),this[_0x385660(0xe5)][_0x385660(0xba)](S);}};$(b,_0x174a38(0xcc),W),$(b,_0x174a38(0xd6),_0x5cde7f[_0x174a38(0xe4)]),b=ie([_0x16cf16(_0x5e0955,_0x1c0658,_0x552060),w(0x1,_0x558fff(_0x497805)),w(0x2,_0x34cab2)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0xa04d(_0x727bc9,_0x2d04b2){const _0x357e69=_0x357e();return _0xa04d=function(_0xa04d17,_0x383b2c){_0xa04d17=_0xa04d17-0xcc;let _0x435e0b=_0x357e69[_0xa04d17];return _0x435e0b;},_0xa04d(_0x727bc9,_0x2d04b2);}function _0x357e(){const _0x418fc7=['object','root','UniverCollaborationClientPlugin','_threadCommentDataSourceService','COMMENT','UNRECOGNIZED','amd','Inject','IConfigService','getMemberID','values','threadId','/reply','Reply','get','reply','getOwnPropertyDescriptor','getUnit','UniverThreadCommentDataSourcePlugin','_threadCommentModel','_threadCommentDataSource','deleteComment','UniverInstanceType','getComment','length','symbol','Unknown','CommentService','code','_initDataSource','4043165zDxdhf','body','_config','merge','find','_httpService','rangeId','Edit','_userService','8374492LLDBkV','error','ThreadCommentModel','/universer-api/user/list','defineProperty','Module','requireSession','userId','replyId','Solve','_injector','unitId','_commentService','users','@univerjs/core','21625911UtBsnQ','/edit','Delete','rxjs','forEach','UniverCore','2114508FERiar','getUser','type','Solved','/list','_initUserSync','@univerjs/thread-comment','_sessionService','7628088qxuMBV','map','_init','@univerjs-pro/collaboration-client','@univerjs/thread-comment-ui','function','user','solved','/universer-api/comment/unit/','OpenOrReOpen','dayjs','UniverProCollaborationClient','content','_configService','UniverThreadCommentUi','UNIVER_UNKNOWN','userID','exports','resolveComment','stringify','CustomRangeType','filter','parse','size','CollaborationSessionService','addUser','YYYY/MM/DD\x20HH:mm','Disposable','UniverProThreadCommentDatasource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','4YaHWZk','Injector','pluginName','onStarting','ref','replies','createTimestamp','pipe','dataSource','getCurrentUser','add','post','UserManagerService','addComment','slice','IThreadCommentDataSourceService','customRanges','rangeType','setConfig','@univerjs-pro/license','comments','commentUpdate$','UniverNetwork','Add','updateComment','subscribe','/add','disposeWithMe','6718VBunGD','/solved','HTTPService','591VWIBZx','toStringTag','DependentOn','1022309XewAjY','comment','syncUpdateMutationToColla'];_0x357e=function(){return _0x418fc7;};return _0x357e();}(function(_0x1b86c1,_0x12409b){const _0x234e25=_0xa04d,_0x26d87d=_0x1b86c1();while(!![]){try{const _0x2c7d1f=-parseInt(_0x234e25(0x111))/0x1+parseInt(_0x234e25(0x10b))/0x2*(parseInt(_0x234e25(0x10e))/0x3)+parseInt(_0x234e25(0xef))/0x4*(-parseInt(_0x234e25(0x132))/0x5)+-parseInt(_0x234e25(0x150))/0x6+-parseInt(_0x234e25(0x13b))/0x7+parseInt(_0x234e25(0xd1))/0x8+parseInt(_0x234e25(0x14a))/0x9;if(_0x2c7d1f===_0x12409b)break;else _0x26d87d['push'](_0x26d87d['shift']());}catch(_0x55ea62){_0x26d87d['push'](_0x26d87d['shift']());}}}(_0x357e,0x9bdbd),function(_0x209042,_0x334779){const _0x23533d=_0xa04d;typeof exports==_0x23533d(0x114)&&typeof module<'u'?_0x334779(exports,require(_0x23533d(0xd4)),require('@univerjs-pro/license'),require(_0x23533d(0x149)),require('@univerjs/thread-comment-ui'),require(_0x23533d(0xcf)),require(_0x23533d(0x14d)),require('@univerjs/network')):typeof define==_0x23533d(0xd6)&&define[_0x23533d(0x11a)]?define([_0x23533d(0xe2),'@univerjs-pro/collaboration-client',_0x23533d(0x102),_0x23533d(0x149),_0x23533d(0xd5),'@univerjs/thread-comment',_0x23533d(0x14d),'@univerjs/network'],_0x334779):(_0x209042=typeof globalThis<'u'?globalThis:_0x209042||self,_0x334779(_0x209042[_0x23533d(0xed)]={},_0x209042[_0x23533d(0xdc)],_0x209042['UniverProLicense'],_0x209042[_0x23533d(0x14f)],_0x209042[_0x23533d(0xdf)],_0x209042['UniverThreadComment'],_0x209042[_0x23533d(0x14d)],_0x209042[_0x23533d(0x105)]));}(this,function(_0x3ae3d6,_0x2c01e0,_0x4323d6,_0x54c82a,_0x54976b,_0x1be2bb,_0x27359c,_0x573540){'use strict';const _0xdda779=_0xa04d;const _0x21e95b=_0xdda779(0xee);var _0xe043cf=(_0x3b14f5=>(_0x3b14f5[_0x3b14f5[_0xdda779(0xda)]=0x0]=_0xdda779(0xda),_0x3b14f5[_0x3b14f5[_0xdda779(0xcc)]=0x1]=_0xdda779(0xcc),_0x3b14f5[_0x3b14f5[_0xdda779(0x119)]=-0x1]=_0xdda779(0x119),_0x3b14f5))(_0xe043cf||{}),_0x51340d=(_0x18b3ff=>(_0x18b3ff[_0x18b3ff[_0xdda779(0x12e)]=0x0]=_0xdda779(0x12e),_0x18b3ff[_0x18b3ff[_0xdda779(0x106)]=0x1]=_0xdda779(0x106),_0x18b3ff[_0x18b3ff[_0xdda779(0x121)]=0x2]='Reply',_0x18b3ff[_0x18b3ff[_0xdda779(0x139)]=0x3]=_0xdda779(0x139),_0x18b3ff[_0x18b3ff[_0xdda779(0x14c)]=0x4]=_0xdda779(0x14c),_0x18b3ff[_0x18b3ff[_0xdda779(0x144)]=0x5]='Solve',_0x18b3ff[_0x18b3ff[_0xdda779(0x119)]=-0x1]=_0xdda779(0x119),_0x18b3ff))(_0x51340d||{});const _0xbb1a12=_0xd0d61e=>_0x54c82a[_0xdda779(0xdb)](new Date(+_0xd0d61e))['format']('YYYY/MM/DD\x20HH:mm'),_0x3a385a=async(_0x41382b,_0x4568bb)=>{const _0x5f86e8=_0xdda779,_0x7880d5=_0x41382b[_0x5f86e8(0x122)](_0x54c82a[_0x5f86e8(0xfb)]),_0x19e680=_0x41382b[_0x5f86e8(0x122)](_0x573540[_0x5f86e8(0x10d)]);_0x4568bb['forEach'](_0x56a64c=>{const _0x750581=_0x5f86e8;_0x7880d5[_0x750581(0x151)](_0x56a64c)&&_0x4568bb['delete'](_0x56a64c);}),_0x4568bb[_0x5f86e8(0xe8)]&&(await _0x19e680[_0x5f86e8(0x122)](_0x5f86e8(0x13e),{'params':{'userIDs':[..._0x4568bb]}}))['body'][_0x5f86e8(0x148)][_0x5f86e8(0x14e)](_0x2bc19d=>{const _0x224984=_0x5f86e8;_0x2bc19d&&_0x7880d5[_0x224984(0xea)](_0x2bc19d);});};var _0x23bfef=Object[_0xdda779(0x124)],_0x16eefa=(_0xc028f4,_0x58f2fa,_0x5d4b1f,_0x3cbb65)=>{const _0x218adf=_0xdda779;for(var _0x799fea=_0x3cbb65>0x1?void 0x0:_0x3cbb65?_0x23bfef(_0x58f2fa,_0x5d4b1f):_0x58f2fa,_0x570859=_0xc028f4[_0x218adf(0x12c)]-0x1,_0x4b18d1;_0x570859>=0x0;_0x570859--)(_0x4b18d1=_0xc028f4[_0x570859])&&(_0x799fea=_0x4b18d1(_0x799fea)||_0x799fea);return _0x799fea;},_0x2bfff2=(_0x289a60,_0x115d01)=>(_0x2ed513,_0x2de0aa)=>_0x115d01(_0x2ed513,_0x2de0aa,_0x289a60);let _0x406192=class extends _0x54c82a[_0xdda779(0xec)]{constructor(_0x423259,_0x414766,_0x11b87f,_0x56fdf7){const _0x50bac5=_0xdda779;super(),this[_0x50bac5(0x147)]=_0x423259,this[_0x50bac5(0x127)]=_0x414766,this['_userService']=_0x11b87f,this[_0x50bac5(0x145)]=_0x56fdf7,this['_init'](),this['_initUserSync']();}[_0xdda779(0xce)](){const _0xaa52b5=_0xdda779;this[_0xaa52b5(0x10a)](this[_0xaa52b5(0x127)][_0xaa52b5(0x104)][_0xaa52b5(0xf6)](_0x27359c['bufferTime'](0x10))[_0xaa52b5(0x108)](_0x15d759=>{const _0x5b69a1=_0xaa52b5,_0x4733a5=new Set();_0x15d759[_0x5b69a1(0x14e)](_0x2b746f=>{const _0x4a0209=_0x5b69a1;switch(_0x2b746f[_0x4a0209(0x152)]){case _0x4a0209(0xf9):{const _0x1494e7=_0x2b746f['payload']['personId'];_0x4733a5[_0x4a0209(0xf9)](_0x1494e7);break;}}}),_0x3a385a(this[_0x5b69a1(0x145)],_0x4733a5);}));}[_0xdda779(0xd3)](){const _0x26e1c7=_0xdda779;this[_0x26e1c7(0x10a)](this[_0x26e1c7(0x147)]['commentUpdate$'][_0x26e1c7(0x108)](async _0x49b598=>{const _0x42e908=_0x26e1c7;var _0x3ffed9,_0x2ac449,_0x8ad659,_0x4d6938;const _0x4c23a3=(_0x3ffed9=this[_0x42e908(0x127)][_0x42e908(0x125)](_0x49b598[_0x42e908(0x146)])[_0x42e908(0x136)](_0x236905=>_0x236905['threadId']===_0x49b598['threadId']))==null?void 0x0:_0x3ffed9['root'];if(!_0x4c23a3)return;const {unitId:_0x14c550,subUnitId:_0x539d36}=_0x4c23a3;switch(_0x49b598['user']&&this[_0x42e908(0x13a)]['addUser'](_0x49b598[_0x42e908(0xd7)]),_0x49b598[_0x42e908(0x152)]){case _0x51340d[_0x42e908(0x106)]:break;case _0x51340d[_0x42e908(0x121)]:{this[_0x42e908(0x127)][_0x42e908(0xfc)](_0x14c550,_0x539d36,{'unitId':_0x14c550,'subUnitId':_0x539d36,'ref':'','id':_0x49b598[_0x42e908(0x143)],'dT':_0xbb1a12(+_0x49b598['createTimestamp']),'threadId':_0x49b598['threadId'],'personId':(_0x8ad659=(_0x2ac449=_0x49b598['user'])==null?void 0x0:_0x2ac449[_0x42e908(0xe1)])!=null?_0x8ad659:_0x49b598[_0x42e908(0x142)],'text':JSON['parse'](_0x49b598[_0x42e908(0xdd)]),'parentId':_0x4c23a3['id']});break;}case _0x51340d[_0x42e908(0x14c)]:{const _0x5166a5=this[_0x42e908(0x127)][_0x42e908(0x12b)](_0x14c550,_0x539d36,_0x49b598[_0x42e908(0x143)]);_0x5166a5&&_0x5166a5['parentId']&&this['_threadCommentModel']['deleteComment'](_0x14c550,_0x539d36,_0x49b598[_0x42e908(0x143)]);break;}case _0x51340d[_0x42e908(0x139)]:{this[_0x42e908(0x127)][_0x42e908(0x107)](_0x14c550,_0x539d36,{'commentId':_0x49b598[_0x42e908(0x143)],'text':JSON['parse'](_0x49b598[_0x42e908(0xdd)])});break;}case _0x51340d[_0x42e908(0x144)]:{const _0x37d9cc=(_0x4d6938=this[_0x42e908(0x127)]['getUnit'](_0x49b598[_0x42e908(0x146)])['find'](_0x5d896a=>_0x5d896a[_0x42e908(0x11f)]===_0x49b598[_0x42e908(0x11f)]))==null?void 0x0:_0x4d6938[_0x42e908(0x115)];_0x37d9cc&&this[_0x42e908(0x127)][_0x42e908(0xe3)](_0x14c550,_0x539d36,_0x37d9cc['id'],_0x49b598[_0x42e908(0xd8)]===_0xe043cf[_0x42e908(0xcc)]);break;}}}));}};_0x406192=_0x16eefa([_0x2bfff2(0x0,_0x54c82a[_0xdda779(0x11b)](_0x2c01e0[_0xdda779(0x12f)])),_0x2bfff2(0x1,_0x54c82a[_0xdda779(0x11b)](_0x1be2bb[_0xdda779(0x13d)])),_0x2bfff2(0x2,_0x54c82a[_0xdda779(0x11b)](_0x54c82a[_0xdda779(0xfb)])),_0x2bfff2(0x3,_0x54c82a[_0xdda779(0x11b)](_0x54c82a[_0xdda779(0xf0)]))],_0x406192);const _0x314522='thread-comment-data-source.config',_0x404da1={};var _0x2e5077=Object[_0xdda779(0x124)],_0x14e704=(_0x5859b7,_0x578c9f,_0x2686a9,_0x2d89d)=>{const _0x5f490e=_0xdda779;for(var _0x3f8327=_0x2d89d>0x1?void 0x0:_0x2d89d?_0x2e5077(_0x578c9f,_0x2686a9):_0x578c9f,_0x246d8c=_0x5859b7[_0x5f490e(0x12c)]-0x1,_0x1d59d4;_0x246d8c>=0x0;_0x246d8c--)(_0x1d59d4=_0x5859b7[_0x246d8c])&&(_0x3f8327=_0x1d59d4(_0x3f8327)||_0x3f8327);return _0x3f8327;},_0x55e75a=(_0x4a1c76,_0x584d08)=>(_0x112df,_0xb6b51)=>_0x584d08(_0x112df,_0xb6b51,_0x4a1c76);function _0x112527(_0x3df793,_0x50d184){const _0x41db75=_0xdda779,_0x336071=_0x3df793['replies'][0x0];return{..._0x50d184,'id':_0x336071[_0x41db75(0x143)],'resolved':_0x3df793[_0x41db75(0xd8)]===0x1,'dT':_0xbb1a12(_0x336071[_0x41db75(0xf5)]),'personId':_0x336071['userId'],'threadId':_0x336071[_0x41db75(0x11f)]};}function _0x504e7f(_0x1a4679,_0x1307a2,_0x374ee0){const _0x16a472=_0xdda779;var _0xec86b5,_0x2a2257;if(((_0x2a2257=(_0xec86b5=_0x1a4679==null?void 0x0:_0x1a4679[_0x16a472(0xf4)])==null?void 0x0:_0xec86b5[_0x16a472(0x12c)])!=null?_0x2a2257:0x0)>0x0){const _0x13042a=(_0x553513,_0x733dc5)=>({'id':_0x553513['replyId'],'threadId':_0x553513[_0x16a472(0x11f)],'dT':_0xbb1a12(_0x553513['createTimestamp']),'personId':_0x553513[_0x16a472(0x142)],'resolved':_0x1a4679[_0x16a472(0xd8)]===_0xe043cf[_0x16a472(0xcc)],'unitId':_0x1307a2,'subUnitId':_0x374ee0,'text':JSON[_0x16a472(0xe7)](_0x553513[_0x16a472(0xdd)]),'parentId':_0x733dc5}),_0x15bc8a=_0x13042a(_0x1a4679[_0x16a472(0xf4)][0x0]);return{..._0x15bc8a,'children':_0x1a4679[_0x16a472(0xf4)][_0x16a472(0xfd)](0x1)['map'](_0x52dba7=>_0x13042a(_0x52dba7,_0x15bc8a['id']))};}return null;}let _0x154654=class{constructor(_0x4f9233,_0x42d2dc,_0x5e85e2,_0x43c87a){const _0x303576=_0xdda779;this[_0x303576(0x137)]=_0x4f9233,this['_userService']=_0x42d2dc,this[_0x303576(0xd0)]=_0x5e85e2,this[_0x303576(0x145)]=_0x43c87a;}async[_0xdda779(0xfc)](_0x1e4d8b){const _0xd05d64=_0xdda779;var _0x2e6f72,_0x775167;const {parentId:_0x1460c6,unitId:_0x2698b2,text:_0x5ae46d,threadId:_0x3420fa}=_0x1e4d8b,_0x22642a=(_0x775167=(_0x2e6f72=_0x5ae46d[_0xd05d64(0xff)])==null?void 0x0:_0x2e6f72[_0xd05d64(0xe6)](_0xb2f033=>_0xb2f033[_0xd05d64(0x100)]===_0x54c82a[_0xd05d64(0xe5)][_0xd05d64(0x118)])[_0xd05d64(0xd2)](_0x280603=>_0x280603[_0xd05d64(0x138)]))!=null?_0x775167:[],_0x558b4e=JSON[_0xd05d64(0xe4)](_0x5ae46d),_0x41dc07=(await this['_sessionService'][_0xd05d64(0x141)](_0x2698b2))[_0xd05d64(0x11d)]();if(_0x1460c6){const _0x367775={'memberId':_0x41dc07,'unitId':_0x2698b2,'content':_0x558b4e,'mention':_0x22642a,'threadId':_0x3420fa},_0x100968=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2698b2+_0xd05d64(0x120),{'body':_0x367775}))[_0xd05d64(0x133)][_0xd05d64(0x123)];return{..._0x1e4d8b,'id':_0x100968[_0xd05d64(0x143)],'dT':_0x54c82a[_0xd05d64(0xdb)](+_0x100968['createTimestamp'])['format'](_0xd05d64(0xeb)),'personId':_0x100968[_0xd05d64(0x142)]};}else{const _0x2dabe1={'memberId':_0x41dc07,'unitId':_0x2698b2,'content':_0x558b4e,'mention':_0x22642a},_0x437175=await this[_0xd05d64(0x137)][_0xd05d64(0xfa)](_0xd05d64(0xd9)+_0x2698b2+_0xd05d64(0x109),{'body':_0x2dabe1});return _0x112527(_0x437175[_0xd05d64(0x133)][_0xd05d64(0x112)],_0x1e4d8b);}}async[_0xdda779(0x107)](_0x3db6b6){const _0x1c6d12=_0xdda779;var _0x37f1e2,_0x12ca8f;const {text:_0x2fa5d7,unitId:_0xc5c3de}=_0x3db6b6,_0x5c22b8=(_0x12ca8f=(_0x37f1e2=_0x2fa5d7[_0x1c6d12(0xff)])==null?void 0x0:_0x37f1e2[_0x1c6d12(0xe6)](_0x4d537c=>_0x4d537c[_0x1c6d12(0x100)]===_0x54c82a[_0x1c6d12(0xe5)][_0x1c6d12(0x118)])['map'](_0x388e17=>_0x388e17[_0x1c6d12(0x138)]))!=null?_0x12ca8f:[],_0x1153bd=JSON[_0x1c6d12(0xe4)](_0x2fa5d7),_0x24a503=_0x3db6b6[_0x1c6d12(0x11f)],_0x413180=_0x3db6b6['id'],_0x2342ff={'memberId':(await this[_0x1c6d12(0xd0)]['requireSession'](_0xc5c3de))[_0x1c6d12(0x11d)](),'unitId':_0xc5c3de,'threadId':_0x24a503,'mention':_0x5c22b8,'content':_0x1153bd,'replyId':_0x413180},_0x1a44ea=await this['_httpService'][_0x1c6d12(0xfa)](_0x1c6d12(0xd9)+_0xc5c3de+_0x1c6d12(0x14b),{'body':_0x2342ff});return!_0x1a44ea['body']['error']||_0x1a44ea[_0x1c6d12(0x133)][_0x1c6d12(0x13c)][_0x1c6d12(0x130)]===0x1;}async['resolveComment'](_0x6c223b){const _0x4b8ca5=_0xdda779,{unitId:_0x1e40a8}=_0x6c223b,_0xfecd7a=_0x6c223b['threadId'],_0x4e8d23={'memberId':this[_0x4b8ca5(0x13a)][_0x4b8ca5(0xf8)]()[_0x4b8ca5(0xe1)],'unitId':_0x1e40a8,'threadId':_0xfecd7a,'solved':_0x6c223b['resolved']?_0xe043cf[_0x4b8ca5(0xcc)]:_0xe043cf[_0x4b8ca5(0xda)]},_0x1117c5=await this[_0x4b8ca5(0x137)]['post'](_0x4b8ca5(0xd9)+_0x1e40a8+_0x4b8ca5(0x10c),{'body':_0x4e8d23});return!_0x1117c5['body']['error']||_0x1117c5['body'][_0x4b8ca5(0x13c)][_0x4b8ca5(0x130)]===0x1;}async[_0xdda779(0x129)](_0xcbad8,_0xb2e2e3,_0x4713e9,_0x9d05c3){const _0x22b311=_0xdda779,_0x4297d6={'memberId':(await this[_0x22b311(0xd0)][_0x22b311(0x141)](_0xcbad8))[_0x22b311(0x11d)](),'threadId':_0x4713e9,'replyId':_0x9d05c3,'unitId':_0xcbad8},_0x1264f4=await this[_0x22b311(0x137)]['post'](_0x22b311(0xd9)+_0xcbad8+'/delete',{'body':_0x4297d6});return!_0x1264f4[_0x22b311(0x133)][_0x22b311(0x13c)]||_0x1264f4[_0x22b311(0x133)][_0x22b311(0x13c)][_0x22b311(0x130)]===0x1;}async['listComments'](_0x158496,_0x3feb58,_0x5a21f6){const _0x282cae=_0xdda779,_0xf27c62={'unitId':_0x158496,'threadId':_0x5a21f6},_0x4bd29f=await this[_0x282cae(0x137)]['post'](_0x282cae(0xd9)+_0x158496+_0x282cae(0xcd),{'body':_0xf27c62}),_0x474d50=_0x5a21f6[_0x282cae(0xd2)](_0x5ed25f=>_0x504e7f(_0x4bd29f[_0x282cae(0x133)][_0x282cae(0x103)][_0x5ed25f],_0x158496,_0x3feb58))[_0x282cae(0xe6)](Boolean);return Object[_0x282cae(0x11e)](_0x4bd29f[_0x282cae(0x133)]['users'])[_0x282cae(0x14e)](_0x16bf56=>{const _0x5711b8=_0x282cae;this[_0x5711b8(0x13a)]['addUser'](_0x16bf56);}),_0x474d50;}['saveCommentToSnapshot'](_0x28d497){const _0x1616c1=_0xdda779;return{'id':_0x28d497['id'],'threadId':_0x28d497[_0x1616c1(0x11f)],'ref':_0x28d497[_0x1616c1(0xf3)]};}};_0x154654=_0x14e704([_0x55e75a(0x0,_0x54c82a[_0xdda779(0x11b)](_0x573540[_0xdda779(0x10d)])),_0x55e75a(0x1,_0x54c82a[_0xdda779(0x11b)](_0x54c82a['UserManagerService'])),_0x55e75a(0x2,_0x54c82a[_0xdda779(0x11b)](_0x2c01e0[_0xdda779(0xe9)])),_0x55e75a(0x3,_0x54c82a['Inject'](_0x54c82a[_0xdda779(0xf0)]))],_0x154654);var _0xd5ab24=Object[_0xdda779(0x124)],_0x1e1e28=(_0x20c302,_0x3c990b,_0x3a34f1,_0x89def5)=>{const _0x3f0192=_0xdda779;for(var _0x4ae8d3=_0x89def5>0x1?void 0x0:_0x89def5?_0xd5ab24(_0x3c990b,_0x3a34f1):_0x3c990b,_0xb0b380=_0x20c302[_0x3f0192(0x12c)]-0x1,_0x28e1bb;_0xb0b380>=0x0;_0xb0b380--)(_0x28e1bb=_0x20c302[_0xb0b380])&&(_0x4ae8d3=_0x28e1bb(_0x4ae8d3)||_0x4ae8d3);return _0x4ae8d3;},_0x367747=(_0x4e53f2,_0x5d10c4)=>(_0x38f53d,_0x56d522)=>_0x5d10c4(_0x38f53d,_0x56d522,_0x4e53f2);let _0x124c7f=class extends _0x54c82a['Disposable']{constructor(_0x3ff869,_0x1c94ff){const _0x38d738=_0xdda779;super(),this[_0x38d738(0x117)]=_0x3ff869,this[_0x38d738(0x128)]=_0x1c94ff,this[_0x38d738(0x131)]();}[_0xdda779(0x131)](){const _0x330f0b=_0xdda779;this[_0x330f0b(0x117)][_0x330f0b(0xf7)]=this[_0x330f0b(0x128)],this[_0x330f0b(0x117)][_0x330f0b(0x113)]=!0x1;}};_0x124c7f=_0x1e1e28([_0x367747(0x0,_0x1be2bb[_0xdda779(0xfe)]),_0x367747(0x1,_0x54c82a[_0xdda779(0x11b)](_0x154654))],_0x124c7f);var _0x563cf7=Object[_0xdda779(0x13f)],_0x30e153=Object[_0xdda779(0x124)],_0x4d06d3=(_0xeafac1,_0x12d10c,_0x1be874)=>_0x12d10c in _0xeafac1?_0x563cf7(_0xeafac1,_0x12d10c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1be874}):_0xeafac1[_0x12d10c]=_0x1be874,_0xd9b7bc=(_0x2feefc,_0x3ae689,_0x229c67,_0x321ca6)=>{for(var _0x123038=_0x321ca6>0x1?void 0x0:_0x321ca6?_0x30e153(_0x3ae689,_0x229c67):_0x3ae689,_0x14e81c=_0x2feefc['length']-0x1,_0x2d61fa;_0x14e81c>=0x0;_0x14e81c--)(_0x2d61fa=_0x2feefc[_0x14e81c])&&(_0x123038=_0x2d61fa(_0x123038)||_0x123038);return _0x123038;},_0x287ed3=(_0x573a83,_0x1d53f2)=>(_0x254245,_0xffa3bc)=>_0x1d53f2(_0x254245,_0xffa3bc,_0x573a83),_0x276f2a=(_0x5069be,_0x36f1b4,_0x3b8187)=>_0x4d06d3(_0x5069be,typeof _0x36f1b4!=_0xdda779(0x12d)?_0x36f1b4+'':_0x36f1b4,_0x3b8187);_0x3ae3d6[_0xdda779(0x126)]=class extends _0x54c82a['Plugin']{constructor(_0x432ac7=_0x404da1,_0x465d9d,_0x5d47cc){const _0x4e549f=_0xdda779;super(),this[_0x4e549f(0x134)]=_0x432ac7,this[_0x4e549f(0x145)]=_0x465d9d,this[_0x4e549f(0xde)]=_0x5d47cc;const {..._0x4d3501}=_0x54c82a[_0x4e549f(0x135)]({},_0x404da1,this[_0x4e549f(0x134)]);this[_0x4e549f(0xde)][_0x4e549f(0x101)](_0x314522,_0x4d3501);}[_0xdda779(0xf2)](){const _0xe20973=_0xdda779;[[_0x154654],[_0x124c7f],[_0x406192]][_0xe20973(0x14e)](_0x4650b6=>{const _0x5c3168=_0xe20973;this[_0x5c3168(0x145)][_0x5c3168(0xf9)](_0x4650b6);});}['onReady'](){const _0x27e6d4=_0xdda779;this[_0x27e6d4(0x145)]['get'](_0x124c7f),this[_0x27e6d4(0x145)][_0x27e6d4(0x122)](_0x406192);}},_0x276f2a(_0x3ae3d6[_0xdda779(0x126)],_0xdda779(0xf1),_0x21e95b),_0x276f2a(_0x3ae3d6['UniverThreadCommentDataSourcePlugin'],'type',_0x54c82a[_0xdda779(0x12a)][_0xdda779(0xe0)]),_0x3ae3d6[_0xdda779(0x126)]=_0xd9b7bc([_0x54c82a[_0xdda779(0x110)](_0x54976b['UniverThreadCommentUIPlugin'],_0x2c01e0[_0xdda779(0x116)],_0x4323d6['UniverLicensePlugin']),_0x287ed3(0x1,_0x54c82a[_0xdda779(0x11b)](_0x54c82a[_0xdda779(0xf0)])),_0x287ed3(0x2,_0x54c82a[_0xdda779(0x11c)])],_0x3ae3d6[_0xdda779(0x126)]),Object[_0xdda779(0x13f)](_0x3ae3d6,Symbol[_0xdda779(0x10f)],{'value':_0xdda779(0x140)});}));
1
+ (function(_0x253bfe,_0x353a9e){const _0x543695=_0x4398,_0x38785f=_0x253bfe();while(!![]){try{const _0x5dcfa3=parseInt(_0x543695(0x81))/0x1+-parseInt(_0x543695(0xb6))/0x2*(parseInt(_0x543695(0xaf))/0x3)+-parseInt(_0x543695(0x8c))/0x4+parseInt(_0x543695(0xb4))/0x5+parseInt(_0x543695(0xae))/0x6*(-parseInt(_0x543695(0xea))/0x7)+parseInt(_0x543695(0xa9))/0x8+-parseInt(_0x543695(0xd1))/0x9;if(_0x5dcfa3===_0x353a9e)break;else _0x38785f['push'](_0x38785f['shift']());}catch(_0x2fbfe9){_0x38785f['push'](_0x38785f['shift']());}}}(_0xc086,0xdac0c),function(_0x31c993,_0x4475b0){const _0x23afce=_0x4398;typeof exports=='object'&&typeof module<'u'?_0x4475b0(exports,require(_0x23afce(0x98)),require(_0x23afce(0xbd)),require(_0x23afce(0xbe)),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x23afce(0xc1)]?define(['exports','@univerjs-pro/collaboration-client',_0x23afce(0xbd),_0x23afce(0xbe),_0x23afce(0xfa),_0x23afce(0xeb),_0x23afce(0xee),_0x23afce(0xf5)],_0x4475b0):(_0x31c993=typeof globalThis<'u'?globalThis:_0x31c993||self,_0x4475b0(_0x31c993[_0x23afce(0xa1)]={},_0x31c993[_0x23afce(0x82)],_0x31c993[_0x23afce(0x105)],_0x31c993[_0x23afce(0x9c)],_0x31c993[_0x23afce(0xcb)],_0x31c993[_0x23afce(0x9f)],_0x31c993[_0x23afce(0xee)],_0x31c993[_0x23afce(0x9e)]));}(this,function(_0x424673,_0x42bfcd,_0xe70e58,_0x21d1aa,_0x5e4d38,_0x60486a,_0x4be83f,_0x4e459e){'use strict';const _0x36d8bb=_0x4398;const _0x4b6f21=_0x36d8bb(0x97);var _0x42c3b4=(_0xf7d633=>(_0xf7d633[_0xf7d633[_0x36d8bb(0xad)]=0x0]='OpenOrReOpen',_0xf7d633[_0xf7d633[_0x36d8bb(0xc8)]=0x1]=_0x36d8bb(0xc8),_0xf7d633[_0xf7d633[_0x36d8bb(0xc3)]=-0x1]=_0x36d8bb(0xc3),_0xf7d633))(_0x42c3b4||{}),_0x1b470d=(_0x3906a0=>(_0x3906a0[_0x3906a0[_0x36d8bb(0xc4)]=0x0]=_0x36d8bb(0xc4),_0x3906a0[_0x3906a0[_0x36d8bb(0xc6)]=0x1]='Add',_0x3906a0[_0x3906a0[_0x36d8bb(0x103)]=0x2]=_0x36d8bb(0x103),_0x3906a0[_0x3906a0['Edit']=0x3]=_0x36d8bb(0xe9),_0x3906a0[_0x3906a0['Delete']=0x4]=_0x36d8bb(0xb9),_0x3906a0[_0x3906a0[_0x36d8bb(0xa3)]=0x5]=_0x36d8bb(0xa3),_0x3906a0[_0x3906a0[_0x36d8bb(0xc3)]=-0x1]=_0x36d8bb(0xc3),_0x3906a0))(_0x1b470d||{});const _0x20ca1d=_0x4f1674=>_0x21d1aa[_0x36d8bb(0x87)](new Date(+_0x4f1674))[_0x36d8bb(0xc7)](_0x36d8bb(0xaa)),_0x1cb1a9=async(_0x45c2cd,_0x22bf0e)=>{const _0x5a5a51=_0x36d8bb,_0x374306=_0x45c2cd[_0x5a5a51(0xd6)](_0x21d1aa[_0x5a5a51(0x99)]),_0x3eef03=_0x45c2cd[_0x5a5a51(0xd6)](_0x4e459e['HTTPService']);_0x22bf0e[_0x5a5a51(0xf0)](_0x3bdfce=>{const _0x557df6=_0x5a5a51;_0x374306[_0x557df6(0xa5)](_0x3bdfce)&&_0x22bf0e[_0x557df6(0xe1)](_0x3bdfce);}),_0x22bf0e['size']&&(await _0x3eef03['get'](_0x5a5a51(0xa6),{'params':{'userIDs':[..._0x22bf0e]}}))[_0x5a5a51(0xcc)]['users'][_0x5a5a51(0xf0)](_0x463f61=>{const _0x37cbcd=_0x5a5a51;_0x463f61&&_0x374306[_0x37cbcd(0xf3)](_0x463f61);});};var _0xe49fec=Object[_0x36d8bb(0x96)],_0x1fa816=(_0x36b186,_0x17640a,_0x5abcf9,_0x3095e1)=>{const _0x220381=_0x36d8bb;for(var _0x3ce140=_0x3095e1>0x1?void 0x0:_0x3095e1?_0xe49fec(_0x17640a,_0x5abcf9):_0x17640a,_0x1d4621=_0x36b186[_0x220381(0xb5)]-0x1,_0x4483f9;_0x1d4621>=0x0;_0x1d4621--)(_0x4483f9=_0x36b186[_0x1d4621])&&(_0x3ce140=_0x4483f9(_0x3ce140)||_0x3ce140);return _0x3ce140;},_0x429b30=(_0x162c80,_0x583426)=>(_0x16d150,_0xbb47cf)=>_0x583426(_0x16d150,_0xbb47cf,_0x162c80);let _0x4f5374=class extends _0x21d1aa[_0x36d8bb(0x93)]{constructor(_0x3882bd,_0x35e55f,_0x43195b,_0x2586c9){const _0x452136=_0x36d8bb;super(),this[_0x452136(0xd7)]=_0x3882bd,this['_threadCommentModel']=_0x35e55f,this[_0x452136(0xc9)]=_0x43195b,this[_0x452136(0xfd)]=_0x2586c9,this[_0x452136(0xb2)](),this[_0x452136(0xe3)]();}['_initUserSync'](){const _0x330f44=_0x36d8bb;this['disposeWithMe'](this['_threadCommentModel'][_0x330f44(0x9d)][_0x330f44(0x107)](_0x4be83f[_0x330f44(0x106)](0x10))[_0x330f44(0xc2)](_0x1f37c8=>{const _0x29f155=_0x330f44,_0x1808d8=new Set();_0x1f37c8[_0x29f155(0xf0)](_0x504af4=>{const _0x3630e1=_0x29f155;switch(_0x504af4['type']){case _0x3630e1(0xf1):{const _0x8c07c0=_0x504af4[_0x3630e1(0xa4)][_0x3630e1(0xcf)];_0x1808d8['add'](_0x8c07c0);break;}}}),_0x1cb1a9(this['_injector'],_0x1808d8);}));}[_0x36d8bb(0xb2)](){const _0x395154=_0x36d8bb;this['disposeWithMe'](this[_0x395154(0xd7)][_0x395154(0x9d)][_0x395154(0xc2)](async _0x277b64=>{const _0x3aeded=_0x395154;var _0xb5f59f,_0x4ca391,_0x40995e,_0x4614dd;const _0x4f492c=(_0xb5f59f=this['_threadCommentModel']['getUnit'](_0x277b64[_0x3aeded(0xe4)])['find'](_0x4bc1d8=>_0x4bc1d8['threadId']===_0x277b64[_0x3aeded(0x8b)]))==null?void 0x0:_0xb5f59f[_0x3aeded(0x9b)];if(!_0x4f492c)return;const {unitId:_0x168422,subUnitId:_0x151ac0}=_0x4f492c;switch(_0x277b64[_0x3aeded(0x85)]&&this[_0x3aeded(0xc9)][_0x3aeded(0xf3)](_0x277b64[_0x3aeded(0x85)]),_0x277b64[_0x3aeded(0xce)]){case _0x1b470d[_0x3aeded(0xc6)]:break;case _0x1b470d[_0x3aeded(0x103)]:{this['_threadCommentModel']['addComment'](_0x168422,_0x151ac0,{'unitId':_0x168422,'subUnitId':_0x151ac0,'ref':'','id':_0x277b64[_0x3aeded(0x8e)],'dT':_0x20ca1d(+_0x277b64[_0x3aeded(0xd0)]),'threadId':_0x277b64[_0x3aeded(0x8b)],'personId':(_0x40995e=(_0x4ca391=_0x277b64[_0x3aeded(0x85)])==null?void 0x0:_0x4ca391[_0x3aeded(0xe2)])!=null?_0x40995e:_0x277b64[_0x3aeded(0xe6)],'text':JSON['parse'](_0x277b64['content']),'parentId':_0x4f492c['id']});break;}case _0x1b470d[_0x3aeded(0xb9)]:{const _0x19fb3c=this[_0x3aeded(0xb8)]['getComment'](_0x168422,_0x151ac0,_0x277b64['replyId']);_0x19fb3c&&_0x19fb3c[_0x3aeded(0xf7)]&&this[_0x3aeded(0xb8)][_0x3aeded(0x102)](_0x168422,_0x151ac0,_0x277b64[_0x3aeded(0x8e)]);break;}case _0x1b470d[_0x3aeded(0xe9)]:{this[_0x3aeded(0xb8)]['updateComment'](_0x168422,_0x151ac0,{'commentId':_0x277b64[_0x3aeded(0x8e)],'text':JSON[_0x3aeded(0xd3)](_0x277b64['content'])});break;}case _0x1b470d['Solve']:{const _0x505e97=(_0x4614dd=this['_threadCommentModel'][_0x3aeded(0x104)](_0x277b64[_0x3aeded(0xe4)])[_0x3aeded(0xfc)](_0x1909f9=>_0x1909f9[_0x3aeded(0x8b)]===_0x277b64[_0x3aeded(0x8b)]))==null?void 0x0:_0x4614dd[_0x3aeded(0x9b)];_0x505e97&&this[_0x3aeded(0xb8)]['resolveComment'](_0x168422,_0x151ac0,_0x505e97['id'],_0x277b64[_0x3aeded(0xa7)]===_0x42c3b4['Solved']);break;}}}));}};_0x4f5374=_0x1fa816([_0x429b30(0x0,_0x21d1aa['Inject'](_0x42bfcd['CommentService'])),_0x429b30(0x1,_0x21d1aa['Inject'](_0x60486a['ThreadCommentModel'])),_0x429b30(0x2,_0x21d1aa['Inject'](_0x21d1aa[_0x36d8bb(0x99)])),_0x429b30(0x3,_0x21d1aa[_0x36d8bb(0xc0)](_0x21d1aa[_0x36d8bb(0x8d)]))],_0x4f5374);const _0x3de712=_0x36d8bb(0xff),_0x1aab32={};var _0x55ecf8=Object[_0x36d8bb(0x96)],_0x5d875f=(_0x3b8e5c,_0xf62dd1,_0x154ce6,_0x1bd06d)=>{for(var _0x4f27e4=_0x1bd06d>0x1?void 0x0:_0x1bd06d?_0x55ecf8(_0xf62dd1,_0x154ce6):_0xf62dd1,_0x2cdb9e=_0x3b8e5c['length']-0x1,_0x999139;_0x2cdb9e>=0x0;_0x2cdb9e--)(_0x999139=_0x3b8e5c[_0x2cdb9e])&&(_0x4f27e4=_0x999139(_0x4f27e4)||_0x4f27e4);return _0x4f27e4;},_0xf2ff5=(_0x4ce9ce,_0x24cf0f)=>(_0x32f4d3,_0x57d721)=>_0x24cf0f(_0x32f4d3,_0x57d721,_0x4ce9ce);function _0x3c18e0(_0x10dd4c,_0x1ba8dc){const _0x218edb=_0x36d8bb,_0x4e9515=_0x10dd4c[_0x218edb(0xdc)][0x0];return{..._0x1ba8dc,'id':_0x4e9515['replyId'],'resolved':_0x10dd4c[_0x218edb(0xa7)]===0x1,'dT':_0x20ca1d(_0x4e9515[_0x218edb(0xd0)]),'personId':_0x4e9515['userId'],'threadId':_0x4e9515[_0x218edb(0x8b)]};}function _0x5e58ef(_0x5ba91a,_0x29f48e,_0x31e794){const _0x59b6cd=_0x36d8bb;var _0x383004,_0xe897af;if(((_0xe897af=(_0x383004=_0x5ba91a==null?void 0x0:_0x5ba91a[_0x59b6cd(0xdc)])==null?void 0x0:_0x383004[_0x59b6cd(0xb5)])!=null?_0xe897af:0x0)>0x0){const _0x58e056=(_0x47b7e7,_0xa88caf)=>({'id':_0x47b7e7[_0x59b6cd(0x8e)],'threadId':_0x47b7e7[_0x59b6cd(0x8b)],'dT':_0x20ca1d(_0x47b7e7[_0x59b6cd(0xd0)]),'personId':_0x47b7e7[_0x59b6cd(0xe6)],'resolved':_0x5ba91a['solved']===_0x42c3b4[_0x59b6cd(0xc8)],'unitId':_0x29f48e,'subUnitId':_0x31e794,'text':JSON[_0x59b6cd(0xd3)](_0x47b7e7[_0x59b6cd(0xbb)]),'parentId':_0xa88caf}),_0x2c024a=_0x58e056(_0x5ba91a['replies'][0x0]);return{..._0x2c024a,'children':_0x5ba91a[_0x59b6cd(0xdc)][_0x59b6cd(0xde)](0x1)[_0x59b6cd(0x86)](_0x30ace3=>_0x58e056(_0x30ace3,_0x2c024a['id']))};}return null;}let _0x24a343=class{constructor(_0x8b6b27,_0x3db635,_0x8fd254,_0x18cb1e){const _0x196710=_0x36d8bb;this[_0x196710(0x100)]=_0x8b6b27,this[_0x196710(0xc9)]=_0x3db635,this['_sessionService']=_0x8fd254,this[_0x196710(0xfd)]=_0x18cb1e;}async[_0x36d8bb(0xac)](_0x49034e){const _0x50e898=_0x36d8bb;var _0x5dde34,_0x2eec69;const {parentId:_0x37ca88,unitId:_0x5d2130,text:_0x3db81a,threadId:_0x4c453f}=_0x49034e,_0x5452b1=(_0x2eec69=(_0x5dde34=_0x3db81a[_0x50e898(0xd9)])==null?void 0x0:_0x5dde34[_0x50e898(0xf4)](_0x332d0f=>_0x332d0f[_0x50e898(0xba)]===_0x21d1aa['CustomRangeType']['COMMENT'])['map'](_0xbe6f2b=>_0xbe6f2b[_0x50e898(0x108)]))!=null?_0x2eec69:[],_0x441896=JSON[_0x50e898(0xc5)](_0x3db81a),_0x1d4cfb=(await this[_0x50e898(0x83)][_0x50e898(0xa2)](_0x5d2130))[_0x50e898(0xb0)]();if(_0x37ca88){const _0x522a39={'memberId':_0x1d4cfb,'unitId':_0x5d2130,'content':_0x441896,'mention':_0x5452b1,'threadId':_0x4c453f},_0x187614=(await this[_0x50e898(0x100)][_0x50e898(0x9a)](_0x50e898(0x88)+_0x5d2130+_0x50e898(0xf6),{'body':_0x522a39}))[_0x50e898(0xcc)][_0x50e898(0xf9)];return{..._0x49034e,'id':_0x187614['replyId'],'dT':_0x21d1aa[_0x50e898(0x87)](+_0x187614['createTimestamp'])[_0x50e898(0xc7)](_0x50e898(0xaa)),'personId':_0x187614[_0x50e898(0xe6)]};}else{const _0xaf5293={'memberId':_0x1d4cfb,'unitId':_0x5d2130,'content':_0x441896,'mention':_0x5452b1},_0xc45c73=await this[_0x50e898(0x100)][_0x50e898(0x9a)](_0x50e898(0x88)+_0x5d2130+_0x50e898(0xd8),{'body':_0xaf5293});return _0x3c18e0(_0xc45c73[_0x50e898(0xcc)][_0x50e898(0xef)],_0x49034e);}}async[_0x36d8bb(0xfb)](_0x133052){const _0x44a55e=_0x36d8bb;var _0x52a8cf,_0x1913bc;const {text:_0x5ef15e,unitId:_0x59ec96}=_0x133052,_0x30e6c0=(_0x1913bc=(_0x52a8cf=_0x5ef15e[_0x44a55e(0xd9)])==null?void 0x0:_0x52a8cf[_0x44a55e(0xf4)](_0x3402a6=>_0x3402a6[_0x44a55e(0xba)]===_0x21d1aa[_0x44a55e(0xf8)][_0x44a55e(0xcd)])[_0x44a55e(0x86)](_0x595b65=>_0x595b65[_0x44a55e(0x108)]))!=null?_0x1913bc:[],_0x37d4db=JSON[_0x44a55e(0xc5)](_0x5ef15e),_0x281907=_0x133052[_0x44a55e(0x8b)],_0x4e1f12=_0x133052['id'],_0x59233b={'memberId':(await this[_0x44a55e(0x83)]['requireSession'](_0x59ec96))[_0x44a55e(0xb0)](),'unitId':_0x59ec96,'threadId':_0x281907,'mention':_0x30e6c0,'content':_0x37d4db,'replyId':_0x4e1f12},_0x2a4e32=await this[_0x44a55e(0x100)][_0x44a55e(0x9a)](_0x44a55e(0x88)+_0x59ec96+_0x44a55e(0xbc),{'body':_0x59233b});return!_0x2a4e32[_0x44a55e(0xcc)]['error']||_0x2a4e32['body'][_0x44a55e(0xe8)][_0x44a55e(0x8a)]===0x1;}async[_0x36d8bb(0x94)](_0x15cc1f){const _0x594a9e=_0x36d8bb,{unitId:_0x2b3286}=_0x15cc1f,_0x3f2cfa=_0x15cc1f[_0x594a9e(0x8b)],_0x4ec633={'memberId':this[_0x594a9e(0xc9)][_0x594a9e(0xe5)]()[_0x594a9e(0xe2)],'unitId':_0x2b3286,'threadId':_0x3f2cfa,'solved':_0x15cc1f[_0x594a9e(0xd4)]?_0x42c3b4[_0x594a9e(0xc8)]:_0x42c3b4['OpenOrReOpen']},_0x50b1bb=await this[_0x594a9e(0x100)][_0x594a9e(0x9a)](_0x594a9e(0x88)+_0x2b3286+_0x594a9e(0x95),{'body':_0x4ec633});return!_0x50b1bb[_0x594a9e(0xcc)]['error']||_0x50b1bb[_0x594a9e(0xcc)][_0x594a9e(0xe8)][_0x594a9e(0x8a)]===0x1;}async[_0x36d8bb(0x102)](_0x539fb5,_0x42f5bd,_0x305f12,_0xc856dd){const _0x3cdeb6=_0x36d8bb,_0xdb8596={'memberId':(await this[_0x3cdeb6(0x83)][_0x3cdeb6(0xa2)](_0x539fb5))['getMemberID'](),'threadId':_0x305f12,'replyId':_0xc856dd,'unitId':_0x539fb5},_0x136d7a=await this[_0x3cdeb6(0x100)][_0x3cdeb6(0x9a)](_0x3cdeb6(0x88)+_0x539fb5+'/delete',{'body':_0xdb8596});return!_0x136d7a[_0x3cdeb6(0xcc)][_0x3cdeb6(0xe8)]||_0x136d7a['body'][_0x3cdeb6(0xe8)][_0x3cdeb6(0x8a)]===0x1;}async[_0x36d8bb(0xfe)](_0x5a895e,_0x560d97,_0x3df859){const _0x4a30c7=_0x36d8bb,_0x56e7fd={'unitId':_0x5a895e,'threadId':_0x3df859},_0x5c2136=await this[_0x4a30c7(0x100)][_0x4a30c7(0x9a)](_0x4a30c7(0x88)+_0x5a895e+_0x4a30c7(0x7f),{'body':_0x56e7fd}),_0x5c958f=_0x3df859[_0x4a30c7(0x86)](_0x5cee03=>_0x5e58ef(_0x5c2136['body'][_0x4a30c7(0xda)][_0x5cee03],_0x5a895e,_0x560d97))['filter'](Boolean);return Object[_0x4a30c7(0xb3)](_0x5c2136['body'][_0x4a30c7(0xdf)])[_0x4a30c7(0xf0)](_0x44876b=>{const _0x181f63=_0x4a30c7;this[_0x181f63(0xc9)][_0x181f63(0xf3)](_0x44876b);}),_0x5c958f;}[_0x36d8bb(0xb7)](_0x5e90e9){const _0x2c2a14=_0x36d8bb;return{'id':_0x5e90e9['id'],'threadId':_0x5e90e9[_0x2c2a14(0x8b)],'ref':_0x5e90e9['ref']};}};_0x24a343=_0x5d875f([_0xf2ff5(0x0,_0x21d1aa[_0x36d8bb(0xc0)](_0x4e459e[_0x36d8bb(0xf2)])),_0xf2ff5(0x1,_0x21d1aa['Inject'](_0x21d1aa[_0x36d8bb(0x99)])),_0xf2ff5(0x2,_0x21d1aa[_0x36d8bb(0xc0)](_0x42bfcd[_0x36d8bb(0x80)])),_0xf2ff5(0x3,_0x21d1aa[_0x36d8bb(0xc0)](_0x21d1aa['Injector']))],_0x24a343);var _0x3eec78=Object[_0x36d8bb(0x96)],_0x2e3c34=(_0x1bb122,_0x55fd67,_0x336530,_0x50b7d0)=>{for(var _0x134da5=_0x50b7d0>0x1?void 0x0:_0x50b7d0?_0x3eec78(_0x55fd67,_0x336530):_0x55fd67,_0x34694a=_0x1bb122['length']-0x1,_0x4a1ad2;_0x34694a>=0x0;_0x34694a--)(_0x4a1ad2=_0x1bb122[_0x34694a])&&(_0x134da5=_0x4a1ad2(_0x134da5)||_0x134da5);return _0x134da5;},_0x2c466b=(_0x5cd853,_0x3c4067)=>(_0x5212f6,_0xda7611)=>_0x3c4067(_0x5212f6,_0xda7611,_0x5cd853);let _0x4be064=class extends _0x21d1aa[_0x36d8bb(0x93)]{constructor(_0x5f4b1d,_0x20716f){super(),this['_threadCommentDataSourceService']=_0x5f4b1d,this['_threadCommentDataSource']=_0x20716f,this['_initDataSource']();}['_initDataSource'](){const _0x497221=_0x36d8bb;this['_threadCommentDataSourceService']['dataSource']=this[_0x497221(0x101)],this[_0x497221(0xe0)][_0x497221(0xd2)]=!0x1;}};_0x4be064=_0x2e3c34([_0x2c466b(0x0,_0x60486a[_0x36d8bb(0x91)]),_0x2c466b(0x1,_0x21d1aa['Inject'](_0x24a343))],_0x4be064);var _0x48b716=Object[_0x36d8bb(0xd5)],_0x36b088=Object[_0x36d8bb(0x96)],_0x4c0109=(_0x47eb86,_0x5553da,_0x2677bd)=>_0x5553da in _0x47eb86?_0x48b716(_0x47eb86,_0x5553da,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2677bd}):_0x47eb86[_0x5553da]=_0x2677bd,_0x264993=(_0xafd29d,_0x1882ed,_0x26d631,_0x368c28)=>{const _0x1bd38c=_0x36d8bb;for(var _0x3842e2=_0x368c28>0x1?void 0x0:_0x368c28?_0x36b088(_0x1882ed,_0x26d631):_0x1882ed,_0x4e374e=_0xafd29d[_0x1bd38c(0xb5)]-0x1,_0x32e277;_0x4e374e>=0x0;_0x4e374e--)(_0x32e277=_0xafd29d[_0x4e374e])&&(_0x3842e2=_0x32e277(_0x3842e2)||_0x3842e2);return _0x3842e2;},_0x297a39=(_0x115fd1,_0x30275e)=>(_0x3064d2,_0x1ff584)=>_0x30275e(_0x3064d2,_0x1ff584,_0x115fd1),_0x3676c3=(_0x581bdb,_0x82d9fd,_0x159d85)=>_0x4c0109(_0x581bdb,typeof _0x82d9fd!=_0x36d8bb(0xa0)?_0x82d9fd+'':_0x82d9fd,_0x159d85);_0x424673[_0x36d8bb(0xca)]=class extends _0x21d1aa[_0x36d8bb(0x84)]{constructor(_0x41ae04=_0x1aab32,_0x459f1d,_0x1a965a){const _0x479cc0=_0x36d8bb;super(),this[_0x479cc0(0xed)]=_0x41ae04,this[_0x479cc0(0xfd)]=_0x459f1d,this[_0x479cc0(0xec)]=_0x1a965a;const {..._0x5cba13}=_0x21d1aa[_0x479cc0(0x8f)]({},_0x1aab32,this[_0x479cc0(0xed)]);this[_0x479cc0(0xec)]['setConfig'](_0x3de712,_0x5cba13);}[_0x36d8bb(0x89)](){const _0x49636c=_0x36d8bb;[[_0x24a343],[_0x4be064],[_0x4f5374]][_0x49636c(0xf0)](_0x4aed2c=>{const _0x167671=_0x49636c;this[_0x167671(0xfd)][_0x167671(0xf1)](_0x4aed2c);});}[_0x36d8bb(0x90)](){const _0x4b68aa=_0x36d8bb;this[_0x4b68aa(0xfd)][_0x4b68aa(0xd6)](_0x4be064),this['_injector'][_0x4b68aa(0xd6)](_0x4f5374);}},_0x3676c3(_0x424673[_0x36d8bb(0xca)],_0x36d8bb(0xab),_0x4b6f21),_0x3676c3(_0x424673[_0x36d8bb(0xca)],_0x36d8bb(0xce),_0x21d1aa[_0x36d8bb(0xa8)]['UNIVER_UNKNOWN']),_0x424673[_0x36d8bb(0xca)]=_0x264993([_0x21d1aa[_0x36d8bb(0xe7)](_0x5e4d38[_0x36d8bb(0xdd)],_0x42bfcd[_0x36d8bb(0x92)],_0xe70e58[_0x36d8bb(0xbf)]),_0x297a39(0x1,_0x21d1aa['Inject'](_0x21d1aa[_0x36d8bb(0x8d)])),_0x297a39(0x2,_0x21d1aa[_0x36d8bb(0xb1)])],_0x424673[_0x36d8bb(0xca)]),Object[_0x36d8bb(0xd5)](_0x424673,Symbol[_0x36d8bb(0xdb)],{'value':'Module'});}));function _0x4398(_0x53f4b5,_0x20d2bf){const _0xc08626=_0xc086();return _0x4398=function(_0x43987b,_0x1883f0){_0x43987b=_0x43987b-0x7f;let _0x27cff0=_0xc08626[_0x43987b];return _0x27cff0;},_0x4398(_0x53f4b5,_0x20d2bf);}function _0xc086(){const _0x294571=['defineProperty','get','_commentService','/add','customRanges','comments','toStringTag','replies','UniverThreadCommentUIPlugin','slice','users','_threadCommentDataSourceService','delete','userID','_initUserSync','unitId','getCurrentUser','userId','DependentOn','error','Edit','1861727CVMbzg','@univerjs/thread-comment','_configService','_config','rxjs','comment','forEach','add','HTTPService','addUser','filter','@univerjs/network','/reply','parentId','CustomRangeType','reply','@univerjs/thread-comment-ui','updateComment','find','_injector','listComments','thread-comment-data-source.config','_httpService','_threadCommentDataSource','deleteComment','Reply','getUnit','UniverProLicense','bufferTime','pipe','rangeId','/list','CollaborationSessionService','1596275ePTmWs','UniverProCollaborationClient','_sessionService','Plugin','user','map','dayjs','/universer-api/comment/unit/','onStarting','code','threadId','5301884sFmeIy','Injector','replyId','merge','onReady','IThreadCommentDataSourceService','UniverCollaborationClientPlugin','Disposable','resolveComment','/solved','getOwnPropertyDescriptor','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs-pro/collaboration-client','UserManagerService','post','root','UniverCore','commentUpdate$','UniverNetwork','UniverThreadComment','symbol','UniverProThreadCommentDatasource','requireSession','Solve','payload','getUser','/universer-api/user/list','solved','UniverInstanceType','13193912hsvngk','YYYY/MM/DD\x20HH:mm','pluginName','addComment','OpenOrReOpen','12sHZiQa','6urOPCg','getMemberID','IConfigService','_init','values','5968245OeekKu','length','1199358ooZgYl','saveCommentToSnapshot','_threadCommentModel','Delete','rangeType','content','/edit','@univerjs-pro/license','@univerjs/core','UniverLicensePlugin','Inject','amd','subscribe','UNRECOGNIZED','Unknown','stringify','Add','format','Solved','_userService','UniverThreadCommentDataSourcePlugin','UniverThreadCommentUi','body','COMMENT','type','personId','createTimestamp','4377600DoUuBd','syncUpdateMutationToColla','parse','resolved'];_0xc086=function(){return _0x294571;};return _0xc086();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.9-experimental.20250409-e08c696",
3
+ "version": "0.6.9-experimental.20250409-52b9ab8",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs/core": "0.6.9-experimental.20250409-e08c696",
49
- "@univerjs-pro/collaboration-client": "0.6.9-experimental.20250409-e08c696",
50
- "@univerjs/network": "0.6.9-experimental.20250409-e08c696",
51
- "@univerjs-pro/license": "0.6.9-experimental.20250409-e08c696",
52
- "@univerjs/protocol": "0.1.46-alpha.3",
53
- "@univerjs/thread-comment-ui": "0.6.9-experimental.20250409-e08c696",
54
- "@univerjs/thread-comment": "0.6.9-experimental.20250409-e08c696"
48
+ "@univerjs-pro/collaboration-client": "0.6.9-experimental.20250409-52b9ab8",
49
+ "@univerjs-pro/license": "0.6.9-experimental.20250409-52b9ab8",
50
+ "@univerjs/network": "0.6.9-experimental.20250409-52b9ab8",
51
+ "@univerjs/core": "0.6.9-experimental.20250409-52b9ab8",
52
+ "@univerjs/thread-comment": "0.6.9-experimental.20250409-52b9ab8",
53
+ "@univerjs/thread-comment-ui": "0.6.9-experimental.20250409-52b9ab8",
54
+ "@univerjs/protocol": "0.1.46-alpha.3"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",