@univerjs-pro/thread-comment-datasource 0.6.3 → 0.6.4-nightly.202503101606
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/umd/index.js +1 -1
- package/package.json +9 -9
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x5ec575=_0x3387;(function(_0x534494,_0x4706ae){const _0x42eecc=_0x3387,_0x14ab89=_0x534494();while(!![]){try{const _0x2fa8da=-parseInt(_0x42eecc(0x1f9))/0x1*(-parseInt(_0x42eecc(0x1df))/0x2)+parseInt(_0x42eecc(0x22f))/0x3+-parseInt(_0x42eecc(0x1ed))/0x4*(parseInt(_0x42eecc(0x1ff))/0x5)+-parseInt(_0x42eecc(0x1d0))/0x6*(parseInt(_0x42eecc(0x229))/0x7)+-parseInt(_0x42eecc(0x1e1))/0x8*(parseInt(_0x42eecc(0x1ba))/0x9)+parseInt(_0x42eecc(0x204))/0xa+-parseInt(_0x42eecc(0x1e9))/0xb*(parseInt(_0x42eecc(0x1bb))/0xc);if(_0x2fa8da===_0x4706ae)break;else _0x14ab89['push'](_0x14ab89['shift']());}catch(_0x5a6b98){_0x14ab89['push'](_0x14ab89['shift']());}}}(_0x7400,0x6b21b));Object[_0x5ec575(0x1c0)](exports,Symbol['toStringTag'],{'value':_0x5ec575(0x1c5)});const b=require(_0x5ec575(0x1c8)),T=require(_0x5ec575(0x1d2)),c=require(_0x5ec575(0x1d1)),j=require(_0x5ec575(0x1f8)),M=require('@univerjs/thread-comment'),w=require(_0x5ec575(0x1e6)),P=require(_0x5ec575(0x203)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x53ad6c=>(_0x53ad6c[_0x53ad6c[_0x5ec575(0x20f)]=0x0]=_0x5ec575(0x20f),_0x53ad6c[_0x53ad6c['Solved']=0x1]=_0x5ec575(0x22b),_0x53ad6c[_0x53ad6c[_0x5ec575(0x1b5)]=-0x1]=_0x5ec575(0x1b5),_0x53ad6c))(I||{}),v=(_0x47d06a=>(_0x47d06a[_0x47d06a[_0x5ec575(0x1b9)]=0x0]=_0x5ec575(0x1b9),_0x47d06a[_0x47d06a[_0x5ec575(0x22e)]=0x1]=_0x5ec575(0x22e),_0x47d06a[_0x47d06a[_0x5ec575(0x22d)]=0x2]=_0x5ec575(0x22d),_0x47d06a[_0x47d06a[_0x5ec575(0x1cf)]=0x3]=_0x5ec575(0x1cf),_0x47d06a[_0x47d06a[_0x5ec575(0x1bd)]=0x4]=_0x5ec575(0x1bd),_0x47d06a[_0x47d06a[_0x5ec575(0x1b7)]=0x5]=_0x5ec575(0x1b7),_0x47d06a[_0x47d06a[_0x5ec575(0x1b5)]=-0x1]=_0x5ec575(0x1b5),_0x47d06a))(v||{});const f=_0x59bd1a=>c['dayjs'](new Date(+_0x59bd1a))['format'](_0x5ec575(0x1f7)),R=async(_0x2aa50b,_0x1fcb83)=>{const _0x4b6a8f=_0x5ec575,_0x18fe19=_0x2aa50b[_0x4b6a8f(0x1fa)](c[_0x4b6a8f(0x1d7)]),_0x3ade1e=_0x2aa50b[_0x4b6a8f(0x1fa)](P['HTTPService']);_0x1fcb83[_0x4b6a8f(0x206)](_0x2ce65a=>{const _0x2dd4f8=_0x4b6a8f;_0x18fe19[_0x2dd4f8(0x225)](_0x2ce65a)&&_0x1fcb83[_0x2dd4f8(0x1c7)](_0x2ce65a);}),_0x1fcb83[_0x4b6a8f(0x1fc)]&&(await _0x3ade1e[_0x4b6a8f(0x1fa)]('/universer-api/user/list',{'params':{'userIDs':[..._0x1fcb83]}}))['body'][_0x4b6a8f(0x21a)][_0x4b6a8f(0x206)](_0x2f6b63=>{const _0x487ae0=_0x4b6a8f;_0x2f6b63&&_0x18fe19[_0x487ae0(0x1d8)](_0x2f6b63);});};var $=Object[_0x5ec575(0x1eb)],E=(_0x40e06f,_0x534bd1,_0x957df8,_0xee6c9d)=>{const _0x4f6c08=_0x5ec575;for(var _0x7e0533=_0xee6c9d>0x1?void 0x0:_0xee6c9d?$(_0x534bd1,_0x957df8):_0x534bd1,_0x15f8c7=_0x40e06f[_0x4f6c08(0x1bc)]-0x1,_0x19e5e0;_0x15f8c7>=0x0;_0x15f8c7--)(_0x19e5e0=_0x40e06f[_0x15f8c7])&&(_0x7e0533=_0x19e5e0(_0x7e0533)||_0x7e0533);return _0x7e0533;},S=(_0x2b7d66,_0x100853)=>(_0x40e9f5,_0x176f57)=>_0x100853(_0x40e9f5,_0x176f57,_0x2b7d66);let p=class extends c[_0x5ec575(0x1ef)]{constructor(_0x451d19,_0x49cfe6,_0x268a6a,_0x3b63fe){const _0x4753fa=_0x5ec575;super(),this['_commentService']=_0x451d19,this['_threadCommentModel']=_0x49cfe6,this[_0x4753fa(0x1de)]=_0x268a6a,this['_injector']=_0x3b63fe,this[_0x4753fa(0x1ea)](),this[_0x4753fa(0x1cd)]();}[_0x5ec575(0x1cd)](){const _0x421063=_0x5ec575;this[_0x421063(0x1fb)](this[_0x421063(0x1da)]['commentUpdate$']['pipe'](w['bufferTime'](0x10))[_0x421063(0x1be)](_0x2991f0=>{const _0x5bba91=_0x421063,_0x74a01c=new Set();_0x2991f0['forEach'](_0x9cdf13=>{const _0x4a9de9=_0x3387;switch(_0x9cdf13['type']){case _0x4a9de9(0x1b6):{const _0x3a283c=_0x9cdf13[_0x4a9de9(0x21e)]['personId'];_0x74a01c[_0x4a9de9(0x1b6)](_0x3a283c);break;}}}),R(this[_0x5bba91(0x231)],_0x74a01c);}));}[_0x5ec575(0x1ea)](){const _0x27ebdc=_0x5ec575;this[_0x27ebdc(0x1fb)](this[_0x27ebdc(0x213)][_0x27ebdc(0x20d)]['subscribe'](async _0x4ac93f=>{const _0x558904=_0x27ebdc;var _0x4032ee,_0x2b4674,_0x5eac3a,_0x2d53e2;const _0x2b32d1=(_0x4032ee=this[_0x558904(0x1da)][_0x558904(0x1fe)](_0x4ac93f[_0x558904(0x223)])['find'](_0x40fc55=>_0x40fc55[_0x558904(0x20c)]===_0x4ac93f[_0x558904(0x20c)]))==null?void 0x0:_0x4032ee[_0x558904(0x1ec)];if(!_0x2b32d1)return;const {unitId:_0x23fc47,subUnitId:_0x5bc5c2}=_0x2b32d1;switch(_0x4ac93f[_0x558904(0x216)]&&this[_0x558904(0x1de)][_0x558904(0x1d8)](_0x4ac93f[_0x558904(0x216)]),_0x4ac93f[_0x558904(0x1f0)]){case v[_0x558904(0x22e)]:break;case v[_0x558904(0x22d)]:{this[_0x558904(0x1da)][_0x558904(0x217)](_0x23fc47,_0x5bc5c2,{'unitId':_0x23fc47,'subUnitId':_0x5bc5c2,'ref':'','id':_0x4ac93f[_0x558904(0x1f4)],'dT':f(+_0x4ac93f['createTimestamp']),'threadId':_0x4ac93f['threadId'],'personId':(_0x5eac3a=(_0x2b4674=_0x4ac93f[_0x558904(0x216)])==null?void 0x0:_0x2b4674[_0x558904(0x200)])!=null?_0x5eac3a:_0x4ac93f[_0x558904(0x1c4)],'text':JSON[_0x558904(0x201)](_0x4ac93f[_0x558904(0x21f)]),'parentId':_0x2b32d1['id']});break;}case v['Delete']:{const _0x157e8d=this[_0x558904(0x1da)][_0x558904(0x212)](_0x23fc47,_0x5bc5c2,_0x4ac93f[_0x558904(0x1f4)]);_0x157e8d&&_0x157e8d[_0x558904(0x1d4)]&&this[_0x558904(0x1da)][_0x558904(0x1e8)](_0x23fc47,_0x5bc5c2,_0x4ac93f['replyId']);break;}case v[_0x558904(0x1cf)]:{this[_0x558904(0x1da)]['updateComment'](_0x23fc47,_0x5bc5c2,{'commentId':_0x4ac93f[_0x558904(0x1f4)],'text':JSON['parse'](_0x4ac93f['content'])});break;}case v[_0x558904(0x1b7)]:{const _0x1734c0=(_0x2d53e2=this[_0x558904(0x1da)][_0x558904(0x1fe)](_0x4ac93f[_0x558904(0x223)])[_0x558904(0x1c3)](_0x87da49=>_0x87da49[_0x558904(0x20c)]===_0x4ac93f[_0x558904(0x20c)]))==null?void 0x0:_0x2d53e2[_0x558904(0x1ec)];_0x1734c0&&this['_threadCommentModel'][_0x558904(0x1d6)](_0x23fc47,_0x5bc5c2,_0x1734c0['id'],_0x4ac93f[_0x558904(0x1c1)]===I[_0x558904(0x22b)]);break;}}}));}};p=E([S(0x0,c[_0x5ec575(0x207)](b['CommentService'])),S(0x1,c[_0x5ec575(0x207)](M[_0x5ec575(0x1f6)])),S(0x2,c[_0x5ec575(0x207)](c[_0x5ec575(0x1d7)])),S(0x3,c[_0x5ec575(0x207)](c[_0x5ec575(0x1f3)]))],p);const q=_0x5ec575(0x20a),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x44554b,_0x5c618e,_0x323cd2,_0xd71627)=>{const _0x1c34b6=_0x5ec575;for(var _0x46c9fd=_0xd71627>0x1?void 0x0:_0xd71627?A(_0x5c618e,_0x323cd2):_0x5c618e,_0x59368a=_0x44554b[_0x1c34b6(0x1bc)]-0x1,_0x15a338;_0x59368a>=0x0;_0x59368a--)(_0x15a338=_0x44554b[_0x59368a])&&(_0x46c9fd=_0x15a338(_0x46c9fd)||_0x46c9fd);return _0x46c9fd;},_=(_0x580316,_0x1e3cc2)=>(_0x1e4630,_0x3b95cd)=>_0x1e3cc2(_0x1e4630,_0x3b95cd,_0x580316);function Y(_0x4c877b,_0x168ca9){const _0x129688=_0x5ec575,_0x733f99=_0x4c877b[_0x129688(0x215)][0x0];return{..._0x168ca9,'id':_0x733f99[_0x129688(0x1f4)],'resolved':_0x4c877b['solved']===0x1,'dT':f(_0x733f99[_0x129688(0x1f1)]),'personId':_0x733f99[_0x129688(0x1c4)],'threadId':_0x733f99['threadId']};}function _0x3387(_0x201e8e,_0x4e421d){const _0x740066=_0x7400();return _0x3387=function(_0x33878b,_0x1ec359){_0x33878b=_0x33878b-0x1b3;let _0x3cfd00=_0x740066[_0x33878b];return _0x3cfd00;},_0x3387(_0x201e8e,_0x4e421d);}function _0x7400(){const _0x1cbd88=['Add','2448699EsdXIs','code','_injector','getCurrentUser','/universer-api/comment/unit/','UNRECOGNIZED','add','Solve','map','Unknown','9lVBGFm','3075840kSqIzV','length','Delete','subscribe','_threadCommentDataSource','defineProperty','solved','/list','find','userId','Module','slice','delete','@univerjs-pro/collaboration-client','body','UniverThreadCommentDataSourcePlugin','/solved','stringify','_initUserSync','onStarting','Edit','77340ZeGdgq','@univerjs/core','@univerjs-pro/license','onReady','parentId','dayjs','resolveComment','UserManagerService','addUser','pluginName','_threadCommentModel','saveCommentToSnapshot','IThreadCommentDataSourceService','_threadCommentDataSourceService','_userService','378046CYVvkp','post','1348792qcNhEy','_configService','/delete','UNIVER_UNKNOWN','COMMENT','rxjs','/add','deleteComment','22WQSqDi','_init','getOwnPropertyDescriptor','root','4QxGEkj','/edit','Disposable','type','createTimestamp','filter','Injector','replyId','/reply','ThreadCommentModel','YYYY/MM/DD\x20HH:mm','@univerjs/thread-comment-ui','4NSpQor','get','disposeWithMe','size','UniverCollaborationClientPlugin','getUnit','3524390DJnaKy','userID','parse','getMemberID','@univerjs/network','3686130KohaWE','HTTPService','forEach','Inject','updateComment','customRanges','thread-comment-data-source.config','_sessionService','threadId','commentUpdate$','_httpService','OpenOrReOpen','dataSource','IConfigService','getComment','_commentService','_initDataSource','replies','user','addComment','listComments','error','users','requireSession','_config','UniverLicensePlugin','payload','content','setConfig','merge','rangeType','unitId','format','getUser','symbol','comments','Plugin','63SnKOue','reply','Solved','CustomRangeType','Reply'];_0x7400=function(){return _0x1cbd88;};return _0x7400();}function G(_0x413428,_0x17ca0e,_0x31c005){const _0x152b45=_0x5ec575;var _0x2dea2e,_0x538b3a;if(((_0x538b3a=(_0x2dea2e=_0x413428==null?void 0x0:_0x413428['replies'])==null?void 0x0:_0x2dea2e[_0x152b45(0x1bc)])!=null?_0x538b3a:0x0)>0x0){const _0x566917=(_0x1c3945,_0x392752)=>({'id':_0x1c3945[_0x152b45(0x1f4)],'threadId':_0x1c3945[_0x152b45(0x20c)],'dT':f(_0x1c3945[_0x152b45(0x1f1)]),'personId':_0x1c3945[_0x152b45(0x1c4)],'resolved':_0x413428[_0x152b45(0x1c1)]===I['Solved'],'unitId':_0x17ca0e,'subUnitId':_0x31c005,'text':JSON['parse'](_0x1c3945['content']),'parentId':_0x392752}),_0xbe1e4=_0x566917(_0x413428[_0x152b45(0x215)][0x0]);return{..._0xbe1e4,'children':_0x413428[_0x152b45(0x215)][_0x152b45(0x1c6)](0x1)[_0x152b45(0x1b8)](_0x4f4c20=>_0x566917(_0x4f4c20,_0xbe1e4['id']))};}return null;}let g=class{constructor(_0x536de8,_0x362963,_0xd34ffe,_0x2638d6){const _0x319f0c=_0x5ec575;this[_0x319f0c(0x20e)]=_0x536de8,this[_0x319f0c(0x1de)]=_0x362963,this[_0x319f0c(0x20b)]=_0xd34ffe,this[_0x319f0c(0x231)]=_0x2638d6;}async[_0x5ec575(0x217)](_0x3ef956){const _0x38952b=_0x5ec575;var _0x437854,_0x595906;const {parentId:_0x43f16a,unitId:_0x55d0b3,text:_0x25809c,threadId:_0x430b9b}=_0x3ef956,_0x555566=(_0x595906=(_0x437854=_0x25809c[_0x38952b(0x209)])==null?void 0x0:_0x437854['filter'](_0x57e67a=>_0x57e67a['rangeType']===c[_0x38952b(0x22c)][_0x38952b(0x1e5)])[_0x38952b(0x1b8)](_0x8b3ced=>_0x8b3ced['rangeId']))!=null?_0x595906:[],_0x17aa88=JSON['stringify'](_0x25809c),_0x1202d9=(await this[_0x38952b(0x20b)][_0x38952b(0x21b)](_0x55d0b3))['getMemberID']();if(_0x43f16a){const _0x2a84d9={'memberId':_0x1202d9,'unitId':_0x55d0b3,'content':_0x17aa88,'mention':_0x555566,'threadId':_0x430b9b},_0x37a2d6=(await this[_0x38952b(0x20e)][_0x38952b(0x1e0)](_0x38952b(0x1b4)+_0x55d0b3+_0x38952b(0x1f5),{'body':_0x2a84d9}))[_0x38952b(0x1c9)][_0x38952b(0x22a)];return{..._0x3ef956,'id':_0x37a2d6[_0x38952b(0x1f4)],'dT':c[_0x38952b(0x1d5)](+_0x37a2d6[_0x38952b(0x1f1)])[_0x38952b(0x224)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x37a2d6[_0x38952b(0x1c4)]};}else{const _0x48bb2b={'memberId':_0x1202d9,'unitId':_0x55d0b3,'content':_0x17aa88,'mention':_0x555566},_0x5e05dc=await this[_0x38952b(0x20e)][_0x38952b(0x1e0)](_0x38952b(0x1b4)+_0x55d0b3+_0x38952b(0x1e7),{'body':_0x48bb2b});return Y(_0x5e05dc[_0x38952b(0x1c9)]['comment'],_0x3ef956);}}async[_0x5ec575(0x208)](_0x32bc0a){const _0x30629c=_0x5ec575;var _0x4a4d95,_0x4f59c5;const {text:_0x88ea38,unitId:_0x5b815a}=_0x32bc0a,_0x5ca495=(_0x4f59c5=(_0x4a4d95=_0x88ea38[_0x30629c(0x209)])==null?void 0x0:_0x4a4d95[_0x30629c(0x1f2)](_0x4e3ecb=>_0x4e3ecb[_0x30629c(0x222)]===c[_0x30629c(0x22c)][_0x30629c(0x1e5)])['map'](_0x252da6=>_0x252da6['rangeId']))!=null?_0x4f59c5:[],_0x81cd25=JSON[_0x30629c(0x1cc)](_0x88ea38),_0x50afa0=_0x32bc0a[_0x30629c(0x20c)],_0x3e43b0=_0x32bc0a['id'],_0xd4c1b8={'memberId':(await this[_0x30629c(0x20b)][_0x30629c(0x21b)](_0x5b815a))[_0x30629c(0x202)](),'unitId':_0x5b815a,'threadId':_0x50afa0,'mention':_0x5ca495,'content':_0x81cd25,'replyId':_0x3e43b0},_0x220789=await this[_0x30629c(0x20e)][_0x30629c(0x1e0)]('/universer-api/comment/unit/'+_0x5b815a+_0x30629c(0x1ee),{'body':_0xd4c1b8});return!_0x220789[_0x30629c(0x1c9)][_0x30629c(0x219)]||_0x220789[_0x30629c(0x1c9)]['error'][_0x30629c(0x230)]===0x1;}async[_0x5ec575(0x1d6)](_0x5005d0){const _0x236e0e=_0x5ec575,{unitId:_0x50ad93}=_0x5005d0,_0xf5bc97=_0x5005d0[_0x236e0e(0x20c)],_0x45837a={'memberId':this['_userService'][_0x236e0e(0x1b3)]()[_0x236e0e(0x200)],'unitId':_0x50ad93,'threadId':_0xf5bc97,'solved':_0x5005d0['resolved']?I[_0x236e0e(0x22b)]:I[_0x236e0e(0x20f)]},_0x49d567=await this[_0x236e0e(0x20e)][_0x236e0e(0x1e0)](_0x236e0e(0x1b4)+_0x50ad93+_0x236e0e(0x1cb),{'body':_0x45837a});return!_0x49d567[_0x236e0e(0x1c9)]['error']||_0x49d567[_0x236e0e(0x1c9)]['error']['code']===0x1;}async['deleteComment'](_0x136421,_0x1c61fc,_0x4a2237,_0x286587){const _0x4edb67=_0x5ec575,_0x207b78={'memberId':(await this[_0x4edb67(0x20b)]['requireSession'](_0x136421))[_0x4edb67(0x202)](),'threadId':_0x4a2237,'replyId':_0x286587,'unitId':_0x136421},_0x478946=await this[_0x4edb67(0x20e)][_0x4edb67(0x1e0)]('/universer-api/comment/unit/'+_0x136421+_0x4edb67(0x1e3),{'body':_0x207b78});return!_0x478946[_0x4edb67(0x1c9)][_0x4edb67(0x219)]||_0x478946['body'][_0x4edb67(0x219)]['code']===0x1;}async[_0x5ec575(0x218)](_0x427dc3,_0x11bf8a,_0x3ef232){const _0x424769=_0x5ec575,_0x185df0={'unitId':_0x427dc3,'threadId':_0x3ef232},_0x55b395=await this[_0x424769(0x20e)]['post'](_0x424769(0x1b4)+_0x427dc3+_0x424769(0x1c2),{'body':_0x185df0}),_0x4d1b52=_0x3ef232[_0x424769(0x1b8)](_0x34d1da=>G(_0x55b395[_0x424769(0x1c9)][_0x424769(0x227)][_0x34d1da],_0x427dc3,_0x11bf8a))[_0x424769(0x1f2)](Boolean);return Object['values'](_0x55b395[_0x424769(0x1c9)][_0x424769(0x21a)])[_0x424769(0x206)](_0x13c8f4=>{this['_userService']['addUser'](_0x13c8f4);}),_0x4d1b52;}[_0x5ec575(0x1db)](_0x3703d5){const _0x4149e7=_0x5ec575;return{'id':_0x3703d5['id'],'threadId':_0x3703d5[_0x4149e7(0x20c)],'ref':_0x3703d5['ref']};}};g=x([_(0x0,c[_0x5ec575(0x207)](P[_0x5ec575(0x205)])),_(0x1,c[_0x5ec575(0x207)](c[_0x5ec575(0x1d7)])),_(0x2,c[_0x5ec575(0x207)](b['CollaborationSessionService'])),_(0x3,c[_0x5ec575(0x207)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x3e0612,_0x42ef71,_0x546db6,_0x7f6443)=>{const _0x245340=_0x5ec575;for(var _0x1bc69c=_0x7f6443>0x1?void 0x0:_0x7f6443?H(_0x42ef71,_0x546db6):_0x42ef71,_0x128966=_0x3e0612[_0x245340(0x1bc)]-0x1,_0x40f8c9;_0x128966>=0x0;_0x128966--)(_0x40f8c9=_0x3e0612[_0x128966])&&(_0x1bc69c=_0x40f8c9(_0x1bc69c)||_0x1bc69c);return _0x1bc69c;},y=(_0x1b5089,_0x4b05d2)=>(_0x50d5f0,_0xce471)=>_0x4b05d2(_0x50d5f0,_0xce471,_0x1b5089);let C=class extends c[_0x5ec575(0x1ef)]{constructor(_0x1ad581,_0x51426a){const _0x3f0801=_0x5ec575;super(),this[_0x3f0801(0x1dd)]=_0x1ad581,this[_0x3f0801(0x1bf)]=_0x51426a,this[_0x3f0801(0x214)]();}[_0x5ec575(0x214)](){const _0x1cafb8=_0x5ec575;this['_threadCommentDataSourceService'][_0x1cafb8(0x210)]=this[_0x1cafb8(0x1bf)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x5ec575(0x1dc)]),y(0x1,c[_0x5ec575(0x207)](g))],C);var F=Object[_0x5ec575(0x1c0)],L=Object[_0x5ec575(0x1eb)],Z=(_0x3565de,_0x3c25b5,_0x15ef16)=>_0x3c25b5 in _0x3565de?F(_0x3565de,_0x3c25b5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x15ef16}):_0x3565de[_0x3c25b5]=_0x15ef16,W=(_0x207dd2,_0x805df6,_0x12689f,_0x1c2298)=>{const _0x4304e8=_0x5ec575;for(var _0x5f0319=_0x1c2298>0x1?void 0x0:_0x1c2298?L(_0x805df6,_0x12689f):_0x805df6,_0x483841=_0x207dd2[_0x4304e8(0x1bc)]-0x1,_0xdf502c;_0x483841>=0x0;_0x483841--)(_0xdf502c=_0x207dd2[_0x483841])&&(_0x5f0319=_0xdf502c(_0x5f0319)||_0x5f0319);return _0x5f0319;},O=(_0x38b208,_0xdcab5b)=>(_0xa7b1b0,_0x58bfb8)=>_0xdcab5b(_0xa7b1b0,_0x58bfb8,_0x38b208),N=(_0x2f7bf7,_0x207ff3,_0x13828f)=>Z(_0x2f7bf7,typeof _0x207ff3!=_0x5ec575(0x226)?_0x207ff3+'':_0x207ff3,_0x13828f);exports[_0x5ec575(0x1ca)]=class extends c[_0x5ec575(0x228)]{constructor(_0x7a7fc0=D,_0x3da4bf,_0x17d08e){const _0x11ab15=_0x5ec575;super(),this[_0x11ab15(0x21c)]=_0x7a7fc0,this[_0x11ab15(0x231)]=_0x3da4bf,this[_0x11ab15(0x1e2)]=_0x17d08e;const {..._0x3f2607}=c[_0x11ab15(0x221)]({},D,this[_0x11ab15(0x21c)]);this[_0x11ab15(0x1e2)][_0x11ab15(0x220)](q,_0x3f2607);}[_0x5ec575(0x1ce)](){const _0x497483=_0x5ec575;[[g],[C],[p]][_0x497483(0x206)](_0x3b2382=>{this['_injector']['add'](_0x3b2382);});}[_0x5ec575(0x1d3)](){const _0x48bcea=_0x5ec575;this[_0x48bcea(0x231)][_0x48bcea(0x1fa)](C),this[_0x48bcea(0x231)][_0x48bcea(0x1fa)](p);}},N(exports[_0x5ec575(0x1ca)],_0x5ec575(0x1d9),U),N(exports[_0x5ec575(0x1ca)],_0x5ec575(0x1f0),c['UniverInstanceType'][_0x5ec575(0x1e4)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b[_0x5ec575(0x1fd)],T[_0x5ec575(0x21d)]),O(0x1,c[_0x5ec575(0x207)](c[_0x5ec575(0x1f3)])),O(0x2,c[_0x5ec575(0x211)])],exports[_0x5ec575(0x1ca)]);
|
|
1
|
+
'use strict';const _0x45fe4b=_0x1fee;(function(_0x54f2df,_0x2eea18){const _0x5857d5=_0x1fee,_0x4cfda3=_0x54f2df();while(!![]){try{const _0x663266=parseInt(_0x5857d5(0x17d))/0x1*(parseInt(_0x5857d5(0x1a4))/0x2)+-parseInt(_0x5857d5(0x194))/0x3+-parseInt(_0x5857d5(0x1e6))/0x4*(-parseInt(_0x5857d5(0x1b7))/0x5)+-parseInt(_0x5857d5(0x19f))/0x6+-parseInt(_0x5857d5(0x193))/0x7+parseInt(_0x5857d5(0x1e9))/0x8*(-parseInt(_0x5857d5(0x1af))/0x9)+parseInt(_0x5857d5(0x1bd))/0xa*(parseInt(_0x5857d5(0x1ce))/0xb);if(_0x663266===_0x2eea18)break;else _0x4cfda3['push'](_0x4cfda3['shift']());}catch(_0x38b1a8){_0x4cfda3['push'](_0x4cfda3['shift']());}}}(_0x34c9,0x21cd7));Object['defineProperty'](exports,Symbol[_0x45fe4b(0x179)],{'value':_0x45fe4b(0x1bb)});const b=require(_0x45fe4b(0x1be)),T=require(_0x45fe4b(0x1ab)),c=require(_0x45fe4b(0x1ac)),j=require(_0x45fe4b(0x1d4)),M=require(_0x45fe4b(0x192)),w=require('rxjs'),P=require(_0x45fe4b(0x1cc)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4d925d=>(_0x4d925d[_0x4d925d['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x4d925d[_0x4d925d['Solved']=0x1]=_0x45fe4b(0x1e4),_0x4d925d[_0x4d925d[_0x45fe4b(0x1c8)]=-0x1]=_0x45fe4b(0x1c8),_0x4d925d))(I||{}),v=(_0x1d091e=>(_0x1d091e[_0x1d091e[_0x45fe4b(0x1c7)]=0x0]=_0x45fe4b(0x1c7),_0x1d091e[_0x1d091e['Add']=0x1]=_0x45fe4b(0x1e8),_0x1d091e[_0x1d091e['Reply']=0x2]=_0x45fe4b(0x1ca),_0x1d091e[_0x1d091e[_0x45fe4b(0x1de)]=0x3]='Edit',_0x1d091e[_0x1d091e[_0x45fe4b(0x1c4)]=0x4]=_0x45fe4b(0x1c4),_0x1d091e[_0x1d091e['Solve']=0x5]=_0x45fe4b(0x1dc),_0x1d091e[_0x1d091e[_0x45fe4b(0x1c8)]=-0x1]=_0x45fe4b(0x1c8),_0x1d091e))(v||{});const f=_0x987bbb=>c[_0x45fe4b(0x19a)](new Date(+_0x987bbb))[_0x45fe4b(0x1b4)](_0x45fe4b(0x1b8)),R=async(_0x5986f3,_0x4a573f)=>{const _0x20bd4a=_0x45fe4b,_0x733274=_0x5986f3[_0x20bd4a(0x1b9)](c[_0x20bd4a(0x1c1)]),_0x4fdd6a=_0x5986f3[_0x20bd4a(0x1b9)](P['HTTPService']);_0x4a573f[_0x20bd4a(0x1ea)](_0x5db908=>{const _0x2e427f=_0x20bd4a;_0x733274['getUser'](_0x5db908)&&_0x4a573f[_0x2e427f(0x1d8)](_0x5db908);}),_0x4a573f[_0x20bd4a(0x1d3)]&&(await _0x4fdd6a[_0x20bd4a(0x1b9)]('/universer-api/user/list',{'params':{'userIDs':[..._0x4a573f]}}))[_0x20bd4a(0x197)][_0x20bd4a(0x1b0)][_0x20bd4a(0x1ea)](_0x4f2f15=>{const _0x45ca33=_0x20bd4a;_0x4f2f15&&_0x733274[_0x45ca33(0x17a)](_0x4f2f15);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x2d8f42,_0x4b8c75,_0x1b7cba,_0x1e20a1)=>{const _0x2f6343=_0x45fe4b;for(var _0x78e33a=_0x1e20a1>0x1?void 0x0:_0x1e20a1?$(_0x4b8c75,_0x1b7cba):_0x4b8c75,_0x5f40bb=_0x2d8f42[_0x2f6343(0x1d1)]-0x1,_0x9fd129;_0x5f40bb>=0x0;_0x5f40bb--)(_0x9fd129=_0x2d8f42[_0x5f40bb])&&(_0x78e33a=_0x9fd129(_0x78e33a)||_0x78e33a);return _0x78e33a;},S=(_0xafb919,_0xaa3c6c)=>(_0x44a74c,_0x3b1e58)=>_0xaa3c6c(_0x44a74c,_0x3b1e58,_0xafb919);let p=class extends c[_0x45fe4b(0x1ae)]{constructor(_0x126454,_0x528714,_0xe5a30a,_0x1b83a3){const _0x1ad371=_0x45fe4b;super(),this[_0x1ad371(0x196)]=_0x126454,this[_0x1ad371(0x178)]=_0x528714,this[_0x1ad371(0x187)]=_0xe5a30a,this[_0x1ad371(0x18a)]=_0x1b83a3,this['_init'](),this['_initUserSync']();}[_0x45fe4b(0x1ad)](){const _0x2409e8=_0x45fe4b;this[_0x2409e8(0x1a2)](this['_threadCommentModel'][_0x2409e8(0x1d5)][_0x2409e8(0x1d7)](w[_0x2409e8(0x1b1)](0x10))[_0x2409e8(0x1cb)](_0x1ed2a9=>{const _0x15e8ba=_0x2409e8,_0x1c4b59=new Set();_0x1ed2a9[_0x15e8ba(0x1ea)](_0x368dc5=>{const _0x7360e9=_0x15e8ba;switch(_0x368dc5[_0x7360e9(0x188)]){case _0x7360e9(0x1db):{const _0x5b981c=_0x368dc5[_0x7360e9(0x176)][_0x7360e9(0x17f)];_0x1c4b59[_0x7360e9(0x1db)](_0x5b981c);break;}}}),R(this[_0x15e8ba(0x18a)],_0x1c4b59);}));}[_0x45fe4b(0x189)](){const _0x30a5a0=_0x45fe4b;this['disposeWithMe'](this[_0x30a5a0(0x196)][_0x30a5a0(0x1d5)]['subscribe'](async _0x2edfb2=>{const _0x36a813=_0x30a5a0;var _0x44f088,_0x243e86,_0x494edf,_0x447a75;const _0x5bba75=(_0x44f088=this[_0x36a813(0x178)]['getUnit'](_0x2edfb2[_0x36a813(0x1c5)])[_0x36a813(0x1bc)](_0x5219b5=>_0x5219b5[_0x36a813(0x19b)]===_0x2edfb2['threadId']))==null?void 0x0:_0x44f088[_0x36a813(0x1e7)];if(!_0x5bba75)return;const {unitId:_0x3047c8,subUnitId:_0x2a4229}=_0x5bba75;switch(_0x2edfb2['user']&&this[_0x36a813(0x187)][_0x36a813(0x17a)](_0x2edfb2[_0x36a813(0x1a5)]),_0x2edfb2[_0x36a813(0x188)]){case v['Add']:break;case v[_0x36a813(0x1ca)]:{this[_0x36a813(0x178)][_0x36a813(0x175)](_0x3047c8,_0x2a4229,{'unitId':_0x3047c8,'subUnitId':_0x2a4229,'ref':'','id':_0x2edfb2[_0x36a813(0x1d2)],'dT':f(+_0x2edfb2[_0x36a813(0x17c)]),'threadId':_0x2edfb2[_0x36a813(0x19b)],'personId':(_0x494edf=(_0x243e86=_0x2edfb2[_0x36a813(0x1a5)])==null?void 0x0:_0x243e86[_0x36a813(0x1a7)])!=null?_0x494edf:_0x2edfb2[_0x36a813(0x1e5)],'text':JSON[_0x36a813(0x18e)](_0x2edfb2['content']),'parentId':_0x5bba75['id']});break;}case v['Delete']:{const _0x495602=this[_0x36a813(0x178)][_0x36a813(0x1a0)](_0x3047c8,_0x2a4229,_0x2edfb2[_0x36a813(0x1d2)]);_0x495602&&_0x495602[_0x36a813(0x199)]&&this[_0x36a813(0x178)][_0x36a813(0x1d9)](_0x3047c8,_0x2a4229,_0x2edfb2['replyId']);break;}case v[_0x36a813(0x1de)]:{this[_0x36a813(0x178)]['updateComment'](_0x3047c8,_0x2a4229,{'commentId':_0x2edfb2[_0x36a813(0x1d2)],'text':JSON['parse'](_0x2edfb2[_0x36a813(0x198)])});break;}case v[_0x36a813(0x1dc)]:{const _0x2f1682=(_0x447a75=this[_0x36a813(0x178)][_0x36a813(0x1b5)](_0x2edfb2[_0x36a813(0x1c5)])['find'](_0x453bbf=>_0x453bbf['threadId']===_0x2edfb2[_0x36a813(0x19b)]))==null?void 0x0:_0x447a75[_0x36a813(0x1e7)];_0x2f1682&&this[_0x36a813(0x178)][_0x36a813(0x18c)](_0x3047c8,_0x2a4229,_0x2f1682['id'],_0x2edfb2['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x45fe4b(0x171)](b[_0x45fe4b(0x182)])),S(0x1,c[_0x45fe4b(0x171)](M['ThreadCommentModel'])),S(0x2,c[_0x45fe4b(0x171)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x45fe4b(0x1ba)]))],p);const q=_0x45fe4b(0x1da),D={};var A=Object[_0x45fe4b(0x1aa)],x=(_0x11760e,_0x178272,_0x5676fb,_0x3f57f2)=>{for(var _0x26d672=_0x3f57f2>0x1?void 0x0:_0x3f57f2?A(_0x178272,_0x5676fb):_0x178272,_0x5adcbc=_0x11760e['length']-0x1,_0xc2a506;_0x5adcbc>=0x0;_0x5adcbc--)(_0xc2a506=_0x11760e[_0x5adcbc])&&(_0x26d672=_0xc2a506(_0x26d672)||_0x26d672);return _0x26d672;},_=(_0x553384,_0xeff652)=>(_0x58602c,_0x1b22fe)=>_0xeff652(_0x58602c,_0x1b22fe,_0x553384);function Y(_0x15f9ff,_0x569919){const _0x5ad96e=_0x45fe4b,_0x25caaa=_0x15f9ff['replies'][0x0];return{..._0x569919,'id':_0x25caaa[_0x5ad96e(0x1d2)],'resolved':_0x15f9ff[_0x5ad96e(0x183)]===0x1,'dT':f(_0x25caaa[_0x5ad96e(0x17c)]),'personId':_0x25caaa[_0x5ad96e(0x1e5)],'threadId':_0x25caaa[_0x5ad96e(0x19b)]};}function G(_0x1f1038,_0x29bfcf,_0x3f618f){const _0x32fab8=_0x45fe4b;var _0x3d2f00,_0x2077c9;if(((_0x2077c9=(_0x3d2f00=_0x1f1038==null?void 0x0:_0x1f1038[_0x32fab8(0x1e0)])==null?void 0x0:_0x3d2f00[_0x32fab8(0x1d1)])!=null?_0x2077c9:0x0)>0x0){const _0x511e1e=(_0x16195f,_0x590cda)=>({'id':_0x16195f[_0x32fab8(0x1d2)],'threadId':_0x16195f['threadId'],'dT':f(_0x16195f[_0x32fab8(0x17c)]),'personId':_0x16195f[_0x32fab8(0x1e5)],'resolved':_0x1f1038[_0x32fab8(0x183)]===I[_0x32fab8(0x1e4)],'unitId':_0x29bfcf,'subUnitId':_0x3f618f,'text':JSON['parse'](_0x16195f[_0x32fab8(0x198)]),'parentId':_0x590cda}),_0x484067=_0x511e1e(_0x1f1038['replies'][0x0]);return{..._0x484067,'children':_0x1f1038['replies']['slice'](0x1)[_0x32fab8(0x185)](_0x110e54=>_0x511e1e(_0x110e54,_0x484067['id']))};}return null;}let g=class{constructor(_0x3c3da,_0x224974,_0x2057e6,_0x434524){const _0x58223c=_0x45fe4b;this[_0x58223c(0x1cf)]=_0x3c3da,this[_0x58223c(0x187)]=_0x224974,this[_0x58223c(0x17e)]=_0x2057e6,this['_injector']=_0x434524;}async[_0x45fe4b(0x175)](_0x24f074){const _0x44ce17=_0x45fe4b;var _0xeaab17,_0x552cff;const {parentId:_0x5c13fc,unitId:_0x361ca6,text:_0x1bd96,threadId:_0x32382d}=_0x24f074,_0x58e156=(_0x552cff=(_0xeaab17=_0x1bd96[_0x44ce17(0x18f)])==null?void 0x0:_0xeaab17[_0x44ce17(0x1c2)](_0x478093=>_0x478093[_0x44ce17(0x191)]===c[_0x44ce17(0x172)][_0x44ce17(0x181)])['map'](_0x4c2b44=>_0x4c2b44[_0x44ce17(0x1d6)]))!=null?_0x552cff:[],_0x33ead1=JSON[_0x44ce17(0x173)](_0x1bd96),_0x2d3b48=(await this['_sessionService'][_0x44ce17(0x184)](_0x361ca6))[_0x44ce17(0x19d)]();if(_0x5c13fc){const _0x4b0165={'memberId':_0x2d3b48,'unitId':_0x361ca6,'content':_0x33ead1,'mention':_0x58e156,'threadId':_0x32382d},_0x368882=(await this[_0x44ce17(0x1cf)][_0x44ce17(0x180)](_0x44ce17(0x1c0)+_0x361ca6+_0x44ce17(0x18b),{'body':_0x4b0165}))[_0x44ce17(0x197)][_0x44ce17(0x1dd)];return{..._0x24f074,'id':_0x368882[_0x44ce17(0x1d2)],'dT':c['dayjs'](+_0x368882['createTimestamp'])[_0x44ce17(0x1b4)](_0x44ce17(0x1b8)),'personId':_0x368882['userId']};}else{const _0x50bac7={'memberId':_0x2d3b48,'unitId':_0x361ca6,'content':_0x33ead1,'mention':_0x58e156},_0x3464b9=await this[_0x44ce17(0x1cf)][_0x44ce17(0x180)]('/universer-api/comment/unit/'+_0x361ca6+_0x44ce17(0x1e3),{'body':_0x50bac7});return Y(_0x3464b9[_0x44ce17(0x197)]['comment'],_0x24f074);}}async[_0x45fe4b(0x16f)](_0x4ea576){const _0x7ddbd6=_0x45fe4b;var _0x32133b,_0x447d51;const {text:_0x30a6d9,unitId:_0x44d226}=_0x4ea576,_0x79a12f=(_0x447d51=(_0x32133b=_0x30a6d9[_0x7ddbd6(0x18f)])==null?void 0x0:_0x32133b[_0x7ddbd6(0x1c2)](_0x31965=>_0x31965[_0x7ddbd6(0x191)]===c[_0x7ddbd6(0x172)][_0x7ddbd6(0x181)])[_0x7ddbd6(0x185)](_0x2e01fd=>_0x2e01fd[_0x7ddbd6(0x1d6)]))!=null?_0x447d51:[],_0x66328a=JSON['stringify'](_0x30a6d9),_0x361176=_0x4ea576[_0x7ddbd6(0x19b)],_0x27290b=_0x4ea576['id'],_0x2d4a97={'memberId':(await this[_0x7ddbd6(0x17e)]['requireSession'](_0x44d226))['getMemberID'](),'unitId':_0x44d226,'threadId':_0x361176,'mention':_0x79a12f,'content':_0x66328a,'replyId':_0x27290b},_0x3bb63e=await this[_0x7ddbd6(0x1cf)]['post'](_0x7ddbd6(0x1c0)+_0x44d226+_0x7ddbd6(0x19c),{'body':_0x2d4a97});return!_0x3bb63e[_0x7ddbd6(0x197)][_0x7ddbd6(0x186)]||_0x3bb63e[_0x7ddbd6(0x197)][_0x7ddbd6(0x186)][_0x7ddbd6(0x1e1)]===0x1;}async[_0x45fe4b(0x18c)](_0x46617c){const _0x5327dc=_0x45fe4b,{unitId:_0x30347f}=_0x46617c,_0x1e2b92=_0x46617c['threadId'],_0xbd7204={'memberId':this[_0x5327dc(0x187)][_0x5327dc(0x18d)]()[_0x5327dc(0x1a7)],'unitId':_0x30347f,'threadId':_0x1e2b92,'solved':_0x46617c[_0x5327dc(0x170)]?I[_0x5327dc(0x1e4)]:I[_0x5327dc(0x190)]},_0xd1148a=await this[_0x5327dc(0x1cf)][_0x5327dc(0x180)](_0x5327dc(0x1c0)+_0x30347f+_0x5327dc(0x1c3),{'body':_0xbd7204});return!_0xd1148a[_0x5327dc(0x197)]['error']||_0xd1148a[_0x5327dc(0x197)]['error'][_0x5327dc(0x1e1)]===0x1;}async['deleteComment'](_0x59754c,_0x4319cd,_0x1b76cd,_0x975843){const _0x445343=_0x45fe4b,_0x51f345={'memberId':(await this['_sessionService'][_0x445343(0x184)](_0x59754c))[_0x445343(0x19d)](),'threadId':_0x1b76cd,'replyId':_0x975843,'unitId':_0x59754c},_0xac98aa=await this[_0x445343(0x1cf)][_0x445343(0x180)](_0x445343(0x1c0)+_0x59754c+_0x445343(0x177),{'body':_0x51f345});return!_0xac98aa[_0x445343(0x197)][_0x445343(0x186)]||_0xac98aa[_0x445343(0x197)][_0x445343(0x186)][_0x445343(0x1e1)]===0x1;}async['listComments'](_0x25b733,_0x1d7dd6,_0x6e1cab){const _0x4e9f10=_0x45fe4b,_0x2e23e2={'unitId':_0x25b733,'threadId':_0x6e1cab},_0x1a610e=await this[_0x4e9f10(0x1cf)]['post'](_0x4e9f10(0x1c0)+_0x25b733+'/list',{'body':_0x2e23e2}),_0x42acfe=_0x6e1cab[_0x4e9f10(0x185)](_0x436b6d=>G(_0x1a610e['body'][_0x4e9f10(0x1a3)][_0x436b6d],_0x25b733,_0x1d7dd6))['filter'](Boolean);return Object[_0x4e9f10(0x1b2)](_0x1a610e[_0x4e9f10(0x197)][_0x4e9f10(0x1b0)])[_0x4e9f10(0x1ea)](_0x7c612c=>{const _0x55af4a=_0x4e9f10;this[_0x55af4a(0x187)][_0x55af4a(0x17a)](_0x7c612c);}),_0x42acfe;}[_0x45fe4b(0x19e)](_0x38aa54){return{'id':_0x38aa54['id'],'threadId':_0x38aa54['threadId'],'ref':_0x38aa54['ref']};}};function _0x1fee(_0x3870a4,_0x26faca){const _0x34c955=_0x34c9();return _0x1fee=function(_0x1fee00,_0x1b1ea7){_0x1fee00=_0x1fee00-0x16f;let _0xd84444=_0x34c955[_0x1fee00];return _0xd84444;},_0x1fee(_0x3870a4,_0x26faca);}g=x([_(0x0,c[_0x45fe4b(0x171)](P[_0x45fe4b(0x1df)])),_(0x1,c[_0x45fe4b(0x171)](c[_0x45fe4b(0x1c1)])),_(0x2,c[_0x45fe4b(0x171)](b[_0x45fe4b(0x1bf)])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x41040b,_0x1a027e,_0x565357,_0x3da186)=>{const _0x429451=_0x45fe4b;for(var _0x45c516=_0x3da186>0x1?void 0x0:_0x3da186?H(_0x1a027e,_0x565357):_0x1a027e,_0x2f7ba4=_0x41040b[_0x429451(0x1d1)]-0x1,_0x5ed149;_0x2f7ba4>=0x0;_0x2f7ba4--)(_0x5ed149=_0x41040b[_0x2f7ba4])&&(_0x45c516=_0x5ed149(_0x45c516)||_0x45c516);return _0x45c516;},y=(_0xa21cf1,_0x2bf82c)=>(_0x3793c9,_0x3fd26f)=>_0x2bf82c(_0x3793c9,_0x3fd26f,_0xa21cf1);let C=class extends c[_0x45fe4b(0x1ae)]{constructor(_0x52a597,_0x2910de){const _0x56720a=_0x45fe4b;super(),this['_threadCommentDataSourceService']=_0x52a597,this['_threadCommentDataSource']=_0x2910de,this[_0x56720a(0x174)]();}[_0x45fe4b(0x174)](){const _0x448ce7=_0x45fe4b;this[_0x448ce7(0x1c9)][_0x448ce7(0x195)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x448ce7(0x1a1)]=!0x1;}};C=J([y(0x0,M[_0x45fe4b(0x1a9)]),y(0x1,c[_0x45fe4b(0x171)](g))],C);var F=Object[_0x45fe4b(0x1a6)],L=Object['getOwnPropertyDescriptor'],Z=(_0x5aa9ad,_0x27774d,_0x179086)=>_0x27774d in _0x5aa9ad?F(_0x5aa9ad,_0x27774d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x179086}):_0x5aa9ad[_0x27774d]=_0x179086,W=(_0x30270f,_0x5d83ce,_0x145bd8,_0x417c90)=>{for(var _0x477f4e=_0x417c90>0x1?void 0x0:_0x417c90?L(_0x5d83ce,_0x145bd8):_0x5d83ce,_0x4c82f4=_0x30270f['length']-0x1,_0x38e587;_0x4c82f4>=0x0;_0x4c82f4--)(_0x38e587=_0x30270f[_0x4c82f4])&&(_0x477f4e=_0x38e587(_0x477f4e)||_0x477f4e);return _0x477f4e;},O=(_0x4df684,_0xd5a3d3)=>(_0x3f01a7,_0x19719e)=>_0xd5a3d3(_0x3f01a7,_0x19719e,_0x4df684),N=(_0x14acbb,_0x3d0f30,_0x281a7e)=>Z(_0x14acbb,typeof _0x3d0f30!=_0x45fe4b(0x1c6)?_0x3d0f30+'':_0x3d0f30,_0x281a7e);function _0x34c9(){const _0x1ddc41=['Solved','userId','10028EvAHuW','root','Add','2193704LZuCbX','forEach','updateComment','resolved','Inject','CustomRangeType','stringify','_initDataSource','addComment','payload','/delete','_threadCommentModel','toStringTag','addUser','Plugin','createTimestamp','59qKwZXc','_sessionService','personId','post','COMMENT','CommentService','solved','requireSession','map','error','_userService','type','_init','_injector','/reply','resolveComment','getCurrentUser','parse','customRanges','OpenOrReOpen','rangeType','@univerjs/thread-comment','385945uGvlDT','374313gXsWPc','dataSource','_commentService','body','content','parentId','dayjs','threadId','/edit','getMemberID','saveCommentToSnapshot','134844hVHmMh','getComment','syncUpdateMutationToColla','disposeWithMe','comments','1538IUDuFR','user','defineProperty','userID','_config','IThreadCommentDataSourceService','getOwnPropertyDescriptor','@univerjs-pro/license','@univerjs/core','_initUserSync','Disposable','9CawqDy','users','bufferTime','values','UniverCollaborationClientPlugin','format','getUnit','UniverThreadCommentUIPlugin','345mBjmFT','YYYY/MM/DD\x20HH:mm','get','Injector','Module','find','3966940msUIdJ','@univerjs-pro/collaboration-client','CollaborationSessionService','/universer-api/comment/unit/','UserManagerService','filter','/solved','Delete','unitId','symbol','Unknown','UNRECOGNIZED','_threadCommentDataSourceService','Reply','subscribe','@univerjs/network','_configService','11dKAagJ','_httpService','UniverThreadCommentDataSourcePlugin','length','replyId','size','@univerjs/thread-comment-ui','commentUpdate$','rangeId','pipe','delete','deleteComment','thread-comment-data-source.config','add','Solve','reply','Edit','HTTPService','replies','code','UNIVER_UNKNOWN','/add'];_0x34c9=function(){return _0x1ddc41;};return _0x34c9();}exports[_0x45fe4b(0x1d0)]=class extends c[_0x45fe4b(0x17b)]{constructor(_0x29f050=D,_0x1b03e1,_0x22df96){const _0x1fd406=_0x45fe4b;super(),this[_0x1fd406(0x1a8)]=_0x29f050,this['_injector']=_0x1b03e1,this['_configService']=_0x22df96;const {..._0x217d84}=c['merge']({},D,this['_config']);this[_0x1fd406(0x1cd)]['setConfig'](q,_0x217d84);}['onStarting'](){const _0x43a631=_0x45fe4b;[[g],[C],[p]][_0x43a631(0x1ea)](_0x334940=>{const _0x51d6a6=_0x43a631;this[_0x51d6a6(0x18a)][_0x51d6a6(0x1db)](_0x334940);});}['onReady'](){const _0x3fae00=_0x45fe4b;this[_0x3fae00(0x18a)]['get'](C),this[_0x3fae00(0x18a)][_0x3fae00(0x1b9)](p);}},N(exports[_0x45fe4b(0x1d0)],'pluginName',U),N(exports[_0x45fe4b(0x1d0)],_0x45fe4b(0x188),c['UniverInstanceType'][_0x45fe4b(0x1e2)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0x45fe4b(0x1b6)],b[_0x45fe4b(0x1b3)],T['UniverLicensePlugin']),O(0x1,c[_0x45fe4b(0x171)](c[_0x45fe4b(0x1ba)])),O(0x2,c['IConfigService'])],exports[_0x45fe4b(0x1d0)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3f4afc=_0x2b04;(function(_0x4f6264,_0x411fbb){const _0x5e5296=_0x2b04,_0x58837c=_0x4f6264();while(!![]){try{const _0x3a62cc=parseInt(_0x5e5296(0x155))/0x1*(-parseInt(_0x5e5296(0x14a))/0x2)+parseInt(_0x5e5296(0x164))/0x3*(-parseInt(_0x5e5296(0x10f))/0x4)+parseInt(_0x5e5296(0x11f))/0x5*(-parseInt(_0x5e5296(0x169))/0x6)+-parseInt(_0x5e5296(0x14c))/0x7+-parseInt(_0x5e5296(0x10a))/0x8*(-parseInt(_0x5e5296(0x120))/0x9)+-parseInt(_0x5e5296(0x166))/0xa*(-parseInt(_0x5e5296(0x128))/0xb)+parseInt(_0x5e5296(0x132))/0xc;if(_0x3a62cc===_0x411fbb)break;else _0x58837c['push'](_0x58837c['shift']());}catch(_0x2e548b){_0x58837c['push'](_0x58837c['shift']());}}}(_0x3af9,0x5489e));import{CommentService as _0x84580b,CollaborationSessionService as _0x1bf408,UniverCollaborationClientPlugin as _0x1e3b86}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2a1bc5}from'@univerjs-pro/license';import{dayjs as _0x4f4ce7,UserManagerService as _0x554e61,Inject as _0x194cc9,Injector as _0x3963d7,Disposable as _0x3fd518,CustomRangeType as _0x1a473c,UniverInstanceType as _0x183756,DependentOn as _0x5c3377,IConfigService as _0x1131bc,Plugin as _0x3f2e1d,merge as _0x5e9b24}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5b39b7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4f8fec,IThreadCommentDataSourceService as _0x31dd5a}from'@univerjs/thread-comment';import{bufferTime as _0x72024c}from'rxjs';import{HTTPService as _0x5554b4}from'@univerjs/network';const W=_0x3f4afc(0x130);function _0x3af9(){const _0x38bd9d=['/universer-api/comment/unit/','root','commentUpdate$','UNIVER_UNKNOWN','_threadCommentDataSource','_httpService','OpenOrReOpen','getCurrentUser','deleteComment','Solved','disposeWithMe','_configService','addComment','find','_initDataSource','listComments','content','onReady','personId','getUser','_threadCommentModel','Reply','add','5626dyfDJg','COMMENT','2464385DcpgGI','/solved','values','delete','map','_initUserSync','Edit','post','slice','19rOLctN','rangeType','_threadCommentDataSourceService','_sessionService','get','syncUpdateMutationToColla','/edit','saveCommentToSnapshot','Delete','_commentService','Solve','stringify','parse','_userService','resolveComment','3oFVddP','_injector','10xIQJYj','filter','getUnit','2046FFEfba','threadId','pluginName','unitId','_init','replies','41048fiIeRx','onStarting','forEach','addUser','reply','1692892RkaMfl','getMemberID','userId','YYYY/MM/DD\x20HH:mm','resolved','parentId','length','Unknown','_config','size','error','/universer-api/user/list','replyId','getOwnPropertyDescriptor','createTimestamp','body','6585Kybagt','1017ZnkAAE','subscribe','dataSource','type','code','comments','ref','userID','3242613wunRSx','UNRECOGNIZED','user','rangeId','solved','/reply','requireSession','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','users','8994072MEdlCo'];_0x3af9=function(){return _0x38bd9d;};return _0x3af9();}var I=(_0x45267d=>(_0x45267d[_0x45267d[_0x3f4afc(0x139)]=0x0]=_0x3f4afc(0x139),_0x45267d[_0x45267d[_0x3f4afc(0x13c)]=0x1]='Solved',_0x45267d[_0x45267d[_0x3f4afc(0x129)]=-0x1]=_0x3f4afc(0x129),_0x45267d))(I||{}),v=(_0x2863e8=>(_0x2863e8[_0x2863e8[_0x3f4afc(0x116)]=0x0]='Unknown',_0x2863e8[_0x2863e8[_0x3f4afc(0x12f)]=0x1]='Add',_0x2863e8[_0x2863e8[_0x3f4afc(0x148)]=0x2]=_0x3f4afc(0x148),_0x2863e8[_0x2863e8[_0x3f4afc(0x152)]=0x3]=_0x3f4afc(0x152),_0x2863e8[_0x2863e8['Delete']=0x4]=_0x3f4afc(0x15d),_0x2863e8[_0x2863e8[_0x3f4afc(0x15f)]=0x5]='Solve',_0x2863e8[_0x2863e8[_0x3f4afc(0x129)]=-0x1]=_0x3f4afc(0x129),_0x2863e8))(v||{});const D=_0x4b910a=>_0x4f4ce7(new Date(+_0x4b910a))['format'](_0x3f4afc(0x112)),B=async(_0x121f67,_0x41a19b)=>{const _0x55ff18=_0x3f4afc,_0x313d9b=_0x121f67['get'](_0x554e61),_0x477a19=_0x121f67[_0x55ff18(0x159)](_0x5554b4);_0x41a19b[_0x55ff18(0x10c)](_0x2de2bb=>{const _0x2b7b42=_0x55ff18;_0x313d9b[_0x2b7b42(0x146)](_0x2de2bb)&&_0x41a19b[_0x2b7b42(0x14f)](_0x2de2bb);}),_0x41a19b[_0x55ff18(0x118)]&&(await _0x477a19[_0x55ff18(0x159)](_0x55ff18(0x11a),{'params':{'userIDs':[..._0x41a19b]}}))[_0x55ff18(0x11e)][_0x55ff18(0x131)][_0x55ff18(0x10c)](_0x3bd3d9=>{_0x3bd3d9&&_0x313d9b['addUser'](_0x3bd3d9);});};var K=Object[_0x3f4afc(0x11c)],V=(_0x433eed,_0x278ba2,_0xee277b,_0x57fc2b)=>{const _0x566bf9=_0x3f4afc;for(var _0x3bd754=_0x57fc2b>0x1?void 0x0:_0x57fc2b?K(_0x278ba2,_0xee277b):_0x278ba2,_0x54c20d=_0x433eed[_0x566bf9(0x115)]-0x1,_0x388b7e;_0x54c20d>=0x0;_0x54c20d--)(_0x388b7e=_0x433eed[_0x54c20d])&&(_0x3bd754=_0x388b7e(_0x3bd754)||_0x3bd754);return _0x3bd754;},p=(_0x19716e,_0x2a201f)=>(_0x205992,_0x19f59a)=>_0x2a201f(_0x205992,_0x19f59a,_0x19716e);let S=class extends _0x3fd518{constructor(_0x562c46,_0x5d6969,_0x1fa01a,_0x13cab5){const _0x126c75=_0x3f4afc;super(),this[_0x126c75(0x15e)]=_0x562c46,this[_0x126c75(0x147)]=_0x5d6969,this[_0x126c75(0x162)]=_0x1fa01a,this[_0x126c75(0x165)]=_0x13cab5,this[_0x126c75(0x16d)](),this[_0x126c75(0x151)]();}[_0x3f4afc(0x151)](){const _0x5780f8=_0x3f4afc;this[_0x5780f8(0x13d)](this[_0x5780f8(0x147)][_0x5780f8(0x135)]['pipe'](_0x72024c(0x10))[_0x5780f8(0x121)](_0x142ab9=>{const _0x1eb9cb=_0x5780f8,_0x4efb78=new Set();_0x142ab9[_0x1eb9cb(0x10c)](_0xa31414=>{const _0x188b3f=_0x1eb9cb;switch(_0xa31414[_0x188b3f(0x123)]){case _0x188b3f(0x149):{const _0x374951=_0xa31414['payload'][_0x188b3f(0x145)];_0x4efb78[_0x188b3f(0x149)](_0x374951);break;}}}),B(this[_0x1eb9cb(0x165)],_0x4efb78);}));}[_0x3f4afc(0x16d)](){const _0x33780d=_0x3f4afc;this['disposeWithMe'](this[_0x33780d(0x15e)][_0x33780d(0x135)][_0x33780d(0x121)](async _0x211bbb=>{const _0x36efe0=_0x33780d;var _0x3869e5,_0x306a69,_0x24d03c,_0x328514;const _0x2f2aeb=(_0x3869e5=this[_0x36efe0(0x147)][_0x36efe0(0x168)](_0x211bbb['unitId'])[_0x36efe0(0x140)](_0x113db3=>_0x113db3['threadId']===_0x211bbb[_0x36efe0(0x16a)]))==null?void 0x0:_0x3869e5[_0x36efe0(0x134)];if(!_0x2f2aeb)return;const {unitId:_0x2c5c7e,subUnitId:_0x464c80}=_0x2f2aeb;switch(_0x211bbb[_0x36efe0(0x12a)]&&this[_0x36efe0(0x162)][_0x36efe0(0x10d)](_0x211bbb[_0x36efe0(0x12a)]),_0x211bbb[_0x36efe0(0x123)]){case v['Add']:break;case v[_0x36efe0(0x148)]:{this[_0x36efe0(0x147)][_0x36efe0(0x13f)](_0x2c5c7e,_0x464c80,{'unitId':_0x2c5c7e,'subUnitId':_0x464c80,'ref':'','id':_0x211bbb[_0x36efe0(0x11b)],'dT':D(+_0x211bbb[_0x36efe0(0x11d)]),'threadId':_0x211bbb[_0x36efe0(0x16a)],'personId':(_0x24d03c=(_0x306a69=_0x211bbb[_0x36efe0(0x12a)])==null?void 0x0:_0x306a69[_0x36efe0(0x127)])!=null?_0x24d03c:_0x211bbb[_0x36efe0(0x111)],'text':JSON[_0x36efe0(0x161)](_0x211bbb['content']),'parentId':_0x2f2aeb['id']});break;}case v[_0x36efe0(0x15d)]:{const _0x751070=this['_threadCommentModel']['getComment'](_0x2c5c7e,_0x464c80,_0x211bbb[_0x36efe0(0x11b)]);_0x751070&&_0x751070[_0x36efe0(0x114)]&&this[_0x36efe0(0x147)]['deleteComment'](_0x2c5c7e,_0x464c80,_0x211bbb[_0x36efe0(0x11b)]);break;}case v[_0x36efe0(0x152)]:{this[_0x36efe0(0x147)]['updateComment'](_0x2c5c7e,_0x464c80,{'commentId':_0x211bbb[_0x36efe0(0x11b)],'text':JSON[_0x36efe0(0x161)](_0x211bbb[_0x36efe0(0x143)])});break;}case v['Solve']:{const _0x52b99c=(_0x328514=this[_0x36efe0(0x147)][_0x36efe0(0x168)](_0x211bbb[_0x36efe0(0x16c)])[_0x36efe0(0x140)](_0x18fe3b=>_0x18fe3b[_0x36efe0(0x16a)]===_0x211bbb[_0x36efe0(0x16a)]))==null?void 0x0:_0x328514[_0x36efe0(0x134)];_0x52b99c&&this[_0x36efe0(0x147)][_0x36efe0(0x163)](_0x2c5c7e,_0x464c80,_0x52b99c['id'],_0x211bbb[_0x36efe0(0x12c)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x194cc9(_0x84580b)),p(0x1,_0x194cc9(_0x4f8fec)),p(0x2,_0x194cc9(_0x554e61)),p(0x3,_0x194cc9(_0x3963d7))],S);function _0x2b04(_0x2db369,_0x29528b){const _0x3af9bc=_0x3af9();return _0x2b04=function(_0x2b0459,_0x20ea74){_0x2b0459=_0x2b0459-0x10a;let _0x40b1f9=_0x3af9bc[_0x2b0459];return _0x40b1f9;},_0x2b04(_0x2db369,_0x29528b);}const z='thread-comment-data-source.config',M={};var k=Object[_0x3f4afc(0x11c)],Q=(_0xb926e9,_0x250cac,_0x33a466,_0xdf9c8f)=>{const _0x167dcc=_0x3f4afc;for(var _0x4c49ed=_0xdf9c8f>0x1?void 0x0:_0xdf9c8f?k(_0x250cac,_0x33a466):_0x250cac,_0x57d643=_0xb926e9[_0x167dcc(0x115)]-0x1,_0x5c3bfa;_0x57d643>=0x0;_0x57d643--)(_0x5c3bfa=_0xb926e9[_0x57d643])&&(_0x4c49ed=_0x5c3bfa(_0x4c49ed)||_0x4c49ed);return _0x4c49ed;},_=(_0x3f0552,_0x1e53c1)=>(_0x1b1375,_0x3975f9)=>_0x1e53c1(_0x1b1375,_0x3975f9,_0x3f0552);function X(_0x557cd9,_0x2a2ef0){const _0x2474ef=_0x3f4afc,_0xf3f1a=_0x557cd9[_0x2474ef(0x16e)][0x0];return{..._0x2a2ef0,'id':_0xf3f1a[_0x2474ef(0x11b)],'resolved':_0x557cd9[_0x2474ef(0x12c)]===0x1,'dT':D(_0xf3f1a[_0x2474ef(0x11d)]),'personId':_0xf3f1a[_0x2474ef(0x111)],'threadId':_0xf3f1a[_0x2474ef(0x16a)]};}function ee(_0x461dd0,_0x50c5df,_0x229142){const _0x54db6d=_0x3f4afc;var _0x5220d8,_0x25e555;if(((_0x25e555=(_0x5220d8=_0x461dd0==null?void 0x0:_0x461dd0[_0x54db6d(0x16e)])==null?void 0x0:_0x5220d8['length'])!=null?_0x25e555:0x0)>0x0){const _0x57e980=(_0xf3fd5d,_0x574ab7)=>({'id':_0xf3fd5d['replyId'],'threadId':_0xf3fd5d[_0x54db6d(0x16a)],'dT':D(_0xf3fd5d[_0x54db6d(0x11d)]),'personId':_0xf3fd5d[_0x54db6d(0x111)],'resolved':_0x461dd0['solved']===I['Solved'],'unitId':_0x50c5df,'subUnitId':_0x229142,'text':JSON[_0x54db6d(0x161)](_0xf3fd5d[_0x54db6d(0x143)]),'parentId':_0x574ab7}),_0x2df3f1=_0x57e980(_0x461dd0['replies'][0x0]);return{..._0x2df3f1,'children':_0x461dd0[_0x54db6d(0x16e)][_0x54db6d(0x154)](0x1)[_0x54db6d(0x150)](_0x4391eb=>_0x57e980(_0x4391eb,_0x2df3f1['id']))};}return null;}let f=class{constructor(_0x558c28,_0x1b2da6,_0x141787,_0x5a2a64){const _0x313d84=_0x3f4afc;this['_httpService']=_0x558c28,this[_0x313d84(0x162)]=_0x1b2da6,this[_0x313d84(0x158)]=_0x141787,this[_0x313d84(0x165)]=_0x5a2a64;}async[_0x3f4afc(0x13f)](_0x1e2556){const _0xb15899=_0x3f4afc;var _0x336231,_0x4a67f6;const {parentId:_0x506db6,unitId:_0x2d1a51,text:_0x937a74,threadId:_0x94bbbd}=_0x1e2556,_0x2e8a98=(_0x4a67f6=(_0x336231=_0x937a74['customRanges'])==null?void 0x0:_0x336231['filter'](_0x14ebf9=>_0x14ebf9[_0xb15899(0x156)]===_0x1a473c[_0xb15899(0x14b)])[_0xb15899(0x150)](_0xd33dc1=>_0xd33dc1[_0xb15899(0x12b)]))!=null?_0x4a67f6:[],_0x569aea=JSON[_0xb15899(0x160)](_0x937a74),_0x17a80a=(await this[_0xb15899(0x158)][_0xb15899(0x12e)](_0x2d1a51))[_0xb15899(0x110)]();if(_0x506db6){const _0x3c9087={'memberId':_0x17a80a,'unitId':_0x2d1a51,'content':_0x569aea,'mention':_0x2e8a98,'threadId':_0x94bbbd},_0x3daae6=(await this['_httpService']['post'](_0xb15899(0x133)+_0x2d1a51+_0xb15899(0x12d),{'body':_0x3c9087}))[_0xb15899(0x11e)][_0xb15899(0x10e)];return{..._0x1e2556,'id':_0x3daae6[_0xb15899(0x11b)],'dT':_0x4f4ce7(+_0x3daae6[_0xb15899(0x11d)])['format'](_0xb15899(0x112)),'personId':_0x3daae6[_0xb15899(0x111)]};}else{const _0x1d9f74={'memberId':_0x17a80a,'unitId':_0x2d1a51,'content':_0x569aea,'mention':_0x2e8a98},_0x2cd041=await this[_0xb15899(0x138)][_0xb15899(0x153)](_0xb15899(0x133)+_0x2d1a51+'/add',{'body':_0x1d9f74});return X(_0x2cd041[_0xb15899(0x11e)]['comment'],_0x1e2556);}}async['updateComment'](_0x22bbeb){const _0x461865=_0x3f4afc;var _0x16ee45,_0x5409b3;const {text:_0x18b3aa,unitId:_0x1b1c60}=_0x22bbeb,_0x1327fc=(_0x5409b3=(_0x16ee45=_0x18b3aa['customRanges'])==null?void 0x0:_0x16ee45[_0x461865(0x167)](_0x13dcea=>_0x13dcea[_0x461865(0x156)]===_0x1a473c[_0x461865(0x14b)])[_0x461865(0x150)](_0x4842f7=>_0x4842f7['rangeId']))!=null?_0x5409b3:[],_0x416e0c=JSON['stringify'](_0x18b3aa),_0x4114e1=_0x22bbeb[_0x461865(0x16a)],_0x3ea8ca=_0x22bbeb['id'],_0x537967={'memberId':(await this[_0x461865(0x158)][_0x461865(0x12e)](_0x1b1c60))[_0x461865(0x110)](),'unitId':_0x1b1c60,'threadId':_0x4114e1,'mention':_0x1327fc,'content':_0x416e0c,'replyId':_0x3ea8ca},_0x5f2c5f=await this[_0x461865(0x138)][_0x461865(0x153)](_0x461865(0x133)+_0x1b1c60+_0x461865(0x15b),{'body':_0x537967});return!_0x5f2c5f[_0x461865(0x11e)][_0x461865(0x119)]||_0x5f2c5f[_0x461865(0x11e)][_0x461865(0x119)][_0x461865(0x124)]===0x1;}async[_0x3f4afc(0x163)](_0x19a137){const _0x4c6129=_0x3f4afc,{unitId:_0x2eac6f}=_0x19a137,_0x22faec=_0x19a137['threadId'],_0x19428f={'memberId':this[_0x4c6129(0x162)][_0x4c6129(0x13a)]()[_0x4c6129(0x127)],'unitId':_0x2eac6f,'threadId':_0x22faec,'solved':_0x19a137[_0x4c6129(0x113)]?I[_0x4c6129(0x13c)]:I[_0x4c6129(0x139)]},_0x3d9016=await this[_0x4c6129(0x138)][_0x4c6129(0x153)](_0x4c6129(0x133)+_0x2eac6f+_0x4c6129(0x14d),{'body':_0x19428f});return!_0x3d9016[_0x4c6129(0x11e)][_0x4c6129(0x119)]||_0x3d9016[_0x4c6129(0x11e)][_0x4c6129(0x119)]['code']===0x1;}async[_0x3f4afc(0x13b)](_0x46777e,_0x57e2e1,_0x1b58e3,_0x5c30e5){const _0x16fe79=_0x3f4afc,_0x18a286={'memberId':(await this['_sessionService'][_0x16fe79(0x12e)](_0x46777e))[_0x16fe79(0x110)](),'threadId':_0x1b58e3,'replyId':_0x5c30e5,'unitId':_0x46777e},_0x5c8110=await this[_0x16fe79(0x138)][_0x16fe79(0x153)](_0x16fe79(0x133)+_0x46777e+'/delete',{'body':_0x18a286});return!_0x5c8110['body'][_0x16fe79(0x119)]||_0x5c8110[_0x16fe79(0x11e)][_0x16fe79(0x119)]['code']===0x1;}async[_0x3f4afc(0x142)](_0x3e5076,_0x3a72e9,_0x2d0c0a){const _0x558211=_0x3f4afc,_0xb8f250={'unitId':_0x3e5076,'threadId':_0x2d0c0a},_0x5113b4=await this[_0x558211(0x138)][_0x558211(0x153)](_0x558211(0x133)+_0x3e5076+'/list',{'body':_0xb8f250}),_0x1911c4=_0x2d0c0a[_0x558211(0x150)](_0xe56040=>ee(_0x5113b4[_0x558211(0x11e)][_0x558211(0x125)][_0xe56040],_0x3e5076,_0x3a72e9))[_0x558211(0x167)](Boolean);return Object[_0x558211(0x14e)](_0x5113b4[_0x558211(0x11e)]['users'])[_0x558211(0x10c)](_0x13ed2c=>{const _0x5a2ee6=_0x558211;this[_0x5a2ee6(0x162)]['addUser'](_0x13ed2c);}),_0x1911c4;}[_0x3f4afc(0x15c)](_0x4b9484){const _0x8e9c02=_0x3f4afc;return{'id':_0x4b9484['id'],'threadId':_0x4b9484[_0x8e9c02(0x16a)],'ref':_0x4b9484[_0x8e9c02(0x126)]};}};f=Q([_(0x0,_0x194cc9(_0x5554b4)),_(0x1,_0x194cc9(_0x554e61)),_(0x2,_0x194cc9(_0x1bf408)),_(0x3,_0x194cc9(_0x3963d7))],f);var re=Object[_0x3f4afc(0x11c)],te=(_0x23b5b8,_0x47ce9f,_0x5517ab,_0x18e0f8)=>{for(var _0x4507a5=_0x18e0f8>0x1?void 0x0:_0x18e0f8?re(_0x47ce9f,_0x5517ab):_0x47ce9f,_0x31e1c7=_0x23b5b8['length']-0x1,_0x56f430;_0x31e1c7>=0x0;_0x31e1c7--)(_0x56f430=_0x23b5b8[_0x31e1c7])&&(_0x4507a5=_0x56f430(_0x4507a5)||_0x4507a5);return _0x4507a5;},N=(_0x1a72f6,_0x25bf7d)=>(_0x563b78,_0x468051)=>_0x25bf7d(_0x563b78,_0x468051,_0x1a72f6);let g=class extends _0x3fd518{constructor(_0x436d57,_0x4b9b7d){const _0x57d6d3=_0x3f4afc;super(),this[_0x57d6d3(0x157)]=_0x436d57,this[_0x57d6d3(0x137)]=_0x4b9b7d,this[_0x57d6d3(0x141)]();}['_initDataSource'](){const _0x5ab8bf=_0x3f4afc;this[_0x5ab8bf(0x157)][_0x5ab8bf(0x122)]=this['_threadCommentDataSource'],this[_0x5ab8bf(0x157)][_0x5ab8bf(0x15a)]=!0x1;}};g=te([N(0x0,_0x31dd5a),N(0x1,_0x194cc9(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1ae983,_0x3f59c7,_0x45340f)=>_0x3f59c7 in _0x1ae983?se(_0x1ae983,_0x3f59c7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x45340f}):_0x1ae983[_0x3f59c7]=_0x45340f,ie=(_0x799293,_0x1ba068,_0x278065,_0x37b063)=>{const _0x41c4b2=_0x3f4afc;for(var _0x547c5c=_0x37b063>0x1?void 0x0:_0x37b063?oe(_0x1ba068,_0x278065):_0x1ba068,_0x1c653f=_0x799293[_0x41c4b2(0x115)]-0x1,_0x49d070;_0x1c653f>=0x0;_0x1c653f--)(_0x49d070=_0x799293[_0x1c653f])&&(_0x547c5c=_0x49d070(_0x547c5c)||_0x547c5c);return _0x547c5c;},w=(_0x55dbc7,_0x568707)=>(_0x582e9e,_0x3a3058)=>_0x568707(_0x582e9e,_0x3a3058,_0x55dbc7),$=(_0x955e4b,_0x44cb04,_0x416483)=>ne(_0x955e4b,typeof _0x44cb04!='symbol'?_0x44cb04+'':_0x44cb04,_0x416483);let b=class extends _0x3f2e1d{constructor(_0xb7d3c7=M,_0xf946ae,_0x416222){const _0x4649cd=_0x3f4afc;super(),this['_config']=_0xb7d3c7,this[_0x4649cd(0x165)]=_0xf946ae,this[_0x4649cd(0x13e)]=_0x416222;const {..._0x29dec7}=_0x5e9b24({},M,this[_0x4649cd(0x117)]);this['_configService']['setConfig'](z,_0x29dec7);}[_0x3f4afc(0x10b)](){const _0x385187=_0x3f4afc;[[f],[g],[S]][_0x385187(0x10c)](_0x2916b6=>{const _0x53192a=_0x385187;this[_0x53192a(0x165)]['add'](_0x2916b6);});}[_0x3f4afc(0x144)](){const _0x43a544=_0x3f4afc;this[_0x43a544(0x165)][_0x43a544(0x159)](g),this[_0x43a544(0x165)]['get'](S);}};$(b,_0x3f4afc(0x16b),W),$(b,'type',_0x183756[_0x3f4afc(0x136)]),b=ie([_0x5c3377(_0x5b39b7,_0x1e3b86,_0x2a1bc5),w(0x1,_0x194cc9(_0x3963d7)),w(0x2,_0x1131bc)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x4fc07a=_0x1189;(function(_0x209b54,_0x1134ca){const _0x4b9c1c=_0x1189,_0x12bbf1=_0x209b54();while(!![]){try{const _0x5a953d=parseInt(_0x4b9c1c(0x212))/0x1+parseInt(_0x4b9c1c(0x1c4))/0x2*(-parseInt(_0x4b9c1c(0x1dc))/0x3)+-parseInt(_0x4b9c1c(0x1f6))/0x4*(parseInt(_0x4b9c1c(0x209))/0x5)+parseInt(_0x4b9c1c(0x1c6))/0x6+parseInt(_0x4b9c1c(0x1c5))/0x7*(parseInt(_0x4b9c1c(0x225))/0x8)+-parseInt(_0x4b9c1c(0x1d6))/0x9+parseInt(_0x4b9c1c(0x201))/0xa;if(_0x5a953d===_0x1134ca)break;else _0x12bbf1['push'](_0x12bbf1['shift']());}catch(_0x4fa219){_0x12bbf1['push'](_0x12bbf1['shift']());}}}(_0xc439,0xd8637));import{CommentService as _0xb921cc,CollaborationSessionService as _0x224aa6,UniverCollaborationClientPlugin as _0x5b831f}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x315f41}from'@univerjs-pro/license';import{dayjs as _0x4eacd9,UserManagerService as _0x2ce023,Inject as _0x4cf884,Injector as _0x26e96c,Disposable as _0x23f474,CustomRangeType as _0x5dc443,UniverInstanceType as _0x488cc4,DependentOn as _0x150ca4,IConfigService as _0xacbc2d,Plugin as _0x39d258,merge as _0x31fb18}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x450825}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x10b197,IThreadCommentDataSourceService as _0x39150e}from'@univerjs/thread-comment';import{bufferTime as _0x3c64ca}from'rxjs';function _0x1189(_0xde594,_0x5ad488){const _0xc43911=_0xc439();return _0x1189=function(_0x11899e,_0x142e22){_0x11899e=_0x11899e-0x1c3;let _0x456777=_0xc43911[_0x11899e];return _0x456777;},_0x1189(_0xde594,_0x5ad488);}import{HTTPService as _0x379f9d}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5d9454=>(_0x5d9454[_0x5d9454['OpenOrReOpen']=0x0]=_0x4fc07a(0x1f0),_0x5d9454[_0x5d9454[_0x4fc07a(0x1fb)]=0x1]='Solved',_0x5d9454[_0x5d9454[_0x4fc07a(0x1d2)]=-0x1]=_0x4fc07a(0x1d2),_0x5d9454))(I||{}),v=(_0x1e668d=>(_0x1e668d[_0x1e668d[_0x4fc07a(0x1d8)]=0x0]=_0x4fc07a(0x1d8),_0x1e668d[_0x1e668d[_0x4fc07a(0x1db)]=0x1]=_0x4fc07a(0x1db),_0x1e668d[_0x1e668d['Reply']=0x2]='Reply',_0x1e668d[_0x1e668d[_0x4fc07a(0x206)]=0x3]=_0x4fc07a(0x206),_0x1e668d[_0x1e668d[_0x4fc07a(0x1cd)]=0x4]=_0x4fc07a(0x1cd),_0x1e668d[_0x1e668d['Solve']=0x5]=_0x4fc07a(0x1f8),_0x1e668d[_0x1e668d[_0x4fc07a(0x1d2)]=-0x1]=_0x4fc07a(0x1d2),_0x1e668d))(v||{});const D=_0x553415=>_0x4eacd9(new Date(+_0x553415))[_0x4fc07a(0x1d5)](_0x4fc07a(0x1e3)),B=async(_0x589fbd,_0x5c2667)=>{const _0x3c30de=_0x4fc07a,_0x1a3a45=_0x589fbd[_0x3c30de(0x215)](_0x2ce023),_0x336b6d=_0x589fbd['get'](_0x379f9d);_0x5c2667[_0x3c30de(0x204)](_0x1cef9d=>{const _0x2323a0=_0x3c30de;_0x1a3a45['getUser'](_0x1cef9d)&&_0x5c2667[_0x2323a0(0x20a)](_0x1cef9d);}),_0x5c2667['size']&&(await _0x336b6d[_0x3c30de(0x215)](_0x3c30de(0x1de),{'params':{'userIDs':[..._0x5c2667]}}))['body']['users'][_0x3c30de(0x204)](_0x510fdf=>{_0x510fdf&&_0x1a3a45['addUser'](_0x510fdf);});};var K=Object[_0x4fc07a(0x21f)],V=(_0x55c701,_0x4d4cc3,_0x36e982,_0x1945df)=>{const _0x587cc8=_0x4fc07a;for(var _0x11701e=_0x1945df>0x1?void 0x0:_0x1945df?K(_0x4d4cc3,_0x36e982):_0x4d4cc3,_0x36a78b=_0x55c701[_0x587cc8(0x20b)]-0x1,_0x10a00f;_0x36a78b>=0x0;_0x36a78b--)(_0x10a00f=_0x55c701[_0x36a78b])&&(_0x11701e=_0x10a00f(_0x11701e)||_0x11701e);return _0x11701e;},p=(_0x1e4cec,_0x3f516d)=>(_0x48fe42,_0xfbbe8c)=>_0x3f516d(_0x48fe42,_0xfbbe8c,_0x1e4cec);let S=class extends _0x23f474{constructor(_0x5303ed,_0x230b73,_0x2a5ce5,_0x38a220){const _0x26f19b=_0x4fc07a;super(),this[_0x26f19b(0x1e4)]=_0x5303ed,this[_0x26f19b(0x1cc)]=_0x230b73,this[_0x26f19b(0x224)]=_0x2a5ce5,this[_0x26f19b(0x202)]=_0x38a220,this[_0x26f19b(0x1e1)](),this['_initUserSync']();}[_0x4fc07a(0x1e7)](){const _0x3a49a6=_0x4fc07a;this[_0x3a49a6(0x210)](this['_threadCommentModel'][_0x3a49a6(0x1fe)][_0x3a49a6(0x1e6)](_0x3c64ca(0x10))[_0x3a49a6(0x1e9)](_0x19881f=>{const _0x44dbc0=_0x3a49a6,_0x2334f6=new Set();_0x19881f[_0x44dbc0(0x204)](_0x5f3679=>{const _0x495641=_0x44dbc0;switch(_0x5f3679['type']){case _0x495641(0x1ed):{const _0x237c62=_0x5f3679[_0x495641(0x1f9)][_0x495641(0x213)];_0x2334f6['add'](_0x237c62);break;}}}),B(this[_0x44dbc0(0x202)],_0x2334f6);}));}[_0x4fc07a(0x1e1)](){const _0x45213e=_0x4fc07a;this[_0x45213e(0x210)](this[_0x45213e(0x1e4)][_0x45213e(0x1fe)][_0x45213e(0x1e9)](async _0x101701=>{const _0x1f7972=_0x45213e;var _0x2b5f3f,_0x552632,_0x4ae206,_0x51dfe7;const _0x50f713=(_0x2b5f3f=this[_0x1f7972(0x1cc)][_0x1f7972(0x222)](_0x101701[_0x1f7972(0x1ff)])[_0x1f7972(0x21a)](_0x14d295=>_0x14d295['threadId']===_0x101701[_0x1f7972(0x1fa)]))==null?void 0x0:_0x2b5f3f['root'];if(!_0x50f713)return;const {unitId:_0x171ccf,subUnitId:_0x388a1e}=_0x50f713;switch(_0x101701[_0x1f7972(0x20d)]&&this['_userService'][_0x1f7972(0x21e)](_0x101701[_0x1f7972(0x20d)]),_0x101701['type']){case v[_0x1f7972(0x1db)]:break;case v[_0x1f7972(0x1ee)]:{this[_0x1f7972(0x1cc)][_0x1f7972(0x1c8)](_0x171ccf,_0x388a1e,{'unitId':_0x171ccf,'subUnitId':_0x388a1e,'ref':'','id':_0x101701['replyId'],'dT':D(+_0x101701['createTimestamp']),'threadId':_0x101701[_0x1f7972(0x1fa)],'personId':(_0x4ae206=(_0x552632=_0x101701[_0x1f7972(0x20d)])==null?void 0x0:_0x552632[_0x1f7972(0x20e)])!=null?_0x4ae206:_0x101701['userId'],'text':JSON['parse'](_0x101701[_0x1f7972(0x1d3)]),'parentId':_0x50f713['id']});break;}case v[_0x1f7972(0x1cd)]:{const _0x39f7ed=this[_0x1f7972(0x1cc)][_0x1f7972(0x1f5)](_0x171ccf,_0x388a1e,_0x101701[_0x1f7972(0x216)]);_0x39f7ed&&_0x39f7ed['parentId']&&this[_0x1f7972(0x1cc)]['deleteComment'](_0x171ccf,_0x388a1e,_0x101701['replyId']);break;}case v['Edit']:{this[_0x1f7972(0x1cc)][_0x1f7972(0x21c)](_0x171ccf,_0x388a1e,{'commentId':_0x101701['replyId'],'text':JSON[_0x1f7972(0x208)](_0x101701[_0x1f7972(0x1d3)])});break;}case v[_0x1f7972(0x1f8)]:{const _0x44537f=(_0x51dfe7=this['_threadCommentModel'][_0x1f7972(0x222)](_0x101701['unitId'])[_0x1f7972(0x21a)](_0x404c9d=>_0x404c9d[_0x1f7972(0x1fa)]===_0x101701[_0x1f7972(0x1fa)]))==null?void 0x0:_0x51dfe7[_0x1f7972(0x1f4)];_0x44537f&&this[_0x1f7972(0x1cc)][_0x1f7972(0x226)](_0x171ccf,_0x388a1e,_0x44537f['id'],_0x101701[_0x1f7972(0x20c)]===I[_0x1f7972(0x1fb)]);break;}}}));}};S=V([p(0x0,_0x4cf884(_0xb921cc)),p(0x1,_0x4cf884(_0x10b197)),p(0x2,_0x4cf884(_0x2ce023)),p(0x3,_0x4cf884(_0x26e96c))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x994a4b,_0x3c94fd,_0x5036b3,_0x14eca9)=>{const _0x4a1d1c=_0x4fc07a;for(var _0x55e8cc=_0x14eca9>0x1?void 0x0:_0x14eca9?k(_0x3c94fd,_0x5036b3):_0x3c94fd,_0x3a42e5=_0x994a4b[_0x4a1d1c(0x20b)]-0x1,_0x4d5bac;_0x3a42e5>=0x0;_0x3a42e5--)(_0x4d5bac=_0x994a4b[_0x3a42e5])&&(_0x55e8cc=_0x4d5bac(_0x55e8cc)||_0x55e8cc);return _0x55e8cc;},_=(_0x3e45d2,_0x4ebf34)=>(_0x56b47d,_0x4d14a1)=>_0x4ebf34(_0x56b47d,_0x4d14a1,_0x3e45d2);function X(_0x2d2af7,_0x46e750){const _0x1a7f7f=_0x4fc07a,_0x3e4871=_0x2d2af7[_0x1a7f7f(0x1cb)][0x0];return{..._0x46e750,'id':_0x3e4871['replyId'],'resolved':_0x2d2af7[_0x1a7f7f(0x20c)]===0x1,'dT':D(_0x3e4871[_0x1a7f7f(0x1fc)]),'personId':_0x3e4871[_0x1a7f7f(0x1e5)],'threadId':_0x3e4871[_0x1a7f7f(0x1fa)]};}function ee(_0x4bff20,_0x448587,_0x157182){const _0xabf2f7=_0x4fc07a;var _0x3d3783,_0x2db4e1;if(((_0x2db4e1=(_0x3d3783=_0x4bff20==null?void 0x0:_0x4bff20['replies'])==null?void 0x0:_0x3d3783['length'])!=null?_0x2db4e1:0x0)>0x0){const _0x14d60c=(_0x1a91a2,_0x385841)=>({'id':_0x1a91a2[_0xabf2f7(0x216)],'threadId':_0x1a91a2[_0xabf2f7(0x1fa)],'dT':D(_0x1a91a2[_0xabf2f7(0x1fc)]),'personId':_0x1a91a2['userId'],'resolved':_0x4bff20[_0xabf2f7(0x20c)]===I[_0xabf2f7(0x1fb)],'unitId':_0x448587,'subUnitId':_0x157182,'text':JSON[_0xabf2f7(0x208)](_0x1a91a2['content']),'parentId':_0x385841}),_0x17be35=_0x14d60c(_0x4bff20[_0xabf2f7(0x1cb)][0x0]);return{..._0x17be35,'children':_0x4bff20[_0xabf2f7(0x1cb)][_0xabf2f7(0x211)](0x1)[_0xabf2f7(0x1c9)](_0x412202=>_0x14d60c(_0x412202,_0x17be35['id']))};}return null;}let f=class{constructor(_0x406ad9,_0x2fd172,_0x393f7b,_0x9bac52){const _0x127fb5=_0x4fc07a;this['_httpService']=_0x406ad9,this[_0x127fb5(0x224)]=_0x2fd172,this[_0x127fb5(0x1d1)]=_0x393f7b,this[_0x127fb5(0x202)]=_0x9bac52;}async[_0x4fc07a(0x1c8)](_0x5c4e99){const _0x5380a3=_0x4fc07a;var _0x7ff3b6,_0x164b6b;const {parentId:_0x14b119,unitId:_0x3b45d5,text:_0x450e2d,threadId:_0x22f10d}=_0x5c4e99,_0x15827a=(_0x164b6b=(_0x7ff3b6=_0x450e2d[_0x5380a3(0x214)])==null?void 0x0:_0x7ff3b6['filter'](_0x377ff0=>_0x377ff0['rangeType']===_0x5dc443[_0x5380a3(0x205)])[_0x5380a3(0x1c9)](_0xc0c8ee=>_0xc0c8ee[_0x5380a3(0x1fd)]))!=null?_0x164b6b:[],_0xe27d01=JSON[_0x5380a3(0x1cf)](_0x450e2d),_0x21e4d6=(await this['_sessionService']['requireSession'](_0x3b45d5))[_0x5380a3(0x1f7)]();if(_0x14b119){const _0x1f7953={'memberId':_0x21e4d6,'unitId':_0x3b45d5,'content':_0xe27d01,'mention':_0x15827a,'threadId':_0x22f10d},_0x3f8278=(await this['_httpService']['post'](_0x5380a3(0x1d9)+_0x3b45d5+_0x5380a3(0x1ec),{'body':_0x1f7953}))['body'][_0x5380a3(0x1ca)];return{..._0x5c4e99,'id':_0x3f8278[_0x5380a3(0x216)],'dT':_0x4eacd9(+_0x3f8278[_0x5380a3(0x1fc)])[_0x5380a3(0x1d5)](_0x5380a3(0x1e3)),'personId':_0x3f8278[_0x5380a3(0x1e5)]};}else{const _0x2cd984={'memberId':_0x21e4d6,'unitId':_0x3b45d5,'content':_0xe27d01,'mention':_0x15827a},_0x1b5370=await this[_0x5380a3(0x21d)][_0x5380a3(0x1d7)](_0x5380a3(0x1d9)+_0x3b45d5+_0x5380a3(0x220),{'body':_0x2cd984});return X(_0x1b5370[_0x5380a3(0x1da)][_0x5380a3(0x203)],_0x5c4e99);}}async[_0x4fc07a(0x21c)](_0x16502d){const _0x250b13=_0x4fc07a;var _0x4a3a3d,_0x969a50;const {text:_0x396f0a,unitId:_0x339483}=_0x16502d,_0x537163=(_0x969a50=(_0x4a3a3d=_0x396f0a['customRanges'])==null?void 0x0:_0x4a3a3d[_0x250b13(0x227)](_0x4c5ab1=>_0x4c5ab1[_0x250b13(0x1d0)]===_0x5dc443[_0x250b13(0x205)])[_0x250b13(0x1c9)](_0x7e6974=>_0x7e6974[_0x250b13(0x1fd)]))!=null?_0x969a50:[],_0x3fb6ac=JSON[_0x250b13(0x1cf)](_0x396f0a),_0x58447a=_0x16502d[_0x250b13(0x1fa)],_0x2fa0e3=_0x16502d['id'],_0xcece2f={'memberId':(await this[_0x250b13(0x1d1)][_0x250b13(0x1f1)](_0x339483))['getMemberID'](),'unitId':_0x339483,'threadId':_0x58447a,'mention':_0x537163,'content':_0x3fb6ac,'replyId':_0x2fa0e3},_0x4095b8=await this[_0x250b13(0x21d)][_0x250b13(0x1d7)](_0x250b13(0x1d9)+_0x339483+_0x250b13(0x1f3),{'body':_0xcece2f});return!_0x4095b8[_0x250b13(0x1da)][_0x250b13(0x1ef)]||_0x4095b8[_0x250b13(0x1da)]['error']['code']===0x1;}async[_0x4fc07a(0x226)](_0xd0ffac){const _0x30da8b=_0x4fc07a,{unitId:_0x5ab263}=_0xd0ffac,_0x54b371=_0xd0ffac['threadId'],_0x574c28={'memberId':this[_0x30da8b(0x224)]['getCurrentUser']()[_0x30da8b(0x20e)],'unitId':_0x5ab263,'threadId':_0x54b371,'solved':_0xd0ffac['resolved']?I['Solved']:I['OpenOrReOpen']},_0x1a011b=await this['_httpService'][_0x30da8b(0x1d7)]('/universer-api/comment/unit/'+_0x5ab263+_0x30da8b(0x1c3),{'body':_0x574c28});return!_0x1a011b[_0x30da8b(0x1da)][_0x30da8b(0x1ef)]||_0x1a011b['body'][_0x30da8b(0x1ef)]['code']===0x1;}async[_0x4fc07a(0x1ce)](_0x59aff0,_0x41fcf5,_0x3ac379,_0x5aa014){const _0x4b99da=_0x4fc07a,_0xa39cb5={'memberId':(await this[_0x4b99da(0x1d1)]['requireSession'](_0x59aff0))[_0x4b99da(0x1f7)](),'threadId':_0x3ac379,'replyId':_0x5aa014,'unitId':_0x59aff0},_0x118609=await this['_httpService']['post'](_0x4b99da(0x1d9)+_0x59aff0+_0x4b99da(0x1ea),{'body':_0xa39cb5});return!_0x118609[_0x4b99da(0x1da)][_0x4b99da(0x1ef)]||_0x118609[_0x4b99da(0x1da)][_0x4b99da(0x1ef)][_0x4b99da(0x219)]===0x1;}async[_0x4fc07a(0x1e0)](_0x1aea5b,_0xf9b3c1,_0x2f3604){const _0x12fe03=_0x4fc07a,_0x2cda92={'unitId':_0x1aea5b,'threadId':_0x2f3604},_0x33061=await this[_0x12fe03(0x21d)][_0x12fe03(0x1d7)](_0x12fe03(0x1d9)+_0x1aea5b+_0x12fe03(0x207),{'body':_0x2cda92}),_0x2b660b=_0x2f3604[_0x12fe03(0x1c9)](_0x26c4de=>ee(_0x33061[_0x12fe03(0x1da)]['comments'][_0x26c4de],_0x1aea5b,_0xf9b3c1))[_0x12fe03(0x227)](Boolean);return Object[_0x12fe03(0x221)](_0x33061[_0x12fe03(0x1da)][_0x12fe03(0x223)])['forEach'](_0x50d332=>{const _0x1857f4=_0x12fe03;this[_0x1857f4(0x224)][_0x1857f4(0x21e)](_0x50d332);}),_0x2b660b;}[_0x4fc07a(0x1d4)](_0x24a84b){const _0x24d961=_0x4fc07a;return{'id':_0x24a84b['id'],'threadId':_0x24a84b['threadId'],'ref':_0x24a84b[_0x24d961(0x217)]};}};function _0xc439(){const _0x26833b=['root','getComment','3431964mwnJTN','getMemberID','Solve','payload','threadId','Solved','createTimestamp','rangeId','commentUpdate$','unitId','dataSource','7152210KoJQsM','_injector','comment','forEach','COMMENT','Edit','/list','parse','10xWPJCf','delete','length','solved','user','userID','onReady','disposeWithMe','slice','766407KqHRqU','personId','customRanges','get','replyId','ref','type','code','find','syncUpdateMutationToColla','updateComment','_httpService','addUser','getOwnPropertyDescriptor','/add','values','getUnit','users','_userService','16KpvXWu','resolveComment','filter','/solved','2LMyGXt','4971729bmueSL','5898606WdZwxr','_configService','addComment','map','reply','replies','_threadCommentModel','Delete','deleteComment','stringify','rangeType','_sessionService','UNRECOGNIZED','content','saveCommentToSnapshot','format','8646687lpuTzP','post','Unknown','/universer-api/comment/unit/','body','Add','966513jNBvjW','_config','/universer-api/user/list','onStarting','listComments','_init','_threadCommentDataSource','YYYY/MM/DD\x20HH:mm','_commentService','userId','pipe','_initUserSync','_threadCommentDataSourceService','subscribe','/delete','pluginName','/reply','add','Reply','error','OpenOrReOpen','requireSession','_initDataSource','/edit'];_0xc439=function(){return _0x26833b;};return _0xc439();}f=Q([_(0x0,_0x4cf884(_0x379f9d)),_(0x1,_0x4cf884(_0x2ce023)),_(0x2,_0x4cf884(_0x224aa6)),_(0x3,_0x4cf884(_0x26e96c))],f);var re=Object[_0x4fc07a(0x21f)],te=(_0x3f51ca,_0x7821aa,_0x2a0d04,_0x22aa65)=>{const _0x5d5a65=_0x4fc07a;for(var _0x1e2329=_0x22aa65>0x1?void 0x0:_0x22aa65?re(_0x7821aa,_0x2a0d04):_0x7821aa,_0x2beafd=_0x3f51ca[_0x5d5a65(0x20b)]-0x1,_0x57b048;_0x2beafd>=0x0;_0x2beafd--)(_0x57b048=_0x3f51ca[_0x2beafd])&&(_0x1e2329=_0x57b048(_0x1e2329)||_0x1e2329);return _0x1e2329;},N=(_0x193117,_0x12b103)=>(_0x505ac9,_0x530520)=>_0x12b103(_0x505ac9,_0x530520,_0x193117);let g=class extends _0x23f474{constructor(_0x19ebfc,_0x2a811e){const _0x237078=_0x4fc07a;super(),this[_0x237078(0x1e8)]=_0x19ebfc,this[_0x237078(0x1e2)]=_0x2a811e,this['_initDataSource']();}[_0x4fc07a(0x1f2)](){const _0x2467b1=_0x4fc07a;this[_0x2467b1(0x1e8)][_0x2467b1(0x200)]=this[_0x2467b1(0x1e2)],this[_0x2467b1(0x1e8)][_0x2467b1(0x21b)]=!0x1;}};g=te([N(0x0,_0x39150e),N(0x1,_0x4cf884(f))],g);var se=Object['defineProperty'],oe=Object[_0x4fc07a(0x21f)],ne=(_0x4c573e,_0x4d52c5,_0x5fa7d6)=>_0x4d52c5 in _0x4c573e?se(_0x4c573e,_0x4d52c5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5fa7d6}):_0x4c573e[_0x4d52c5]=_0x5fa7d6,ie=(_0x3847b0,_0x4eeab4,_0x56ec10,_0x1302b5)=>{const _0x128900=_0x4fc07a;for(var _0x5c440e=_0x1302b5>0x1?void 0x0:_0x1302b5?oe(_0x4eeab4,_0x56ec10):_0x4eeab4,_0x1bff30=_0x3847b0[_0x128900(0x20b)]-0x1,_0x364a92;_0x1bff30>=0x0;_0x1bff30--)(_0x364a92=_0x3847b0[_0x1bff30])&&(_0x5c440e=_0x364a92(_0x5c440e)||_0x5c440e);return _0x5c440e;},w=(_0x4321ee,_0x164968)=>(_0x27d372,_0x53c3e6)=>_0x164968(_0x27d372,_0x53c3e6,_0x4321ee),$=(_0x479674,_0x54b72d,_0x5ef64c)=>ne(_0x479674,typeof _0x54b72d!='symbol'?_0x54b72d+'':_0x54b72d,_0x5ef64c);let b=class extends _0x39d258{constructor(_0x51967c=M,_0x3f0e21,_0x3fbc82){const _0x568b97=_0x4fc07a;super(),this[_0x568b97(0x1dd)]=_0x51967c,this[_0x568b97(0x202)]=_0x3f0e21,this['_configService']=_0x3fbc82;const {..._0x192352}=_0x31fb18({},M,this[_0x568b97(0x1dd)]);this[_0x568b97(0x1c7)]['setConfig'](z,_0x192352);}[_0x4fc07a(0x1df)](){[[f],[g],[S]]['forEach'](_0x35d4b5=>{const _0x57d7bc=_0x1189;this['_injector'][_0x57d7bc(0x1ed)](_0x35d4b5);});}[_0x4fc07a(0x20f)](){const _0x3769da=_0x4fc07a;this[_0x3769da(0x202)][_0x3769da(0x215)](g),this[_0x3769da(0x202)][_0x3769da(0x215)](S);}};$(b,_0x4fc07a(0x1eb),W),$(b,_0x4fc07a(0x218),_0x488cc4['UNIVER_UNKNOWN']),b=ie([_0x150ca4(_0x450825,_0x5b831f,_0x315f41),w(0x1,_0x4cf884(_0x26e96c)),w(0x2,_0xacbc2d)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x5343(){const _0x3b6b50=['format','144CZNrtp','addUser','rangeId','YYYY/MM/DD\x20HH:mm','Plugin','UniverThreadCommentUi','subscribe','listComments','unitId','find','/solved','getUnit','toStringTag','delete','_injector','getMemberID','forEach','payload','HTTPService','getUser','onStarting','disposeWithMe','/delete','Edit','reply','/add','Inject','OpenOrReOpen','@univerjs/thread-comment-ui','comment','UniverThreadCommentDataSourcePlugin','content','UniverProCollaborationClient','amd','_initUserSync','replies','length','_configService','ThreadCommentModel','onReady','/universer-api/user/list','_sessionService','bufferTime','syncUpdateMutationToColla','@univerjs/core','createTimestamp','values','_threadCommentModel','3817bcWXYA','6332778XkWHbE','post','_initDataSource','UNRECOGNIZED','_threadCommentDataSource','3640287nQveBS','replyId','pluginName','updateComment','UserManagerService','162BgoSMm','Module','thread-comment-data-source.config','body','parentId','dataSource','12722iFsCpO','COMMENT','93wdrOAp','personId','add','userID','user','UniverThreadCommentUIPlugin','3358855FtTkYL','UniverLicensePlugin','IConfigService','UniverThreadComment','UniverCollaborationClientPlugin','35148uBYqvV','threadId','getOwnPropertyDescriptor','_userService','addComment','@univerjs-pro/collaboration-client','_httpService','/list','Disposable','30489oysZSG','defineProperty','Delete','CommentService','code','_threadCommentDataSourceService','commentUpdate$','125770zNszgo','stringify','_commentService','UniverProThreadCommentDatasource','@univerjs/thread-comment','symbol','userId','UniverProLicense','resolved','map','error','setConfig','rangeType','Reply','Solve','UniverNetwork','requireSession','_config','get','UniverCore','UniverInstanceType','_init','solved','merge','rxjs','deleteComment','Unknown','root','filter','Injector','Add','/edit','UNIVER_UNKNOWN','8rutlUl','type','parse','@univerjs-pro/license','@univerjs/network','object','Solved','IThreadCommentDataSourceService','users','dayjs','CustomRangeType','/universer-api/comment/unit/'];_0x5343=function(){return _0x3b6b50;};return _0x5343();}function _0x311e(_0x21c42f,_0xc8ff4a){const _0x53434e=_0x5343();return _0x311e=function(_0x311ef5,_0x2d3c97){_0x311ef5=_0x311ef5-0x135;let _0x77e1a2=_0x53434e[_0x311ef5];return _0x77e1a2;},_0x311e(_0x21c42f,_0xc8ff4a);}(function(_0x1fb94c,_0x5280a1){const _0x147c1f=_0x311e,_0x2276b2=_0x1fb94c();while(!![]){try{const _0x529a88=-parseInt(_0x147c1f(0x197))/0x1*(parseInt(_0x147c1f(0x195))/0x2)+parseInt(_0x147c1f(0x1ab))/0x3*(-parseInt(_0x147c1f(0x154))/0x4)+-parseInt(_0x147c1f(0x19d))/0x5+parseInt(_0x147c1f(0x185))/0x6+-parseInt(_0x147c1f(0x18a))/0x7*(-parseInt(_0x147c1f(0x147))/0x8)+-parseInt(_0x147c1f(0x18f))/0x9*(parseInt(_0x147c1f(0x1b2))/0xa)+parseInt(_0x147c1f(0x184))/0xb*(parseInt(_0x147c1f(0x1a2))/0xc);if(_0x529a88===_0x5280a1)break;else _0x2276b2['push'](_0x2276b2['shift']());}catch(_0xbe9eb3){_0x2276b2['push'](_0x2276b2['shift']());}}}(_0x5343,0xb3c0d),function(_0x316fc4,_0x4b06a9){const _0x151848=_0x311e;typeof exports==_0x151848(0x14c)&&typeof module<'u'?_0x4b06a9(exports,require(_0x151848(0x1a7)),require(_0x151848(0x14a)),require(_0x151848(0x180)),require(_0x151848(0x170)),require(_0x151848(0x1b6)),require(_0x151848(0x13e)),require(_0x151848(0x14b))):typeof define=='function'&&define[_0x151848(0x175)]?define(['exports',_0x151848(0x1a7),'@univerjs-pro/license',_0x151848(0x180),_0x151848(0x170),'@univerjs/thread-comment',_0x151848(0x13e),_0x151848(0x14b)],_0x4b06a9):(_0x316fc4=typeof globalThis<'u'?globalThis:_0x316fc4||self,_0x4b06a9(_0x316fc4[_0x151848(0x1b5)]={},_0x316fc4[_0x151848(0x174)],_0x316fc4[_0x151848(0x1b9)],_0x316fc4[_0x151848(0x139)],_0x316fc4[_0x151848(0x159)],_0x316fc4[_0x151848(0x1a0)],_0x316fc4[_0x151848(0x13e)],_0x316fc4[_0x151848(0x135)]));}(this,function(_0x295029,_0x3f1c4b,_0x4bff4b,_0x3843da,_0x444b73,_0xa60461,_0x338626,_0x534678){'use strict';const _0x1adf94=_0x311e;const _0x4c6787='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x1e374e=(_0x578dd6=>(_0x578dd6[_0x578dd6[_0x1adf94(0x16f)]=0x0]='OpenOrReOpen',_0x578dd6[_0x578dd6[_0x1adf94(0x14d)]=0x1]=_0x1adf94(0x14d),_0x578dd6[_0x578dd6[_0x1adf94(0x188)]=-0x1]='UNRECOGNIZED',_0x578dd6))(_0x1e374e||{}),_0x3b76b7=(_0xabb789=>(_0xabb789[_0xabb789[_0x1adf94(0x140)]=0x0]=_0x1adf94(0x140),_0xabb789[_0xabb789[_0x1adf94(0x144)]=0x1]=_0x1adf94(0x144),_0xabb789[_0xabb789[_0x1adf94(0x1bf)]=0x2]=_0x1adf94(0x1bf),_0xabb789[_0xabb789['Edit']=0x3]=_0x1adf94(0x16b),_0xabb789[_0xabb789[_0x1adf94(0x1ad)]=0x4]='Delete',_0xabb789[_0xabb789[_0x1adf94(0x1c0)]=0x5]=_0x1adf94(0x1c0),_0xabb789[_0xabb789['UNRECOGNIZED']=-0x1]=_0x1adf94(0x188),_0xabb789))(_0x3b76b7||{});const _0x56e482=_0x452e64=>_0x3843da['dayjs'](new Date(+_0x452e64))[_0x1adf94(0x153)](_0x1adf94(0x157)),_0x4518fa=async(_0x3d367b,_0x1d4526)=>{const _0x2ad538=_0x1adf94,_0x3213c1=_0x3d367b[_0x2ad538(0x138)](_0x3843da[_0x2ad538(0x18e)]),_0x25d863=_0x3d367b[_0x2ad538(0x138)](_0x534678[_0x2ad538(0x166)]);_0x1d4526[_0x2ad538(0x164)](_0x5524cb=>{const _0x237b95=_0x2ad538;_0x3213c1[_0x237b95(0x167)](_0x5524cb)&&_0x1d4526[_0x237b95(0x161)](_0x5524cb);}),_0x1d4526['size']&&(await _0x25d863[_0x2ad538(0x138)](_0x2ad538(0x17c),{'params':{'userIDs':[..._0x1d4526]}}))[_0x2ad538(0x192)]['users'][_0x2ad538(0x164)](_0x64b96f=>{const _0x1ba3ce=_0x2ad538;_0x64b96f&&_0x3213c1[_0x1ba3ce(0x155)](_0x64b96f);});};var _0x205168=Object[_0x1adf94(0x1a4)],_0x45b173=(_0x823e26,_0x341566,_0x19f602,_0x25db61)=>{const _0x25f666=_0x1adf94;for(var _0xe31b88=_0x25db61>0x1?void 0x0:_0x25db61?_0x205168(_0x341566,_0x19f602):_0x341566,_0x1eed29=_0x823e26[_0x25f666(0x178)]-0x1,_0x1874d4;_0x1eed29>=0x0;_0x1eed29--)(_0x1874d4=_0x823e26[_0x1eed29])&&(_0xe31b88=_0x1874d4(_0xe31b88)||_0xe31b88);return _0xe31b88;},_0x54e706=(_0x5cde80,_0x144d1b)=>(_0x28861b,_0x3ad0e1)=>_0x144d1b(_0x28861b,_0x3ad0e1,_0x5cde80);let _0x4ba89d=class extends _0x3843da['Disposable']{constructor(_0x10d6d8,_0x220393,_0x15df9d,_0x511212){const _0x591a7b=_0x1adf94;super(),this[_0x591a7b(0x1b4)]=_0x10d6d8,this['_threadCommentModel']=_0x220393,this['_userService']=_0x15df9d,this['_injector']=_0x511212,this[_0x591a7b(0x13b)](),this[_0x591a7b(0x176)]();}['_initUserSync'](){const _0x150271=_0x1adf94;this[_0x150271(0x169)](this[_0x150271(0x183)][_0x150271(0x1b1)]['pipe'](_0x338626[_0x150271(0x17e)](0x10))[_0x150271(0x15a)](_0x19e64d=>{const _0x15efb8=_0x150271,_0x50945b=new Set();_0x19e64d[_0x15efb8(0x164)](_0x1f58b2=>{const _0xa9d9fe=_0x15efb8;switch(_0x1f58b2[_0xa9d9fe(0x148)]){case _0xa9d9fe(0x199):{const _0x5e8646=_0x1f58b2[_0xa9d9fe(0x165)][_0xa9d9fe(0x198)];_0x50945b[_0xa9d9fe(0x199)](_0x5e8646);break;}}}),_0x4518fa(this[_0x15efb8(0x162)],_0x50945b);}));}[_0x1adf94(0x13b)](){const _0x5a6b75=_0x1adf94;this[_0x5a6b75(0x169)](this['_commentService'][_0x5a6b75(0x1b1)][_0x5a6b75(0x15a)](async _0x260ec2=>{const _0x3e36ec=_0x5a6b75;var _0x12c571,_0x192ca4,_0x5af7c7,_0x31ed58;const _0x2de0d8=(_0x12c571=this[_0x3e36ec(0x183)][_0x3e36ec(0x15f)](_0x260ec2[_0x3e36ec(0x15c)])[_0x3e36ec(0x15d)](_0x44a46c=>_0x44a46c[_0x3e36ec(0x1a3)]===_0x260ec2[_0x3e36ec(0x1a3)]))==null?void 0x0:_0x12c571[_0x3e36ec(0x141)];if(!_0x2de0d8)return;const {unitId:_0x1b41ee,subUnitId:_0x129e15}=_0x2de0d8;switch(_0x260ec2['user']&&this[_0x3e36ec(0x1a5)][_0x3e36ec(0x155)](_0x260ec2[_0x3e36ec(0x19b)]),_0x260ec2['type']){case _0x3b76b7['Add']:break;case _0x3b76b7[_0x3e36ec(0x1bf)]:{this[_0x3e36ec(0x183)][_0x3e36ec(0x1a6)](_0x1b41ee,_0x129e15,{'unitId':_0x1b41ee,'subUnitId':_0x129e15,'ref':'','id':_0x260ec2[_0x3e36ec(0x18b)],'dT':_0x56e482(+_0x260ec2['createTimestamp']),'threadId':_0x260ec2[_0x3e36ec(0x1a3)],'personId':(_0x5af7c7=(_0x192ca4=_0x260ec2['user'])==null?void 0x0:_0x192ca4[_0x3e36ec(0x19a)])!=null?_0x5af7c7:_0x260ec2['userId'],'text':JSON[_0x3e36ec(0x149)](_0x260ec2[_0x3e36ec(0x173)]),'parentId':_0x2de0d8['id']});break;}case _0x3b76b7[_0x3e36ec(0x1ad)]:{const _0x15ac07=this[_0x3e36ec(0x183)]['getComment'](_0x1b41ee,_0x129e15,_0x260ec2[_0x3e36ec(0x18b)]);_0x15ac07&&_0x15ac07[_0x3e36ec(0x193)]&&this[_0x3e36ec(0x183)][_0x3e36ec(0x13f)](_0x1b41ee,_0x129e15,_0x260ec2[_0x3e36ec(0x18b)]);break;}case _0x3b76b7[_0x3e36ec(0x16b)]:{this[_0x3e36ec(0x183)][_0x3e36ec(0x18d)](_0x1b41ee,_0x129e15,{'commentId':_0x260ec2[_0x3e36ec(0x18b)],'text':JSON[_0x3e36ec(0x149)](_0x260ec2[_0x3e36ec(0x173)])});break;}case _0x3b76b7[_0x3e36ec(0x1c0)]:{const _0xdeb640=(_0x31ed58=this['_threadCommentModel'][_0x3e36ec(0x15f)](_0x260ec2[_0x3e36ec(0x15c)])[_0x3e36ec(0x15d)](_0x5f557f=>_0x5f557f[_0x3e36ec(0x1a3)]===_0x260ec2[_0x3e36ec(0x1a3)]))==null?void 0x0:_0x31ed58['root'];_0xdeb640&&this[_0x3e36ec(0x183)]['resolveComment'](_0x1b41ee,_0x129e15,_0xdeb640['id'],_0x260ec2[_0x3e36ec(0x13c)]===_0x1e374e['Solved']);break;}}}));}};_0x4ba89d=_0x45b173([_0x54e706(0x0,_0x3843da['Inject'](_0x3f1c4b[_0x1adf94(0x1ae)])),_0x54e706(0x1,_0x3843da[_0x1adf94(0x16e)](_0xa60461[_0x1adf94(0x17a)])),_0x54e706(0x2,_0x3843da[_0x1adf94(0x16e)](_0x3843da[_0x1adf94(0x18e)])),_0x54e706(0x3,_0x3843da[_0x1adf94(0x16e)](_0x3843da[_0x1adf94(0x143)]))],_0x4ba89d);const _0x2a5f42=_0x1adf94(0x191),_0x118b30={};var _0xd87e2f=Object[_0x1adf94(0x1a4)],_0x5dfe33=(_0x5bea36,_0x4496a7,_0x1e1490,_0x34fc56)=>{const _0x11147f=_0x1adf94;for(var _0x414297=_0x34fc56>0x1?void 0x0:_0x34fc56?_0xd87e2f(_0x4496a7,_0x1e1490):_0x4496a7,_0x3f7ccb=_0x5bea36[_0x11147f(0x178)]-0x1,_0x5b7834;_0x3f7ccb>=0x0;_0x3f7ccb--)(_0x5b7834=_0x5bea36[_0x3f7ccb])&&(_0x414297=_0x5b7834(_0x414297)||_0x414297);return _0x414297;},_0x59cd97=(_0x542352,_0x18e120)=>(_0x5c2889,_0x484fed)=>_0x18e120(_0x5c2889,_0x484fed,_0x542352);function _0x4a6c48(_0x39826f,_0x19dfdb){const _0x199d9d=_0x1adf94,_0x3eba59=_0x39826f['replies'][0x0];return{..._0x19dfdb,'id':_0x3eba59[_0x199d9d(0x18b)],'resolved':_0x39826f[_0x199d9d(0x13c)]===0x1,'dT':_0x56e482(_0x3eba59[_0x199d9d(0x181)]),'personId':_0x3eba59[_0x199d9d(0x1b8)],'threadId':_0x3eba59[_0x199d9d(0x1a3)]};}function _0x8c25d5(_0xf617bb,_0x20d505,_0x2941a4){const _0xf71888=_0x1adf94;var _0x19b888,_0x26eb09;if(((_0x26eb09=(_0x19b888=_0xf617bb==null?void 0x0:_0xf617bb[_0xf71888(0x177)])==null?void 0x0:_0x19b888[_0xf71888(0x178)])!=null?_0x26eb09:0x0)>0x0){const _0x2e4417=(_0x4d7d62,_0x3a3615)=>({'id':_0x4d7d62[_0xf71888(0x18b)],'threadId':_0x4d7d62[_0xf71888(0x1a3)],'dT':_0x56e482(_0x4d7d62[_0xf71888(0x181)]),'personId':_0x4d7d62['userId'],'resolved':_0xf617bb['solved']===_0x1e374e['Solved'],'unitId':_0x20d505,'subUnitId':_0x2941a4,'text':JSON[_0xf71888(0x149)](_0x4d7d62[_0xf71888(0x173)]),'parentId':_0x3a3615}),_0x29cc96=_0x2e4417(_0xf617bb['replies'][0x0]);return{..._0x29cc96,'children':_0xf617bb[_0xf71888(0x177)]['slice'](0x1)[_0xf71888(0x1bb)](_0x3ca61f=>_0x2e4417(_0x3ca61f,_0x29cc96['id']))};}return null;}let _0x3e5a96=class{constructor(_0x4c57bc,_0x559e27,_0x402042,_0x4400ee){const _0x76402a=_0x1adf94;this['_httpService']=_0x4c57bc,this[_0x76402a(0x1a5)]=_0x559e27,this['_sessionService']=_0x402042,this[_0x76402a(0x162)]=_0x4400ee;}async[_0x1adf94(0x1a6)](_0x30de3a){const _0x275659=_0x1adf94;var _0x13d9fb,_0x2be6bc;const {parentId:_0x14e50a,unitId:_0xc2e0de,text:_0x23554a,threadId:_0x228959}=_0x30de3a,_0x2478ac=(_0x2be6bc=(_0x13d9fb=_0x23554a['customRanges'])==null?void 0x0:_0x13d9fb[_0x275659(0x142)](_0x3ec32c=>_0x3ec32c[_0x275659(0x1be)]===_0x3843da[_0x275659(0x151)][_0x275659(0x196)])[_0x275659(0x1bb)](_0x4c7f1c=>_0x4c7f1c[_0x275659(0x156)]))!=null?_0x2be6bc:[],_0xdf338a=JSON[_0x275659(0x1b3)](_0x23554a),_0x10641d=(await this['_sessionService'][_0x275659(0x136)](_0xc2e0de))[_0x275659(0x163)]();if(_0x14e50a){const _0x43241e={'memberId':_0x10641d,'unitId':_0xc2e0de,'content':_0xdf338a,'mention':_0x2478ac,'threadId':_0x228959},_0x1101a9=(await this[_0x275659(0x1a8)][_0x275659(0x186)](_0x275659(0x152)+_0xc2e0de+'/reply',{'body':_0x43241e}))[_0x275659(0x192)][_0x275659(0x16c)];return{..._0x30de3a,'id':_0x1101a9['replyId'],'dT':_0x3843da[_0x275659(0x150)](+_0x1101a9[_0x275659(0x181)])[_0x275659(0x153)](_0x275659(0x157)),'personId':_0x1101a9['userId']};}else{const _0x538ab8={'memberId':_0x10641d,'unitId':_0xc2e0de,'content':_0xdf338a,'mention':_0x2478ac},_0xc663ff=await this[_0x275659(0x1a8)][_0x275659(0x186)](_0x275659(0x152)+_0xc2e0de+_0x275659(0x16d),{'body':_0x538ab8});return _0x4a6c48(_0xc663ff[_0x275659(0x192)][_0x275659(0x171)],_0x30de3a);}}async['updateComment'](_0xd859d2){const _0x24ba20=_0x1adf94;var _0x58c75f,_0x52c5df;const {text:_0x124b3f,unitId:_0x39dd0e}=_0xd859d2,_0x1ae344=(_0x52c5df=(_0x58c75f=_0x124b3f['customRanges'])==null?void 0x0:_0x58c75f[_0x24ba20(0x142)](_0x5a0d86=>_0x5a0d86[_0x24ba20(0x1be)]===_0x3843da[_0x24ba20(0x151)]['COMMENT'])[_0x24ba20(0x1bb)](_0x371064=>_0x371064[_0x24ba20(0x156)]))!=null?_0x52c5df:[],_0x5cb75b=JSON[_0x24ba20(0x1b3)](_0x124b3f),_0x10e8c7=_0xd859d2[_0x24ba20(0x1a3)],_0x2e95cf=_0xd859d2['id'],_0xe56d93={'memberId':(await this[_0x24ba20(0x17d)][_0x24ba20(0x136)](_0x39dd0e))[_0x24ba20(0x163)](),'unitId':_0x39dd0e,'threadId':_0x10e8c7,'mention':_0x1ae344,'content':_0x5cb75b,'replyId':_0x2e95cf},_0x486069=await this[_0x24ba20(0x1a8)]['post']('/universer-api/comment/unit/'+_0x39dd0e+_0x24ba20(0x145),{'body':_0xe56d93});return!_0x486069[_0x24ba20(0x192)][_0x24ba20(0x1bc)]||_0x486069['body'][_0x24ba20(0x1bc)][_0x24ba20(0x1af)]===0x1;}async['resolveComment'](_0x292338){const _0x5defa4=_0x1adf94,{unitId:_0x145c13}=_0x292338,_0x4f98bb=_0x292338['threadId'],_0x589378={'memberId':this[_0x5defa4(0x1a5)]['getCurrentUser']()['userID'],'unitId':_0x145c13,'threadId':_0x4f98bb,'solved':_0x292338[_0x5defa4(0x1ba)]?_0x1e374e[_0x5defa4(0x14d)]:_0x1e374e['OpenOrReOpen']},_0x7a42bd=await this[_0x5defa4(0x1a8)][_0x5defa4(0x186)](_0x5defa4(0x152)+_0x145c13+_0x5defa4(0x15e),{'body':_0x589378});return!_0x7a42bd[_0x5defa4(0x192)]['error']||_0x7a42bd[_0x5defa4(0x192)]['error'][_0x5defa4(0x1af)]===0x1;}async[_0x1adf94(0x13f)](_0x3e94c8,_0x4d96a1,_0x541538,_0x2d5256){const _0x44c8ee=_0x1adf94,_0xb643fd={'memberId':(await this['_sessionService']['requireSession'](_0x3e94c8))['getMemberID'](),'threadId':_0x541538,'replyId':_0x2d5256,'unitId':_0x3e94c8},_0xf7c776=await this[_0x44c8ee(0x1a8)][_0x44c8ee(0x186)](_0x44c8ee(0x152)+_0x3e94c8+_0x44c8ee(0x16a),{'body':_0xb643fd});return!_0xf7c776[_0x44c8ee(0x192)][_0x44c8ee(0x1bc)]||_0xf7c776[_0x44c8ee(0x192)]['error'][_0x44c8ee(0x1af)]===0x1;}async[_0x1adf94(0x15b)](_0x2af14b,_0x5cdccd,_0x13cec4){const _0x4196e8=_0x1adf94,_0x35c188={'unitId':_0x2af14b,'threadId':_0x13cec4},_0x2fc9ad=await this[_0x4196e8(0x1a8)]['post'](_0x4196e8(0x152)+_0x2af14b+_0x4196e8(0x1a9),{'body':_0x35c188}),_0x4d0113=_0x13cec4[_0x4196e8(0x1bb)](_0x14956c=>_0x8c25d5(_0x2fc9ad[_0x4196e8(0x192)]['comments'][_0x14956c],_0x2af14b,_0x5cdccd))[_0x4196e8(0x142)](Boolean);return Object[_0x4196e8(0x182)](_0x2fc9ad['body'][_0x4196e8(0x14f)])[_0x4196e8(0x164)](_0x5b7214=>{const _0x509f0b=_0x4196e8;this['_userService'][_0x509f0b(0x155)](_0x5b7214);}),_0x4d0113;}['saveCommentToSnapshot'](_0x2d01d1){return{'id':_0x2d01d1['id'],'threadId':_0x2d01d1['threadId'],'ref':_0x2d01d1['ref']};}};_0x3e5a96=_0x5dfe33([_0x59cd97(0x0,_0x3843da[_0x1adf94(0x16e)](_0x534678[_0x1adf94(0x166)])),_0x59cd97(0x1,_0x3843da[_0x1adf94(0x16e)](_0x3843da[_0x1adf94(0x18e)])),_0x59cd97(0x2,_0x3843da[_0x1adf94(0x16e)](_0x3f1c4b['CollaborationSessionService'])),_0x59cd97(0x3,_0x3843da[_0x1adf94(0x16e)](_0x3843da[_0x1adf94(0x143)]))],_0x3e5a96);var _0x59146a=Object['getOwnPropertyDescriptor'],_0xe9b424=(_0x3e115a,_0x1c0cdc,_0x237f32,_0xd5b929)=>{const _0x29e27d=_0x1adf94;for(var _0x4a1da4=_0xd5b929>0x1?void 0x0:_0xd5b929?_0x59146a(_0x1c0cdc,_0x237f32):_0x1c0cdc,_0x2d8f0d=_0x3e115a[_0x29e27d(0x178)]-0x1,_0x29769b;_0x2d8f0d>=0x0;_0x2d8f0d--)(_0x29769b=_0x3e115a[_0x2d8f0d])&&(_0x4a1da4=_0x29769b(_0x4a1da4)||_0x4a1da4);return _0x4a1da4;},_0x1365e4=(_0x183998,_0x32a7c7)=>(_0x4a8e14,_0x2f3c89)=>_0x32a7c7(_0x4a8e14,_0x2f3c89,_0x183998);let _0x42986f=class extends _0x3843da[_0x1adf94(0x1aa)]{constructor(_0x234c05,_0x53a8e9){const _0x39e61b=_0x1adf94;super(),this[_0x39e61b(0x1b0)]=_0x234c05,this[_0x39e61b(0x189)]=_0x53a8e9,this[_0x39e61b(0x187)]();}[_0x1adf94(0x187)](){const _0x8f7212=_0x1adf94;this[_0x8f7212(0x1b0)][_0x8f7212(0x194)]=this[_0x8f7212(0x189)],this['_threadCommentDataSourceService'][_0x8f7212(0x17f)]=!0x1;}};_0x42986f=_0xe9b424([_0x1365e4(0x0,_0xa60461[_0x1adf94(0x14e)]),_0x1365e4(0x1,_0x3843da[_0x1adf94(0x16e)](_0x3e5a96))],_0x42986f);var _0x4fc720=Object[_0x1adf94(0x1ac)],_0x497a62=Object[_0x1adf94(0x1a4)],_0x53bbcf=(_0x1fc384,_0x5a9cf0,_0xb354ad)=>_0x5a9cf0 in _0x1fc384?_0x4fc720(_0x1fc384,_0x5a9cf0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb354ad}):_0x1fc384[_0x5a9cf0]=_0xb354ad,_0x306448=(_0x4f2d38,_0x4709de,_0x126efc,_0x20cff7)=>{for(var _0xce1e4f=_0x20cff7>0x1?void 0x0:_0x20cff7?_0x497a62(_0x4709de,_0x126efc):_0x4709de,_0x18d833=_0x4f2d38['length']-0x1,_0x45b08a;_0x18d833>=0x0;_0x18d833--)(_0x45b08a=_0x4f2d38[_0x18d833])&&(_0xce1e4f=_0x45b08a(_0xce1e4f)||_0xce1e4f);return _0xce1e4f;},_0x3e0c13=(_0x5e5eae,_0x29d3e7)=>(_0xe3da25,_0x1b3e7a)=>_0x29d3e7(_0xe3da25,_0x1b3e7a,_0x5e5eae),_0x389865=(_0x16ae95,_0x3c5560,_0x155544)=>_0x53bbcf(_0x16ae95,typeof _0x3c5560!=_0x1adf94(0x1b7)?_0x3c5560+'':_0x3c5560,_0x155544);_0x295029['UniverThreadCommentDataSourcePlugin']=class extends _0x3843da[_0x1adf94(0x158)]{constructor(_0x1a4366=_0x118b30,_0xc82f5d,_0x45c378){const _0x19555a=_0x1adf94;super(),this[_0x19555a(0x137)]=_0x1a4366,this[_0x19555a(0x162)]=_0xc82f5d,this[_0x19555a(0x179)]=_0x45c378;const {..._0x19e2a3}=_0x3843da[_0x19555a(0x13d)]({},_0x118b30,this[_0x19555a(0x137)]);this[_0x19555a(0x179)][_0x19555a(0x1bd)](_0x2a5f42,_0x19e2a3);}[_0x1adf94(0x168)](){const _0x61cc24=_0x1adf94;[[_0x3e5a96],[_0x42986f],[_0x4ba89d]][_0x61cc24(0x164)](_0x3206c0=>{const _0x85ab2f=_0x61cc24;this[_0x85ab2f(0x162)][_0x85ab2f(0x199)](_0x3206c0);});}[_0x1adf94(0x17b)](){const _0x369803=_0x1adf94;this[_0x369803(0x162)]['get'](_0x42986f),this[_0x369803(0x162)][_0x369803(0x138)](_0x4ba89d);}},_0x389865(_0x295029[_0x1adf94(0x172)],_0x1adf94(0x18c),_0x4c6787),_0x389865(_0x295029[_0x1adf94(0x172)],'type',_0x3843da[_0x1adf94(0x13a)][_0x1adf94(0x146)]),_0x295029['UniverThreadCommentDataSourcePlugin']=_0x306448([_0x3843da['DependentOn'](_0x444b73[_0x1adf94(0x19c)],_0x3f1c4b[_0x1adf94(0x1a1)],_0x4bff4b[_0x1adf94(0x19e)]),_0x3e0c13(0x1,_0x3843da['Inject'](_0x3843da[_0x1adf94(0x143)])),_0x3e0c13(0x2,_0x3843da[_0x1adf94(0x19f)])],_0x295029[_0x1adf94(0x172)]),Object[_0x1adf94(0x1ac)](_0x295029,Symbol[_0x1adf94(0x160)],{'value':_0x1adf94(0x190)});}));
|
|
1
|
+
(function(_0x5ce6c3,_0x367982){const _0x5250aa=_0x1066,_0x272568=_0x5ce6c3();while(!![]){try{const _0x27801f=-parseInt(_0x5250aa(0x227))/0x1+-parseInt(_0x5250aa(0x22f))/0x2*(parseInt(_0x5250aa(0x205))/0x3)+parseInt(_0x5250aa(0x204))/0x4*(-parseInt(_0x5250aa(0x207))/0x5)+-parseInt(_0x5250aa(0x23e))/0x6+parseInt(_0x5250aa(0x241))/0x7+parseInt(_0x5250aa(0x1fc))/0x8+parseInt(_0x5250aa(0x20b))/0x9;if(_0x27801f===_0x367982)break;else _0x272568['push'](_0x272568['shift']());}catch(_0xdacf4f){_0x272568['push'](_0x272568['shift']());}}}(_0x2c0f,0x3757b),function(_0x1b821c,_0x3eecb0){const _0x37419d=_0x1066;typeof exports==_0x37419d(0x24d)&&typeof module<'u'?_0x3eecb0(exports,require(_0x37419d(0x209)),require('@univerjs-pro/license'),require(_0x37419d(0x211)),require('@univerjs/thread-comment-ui'),require(_0x37419d(0x234)),require(_0x37419d(0x1d6)),require(_0x37419d(0x1e9))):typeof define==_0x37419d(0x1e5)&&define['amd']?define(['exports','@univerjs-pro/collaboration-client','@univerjs-pro/license','@univerjs/core',_0x37419d(0x233),_0x37419d(0x234),_0x37419d(0x1d6),_0x37419d(0x1e9)],_0x3eecb0):(_0x1b821c=typeof globalThis<'u'?globalThis:_0x1b821c||self,_0x3eecb0(_0x1b821c[_0x37419d(0x254)]={},_0x1b821c[_0x37419d(0x22a)],_0x1b821c['UniverProLicense'],_0x1b821c['UniverCore'],_0x1b821c[_0x37419d(0x200)],_0x1b821c[_0x37419d(0x242)],_0x1b821c['rxjs'],_0x1b821c[_0x37419d(0x1ee)]));}(this,function(_0xd9ba2d,_0x11b26c,_0x57c51d,_0x7071f4,_0x6dad2e,_0x4721a4,_0x5cd8d1,_0x3a805a){'use strict';const _0x25fad2=_0x1066;const _0x41e49d=_0x25fad2(0x1ff);var _0x3f7454=(_0x4c2cc6=>(_0x4c2cc6[_0x4c2cc6[_0x25fad2(0x206)]=0x0]=_0x25fad2(0x206),_0x4c2cc6[_0x4c2cc6[_0x25fad2(0x1f4)]=0x1]=_0x25fad2(0x1f4),_0x4c2cc6[_0x4c2cc6[_0x25fad2(0x259)]=-0x1]=_0x25fad2(0x259),_0x4c2cc6))(_0x3f7454||{}),_0x1120c1=(_0x95f068=>(_0x95f068[_0x95f068[_0x25fad2(0x23f)]=0x0]=_0x25fad2(0x23f),_0x95f068[_0x95f068[_0x25fad2(0x23b)]=0x1]='Add',_0x95f068[_0x95f068[_0x25fad2(0x226)]=0x2]=_0x25fad2(0x226),_0x95f068[_0x95f068['Edit']=0x3]=_0x25fad2(0x1f8),_0x95f068[_0x95f068[_0x25fad2(0x1dc)]=0x4]=_0x25fad2(0x1dc),_0x95f068[_0x95f068['Solve']=0x5]=_0x25fad2(0x222),_0x95f068[_0x95f068[_0x25fad2(0x259)]=-0x1]=_0x25fad2(0x259),_0x95f068))(_0x1120c1||{});const _0xef07fc=_0x59b7f2=>_0x7071f4[_0x25fad2(0x24e)](new Date(+_0x59b7f2))[_0x25fad2(0x1d4)](_0x25fad2(0x244)),_0x2efa19=async(_0x26d669,_0x4b5033)=>{const _0x2be406=_0x25fad2,_0x85b46=_0x26d669[_0x2be406(0x229)](_0x7071f4['UserManagerService']),_0x596dcd=_0x26d669['get'](_0x3a805a[_0x2be406(0x219)]);_0x4b5033['forEach'](_0x7b5bd0=>{const _0x4647ac=_0x2be406;_0x85b46[_0x4647ac(0x243)](_0x7b5bd0)&&_0x4b5033[_0x4647ac(0x251)](_0x7b5bd0);}),_0x4b5033[_0x2be406(0x1e0)]&&(await _0x596dcd[_0x2be406(0x229)](_0x2be406(0x1fb),{'params':{'userIDs':[..._0x4b5033]}}))[_0x2be406(0x249)][_0x2be406(0x240)][_0x2be406(0x1f6)](_0x44e498=>{const _0x5f266b=_0x2be406;_0x44e498&&_0x85b46[_0x5f266b(0x23a)](_0x44e498);});};var _0x1a6d47=Object[_0x25fad2(0x1f9)],_0x394beb=(_0x2724f9,_0x4aff70,_0x225192,_0x3ddae8)=>{const _0x24acfb=_0x25fad2;for(var _0x3c7fad=_0x3ddae8>0x1?void 0x0:_0x3ddae8?_0x1a6d47(_0x4aff70,_0x225192):_0x4aff70,_0x37a64a=_0x2724f9[_0x24acfb(0x1dd)]-0x1,_0x3263cf;_0x37a64a>=0x0;_0x37a64a--)(_0x3263cf=_0x2724f9[_0x37a64a])&&(_0x3c7fad=_0x3263cf(_0x3c7fad)||_0x3c7fad);return _0x3c7fad;},_0x23ddaf=(_0x2ba3f9,_0x88f527)=>(_0x252cb9,_0x4fb4cb)=>_0x88f527(_0x252cb9,_0x4fb4cb,_0x2ba3f9);let _0x434f20=class extends _0x7071f4[_0x25fad2(0x1e8)]{constructor(_0xe42141,_0x1f8b7a,_0x2dcbb8,_0x1eca4b){const _0x31458e=_0x25fad2;super(),this[_0x31458e(0x1ef)]=_0xe42141,this[_0x31458e(0x221)]=_0x1f8b7a,this['_userService']=_0x2dcbb8,this[_0x31458e(0x21b)]=_0x1eca4b,this[_0x31458e(0x246)](),this[_0x31458e(0x21c)]();}[_0x25fad2(0x21c)](){const _0x22ed2f=_0x25fad2;this['disposeWithMe'](this[_0x22ed2f(0x221)][_0x22ed2f(0x1d9)][_0x22ed2f(0x1eb)](_0x5cd8d1[_0x22ed2f(0x1e3)](0x10))['subscribe'](_0x5ef38f=>{const _0x42a3f5=_0x22ed2f,_0x11541b=new Set();_0x5ef38f[_0x42a3f5(0x1f6)](_0x440d96=>{const _0x370153=_0x42a3f5;switch(_0x440d96[_0x370153(0x232)]){case _0x370153(0x21a):{const _0xb1b4a8=_0x440d96['payload'][_0x370153(0x24a)];_0x11541b[_0x370153(0x21a)](_0xb1b4a8);break;}}}),_0x2efa19(this[_0x42a3f5(0x21b)],_0x11541b);}));}['_init'](){const _0x50abcc=_0x25fad2;this['disposeWithMe'](this[_0x50abcc(0x1ef)][_0x50abcc(0x1d9)]['subscribe'](async _0xf0a5a5=>{const _0xa13a9f=_0x50abcc;var _0x2721a1,_0x211932,_0xd7b450,_0x16593c;const _0x442015=(_0x2721a1=this[_0xa13a9f(0x221)][_0xa13a9f(0x257)](_0xf0a5a5[_0xa13a9f(0x228)])['find'](_0x5ec29c=>_0x5ec29c[_0xa13a9f(0x213)]===_0xf0a5a5[_0xa13a9f(0x213)]))==null?void 0x0:_0x2721a1['root'];if(!_0x442015)return;const {unitId:_0x59a501,subUnitId:_0x58b95f}=_0x442015;switch(_0xf0a5a5[_0xa13a9f(0x1e7)]&&this[_0xa13a9f(0x1e1)][_0xa13a9f(0x23a)](_0xf0a5a5[_0xa13a9f(0x1e7)]),_0xf0a5a5[_0xa13a9f(0x232)]){case _0x1120c1['Add']:break;case _0x1120c1[_0xa13a9f(0x226)]:{this[_0xa13a9f(0x221)][_0xa13a9f(0x203)](_0x59a501,_0x58b95f,{'unitId':_0x59a501,'subUnitId':_0x58b95f,'ref':'','id':_0xf0a5a5[_0xa13a9f(0x245)],'dT':_0xef07fc(+_0xf0a5a5[_0xa13a9f(0x216)]),'threadId':_0xf0a5a5[_0xa13a9f(0x213)],'personId':(_0xd7b450=(_0x211932=_0xf0a5a5[_0xa13a9f(0x1e7)])==null?void 0x0:_0x211932[_0xa13a9f(0x20f)])!=null?_0xd7b450:_0xf0a5a5[_0xa13a9f(0x248)],'text':JSON[_0xa13a9f(0x20a)](_0xf0a5a5[_0xa13a9f(0x1db)]),'parentId':_0x442015['id']});break;}case _0x1120c1[_0xa13a9f(0x1dc)]:{const _0x5a63f4=this['_threadCommentModel']['getComment'](_0x59a501,_0x58b95f,_0xf0a5a5[_0xa13a9f(0x245)]);_0x5a63f4&&_0x5a63f4[_0xa13a9f(0x1ed)]&&this[_0xa13a9f(0x221)][_0xa13a9f(0x1f0)](_0x59a501,_0x58b95f,_0xf0a5a5[_0xa13a9f(0x245)]);break;}case _0x1120c1[_0xa13a9f(0x1f8)]:{this['_threadCommentModel'][_0xa13a9f(0x208)](_0x59a501,_0x58b95f,{'commentId':_0xf0a5a5[_0xa13a9f(0x245)],'text':JSON[_0xa13a9f(0x20a)](_0xf0a5a5[_0xa13a9f(0x1db)])});break;}case _0x1120c1['Solve']:{const _0x30eae6=(_0x16593c=this[_0xa13a9f(0x221)][_0xa13a9f(0x257)](_0xf0a5a5[_0xa13a9f(0x228)])[_0xa13a9f(0x20d)](_0x2af0a5=>_0x2af0a5[_0xa13a9f(0x213)]===_0xf0a5a5[_0xa13a9f(0x213)]))==null?void 0x0:_0x16593c[_0xa13a9f(0x225)];_0x30eae6&&this['_threadCommentModel']['resolveComment'](_0x59a501,_0x58b95f,_0x30eae6['id'],_0xf0a5a5[_0xa13a9f(0x238)]===_0x3f7454[_0xa13a9f(0x1f4)]);break;}}}));}};_0x434f20=_0x394beb([_0x23ddaf(0x0,_0x7071f4[_0x25fad2(0x235)](_0x11b26c[_0x25fad2(0x1ec)])),_0x23ddaf(0x1,_0x7071f4['Inject'](_0x4721a4[_0x25fad2(0x256)])),_0x23ddaf(0x2,_0x7071f4[_0x25fad2(0x235)](_0x7071f4['UserManagerService'])),_0x23ddaf(0x3,_0x7071f4['Inject'](_0x7071f4[_0x25fad2(0x22c)]))],_0x434f20);const _0x3242e7='thread-comment-data-source.config',_0x4b362e={};var _0xa9deea=Object[_0x25fad2(0x1f9)],_0x4128b8=(_0x17c94e,_0x542577,_0x530292,_0xef5e39)=>{for(var _0x5bbbc6=_0xef5e39>0x1?void 0x0:_0xef5e39?_0xa9deea(_0x542577,_0x530292):_0x542577,_0x3acca0=_0x17c94e['length']-0x1,_0x2b0fbf;_0x3acca0>=0x0;_0x3acca0--)(_0x2b0fbf=_0x17c94e[_0x3acca0])&&(_0x5bbbc6=_0x2b0fbf(_0x5bbbc6)||_0x5bbbc6);return _0x5bbbc6;},_0x15910d=(_0x44e13f,_0x1f5c19)=>(_0x15eda9,_0x2e3f0d)=>_0x1f5c19(_0x15eda9,_0x2e3f0d,_0x44e13f);function _0x2b172a(_0x16fac4,_0x1e1db4){const _0x354336=_0x25fad2,_0x3344ad=_0x16fac4[_0x354336(0x247)][0x0];return{..._0x1e1db4,'id':_0x3344ad[_0x354336(0x245)],'resolved':_0x16fac4[_0x354336(0x238)]===0x1,'dT':_0xef07fc(_0x3344ad[_0x354336(0x216)]),'personId':_0x3344ad[_0x354336(0x248)],'threadId':_0x3344ad[_0x354336(0x213)]};}function _0x4551dd(_0x94916d,_0x19a053,_0x231c86){const _0x317584=_0x25fad2;var _0xe870d2,_0x503132;if(((_0x503132=(_0xe870d2=_0x94916d==null?void 0x0:_0x94916d[_0x317584(0x247)])==null?void 0x0:_0xe870d2[_0x317584(0x1dd)])!=null?_0x503132:0x0)>0x0){const _0x37aa4c=(_0x394530,_0x4b58b2)=>({'id':_0x394530[_0x317584(0x245)],'threadId':_0x394530[_0x317584(0x213)],'dT':_0xef07fc(_0x394530['createTimestamp']),'personId':_0x394530['userId'],'resolved':_0x94916d[_0x317584(0x238)]===_0x3f7454[_0x317584(0x1f4)],'unitId':_0x19a053,'subUnitId':_0x231c86,'text':JSON[_0x317584(0x20a)](_0x394530[_0x317584(0x1db)]),'parentId':_0x4b58b2}),_0x54b87a=_0x37aa4c(_0x94916d[_0x317584(0x247)][0x0]);return{..._0x54b87a,'children':_0x94916d[_0x317584(0x247)][_0x317584(0x214)](0x1)['map'](_0x13baf6=>_0x37aa4c(_0x13baf6,_0x54b87a['id']))};}return null;}let _0x15f008=class{constructor(_0x1d4fe2,_0x197806,_0x398efc,_0x2c4414){const _0x1d37e6=_0x25fad2;this['_httpService']=_0x1d4fe2,this[_0x1d37e6(0x1e1)]=_0x197806,this[_0x1d37e6(0x202)]=_0x398efc,this[_0x1d37e6(0x21b)]=_0x2c4414;}async[_0x25fad2(0x203)](_0x12f04b){const _0x60a5dd=_0x25fad2;var _0x431821,_0x3a8045;const {parentId:_0x1619de,unitId:_0x26b7ac,text:_0x455db6,threadId:_0x527cf6}=_0x12f04b,_0x551a45=(_0x3a8045=(_0x431821=_0x455db6[_0x60a5dd(0x1e6)])==null?void 0x0:_0x431821[_0x60a5dd(0x24c)](_0x21778f=>_0x21778f['rangeType']===_0x7071f4['CustomRangeType'][_0x60a5dd(0x1d3)])[_0x60a5dd(0x1d8)](_0x39ca6e=>_0x39ca6e[_0x60a5dd(0x24f)]))!=null?_0x3a8045:[],_0x4e08fb=JSON[_0x60a5dd(0x22e)](_0x455db6),_0x4a15c0=(await this[_0x60a5dd(0x202)][_0x60a5dd(0x1f5)](_0x26b7ac))['getMemberID']();if(_0x1619de){const _0x74d5fb={'memberId':_0x4a15c0,'unitId':_0x26b7ac,'content':_0x4e08fb,'mention':_0x551a45,'threadId':_0x527cf6},_0x1a77ca=(await this['_httpService'][_0x60a5dd(0x1ea)](_0x60a5dd(0x22d)+_0x26b7ac+_0x60a5dd(0x1d7),{'body':_0x74d5fb}))['body'][_0x60a5dd(0x253)];return{..._0x12f04b,'id':_0x1a77ca[_0x60a5dd(0x245)],'dT':_0x7071f4[_0x60a5dd(0x24e)](+_0x1a77ca[_0x60a5dd(0x216)])['format'](_0x60a5dd(0x244)),'personId':_0x1a77ca[_0x60a5dd(0x248)]};}else{const _0x4b591c={'memberId':_0x4a15c0,'unitId':_0x26b7ac,'content':_0x4e08fb,'mention':_0x551a45},_0x438712=await this['_httpService'][_0x60a5dd(0x1ea)](_0x60a5dd(0x22d)+_0x26b7ac+'/add',{'body':_0x4b591c});return _0x2b172a(_0x438712[_0x60a5dd(0x249)][_0x60a5dd(0x250)],_0x12f04b);}}async['updateComment'](_0x275dee){const _0x7c9782=_0x25fad2;var _0x295853,_0x5d8a33;const {text:_0x1fe725,unitId:_0x40353a}=_0x275dee,_0x3ded9b=(_0x5d8a33=(_0x295853=_0x1fe725[_0x7c9782(0x1e6)])==null?void 0x0:_0x295853['filter'](_0x524594=>_0x524594[_0x7c9782(0x220)]===_0x7071f4[_0x7c9782(0x21e)][_0x7c9782(0x1d3)])[_0x7c9782(0x1d8)](_0x2958e7=>_0x2958e7[_0x7c9782(0x24f)]))!=null?_0x5d8a33:[],_0x5a8f38=JSON[_0x7c9782(0x22e)](_0x1fe725),_0x557dd6=_0x275dee[_0x7c9782(0x213)],_0x59f756=_0x275dee['id'],_0x4bdfe6={'memberId':(await this[_0x7c9782(0x202)][_0x7c9782(0x1f5)](_0x40353a))[_0x7c9782(0x217)](),'unitId':_0x40353a,'threadId':_0x557dd6,'mention':_0x3ded9b,'content':_0x5a8f38,'replyId':_0x59f756},_0x22418b=await this[_0x7c9782(0x1e4)][_0x7c9782(0x1ea)](_0x7c9782(0x22d)+_0x40353a+_0x7c9782(0x239),{'body':_0x4bdfe6});return!_0x22418b[_0x7c9782(0x249)][_0x7c9782(0x258)]||_0x22418b[_0x7c9782(0x249)][_0x7c9782(0x258)][_0x7c9782(0x23c)]===0x1;}async[_0x25fad2(0x1f1)](_0x23c2e7){const _0x35f1f0=_0x25fad2,{unitId:_0x23ad33}=_0x23c2e7,_0x2d5110=_0x23c2e7[_0x35f1f0(0x213)],_0x169033={'memberId':this[_0x35f1f0(0x1e1)][_0x35f1f0(0x1de)]()[_0x35f1f0(0x20f)],'unitId':_0x23ad33,'threadId':_0x2d5110,'solved':_0x23c2e7[_0x35f1f0(0x224)]?_0x3f7454[_0x35f1f0(0x1f4)]:_0x3f7454['OpenOrReOpen']},_0x367079=await this[_0x35f1f0(0x1e4)][_0x35f1f0(0x1ea)](_0x35f1f0(0x22d)+_0x23ad33+_0x35f1f0(0x210),{'body':_0x169033});return!_0x367079[_0x35f1f0(0x249)][_0x35f1f0(0x258)]||_0x367079['body'][_0x35f1f0(0x258)][_0x35f1f0(0x23c)]===0x1;}async['deleteComment'](_0xa8eceb,_0x2af855,_0x5edb8a,_0x3e29dd){const _0x4e10c7=_0x25fad2,_0x5a7ced={'memberId':(await this[_0x4e10c7(0x202)][_0x4e10c7(0x1f5)](_0xa8eceb))['getMemberID'](),'threadId':_0x5edb8a,'replyId':_0x3e29dd,'unitId':_0xa8eceb},_0x54f6e3=await this['_httpService'][_0x4e10c7(0x1ea)](_0x4e10c7(0x22d)+_0xa8eceb+'/delete',{'body':_0x5a7ced});return!_0x54f6e3[_0x4e10c7(0x249)][_0x4e10c7(0x258)]||_0x54f6e3[_0x4e10c7(0x249)][_0x4e10c7(0x258)][_0x4e10c7(0x23c)]===0x1;}async['listComments'](_0x2da93e,_0x5f46f2,_0x4073ee){const _0x15a205=_0x25fad2,_0x50a010={'unitId':_0x2da93e,'threadId':_0x4073ee},_0x2569b4=await this[_0x15a205(0x1e4)][_0x15a205(0x1ea)](_0x15a205(0x22d)+_0x2da93e+_0x15a205(0x1d5),{'body':_0x50a010}),_0x2f29ea=_0x4073ee[_0x15a205(0x1d8)](_0x5cd041=>_0x4551dd(_0x2569b4[_0x15a205(0x249)][_0x15a205(0x22b)][_0x5cd041],_0x2da93e,_0x5f46f2))[_0x15a205(0x24c)](Boolean);return Object[_0x15a205(0x23d)](_0x2569b4['body']['users'])[_0x15a205(0x1f6)](_0x11de6e=>{const _0x2eb946=_0x15a205;this['_userService'][_0x2eb946(0x23a)](_0x11de6e);}),_0x2f29ea;}[_0x25fad2(0x218)](_0x3a0116){const _0x395b97=_0x25fad2;return{'id':_0x3a0116['id'],'threadId':_0x3a0116[_0x395b97(0x213)],'ref':_0x3a0116[_0x395b97(0x1f2)]};}};_0x15f008=_0x4128b8([_0x15910d(0x0,_0x7071f4[_0x25fad2(0x235)](_0x3a805a[_0x25fad2(0x219)])),_0x15910d(0x1,_0x7071f4[_0x25fad2(0x235)](_0x7071f4[_0x25fad2(0x20e)])),_0x15910d(0x2,_0x7071f4['Inject'](_0x11b26c[_0x25fad2(0x212)])),_0x15910d(0x3,_0x7071f4[_0x25fad2(0x235)](_0x7071f4[_0x25fad2(0x22c)]))],_0x15f008);var _0x3c11e2=Object['getOwnPropertyDescriptor'],_0x42b4c2=(_0x232291,_0x4ac947,_0x12c47a,_0x3ff421)=>{for(var _0x13d956=_0x3ff421>0x1?void 0x0:_0x3ff421?_0x3c11e2(_0x4ac947,_0x12c47a):_0x4ac947,_0xca9129=_0x232291['length']-0x1,_0x1ef50b;_0xca9129>=0x0;_0xca9129--)(_0x1ef50b=_0x232291[_0xca9129])&&(_0x13d956=_0x1ef50b(_0x13d956)||_0x13d956);return _0x13d956;},_0x3aa88d=(_0x252981,_0x723d0e)=>(_0xd78a88,_0x4ca5b4)=>_0x723d0e(_0xd78a88,_0x4ca5b4,_0x252981);let _0x3c6401=class extends _0x7071f4[_0x25fad2(0x1e8)]{constructor(_0x243e34,_0x5739a6){const _0x596f74=_0x25fad2;super(),this['_threadCommentDataSourceService']=_0x243e34,this[_0x596f74(0x201)]=_0x5739a6,this[_0x596f74(0x230)]();}[_0x25fad2(0x230)](){const _0x43aa6c=_0x25fad2;this[_0x43aa6c(0x21d)][_0x43aa6c(0x1fd)]=this[_0x43aa6c(0x201)],this[_0x43aa6c(0x21d)]['syncUpdateMutationToColla']=!0x1;}};_0x3c6401=_0x42b4c2([_0x3aa88d(0x0,_0x4721a4['IThreadCommentDataSourceService']),_0x3aa88d(0x1,_0x7071f4['Inject'](_0x15f008))],_0x3c6401);var _0x563fc7=Object[_0x25fad2(0x1da)],_0x4178aa=Object[_0x25fad2(0x1f9)],_0x34ae9b=(_0x116a88,_0x1c805d,_0xb10d71)=>_0x1c805d in _0x116a88?_0x563fc7(_0x116a88,_0x1c805d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb10d71}):_0x116a88[_0x1c805d]=_0xb10d71,_0x3a78f3=(_0x38ef52,_0x579101,_0x1b4455,_0x23122e)=>{const _0x49ad53=_0x25fad2;for(var _0x1e2488=_0x23122e>0x1?void 0x0:_0x23122e?_0x4178aa(_0x579101,_0x1b4455):_0x579101,_0x858bf9=_0x38ef52[_0x49ad53(0x1dd)]-0x1,_0x5d2ae7;_0x858bf9>=0x0;_0x858bf9--)(_0x5d2ae7=_0x38ef52[_0x858bf9])&&(_0x1e2488=_0x5d2ae7(_0x1e2488)||_0x1e2488);return _0x1e2488;},_0x408c45=(_0x2a9279,_0x3307de)=>(_0x350bf4,_0x2bf8c5)=>_0x3307de(_0x350bf4,_0x2bf8c5,_0x2a9279),_0xbd65df=(_0xc93b7,_0x450162,_0x13bca5)=>_0x34ae9b(_0xc93b7,typeof _0x450162!=_0x25fad2(0x237)?_0x450162+'':_0x450162,_0x13bca5);_0xd9ba2d[_0x25fad2(0x236)]=class extends _0x7071f4['Plugin']{constructor(_0x266ba8=_0x4b362e,_0x3ccd3b,_0x458559){const _0x208c00=_0x25fad2;super(),this['_config']=_0x266ba8,this[_0x208c00(0x21b)]=_0x3ccd3b,this['_configService']=_0x458559;const {..._0xc359d4}=_0x7071f4[_0x208c00(0x1df)]({},_0x4b362e,this[_0x208c00(0x215)]);this[_0x208c00(0x21f)][_0x208c00(0x20c)](_0x3242e7,_0xc359d4);}[_0x25fad2(0x1f3)](){const _0xb65894=_0x25fad2;[[_0x15f008],[_0x3c6401],[_0x434f20]][_0xb65894(0x1f6)](_0x3b0fa4=>{const _0x39ec3f=_0xb65894;this[_0x39ec3f(0x21b)][_0x39ec3f(0x21a)](_0x3b0fa4);});}[_0x25fad2(0x1f7)](){const _0x168099=_0x25fad2;this[_0x168099(0x21b)]['get'](_0x3c6401),this['_injector'][_0x168099(0x229)](_0x434f20);}},_0xbd65df(_0xd9ba2d[_0x25fad2(0x236)],_0x25fad2(0x1fe),_0x41e49d),_0xbd65df(_0xd9ba2d[_0x25fad2(0x236)],_0x25fad2(0x232),_0x7071f4[_0x25fad2(0x1fa)][_0x25fad2(0x24b)]),_0xd9ba2d['UniverThreadCommentDataSourcePlugin']=_0x3a78f3([_0x7071f4[_0x25fad2(0x231)](_0x6dad2e[_0x25fad2(0x252)],_0x11b26c['UniverCollaborationClientPlugin'],_0x57c51d['UniverLicensePlugin']),_0x408c45(0x1,_0x7071f4[_0x25fad2(0x235)](_0x7071f4[_0x25fad2(0x22c)])),_0x408c45(0x2,_0x7071f4[_0x25fad2(0x223)])],_0xd9ba2d[_0x25fad2(0x236)]),Object[_0x25fad2(0x1da)](_0xd9ba2d,Symbol[_0x25fad2(0x1e2)],{'value':_0x25fad2(0x255)});}));function _0x1066(_0x437953,_0x1ac549){const _0x2c0f5a=_0x2c0f();return _0x1066=function(_0x106606,_0xac40a){_0x106606=_0x106606-0x1d3;let _0x49fbf8=_0x2c0f5a[_0x106606];return _0x49fbf8;},_0x1066(_0x437953,_0x1ac549);}function _0x2c0f(){const _0xfa7b13=['@univerjs/core','CollaborationSessionService','threadId','slice','_config','createTimestamp','getMemberID','saveCommentToSnapshot','HTTPService','add','_injector','_initUserSync','_threadCommentDataSourceService','CustomRangeType','_configService','rangeType','_threadCommentModel','Solve','IConfigService','resolved','root','Reply','150239mrNnJP','unitId','get','UniverProCollaborationClient','comments','Injector','/universer-api/comment/unit/','stringify','2cPPkoW','_initDataSource','DependentOn','type','@univerjs/thread-comment-ui','@univerjs/thread-comment','Inject','UniverThreadCommentDataSourcePlugin','symbol','solved','/edit','addUser','Add','code','values','1335318FMuIDq','Unknown','users','2715300TsOmGJ','UniverThreadComment','getUser','YYYY/MM/DD\x20HH:mm','replyId','_init','replies','userId','body','personId','UNIVER_UNKNOWN','filter','object','dayjs','rangeId','comment','delete','UniverThreadCommentUIPlugin','reply','UniverProThreadCommentDatasource','Module','ThreadCommentModel','getUnit','error','UNRECOGNIZED','COMMENT','format','/list','rxjs','/reply','map','commentUpdate$','defineProperty','content','Delete','length','getCurrentUser','merge','size','_userService','toStringTag','bufferTime','_httpService','function','customRanges','user','Disposable','@univerjs/network','post','pipe','CommentService','parentId','UniverNetwork','_commentService','deleteComment','resolveComment','ref','onStarting','Solved','requireSession','forEach','onReady','Edit','getOwnPropertyDescriptor','UniverInstanceType','/universer-api/user/list','3495608aUTscg','dataSource','pluginName','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentUi','_threadCommentDataSource','_sessionService','addComment','4FjacpE','49401UyfOFi','OpenOrReOpen','1740695jWsRPW','updateComment','@univerjs-pro/collaboration-client','parse','1253070lvnUaB','setConfig','find','UserManagerService','userID','/solved'];_0x2c0f=function(){return _0xfa7b13;};return _0x2c0f();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4-nightly.202503101606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/
|
|
49
|
-
"@univerjs-pro/
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/license": "0.6.4-nightly.202503101606",
|
|
49
|
+
"@univerjs-pro/collaboration-client": "0.6.4-nightly.202503101606",
|
|
50
|
+
"@univerjs/core": "0.6.4-nightly.202503101606",
|
|
51
|
+
"@univerjs/thread-comment": "0.6.4-nightly.202503101606",
|
|
52
|
+
"@univerjs/protocol": "0.1.44-alpha.3",
|
|
53
|
+
"@univerjs/network": "0.6.4-nightly.202503101606",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.6.4-nightly.202503101606"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
58
|
"typescript": "^5.8.2",
|
|
59
59
|
"vite": "^6.2.0",
|
|
60
60
|
"vitest": "^3.0.7",
|
|
61
|
-
"@univerjs-infra/shared": "0.6.
|
|
61
|
+
"@univerjs-infra/shared": "0.6.4"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|