@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505181606 → 0.7.0-nightly.202505191607

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 _0x1f8df0=_0x9894;(function(_0x17a3e3,_0x336cba){const _0x3a3000=_0x9894,_0x988217=_0x17a3e3();while(!![]){try{const _0x2d5336=parseInt(_0x3a3000(0x218))/0x1+-parseInt(_0x3a3000(0x202))/0x2*(-parseInt(_0x3a3000(0x20e))/0x3)+parseInt(_0x3a3000(0x1ba))/0x4*(parseInt(_0x3a3000(0x1f9))/0x5)+parseInt(_0x3a3000(0x1c3))/0x6*(parseInt(_0x3a3000(0x1eb))/0x7)+parseInt(_0x3a3000(0x21a))/0x8*(parseInt(_0x3a3000(0x1cb))/0x9)+-parseInt(_0x3a3000(0x1d8))/0xa+-parseInt(_0x3a3000(0x1f0))/0xb;if(_0x2d5336===_0x336cba)break;else _0x988217['push'](_0x988217['shift']());}catch(_0x880a17){_0x988217['push'](_0x988217['shift']());}}}(_0x42a0,0x38173));Object[_0x1f8df0(0x1e6)](exports,Symbol[_0x1f8df0(0x214)],{'value':_0x1f8df0(0x1ea)});const b=require(_0x1f8df0(0x216)),T=require(_0x1f8df0(0x1ae)),c=require(_0x1f8df0(0x1ad)),j=require('@univerjs/thread-comment-ui'),M=require(_0x1f8df0(0x1bd)),w=require('rxjs'),P=require(_0x1f8df0(0x1c7)),U=_0x1f8df0(0x203);function _0x42a0(){const _0x19eeea=['/reply','delete','1174074BZSlrt','error','listComments','threadId','@univerjs/network','comment','_threadCommentDataSource','type','9IDAJmv','merge','_threadCommentDataSourceService','add','createTimestamp','_sessionService','solved','syncUpdateMutationToColla','_injector','stringify','Solve','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','930660dCatbG','Reply','_threadCommentModel','_httpService','/list','/add','slice','users','thread-comment-data-source.config','/delete','requireSession','CollaborationSessionService','_commentService','deleteComment','defineProperty','body','IConfigService','symbol','Module','7ulJayo','filter','DependentOn','_config','Plugin','9157236MmCRQC','_configService','saveCommentToSnapshot','/universer-api/user/list','resolveComment','post','userId','getUser','getCurrentUser','435ApFUvD','map','resolved','pluginName','get','userID','UniverLicensePlugin','addComment','/universer-api/comment/unit/','2qiMtQk','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','content','updateComment','getOwnPropertyDescriptor','setConfig','HTTPService','getMemberID','rangeType','_init','UniverThreadCommentDataSourcePlugin','457482RpUQFT','replies','CustomRangeType','Unknown','forEach','UniverThreadCommentUIPlugin','toStringTag','subscribe','@univerjs-pro/collaboration-client','payload','385986tQnten','_initUserSync','1891432nvzpxi','parentId','rangeId','length','size','customRanges','Delete','UNIVER_UNKNOWN','UNRECOGNIZED','onReady','disposeWithMe','Solved','root','Disposable','code','/solved','format','dayjs','@univerjs/core','@univerjs-pro/license','_initDataSource','UserManagerService','_userService','replyId','Add','ThreadCommentModel','UniverCollaborationClientPlugin','addUser','Edit','pipe','Injector','8492PdhMSL','UniverInstanceType','parse','@univerjs/thread-comment','reply','Inject','user'];_0x42a0=function(){return _0x19eeea;};return _0x42a0();}var I=(_0x14ea65=>(_0x14ea65[_0x14ea65[_0x1f8df0(0x1d6)]=0x0]=_0x1f8df0(0x1d6),_0x14ea65[_0x14ea65[_0x1f8df0(0x225)]=0x1]=_0x1f8df0(0x225),_0x14ea65[_0x14ea65[_0x1f8df0(0x222)]=-0x1]='UNRECOGNIZED',_0x14ea65))(I||{}),v=(_0x117dfa=>(_0x117dfa[_0x117dfa[_0x1f8df0(0x211)]=0x0]=_0x1f8df0(0x211),_0x117dfa[_0x117dfa[_0x1f8df0(0x1b3)]=0x1]=_0x1f8df0(0x1b3),_0x117dfa[_0x117dfa['Reply']=0x2]=_0x1f8df0(0x1d9),_0x117dfa[_0x117dfa[_0x1f8df0(0x1b7)]=0x3]=_0x1f8df0(0x1b7),_0x117dfa[_0x117dfa[_0x1f8df0(0x220)]=0x4]='Delete',_0x117dfa[_0x117dfa['Solve']=0x5]=_0x1f8df0(0x1d5),_0x117dfa[_0x117dfa[_0x1f8df0(0x222)]=-0x1]='UNRECOGNIZED',_0x117dfa))(v||{});const f=_0x117fe0=>c['dayjs'](new Date(+_0x117fe0))['format'](_0x1f8df0(0x1d7)),R=async(_0x5ba007,_0x230559)=>{const _0x4ebc34=_0x1f8df0,_0x5e51e2=_0x5ba007[_0x4ebc34(0x1fd)](c[_0x4ebc34(0x1b0)]),_0x341432=_0x5ba007[_0x4ebc34(0x1fd)](P[_0x4ebc34(0x209)]);_0x230559[_0x4ebc34(0x212)](_0x48a5c7=>{const _0x23230a=_0x4ebc34;_0x5e51e2[_0x23230a(0x1f7)](_0x48a5c7)&&_0x230559[_0x23230a(0x1c2)](_0x48a5c7);}),_0x230559[_0x4ebc34(0x21e)]&&(await _0x341432[_0x4ebc34(0x1fd)](_0x4ebc34(0x1f3),{'params':{'userIDs':[..._0x230559]}}))[_0x4ebc34(0x1e7)][_0x4ebc34(0x1df)][_0x4ebc34(0x212)](_0x48e0f0=>{_0x48e0f0&&_0x5e51e2['addUser'](_0x48e0f0);});};var $=Object[_0x1f8df0(0x207)],E=(_0x36574a,_0x580ab3,_0x5632fb,_0x1d3712)=>{const _0x5539ee=_0x1f8df0;for(var _0x3a0c8d=_0x1d3712>0x1?void 0x0:_0x1d3712?$(_0x580ab3,_0x5632fb):_0x580ab3,_0x4d2061=_0x36574a[_0x5539ee(0x21d)]-0x1,_0x4dcbed;_0x4d2061>=0x0;_0x4d2061--)(_0x4dcbed=_0x36574a[_0x4d2061])&&(_0x3a0c8d=_0x4dcbed(_0x3a0c8d)||_0x3a0c8d);return _0x3a0c8d;},S=(_0x55d8d1,_0x4024b6)=>(_0xa6cf8f,_0x5cd992)=>_0x4024b6(_0xa6cf8f,_0x5cd992,_0x55d8d1);let p=class extends c['Disposable']{constructor(_0x515735,_0x2203a6,_0x4db4ea,_0x2d257f){const _0x135c36=_0x1f8df0;super(),this['_commentService']=_0x515735,this[_0x135c36(0x1da)]=_0x2203a6,this['_userService']=_0x4db4ea,this[_0x135c36(0x1d3)]=_0x2d257f,this[_0x135c36(0x20c)](),this['_initUserSync']();}[_0x1f8df0(0x219)](){const _0x9c01a7=_0x1f8df0;this[_0x9c01a7(0x224)](this[_0x9c01a7(0x1da)]['commentUpdate$'][_0x9c01a7(0x1b8)](w['bufferTime'](0x10))[_0x9c01a7(0x215)](_0x4094b5=>{const _0x297b4d=_0x9c01a7,_0x229c17=new Set();_0x4094b5[_0x297b4d(0x212)](_0x1d1557=>{const _0xf22ce0=_0x297b4d;switch(_0x1d1557[_0xf22ce0(0x1ca)]){case'add':{const _0x1a1ba1=_0x1d1557[_0xf22ce0(0x217)]['personId'];_0x229c17['add'](_0x1a1ba1);break;}}}),R(this[_0x297b4d(0x1d3)],_0x229c17);}));}[_0x1f8df0(0x20c)](){const _0xf4ed58=_0x1f8df0;this[_0xf4ed58(0x224)](this[_0xf4ed58(0x1e4)]['commentUpdate$'][_0xf4ed58(0x215)](async _0x1b2093=>{const _0x351407=_0xf4ed58;var _0xcef5de,_0x158aa5,_0x283f85,_0x4865f0;const _0x21b15d=(_0xcef5de=this[_0x351407(0x1da)]['getUnit'](_0x1b2093[_0x351407(0x204)])['find'](_0x1d6732=>_0x1d6732[_0x351407(0x1c6)]===_0x1b2093[_0x351407(0x1c6)]))==null?void 0x0:_0xcef5de[_0x351407(0x226)];if(!_0x21b15d)return;const {unitId:_0x57d984,subUnitId:_0x42bb16}=_0x21b15d;switch(_0x1b2093['user']&&this[_0x351407(0x1b1)][_0x351407(0x1b6)](_0x1b2093[_0x351407(0x1c0)]),_0x1b2093[_0x351407(0x1ca)]){case v[_0x351407(0x1b3)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x57d984,_0x42bb16,{'unitId':_0x57d984,'subUnitId':_0x42bb16,'ref':'','id':_0x1b2093[_0x351407(0x1b2)],'dT':f(+_0x1b2093['createTimestamp']),'threadId':_0x1b2093[_0x351407(0x1c6)],'personId':(_0x283f85=(_0x158aa5=_0x1b2093['user'])==null?void 0x0:_0x158aa5[_0x351407(0x1fe)])!=null?_0x283f85:_0x1b2093[_0x351407(0x1f6)],'text':JSON['parse'](_0x1b2093[_0x351407(0x205)]),'parentId':_0x21b15d['id']});break;}case v[_0x351407(0x220)]:{const _0x1a4515=this[_0x351407(0x1da)]['getComment'](_0x57d984,_0x42bb16,_0x1b2093['replyId']);_0x1a4515&&_0x1a4515[_0x351407(0x21b)]&&this[_0x351407(0x1da)][_0x351407(0x1e5)](_0x57d984,_0x42bb16,_0x1b2093[_0x351407(0x1b2)]);break;}case v[_0x351407(0x1b7)]:{this[_0x351407(0x1da)]['updateComment'](_0x57d984,_0x42bb16,{'commentId':_0x1b2093['replyId'],'text':JSON[_0x351407(0x1bc)](_0x1b2093['content'])});break;}case v[_0x351407(0x1d5)]:{const _0x3b7cc5=(_0x4865f0=this['_threadCommentModel']['getUnit'](_0x1b2093[_0x351407(0x204)])['find'](_0x4896b3=>_0x4896b3['threadId']===_0x1b2093[_0x351407(0x1c6)]))==null?void 0x0:_0x4865f0[_0x351407(0x226)];_0x3b7cc5&&this[_0x351407(0x1da)][_0x351407(0x1f4)](_0x57d984,_0x42bb16,_0x3b7cc5['id'],_0x1b2093['solved']===I[_0x351407(0x225)]);break;}}}));}};p=E([S(0x0,c[_0x1f8df0(0x1bf)](b['CommentService'])),S(0x1,c['Inject'](M[_0x1f8df0(0x1b4)])),S(0x2,c[_0x1f8df0(0x1bf)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x1f8df0(0x1b9)]))],p);const q=_0x1f8df0(0x1e0),D={};var A=Object[_0x1f8df0(0x207)],x=(_0x32f36e,_0x15cbb1,_0x656edc,_0x65fb66)=>{const _0x5bebb6=_0x1f8df0;for(var _0x57c54b=_0x65fb66>0x1?void 0x0:_0x65fb66?A(_0x15cbb1,_0x656edc):_0x15cbb1,_0x300e63=_0x32f36e[_0x5bebb6(0x21d)]-0x1,_0x52cec9;_0x300e63>=0x0;_0x300e63--)(_0x52cec9=_0x32f36e[_0x300e63])&&(_0x57c54b=_0x52cec9(_0x57c54b)||_0x57c54b);return _0x57c54b;},_=(_0x570656,_0x3b2880)=>(_0xb3ca5d,_0x3b126c)=>_0x3b2880(_0xb3ca5d,_0x3b126c,_0x570656);function Y(_0x436bde,_0x5edc66){const _0x2e8b95=_0x1f8df0,_0x2c28a0=_0x436bde[_0x2e8b95(0x20f)][0x0];return{..._0x5edc66,'id':_0x2c28a0[_0x2e8b95(0x1b2)],'resolved':_0x436bde[_0x2e8b95(0x1d1)]===0x1,'dT':f(_0x2c28a0['createTimestamp']),'personId':_0x2c28a0[_0x2e8b95(0x1f6)],'threadId':_0x2c28a0[_0x2e8b95(0x1c6)]};}function G(_0x5d1133,_0x19c04e,_0x150fc7){const _0x41ded9=_0x1f8df0;var _0x568e77,_0x1bbde8;if(((_0x1bbde8=(_0x568e77=_0x5d1133==null?void 0x0:_0x5d1133['replies'])==null?void 0x0:_0x568e77[_0x41ded9(0x21d)])!=null?_0x1bbde8:0x0)>0x0){const _0x2fe41d=(_0x5f01b9,_0x1d6117)=>({'id':_0x5f01b9[_0x41ded9(0x1b2)],'threadId':_0x5f01b9['threadId'],'dT':f(_0x5f01b9[_0x41ded9(0x1cf)]),'personId':_0x5f01b9['userId'],'resolved':_0x5d1133[_0x41ded9(0x1d1)]===I['Solved'],'unitId':_0x19c04e,'subUnitId':_0x150fc7,'text':JSON[_0x41ded9(0x1bc)](_0x5f01b9[_0x41ded9(0x205)]),'parentId':_0x1d6117}),_0x1299e9=_0x2fe41d(_0x5d1133[_0x41ded9(0x20f)][0x0]);return{..._0x1299e9,'children':_0x5d1133['replies'][_0x41ded9(0x1de)](0x1)[_0x41ded9(0x1fa)](_0x3bac1a=>_0x2fe41d(_0x3bac1a,_0x1299e9['id']))};}return null;}let g=class{constructor(_0x40d1e7,_0x33cf0d,_0x13de43,_0x574326){const _0x4572eb=_0x1f8df0;this[_0x4572eb(0x1db)]=_0x40d1e7,this[_0x4572eb(0x1b1)]=_0x33cf0d,this['_sessionService']=_0x13de43,this[_0x4572eb(0x1d3)]=_0x574326;}async[_0x1f8df0(0x200)](_0x13be57){const _0x48dc1e=_0x1f8df0;var _0x1722bf,_0x7c5b97;const {parentId:_0x5d1a06,unitId:_0x2af467,text:_0x5a6555,threadId:_0x2500ae}=_0x13be57,_0x89c717=(_0x7c5b97=(_0x1722bf=_0x5a6555[_0x48dc1e(0x21f)])==null?void 0x0:_0x1722bf[_0x48dc1e(0x1ec)](_0x6ca0e3=>_0x6ca0e3[_0x48dc1e(0x20b)]===c[_0x48dc1e(0x210)]['COMMENT'])[_0x48dc1e(0x1fa)](_0x17ec53=>_0x17ec53[_0x48dc1e(0x21c)]))!=null?_0x7c5b97:[],_0x3c6919=JSON[_0x48dc1e(0x1d4)](_0x5a6555),_0x4b2682=(await this['_sessionService'][_0x48dc1e(0x1e2)](_0x2af467))[_0x48dc1e(0x20a)]();if(_0x5d1a06){const _0x10ba79={'memberId':_0x4b2682,'unitId':_0x2af467,'content':_0x3c6919,'mention':_0x89c717,'threadId':_0x2500ae},_0x2c7258=(await this[_0x48dc1e(0x1db)]['post']('/universer-api/comment/unit/'+_0x2af467+_0x48dc1e(0x1c1),{'body':_0x10ba79}))[_0x48dc1e(0x1e7)][_0x48dc1e(0x1be)];return{..._0x13be57,'id':_0x2c7258[_0x48dc1e(0x1b2)],'dT':c[_0x48dc1e(0x1ac)](+_0x2c7258[_0x48dc1e(0x1cf)])[_0x48dc1e(0x1ab)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2c7258[_0x48dc1e(0x1f6)]};}else{const _0x20d4ca={'memberId':_0x4b2682,'unitId':_0x2af467,'content':_0x3c6919,'mention':_0x89c717},_0x551e1d=await this[_0x48dc1e(0x1db)]['post'](_0x48dc1e(0x201)+_0x2af467+_0x48dc1e(0x1dd),{'body':_0x20d4ca});return Y(_0x551e1d[_0x48dc1e(0x1e7)][_0x48dc1e(0x1c8)],_0x13be57);}}async[_0x1f8df0(0x206)](_0x50230a){const _0x50ab92=_0x1f8df0;var _0x3130c0,_0xf1f640;const {text:_0x258986,unitId:_0x258188}=_0x50230a,_0x196fc5=(_0xf1f640=(_0x3130c0=_0x258986[_0x50ab92(0x21f)])==null?void 0x0:_0x3130c0[_0x50ab92(0x1ec)](_0x3cc207=>_0x3cc207[_0x50ab92(0x20b)]===c[_0x50ab92(0x210)]['COMMENT'])[_0x50ab92(0x1fa)](_0x6a17b3=>_0x6a17b3[_0x50ab92(0x21c)]))!=null?_0xf1f640:[],_0x4f03a0=JSON[_0x50ab92(0x1d4)](_0x258986),_0x5d4478=_0x50230a[_0x50ab92(0x1c6)],_0x5668ca=_0x50230a['id'],_0x1d9bfe={'memberId':(await this[_0x50ab92(0x1d0)][_0x50ab92(0x1e2)](_0x258188))['getMemberID'](),'unitId':_0x258188,'threadId':_0x5d4478,'mention':_0x196fc5,'content':_0x4f03a0,'replyId':_0x5668ca},_0x5bf25a=await this['_httpService'][_0x50ab92(0x1f5)](_0x50ab92(0x201)+_0x258188+'/edit',{'body':_0x1d9bfe});return!_0x5bf25a[_0x50ab92(0x1e7)]['error']||_0x5bf25a[_0x50ab92(0x1e7)][_0x50ab92(0x1c4)][_0x50ab92(0x1a9)]===0x1;}async['resolveComment'](_0x3b05bd){const _0x5b2a67=_0x1f8df0,{unitId:_0x270cd6}=_0x3b05bd,_0x94e1dc=_0x3b05bd[_0x5b2a67(0x1c6)],_0x37f5b4={'memberId':this[_0x5b2a67(0x1b1)][_0x5b2a67(0x1f8)]()[_0x5b2a67(0x1fe)],'unitId':_0x270cd6,'threadId':_0x94e1dc,'solved':_0x3b05bd[_0x5b2a67(0x1fb)]?I['Solved']:I[_0x5b2a67(0x1d6)]},_0x4f2033=await this[_0x5b2a67(0x1db)][_0x5b2a67(0x1f5)](_0x5b2a67(0x201)+_0x270cd6+_0x5b2a67(0x1aa),{'body':_0x37f5b4});return!_0x4f2033['body']['error']||_0x4f2033['body'][_0x5b2a67(0x1c4)][_0x5b2a67(0x1a9)]===0x1;}async[_0x1f8df0(0x1e5)](_0x18b054,_0x7965d6,_0x10571b,_0x288af8){const _0x3bf8f5=_0x1f8df0,_0x4a5233={'memberId':(await this[_0x3bf8f5(0x1d0)][_0x3bf8f5(0x1e2)](_0x18b054))['getMemberID'](),'threadId':_0x10571b,'replyId':_0x288af8,'unitId':_0x18b054},_0x1a794e=await this[_0x3bf8f5(0x1db)]['post']('/universer-api/comment/unit/'+_0x18b054+_0x3bf8f5(0x1e1),{'body':_0x4a5233});return!_0x1a794e[_0x3bf8f5(0x1e7)]['error']||_0x1a794e[_0x3bf8f5(0x1e7)][_0x3bf8f5(0x1c4)][_0x3bf8f5(0x1a9)]===0x1;}async[_0x1f8df0(0x1c5)](_0x2a1bc4,_0x276c2b,_0x31083e){const _0x3eaab5=_0x1f8df0,_0x2efc3d={'unitId':_0x2a1bc4,'threadId':_0x31083e},_0x95694c=await this[_0x3eaab5(0x1db)][_0x3eaab5(0x1f5)](_0x3eaab5(0x201)+_0x2a1bc4+_0x3eaab5(0x1dc),{'body':_0x2efc3d}),_0x262f99=_0x31083e['map'](_0x1b5e4f=>G(_0x95694c[_0x3eaab5(0x1e7)]['comments'][_0x1b5e4f],_0x2a1bc4,_0x276c2b))[_0x3eaab5(0x1ec)](Boolean);return Object['values'](_0x95694c[_0x3eaab5(0x1e7)][_0x3eaab5(0x1df)])[_0x3eaab5(0x212)](_0x3b6b25=>{const _0x414f30=_0x3eaab5;this[_0x414f30(0x1b1)]['addUser'](_0x3b6b25);}),_0x262f99;}[_0x1f8df0(0x1f2)](_0x505966){const _0x5612=_0x1f8df0;return{'id':_0x505966['id'],'threadId':_0x505966[_0x5612(0x1c6)],'ref':_0x505966['ref']};}};g=x([_(0x0,c[_0x1f8df0(0x1bf)](P[_0x1f8df0(0x209)])),_(0x1,c[_0x1f8df0(0x1bf)](c[_0x1f8df0(0x1b0)])),_(0x2,c['Inject'](b[_0x1f8df0(0x1e3)])),_(0x3,c[_0x1f8df0(0x1bf)](c[_0x1f8df0(0x1b9)]))],g);var H=Object[_0x1f8df0(0x207)],J=(_0x347c65,_0x19ef1d,_0x15b7ed,_0x1579d3)=>{for(var _0x33b8cc=_0x1579d3>0x1?void 0x0:_0x1579d3?H(_0x19ef1d,_0x15b7ed):_0x19ef1d,_0x317a4b=_0x347c65['length']-0x1,_0x481486;_0x317a4b>=0x0;_0x317a4b--)(_0x481486=_0x347c65[_0x317a4b])&&(_0x33b8cc=_0x481486(_0x33b8cc)||_0x33b8cc);return _0x33b8cc;},y=(_0x50e9a4,_0x43a352)=>(_0xebac86,_0x1bcece)=>_0x43a352(_0xebac86,_0x1bcece,_0x50e9a4);function _0x9894(_0x44ceac,_0x461ea3){const _0x42a094=_0x42a0();return _0x9894=function(_0x989471,_0x54545a){_0x989471=_0x989471-0x1a9;let _0x4d8170=_0x42a094[_0x989471];return _0x4d8170;},_0x9894(_0x44ceac,_0x461ea3);}let C=class extends c[_0x1f8df0(0x227)]{constructor(_0x5ad7cb,_0x35d25b){const _0xdad0bc=_0x1f8df0;super(),this[_0xdad0bc(0x1cd)]=_0x5ad7cb,this['_threadCommentDataSource']=_0x35d25b,this[_0xdad0bc(0x1af)]();}['_initDataSource'](){const _0x181b5e=_0x1f8df0;this[_0x181b5e(0x1cd)]['dataSource']=this[_0x181b5e(0x1c9)],this['_threadCommentDataSourceService'][_0x181b5e(0x1d2)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x1f8df0(0x1bf)](g))],C);var F=Object['defineProperty'],L=Object[_0x1f8df0(0x207)],Z=(_0x194945,_0x5aff0e,_0xd2cf6)=>_0x5aff0e in _0x194945?F(_0x194945,_0x5aff0e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd2cf6}):_0x194945[_0x5aff0e]=_0xd2cf6,W=(_0x47855b,_0x54e761,_0x51a673,_0x80bf7d)=>{const _0x18437b=_0x1f8df0;for(var _0x3479d4=_0x80bf7d>0x1?void 0x0:_0x80bf7d?L(_0x54e761,_0x51a673):_0x54e761,_0x122081=_0x47855b[_0x18437b(0x21d)]-0x1,_0x4a8d8d;_0x122081>=0x0;_0x122081--)(_0x4a8d8d=_0x47855b[_0x122081])&&(_0x3479d4=_0x4a8d8d(_0x3479d4)||_0x3479d4);return _0x3479d4;},O=(_0x1b8ebe,_0x4b006e)=>(_0x2dddd2,_0x82c290)=>_0x4b006e(_0x2dddd2,_0x82c290,_0x1b8ebe),N=(_0x127207,_0x585ea0,_0x47bdba)=>Z(_0x127207,typeof _0x585ea0!=_0x1f8df0(0x1e9)?_0x585ea0+'':_0x585ea0,_0x47bdba);exports[_0x1f8df0(0x20d)]=class extends c[_0x1f8df0(0x1ef)]{constructor(_0x56af45=D,_0x1d6b42,_0xb263a7){const _0x2014fc=_0x1f8df0;super(),this[_0x2014fc(0x1ee)]=_0x56af45,this[_0x2014fc(0x1d3)]=_0x1d6b42,this['_configService']=_0xb263a7;const {..._0x3304a8}=c[_0x2014fc(0x1cc)]({},D,this['_config']);this[_0x2014fc(0x1f1)][_0x2014fc(0x208)](q,_0x3304a8);}['onStarting'](){[[g],[C],[p]]['forEach'](_0x377ac7=>{const _0x2ef4ff=_0x9894;this[_0x2ef4ff(0x1d3)][_0x2ef4ff(0x1ce)](_0x377ac7);});}[_0x1f8df0(0x223)](){const _0x4965c1=_0x1f8df0;this['_injector'][_0x4965c1(0x1fd)](C),this['_injector'][_0x4965c1(0x1fd)](p);}},N(exports[_0x1f8df0(0x20d)],_0x1f8df0(0x1fc),U),N(exports[_0x1f8df0(0x20d)],'type',c[_0x1f8df0(0x1bb)][_0x1f8df0(0x221)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x1f8df0(0x1ed)](j[_0x1f8df0(0x213)],b[_0x1f8df0(0x1b5)],T[_0x1f8df0(0x1ff)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x1f8df0(0x1e8)])],exports[_0x1f8df0(0x20d)]);
1
+ 'use strict';const _0x359eaa=_0x36fd;(function(_0x5c88e4,_0x3b5374){const _0xaea755=_0x36fd,_0x30459d=_0x5c88e4();while(!![]){try{const _0x3effb7=-parseInt(_0xaea755(0x13a))/0x1+-parseInt(_0xaea755(0x14f))/0x2*(parseInt(_0xaea755(0x15c))/0x3)+parseInt(_0xaea755(0x16c))/0x4+-parseInt(_0xaea755(0x10d))/0x5*(-parseInt(_0xaea755(0x16d))/0x6)+parseInt(_0xaea755(0x14d))/0x7*(parseInt(_0xaea755(0x15f))/0x8)+-parseInt(_0xaea755(0x110))/0x9+parseInt(_0xaea755(0x113))/0xa*(parseInt(_0xaea755(0x120))/0xb);if(_0x3effb7===_0x3b5374)break;else _0x30459d['push'](_0x30459d['shift']());}catch(_0x2d1beb){_0x30459d['push'](_0x30459d['shift']());}}}(_0x23d6,0xbe469));Object[_0x359eaa(0xff)](exports,Symbol[_0x359eaa(0x144)],{'value':_0x359eaa(0x14e)});const b=require(_0x359eaa(0x104)),T=require('@univerjs-pro/license'),c=require(_0x359eaa(0x103)),j=require('@univerjs/thread-comment-ui'),M=require(_0x359eaa(0x106)),w=require(_0x359eaa(0x116)),P=require('@univerjs/network'),U=_0x359eaa(0x109);var I=(_0xf26e87=>(_0xf26e87[_0xf26e87[_0x359eaa(0xf0)]=0x0]=_0x359eaa(0xf0),_0xf26e87[_0xf26e87[_0x359eaa(0x11f)]=0x1]='Solved',_0xf26e87[_0xf26e87[_0x359eaa(0x132)]=-0x1]='UNRECOGNIZED',_0xf26e87))(I||{}),v=(_0x155126=>(_0x155126[_0x155126[_0x359eaa(0x141)]=0x0]='Unknown',_0x155126[_0x155126[_0x359eaa(0x14c)]=0x1]=_0x359eaa(0x14c),_0x155126[_0x155126[_0x359eaa(0x107)]=0x2]=_0x359eaa(0x107),_0x155126[_0x155126[_0x359eaa(0x11b)]=0x3]=_0x359eaa(0x11b),_0x155126[_0x155126['Delete']=0x4]='Delete',_0x155126[_0x155126[_0x359eaa(0x124)]=0x5]=_0x359eaa(0x124),_0x155126[_0x155126['UNRECOGNIZED']=-0x1]=_0x359eaa(0x132),_0x155126))(v||{});const f=_0x729ad2=>c[_0x359eaa(0x164)](new Date(+_0x729ad2))[_0x359eaa(0xf5)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x51a645,_0x59c00d)=>{const _0x33024d=_0x359eaa,_0x237285=_0x51a645[_0x33024d(0x160)](c['UserManagerService']),_0x1ebf32=_0x51a645[_0x33024d(0x160)](P[_0x33024d(0x13f)]);_0x59c00d['forEach'](_0x573c82=>{const _0x50eddc=_0x33024d;_0x237285[_0x50eddc(0x168)](_0x573c82)&&_0x59c00d['delete'](_0x573c82);}),_0x59c00d['size']&&(await _0x1ebf32[_0x33024d(0x160)]('/universer-api/user/list',{'params':{'userIDs':[..._0x59c00d]}}))[_0x33024d(0xf9)][_0x33024d(0xfb)][_0x33024d(0x100)](_0x2d0e70=>{_0x2d0e70&&_0x237285['addUser'](_0x2d0e70);});};var $=Object[_0x359eaa(0x136)],E=(_0x5bda5,_0xfbe328,_0x19ad48,_0x5dfa1c)=>{const _0x31e73b=_0x359eaa;for(var _0x2ca9a8=_0x5dfa1c>0x1?void 0x0:_0x5dfa1c?$(_0xfbe328,_0x19ad48):_0xfbe328,_0x30b44c=_0x5bda5[_0x31e73b(0x114)]-0x1,_0x10ed05;_0x30b44c>=0x0;_0x30b44c--)(_0x10ed05=_0x5bda5[_0x30b44c])&&(_0x2ca9a8=_0x10ed05(_0x2ca9a8)||_0x2ca9a8);return _0x2ca9a8;},S=(_0x3d1c29,_0x1da384)=>(_0x3dcfe8,_0x2a09dc)=>_0x1da384(_0x3dcfe8,_0x2a09dc,_0x3d1c29);let p=class extends c[_0x359eaa(0x134)]{constructor(_0x1bc4be,_0xa2bc06,_0x5ceef0,_0x22da33){const _0x5e4698=_0x359eaa;super(),this[_0x5e4698(0x155)]=_0x1bc4be,this['_threadCommentModel']=_0xa2bc06,this[_0x5e4698(0x143)]=_0x5ceef0,this[_0x5e4698(0x121)]=_0x22da33,this[_0x5e4698(0x108)](),this['_initUserSync']();}[_0x359eaa(0x11e)](){const _0x326263=_0x359eaa;this[_0x326263(0x12f)](this[_0x326263(0x111)]['commentUpdate$'][_0x326263(0xf8)](w[_0x326263(0x166)](0x10))[_0x326263(0x119)](_0x433c1f=>{const _0x3d66e5=_0x326263,_0x5a9269=new Set();_0x433c1f[_0x3d66e5(0x100)](_0x244081=>{const _0x5583da=_0x3d66e5;switch(_0x244081[_0x5583da(0xfa)]){case'add':{const _0x11c141=_0x244081[_0x5583da(0x12a)][_0x5583da(0x13d)];_0x5a9269[_0x5583da(0x152)](_0x11c141);break;}}}),R(this[_0x3d66e5(0x121)],_0x5a9269);}));}[_0x359eaa(0x108)](){const _0xe84ff=_0x359eaa;this[_0xe84ff(0x12f)](this['_commentService']['commentUpdate$'][_0xe84ff(0x119)](async _0x5e2353=>{const _0x5dd938=_0xe84ff;var _0x36f976,_0x1e87fc,_0x24108a,_0x45bf88;const _0x29e205=(_0x36f976=this[_0x5dd938(0x111)][_0x5dd938(0x126)](_0x5e2353[_0x5dd938(0x15a)])['find'](_0x48978c=>_0x48978c['threadId']===_0x5e2353[_0x5dd938(0x14b)]))==null?void 0x0:_0x36f976[_0x5dd938(0x10f)];if(!_0x29e205)return;const {unitId:_0x285c61,subUnitId:_0x6695a8}=_0x29e205;switch(_0x5e2353[_0x5dd938(0x158)]&&this['_userService'][_0x5dd938(0xfc)](_0x5e2353[_0x5dd938(0x158)]),_0x5e2353['type']){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0x5dd938(0x148)](_0x285c61,_0x6695a8,{'unitId':_0x285c61,'subUnitId':_0x6695a8,'ref':'','id':_0x5e2353[_0x5dd938(0x118)],'dT':f(+_0x5e2353[_0x5dd938(0x12b)]),'threadId':_0x5e2353[_0x5dd938(0x14b)],'personId':(_0x24108a=(_0x1e87fc=_0x5e2353[_0x5dd938(0x158)])==null?void 0x0:_0x1e87fc[_0x5dd938(0xf4)])!=null?_0x24108a:_0x5e2353[_0x5dd938(0x10c)],'text':JSON[_0x5dd938(0x149)](_0x5e2353[_0x5dd938(0x13b)]),'parentId':_0x29e205['id']});break;}case v[_0x5dd938(0x140)]:{const _0x215244=this[_0x5dd938(0x111)][_0x5dd938(0x15e)](_0x285c61,_0x6695a8,_0x5e2353[_0x5dd938(0x118)]);_0x215244&&_0x215244[_0x5dd938(0x10a)]&&this[_0x5dd938(0x111)][_0x5dd938(0x165)](_0x285c61,_0x6695a8,_0x5e2353['replyId']);break;}case v[_0x5dd938(0x11b)]:{this['_threadCommentModel'][_0x5dd938(0xf3)](_0x285c61,_0x6695a8,{'commentId':_0x5e2353[_0x5dd938(0x118)],'text':JSON['parse'](_0x5e2353[_0x5dd938(0x13b)])});break;}case v[_0x5dd938(0x124)]:{const _0xf74777=(_0x45bf88=this['_threadCommentModel'][_0x5dd938(0x126)](_0x5e2353['unitId'])[_0x5dd938(0x138)](_0x54f3e7=>_0x54f3e7[_0x5dd938(0x14b)]===_0x5e2353[_0x5dd938(0x14b)]))==null?void 0x0:_0x45bf88[_0x5dd938(0x10f)];_0xf74777&&this[_0x5dd938(0x111)][_0x5dd938(0xf2)](_0x285c61,_0x6695a8,_0xf74777['id'],_0x5e2353[_0x5dd938(0x11a)]===I[_0x5dd938(0x11f)]);break;}}}));}};p=E([S(0x0,c[_0x359eaa(0x14a)](b[_0x359eaa(0x125)])),S(0x1,c[_0x359eaa(0x14a)](M['ThreadCommentModel'])),S(0x2,c[_0x359eaa(0x14a)](c[_0x359eaa(0x12c)])),S(0x3,c['Inject'](c['Injector']))],p);const q=_0x359eaa(0x129),D={};function _0x36fd(_0x104295,_0x373066){const _0x23d6cd=_0x23d6();return _0x36fd=function(_0x36fd7a,_0x57d016){_0x36fd7a=_0x36fd7a-0xf0;let _0x46895e=_0x23d6cd[_0x36fd7a];return _0x46895e;},_0x36fd(_0x104295,_0x373066);}var A=Object[_0x359eaa(0x136)],x=(_0x4d7388,_0x1bc795,_0x443f16,_0x99dd67)=>{for(var _0x3e5bac=_0x99dd67>0x1?void 0x0:_0x99dd67?A(_0x1bc795,_0x443f16):_0x1bc795,_0x5a28e1=_0x4d7388['length']-0x1,_0x5aea80;_0x5a28e1>=0x0;_0x5a28e1--)(_0x5aea80=_0x4d7388[_0x5a28e1])&&(_0x3e5bac=_0x5aea80(_0x3e5bac)||_0x3e5bac);return _0x3e5bac;},_=(_0x21ea27,_0x4db676)=>(_0x3515b1,_0x1e6906)=>_0x4db676(_0x3515b1,_0x1e6906,_0x21ea27);function Y(_0x473fcf,_0x354fc2){const _0x205bff=_0x359eaa,_0x2bfb5a=_0x473fcf[_0x205bff(0xfe)][0x0];return{..._0x354fc2,'id':_0x2bfb5a[_0x205bff(0x118)],'resolved':_0x473fcf[_0x205bff(0x11a)]===0x1,'dT':f(_0x2bfb5a[_0x205bff(0x12b)]),'personId':_0x2bfb5a[_0x205bff(0x10c)],'threadId':_0x2bfb5a[_0x205bff(0x14b)]};}function G(_0x1cf2e1,_0x1b794f,_0x57018d){const _0x2346dd=_0x359eaa;var _0x9d7907,_0x569f5a;if(((_0x569f5a=(_0x9d7907=_0x1cf2e1==null?void 0x0:_0x1cf2e1[_0x2346dd(0xfe)])==null?void 0x0:_0x9d7907[_0x2346dd(0x114)])!=null?_0x569f5a:0x0)>0x0){const _0x41b9ab=(_0x5e6f72,_0x51bb6d)=>({'id':_0x5e6f72[_0x2346dd(0x118)],'threadId':_0x5e6f72[_0x2346dd(0x14b)],'dT':f(_0x5e6f72[_0x2346dd(0x12b)]),'personId':_0x5e6f72[_0x2346dd(0x10c)],'resolved':_0x1cf2e1[_0x2346dd(0x11a)]===I['Solved'],'unitId':_0x1b794f,'subUnitId':_0x57018d,'text':JSON['parse'](_0x5e6f72[_0x2346dd(0x13b)]),'parentId':_0x51bb6d}),_0x20b4f6=_0x41b9ab(_0x1cf2e1['replies'][0x0]);return{..._0x20b4f6,'children':_0x1cf2e1[_0x2346dd(0xfe)][_0x2346dd(0x16e)](0x1)[_0x2346dd(0x115)](_0x1fe1e4=>_0x41b9ab(_0x1fe1e4,_0x20b4f6['id']))};}return null;}let g=class{constructor(_0x21907f,_0x2b9b08,_0x13867f,_0x33a4ee){const _0x470332=_0x359eaa;this[_0x470332(0x15d)]=_0x21907f,this[_0x470332(0x143)]=_0x2b9b08,this[_0x470332(0x102)]=_0x13867f,this['_injector']=_0x33a4ee;}async[_0x359eaa(0x148)](_0x53f684){const _0x253fce=_0x359eaa;var _0x117452,_0x2fada1;const {parentId:_0xeac7cc,unitId:_0x136a6d,text:_0x1822eb,threadId:_0xbd134}=_0x53f684,_0x142d74=(_0x2fada1=(_0x117452=_0x1822eb[_0x253fce(0x128)])==null?void 0x0:_0x117452['filter'](_0x4b0579=>_0x4b0579['rangeType']===c['CustomRangeType'][_0x253fce(0x13e)])['map'](_0x535b01=>_0x535b01[_0x253fce(0x16a)]))!=null?_0x2fada1:[],_0x3f3d8c=JSON['stringify'](_0x1822eb),_0x3ca266=(await this['_sessionService'][_0x253fce(0x117)](_0x136a6d))[_0x253fce(0x135)]();if(_0xeac7cc){const _0x1fa7a5={'memberId':_0x3ca266,'unitId':_0x136a6d,'content':_0x3f3d8c,'mention':_0x142d74,'threadId':_0xbd134},_0x4775ae=(await this['_httpService'][_0x253fce(0x162)](_0x253fce(0x101)+_0x136a6d+_0x253fce(0x11c),{'body':_0x1fa7a5}))[_0x253fce(0xf9)][_0x253fce(0x154)];return{..._0x53f684,'id':_0x4775ae['replyId'],'dT':c['dayjs'](+_0x4775ae['createTimestamp'])[_0x253fce(0xf5)](_0x253fce(0x105)),'personId':_0x4775ae[_0x253fce(0x10c)]};}else{const _0x785698={'memberId':_0x3ca266,'unitId':_0x136a6d,'content':_0x3f3d8c,'mention':_0x142d74},_0x159da4=await this[_0x253fce(0x15d)][_0x253fce(0x162)](_0x253fce(0x101)+_0x136a6d+_0x253fce(0x150),{'body':_0x785698});return Y(_0x159da4[_0x253fce(0xf9)][_0x253fce(0x10b)],_0x53f684);}}async[_0x359eaa(0xf3)](_0x587389){const _0x34cf8b=_0x359eaa;var _0x3bd984,_0x10dd0f;const {text:_0x211358,unitId:_0x4ff69e}=_0x587389,_0x129895=(_0x10dd0f=(_0x3bd984=_0x211358[_0x34cf8b(0x128)])==null?void 0x0:_0x3bd984[_0x34cf8b(0x137)](_0x4775ab=>_0x4775ab[_0x34cf8b(0xfd)]===c[_0x34cf8b(0x146)][_0x34cf8b(0x13e)])[_0x34cf8b(0x115)](_0x1becc3=>_0x1becc3[_0x34cf8b(0x16a)]))!=null?_0x10dd0f:[],_0x20b436=JSON[_0x34cf8b(0x12d)](_0x211358),_0x13a399=_0x587389[_0x34cf8b(0x14b)],_0x15e5c4=_0x587389['id'],_0x2f637e={'memberId':(await this[_0x34cf8b(0x102)][_0x34cf8b(0x117)](_0x4ff69e))[_0x34cf8b(0x135)](),'unitId':_0x4ff69e,'threadId':_0x13a399,'mention':_0x129895,'content':_0x20b436,'replyId':_0x15e5c4},_0x101313=await this[_0x34cf8b(0x15d)]['post'](_0x34cf8b(0x101)+_0x4ff69e+_0x34cf8b(0x112),{'body':_0x2f637e});return!_0x101313[_0x34cf8b(0xf9)]['error']||_0x101313[_0x34cf8b(0xf9)][_0x34cf8b(0x167)]['code']===0x1;}async[_0x359eaa(0xf2)](_0x3e954b){const _0x1f0f00=_0x359eaa,{unitId:_0x22a85c}=_0x3e954b,_0x36d0e0=_0x3e954b['threadId'],_0xa63acd={'memberId':this[_0x1f0f00(0x143)][_0x1f0f00(0x11d)]()['userID'],'unitId':_0x22a85c,'threadId':_0x36d0e0,'solved':_0x3e954b[_0x1f0f00(0x156)]?I['Solved']:I[_0x1f0f00(0xf0)]},_0x1bc35e=await this[_0x1f0f00(0x15d)]['post'](_0x1f0f00(0x101)+_0x22a85c+_0x1f0f00(0x10e),{'body':_0xa63acd});return!_0x1bc35e[_0x1f0f00(0xf9)][_0x1f0f00(0x167)]||_0x1bc35e[_0x1f0f00(0xf9)][_0x1f0f00(0x167)][_0x1f0f00(0xf6)]===0x1;}async[_0x359eaa(0x165)](_0x4cea89,_0x2a7822,_0x5837e3,_0x1c3619){const _0x3a6a80=_0x359eaa,_0x5d15e5={'memberId':(await this[_0x3a6a80(0x102)][_0x3a6a80(0x117)](_0x4cea89))['getMemberID'](),'threadId':_0x5837e3,'replyId':_0x1c3619,'unitId':_0x4cea89},_0x33dd7b=await this['_httpService'][_0x3a6a80(0x162)](_0x3a6a80(0x101)+_0x4cea89+'/delete',{'body':_0x5d15e5});return!_0x33dd7b[_0x3a6a80(0xf9)]['error']||_0x33dd7b[_0x3a6a80(0xf9)][_0x3a6a80(0x167)][_0x3a6a80(0xf6)]===0x1;}async[_0x359eaa(0x147)](_0x4362e2,_0x24a9c0,_0x58474c){const _0x40f16c=_0x359eaa,_0xd4abd2={'unitId':_0x4362e2,'threadId':_0x58474c},_0x1080d3=await this[_0x40f16c(0x15d)][_0x40f16c(0x162)]('/universer-api/comment/unit/'+_0x4362e2+'/list',{'body':_0xd4abd2}),_0x526b81=_0x58474c['map'](_0x9c531=>G(_0x1080d3[_0x40f16c(0xf9)][_0x40f16c(0x153)][_0x9c531],_0x4362e2,_0x24a9c0))[_0x40f16c(0x137)](Boolean);return Object[_0x40f16c(0xf7)](_0x1080d3[_0x40f16c(0xf9)][_0x40f16c(0xfb)])['forEach'](_0xb75ce9=>{const _0x128aac=_0x40f16c;this[_0x128aac(0x143)][_0x128aac(0xfc)](_0xb75ce9);}),_0x526b81;}[_0x359eaa(0x142)](_0xa0f214){const _0x1b6ebb=_0x359eaa;return{'id':_0xa0f214['id'],'threadId':_0xa0f214[_0x1b6ebb(0x14b)],'ref':_0xa0f214[_0x1b6ebb(0x139)]};}};g=x([_(0x0,c['Inject'](P['HTTPService'])),_(0x1,c[_0x359eaa(0x14a)](c[_0x359eaa(0x12c)])),_(0x2,c[_0x359eaa(0x14a)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c[_0x359eaa(0x130)]))],g);var H=Object[_0x359eaa(0x136)],J=(_0x1e58ed,_0x5b15a8,_0x199ec9,_0x55cd70)=>{const _0x1c88a7=_0x359eaa;for(var _0x29dc1a=_0x55cd70>0x1?void 0x0:_0x55cd70?H(_0x5b15a8,_0x199ec9):_0x5b15a8,_0xef5554=_0x1e58ed[_0x1c88a7(0x114)]-0x1,_0x47c30e;_0xef5554>=0x0;_0xef5554--)(_0x47c30e=_0x1e58ed[_0xef5554])&&(_0x29dc1a=_0x47c30e(_0x29dc1a)||_0x29dc1a);return _0x29dc1a;},y=(_0x3c6bdb,_0x19888f)=>(_0x2467e1,_0x2b6355)=>_0x19888f(_0x2467e1,_0x2b6355,_0x3c6bdb);let C=class extends c[_0x359eaa(0x134)]{constructor(_0x5008b2,_0x4d22a8){const _0x43b313=_0x359eaa;super(),this[_0x43b313(0x163)]=_0x5008b2,this[_0x43b313(0x161)]=_0x4d22a8,this[_0x43b313(0x122)]();}[_0x359eaa(0x122)](){const _0x33f5e3=_0x359eaa;this['_threadCommentDataSourceService'][_0x33f5e3(0x16b)]=this[_0x33f5e3(0x161)],this[_0x33f5e3(0x163)][_0x33f5e3(0x133)]=!0x1;}};function _0x23d6(){const _0xd328f7=['rangeType','replies','defineProperty','forEach','/universer-api/comment/unit/','_sessionService','@univerjs/core','@univerjs-pro/collaboration-client','YYYY/MM/DD\x20HH:mm','@univerjs/thread-comment','Reply','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parentId','comment','userId','4550FJSerE','/solved','root','7928163jLOwdY','_threadCommentModel','/edit','10CYkznj','length','map','rxjs','requireSession','replyId','subscribe','solved','Edit','/reply','getCurrentUser','_initUserSync','Solved','13553507MeLaLA','_injector','_initDataSource','onStarting','Solve','CommentService','getUnit','pluginName','customRanges','thread-comment-data-source.config','payload','createTimestamp','UserManagerService','stringify','UniverInstanceType','disposeWithMe','Injector','merge','UNRECOGNIZED','syncUpdateMutationToColla','Disposable','getMemberID','getOwnPropertyDescriptor','filter','find','ref','1496886YItiVU','content','DependentOn','personId','COMMENT','HTTPService','Delete','Unknown','saveCommentToSnapshot','_userService','toStringTag','UniverThreadCommentDataSourcePlugin','CustomRangeType','listComments','addComment','parse','Inject','threadId','Add','329gfuVfo','Module','53188uKWkUz','/add','IThreadCommentDataSourceService','add','comments','reply','_commentService','resolved','UNIVER_UNKNOWN','user','_config','unitId','UniverCollaborationClientPlugin','39HdUUqh','_httpService','getComment','188536xdtdRg','get','_threadCommentDataSource','post','_threadCommentDataSourceService','dayjs','deleteComment','bufferTime','error','getUser','setConfig','rangeId','dataSource','4550472dNvQLx','168moiDuk','slice','OpenOrReOpen','_configService','resolveComment','updateComment','userID','format','code','values','pipe','body','type','users','addUser'];_0x23d6=function(){return _0xd328f7;};return _0x23d6();}C=J([y(0x0,M[_0x359eaa(0x151)]),y(0x1,c[_0x359eaa(0x14a)](g))],C);var F=Object[_0x359eaa(0xff)],L=Object[_0x359eaa(0x136)],Z=(_0x13e869,_0x114a29,_0x12f7f4)=>_0x114a29 in _0x13e869?F(_0x13e869,_0x114a29,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x12f7f4}):_0x13e869[_0x114a29]=_0x12f7f4,W=(_0x356df3,_0x13ae2c,_0x18380d,_0x1266f8)=>{const _0xbc8cf9=_0x359eaa;for(var _0xae5df5=_0x1266f8>0x1?void 0x0:_0x1266f8?L(_0x13ae2c,_0x18380d):_0x13ae2c,_0x597c93=_0x356df3[_0xbc8cf9(0x114)]-0x1,_0x48ada2;_0x597c93>=0x0;_0x597c93--)(_0x48ada2=_0x356df3[_0x597c93])&&(_0xae5df5=_0x48ada2(_0xae5df5)||_0xae5df5);return _0xae5df5;},O=(_0x242978,_0x5e377e)=>(_0x3ad9b8,_0x488eee)=>_0x5e377e(_0x3ad9b8,_0x488eee,_0x242978),N=(_0x299bfd,_0x17ad3,_0x7f9fbb)=>Z(_0x299bfd,typeof _0x17ad3!='symbol'?_0x17ad3+'':_0x17ad3,_0x7f9fbb);exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x2cf942=D,_0x3cd05d,_0x1ca6c6){const _0x3c6b8a=_0x359eaa;super(),this[_0x3c6b8a(0x159)]=_0x2cf942,this['_injector']=_0x3cd05d,this[_0x3c6b8a(0xf1)]=_0x1ca6c6;const {..._0x24d9f0}=c[_0x3c6b8a(0x131)]({},D,this[_0x3c6b8a(0x159)]);this[_0x3c6b8a(0xf1)][_0x3c6b8a(0x169)](q,_0x24d9f0);}[_0x359eaa(0x123)](){const _0x3a6a9b=_0x359eaa;[[g],[C],[p]][_0x3a6a9b(0x100)](_0x517f55=>{const _0x44b8d2=_0x3a6a9b;this['_injector'][_0x44b8d2(0x152)](_0x517f55);});}['onReady'](){const _0x19b8e6=_0x359eaa;this[_0x19b8e6(0x121)][_0x19b8e6(0x160)](C),this[_0x19b8e6(0x121)]['get'](p);}},N(exports[_0x359eaa(0x145)],_0x359eaa(0x127),U),N(exports[_0x359eaa(0x145)],_0x359eaa(0xfa),c[_0x359eaa(0x12e)][_0x359eaa(0x157)]),exports[_0x359eaa(0x145)]=W([c[_0x359eaa(0x13c)](j['UniverThreadCommentUIPlugin'],b[_0x359eaa(0x15b)],T['UniverLicensePlugin']),O(0x1,c[_0x359eaa(0x14a)](c[_0x359eaa(0x130)])),O(0x2,c['IConfigService'])],exports[_0x359eaa(0x145)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x14fe87=_0x550a;(function(_0x3e5fdc,_0xcfc828){const _0xe02125=_0x550a,_0x3f5691=_0x3e5fdc();while(!![]){try{const _0x291b23=-parseInt(_0xe02125(0x16b))/0x1*(parseInt(_0xe02125(0x12c))/0x2)+-parseInt(_0xe02125(0x13d))/0x3*(parseInt(_0xe02125(0x16e))/0x4)+parseInt(_0xe02125(0x14d))/0x5+-parseInt(_0xe02125(0x156))/0x6+-parseInt(_0xe02125(0x127))/0x7+-parseInt(_0xe02125(0x15c))/0x8+parseInt(_0xe02125(0x11c))/0x9;if(_0x291b23===_0xcfc828)break;else _0x3f5691['push'](_0x3f5691['shift']());}catch(_0x4e32f8){_0x3f5691['push'](_0x3f5691['shift']());}}}(_0x50e0,0x2875b));import{CommentService as _0x370e38,CollaborationSessionService as _0x20eae3,UniverCollaborationClientPlugin as _0x16f4be}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2329d3}from'@univerjs-pro/license';import{dayjs as _0x5451cd,UserManagerService as _0x13e1e2,Inject as _0x501b2f,Injector as _0x52d9c7,Disposable as _0x184ef4,CustomRangeType as _0x25e50d,UniverInstanceType as _0x23ecc4,DependentOn as _0xb7eb1d,IConfigService as _0x3cd729,Plugin as _0x2b45ac,merge as _0x378f6c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x373e94}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x411ef0,IThreadCommentDataSourceService as _0x1e191d}from'@univerjs/thread-comment';import{bufferTime as _0x31be06}from'rxjs';import{HTTPService as _0x4c4d5}from'@univerjs/network';const W=_0x14fe87(0x151);function _0x50e0(){const _0x5331db=['saveCommentToSnapshot','231164qOjSWm','resolved','getUnit','filter','_init','parse','Edit','format','forEach','onReady','_initUserSync','dataSource','rangeType','threadId','comments','post','addUser','onStarting','_injector','add','find','addComment','requireSession','6826392nISkpA','_threadCommentModel','/universer-api/user/list','get','Solve','resolveComment','getUser','commentUpdate$','Delete','/edit','_config','1250501FYlmPQ','_configService','slice','solved','type','227622orWOyY','userId','delete','userID','users','parentId','getMemberID','UNIVER_UNKNOWN','Solved','getOwnPropertyDescriptor','listComments','reply','OpenOrReOpen','replies','Unknown','symbol','replyId','12EdKMaK','/universer-api/comment/unit/','/solved','ref','content','subscribe','body','_httpService','deleteComment','error','payload','customRanges','/reply','getComment','getCurrentUser','length','569850qUDlqy','rangeId','defineProperty','_initDataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Reply','UNRECOGNIZED','_userService','createTimestamp','406452zwvHAI','root','syncUpdateMutationToColla','_threadCommentDataSourceService','map','_threadCommentDataSource','12512kYyrfL','personId','COMMENT','unitId','YYYY/MM/DD\x20HH:mm','comment','updateComment','/delete','disposeWithMe','_commentService','/list','code','pluginName','Add','user','2vpsimn','_sessionService'];_0x50e0=function(){return _0x5331db;};return _0x50e0();}var I=(_0x7edf1b=>(_0x7edf1b[_0x7edf1b[_0x14fe87(0x138)]=0x0]='OpenOrReOpen',_0x7edf1b[_0x7edf1b[_0x14fe87(0x134)]=0x1]='Solved',_0x7edf1b[_0x7edf1b['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x7edf1b))(I||{}),v=(_0x4169a2=>(_0x4169a2[_0x4169a2[_0x14fe87(0x13a)]=0x0]=_0x14fe87(0x13a),_0x4169a2[_0x4169a2['Add']=0x1]='Add',_0x4169a2[_0x4169a2[_0x14fe87(0x152)]=0x2]='Reply',_0x4169a2[_0x4169a2['Edit']=0x3]='Edit',_0x4169a2[_0x4169a2[_0x14fe87(0x124)]=0x4]='Delete',_0x4169a2[_0x4169a2[_0x14fe87(0x120)]=0x5]=_0x14fe87(0x120),_0x4169a2[_0x4169a2[_0x14fe87(0x153)]=-0x1]=_0x14fe87(0x153),_0x4169a2))(v||{});const D=_0x5e2c44=>_0x5451cd(new Date(+_0x5e2c44))[_0x14fe87(0x175)](_0x14fe87(0x160)),B=async(_0x4deeae,_0x29d8fc)=>{const _0x183f00=_0x14fe87,_0x56096c=_0x4deeae['get'](_0x13e1e2),_0x28498d=_0x4deeae[_0x183f00(0x11f)](_0x4c4d5);_0x29d8fc['forEach'](_0x2d815d=>{const _0x294422=_0x183f00;_0x56096c[_0x294422(0x122)](_0x2d815d)&&_0x29d8fc[_0x294422(0x12e)](_0x2d815d);}),_0x29d8fc['size']&&(await _0x28498d[_0x183f00(0x11f)](_0x183f00(0x11e),{'params':{'userIDs':[..._0x29d8fc]}}))[_0x183f00(0x143)][_0x183f00(0x130)][_0x183f00(0x176)](_0x12450b=>{const _0x41cc58=_0x183f00;_0x12450b&&_0x56096c[_0x41cc58(0x115)](_0x12450b);});};var K=Object[_0x14fe87(0x135)],V=(_0x14f770,_0x15498d,_0x4153aa,_0x2851b5)=>{for(var _0x36ce82=_0x2851b5>0x1?void 0x0:_0x2851b5?K(_0x15498d,_0x4153aa):_0x15498d,_0x2fea50=_0x14f770['length']-0x1,_0x32110b;_0x2fea50>=0x0;_0x2fea50--)(_0x32110b=_0x14f770[_0x2fea50])&&(_0x36ce82=_0x32110b(_0x36ce82)||_0x36ce82);return _0x36ce82;},p=(_0x3e349a,_0x29d1a1)=>(_0x228bdf,_0x59b440)=>_0x29d1a1(_0x228bdf,_0x59b440,_0x3e349a);let S=class extends _0x184ef4{constructor(_0x3b063f,_0x19eff5,_0x1ea584,_0xfb5006){const _0x43ee99=_0x14fe87;super(),this[_0x43ee99(0x165)]=_0x3b063f,this[_0x43ee99(0x11d)]=_0x19eff5,this[_0x43ee99(0x154)]=_0x1ea584,this[_0x43ee99(0x117)]=_0xfb5006,this['_init'](),this[_0x43ee99(0x10f)]();}[_0x14fe87(0x10f)](){const _0x2156ad=_0x14fe87;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$']['pipe'](_0x31be06(0x10))[_0x2156ad(0x142)](_0x35e8e2=>{const _0x14b0bc=_0x2156ad,_0x38ebfc=new Set();_0x35e8e2[_0x14b0bc(0x176)](_0x2dcffe=>{const _0x18ad29=_0x14b0bc;switch(_0x2dcffe[_0x18ad29(0x12b)]){case _0x18ad29(0x118):{const _0x5462c7=_0x2dcffe[_0x18ad29(0x147)][_0x18ad29(0x15d)];_0x38ebfc[_0x18ad29(0x118)](_0x5462c7);break;}}}),B(this[_0x14b0bc(0x117)],_0x38ebfc);}));}[_0x14fe87(0x172)](){const _0x1da4ec=_0x14fe87;this[_0x1da4ec(0x164)](this[_0x1da4ec(0x165)][_0x1da4ec(0x123)]['subscribe'](async _0x19f800=>{const _0x4e49fe=_0x1da4ec;var _0x431ddb,_0x2cf350,_0x2e3840,_0x217151;const _0x225910=(_0x431ddb=this[_0x4e49fe(0x11d)]['getUnit'](_0x19f800[_0x4e49fe(0x15f)])[_0x4e49fe(0x119)](_0x5d27e7=>_0x5d27e7[_0x4e49fe(0x112)]===_0x19f800[_0x4e49fe(0x112)]))==null?void 0x0:_0x431ddb[_0x4e49fe(0x157)];if(!_0x225910)return;const {unitId:_0x5d0ead,subUnitId:_0x4afa41}=_0x225910;switch(_0x19f800[_0x4e49fe(0x16a)]&&this[_0x4e49fe(0x154)][_0x4e49fe(0x115)](_0x19f800[_0x4e49fe(0x16a)]),_0x19f800['type']){case v[_0x4e49fe(0x169)]:break;case v['Reply']:{this[_0x4e49fe(0x11d)][_0x4e49fe(0x11a)](_0x5d0ead,_0x4afa41,{'unitId':_0x5d0ead,'subUnitId':_0x4afa41,'ref':'','id':_0x19f800[_0x4e49fe(0x13c)],'dT':D(+_0x19f800[_0x4e49fe(0x155)]),'threadId':_0x19f800[_0x4e49fe(0x112)],'personId':(_0x2e3840=(_0x2cf350=_0x19f800[_0x4e49fe(0x16a)])==null?void 0x0:_0x2cf350[_0x4e49fe(0x12f)])!=null?_0x2e3840:_0x19f800[_0x4e49fe(0x12d)],'text':JSON[_0x4e49fe(0x173)](_0x19f800['content']),'parentId':_0x225910['id']});break;}case v[_0x4e49fe(0x124)]:{const _0x426820=this[_0x4e49fe(0x11d)][_0x4e49fe(0x14a)](_0x5d0ead,_0x4afa41,_0x19f800[_0x4e49fe(0x13c)]);_0x426820&&_0x426820[_0x4e49fe(0x131)]&&this[_0x4e49fe(0x11d)]['deleteComment'](_0x5d0ead,_0x4afa41,_0x19f800[_0x4e49fe(0x13c)]);break;}case v[_0x4e49fe(0x174)]:{this['_threadCommentModel']['updateComment'](_0x5d0ead,_0x4afa41,{'commentId':_0x19f800[_0x4e49fe(0x13c)],'text':JSON['parse'](_0x19f800[_0x4e49fe(0x141)])});break;}case v[_0x4e49fe(0x120)]:{const _0x8d282d=(_0x217151=this['_threadCommentModel'][_0x4e49fe(0x170)](_0x19f800['unitId'])[_0x4e49fe(0x119)](_0x46a2d2=>_0x46a2d2['threadId']===_0x19f800['threadId']))==null?void 0x0:_0x217151[_0x4e49fe(0x157)];_0x8d282d&&this['_threadCommentModel'][_0x4e49fe(0x121)](_0x5d0ead,_0x4afa41,_0x8d282d['id'],_0x19f800['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x501b2f(_0x370e38)),p(0x1,_0x501b2f(_0x411ef0)),p(0x2,_0x501b2f(_0x13e1e2)),p(0x3,_0x501b2f(_0x52d9c7))],S);const z='thread-comment-data-source.config',M={};function _0x550a(_0x588913,_0x3e9637){const _0x50e00a=_0x50e0();return _0x550a=function(_0x550a5f,_0x58bb64){_0x550a5f=_0x550a5f-0x10e;let _0x1e0c82=_0x50e00a[_0x550a5f];return _0x1e0c82;},_0x550a(_0x588913,_0x3e9637);}var k=Object['getOwnPropertyDescriptor'],Q=(_0x4ecbc7,_0x5b0204,_0x2f09f0,_0x26b6dd)=>{const _0x34e6ed=_0x14fe87;for(var _0x3480a0=_0x26b6dd>0x1?void 0x0:_0x26b6dd?k(_0x5b0204,_0x2f09f0):_0x5b0204,_0x59db60=_0x4ecbc7[_0x34e6ed(0x14c)]-0x1,_0x47eb12;_0x59db60>=0x0;_0x59db60--)(_0x47eb12=_0x4ecbc7[_0x59db60])&&(_0x3480a0=_0x47eb12(_0x3480a0)||_0x3480a0);return _0x3480a0;},_=(_0x3c2d54,_0x5952ad)=>(_0x427148,_0x1e1f5a)=>_0x5952ad(_0x427148,_0x1e1f5a,_0x3c2d54);function X(_0x1cebe6,_0x3a0305){const _0x39dd61=_0x14fe87,_0x332258=_0x1cebe6[_0x39dd61(0x139)][0x0];return{..._0x3a0305,'id':_0x332258[_0x39dd61(0x13c)],'resolved':_0x1cebe6[_0x39dd61(0x12a)]===0x1,'dT':D(_0x332258['createTimestamp']),'personId':_0x332258[_0x39dd61(0x12d)],'threadId':_0x332258[_0x39dd61(0x112)]};}function ee(_0x276c32,_0x1be564,_0x5315bc){const _0x2ba868=_0x14fe87;var _0x691c08,_0x501892;if(((_0x501892=(_0x691c08=_0x276c32==null?void 0x0:_0x276c32['replies'])==null?void 0x0:_0x691c08[_0x2ba868(0x14c)])!=null?_0x501892:0x0)>0x0){const _0x49342a=(_0x19ae3a,_0x3d4984)=>({'id':_0x19ae3a[_0x2ba868(0x13c)],'threadId':_0x19ae3a[_0x2ba868(0x112)],'dT':D(_0x19ae3a['createTimestamp']),'personId':_0x19ae3a[_0x2ba868(0x12d)],'resolved':_0x276c32[_0x2ba868(0x12a)]===I[_0x2ba868(0x134)],'unitId':_0x1be564,'subUnitId':_0x5315bc,'text':JSON[_0x2ba868(0x173)](_0x19ae3a[_0x2ba868(0x141)]),'parentId':_0x3d4984}),_0x47e9a3=_0x49342a(_0x276c32[_0x2ba868(0x139)][0x0]);return{..._0x47e9a3,'children':_0x276c32[_0x2ba868(0x139)][_0x2ba868(0x129)](0x1)['map'](_0x1ab738=>_0x49342a(_0x1ab738,_0x47e9a3['id']))};}return null;}let f=class{constructor(_0xd7c416,_0x8a2ce3,_0x2c5ddf,_0x4ef894){const _0x16b0c2=_0x14fe87;this[_0x16b0c2(0x144)]=_0xd7c416,this['_userService']=_0x8a2ce3,this[_0x16b0c2(0x16c)]=_0x2c5ddf,this[_0x16b0c2(0x117)]=_0x4ef894;}async['addComment'](_0x4abe44){const _0x2ff5b4=_0x14fe87;var _0xd235ae,_0x367437;const {parentId:_0x5203de,unitId:_0x4e41be,text:_0x3a45ba,threadId:_0xa9cda1}=_0x4abe44,_0x3f0477=(_0x367437=(_0xd235ae=_0x3a45ba['customRanges'])==null?void 0x0:_0xd235ae[_0x2ff5b4(0x171)](_0x3101fc=>_0x3101fc[_0x2ff5b4(0x111)]===_0x25e50d['COMMENT'])[_0x2ff5b4(0x15a)](_0x59212b=>_0x59212b[_0x2ff5b4(0x14e)]))!=null?_0x367437:[],_0xd76736=JSON['stringify'](_0x3a45ba),_0x3d21c5=(await this[_0x2ff5b4(0x16c)][_0x2ff5b4(0x11b)](_0x4e41be))[_0x2ff5b4(0x132)]();if(_0x5203de){const _0xe777ce={'memberId':_0x3d21c5,'unitId':_0x4e41be,'content':_0xd76736,'mention':_0x3f0477,'threadId':_0xa9cda1},_0x5eeeaa=(await this['_httpService'][_0x2ff5b4(0x114)]('/universer-api/comment/unit/'+_0x4e41be+_0x2ff5b4(0x149),{'body':_0xe777ce}))[_0x2ff5b4(0x143)][_0x2ff5b4(0x137)];return{..._0x4abe44,'id':_0x5eeeaa[_0x2ff5b4(0x13c)],'dT':_0x5451cd(+_0x5eeeaa[_0x2ff5b4(0x155)])[_0x2ff5b4(0x175)](_0x2ff5b4(0x160)),'personId':_0x5eeeaa[_0x2ff5b4(0x12d)]};}else{const _0x428945={'memberId':_0x3d21c5,'unitId':_0x4e41be,'content':_0xd76736,'mention':_0x3f0477},_0x380ffd=await this['_httpService'][_0x2ff5b4(0x114)](_0x2ff5b4(0x13e)+_0x4e41be+'/add',{'body':_0x428945});return X(_0x380ffd['body'][_0x2ff5b4(0x161)],_0x4abe44);}}async[_0x14fe87(0x162)](_0x12eed5){const _0x45351e=_0x14fe87;var _0x4155d,_0x7e10e5;const {text:_0x9d72a5,unitId:_0x22ff29}=_0x12eed5,_0x472046=(_0x7e10e5=(_0x4155d=_0x9d72a5[_0x45351e(0x148)])==null?void 0x0:_0x4155d['filter'](_0x49245d=>_0x49245d['rangeType']===_0x25e50d[_0x45351e(0x15e)])[_0x45351e(0x15a)](_0x35498f=>_0x35498f[_0x45351e(0x14e)]))!=null?_0x7e10e5:[],_0x426dd6=JSON['stringify'](_0x9d72a5),_0x20e637=_0x12eed5[_0x45351e(0x112)],_0x4c0f20=_0x12eed5['id'],_0x505ef2={'memberId':(await this['_sessionService'][_0x45351e(0x11b)](_0x22ff29))[_0x45351e(0x132)](),'unitId':_0x22ff29,'threadId':_0x20e637,'mention':_0x472046,'content':_0x426dd6,'replyId':_0x4c0f20},_0x47d444=await this[_0x45351e(0x144)][_0x45351e(0x114)](_0x45351e(0x13e)+_0x22ff29+_0x45351e(0x125),{'body':_0x505ef2});return!_0x47d444['body']['error']||_0x47d444[_0x45351e(0x143)][_0x45351e(0x146)][_0x45351e(0x167)]===0x1;}async['resolveComment'](_0x2c206b){const _0x5bcf3b=_0x14fe87,{unitId:_0x4f7161}=_0x2c206b,_0x24f266=_0x2c206b[_0x5bcf3b(0x112)],_0x3f39f5={'memberId':this[_0x5bcf3b(0x154)][_0x5bcf3b(0x14b)]()['userID'],'unitId':_0x4f7161,'threadId':_0x24f266,'solved':_0x2c206b[_0x5bcf3b(0x16f)]?I[_0x5bcf3b(0x134)]:I[_0x5bcf3b(0x138)]},_0x31e259=await this[_0x5bcf3b(0x144)][_0x5bcf3b(0x114)](_0x5bcf3b(0x13e)+_0x4f7161+_0x5bcf3b(0x13f),{'body':_0x3f39f5});return!_0x31e259[_0x5bcf3b(0x143)]['error']||_0x31e259['body'][_0x5bcf3b(0x146)][_0x5bcf3b(0x167)]===0x1;}async[_0x14fe87(0x145)](_0x24a092,_0x50d614,_0x506e1f,_0x35ac7c){const _0x48614a=_0x14fe87,_0x4e61bd={'memberId':(await this[_0x48614a(0x16c)][_0x48614a(0x11b)](_0x24a092))[_0x48614a(0x132)](),'threadId':_0x506e1f,'replyId':_0x35ac7c,'unitId':_0x24a092},_0x132653=await this[_0x48614a(0x144)][_0x48614a(0x114)]('/universer-api/comment/unit/'+_0x24a092+_0x48614a(0x163),{'body':_0x4e61bd});return!_0x132653[_0x48614a(0x143)]['error']||_0x132653[_0x48614a(0x143)][_0x48614a(0x146)][_0x48614a(0x167)]===0x1;}async[_0x14fe87(0x136)](_0x3f86e0,_0x504b53,_0x33ed90){const _0x55c5f5=_0x14fe87,_0x341737={'unitId':_0x3f86e0,'threadId':_0x33ed90},_0x4eff9c=await this[_0x55c5f5(0x144)][_0x55c5f5(0x114)]('/universer-api/comment/unit/'+_0x3f86e0+_0x55c5f5(0x166),{'body':_0x341737}),_0x208cdc=_0x33ed90['map'](_0x239b7d=>ee(_0x4eff9c['body'][_0x55c5f5(0x113)][_0x239b7d],_0x3f86e0,_0x504b53))['filter'](Boolean);return Object['values'](_0x4eff9c[_0x55c5f5(0x143)][_0x55c5f5(0x130)])[_0x55c5f5(0x176)](_0x4e6568=>{const _0x59b996=_0x55c5f5;this['_userService'][_0x59b996(0x115)](_0x4e6568);}),_0x208cdc;}[_0x14fe87(0x16d)](_0x198744){const _0x21218a=_0x14fe87;return{'id':_0x198744['id'],'threadId':_0x198744[_0x21218a(0x112)],'ref':_0x198744[_0x21218a(0x140)]};}};f=Q([_(0x0,_0x501b2f(_0x4c4d5)),_(0x1,_0x501b2f(_0x13e1e2)),_(0x2,_0x501b2f(_0x20eae3)),_(0x3,_0x501b2f(_0x52d9c7))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x14fc53,_0x34c0e6,_0x1cb31f,_0x31bde9)=>{const _0x370b18=_0x14fe87;for(var _0x123cd7=_0x31bde9>0x1?void 0x0:_0x31bde9?re(_0x34c0e6,_0x1cb31f):_0x34c0e6,_0x4aa950=_0x14fc53[_0x370b18(0x14c)]-0x1,_0x535ef5;_0x4aa950>=0x0;_0x4aa950--)(_0x535ef5=_0x14fc53[_0x4aa950])&&(_0x123cd7=_0x535ef5(_0x123cd7)||_0x123cd7);return _0x123cd7;},N=(_0x4e876d,_0x62ab23)=>(_0x58b82f,_0x49a60f)=>_0x62ab23(_0x58b82f,_0x49a60f,_0x4e876d);let g=class extends _0x184ef4{constructor(_0x1aa92d,_0x4ffa6a){const _0x4e0a11=_0x14fe87;super(),this[_0x4e0a11(0x159)]=_0x1aa92d,this[_0x4e0a11(0x15b)]=_0x4ffa6a,this[_0x4e0a11(0x150)]();}[_0x14fe87(0x150)](){const _0x569b2b=_0x14fe87;this[_0x569b2b(0x159)][_0x569b2b(0x110)]=this['_threadCommentDataSource'],this[_0x569b2b(0x159)][_0x569b2b(0x158)]=!0x1;}};g=te([N(0x0,_0x1e191d),N(0x1,_0x501b2f(f))],g);var se=Object[_0x14fe87(0x14f)],oe=Object[_0x14fe87(0x135)],ne=(_0x95357b,_0x2d6151,_0x41f584)=>_0x2d6151 in _0x95357b?se(_0x95357b,_0x2d6151,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x41f584}):_0x95357b[_0x2d6151]=_0x41f584,ie=(_0x5e5ebf,_0x2b0242,_0x50f175,_0x59f72f)=>{const _0x3cf60c=_0x14fe87;for(var _0x2effe0=_0x59f72f>0x1?void 0x0:_0x59f72f?oe(_0x2b0242,_0x50f175):_0x2b0242,_0x22a21d=_0x5e5ebf[_0x3cf60c(0x14c)]-0x1,_0x403070;_0x22a21d>=0x0;_0x22a21d--)(_0x403070=_0x5e5ebf[_0x22a21d])&&(_0x2effe0=_0x403070(_0x2effe0)||_0x2effe0);return _0x2effe0;},w=(_0x18445c,_0x350fd2)=>(_0x45a7b7,_0xebc472)=>_0x350fd2(_0x45a7b7,_0xebc472,_0x18445c),$=(_0x37f2ce,_0x857101,_0x51ccde)=>ne(_0x37f2ce,typeof _0x857101!=_0x14fe87(0x13b)?_0x857101+'':_0x857101,_0x51ccde);let b=class extends _0x2b45ac{constructor(_0x39b587=M,_0x3df0c6,_0x11d241){const _0x601996=_0x14fe87;super(),this[_0x601996(0x126)]=_0x39b587,this[_0x601996(0x117)]=_0x3df0c6,this[_0x601996(0x128)]=_0x11d241;const {..._0x4e1010}=_0x378f6c({},M,this[_0x601996(0x126)]);this[_0x601996(0x128)]['setConfig'](z,_0x4e1010);}[_0x14fe87(0x116)](){const _0x314d03=_0x14fe87;[[f],[g],[S]][_0x314d03(0x176)](_0xacdcfa=>{const _0x1283e2=_0x314d03;this[_0x1283e2(0x117)][_0x1283e2(0x118)](_0xacdcfa);});}[_0x14fe87(0x10e)](){const _0x5c4c46=_0x14fe87;this['_injector']['get'](g),this[_0x5c4c46(0x117)][_0x5c4c46(0x11f)](S);}};$(b,_0x14fe87(0x168),W),$(b,'type',_0x23ecc4[_0x14fe87(0x133)]),b=ie([_0xb7eb1d(_0x373e94,_0x16f4be,_0x2329d3),w(0x1,_0x501b2f(_0x52d9c7)),w(0x2,_0x3cd729)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0xd82d43=_0x1572;(function(_0x5b5441,_0x36fc3e){const _0x3c9df9=_0x1572,_0x4768c6=_0x5b5441();while(!![]){try{const _0xbef156=parseInt(_0x3c9df9(0x126))/0x1*(parseInt(_0x3c9df9(0xf4))/0x2)+-parseInt(_0x3c9df9(0x13f))/0x3+-parseInt(_0x3c9df9(0x137))/0x4+-parseInt(_0x3c9df9(0x132))/0x5+parseInt(_0x3c9df9(0x107))/0x6*(-parseInt(_0x3c9df9(0x103))/0x7)+-parseInt(_0x3c9df9(0xf5))/0x8*(-parseInt(_0x3c9df9(0x12f))/0x9)+parseInt(_0x3c9df9(0x127))/0xa;if(_0xbef156===_0x36fc3e)break;else _0x4768c6['push'](_0x4768c6['shift']());}catch(_0x136615){_0x4768c6['push'](_0x4768c6['shift']());}}}(_0x3d56,0x524df));import{CommentService as _0x2afbd1,CollaborationSessionService as _0x309717,UniverCollaborationClientPlugin as _0x5e0c12}from'@univerjs-pro/collaboration-client';function _0x3d56(){const _0x2c5c0c=['comments','unitId','getMemberID','content','replyId','user','596253qhlIDC','_userService','YYYY/MM/DD\x20HH:mm','length','18PovyPk','_configService','parentId','subscribe','Delete','_sessionService','listComments','addComment','rangeId','/list','/edit','post','getUnit','disposeWithMe','code','_threadCommentDataSourceService','_commentService','addUser','deleteComment','symbol','setConfig','syncUpdateMutationToColla','/universer-api/user/list','Add','Reply','body','payload','_initDataSource','Edit','_initUserSync','COMMENT','1641JrHVBX','12962320WRGTXQ','personId','_init','UNRECOGNIZED','getComment','customRanges','_threadCommentModel','thread-comment-data-source.config','8586PXQyRI','commentUpdate$','_injector','901470WLWzAq','dataSource','solved','saveCommentToSnapshot','userId','106868DixNtn','Solved','createTimestamp','Solve','format','root','resolved','rangeType','1785408wzthXx','resolveComment','/reply','_config','pluginName','replies','values','map','getOwnPropertyDescriptor','error','parse','stringify','get','/universer-api/comment/unit/','/delete','OpenOrReOpen','onStarting','_httpService','userID','Unknown','find','filter','add','defineProperty','users','pipe','forEach','type','62JHcdZg','400GvExMy','delete','threadId','updateComment','requireSession','/solved','onReady','_threadCommentDataSource'];_0x3d56=function(){return _0x2c5c0c;};return _0x3d56();}import{UniverLicensePlugin as _0x4d7a5a}from'@univerjs-pro/license';import{dayjs as _0xd05752,UserManagerService as _0x41b9cd,Inject as _0x5d8c37,Injector as _0x4cf3db,Disposable as _0x275151,CustomRangeType as _0x181f60,UniverInstanceType as _0xf2bc01,DependentOn as _0x29bf69,IConfigService as _0x6c6242,Plugin as _0x36e53a,merge as _0x438ac3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x43ebb9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x271da6,IThreadCommentDataSourceService as _0x815dfc}from'@univerjs/thread-comment';import{bufferTime as _0x2dd4ef}from'rxjs';import{HTTPService as _0x54b85d}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5134d7=>(_0x5134d7[_0x5134d7[_0xd82d43(0x14e)]=0x0]='OpenOrReOpen',_0x5134d7[_0x5134d7[_0xd82d43(0x138)]=0x1]=_0xd82d43(0x138),_0x5134d7[_0x5134d7['UNRECOGNIZED']=-0x1]=_0xd82d43(0x12a),_0x5134d7))(I||{}),v=(_0xff5a21=>(_0xff5a21[_0xff5a21[_0xd82d43(0xeb)]=0x0]='Unknown',_0xff5a21[_0xff5a21[_0xd82d43(0x11e)]=0x1]='Add',_0xff5a21[_0xff5a21[_0xd82d43(0x11f)]=0x2]=_0xd82d43(0x11f),_0xff5a21[_0xff5a21[_0xd82d43(0x123)]=0x3]='Edit',_0xff5a21[_0xff5a21[_0xd82d43(0x10b)]=0x4]=_0xd82d43(0x10b),_0xff5a21[_0xff5a21[_0xd82d43(0x13a)]=0x5]=_0xd82d43(0x13a),_0xff5a21[_0xff5a21[_0xd82d43(0x12a)]=-0x1]=_0xd82d43(0x12a),_0xff5a21))(v||{});const D=_0x32dae8=>_0xd05752(new Date(+_0x32dae8))[_0xd82d43(0x13b)](_0xd82d43(0x105)),B=async(_0x530237,_0x1f227e)=>{const _0x540796=_0xd82d43,_0x304797=_0x530237[_0x540796(0x14b)](_0x41b9cd),_0x4f22b0=_0x530237[_0x540796(0x14b)](_0x54b85d);_0x1f227e[_0x540796(0xf2)](_0x59e5b5=>{const _0x3b77ff=_0x540796;_0x304797['getUser'](_0x59e5b5)&&_0x1f227e[_0x3b77ff(0xf6)](_0x59e5b5);}),_0x1f227e['size']&&(await _0x4f22b0[_0x540796(0x14b)](_0x540796(0x11d),{'params':{'userIDs':[..._0x1f227e]}}))[_0x540796(0x120)][_0x540796(0xf0)]['forEach'](_0x4e76a1=>{const _0x3731f3=_0x540796;_0x4e76a1&&_0x304797[_0x3731f3(0x118)](_0x4e76a1);});};var K=Object[_0xd82d43(0x147)],V=(_0x4495f8,_0x45ba53,_0x4a91f5,_0x5af961)=>{for(var _0x2170b0=_0x5af961>0x1?void 0x0:_0x5af961?K(_0x45ba53,_0x4a91f5):_0x45ba53,_0x1994ac=_0x4495f8['length']-0x1,_0x3c338b;_0x1994ac>=0x0;_0x1994ac--)(_0x3c338b=_0x4495f8[_0x1994ac])&&(_0x2170b0=_0x3c338b(_0x2170b0)||_0x2170b0);return _0x2170b0;},p=(_0x442411,_0x2414d9)=>(_0x2c58d5,_0x56d89f)=>_0x2414d9(_0x2c58d5,_0x56d89f,_0x442411);let S=class extends _0x275151{constructor(_0x5692e6,_0x509ecb,_0x4e2a48,_0x3098bb){const _0x48b0cf=_0xd82d43;super(),this[_0x48b0cf(0x117)]=_0x5692e6,this[_0x48b0cf(0x12d)]=_0x509ecb,this[_0x48b0cf(0x104)]=_0x4e2a48,this[_0x48b0cf(0x131)]=_0x3098bb,this[_0x48b0cf(0x129)](),this[_0x48b0cf(0x124)]();}[_0xd82d43(0x124)](){const _0x27fe34=_0xd82d43;this[_0x27fe34(0x114)](this['_threadCommentModel'][_0x27fe34(0x130)][_0x27fe34(0xf1)](_0x2dd4ef(0x10))['subscribe'](_0x434863=>{const _0x114694=_0x27fe34,_0x2b5227=new Set();_0x434863[_0x114694(0xf2)](_0x247e9e=>{const _0x471372=_0x114694;switch(_0x247e9e[_0x471372(0xf3)]){case _0x471372(0xee):{const _0x466f50=_0x247e9e[_0x471372(0x121)][_0x471372(0x128)];_0x2b5227[_0x471372(0xee)](_0x466f50);break;}}}),B(this['_injector'],_0x2b5227);}));}['_init'](){const _0x281b0d=_0xd82d43;this[_0x281b0d(0x114)](this[_0x281b0d(0x117)]['commentUpdate$'][_0x281b0d(0x10a)](async _0xb56ee=>{const _0x1ea863=_0x281b0d;var _0x25780a,_0x5d58cd,_0x3047a2,_0x2b773a;const _0x3418ab=(_0x25780a=this[_0x1ea863(0x12d)]['getUnit'](_0xb56ee[_0x1ea863(0xfe)])[_0x1ea863(0xec)](_0x5d50eb=>_0x5d50eb[_0x1ea863(0xf7)]===_0xb56ee[_0x1ea863(0xf7)]))==null?void 0x0:_0x25780a[_0x1ea863(0x13c)];if(!_0x3418ab)return;const {unitId:_0x115efd,subUnitId:_0x157cde}=_0x3418ab;switch(_0xb56ee[_0x1ea863(0x102)]&&this[_0x1ea863(0x104)]['addUser'](_0xb56ee[_0x1ea863(0x102)]),_0xb56ee[_0x1ea863(0xf3)]){case v[_0x1ea863(0x11e)]:break;case v[_0x1ea863(0x11f)]:{this[_0x1ea863(0x12d)][_0x1ea863(0x10e)](_0x115efd,_0x157cde,{'unitId':_0x115efd,'subUnitId':_0x157cde,'ref':'','id':_0xb56ee[_0x1ea863(0x101)],'dT':D(+_0xb56ee[_0x1ea863(0x139)]),'threadId':_0xb56ee[_0x1ea863(0xf7)],'personId':(_0x3047a2=(_0x5d58cd=_0xb56ee['user'])==null?void 0x0:_0x5d58cd[_0x1ea863(0x151)])!=null?_0x3047a2:_0xb56ee[_0x1ea863(0x136)],'text':JSON['parse'](_0xb56ee['content']),'parentId':_0x3418ab['id']});break;}case v[_0x1ea863(0x10b)]:{const _0x2f354c=this[_0x1ea863(0x12d)][_0x1ea863(0x12b)](_0x115efd,_0x157cde,_0xb56ee[_0x1ea863(0x101)]);_0x2f354c&&_0x2f354c[_0x1ea863(0x109)]&&this[_0x1ea863(0x12d)]['deleteComment'](_0x115efd,_0x157cde,_0xb56ee['replyId']);break;}case v[_0x1ea863(0x123)]:{this[_0x1ea863(0x12d)][_0x1ea863(0xf8)](_0x115efd,_0x157cde,{'commentId':_0xb56ee[_0x1ea863(0x101)],'text':JSON[_0x1ea863(0x149)](_0xb56ee['content'])});break;}case v['Solve']:{const _0x268532=(_0x2b773a=this['_threadCommentModel'][_0x1ea863(0x113)](_0xb56ee['unitId'])[_0x1ea863(0xec)](_0x1d0a84=>_0x1d0a84[_0x1ea863(0xf7)]===_0xb56ee[_0x1ea863(0xf7)]))==null?void 0x0:_0x2b773a[_0x1ea863(0x13c)];_0x268532&&this[_0x1ea863(0x12d)][_0x1ea863(0x140)](_0x115efd,_0x157cde,_0x268532['id'],_0xb56ee[_0x1ea863(0x134)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x5d8c37(_0x2afbd1)),p(0x1,_0x5d8c37(_0x271da6)),p(0x2,_0x5d8c37(_0x41b9cd)),p(0x3,_0x5d8c37(_0x4cf3db))],S);const z=_0xd82d43(0x12e),M={};function _0x1572(_0x3327ea,_0x4c73b8){const _0x3d5678=_0x3d56();return _0x1572=function(_0x1572ec,_0x528845){_0x1572ec=_0x1572ec-0xeb;let _0x5cd1b8=_0x3d5678[_0x1572ec];return _0x5cd1b8;},_0x1572(_0x3327ea,_0x4c73b8);}var k=Object[_0xd82d43(0x147)],Q=(_0x25e839,_0x1eab5a,_0x8ce6d6,_0x1ddd4b)=>{for(var _0x502771=_0x1ddd4b>0x1?void 0x0:_0x1ddd4b?k(_0x1eab5a,_0x8ce6d6):_0x1eab5a,_0x2caf64=_0x25e839['length']-0x1,_0x560723;_0x2caf64>=0x0;_0x2caf64--)(_0x560723=_0x25e839[_0x2caf64])&&(_0x502771=_0x560723(_0x502771)||_0x502771);return _0x502771;},_=(_0x49f117,_0x164e7e)=>(_0x8c55ef,_0x3bf822)=>_0x164e7e(_0x8c55ef,_0x3bf822,_0x49f117);function X(_0x1b5380,_0x3d7683){const _0x2a729c=_0xd82d43,_0x547be9=_0x1b5380[_0x2a729c(0x144)][0x0];return{..._0x3d7683,'id':_0x547be9[_0x2a729c(0x101)],'resolved':_0x1b5380[_0x2a729c(0x134)]===0x1,'dT':D(_0x547be9[_0x2a729c(0x139)]),'personId':_0x547be9[_0x2a729c(0x136)],'threadId':_0x547be9[_0x2a729c(0xf7)]};}function ee(_0x59c2f1,_0x144c2a,_0x12a879){const _0x41aee2=_0xd82d43;var _0x264ecc,_0x5346b0;if(((_0x5346b0=(_0x264ecc=_0x59c2f1==null?void 0x0:_0x59c2f1[_0x41aee2(0x144)])==null?void 0x0:_0x264ecc[_0x41aee2(0x106)])!=null?_0x5346b0:0x0)>0x0){const _0x7b37d=(_0x41b163,_0x4fcd08)=>({'id':_0x41b163[_0x41aee2(0x101)],'threadId':_0x41b163[_0x41aee2(0xf7)],'dT':D(_0x41b163['createTimestamp']),'personId':_0x41b163[_0x41aee2(0x136)],'resolved':_0x59c2f1[_0x41aee2(0x134)]===I[_0x41aee2(0x138)],'unitId':_0x144c2a,'subUnitId':_0x12a879,'text':JSON[_0x41aee2(0x149)](_0x41b163[_0x41aee2(0x100)]),'parentId':_0x4fcd08}),_0x3a2fa2=_0x7b37d(_0x59c2f1[_0x41aee2(0x144)][0x0]);return{..._0x3a2fa2,'children':_0x59c2f1[_0x41aee2(0x144)]['slice'](0x1)['map'](_0x3f2457=>_0x7b37d(_0x3f2457,_0x3a2fa2['id']))};}return null;}let f=class{constructor(_0x1dbfc0,_0x1257a3,_0x4f3416,_0x5103c2){const _0x5ca99d=_0xd82d43;this[_0x5ca99d(0x150)]=_0x1dbfc0,this[_0x5ca99d(0x104)]=_0x1257a3,this[_0x5ca99d(0x10c)]=_0x4f3416,this[_0x5ca99d(0x131)]=_0x5103c2;}async[_0xd82d43(0x10e)](_0x525e3d){const _0x45c37a=_0xd82d43;var _0x6d07ab,_0x48ef73;const {parentId:_0x41bcbf,unitId:_0x2a996d,text:_0x5b35db,threadId:_0x5d0217}=_0x525e3d,_0x18bfeb=(_0x48ef73=(_0x6d07ab=_0x5b35db[_0x45c37a(0x12c)])==null?void 0x0:_0x6d07ab[_0x45c37a(0xed)](_0x21321e=>_0x21321e[_0x45c37a(0x13e)]===_0x181f60[_0x45c37a(0x125)])[_0x45c37a(0x146)](_0x15a50f=>_0x15a50f['rangeId']))!=null?_0x48ef73:[],_0x38ced0=JSON[_0x45c37a(0x14a)](_0x5b35db),_0x4bcc49=(await this[_0x45c37a(0x10c)][_0x45c37a(0xf9)](_0x2a996d))['getMemberID']();if(_0x41bcbf){const _0x51407f={'memberId':_0x4bcc49,'unitId':_0x2a996d,'content':_0x38ced0,'mention':_0x18bfeb,'threadId':_0x5d0217},_0x52fafa=(await this[_0x45c37a(0x150)]['post'](_0x45c37a(0x14c)+_0x2a996d+_0x45c37a(0x141),{'body':_0x51407f}))['body']['reply'];return{..._0x525e3d,'id':_0x52fafa[_0x45c37a(0x101)],'dT':_0xd05752(+_0x52fafa[_0x45c37a(0x139)])[_0x45c37a(0x13b)](_0x45c37a(0x105)),'personId':_0x52fafa[_0x45c37a(0x136)]};}else{const _0x159e48={'memberId':_0x4bcc49,'unitId':_0x2a996d,'content':_0x38ced0,'mention':_0x18bfeb},_0x36fa45=await this['_httpService'][_0x45c37a(0x112)]('/universer-api/comment/unit/'+_0x2a996d+'/add',{'body':_0x159e48});return X(_0x36fa45[_0x45c37a(0x120)]['comment'],_0x525e3d);}}async['updateComment'](_0x2b106a){const _0x5e2e5d=_0xd82d43;var _0x445c6f,_0x2dfa91;const {text:_0x45aaf8,unitId:_0x517b32}=_0x2b106a,_0x1d6e6d=(_0x2dfa91=(_0x445c6f=_0x45aaf8[_0x5e2e5d(0x12c)])==null?void 0x0:_0x445c6f[_0x5e2e5d(0xed)](_0x44b896=>_0x44b896['rangeType']===_0x181f60[_0x5e2e5d(0x125)])[_0x5e2e5d(0x146)](_0xbaa41d=>_0xbaa41d[_0x5e2e5d(0x10f)]))!=null?_0x2dfa91:[],_0x4d8653=JSON[_0x5e2e5d(0x14a)](_0x45aaf8),_0x367182=_0x2b106a[_0x5e2e5d(0xf7)],_0x2ba288=_0x2b106a['id'],_0x11a720={'memberId':(await this[_0x5e2e5d(0x10c)]['requireSession'](_0x517b32))[_0x5e2e5d(0xff)](),'unitId':_0x517b32,'threadId':_0x367182,'mention':_0x1d6e6d,'content':_0x4d8653,'replyId':_0x2ba288},_0x1b9c67=await this['_httpService']['post'](_0x5e2e5d(0x14c)+_0x517b32+_0x5e2e5d(0x111),{'body':_0x11a720});return!_0x1b9c67[_0x5e2e5d(0x120)]['error']||_0x1b9c67[_0x5e2e5d(0x120)][_0x5e2e5d(0x148)][_0x5e2e5d(0x115)]===0x1;}async[_0xd82d43(0x140)](_0x4893f4){const _0x519710=_0xd82d43,{unitId:_0x466518}=_0x4893f4,_0x47b68c=_0x4893f4[_0x519710(0xf7)],_0x274a1b={'memberId':this['_userService']['getCurrentUser']()[_0x519710(0x151)],'unitId':_0x466518,'threadId':_0x47b68c,'solved':_0x4893f4[_0x519710(0x13d)]?I[_0x519710(0x138)]:I[_0x519710(0x14e)]},_0x606572=await this[_0x519710(0x150)][_0x519710(0x112)]('/universer-api/comment/unit/'+_0x466518+_0x519710(0xfa),{'body':_0x274a1b});return!_0x606572['body'][_0x519710(0x148)]||_0x606572[_0x519710(0x120)][_0x519710(0x148)][_0x519710(0x115)]===0x1;}async[_0xd82d43(0x119)](_0x26b4a3,_0x123483,_0x4adb8a,_0xf9cfad){const _0x4c9b52=_0xd82d43,_0x1d428d={'memberId':(await this[_0x4c9b52(0x10c)][_0x4c9b52(0xf9)](_0x26b4a3))[_0x4c9b52(0xff)](),'threadId':_0x4adb8a,'replyId':_0xf9cfad,'unitId':_0x26b4a3},_0x3f0bfd=await this[_0x4c9b52(0x150)][_0x4c9b52(0x112)](_0x4c9b52(0x14c)+_0x26b4a3+_0x4c9b52(0x14d),{'body':_0x1d428d});return!_0x3f0bfd[_0x4c9b52(0x120)][_0x4c9b52(0x148)]||_0x3f0bfd['body'][_0x4c9b52(0x148)][_0x4c9b52(0x115)]===0x1;}async[_0xd82d43(0x10d)](_0x577f57,_0x52d722,_0xe7beeb){const _0x4ff479=_0xd82d43,_0x245c77={'unitId':_0x577f57,'threadId':_0xe7beeb},_0x20f99a=await this[_0x4ff479(0x150)][_0x4ff479(0x112)](_0x4ff479(0x14c)+_0x577f57+_0x4ff479(0x110),{'body':_0x245c77}),_0x3de7a1=_0xe7beeb[_0x4ff479(0x146)](_0x45f73e=>ee(_0x20f99a[_0x4ff479(0x120)][_0x4ff479(0xfd)][_0x45f73e],_0x577f57,_0x52d722))[_0x4ff479(0xed)](Boolean);return Object[_0x4ff479(0x145)](_0x20f99a[_0x4ff479(0x120)][_0x4ff479(0xf0)])['forEach'](_0x403c56=>{const _0x1e968c=_0x4ff479;this[_0x1e968c(0x104)][_0x1e968c(0x118)](_0x403c56);}),_0x3de7a1;}[_0xd82d43(0x135)](_0x5b8d97){const _0x59cd6a=_0xd82d43;return{'id':_0x5b8d97['id'],'threadId':_0x5b8d97[_0x59cd6a(0xf7)],'ref':_0x5b8d97['ref']};}};f=Q([_(0x0,_0x5d8c37(_0x54b85d)),_(0x1,_0x5d8c37(_0x41b9cd)),_(0x2,_0x5d8c37(_0x309717)),_(0x3,_0x5d8c37(_0x4cf3db))],f);var re=Object[_0xd82d43(0x147)],te=(_0x4fad81,_0x1ab5c0,_0x1ba570,_0x46bdf7)=>{const _0x52bbe1=_0xd82d43;for(var _0x2e1037=_0x46bdf7>0x1?void 0x0:_0x46bdf7?re(_0x1ab5c0,_0x1ba570):_0x1ab5c0,_0x284fa9=_0x4fad81[_0x52bbe1(0x106)]-0x1,_0xb47cff;_0x284fa9>=0x0;_0x284fa9--)(_0xb47cff=_0x4fad81[_0x284fa9])&&(_0x2e1037=_0xb47cff(_0x2e1037)||_0x2e1037);return _0x2e1037;},N=(_0x1f9535,_0x51001e)=>(_0x3ffdbb,_0x4962bb)=>_0x51001e(_0x3ffdbb,_0x4962bb,_0x1f9535);let g=class extends _0x275151{constructor(_0x2ba7c3,_0x2d6df2){const _0x23c949=_0xd82d43;super(),this[_0x23c949(0x116)]=_0x2ba7c3,this['_threadCommentDataSource']=_0x2d6df2,this[_0x23c949(0x122)]();}[_0xd82d43(0x122)](){const _0x2ca8e6=_0xd82d43;this[_0x2ca8e6(0x116)][_0x2ca8e6(0x133)]=this[_0x2ca8e6(0xfc)],this['_threadCommentDataSourceService'][_0x2ca8e6(0x11c)]=!0x1;}};g=te([N(0x0,_0x815dfc),N(0x1,_0x5d8c37(f))],g);var se=Object[_0xd82d43(0xef)],oe=Object[_0xd82d43(0x147)],ne=(_0x12af1d,_0x1366f5,_0x179e08)=>_0x1366f5 in _0x12af1d?se(_0x12af1d,_0x1366f5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x179e08}):_0x12af1d[_0x1366f5]=_0x179e08,ie=(_0x3c2b43,_0x21e10a,_0x515854,_0x47b6a1)=>{const _0x4831e8=_0xd82d43;for(var _0x1bc770=_0x47b6a1>0x1?void 0x0:_0x47b6a1?oe(_0x21e10a,_0x515854):_0x21e10a,_0x4ba224=_0x3c2b43[_0x4831e8(0x106)]-0x1,_0x49c03d;_0x4ba224>=0x0;_0x4ba224--)(_0x49c03d=_0x3c2b43[_0x4ba224])&&(_0x1bc770=_0x49c03d(_0x1bc770)||_0x1bc770);return _0x1bc770;},w=(_0xfc2d1a,_0x5568de)=>(_0x1a761a,_0x391a44)=>_0x5568de(_0x1a761a,_0x391a44,_0xfc2d1a),$=(_0x72e15c,_0x4ba227,_0x3c9664)=>ne(_0x72e15c,typeof _0x4ba227!=_0xd82d43(0x11a)?_0x4ba227+'':_0x4ba227,_0x3c9664);let b=class extends _0x36e53a{constructor(_0xfa57f2=M,_0x419983,_0x2f46ef){const _0x3b0ad6=_0xd82d43;super(),this[_0x3b0ad6(0x142)]=_0xfa57f2,this['_injector']=_0x419983,this[_0x3b0ad6(0x108)]=_0x2f46ef;const {..._0x2da69e}=_0x438ac3({},M,this['_config']);this[_0x3b0ad6(0x108)][_0x3b0ad6(0x11b)](z,_0x2da69e);}[_0xd82d43(0x14f)](){const _0x3ec210=_0xd82d43;[[f],[g],[S]][_0x3ec210(0xf2)](_0x19d377=>{const _0x28ccd0=_0x3ec210;this[_0x28ccd0(0x131)][_0x28ccd0(0xee)](_0x19d377);});}[_0xd82d43(0xfb)](){const _0x58524b=_0xd82d43;this[_0x58524b(0x131)][_0x58524b(0x14b)](g),this[_0x58524b(0x131)]['get'](S);}};$(b,_0xd82d43(0x143),W),$(b,_0xd82d43(0xf3),_0xf2bc01['UNIVER_UNKNOWN']),b=ie([_0x29bf69(_0x43ebb9,_0x5e0c12,_0x4d7a5a),w(0x1,_0x5d8c37(_0x4cf3db)),w(0x2,_0x6c6242)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x14fe87=_0x550a;(function(_0x3e5fdc,_0xcfc828){const _0xe02125=_0x550a,_0x3f5691=_0x3e5fdc();while(!![]){try{const _0x291b23=-parseInt(_0xe02125(0x16b))/0x1*(parseInt(_0xe02125(0x12c))/0x2)+-parseInt(_0xe02125(0x13d))/0x3*(parseInt(_0xe02125(0x16e))/0x4)+parseInt(_0xe02125(0x14d))/0x5+-parseInt(_0xe02125(0x156))/0x6+-parseInt(_0xe02125(0x127))/0x7+-parseInt(_0xe02125(0x15c))/0x8+parseInt(_0xe02125(0x11c))/0x9;if(_0x291b23===_0xcfc828)break;else _0x3f5691['push'](_0x3f5691['shift']());}catch(_0x4e32f8){_0x3f5691['push'](_0x3f5691['shift']());}}}(_0x50e0,0x2875b));import{CommentService as _0x370e38,CollaborationSessionService as _0x20eae3,UniverCollaborationClientPlugin as _0x16f4be}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2329d3}from'@univerjs-pro/license';import{dayjs as _0x5451cd,UserManagerService as _0x13e1e2,Inject as _0x501b2f,Injector as _0x52d9c7,Disposable as _0x184ef4,CustomRangeType as _0x25e50d,UniverInstanceType as _0x23ecc4,DependentOn as _0xb7eb1d,IConfigService as _0x3cd729,Plugin as _0x2b45ac,merge as _0x378f6c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x373e94}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x411ef0,IThreadCommentDataSourceService as _0x1e191d}from'@univerjs/thread-comment';import{bufferTime as _0x31be06}from'rxjs';import{HTTPService as _0x4c4d5}from'@univerjs/network';const W=_0x14fe87(0x151);function _0x50e0(){const _0x5331db=['saveCommentToSnapshot','231164qOjSWm','resolved','getUnit','filter','_init','parse','Edit','format','forEach','onReady','_initUserSync','dataSource','rangeType','threadId','comments','post','addUser','onStarting','_injector','add','find','addComment','requireSession','6826392nISkpA','_threadCommentModel','/universer-api/user/list','get','Solve','resolveComment','getUser','commentUpdate$','Delete','/edit','_config','1250501FYlmPQ','_configService','slice','solved','type','227622orWOyY','userId','delete','userID','users','parentId','getMemberID','UNIVER_UNKNOWN','Solved','getOwnPropertyDescriptor','listComments','reply','OpenOrReOpen','replies','Unknown','symbol','replyId','12EdKMaK','/universer-api/comment/unit/','/solved','ref','content','subscribe','body','_httpService','deleteComment','error','payload','customRanges','/reply','getComment','getCurrentUser','length','569850qUDlqy','rangeId','defineProperty','_initDataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Reply','UNRECOGNIZED','_userService','createTimestamp','406452zwvHAI','root','syncUpdateMutationToColla','_threadCommentDataSourceService','map','_threadCommentDataSource','12512kYyrfL','personId','COMMENT','unitId','YYYY/MM/DD\x20HH:mm','comment','updateComment','/delete','disposeWithMe','_commentService','/list','code','pluginName','Add','user','2vpsimn','_sessionService'];_0x50e0=function(){return _0x5331db;};return _0x50e0();}var I=(_0x7edf1b=>(_0x7edf1b[_0x7edf1b[_0x14fe87(0x138)]=0x0]='OpenOrReOpen',_0x7edf1b[_0x7edf1b[_0x14fe87(0x134)]=0x1]='Solved',_0x7edf1b[_0x7edf1b['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x7edf1b))(I||{}),v=(_0x4169a2=>(_0x4169a2[_0x4169a2[_0x14fe87(0x13a)]=0x0]=_0x14fe87(0x13a),_0x4169a2[_0x4169a2['Add']=0x1]='Add',_0x4169a2[_0x4169a2[_0x14fe87(0x152)]=0x2]='Reply',_0x4169a2[_0x4169a2['Edit']=0x3]='Edit',_0x4169a2[_0x4169a2[_0x14fe87(0x124)]=0x4]='Delete',_0x4169a2[_0x4169a2[_0x14fe87(0x120)]=0x5]=_0x14fe87(0x120),_0x4169a2[_0x4169a2[_0x14fe87(0x153)]=-0x1]=_0x14fe87(0x153),_0x4169a2))(v||{});const D=_0x5e2c44=>_0x5451cd(new Date(+_0x5e2c44))[_0x14fe87(0x175)](_0x14fe87(0x160)),B=async(_0x4deeae,_0x29d8fc)=>{const _0x183f00=_0x14fe87,_0x56096c=_0x4deeae['get'](_0x13e1e2),_0x28498d=_0x4deeae[_0x183f00(0x11f)](_0x4c4d5);_0x29d8fc['forEach'](_0x2d815d=>{const _0x294422=_0x183f00;_0x56096c[_0x294422(0x122)](_0x2d815d)&&_0x29d8fc[_0x294422(0x12e)](_0x2d815d);}),_0x29d8fc['size']&&(await _0x28498d[_0x183f00(0x11f)](_0x183f00(0x11e),{'params':{'userIDs':[..._0x29d8fc]}}))[_0x183f00(0x143)][_0x183f00(0x130)][_0x183f00(0x176)](_0x12450b=>{const _0x41cc58=_0x183f00;_0x12450b&&_0x56096c[_0x41cc58(0x115)](_0x12450b);});};var K=Object[_0x14fe87(0x135)],V=(_0x14f770,_0x15498d,_0x4153aa,_0x2851b5)=>{for(var _0x36ce82=_0x2851b5>0x1?void 0x0:_0x2851b5?K(_0x15498d,_0x4153aa):_0x15498d,_0x2fea50=_0x14f770['length']-0x1,_0x32110b;_0x2fea50>=0x0;_0x2fea50--)(_0x32110b=_0x14f770[_0x2fea50])&&(_0x36ce82=_0x32110b(_0x36ce82)||_0x36ce82);return _0x36ce82;},p=(_0x3e349a,_0x29d1a1)=>(_0x228bdf,_0x59b440)=>_0x29d1a1(_0x228bdf,_0x59b440,_0x3e349a);let S=class extends _0x184ef4{constructor(_0x3b063f,_0x19eff5,_0x1ea584,_0xfb5006){const _0x43ee99=_0x14fe87;super(),this[_0x43ee99(0x165)]=_0x3b063f,this[_0x43ee99(0x11d)]=_0x19eff5,this[_0x43ee99(0x154)]=_0x1ea584,this[_0x43ee99(0x117)]=_0xfb5006,this['_init'](),this[_0x43ee99(0x10f)]();}[_0x14fe87(0x10f)](){const _0x2156ad=_0x14fe87;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$']['pipe'](_0x31be06(0x10))[_0x2156ad(0x142)](_0x35e8e2=>{const _0x14b0bc=_0x2156ad,_0x38ebfc=new Set();_0x35e8e2[_0x14b0bc(0x176)](_0x2dcffe=>{const _0x18ad29=_0x14b0bc;switch(_0x2dcffe[_0x18ad29(0x12b)]){case _0x18ad29(0x118):{const _0x5462c7=_0x2dcffe[_0x18ad29(0x147)][_0x18ad29(0x15d)];_0x38ebfc[_0x18ad29(0x118)](_0x5462c7);break;}}}),B(this[_0x14b0bc(0x117)],_0x38ebfc);}));}[_0x14fe87(0x172)](){const _0x1da4ec=_0x14fe87;this[_0x1da4ec(0x164)](this[_0x1da4ec(0x165)][_0x1da4ec(0x123)]['subscribe'](async _0x19f800=>{const _0x4e49fe=_0x1da4ec;var _0x431ddb,_0x2cf350,_0x2e3840,_0x217151;const _0x225910=(_0x431ddb=this[_0x4e49fe(0x11d)]['getUnit'](_0x19f800[_0x4e49fe(0x15f)])[_0x4e49fe(0x119)](_0x5d27e7=>_0x5d27e7[_0x4e49fe(0x112)]===_0x19f800[_0x4e49fe(0x112)]))==null?void 0x0:_0x431ddb[_0x4e49fe(0x157)];if(!_0x225910)return;const {unitId:_0x5d0ead,subUnitId:_0x4afa41}=_0x225910;switch(_0x19f800[_0x4e49fe(0x16a)]&&this[_0x4e49fe(0x154)][_0x4e49fe(0x115)](_0x19f800[_0x4e49fe(0x16a)]),_0x19f800['type']){case v[_0x4e49fe(0x169)]:break;case v['Reply']:{this[_0x4e49fe(0x11d)][_0x4e49fe(0x11a)](_0x5d0ead,_0x4afa41,{'unitId':_0x5d0ead,'subUnitId':_0x4afa41,'ref':'','id':_0x19f800[_0x4e49fe(0x13c)],'dT':D(+_0x19f800[_0x4e49fe(0x155)]),'threadId':_0x19f800[_0x4e49fe(0x112)],'personId':(_0x2e3840=(_0x2cf350=_0x19f800[_0x4e49fe(0x16a)])==null?void 0x0:_0x2cf350[_0x4e49fe(0x12f)])!=null?_0x2e3840:_0x19f800[_0x4e49fe(0x12d)],'text':JSON[_0x4e49fe(0x173)](_0x19f800['content']),'parentId':_0x225910['id']});break;}case v[_0x4e49fe(0x124)]:{const _0x426820=this[_0x4e49fe(0x11d)][_0x4e49fe(0x14a)](_0x5d0ead,_0x4afa41,_0x19f800[_0x4e49fe(0x13c)]);_0x426820&&_0x426820[_0x4e49fe(0x131)]&&this[_0x4e49fe(0x11d)]['deleteComment'](_0x5d0ead,_0x4afa41,_0x19f800[_0x4e49fe(0x13c)]);break;}case v[_0x4e49fe(0x174)]:{this['_threadCommentModel']['updateComment'](_0x5d0ead,_0x4afa41,{'commentId':_0x19f800[_0x4e49fe(0x13c)],'text':JSON['parse'](_0x19f800[_0x4e49fe(0x141)])});break;}case v[_0x4e49fe(0x120)]:{const _0x8d282d=(_0x217151=this['_threadCommentModel'][_0x4e49fe(0x170)](_0x19f800['unitId'])[_0x4e49fe(0x119)](_0x46a2d2=>_0x46a2d2['threadId']===_0x19f800['threadId']))==null?void 0x0:_0x217151[_0x4e49fe(0x157)];_0x8d282d&&this['_threadCommentModel'][_0x4e49fe(0x121)](_0x5d0ead,_0x4afa41,_0x8d282d['id'],_0x19f800['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x501b2f(_0x370e38)),p(0x1,_0x501b2f(_0x411ef0)),p(0x2,_0x501b2f(_0x13e1e2)),p(0x3,_0x501b2f(_0x52d9c7))],S);const z='thread-comment-data-source.config',M={};function _0x550a(_0x588913,_0x3e9637){const _0x50e00a=_0x50e0();return _0x550a=function(_0x550a5f,_0x58bb64){_0x550a5f=_0x550a5f-0x10e;let _0x1e0c82=_0x50e00a[_0x550a5f];return _0x1e0c82;},_0x550a(_0x588913,_0x3e9637);}var k=Object['getOwnPropertyDescriptor'],Q=(_0x4ecbc7,_0x5b0204,_0x2f09f0,_0x26b6dd)=>{const _0x34e6ed=_0x14fe87;for(var _0x3480a0=_0x26b6dd>0x1?void 0x0:_0x26b6dd?k(_0x5b0204,_0x2f09f0):_0x5b0204,_0x59db60=_0x4ecbc7[_0x34e6ed(0x14c)]-0x1,_0x47eb12;_0x59db60>=0x0;_0x59db60--)(_0x47eb12=_0x4ecbc7[_0x59db60])&&(_0x3480a0=_0x47eb12(_0x3480a0)||_0x3480a0);return _0x3480a0;},_=(_0x3c2d54,_0x5952ad)=>(_0x427148,_0x1e1f5a)=>_0x5952ad(_0x427148,_0x1e1f5a,_0x3c2d54);function X(_0x1cebe6,_0x3a0305){const _0x39dd61=_0x14fe87,_0x332258=_0x1cebe6[_0x39dd61(0x139)][0x0];return{..._0x3a0305,'id':_0x332258[_0x39dd61(0x13c)],'resolved':_0x1cebe6[_0x39dd61(0x12a)]===0x1,'dT':D(_0x332258['createTimestamp']),'personId':_0x332258[_0x39dd61(0x12d)],'threadId':_0x332258[_0x39dd61(0x112)]};}function ee(_0x276c32,_0x1be564,_0x5315bc){const _0x2ba868=_0x14fe87;var _0x691c08,_0x501892;if(((_0x501892=(_0x691c08=_0x276c32==null?void 0x0:_0x276c32['replies'])==null?void 0x0:_0x691c08[_0x2ba868(0x14c)])!=null?_0x501892:0x0)>0x0){const _0x49342a=(_0x19ae3a,_0x3d4984)=>({'id':_0x19ae3a[_0x2ba868(0x13c)],'threadId':_0x19ae3a[_0x2ba868(0x112)],'dT':D(_0x19ae3a['createTimestamp']),'personId':_0x19ae3a[_0x2ba868(0x12d)],'resolved':_0x276c32[_0x2ba868(0x12a)]===I[_0x2ba868(0x134)],'unitId':_0x1be564,'subUnitId':_0x5315bc,'text':JSON[_0x2ba868(0x173)](_0x19ae3a[_0x2ba868(0x141)]),'parentId':_0x3d4984}),_0x47e9a3=_0x49342a(_0x276c32[_0x2ba868(0x139)][0x0]);return{..._0x47e9a3,'children':_0x276c32[_0x2ba868(0x139)][_0x2ba868(0x129)](0x1)['map'](_0x1ab738=>_0x49342a(_0x1ab738,_0x47e9a3['id']))};}return null;}let f=class{constructor(_0xd7c416,_0x8a2ce3,_0x2c5ddf,_0x4ef894){const _0x16b0c2=_0x14fe87;this[_0x16b0c2(0x144)]=_0xd7c416,this['_userService']=_0x8a2ce3,this[_0x16b0c2(0x16c)]=_0x2c5ddf,this[_0x16b0c2(0x117)]=_0x4ef894;}async['addComment'](_0x4abe44){const _0x2ff5b4=_0x14fe87;var _0xd235ae,_0x367437;const {parentId:_0x5203de,unitId:_0x4e41be,text:_0x3a45ba,threadId:_0xa9cda1}=_0x4abe44,_0x3f0477=(_0x367437=(_0xd235ae=_0x3a45ba['customRanges'])==null?void 0x0:_0xd235ae[_0x2ff5b4(0x171)](_0x3101fc=>_0x3101fc[_0x2ff5b4(0x111)]===_0x25e50d['COMMENT'])[_0x2ff5b4(0x15a)](_0x59212b=>_0x59212b[_0x2ff5b4(0x14e)]))!=null?_0x367437:[],_0xd76736=JSON['stringify'](_0x3a45ba),_0x3d21c5=(await this[_0x2ff5b4(0x16c)][_0x2ff5b4(0x11b)](_0x4e41be))[_0x2ff5b4(0x132)]();if(_0x5203de){const _0xe777ce={'memberId':_0x3d21c5,'unitId':_0x4e41be,'content':_0xd76736,'mention':_0x3f0477,'threadId':_0xa9cda1},_0x5eeeaa=(await this['_httpService'][_0x2ff5b4(0x114)]('/universer-api/comment/unit/'+_0x4e41be+_0x2ff5b4(0x149),{'body':_0xe777ce}))[_0x2ff5b4(0x143)][_0x2ff5b4(0x137)];return{..._0x4abe44,'id':_0x5eeeaa[_0x2ff5b4(0x13c)],'dT':_0x5451cd(+_0x5eeeaa[_0x2ff5b4(0x155)])[_0x2ff5b4(0x175)](_0x2ff5b4(0x160)),'personId':_0x5eeeaa[_0x2ff5b4(0x12d)]};}else{const _0x428945={'memberId':_0x3d21c5,'unitId':_0x4e41be,'content':_0xd76736,'mention':_0x3f0477},_0x380ffd=await this['_httpService'][_0x2ff5b4(0x114)](_0x2ff5b4(0x13e)+_0x4e41be+'/add',{'body':_0x428945});return X(_0x380ffd['body'][_0x2ff5b4(0x161)],_0x4abe44);}}async[_0x14fe87(0x162)](_0x12eed5){const _0x45351e=_0x14fe87;var _0x4155d,_0x7e10e5;const {text:_0x9d72a5,unitId:_0x22ff29}=_0x12eed5,_0x472046=(_0x7e10e5=(_0x4155d=_0x9d72a5[_0x45351e(0x148)])==null?void 0x0:_0x4155d['filter'](_0x49245d=>_0x49245d['rangeType']===_0x25e50d[_0x45351e(0x15e)])[_0x45351e(0x15a)](_0x35498f=>_0x35498f[_0x45351e(0x14e)]))!=null?_0x7e10e5:[],_0x426dd6=JSON['stringify'](_0x9d72a5),_0x20e637=_0x12eed5[_0x45351e(0x112)],_0x4c0f20=_0x12eed5['id'],_0x505ef2={'memberId':(await this['_sessionService'][_0x45351e(0x11b)](_0x22ff29))[_0x45351e(0x132)](),'unitId':_0x22ff29,'threadId':_0x20e637,'mention':_0x472046,'content':_0x426dd6,'replyId':_0x4c0f20},_0x47d444=await this[_0x45351e(0x144)][_0x45351e(0x114)](_0x45351e(0x13e)+_0x22ff29+_0x45351e(0x125),{'body':_0x505ef2});return!_0x47d444['body']['error']||_0x47d444[_0x45351e(0x143)][_0x45351e(0x146)][_0x45351e(0x167)]===0x1;}async['resolveComment'](_0x2c206b){const _0x5bcf3b=_0x14fe87,{unitId:_0x4f7161}=_0x2c206b,_0x24f266=_0x2c206b[_0x5bcf3b(0x112)],_0x3f39f5={'memberId':this[_0x5bcf3b(0x154)][_0x5bcf3b(0x14b)]()['userID'],'unitId':_0x4f7161,'threadId':_0x24f266,'solved':_0x2c206b[_0x5bcf3b(0x16f)]?I[_0x5bcf3b(0x134)]:I[_0x5bcf3b(0x138)]},_0x31e259=await this[_0x5bcf3b(0x144)][_0x5bcf3b(0x114)](_0x5bcf3b(0x13e)+_0x4f7161+_0x5bcf3b(0x13f),{'body':_0x3f39f5});return!_0x31e259[_0x5bcf3b(0x143)]['error']||_0x31e259['body'][_0x5bcf3b(0x146)][_0x5bcf3b(0x167)]===0x1;}async[_0x14fe87(0x145)](_0x24a092,_0x50d614,_0x506e1f,_0x35ac7c){const _0x48614a=_0x14fe87,_0x4e61bd={'memberId':(await this[_0x48614a(0x16c)][_0x48614a(0x11b)](_0x24a092))[_0x48614a(0x132)](),'threadId':_0x506e1f,'replyId':_0x35ac7c,'unitId':_0x24a092},_0x132653=await this[_0x48614a(0x144)][_0x48614a(0x114)]('/universer-api/comment/unit/'+_0x24a092+_0x48614a(0x163),{'body':_0x4e61bd});return!_0x132653[_0x48614a(0x143)]['error']||_0x132653[_0x48614a(0x143)][_0x48614a(0x146)][_0x48614a(0x167)]===0x1;}async[_0x14fe87(0x136)](_0x3f86e0,_0x504b53,_0x33ed90){const _0x55c5f5=_0x14fe87,_0x341737={'unitId':_0x3f86e0,'threadId':_0x33ed90},_0x4eff9c=await this[_0x55c5f5(0x144)][_0x55c5f5(0x114)]('/universer-api/comment/unit/'+_0x3f86e0+_0x55c5f5(0x166),{'body':_0x341737}),_0x208cdc=_0x33ed90['map'](_0x239b7d=>ee(_0x4eff9c['body'][_0x55c5f5(0x113)][_0x239b7d],_0x3f86e0,_0x504b53))['filter'](Boolean);return Object['values'](_0x4eff9c[_0x55c5f5(0x143)][_0x55c5f5(0x130)])[_0x55c5f5(0x176)](_0x4e6568=>{const _0x59b996=_0x55c5f5;this['_userService'][_0x59b996(0x115)](_0x4e6568);}),_0x208cdc;}[_0x14fe87(0x16d)](_0x198744){const _0x21218a=_0x14fe87;return{'id':_0x198744['id'],'threadId':_0x198744[_0x21218a(0x112)],'ref':_0x198744[_0x21218a(0x140)]};}};f=Q([_(0x0,_0x501b2f(_0x4c4d5)),_(0x1,_0x501b2f(_0x13e1e2)),_(0x2,_0x501b2f(_0x20eae3)),_(0x3,_0x501b2f(_0x52d9c7))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x14fc53,_0x34c0e6,_0x1cb31f,_0x31bde9)=>{const _0x370b18=_0x14fe87;for(var _0x123cd7=_0x31bde9>0x1?void 0x0:_0x31bde9?re(_0x34c0e6,_0x1cb31f):_0x34c0e6,_0x4aa950=_0x14fc53[_0x370b18(0x14c)]-0x1,_0x535ef5;_0x4aa950>=0x0;_0x4aa950--)(_0x535ef5=_0x14fc53[_0x4aa950])&&(_0x123cd7=_0x535ef5(_0x123cd7)||_0x123cd7);return _0x123cd7;},N=(_0x4e876d,_0x62ab23)=>(_0x58b82f,_0x49a60f)=>_0x62ab23(_0x58b82f,_0x49a60f,_0x4e876d);let g=class extends _0x184ef4{constructor(_0x1aa92d,_0x4ffa6a){const _0x4e0a11=_0x14fe87;super(),this[_0x4e0a11(0x159)]=_0x1aa92d,this[_0x4e0a11(0x15b)]=_0x4ffa6a,this[_0x4e0a11(0x150)]();}[_0x14fe87(0x150)](){const _0x569b2b=_0x14fe87;this[_0x569b2b(0x159)][_0x569b2b(0x110)]=this['_threadCommentDataSource'],this[_0x569b2b(0x159)][_0x569b2b(0x158)]=!0x1;}};g=te([N(0x0,_0x1e191d),N(0x1,_0x501b2f(f))],g);var se=Object[_0x14fe87(0x14f)],oe=Object[_0x14fe87(0x135)],ne=(_0x95357b,_0x2d6151,_0x41f584)=>_0x2d6151 in _0x95357b?se(_0x95357b,_0x2d6151,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x41f584}):_0x95357b[_0x2d6151]=_0x41f584,ie=(_0x5e5ebf,_0x2b0242,_0x50f175,_0x59f72f)=>{const _0x3cf60c=_0x14fe87;for(var _0x2effe0=_0x59f72f>0x1?void 0x0:_0x59f72f?oe(_0x2b0242,_0x50f175):_0x2b0242,_0x22a21d=_0x5e5ebf[_0x3cf60c(0x14c)]-0x1,_0x403070;_0x22a21d>=0x0;_0x22a21d--)(_0x403070=_0x5e5ebf[_0x22a21d])&&(_0x2effe0=_0x403070(_0x2effe0)||_0x2effe0);return _0x2effe0;},w=(_0x18445c,_0x350fd2)=>(_0x45a7b7,_0xebc472)=>_0x350fd2(_0x45a7b7,_0xebc472,_0x18445c),$=(_0x37f2ce,_0x857101,_0x51ccde)=>ne(_0x37f2ce,typeof _0x857101!=_0x14fe87(0x13b)?_0x857101+'':_0x857101,_0x51ccde);let b=class extends _0x2b45ac{constructor(_0x39b587=M,_0x3df0c6,_0x11d241){const _0x601996=_0x14fe87;super(),this[_0x601996(0x126)]=_0x39b587,this[_0x601996(0x117)]=_0x3df0c6,this[_0x601996(0x128)]=_0x11d241;const {..._0x4e1010}=_0x378f6c({},M,this[_0x601996(0x126)]);this[_0x601996(0x128)]['setConfig'](z,_0x4e1010);}[_0x14fe87(0x116)](){const _0x314d03=_0x14fe87;[[f],[g],[S]][_0x314d03(0x176)](_0xacdcfa=>{const _0x1283e2=_0x314d03;this[_0x1283e2(0x117)][_0x1283e2(0x118)](_0xacdcfa);});}[_0x14fe87(0x10e)](){const _0x5c4c46=_0x14fe87;this['_injector']['get'](g),this[_0x5c4c46(0x117)][_0x5c4c46(0x11f)](S);}};$(b,_0x14fe87(0x168),W),$(b,'type',_0x23ecc4[_0x14fe87(0x133)]),b=ie([_0xb7eb1d(_0x373e94,_0x16f4be,_0x2329d3),w(0x1,_0x501b2f(_0x52d9c7)),w(0x2,_0x3cd729)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0xd82d43=_0x1572;(function(_0x5b5441,_0x36fc3e){const _0x3c9df9=_0x1572,_0x4768c6=_0x5b5441();while(!![]){try{const _0xbef156=parseInt(_0x3c9df9(0x126))/0x1*(parseInt(_0x3c9df9(0xf4))/0x2)+-parseInt(_0x3c9df9(0x13f))/0x3+-parseInt(_0x3c9df9(0x137))/0x4+-parseInt(_0x3c9df9(0x132))/0x5+parseInt(_0x3c9df9(0x107))/0x6*(-parseInt(_0x3c9df9(0x103))/0x7)+-parseInt(_0x3c9df9(0xf5))/0x8*(-parseInt(_0x3c9df9(0x12f))/0x9)+parseInt(_0x3c9df9(0x127))/0xa;if(_0xbef156===_0x36fc3e)break;else _0x4768c6['push'](_0x4768c6['shift']());}catch(_0x136615){_0x4768c6['push'](_0x4768c6['shift']());}}}(_0x3d56,0x524df));import{CommentService as _0x2afbd1,CollaborationSessionService as _0x309717,UniverCollaborationClientPlugin as _0x5e0c12}from'@univerjs-pro/collaboration-client';function _0x3d56(){const _0x2c5c0c=['comments','unitId','getMemberID','content','replyId','user','596253qhlIDC','_userService','YYYY/MM/DD\x20HH:mm','length','18PovyPk','_configService','parentId','subscribe','Delete','_sessionService','listComments','addComment','rangeId','/list','/edit','post','getUnit','disposeWithMe','code','_threadCommentDataSourceService','_commentService','addUser','deleteComment','symbol','setConfig','syncUpdateMutationToColla','/universer-api/user/list','Add','Reply','body','payload','_initDataSource','Edit','_initUserSync','COMMENT','1641JrHVBX','12962320WRGTXQ','personId','_init','UNRECOGNIZED','getComment','customRanges','_threadCommentModel','thread-comment-data-source.config','8586PXQyRI','commentUpdate$','_injector','901470WLWzAq','dataSource','solved','saveCommentToSnapshot','userId','106868DixNtn','Solved','createTimestamp','Solve','format','root','resolved','rangeType','1785408wzthXx','resolveComment','/reply','_config','pluginName','replies','values','map','getOwnPropertyDescriptor','error','parse','stringify','get','/universer-api/comment/unit/','/delete','OpenOrReOpen','onStarting','_httpService','userID','Unknown','find','filter','add','defineProperty','users','pipe','forEach','type','62JHcdZg','400GvExMy','delete','threadId','updateComment','requireSession','/solved','onReady','_threadCommentDataSource'];_0x3d56=function(){return _0x2c5c0c;};return _0x3d56();}import{UniverLicensePlugin as _0x4d7a5a}from'@univerjs-pro/license';import{dayjs as _0xd05752,UserManagerService as _0x41b9cd,Inject as _0x5d8c37,Injector as _0x4cf3db,Disposable as _0x275151,CustomRangeType as _0x181f60,UniverInstanceType as _0xf2bc01,DependentOn as _0x29bf69,IConfigService as _0x6c6242,Plugin as _0x36e53a,merge as _0x438ac3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x43ebb9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x271da6,IThreadCommentDataSourceService as _0x815dfc}from'@univerjs/thread-comment';import{bufferTime as _0x2dd4ef}from'rxjs';import{HTTPService as _0x54b85d}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5134d7=>(_0x5134d7[_0x5134d7[_0xd82d43(0x14e)]=0x0]='OpenOrReOpen',_0x5134d7[_0x5134d7[_0xd82d43(0x138)]=0x1]=_0xd82d43(0x138),_0x5134d7[_0x5134d7['UNRECOGNIZED']=-0x1]=_0xd82d43(0x12a),_0x5134d7))(I||{}),v=(_0xff5a21=>(_0xff5a21[_0xff5a21[_0xd82d43(0xeb)]=0x0]='Unknown',_0xff5a21[_0xff5a21[_0xd82d43(0x11e)]=0x1]='Add',_0xff5a21[_0xff5a21[_0xd82d43(0x11f)]=0x2]=_0xd82d43(0x11f),_0xff5a21[_0xff5a21[_0xd82d43(0x123)]=0x3]='Edit',_0xff5a21[_0xff5a21[_0xd82d43(0x10b)]=0x4]=_0xd82d43(0x10b),_0xff5a21[_0xff5a21[_0xd82d43(0x13a)]=0x5]=_0xd82d43(0x13a),_0xff5a21[_0xff5a21[_0xd82d43(0x12a)]=-0x1]=_0xd82d43(0x12a),_0xff5a21))(v||{});const D=_0x32dae8=>_0xd05752(new Date(+_0x32dae8))[_0xd82d43(0x13b)](_0xd82d43(0x105)),B=async(_0x530237,_0x1f227e)=>{const _0x540796=_0xd82d43,_0x304797=_0x530237[_0x540796(0x14b)](_0x41b9cd),_0x4f22b0=_0x530237[_0x540796(0x14b)](_0x54b85d);_0x1f227e[_0x540796(0xf2)](_0x59e5b5=>{const _0x3b77ff=_0x540796;_0x304797['getUser'](_0x59e5b5)&&_0x1f227e[_0x3b77ff(0xf6)](_0x59e5b5);}),_0x1f227e['size']&&(await _0x4f22b0[_0x540796(0x14b)](_0x540796(0x11d),{'params':{'userIDs':[..._0x1f227e]}}))[_0x540796(0x120)][_0x540796(0xf0)]['forEach'](_0x4e76a1=>{const _0x3731f3=_0x540796;_0x4e76a1&&_0x304797[_0x3731f3(0x118)](_0x4e76a1);});};var K=Object[_0xd82d43(0x147)],V=(_0x4495f8,_0x45ba53,_0x4a91f5,_0x5af961)=>{for(var _0x2170b0=_0x5af961>0x1?void 0x0:_0x5af961?K(_0x45ba53,_0x4a91f5):_0x45ba53,_0x1994ac=_0x4495f8['length']-0x1,_0x3c338b;_0x1994ac>=0x0;_0x1994ac--)(_0x3c338b=_0x4495f8[_0x1994ac])&&(_0x2170b0=_0x3c338b(_0x2170b0)||_0x2170b0);return _0x2170b0;},p=(_0x442411,_0x2414d9)=>(_0x2c58d5,_0x56d89f)=>_0x2414d9(_0x2c58d5,_0x56d89f,_0x442411);let S=class extends _0x275151{constructor(_0x5692e6,_0x509ecb,_0x4e2a48,_0x3098bb){const _0x48b0cf=_0xd82d43;super(),this[_0x48b0cf(0x117)]=_0x5692e6,this[_0x48b0cf(0x12d)]=_0x509ecb,this[_0x48b0cf(0x104)]=_0x4e2a48,this[_0x48b0cf(0x131)]=_0x3098bb,this[_0x48b0cf(0x129)](),this[_0x48b0cf(0x124)]();}[_0xd82d43(0x124)](){const _0x27fe34=_0xd82d43;this[_0x27fe34(0x114)](this['_threadCommentModel'][_0x27fe34(0x130)][_0x27fe34(0xf1)](_0x2dd4ef(0x10))['subscribe'](_0x434863=>{const _0x114694=_0x27fe34,_0x2b5227=new Set();_0x434863[_0x114694(0xf2)](_0x247e9e=>{const _0x471372=_0x114694;switch(_0x247e9e[_0x471372(0xf3)]){case _0x471372(0xee):{const _0x466f50=_0x247e9e[_0x471372(0x121)][_0x471372(0x128)];_0x2b5227[_0x471372(0xee)](_0x466f50);break;}}}),B(this['_injector'],_0x2b5227);}));}['_init'](){const _0x281b0d=_0xd82d43;this[_0x281b0d(0x114)](this[_0x281b0d(0x117)]['commentUpdate$'][_0x281b0d(0x10a)](async _0xb56ee=>{const _0x1ea863=_0x281b0d;var _0x25780a,_0x5d58cd,_0x3047a2,_0x2b773a;const _0x3418ab=(_0x25780a=this[_0x1ea863(0x12d)]['getUnit'](_0xb56ee[_0x1ea863(0xfe)])[_0x1ea863(0xec)](_0x5d50eb=>_0x5d50eb[_0x1ea863(0xf7)]===_0xb56ee[_0x1ea863(0xf7)]))==null?void 0x0:_0x25780a[_0x1ea863(0x13c)];if(!_0x3418ab)return;const {unitId:_0x115efd,subUnitId:_0x157cde}=_0x3418ab;switch(_0xb56ee[_0x1ea863(0x102)]&&this[_0x1ea863(0x104)]['addUser'](_0xb56ee[_0x1ea863(0x102)]),_0xb56ee[_0x1ea863(0xf3)]){case v[_0x1ea863(0x11e)]:break;case v[_0x1ea863(0x11f)]:{this[_0x1ea863(0x12d)][_0x1ea863(0x10e)](_0x115efd,_0x157cde,{'unitId':_0x115efd,'subUnitId':_0x157cde,'ref':'','id':_0xb56ee[_0x1ea863(0x101)],'dT':D(+_0xb56ee[_0x1ea863(0x139)]),'threadId':_0xb56ee[_0x1ea863(0xf7)],'personId':(_0x3047a2=(_0x5d58cd=_0xb56ee['user'])==null?void 0x0:_0x5d58cd[_0x1ea863(0x151)])!=null?_0x3047a2:_0xb56ee[_0x1ea863(0x136)],'text':JSON['parse'](_0xb56ee['content']),'parentId':_0x3418ab['id']});break;}case v[_0x1ea863(0x10b)]:{const _0x2f354c=this[_0x1ea863(0x12d)][_0x1ea863(0x12b)](_0x115efd,_0x157cde,_0xb56ee[_0x1ea863(0x101)]);_0x2f354c&&_0x2f354c[_0x1ea863(0x109)]&&this[_0x1ea863(0x12d)]['deleteComment'](_0x115efd,_0x157cde,_0xb56ee['replyId']);break;}case v[_0x1ea863(0x123)]:{this[_0x1ea863(0x12d)][_0x1ea863(0xf8)](_0x115efd,_0x157cde,{'commentId':_0xb56ee[_0x1ea863(0x101)],'text':JSON[_0x1ea863(0x149)](_0xb56ee['content'])});break;}case v['Solve']:{const _0x268532=(_0x2b773a=this['_threadCommentModel'][_0x1ea863(0x113)](_0xb56ee['unitId'])[_0x1ea863(0xec)](_0x1d0a84=>_0x1d0a84[_0x1ea863(0xf7)]===_0xb56ee[_0x1ea863(0xf7)]))==null?void 0x0:_0x2b773a[_0x1ea863(0x13c)];_0x268532&&this[_0x1ea863(0x12d)][_0x1ea863(0x140)](_0x115efd,_0x157cde,_0x268532['id'],_0xb56ee[_0x1ea863(0x134)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x5d8c37(_0x2afbd1)),p(0x1,_0x5d8c37(_0x271da6)),p(0x2,_0x5d8c37(_0x41b9cd)),p(0x3,_0x5d8c37(_0x4cf3db))],S);const z=_0xd82d43(0x12e),M={};function _0x1572(_0x3327ea,_0x4c73b8){const _0x3d5678=_0x3d56();return _0x1572=function(_0x1572ec,_0x528845){_0x1572ec=_0x1572ec-0xeb;let _0x5cd1b8=_0x3d5678[_0x1572ec];return _0x5cd1b8;},_0x1572(_0x3327ea,_0x4c73b8);}var k=Object[_0xd82d43(0x147)],Q=(_0x25e839,_0x1eab5a,_0x8ce6d6,_0x1ddd4b)=>{for(var _0x502771=_0x1ddd4b>0x1?void 0x0:_0x1ddd4b?k(_0x1eab5a,_0x8ce6d6):_0x1eab5a,_0x2caf64=_0x25e839['length']-0x1,_0x560723;_0x2caf64>=0x0;_0x2caf64--)(_0x560723=_0x25e839[_0x2caf64])&&(_0x502771=_0x560723(_0x502771)||_0x502771);return _0x502771;},_=(_0x49f117,_0x164e7e)=>(_0x8c55ef,_0x3bf822)=>_0x164e7e(_0x8c55ef,_0x3bf822,_0x49f117);function X(_0x1b5380,_0x3d7683){const _0x2a729c=_0xd82d43,_0x547be9=_0x1b5380[_0x2a729c(0x144)][0x0];return{..._0x3d7683,'id':_0x547be9[_0x2a729c(0x101)],'resolved':_0x1b5380[_0x2a729c(0x134)]===0x1,'dT':D(_0x547be9[_0x2a729c(0x139)]),'personId':_0x547be9[_0x2a729c(0x136)],'threadId':_0x547be9[_0x2a729c(0xf7)]};}function ee(_0x59c2f1,_0x144c2a,_0x12a879){const _0x41aee2=_0xd82d43;var _0x264ecc,_0x5346b0;if(((_0x5346b0=(_0x264ecc=_0x59c2f1==null?void 0x0:_0x59c2f1[_0x41aee2(0x144)])==null?void 0x0:_0x264ecc[_0x41aee2(0x106)])!=null?_0x5346b0:0x0)>0x0){const _0x7b37d=(_0x41b163,_0x4fcd08)=>({'id':_0x41b163[_0x41aee2(0x101)],'threadId':_0x41b163[_0x41aee2(0xf7)],'dT':D(_0x41b163['createTimestamp']),'personId':_0x41b163[_0x41aee2(0x136)],'resolved':_0x59c2f1[_0x41aee2(0x134)]===I[_0x41aee2(0x138)],'unitId':_0x144c2a,'subUnitId':_0x12a879,'text':JSON[_0x41aee2(0x149)](_0x41b163[_0x41aee2(0x100)]),'parentId':_0x4fcd08}),_0x3a2fa2=_0x7b37d(_0x59c2f1[_0x41aee2(0x144)][0x0]);return{..._0x3a2fa2,'children':_0x59c2f1[_0x41aee2(0x144)]['slice'](0x1)['map'](_0x3f2457=>_0x7b37d(_0x3f2457,_0x3a2fa2['id']))};}return null;}let f=class{constructor(_0x1dbfc0,_0x1257a3,_0x4f3416,_0x5103c2){const _0x5ca99d=_0xd82d43;this[_0x5ca99d(0x150)]=_0x1dbfc0,this[_0x5ca99d(0x104)]=_0x1257a3,this[_0x5ca99d(0x10c)]=_0x4f3416,this[_0x5ca99d(0x131)]=_0x5103c2;}async[_0xd82d43(0x10e)](_0x525e3d){const _0x45c37a=_0xd82d43;var _0x6d07ab,_0x48ef73;const {parentId:_0x41bcbf,unitId:_0x2a996d,text:_0x5b35db,threadId:_0x5d0217}=_0x525e3d,_0x18bfeb=(_0x48ef73=(_0x6d07ab=_0x5b35db[_0x45c37a(0x12c)])==null?void 0x0:_0x6d07ab[_0x45c37a(0xed)](_0x21321e=>_0x21321e[_0x45c37a(0x13e)]===_0x181f60[_0x45c37a(0x125)])[_0x45c37a(0x146)](_0x15a50f=>_0x15a50f['rangeId']))!=null?_0x48ef73:[],_0x38ced0=JSON[_0x45c37a(0x14a)](_0x5b35db),_0x4bcc49=(await this[_0x45c37a(0x10c)][_0x45c37a(0xf9)](_0x2a996d))['getMemberID']();if(_0x41bcbf){const _0x51407f={'memberId':_0x4bcc49,'unitId':_0x2a996d,'content':_0x38ced0,'mention':_0x18bfeb,'threadId':_0x5d0217},_0x52fafa=(await this[_0x45c37a(0x150)]['post'](_0x45c37a(0x14c)+_0x2a996d+_0x45c37a(0x141),{'body':_0x51407f}))['body']['reply'];return{..._0x525e3d,'id':_0x52fafa[_0x45c37a(0x101)],'dT':_0xd05752(+_0x52fafa[_0x45c37a(0x139)])[_0x45c37a(0x13b)](_0x45c37a(0x105)),'personId':_0x52fafa[_0x45c37a(0x136)]};}else{const _0x159e48={'memberId':_0x4bcc49,'unitId':_0x2a996d,'content':_0x38ced0,'mention':_0x18bfeb},_0x36fa45=await this['_httpService'][_0x45c37a(0x112)]('/universer-api/comment/unit/'+_0x2a996d+'/add',{'body':_0x159e48});return X(_0x36fa45[_0x45c37a(0x120)]['comment'],_0x525e3d);}}async['updateComment'](_0x2b106a){const _0x5e2e5d=_0xd82d43;var _0x445c6f,_0x2dfa91;const {text:_0x45aaf8,unitId:_0x517b32}=_0x2b106a,_0x1d6e6d=(_0x2dfa91=(_0x445c6f=_0x45aaf8[_0x5e2e5d(0x12c)])==null?void 0x0:_0x445c6f[_0x5e2e5d(0xed)](_0x44b896=>_0x44b896['rangeType']===_0x181f60[_0x5e2e5d(0x125)])[_0x5e2e5d(0x146)](_0xbaa41d=>_0xbaa41d[_0x5e2e5d(0x10f)]))!=null?_0x2dfa91:[],_0x4d8653=JSON[_0x5e2e5d(0x14a)](_0x45aaf8),_0x367182=_0x2b106a[_0x5e2e5d(0xf7)],_0x2ba288=_0x2b106a['id'],_0x11a720={'memberId':(await this[_0x5e2e5d(0x10c)]['requireSession'](_0x517b32))[_0x5e2e5d(0xff)](),'unitId':_0x517b32,'threadId':_0x367182,'mention':_0x1d6e6d,'content':_0x4d8653,'replyId':_0x2ba288},_0x1b9c67=await this['_httpService']['post'](_0x5e2e5d(0x14c)+_0x517b32+_0x5e2e5d(0x111),{'body':_0x11a720});return!_0x1b9c67[_0x5e2e5d(0x120)]['error']||_0x1b9c67[_0x5e2e5d(0x120)][_0x5e2e5d(0x148)][_0x5e2e5d(0x115)]===0x1;}async[_0xd82d43(0x140)](_0x4893f4){const _0x519710=_0xd82d43,{unitId:_0x466518}=_0x4893f4,_0x47b68c=_0x4893f4[_0x519710(0xf7)],_0x274a1b={'memberId':this['_userService']['getCurrentUser']()[_0x519710(0x151)],'unitId':_0x466518,'threadId':_0x47b68c,'solved':_0x4893f4[_0x519710(0x13d)]?I[_0x519710(0x138)]:I[_0x519710(0x14e)]},_0x606572=await this[_0x519710(0x150)][_0x519710(0x112)]('/universer-api/comment/unit/'+_0x466518+_0x519710(0xfa),{'body':_0x274a1b});return!_0x606572['body'][_0x519710(0x148)]||_0x606572[_0x519710(0x120)][_0x519710(0x148)][_0x519710(0x115)]===0x1;}async[_0xd82d43(0x119)](_0x26b4a3,_0x123483,_0x4adb8a,_0xf9cfad){const _0x4c9b52=_0xd82d43,_0x1d428d={'memberId':(await this[_0x4c9b52(0x10c)][_0x4c9b52(0xf9)](_0x26b4a3))[_0x4c9b52(0xff)](),'threadId':_0x4adb8a,'replyId':_0xf9cfad,'unitId':_0x26b4a3},_0x3f0bfd=await this[_0x4c9b52(0x150)][_0x4c9b52(0x112)](_0x4c9b52(0x14c)+_0x26b4a3+_0x4c9b52(0x14d),{'body':_0x1d428d});return!_0x3f0bfd[_0x4c9b52(0x120)][_0x4c9b52(0x148)]||_0x3f0bfd['body'][_0x4c9b52(0x148)][_0x4c9b52(0x115)]===0x1;}async[_0xd82d43(0x10d)](_0x577f57,_0x52d722,_0xe7beeb){const _0x4ff479=_0xd82d43,_0x245c77={'unitId':_0x577f57,'threadId':_0xe7beeb},_0x20f99a=await this[_0x4ff479(0x150)][_0x4ff479(0x112)](_0x4ff479(0x14c)+_0x577f57+_0x4ff479(0x110),{'body':_0x245c77}),_0x3de7a1=_0xe7beeb[_0x4ff479(0x146)](_0x45f73e=>ee(_0x20f99a[_0x4ff479(0x120)][_0x4ff479(0xfd)][_0x45f73e],_0x577f57,_0x52d722))[_0x4ff479(0xed)](Boolean);return Object[_0x4ff479(0x145)](_0x20f99a[_0x4ff479(0x120)][_0x4ff479(0xf0)])['forEach'](_0x403c56=>{const _0x1e968c=_0x4ff479;this[_0x1e968c(0x104)][_0x1e968c(0x118)](_0x403c56);}),_0x3de7a1;}[_0xd82d43(0x135)](_0x5b8d97){const _0x59cd6a=_0xd82d43;return{'id':_0x5b8d97['id'],'threadId':_0x5b8d97[_0x59cd6a(0xf7)],'ref':_0x5b8d97['ref']};}};f=Q([_(0x0,_0x5d8c37(_0x54b85d)),_(0x1,_0x5d8c37(_0x41b9cd)),_(0x2,_0x5d8c37(_0x309717)),_(0x3,_0x5d8c37(_0x4cf3db))],f);var re=Object[_0xd82d43(0x147)],te=(_0x4fad81,_0x1ab5c0,_0x1ba570,_0x46bdf7)=>{const _0x52bbe1=_0xd82d43;for(var _0x2e1037=_0x46bdf7>0x1?void 0x0:_0x46bdf7?re(_0x1ab5c0,_0x1ba570):_0x1ab5c0,_0x284fa9=_0x4fad81[_0x52bbe1(0x106)]-0x1,_0xb47cff;_0x284fa9>=0x0;_0x284fa9--)(_0xb47cff=_0x4fad81[_0x284fa9])&&(_0x2e1037=_0xb47cff(_0x2e1037)||_0x2e1037);return _0x2e1037;},N=(_0x1f9535,_0x51001e)=>(_0x3ffdbb,_0x4962bb)=>_0x51001e(_0x3ffdbb,_0x4962bb,_0x1f9535);let g=class extends _0x275151{constructor(_0x2ba7c3,_0x2d6df2){const _0x23c949=_0xd82d43;super(),this[_0x23c949(0x116)]=_0x2ba7c3,this['_threadCommentDataSource']=_0x2d6df2,this[_0x23c949(0x122)]();}[_0xd82d43(0x122)](){const _0x2ca8e6=_0xd82d43;this[_0x2ca8e6(0x116)][_0x2ca8e6(0x133)]=this[_0x2ca8e6(0xfc)],this['_threadCommentDataSourceService'][_0x2ca8e6(0x11c)]=!0x1;}};g=te([N(0x0,_0x815dfc),N(0x1,_0x5d8c37(f))],g);var se=Object[_0xd82d43(0xef)],oe=Object[_0xd82d43(0x147)],ne=(_0x12af1d,_0x1366f5,_0x179e08)=>_0x1366f5 in _0x12af1d?se(_0x12af1d,_0x1366f5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x179e08}):_0x12af1d[_0x1366f5]=_0x179e08,ie=(_0x3c2b43,_0x21e10a,_0x515854,_0x47b6a1)=>{const _0x4831e8=_0xd82d43;for(var _0x1bc770=_0x47b6a1>0x1?void 0x0:_0x47b6a1?oe(_0x21e10a,_0x515854):_0x21e10a,_0x4ba224=_0x3c2b43[_0x4831e8(0x106)]-0x1,_0x49c03d;_0x4ba224>=0x0;_0x4ba224--)(_0x49c03d=_0x3c2b43[_0x4ba224])&&(_0x1bc770=_0x49c03d(_0x1bc770)||_0x1bc770);return _0x1bc770;},w=(_0xfc2d1a,_0x5568de)=>(_0x1a761a,_0x391a44)=>_0x5568de(_0x1a761a,_0x391a44,_0xfc2d1a),$=(_0x72e15c,_0x4ba227,_0x3c9664)=>ne(_0x72e15c,typeof _0x4ba227!=_0xd82d43(0x11a)?_0x4ba227+'':_0x4ba227,_0x3c9664);let b=class extends _0x36e53a{constructor(_0xfa57f2=M,_0x419983,_0x2f46ef){const _0x3b0ad6=_0xd82d43;super(),this[_0x3b0ad6(0x142)]=_0xfa57f2,this['_injector']=_0x419983,this[_0x3b0ad6(0x108)]=_0x2f46ef;const {..._0x2da69e}=_0x438ac3({},M,this['_config']);this[_0x3b0ad6(0x108)][_0x3b0ad6(0x11b)](z,_0x2da69e);}[_0xd82d43(0x14f)](){const _0x3ec210=_0xd82d43;[[f],[g],[S]][_0x3ec210(0xf2)](_0x19d377=>{const _0x28ccd0=_0x3ec210;this[_0x28ccd0(0x131)][_0x28ccd0(0xee)](_0x19d377);});}[_0xd82d43(0xfb)](){const _0x58524b=_0xd82d43;this[_0x58524b(0x131)][_0x58524b(0x14b)](g),this[_0x58524b(0x131)]['get'](S);}};$(b,_0xd82d43(0x143),W),$(b,_0xd82d43(0xf3),_0xf2bc01['UNIVER_UNKNOWN']),b=ie([_0x29bf69(_0x43ebb9,_0x5e0c12,_0x4d7a5a),w(0x1,_0x5d8c37(_0x4cf3db)),w(0x2,_0x6c6242)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x23ea(_0x3f7e71,_0x12765f){const _0x412f22=_0x412f();return _0x23ea=function(_0x23ea0e,_0x55cf5d){_0x23ea0e=_0x23ea0e-0x9b;let _0x4295dd=_0x412f22[_0x23ea0e];return _0x4295dd;},_0x23ea(_0x3f7e71,_0x12765f);}(function(_0x5cf4e9,_0x4289fd){const _0x4f43d1=_0x23ea,_0x89a0a3=_0x5cf4e9();while(!![]){try{const _0x40b317=-parseInt(_0x4f43d1(0xdd))/0x1*(parseInt(_0x4f43d1(0xdc))/0x2)+-parseInt(_0x4f43d1(0x117))/0x3*(parseInt(_0x4f43d1(0x102))/0x4)+-parseInt(_0x4f43d1(0xa6))/0x5+parseInt(_0x4f43d1(0x10f))/0x6+parseInt(_0x4f43d1(0xb5))/0x7*(-parseInt(_0x4f43d1(0xbb))/0x8)+-parseInt(_0x4f43d1(0xc5))/0x9+parseInt(_0x4f43d1(0xe4))/0xa*(parseInt(_0x4f43d1(0xf5))/0xb);if(_0x40b317===_0x4289fd)break;else _0x89a0a3['push'](_0x89a0a3['shift']());}catch(_0x162eb0){_0x89a0a3['push'](_0x89a0a3['shift']());}}}(_0x412f,0xcf751),function(_0xd4bfb1,_0x318092){const _0x1d1210=_0x23ea;typeof exports=='object'&&typeof module<'u'?_0x318092(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require(_0x1d1210(0x104)),require(_0x1d1210(0x10c)),require(_0x1d1210(0xe5)),require('rxjs'),require(_0x1d1210(0xe7))):typeof define==_0x1d1210(0xcf)&&define[_0x1d1210(0x106)]?define([_0x1d1210(0xbd),'@univerjs-pro/collaboration-client','@univerjs-pro/license',_0x1d1210(0x104),_0x1d1210(0x10c),_0x1d1210(0xe5),_0x1d1210(0xcb),_0x1d1210(0xe7)],_0x318092):(_0xd4bfb1=typeof globalThis<'u'?globalThis:_0xd4bfb1||self,_0x318092(_0xd4bfb1['UniverProThreadCommentDatasource']={},_0xd4bfb1[_0x1d1210(0xd3)],_0xd4bfb1[_0x1d1210(0xd6)],_0xd4bfb1[_0x1d1210(0xe1)],_0xd4bfb1['UniverThreadCommentUi'],_0xd4bfb1[_0x1d1210(0xc0)],_0xd4bfb1[_0x1d1210(0xcb)],_0xd4bfb1[_0x1d1210(0x111)]));}(this,function(_0x297b9b,_0x300b34,_0x327a90,_0x3cdc49,_0x7573fa,_0x22aef7,_0x1cb2e8,_0x30c585){'use strict';const _0x22ef2d=_0x23ea;const _0x2ea2d8='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x4a6b33=(_0x510c6e=>(_0x510c6e[_0x510c6e[_0x22ef2d(0xe9)]=0x0]='OpenOrReOpen',_0x510c6e[_0x510c6e['Solved']=0x1]=_0x22ef2d(0xe2),_0x510c6e[_0x510c6e[_0x22ef2d(0x110)]=-0x1]=_0x22ef2d(0x110),_0x510c6e))(_0x4a6b33||{}),_0x55bcf1=(_0x37a5e2=>(_0x37a5e2[_0x37a5e2['Unknown']=0x0]=_0x22ef2d(0xcc),_0x37a5e2[_0x37a5e2[_0x22ef2d(0xb3)]=0x1]=_0x22ef2d(0xb3),_0x37a5e2[_0x37a5e2[_0x22ef2d(0xe0)]=0x2]='Reply',_0x37a5e2[_0x37a5e2[_0x22ef2d(0xf7)]=0x3]=_0x22ef2d(0xf7),_0x37a5e2[_0x37a5e2[_0x22ef2d(0x9f)]=0x4]=_0x22ef2d(0x9f),_0x37a5e2[_0x37a5e2[_0x22ef2d(0xda)]=0x5]='Solve',_0x37a5e2[_0x37a5e2[_0x22ef2d(0x110)]=-0x1]=_0x22ef2d(0x110),_0x37a5e2))(_0x55bcf1||{});const _0x145923=_0x1dba4d=>_0x3cdc49['dayjs'](new Date(+_0x1dba4d))[_0x22ef2d(0x120)](_0x22ef2d(0xa2)),_0x8705fb=async(_0xfc9a67,_0x5c7429)=>{const _0x126cbf=_0x22ef2d,_0x53c7d6=_0xfc9a67[_0x126cbf(0xe8)](_0x3cdc49['UserManagerService']),_0x2f1923=_0xfc9a67[_0x126cbf(0xe8)](_0x30c585[_0x126cbf(0x116)]);_0x5c7429['forEach'](_0x33a549=>{const _0x2fbbaa=_0x126cbf;_0x53c7d6['getUser'](_0x33a549)&&_0x5c7429[_0x2fbbaa(0xef)](_0x33a549);}),_0x5c7429[_0x126cbf(0xea)]&&(await _0x2f1923[_0x126cbf(0xe8)](_0x126cbf(0xd8),{'params':{'userIDs':[..._0x5c7429]}}))[_0x126cbf(0x114)][_0x126cbf(0x9c)][_0x126cbf(0xfa)](_0x16e5c1=>{const _0x21880a=_0x126cbf;_0x16e5c1&&_0x53c7d6[_0x21880a(0xa9)](_0x16e5c1);});};var _0x460156=Object[_0x22ef2d(0xfb)],_0x113d8f=(_0x2f31f4,_0x1581a7,_0x2cef0f,_0x657c9b)=>{const _0x425ca2=_0x22ef2d;for(var _0x484727=_0x657c9b>0x1?void 0x0:_0x657c9b?_0x460156(_0x1581a7,_0x2cef0f):_0x1581a7,_0x5586a4=_0x2f31f4[_0x425ca2(0xfd)]-0x1,_0x5b53f2;_0x5586a4>=0x0;_0x5586a4--)(_0x5b53f2=_0x2f31f4[_0x5586a4])&&(_0x484727=_0x5b53f2(_0x484727)||_0x484727);return _0x484727;},_0x19d97d=(_0x48e326,_0x48c6d2)=>(_0x1af696,_0x21a0a6)=>_0x48c6d2(_0x1af696,_0x21a0a6,_0x48e326);let _0x3b3e59=class extends _0x3cdc49[_0x22ef2d(0x112)]{constructor(_0x48fd5b,_0x2720e9,_0x4f5a09,_0x2d437d){const _0x324c79=_0x22ef2d;super(),this[_0x324c79(0x10a)]=_0x48fd5b,this['_threadCommentModel']=_0x2720e9,this[_0x324c79(0xf1)]=_0x4f5a09,this[_0x324c79(0xf6)]=_0x2d437d,this['_init'](),this[_0x324c79(0xba)]();}[_0x22ef2d(0xba)](){const _0x5bc9a3=_0x22ef2d;this[_0x5bc9a3(0xf9)](this[_0x5bc9a3(0xa1)][_0x5bc9a3(0xf2)][_0x5bc9a3(0xbf)](_0x1cb2e8['bufferTime'](0x10))[_0x5bc9a3(0xaa)](_0x140410=>{const _0x23b5d6=_0x5bc9a3,_0x345290=new Set();_0x140410[_0x23b5d6(0xfa)](_0x934ffc=>{const _0x31d466=_0x23b5d6;switch(_0x934ffc[_0x31d466(0xbe)]){case _0x31d466(0xd9):{const _0x3a6db1=_0x934ffc[_0x31d466(0xb7)][_0x31d466(0x118)];_0x345290['add'](_0x3a6db1);break;}}}),_0x8705fb(this[_0x23b5d6(0xf6)],_0x345290);}));}['_init'](){const _0x5b1168=_0x22ef2d;this['disposeWithMe'](this[_0x5b1168(0x10a)][_0x5b1168(0xf2)]['subscribe'](async _0x344b0b=>{const _0x442595=_0x5b1168;var _0x6e0714,_0x2f1c4b,_0x376062,_0xb5c9d0;const _0x4ea0d0=(_0x6e0714=this[_0x442595(0xa1)][_0x442595(0xc7)](_0x344b0b['unitId'])[_0x442595(0x11f)](_0x519681=>_0x519681[_0x442595(0xc1)]===_0x344b0b[_0x442595(0xc1)]))==null?void 0x0:_0x6e0714['root'];if(!_0x4ea0d0)return;const {unitId:_0x29f912,subUnitId:_0x468963}=_0x4ea0d0;switch(_0x344b0b[_0x442595(0x113)]&&this[_0x442595(0xf1)][_0x442595(0xa9)](_0x344b0b[_0x442595(0x113)]),_0x344b0b[_0x442595(0xbe)]){case _0x55bcf1[_0x442595(0xb3)]:break;case _0x55bcf1['Reply']:{this[_0x442595(0xa1)]['addComment'](_0x29f912,_0x468963,{'unitId':_0x29f912,'subUnitId':_0x468963,'ref':'','id':_0x344b0b['replyId'],'dT':_0x145923(+_0x344b0b[_0x442595(0x108)]),'threadId':_0x344b0b['threadId'],'personId':(_0x376062=(_0x2f1c4b=_0x344b0b[_0x442595(0x113)])==null?void 0x0:_0x2f1c4b['userID'])!=null?_0x376062:_0x344b0b[_0x442595(0xb9)],'text':JSON['parse'](_0x344b0b[_0x442595(0xbc)]),'parentId':_0x4ea0d0['id']});break;}case _0x55bcf1[_0x442595(0x9f)]:{const _0x221946=this[_0x442595(0xa1)][_0x442595(0xf0)](_0x29f912,_0x468963,_0x344b0b[_0x442595(0xff)]);_0x221946&&_0x221946[_0x442595(0xc9)]&&this['_threadCommentModel'][_0x442595(0xde)](_0x29f912,_0x468963,_0x344b0b[_0x442595(0xff)]);break;}case _0x55bcf1[_0x442595(0xf7)]:{this[_0x442595(0xa1)][_0x442595(0x107)](_0x29f912,_0x468963,{'commentId':_0x344b0b[_0x442595(0xff)],'text':JSON[_0x442595(0xdb)](_0x344b0b['content'])});break;}case _0x55bcf1[_0x442595(0xda)]:{const _0xb3fbc8=(_0xb5c9d0=this['_threadCommentModel'][_0x442595(0xc7)](_0x344b0b['unitId'])[_0x442595(0x11f)](_0x3f5c7a=>_0x3f5c7a[_0x442595(0xc1)]===_0x344b0b[_0x442595(0xc1)]))==null?void 0x0:_0xb5c9d0[_0x442595(0x119)];_0xb3fbc8&&this['_threadCommentModel'][_0x442595(0xeb)](_0x29f912,_0x468963,_0xb3fbc8['id'],_0x344b0b['solved']===_0x4a6b33[_0x442595(0xe2)]);break;}}}));}};_0x3b3e59=_0x113d8f([_0x19d97d(0x0,_0x3cdc49['Inject'](_0x300b34[_0x22ef2d(0xed)])),_0x19d97d(0x1,_0x3cdc49['Inject'](_0x22aef7[_0x22ef2d(0xce)])),_0x19d97d(0x2,_0x3cdc49['Inject'](_0x3cdc49['UserManagerService'])),_0x19d97d(0x3,_0x3cdc49['Inject'](_0x3cdc49[_0x22ef2d(0xf8)]))],_0x3b3e59);const _0x56ead5='thread-comment-data-source.config',_0x480c95={};var _0x4a7f83=Object[_0x22ef2d(0xfb)],_0x5b507c=(_0x476a31,_0x1cb2a0,_0x2944eb,_0x3a0698)=>{for(var _0x4a01eb=_0x3a0698>0x1?void 0x0:_0x3a0698?_0x4a7f83(_0x1cb2a0,_0x2944eb):_0x1cb2a0,_0x27fa5f=_0x476a31['length']-0x1,_0x45202a;_0x27fa5f>=0x0;_0x27fa5f--)(_0x45202a=_0x476a31[_0x27fa5f])&&(_0x4a01eb=_0x45202a(_0x4a01eb)||_0x4a01eb);return _0x4a01eb;},_0x415117=(_0x394c20,_0x401f5a)=>(_0x134c65,_0x39cc13)=>_0x401f5a(_0x134c65,_0x39cc13,_0x394c20);function _0x540b36(_0x235897,_0x2f4c2a){const _0x493d5b=_0x22ef2d,_0x3cd2f5=_0x235897[_0x493d5b(0x103)][0x0];return{..._0x2f4c2a,'id':_0x3cd2f5[_0x493d5b(0xff)],'resolved':_0x235897['solved']===0x1,'dT':_0x145923(_0x3cd2f5['createTimestamp']),'personId':_0x3cd2f5[_0x493d5b(0xb9)],'threadId':_0x3cd2f5['threadId']};}function _0x3e7c1c(_0x49b7bd,_0xf4ac9d,_0x3280f1){const _0x263277=_0x22ef2d;var _0x8936cd,_0x518bb0;if(((_0x518bb0=(_0x8936cd=_0x49b7bd==null?void 0x0:_0x49b7bd[_0x263277(0x103)])==null?void 0x0:_0x8936cd[_0x263277(0xfd)])!=null?_0x518bb0:0x0)>0x0){const _0x57aaf7=(_0x3015d5,_0x34c7ab)=>({'id':_0x3015d5[_0x263277(0xff)],'threadId':_0x3015d5['threadId'],'dT':_0x145923(_0x3015d5[_0x263277(0x108)]),'personId':_0x3015d5[_0x263277(0xb9)],'resolved':_0x49b7bd['solved']===_0x4a6b33[_0x263277(0xe2)],'unitId':_0xf4ac9d,'subUnitId':_0x3280f1,'text':JSON[_0x263277(0xdb)](_0x3015d5['content']),'parentId':_0x34c7ab}),_0x29e4fd=_0x57aaf7(_0x49b7bd[_0x263277(0x103)][0x0]);return{..._0x29e4fd,'children':_0x49b7bd[_0x263277(0x103)]['slice'](0x1)[_0x263277(0xb1)](_0x5470fc=>_0x57aaf7(_0x5470fc,_0x29e4fd['id']))};}return null;}let _0x10936e=class{constructor(_0x2f2b5e,_0x28148e,_0x2d145f,_0x16b7e0){const _0x52d19b=_0x22ef2d;this['_httpService']=_0x2f2b5e,this['_userService']=_0x28148e,this[_0x52d19b(0xc6)]=_0x2d145f,this[_0x52d19b(0xf6)]=_0x16b7e0;}async['addComment'](_0x33c17f){const _0x2003f0=_0x22ef2d;var _0x1f9bf0,_0x3f2494;const {parentId:_0x26c79c,unitId:_0xfb1d8c,text:_0x3eb456,threadId:_0x242918}=_0x33c17f,_0x45359b=(_0x3f2494=(_0x1f9bf0=_0x3eb456[_0x2003f0(0xd2)])==null?void 0x0:_0x1f9bf0['filter'](_0x2ab04c=>_0x2ab04c[_0x2003f0(0xe6)]===_0x3cdc49[_0x2003f0(0x100)][_0x2003f0(0xfe)])[_0x2003f0(0xb1)](_0x10610f=>_0x10610f[_0x2003f0(0xee)]))!=null?_0x3f2494:[],_0x3dee94=JSON[_0x2003f0(0xc4)](_0x3eb456),_0x4d61ed=(await this[_0x2003f0(0xc6)][_0x2003f0(0x11b)](_0xfb1d8c))['getMemberID']();if(_0x26c79c){const _0x198d3a={'memberId':_0x4d61ed,'unitId':_0xfb1d8c,'content':_0x3dee94,'mention':_0x45359b,'threadId':_0x242918},_0x3866d9=(await this[_0x2003f0(0xae)]['post'](_0x2003f0(0xb8)+_0xfb1d8c+_0x2003f0(0xb0),{'body':_0x198d3a}))[_0x2003f0(0x114)][_0x2003f0(0x11c)];return{..._0x33c17f,'id':_0x3866d9[_0x2003f0(0xff)],'dT':_0x3cdc49[_0x2003f0(0xd5)](+_0x3866d9[_0x2003f0(0x108)])[_0x2003f0(0x120)](_0x2003f0(0xa2)),'personId':_0x3866d9['userId']};}else{const _0x8bd2df={'memberId':_0x4d61ed,'unitId':_0xfb1d8c,'content':_0x3dee94,'mention':_0x45359b},_0xbc05a1=await this[_0x2003f0(0xae)][_0x2003f0(0x11d)](_0x2003f0(0xb8)+_0xfb1d8c+_0x2003f0(0xec),{'body':_0x8bd2df});return _0x540b36(_0xbc05a1[_0x2003f0(0x114)][_0x2003f0(0x105)],_0x33c17f);}}async['updateComment'](_0x216524){const _0x239d6f=_0x22ef2d;var _0x2a396c,_0x12658a;const {text:_0x8dff5a,unitId:_0x55de92}=_0x216524,_0xceefc2=(_0x12658a=(_0x2a396c=_0x8dff5a[_0x239d6f(0xd2)])==null?void 0x0:_0x2a396c[_0x239d6f(0x10b)](_0x29ccc8=>_0x29ccc8[_0x239d6f(0xe6)]===_0x3cdc49['CustomRangeType'][_0x239d6f(0xfe)])[_0x239d6f(0xb1)](_0xdd228b=>_0xdd228b[_0x239d6f(0xee)]))!=null?_0x12658a:[],_0x9334b9=JSON[_0x239d6f(0xc4)](_0x8dff5a),_0x189a93=_0x216524[_0x239d6f(0xc1)],_0x21f80e=_0x216524['id'],_0x1c007a={'memberId':(await this[_0x239d6f(0xc6)]['requireSession'](_0x55de92))[_0x239d6f(0x109)](),'unitId':_0x55de92,'threadId':_0x189a93,'mention':_0xceefc2,'content':_0x9334b9,'replyId':_0x21f80e},_0x4b64f5=await this[_0x239d6f(0xae)]['post'](_0x239d6f(0xb8)+_0x55de92+_0x239d6f(0xd4),{'body':_0x1c007a});return!_0x4b64f5[_0x239d6f(0x114)][_0x239d6f(0xad)]||_0x4b64f5[_0x239d6f(0x114)][_0x239d6f(0xad)]['code']===0x1;}async[_0x22ef2d(0xeb)](_0x25a369){const _0x12d060=_0x22ef2d,{unitId:_0x219fb0}=_0x25a369,_0x265b82=_0x25a369[_0x12d060(0xc1)],_0x1f8b91={'memberId':this[_0x12d060(0xf1)][_0x12d060(0xd0)]()[_0x12d060(0xc3)],'unitId':_0x219fb0,'threadId':_0x265b82,'solved':_0x25a369[_0x12d060(0xdf)]?_0x4a6b33[_0x12d060(0xe2)]:_0x4a6b33[_0x12d060(0xe9)]},_0x355142=await this[_0x12d060(0xae)][_0x12d060(0x11d)](_0x12d060(0xb8)+_0x219fb0+_0x12d060(0xa0),{'body':_0x1f8b91});return!_0x355142['body'][_0x12d060(0xad)]||_0x355142['body'][_0x12d060(0xad)][_0x12d060(0x101)]===0x1;}async[_0x22ef2d(0xde)](_0x41d9e2,_0x265769,_0x32386f,_0xb24310){const _0x3e075d=_0x22ef2d,_0x5af01d={'memberId':(await this[_0x3e075d(0xc6)]['requireSession'](_0x41d9e2))[_0x3e075d(0x109)](),'threadId':_0x32386f,'replyId':_0xb24310,'unitId':_0x41d9e2},_0x163f22=await this[_0x3e075d(0xae)][_0x3e075d(0x11d)](_0x3e075d(0xb8)+_0x41d9e2+_0x3e075d(0xa8),{'body':_0x5af01d});return!_0x163f22['body']['error']||_0x163f22['body']['error']['code']===0x1;}async[_0x22ef2d(0xa5)](_0xce25fb,_0x235761,_0x3cddf){const _0x4b77d6=_0x22ef2d,_0x22cb08={'unitId':_0xce25fb,'threadId':_0x3cddf},_0x1c44f8=await this[_0x4b77d6(0xae)][_0x4b77d6(0x11d)]('/universer-api/comment/unit/'+_0xce25fb+'/list',{'body':_0x22cb08}),_0x582ce4=_0x3cddf['map'](_0x4de7d9=>_0x3e7c1c(_0x1c44f8[_0x4b77d6(0x114)][_0x4b77d6(0xf4)][_0x4de7d9],_0xce25fb,_0x235761))[_0x4b77d6(0x10b)](Boolean);return Object[_0x4b77d6(0xcd)](_0x1c44f8[_0x4b77d6(0x114)]['users'])[_0x4b77d6(0xfa)](_0x5a1761=>{this['_userService']['addUser'](_0x5a1761);}),_0x582ce4;}[_0x22ef2d(0x11e)](_0xbb34df){const _0x1a5b49=_0x22ef2d;return{'id':_0xbb34df['id'],'threadId':_0xbb34df[_0x1a5b49(0xc1)],'ref':_0xbb34df[_0x1a5b49(0xc8)]};}};_0x10936e=_0x5b507c([_0x415117(0x0,_0x3cdc49[_0x22ef2d(0x9e)](_0x30c585['HTTPService'])),_0x415117(0x1,_0x3cdc49[_0x22ef2d(0x9e)](_0x3cdc49[_0x22ef2d(0x9d)])),_0x415117(0x2,_0x3cdc49[_0x22ef2d(0x9e)](_0x300b34['CollaborationSessionService'])),_0x415117(0x3,_0x3cdc49['Inject'](_0x3cdc49[_0x22ef2d(0xf8)]))],_0x10936e);var _0x55fcc8=Object['getOwnPropertyDescriptor'],_0x520408=(_0x80d64a,_0x45f05e,_0xe41360,_0xefa7f2)=>{const _0xdaa1f5=_0x22ef2d;for(var _0x133619=_0xefa7f2>0x1?void 0x0:_0xefa7f2?_0x55fcc8(_0x45f05e,_0xe41360):_0x45f05e,_0x39961a=_0x80d64a[_0xdaa1f5(0xfd)]-0x1,_0x379c4c;_0x39961a>=0x0;_0x39961a--)(_0x379c4c=_0x80d64a[_0x39961a])&&(_0x133619=_0x379c4c(_0x133619)||_0x133619);return _0x133619;},_0x1367ec=(_0x2798a7,_0x74167e)=>(_0x2bd1d1,_0x574771)=>_0x74167e(_0x2bd1d1,_0x574771,_0x2798a7);let _0x761c63=class extends _0x3cdc49[_0x22ef2d(0x112)]{constructor(_0x1f1502,_0x39f247){const _0x1cf805=_0x22ef2d;super(),this[_0x1cf805(0x10e)]=_0x1f1502,this[_0x1cf805(0xb4)]=_0x39f247,this[_0x1cf805(0x10d)]();}[_0x22ef2d(0x10d)](){const _0x4e030b=_0x22ef2d;this[_0x4e030b(0x10e)][_0x4e030b(0xaf)]=this['_threadCommentDataSource'],this[_0x4e030b(0x10e)][_0x4e030b(0xfc)]=!0x1;}};_0x761c63=_0x520408([_0x1367ec(0x0,_0x22aef7['IThreadCommentDataSourceService']),_0x1367ec(0x1,_0x3cdc49['Inject'](_0x10936e))],_0x761c63);var _0x4e0a22=Object[_0x22ef2d(0x11a)],_0x3f7441=Object[_0x22ef2d(0xfb)],_0x3b4347=(_0x5d81ec,_0xa8fb9f,_0x1085ed)=>_0xa8fb9f in _0x5d81ec?_0x4e0a22(_0x5d81ec,_0xa8fb9f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1085ed}):_0x5d81ec[_0xa8fb9f]=_0x1085ed,_0x139375=(_0x7aa0b7,_0x321c17,_0x43c7c3,_0x1cf78d)=>{const _0x368722=_0x22ef2d;for(var _0x214c35=_0x1cf78d>0x1?void 0x0:_0x1cf78d?_0x3f7441(_0x321c17,_0x43c7c3):_0x321c17,_0x258670=_0x7aa0b7[_0x368722(0xfd)]-0x1,_0x504bfd;_0x258670>=0x0;_0x258670--)(_0x504bfd=_0x7aa0b7[_0x258670])&&(_0x214c35=_0x504bfd(_0x214c35)||_0x214c35);return _0x214c35;},_0x30af06=(_0xf3bd76,_0x5e97df)=>(_0x57bb93,_0x54f0e2)=>_0x5e97df(_0x57bb93,_0x54f0e2,_0xf3bd76),_0x3c7821=(_0x27ec5d,_0xe4cdce,_0x5bb0fd)=>_0x3b4347(_0x27ec5d,typeof _0xe4cdce!=_0x22ef2d(0xd1)?_0xe4cdce+'':_0xe4cdce,_0x5bb0fd);_0x297b9b[_0x22ef2d(0xd7)]=class extends _0x3cdc49[_0x22ef2d(0x115)]{constructor(_0x2ec829=_0x480c95,_0xcf5c50,_0x2dd7eb){const _0x586287=_0x22ef2d;super(),this[_0x586287(0xe3)]=_0x2ec829,this[_0x586287(0xf6)]=_0xcf5c50,this[_0x586287(0xa3)]=_0x2dd7eb;const {..._0x3002b3}=_0x3cdc49[_0x586287(0xab)]({},_0x480c95,this[_0x586287(0xe3)]);this[_0x586287(0xa3)]['setConfig'](_0x56ead5,_0x3002b3);}[_0x22ef2d(0xf3)](){const _0x44c31a=_0x22ef2d;[[_0x10936e],[_0x761c63],[_0x3b3e59]][_0x44c31a(0xfa)](_0x48c95c=>{const _0x346dc9=_0x44c31a;this['_injector'][_0x346dc9(0xd9)](_0x48c95c);});}[_0x22ef2d(0x9b)](){const _0x319d03=_0x22ef2d;this['_injector'][_0x319d03(0xe8)](_0x761c63),this['_injector']['get'](_0x3b3e59);}},_0x3c7821(_0x297b9b[_0x22ef2d(0xd7)],_0x22ef2d(0xb6),_0x2ea2d8),_0x3c7821(_0x297b9b['UniverThreadCommentDataSourcePlugin'],_0x22ef2d(0xbe),_0x3cdc49[_0x22ef2d(0xb2)][_0x22ef2d(0xca)]),_0x297b9b[_0x22ef2d(0xd7)]=_0x139375([_0x3cdc49['DependentOn'](_0x7573fa[_0x22ef2d(0xa4)],_0x300b34[_0x22ef2d(0xa7)],_0x327a90[_0x22ef2d(0xc2)]),_0x30af06(0x1,_0x3cdc49[_0x22ef2d(0x9e)](_0x3cdc49[_0x22ef2d(0xf8)])),_0x30af06(0x2,_0x3cdc49['IConfigService'])],_0x297b9b[_0x22ef2d(0xd7)]),Object[_0x22ef2d(0x11a)](_0x297b9b,Symbol[_0x22ef2d(0xac)],{'value':'Module'});}));function _0x412f(){const _0x15da1b=['replies','@univerjs/core','comment','amd','updateComment','createTimestamp','getMemberID','_commentService','filter','@univerjs/thread-comment-ui','_initDataSource','_threadCommentDataSourceService','4598430sFhZkI','UNRECOGNIZED','UniverNetwork','Disposable','user','body','Plugin','HTTPService','4908QGpooa','personId','root','defineProperty','requireSession','reply','post','saveCommentToSnapshot','find','format','onReady','users','UserManagerService','Inject','Delete','/solved','_threadCommentModel','YYYY/MM/DD\x20HH:mm','_configService','UniverThreadCommentUIPlugin','listComments','3087440djdaBr','UniverCollaborationClientPlugin','/delete','addUser','subscribe','merge','toStringTag','error','_httpService','dataSource','/reply','map','UniverInstanceType','Add','_threadCommentDataSource','7WwnBsD','pluginName','payload','/universer-api/comment/unit/','userId','_initUserSync','10095376twFfXc','content','exports','type','pipe','UniverThreadComment','threadId','UniverLicensePlugin','userID','stringify','5047335CmzhBX','_sessionService','getUnit','ref','parentId','UNIVER_UNKNOWN','rxjs','Unknown','values','ThreadCommentModel','function','getCurrentUser','symbol','customRanges','UniverProCollaborationClient','/edit','dayjs','UniverProLicense','UniverThreadCommentDataSourcePlugin','/universer-api/user/list','add','Solve','parse','581530otCbmC','3mLjBdQ','deleteComment','resolved','Reply','UniverCore','Solved','_config','40mJBkyP','@univerjs/thread-comment','rangeType','@univerjs/network','get','OpenOrReOpen','size','resolveComment','/add','CommentService','rangeId','delete','getComment','_userService','commentUpdate$','onStarting','comments','9343114IyJhKn','_injector','Edit','Injector','disposeWithMe','forEach','getOwnPropertyDescriptor','syncUpdateMutationToColla','length','COMMENT','replyId','CustomRangeType','code','4rRVrFX'];_0x412f=function(){return _0x15da1b;};return _0x412f();}
1
+ function _0x144e(_0x5da490,_0x3b2b93){const _0x58681b=_0x5868();return _0x144e=function(_0x144e43,_0x579c0a){_0x144e43=_0x144e43-0x11b;let _0x4fe74c=_0x58681b[_0x144e43];return _0x4fe74c;},_0x144e(_0x5da490,_0x3b2b93);}function _0x5868(){const _0x2c62cd=['Solved','_config','onStarting','CustomRangeType','Reply','values','map','UniverThreadCommentDataSourcePlugin','273xeQsBR','UniverNetwork','users','parse','replies','CommentService','createTimestamp','Add','rangeId','DependentOn','body','UniverProLicense','_threadCommentDataSourceService','deleteComment','getOwnPropertyDescriptor','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_httpService','YYYY/MM/DD\x20HH:mm','userId','addUser','reply','_init','ref','merge','_injector','dayjs','5rXmnaQ','amd','post','CollaborationSessionService','exports','filter','bufferTime','saveCommentToSnapshot','object','COMMENT','getComment','user','toStringTag','/list','getCurrentUser','size','addComment','get','type','UniverProCollaborationClient','updateComment','error','comment','/universer-api/comment/unit/','Plugin','forEach','listComments','customRanges','root','requireSession','Disposable','pluginName','subscribe','slice','3677052QzxaML','10VOQAkj','delete','replyId','resolved','UniverProThreadCommentDatasource','OpenOrReOpen','/solved','Edit','setConfig','64716RslTfQ','personId','UniverThreadCommentUi','Injector','@univerjs-pro/collaboration-client','_initDataSource','UserManagerService','_userService','Solve','defineProperty','1368YFIlIc','@univerjs/network','UNRECOGNIZED','Module','11034126BwrxHB','HTTPService','/reply','/universer-api/user/list','dataSource','UniverThreadCommentUIPlugin','solved','disposeWithMe','_commentService','code','getMemberID','3442802NTzETH','UNIVER_UNKNOWN','parentId','_configService','_threadCommentDataSource','payload','rangeType','Inject','syncUpdateMutationToColla','length','_sessionService','threadId','64519TYTFzW','userID','rxjs','_threadCommentModel','@univerjs-pro/license','UniverCore','IThreadCommentDataSourceService','@univerjs/core','12CdeURU','Unknown','resolveComment','comments','_initUserSync','1629267RREtYT','stringify','@univerjs/thread-comment-ui','getUnit','Delete','add','find','commentUpdate$','25269673ynAwDC','content'];_0x5868=function(){return _0x2c62cd;};return _0x5868();}(function(_0x30f443,_0x32520b){const _0x3585fc=_0x144e,_0x301b34=_0x30f443();while(!![]){try{const _0x3245b4=parseInt(_0x3585fc(0x121))/0x1+-parseInt(_0x3585fc(0x193))/0x2+-parseInt(_0x3585fc(0x133))/0x3*(parseInt(_0x3585fc(0x17a))/0x4)+parseInt(_0x3585fc(0x14e))/0x5*(parseInt(_0x3585fc(0x170))/0x6)+parseInt(_0x3585fc(0x19f))/0x7*(-parseInt(_0x3585fc(0x184))/0x8)+parseInt(_0x3585fc(0x188))/0x9*(parseInt(_0x3585fc(0x171))/0xa)+parseInt(_0x3585fc(0x129))/0xb*(parseInt(_0x3585fc(0x11c))/0xc);if(_0x3245b4===_0x32520b)break;else _0x301b34['push'](_0x301b34['shift']());}catch(_0x38f0d4){_0x301b34['push'](_0x301b34['shift']());}}}(_0x5868,0xf30f1),function(_0x7e8278,_0x2d4a1c){const _0x3793be=_0x144e;typeof exports==_0x3793be(0x156)&&typeof module<'u'?_0x2d4a1c(exports,require(_0x3793be(0x17e)),require(_0x3793be(0x1a3)),require('@univerjs/core'),require(_0x3793be(0x123)),require('@univerjs/thread-comment'),require(_0x3793be(0x1a1)),require(_0x3793be(0x185))):typeof define=='function'&&define[_0x3793be(0x14f)]?define([_0x3793be(0x152),_0x3793be(0x17e),_0x3793be(0x1a3),_0x3793be(0x11b),_0x3793be(0x123),'@univerjs/thread-comment',_0x3793be(0x1a1),_0x3793be(0x185)],_0x2d4a1c):(_0x7e8278=typeof globalThis<'u'?globalThis:_0x7e8278||self,_0x2d4a1c(_0x7e8278[_0x3793be(0x175)]={},_0x7e8278[_0x3793be(0x161)],_0x7e8278[_0x3793be(0x13e)],_0x7e8278[_0x3793be(0x1a4)],_0x7e8278[_0x3793be(0x17c)],_0x7e8278['UniverThreadComment'],_0x7e8278['rxjs'],_0x7e8278[_0x3793be(0x134)]));}(this,function(_0x52fcf5,_0x460bf4,_0x3b803c,_0x533f59,_0x374430,_0x3271af,_0x1d0038,_0x57e286){'use strict';const _0x2386f2=_0x144e;const _0x3d6877=_0x2386f2(0x143);var _0x459f91=(_0x2b496f=>(_0x2b496f[_0x2b496f[_0x2386f2(0x176)]=0x0]=_0x2386f2(0x176),_0x2b496f[_0x2b496f[_0x2386f2(0x12b)]=0x1]='Solved',_0x2b496f[_0x2b496f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2b496f))(_0x459f91||{}),_0x84442c=(_0x61b418=>(_0x61b418[_0x61b418[_0x2386f2(0x11d)]=0x0]=_0x2386f2(0x11d),_0x61b418[_0x61b418[_0x2386f2(0x13a)]=0x1]='Add',_0x61b418[_0x61b418['Reply']=0x2]=_0x2386f2(0x12f),_0x61b418[_0x61b418['Edit']=0x3]='Edit',_0x61b418[_0x61b418[_0x2386f2(0x125)]=0x4]='Delete',_0x61b418[_0x61b418[_0x2386f2(0x182)]=0x5]=_0x2386f2(0x182),_0x61b418[_0x61b418[_0x2386f2(0x186)]=-0x1]=_0x2386f2(0x186),_0x61b418))(_0x84442c||{});const _0x4dace6=_0x1acd73=>_0x533f59[_0x2386f2(0x14d)](new Date(+_0x1acd73))['format'](_0x2386f2(0x145)),_0x2f3f71=async(_0x4c44ff,_0x18c701)=>{const _0x2982de=_0x2386f2,_0x29596a=_0x4c44ff[_0x2982de(0x15f)](_0x533f59[_0x2982de(0x180)]),_0x2012d8=_0x4c44ff[_0x2982de(0x15f)](_0x57e286[_0x2982de(0x189)]);_0x18c701[_0x2982de(0x167)](_0x120917=>{const _0x556330=_0x2982de;_0x29596a['getUser'](_0x120917)&&_0x18c701[_0x556330(0x172)](_0x120917);}),_0x18c701[_0x2982de(0x15d)]&&(await _0x2012d8[_0x2982de(0x15f)](_0x2982de(0x18b),{'params':{'userIDs':[..._0x18c701]}}))[_0x2982de(0x13d)][_0x2982de(0x135)]['forEach'](_0x4ed85b=>{const _0x4f4c7a=_0x2982de;_0x4ed85b&&_0x29596a[_0x4f4c7a(0x147)](_0x4ed85b);});};var _0x5a889f=Object[_0x2386f2(0x141)],_0x1017d3=(_0x50197a,_0x424c7b,_0xc08815,_0x1f61ca)=>{for(var _0x47b1a9=_0x1f61ca>0x1?void 0x0:_0x1f61ca?_0x5a889f(_0x424c7b,_0xc08815):_0x424c7b,_0x3a703d=_0x50197a['length']-0x1,_0x54cff3;_0x3a703d>=0x0;_0x3a703d--)(_0x54cff3=_0x50197a[_0x3a703d])&&(_0x47b1a9=_0x54cff3(_0x47b1a9)||_0x47b1a9);return _0x47b1a9;},_0x5d3c09=(_0x5c79cc,_0x1b509c)=>(_0x1ae58d,_0x1a83cb)=>_0x1b509c(_0x1ae58d,_0x1a83cb,_0x5c79cc);let _0x263cbc=class extends _0x533f59[_0x2386f2(0x16c)]{constructor(_0xc9a493,_0x4148e9,_0x34c174,_0x30effe){const _0x4c7d3c=_0x2386f2;super(),this[_0x4c7d3c(0x190)]=_0xc9a493,this[_0x4c7d3c(0x1a2)]=_0x4148e9,this[_0x4c7d3c(0x181)]=_0x34c174,this['_injector']=_0x30effe,this[_0x4c7d3c(0x149)](),this[_0x4c7d3c(0x120)]();}[_0x2386f2(0x120)](){const _0x32e899=_0x2386f2;this['disposeWithMe'](this['_threadCommentModel'][_0x32e899(0x128)]['pipe'](_0x1d0038[_0x32e899(0x154)](0x10))[_0x32e899(0x16e)](_0xed4857=>{const _0x105050=_0x32e899,_0x3f1c3c=new Set();_0xed4857[_0x105050(0x167)](_0x5a94bf=>{const _0x1ff796=_0x105050;switch(_0x5a94bf['type']){case _0x1ff796(0x126):{const _0x48b069=_0x5a94bf[_0x1ff796(0x198)][_0x1ff796(0x17b)];_0x3f1c3c['add'](_0x48b069);break;}}}),_0x2f3f71(this[_0x105050(0x14c)],_0x3f1c3c);}));}[_0x2386f2(0x149)](){const _0x7ee1ac=_0x2386f2;this[_0x7ee1ac(0x18f)](this[_0x7ee1ac(0x190)][_0x7ee1ac(0x128)][_0x7ee1ac(0x16e)](async _0x405cdc=>{const _0x1da5fc=_0x7ee1ac;var _0x2e6ec4,_0x3ef01e,_0x3d6e3a,_0x2d7f59;const _0x54d233=(_0x2e6ec4=this[_0x1da5fc(0x1a2)][_0x1da5fc(0x124)](_0x405cdc[_0x1da5fc(0x142)])[_0x1da5fc(0x127)](_0x9f3afb=>_0x9f3afb['threadId']===_0x405cdc[_0x1da5fc(0x19e)]))==null?void 0x0:_0x2e6ec4[_0x1da5fc(0x16a)];if(!_0x54d233)return;const {unitId:_0xd35bd8,subUnitId:_0x289a41}=_0x54d233;switch(_0x405cdc[_0x1da5fc(0x159)]&&this['_userService'][_0x1da5fc(0x147)](_0x405cdc[_0x1da5fc(0x159)]),_0x405cdc[_0x1da5fc(0x160)]){case _0x84442c[_0x1da5fc(0x13a)]:break;case _0x84442c[_0x1da5fc(0x12f)]:{this[_0x1da5fc(0x1a2)][_0x1da5fc(0x15e)](_0xd35bd8,_0x289a41,{'unitId':_0xd35bd8,'subUnitId':_0x289a41,'ref':'','id':_0x405cdc[_0x1da5fc(0x173)],'dT':_0x4dace6(+_0x405cdc[_0x1da5fc(0x139)]),'threadId':_0x405cdc[_0x1da5fc(0x19e)],'personId':(_0x3d6e3a=(_0x3ef01e=_0x405cdc[_0x1da5fc(0x159)])==null?void 0x0:_0x3ef01e[_0x1da5fc(0x1a0)])!=null?_0x3d6e3a:_0x405cdc[_0x1da5fc(0x146)],'text':JSON[_0x1da5fc(0x136)](_0x405cdc[_0x1da5fc(0x12a)]),'parentId':_0x54d233['id']});break;}case _0x84442c['Delete']:{const _0x5942da=this['_threadCommentModel'][_0x1da5fc(0x158)](_0xd35bd8,_0x289a41,_0x405cdc[_0x1da5fc(0x173)]);_0x5942da&&_0x5942da[_0x1da5fc(0x195)]&&this['_threadCommentModel'][_0x1da5fc(0x140)](_0xd35bd8,_0x289a41,_0x405cdc['replyId']);break;}case _0x84442c[_0x1da5fc(0x178)]:{this[_0x1da5fc(0x1a2)][_0x1da5fc(0x162)](_0xd35bd8,_0x289a41,{'commentId':_0x405cdc[_0x1da5fc(0x173)],'text':JSON[_0x1da5fc(0x136)](_0x405cdc['content'])});break;}case _0x84442c[_0x1da5fc(0x182)]:{const _0x585260=(_0x2d7f59=this['_threadCommentModel'][_0x1da5fc(0x124)](_0x405cdc['unitId'])[_0x1da5fc(0x127)](_0x5be8e6=>_0x5be8e6[_0x1da5fc(0x19e)]===_0x405cdc[_0x1da5fc(0x19e)]))==null?void 0x0:_0x2d7f59['root'];_0x585260&&this[_0x1da5fc(0x1a2)]['resolveComment'](_0xd35bd8,_0x289a41,_0x585260['id'],_0x405cdc[_0x1da5fc(0x18e)]===_0x459f91[_0x1da5fc(0x12b)]);break;}}}));}};_0x263cbc=_0x1017d3([_0x5d3c09(0x0,_0x533f59[_0x2386f2(0x19a)](_0x460bf4[_0x2386f2(0x138)])),_0x5d3c09(0x1,_0x533f59[_0x2386f2(0x19a)](_0x3271af['ThreadCommentModel'])),_0x5d3c09(0x2,_0x533f59[_0x2386f2(0x19a)](_0x533f59['UserManagerService'])),_0x5d3c09(0x3,_0x533f59['Inject'](_0x533f59['Injector']))],_0x263cbc);const _0x400adb='thread-comment-data-source.config',_0x14bcf8={};var _0x4358da=Object[_0x2386f2(0x141)],_0x282d75=(_0x1387f2,_0x12c240,_0x45f8aa,_0xd662af)=>{for(var _0x57e31c=_0xd662af>0x1?void 0x0:_0xd662af?_0x4358da(_0x12c240,_0x45f8aa):_0x12c240,_0x2cccdf=_0x1387f2['length']-0x1,_0x418287;_0x2cccdf>=0x0;_0x2cccdf--)(_0x418287=_0x1387f2[_0x2cccdf])&&(_0x57e31c=_0x418287(_0x57e31c)||_0x57e31c);return _0x57e31c;},_0x162e0f=(_0xd841c3,_0x25e74e)=>(_0x48b2dc,_0x14a1d6)=>_0x25e74e(_0x48b2dc,_0x14a1d6,_0xd841c3);function _0x28e354(_0x50f178,_0x5cb8d7){const _0x164757=_0x2386f2,_0x154998=_0x50f178[_0x164757(0x137)][0x0];return{..._0x5cb8d7,'id':_0x154998['replyId'],'resolved':_0x50f178[_0x164757(0x18e)]===0x1,'dT':_0x4dace6(_0x154998['createTimestamp']),'personId':_0x154998['userId'],'threadId':_0x154998[_0x164757(0x19e)]};}function _0x245674(_0x505be3,_0x18b5ba,_0x4711a6){const _0x430009=_0x2386f2;var _0x393384,_0x13aeab;if(((_0x13aeab=(_0x393384=_0x505be3==null?void 0x0:_0x505be3[_0x430009(0x137)])==null?void 0x0:_0x393384[_0x430009(0x19c)])!=null?_0x13aeab:0x0)>0x0){const _0x49f296=(_0x1faeeb,_0xd6642)=>({'id':_0x1faeeb[_0x430009(0x173)],'threadId':_0x1faeeb[_0x430009(0x19e)],'dT':_0x4dace6(_0x1faeeb[_0x430009(0x139)]),'personId':_0x1faeeb[_0x430009(0x146)],'resolved':_0x505be3[_0x430009(0x18e)]===_0x459f91[_0x430009(0x12b)],'unitId':_0x18b5ba,'subUnitId':_0x4711a6,'text':JSON['parse'](_0x1faeeb[_0x430009(0x12a)]),'parentId':_0xd6642}),_0x4b4b9a=_0x49f296(_0x505be3[_0x430009(0x137)][0x0]);return{..._0x4b4b9a,'children':_0x505be3[_0x430009(0x137)][_0x430009(0x16f)](0x1)[_0x430009(0x131)](_0x329db7=>_0x49f296(_0x329db7,_0x4b4b9a['id']))};}return null;}let _0x48590c=class{constructor(_0x2fd508,_0x395f10,_0x368e3d,_0x592b78){const _0x398a93=_0x2386f2;this[_0x398a93(0x144)]=_0x2fd508,this['_userService']=_0x395f10,this['_sessionService']=_0x368e3d,this['_injector']=_0x592b78;}async[_0x2386f2(0x15e)](_0x162e4d){const _0x11a6c0=_0x2386f2;var _0x540377,_0x37f56b;const {parentId:_0x4fdf33,unitId:_0x2f3531,text:_0x57b59f,threadId:_0x43135a}=_0x162e4d,_0x45d8cc=(_0x37f56b=(_0x540377=_0x57b59f[_0x11a6c0(0x169)])==null?void 0x0:_0x540377[_0x11a6c0(0x153)](_0x41b6c8=>_0x41b6c8[_0x11a6c0(0x199)]===_0x533f59['CustomRangeType'][_0x11a6c0(0x157)])[_0x11a6c0(0x131)](_0x4bcff5=>_0x4bcff5[_0x11a6c0(0x13b)]))!=null?_0x37f56b:[],_0x178236=JSON[_0x11a6c0(0x122)](_0x57b59f),_0x2c782d=(await this[_0x11a6c0(0x19d)][_0x11a6c0(0x16b)](_0x2f3531))[_0x11a6c0(0x192)]();if(_0x4fdf33){const _0x1f4fab={'memberId':_0x2c782d,'unitId':_0x2f3531,'content':_0x178236,'mention':_0x45d8cc,'threadId':_0x43135a},_0x208fab=(await this[_0x11a6c0(0x144)][_0x11a6c0(0x150)]('/universer-api/comment/unit/'+_0x2f3531+_0x11a6c0(0x18a),{'body':_0x1f4fab}))[_0x11a6c0(0x13d)][_0x11a6c0(0x148)];return{..._0x162e4d,'id':_0x208fab[_0x11a6c0(0x173)],'dT':_0x533f59[_0x11a6c0(0x14d)](+_0x208fab[_0x11a6c0(0x139)])['format'](_0x11a6c0(0x145)),'personId':_0x208fab[_0x11a6c0(0x146)]};}else{const _0x299f9c={'memberId':_0x2c782d,'unitId':_0x2f3531,'content':_0x178236,'mention':_0x45d8cc},_0x113cb2=await this[_0x11a6c0(0x144)][_0x11a6c0(0x150)](_0x11a6c0(0x165)+_0x2f3531+'/add',{'body':_0x299f9c});return _0x28e354(_0x113cb2[_0x11a6c0(0x13d)][_0x11a6c0(0x164)],_0x162e4d);}}async[_0x2386f2(0x162)](_0x287dc5){const _0x5dfd0d=_0x2386f2;var _0x8f3cf4,_0x2f0cb1;const {text:_0xf5b636,unitId:_0x5a8a0e}=_0x287dc5,_0x2dc080=(_0x2f0cb1=(_0x8f3cf4=_0xf5b636[_0x5dfd0d(0x169)])==null?void 0x0:_0x8f3cf4[_0x5dfd0d(0x153)](_0xc2c3b1=>_0xc2c3b1[_0x5dfd0d(0x199)]===_0x533f59[_0x5dfd0d(0x12e)]['COMMENT'])[_0x5dfd0d(0x131)](_0x313874=>_0x313874[_0x5dfd0d(0x13b)]))!=null?_0x2f0cb1:[],_0x4769f2=JSON[_0x5dfd0d(0x122)](_0xf5b636),_0x541115=_0x287dc5[_0x5dfd0d(0x19e)],_0x2d581c=_0x287dc5['id'],_0x5c02b7={'memberId':(await this['_sessionService']['requireSession'](_0x5a8a0e))[_0x5dfd0d(0x192)](),'unitId':_0x5a8a0e,'threadId':_0x541115,'mention':_0x2dc080,'content':_0x4769f2,'replyId':_0x2d581c},_0x2eb59c=await this[_0x5dfd0d(0x144)][_0x5dfd0d(0x150)](_0x5dfd0d(0x165)+_0x5a8a0e+'/edit',{'body':_0x5c02b7});return!_0x2eb59c[_0x5dfd0d(0x13d)][_0x5dfd0d(0x163)]||_0x2eb59c[_0x5dfd0d(0x13d)]['error'][_0x5dfd0d(0x191)]===0x1;}async[_0x2386f2(0x11e)](_0x21aea6){const _0x3123d7=_0x2386f2,{unitId:_0x4da0ce}=_0x21aea6,_0x199f1d=_0x21aea6[_0x3123d7(0x19e)],_0x44681a={'memberId':this['_userService'][_0x3123d7(0x15c)]()['userID'],'unitId':_0x4da0ce,'threadId':_0x199f1d,'solved':_0x21aea6[_0x3123d7(0x174)]?_0x459f91[_0x3123d7(0x12b)]:_0x459f91['OpenOrReOpen']},_0x302cd0=await this['_httpService'][_0x3123d7(0x150)](_0x3123d7(0x165)+_0x4da0ce+_0x3123d7(0x177),{'body':_0x44681a});return!_0x302cd0[_0x3123d7(0x13d)][_0x3123d7(0x163)]||_0x302cd0[_0x3123d7(0x13d)][_0x3123d7(0x163)][_0x3123d7(0x191)]===0x1;}async[_0x2386f2(0x140)](_0x30a1d7,_0x3314fb,_0x31b129,_0x424c42){const _0x451a23=_0x2386f2,_0x3d5773={'memberId':(await this[_0x451a23(0x19d)][_0x451a23(0x16b)](_0x30a1d7))[_0x451a23(0x192)](),'threadId':_0x31b129,'replyId':_0x424c42,'unitId':_0x30a1d7},_0x10783c=await this['_httpService'][_0x451a23(0x150)](_0x451a23(0x165)+_0x30a1d7+'/delete',{'body':_0x3d5773});return!_0x10783c['body'][_0x451a23(0x163)]||_0x10783c[_0x451a23(0x13d)]['error'][_0x451a23(0x191)]===0x1;}async[_0x2386f2(0x168)](_0x21b6db,_0x2d656b,_0x59ce0a){const _0x34e14e=_0x2386f2,_0x5d595d={'unitId':_0x21b6db,'threadId':_0x59ce0a},_0x2d09c6=await this[_0x34e14e(0x144)][_0x34e14e(0x150)](_0x34e14e(0x165)+_0x21b6db+_0x34e14e(0x15b),{'body':_0x5d595d}),_0x5c3270=_0x59ce0a[_0x34e14e(0x131)](_0x233dcb=>_0x245674(_0x2d09c6['body'][_0x34e14e(0x11f)][_0x233dcb],_0x21b6db,_0x2d656b))['filter'](Boolean);return Object[_0x34e14e(0x130)](_0x2d09c6[_0x34e14e(0x13d)][_0x34e14e(0x135)])['forEach'](_0x52b848=>{const _0x4aaf01=_0x34e14e;this[_0x4aaf01(0x181)][_0x4aaf01(0x147)](_0x52b848);}),_0x5c3270;}[_0x2386f2(0x155)](_0x19b81a){const _0x11c25c=_0x2386f2;return{'id':_0x19b81a['id'],'threadId':_0x19b81a[_0x11c25c(0x19e)],'ref':_0x19b81a[_0x11c25c(0x14a)]};}};_0x48590c=_0x282d75([_0x162e0f(0x0,_0x533f59[_0x2386f2(0x19a)](_0x57e286[_0x2386f2(0x189)])),_0x162e0f(0x1,_0x533f59[_0x2386f2(0x19a)](_0x533f59[_0x2386f2(0x180)])),_0x162e0f(0x2,_0x533f59[_0x2386f2(0x19a)](_0x460bf4[_0x2386f2(0x151)])),_0x162e0f(0x3,_0x533f59[_0x2386f2(0x19a)](_0x533f59[_0x2386f2(0x17d)]))],_0x48590c);var _0x3a80ec=Object[_0x2386f2(0x141)],_0x1fe58b=(_0x426c80,_0x45ac1d,_0x3d9df2,_0x1f7684)=>{const _0x2f8a41=_0x2386f2;for(var _0x562714=_0x1f7684>0x1?void 0x0:_0x1f7684?_0x3a80ec(_0x45ac1d,_0x3d9df2):_0x45ac1d,_0x5e4d0d=_0x426c80[_0x2f8a41(0x19c)]-0x1,_0x4c0df6;_0x5e4d0d>=0x0;_0x5e4d0d--)(_0x4c0df6=_0x426c80[_0x5e4d0d])&&(_0x562714=_0x4c0df6(_0x562714)||_0x562714);return _0x562714;},_0x353c57=(_0x3bddc3,_0x3f777d)=>(_0x341426,_0x17fad9)=>_0x3f777d(_0x341426,_0x17fad9,_0x3bddc3);let _0x236d90=class extends _0x533f59['Disposable']{constructor(_0x728e00,_0x3ee7f0){const _0x2a5f58=_0x2386f2;super(),this[_0x2a5f58(0x13f)]=_0x728e00,this[_0x2a5f58(0x197)]=_0x3ee7f0,this[_0x2a5f58(0x17f)]();}[_0x2386f2(0x17f)](){const _0x5aa5ab=_0x2386f2;this['_threadCommentDataSourceService'][_0x5aa5ab(0x18c)]=this['_threadCommentDataSource'],this[_0x5aa5ab(0x13f)][_0x5aa5ab(0x19b)]=!0x1;}};_0x236d90=_0x1fe58b([_0x353c57(0x0,_0x3271af[_0x2386f2(0x1a5)]),_0x353c57(0x1,_0x533f59[_0x2386f2(0x19a)](_0x48590c))],_0x236d90);var _0x145173=Object[_0x2386f2(0x183)],_0x56b775=Object[_0x2386f2(0x141)],_0x357519=(_0x405743,_0x1815ea,_0x256757)=>_0x1815ea in _0x405743?_0x145173(_0x405743,_0x1815ea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x256757}):_0x405743[_0x1815ea]=_0x256757,_0x3579d8=(_0x3967d0,_0x2a84ab,_0xf6c7de,_0x22b5ab)=>{const _0x1665cd=_0x2386f2;for(var _0x40fa8e=_0x22b5ab>0x1?void 0x0:_0x22b5ab?_0x56b775(_0x2a84ab,_0xf6c7de):_0x2a84ab,_0x263861=_0x3967d0[_0x1665cd(0x19c)]-0x1,_0x5c8c4e;_0x263861>=0x0;_0x263861--)(_0x5c8c4e=_0x3967d0[_0x263861])&&(_0x40fa8e=_0x5c8c4e(_0x40fa8e)||_0x40fa8e);return _0x40fa8e;},_0x5f22ad=(_0x53159c,_0x2dedfa)=>(_0x44fb77,_0xbae929)=>_0x2dedfa(_0x44fb77,_0xbae929,_0x53159c),_0x3982ad=(_0x5ee866,_0xceede4,_0x5147ec)=>_0x357519(_0x5ee866,typeof _0xceede4!='symbol'?_0xceede4+'':_0xceede4,_0x5147ec);_0x52fcf5['UniverThreadCommentDataSourcePlugin']=class extends _0x533f59[_0x2386f2(0x166)]{constructor(_0x178b68=_0x14bcf8,_0x1e159f,_0x21ef8e){const _0x234528=_0x2386f2;super(),this[_0x234528(0x12c)]=_0x178b68,this['_injector']=_0x1e159f,this['_configService']=_0x21ef8e;const {..._0x20c222}=_0x533f59[_0x234528(0x14b)]({},_0x14bcf8,this[_0x234528(0x12c)]);this[_0x234528(0x196)][_0x234528(0x179)](_0x400adb,_0x20c222);}[_0x2386f2(0x12d)](){const _0x176332=_0x2386f2;[[_0x48590c],[_0x236d90],[_0x263cbc]][_0x176332(0x167)](_0x3f41b5=>{const _0x2e9ad3=_0x176332;this[_0x2e9ad3(0x14c)]['add'](_0x3f41b5);});}['onReady'](){const _0x4aee00=_0x2386f2;this[_0x4aee00(0x14c)]['get'](_0x236d90),this['_injector'][_0x4aee00(0x15f)](_0x263cbc);}},_0x3982ad(_0x52fcf5[_0x2386f2(0x132)],_0x2386f2(0x16d),_0x3d6877),_0x3982ad(_0x52fcf5[_0x2386f2(0x132)],_0x2386f2(0x160),_0x533f59['UniverInstanceType'][_0x2386f2(0x194)]),_0x52fcf5[_0x2386f2(0x132)]=_0x3579d8([_0x533f59[_0x2386f2(0x13c)](_0x374430[_0x2386f2(0x18d)],_0x460bf4['UniverCollaborationClientPlugin'],_0x3b803c['UniverLicensePlugin']),_0x5f22ad(0x1,_0x533f59[_0x2386f2(0x19a)](_0x533f59[_0x2386f2(0x17d)])),_0x5f22ad(0x2,_0x533f59['IConfigService'])],_0x52fcf5['UniverThreadCommentDataSourcePlugin']),Object[_0x2386f2(0x183)](_0x52fcf5,Symbol[_0x2386f2(0x15a)],{'value':_0x2386f2(0x187)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202505181606",
3
+ "version": "0.7.0-nightly.202505191607",
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.202505181606",
49
- "@univerjs/core": "0.7.0-nightly.202505181606",
50
- "@univerjs/network": "0.7.0-nightly.202505181606",
48
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505191607",
49
+ "@univerjs-pro/license": "0.7.0-nightly.202505191607",
50
+ "@univerjs/network": "0.7.0-nightly.202505191607",
51
+ "@univerjs/core": "0.7.0-nightly.202505191607",
51
52
  "@univerjs/protocol": "0.1.46-alpha.3",
52
- "@univerjs/thread-comment": "0.7.0-nightly.202505181606",
53
- "@univerjs-pro/license": "0.7.0-nightly.202505181606",
54
- "@univerjs/thread-comment-ui": "0.7.0-nightly.202505181606"
53
+ "@univerjs/thread-comment": "0.7.0-nightly.202505191607",
54
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202505191607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",