@univerjs-pro/thread-comment-datasource 0.15.0-insiders.20260108-47c73e3 → 0.15.0-insiders.20260110-48b77c8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x312a7d=_0x35da;function _0x35da(_0x4874e9,_0x61138f){_0x4874e9=_0x4874e9-0x17d;const _0x446c33=_0x446c();let _0x35dafc=_0x446c33[_0x4874e9];return _0x35dafc;}(function(_0x536a05,_0x2ea5b6){const _0x16ac23=_0x35da,_0x3f9a69=_0x536a05();while(!![]){try{const _0x52b06b=-parseInt(_0x16ac23(0x17e))/0x1+-parseInt(_0x16ac23(0x1f1))/0x2*(-parseInt(_0x16ac23(0x1d0))/0x3)+parseInt(_0x16ac23(0x1a7))/0x4+-parseInt(_0x16ac23(0x1ee))/0x5+-parseInt(_0x16ac23(0x181))/0x6*(parseInt(_0x16ac23(0x18f))/0x7)+-parseInt(_0x16ac23(0x18a))/0x8+parseInt(_0x16ac23(0x1bc))/0x9;if(_0x52b06b===_0x2ea5b6)break;else _0x3f9a69['push'](_0x3f9a69['shift']());}catch(_0x268693){_0x3f9a69['push'](_0x3f9a69['shift']());}}}(_0x446c,0x2d0ff));Object[_0x312a7d(0x1e3)](exports,Symbol[_0x312a7d(0x1c7)],{'value':_0x312a7d(0x190)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x312a7d(0x1b3);var I=(_0x16f94d=>(_0x16f94d[_0x16f94d[_0x312a7d(0x1d1)]=0x0]=_0x312a7d(0x1d1),_0x16f94d[_0x16f94d['Solved']=0x1]=_0x312a7d(0x1a2),_0x16f94d[_0x16f94d[_0x312a7d(0x1dc)]=-0x1]=_0x312a7d(0x1dc),_0x16f94d))(I||{}),v=(_0x56a688=>(_0x56a688[_0x56a688[_0x312a7d(0x187)]=0x0]='Unknown',_0x56a688[_0x56a688[_0x312a7d(0x1ec)]=0x1]=_0x312a7d(0x1ec),_0x56a688[_0x56a688[_0x312a7d(0x1c3)]=0x2]='Reply',_0x56a688[_0x56a688[_0x312a7d(0x193)]=0x3]=_0x312a7d(0x193),_0x56a688[_0x56a688[_0x312a7d(0x188)]=0x4]=_0x312a7d(0x188),_0x56a688[_0x56a688[_0x312a7d(0x1c8)]=0x5]=_0x312a7d(0x1c8),_0x56a688[_0x56a688[_0x312a7d(0x1dc)]=-0x1]='UNRECOGNIZED',_0x56a688))(v||{});const f=_0x36b702=>c['dayjs'](new Date(+_0x36b702))[_0x312a7d(0x1ae)](_0x312a7d(0x19c)),R=async(_0x12bd34,_0x48c5e3)=>{const _0x133b84=_0x312a7d,_0x1f47d2=_0x12bd34['get'](c[_0x133b84(0x1a4)]),_0x3a31b5=_0x12bd34[_0x133b84(0x1f4)](P[_0x133b84(0x1de)]);_0x48c5e3[_0x133b84(0x1ef)](_0x17d063=>{const _0x370ff3=_0x133b84;_0x1f47d2['getUser'](_0x17d063)&&_0x48c5e3[_0x370ff3(0x1cf)](_0x17d063);}),_0x48c5e3['size']&&(await _0x3a31b5[_0x133b84(0x1f4)]('/universer-api/user/list',{'params':{'userIDs':[..._0x48c5e3]}}))[_0x133b84(0x1f2)][_0x133b84(0x1c1)][_0x133b84(0x1ef)](_0x54c650=>{const _0x3608a1=_0x133b84;_0x54c650&&_0x1f47d2[_0x3608a1(0x18e)](_0x54c650);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x5d3f95,_0x3669bb,_0x3aa592,_0x405786)=>{const _0x5f1ad0=_0x312a7d;for(var _0x34674d=_0x405786>0x1?void 0x0:_0x405786?$(_0x3669bb,_0x3aa592):_0x3669bb,_0x4a5d88=_0x5d3f95[_0x5f1ad0(0x1e0)]-0x1,_0x5597eb;_0x4a5d88>=0x0;_0x4a5d88--)(_0x5597eb=_0x5d3f95[_0x4a5d88])&&(_0x34674d=_0x5597eb(_0x34674d)||_0x34674d);return _0x34674d;},S=(_0x3ff4d6,_0x57f580)=>(_0x9f36bf,_0x103e77)=>_0x57f580(_0x9f36bf,_0x103e77,_0x3ff4d6);let _=class extends c['Disposable']{constructor(_0x87ad02,_0x5e4271,_0x2835fc,_0x17793f){const _0x1b87ef=_0x312a7d;super(),this['_commentService']=_0x87ad02,this[_0x1b87ef(0x1b0)]=_0x5e4271,this['_userService']=_0x2835fc,this[_0x1b87ef(0x1c5)]=_0x17793f,this[_0x1b87ef(0x185)](),this['_initUserSync']();}[_0x312a7d(0x199)](){const _0x36eec5=_0x312a7d;this[_0x36eec5(0x1e1)](this['_threadCommentModel'][_0x36eec5(0x1b2)][_0x36eec5(0x1b7)](j[_0x36eec5(0x191)](0x10))['subscribe'](_0x11eb9b=>{const _0x328872=_0x36eec5,_0x4cef1e=new Set();_0x11eb9b[_0x328872(0x1ef)](_0x11ba41=>{const _0xacd924=_0x328872;if(_0x11ba41[_0xacd924(0x1e4)]===_0xacd924(0x1da)){const _0x2f0490=_0x11ba41[_0xacd924(0x189)][_0xacd924(0x19f)];_0x4cef1e[_0xacd924(0x1da)](_0x2f0490);}}),R(this[_0x328872(0x1c5)],_0x4cef1e);}));}['_init'](){const _0x54ea06=_0x312a7d;this[_0x54ea06(0x1e1)](this[_0x54ea06(0x1ba)][_0x54ea06(0x1b2)][_0x54ea06(0x1b8)](async _0x4b0d8c=>{const _0x13d2f2=_0x54ea06;var _0x34e16b,_0xc038d6,_0x52c7ff,_0xa85705;const _0x308572=(_0x34e16b=this[_0x13d2f2(0x1b0)][_0x13d2f2(0x182)](_0x4b0d8c[_0x13d2f2(0x1ab)])[_0x13d2f2(0x18d)](_0xeac1e2=>_0xeac1e2['threadId']===_0x4b0d8c['threadId']))==null?void 0x0:_0x34e16b[_0x13d2f2(0x1ac)];if(!_0x308572)return;const {unitId:_0x3cff36,subUnitId:_0x566c27}=_0x308572;switch(_0x4b0d8c[_0x13d2f2(0x1e5)]&&this[_0x13d2f2(0x1ce)][_0x13d2f2(0x18e)](_0x4b0d8c[_0x13d2f2(0x1e5)]),_0x4b0d8c[_0x13d2f2(0x1e4)]){case v[_0x13d2f2(0x1ec)]:break;case v[_0x13d2f2(0x1c3)]:{this[_0x13d2f2(0x1b0)][_0x13d2f2(0x1e2)](_0x3cff36,_0x566c27,{'unitId':_0x3cff36,'subUnitId':_0x566c27,'ref':'','id':_0x4b0d8c[_0x13d2f2(0x1a5)],'dT':f(+_0x4b0d8c[_0x13d2f2(0x1f5)]),'threadId':_0x4b0d8c[_0x13d2f2(0x1d9)],'personId':(_0x52c7ff=(_0xc038d6=_0x4b0d8c[_0x13d2f2(0x1e5)])==null?void 0x0:_0xc038d6[_0x13d2f2(0x1a1)])!=null?_0x52c7ff:_0x4b0d8c[_0x13d2f2(0x1b9)],'text':JSON['parse'](_0x4b0d8c['content']),'parentId':_0x308572['id']});break;}case v['Delete']:{const _0x50e35e=this[_0x13d2f2(0x1b0)][_0x13d2f2(0x1bf)](_0x3cff36,_0x566c27,_0x4b0d8c['replyId']);_0x50e35e&&_0x50e35e[_0x13d2f2(0x1c9)]&&this[_0x13d2f2(0x1b0)][_0x13d2f2(0x1e9)](_0x3cff36,_0x566c27,_0x4b0d8c['replyId']);break;}case v[_0x13d2f2(0x193)]:{this['_threadCommentModel'][_0x13d2f2(0x1dd)](_0x3cff36,_0x566c27,{'commentId':_0x4b0d8c[_0x13d2f2(0x1a5)],'text':JSON[_0x13d2f2(0x1bd)](_0x4b0d8c[_0x13d2f2(0x1c4)])});break;}case v[_0x13d2f2(0x1c8)]:{const _0x528223=(_0xa85705=this[_0x13d2f2(0x1b0)][_0x13d2f2(0x182)](_0x4b0d8c[_0x13d2f2(0x1ab)])[_0x13d2f2(0x18d)](_0x1cee00=>_0x1cee00[_0x13d2f2(0x1d9)]===_0x4b0d8c[_0x13d2f2(0x1d9)]))==null?void 0x0:_0xa85705[_0x13d2f2(0x1ac)];_0x528223&&this['_threadCommentModel']['resolveComment'](_0x3cff36,_0x566c27,_0x528223['id'],_0x4b0d8c[_0x13d2f2(0x19e)]===I['Solved']);break;}}}));}};function _0x446c(){const _0x33b490=['UserManagerService','replyId','Disposable','1433564ignqQs','UniverInstanceType','CommentService','Inject','unitId','root','stringify','format','CollaborationSessionService','_threadCommentModel','pluginName','commentUpdate$','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getMemberID','error','IThreadCommentDataSourceService','pipe','subscribe','userId','_commentService','listComments','3221784TEJnSc','parse','map','getComment','_sessionService','users','_config','Reply','content','_injector','values','toStringTag','Solve','parentId','CustomRangeType','onReady','/list','_httpService','_userService','delete','3miBsUj','OpenOrReOpen','slice','requireSession','/edit','post','COMMENT','ref','getOwnPropertyDescriptor','threadId','add','resolveComment','UNRECOGNIZED','updateComment','HTTPService','filter','length','disposeWithMe','addComment','defineProperty','type','user','getCurrentUser','customRanges','UniverThreadCommentDataSourcePlugin','deleteComment','/universer-api/comment/unit/','/add','Add','rangeId','779780bNDuST','forEach','_initDataSource','178318jhfFsP','body','onStarting','get','createTimestamp','ThreadCommentModel','216879esOKPz','comment','Plugin','402978bBSugb','getUnit','UniverCollaborationClientPlugin','replies','_init','UNIVER_UNKNOWN','Unknown','Delete','payload','1447624UEfCzB','_configService','UniverLicensePlugin','find','addUser','7UxIxUs','Module','bufferTime','_threadCommentDataSourceService','Edit','_threadCommentDataSource','code','/reply','DependentOn','comments','_initUserSync','setConfig','Injector','YYYY/MM/DD\x20HH:mm','/delete','solved','personId','rangeType','userID','Solved','saveCommentToSnapshot'];_0x446c=function(){return _0x33b490;};return _0x446c();}_=E([S(0x0,c['Inject'](b[_0x312a7d(0x1a9)])),S(0x1,c[_0x312a7d(0x1aa)](M[_0x312a7d(0x17d)])),S(0x2,c[_0x312a7d(0x1aa)](c[_0x312a7d(0x1a4)])),S(0x3,c[_0x312a7d(0x1aa)](c[_0x312a7d(0x19b)]))],_);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0xc457f6,_0x26f483,_0x508b25,_0xc4a330)=>{const _0x3a6033=_0x312a7d;for(var _0x2ab26c=_0xc4a330>0x1?void 0x0:_0xc4a330?A(_0x26f483,_0x508b25):_0x26f483,_0x3181b6=_0xc457f6[_0x3a6033(0x1e0)]-0x1,_0x8b619a;_0x3181b6>=0x0;_0x3181b6--)(_0x8b619a=_0xc457f6[_0x3181b6])&&(_0x2ab26c=_0x8b619a(_0x2ab26c)||_0x2ab26c);return _0x2ab26c;},C=(_0x1661c8,_0x3d5e35)=>(_0x26d45d,_0x590765)=>_0x3d5e35(_0x26d45d,_0x590765,_0x1661c8);function Y(_0x225266,_0x5a12db){const _0x42c309=_0x312a7d,_0x35d71b=_0x225266['replies'][0x0];return{..._0x5a12db,'id':_0x35d71b[_0x42c309(0x1a5)],'resolved':_0x225266[_0x42c309(0x19e)]===0x1,'dT':f(_0x35d71b['createTimestamp']),'personId':_0x35d71b[_0x42c309(0x1b9)],'threadId':_0x35d71b[_0x42c309(0x1d9)]};}function G(_0x3678f3,_0x204116,_0x106b59){const _0x2219da=_0x312a7d;var _0x184cdf,_0x2a8649;if(((_0x2a8649=(_0x184cdf=_0x3678f3==null?void 0x0:_0x3678f3[_0x2219da(0x184)])==null?void 0x0:_0x184cdf['length'])!=null?_0x2a8649:0x0)>0x0){const _0x258901=(_0x28e83e,_0x2fa0e3)=>({'id':_0x28e83e[_0x2219da(0x1a5)],'threadId':_0x28e83e['threadId'],'dT':f(_0x28e83e[_0x2219da(0x1f5)]),'personId':_0x28e83e[_0x2219da(0x1b9)],'resolved':_0x3678f3['solved']===I['Solved'],'unitId':_0x204116,'subUnitId':_0x106b59,'text':JSON['parse'](_0x28e83e[_0x2219da(0x1c4)]),'parentId':_0x2fa0e3}),_0x2f4065=_0x258901(_0x3678f3[_0x2219da(0x184)][0x0]);return{..._0x2f4065,'children':_0x3678f3[_0x2219da(0x184)][_0x2219da(0x1d2)](0x1)[_0x2219da(0x1be)](_0x4961fb=>_0x258901(_0x4961fb,_0x2f4065['id']))};}return null;}let p=class{constructor(_0x41c45b,_0x574cbb,_0x4fa163){const _0x37c9f2=_0x312a7d;this[_0x37c9f2(0x1cd)]=_0x41c45b,this[_0x37c9f2(0x1ce)]=_0x574cbb,this[_0x37c9f2(0x1c0)]=_0x4fa163;}async[_0x312a7d(0x1e2)](_0x33332d){const _0x5a7a0b=_0x312a7d;var _0x545a42,_0x4afc3c;const {parentId:_0x57fb70,unitId:_0x45cec5,text:_0x10fdfe,threadId:_0x4920b2}=_0x33332d,_0xd2f7ed=(_0x4afc3c=(_0x545a42=_0x10fdfe[_0x5a7a0b(0x1e7)])==null?void 0x0:_0x545a42[_0x5a7a0b(0x1df)](_0x34faf6=>_0x34faf6[_0x5a7a0b(0x1a0)]===c[_0x5a7a0b(0x1ca)][_0x5a7a0b(0x1d6)])[_0x5a7a0b(0x1be)](_0x297b5d=>_0x297b5d[_0x5a7a0b(0x1ed)]))!=null?_0x4afc3c:[],_0xa87a4a=JSON[_0x5a7a0b(0x1ad)](_0x10fdfe),_0x3e2602=(await this[_0x5a7a0b(0x1c0)][_0x5a7a0b(0x1d3)](_0x45cec5))[_0x5a7a0b(0x1b4)]();if(_0x57fb70){const _0x5f5236={'memberId':_0x3e2602,'unitId':_0x45cec5,'content':_0xa87a4a,'mention':_0xd2f7ed,'threadId':_0x4920b2},_0x5114e5=(await this[_0x5a7a0b(0x1cd)]['post'](_0x5a7a0b(0x1ea)+_0x45cec5+_0x5a7a0b(0x196),{'body':_0x5f5236}))[_0x5a7a0b(0x1f2)]['reply'];return{..._0x33332d,'id':_0x5114e5['replyId'],'dT':c['dayjs'](+_0x5114e5[_0x5a7a0b(0x1f5)])[_0x5a7a0b(0x1ae)](_0x5a7a0b(0x19c)),'personId':_0x5114e5[_0x5a7a0b(0x1b9)]};}else{const _0x16d311={'memberId':_0x3e2602,'unitId':_0x45cec5,'content':_0xa87a4a,'mention':_0xd2f7ed},_0x23abf0=await this[_0x5a7a0b(0x1cd)][_0x5a7a0b(0x1d5)]('/universer-api/comment/unit/'+_0x45cec5+_0x5a7a0b(0x1eb),{'body':_0x16d311});return Y(_0x23abf0[_0x5a7a0b(0x1f2)][_0x5a7a0b(0x17f)],_0x33332d);}}async[_0x312a7d(0x1dd)](_0x1982f0){const _0x44dbca=_0x312a7d;var _0x586e07,_0x90c0af;const {text:_0x138951,unitId:_0x5ddc58}=_0x1982f0,_0x541b75=(_0x90c0af=(_0x586e07=_0x138951[_0x44dbca(0x1e7)])==null?void 0x0:_0x586e07[_0x44dbca(0x1df)](_0x39f706=>_0x39f706[_0x44dbca(0x1a0)]===c['CustomRangeType']['COMMENT'])[_0x44dbca(0x1be)](_0x1b0a41=>_0x1b0a41[_0x44dbca(0x1ed)]))!=null?_0x90c0af:[],_0x1a1b35=JSON[_0x44dbca(0x1ad)](_0x138951),_0x1360d9=_0x1982f0['threadId'],_0x39d310=_0x1982f0['id'],_0xd17656={'memberId':(await this['_sessionService'][_0x44dbca(0x1d3)](_0x5ddc58))[_0x44dbca(0x1b4)](),'unitId':_0x5ddc58,'threadId':_0x1360d9,'mention':_0x541b75,'content':_0x1a1b35,'replyId':_0x39d310},_0x2cb8ab=await this['_httpService']['post'](_0x44dbca(0x1ea)+_0x5ddc58+_0x44dbca(0x1d4),{'body':_0xd17656});return!_0x2cb8ab['body'][_0x44dbca(0x1b5)]||_0x2cb8ab['body'][_0x44dbca(0x1b5)][_0x44dbca(0x195)]===0x1;}async[_0x312a7d(0x1db)](_0x3365fe){const _0x3829cc=_0x312a7d,{unitId:_0x4dcf10}=_0x3365fe,_0x56a492=_0x3365fe[_0x3829cc(0x1d9)],_0x19edd0={'memberId':this[_0x3829cc(0x1ce)][_0x3829cc(0x1e6)]()[_0x3829cc(0x1a1)],'unitId':_0x4dcf10,'threadId':_0x56a492,'solved':_0x3365fe['resolved']?I[_0x3829cc(0x1a2)]:I[_0x3829cc(0x1d1)]},_0x520b78=await this['_httpService'][_0x3829cc(0x1d5)](_0x3829cc(0x1ea)+_0x4dcf10+'/solved',{'body':_0x19edd0});return!_0x520b78[_0x3829cc(0x1f2)]['error']||_0x520b78[_0x3829cc(0x1f2)][_0x3829cc(0x1b5)][_0x3829cc(0x195)]===0x1;}async['deleteComment'](_0x899d9d,_0x528dce,_0x3e7883,_0x4f61e5){const _0x20e3a3=_0x312a7d,_0x374047={'memberId':(await this['_sessionService'][_0x20e3a3(0x1d3)](_0x899d9d))[_0x20e3a3(0x1b4)](),'threadId':_0x3e7883,'replyId':_0x4f61e5,'unitId':_0x899d9d},_0x47b925=await this[_0x20e3a3(0x1cd)][_0x20e3a3(0x1d5)](_0x20e3a3(0x1ea)+_0x899d9d+_0x20e3a3(0x19d),{'body':_0x374047});return!_0x47b925[_0x20e3a3(0x1f2)][_0x20e3a3(0x1b5)]||_0x47b925[_0x20e3a3(0x1f2)]['error'][_0x20e3a3(0x195)]===0x1;}async[_0x312a7d(0x1bb)](_0x14f98e,_0x401aff,_0x153806){const _0x47c80c=_0x312a7d,_0x4ffab7={'unitId':_0x14f98e,'threadId':_0x153806},_0xfa44e5=await this[_0x47c80c(0x1cd)][_0x47c80c(0x1d5)](_0x47c80c(0x1ea)+_0x14f98e+_0x47c80c(0x1cc),{'body':_0x4ffab7}),_0x1f83aa=_0x153806[_0x47c80c(0x1be)](_0x3639b0=>G(_0xfa44e5['body'][_0x47c80c(0x198)][_0x3639b0],_0x14f98e,_0x401aff))['filter'](Boolean);return Object[_0x47c80c(0x1c6)](_0xfa44e5[_0x47c80c(0x1f2)][_0x47c80c(0x1c1)])[_0x47c80c(0x1ef)](_0x2e2a5b=>{this['_userService']['addUser'](_0x2e2a5b);}),_0x1f83aa;}[_0x312a7d(0x1a3)](_0x5f07f6){const _0x4108e=_0x312a7d;return{'id':_0x5f07f6['id'],'threadId':_0x5f07f6[_0x4108e(0x1d9)],'ref':_0x5f07f6[_0x4108e(0x1d7)]};}};p=x([C(0x0,c[_0x312a7d(0x1aa)](P['HTTPService'])),C(0x1,c[_0x312a7d(0x1aa)](c[_0x312a7d(0x1a4)])),C(0x2,c[_0x312a7d(0x1aa)](b[_0x312a7d(0x1af)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0xe0d7dd,_0x3c38f7,_0x1110c1,_0x57f315)=>{const _0x58d039=_0x312a7d;for(var _0x5210cd=_0x57f315>0x1?void 0x0:_0x57f315?H(_0x3c38f7,_0x1110c1):_0x3c38f7,_0x362af1=_0xe0d7dd[_0x58d039(0x1e0)]-0x1,_0x204c19;_0x362af1>=0x0;_0x362af1--)(_0x204c19=_0xe0d7dd[_0x362af1])&&(_0x5210cd=_0x204c19(_0x5210cd)||_0x5210cd);return _0x5210cd;},y=(_0x4068a1,_0x3a20e1)=>(_0x255e1a,_0x2b51f9)=>_0x3a20e1(_0x255e1a,_0x2b51f9,_0x4068a1);let g=class extends c[_0x312a7d(0x1a6)]{constructor(_0x563be5,_0x1f03ab){super(),this['_threadCommentDataSourceService']=_0x563be5,this['_threadCommentDataSource']=_0x1f03ab,this['_initDataSource']();}[_0x312a7d(0x1f0)](){const _0xe32eb4=_0x312a7d;this[_0xe32eb4(0x192)]['dataSource']=this[_0xe32eb4(0x194)],this[_0xe32eb4(0x192)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x312a7d(0x1b6)]),y(0x1,c[_0x312a7d(0x1aa)](p))],g);var F=Object[_0x312a7d(0x1e3)],L=Object[_0x312a7d(0x1d8)],Z=(_0x3dc2d6,_0x68216c,_0x1cea65)=>_0x68216c in _0x3dc2d6?F(_0x3dc2d6,_0x68216c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1cea65}):_0x3dc2d6[_0x68216c]=_0x1cea65,W=(_0x97637d,_0x1fe9f1,_0x289f6c,_0x4279e9)=>{const _0x47fe67=_0x312a7d;for(var _0x5db1b4=_0x4279e9>0x1?void 0x0:_0x4279e9?L(_0x1fe9f1,_0x289f6c):_0x1fe9f1,_0x4feb43=_0x97637d[_0x47fe67(0x1e0)]-0x1,_0xa2371c;_0x4feb43>=0x0;_0x4feb43--)(_0xa2371c=_0x97637d[_0x4feb43])&&(_0x5db1b4=_0xa2371c(_0x5db1b4)||_0x5db1b4);return _0x5db1b4;},O=(_0x339c32,_0x4c702a)=>(_0x55ef38,_0x1dd6d3)=>_0x4c702a(_0x55ef38,_0x1dd6d3,_0x339c32),N=(_0x97dd1a,_0x20e301,_0x344b67)=>Z(_0x97dd1a,typeof _0x20e301!='symbol'?_0x20e301+'':_0x20e301,_0x344b67);exports[_0x312a7d(0x1e8)]=class extends c[_0x312a7d(0x180)]{constructor(_0x527c82=D,_0x1dc148,_0x4d8b41){const _0x373d8f=_0x312a7d;super(),this[_0x373d8f(0x1c2)]=_0x527c82,this[_0x373d8f(0x1c5)]=_0x1dc148,this[_0x373d8f(0x18b)]=_0x4d8b41;const {..._0x385558}=c['merge']({},D,this[_0x373d8f(0x1c2)]);this[_0x373d8f(0x18b)][_0x373d8f(0x19a)](q,_0x385558);}[_0x312a7d(0x1f3)](){const _0xbfacaa=_0x312a7d;[[p],[g],[_]][_0xbfacaa(0x1ef)](_0x467209=>{const _0x2a44b7=_0xbfacaa;this[_0x2a44b7(0x1c5)][_0x2a44b7(0x1da)](_0x467209);});}[_0x312a7d(0x1cb)](){const _0x370668=_0x312a7d;this[_0x370668(0x1c5)][_0x370668(0x1f4)](g),this[_0x370668(0x1c5)][_0x370668(0x1f4)](_);}},N(exports[_0x312a7d(0x1e8)],_0x312a7d(0x1b1),U),N(exports[_0x312a7d(0x1e8)],_0x312a7d(0x1e4),c[_0x312a7d(0x1a8)][_0x312a7d(0x186)]),exports[_0x312a7d(0x1e8)]=W([c[_0x312a7d(0x197)](w['UniverThreadCommentUIPlugin'],b[_0x312a7d(0x183)],T[_0x312a7d(0x18c)]),O(0x1,c[_0x312a7d(0x1aa)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x312a7d(0x1e8)]);
|
|
1
|
+
'use strict';const _0x496397=_0x50c3;(function(_0xc5a695,_0x4537b5){const _0x4f1b7d=_0x50c3,_0xaa87cf=_0xc5a695();while(!![]){try{const _0x1fad32=-parseInt(_0x4f1b7d(0x21f))/0x1*(-parseInt(_0x4f1b7d(0x1d4))/0x2)+-parseInt(_0x4f1b7d(0x1dc))/0x3*(parseInt(_0x4f1b7d(0x1e9))/0x4)+-parseInt(_0x4f1b7d(0x1ab))/0x5+parseInt(_0x4f1b7d(0x1e7))/0x6*(parseInt(_0x4f1b7d(0x1c6))/0x7)+parseInt(_0x4f1b7d(0x1c0))/0x8+parseInt(_0x4f1b7d(0x1c5))/0x9*(parseInt(_0x4f1b7d(0x1f4))/0xa)+-parseInt(_0x4f1b7d(0x1d0))/0xb;if(_0x1fad32===_0x4537b5)break;else _0xaa87cf['push'](_0xaa87cf['shift']());}catch(_0x2af6c2){_0xaa87cf['push'](_0xaa87cf['shift']());}}}(_0xdb8f,0x20af4));Object[_0x496397(0x1f9)](exports,Symbol[_0x496397(0x21c)],{'value':_0x496397(0x1e4)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x496397(0x21e);function _0x50c3(_0x564d0a,_0x186c00){_0x564d0a=_0x564d0a-0x1a7;const _0xdb8f00=_0xdb8f();let _0x50c357=_0xdb8f00[_0x564d0a];return _0x50c357;}function _0xdb8f(){const _0x497def=['/list','symbol','parse','commentUpdate$','comment','UniverInstanceType','reply','threadId','HTTPService','_sessionService','UniverLicensePlugin','OpenOrReOpen','ThreadCommentModel','payload','forEach','pluginName','error','/solved','createTimestamp','userID','requireSession','getMemberID','toStringTag','bufferTime','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','19bfmGnq','customRanges','resolveComment','Reply','type','/edit','listComments','YYYY/MM/DD\x20HH:mm','_threadCommentModel','Add','UNIVER_UNKNOWN','1227810YSWNqT','/add','user','/universer-api/user/list','_configService','_threadCommentDataSourceService','UniverThreadCommentUIPlugin','getComment','IConfigService','get','dataSource','DependentOn','Plugin','saveCommentToSnapshot','map','length','CustomRangeType','_commentService','getOwnPropertyDescriptor','stringify','UserManagerService','807992GSYSnk','_config','addUser','_httpService','merge','2511NGJAhu','1403871DQCUzp','solved','delete','Edit','_initUserSync','parentId','thread-comment-data-source.config','userId','onStarting','deleteComment','3347762DpfsJl','find','/reply','personId','23158IhikXn','Unknown','Solved','_userService','_initDataSource','UNRECOGNIZED','setConfig','replies','789MVqPGr','values','Delete','root','filter','body','getUnit','COMMENT','Module','/universer-api/comment/unit/','Injector','6GTaVMW','CommentService','32fKGlgu','content','code','ref','rangeId','UniverThreadCommentDataSourcePlugin','comments','disposeWithMe','unitId','CollaborationSessionService','_injector','5890RtyYZh','resolved','subscribe','post','/delete','defineProperty','_init','getCurrentUser','users','format','Inject','dayjs','Solve','Disposable','replyId','add','addComment','rangeType'];_0xdb8f=function(){return _0x497def;};return _0xdb8f();}var I=(_0x43136f=>(_0x43136f[_0x43136f[_0x496397(0x211)]=0x0]=_0x496397(0x211),_0x43136f[_0x43136f[_0x496397(0x1d6)]=0x1]=_0x496397(0x1d6),_0x43136f[_0x43136f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x43136f))(I||{}),v=(_0x2aa0e1=>(_0x2aa0e1[_0x2aa0e1[_0x496397(0x1d5)]=0x0]=_0x496397(0x1d5),_0x2aa0e1[_0x2aa0e1[_0x496397(0x1a9)]=0x1]=_0x496397(0x1a9),_0x2aa0e1[_0x2aa0e1[_0x496397(0x222)]=0x2]=_0x496397(0x222),_0x2aa0e1[_0x2aa0e1[_0x496397(0x1c9)]=0x3]=_0x496397(0x1c9),_0x2aa0e1[_0x2aa0e1['Delete']=0x4]=_0x496397(0x1de),_0x2aa0e1[_0x2aa0e1[_0x496397(0x200)]=0x5]=_0x496397(0x200),_0x2aa0e1[_0x2aa0e1[_0x496397(0x1d9)]=-0x1]=_0x496397(0x1d9),_0x2aa0e1))(v||{});const f=_0x1667ee=>c[_0x496397(0x1ff)](new Date(+_0x1667ee))['format'](_0x496397(0x1a7)),R=async(_0x248ac6,_0x266cea)=>{const _0x12dac8=_0x496397,_0x3167ee=_0x248ac6[_0x12dac8(0x1b4)](c[_0x12dac8(0x1bf)]),_0x5e0250=_0x248ac6[_0x12dac8(0x1b4)](P[_0x12dac8(0x20e)]);_0x266cea[_0x12dac8(0x214)](_0x5be8d9=>{const _0x1c4a9d=_0x12dac8;_0x3167ee['getUser'](_0x5be8d9)&&_0x266cea[_0x1c4a9d(0x1c8)](_0x5be8d9);}),_0x266cea['size']&&(await _0x5e0250['get'](_0x12dac8(0x1ae),{'params':{'userIDs':[..._0x266cea]}}))[_0x12dac8(0x1e1)][_0x12dac8(0x1fc)][_0x12dac8(0x214)](_0x16a6ae=>{_0x16a6ae&&_0x3167ee['addUser'](_0x16a6ae);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x464cd2,_0x52f20b,_0x494bf2,_0x1f181d)=>{for(var _0x28aee2=_0x1f181d>0x1?void 0x0:_0x1f181d?$(_0x52f20b,_0x494bf2):_0x52f20b,_0x3d8017=_0x464cd2['length']-0x1,_0x4790a7;_0x3d8017>=0x0;_0x3d8017--)(_0x4790a7=_0x464cd2[_0x3d8017])&&(_0x28aee2=_0x4790a7(_0x28aee2)||_0x28aee2);return _0x28aee2;},S=(_0x27a8c2,_0x362b35)=>(_0x245357,_0x3631e6)=>_0x362b35(_0x245357,_0x3631e6,_0x27a8c2);let _=class extends c[_0x496397(0x201)]{constructor(_0x2eb10c,_0x1cbceb,_0x4d8e9a,_0xde809b){const _0x2d2e4a=_0x496397;super(),this[_0x2d2e4a(0x1bc)]=_0x2eb10c,this[_0x2d2e4a(0x1a8)]=_0x1cbceb,this['_userService']=_0x4d8e9a,this[_0x2d2e4a(0x1f3)]=_0xde809b,this[_0x2d2e4a(0x1fa)](),this[_0x2d2e4a(0x1ca)]();}[_0x496397(0x1ca)](){const _0x5ee67a=_0x496397;this[_0x5ee67a(0x1f0)](this[_0x5ee67a(0x1a8)][_0x5ee67a(0x209)]['pipe'](j[_0x5ee67a(0x21d)](0x10))['subscribe'](_0x1e888b=>{const _0xc2af8d=_0x5ee67a,_0x44e48c=new Set();_0x1e888b['forEach'](_0x40a87a=>{const _0x559c8a=_0x50c3;if(_0x40a87a[_0x559c8a(0x223)]==='add'){const _0x1c9b1e=_0x40a87a[_0x559c8a(0x213)][_0x559c8a(0x1d3)];_0x44e48c['add'](_0x1c9b1e);}}),R(this[_0xc2af8d(0x1f3)],_0x44e48c);}));}[_0x496397(0x1fa)](){const _0x2c8f54=_0x496397;this[_0x2c8f54(0x1f0)](this[_0x2c8f54(0x1bc)]['commentUpdate$'][_0x2c8f54(0x1f6)](async _0x2ef9d7=>{const _0x4db751=_0x2c8f54;var _0x59a91c,_0x296d28,_0x1d5504,_0x5caa74;const _0x280a59=(_0x59a91c=this['_threadCommentModel'][_0x4db751(0x1e2)](_0x2ef9d7[_0x4db751(0x1f1)])[_0x4db751(0x1d1)](_0x54a988=>_0x54a988[_0x4db751(0x20d)]===_0x2ef9d7['threadId']))==null?void 0x0:_0x59a91c[_0x4db751(0x1df)];if(!_0x280a59)return;const {unitId:_0x29cec8,subUnitId:_0x17124b}=_0x280a59;switch(_0x2ef9d7[_0x4db751(0x1ad)]&&this[_0x4db751(0x1d7)][_0x4db751(0x1c2)](_0x2ef9d7['user']),_0x2ef9d7[_0x4db751(0x223)]){case v[_0x4db751(0x1a9)]:break;case v['Reply']:{this[_0x4db751(0x1a8)][_0x4db751(0x204)](_0x29cec8,_0x17124b,{'unitId':_0x29cec8,'subUnitId':_0x17124b,'ref':'','id':_0x2ef9d7[_0x4db751(0x202)],'dT':f(+_0x2ef9d7[_0x4db751(0x218)]),'threadId':_0x2ef9d7[_0x4db751(0x20d)],'personId':(_0x1d5504=(_0x296d28=_0x2ef9d7[_0x4db751(0x1ad)])==null?void 0x0:_0x296d28[_0x4db751(0x219)])!=null?_0x1d5504:_0x2ef9d7[_0x4db751(0x1cd)],'text':JSON[_0x4db751(0x208)](_0x2ef9d7[_0x4db751(0x1ea)]),'parentId':_0x280a59['id']});break;}case v[_0x4db751(0x1de)]:{const _0x5696d4=this[_0x4db751(0x1a8)][_0x4db751(0x1b2)](_0x29cec8,_0x17124b,_0x2ef9d7[_0x4db751(0x202)]);_0x5696d4&&_0x5696d4[_0x4db751(0x1cb)]&&this['_threadCommentModel'][_0x4db751(0x1cf)](_0x29cec8,_0x17124b,_0x2ef9d7['replyId']);break;}case v[_0x4db751(0x1c9)]:{this['_threadCommentModel']['updateComment'](_0x29cec8,_0x17124b,{'commentId':_0x2ef9d7['replyId'],'text':JSON[_0x4db751(0x208)](_0x2ef9d7[_0x4db751(0x1ea)])});break;}case v[_0x4db751(0x200)]:{const _0x2a5702=(_0x5caa74=this[_0x4db751(0x1a8)][_0x4db751(0x1e2)](_0x2ef9d7['unitId'])['find'](_0xfc40db=>_0xfc40db[_0x4db751(0x20d)]===_0x2ef9d7[_0x4db751(0x20d)]))==null?void 0x0:_0x5caa74[_0x4db751(0x1df)];_0x2a5702&&this['_threadCommentModel']['resolveComment'](_0x29cec8,_0x17124b,_0x2a5702['id'],_0x2ef9d7[_0x4db751(0x1c7)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x496397(0x1fe)](b[_0x496397(0x1e8)])),S(0x1,c['Inject'](M[_0x496397(0x212)])),S(0x2,c[_0x496397(0x1fe)](c[_0x496397(0x1bf)])),S(0x3,c[_0x496397(0x1fe)](c[_0x496397(0x1e6)]))],_);const q=_0x496397(0x1cc),D={};var A=Object[_0x496397(0x1bd)],x=(_0x1526d9,_0x483b9f,_0x547e55,_0x1e96db)=>{const _0x461f32=_0x496397;for(var _0x69f86d=_0x1e96db>0x1?void 0x0:_0x1e96db?A(_0x483b9f,_0x547e55):_0x483b9f,_0x266e69=_0x1526d9[_0x461f32(0x1ba)]-0x1,_0x390216;_0x266e69>=0x0;_0x266e69--)(_0x390216=_0x1526d9[_0x266e69])&&(_0x69f86d=_0x390216(_0x69f86d)||_0x69f86d);return _0x69f86d;},C=(_0xc014bb,_0x58f93e)=>(_0x179bc9,_0x21a9f5)=>_0x58f93e(_0x179bc9,_0x21a9f5,_0xc014bb);function Y(_0x56bc64,_0x489b4b){const _0x4c7c77=_0x496397,_0x1357af=_0x56bc64[_0x4c7c77(0x1db)][0x0];return{..._0x489b4b,'id':_0x1357af[_0x4c7c77(0x202)],'resolved':_0x56bc64[_0x4c7c77(0x1c7)]===0x1,'dT':f(_0x1357af[_0x4c7c77(0x218)]),'personId':_0x1357af[_0x4c7c77(0x1cd)],'threadId':_0x1357af[_0x4c7c77(0x20d)]};}function G(_0x1ba542,_0x5b9e89,_0x58f40c){const _0x2f9a83=_0x496397;var _0x27e062,_0x4788ac;if(((_0x4788ac=(_0x27e062=_0x1ba542==null?void 0x0:_0x1ba542['replies'])==null?void 0x0:_0x27e062[_0x2f9a83(0x1ba)])!=null?_0x4788ac:0x0)>0x0){const _0x200589=(_0x12e432,_0x4211e2)=>({'id':_0x12e432[_0x2f9a83(0x202)],'threadId':_0x12e432[_0x2f9a83(0x20d)],'dT':f(_0x12e432[_0x2f9a83(0x218)]),'personId':_0x12e432[_0x2f9a83(0x1cd)],'resolved':_0x1ba542[_0x2f9a83(0x1c7)]===I[_0x2f9a83(0x1d6)],'unitId':_0x5b9e89,'subUnitId':_0x58f40c,'text':JSON[_0x2f9a83(0x208)](_0x12e432[_0x2f9a83(0x1ea)]),'parentId':_0x4211e2}),_0x48ca36=_0x200589(_0x1ba542[_0x2f9a83(0x1db)][0x0]);return{..._0x48ca36,'children':_0x1ba542[_0x2f9a83(0x1db)]['slice'](0x1)[_0x2f9a83(0x1b9)](_0x4d3044=>_0x200589(_0x4d3044,_0x48ca36['id']))};}return null;}let p=class{constructor(_0x9c412a,_0x11e429,_0x7d1c6a){const _0x22dba8=_0x496397;this[_0x22dba8(0x1c3)]=_0x9c412a,this['_userService']=_0x11e429,this[_0x22dba8(0x20f)]=_0x7d1c6a;}async[_0x496397(0x204)](_0x25dc89){const _0x68c67a=_0x496397;var _0x3953f7,_0x4df76e;const {parentId:_0x48dcbb,unitId:_0x5a8fdd,text:_0x1ec326,threadId:_0x4eebd8}=_0x25dc89,_0x3289c1=(_0x4df76e=(_0x3953f7=_0x1ec326[_0x68c67a(0x220)])==null?void 0x0:_0x3953f7['filter'](_0x451f9e=>_0x451f9e[_0x68c67a(0x205)]===c['CustomRangeType'][_0x68c67a(0x1e3)])[_0x68c67a(0x1b9)](_0x43eaca=>_0x43eaca[_0x68c67a(0x1ed)]))!=null?_0x4df76e:[],_0x284ea6=JSON[_0x68c67a(0x1be)](_0x1ec326),_0x13091a=(await this[_0x68c67a(0x20f)][_0x68c67a(0x21a)](_0x5a8fdd))[_0x68c67a(0x21b)]();if(_0x48dcbb){const _0x308350={'memberId':_0x13091a,'unitId':_0x5a8fdd,'content':_0x284ea6,'mention':_0x3289c1,'threadId':_0x4eebd8},_0x50a430=(await this[_0x68c67a(0x1c3)][_0x68c67a(0x1f7)](_0x68c67a(0x1e5)+_0x5a8fdd+_0x68c67a(0x1d2),{'body':_0x308350}))[_0x68c67a(0x1e1)][_0x68c67a(0x20c)];return{..._0x25dc89,'id':_0x50a430[_0x68c67a(0x202)],'dT':c['dayjs'](+_0x50a430[_0x68c67a(0x218)])[_0x68c67a(0x1fd)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x50a430['userId']};}else{const _0x484525={'memberId':_0x13091a,'unitId':_0x5a8fdd,'content':_0x284ea6,'mention':_0x3289c1},_0x5b1204=await this[_0x68c67a(0x1c3)][_0x68c67a(0x1f7)]('/universer-api/comment/unit/'+_0x5a8fdd+_0x68c67a(0x1ac),{'body':_0x484525});return Y(_0x5b1204[_0x68c67a(0x1e1)][_0x68c67a(0x20a)],_0x25dc89);}}async['updateComment'](_0x483d14){const _0x14b1e6=_0x496397;var _0x15fafa,_0x4ec84b;const {text:_0x7c98b,unitId:_0x2c1055}=_0x483d14,_0x294ac7=(_0x4ec84b=(_0x15fafa=_0x7c98b[_0x14b1e6(0x220)])==null?void 0x0:_0x15fafa[_0x14b1e6(0x1e0)](_0x1b5fa9=>_0x1b5fa9[_0x14b1e6(0x205)]===c[_0x14b1e6(0x1bb)][_0x14b1e6(0x1e3)])[_0x14b1e6(0x1b9)](_0x32769b=>_0x32769b[_0x14b1e6(0x1ed)]))!=null?_0x4ec84b:[],_0x1382ad=JSON[_0x14b1e6(0x1be)](_0x7c98b),_0x4a6c10=_0x483d14[_0x14b1e6(0x20d)],_0x5b5df7=_0x483d14['id'],_0x55f5ed={'memberId':(await this[_0x14b1e6(0x20f)][_0x14b1e6(0x21a)](_0x2c1055))[_0x14b1e6(0x21b)](),'unitId':_0x2c1055,'threadId':_0x4a6c10,'mention':_0x294ac7,'content':_0x1382ad,'replyId':_0x5b5df7},_0x59dd6a=await this['_httpService'][_0x14b1e6(0x1f7)](_0x14b1e6(0x1e5)+_0x2c1055+_0x14b1e6(0x224),{'body':_0x55f5ed});return!_0x59dd6a[_0x14b1e6(0x1e1)]['error']||_0x59dd6a['body'][_0x14b1e6(0x216)][_0x14b1e6(0x1eb)]===0x1;}async[_0x496397(0x221)](_0x501a4d){const _0x56e368=_0x496397,{unitId:_0x2a5048}=_0x501a4d,_0x9b76d3=_0x501a4d[_0x56e368(0x20d)],_0x532977={'memberId':this[_0x56e368(0x1d7)][_0x56e368(0x1fb)]()[_0x56e368(0x219)],'unitId':_0x2a5048,'threadId':_0x9b76d3,'solved':_0x501a4d[_0x56e368(0x1f5)]?I['Solved']:I['OpenOrReOpen']},_0x243baa=await this[_0x56e368(0x1c3)]['post']('/universer-api/comment/unit/'+_0x2a5048+_0x56e368(0x217),{'body':_0x532977});return!_0x243baa[_0x56e368(0x1e1)][_0x56e368(0x216)]||_0x243baa[_0x56e368(0x1e1)][_0x56e368(0x216)][_0x56e368(0x1eb)]===0x1;}async[_0x496397(0x1cf)](_0x29fbc3,_0x37afed,_0xd29964,_0x10b283){const _0x23d757=_0x496397,_0x66a3db={'memberId':(await this[_0x23d757(0x20f)][_0x23d757(0x21a)](_0x29fbc3))['getMemberID'](),'threadId':_0xd29964,'replyId':_0x10b283,'unitId':_0x29fbc3},_0x2d8fda=await this[_0x23d757(0x1c3)]['post']('/universer-api/comment/unit/'+_0x29fbc3+_0x23d757(0x1f8),{'body':_0x66a3db});return!_0x2d8fda[_0x23d757(0x1e1)][_0x23d757(0x216)]||_0x2d8fda[_0x23d757(0x1e1)][_0x23d757(0x216)][_0x23d757(0x1eb)]===0x1;}async[_0x496397(0x225)](_0x176412,_0x2741be,_0x1b30a0){const _0x4d95ce=_0x496397,_0x263b12={'unitId':_0x176412,'threadId':_0x1b30a0},_0x61f093=await this['_httpService'][_0x4d95ce(0x1f7)](_0x4d95ce(0x1e5)+_0x176412+_0x4d95ce(0x206),{'body':_0x263b12}),_0x27c620=_0x1b30a0['map'](_0x5c3dd1=>G(_0x61f093[_0x4d95ce(0x1e1)][_0x4d95ce(0x1ef)][_0x5c3dd1],_0x176412,_0x2741be))[_0x4d95ce(0x1e0)](Boolean);return Object[_0x4d95ce(0x1dd)](_0x61f093['body'][_0x4d95ce(0x1fc)])[_0x4d95ce(0x214)](_0x46fbb4=>{const _0x44d93e=_0x4d95ce;this['_userService'][_0x44d93e(0x1c2)](_0x46fbb4);}),_0x27c620;}[_0x496397(0x1b8)](_0x5ad51e){const _0x35cf07=_0x496397;return{'id':_0x5ad51e['id'],'threadId':_0x5ad51e[_0x35cf07(0x20d)],'ref':_0x5ad51e[_0x35cf07(0x1ec)]};}};p=x([C(0x0,c[_0x496397(0x1fe)](P[_0x496397(0x20e)])),C(0x1,c[_0x496397(0x1fe)](c[_0x496397(0x1bf)])),C(0x2,c[_0x496397(0x1fe)](b[_0x496397(0x1f2)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x3ac7b1,_0x279154,_0x22cdb2,_0x107095)=>{const _0xa43ed=_0x496397;for(var _0x203395=_0x107095>0x1?void 0x0:_0x107095?H(_0x279154,_0x22cdb2):_0x279154,_0x1a4ecd=_0x3ac7b1[_0xa43ed(0x1ba)]-0x1,_0x1f1e04;_0x1a4ecd>=0x0;_0x1a4ecd--)(_0x1f1e04=_0x3ac7b1[_0x1a4ecd])&&(_0x203395=_0x1f1e04(_0x203395)||_0x203395);return _0x203395;},y=(_0x554bfc,_0x398945)=>(_0x16ffc7,_0x2e41bd)=>_0x398945(_0x16ffc7,_0x2e41bd,_0x554bfc);let g=class extends c[_0x496397(0x201)]{constructor(_0x47c51f,_0x1bd6ff){super(),this['_threadCommentDataSourceService']=_0x47c51f,this['_threadCommentDataSource']=_0x1bd6ff,this['_initDataSource']();}[_0x496397(0x1d8)](){const _0x59dfe5=_0x496397;this['_threadCommentDataSourceService'][_0x59dfe5(0x1b5)]=this['_threadCommentDataSource'],this[_0x59dfe5(0x1b0)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x496397(0x1fe)](p))],g);var F=Object[_0x496397(0x1f9)],L=Object[_0x496397(0x1bd)],Z=(_0x189e48,_0x13121f,_0x5d1085)=>_0x13121f in _0x189e48?F(_0x189e48,_0x13121f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5d1085}):_0x189e48[_0x13121f]=_0x5d1085,W=(_0x5c8db4,_0x4ace0b,_0x203273,_0x2a54a7)=>{const _0x118798=_0x496397;for(var _0x3bfec4=_0x2a54a7>0x1?void 0x0:_0x2a54a7?L(_0x4ace0b,_0x203273):_0x4ace0b,_0x5b7b09=_0x5c8db4[_0x118798(0x1ba)]-0x1,_0x1ed0a8;_0x5b7b09>=0x0;_0x5b7b09--)(_0x1ed0a8=_0x5c8db4[_0x5b7b09])&&(_0x3bfec4=_0x1ed0a8(_0x3bfec4)||_0x3bfec4);return _0x3bfec4;},O=(_0x3e68b8,_0x55b7e3)=>(_0x2317f9,_0x3cb4a3)=>_0x55b7e3(_0x2317f9,_0x3cb4a3,_0x3e68b8),N=(_0x5214bf,_0x1557f9,_0x568ee1)=>Z(_0x5214bf,typeof _0x1557f9!=_0x496397(0x207)?_0x1557f9+'':_0x1557f9,_0x568ee1);exports[_0x496397(0x1ee)]=class extends c[_0x496397(0x1b7)]{constructor(_0x2a87a8=D,_0x298c19,_0xa6c756){const _0x525674=_0x496397;super(),this[_0x525674(0x1c1)]=_0x2a87a8,this[_0x525674(0x1f3)]=_0x298c19,this[_0x525674(0x1af)]=_0xa6c756;const {..._0x135a6d}=c[_0x525674(0x1c4)]({},D,this['_config']);this[_0x525674(0x1af)][_0x525674(0x1da)](q,_0x135a6d);}[_0x496397(0x1ce)](){const _0x57369d=_0x496397;[[p],[g],[_]][_0x57369d(0x214)](_0xfefbd4=>{const _0x5b34ff=_0x57369d;this[_0x5b34ff(0x1f3)][_0x5b34ff(0x203)](_0xfefbd4);});}['onReady'](){const _0x42e236=_0x496397;this['_injector'][_0x42e236(0x1b4)](g),this[_0x42e236(0x1f3)][_0x42e236(0x1b4)](_);}},N(exports[_0x496397(0x1ee)],_0x496397(0x215),U),N(exports[_0x496397(0x1ee)],_0x496397(0x223),c[_0x496397(0x20b)][_0x496397(0x1aa)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x496397(0x1b6)](w[_0x496397(0x1b1)],b['UniverCollaborationClientPlugin'],T[_0x496397(0x210)]),O(0x1,c[_0x496397(0x1fe)](c[_0x496397(0x1e6)])),O(0x2,c[_0x496397(0x1b3)])],exports[_0x496397(0x1ee)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x433b96=_0x2d2d;(function(_0x50bea8,_0xbb9379){const _0x47d297=_0x2d2d,_0x42fc46=_0x50bea8();while(!![]){try{const _0x4726c5=parseInt(_0x47d297(0x152))/0x1*(parseInt(_0x47d297(0x10b))/0x2)+parseInt(_0x47d297(0x11e))/0x3+parseInt(_0x47d297(0x147))/0x4*(parseInt(_0x47d297(0x117))/0x5)+parseInt(_0x47d297(0x162))/0x6*(-parseInt(_0x47d297(0x122))/0x7)+-parseInt(_0x47d297(0x153))/0x8+parseInt(_0x47d297(0x111))/0x9*(parseInt(_0x47d297(0x13f))/0xa)+parseInt(_0x47d297(0x12c))/0xb*(-parseInt(_0x47d297(0x15d))/0xc);if(_0x4726c5===_0xbb9379)break;else _0x42fc46['push'](_0x42fc46['shift']());}catch(_0x31e359){_0x42fc46['push'](_0x42fc46['shift']());}}}(_0x3c1b,0x48652));import{CommentService as _0x27be94,CollaborationSessionService as _0x23c102,UniverCollaborationClientPlugin as _0x47447c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x51e432}from'@univerjs-pro/license';import{dayjs as _0x502aa8,UserManagerService as _0x3e832f,Inject as _0x19a2f3,Injector as _0x1c9719,Disposable as _0x35f606,CustomRangeType as _0x2671e9,UniverInstanceType as _0x1a8c17,DependentOn as _0x5d048e,IConfigService as _0x3e7a47,Plugin as _0x5ee83e,merge as _0x1eba46}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x48228f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x541f7f,IThreadCommentDataSourceService as _0x22dd5c}from'@univerjs/thread-comment';import{bufferTime as _0x5655f9}from'rxjs';import{HTTPService as _0x588861}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x40dae8=>(_0x40dae8[_0x40dae8[_0x433b96(0x169)]=0x0]=_0x433b96(0x169),_0x40dae8[_0x40dae8[_0x433b96(0x142)]=0x1]=_0x433b96(0x142),_0x40dae8[_0x40dae8['UNRECOGNIZED']=-0x1]=_0x433b96(0x11d),_0x40dae8))(I||{}),v=(_0x273244=>(_0x273244[_0x273244[_0x433b96(0x114)]=0x0]=_0x433b96(0x114),_0x273244[_0x273244[_0x433b96(0x104)]=0x1]=_0x433b96(0x104),_0x273244[_0x273244[_0x433b96(0x131)]=0x2]=_0x433b96(0x131),_0x273244[_0x273244[_0x433b96(0x115)]=0x3]='Edit',_0x273244[_0x273244[_0x433b96(0x103)]=0x4]=_0x433b96(0x103),_0x273244[_0x273244[_0x433b96(0x140)]=0x5]=_0x433b96(0x140),_0x273244[_0x273244['UNRECOGNIZED']=-0x1]=_0x433b96(0x11d),_0x273244))(v||{});const y=_0x51a32e=>_0x502aa8(new Date(+_0x51a32e))['format'](_0x433b96(0x10f)),B=async(_0x14d92c,_0x49c8e0)=>{const _0x4dd617=_0x433b96,_0x9fe6e8=_0x14d92c[_0x4dd617(0x138)](_0x3e832f),_0x44f06c=_0x14d92c[_0x4dd617(0x138)](_0x588861);_0x49c8e0[_0x4dd617(0x15e)](_0x4f8176=>{const _0x369fa5=_0x4dd617;_0x9fe6e8[_0x369fa5(0x13b)](_0x4f8176)&&_0x49c8e0[_0x369fa5(0x11b)](_0x4f8176);}),_0x49c8e0[_0x4dd617(0x156)]&&(await _0x44f06c['get'](_0x4dd617(0x123),{'params':{'userIDs':[..._0x49c8e0]}}))[_0x4dd617(0x161)][_0x4dd617(0x157)]['forEach'](_0x16cc0b=>{_0x16cc0b&&_0x9fe6e8['addUser'](_0x16cc0b);});};var K=Object[_0x433b96(0x14c)],V=(_0x10f3ee,_0x2e2253,_0x59214d,_0x2b6314)=>{for(var _0x57118e=_0x2b6314>0x1?void 0x0:_0x2b6314?K(_0x2e2253,_0x59214d):_0x2e2253,_0x55461d=_0x10f3ee['length']-0x1,_0x1b5262;_0x55461d>=0x0;_0x55461d--)(_0x1b5262=_0x10f3ee[_0x55461d])&&(_0x57118e=_0x1b5262(_0x57118e)||_0x57118e);return _0x57118e;},p=(_0x5cf432,_0x5a478f)=>(_0x3e1be0,_0x4cf1b0)=>_0x5a478f(_0x3e1be0,_0x4cf1b0,_0x5cf432);let _=class extends _0x35f606{constructor(_0x25c1f3,_0x266fc4,_0x441f07,_0x4e875f){const _0x773ae4=_0x433b96;super(),this[_0x773ae4(0x108)]=_0x25c1f3,this[_0x773ae4(0x143)]=_0x266fc4,this[_0x773ae4(0x145)]=_0x441f07,this[_0x773ae4(0x13c)]=_0x4e875f,this[_0x773ae4(0x12f)](),this[_0x773ae4(0x135)]();}[_0x433b96(0x135)](){const _0x47686c=_0x433b96;this['disposeWithMe'](this[_0x47686c(0x143)][_0x47686c(0x163)]['pipe'](_0x5655f9(0x10))[_0x47686c(0x144)](_0x23662b=>{const _0x4f1827=_0x47686c,_0x879589=new Set();_0x23662b[_0x4f1827(0x15e)](_0x44ec6b=>{const _0x3b3520=_0x4f1827;if(_0x44ec6b[_0x3b3520(0x130)]===_0x3b3520(0x116)){const _0x527aea=_0x44ec6b[_0x3b3520(0x166)]['personId'];_0x879589[_0x3b3520(0x116)](_0x527aea);}}),B(this[_0x4f1827(0x13c)],_0x879589);}));}[_0x433b96(0x12f)](){const _0x489d87=_0x433b96;this['disposeWithMe'](this['_commentService'][_0x489d87(0x163)][_0x489d87(0x144)](async _0x13ba43=>{const _0x40975b=_0x489d87;var _0x36b484,_0x1c9635,_0x26b4c2,_0x1267b7;const _0x56dc6d=(_0x36b484=this[_0x40975b(0x143)][_0x40975b(0x11f)](_0x13ba43['unitId'])[_0x40975b(0x150)](_0x52439b=>_0x52439b[_0x40975b(0x12e)]===_0x13ba43[_0x40975b(0x12e)]))==null?void 0x0:_0x36b484[_0x40975b(0x110)];if(!_0x56dc6d)return;const {unitId:_0xbddecb,subUnitId:_0x581a2a}=_0x56dc6d;switch(_0x13ba43['user']&&this['_userService'][_0x40975b(0x139)](_0x13ba43[_0x40975b(0x11c)]),_0x13ba43[_0x40975b(0x130)]){case v['Add']:break;case v['Reply']:{this[_0x40975b(0x143)][_0x40975b(0x12b)](_0xbddecb,_0x581a2a,{'unitId':_0xbddecb,'subUnitId':_0x581a2a,'ref':'','id':_0x13ba43[_0x40975b(0x165)],'dT':y(+_0x13ba43[_0x40975b(0x155)]),'threadId':_0x13ba43[_0x40975b(0x12e)],'personId':(_0x26b4c2=(_0x1c9635=_0x13ba43[_0x40975b(0x11c)])==null?void 0x0:_0x1c9635['userID'])!=null?_0x26b4c2:_0x13ba43[_0x40975b(0x149)],'text':JSON[_0x40975b(0x14e)](_0x13ba43[_0x40975b(0x10c)]),'parentId':_0x56dc6d['id']});break;}case v[_0x40975b(0x103)]:{const _0x2eb9c1=this[_0x40975b(0x143)][_0x40975b(0x121)](_0xbddecb,_0x581a2a,_0x13ba43[_0x40975b(0x165)]);_0x2eb9c1&&_0x2eb9c1[_0x40975b(0x167)]&&this[_0x40975b(0x143)][_0x40975b(0x146)](_0xbddecb,_0x581a2a,_0x13ba43['replyId']);break;}case v[_0x40975b(0x115)]:{this['_threadCommentModel']['updateComment'](_0xbddecb,_0x581a2a,{'commentId':_0x13ba43[_0x40975b(0x165)],'text':JSON[_0x40975b(0x14e)](_0x13ba43['content'])});break;}case v[_0x40975b(0x140)]:{const _0x56638a=(_0x1267b7=this[_0x40975b(0x143)][_0x40975b(0x11f)](_0x13ba43[_0x40975b(0x10d)])[_0x40975b(0x150)](_0x116310=>_0x116310[_0x40975b(0x12e)]===_0x13ba43[_0x40975b(0x12e)]))==null?void 0x0:_0x1267b7[_0x40975b(0x110)];_0x56638a&&this[_0x40975b(0x143)][_0x40975b(0x136)](_0xbddecb,_0x581a2a,_0x56638a['id'],_0x13ba43[_0x40975b(0x15b)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x19a2f3(_0x27be94)),p(0x1,_0x19a2f3(_0x541f7f)),p(0x2,_0x19a2f3(_0x3e832f)),p(0x3,_0x19a2f3(_0x1c9719))],_);const z=_0x433b96(0x133),O={};var k=Object[_0x433b96(0x14c)],Q=(_0x3f5b43,_0x1d6a02,_0x4fe5fb,_0x3de444)=>{const _0x39f9c5=_0x433b96;for(var _0x348d3e=_0x3de444>0x1?void 0x0:_0x3de444?k(_0x1d6a02,_0x4fe5fb):_0x1d6a02,_0x2ba7c8=_0x3f5b43[_0x39f9c5(0x105)]-0x1,_0x5b29ec;_0x2ba7c8>=0x0;_0x2ba7c8--)(_0x5b29ec=_0x3f5b43[_0x2ba7c8])&&(_0x348d3e=_0x5b29ec(_0x348d3e)||_0x348d3e);return _0x348d3e;},b=(_0x2b7581,_0x346c15)=>(_0x2926e0,_0x11b43a)=>_0x346c15(_0x2926e0,_0x11b43a,_0x2b7581);function X(_0x1a6340,_0xaf4e7){const _0x3d962d=_0x433b96,_0x10e3a4=_0x1a6340[_0x3d962d(0x137)][0x0];return{..._0xaf4e7,'id':_0x10e3a4[_0x3d962d(0x165)],'resolved':_0x1a6340['solved']===0x1,'dT':y(_0x10e3a4['createTimestamp']),'personId':_0x10e3a4[_0x3d962d(0x149)],'threadId':_0x10e3a4[_0x3d962d(0x12e)]};}function ee(_0x16cba8,_0x193cb6,_0x58d4e7){const _0x37937c=_0x433b96;var _0x24ea70,_0x5b362c;if(((_0x5b362c=(_0x24ea70=_0x16cba8==null?void 0x0:_0x16cba8[_0x37937c(0x137)])==null?void 0x0:_0x24ea70[_0x37937c(0x105)])!=null?_0x5b362c:0x0)>0x0){const _0x27a919=(_0x488fc2,_0x7e0f8d)=>({'id':_0x488fc2['replyId'],'threadId':_0x488fc2[_0x37937c(0x12e)],'dT':y(_0x488fc2[_0x37937c(0x155)]),'personId':_0x488fc2['userId'],'resolved':_0x16cba8[_0x37937c(0x15b)]===I['Solved'],'unitId':_0x193cb6,'subUnitId':_0x58d4e7,'text':JSON[_0x37937c(0x14e)](_0x488fc2[_0x37937c(0x10c)]),'parentId':_0x7e0f8d}),_0x107c7d=_0x27a919(_0x16cba8[_0x37937c(0x137)][0x0]);return{..._0x107c7d,'children':_0x16cba8[_0x37937c(0x137)][_0x37937c(0x168)](0x1)['map'](_0x1e08bc=>_0x27a919(_0x1e08bc,_0x107c7d['id']))};}return null;}function _0x3c1b(){const _0x2e1a90=['Delete','Add','length','_config','filter','_commentService','format','rangeType','18VgaRom','content','unitId','values','YYYY/MM/DD\x20HH:mm','root','9SVmUEB','saveCommentToSnapshot','code','Unknown','Edit','add','5RNgFst','map','comments','getCurrentUser','delete','user','UNRECOGNIZED','1129521mAfFll','getUnit','reply','getComment','525yoKHhZ','/universer-api/user/list','COMMENT','listComments','stringify','ref','_initDataSource','pluginName','resolved','addComment','67749NFxljc','_configService','threadId','_init','type','Reply','/delete','thread-comment-data-source.config','/add','_initUserSync','resolveComment','replies','get','addUser','userID','getUser','_injector','setConfig','UNIVER_UNKNOWN','3002530ZXmUzJ','Solve','rangeId','Solved','_threadCommentModel','subscribe','_userService','deleteComment','531064ZYWPlg','/reply','userId','_httpService','getMemberID','getOwnPropertyDescriptor','post','parse','customRanges','find','/edit','31227gXTnXh','4117336iRvNMz','_threadCommentDataSourceService','createTimestamp','size','users','syncUpdateMutationToColla','_sessionService','error','solved','/universer-api/comment/unit/','396mNynyT','forEach','_threadCommentDataSource','/list','body','6090LoMMXa','commentUpdate$','requireSession','replyId','payload','parentId','slice','OpenOrReOpen'];_0x3c1b=function(){return _0x2e1a90;};return _0x3c1b();}let S=class{constructor(_0x56ebf8,_0x1f435e,_0x34fb4f){const _0x713bf=_0x433b96;this[_0x713bf(0x14a)]=_0x56ebf8,this[_0x713bf(0x145)]=_0x1f435e,this[_0x713bf(0x159)]=_0x34fb4f;}async[_0x433b96(0x12b)](_0x1e0166){const _0x33e0e9=_0x433b96;var _0x218879,_0x1a5ad3;const {parentId:_0x3e0de8,unitId:_0x5354e5,text:_0x547d21,threadId:_0x4eb96d}=_0x1e0166,_0x210e39=(_0x1a5ad3=(_0x218879=_0x547d21[_0x33e0e9(0x14f)])==null?void 0x0:_0x218879[_0x33e0e9(0x107)](_0x5ac22e=>_0x5ac22e[_0x33e0e9(0x10a)]===_0x2671e9[_0x33e0e9(0x124)])[_0x33e0e9(0x118)](_0x4a523b=>_0x4a523b['rangeId']))!=null?_0x1a5ad3:[],_0x3ba879=JSON['stringify'](_0x547d21),_0xda0c44=(await this[_0x33e0e9(0x159)][_0x33e0e9(0x164)](_0x5354e5))[_0x33e0e9(0x14b)]();if(_0x3e0de8){const _0x1e7e36={'memberId':_0xda0c44,'unitId':_0x5354e5,'content':_0x3ba879,'mention':_0x210e39,'threadId':_0x4eb96d},_0x45eb26=(await this[_0x33e0e9(0x14a)]['post'](_0x33e0e9(0x15c)+_0x5354e5+_0x33e0e9(0x148),{'body':_0x1e7e36}))[_0x33e0e9(0x161)][_0x33e0e9(0x120)];return{..._0x1e0166,'id':_0x45eb26[_0x33e0e9(0x165)],'dT':_0x502aa8(+_0x45eb26[_0x33e0e9(0x155)])[_0x33e0e9(0x109)](_0x33e0e9(0x10f)),'personId':_0x45eb26['userId']};}else{const _0x2b6205={'memberId':_0xda0c44,'unitId':_0x5354e5,'content':_0x3ba879,'mention':_0x210e39},_0x496b40=await this[_0x33e0e9(0x14a)]['post'](_0x33e0e9(0x15c)+_0x5354e5+_0x33e0e9(0x134),{'body':_0x2b6205});return X(_0x496b40[_0x33e0e9(0x161)]['comment'],_0x1e0166);}}async['updateComment'](_0x1349ba){const _0x383eaf=_0x433b96;var _0x552fab,_0x529c60;const {text:_0x293243,unitId:_0x38ea43}=_0x1349ba,_0x20e1dc=(_0x529c60=(_0x552fab=_0x293243[_0x383eaf(0x14f)])==null?void 0x0:_0x552fab['filter'](_0x12a5cc=>_0x12a5cc[_0x383eaf(0x10a)]===_0x2671e9[_0x383eaf(0x124)])[_0x383eaf(0x118)](_0x531ac0=>_0x531ac0[_0x383eaf(0x141)]))!=null?_0x529c60:[],_0x307461=JSON[_0x383eaf(0x126)](_0x293243),_0x24494d=_0x1349ba['threadId'],_0x44d4b3=_0x1349ba['id'],_0x241784={'memberId':(await this[_0x383eaf(0x159)]['requireSession'](_0x38ea43))['getMemberID'](),'unitId':_0x38ea43,'threadId':_0x24494d,'mention':_0x20e1dc,'content':_0x307461,'replyId':_0x44d4b3},_0x4999e7=await this[_0x383eaf(0x14a)][_0x383eaf(0x14d)](_0x383eaf(0x15c)+_0x38ea43+_0x383eaf(0x151),{'body':_0x241784});return!_0x4999e7[_0x383eaf(0x161)][_0x383eaf(0x15a)]||_0x4999e7[_0x383eaf(0x161)][_0x383eaf(0x15a)][_0x383eaf(0x113)]===0x1;}async['resolveComment'](_0x1ac0c1){const _0x2dc82c=_0x433b96,{unitId:_0x1d17ed}=_0x1ac0c1,_0xc49917=_0x1ac0c1[_0x2dc82c(0x12e)],_0x41b141={'memberId':this[_0x2dc82c(0x145)][_0x2dc82c(0x11a)]()[_0x2dc82c(0x13a)],'unitId':_0x1d17ed,'threadId':_0xc49917,'solved':_0x1ac0c1[_0x2dc82c(0x12a)]?I['Solved']:I[_0x2dc82c(0x169)]},_0x58df3f=await this[_0x2dc82c(0x14a)]['post'](_0x2dc82c(0x15c)+_0x1d17ed+'/solved',{'body':_0x41b141});return!_0x58df3f[_0x2dc82c(0x161)][_0x2dc82c(0x15a)]||_0x58df3f[_0x2dc82c(0x161)]['error'][_0x2dc82c(0x113)]===0x1;}async[_0x433b96(0x146)](_0x228c3d,_0xbb5bb9,_0x5343dc,_0x5b9a01){const _0xc5baf3=_0x433b96,_0x520b22={'memberId':(await this[_0xc5baf3(0x159)][_0xc5baf3(0x164)](_0x228c3d))['getMemberID'](),'threadId':_0x5343dc,'replyId':_0x5b9a01,'unitId':_0x228c3d},_0x53ca17=await this[_0xc5baf3(0x14a)][_0xc5baf3(0x14d)](_0xc5baf3(0x15c)+_0x228c3d+_0xc5baf3(0x132),{'body':_0x520b22});return!_0x53ca17['body']['error']||_0x53ca17['body'][_0xc5baf3(0x15a)][_0xc5baf3(0x113)]===0x1;}async[_0x433b96(0x125)](_0x11f100,_0x390026,_0x25f4a4){const _0x2d1cde=_0x433b96,_0x5a04f1={'unitId':_0x11f100,'threadId':_0x25f4a4},_0x5d105d=await this['_httpService'][_0x2d1cde(0x14d)](_0x2d1cde(0x15c)+_0x11f100+_0x2d1cde(0x160),{'body':_0x5a04f1}),_0x3f0bba=_0x25f4a4[_0x2d1cde(0x118)](_0x133227=>ee(_0x5d105d[_0x2d1cde(0x161)][_0x2d1cde(0x119)][_0x133227],_0x11f100,_0x390026))[_0x2d1cde(0x107)](Boolean);return Object[_0x2d1cde(0x10e)](_0x5d105d[_0x2d1cde(0x161)][_0x2d1cde(0x157)])['forEach'](_0x1c123b=>{const _0x434c66=_0x2d1cde;this['_userService'][_0x434c66(0x139)](_0x1c123b);}),_0x3f0bba;}[_0x433b96(0x112)](_0x226f37){const _0x4711dd=_0x433b96;return{'id':_0x226f37['id'],'threadId':_0x226f37[_0x4711dd(0x12e)],'ref':_0x226f37[_0x4711dd(0x127)]};}};S=Q([b(0x0,_0x19a2f3(_0x588861)),b(0x1,_0x19a2f3(_0x3e832f)),b(0x2,_0x19a2f3(_0x23c102))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x25486c,_0x2b1918,_0xe538fb,_0x460f47)=>{const _0x1e7bc4=_0x433b96;for(var _0x28ce06=_0x460f47>0x1?void 0x0:_0x460f47?re(_0x2b1918,_0xe538fb):_0x2b1918,_0x12bd81=_0x25486c[_0x1e7bc4(0x105)]-0x1,_0x837542;_0x12bd81>=0x0;_0x12bd81--)(_0x837542=_0x25486c[_0x12bd81])&&(_0x28ce06=_0x837542(_0x28ce06)||_0x28ce06);return _0x28ce06;},M=(_0x51aa06,_0x3ec4df)=>(_0x2f426d,_0x2b5afd)=>_0x3ec4df(_0x2f426d,_0x2b5afd,_0x51aa06);let f=class extends _0x35f606{constructor(_0x3d6206,_0xe8f24e){const _0x87d9b=_0x433b96;super(),this[_0x87d9b(0x154)]=_0x3d6206,this['_threadCommentDataSource']=_0xe8f24e,this['_initDataSource']();}[_0x433b96(0x128)](){const _0x4759ad=_0x433b96;this[_0x4759ad(0x154)]['dataSource']=this[_0x4759ad(0x15f)],this['_threadCommentDataSourceService'][_0x4759ad(0x158)]=!0x1;}};f=te([M(0x0,_0x22dd5c),M(0x1,_0x19a2f3(S))],f);function _0x2d2d(_0x2a3eac,_0x2cd947){_0x2a3eac=_0x2a3eac-0x103;const _0x3c1b51=_0x3c1b();let _0x2d2d46=_0x3c1b51[_0x2a3eac];return _0x2d2d46;}var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3dc511,_0x16befb,_0x2177aa)=>_0x16befb in _0x3dc511?se(_0x3dc511,_0x16befb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2177aa}):_0x3dc511[_0x16befb]=_0x2177aa,ie=(_0x378558,_0x40153c,_0x2e7d75,_0x1cf7df)=>{const _0x4f9018=_0x433b96;for(var _0x3962bf=_0x1cf7df>0x1?void 0x0:_0x1cf7df?oe(_0x40153c,_0x2e7d75):_0x40153c,_0x391e69=_0x378558[_0x4f9018(0x105)]-0x1,_0x4a6900;_0x391e69>=0x0;_0x391e69--)(_0x4a6900=_0x378558[_0x391e69])&&(_0x3962bf=_0x4a6900(_0x3962bf)||_0x3962bf);return _0x3962bf;},N=(_0x46a19f,_0x429be6)=>(_0x4ed3d9,_0x3891c9)=>_0x429be6(_0x4ed3d9,_0x3891c9,_0x46a19f),$=(_0x200737,_0x18b45a,_0xd171c6)=>ne(_0x200737,typeof _0x18b45a!='symbol'?_0x18b45a+'':_0x18b45a,_0xd171c6);let g=class extends _0x5ee83e{constructor(_0x546da7=O,_0x10b821,_0x6bb5ba){const _0x55bfec=_0x433b96;super(),this[_0x55bfec(0x106)]=_0x546da7,this[_0x55bfec(0x13c)]=_0x10b821,this[_0x55bfec(0x12d)]=_0x6bb5ba;const {..._0x5ef9c9}=_0x1eba46({},O,this[_0x55bfec(0x106)]);this[_0x55bfec(0x12d)][_0x55bfec(0x13d)](z,_0x5ef9c9);}['onStarting'](){const _0x204933=_0x433b96;[[S],[f],[_]][_0x204933(0x15e)](_0x174d8e=>{const _0x353bc6=_0x204933;this[_0x353bc6(0x13c)][_0x353bc6(0x116)](_0x174d8e);});}['onReady'](){const _0x247d36=_0x433b96;this[_0x247d36(0x13c)][_0x247d36(0x138)](f),this[_0x247d36(0x13c)][_0x247d36(0x138)](_);}};$(g,_0x433b96(0x129),W),$(g,_0x433b96(0x130),_0x1a8c17[_0x433b96(0x13e)]),g=ie([_0x5d048e(_0x48228f,_0x47447c,_0x51e432),N(0x1,_0x19a2f3(_0x1c9719)),N(0x2,_0x3e7a47)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x231458=_0x43f0;(function(_0x5102db,_0x2b7586){const _0x5b2b93=_0x43f0,_0x321477=_0x5102db();while(!![]){try{const _0x3c4b1c=parseInt(_0x5b2b93(0x74))/0x1*(parseInt(_0x5b2b93(0xc0))/0x2)+-parseInt(_0x5b2b93(0x75))/0x3+-parseInt(_0x5b2b93(0x98))/0x4*(parseInt(_0x5b2b93(0xcc))/0x5)+-parseInt(_0x5b2b93(0x78))/0x6+-parseInt(_0x5b2b93(0x6c))/0x7+-parseInt(_0x5b2b93(0x7a))/0x8*(parseInt(_0x5b2b93(0xc6))/0x9)+parseInt(_0x5b2b93(0xb2))/0xa;if(_0x3c4b1c===_0x2b7586)break;else _0x321477['push'](_0x321477['shift']());}catch(_0xb1d5e1){_0x321477['push'](_0x321477['shift']());}}}(_0x5e35,0x27ffd));import{CommentService as _0x20b5b6,CollaborationSessionService as _0x41a581,UniverCollaborationClientPlugin as _0x40c7ce}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3794a6}from'@univerjs-pro/license';import{dayjs as _0x1a50d1,UserManagerService as _0x1caf0d,Inject as _0x3fb278,Injector as _0x1416f8,Disposable as _0x519c68,CustomRangeType as _0x34627d,UniverInstanceType as _0x13e5ee,DependentOn as _0x326330,IConfigService as _0x25bde9,Plugin as _0x3e97cc,merge as _0x58bb88}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x47e1d5}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1b6328,IThreadCommentDataSourceService as _0x563d0d}from'@univerjs/thread-comment';import{bufferTime as _0x11cf83}from'rxjs';function _0x43f0(_0x22e547,_0x3e2ffa){_0x22e547=_0x22e547-0x64;const _0x5e3560=_0x5e35();let _0x43f0b7=_0x5e3560[_0x22e547];return _0x43f0b7;}import{HTTPService as _0x269dd4}from'@univerjs/network';const W=_0x231458(0x92);function _0x5e35(){const _0x2b0d9e=['Edit','add','14373WVenHI','getCurrentUser','length','symbol','post','_injector','5ERuIrS','_httpService','_initUserSync','/add','filter','subscribe','YYYY/MM/DD\x20HH:mm','syncUpdateMutationToColla','reply','forEach','1316322XwoJmL','delete','error','_initDataSource','commentUpdate$','Delete','comment','unitId','985pQWjHV','118935ZvVfhV','userId','/universer-api/user/list','197640heeEAB','_sessionService','1208zSADBw','threadId','values','Solve','users','find','_init','UNRECOGNIZED','thread-comment-data-source.config','getUnit','parentId','/universer-api/comment/unit/','createTimestamp','Add','disposeWithMe','body','UNIVER_UNKNOWN','addUser','_commentService','rangeId','pluginName','format','OpenOrReOpen','/edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','size','setConfig','replyId','customRanges','_threadCommentDataSource','422068wOmwwL','onStarting','getMemberID','_config','code','content','Solved','_threadCommentDataSourceService','rangeType','deleteComment','Unknown','_configService','root','parse','_userService','user','getComment','getUser','ref','Reply','dataSource','map','updateComment','_threadCommentModel','onReady','resolveComment','7307470gUJAHC','addComment','listComments','/solved','defineProperty','COMMENT','resolved','stringify','type','replies','requireSession','comments','getOwnPropertyDescriptor','payload','82xyhusV','solved','userID','get'];_0x5e35=function(){return _0x2b0d9e;};return _0x5e35();}var I=(_0x4ef7e3=>(_0x4ef7e3[_0x4ef7e3[_0x231458(0x90)]=0x0]=_0x231458(0x90),_0x4ef7e3[_0x4ef7e3[_0x231458(0x9e)]=0x1]=_0x231458(0x9e),_0x4ef7e3[_0x4ef7e3[_0x231458(0x81)]=-0x1]=_0x231458(0x81),_0x4ef7e3))(I||{}),v=(_0x4692a5=>(_0x4692a5[_0x4692a5['Unknown']=0x0]=_0x231458(0xa2),_0x4692a5[_0x4692a5[_0x231458(0x87)]=0x1]=_0x231458(0x87),_0x4692a5[_0x4692a5[_0x231458(0xab)]=0x2]=_0x231458(0xab),_0x4692a5[_0x4692a5[_0x231458(0xc4)]=0x3]=_0x231458(0xc4),_0x4692a5[_0x4692a5[_0x231458(0x71)]=0x4]=_0x231458(0x71),_0x4692a5[_0x4692a5['Solve']=0x5]=_0x231458(0x7d),_0x4692a5[_0x4692a5[_0x231458(0x81)]=-0x1]=_0x231458(0x81),_0x4692a5))(v||{});const y=_0x79c51e=>_0x1a50d1(new Date(+_0x79c51e))[_0x231458(0x8f)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3bb590,_0x1f806d)=>{const _0x4e232b=_0x231458,_0x4e6f18=_0x3bb590[_0x4e232b(0xc3)](_0x1caf0d),_0x1fcd03=_0x3bb590[_0x4e232b(0xc3)](_0x269dd4);_0x1f806d[_0x4e232b(0x6b)](_0x5550ed=>{const _0x345121=_0x4e232b;_0x4e6f18[_0x345121(0xa9)](_0x5550ed)&&_0x1f806d[_0x345121(0x6d)](_0x5550ed);}),_0x1f806d[_0x4e232b(0x93)]&&(await _0x1fcd03[_0x4e232b(0xc3)](_0x4e232b(0x77),{'params':{'userIDs':[..._0x1f806d]}}))[_0x4e232b(0x89)]['users'][_0x4e232b(0x6b)](_0x5e00e6=>{_0x5e00e6&&_0x4e6f18['addUser'](_0x5e00e6);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3c6b7e,_0x2021d1,_0x5daf91,_0x5c80f0)=>{const _0x54f4c0=_0x231458;for(var _0x106b8f=_0x5c80f0>0x1?void 0x0:_0x5c80f0?K(_0x2021d1,_0x5daf91):_0x2021d1,_0x304f60=_0x3c6b7e[_0x54f4c0(0xc8)]-0x1,_0x3d6e36;_0x304f60>=0x0;_0x304f60--)(_0x3d6e36=_0x3c6b7e[_0x304f60])&&(_0x106b8f=_0x3d6e36(_0x106b8f)||_0x106b8f);return _0x106b8f;},p=(_0xf9b229,_0x1eb5c0)=>(_0x3e81f1,_0x5f242c)=>_0x1eb5c0(_0x3e81f1,_0x5f242c,_0xf9b229);let _=class extends _0x519c68{constructor(_0x3616ae,_0x539f17,_0x2f208f,_0x468c09){const _0x49e627=_0x231458;super(),this['_commentService']=_0x3616ae,this[_0x49e627(0xaf)]=_0x539f17,this['_userService']=_0x2f208f,this[_0x49e627(0xcb)]=_0x468c09,this[_0x49e627(0x80)](),this['_initUserSync']();}[_0x231458(0x64)](){const _0x47fb5d=_0x231458;this[_0x47fb5d(0x88)](this[_0x47fb5d(0xaf)]['commentUpdate$']['pipe'](_0x11cf83(0x10))[_0x47fb5d(0x67)](_0x41f0a4=>{const _0x142e96=_0x47fb5d,_0x512799=new Set();_0x41f0a4[_0x142e96(0x6b)](_0x808872=>{const _0x17bc13=_0x142e96;if(_0x808872[_0x17bc13(0xba)]===_0x17bc13(0xc5)){const _0x299246=_0x808872[_0x17bc13(0xbf)]['personId'];_0x512799['add'](_0x299246);}}),B(this[_0x142e96(0xcb)],_0x512799);}));}['_init'](){const _0x1f6025=_0x231458;this[_0x1f6025(0x88)](this[_0x1f6025(0x8c)][_0x1f6025(0x70)][_0x1f6025(0x67)](async _0x10ff55=>{const _0x4a5eb3=_0x1f6025;var _0x3647c2,_0x3a598a,_0x5b8a40,_0x5511ab;const _0x43d6c9=(_0x3647c2=this[_0x4a5eb3(0xaf)][_0x4a5eb3(0x83)](_0x10ff55[_0x4a5eb3(0x73)])[_0x4a5eb3(0x7f)](_0x53ff03=>_0x53ff03[_0x4a5eb3(0x7b)]===_0x10ff55[_0x4a5eb3(0x7b)]))==null?void 0x0:_0x3647c2['root'];if(!_0x43d6c9)return;const {unitId:_0x399263,subUnitId:_0x40a574}=_0x43d6c9;switch(_0x10ff55[_0x4a5eb3(0xa7)]&&this[_0x4a5eb3(0xa6)][_0x4a5eb3(0x8b)](_0x10ff55[_0x4a5eb3(0xa7)]),_0x10ff55[_0x4a5eb3(0xba)]){case v[_0x4a5eb3(0x87)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x399263,_0x40a574,{'unitId':_0x399263,'subUnitId':_0x40a574,'ref':'','id':_0x10ff55['replyId'],'dT':y(+_0x10ff55[_0x4a5eb3(0x86)]),'threadId':_0x10ff55[_0x4a5eb3(0x7b)],'personId':(_0x5b8a40=(_0x3a598a=_0x10ff55[_0x4a5eb3(0xa7)])==null?void 0x0:_0x3a598a[_0x4a5eb3(0xc2)])!=null?_0x5b8a40:_0x10ff55[_0x4a5eb3(0x76)],'text':JSON['parse'](_0x10ff55[_0x4a5eb3(0x9d)]),'parentId':_0x43d6c9['id']});break;}case v['Delete']:{const _0x13e83f=this[_0x4a5eb3(0xaf)][_0x4a5eb3(0xa8)](_0x399263,_0x40a574,_0x10ff55['replyId']);_0x13e83f&&_0x13e83f[_0x4a5eb3(0x84)]&&this[_0x4a5eb3(0xaf)][_0x4a5eb3(0xa1)](_0x399263,_0x40a574,_0x10ff55[_0x4a5eb3(0x95)]);break;}case v['Edit']:{this[_0x4a5eb3(0xaf)]['updateComment'](_0x399263,_0x40a574,{'commentId':_0x10ff55[_0x4a5eb3(0x95)],'text':JSON[_0x4a5eb3(0xa5)](_0x10ff55[_0x4a5eb3(0x9d)])});break;}case v[_0x4a5eb3(0x7d)]:{const _0x30c189=(_0x5511ab=this[_0x4a5eb3(0xaf)]['getUnit'](_0x10ff55[_0x4a5eb3(0x73)])[_0x4a5eb3(0x7f)](_0x2cd669=>_0x2cd669['threadId']===_0x10ff55[_0x4a5eb3(0x7b)]))==null?void 0x0:_0x5511ab[_0x4a5eb3(0xa4)];_0x30c189&&this['_threadCommentModel']['resolveComment'](_0x399263,_0x40a574,_0x30c189['id'],_0x10ff55['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x3fb278(_0x20b5b6)),p(0x1,_0x3fb278(_0x1b6328)),p(0x2,_0x3fb278(_0x1caf0d)),p(0x3,_0x3fb278(_0x1416f8))],_);const z=_0x231458(0x82),O={};var k=Object[_0x231458(0xbe)],Q=(_0x584a99,_0x43e7eb,_0x2cebbb,_0x208e32)=>{const _0x456ba3=_0x231458;for(var _0x395a4a=_0x208e32>0x1?void 0x0:_0x208e32?k(_0x43e7eb,_0x2cebbb):_0x43e7eb,_0x4b94e3=_0x584a99[_0x456ba3(0xc8)]-0x1,_0x4ee66d;_0x4b94e3>=0x0;_0x4b94e3--)(_0x4ee66d=_0x584a99[_0x4b94e3])&&(_0x395a4a=_0x4ee66d(_0x395a4a)||_0x395a4a);return _0x395a4a;},b=(_0x42de08,_0x20225f)=>(_0x493f97,_0x2266f7)=>_0x20225f(_0x493f97,_0x2266f7,_0x42de08);function X(_0x27ade2,_0x4e6a02){const _0x373dfa=_0x231458,_0x1d0fc2=_0x27ade2[_0x373dfa(0xbb)][0x0];return{..._0x4e6a02,'id':_0x1d0fc2[_0x373dfa(0x95)],'resolved':_0x27ade2[_0x373dfa(0xc1)]===0x1,'dT':y(_0x1d0fc2[_0x373dfa(0x86)]),'personId':_0x1d0fc2[_0x373dfa(0x76)],'threadId':_0x1d0fc2['threadId']};}function ee(_0xc4f5c,_0x17465c,_0x5c5932){const _0x50bc7d=_0x231458;var _0x4317af,_0x316c56;if(((_0x316c56=(_0x4317af=_0xc4f5c==null?void 0x0:_0xc4f5c[_0x50bc7d(0xbb)])==null?void 0x0:_0x4317af[_0x50bc7d(0xc8)])!=null?_0x316c56:0x0)>0x0){const _0x1b85b0=(_0x503676,_0x102c51)=>({'id':_0x503676['replyId'],'threadId':_0x503676['threadId'],'dT':y(_0x503676[_0x50bc7d(0x86)]),'personId':_0x503676['userId'],'resolved':_0xc4f5c[_0x50bc7d(0xc1)]===I[_0x50bc7d(0x9e)],'unitId':_0x17465c,'subUnitId':_0x5c5932,'text':JSON[_0x50bc7d(0xa5)](_0x503676['content']),'parentId':_0x102c51}),_0x8f41eb=_0x1b85b0(_0xc4f5c[_0x50bc7d(0xbb)][0x0]);return{..._0x8f41eb,'children':_0xc4f5c[_0x50bc7d(0xbb)]['slice'](0x1)[_0x50bc7d(0xad)](_0x4605f7=>_0x1b85b0(_0x4605f7,_0x8f41eb['id']))};}return null;}let S=class{constructor(_0x47bedd,_0xa9358a,_0xf0de91){const _0x56c29e=_0x231458;this[_0x56c29e(0xcd)]=_0x47bedd,this[_0x56c29e(0xa6)]=_0xa9358a,this[_0x56c29e(0x79)]=_0xf0de91;}async[_0x231458(0xb3)](_0x2d48be){const _0x85b75d=_0x231458;var _0x4ce832,_0x61ac4;const {parentId:_0x336bac,unitId:_0x48fd40,text:_0x31ab99,threadId:_0x57ff7c}=_0x2d48be,_0x225db2=(_0x61ac4=(_0x4ce832=_0x31ab99[_0x85b75d(0x96)])==null?void 0x0:_0x4ce832[_0x85b75d(0x66)](_0x53528d=>_0x53528d[_0x85b75d(0xa0)]===_0x34627d[_0x85b75d(0xb7)])[_0x85b75d(0xad)](_0x2b515f=>_0x2b515f[_0x85b75d(0x8d)]))!=null?_0x61ac4:[],_0x3e1990=JSON[_0x85b75d(0xb9)](_0x31ab99),_0x4786f4=(await this['_sessionService'][_0x85b75d(0xbc)](_0x48fd40))[_0x85b75d(0x9a)]();if(_0x336bac){const _0xa7c55e={'memberId':_0x4786f4,'unitId':_0x48fd40,'content':_0x3e1990,'mention':_0x225db2,'threadId':_0x57ff7c},_0x45ffcc=(await this[_0x85b75d(0xcd)][_0x85b75d(0xca)](_0x85b75d(0x85)+_0x48fd40+'/reply',{'body':_0xa7c55e}))[_0x85b75d(0x89)][_0x85b75d(0x6a)];return{..._0x2d48be,'id':_0x45ffcc[_0x85b75d(0x95)],'dT':_0x1a50d1(+_0x45ffcc[_0x85b75d(0x86)])['format'](_0x85b75d(0x68)),'personId':_0x45ffcc[_0x85b75d(0x76)]};}else{const _0x414308={'memberId':_0x4786f4,'unitId':_0x48fd40,'content':_0x3e1990,'mention':_0x225db2},_0x33b3fc=await this[_0x85b75d(0xcd)][_0x85b75d(0xca)]('/universer-api/comment/unit/'+_0x48fd40+_0x85b75d(0x65),{'body':_0x414308});return X(_0x33b3fc[_0x85b75d(0x89)][_0x85b75d(0x72)],_0x2d48be);}}async[_0x231458(0xae)](_0x541770){const _0x3cf72a=_0x231458;var _0x28a5ee,_0x109011;const {text:_0x37bc5c,unitId:_0x2ff56e}=_0x541770,_0x4f476a=(_0x109011=(_0x28a5ee=_0x37bc5c[_0x3cf72a(0x96)])==null?void 0x0:_0x28a5ee[_0x3cf72a(0x66)](_0xc4082=>_0xc4082[_0x3cf72a(0xa0)]===_0x34627d[_0x3cf72a(0xb7)])['map'](_0x587523=>_0x587523['rangeId']))!=null?_0x109011:[],_0x1e6715=JSON[_0x3cf72a(0xb9)](_0x37bc5c),_0x2a50ed=_0x541770[_0x3cf72a(0x7b)],_0x227939=_0x541770['id'],_0x19ca49={'memberId':(await this[_0x3cf72a(0x79)][_0x3cf72a(0xbc)](_0x2ff56e))[_0x3cf72a(0x9a)](),'unitId':_0x2ff56e,'threadId':_0x2a50ed,'mention':_0x4f476a,'content':_0x1e6715,'replyId':_0x227939},_0x25c328=await this['_httpService'][_0x3cf72a(0xca)](_0x3cf72a(0x85)+_0x2ff56e+_0x3cf72a(0x91),{'body':_0x19ca49});return!_0x25c328['body'][_0x3cf72a(0x6e)]||_0x25c328[_0x3cf72a(0x89)]['error'][_0x3cf72a(0x9c)]===0x1;}async[_0x231458(0xb1)](_0x5e4769){const _0x30d8cb=_0x231458,{unitId:_0x13a05b}=_0x5e4769,_0xe85882=_0x5e4769[_0x30d8cb(0x7b)],_0x1d1a69={'memberId':this[_0x30d8cb(0xa6)][_0x30d8cb(0xc7)]()[_0x30d8cb(0xc2)],'unitId':_0x13a05b,'threadId':_0xe85882,'solved':_0x5e4769[_0x30d8cb(0xb8)]?I['Solved']:I[_0x30d8cb(0x90)]},_0x5409bb=await this[_0x30d8cb(0xcd)][_0x30d8cb(0xca)](_0x30d8cb(0x85)+_0x13a05b+_0x30d8cb(0xb5),{'body':_0x1d1a69});return!_0x5409bb['body'][_0x30d8cb(0x6e)]||_0x5409bb[_0x30d8cb(0x89)][_0x30d8cb(0x6e)][_0x30d8cb(0x9c)]===0x1;}async[_0x231458(0xa1)](_0x4953d3,_0x3f84a6,_0x31bd95,_0x115941){const _0x309135=_0x231458,_0x117c2={'memberId':(await this[_0x309135(0x79)][_0x309135(0xbc)](_0x4953d3))['getMemberID'](),'threadId':_0x31bd95,'replyId':_0x115941,'unitId':_0x4953d3},_0x422c3d=await this[_0x309135(0xcd)]['post'](_0x309135(0x85)+_0x4953d3+'/delete',{'body':_0x117c2});return!_0x422c3d[_0x309135(0x89)][_0x309135(0x6e)]||_0x422c3d['body'][_0x309135(0x6e)]['code']===0x1;}async[_0x231458(0xb4)](_0x4d4a98,_0xade5a0,_0x39c87f){const _0x4ac75=_0x231458,_0xd43ed0={'unitId':_0x4d4a98,'threadId':_0x39c87f},_0x5240bf=await this['_httpService']['post'](_0x4ac75(0x85)+_0x4d4a98+'/list',{'body':_0xd43ed0}),_0x35b5cf=_0x39c87f[_0x4ac75(0xad)](_0x373e1c=>ee(_0x5240bf[_0x4ac75(0x89)][_0x4ac75(0xbd)][_0x373e1c],_0x4d4a98,_0xade5a0))[_0x4ac75(0x66)](Boolean);return Object[_0x4ac75(0x7c)](_0x5240bf[_0x4ac75(0x89)][_0x4ac75(0x7e)])['forEach'](_0x4d7cda=>{const _0x5acd67=_0x4ac75;this[_0x5acd67(0xa6)][_0x5acd67(0x8b)](_0x4d7cda);}),_0x35b5cf;}['saveCommentToSnapshot'](_0x5a886f){const _0x37b405=_0x231458;return{'id':_0x5a886f['id'],'threadId':_0x5a886f[_0x37b405(0x7b)],'ref':_0x5a886f[_0x37b405(0xaa)]};}};S=Q([b(0x0,_0x3fb278(_0x269dd4)),b(0x1,_0x3fb278(_0x1caf0d)),b(0x2,_0x3fb278(_0x41a581))],S);var re=Object[_0x231458(0xbe)],te=(_0x57dcf0,_0x32b319,_0x576092,_0x518402)=>{const _0x50b58d=_0x231458;for(var _0x383283=_0x518402>0x1?void 0x0:_0x518402?re(_0x32b319,_0x576092):_0x32b319,_0x1d9cd9=_0x57dcf0[_0x50b58d(0xc8)]-0x1,_0x2849bc;_0x1d9cd9>=0x0;_0x1d9cd9--)(_0x2849bc=_0x57dcf0[_0x1d9cd9])&&(_0x383283=_0x2849bc(_0x383283)||_0x383283);return _0x383283;},M=(_0x4f6e49,_0x506561)=>(_0x3bc141,_0x25b58f)=>_0x506561(_0x3bc141,_0x25b58f,_0x4f6e49);let f=class extends _0x519c68{constructor(_0x3a175e,_0x25e067){const _0x20b3fd=_0x231458;super(),this[_0x20b3fd(0x9f)]=_0x3a175e,this[_0x20b3fd(0x97)]=_0x25e067,this[_0x20b3fd(0x6f)]();}[_0x231458(0x6f)](){const _0x47f909=_0x231458;this[_0x47f909(0x9f)][_0x47f909(0xac)]=this[_0x47f909(0x97)],this[_0x47f909(0x9f)][_0x47f909(0x69)]=!0x1;}};f=te([M(0x0,_0x563d0d),M(0x1,_0x3fb278(S))],f);var se=Object[_0x231458(0xb6)],oe=Object[_0x231458(0xbe)],ne=(_0x7d0e6a,_0x31e64d,_0x55a49f)=>_0x31e64d in _0x7d0e6a?se(_0x7d0e6a,_0x31e64d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x55a49f}):_0x7d0e6a[_0x31e64d]=_0x55a49f,ie=(_0x49da57,_0x121fac,_0x92989f,_0xa89334)=>{const _0x31be25=_0x231458;for(var _0x20f65b=_0xa89334>0x1?void 0x0:_0xa89334?oe(_0x121fac,_0x92989f):_0x121fac,_0x2c6408=_0x49da57[_0x31be25(0xc8)]-0x1,_0x53ec7d;_0x2c6408>=0x0;_0x2c6408--)(_0x53ec7d=_0x49da57[_0x2c6408])&&(_0x20f65b=_0x53ec7d(_0x20f65b)||_0x20f65b);return _0x20f65b;},N=(_0x27ebf2,_0x216e31)=>(_0x51c29b,_0x1cebb8)=>_0x216e31(_0x51c29b,_0x1cebb8,_0x27ebf2),$=(_0x4a1bfa,_0x3551cf,_0x44ab4f)=>ne(_0x4a1bfa,typeof _0x3551cf!=_0x231458(0xc9)?_0x3551cf+'':_0x3551cf,_0x44ab4f);let g=class extends _0x3e97cc{constructor(_0x1ba5e1=O,_0x29581f,_0x25a5ec){const _0xec65f7=_0x231458;super(),this[_0xec65f7(0x9b)]=_0x1ba5e1,this[_0xec65f7(0xcb)]=_0x29581f,this['_configService']=_0x25a5ec;const {..._0x56334c}=_0x58bb88({},O,this[_0xec65f7(0x9b)]);this[_0xec65f7(0xa3)][_0xec65f7(0x94)](z,_0x56334c);}[_0x231458(0x99)](){const _0x3a9dd8=_0x231458;[[S],[f],[_]][_0x3a9dd8(0x6b)](_0x569e31=>{const _0x284db3=_0x3a9dd8;this['_injector'][_0x284db3(0xc5)](_0x569e31);});}[_0x231458(0xb0)](){const _0x588446=_0x231458;this[_0x588446(0xcb)][_0x588446(0xc3)](f),this[_0x588446(0xcb)][_0x588446(0xc3)](_);}};$(g,_0x231458(0x8e),W),$(g,'type',_0x13e5ee[_0x231458(0x8a)]),g=ie([_0x326330(_0x47e1d5,_0x40c7ce,_0x3794a6),N(0x1,_0x3fb278(_0x1416f8)),N(0x2,_0x25bde9)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x433b96=_0x2d2d;(function(_0x50bea8,_0xbb9379){const _0x47d297=_0x2d2d,_0x42fc46=_0x50bea8();while(!![]){try{const _0x4726c5=parseInt(_0x47d297(0x152))/0x1*(parseInt(_0x47d297(0x10b))/0x2)+parseInt(_0x47d297(0x11e))/0x3+parseInt(_0x47d297(0x147))/0x4*(parseInt(_0x47d297(0x117))/0x5)+parseInt(_0x47d297(0x162))/0x6*(-parseInt(_0x47d297(0x122))/0x7)+-parseInt(_0x47d297(0x153))/0x8+parseInt(_0x47d297(0x111))/0x9*(parseInt(_0x47d297(0x13f))/0xa)+parseInt(_0x47d297(0x12c))/0xb*(-parseInt(_0x47d297(0x15d))/0xc);if(_0x4726c5===_0xbb9379)break;else _0x42fc46['push'](_0x42fc46['shift']());}catch(_0x31e359){_0x42fc46['push'](_0x42fc46['shift']());}}}(_0x3c1b,0x48652));import{CommentService as _0x27be94,CollaborationSessionService as _0x23c102,UniverCollaborationClientPlugin as _0x47447c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x51e432}from'@univerjs-pro/license';import{dayjs as _0x502aa8,UserManagerService as _0x3e832f,Inject as _0x19a2f3,Injector as _0x1c9719,Disposable as _0x35f606,CustomRangeType as _0x2671e9,UniverInstanceType as _0x1a8c17,DependentOn as _0x5d048e,IConfigService as _0x3e7a47,Plugin as _0x5ee83e,merge as _0x1eba46}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x48228f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x541f7f,IThreadCommentDataSourceService as _0x22dd5c}from'@univerjs/thread-comment';import{bufferTime as _0x5655f9}from'rxjs';import{HTTPService as _0x588861}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x40dae8=>(_0x40dae8[_0x40dae8[_0x433b96(0x169)]=0x0]=_0x433b96(0x169),_0x40dae8[_0x40dae8[_0x433b96(0x142)]=0x1]=_0x433b96(0x142),_0x40dae8[_0x40dae8['UNRECOGNIZED']=-0x1]=_0x433b96(0x11d),_0x40dae8))(I||{}),v=(_0x273244=>(_0x273244[_0x273244[_0x433b96(0x114)]=0x0]=_0x433b96(0x114),_0x273244[_0x273244[_0x433b96(0x104)]=0x1]=_0x433b96(0x104),_0x273244[_0x273244[_0x433b96(0x131)]=0x2]=_0x433b96(0x131),_0x273244[_0x273244[_0x433b96(0x115)]=0x3]='Edit',_0x273244[_0x273244[_0x433b96(0x103)]=0x4]=_0x433b96(0x103),_0x273244[_0x273244[_0x433b96(0x140)]=0x5]=_0x433b96(0x140),_0x273244[_0x273244['UNRECOGNIZED']=-0x1]=_0x433b96(0x11d),_0x273244))(v||{});const y=_0x51a32e=>_0x502aa8(new Date(+_0x51a32e))['format'](_0x433b96(0x10f)),B=async(_0x14d92c,_0x49c8e0)=>{const _0x4dd617=_0x433b96,_0x9fe6e8=_0x14d92c[_0x4dd617(0x138)](_0x3e832f),_0x44f06c=_0x14d92c[_0x4dd617(0x138)](_0x588861);_0x49c8e0[_0x4dd617(0x15e)](_0x4f8176=>{const _0x369fa5=_0x4dd617;_0x9fe6e8[_0x369fa5(0x13b)](_0x4f8176)&&_0x49c8e0[_0x369fa5(0x11b)](_0x4f8176);}),_0x49c8e0[_0x4dd617(0x156)]&&(await _0x44f06c['get'](_0x4dd617(0x123),{'params':{'userIDs':[..._0x49c8e0]}}))[_0x4dd617(0x161)][_0x4dd617(0x157)]['forEach'](_0x16cc0b=>{_0x16cc0b&&_0x9fe6e8['addUser'](_0x16cc0b);});};var K=Object[_0x433b96(0x14c)],V=(_0x10f3ee,_0x2e2253,_0x59214d,_0x2b6314)=>{for(var _0x57118e=_0x2b6314>0x1?void 0x0:_0x2b6314?K(_0x2e2253,_0x59214d):_0x2e2253,_0x55461d=_0x10f3ee['length']-0x1,_0x1b5262;_0x55461d>=0x0;_0x55461d--)(_0x1b5262=_0x10f3ee[_0x55461d])&&(_0x57118e=_0x1b5262(_0x57118e)||_0x57118e);return _0x57118e;},p=(_0x5cf432,_0x5a478f)=>(_0x3e1be0,_0x4cf1b0)=>_0x5a478f(_0x3e1be0,_0x4cf1b0,_0x5cf432);let _=class extends _0x35f606{constructor(_0x25c1f3,_0x266fc4,_0x441f07,_0x4e875f){const _0x773ae4=_0x433b96;super(),this[_0x773ae4(0x108)]=_0x25c1f3,this[_0x773ae4(0x143)]=_0x266fc4,this[_0x773ae4(0x145)]=_0x441f07,this[_0x773ae4(0x13c)]=_0x4e875f,this[_0x773ae4(0x12f)](),this[_0x773ae4(0x135)]();}[_0x433b96(0x135)](){const _0x47686c=_0x433b96;this['disposeWithMe'](this[_0x47686c(0x143)][_0x47686c(0x163)]['pipe'](_0x5655f9(0x10))[_0x47686c(0x144)](_0x23662b=>{const _0x4f1827=_0x47686c,_0x879589=new Set();_0x23662b[_0x4f1827(0x15e)](_0x44ec6b=>{const _0x3b3520=_0x4f1827;if(_0x44ec6b[_0x3b3520(0x130)]===_0x3b3520(0x116)){const _0x527aea=_0x44ec6b[_0x3b3520(0x166)]['personId'];_0x879589[_0x3b3520(0x116)](_0x527aea);}}),B(this[_0x4f1827(0x13c)],_0x879589);}));}[_0x433b96(0x12f)](){const _0x489d87=_0x433b96;this['disposeWithMe'](this['_commentService'][_0x489d87(0x163)][_0x489d87(0x144)](async _0x13ba43=>{const _0x40975b=_0x489d87;var _0x36b484,_0x1c9635,_0x26b4c2,_0x1267b7;const _0x56dc6d=(_0x36b484=this[_0x40975b(0x143)][_0x40975b(0x11f)](_0x13ba43['unitId'])[_0x40975b(0x150)](_0x52439b=>_0x52439b[_0x40975b(0x12e)]===_0x13ba43[_0x40975b(0x12e)]))==null?void 0x0:_0x36b484[_0x40975b(0x110)];if(!_0x56dc6d)return;const {unitId:_0xbddecb,subUnitId:_0x581a2a}=_0x56dc6d;switch(_0x13ba43['user']&&this['_userService'][_0x40975b(0x139)](_0x13ba43[_0x40975b(0x11c)]),_0x13ba43[_0x40975b(0x130)]){case v['Add']:break;case v['Reply']:{this[_0x40975b(0x143)][_0x40975b(0x12b)](_0xbddecb,_0x581a2a,{'unitId':_0xbddecb,'subUnitId':_0x581a2a,'ref':'','id':_0x13ba43[_0x40975b(0x165)],'dT':y(+_0x13ba43[_0x40975b(0x155)]),'threadId':_0x13ba43[_0x40975b(0x12e)],'personId':(_0x26b4c2=(_0x1c9635=_0x13ba43[_0x40975b(0x11c)])==null?void 0x0:_0x1c9635['userID'])!=null?_0x26b4c2:_0x13ba43[_0x40975b(0x149)],'text':JSON[_0x40975b(0x14e)](_0x13ba43[_0x40975b(0x10c)]),'parentId':_0x56dc6d['id']});break;}case v[_0x40975b(0x103)]:{const _0x2eb9c1=this[_0x40975b(0x143)][_0x40975b(0x121)](_0xbddecb,_0x581a2a,_0x13ba43[_0x40975b(0x165)]);_0x2eb9c1&&_0x2eb9c1[_0x40975b(0x167)]&&this[_0x40975b(0x143)][_0x40975b(0x146)](_0xbddecb,_0x581a2a,_0x13ba43['replyId']);break;}case v[_0x40975b(0x115)]:{this['_threadCommentModel']['updateComment'](_0xbddecb,_0x581a2a,{'commentId':_0x13ba43[_0x40975b(0x165)],'text':JSON[_0x40975b(0x14e)](_0x13ba43['content'])});break;}case v[_0x40975b(0x140)]:{const _0x56638a=(_0x1267b7=this[_0x40975b(0x143)][_0x40975b(0x11f)](_0x13ba43[_0x40975b(0x10d)])[_0x40975b(0x150)](_0x116310=>_0x116310[_0x40975b(0x12e)]===_0x13ba43[_0x40975b(0x12e)]))==null?void 0x0:_0x1267b7[_0x40975b(0x110)];_0x56638a&&this[_0x40975b(0x143)][_0x40975b(0x136)](_0xbddecb,_0x581a2a,_0x56638a['id'],_0x13ba43[_0x40975b(0x15b)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x19a2f3(_0x27be94)),p(0x1,_0x19a2f3(_0x541f7f)),p(0x2,_0x19a2f3(_0x3e832f)),p(0x3,_0x19a2f3(_0x1c9719))],_);const z=_0x433b96(0x133),O={};var k=Object[_0x433b96(0x14c)],Q=(_0x3f5b43,_0x1d6a02,_0x4fe5fb,_0x3de444)=>{const _0x39f9c5=_0x433b96;for(var _0x348d3e=_0x3de444>0x1?void 0x0:_0x3de444?k(_0x1d6a02,_0x4fe5fb):_0x1d6a02,_0x2ba7c8=_0x3f5b43[_0x39f9c5(0x105)]-0x1,_0x5b29ec;_0x2ba7c8>=0x0;_0x2ba7c8--)(_0x5b29ec=_0x3f5b43[_0x2ba7c8])&&(_0x348d3e=_0x5b29ec(_0x348d3e)||_0x348d3e);return _0x348d3e;},b=(_0x2b7581,_0x346c15)=>(_0x2926e0,_0x11b43a)=>_0x346c15(_0x2926e0,_0x11b43a,_0x2b7581);function X(_0x1a6340,_0xaf4e7){const _0x3d962d=_0x433b96,_0x10e3a4=_0x1a6340[_0x3d962d(0x137)][0x0];return{..._0xaf4e7,'id':_0x10e3a4[_0x3d962d(0x165)],'resolved':_0x1a6340['solved']===0x1,'dT':y(_0x10e3a4['createTimestamp']),'personId':_0x10e3a4[_0x3d962d(0x149)],'threadId':_0x10e3a4[_0x3d962d(0x12e)]};}function ee(_0x16cba8,_0x193cb6,_0x58d4e7){const _0x37937c=_0x433b96;var _0x24ea70,_0x5b362c;if(((_0x5b362c=(_0x24ea70=_0x16cba8==null?void 0x0:_0x16cba8[_0x37937c(0x137)])==null?void 0x0:_0x24ea70[_0x37937c(0x105)])!=null?_0x5b362c:0x0)>0x0){const _0x27a919=(_0x488fc2,_0x7e0f8d)=>({'id':_0x488fc2['replyId'],'threadId':_0x488fc2[_0x37937c(0x12e)],'dT':y(_0x488fc2[_0x37937c(0x155)]),'personId':_0x488fc2['userId'],'resolved':_0x16cba8[_0x37937c(0x15b)]===I['Solved'],'unitId':_0x193cb6,'subUnitId':_0x58d4e7,'text':JSON[_0x37937c(0x14e)](_0x488fc2[_0x37937c(0x10c)]),'parentId':_0x7e0f8d}),_0x107c7d=_0x27a919(_0x16cba8[_0x37937c(0x137)][0x0]);return{..._0x107c7d,'children':_0x16cba8[_0x37937c(0x137)][_0x37937c(0x168)](0x1)['map'](_0x1e08bc=>_0x27a919(_0x1e08bc,_0x107c7d['id']))};}return null;}function _0x3c1b(){const _0x2e1a90=['Delete','Add','length','_config','filter','_commentService','format','rangeType','18VgaRom','content','unitId','values','YYYY/MM/DD\x20HH:mm','root','9SVmUEB','saveCommentToSnapshot','code','Unknown','Edit','add','5RNgFst','map','comments','getCurrentUser','delete','user','UNRECOGNIZED','1129521mAfFll','getUnit','reply','getComment','525yoKHhZ','/universer-api/user/list','COMMENT','listComments','stringify','ref','_initDataSource','pluginName','resolved','addComment','67749NFxljc','_configService','threadId','_init','type','Reply','/delete','thread-comment-data-source.config','/add','_initUserSync','resolveComment','replies','get','addUser','userID','getUser','_injector','setConfig','UNIVER_UNKNOWN','3002530ZXmUzJ','Solve','rangeId','Solved','_threadCommentModel','subscribe','_userService','deleteComment','531064ZYWPlg','/reply','userId','_httpService','getMemberID','getOwnPropertyDescriptor','post','parse','customRanges','find','/edit','31227gXTnXh','4117336iRvNMz','_threadCommentDataSourceService','createTimestamp','size','users','syncUpdateMutationToColla','_sessionService','error','solved','/universer-api/comment/unit/','396mNynyT','forEach','_threadCommentDataSource','/list','body','6090LoMMXa','commentUpdate$','requireSession','replyId','payload','parentId','slice','OpenOrReOpen'];_0x3c1b=function(){return _0x2e1a90;};return _0x3c1b();}let S=class{constructor(_0x56ebf8,_0x1f435e,_0x34fb4f){const _0x713bf=_0x433b96;this[_0x713bf(0x14a)]=_0x56ebf8,this[_0x713bf(0x145)]=_0x1f435e,this[_0x713bf(0x159)]=_0x34fb4f;}async[_0x433b96(0x12b)](_0x1e0166){const _0x33e0e9=_0x433b96;var _0x218879,_0x1a5ad3;const {parentId:_0x3e0de8,unitId:_0x5354e5,text:_0x547d21,threadId:_0x4eb96d}=_0x1e0166,_0x210e39=(_0x1a5ad3=(_0x218879=_0x547d21[_0x33e0e9(0x14f)])==null?void 0x0:_0x218879[_0x33e0e9(0x107)](_0x5ac22e=>_0x5ac22e[_0x33e0e9(0x10a)]===_0x2671e9[_0x33e0e9(0x124)])[_0x33e0e9(0x118)](_0x4a523b=>_0x4a523b['rangeId']))!=null?_0x1a5ad3:[],_0x3ba879=JSON['stringify'](_0x547d21),_0xda0c44=(await this[_0x33e0e9(0x159)][_0x33e0e9(0x164)](_0x5354e5))[_0x33e0e9(0x14b)]();if(_0x3e0de8){const _0x1e7e36={'memberId':_0xda0c44,'unitId':_0x5354e5,'content':_0x3ba879,'mention':_0x210e39,'threadId':_0x4eb96d},_0x45eb26=(await this[_0x33e0e9(0x14a)]['post'](_0x33e0e9(0x15c)+_0x5354e5+_0x33e0e9(0x148),{'body':_0x1e7e36}))[_0x33e0e9(0x161)][_0x33e0e9(0x120)];return{..._0x1e0166,'id':_0x45eb26[_0x33e0e9(0x165)],'dT':_0x502aa8(+_0x45eb26[_0x33e0e9(0x155)])[_0x33e0e9(0x109)](_0x33e0e9(0x10f)),'personId':_0x45eb26['userId']};}else{const _0x2b6205={'memberId':_0xda0c44,'unitId':_0x5354e5,'content':_0x3ba879,'mention':_0x210e39},_0x496b40=await this[_0x33e0e9(0x14a)]['post'](_0x33e0e9(0x15c)+_0x5354e5+_0x33e0e9(0x134),{'body':_0x2b6205});return X(_0x496b40[_0x33e0e9(0x161)]['comment'],_0x1e0166);}}async['updateComment'](_0x1349ba){const _0x383eaf=_0x433b96;var _0x552fab,_0x529c60;const {text:_0x293243,unitId:_0x38ea43}=_0x1349ba,_0x20e1dc=(_0x529c60=(_0x552fab=_0x293243[_0x383eaf(0x14f)])==null?void 0x0:_0x552fab['filter'](_0x12a5cc=>_0x12a5cc[_0x383eaf(0x10a)]===_0x2671e9[_0x383eaf(0x124)])[_0x383eaf(0x118)](_0x531ac0=>_0x531ac0[_0x383eaf(0x141)]))!=null?_0x529c60:[],_0x307461=JSON[_0x383eaf(0x126)](_0x293243),_0x24494d=_0x1349ba['threadId'],_0x44d4b3=_0x1349ba['id'],_0x241784={'memberId':(await this[_0x383eaf(0x159)]['requireSession'](_0x38ea43))['getMemberID'](),'unitId':_0x38ea43,'threadId':_0x24494d,'mention':_0x20e1dc,'content':_0x307461,'replyId':_0x44d4b3},_0x4999e7=await this[_0x383eaf(0x14a)][_0x383eaf(0x14d)](_0x383eaf(0x15c)+_0x38ea43+_0x383eaf(0x151),{'body':_0x241784});return!_0x4999e7[_0x383eaf(0x161)][_0x383eaf(0x15a)]||_0x4999e7[_0x383eaf(0x161)][_0x383eaf(0x15a)][_0x383eaf(0x113)]===0x1;}async['resolveComment'](_0x1ac0c1){const _0x2dc82c=_0x433b96,{unitId:_0x1d17ed}=_0x1ac0c1,_0xc49917=_0x1ac0c1[_0x2dc82c(0x12e)],_0x41b141={'memberId':this[_0x2dc82c(0x145)][_0x2dc82c(0x11a)]()[_0x2dc82c(0x13a)],'unitId':_0x1d17ed,'threadId':_0xc49917,'solved':_0x1ac0c1[_0x2dc82c(0x12a)]?I['Solved']:I[_0x2dc82c(0x169)]},_0x58df3f=await this[_0x2dc82c(0x14a)]['post'](_0x2dc82c(0x15c)+_0x1d17ed+'/solved',{'body':_0x41b141});return!_0x58df3f[_0x2dc82c(0x161)][_0x2dc82c(0x15a)]||_0x58df3f[_0x2dc82c(0x161)]['error'][_0x2dc82c(0x113)]===0x1;}async[_0x433b96(0x146)](_0x228c3d,_0xbb5bb9,_0x5343dc,_0x5b9a01){const _0xc5baf3=_0x433b96,_0x520b22={'memberId':(await this[_0xc5baf3(0x159)][_0xc5baf3(0x164)](_0x228c3d))['getMemberID'](),'threadId':_0x5343dc,'replyId':_0x5b9a01,'unitId':_0x228c3d},_0x53ca17=await this[_0xc5baf3(0x14a)][_0xc5baf3(0x14d)](_0xc5baf3(0x15c)+_0x228c3d+_0xc5baf3(0x132),{'body':_0x520b22});return!_0x53ca17['body']['error']||_0x53ca17['body'][_0xc5baf3(0x15a)][_0xc5baf3(0x113)]===0x1;}async[_0x433b96(0x125)](_0x11f100,_0x390026,_0x25f4a4){const _0x2d1cde=_0x433b96,_0x5a04f1={'unitId':_0x11f100,'threadId':_0x25f4a4},_0x5d105d=await this['_httpService'][_0x2d1cde(0x14d)](_0x2d1cde(0x15c)+_0x11f100+_0x2d1cde(0x160),{'body':_0x5a04f1}),_0x3f0bba=_0x25f4a4[_0x2d1cde(0x118)](_0x133227=>ee(_0x5d105d[_0x2d1cde(0x161)][_0x2d1cde(0x119)][_0x133227],_0x11f100,_0x390026))[_0x2d1cde(0x107)](Boolean);return Object[_0x2d1cde(0x10e)](_0x5d105d[_0x2d1cde(0x161)][_0x2d1cde(0x157)])['forEach'](_0x1c123b=>{const _0x434c66=_0x2d1cde;this['_userService'][_0x434c66(0x139)](_0x1c123b);}),_0x3f0bba;}[_0x433b96(0x112)](_0x226f37){const _0x4711dd=_0x433b96;return{'id':_0x226f37['id'],'threadId':_0x226f37[_0x4711dd(0x12e)],'ref':_0x226f37[_0x4711dd(0x127)]};}};S=Q([b(0x0,_0x19a2f3(_0x588861)),b(0x1,_0x19a2f3(_0x3e832f)),b(0x2,_0x19a2f3(_0x23c102))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x25486c,_0x2b1918,_0xe538fb,_0x460f47)=>{const _0x1e7bc4=_0x433b96;for(var _0x28ce06=_0x460f47>0x1?void 0x0:_0x460f47?re(_0x2b1918,_0xe538fb):_0x2b1918,_0x12bd81=_0x25486c[_0x1e7bc4(0x105)]-0x1,_0x837542;_0x12bd81>=0x0;_0x12bd81--)(_0x837542=_0x25486c[_0x12bd81])&&(_0x28ce06=_0x837542(_0x28ce06)||_0x28ce06);return _0x28ce06;},M=(_0x51aa06,_0x3ec4df)=>(_0x2f426d,_0x2b5afd)=>_0x3ec4df(_0x2f426d,_0x2b5afd,_0x51aa06);let f=class extends _0x35f606{constructor(_0x3d6206,_0xe8f24e){const _0x87d9b=_0x433b96;super(),this[_0x87d9b(0x154)]=_0x3d6206,this['_threadCommentDataSource']=_0xe8f24e,this['_initDataSource']();}[_0x433b96(0x128)](){const _0x4759ad=_0x433b96;this[_0x4759ad(0x154)]['dataSource']=this[_0x4759ad(0x15f)],this['_threadCommentDataSourceService'][_0x4759ad(0x158)]=!0x1;}};f=te([M(0x0,_0x22dd5c),M(0x1,_0x19a2f3(S))],f);function _0x2d2d(_0x2a3eac,_0x2cd947){_0x2a3eac=_0x2a3eac-0x103;const _0x3c1b51=_0x3c1b();let _0x2d2d46=_0x3c1b51[_0x2a3eac];return _0x2d2d46;}var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3dc511,_0x16befb,_0x2177aa)=>_0x16befb in _0x3dc511?se(_0x3dc511,_0x16befb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2177aa}):_0x3dc511[_0x16befb]=_0x2177aa,ie=(_0x378558,_0x40153c,_0x2e7d75,_0x1cf7df)=>{const _0x4f9018=_0x433b96;for(var _0x3962bf=_0x1cf7df>0x1?void 0x0:_0x1cf7df?oe(_0x40153c,_0x2e7d75):_0x40153c,_0x391e69=_0x378558[_0x4f9018(0x105)]-0x1,_0x4a6900;_0x391e69>=0x0;_0x391e69--)(_0x4a6900=_0x378558[_0x391e69])&&(_0x3962bf=_0x4a6900(_0x3962bf)||_0x3962bf);return _0x3962bf;},N=(_0x46a19f,_0x429be6)=>(_0x4ed3d9,_0x3891c9)=>_0x429be6(_0x4ed3d9,_0x3891c9,_0x46a19f),$=(_0x200737,_0x18b45a,_0xd171c6)=>ne(_0x200737,typeof _0x18b45a!='symbol'?_0x18b45a+'':_0x18b45a,_0xd171c6);let g=class extends _0x5ee83e{constructor(_0x546da7=O,_0x10b821,_0x6bb5ba){const _0x55bfec=_0x433b96;super(),this[_0x55bfec(0x106)]=_0x546da7,this[_0x55bfec(0x13c)]=_0x10b821,this[_0x55bfec(0x12d)]=_0x6bb5ba;const {..._0x5ef9c9}=_0x1eba46({},O,this[_0x55bfec(0x106)]);this[_0x55bfec(0x12d)][_0x55bfec(0x13d)](z,_0x5ef9c9);}['onStarting'](){const _0x204933=_0x433b96;[[S],[f],[_]][_0x204933(0x15e)](_0x174d8e=>{const _0x353bc6=_0x204933;this[_0x353bc6(0x13c)][_0x353bc6(0x116)](_0x174d8e);});}['onReady'](){const _0x247d36=_0x433b96;this[_0x247d36(0x13c)][_0x247d36(0x138)](f),this[_0x247d36(0x13c)][_0x247d36(0x138)](_);}};$(g,_0x433b96(0x129),W),$(g,_0x433b96(0x130),_0x1a8c17[_0x433b96(0x13e)]),g=ie([_0x5d048e(_0x48228f,_0x47447c,_0x51e432),N(0x1,_0x19a2f3(_0x1c9719)),N(0x2,_0x3e7a47)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x231458=_0x43f0;(function(_0x5102db,_0x2b7586){const _0x5b2b93=_0x43f0,_0x321477=_0x5102db();while(!![]){try{const _0x3c4b1c=parseInt(_0x5b2b93(0x74))/0x1*(parseInt(_0x5b2b93(0xc0))/0x2)+-parseInt(_0x5b2b93(0x75))/0x3+-parseInt(_0x5b2b93(0x98))/0x4*(parseInt(_0x5b2b93(0xcc))/0x5)+-parseInt(_0x5b2b93(0x78))/0x6+-parseInt(_0x5b2b93(0x6c))/0x7+-parseInt(_0x5b2b93(0x7a))/0x8*(parseInt(_0x5b2b93(0xc6))/0x9)+parseInt(_0x5b2b93(0xb2))/0xa;if(_0x3c4b1c===_0x2b7586)break;else _0x321477['push'](_0x321477['shift']());}catch(_0xb1d5e1){_0x321477['push'](_0x321477['shift']());}}}(_0x5e35,0x27ffd));import{CommentService as _0x20b5b6,CollaborationSessionService as _0x41a581,UniverCollaborationClientPlugin as _0x40c7ce}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3794a6}from'@univerjs-pro/license';import{dayjs as _0x1a50d1,UserManagerService as _0x1caf0d,Inject as _0x3fb278,Injector as _0x1416f8,Disposable as _0x519c68,CustomRangeType as _0x34627d,UniverInstanceType as _0x13e5ee,DependentOn as _0x326330,IConfigService as _0x25bde9,Plugin as _0x3e97cc,merge as _0x58bb88}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x47e1d5}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1b6328,IThreadCommentDataSourceService as _0x563d0d}from'@univerjs/thread-comment';import{bufferTime as _0x11cf83}from'rxjs';function _0x43f0(_0x22e547,_0x3e2ffa){_0x22e547=_0x22e547-0x64;const _0x5e3560=_0x5e35();let _0x43f0b7=_0x5e3560[_0x22e547];return _0x43f0b7;}import{HTTPService as _0x269dd4}from'@univerjs/network';const W=_0x231458(0x92);function _0x5e35(){const _0x2b0d9e=['Edit','add','14373WVenHI','getCurrentUser','length','symbol','post','_injector','5ERuIrS','_httpService','_initUserSync','/add','filter','subscribe','YYYY/MM/DD\x20HH:mm','syncUpdateMutationToColla','reply','forEach','1316322XwoJmL','delete','error','_initDataSource','commentUpdate$','Delete','comment','unitId','985pQWjHV','118935ZvVfhV','userId','/universer-api/user/list','197640heeEAB','_sessionService','1208zSADBw','threadId','values','Solve','users','find','_init','UNRECOGNIZED','thread-comment-data-source.config','getUnit','parentId','/universer-api/comment/unit/','createTimestamp','Add','disposeWithMe','body','UNIVER_UNKNOWN','addUser','_commentService','rangeId','pluginName','format','OpenOrReOpen','/edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','size','setConfig','replyId','customRanges','_threadCommentDataSource','422068wOmwwL','onStarting','getMemberID','_config','code','content','Solved','_threadCommentDataSourceService','rangeType','deleteComment','Unknown','_configService','root','parse','_userService','user','getComment','getUser','ref','Reply','dataSource','map','updateComment','_threadCommentModel','onReady','resolveComment','7307470gUJAHC','addComment','listComments','/solved','defineProperty','COMMENT','resolved','stringify','type','replies','requireSession','comments','getOwnPropertyDescriptor','payload','82xyhusV','solved','userID','get'];_0x5e35=function(){return _0x2b0d9e;};return _0x5e35();}var I=(_0x4ef7e3=>(_0x4ef7e3[_0x4ef7e3[_0x231458(0x90)]=0x0]=_0x231458(0x90),_0x4ef7e3[_0x4ef7e3[_0x231458(0x9e)]=0x1]=_0x231458(0x9e),_0x4ef7e3[_0x4ef7e3[_0x231458(0x81)]=-0x1]=_0x231458(0x81),_0x4ef7e3))(I||{}),v=(_0x4692a5=>(_0x4692a5[_0x4692a5['Unknown']=0x0]=_0x231458(0xa2),_0x4692a5[_0x4692a5[_0x231458(0x87)]=0x1]=_0x231458(0x87),_0x4692a5[_0x4692a5[_0x231458(0xab)]=0x2]=_0x231458(0xab),_0x4692a5[_0x4692a5[_0x231458(0xc4)]=0x3]=_0x231458(0xc4),_0x4692a5[_0x4692a5[_0x231458(0x71)]=0x4]=_0x231458(0x71),_0x4692a5[_0x4692a5['Solve']=0x5]=_0x231458(0x7d),_0x4692a5[_0x4692a5[_0x231458(0x81)]=-0x1]=_0x231458(0x81),_0x4692a5))(v||{});const y=_0x79c51e=>_0x1a50d1(new Date(+_0x79c51e))[_0x231458(0x8f)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3bb590,_0x1f806d)=>{const _0x4e232b=_0x231458,_0x4e6f18=_0x3bb590[_0x4e232b(0xc3)](_0x1caf0d),_0x1fcd03=_0x3bb590[_0x4e232b(0xc3)](_0x269dd4);_0x1f806d[_0x4e232b(0x6b)](_0x5550ed=>{const _0x345121=_0x4e232b;_0x4e6f18[_0x345121(0xa9)](_0x5550ed)&&_0x1f806d[_0x345121(0x6d)](_0x5550ed);}),_0x1f806d[_0x4e232b(0x93)]&&(await _0x1fcd03[_0x4e232b(0xc3)](_0x4e232b(0x77),{'params':{'userIDs':[..._0x1f806d]}}))[_0x4e232b(0x89)]['users'][_0x4e232b(0x6b)](_0x5e00e6=>{_0x5e00e6&&_0x4e6f18['addUser'](_0x5e00e6);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3c6b7e,_0x2021d1,_0x5daf91,_0x5c80f0)=>{const _0x54f4c0=_0x231458;for(var _0x106b8f=_0x5c80f0>0x1?void 0x0:_0x5c80f0?K(_0x2021d1,_0x5daf91):_0x2021d1,_0x304f60=_0x3c6b7e[_0x54f4c0(0xc8)]-0x1,_0x3d6e36;_0x304f60>=0x0;_0x304f60--)(_0x3d6e36=_0x3c6b7e[_0x304f60])&&(_0x106b8f=_0x3d6e36(_0x106b8f)||_0x106b8f);return _0x106b8f;},p=(_0xf9b229,_0x1eb5c0)=>(_0x3e81f1,_0x5f242c)=>_0x1eb5c0(_0x3e81f1,_0x5f242c,_0xf9b229);let _=class extends _0x519c68{constructor(_0x3616ae,_0x539f17,_0x2f208f,_0x468c09){const _0x49e627=_0x231458;super(),this['_commentService']=_0x3616ae,this[_0x49e627(0xaf)]=_0x539f17,this['_userService']=_0x2f208f,this[_0x49e627(0xcb)]=_0x468c09,this[_0x49e627(0x80)](),this['_initUserSync']();}[_0x231458(0x64)](){const _0x47fb5d=_0x231458;this[_0x47fb5d(0x88)](this[_0x47fb5d(0xaf)]['commentUpdate$']['pipe'](_0x11cf83(0x10))[_0x47fb5d(0x67)](_0x41f0a4=>{const _0x142e96=_0x47fb5d,_0x512799=new Set();_0x41f0a4[_0x142e96(0x6b)](_0x808872=>{const _0x17bc13=_0x142e96;if(_0x808872[_0x17bc13(0xba)]===_0x17bc13(0xc5)){const _0x299246=_0x808872[_0x17bc13(0xbf)]['personId'];_0x512799['add'](_0x299246);}}),B(this[_0x142e96(0xcb)],_0x512799);}));}['_init'](){const _0x1f6025=_0x231458;this[_0x1f6025(0x88)](this[_0x1f6025(0x8c)][_0x1f6025(0x70)][_0x1f6025(0x67)](async _0x10ff55=>{const _0x4a5eb3=_0x1f6025;var _0x3647c2,_0x3a598a,_0x5b8a40,_0x5511ab;const _0x43d6c9=(_0x3647c2=this[_0x4a5eb3(0xaf)][_0x4a5eb3(0x83)](_0x10ff55[_0x4a5eb3(0x73)])[_0x4a5eb3(0x7f)](_0x53ff03=>_0x53ff03[_0x4a5eb3(0x7b)]===_0x10ff55[_0x4a5eb3(0x7b)]))==null?void 0x0:_0x3647c2['root'];if(!_0x43d6c9)return;const {unitId:_0x399263,subUnitId:_0x40a574}=_0x43d6c9;switch(_0x10ff55[_0x4a5eb3(0xa7)]&&this[_0x4a5eb3(0xa6)][_0x4a5eb3(0x8b)](_0x10ff55[_0x4a5eb3(0xa7)]),_0x10ff55[_0x4a5eb3(0xba)]){case v[_0x4a5eb3(0x87)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x399263,_0x40a574,{'unitId':_0x399263,'subUnitId':_0x40a574,'ref':'','id':_0x10ff55['replyId'],'dT':y(+_0x10ff55[_0x4a5eb3(0x86)]),'threadId':_0x10ff55[_0x4a5eb3(0x7b)],'personId':(_0x5b8a40=(_0x3a598a=_0x10ff55[_0x4a5eb3(0xa7)])==null?void 0x0:_0x3a598a[_0x4a5eb3(0xc2)])!=null?_0x5b8a40:_0x10ff55[_0x4a5eb3(0x76)],'text':JSON['parse'](_0x10ff55[_0x4a5eb3(0x9d)]),'parentId':_0x43d6c9['id']});break;}case v['Delete']:{const _0x13e83f=this[_0x4a5eb3(0xaf)][_0x4a5eb3(0xa8)](_0x399263,_0x40a574,_0x10ff55['replyId']);_0x13e83f&&_0x13e83f[_0x4a5eb3(0x84)]&&this[_0x4a5eb3(0xaf)][_0x4a5eb3(0xa1)](_0x399263,_0x40a574,_0x10ff55[_0x4a5eb3(0x95)]);break;}case v['Edit']:{this[_0x4a5eb3(0xaf)]['updateComment'](_0x399263,_0x40a574,{'commentId':_0x10ff55[_0x4a5eb3(0x95)],'text':JSON[_0x4a5eb3(0xa5)](_0x10ff55[_0x4a5eb3(0x9d)])});break;}case v[_0x4a5eb3(0x7d)]:{const _0x30c189=(_0x5511ab=this[_0x4a5eb3(0xaf)]['getUnit'](_0x10ff55[_0x4a5eb3(0x73)])[_0x4a5eb3(0x7f)](_0x2cd669=>_0x2cd669['threadId']===_0x10ff55[_0x4a5eb3(0x7b)]))==null?void 0x0:_0x5511ab[_0x4a5eb3(0xa4)];_0x30c189&&this['_threadCommentModel']['resolveComment'](_0x399263,_0x40a574,_0x30c189['id'],_0x10ff55['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x3fb278(_0x20b5b6)),p(0x1,_0x3fb278(_0x1b6328)),p(0x2,_0x3fb278(_0x1caf0d)),p(0x3,_0x3fb278(_0x1416f8))],_);const z=_0x231458(0x82),O={};var k=Object[_0x231458(0xbe)],Q=(_0x584a99,_0x43e7eb,_0x2cebbb,_0x208e32)=>{const _0x456ba3=_0x231458;for(var _0x395a4a=_0x208e32>0x1?void 0x0:_0x208e32?k(_0x43e7eb,_0x2cebbb):_0x43e7eb,_0x4b94e3=_0x584a99[_0x456ba3(0xc8)]-0x1,_0x4ee66d;_0x4b94e3>=0x0;_0x4b94e3--)(_0x4ee66d=_0x584a99[_0x4b94e3])&&(_0x395a4a=_0x4ee66d(_0x395a4a)||_0x395a4a);return _0x395a4a;},b=(_0x42de08,_0x20225f)=>(_0x493f97,_0x2266f7)=>_0x20225f(_0x493f97,_0x2266f7,_0x42de08);function X(_0x27ade2,_0x4e6a02){const _0x373dfa=_0x231458,_0x1d0fc2=_0x27ade2[_0x373dfa(0xbb)][0x0];return{..._0x4e6a02,'id':_0x1d0fc2[_0x373dfa(0x95)],'resolved':_0x27ade2[_0x373dfa(0xc1)]===0x1,'dT':y(_0x1d0fc2[_0x373dfa(0x86)]),'personId':_0x1d0fc2[_0x373dfa(0x76)],'threadId':_0x1d0fc2['threadId']};}function ee(_0xc4f5c,_0x17465c,_0x5c5932){const _0x50bc7d=_0x231458;var _0x4317af,_0x316c56;if(((_0x316c56=(_0x4317af=_0xc4f5c==null?void 0x0:_0xc4f5c[_0x50bc7d(0xbb)])==null?void 0x0:_0x4317af[_0x50bc7d(0xc8)])!=null?_0x316c56:0x0)>0x0){const _0x1b85b0=(_0x503676,_0x102c51)=>({'id':_0x503676['replyId'],'threadId':_0x503676['threadId'],'dT':y(_0x503676[_0x50bc7d(0x86)]),'personId':_0x503676['userId'],'resolved':_0xc4f5c[_0x50bc7d(0xc1)]===I[_0x50bc7d(0x9e)],'unitId':_0x17465c,'subUnitId':_0x5c5932,'text':JSON[_0x50bc7d(0xa5)](_0x503676['content']),'parentId':_0x102c51}),_0x8f41eb=_0x1b85b0(_0xc4f5c[_0x50bc7d(0xbb)][0x0]);return{..._0x8f41eb,'children':_0xc4f5c[_0x50bc7d(0xbb)]['slice'](0x1)[_0x50bc7d(0xad)](_0x4605f7=>_0x1b85b0(_0x4605f7,_0x8f41eb['id']))};}return null;}let S=class{constructor(_0x47bedd,_0xa9358a,_0xf0de91){const _0x56c29e=_0x231458;this[_0x56c29e(0xcd)]=_0x47bedd,this[_0x56c29e(0xa6)]=_0xa9358a,this[_0x56c29e(0x79)]=_0xf0de91;}async[_0x231458(0xb3)](_0x2d48be){const _0x85b75d=_0x231458;var _0x4ce832,_0x61ac4;const {parentId:_0x336bac,unitId:_0x48fd40,text:_0x31ab99,threadId:_0x57ff7c}=_0x2d48be,_0x225db2=(_0x61ac4=(_0x4ce832=_0x31ab99[_0x85b75d(0x96)])==null?void 0x0:_0x4ce832[_0x85b75d(0x66)](_0x53528d=>_0x53528d[_0x85b75d(0xa0)]===_0x34627d[_0x85b75d(0xb7)])[_0x85b75d(0xad)](_0x2b515f=>_0x2b515f[_0x85b75d(0x8d)]))!=null?_0x61ac4:[],_0x3e1990=JSON[_0x85b75d(0xb9)](_0x31ab99),_0x4786f4=(await this['_sessionService'][_0x85b75d(0xbc)](_0x48fd40))[_0x85b75d(0x9a)]();if(_0x336bac){const _0xa7c55e={'memberId':_0x4786f4,'unitId':_0x48fd40,'content':_0x3e1990,'mention':_0x225db2,'threadId':_0x57ff7c},_0x45ffcc=(await this[_0x85b75d(0xcd)][_0x85b75d(0xca)](_0x85b75d(0x85)+_0x48fd40+'/reply',{'body':_0xa7c55e}))[_0x85b75d(0x89)][_0x85b75d(0x6a)];return{..._0x2d48be,'id':_0x45ffcc[_0x85b75d(0x95)],'dT':_0x1a50d1(+_0x45ffcc[_0x85b75d(0x86)])['format'](_0x85b75d(0x68)),'personId':_0x45ffcc[_0x85b75d(0x76)]};}else{const _0x414308={'memberId':_0x4786f4,'unitId':_0x48fd40,'content':_0x3e1990,'mention':_0x225db2},_0x33b3fc=await this[_0x85b75d(0xcd)][_0x85b75d(0xca)]('/universer-api/comment/unit/'+_0x48fd40+_0x85b75d(0x65),{'body':_0x414308});return X(_0x33b3fc[_0x85b75d(0x89)][_0x85b75d(0x72)],_0x2d48be);}}async[_0x231458(0xae)](_0x541770){const _0x3cf72a=_0x231458;var _0x28a5ee,_0x109011;const {text:_0x37bc5c,unitId:_0x2ff56e}=_0x541770,_0x4f476a=(_0x109011=(_0x28a5ee=_0x37bc5c[_0x3cf72a(0x96)])==null?void 0x0:_0x28a5ee[_0x3cf72a(0x66)](_0xc4082=>_0xc4082[_0x3cf72a(0xa0)]===_0x34627d[_0x3cf72a(0xb7)])['map'](_0x587523=>_0x587523['rangeId']))!=null?_0x109011:[],_0x1e6715=JSON[_0x3cf72a(0xb9)](_0x37bc5c),_0x2a50ed=_0x541770[_0x3cf72a(0x7b)],_0x227939=_0x541770['id'],_0x19ca49={'memberId':(await this[_0x3cf72a(0x79)][_0x3cf72a(0xbc)](_0x2ff56e))[_0x3cf72a(0x9a)](),'unitId':_0x2ff56e,'threadId':_0x2a50ed,'mention':_0x4f476a,'content':_0x1e6715,'replyId':_0x227939},_0x25c328=await this['_httpService'][_0x3cf72a(0xca)](_0x3cf72a(0x85)+_0x2ff56e+_0x3cf72a(0x91),{'body':_0x19ca49});return!_0x25c328['body'][_0x3cf72a(0x6e)]||_0x25c328[_0x3cf72a(0x89)]['error'][_0x3cf72a(0x9c)]===0x1;}async[_0x231458(0xb1)](_0x5e4769){const _0x30d8cb=_0x231458,{unitId:_0x13a05b}=_0x5e4769,_0xe85882=_0x5e4769[_0x30d8cb(0x7b)],_0x1d1a69={'memberId':this[_0x30d8cb(0xa6)][_0x30d8cb(0xc7)]()[_0x30d8cb(0xc2)],'unitId':_0x13a05b,'threadId':_0xe85882,'solved':_0x5e4769[_0x30d8cb(0xb8)]?I['Solved']:I[_0x30d8cb(0x90)]},_0x5409bb=await this[_0x30d8cb(0xcd)][_0x30d8cb(0xca)](_0x30d8cb(0x85)+_0x13a05b+_0x30d8cb(0xb5),{'body':_0x1d1a69});return!_0x5409bb['body'][_0x30d8cb(0x6e)]||_0x5409bb[_0x30d8cb(0x89)][_0x30d8cb(0x6e)][_0x30d8cb(0x9c)]===0x1;}async[_0x231458(0xa1)](_0x4953d3,_0x3f84a6,_0x31bd95,_0x115941){const _0x309135=_0x231458,_0x117c2={'memberId':(await this[_0x309135(0x79)][_0x309135(0xbc)](_0x4953d3))['getMemberID'](),'threadId':_0x31bd95,'replyId':_0x115941,'unitId':_0x4953d3},_0x422c3d=await this[_0x309135(0xcd)]['post'](_0x309135(0x85)+_0x4953d3+'/delete',{'body':_0x117c2});return!_0x422c3d[_0x309135(0x89)][_0x309135(0x6e)]||_0x422c3d['body'][_0x309135(0x6e)]['code']===0x1;}async[_0x231458(0xb4)](_0x4d4a98,_0xade5a0,_0x39c87f){const _0x4ac75=_0x231458,_0xd43ed0={'unitId':_0x4d4a98,'threadId':_0x39c87f},_0x5240bf=await this['_httpService']['post'](_0x4ac75(0x85)+_0x4d4a98+'/list',{'body':_0xd43ed0}),_0x35b5cf=_0x39c87f[_0x4ac75(0xad)](_0x373e1c=>ee(_0x5240bf[_0x4ac75(0x89)][_0x4ac75(0xbd)][_0x373e1c],_0x4d4a98,_0xade5a0))[_0x4ac75(0x66)](Boolean);return Object[_0x4ac75(0x7c)](_0x5240bf[_0x4ac75(0x89)][_0x4ac75(0x7e)])['forEach'](_0x4d7cda=>{const _0x5acd67=_0x4ac75;this[_0x5acd67(0xa6)][_0x5acd67(0x8b)](_0x4d7cda);}),_0x35b5cf;}['saveCommentToSnapshot'](_0x5a886f){const _0x37b405=_0x231458;return{'id':_0x5a886f['id'],'threadId':_0x5a886f[_0x37b405(0x7b)],'ref':_0x5a886f[_0x37b405(0xaa)]};}};S=Q([b(0x0,_0x3fb278(_0x269dd4)),b(0x1,_0x3fb278(_0x1caf0d)),b(0x2,_0x3fb278(_0x41a581))],S);var re=Object[_0x231458(0xbe)],te=(_0x57dcf0,_0x32b319,_0x576092,_0x518402)=>{const _0x50b58d=_0x231458;for(var _0x383283=_0x518402>0x1?void 0x0:_0x518402?re(_0x32b319,_0x576092):_0x32b319,_0x1d9cd9=_0x57dcf0[_0x50b58d(0xc8)]-0x1,_0x2849bc;_0x1d9cd9>=0x0;_0x1d9cd9--)(_0x2849bc=_0x57dcf0[_0x1d9cd9])&&(_0x383283=_0x2849bc(_0x383283)||_0x383283);return _0x383283;},M=(_0x4f6e49,_0x506561)=>(_0x3bc141,_0x25b58f)=>_0x506561(_0x3bc141,_0x25b58f,_0x4f6e49);let f=class extends _0x519c68{constructor(_0x3a175e,_0x25e067){const _0x20b3fd=_0x231458;super(),this[_0x20b3fd(0x9f)]=_0x3a175e,this[_0x20b3fd(0x97)]=_0x25e067,this[_0x20b3fd(0x6f)]();}[_0x231458(0x6f)](){const _0x47f909=_0x231458;this[_0x47f909(0x9f)][_0x47f909(0xac)]=this[_0x47f909(0x97)],this[_0x47f909(0x9f)][_0x47f909(0x69)]=!0x1;}};f=te([M(0x0,_0x563d0d),M(0x1,_0x3fb278(S))],f);var se=Object[_0x231458(0xb6)],oe=Object[_0x231458(0xbe)],ne=(_0x7d0e6a,_0x31e64d,_0x55a49f)=>_0x31e64d in _0x7d0e6a?se(_0x7d0e6a,_0x31e64d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x55a49f}):_0x7d0e6a[_0x31e64d]=_0x55a49f,ie=(_0x49da57,_0x121fac,_0x92989f,_0xa89334)=>{const _0x31be25=_0x231458;for(var _0x20f65b=_0xa89334>0x1?void 0x0:_0xa89334?oe(_0x121fac,_0x92989f):_0x121fac,_0x2c6408=_0x49da57[_0x31be25(0xc8)]-0x1,_0x53ec7d;_0x2c6408>=0x0;_0x2c6408--)(_0x53ec7d=_0x49da57[_0x2c6408])&&(_0x20f65b=_0x53ec7d(_0x20f65b)||_0x20f65b);return _0x20f65b;},N=(_0x27ebf2,_0x216e31)=>(_0x51c29b,_0x1cebb8)=>_0x216e31(_0x51c29b,_0x1cebb8,_0x27ebf2),$=(_0x4a1bfa,_0x3551cf,_0x44ab4f)=>ne(_0x4a1bfa,typeof _0x3551cf!=_0x231458(0xc9)?_0x3551cf+'':_0x3551cf,_0x44ab4f);let g=class extends _0x3e97cc{constructor(_0x1ba5e1=O,_0x29581f,_0x25a5ec){const _0xec65f7=_0x231458;super(),this[_0xec65f7(0x9b)]=_0x1ba5e1,this[_0xec65f7(0xcb)]=_0x29581f,this['_configService']=_0x25a5ec;const {..._0x56334c}=_0x58bb88({},O,this[_0xec65f7(0x9b)]);this[_0xec65f7(0xa3)][_0xec65f7(0x94)](z,_0x56334c);}[_0x231458(0x99)](){const _0x3a9dd8=_0x231458;[[S],[f],[_]][_0x3a9dd8(0x6b)](_0x569e31=>{const _0x284db3=_0x3a9dd8;this['_injector'][_0x284db3(0xc5)](_0x569e31);});}[_0x231458(0xb0)](){const _0x588446=_0x231458;this[_0x588446(0xcb)][_0x588446(0xc3)](f),this[_0x588446(0xcb)][_0x588446(0xc3)](_);}};$(g,_0x231458(0x8e),W),$(g,'type',_0x13e5ee[_0x231458(0x8a)]),g=ie([_0x326330(_0x47e1d5,_0x40c7ce,_0x3794a6),N(0x1,_0x3fb278(_0x1416f8)),N(0x2,_0x25bde9)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1f33(){const _0x107e8b=['length','UniverNetwork','slice','_sessionService','@univerjs/network','Solved','@univerjs/core','4640140KpGVvO','userID','IThreadCommentDataSourceService','UniverThreadComment','Plugin','exports','Reply','requireSession','createTimestamp','map','userId','thread-comment-data-source.config','user','690VUbmuM','Injector','rangeType','addComment','Add','Delete','updateComment','addUser','getMemberID','format','find','rangeId','Unknown','reply','@univerjs-pro/collaboration-client','getCurrentUser','UniverThreadCommentUIPlugin','disposeWithMe','replies','listComments','@univerjs/thread-comment-ui','UniverInstanceType','post','onStarting','customRanges','IConfigService','UNRECOGNIZED','_threadCommentModel','_threadCommentDataSourceService','merge','Inject','function','_initDataSource','_init','symbol','Disposable','getOwnPropertyDescriptor','UniverLicensePlugin','_initUserSync','threadId','7mHleSS','YYYY/MM/DD\x20HH:mm','UniverThreadCommentDataSourcePlugin','UNIVER_UNKNOWN','Edit','_userService','deleteComment','UniverProThreadCommentDatasource','parentId','4469220AjGuiB','commentUpdate$','getComment','_configService','type','setConfig','_injector','comment','unitId','stringify','resolved','6YEceSN','defineProperty','/universer-api/comment/unit/','pipe','Module','_commentService','getUnit','root','saveCommentToSnapshot','_httpService','replyId','users','pluginName','Solve','parse','7088319ABYSxM','1154076eFjGXH','UserManagerService','@univerjs-pro/license','content','66770psolFu','UniverThreadCommentUi','payload','bufferTime','UniverCollaborationClientPlugin','_threadCommentDataSource','delete','1212633IUONVw','amd','12273312wjSbsf','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_config','dayjs','CollaborationSessionService','syncUpdateMutationToColla','/solved','COMMENT','getUser','CustomRangeType','resolveComment','error','get','/delete','UniverProCollaborationClient','solved','/add','OpenOrReOpen','code','body','filter','HTTPService','size','values','/universer-api/user/list','rxjs','subscribe','add','forEach'];_0x1f33=function(){return _0x107e8b;};return _0x1f33();}function _0x582e(_0x3753b7,_0x57123b){_0x3753b7=_0x3753b7-0x78;const _0x1f33e0=_0x1f33();let _0x582ee8=_0x1f33e0[_0x3753b7];return _0x582ee8;}(function(_0x579a82,_0x324de7){const _0x151030=_0x582e,_0x3aa813=_0x579a82();while(!![]){try{const _0x4243f3=-parseInt(_0x151030(0xff))/0x1+parseInt(_0x151030(0xef))/0x2*(parseInt(_0x151030(0x7f))/0x3)+parseInt(_0x151030(0xe4))/0x4+parseInt(_0x151030(0x78))/0x5*(parseInt(_0x151030(0xb3))/0x6)+parseInt(_0x151030(0xdb))/0x7*(-parseInt(_0x151030(0x81))/0x8)+-parseInt(_0x151030(0xfe))/0x9+parseInt(_0x151030(0xa6))/0xa;if(_0x4243f3===_0x324de7)break;else _0x3aa813['push'](_0x3aa813['shift']());}catch(_0xbe3822){_0x3aa813['push'](_0x3aa813['shift']());}}}(_0x1f33,0xd0747),function(_0x32a14e,_0x4dcfb2){const _0x2cdec8=_0x582e;typeof exports=='object'&&typeof module<'u'?_0x4dcfb2(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x2cdec8(0xd2)&&define[_0x2cdec8(0x80)]?define([_0x2cdec8(0xab),_0x2cdec8(0xc1),_0x2cdec8(0x101),_0x2cdec8(0xa5),_0x2cdec8(0xc7),'@univerjs/thread-comment',_0x2cdec8(0x9b),_0x2cdec8(0xa3)],_0x4dcfb2):(_0x32a14e=typeof globalThis<'u'?globalThis:_0x32a14e||self,_0x4dcfb2(_0x32a14e[_0x2cdec8(0xe2)]={},_0x32a14e[_0x2cdec8(0x90)],_0x32a14e['UniverProLicense'],_0x32a14e['UniverCore'],_0x32a14e[_0x2cdec8(0x79)],_0x32a14e[_0x2cdec8(0xa9)],_0x32a14e[_0x2cdec8(0x9b)],_0x32a14e[_0x2cdec8(0xa0)]));}(this,function(_0x4a4542,_0x501f4a,_0x584cca,_0x53986e,_0x4f5fb3,_0x1a4962,_0x3d414f,_0x48fb19){'use strict';const _0x199a38=_0x582e;const _0x441cd2=_0x199a38(0x83);var _0x20079d=(_0x95e3a3=>(_0x95e3a3[_0x95e3a3['OpenOrReOpen']=0x0]=_0x199a38(0x93),_0x95e3a3[_0x95e3a3['Solved']=0x1]=_0x199a38(0xa4),_0x95e3a3[_0x95e3a3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x95e3a3))(_0x20079d||{}),_0x3f92a6=(_0x16fed5=>(_0x16fed5[_0x16fed5[_0x199a38(0xbf)]=0x0]='Unknown',_0x16fed5[_0x16fed5[_0x199a38(0xb7)]=0x1]=_0x199a38(0xb7),_0x16fed5[_0x16fed5[_0x199a38(0xac)]=0x2]='Reply',_0x16fed5[_0x16fed5['Edit']=0x3]=_0x199a38(0xdf),_0x16fed5[_0x16fed5[_0x199a38(0xb8)]=0x4]=_0x199a38(0xb8),_0x16fed5[_0x16fed5[_0x199a38(0xfc)]=0x5]=_0x199a38(0xfc),_0x16fed5[_0x16fed5[_0x199a38(0xcd)]=-0x1]=_0x199a38(0xcd),_0x16fed5))(_0x3f92a6||{});const _0x562824=_0x2753aa=>_0x53986e[_0x199a38(0x85)](new Date(+_0x2753aa))[_0x199a38(0xbc)]('YYYY/MM/DD\x20HH:mm'),_0x59941d=async(_0x228d71,_0x71ed38)=>{const _0x22733a=_0x199a38,_0x18d562=_0x228d71['get'](_0x53986e[_0x22733a(0x100)]),_0x3a94e7=_0x228d71[_0x22733a(0x8e)](_0x48fb19[_0x22733a(0x97)]);_0x71ed38[_0x22733a(0x9e)](_0x1bfe7a=>{const _0x4864a9=_0x22733a;_0x18d562[_0x4864a9(0x8a)](_0x1bfe7a)&&_0x71ed38[_0x4864a9(0x7e)](_0x1bfe7a);}),_0x71ed38[_0x22733a(0x98)]&&(await _0x3a94e7[_0x22733a(0x8e)](_0x22733a(0x9a),{'params':{'userIDs':[..._0x71ed38]}}))[_0x22733a(0x95)][_0x22733a(0xfa)][_0x22733a(0x9e)](_0x2335b5=>{_0x2335b5&&_0x18d562['addUser'](_0x2335b5);});};var _0x3cd064=Object['getOwnPropertyDescriptor'],_0x30e1ac=(_0x386fbb,_0x472e44,_0x1272bd,_0x2f3d40)=>{const _0x234e03=_0x199a38;for(var _0x3cf980=_0x2f3d40>0x1?void 0x0:_0x2f3d40?_0x3cd064(_0x472e44,_0x1272bd):_0x472e44,_0x29e929=_0x386fbb[_0x234e03(0x9f)]-0x1,_0x447d5d;_0x29e929>=0x0;_0x29e929--)(_0x447d5d=_0x386fbb[_0x29e929])&&(_0x3cf980=_0x447d5d(_0x3cf980)||_0x3cf980);return _0x3cf980;},_0x5e6e71=(_0x5ec0e5,_0x13b158)=>(_0x531336,_0x3b4fc2)=>_0x13b158(_0x531336,_0x3b4fc2,_0x5ec0e5);let _0x246c49=class extends _0x53986e[_0x199a38(0xd6)]{constructor(_0x3dfd3d,_0x57b6ff,_0x404660,_0x57aac6){const _0x144b80=_0x199a38;super(),this[_0x144b80(0xf4)]=_0x3dfd3d,this[_0x144b80(0xce)]=_0x57b6ff,this[_0x144b80(0xe0)]=_0x404660,this[_0x144b80(0xea)]=_0x57aac6,this[_0x144b80(0xd4)](),this[_0x144b80(0xd9)]();}['_initUserSync'](){const _0x2369c0=_0x199a38;this[_0x2369c0(0xc4)](this[_0x2369c0(0xce)]['commentUpdate$'][_0x2369c0(0xf2)](_0x3d414f[_0x2369c0(0x7b)](0x10))['subscribe'](_0x90874a=>{const _0x16f46f=_0x2369c0,_0x50677d=new Set();_0x90874a['forEach'](_0x1e3dd8=>{const _0x1a0a0c=_0x582e;if(_0x1e3dd8[_0x1a0a0c(0xe8)]===_0x1a0a0c(0x9d)){const _0x38ec4c=_0x1e3dd8[_0x1a0a0c(0x7a)]['personId'];_0x50677d['add'](_0x38ec4c);}}),_0x59941d(this[_0x16f46f(0xea)],_0x50677d);}));}[_0x199a38(0xd4)](){const _0x162355=_0x199a38;this[_0x162355(0xc4)](this['_commentService'][_0x162355(0xe5)][_0x162355(0x9c)](async _0x4fe4f9=>{const _0x49ca5d=_0x162355;var _0x54e34a,_0x172506,_0x32bd75,_0x3e172d;const _0x4daa16=(_0x54e34a=this[_0x49ca5d(0xce)][_0x49ca5d(0xf5)](_0x4fe4f9[_0x49ca5d(0xec)])[_0x49ca5d(0xbd)](_0xdd264c=>_0xdd264c['threadId']===_0x4fe4f9[_0x49ca5d(0xda)]))==null?void 0x0:_0x54e34a[_0x49ca5d(0xf6)];if(!_0x4daa16)return;const {unitId:_0x36df04,subUnitId:_0x191161}=_0x4daa16;switch(_0x4fe4f9[_0x49ca5d(0xb2)]&&this[_0x49ca5d(0xe0)]['addUser'](_0x4fe4f9[_0x49ca5d(0xb2)]),_0x4fe4f9[_0x49ca5d(0xe8)]){case _0x3f92a6['Add']:break;case _0x3f92a6[_0x49ca5d(0xac)]:{this[_0x49ca5d(0xce)]['addComment'](_0x36df04,_0x191161,{'unitId':_0x36df04,'subUnitId':_0x191161,'ref':'','id':_0x4fe4f9[_0x49ca5d(0xf9)],'dT':_0x562824(+_0x4fe4f9['createTimestamp']),'threadId':_0x4fe4f9[_0x49ca5d(0xda)],'personId':(_0x32bd75=(_0x172506=_0x4fe4f9['user'])==null?void 0x0:_0x172506[_0x49ca5d(0xa7)])!=null?_0x32bd75:_0x4fe4f9['userId'],'text':JSON[_0x49ca5d(0xfd)](_0x4fe4f9[_0x49ca5d(0x102)]),'parentId':_0x4daa16['id']});break;}case _0x3f92a6['Delete']:{const _0x6f349f=this[_0x49ca5d(0xce)][_0x49ca5d(0xe6)](_0x36df04,_0x191161,_0x4fe4f9[_0x49ca5d(0xf9)]);_0x6f349f&&_0x6f349f[_0x49ca5d(0xe3)]&&this['_threadCommentModel']['deleteComment'](_0x36df04,_0x191161,_0x4fe4f9[_0x49ca5d(0xf9)]);break;}case _0x3f92a6[_0x49ca5d(0xdf)]:{this[_0x49ca5d(0xce)][_0x49ca5d(0xb9)](_0x36df04,_0x191161,{'commentId':_0x4fe4f9[_0x49ca5d(0xf9)],'text':JSON[_0x49ca5d(0xfd)](_0x4fe4f9[_0x49ca5d(0x102)])});break;}case _0x3f92a6[_0x49ca5d(0xfc)]:{const _0x533d26=(_0x3e172d=this[_0x49ca5d(0xce)][_0x49ca5d(0xf5)](_0x4fe4f9[_0x49ca5d(0xec)])[_0x49ca5d(0xbd)](_0x5aae4a=>_0x5aae4a[_0x49ca5d(0xda)]===_0x4fe4f9[_0x49ca5d(0xda)]))==null?void 0x0:_0x3e172d['root'];_0x533d26&&this['_threadCommentModel'][_0x49ca5d(0x8c)](_0x36df04,_0x191161,_0x533d26['id'],_0x4fe4f9[_0x49ca5d(0x91)]===_0x20079d[_0x49ca5d(0xa4)]);break;}}}));}};_0x246c49=_0x30e1ac([_0x5e6e71(0x0,_0x53986e[_0x199a38(0xd1)](_0x501f4a['CommentService'])),_0x5e6e71(0x1,_0x53986e[_0x199a38(0xd1)](_0x1a4962['ThreadCommentModel'])),_0x5e6e71(0x2,_0x53986e['Inject'](_0x53986e['UserManagerService'])),_0x5e6e71(0x3,_0x53986e[_0x199a38(0xd1)](_0x53986e[_0x199a38(0xb4)]))],_0x246c49);const _0x589732=_0x199a38(0xb1),_0x31c2b6={};var _0x2ffc2d=Object[_0x199a38(0xd7)],_0x1f7dc1=(_0x1f0d35,_0x3fbf7f,_0x35abbd,_0x1aefcf)=>{const _0x32f169=_0x199a38;for(var _0x20c7ef=_0x1aefcf>0x1?void 0x0:_0x1aefcf?_0x2ffc2d(_0x3fbf7f,_0x35abbd):_0x3fbf7f,_0x225cbe=_0x1f0d35[_0x32f169(0x9f)]-0x1,_0x4082a9;_0x225cbe>=0x0;_0x225cbe--)(_0x4082a9=_0x1f0d35[_0x225cbe])&&(_0x20c7ef=_0x4082a9(_0x20c7ef)||_0x20c7ef);return _0x20c7ef;},_0x10de0c=(_0x31d8b1,_0x490da4)=>(_0x4b95f1,_0x3bbe5d)=>_0x490da4(_0x4b95f1,_0x3bbe5d,_0x31d8b1);function _0x5ab333(_0x1e3f7a,_0x26da89){const _0x4b460c=_0x199a38,_0x48fa98=_0x1e3f7a['replies'][0x0];return{..._0x26da89,'id':_0x48fa98[_0x4b460c(0xf9)],'resolved':_0x1e3f7a[_0x4b460c(0x91)]===0x1,'dT':_0x562824(_0x48fa98['createTimestamp']),'personId':_0x48fa98[_0x4b460c(0xb0)],'threadId':_0x48fa98[_0x4b460c(0xda)]};}function _0xc5c0fb(_0x523585,_0x17bf95,_0x12046c){const _0x27a5e9=_0x199a38;var _0x2d009e,_0x5d1e51;if(((_0x5d1e51=(_0x2d009e=_0x523585==null?void 0x0:_0x523585[_0x27a5e9(0xc5)])==null?void 0x0:_0x2d009e['length'])!=null?_0x5d1e51:0x0)>0x0){const _0x3ea207=(_0x5c8c71,_0xfe9a97)=>({'id':_0x5c8c71[_0x27a5e9(0xf9)],'threadId':_0x5c8c71[_0x27a5e9(0xda)],'dT':_0x562824(_0x5c8c71[_0x27a5e9(0xae)]),'personId':_0x5c8c71['userId'],'resolved':_0x523585['solved']===_0x20079d[_0x27a5e9(0xa4)],'unitId':_0x17bf95,'subUnitId':_0x12046c,'text':JSON[_0x27a5e9(0xfd)](_0x5c8c71[_0x27a5e9(0x102)]),'parentId':_0xfe9a97}),_0x18ea42=_0x3ea207(_0x523585[_0x27a5e9(0xc5)][0x0]);return{..._0x18ea42,'children':_0x523585[_0x27a5e9(0xc5)][_0x27a5e9(0xa1)](0x1)[_0x27a5e9(0xaf)](_0x31af71=>_0x3ea207(_0x31af71,_0x18ea42['id']))};}return null;}let _0xbcb1ca=class{constructor(_0x1d200e,_0x2974d3,_0x5da352){const _0x4ffd02=_0x199a38;this[_0x4ffd02(0xf8)]=_0x1d200e,this['_userService']=_0x2974d3,this['_sessionService']=_0x5da352;}async[_0x199a38(0xb6)](_0x26580b){const _0x9c01b6=_0x199a38;var _0x3cc582,_0x6d9d53;const {parentId:_0x16724a,unitId:_0x577a9e,text:_0x1290f8,threadId:_0x1e4fc7}=_0x26580b,_0x586c87=(_0x6d9d53=(_0x3cc582=_0x1290f8[_0x9c01b6(0xcb)])==null?void 0x0:_0x3cc582[_0x9c01b6(0x96)](_0x50f98f=>_0x50f98f['rangeType']===_0x53986e[_0x9c01b6(0x8b)]['COMMENT'])[_0x9c01b6(0xaf)](_0x1d4d26=>_0x1d4d26[_0x9c01b6(0xbe)]))!=null?_0x6d9d53:[],_0x4f2073=JSON[_0x9c01b6(0xed)](_0x1290f8),_0x59214e=(await this['_sessionService']['requireSession'](_0x577a9e))[_0x9c01b6(0xbb)]();if(_0x16724a){const _0x2cc79a={'memberId':_0x59214e,'unitId':_0x577a9e,'content':_0x4f2073,'mention':_0x586c87,'threadId':_0x1e4fc7},_0x14e025=(await this[_0x9c01b6(0xf8)][_0x9c01b6(0xc9)](_0x9c01b6(0xf1)+_0x577a9e+'/reply',{'body':_0x2cc79a}))[_0x9c01b6(0x95)][_0x9c01b6(0xc0)];return{..._0x26580b,'id':_0x14e025[_0x9c01b6(0xf9)],'dT':_0x53986e[_0x9c01b6(0x85)](+_0x14e025['createTimestamp'])[_0x9c01b6(0xbc)](_0x9c01b6(0xdc)),'personId':_0x14e025[_0x9c01b6(0xb0)]};}else{const _0x3420f6={'memberId':_0x59214e,'unitId':_0x577a9e,'content':_0x4f2073,'mention':_0x586c87},_0x620387=await this[_0x9c01b6(0xf8)]['post']('/universer-api/comment/unit/'+_0x577a9e+_0x9c01b6(0x92),{'body':_0x3420f6});return _0x5ab333(_0x620387[_0x9c01b6(0x95)][_0x9c01b6(0xeb)],_0x26580b);}}async['updateComment'](_0xea97f3){const _0x43560e=_0x199a38;var _0x5eadf5,_0x57f3d3;const {text:_0x181c3e,unitId:_0x2e2b9c}=_0xea97f3,_0x297f34=(_0x57f3d3=(_0x5eadf5=_0x181c3e[_0x43560e(0xcb)])==null?void 0x0:_0x5eadf5[_0x43560e(0x96)](_0x4de9df=>_0x4de9df[_0x43560e(0xb5)]===_0x53986e[_0x43560e(0x8b)][_0x43560e(0x89)])['map'](_0x1fb03e=>_0x1fb03e[_0x43560e(0xbe)]))!=null?_0x57f3d3:[],_0x1b1ee3=JSON[_0x43560e(0xed)](_0x181c3e),_0x1a7c3b=_0xea97f3[_0x43560e(0xda)],_0x4ae534=_0xea97f3['id'],_0x3dbcb5={'memberId':(await this[_0x43560e(0xa2)][_0x43560e(0xad)](_0x2e2b9c))['getMemberID'](),'unitId':_0x2e2b9c,'threadId':_0x1a7c3b,'mention':_0x297f34,'content':_0x1b1ee3,'replyId':_0x4ae534},_0x1aee11=await this['_httpService'][_0x43560e(0xc9)]('/universer-api/comment/unit/'+_0x2e2b9c+'/edit',{'body':_0x3dbcb5});return!_0x1aee11[_0x43560e(0x95)][_0x43560e(0x8d)]||_0x1aee11['body'][_0x43560e(0x8d)]['code']===0x1;}async[_0x199a38(0x8c)](_0x1c5429){const _0x2256f6=_0x199a38,{unitId:_0x52f904}=_0x1c5429,_0x44b4b4=_0x1c5429[_0x2256f6(0xda)],_0x3573a5={'memberId':this[_0x2256f6(0xe0)][_0x2256f6(0xc2)]()[_0x2256f6(0xa7)],'unitId':_0x52f904,'threadId':_0x44b4b4,'solved':_0x1c5429[_0x2256f6(0xee)]?_0x20079d[_0x2256f6(0xa4)]:_0x20079d[_0x2256f6(0x93)]},_0x44b53f=await this['_httpService']['post'](_0x2256f6(0xf1)+_0x52f904+_0x2256f6(0x88),{'body':_0x3573a5});return!_0x44b53f['body'][_0x2256f6(0x8d)]||_0x44b53f[_0x2256f6(0x95)][_0x2256f6(0x8d)][_0x2256f6(0x94)]===0x1;}async[_0x199a38(0xe1)](_0x3f960f,_0x414229,_0x3b454d,_0x3b8877){const _0x1bb46a=_0x199a38,_0x10ae95={'memberId':(await this[_0x1bb46a(0xa2)][_0x1bb46a(0xad)](_0x3f960f))[_0x1bb46a(0xbb)](),'threadId':_0x3b454d,'replyId':_0x3b8877,'unitId':_0x3f960f},_0x5d2854=await this[_0x1bb46a(0xf8)][_0x1bb46a(0xc9)](_0x1bb46a(0xf1)+_0x3f960f+_0x1bb46a(0x8f),{'body':_0x10ae95});return!_0x5d2854['body'][_0x1bb46a(0x8d)]||_0x5d2854[_0x1bb46a(0x95)][_0x1bb46a(0x8d)][_0x1bb46a(0x94)]===0x1;}async[_0x199a38(0xc6)](_0x501390,_0x268888,_0x38cab3){const _0x5a7685=_0x199a38,_0x1f28cd={'unitId':_0x501390,'threadId':_0x38cab3},_0xc05d10=await this['_httpService'][_0x5a7685(0xc9)]('/universer-api/comment/unit/'+_0x501390+_0x5a7685(0x82),{'body':_0x1f28cd}),_0x5658fa=_0x38cab3[_0x5a7685(0xaf)](_0x341cec=>_0xc5c0fb(_0xc05d10[_0x5a7685(0x95)]['comments'][_0x341cec],_0x501390,_0x268888))[_0x5a7685(0x96)](Boolean);return Object[_0x5a7685(0x99)](_0xc05d10['body'][_0x5a7685(0xfa)])[_0x5a7685(0x9e)](_0x334fd7=>{const _0x49f1b3=_0x5a7685;this[_0x49f1b3(0xe0)][_0x49f1b3(0xba)](_0x334fd7);}),_0x5658fa;}[_0x199a38(0xf7)](_0x48cbde){return{'id':_0x48cbde['id'],'threadId':_0x48cbde['threadId'],'ref':_0x48cbde['ref']};}};_0xbcb1ca=_0x1f7dc1([_0x10de0c(0x0,_0x53986e[_0x199a38(0xd1)](_0x48fb19[_0x199a38(0x97)])),_0x10de0c(0x1,_0x53986e[_0x199a38(0xd1)](_0x53986e[_0x199a38(0x100)])),_0x10de0c(0x2,_0x53986e['Inject'](_0x501f4a[_0x199a38(0x86)]))],_0xbcb1ca);var _0x3414c2=Object[_0x199a38(0xd7)],_0x2a2eaa=(_0x5844b4,_0x4333bf,_0x58fd22,_0x5875e4)=>{const _0x561cea=_0x199a38;for(var _0x4a4cbf=_0x5875e4>0x1?void 0x0:_0x5875e4?_0x3414c2(_0x4333bf,_0x58fd22):_0x4333bf,_0x1ba85b=_0x5844b4[_0x561cea(0x9f)]-0x1,_0x4973bd;_0x1ba85b>=0x0;_0x1ba85b--)(_0x4973bd=_0x5844b4[_0x1ba85b])&&(_0x4a4cbf=_0x4973bd(_0x4a4cbf)||_0x4a4cbf);return _0x4a4cbf;},_0x5e848e=(_0x1bc583,_0x174fd5)=>(_0x49f65c,_0x358bd4)=>_0x174fd5(_0x49f65c,_0x358bd4,_0x1bc583);let _0x20e4fb=class extends _0x53986e['Disposable']{constructor(_0xa289c8,_0x5e704c){const _0x4c19f1=_0x199a38;super(),this['_threadCommentDataSourceService']=_0xa289c8,this[_0x4c19f1(0x7d)]=_0x5e704c,this[_0x4c19f1(0xd3)]();}[_0x199a38(0xd3)](){const _0x2c6f14=_0x199a38;this[_0x2c6f14(0xcf)]['dataSource']=this[_0x2c6f14(0x7d)],this[_0x2c6f14(0xcf)][_0x2c6f14(0x87)]=!0x1;}};_0x20e4fb=_0x2a2eaa([_0x5e848e(0x0,_0x1a4962[_0x199a38(0xa8)]),_0x5e848e(0x1,_0x53986e[_0x199a38(0xd1)](_0xbcb1ca))],_0x20e4fb);var _0x488a60=Object[_0x199a38(0xf0)],_0x2eaa5b=Object[_0x199a38(0xd7)],_0xfc78ae=(_0x18aae8,_0x38e869,_0x154aaa)=>_0x38e869 in _0x18aae8?_0x488a60(_0x18aae8,_0x38e869,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x154aaa}):_0x18aae8[_0x38e869]=_0x154aaa,_0x27ad72=(_0x4189b0,_0x2b6c9b,_0x2f98f0,_0xedac97)=>{const _0x448617=_0x199a38;for(var _0xf21309=_0xedac97>0x1?void 0x0:_0xedac97?_0x2eaa5b(_0x2b6c9b,_0x2f98f0):_0x2b6c9b,_0x541a06=_0x4189b0[_0x448617(0x9f)]-0x1,_0x1bc148;_0x541a06>=0x0;_0x541a06--)(_0x1bc148=_0x4189b0[_0x541a06])&&(_0xf21309=_0x1bc148(_0xf21309)||_0xf21309);return _0xf21309;},_0xa2fd97=(_0x285850,_0x3261a2)=>(_0x3f439d,_0x28e9db)=>_0x3261a2(_0x3f439d,_0x28e9db,_0x285850),_0x10c982=(_0xf21544,_0x3f3185,_0x574279)=>_0xfc78ae(_0xf21544,typeof _0x3f3185!=_0x199a38(0xd5)?_0x3f3185+'':_0x3f3185,_0x574279);_0x4a4542[_0x199a38(0xdd)]=class extends _0x53986e[_0x199a38(0xaa)]{constructor(_0x22d9e4=_0x31c2b6,_0x5ca4d7,_0x4703ee){const _0x43377d=_0x199a38;super(),this['_config']=_0x22d9e4,this[_0x43377d(0xea)]=_0x5ca4d7,this['_configService']=_0x4703ee;const {..._0xd04789}=_0x53986e[_0x43377d(0xd0)]({},_0x31c2b6,this[_0x43377d(0x84)]);this[_0x43377d(0xe7)][_0x43377d(0xe9)](_0x589732,_0xd04789);}[_0x199a38(0xca)](){[[_0xbcb1ca],[_0x20e4fb],[_0x246c49]]['forEach'](_0x5e152e=>{const _0x594ae2=_0x582e;this[_0x594ae2(0xea)][_0x594ae2(0x9d)](_0x5e152e);});}['onReady'](){const _0x49f46f=_0x199a38;this[_0x49f46f(0xea)][_0x49f46f(0x8e)](_0x20e4fb),this[_0x49f46f(0xea)]['get'](_0x246c49);}},_0x10c982(_0x4a4542[_0x199a38(0xdd)],_0x199a38(0xfb),_0x441cd2),_0x10c982(_0x4a4542[_0x199a38(0xdd)],_0x199a38(0xe8),_0x53986e[_0x199a38(0xc8)][_0x199a38(0xde)]),_0x4a4542['UniverThreadCommentDataSourcePlugin']=_0x27ad72([_0x53986e['DependentOn'](_0x4f5fb3[_0x199a38(0xc3)],_0x501f4a[_0x199a38(0x7c)],_0x584cca[_0x199a38(0xd8)]),_0xa2fd97(0x1,_0x53986e[_0x199a38(0xd1)](_0x53986e[_0x199a38(0xb4)])),_0xa2fd97(0x2,_0x53986e[_0x199a38(0xcc)])],_0x4a4542[_0x199a38(0xdd)]),Object[_0x199a38(0xf0)](_0x4a4542,Symbol['toStringTag'],{'value':_0x199a38(0xf3)});}));
|
|
1
|
+
function _0x1d47(){const _0x526205=['user','UniverThreadCommentDataSourcePlugin','defineProperty','1941597jjRLip','addComment','parse','Solved','forEach','onReady','content','UniverCollaborationClientPlugin','10UjQcSX','function','updateComment','type','_configService','replies','code','/universer-api/comment/unit/','pipe','createTimestamp','/add','/universer-api/user/list','Module','761718vsZgzY','format','_initUserSync','add','find','/list','HTTPService','merge','solved','_threadCommentModel','CommentService','rangeType','getOwnPropertyDescriptor','subscribe','UserManagerService','getComment','getMemberID','thread-comment-data-source.config','length','exports','_userService','296359yVblPy','UniverInstanceType','@univerjs-pro/license','saveCommentToSnapshot','pluginName','threadId','_injector','disposeWithMe','Disposable','payload','/solved','UniverThreadComment','resolveComment','UniverThreadCommentUIPlugin','customRanges','error','_config','reply','filter','comments','addUser','amd','_commentService','symbol','onStarting','@univerjs/thread-comment-ui','userID','personId','38960piiiQW','112AzaMgv','userId','unitId','Add','stringify','Reply','40700YiiGql','getCurrentUser','240GaaaMv','comment','DependentOn','_httpService','UNRECOGNIZED','UniverProThreadCommentDatasource','@univerjs-pro/collaboration-client','UniverProLicense','map','/delete','CollaborationSessionService','UniverCore','Injector','delete','YYYY/MM/DD\x20HH:mm','root','getUnit','Inject','@univerjs/network','_threadCommentDataSource','Solve','2581928CqmJtH','Edit','rangeId','146556sQRBZL','ref','rxjs','get','commentUpdate$','syncUpdateMutationToColla','bufferTime','dayjs','_threadCommentDataSourceService','replyId','_sessionService','1628OlTBXP','COMMENT','post','UniverThreadCommentUi','users','_initDataSource','UniverProCollaborationClient','Delete','UniverNetwork','CustomRangeType','deleteComment','listComments','@univerjs/thread-comment','resolved','object','OpenOrReOpen','parentId','/reply','body','requireSession','3usuhFu'];_0x1d47=function(){return _0x526205;};return _0x1d47();}function _0x4087(_0x31160d,_0x547d67){_0x31160d=_0x31160d-0x135;const _0x1d47b8=_0x1d47();let _0x4087f0=_0x1d47b8[_0x31160d];return _0x4087f0;}(function(_0x49302e,_0x467924){const _0x576ef5=_0x4087,_0x10abdd=_0x49302e();while(!![]){try{const _0x39ddd9=-parseInt(_0x576ef5(0x156))/0x1+-parseInt(_0x576ef5(0x18e))/0x2+parseInt(_0x576ef5(0x13d))/0x3*(-parseInt(_0x576ef5(0x1a5))/0x4)+-parseInt(_0x576ef5(0x187))/0x5*(parseInt(_0x576ef5(0x190))/0x6)+parseInt(_0x576ef5(0x16b))/0x7*(parseInt(_0x576ef5(0x188))/0x8)+parseInt(_0x576ef5(0x141))/0x9*(-parseInt(_0x576ef5(0x149))/0xa)+-parseInt(_0x576ef5(0x1b3))/0xb*(-parseInt(_0x576ef5(0x1a8))/0xc);if(_0x39ddd9===_0x467924)break;else _0x10abdd['push'](_0x10abdd['shift']());}catch(_0x38425b){_0x10abdd['push'](_0x10abdd['shift']());}}}(_0x1d47,0x6cb5f),function(_0x5ed46b,_0x4af973){const _0x19f574=_0x4087;typeof exports==_0x19f574(0x137)&&typeof module<'u'?_0x4af973(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x19f574(0x14a)&&define[_0x19f574(0x180)]?define([_0x19f574(0x169),_0x19f574(0x196),_0x19f574(0x16d),'@univerjs/core',_0x19f574(0x184),_0x19f574(0x135),_0x19f574(0x1aa),_0x19f574(0x1a2)],_0x4af973):(_0x5ed46b=typeof globalThis<'u'?globalThis:_0x5ed46b||self,_0x4af973(_0x5ed46b[_0x19f574(0x195)]={},_0x5ed46b[_0x19f574(0x1b9)],_0x5ed46b[_0x19f574(0x197)],_0x5ed46b[_0x19f574(0x19b)],_0x5ed46b[_0x19f574(0x1b6)],_0x5ed46b[_0x19f574(0x176)],_0x5ed46b['rxjs'],_0x5ed46b[_0x19f574(0x1bb)]));}(this,function(_0x49d9d0,_0x3f551b,_0x440cb5,_0x4fe06f,_0x54f791,_0x1e3f01,_0x3ca38b,_0x5d6bde){'use strict';const _0x6736aa=_0x4087;const _0x56c31e='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x59ce22=(_0x3882d3=>(_0x3882d3[_0x3882d3['OpenOrReOpen']=0x0]=_0x6736aa(0x138),_0x3882d3[_0x3882d3['Solved']=0x1]=_0x6736aa(0x144),_0x3882d3[_0x3882d3[_0x6736aa(0x194)]=-0x1]=_0x6736aa(0x194),_0x3882d3))(_0x59ce22||{}),_0x1c27e3=(_0x296fe4=>(_0x296fe4[_0x296fe4['Unknown']=0x0]='Unknown',_0x296fe4[_0x296fe4[_0x6736aa(0x18b)]=0x1]=_0x6736aa(0x18b),_0x296fe4[_0x296fe4[_0x6736aa(0x18d)]=0x2]=_0x6736aa(0x18d),_0x296fe4[_0x296fe4[_0x6736aa(0x1a6)]=0x3]=_0x6736aa(0x1a6),_0x296fe4[_0x296fe4[_0x6736aa(0x1ba)]=0x4]=_0x6736aa(0x1ba),_0x296fe4[_0x296fe4['Solve']=0x5]=_0x6736aa(0x1a4),_0x296fe4[_0x296fe4[_0x6736aa(0x194)]=-0x1]=_0x6736aa(0x194),_0x296fe4))(_0x1c27e3||{});const _0x38a025=_0x212e95=>_0x4fe06f[_0x6736aa(0x1af)](new Date(+_0x212e95))[_0x6736aa(0x157)](_0x6736aa(0x19e)),_0x4b7d46=async(_0x3776d9,_0x5651b4)=>{const _0x1d02fc=_0x6736aa,_0xf64a32=_0x3776d9['get'](_0x4fe06f['UserManagerService']),_0x57cf63=_0x3776d9[_0x1d02fc(0x1ab)](_0x5d6bde[_0x1d02fc(0x15c)]);_0x5651b4[_0x1d02fc(0x145)](_0x5c34fe=>{const _0x484313=_0x1d02fc;_0xf64a32['getUser'](_0x5c34fe)&&_0x5651b4[_0x484313(0x19d)](_0x5c34fe);}),_0x5651b4['size']&&(await _0x57cf63[_0x1d02fc(0x1ab)](_0x1d02fc(0x154),{'params':{'userIDs':[..._0x5651b4]}}))['body'][_0x1d02fc(0x1b7)]['forEach'](_0x3de21c=>{const _0x1c7213=_0x1d02fc;_0x3de21c&&_0xf64a32[_0x1c7213(0x17f)](_0x3de21c);});};var _0x130ee3=Object[_0x6736aa(0x162)],_0x519187=(_0x1025b4,_0x338459,_0x17de55,_0x2b7874)=>{const _0xeadce8=_0x6736aa;for(var _0x2b7efa=_0x2b7874>0x1?void 0x0:_0x2b7874?_0x130ee3(_0x338459,_0x17de55):_0x338459,_0x12a4c0=_0x1025b4[_0xeadce8(0x168)]-0x1,_0x787621;_0x12a4c0>=0x0;_0x12a4c0--)(_0x787621=_0x1025b4[_0x12a4c0])&&(_0x2b7efa=_0x787621(_0x2b7efa)||_0x2b7efa);return _0x2b7efa;},_0x5d16ca=(_0x2aaace,_0xe6ae6c)=>(_0x244d3b,_0x1fd9fd)=>_0xe6ae6c(_0x244d3b,_0x1fd9fd,_0x2aaace);let _0x4be7f0=class extends _0x4fe06f[_0x6736aa(0x173)]{constructor(_0x23f436,_0x574643,_0xe221a3,_0x2d7070){const _0xcb0d8c=_0x6736aa;super(),this[_0xcb0d8c(0x181)]=_0x23f436,this['_threadCommentModel']=_0x574643,this[_0xcb0d8c(0x16a)]=_0xe221a3,this[_0xcb0d8c(0x171)]=_0x2d7070,this['_init'](),this[_0xcb0d8c(0x158)]();}['_initUserSync'](){const _0x2e610d=_0x6736aa;this[_0x2e610d(0x172)](this[_0x2e610d(0x15f)][_0x2e610d(0x1ac)][_0x2e610d(0x151)](_0x3ca38b[_0x2e610d(0x1ae)](0x10))[_0x2e610d(0x163)](_0x3e36b2=>{const _0x5e9012=_0x2e610d,_0x4f7834=new Set();_0x3e36b2[_0x5e9012(0x145)](_0x1c0676=>{const _0x33abde=_0x5e9012;if(_0x1c0676[_0x33abde(0x14c)]==='add'){const _0x1aaa6f=_0x1c0676[_0x33abde(0x174)][_0x33abde(0x186)];_0x4f7834[_0x33abde(0x159)](_0x1aaa6f);}}),_0x4b7d46(this[_0x5e9012(0x171)],_0x4f7834);}));}['_init'](){const _0x49d218=_0x6736aa;this[_0x49d218(0x172)](this[_0x49d218(0x181)][_0x49d218(0x1ac)]['subscribe'](async _0x144f8a=>{const _0x3e2eaa=_0x49d218;var _0x5da06e,_0x32eabc,_0x1df3e1,_0x2c8c21;const _0x2213f1=(_0x5da06e=this['_threadCommentModel'][_0x3e2eaa(0x1a0)](_0x144f8a[_0x3e2eaa(0x18a)])[_0x3e2eaa(0x15a)](_0x49137b=>_0x49137b[_0x3e2eaa(0x170)]===_0x144f8a[_0x3e2eaa(0x170)]))==null?void 0x0:_0x5da06e[_0x3e2eaa(0x19f)];if(!_0x2213f1)return;const {unitId:_0x1e94d4,subUnitId:_0xd0deb5}=_0x2213f1;switch(_0x144f8a[_0x3e2eaa(0x13e)]&&this[_0x3e2eaa(0x16a)][_0x3e2eaa(0x17f)](_0x144f8a[_0x3e2eaa(0x13e)]),_0x144f8a['type']){case _0x1c27e3['Add']:break;case _0x1c27e3['Reply']:{this[_0x3e2eaa(0x15f)][_0x3e2eaa(0x142)](_0x1e94d4,_0xd0deb5,{'unitId':_0x1e94d4,'subUnitId':_0xd0deb5,'ref':'','id':_0x144f8a['replyId'],'dT':_0x38a025(+_0x144f8a[_0x3e2eaa(0x152)]),'threadId':_0x144f8a[_0x3e2eaa(0x170)],'personId':(_0x1df3e1=(_0x32eabc=_0x144f8a[_0x3e2eaa(0x13e)])==null?void 0x0:_0x32eabc[_0x3e2eaa(0x185)])!=null?_0x1df3e1:_0x144f8a[_0x3e2eaa(0x189)],'text':JSON[_0x3e2eaa(0x143)](_0x144f8a[_0x3e2eaa(0x147)]),'parentId':_0x2213f1['id']});break;}case _0x1c27e3[_0x3e2eaa(0x1ba)]:{const _0x159895=this[_0x3e2eaa(0x15f)][_0x3e2eaa(0x165)](_0x1e94d4,_0xd0deb5,_0x144f8a[_0x3e2eaa(0x1b1)]);_0x159895&&_0x159895[_0x3e2eaa(0x139)]&&this['_threadCommentModel'][_0x3e2eaa(0x1bd)](_0x1e94d4,_0xd0deb5,_0x144f8a['replyId']);break;}case _0x1c27e3[_0x3e2eaa(0x1a6)]:{this[_0x3e2eaa(0x15f)][_0x3e2eaa(0x14b)](_0x1e94d4,_0xd0deb5,{'commentId':_0x144f8a[_0x3e2eaa(0x1b1)],'text':JSON[_0x3e2eaa(0x143)](_0x144f8a[_0x3e2eaa(0x147)])});break;}case _0x1c27e3[_0x3e2eaa(0x1a4)]:{const _0x2f6214=(_0x2c8c21=this[_0x3e2eaa(0x15f)][_0x3e2eaa(0x1a0)](_0x144f8a[_0x3e2eaa(0x18a)])[_0x3e2eaa(0x15a)](_0x58afec=>_0x58afec[_0x3e2eaa(0x170)]===_0x144f8a[_0x3e2eaa(0x170)]))==null?void 0x0:_0x2c8c21[_0x3e2eaa(0x19f)];_0x2f6214&&this[_0x3e2eaa(0x15f)][_0x3e2eaa(0x177)](_0x1e94d4,_0xd0deb5,_0x2f6214['id'],_0x144f8a[_0x3e2eaa(0x15e)]===_0x59ce22[_0x3e2eaa(0x144)]);break;}}}));}};_0x4be7f0=_0x519187([_0x5d16ca(0x0,_0x4fe06f['Inject'](_0x3f551b[_0x6736aa(0x160)])),_0x5d16ca(0x1,_0x4fe06f['Inject'](_0x1e3f01['ThreadCommentModel'])),_0x5d16ca(0x2,_0x4fe06f[_0x6736aa(0x1a1)](_0x4fe06f[_0x6736aa(0x164)])),_0x5d16ca(0x3,_0x4fe06f[_0x6736aa(0x1a1)](_0x4fe06f['Injector']))],_0x4be7f0);const _0x54c8e2=_0x6736aa(0x167),_0x438838={};var _0x5ed805=Object[_0x6736aa(0x162)],_0x51a55c=(_0x43ef4e,_0x290fa8,_0x134939,_0x4d6c29)=>{const _0x41ed2f=_0x6736aa;for(var _0xbf9309=_0x4d6c29>0x1?void 0x0:_0x4d6c29?_0x5ed805(_0x290fa8,_0x134939):_0x290fa8,_0x27d9dd=_0x43ef4e[_0x41ed2f(0x168)]-0x1,_0x20840e;_0x27d9dd>=0x0;_0x27d9dd--)(_0x20840e=_0x43ef4e[_0x27d9dd])&&(_0xbf9309=_0x20840e(_0xbf9309)||_0xbf9309);return _0xbf9309;},_0x4b82ef=(_0x335a4e,_0x3ed867)=>(_0x10bfb6,_0x11ceea)=>_0x3ed867(_0x10bfb6,_0x11ceea,_0x335a4e);function _0x2d0a7e(_0x376d71,_0x5cf0c3){const _0x1a1042=_0x6736aa,_0x391af1=_0x376d71[_0x1a1042(0x14e)][0x0];return{..._0x5cf0c3,'id':_0x391af1[_0x1a1042(0x1b1)],'resolved':_0x376d71[_0x1a1042(0x15e)]===0x1,'dT':_0x38a025(_0x391af1['createTimestamp']),'personId':_0x391af1[_0x1a1042(0x189)],'threadId':_0x391af1[_0x1a1042(0x170)]};}function _0x921182(_0x3f5f75,_0x49bd1e,_0x1bd971){const _0x601726=_0x6736aa;var _0x616c3b,_0x42b94e;if(((_0x42b94e=(_0x616c3b=_0x3f5f75==null?void 0x0:_0x3f5f75[_0x601726(0x14e)])==null?void 0x0:_0x616c3b['length'])!=null?_0x42b94e:0x0)>0x0){const _0x177f9c=(_0x74ea34,_0x1ac6e2)=>({'id':_0x74ea34['replyId'],'threadId':_0x74ea34['threadId'],'dT':_0x38a025(_0x74ea34['createTimestamp']),'personId':_0x74ea34[_0x601726(0x189)],'resolved':_0x3f5f75[_0x601726(0x15e)]===_0x59ce22['Solved'],'unitId':_0x49bd1e,'subUnitId':_0x1bd971,'text':JSON[_0x601726(0x143)](_0x74ea34['content']),'parentId':_0x1ac6e2}),_0xf1409e=_0x177f9c(_0x3f5f75[_0x601726(0x14e)][0x0]);return{..._0xf1409e,'children':_0x3f5f75[_0x601726(0x14e)]['slice'](0x1)[_0x601726(0x198)](_0x29bcd2=>_0x177f9c(_0x29bcd2,_0xf1409e['id']))};}return null;}let _0x2baa26=class{constructor(_0x5d2f19,_0x30fc30,_0x5f17ed){const _0x70d3a9=_0x6736aa;this['_httpService']=_0x5d2f19,this[_0x70d3a9(0x16a)]=_0x30fc30,this[_0x70d3a9(0x1b2)]=_0x5f17ed;}async['addComment'](_0x235877){const _0x600b12=_0x6736aa;var _0x4f6199,_0x2c3793;const {parentId:_0x1d6197,unitId:_0x4c90b4,text:_0x2a8f3e,threadId:_0x4f0392}=_0x235877,_0x38142e=(_0x2c3793=(_0x4f6199=_0x2a8f3e[_0x600b12(0x179)])==null?void 0x0:_0x4f6199[_0x600b12(0x17d)](_0x4c8bbc=>_0x4c8bbc[_0x600b12(0x161)]===_0x4fe06f['CustomRangeType']['COMMENT'])[_0x600b12(0x198)](_0x1e0a10=>_0x1e0a10[_0x600b12(0x1a7)]))!=null?_0x2c3793:[],_0x2cfb7a=JSON[_0x600b12(0x18c)](_0x2a8f3e),_0x47f7e7=(await this[_0x600b12(0x1b2)][_0x600b12(0x13c)](_0x4c90b4))[_0x600b12(0x166)]();if(_0x1d6197){const _0x1ea1a4={'memberId':_0x47f7e7,'unitId':_0x4c90b4,'content':_0x2cfb7a,'mention':_0x38142e,'threadId':_0x4f0392},_0x4514ca=(await this[_0x600b12(0x193)]['post'](_0x600b12(0x150)+_0x4c90b4+_0x600b12(0x13a),{'body':_0x1ea1a4}))['body'][_0x600b12(0x17c)];return{..._0x235877,'id':_0x4514ca[_0x600b12(0x1b1)],'dT':_0x4fe06f['dayjs'](+_0x4514ca[_0x600b12(0x152)])[_0x600b12(0x157)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4514ca['userId']};}else{const _0x44a0c4={'memberId':_0x47f7e7,'unitId':_0x4c90b4,'content':_0x2cfb7a,'mention':_0x38142e},_0x37cc02=await this[_0x600b12(0x193)][_0x600b12(0x1b5)](_0x600b12(0x150)+_0x4c90b4+_0x600b12(0x153),{'body':_0x44a0c4});return _0x2d0a7e(_0x37cc02[_0x600b12(0x13b)][_0x600b12(0x191)],_0x235877);}}async[_0x6736aa(0x14b)](_0x2a4959){const _0x17b6e0=_0x6736aa;var _0x2d4469,_0x5da2b4;const {text:_0xafad1a,unitId:_0x5cacc1}=_0x2a4959,_0x424ed1=(_0x5da2b4=(_0x2d4469=_0xafad1a[_0x17b6e0(0x179)])==null?void 0x0:_0x2d4469[_0x17b6e0(0x17d)](_0x147077=>_0x147077[_0x17b6e0(0x161)]===_0x4fe06f[_0x17b6e0(0x1bc)][_0x17b6e0(0x1b4)])[_0x17b6e0(0x198)](_0x3fb01d=>_0x3fb01d[_0x17b6e0(0x1a7)]))!=null?_0x5da2b4:[],_0x604f0=JSON[_0x17b6e0(0x18c)](_0xafad1a),_0x59ab49=_0x2a4959[_0x17b6e0(0x170)],_0x2c85d0=_0x2a4959['id'],_0x3011f2={'memberId':(await this[_0x17b6e0(0x1b2)]['requireSession'](_0x5cacc1))['getMemberID'](),'unitId':_0x5cacc1,'threadId':_0x59ab49,'mention':_0x424ed1,'content':_0x604f0,'replyId':_0x2c85d0},_0x356420=await this[_0x17b6e0(0x193)][_0x17b6e0(0x1b5)](_0x17b6e0(0x150)+_0x5cacc1+'/edit',{'body':_0x3011f2});return!_0x356420[_0x17b6e0(0x13b)][_0x17b6e0(0x17a)]||_0x356420[_0x17b6e0(0x13b)][_0x17b6e0(0x17a)][_0x17b6e0(0x14f)]===0x1;}async[_0x6736aa(0x177)](_0x440ffd){const _0x2831fb=_0x6736aa,{unitId:_0x5ddfb8}=_0x440ffd,_0x3a7e4c=_0x440ffd[_0x2831fb(0x170)],_0x222c5f={'memberId':this[_0x2831fb(0x16a)][_0x2831fb(0x18f)]()[_0x2831fb(0x185)],'unitId':_0x5ddfb8,'threadId':_0x3a7e4c,'solved':_0x440ffd[_0x2831fb(0x136)]?_0x59ce22[_0x2831fb(0x144)]:_0x59ce22[_0x2831fb(0x138)]},_0x2ad333=await this[_0x2831fb(0x193)][_0x2831fb(0x1b5)]('/universer-api/comment/unit/'+_0x5ddfb8+_0x2831fb(0x175),{'body':_0x222c5f});return!_0x2ad333[_0x2831fb(0x13b)]['error']||_0x2ad333[_0x2831fb(0x13b)][_0x2831fb(0x17a)][_0x2831fb(0x14f)]===0x1;}async[_0x6736aa(0x1bd)](_0x1b741e,_0x328642,_0x2785ae,_0x49c029){const _0x130167=_0x6736aa,_0x5b7d19={'memberId':(await this[_0x130167(0x1b2)]['requireSession'](_0x1b741e))['getMemberID'](),'threadId':_0x2785ae,'replyId':_0x49c029,'unitId':_0x1b741e},_0x228d28=await this[_0x130167(0x193)][_0x130167(0x1b5)](_0x130167(0x150)+_0x1b741e+_0x130167(0x199),{'body':_0x5b7d19});return!_0x228d28['body'][_0x130167(0x17a)]||_0x228d28[_0x130167(0x13b)][_0x130167(0x17a)]['code']===0x1;}async[_0x6736aa(0x1be)](_0x36e5d5,_0x48a751,_0x580ce0){const _0x180ccf=_0x6736aa,_0x53d613={'unitId':_0x36e5d5,'threadId':_0x580ce0},_0x187a4e=await this[_0x180ccf(0x193)][_0x180ccf(0x1b5)](_0x180ccf(0x150)+_0x36e5d5+_0x180ccf(0x15b),{'body':_0x53d613}),_0x57da0b=_0x580ce0[_0x180ccf(0x198)](_0x26c47e=>_0x921182(_0x187a4e[_0x180ccf(0x13b)][_0x180ccf(0x17e)][_0x26c47e],_0x36e5d5,_0x48a751))['filter'](Boolean);return Object['values'](_0x187a4e['body']['users'])[_0x180ccf(0x145)](_0x40a675=>{const _0x3c569e=_0x180ccf;this[_0x3c569e(0x16a)]['addUser'](_0x40a675);}),_0x57da0b;}[_0x6736aa(0x16e)](_0x47ae28){const _0x3f69c9=_0x6736aa;return{'id':_0x47ae28['id'],'threadId':_0x47ae28[_0x3f69c9(0x170)],'ref':_0x47ae28[_0x3f69c9(0x1a9)]};}};_0x2baa26=_0x51a55c([_0x4b82ef(0x0,_0x4fe06f[_0x6736aa(0x1a1)](_0x5d6bde[_0x6736aa(0x15c)])),_0x4b82ef(0x1,_0x4fe06f[_0x6736aa(0x1a1)](_0x4fe06f[_0x6736aa(0x164)])),_0x4b82ef(0x2,_0x4fe06f[_0x6736aa(0x1a1)](_0x3f551b[_0x6736aa(0x19a)]))],_0x2baa26);var _0x3e5146=Object[_0x6736aa(0x162)],_0x52cab3=(_0x217c01,_0xbd1b83,_0x1afa07,_0x5777bc)=>{for(var _0x560292=_0x5777bc>0x1?void 0x0:_0x5777bc?_0x3e5146(_0xbd1b83,_0x1afa07):_0xbd1b83,_0x4b1f5a=_0x217c01['length']-0x1,_0x11eb3e;_0x4b1f5a>=0x0;_0x4b1f5a--)(_0x11eb3e=_0x217c01[_0x4b1f5a])&&(_0x560292=_0x11eb3e(_0x560292)||_0x560292);return _0x560292;},_0x181612=(_0x653374,_0x8d9cc2)=>(_0x147275,_0x28d89a)=>_0x8d9cc2(_0x147275,_0x28d89a,_0x653374);let _0x5bfd8c=class extends _0x4fe06f[_0x6736aa(0x173)]{constructor(_0x2360e2,_0xe9c32e){const _0x401dbc=_0x6736aa;super(),this[_0x401dbc(0x1b0)]=_0x2360e2,this[_0x401dbc(0x1a3)]=_0xe9c32e,this[_0x401dbc(0x1b8)]();}[_0x6736aa(0x1b8)](){const _0x31cbe4=_0x6736aa;this[_0x31cbe4(0x1b0)]['dataSource']=this['_threadCommentDataSource'],this[_0x31cbe4(0x1b0)][_0x31cbe4(0x1ad)]=!0x1;}};_0x5bfd8c=_0x52cab3([_0x181612(0x0,_0x1e3f01['IThreadCommentDataSourceService']),_0x181612(0x1,_0x4fe06f[_0x6736aa(0x1a1)](_0x2baa26))],_0x5bfd8c);var _0x4aee73=Object[_0x6736aa(0x140)],_0x105302=Object[_0x6736aa(0x162)],_0x58450d=(_0x504751,_0x340921,_0x1f0908)=>_0x340921 in _0x504751?_0x4aee73(_0x504751,_0x340921,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1f0908}):_0x504751[_0x340921]=_0x1f0908,_0x5c856b=(_0x1032eb,_0x15fbf5,_0xa9f7af,_0x4a66bb)=>{for(var _0x28babe=_0x4a66bb>0x1?void 0x0:_0x4a66bb?_0x105302(_0x15fbf5,_0xa9f7af):_0x15fbf5,_0x34725e=_0x1032eb['length']-0x1,_0x50c1eb;_0x34725e>=0x0;_0x34725e--)(_0x50c1eb=_0x1032eb[_0x34725e])&&(_0x28babe=_0x50c1eb(_0x28babe)||_0x28babe);return _0x28babe;},_0x319192=(_0x5c20fe,_0x37d768)=>(_0x1797ae,_0x338610)=>_0x37d768(_0x1797ae,_0x338610,_0x5c20fe),_0x5946f7=(_0x1d2f33,_0x3bd1c8,_0x55886b)=>_0x58450d(_0x1d2f33,typeof _0x3bd1c8!=_0x6736aa(0x182)?_0x3bd1c8+'':_0x3bd1c8,_0x55886b);_0x49d9d0[_0x6736aa(0x13f)]=class extends _0x4fe06f['Plugin']{constructor(_0x566bcb=_0x438838,_0x7c444,_0x420d60){const _0x3ac20e=_0x6736aa;super(),this[_0x3ac20e(0x17b)]=_0x566bcb,this[_0x3ac20e(0x171)]=_0x7c444,this[_0x3ac20e(0x14d)]=_0x420d60;const {..._0x68044a}=_0x4fe06f[_0x3ac20e(0x15d)]({},_0x438838,this[_0x3ac20e(0x17b)]);this['_configService']['setConfig'](_0x54c8e2,_0x68044a);}[_0x6736aa(0x183)](){[[_0x2baa26],[_0x5bfd8c],[_0x4be7f0]]['forEach'](_0x1acba8=>{const _0x2ffcc7=_0x4087;this[_0x2ffcc7(0x171)][_0x2ffcc7(0x159)](_0x1acba8);});}[_0x6736aa(0x146)](){this['_injector']['get'](_0x5bfd8c),this['_injector']['get'](_0x4be7f0);}},_0x5946f7(_0x49d9d0[_0x6736aa(0x13f)],_0x6736aa(0x16f),_0x56c31e),_0x5946f7(_0x49d9d0[_0x6736aa(0x13f)],'type',_0x4fe06f[_0x6736aa(0x16c)]['UNIVER_UNKNOWN']),_0x49d9d0[_0x6736aa(0x13f)]=_0x5c856b([_0x4fe06f[_0x6736aa(0x192)](_0x54f791[_0x6736aa(0x178)],_0x3f551b[_0x6736aa(0x148)],_0x440cb5['UniverLicensePlugin']),_0x319192(0x1,_0x4fe06f['Inject'](_0x4fe06f[_0x6736aa(0x19c)])),_0x319192(0x2,_0x4fe06f['IConfigService'])],_0x49d9d0[_0x6736aa(0x13f)]),Object['defineProperty'](_0x49d9d0,Symbol['toStringTag'],{'value':_0x6736aa(0x155)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.15.0-insiders.
|
|
3
|
+
"version": "0.15.0-insiders.20260110-48b77c8",
|
|
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.15.0-insiders.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.15.0-insiders.20260110-48b77c8",
|
|
49
|
+
"@univerjs-pro/license": "0.15.0-insiders.20260110-48b77c8",
|
|
50
|
+
"@univerjs/network": "0.15.0-insiders.20260110-48b77c8",
|
|
51
|
+
"@univerjs/core": "0.15.0-insiders.20260110-48b77c8",
|
|
52
|
+
"@univerjs/thread-comment": "0.15.0-insiders.20260110-48b77c8",
|
|
49
53
|
"@univerjs/protocol": "0.1.48",
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/thread-comment": "0.15.0-insiders.20260108-47c73e3",
|
|
52
|
-
"@univerjs/core": "0.15.0-insiders.20260108-47c73e3",
|
|
53
|
-
"@univerjs-pro/license": "0.15.0-insiders.20260108-47c73e3",
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.15.0-insiders.20260108-47c73e3"
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.15.0-insiders.20260110-48b77c8"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|