@univerjs-pro/thread-comment-datasource 0.6.7 → 0.6.9
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 -0
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x5c8879=_0x26b1;(function(_0x2ae74f,_0xf0dce){const _0x4a80bd=_0x26b1,_0x6e6e34=_0x2ae74f();while(!![]){try{const _0x35e151=parseInt(_0x4a80bd(0xe4))/0x1*(parseInt(_0x4a80bd(0x117))/0x2)+parseInt(_0x4a80bd(0x131))/0x3+parseInt(_0x4a80bd(0x11a))/0x4+-parseInt(_0x4a80bd(0xee))/0x5+parseInt(_0x4a80bd(0xd7))/0x6+-parseInt(_0x4a80bd(0x108))/0x7*(parseInt(_0x4a80bd(0xe1))/0x8)+-parseInt(_0x4a80bd(0x140))/0x9;if(_0x35e151===_0xf0dce)break;else _0x6e6e34['push'](_0x6e6e34['shift']());}catch(_0x5be39a){_0x6e6e34['push'](_0x6e6e34['shift']());}}}(_0x4ca3,0x540aa));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require(_0x5c8879(0x11f)),j=require(_0x5c8879(0x101)),M=require(_0x5c8879(0xd0)),w=require('rxjs'),P=require(_0x5c8879(0xed)),U=_0x5c8879(0x112);var I=(_0x245d61=>(_0x245d61[_0x245d61[_0x5c8879(0x118)]=0x0]=_0x5c8879(0x118),_0x245d61[_0x245d61[_0x5c8879(0xd5)]=0x1]=_0x5c8879(0xd5),_0x245d61[_0x245d61[_0x5c8879(0xdd)]=-0x1]=_0x5c8879(0xdd),_0x245d61))(I||{}),v=(_0x35143e=>(_0x35143e[_0x35143e['Unknown']=0x0]=_0x5c8879(0x12a),_0x35143e[_0x35143e[_0x5c8879(0x10d)]=0x1]=_0x5c8879(0x10d),_0x35143e[_0x35143e[_0x5c8879(0x121)]=0x2]=_0x5c8879(0x121),_0x35143e[_0x35143e[_0x5c8879(0xdc)]=0x3]='Edit',_0x35143e[_0x35143e[_0x5c8879(0x120)]=0x4]=_0x5c8879(0x120),_0x35143e[_0x35143e['Solve']=0x5]='Solve',_0x35143e[_0x35143e[_0x5c8879(0xdd)]=-0x1]=_0x5c8879(0xdd),_0x35143e))(v||{});const f=_0x2b4eaf=>c['dayjs'](new Date(+_0x2b4eaf))[_0x5c8879(0xfb)](_0x5c8879(0xf9)),R=async(_0x2b75bf,_0x5ea0b8)=>{const _0x464365=_0x5c8879,_0x56431f=_0x2b75bf[_0x464365(0x136)](c['UserManagerService']),_0x467872=_0x2b75bf[_0x464365(0x136)](P[_0x464365(0x11b)]);_0x5ea0b8['forEach'](_0x3bb78d=>{const _0x187340=_0x464365;_0x56431f['getUser'](_0x3bb78d)&&_0x5ea0b8[_0x187340(0x13a)](_0x3bb78d);}),_0x5ea0b8['size']&&(await _0x467872[_0x464365(0x136)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5ea0b8]}}))['body'][_0x464365(0xfc)][_0x464365(0x138)](_0x5cf56d=>{const _0x19da6a=_0x464365;_0x5cf56d&&_0x56431f[_0x19da6a(0xd8)](_0x5cf56d);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x129c64,_0x27b946,_0x5c89a8,_0x3af25e)=>{const _0x4bbd90=_0x5c8879;for(var _0x5efc44=_0x3af25e>0x1?void 0x0:_0x3af25e?$(_0x27b946,_0x5c89a8):_0x27b946,_0x1402f1=_0x129c64[_0x4bbd90(0xec)]-0x1,_0x1cf428;_0x1402f1>=0x0;_0x1402f1--)(_0x1cf428=_0x129c64[_0x1402f1])&&(_0x5efc44=_0x1cf428(_0x5efc44)||_0x5efc44);return _0x5efc44;},S=(_0x28fef0,_0x48f688)=>(_0x160303,_0x4062ab)=>_0x48f688(_0x160303,_0x4062ab,_0x28fef0);let p=class extends c['Disposable']{constructor(_0x3ba1cf,_0x5a6eca,_0x532cf8,_0xab1d5a){const _0x587693=_0x5c8879;super(),this['_commentService']=_0x3ba1cf,this[_0x587693(0x105)]=_0x5a6eca,this[_0x587693(0xd3)]=_0x532cf8,this[_0x587693(0xe7)]=_0xab1d5a,this[_0x587693(0xd1)](),this['_initUserSync']();}[_0x5c8879(0xdb)](){const _0x5b8d37=_0x5c8879;this[_0x5b8d37(0x10a)](this['_threadCommentModel'][_0x5b8d37(0xf1)][_0x5b8d37(0xe8)](w['bufferTime'](0x10))['subscribe'](_0x3bf4d4=>{const _0x36ca97=_0x5b8d37,_0x27025d=new Set();_0x3bf4d4[_0x36ca97(0x138)](_0xf43eac=>{const _0x467dc9=_0x36ca97;switch(_0xf43eac[_0x467dc9(0xfd)]){case _0x467dc9(0xfe):{const _0x8052fc=_0xf43eac[_0x467dc9(0x139)][_0x467dc9(0xe6)];_0x27025d['add'](_0x8052fc);break;}}}),R(this[_0x36ca97(0xe7)],_0x27025d);}));}[_0x5c8879(0xd1)](){const _0x402fa9=_0x5c8879;this[_0x402fa9(0x10a)](this[_0x402fa9(0xf5)][_0x402fa9(0xf1)][_0x402fa9(0x111)](async _0x494304=>{const _0x568204=_0x402fa9;var _0x44c771,_0x118857,_0x15fa2e,_0x328916;const _0x18dc08=(_0x44c771=this[_0x568204(0x105)]['getUnit'](_0x494304[_0x568204(0x119)])[_0x568204(0x128)](_0xa3da6d=>_0xa3da6d[_0x568204(0xf0)]===_0x494304[_0x568204(0xf0)]))==null?void 0x0:_0x44c771[_0x568204(0x13c)];if(!_0x18dc08)return;const {unitId:_0x5c96cb,subUnitId:_0x4190c5}=_0x18dc08;switch(_0x494304[_0x568204(0x11e)]&&this[_0x568204(0xd3)][_0x568204(0xd8)](_0x494304[_0x568204(0x11e)]),_0x494304[_0x568204(0xfd)]){case v[_0x568204(0x10d)]:break;case v[_0x568204(0x121)]:{this[_0x568204(0x105)][_0x568204(0x107)](_0x5c96cb,_0x4190c5,{'unitId':_0x5c96cb,'subUnitId':_0x4190c5,'ref':'','id':_0x494304[_0x568204(0xea)],'dT':f(+_0x494304[_0x568204(0xda)]),'threadId':_0x494304[_0x568204(0xf0)],'personId':(_0x15fa2e=(_0x118857=_0x494304[_0x568204(0x11e)])==null?void 0x0:_0x118857['userID'])!=null?_0x15fa2e:_0x494304[_0x568204(0x10b)],'text':JSON[_0x568204(0x110)](_0x494304[_0x568204(0x13b)]),'parentId':_0x18dc08['id']});break;}case v['Delete']:{const _0x2f3796=this[_0x568204(0x105)][_0x568204(0x106)](_0x5c96cb,_0x4190c5,_0x494304[_0x568204(0xea)]);_0x2f3796&&_0x2f3796[_0x568204(0x12b)]&&this['_threadCommentModel']['deleteComment'](_0x5c96cb,_0x4190c5,_0x494304['replyId']);break;}case v[_0x568204(0xdc)]:{this['_threadCommentModel'][_0x568204(0x114)](_0x5c96cb,_0x4190c5,{'commentId':_0x494304['replyId'],'text':JSON[_0x568204(0x110)](_0x494304[_0x568204(0x13b)])});break;}case v[_0x568204(0xe2)]:{const _0x486cea=(_0x328916=this[_0x568204(0x105)][_0x568204(0xd2)](_0x494304[_0x568204(0x119)])[_0x568204(0x128)](_0x4c37b7=>_0x4c37b7[_0x568204(0xf0)]===_0x494304['threadId']))==null?void 0x0:_0x328916[_0x568204(0x13c)];_0x486cea&&this[_0x568204(0x105)]['resolveComment'](_0x5c96cb,_0x4190c5,_0x486cea['id'],_0x494304[_0x568204(0xf2)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x5c8879(0x13d)](b[_0x5c8879(0x137)])),S(0x1,c['Inject'](M[_0x5c8879(0x13e)])),S(0x2,c[_0x5c8879(0x13d)](c[_0x5c8879(0xde)])),S(0x3,c['Inject'](c[_0x5c8879(0x122)]))],p);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x3cd882,_0xc3a71c,_0x552046,_0x171daa)=>{const _0x10e23d=_0x5c8879;for(var _0x170c05=_0x171daa>0x1?void 0x0:_0x171daa?A(_0xc3a71c,_0x552046):_0xc3a71c,_0x591230=_0x3cd882[_0x10e23d(0xec)]-0x1,_0x13332c;_0x591230>=0x0;_0x591230--)(_0x13332c=_0x3cd882[_0x591230])&&(_0x170c05=_0x13332c(_0x170c05)||_0x170c05);return _0x170c05;},_=(_0x58683f,_0x5b7f3f)=>(_0x4db33d,_0x312922)=>_0x5b7f3f(_0x4db33d,_0x312922,_0x58683f);function Y(_0x2b4859,_0xbb70f7){const _0x295321=_0x5c8879,_0x5dae2e=_0x2b4859[_0x295321(0xf4)][0x0];return{..._0xbb70f7,'id':_0x5dae2e[_0x295321(0xea)],'resolved':_0x2b4859[_0x295321(0xf2)]===0x1,'dT':f(_0x5dae2e[_0x295321(0xda)]),'personId':_0x5dae2e[_0x295321(0x10b)],'threadId':_0x5dae2e[_0x295321(0xf0)]};}function _0x26b1(_0x47012b,_0x2f84b7){const _0x4ca3df=_0x4ca3();return _0x26b1=function(_0x26b12f,_0x49d862){_0x26b12f=_0x26b12f-0xd0;let _0x2ee4db=_0x4ca3df[_0x26b12f];return _0x2ee4db;},_0x26b1(_0x47012b,_0x2f84b7);}function G(_0x2218e9,_0x55f95c,_0x2512c6){const _0x3c52b2=_0x5c8879;var _0x5c0b0f,_0x1b5534;if(((_0x1b5534=(_0x5c0b0f=_0x2218e9==null?void 0x0:_0x2218e9['replies'])==null?void 0x0:_0x5c0b0f[_0x3c52b2(0xec)])!=null?_0x1b5534:0x0)>0x0){const _0x514902=(_0x20c1f5,_0x284b34)=>({'id':_0x20c1f5[_0x3c52b2(0xea)],'threadId':_0x20c1f5[_0x3c52b2(0xf0)],'dT':f(_0x20c1f5[_0x3c52b2(0xda)]),'personId':_0x20c1f5[_0x3c52b2(0x10b)],'resolved':_0x2218e9[_0x3c52b2(0xf2)]===I[_0x3c52b2(0xd5)],'unitId':_0x55f95c,'subUnitId':_0x2512c6,'text':JSON[_0x3c52b2(0x110)](_0x20c1f5[_0x3c52b2(0x13b)]),'parentId':_0x284b34}),_0x30a96a=_0x514902(_0x2218e9[_0x3c52b2(0xf4)][0x0]);return{..._0x30a96a,'children':_0x2218e9['replies'][_0x3c52b2(0xf8)](0x1)[_0x3c52b2(0xef)](_0x49be02=>_0x514902(_0x49be02,_0x30a96a['id']))};}return null;}let g=class{constructor(_0x14ad32,_0x213f25,_0x1d2263,_0x411db2){const _0x7be7f1=_0x5c8879;this[_0x7be7f1(0x132)]=_0x14ad32,this[_0x7be7f1(0xd3)]=_0x213f25,this['_sessionService']=_0x1d2263,this[_0x7be7f1(0xe7)]=_0x411db2;}async[_0x5c8879(0x107)](_0x355ed6){const _0x51eeed=_0x5c8879;var _0x3b151b,_0x1269fc;const {parentId:_0x43045c,unitId:_0x20e8b5,text:_0x12a543,threadId:_0x24867e}=_0x355ed6,_0x26e03f=(_0x1269fc=(_0x3b151b=_0x12a543[_0x51eeed(0x104)])==null?void 0x0:_0x3b151b[_0x51eeed(0xeb)](_0x19b49e=>_0x19b49e[_0x51eeed(0x126)]===c['CustomRangeType'][_0x51eeed(0x141)])[_0x51eeed(0xef)](_0x2ad6cc=>_0x2ad6cc['rangeId']))!=null?_0x1269fc:[],_0x2bede9=JSON[_0x51eeed(0xd9)](_0x12a543),_0x37479b=(await this[_0x51eeed(0x113)][_0x51eeed(0x109)](_0x20e8b5))[_0x51eeed(0xe3)]();if(_0x43045c){const _0x5e1eaf={'memberId':_0x37479b,'unitId':_0x20e8b5,'content':_0x2bede9,'mention':_0x26e03f,'threadId':_0x24867e},_0x191172=(await this[_0x51eeed(0x132)]['post'](_0x51eeed(0x124)+_0x20e8b5+_0x51eeed(0x135),{'body':_0x5e1eaf}))[_0x51eeed(0x12f)]['reply'];return{..._0x355ed6,'id':_0x191172['replyId'],'dT':c[_0x51eeed(0x125)](+_0x191172[_0x51eeed(0xda)])[_0x51eeed(0xfb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x191172[_0x51eeed(0x10b)]};}else{const _0x582b82={'memberId':_0x37479b,'unitId':_0x20e8b5,'content':_0x2bede9,'mention':_0x26e03f},_0x26d2f3=await this[_0x51eeed(0x132)][_0x51eeed(0xd4)](_0x51eeed(0x124)+_0x20e8b5+_0x51eeed(0xf7),{'body':_0x582b82});return Y(_0x26d2f3[_0x51eeed(0x12f)]['comment'],_0x355ed6);}}async['updateComment'](_0x103e72){const _0x1e0fb1=_0x5c8879;var _0x300b24,_0x3a7b12;const {text:_0xd13ae8,unitId:_0x3f8c13}=_0x103e72,_0x31196b=(_0x3a7b12=(_0x300b24=_0xd13ae8[_0x1e0fb1(0x104)])==null?void 0x0:_0x300b24[_0x1e0fb1(0xeb)](_0x248566=>_0x248566[_0x1e0fb1(0x126)]===c['CustomRangeType'][_0x1e0fb1(0x141)])[_0x1e0fb1(0xef)](_0x57f632=>_0x57f632[_0x1e0fb1(0xdf)]))!=null?_0x3a7b12:[],_0x206970=JSON[_0x1e0fb1(0xd9)](_0xd13ae8),_0x238345=_0x103e72[_0x1e0fb1(0xf0)],_0x28c519=_0x103e72['id'],_0x4a6f3b={'memberId':(await this[_0x1e0fb1(0x113)][_0x1e0fb1(0x109)](_0x3f8c13))['getMemberID'](),'unitId':_0x3f8c13,'threadId':_0x238345,'mention':_0x31196b,'content':_0x206970,'replyId':_0x28c519},_0x189821=await this[_0x1e0fb1(0x132)][_0x1e0fb1(0xd4)]('/universer-api/comment/unit/'+_0x3f8c13+'/edit',{'body':_0x4a6f3b});return!_0x189821[_0x1e0fb1(0x12f)][_0x1e0fb1(0x116)]||_0x189821[_0x1e0fb1(0x12f)][_0x1e0fb1(0x116)][_0x1e0fb1(0x123)]===0x1;}async[_0x5c8879(0xe9)](_0xe27b5d){const _0xd57b9e=_0x5c8879,{unitId:_0xe92a6a}=_0xe27b5d,_0x478310=_0xe27b5d[_0xd57b9e(0xf0)],_0x5a1c30={'memberId':this[_0xd57b9e(0xd3)]['getCurrentUser']()[_0xd57b9e(0x13f)],'unitId':_0xe92a6a,'threadId':_0x478310,'solved':_0xe27b5d[_0xd57b9e(0x11c)]?I[_0xd57b9e(0xd5)]:I['OpenOrReOpen']},_0x57659f=await this[_0xd57b9e(0x132)][_0xd57b9e(0xd4)]('/universer-api/comment/unit/'+_0xe92a6a+_0xd57b9e(0xff),{'body':_0x5a1c30});return!_0x57659f['body'][_0xd57b9e(0x116)]||_0x57659f['body'][_0xd57b9e(0x116)][_0xd57b9e(0x123)]===0x1;}async[_0x5c8879(0x11d)](_0x4f9529,_0x54baac,_0x7a5cb2,_0xad90e2){const _0x34a189=_0x5c8879,_0x286185={'memberId':(await this[_0x34a189(0x113)][_0x34a189(0x109)](_0x4f9529))[_0x34a189(0xe3)](),'threadId':_0x7a5cb2,'replyId':_0xad90e2,'unitId':_0x4f9529},_0x4b41fe=await this[_0x34a189(0x132)][_0x34a189(0xd4)](_0x34a189(0x124)+_0x4f9529+_0x34a189(0x103),{'body':_0x286185});return!_0x4b41fe[_0x34a189(0x12f)][_0x34a189(0x116)]||_0x4b41fe[_0x34a189(0x12f)][_0x34a189(0x116)][_0x34a189(0x123)]===0x1;}async['listComments'](_0xa7f53,_0x6c2fe9,_0x9e5918){const _0x5e1e82=_0x5c8879,_0x585a69={'unitId':_0xa7f53,'threadId':_0x9e5918},_0x5f5603=await this['_httpService']['post'](_0x5e1e82(0x124)+_0xa7f53+'/list',{'body':_0x585a69}),_0x1df143=_0x9e5918[_0x5e1e82(0xef)](_0x5f12c6=>G(_0x5f5603[_0x5e1e82(0x12f)][_0x5e1e82(0x12c)][_0x5f12c6],_0xa7f53,_0x6c2fe9))[_0x5e1e82(0xeb)](Boolean);return Object['values'](_0x5f5603[_0x5e1e82(0x12f)][_0x5e1e82(0xfc)])[_0x5e1e82(0x138)](_0x4c17a5=>{const _0x45709b=_0x5e1e82;this[_0x45709b(0xd3)][_0x45709b(0xd8)](_0x4c17a5);}),_0x1df143;}['saveCommentToSnapshot'](_0x28d9f1){const _0x586b7c=_0x5c8879;return{'id':_0x28d9f1['id'],'threadId':_0x28d9f1['threadId'],'ref':_0x28d9f1[_0x586b7c(0xf6)]};}};g=x([_(0x0,c[_0x5c8879(0x13d)](P['HTTPService'])),_(0x1,c[_0x5c8879(0x13d)](c['UserManagerService'])),_(0x2,c[_0x5c8879(0x13d)](b['CollaborationSessionService'])),_(0x3,c[_0x5c8879(0x13d)](c[_0x5c8879(0x122)]))],g);var H=Object[_0x5c8879(0x130)],J=(_0x10b377,_0x55a9e6,_0x3f44e6,_0x3a168a)=>{const _0x5a7d6b=_0x5c8879;for(var _0x4fe689=_0x3a168a>0x1?void 0x0:_0x3a168a?H(_0x55a9e6,_0x3f44e6):_0x55a9e6,_0x3cd5da=_0x10b377[_0x5a7d6b(0xec)]-0x1,_0x22096f;_0x3cd5da>=0x0;_0x3cd5da--)(_0x22096f=_0x10b377[_0x3cd5da])&&(_0x4fe689=_0x22096f(_0x4fe689)||_0x4fe689);return _0x4fe689;},y=(_0x594e2d,_0x2eb7ef)=>(_0x41ec4b,_0x54a0ec)=>_0x2eb7ef(_0x41ec4b,_0x54a0ec,_0x594e2d);function _0x4ca3(){const _0x4aa27c=['defineProperty','/delete','customRanges','_threadCommentModel','getComment','addComment','35021XaHxEk','requireSession','disposeWithMe','userId','IThreadCommentDataSourceService','Add','_configService','syncUpdateMutationToColla','parse','subscribe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','updateComment','_threadCommentDataSourceService','error','2EgNsJo','OpenOrReOpen','unitId','1863848erEMZo','HTTPService','resolved','deleteComment','user','@univerjs/core','Delete','Reply','Injector','code','/universer-api/comment/unit/','dayjs','rangeType','dataSource','find','DependentOn','Unknown','parentId','comments','_initDataSource','symbol','body','getOwnPropertyDescriptor','519807Dbvvya','_httpService','_threadCommentDataSource','UniverThreadCommentDataSourcePlugin','/reply','get','CommentService','forEach','payload','delete','content','root','Inject','ThreadCommentModel','userID','2298618sAWpSy','COMMENT','@univerjs/thread-comment','_init','getUnit','_userService','post','Solved','UNIVER_UNKNOWN','339024SKYxYG','addUser','stringify','createTimestamp','_initUserSync','Edit','UNRECOGNIZED','UserManagerService','rangeId','merge','1056VwABUN','Solve','getMemberID','603127OjaQBs','UniverLicensePlugin','personId','_injector','pipe','resolveComment','replyId','filter','length','@univerjs/network','194150URBItd','map','threadId','commentUpdate$','solved','UniverCollaborationClientPlugin','replies','_commentService','ref','/add','slice','YYYY/MM/DD\x20HH:mm','Plugin','format','users','type','add','/solved','UniverThreadCommentUIPlugin','@univerjs/thread-comment-ui'];_0x4ca3=function(){return _0x4aa27c;};return _0x4ca3();}let C=class extends c['Disposable']{constructor(_0x50a5ae,_0x5b121b){const _0x4971ef=_0x5c8879;super(),this[_0x4971ef(0x115)]=_0x50a5ae,this[_0x4971ef(0x133)]=_0x5b121b,this[_0x4971ef(0x12d)]();}[_0x5c8879(0x12d)](){const _0x11256f=_0x5c8879;this[_0x11256f(0x115)][_0x11256f(0x127)]=this[_0x11256f(0x133)],this[_0x11256f(0x115)][_0x11256f(0x10f)]=!0x1;}};C=J([y(0x0,M[_0x5c8879(0x10c)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x5c8879(0x102)],L=Object[_0x5c8879(0x130)],Z=(_0x23cb7e,_0x471531,_0x14242b)=>_0x471531 in _0x23cb7e?F(_0x23cb7e,_0x471531,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14242b}):_0x23cb7e[_0x471531]=_0x14242b,W=(_0x5c3665,_0x343a2b,_0x5e45dd,_0x8e7615)=>{const _0x4589f3=_0x5c8879;for(var _0x79fbc3=_0x8e7615>0x1?void 0x0:_0x8e7615?L(_0x343a2b,_0x5e45dd):_0x343a2b,_0x2271d7=_0x5c3665[_0x4589f3(0xec)]-0x1,_0x546003;_0x2271d7>=0x0;_0x2271d7--)(_0x546003=_0x5c3665[_0x2271d7])&&(_0x79fbc3=_0x546003(_0x79fbc3)||_0x79fbc3);return _0x79fbc3;},O=(_0x4c59ba,_0x1ef164)=>(_0x56913e,_0x2a8991)=>_0x1ef164(_0x56913e,_0x2a8991,_0x4c59ba),N=(_0x428079,_0x2f1e27,_0x5b4150)=>Z(_0x428079,typeof _0x2f1e27!=_0x5c8879(0x12e)?_0x2f1e27+'':_0x2f1e27,_0x5b4150);exports[_0x5c8879(0x134)]=class extends c[_0x5c8879(0xfa)]{constructor(_0x4157ac=D,_0x2d2fcc,_0x1f792b){const _0x2dd356=_0x5c8879;super(),this['_config']=_0x4157ac,this['_injector']=_0x2d2fcc,this[_0x2dd356(0x10e)]=_0x1f792b;const {..._0xe00792}=c[_0x2dd356(0xe0)]({},D,this['_config']);this[_0x2dd356(0x10e)]['setConfig'](q,_0xe00792);}['onStarting'](){const _0x2082c6=_0x5c8879;[[g],[C],[p]][_0x2082c6(0x138)](_0x3be5b9=>{const _0x2b1584=_0x2082c6;this[_0x2b1584(0xe7)][_0x2b1584(0xfe)](_0x3be5b9);});}['onReady'](){const _0x365506=_0x5c8879;this[_0x365506(0xe7)][_0x365506(0x136)](C),this['_injector'][_0x365506(0x136)](p);}},N(exports[_0x5c8879(0x134)],'pluginName',U),N(exports[_0x5c8879(0x134)],'type',c['UniverInstanceType'][_0x5c8879(0xd6)]),exports[_0x5c8879(0x134)]=W([c[_0x5c8879(0x129)](j[_0x5c8879(0x100)],b[_0x5c8879(0xf3)],T[_0x5c8879(0xe5)]),O(0x1,c[_0x5c8879(0x13d)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x5c8879(0x134)]);
|
|
1
|
+
'use strict';const _0x24ddea=_0x4779;(function(_0x27e2f2,_0x9e0fa3){const _0x320a03=_0x4779,_0x401b8b=_0x27e2f2();while(!![]){try{const _0x2d5556=-parseInt(_0x320a03(0xd0))/0x1+parseInt(_0x320a03(0xca))/0x2*(-parseInt(_0x320a03(0x97))/0x3)+-parseInt(_0x320a03(0xba))/0x4*(parseInt(_0x320a03(0xf1))/0x5)+parseInt(_0x320a03(0x80))/0x6*(-parseInt(_0x320a03(0xa7))/0x7)+-parseInt(_0x320a03(0xb0))/0x8*(parseInt(_0x320a03(0x8e))/0x9)+-parseInt(_0x320a03(0xe2))/0xa*(parseInt(_0x320a03(0x8a))/0xb)+parseInt(_0x320a03(0xef))/0xc;if(_0x2d5556===_0x9e0fa3)break;else _0x401b8b['push'](_0x401b8b['shift']());}catch(_0xbc85b1){_0x401b8b['push'](_0x401b8b['shift']());}}}(_0x225e,0xe31f2));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x24ddea(0x84)});const b=require(_0x24ddea(0xa1)),T=require(_0x24ddea(0xd9)),c=require(_0x24ddea(0x8b)),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require(_0x24ddea(0x77)),P=require('@univerjs/network'),U=_0x24ddea(0xb3);var I=(_0x1b0785=>(_0x1b0785[_0x1b0785[_0x24ddea(0x93)]=0x0]='OpenOrReOpen',_0x1b0785[_0x1b0785['Solved']=0x1]=_0x24ddea(0x89),_0x1b0785[_0x1b0785[_0x24ddea(0xee)]=-0x1]='UNRECOGNIZED',_0x1b0785))(I||{}),v=(_0x27064a=>(_0x27064a[_0x27064a[_0x24ddea(0xec)]=0x0]=_0x24ddea(0xec),_0x27064a[_0x27064a[_0x24ddea(0x98)]=0x1]=_0x24ddea(0x98),_0x27064a[_0x27064a['Reply']=0x2]=_0x24ddea(0xab),_0x27064a[_0x27064a[_0x24ddea(0x7c)]=0x3]='Edit',_0x27064a[_0x27064a['Delete']=0x4]=_0x24ddea(0x7a),_0x27064a[_0x27064a[_0x24ddea(0xad)]=0x5]=_0x24ddea(0xad),_0x27064a[_0x27064a[_0x24ddea(0xee)]=-0x1]=_0x24ddea(0xee),_0x27064a))(v||{});const f=_0x4e1b1f=>c[_0x24ddea(0xbb)](new Date(+_0x4e1b1f))['format'](_0x24ddea(0xc7)),R=async(_0x4c1c1c,_0x5e97ad)=>{const _0x195404=_0x24ddea,_0x2b251b=_0x4c1c1c['get'](c[_0x195404(0xb6)]),_0x2f40bc=_0x4c1c1c['get'](P[_0x195404(0x82)]);_0x5e97ad[_0x195404(0xd5)](_0x4144d1=>{const _0x2af893=_0x195404;_0x2b251b[_0x2af893(0x7b)](_0x4144d1)&&_0x5e97ad[_0x2af893(0xc9)](_0x4144d1);}),_0x5e97ad['size']&&(await _0x2f40bc['get'](_0x195404(0x90),{'params':{'userIDs':[..._0x5e97ad]}}))[_0x195404(0xe3)][_0x195404(0xac)][_0x195404(0xd5)](_0x5ea363=>{_0x5ea363&&_0x2b251b['addUser'](_0x5ea363);});};var $=Object[_0x24ddea(0x79)],E=(_0x493e15,_0x2bad7f,_0x9c5919,_0x289fba)=>{for(var _0x1a5a53=_0x289fba>0x1?void 0x0:_0x289fba?$(_0x2bad7f,_0x9c5919):_0x2bad7f,_0x5e4588=_0x493e15['length']-0x1,_0xd2b976;_0x5e4588>=0x0;_0x5e4588--)(_0xd2b976=_0x493e15[_0x5e4588])&&(_0x1a5a53=_0xd2b976(_0x1a5a53)||_0x1a5a53);return _0x1a5a53;},S=(_0x8547d3,_0x1956eb)=>(_0x509fdc,_0x2f8d6e)=>_0x1956eb(_0x509fdc,_0x2f8d6e,_0x8547d3);let p=class extends c[_0x24ddea(0xdd)]{constructor(_0x18c770,_0x25b8a0,_0x1de6cc,_0x34c784){const _0x2f3fc1=_0x24ddea;super(),this[_0x2f3fc1(0xd1)]=_0x18c770,this[_0x2f3fc1(0x88)]=_0x25b8a0,this[_0x2f3fc1(0x8c)]=_0x1de6cc,this[_0x2f3fc1(0xcf)]=_0x34c784,this[_0x2f3fc1(0xda)](),this[_0x2f3fc1(0xa9)]();}['_initUserSync'](){const _0x29a2f0=_0x24ddea;this['disposeWithMe'](this[_0x29a2f0(0x88)][_0x29a2f0(0x8f)]['pipe'](w['bufferTime'](0x10))['subscribe'](_0x59ef59=>{const _0x451e5e=_0x29a2f0,_0x2689fe=new Set();_0x59ef59['forEach'](_0x35fde3=>{const _0x55992b=_0x4779;switch(_0x35fde3[_0x55992b(0x85)]){case _0x55992b(0x7e):{const _0x1b3822=_0x35fde3[_0x55992b(0xf2)]['personId'];_0x2689fe['add'](_0x1b3822);break;}}}),R(this[_0x451e5e(0xcf)],_0x2689fe);}));}[_0x24ddea(0xda)](){const _0x3cb995=_0x24ddea;this[_0x3cb995(0xb1)](this[_0x3cb995(0xd1)][_0x3cb995(0x8f)][_0x3cb995(0xc0)](async _0x1420cc=>{const _0x5ed338=_0x3cb995;var _0x3761e0,_0x287c32,_0x57cec6,_0x208271;const _0x577e88=(_0x3761e0=this[_0x5ed338(0x88)][_0x5ed338(0x9d)](_0x1420cc[_0x5ed338(0xc1)])[_0x5ed338(0xce)](_0x15fd82=>_0x15fd82['threadId']===_0x1420cc[_0x5ed338(0xd8)]))==null?void 0x0:_0x3761e0[_0x5ed338(0xf3)];if(!_0x577e88)return;const {unitId:_0x5e8087,subUnitId:_0x476669}=_0x577e88;switch(_0x1420cc[_0x5ed338(0xcb)]&&this['_userService'][_0x5ed338(0xde)](_0x1420cc[_0x5ed338(0xcb)]),_0x1420cc[_0x5ed338(0x85)]){case v[_0x5ed338(0x98)]:break;case v[_0x5ed338(0xab)]:{this['_threadCommentModel'][_0x5ed338(0xd3)](_0x5e8087,_0x476669,{'unitId':_0x5e8087,'subUnitId':_0x476669,'ref':'','id':_0x1420cc[_0x5ed338(0xa3)],'dT':f(+_0x1420cc[_0x5ed338(0xc8)]),'threadId':_0x1420cc[_0x5ed338(0xd8)],'personId':(_0x57cec6=(_0x287c32=_0x1420cc[_0x5ed338(0xcb)])==null?void 0x0:_0x287c32[_0x5ed338(0x9b)])!=null?_0x57cec6:_0x1420cc['userId'],'text':JSON[_0x5ed338(0x81)](_0x1420cc[_0x5ed338(0x8d)]),'parentId':_0x577e88['id']});break;}case v[_0x5ed338(0x7a)]:{const _0x55854d=this[_0x5ed338(0x88)][_0x5ed338(0xc6)](_0x5e8087,_0x476669,_0x1420cc[_0x5ed338(0xa3)]);_0x55854d&&_0x55854d[_0x5ed338(0xdb)]&&this[_0x5ed338(0x88)]['deleteComment'](_0x5e8087,_0x476669,_0x1420cc['replyId']);break;}case v[_0x5ed338(0x7c)]:{this[_0x5ed338(0x88)]['updateComment'](_0x5e8087,_0x476669,{'commentId':_0x1420cc[_0x5ed338(0xa3)],'text':JSON[_0x5ed338(0x81)](_0x1420cc[_0x5ed338(0x8d)])});break;}case v[_0x5ed338(0xad)]:{const _0x56354b=(_0x208271=this[_0x5ed338(0x88)]['getUnit'](_0x1420cc[_0x5ed338(0xc1)])[_0x5ed338(0xce)](_0x12b6f8=>_0x12b6f8[_0x5ed338(0xd8)]===_0x1420cc[_0x5ed338(0xd8)]))==null?void 0x0:_0x208271[_0x5ed338(0xf3)];_0x56354b&&this['_threadCommentModel']['resolveComment'](_0x5e8087,_0x476669,_0x56354b['id'],_0x1420cc[_0x5ed338(0x74)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x24ddea(0x91)](b[_0x24ddea(0xcd)])),S(0x1,c[_0x24ddea(0x91)](M[_0x24ddea(0xb9)])),S(0x2,c[_0x24ddea(0x91)](c[_0x24ddea(0xb6)])),S(0x3,c[_0x24ddea(0x91)](c[_0x24ddea(0xa0)]))],p);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x3ea938,_0x4217d6,_0x30fcb5,_0x10eab3)=>{for(var _0x989668=_0x10eab3>0x1?void 0x0:_0x10eab3?A(_0x4217d6,_0x30fcb5):_0x4217d6,_0x4a3eaa=_0x3ea938['length']-0x1,_0x1cf881;_0x4a3eaa>=0x0;_0x4a3eaa--)(_0x1cf881=_0x3ea938[_0x4a3eaa])&&(_0x989668=_0x1cf881(_0x989668)||_0x989668);return _0x989668;},_=(_0x5ad083,_0x225241)=>(_0x4f977c,_0x1a67e9)=>_0x225241(_0x4f977c,_0x1a67e9,_0x5ad083);function Y(_0x98ef9f,_0x303756){const _0x25847d=_0x24ddea,_0x34ae3e=_0x98ef9f['replies'][0x0];return{..._0x303756,'id':_0x34ae3e['replyId'],'resolved':_0x98ef9f[_0x25847d(0x74)]===0x1,'dT':f(_0x34ae3e[_0x25847d(0xc8)]),'personId':_0x34ae3e['userId'],'threadId':_0x34ae3e[_0x25847d(0xd8)]};}function G(_0x1b4057,_0x579bfa,_0x2f1151){const _0x1e93e6=_0x24ddea;var _0x56aa91,_0x28a954;if(((_0x28a954=(_0x56aa91=_0x1b4057==null?void 0x0:_0x1b4057[_0x1e93e6(0xb8)])==null?void 0x0:_0x56aa91[_0x1e93e6(0xdf)])!=null?_0x28a954:0x0)>0x0){const _0x488f52=(_0x26524c,_0x44ee8f)=>({'id':_0x26524c['replyId'],'threadId':_0x26524c[_0x1e93e6(0xd8)],'dT':f(_0x26524c['createTimestamp']),'personId':_0x26524c[_0x1e93e6(0xbe)],'resolved':_0x1b4057[_0x1e93e6(0x74)]===I[_0x1e93e6(0x89)],'unitId':_0x579bfa,'subUnitId':_0x2f1151,'text':JSON[_0x1e93e6(0x81)](_0x26524c[_0x1e93e6(0x8d)]),'parentId':_0x44ee8f}),_0x1d5229=_0x488f52(_0x1b4057[_0x1e93e6(0xb8)][0x0]);return{..._0x1d5229,'children':_0x1b4057['replies'][_0x1e93e6(0xc3)](0x1)['map'](_0x4e1a0a=>_0x488f52(_0x4e1a0a,_0x1d5229['id']))};}return null;}function _0x4779(_0x4639dc,_0x2298f9){const _0x225e6f=_0x225e();return _0x4779=function(_0x477965,_0x116306){_0x477965=_0x477965-0x74;let _0x131c3f=_0x225e6f[_0x477965];return _0x131c3f;},_0x4779(_0x4639dc,_0x2298f9);}let g=class{constructor(_0x4d8e5c,_0x27bd20,_0x4ba226,_0xa2fe8f){const _0x2bb43f=_0x24ddea;this['_httpService']=_0x4d8e5c,this[_0x2bb43f(0x8c)]=_0x27bd20,this[_0x2bb43f(0xdc)]=_0x4ba226,this[_0x2bb43f(0xcf)]=_0xa2fe8f;}async[_0x24ddea(0xd3)](_0x48730c){const _0x3fff31=_0x24ddea;var _0x13c916,_0x175e5f;const {parentId:_0x5208fc,unitId:_0x1ee425,text:_0x47fd3a,threadId:_0x31080f}=_0x48730c,_0x15f24a=(_0x175e5f=(_0x13c916=_0x47fd3a[_0x3fff31(0xae)])==null?void 0x0:_0x13c916[_0x3fff31(0x95)](_0x4a983d=>_0x4a983d[_0x3fff31(0xe8)]===c['CustomRangeType'][_0x3fff31(0x7f)])[_0x3fff31(0xd7)](_0x3f1a02=>_0x3f1a02[_0x3fff31(0x78)]))!=null?_0x175e5f:[],_0x10c53c=JSON[_0x3fff31(0xe1)](_0x47fd3a),_0x596620=(await this[_0x3fff31(0xdc)][_0x3fff31(0x75)](_0x1ee425))['getMemberID']();if(_0x5208fc){const _0x29c89f={'memberId':_0x596620,'unitId':_0x1ee425,'content':_0x10c53c,'mention':_0x15f24a,'threadId':_0x31080f},_0x35eddb=(await this[_0x3fff31(0xb4)][_0x3fff31(0xbc)](_0x3fff31(0xd2)+_0x1ee425+'/reply',{'body':_0x29c89f}))['body'][_0x3fff31(0xa6)];return{..._0x48730c,'id':_0x35eddb[_0x3fff31(0xa3)],'dT':c[_0x3fff31(0xbb)](+_0x35eddb['createTimestamp'])[_0x3fff31(0xe5)](_0x3fff31(0xc7)),'personId':_0x35eddb[_0x3fff31(0xbe)]};}else{const _0x2101c2={'memberId':_0x596620,'unitId':_0x1ee425,'content':_0x10c53c,'mention':_0x15f24a},_0x2d0744=await this['_httpService'][_0x3fff31(0xbc)](_0x3fff31(0xd2)+_0x1ee425+_0x3fff31(0xc5),{'body':_0x2101c2});return Y(_0x2d0744[_0x3fff31(0xe3)][_0x3fff31(0x86)],_0x48730c);}}async[_0x24ddea(0xe9)](_0x4bbcef){const _0xf15da9=_0x24ddea;var _0x18ac65,_0x12189b;const {text:_0x17aad2,unitId:_0x2712fc}=_0x4bbcef,_0x5ec04b=(_0x12189b=(_0x18ac65=_0x17aad2[_0xf15da9(0xae)])==null?void 0x0:_0x18ac65[_0xf15da9(0x95)](_0x3d0345=>_0x3d0345[_0xf15da9(0xe8)]===c['CustomRangeType'][_0xf15da9(0x7f)])[_0xf15da9(0xd7)](_0x2d9847=>_0x2d9847[_0xf15da9(0x78)]))!=null?_0x12189b:[],_0x181fc8=JSON['stringify'](_0x17aad2),_0x424324=_0x4bbcef[_0xf15da9(0xd8)],_0x1282ed=_0x4bbcef['id'],_0x1946e3={'memberId':(await this['_sessionService']['requireSession'](_0x2712fc))['getMemberID'](),'unitId':_0x2712fc,'threadId':_0x424324,'mention':_0x5ec04b,'content':_0x181fc8,'replyId':_0x1282ed},_0x113652=await this['_httpService'][_0xf15da9(0xbc)](_0xf15da9(0xd2)+_0x2712fc+_0xf15da9(0xd4),{'body':_0x1946e3});return!_0x113652['body'][_0xf15da9(0xe0)]||_0x113652[_0xf15da9(0xe3)]['error'][_0xf15da9(0xc2)]===0x1;}async[_0x24ddea(0x99)](_0x51b357){const _0x1ed4a2=_0x24ddea,{unitId:_0x3c2878}=_0x51b357,_0xf90e35=_0x51b357['threadId'],_0x4e906f={'memberId':this[_0x1ed4a2(0x8c)]['getCurrentUser']()[_0x1ed4a2(0x9b)],'unitId':_0x3c2878,'threadId':_0xf90e35,'solved':_0x51b357[_0x1ed4a2(0xed)]?I[_0x1ed4a2(0x89)]:I[_0x1ed4a2(0x93)]},_0x3e4bb0=await this[_0x1ed4a2(0xb4)]['post'](_0x1ed4a2(0xd2)+_0x3c2878+'/solved',{'body':_0x4e906f});return!_0x3e4bb0[_0x1ed4a2(0xe3)][_0x1ed4a2(0xe0)]||_0x3e4bb0[_0x1ed4a2(0xe3)]['error'][_0x1ed4a2(0xc2)]===0x1;}async[_0x24ddea(0x9e)](_0x2220fe,_0x23b3fb,_0x3a9319,_0x58ac35){const _0x5a1418=_0x24ddea,_0x1447fd={'memberId':(await this['_sessionService'][_0x5a1418(0x75)](_0x2220fe))[_0x5a1418(0xd6)](),'threadId':_0x3a9319,'replyId':_0x58ac35,'unitId':_0x2220fe},_0x2d0b33=await this[_0x5a1418(0xb4)][_0x5a1418(0xbc)](_0x5a1418(0xd2)+_0x2220fe+_0x5a1418(0xe6),{'body':_0x1447fd});return!_0x2d0b33[_0x5a1418(0xe3)]['error']||_0x2d0b33['body'][_0x5a1418(0xe0)]['code']===0x1;}async[_0x24ddea(0x9a)](_0x280c3b,_0x47136e,_0x5516bd){const _0x598aeb=_0x24ddea,_0x2aae12={'unitId':_0x280c3b,'threadId':_0x5516bd},_0xf3ccb9=await this[_0x598aeb(0xb4)]['post'](_0x598aeb(0xd2)+_0x280c3b+_0x598aeb(0x76),{'body':_0x2aae12}),_0x1f8727=_0x5516bd[_0x598aeb(0xd7)](_0x432cc1=>G(_0xf3ccb9[_0x598aeb(0xe3)][_0x598aeb(0xe7)][_0x432cc1],_0x280c3b,_0x47136e))['filter'](Boolean);return Object[_0x598aeb(0xbf)](_0xf3ccb9[_0x598aeb(0xe3)][_0x598aeb(0xac)])[_0x598aeb(0xd5)](_0xd45459=>{this['_userService']['addUser'](_0xd45459);}),_0x1f8727;}['saveCommentToSnapshot'](_0x20bf5c){const _0x580168=_0x24ddea;return{'id':_0x20bf5c['id'],'threadId':_0x20bf5c[_0x580168(0xd8)],'ref':_0x20bf5c[_0x580168(0xbd)]};}};function _0x225e(){const _0x5d3d15=['add','COMMENT','12xGysNv','parse','HTTPService','CollaborationSessionService','Module','type','comment','UniverThreadCommentDataSourcePlugin','_threadCommentModel','Solved','11uzsjuu','@univerjs/core','_userService','content','9LvdUIk','commentUpdate$','/universer-api/user/list','Inject','UniverInstanceType','OpenOrReOpen','_initDataSource','filter','dataSource','30pWYNGC','Add','resolveComment','listComments','userID','merge','getUnit','deleteComment','UNIVER_UNKNOWN','Injector','@univerjs-pro/collaboration-client','DependentOn','replyId','_configService','UniverLicensePlugin','reply','405629ARPBlJ','_threadCommentDataSourceService','_initUserSync','get','Reply','users','Solve','customRanges','syncUpdateMutationToColla','4926488AKDVqh','disposeWithMe','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_httpService','IThreadCommentDataSourceService','UserManagerService','Plugin','replies','ThreadCommentModel','356ggtenQ','dayjs','post','ref','userId','values','subscribe','unitId','code','slice','_threadCommentDataSource','/add','getComment','YYYY/MM/DD\x20HH:mm','createTimestamp','delete','240766ywHTBY','user','_config','CommentService','find','_injector','1570768VPxMtb','_commentService','/universer-api/comment/unit/','addComment','/edit','forEach','getMemberID','map','threadId','@univerjs-pro/license','_init','parentId','_sessionService','Disposable','addUser','length','error','stringify','11542460yVyzcP','body','IConfigService','format','/delete','comments','rangeType','updateComment','onStarting','UniverThreadCommentUIPlugin','Unknown','resolved','UNRECOGNIZED','87309444lJVbnM','onReady','94660MulhwM','payload','root','solved','requireSession','/list','rxjs','rangeId','getOwnPropertyDescriptor','Delete','getUser','Edit','setConfig'];_0x225e=function(){return _0x5d3d15;};return _0x225e();}g=x([_(0x0,c[_0x24ddea(0x91)](P['HTTPService'])),_(0x1,c[_0x24ddea(0x91)](c[_0x24ddea(0xb6)])),_(0x2,c[_0x24ddea(0x91)](b[_0x24ddea(0x83)])),_(0x3,c[_0x24ddea(0x91)](c[_0x24ddea(0xa0)]))],g);var H=Object[_0x24ddea(0x79)],J=(_0x1ac2e1,_0x238708,_0x40a37b,_0x18bf20)=>{for(var _0x17f0f1=_0x18bf20>0x1?void 0x0:_0x18bf20?H(_0x238708,_0x40a37b):_0x238708,_0x13185a=_0x1ac2e1['length']-0x1,_0x5a00d5;_0x13185a>=0x0;_0x13185a--)(_0x5a00d5=_0x1ac2e1[_0x13185a])&&(_0x17f0f1=_0x5a00d5(_0x17f0f1)||_0x17f0f1);return _0x17f0f1;},y=(_0x10037a,_0xa89fa)=>(_0x347da0,_0x5560a5)=>_0xa89fa(_0x347da0,_0x5560a5,_0x10037a);let C=class extends c[_0x24ddea(0xdd)]{constructor(_0x5084ee,_0x3e4c74){const _0xf31e9e=_0x24ddea;super(),this[_0xf31e9e(0xa8)]=_0x5084ee,this[_0xf31e9e(0xc4)]=_0x3e4c74,this[_0xf31e9e(0x94)]();}[_0x24ddea(0x94)](){const _0x5b6c04=_0x24ddea;this['_threadCommentDataSourceService'][_0x5b6c04(0x96)]=this[_0x5b6c04(0xc4)],this['_threadCommentDataSourceService'][_0x5b6c04(0xaf)]=!0x1;}};C=J([y(0x0,M[_0x24ddea(0xb5)]),y(0x1,c[_0x24ddea(0x91)](g))],C);var F=Object[_0x24ddea(0xb2)],L=Object[_0x24ddea(0x79)],Z=(_0x5d285d,_0x277e88,_0x53c705)=>_0x277e88 in _0x5d285d?F(_0x5d285d,_0x277e88,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x53c705}):_0x5d285d[_0x277e88]=_0x53c705,W=(_0x290b4c,_0x18cc11,_0x229627,_0x78b9bc)=>{const _0x3bf288=_0x24ddea;for(var _0x361519=_0x78b9bc>0x1?void 0x0:_0x78b9bc?L(_0x18cc11,_0x229627):_0x18cc11,_0xa42ca1=_0x290b4c[_0x3bf288(0xdf)]-0x1,_0x4ae1ef;_0xa42ca1>=0x0;_0xa42ca1--)(_0x4ae1ef=_0x290b4c[_0xa42ca1])&&(_0x361519=_0x4ae1ef(_0x361519)||_0x361519);return _0x361519;},O=(_0x5dc3fe,_0x1cdbe8)=>(_0x2f76a7,_0x9477e3)=>_0x1cdbe8(_0x2f76a7,_0x9477e3,_0x5dc3fe),N=(_0x1dd854,_0x416377,_0x32ca8f)=>Z(_0x1dd854,typeof _0x416377!='symbol'?_0x416377+'':_0x416377,_0x32ca8f);exports[_0x24ddea(0x87)]=class extends c[_0x24ddea(0xb7)]{constructor(_0x40667c=D,_0x5d9eae,_0x145f14){const _0x1a42f8=_0x24ddea;super(),this[_0x1a42f8(0xcc)]=_0x40667c,this[_0x1a42f8(0xcf)]=_0x5d9eae,this[_0x1a42f8(0xa4)]=_0x145f14;const {..._0x4da845}=c[_0x1a42f8(0x9c)]({},D,this['_config']);this[_0x1a42f8(0xa4)][_0x1a42f8(0x7d)](q,_0x4da845);}[_0x24ddea(0xea)](){const _0xa67942=_0x24ddea;[[g],[C],[p]][_0xa67942(0xd5)](_0x1fdf7e=>{const _0x32be77=_0xa67942;this['_injector'][_0x32be77(0x7e)](_0x1fdf7e);});}[_0x24ddea(0xf0)](){const _0x21743a=_0x24ddea;this[_0x21743a(0xcf)][_0x21743a(0xaa)](C),this['_injector'][_0x21743a(0xaa)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x24ddea(0x85),c[_0x24ddea(0x92)][_0x24ddea(0x9f)]),exports[_0x24ddea(0x87)]=W([c[_0x24ddea(0xa2)](j[_0x24ddea(0xeb)],b['UniverCollaborationClientPlugin'],T[_0x24ddea(0xa5)]),O(0x1,c[_0x24ddea(0x91)](c[_0x24ddea(0xa0)])),O(0x2,c[_0x24ddea(0xe4)])],exports[_0x24ddea(0x87)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x211bde=_0x388b;(function(_0x2b393c,_0x589954){const _0x153e1a=_0x388b,_0x50d92c=_0x2b393c();while(!![]){try{const _0x327d19=parseInt(_0x153e1a(0x114))/0x1+parseInt(_0x153e1a(0xcb))/0x2*(parseInt(_0x153e1a(0xce))/0x3)+parseInt(_0x153e1a(0xcc))/0x4+parseInt(_0x153e1a(0x10a))/0x5*(parseInt(_0x153e1a(0xd0))/0x6)+parseInt(_0x153e1a(0x127))/0x7*(-parseInt(_0x153e1a(0xf5))/0x8)+parseInt(_0x153e1a(0x125))/0x9+-parseInt(_0x153e1a(0xf0))/0xa;if(_0x327d19===_0x589954)break;else _0x50d92c['push'](_0x50d92c['shift']());}catch(_0x5ab1a8){_0x50d92c['push'](_0x50d92c['shift']());}}}(_0x3c62,0xba9e1));import{CommentService as _0x6f41dc,CollaborationSessionService as _0x1fd352,UniverCollaborationClientPlugin as _0x5b3884}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5c33e6}from'@univerjs-pro/license';import{dayjs as _0x564eec,UserManagerService as _0x5e058e,Inject as _0x114847,Injector as _0x56bcbf,Disposable as _0x338462,CustomRangeType as _0x33585b,UniverInstanceType as _0x3efd1b,DependentOn as _0x56b92e,IConfigService as _0x2fe5b9,Plugin as _0x2e1d79,merge as _0x4c8ee9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3ab2fe}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xc915,IThreadCommentDataSourceService as _0x15b35b}from'@univerjs/thread-comment';function _0x388b(_0x577d2c,_0x5f4520){const _0x3c62d4=_0x3c62();return _0x388b=function(_0x388beb,_0x14495c){_0x388beb=_0x388beb-0xca;let _0x2790fa=_0x3c62d4[_0x388beb];return _0x2790fa;},_0x388b(_0x577d2c,_0x5f4520);}import{bufferTime as _0xb35024}from'rxjs';import{HTTPService as _0x4160d8}from'@univerjs/network';const W=_0x211bde(0xf6);var I=(_0x15c1d8=>(_0x15c1d8[_0x15c1d8['OpenOrReOpen']=0x0]=_0x211bde(0xf9),_0x15c1d8[_0x15c1d8[_0x211bde(0xd7)]=0x1]=_0x211bde(0xd7),_0x15c1d8[_0x15c1d8[_0x211bde(0x12c)]=-0x1]=_0x211bde(0x12c),_0x15c1d8))(I||{}),v=(_0x591c45=>(_0x591c45[_0x591c45[_0x211bde(0x118)]=0x0]=_0x211bde(0x118),_0x591c45[_0x591c45[_0x211bde(0x12d)]=0x1]=_0x211bde(0x12d),_0x591c45[_0x591c45[_0x211bde(0xed)]=0x2]='Reply',_0x591c45[_0x591c45[_0x211bde(0xdb)]=0x3]=_0x211bde(0xdb),_0x591c45[_0x591c45['Delete']=0x4]='Delete',_0x591c45[_0x591c45[_0x211bde(0xe5)]=0x5]=_0x211bde(0xe5),_0x591c45[_0x591c45['UNRECOGNIZED']=-0x1]=_0x211bde(0x12c),_0x591c45))(v||{});const D=_0x314dc5=>_0x564eec(new Date(+_0x314dc5))[_0x211bde(0x128)](_0x211bde(0x123)),B=async(_0x34d9aa,_0x191063)=>{const _0x124b03=_0x211bde,_0x1a8494=_0x34d9aa['get'](_0x5e058e),_0x424991=_0x34d9aa[_0x124b03(0x130)](_0x4160d8);_0x191063['forEach'](_0x156f30=>{const _0x481523=_0x124b03;_0x1a8494[_0x481523(0xde)](_0x156f30)&&_0x191063[_0x481523(0x116)](_0x156f30);}),_0x191063['size']&&(await _0x424991['get'](_0x124b03(0x11d),{'params':{'userIDs':[..._0x191063]}}))['body'][_0x124b03(0xca)][_0x124b03(0xec)](_0x61772c=>{const _0x2e767c=_0x124b03;_0x61772c&&_0x1a8494[_0x2e767c(0xcf)](_0x61772c);});};var K=Object[_0x211bde(0xd3)],V=(_0x494490,_0x5b24da,_0x401cb6,_0x193ad6)=>{const _0x491dba=_0x211bde;for(var _0x4db771=_0x193ad6>0x1?void 0x0:_0x193ad6?K(_0x5b24da,_0x401cb6):_0x5b24da,_0x260980=_0x494490[_0x491dba(0x122)]-0x1,_0x5f48b9;_0x260980>=0x0;_0x260980--)(_0x5f48b9=_0x494490[_0x260980])&&(_0x4db771=_0x5f48b9(_0x4db771)||_0x4db771);return _0x4db771;},p=(_0x4eb53c,_0x12f725)=>(_0x21524a,_0x233c86)=>_0x12f725(_0x21524a,_0x233c86,_0x4eb53c);let S=class extends _0x338462{constructor(_0x16ef9a,_0x47b473,_0x416350,_0x4f3b79){const _0x416c29=_0x211bde;super(),this[_0x416c29(0x102)]=_0x16ef9a,this[_0x416c29(0xe6)]=_0x47b473,this[_0x416c29(0xeb)]=_0x416350,this[_0x416c29(0x101)]=_0x4f3b79,this[_0x416c29(0xef)](),this[_0x416c29(0x110)]();}[_0x211bde(0x110)](){const _0x145363=_0x211bde;this[_0x145363(0xdc)](this['_threadCommentModel'][_0x145363(0x119)][_0x145363(0xe1)](_0xb35024(0x10))[_0x145363(0xd9)](_0x181b07=>{const _0x296062=_0x145363,_0x304e3b=new Set();_0x181b07[_0x296062(0xec)](_0x4b0fc6=>{const _0x4046e8=_0x296062;switch(_0x4b0fc6[_0x4046e8(0xd2)]){case _0x4046e8(0x112):{const _0x3e2f02=_0x4b0fc6['payload'][_0x4046e8(0xff)];_0x304e3b[_0x4046e8(0x112)](_0x3e2f02);break;}}}),B(this[_0x296062(0x101)],_0x304e3b);}));}[_0x211bde(0xef)](){const _0x464589=_0x211bde;this[_0x464589(0xdc)](this[_0x464589(0x102)][_0x464589(0x119)][_0x464589(0xd9)](async _0x3c9b56=>{const _0x5d941b=_0x464589;var _0x463341,_0x2df6f4,_0x1e0334,_0x2fa2f6;const _0x5124ca=(_0x463341=this[_0x5d941b(0xe6)]['getUnit'](_0x3c9b56['unitId'])[_0x5d941b(0x12b)](_0x12ad02=>_0x12ad02['threadId']===_0x3c9b56['threadId']))==null?void 0x0:_0x463341['root'];if(!_0x5124ca)return;const {unitId:_0x1106db,subUnitId:_0x5c08e2}=_0x5124ca;switch(_0x3c9b56[_0x5d941b(0xd1)]&&this[_0x5d941b(0xeb)]['addUser'](_0x3c9b56[_0x5d941b(0xd1)]),_0x3c9b56[_0x5d941b(0xd2)]){case v[_0x5d941b(0x12d)]:break;case v[_0x5d941b(0xed)]:{this[_0x5d941b(0xe6)][_0x5d941b(0x12a)](_0x1106db,_0x5c08e2,{'unitId':_0x1106db,'subUnitId':_0x5c08e2,'ref':'','id':_0x3c9b56[_0x5d941b(0x108)],'dT':D(+_0x3c9b56[_0x5d941b(0xfa)]),'threadId':_0x3c9b56['threadId'],'personId':(_0x1e0334=(_0x2df6f4=_0x3c9b56[_0x5d941b(0xd1)])==null?void 0x0:_0x2df6f4[_0x5d941b(0x10b)])!=null?_0x1e0334:_0x3c9b56['userId'],'text':JSON['parse'](_0x3c9b56['content']),'parentId':_0x5124ca['id']});break;}case v['Delete']:{const _0x2404ac=this['_threadCommentModel'][_0x5d941b(0x111)](_0x1106db,_0x5c08e2,_0x3c9b56[_0x5d941b(0x108)]);_0x2404ac&&_0x2404ac[_0x5d941b(0x100)]&&this[_0x5d941b(0xe6)]['deleteComment'](_0x1106db,_0x5c08e2,_0x3c9b56[_0x5d941b(0x108)]);break;}case v[_0x5d941b(0xdb)]:{this[_0x5d941b(0xe6)][_0x5d941b(0xe2)](_0x1106db,_0x5c08e2,{'commentId':_0x3c9b56[_0x5d941b(0x108)],'text':JSON[_0x5d941b(0xe9)](_0x3c9b56['content'])});break;}case v[_0x5d941b(0xe5)]:{const _0x4e5a7d=(_0x2fa2f6=this[_0x5d941b(0xe6)][_0x5d941b(0xf4)](_0x3c9b56[_0x5d941b(0xd6)])[_0x5d941b(0x12b)](_0x1bbf0e=>_0x1bbf0e[_0x5d941b(0xdf)]===_0x3c9b56[_0x5d941b(0xdf)]))==null?void 0x0:_0x2fa2f6[_0x5d941b(0x11f)];_0x4e5a7d&&this[_0x5d941b(0xe6)][_0x5d941b(0x10d)](_0x1106db,_0x5c08e2,_0x4e5a7d['id'],_0x3c9b56[_0x5d941b(0x11a)]===I[_0x5d941b(0xd7)]);break;}}}));}};function _0x3c62(){const _0x45c3c7=['_httpService','_sessionService','defineProperty','getUnit','376uYILWS','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','symbol','rangeId','OpenOrReOpen','createTimestamp','map','rangeType','setConfig','/reply','personId','parentId','_injector','_commentService','comments','onStarting','requireSession','slice','replies','replyId','userId','1864540KVdIWY','userID','comment','resolveComment','_config','values','_initUserSync','getComment','add','getCurrentUser','742080ejLSXY','COMMENT','delete','resolved','Unknown','commentUpdate$','solved','/list','stringify','/universer-api/user/list','error','root','/solved','_threadCommentDataSource','length','YYYY/MM/DD\x20HH:mm','post','5348610RmyZnw','filter','163205dMQJTR','format','body','addComment','find','UNRECOGNIZED','Add','reply','/universer-api/comment/unit/','get','code','users','4YQbhla','397764qENvQL','listComments','2036427zRWLPK','addUser','6lcGhGM','user','type','getOwnPropertyDescriptor','ref','dataSource','unitId','Solved','onReady','subscribe','/add','Edit','disposeWithMe','/delete','getUser','threadId','pluginName','pipe','updateComment','/edit','content','Solve','_threadCommentModel','_configService','_threadCommentDataSourceService','parse','_initDataSource','_userService','forEach','Reply','customRanges','_init','13061470KooLPG'];_0x3c62=function(){return _0x45c3c7;};return _0x3c62();}S=V([p(0x0,_0x114847(_0x6f41dc)),p(0x1,_0x114847(_0xc915)),p(0x2,_0x114847(_0x5e058e)),p(0x3,_0x114847(_0x56bcbf))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x211bde(0xd3)],Q=(_0x4db1f3,_0x88896d,_0x734a55,_0x3e676b)=>{const _0x38d2fa=_0x211bde;for(var _0x328177=_0x3e676b>0x1?void 0x0:_0x3e676b?k(_0x88896d,_0x734a55):_0x88896d,_0x3f91e1=_0x4db1f3[_0x38d2fa(0x122)]-0x1,_0x29577d;_0x3f91e1>=0x0;_0x3f91e1--)(_0x29577d=_0x4db1f3[_0x3f91e1])&&(_0x328177=_0x29577d(_0x328177)||_0x328177);return _0x328177;},_=(_0x2e60d1,_0x551779)=>(_0x41bd81,_0x4a4d66)=>_0x551779(_0x41bd81,_0x4a4d66,_0x2e60d1);function X(_0x40f902,_0x4fde23){const _0x118391=_0x211bde,_0x369fa8=_0x40f902[_0x118391(0x107)][0x0];return{..._0x4fde23,'id':_0x369fa8['replyId'],'resolved':_0x40f902[_0x118391(0x11a)]===0x1,'dT':D(_0x369fa8[_0x118391(0xfa)]),'personId':_0x369fa8['userId'],'threadId':_0x369fa8[_0x118391(0xdf)]};}function ee(_0x6ff4e6,_0x37a564,_0x16e05b){const _0xe759ee=_0x211bde;var _0x3365ef,_0x538e9e;if(((_0x538e9e=(_0x3365ef=_0x6ff4e6==null?void 0x0:_0x6ff4e6[_0xe759ee(0x107)])==null?void 0x0:_0x3365ef[_0xe759ee(0x122)])!=null?_0x538e9e:0x0)>0x0){const _0xa35d2b=(_0x31bd3a,_0x279af3)=>({'id':_0x31bd3a['replyId'],'threadId':_0x31bd3a[_0xe759ee(0xdf)],'dT':D(_0x31bd3a[_0xe759ee(0xfa)]),'personId':_0x31bd3a[_0xe759ee(0x109)],'resolved':_0x6ff4e6['solved']===I[_0xe759ee(0xd7)],'unitId':_0x37a564,'subUnitId':_0x16e05b,'text':JSON[_0xe759ee(0xe9)](_0x31bd3a[_0xe759ee(0xe4)]),'parentId':_0x279af3}),_0x20c331=_0xa35d2b(_0x6ff4e6[_0xe759ee(0x107)][0x0]);return{..._0x20c331,'children':_0x6ff4e6[_0xe759ee(0x107)][_0xe759ee(0x106)](0x1)['map'](_0xf8cb13=>_0xa35d2b(_0xf8cb13,_0x20c331['id']))};}return null;}let f=class{constructor(_0x3c5db8,_0x47f759,_0x428644,_0x16e674){const _0x52d9f8=_0x211bde;this[_0x52d9f8(0xf1)]=_0x3c5db8,this['_userService']=_0x47f759,this[_0x52d9f8(0xf2)]=_0x428644,this['_injector']=_0x16e674;}async[_0x211bde(0x12a)](_0x5703bb){const _0x3f9817=_0x211bde;var _0x56aebe,_0x19703e;const {parentId:_0x1e1c9c,unitId:_0x4a6a6a,text:_0x16f956,threadId:_0x477702}=_0x5703bb,_0x2cb715=(_0x19703e=(_0x56aebe=_0x16f956[_0x3f9817(0xee)])==null?void 0x0:_0x56aebe[_0x3f9817(0x126)](_0x389be7=>_0x389be7[_0x3f9817(0xfc)]===_0x33585b[_0x3f9817(0x115)])[_0x3f9817(0xfb)](_0x284652=>_0x284652[_0x3f9817(0xf8)]))!=null?_0x19703e:[],_0x3be92e=JSON[_0x3f9817(0x11c)](_0x16f956),_0xbfc260=(await this[_0x3f9817(0xf2)][_0x3f9817(0x105)](_0x4a6a6a))['getMemberID']();if(_0x1e1c9c){const _0x3d3784={'memberId':_0xbfc260,'unitId':_0x4a6a6a,'content':_0x3be92e,'mention':_0x2cb715,'threadId':_0x477702},_0x477775=(await this[_0x3f9817(0xf1)]['post'](_0x3f9817(0x12f)+_0x4a6a6a+_0x3f9817(0xfe),{'body':_0x3d3784}))['body'][_0x3f9817(0x12e)];return{..._0x5703bb,'id':_0x477775[_0x3f9817(0x108)],'dT':_0x564eec(+_0x477775[_0x3f9817(0xfa)])[_0x3f9817(0x128)](_0x3f9817(0x123)),'personId':_0x477775[_0x3f9817(0x109)]};}else{const _0x7344ba={'memberId':_0xbfc260,'unitId':_0x4a6a6a,'content':_0x3be92e,'mention':_0x2cb715},_0x206632=await this[_0x3f9817(0xf1)][_0x3f9817(0x124)]('/universer-api/comment/unit/'+_0x4a6a6a+_0x3f9817(0xda),{'body':_0x7344ba});return X(_0x206632[_0x3f9817(0x129)][_0x3f9817(0x10c)],_0x5703bb);}}async[_0x211bde(0xe2)](_0x4d0118){const _0x365944=_0x211bde;var _0x48bf19,_0x38254e;const {text:_0x153a71,unitId:_0x3f6f85}=_0x4d0118,_0x305c4c=(_0x38254e=(_0x48bf19=_0x153a71[_0x365944(0xee)])==null?void 0x0:_0x48bf19[_0x365944(0x126)](_0x37cd88=>_0x37cd88[_0x365944(0xfc)]===_0x33585b[_0x365944(0x115)])[_0x365944(0xfb)](_0xd41d27=>_0xd41d27[_0x365944(0xf8)]))!=null?_0x38254e:[],_0x108942=JSON[_0x365944(0x11c)](_0x153a71),_0x33a675=_0x4d0118[_0x365944(0xdf)],_0x32149f=_0x4d0118['id'],_0x2d38d4={'memberId':(await this[_0x365944(0xf2)][_0x365944(0x105)](_0x3f6f85))['getMemberID'](),'unitId':_0x3f6f85,'threadId':_0x33a675,'mention':_0x305c4c,'content':_0x108942,'replyId':_0x32149f},_0x1dce60=await this['_httpService'][_0x365944(0x124)]('/universer-api/comment/unit/'+_0x3f6f85+_0x365944(0xe3),{'body':_0x2d38d4});return!_0x1dce60[_0x365944(0x129)][_0x365944(0x11e)]||_0x1dce60[_0x365944(0x129)][_0x365944(0x11e)]['code']===0x1;}async[_0x211bde(0x10d)](_0x2b8264){const _0x4ddc80=_0x211bde,{unitId:_0x2d09c3}=_0x2b8264,_0x587b76=_0x2b8264[_0x4ddc80(0xdf)],_0x3c22bb={'memberId':this[_0x4ddc80(0xeb)][_0x4ddc80(0x113)]()[_0x4ddc80(0x10b)],'unitId':_0x2d09c3,'threadId':_0x587b76,'solved':_0x2b8264[_0x4ddc80(0x117)]?I[_0x4ddc80(0xd7)]:I[_0x4ddc80(0xf9)]},_0x18c0f1=await this[_0x4ddc80(0xf1)]['post']('/universer-api/comment/unit/'+_0x2d09c3+_0x4ddc80(0x120),{'body':_0x3c22bb});return!_0x18c0f1['body']['error']||_0x18c0f1[_0x4ddc80(0x129)][_0x4ddc80(0x11e)][_0x4ddc80(0x131)]===0x1;}async['deleteComment'](_0x3a26b8,_0x3c3bec,_0x174fcb,_0x523475){const _0x14c49c=_0x211bde,_0x288bf1={'memberId':(await this[_0x14c49c(0xf2)][_0x14c49c(0x105)](_0x3a26b8))['getMemberID'](),'threadId':_0x174fcb,'replyId':_0x523475,'unitId':_0x3a26b8},_0x1855da=await this[_0x14c49c(0xf1)][_0x14c49c(0x124)]('/universer-api/comment/unit/'+_0x3a26b8+_0x14c49c(0xdd),{'body':_0x288bf1});return!_0x1855da[_0x14c49c(0x129)][_0x14c49c(0x11e)]||_0x1855da[_0x14c49c(0x129)]['error']['code']===0x1;}async[_0x211bde(0xcd)](_0x2ccd0f,_0x55fb2b,_0x5b1703){const _0x1f41b4=_0x211bde,_0x4d989c={'unitId':_0x2ccd0f,'threadId':_0x5b1703},_0x303cad=await this['_httpService'][_0x1f41b4(0x124)]('/universer-api/comment/unit/'+_0x2ccd0f+_0x1f41b4(0x11b),{'body':_0x4d989c}),_0xb5eb34=_0x5b1703[_0x1f41b4(0xfb)](_0x292104=>ee(_0x303cad[_0x1f41b4(0x129)][_0x1f41b4(0x103)][_0x292104],_0x2ccd0f,_0x55fb2b))['filter'](Boolean);return Object[_0x1f41b4(0x10f)](_0x303cad['body'][_0x1f41b4(0xca)])[_0x1f41b4(0xec)](_0xe1d6be=>{this['_userService']['addUser'](_0xe1d6be);}),_0xb5eb34;}['saveCommentToSnapshot'](_0x135988){const _0x4a2779=_0x211bde;return{'id':_0x135988['id'],'threadId':_0x135988[_0x4a2779(0xdf)],'ref':_0x135988[_0x4a2779(0xd4)]};}};f=Q([_(0x0,_0x114847(_0x4160d8)),_(0x1,_0x114847(_0x5e058e)),_(0x2,_0x114847(_0x1fd352)),_(0x3,_0x114847(_0x56bcbf))],f);var re=Object[_0x211bde(0xd3)],te=(_0x1a6be6,_0xecdfb7,_0x12cee2,_0x421ac3)=>{const _0x8d02c6=_0x211bde;for(var _0x5056e1=_0x421ac3>0x1?void 0x0:_0x421ac3?re(_0xecdfb7,_0x12cee2):_0xecdfb7,_0x49582c=_0x1a6be6[_0x8d02c6(0x122)]-0x1,_0x250407;_0x49582c>=0x0;_0x49582c--)(_0x250407=_0x1a6be6[_0x49582c])&&(_0x5056e1=_0x250407(_0x5056e1)||_0x5056e1);return _0x5056e1;},N=(_0x78cabc,_0x4479af)=>(_0x19d27e,_0x101c6f)=>_0x4479af(_0x19d27e,_0x101c6f,_0x78cabc);let g=class extends _0x338462{constructor(_0x41eace,_0x3ec01a){const _0x1b3730=_0x211bde;super(),this[_0x1b3730(0xe8)]=_0x41eace,this[_0x1b3730(0x121)]=_0x3ec01a,this[_0x1b3730(0xea)]();}[_0x211bde(0xea)](){const _0xfc1cd0=_0x211bde;this[_0xfc1cd0(0xe8)][_0xfc1cd0(0xd5)]=this['_threadCommentDataSource'],this[_0xfc1cd0(0xe8)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x15b35b),N(0x1,_0x114847(f))],g);var se=Object[_0x211bde(0xf3)],oe=Object[_0x211bde(0xd3)],ne=(_0x4b3b27,_0x24d04f,_0x1b65eb)=>_0x24d04f in _0x4b3b27?se(_0x4b3b27,_0x24d04f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1b65eb}):_0x4b3b27[_0x24d04f]=_0x1b65eb,ie=(_0x20c240,_0x13c3f3,_0x5dc0df,_0x71e8ce)=>{const _0x4cd79c=_0x211bde;for(var _0x2dad7b=_0x71e8ce>0x1?void 0x0:_0x71e8ce?oe(_0x13c3f3,_0x5dc0df):_0x13c3f3,_0x521624=_0x20c240[_0x4cd79c(0x122)]-0x1,_0x29f4ae;_0x521624>=0x0;_0x521624--)(_0x29f4ae=_0x20c240[_0x521624])&&(_0x2dad7b=_0x29f4ae(_0x2dad7b)||_0x2dad7b);return _0x2dad7b;},w=(_0x3e923b,_0xe73b6d)=>(_0x5c68c2,_0x7f97ca)=>_0xe73b6d(_0x5c68c2,_0x7f97ca,_0x3e923b),$=(_0x310de6,_0x4e93d9,_0x661f12)=>ne(_0x310de6,typeof _0x4e93d9!=_0x211bde(0xf7)?_0x4e93d9+'':_0x4e93d9,_0x661f12);let b=class extends _0x2e1d79{constructor(_0x464c6e=M,_0x5aff55,_0x49ea7b){const _0x4e676d=_0x211bde;super(),this[_0x4e676d(0x10e)]=_0x464c6e,this[_0x4e676d(0x101)]=_0x5aff55,this[_0x4e676d(0xe7)]=_0x49ea7b;const {..._0x41e517}=_0x4c8ee9({},M,this['_config']);this[_0x4e676d(0xe7)][_0x4e676d(0xfd)](z,_0x41e517);}[_0x211bde(0x104)](){const _0x459232=_0x211bde;[[f],[g],[S]][_0x459232(0xec)](_0x2ff89c=>{const _0x2d7059=_0x459232;this['_injector'][_0x2d7059(0x112)](_0x2ff89c);});}[_0x211bde(0xd8)](){const _0x557180=_0x211bde;this['_injector'][_0x557180(0x130)](g),this[_0x557180(0x101)][_0x557180(0x130)](S);}};$(b,_0x211bde(0xe0),W),$(b,_0x211bde(0xd2),_0x3efd1b['UNIVER_UNKNOWN']),b=ie([_0x56b92e(_0x3ab2fe,_0x5b3884,_0x5c33e6),w(0x1,_0x114847(_0x56bcbf)),w(0x2,_0x2fe5b9)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x5af817=_0x52b1;(function(_0x18099e,_0x4eb9f0){const _0x4d06d5=_0x52b1,_0x2e5aed=_0x18099e();while(!![]){try{const _0x511d4=-parseInt(_0x4d06d5(0x1be))/0x1*(parseInt(_0x4d06d5(0x1e7))/0x2)+-parseInt(_0x4d06d5(0x20f))/0x3+parseInt(_0x4d06d5(0x1c0))/0x4+-parseInt(_0x4d06d5(0x1e6))/0x5+parseInt(_0x4d06d5(0x1cf))/0x6+-parseInt(_0x4d06d5(0x1d2))/0x7*(-parseInt(_0x4d06d5(0x1ce))/0x8)+-parseInt(_0x4d06d5(0x1ed))/0x9;if(_0x511d4===_0x4eb9f0)break;else _0x2e5aed['push'](_0x2e5aed['shift']());}catch(_0x34f9a9){_0x2e5aed['push'](_0x2e5aed['shift']());}}}(_0x4617,0xa3da2));import{CommentService as _0x498a04,CollaborationSessionService as _0x339043,UniverCollaborationClientPlugin as _0x2a0745}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x40a7c8}from'@univerjs-pro/license';import{dayjs as _0x146095,UserManagerService as _0x253cfc,Inject as _0x1024f5,Injector as _0x500c18,Disposable as _0x1a58c4,CustomRangeType as _0x1b28c6,UniverInstanceType as _0x175b10,DependentOn as _0x17566a,IConfigService as _0x51ffa0,Plugin as _0x4977e9,merge as _0x1a1e5e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x513b47}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x532a04,IThreadCommentDataSourceService as _0x31e088}from'@univerjs/thread-comment';import{bufferTime as _0x58b843}from'rxjs';import{HTTPService as _0x375401}from'@univerjs/network';const W=_0x5af817(0x1b2);function _0x4617(){const _0x295def=['_threadCommentDataSourceService','addUser','code','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','_sessionService','/delete','2326395nqrXDu','2MYDwgB','deleteComment','Edit','requireSession','rangeId','content','2871621akjyaW','userID','users','Add','resolveComment','onStarting','length','post','rangeType','commentUpdate$','/universer-api/user/list','pluginName','thread-comment-data-source.config','map','saveCommentToSnapshot','pipe','/list','createTimestamp','find','onReady','_config','UNRECOGNIZED','defineProperty','_initDataSource','getUser','unitId','getOwnPropertyDescriptor','forEach','/universer-api/comment/unit/','replyId','error','Reply','format','userId','474558EnrPEW','getCurrentUser','add','symbol','comments','syncUpdateMutationToColla','OpenOrReOpen','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','root','Delete','resolved','disposeWithMe','_injector','user','_commentService','getMemberID','Solve','/reply','1299806ZdSTAs','reply','1368984BsnSMN','threadId','getUnit','filter','Unknown','get','replies','_httpService','_configService','COMMENT','addComment','listComments','slice','body','10174552MwuSby','7796478BGxbrT','_userService','stringify','7mLRzZi','values','parentId','subscribe','setConfig','type','comment','solved','Solved','parse','delete','dataSource','getComment'];_0x4617=function(){return _0x295def;};return _0x4617();}var I=(_0x40a8c3=>(_0x40a8c3[_0x40a8c3['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x40a8c3[_0x40a8c3[_0x5af817(0x1da)]=0x1]=_0x5af817(0x1da),_0x40a8c3[_0x40a8c3[_0x5af817(0x202)]=-0x1]=_0x5af817(0x202),_0x40a8c3))(I||{}),v=(_0x31ed0c=>(_0x31ed0c[_0x31ed0c['Unknown']=0x0]=_0x5af817(0x1c4),_0x31ed0c[_0x31ed0c[_0x5af817(0x1f0)]=0x1]=_0x5af817(0x1f0),_0x31ed0c[_0x31ed0c[_0x5af817(0x20c)]=0x2]=_0x5af817(0x20c),_0x31ed0c[_0x31ed0c['Edit']=0x3]=_0x5af817(0x1e9),_0x31ed0c[_0x31ed0c[_0x5af817(0x1b5)]=0x4]='Delete',_0x31ed0c[_0x31ed0c['Solve']=0x5]=_0x5af817(0x1bc),_0x31ed0c[_0x31ed0c[_0x5af817(0x202)]=-0x1]='UNRECOGNIZED',_0x31ed0c))(v||{});const D=_0xdda57d=>_0x146095(new Date(+_0xdda57d))[_0x5af817(0x20d)](_0x5af817(0x1e2)),B=async(_0xa1b7d4,_0x1a05fb)=>{const _0x530eae=_0x5af817,_0x4e4670=_0xa1b7d4[_0x530eae(0x1c5)](_0x253cfc),_0x338d95=_0xa1b7d4[_0x530eae(0x1c5)](_0x375401);_0x1a05fb[_0x530eae(0x208)](_0x26c221=>{const _0x431492=_0x530eae;_0x4e4670[_0x431492(0x205)](_0x26c221)&&_0x1a05fb[_0x431492(0x1dc)](_0x26c221);}),_0x1a05fb['size']&&(await _0x338d95[_0x530eae(0x1c5)](_0x530eae(0x1f7),{'params':{'userIDs':[..._0x1a05fb]}}))[_0x530eae(0x1cd)][_0x530eae(0x1ef)][_0x530eae(0x208)](_0x4da052=>{const _0x3dbbc9=_0x530eae;_0x4da052&&_0x4e4670[_0x3dbbc9(0x1e0)](_0x4da052);});};var K=Object[_0x5af817(0x207)],V=(_0x20b6e8,_0x57a2bd,_0x298383,_0x55291f)=>{const _0x1b2834=_0x5af817;for(var _0xdbec4d=_0x55291f>0x1?void 0x0:_0x55291f?K(_0x57a2bd,_0x298383):_0x57a2bd,_0x597d86=_0x20b6e8[_0x1b2834(0x1f3)]-0x1,_0x41f298;_0x597d86>=0x0;_0x597d86--)(_0x41f298=_0x20b6e8[_0x597d86])&&(_0xdbec4d=_0x41f298(_0xdbec4d)||_0xdbec4d);return _0xdbec4d;},p=(_0x5749c8,_0x1bcf80)=>(_0x5d3b03,_0x9ae975)=>_0x1bcf80(_0x5d3b03,_0x9ae975,_0x5749c8);let S=class extends _0x1a58c4{constructor(_0x44d963,_0x2b937d,_0x59e383,_0x18c454){const _0x136d5a=_0x5af817;super(),this[_0x136d5a(0x1ba)]=_0x44d963,this[_0x136d5a(0x1b3)]=_0x2b937d,this[_0x136d5a(0x1d0)]=_0x59e383,this[_0x136d5a(0x1b8)]=_0x18c454,this[_0x136d5a(0x1b1)](),this['_initUserSync']();}['_initUserSync'](){const _0x114fcb=_0x5af817;this[_0x114fcb(0x1b7)](this['_threadCommentModel'][_0x114fcb(0x1f6)][_0x114fcb(0x1fc)](_0x58b843(0x10))[_0x114fcb(0x1d5)](_0x429217=>{const _0x423583=_0x114fcb,_0x31f1de=new Set();_0x429217['forEach'](_0x3898d9=>{const _0x12717f=_0x52b1;switch(_0x3898d9['type']){case _0x12717f(0x211):{const _0xbf14cd=_0x3898d9['payload']['personId'];_0x31f1de[_0x12717f(0x211)](_0xbf14cd);break;}}}),B(this[_0x423583(0x1b8)],_0x31f1de);}));}[_0x5af817(0x1b1)](){const _0x5ce26e=_0x5af817;this[_0x5ce26e(0x1b7)](this[_0x5ce26e(0x1ba)][_0x5ce26e(0x1f6)][_0x5ce26e(0x1d5)](async _0x1224dd=>{const _0x100fe0=_0x5ce26e;var _0x2dcbcc,_0xcf9636,_0x2783ae,_0x4da040;const _0x2ce041=(_0x2dcbcc=this[_0x100fe0(0x1b3)]['getUnit'](_0x1224dd[_0x100fe0(0x206)])[_0x100fe0(0x1ff)](_0x5df0ed=>_0x5df0ed['threadId']===_0x1224dd[_0x100fe0(0x1c1)]))==null?void 0x0:_0x2dcbcc[_0x100fe0(0x1b4)];if(!_0x2ce041)return;const {unitId:_0x44d994,subUnitId:_0x584b37}=_0x2ce041;switch(_0x1224dd[_0x100fe0(0x1b9)]&&this['_userService'][_0x100fe0(0x1e0)](_0x1224dd[_0x100fe0(0x1b9)]),_0x1224dd['type']){case v[_0x100fe0(0x1f0)]:break;case v[_0x100fe0(0x20c)]:{this[_0x100fe0(0x1b3)][_0x100fe0(0x1ca)](_0x44d994,_0x584b37,{'unitId':_0x44d994,'subUnitId':_0x584b37,'ref':'','id':_0x1224dd[_0x100fe0(0x20a)],'dT':D(+_0x1224dd[_0x100fe0(0x1fe)]),'threadId':_0x1224dd[_0x100fe0(0x1c1)],'personId':(_0x2783ae=(_0xcf9636=_0x1224dd[_0x100fe0(0x1b9)])==null?void 0x0:_0xcf9636[_0x100fe0(0x1ee)])!=null?_0x2783ae:_0x1224dd[_0x100fe0(0x20e)],'text':JSON['parse'](_0x1224dd[_0x100fe0(0x1ec)]),'parentId':_0x2ce041['id']});break;}case v[_0x100fe0(0x1b5)]:{const _0x4c3ae0=this[_0x100fe0(0x1b3)][_0x100fe0(0x1de)](_0x44d994,_0x584b37,_0x1224dd[_0x100fe0(0x20a)]);_0x4c3ae0&&_0x4c3ae0[_0x100fe0(0x1d4)]&&this[_0x100fe0(0x1b3)][_0x100fe0(0x1e8)](_0x44d994,_0x584b37,_0x1224dd[_0x100fe0(0x20a)]);break;}case v[_0x100fe0(0x1e9)]:{this[_0x100fe0(0x1b3)]['updateComment'](_0x44d994,_0x584b37,{'commentId':_0x1224dd[_0x100fe0(0x20a)],'text':JSON[_0x100fe0(0x1db)](_0x1224dd['content'])});break;}case v[_0x100fe0(0x1bc)]:{const _0x14f0ba=(_0x4da040=this['_threadCommentModel'][_0x100fe0(0x1c2)](_0x1224dd['unitId'])['find'](_0x294c9a=>_0x294c9a['threadId']===_0x1224dd[_0x100fe0(0x1c1)]))==null?void 0x0:_0x4da040[_0x100fe0(0x1b4)];_0x14f0ba&&this[_0x100fe0(0x1b3)][_0x100fe0(0x1f1)](_0x44d994,_0x584b37,_0x14f0ba['id'],_0x1224dd[_0x100fe0(0x1d9)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x1024f5(_0x498a04)),p(0x1,_0x1024f5(_0x532a04)),p(0x2,_0x1024f5(_0x253cfc)),p(0x3,_0x1024f5(_0x500c18))],S);const z=_0x5af817(0x1f9),M={};var k=Object[_0x5af817(0x207)],Q=(_0x2787e9,_0x2a84de,_0x40082e,_0x3cea38)=>{for(var _0x294357=_0x3cea38>0x1?void 0x0:_0x3cea38?k(_0x2a84de,_0x40082e):_0x2a84de,_0x43f81f=_0x2787e9['length']-0x1,_0x8d983a;_0x43f81f>=0x0;_0x43f81f--)(_0x8d983a=_0x2787e9[_0x43f81f])&&(_0x294357=_0x8d983a(_0x294357)||_0x294357);return _0x294357;},_=(_0x53befe,_0x10ebfb)=>(_0x260bbb,_0x7ddaff)=>_0x10ebfb(_0x260bbb,_0x7ddaff,_0x53befe);function X(_0xf02a6a,_0x19896b){const _0x6eb1a3=_0x5af817,_0x25efa7=_0xf02a6a['replies'][0x0];return{..._0x19896b,'id':_0x25efa7[_0x6eb1a3(0x20a)],'resolved':_0xf02a6a[_0x6eb1a3(0x1d9)]===0x1,'dT':D(_0x25efa7['createTimestamp']),'personId':_0x25efa7[_0x6eb1a3(0x20e)],'threadId':_0x25efa7[_0x6eb1a3(0x1c1)]};}function ee(_0x53718d,_0x47e15a,_0x2ec43d){const _0x1e4213=_0x5af817;var _0x5d485c,_0x9f0f78;if(((_0x9f0f78=(_0x5d485c=_0x53718d==null?void 0x0:_0x53718d['replies'])==null?void 0x0:_0x5d485c[_0x1e4213(0x1f3)])!=null?_0x9f0f78:0x0)>0x0){const _0x231253=(_0x779f3e,_0x41a5aa)=>({'id':_0x779f3e[_0x1e4213(0x20a)],'threadId':_0x779f3e[_0x1e4213(0x1c1)],'dT':D(_0x779f3e[_0x1e4213(0x1fe)]),'personId':_0x779f3e[_0x1e4213(0x20e)],'resolved':_0x53718d[_0x1e4213(0x1d9)]===I[_0x1e4213(0x1da)],'unitId':_0x47e15a,'subUnitId':_0x2ec43d,'text':JSON[_0x1e4213(0x1db)](_0x779f3e[_0x1e4213(0x1ec)]),'parentId':_0x41a5aa}),_0x236f50=_0x231253(_0x53718d[_0x1e4213(0x1c6)][0x0]);return{..._0x236f50,'children':_0x53718d[_0x1e4213(0x1c6)][_0x1e4213(0x1cc)](0x1)[_0x1e4213(0x1fa)](_0x6e3739=>_0x231253(_0x6e3739,_0x236f50['id']))};}return null;}let f=class{constructor(_0x59d1dc,_0x58580d,_0x47d25f,_0x1162ca){const _0x2c1b46=_0x5af817;this['_httpService']=_0x59d1dc,this['_userService']=_0x58580d,this[_0x2c1b46(0x1e4)]=_0x47d25f,this[_0x2c1b46(0x1b8)]=_0x1162ca;}async['addComment'](_0x4b49eb){const _0x17e06f=_0x5af817;var _0x21d4ab,_0x2d710b;const {parentId:_0x385a6e,unitId:_0x2b81ff,text:_0x2f9e47,threadId:_0x3312cf}=_0x4b49eb,_0x317f95=(_0x2d710b=(_0x21d4ab=_0x2f9e47['customRanges'])==null?void 0x0:_0x21d4ab[_0x17e06f(0x1c3)](_0x224cd9=>_0x224cd9[_0x17e06f(0x1f5)]===_0x1b28c6[_0x17e06f(0x1c9)])['map'](_0x22641d=>_0x22641d[_0x17e06f(0x1eb)]))!=null?_0x2d710b:[],_0x1555a1=JSON['stringify'](_0x2f9e47),_0x2ec2d7=(await this[_0x17e06f(0x1e4)][_0x17e06f(0x1ea)](_0x2b81ff))[_0x17e06f(0x1bb)]();if(_0x385a6e){const _0x39bb5e={'memberId':_0x2ec2d7,'unitId':_0x2b81ff,'content':_0x1555a1,'mention':_0x317f95,'threadId':_0x3312cf},_0x323498=(await this[_0x17e06f(0x1c7)][_0x17e06f(0x1f4)]('/universer-api/comment/unit/'+_0x2b81ff+_0x17e06f(0x1bd),{'body':_0x39bb5e}))[_0x17e06f(0x1cd)][_0x17e06f(0x1bf)];return{..._0x4b49eb,'id':_0x323498['replyId'],'dT':_0x146095(+_0x323498[_0x17e06f(0x1fe)])['format'](_0x17e06f(0x1e2)),'personId':_0x323498[_0x17e06f(0x20e)]};}else{const _0x50c778={'memberId':_0x2ec2d7,'unitId':_0x2b81ff,'content':_0x1555a1,'mention':_0x317f95},_0x2a7732=await this[_0x17e06f(0x1c7)][_0x17e06f(0x1f4)](_0x17e06f(0x209)+_0x2b81ff+'/add',{'body':_0x50c778});return X(_0x2a7732[_0x17e06f(0x1cd)][_0x17e06f(0x1d8)],_0x4b49eb);}}async['updateComment'](_0x4945ee){const _0x2de3fd=_0x5af817;var _0x48ebc6,_0x1c88ec;const {text:_0x485f86,unitId:_0x5a5ef4}=_0x4945ee,_0x254042=(_0x1c88ec=(_0x48ebc6=_0x485f86['customRanges'])==null?void 0x0:_0x48ebc6[_0x2de3fd(0x1c3)](_0x43c832=>_0x43c832[_0x2de3fd(0x1f5)]===_0x1b28c6['COMMENT'])[_0x2de3fd(0x1fa)](_0x12552d=>_0x12552d[_0x2de3fd(0x1eb)]))!=null?_0x1c88ec:[],_0x19e35f=JSON[_0x2de3fd(0x1d1)](_0x485f86),_0x1151a4=_0x4945ee[_0x2de3fd(0x1c1)],_0x33b77e=_0x4945ee['id'],_0x49cdaf={'memberId':(await this['_sessionService'][_0x2de3fd(0x1ea)](_0x5a5ef4))[_0x2de3fd(0x1bb)](),'unitId':_0x5a5ef4,'threadId':_0x1151a4,'mention':_0x254042,'content':_0x19e35f,'replyId':_0x33b77e},_0x2e1826=await this[_0x2de3fd(0x1c7)][_0x2de3fd(0x1f4)]('/universer-api/comment/unit/'+_0x5a5ef4+'/edit',{'body':_0x49cdaf});return!_0x2e1826[_0x2de3fd(0x1cd)][_0x2de3fd(0x20b)]||_0x2e1826[_0x2de3fd(0x1cd)][_0x2de3fd(0x20b)][_0x2de3fd(0x1e1)]===0x1;}async[_0x5af817(0x1f1)](_0x49d58a){const _0x3de162=_0x5af817,{unitId:_0x354fdb}=_0x49d58a,_0x33a349=_0x49d58a[_0x3de162(0x1c1)],_0x4d20b9={'memberId':this[_0x3de162(0x1d0)][_0x3de162(0x210)]()[_0x3de162(0x1ee)],'unitId':_0x354fdb,'threadId':_0x33a349,'solved':_0x49d58a[_0x3de162(0x1b6)]?I[_0x3de162(0x1da)]:I[_0x3de162(0x215)]},_0x35ffa2=await this[_0x3de162(0x1c7)][_0x3de162(0x1f4)]('/universer-api/comment/unit/'+_0x354fdb+'/solved',{'body':_0x4d20b9});return!_0x35ffa2['body'][_0x3de162(0x20b)]||_0x35ffa2['body']['error'][_0x3de162(0x1e1)]===0x1;}async[_0x5af817(0x1e8)](_0x23f4ec,_0x52bdba,_0x44a5eb,_0x3466f5){const _0x6ebf77=_0x5af817,_0x3cf0a8={'memberId':(await this[_0x6ebf77(0x1e4)]['requireSession'](_0x23f4ec))['getMemberID'](),'threadId':_0x44a5eb,'replyId':_0x3466f5,'unitId':_0x23f4ec},_0x3d309f=await this[_0x6ebf77(0x1c7)][_0x6ebf77(0x1f4)](_0x6ebf77(0x209)+_0x23f4ec+_0x6ebf77(0x1e5),{'body':_0x3cf0a8});return!_0x3d309f['body'][_0x6ebf77(0x20b)]||_0x3d309f[_0x6ebf77(0x1cd)]['error'][_0x6ebf77(0x1e1)]===0x1;}async[_0x5af817(0x1cb)](_0x4cd549,_0x2044f3,_0x182bf6){const _0xba06cb=_0x5af817,_0x726cb1={'unitId':_0x4cd549,'threadId':_0x182bf6},_0x2c2fd0=await this[_0xba06cb(0x1c7)][_0xba06cb(0x1f4)](_0xba06cb(0x209)+_0x4cd549+_0xba06cb(0x1fd),{'body':_0x726cb1}),_0x12e1d4=_0x182bf6['map'](_0x4dbb08=>ee(_0x2c2fd0['body'][_0xba06cb(0x213)][_0x4dbb08],_0x4cd549,_0x2044f3))[_0xba06cb(0x1c3)](Boolean);return Object[_0xba06cb(0x1d3)](_0x2c2fd0[_0xba06cb(0x1cd)][_0xba06cb(0x1ef)])['forEach'](_0x4b10db=>{const _0x4e4f29=_0xba06cb;this[_0x4e4f29(0x1d0)][_0x4e4f29(0x1e0)](_0x4b10db);}),_0x12e1d4;}[_0x5af817(0x1fb)](_0x4598dd){return{'id':_0x4598dd['id'],'threadId':_0x4598dd['threadId'],'ref':_0x4598dd['ref']};}};f=Q([_(0x0,_0x1024f5(_0x375401)),_(0x1,_0x1024f5(_0x253cfc)),_(0x2,_0x1024f5(_0x339043)),_(0x3,_0x1024f5(_0x500c18))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x54645e,_0x2f4f82,_0x119bd0,_0x4a8e0a)=>{const _0x753257=_0x5af817;for(var _0x3e084c=_0x4a8e0a>0x1?void 0x0:_0x4a8e0a?re(_0x2f4f82,_0x119bd0):_0x2f4f82,_0x5cb717=_0x54645e[_0x753257(0x1f3)]-0x1,_0x520c50;_0x5cb717>=0x0;_0x5cb717--)(_0x520c50=_0x54645e[_0x5cb717])&&(_0x3e084c=_0x520c50(_0x3e084c)||_0x3e084c);return _0x3e084c;},N=(_0x349013,_0x563dfd)=>(_0x518fd4,_0x2d68db)=>_0x563dfd(_0x518fd4,_0x2d68db,_0x349013);function _0x52b1(_0xa09449,_0x1cd1a7){const _0x461703=_0x4617();return _0x52b1=function(_0x52b153,_0x57cb9f){_0x52b153=_0x52b153-0x1b1;let _0x188f23=_0x461703[_0x52b153];return _0x188f23;},_0x52b1(_0xa09449,_0x1cd1a7);}let g=class extends _0x1a58c4{constructor(_0x101963,_0x458e6c){const _0x155773=_0x5af817;super(),this[_0x155773(0x1df)]=_0x101963,this[_0x155773(0x1e3)]=_0x458e6c,this['_initDataSource']();}[_0x5af817(0x204)](){const _0x25041d=_0x5af817;this['_threadCommentDataSourceService'][_0x25041d(0x1dd)]=this[_0x25041d(0x1e3)],this[_0x25041d(0x1df)][_0x25041d(0x214)]=!0x1;}};g=te([N(0x0,_0x31e088),N(0x1,_0x1024f5(f))],g);var se=Object[_0x5af817(0x203)],oe=Object[_0x5af817(0x207)],ne=(_0x4a1aae,_0x9989d2,_0x451eba)=>_0x9989d2 in _0x4a1aae?se(_0x4a1aae,_0x9989d2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x451eba}):_0x4a1aae[_0x9989d2]=_0x451eba,ie=(_0x32358a,_0x5c1f3e,_0x35a4b7,_0x1125f0)=>{const _0x37a8cd=_0x5af817;for(var _0x512706=_0x1125f0>0x1?void 0x0:_0x1125f0?oe(_0x5c1f3e,_0x35a4b7):_0x5c1f3e,_0x567da2=_0x32358a[_0x37a8cd(0x1f3)]-0x1,_0x5be124;_0x567da2>=0x0;_0x567da2--)(_0x5be124=_0x32358a[_0x567da2])&&(_0x512706=_0x5be124(_0x512706)||_0x512706);return _0x512706;},w=(_0x18562c,_0x2c2433)=>(_0x4da58c,_0xcc80e)=>_0x2c2433(_0x4da58c,_0xcc80e,_0x18562c),$=(_0x1e39da,_0x2cf86d,_0x597d82)=>ne(_0x1e39da,typeof _0x2cf86d!=_0x5af817(0x212)?_0x2cf86d+'':_0x2cf86d,_0x597d82);let b=class extends _0x4977e9{constructor(_0xe46c66=M,_0x27c311,_0xed5db9){const _0x157754=_0x5af817;super(),this[_0x157754(0x201)]=_0xe46c66,this[_0x157754(0x1b8)]=_0x27c311,this[_0x157754(0x1c8)]=_0xed5db9;const {..._0x41be85}=_0x1a1e5e({},M,this[_0x157754(0x201)]);this['_configService'][_0x157754(0x1d6)](z,_0x41be85);}[_0x5af817(0x1f2)](){const _0x4636ac=_0x5af817;[[f],[g],[S]][_0x4636ac(0x208)](_0x3a33ad=>{this['_injector']['add'](_0x3a33ad);});}[_0x5af817(0x200)](){const _0xc29a83=_0x5af817;this[_0xc29a83(0x1b8)]['get'](g),this[_0xc29a83(0x1b8)][_0xc29a83(0x1c5)](S);}};$(b,_0x5af817(0x1f8),W),$(b,_0x5af817(0x1d7),_0x175b10['UNIVER_UNKNOWN']),b=ie([_0x17566a(_0x513b47,_0x2a0745,_0x40a7c8),w(0x1,_0x1024f5(_0x500c18)),w(0x2,_0x51ffa0)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x5af817=_0x52b1;(function(_0x18099e,_0x4eb9f0){const _0x4d06d5=_0x52b1,_0x2e5aed=_0x18099e();while(!![]){try{const _0x511d4=-parseInt(_0x4d06d5(0x1be))/0x1*(parseInt(_0x4d06d5(0x1e7))/0x2)+-parseInt(_0x4d06d5(0x20f))/0x3+parseInt(_0x4d06d5(0x1c0))/0x4+-parseInt(_0x4d06d5(0x1e6))/0x5+parseInt(_0x4d06d5(0x1cf))/0x6+-parseInt(_0x4d06d5(0x1d2))/0x7*(-parseInt(_0x4d06d5(0x1ce))/0x8)+-parseInt(_0x4d06d5(0x1ed))/0x9;if(_0x511d4===_0x4eb9f0)break;else _0x2e5aed['push'](_0x2e5aed['shift']());}catch(_0x34f9a9){_0x2e5aed['push'](_0x2e5aed['shift']());}}}(_0x4617,0xa3da2));import{CommentService as _0x498a04,CollaborationSessionService as _0x339043,UniverCollaborationClientPlugin as _0x2a0745}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x40a7c8}from'@univerjs-pro/license';import{dayjs as _0x146095,UserManagerService as _0x253cfc,Inject as _0x1024f5,Injector as _0x500c18,Disposable as _0x1a58c4,CustomRangeType as _0x1b28c6,UniverInstanceType as _0x175b10,DependentOn as _0x17566a,IConfigService as _0x51ffa0,Plugin as _0x4977e9,merge as _0x1a1e5e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x513b47}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x532a04,IThreadCommentDataSourceService as _0x31e088}from'@univerjs/thread-comment';import{bufferTime as _0x58b843}from'rxjs';import{HTTPService as _0x375401}from'@univerjs/network';const W=_0x5af817(0x1b2);function _0x4617(){const _0x295def=['_threadCommentDataSourceService','addUser','code','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','_sessionService','/delete','2326395nqrXDu','2MYDwgB','deleteComment','Edit','requireSession','rangeId','content','2871621akjyaW','userID','users','Add','resolveComment','onStarting','length','post','rangeType','commentUpdate$','/universer-api/user/list','pluginName','thread-comment-data-source.config','map','saveCommentToSnapshot','pipe','/list','createTimestamp','find','onReady','_config','UNRECOGNIZED','defineProperty','_initDataSource','getUser','unitId','getOwnPropertyDescriptor','forEach','/universer-api/comment/unit/','replyId','error','Reply','format','userId','474558EnrPEW','getCurrentUser','add','symbol','comments','syncUpdateMutationToColla','OpenOrReOpen','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','root','Delete','resolved','disposeWithMe','_injector','user','_commentService','getMemberID','Solve','/reply','1299806ZdSTAs','reply','1368984BsnSMN','threadId','getUnit','filter','Unknown','get','replies','_httpService','_configService','COMMENT','addComment','listComments','slice','body','10174552MwuSby','7796478BGxbrT','_userService','stringify','7mLRzZi','values','parentId','subscribe','setConfig','type','comment','solved','Solved','parse','delete','dataSource','getComment'];_0x4617=function(){return _0x295def;};return _0x4617();}var I=(_0x40a8c3=>(_0x40a8c3[_0x40a8c3['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x40a8c3[_0x40a8c3[_0x5af817(0x1da)]=0x1]=_0x5af817(0x1da),_0x40a8c3[_0x40a8c3[_0x5af817(0x202)]=-0x1]=_0x5af817(0x202),_0x40a8c3))(I||{}),v=(_0x31ed0c=>(_0x31ed0c[_0x31ed0c['Unknown']=0x0]=_0x5af817(0x1c4),_0x31ed0c[_0x31ed0c[_0x5af817(0x1f0)]=0x1]=_0x5af817(0x1f0),_0x31ed0c[_0x31ed0c[_0x5af817(0x20c)]=0x2]=_0x5af817(0x20c),_0x31ed0c[_0x31ed0c['Edit']=0x3]=_0x5af817(0x1e9),_0x31ed0c[_0x31ed0c[_0x5af817(0x1b5)]=0x4]='Delete',_0x31ed0c[_0x31ed0c['Solve']=0x5]=_0x5af817(0x1bc),_0x31ed0c[_0x31ed0c[_0x5af817(0x202)]=-0x1]='UNRECOGNIZED',_0x31ed0c))(v||{});const D=_0xdda57d=>_0x146095(new Date(+_0xdda57d))[_0x5af817(0x20d)](_0x5af817(0x1e2)),B=async(_0xa1b7d4,_0x1a05fb)=>{const _0x530eae=_0x5af817,_0x4e4670=_0xa1b7d4[_0x530eae(0x1c5)](_0x253cfc),_0x338d95=_0xa1b7d4[_0x530eae(0x1c5)](_0x375401);_0x1a05fb[_0x530eae(0x208)](_0x26c221=>{const _0x431492=_0x530eae;_0x4e4670[_0x431492(0x205)](_0x26c221)&&_0x1a05fb[_0x431492(0x1dc)](_0x26c221);}),_0x1a05fb['size']&&(await _0x338d95[_0x530eae(0x1c5)](_0x530eae(0x1f7),{'params':{'userIDs':[..._0x1a05fb]}}))[_0x530eae(0x1cd)][_0x530eae(0x1ef)][_0x530eae(0x208)](_0x4da052=>{const _0x3dbbc9=_0x530eae;_0x4da052&&_0x4e4670[_0x3dbbc9(0x1e0)](_0x4da052);});};var K=Object[_0x5af817(0x207)],V=(_0x20b6e8,_0x57a2bd,_0x298383,_0x55291f)=>{const _0x1b2834=_0x5af817;for(var _0xdbec4d=_0x55291f>0x1?void 0x0:_0x55291f?K(_0x57a2bd,_0x298383):_0x57a2bd,_0x597d86=_0x20b6e8[_0x1b2834(0x1f3)]-0x1,_0x41f298;_0x597d86>=0x0;_0x597d86--)(_0x41f298=_0x20b6e8[_0x597d86])&&(_0xdbec4d=_0x41f298(_0xdbec4d)||_0xdbec4d);return _0xdbec4d;},p=(_0x5749c8,_0x1bcf80)=>(_0x5d3b03,_0x9ae975)=>_0x1bcf80(_0x5d3b03,_0x9ae975,_0x5749c8);let S=class extends _0x1a58c4{constructor(_0x44d963,_0x2b937d,_0x59e383,_0x18c454){const _0x136d5a=_0x5af817;super(),this[_0x136d5a(0x1ba)]=_0x44d963,this[_0x136d5a(0x1b3)]=_0x2b937d,this[_0x136d5a(0x1d0)]=_0x59e383,this[_0x136d5a(0x1b8)]=_0x18c454,this[_0x136d5a(0x1b1)](),this['_initUserSync']();}['_initUserSync'](){const _0x114fcb=_0x5af817;this[_0x114fcb(0x1b7)](this['_threadCommentModel'][_0x114fcb(0x1f6)][_0x114fcb(0x1fc)](_0x58b843(0x10))[_0x114fcb(0x1d5)](_0x429217=>{const _0x423583=_0x114fcb,_0x31f1de=new Set();_0x429217['forEach'](_0x3898d9=>{const _0x12717f=_0x52b1;switch(_0x3898d9['type']){case _0x12717f(0x211):{const _0xbf14cd=_0x3898d9['payload']['personId'];_0x31f1de[_0x12717f(0x211)](_0xbf14cd);break;}}}),B(this[_0x423583(0x1b8)],_0x31f1de);}));}[_0x5af817(0x1b1)](){const _0x5ce26e=_0x5af817;this[_0x5ce26e(0x1b7)](this[_0x5ce26e(0x1ba)][_0x5ce26e(0x1f6)][_0x5ce26e(0x1d5)](async _0x1224dd=>{const _0x100fe0=_0x5ce26e;var _0x2dcbcc,_0xcf9636,_0x2783ae,_0x4da040;const _0x2ce041=(_0x2dcbcc=this[_0x100fe0(0x1b3)]['getUnit'](_0x1224dd[_0x100fe0(0x206)])[_0x100fe0(0x1ff)](_0x5df0ed=>_0x5df0ed['threadId']===_0x1224dd[_0x100fe0(0x1c1)]))==null?void 0x0:_0x2dcbcc[_0x100fe0(0x1b4)];if(!_0x2ce041)return;const {unitId:_0x44d994,subUnitId:_0x584b37}=_0x2ce041;switch(_0x1224dd[_0x100fe0(0x1b9)]&&this['_userService'][_0x100fe0(0x1e0)](_0x1224dd[_0x100fe0(0x1b9)]),_0x1224dd['type']){case v[_0x100fe0(0x1f0)]:break;case v[_0x100fe0(0x20c)]:{this[_0x100fe0(0x1b3)][_0x100fe0(0x1ca)](_0x44d994,_0x584b37,{'unitId':_0x44d994,'subUnitId':_0x584b37,'ref':'','id':_0x1224dd[_0x100fe0(0x20a)],'dT':D(+_0x1224dd[_0x100fe0(0x1fe)]),'threadId':_0x1224dd[_0x100fe0(0x1c1)],'personId':(_0x2783ae=(_0xcf9636=_0x1224dd[_0x100fe0(0x1b9)])==null?void 0x0:_0xcf9636[_0x100fe0(0x1ee)])!=null?_0x2783ae:_0x1224dd[_0x100fe0(0x20e)],'text':JSON['parse'](_0x1224dd[_0x100fe0(0x1ec)]),'parentId':_0x2ce041['id']});break;}case v[_0x100fe0(0x1b5)]:{const _0x4c3ae0=this[_0x100fe0(0x1b3)][_0x100fe0(0x1de)](_0x44d994,_0x584b37,_0x1224dd[_0x100fe0(0x20a)]);_0x4c3ae0&&_0x4c3ae0[_0x100fe0(0x1d4)]&&this[_0x100fe0(0x1b3)][_0x100fe0(0x1e8)](_0x44d994,_0x584b37,_0x1224dd[_0x100fe0(0x20a)]);break;}case v[_0x100fe0(0x1e9)]:{this[_0x100fe0(0x1b3)]['updateComment'](_0x44d994,_0x584b37,{'commentId':_0x1224dd[_0x100fe0(0x20a)],'text':JSON[_0x100fe0(0x1db)](_0x1224dd['content'])});break;}case v[_0x100fe0(0x1bc)]:{const _0x14f0ba=(_0x4da040=this['_threadCommentModel'][_0x100fe0(0x1c2)](_0x1224dd['unitId'])['find'](_0x294c9a=>_0x294c9a['threadId']===_0x1224dd[_0x100fe0(0x1c1)]))==null?void 0x0:_0x4da040[_0x100fe0(0x1b4)];_0x14f0ba&&this[_0x100fe0(0x1b3)][_0x100fe0(0x1f1)](_0x44d994,_0x584b37,_0x14f0ba['id'],_0x1224dd[_0x100fe0(0x1d9)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x1024f5(_0x498a04)),p(0x1,_0x1024f5(_0x532a04)),p(0x2,_0x1024f5(_0x253cfc)),p(0x3,_0x1024f5(_0x500c18))],S);const z=_0x5af817(0x1f9),M={};var k=Object[_0x5af817(0x207)],Q=(_0x2787e9,_0x2a84de,_0x40082e,_0x3cea38)=>{for(var _0x294357=_0x3cea38>0x1?void 0x0:_0x3cea38?k(_0x2a84de,_0x40082e):_0x2a84de,_0x43f81f=_0x2787e9['length']-0x1,_0x8d983a;_0x43f81f>=0x0;_0x43f81f--)(_0x8d983a=_0x2787e9[_0x43f81f])&&(_0x294357=_0x8d983a(_0x294357)||_0x294357);return _0x294357;},_=(_0x53befe,_0x10ebfb)=>(_0x260bbb,_0x7ddaff)=>_0x10ebfb(_0x260bbb,_0x7ddaff,_0x53befe);function X(_0xf02a6a,_0x19896b){const _0x6eb1a3=_0x5af817,_0x25efa7=_0xf02a6a['replies'][0x0];return{..._0x19896b,'id':_0x25efa7[_0x6eb1a3(0x20a)],'resolved':_0xf02a6a[_0x6eb1a3(0x1d9)]===0x1,'dT':D(_0x25efa7['createTimestamp']),'personId':_0x25efa7[_0x6eb1a3(0x20e)],'threadId':_0x25efa7[_0x6eb1a3(0x1c1)]};}function ee(_0x53718d,_0x47e15a,_0x2ec43d){const _0x1e4213=_0x5af817;var _0x5d485c,_0x9f0f78;if(((_0x9f0f78=(_0x5d485c=_0x53718d==null?void 0x0:_0x53718d['replies'])==null?void 0x0:_0x5d485c[_0x1e4213(0x1f3)])!=null?_0x9f0f78:0x0)>0x0){const _0x231253=(_0x779f3e,_0x41a5aa)=>({'id':_0x779f3e[_0x1e4213(0x20a)],'threadId':_0x779f3e[_0x1e4213(0x1c1)],'dT':D(_0x779f3e[_0x1e4213(0x1fe)]),'personId':_0x779f3e[_0x1e4213(0x20e)],'resolved':_0x53718d[_0x1e4213(0x1d9)]===I[_0x1e4213(0x1da)],'unitId':_0x47e15a,'subUnitId':_0x2ec43d,'text':JSON[_0x1e4213(0x1db)](_0x779f3e[_0x1e4213(0x1ec)]),'parentId':_0x41a5aa}),_0x236f50=_0x231253(_0x53718d[_0x1e4213(0x1c6)][0x0]);return{..._0x236f50,'children':_0x53718d[_0x1e4213(0x1c6)][_0x1e4213(0x1cc)](0x1)[_0x1e4213(0x1fa)](_0x6e3739=>_0x231253(_0x6e3739,_0x236f50['id']))};}return null;}let f=class{constructor(_0x59d1dc,_0x58580d,_0x47d25f,_0x1162ca){const _0x2c1b46=_0x5af817;this['_httpService']=_0x59d1dc,this['_userService']=_0x58580d,this[_0x2c1b46(0x1e4)]=_0x47d25f,this[_0x2c1b46(0x1b8)]=_0x1162ca;}async['addComment'](_0x4b49eb){const _0x17e06f=_0x5af817;var _0x21d4ab,_0x2d710b;const {parentId:_0x385a6e,unitId:_0x2b81ff,text:_0x2f9e47,threadId:_0x3312cf}=_0x4b49eb,_0x317f95=(_0x2d710b=(_0x21d4ab=_0x2f9e47['customRanges'])==null?void 0x0:_0x21d4ab[_0x17e06f(0x1c3)](_0x224cd9=>_0x224cd9[_0x17e06f(0x1f5)]===_0x1b28c6[_0x17e06f(0x1c9)])['map'](_0x22641d=>_0x22641d[_0x17e06f(0x1eb)]))!=null?_0x2d710b:[],_0x1555a1=JSON['stringify'](_0x2f9e47),_0x2ec2d7=(await this[_0x17e06f(0x1e4)][_0x17e06f(0x1ea)](_0x2b81ff))[_0x17e06f(0x1bb)]();if(_0x385a6e){const _0x39bb5e={'memberId':_0x2ec2d7,'unitId':_0x2b81ff,'content':_0x1555a1,'mention':_0x317f95,'threadId':_0x3312cf},_0x323498=(await this[_0x17e06f(0x1c7)][_0x17e06f(0x1f4)]('/universer-api/comment/unit/'+_0x2b81ff+_0x17e06f(0x1bd),{'body':_0x39bb5e}))[_0x17e06f(0x1cd)][_0x17e06f(0x1bf)];return{..._0x4b49eb,'id':_0x323498['replyId'],'dT':_0x146095(+_0x323498[_0x17e06f(0x1fe)])['format'](_0x17e06f(0x1e2)),'personId':_0x323498[_0x17e06f(0x20e)]};}else{const _0x50c778={'memberId':_0x2ec2d7,'unitId':_0x2b81ff,'content':_0x1555a1,'mention':_0x317f95},_0x2a7732=await this[_0x17e06f(0x1c7)][_0x17e06f(0x1f4)](_0x17e06f(0x209)+_0x2b81ff+'/add',{'body':_0x50c778});return X(_0x2a7732[_0x17e06f(0x1cd)][_0x17e06f(0x1d8)],_0x4b49eb);}}async['updateComment'](_0x4945ee){const _0x2de3fd=_0x5af817;var _0x48ebc6,_0x1c88ec;const {text:_0x485f86,unitId:_0x5a5ef4}=_0x4945ee,_0x254042=(_0x1c88ec=(_0x48ebc6=_0x485f86['customRanges'])==null?void 0x0:_0x48ebc6[_0x2de3fd(0x1c3)](_0x43c832=>_0x43c832[_0x2de3fd(0x1f5)]===_0x1b28c6['COMMENT'])[_0x2de3fd(0x1fa)](_0x12552d=>_0x12552d[_0x2de3fd(0x1eb)]))!=null?_0x1c88ec:[],_0x19e35f=JSON[_0x2de3fd(0x1d1)](_0x485f86),_0x1151a4=_0x4945ee[_0x2de3fd(0x1c1)],_0x33b77e=_0x4945ee['id'],_0x49cdaf={'memberId':(await this['_sessionService'][_0x2de3fd(0x1ea)](_0x5a5ef4))[_0x2de3fd(0x1bb)](),'unitId':_0x5a5ef4,'threadId':_0x1151a4,'mention':_0x254042,'content':_0x19e35f,'replyId':_0x33b77e},_0x2e1826=await this[_0x2de3fd(0x1c7)][_0x2de3fd(0x1f4)]('/universer-api/comment/unit/'+_0x5a5ef4+'/edit',{'body':_0x49cdaf});return!_0x2e1826[_0x2de3fd(0x1cd)][_0x2de3fd(0x20b)]||_0x2e1826[_0x2de3fd(0x1cd)][_0x2de3fd(0x20b)][_0x2de3fd(0x1e1)]===0x1;}async[_0x5af817(0x1f1)](_0x49d58a){const _0x3de162=_0x5af817,{unitId:_0x354fdb}=_0x49d58a,_0x33a349=_0x49d58a[_0x3de162(0x1c1)],_0x4d20b9={'memberId':this[_0x3de162(0x1d0)][_0x3de162(0x210)]()[_0x3de162(0x1ee)],'unitId':_0x354fdb,'threadId':_0x33a349,'solved':_0x49d58a[_0x3de162(0x1b6)]?I[_0x3de162(0x1da)]:I[_0x3de162(0x215)]},_0x35ffa2=await this[_0x3de162(0x1c7)][_0x3de162(0x1f4)]('/universer-api/comment/unit/'+_0x354fdb+'/solved',{'body':_0x4d20b9});return!_0x35ffa2['body'][_0x3de162(0x20b)]||_0x35ffa2['body']['error'][_0x3de162(0x1e1)]===0x1;}async[_0x5af817(0x1e8)](_0x23f4ec,_0x52bdba,_0x44a5eb,_0x3466f5){const _0x6ebf77=_0x5af817,_0x3cf0a8={'memberId':(await this[_0x6ebf77(0x1e4)]['requireSession'](_0x23f4ec))['getMemberID'](),'threadId':_0x44a5eb,'replyId':_0x3466f5,'unitId':_0x23f4ec},_0x3d309f=await this[_0x6ebf77(0x1c7)][_0x6ebf77(0x1f4)](_0x6ebf77(0x209)+_0x23f4ec+_0x6ebf77(0x1e5),{'body':_0x3cf0a8});return!_0x3d309f['body'][_0x6ebf77(0x20b)]||_0x3d309f[_0x6ebf77(0x1cd)]['error'][_0x6ebf77(0x1e1)]===0x1;}async[_0x5af817(0x1cb)](_0x4cd549,_0x2044f3,_0x182bf6){const _0xba06cb=_0x5af817,_0x726cb1={'unitId':_0x4cd549,'threadId':_0x182bf6},_0x2c2fd0=await this[_0xba06cb(0x1c7)][_0xba06cb(0x1f4)](_0xba06cb(0x209)+_0x4cd549+_0xba06cb(0x1fd),{'body':_0x726cb1}),_0x12e1d4=_0x182bf6['map'](_0x4dbb08=>ee(_0x2c2fd0['body'][_0xba06cb(0x213)][_0x4dbb08],_0x4cd549,_0x2044f3))[_0xba06cb(0x1c3)](Boolean);return Object[_0xba06cb(0x1d3)](_0x2c2fd0[_0xba06cb(0x1cd)][_0xba06cb(0x1ef)])['forEach'](_0x4b10db=>{const _0x4e4f29=_0xba06cb;this[_0x4e4f29(0x1d0)][_0x4e4f29(0x1e0)](_0x4b10db);}),_0x12e1d4;}[_0x5af817(0x1fb)](_0x4598dd){return{'id':_0x4598dd['id'],'threadId':_0x4598dd['threadId'],'ref':_0x4598dd['ref']};}};f=Q([_(0x0,_0x1024f5(_0x375401)),_(0x1,_0x1024f5(_0x253cfc)),_(0x2,_0x1024f5(_0x339043)),_(0x3,_0x1024f5(_0x500c18))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x54645e,_0x2f4f82,_0x119bd0,_0x4a8e0a)=>{const _0x753257=_0x5af817;for(var _0x3e084c=_0x4a8e0a>0x1?void 0x0:_0x4a8e0a?re(_0x2f4f82,_0x119bd0):_0x2f4f82,_0x5cb717=_0x54645e[_0x753257(0x1f3)]-0x1,_0x520c50;_0x5cb717>=0x0;_0x5cb717--)(_0x520c50=_0x54645e[_0x5cb717])&&(_0x3e084c=_0x520c50(_0x3e084c)||_0x3e084c);return _0x3e084c;},N=(_0x349013,_0x563dfd)=>(_0x518fd4,_0x2d68db)=>_0x563dfd(_0x518fd4,_0x2d68db,_0x349013);function _0x52b1(_0xa09449,_0x1cd1a7){const _0x461703=_0x4617();return _0x52b1=function(_0x52b153,_0x57cb9f){_0x52b153=_0x52b153-0x1b1;let _0x188f23=_0x461703[_0x52b153];return _0x188f23;},_0x52b1(_0xa09449,_0x1cd1a7);}let g=class extends _0x1a58c4{constructor(_0x101963,_0x458e6c){const _0x155773=_0x5af817;super(),this[_0x155773(0x1df)]=_0x101963,this[_0x155773(0x1e3)]=_0x458e6c,this['_initDataSource']();}[_0x5af817(0x204)](){const _0x25041d=_0x5af817;this['_threadCommentDataSourceService'][_0x25041d(0x1dd)]=this[_0x25041d(0x1e3)],this[_0x25041d(0x1df)][_0x25041d(0x214)]=!0x1;}};g=te([N(0x0,_0x31e088),N(0x1,_0x1024f5(f))],g);var se=Object[_0x5af817(0x203)],oe=Object[_0x5af817(0x207)],ne=(_0x4a1aae,_0x9989d2,_0x451eba)=>_0x9989d2 in _0x4a1aae?se(_0x4a1aae,_0x9989d2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x451eba}):_0x4a1aae[_0x9989d2]=_0x451eba,ie=(_0x32358a,_0x5c1f3e,_0x35a4b7,_0x1125f0)=>{const _0x37a8cd=_0x5af817;for(var _0x512706=_0x1125f0>0x1?void 0x0:_0x1125f0?oe(_0x5c1f3e,_0x35a4b7):_0x5c1f3e,_0x567da2=_0x32358a[_0x37a8cd(0x1f3)]-0x1,_0x5be124;_0x567da2>=0x0;_0x567da2--)(_0x5be124=_0x32358a[_0x567da2])&&(_0x512706=_0x5be124(_0x512706)||_0x512706);return _0x512706;},w=(_0x18562c,_0x2c2433)=>(_0x4da58c,_0xcc80e)=>_0x2c2433(_0x4da58c,_0xcc80e,_0x18562c),$=(_0x1e39da,_0x2cf86d,_0x597d82)=>ne(_0x1e39da,typeof _0x2cf86d!=_0x5af817(0x212)?_0x2cf86d+'':_0x2cf86d,_0x597d82);let b=class extends _0x4977e9{constructor(_0xe46c66=M,_0x27c311,_0xed5db9){const _0x157754=_0x5af817;super(),this[_0x157754(0x201)]=_0xe46c66,this[_0x157754(0x1b8)]=_0x27c311,this[_0x157754(0x1c8)]=_0xed5db9;const {..._0x41be85}=_0x1a1e5e({},M,this[_0x157754(0x201)]);this['_configService'][_0x157754(0x1d6)](z,_0x41be85);}[_0x5af817(0x1f2)](){const _0x4636ac=_0x5af817;[[f],[g],[S]][_0x4636ac(0x208)](_0x3a33ad=>{this['_injector']['add'](_0x3a33ad);});}[_0x5af817(0x200)](){const _0xc29a83=_0x5af817;this[_0xc29a83(0x1b8)]['get'](g),this[_0xc29a83(0x1b8)][_0xc29a83(0x1c5)](S);}};$(b,_0x5af817(0x1f8),W),$(b,_0x5af817(0x1d7),_0x175b10['UNIVER_UNKNOWN']),b=ie([_0x17566a(_0x513b47,_0x2a0745,_0x40a7c8),w(0x1,_0x1024f5(_0x500c18)),w(0x2,_0x51ffa0)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4a55(_0x3134ef,_0x1e74ce){const _0x32c137=_0x32c1();return _0x4a55=function(_0x4a551e,_0x15fbbd){_0x4a551e=_0x4a551e-0x13d;let _0x15e020=_0x32c137[_0x4a551e];return _0x15e020;},_0x4a55(_0x3134ef,_0x1e74ce);}function _0x32c1(){const _0x3c6766=['find','/edit','post','function','forEach','UniverThreadCommentUi','Solved','OpenOrReOpen','Unknown','thread-comment-data-source.config','_threadCommentDataSourceService','solved','_initUserSync','UniverProLicense','parse','get','_httpService','UniverProThreadCommentDatasource','userID','getUnit','Module','requireSession','dataSource','_userService','Edit','customRanges','Inject','/solved','map','UniverThreadCommentDataSourcePlugin','disposeWithMe','/reply','11638629XXovKI','content','setConfig','4spbUQN','@univerjs/core','Solve','filter','2838746rTaMdW','/delete','defineProperty','203090lwlAqR','userId','getMemberID','amd','comments','Injector','COMMENT','UniverCore','createTimestamp','@univerjs-pro/collaboration-client','rangeType','UniverNetwork','_sessionService','16591030scDprF','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CustomRangeType','add','merge','_threadCommentModel','UniverInstanceType','/list','threadId','@univerjs-pro/license','rangeId','@univerjs/network','getUser','Reply','Disposable','UserManagerService','_threadCommentDataSource','replies','parentId','Add','UniverThreadComment','/add','HTTPService','delete','updateComment','toStringTag','code','stringify','resolved','unitId','4999608UtzpCY','length','symbol','Delete','_configService','_commentService','replyId','size','UNIVER_UNKNOWN','dayjs','ThreadCommentModel','_injector','users','UniverProCollaborationClient','getOwnPropertyDescriptor','_config','CommentService','resolveComment','getCurrentUser','commentUpdate$','saveCommentToSnapshot','slice','user','addUser','listComments','3765503GfuAwY','Plugin','getComment','onStarting','8OwAbec','rxjs','body','@univerjs/thread-comment-ui','syncUpdateMutationToColla','comment','UniverCollaborationClientPlugin','error','root','3YADYxX','type','/universer-api/comment/unit/','_init','_initDataSource','UniverLicensePlugin','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','4452280peTFWx','deleteComment'];_0x32c1=function(){return _0x3c6766;};return _0x32c1();}(function(_0xa40a65,_0xe5b979){const _0x3dd6d9=_0x4a55,_0x3fcac4=_0xa40a65();while(!![]){try{const _0x289346=parseInt(_0x3dd6d9(0x16d))/0x1+parseInt(_0x3dd6d9(0x16a))/0x2*(parseInt(_0x3dd6d9(0x1be))/0x3)+parseInt(_0x3dd6d9(0x166))/0x4*(parseInt(_0x3dd6d9(0x141))/0x5)+-parseInt(_0x3dd6d9(0x198))/0x6+-parseInt(_0x3dd6d9(0x1b1))/0x7+parseInt(_0x3dd6d9(0x1b5))/0x8*(parseInt(_0x3dd6d9(0x163))/0x9)+-parseInt(_0x3dd6d9(0x17a))/0xa;if(_0x289346===_0xe5b979)break;else _0x3fcac4['push'](_0x3fcac4['shift']());}catch(_0xb20c9e){_0x3fcac4['push'](_0x3fcac4['shift']());}}}(_0x32c1,0xbd678),function(_0x4ae0ae,_0x19210a){const _0x5a6d80=_0x4a55;typeof exports=='object'&&typeof module<'u'?_0x19210a(exports,require(_0x5a6d80(0x176)),require(_0x5a6d80(0x183)),require(_0x5a6d80(0x167)),require(_0x5a6d80(0x1b8)),require('@univerjs/thread-comment'),require(_0x5a6d80(0x1b6)),require(_0x5a6d80(0x185))):typeof define==_0x5a6d80(0x146)&&define[_0x5a6d80(0x170)]?define(['exports',_0x5a6d80(0x176),_0x5a6d80(0x183),_0x5a6d80(0x167),_0x5a6d80(0x1b8),'@univerjs/thread-comment','rxjs','@univerjs/network'],_0x19210a):(_0x4ae0ae=typeof globalThis<'u'?globalThis:_0x4ae0ae||self,_0x19210a(_0x4ae0ae[_0x5a6d80(0x154)]={},_0x4ae0ae[_0x5a6d80(0x1a5)],_0x4ae0ae[_0x5a6d80(0x150)],_0x4ae0ae[_0x5a6d80(0x174)],_0x4ae0ae[_0x5a6d80(0x148)],_0x4ae0ae[_0x5a6d80(0x18e)],_0x4ae0ae[_0x5a6d80(0x1b6)],_0x4ae0ae[_0x5a6d80(0x178)]));}(this,function(_0x24ba54,_0x2b4b2b,_0x9c264e,_0x73a9fb,_0x246312,_0x3a25c2,_0x59bb03,_0x414b20){'use strict';const _0x157c37=_0x4a55;const _0x57d03f=_0x157c37(0x17b);var _0x42fe13=(_0x4644ea=>(_0x4644ea[_0x4644ea[_0x157c37(0x14a)]=0x0]=_0x157c37(0x14a),_0x4644ea[_0x4644ea[_0x157c37(0x149)]=0x1]='Solved',_0x4644ea[_0x4644ea[_0x157c37(0x140)]=-0x1]=_0x157c37(0x140),_0x4644ea))(_0x42fe13||{}),_0x548c16=(_0x29566d=>(_0x29566d[_0x29566d[_0x157c37(0x14b)]=0x0]='Unknown',_0x29566d[_0x29566d[_0x157c37(0x18d)]=0x1]=_0x157c37(0x18d),_0x29566d[_0x29566d[_0x157c37(0x187)]=0x2]=_0x157c37(0x187),_0x29566d[_0x29566d[_0x157c37(0x15b)]=0x3]=_0x157c37(0x15b),_0x29566d[_0x29566d[_0x157c37(0x19b)]=0x4]=_0x157c37(0x19b),_0x29566d[_0x29566d[_0x157c37(0x168)]=0x5]=_0x157c37(0x168),_0x29566d[_0x29566d[_0x157c37(0x140)]=-0x1]=_0x157c37(0x140),_0x29566d))(_0x548c16||{});const _0x2c835b=_0x13bf2b=>_0x73a9fb['dayjs'](new Date(+_0x13bf2b))['format']('YYYY/MM/DD\x20HH:mm'),_0x4157cc=async(_0x254172,_0x275cfa)=>{const _0x2f4530=_0x157c37,_0x39b69e=_0x254172['get'](_0x73a9fb[_0x2f4530(0x189)]),_0x306028=_0x254172[_0x2f4530(0x152)](_0x414b20[_0x2f4530(0x190)]);_0x275cfa[_0x2f4530(0x147)](_0x5f09dd=>{const _0x84693c=_0x2f4530;_0x39b69e[_0x84693c(0x186)](_0x5f09dd)&&_0x275cfa[_0x84693c(0x191)](_0x5f09dd);}),_0x275cfa[_0x2f4530(0x19f)]&&(await _0x306028[_0x2f4530(0x152)]('/universer-api/user/list',{'params':{'userIDs':[..._0x275cfa]}}))[_0x2f4530(0x1b7)][_0x2f4530(0x1a4)][_0x2f4530(0x147)](_0x4818cc=>{const _0x8fdf08=_0x2f4530;_0x4818cc&&_0x39b69e[_0x8fdf08(0x1af)](_0x4818cc);});};var _0x2240b2=Object[_0x157c37(0x1a6)],_0x552137=(_0xae6bc5,_0x3111df,_0x8940ce,_0x750b1a)=>{const _0x1101e2=_0x157c37;for(var _0x2e9b2f=_0x750b1a>0x1?void 0x0:_0x750b1a?_0x2240b2(_0x3111df,_0x8940ce):_0x3111df,_0x25417f=_0xae6bc5[_0x1101e2(0x199)]-0x1,_0x3f0afd;_0x25417f>=0x0;_0x25417f--)(_0x3f0afd=_0xae6bc5[_0x25417f])&&(_0x2e9b2f=_0x3f0afd(_0x2e9b2f)||_0x2e9b2f);return _0x2e9b2f;},_0x95b99c=(_0x5b6f3f,_0x290560)=>(_0x195a72,_0x41cfe2)=>_0x290560(_0x195a72,_0x41cfe2,_0x5b6f3f);let _0x47a343=class extends _0x73a9fb[_0x157c37(0x188)]{constructor(_0x3557e2,_0x40b785,_0x1d298e,_0x53a821){const _0x153d3e=_0x157c37;super(),this[_0x153d3e(0x19d)]=_0x3557e2,this['_threadCommentModel']=_0x40b785,this[_0x153d3e(0x15a)]=_0x1d298e,this['_injector']=_0x53a821,this[_0x153d3e(0x1c1)](),this['_initUserSync']();}[_0x157c37(0x14f)](){const _0x2e28c7=_0x157c37;this['disposeWithMe'](this[_0x2e28c7(0x17f)][_0x2e28c7(0x1ab)]['pipe'](_0x59bb03['bufferTime'](0x10))['subscribe'](_0xbf6074=>{const _0x5bea57=_0x2e28c7,_0x5a8128=new Set();_0xbf6074[_0x5bea57(0x147)](_0x44c8d6=>{const _0x57a8ae=_0x5bea57;switch(_0x44c8d6[_0x57a8ae(0x1bf)]){case _0x57a8ae(0x17d):{const _0x48e9b4=_0x44c8d6['payload']['personId'];_0x5a8128[_0x57a8ae(0x17d)](_0x48e9b4);break;}}}),_0x4157cc(this[_0x5bea57(0x1a3)],_0x5a8128);}));}[_0x157c37(0x1c1)](){const _0x5dc2cd=_0x157c37;this[_0x5dc2cd(0x161)](this[_0x5dc2cd(0x19d)][_0x5dc2cd(0x1ab)]['subscribe'](async _0x381664=>{const _0x464e76=_0x5dc2cd;var _0x36dce7,_0x3755d0,_0x9aad52,_0x449c1b;const _0x1e8eb7=(_0x36dce7=this['_threadCommentModel'][_0x464e76(0x156)](_0x381664[_0x464e76(0x197)])[_0x464e76(0x143)](_0x4cea49=>_0x4cea49[_0x464e76(0x182)]===_0x381664[_0x464e76(0x182)]))==null?void 0x0:_0x36dce7[_0x464e76(0x1bd)];if(!_0x1e8eb7)return;const {unitId:_0x2d7369,subUnitId:_0x19888f}=_0x1e8eb7;switch(_0x381664['user']&&this[_0x464e76(0x15a)][_0x464e76(0x1af)](_0x381664[_0x464e76(0x1ae)]),_0x381664[_0x464e76(0x1bf)]){case _0x548c16['Add']:break;case _0x548c16[_0x464e76(0x187)]:{this[_0x464e76(0x17f)]['addComment'](_0x2d7369,_0x19888f,{'unitId':_0x2d7369,'subUnitId':_0x19888f,'ref':'','id':_0x381664[_0x464e76(0x19e)],'dT':_0x2c835b(+_0x381664[_0x464e76(0x175)]),'threadId':_0x381664[_0x464e76(0x182)],'personId':(_0x9aad52=(_0x3755d0=_0x381664[_0x464e76(0x1ae)])==null?void 0x0:_0x3755d0[_0x464e76(0x155)])!=null?_0x9aad52:_0x381664[_0x464e76(0x16e)],'text':JSON[_0x464e76(0x151)](_0x381664['content']),'parentId':_0x1e8eb7['id']});break;}case _0x548c16[_0x464e76(0x19b)]:{const _0x24a1f2=this[_0x464e76(0x17f)][_0x464e76(0x1b3)](_0x2d7369,_0x19888f,_0x381664[_0x464e76(0x19e)]);_0x24a1f2&&_0x24a1f2[_0x464e76(0x18c)]&&this[_0x464e76(0x17f)]['deleteComment'](_0x2d7369,_0x19888f,_0x381664[_0x464e76(0x19e)]);break;}case _0x548c16[_0x464e76(0x15b)]:{this[_0x464e76(0x17f)]['updateComment'](_0x2d7369,_0x19888f,{'commentId':_0x381664[_0x464e76(0x19e)],'text':JSON['parse'](_0x381664[_0x464e76(0x164)])});break;}case _0x548c16[_0x464e76(0x168)]:{const _0x3a19ff=(_0x449c1b=this[_0x464e76(0x17f)][_0x464e76(0x156)](_0x381664['unitId'])[_0x464e76(0x143)](_0xf9473f=>_0xf9473f['threadId']===_0x381664[_0x464e76(0x182)]))==null?void 0x0:_0x449c1b[_0x464e76(0x1bd)];_0x3a19ff&&this[_0x464e76(0x17f)]['resolveComment'](_0x2d7369,_0x19888f,_0x3a19ff['id'],_0x381664[_0x464e76(0x14e)]===_0x42fe13[_0x464e76(0x149)]);break;}}}));}};_0x47a343=_0x552137([_0x95b99c(0x0,_0x73a9fb[_0x157c37(0x15d)](_0x2b4b2b[_0x157c37(0x1a8)])),_0x95b99c(0x1,_0x73a9fb[_0x157c37(0x15d)](_0x3a25c2[_0x157c37(0x1a2)])),_0x95b99c(0x2,_0x73a9fb[_0x157c37(0x15d)](_0x73a9fb[_0x157c37(0x189)])),_0x95b99c(0x3,_0x73a9fb[_0x157c37(0x15d)](_0x73a9fb[_0x157c37(0x172)]))],_0x47a343);const _0x510045=_0x157c37(0x14c),_0x3052ea={};var _0x5af0ca=Object[_0x157c37(0x1a6)],_0x5e173d=(_0x2fad5a,_0x3c9174,_0x3ff5a0,_0x2dc707)=>{const _0x404cd4=_0x157c37;for(var _0x1fa16a=_0x2dc707>0x1?void 0x0:_0x2dc707?_0x5af0ca(_0x3c9174,_0x3ff5a0):_0x3c9174,_0x380b1c=_0x2fad5a[_0x404cd4(0x199)]-0x1,_0x13b559;_0x380b1c>=0x0;_0x380b1c--)(_0x13b559=_0x2fad5a[_0x380b1c])&&(_0x1fa16a=_0x13b559(_0x1fa16a)||_0x1fa16a);return _0x1fa16a;},_0x2ec172=(_0x1f7503,_0x1901f)=>(_0x3ae533,_0x437370)=>_0x1901f(_0x3ae533,_0x437370,_0x1f7503);function _0x37dd0e(_0x304b62,_0x5739ab){const _0x180167=_0x157c37,_0x3dcc13=_0x304b62[_0x180167(0x18b)][0x0];return{..._0x5739ab,'id':_0x3dcc13['replyId'],'resolved':_0x304b62[_0x180167(0x14e)]===0x1,'dT':_0x2c835b(_0x3dcc13[_0x180167(0x175)]),'personId':_0x3dcc13[_0x180167(0x16e)],'threadId':_0x3dcc13[_0x180167(0x182)]};}function _0x286026(_0x3aba3f,_0x3c17a7,_0x4f26cf){const _0x2167e7=_0x157c37;var _0x53d116,_0x1f2210;if(((_0x1f2210=(_0x53d116=_0x3aba3f==null?void 0x0:_0x3aba3f[_0x2167e7(0x18b)])==null?void 0x0:_0x53d116[_0x2167e7(0x199)])!=null?_0x1f2210:0x0)>0x0){const _0x29eccb=(_0x1cb0e9,_0x12e3ff)=>({'id':_0x1cb0e9[_0x2167e7(0x19e)],'threadId':_0x1cb0e9[_0x2167e7(0x182)],'dT':_0x2c835b(_0x1cb0e9[_0x2167e7(0x175)]),'personId':_0x1cb0e9['userId'],'resolved':_0x3aba3f[_0x2167e7(0x14e)]===_0x42fe13[_0x2167e7(0x149)],'unitId':_0x3c17a7,'subUnitId':_0x4f26cf,'text':JSON[_0x2167e7(0x151)](_0x1cb0e9[_0x2167e7(0x164)]),'parentId':_0x12e3ff}),_0x8c105=_0x29eccb(_0x3aba3f[_0x2167e7(0x18b)][0x0]);return{..._0x8c105,'children':_0x3aba3f['replies'][_0x2167e7(0x1ad)](0x1)[_0x2167e7(0x15f)](_0x392c13=>_0x29eccb(_0x392c13,_0x8c105['id']))};}return null;}let _0x4df378=class{constructor(_0x4eda3e,_0x42fc37,_0x12d5a9,_0x3a12c9){const _0x4b0df5=_0x157c37;this['_httpService']=_0x4eda3e,this['_userService']=_0x42fc37,this[_0x4b0df5(0x179)]=_0x12d5a9,this[_0x4b0df5(0x1a3)]=_0x3a12c9;}async['addComment'](_0x5b857b){const _0x455824=_0x157c37;var _0x3a9bba,_0x2da241;const {parentId:_0xb3206e,unitId:_0x420431,text:_0x5d27ff,threadId:_0x442d09}=_0x5b857b,_0x1e19f6=(_0x2da241=(_0x3a9bba=_0x5d27ff['customRanges'])==null?void 0x0:_0x3a9bba[_0x455824(0x169)](_0x27ea32=>_0x27ea32[_0x455824(0x177)]===_0x73a9fb[_0x455824(0x17c)][_0x455824(0x173)])[_0x455824(0x15f)](_0x40a48f=>_0x40a48f[_0x455824(0x184)]))!=null?_0x2da241:[],_0x5de28f=JSON[_0x455824(0x195)](_0x5d27ff),_0x258c48=(await this[_0x455824(0x179)][_0x455824(0x158)](_0x420431))[_0x455824(0x16f)]();if(_0xb3206e){const _0x280698={'memberId':_0x258c48,'unitId':_0x420431,'content':_0x5de28f,'mention':_0x1e19f6,'threadId':_0x442d09},_0x31f81c=(await this[_0x455824(0x153)]['post'](_0x455824(0x1c0)+_0x420431+_0x455824(0x162),{'body':_0x280698}))[_0x455824(0x1b7)]['reply'];return{..._0x5b857b,'id':_0x31f81c['replyId'],'dT':_0x73a9fb[_0x455824(0x1a1)](+_0x31f81c[_0x455824(0x175)])['format'](_0x455824(0x13f)),'personId':_0x31f81c[_0x455824(0x16e)]};}else{const _0xba6037={'memberId':_0x258c48,'unitId':_0x420431,'content':_0x5de28f,'mention':_0x1e19f6},_0x1c432d=await this[_0x455824(0x153)][_0x455824(0x145)](_0x455824(0x1c0)+_0x420431+_0x455824(0x18f),{'body':_0xba6037});return _0x37dd0e(_0x1c432d['body'][_0x455824(0x1ba)],_0x5b857b);}}async[_0x157c37(0x192)](_0x4e4ebf){const _0x26de26=_0x157c37;var _0x44421d,_0xa84115;const {text:_0x4e1115,unitId:_0x58274b}=_0x4e4ebf,_0x3bab5f=(_0xa84115=(_0x44421d=_0x4e1115[_0x26de26(0x15c)])==null?void 0x0:_0x44421d[_0x26de26(0x169)](_0x4b9912=>_0x4b9912['rangeType']===_0x73a9fb[_0x26de26(0x17c)]['COMMENT'])[_0x26de26(0x15f)](_0x457c7a=>_0x457c7a['rangeId']))!=null?_0xa84115:[],_0x40aceb=JSON[_0x26de26(0x195)](_0x4e1115),_0x6efd04=_0x4e4ebf['threadId'],_0x2c7a97=_0x4e4ebf['id'],_0x587cc8={'memberId':(await this['_sessionService'][_0x26de26(0x158)](_0x58274b))[_0x26de26(0x16f)](),'unitId':_0x58274b,'threadId':_0x6efd04,'mention':_0x3bab5f,'content':_0x40aceb,'replyId':_0x2c7a97},_0x747d9d=await this['_httpService']['post'](_0x26de26(0x1c0)+_0x58274b+_0x26de26(0x144),{'body':_0x587cc8});return!_0x747d9d[_0x26de26(0x1b7)][_0x26de26(0x1bc)]||_0x747d9d[_0x26de26(0x1b7)][_0x26de26(0x1bc)][_0x26de26(0x194)]===0x1;}async[_0x157c37(0x1a9)](_0x5786a0){const _0x459552=_0x157c37,{unitId:_0x3bcfd3}=_0x5786a0,_0x2566af=_0x5786a0['threadId'],_0xbda9ce={'memberId':this['_userService'][_0x459552(0x1aa)]()[_0x459552(0x155)],'unitId':_0x3bcfd3,'threadId':_0x2566af,'solved':_0x5786a0[_0x459552(0x196)]?_0x42fe13[_0x459552(0x149)]:_0x42fe13[_0x459552(0x14a)]},_0xbff5ba=await this[_0x459552(0x153)][_0x459552(0x145)]('/universer-api/comment/unit/'+_0x3bcfd3+_0x459552(0x15e),{'body':_0xbda9ce});return!_0xbff5ba[_0x459552(0x1b7)]['error']||_0xbff5ba[_0x459552(0x1b7)]['error']['code']===0x1;}async[_0x157c37(0x142)](_0x214bb9,_0x4e712c,_0x4df44e,_0x14cdd6){const _0x2c0451=_0x157c37,_0x3eee05={'memberId':(await this['_sessionService'][_0x2c0451(0x158)](_0x214bb9))[_0x2c0451(0x16f)](),'threadId':_0x4df44e,'replyId':_0x14cdd6,'unitId':_0x214bb9},_0x3bee1f=await this[_0x2c0451(0x153)][_0x2c0451(0x145)]('/universer-api/comment/unit/'+_0x214bb9+_0x2c0451(0x16b),{'body':_0x3eee05});return!_0x3bee1f[_0x2c0451(0x1b7)][_0x2c0451(0x1bc)]||_0x3bee1f[_0x2c0451(0x1b7)][_0x2c0451(0x1bc)][_0x2c0451(0x194)]===0x1;}async[_0x157c37(0x1b0)](_0x430c33,_0xeeba28,_0x3fdd01){const _0x556ae7=_0x157c37,_0x1a8466={'unitId':_0x430c33,'threadId':_0x3fdd01},_0x2d72b5=await this[_0x556ae7(0x153)][_0x556ae7(0x145)](_0x556ae7(0x1c0)+_0x430c33+_0x556ae7(0x181),{'body':_0x1a8466}),_0x533def=_0x3fdd01[_0x556ae7(0x15f)](_0x2543f2=>_0x286026(_0x2d72b5[_0x556ae7(0x1b7)][_0x556ae7(0x171)][_0x2543f2],_0x430c33,_0xeeba28))['filter'](Boolean);return Object['values'](_0x2d72b5[_0x556ae7(0x1b7)]['users'])[_0x556ae7(0x147)](_0x24224b=>{const _0x35e8f5=_0x556ae7;this[_0x35e8f5(0x15a)][_0x35e8f5(0x1af)](_0x24224b);}),_0x533def;}[_0x157c37(0x1ac)](_0x194bf2){const _0x10d283=_0x157c37;return{'id':_0x194bf2['id'],'threadId':_0x194bf2[_0x10d283(0x182)],'ref':_0x194bf2['ref']};}};_0x4df378=_0x5e173d([_0x2ec172(0x0,_0x73a9fb['Inject'](_0x414b20[_0x157c37(0x190)])),_0x2ec172(0x1,_0x73a9fb[_0x157c37(0x15d)](_0x73a9fb[_0x157c37(0x189)])),_0x2ec172(0x2,_0x73a9fb[_0x157c37(0x15d)](_0x2b4b2b['CollaborationSessionService'])),_0x2ec172(0x3,_0x73a9fb[_0x157c37(0x15d)](_0x73a9fb['Injector']))],_0x4df378);var _0x3ce939=Object[_0x157c37(0x1a6)],_0x414da0=(_0x5b4b92,_0x3cf2da,_0x4ae3ee,_0x23e5c0)=>{const _0x353994=_0x157c37;for(var _0x2bdc7e=_0x23e5c0>0x1?void 0x0:_0x23e5c0?_0x3ce939(_0x3cf2da,_0x4ae3ee):_0x3cf2da,_0x46e9de=_0x5b4b92[_0x353994(0x199)]-0x1,_0x5eb9fc;_0x46e9de>=0x0;_0x46e9de--)(_0x5eb9fc=_0x5b4b92[_0x46e9de])&&(_0x2bdc7e=_0x5eb9fc(_0x2bdc7e)||_0x2bdc7e);return _0x2bdc7e;},_0x1ad8be=(_0x43fec2,_0x266d8d)=>(_0x59a400,_0x3d5967)=>_0x266d8d(_0x59a400,_0x3d5967,_0x43fec2);let _0xf9fbc2=class extends _0x73a9fb[_0x157c37(0x188)]{constructor(_0x21f388,_0x3e1be6){const _0x47f93e=_0x157c37;super(),this[_0x47f93e(0x14d)]=_0x21f388,this[_0x47f93e(0x18a)]=_0x3e1be6,this[_0x47f93e(0x13d)]();}[_0x157c37(0x13d)](){const _0xb29e01=_0x157c37;this[_0xb29e01(0x14d)][_0xb29e01(0x159)]=this[_0xb29e01(0x18a)],this[_0xb29e01(0x14d)][_0xb29e01(0x1b9)]=!0x1;}};_0xf9fbc2=_0x414da0([_0x1ad8be(0x0,_0x3a25c2['IThreadCommentDataSourceService']),_0x1ad8be(0x1,_0x73a9fb[_0x157c37(0x15d)](_0x4df378))],_0xf9fbc2);var _0x54371a=Object[_0x157c37(0x16c)],_0x114715=Object[_0x157c37(0x1a6)],_0x3ce6c3=(_0x174fe0,_0x4ab8ad,_0x1aea7d)=>_0x4ab8ad in _0x174fe0?_0x54371a(_0x174fe0,_0x4ab8ad,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1aea7d}):_0x174fe0[_0x4ab8ad]=_0x1aea7d,_0x21487c=(_0x538dde,_0x1ca66b,_0x27ced0,_0x57a644)=>{const _0x58acf8=_0x157c37;for(var _0x9201ac=_0x57a644>0x1?void 0x0:_0x57a644?_0x114715(_0x1ca66b,_0x27ced0):_0x1ca66b,_0x52e691=_0x538dde[_0x58acf8(0x199)]-0x1,_0x5b088f;_0x52e691>=0x0;_0x52e691--)(_0x5b088f=_0x538dde[_0x52e691])&&(_0x9201ac=_0x5b088f(_0x9201ac)||_0x9201ac);return _0x9201ac;},_0x3bf28b=(_0x5b8622,_0x1c9cab)=>(_0x15f3e2,_0x379497)=>_0x1c9cab(_0x15f3e2,_0x379497,_0x5b8622),_0x2e9fd0=(_0x10fd2b,_0x470afb,_0x1f211b)=>_0x3ce6c3(_0x10fd2b,typeof _0x470afb!=_0x157c37(0x19a)?_0x470afb+'':_0x470afb,_0x1f211b);_0x24ba54[_0x157c37(0x160)]=class extends _0x73a9fb[_0x157c37(0x1b2)]{constructor(_0x5bac6b=_0x3052ea,_0x19f3ac,_0x295fff){const _0x1827fb=_0x157c37;super(),this['_config']=_0x5bac6b,this[_0x1827fb(0x1a3)]=_0x19f3ac,this[_0x1827fb(0x19c)]=_0x295fff;const {..._0x845cc1}=_0x73a9fb[_0x1827fb(0x17e)]({},_0x3052ea,this[_0x1827fb(0x1a7)]);this[_0x1827fb(0x19c)][_0x1827fb(0x165)](_0x510045,_0x845cc1);}[_0x157c37(0x1b4)](){[[_0x4df378],[_0xf9fbc2],[_0x47a343]]['forEach'](_0x3727b8=>{const _0x1d26d9=_0x4a55;this[_0x1d26d9(0x1a3)][_0x1d26d9(0x17d)](_0x3727b8);});}['onReady'](){const _0x2e7ffc=_0x157c37;this[_0x2e7ffc(0x1a3)][_0x2e7ffc(0x152)](_0xf9fbc2),this['_injector'][_0x2e7ffc(0x152)](_0x47a343);}},_0x2e9fd0(_0x24ba54['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x57d03f),_0x2e9fd0(_0x24ba54['UniverThreadCommentDataSourcePlugin'],_0x157c37(0x1bf),_0x73a9fb[_0x157c37(0x180)][_0x157c37(0x1a0)]),_0x24ba54[_0x157c37(0x160)]=_0x21487c([_0x73a9fb['DependentOn'](_0x246312['UniverThreadCommentUIPlugin'],_0x2b4b2b[_0x157c37(0x1bb)],_0x9c264e[_0x157c37(0x13e)]),_0x3bf28b(0x1,_0x73a9fb['Inject'](_0x73a9fb['Injector'])),_0x3bf28b(0x2,_0x73a9fb['IConfigService'])],_0x24ba54['UniverThreadCommentDataSourcePlugin']),Object[_0x157c37(0x16c)](_0x24ba54,Symbol[_0x157c37(0x193)],{'value':_0x157c37(0x157)});}));
|
|
1
|
+
function _0x3487(){const _0x3163c0=['Disposable','disposeWithMe','Inject','COMMENT','UniverInstanceType','userID','UniverProThreadCommentDatasource','3322066cBVOte','pipe','createTimestamp','/list','content','delete','replies','Unknown','parse','@univerjs-pro/collaboration-client','type','get','_injector','function','users','getUser','unitId','_init','addComment','Add','UniverProCollaborationClient','UNRECOGNIZED','@univerjs-pro/license','UniverNetwork','deleteComment','add','UniverProLicense','552lnOzGs','syncUpdateMutationToColla','_threadCommentDataSource','UniverCore','_threadCommentDataSourceService','OpenOrReOpen','63265MeawpW','ThreadCommentModel','@univerjs/network','replyId','CollaborationSessionService','UserManagerService','filter','885768cSrkmF','Solve','solved','bufferTime','UniverThreadCommentDataSourcePlugin','resolveComment','ref','userId','format','Reply','_sessionService','map','rxjs','customRanges','commentUpdate$','35lQEKLq','HTTPService','object','/edit','63NVTcui','DependentOn','1618932NotOwv','CommentService','/solved','1781454GRKHZt','_initUserSync','requireSession','onStarting','/universer-api/user/list','Injector','@univerjs/thread-comment','IThreadCommentDataSourceService','rangeId','Edit','subscribe','_config','UniverThreadCommentUi','setConfig','toStringTag','Plugin','user','_threadCommentModel','threadId','UNIVER_UNKNOWN','_configService','UniverLicensePlugin','Solved','Module','_httpService','error','dayjs','getOwnPropertyDescriptor','/universer-api/comment/unit/','Delete','length','personId','_userService','stringify','CustomRangeType','code','getUnit','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','dataSource','exports','@univerjs/thread-comment-ui','/delete','rangeType','getMemberID','addUser','find','resolved','comment','YYYY/MM/DD\x20HH:mm','payload','_commentService','1121032XrEGoc','comments','updateComment','_initDataSource','post','body','18827260JMkbij','/add','@univerjs/core','IConfigService','saveCommentToSnapshot'];_0x3487=function(){return _0x3163c0;};return _0x3487();}function _0x1c40(_0xb18155,_0x2426f1){const _0x34878=_0x3487();return _0x1c40=function(_0x1c4017,_0x47ba14){_0x1c4017=_0x1c4017-0x1e6;let _0x283407=_0x34878[_0x1c4017];return _0x283407;},_0x1c40(_0xb18155,_0x2426f1);}(function(_0x328de8,_0x4c849d){const _0x5348e9=_0x1c40,_0x4517c6=_0x328de8();while(!![]){try{const _0x1bb978=parseInt(_0x5348e9(0x211))/0x1+-parseInt(_0x5348e9(0x1e9))/0x2+parseInt(_0x5348e9(0x226))/0x3+parseInt(_0x5348e9(0x204))/0x4*(parseInt(_0x5348e9(0x20a))/0x5)+-parseInt(_0x5348e9(0x229))/0x6*(parseInt(_0x5348e9(0x220))/0x7)+parseInt(_0x5348e9(0x25e))/0x8*(-parseInt(_0x5348e9(0x224))/0x9)+parseInt(_0x5348e9(0x264))/0xa;if(_0x1bb978===_0x4c849d)break;else _0x4517c6['push'](_0x4517c6['shift']());}catch(_0x399d1c){_0x4517c6['push'](_0x4517c6['shift']());}}}(_0x3487,0xe281b),function(_0xb5a40b,_0x2dd89a){const _0x25e210=_0x1c40;typeof exports==_0x25e210(0x222)&&typeof module<'u'?_0x2dd89a(exports,require(_0x25e210(0x1f2)),require(_0x25e210(0x1ff)),require('@univerjs/core'),require(_0x25e210(0x253)),require(_0x25e210(0x22f)),require(_0x25e210(0x21d)),require(_0x25e210(0x20c))):typeof define==_0x25e210(0x1f6)&&define['amd']?define([_0x25e210(0x252),_0x25e210(0x1f2),_0x25e210(0x1ff),_0x25e210(0x266),_0x25e210(0x253),'@univerjs/thread-comment',_0x25e210(0x21d),_0x25e210(0x20c)],_0x2dd89a):(_0xb5a40b=typeof globalThis<'u'?globalThis:_0xb5a40b||self,_0x2dd89a(_0xb5a40b[_0x25e210(0x1e8)]={},_0xb5a40b[_0x25e210(0x1fd)],_0xb5a40b[_0x25e210(0x203)],_0xb5a40b[_0x25e210(0x207)],_0xb5a40b[_0x25e210(0x235)],_0xb5a40b['UniverThreadComment'],_0xb5a40b[_0x25e210(0x21d)],_0xb5a40b[_0x25e210(0x200)]));}(this,function(_0x21899b,_0x83ca68,_0x4f112c,_0x4b52b9,_0x573dab,_0x2c735f,_0xe71d3e,_0x1aa170){'use strict';const _0x4f1928=_0x1c40;const _0x2b103d=_0x4f1928(0x24f);var _0x45bf40=(_0x158283=>(_0x158283[_0x158283[_0x4f1928(0x209)]=0x0]='OpenOrReOpen',_0x158283[_0x158283[_0x4f1928(0x23f)]=0x1]=_0x4f1928(0x23f),_0x158283[_0x158283[_0x4f1928(0x1fe)]=-0x1]=_0x4f1928(0x1fe),_0x158283))(_0x45bf40||{}),_0x519e78=(_0x17ba78=>(_0x17ba78[_0x17ba78[_0x4f1928(0x1f0)]=0x0]=_0x4f1928(0x1f0),_0x17ba78[_0x17ba78['Add']=0x1]=_0x4f1928(0x1fc),_0x17ba78[_0x17ba78[_0x4f1928(0x21a)]=0x2]='Reply',_0x17ba78[_0x17ba78[_0x4f1928(0x232)]=0x3]=_0x4f1928(0x232),_0x17ba78[_0x17ba78[_0x4f1928(0x246)]=0x4]='Delete',_0x17ba78[_0x17ba78[_0x4f1928(0x212)]=0x5]='Solve',_0x17ba78[_0x17ba78[_0x4f1928(0x1fe)]=-0x1]='UNRECOGNIZED',_0x17ba78))(_0x519e78||{});const _0x2a7f10=_0x36d0f3=>_0x4b52b9[_0x4f1928(0x243)](new Date(+_0x36d0f3))[_0x4f1928(0x219)]('YYYY/MM/DD\x20HH:mm'),_0x53230c=async(_0x343527,_0xc3c108)=>{const _0x313b0a=_0x4f1928,_0xbfac9f=_0x343527[_0x313b0a(0x1f4)](_0x4b52b9[_0x313b0a(0x20f)]),_0x34c43b=_0x343527['get'](_0x1aa170[_0x313b0a(0x221)]);_0xc3c108[_0x313b0a(0x24e)](_0xd07989=>{const _0x1a71d5=_0x313b0a;_0xbfac9f[_0x1a71d5(0x1f8)](_0xd07989)&&_0xc3c108[_0x1a71d5(0x1ee)](_0xd07989);}),_0xc3c108['size']&&(await _0x34c43b['get'](_0x313b0a(0x22d),{'params':{'userIDs':[..._0xc3c108]}}))[_0x313b0a(0x263)][_0x313b0a(0x1f7)][_0x313b0a(0x24e)](_0x23f885=>{const _0x17b2fa=_0x313b0a;_0x23f885&&_0xbfac9f[_0x17b2fa(0x257)](_0x23f885);});};var _0x5a952a=Object[_0x4f1928(0x244)],_0x1f898b=(_0x53818f,_0x4a0e4b,_0x26006b,_0x58baf7)=>{const _0x53766c=_0x4f1928;for(var _0x447679=_0x58baf7>0x1?void 0x0:_0x58baf7?_0x5a952a(_0x4a0e4b,_0x26006b):_0x4a0e4b,_0x2281de=_0x53818f[_0x53766c(0x247)]-0x1,_0x168812;_0x2281de>=0x0;_0x2281de--)(_0x168812=_0x53818f[_0x2281de])&&(_0x447679=_0x168812(_0x447679)||_0x447679);return _0x447679;},_0x55953f=(_0x1d8d2f,_0x4335a5)=>(_0x4e2867,_0x4c72e3)=>_0x4335a5(_0x4e2867,_0x4c72e3,_0x1d8d2f);let _0x3ba491=class extends _0x4b52b9[_0x4f1928(0x269)]{constructor(_0x561d26,_0x5775ed,_0xa5e5a1,_0x481091){const _0x4593ed=_0x4f1928;super(),this['_commentService']=_0x561d26,this[_0x4593ed(0x23a)]=_0x5775ed,this['_userService']=_0xa5e5a1,this[_0x4593ed(0x1f5)]=_0x481091,this['_init'](),this[_0x4593ed(0x22a)]();}[_0x4f1928(0x22a)](){const _0x5dc787=_0x4f1928;this[_0x5dc787(0x26a)](this[_0x5dc787(0x23a)]['commentUpdate$'][_0x5dc787(0x1ea)](_0xe71d3e[_0x5dc787(0x214)](0x10))[_0x5dc787(0x233)](_0x3af76e=>{const _0x5c46aa=_0x5dc787,_0x32b327=new Set();_0x3af76e['forEach'](_0x275330=>{const _0x774056=_0x1c40;switch(_0x275330['type']){case'add':{const _0xe6e794=_0x275330[_0x774056(0x25c)][_0x774056(0x248)];_0x32b327['add'](_0xe6e794);break;}}}),_0x53230c(this[_0x5c46aa(0x1f5)],_0x32b327);}));}[_0x4f1928(0x1fa)](){const _0x594ccc=_0x4f1928;this[_0x594ccc(0x26a)](this[_0x594ccc(0x25d)][_0x594ccc(0x21f)][_0x594ccc(0x233)](async _0x394bf0=>{const _0x29cd07=_0x594ccc;var _0x202136,_0xc741c9,_0x1611aa,_0x24be9a;const _0x3d5eca=(_0x202136=this[_0x29cd07(0x23a)][_0x29cd07(0x24d)](_0x394bf0[_0x29cd07(0x1f9)])[_0x29cd07(0x258)](_0x1a6163=>_0x1a6163[_0x29cd07(0x23b)]===_0x394bf0[_0x29cd07(0x23b)]))==null?void 0x0:_0x202136['root'];if(!_0x3d5eca)return;const {unitId:_0x461af1,subUnitId:_0xab02a9}=_0x3d5eca;switch(_0x394bf0[_0x29cd07(0x239)]&&this[_0x29cd07(0x249)][_0x29cd07(0x257)](_0x394bf0[_0x29cd07(0x239)]),_0x394bf0['type']){case _0x519e78[_0x29cd07(0x1fc)]:break;case _0x519e78[_0x29cd07(0x21a)]:{this['_threadCommentModel']['addComment'](_0x461af1,_0xab02a9,{'unitId':_0x461af1,'subUnitId':_0xab02a9,'ref':'','id':_0x394bf0[_0x29cd07(0x20d)],'dT':_0x2a7f10(+_0x394bf0[_0x29cd07(0x1eb)]),'threadId':_0x394bf0['threadId'],'personId':(_0x1611aa=(_0xc741c9=_0x394bf0[_0x29cd07(0x239)])==null?void 0x0:_0xc741c9[_0x29cd07(0x1e7)])!=null?_0x1611aa:_0x394bf0[_0x29cd07(0x218)],'text':JSON[_0x29cd07(0x1f1)](_0x394bf0['content']),'parentId':_0x3d5eca['id']});break;}case _0x519e78[_0x29cd07(0x246)]:{const _0x4c1501=this[_0x29cd07(0x23a)]['getComment'](_0x461af1,_0xab02a9,_0x394bf0[_0x29cd07(0x20d)]);_0x4c1501&&_0x4c1501['parentId']&&this[_0x29cd07(0x23a)][_0x29cd07(0x201)](_0x461af1,_0xab02a9,_0x394bf0[_0x29cd07(0x20d)]);break;}case _0x519e78[_0x29cd07(0x232)]:{this[_0x29cd07(0x23a)][_0x29cd07(0x260)](_0x461af1,_0xab02a9,{'commentId':_0x394bf0[_0x29cd07(0x20d)],'text':JSON[_0x29cd07(0x1f1)](_0x394bf0[_0x29cd07(0x1ed)])});break;}case _0x519e78[_0x29cd07(0x212)]:{const _0x1deec4=(_0x24be9a=this['_threadCommentModel']['getUnit'](_0x394bf0[_0x29cd07(0x1f9)])['find'](_0x109925=>_0x109925[_0x29cd07(0x23b)]===_0x394bf0[_0x29cd07(0x23b)]))==null?void 0x0:_0x24be9a['root'];_0x1deec4&&this[_0x29cd07(0x23a)][_0x29cd07(0x216)](_0x461af1,_0xab02a9,_0x1deec4['id'],_0x394bf0[_0x29cd07(0x213)]===_0x45bf40[_0x29cd07(0x23f)]);break;}}}));}};_0x3ba491=_0x1f898b([_0x55953f(0x0,_0x4b52b9[_0x4f1928(0x26b)](_0x83ca68[_0x4f1928(0x227)])),_0x55953f(0x1,_0x4b52b9[_0x4f1928(0x26b)](_0x2c735f[_0x4f1928(0x20b)])),_0x55953f(0x2,_0x4b52b9[_0x4f1928(0x26b)](_0x4b52b9[_0x4f1928(0x20f)])),_0x55953f(0x3,_0x4b52b9['Inject'](_0x4b52b9[_0x4f1928(0x22e)]))],_0x3ba491);const _0x3a0c95='thread-comment-data-source.config',_0x579913={};var _0x8b7eb5=Object[_0x4f1928(0x244)],_0x4f7e4d=(_0x443d3f,_0x100040,_0x659cc0,_0x38f699)=>{const _0x4bfad7=_0x4f1928;for(var _0x2dba2b=_0x38f699>0x1?void 0x0:_0x38f699?_0x8b7eb5(_0x100040,_0x659cc0):_0x100040,_0x4df26d=_0x443d3f[_0x4bfad7(0x247)]-0x1,_0x2d83eb;_0x4df26d>=0x0;_0x4df26d--)(_0x2d83eb=_0x443d3f[_0x4df26d])&&(_0x2dba2b=_0x2d83eb(_0x2dba2b)||_0x2dba2b);return _0x2dba2b;},_0x364744=(_0x2444d5,_0x366597)=>(_0x1fb914,_0x537a73)=>_0x366597(_0x1fb914,_0x537a73,_0x2444d5);function _0x4af0b4(_0x2fcd28,_0x1b107b){const _0x5709cd=_0x4f1928,_0x3c52c5=_0x2fcd28['replies'][0x0];return{..._0x1b107b,'id':_0x3c52c5[_0x5709cd(0x20d)],'resolved':_0x2fcd28[_0x5709cd(0x213)]===0x1,'dT':_0x2a7f10(_0x3c52c5[_0x5709cd(0x1eb)]),'personId':_0x3c52c5[_0x5709cd(0x218)],'threadId':_0x3c52c5[_0x5709cd(0x23b)]};}function _0x368d2f(_0x374488,_0x4e2c40,_0x41ccde){const _0x1a3881=_0x4f1928;var _0x3586c7,_0x46f883;if(((_0x46f883=(_0x3586c7=_0x374488==null?void 0x0:_0x374488[_0x1a3881(0x1ef)])==null?void 0x0:_0x3586c7['length'])!=null?_0x46f883:0x0)>0x0){const _0x364c1=(_0x5d155c,_0x1b4aa8)=>({'id':_0x5d155c[_0x1a3881(0x20d)],'threadId':_0x5d155c[_0x1a3881(0x23b)],'dT':_0x2a7f10(_0x5d155c[_0x1a3881(0x1eb)]),'personId':_0x5d155c[_0x1a3881(0x218)],'resolved':_0x374488['solved']===_0x45bf40['Solved'],'unitId':_0x4e2c40,'subUnitId':_0x41ccde,'text':JSON[_0x1a3881(0x1f1)](_0x5d155c[_0x1a3881(0x1ed)]),'parentId':_0x1b4aa8}),_0x30a47b=_0x364c1(_0x374488[_0x1a3881(0x1ef)][0x0]);return{..._0x30a47b,'children':_0x374488[_0x1a3881(0x1ef)]['slice'](0x1)[_0x1a3881(0x21c)](_0x4bb9f3=>_0x364c1(_0x4bb9f3,_0x30a47b['id']))};}return null;}let _0x2ffaf1=class{constructor(_0x5838cf,_0x414a58,_0xda22a1,_0x28d5d6){const _0x7add01=_0x4f1928;this[_0x7add01(0x241)]=_0x5838cf,this['_userService']=_0x414a58,this[_0x7add01(0x21b)]=_0xda22a1,this[_0x7add01(0x1f5)]=_0x28d5d6;}async[_0x4f1928(0x1fb)](_0x516b41){const _0x32b555=_0x4f1928;var _0x1a0463,_0x4d4921;const {parentId:_0x1ac395,unitId:_0x181067,text:_0x357cca,threadId:_0x2fa1a8}=_0x516b41,_0x12dea8=(_0x4d4921=(_0x1a0463=_0x357cca[_0x32b555(0x21e)])==null?void 0x0:_0x1a0463[_0x32b555(0x210)](_0x556e3c=>_0x556e3c[_0x32b555(0x255)]===_0x4b52b9['CustomRangeType'][_0x32b555(0x26c)])[_0x32b555(0x21c)](_0x317392=>_0x317392[_0x32b555(0x231)]))!=null?_0x4d4921:[],_0x4fa72c=JSON[_0x32b555(0x24a)](_0x357cca),_0x16d0b0=(await this['_sessionService'][_0x32b555(0x22b)](_0x181067))[_0x32b555(0x256)]();if(_0x1ac395){const _0x4c782f={'memberId':_0x16d0b0,'unitId':_0x181067,'content':_0x4fa72c,'mention':_0x12dea8,'threadId':_0x2fa1a8},_0x15aabb=(await this[_0x32b555(0x241)][_0x32b555(0x262)](_0x32b555(0x245)+_0x181067+'/reply',{'body':_0x4c782f}))[_0x32b555(0x263)]['reply'];return{..._0x516b41,'id':_0x15aabb['replyId'],'dT':_0x4b52b9[_0x32b555(0x243)](+_0x15aabb[_0x32b555(0x1eb)])[_0x32b555(0x219)](_0x32b555(0x25b)),'personId':_0x15aabb['userId']};}else{const _0x4c16b5={'memberId':_0x16d0b0,'unitId':_0x181067,'content':_0x4fa72c,'mention':_0x12dea8},_0x226818=await this[_0x32b555(0x241)]['post']('/universer-api/comment/unit/'+_0x181067+_0x32b555(0x265),{'body':_0x4c16b5});return _0x4af0b4(_0x226818[_0x32b555(0x263)][_0x32b555(0x25a)],_0x516b41);}}async[_0x4f1928(0x260)](_0x4c9ba0){const _0x168b1a=_0x4f1928;var _0x13f2af,_0x679827;const {text:_0x3e96db,unitId:_0x4d5599}=_0x4c9ba0,_0x24fb22=(_0x679827=(_0x13f2af=_0x3e96db['customRanges'])==null?void 0x0:_0x13f2af[_0x168b1a(0x210)](_0x188c9d=>_0x188c9d[_0x168b1a(0x255)]===_0x4b52b9[_0x168b1a(0x24b)][_0x168b1a(0x26c)])[_0x168b1a(0x21c)](_0x1d8eb=>_0x1d8eb[_0x168b1a(0x231)]))!=null?_0x679827:[],_0x3bb01a=JSON[_0x168b1a(0x24a)](_0x3e96db),_0x2891c8=_0x4c9ba0[_0x168b1a(0x23b)],_0x32a917=_0x4c9ba0['id'],_0x1513c3={'memberId':(await this[_0x168b1a(0x21b)][_0x168b1a(0x22b)](_0x4d5599))[_0x168b1a(0x256)](),'unitId':_0x4d5599,'threadId':_0x2891c8,'mention':_0x24fb22,'content':_0x3bb01a,'replyId':_0x32a917},_0x4518b0=await this[_0x168b1a(0x241)][_0x168b1a(0x262)](_0x168b1a(0x245)+_0x4d5599+_0x168b1a(0x223),{'body':_0x1513c3});return!_0x4518b0[_0x168b1a(0x263)][_0x168b1a(0x242)]||_0x4518b0['body']['error'][_0x168b1a(0x24c)]===0x1;}async[_0x4f1928(0x216)](_0x2dfc20){const _0x5ba600=_0x4f1928,{unitId:_0x165a20}=_0x2dfc20,_0x3fa8b5=_0x2dfc20['threadId'],_0x3a0268={'memberId':this[_0x5ba600(0x249)]['getCurrentUser']()['userID'],'unitId':_0x165a20,'threadId':_0x3fa8b5,'solved':_0x2dfc20[_0x5ba600(0x259)]?_0x45bf40[_0x5ba600(0x23f)]:_0x45bf40[_0x5ba600(0x209)]},_0x2d890=await this['_httpService'][_0x5ba600(0x262)](_0x5ba600(0x245)+_0x165a20+_0x5ba600(0x228),{'body':_0x3a0268});return!_0x2d890[_0x5ba600(0x263)]['error']||_0x2d890[_0x5ba600(0x263)][_0x5ba600(0x242)][_0x5ba600(0x24c)]===0x1;}async[_0x4f1928(0x201)](_0x4cb890,_0x4f288b,_0x23a3c4,_0x41bf13){const _0x4a8570=_0x4f1928,_0x1dee95={'memberId':(await this['_sessionService']['requireSession'](_0x4cb890))[_0x4a8570(0x256)](),'threadId':_0x23a3c4,'replyId':_0x41bf13,'unitId':_0x4cb890},_0x535fc2=await this[_0x4a8570(0x241)][_0x4a8570(0x262)](_0x4a8570(0x245)+_0x4cb890+_0x4a8570(0x254),{'body':_0x1dee95});return!_0x535fc2[_0x4a8570(0x263)][_0x4a8570(0x242)]||_0x535fc2[_0x4a8570(0x263)]['error'][_0x4a8570(0x24c)]===0x1;}async['listComments'](_0x2b962a,_0x6ef4ef,_0x3aeca1){const _0x28981d=_0x4f1928,_0x463a16={'unitId':_0x2b962a,'threadId':_0x3aeca1},_0x1baee2=await this[_0x28981d(0x241)][_0x28981d(0x262)]('/universer-api/comment/unit/'+_0x2b962a+_0x28981d(0x1ec),{'body':_0x463a16}),_0x233572=_0x3aeca1[_0x28981d(0x21c)](_0x3bceb5=>_0x368d2f(_0x1baee2['body'][_0x28981d(0x25f)][_0x3bceb5],_0x2b962a,_0x6ef4ef))[_0x28981d(0x210)](Boolean);return Object['values'](_0x1baee2['body'][_0x28981d(0x1f7)])['forEach'](_0x5bfcb6=>{const _0x5a5533=_0x28981d;this[_0x5a5533(0x249)]['addUser'](_0x5bfcb6);}),_0x233572;}[_0x4f1928(0x268)](_0x32fc64){const _0x3b738b=_0x4f1928;return{'id':_0x32fc64['id'],'threadId':_0x32fc64['threadId'],'ref':_0x32fc64[_0x3b738b(0x217)]};}};_0x2ffaf1=_0x4f7e4d([_0x364744(0x0,_0x4b52b9[_0x4f1928(0x26b)](_0x1aa170[_0x4f1928(0x221)])),_0x364744(0x1,_0x4b52b9[_0x4f1928(0x26b)](_0x4b52b9[_0x4f1928(0x20f)])),_0x364744(0x2,_0x4b52b9['Inject'](_0x83ca68[_0x4f1928(0x20e)])),_0x364744(0x3,_0x4b52b9[_0x4f1928(0x26b)](_0x4b52b9[_0x4f1928(0x22e)]))],_0x2ffaf1);var _0x3060a5=Object[_0x4f1928(0x244)],_0x33f9fe=(_0x41e35f,_0x5bf352,_0x383b5b,_0x1ef93d)=>{const _0x42d8bf=_0x4f1928;for(var _0x277e38=_0x1ef93d>0x1?void 0x0:_0x1ef93d?_0x3060a5(_0x5bf352,_0x383b5b):_0x5bf352,_0x520994=_0x41e35f[_0x42d8bf(0x247)]-0x1,_0x5c92fe;_0x520994>=0x0;_0x520994--)(_0x5c92fe=_0x41e35f[_0x520994])&&(_0x277e38=_0x5c92fe(_0x277e38)||_0x277e38);return _0x277e38;},_0x4123e1=(_0x58bf51,_0x332ef6)=>(_0x595241,_0x253983)=>_0x332ef6(_0x595241,_0x253983,_0x58bf51);let _0x2e91ed=class extends _0x4b52b9[_0x4f1928(0x269)]{constructor(_0x39cf27,_0x2f067f){const _0x300524=_0x4f1928;super(),this['_threadCommentDataSourceService']=_0x39cf27,this[_0x300524(0x206)]=_0x2f067f,this[_0x300524(0x261)]();}[_0x4f1928(0x261)](){const _0x193773=_0x4f1928;this[_0x193773(0x208)][_0x193773(0x251)]=this['_threadCommentDataSource'],this[_0x193773(0x208)][_0x193773(0x205)]=!0x1;}};_0x2e91ed=_0x33f9fe([_0x4123e1(0x0,_0x2c735f[_0x4f1928(0x230)]),_0x4123e1(0x1,_0x4b52b9[_0x4f1928(0x26b)](_0x2ffaf1))],_0x2e91ed);var _0x2b67d5=Object['defineProperty'],_0x518bd9=Object['getOwnPropertyDescriptor'],_0x516d46=(_0x45829b,_0x52e461,_0x48f3cb)=>_0x52e461 in _0x45829b?_0x2b67d5(_0x45829b,_0x52e461,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x48f3cb}):_0x45829b[_0x52e461]=_0x48f3cb,_0x25a3b2=(_0xda98de,_0x52bbdf,_0x2485df,_0x1e2b0e)=>{const _0x23a33c=_0x4f1928;for(var _0x98c622=_0x1e2b0e>0x1?void 0x0:_0x1e2b0e?_0x518bd9(_0x52bbdf,_0x2485df):_0x52bbdf,_0x379ff8=_0xda98de[_0x23a33c(0x247)]-0x1,_0x3f3baa;_0x379ff8>=0x0;_0x379ff8--)(_0x3f3baa=_0xda98de[_0x379ff8])&&(_0x98c622=_0x3f3baa(_0x98c622)||_0x98c622);return _0x98c622;},_0x19f10e=(_0x4a8cc1,_0x5e6f9d)=>(_0x342257,_0x21fe12)=>_0x5e6f9d(_0x342257,_0x21fe12,_0x4a8cc1),_0x2db56a=(_0xb1d47f,_0x2a40ff,_0x468f99)=>_0x516d46(_0xb1d47f,typeof _0x2a40ff!='symbol'?_0x2a40ff+'':_0x2a40ff,_0x468f99);_0x21899b[_0x4f1928(0x215)]=class extends _0x4b52b9[_0x4f1928(0x238)]{constructor(_0xa69be9=_0x579913,_0x109f99,_0x2af70d){const _0x116912=_0x4f1928;super(),this[_0x116912(0x234)]=_0xa69be9,this[_0x116912(0x1f5)]=_0x109f99,this[_0x116912(0x23d)]=_0x2af70d;const {..._0x3ecf7b}=_0x4b52b9['merge']({},_0x579913,this[_0x116912(0x234)]);this['_configService'][_0x116912(0x236)](_0x3a0c95,_0x3ecf7b);}[_0x4f1928(0x22c)](){[[_0x2ffaf1],[_0x2e91ed],[_0x3ba491]]['forEach'](_0x145de4=>{const _0x3341fd=_0x1c40;this[_0x3341fd(0x1f5)][_0x3341fd(0x202)](_0x145de4);});}['onReady'](){const _0x13d1bc=_0x4f1928;this[_0x13d1bc(0x1f5)][_0x13d1bc(0x1f4)](_0x2e91ed),this['_injector'][_0x13d1bc(0x1f4)](_0x3ba491);}},_0x2db56a(_0x21899b['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x2b103d),_0x2db56a(_0x21899b[_0x4f1928(0x215)],_0x4f1928(0x1f3),_0x4b52b9[_0x4f1928(0x1e6)][_0x4f1928(0x23c)]),_0x21899b[_0x4f1928(0x215)]=_0x25a3b2([_0x4b52b9[_0x4f1928(0x225)](_0x573dab['UniverThreadCommentUIPlugin'],_0x83ca68['UniverCollaborationClientPlugin'],_0x4f112c[_0x4f1928(0x23e)]),_0x19f10e(0x1,_0x4b52b9['Inject'](_0x4b52b9[_0x4f1928(0x22e)])),_0x19f10e(0x2,_0x4b52b9[_0x4f1928(0x267)])],_0x21899b[_0x4f1928(0x215)]),Object[_0x4f1928(0x250)](_0x21899b,Symbol[_0x4f1928(0x237)],{'value':_0x4f1928(0x240)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.6.
|
|
49
|
-
"@univerjs-pro/license": "0.6.
|
|
50
|
-
"@univerjs/core": "0.6.
|
|
51
|
-
"@univerjs/network": "0.6.
|
|
52
|
-
"@univerjs/thread-comment": "0.6.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.9",
|
|
49
|
+
"@univerjs-pro/license": "0.6.9",
|
|
50
|
+
"@univerjs/core": "0.6.9",
|
|
51
|
+
"@univerjs/network": "0.6.9",
|
|
52
|
+
"@univerjs/thread-comment": "0.6.9",
|
|
53
53
|
"@univerjs/protocol": "0.1.45",
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.6.
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.6.9"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
58
|
"typescript": "^5.8.2",
|
|
59
59
|
"vite": "^6.2.2",
|
|
60
60
|
"vitest": "^3.0.9",
|
|
61
|
-
"@univerjs-infra/shared": "0.6.
|
|
61
|
+
"@univerjs-infra/shared": "0.6.9"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|