@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505101606 → 0.7.0-nightly.202505111606

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x3478b9=_0x8a9a;(function(_0x3026bd,_0x2c0299){const _0x2f6fb9=_0x8a9a,_0x22065d=_0x3026bd();while(!![]){try{const _0x519c03=parseInt(_0x2f6fb9(0x19e))/0x1*(parseInt(_0x2f6fb9(0x1e9))/0x2)+parseInt(_0x2f6fb9(0x1a8))/0x3+-parseInt(_0x2f6fb9(0x1c5))/0x4*(-parseInt(_0x2f6fb9(0x17b))/0x5)+-parseInt(_0x2f6fb9(0x16e))/0x6+-parseInt(_0x2f6fb9(0x177))/0x7+parseInt(_0x2f6fb9(0x189))/0x8+-parseInt(_0x2f6fb9(0x1c0))/0x9*(-parseInt(_0x2f6fb9(0x1e0))/0xa);if(_0x519c03===_0x2c0299)break;else _0x22065d['push'](_0x22065d['shift']());}catch(_0x3393ee){_0x22065d['push'](_0x22065d['shift']());}}}(_0x8019,0xeda54));Object[_0x3478b9(0x1c4)](exports,Symbol[_0x3478b9(0x1da)],{'value':_0x3478b9(0x1c6)});const b=require(_0x3478b9(0x181)),T=require(_0x3478b9(0x1a2)),c=require(_0x3478b9(0x18f)),j=require(_0x3478b9(0x180)),M=require('@univerjs/thread-comment'),w=require(_0x3478b9(0x182)),P=require(_0x3478b9(0x1b9)),U=_0x3478b9(0x173);var I=(_0x3e63f0=>(_0x3e63f0[_0x3e63f0[_0x3478b9(0x1b7)]=0x0]=_0x3478b9(0x1b7),_0x3e63f0[_0x3e63f0[_0x3478b9(0x196)]=0x1]=_0x3478b9(0x196),_0x3e63f0[_0x3e63f0[_0x3478b9(0x195)]=-0x1]=_0x3478b9(0x195),_0x3e63f0))(I||{}),v=(_0x77330d=>(_0x77330d[_0x77330d[_0x3478b9(0x1df)]=0x0]=_0x3478b9(0x1df),_0x77330d[_0x77330d[_0x3478b9(0x170)]=0x1]='Add',_0x77330d[_0x77330d[_0x3478b9(0x1c7)]=0x2]=_0x3478b9(0x1c7),_0x77330d[_0x77330d[_0x3478b9(0x1d8)]=0x3]=_0x3478b9(0x1d8),_0x77330d[_0x77330d[_0x3478b9(0x1ce)]=0x4]=_0x3478b9(0x1ce),_0x77330d[_0x77330d[_0x3478b9(0x1a9)]=0x5]=_0x3478b9(0x1a9),_0x77330d[_0x77330d[_0x3478b9(0x195)]=-0x1]=_0x3478b9(0x195),_0x77330d))(v||{});const f=_0x22b919=>c[_0x3478b9(0x1bf)](new Date(+_0x22b919))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x5e324d,_0x212912)=>{const _0x46950a=_0x3478b9,_0x11149c=_0x5e324d[_0x46950a(0x187)](c['UserManagerService']),_0x4c1a9a=_0x5e324d[_0x46950a(0x187)](P[_0x46950a(0x19d)]);_0x212912[_0x46950a(0x174)](_0x35e1a7=>{const _0x51e679=_0x46950a;_0x11149c[_0x51e679(0x1d4)](_0x35e1a7)&&_0x212912[_0x51e679(0x1e4)](_0x35e1a7);}),_0x212912[_0x46950a(0x1b3)]&&(await _0x4c1a9a['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x212912]}}))[_0x46950a(0x1ad)][_0x46950a(0x16f)][_0x46950a(0x174)](_0xc21689=>{_0xc21689&&_0x11149c['addUser'](_0xc21689);});};function _0x8a9a(_0x44ef8c,_0x3bf356){const _0x80190=_0x8019();return _0x8a9a=function(_0x8a9aa1,_0x343b89){_0x8a9aa1=_0x8a9aa1-0x16d;let _0x29c6a9=_0x80190[_0x8a9aa1];return _0x29c6a9;},_0x8a9a(_0x44ef8c,_0x3bf356);}var $=Object[_0x3478b9(0x1af)],E=(_0x28f6d7,_0x513959,_0x1c2a4a,_0x967956)=>{for(var _0x23e45f=_0x967956>0x1?void 0x0:_0x967956?$(_0x513959,_0x1c2a4a):_0x513959,_0x3b8993=_0x28f6d7['length']-0x1,_0x3e223e;_0x3b8993>=0x0;_0x3b8993--)(_0x3e223e=_0x28f6d7[_0x3b8993])&&(_0x23e45f=_0x3e223e(_0x23e45f)||_0x23e45f);return _0x23e45f;},S=(_0x1c8fe5,_0x593feb)=>(_0x87453e,_0x399d94)=>_0x593feb(_0x87453e,_0x399d94,_0x1c8fe5);let p=class extends c[_0x3478b9(0x191)]{constructor(_0x219c72,_0x2f5baf,_0x5ee0df,_0x5c76c7){const _0x23f1a7=_0x3478b9;super(),this[_0x23f1a7(0x1cd)]=_0x219c72,this['_threadCommentModel']=_0x2f5baf,this[_0x23f1a7(0x1a1)]=_0x5ee0df,this[_0x23f1a7(0x1ba)]=_0x5c76c7,this[_0x23f1a7(0x18e)](),this['_initUserSync']();}[_0x3478b9(0x1d7)](){const _0x2aca22=_0x3478b9;this['disposeWithMe'](this[_0x2aca22(0x1e5)][_0x2aca22(0x188)][_0x2aca22(0x1e1)](w[_0x2aca22(0x1ae)](0x10))['subscribe'](_0x5bae9e=>{const _0x2bbddc=_0x2aca22,_0x2ad42=new Set();_0x5bae9e['forEach'](_0x5e232b=>{const _0x149ecf=_0x8a9a;switch(_0x5e232b[_0x149ecf(0x178)]){case'add':{const _0x4eb01e=_0x5e232b['payload']['personId'];_0x2ad42[_0x149ecf(0x179)](_0x4eb01e);break;}}}),R(this[_0x2bbddc(0x1ba)],_0x2ad42);}));}[_0x3478b9(0x18e)](){const _0x2ba9d8=_0x3478b9;this[_0x2ba9d8(0x1ed)](this[_0x2ba9d8(0x1cd)][_0x2ba9d8(0x188)][_0x2ba9d8(0x199)](async _0x2b0d89=>{const _0x5cd72f=_0x2ba9d8;var _0x3a4ce5,_0x58837e,_0x32db6b,_0x4a7949;const _0x58869b=(_0x3a4ce5=this[_0x5cd72f(0x1e5)][_0x5cd72f(0x1b5)](_0x2b0d89[_0x5cd72f(0x1ca)])[_0x5cd72f(0x1dd)](_0x4a65a0=>_0x4a65a0[_0x5cd72f(0x184)]===_0x2b0d89['threadId']))==null?void 0x0:_0x3a4ce5[_0x5cd72f(0x18d)];if(!_0x58869b)return;const {unitId:_0x342ef4,subUnitId:_0xdc78a9}=_0x58869b;switch(_0x2b0d89['user']&&this['_userService'][_0x5cd72f(0x175)](_0x2b0d89[_0x5cd72f(0x1db)]),_0x2b0d89[_0x5cd72f(0x178)]){case v[_0x5cd72f(0x170)]:break;case v[_0x5cd72f(0x1c7)]:{this[_0x5cd72f(0x1e5)][_0x5cd72f(0x1c8)](_0x342ef4,_0xdc78a9,{'unitId':_0x342ef4,'subUnitId':_0xdc78a9,'ref':'','id':_0x2b0d89[_0x5cd72f(0x171)],'dT':f(+_0x2b0d89[_0x5cd72f(0x1aa)]),'threadId':_0x2b0d89[_0x5cd72f(0x184)],'personId':(_0x32db6b=(_0x58837e=_0x2b0d89[_0x5cd72f(0x1db)])==null?void 0x0:_0x58837e[_0x5cd72f(0x1e8)])!=null?_0x32db6b:_0x2b0d89[_0x5cd72f(0x1d1)],'text':JSON[_0x5cd72f(0x1eb)](_0x2b0d89[_0x5cd72f(0x176)]),'parentId':_0x58869b['id']});break;}case v[_0x5cd72f(0x1ce)]:{const _0x2d85f3=this[_0x5cd72f(0x1e5)][_0x5cd72f(0x1cb)](_0x342ef4,_0xdc78a9,_0x2b0d89[_0x5cd72f(0x171)]);_0x2d85f3&&_0x2d85f3[_0x5cd72f(0x16d)]&&this[_0x5cd72f(0x1e5)]['deleteComment'](_0x342ef4,_0xdc78a9,_0x2b0d89[_0x5cd72f(0x171)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x5cd72f(0x1d9)](_0x342ef4,_0xdc78a9,{'commentId':_0x2b0d89[_0x5cd72f(0x171)],'text':JSON[_0x5cd72f(0x1eb)](_0x2b0d89[_0x5cd72f(0x176)])});break;}case v[_0x5cd72f(0x1a9)]:{const _0x36b727=(_0x4a7949=this[_0x5cd72f(0x1e5)][_0x5cd72f(0x1b5)](_0x2b0d89[_0x5cd72f(0x1ca)])[_0x5cd72f(0x1dd)](_0x518ddd=>_0x518ddd['threadId']===_0x2b0d89[_0x5cd72f(0x184)]))==null?void 0x0:_0x4a7949[_0x5cd72f(0x18d)];_0x36b727&&this[_0x5cd72f(0x1e5)][_0x5cd72f(0x1d2)](_0x342ef4,_0xdc78a9,_0x36b727['id'],_0x2b0d89[_0x5cd72f(0x1c9)]===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x3478b9(0x1e7)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x3478b9(0x1b0)])),S(0x3,c[_0x3478b9(0x1a5)](c[_0x3478b9(0x1ec)]))],p);const q=_0x3478b9(0x1de),D={};var A=Object[_0x3478b9(0x1af)],x=(_0x520a53,_0x3a7bce,_0x30f83e,_0xc4fed1)=>{const _0x5340e5=_0x3478b9;for(var _0x59ba07=_0xc4fed1>0x1?void 0x0:_0xc4fed1?A(_0x3a7bce,_0x30f83e):_0x3a7bce,_0x39e542=_0x520a53[_0x5340e5(0x1a4)]-0x1,_0x4807e3;_0x39e542>=0x0;_0x39e542--)(_0x4807e3=_0x520a53[_0x39e542])&&(_0x59ba07=_0x4807e3(_0x59ba07)||_0x59ba07);return _0x59ba07;},_=(_0x3e01a0,_0x5b6758)=>(_0x255259,_0x3fb10a)=>_0x5b6758(_0x255259,_0x3fb10a,_0x3e01a0);function Y(_0x101e64,_0x22d75c){const _0x489838=_0x3478b9,_0x4309f7=_0x101e64[_0x489838(0x1be)][0x0];return{..._0x22d75c,'id':_0x4309f7[_0x489838(0x171)],'resolved':_0x101e64[_0x489838(0x1c9)]===0x1,'dT':f(_0x4309f7['createTimestamp']),'personId':_0x4309f7[_0x489838(0x1d1)],'threadId':_0x4309f7['threadId']};}function G(_0x20605d,_0x44c58b,_0x1587ae){const _0x4cd102=_0x3478b9;var _0x2d0568,_0x285bd8;if(((_0x285bd8=(_0x2d0568=_0x20605d==null?void 0x0:_0x20605d[_0x4cd102(0x1be)])==null?void 0x0:_0x2d0568[_0x4cd102(0x1a4)])!=null?_0x285bd8:0x0)>0x0){const _0x224fcc=(_0x4c77d0,_0x41d7ca)=>({'id':_0x4c77d0['replyId'],'threadId':_0x4c77d0[_0x4cd102(0x184)],'dT':f(_0x4c77d0['createTimestamp']),'personId':_0x4c77d0['userId'],'resolved':_0x20605d[_0x4cd102(0x1c9)]===I['Solved'],'unitId':_0x44c58b,'subUnitId':_0x1587ae,'text':JSON[_0x4cd102(0x1eb)](_0x4c77d0[_0x4cd102(0x176)]),'parentId':_0x41d7ca}),_0x4072be=_0x224fcc(_0x20605d['replies'][0x0]);return{..._0x4072be,'children':_0x20605d[_0x4cd102(0x1be)][_0x4cd102(0x1d0)](0x1)[_0x4cd102(0x1bc)](_0x4f7233=>_0x224fcc(_0x4f7233,_0x4072be['id']))};}return null;}let g=class{constructor(_0x1da2e6,_0x6aed5c,_0x312703,_0x3024c9){const _0x411eef=_0x3478b9;this['_httpService']=_0x1da2e6,this[_0x411eef(0x1a1)]=_0x6aed5c,this[_0x411eef(0x193)]=_0x312703,this[_0x411eef(0x1ba)]=_0x3024c9;}async['addComment'](_0x1d04d9){const _0x1a40a1=_0x3478b9;var _0x1973f2,_0xab018b;const {parentId:_0x3847fc,unitId:_0x5c7a54,text:_0x4b6991,threadId:_0x1b451a}=_0x1d04d9,_0x13b4d9=(_0xab018b=(_0x1973f2=_0x4b6991[_0x1a40a1(0x197)])==null?void 0x0:_0x1973f2['filter'](_0xdedc67=>_0xdedc67['rangeType']===c['CustomRangeType']['COMMENT'])[_0x1a40a1(0x1bc)](_0x3d6d9f=>_0x3d6d9f[_0x1a40a1(0x1e2)]))!=null?_0xab018b:[],_0x5b06aa=JSON[_0x1a40a1(0x1b1)](_0x4b6991),_0x1995b4=(await this[_0x1a40a1(0x193)][_0x1a40a1(0x1ee)](_0x5c7a54))[_0x1a40a1(0x18a)]();if(_0x3847fc){const _0x7c5c49={'memberId':_0x1995b4,'unitId':_0x5c7a54,'content':_0x5b06aa,'mention':_0x13b4d9,'threadId':_0x1b451a},_0x34c41=(await this[_0x1a40a1(0x19c)]['post'](_0x1a40a1(0x1b6)+_0x5c7a54+_0x1a40a1(0x1e6),{'body':_0x7c5c49}))['body'][_0x1a40a1(0x1dc)];return{..._0x1d04d9,'id':_0x34c41[_0x1a40a1(0x171)],'dT':c['dayjs'](+_0x34c41[_0x1a40a1(0x1aa)])[_0x1a40a1(0x17c)](_0x1a40a1(0x1a6)),'personId':_0x34c41[_0x1a40a1(0x1d1)]};}else{const _0x229c8b={'memberId':_0x1995b4,'unitId':_0x5c7a54,'content':_0x5b06aa,'mention':_0x13b4d9},_0x5106f3=await this[_0x1a40a1(0x19c)]['post'](_0x1a40a1(0x1b6)+_0x5c7a54+_0x1a40a1(0x1a0),{'body':_0x229c8b});return Y(_0x5106f3['body'][_0x1a40a1(0x183)],_0x1d04d9);}}async[_0x3478b9(0x1d9)](_0x171701){const _0x14f089=_0x3478b9;var _0x8255a9,_0x4d56aa;const {text:_0x2d4071,unitId:_0x319084}=_0x171701,_0x69e51=(_0x4d56aa=(_0x8255a9=_0x2d4071[_0x14f089(0x197)])==null?void 0x0:_0x8255a9[_0x14f089(0x19f)](_0xad042d=>_0xad042d[_0x14f089(0x1b2)]===c[_0x14f089(0x185)][_0x14f089(0x18c)])[_0x14f089(0x1bc)](_0x259494=>_0x259494[_0x14f089(0x1e2)]))!=null?_0x4d56aa:[],_0x5f14d8=JSON[_0x14f089(0x1b1)](_0x2d4071),_0x5a8c7b=_0x171701[_0x14f089(0x184)],_0xd90b3b=_0x171701['id'],_0x40720c={'memberId':(await this[_0x14f089(0x193)][_0x14f089(0x1ee)](_0x319084))[_0x14f089(0x18a)](),'unitId':_0x319084,'threadId':_0x5a8c7b,'mention':_0x69e51,'content':_0x5f14d8,'replyId':_0xd90b3b},_0x293620=await this[_0x14f089(0x19c)]['post']('/universer-api/comment/unit/'+_0x319084+_0x14f089(0x17a),{'body':_0x40720c});return!_0x293620[_0x14f089(0x1ad)][_0x14f089(0x186)]||_0x293620[_0x14f089(0x1ad)][_0x14f089(0x186)]['code']===0x1;}async[_0x3478b9(0x1d2)](_0x439c61){const _0x5f0e67=_0x3478b9,{unitId:_0x30ee71}=_0x439c61,_0x1aef72=_0x439c61['threadId'],_0x2ea9cc={'memberId':this[_0x5f0e67(0x1a1)][_0x5f0e67(0x1ea)]()[_0x5f0e67(0x1e8)],'unitId':_0x30ee71,'threadId':_0x1aef72,'solved':_0x439c61[_0x5f0e67(0x18b)]?I[_0x5f0e67(0x196)]:I['OpenOrReOpen']},_0x5c0660=await this[_0x5f0e67(0x19c)][_0x5f0e67(0x1cf)](_0x5f0e67(0x1b6)+_0x30ee71+_0x5f0e67(0x1c2),{'body':_0x2ea9cc});return!_0x5c0660[_0x5f0e67(0x1ad)][_0x5f0e67(0x186)]||_0x5c0660[_0x5f0e67(0x1ad)]['error'][_0x5f0e67(0x198)]===0x1;}async[_0x3478b9(0x172)](_0x2f859a,_0x20b005,_0x46f82b,_0x185c92){const _0x29b07e=_0x3478b9,_0x509235={'memberId':(await this[_0x29b07e(0x193)][_0x29b07e(0x1ee)](_0x2f859a))[_0x29b07e(0x18a)](),'threadId':_0x46f82b,'replyId':_0x185c92,'unitId':_0x2f859a},_0xe2246e=await this[_0x29b07e(0x19c)][_0x29b07e(0x1cf)](_0x29b07e(0x1b6)+_0x2f859a+'/delete',{'body':_0x509235});return!_0xe2246e[_0x29b07e(0x1ad)][_0x29b07e(0x186)]||_0xe2246e[_0x29b07e(0x1ad)][_0x29b07e(0x186)]['code']===0x1;}async[_0x3478b9(0x1b8)](_0x1b367b,_0xc129c,_0x2c3f8e){const _0x37e4dd=_0x3478b9,_0x3d76bf={'unitId':_0x1b367b,'threadId':_0x2c3f8e},_0x270cf5=await this[_0x37e4dd(0x19c)][_0x37e4dd(0x1cf)](_0x37e4dd(0x1b6)+_0x1b367b+_0x37e4dd(0x190),{'body':_0x3d76bf}),_0x4a63da=_0x2c3f8e[_0x37e4dd(0x1bc)](_0x46c9f1=>G(_0x270cf5[_0x37e4dd(0x1ad)][_0x37e4dd(0x17f)][_0x46c9f1],_0x1b367b,_0xc129c))[_0x37e4dd(0x19f)](Boolean);return Object[_0x37e4dd(0x1ab)](_0x270cf5['body'][_0x37e4dd(0x16f)])[_0x37e4dd(0x174)](_0x54dad1=>{this['_userService']['addUser'](_0x54dad1);}),_0x4a63da;}['saveCommentToSnapshot'](_0x4f45da){return{'id':_0x4f45da['id'],'threadId':_0x4f45da['threadId'],'ref':_0x4f45da['ref']};}};g=x([_(0x0,c[_0x3478b9(0x1a5)](P[_0x3478b9(0x19d)])),_(0x1,c['Inject'](c[_0x3478b9(0x1b0)])),_(0x2,c['Inject'](b['CollaborationSessionService'])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x3478b9(0x1af)],J=(_0x30d4c2,_0x46ca5e,_0x3304e1,_0x216738)=>{const _0x8b33d1=_0x3478b9;for(var _0x198de7=_0x216738>0x1?void 0x0:_0x216738?H(_0x46ca5e,_0x3304e1):_0x46ca5e,_0x3d3999=_0x30d4c2[_0x8b33d1(0x1a4)]-0x1,_0x5af5a4;_0x3d3999>=0x0;_0x3d3999--)(_0x5af5a4=_0x30d4c2[_0x3d3999])&&(_0x198de7=_0x5af5a4(_0x198de7)||_0x198de7);return _0x198de7;},y=(_0x4d3b17,_0x1cd678)=>(_0x424b9e,_0x8348d2)=>_0x1cd678(_0x424b9e,_0x8348d2,_0x4d3b17);function _0x8019(){const _0x3a62e3=['UniverLicensePlugin','getUser','_threadCommentDataSourceService','_threadCommentDataSource','_initUserSync','Edit','updateComment','toStringTag','user','reply','find','thread-comment-data-source.config','Unknown','10149860tixchb','pipe','rangeId','DependentOn','delete','_threadCommentModel','/reply','CommentService','userID','13142QPDItm','getCurrentUser','parse','Injector','disposeWithMe','requireSession','parentId','3301836VgzCpZ','users','Add','replyId','deleteComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','forEach','addUser','content','11549881UwjOGM','type','add','/edit','3394355ulKFEG','format','IConfigService','UniverThreadCommentDataSourcePlugin','comments','@univerjs/thread-comment-ui','@univerjs-pro/collaboration-client','rxjs','comment','threadId','CustomRangeType','error','get','commentUpdate$','1786576OQErKl','getMemberID','resolved','COMMENT','root','_init','@univerjs/core','/list','Disposable','_configService','_sessionService','pluginName','UNRECOGNIZED','Solved','customRanges','code','subscribe','_initDataSource','setConfig','_httpService','HTTPService','33NxFBtg','filter','/add','_userService','@univerjs-pro/license','syncUpdateMutationToColla','length','Inject','YYYY/MM/DD\x20HH:mm','IThreadCommentDataSourceService','1082376eOUWzV','Solve','createTimestamp','values','_config','body','bufferTime','getOwnPropertyDescriptor','UserManagerService','stringify','rangeType','size','UniverInstanceType','getUnit','/universer-api/comment/unit/','OpenOrReOpen','listComments','@univerjs/network','_injector','symbol','map','dataSource','replies','dayjs','9VGeNMS','onReady','/solved','Plugin','defineProperty','8IRBGAB','Module','Reply','addComment','solved','unitId','getComment','UniverThreadCommentUIPlugin','_commentService','Delete','post','slice','userId','resolveComment'];_0x8019=function(){return _0x3a62e3;};return _0x8019();}let C=class extends c['Disposable']{constructor(_0x42036c,_0xb26637){const _0x4e25b5=_0x3478b9;super(),this[_0x4e25b5(0x1d5)]=_0x42036c,this[_0x4e25b5(0x1d6)]=_0xb26637,this[_0x4e25b5(0x19a)]();}[_0x3478b9(0x19a)](){const _0x3f58db=_0x3478b9;this[_0x3f58db(0x1d5)][_0x3f58db(0x1bd)]=this[_0x3f58db(0x1d6)],this['_threadCommentDataSourceService'][_0x3f58db(0x1a3)]=!0x1;}};C=J([y(0x0,M[_0x3478b9(0x1a7)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x3478b9(0x1c4)],L=Object[_0x3478b9(0x1af)],Z=(_0x43c548,_0x4c4da7,_0x54fbbc)=>_0x4c4da7 in _0x43c548?F(_0x43c548,_0x4c4da7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x54fbbc}):_0x43c548[_0x4c4da7]=_0x54fbbc,W=(_0x1d6222,_0x54214a,_0x33270a,_0x32b8e3)=>{const _0x12998d=_0x3478b9;for(var _0x5d20a5=_0x32b8e3>0x1?void 0x0:_0x32b8e3?L(_0x54214a,_0x33270a):_0x54214a,_0x30c3c8=_0x1d6222[_0x12998d(0x1a4)]-0x1,_0x27db2f;_0x30c3c8>=0x0;_0x30c3c8--)(_0x27db2f=_0x1d6222[_0x30c3c8])&&(_0x5d20a5=_0x27db2f(_0x5d20a5)||_0x5d20a5);return _0x5d20a5;},O=(_0x471d1d,_0x26747c)=>(_0xa26d93,_0xc6f820)=>_0x26747c(_0xa26d93,_0xc6f820,_0x471d1d),N=(_0xef5320,_0x31402a,_0x4bb0f3)=>Z(_0xef5320,typeof _0x31402a!=_0x3478b9(0x1bb)?_0x31402a+'':_0x31402a,_0x4bb0f3);exports[_0x3478b9(0x17e)]=class extends c[_0x3478b9(0x1c3)]{constructor(_0xbbe300=D,_0x8b2d1b,_0x2942c1){const _0x30fd2b=_0x3478b9;super(),this['_config']=_0xbbe300,this[_0x30fd2b(0x1ba)]=_0x8b2d1b,this[_0x30fd2b(0x192)]=_0x2942c1;const {..._0x320289}=c['merge']({},D,this[_0x30fd2b(0x1ac)]);this[_0x30fd2b(0x192)][_0x30fd2b(0x19b)](q,_0x320289);}['onStarting'](){const _0x40c44d=_0x3478b9;[[g],[C],[p]][_0x40c44d(0x174)](_0x4231a1=>{const _0x2c1154=_0x40c44d;this[_0x2c1154(0x1ba)][_0x2c1154(0x179)](_0x4231a1);});}[_0x3478b9(0x1c1)](){const _0x11b83b=_0x3478b9;this[_0x11b83b(0x1ba)][_0x11b83b(0x187)](C),this[_0x11b83b(0x1ba)]['get'](p);}},N(exports[_0x3478b9(0x17e)],_0x3478b9(0x194),U),N(exports[_0x3478b9(0x17e)],_0x3478b9(0x178),c[_0x3478b9(0x1b4)]['UNIVER_UNKNOWN']),exports[_0x3478b9(0x17e)]=W([c[_0x3478b9(0x1e3)](j[_0x3478b9(0x1cc)],b['UniverCollaborationClientPlugin'],T[_0x3478b9(0x1d3)]),O(0x1,c[_0x3478b9(0x1a5)](c[_0x3478b9(0x1ec)])),O(0x2,c[_0x3478b9(0x17d)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';function _0x289b(_0xdef441,_0x5c452b){const _0x536247=_0x5362();return _0x289b=function(_0x289b50,_0x3dbebd){_0x289b50=_0x289b50-0x9e;let _0x5e1721=_0x536247[_0x289b50];return _0x5e1721;},_0x289b(_0xdef441,_0x5c452b);}const _0x4ae273=_0x289b;(function(_0x40e0d5,_0x31b299){const _0x156586=_0x289b,_0x16ff4a=_0x40e0d5();while(!![]){try{const _0x44f9ec=-parseInt(_0x156586(0xf2))/0x1*(-parseInt(_0x156586(0xf8))/0x2)+parseInt(_0x156586(0xdc))/0x3+-parseInt(_0x156586(0x101))/0x4+parseInt(_0x156586(0xe2))/0x5*(parseInt(_0x156586(0xe3))/0x6)+-parseInt(_0x156586(0x103))/0x7*(-parseInt(_0x156586(0xd1))/0x8)+parseInt(_0x156586(0xe9))/0x9+-parseInt(_0x156586(0xe5))/0xa;if(_0x44f9ec===_0x31b299)break;else _0x16ff4a['push'](_0x16ff4a['shift']());}catch(_0x412dae){_0x16ff4a['push'](_0x16ff4a['shift']());}}}(_0x5362,0x1e98f));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x4ae273(0xa1)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require(_0x4ae273(0x106)),j=require(_0x4ae273(0xa3)),M=require(_0x4ae273(0xc9)),w=require(_0x4ae273(0xb0)),P=require('@univerjs/network'),U=_0x4ae273(0xa7);var I=(_0x14366c=>(_0x14366c[_0x14366c[_0x4ae273(0x109)]=0x0]='OpenOrReOpen',_0x14366c[_0x14366c[_0x4ae273(0xd5)]=0x1]=_0x4ae273(0xd5),_0x14366c[_0x14366c['UNRECOGNIZED']=-0x1]=_0x4ae273(0x10b),_0x14366c))(I||{}),v=(_0x47bd2e=>(_0x47bd2e[_0x47bd2e[_0x4ae273(0xf6)]=0x0]='Unknown',_0x47bd2e[_0x47bd2e[_0x4ae273(0xeb)]=0x1]=_0x4ae273(0xeb),_0x47bd2e[_0x47bd2e[_0x4ae273(0x10a)]=0x2]=_0x4ae273(0x10a),_0x47bd2e[_0x47bd2e[_0x4ae273(0xd9)]=0x3]=_0x4ae273(0xd9),_0x47bd2e[_0x47bd2e[_0x4ae273(0x105)]=0x4]=_0x4ae273(0x105),_0x47bd2e[_0x47bd2e[_0x4ae273(0xe7)]=0x5]=_0x4ae273(0xe7),_0x47bd2e[_0x47bd2e[_0x4ae273(0x10b)]=-0x1]='UNRECOGNIZED',_0x47bd2e))(v||{});const f=_0x3d7cd3=>c[_0x4ae273(0xf7)](new Date(+_0x3d7cd3))[_0x4ae273(0xe6)](_0x4ae273(0x10d)),R=async(_0x14d822,_0x4efd3f)=>{const _0x303ef8=_0x4ae273,_0x2bd209=_0x14d822[_0x303ef8(0xbd)](c[_0x303ef8(0xa4)]),_0x2a7e8d=_0x14d822['get'](P[_0x303ef8(0xd0)]);_0x4efd3f[_0x303ef8(0xbc)](_0x22af8d=>{const _0x398a0b=_0x303ef8;_0x2bd209[_0x398a0b(0xba)](_0x22af8d)&&_0x4efd3f['delete'](_0x22af8d);}),_0x4efd3f[_0x303ef8(0xff)]&&(await _0x2a7e8d[_0x303ef8(0xbd)](_0x303ef8(0xb4),{'params':{'userIDs':[..._0x4efd3f]}}))[_0x303ef8(0xaa)][_0x303ef8(0xb7)][_0x303ef8(0xbc)](_0x3413eb=>{const _0x1451e9=_0x303ef8;_0x3413eb&&_0x2bd209[_0x1451e9(0x108)](_0x3413eb);});};var $=Object[_0x4ae273(0x9e)],E=(_0x3b3def,_0x162768,_0x372acc,_0x120bb4)=>{for(var _0x11bec5=_0x120bb4>0x1?void 0x0:_0x120bb4?$(_0x162768,_0x372acc):_0x162768,_0x58e9e0=_0x3b3def['length']-0x1,_0xa1d518;_0x58e9e0>=0x0;_0x58e9e0--)(_0xa1d518=_0x3b3def[_0x58e9e0])&&(_0x11bec5=_0xa1d518(_0x11bec5)||_0x11bec5);return _0x11bec5;},S=(_0x4cc93f,_0x5a8fcd)=>(_0x320472,_0x4dfdf9)=>_0x5a8fcd(_0x320472,_0x4dfdf9,_0x4cc93f);let p=class extends c['Disposable']{constructor(_0x5b966c,_0xbc726c,_0x17e5ab,_0x4e225b){const _0x2e1c1d=_0x4ae273;super(),this['_commentService']=_0x5b966c,this['_threadCommentModel']=_0xbc726c,this[_0x2e1c1d(0xef)]=_0x17e5ab,this[_0x2e1c1d(0xda)]=_0x4e225b,this[_0x2e1c1d(0x100)](),this[_0x2e1c1d(0x10c)]();}[_0x4ae273(0x10c)](){const _0x349348=_0x4ae273;this['disposeWithMe'](this[_0x349348(0xee)]['commentUpdate$']['pipe'](w[_0x349348(0x113)](0x10))[_0x349348(0x10e)](_0x4520d4=>{const _0x53da15=_0x349348,_0x5cd53b=new Set();_0x4520d4['forEach'](_0xcc70a5=>{const _0xed8d0f=_0x289b;switch(_0xcc70a5[_0xed8d0f(0xcc)]){case _0xed8d0f(0xdb):{const _0x1503bd=_0xcc70a5[_0xed8d0f(0xf4)][_0xed8d0f(0xb3)];_0x5cd53b[_0xed8d0f(0xdb)](_0x1503bd);break;}}}),R(this[_0x53da15(0xda)],_0x5cd53b);}));}[_0x4ae273(0x100)](){const _0x461ee1=_0x4ae273;this[_0x461ee1(0xd7)](this[_0x461ee1(0x115)]['commentUpdate$'][_0x461ee1(0x10e)](async _0x57a8a1=>{const _0x3d86cf=_0x461ee1;var _0x57cd02,_0x3da038,_0x359928,_0x39ddb7;const _0x47ce09=(_0x57cd02=this[_0x3d86cf(0xee)]['getUnit'](_0x57a8a1[_0x3d86cf(0xfc)])[_0x3d86cf(0xf0)](_0x3351f6=>_0x3351f6[_0x3d86cf(0xb9)]===_0x57a8a1['threadId']))==null?void 0x0:_0x57cd02[_0x3d86cf(0xa5)];if(!_0x47ce09)return;const {unitId:_0x287414,subUnitId:_0x17135a}=_0x47ce09;switch(_0x57a8a1[_0x3d86cf(0x111)]&&this[_0x3d86cf(0xef)][_0x3d86cf(0x108)](_0x57a8a1[_0x3d86cf(0x111)]),_0x57a8a1[_0x3d86cf(0xcc)]){case v[_0x3d86cf(0xeb)]:break;case v[_0x3d86cf(0x10a)]:{this[_0x3d86cf(0xee)][_0x3d86cf(0xfa)](_0x287414,_0x17135a,{'unitId':_0x287414,'subUnitId':_0x17135a,'ref':'','id':_0x57a8a1[_0x3d86cf(0xad)],'dT':f(+_0x57a8a1['createTimestamp']),'threadId':_0x57a8a1[_0x3d86cf(0xb9)],'personId':(_0x359928=(_0x3da038=_0x57a8a1[_0x3d86cf(0x111)])==null?void 0x0:_0x3da038['userID'])!=null?_0x359928:_0x57a8a1['userId'],'text':JSON[_0x3d86cf(0xea)](_0x57a8a1[_0x3d86cf(0xc1)]),'parentId':_0x47ce09['id']});break;}case v[_0x3d86cf(0x105)]:{const _0x163684=this[_0x3d86cf(0xee)]['getComment'](_0x287414,_0x17135a,_0x57a8a1[_0x3d86cf(0xad)]);_0x163684&&_0x163684['parentId']&&this[_0x3d86cf(0xee)]['deleteComment'](_0x287414,_0x17135a,_0x57a8a1[_0x3d86cf(0xad)]);break;}case v['Edit']:{this[_0x3d86cf(0xee)][_0x3d86cf(0xa2)](_0x287414,_0x17135a,{'commentId':_0x57a8a1[_0x3d86cf(0xad)],'text':JSON[_0x3d86cf(0xea)](_0x57a8a1[_0x3d86cf(0xc1)])});break;}case v[_0x3d86cf(0xe7)]:{const _0x260cc1=(_0x39ddb7=this['_threadCommentModel'][_0x3d86cf(0xfb)](_0x57a8a1[_0x3d86cf(0xfc)])['find'](_0x2fab45=>_0x2fab45['threadId']===_0x57a8a1[_0x3d86cf(0xb9)]))==null?void 0x0:_0x39ddb7[_0x3d86cf(0xa5)];_0x260cc1&&this[_0x3d86cf(0xee)][_0x3d86cf(0xbb)](_0x287414,_0x17135a,_0x260cc1['id'],_0x57a8a1[_0x3d86cf(0xf3)]===I[_0x3d86cf(0xd5)]);break;}}}));}};p=E([S(0x0,c[_0x4ae273(0xd4)](b['CommentService'])),S(0x1,c[_0x4ae273(0xd4)](M[_0x4ae273(0xc3)])),S(0x2,c['Inject'](c[_0x4ae273(0xa4)])),S(0x3,c[_0x4ae273(0xd4)](c[_0x4ae273(0xd2)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x4ae273(0x9e)],x=(_0x557b62,_0x4bb138,_0x3048f9,_0x30a09a)=>{const _0x3b5526=_0x4ae273;for(var _0x4fb52a=_0x30a09a>0x1?void 0x0:_0x30a09a?A(_0x4bb138,_0x3048f9):_0x4bb138,_0x5d35dd=_0x557b62[_0x3b5526(0xf1)]-0x1,_0x4ee223;_0x5d35dd>=0x0;_0x5d35dd--)(_0x4ee223=_0x557b62[_0x5d35dd])&&(_0x4fb52a=_0x4ee223(_0x4fb52a)||_0x4fb52a);return _0x4fb52a;},_=(_0x3f2c5a,_0x339fa4)=>(_0x562bc1,_0x4b6035)=>_0x339fa4(_0x562bc1,_0x4b6035,_0x3f2c5a);function Y(_0x599be2,_0x3d591c){const _0x517ab9=_0x4ae273,_0x32bafc=_0x599be2[_0x517ab9(0xd3)][0x0];return{..._0x3d591c,'id':_0x32bafc[_0x517ab9(0xad)],'resolved':_0x599be2[_0x517ab9(0xf3)]===0x1,'dT':f(_0x32bafc[_0x517ab9(0x114)]),'personId':_0x32bafc['userId'],'threadId':_0x32bafc[_0x517ab9(0xb9)]};}function G(_0x2eef40,_0x316c3d,_0xf244a7){const _0x6d9f25=_0x4ae273;var _0x39664e,_0xb6c3b2;if(((_0xb6c3b2=(_0x39664e=_0x2eef40==null?void 0x0:_0x2eef40['replies'])==null?void 0x0:_0x39664e[_0x6d9f25(0xf1)])!=null?_0xb6c3b2:0x0)>0x0){const _0x42cd59=(_0xee327,_0x1219e6)=>({'id':_0xee327[_0x6d9f25(0xad)],'threadId':_0xee327[_0x6d9f25(0xb9)],'dT':f(_0xee327[_0x6d9f25(0x114)]),'personId':_0xee327[_0x6d9f25(0xc5)],'resolved':_0x2eef40[_0x6d9f25(0xf3)]===I[_0x6d9f25(0xd5)],'unitId':_0x316c3d,'subUnitId':_0xf244a7,'text':JSON['parse'](_0xee327[_0x6d9f25(0xc1)]),'parentId':_0x1219e6}),_0x193094=_0x42cd59(_0x2eef40[_0x6d9f25(0xd3)][0x0]);return{..._0x193094,'children':_0x2eef40[_0x6d9f25(0xd3)][_0x6d9f25(0xec)](0x1)[_0x6d9f25(0xb8)](_0x24c438=>_0x42cd59(_0x24c438,_0x193094['id']))};}return null;}let g=class{constructor(_0x2086de,_0x6b104e,_0x563a4e,_0x36fa48){const _0x4bd995=_0x4ae273;this[_0x4bd995(0xb1)]=_0x2086de,this[_0x4bd995(0xef)]=_0x6b104e,this[_0x4bd995(0xde)]=_0x563a4e,this[_0x4bd995(0xda)]=_0x36fa48;}async['addComment'](_0x5b007b){const _0x587902=_0x4ae273;var _0x5e86f3,_0x18ea34;const {parentId:_0x1e51f3,unitId:_0x42e85b,text:_0x2daa9d,threadId:_0x5aafa4}=_0x5b007b,_0x424365=(_0x18ea34=(_0x5e86f3=_0x2daa9d[_0x587902(0xa0)])==null?void 0x0:_0x5e86f3['filter'](_0x57d348=>_0x57d348[_0x587902(0xbf)]===c[_0x587902(0xe8)]['COMMENT'])[_0x587902(0xb8)](_0x19e3d1=>_0x19e3d1['rangeId']))!=null?_0x18ea34:[],_0x37f82d=JSON[_0x587902(0xce)](_0x2daa9d),_0xf70449=(await this[_0x587902(0xde)][_0x587902(0xcf)](_0x42e85b))['getMemberID']();if(_0x1e51f3){const _0x54ce1f={'memberId':_0xf70449,'unitId':_0x42e85b,'content':_0x37f82d,'mention':_0x424365,'threadId':_0x5aafa4},_0x1107ab=(await this['_httpService'][_0x587902(0x102)](_0x587902(0xe1)+_0x42e85b+_0x587902(0xb5),{'body':_0x54ce1f}))[_0x587902(0xaa)]['reply'];return{..._0x5b007b,'id':_0x1107ab[_0x587902(0xad)],'dT':c['dayjs'](+_0x1107ab[_0x587902(0x114)])['format'](_0x587902(0x10d)),'personId':_0x1107ab['userId']};}else{const _0x1278a9={'memberId':_0xf70449,'unitId':_0x42e85b,'content':_0x37f82d,'mention':_0x424365},_0x12f60d=await this['_httpService'][_0x587902(0x102)](_0x587902(0xe1)+_0x42e85b+_0x587902(0xc6),{'body':_0x1278a9});return Y(_0x12f60d[_0x587902(0xaa)]['comment'],_0x5b007b);}}async['updateComment'](_0x443ace){const _0x553436=_0x4ae273;var _0x322648,_0x356f58;const {text:_0x435409,unitId:_0x432ce8}=_0x443ace,_0x14d13d=(_0x356f58=(_0x322648=_0x435409[_0x553436(0xa0)])==null?void 0x0:_0x322648['filter'](_0x365578=>_0x365578[_0x553436(0xbf)]===c[_0x553436(0xe8)]['COMMENT'])[_0x553436(0xb8)](_0x1cd0cd=>_0x1cd0cd[_0x553436(0xaf)]))!=null?_0x356f58:[],_0x27c085=JSON[_0x553436(0xce)](_0x435409),_0x1c57c7=_0x443ace[_0x553436(0xb9)],_0x105e15=_0x443ace['id'],_0x3c24f2={'memberId':(await this[_0x553436(0xde)]['requireSession'](_0x432ce8))[_0x553436(0xab)](),'unitId':_0x432ce8,'threadId':_0x1c57c7,'mention':_0x14d13d,'content':_0x27c085,'replyId':_0x105e15},_0x5f3a9e=await this[_0x553436(0xb1)]['post'](_0x553436(0xe1)+_0x432ce8+_0x553436(0xfe),{'body':_0x3c24f2});return!_0x5f3a9e['body'][_0x553436(0xcd)]||_0x5f3a9e[_0x553436(0xaa)][_0x553436(0xcd)][_0x553436(0xca)]===0x1;}async[_0x4ae273(0xbb)](_0x5a5145){const _0x1735f5=_0x4ae273,{unitId:_0x175ff9}=_0x5a5145,_0x5e6672=_0x5a5145[_0x1735f5(0xb9)],_0xc1d84f={'memberId':this[_0x1735f5(0xef)]['getCurrentUser']()[_0x1735f5(0xf5)],'unitId':_0x175ff9,'threadId':_0x5e6672,'solved':_0x5a5145[_0x1735f5(0xc4)]?I['Solved']:I[_0x1735f5(0x109)]},_0x4abd92=await this[_0x1735f5(0xb1)][_0x1735f5(0x102)](_0x1735f5(0xe1)+_0x175ff9+'/solved',{'body':_0xc1d84f});return!_0x4abd92[_0x1735f5(0xaa)][_0x1735f5(0xcd)]||_0x4abd92[_0x1735f5(0xaa)][_0x1735f5(0xcd)][_0x1735f5(0xca)]===0x1;}async[_0x4ae273(0xc0)](_0x1fea3a,_0x49b0a0,_0x42822f,_0x472fb3){const _0x2c59d6=_0x4ae273,_0x3edafd={'memberId':(await this[_0x2c59d6(0xde)][_0x2c59d6(0xcf)](_0x1fea3a))[_0x2c59d6(0xab)](),'threadId':_0x42822f,'replyId':_0x472fb3,'unitId':_0x1fea3a},_0x2838ce=await this['_httpService']['post'](_0x2c59d6(0xe1)+_0x1fea3a+_0x2c59d6(0x10f),{'body':_0x3edafd});return!_0x2838ce[_0x2c59d6(0xaa)][_0x2c59d6(0xcd)]||_0x2838ce[_0x2c59d6(0xaa)][_0x2c59d6(0xcd)][_0x2c59d6(0xca)]===0x1;}async[_0x4ae273(0xb2)](_0x1999ec,_0x23cca6,_0x48d901){const _0x3cbb66=_0x4ae273,_0x2e0c4d={'unitId':_0x1999ec,'threadId':_0x48d901},_0x329240=await this[_0x3cbb66(0xb1)][_0x3cbb66(0x102)]('/universer-api/comment/unit/'+_0x1999ec+'/list',{'body':_0x2e0c4d}),_0xd05bb4=_0x48d901[_0x3cbb66(0xb8)](_0x36f14e=>G(_0x329240[_0x3cbb66(0xaa)]['comments'][_0x36f14e],_0x1999ec,_0x23cca6))[_0x3cbb66(0xdd)](Boolean);return Object[_0x3cbb66(0xac)](_0x329240[_0x3cbb66(0xaa)]['users'])[_0x3cbb66(0xbc)](_0x2d1d98=>{const _0x28d078=_0x3cbb66;this[_0x28d078(0xef)]['addUser'](_0x2d1d98);}),_0xd05bb4;}[_0x4ae273(0xc7)](_0x326a1a){const _0x2e52f9=_0x4ae273;return{'id':_0x326a1a['id'],'threadId':_0x326a1a[_0x2e52f9(0xb9)],'ref':_0x326a1a[_0x2e52f9(0xf9)]};}};g=x([_(0x0,c[_0x4ae273(0xd4)](P[_0x4ae273(0xd0)])),_(0x1,c[_0x4ae273(0xd4)](c[_0x4ae273(0xa4)])),_(0x2,c['Inject'](b[_0x4ae273(0xa6)])),_(0x3,c[_0x4ae273(0xd4)](c[_0x4ae273(0xd2)]))],g);var H=Object[_0x4ae273(0x9e)],J=(_0x11affa,_0x319600,_0x56da34,_0x7e95cf)=>{for(var _0x4e4b13=_0x7e95cf>0x1?void 0x0:_0x7e95cf?H(_0x319600,_0x56da34):_0x319600,_0x5a2cdb=_0x11affa['length']-0x1,_0x7ec729;_0x5a2cdb>=0x0;_0x5a2cdb--)(_0x7ec729=_0x11affa[_0x5a2cdb])&&(_0x4e4b13=_0x7ec729(_0x4e4b13)||_0x4e4b13);return _0x4e4b13;},y=(_0x41dc77,_0x1d646a)=>(_0x3cad87,_0x22b838)=>_0x1d646a(_0x3cad87,_0x22b838,_0x41dc77);let C=class extends c[_0x4ae273(0xa8)]{constructor(_0x296d7e,_0x142f85){const _0x159b04=_0x4ae273;super(),this[_0x159b04(0x9f)]=_0x296d7e,this['_threadCommentDataSource']=_0x142f85,this['_initDataSource']();}[_0x4ae273(0x112)](){const _0x376b59=_0x4ae273;this[_0x376b59(0x9f)][_0x376b59(0xae)]=this[_0x376b59(0xcb)],this[_0x376b59(0x9f)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x4ae273(0x110)]),y(0x1,c['Inject'](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x1acbc4,_0x229cd3,_0xe77459)=>_0x229cd3 in _0x1acbc4?F(_0x1acbc4,_0x229cd3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe77459}):_0x1acbc4[_0x229cd3]=_0xe77459,W=(_0x374bb6,_0x2599d6,_0x8e2233,_0x41a544)=>{const _0x1d1ada=_0x4ae273;for(var _0x2207d2=_0x41a544>0x1?void 0x0:_0x41a544?L(_0x2599d6,_0x8e2233):_0x2599d6,_0x58f111=_0x374bb6[_0x1d1ada(0xf1)]-0x1,_0x2adbfa;_0x58f111>=0x0;_0x58f111--)(_0x2adbfa=_0x374bb6[_0x58f111])&&(_0x2207d2=_0x2adbfa(_0x2207d2)||_0x2207d2);return _0x2207d2;},O=(_0xf7647b,_0x41af70)=>(_0x3c0eb0,_0x4d7767)=>_0x41af70(_0x3c0eb0,_0x4d7767,_0xf7647b),N=(_0x5a611c,_0x370a00,_0x188303)=>Z(_0x5a611c,typeof _0x370a00!=_0x4ae273(0xc8)?_0x370a00+'':_0x370a00,_0x188303);function _0x5362(){const _0x3fe95b=['dataSource','rangeId','rxjs','_httpService','listComments','personId','/universer-api/user/list','/reply','UNIVER_UNKNOWN','users','map','threadId','getUser','resolveComment','forEach','get','_configService','rangeType','deleteComment','content','setConfig','ThreadCommentModel','resolved','userId','/add','saveCommentToSnapshot','symbol','@univerjs/thread-comment','code','_threadCommentDataSource','type','error','stringify','requireSession','HTTPService','177736QKiIJD','Injector','replies','Inject','Solved','_config','disposeWithMe','UniverThreadCommentUIPlugin','Edit','_injector','add','743034nsfklO','filter','_sessionService','UniverCollaborationClientPlugin','merge','/universer-api/comment/unit/','10JyIgnE','416328nQhHXD','DependentOn','6823580Febkeo','format','Solve','CustomRangeType','2181834RlBCQl','parse','Add','slice','onStarting','_threadCommentModel','_userService','find','length','1HSXRNy','solved','payload','userID','Unknown','dayjs','350722OLpUpx','ref','addComment','getUnit','unitId','UniverThreadCommentDataSourcePlugin','/edit','size','_init','252828hMPtMt','post','21mVqokA','UniverLicensePlugin','Delete','@univerjs/core','onReady','addUser','OpenOrReOpen','Reply','UNRECOGNIZED','_initUserSync','YYYY/MM/DD\x20HH:mm','subscribe','/delete','IThreadCommentDataSourceService','user','_initDataSource','bufferTime','createTimestamp','_commentService','getOwnPropertyDescriptor','_threadCommentDataSourceService','customRanges','Module','updateComment','@univerjs/thread-comment-ui','UserManagerService','root','CollaborationSessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Disposable','Plugin','body','getMemberID','values','replyId'];_0x5362=function(){return _0x3fe95b;};return _0x5362();}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4ae273(0xa9)]{constructor(_0x44ca0e=D,_0x2baa3f,_0x2e18f9){const _0x2c7611=_0x4ae273;super(),this[_0x2c7611(0xd6)]=_0x44ca0e,this['_injector']=_0x2baa3f,this[_0x2c7611(0xbe)]=_0x2e18f9;const {..._0x747ce5}=c[_0x2c7611(0xe0)]({},D,this[_0x2c7611(0xd6)]);this[_0x2c7611(0xbe)][_0x2c7611(0xc2)](q,_0x747ce5);}[_0x4ae273(0xed)](){const _0x51e99c=_0x4ae273;[[g],[C],[p]][_0x51e99c(0xbc)](_0x1859cc=>{const _0x3da4dc=_0x51e99c;this[_0x3da4dc(0xda)][_0x3da4dc(0xdb)](_0x1859cc);});}[_0x4ae273(0x107)](){const _0x16827e=_0x4ae273;this[_0x16827e(0xda)][_0x16827e(0xbd)](C),this[_0x16827e(0xda)][_0x16827e(0xbd)](p);}},N(exports[_0x4ae273(0xfd)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x4ae273(0xcc),c['UniverInstanceType'][_0x4ae273(0xb6)]),exports[_0x4ae273(0xfd)]=W([c[_0x4ae273(0xe4)](j[_0x4ae273(0xd8)],b[_0x4ae273(0xdf)],T[_0x4ae273(0x104)]),O(0x1,c[_0x4ae273(0xd4)](c[_0x4ae273(0xd2)])),O(0x2,c['IConfigService'])],exports[_0x4ae273(0xfd)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4be095=_0x46ea;(function(_0x45e5b3,_0x4fb667){const _0x23c293=_0x46ea,_0xba98f1=_0x45e5b3();while(!![]){try{const _0x11a11c=parseInt(_0x23c293(0x14d))/0x1*(-parseInt(_0x23c293(0x12a))/0x2)+-parseInt(_0x23c293(0x158))/0x3+-parseInt(_0x23c293(0x155))/0x4+parseInt(_0x23c293(0x135))/0x5*(-parseInt(_0x23c293(0x12d))/0x6)+-parseInt(_0x23c293(0x114))/0x7+-parseInt(_0x23c293(0x11c))/0x8*(-parseInt(_0x23c293(0x134))/0x9)+-parseInt(_0x23c293(0x157))/0xa*(-parseInt(_0x23c293(0x10c))/0xb);if(_0x11a11c===_0x4fb667)break;else _0xba98f1['push'](_0xba98f1['shift']());}catch(_0x164068){_0xba98f1['push'](_0xba98f1['shift']());}}}(_0x2140,0xe8b73));import{CommentService as _0x560a2f,CollaborationSessionService as _0x211d73,UniverCollaborationClientPlugin as _0x1dff39}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xea7e1c}from'@univerjs-pro/license';import{dayjs as _0x13f57c,UserManagerService as _0x57bf20,Inject as _0x397f67,Injector as _0xc959e6,Disposable as _0x3714c3,CustomRangeType as _0x32b452,UniverInstanceType as _0x15cbc2,DependentOn as _0x5f982,IConfigService as _0x129d4e,Plugin as _0x29b97b,merge as _0x596754}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5c16f9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4bce87,IThreadCommentDataSourceService as _0x3222e2}from'@univerjs/thread-comment';import{bufferTime as _0x1c1e04}from'rxjs';import{HTTPService as _0x2e19d5}from'@univerjs/network';const W=_0x4be095(0x14f);var I=(_0x4c7dcd=>(_0x4c7dcd[_0x4c7dcd[_0x4be095(0x113)]=0x0]='OpenOrReOpen',_0x4c7dcd[_0x4c7dcd[_0x4be095(0x154)]=0x1]=_0x4be095(0x154),_0x4c7dcd[_0x4c7dcd['UNRECOGNIZED']=-0x1]=_0x4be095(0x13f),_0x4c7dcd))(I||{}),v=(_0x810411=>(_0x810411[_0x810411[_0x4be095(0x148)]=0x0]=_0x4be095(0x148),_0x810411[_0x810411['Add']=0x1]='Add',_0x810411[_0x810411[_0x4be095(0x11d)]=0x2]=_0x4be095(0x11d),_0x810411[_0x810411[_0x4be095(0x117)]=0x3]=_0x4be095(0x117),_0x810411[_0x810411[_0x4be095(0x123)]=0x4]=_0x4be095(0x123),_0x810411[_0x810411[_0x4be095(0x139)]=0x5]='Solve',_0x810411[_0x810411['UNRECOGNIZED']=-0x1]=_0x4be095(0x13f),_0x810411))(v||{});const D=_0x38968f=>_0x13f57c(new Date(+_0x38968f))[_0x4be095(0x119)](_0x4be095(0x12e)),B=async(_0x1cb238,_0x4c95f7)=>{const _0x265463=_0x4be095,_0x426a8e=_0x1cb238[_0x265463(0x153)](_0x57bf20),_0x5d1acb=_0x1cb238[_0x265463(0x153)](_0x2e19d5);_0x4c95f7[_0x265463(0x107)](_0x2e621c=>{_0x426a8e['getUser'](_0x2e621c)&&_0x4c95f7['delete'](_0x2e621c);}),_0x4c95f7[_0x265463(0x142)]&&(await _0x5d1acb[_0x265463(0x153)](_0x265463(0x120),{'params':{'userIDs':[..._0x4c95f7]}}))[_0x265463(0x138)]['users'][_0x265463(0x107)](_0x3df401=>{const _0x2b7804=_0x265463;_0x3df401&&_0x426a8e[_0x2b7804(0x133)](_0x3df401);});};var K=Object[_0x4be095(0x100)],V=(_0x5e3472,_0x22337f,_0x887530,_0x5869d1)=>{for(var _0x5346d6=_0x5869d1>0x1?void 0x0:_0x5869d1?K(_0x22337f,_0x887530):_0x22337f,_0x25b942=_0x5e3472['length']-0x1,_0x4073b5;_0x25b942>=0x0;_0x25b942--)(_0x4073b5=_0x5e3472[_0x25b942])&&(_0x5346d6=_0x4073b5(_0x5346d6)||_0x5346d6);return _0x5346d6;},p=(_0x1e3c23,_0x5f31bd)=>(_0x4a2bc7,_0x4acfcd)=>_0x5f31bd(_0x4a2bc7,_0x4acfcd,_0x1e3c23);let S=class extends _0x3714c3{constructor(_0x251b8b,_0x296f2f,_0x26f7a4,_0x22b262){const _0xbb1f4c=_0x4be095;super(),this[_0xbb1f4c(0x101)]=_0x251b8b,this[_0xbb1f4c(0x13d)]=_0x296f2f,this[_0xbb1f4c(0x13a)]=_0x26f7a4,this[_0xbb1f4c(0x10f)]=_0x22b262,this[_0xbb1f4c(0x146)](),this['_initUserSync']();}['_initUserSync'](){const _0x330dae=_0x4be095;this[_0x330dae(0x121)](this[_0x330dae(0x13d)][_0x330dae(0x125)][_0x330dae(0x105)](_0x1c1e04(0x10))[_0x330dae(0x122)](_0x1f35d0=>{const _0x371aca=_0x330dae,_0x119497=new Set();_0x1f35d0[_0x371aca(0x107)](_0x3f4878=>{const _0x4440b1=_0x371aca;switch(_0x3f4878[_0x4440b1(0x129)]){case'add':{const _0x1c797a=_0x3f4878['payload']['personId'];_0x119497['add'](_0x1c797a);break;}}}),B(this['_injector'],_0x119497);}));}['_init'](){const _0x1bb09e=_0x4be095;this['disposeWithMe'](this[_0x1bb09e(0x101)][_0x1bb09e(0x125)][_0x1bb09e(0x122)](async _0x46bb1a=>{const _0x25f2bc=_0x1bb09e;var _0x3ddfb4,_0x10ad86,_0xc279d3,_0x4c6832;const _0x44e216=(_0x3ddfb4=this[_0x25f2bc(0x13d)][_0x25f2bc(0x149)](_0x46bb1a['unitId'])['find'](_0x93c4b7=>_0x93c4b7[_0x25f2bc(0x109)]===_0x46bb1a[_0x25f2bc(0x109)]))==null?void 0x0:_0x3ddfb4[_0x25f2bc(0x130)];if(!_0x44e216)return;const {unitId:_0x47ab1f,subUnitId:_0x378aea}=_0x44e216;switch(_0x46bb1a[_0x25f2bc(0x13e)]&&this['_userService'][_0x25f2bc(0x133)](_0x46bb1a[_0x25f2bc(0x13e)]),_0x46bb1a[_0x25f2bc(0x129)]){case v['Add']:break;case v[_0x25f2bc(0x11d)]:{this[_0x25f2bc(0x13d)][_0x25f2bc(0x144)](_0x47ab1f,_0x378aea,{'unitId':_0x47ab1f,'subUnitId':_0x378aea,'ref':'','id':_0x46bb1a['replyId'],'dT':D(+_0x46bb1a['createTimestamp']),'threadId':_0x46bb1a[_0x25f2bc(0x109)],'personId':(_0xc279d3=(_0x10ad86=_0x46bb1a[_0x25f2bc(0x13e)])==null?void 0x0:_0x10ad86[_0x25f2bc(0x124)])!=null?_0xc279d3:_0x46bb1a[_0x25f2bc(0x12f)],'text':JSON[_0x25f2bc(0x140)](_0x46bb1a[_0x25f2bc(0x102)]),'parentId':_0x44e216['id']});break;}case v[_0x25f2bc(0x123)]:{const _0x1b5ce1=this['_threadCommentModel']['getComment'](_0x47ab1f,_0x378aea,_0x46bb1a[_0x25f2bc(0x128)]);_0x1b5ce1&&_0x1b5ce1[_0x25f2bc(0x108)]&&this[_0x25f2bc(0x13d)][_0x25f2bc(0x136)](_0x47ab1f,_0x378aea,_0x46bb1a[_0x25f2bc(0x128)]);break;}case v[_0x25f2bc(0x117)]:{this[_0x25f2bc(0x13d)][_0x25f2bc(0x152)](_0x47ab1f,_0x378aea,{'commentId':_0x46bb1a[_0x25f2bc(0x128)],'text':JSON[_0x25f2bc(0x140)](_0x46bb1a[_0x25f2bc(0x102)])});break;}case v[_0x25f2bc(0x139)]:{const _0xa362c0=(_0x4c6832=this[_0x25f2bc(0x13d)][_0x25f2bc(0x149)](_0x46bb1a['unitId'])['find'](_0x475a8b=>_0x475a8b['threadId']===_0x46bb1a[_0x25f2bc(0x109)]))==null?void 0x0:_0x4c6832[_0x25f2bc(0x130)];_0xa362c0&&this['_threadCommentModel'][_0x25f2bc(0x151)](_0x47ab1f,_0x378aea,_0xa362c0['id'],_0x46bb1a[_0x25f2bc(0x13b)]===I[_0x25f2bc(0x154)]);break;}}}));}};S=V([p(0x0,_0x397f67(_0x560a2f)),p(0x1,_0x397f67(_0x4bce87)),p(0x2,_0x397f67(_0x57bf20)),p(0x3,_0x397f67(_0xc959e6))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2cbff2,_0x4714ee,_0x53d45e,_0x6ff2c4)=>{const _0x499be7=_0x4be095;for(var _0x37e8fc=_0x6ff2c4>0x1?void 0x0:_0x6ff2c4?k(_0x4714ee,_0x53d45e):_0x4714ee,_0x453551=_0x2cbff2[_0x499be7(0x14b)]-0x1,_0x3e7ce2;_0x453551>=0x0;_0x453551--)(_0x3e7ce2=_0x2cbff2[_0x453551])&&(_0x37e8fc=_0x3e7ce2(_0x37e8fc)||_0x37e8fc);return _0x37e8fc;},_=(_0x26619b,_0xd94b76)=>(_0x415ac1,_0x29d130)=>_0xd94b76(_0x415ac1,_0x29d130,_0x26619b);function X(_0x33f314,_0x15e9f8){const _0x37095a=_0x4be095,_0x58e2f1=_0x33f314[_0x37095a(0x104)][0x0];return{..._0x15e9f8,'id':_0x58e2f1[_0x37095a(0x128)],'resolved':_0x33f314['solved']===0x1,'dT':D(_0x58e2f1[_0x37095a(0x11f)]),'personId':_0x58e2f1[_0x37095a(0x12f)],'threadId':_0x58e2f1[_0x37095a(0x109)]};}function ee(_0x421d9c,_0x14134,_0x255509){const _0x4c76ce=_0x4be095;var _0xe0dc1d,_0x53fae1;if(((_0x53fae1=(_0xe0dc1d=_0x421d9c==null?void 0x0:_0x421d9c[_0x4c76ce(0x104)])==null?void 0x0:_0xe0dc1d[_0x4c76ce(0x14b)])!=null?_0x53fae1:0x0)>0x0){const _0x35b8d3=(_0x5a4e43,_0x1655b5)=>({'id':_0x5a4e43['replyId'],'threadId':_0x5a4e43[_0x4c76ce(0x109)],'dT':D(_0x5a4e43[_0x4c76ce(0x11f)]),'personId':_0x5a4e43[_0x4c76ce(0x12f)],'resolved':_0x421d9c[_0x4c76ce(0x13b)]===I[_0x4c76ce(0x154)],'unitId':_0x14134,'subUnitId':_0x255509,'text':JSON[_0x4c76ce(0x140)](_0x5a4e43['content']),'parentId':_0x1655b5}),_0x4b5ffe=_0x35b8d3(_0x421d9c[_0x4c76ce(0x104)][0x0]);return{..._0x4b5ffe,'children':_0x421d9c[_0x4c76ce(0x104)][_0x4c76ce(0x10a)](0x1)[_0x4c76ce(0x116)](_0x100257=>_0x35b8d3(_0x100257,_0x4b5ffe['id']))};}return null;}let f=class{constructor(_0x2a34d9,_0x10788d,_0x463dc1,_0x16d5dc){const _0xb52375=_0x4be095;this['_httpService']=_0x2a34d9,this[_0xb52375(0x13a)]=_0x10788d,this[_0xb52375(0x15c)]=_0x463dc1,this[_0xb52375(0x10f)]=_0x16d5dc;}async[_0x4be095(0x144)](_0x5c4552){const _0xbc9bab=_0x4be095;var _0x155c41,_0x5cbe85;const {parentId:_0x2516e6,unitId:_0x1c00ac,text:_0xcb792a,threadId:_0x4c6716}=_0x5c4552,_0x4afe34=(_0x5cbe85=(_0x155c41=_0xcb792a[_0xbc9bab(0x15a)])==null?void 0x0:_0x155c41['filter'](_0xf3d5c3=>_0xf3d5c3['rangeType']===_0x32b452[_0xbc9bab(0x110)])[_0xbc9bab(0x116)](_0x4e5082=>_0x4e5082[_0xbc9bab(0x13c)]))!=null?_0x5cbe85:[],_0x405e3a=JSON[_0xbc9bab(0x106)](_0xcb792a),_0x18d6f9=(await this[_0xbc9bab(0x15c)]['requireSession'](_0x1c00ac))['getMemberID']();if(_0x2516e6){const _0x5b4168={'memberId':_0x18d6f9,'unitId':_0x1c00ac,'content':_0x405e3a,'mention':_0x4afe34,'threadId':_0x4c6716},_0x4babb5=(await this[_0xbc9bab(0x127)]['post']('/universer-api/comment/unit/'+_0x1c00ac+_0xbc9bab(0x112),{'body':_0x5b4168}))['body'][_0xbc9bab(0x131)];return{..._0x5c4552,'id':_0x4babb5['replyId'],'dT':_0x13f57c(+_0x4babb5[_0xbc9bab(0x11f)])[_0xbc9bab(0x119)](_0xbc9bab(0x12e)),'personId':_0x4babb5[_0xbc9bab(0x12f)]};}else{const _0xb4f414={'memberId':_0x18d6f9,'unitId':_0x1c00ac,'content':_0x405e3a,'mention':_0x4afe34},_0x4bb7d8=await this[_0xbc9bab(0x127)]['post'](_0xbc9bab(0x147)+_0x1c00ac+_0xbc9bab(0x14c),{'body':_0xb4f414});return X(_0x4bb7d8[_0xbc9bab(0x138)][_0xbc9bab(0x118)],_0x5c4552);}}async[_0x4be095(0x152)](_0x4fb029){const _0x4ae3db=_0x4be095;var _0x501d8e,_0x106657;const {text:_0x53400b,unitId:_0x2fb1ea}=_0x4fb029,_0x2c0804=(_0x106657=(_0x501d8e=_0x53400b[_0x4ae3db(0x15a)])==null?void 0x0:_0x501d8e['filter'](_0x2c8247=>_0x2c8247[_0x4ae3db(0x12b)]===_0x32b452['COMMENT'])[_0x4ae3db(0x116)](_0x3a85d7=>_0x3a85d7['rangeId']))!=null?_0x106657:[],_0x5becd9=JSON[_0x4ae3db(0x106)](_0x53400b),_0x9d06cd=_0x4fb029[_0x4ae3db(0x109)],_0x5c582c=_0x4fb029['id'],_0x20f04c={'memberId':(await this['_sessionService'][_0x4ae3db(0x11e)](_0x2fb1ea))[_0x4ae3db(0x126)](),'unitId':_0x2fb1ea,'threadId':_0x9d06cd,'mention':_0x2c0804,'content':_0x5becd9,'replyId':_0x5c582c},_0x207485=await this[_0x4ae3db(0x127)][_0x4ae3db(0x137)](_0x4ae3db(0x147)+_0x2fb1ea+_0x4ae3db(0x145),{'body':_0x20f04c});return!_0x207485[_0x4ae3db(0x138)][_0x4ae3db(0x15b)]||_0x207485[_0x4ae3db(0x138)][_0x4ae3db(0x15b)][_0x4ae3db(0x156)]===0x1;}async[_0x4be095(0x151)](_0x199cc7){const _0x3271ce=_0x4be095,{unitId:_0x219814}=_0x199cc7,_0x7828d9=_0x199cc7[_0x3271ce(0x109)],_0x3e6204={'memberId':this[_0x3271ce(0x13a)]['getCurrentUser']()['userID'],'unitId':_0x219814,'threadId':_0x7828d9,'solved':_0x199cc7['resolved']?I[_0x3271ce(0x154)]:I[_0x3271ce(0x113)]},_0x44137f=await this['_httpService'][_0x3271ce(0x137)](_0x3271ce(0x147)+_0x219814+'/solved',{'body':_0x3e6204});return!_0x44137f['body'][_0x3271ce(0x15b)]||_0x44137f[_0x3271ce(0x138)]['error']['code']===0x1;}async['deleteComment'](_0x1f8a57,_0x186baf,_0x4c5f29,_0x158777){const _0x48dd08=_0x4be095,_0x2a7747={'memberId':(await this['_sessionService']['requireSession'](_0x1f8a57))[_0x48dd08(0x126)](),'threadId':_0x4c5f29,'replyId':_0x158777,'unitId':_0x1f8a57},_0x3c7f1c=await this[_0x48dd08(0x127)][_0x48dd08(0x137)](_0x48dd08(0x147)+_0x1f8a57+_0x48dd08(0x14e),{'body':_0x2a7747});return!_0x3c7f1c['body']['error']||_0x3c7f1c[_0x48dd08(0x138)][_0x48dd08(0x15b)][_0x48dd08(0x156)]===0x1;}async['listComments'](_0x3fd2e8,_0x2ca23a,_0x44dbf3){const _0x20fbeb=_0x4be095,_0x3780de={'unitId':_0x3fd2e8,'threadId':_0x44dbf3},_0x10c092=await this[_0x20fbeb(0x127)][_0x20fbeb(0x137)](_0x20fbeb(0x147)+_0x3fd2e8+_0x20fbeb(0x11a),{'body':_0x3780de}),_0x4d6e95=_0x44dbf3[_0x20fbeb(0x116)](_0x27b28a=>ee(_0x10c092['body']['comments'][_0x27b28a],_0x3fd2e8,_0x2ca23a))[_0x20fbeb(0x10b)](Boolean);return Object[_0x20fbeb(0x143)](_0x10c092[_0x20fbeb(0x138)]['users'])[_0x20fbeb(0x107)](_0x43543e=>{const _0x547a95=_0x20fbeb;this[_0x547a95(0x13a)][_0x547a95(0x133)](_0x43543e);}),_0x4d6e95;}[_0x4be095(0x10e)](_0x2803ab){const _0x5b4993=_0x4be095;return{'id':_0x2803ab['id'],'threadId':_0x2803ab[_0x5b4993(0x109)],'ref':_0x2803ab[_0x5b4993(0x14a)]};}};function _0x2140(){const _0x2adab7=['values','addComment','/edit','_init','/universer-api/comment/unit/','Unknown','getUnit','ref','length','/add','1DsbBNd','/delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','resolveComment','updateComment','get','Solved','1849212eaZzcN','code','50803570HQnFoL','1332279BTtIWs','_initDataSource','customRanges','error','_sessionService','getOwnPropertyDescriptor','_commentService','content','syncUpdateMutationToColla','replies','pipe','stringify','forEach','parentId','threadId','slice','filter','11akaRPe','pluginName','saveCommentToSnapshot','_injector','COMMENT','_configService','/reply','OpenOrReOpen','1267385bifqvC','_threadCommentDataSourceService','map','Edit','comment','format','/list','dataSource','24qWZdoP','Reply','requireSession','createTimestamp','/universer-api/user/list','disposeWithMe','subscribe','Delete','userID','commentUpdate$','getMemberID','_httpService','replyId','type','3437744iDfKNK','rangeType','onReady','62754YZTMol','YYYY/MM/DD\x20HH:mm','userId','root','reply','_threadCommentDataSource','addUser','649926GqKXwc','735cOeuNc','deleteComment','post','body','Solve','_userService','solved','rangeId','_threadCommentModel','user','UNRECOGNIZED','parse','_config','size'];_0x2140=function(){return _0x2adab7;};return _0x2140();}f=Q([_(0x0,_0x397f67(_0x2e19d5)),_(0x1,_0x397f67(_0x57bf20)),_(0x2,_0x397f67(_0x211d73)),_(0x3,_0x397f67(_0xc959e6))],f);var re=Object[_0x4be095(0x100)],te=(_0x5a4a3c,_0x45b7aa,_0x313bb7,_0x428ae2)=>{const _0x5dad5c=_0x4be095;for(var _0x4203e9=_0x428ae2>0x1?void 0x0:_0x428ae2?re(_0x45b7aa,_0x313bb7):_0x45b7aa,_0x1209ca=_0x5a4a3c[_0x5dad5c(0x14b)]-0x1,_0x26f574;_0x1209ca>=0x0;_0x1209ca--)(_0x26f574=_0x5a4a3c[_0x1209ca])&&(_0x4203e9=_0x26f574(_0x4203e9)||_0x4203e9);return _0x4203e9;},N=(_0x4fd238,_0x199b12)=>(_0x2d1e47,_0x2c4ffc)=>_0x199b12(_0x2d1e47,_0x2c4ffc,_0x4fd238);let g=class extends _0x3714c3{constructor(_0x30440c,_0x54fe54){const _0x5af7ed=_0x4be095;super(),this[_0x5af7ed(0x115)]=_0x30440c,this[_0x5af7ed(0x132)]=_0x54fe54,this[_0x5af7ed(0x159)]();}[_0x4be095(0x159)](){const _0x4c805c=_0x4be095;this[_0x4c805c(0x115)][_0x4c805c(0x11b)]=this[_0x4c805c(0x132)],this[_0x4c805c(0x115)][_0x4c805c(0x103)]=!0x1;}};g=te([N(0x0,_0x3222e2),N(0x1,_0x397f67(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x2a86e2,_0x3f721d,_0x3e1fd5)=>_0x3f721d in _0x2a86e2?se(_0x2a86e2,_0x3f721d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e1fd5}):_0x2a86e2[_0x3f721d]=_0x3e1fd5,ie=(_0x5b733f,_0x74d5,_0x51f4ec,_0x9ffcc1)=>{const _0x457dc5=_0x4be095;for(var _0x1edd34=_0x9ffcc1>0x1?void 0x0:_0x9ffcc1?oe(_0x74d5,_0x51f4ec):_0x74d5,_0x3c5226=_0x5b733f[_0x457dc5(0x14b)]-0x1,_0x5ad2f1;_0x3c5226>=0x0;_0x3c5226--)(_0x5ad2f1=_0x5b733f[_0x3c5226])&&(_0x1edd34=_0x5ad2f1(_0x1edd34)||_0x1edd34);return _0x1edd34;},w=(_0x365af3,_0x2cadd7)=>(_0x5f4afc,_0xc0a57a)=>_0x2cadd7(_0x5f4afc,_0xc0a57a,_0x365af3),$=(_0x48dbe7,_0x265459,_0x57b22a)=>ne(_0x48dbe7,typeof _0x265459!='symbol'?_0x265459+'':_0x265459,_0x57b22a);let b=class extends _0x29b97b{constructor(_0x5323fc=M,_0x3877fe,_0x5e38e0){const _0xc73e41=_0x4be095;super(),this[_0xc73e41(0x141)]=_0x5323fc,this['_injector']=_0x3877fe,this[_0xc73e41(0x111)]=_0x5e38e0;const {..._0x1c1163}=_0x596754({},M,this[_0xc73e41(0x141)]);this[_0xc73e41(0x111)][_0xc73e41(0x150)](z,_0x1c1163);}['onStarting'](){const _0x24cd04=_0x4be095;[[f],[g],[S]][_0x24cd04(0x107)](_0x3fca81=>{const _0x4480c5=_0x24cd04;this[_0x4480c5(0x10f)]['add'](_0x3fca81);});}[_0x4be095(0x12c)](){const _0x3e06bb=_0x4be095;this[_0x3e06bb(0x10f)]['get'](g),this[_0x3e06bb(0x10f)][_0x3e06bb(0x153)](S);}};function _0x46ea(_0x24dd1f,_0x5d9bc0){const _0x21405a=_0x2140();return _0x46ea=function(_0x46eabc,_0x481a1a){_0x46eabc=_0x46eabc-0x100;let _0x30d7c9=_0x21405a[_0x46eabc];return _0x30d7c9;},_0x46ea(_0x24dd1f,_0x5d9bc0);}$(b,_0x4be095(0x10d),W),$(b,_0x4be095(0x129),_0x15cbc2['UNIVER_UNKNOWN']),b=ie([_0x5f982(_0x5c16f9,_0x1dff39,_0xea7e1c),w(0x1,_0x397f67(_0xc959e6)),w(0x2,_0x129d4e)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2069b1=_0x43de;(function(_0x380a17,_0x180abc){const _0x512c22=_0x43de,_0xf23808=_0x380a17();while(!![]){try{const _0x23b653=-parseInt(_0x512c22(0x202))/0x1*(-parseInt(_0x512c22(0x211))/0x2)+parseInt(_0x512c22(0x212))/0x3*(parseInt(_0x512c22(0x1f7))/0x4)+parseInt(_0x512c22(0x204))/0x5*(-parseInt(_0x512c22(0x235))/0x6)+-parseInt(_0x512c22(0x20f))/0x7+parseInt(_0x512c22(0x231))/0x8*(-parseInt(_0x512c22(0x1ed))/0x9)+-parseInt(_0x512c22(0x1f1))/0xa+parseInt(_0x512c22(0x249))/0xb;if(_0x23b653===_0x180abc)break;else _0xf23808['push'](_0xf23808['shift']());}catch(_0x4008b3){_0xf23808['push'](_0xf23808['shift']());}}}(_0x5a9a,0xc9b63));import{CommentService as _0x13b92b,CollaborationSessionService as _0x497b32,UniverCollaborationClientPlugin as _0x293a48}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x177d79}from'@univerjs-pro/license';import{dayjs as _0x3db8db,UserManagerService as _0x4a0daf,Inject as _0x29435d,Injector as _0x4a982a,Disposable as _0xcf5e6a,CustomRangeType as _0x20a37b,UniverInstanceType as _0x388da4,DependentOn as _0x4bdd65,IConfigService as _0x10e4b8,Plugin as _0x336457,merge as _0x29ae8d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x40bc7d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x307483,IThreadCommentDataSourceService as _0x50d99d}from'@univerjs/thread-comment';import{bufferTime as _0x2cdc2a}from'rxjs';import{HTTPService as _0x28bbac}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2869f4=>(_0x2869f4[_0x2869f4['OpenOrReOpen']=0x0]=_0x2069b1(0x246),_0x2869f4[_0x2869f4[_0x2069b1(0x23a)]=0x1]='Solved',_0x2869f4[_0x2869f4[_0x2069b1(0x208)]=-0x1]='UNRECOGNIZED',_0x2869f4))(I||{}),v=(_0x4886b4=>(_0x4886b4[_0x4886b4[_0x2069b1(0x22a)]=0x0]=_0x2069b1(0x22a),_0x4886b4[_0x4886b4['Add']=0x1]=_0x2069b1(0x1ec),_0x4886b4[_0x4886b4[_0x2069b1(0x245)]=0x2]=_0x2069b1(0x245),_0x4886b4[_0x4886b4[_0x2069b1(0x244)]=0x3]=_0x2069b1(0x244),_0x4886b4[_0x4886b4[_0x2069b1(0x20d)]=0x4]=_0x2069b1(0x20d),_0x4886b4[_0x4886b4[_0x2069b1(0x241)]=0x5]=_0x2069b1(0x241),_0x4886b4[_0x4886b4[_0x2069b1(0x208)]=-0x1]=_0x2069b1(0x208),_0x4886b4))(v||{});const D=_0x370191=>_0x3db8db(new Date(+_0x370191))[_0x2069b1(0x210)](_0x2069b1(0x232)),B=async(_0x191f0d,_0x23776b)=>{const _0x187ad9=_0x2069b1,_0x3ecd4a=_0x191f0d[_0x187ad9(0x1f8)](_0x4a0daf),_0x478deb=_0x191f0d[_0x187ad9(0x1f8)](_0x28bbac);_0x23776b[_0x187ad9(0x206)](_0x3b836a=>{_0x3ecd4a['getUser'](_0x3b836a)&&_0x23776b['delete'](_0x3b836a);}),_0x23776b['size']&&(await _0x478deb[_0x187ad9(0x1f8)](_0x187ad9(0x1f3),{'params':{'userIDs':[..._0x23776b]}}))[_0x187ad9(0x1eb)][_0x187ad9(0x236)][_0x187ad9(0x206)](_0x2ab20f=>{const _0x28dba8=_0x187ad9;_0x2ab20f&&_0x3ecd4a[_0x28dba8(0x1fd)](_0x2ab20f);});};var K=Object[_0x2069b1(0x1f0)],V=(_0xc1efc,_0x23a962,_0x2f879a,_0x39b1b5)=>{const _0x48ea24=_0x2069b1;for(var _0x2271cc=_0x39b1b5>0x1?void 0x0:_0x39b1b5?K(_0x23a962,_0x2f879a):_0x23a962,_0x442cad=_0xc1efc[_0x48ea24(0x243)]-0x1,_0x140cdf;_0x442cad>=0x0;_0x442cad--)(_0x140cdf=_0xc1efc[_0x442cad])&&(_0x2271cc=_0x140cdf(_0x2271cc)||_0x2271cc);return _0x2271cc;},p=(_0x20cc3e,_0x213cb1)=>(_0x4562f0,_0x36ca17)=>_0x213cb1(_0x4562f0,_0x36ca17,_0x20cc3e);let S=class extends _0xcf5e6a{constructor(_0x5e4639,_0x4ad17a,_0x1df9ef,_0x43e464){const _0x592c51=_0x2069b1;super(),this[_0x592c51(0x1f2)]=_0x5e4639,this[_0x592c51(0x201)]=_0x4ad17a,this['_userService']=_0x1df9ef,this['_injector']=_0x43e464,this['_init'](),this[_0x592c51(0x217)]();}['_initUserSync'](){const _0x1bb593=_0x2069b1;this['disposeWithMe'](this[_0x1bb593(0x201)][_0x1bb593(0x21a)][_0x1bb593(0x1e6)](_0x2cdc2a(0x10))[_0x1bb593(0x242)](_0x14c196=>{const _0x5196a3=_0x1bb593,_0x1ac635=new Set();_0x14c196[_0x5196a3(0x206)](_0x5f3b47=>{const _0x8685af=_0x5196a3;switch(_0x5f3b47[_0x8685af(0x229)]){case _0x8685af(0x226):{const _0x3eb9ac=_0x5f3b47[_0x8685af(0x239)]['personId'];_0x1ac635[_0x8685af(0x226)](_0x3eb9ac);break;}}}),B(this[_0x5196a3(0x20e)],_0x1ac635);}));}['_init'](){const _0x191103=_0x2069b1;this['disposeWithMe'](this[_0x191103(0x1f2)][_0x191103(0x21a)]['subscribe'](async _0x576bff=>{const _0x54e210=_0x191103;var _0x1e86ed,_0x513627,_0x562641,_0x5c215c;const _0x3fe2bf=(_0x1e86ed=this['_threadCommentModel'][_0x54e210(0x22d)](_0x576bff[_0x54e210(0x21d)])[_0x54e210(0x21c)](_0xc814d3=>_0xc814d3[_0x54e210(0x233)]===_0x576bff[_0x54e210(0x233)]))==null?void 0x0:_0x1e86ed[_0x54e210(0x1fb)];if(!_0x3fe2bf)return;const {unitId:_0x38e42b,subUnitId:_0x32a05e}=_0x3fe2bf;switch(_0x576bff[_0x54e210(0x22b)]&&this[_0x54e210(0x224)][_0x54e210(0x1fd)](_0x576bff['user']),_0x576bff[_0x54e210(0x229)]){case v[_0x54e210(0x1ec)]:break;case v['Reply']:{this['_threadCommentModel'][_0x54e210(0x1e8)](_0x38e42b,_0x32a05e,{'unitId':_0x38e42b,'subUnitId':_0x32a05e,'ref':'','id':_0x576bff[_0x54e210(0x23e)],'dT':D(+_0x576bff[_0x54e210(0x23c)]),'threadId':_0x576bff[_0x54e210(0x233)],'personId':(_0x562641=(_0x513627=_0x576bff[_0x54e210(0x22b)])==null?void 0x0:_0x513627[_0x54e210(0x214)])!=null?_0x562641:_0x576bff[_0x54e210(0x223)],'text':JSON[_0x54e210(0x216)](_0x576bff[_0x54e210(0x238)]),'parentId':_0x3fe2bf['id']});break;}case v[_0x54e210(0x20d)]:{const _0x15bd4d=this[_0x54e210(0x201)][_0x54e210(0x215)](_0x38e42b,_0x32a05e,_0x576bff[_0x54e210(0x23e)]);_0x15bd4d&&_0x15bd4d[_0x54e210(0x209)]&&this[_0x54e210(0x201)]['deleteComment'](_0x38e42b,_0x32a05e,_0x576bff[_0x54e210(0x23e)]);break;}case v[_0x54e210(0x244)]:{this[_0x54e210(0x201)][_0x54e210(0x22c)](_0x38e42b,_0x32a05e,{'commentId':_0x576bff['replyId'],'text':JSON['parse'](_0x576bff[_0x54e210(0x238)])});break;}case v['Solve']:{const _0x50c2c4=(_0x5c215c=this[_0x54e210(0x201)][_0x54e210(0x22d)](_0x576bff[_0x54e210(0x21d)])[_0x54e210(0x21c)](_0x107d79=>_0x107d79[_0x54e210(0x233)]===_0x576bff['threadId']))==null?void 0x0:_0x5c215c[_0x54e210(0x1fb)];_0x50c2c4&&this[_0x54e210(0x201)][_0x54e210(0x1f6)](_0x38e42b,_0x32a05e,_0x50c2c4['id'],_0x576bff['solved']===I[_0x54e210(0x23a)]);break;}}}));}};function _0x5a9a(){const _0x5366f2=['commentUpdate$','replies','find','unitId','saveCommentToSnapshot','_httpService','dataSource','stringify','solved','userId','_userService','/solved','add','_configService','setConfig','type','Unknown','user','updateComment','getUnit','/edit','/reply','filter','69256DAIiqt','YYYY/MM/DD\x20HH:mm','threadId','pluginName','2082jCSCpC','users','symbol','content','payload','Solved','_threadCommentDataSource','createTimestamp','getMemberID','replyId','_sessionService','post','Solve','subscribe','length','Edit','Reply','OpenOrReOpen','rangeType','syncUpdateMutationToColla','31023069BMRycz','reply','pipe','customRanges','addComment','map','_threadCommentDataSourceService','body','Add','1629QhDmIA','onStarting','error','getOwnPropertyDescriptor','7244530jbqmzq','_commentService','/universer-api/user/list','COMMENT','values','resolveComment','36YvsnLp','get','/add','ref','root','requireSession','addUser','_config','UNIVER_UNKNOWN','comment','_threadCommentModel','424AGAVSP','listComments','10655TPPakK','rangeId','forEach','getCurrentUser','UNRECOGNIZED','parentId','code','/universer-api/comment/unit/','/delete','Delete','_injector','3187954BAQHAN','format','844drDleX','437751EsPYEn','thread-comment-data-source.config','userID','getComment','parse','_initUserSync','_initDataSource','defineProperty'];_0x5a9a=function(){return _0x5366f2;};return _0x5a9a();}function _0x43de(_0x266f57,_0xd09ba3){const _0x5a9a09=_0x5a9a();return _0x43de=function(_0x43de40,_0x5853ef){_0x43de40=_0x43de40-0x1e6;let _0x3a8bd3=_0x5a9a09[_0x43de40];return _0x3a8bd3;},_0x43de(_0x266f57,_0xd09ba3);}S=V([p(0x0,_0x29435d(_0x13b92b)),p(0x1,_0x29435d(_0x307483)),p(0x2,_0x29435d(_0x4a0daf)),p(0x3,_0x29435d(_0x4a982a))],S);const z=_0x2069b1(0x213),M={};var k=Object[_0x2069b1(0x1f0)],Q=(_0x4b650e,_0x2d1575,_0x32a1f4,_0x254d33)=>{for(var _0x4ff3c5=_0x254d33>0x1?void 0x0:_0x254d33?k(_0x2d1575,_0x32a1f4):_0x2d1575,_0xcc5436=_0x4b650e['length']-0x1,_0x3c0264;_0xcc5436>=0x0;_0xcc5436--)(_0x3c0264=_0x4b650e[_0xcc5436])&&(_0x4ff3c5=_0x3c0264(_0x4ff3c5)||_0x4ff3c5);return _0x4ff3c5;},_=(_0x2bd5f4,_0x32c032)=>(_0x28a6e4,_0x3e8e36)=>_0x32c032(_0x28a6e4,_0x3e8e36,_0x2bd5f4);function X(_0x2f4f42,_0x2b125f){const _0x51c332=_0x2069b1,_0x5056fc=_0x2f4f42[_0x51c332(0x21b)][0x0];return{..._0x2b125f,'id':_0x5056fc['replyId'],'resolved':_0x2f4f42[_0x51c332(0x222)]===0x1,'dT':D(_0x5056fc[_0x51c332(0x23c)]),'personId':_0x5056fc[_0x51c332(0x223)],'threadId':_0x5056fc[_0x51c332(0x233)]};}function ee(_0x300d9d,_0x1645fb,_0x3e6823){const _0x1e4b94=_0x2069b1;var _0x395378,_0x3d0378;if(((_0x3d0378=(_0x395378=_0x300d9d==null?void 0x0:_0x300d9d[_0x1e4b94(0x21b)])==null?void 0x0:_0x395378[_0x1e4b94(0x243)])!=null?_0x3d0378:0x0)>0x0){const _0x2be729=(_0x1fe7c3,_0x22b6aa)=>({'id':_0x1fe7c3[_0x1e4b94(0x23e)],'threadId':_0x1fe7c3['threadId'],'dT':D(_0x1fe7c3[_0x1e4b94(0x23c)]),'personId':_0x1fe7c3[_0x1e4b94(0x223)],'resolved':_0x300d9d[_0x1e4b94(0x222)]===I[_0x1e4b94(0x23a)],'unitId':_0x1645fb,'subUnitId':_0x3e6823,'text':JSON[_0x1e4b94(0x216)](_0x1fe7c3['content']),'parentId':_0x22b6aa}),_0x25549e=_0x2be729(_0x300d9d['replies'][0x0]);return{..._0x25549e,'children':_0x300d9d['replies']['slice'](0x1)[_0x1e4b94(0x1e9)](_0x42081c=>_0x2be729(_0x42081c,_0x25549e['id']))};}return null;}let f=class{constructor(_0x2973e1,_0x4c581d,_0x4112ae,_0x3c713d){const _0x4f683f=_0x2069b1;this[_0x4f683f(0x21f)]=_0x2973e1,this[_0x4f683f(0x224)]=_0x4c581d,this[_0x4f683f(0x23f)]=_0x4112ae,this['_injector']=_0x3c713d;}async[_0x2069b1(0x1e8)](_0x57ba0c){const _0xc74b=_0x2069b1;var _0x260f16,_0x3aec62;const {parentId:_0x37b97d,unitId:_0x25ebf1,text:_0x5881ae,threadId:_0x208bba}=_0x57ba0c,_0x22a188=(_0x3aec62=(_0x260f16=_0x5881ae['customRanges'])==null?void 0x0:_0x260f16['filter'](_0x4cf826=>_0x4cf826['rangeType']===_0x20a37b[_0xc74b(0x1f4)])[_0xc74b(0x1e9)](_0x4947a6=>_0x4947a6[_0xc74b(0x205)]))!=null?_0x3aec62:[],_0x53dc8e=JSON['stringify'](_0x5881ae),_0x2893aa=(await this[_0xc74b(0x23f)][_0xc74b(0x1fc)](_0x25ebf1))[_0xc74b(0x23d)]();if(_0x37b97d){const _0x447f4c={'memberId':_0x2893aa,'unitId':_0x25ebf1,'content':_0x53dc8e,'mention':_0x22a188,'threadId':_0x208bba},_0x8537e3=(await this[_0xc74b(0x21f)][_0xc74b(0x240)](_0xc74b(0x20b)+_0x25ebf1+_0xc74b(0x22f),{'body':_0x447f4c}))[_0xc74b(0x1eb)][_0xc74b(0x24a)];return{..._0x57ba0c,'id':_0x8537e3[_0xc74b(0x23e)],'dT':_0x3db8db(+_0x8537e3['createTimestamp'])[_0xc74b(0x210)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x8537e3['userId']};}else{const _0xbaf400={'memberId':_0x2893aa,'unitId':_0x25ebf1,'content':_0x53dc8e,'mention':_0x22a188},_0x3beb00=await this[_0xc74b(0x21f)][_0xc74b(0x240)]('/universer-api/comment/unit/'+_0x25ebf1+_0xc74b(0x1f9),{'body':_0xbaf400});return X(_0x3beb00['body'][_0xc74b(0x200)],_0x57ba0c);}}async['updateComment'](_0x33469c){const _0x2bb8dd=_0x2069b1;var _0x57cd8f,_0x326866;const {text:_0x3d2d88,unitId:_0x484fbb}=_0x33469c,_0x23435a=(_0x326866=(_0x57cd8f=_0x3d2d88[_0x2bb8dd(0x1e7)])==null?void 0x0:_0x57cd8f[_0x2bb8dd(0x230)](_0x52c847=>_0x52c847[_0x2bb8dd(0x247)]===_0x20a37b['COMMENT'])[_0x2bb8dd(0x1e9)](_0x24efd7=>_0x24efd7['rangeId']))!=null?_0x326866:[],_0x136a5a=JSON[_0x2bb8dd(0x221)](_0x3d2d88),_0x161502=_0x33469c[_0x2bb8dd(0x233)],_0x100d9b=_0x33469c['id'],_0x504d21={'memberId':(await this[_0x2bb8dd(0x23f)][_0x2bb8dd(0x1fc)](_0x484fbb))['getMemberID'](),'unitId':_0x484fbb,'threadId':_0x161502,'mention':_0x23435a,'content':_0x136a5a,'replyId':_0x100d9b},_0x54da1f=await this[_0x2bb8dd(0x21f)][_0x2bb8dd(0x240)](_0x2bb8dd(0x20b)+_0x484fbb+_0x2bb8dd(0x22e),{'body':_0x504d21});return!_0x54da1f[_0x2bb8dd(0x1eb)][_0x2bb8dd(0x1ef)]||_0x54da1f[_0x2bb8dd(0x1eb)][_0x2bb8dd(0x1ef)][_0x2bb8dd(0x20a)]===0x1;}async[_0x2069b1(0x1f6)](_0x526be0){const _0x2c8d26=_0x2069b1,{unitId:_0x3222c2}=_0x526be0,_0x4d38e0=_0x526be0[_0x2c8d26(0x233)],_0x2d0a68={'memberId':this[_0x2c8d26(0x224)][_0x2c8d26(0x207)]()[_0x2c8d26(0x214)],'unitId':_0x3222c2,'threadId':_0x4d38e0,'solved':_0x526be0['resolved']?I['Solved']:I[_0x2c8d26(0x246)]},_0x36fd32=await this['_httpService'][_0x2c8d26(0x240)](_0x2c8d26(0x20b)+_0x3222c2+_0x2c8d26(0x225),{'body':_0x2d0a68});return!_0x36fd32[_0x2c8d26(0x1eb)]['error']||_0x36fd32[_0x2c8d26(0x1eb)][_0x2c8d26(0x1ef)][_0x2c8d26(0x20a)]===0x1;}async['deleteComment'](_0x23cc3f,_0x570924,_0x20daa7,_0x2c124e){const _0x5168ef=_0x2069b1,_0x406cea={'memberId':(await this[_0x5168ef(0x23f)][_0x5168ef(0x1fc)](_0x23cc3f))[_0x5168ef(0x23d)](),'threadId':_0x20daa7,'replyId':_0x2c124e,'unitId':_0x23cc3f},_0x575c63=await this[_0x5168ef(0x21f)]['post']('/universer-api/comment/unit/'+_0x23cc3f+_0x5168ef(0x20c),{'body':_0x406cea});return!_0x575c63['body'][_0x5168ef(0x1ef)]||_0x575c63[_0x5168ef(0x1eb)][_0x5168ef(0x1ef)]['code']===0x1;}async[_0x2069b1(0x203)](_0x5bf68c,_0x1da9d9,_0x13095e){const _0x5f1305=_0x2069b1,_0x917eb7={'unitId':_0x5bf68c,'threadId':_0x13095e},_0x1de068=await this[_0x5f1305(0x21f)][_0x5f1305(0x240)](_0x5f1305(0x20b)+_0x5bf68c+'/list',{'body':_0x917eb7}),_0x58a87f=_0x13095e['map'](_0x38c997=>ee(_0x1de068[_0x5f1305(0x1eb)]['comments'][_0x38c997],_0x5bf68c,_0x1da9d9))[_0x5f1305(0x230)](Boolean);return Object[_0x5f1305(0x1f5)](_0x1de068[_0x5f1305(0x1eb)][_0x5f1305(0x236)])[_0x5f1305(0x206)](_0x1a2e90=>{const _0x29c53b=_0x5f1305;this[_0x29c53b(0x224)][_0x29c53b(0x1fd)](_0x1a2e90);}),_0x58a87f;}[_0x2069b1(0x21e)](_0x5b685d){const _0x35c709=_0x2069b1;return{'id':_0x5b685d['id'],'threadId':_0x5b685d['threadId'],'ref':_0x5b685d[_0x35c709(0x1fa)]};}};f=Q([_(0x0,_0x29435d(_0x28bbac)),_(0x1,_0x29435d(_0x4a0daf)),_(0x2,_0x29435d(_0x497b32)),_(0x3,_0x29435d(_0x4a982a))],f);var re=Object[_0x2069b1(0x1f0)],te=(_0x53a279,_0x1e8bf8,_0x5da0b2,_0x41acd3)=>{const _0x4f0473=_0x2069b1;for(var _0x402979=_0x41acd3>0x1?void 0x0:_0x41acd3?re(_0x1e8bf8,_0x5da0b2):_0x1e8bf8,_0x8614a8=_0x53a279[_0x4f0473(0x243)]-0x1,_0x3993e3;_0x8614a8>=0x0;_0x8614a8--)(_0x3993e3=_0x53a279[_0x8614a8])&&(_0x402979=_0x3993e3(_0x402979)||_0x402979);return _0x402979;},N=(_0x3edf70,_0x404ed6)=>(_0x342394,_0x2ea15a)=>_0x404ed6(_0x342394,_0x2ea15a,_0x3edf70);let g=class extends _0xcf5e6a{constructor(_0x10394d,_0x3d1afd){const _0x31a5c4=_0x2069b1;super(),this[_0x31a5c4(0x1ea)]=_0x10394d,this[_0x31a5c4(0x23b)]=_0x3d1afd,this['_initDataSource']();}[_0x2069b1(0x218)](){const _0x3ee648=_0x2069b1;this['_threadCommentDataSourceService'][_0x3ee648(0x220)]=this['_threadCommentDataSource'],this[_0x3ee648(0x1ea)][_0x3ee648(0x248)]=!0x1;}};g=te([N(0x0,_0x50d99d),N(0x1,_0x29435d(f))],g);var se=Object[_0x2069b1(0x219)],oe=Object[_0x2069b1(0x1f0)],ne=(_0x145b1f,_0x1d1939,_0x483275)=>_0x1d1939 in _0x145b1f?se(_0x145b1f,_0x1d1939,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x483275}):_0x145b1f[_0x1d1939]=_0x483275,ie=(_0x5c0722,_0x1a2999,_0x186fe8,_0x27cb6)=>{for(var _0x23c14e=_0x27cb6>0x1?void 0x0:_0x27cb6?oe(_0x1a2999,_0x186fe8):_0x1a2999,_0x3aa58f=_0x5c0722['length']-0x1,_0x296568;_0x3aa58f>=0x0;_0x3aa58f--)(_0x296568=_0x5c0722[_0x3aa58f])&&(_0x23c14e=_0x296568(_0x23c14e)||_0x23c14e);return _0x23c14e;},w=(_0x9c69e8,_0x3e5640)=>(_0x5c9264,_0x5b91d0)=>_0x3e5640(_0x5c9264,_0x5b91d0,_0x9c69e8),$=(_0x1188fa,_0xecfa3c,_0x3f0e32)=>ne(_0x1188fa,typeof _0xecfa3c!=_0x2069b1(0x237)?_0xecfa3c+'':_0xecfa3c,_0x3f0e32);let b=class extends _0x336457{constructor(_0x5b7b71=M,_0x54a116,_0x232ede){const _0x4a7efd=_0x2069b1;super(),this[_0x4a7efd(0x1fe)]=_0x5b7b71,this['_injector']=_0x54a116,this[_0x4a7efd(0x227)]=_0x232ede;const {..._0x55939b}=_0x29ae8d({},M,this[_0x4a7efd(0x1fe)]);this[_0x4a7efd(0x227)][_0x4a7efd(0x228)](z,_0x55939b);}[_0x2069b1(0x1ee)](){[[f],[g],[S]]['forEach'](_0x53b308=>{const _0x125688=_0x43de;this[_0x125688(0x20e)]['add'](_0x53b308);});}['onReady'](){const _0x828de8=_0x2069b1;this['_injector'][_0x828de8(0x1f8)](g),this[_0x828de8(0x20e)][_0x828de8(0x1f8)](S);}};$(b,_0x2069b1(0x234),W),$(b,_0x2069b1(0x229),_0x388da4[_0x2069b1(0x1ff)]),b=ie([_0x4bdd65(_0x40bc7d,_0x293a48,_0x177d79),w(0x1,_0x29435d(_0x4a982a)),w(0x2,_0x10e4b8)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4be095=_0x46ea;(function(_0x45e5b3,_0x4fb667){const _0x23c293=_0x46ea,_0xba98f1=_0x45e5b3();while(!![]){try{const _0x11a11c=parseInt(_0x23c293(0x14d))/0x1*(-parseInt(_0x23c293(0x12a))/0x2)+-parseInt(_0x23c293(0x158))/0x3+-parseInt(_0x23c293(0x155))/0x4+parseInt(_0x23c293(0x135))/0x5*(-parseInt(_0x23c293(0x12d))/0x6)+-parseInt(_0x23c293(0x114))/0x7+-parseInt(_0x23c293(0x11c))/0x8*(-parseInt(_0x23c293(0x134))/0x9)+-parseInt(_0x23c293(0x157))/0xa*(-parseInt(_0x23c293(0x10c))/0xb);if(_0x11a11c===_0x4fb667)break;else _0xba98f1['push'](_0xba98f1['shift']());}catch(_0x164068){_0xba98f1['push'](_0xba98f1['shift']());}}}(_0x2140,0xe8b73));import{CommentService as _0x560a2f,CollaborationSessionService as _0x211d73,UniverCollaborationClientPlugin as _0x1dff39}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xea7e1c}from'@univerjs-pro/license';import{dayjs as _0x13f57c,UserManagerService as _0x57bf20,Inject as _0x397f67,Injector as _0xc959e6,Disposable as _0x3714c3,CustomRangeType as _0x32b452,UniverInstanceType as _0x15cbc2,DependentOn as _0x5f982,IConfigService as _0x129d4e,Plugin as _0x29b97b,merge as _0x596754}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5c16f9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4bce87,IThreadCommentDataSourceService as _0x3222e2}from'@univerjs/thread-comment';import{bufferTime as _0x1c1e04}from'rxjs';import{HTTPService as _0x2e19d5}from'@univerjs/network';const W=_0x4be095(0x14f);var I=(_0x4c7dcd=>(_0x4c7dcd[_0x4c7dcd[_0x4be095(0x113)]=0x0]='OpenOrReOpen',_0x4c7dcd[_0x4c7dcd[_0x4be095(0x154)]=0x1]=_0x4be095(0x154),_0x4c7dcd[_0x4c7dcd['UNRECOGNIZED']=-0x1]=_0x4be095(0x13f),_0x4c7dcd))(I||{}),v=(_0x810411=>(_0x810411[_0x810411[_0x4be095(0x148)]=0x0]=_0x4be095(0x148),_0x810411[_0x810411['Add']=0x1]='Add',_0x810411[_0x810411[_0x4be095(0x11d)]=0x2]=_0x4be095(0x11d),_0x810411[_0x810411[_0x4be095(0x117)]=0x3]=_0x4be095(0x117),_0x810411[_0x810411[_0x4be095(0x123)]=0x4]=_0x4be095(0x123),_0x810411[_0x810411[_0x4be095(0x139)]=0x5]='Solve',_0x810411[_0x810411['UNRECOGNIZED']=-0x1]=_0x4be095(0x13f),_0x810411))(v||{});const D=_0x38968f=>_0x13f57c(new Date(+_0x38968f))[_0x4be095(0x119)](_0x4be095(0x12e)),B=async(_0x1cb238,_0x4c95f7)=>{const _0x265463=_0x4be095,_0x426a8e=_0x1cb238[_0x265463(0x153)](_0x57bf20),_0x5d1acb=_0x1cb238[_0x265463(0x153)](_0x2e19d5);_0x4c95f7[_0x265463(0x107)](_0x2e621c=>{_0x426a8e['getUser'](_0x2e621c)&&_0x4c95f7['delete'](_0x2e621c);}),_0x4c95f7[_0x265463(0x142)]&&(await _0x5d1acb[_0x265463(0x153)](_0x265463(0x120),{'params':{'userIDs':[..._0x4c95f7]}}))[_0x265463(0x138)]['users'][_0x265463(0x107)](_0x3df401=>{const _0x2b7804=_0x265463;_0x3df401&&_0x426a8e[_0x2b7804(0x133)](_0x3df401);});};var K=Object[_0x4be095(0x100)],V=(_0x5e3472,_0x22337f,_0x887530,_0x5869d1)=>{for(var _0x5346d6=_0x5869d1>0x1?void 0x0:_0x5869d1?K(_0x22337f,_0x887530):_0x22337f,_0x25b942=_0x5e3472['length']-0x1,_0x4073b5;_0x25b942>=0x0;_0x25b942--)(_0x4073b5=_0x5e3472[_0x25b942])&&(_0x5346d6=_0x4073b5(_0x5346d6)||_0x5346d6);return _0x5346d6;},p=(_0x1e3c23,_0x5f31bd)=>(_0x4a2bc7,_0x4acfcd)=>_0x5f31bd(_0x4a2bc7,_0x4acfcd,_0x1e3c23);let S=class extends _0x3714c3{constructor(_0x251b8b,_0x296f2f,_0x26f7a4,_0x22b262){const _0xbb1f4c=_0x4be095;super(),this[_0xbb1f4c(0x101)]=_0x251b8b,this[_0xbb1f4c(0x13d)]=_0x296f2f,this[_0xbb1f4c(0x13a)]=_0x26f7a4,this[_0xbb1f4c(0x10f)]=_0x22b262,this[_0xbb1f4c(0x146)](),this['_initUserSync']();}['_initUserSync'](){const _0x330dae=_0x4be095;this[_0x330dae(0x121)](this[_0x330dae(0x13d)][_0x330dae(0x125)][_0x330dae(0x105)](_0x1c1e04(0x10))[_0x330dae(0x122)](_0x1f35d0=>{const _0x371aca=_0x330dae,_0x119497=new Set();_0x1f35d0[_0x371aca(0x107)](_0x3f4878=>{const _0x4440b1=_0x371aca;switch(_0x3f4878[_0x4440b1(0x129)]){case'add':{const _0x1c797a=_0x3f4878['payload']['personId'];_0x119497['add'](_0x1c797a);break;}}}),B(this['_injector'],_0x119497);}));}['_init'](){const _0x1bb09e=_0x4be095;this['disposeWithMe'](this[_0x1bb09e(0x101)][_0x1bb09e(0x125)][_0x1bb09e(0x122)](async _0x46bb1a=>{const _0x25f2bc=_0x1bb09e;var _0x3ddfb4,_0x10ad86,_0xc279d3,_0x4c6832;const _0x44e216=(_0x3ddfb4=this[_0x25f2bc(0x13d)][_0x25f2bc(0x149)](_0x46bb1a['unitId'])['find'](_0x93c4b7=>_0x93c4b7[_0x25f2bc(0x109)]===_0x46bb1a[_0x25f2bc(0x109)]))==null?void 0x0:_0x3ddfb4[_0x25f2bc(0x130)];if(!_0x44e216)return;const {unitId:_0x47ab1f,subUnitId:_0x378aea}=_0x44e216;switch(_0x46bb1a[_0x25f2bc(0x13e)]&&this['_userService'][_0x25f2bc(0x133)](_0x46bb1a[_0x25f2bc(0x13e)]),_0x46bb1a[_0x25f2bc(0x129)]){case v['Add']:break;case v[_0x25f2bc(0x11d)]:{this[_0x25f2bc(0x13d)][_0x25f2bc(0x144)](_0x47ab1f,_0x378aea,{'unitId':_0x47ab1f,'subUnitId':_0x378aea,'ref':'','id':_0x46bb1a['replyId'],'dT':D(+_0x46bb1a['createTimestamp']),'threadId':_0x46bb1a[_0x25f2bc(0x109)],'personId':(_0xc279d3=(_0x10ad86=_0x46bb1a[_0x25f2bc(0x13e)])==null?void 0x0:_0x10ad86[_0x25f2bc(0x124)])!=null?_0xc279d3:_0x46bb1a[_0x25f2bc(0x12f)],'text':JSON[_0x25f2bc(0x140)](_0x46bb1a[_0x25f2bc(0x102)]),'parentId':_0x44e216['id']});break;}case v[_0x25f2bc(0x123)]:{const _0x1b5ce1=this['_threadCommentModel']['getComment'](_0x47ab1f,_0x378aea,_0x46bb1a[_0x25f2bc(0x128)]);_0x1b5ce1&&_0x1b5ce1[_0x25f2bc(0x108)]&&this[_0x25f2bc(0x13d)][_0x25f2bc(0x136)](_0x47ab1f,_0x378aea,_0x46bb1a[_0x25f2bc(0x128)]);break;}case v[_0x25f2bc(0x117)]:{this[_0x25f2bc(0x13d)][_0x25f2bc(0x152)](_0x47ab1f,_0x378aea,{'commentId':_0x46bb1a[_0x25f2bc(0x128)],'text':JSON[_0x25f2bc(0x140)](_0x46bb1a[_0x25f2bc(0x102)])});break;}case v[_0x25f2bc(0x139)]:{const _0xa362c0=(_0x4c6832=this[_0x25f2bc(0x13d)][_0x25f2bc(0x149)](_0x46bb1a['unitId'])['find'](_0x475a8b=>_0x475a8b['threadId']===_0x46bb1a[_0x25f2bc(0x109)]))==null?void 0x0:_0x4c6832[_0x25f2bc(0x130)];_0xa362c0&&this['_threadCommentModel'][_0x25f2bc(0x151)](_0x47ab1f,_0x378aea,_0xa362c0['id'],_0x46bb1a[_0x25f2bc(0x13b)]===I[_0x25f2bc(0x154)]);break;}}}));}};S=V([p(0x0,_0x397f67(_0x560a2f)),p(0x1,_0x397f67(_0x4bce87)),p(0x2,_0x397f67(_0x57bf20)),p(0x3,_0x397f67(_0xc959e6))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2cbff2,_0x4714ee,_0x53d45e,_0x6ff2c4)=>{const _0x499be7=_0x4be095;for(var _0x37e8fc=_0x6ff2c4>0x1?void 0x0:_0x6ff2c4?k(_0x4714ee,_0x53d45e):_0x4714ee,_0x453551=_0x2cbff2[_0x499be7(0x14b)]-0x1,_0x3e7ce2;_0x453551>=0x0;_0x453551--)(_0x3e7ce2=_0x2cbff2[_0x453551])&&(_0x37e8fc=_0x3e7ce2(_0x37e8fc)||_0x37e8fc);return _0x37e8fc;},_=(_0x26619b,_0xd94b76)=>(_0x415ac1,_0x29d130)=>_0xd94b76(_0x415ac1,_0x29d130,_0x26619b);function X(_0x33f314,_0x15e9f8){const _0x37095a=_0x4be095,_0x58e2f1=_0x33f314[_0x37095a(0x104)][0x0];return{..._0x15e9f8,'id':_0x58e2f1[_0x37095a(0x128)],'resolved':_0x33f314['solved']===0x1,'dT':D(_0x58e2f1[_0x37095a(0x11f)]),'personId':_0x58e2f1[_0x37095a(0x12f)],'threadId':_0x58e2f1[_0x37095a(0x109)]};}function ee(_0x421d9c,_0x14134,_0x255509){const _0x4c76ce=_0x4be095;var _0xe0dc1d,_0x53fae1;if(((_0x53fae1=(_0xe0dc1d=_0x421d9c==null?void 0x0:_0x421d9c[_0x4c76ce(0x104)])==null?void 0x0:_0xe0dc1d[_0x4c76ce(0x14b)])!=null?_0x53fae1:0x0)>0x0){const _0x35b8d3=(_0x5a4e43,_0x1655b5)=>({'id':_0x5a4e43['replyId'],'threadId':_0x5a4e43[_0x4c76ce(0x109)],'dT':D(_0x5a4e43[_0x4c76ce(0x11f)]),'personId':_0x5a4e43[_0x4c76ce(0x12f)],'resolved':_0x421d9c[_0x4c76ce(0x13b)]===I[_0x4c76ce(0x154)],'unitId':_0x14134,'subUnitId':_0x255509,'text':JSON[_0x4c76ce(0x140)](_0x5a4e43['content']),'parentId':_0x1655b5}),_0x4b5ffe=_0x35b8d3(_0x421d9c[_0x4c76ce(0x104)][0x0]);return{..._0x4b5ffe,'children':_0x421d9c[_0x4c76ce(0x104)][_0x4c76ce(0x10a)](0x1)[_0x4c76ce(0x116)](_0x100257=>_0x35b8d3(_0x100257,_0x4b5ffe['id']))};}return null;}let f=class{constructor(_0x2a34d9,_0x10788d,_0x463dc1,_0x16d5dc){const _0xb52375=_0x4be095;this['_httpService']=_0x2a34d9,this[_0xb52375(0x13a)]=_0x10788d,this[_0xb52375(0x15c)]=_0x463dc1,this[_0xb52375(0x10f)]=_0x16d5dc;}async[_0x4be095(0x144)](_0x5c4552){const _0xbc9bab=_0x4be095;var _0x155c41,_0x5cbe85;const {parentId:_0x2516e6,unitId:_0x1c00ac,text:_0xcb792a,threadId:_0x4c6716}=_0x5c4552,_0x4afe34=(_0x5cbe85=(_0x155c41=_0xcb792a[_0xbc9bab(0x15a)])==null?void 0x0:_0x155c41['filter'](_0xf3d5c3=>_0xf3d5c3['rangeType']===_0x32b452[_0xbc9bab(0x110)])[_0xbc9bab(0x116)](_0x4e5082=>_0x4e5082[_0xbc9bab(0x13c)]))!=null?_0x5cbe85:[],_0x405e3a=JSON[_0xbc9bab(0x106)](_0xcb792a),_0x18d6f9=(await this[_0xbc9bab(0x15c)]['requireSession'](_0x1c00ac))['getMemberID']();if(_0x2516e6){const _0x5b4168={'memberId':_0x18d6f9,'unitId':_0x1c00ac,'content':_0x405e3a,'mention':_0x4afe34,'threadId':_0x4c6716},_0x4babb5=(await this[_0xbc9bab(0x127)]['post']('/universer-api/comment/unit/'+_0x1c00ac+_0xbc9bab(0x112),{'body':_0x5b4168}))['body'][_0xbc9bab(0x131)];return{..._0x5c4552,'id':_0x4babb5['replyId'],'dT':_0x13f57c(+_0x4babb5[_0xbc9bab(0x11f)])[_0xbc9bab(0x119)](_0xbc9bab(0x12e)),'personId':_0x4babb5[_0xbc9bab(0x12f)]};}else{const _0xb4f414={'memberId':_0x18d6f9,'unitId':_0x1c00ac,'content':_0x405e3a,'mention':_0x4afe34},_0x4bb7d8=await this[_0xbc9bab(0x127)]['post'](_0xbc9bab(0x147)+_0x1c00ac+_0xbc9bab(0x14c),{'body':_0xb4f414});return X(_0x4bb7d8[_0xbc9bab(0x138)][_0xbc9bab(0x118)],_0x5c4552);}}async[_0x4be095(0x152)](_0x4fb029){const _0x4ae3db=_0x4be095;var _0x501d8e,_0x106657;const {text:_0x53400b,unitId:_0x2fb1ea}=_0x4fb029,_0x2c0804=(_0x106657=(_0x501d8e=_0x53400b[_0x4ae3db(0x15a)])==null?void 0x0:_0x501d8e['filter'](_0x2c8247=>_0x2c8247[_0x4ae3db(0x12b)]===_0x32b452['COMMENT'])[_0x4ae3db(0x116)](_0x3a85d7=>_0x3a85d7['rangeId']))!=null?_0x106657:[],_0x5becd9=JSON[_0x4ae3db(0x106)](_0x53400b),_0x9d06cd=_0x4fb029[_0x4ae3db(0x109)],_0x5c582c=_0x4fb029['id'],_0x20f04c={'memberId':(await this['_sessionService'][_0x4ae3db(0x11e)](_0x2fb1ea))[_0x4ae3db(0x126)](),'unitId':_0x2fb1ea,'threadId':_0x9d06cd,'mention':_0x2c0804,'content':_0x5becd9,'replyId':_0x5c582c},_0x207485=await this[_0x4ae3db(0x127)][_0x4ae3db(0x137)](_0x4ae3db(0x147)+_0x2fb1ea+_0x4ae3db(0x145),{'body':_0x20f04c});return!_0x207485[_0x4ae3db(0x138)][_0x4ae3db(0x15b)]||_0x207485[_0x4ae3db(0x138)][_0x4ae3db(0x15b)][_0x4ae3db(0x156)]===0x1;}async[_0x4be095(0x151)](_0x199cc7){const _0x3271ce=_0x4be095,{unitId:_0x219814}=_0x199cc7,_0x7828d9=_0x199cc7[_0x3271ce(0x109)],_0x3e6204={'memberId':this[_0x3271ce(0x13a)]['getCurrentUser']()['userID'],'unitId':_0x219814,'threadId':_0x7828d9,'solved':_0x199cc7['resolved']?I[_0x3271ce(0x154)]:I[_0x3271ce(0x113)]},_0x44137f=await this['_httpService'][_0x3271ce(0x137)](_0x3271ce(0x147)+_0x219814+'/solved',{'body':_0x3e6204});return!_0x44137f['body'][_0x3271ce(0x15b)]||_0x44137f[_0x3271ce(0x138)]['error']['code']===0x1;}async['deleteComment'](_0x1f8a57,_0x186baf,_0x4c5f29,_0x158777){const _0x48dd08=_0x4be095,_0x2a7747={'memberId':(await this['_sessionService']['requireSession'](_0x1f8a57))[_0x48dd08(0x126)](),'threadId':_0x4c5f29,'replyId':_0x158777,'unitId':_0x1f8a57},_0x3c7f1c=await this[_0x48dd08(0x127)][_0x48dd08(0x137)](_0x48dd08(0x147)+_0x1f8a57+_0x48dd08(0x14e),{'body':_0x2a7747});return!_0x3c7f1c['body']['error']||_0x3c7f1c[_0x48dd08(0x138)][_0x48dd08(0x15b)][_0x48dd08(0x156)]===0x1;}async['listComments'](_0x3fd2e8,_0x2ca23a,_0x44dbf3){const _0x20fbeb=_0x4be095,_0x3780de={'unitId':_0x3fd2e8,'threadId':_0x44dbf3},_0x10c092=await this[_0x20fbeb(0x127)][_0x20fbeb(0x137)](_0x20fbeb(0x147)+_0x3fd2e8+_0x20fbeb(0x11a),{'body':_0x3780de}),_0x4d6e95=_0x44dbf3[_0x20fbeb(0x116)](_0x27b28a=>ee(_0x10c092['body']['comments'][_0x27b28a],_0x3fd2e8,_0x2ca23a))[_0x20fbeb(0x10b)](Boolean);return Object[_0x20fbeb(0x143)](_0x10c092[_0x20fbeb(0x138)]['users'])[_0x20fbeb(0x107)](_0x43543e=>{const _0x547a95=_0x20fbeb;this[_0x547a95(0x13a)][_0x547a95(0x133)](_0x43543e);}),_0x4d6e95;}[_0x4be095(0x10e)](_0x2803ab){const _0x5b4993=_0x4be095;return{'id':_0x2803ab['id'],'threadId':_0x2803ab[_0x5b4993(0x109)],'ref':_0x2803ab[_0x5b4993(0x14a)]};}};function _0x2140(){const _0x2adab7=['values','addComment','/edit','_init','/universer-api/comment/unit/','Unknown','getUnit','ref','length','/add','1DsbBNd','/delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','resolveComment','updateComment','get','Solved','1849212eaZzcN','code','50803570HQnFoL','1332279BTtIWs','_initDataSource','customRanges','error','_sessionService','getOwnPropertyDescriptor','_commentService','content','syncUpdateMutationToColla','replies','pipe','stringify','forEach','parentId','threadId','slice','filter','11akaRPe','pluginName','saveCommentToSnapshot','_injector','COMMENT','_configService','/reply','OpenOrReOpen','1267385bifqvC','_threadCommentDataSourceService','map','Edit','comment','format','/list','dataSource','24qWZdoP','Reply','requireSession','createTimestamp','/universer-api/user/list','disposeWithMe','subscribe','Delete','userID','commentUpdate$','getMemberID','_httpService','replyId','type','3437744iDfKNK','rangeType','onReady','62754YZTMol','YYYY/MM/DD\x20HH:mm','userId','root','reply','_threadCommentDataSource','addUser','649926GqKXwc','735cOeuNc','deleteComment','post','body','Solve','_userService','solved','rangeId','_threadCommentModel','user','UNRECOGNIZED','parse','_config','size'];_0x2140=function(){return _0x2adab7;};return _0x2140();}f=Q([_(0x0,_0x397f67(_0x2e19d5)),_(0x1,_0x397f67(_0x57bf20)),_(0x2,_0x397f67(_0x211d73)),_(0x3,_0x397f67(_0xc959e6))],f);var re=Object[_0x4be095(0x100)],te=(_0x5a4a3c,_0x45b7aa,_0x313bb7,_0x428ae2)=>{const _0x5dad5c=_0x4be095;for(var _0x4203e9=_0x428ae2>0x1?void 0x0:_0x428ae2?re(_0x45b7aa,_0x313bb7):_0x45b7aa,_0x1209ca=_0x5a4a3c[_0x5dad5c(0x14b)]-0x1,_0x26f574;_0x1209ca>=0x0;_0x1209ca--)(_0x26f574=_0x5a4a3c[_0x1209ca])&&(_0x4203e9=_0x26f574(_0x4203e9)||_0x4203e9);return _0x4203e9;},N=(_0x4fd238,_0x199b12)=>(_0x2d1e47,_0x2c4ffc)=>_0x199b12(_0x2d1e47,_0x2c4ffc,_0x4fd238);let g=class extends _0x3714c3{constructor(_0x30440c,_0x54fe54){const _0x5af7ed=_0x4be095;super(),this[_0x5af7ed(0x115)]=_0x30440c,this[_0x5af7ed(0x132)]=_0x54fe54,this[_0x5af7ed(0x159)]();}[_0x4be095(0x159)](){const _0x4c805c=_0x4be095;this[_0x4c805c(0x115)][_0x4c805c(0x11b)]=this[_0x4c805c(0x132)],this[_0x4c805c(0x115)][_0x4c805c(0x103)]=!0x1;}};g=te([N(0x0,_0x3222e2),N(0x1,_0x397f67(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x2a86e2,_0x3f721d,_0x3e1fd5)=>_0x3f721d in _0x2a86e2?se(_0x2a86e2,_0x3f721d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e1fd5}):_0x2a86e2[_0x3f721d]=_0x3e1fd5,ie=(_0x5b733f,_0x74d5,_0x51f4ec,_0x9ffcc1)=>{const _0x457dc5=_0x4be095;for(var _0x1edd34=_0x9ffcc1>0x1?void 0x0:_0x9ffcc1?oe(_0x74d5,_0x51f4ec):_0x74d5,_0x3c5226=_0x5b733f[_0x457dc5(0x14b)]-0x1,_0x5ad2f1;_0x3c5226>=0x0;_0x3c5226--)(_0x5ad2f1=_0x5b733f[_0x3c5226])&&(_0x1edd34=_0x5ad2f1(_0x1edd34)||_0x1edd34);return _0x1edd34;},w=(_0x365af3,_0x2cadd7)=>(_0x5f4afc,_0xc0a57a)=>_0x2cadd7(_0x5f4afc,_0xc0a57a,_0x365af3),$=(_0x48dbe7,_0x265459,_0x57b22a)=>ne(_0x48dbe7,typeof _0x265459!='symbol'?_0x265459+'':_0x265459,_0x57b22a);let b=class extends _0x29b97b{constructor(_0x5323fc=M,_0x3877fe,_0x5e38e0){const _0xc73e41=_0x4be095;super(),this[_0xc73e41(0x141)]=_0x5323fc,this['_injector']=_0x3877fe,this[_0xc73e41(0x111)]=_0x5e38e0;const {..._0x1c1163}=_0x596754({},M,this[_0xc73e41(0x141)]);this[_0xc73e41(0x111)][_0xc73e41(0x150)](z,_0x1c1163);}['onStarting'](){const _0x24cd04=_0x4be095;[[f],[g],[S]][_0x24cd04(0x107)](_0x3fca81=>{const _0x4480c5=_0x24cd04;this[_0x4480c5(0x10f)]['add'](_0x3fca81);});}[_0x4be095(0x12c)](){const _0x3e06bb=_0x4be095;this[_0x3e06bb(0x10f)]['get'](g),this[_0x3e06bb(0x10f)][_0x3e06bb(0x153)](S);}};function _0x46ea(_0x24dd1f,_0x5d9bc0){const _0x21405a=_0x2140();return _0x46ea=function(_0x46eabc,_0x481a1a){_0x46eabc=_0x46eabc-0x100;let _0x30d7c9=_0x21405a[_0x46eabc];return _0x30d7c9;},_0x46ea(_0x24dd1f,_0x5d9bc0);}$(b,_0x4be095(0x10d),W),$(b,_0x4be095(0x129),_0x15cbc2['UNIVER_UNKNOWN']),b=ie([_0x5f982(_0x5c16f9,_0x1dff39,_0xea7e1c),w(0x1,_0x397f67(_0xc959e6)),w(0x2,_0x129d4e)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2069b1=_0x43de;(function(_0x380a17,_0x180abc){const _0x512c22=_0x43de,_0xf23808=_0x380a17();while(!![]){try{const _0x23b653=-parseInt(_0x512c22(0x202))/0x1*(-parseInt(_0x512c22(0x211))/0x2)+parseInt(_0x512c22(0x212))/0x3*(parseInt(_0x512c22(0x1f7))/0x4)+parseInt(_0x512c22(0x204))/0x5*(-parseInt(_0x512c22(0x235))/0x6)+-parseInt(_0x512c22(0x20f))/0x7+parseInt(_0x512c22(0x231))/0x8*(-parseInt(_0x512c22(0x1ed))/0x9)+-parseInt(_0x512c22(0x1f1))/0xa+parseInt(_0x512c22(0x249))/0xb;if(_0x23b653===_0x180abc)break;else _0xf23808['push'](_0xf23808['shift']());}catch(_0x4008b3){_0xf23808['push'](_0xf23808['shift']());}}}(_0x5a9a,0xc9b63));import{CommentService as _0x13b92b,CollaborationSessionService as _0x497b32,UniverCollaborationClientPlugin as _0x293a48}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x177d79}from'@univerjs-pro/license';import{dayjs as _0x3db8db,UserManagerService as _0x4a0daf,Inject as _0x29435d,Injector as _0x4a982a,Disposable as _0xcf5e6a,CustomRangeType as _0x20a37b,UniverInstanceType as _0x388da4,DependentOn as _0x4bdd65,IConfigService as _0x10e4b8,Plugin as _0x336457,merge as _0x29ae8d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x40bc7d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x307483,IThreadCommentDataSourceService as _0x50d99d}from'@univerjs/thread-comment';import{bufferTime as _0x2cdc2a}from'rxjs';import{HTTPService as _0x28bbac}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2869f4=>(_0x2869f4[_0x2869f4['OpenOrReOpen']=0x0]=_0x2069b1(0x246),_0x2869f4[_0x2869f4[_0x2069b1(0x23a)]=0x1]='Solved',_0x2869f4[_0x2869f4[_0x2069b1(0x208)]=-0x1]='UNRECOGNIZED',_0x2869f4))(I||{}),v=(_0x4886b4=>(_0x4886b4[_0x4886b4[_0x2069b1(0x22a)]=0x0]=_0x2069b1(0x22a),_0x4886b4[_0x4886b4['Add']=0x1]=_0x2069b1(0x1ec),_0x4886b4[_0x4886b4[_0x2069b1(0x245)]=0x2]=_0x2069b1(0x245),_0x4886b4[_0x4886b4[_0x2069b1(0x244)]=0x3]=_0x2069b1(0x244),_0x4886b4[_0x4886b4[_0x2069b1(0x20d)]=0x4]=_0x2069b1(0x20d),_0x4886b4[_0x4886b4[_0x2069b1(0x241)]=0x5]=_0x2069b1(0x241),_0x4886b4[_0x4886b4[_0x2069b1(0x208)]=-0x1]=_0x2069b1(0x208),_0x4886b4))(v||{});const D=_0x370191=>_0x3db8db(new Date(+_0x370191))[_0x2069b1(0x210)](_0x2069b1(0x232)),B=async(_0x191f0d,_0x23776b)=>{const _0x187ad9=_0x2069b1,_0x3ecd4a=_0x191f0d[_0x187ad9(0x1f8)](_0x4a0daf),_0x478deb=_0x191f0d[_0x187ad9(0x1f8)](_0x28bbac);_0x23776b[_0x187ad9(0x206)](_0x3b836a=>{_0x3ecd4a['getUser'](_0x3b836a)&&_0x23776b['delete'](_0x3b836a);}),_0x23776b['size']&&(await _0x478deb[_0x187ad9(0x1f8)](_0x187ad9(0x1f3),{'params':{'userIDs':[..._0x23776b]}}))[_0x187ad9(0x1eb)][_0x187ad9(0x236)][_0x187ad9(0x206)](_0x2ab20f=>{const _0x28dba8=_0x187ad9;_0x2ab20f&&_0x3ecd4a[_0x28dba8(0x1fd)](_0x2ab20f);});};var K=Object[_0x2069b1(0x1f0)],V=(_0xc1efc,_0x23a962,_0x2f879a,_0x39b1b5)=>{const _0x48ea24=_0x2069b1;for(var _0x2271cc=_0x39b1b5>0x1?void 0x0:_0x39b1b5?K(_0x23a962,_0x2f879a):_0x23a962,_0x442cad=_0xc1efc[_0x48ea24(0x243)]-0x1,_0x140cdf;_0x442cad>=0x0;_0x442cad--)(_0x140cdf=_0xc1efc[_0x442cad])&&(_0x2271cc=_0x140cdf(_0x2271cc)||_0x2271cc);return _0x2271cc;},p=(_0x20cc3e,_0x213cb1)=>(_0x4562f0,_0x36ca17)=>_0x213cb1(_0x4562f0,_0x36ca17,_0x20cc3e);let S=class extends _0xcf5e6a{constructor(_0x5e4639,_0x4ad17a,_0x1df9ef,_0x43e464){const _0x592c51=_0x2069b1;super(),this[_0x592c51(0x1f2)]=_0x5e4639,this[_0x592c51(0x201)]=_0x4ad17a,this['_userService']=_0x1df9ef,this['_injector']=_0x43e464,this['_init'](),this[_0x592c51(0x217)]();}['_initUserSync'](){const _0x1bb593=_0x2069b1;this['disposeWithMe'](this[_0x1bb593(0x201)][_0x1bb593(0x21a)][_0x1bb593(0x1e6)](_0x2cdc2a(0x10))[_0x1bb593(0x242)](_0x14c196=>{const _0x5196a3=_0x1bb593,_0x1ac635=new Set();_0x14c196[_0x5196a3(0x206)](_0x5f3b47=>{const _0x8685af=_0x5196a3;switch(_0x5f3b47[_0x8685af(0x229)]){case _0x8685af(0x226):{const _0x3eb9ac=_0x5f3b47[_0x8685af(0x239)]['personId'];_0x1ac635[_0x8685af(0x226)](_0x3eb9ac);break;}}}),B(this[_0x5196a3(0x20e)],_0x1ac635);}));}['_init'](){const _0x191103=_0x2069b1;this['disposeWithMe'](this[_0x191103(0x1f2)][_0x191103(0x21a)]['subscribe'](async _0x576bff=>{const _0x54e210=_0x191103;var _0x1e86ed,_0x513627,_0x562641,_0x5c215c;const _0x3fe2bf=(_0x1e86ed=this['_threadCommentModel'][_0x54e210(0x22d)](_0x576bff[_0x54e210(0x21d)])[_0x54e210(0x21c)](_0xc814d3=>_0xc814d3[_0x54e210(0x233)]===_0x576bff[_0x54e210(0x233)]))==null?void 0x0:_0x1e86ed[_0x54e210(0x1fb)];if(!_0x3fe2bf)return;const {unitId:_0x38e42b,subUnitId:_0x32a05e}=_0x3fe2bf;switch(_0x576bff[_0x54e210(0x22b)]&&this[_0x54e210(0x224)][_0x54e210(0x1fd)](_0x576bff['user']),_0x576bff[_0x54e210(0x229)]){case v[_0x54e210(0x1ec)]:break;case v['Reply']:{this['_threadCommentModel'][_0x54e210(0x1e8)](_0x38e42b,_0x32a05e,{'unitId':_0x38e42b,'subUnitId':_0x32a05e,'ref':'','id':_0x576bff[_0x54e210(0x23e)],'dT':D(+_0x576bff[_0x54e210(0x23c)]),'threadId':_0x576bff[_0x54e210(0x233)],'personId':(_0x562641=(_0x513627=_0x576bff[_0x54e210(0x22b)])==null?void 0x0:_0x513627[_0x54e210(0x214)])!=null?_0x562641:_0x576bff[_0x54e210(0x223)],'text':JSON[_0x54e210(0x216)](_0x576bff[_0x54e210(0x238)]),'parentId':_0x3fe2bf['id']});break;}case v[_0x54e210(0x20d)]:{const _0x15bd4d=this[_0x54e210(0x201)][_0x54e210(0x215)](_0x38e42b,_0x32a05e,_0x576bff[_0x54e210(0x23e)]);_0x15bd4d&&_0x15bd4d[_0x54e210(0x209)]&&this[_0x54e210(0x201)]['deleteComment'](_0x38e42b,_0x32a05e,_0x576bff[_0x54e210(0x23e)]);break;}case v[_0x54e210(0x244)]:{this[_0x54e210(0x201)][_0x54e210(0x22c)](_0x38e42b,_0x32a05e,{'commentId':_0x576bff['replyId'],'text':JSON['parse'](_0x576bff[_0x54e210(0x238)])});break;}case v['Solve']:{const _0x50c2c4=(_0x5c215c=this[_0x54e210(0x201)][_0x54e210(0x22d)](_0x576bff[_0x54e210(0x21d)])[_0x54e210(0x21c)](_0x107d79=>_0x107d79[_0x54e210(0x233)]===_0x576bff['threadId']))==null?void 0x0:_0x5c215c[_0x54e210(0x1fb)];_0x50c2c4&&this[_0x54e210(0x201)][_0x54e210(0x1f6)](_0x38e42b,_0x32a05e,_0x50c2c4['id'],_0x576bff['solved']===I[_0x54e210(0x23a)]);break;}}}));}};function _0x5a9a(){const _0x5366f2=['commentUpdate$','replies','find','unitId','saveCommentToSnapshot','_httpService','dataSource','stringify','solved','userId','_userService','/solved','add','_configService','setConfig','type','Unknown','user','updateComment','getUnit','/edit','/reply','filter','69256DAIiqt','YYYY/MM/DD\x20HH:mm','threadId','pluginName','2082jCSCpC','users','symbol','content','payload','Solved','_threadCommentDataSource','createTimestamp','getMemberID','replyId','_sessionService','post','Solve','subscribe','length','Edit','Reply','OpenOrReOpen','rangeType','syncUpdateMutationToColla','31023069BMRycz','reply','pipe','customRanges','addComment','map','_threadCommentDataSourceService','body','Add','1629QhDmIA','onStarting','error','getOwnPropertyDescriptor','7244530jbqmzq','_commentService','/universer-api/user/list','COMMENT','values','resolveComment','36YvsnLp','get','/add','ref','root','requireSession','addUser','_config','UNIVER_UNKNOWN','comment','_threadCommentModel','424AGAVSP','listComments','10655TPPakK','rangeId','forEach','getCurrentUser','UNRECOGNIZED','parentId','code','/universer-api/comment/unit/','/delete','Delete','_injector','3187954BAQHAN','format','844drDleX','437751EsPYEn','thread-comment-data-source.config','userID','getComment','parse','_initUserSync','_initDataSource','defineProperty'];_0x5a9a=function(){return _0x5366f2;};return _0x5a9a();}function _0x43de(_0x266f57,_0xd09ba3){const _0x5a9a09=_0x5a9a();return _0x43de=function(_0x43de40,_0x5853ef){_0x43de40=_0x43de40-0x1e6;let _0x3a8bd3=_0x5a9a09[_0x43de40];return _0x3a8bd3;},_0x43de(_0x266f57,_0xd09ba3);}S=V([p(0x0,_0x29435d(_0x13b92b)),p(0x1,_0x29435d(_0x307483)),p(0x2,_0x29435d(_0x4a0daf)),p(0x3,_0x29435d(_0x4a982a))],S);const z=_0x2069b1(0x213),M={};var k=Object[_0x2069b1(0x1f0)],Q=(_0x4b650e,_0x2d1575,_0x32a1f4,_0x254d33)=>{for(var _0x4ff3c5=_0x254d33>0x1?void 0x0:_0x254d33?k(_0x2d1575,_0x32a1f4):_0x2d1575,_0xcc5436=_0x4b650e['length']-0x1,_0x3c0264;_0xcc5436>=0x0;_0xcc5436--)(_0x3c0264=_0x4b650e[_0xcc5436])&&(_0x4ff3c5=_0x3c0264(_0x4ff3c5)||_0x4ff3c5);return _0x4ff3c5;},_=(_0x2bd5f4,_0x32c032)=>(_0x28a6e4,_0x3e8e36)=>_0x32c032(_0x28a6e4,_0x3e8e36,_0x2bd5f4);function X(_0x2f4f42,_0x2b125f){const _0x51c332=_0x2069b1,_0x5056fc=_0x2f4f42[_0x51c332(0x21b)][0x0];return{..._0x2b125f,'id':_0x5056fc['replyId'],'resolved':_0x2f4f42[_0x51c332(0x222)]===0x1,'dT':D(_0x5056fc[_0x51c332(0x23c)]),'personId':_0x5056fc[_0x51c332(0x223)],'threadId':_0x5056fc[_0x51c332(0x233)]};}function ee(_0x300d9d,_0x1645fb,_0x3e6823){const _0x1e4b94=_0x2069b1;var _0x395378,_0x3d0378;if(((_0x3d0378=(_0x395378=_0x300d9d==null?void 0x0:_0x300d9d[_0x1e4b94(0x21b)])==null?void 0x0:_0x395378[_0x1e4b94(0x243)])!=null?_0x3d0378:0x0)>0x0){const _0x2be729=(_0x1fe7c3,_0x22b6aa)=>({'id':_0x1fe7c3[_0x1e4b94(0x23e)],'threadId':_0x1fe7c3['threadId'],'dT':D(_0x1fe7c3[_0x1e4b94(0x23c)]),'personId':_0x1fe7c3[_0x1e4b94(0x223)],'resolved':_0x300d9d[_0x1e4b94(0x222)]===I[_0x1e4b94(0x23a)],'unitId':_0x1645fb,'subUnitId':_0x3e6823,'text':JSON[_0x1e4b94(0x216)](_0x1fe7c3['content']),'parentId':_0x22b6aa}),_0x25549e=_0x2be729(_0x300d9d['replies'][0x0]);return{..._0x25549e,'children':_0x300d9d['replies']['slice'](0x1)[_0x1e4b94(0x1e9)](_0x42081c=>_0x2be729(_0x42081c,_0x25549e['id']))};}return null;}let f=class{constructor(_0x2973e1,_0x4c581d,_0x4112ae,_0x3c713d){const _0x4f683f=_0x2069b1;this[_0x4f683f(0x21f)]=_0x2973e1,this[_0x4f683f(0x224)]=_0x4c581d,this[_0x4f683f(0x23f)]=_0x4112ae,this['_injector']=_0x3c713d;}async[_0x2069b1(0x1e8)](_0x57ba0c){const _0xc74b=_0x2069b1;var _0x260f16,_0x3aec62;const {parentId:_0x37b97d,unitId:_0x25ebf1,text:_0x5881ae,threadId:_0x208bba}=_0x57ba0c,_0x22a188=(_0x3aec62=(_0x260f16=_0x5881ae['customRanges'])==null?void 0x0:_0x260f16['filter'](_0x4cf826=>_0x4cf826['rangeType']===_0x20a37b[_0xc74b(0x1f4)])[_0xc74b(0x1e9)](_0x4947a6=>_0x4947a6[_0xc74b(0x205)]))!=null?_0x3aec62:[],_0x53dc8e=JSON['stringify'](_0x5881ae),_0x2893aa=(await this[_0xc74b(0x23f)][_0xc74b(0x1fc)](_0x25ebf1))[_0xc74b(0x23d)]();if(_0x37b97d){const _0x447f4c={'memberId':_0x2893aa,'unitId':_0x25ebf1,'content':_0x53dc8e,'mention':_0x22a188,'threadId':_0x208bba},_0x8537e3=(await this[_0xc74b(0x21f)][_0xc74b(0x240)](_0xc74b(0x20b)+_0x25ebf1+_0xc74b(0x22f),{'body':_0x447f4c}))[_0xc74b(0x1eb)][_0xc74b(0x24a)];return{..._0x57ba0c,'id':_0x8537e3[_0xc74b(0x23e)],'dT':_0x3db8db(+_0x8537e3['createTimestamp'])[_0xc74b(0x210)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x8537e3['userId']};}else{const _0xbaf400={'memberId':_0x2893aa,'unitId':_0x25ebf1,'content':_0x53dc8e,'mention':_0x22a188},_0x3beb00=await this[_0xc74b(0x21f)][_0xc74b(0x240)]('/universer-api/comment/unit/'+_0x25ebf1+_0xc74b(0x1f9),{'body':_0xbaf400});return X(_0x3beb00['body'][_0xc74b(0x200)],_0x57ba0c);}}async['updateComment'](_0x33469c){const _0x2bb8dd=_0x2069b1;var _0x57cd8f,_0x326866;const {text:_0x3d2d88,unitId:_0x484fbb}=_0x33469c,_0x23435a=(_0x326866=(_0x57cd8f=_0x3d2d88[_0x2bb8dd(0x1e7)])==null?void 0x0:_0x57cd8f[_0x2bb8dd(0x230)](_0x52c847=>_0x52c847[_0x2bb8dd(0x247)]===_0x20a37b['COMMENT'])[_0x2bb8dd(0x1e9)](_0x24efd7=>_0x24efd7['rangeId']))!=null?_0x326866:[],_0x136a5a=JSON[_0x2bb8dd(0x221)](_0x3d2d88),_0x161502=_0x33469c[_0x2bb8dd(0x233)],_0x100d9b=_0x33469c['id'],_0x504d21={'memberId':(await this[_0x2bb8dd(0x23f)][_0x2bb8dd(0x1fc)](_0x484fbb))['getMemberID'](),'unitId':_0x484fbb,'threadId':_0x161502,'mention':_0x23435a,'content':_0x136a5a,'replyId':_0x100d9b},_0x54da1f=await this[_0x2bb8dd(0x21f)][_0x2bb8dd(0x240)](_0x2bb8dd(0x20b)+_0x484fbb+_0x2bb8dd(0x22e),{'body':_0x504d21});return!_0x54da1f[_0x2bb8dd(0x1eb)][_0x2bb8dd(0x1ef)]||_0x54da1f[_0x2bb8dd(0x1eb)][_0x2bb8dd(0x1ef)][_0x2bb8dd(0x20a)]===0x1;}async[_0x2069b1(0x1f6)](_0x526be0){const _0x2c8d26=_0x2069b1,{unitId:_0x3222c2}=_0x526be0,_0x4d38e0=_0x526be0[_0x2c8d26(0x233)],_0x2d0a68={'memberId':this[_0x2c8d26(0x224)][_0x2c8d26(0x207)]()[_0x2c8d26(0x214)],'unitId':_0x3222c2,'threadId':_0x4d38e0,'solved':_0x526be0['resolved']?I['Solved']:I[_0x2c8d26(0x246)]},_0x36fd32=await this['_httpService'][_0x2c8d26(0x240)](_0x2c8d26(0x20b)+_0x3222c2+_0x2c8d26(0x225),{'body':_0x2d0a68});return!_0x36fd32[_0x2c8d26(0x1eb)]['error']||_0x36fd32[_0x2c8d26(0x1eb)][_0x2c8d26(0x1ef)][_0x2c8d26(0x20a)]===0x1;}async['deleteComment'](_0x23cc3f,_0x570924,_0x20daa7,_0x2c124e){const _0x5168ef=_0x2069b1,_0x406cea={'memberId':(await this[_0x5168ef(0x23f)][_0x5168ef(0x1fc)](_0x23cc3f))[_0x5168ef(0x23d)](),'threadId':_0x20daa7,'replyId':_0x2c124e,'unitId':_0x23cc3f},_0x575c63=await this[_0x5168ef(0x21f)]['post']('/universer-api/comment/unit/'+_0x23cc3f+_0x5168ef(0x20c),{'body':_0x406cea});return!_0x575c63['body'][_0x5168ef(0x1ef)]||_0x575c63[_0x5168ef(0x1eb)][_0x5168ef(0x1ef)]['code']===0x1;}async[_0x2069b1(0x203)](_0x5bf68c,_0x1da9d9,_0x13095e){const _0x5f1305=_0x2069b1,_0x917eb7={'unitId':_0x5bf68c,'threadId':_0x13095e},_0x1de068=await this[_0x5f1305(0x21f)][_0x5f1305(0x240)](_0x5f1305(0x20b)+_0x5bf68c+'/list',{'body':_0x917eb7}),_0x58a87f=_0x13095e['map'](_0x38c997=>ee(_0x1de068[_0x5f1305(0x1eb)]['comments'][_0x38c997],_0x5bf68c,_0x1da9d9))[_0x5f1305(0x230)](Boolean);return Object[_0x5f1305(0x1f5)](_0x1de068[_0x5f1305(0x1eb)][_0x5f1305(0x236)])[_0x5f1305(0x206)](_0x1a2e90=>{const _0x29c53b=_0x5f1305;this[_0x29c53b(0x224)][_0x29c53b(0x1fd)](_0x1a2e90);}),_0x58a87f;}[_0x2069b1(0x21e)](_0x5b685d){const _0x35c709=_0x2069b1;return{'id':_0x5b685d['id'],'threadId':_0x5b685d['threadId'],'ref':_0x5b685d[_0x35c709(0x1fa)]};}};f=Q([_(0x0,_0x29435d(_0x28bbac)),_(0x1,_0x29435d(_0x4a0daf)),_(0x2,_0x29435d(_0x497b32)),_(0x3,_0x29435d(_0x4a982a))],f);var re=Object[_0x2069b1(0x1f0)],te=(_0x53a279,_0x1e8bf8,_0x5da0b2,_0x41acd3)=>{const _0x4f0473=_0x2069b1;for(var _0x402979=_0x41acd3>0x1?void 0x0:_0x41acd3?re(_0x1e8bf8,_0x5da0b2):_0x1e8bf8,_0x8614a8=_0x53a279[_0x4f0473(0x243)]-0x1,_0x3993e3;_0x8614a8>=0x0;_0x8614a8--)(_0x3993e3=_0x53a279[_0x8614a8])&&(_0x402979=_0x3993e3(_0x402979)||_0x402979);return _0x402979;},N=(_0x3edf70,_0x404ed6)=>(_0x342394,_0x2ea15a)=>_0x404ed6(_0x342394,_0x2ea15a,_0x3edf70);let g=class extends _0xcf5e6a{constructor(_0x10394d,_0x3d1afd){const _0x31a5c4=_0x2069b1;super(),this[_0x31a5c4(0x1ea)]=_0x10394d,this[_0x31a5c4(0x23b)]=_0x3d1afd,this['_initDataSource']();}[_0x2069b1(0x218)](){const _0x3ee648=_0x2069b1;this['_threadCommentDataSourceService'][_0x3ee648(0x220)]=this['_threadCommentDataSource'],this[_0x3ee648(0x1ea)][_0x3ee648(0x248)]=!0x1;}};g=te([N(0x0,_0x50d99d),N(0x1,_0x29435d(f))],g);var se=Object[_0x2069b1(0x219)],oe=Object[_0x2069b1(0x1f0)],ne=(_0x145b1f,_0x1d1939,_0x483275)=>_0x1d1939 in _0x145b1f?se(_0x145b1f,_0x1d1939,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x483275}):_0x145b1f[_0x1d1939]=_0x483275,ie=(_0x5c0722,_0x1a2999,_0x186fe8,_0x27cb6)=>{for(var _0x23c14e=_0x27cb6>0x1?void 0x0:_0x27cb6?oe(_0x1a2999,_0x186fe8):_0x1a2999,_0x3aa58f=_0x5c0722['length']-0x1,_0x296568;_0x3aa58f>=0x0;_0x3aa58f--)(_0x296568=_0x5c0722[_0x3aa58f])&&(_0x23c14e=_0x296568(_0x23c14e)||_0x23c14e);return _0x23c14e;},w=(_0x9c69e8,_0x3e5640)=>(_0x5c9264,_0x5b91d0)=>_0x3e5640(_0x5c9264,_0x5b91d0,_0x9c69e8),$=(_0x1188fa,_0xecfa3c,_0x3f0e32)=>ne(_0x1188fa,typeof _0xecfa3c!=_0x2069b1(0x237)?_0xecfa3c+'':_0xecfa3c,_0x3f0e32);let b=class extends _0x336457{constructor(_0x5b7b71=M,_0x54a116,_0x232ede){const _0x4a7efd=_0x2069b1;super(),this[_0x4a7efd(0x1fe)]=_0x5b7b71,this['_injector']=_0x54a116,this[_0x4a7efd(0x227)]=_0x232ede;const {..._0x55939b}=_0x29ae8d({},M,this[_0x4a7efd(0x1fe)]);this[_0x4a7efd(0x227)][_0x4a7efd(0x228)](z,_0x55939b);}[_0x2069b1(0x1ee)](){[[f],[g],[S]]['forEach'](_0x53b308=>{const _0x125688=_0x43de;this[_0x125688(0x20e)]['add'](_0x53b308);});}['onReady'](){const _0x828de8=_0x2069b1;this['_injector'][_0x828de8(0x1f8)](g),this[_0x828de8(0x20e)][_0x828de8(0x1f8)](S);}};$(b,_0x2069b1(0x234),W),$(b,_0x2069b1(0x229),_0x388da4[_0x2069b1(0x1ff)]),b=ie([_0x4bdd65(_0x40bc7d,_0x293a48,_0x177d79),w(0x1,_0x29435d(_0x4a982a)),w(0x2,_0x10e4b8)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x294b03,_0x2c948f){const _0x120ea8=_0x4e91,_0x35d2cd=_0x294b03();while(!![]){try{const _0x373794=parseInt(_0x120ea8(0x1be))/0x1*(-parseInt(_0x120ea8(0x217))/0x2)+parseInt(_0x120ea8(0x213))/0x3*(parseInt(_0x120ea8(0x22d))/0x4)+-parseInt(_0x120ea8(0x1bb))/0x5*(-parseInt(_0x120ea8(0x1b4))/0x6)+-parseInt(_0x120ea8(0x1b6))/0x7*(parseInt(_0x120ea8(0x219))/0x8)+-parseInt(_0x120ea8(0x1fa))/0x9+parseInt(_0x120ea8(0x1f0))/0xa+-parseInt(_0x120ea8(0x1bc))/0xb;if(_0x373794===_0x2c948f)break;else _0x35d2cd['push'](_0x35d2cd['shift']());}catch(_0x57f8de){_0x35d2cd['push'](_0x35d2cd['shift']());}}}(_0x3fce,0x37f1b),function(_0x4aa942,_0x409506){const _0x55e99d=_0x4e91;typeof exports==_0x55e99d(0x1ef)&&typeof module<'u'?_0x409506(exports,require(_0x55e99d(0x1e3)),require(_0x55e99d(0x1e2)),require(_0x55e99d(0x1fb)),require('@univerjs/thread-comment-ui'),require(_0x55e99d(0x229)),require(_0x55e99d(0x1fe)),require(_0x55e99d(0x1d4))):typeof define==_0x55e99d(0x21f)&&define[_0x55e99d(0x238)]?define([_0x55e99d(0x1cd),_0x55e99d(0x1e3),_0x55e99d(0x1e2),_0x55e99d(0x1fb),_0x55e99d(0x212),'@univerjs/thread-comment',_0x55e99d(0x1fe),_0x55e99d(0x1d4)],_0x409506):(_0x4aa942=typeof globalThis<'u'?globalThis:_0x4aa942||self,_0x409506(_0x4aa942[_0x55e99d(0x20b)]={},_0x4aa942[_0x55e99d(0x237)],_0x4aa942[_0x55e99d(0x215)],_0x4aa942[_0x55e99d(0x1ed)],_0x4aa942['UniverThreadCommentUi'],_0x4aa942[_0x55e99d(0x226)],_0x4aa942['rxjs'],_0x4aa942['UniverNetwork']));}(this,function(_0x303efd,_0x2dc796,_0x2b3bb9,_0x546c0b,_0x24e492,_0x399ecb,_0x158e60,_0x48fe67){'use strict';const _0x4743e3=_0x4e91;const _0xb10e75=_0x4743e3(0x204);var _0x41926b=(_0x489a26=>(_0x489a26[_0x489a26['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x489a26[_0x489a26[_0x4743e3(0x1b2)]=0x1]=_0x4743e3(0x1b2),_0x489a26[_0x489a26[_0x4743e3(0x1b3)]=-0x1]=_0x4743e3(0x1b3),_0x489a26))(_0x41926b||{}),_0x5de992=(_0xa76209=>(_0xa76209[_0xa76209['Unknown']=0x0]='Unknown',_0xa76209[_0xa76209[_0x4743e3(0x20e)]=0x1]=_0x4743e3(0x20e),_0xa76209[_0xa76209['Reply']=0x2]=_0x4743e3(0x1d0),_0xa76209[_0xa76209[_0x4743e3(0x1eb)]=0x3]='Edit',_0xa76209[_0xa76209[_0x4743e3(0x211)]=0x4]=_0x4743e3(0x211),_0xa76209[_0xa76209[_0x4743e3(0x1b7)]=0x5]=_0x4743e3(0x1b7),_0xa76209[_0xa76209['UNRECOGNIZED']=-0x1]=_0x4743e3(0x1b3),_0xa76209))(_0x5de992||{});const _0x4ba732=_0x187a69=>_0x546c0b['dayjs'](new Date(+_0x187a69))[_0x4743e3(0x1b9)](_0x4743e3(0x21e)),_0x3eae6d=async(_0x319c01,_0x56bc74)=>{const _0x40e22f=_0x4743e3,_0x15c50c=_0x319c01[_0x40e22f(0x1c7)](_0x546c0b['UserManagerService']),_0x5bcad6=_0x319c01[_0x40e22f(0x1c7)](_0x48fe67[_0x40e22f(0x21d)]);_0x56bc74[_0x40e22f(0x1ce)](_0x267f0f=>{const _0x327b36=_0x40e22f;_0x15c50c[_0x327b36(0x1de)](_0x267f0f)&&_0x56bc74[_0x327b36(0x201)](_0x267f0f);}),_0x56bc74[_0x40e22f(0x206)]&&(await _0x5bcad6[_0x40e22f(0x1c7)](_0x40e22f(0x1c0),{'params':{'userIDs':[..._0x56bc74]}}))[_0x40e22f(0x1b5)]['users'][_0x40e22f(0x1ce)](_0x60b0bd=>{const _0x209f54=_0x40e22f;_0x60b0bd&&_0x15c50c[_0x209f54(0x1dd)](_0x60b0bd);});};var _0x2f903d=Object[_0x4743e3(0x214)],_0x275986=(_0x3bbf1b,_0x12dbf0,_0xd2fca0,_0x1e7769)=>{for(var _0x5b344d=_0x1e7769>0x1?void 0x0:_0x1e7769?_0x2f903d(_0x12dbf0,_0xd2fca0):_0x12dbf0,_0x2e3ca0=_0x3bbf1b['length']-0x1,_0x64f59;_0x2e3ca0>=0x0;_0x2e3ca0--)(_0x64f59=_0x3bbf1b[_0x2e3ca0])&&(_0x5b344d=_0x64f59(_0x5b344d)||_0x5b344d);return _0x5b344d;},_0x2be325=(_0x5d5634,_0x5c8646)=>(_0x2916d1,_0x57a36c)=>_0x5c8646(_0x2916d1,_0x57a36c,_0x5d5634);let _0x4dbf99=class extends _0x546c0b[_0x4743e3(0x1bf)]{constructor(_0x54dd78,_0x57ea9c,_0x23a1ec,_0x1d4f04){const _0x994d5=_0x4743e3;super(),this[_0x994d5(0x1f9)]=_0x54dd78,this[_0x994d5(0x1c4)]=_0x57ea9c,this[_0x994d5(0x20d)]=_0x23a1ec,this[_0x994d5(0x1cf)]=_0x1d4f04,this[_0x994d5(0x218)](),this[_0x994d5(0x21b)]();}[_0x4743e3(0x21b)](){const _0x2df520=_0x4743e3;this['disposeWithMe'](this[_0x2df520(0x1c4)][_0x2df520(0x1e7)][_0x2df520(0x1c1)](_0x158e60[_0x2df520(0x1fc)](0x10))[_0x2df520(0x232)](_0x2b3d51=>{const _0xbd6dc4=_0x2df520,_0x134db7=new Set();_0x2b3d51[_0xbd6dc4(0x1ce)](_0x193a44=>{const _0x4d49d2=_0xbd6dc4;switch(_0x193a44[_0x4d49d2(0x1e6)]){case _0x4d49d2(0x1f7):{const _0x3d0e75=_0x193a44[_0x4d49d2(0x221)][_0x4d49d2(0x1ca)];_0x134db7[_0x4d49d2(0x1f7)](_0x3d0e75);break;}}}),_0x3eae6d(this[_0xbd6dc4(0x1cf)],_0x134db7);}));}[_0x4743e3(0x218)](){const _0x5b229b=_0x4743e3;this[_0x5b229b(0x20a)](this['_commentService'][_0x5b229b(0x1e7)][_0x5b229b(0x232)](async _0x138326=>{const _0x2fc7a8=_0x5b229b;var _0x3e7fa9,_0x58bb1b,_0x25451f,_0x35a519;const _0x18c24c=(_0x3e7fa9=this[_0x2fc7a8(0x1c4)][_0x2fc7a8(0x234)](_0x138326[_0x2fc7a8(0x1fd)])['find'](_0xb17f10=>_0xb17f10[_0x2fc7a8(0x1af)]===_0x138326[_0x2fc7a8(0x1af)]))==null?void 0x0:_0x3e7fa9[_0x2fc7a8(0x1c8)];if(!_0x18c24c)return;const {unitId:_0x380aa4,subUnitId:_0x22a5ad}=_0x18c24c;switch(_0x138326[_0x2fc7a8(0x1da)]&&this[_0x2fc7a8(0x20d)]['addUser'](_0x138326[_0x2fc7a8(0x1da)]),_0x138326[_0x2fc7a8(0x1e6)]){case _0x5de992[_0x2fc7a8(0x20e)]:break;case _0x5de992[_0x2fc7a8(0x1d0)]:{this[_0x2fc7a8(0x1c4)][_0x2fc7a8(0x20f)](_0x380aa4,_0x22a5ad,{'unitId':_0x380aa4,'subUnitId':_0x22a5ad,'ref':'','id':_0x138326[_0x2fc7a8(0x1c3)],'dT':_0x4ba732(+_0x138326['createTimestamp']),'threadId':_0x138326['threadId'],'personId':(_0x25451f=(_0x58bb1b=_0x138326[_0x2fc7a8(0x1da)])==null?void 0x0:_0x58bb1b[_0x2fc7a8(0x1df)])!=null?_0x25451f:_0x138326[_0x2fc7a8(0x1c9)],'text':JSON[_0x2fc7a8(0x1f4)](_0x138326[_0x2fc7a8(0x203)]),'parentId':_0x18c24c['id']});break;}case _0x5de992[_0x2fc7a8(0x211)]:{const _0x402002=this[_0x2fc7a8(0x1c4)][_0x2fc7a8(0x224)](_0x380aa4,_0x22a5ad,_0x138326['replyId']);_0x402002&&_0x402002[_0x2fc7a8(0x222)]&&this[_0x2fc7a8(0x1c4)][_0x2fc7a8(0x208)](_0x380aa4,_0x22a5ad,_0x138326[_0x2fc7a8(0x1c3)]);break;}case _0x5de992[_0x2fc7a8(0x1eb)]:{this[_0x2fc7a8(0x1c4)]['updateComment'](_0x380aa4,_0x22a5ad,{'commentId':_0x138326[_0x2fc7a8(0x1c3)],'text':JSON[_0x2fc7a8(0x1f4)](_0x138326['content'])});break;}case _0x5de992['Solve']:{const _0x4a686a=(_0x35a519=this[_0x2fc7a8(0x1c4)][_0x2fc7a8(0x234)](_0x138326[_0x2fc7a8(0x1fd)])[_0x2fc7a8(0x1d8)](_0x5b35fe=>_0x5b35fe[_0x2fc7a8(0x1af)]===_0x138326[_0x2fc7a8(0x1af)]))==null?void 0x0:_0x35a519['root'];_0x4a686a&&this[_0x2fc7a8(0x1c4)][_0x2fc7a8(0x1f3)](_0x380aa4,_0x22a5ad,_0x4a686a['id'],_0x138326[_0x2fc7a8(0x22c)]===_0x41926b[_0x2fc7a8(0x1b2)]);break;}}}));}};_0x4dbf99=_0x275986([_0x2be325(0x0,_0x546c0b[_0x4743e3(0x1f6)](_0x2dc796[_0x4743e3(0x1ec)])),_0x2be325(0x1,_0x546c0b[_0x4743e3(0x1f6)](_0x399ecb[_0x4743e3(0x1e0)])),_0x2be325(0x2,_0x546c0b[_0x4743e3(0x1f6)](_0x546c0b[_0x4743e3(0x1bd)])),_0x2be325(0x3,_0x546c0b[_0x4743e3(0x1f6)](_0x546c0b[_0x4743e3(0x1e5)]))],_0x4dbf99);const _0x14adb6='thread-comment-data-source.config',_0x2ad507={};var _0x2ceaf3=Object[_0x4743e3(0x214)],_0x20a2e6=(_0x3179f0,_0x537791,_0x56619b,_0x463698)=>{const _0xd3d45e=_0x4743e3;for(var _0x4163e9=_0x463698>0x1?void 0x0:_0x463698?_0x2ceaf3(_0x537791,_0x56619b):_0x537791,_0x518f18=_0x3179f0[_0xd3d45e(0x210)]-0x1,_0x20a6c7;_0x518f18>=0x0;_0x518f18--)(_0x20a6c7=_0x3179f0[_0x518f18])&&(_0x4163e9=_0x20a6c7(_0x4163e9)||_0x4163e9);return _0x4163e9;},_0x221c50=(_0x2390c0,_0x452af6)=>(_0x3ac311,_0x1c2ca0)=>_0x452af6(_0x3ac311,_0x1c2ca0,_0x2390c0);function _0x422fbc(_0x56766a,_0x170a3a){const _0x587d4e=_0x4743e3,_0x33c19b=_0x56766a[_0x587d4e(0x22f)][0x0];return{..._0x170a3a,'id':_0x33c19b[_0x587d4e(0x1c3)],'resolved':_0x56766a[_0x587d4e(0x22c)]===0x1,'dT':_0x4ba732(_0x33c19b[_0x587d4e(0x216)]),'personId':_0x33c19b[_0x587d4e(0x1c9)],'threadId':_0x33c19b[_0x587d4e(0x1af)]};}function _0x3a22b9(_0x11118a,_0x4cc65d,_0x552901){const _0x12389e=_0x4743e3;var _0x466038,_0x32aa5f;if(((_0x32aa5f=(_0x466038=_0x11118a==null?void 0x0:_0x11118a[_0x12389e(0x22f)])==null?void 0x0:_0x466038[_0x12389e(0x210)])!=null?_0x32aa5f:0x0)>0x0){const _0x4b5722=(_0xaa63d9,_0x5e56e9)=>({'id':_0xaa63d9['replyId'],'threadId':_0xaa63d9['threadId'],'dT':_0x4ba732(_0xaa63d9[_0x12389e(0x216)]),'personId':_0xaa63d9[_0x12389e(0x1c9)],'resolved':_0x11118a[_0x12389e(0x22c)]===_0x41926b[_0x12389e(0x1b2)],'unitId':_0x4cc65d,'subUnitId':_0x552901,'text':JSON[_0x12389e(0x1f4)](_0xaa63d9['content']),'parentId':_0x5e56e9}),_0x98baf6=_0x4b5722(_0x11118a['replies'][0x0]);return{..._0x98baf6,'children':_0x11118a['replies'][_0x12389e(0x1e8)](0x1)[_0x12389e(0x22b)](_0x2f5445=>_0x4b5722(_0x2f5445,_0x98baf6['id']))};}return null;}let _0x54a193=class{constructor(_0x3b4d08,_0x3bc12d,_0x398fd6,_0x38681b){const _0x77453=_0x4743e3;this['_httpService']=_0x3b4d08,this[_0x77453(0x20d)]=_0x3bc12d,this[_0x77453(0x21a)]=_0x398fd6,this[_0x77453(0x1cf)]=_0x38681b;}async[_0x4743e3(0x20f)](_0x49998c){const _0x115e66=_0x4743e3;var _0x138061,_0x257a84;const {parentId:_0x5c17d9,unitId:_0x18cf22,text:_0x47e1a7,threadId:_0xbad013}=_0x49998c,_0x4d5a45=(_0x257a84=(_0x138061=_0x47e1a7[_0x115e66(0x1d2)])==null?void 0x0:_0x138061[_0x115e66(0x235)](_0x31e4e3=>_0x31e4e3[_0x115e66(0x22e)]===_0x546c0b['CustomRangeType'][_0x115e66(0x1f2)])[_0x115e66(0x22b)](_0x476848=>_0x476848[_0x115e66(0x1c5)]))!=null?_0x257a84:[],_0x41fac9=JSON[_0x115e66(0x21c)](_0x47e1a7),_0x2971ab=(await this[_0x115e66(0x21a)]['requireSession'](_0x18cf22))[_0x115e66(0x220)]();if(_0x5c17d9){const _0x20aba6={'memberId':_0x2971ab,'unitId':_0x18cf22,'content':_0x41fac9,'mention':_0x4d5a45,'threadId':_0xbad013},_0x34a6e=(await this[_0x115e66(0x230)]['post'](_0x115e66(0x1d3)+_0x18cf22+_0x115e66(0x207),{'body':_0x20aba6}))['body'][_0x115e66(0x223)];return{..._0x49998c,'id':_0x34a6e['replyId'],'dT':_0x546c0b[_0x115e66(0x1c6)](+_0x34a6e[_0x115e66(0x216)])[_0x115e66(0x1b9)](_0x115e66(0x21e)),'personId':_0x34a6e['userId']};}else{const _0x39ba3f={'memberId':_0x2971ab,'unitId':_0x18cf22,'content':_0x41fac9,'mention':_0x4d5a45},_0x247e02=await this['_httpService'][_0x115e66(0x23a)](_0x115e66(0x1d3)+_0x18cf22+_0x115e66(0x20c),{'body':_0x39ba3f});return _0x422fbc(_0x247e02[_0x115e66(0x1b5)]['comment'],_0x49998c);}}async['updateComment'](_0x2004a8){const _0x534277=_0x4743e3;var _0x1cb50f,_0x3b2394;const {text:_0x3b866b,unitId:_0x59e98b}=_0x2004a8,_0x20b318=(_0x3b2394=(_0x1cb50f=_0x3b866b[_0x534277(0x1d2)])==null?void 0x0:_0x1cb50f[_0x534277(0x235)](_0x7ab737=>_0x7ab737[_0x534277(0x22e)]===_0x546c0b['CustomRangeType'][_0x534277(0x1f2)])[_0x534277(0x22b)](_0x3e12db=>_0x3e12db[_0x534277(0x1c5)]))!=null?_0x3b2394:[],_0x2d7726=JSON[_0x534277(0x21c)](_0x3b866b),_0x523c1d=_0x2004a8[_0x534277(0x1af)],_0x199431=_0x2004a8['id'],_0x17280b={'memberId':(await this['_sessionService'][_0x534277(0x1b8)](_0x59e98b))[_0x534277(0x220)](),'unitId':_0x59e98b,'threadId':_0x523c1d,'mention':_0x20b318,'content':_0x2d7726,'replyId':_0x199431},_0x14b5e5=await this[_0x534277(0x230)][_0x534277(0x23a)](_0x534277(0x1d3)+_0x59e98b+'/edit',{'body':_0x17280b});return!_0x14b5e5['body'][_0x534277(0x1d1)]||_0x14b5e5['body'][_0x534277(0x1d1)][_0x534277(0x1d7)]===0x1;}async[_0x4743e3(0x1f3)](_0x386504){const _0x5a8aba=_0x4743e3,{unitId:_0x1d1f0b}=_0x386504,_0x5a4cfa=_0x386504['threadId'],_0xaf7f44={'memberId':this['_userService'][_0x5a8aba(0x202)]()[_0x5a8aba(0x1df)],'unitId':_0x1d1f0b,'threadId':_0x5a4cfa,'solved':_0x386504[_0x5a8aba(0x205)]?_0x41926b[_0x5a8aba(0x1b2)]:_0x41926b['OpenOrReOpen']},_0x50600a=await this[_0x5a8aba(0x230)]['post'](_0x5a8aba(0x1d3)+_0x1d1f0b+_0x5a8aba(0x1ee),{'body':_0xaf7f44});return!_0x50600a[_0x5a8aba(0x1b5)][_0x5a8aba(0x1d1)]||_0x50600a[_0x5a8aba(0x1b5)][_0x5a8aba(0x1d1)][_0x5a8aba(0x1d7)]===0x1;}async['deleteComment'](_0x574670,_0x361d97,_0xc8dded,_0x10d3bc){const _0x3a9fbe=_0x4743e3,_0x23324d={'memberId':(await this[_0x3a9fbe(0x21a)][_0x3a9fbe(0x1b8)](_0x574670))['getMemberID'](),'threadId':_0xc8dded,'replyId':_0x10d3bc,'unitId':_0x574670},_0x1fb64b=await this[_0x3a9fbe(0x230)]['post']('/universer-api/comment/unit/'+_0x574670+_0x3a9fbe(0x1d9),{'body':_0x23324d});return!_0x1fb64b['body']['error']||_0x1fb64b[_0x3a9fbe(0x1b5)][_0x3a9fbe(0x1d1)]['code']===0x1;}async[_0x4743e3(0x1d5)](_0x1b419a,_0x12c559,_0x2665eb){const _0x4d2841=_0x4743e3,_0x11477f={'unitId':_0x1b419a,'threadId':_0x2665eb},_0xbbe6a2=await this[_0x4d2841(0x230)][_0x4d2841(0x23a)](_0x4d2841(0x1d3)+_0x1b419a+_0x4d2841(0x1e4),{'body':_0x11477f}),_0x562a5d=_0x2665eb[_0x4d2841(0x22b)](_0xf5fc3=>_0x3a22b9(_0xbbe6a2[_0x4d2841(0x1b5)]['comments'][_0xf5fc3],_0x1b419a,_0x12c559))[_0x4d2841(0x235)](Boolean);return Object[_0x4d2841(0x1dc)](_0xbbe6a2[_0x4d2841(0x1b5)][_0x4d2841(0x227)])[_0x4d2841(0x1ce)](_0x3110a8=>{const _0x1c29e5=_0x4d2841;this[_0x1c29e5(0x20d)][_0x1c29e5(0x1dd)](_0x3110a8);}),_0x562a5d;}[_0x4743e3(0x22a)](_0x550254){const _0x492b10=_0x4743e3;return{'id':_0x550254['id'],'threadId':_0x550254[_0x492b10(0x1af)],'ref':_0x550254[_0x492b10(0x1e9)]};}};_0x54a193=_0x20a2e6([_0x221c50(0x0,_0x546c0b[_0x4743e3(0x1f6)](_0x48fe67[_0x4743e3(0x21d)])),_0x221c50(0x1,_0x546c0b['Inject'](_0x546c0b[_0x4743e3(0x1bd)])),_0x221c50(0x2,_0x546c0b[_0x4743e3(0x1f6)](_0x2dc796['CollaborationSessionService'])),_0x221c50(0x3,_0x546c0b[_0x4743e3(0x1f6)](_0x546c0b['Injector']))],_0x54a193);var _0x599ac3=Object[_0x4743e3(0x214)],_0x363031=(_0x48d531,_0x5065ed,_0x3176f2,_0x24c61e)=>{const _0x466a4c=_0x4743e3;for(var _0xc217b1=_0x24c61e>0x1?void 0x0:_0x24c61e?_0x599ac3(_0x5065ed,_0x3176f2):_0x5065ed,_0xf3b94f=_0x48d531[_0x466a4c(0x210)]-0x1,_0x552a3f;_0xf3b94f>=0x0;_0xf3b94f--)(_0x552a3f=_0x48d531[_0xf3b94f])&&(_0xc217b1=_0x552a3f(_0xc217b1)||_0xc217b1);return _0xc217b1;},_0x568259=(_0xcefece,_0x3a22f3)=>(_0x34b88a,_0x20c760)=>_0x3a22f3(_0x34b88a,_0x20c760,_0xcefece);let _0x1bb185=class extends _0x546c0b[_0x4743e3(0x1bf)]{constructor(_0x433a03,_0x2c434a){const _0x5c2620=_0x4743e3;super(),this[_0x5c2620(0x228)]=_0x433a03,this[_0x5c2620(0x1c2)]=_0x2c434a,this[_0x5c2620(0x1cc)]();}[_0x4743e3(0x1cc)](){const _0x2e51b8=_0x4743e3;this['_threadCommentDataSourceService'][_0x2e51b8(0x1f1)]=this[_0x2e51b8(0x1c2)],this[_0x2e51b8(0x228)][_0x2e51b8(0x231)]=!0x1;}};_0x1bb185=_0x363031([_0x568259(0x0,_0x399ecb[_0x4743e3(0x239)]),_0x568259(0x1,_0x546c0b[_0x4743e3(0x1f6)](_0x54a193))],_0x1bb185);var _0x24794d=Object[_0x4743e3(0x209)],_0x5450fa=Object[_0x4743e3(0x214)],_0x4d1e58=(_0x398847,_0x52401b,_0x1e8c95)=>_0x52401b in _0x398847?_0x24794d(_0x398847,_0x52401b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1e8c95}):_0x398847[_0x52401b]=_0x1e8c95,_0x189638=(_0x48b848,_0x77ad45,_0x1972d6,_0x2dabb1)=>{const _0x177b96=_0x4743e3;for(var _0x337a97=_0x2dabb1>0x1?void 0x0:_0x2dabb1?_0x5450fa(_0x77ad45,_0x1972d6):_0x77ad45,_0x383927=_0x48b848[_0x177b96(0x210)]-0x1,_0x19354e;_0x383927>=0x0;_0x383927--)(_0x19354e=_0x48b848[_0x383927])&&(_0x337a97=_0x19354e(_0x337a97)||_0x337a97);return _0x337a97;},_0xfc290c=(_0x4de1e1,_0xedfe13)=>(_0xc828f,_0x5c1a1f)=>_0xedfe13(_0xc828f,_0x5c1a1f,_0x4de1e1),_0x27f2e7=(_0x43e230,_0xa514be,_0x1cf57e)=>_0x4d1e58(_0x43e230,typeof _0xa514be!='symbol'?_0xa514be+'':_0xa514be,_0x1cf57e);_0x303efd['UniverThreadCommentDataSourcePlugin']=class extends _0x546c0b[_0x4743e3(0x1f8)]{constructor(_0x29b98e=_0x2ad507,_0x27c06b,_0x4ad817){const _0x33abd0=_0x4743e3;super(),this['_config']=_0x29b98e,this[_0x33abd0(0x1cf)]=_0x27c06b,this['_configService']=_0x4ad817;const {..._0x338ac0}=_0x546c0b[_0x33abd0(0x1ba)]({},_0x2ad507,this['_config']);this[_0x33abd0(0x233)][_0x33abd0(0x1d6)](_0x14adb6,_0x338ac0);}[_0x4743e3(0x1f5)](){[[_0x54a193],[_0x1bb185],[_0x4dbf99]]['forEach'](_0x1477d7=>{const _0x52e408=_0x4e91;this[_0x52e408(0x1cf)][_0x52e408(0x1f7)](_0x1477d7);});}['onReady'](){const _0x22e613=_0x4743e3;this['_injector']['get'](_0x1bb185),this[_0x22e613(0x1cf)][_0x22e613(0x1c7)](_0x4dbf99);}},_0x27f2e7(_0x303efd[_0x4743e3(0x236)],_0x4743e3(0x1ff),_0xb10e75),_0x27f2e7(_0x303efd['UniverThreadCommentDataSourcePlugin'],'type',_0x546c0b['UniverInstanceType'][_0x4743e3(0x1ea)]),_0x303efd[_0x4743e3(0x236)]=_0x189638([_0x546c0b[_0x4743e3(0x225)](_0x24e492[_0x4743e3(0x1e1)],_0x2dc796[_0x4743e3(0x1b1)],_0x2b3bb9[_0x4743e3(0x1b0)]),_0xfc290c(0x1,_0x546c0b[_0x4743e3(0x1f6)](_0x546c0b[_0x4743e3(0x1e5)])),_0xfc290c(0x2,_0x546c0b[_0x4743e3(0x1cb)])],_0x303efd[_0x4743e3(0x236)]),Object[_0x4743e3(0x209)](_0x303efd,Symbol[_0x4743e3(0x1db)],{'value':_0x4743e3(0x200)});}));function _0x4e91(_0x40a97f,_0x17d7be){const _0x3fce25=_0x3fce();return _0x4e91=function(_0x4e9133,_0x25e937){_0x4e9133=_0x4e9133-0x1af;let _0xd5fe6c=_0x3fce25[_0x4e9133];return _0xd5fe6c;},_0x4e91(_0x40a97f,_0x17d7be);}function _0x3fce(){const _0x290fa0=['HTTPService','YYYY/MM/DD\x20HH:mm','function','getMemberID','payload','parentId','reply','getComment','DependentOn','UniverThreadComment','users','_threadCommentDataSourceService','@univerjs/thread-comment','saveCommentToSnapshot','map','solved','6088NElocu','rangeType','replies','_httpService','syncUpdateMutationToColla','subscribe','_configService','getUnit','filter','UniverThreadCommentDataSourcePlugin','UniverProCollaborationClient','amd','IThreadCommentDataSourceService','post','threadId','UniverLicensePlugin','UniverCollaborationClientPlugin','Solved','UNRECOGNIZED','2447538SNzfUA','body','37702XaknuY','Solve','requireSession','format','merge','5YJOQEr','1110912hOivXn','UserManagerService','7wTdDDJ','Disposable','/universer-api/user/list','pipe','_threadCommentDataSource','replyId','_threadCommentModel','rangeId','dayjs','get','root','userId','personId','IConfigService','_initDataSource','exports','forEach','_injector','Reply','error','customRanges','/universer-api/comment/unit/','@univerjs/network','listComments','setConfig','code','find','/delete','user','toStringTag','values','addUser','getUser','userID','ThreadCommentModel','UniverThreadCommentUIPlugin','@univerjs-pro/license','@univerjs-pro/collaboration-client','/list','Injector','type','commentUpdate$','slice','ref','UNIVER_UNKNOWN','Edit','CommentService','UniverCore','/solved','object','1503720HzRxxW','dataSource','COMMENT','resolveComment','parse','onStarting','Inject','add','Plugin','_commentService','530253OfYLIE','@univerjs/core','bufferTime','unitId','rxjs','pluginName','Module','delete','getCurrentUser','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','size','/reply','deleteComment','defineProperty','disposeWithMe','UniverProThreadCommentDatasource','/add','_userService','Add','addComment','length','Delete','@univerjs/thread-comment-ui','276gEJwxe','getOwnPropertyDescriptor','UniverProLicense','createTimestamp','65278aReZsC','_init','120BlOGxe','_sessionService','_initUserSync','stringify'];_0x3fce=function(){return _0x290fa0;};return _0x3fce();}
1
+ function _0x583c(_0x448ca6,_0x43c3b5){const _0x4372d5=_0x4372();return _0x583c=function(_0x583cc9,_0x564864){_0x583cc9=_0x583cc9-0xe9;let _0x4b6854=_0x4372d5[_0x583cc9];return _0x4b6854;},_0x583c(_0x448ca6,_0x43c3b5);}function _0x4372(){const _0x17ea52=['replies','payload','Disposable','unitId','parse','addComment','Injector','onStarting','replyId','dataSource','ref','rangeType','5641480ODDsKa','_sessionService','OpenOrReOpen','Reply','addUser','_injector','426JrNbJl','thread-comment-data-source.config','YYYY/MM/DD\x20HH:mm','70eGtqvj','Solved','/universer-api/user/list','CustomRangeType','ThreadCommentModel','comments','2513vaCMhY','Solve','solved','@univerjs/core','_configService','UniverProLicense','/universer-api/comment/unit/','_initDataSource','getUnit','_userService','Add','Plugin','disposeWithMe','createTimestamp','4458FcyKrD','userId','4035361QwfyBM','dayjs','error','/delete','2087120AXdMEk','syncUpdateMutationToColla','post','UniverThreadCommentDataSourcePlugin','add','COMMENT','@univerjs/thread-comment','11478qqZZJE','delete','getUser','UNIVER_UNKNOWN','_httpService','format','pipe','object','/reply','toStringTag','_config','1570167vfSmmT','root','user','comment','updateComment','size','_commentService','customRanges','_threadCommentDataSource','IThreadCommentDataSourceService','Edit','content','@univerjs/thread-comment-ui','resolveComment','defineProperty','filter','/solved','Unknown','merge','@univerjs-pro/collaboration-client','getOwnPropertyDescriptor','stringify','commentUpdate$','DependentOn','8MrJhIq','find','personId','CollaborationSessionService','forEach','UNRECOGNIZED','@univerjs-pro/license','exports','_initUserSync','_init','/list','length','getMemberID','_threadCommentModel','478134deHNxF','body','_threadCommentDataSourceService','Delete','rangeId','getCurrentUser','UniverThreadCommentUIPlugin','values','code','UniverCore','reply','bufferTime','users','Module','UniverProThreadCommentDatasource','UniverInstanceType','map','deleteComment','IConfigService','UniverThreadCommentUi','function','threadId','UniverCollaborationClientPlugin','rxjs','HTTPService','Inject','get','requireSession','subscribe','parentId','@univerjs/network','UniverNetwork','/edit','userID','setConfig','UserManagerService'];_0x4372=function(){return _0x17ea52;};return _0x4372();}(function(_0x42e37a,_0x5b650d){const _0x2bf550=_0x583c,_0x316d48=_0x42e37a();while(!![]){try{const _0x27fa08=parseInt(_0x2bf550(0xf4))/0x1*(parseInt(_0x2bf550(0x10b))/0x2)+parseInt(_0x2bf550(0x149))/0x3+-parseInt(_0x2bf550(0x13b))/0x4*(-parseInt(_0x2bf550(0x111))/0x5)+parseInt(_0x2bf550(0x118))/0x6*(parseInt(_0x2bf550(0xfd))/0x7)+parseInt(_0x2bf550(0xee))/0x8+-parseInt(_0x2bf550(0x123))/0x9+parseInt(_0x2bf550(0xf7))/0xa*(-parseInt(_0x2bf550(0x10d))/0xb);if(_0x27fa08===_0x5b650d)break;else _0x316d48['push'](_0x316d48['shift']());}catch(_0x103e61){_0x316d48['push'](_0x316d48['shift']());}}}(_0x4372,0x90da0),function(_0x3712fb,_0xc64564){const _0x23e2e0=_0x583c;typeof exports==_0x23e2e0(0x11f)&&typeof module<'u'?_0xc64564(exports,require(_0x23e2e0(0x136)),require(_0x23e2e0(0x141)),require(_0x23e2e0(0x100)),require('@univerjs/thread-comment-ui'),require(_0x23e2e0(0x117)),require(_0x23e2e0(0x160)),require(_0x23e2e0(0x167))):typeof define==_0x23e2e0(0x15d)&&define['amd']?define([_0x23e2e0(0x142),_0x23e2e0(0x136),_0x23e2e0(0x141),_0x23e2e0(0x100),_0x23e2e0(0x12f),_0x23e2e0(0x117),_0x23e2e0(0x160),_0x23e2e0(0x167)],_0xc64564):(_0x3712fb=typeof globalThis<'u'?globalThis:_0x3712fb||self,_0xc64564(_0x3712fb[_0x23e2e0(0x157)]={},_0x3712fb['UniverProCollaborationClient'],_0x3712fb[_0x23e2e0(0x102)],_0x3712fb[_0x23e2e0(0x152)],_0x3712fb[_0x23e2e0(0x15c)],_0x3712fb['UniverThreadComment'],_0x3712fb[_0x23e2e0(0x160)],_0x3712fb[_0x23e2e0(0x168)]));}(this,function(_0x6a332c,_0x5ed8c0,_0x3750e3,_0x575f15,_0x4a658b,_0x254c84,_0x211f0d,_0x2daee6){'use strict';const _0x239848=_0x583c;const _0x5902bc='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x3af9f5=(_0x4a6fa3=>(_0x4a6fa3[_0x4a6fa3[_0x239848(0xf0)]=0x0]=_0x239848(0xf0),_0x4a6fa3[_0x4a6fa3['Solved']=0x1]=_0x239848(0xf8),_0x4a6fa3[_0x4a6fa3[_0x239848(0x140)]=-0x1]=_0x239848(0x140),_0x4a6fa3))(_0x3af9f5||{}),_0x1b4ca8=(_0x576bd7=>(_0x576bd7[_0x576bd7[_0x239848(0x134)]=0x0]=_0x239848(0x134),_0x576bd7[_0x576bd7[_0x239848(0x107)]=0x1]=_0x239848(0x107),_0x576bd7[_0x576bd7[_0x239848(0xf1)]=0x2]=_0x239848(0xf1),_0x576bd7[_0x576bd7[_0x239848(0x12d)]=0x3]=_0x239848(0x12d),_0x576bd7[_0x576bd7[_0x239848(0x14c)]=0x4]=_0x239848(0x14c),_0x576bd7[_0x576bd7[_0x239848(0xfe)]=0x5]=_0x239848(0xfe),_0x576bd7[_0x576bd7[_0x239848(0x140)]=-0x1]='UNRECOGNIZED',_0x576bd7))(_0x1b4ca8||{});const _0x1aed35=_0x3d6807=>_0x575f15[_0x239848(0x10e)](new Date(+_0x3d6807))[_0x239848(0x11d)](_0x239848(0xf6)),_0x24af04=async(_0x6d4a36,_0x1ced8e)=>{const _0x1527eb=_0x239848,_0x345032=_0x6d4a36['get'](_0x575f15[_0x1527eb(0x16c)]),_0x5f5452=_0x6d4a36[_0x1527eb(0x163)](_0x2daee6[_0x1527eb(0x161)]);_0x1ced8e[_0x1527eb(0x13f)](_0x3ad163=>{const _0x14d846=_0x1527eb;_0x345032[_0x14d846(0x11a)](_0x3ad163)&&_0x1ced8e[_0x14d846(0x119)](_0x3ad163);}),_0x1ced8e[_0x1527eb(0x128)]&&(await _0x5f5452[_0x1527eb(0x163)](_0x1527eb(0xf9),{'params':{'userIDs':[..._0x1ced8e]}}))[_0x1527eb(0x14a)][_0x1527eb(0x155)][_0x1527eb(0x13f)](_0x2c89ca=>{const _0x2e143e=_0x1527eb;_0x2c89ca&&_0x345032[_0x2e143e(0xf2)](_0x2c89ca);});};var _0x28c919=Object['getOwnPropertyDescriptor'],_0x4faf2b=(_0x3b0835,_0x2e6b16,_0x412557,_0x3f645b)=>{const _0x460452=_0x239848;for(var _0x3b7c8a=_0x3f645b>0x1?void 0x0:_0x3f645b?_0x28c919(_0x2e6b16,_0x412557):_0x2e6b16,_0x7c31a2=_0x3b0835[_0x460452(0x146)]-0x1,_0x4dc9c9;_0x7c31a2>=0x0;_0x7c31a2--)(_0x4dc9c9=_0x3b0835[_0x7c31a2])&&(_0x3b7c8a=_0x4dc9c9(_0x3b7c8a)||_0x3b7c8a);return _0x3b7c8a;},_0x28c0d4=(_0x4f852f,_0x48ebab)=>(_0x75d321,_0x9d5c6f)=>_0x48ebab(_0x75d321,_0x9d5c6f,_0x4f852f);let _0x2a7b45=class extends _0x575f15[_0x239848(0x16f)]{constructor(_0x2cbb2e,_0x4777c8,_0x41ba7a,_0x3dd1f9){const _0x535eda=_0x239848;super(),this[_0x535eda(0x129)]=_0x2cbb2e,this[_0x535eda(0x148)]=_0x4777c8,this['_userService']=_0x41ba7a,this[_0x535eda(0xf3)]=_0x3dd1f9,this['_init'](),this['_initUserSync']();}[_0x239848(0x143)](){const _0x4a2ca2=_0x239848;this[_0x4a2ca2(0x109)](this['_threadCommentModel'][_0x4a2ca2(0x139)][_0x4a2ca2(0x11e)](_0x211f0d[_0x4a2ca2(0x154)](0x10))[_0x4a2ca2(0x165)](_0x5c99da=>{const _0x308905=_0x4a2ca2,_0x5da793=new Set();_0x5c99da[_0x308905(0x13f)](_0x289e45=>{const _0x275902=_0x308905;switch(_0x289e45['type']){case'add':{const _0x4bb9cf=_0x289e45[_0x275902(0x16e)][_0x275902(0x13d)];_0x5da793[_0x275902(0x115)](_0x4bb9cf);break;}}}),_0x24af04(this[_0x308905(0xf3)],_0x5da793);}));}[_0x239848(0x144)](){const _0x132b08=_0x239848;this['disposeWithMe'](this[_0x132b08(0x129)]['commentUpdate$'][_0x132b08(0x165)](async _0x55c948=>{const _0x2c8dc8=_0x132b08;var _0x3e186c,_0x18a275,_0x246f5a,_0x14f9cf;const _0x3c8284=(_0x3e186c=this[_0x2c8dc8(0x148)][_0x2c8dc8(0x105)](_0x55c948[_0x2c8dc8(0x170)])[_0x2c8dc8(0x13c)](_0x53a8ab=>_0x53a8ab[_0x2c8dc8(0x15e)]===_0x55c948['threadId']))==null?void 0x0:_0x3e186c[_0x2c8dc8(0x124)];if(!_0x3c8284)return;const {unitId:_0x362d42,subUnitId:_0x61ac69}=_0x3c8284;switch(_0x55c948[_0x2c8dc8(0x125)]&&this[_0x2c8dc8(0x106)][_0x2c8dc8(0xf2)](_0x55c948[_0x2c8dc8(0x125)]),_0x55c948['type']){case _0x1b4ca8[_0x2c8dc8(0x107)]:break;case _0x1b4ca8[_0x2c8dc8(0xf1)]:{this[_0x2c8dc8(0x148)][_0x2c8dc8(0x172)](_0x362d42,_0x61ac69,{'unitId':_0x362d42,'subUnitId':_0x61ac69,'ref':'','id':_0x55c948[_0x2c8dc8(0xea)],'dT':_0x1aed35(+_0x55c948[_0x2c8dc8(0x10a)]),'threadId':_0x55c948['threadId'],'personId':(_0x246f5a=(_0x18a275=_0x55c948[_0x2c8dc8(0x125)])==null?void 0x0:_0x18a275[_0x2c8dc8(0x16a)])!=null?_0x246f5a:_0x55c948['userId'],'text':JSON[_0x2c8dc8(0x171)](_0x55c948['content']),'parentId':_0x3c8284['id']});break;}case _0x1b4ca8['Delete']:{const _0x30d789=this[_0x2c8dc8(0x148)]['getComment'](_0x362d42,_0x61ac69,_0x55c948['replyId']);_0x30d789&&_0x30d789[_0x2c8dc8(0x166)]&&this[_0x2c8dc8(0x148)][_0x2c8dc8(0x15a)](_0x362d42,_0x61ac69,_0x55c948['replyId']);break;}case _0x1b4ca8['Edit']:{this[_0x2c8dc8(0x148)][_0x2c8dc8(0x127)](_0x362d42,_0x61ac69,{'commentId':_0x55c948[_0x2c8dc8(0xea)],'text':JSON[_0x2c8dc8(0x171)](_0x55c948[_0x2c8dc8(0x12e)])});break;}case _0x1b4ca8[_0x2c8dc8(0xfe)]:{const _0x9f7010=(_0x14f9cf=this[_0x2c8dc8(0x148)][_0x2c8dc8(0x105)](_0x55c948[_0x2c8dc8(0x170)])['find'](_0x261594=>_0x261594['threadId']===_0x55c948[_0x2c8dc8(0x15e)]))==null?void 0x0:_0x14f9cf[_0x2c8dc8(0x124)];_0x9f7010&&this['_threadCommentModel']['resolveComment'](_0x362d42,_0x61ac69,_0x9f7010['id'],_0x55c948[_0x2c8dc8(0xff)]===_0x3af9f5['Solved']);break;}}}));}};_0x2a7b45=_0x4faf2b([_0x28c0d4(0x0,_0x575f15[_0x239848(0x162)](_0x5ed8c0['CommentService'])),_0x28c0d4(0x1,_0x575f15['Inject'](_0x254c84[_0x239848(0xfb)])),_0x28c0d4(0x2,_0x575f15[_0x239848(0x162)](_0x575f15[_0x239848(0x16c)])),_0x28c0d4(0x3,_0x575f15[_0x239848(0x162)](_0x575f15[_0x239848(0x173)]))],_0x2a7b45);const _0x5d5fcb=_0x239848(0xf5),_0x3c7908={};var _0x5e0987=Object[_0x239848(0x137)],_0x548227=(_0x230faf,_0x4b5bf2,_0x7fe616,_0x3fae5b)=>{for(var _0x58efa0=_0x3fae5b>0x1?void 0x0:_0x3fae5b?_0x5e0987(_0x4b5bf2,_0x7fe616):_0x4b5bf2,_0x1a2f57=_0x230faf['length']-0x1,_0x215b48;_0x1a2f57>=0x0;_0x1a2f57--)(_0x215b48=_0x230faf[_0x1a2f57])&&(_0x58efa0=_0x215b48(_0x58efa0)||_0x58efa0);return _0x58efa0;},_0x44d073=(_0x4386d7,_0x3d3d02)=>(_0x5cc2d9,_0x438af7)=>_0x3d3d02(_0x5cc2d9,_0x438af7,_0x4386d7);function _0x474a87(_0x556243,_0x9fe308){const _0x19290e=_0x239848,_0x582d55=_0x556243['replies'][0x0];return{..._0x9fe308,'id':_0x582d55[_0x19290e(0xea)],'resolved':_0x556243[_0x19290e(0xff)]===0x1,'dT':_0x1aed35(_0x582d55[_0x19290e(0x10a)]),'personId':_0x582d55[_0x19290e(0x10c)],'threadId':_0x582d55[_0x19290e(0x15e)]};}function _0xde0284(_0x77f13f,_0x102563,_0x46d7a7){const _0x3d9d4e=_0x239848;var _0x43ae80,_0x118c7d;if(((_0x118c7d=(_0x43ae80=_0x77f13f==null?void 0x0:_0x77f13f[_0x3d9d4e(0x16d)])==null?void 0x0:_0x43ae80[_0x3d9d4e(0x146)])!=null?_0x118c7d:0x0)>0x0){const _0x49eaf6=(_0x59c2e1,_0x21354a)=>({'id':_0x59c2e1[_0x3d9d4e(0xea)],'threadId':_0x59c2e1[_0x3d9d4e(0x15e)],'dT':_0x1aed35(_0x59c2e1[_0x3d9d4e(0x10a)]),'personId':_0x59c2e1['userId'],'resolved':_0x77f13f['solved']===_0x3af9f5[_0x3d9d4e(0xf8)],'unitId':_0x102563,'subUnitId':_0x46d7a7,'text':JSON['parse'](_0x59c2e1[_0x3d9d4e(0x12e)]),'parentId':_0x21354a}),_0x498fb9=_0x49eaf6(_0x77f13f[_0x3d9d4e(0x16d)][0x0]);return{..._0x498fb9,'children':_0x77f13f[_0x3d9d4e(0x16d)]['slice'](0x1)[_0x3d9d4e(0x159)](_0x2c317f=>_0x49eaf6(_0x2c317f,_0x498fb9['id']))};}return null;}let _0x3476f6=class{constructor(_0x43e627,_0x14173d,_0x328d92,_0x1c2fe7){const _0x36be8c=_0x239848;this[_0x36be8c(0x11c)]=_0x43e627,this[_0x36be8c(0x106)]=_0x14173d,this[_0x36be8c(0xef)]=_0x328d92,this[_0x36be8c(0xf3)]=_0x1c2fe7;}async[_0x239848(0x172)](_0x376dd5){const _0x487659=_0x239848;var _0x336521,_0x5bd9b2;const {parentId:_0x41e3f7,unitId:_0x245607,text:_0x5136b2,threadId:_0x14214e}=_0x376dd5,_0x112ef9=(_0x5bd9b2=(_0x336521=_0x5136b2[_0x487659(0x12a)])==null?void 0x0:_0x336521[_0x487659(0x132)](_0x3022a8=>_0x3022a8[_0x487659(0xed)]===_0x575f15[_0x487659(0xfa)][_0x487659(0x116)])[_0x487659(0x159)](_0x311131=>_0x311131[_0x487659(0x14d)]))!=null?_0x5bd9b2:[],_0x157c45=JSON['stringify'](_0x5136b2),_0x36d97a=(await this[_0x487659(0xef)][_0x487659(0x164)](_0x245607))[_0x487659(0x147)]();if(_0x41e3f7){const _0x2036a7={'memberId':_0x36d97a,'unitId':_0x245607,'content':_0x157c45,'mention':_0x112ef9,'threadId':_0x14214e},_0x5931f3=(await this[_0x487659(0x11c)][_0x487659(0x113)]('/universer-api/comment/unit/'+_0x245607+_0x487659(0x120),{'body':_0x2036a7}))[_0x487659(0x14a)][_0x487659(0x153)];return{..._0x376dd5,'id':_0x5931f3[_0x487659(0xea)],'dT':_0x575f15[_0x487659(0x10e)](+_0x5931f3['createTimestamp'])[_0x487659(0x11d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5931f3[_0x487659(0x10c)]};}else{const _0x6928ca={'memberId':_0x36d97a,'unitId':_0x245607,'content':_0x157c45,'mention':_0x112ef9},_0x3c9198=await this[_0x487659(0x11c)][_0x487659(0x113)](_0x487659(0x103)+_0x245607+'/add',{'body':_0x6928ca});return _0x474a87(_0x3c9198['body'][_0x487659(0x126)],_0x376dd5);}}async['updateComment'](_0x46aeb9){const _0x1f40ac=_0x239848;var _0x272c4f,_0x358791;const {text:_0x23420a,unitId:_0x552a69}=_0x46aeb9,_0x11c2a3=(_0x358791=(_0x272c4f=_0x23420a['customRanges'])==null?void 0x0:_0x272c4f[_0x1f40ac(0x132)](_0x305076=>_0x305076[_0x1f40ac(0xed)]===_0x575f15[_0x1f40ac(0xfa)][_0x1f40ac(0x116)])['map'](_0x5c2d8e=>_0x5c2d8e[_0x1f40ac(0x14d)]))!=null?_0x358791:[],_0x405748=JSON[_0x1f40ac(0x138)](_0x23420a),_0x98cbe1=_0x46aeb9['threadId'],_0x4793e5=_0x46aeb9['id'],_0x4a5dc7={'memberId':(await this[_0x1f40ac(0xef)][_0x1f40ac(0x164)](_0x552a69))[_0x1f40ac(0x147)](),'unitId':_0x552a69,'threadId':_0x98cbe1,'mention':_0x11c2a3,'content':_0x405748,'replyId':_0x4793e5},_0x144f91=await this[_0x1f40ac(0x11c)][_0x1f40ac(0x113)](_0x1f40ac(0x103)+_0x552a69+_0x1f40ac(0x169),{'body':_0x4a5dc7});return!_0x144f91[_0x1f40ac(0x14a)]['error']||_0x144f91[_0x1f40ac(0x14a)]['error'][_0x1f40ac(0x151)]===0x1;}async[_0x239848(0x130)](_0xd52baa){const _0x305033=_0x239848,{unitId:_0x33eab6}=_0xd52baa,_0x4a7e29=_0xd52baa[_0x305033(0x15e)],_0x15d8b1={'memberId':this[_0x305033(0x106)][_0x305033(0x14e)]()[_0x305033(0x16a)],'unitId':_0x33eab6,'threadId':_0x4a7e29,'solved':_0xd52baa['resolved']?_0x3af9f5[_0x305033(0xf8)]:_0x3af9f5[_0x305033(0xf0)]},_0x5b51e2=await this[_0x305033(0x11c)][_0x305033(0x113)](_0x305033(0x103)+_0x33eab6+_0x305033(0x133),{'body':_0x15d8b1});return!_0x5b51e2[_0x305033(0x14a)][_0x305033(0x10f)]||_0x5b51e2[_0x305033(0x14a)][_0x305033(0x10f)][_0x305033(0x151)]===0x1;}async[_0x239848(0x15a)](_0x55e9c7,_0xa77323,_0x4babf3,_0x14157c){const _0x2bb11a=_0x239848,_0x456b3b={'memberId':(await this['_sessionService'][_0x2bb11a(0x164)](_0x55e9c7))[_0x2bb11a(0x147)](),'threadId':_0x4babf3,'replyId':_0x14157c,'unitId':_0x55e9c7},_0x303020=await this[_0x2bb11a(0x11c)][_0x2bb11a(0x113)]('/universer-api/comment/unit/'+_0x55e9c7+_0x2bb11a(0x110),{'body':_0x456b3b});return!_0x303020[_0x2bb11a(0x14a)][_0x2bb11a(0x10f)]||_0x303020[_0x2bb11a(0x14a)][_0x2bb11a(0x10f)]['code']===0x1;}async['listComments'](_0x5baf61,_0x1bdb8b,_0x4be464){const _0x5116bb=_0x239848,_0x40396f={'unitId':_0x5baf61,'threadId':_0x4be464},_0x2f50c6=await this[_0x5116bb(0x11c)][_0x5116bb(0x113)]('/universer-api/comment/unit/'+_0x5baf61+_0x5116bb(0x145),{'body':_0x40396f}),_0x23179a=_0x4be464['map'](_0x1a8042=>_0xde0284(_0x2f50c6[_0x5116bb(0x14a)][_0x5116bb(0xfc)][_0x1a8042],_0x5baf61,_0x1bdb8b))['filter'](Boolean);return Object[_0x5116bb(0x150)](_0x2f50c6[_0x5116bb(0x14a)][_0x5116bb(0x155)])['forEach'](_0xc4978b=>{const _0x350a23=_0x5116bb;this[_0x350a23(0x106)][_0x350a23(0xf2)](_0xc4978b);}),_0x23179a;}['saveCommentToSnapshot'](_0x60b7c){const _0x1a44e9=_0x239848;return{'id':_0x60b7c['id'],'threadId':_0x60b7c[_0x1a44e9(0x15e)],'ref':_0x60b7c[_0x1a44e9(0xec)]};}};_0x3476f6=_0x548227([_0x44d073(0x0,_0x575f15[_0x239848(0x162)](_0x2daee6[_0x239848(0x161)])),_0x44d073(0x1,_0x575f15[_0x239848(0x162)](_0x575f15[_0x239848(0x16c)])),_0x44d073(0x2,_0x575f15[_0x239848(0x162)](_0x5ed8c0[_0x239848(0x13e)])),_0x44d073(0x3,_0x575f15['Inject'](_0x575f15[_0x239848(0x173)]))],_0x3476f6);var _0x1490a1=Object[_0x239848(0x137)],_0x84035a=(_0x3d2720,_0x3a949b,_0x54a797,_0x1712d2)=>{const _0x4a753e=_0x239848;for(var _0x24cf1c=_0x1712d2>0x1?void 0x0:_0x1712d2?_0x1490a1(_0x3a949b,_0x54a797):_0x3a949b,_0x5118a8=_0x3d2720[_0x4a753e(0x146)]-0x1,_0x1bb2d2;_0x5118a8>=0x0;_0x5118a8--)(_0x1bb2d2=_0x3d2720[_0x5118a8])&&(_0x24cf1c=_0x1bb2d2(_0x24cf1c)||_0x24cf1c);return _0x24cf1c;},_0x2bf312=(_0x8c54c4,_0x5d9bb1)=>(_0x52d04c,_0x2f17e9)=>_0x5d9bb1(_0x52d04c,_0x2f17e9,_0x8c54c4);let _0x24dbfc=class extends _0x575f15[_0x239848(0x16f)]{constructor(_0x1f0cdd,_0x544a83){const _0x24df9e=_0x239848;super(),this['_threadCommentDataSourceService']=_0x1f0cdd,this['_threadCommentDataSource']=_0x544a83,this[_0x24df9e(0x104)]();}[_0x239848(0x104)](){const _0xba6664=_0x239848;this[_0xba6664(0x14b)][_0xba6664(0xeb)]=this[_0xba6664(0x12b)],this[_0xba6664(0x14b)][_0xba6664(0x112)]=!0x1;}};_0x24dbfc=_0x84035a([_0x2bf312(0x0,_0x254c84[_0x239848(0x12c)]),_0x2bf312(0x1,_0x575f15['Inject'](_0x3476f6))],_0x24dbfc);var _0x17f487=Object[_0x239848(0x131)],_0xe44086=Object[_0x239848(0x137)],_0x261cdc=(_0x4d6a2c,_0x55f7b5,_0x246ac7)=>_0x55f7b5 in _0x4d6a2c?_0x17f487(_0x4d6a2c,_0x55f7b5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x246ac7}):_0x4d6a2c[_0x55f7b5]=_0x246ac7,_0x124413=(_0x24d9c9,_0x3773e1,_0x2b77c5,_0x5227b5)=>{const _0x16b290=_0x239848;for(var _0x1e1512=_0x5227b5>0x1?void 0x0:_0x5227b5?_0xe44086(_0x3773e1,_0x2b77c5):_0x3773e1,_0x38017b=_0x24d9c9[_0x16b290(0x146)]-0x1,_0x11d34f;_0x38017b>=0x0;_0x38017b--)(_0x11d34f=_0x24d9c9[_0x38017b])&&(_0x1e1512=_0x11d34f(_0x1e1512)||_0x1e1512);return _0x1e1512;},_0x15bec8=(_0x18d74d,_0x379dff)=>(_0x2a84dc,_0x3a3db4)=>_0x379dff(_0x2a84dc,_0x3a3db4,_0x18d74d),_0x13025c=(_0xea726c,_0x5cd399,_0x257adb)=>_0x261cdc(_0xea726c,typeof _0x5cd399!='symbol'?_0x5cd399+'':_0x5cd399,_0x257adb);_0x6a332c[_0x239848(0x114)]=class extends _0x575f15[_0x239848(0x108)]{constructor(_0x6eaf9c=_0x3c7908,_0x513f2b,_0x25107a){const _0xea7218=_0x239848;super(),this[_0xea7218(0x122)]=_0x6eaf9c,this[_0xea7218(0xf3)]=_0x513f2b,this[_0xea7218(0x101)]=_0x25107a;const {..._0x2477b0}=_0x575f15[_0xea7218(0x135)]({},_0x3c7908,this[_0xea7218(0x122)]);this[_0xea7218(0x101)][_0xea7218(0x16b)](_0x5d5fcb,_0x2477b0);}[_0x239848(0xe9)](){const _0x4aba69=_0x239848;[[_0x3476f6],[_0x24dbfc],[_0x2a7b45]][_0x4aba69(0x13f)](_0x38a5db=>{const _0x21eb6b=_0x4aba69;this['_injector'][_0x21eb6b(0x115)](_0x38a5db);});}['onReady'](){const _0x5c4dfb=_0x239848;this[_0x5c4dfb(0xf3)][_0x5c4dfb(0x163)](_0x24dbfc),this['_injector'][_0x5c4dfb(0x163)](_0x2a7b45);}},_0x13025c(_0x6a332c[_0x239848(0x114)],'pluginName',_0x5902bc),_0x13025c(_0x6a332c[_0x239848(0x114)],'type',_0x575f15[_0x239848(0x158)][_0x239848(0x11b)]),_0x6a332c[_0x239848(0x114)]=_0x124413([_0x575f15[_0x239848(0x13a)](_0x4a658b[_0x239848(0x14f)],_0x5ed8c0[_0x239848(0x15f)],_0x3750e3['UniverLicensePlugin']),_0x15bec8(0x1,_0x575f15['Inject'](_0x575f15['Injector'])),_0x15bec8(0x2,_0x575f15[_0x239848(0x15b)])],_0x6a332c[_0x239848(0x114)]),Object[_0x239848(0x131)](_0x6a332c,Symbol[_0x239848(0x121)],{'value':_0x239848(0x156)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202505101606",
3
+ "version": "0.7.0-nightly.202505111606",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505101606",
49
- "@univerjs/core": "0.7.0-nightly.202505101606",
50
- "@univerjs/network": "0.7.0-nightly.202505101606",
51
- "@univerjs/protocol": "0.1.46-alpha.3",
52
- "@univerjs/thread-comment": "0.7.0-nightly.202505101606",
53
- "@univerjs-pro/license": "0.7.0-nightly.202505101606",
54
- "@univerjs/thread-comment-ui": "0.7.0-nightly.202505101606"
48
+ "@univerjs-pro/license": "0.7.0-nightly.202505111606",
49
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505111606",
50
+ "@univerjs/thread-comment": "0.7.0-nightly.202505111606",
51
+ "@univerjs/core": "0.7.0-nightly.202505111606",
52
+ "@univerjs/network": "0.7.0-nightly.202505111606",
53
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202505111606",
54
+ "@univerjs/protocol": "0.1.46-alpha.3"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",