@univerjs-pro/thread-comment-datasource 0.6.10-nightly.202504271606 → 0.6.10-nightly.202504281607
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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x721b34=_0x556d;(function(_0x3fde57,_0x2784c0){const _0xfba7a7=_0x556d,_0x5eb98b=_0x3fde57();while(!![]){try{const _0x498995=parseInt(_0xfba7a7(0x185))/0x1+-parseInt(_0xfba7a7(0x15b))/0x2*(-parseInt(_0xfba7a7(0x184))/0x3)+-parseInt(_0xfba7a7(0x137))/0x4+parseInt(_0xfba7a7(0x158))/0x5+parseInt(_0xfba7a7(0x151))/0x6+parseInt(_0xfba7a7(0x17e))/0x7*(-parseInt(_0xfba7a7(0x181))/0x8)+-parseInt(_0xfba7a7(0x166))/0x9*(parseInt(_0xfba7a7(0x13f))/0xa);if(_0x498995===_0x2784c0)break;else _0x5eb98b['push'](_0x5eb98b['shift']());}catch(_0x23926c){_0x5eb98b['push'](_0x5eb98b['shift']());}}}(_0x44d8,0x8cd60));Object[_0x721b34(0x154)](exports,Symbol[_0x721b34(0x192)],{'value':_0x721b34(0x187)});const b=require(_0x721b34(0x19a)),T=require(_0x721b34(0x139)),c=require(_0x721b34(0x14e)),j=require(_0x721b34(0x145)),M=require('@univerjs/thread-comment'),w=require(_0x721b34(0x189)),P=require(_0x721b34(0x18b)),U=_0x721b34(0x178);var I=(_0x2d7a57=>(_0x2d7a57[_0x2d7a57[_0x721b34(0x15c)]=0x0]=_0x721b34(0x15c),_0x2d7a57[_0x2d7a57['Solved']=0x1]=_0x721b34(0x143),_0x2d7a57[_0x2d7a57[_0x721b34(0x13b)]=-0x1]=_0x721b34(0x13b),_0x2d7a57))(I||{}),v=(_0x1f116e=>(_0x1f116e[_0x1f116e['Unknown']=0x0]='Unknown',_0x1f116e[_0x1f116e[_0x721b34(0x164)]=0x1]=_0x721b34(0x164),_0x1f116e[_0x1f116e['Reply']=0x2]=_0x721b34(0x13e),_0x1f116e[_0x1f116e[_0x721b34(0x15f)]=0x3]=_0x721b34(0x15f),_0x1f116e[_0x1f116e[_0x721b34(0x14b)]=0x4]=_0x721b34(0x14b),_0x1f116e[_0x1f116e['Solve']=0x5]=_0x721b34(0x191),_0x1f116e[_0x1f116e['UNRECOGNIZED']=-0x1]=_0x721b34(0x13b),_0x1f116e))(v||{});const f=_0x7f8382=>c[_0x721b34(0x148)](new Date(+_0x7f8382))[_0x721b34(0x15d)](_0x721b34(0x19f)),R=async(_0x472a8a,_0x19a221)=>{const _0x2c0509=_0x721b34,_0x225a7e=_0x472a8a[_0x2c0509(0x1a9)](c[_0x2c0509(0x1b4)]),_0x2b69aa=_0x472a8a[_0x2c0509(0x1a9)](P[_0x2c0509(0x161)]);_0x19a221[_0x2c0509(0x149)](_0x163ca2=>{const _0x111e3a=_0x2c0509;_0x225a7e[_0x111e3a(0x19c)](_0x163ca2)&&_0x19a221[_0x111e3a(0x16d)](_0x163ca2);}),_0x19a221[_0x2c0509(0x147)]&&(await _0x2b69aa[_0x2c0509(0x1a9)](_0x2c0509(0x18e),{'params':{'userIDs':[..._0x19a221]}}))['body'][_0x2c0509(0x1a6)][_0x2c0509(0x149)](_0x106d8a=>{_0x106d8a&&_0x225a7e['addUser'](_0x106d8a);});};var $=Object[_0x721b34(0x153)],E=(_0x438013,_0x1168f5,_0x310aa3,_0x28947a)=>{const _0x147849=_0x721b34;for(var _0xdab21a=_0x28947a>0x1?void 0x0:_0x28947a?$(_0x1168f5,_0x310aa3):_0x1168f5,_0x59f0a9=_0x438013[_0x147849(0x163)]-0x1,_0x290f07;_0x59f0a9>=0x0;_0x59f0a9--)(_0x290f07=_0x438013[_0x59f0a9])&&(_0xdab21a=_0x290f07(_0xdab21a)||_0xdab21a);return _0xdab21a;},S=(_0x3bcb60,_0x233517)=>(_0x3b3d91,_0x7d0f37)=>_0x233517(_0x3b3d91,_0x7d0f37,_0x3bcb60);let p=class extends c[_0x721b34(0x169)]{constructor(_0x163a60,_0x3f80ee,_0x216091,_0x5736c6){const _0x3fb4d0=_0x721b34;super(),this[_0x3fb4d0(0x1ab)]=_0x163a60,this[_0x3fb4d0(0x134)]=_0x3f80ee,this[_0x3fb4d0(0x13c)]=_0x216091,this[_0x3fb4d0(0x1a8)]=_0x5736c6,this['_init'](),this[_0x3fb4d0(0x190)]();}[_0x721b34(0x190)](){const _0x53e43a=_0x721b34;this[_0x53e43a(0x183)](this[_0x53e43a(0x134)][_0x53e43a(0x180)][_0x53e43a(0x177)](w[_0x53e43a(0x193)](0x10))[_0x53e43a(0x19e)](_0x5505f7=>{const _0x503f88=new Set();_0x5505f7['forEach'](_0x16df7a=>{const _0x13126f=_0x556d;switch(_0x16df7a['type']){case _0x13126f(0x1ad):{const _0x5e75a2=_0x16df7a['payload']['personId'];_0x503f88[_0x13126f(0x1ad)](_0x5e75a2);break;}}}),R(this['_injector'],_0x503f88);}));}[_0x721b34(0x17f)](){const _0x391f9d=_0x721b34;this[_0x391f9d(0x183)](this[_0x391f9d(0x1ab)]['commentUpdate$'][_0x391f9d(0x19e)](async _0x16ec7f=>{const _0x5f0365=_0x391f9d;var _0x4e391d,_0x435a32,_0x9fcdd6,_0x366594;const _0x53b41d=(_0x4e391d=this[_0x5f0365(0x134)]['getUnit'](_0x16ec7f[_0x5f0365(0x171)])[_0x5f0365(0x1af)](_0xa24f28=>_0xa24f28[_0x5f0365(0x17c)]===_0x16ec7f['threadId']))==null?void 0x0:_0x4e391d[_0x5f0365(0x174)];if(!_0x53b41d)return;const {unitId:_0x29a93b,subUnitId:_0x10601e}=_0x53b41d;switch(_0x16ec7f[_0x5f0365(0x175)]&&this[_0x5f0365(0x13c)][_0x5f0365(0x157)](_0x16ec7f['user']),_0x16ec7f['type']){case v['Add']:break;case v[_0x5f0365(0x13e)]:{this[_0x5f0365(0x134)][_0x5f0365(0x146)](_0x29a93b,_0x10601e,{'unitId':_0x29a93b,'subUnitId':_0x10601e,'ref':'','id':_0x16ec7f[_0x5f0365(0x152)],'dT':f(+_0x16ec7f[_0x5f0365(0x188)]),'threadId':_0x16ec7f[_0x5f0365(0x17c)],'personId':(_0x9fcdd6=(_0x435a32=_0x16ec7f[_0x5f0365(0x175)])==null?void 0x0:_0x435a32[_0x5f0365(0x156)])!=null?_0x9fcdd6:_0x16ec7f[_0x5f0365(0x1b3)],'text':JSON[_0x5f0365(0x195)](_0x16ec7f[_0x5f0365(0x1b0)]),'parentId':_0x53b41d['id']});break;}case v[_0x5f0365(0x14b)]:{const _0x2af7e8=this[_0x5f0365(0x134)]['getComment'](_0x29a93b,_0x10601e,_0x16ec7f[_0x5f0365(0x152)]);_0x2af7e8&&_0x2af7e8[_0x5f0365(0x150)]&&this[_0x5f0365(0x134)]['deleteComment'](_0x29a93b,_0x10601e,_0x16ec7f['replyId']);break;}case v[_0x5f0365(0x15f)]:{this[_0x5f0365(0x134)][_0x5f0365(0x168)](_0x29a93b,_0x10601e,{'commentId':_0x16ec7f[_0x5f0365(0x152)],'text':JSON[_0x5f0365(0x195)](_0x16ec7f[_0x5f0365(0x1b0)])});break;}case v[_0x5f0365(0x191)]:{const _0x2a77eb=(_0x366594=this[_0x5f0365(0x134)][_0x5f0365(0x16c)](_0x16ec7f[_0x5f0365(0x171)])[_0x5f0365(0x1af)](_0x2b9b1d=>_0x2b9b1d[_0x5f0365(0x17c)]===_0x16ec7f[_0x5f0365(0x17c)]))==null?void 0x0:_0x366594['root'];_0x2a77eb&&this[_0x5f0365(0x134)][_0x5f0365(0x170)](_0x29a93b,_0x10601e,_0x2a77eb['id'],_0x16ec7f[_0x5f0365(0x13d)]===I[_0x5f0365(0x143)]);break;}}}));}};p=E([S(0x0,c[_0x721b34(0x162)](b[_0x721b34(0x167)])),S(0x1,c['Inject'](M[_0x721b34(0x141)])),S(0x2,c['Inject'](c[_0x721b34(0x1b4)])),S(0x3,c['Inject'](c[_0x721b34(0x155)]))],p);const q=_0x721b34(0x1a3),D={};var A=Object[_0x721b34(0x153)],x=(_0x20f705,_0xee1ad9,_0x357bc1,_0xe846b3)=>{const _0x3118d1=_0x721b34;for(var _0x1c59e5=_0xe846b3>0x1?void 0x0:_0xe846b3?A(_0xee1ad9,_0x357bc1):_0xee1ad9,_0x18965c=_0x20f705[_0x3118d1(0x163)]-0x1,_0x2b3c09;_0x18965c>=0x0;_0x18965c--)(_0x2b3c09=_0x20f705[_0x18965c])&&(_0x1c59e5=_0x2b3c09(_0x1c59e5)||_0x1c59e5);return _0x1c59e5;},_=(_0x5f19df,_0xeededd)=>(_0x444544,_0x244d4a)=>_0xeededd(_0x444544,_0x244d4a,_0x5f19df);function Y(_0x2d16c7,_0x4b5089){const _0x3fcf43=_0x721b34,_0x363a87=_0x2d16c7[_0x3fcf43(0x133)][0x0];return{..._0x4b5089,'id':_0x363a87[_0x3fcf43(0x152)],'resolved':_0x2d16c7[_0x3fcf43(0x13d)]===0x1,'dT':f(_0x363a87[_0x3fcf43(0x188)]),'personId':_0x363a87[_0x3fcf43(0x1b3)],'threadId':_0x363a87[_0x3fcf43(0x17c)]};}function G(_0x532df5,_0x3db3f2,_0x1fbf9b){const _0x45fd40=_0x721b34;var _0x2f64e4,_0x2f69c5;if(((_0x2f69c5=(_0x2f64e4=_0x532df5==null?void 0x0:_0x532df5[_0x45fd40(0x133)])==null?void 0x0:_0x2f64e4[_0x45fd40(0x163)])!=null?_0x2f69c5:0x0)>0x0){const _0x5dccb5=(_0x5a6531,_0x446518)=>({'id':_0x5a6531[_0x45fd40(0x152)],'threadId':_0x5a6531['threadId'],'dT':f(_0x5a6531[_0x45fd40(0x188)]),'personId':_0x5a6531[_0x45fd40(0x1b3)],'resolved':_0x532df5[_0x45fd40(0x13d)]===I[_0x45fd40(0x143)],'unitId':_0x3db3f2,'subUnitId':_0x1fbf9b,'text':JSON[_0x45fd40(0x195)](_0x5a6531['content']),'parentId':_0x446518}),_0x350025=_0x5dccb5(_0x532df5['replies'][0x0]);return{..._0x350025,'children':_0x532df5['replies'][_0x45fd40(0x18a)](0x1)['map'](_0xc53842=>_0x5dccb5(_0xc53842,_0x350025['id']))};}return null;}let g=class{constructor(_0x4d6c2f,_0x360fbc,_0x30cb92,_0x443fc6){const _0x3402bc=_0x721b34;this['_httpService']=_0x4d6c2f,this[_0x3402bc(0x13c)]=_0x360fbc,this[_0x3402bc(0x14f)]=_0x30cb92,this[_0x3402bc(0x1a8)]=_0x443fc6;}async['addComment'](_0xfdb8d){const _0xb6c530=_0x721b34;var _0x1b510f,_0x3f3d74;const {parentId:_0x44b272,unitId:_0x34de91,text:_0x5e5857,threadId:_0x251573}=_0xfdb8d,_0x1efc8f=(_0x3f3d74=(_0x1b510f=_0x5e5857[_0xb6c530(0x159)])==null?void 0x0:_0x1b510f[_0xb6c530(0x18d)](_0x3fe0a4=>_0x3fe0a4[_0xb6c530(0x15e)]===c['CustomRangeType'][_0xb6c530(0x172)])[_0xb6c530(0x186)](_0x3bf76b=>_0x3bf76b[_0xb6c530(0x17d)]))!=null?_0x3f3d74:[],_0x546b08=JSON[_0xb6c530(0x1a2)](_0x5e5857),_0x55d75d=(await this[_0xb6c530(0x14f)][_0xb6c530(0x196)](_0x34de91))['getMemberID']();if(_0x44b272){const _0x2a2ac0={'memberId':_0x55d75d,'unitId':_0x34de91,'content':_0x546b08,'mention':_0x1efc8f,'threadId':_0x251573},_0x54dcf7=(await this['_httpService'][_0xb6c530(0x165)](_0xb6c530(0x16e)+_0x34de91+_0xb6c530(0x173),{'body':_0x2a2ac0}))[_0xb6c530(0x1a1)][_0xb6c530(0x1a4)];return{..._0xfdb8d,'id':_0x54dcf7[_0xb6c530(0x152)],'dT':c[_0xb6c530(0x148)](+_0x54dcf7[_0xb6c530(0x188)])[_0xb6c530(0x15d)](_0xb6c530(0x19f)),'personId':_0x54dcf7[_0xb6c530(0x1b3)]};}else{const _0x34e053={'memberId':_0x55d75d,'unitId':_0x34de91,'content':_0x546b08,'mention':_0x1efc8f},_0x92eca7=await this[_0xb6c530(0x197)]['post'](_0xb6c530(0x16e)+_0x34de91+_0xb6c530(0x1a7),{'body':_0x34e053});return Y(_0x92eca7[_0xb6c530(0x1a1)][_0xb6c530(0x138)],_0xfdb8d);}}async[_0x721b34(0x168)](_0x1b4407){const _0x541ee5=_0x721b34;var _0x3ffdd2,_0x138ace;const {text:_0x1fad45,unitId:_0x517d20}=_0x1b4407,_0x5142b8=(_0x138ace=(_0x3ffdd2=_0x1fad45[_0x541ee5(0x159)])==null?void 0x0:_0x3ffdd2[_0x541ee5(0x18d)](_0x14d41f=>_0x14d41f[_0x541ee5(0x15e)]===c[_0x541ee5(0x18f)]['COMMENT'])[_0x541ee5(0x186)](_0x21bb98=>_0x21bb98['rangeId']))!=null?_0x138ace:[],_0x45e9a5=JSON['stringify'](_0x1fad45),_0x431047=_0x1b4407[_0x541ee5(0x17c)],_0x5c14c3=_0x1b4407['id'],_0x45871b={'memberId':(await this['_sessionService'][_0x541ee5(0x196)](_0x517d20))[_0x541ee5(0x17b)](),'unitId':_0x517d20,'threadId':_0x431047,'mention':_0x5142b8,'content':_0x45e9a5,'replyId':_0x5c14c3},_0x538682=await this['_httpService']['post'](_0x541ee5(0x16e)+_0x517d20+_0x541ee5(0x182),{'body':_0x45871b});return!_0x538682[_0x541ee5(0x1a1)][_0x541ee5(0x135)]||_0x538682[_0x541ee5(0x1a1)][_0x541ee5(0x135)][_0x541ee5(0x1a0)]===0x1;}async[_0x721b34(0x170)](_0x26f971){const _0x53f5d3=_0x721b34,{unitId:_0x1b5cb8}=_0x26f971,_0x542695=_0x26f971['threadId'],_0x1ea138={'memberId':this[_0x53f5d3(0x13c)][_0x53f5d3(0x136)]()[_0x53f5d3(0x156)],'unitId':_0x1b5cb8,'threadId':_0x542695,'solved':_0x26f971[_0x53f5d3(0x199)]?I[_0x53f5d3(0x143)]:I[_0x53f5d3(0x15c)]},_0x118353=await this[_0x53f5d3(0x197)][_0x53f5d3(0x165)](_0x53f5d3(0x16e)+_0x1b5cb8+_0x53f5d3(0x13a),{'body':_0x1ea138});return!_0x118353['body'][_0x53f5d3(0x135)]||_0x118353[_0x53f5d3(0x1a1)][_0x53f5d3(0x135)]['code']===0x1;}async[_0x721b34(0x19d)](_0x456818,_0x35efa1,_0x4f27ef,_0x2994ef){const _0x559c8e=_0x721b34,_0x5a8b8c={'memberId':(await this[_0x559c8e(0x14f)][_0x559c8e(0x196)](_0x456818))[_0x559c8e(0x17b)](),'threadId':_0x4f27ef,'replyId':_0x2994ef,'unitId':_0x456818},_0x2da8a7=await this['_httpService'][_0x559c8e(0x165)](_0x559c8e(0x16e)+_0x456818+'/delete',{'body':_0x5a8b8c});return!_0x2da8a7[_0x559c8e(0x1a1)]['error']||_0x2da8a7[_0x559c8e(0x1a1)]['error'][_0x559c8e(0x1a0)]===0x1;}async['listComments'](_0x8af870,_0x6085d,_0x36b4bb){const _0x55dfe4=_0x721b34,_0x1f1a6b={'unitId':_0x8af870,'threadId':_0x36b4bb},_0x2ca9ce=await this[_0x55dfe4(0x197)][_0x55dfe4(0x165)](_0x55dfe4(0x16e)+_0x8af870+_0x55dfe4(0x14d),{'body':_0x1f1a6b}),_0x25fa52=_0x36b4bb[_0x55dfe4(0x186)](_0x2e0f40=>G(_0x2ca9ce[_0x55dfe4(0x1a1)][_0x55dfe4(0x14c)][_0x2e0f40],_0x8af870,_0x6085d))[_0x55dfe4(0x18d)](Boolean);return Object[_0x55dfe4(0x194)](_0x2ca9ce[_0x55dfe4(0x1a1)][_0x55dfe4(0x1a6)])['forEach'](_0x5e70a1=>{const _0x2c145a=_0x55dfe4;this[_0x2c145a(0x13c)][_0x2c145a(0x157)](_0x5e70a1);}),_0x25fa52;}['saveCommentToSnapshot'](_0xcb1308){const _0x578693=_0x721b34;return{'id':_0xcb1308['id'],'threadId':_0xcb1308['threadId'],'ref':_0xcb1308[_0x578693(0x144)]};}};function _0x556d(_0x56ede1,_0x476c86){const _0x44d8c0=_0x44d8();return _0x556d=function(_0x556d3d,_0x3474d7){_0x556d3d=_0x556d3d-0x131;let _0xd9fc7a=_0x44d8c0[_0x556d3d];return _0xd9fc7a;},_0x556d(_0x56ede1,_0x476c86);}g=x([_(0x0,c[_0x721b34(0x162)](P[_0x721b34(0x161)])),_(0x1,c['Inject'](c[_0x721b34(0x1b4)])),_(0x2,c['Inject'](b[_0x721b34(0x179)])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x721b34(0x153)],J=(_0xded9e5,_0x4171f9,_0x1422e3,_0x2b1ae0)=>{const _0x58edb5=_0x721b34;for(var _0x5f390b=_0x2b1ae0>0x1?void 0x0:_0x2b1ae0?H(_0x4171f9,_0x1422e3):_0x4171f9,_0x41de64=_0xded9e5[_0x58edb5(0x163)]-0x1,_0x33031c;_0x41de64>=0x0;_0x41de64--)(_0x33031c=_0xded9e5[_0x41de64])&&(_0x5f390b=_0x33031c(_0x5f390b)||_0x5f390b);return _0x5f390b;},y=(_0x43dbee,_0x23b097)=>(_0x4cc2ec,_0x49aeae)=>_0x23b097(_0x4cc2ec,_0x49aeae,_0x43dbee);function _0x44d8(){const _0x16b6ee=['UserManagerService','onReady','UniverThreadCommentUIPlugin','replies','_threadCommentModel','error','getCurrentUser','1819080rwdolf','comment','@univerjs-pro/license','/solved','UNRECOGNIZED','_userService','solved','Reply','1392230LiPAAF','IThreadCommentDataSourceService','ThreadCommentModel','setConfig','Solved','ref','@univerjs/thread-comment-ui','addComment','size','dayjs','forEach','_threadCommentDataSource','Delete','comments','/list','@univerjs/core','_sessionService','parentId','3108198kkytUX','replyId','getOwnPropertyDescriptor','defineProperty','Injector','userID','addUser','5245210bsZFsP','customRanges','UniverLicensePlugin','64LlrNmN','OpenOrReOpen','format','rangeType','Edit','Plugin','HTTPService','Inject','length','Add','post','36waraBC','CommentService','updateComment','Disposable','DependentOn','_config','getUnit','delete','/universer-api/comment/unit/','UniverInstanceType','resolveComment','unitId','COMMENT','/reply','root','user','symbol','pipe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CollaborationSessionService','UNIVER_UNKNOWN','getMemberID','threadId','rangeId','7oEaBDB','_init','commentUpdate$','4867624VLRcVe','/edit','disposeWithMe','27150qzBXuj','340304xhfuMj','map','Module','createTimestamp','rxjs','slice','@univerjs/network','_configService','filter','/universer-api/user/list','CustomRangeType','_initUserSync','Solve','toStringTag','bufferTime','values','parse','requireSession','_httpService','dataSource','resolved','@univerjs-pro/collaboration-client','pluginName','getUser','deleteComment','subscribe','YYYY/MM/DD\x20HH:mm','code','body','stringify','thread-comment-data-source.config','reply','UniverThreadCommentDataSourcePlugin','users','/add','_injector','get','IConfigService','_commentService','_initDataSource','add','_threadCommentDataSourceService','find','content','type','syncUpdateMutationToColla','userId'];_0x44d8=function(){return _0x16b6ee;};return _0x44d8();}let C=class extends c[_0x721b34(0x169)]{constructor(_0x37d65a,_0x42dd28){const _0x5c9dc8=_0x721b34;super(),this[_0x5c9dc8(0x1ae)]=_0x37d65a,this['_threadCommentDataSource']=_0x42dd28,this[_0x5c9dc8(0x1ac)]();}[_0x721b34(0x1ac)](){const _0x23054c=_0x721b34;this[_0x23054c(0x1ae)][_0x23054c(0x198)]=this[_0x23054c(0x14a)],this['_threadCommentDataSourceService'][_0x23054c(0x1b2)]=!0x1;}};C=J([y(0x0,M[_0x721b34(0x140)]),y(0x1,c[_0x721b34(0x162)](g))],C);var F=Object[_0x721b34(0x154)],L=Object[_0x721b34(0x153)],Z=(_0x4ecef9,_0xf284e4,_0x2c2505)=>_0xf284e4 in _0x4ecef9?F(_0x4ecef9,_0xf284e4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c2505}):_0x4ecef9[_0xf284e4]=_0x2c2505,W=(_0x703d1d,_0xeac3be,_0x64ab09,_0x558b82)=>{const _0x353c87=_0x721b34;for(var _0x134c67=_0x558b82>0x1?void 0x0:_0x558b82?L(_0xeac3be,_0x64ab09):_0xeac3be,_0x1105e1=_0x703d1d[_0x353c87(0x163)]-0x1,_0x4786d3;_0x1105e1>=0x0;_0x1105e1--)(_0x4786d3=_0x703d1d[_0x1105e1])&&(_0x134c67=_0x4786d3(_0x134c67)||_0x134c67);return _0x134c67;},O=(_0x48c3a6,_0x4f0c97)=>(_0x1a9939,_0x2f69a2)=>_0x4f0c97(_0x1a9939,_0x2f69a2,_0x48c3a6),N=(_0x259902,_0x19a1c3,_0x16cf2e)=>Z(_0x259902,typeof _0x19a1c3!=_0x721b34(0x176)?_0x19a1c3+'':_0x19a1c3,_0x16cf2e);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x721b34(0x160)]{constructor(_0x243e07=D,_0x3ad31e,_0x2bbba1){const _0x22676c=_0x721b34;super(),this[_0x22676c(0x16b)]=_0x243e07,this[_0x22676c(0x1a8)]=_0x3ad31e,this[_0x22676c(0x18c)]=_0x2bbba1;const {..._0x5ac8ce}=c['merge']({},D,this['_config']);this[_0x22676c(0x18c)][_0x22676c(0x142)](q,_0x5ac8ce);}['onStarting'](){[[g],[C],[p]]['forEach'](_0xb9c06f=>{const _0x555706=_0x556d;this[_0x555706(0x1a8)][_0x555706(0x1ad)](_0xb9c06f);});}[_0x721b34(0x131)](){const _0x2e5283=_0x721b34;this[_0x2e5283(0x1a8)]['get'](C),this[_0x2e5283(0x1a8)][_0x2e5283(0x1a9)](p);}},N(exports[_0x721b34(0x1a5)],_0x721b34(0x19b),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x721b34(0x1b1),c[_0x721b34(0x16f)][_0x721b34(0x17a)]),exports[_0x721b34(0x1a5)]=W([c[_0x721b34(0x16a)](j[_0x721b34(0x132)],b['UniverCollaborationClientPlugin'],T[_0x721b34(0x15a)]),O(0x1,c['Inject'](c[_0x721b34(0x155)])),O(0x2,c[_0x721b34(0x1aa)])],exports[_0x721b34(0x1a5)]);
|
|
1
|
+
'use strict';const _0x13e4c0=_0x5c8b;(function(_0x4bf158,_0x4bc613){const _0x50619b=_0x5c8b,_0x451b34=_0x4bf158();while(!![]){try{const _0x29373b=parseInt(_0x50619b(0x12f))/0x1+parseInt(_0x50619b(0xe3))/0x2+-parseInt(_0x50619b(0x123))/0x3*(parseInt(_0x50619b(0xe7))/0x4)+parseInt(_0x50619b(0xe0))/0x5+-parseInt(_0x50619b(0xca))/0x6*(parseInt(_0x50619b(0x109))/0x7)+-parseInt(_0x50619b(0xde))/0x8+parseInt(_0x50619b(0x10f))/0x9*(parseInt(_0x50619b(0x13e))/0xa);if(_0x29373b===_0x4bc613)break;else _0x451b34['push'](_0x451b34['shift']());}catch(_0x332996){_0x451b34['push'](_0x451b34['shift']());}}}(_0x116e,0x5cd40));Object[_0x13e4c0(0xe1)](exports,Symbol[_0x13e4c0(0x144)],{'value':'Module'});const b=require(_0x13e4c0(0x11e)),T=require('@univerjs-pro/license'),c=require(_0x13e4c0(0x122)),j=require(_0x13e4c0(0x11c)),M=require(_0x13e4c0(0xe4)),w=require(_0x13e4c0(0xd0)),P=require(_0x13e4c0(0xd1)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x543f0c=>(_0x543f0c[_0x543f0c[_0x13e4c0(0xcf)]=0x0]='OpenOrReOpen',_0x543f0c[_0x543f0c[_0x13e4c0(0x124)]=0x1]=_0x13e4c0(0x124),_0x543f0c[_0x543f0c[_0x13e4c0(0xda)]=-0x1]=_0x13e4c0(0xda),_0x543f0c))(I||{}),v=(_0x3f0358=>(_0x3f0358[_0x3f0358['Unknown']=0x0]=_0x13e4c0(0xe2),_0x3f0358[_0x3f0358[_0x13e4c0(0x14a)]=0x1]=_0x13e4c0(0x14a),_0x3f0358[_0x3f0358[_0x13e4c0(0x13b)]=0x2]='Reply',_0x3f0358[_0x3f0358[_0x13e4c0(0x11a)]=0x3]=_0x13e4c0(0x11a),_0x3f0358[_0x3f0358['Delete']=0x4]=_0x13e4c0(0xfd),_0x3f0358[_0x3f0358[_0x13e4c0(0x10c)]=0x5]=_0x13e4c0(0x10c),_0x3f0358[_0x3f0358['UNRECOGNIZED']=-0x1]=_0x13e4c0(0xda),_0x3f0358))(v||{});const f=_0x5e5122=>c[_0x13e4c0(0xf5)](new Date(+_0x5e5122))[_0x13e4c0(0x131)](_0x13e4c0(0xcd)),R=async(_0x11ee5,_0x3d0d07)=>{const _0x94422a=_0x13e4c0,_0x55aec8=_0x11ee5[_0x94422a(0xd7)](c[_0x94422a(0xf2)]),_0x1613ee=_0x11ee5[_0x94422a(0xd7)](P['HTTPService']);_0x3d0d07[_0x94422a(0x127)](_0x49a61a=>{const _0x23f7f5=_0x94422a;_0x55aec8[_0x23f7f5(0xc8)](_0x49a61a)&&_0x3d0d07[_0x23f7f5(0xeb)](_0x49a61a);}),_0x3d0d07[_0x94422a(0x134)]&&(await _0x1613ee['get'](_0x94422a(0x136),{'params':{'userIDs':[..._0x3d0d07]}}))[_0x94422a(0x13c)][_0x94422a(0xfa)][_0x94422a(0x127)](_0x3d8e19=>{const _0x4b4c7f=_0x94422a;_0x3d8e19&&_0x55aec8[_0x4b4c7f(0x11d)](_0x3d8e19);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x6dc93e,_0x473406,_0x196a4f,_0x17f593)=>{const _0xf4ebfb=_0x13e4c0;for(var _0x562dd3=_0x17f593>0x1?void 0x0:_0x17f593?$(_0x473406,_0x196a4f):_0x473406,_0x4b4d93=_0x6dc93e[_0xf4ebfb(0x12a)]-0x1,_0x1755a1;_0x4b4d93>=0x0;_0x4b4d93--)(_0x1755a1=_0x6dc93e[_0x4b4d93])&&(_0x562dd3=_0x1755a1(_0x562dd3)||_0x562dd3);return _0x562dd3;},S=(_0x9b6136,_0x140cb2)=>(_0x16e78e,_0x5072e2)=>_0x140cb2(_0x16e78e,_0x5072e2,_0x9b6136);function _0x116e(){const _0x4d6fd6=['Add','/edit','getUser','parse','228EFEbmd','add','getCurrentUser','YYYY/MM/DD\x20HH:mm','comments','OpenOrReOpen','rxjs','@univerjs/network','customRanges','_configService','_commentService','/universer-api/comment/unit/','addComment','get','find','Injector','UNRECOGNIZED','getOwnPropertyDescriptor','map','/delete','5527120ACXKsY','slice','385870mZYdZU','defineProperty','Unknown','894030ktVMqF','@univerjs/thread-comment','replies','post','34920IcpEpN','_httpService','Plugin','root','delete','listComments','dataSource','reply','comment','content','_userService','UserManagerService','_threadCommentDataSource','setConfig','dayjs','updateComment','personId','ref','_initDataSource','users','pipe','/add','Delete','threadId','solved','/reply','Inject','commentUpdate$','UniverThreadCommentUIPlugin','unitId','disposeWithMe','rangeType','userId','requireSession','77021tCvfEv','error','createTimestamp','Solve','UNIVER_UNKNOWN','UniverLicensePlugin','205335rpbEYE','rangeId','_injector','IThreadCommentDataSourceService','onReady','UniverThreadCommentDataSourcePlugin','saveCommentToSnapshot','UniverInstanceType','Disposable','stringify','userID','Edit','code','@univerjs/thread-comment-ui','addUser','@univerjs-pro/collaboration-client','resolveComment','user','DependentOn','@univerjs/core','33xLJgNq','Solved','payload','type','forEach','values','bufferTime','length','symbol','_sessionService','subscribe','getMemberID','445064VeFpgj','getComment','format','resolved','_threadCommentDataSourceService','size','COMMENT','/universer-api/user/list','deleteComment','/list','getUnit','filter','Reply','body','_initUserSync','270aUpsxt','replyId','/solved','ThreadCommentModel','parentId','CollaborationSessionService','toStringTag','CommentService','CustomRangeType','_threadCommentModel','IConfigService','pluginName'];_0x116e=function(){return _0x4d6fd6;};return _0x116e();}let p=class extends c[_0x13e4c0(0x117)]{constructor(_0x4a60d8,_0x3b9c85,_0x28713f,_0x116796){const _0x5f415f=_0x13e4c0;super(),this[_0x5f415f(0xd4)]=_0x4a60d8,this[_0x5f415f(0x147)]=_0x3b9c85,this[_0x5f415f(0xf1)]=_0x28713f,this[_0x5f415f(0x111)]=_0x116796,this['_init'](),this[_0x5f415f(0x13d)]();}[_0x13e4c0(0x13d)](){const _0x5bcb38=_0x13e4c0;this[_0x5bcb38(0x105)](this[_0x5bcb38(0x147)]['commentUpdate$'][_0x5bcb38(0xfb)](w[_0x5bcb38(0x129)](0x10))[_0x5bcb38(0x12d)](_0x3ad83c=>{const _0x2111bb=_0x5bcb38,_0x385cc6=new Set();_0x3ad83c[_0x2111bb(0x127)](_0x4c4fae=>{const _0x167f9b=_0x2111bb;switch(_0x4c4fae['type']){case _0x167f9b(0xcb):{const _0x49fb32=_0x4c4fae[_0x167f9b(0x125)][_0x167f9b(0xf7)];_0x385cc6[_0x167f9b(0xcb)](_0x49fb32);break;}}}),R(this[_0x2111bb(0x111)],_0x385cc6);}));}['_init'](){const _0x4f46cb=_0x13e4c0;this[_0x4f46cb(0x105)](this[_0x4f46cb(0xd4)][_0x4f46cb(0x102)]['subscribe'](async _0x5aefb1=>{const _0x5dd356=_0x4f46cb;var _0x22722c,_0x4ebeb6,_0x59509c,_0x2912c3;const _0x5b4db9=(_0x22722c=this[_0x5dd356(0x147)]['getUnit'](_0x5aefb1[_0x5dd356(0x104)])[_0x5dd356(0xd8)](_0x1dc417=>_0x1dc417['threadId']===_0x5aefb1[_0x5dd356(0xfe)]))==null?void 0x0:_0x22722c['root'];if(!_0x5b4db9)return;const {unitId:_0x5bc70b,subUnitId:_0x2cc2ca}=_0x5b4db9;switch(_0x5aefb1[_0x5dd356(0x120)]&&this[_0x5dd356(0xf1)]['addUser'](_0x5aefb1[_0x5dd356(0x120)]),_0x5aefb1[_0x5dd356(0x126)]){case v[_0x5dd356(0x14a)]:break;case v[_0x5dd356(0x13b)]:{this[_0x5dd356(0x147)][_0x5dd356(0xd6)](_0x5bc70b,_0x2cc2ca,{'unitId':_0x5bc70b,'subUnitId':_0x2cc2ca,'ref':'','id':_0x5aefb1[_0x5dd356(0x13f)],'dT':f(+_0x5aefb1[_0x5dd356(0x10b)]),'threadId':_0x5aefb1[_0x5dd356(0xfe)],'personId':(_0x59509c=(_0x4ebeb6=_0x5aefb1[_0x5dd356(0x120)])==null?void 0x0:_0x4ebeb6[_0x5dd356(0x119)])!=null?_0x59509c:_0x5aefb1['userId'],'text':JSON['parse'](_0x5aefb1[_0x5dd356(0xf0)]),'parentId':_0x5b4db9['id']});break;}case v['Delete']:{const _0x4aa4eb=this[_0x5dd356(0x147)][_0x5dd356(0x130)](_0x5bc70b,_0x2cc2ca,_0x5aefb1['replyId']);_0x4aa4eb&&_0x4aa4eb[_0x5dd356(0x142)]&&this[_0x5dd356(0x147)][_0x5dd356(0x137)](_0x5bc70b,_0x2cc2ca,_0x5aefb1[_0x5dd356(0x13f)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x5bc70b,_0x2cc2ca,{'commentId':_0x5aefb1[_0x5dd356(0x13f)],'text':JSON[_0x5dd356(0xc9)](_0x5aefb1['content'])});break;}case v[_0x5dd356(0x10c)]:{const _0x264fef=(_0x2912c3=this[_0x5dd356(0x147)][_0x5dd356(0x139)](_0x5aefb1[_0x5dd356(0x104)])['find'](_0x587091=>_0x587091[_0x5dd356(0xfe)]===_0x5aefb1[_0x5dd356(0xfe)]))==null?void 0x0:_0x2912c3[_0x5dd356(0xea)];_0x264fef&&this[_0x5dd356(0x147)][_0x5dd356(0x11f)](_0x5bc70b,_0x2cc2ca,_0x264fef['id'],_0x5aefb1['solved']===I[_0x5dd356(0x124)]);break;}}}));}};p=E([S(0x0,c[_0x13e4c0(0x101)](b[_0x13e4c0(0x145)])),S(0x1,c[_0x13e4c0(0x101)](M[_0x13e4c0(0x141)])),S(0x2,c[_0x13e4c0(0x101)](c[_0x13e4c0(0xf2)])),S(0x3,c[_0x13e4c0(0x101)](c[_0x13e4c0(0xd9)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x13e4c0(0xdb)],x=(_0x1205ce,_0x4fb0de,_0x170e0c,_0x5a51af)=>{const _0x24d43c=_0x13e4c0;for(var _0x8659c4=_0x5a51af>0x1?void 0x0:_0x5a51af?A(_0x4fb0de,_0x170e0c):_0x4fb0de,_0xd51712=_0x1205ce[_0x24d43c(0x12a)]-0x1,_0x34fa6d;_0xd51712>=0x0;_0xd51712--)(_0x34fa6d=_0x1205ce[_0xd51712])&&(_0x8659c4=_0x34fa6d(_0x8659c4)||_0x8659c4);return _0x8659c4;},_=(_0x27a9ce,_0x3239ed)=>(_0x134c64,_0x2f52a2)=>_0x3239ed(_0x134c64,_0x2f52a2,_0x27a9ce);function Y(_0x584777,_0xa4030b){const _0x571b4e=_0x13e4c0,_0x3fd377=_0x584777[_0x571b4e(0xe5)][0x0];return{..._0xa4030b,'id':_0x3fd377[_0x571b4e(0x13f)],'resolved':_0x584777[_0x571b4e(0xff)]===0x1,'dT':f(_0x3fd377[_0x571b4e(0x10b)]),'personId':_0x3fd377[_0x571b4e(0x107)],'threadId':_0x3fd377['threadId']};}function G(_0x141a63,_0x1b88b1,_0x50e815){const _0x556267=_0x13e4c0;var _0x2a2424,_0x249472;if(((_0x249472=(_0x2a2424=_0x141a63==null?void 0x0:_0x141a63['replies'])==null?void 0x0:_0x2a2424[_0x556267(0x12a)])!=null?_0x249472:0x0)>0x0){const _0x18d664=(_0x4484f9,_0x418e1f)=>({'id':_0x4484f9[_0x556267(0x13f)],'threadId':_0x4484f9[_0x556267(0xfe)],'dT':f(_0x4484f9[_0x556267(0x10b)]),'personId':_0x4484f9[_0x556267(0x107)],'resolved':_0x141a63[_0x556267(0xff)]===I[_0x556267(0x124)],'unitId':_0x1b88b1,'subUnitId':_0x50e815,'text':JSON[_0x556267(0xc9)](_0x4484f9[_0x556267(0xf0)]),'parentId':_0x418e1f}),_0x313f55=_0x18d664(_0x141a63[_0x556267(0xe5)][0x0]);return{..._0x313f55,'children':_0x141a63[_0x556267(0xe5)][_0x556267(0xdf)](0x1)[_0x556267(0xdc)](_0x4f7655=>_0x18d664(_0x4f7655,_0x313f55['id']))};}return null;}let g=class{constructor(_0x4142de,_0x2c7451,_0x5b8573,_0x183298){const _0xf34b3f=_0x13e4c0;this[_0xf34b3f(0xe8)]=_0x4142de,this['_userService']=_0x2c7451,this[_0xf34b3f(0x12c)]=_0x5b8573,this[_0xf34b3f(0x111)]=_0x183298;}async[_0x13e4c0(0xd6)](_0x58b2bd){const _0x186c8f=_0x13e4c0;var _0xa90636,_0x270d7c;const {parentId:_0x47e100,unitId:_0x1c2b95,text:_0x52f90e,threadId:_0x44d5b6}=_0x58b2bd,_0x4a28d6=(_0x270d7c=(_0xa90636=_0x52f90e[_0x186c8f(0xd2)])==null?void 0x0:_0xa90636[_0x186c8f(0x13a)](_0x2a9af0=>_0x2a9af0['rangeType']===c[_0x186c8f(0x146)][_0x186c8f(0x135)])[_0x186c8f(0xdc)](_0x7620b=>_0x7620b[_0x186c8f(0x110)]))!=null?_0x270d7c:[],_0x5d8134=JSON[_0x186c8f(0x118)](_0x52f90e),_0x424c5e=(await this['_sessionService'][_0x186c8f(0x108)](_0x1c2b95))[_0x186c8f(0x12e)]();if(_0x47e100){const _0x5f079d={'memberId':_0x424c5e,'unitId':_0x1c2b95,'content':_0x5d8134,'mention':_0x4a28d6,'threadId':_0x44d5b6},_0x94cf5f=(await this['_httpService'][_0x186c8f(0xe6)](_0x186c8f(0xd5)+_0x1c2b95+_0x186c8f(0x100),{'body':_0x5f079d}))[_0x186c8f(0x13c)][_0x186c8f(0xee)];return{..._0x58b2bd,'id':_0x94cf5f[_0x186c8f(0x13f)],'dT':c['dayjs'](+_0x94cf5f[_0x186c8f(0x10b)])[_0x186c8f(0x131)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x94cf5f[_0x186c8f(0x107)]};}else{const _0x42fe0a={'memberId':_0x424c5e,'unitId':_0x1c2b95,'content':_0x5d8134,'mention':_0x4a28d6},_0x5483a8=await this[_0x186c8f(0xe8)]['post'](_0x186c8f(0xd5)+_0x1c2b95+_0x186c8f(0xfc),{'body':_0x42fe0a});return Y(_0x5483a8[_0x186c8f(0x13c)][_0x186c8f(0xef)],_0x58b2bd);}}async[_0x13e4c0(0xf6)](_0x376661){const _0x8d4836=_0x13e4c0;var _0x32ad04,_0x1aae6b;const {text:_0x1d7431,unitId:_0x4e4193}=_0x376661,_0x140c9f=(_0x1aae6b=(_0x32ad04=_0x1d7431[_0x8d4836(0xd2)])==null?void 0x0:_0x32ad04[_0x8d4836(0x13a)](_0x2ad2e3=>_0x2ad2e3[_0x8d4836(0x106)]===c[_0x8d4836(0x146)]['COMMENT'])[_0x8d4836(0xdc)](_0x20c2ac=>_0x20c2ac['rangeId']))!=null?_0x1aae6b:[],_0x3f432e=JSON['stringify'](_0x1d7431),_0x2002f9=_0x376661['threadId'],_0x191df4=_0x376661['id'],_0x50f0fd={'memberId':(await this[_0x8d4836(0x12c)][_0x8d4836(0x108)](_0x4e4193))[_0x8d4836(0x12e)](),'unitId':_0x4e4193,'threadId':_0x2002f9,'mention':_0x140c9f,'content':_0x3f432e,'replyId':_0x191df4},_0x38e963=await this[_0x8d4836(0xe8)]['post'](_0x8d4836(0xd5)+_0x4e4193+_0x8d4836(0xc7),{'body':_0x50f0fd});return!_0x38e963['body']['error']||_0x38e963[_0x8d4836(0x13c)]['error'][_0x8d4836(0x11b)]===0x1;}async[_0x13e4c0(0x11f)](_0x46358a){const _0x56584f=_0x13e4c0,{unitId:_0x96801}=_0x46358a,_0x227889=_0x46358a[_0x56584f(0xfe)],_0x5997e1={'memberId':this['_userService'][_0x56584f(0xcc)]()[_0x56584f(0x119)],'unitId':_0x96801,'threadId':_0x227889,'solved':_0x46358a[_0x56584f(0x132)]?I['Solved']:I['OpenOrReOpen']},_0x652d6=await this['_httpService'][_0x56584f(0xe6)](_0x56584f(0xd5)+_0x96801+_0x56584f(0x140),{'body':_0x5997e1});return!_0x652d6[_0x56584f(0x13c)][_0x56584f(0x10a)]||_0x652d6[_0x56584f(0x13c)][_0x56584f(0x10a)][_0x56584f(0x11b)]===0x1;}async[_0x13e4c0(0x137)](_0x4a8f61,_0x4293ec,_0x20d3d5,_0x7a3a18){const _0x58b313=_0x13e4c0,_0x1a0455={'memberId':(await this[_0x58b313(0x12c)]['requireSession'](_0x4a8f61))['getMemberID'](),'threadId':_0x20d3d5,'replyId':_0x7a3a18,'unitId':_0x4a8f61},_0x389d2e=await this[_0x58b313(0xe8)][_0x58b313(0xe6)](_0x58b313(0xd5)+_0x4a8f61+_0x58b313(0xdd),{'body':_0x1a0455});return!_0x389d2e['body'][_0x58b313(0x10a)]||_0x389d2e['body'][_0x58b313(0x10a)][_0x58b313(0x11b)]===0x1;}async[_0x13e4c0(0xec)](_0x5e0892,_0xfa956e,_0x550d5c){const _0x583a9a=_0x13e4c0,_0x85421e={'unitId':_0x5e0892,'threadId':_0x550d5c},_0x9c4509=await this[_0x583a9a(0xe8)]['post'](_0x583a9a(0xd5)+_0x5e0892+_0x583a9a(0x138),{'body':_0x85421e}),_0x307d65=_0x550d5c[_0x583a9a(0xdc)](_0x576826=>G(_0x9c4509['body'][_0x583a9a(0xce)][_0x576826],_0x5e0892,_0xfa956e))['filter'](Boolean);return Object[_0x583a9a(0x128)](_0x9c4509[_0x583a9a(0x13c)][_0x583a9a(0xfa)])[_0x583a9a(0x127)](_0x44e3b3=>{const _0x2e1c65=_0x583a9a;this[_0x2e1c65(0xf1)]['addUser'](_0x44e3b3);}),_0x307d65;}[_0x13e4c0(0x115)](_0x222c5a){const _0x4a19f3=_0x13e4c0;return{'id':_0x222c5a['id'],'threadId':_0x222c5a[_0x4a19f3(0xfe)],'ref':_0x222c5a[_0x4a19f3(0xf8)]};}};function _0x5c8b(_0x36593a,_0xe14f2f){const _0x116e8a=_0x116e();return _0x5c8b=function(_0x5c8b33,_0x156b20){_0x5c8b33=_0x5c8b33-0xc7;let _0x3d480e=_0x116e8a[_0x5c8b33];return _0x3d480e;},_0x5c8b(_0x36593a,_0xe14f2f);}g=x([_(0x0,c[_0x13e4c0(0x101)](P['HTTPService'])),_(0x1,c[_0x13e4c0(0x101)](c[_0x13e4c0(0xf2)])),_(0x2,c['Inject'](b[_0x13e4c0(0x143)])),_(0x3,c[_0x13e4c0(0x101)](c[_0x13e4c0(0xd9)]))],g);var H=Object[_0x13e4c0(0xdb)],J=(_0x389e1c,_0x37ba42,_0x5ad650,_0x3f7200)=>{for(var _0x554df7=_0x3f7200>0x1?void 0x0:_0x3f7200?H(_0x37ba42,_0x5ad650):_0x37ba42,_0x462c9b=_0x389e1c['length']-0x1,_0x6c1722;_0x462c9b>=0x0;_0x462c9b--)(_0x6c1722=_0x389e1c[_0x462c9b])&&(_0x554df7=_0x6c1722(_0x554df7)||_0x554df7);return _0x554df7;},y=(_0x289a6c,_0x2a08af)=>(_0x3fa146,_0x2973a9)=>_0x2a08af(_0x3fa146,_0x2973a9,_0x289a6c);let C=class extends c['Disposable']{constructor(_0x18255a,_0x486f0a){const _0x1d5564=_0x13e4c0;super(),this[_0x1d5564(0x133)]=_0x18255a,this[_0x1d5564(0xf3)]=_0x486f0a,this[_0x1d5564(0xf9)]();}[_0x13e4c0(0xf9)](){const _0x37c2bd=_0x13e4c0;this['_threadCommentDataSourceService'][_0x37c2bd(0xed)]=this[_0x37c2bd(0xf3)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x13e4c0(0x112)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x13e4c0(0xe1)],L=Object[_0x13e4c0(0xdb)],Z=(_0x3c326a,_0x3d3d19,_0x3e6a2b)=>_0x3d3d19 in _0x3c326a?F(_0x3c326a,_0x3d3d19,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e6a2b}):_0x3c326a[_0x3d3d19]=_0x3e6a2b,W=(_0x2b842e,_0x92cd84,_0x5428a8,_0x5dbf57)=>{for(var _0x2906b0=_0x5dbf57>0x1?void 0x0:_0x5dbf57?L(_0x92cd84,_0x5428a8):_0x92cd84,_0x461445=_0x2b842e['length']-0x1,_0x50f6bb;_0x461445>=0x0;_0x461445--)(_0x50f6bb=_0x2b842e[_0x461445])&&(_0x2906b0=_0x50f6bb(_0x2906b0)||_0x2906b0);return _0x2906b0;},O=(_0x460fa9,_0xc1d7d8)=>(_0x3d0b70,_0x40f662)=>_0xc1d7d8(_0x3d0b70,_0x40f662,_0x460fa9),N=(_0x2e14e2,_0x24369e,_0x29957e)=>Z(_0x2e14e2,typeof _0x24369e!=_0x13e4c0(0x12b)?_0x24369e+'':_0x24369e,_0x29957e);exports[_0x13e4c0(0x114)]=class extends c[_0x13e4c0(0xe9)]{constructor(_0x98f0b7=D,_0x1f6981,_0x8f164e){const _0x3ba687=_0x13e4c0;super(),this['_config']=_0x98f0b7,this['_injector']=_0x1f6981,this[_0x3ba687(0xd3)]=_0x8f164e;const {..._0x3a2382}=c['merge']({},D,this['_config']);this[_0x3ba687(0xd3)][_0x3ba687(0xf4)](q,_0x3a2382);}['onStarting'](){const _0x4b2828=_0x13e4c0;[[g],[C],[p]][_0x4b2828(0x127)](_0x3129cc=>{const _0xe839dc=_0x4b2828;this[_0xe839dc(0x111)][_0xe839dc(0xcb)](_0x3129cc);});}[_0x13e4c0(0x113)](){const _0x39a968=_0x13e4c0;this[_0x39a968(0x111)][_0x39a968(0xd7)](C),this[_0x39a968(0x111)][_0x39a968(0xd7)](p);}},N(exports[_0x13e4c0(0x114)],_0x13e4c0(0x149),U),N(exports[_0x13e4c0(0x114)],_0x13e4c0(0x126),c[_0x13e4c0(0x116)][_0x13e4c0(0x10d)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x13e4c0(0x121)](j[_0x13e4c0(0x103)],b['UniverCollaborationClientPlugin'],T[_0x13e4c0(0x10e)]),O(0x1,c[_0x13e4c0(0x101)](c[_0x13e4c0(0xd9)])),O(0x2,c[_0x13e4c0(0x148)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2d64(){const _0x59bceb=['get','getUser','values','forEach','Solve','content','personId','userID','_userService','dataSource','slice','createTimestamp','Solved','Reply','_injector','_threadCommentDataSource','_sessionService','resolveComment','Add','root','commentUpdate$','setConfig','add','userId','users','UNIVER_UNKNOWN','5376065SbCUoS','_threadCommentModel','onStarting','type','replyId','getComment','listComments','format','Unknown','symbol','14792771SAlByn','Edit','_init','69492zPBeik','_config','getCurrentUser','OpenOrReOpen','parse','pipe','find','body','error','delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','user','filter','7721076SvNABq','/solved','size','updateComment','/edit','map','_configService','customRanges','replies','disposeWithMe','rangeId','comments','2804118CQcIeI','rangeType','threadId','UNRECOGNIZED','stringify','/universer-api/comment/unit/','939608jEpkkZ','getUnit','subscribe','requireSession','getMemberID','code','syncUpdateMutationToColla','pluginName','post','thread-comment-data-source.config','solved','_commentService','/universer-api/user/list','_httpService','addComment','addUser','_initDataSource','_initUserSync','onReady','length','/delete','_threadCommentDataSourceService','defineProperty','YYYY/MM/DD\x20HH:mm','payload','Delete','resolved','unitId','getOwnPropertyDescriptor','3203920uZRLvd','deleteComment'];_0x2d64=function(){return _0x59bceb;};return _0x2d64();}const _0x4dba33=_0x4736;(function(_0x351b66,_0x1b9215){const _0x1b7a0b=_0x4736,_0x5a0dea=_0x351b66();while(!![]){try{const _0x2a432d=parseInt(_0x1b7a0b(0xe9))/0x1+parseInt(_0x1b7a0b(0xa3))/0x2+-parseInt(_0x1b7a0b(0x9d))/0x3+parseInt(_0x1b7a0b(0xc0))/0x4+parseInt(_0x1b7a0b(0xdc))/0x5+parseInt(_0x1b7a0b(0xf6))/0x6+-parseInt(_0x1b7a0b(0xe6))/0x7;if(_0x2a432d===_0x1b9215)break;else _0x5a0dea['push'](_0x5a0dea['shift']());}catch(_0x331313){_0x5a0dea['push'](_0x5a0dea['shift']());}}}(_0x2d64,0x9fc28));import{CommentService as _0x517e1e,CollaborationSessionService as _0x26443c,UniverCollaborationClientPlugin as _0x555b77}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x31472d}from'@univerjs-pro/license';import{dayjs as _0xecc4f7,UserManagerService as _0x3e8b45,Inject as _0x52ad8a,Injector as _0x4f75b2,Disposable as _0x39c95b,CustomRangeType as _0x11ef42,UniverInstanceType as _0x14a626,DependentOn as _0xb6ea23,IConfigService as _0x2f9de9,Plugin as _0x50b830,merge as _0x47d5b2}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x27994a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x380ac8,IThreadCommentDataSourceService as _0x174b3e}from'@univerjs/thread-comment';function _0x4736(_0x433a08,_0x4310b6){const _0x2d6405=_0x2d64();return _0x4736=function(_0x47366f,_0x25f25e){_0x47366f=_0x47366f-0x95;let _0x28a8af=_0x2d6405[_0x47366f];return _0x28a8af;},_0x4736(_0x433a08,_0x4310b6);}import{bufferTime as _0x3d88cb}from'rxjs';import{HTTPService as _0x139184}from'@univerjs/network';const W=_0x4dba33(0xf3);var I=(_0x5a3361=>(_0x5a3361[_0x5a3361[_0x4dba33(0xec)]=0x0]=_0x4dba33(0xec),_0x5a3361[_0x5a3361[_0x4dba33(0xce)]=0x1]=_0x4dba33(0xce),_0x5a3361[_0x5a3361['UNRECOGNIZED']=-0x1]=_0x4dba33(0xa0),_0x5a3361))(I||{}),v=(_0x1d37ee=>(_0x1d37ee[_0x1d37ee[_0x4dba33(0xe4)]=0x0]=_0x4dba33(0xe4),_0x1d37ee[_0x1d37ee[_0x4dba33(0xd4)]=0x1]=_0x4dba33(0xd4),_0x1d37ee[_0x1d37ee['Reply']=0x2]=_0x4dba33(0xcf),_0x1d37ee[_0x1d37ee[_0x4dba33(0xe7)]=0x3]='Edit',_0x1d37ee[_0x1d37ee[_0x4dba33(0xbc)]=0x4]=_0x4dba33(0xbc),_0x1d37ee[_0x1d37ee[_0x4dba33(0xc6)]=0x5]=_0x4dba33(0xc6),_0x1d37ee[_0x1d37ee['UNRECOGNIZED']=-0x1]=_0x4dba33(0xa0),_0x1d37ee))(v||{});const D=_0x5d309e=>_0xecc4f7(new Date(+_0x5d309e))['format'](_0x4dba33(0xba)),B=async(_0x2924de,_0x378e43)=>{const _0x2a1af9=_0x4dba33,_0x78ec37=_0x2924de[_0x2a1af9(0xc2)](_0x3e8b45),_0x93570e=_0x2924de[_0x2a1af9(0xc2)](_0x139184);_0x378e43[_0x2a1af9(0xc5)](_0x310d21=>{const _0x285ed6=_0x2a1af9;_0x78ec37[_0x285ed6(0xc3)](_0x310d21)&&_0x378e43[_0x285ed6(0xf2)](_0x310d21);}),_0x378e43[_0x2a1af9(0xf8)]&&(await _0x93570e[_0x2a1af9(0xc2)](_0x2a1af9(0xaf),{'params':{'userIDs':[..._0x378e43]}}))['body'][_0x2a1af9(0xda)][_0x2a1af9(0xc5)](_0x25d143=>{const _0x2797b1=_0x2a1af9;_0x25d143&&_0x78ec37[_0x2797b1(0xb2)](_0x25d143);});};var K=Object[_0x4dba33(0xbf)],V=(_0x5bc2cd,_0x386bfd,_0x18001e,_0x4f6191)=>{const _0x2be544=_0x4dba33;for(var _0xdcf453=_0x4f6191>0x1?void 0x0:_0x4f6191?K(_0x386bfd,_0x18001e):_0x386bfd,_0x395f1f=_0x5bc2cd[_0x2be544(0xb6)]-0x1,_0x2de2d4;_0x395f1f>=0x0;_0x395f1f--)(_0x2de2d4=_0x5bc2cd[_0x395f1f])&&(_0xdcf453=_0x2de2d4(_0xdcf453)||_0xdcf453);return _0xdcf453;},p=(_0x3e2d60,_0xb12739)=>(_0xe486e5,_0x316ce4)=>_0xb12739(_0xe486e5,_0x316ce4,_0x3e2d60);let S=class extends _0x39c95b{constructor(_0x30321c,_0x1c62b0,_0x2948e5,_0x48e584){const _0x184a0a=_0x4dba33;super(),this['_commentService']=_0x30321c,this[_0x184a0a(0xdd)]=_0x1c62b0,this[_0x184a0a(0xca)]=_0x2948e5,this[_0x184a0a(0xd0)]=_0x48e584,this[_0x184a0a(0xe8)](),this[_0x184a0a(0xb4)]();}[_0x4dba33(0xb4)](){const _0x3ec7c6=_0x4dba33;this[_0x3ec7c6(0x9a)](this[_0x3ec7c6(0xdd)]['commentUpdate$'][_0x3ec7c6(0xee)](_0x3d88cb(0x10))[_0x3ec7c6(0xa5)](_0x326525=>{const _0x47815c=_0x3ec7c6,_0x58147b=new Set();_0x326525[_0x47815c(0xc5)](_0x399544=>{const _0x21b87b=_0x47815c;switch(_0x399544[_0x21b87b(0xdf)]){case _0x21b87b(0xd8):{const _0x146c08=_0x399544[_0x21b87b(0xbb)][_0x21b87b(0xc8)];_0x58147b[_0x21b87b(0xd8)](_0x146c08);break;}}}),B(this[_0x47815c(0xd0)],_0x58147b);}));}[_0x4dba33(0xe8)](){const _0xe64854=_0x4dba33;this[_0xe64854(0x9a)](this[_0xe64854(0xae)][_0xe64854(0xd6)][_0xe64854(0xa5)](async _0x1a3615=>{const _0x5f7e31=_0xe64854;var _0x39947f,_0x3b3211,_0x58c678,_0x1e76f4;const _0x3ce0a8=(_0x39947f=this[_0x5f7e31(0xdd)][_0x5f7e31(0xa4)](_0x1a3615['unitId'])[_0x5f7e31(0xef)](_0x591fa2=>_0x591fa2[_0x5f7e31(0x9f)]===_0x1a3615['threadId']))==null?void 0x0:_0x39947f[_0x5f7e31(0xd5)];if(!_0x3ce0a8)return;const {unitId:_0x4b3e29,subUnitId:_0x88af0c}=_0x3ce0a8;switch(_0x1a3615[_0x5f7e31(0xf4)]&&this[_0x5f7e31(0xca)][_0x5f7e31(0xb2)](_0x1a3615['user']),_0x1a3615[_0x5f7e31(0xdf)]){case v[_0x5f7e31(0xd4)]:break;case v[_0x5f7e31(0xcf)]:{this[_0x5f7e31(0xdd)][_0x5f7e31(0xb1)](_0x4b3e29,_0x88af0c,{'unitId':_0x4b3e29,'subUnitId':_0x88af0c,'ref':'','id':_0x1a3615[_0x5f7e31(0xe0)],'dT':D(+_0x1a3615[_0x5f7e31(0xcd)]),'threadId':_0x1a3615[_0x5f7e31(0x9f)],'personId':(_0x58c678=(_0x3b3211=_0x1a3615['user'])==null?void 0x0:_0x3b3211[_0x5f7e31(0xc9)])!=null?_0x58c678:_0x1a3615['userId'],'text':JSON[_0x5f7e31(0xed)](_0x1a3615[_0x5f7e31(0xc7)]),'parentId':_0x3ce0a8['id']});break;}case v['Delete']:{const _0x126a27=this[_0x5f7e31(0xdd)][_0x5f7e31(0xe1)](_0x4b3e29,_0x88af0c,_0x1a3615[_0x5f7e31(0xe0)]);_0x126a27&&_0x126a27['parentId']&&this[_0x5f7e31(0xdd)][_0x5f7e31(0xc1)](_0x4b3e29,_0x88af0c,_0x1a3615['replyId']);break;}case v[_0x5f7e31(0xe7)]:{this[_0x5f7e31(0xdd)]['updateComment'](_0x4b3e29,_0x88af0c,{'commentId':_0x1a3615[_0x5f7e31(0xe0)],'text':JSON[_0x5f7e31(0xed)](_0x1a3615[_0x5f7e31(0xc7)])});break;}case v[_0x5f7e31(0xc6)]:{const _0x350489=(_0x1e76f4=this[_0x5f7e31(0xdd)][_0x5f7e31(0xa4)](_0x1a3615[_0x5f7e31(0xbe)])['find'](_0x61a048=>_0x61a048[_0x5f7e31(0x9f)]===_0x1a3615[_0x5f7e31(0x9f)]))==null?void 0x0:_0x1e76f4[_0x5f7e31(0xd5)];_0x350489&&this[_0x5f7e31(0xdd)]['resolveComment'](_0x4b3e29,_0x88af0c,_0x350489['id'],_0x1a3615[_0x5f7e31(0xad)]===I[_0x5f7e31(0xce)]);break;}}}));}};S=V([p(0x0,_0x52ad8a(_0x517e1e)),p(0x1,_0x52ad8a(_0x380ac8)),p(0x2,_0x52ad8a(_0x3e8b45)),p(0x3,_0x52ad8a(_0x4f75b2))],S);const z=_0x4dba33(0xac),M={};var k=Object[_0x4dba33(0xbf)],Q=(_0x558021,_0x1d9598,_0x31b55b,_0x458b55)=>{for(var _0x40c203=_0x458b55>0x1?void 0x0:_0x458b55?k(_0x1d9598,_0x31b55b):_0x1d9598,_0x50563f=_0x558021['length']-0x1,_0x5b7674;_0x50563f>=0x0;_0x50563f--)(_0x5b7674=_0x558021[_0x50563f])&&(_0x40c203=_0x5b7674(_0x40c203)||_0x40c203);return _0x40c203;},_=(_0x413d96,_0x2990e8)=>(_0x4bf2f3,_0x4ba811)=>_0x2990e8(_0x4bf2f3,_0x4ba811,_0x413d96);function X(_0x31ba39,_0x371509){const _0x429407=_0x4dba33,_0x537aab=_0x31ba39[_0x429407(0x99)][0x0];return{..._0x371509,'id':_0x537aab[_0x429407(0xe0)],'resolved':_0x31ba39[_0x429407(0xad)]===0x1,'dT':D(_0x537aab[_0x429407(0xcd)]),'personId':_0x537aab[_0x429407(0xd9)],'threadId':_0x537aab['threadId']};}function ee(_0xe685fd,_0x5f5d3b,_0x2a0b20){const _0x3abf78=_0x4dba33;var _0x300f75,_0x4f8f7d;if(((_0x4f8f7d=(_0x300f75=_0xe685fd==null?void 0x0:_0xe685fd[_0x3abf78(0x99)])==null?void 0x0:_0x300f75['length'])!=null?_0x4f8f7d:0x0)>0x0){const _0x260cbd=(_0x54118b,_0x44fc2b)=>({'id':_0x54118b[_0x3abf78(0xe0)],'threadId':_0x54118b[_0x3abf78(0x9f)],'dT':D(_0x54118b[_0x3abf78(0xcd)]),'personId':_0x54118b[_0x3abf78(0xd9)],'resolved':_0xe685fd[_0x3abf78(0xad)]===I[_0x3abf78(0xce)],'unitId':_0x5f5d3b,'subUnitId':_0x2a0b20,'text':JSON[_0x3abf78(0xed)](_0x54118b[_0x3abf78(0xc7)]),'parentId':_0x44fc2b}),_0x121217=_0x260cbd(_0xe685fd[_0x3abf78(0x99)][0x0]);return{..._0x121217,'children':_0xe685fd[_0x3abf78(0x99)][_0x3abf78(0xcc)](0x1)[_0x3abf78(0x96)](_0x46f803=>_0x260cbd(_0x46f803,_0x121217['id']))};}return null;}let f=class{constructor(_0x47803b,_0x2eed7f,_0x5b0cf6,_0x2badce){const _0x1daf7c=_0x4dba33;this[_0x1daf7c(0xb0)]=_0x47803b,this[_0x1daf7c(0xca)]=_0x2eed7f,this[_0x1daf7c(0xd2)]=_0x5b0cf6,this[_0x1daf7c(0xd0)]=_0x2badce;}async[_0x4dba33(0xb1)](_0x1a7bff){const _0x2a8166=_0x4dba33;var _0x467d6f,_0x4035da;const {parentId:_0x248672,unitId:_0x34c416,text:_0x30934a,threadId:_0x1d6dc7}=_0x1a7bff,_0x42b6eb=(_0x4035da=(_0x467d6f=_0x30934a[_0x2a8166(0x98)])==null?void 0x0:_0x467d6f[_0x2a8166(0xf5)](_0x3e1a80=>_0x3e1a80[_0x2a8166(0x9e)]===_0x11ef42['COMMENT'])['map'](_0x66df2e=>_0x66df2e[_0x2a8166(0x9b)]))!=null?_0x4035da:[],_0x325778=JSON[_0x2a8166(0xa1)](_0x30934a),_0x281ac0=(await this[_0x2a8166(0xd2)][_0x2a8166(0xa6)](_0x34c416))[_0x2a8166(0xa7)]();if(_0x248672){const _0x4bb6e9={'memberId':_0x281ac0,'unitId':_0x34c416,'content':_0x325778,'mention':_0x42b6eb,'threadId':_0x1d6dc7},_0x1f7a1e=(await this[_0x2a8166(0xb0)][_0x2a8166(0xab)](_0x2a8166(0xa2)+_0x34c416+'/reply',{'body':_0x4bb6e9}))[_0x2a8166(0xf0)]['reply'];return{..._0x1a7bff,'id':_0x1f7a1e[_0x2a8166(0xe0)],'dT':_0xecc4f7(+_0x1f7a1e[_0x2a8166(0xcd)])[_0x2a8166(0xe3)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1f7a1e[_0x2a8166(0xd9)]};}else{const _0x5cb3c3={'memberId':_0x281ac0,'unitId':_0x34c416,'content':_0x325778,'mention':_0x42b6eb},_0x564669=await this[_0x2a8166(0xb0)]['post'](_0x2a8166(0xa2)+_0x34c416+'/add',{'body':_0x5cb3c3});return X(_0x564669[_0x2a8166(0xf0)]['comment'],_0x1a7bff);}}async[_0x4dba33(0xf9)](_0x3ec6e0){const _0x250601=_0x4dba33;var _0x43a090,_0x5f3abd;const {text:_0x27ed8d,unitId:_0x570bbf}=_0x3ec6e0,_0x46cc37=(_0x5f3abd=(_0x43a090=_0x27ed8d[_0x250601(0x98)])==null?void 0x0:_0x43a090[_0x250601(0xf5)](_0x48e8ce=>_0x48e8ce['rangeType']===_0x11ef42['COMMENT'])[_0x250601(0x96)](_0x33a724=>_0x33a724[_0x250601(0x9b)]))!=null?_0x5f3abd:[],_0x5caaaa=JSON['stringify'](_0x27ed8d),_0x142862=_0x3ec6e0['threadId'],_0x4886fc=_0x3ec6e0['id'],_0x28ea38={'memberId':(await this[_0x250601(0xd2)][_0x250601(0xa6)](_0x570bbf))[_0x250601(0xa7)](),'unitId':_0x570bbf,'threadId':_0x142862,'mention':_0x46cc37,'content':_0x5caaaa,'replyId':_0x4886fc},_0x21e7f6=await this['_httpService'][_0x250601(0xab)](_0x250601(0xa2)+_0x570bbf+_0x250601(0x95),{'body':_0x28ea38});return!_0x21e7f6[_0x250601(0xf0)][_0x250601(0xf1)]||_0x21e7f6[_0x250601(0xf0)][_0x250601(0xf1)][_0x250601(0xa8)]===0x1;}async[_0x4dba33(0xd3)](_0x1919cc){const _0x9faa02=_0x4dba33,{unitId:_0x493e5d}=_0x1919cc,_0x49180e=_0x1919cc[_0x9faa02(0x9f)],_0x1efc2b={'memberId':this[_0x9faa02(0xca)][_0x9faa02(0xeb)]()[_0x9faa02(0xc9)],'unitId':_0x493e5d,'threadId':_0x49180e,'solved':_0x1919cc[_0x9faa02(0xbd)]?I[_0x9faa02(0xce)]:I[_0x9faa02(0xec)]},_0x54abc9=await this[_0x9faa02(0xb0)][_0x9faa02(0xab)](_0x9faa02(0xa2)+_0x493e5d+_0x9faa02(0xf7),{'body':_0x1efc2b});return!_0x54abc9[_0x9faa02(0xf0)][_0x9faa02(0xf1)]||_0x54abc9[_0x9faa02(0xf0)][_0x9faa02(0xf1)][_0x9faa02(0xa8)]===0x1;}async[_0x4dba33(0xc1)](_0x43691e,_0x2b2f4f,_0x34251d,_0x23e41f){const _0x4b8d6a=_0x4dba33,_0x170742={'memberId':(await this[_0x4b8d6a(0xd2)]['requireSession'](_0x43691e))[_0x4b8d6a(0xa7)](),'threadId':_0x34251d,'replyId':_0x23e41f,'unitId':_0x43691e},_0x559d5e=await this[_0x4b8d6a(0xb0)][_0x4b8d6a(0xab)](_0x4b8d6a(0xa2)+_0x43691e+_0x4b8d6a(0xb7),{'body':_0x170742});return!_0x559d5e['body'][_0x4b8d6a(0xf1)]||_0x559d5e['body'][_0x4b8d6a(0xf1)][_0x4b8d6a(0xa8)]===0x1;}async[_0x4dba33(0xe2)](_0x3e3910,_0xef5d9e,_0x91eef3){const _0x346aa8=_0x4dba33,_0x500d44={'unitId':_0x3e3910,'threadId':_0x91eef3},_0x48e7e3=await this['_httpService'][_0x346aa8(0xab)](_0x346aa8(0xa2)+_0x3e3910+'/list',{'body':_0x500d44}),_0x4edf43=_0x91eef3['map'](_0x5d8dae=>ee(_0x48e7e3['body'][_0x346aa8(0x9c)][_0x5d8dae],_0x3e3910,_0xef5d9e))[_0x346aa8(0xf5)](Boolean);return Object[_0x346aa8(0xc4)](_0x48e7e3[_0x346aa8(0xf0)][_0x346aa8(0xda)])['forEach'](_0x53c5b3=>{const _0x3ef91a=_0x346aa8;this[_0x3ef91a(0xca)]['addUser'](_0x53c5b3);}),_0x4edf43;}['saveCommentToSnapshot'](_0x24a136){const _0xa6a7b8=_0x4dba33;return{'id':_0x24a136['id'],'threadId':_0x24a136[_0xa6a7b8(0x9f)],'ref':_0x24a136['ref']};}};f=Q([_(0x0,_0x52ad8a(_0x139184)),_(0x1,_0x52ad8a(_0x3e8b45)),_(0x2,_0x52ad8a(_0x26443c)),_(0x3,_0x52ad8a(_0x4f75b2))],f);var re=Object[_0x4dba33(0xbf)],te=(_0x10af04,_0x5e3df8,_0x3b7221,_0x113102)=>{const _0x96b84e=_0x4dba33;for(var _0x2de4f1=_0x113102>0x1?void 0x0:_0x113102?re(_0x5e3df8,_0x3b7221):_0x5e3df8,_0xedbf25=_0x10af04[_0x96b84e(0xb6)]-0x1,_0x49b043;_0xedbf25>=0x0;_0xedbf25--)(_0x49b043=_0x10af04[_0xedbf25])&&(_0x2de4f1=_0x49b043(_0x2de4f1)||_0x2de4f1);return _0x2de4f1;},N=(_0x5ab501,_0xe58d38)=>(_0x3a0f93,_0x3ef5a8)=>_0xe58d38(_0x3a0f93,_0x3ef5a8,_0x5ab501);let g=class extends _0x39c95b{constructor(_0x2294dc,_0x289b36){const _0x219ce9=_0x4dba33;super(),this[_0x219ce9(0xb8)]=_0x2294dc,this[_0x219ce9(0xd1)]=_0x289b36,this[_0x219ce9(0xb3)]();}[_0x4dba33(0xb3)](){const _0x3b8b6e=_0x4dba33;this[_0x3b8b6e(0xb8)][_0x3b8b6e(0xcb)]=this[_0x3b8b6e(0xd1)],this[_0x3b8b6e(0xb8)][_0x3b8b6e(0xa9)]=!0x1;}};g=te([N(0x0,_0x174b3e),N(0x1,_0x52ad8a(f))],g);var se=Object[_0x4dba33(0xb9)],oe=Object[_0x4dba33(0xbf)],ne=(_0x17da63,_0x5d0600,_0x550ce2)=>_0x5d0600 in _0x17da63?se(_0x17da63,_0x5d0600,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x550ce2}):_0x17da63[_0x5d0600]=_0x550ce2,ie=(_0x3ad096,_0x30645a,_0x4182d4,_0x4c9d2e)=>{for(var _0x2fe203=_0x4c9d2e>0x1?void 0x0:_0x4c9d2e?oe(_0x30645a,_0x4182d4):_0x30645a,_0xd11ca0=_0x3ad096['length']-0x1,_0x5a3ff3;_0xd11ca0>=0x0;_0xd11ca0--)(_0x5a3ff3=_0x3ad096[_0xd11ca0])&&(_0x2fe203=_0x5a3ff3(_0x2fe203)||_0x2fe203);return _0x2fe203;},w=(_0x2ad0dd,_0x12cbc1)=>(_0xcbc644,_0x21c27d)=>_0x12cbc1(_0xcbc644,_0x21c27d,_0x2ad0dd),$=(_0x360bed,_0x2bc033,_0x2886f8)=>ne(_0x360bed,typeof _0x2bc033!=_0x4dba33(0xe5)?_0x2bc033+'':_0x2bc033,_0x2886f8);let b=class extends _0x50b830{constructor(_0x190450=M,_0x14109d,_0x3305a0){const _0x26d54b=_0x4dba33;super(),this[_0x26d54b(0xea)]=_0x190450,this[_0x26d54b(0xd0)]=_0x14109d,this['_configService']=_0x3305a0;const {..._0x4deb81}=_0x47d5b2({},M,this[_0x26d54b(0xea)]);this[_0x26d54b(0x97)][_0x26d54b(0xd7)](z,_0x4deb81);}[_0x4dba33(0xde)](){[[f],[g],[S]]['forEach'](_0x438651=>{const _0xc5f49=_0x4736;this[_0xc5f49(0xd0)]['add'](_0x438651);});}[_0x4dba33(0xb5)](){const _0x2b9078=_0x4dba33;this[_0x2b9078(0xd0)]['get'](g),this[_0x2b9078(0xd0)]['get'](S);}};$(b,_0x4dba33(0xaa),W),$(b,_0x4dba33(0xdf),_0x14a626[_0x4dba33(0xdb)]),b=ie([_0xb6ea23(_0x27994a,_0x555b77,_0x31472d),w(0x1,_0x52ad8a(_0x4f75b2)),w(0x2,_0x2f9de9)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x5ea299=_0x2775;(function(_0x221f88,_0x118314){const _0x45faec=_0x2775,_0x40b7d5=_0x221f88();while(!![]){try{const _0xb18404=parseInt(_0x45faec(0x13e))/0x1+parseInt(_0x45faec(0x146))/0x2+-parseInt(_0x45faec(0x112))/0x3*(-parseInt(_0x45faec(0x11b))/0x4)+parseInt(_0x45faec(0x16e))/0x5+-parseInt(_0x45faec(0x150))/0x6*(parseInt(_0x45faec(0x14e))/0x7)+-parseInt(_0x45faec(0x15c))/0x8+-parseInt(_0x45faec(0x168))/0x9*(-parseInt(_0x45faec(0x11f))/0xa);if(_0xb18404===_0x118314)break;else _0x40b7d5['push'](_0x40b7d5['shift']());}catch(_0x5363e9){_0x40b7d5['push'](_0x40b7d5['shift']());}}}(_0x3587,0x40456));import{CommentService as _0xe371d,CollaborationSessionService as _0x27a803,UniverCollaborationClientPlugin as _0x18a047}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x170b60}from'@univerjs-pro/license';import{dayjs as _0x2b85d2,UserManagerService as _0xbb1ba0,Inject as _0x3fdad7,Injector as _0x235f21,Disposable as _0x52035e,CustomRangeType as _0x49fbf1,UniverInstanceType as _0x593503,DependentOn as _0x2b24ef,IConfigService as _0x591b1e,Plugin as _0x49816f,merge as _0xa3f01a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x36a0a4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b77e1,IThreadCommentDataSourceService as _0x48d157}from'@univerjs/thread-comment';import{bufferTime as _0x291499}from'rxjs';import{HTTPService as _0x428c70}from'@univerjs/network';const W=_0x5ea299(0x137);var I=(_0x3aec58=>(_0x3aec58[_0x3aec58[_0x5ea299(0x119)]=0x0]=_0x5ea299(0x119),_0x3aec58[_0x3aec58['Solved']=0x1]='Solved',_0x3aec58[_0x3aec58[_0x5ea299(0x129)]=-0x1]='UNRECOGNIZED',_0x3aec58))(I||{}),v=(_0x270e0e=>(_0x270e0e[_0x270e0e[_0x5ea299(0x164)]=0x0]=_0x5ea299(0x164),_0x270e0e[_0x270e0e[_0x5ea299(0x122)]=0x1]='Add',_0x270e0e[_0x270e0e[_0x5ea299(0x120)]=0x2]=_0x5ea299(0x120),_0x270e0e[_0x270e0e[_0x5ea299(0x16c)]=0x3]=_0x5ea299(0x16c),_0x270e0e[_0x270e0e['Delete']=0x4]='Delete',_0x270e0e[_0x270e0e[_0x5ea299(0x12a)]=0x5]=_0x5ea299(0x12a),_0x270e0e[_0x270e0e[_0x5ea299(0x129)]=-0x1]=_0x5ea299(0x129),_0x270e0e))(v||{});function _0x3587(){const _0x8dceef=['_threadCommentDataSourceService','requireSession','7TGXraV','getUnit','341862ugeQUh','subscribe','stringify','filter','error','_initUserSync','_threadCommentDataSource','getUser','thread-comment-data-source.config','size','code','content','1657240uvkcds','/solved','forEach','pluginName','/reply','_init','_userService','addUser','Unknown','saveCommentToSnapshot','delete','pipe','18AxOWTM','ref','/delete','disposeWithMe','Edit','reply','1745995DjvBJS','parse','personId','rangeType','body','find','addComment','getCurrentUser','root','userID','YYYY/MM/DD\x20HH:mm','_injector','31257HWNQXM','deleteComment','replyId','dataSource','defineProperty','createTimestamp','/add','OpenOrReOpen','type','4OLSfNo','updateComment','/universer-api/comment/unit/','userId','209470nKRnuI','Reply','listComments','Add','format','getOwnPropertyDescriptor','_config','unitId','COMMENT','get','UNRECOGNIZED','Solve','Solved','_initDataSource','solved','payload','_threadCommentModel','getMemberID','comment','add','commentUpdate$','rangeId','replies','/universer-api/user/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','slice','length','getComment','/list','/edit','96401zneNMh','map','values','onStarting','resolved','_commentService','_httpService','_configService','58946ccdsGz','_sessionService','user','resolveComment','threadId','post'];_0x3587=function(){return _0x8dceef;};return _0x3587();}const D=_0x4b3481=>_0x2b85d2(new Date(+_0x4b3481))[_0x5ea299(0x123)](_0x5ea299(0x110)),B=async(_0x4d93be,_0x24d195)=>{const _0x1828ef=_0x5ea299,_0xe71a94=_0x4d93be[_0x1828ef(0x128)](_0xbb1ba0),_0x51cc08=_0x4d93be[_0x1828ef(0x128)](_0x428c70);_0x24d195[_0x1828ef(0x15e)](_0x10b60b=>{const _0x37414b=_0x1828ef;_0xe71a94[_0x37414b(0x157)](_0x10b60b)&&_0x24d195[_0x37414b(0x166)](_0x10b60b);}),_0x24d195[_0x1828ef(0x159)]&&(await _0x51cc08[_0x1828ef(0x128)](_0x1828ef(0x136),{'params':{'userIDs':[..._0x24d195]}}))['body']['users'][_0x1828ef(0x15e)](_0x5a7899=>{const _0x257fbd=_0x1828ef;_0x5a7899&&_0xe71a94[_0x257fbd(0x163)](_0x5a7899);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x36aa7e,_0x52cffa,_0x3dd4da,_0x1c23b5)=>{const _0x29fb7f=_0x5ea299;for(var _0xfdb222=_0x1c23b5>0x1?void 0x0:_0x1c23b5?K(_0x52cffa,_0x3dd4da):_0x52cffa,_0x3a13be=_0x36aa7e[_0x29fb7f(0x13a)]-0x1,_0x1080c6;_0x3a13be>=0x0;_0x3a13be--)(_0x1080c6=_0x36aa7e[_0x3a13be])&&(_0xfdb222=_0x1080c6(_0xfdb222)||_0xfdb222);return _0xfdb222;},p=(_0x3da172,_0x2c1238)=>(_0x5d464b,_0x5dc498)=>_0x2c1238(_0x5d464b,_0x5dc498,_0x3da172);let S=class extends _0x52035e{constructor(_0x49f4ff,_0x508397,_0x118cf1,_0x4fb849){const _0x1f7a1e=_0x5ea299;super(),this[_0x1f7a1e(0x143)]=_0x49f4ff,this[_0x1f7a1e(0x12f)]=_0x508397,this[_0x1f7a1e(0x162)]=_0x118cf1,this[_0x1f7a1e(0x111)]=_0x4fb849,this[_0x1f7a1e(0x161)](),this[_0x1f7a1e(0x155)]();}[_0x5ea299(0x155)](){const _0x32eefc=_0x5ea299;this[_0x32eefc(0x16b)](this[_0x32eefc(0x12f)][_0x32eefc(0x133)][_0x32eefc(0x167)](_0x291499(0x10))[_0x32eefc(0x151)](_0x7c62b9=>{const _0x55aba7=_0x32eefc,_0x17c5b7=new Set();_0x7c62b9[_0x55aba7(0x15e)](_0x2c147d=>{const _0x121be4=_0x55aba7;switch(_0x2c147d[_0x121be4(0x11a)]){case _0x121be4(0x132):{const _0x5593d1=_0x2c147d[_0x121be4(0x12e)][_0x121be4(0x170)];_0x17c5b7[_0x121be4(0x132)](_0x5593d1);break;}}}),B(this[_0x55aba7(0x111)],_0x17c5b7);}));}['_init'](){const _0x7a5cd8=_0x5ea299;this[_0x7a5cd8(0x16b)](this[_0x7a5cd8(0x143)]['commentUpdate$'][_0x7a5cd8(0x151)](async _0x25c866=>{const _0x3bc76b=_0x7a5cd8;var _0x47a79b,_0x131bb0,_0x88e959,_0x44a1b7;const _0x553b12=(_0x47a79b=this[_0x3bc76b(0x12f)][_0x3bc76b(0x14f)](_0x25c866['unitId'])['find'](_0x3a0289=>_0x3a0289[_0x3bc76b(0x14a)]===_0x25c866['threadId']))==null?void 0x0:_0x47a79b[_0x3bc76b(0x10e)];if(!_0x553b12)return;const {unitId:_0xc8fb53,subUnitId:_0x75e6c1}=_0x553b12;switch(_0x25c866[_0x3bc76b(0x148)]&&this[_0x3bc76b(0x162)][_0x3bc76b(0x163)](_0x25c866[_0x3bc76b(0x148)]),_0x25c866[_0x3bc76b(0x11a)]){case v['Add']:break;case v[_0x3bc76b(0x120)]:{this['_threadCommentModel'][_0x3bc76b(0x174)](_0xc8fb53,_0x75e6c1,{'unitId':_0xc8fb53,'subUnitId':_0x75e6c1,'ref':'','id':_0x25c866['replyId'],'dT':D(+_0x25c866['createTimestamp']),'threadId':_0x25c866[_0x3bc76b(0x14a)],'personId':(_0x88e959=(_0x131bb0=_0x25c866[_0x3bc76b(0x148)])==null?void 0x0:_0x131bb0[_0x3bc76b(0x10f)])!=null?_0x88e959:_0x25c866[_0x3bc76b(0x11e)],'text':JSON[_0x3bc76b(0x16f)](_0x25c866[_0x3bc76b(0x15b)]),'parentId':_0x553b12['id']});break;}case v['Delete']:{const _0x53081a=this['_threadCommentModel'][_0x3bc76b(0x13b)](_0xc8fb53,_0x75e6c1,_0x25c866[_0x3bc76b(0x114)]);_0x53081a&&_0x53081a['parentId']&&this['_threadCommentModel'][_0x3bc76b(0x113)](_0xc8fb53,_0x75e6c1,_0x25c866[_0x3bc76b(0x114)]);break;}case v['Edit']:{this[_0x3bc76b(0x12f)]['updateComment'](_0xc8fb53,_0x75e6c1,{'commentId':_0x25c866[_0x3bc76b(0x114)],'text':JSON[_0x3bc76b(0x16f)](_0x25c866[_0x3bc76b(0x15b)])});break;}case v[_0x3bc76b(0x12a)]:{const _0x3241d4=(_0x44a1b7=this['_threadCommentModel'][_0x3bc76b(0x14f)](_0x25c866[_0x3bc76b(0x126)])[_0x3bc76b(0x173)](_0x41d161=>_0x41d161['threadId']===_0x25c866[_0x3bc76b(0x14a)]))==null?void 0x0:_0x44a1b7['root'];_0x3241d4&&this[_0x3bc76b(0x12f)][_0x3bc76b(0x149)](_0xc8fb53,_0x75e6c1,_0x3241d4['id'],_0x25c866['solved']===I[_0x3bc76b(0x12b)]);break;}}}));}};function _0x2775(_0x2f7246,_0x2e4ae8){const _0x35877b=_0x3587();return _0x2775=function(_0x277507,_0x1a0bde){_0x277507=_0x277507-0x10e;let _0x343e4a=_0x35877b[_0x277507];return _0x343e4a;},_0x2775(_0x2f7246,_0x2e4ae8);}S=V([p(0x0,_0x3fdad7(_0xe371d)),p(0x1,_0x3fdad7(_0x4b77e1)),p(0x2,_0x3fdad7(_0xbb1ba0)),p(0x3,_0x3fdad7(_0x235f21))],S);const z=_0x5ea299(0x158),M={};var k=Object[_0x5ea299(0x124)],Q=(_0x413f57,_0x271b5b,_0xdbecf6,_0x5bc830)=>{const _0x7056cc=_0x5ea299;for(var _0x5a3881=_0x5bc830>0x1?void 0x0:_0x5bc830?k(_0x271b5b,_0xdbecf6):_0x271b5b,_0x30eb18=_0x413f57[_0x7056cc(0x13a)]-0x1,_0x4b5022;_0x30eb18>=0x0;_0x30eb18--)(_0x4b5022=_0x413f57[_0x30eb18])&&(_0x5a3881=_0x4b5022(_0x5a3881)||_0x5a3881);return _0x5a3881;},_=(_0x179929,_0x3d86fd)=>(_0x13bf3f,_0x316943)=>_0x3d86fd(_0x13bf3f,_0x316943,_0x179929);function X(_0x27a531,_0x120137){const _0x2ea8df=_0x5ea299,_0x209979=_0x27a531['replies'][0x0];return{..._0x120137,'id':_0x209979[_0x2ea8df(0x114)],'resolved':_0x27a531[_0x2ea8df(0x12d)]===0x1,'dT':D(_0x209979[_0x2ea8df(0x117)]),'personId':_0x209979[_0x2ea8df(0x11e)],'threadId':_0x209979['threadId']};}function ee(_0x31e04f,_0xbcb621,_0x302a95){const _0xab605c=_0x5ea299;var _0x41f88e,_0x193c9e;if(((_0x193c9e=(_0x41f88e=_0x31e04f==null?void 0x0:_0x31e04f[_0xab605c(0x135)])==null?void 0x0:_0x41f88e[_0xab605c(0x13a)])!=null?_0x193c9e:0x0)>0x0){const _0x8f7c49=(_0x1cc58a,_0x2f7cb5)=>({'id':_0x1cc58a['replyId'],'threadId':_0x1cc58a[_0xab605c(0x14a)],'dT':D(_0x1cc58a[_0xab605c(0x117)]),'personId':_0x1cc58a[_0xab605c(0x11e)],'resolved':_0x31e04f['solved']===I['Solved'],'unitId':_0xbcb621,'subUnitId':_0x302a95,'text':JSON['parse'](_0x1cc58a['content']),'parentId':_0x2f7cb5}),_0x2dcac0=_0x8f7c49(_0x31e04f['replies'][0x0]);return{..._0x2dcac0,'children':_0x31e04f[_0xab605c(0x135)][_0xab605c(0x139)](0x1)[_0xab605c(0x13f)](_0x42a154=>_0x8f7c49(_0x42a154,_0x2dcac0['id']))};}return null;}let f=class{constructor(_0x308bf4,_0x59b614,_0x2145b4,_0x3070fc){const _0x5e8f90=_0x5ea299;this['_httpService']=_0x308bf4,this[_0x5e8f90(0x162)]=_0x59b614,this[_0x5e8f90(0x147)]=_0x2145b4,this[_0x5e8f90(0x111)]=_0x3070fc;}async['addComment'](_0x57cb68){const _0x279382=_0x5ea299;var _0x3542be,_0x57b7a3;const {parentId:_0x3707e9,unitId:_0x1995bf,text:_0x543c0c,threadId:_0x217d0e}=_0x57cb68,_0x25c6bf=(_0x57b7a3=(_0x3542be=_0x543c0c['customRanges'])==null?void 0x0:_0x3542be[_0x279382(0x153)](_0x312df=>_0x312df[_0x279382(0x171)]===_0x49fbf1[_0x279382(0x127)])['map'](_0x255e91=>_0x255e91[_0x279382(0x134)]))!=null?_0x57b7a3:[],_0x2afdaf=JSON[_0x279382(0x152)](_0x543c0c),_0xdcc61b=(await this[_0x279382(0x147)][_0x279382(0x14d)](_0x1995bf))[_0x279382(0x130)]();if(_0x3707e9){const _0xac05be={'memberId':_0xdcc61b,'unitId':_0x1995bf,'content':_0x2afdaf,'mention':_0x25c6bf,'threadId':_0x217d0e},_0x3efd72=(await this[_0x279382(0x144)][_0x279382(0x14b)](_0x279382(0x11d)+_0x1995bf+_0x279382(0x160),{'body':_0xac05be}))[_0x279382(0x172)][_0x279382(0x16d)];return{..._0x57cb68,'id':_0x3efd72[_0x279382(0x114)],'dT':_0x2b85d2(+_0x3efd72['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x3efd72[_0x279382(0x11e)]};}else{const _0x3bb490={'memberId':_0xdcc61b,'unitId':_0x1995bf,'content':_0x2afdaf,'mention':_0x25c6bf},_0x183afb=await this[_0x279382(0x144)][_0x279382(0x14b)](_0x279382(0x11d)+_0x1995bf+_0x279382(0x118),{'body':_0x3bb490});return X(_0x183afb[_0x279382(0x172)][_0x279382(0x131)],_0x57cb68);}}async[_0x5ea299(0x11c)](_0x36f7cc){const _0x5751bf=_0x5ea299;var _0x37879e,_0x37a5e1;const {text:_0x13fe46,unitId:_0x27ea15}=_0x36f7cc,_0x32d625=(_0x37a5e1=(_0x37879e=_0x13fe46[_0x5751bf(0x138)])==null?void 0x0:_0x37879e[_0x5751bf(0x153)](_0x2796cc=>_0x2796cc[_0x5751bf(0x171)]===_0x49fbf1['COMMENT'])[_0x5751bf(0x13f)](_0x8ac410=>_0x8ac410[_0x5751bf(0x134)]))!=null?_0x37a5e1:[],_0x54e8ca=JSON[_0x5751bf(0x152)](_0x13fe46),_0x2b28bc=_0x36f7cc[_0x5751bf(0x14a)],_0x40bb3b=_0x36f7cc['id'],_0x5ea4df={'memberId':(await this[_0x5751bf(0x147)]['requireSession'](_0x27ea15))['getMemberID'](),'unitId':_0x27ea15,'threadId':_0x2b28bc,'mention':_0x32d625,'content':_0x54e8ca,'replyId':_0x40bb3b},_0x4da681=await this['_httpService'][_0x5751bf(0x14b)]('/universer-api/comment/unit/'+_0x27ea15+_0x5751bf(0x13d),{'body':_0x5ea4df});return!_0x4da681['body'][_0x5751bf(0x154)]||_0x4da681[_0x5751bf(0x172)][_0x5751bf(0x154)][_0x5751bf(0x15a)]===0x1;}async[_0x5ea299(0x149)](_0x2bc3c6){const _0xd0bd31=_0x5ea299,{unitId:_0x2e57a8}=_0x2bc3c6,_0x15232c=_0x2bc3c6[_0xd0bd31(0x14a)],_0x184d1c={'memberId':this[_0xd0bd31(0x162)][_0xd0bd31(0x175)]()[_0xd0bd31(0x10f)],'unitId':_0x2e57a8,'threadId':_0x15232c,'solved':_0x2bc3c6[_0xd0bd31(0x142)]?I[_0xd0bd31(0x12b)]:I[_0xd0bd31(0x119)]},_0x55b8c7=await this[_0xd0bd31(0x144)][_0xd0bd31(0x14b)](_0xd0bd31(0x11d)+_0x2e57a8+_0xd0bd31(0x15d),{'body':_0x184d1c});return!_0x55b8c7[_0xd0bd31(0x172)][_0xd0bd31(0x154)]||_0x55b8c7['body'][_0xd0bd31(0x154)][_0xd0bd31(0x15a)]===0x1;}async[_0x5ea299(0x113)](_0x56e62a,_0x497b54,_0x2ed065,_0x57af67){const _0x2f8242=_0x5ea299,_0x158ce3={'memberId':(await this[_0x2f8242(0x147)][_0x2f8242(0x14d)](_0x56e62a))[_0x2f8242(0x130)](),'threadId':_0x2ed065,'replyId':_0x57af67,'unitId':_0x56e62a},_0x1c4e4c=await this['_httpService']['post'](_0x2f8242(0x11d)+_0x56e62a+_0x2f8242(0x16a),{'body':_0x158ce3});return!_0x1c4e4c[_0x2f8242(0x172)]['error']||_0x1c4e4c['body']['error']['code']===0x1;}async[_0x5ea299(0x121)](_0x4ccc5f,_0x8566d8,_0x19aa9a){const _0x4aef7e=_0x5ea299,_0x20b817={'unitId':_0x4ccc5f,'threadId':_0x19aa9a},_0x5400c6=await this['_httpService'][_0x4aef7e(0x14b)]('/universer-api/comment/unit/'+_0x4ccc5f+_0x4aef7e(0x13c),{'body':_0x20b817}),_0xdd5b8d=_0x19aa9a['map'](_0x28cb32=>ee(_0x5400c6['body']['comments'][_0x28cb32],_0x4ccc5f,_0x8566d8))[_0x4aef7e(0x153)](Boolean);return Object[_0x4aef7e(0x140)](_0x5400c6['body']['users'])[_0x4aef7e(0x15e)](_0x382785=>{const _0x28d683=_0x4aef7e;this[_0x28d683(0x162)]['addUser'](_0x382785);}),_0xdd5b8d;}[_0x5ea299(0x165)](_0x4ddf4d){const _0x24abfe=_0x5ea299;return{'id':_0x4ddf4d['id'],'threadId':_0x4ddf4d['threadId'],'ref':_0x4ddf4d[_0x24abfe(0x169)]};}};f=Q([_(0x0,_0x3fdad7(_0x428c70)),_(0x1,_0x3fdad7(_0xbb1ba0)),_(0x2,_0x3fdad7(_0x27a803)),_(0x3,_0x3fdad7(_0x235f21))],f);var re=Object[_0x5ea299(0x124)],te=(_0x2d58f2,_0x47765b,_0x1529e7,_0x90c0c9)=>{const _0x4d433f=_0x5ea299;for(var _0x4f6140=_0x90c0c9>0x1?void 0x0:_0x90c0c9?re(_0x47765b,_0x1529e7):_0x47765b,_0x261b4e=_0x2d58f2[_0x4d433f(0x13a)]-0x1,_0x49c117;_0x261b4e>=0x0;_0x261b4e--)(_0x49c117=_0x2d58f2[_0x261b4e])&&(_0x4f6140=_0x49c117(_0x4f6140)||_0x4f6140);return _0x4f6140;},N=(_0xa353db,_0x513b8e)=>(_0x58f045,_0x223655)=>_0x513b8e(_0x58f045,_0x223655,_0xa353db);let g=class extends _0x52035e{constructor(_0x7c2ed,_0x48e539){const _0x3fe157=_0x5ea299;super(),this['_threadCommentDataSourceService']=_0x7c2ed,this[_0x3fe157(0x156)]=_0x48e539,this[_0x3fe157(0x12c)]();}[_0x5ea299(0x12c)](){const _0x5aa42b=_0x5ea299;this[_0x5aa42b(0x14c)][_0x5aa42b(0x115)]=this[_0x5aa42b(0x156)],this[_0x5aa42b(0x14c)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x48d157),N(0x1,_0x3fdad7(f))],g);var se=Object[_0x5ea299(0x116)],oe=Object[_0x5ea299(0x124)],ne=(_0x5a5a63,_0x2581b7,_0x37a569)=>_0x2581b7 in _0x5a5a63?se(_0x5a5a63,_0x2581b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37a569}):_0x5a5a63[_0x2581b7]=_0x37a569,ie=(_0x440425,_0x258c12,_0xfca280,_0xa4019e)=>{for(var _0x2545c1=_0xa4019e>0x1?void 0x0:_0xa4019e?oe(_0x258c12,_0xfca280):_0x258c12,_0x5d147f=_0x440425['length']-0x1,_0x5753cd;_0x5d147f>=0x0;_0x5d147f--)(_0x5753cd=_0x440425[_0x5d147f])&&(_0x2545c1=_0x5753cd(_0x2545c1)||_0x2545c1);return _0x2545c1;},w=(_0x3b6533,_0x8ed453)=>(_0x4b67ec,_0x3f0ec1)=>_0x8ed453(_0x4b67ec,_0x3f0ec1,_0x3b6533),$=(_0x30636b,_0x5d5f85,_0x9e86d7)=>ne(_0x30636b,typeof _0x5d5f85!='symbol'?_0x5d5f85+'':_0x5d5f85,_0x9e86d7);let b=class extends _0x49816f{constructor(_0x2f1cb6=M,_0x245aa6,_0x36e94d){const _0x4c82bb=_0x5ea299;super(),this['_config']=_0x2f1cb6,this[_0x4c82bb(0x111)]=_0x245aa6,this[_0x4c82bb(0x145)]=_0x36e94d;const {..._0x29e1fa}=_0xa3f01a({},M,this[_0x4c82bb(0x125)]);this[_0x4c82bb(0x145)]['setConfig'](z,_0x29e1fa);}[_0x5ea299(0x141)](){const _0x83a653=_0x5ea299;[[f],[g],[S]][_0x83a653(0x15e)](_0x153a6a=>{const _0x48940d=_0x83a653;this['_injector'][_0x48940d(0x132)](_0x153a6a);});}['onReady'](){const _0x53f032=_0x5ea299;this['_injector'][_0x53f032(0x128)](g),this['_injector'][_0x53f032(0x128)](S);}};$(b,_0x5ea299(0x15f),W),$(b,_0x5ea299(0x11a),_0x593503['UNIVER_UNKNOWN']),b=ie([_0x2b24ef(_0x36a0a4,_0x18a047,_0x170b60),w(0x1,_0x3fdad7(_0x235f21)),w(0x2,_0x591b1e)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2d64(){const _0x59bceb=['get','getUser','values','forEach','Solve','content','personId','userID','_userService','dataSource','slice','createTimestamp','Solved','Reply','_injector','_threadCommentDataSource','_sessionService','resolveComment','Add','root','commentUpdate$','setConfig','add','userId','users','UNIVER_UNKNOWN','5376065SbCUoS','_threadCommentModel','onStarting','type','replyId','getComment','listComments','format','Unknown','symbol','14792771SAlByn','Edit','_init','69492zPBeik','_config','getCurrentUser','OpenOrReOpen','parse','pipe','find','body','error','delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','user','filter','7721076SvNABq','/solved','size','updateComment','/edit','map','_configService','customRanges','replies','disposeWithMe','rangeId','comments','2804118CQcIeI','rangeType','threadId','UNRECOGNIZED','stringify','/universer-api/comment/unit/','939608jEpkkZ','getUnit','subscribe','requireSession','getMemberID','code','syncUpdateMutationToColla','pluginName','post','thread-comment-data-source.config','solved','_commentService','/universer-api/user/list','_httpService','addComment','addUser','_initDataSource','_initUserSync','onReady','length','/delete','_threadCommentDataSourceService','defineProperty','YYYY/MM/DD\x20HH:mm','payload','Delete','resolved','unitId','getOwnPropertyDescriptor','3203920uZRLvd','deleteComment'];_0x2d64=function(){return _0x59bceb;};return _0x2d64();}const _0x4dba33=_0x4736;(function(_0x351b66,_0x1b9215){const _0x1b7a0b=_0x4736,_0x5a0dea=_0x351b66();while(!![]){try{const _0x2a432d=parseInt(_0x1b7a0b(0xe9))/0x1+parseInt(_0x1b7a0b(0xa3))/0x2+-parseInt(_0x1b7a0b(0x9d))/0x3+parseInt(_0x1b7a0b(0xc0))/0x4+parseInt(_0x1b7a0b(0xdc))/0x5+parseInt(_0x1b7a0b(0xf6))/0x6+-parseInt(_0x1b7a0b(0xe6))/0x7;if(_0x2a432d===_0x1b9215)break;else _0x5a0dea['push'](_0x5a0dea['shift']());}catch(_0x331313){_0x5a0dea['push'](_0x5a0dea['shift']());}}}(_0x2d64,0x9fc28));import{CommentService as _0x517e1e,CollaborationSessionService as _0x26443c,UniverCollaborationClientPlugin as _0x555b77}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x31472d}from'@univerjs-pro/license';import{dayjs as _0xecc4f7,UserManagerService as _0x3e8b45,Inject as _0x52ad8a,Injector as _0x4f75b2,Disposable as _0x39c95b,CustomRangeType as _0x11ef42,UniverInstanceType as _0x14a626,DependentOn as _0xb6ea23,IConfigService as _0x2f9de9,Plugin as _0x50b830,merge as _0x47d5b2}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x27994a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x380ac8,IThreadCommentDataSourceService as _0x174b3e}from'@univerjs/thread-comment';function _0x4736(_0x433a08,_0x4310b6){const _0x2d6405=_0x2d64();return _0x4736=function(_0x47366f,_0x25f25e){_0x47366f=_0x47366f-0x95;let _0x28a8af=_0x2d6405[_0x47366f];return _0x28a8af;},_0x4736(_0x433a08,_0x4310b6);}import{bufferTime as _0x3d88cb}from'rxjs';import{HTTPService as _0x139184}from'@univerjs/network';const W=_0x4dba33(0xf3);var I=(_0x5a3361=>(_0x5a3361[_0x5a3361[_0x4dba33(0xec)]=0x0]=_0x4dba33(0xec),_0x5a3361[_0x5a3361[_0x4dba33(0xce)]=0x1]=_0x4dba33(0xce),_0x5a3361[_0x5a3361['UNRECOGNIZED']=-0x1]=_0x4dba33(0xa0),_0x5a3361))(I||{}),v=(_0x1d37ee=>(_0x1d37ee[_0x1d37ee[_0x4dba33(0xe4)]=0x0]=_0x4dba33(0xe4),_0x1d37ee[_0x1d37ee[_0x4dba33(0xd4)]=0x1]=_0x4dba33(0xd4),_0x1d37ee[_0x1d37ee['Reply']=0x2]=_0x4dba33(0xcf),_0x1d37ee[_0x1d37ee[_0x4dba33(0xe7)]=0x3]='Edit',_0x1d37ee[_0x1d37ee[_0x4dba33(0xbc)]=0x4]=_0x4dba33(0xbc),_0x1d37ee[_0x1d37ee[_0x4dba33(0xc6)]=0x5]=_0x4dba33(0xc6),_0x1d37ee[_0x1d37ee['UNRECOGNIZED']=-0x1]=_0x4dba33(0xa0),_0x1d37ee))(v||{});const D=_0x5d309e=>_0xecc4f7(new Date(+_0x5d309e))['format'](_0x4dba33(0xba)),B=async(_0x2924de,_0x378e43)=>{const _0x2a1af9=_0x4dba33,_0x78ec37=_0x2924de[_0x2a1af9(0xc2)](_0x3e8b45),_0x93570e=_0x2924de[_0x2a1af9(0xc2)](_0x139184);_0x378e43[_0x2a1af9(0xc5)](_0x310d21=>{const _0x285ed6=_0x2a1af9;_0x78ec37[_0x285ed6(0xc3)](_0x310d21)&&_0x378e43[_0x285ed6(0xf2)](_0x310d21);}),_0x378e43[_0x2a1af9(0xf8)]&&(await _0x93570e[_0x2a1af9(0xc2)](_0x2a1af9(0xaf),{'params':{'userIDs':[..._0x378e43]}}))['body'][_0x2a1af9(0xda)][_0x2a1af9(0xc5)](_0x25d143=>{const _0x2797b1=_0x2a1af9;_0x25d143&&_0x78ec37[_0x2797b1(0xb2)](_0x25d143);});};var K=Object[_0x4dba33(0xbf)],V=(_0x5bc2cd,_0x386bfd,_0x18001e,_0x4f6191)=>{const _0x2be544=_0x4dba33;for(var _0xdcf453=_0x4f6191>0x1?void 0x0:_0x4f6191?K(_0x386bfd,_0x18001e):_0x386bfd,_0x395f1f=_0x5bc2cd[_0x2be544(0xb6)]-0x1,_0x2de2d4;_0x395f1f>=0x0;_0x395f1f--)(_0x2de2d4=_0x5bc2cd[_0x395f1f])&&(_0xdcf453=_0x2de2d4(_0xdcf453)||_0xdcf453);return _0xdcf453;},p=(_0x3e2d60,_0xb12739)=>(_0xe486e5,_0x316ce4)=>_0xb12739(_0xe486e5,_0x316ce4,_0x3e2d60);let S=class extends _0x39c95b{constructor(_0x30321c,_0x1c62b0,_0x2948e5,_0x48e584){const _0x184a0a=_0x4dba33;super(),this['_commentService']=_0x30321c,this[_0x184a0a(0xdd)]=_0x1c62b0,this[_0x184a0a(0xca)]=_0x2948e5,this[_0x184a0a(0xd0)]=_0x48e584,this[_0x184a0a(0xe8)](),this[_0x184a0a(0xb4)]();}[_0x4dba33(0xb4)](){const _0x3ec7c6=_0x4dba33;this[_0x3ec7c6(0x9a)](this[_0x3ec7c6(0xdd)]['commentUpdate$'][_0x3ec7c6(0xee)](_0x3d88cb(0x10))[_0x3ec7c6(0xa5)](_0x326525=>{const _0x47815c=_0x3ec7c6,_0x58147b=new Set();_0x326525[_0x47815c(0xc5)](_0x399544=>{const _0x21b87b=_0x47815c;switch(_0x399544[_0x21b87b(0xdf)]){case _0x21b87b(0xd8):{const _0x146c08=_0x399544[_0x21b87b(0xbb)][_0x21b87b(0xc8)];_0x58147b[_0x21b87b(0xd8)](_0x146c08);break;}}}),B(this[_0x47815c(0xd0)],_0x58147b);}));}[_0x4dba33(0xe8)](){const _0xe64854=_0x4dba33;this[_0xe64854(0x9a)](this[_0xe64854(0xae)][_0xe64854(0xd6)][_0xe64854(0xa5)](async _0x1a3615=>{const _0x5f7e31=_0xe64854;var _0x39947f,_0x3b3211,_0x58c678,_0x1e76f4;const _0x3ce0a8=(_0x39947f=this[_0x5f7e31(0xdd)][_0x5f7e31(0xa4)](_0x1a3615['unitId'])[_0x5f7e31(0xef)](_0x591fa2=>_0x591fa2[_0x5f7e31(0x9f)]===_0x1a3615['threadId']))==null?void 0x0:_0x39947f[_0x5f7e31(0xd5)];if(!_0x3ce0a8)return;const {unitId:_0x4b3e29,subUnitId:_0x88af0c}=_0x3ce0a8;switch(_0x1a3615[_0x5f7e31(0xf4)]&&this[_0x5f7e31(0xca)][_0x5f7e31(0xb2)](_0x1a3615['user']),_0x1a3615[_0x5f7e31(0xdf)]){case v[_0x5f7e31(0xd4)]:break;case v[_0x5f7e31(0xcf)]:{this[_0x5f7e31(0xdd)][_0x5f7e31(0xb1)](_0x4b3e29,_0x88af0c,{'unitId':_0x4b3e29,'subUnitId':_0x88af0c,'ref':'','id':_0x1a3615[_0x5f7e31(0xe0)],'dT':D(+_0x1a3615[_0x5f7e31(0xcd)]),'threadId':_0x1a3615[_0x5f7e31(0x9f)],'personId':(_0x58c678=(_0x3b3211=_0x1a3615['user'])==null?void 0x0:_0x3b3211[_0x5f7e31(0xc9)])!=null?_0x58c678:_0x1a3615['userId'],'text':JSON[_0x5f7e31(0xed)](_0x1a3615[_0x5f7e31(0xc7)]),'parentId':_0x3ce0a8['id']});break;}case v['Delete']:{const _0x126a27=this[_0x5f7e31(0xdd)][_0x5f7e31(0xe1)](_0x4b3e29,_0x88af0c,_0x1a3615[_0x5f7e31(0xe0)]);_0x126a27&&_0x126a27['parentId']&&this[_0x5f7e31(0xdd)][_0x5f7e31(0xc1)](_0x4b3e29,_0x88af0c,_0x1a3615['replyId']);break;}case v[_0x5f7e31(0xe7)]:{this[_0x5f7e31(0xdd)]['updateComment'](_0x4b3e29,_0x88af0c,{'commentId':_0x1a3615[_0x5f7e31(0xe0)],'text':JSON[_0x5f7e31(0xed)](_0x1a3615[_0x5f7e31(0xc7)])});break;}case v[_0x5f7e31(0xc6)]:{const _0x350489=(_0x1e76f4=this[_0x5f7e31(0xdd)][_0x5f7e31(0xa4)](_0x1a3615[_0x5f7e31(0xbe)])['find'](_0x61a048=>_0x61a048[_0x5f7e31(0x9f)]===_0x1a3615[_0x5f7e31(0x9f)]))==null?void 0x0:_0x1e76f4[_0x5f7e31(0xd5)];_0x350489&&this[_0x5f7e31(0xdd)]['resolveComment'](_0x4b3e29,_0x88af0c,_0x350489['id'],_0x1a3615[_0x5f7e31(0xad)]===I[_0x5f7e31(0xce)]);break;}}}));}};S=V([p(0x0,_0x52ad8a(_0x517e1e)),p(0x1,_0x52ad8a(_0x380ac8)),p(0x2,_0x52ad8a(_0x3e8b45)),p(0x3,_0x52ad8a(_0x4f75b2))],S);const z=_0x4dba33(0xac),M={};var k=Object[_0x4dba33(0xbf)],Q=(_0x558021,_0x1d9598,_0x31b55b,_0x458b55)=>{for(var _0x40c203=_0x458b55>0x1?void 0x0:_0x458b55?k(_0x1d9598,_0x31b55b):_0x1d9598,_0x50563f=_0x558021['length']-0x1,_0x5b7674;_0x50563f>=0x0;_0x50563f--)(_0x5b7674=_0x558021[_0x50563f])&&(_0x40c203=_0x5b7674(_0x40c203)||_0x40c203);return _0x40c203;},_=(_0x413d96,_0x2990e8)=>(_0x4bf2f3,_0x4ba811)=>_0x2990e8(_0x4bf2f3,_0x4ba811,_0x413d96);function X(_0x31ba39,_0x371509){const _0x429407=_0x4dba33,_0x537aab=_0x31ba39[_0x429407(0x99)][0x0];return{..._0x371509,'id':_0x537aab[_0x429407(0xe0)],'resolved':_0x31ba39[_0x429407(0xad)]===0x1,'dT':D(_0x537aab[_0x429407(0xcd)]),'personId':_0x537aab[_0x429407(0xd9)],'threadId':_0x537aab['threadId']};}function ee(_0xe685fd,_0x5f5d3b,_0x2a0b20){const _0x3abf78=_0x4dba33;var _0x300f75,_0x4f8f7d;if(((_0x4f8f7d=(_0x300f75=_0xe685fd==null?void 0x0:_0xe685fd[_0x3abf78(0x99)])==null?void 0x0:_0x300f75['length'])!=null?_0x4f8f7d:0x0)>0x0){const _0x260cbd=(_0x54118b,_0x44fc2b)=>({'id':_0x54118b[_0x3abf78(0xe0)],'threadId':_0x54118b[_0x3abf78(0x9f)],'dT':D(_0x54118b[_0x3abf78(0xcd)]),'personId':_0x54118b[_0x3abf78(0xd9)],'resolved':_0xe685fd[_0x3abf78(0xad)]===I[_0x3abf78(0xce)],'unitId':_0x5f5d3b,'subUnitId':_0x2a0b20,'text':JSON[_0x3abf78(0xed)](_0x54118b[_0x3abf78(0xc7)]),'parentId':_0x44fc2b}),_0x121217=_0x260cbd(_0xe685fd[_0x3abf78(0x99)][0x0]);return{..._0x121217,'children':_0xe685fd[_0x3abf78(0x99)][_0x3abf78(0xcc)](0x1)[_0x3abf78(0x96)](_0x46f803=>_0x260cbd(_0x46f803,_0x121217['id']))};}return null;}let f=class{constructor(_0x47803b,_0x2eed7f,_0x5b0cf6,_0x2badce){const _0x1daf7c=_0x4dba33;this[_0x1daf7c(0xb0)]=_0x47803b,this[_0x1daf7c(0xca)]=_0x2eed7f,this[_0x1daf7c(0xd2)]=_0x5b0cf6,this[_0x1daf7c(0xd0)]=_0x2badce;}async[_0x4dba33(0xb1)](_0x1a7bff){const _0x2a8166=_0x4dba33;var _0x467d6f,_0x4035da;const {parentId:_0x248672,unitId:_0x34c416,text:_0x30934a,threadId:_0x1d6dc7}=_0x1a7bff,_0x42b6eb=(_0x4035da=(_0x467d6f=_0x30934a[_0x2a8166(0x98)])==null?void 0x0:_0x467d6f[_0x2a8166(0xf5)](_0x3e1a80=>_0x3e1a80[_0x2a8166(0x9e)]===_0x11ef42['COMMENT'])['map'](_0x66df2e=>_0x66df2e[_0x2a8166(0x9b)]))!=null?_0x4035da:[],_0x325778=JSON[_0x2a8166(0xa1)](_0x30934a),_0x281ac0=(await this[_0x2a8166(0xd2)][_0x2a8166(0xa6)](_0x34c416))[_0x2a8166(0xa7)]();if(_0x248672){const _0x4bb6e9={'memberId':_0x281ac0,'unitId':_0x34c416,'content':_0x325778,'mention':_0x42b6eb,'threadId':_0x1d6dc7},_0x1f7a1e=(await this[_0x2a8166(0xb0)][_0x2a8166(0xab)](_0x2a8166(0xa2)+_0x34c416+'/reply',{'body':_0x4bb6e9}))[_0x2a8166(0xf0)]['reply'];return{..._0x1a7bff,'id':_0x1f7a1e[_0x2a8166(0xe0)],'dT':_0xecc4f7(+_0x1f7a1e[_0x2a8166(0xcd)])[_0x2a8166(0xe3)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1f7a1e[_0x2a8166(0xd9)]};}else{const _0x5cb3c3={'memberId':_0x281ac0,'unitId':_0x34c416,'content':_0x325778,'mention':_0x42b6eb},_0x564669=await this[_0x2a8166(0xb0)]['post'](_0x2a8166(0xa2)+_0x34c416+'/add',{'body':_0x5cb3c3});return X(_0x564669[_0x2a8166(0xf0)]['comment'],_0x1a7bff);}}async[_0x4dba33(0xf9)](_0x3ec6e0){const _0x250601=_0x4dba33;var _0x43a090,_0x5f3abd;const {text:_0x27ed8d,unitId:_0x570bbf}=_0x3ec6e0,_0x46cc37=(_0x5f3abd=(_0x43a090=_0x27ed8d[_0x250601(0x98)])==null?void 0x0:_0x43a090[_0x250601(0xf5)](_0x48e8ce=>_0x48e8ce['rangeType']===_0x11ef42['COMMENT'])[_0x250601(0x96)](_0x33a724=>_0x33a724[_0x250601(0x9b)]))!=null?_0x5f3abd:[],_0x5caaaa=JSON['stringify'](_0x27ed8d),_0x142862=_0x3ec6e0['threadId'],_0x4886fc=_0x3ec6e0['id'],_0x28ea38={'memberId':(await this[_0x250601(0xd2)][_0x250601(0xa6)](_0x570bbf))[_0x250601(0xa7)](),'unitId':_0x570bbf,'threadId':_0x142862,'mention':_0x46cc37,'content':_0x5caaaa,'replyId':_0x4886fc},_0x21e7f6=await this['_httpService'][_0x250601(0xab)](_0x250601(0xa2)+_0x570bbf+_0x250601(0x95),{'body':_0x28ea38});return!_0x21e7f6[_0x250601(0xf0)][_0x250601(0xf1)]||_0x21e7f6[_0x250601(0xf0)][_0x250601(0xf1)][_0x250601(0xa8)]===0x1;}async[_0x4dba33(0xd3)](_0x1919cc){const _0x9faa02=_0x4dba33,{unitId:_0x493e5d}=_0x1919cc,_0x49180e=_0x1919cc[_0x9faa02(0x9f)],_0x1efc2b={'memberId':this[_0x9faa02(0xca)][_0x9faa02(0xeb)]()[_0x9faa02(0xc9)],'unitId':_0x493e5d,'threadId':_0x49180e,'solved':_0x1919cc[_0x9faa02(0xbd)]?I[_0x9faa02(0xce)]:I[_0x9faa02(0xec)]},_0x54abc9=await this[_0x9faa02(0xb0)][_0x9faa02(0xab)](_0x9faa02(0xa2)+_0x493e5d+_0x9faa02(0xf7),{'body':_0x1efc2b});return!_0x54abc9[_0x9faa02(0xf0)][_0x9faa02(0xf1)]||_0x54abc9[_0x9faa02(0xf0)][_0x9faa02(0xf1)][_0x9faa02(0xa8)]===0x1;}async[_0x4dba33(0xc1)](_0x43691e,_0x2b2f4f,_0x34251d,_0x23e41f){const _0x4b8d6a=_0x4dba33,_0x170742={'memberId':(await this[_0x4b8d6a(0xd2)]['requireSession'](_0x43691e))[_0x4b8d6a(0xa7)](),'threadId':_0x34251d,'replyId':_0x23e41f,'unitId':_0x43691e},_0x559d5e=await this[_0x4b8d6a(0xb0)][_0x4b8d6a(0xab)](_0x4b8d6a(0xa2)+_0x43691e+_0x4b8d6a(0xb7),{'body':_0x170742});return!_0x559d5e['body'][_0x4b8d6a(0xf1)]||_0x559d5e['body'][_0x4b8d6a(0xf1)][_0x4b8d6a(0xa8)]===0x1;}async[_0x4dba33(0xe2)](_0x3e3910,_0xef5d9e,_0x91eef3){const _0x346aa8=_0x4dba33,_0x500d44={'unitId':_0x3e3910,'threadId':_0x91eef3},_0x48e7e3=await this['_httpService'][_0x346aa8(0xab)](_0x346aa8(0xa2)+_0x3e3910+'/list',{'body':_0x500d44}),_0x4edf43=_0x91eef3['map'](_0x5d8dae=>ee(_0x48e7e3['body'][_0x346aa8(0x9c)][_0x5d8dae],_0x3e3910,_0xef5d9e))[_0x346aa8(0xf5)](Boolean);return Object[_0x346aa8(0xc4)](_0x48e7e3[_0x346aa8(0xf0)][_0x346aa8(0xda)])['forEach'](_0x53c5b3=>{const _0x3ef91a=_0x346aa8;this[_0x3ef91a(0xca)]['addUser'](_0x53c5b3);}),_0x4edf43;}['saveCommentToSnapshot'](_0x24a136){const _0xa6a7b8=_0x4dba33;return{'id':_0x24a136['id'],'threadId':_0x24a136[_0xa6a7b8(0x9f)],'ref':_0x24a136['ref']};}};f=Q([_(0x0,_0x52ad8a(_0x139184)),_(0x1,_0x52ad8a(_0x3e8b45)),_(0x2,_0x52ad8a(_0x26443c)),_(0x3,_0x52ad8a(_0x4f75b2))],f);var re=Object[_0x4dba33(0xbf)],te=(_0x10af04,_0x5e3df8,_0x3b7221,_0x113102)=>{const _0x96b84e=_0x4dba33;for(var _0x2de4f1=_0x113102>0x1?void 0x0:_0x113102?re(_0x5e3df8,_0x3b7221):_0x5e3df8,_0xedbf25=_0x10af04[_0x96b84e(0xb6)]-0x1,_0x49b043;_0xedbf25>=0x0;_0xedbf25--)(_0x49b043=_0x10af04[_0xedbf25])&&(_0x2de4f1=_0x49b043(_0x2de4f1)||_0x2de4f1);return _0x2de4f1;},N=(_0x5ab501,_0xe58d38)=>(_0x3a0f93,_0x3ef5a8)=>_0xe58d38(_0x3a0f93,_0x3ef5a8,_0x5ab501);let g=class extends _0x39c95b{constructor(_0x2294dc,_0x289b36){const _0x219ce9=_0x4dba33;super(),this[_0x219ce9(0xb8)]=_0x2294dc,this[_0x219ce9(0xd1)]=_0x289b36,this[_0x219ce9(0xb3)]();}[_0x4dba33(0xb3)](){const _0x3b8b6e=_0x4dba33;this[_0x3b8b6e(0xb8)][_0x3b8b6e(0xcb)]=this[_0x3b8b6e(0xd1)],this[_0x3b8b6e(0xb8)][_0x3b8b6e(0xa9)]=!0x1;}};g=te([N(0x0,_0x174b3e),N(0x1,_0x52ad8a(f))],g);var se=Object[_0x4dba33(0xb9)],oe=Object[_0x4dba33(0xbf)],ne=(_0x17da63,_0x5d0600,_0x550ce2)=>_0x5d0600 in _0x17da63?se(_0x17da63,_0x5d0600,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x550ce2}):_0x17da63[_0x5d0600]=_0x550ce2,ie=(_0x3ad096,_0x30645a,_0x4182d4,_0x4c9d2e)=>{for(var _0x2fe203=_0x4c9d2e>0x1?void 0x0:_0x4c9d2e?oe(_0x30645a,_0x4182d4):_0x30645a,_0xd11ca0=_0x3ad096['length']-0x1,_0x5a3ff3;_0xd11ca0>=0x0;_0xd11ca0--)(_0x5a3ff3=_0x3ad096[_0xd11ca0])&&(_0x2fe203=_0x5a3ff3(_0x2fe203)||_0x2fe203);return _0x2fe203;},w=(_0x2ad0dd,_0x12cbc1)=>(_0xcbc644,_0x21c27d)=>_0x12cbc1(_0xcbc644,_0x21c27d,_0x2ad0dd),$=(_0x360bed,_0x2bc033,_0x2886f8)=>ne(_0x360bed,typeof _0x2bc033!=_0x4dba33(0xe5)?_0x2bc033+'':_0x2bc033,_0x2886f8);let b=class extends _0x50b830{constructor(_0x190450=M,_0x14109d,_0x3305a0){const _0x26d54b=_0x4dba33;super(),this[_0x26d54b(0xea)]=_0x190450,this[_0x26d54b(0xd0)]=_0x14109d,this['_configService']=_0x3305a0;const {..._0x4deb81}=_0x47d5b2({},M,this[_0x26d54b(0xea)]);this[_0x26d54b(0x97)][_0x26d54b(0xd7)](z,_0x4deb81);}[_0x4dba33(0xde)](){[[f],[g],[S]]['forEach'](_0x438651=>{const _0xc5f49=_0x4736;this[_0xc5f49(0xd0)]['add'](_0x438651);});}[_0x4dba33(0xb5)](){const _0x2b9078=_0x4dba33;this[_0x2b9078(0xd0)]['get'](g),this[_0x2b9078(0xd0)]['get'](S);}};$(b,_0x4dba33(0xaa),W),$(b,_0x4dba33(0xdf),_0x14a626[_0x4dba33(0xdb)]),b=ie([_0xb6ea23(_0x27994a,_0x555b77,_0x31472d),w(0x1,_0x52ad8a(_0x4f75b2)),w(0x2,_0x2f9de9)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x5ea299=_0x2775;(function(_0x221f88,_0x118314){const _0x45faec=_0x2775,_0x40b7d5=_0x221f88();while(!![]){try{const _0xb18404=parseInt(_0x45faec(0x13e))/0x1+parseInt(_0x45faec(0x146))/0x2+-parseInt(_0x45faec(0x112))/0x3*(-parseInt(_0x45faec(0x11b))/0x4)+parseInt(_0x45faec(0x16e))/0x5+-parseInt(_0x45faec(0x150))/0x6*(parseInt(_0x45faec(0x14e))/0x7)+-parseInt(_0x45faec(0x15c))/0x8+-parseInt(_0x45faec(0x168))/0x9*(-parseInt(_0x45faec(0x11f))/0xa);if(_0xb18404===_0x118314)break;else _0x40b7d5['push'](_0x40b7d5['shift']());}catch(_0x5363e9){_0x40b7d5['push'](_0x40b7d5['shift']());}}}(_0x3587,0x40456));import{CommentService as _0xe371d,CollaborationSessionService as _0x27a803,UniverCollaborationClientPlugin as _0x18a047}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x170b60}from'@univerjs-pro/license';import{dayjs as _0x2b85d2,UserManagerService as _0xbb1ba0,Inject as _0x3fdad7,Injector as _0x235f21,Disposable as _0x52035e,CustomRangeType as _0x49fbf1,UniverInstanceType as _0x593503,DependentOn as _0x2b24ef,IConfigService as _0x591b1e,Plugin as _0x49816f,merge as _0xa3f01a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x36a0a4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b77e1,IThreadCommentDataSourceService as _0x48d157}from'@univerjs/thread-comment';import{bufferTime as _0x291499}from'rxjs';import{HTTPService as _0x428c70}from'@univerjs/network';const W=_0x5ea299(0x137);var I=(_0x3aec58=>(_0x3aec58[_0x3aec58[_0x5ea299(0x119)]=0x0]=_0x5ea299(0x119),_0x3aec58[_0x3aec58['Solved']=0x1]='Solved',_0x3aec58[_0x3aec58[_0x5ea299(0x129)]=-0x1]='UNRECOGNIZED',_0x3aec58))(I||{}),v=(_0x270e0e=>(_0x270e0e[_0x270e0e[_0x5ea299(0x164)]=0x0]=_0x5ea299(0x164),_0x270e0e[_0x270e0e[_0x5ea299(0x122)]=0x1]='Add',_0x270e0e[_0x270e0e[_0x5ea299(0x120)]=0x2]=_0x5ea299(0x120),_0x270e0e[_0x270e0e[_0x5ea299(0x16c)]=0x3]=_0x5ea299(0x16c),_0x270e0e[_0x270e0e['Delete']=0x4]='Delete',_0x270e0e[_0x270e0e[_0x5ea299(0x12a)]=0x5]=_0x5ea299(0x12a),_0x270e0e[_0x270e0e[_0x5ea299(0x129)]=-0x1]=_0x5ea299(0x129),_0x270e0e))(v||{});function _0x3587(){const _0x8dceef=['_threadCommentDataSourceService','requireSession','7TGXraV','getUnit','341862ugeQUh','subscribe','stringify','filter','error','_initUserSync','_threadCommentDataSource','getUser','thread-comment-data-source.config','size','code','content','1657240uvkcds','/solved','forEach','pluginName','/reply','_init','_userService','addUser','Unknown','saveCommentToSnapshot','delete','pipe','18AxOWTM','ref','/delete','disposeWithMe','Edit','reply','1745995DjvBJS','parse','personId','rangeType','body','find','addComment','getCurrentUser','root','userID','YYYY/MM/DD\x20HH:mm','_injector','31257HWNQXM','deleteComment','replyId','dataSource','defineProperty','createTimestamp','/add','OpenOrReOpen','type','4OLSfNo','updateComment','/universer-api/comment/unit/','userId','209470nKRnuI','Reply','listComments','Add','format','getOwnPropertyDescriptor','_config','unitId','COMMENT','get','UNRECOGNIZED','Solve','Solved','_initDataSource','solved','payload','_threadCommentModel','getMemberID','comment','add','commentUpdate$','rangeId','replies','/universer-api/user/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','slice','length','getComment','/list','/edit','96401zneNMh','map','values','onStarting','resolved','_commentService','_httpService','_configService','58946ccdsGz','_sessionService','user','resolveComment','threadId','post'];_0x3587=function(){return _0x8dceef;};return _0x3587();}const D=_0x4b3481=>_0x2b85d2(new Date(+_0x4b3481))[_0x5ea299(0x123)](_0x5ea299(0x110)),B=async(_0x4d93be,_0x24d195)=>{const _0x1828ef=_0x5ea299,_0xe71a94=_0x4d93be[_0x1828ef(0x128)](_0xbb1ba0),_0x51cc08=_0x4d93be[_0x1828ef(0x128)](_0x428c70);_0x24d195[_0x1828ef(0x15e)](_0x10b60b=>{const _0x37414b=_0x1828ef;_0xe71a94[_0x37414b(0x157)](_0x10b60b)&&_0x24d195[_0x37414b(0x166)](_0x10b60b);}),_0x24d195[_0x1828ef(0x159)]&&(await _0x51cc08[_0x1828ef(0x128)](_0x1828ef(0x136),{'params':{'userIDs':[..._0x24d195]}}))['body']['users'][_0x1828ef(0x15e)](_0x5a7899=>{const _0x257fbd=_0x1828ef;_0x5a7899&&_0xe71a94[_0x257fbd(0x163)](_0x5a7899);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x36aa7e,_0x52cffa,_0x3dd4da,_0x1c23b5)=>{const _0x29fb7f=_0x5ea299;for(var _0xfdb222=_0x1c23b5>0x1?void 0x0:_0x1c23b5?K(_0x52cffa,_0x3dd4da):_0x52cffa,_0x3a13be=_0x36aa7e[_0x29fb7f(0x13a)]-0x1,_0x1080c6;_0x3a13be>=0x0;_0x3a13be--)(_0x1080c6=_0x36aa7e[_0x3a13be])&&(_0xfdb222=_0x1080c6(_0xfdb222)||_0xfdb222);return _0xfdb222;},p=(_0x3da172,_0x2c1238)=>(_0x5d464b,_0x5dc498)=>_0x2c1238(_0x5d464b,_0x5dc498,_0x3da172);let S=class extends _0x52035e{constructor(_0x49f4ff,_0x508397,_0x118cf1,_0x4fb849){const _0x1f7a1e=_0x5ea299;super(),this[_0x1f7a1e(0x143)]=_0x49f4ff,this[_0x1f7a1e(0x12f)]=_0x508397,this[_0x1f7a1e(0x162)]=_0x118cf1,this[_0x1f7a1e(0x111)]=_0x4fb849,this[_0x1f7a1e(0x161)](),this[_0x1f7a1e(0x155)]();}[_0x5ea299(0x155)](){const _0x32eefc=_0x5ea299;this[_0x32eefc(0x16b)](this[_0x32eefc(0x12f)][_0x32eefc(0x133)][_0x32eefc(0x167)](_0x291499(0x10))[_0x32eefc(0x151)](_0x7c62b9=>{const _0x55aba7=_0x32eefc,_0x17c5b7=new Set();_0x7c62b9[_0x55aba7(0x15e)](_0x2c147d=>{const _0x121be4=_0x55aba7;switch(_0x2c147d[_0x121be4(0x11a)]){case _0x121be4(0x132):{const _0x5593d1=_0x2c147d[_0x121be4(0x12e)][_0x121be4(0x170)];_0x17c5b7[_0x121be4(0x132)](_0x5593d1);break;}}}),B(this[_0x55aba7(0x111)],_0x17c5b7);}));}['_init'](){const _0x7a5cd8=_0x5ea299;this[_0x7a5cd8(0x16b)](this[_0x7a5cd8(0x143)]['commentUpdate$'][_0x7a5cd8(0x151)](async _0x25c866=>{const _0x3bc76b=_0x7a5cd8;var _0x47a79b,_0x131bb0,_0x88e959,_0x44a1b7;const _0x553b12=(_0x47a79b=this[_0x3bc76b(0x12f)][_0x3bc76b(0x14f)](_0x25c866['unitId'])['find'](_0x3a0289=>_0x3a0289[_0x3bc76b(0x14a)]===_0x25c866['threadId']))==null?void 0x0:_0x47a79b[_0x3bc76b(0x10e)];if(!_0x553b12)return;const {unitId:_0xc8fb53,subUnitId:_0x75e6c1}=_0x553b12;switch(_0x25c866[_0x3bc76b(0x148)]&&this[_0x3bc76b(0x162)][_0x3bc76b(0x163)](_0x25c866[_0x3bc76b(0x148)]),_0x25c866[_0x3bc76b(0x11a)]){case v['Add']:break;case v[_0x3bc76b(0x120)]:{this['_threadCommentModel'][_0x3bc76b(0x174)](_0xc8fb53,_0x75e6c1,{'unitId':_0xc8fb53,'subUnitId':_0x75e6c1,'ref':'','id':_0x25c866['replyId'],'dT':D(+_0x25c866['createTimestamp']),'threadId':_0x25c866[_0x3bc76b(0x14a)],'personId':(_0x88e959=(_0x131bb0=_0x25c866[_0x3bc76b(0x148)])==null?void 0x0:_0x131bb0[_0x3bc76b(0x10f)])!=null?_0x88e959:_0x25c866[_0x3bc76b(0x11e)],'text':JSON[_0x3bc76b(0x16f)](_0x25c866[_0x3bc76b(0x15b)]),'parentId':_0x553b12['id']});break;}case v['Delete']:{const _0x53081a=this['_threadCommentModel'][_0x3bc76b(0x13b)](_0xc8fb53,_0x75e6c1,_0x25c866[_0x3bc76b(0x114)]);_0x53081a&&_0x53081a['parentId']&&this['_threadCommentModel'][_0x3bc76b(0x113)](_0xc8fb53,_0x75e6c1,_0x25c866[_0x3bc76b(0x114)]);break;}case v['Edit']:{this[_0x3bc76b(0x12f)]['updateComment'](_0xc8fb53,_0x75e6c1,{'commentId':_0x25c866[_0x3bc76b(0x114)],'text':JSON[_0x3bc76b(0x16f)](_0x25c866[_0x3bc76b(0x15b)])});break;}case v[_0x3bc76b(0x12a)]:{const _0x3241d4=(_0x44a1b7=this['_threadCommentModel'][_0x3bc76b(0x14f)](_0x25c866[_0x3bc76b(0x126)])[_0x3bc76b(0x173)](_0x41d161=>_0x41d161['threadId']===_0x25c866[_0x3bc76b(0x14a)]))==null?void 0x0:_0x44a1b7['root'];_0x3241d4&&this[_0x3bc76b(0x12f)][_0x3bc76b(0x149)](_0xc8fb53,_0x75e6c1,_0x3241d4['id'],_0x25c866['solved']===I[_0x3bc76b(0x12b)]);break;}}}));}};function _0x2775(_0x2f7246,_0x2e4ae8){const _0x35877b=_0x3587();return _0x2775=function(_0x277507,_0x1a0bde){_0x277507=_0x277507-0x10e;let _0x343e4a=_0x35877b[_0x277507];return _0x343e4a;},_0x2775(_0x2f7246,_0x2e4ae8);}S=V([p(0x0,_0x3fdad7(_0xe371d)),p(0x1,_0x3fdad7(_0x4b77e1)),p(0x2,_0x3fdad7(_0xbb1ba0)),p(0x3,_0x3fdad7(_0x235f21))],S);const z=_0x5ea299(0x158),M={};var k=Object[_0x5ea299(0x124)],Q=(_0x413f57,_0x271b5b,_0xdbecf6,_0x5bc830)=>{const _0x7056cc=_0x5ea299;for(var _0x5a3881=_0x5bc830>0x1?void 0x0:_0x5bc830?k(_0x271b5b,_0xdbecf6):_0x271b5b,_0x30eb18=_0x413f57[_0x7056cc(0x13a)]-0x1,_0x4b5022;_0x30eb18>=0x0;_0x30eb18--)(_0x4b5022=_0x413f57[_0x30eb18])&&(_0x5a3881=_0x4b5022(_0x5a3881)||_0x5a3881);return _0x5a3881;},_=(_0x179929,_0x3d86fd)=>(_0x13bf3f,_0x316943)=>_0x3d86fd(_0x13bf3f,_0x316943,_0x179929);function X(_0x27a531,_0x120137){const _0x2ea8df=_0x5ea299,_0x209979=_0x27a531['replies'][0x0];return{..._0x120137,'id':_0x209979[_0x2ea8df(0x114)],'resolved':_0x27a531[_0x2ea8df(0x12d)]===0x1,'dT':D(_0x209979[_0x2ea8df(0x117)]),'personId':_0x209979[_0x2ea8df(0x11e)],'threadId':_0x209979['threadId']};}function ee(_0x31e04f,_0xbcb621,_0x302a95){const _0xab605c=_0x5ea299;var _0x41f88e,_0x193c9e;if(((_0x193c9e=(_0x41f88e=_0x31e04f==null?void 0x0:_0x31e04f[_0xab605c(0x135)])==null?void 0x0:_0x41f88e[_0xab605c(0x13a)])!=null?_0x193c9e:0x0)>0x0){const _0x8f7c49=(_0x1cc58a,_0x2f7cb5)=>({'id':_0x1cc58a['replyId'],'threadId':_0x1cc58a[_0xab605c(0x14a)],'dT':D(_0x1cc58a[_0xab605c(0x117)]),'personId':_0x1cc58a[_0xab605c(0x11e)],'resolved':_0x31e04f['solved']===I['Solved'],'unitId':_0xbcb621,'subUnitId':_0x302a95,'text':JSON['parse'](_0x1cc58a['content']),'parentId':_0x2f7cb5}),_0x2dcac0=_0x8f7c49(_0x31e04f['replies'][0x0]);return{..._0x2dcac0,'children':_0x31e04f[_0xab605c(0x135)][_0xab605c(0x139)](0x1)[_0xab605c(0x13f)](_0x42a154=>_0x8f7c49(_0x42a154,_0x2dcac0['id']))};}return null;}let f=class{constructor(_0x308bf4,_0x59b614,_0x2145b4,_0x3070fc){const _0x5e8f90=_0x5ea299;this['_httpService']=_0x308bf4,this[_0x5e8f90(0x162)]=_0x59b614,this[_0x5e8f90(0x147)]=_0x2145b4,this[_0x5e8f90(0x111)]=_0x3070fc;}async['addComment'](_0x57cb68){const _0x279382=_0x5ea299;var _0x3542be,_0x57b7a3;const {parentId:_0x3707e9,unitId:_0x1995bf,text:_0x543c0c,threadId:_0x217d0e}=_0x57cb68,_0x25c6bf=(_0x57b7a3=(_0x3542be=_0x543c0c['customRanges'])==null?void 0x0:_0x3542be[_0x279382(0x153)](_0x312df=>_0x312df[_0x279382(0x171)]===_0x49fbf1[_0x279382(0x127)])['map'](_0x255e91=>_0x255e91[_0x279382(0x134)]))!=null?_0x57b7a3:[],_0x2afdaf=JSON[_0x279382(0x152)](_0x543c0c),_0xdcc61b=(await this[_0x279382(0x147)][_0x279382(0x14d)](_0x1995bf))[_0x279382(0x130)]();if(_0x3707e9){const _0xac05be={'memberId':_0xdcc61b,'unitId':_0x1995bf,'content':_0x2afdaf,'mention':_0x25c6bf,'threadId':_0x217d0e},_0x3efd72=(await this[_0x279382(0x144)][_0x279382(0x14b)](_0x279382(0x11d)+_0x1995bf+_0x279382(0x160),{'body':_0xac05be}))[_0x279382(0x172)][_0x279382(0x16d)];return{..._0x57cb68,'id':_0x3efd72[_0x279382(0x114)],'dT':_0x2b85d2(+_0x3efd72['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x3efd72[_0x279382(0x11e)]};}else{const _0x3bb490={'memberId':_0xdcc61b,'unitId':_0x1995bf,'content':_0x2afdaf,'mention':_0x25c6bf},_0x183afb=await this[_0x279382(0x144)][_0x279382(0x14b)](_0x279382(0x11d)+_0x1995bf+_0x279382(0x118),{'body':_0x3bb490});return X(_0x183afb[_0x279382(0x172)][_0x279382(0x131)],_0x57cb68);}}async[_0x5ea299(0x11c)](_0x36f7cc){const _0x5751bf=_0x5ea299;var _0x37879e,_0x37a5e1;const {text:_0x13fe46,unitId:_0x27ea15}=_0x36f7cc,_0x32d625=(_0x37a5e1=(_0x37879e=_0x13fe46[_0x5751bf(0x138)])==null?void 0x0:_0x37879e[_0x5751bf(0x153)](_0x2796cc=>_0x2796cc[_0x5751bf(0x171)]===_0x49fbf1['COMMENT'])[_0x5751bf(0x13f)](_0x8ac410=>_0x8ac410[_0x5751bf(0x134)]))!=null?_0x37a5e1:[],_0x54e8ca=JSON[_0x5751bf(0x152)](_0x13fe46),_0x2b28bc=_0x36f7cc[_0x5751bf(0x14a)],_0x40bb3b=_0x36f7cc['id'],_0x5ea4df={'memberId':(await this[_0x5751bf(0x147)]['requireSession'](_0x27ea15))['getMemberID'](),'unitId':_0x27ea15,'threadId':_0x2b28bc,'mention':_0x32d625,'content':_0x54e8ca,'replyId':_0x40bb3b},_0x4da681=await this['_httpService'][_0x5751bf(0x14b)]('/universer-api/comment/unit/'+_0x27ea15+_0x5751bf(0x13d),{'body':_0x5ea4df});return!_0x4da681['body'][_0x5751bf(0x154)]||_0x4da681[_0x5751bf(0x172)][_0x5751bf(0x154)][_0x5751bf(0x15a)]===0x1;}async[_0x5ea299(0x149)](_0x2bc3c6){const _0xd0bd31=_0x5ea299,{unitId:_0x2e57a8}=_0x2bc3c6,_0x15232c=_0x2bc3c6[_0xd0bd31(0x14a)],_0x184d1c={'memberId':this[_0xd0bd31(0x162)][_0xd0bd31(0x175)]()[_0xd0bd31(0x10f)],'unitId':_0x2e57a8,'threadId':_0x15232c,'solved':_0x2bc3c6[_0xd0bd31(0x142)]?I[_0xd0bd31(0x12b)]:I[_0xd0bd31(0x119)]},_0x55b8c7=await this[_0xd0bd31(0x144)][_0xd0bd31(0x14b)](_0xd0bd31(0x11d)+_0x2e57a8+_0xd0bd31(0x15d),{'body':_0x184d1c});return!_0x55b8c7[_0xd0bd31(0x172)][_0xd0bd31(0x154)]||_0x55b8c7['body'][_0xd0bd31(0x154)][_0xd0bd31(0x15a)]===0x1;}async[_0x5ea299(0x113)](_0x56e62a,_0x497b54,_0x2ed065,_0x57af67){const _0x2f8242=_0x5ea299,_0x158ce3={'memberId':(await this[_0x2f8242(0x147)][_0x2f8242(0x14d)](_0x56e62a))[_0x2f8242(0x130)](),'threadId':_0x2ed065,'replyId':_0x57af67,'unitId':_0x56e62a},_0x1c4e4c=await this['_httpService']['post'](_0x2f8242(0x11d)+_0x56e62a+_0x2f8242(0x16a),{'body':_0x158ce3});return!_0x1c4e4c[_0x2f8242(0x172)]['error']||_0x1c4e4c['body']['error']['code']===0x1;}async[_0x5ea299(0x121)](_0x4ccc5f,_0x8566d8,_0x19aa9a){const _0x4aef7e=_0x5ea299,_0x20b817={'unitId':_0x4ccc5f,'threadId':_0x19aa9a},_0x5400c6=await this['_httpService'][_0x4aef7e(0x14b)]('/universer-api/comment/unit/'+_0x4ccc5f+_0x4aef7e(0x13c),{'body':_0x20b817}),_0xdd5b8d=_0x19aa9a['map'](_0x28cb32=>ee(_0x5400c6['body']['comments'][_0x28cb32],_0x4ccc5f,_0x8566d8))[_0x4aef7e(0x153)](Boolean);return Object[_0x4aef7e(0x140)](_0x5400c6['body']['users'])[_0x4aef7e(0x15e)](_0x382785=>{const _0x28d683=_0x4aef7e;this[_0x28d683(0x162)]['addUser'](_0x382785);}),_0xdd5b8d;}[_0x5ea299(0x165)](_0x4ddf4d){const _0x24abfe=_0x5ea299;return{'id':_0x4ddf4d['id'],'threadId':_0x4ddf4d['threadId'],'ref':_0x4ddf4d[_0x24abfe(0x169)]};}};f=Q([_(0x0,_0x3fdad7(_0x428c70)),_(0x1,_0x3fdad7(_0xbb1ba0)),_(0x2,_0x3fdad7(_0x27a803)),_(0x3,_0x3fdad7(_0x235f21))],f);var re=Object[_0x5ea299(0x124)],te=(_0x2d58f2,_0x47765b,_0x1529e7,_0x90c0c9)=>{const _0x4d433f=_0x5ea299;for(var _0x4f6140=_0x90c0c9>0x1?void 0x0:_0x90c0c9?re(_0x47765b,_0x1529e7):_0x47765b,_0x261b4e=_0x2d58f2[_0x4d433f(0x13a)]-0x1,_0x49c117;_0x261b4e>=0x0;_0x261b4e--)(_0x49c117=_0x2d58f2[_0x261b4e])&&(_0x4f6140=_0x49c117(_0x4f6140)||_0x4f6140);return _0x4f6140;},N=(_0xa353db,_0x513b8e)=>(_0x58f045,_0x223655)=>_0x513b8e(_0x58f045,_0x223655,_0xa353db);let g=class extends _0x52035e{constructor(_0x7c2ed,_0x48e539){const _0x3fe157=_0x5ea299;super(),this['_threadCommentDataSourceService']=_0x7c2ed,this[_0x3fe157(0x156)]=_0x48e539,this[_0x3fe157(0x12c)]();}[_0x5ea299(0x12c)](){const _0x5aa42b=_0x5ea299;this[_0x5aa42b(0x14c)][_0x5aa42b(0x115)]=this[_0x5aa42b(0x156)],this[_0x5aa42b(0x14c)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x48d157),N(0x1,_0x3fdad7(f))],g);var se=Object[_0x5ea299(0x116)],oe=Object[_0x5ea299(0x124)],ne=(_0x5a5a63,_0x2581b7,_0x37a569)=>_0x2581b7 in _0x5a5a63?se(_0x5a5a63,_0x2581b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37a569}):_0x5a5a63[_0x2581b7]=_0x37a569,ie=(_0x440425,_0x258c12,_0xfca280,_0xa4019e)=>{for(var _0x2545c1=_0xa4019e>0x1?void 0x0:_0xa4019e?oe(_0x258c12,_0xfca280):_0x258c12,_0x5d147f=_0x440425['length']-0x1,_0x5753cd;_0x5d147f>=0x0;_0x5d147f--)(_0x5753cd=_0x440425[_0x5d147f])&&(_0x2545c1=_0x5753cd(_0x2545c1)||_0x2545c1);return _0x2545c1;},w=(_0x3b6533,_0x8ed453)=>(_0x4b67ec,_0x3f0ec1)=>_0x8ed453(_0x4b67ec,_0x3f0ec1,_0x3b6533),$=(_0x30636b,_0x5d5f85,_0x9e86d7)=>ne(_0x30636b,typeof _0x5d5f85!='symbol'?_0x5d5f85+'':_0x5d5f85,_0x9e86d7);let b=class extends _0x49816f{constructor(_0x2f1cb6=M,_0x245aa6,_0x36e94d){const _0x4c82bb=_0x5ea299;super(),this['_config']=_0x2f1cb6,this[_0x4c82bb(0x111)]=_0x245aa6,this[_0x4c82bb(0x145)]=_0x36e94d;const {..._0x29e1fa}=_0xa3f01a({},M,this[_0x4c82bb(0x125)]);this[_0x4c82bb(0x145)]['setConfig'](z,_0x29e1fa);}[_0x5ea299(0x141)](){const _0x83a653=_0x5ea299;[[f],[g],[S]][_0x83a653(0x15e)](_0x153a6a=>{const _0x48940d=_0x83a653;this['_injector'][_0x48940d(0x132)](_0x153a6a);});}['onReady'](){const _0x53f032=_0x5ea299;this['_injector'][_0x53f032(0x128)](g),this['_injector'][_0x53f032(0x128)](S);}};$(b,_0x5ea299(0x15f),W),$(b,_0x5ea299(0x11a),_0x593503['UNIVER_UNKNOWN']),b=ie([_0x2b24ef(_0x36a0a4,_0x18a047,_0x170b60),w(0x1,_0x3fdad7(_0x235f21)),w(0x2,_0x591b1e)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4180(){const _0x37a10c=['118312GPDSjx','saveCommentToSnapshot','resolveComment','bufferTime','Disposable','root','UserManagerService','amd','format','@univerjs/thread-comment-ui','replies','type','/universer-api/comment/unit/','228639nwlLDC','disposeWithMe','getOwnPropertyDescriptor','Reply','IThreadCommentDataSourceService','reply','_userService','@univerjs/network','_configService','error','userID','/add','Edit','ThreadCommentModel','970319IFgbpw','solved','UniverThreadCommentUi','getUnit','stringify','Inject','post','rangeId','168hXelVj','OpenOrReOpen','COMMENT','getUser','find','@univerjs-pro/collaboration-client','dayjs','deleteComment','onStarting','UniverLicensePlugin','ref','commentUpdate$','292413oCXQKU','HTTPService','symbol','body','_initUserSync','addUser','updateComment','length','code','getComment','_injector','CommentService','_init','Unknown','dataSource','UniverProThreadCommentDatasource','UniverCollaborationClientPlugin','@univerjs-pro/license','values','UNRECOGNIZED','460XSySAJ','UniverInstanceType','1337262TgUUVN','Add','UNIVER_UNKNOWN','_threadCommentModel','CollaborationSessionService','requireSession','Solved','/delete','get','@univerjs/core','1254128cAnenP','syncUpdateMutationToColla','createTimestamp','user','@univerjs/thread-comment','filter','merge','payload','_threadCommentDataSource','parse','/universer-api/user/list','Solve','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','rxjs','Injector','/reply','_httpService','forEach','comment','addComment','5Jyncxi','customRanges','UniverProCollaborationClient','/edit','UniverThreadCommentDataSourcePlugin','object','subscribe','content','function','comments','delete','_sessionService','DependentOn','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/solved','pipe','onReady','map','userId','rangeType','getMemberID','pluginName','setConfig','add','replyId','_initDataSource','6541227TlzNCb','users','_config','4hYiBGx','size','Delete','CustomRangeType','threadId','_commentService','personId'];_0x4180=function(){return _0x37a10c;};return _0x4180();}function _0x32a9(_0x22fb47,_0x4ef2d6){const _0x4180d1=_0x4180();return _0x32a9=function(_0x32a95c,_0x4aaf2e){_0x32a95c=_0x32a95c-0x14e;let _0x23981d=_0x4180d1[_0x32a95c];return _0x23981d;},_0x32a9(_0x22fb47,_0x4ef2d6);}(function(_0x13b5f4,_0x7336e1){const _0x5e3b34=_0x32a9,_0x7b4733=_0x13b5f4();while(!![]){try{const _0x2f7f5e=-parseInt(_0x5e3b34(0x18d))/0x1+-parseInt(_0x5e3b34(0x1c1))/0x2+-parseInt(_0x5e3b34(0x17f))/0x3*(-parseInt(_0x5e3b34(0x16b))/0x4)+parseInt(_0x5e3b34(0x14e))/0x5*(-parseInt(_0x5e3b34(0x1b7))/0x6)+parseInt(_0x5e3b34(0x195))/0x7*(parseInt(_0x5e3b34(0x172))/0x8)+parseInt(_0x5e3b34(0x168))/0x9+-parseInt(_0x5e3b34(0x1b5))/0xa*(-parseInt(_0x5e3b34(0x1a1))/0xb);if(_0x2f7f5e===_0x7336e1)break;else _0x7b4733['push'](_0x7b4733['shift']());}catch(_0x51a8b8){_0x7b4733['push'](_0x7b4733['shift']());}}}(_0x4180,0x88d7e),function(_0x9e01d9,_0x6548ed){const _0x40f743=_0x32a9;typeof exports==_0x40f743(0x153)&&typeof module<'u'?_0x6548ed(exports,require(_0x40f743(0x19a)),require(_0x40f743(0x1b2)),require(_0x40f743(0x1c0)),require(_0x40f743(0x17b)),require(_0x40f743(0x1c5)),require(_0x40f743(0x1cf)),require(_0x40f743(0x186))):typeof define==_0x40f743(0x156)&&define[_0x40f743(0x179)]?define(['exports','@univerjs-pro/collaboration-client',_0x40f743(0x1b2),_0x40f743(0x1c0),_0x40f743(0x17b),'@univerjs/thread-comment',_0x40f743(0x1cf),_0x40f743(0x186)],_0x6548ed):(_0x9e01d9=typeof globalThis<'u'?globalThis:_0x9e01d9||self,_0x6548ed(_0x9e01d9[_0x40f743(0x1b0)]={},_0x9e01d9[_0x40f743(0x150)],_0x9e01d9['UniverProLicense'],_0x9e01d9['UniverCore'],_0x9e01d9[_0x40f743(0x18f)],_0x9e01d9['UniverThreadComment'],_0x9e01d9[_0x40f743(0x1cf)],_0x9e01d9['UniverNetwork']));}(this,function(_0x2a1336,_0x38285f,_0x2399e3,_0x276878,_0x45818c,_0x2d8af4,_0x39169c,_0x4956cd){'use strict';const _0x56ed1e=_0x32a9;const _0x175f6b=_0x56ed1e(0x15b);var _0x3e855a=(_0x5dd40c=>(_0x5dd40c[_0x5dd40c[_0x56ed1e(0x196)]=0x0]=_0x56ed1e(0x196),_0x5dd40c[_0x5dd40c[_0x56ed1e(0x1bd)]=0x1]=_0x56ed1e(0x1bd),_0x5dd40c[_0x5dd40c[_0x56ed1e(0x1b4)]=-0x1]=_0x56ed1e(0x1b4),_0x5dd40c))(_0x3e855a||{}),_0x3164a0=(_0x103409=>(_0x103409[_0x103409[_0x56ed1e(0x1ae)]=0x0]='Unknown',_0x103409[_0x103409['Add']=0x1]=_0x56ed1e(0x1b8),_0x103409[_0x103409[_0x56ed1e(0x182)]=0x2]='Reply',_0x103409[_0x103409[_0x56ed1e(0x18b)]=0x3]='Edit',_0x103409[_0x103409[_0x56ed1e(0x16d)]=0x4]=_0x56ed1e(0x16d),_0x103409[_0x103409['Solve']=0x5]='Solve',_0x103409[_0x103409[_0x56ed1e(0x1b4)]=-0x1]=_0x56ed1e(0x1b4),_0x103409))(_0x3164a0||{});const _0x54df3f=_0x32818a=>_0x276878[_0x56ed1e(0x19b)](new Date(+_0x32818a))[_0x56ed1e(0x17a)]('YYYY/MM/DD\x20HH:mm'),_0xb35139=async(_0x1394c9,_0xe532d2)=>{const _0x5017ba=_0x56ed1e,_0x45b1b3=_0x1394c9[_0x5017ba(0x1bf)](_0x276878[_0x5017ba(0x178)]),_0x43a657=_0x1394c9[_0x5017ba(0x1bf)](_0x4956cd['HTTPService']);_0xe532d2[_0x5017ba(0x1d3)](_0x40210b=>{const _0x78d462=_0x5017ba;_0x45b1b3[_0x78d462(0x198)](_0x40210b)&&_0xe532d2[_0x78d462(0x158)](_0x40210b);}),_0xe532d2[_0x5017ba(0x16c)]&&(await _0x43a657[_0x5017ba(0x1bf)](_0x5017ba(0x1cb),{'params':{'userIDs':[..._0xe532d2]}}))['body'][_0x5017ba(0x169)][_0x5017ba(0x1d3)](_0x14ae5b=>{const _0x51d053=_0x5017ba;_0x14ae5b&&_0x45b1b3[_0x51d053(0x1a6)](_0x14ae5b);});};var _0x4408de=Object[_0x56ed1e(0x181)],_0x3b5b0c=(_0x15f3c1,_0x54c3ce,_0x1695d8,_0xba699b)=>{const _0x14d1d5=_0x56ed1e;for(var _0x5a124f=_0xba699b>0x1?void 0x0:_0xba699b?_0x4408de(_0x54c3ce,_0x1695d8):_0x54c3ce,_0x1e4d1d=_0x15f3c1[_0x14d1d5(0x1a8)]-0x1,_0x2092eb;_0x1e4d1d>=0x0;_0x1e4d1d--)(_0x2092eb=_0x15f3c1[_0x1e4d1d])&&(_0x5a124f=_0x2092eb(_0x5a124f)||_0x5a124f);return _0x5a124f;},_0x544650=(_0x2680e1,_0x6cd530)=>(_0x11c21c,_0x7bf9a5)=>_0x6cd530(_0x11c21c,_0x7bf9a5,_0x2680e1);let _0x72f990=class extends _0x276878[_0x56ed1e(0x176)]{constructor(_0x24145a,_0xf99904,_0x37475f,_0xb66ca3){const _0x1a31a7=_0x56ed1e;super(),this[_0x1a31a7(0x170)]=_0x24145a,this[_0x1a31a7(0x1ba)]=_0xf99904,this[_0x1a31a7(0x185)]=_0x37475f,this['_injector']=_0xb66ca3,this['_init'](),this[_0x1a31a7(0x1a5)]();}[_0x56ed1e(0x1a5)](){const _0x1b95c9=_0x56ed1e;this['disposeWithMe'](this[_0x1b95c9(0x1ba)]['commentUpdate$'][_0x1b95c9(0x15d)](_0x39169c[_0x1b95c9(0x175)](0x10))['subscribe'](_0x84b1ae=>{const _0x476f3f=_0x1b95c9,_0x2d36d4=new Set();_0x84b1ae[_0x476f3f(0x1d3)](_0x4a2f3a=>{const _0x3b393a=_0x476f3f;switch(_0x4a2f3a[_0x3b393a(0x17d)]){case'add':{const _0x3bb41d=_0x4a2f3a[_0x3b393a(0x1c8)][_0x3b393a(0x171)];_0x2d36d4[_0x3b393a(0x165)](_0x3bb41d);break;}}}),_0xb35139(this[_0x476f3f(0x1ab)],_0x2d36d4);}));}[_0x56ed1e(0x1ad)](){const _0x475452=_0x56ed1e;this[_0x475452(0x180)](this[_0x475452(0x170)][_0x475452(0x1a0)][_0x475452(0x154)](async _0x61748c=>{const _0x97fef4=_0x475452;var _0xbe8a5c,_0x48e7a7,_0x1df0cd,_0x1443b8;const _0x189d09=(_0xbe8a5c=this[_0x97fef4(0x1ba)][_0x97fef4(0x190)](_0x61748c['unitId'])[_0x97fef4(0x199)](_0x49bcca=>_0x49bcca[_0x97fef4(0x16f)]===_0x61748c[_0x97fef4(0x16f)]))==null?void 0x0:_0xbe8a5c[_0x97fef4(0x177)];if(!_0x189d09)return;const {unitId:_0x285e5f,subUnitId:_0x1d2fe0}=_0x189d09;switch(_0x61748c[_0x97fef4(0x1c4)]&&this[_0x97fef4(0x185)]['addUser'](_0x61748c[_0x97fef4(0x1c4)]),_0x61748c[_0x97fef4(0x17d)]){case _0x3164a0[_0x97fef4(0x1b8)]:break;case _0x3164a0[_0x97fef4(0x182)]:{this[_0x97fef4(0x1ba)][_0x97fef4(0x1d5)](_0x285e5f,_0x1d2fe0,{'unitId':_0x285e5f,'subUnitId':_0x1d2fe0,'ref':'','id':_0x61748c['replyId'],'dT':_0x54df3f(+_0x61748c[_0x97fef4(0x1c3)]),'threadId':_0x61748c[_0x97fef4(0x16f)],'personId':(_0x1df0cd=(_0x48e7a7=_0x61748c['user'])==null?void 0x0:_0x48e7a7[_0x97fef4(0x189)])!=null?_0x1df0cd:_0x61748c[_0x97fef4(0x160)],'text':JSON[_0x97fef4(0x1ca)](_0x61748c[_0x97fef4(0x155)]),'parentId':_0x189d09['id']});break;}case _0x3164a0[_0x97fef4(0x16d)]:{const _0x146aec=this[_0x97fef4(0x1ba)][_0x97fef4(0x1aa)](_0x285e5f,_0x1d2fe0,_0x61748c[_0x97fef4(0x166)]);_0x146aec&&_0x146aec['parentId']&&this[_0x97fef4(0x1ba)][_0x97fef4(0x19c)](_0x285e5f,_0x1d2fe0,_0x61748c['replyId']);break;}case _0x3164a0[_0x97fef4(0x18b)]:{this[_0x97fef4(0x1ba)][_0x97fef4(0x1a7)](_0x285e5f,_0x1d2fe0,{'commentId':_0x61748c[_0x97fef4(0x166)],'text':JSON[_0x97fef4(0x1ca)](_0x61748c['content'])});break;}case _0x3164a0[_0x97fef4(0x1cc)]:{const _0x28af9c=(_0x1443b8=this[_0x97fef4(0x1ba)][_0x97fef4(0x190)](_0x61748c['unitId'])[_0x97fef4(0x199)](_0x25c145=>_0x25c145[_0x97fef4(0x16f)]===_0x61748c[_0x97fef4(0x16f)]))==null?void 0x0:_0x1443b8['root'];_0x28af9c&&this[_0x97fef4(0x1ba)][_0x97fef4(0x174)](_0x285e5f,_0x1d2fe0,_0x28af9c['id'],_0x61748c['solved']===_0x3e855a[_0x97fef4(0x1bd)]);break;}}}));}};_0x72f990=_0x3b5b0c([_0x544650(0x0,_0x276878[_0x56ed1e(0x192)](_0x38285f[_0x56ed1e(0x1ac)])),_0x544650(0x1,_0x276878['Inject'](_0x2d8af4[_0x56ed1e(0x18c)])),_0x544650(0x2,_0x276878['Inject'](_0x276878[_0x56ed1e(0x178)])),_0x544650(0x3,_0x276878[_0x56ed1e(0x192)](_0x276878[_0x56ed1e(0x1d0)]))],_0x72f990);const _0x2464ff='thread-comment-data-source.config',_0x1d1639={};var _0x134e68=Object[_0x56ed1e(0x181)],_0x357c2a=(_0x1ffe6e,_0x346b92,_0x3808da,_0x564a23)=>{const _0x4087ae=_0x56ed1e;for(var _0x385de5=_0x564a23>0x1?void 0x0:_0x564a23?_0x134e68(_0x346b92,_0x3808da):_0x346b92,_0x1206a3=_0x1ffe6e[_0x4087ae(0x1a8)]-0x1,_0x19ec3a;_0x1206a3>=0x0;_0x1206a3--)(_0x19ec3a=_0x1ffe6e[_0x1206a3])&&(_0x385de5=_0x19ec3a(_0x385de5)||_0x385de5);return _0x385de5;},_0xd0a97=(_0x4b5b46,_0x49b0d8)=>(_0x37bf18,_0x5a5c44)=>_0x49b0d8(_0x37bf18,_0x5a5c44,_0x4b5b46);function _0x341364(_0xec930c,_0x222f19){const _0x4f3169=_0x56ed1e,_0x5a70f0=_0xec930c[_0x4f3169(0x17c)][0x0];return{..._0x222f19,'id':_0x5a70f0[_0x4f3169(0x166)],'resolved':_0xec930c['solved']===0x1,'dT':_0x54df3f(_0x5a70f0[_0x4f3169(0x1c3)]),'personId':_0x5a70f0[_0x4f3169(0x160)],'threadId':_0x5a70f0['threadId']};}function _0x44c1a4(_0x3de746,_0x107eaa,_0x5b40e7){const _0x44ac5b=_0x56ed1e;var _0x5311ff,_0x1e31a2;if(((_0x1e31a2=(_0x5311ff=_0x3de746==null?void 0x0:_0x3de746[_0x44ac5b(0x17c)])==null?void 0x0:_0x5311ff[_0x44ac5b(0x1a8)])!=null?_0x1e31a2:0x0)>0x0){const _0x1e551e=(_0x1610f7,_0x1ff05d)=>({'id':_0x1610f7[_0x44ac5b(0x166)],'threadId':_0x1610f7[_0x44ac5b(0x16f)],'dT':_0x54df3f(_0x1610f7['createTimestamp']),'personId':_0x1610f7[_0x44ac5b(0x160)],'resolved':_0x3de746[_0x44ac5b(0x18e)]===_0x3e855a[_0x44ac5b(0x1bd)],'unitId':_0x107eaa,'subUnitId':_0x5b40e7,'text':JSON[_0x44ac5b(0x1ca)](_0x1610f7['content']),'parentId':_0x1ff05d}),_0x576ea2=_0x1e551e(_0x3de746[_0x44ac5b(0x17c)][0x0]);return{..._0x576ea2,'children':_0x3de746[_0x44ac5b(0x17c)]['slice'](0x1)[_0x44ac5b(0x15f)](_0x3dd035=>_0x1e551e(_0x3dd035,_0x576ea2['id']))};}return null;}let _0x504675=class{constructor(_0x560aca,_0x8f6510,_0x27cd78,_0x4bcda3){const _0x3ef215=_0x56ed1e;this[_0x3ef215(0x1d2)]=_0x560aca,this[_0x3ef215(0x185)]=_0x8f6510,this[_0x3ef215(0x159)]=_0x27cd78,this[_0x3ef215(0x1ab)]=_0x4bcda3;}async[_0x56ed1e(0x1d5)](_0x1f8e76){const _0x1c7cb7=_0x56ed1e;var _0x475228,_0x5a0fc0;const {parentId:_0x1903dd,unitId:_0xfa2547,text:_0x23cea1,threadId:_0x4e482d}=_0x1f8e76,_0x1947fd=(_0x5a0fc0=(_0x475228=_0x23cea1[_0x1c7cb7(0x14f)])==null?void 0x0:_0x475228[_0x1c7cb7(0x1c6)](_0x176218=>_0x176218[_0x1c7cb7(0x161)]===_0x276878[_0x1c7cb7(0x16e)]['COMMENT'])[_0x1c7cb7(0x15f)](_0x1ad060=>_0x1ad060['rangeId']))!=null?_0x5a0fc0:[],_0x49d945=JSON[_0x1c7cb7(0x191)](_0x23cea1),_0x2c6229=(await this[_0x1c7cb7(0x159)][_0x1c7cb7(0x1bc)](_0xfa2547))['getMemberID']();if(_0x1903dd){const _0x28adf7={'memberId':_0x2c6229,'unitId':_0xfa2547,'content':_0x49d945,'mention':_0x1947fd,'threadId':_0x4e482d},_0x574f07=(await this[_0x1c7cb7(0x1d2)][_0x1c7cb7(0x193)](_0x1c7cb7(0x17e)+_0xfa2547+_0x1c7cb7(0x1d1),{'body':_0x28adf7}))[_0x1c7cb7(0x1a4)][_0x1c7cb7(0x184)];return{..._0x1f8e76,'id':_0x574f07['replyId'],'dT':_0x276878[_0x1c7cb7(0x19b)](+_0x574f07[_0x1c7cb7(0x1c3)])[_0x1c7cb7(0x17a)](_0x1c7cb7(0x1cd)),'personId':_0x574f07[_0x1c7cb7(0x160)]};}else{const _0x197037={'memberId':_0x2c6229,'unitId':_0xfa2547,'content':_0x49d945,'mention':_0x1947fd},_0x272389=await this['_httpService']['post'](_0x1c7cb7(0x17e)+_0xfa2547+_0x1c7cb7(0x18a),{'body':_0x197037});return _0x341364(_0x272389[_0x1c7cb7(0x1a4)][_0x1c7cb7(0x1d4)],_0x1f8e76);}}async['updateComment'](_0x128c7d){const _0x28983e=_0x56ed1e;var _0x588580,_0x51899c;const {text:_0x437054,unitId:_0x1f9ceb}=_0x128c7d,_0x86c555=(_0x51899c=(_0x588580=_0x437054[_0x28983e(0x14f)])==null?void 0x0:_0x588580[_0x28983e(0x1c6)](_0x1de089=>_0x1de089['rangeType']===_0x276878['CustomRangeType'][_0x28983e(0x197)])[_0x28983e(0x15f)](_0x51dde8=>_0x51dde8[_0x28983e(0x194)]))!=null?_0x51899c:[],_0x224bb9=JSON[_0x28983e(0x191)](_0x437054),_0x44fae3=_0x128c7d[_0x28983e(0x16f)],_0x337931=_0x128c7d['id'],_0x188424={'memberId':(await this[_0x28983e(0x159)][_0x28983e(0x1bc)](_0x1f9ceb))[_0x28983e(0x162)](),'unitId':_0x1f9ceb,'threadId':_0x44fae3,'mention':_0x86c555,'content':_0x224bb9,'replyId':_0x337931},_0xff1459=await this[_0x28983e(0x1d2)][_0x28983e(0x193)]('/universer-api/comment/unit/'+_0x1f9ceb+_0x28983e(0x151),{'body':_0x188424});return!_0xff1459['body'][_0x28983e(0x188)]||_0xff1459[_0x28983e(0x1a4)][_0x28983e(0x188)][_0x28983e(0x1a9)]===0x1;}async['resolveComment'](_0x1c9f46){const _0x4f91e1=_0x56ed1e,{unitId:_0x119349}=_0x1c9f46,_0x1b6467=_0x1c9f46[_0x4f91e1(0x16f)],_0x1fe992={'memberId':this[_0x4f91e1(0x185)]['getCurrentUser']()[_0x4f91e1(0x189)],'unitId':_0x119349,'threadId':_0x1b6467,'solved':_0x1c9f46['resolved']?_0x3e855a['Solved']:_0x3e855a[_0x4f91e1(0x196)]},_0x2b3329=await this['_httpService']['post'](_0x4f91e1(0x17e)+_0x119349+_0x4f91e1(0x15c),{'body':_0x1fe992});return!_0x2b3329[_0x4f91e1(0x1a4)][_0x4f91e1(0x188)]||_0x2b3329[_0x4f91e1(0x1a4)][_0x4f91e1(0x188)]['code']===0x1;}async['deleteComment'](_0x41cdb8,_0x332237,_0x471187,_0x2590eb){const _0x3db62f=_0x56ed1e,_0x33db95={'memberId':(await this['_sessionService'][_0x3db62f(0x1bc)](_0x41cdb8))[_0x3db62f(0x162)](),'threadId':_0x471187,'replyId':_0x2590eb,'unitId':_0x41cdb8},_0xe42db0=await this[_0x3db62f(0x1d2)][_0x3db62f(0x193)](_0x3db62f(0x17e)+_0x41cdb8+_0x3db62f(0x1be),{'body':_0x33db95});return!_0xe42db0[_0x3db62f(0x1a4)]['error']||_0xe42db0['body'][_0x3db62f(0x188)][_0x3db62f(0x1a9)]===0x1;}async['listComments'](_0x125b8b,_0x2661d3,_0x4c9f65){const _0x3bc3a6=_0x56ed1e,_0x15b452={'unitId':_0x125b8b,'threadId':_0x4c9f65},_0x96e9b3=await this[_0x3bc3a6(0x1d2)]['post'](_0x3bc3a6(0x17e)+_0x125b8b+'/list',{'body':_0x15b452}),_0x2b40f7=_0x4c9f65[_0x3bc3a6(0x15f)](_0x3477e0=>_0x44c1a4(_0x96e9b3[_0x3bc3a6(0x1a4)][_0x3bc3a6(0x157)][_0x3477e0],_0x125b8b,_0x2661d3))[_0x3bc3a6(0x1c6)](Boolean);return Object[_0x3bc3a6(0x1b3)](_0x96e9b3[_0x3bc3a6(0x1a4)][_0x3bc3a6(0x169)])[_0x3bc3a6(0x1d3)](_0x2ec66c=>{const _0x341ead=_0x3bc3a6;this['_userService'][_0x341ead(0x1a6)](_0x2ec66c);}),_0x2b40f7;}[_0x56ed1e(0x173)](_0x3400c0){const _0x1991f0=_0x56ed1e;return{'id':_0x3400c0['id'],'threadId':_0x3400c0['threadId'],'ref':_0x3400c0[_0x1991f0(0x19f)]};}};_0x504675=_0x357c2a([_0xd0a97(0x0,_0x276878['Inject'](_0x4956cd[_0x56ed1e(0x1a2)])),_0xd0a97(0x1,_0x276878['Inject'](_0x276878['UserManagerService'])),_0xd0a97(0x2,_0x276878['Inject'](_0x38285f[_0x56ed1e(0x1bb)])),_0xd0a97(0x3,_0x276878['Inject'](_0x276878[_0x56ed1e(0x1d0)]))],_0x504675);var _0x1fa7fe=Object[_0x56ed1e(0x181)],_0x773672=(_0x224184,_0x598c02,_0x572cba,_0xb08382)=>{for(var _0x34bca2=_0xb08382>0x1?void 0x0:_0xb08382?_0x1fa7fe(_0x598c02,_0x572cba):_0x598c02,_0x41513c=_0x224184['length']-0x1,_0x8f5573;_0x41513c>=0x0;_0x41513c--)(_0x8f5573=_0x224184[_0x41513c])&&(_0x34bca2=_0x8f5573(_0x34bca2)||_0x34bca2);return _0x34bca2;},_0x232d7c=(_0x4c4504,_0x2a0076)=>(_0xab3ef4,_0x5a7a7e)=>_0x2a0076(_0xab3ef4,_0x5a7a7e,_0x4c4504);let _0x1676b8=class extends _0x276878[_0x56ed1e(0x176)]{constructor(_0x2c135e,_0x5d6ee3){const _0x52bf30=_0x56ed1e;super(),this[_0x52bf30(0x1ce)]=_0x2c135e,this[_0x52bf30(0x1c9)]=_0x5d6ee3,this[_0x52bf30(0x167)]();}[_0x56ed1e(0x167)](){const _0x5bbc6d=_0x56ed1e;this['_threadCommentDataSourceService'][_0x5bbc6d(0x1af)]=this[_0x5bbc6d(0x1c9)],this[_0x5bbc6d(0x1ce)][_0x5bbc6d(0x1c2)]=!0x1;}};_0x1676b8=_0x773672([_0x232d7c(0x0,_0x2d8af4[_0x56ed1e(0x183)]),_0x232d7c(0x1,_0x276878['Inject'](_0x504675))],_0x1676b8);var _0x2bf51a=Object['defineProperty'],_0x7a993b=Object[_0x56ed1e(0x181)],_0x4871d2=(_0xa148,_0x4b412f,_0x2903e1)=>_0x4b412f in _0xa148?_0x2bf51a(_0xa148,_0x4b412f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2903e1}):_0xa148[_0x4b412f]=_0x2903e1,_0x1800a0=(_0x5b8bcb,_0x360593,_0x3c2290,_0x289b68)=>{const _0x2bd4a1=_0x56ed1e;for(var _0xb00f8c=_0x289b68>0x1?void 0x0:_0x289b68?_0x7a993b(_0x360593,_0x3c2290):_0x360593,_0xd35852=_0x5b8bcb[_0x2bd4a1(0x1a8)]-0x1,_0x5e9b67;_0xd35852>=0x0;_0xd35852--)(_0x5e9b67=_0x5b8bcb[_0xd35852])&&(_0xb00f8c=_0x5e9b67(_0xb00f8c)||_0xb00f8c);return _0xb00f8c;},_0x33a068=(_0x36a92c,_0x549e96)=>(_0x5c78ac,_0x2fa551)=>_0x549e96(_0x5c78ac,_0x2fa551,_0x36a92c),_0x2370bd=(_0x3819b8,_0x330ff2,_0x1467bb)=>_0x4871d2(_0x3819b8,typeof _0x330ff2!=_0x56ed1e(0x1a3)?_0x330ff2+'':_0x330ff2,_0x1467bb);_0x2a1336[_0x56ed1e(0x152)]=class extends _0x276878['Plugin']{constructor(_0x3fcfde=_0x1d1639,_0x303a49,_0x858e84){const _0x97515b=_0x56ed1e;super(),this['_config']=_0x3fcfde,this[_0x97515b(0x1ab)]=_0x303a49,this[_0x97515b(0x187)]=_0x858e84;const {..._0x30a5fe}=_0x276878[_0x97515b(0x1c7)]({},_0x1d1639,this[_0x97515b(0x16a)]);this[_0x97515b(0x187)][_0x97515b(0x164)](_0x2464ff,_0x30a5fe);}[_0x56ed1e(0x19d)](){const _0x57e97f=_0x56ed1e;[[_0x504675],[_0x1676b8],[_0x72f990]][_0x57e97f(0x1d3)](_0x5e003d=>{const _0x433a98=_0x57e97f;this[_0x433a98(0x1ab)]['add'](_0x5e003d);});}[_0x56ed1e(0x15e)](){const _0x53d8eb=_0x56ed1e;this[_0x53d8eb(0x1ab)][_0x53d8eb(0x1bf)](_0x1676b8),this[_0x53d8eb(0x1ab)][_0x53d8eb(0x1bf)](_0x72f990);}},_0x2370bd(_0x2a1336['UniverThreadCommentDataSourcePlugin'],_0x56ed1e(0x163),_0x175f6b),_0x2370bd(_0x2a1336[_0x56ed1e(0x152)],_0x56ed1e(0x17d),_0x276878[_0x56ed1e(0x1b6)][_0x56ed1e(0x1b9)]),_0x2a1336[_0x56ed1e(0x152)]=_0x1800a0([_0x276878[_0x56ed1e(0x15a)](_0x45818c['UniverThreadCommentUIPlugin'],_0x38285f[_0x56ed1e(0x1b1)],_0x2399e3[_0x56ed1e(0x19e)]),_0x33a068(0x1,_0x276878[_0x56ed1e(0x192)](_0x276878['Injector'])),_0x33a068(0x2,_0x276878['IConfigService'])],_0x2a1336['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x2a1336,Symbol['toStringTag'],{'value':'Module'});}));
|
|
1
|
+
(function(_0x374d69,_0x5d0e07){const _0x28e9c=_0x45a4,_0x274bd3=_0x374d69();while(!![]){try{const _0x12d541=-parseInt(_0x28e9c(0x232))/0x1*(-parseInt(_0x28e9c(0x1f0))/0x2)+parseInt(_0x28e9c(0x220))/0x3*(parseInt(_0x28e9c(0x218))/0x4)+parseInt(_0x28e9c(0x233))/0x5*(parseInt(_0x28e9c(0x24b))/0x6)+-parseInt(_0x28e9c(0x22e))/0x7*(parseInt(_0x28e9c(0x21a))/0x8)+-parseInt(_0x28e9c(0x1c7))/0x9+parseInt(_0x28e9c(0x1d1))/0xa*(-parseInt(_0x28e9c(0x1e2))/0xb)+parseInt(_0x28e9c(0x20c))/0xc;if(_0x12d541===_0x5d0e07)break;else _0x274bd3['push'](_0x274bd3['shift']());}catch(_0xfadb9){_0x274bd3['push'](_0x274bd3['shift']());}}}(_0x45e8,0x62b97),function(_0xc427b,_0x1fa432){const _0x42d602=_0x45a4;typeof exports==_0x42d602(0x1ed)&&typeof module<'u'?_0x1fa432(exports,require(_0x42d602(0x204)),require(_0x42d602(0x1f5)),require(_0x42d602(0x244)),require(_0x42d602(0x1e6)),require('@univerjs/thread-comment'),require(_0x42d602(0x1f7)),require(_0x42d602(0x237))):typeof define==_0x42d602(0x20b)&&define[_0x42d602(0x1d3)]?define([_0x42d602(0x23c),'@univerjs-pro/collaboration-client','@univerjs-pro/license',_0x42d602(0x244),'@univerjs/thread-comment-ui',_0x42d602(0x1ff),_0x42d602(0x1f7),_0x42d602(0x237)],_0x1fa432):(_0xc427b=typeof globalThis<'u'?globalThis:_0xc427b||self,_0x1fa432(_0xc427b[_0x42d602(0x24a)]={},_0xc427b[_0x42d602(0x1ce)],_0xc427b['UniverProLicense'],_0xc427b[_0x42d602(0x228)],_0xc427b[_0x42d602(0x21b)],_0xc427b['UniverThreadComment'],_0xc427b[_0x42d602(0x1f7)],_0xc427b[_0x42d602(0x1f1)]));}(this,function(_0x2682ef,_0x5bf447,_0x87c284,_0x3d2349,_0x2eb246,_0x163613,_0x54ad63,_0x1c96cf){'use strict';const _0x32f792=_0x45a4;const _0x6600a5=_0x32f792(0x210);var _0x55a88f=(_0x52d678=>(_0x52d678[_0x52d678[_0x32f792(0x248)]=0x0]=_0x32f792(0x248),_0x52d678[_0x52d678['Solved']=0x1]=_0x32f792(0x200),_0x52d678[_0x52d678[_0x32f792(0x1ec)]=-0x1]=_0x32f792(0x1ec),_0x52d678))(_0x55a88f||{}),_0x574f5f=(_0x5bda62=>(_0x5bda62[_0x5bda62['Unknown']=0x0]=_0x32f792(0x22b),_0x5bda62[_0x5bda62[_0x32f792(0x213)]=0x1]=_0x32f792(0x213),_0x5bda62[_0x5bda62[_0x32f792(0x1d9)]=0x2]=_0x32f792(0x1d9),_0x5bda62[_0x5bda62[_0x32f792(0x216)]=0x3]=_0x32f792(0x216),_0x5bda62[_0x5bda62[_0x32f792(0x230)]=0x4]=_0x32f792(0x230),_0x5bda62[_0x5bda62[_0x32f792(0x22f)]=0x5]=_0x32f792(0x22f),_0x5bda62[_0x5bda62['UNRECOGNIZED']=-0x1]=_0x32f792(0x1ec),_0x5bda62))(_0x574f5f||{});const _0x53d14c=_0x2d2520=>_0x3d2349[_0x32f792(0x226)](new Date(+_0x2d2520))[_0x32f792(0x243)](_0x32f792(0x23a)),_0x265863=async(_0x562fc3,_0x268906)=>{const _0x776e6c=_0x32f792,_0x515abb=_0x562fc3[_0x776e6c(0x249)](_0x3d2349['UserManagerService']),_0x35930d=_0x562fc3['get'](_0x1c96cf[_0x776e6c(0x1eb)]);_0x268906['forEach'](_0xef0e41=>{const _0x259b69=_0x776e6c;_0x515abb[_0x259b69(0x201)](_0xef0e41)&&_0x268906[_0x259b69(0x221)](_0xef0e41);}),_0x268906[_0x776e6c(0x1f2)]&&(await _0x35930d['get'](_0x776e6c(0x20f),{'params':{'userIDs':[..._0x268906]}}))[_0x776e6c(0x1cd)]['users']['forEach'](_0x51bdb2=>{const _0x371f9a=_0x776e6c;_0x51bdb2&&_0x515abb[_0x371f9a(0x1fd)](_0x51bdb2);});};var _0x54c67f=Object[_0x32f792(0x206)],_0x4521c8=(_0x4c41de,_0x9e3df4,_0x7e3850,_0x49000b)=>{const _0x1f11f8=_0x32f792;for(var _0x48e598=_0x49000b>0x1?void 0x0:_0x49000b?_0x54c67f(_0x9e3df4,_0x7e3850):_0x9e3df4,_0x310832=_0x4c41de[_0x1f11f8(0x1e8)]-0x1,_0x3f8434;_0x310832>=0x0;_0x310832--)(_0x3f8434=_0x4c41de[_0x310832])&&(_0x48e598=_0x3f8434(_0x48e598)||_0x48e598);return _0x48e598;},_0x262f31=(_0x54ceed,_0x4e9a1c)=>(_0x4c7857,_0x3b48e2)=>_0x4e9a1c(_0x4c7857,_0x3b48e2,_0x54ceed);let _0x34b785=class extends _0x3d2349['Disposable']{constructor(_0xd8b08e,_0x20a890,_0x550781,_0xf65251){const _0x32d6a0=_0x32f792;super(),this[_0x32d6a0(0x21c)]=_0xd8b08e,this[_0x32d6a0(0x22c)]=_0x20a890,this[_0x32d6a0(0x247)]=_0x550781,this[_0x32d6a0(0x1e5)]=_0xf65251,this[_0x32d6a0(0x241)](),this[_0x32d6a0(0x1f8)]();}[_0x32f792(0x1f8)](){const _0xd712d0=_0x32f792;this[_0xd712d0(0x1ea)](this[_0xd712d0(0x22c)]['commentUpdate$'][_0xd712d0(0x222)](_0x54ad63[_0xd712d0(0x212)](0x10))['subscribe'](_0x39a2b5=>{const _0x2ff023=_0xd712d0,_0x4e9547=new Set();_0x39a2b5[_0x2ff023(0x214)](_0x526686=>{const _0x988d86=_0x2ff023;switch(_0x526686[_0x988d86(0x1d4)]){case _0x988d86(0x21e):{const _0x957ef1=_0x526686[_0x988d86(0x23b)]['personId'];_0x4e9547['add'](_0x957ef1);break;}}}),_0x265863(this['_injector'],_0x4e9547);}));}[_0x32f792(0x241)](){const _0x5ef15f=_0x32f792;this[_0x5ef15f(0x1ea)](this[_0x5ef15f(0x21c)][_0x5ef15f(0x21d)][_0x5ef15f(0x1ef)](async _0x5bfa5e=>{const _0xe1b3a6=_0x5ef15f;var _0x30119e,_0x506267,_0x33b3c5,_0x34e1df;const _0x2262ae=(_0x30119e=this['_threadCommentModel'][_0xe1b3a6(0x227)](_0x5bfa5e['unitId'])[_0xe1b3a6(0x22a)](_0x531623=>_0x531623[_0xe1b3a6(0x22d)]===_0x5bfa5e['threadId']))==null?void 0x0:_0x30119e[_0xe1b3a6(0x1fa)];if(!_0x2262ae)return;const {unitId:_0x2fa52c,subUnitId:_0x26ffa7}=_0x2262ae;switch(_0x5bfa5e[_0xe1b3a6(0x1c9)]&&this[_0xe1b3a6(0x247)][_0xe1b3a6(0x1fd)](_0x5bfa5e[_0xe1b3a6(0x1c9)]),_0x5bfa5e[_0xe1b3a6(0x1d4)]){case _0x574f5f[_0xe1b3a6(0x213)]:break;case _0x574f5f[_0xe1b3a6(0x1d9)]:{this['_threadCommentModel'][_0xe1b3a6(0x205)](_0x2fa52c,_0x26ffa7,{'unitId':_0x2fa52c,'subUnitId':_0x26ffa7,'ref':'','id':_0x5bfa5e['replyId'],'dT':_0x53d14c(+_0x5bfa5e[_0xe1b3a6(0x1fb)]),'threadId':_0x5bfa5e[_0xe1b3a6(0x22d)],'personId':(_0x33b3c5=(_0x506267=_0x5bfa5e[_0xe1b3a6(0x1c9)])==null?void 0x0:_0x506267['userID'])!=null?_0x33b3c5:_0x5bfa5e[_0xe1b3a6(0x24c)],'text':JSON[_0xe1b3a6(0x242)](_0x5bfa5e[_0xe1b3a6(0x21f)]),'parentId':_0x2262ae['id']});break;}case _0x574f5f[_0xe1b3a6(0x230)]:{const _0x3065e2=this[_0xe1b3a6(0x22c)][_0xe1b3a6(0x1e4)](_0x2fa52c,_0x26ffa7,_0x5bfa5e[_0xe1b3a6(0x1ca)]);_0x3065e2&&_0x3065e2[_0xe1b3a6(0x1c8)]&&this[_0xe1b3a6(0x22c)][_0xe1b3a6(0x1c3)](_0x2fa52c,_0x26ffa7,_0x5bfa5e['replyId']);break;}case _0x574f5f[_0xe1b3a6(0x216)]:{this[_0xe1b3a6(0x22c)][_0xe1b3a6(0x1d7)](_0x2fa52c,_0x26ffa7,{'commentId':_0x5bfa5e[_0xe1b3a6(0x1ca)],'text':JSON[_0xe1b3a6(0x242)](_0x5bfa5e[_0xe1b3a6(0x21f)])});break;}case _0x574f5f[_0xe1b3a6(0x22f)]:{const _0xdc1ca9=(_0x34e1df=this[_0xe1b3a6(0x22c)][_0xe1b3a6(0x227)](_0x5bfa5e[_0xe1b3a6(0x225)])[_0xe1b3a6(0x22a)](_0x5d175a=>_0x5d175a[_0xe1b3a6(0x22d)]===_0x5bfa5e[_0xe1b3a6(0x22d)]))==null?void 0x0:_0x34e1df[_0xe1b3a6(0x1fa)];_0xdc1ca9&&this['_threadCommentModel'][_0xe1b3a6(0x23f)](_0x2fa52c,_0x26ffa7,_0xdc1ca9['id'],_0x5bfa5e[_0xe1b3a6(0x235)]===_0x55a88f[_0xe1b3a6(0x200)]);break;}}}));}};_0x34b785=_0x4521c8([_0x262f31(0x0,_0x3d2349['Inject'](_0x5bf447['CommentService'])),_0x262f31(0x1,_0x3d2349[_0x32f792(0x1cf)](_0x163613['ThreadCommentModel'])),_0x262f31(0x2,_0x3d2349[_0x32f792(0x1cf)](_0x3d2349[_0x32f792(0x1de)])),_0x262f31(0x3,_0x3d2349[_0x32f792(0x1cf)](_0x3d2349[_0x32f792(0x245)]))],_0x34b785);const _0x33ef92=_0x32f792(0x238),_0x34d92f={};var _0x24b354=Object['getOwnPropertyDescriptor'],_0x7d825d=(_0x2e9e13,_0x261d3a,_0x2db8ac,_0x5d8342)=>{const _0x597835=_0x32f792;for(var _0x2543c0=_0x5d8342>0x1?void 0x0:_0x5d8342?_0x24b354(_0x261d3a,_0x2db8ac):_0x261d3a,_0x1caf90=_0x2e9e13[_0x597835(0x1e8)]-0x1,_0x17f632;_0x1caf90>=0x0;_0x1caf90--)(_0x17f632=_0x2e9e13[_0x1caf90])&&(_0x2543c0=_0x17f632(_0x2543c0)||_0x2543c0);return _0x2543c0;},_0x2d8e28=(_0x40e734,_0x4ccf88)=>(_0x28f770,_0x59be39)=>_0x4ccf88(_0x28f770,_0x59be39,_0x40e734);function _0x3a2eb0(_0x7ae03f,_0x1f62ec){const _0x55d1b7=_0x32f792,_0x5c246c=_0x7ae03f[_0x55d1b7(0x1e0)][0x0];return{..._0x1f62ec,'id':_0x5c246c[_0x55d1b7(0x1ca)],'resolved':_0x7ae03f[_0x55d1b7(0x235)]===0x1,'dT':_0x53d14c(_0x5c246c[_0x55d1b7(0x1fb)]),'personId':_0x5c246c[_0x55d1b7(0x24c)],'threadId':_0x5c246c[_0x55d1b7(0x22d)]};}function _0x1df6e8(_0x1296d2,_0x46818c,_0x27bf66){const _0xc39ba6=_0x32f792;var _0x528169,_0x2a6790;if(((_0x2a6790=(_0x528169=_0x1296d2==null?void 0x0:_0x1296d2[_0xc39ba6(0x1e0)])==null?void 0x0:_0x528169[_0xc39ba6(0x1e8)])!=null?_0x2a6790:0x0)>0x0){const _0x2ecb00=(_0x5de774,_0x2dc63d)=>({'id':_0x5de774['replyId'],'threadId':_0x5de774['threadId'],'dT':_0x53d14c(_0x5de774[_0xc39ba6(0x1fb)]),'personId':_0x5de774[_0xc39ba6(0x24c)],'resolved':_0x1296d2[_0xc39ba6(0x235)]===_0x55a88f[_0xc39ba6(0x200)],'unitId':_0x46818c,'subUnitId':_0x27bf66,'text':JSON[_0xc39ba6(0x242)](_0x5de774['content']),'parentId':_0x2dc63d}),_0x1443af=_0x2ecb00(_0x1296d2[_0xc39ba6(0x1e0)][0x0]);return{..._0x1443af,'children':_0x1296d2[_0xc39ba6(0x1e0)][_0xc39ba6(0x229)](0x1)[_0xc39ba6(0x240)](_0x5e454f=>_0x2ecb00(_0x5e454f,_0x1443af['id']))};}return null;}let _0x59d0d9=class{constructor(_0x35bf2b,_0x2ad2e8,_0x5c3c3e,_0x3df11c){const _0x58fd7b=_0x32f792;this['_httpService']=_0x35bf2b,this[_0x58fd7b(0x247)]=_0x2ad2e8,this[_0x58fd7b(0x236)]=_0x5c3c3e,this['_injector']=_0x3df11c;}async[_0x32f792(0x205)](_0x55333d){const _0x1ed39b=_0x32f792;var _0x3f8ff1,_0x38ea10;const {parentId:_0x139cf7,unitId:_0x6d60f9,text:_0x520457,threadId:_0x5dee78}=_0x55333d,_0x43f433=(_0x38ea10=(_0x3f8ff1=_0x520457[_0x1ed39b(0x1cb)])==null?void 0x0:_0x3f8ff1[_0x1ed39b(0x1c2)](_0x2f6937=>_0x2f6937[_0x1ed39b(0x1f4)]===_0x3d2349[_0x1ed39b(0x239)]['COMMENT'])[_0x1ed39b(0x240)](_0x10013a=>_0x10013a[_0x1ed39b(0x23e)]))!=null?_0x38ea10:[],_0x3bfec3=JSON[_0x1ed39b(0x20a)](_0x520457),_0x39d34e=(await this[_0x1ed39b(0x236)][_0x1ed39b(0x1f9)](_0x6d60f9))[_0x1ed39b(0x20e)]();if(_0x139cf7){const _0x2e5d09={'memberId':_0x39d34e,'unitId':_0x6d60f9,'content':_0x3bfec3,'mention':_0x43f433,'threadId':_0x5dee78},_0xb9fdab=(await this['_httpService'][_0x1ed39b(0x219)](_0x1ed39b(0x215)+_0x6d60f9+_0x1ed39b(0x1e7),{'body':_0x2e5d09}))[_0x1ed39b(0x1cd)][_0x1ed39b(0x1e3)];return{..._0x55333d,'id':_0xb9fdab[_0x1ed39b(0x1ca)],'dT':_0x3d2349[_0x1ed39b(0x226)](+_0xb9fdab[_0x1ed39b(0x1fb)])[_0x1ed39b(0x243)](_0x1ed39b(0x23a)),'personId':_0xb9fdab[_0x1ed39b(0x24c)]};}else{const _0xd79d18={'memberId':_0x39d34e,'unitId':_0x6d60f9,'content':_0x3bfec3,'mention':_0x43f433},_0x274295=await this['_httpService']['post'](_0x1ed39b(0x215)+_0x6d60f9+_0x1ed39b(0x1ee),{'body':_0xd79d18});return _0x3a2eb0(_0x274295[_0x1ed39b(0x1cd)][_0x1ed39b(0x1f3)],_0x55333d);}}async['updateComment'](_0x2abec5){const _0x32ae58=_0x32f792;var _0x4754fa,_0x50e24d;const {text:_0x48c27d,unitId:_0x182fae}=_0x2abec5,_0x294294=(_0x50e24d=(_0x4754fa=_0x48c27d['customRanges'])==null?void 0x0:_0x4754fa[_0x32ae58(0x1c2)](_0x56d5b6=>_0x56d5b6[_0x32ae58(0x1f4)]===_0x3d2349['CustomRangeType'][_0x32ae58(0x209)])[_0x32ae58(0x240)](_0x5dac7a=>_0x5dac7a[_0x32ae58(0x23e)]))!=null?_0x50e24d:[],_0xf44d85=JSON[_0x32ae58(0x20a)](_0x48c27d),_0x20f350=_0x2abec5[_0x32ae58(0x22d)],_0x1ea3a9=_0x2abec5['id'],_0x2868d9={'memberId':(await this[_0x32ae58(0x236)]['requireSession'](_0x182fae))[_0x32ae58(0x20e)](),'unitId':_0x182fae,'threadId':_0x20f350,'mention':_0x294294,'content':_0xf44d85,'replyId':_0x1ea3a9},_0x485218=await this[_0x32ae58(0x223)][_0x32ae58(0x219)](_0x32ae58(0x215)+_0x182fae+_0x32ae58(0x203),{'body':_0x2868d9});return!_0x485218[_0x32ae58(0x1cd)]['error']||_0x485218[_0x32ae58(0x1cd)]['error'][_0x32ae58(0x20d)]===0x1;}async['resolveComment'](_0x50f231){const _0x119379=_0x32f792,{unitId:_0x26e49a}=_0x50f231,_0x23a2f0=_0x50f231[_0x119379(0x22d)],_0x2c5314={'memberId':this[_0x119379(0x247)][_0x119379(0x1dc)]()[_0x119379(0x246)],'unitId':_0x26e49a,'threadId':_0x23a2f0,'solved':_0x50f231[_0x119379(0x1da)]?_0x55a88f[_0x119379(0x200)]:_0x55a88f[_0x119379(0x248)]},_0x4b9af5=await this[_0x119379(0x223)]['post'](_0x119379(0x215)+_0x26e49a+'/solved',{'body':_0x2c5314});return!_0x4b9af5[_0x119379(0x1cd)]['error']||_0x4b9af5[_0x119379(0x1cd)][_0x119379(0x1d2)][_0x119379(0x20d)]===0x1;}async[_0x32f792(0x1c3)](_0x35a4f0,_0x9b13d1,_0x2fbe74,_0x27a1b6){const _0x3bfac1=_0x32f792,_0x430ebd={'memberId':(await this[_0x3bfac1(0x236)][_0x3bfac1(0x1f9)](_0x35a4f0))[_0x3bfac1(0x20e)](),'threadId':_0x2fbe74,'replyId':_0x27a1b6,'unitId':_0x35a4f0},_0x459ef6=await this[_0x3bfac1(0x223)][_0x3bfac1(0x219)](_0x3bfac1(0x215)+_0x35a4f0+'/delete',{'body':_0x430ebd});return!_0x459ef6[_0x3bfac1(0x1cd)][_0x3bfac1(0x1d2)]||_0x459ef6[_0x3bfac1(0x1cd)][_0x3bfac1(0x1d2)]['code']===0x1;}async['listComments'](_0x1152c3,_0x57fd5f,_0x53e996){const _0x190f7e=_0x32f792,_0x216f57={'unitId':_0x1152c3,'threadId':_0x53e996},_0x26bbb0=await this[_0x190f7e(0x223)][_0x190f7e(0x219)](_0x190f7e(0x215)+_0x1152c3+'/list',{'body':_0x216f57}),_0x3cd4fa=_0x53e996[_0x190f7e(0x240)](_0xdf9ef6=>_0x1df6e8(_0x26bbb0[_0x190f7e(0x1cd)][_0x190f7e(0x211)][_0xdf9ef6],_0x1152c3,_0x57fd5f))[_0x190f7e(0x1c2)](Boolean);return Object['values'](_0x26bbb0[_0x190f7e(0x1cd)][_0x190f7e(0x1db)])['forEach'](_0x4aa009=>{const _0x55d204=_0x190f7e;this[_0x55d204(0x247)][_0x55d204(0x1fd)](_0x4aa009);}),_0x3cd4fa;}[_0x32f792(0x1d0)](_0x11787f){const _0x20dba1=_0x32f792;return{'id':_0x11787f['id'],'threadId':_0x11787f[_0x20dba1(0x22d)],'ref':_0x11787f['ref']};}};_0x59d0d9=_0x7d825d([_0x2d8e28(0x0,_0x3d2349[_0x32f792(0x1cf)](_0x1c96cf['HTTPService'])),_0x2d8e28(0x1,_0x3d2349[_0x32f792(0x1cf)](_0x3d2349['UserManagerService'])),_0x2d8e28(0x2,_0x3d2349[_0x32f792(0x1cf)](_0x5bf447[_0x32f792(0x1df)])),_0x2d8e28(0x3,_0x3d2349[_0x32f792(0x1cf)](_0x3d2349[_0x32f792(0x245)]))],_0x59d0d9);var _0x69fd53=Object[_0x32f792(0x206)],_0x205afc=(_0x1a6058,_0x3b0a8a,_0x4d8cae,_0x276e57)=>{const _0x20fadd=_0x32f792;for(var _0x1b1672=_0x276e57>0x1?void 0x0:_0x276e57?_0x69fd53(_0x3b0a8a,_0x4d8cae):_0x3b0a8a,_0x5ef300=_0x1a6058[_0x20fadd(0x1e8)]-0x1,_0x3c56b1;_0x5ef300>=0x0;_0x5ef300--)(_0x3c56b1=_0x1a6058[_0x5ef300])&&(_0x1b1672=_0x3c56b1(_0x1b1672)||_0x1b1672);return _0x1b1672;},_0x1e0a69=(_0xd65d9,_0x2db075)=>(_0x5a683a,_0x407b61)=>_0x2db075(_0x5a683a,_0x407b61,_0xd65d9);let _0x165979=class extends _0x3d2349['Disposable']{constructor(_0x151cb6,_0x490627){const _0x203b4e=_0x32f792;super(),this[_0x203b4e(0x1e9)]=_0x151cb6,this[_0x203b4e(0x217)]=_0x490627,this['_initDataSource']();}['_initDataSource'](){const _0x91997e=_0x32f792;this[_0x91997e(0x1e9)][_0x91997e(0x1c6)]=this[_0x91997e(0x217)],this[_0x91997e(0x1e9)]['syncUpdateMutationToColla']=!0x1;}};_0x165979=_0x205afc([_0x1e0a69(0x0,_0x163613[_0x32f792(0x1fc)]),_0x1e0a69(0x1,_0x3d2349['Inject'](_0x59d0d9))],_0x165979);var _0x5db343=Object[_0x32f792(0x208)],_0x16e533=Object['getOwnPropertyDescriptor'],_0x4b1f61=(_0x2c9caa,_0x5a578c,_0x3aad28)=>_0x5a578c in _0x2c9caa?_0x5db343(_0x2c9caa,_0x5a578c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3aad28}):_0x2c9caa[_0x5a578c]=_0x3aad28,_0x5681cd=(_0x344422,_0x5f192e,_0x55b018,_0x3730ac)=>{const _0x1e63b0=_0x32f792;for(var _0x17d6b9=_0x3730ac>0x1?void 0x0:_0x3730ac?_0x16e533(_0x5f192e,_0x55b018):_0x5f192e,_0x596df8=_0x344422[_0x1e63b0(0x1e8)]-0x1,_0x53bd17;_0x596df8>=0x0;_0x596df8--)(_0x53bd17=_0x344422[_0x596df8])&&(_0x17d6b9=_0x53bd17(_0x17d6b9)||_0x17d6b9);return _0x17d6b9;},_0x13b900=(_0x1aeaf3,_0x472c49)=>(_0x3362dd,_0x2d039c)=>_0x472c49(_0x3362dd,_0x2d039c,_0x1aeaf3),_0x27c141=(_0x16a990,_0x3fda19,_0xaf7f98)=>_0x4b1f61(_0x16a990,typeof _0x3fda19!=_0x32f792(0x1d5)?_0x3fda19+'':_0x3fda19,_0xaf7f98);_0x2682ef[_0x32f792(0x224)]=class extends _0x3d2349['Plugin']{constructor(_0x20a41c=_0x34d92f,_0x2013ce,_0x44483d){const _0x3c536e=_0x32f792;super(),this[_0x3c536e(0x234)]=_0x20a41c,this['_injector']=_0x2013ce,this[_0x3c536e(0x1d8)]=_0x44483d;const {..._0x483d11}=_0x3d2349[_0x3c536e(0x1c4)]({},_0x34d92f,this['_config']);this['_configService'][_0x3c536e(0x1f6)](_0x33ef92,_0x483d11);}[_0x32f792(0x1fe)](){[[_0x59d0d9],[_0x165979],[_0x34b785]]['forEach'](_0x2222c3=>{const _0x256784=_0x45a4;this[_0x256784(0x1e5)]['add'](_0x2222c3);});}['onReady'](){const _0x1a55d8=_0x32f792;this[_0x1a55d8(0x1e5)][_0x1a55d8(0x249)](_0x165979),this[_0x1a55d8(0x1e5)]['get'](_0x34b785);}},_0x27c141(_0x2682ef['UniverThreadCommentDataSourcePlugin'],_0x32f792(0x23d),_0x6600a5),_0x27c141(_0x2682ef[_0x32f792(0x224)],_0x32f792(0x1d4),_0x3d2349[_0x32f792(0x231)][_0x32f792(0x202)]),_0x2682ef[_0x32f792(0x224)]=_0x5681cd([_0x3d2349['DependentOn'](_0x2eb246[_0x32f792(0x1e1)],_0x5bf447[_0x32f792(0x207)],_0x87c284[_0x32f792(0x1d6)]),_0x13b900(0x1,_0x3d2349[_0x32f792(0x1cf)](_0x3d2349[_0x32f792(0x245)])),_0x13b900(0x2,_0x3d2349[_0x32f792(0x1dd)])],_0x2682ef[_0x32f792(0x224)]),Object[_0x32f792(0x208)](_0x2682ef,Symbol[_0x32f792(0x1cc)],{'value':_0x32f792(0x1c5)});}));function _0x45a4(_0x4148b0,_0x15bc52){const _0x45e888=_0x45e8();return _0x45a4=function(_0x45a4ce,_0xfeb70c){_0x45a4ce=_0x45a4ce-0x1c2;let _0x4a8f6f=_0x45e888[_0x45a4ce];return _0x4a8f6f;},_0x45a4(_0x4148b0,_0x15bc52);}function _0x45e8(){const _0xbe8abd=['_config','solved','_sessionService','@univerjs/network','thread-comment-data-source.config','CustomRangeType','YYYY/MM/DD\x20HH:mm','payload','exports','pluginName','rangeId','resolveComment','map','_init','parse','format','@univerjs/core','Injector','userID','_userService','OpenOrReOpen','get','UniverProThreadCommentDatasource','78IvPnwI','userId','filter','deleteComment','merge','Module','dataSource','3598776BUWdib','parentId','user','replyId','customRanges','toStringTag','body','UniverProCollaborationClient','Inject','saveCommentToSnapshot','1694560eHCuDq','error','amd','type','symbol','UniverLicensePlugin','updateComment','_configService','Reply','resolved','users','getCurrentUser','IConfigService','UserManagerService','CollaborationSessionService','replies','UniverThreadCommentUIPlugin','33zDcTgb','reply','getComment','_injector','@univerjs/thread-comment-ui','/reply','length','_threadCommentDataSourceService','disposeWithMe','HTTPService','UNRECOGNIZED','object','/add','subscribe','6RfcBJA','UniverNetwork','size','comment','rangeType','@univerjs-pro/license','setConfig','rxjs','_initUserSync','requireSession','root','createTimestamp','IThreadCommentDataSourceService','addUser','onStarting','@univerjs/thread-comment','Solved','getUser','UNIVER_UNKNOWN','/edit','@univerjs-pro/collaboration-client','addComment','getOwnPropertyDescriptor','UniverCollaborationClientPlugin','defineProperty','COMMENT','stringify','function','6446064FaBFsB','code','getMemberID','/universer-api/user/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comments','bufferTime','Add','forEach','/universer-api/comment/unit/','Edit','_threadCommentDataSource','34856hdXAqp','post','8rHbspF','UniverThreadCommentUi','_commentService','commentUpdate$','add','content','267xyeRdt','delete','pipe','_httpService','UniverThreadCommentDataSourcePlugin','unitId','dayjs','getUnit','UniverCore','slice','find','Unknown','_threadCommentModel','threadId','2924012KkRfQw','Solve','Delete','UniverInstanceType','135449AxNwbC','4330OkweGK'];_0x45e8=function(){return _0xbe8abd;};return _0x45e8();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.10-nightly.
|
|
3
|
+
"version": "0.6.10-nightly.202504281607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,18 +45,18 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.6.10-nightly.
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/network": "0.6.10-nightly.202504271606",
|
|
52
|
-
"@univerjs/thread-comment": "0.6.10-nightly.202504271606",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.10-nightly.202504281607",
|
|
49
|
+
"@univerjs/core": "0.6.10-nightly.202504281607",
|
|
50
|
+
"@univerjs-pro/license": "0.6.10-nightly.202504281607",
|
|
53
51
|
"@univerjs/protocol": "0.1.46-alpha.3",
|
|
54
|
-
"@univerjs/thread-comment
|
|
52
|
+
"@univerjs/thread-comment": "0.6.10-nightly.202504281607",
|
|
53
|
+
"@univerjs/network": "0.6.10-nightly.202504281607",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.6.10-nightly.202504281607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
|
-
"vite": "^6.3.
|
|
59
|
+
"vite": "^6.3.3",
|
|
60
60
|
"vitest": "^3.1.2",
|
|
61
61
|
"@univerjs-infra/shared": "0.6.10"
|
|
62
62
|
},
|