@univerjs-pro/thread-comment-datasource 0.13.0-insiders.20251223-857805c → 0.14.0-insiders.20251222-4efcfbb

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x43ccab=_0x498d;(function(_0x4d633f,_0x46fed0){const _0x875831=_0x498d,_0x45cca3=_0x4d633f();while(!![]){try{const _0x2c0282=-parseInt(_0x875831(0x13e))/0x1*(-parseInt(_0x875831(0x113))/0x2)+parseInt(_0x875831(0xff))/0x3+parseInt(_0x875831(0xf9))/0x4+-parseInt(_0x875831(0x101))/0x5+-parseInt(_0x875831(0xf8))/0x6+-parseInt(_0x875831(0xed))/0x7+-parseInt(_0x875831(0xf0))/0x8;if(_0x2c0282===_0x46fed0)break;else _0x45cca3['push'](_0x45cca3['shift']());}catch(_0x2e5e1a){_0x45cca3['push'](_0x45cca3['shift']());}}}(_0x1b28,0x4ce9d));Object[_0x43ccab(0x14c)](exports,Symbol[_0x43ccab(0x14d)],{'value':_0x43ccab(0x108)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x15a2a2=>(_0x15a2a2[_0x15a2a2['OpenOrReOpen']=0x0]=_0x43ccab(0x131),_0x15a2a2[_0x15a2a2[_0x43ccab(0x10d)]=0x1]='Solved',_0x15a2a2[_0x15a2a2[_0x43ccab(0x136)]=-0x1]=_0x43ccab(0x136),_0x15a2a2))(I||{}),v=(_0xc6acec=>(_0xc6acec[_0xc6acec[_0x43ccab(0x117)]=0x0]=_0x43ccab(0x117),_0xc6acec[_0xc6acec[_0x43ccab(0x122)]=0x1]=_0x43ccab(0x122),_0xc6acec[_0xc6acec[_0x43ccab(0x121)]=0x2]='Reply',_0xc6acec[_0xc6acec['Edit']=0x3]=_0x43ccab(0xe3),_0xc6acec[_0xc6acec[_0x43ccab(0x138)]=0x4]=_0x43ccab(0x138),_0xc6acec[_0xc6acec[_0x43ccab(0xe6)]=0x5]='Solve',_0xc6acec[_0xc6acec[_0x43ccab(0x136)]=-0x1]=_0x43ccab(0x136),_0xc6acec))(v||{});const f=_0x270e07=>c['dayjs'](new Date(+_0x270e07))[_0x43ccab(0xfd)](_0x43ccab(0x137)),R=async(_0x17b671,_0x31b697)=>{const _0x3614a8=_0x43ccab,_0x18f051=_0x17b671[_0x3614a8(0xe4)](c[_0x3614a8(0x114)]),_0x20d5ce=_0x17b671[_0x3614a8(0xe4)](P['HTTPService']);_0x31b697[_0x3614a8(0x14a)](_0x5dff30=>{const _0x3e8059=_0x3614a8;_0x18f051[_0x3e8059(0xf4)](_0x5dff30)&&_0x31b697[_0x3e8059(0x111)](_0x5dff30);}),_0x31b697[_0x3614a8(0xe5)]&&(await _0x20d5ce['get'](_0x3614a8(0xfc),{'params':{'userIDs':[..._0x31b697]}}))['body'][_0x3614a8(0xef)][_0x3614a8(0x14a)](_0x24595c=>{_0x24595c&&_0x18f051['addUser'](_0x24595c);});};var $=Object[_0x43ccab(0xfa)],E=(_0x48bdf1,_0x26c203,_0x1e867d,_0x6eb56d)=>{const _0x185f5d=_0x43ccab;for(var _0x3b78c1=_0x6eb56d>0x1?void 0x0:_0x6eb56d?$(_0x26c203,_0x1e867d):_0x26c203,_0x36c1dd=_0x48bdf1[_0x185f5d(0x144)]-0x1,_0x4c95d5;_0x36c1dd>=0x0;_0x36c1dd--)(_0x4c95d5=_0x48bdf1[_0x36c1dd])&&(_0x3b78c1=_0x4c95d5(_0x3b78c1)||_0x3b78c1);return _0x3b78c1;},S=(_0x1793da,_0x2ee6e0)=>(_0x4cfe32,_0x48a294)=>_0x2ee6e0(_0x4cfe32,_0x48a294,_0x1793da);function _0x1b28(){const _0x1f39aa=['1542162rIajEh','/add','1938295hAtvGu','filter','listComments','/universer-api/comment/unit/','_commentService','_threadCommentDataSource','IConfigService','Module','_threadCommentDataSourceService','_sessionService','payload','addUser','Solved','map','post','personId','delete','code','2wDOSqr','UserManagerService','_initDataSource','addComment','Unknown','resolveComment','subscribe','/edit','_configService','unitId','_httpService','solved','add','UniverThreadCommentDataSourcePlugin','Reply','Add','disposeWithMe','customRanges','Disposable','syncUpdateMutationToColla','getUnit','replies','values','type','Inject','UNIVER_UNKNOWN','_threadCommentModel','pluginName','_init','replyId','OpenOrReOpen','/delete','stringify','pipe','user','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','Delete','IThreadCommentDataSourceService','parse','_config','find','bufferTime','515553pBXqjz','DependentOn','UniverInstanceType','Plugin','/list','content','length','_injector','dayjs','threadId','Injector','rangeId','forEach','CommentService','defineProperty','toStringTag','CustomRangeType','saveCommentToSnapshot','merge','UniverLicensePlugin','error','body','slice','getComment','comments','parentId','onReady','_initUserSync','Edit','get','size','Solve','userId','deleteComment','UniverThreadCommentUIPlugin','onStarting','commentUpdate$','root','2536072XvFOJe','dataSource','users','1511080WTFNUb','updateComment','CollaborationSessionService','getMemberID','getUser','createTimestamp','setConfig','_userService','494796OGXuzk','1226944kCkQYa','getOwnPropertyDescriptor','HTTPService','/universer-api/user/list','format','requireSession'];_0x1b28=function(){return _0x1f39aa;};return _0x1b28();}let _=class extends c[_0x43ccab(0x125)]{constructor(_0x228d4e,_0x282c64,_0xa12896,_0x33a9ce){const _0x5344b9=_0x43ccab;super(),this['_commentService']=_0x228d4e,this[_0x5344b9(0x12d)]=_0x282c64,this[_0x5344b9(0xf7)]=_0xa12896,this[_0x5344b9(0x145)]=_0x33a9ce,this[_0x5344b9(0x12f)](),this['_initUserSync']();}[_0x43ccab(0xe2)](){const _0x5da3f3=_0x43ccab;this[_0x5da3f3(0x123)](this[_0x5da3f3(0x12d)]['commentUpdate$'][_0x5da3f3(0x134)](j[_0x5da3f3(0x13d)](0x10))[_0x5da3f3(0x119)](_0x472ec1=>{const _0x30b34d=_0x5da3f3,_0x22b7fd=new Set();_0x472ec1[_0x30b34d(0x14a)](_0x34e7e6=>{const _0xec517a=_0x30b34d;switch(_0x34e7e6[_0xec517a(0x12a)]){case _0xec517a(0x11f):{const _0x126d60=_0x34e7e6[_0xec517a(0x10b)][_0xec517a(0x110)];_0x22b7fd[_0xec517a(0x11f)](_0x126d60);break;}}}),R(this['_injector'],_0x22b7fd);}));}[_0x43ccab(0x12f)](){const _0x49a759=_0x43ccab;this[_0x49a759(0x123)](this[_0x49a759(0x105)][_0x49a759(0xeb)][_0x49a759(0x119)](async _0x210c3d=>{const _0x931067=_0x49a759;var _0x1c130b,_0x1b7122,_0xa8d3a8,_0xb92b83;const _0x4245b1=(_0x1c130b=this[_0x931067(0x12d)][_0x931067(0x127)](_0x210c3d[_0x931067(0x11c)])[_0x931067(0x13c)](_0x37418e=>_0x37418e[_0x931067(0x147)]===_0x210c3d[_0x931067(0x147)]))==null?void 0x0:_0x1c130b[_0x931067(0xec)];if(!_0x4245b1)return;const {unitId:_0x1810b9,subUnitId:_0x46e62f}=_0x4245b1;switch(_0x210c3d[_0x931067(0x135)]&&this[_0x931067(0xf7)][_0x931067(0x10c)](_0x210c3d['user']),_0x210c3d[_0x931067(0x12a)]){case v[_0x931067(0x122)]:break;case v['Reply']:{this[_0x931067(0x12d)][_0x931067(0x116)](_0x1810b9,_0x46e62f,{'unitId':_0x1810b9,'subUnitId':_0x46e62f,'ref':'','id':_0x210c3d[_0x931067(0x130)],'dT':f(+_0x210c3d['createTimestamp']),'threadId':_0x210c3d['threadId'],'personId':(_0xa8d3a8=(_0x1b7122=_0x210c3d[_0x931067(0x135)])==null?void 0x0:_0x1b7122['userID'])!=null?_0xa8d3a8:_0x210c3d[_0x931067(0xe7)],'text':JSON[_0x931067(0x13a)](_0x210c3d['content']),'parentId':_0x4245b1['id']});break;}case v[_0x931067(0x138)]:{const _0x25a881=this[_0x931067(0x12d)][_0x931067(0xde)](_0x1810b9,_0x46e62f,_0x210c3d[_0x931067(0x130)]);_0x25a881&&_0x25a881[_0x931067(0xe0)]&&this[_0x931067(0x12d)]['deleteComment'](_0x1810b9,_0x46e62f,_0x210c3d['replyId']);break;}case v[_0x931067(0xe3)]:{this['_threadCommentModel'][_0x931067(0xf1)](_0x1810b9,_0x46e62f,{'commentId':_0x210c3d[_0x931067(0x130)],'text':JSON[_0x931067(0x13a)](_0x210c3d[_0x931067(0x143)])});break;}case v[_0x931067(0xe6)]:{const _0x18238c=(_0xb92b83=this[_0x931067(0x12d)][_0x931067(0x127)](_0x210c3d[_0x931067(0x11c)])[_0x931067(0x13c)](_0x2087fd=>_0x2087fd[_0x931067(0x147)]===_0x210c3d[_0x931067(0x147)]))==null?void 0x0:_0xb92b83['root'];_0x18238c&&this[_0x931067(0x12d)][_0x931067(0x118)](_0x1810b9,_0x46e62f,_0x18238c['id'],_0x210c3d[_0x931067(0x11e)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x43ccab(0x12b)](b[_0x43ccab(0x14b)])),S(0x1,c[_0x43ccab(0x12b)](M['ThreadCommentModel'])),S(0x2,c[_0x43ccab(0x12b)](c[_0x43ccab(0x114)])),S(0x3,c[_0x43ccab(0x12b)](c[_0x43ccab(0x148)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x43ccab(0xfa)],x=(_0x3b0c41,_0x37d3ac,_0x375f68,_0x1df15f)=>{const _0x426fb6=_0x43ccab;for(var _0x48b7f8=_0x1df15f>0x1?void 0x0:_0x1df15f?A(_0x37d3ac,_0x375f68):_0x37d3ac,_0x217df2=_0x3b0c41[_0x426fb6(0x144)]-0x1,_0x68d20d;_0x217df2>=0x0;_0x217df2--)(_0x68d20d=_0x3b0c41[_0x217df2])&&(_0x48b7f8=_0x68d20d(_0x48b7f8)||_0x48b7f8);return _0x48b7f8;},C=(_0x4c51fa,_0x6ba5f2)=>(_0x56c334,_0x1c930c)=>_0x6ba5f2(_0x56c334,_0x1c930c,_0x4c51fa);function Y(_0x3091a9,_0x1d6cb2){const _0x20d077=_0x43ccab,_0x42621f=_0x3091a9[_0x20d077(0x128)][0x0];return{..._0x1d6cb2,'id':_0x42621f['replyId'],'resolved':_0x3091a9[_0x20d077(0x11e)]===0x1,'dT':f(_0x42621f[_0x20d077(0xf5)]),'personId':_0x42621f[_0x20d077(0xe7)],'threadId':_0x42621f[_0x20d077(0x147)]};}function G(_0x6d38a2,_0x54dadc,_0x5185b1){const _0x4ca0fb=_0x43ccab;var _0xead5bb,_0x2bde0b;if(((_0x2bde0b=(_0xead5bb=_0x6d38a2==null?void 0x0:_0x6d38a2['replies'])==null?void 0x0:_0xead5bb[_0x4ca0fb(0x144)])!=null?_0x2bde0b:0x0)>0x0){const _0x5094e4=(_0x291f1f,_0x29e1a7)=>({'id':_0x291f1f[_0x4ca0fb(0x130)],'threadId':_0x291f1f[_0x4ca0fb(0x147)],'dT':f(_0x291f1f[_0x4ca0fb(0xf5)]),'personId':_0x291f1f[_0x4ca0fb(0xe7)],'resolved':_0x6d38a2[_0x4ca0fb(0x11e)]===I[_0x4ca0fb(0x10d)],'unitId':_0x54dadc,'subUnitId':_0x5185b1,'text':JSON[_0x4ca0fb(0x13a)](_0x291f1f[_0x4ca0fb(0x143)]),'parentId':_0x29e1a7}),_0x100616=_0x5094e4(_0x6d38a2[_0x4ca0fb(0x128)][0x0]);return{..._0x100616,'children':_0x6d38a2[_0x4ca0fb(0x128)][_0x4ca0fb(0xdd)](0x1)[_0x4ca0fb(0x10e)](_0x203b1c=>_0x5094e4(_0x203b1c,_0x100616['id']))};}return null;}function _0x498d(_0x4b40a0,_0x3f6686){_0x4b40a0=_0x4b40a0-0xdd;const _0x1b2876=_0x1b28();let _0x498db1=_0x1b2876[_0x4b40a0];return _0x498db1;}let p=class{constructor(_0x45b010,_0x1546a6,_0x407de2){const _0x3474aa=_0x43ccab;this[_0x3474aa(0x11d)]=_0x45b010,this[_0x3474aa(0xf7)]=_0x1546a6,this[_0x3474aa(0x10a)]=_0x407de2;}async['addComment'](_0x4a0890){const _0x58f9c8=_0x43ccab;var _0x195c60,_0x547ace;const {parentId:_0x321e49,unitId:_0x2388ae,text:_0x19aee9,threadId:_0x746927}=_0x4a0890,_0x1458a1=(_0x547ace=(_0x195c60=_0x19aee9['customRanges'])==null?void 0x0:_0x195c60['filter'](_0x28a539=>_0x28a539['rangeType']===c[_0x58f9c8(0x14e)]['COMMENT'])[_0x58f9c8(0x10e)](_0x25cb5e=>_0x25cb5e[_0x58f9c8(0x149)]))!=null?_0x547ace:[],_0x974d5e=JSON[_0x58f9c8(0x133)](_0x19aee9),_0x35d5a9=(await this[_0x58f9c8(0x10a)][_0x58f9c8(0xfe)](_0x2388ae))[_0x58f9c8(0xf3)]();if(_0x321e49){const _0x260e51={'memberId':_0x35d5a9,'unitId':_0x2388ae,'content':_0x974d5e,'mention':_0x1458a1,'threadId':_0x746927},_0xefd969=(await this[_0x58f9c8(0x11d)][_0x58f9c8(0x10f)](_0x58f9c8(0x104)+_0x2388ae+'/reply',{'body':_0x260e51}))[_0x58f9c8(0x153)]['reply'];return{..._0x4a0890,'id':_0xefd969['replyId'],'dT':c[_0x58f9c8(0x146)](+_0xefd969[_0x58f9c8(0xf5)])[_0x58f9c8(0xfd)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xefd969[_0x58f9c8(0xe7)]};}else{const _0xd1e06={'memberId':_0x35d5a9,'unitId':_0x2388ae,'content':_0x974d5e,'mention':_0x1458a1},_0x17f2d5=await this[_0x58f9c8(0x11d)][_0x58f9c8(0x10f)](_0x58f9c8(0x104)+_0x2388ae+_0x58f9c8(0x100),{'body':_0xd1e06});return Y(_0x17f2d5[_0x58f9c8(0x153)]['comment'],_0x4a0890);}}async[_0x43ccab(0xf1)](_0x284609){const _0x4c70ce=_0x43ccab;var _0x40792f,_0x20356b;const {text:_0x17d29c,unitId:_0x32c963}=_0x284609,_0x13a4cc=(_0x20356b=(_0x40792f=_0x17d29c[_0x4c70ce(0x124)])==null?void 0x0:_0x40792f[_0x4c70ce(0x102)](_0x1dcd2c=>_0x1dcd2c['rangeType']===c[_0x4c70ce(0x14e)]['COMMENT'])[_0x4c70ce(0x10e)](_0xdab722=>_0xdab722['rangeId']))!=null?_0x20356b:[],_0x2299c7=JSON[_0x4c70ce(0x133)](_0x17d29c),_0x2e0a60=_0x284609[_0x4c70ce(0x147)],_0x240b44=_0x284609['id'],_0x202886={'memberId':(await this[_0x4c70ce(0x10a)][_0x4c70ce(0xfe)](_0x32c963))[_0x4c70ce(0xf3)](),'unitId':_0x32c963,'threadId':_0x2e0a60,'mention':_0x13a4cc,'content':_0x2299c7,'replyId':_0x240b44},_0x1192b8=await this[_0x4c70ce(0x11d)][_0x4c70ce(0x10f)]('/universer-api/comment/unit/'+_0x32c963+_0x4c70ce(0x11a),{'body':_0x202886});return!_0x1192b8[_0x4c70ce(0x153)][_0x4c70ce(0x152)]||_0x1192b8[_0x4c70ce(0x153)]['error']['code']===0x1;}async[_0x43ccab(0x118)](_0x1b7b11){const _0x48da2e=_0x43ccab,{unitId:_0x5b9905}=_0x1b7b11,_0x573727=_0x1b7b11[_0x48da2e(0x147)],_0x24a903={'memberId':this[_0x48da2e(0xf7)]['getCurrentUser']()['userID'],'unitId':_0x5b9905,'threadId':_0x573727,'solved':_0x1b7b11['resolved']?I[_0x48da2e(0x10d)]:I['OpenOrReOpen']},_0x513d17=await this[_0x48da2e(0x11d)]['post'](_0x48da2e(0x104)+_0x5b9905+'/solved',{'body':_0x24a903});return!_0x513d17[_0x48da2e(0x153)]['error']||_0x513d17['body'][_0x48da2e(0x152)][_0x48da2e(0x112)]===0x1;}async[_0x43ccab(0xe8)](_0x33c5fb,_0x150fec,_0x401e5f,_0x6b3dff){const _0x1d2bdc=_0x43ccab,_0x2e59d4={'memberId':(await this[_0x1d2bdc(0x10a)]['requireSession'](_0x33c5fb))['getMemberID'](),'threadId':_0x401e5f,'replyId':_0x6b3dff,'unitId':_0x33c5fb},_0x503c45=await this['_httpService'][_0x1d2bdc(0x10f)](_0x1d2bdc(0x104)+_0x33c5fb+_0x1d2bdc(0x132),{'body':_0x2e59d4});return!_0x503c45[_0x1d2bdc(0x153)][_0x1d2bdc(0x152)]||_0x503c45[_0x1d2bdc(0x153)][_0x1d2bdc(0x152)]['code']===0x1;}async[_0x43ccab(0x103)](_0x1038f4,_0x4951d2,_0x24dd66){const _0xd75d04=_0x43ccab,_0x1a9c6e={'unitId':_0x1038f4,'threadId':_0x24dd66},_0x4838b3=await this[_0xd75d04(0x11d)][_0xd75d04(0x10f)](_0xd75d04(0x104)+_0x1038f4+_0xd75d04(0x142),{'body':_0x1a9c6e}),_0x2e4f60=_0x24dd66[_0xd75d04(0x10e)](_0x5a85c2=>G(_0x4838b3[_0xd75d04(0x153)][_0xd75d04(0xdf)][_0x5a85c2],_0x1038f4,_0x4951d2))[_0xd75d04(0x102)](Boolean);return Object[_0xd75d04(0x129)](_0x4838b3[_0xd75d04(0x153)][_0xd75d04(0xef)])[_0xd75d04(0x14a)](_0x3c9d5e=>{const _0x173d7d=_0xd75d04;this['_userService'][_0x173d7d(0x10c)](_0x3c9d5e);}),_0x2e4f60;}[_0x43ccab(0x14f)](_0x291eb5){return{'id':_0x291eb5['id'],'threadId':_0x291eb5['threadId'],'ref':_0x291eb5['ref']};}};p=x([C(0x0,c['Inject'](P[_0x43ccab(0xfb)])),C(0x1,c[_0x43ccab(0x12b)](c[_0x43ccab(0x114)])),C(0x2,c[_0x43ccab(0x12b)](b[_0x43ccab(0xf2)]))],p);var H=Object[_0x43ccab(0xfa)],J=(_0x5d5690,_0x43de71,_0xf87102,_0x3b63af)=>{for(var _0x22e3d9=_0x3b63af>0x1?void 0x0:_0x3b63af?H(_0x43de71,_0xf87102):_0x43de71,_0x175381=_0x5d5690['length']-0x1,_0x2eb1d5;_0x175381>=0x0;_0x175381--)(_0x2eb1d5=_0x5d5690[_0x175381])&&(_0x22e3d9=_0x2eb1d5(_0x22e3d9)||_0x22e3d9);return _0x22e3d9;},y=(_0x5a7a31,_0x30d09e)=>(_0x49f54f,_0x1b64d3)=>_0x30d09e(_0x49f54f,_0x1b64d3,_0x5a7a31);let g=class extends c['Disposable']{constructor(_0x43716f,_0x19a159){const _0x9c856a=_0x43ccab;super(),this[_0x9c856a(0x109)]=_0x43716f,this[_0x9c856a(0x106)]=_0x19a159,this[_0x9c856a(0x115)]();}['_initDataSource'](){const _0x5d21aa=_0x43ccab;this[_0x5d21aa(0x109)][_0x5d21aa(0xee)]=this[_0x5d21aa(0x106)],this['_threadCommentDataSourceService'][_0x5d21aa(0x126)]=!0x1;}};g=J([y(0x0,M[_0x43ccab(0x139)]),y(0x1,c[_0x43ccab(0x12b)](p))],g);var F=Object[_0x43ccab(0x14c)],L=Object[_0x43ccab(0xfa)],Z=(_0x241ab3,_0x131cac,_0xa9a35e)=>_0x131cac in _0x241ab3?F(_0x241ab3,_0x131cac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xa9a35e}):_0x241ab3[_0x131cac]=_0xa9a35e,W=(_0x2cd0a0,_0x3e43c4,_0x44f326,_0x5632b3)=>{const _0x20c85b=_0x43ccab;for(var _0x49cf67=_0x5632b3>0x1?void 0x0:_0x5632b3?L(_0x3e43c4,_0x44f326):_0x3e43c4,_0x26dc9e=_0x2cd0a0[_0x20c85b(0x144)]-0x1,_0x45c06c;_0x26dc9e>=0x0;_0x26dc9e--)(_0x45c06c=_0x2cd0a0[_0x26dc9e])&&(_0x49cf67=_0x45c06c(_0x49cf67)||_0x49cf67);return _0x49cf67;},O=(_0x505917,_0x21cb7a)=>(_0x4285c4,_0x51a238)=>_0x21cb7a(_0x4285c4,_0x51a238,_0x505917),N=(_0x240320,_0x472aa6,_0x519416)=>Z(_0x240320,typeof _0x472aa6!='symbol'?_0x472aa6+'':_0x472aa6,_0x519416);exports[_0x43ccab(0x120)]=class extends c[_0x43ccab(0x141)]{constructor(_0x5aee77=D,_0x2667d9,_0x19ccb9){const _0x24cb98=_0x43ccab;super(),this[_0x24cb98(0x13b)]=_0x5aee77,this[_0x24cb98(0x145)]=_0x2667d9,this[_0x24cb98(0x11b)]=_0x19ccb9;const {..._0x4adb80}=c[_0x24cb98(0x150)]({},D,this['_config']);this['_configService'][_0x24cb98(0xf6)](q,_0x4adb80);}[_0x43ccab(0xea)](){[[p],[g],[_]]['forEach'](_0x43a23a=>{const _0x55b046=_0x498d;this[_0x55b046(0x145)][_0x55b046(0x11f)](_0x43a23a);});}[_0x43ccab(0xe1)](){const _0x5f3b8a=_0x43ccab;this[_0x5f3b8a(0x145)][_0x5f3b8a(0xe4)](g),this[_0x5f3b8a(0x145)]['get'](_);}},N(exports[_0x43ccab(0x120)],_0x43ccab(0x12e),U),N(exports[_0x43ccab(0x120)],_0x43ccab(0x12a),c[_0x43ccab(0x140)][_0x43ccab(0x12c)]),exports[_0x43ccab(0x120)]=W([c[_0x43ccab(0x13f)](w[_0x43ccab(0xe9)],b['UniverCollaborationClientPlugin'],T[_0x43ccab(0x151)]),O(0x1,c[_0x43ccab(0x12b)](c[_0x43ccab(0x148)])),O(0x2,c[_0x43ccab(0x107)])],exports[_0x43ccab(0x120)]);
1
+ 'use strict';const _0x403535=_0x5332;(function(_0x990f4a,_0x3fdac5){const _0x375017=_0x5332,_0x308d3d=_0x990f4a();while(!![]){try{const _0x43d210=-parseInt(_0x375017(0x150))/0x1+-parseInt(_0x375017(0x146))/0x2+-parseInt(_0x375017(0x134))/0x3*(parseInt(_0x375017(0x172))/0x4)+parseInt(_0x375017(0x167))/0x5+-parseInt(_0x375017(0x155))/0x6*(parseInt(_0x375017(0x16a))/0x7)+parseInt(_0x375017(0x14b))/0x8+parseInt(_0x375017(0x149))/0x9;if(_0x43d210===_0x3fdac5)break;else _0x308d3d['push'](_0x308d3d['shift']());}catch(_0x50f55f){_0x308d3d['push'](_0x308d3d['shift']());}}}(_0x4ca8,0x2e71f));function _0x4ca8(){const _0x25f631=['IThreadCommentDataSourceService','post','deleteComment','userId','getUser','Solve','listComments','unitId','Injector','length','stringify','Solved','comment','YYYY/MM/DD\x20HH:mm','_init','replyId','customRanges','updateComment','_threadCommentDataSource','getMemberID','find','_threadCommentModel','_userService','requireSession','_commentService','addUser','content','/list','_initDataSource','code','parse','resolveComment','defineProperty','UniverLicensePlugin','UNIVER_UNKNOWN','_sessionService','map','onReady','pipe','/add','HTTPService','DependentOn','error','getCurrentUser','_injector','saveCommentToSnapshot','3OSYcBh','userID','format','merge','add','IConfigService','UniverInstanceType','CommentService','COMMENT','Module','replies','UserManagerService','UniverCollaborationClientPlugin','getUnit','createTimestamp','users','rangeType','Edit','492348RfZweX','CustomRangeType','Add','4876857zKeRpA','dataSource','199376YfxXNt','Disposable','commentUpdate$','/delete','UNRECOGNIZED','157153CcoixZ','UniverThreadCommentUIPlugin','Delete','solved','/universer-api/comment/unit/','1866fAsodE','addComment','_httpService','UniverThreadCommentDataSourcePlugin','_threadCommentDataSourceService','/universer-api/user/list','filter','get','payload','getOwnPropertyDescriptor','body','CollaborationSessionService','personId','user','Reply','values','dayjs','rangeId','1835840WlzoFG','type','/edit','6734XjvpCl','threadId','setConfig','OpenOrReOpen','Unknown','ThreadCommentModel','_initUserSync','_config','164860EMUwpI','reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comments','_configService','subscribe','delete','resolved','forEach','Inject','root','symbol'];_0x4ca8=function(){return _0x25f631;};return _0x4ca8();}Object[_0x403535(0x126)](exports,Symbol['toStringTag'],{'value':_0x403535(0x13d)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x403535(0x174);var I=(_0xf6991f=>(_0xf6991f[_0xf6991f[_0x403535(0x16d)]=0x0]=_0x403535(0x16d),_0xf6991f[_0xf6991f[_0x403535(0x111)]=0x1]=_0x403535(0x111),_0xf6991f[_0xf6991f[_0x403535(0x14f)]=-0x1]='UNRECOGNIZED',_0xf6991f))(I||{}),v=(_0x2311e0=>(_0x2311e0[_0x2311e0['Unknown']=0x0]=_0x403535(0x16e),_0x2311e0[_0x2311e0[_0x403535(0x148)]=0x1]=_0x403535(0x148),_0x2311e0[_0x2311e0['Reply']=0x2]=_0x403535(0x163),_0x2311e0[_0x2311e0['Edit']=0x3]=_0x403535(0x145),_0x2311e0[_0x2311e0[_0x403535(0x152)]=0x4]=_0x403535(0x152),_0x2311e0[_0x2311e0[_0x403535(0x183)]=0x5]='Solve',_0x2311e0[_0x2311e0[_0x403535(0x14f)]=-0x1]='UNRECOGNIZED',_0x2311e0))(v||{});const f=_0xe73cc=>c['dayjs'](new Date(+_0xe73cc))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x5847c9,_0x1475f9)=>{const _0x2144fe=_0x403535,_0x11e521=_0x5847c9[_0x2144fe(0x15c)](c[_0x2144fe(0x13f)]),_0x10741b=_0x5847c9[_0x2144fe(0x15c)](P[_0x2144fe(0x12e)]);_0x1475f9['forEach'](_0x2ae380=>{const _0x32c387=_0x2144fe;_0x11e521[_0x32c387(0x182)](_0x2ae380)&&_0x1475f9[_0x32c387(0x178)](_0x2ae380);}),_0x1475f9['size']&&(await _0x10741b[_0x2144fe(0x15c)](_0x2144fe(0x15a),{'params':{'userIDs':[..._0x1475f9]}}))[_0x2144fe(0x15f)][_0x2144fe(0x143)][_0x2144fe(0x17a)](_0x2401cf=>{const _0x54107b=_0x2144fe;_0x2401cf&&_0x11e521[_0x54107b(0x11f)](_0x2401cf);});};var $=Object[_0x403535(0x15e)],E=(_0x1fffc5,_0x125595,_0x168ba7,_0x276501)=>{const _0x49420f=_0x403535;for(var _0x4977d6=_0x276501>0x1?void 0x0:_0x276501?$(_0x125595,_0x168ba7):_0x125595,_0x1dc64c=_0x1fffc5[_0x49420f(0x187)]-0x1,_0x5a1144;_0x1dc64c>=0x0;_0x1dc64c--)(_0x5a1144=_0x1fffc5[_0x1dc64c])&&(_0x4977d6=_0x5a1144(_0x4977d6)||_0x4977d6);return _0x4977d6;},S=(_0x34c7e1,_0x58a81a)=>(_0x56adb2,_0x1846ef)=>_0x58a81a(_0x56adb2,_0x1846ef,_0x34c7e1);function _0x5332(_0x36bc2d,_0x58c07e){_0x36bc2d=_0x36bc2d-0x110;const _0x4ca8b8=_0x4ca8();let _0x5332ac=_0x4ca8b8[_0x36bc2d];return _0x5332ac;}let _=class extends c[_0x403535(0x14c)]{constructor(_0xa80c65,_0x166074,_0x5c760e,_0x172b82){const _0x2e3ca3=_0x403535;super(),this['_commentService']=_0xa80c65,this['_threadCommentModel']=_0x166074,this[_0x2e3ca3(0x11c)]=_0x5c760e,this[_0x2e3ca3(0x132)]=_0x172b82,this['_init'](),this[_0x2e3ca3(0x170)]();}[_0x403535(0x170)](){const _0x3a7d67=_0x403535;this['disposeWithMe'](this['_threadCommentModel'][_0x3a7d67(0x14d)][_0x3a7d67(0x12c)](j['bufferTime'](0x10))[_0x3a7d67(0x177)](_0x460f77=>{const _0x183c46=_0x3a7d67,_0x33d999=new Set();_0x460f77[_0x183c46(0x17a)](_0x4c4788=>{const _0x417d15=_0x183c46;switch(_0x4c4788[_0x417d15(0x168)]){case _0x417d15(0x138):{const _0x177aa9=_0x4c4788[_0x417d15(0x15d)][_0x417d15(0x161)];_0x33d999['add'](_0x177aa9);break;}}}),R(this['_injector'],_0x33d999);}));}[_0x403535(0x114)](){const _0x40faf4=_0x403535;this['disposeWithMe'](this[_0x40faf4(0x11e)][_0x40faf4(0x14d)][_0x40faf4(0x177)](async _0x1114f7=>{const _0x1b6daf=_0x40faf4;var _0x434f54,_0x43fe18,_0x48fe8f,_0xe2b854;const _0x483459=(_0x434f54=this['_threadCommentModel'][_0x1b6daf(0x141)](_0x1114f7[_0x1b6daf(0x185)])[_0x1b6daf(0x11a)](_0x59f6df=>_0x59f6df[_0x1b6daf(0x16b)]===_0x1114f7[_0x1b6daf(0x16b)]))==null?void 0x0:_0x434f54[_0x1b6daf(0x17c)];if(!_0x483459)return;const {unitId:_0x162ee2,subUnitId:_0x5e25eb}=_0x483459;switch(_0x1114f7[_0x1b6daf(0x162)]&&this[_0x1b6daf(0x11c)]['addUser'](_0x1114f7['user']),_0x1114f7[_0x1b6daf(0x168)]){case v[_0x1b6daf(0x148)]:break;case v[_0x1b6daf(0x163)]:{this[_0x1b6daf(0x11b)][_0x1b6daf(0x156)](_0x162ee2,_0x5e25eb,{'unitId':_0x162ee2,'subUnitId':_0x5e25eb,'ref':'','id':_0x1114f7[_0x1b6daf(0x115)],'dT':f(+_0x1114f7['createTimestamp']),'threadId':_0x1114f7[_0x1b6daf(0x16b)],'personId':(_0x48fe8f=(_0x43fe18=_0x1114f7[_0x1b6daf(0x162)])==null?void 0x0:_0x43fe18[_0x1b6daf(0x135)])!=null?_0x48fe8f:_0x1114f7[_0x1b6daf(0x181)],'text':JSON[_0x1b6daf(0x124)](_0x1114f7[_0x1b6daf(0x120)]),'parentId':_0x483459['id']});break;}case v['Delete']:{const _0x487741=this[_0x1b6daf(0x11b)]['getComment'](_0x162ee2,_0x5e25eb,_0x1114f7[_0x1b6daf(0x115)]);_0x487741&&_0x487741['parentId']&&this['_threadCommentModel'][_0x1b6daf(0x180)](_0x162ee2,_0x5e25eb,_0x1114f7[_0x1b6daf(0x115)]);break;}case v['Edit']:{this[_0x1b6daf(0x11b)][_0x1b6daf(0x117)](_0x162ee2,_0x5e25eb,{'commentId':_0x1114f7[_0x1b6daf(0x115)],'text':JSON[_0x1b6daf(0x124)](_0x1114f7[_0x1b6daf(0x120)])});break;}case v[_0x1b6daf(0x183)]:{const _0x127ca9=(_0xe2b854=this[_0x1b6daf(0x11b)][_0x1b6daf(0x141)](_0x1114f7[_0x1b6daf(0x185)])[_0x1b6daf(0x11a)](_0x5271b5=>_0x5271b5[_0x1b6daf(0x16b)]===_0x1114f7[_0x1b6daf(0x16b)]))==null?void 0x0:_0xe2b854[_0x1b6daf(0x17c)];_0x127ca9&&this[_0x1b6daf(0x11b)][_0x1b6daf(0x125)](_0x162ee2,_0x5e25eb,_0x127ca9['id'],_0x1114f7[_0x1b6daf(0x153)]===I[_0x1b6daf(0x111)]);break;}}}));}};_=E([S(0x0,c[_0x403535(0x17b)](b[_0x403535(0x13b)])),S(0x1,c[_0x403535(0x17b)](M[_0x403535(0x16f)])),S(0x2,c['Inject'](c[_0x403535(0x13f)])),S(0x3,c[_0x403535(0x17b)](c[_0x403535(0x186)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x403535(0x15e)],x=(_0x25e960,_0x5269e5,_0x55f75f,_0x136c07)=>{const _0x11c781=_0x403535;for(var _0x4233a4=_0x136c07>0x1?void 0x0:_0x136c07?A(_0x5269e5,_0x55f75f):_0x5269e5,_0x537633=_0x25e960[_0x11c781(0x187)]-0x1,_0x97c40c;_0x537633>=0x0;_0x537633--)(_0x97c40c=_0x25e960[_0x537633])&&(_0x4233a4=_0x97c40c(_0x4233a4)||_0x4233a4);return _0x4233a4;},C=(_0x1111b1,_0xb473ec)=>(_0x2143d8,_0x5b366f)=>_0xb473ec(_0x2143d8,_0x5b366f,_0x1111b1);function Y(_0x4141ab,_0x5c5578){const _0x5975ff=_0x403535,_0x4f157b=_0x4141ab[_0x5975ff(0x13e)][0x0];return{..._0x5c5578,'id':_0x4f157b[_0x5975ff(0x115)],'resolved':_0x4141ab[_0x5975ff(0x153)]===0x1,'dT':f(_0x4f157b['createTimestamp']),'personId':_0x4f157b['userId'],'threadId':_0x4f157b[_0x5975ff(0x16b)]};}function G(_0xd05cff,_0x5e6a27,_0x27fefb){const _0x4a168a=_0x403535;var _0x13988a,_0x2953e3;if(((_0x2953e3=(_0x13988a=_0xd05cff==null?void 0x0:_0xd05cff[_0x4a168a(0x13e)])==null?void 0x0:_0x13988a[_0x4a168a(0x187)])!=null?_0x2953e3:0x0)>0x0){const _0x178987=(_0x9e613b,_0x1b3077)=>({'id':_0x9e613b[_0x4a168a(0x115)],'threadId':_0x9e613b[_0x4a168a(0x16b)],'dT':f(_0x9e613b['createTimestamp']),'personId':_0x9e613b[_0x4a168a(0x181)],'resolved':_0xd05cff[_0x4a168a(0x153)]===I[_0x4a168a(0x111)],'unitId':_0x5e6a27,'subUnitId':_0x27fefb,'text':JSON[_0x4a168a(0x124)](_0x9e613b[_0x4a168a(0x120)]),'parentId':_0x1b3077}),_0xa57d7f=_0x178987(_0xd05cff[_0x4a168a(0x13e)][0x0]);return{..._0xa57d7f,'children':_0xd05cff['replies']['slice'](0x1)[_0x4a168a(0x12a)](_0x42d106=>_0x178987(_0x42d106,_0xa57d7f['id']))};}return null;}let p=class{constructor(_0x4605fa,_0x23be94,_0x136b59){const _0x50fdf6=_0x403535;this[_0x50fdf6(0x157)]=_0x4605fa,this['_userService']=_0x23be94,this['_sessionService']=_0x136b59;}async[_0x403535(0x156)](_0x43039c){const _0xc81522=_0x403535;var _0x16563d,_0x3dde88;const {parentId:_0x25803d,unitId:_0x48b154,text:_0x1a9370,threadId:_0x53d78d}=_0x43039c,_0x1f1684=(_0x3dde88=(_0x16563d=_0x1a9370['customRanges'])==null?void 0x0:_0x16563d[_0xc81522(0x15b)](_0x245a6c=>_0x245a6c[_0xc81522(0x144)]===c[_0xc81522(0x147)][_0xc81522(0x13c)])[_0xc81522(0x12a)](_0x43ee=>_0x43ee[_0xc81522(0x166)]))!=null?_0x3dde88:[],_0x4f3450=JSON['stringify'](_0x1a9370),_0x76151=(await this[_0xc81522(0x129)][_0xc81522(0x11d)](_0x48b154))[_0xc81522(0x119)]();if(_0x25803d){const _0x55655c={'memberId':_0x76151,'unitId':_0x48b154,'content':_0x4f3450,'mention':_0x1f1684,'threadId':_0x53d78d},_0x601178=(await this[_0xc81522(0x157)][_0xc81522(0x17f)](_0xc81522(0x154)+_0x48b154+'/reply',{'body':_0x55655c}))['body'][_0xc81522(0x173)];return{..._0x43039c,'id':_0x601178[_0xc81522(0x115)],'dT':c[_0xc81522(0x165)](+_0x601178[_0xc81522(0x142)])[_0xc81522(0x136)](_0xc81522(0x113)),'personId':_0x601178[_0xc81522(0x181)]};}else{const _0x355d7a={'memberId':_0x76151,'unitId':_0x48b154,'content':_0x4f3450,'mention':_0x1f1684},_0x3376f2=await this[_0xc81522(0x157)]['post'](_0xc81522(0x154)+_0x48b154+_0xc81522(0x12d),{'body':_0x355d7a});return Y(_0x3376f2[_0xc81522(0x15f)][_0xc81522(0x112)],_0x43039c);}}async[_0x403535(0x117)](_0x1b6a4e){const _0x22703e=_0x403535;var _0x396b2a,_0x184b8c;const {text:_0xb8f7ec,unitId:_0x46ea45}=_0x1b6a4e,_0x39c718=(_0x184b8c=(_0x396b2a=_0xb8f7ec[_0x22703e(0x116)])==null?void 0x0:_0x396b2a[_0x22703e(0x15b)](_0x4e058b=>_0x4e058b[_0x22703e(0x144)]===c[_0x22703e(0x147)][_0x22703e(0x13c)])[_0x22703e(0x12a)](_0x249209=>_0x249209[_0x22703e(0x166)]))!=null?_0x184b8c:[],_0xfa7be5=JSON[_0x22703e(0x110)](_0xb8f7ec),_0x304ece=_0x1b6a4e[_0x22703e(0x16b)],_0x3469b2=_0x1b6a4e['id'],_0x64c318={'memberId':(await this[_0x22703e(0x129)]['requireSession'](_0x46ea45))[_0x22703e(0x119)](),'unitId':_0x46ea45,'threadId':_0x304ece,'mention':_0x39c718,'content':_0xfa7be5,'replyId':_0x3469b2},_0x129e6=await this['_httpService']['post'](_0x22703e(0x154)+_0x46ea45+_0x22703e(0x169),{'body':_0x64c318});return!_0x129e6[_0x22703e(0x15f)]['error']||_0x129e6[_0x22703e(0x15f)][_0x22703e(0x130)][_0x22703e(0x123)]===0x1;}async['resolveComment'](_0x4448fd){const _0x384880=_0x403535,{unitId:_0x56a63f}=_0x4448fd,_0x825319=_0x4448fd['threadId'],_0x24535c={'memberId':this[_0x384880(0x11c)][_0x384880(0x131)]()['userID'],'unitId':_0x56a63f,'threadId':_0x825319,'solved':_0x4448fd[_0x384880(0x179)]?I['Solved']:I[_0x384880(0x16d)]},_0x361012=await this['_httpService'][_0x384880(0x17f)](_0x384880(0x154)+_0x56a63f+'/solved',{'body':_0x24535c});return!_0x361012[_0x384880(0x15f)][_0x384880(0x130)]||_0x361012[_0x384880(0x15f)][_0x384880(0x130)][_0x384880(0x123)]===0x1;}async[_0x403535(0x180)](_0x4df98b,_0x336506,_0x41658e,_0x39bac3){const _0x68287=_0x403535,_0x4dc819={'memberId':(await this['_sessionService'][_0x68287(0x11d)](_0x4df98b))['getMemberID'](),'threadId':_0x41658e,'replyId':_0x39bac3,'unitId':_0x4df98b},_0xfe1463=await this['_httpService'][_0x68287(0x17f)](_0x68287(0x154)+_0x4df98b+_0x68287(0x14e),{'body':_0x4dc819});return!_0xfe1463[_0x68287(0x15f)][_0x68287(0x130)]||_0xfe1463[_0x68287(0x15f)]['error'][_0x68287(0x123)]===0x1;}async[_0x403535(0x184)](_0x57f344,_0x3cf31b,_0xedafc2){const _0x22fad9=_0x403535,_0x1ed200={'unitId':_0x57f344,'threadId':_0xedafc2},_0x5e797f=await this[_0x22fad9(0x157)][_0x22fad9(0x17f)]('/universer-api/comment/unit/'+_0x57f344+_0x22fad9(0x121),{'body':_0x1ed200}),_0x495e7e=_0xedafc2['map'](_0x5be1be=>G(_0x5e797f[_0x22fad9(0x15f)][_0x22fad9(0x175)][_0x5be1be],_0x57f344,_0x3cf31b))['filter'](Boolean);return Object[_0x22fad9(0x164)](_0x5e797f[_0x22fad9(0x15f)][_0x22fad9(0x143)])[_0x22fad9(0x17a)](_0x1b7f35=>{const _0x4eef60=_0x22fad9;this[_0x4eef60(0x11c)][_0x4eef60(0x11f)](_0x1b7f35);}),_0x495e7e;}[_0x403535(0x133)](_0x10de0f){const _0x2f1dc4=_0x403535;return{'id':_0x10de0f['id'],'threadId':_0x10de0f[_0x2f1dc4(0x16b)],'ref':_0x10de0f['ref']};}};p=x([C(0x0,c[_0x403535(0x17b)](P['HTTPService'])),C(0x1,c[_0x403535(0x17b)](c[_0x403535(0x13f)])),C(0x2,c['Inject'](b[_0x403535(0x160)]))],p);var H=Object[_0x403535(0x15e)],J=(_0x42c022,_0xe15ed3,_0xad5346,_0x417de1)=>{for(var _0x3811be=_0x417de1>0x1?void 0x0:_0x417de1?H(_0xe15ed3,_0xad5346):_0xe15ed3,_0x282d7a=_0x42c022['length']-0x1,_0x1a3ff0;_0x282d7a>=0x0;_0x282d7a--)(_0x1a3ff0=_0x42c022[_0x282d7a])&&(_0x3811be=_0x1a3ff0(_0x3811be)||_0x3811be);return _0x3811be;},y=(_0x4c893e,_0x5a0469)=>(_0x1df316,_0x3b9171)=>_0x5a0469(_0x1df316,_0x3b9171,_0x4c893e);let g=class extends c[_0x403535(0x14c)]{constructor(_0x4ab240,_0x5bef83){const _0x57b0be=_0x403535;super(),this[_0x57b0be(0x159)]=_0x4ab240,this[_0x57b0be(0x118)]=_0x5bef83,this[_0x57b0be(0x122)]();}['_initDataSource'](){const _0x3c636f=_0x403535;this[_0x3c636f(0x159)][_0x3c636f(0x14a)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x403535(0x17e)]),y(0x1,c[_0x403535(0x17b)](p))],g);var F=Object[_0x403535(0x126)],L=Object[_0x403535(0x15e)],Z=(_0xb6f3e7,_0x48fd49,_0x5745a4)=>_0x48fd49 in _0xb6f3e7?F(_0xb6f3e7,_0x48fd49,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5745a4}):_0xb6f3e7[_0x48fd49]=_0x5745a4,W=(_0x2c7ec7,_0x3abdd2,_0x52b61b,_0x3966ab)=>{const _0x287452=_0x403535;for(var _0x3aedb6=_0x3966ab>0x1?void 0x0:_0x3966ab?L(_0x3abdd2,_0x52b61b):_0x3abdd2,_0x136b8b=_0x2c7ec7[_0x287452(0x187)]-0x1,_0x2016bf;_0x136b8b>=0x0;_0x136b8b--)(_0x2016bf=_0x2c7ec7[_0x136b8b])&&(_0x3aedb6=_0x2016bf(_0x3aedb6)||_0x3aedb6);return _0x3aedb6;},O=(_0x3b6df4,_0x4ae35e)=>(_0x237ec8,_0x581e20)=>_0x4ae35e(_0x237ec8,_0x581e20,_0x3b6df4),N=(_0x12e604,_0x483f30,_0x2ba495)=>Z(_0x12e604,typeof _0x483f30!=_0x403535(0x17d)?_0x483f30+'':_0x483f30,_0x2ba495);exports[_0x403535(0x158)]=class extends c['Plugin']{constructor(_0x4a9a0b=D,_0x5067ce,_0xe370d6){const _0x53417e=_0x403535;super(),this[_0x53417e(0x171)]=_0x4a9a0b,this[_0x53417e(0x132)]=_0x5067ce,this[_0x53417e(0x176)]=_0xe370d6;const {..._0x712c50}=c[_0x53417e(0x137)]({},D,this[_0x53417e(0x171)]);this[_0x53417e(0x176)][_0x53417e(0x16c)](q,_0x712c50);}['onStarting'](){const _0x5bcd99=_0x403535;[[p],[g],[_]][_0x5bcd99(0x17a)](_0xcbb101=>{const _0x5becab=_0x5bcd99;this[_0x5becab(0x132)][_0x5becab(0x138)](_0xcbb101);});}[_0x403535(0x12b)](){const _0x181e0d=_0x403535;this[_0x181e0d(0x132)][_0x181e0d(0x15c)](g),this['_injector'][_0x181e0d(0x15c)](_);}},N(exports[_0x403535(0x158)],'pluginName',U),N(exports[_0x403535(0x158)],_0x403535(0x168),c[_0x403535(0x13a)][_0x403535(0x128)]),exports[_0x403535(0x158)]=W([c[_0x403535(0x12f)](w[_0x403535(0x151)],b[_0x403535(0x140)],T[_0x403535(0x127)]),O(0x1,c[_0x403535(0x17b)](c['Injector'])),O(0x2,c[_0x403535(0x139)])],exports[_0x403535(0x158)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x34024c=_0x5be3;(function(_0x5c622f,_0x52bf93){const _0x5c70d0=_0x5be3,_0x3249d4=_0x5c622f();while(!![]){try{const _0x52e758=-parseInt(_0x5c70d0(0x1d0))/0x1+parseInt(_0x5c70d0(0x1cb))/0x2*(-parseInt(_0x5c70d0(0x1d6))/0x3)+-parseInt(_0x5c70d0(0x1b8))/0x4+-parseInt(_0x5c70d0(0x1b3))/0x5+parseInt(_0x5c70d0(0x1dd))/0x6+-parseInt(_0x5c70d0(0x1cf))/0x7+parseInt(_0x5c70d0(0x19b))/0x8;if(_0x52e758===_0x52bf93)break;else _0x3249d4['push'](_0x3249d4['shift']());}catch(_0x1bb696){_0x3249d4['push'](_0x3249d4['shift']());}}}(_0x2c5a,0xb8804));import{CommentService as _0x1b5be1,CollaborationSessionService as _0x17f016,UniverCollaborationClientPlugin as _0x46d5fb}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xf589bd}from'@univerjs-pro/license';import{dayjs as _0x57f149,UserManagerService as _0x1feaec,Inject as _0x1641e7,Injector as _0x5130d8,Disposable as _0x577d5c,CustomRangeType as _0x48489b,UniverInstanceType as _0x1cfbda,DependentOn as _0x114dff,IConfigService as _0x10c05b,Plugin as _0x5ad258,merge as _0x239049}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59bd5d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa45dbf,IThreadCommentDataSourceService as _0x18ef7c}from'@univerjs/thread-comment';import{bufferTime as _0x2d9430}from'rxjs';import{HTTPService as _0x55367e}from'@univerjs/network';const W=_0x34024c(0x1d5);var I=(_0x3390e7=>(_0x3390e7[_0x3390e7[_0x34024c(0x1e5)]=0x0]=_0x34024c(0x1e5),_0x3390e7[_0x3390e7[_0x34024c(0x1ba)]=0x1]=_0x34024c(0x1ba),_0x3390e7[_0x3390e7[_0x34024c(0x1c9)]=-0x1]=_0x34024c(0x1c9),_0x3390e7))(I||{}),v=(_0x45831e=>(_0x45831e[_0x45831e[_0x34024c(0x1de)]=0x0]='Unknown',_0x45831e[_0x45831e[_0x34024c(0x19c)]=0x1]='Add',_0x45831e[_0x45831e['Reply']=0x2]=_0x34024c(0x1f8),_0x45831e[_0x45831e[_0x34024c(0x1c1)]=0x3]=_0x34024c(0x1c1),_0x45831e[_0x45831e['Delete']=0x4]='Delete',_0x45831e[_0x45831e[_0x34024c(0x1a2)]=0x5]=_0x34024c(0x1a2),_0x45831e[_0x45831e[_0x34024c(0x1c9)]=-0x1]=_0x34024c(0x1c9),_0x45831e))(v||{});const y=_0x5b355d=>_0x57f149(new Date(+_0x5b355d))['format'](_0x34024c(0x1a6)),B=async(_0x17c5a2,_0x16a130)=>{const _0x41c8aa=_0x34024c,_0x3f72e9=_0x17c5a2[_0x41c8aa(0x1d9)](_0x1feaec),_0xad84a0=_0x17c5a2[_0x41c8aa(0x1d9)](_0x55367e);_0x16a130[_0x41c8aa(0x1f6)](_0x4f5a43=>{const _0x4976e8=_0x41c8aa;_0x3f72e9[_0x4976e8(0x1f3)](_0x4f5a43)&&_0x16a130[_0x4976e8(0x200)](_0x4f5a43);}),_0x16a130[_0x41c8aa(0x1ec)]&&(await _0xad84a0[_0x41c8aa(0x1d9)](_0x41c8aa(0x1db),{'params':{'userIDs':[..._0x16a130]}}))[_0x41c8aa(0x1b9)][_0x41c8aa(0x1d4)][_0x41c8aa(0x1f6)](_0x842289=>{const _0x5e289f=_0x41c8aa;_0x842289&&_0x3f72e9[_0x5e289f(0x1b6)](_0x842289);});};var K=Object[_0x34024c(0x1cc)],V=(_0x5f3d30,_0x1c2704,_0x55bb9d,_0x5315d7)=>{const _0xf0b0c2=_0x34024c;for(var _0x275314=_0x5315d7>0x1?void 0x0:_0x5315d7?K(_0x1c2704,_0x55bb9d):_0x1c2704,_0x2dee09=_0x5f3d30[_0xf0b0c2(0x1aa)]-0x1,_0x56e849;_0x2dee09>=0x0;_0x2dee09--)(_0x56e849=_0x5f3d30[_0x2dee09])&&(_0x275314=_0x56e849(_0x275314)||_0x275314);return _0x275314;},p=(_0x57b42d,_0x31ecf3)=>(_0x24c347,_0x3cd345)=>_0x31ecf3(_0x24c347,_0x3cd345,_0x57b42d);let _=class extends _0x577d5c{constructor(_0x5ae4a0,_0x47ab27,_0x35fb7d,_0x4ceb57){const _0x17c7ed=_0x34024c;super(),this['_commentService']=_0x5ae4a0,this['_threadCommentModel']=_0x47ab27,this[_0x17c7ed(0x1c4)]=_0x35fb7d,this['_injector']=_0x4ceb57,this[_0x17c7ed(0x1f7)](),this[_0x17c7ed(0x1b0)]();}[_0x34024c(0x1b0)](){const _0x33b2bc=_0x34024c;this[_0x33b2bc(0x1fb)](this[_0x33b2bc(0x1dc)][_0x33b2bc(0x1e1)][_0x33b2bc(0x1fd)](_0x2d9430(0x10))['subscribe'](_0x3059da=>{const _0x185ce8=_0x33b2bc,_0x12c00a=new Set();_0x3059da[_0x185ce8(0x1f6)](_0x1cdf69=>{const _0x1a20fc=_0x185ce8;switch(_0x1cdf69['type']){case _0x1a20fc(0x1e8):{const _0x29690f=_0x1cdf69[_0x1a20fc(0x1ae)][_0x1a20fc(0x1bf)];_0x12c00a['add'](_0x29690f);break;}}}),B(this[_0x185ce8(0x1bd)],_0x12c00a);}));}['_init'](){const _0x493807=_0x34024c;this[_0x493807(0x1fb)](this['_commentService'][_0x493807(0x1e1)]['subscribe'](async _0x50ec9a=>{const _0x521f6a=_0x493807;var _0x3d1775,_0xfd8eac,_0x2c265f,_0x42e616;const _0x51f1a3=(_0x3d1775=this['_threadCommentModel']['getUnit'](_0x50ec9a[_0x521f6a(0x1a4)])[_0x521f6a(0x1e9)](_0x4e49a0=>_0x4e49a0[_0x521f6a(0x1f9)]===_0x50ec9a['threadId']))==null?void 0x0:_0x3d1775[_0x521f6a(0x1df)];if(!_0x51f1a3)return;const {unitId:_0x2e9807,subUnitId:_0x5da9ae}=_0x51f1a3;switch(_0x50ec9a[_0x521f6a(0x1f1)]&&this[_0x521f6a(0x1c4)][_0x521f6a(0x1b6)](_0x50ec9a[_0x521f6a(0x1f1)]),_0x50ec9a[_0x521f6a(0x1ea)]){case v[_0x521f6a(0x19c)]:break;case v[_0x521f6a(0x1f8)]:{this[_0x521f6a(0x1dc)][_0x521f6a(0x1e7)](_0x2e9807,_0x5da9ae,{'unitId':_0x2e9807,'subUnitId':_0x5da9ae,'ref':'','id':_0x50ec9a[_0x521f6a(0x1b1)],'dT':y(+_0x50ec9a['createTimestamp']),'threadId':_0x50ec9a[_0x521f6a(0x1f9)],'personId':(_0x2c265f=(_0xfd8eac=_0x50ec9a[_0x521f6a(0x1f1)])==null?void 0x0:_0xfd8eac[_0x521f6a(0x1d7)])!=null?_0x2c265f:_0x50ec9a[_0x521f6a(0x19d)],'text':JSON['parse'](_0x50ec9a['content']),'parentId':_0x51f1a3['id']});break;}case v[_0x521f6a(0x1ef)]:{const _0x28dc6e=this['_threadCommentModel'][_0x521f6a(0x1a0)](_0x2e9807,_0x5da9ae,_0x50ec9a['replyId']);_0x28dc6e&&_0x28dc6e[_0x521f6a(0x1b2)]&&this[_0x521f6a(0x1dc)][_0x521f6a(0x1fe)](_0x2e9807,_0x5da9ae,_0x50ec9a[_0x521f6a(0x1b1)]);break;}case v['Edit']:{this[_0x521f6a(0x1dc)][_0x521f6a(0x1c0)](_0x2e9807,_0x5da9ae,{'commentId':_0x50ec9a['replyId'],'text':JSON[_0x521f6a(0x1b5)](_0x50ec9a[_0x521f6a(0x1eb)])});break;}case v['Solve']:{const _0x525ad2=(_0x42e616=this['_threadCommentModel'][_0x521f6a(0x202)](_0x50ec9a[_0x521f6a(0x1a4)])[_0x521f6a(0x1e9)](_0x300f7e=>_0x300f7e[_0x521f6a(0x1f9)]===_0x50ec9a[_0x521f6a(0x1f9)]))==null?void 0x0:_0x42e616[_0x521f6a(0x1df)];_0x525ad2&&this[_0x521f6a(0x1dc)][_0x521f6a(0x1d1)](_0x2e9807,_0x5da9ae,_0x525ad2['id'],_0x50ec9a[_0x521f6a(0x1fa)]===I[_0x521f6a(0x1ba)]);break;}}}));}};function _0x5be3(_0x49aadc,_0x1175b0){_0x49aadc=_0x49aadc-0x19a;const _0x2c5a1f=_0x2c5a();let _0x5be38c=_0x2c5a1f[_0x49aadc];return _0x5be38c;}function _0x2c5a(){const _0x185e46=['_sessionService','pipe','deleteComment','rangeType','delete','_httpService','getUnit','values','29070976lzuoVY','Add','userId','setConfig','_threadCommentDataSource','getComment','pluginName','Solve','/add','unitId','getMemberID','YYYY/MM/DD\x20HH:mm','thread-comment-data-source.config','/solved','comment','length','/universer-api/comment/unit/','COMMENT','reply','payload','ref','_initUserSync','replyId','parentId','7023835WjPdcU','_threadCommentDataSourceService','parse','addUser','filter','1804348yOPkrL','body','Solved','_config','_configService','_injector','/edit','personId','updateComment','Edit','UNIVER_UNKNOWN','rangeId','_userService','listComments','replies','saveCommentToSnapshot','map','UNRECOGNIZED','stringify','51886vfHlRC','getOwnPropertyDescriptor','format','post','127785yQLyfq','205305ogzASL','resolveComment','createTimestamp','/delete','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','93hSZgMM','userID','requireSession','get','/list','/universer-api/user/list','_threadCommentModel','32946ZGHgJB','Unknown','root','symbol','commentUpdate$','syncUpdateMutationToColla','code','getCurrentUser','OpenOrReOpen','/reply','addComment','add','find','type','content','size','comments','error','Delete','_initDataSource','user','customRanges','getUser','resolved','onStarting','forEach','_init','Reply','threadId','solved','disposeWithMe'];_0x2c5a=function(){return _0x185e46;};return _0x2c5a();}_=V([p(0x0,_0x1641e7(_0x1b5be1)),p(0x1,_0x1641e7(_0xa45dbf)),p(0x2,_0x1641e7(_0x1feaec)),p(0x3,_0x1641e7(_0x5130d8))],_);const z=_0x34024c(0x1a7),O={};var k=Object[_0x34024c(0x1cc)],Q=(_0x359413,_0x5dc9a8,_0x23fd4a,_0x4cab43)=>{const _0x1d3788=_0x34024c;for(var _0x4ab8cc=_0x4cab43>0x1?void 0x0:_0x4cab43?k(_0x5dc9a8,_0x23fd4a):_0x5dc9a8,_0x47e372=_0x359413[_0x1d3788(0x1aa)]-0x1,_0x46e32c;_0x47e372>=0x0;_0x47e372--)(_0x46e32c=_0x359413[_0x47e372])&&(_0x4ab8cc=_0x46e32c(_0x4ab8cc)||_0x4ab8cc);return _0x4ab8cc;},b=(_0x1ce649,_0x3388af)=>(_0xf78e80,_0x465caa)=>_0x3388af(_0xf78e80,_0x465caa,_0x1ce649);function X(_0x3a1cd0,_0x13f02d){const _0x5c26bd=_0x34024c,_0x1b690d=_0x3a1cd0[_0x5c26bd(0x1c6)][0x0];return{..._0x13f02d,'id':_0x1b690d[_0x5c26bd(0x1b1)],'resolved':_0x3a1cd0[_0x5c26bd(0x1fa)]===0x1,'dT':y(_0x1b690d[_0x5c26bd(0x1d2)]),'personId':_0x1b690d['userId'],'threadId':_0x1b690d['threadId']};}function ee(_0x1856fa,_0x465b27,_0x264b51){const _0x334cee=_0x34024c;var _0xbb920e,_0x421e1b;if(((_0x421e1b=(_0xbb920e=_0x1856fa==null?void 0x0:_0x1856fa[_0x334cee(0x1c6)])==null?void 0x0:_0xbb920e['length'])!=null?_0x421e1b:0x0)>0x0){const _0x305c46=(_0xcf0558,_0x50c12f)=>({'id':_0xcf0558['replyId'],'threadId':_0xcf0558[_0x334cee(0x1f9)],'dT':y(_0xcf0558[_0x334cee(0x1d2)]),'personId':_0xcf0558['userId'],'resolved':_0x1856fa[_0x334cee(0x1fa)]===I[_0x334cee(0x1ba)],'unitId':_0x465b27,'subUnitId':_0x264b51,'text':JSON[_0x334cee(0x1b5)](_0xcf0558[_0x334cee(0x1eb)]),'parentId':_0x50c12f}),_0x583def=_0x305c46(_0x1856fa[_0x334cee(0x1c6)][0x0]);return{..._0x583def,'children':_0x1856fa[_0x334cee(0x1c6)]['slice'](0x1)[_0x334cee(0x1c8)](_0x55d94c=>_0x305c46(_0x55d94c,_0x583def['id']))};}return null;}let S=class{constructor(_0x1e804f,_0x356f43,_0x1bcccc){const _0x2adbc2=_0x34024c;this[_0x2adbc2(0x201)]=_0x1e804f,this['_userService']=_0x356f43,this[_0x2adbc2(0x1fc)]=_0x1bcccc;}async[_0x34024c(0x1e7)](_0x2088cc){const _0x2a1cb5=_0x34024c;var _0x2f1687,_0x1aee98;const {parentId:_0x3ef606,unitId:_0xdccd3e,text:_0x241f43,threadId:_0x539130}=_0x2088cc,_0x10b8e8=(_0x1aee98=(_0x2f1687=_0x241f43[_0x2a1cb5(0x1f2)])==null?void 0x0:_0x2f1687[_0x2a1cb5(0x1b7)](_0x588708=>_0x588708[_0x2a1cb5(0x1ff)]===_0x48489b[_0x2a1cb5(0x1ac)])[_0x2a1cb5(0x1c8)](_0x3f6654=>_0x3f6654[_0x2a1cb5(0x1c3)]))!=null?_0x1aee98:[],_0x5367b7=JSON[_0x2a1cb5(0x1ca)](_0x241f43),_0x5246c7=(await this[_0x2a1cb5(0x1fc)][_0x2a1cb5(0x1d8)](_0xdccd3e))[_0x2a1cb5(0x1a5)]();if(_0x3ef606){const _0x37e11b={'memberId':_0x5246c7,'unitId':_0xdccd3e,'content':_0x5367b7,'mention':_0x10b8e8,'threadId':_0x539130},_0x1b57ab=(await this[_0x2a1cb5(0x201)][_0x2a1cb5(0x1ce)](_0x2a1cb5(0x1ab)+_0xdccd3e+_0x2a1cb5(0x1e6),{'body':_0x37e11b}))[_0x2a1cb5(0x1b9)][_0x2a1cb5(0x1ad)];return{..._0x2088cc,'id':_0x1b57ab[_0x2a1cb5(0x1b1)],'dT':_0x57f149(+_0x1b57ab[_0x2a1cb5(0x1d2)])[_0x2a1cb5(0x1cd)](_0x2a1cb5(0x1a6)),'personId':_0x1b57ab[_0x2a1cb5(0x19d)]};}else{const _0x398d98={'memberId':_0x5246c7,'unitId':_0xdccd3e,'content':_0x5367b7,'mention':_0x10b8e8},_0x3ee03e=await this[_0x2a1cb5(0x201)][_0x2a1cb5(0x1ce)](_0x2a1cb5(0x1ab)+_0xdccd3e+_0x2a1cb5(0x1a3),{'body':_0x398d98});return X(_0x3ee03e[_0x2a1cb5(0x1b9)][_0x2a1cb5(0x1a9)],_0x2088cc);}}async['updateComment'](_0x5ea9b0){const _0x309747=_0x34024c;var _0x5a7bb0,_0x549720;const {text:_0x550b5c,unitId:_0x8ebd09}=_0x5ea9b0,_0xc3b6df=(_0x549720=(_0x5a7bb0=_0x550b5c['customRanges'])==null?void 0x0:_0x5a7bb0['filter'](_0x10880e=>_0x10880e[_0x309747(0x1ff)]===_0x48489b[_0x309747(0x1ac)])['map'](_0xfaffb7=>_0xfaffb7[_0x309747(0x1c3)]))!=null?_0x549720:[],_0x2df98d=JSON['stringify'](_0x550b5c),_0x5b5b47=_0x5ea9b0[_0x309747(0x1f9)],_0x223063=_0x5ea9b0['id'],_0x255e5f={'memberId':(await this[_0x309747(0x1fc)]['requireSession'](_0x8ebd09))[_0x309747(0x1a5)](),'unitId':_0x8ebd09,'threadId':_0x5b5b47,'mention':_0xc3b6df,'content':_0x2df98d,'replyId':_0x223063},_0x2a07e3=await this['_httpService'][_0x309747(0x1ce)]('/universer-api/comment/unit/'+_0x8ebd09+_0x309747(0x1be),{'body':_0x255e5f});return!_0x2a07e3['body'][_0x309747(0x1ee)]||_0x2a07e3[_0x309747(0x1b9)][_0x309747(0x1ee)][_0x309747(0x1e3)]===0x1;}async[_0x34024c(0x1d1)](_0x10a7ea){const _0x48a59c=_0x34024c,{unitId:_0x3ebd04}=_0x10a7ea,_0x353576=_0x10a7ea[_0x48a59c(0x1f9)],_0x3d54de={'memberId':this[_0x48a59c(0x1c4)][_0x48a59c(0x1e4)]()['userID'],'unitId':_0x3ebd04,'threadId':_0x353576,'solved':_0x10a7ea[_0x48a59c(0x1f4)]?I[_0x48a59c(0x1ba)]:I[_0x48a59c(0x1e5)]},_0x10164b=await this[_0x48a59c(0x201)]['post'](_0x48a59c(0x1ab)+_0x3ebd04+_0x48a59c(0x1a8),{'body':_0x3d54de});return!_0x10164b['body'][_0x48a59c(0x1ee)]||_0x10164b[_0x48a59c(0x1b9)][_0x48a59c(0x1ee)]['code']===0x1;}async['deleteComment'](_0x539f6e,_0x4f9213,_0x52b5a3,_0x36a12f){const _0x1e7a30=_0x34024c,_0x26732b={'memberId':(await this[_0x1e7a30(0x1fc)][_0x1e7a30(0x1d8)](_0x539f6e))[_0x1e7a30(0x1a5)](),'threadId':_0x52b5a3,'replyId':_0x36a12f,'unitId':_0x539f6e},_0x43d90f=await this[_0x1e7a30(0x201)][_0x1e7a30(0x1ce)](_0x1e7a30(0x1ab)+_0x539f6e+_0x1e7a30(0x1d3),{'body':_0x26732b});return!_0x43d90f[_0x1e7a30(0x1b9)][_0x1e7a30(0x1ee)]||_0x43d90f[_0x1e7a30(0x1b9)][_0x1e7a30(0x1ee)][_0x1e7a30(0x1e3)]===0x1;}async[_0x34024c(0x1c5)](_0x115913,_0x483dc1,_0x522ecf){const _0x4413d0=_0x34024c,_0x323056={'unitId':_0x115913,'threadId':_0x522ecf},_0x102b59=await this[_0x4413d0(0x201)][_0x4413d0(0x1ce)](_0x4413d0(0x1ab)+_0x115913+_0x4413d0(0x1da),{'body':_0x323056}),_0x3c6f47=_0x522ecf['map'](_0x2ed0e9=>ee(_0x102b59[_0x4413d0(0x1b9)][_0x4413d0(0x1ed)][_0x2ed0e9],_0x115913,_0x483dc1))[_0x4413d0(0x1b7)](Boolean);return Object[_0x4413d0(0x19a)](_0x102b59[_0x4413d0(0x1b9)]['users'])[_0x4413d0(0x1f6)](_0x2ce036=>{const _0x41efa9=_0x4413d0;this[_0x41efa9(0x1c4)][_0x41efa9(0x1b6)](_0x2ce036);}),_0x3c6f47;}[_0x34024c(0x1c7)](_0x459c2e){const _0x501831=_0x34024c;return{'id':_0x459c2e['id'],'threadId':_0x459c2e[_0x501831(0x1f9)],'ref':_0x459c2e[_0x501831(0x1af)]};}};S=Q([b(0x0,_0x1641e7(_0x55367e)),b(0x1,_0x1641e7(_0x1feaec)),b(0x2,_0x1641e7(_0x17f016))],S);var re=Object[_0x34024c(0x1cc)],te=(_0x3e4e4f,_0x99c6cf,_0x362df6,_0xb328f4)=>{const _0x2bdfeb=_0x34024c;for(var _0x40f84c=_0xb328f4>0x1?void 0x0:_0xb328f4?re(_0x99c6cf,_0x362df6):_0x99c6cf,_0x400bf7=_0x3e4e4f[_0x2bdfeb(0x1aa)]-0x1,_0x50e93b;_0x400bf7>=0x0;_0x400bf7--)(_0x50e93b=_0x3e4e4f[_0x400bf7])&&(_0x40f84c=_0x50e93b(_0x40f84c)||_0x40f84c);return _0x40f84c;},M=(_0x1f6019,_0x27e34f)=>(_0x5f2b6c,_0x4377d3)=>_0x27e34f(_0x5f2b6c,_0x4377d3,_0x1f6019);let f=class extends _0x577d5c{constructor(_0x3d56b7,_0x4b8689){const _0xea98e3=_0x34024c;super(),this['_threadCommentDataSourceService']=_0x3d56b7,this[_0xea98e3(0x19f)]=_0x4b8689,this['_initDataSource']();}[_0x34024c(0x1f0)](){const _0x528918=_0x34024c;this[_0x528918(0x1b4)]['dataSource']=this[_0x528918(0x19f)],this['_threadCommentDataSourceService'][_0x528918(0x1e2)]=!0x1;}};f=te([M(0x0,_0x18ef7c),M(0x1,_0x1641e7(S))],f);var se=Object['defineProperty'],oe=Object[_0x34024c(0x1cc)],ne=(_0xf90f18,_0x5c2e80,_0x419594)=>_0x5c2e80 in _0xf90f18?se(_0xf90f18,_0x5c2e80,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x419594}):_0xf90f18[_0x5c2e80]=_0x419594,ie=(_0x2e92bc,_0x36598e,_0x59db40,_0x11915c)=>{for(var _0x4d65f7=_0x11915c>0x1?void 0x0:_0x11915c?oe(_0x36598e,_0x59db40):_0x36598e,_0x76265b=_0x2e92bc['length']-0x1,_0x33d925;_0x76265b>=0x0;_0x76265b--)(_0x33d925=_0x2e92bc[_0x76265b])&&(_0x4d65f7=_0x33d925(_0x4d65f7)||_0x4d65f7);return _0x4d65f7;},N=(_0x2970a4,_0x49b1f0)=>(_0xc86579,_0x2b6f40)=>_0x49b1f0(_0xc86579,_0x2b6f40,_0x2970a4),$=(_0x5eb057,_0x4254f3,_0x4fd376)=>ne(_0x5eb057,typeof _0x4254f3!=_0x34024c(0x1e0)?_0x4254f3+'':_0x4254f3,_0x4fd376);let g=class extends _0x5ad258{constructor(_0x1692ad=O,_0x1058e8,_0x33ea62){const _0x9aa18d=_0x34024c;super(),this['_config']=_0x1692ad,this[_0x9aa18d(0x1bd)]=_0x1058e8,this[_0x9aa18d(0x1bc)]=_0x33ea62;const {..._0x4da21d}=_0x239049({},O,this[_0x9aa18d(0x1bb)]);this[_0x9aa18d(0x1bc)][_0x9aa18d(0x19e)](z,_0x4da21d);}[_0x34024c(0x1f5)](){const _0x354bb4=_0x34024c;[[S],[f],[_]][_0x354bb4(0x1f6)](_0x3322a9=>{const _0x557c5a=_0x354bb4;this[_0x557c5a(0x1bd)][_0x557c5a(0x1e8)](_0x3322a9);});}['onReady'](){const _0x58d2b8=_0x34024c;this[_0x58d2b8(0x1bd)][_0x58d2b8(0x1d9)](f),this[_0x58d2b8(0x1bd)][_0x58d2b8(0x1d9)](_);}};$(g,_0x34024c(0x1a1),W),$(g,_0x34024c(0x1ea),_0x1cfbda[_0x34024c(0x1c2)]),g=ie([_0x114dff(_0x59bd5d,_0x46d5fb,_0xf589bd),N(0x1,_0x1641e7(_0x5130d8)),N(0x2,_0x10c05b)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x71f2d7=_0x57eb;(function(_0x21d274,_0x5b5f29){const _0x210c0f=_0x57eb,_0x4c60a5=_0x21d274();while(!![]){try{const _0x41e4b2=-parseInt(_0x210c0f(0x13a))/0x1+-parseInt(_0x210c0f(0x17e))/0x2*(-parseInt(_0x210c0f(0x183))/0x3)+-parseInt(_0x210c0f(0x16e))/0x4+parseInt(_0x210c0f(0x18d))/0x5+-parseInt(_0x210c0f(0x172))/0x6+parseInt(_0x210c0f(0x17b))/0x7+-parseInt(_0x210c0f(0x15f))/0x8*(-parseInt(_0x210c0f(0x191))/0x9);if(_0x41e4b2===_0x5b5f29)break;else _0x4c60a5['push'](_0x4c60a5['shift']());}catch(_0x38ab9d){_0x4c60a5['push'](_0x4c60a5['shift']());}}}(_0x2680,0x5a759));import{CommentService as _0x23ec2c,CollaborationSessionService as _0x4ead13,UniverCollaborationClientPlugin as _0x33917a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x44e499}from'@univerjs-pro/license';import{dayjs as _0x56b0b9,UserManagerService as _0x49c7ce,Inject as _0x4b8dfe,Injector as _0x1eebbd,Disposable as _0x29e1ca,CustomRangeType as _0x33e38f,UniverInstanceType as _0x48d0a5,DependentOn as _0x296157,IConfigService as _0x128401,Plugin as _0x39767c,merge as _0xf97ff9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x228392}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2dcc4e,IThreadCommentDataSourceService as _0x3f700d}from'@univerjs/thread-comment';function _0x2680(){const _0x5cfac5=['/universer-api/comment/unit/','content','3339189KczdwP','UNRECOGNIZED','_httpService','_threadCommentModel','ref','forEach','post','defineProperty','thread-comment-data-source.config','_configService','/reply','threadId','code','165751IbCFzR','replyId','Solve','stringify','_initUserSync','_initDataSource','resolveComment','users','rangeId','createTimestamp','_injector','symbol','YYYY/MM/DD\x20HH:mm','error','/delete','format','addUser','_commentService','body','disposeWithMe','personId','_init','_config','find','_threadCommentDataSource','COMMENT','addComment','customRanges','getComment','_userService','UNIVER_UNKNOWN','Unknown','Reply','filter','updateComment','_sessionService','userID','8HWPjIc','replies','requireSession','length','parentId','delete','slice','Add','Delete','comment','_threadCommentDataSourceService','/list','Edit','listComments','commentUpdate$','1633040Iufwuz','dataSource','userId','user','3930714jnCjRk','/universer-api/user/list','getUnit','rangeType','onReady','getOwnPropertyDescriptor','payload','get','/solved','2344671phmOhH','solved','resolved','2ojgqBx','subscribe','getCurrentUser','getMemberID','parse','1013406tPGfzb','syncUpdateMutationToColla','OpenOrReOpen','root','map','Solved','setConfig','add','type','deleteComment','2779375YZfdKo','values'];_0x2680=function(){return _0x5cfac5;};return _0x2680();}import{bufferTime as _0x3508e9}from'rxjs';import{HTTPService as _0x15440e}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x56fc1d=>(_0x56fc1d[_0x56fc1d['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x56fc1d[_0x56fc1d[_0x71f2d7(0x188)]=0x1]=_0x71f2d7(0x188),_0x56fc1d[_0x56fc1d[_0x71f2d7(0x192)]=-0x1]=_0x71f2d7(0x192),_0x56fc1d))(I||{}),v=(_0x26871d=>(_0x26871d[_0x26871d[_0x71f2d7(0x159)]=0x0]=_0x71f2d7(0x159),_0x26871d[_0x26871d[_0x71f2d7(0x166)]=0x1]=_0x71f2d7(0x166),_0x26871d[_0x26871d[_0x71f2d7(0x15a)]=0x2]=_0x71f2d7(0x15a),_0x26871d[_0x26871d[_0x71f2d7(0x16b)]=0x3]=_0x71f2d7(0x16b),_0x26871d[_0x26871d[_0x71f2d7(0x167)]=0x4]=_0x71f2d7(0x167),_0x26871d[_0x26871d['Solve']=0x5]=_0x71f2d7(0x13c),_0x26871d[_0x26871d[_0x71f2d7(0x192)]=-0x1]=_0x71f2d7(0x192),_0x26871d))(v||{});const y=_0x4296bd=>_0x56b0b9(new Date(+_0x4296bd))[_0x71f2d7(0x149)](_0x71f2d7(0x146)),B=async(_0x1ac44e,_0x4198a7)=>{const _0x5c3ae5=_0x71f2d7,_0x3ac77b=_0x1ac44e[_0x5c3ae5(0x179)](_0x49c7ce),_0x2b1578=_0x1ac44e[_0x5c3ae5(0x179)](_0x15440e);_0x4198a7['forEach'](_0x1286b8=>{const _0x26abe=_0x5c3ae5;_0x3ac77b['getUser'](_0x1286b8)&&_0x4198a7[_0x26abe(0x164)](_0x1286b8);}),_0x4198a7['size']&&(await _0x2b1578[_0x5c3ae5(0x179)](_0x5c3ae5(0x173),{'params':{'userIDs':[..._0x4198a7]}}))['body'][_0x5c3ae5(0x141)]['forEach'](_0xe61910=>{const _0x136b5b=_0x5c3ae5;_0xe61910&&_0x3ac77b[_0x136b5b(0x14a)](_0xe61910);});};var K=Object[_0x71f2d7(0x177)],V=(_0x1d4c36,_0x52bff5,_0x2de957,_0xfd6f4c)=>{const _0x5bd90d=_0x71f2d7;for(var _0x4ac7ea=_0xfd6f4c>0x1?void 0x0:_0xfd6f4c?K(_0x52bff5,_0x2de957):_0x52bff5,_0x1f51ba=_0x1d4c36[_0x5bd90d(0x162)]-0x1,_0x2707df;_0x1f51ba>=0x0;_0x1f51ba--)(_0x2707df=_0x1d4c36[_0x1f51ba])&&(_0x4ac7ea=_0x2707df(_0x4ac7ea)||_0x4ac7ea);return _0x4ac7ea;},p=(_0x5bfa55,_0x5a8f58)=>(_0x23f223,_0x3f5dda)=>_0x5a8f58(_0x23f223,_0x3f5dda,_0x5bfa55);function _0x57eb(_0x1136d5,_0xda6e82){_0x1136d5=_0x1136d5-0x135;const _0x26806f=_0x2680();let _0x57ebbc=_0x26806f[_0x1136d5];return _0x57ebbc;}let _=class extends _0x29e1ca{constructor(_0xe091b8,_0x26fd23,_0x3baac5,_0x33652c){const _0x3fdb7f=_0x71f2d7;super(),this['_commentService']=_0xe091b8,this[_0x3fdb7f(0x194)]=_0x26fd23,this['_userService']=_0x3baac5,this[_0x3fdb7f(0x144)]=_0x33652c,this[_0x3fdb7f(0x14f)](),this[_0x3fdb7f(0x13e)]();}[_0x71f2d7(0x13e)](){const _0x416183=_0x71f2d7;this[_0x416183(0x14d)](this[_0x416183(0x194)][_0x416183(0x16d)]['pipe'](_0x3508e9(0x10))[_0x416183(0x17f)](_0x1ee22a=>{const _0x561f50=_0x416183,_0x264331=new Set();_0x1ee22a[_0x561f50(0x196)](_0x1ba53c=>{const _0x3d3925=_0x561f50;switch(_0x1ba53c['type']){case _0x3d3925(0x18a):{const _0x1ca1e8=_0x1ba53c[_0x3d3925(0x178)][_0x3d3925(0x14e)];_0x264331[_0x3d3925(0x18a)](_0x1ca1e8);break;}}}),B(this['_injector'],_0x264331);}));}[_0x71f2d7(0x14f)](){const _0xb9b1b1=_0x71f2d7;this[_0xb9b1b1(0x14d)](this[_0xb9b1b1(0x14b)]['commentUpdate$'][_0xb9b1b1(0x17f)](async _0x1c8959=>{const _0x1c3d0c=_0xb9b1b1;var _0x1083d4,_0x13f867,_0x4e51cb,_0x4a91a2;const _0x45b154=(_0x1083d4=this[_0x1c3d0c(0x194)]['getUnit'](_0x1c8959['unitId'])['find'](_0x48a8be=>_0x48a8be[_0x1c3d0c(0x138)]===_0x1c8959[_0x1c3d0c(0x138)]))==null?void 0x0:_0x1083d4[_0x1c3d0c(0x186)];if(!_0x45b154)return;const {unitId:_0xaf9cca,subUnitId:_0x3413ef}=_0x45b154;switch(_0x1c8959['user']&&this[_0x1c3d0c(0x157)]['addUser'](_0x1c8959[_0x1c3d0c(0x171)]),_0x1c8959[_0x1c3d0c(0x18b)]){case v['Add']:break;case v[_0x1c3d0c(0x15a)]:{this['_threadCommentModel'][_0x1c3d0c(0x154)](_0xaf9cca,_0x3413ef,{'unitId':_0xaf9cca,'subUnitId':_0x3413ef,'ref':'','id':_0x1c8959[_0x1c3d0c(0x13b)],'dT':y(+_0x1c8959[_0x1c3d0c(0x143)]),'threadId':_0x1c8959[_0x1c3d0c(0x138)],'personId':(_0x4e51cb=(_0x13f867=_0x1c8959[_0x1c3d0c(0x171)])==null?void 0x0:_0x13f867[_0x1c3d0c(0x15e)])!=null?_0x4e51cb:_0x1c8959[_0x1c3d0c(0x170)],'text':JSON['parse'](_0x1c8959[_0x1c3d0c(0x190)]),'parentId':_0x45b154['id']});break;}case v[_0x1c3d0c(0x167)]:{const _0x4db363=this[_0x1c3d0c(0x194)][_0x1c3d0c(0x156)](_0xaf9cca,_0x3413ef,_0x1c8959['replyId']);_0x4db363&&_0x4db363[_0x1c3d0c(0x163)]&&this[_0x1c3d0c(0x194)]['deleteComment'](_0xaf9cca,_0x3413ef,_0x1c8959[_0x1c3d0c(0x13b)]);break;}case v[_0x1c3d0c(0x16b)]:{this[_0x1c3d0c(0x194)][_0x1c3d0c(0x15c)](_0xaf9cca,_0x3413ef,{'commentId':_0x1c8959['replyId'],'text':JSON['parse'](_0x1c8959[_0x1c3d0c(0x190)])});break;}case v[_0x1c3d0c(0x13c)]:{const _0x5549a1=(_0x4a91a2=this[_0x1c3d0c(0x194)][_0x1c3d0c(0x174)](_0x1c8959['unitId'])[_0x1c3d0c(0x151)](_0x93216c=>_0x93216c[_0x1c3d0c(0x138)]===_0x1c8959[_0x1c3d0c(0x138)]))==null?void 0x0:_0x4a91a2[_0x1c3d0c(0x186)];_0x5549a1&&this[_0x1c3d0c(0x194)][_0x1c3d0c(0x140)](_0xaf9cca,_0x3413ef,_0x5549a1['id'],_0x1c8959['solved']===I[_0x1c3d0c(0x188)]);break;}}}));}};_=V([p(0x0,_0x4b8dfe(_0x23ec2c)),p(0x1,_0x4b8dfe(_0x2dcc4e)),p(0x2,_0x4b8dfe(_0x49c7ce)),p(0x3,_0x4b8dfe(_0x1eebbd))],_);const z=_0x71f2d7(0x135),O={};var k=Object[_0x71f2d7(0x177)],Q=(_0x3d60bc,_0x493938,_0x136973,_0x1d93f6)=>{const _0x3369e1=_0x71f2d7;for(var _0x517063=_0x1d93f6>0x1?void 0x0:_0x1d93f6?k(_0x493938,_0x136973):_0x493938,_0x188461=_0x3d60bc[_0x3369e1(0x162)]-0x1,_0x40d2e8;_0x188461>=0x0;_0x188461--)(_0x40d2e8=_0x3d60bc[_0x188461])&&(_0x517063=_0x40d2e8(_0x517063)||_0x517063);return _0x517063;},b=(_0x35691c,_0x67caae)=>(_0x2ee21b,_0x17d4a1)=>_0x67caae(_0x2ee21b,_0x17d4a1,_0x35691c);function X(_0x59ab06,_0x4cc334){const _0x4457af=_0x71f2d7,_0x5e5dc6=_0x59ab06[_0x4457af(0x160)][0x0];return{..._0x4cc334,'id':_0x5e5dc6[_0x4457af(0x13b)],'resolved':_0x59ab06[_0x4457af(0x17c)]===0x1,'dT':y(_0x5e5dc6[_0x4457af(0x143)]),'personId':_0x5e5dc6['userId'],'threadId':_0x5e5dc6[_0x4457af(0x138)]};}function ee(_0x2267d7,_0x4f4b41,_0x39b43d){const _0x3b5123=_0x71f2d7;var _0x30f74c,_0x206827;if(((_0x206827=(_0x30f74c=_0x2267d7==null?void 0x0:_0x2267d7[_0x3b5123(0x160)])==null?void 0x0:_0x30f74c[_0x3b5123(0x162)])!=null?_0x206827:0x0)>0x0){const _0x13066a=(_0x15f570,_0x301025)=>({'id':_0x15f570[_0x3b5123(0x13b)],'threadId':_0x15f570['threadId'],'dT':y(_0x15f570[_0x3b5123(0x143)]),'personId':_0x15f570[_0x3b5123(0x170)],'resolved':_0x2267d7[_0x3b5123(0x17c)]===I['Solved'],'unitId':_0x4f4b41,'subUnitId':_0x39b43d,'text':JSON[_0x3b5123(0x182)](_0x15f570['content']),'parentId':_0x301025}),_0x15e419=_0x13066a(_0x2267d7[_0x3b5123(0x160)][0x0]);return{..._0x15e419,'children':_0x2267d7[_0x3b5123(0x160)][_0x3b5123(0x165)](0x1)[_0x3b5123(0x187)](_0x35e611=>_0x13066a(_0x35e611,_0x15e419['id']))};}return null;}let S=class{constructor(_0x25f792,_0x849e6d,_0x39f288){const _0x8e49be=_0x71f2d7;this[_0x8e49be(0x193)]=_0x25f792,this[_0x8e49be(0x157)]=_0x849e6d,this[_0x8e49be(0x15d)]=_0x39f288;}async[_0x71f2d7(0x154)](_0x242c98){const _0xa5f463=_0x71f2d7;var _0x38accf,_0x353f16;const {parentId:_0x2a7630,unitId:_0x497fec,text:_0xf6a2ce,threadId:_0x195cc2}=_0x242c98,_0x295059=(_0x353f16=(_0x38accf=_0xf6a2ce[_0xa5f463(0x155)])==null?void 0x0:_0x38accf['filter'](_0xcf57df=>_0xcf57df['rangeType']===_0x33e38f[_0xa5f463(0x153)])[_0xa5f463(0x187)](_0x5a3db7=>_0x5a3db7[_0xa5f463(0x142)]))!=null?_0x353f16:[],_0x426211=JSON['stringify'](_0xf6a2ce),_0x29028c=(await this[_0xa5f463(0x15d)][_0xa5f463(0x161)](_0x497fec))[_0xa5f463(0x181)]();if(_0x2a7630){const _0x1e955a={'memberId':_0x29028c,'unitId':_0x497fec,'content':_0x426211,'mention':_0x295059,'threadId':_0x195cc2},_0x1cbd27=(await this['_httpService'][_0xa5f463(0x197)]('/universer-api/comment/unit/'+_0x497fec+_0xa5f463(0x137),{'body':_0x1e955a}))[_0xa5f463(0x14c)]['reply'];return{..._0x242c98,'id':_0x1cbd27[_0xa5f463(0x13b)],'dT':_0x56b0b9(+_0x1cbd27[_0xa5f463(0x143)])[_0xa5f463(0x149)](_0xa5f463(0x146)),'personId':_0x1cbd27['userId']};}else{const _0x416382={'memberId':_0x29028c,'unitId':_0x497fec,'content':_0x426211,'mention':_0x295059},_0x64dbf6=await this['_httpService'][_0xa5f463(0x197)](_0xa5f463(0x18f)+_0x497fec+'/add',{'body':_0x416382});return X(_0x64dbf6[_0xa5f463(0x14c)][_0xa5f463(0x168)],_0x242c98);}}async[_0x71f2d7(0x15c)](_0x5b8b9a){const _0x405343=_0x71f2d7;var _0x34842a,_0x430f73;const {text:_0x9d1f6d,unitId:_0x2cf297}=_0x5b8b9a,_0x4e7979=(_0x430f73=(_0x34842a=_0x9d1f6d[_0x405343(0x155)])==null?void 0x0:_0x34842a[_0x405343(0x15b)](_0x3ad844=>_0x3ad844[_0x405343(0x175)]===_0x33e38f[_0x405343(0x153)])['map'](_0xce2b6b=>_0xce2b6b[_0x405343(0x142)]))!=null?_0x430f73:[],_0x1b0ac6=JSON[_0x405343(0x13d)](_0x9d1f6d),_0x5616c4=_0x5b8b9a[_0x405343(0x138)],_0x35d6b2=_0x5b8b9a['id'],_0x52df02={'memberId':(await this[_0x405343(0x15d)]['requireSession'](_0x2cf297))[_0x405343(0x181)](),'unitId':_0x2cf297,'threadId':_0x5616c4,'mention':_0x4e7979,'content':_0x1b0ac6,'replyId':_0x35d6b2},_0x4baeac=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2cf297+'/edit',{'body':_0x52df02});return!_0x4baeac[_0x405343(0x14c)][_0x405343(0x147)]||_0x4baeac[_0x405343(0x14c)][_0x405343(0x147)]['code']===0x1;}async['resolveComment'](_0x33443c){const _0x1bf878=_0x71f2d7,{unitId:_0x1eafff}=_0x33443c,_0x28978b=_0x33443c[_0x1bf878(0x138)],_0x24b380={'memberId':this[_0x1bf878(0x157)][_0x1bf878(0x180)]()[_0x1bf878(0x15e)],'unitId':_0x1eafff,'threadId':_0x28978b,'solved':_0x33443c[_0x1bf878(0x17d)]?I[_0x1bf878(0x188)]:I[_0x1bf878(0x185)]},_0x55081b=await this[_0x1bf878(0x193)][_0x1bf878(0x197)](_0x1bf878(0x18f)+_0x1eafff+_0x1bf878(0x17a),{'body':_0x24b380});return!_0x55081b[_0x1bf878(0x14c)][_0x1bf878(0x147)]||_0x55081b['body'][_0x1bf878(0x147)][_0x1bf878(0x139)]===0x1;}async[_0x71f2d7(0x18c)](_0x4737d2,_0x1f6e83,_0x10f08c,_0x492560){const _0x54d510=_0x71f2d7,_0x1ccf04={'memberId':(await this[_0x54d510(0x15d)][_0x54d510(0x161)](_0x4737d2))[_0x54d510(0x181)](),'threadId':_0x10f08c,'replyId':_0x492560,'unitId':_0x4737d2},_0x2829ca=await this['_httpService'][_0x54d510(0x197)](_0x54d510(0x18f)+_0x4737d2+_0x54d510(0x148),{'body':_0x1ccf04});return!_0x2829ca[_0x54d510(0x14c)]['error']||_0x2829ca[_0x54d510(0x14c)]['error']['code']===0x1;}async[_0x71f2d7(0x16c)](_0x1bf58e,_0x43c086,_0x11e529){const _0x3b4f67=_0x71f2d7,_0x3d576b={'unitId':_0x1bf58e,'threadId':_0x11e529},_0x4f57fa=await this[_0x3b4f67(0x193)][_0x3b4f67(0x197)]('/universer-api/comment/unit/'+_0x1bf58e+_0x3b4f67(0x16a),{'body':_0x3d576b}),_0x12307e=_0x11e529[_0x3b4f67(0x187)](_0x31626e=>ee(_0x4f57fa[_0x3b4f67(0x14c)]['comments'][_0x31626e],_0x1bf58e,_0x43c086))[_0x3b4f67(0x15b)](Boolean);return Object[_0x3b4f67(0x18e)](_0x4f57fa[_0x3b4f67(0x14c)][_0x3b4f67(0x141)])['forEach'](_0x4a9a31=>{const _0x3df9de=_0x3b4f67;this[_0x3df9de(0x157)][_0x3df9de(0x14a)](_0x4a9a31);}),_0x12307e;}['saveCommentToSnapshot'](_0x2422c6){const _0x27c2cc=_0x71f2d7;return{'id':_0x2422c6['id'],'threadId':_0x2422c6[_0x27c2cc(0x138)],'ref':_0x2422c6[_0x27c2cc(0x195)]};}};S=Q([b(0x0,_0x4b8dfe(_0x15440e)),b(0x1,_0x4b8dfe(_0x49c7ce)),b(0x2,_0x4b8dfe(_0x4ead13))],S);var re=Object[_0x71f2d7(0x177)],te=(_0x50bf10,_0x3fdbfc,_0x36687f,_0x289651)=>{const _0x173baa=_0x71f2d7;for(var _0x39cbfb=_0x289651>0x1?void 0x0:_0x289651?re(_0x3fdbfc,_0x36687f):_0x3fdbfc,_0x5a9f7d=_0x50bf10[_0x173baa(0x162)]-0x1,_0x59fe3c;_0x5a9f7d>=0x0;_0x5a9f7d--)(_0x59fe3c=_0x50bf10[_0x5a9f7d])&&(_0x39cbfb=_0x59fe3c(_0x39cbfb)||_0x39cbfb);return _0x39cbfb;},M=(_0x5b7d28,_0x24860d)=>(_0x4551b0,_0x870ee8)=>_0x24860d(_0x4551b0,_0x870ee8,_0x5b7d28);let f=class extends _0x29e1ca{constructor(_0xf65984,_0x4262cc){const _0x412f95=_0x71f2d7;super(),this[_0x412f95(0x169)]=_0xf65984,this[_0x412f95(0x152)]=_0x4262cc,this['_initDataSource']();}[_0x71f2d7(0x13f)](){const _0x4e4d0b=_0x71f2d7;this[_0x4e4d0b(0x169)][_0x4e4d0b(0x16f)]=this['_threadCommentDataSource'],this[_0x4e4d0b(0x169)][_0x4e4d0b(0x184)]=!0x1;}};f=te([M(0x0,_0x3f700d),M(0x1,_0x4b8dfe(S))],f);var se=Object[_0x71f2d7(0x198)],oe=Object[_0x71f2d7(0x177)],ne=(_0x5a2935,_0x1a5f49,_0x2380d7)=>_0x1a5f49 in _0x5a2935?se(_0x5a2935,_0x1a5f49,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2380d7}):_0x5a2935[_0x1a5f49]=_0x2380d7,ie=(_0x42624b,_0x16437a,_0x5817be,_0x2f9234)=>{const _0x257769=_0x71f2d7;for(var _0x20b0cc=_0x2f9234>0x1?void 0x0:_0x2f9234?oe(_0x16437a,_0x5817be):_0x16437a,_0x465cc7=_0x42624b[_0x257769(0x162)]-0x1,_0x51cc57;_0x465cc7>=0x0;_0x465cc7--)(_0x51cc57=_0x42624b[_0x465cc7])&&(_0x20b0cc=_0x51cc57(_0x20b0cc)||_0x20b0cc);return _0x20b0cc;},N=(_0x5ebd8c,_0xf91dba)=>(_0x45e77c,_0x410d4e)=>_0xf91dba(_0x45e77c,_0x410d4e,_0x5ebd8c),$=(_0x3476e5,_0x1d61ca,_0x2345bc)=>ne(_0x3476e5,typeof _0x1d61ca!=_0x71f2d7(0x145)?_0x1d61ca+'':_0x1d61ca,_0x2345bc);let g=class extends _0x39767c{constructor(_0x30c6c8=O,_0x1b0758,_0x4b4e72){const _0x1510e7=_0x71f2d7;super(),this[_0x1510e7(0x150)]=_0x30c6c8,this[_0x1510e7(0x144)]=_0x1b0758,this[_0x1510e7(0x136)]=_0x4b4e72;const {..._0x185bf6}=_0xf97ff9({},O,this[_0x1510e7(0x150)]);this['_configService'][_0x1510e7(0x189)](z,_0x185bf6);}['onStarting'](){const _0x9bf7fb=_0x71f2d7;[[S],[f],[_]][_0x9bf7fb(0x196)](_0x31e914=>{const _0x587ac2=_0x9bf7fb;this[_0x587ac2(0x144)][_0x587ac2(0x18a)](_0x31e914);});}[_0x71f2d7(0x176)](){const _0x2c4b82=_0x71f2d7;this[_0x2c4b82(0x144)][_0x2c4b82(0x179)](f),this[_0x2c4b82(0x144)][_0x2c4b82(0x179)](_);}};$(g,'pluginName',W),$(g,'type',_0x48d0a5[_0x71f2d7(0x158)]),g=ie([_0x296157(_0x228392,_0x33917a,_0x44e499),N(0x1,_0x4b8dfe(_0x1eebbd)),N(0x2,_0x128401)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x34024c=_0x5be3;(function(_0x5c622f,_0x52bf93){const _0x5c70d0=_0x5be3,_0x3249d4=_0x5c622f();while(!![]){try{const _0x52e758=-parseInt(_0x5c70d0(0x1d0))/0x1+parseInt(_0x5c70d0(0x1cb))/0x2*(-parseInt(_0x5c70d0(0x1d6))/0x3)+-parseInt(_0x5c70d0(0x1b8))/0x4+-parseInt(_0x5c70d0(0x1b3))/0x5+parseInt(_0x5c70d0(0x1dd))/0x6+-parseInt(_0x5c70d0(0x1cf))/0x7+parseInt(_0x5c70d0(0x19b))/0x8;if(_0x52e758===_0x52bf93)break;else _0x3249d4['push'](_0x3249d4['shift']());}catch(_0x1bb696){_0x3249d4['push'](_0x3249d4['shift']());}}}(_0x2c5a,0xb8804));import{CommentService as _0x1b5be1,CollaborationSessionService as _0x17f016,UniverCollaborationClientPlugin as _0x46d5fb}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xf589bd}from'@univerjs-pro/license';import{dayjs as _0x57f149,UserManagerService as _0x1feaec,Inject as _0x1641e7,Injector as _0x5130d8,Disposable as _0x577d5c,CustomRangeType as _0x48489b,UniverInstanceType as _0x1cfbda,DependentOn as _0x114dff,IConfigService as _0x10c05b,Plugin as _0x5ad258,merge as _0x239049}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59bd5d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa45dbf,IThreadCommentDataSourceService as _0x18ef7c}from'@univerjs/thread-comment';import{bufferTime as _0x2d9430}from'rxjs';import{HTTPService as _0x55367e}from'@univerjs/network';const W=_0x34024c(0x1d5);var I=(_0x3390e7=>(_0x3390e7[_0x3390e7[_0x34024c(0x1e5)]=0x0]=_0x34024c(0x1e5),_0x3390e7[_0x3390e7[_0x34024c(0x1ba)]=0x1]=_0x34024c(0x1ba),_0x3390e7[_0x3390e7[_0x34024c(0x1c9)]=-0x1]=_0x34024c(0x1c9),_0x3390e7))(I||{}),v=(_0x45831e=>(_0x45831e[_0x45831e[_0x34024c(0x1de)]=0x0]='Unknown',_0x45831e[_0x45831e[_0x34024c(0x19c)]=0x1]='Add',_0x45831e[_0x45831e['Reply']=0x2]=_0x34024c(0x1f8),_0x45831e[_0x45831e[_0x34024c(0x1c1)]=0x3]=_0x34024c(0x1c1),_0x45831e[_0x45831e['Delete']=0x4]='Delete',_0x45831e[_0x45831e[_0x34024c(0x1a2)]=0x5]=_0x34024c(0x1a2),_0x45831e[_0x45831e[_0x34024c(0x1c9)]=-0x1]=_0x34024c(0x1c9),_0x45831e))(v||{});const y=_0x5b355d=>_0x57f149(new Date(+_0x5b355d))['format'](_0x34024c(0x1a6)),B=async(_0x17c5a2,_0x16a130)=>{const _0x41c8aa=_0x34024c,_0x3f72e9=_0x17c5a2[_0x41c8aa(0x1d9)](_0x1feaec),_0xad84a0=_0x17c5a2[_0x41c8aa(0x1d9)](_0x55367e);_0x16a130[_0x41c8aa(0x1f6)](_0x4f5a43=>{const _0x4976e8=_0x41c8aa;_0x3f72e9[_0x4976e8(0x1f3)](_0x4f5a43)&&_0x16a130[_0x4976e8(0x200)](_0x4f5a43);}),_0x16a130[_0x41c8aa(0x1ec)]&&(await _0xad84a0[_0x41c8aa(0x1d9)](_0x41c8aa(0x1db),{'params':{'userIDs':[..._0x16a130]}}))[_0x41c8aa(0x1b9)][_0x41c8aa(0x1d4)][_0x41c8aa(0x1f6)](_0x842289=>{const _0x5e289f=_0x41c8aa;_0x842289&&_0x3f72e9[_0x5e289f(0x1b6)](_0x842289);});};var K=Object[_0x34024c(0x1cc)],V=(_0x5f3d30,_0x1c2704,_0x55bb9d,_0x5315d7)=>{const _0xf0b0c2=_0x34024c;for(var _0x275314=_0x5315d7>0x1?void 0x0:_0x5315d7?K(_0x1c2704,_0x55bb9d):_0x1c2704,_0x2dee09=_0x5f3d30[_0xf0b0c2(0x1aa)]-0x1,_0x56e849;_0x2dee09>=0x0;_0x2dee09--)(_0x56e849=_0x5f3d30[_0x2dee09])&&(_0x275314=_0x56e849(_0x275314)||_0x275314);return _0x275314;},p=(_0x57b42d,_0x31ecf3)=>(_0x24c347,_0x3cd345)=>_0x31ecf3(_0x24c347,_0x3cd345,_0x57b42d);let _=class extends _0x577d5c{constructor(_0x5ae4a0,_0x47ab27,_0x35fb7d,_0x4ceb57){const _0x17c7ed=_0x34024c;super(),this['_commentService']=_0x5ae4a0,this['_threadCommentModel']=_0x47ab27,this[_0x17c7ed(0x1c4)]=_0x35fb7d,this['_injector']=_0x4ceb57,this[_0x17c7ed(0x1f7)](),this[_0x17c7ed(0x1b0)]();}[_0x34024c(0x1b0)](){const _0x33b2bc=_0x34024c;this[_0x33b2bc(0x1fb)](this[_0x33b2bc(0x1dc)][_0x33b2bc(0x1e1)][_0x33b2bc(0x1fd)](_0x2d9430(0x10))['subscribe'](_0x3059da=>{const _0x185ce8=_0x33b2bc,_0x12c00a=new Set();_0x3059da[_0x185ce8(0x1f6)](_0x1cdf69=>{const _0x1a20fc=_0x185ce8;switch(_0x1cdf69['type']){case _0x1a20fc(0x1e8):{const _0x29690f=_0x1cdf69[_0x1a20fc(0x1ae)][_0x1a20fc(0x1bf)];_0x12c00a['add'](_0x29690f);break;}}}),B(this[_0x185ce8(0x1bd)],_0x12c00a);}));}['_init'](){const _0x493807=_0x34024c;this[_0x493807(0x1fb)](this['_commentService'][_0x493807(0x1e1)]['subscribe'](async _0x50ec9a=>{const _0x521f6a=_0x493807;var _0x3d1775,_0xfd8eac,_0x2c265f,_0x42e616;const _0x51f1a3=(_0x3d1775=this['_threadCommentModel']['getUnit'](_0x50ec9a[_0x521f6a(0x1a4)])[_0x521f6a(0x1e9)](_0x4e49a0=>_0x4e49a0[_0x521f6a(0x1f9)]===_0x50ec9a['threadId']))==null?void 0x0:_0x3d1775[_0x521f6a(0x1df)];if(!_0x51f1a3)return;const {unitId:_0x2e9807,subUnitId:_0x5da9ae}=_0x51f1a3;switch(_0x50ec9a[_0x521f6a(0x1f1)]&&this[_0x521f6a(0x1c4)][_0x521f6a(0x1b6)](_0x50ec9a[_0x521f6a(0x1f1)]),_0x50ec9a[_0x521f6a(0x1ea)]){case v[_0x521f6a(0x19c)]:break;case v[_0x521f6a(0x1f8)]:{this[_0x521f6a(0x1dc)][_0x521f6a(0x1e7)](_0x2e9807,_0x5da9ae,{'unitId':_0x2e9807,'subUnitId':_0x5da9ae,'ref':'','id':_0x50ec9a[_0x521f6a(0x1b1)],'dT':y(+_0x50ec9a['createTimestamp']),'threadId':_0x50ec9a[_0x521f6a(0x1f9)],'personId':(_0x2c265f=(_0xfd8eac=_0x50ec9a[_0x521f6a(0x1f1)])==null?void 0x0:_0xfd8eac[_0x521f6a(0x1d7)])!=null?_0x2c265f:_0x50ec9a[_0x521f6a(0x19d)],'text':JSON['parse'](_0x50ec9a['content']),'parentId':_0x51f1a3['id']});break;}case v[_0x521f6a(0x1ef)]:{const _0x28dc6e=this['_threadCommentModel'][_0x521f6a(0x1a0)](_0x2e9807,_0x5da9ae,_0x50ec9a['replyId']);_0x28dc6e&&_0x28dc6e[_0x521f6a(0x1b2)]&&this[_0x521f6a(0x1dc)][_0x521f6a(0x1fe)](_0x2e9807,_0x5da9ae,_0x50ec9a[_0x521f6a(0x1b1)]);break;}case v['Edit']:{this[_0x521f6a(0x1dc)][_0x521f6a(0x1c0)](_0x2e9807,_0x5da9ae,{'commentId':_0x50ec9a['replyId'],'text':JSON[_0x521f6a(0x1b5)](_0x50ec9a[_0x521f6a(0x1eb)])});break;}case v['Solve']:{const _0x525ad2=(_0x42e616=this['_threadCommentModel'][_0x521f6a(0x202)](_0x50ec9a[_0x521f6a(0x1a4)])[_0x521f6a(0x1e9)](_0x300f7e=>_0x300f7e[_0x521f6a(0x1f9)]===_0x50ec9a[_0x521f6a(0x1f9)]))==null?void 0x0:_0x42e616[_0x521f6a(0x1df)];_0x525ad2&&this[_0x521f6a(0x1dc)][_0x521f6a(0x1d1)](_0x2e9807,_0x5da9ae,_0x525ad2['id'],_0x50ec9a[_0x521f6a(0x1fa)]===I[_0x521f6a(0x1ba)]);break;}}}));}};function _0x5be3(_0x49aadc,_0x1175b0){_0x49aadc=_0x49aadc-0x19a;const _0x2c5a1f=_0x2c5a();let _0x5be38c=_0x2c5a1f[_0x49aadc];return _0x5be38c;}function _0x2c5a(){const _0x185e46=['_sessionService','pipe','deleteComment','rangeType','delete','_httpService','getUnit','values','29070976lzuoVY','Add','userId','setConfig','_threadCommentDataSource','getComment','pluginName','Solve','/add','unitId','getMemberID','YYYY/MM/DD\x20HH:mm','thread-comment-data-source.config','/solved','comment','length','/universer-api/comment/unit/','COMMENT','reply','payload','ref','_initUserSync','replyId','parentId','7023835WjPdcU','_threadCommentDataSourceService','parse','addUser','filter','1804348yOPkrL','body','Solved','_config','_configService','_injector','/edit','personId','updateComment','Edit','UNIVER_UNKNOWN','rangeId','_userService','listComments','replies','saveCommentToSnapshot','map','UNRECOGNIZED','stringify','51886vfHlRC','getOwnPropertyDescriptor','format','post','127785yQLyfq','205305ogzASL','resolveComment','createTimestamp','/delete','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','93hSZgMM','userID','requireSession','get','/list','/universer-api/user/list','_threadCommentModel','32946ZGHgJB','Unknown','root','symbol','commentUpdate$','syncUpdateMutationToColla','code','getCurrentUser','OpenOrReOpen','/reply','addComment','add','find','type','content','size','comments','error','Delete','_initDataSource','user','customRanges','getUser','resolved','onStarting','forEach','_init','Reply','threadId','solved','disposeWithMe'];_0x2c5a=function(){return _0x185e46;};return _0x2c5a();}_=V([p(0x0,_0x1641e7(_0x1b5be1)),p(0x1,_0x1641e7(_0xa45dbf)),p(0x2,_0x1641e7(_0x1feaec)),p(0x3,_0x1641e7(_0x5130d8))],_);const z=_0x34024c(0x1a7),O={};var k=Object[_0x34024c(0x1cc)],Q=(_0x359413,_0x5dc9a8,_0x23fd4a,_0x4cab43)=>{const _0x1d3788=_0x34024c;for(var _0x4ab8cc=_0x4cab43>0x1?void 0x0:_0x4cab43?k(_0x5dc9a8,_0x23fd4a):_0x5dc9a8,_0x47e372=_0x359413[_0x1d3788(0x1aa)]-0x1,_0x46e32c;_0x47e372>=0x0;_0x47e372--)(_0x46e32c=_0x359413[_0x47e372])&&(_0x4ab8cc=_0x46e32c(_0x4ab8cc)||_0x4ab8cc);return _0x4ab8cc;},b=(_0x1ce649,_0x3388af)=>(_0xf78e80,_0x465caa)=>_0x3388af(_0xf78e80,_0x465caa,_0x1ce649);function X(_0x3a1cd0,_0x13f02d){const _0x5c26bd=_0x34024c,_0x1b690d=_0x3a1cd0[_0x5c26bd(0x1c6)][0x0];return{..._0x13f02d,'id':_0x1b690d[_0x5c26bd(0x1b1)],'resolved':_0x3a1cd0[_0x5c26bd(0x1fa)]===0x1,'dT':y(_0x1b690d[_0x5c26bd(0x1d2)]),'personId':_0x1b690d['userId'],'threadId':_0x1b690d['threadId']};}function ee(_0x1856fa,_0x465b27,_0x264b51){const _0x334cee=_0x34024c;var _0xbb920e,_0x421e1b;if(((_0x421e1b=(_0xbb920e=_0x1856fa==null?void 0x0:_0x1856fa[_0x334cee(0x1c6)])==null?void 0x0:_0xbb920e['length'])!=null?_0x421e1b:0x0)>0x0){const _0x305c46=(_0xcf0558,_0x50c12f)=>({'id':_0xcf0558['replyId'],'threadId':_0xcf0558[_0x334cee(0x1f9)],'dT':y(_0xcf0558[_0x334cee(0x1d2)]),'personId':_0xcf0558['userId'],'resolved':_0x1856fa[_0x334cee(0x1fa)]===I[_0x334cee(0x1ba)],'unitId':_0x465b27,'subUnitId':_0x264b51,'text':JSON[_0x334cee(0x1b5)](_0xcf0558[_0x334cee(0x1eb)]),'parentId':_0x50c12f}),_0x583def=_0x305c46(_0x1856fa[_0x334cee(0x1c6)][0x0]);return{..._0x583def,'children':_0x1856fa[_0x334cee(0x1c6)]['slice'](0x1)[_0x334cee(0x1c8)](_0x55d94c=>_0x305c46(_0x55d94c,_0x583def['id']))};}return null;}let S=class{constructor(_0x1e804f,_0x356f43,_0x1bcccc){const _0x2adbc2=_0x34024c;this[_0x2adbc2(0x201)]=_0x1e804f,this['_userService']=_0x356f43,this[_0x2adbc2(0x1fc)]=_0x1bcccc;}async[_0x34024c(0x1e7)](_0x2088cc){const _0x2a1cb5=_0x34024c;var _0x2f1687,_0x1aee98;const {parentId:_0x3ef606,unitId:_0xdccd3e,text:_0x241f43,threadId:_0x539130}=_0x2088cc,_0x10b8e8=(_0x1aee98=(_0x2f1687=_0x241f43[_0x2a1cb5(0x1f2)])==null?void 0x0:_0x2f1687[_0x2a1cb5(0x1b7)](_0x588708=>_0x588708[_0x2a1cb5(0x1ff)]===_0x48489b[_0x2a1cb5(0x1ac)])[_0x2a1cb5(0x1c8)](_0x3f6654=>_0x3f6654[_0x2a1cb5(0x1c3)]))!=null?_0x1aee98:[],_0x5367b7=JSON[_0x2a1cb5(0x1ca)](_0x241f43),_0x5246c7=(await this[_0x2a1cb5(0x1fc)][_0x2a1cb5(0x1d8)](_0xdccd3e))[_0x2a1cb5(0x1a5)]();if(_0x3ef606){const _0x37e11b={'memberId':_0x5246c7,'unitId':_0xdccd3e,'content':_0x5367b7,'mention':_0x10b8e8,'threadId':_0x539130},_0x1b57ab=(await this[_0x2a1cb5(0x201)][_0x2a1cb5(0x1ce)](_0x2a1cb5(0x1ab)+_0xdccd3e+_0x2a1cb5(0x1e6),{'body':_0x37e11b}))[_0x2a1cb5(0x1b9)][_0x2a1cb5(0x1ad)];return{..._0x2088cc,'id':_0x1b57ab[_0x2a1cb5(0x1b1)],'dT':_0x57f149(+_0x1b57ab[_0x2a1cb5(0x1d2)])[_0x2a1cb5(0x1cd)](_0x2a1cb5(0x1a6)),'personId':_0x1b57ab[_0x2a1cb5(0x19d)]};}else{const _0x398d98={'memberId':_0x5246c7,'unitId':_0xdccd3e,'content':_0x5367b7,'mention':_0x10b8e8},_0x3ee03e=await this[_0x2a1cb5(0x201)][_0x2a1cb5(0x1ce)](_0x2a1cb5(0x1ab)+_0xdccd3e+_0x2a1cb5(0x1a3),{'body':_0x398d98});return X(_0x3ee03e[_0x2a1cb5(0x1b9)][_0x2a1cb5(0x1a9)],_0x2088cc);}}async['updateComment'](_0x5ea9b0){const _0x309747=_0x34024c;var _0x5a7bb0,_0x549720;const {text:_0x550b5c,unitId:_0x8ebd09}=_0x5ea9b0,_0xc3b6df=(_0x549720=(_0x5a7bb0=_0x550b5c['customRanges'])==null?void 0x0:_0x5a7bb0['filter'](_0x10880e=>_0x10880e[_0x309747(0x1ff)]===_0x48489b[_0x309747(0x1ac)])['map'](_0xfaffb7=>_0xfaffb7[_0x309747(0x1c3)]))!=null?_0x549720:[],_0x2df98d=JSON['stringify'](_0x550b5c),_0x5b5b47=_0x5ea9b0[_0x309747(0x1f9)],_0x223063=_0x5ea9b0['id'],_0x255e5f={'memberId':(await this[_0x309747(0x1fc)]['requireSession'](_0x8ebd09))[_0x309747(0x1a5)](),'unitId':_0x8ebd09,'threadId':_0x5b5b47,'mention':_0xc3b6df,'content':_0x2df98d,'replyId':_0x223063},_0x2a07e3=await this['_httpService'][_0x309747(0x1ce)]('/universer-api/comment/unit/'+_0x8ebd09+_0x309747(0x1be),{'body':_0x255e5f});return!_0x2a07e3['body'][_0x309747(0x1ee)]||_0x2a07e3[_0x309747(0x1b9)][_0x309747(0x1ee)][_0x309747(0x1e3)]===0x1;}async[_0x34024c(0x1d1)](_0x10a7ea){const _0x48a59c=_0x34024c,{unitId:_0x3ebd04}=_0x10a7ea,_0x353576=_0x10a7ea[_0x48a59c(0x1f9)],_0x3d54de={'memberId':this[_0x48a59c(0x1c4)][_0x48a59c(0x1e4)]()['userID'],'unitId':_0x3ebd04,'threadId':_0x353576,'solved':_0x10a7ea[_0x48a59c(0x1f4)]?I[_0x48a59c(0x1ba)]:I[_0x48a59c(0x1e5)]},_0x10164b=await this[_0x48a59c(0x201)]['post'](_0x48a59c(0x1ab)+_0x3ebd04+_0x48a59c(0x1a8),{'body':_0x3d54de});return!_0x10164b['body'][_0x48a59c(0x1ee)]||_0x10164b[_0x48a59c(0x1b9)][_0x48a59c(0x1ee)]['code']===0x1;}async['deleteComment'](_0x539f6e,_0x4f9213,_0x52b5a3,_0x36a12f){const _0x1e7a30=_0x34024c,_0x26732b={'memberId':(await this[_0x1e7a30(0x1fc)][_0x1e7a30(0x1d8)](_0x539f6e))[_0x1e7a30(0x1a5)](),'threadId':_0x52b5a3,'replyId':_0x36a12f,'unitId':_0x539f6e},_0x43d90f=await this[_0x1e7a30(0x201)][_0x1e7a30(0x1ce)](_0x1e7a30(0x1ab)+_0x539f6e+_0x1e7a30(0x1d3),{'body':_0x26732b});return!_0x43d90f[_0x1e7a30(0x1b9)][_0x1e7a30(0x1ee)]||_0x43d90f[_0x1e7a30(0x1b9)][_0x1e7a30(0x1ee)][_0x1e7a30(0x1e3)]===0x1;}async[_0x34024c(0x1c5)](_0x115913,_0x483dc1,_0x522ecf){const _0x4413d0=_0x34024c,_0x323056={'unitId':_0x115913,'threadId':_0x522ecf},_0x102b59=await this[_0x4413d0(0x201)][_0x4413d0(0x1ce)](_0x4413d0(0x1ab)+_0x115913+_0x4413d0(0x1da),{'body':_0x323056}),_0x3c6f47=_0x522ecf['map'](_0x2ed0e9=>ee(_0x102b59[_0x4413d0(0x1b9)][_0x4413d0(0x1ed)][_0x2ed0e9],_0x115913,_0x483dc1))[_0x4413d0(0x1b7)](Boolean);return Object[_0x4413d0(0x19a)](_0x102b59[_0x4413d0(0x1b9)]['users'])[_0x4413d0(0x1f6)](_0x2ce036=>{const _0x41efa9=_0x4413d0;this[_0x41efa9(0x1c4)][_0x41efa9(0x1b6)](_0x2ce036);}),_0x3c6f47;}[_0x34024c(0x1c7)](_0x459c2e){const _0x501831=_0x34024c;return{'id':_0x459c2e['id'],'threadId':_0x459c2e[_0x501831(0x1f9)],'ref':_0x459c2e[_0x501831(0x1af)]};}};S=Q([b(0x0,_0x1641e7(_0x55367e)),b(0x1,_0x1641e7(_0x1feaec)),b(0x2,_0x1641e7(_0x17f016))],S);var re=Object[_0x34024c(0x1cc)],te=(_0x3e4e4f,_0x99c6cf,_0x362df6,_0xb328f4)=>{const _0x2bdfeb=_0x34024c;for(var _0x40f84c=_0xb328f4>0x1?void 0x0:_0xb328f4?re(_0x99c6cf,_0x362df6):_0x99c6cf,_0x400bf7=_0x3e4e4f[_0x2bdfeb(0x1aa)]-0x1,_0x50e93b;_0x400bf7>=0x0;_0x400bf7--)(_0x50e93b=_0x3e4e4f[_0x400bf7])&&(_0x40f84c=_0x50e93b(_0x40f84c)||_0x40f84c);return _0x40f84c;},M=(_0x1f6019,_0x27e34f)=>(_0x5f2b6c,_0x4377d3)=>_0x27e34f(_0x5f2b6c,_0x4377d3,_0x1f6019);let f=class extends _0x577d5c{constructor(_0x3d56b7,_0x4b8689){const _0xea98e3=_0x34024c;super(),this['_threadCommentDataSourceService']=_0x3d56b7,this[_0xea98e3(0x19f)]=_0x4b8689,this['_initDataSource']();}[_0x34024c(0x1f0)](){const _0x528918=_0x34024c;this[_0x528918(0x1b4)]['dataSource']=this[_0x528918(0x19f)],this['_threadCommentDataSourceService'][_0x528918(0x1e2)]=!0x1;}};f=te([M(0x0,_0x18ef7c),M(0x1,_0x1641e7(S))],f);var se=Object['defineProperty'],oe=Object[_0x34024c(0x1cc)],ne=(_0xf90f18,_0x5c2e80,_0x419594)=>_0x5c2e80 in _0xf90f18?se(_0xf90f18,_0x5c2e80,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x419594}):_0xf90f18[_0x5c2e80]=_0x419594,ie=(_0x2e92bc,_0x36598e,_0x59db40,_0x11915c)=>{for(var _0x4d65f7=_0x11915c>0x1?void 0x0:_0x11915c?oe(_0x36598e,_0x59db40):_0x36598e,_0x76265b=_0x2e92bc['length']-0x1,_0x33d925;_0x76265b>=0x0;_0x76265b--)(_0x33d925=_0x2e92bc[_0x76265b])&&(_0x4d65f7=_0x33d925(_0x4d65f7)||_0x4d65f7);return _0x4d65f7;},N=(_0x2970a4,_0x49b1f0)=>(_0xc86579,_0x2b6f40)=>_0x49b1f0(_0xc86579,_0x2b6f40,_0x2970a4),$=(_0x5eb057,_0x4254f3,_0x4fd376)=>ne(_0x5eb057,typeof _0x4254f3!=_0x34024c(0x1e0)?_0x4254f3+'':_0x4254f3,_0x4fd376);let g=class extends _0x5ad258{constructor(_0x1692ad=O,_0x1058e8,_0x33ea62){const _0x9aa18d=_0x34024c;super(),this['_config']=_0x1692ad,this[_0x9aa18d(0x1bd)]=_0x1058e8,this[_0x9aa18d(0x1bc)]=_0x33ea62;const {..._0x4da21d}=_0x239049({},O,this[_0x9aa18d(0x1bb)]);this[_0x9aa18d(0x1bc)][_0x9aa18d(0x19e)](z,_0x4da21d);}[_0x34024c(0x1f5)](){const _0x354bb4=_0x34024c;[[S],[f],[_]][_0x354bb4(0x1f6)](_0x3322a9=>{const _0x557c5a=_0x354bb4;this[_0x557c5a(0x1bd)][_0x557c5a(0x1e8)](_0x3322a9);});}['onReady'](){const _0x58d2b8=_0x34024c;this[_0x58d2b8(0x1bd)][_0x58d2b8(0x1d9)](f),this[_0x58d2b8(0x1bd)][_0x58d2b8(0x1d9)](_);}};$(g,_0x34024c(0x1a1),W),$(g,_0x34024c(0x1ea),_0x1cfbda[_0x34024c(0x1c2)]),g=ie([_0x114dff(_0x59bd5d,_0x46d5fb,_0xf589bd),N(0x1,_0x1641e7(_0x5130d8)),N(0x2,_0x10c05b)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x71f2d7=_0x57eb;(function(_0x21d274,_0x5b5f29){const _0x210c0f=_0x57eb,_0x4c60a5=_0x21d274();while(!![]){try{const _0x41e4b2=-parseInt(_0x210c0f(0x13a))/0x1+-parseInt(_0x210c0f(0x17e))/0x2*(-parseInt(_0x210c0f(0x183))/0x3)+-parseInt(_0x210c0f(0x16e))/0x4+parseInt(_0x210c0f(0x18d))/0x5+-parseInt(_0x210c0f(0x172))/0x6+parseInt(_0x210c0f(0x17b))/0x7+-parseInt(_0x210c0f(0x15f))/0x8*(-parseInt(_0x210c0f(0x191))/0x9);if(_0x41e4b2===_0x5b5f29)break;else _0x4c60a5['push'](_0x4c60a5['shift']());}catch(_0x38ab9d){_0x4c60a5['push'](_0x4c60a5['shift']());}}}(_0x2680,0x5a759));import{CommentService as _0x23ec2c,CollaborationSessionService as _0x4ead13,UniverCollaborationClientPlugin as _0x33917a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x44e499}from'@univerjs-pro/license';import{dayjs as _0x56b0b9,UserManagerService as _0x49c7ce,Inject as _0x4b8dfe,Injector as _0x1eebbd,Disposable as _0x29e1ca,CustomRangeType as _0x33e38f,UniverInstanceType as _0x48d0a5,DependentOn as _0x296157,IConfigService as _0x128401,Plugin as _0x39767c,merge as _0xf97ff9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x228392}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2dcc4e,IThreadCommentDataSourceService as _0x3f700d}from'@univerjs/thread-comment';function _0x2680(){const _0x5cfac5=['/universer-api/comment/unit/','content','3339189KczdwP','UNRECOGNIZED','_httpService','_threadCommentModel','ref','forEach','post','defineProperty','thread-comment-data-source.config','_configService','/reply','threadId','code','165751IbCFzR','replyId','Solve','stringify','_initUserSync','_initDataSource','resolveComment','users','rangeId','createTimestamp','_injector','symbol','YYYY/MM/DD\x20HH:mm','error','/delete','format','addUser','_commentService','body','disposeWithMe','personId','_init','_config','find','_threadCommentDataSource','COMMENT','addComment','customRanges','getComment','_userService','UNIVER_UNKNOWN','Unknown','Reply','filter','updateComment','_sessionService','userID','8HWPjIc','replies','requireSession','length','parentId','delete','slice','Add','Delete','comment','_threadCommentDataSourceService','/list','Edit','listComments','commentUpdate$','1633040Iufwuz','dataSource','userId','user','3930714jnCjRk','/universer-api/user/list','getUnit','rangeType','onReady','getOwnPropertyDescriptor','payload','get','/solved','2344671phmOhH','solved','resolved','2ojgqBx','subscribe','getCurrentUser','getMemberID','parse','1013406tPGfzb','syncUpdateMutationToColla','OpenOrReOpen','root','map','Solved','setConfig','add','type','deleteComment','2779375YZfdKo','values'];_0x2680=function(){return _0x5cfac5;};return _0x2680();}import{bufferTime as _0x3508e9}from'rxjs';import{HTTPService as _0x15440e}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x56fc1d=>(_0x56fc1d[_0x56fc1d['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x56fc1d[_0x56fc1d[_0x71f2d7(0x188)]=0x1]=_0x71f2d7(0x188),_0x56fc1d[_0x56fc1d[_0x71f2d7(0x192)]=-0x1]=_0x71f2d7(0x192),_0x56fc1d))(I||{}),v=(_0x26871d=>(_0x26871d[_0x26871d[_0x71f2d7(0x159)]=0x0]=_0x71f2d7(0x159),_0x26871d[_0x26871d[_0x71f2d7(0x166)]=0x1]=_0x71f2d7(0x166),_0x26871d[_0x26871d[_0x71f2d7(0x15a)]=0x2]=_0x71f2d7(0x15a),_0x26871d[_0x26871d[_0x71f2d7(0x16b)]=0x3]=_0x71f2d7(0x16b),_0x26871d[_0x26871d[_0x71f2d7(0x167)]=0x4]=_0x71f2d7(0x167),_0x26871d[_0x26871d['Solve']=0x5]=_0x71f2d7(0x13c),_0x26871d[_0x26871d[_0x71f2d7(0x192)]=-0x1]=_0x71f2d7(0x192),_0x26871d))(v||{});const y=_0x4296bd=>_0x56b0b9(new Date(+_0x4296bd))[_0x71f2d7(0x149)](_0x71f2d7(0x146)),B=async(_0x1ac44e,_0x4198a7)=>{const _0x5c3ae5=_0x71f2d7,_0x3ac77b=_0x1ac44e[_0x5c3ae5(0x179)](_0x49c7ce),_0x2b1578=_0x1ac44e[_0x5c3ae5(0x179)](_0x15440e);_0x4198a7['forEach'](_0x1286b8=>{const _0x26abe=_0x5c3ae5;_0x3ac77b['getUser'](_0x1286b8)&&_0x4198a7[_0x26abe(0x164)](_0x1286b8);}),_0x4198a7['size']&&(await _0x2b1578[_0x5c3ae5(0x179)](_0x5c3ae5(0x173),{'params':{'userIDs':[..._0x4198a7]}}))['body'][_0x5c3ae5(0x141)]['forEach'](_0xe61910=>{const _0x136b5b=_0x5c3ae5;_0xe61910&&_0x3ac77b[_0x136b5b(0x14a)](_0xe61910);});};var K=Object[_0x71f2d7(0x177)],V=(_0x1d4c36,_0x52bff5,_0x2de957,_0xfd6f4c)=>{const _0x5bd90d=_0x71f2d7;for(var _0x4ac7ea=_0xfd6f4c>0x1?void 0x0:_0xfd6f4c?K(_0x52bff5,_0x2de957):_0x52bff5,_0x1f51ba=_0x1d4c36[_0x5bd90d(0x162)]-0x1,_0x2707df;_0x1f51ba>=0x0;_0x1f51ba--)(_0x2707df=_0x1d4c36[_0x1f51ba])&&(_0x4ac7ea=_0x2707df(_0x4ac7ea)||_0x4ac7ea);return _0x4ac7ea;},p=(_0x5bfa55,_0x5a8f58)=>(_0x23f223,_0x3f5dda)=>_0x5a8f58(_0x23f223,_0x3f5dda,_0x5bfa55);function _0x57eb(_0x1136d5,_0xda6e82){_0x1136d5=_0x1136d5-0x135;const _0x26806f=_0x2680();let _0x57ebbc=_0x26806f[_0x1136d5];return _0x57ebbc;}let _=class extends _0x29e1ca{constructor(_0xe091b8,_0x26fd23,_0x3baac5,_0x33652c){const _0x3fdb7f=_0x71f2d7;super(),this['_commentService']=_0xe091b8,this[_0x3fdb7f(0x194)]=_0x26fd23,this['_userService']=_0x3baac5,this[_0x3fdb7f(0x144)]=_0x33652c,this[_0x3fdb7f(0x14f)](),this[_0x3fdb7f(0x13e)]();}[_0x71f2d7(0x13e)](){const _0x416183=_0x71f2d7;this[_0x416183(0x14d)](this[_0x416183(0x194)][_0x416183(0x16d)]['pipe'](_0x3508e9(0x10))[_0x416183(0x17f)](_0x1ee22a=>{const _0x561f50=_0x416183,_0x264331=new Set();_0x1ee22a[_0x561f50(0x196)](_0x1ba53c=>{const _0x3d3925=_0x561f50;switch(_0x1ba53c['type']){case _0x3d3925(0x18a):{const _0x1ca1e8=_0x1ba53c[_0x3d3925(0x178)][_0x3d3925(0x14e)];_0x264331[_0x3d3925(0x18a)](_0x1ca1e8);break;}}}),B(this['_injector'],_0x264331);}));}[_0x71f2d7(0x14f)](){const _0xb9b1b1=_0x71f2d7;this[_0xb9b1b1(0x14d)](this[_0xb9b1b1(0x14b)]['commentUpdate$'][_0xb9b1b1(0x17f)](async _0x1c8959=>{const _0x1c3d0c=_0xb9b1b1;var _0x1083d4,_0x13f867,_0x4e51cb,_0x4a91a2;const _0x45b154=(_0x1083d4=this[_0x1c3d0c(0x194)]['getUnit'](_0x1c8959['unitId'])['find'](_0x48a8be=>_0x48a8be[_0x1c3d0c(0x138)]===_0x1c8959[_0x1c3d0c(0x138)]))==null?void 0x0:_0x1083d4[_0x1c3d0c(0x186)];if(!_0x45b154)return;const {unitId:_0xaf9cca,subUnitId:_0x3413ef}=_0x45b154;switch(_0x1c8959['user']&&this[_0x1c3d0c(0x157)]['addUser'](_0x1c8959[_0x1c3d0c(0x171)]),_0x1c8959[_0x1c3d0c(0x18b)]){case v['Add']:break;case v[_0x1c3d0c(0x15a)]:{this['_threadCommentModel'][_0x1c3d0c(0x154)](_0xaf9cca,_0x3413ef,{'unitId':_0xaf9cca,'subUnitId':_0x3413ef,'ref':'','id':_0x1c8959[_0x1c3d0c(0x13b)],'dT':y(+_0x1c8959[_0x1c3d0c(0x143)]),'threadId':_0x1c8959[_0x1c3d0c(0x138)],'personId':(_0x4e51cb=(_0x13f867=_0x1c8959[_0x1c3d0c(0x171)])==null?void 0x0:_0x13f867[_0x1c3d0c(0x15e)])!=null?_0x4e51cb:_0x1c8959[_0x1c3d0c(0x170)],'text':JSON['parse'](_0x1c8959[_0x1c3d0c(0x190)]),'parentId':_0x45b154['id']});break;}case v[_0x1c3d0c(0x167)]:{const _0x4db363=this[_0x1c3d0c(0x194)][_0x1c3d0c(0x156)](_0xaf9cca,_0x3413ef,_0x1c8959['replyId']);_0x4db363&&_0x4db363[_0x1c3d0c(0x163)]&&this[_0x1c3d0c(0x194)]['deleteComment'](_0xaf9cca,_0x3413ef,_0x1c8959[_0x1c3d0c(0x13b)]);break;}case v[_0x1c3d0c(0x16b)]:{this[_0x1c3d0c(0x194)][_0x1c3d0c(0x15c)](_0xaf9cca,_0x3413ef,{'commentId':_0x1c8959['replyId'],'text':JSON['parse'](_0x1c8959[_0x1c3d0c(0x190)])});break;}case v[_0x1c3d0c(0x13c)]:{const _0x5549a1=(_0x4a91a2=this[_0x1c3d0c(0x194)][_0x1c3d0c(0x174)](_0x1c8959['unitId'])[_0x1c3d0c(0x151)](_0x93216c=>_0x93216c[_0x1c3d0c(0x138)]===_0x1c8959[_0x1c3d0c(0x138)]))==null?void 0x0:_0x4a91a2[_0x1c3d0c(0x186)];_0x5549a1&&this[_0x1c3d0c(0x194)][_0x1c3d0c(0x140)](_0xaf9cca,_0x3413ef,_0x5549a1['id'],_0x1c8959['solved']===I[_0x1c3d0c(0x188)]);break;}}}));}};_=V([p(0x0,_0x4b8dfe(_0x23ec2c)),p(0x1,_0x4b8dfe(_0x2dcc4e)),p(0x2,_0x4b8dfe(_0x49c7ce)),p(0x3,_0x4b8dfe(_0x1eebbd))],_);const z=_0x71f2d7(0x135),O={};var k=Object[_0x71f2d7(0x177)],Q=(_0x3d60bc,_0x493938,_0x136973,_0x1d93f6)=>{const _0x3369e1=_0x71f2d7;for(var _0x517063=_0x1d93f6>0x1?void 0x0:_0x1d93f6?k(_0x493938,_0x136973):_0x493938,_0x188461=_0x3d60bc[_0x3369e1(0x162)]-0x1,_0x40d2e8;_0x188461>=0x0;_0x188461--)(_0x40d2e8=_0x3d60bc[_0x188461])&&(_0x517063=_0x40d2e8(_0x517063)||_0x517063);return _0x517063;},b=(_0x35691c,_0x67caae)=>(_0x2ee21b,_0x17d4a1)=>_0x67caae(_0x2ee21b,_0x17d4a1,_0x35691c);function X(_0x59ab06,_0x4cc334){const _0x4457af=_0x71f2d7,_0x5e5dc6=_0x59ab06[_0x4457af(0x160)][0x0];return{..._0x4cc334,'id':_0x5e5dc6[_0x4457af(0x13b)],'resolved':_0x59ab06[_0x4457af(0x17c)]===0x1,'dT':y(_0x5e5dc6[_0x4457af(0x143)]),'personId':_0x5e5dc6['userId'],'threadId':_0x5e5dc6[_0x4457af(0x138)]};}function ee(_0x2267d7,_0x4f4b41,_0x39b43d){const _0x3b5123=_0x71f2d7;var _0x30f74c,_0x206827;if(((_0x206827=(_0x30f74c=_0x2267d7==null?void 0x0:_0x2267d7[_0x3b5123(0x160)])==null?void 0x0:_0x30f74c[_0x3b5123(0x162)])!=null?_0x206827:0x0)>0x0){const _0x13066a=(_0x15f570,_0x301025)=>({'id':_0x15f570[_0x3b5123(0x13b)],'threadId':_0x15f570['threadId'],'dT':y(_0x15f570[_0x3b5123(0x143)]),'personId':_0x15f570[_0x3b5123(0x170)],'resolved':_0x2267d7[_0x3b5123(0x17c)]===I['Solved'],'unitId':_0x4f4b41,'subUnitId':_0x39b43d,'text':JSON[_0x3b5123(0x182)](_0x15f570['content']),'parentId':_0x301025}),_0x15e419=_0x13066a(_0x2267d7[_0x3b5123(0x160)][0x0]);return{..._0x15e419,'children':_0x2267d7[_0x3b5123(0x160)][_0x3b5123(0x165)](0x1)[_0x3b5123(0x187)](_0x35e611=>_0x13066a(_0x35e611,_0x15e419['id']))};}return null;}let S=class{constructor(_0x25f792,_0x849e6d,_0x39f288){const _0x8e49be=_0x71f2d7;this[_0x8e49be(0x193)]=_0x25f792,this[_0x8e49be(0x157)]=_0x849e6d,this[_0x8e49be(0x15d)]=_0x39f288;}async[_0x71f2d7(0x154)](_0x242c98){const _0xa5f463=_0x71f2d7;var _0x38accf,_0x353f16;const {parentId:_0x2a7630,unitId:_0x497fec,text:_0xf6a2ce,threadId:_0x195cc2}=_0x242c98,_0x295059=(_0x353f16=(_0x38accf=_0xf6a2ce[_0xa5f463(0x155)])==null?void 0x0:_0x38accf['filter'](_0xcf57df=>_0xcf57df['rangeType']===_0x33e38f[_0xa5f463(0x153)])[_0xa5f463(0x187)](_0x5a3db7=>_0x5a3db7[_0xa5f463(0x142)]))!=null?_0x353f16:[],_0x426211=JSON['stringify'](_0xf6a2ce),_0x29028c=(await this[_0xa5f463(0x15d)][_0xa5f463(0x161)](_0x497fec))[_0xa5f463(0x181)]();if(_0x2a7630){const _0x1e955a={'memberId':_0x29028c,'unitId':_0x497fec,'content':_0x426211,'mention':_0x295059,'threadId':_0x195cc2},_0x1cbd27=(await this['_httpService'][_0xa5f463(0x197)]('/universer-api/comment/unit/'+_0x497fec+_0xa5f463(0x137),{'body':_0x1e955a}))[_0xa5f463(0x14c)]['reply'];return{..._0x242c98,'id':_0x1cbd27[_0xa5f463(0x13b)],'dT':_0x56b0b9(+_0x1cbd27[_0xa5f463(0x143)])[_0xa5f463(0x149)](_0xa5f463(0x146)),'personId':_0x1cbd27['userId']};}else{const _0x416382={'memberId':_0x29028c,'unitId':_0x497fec,'content':_0x426211,'mention':_0x295059},_0x64dbf6=await this['_httpService'][_0xa5f463(0x197)](_0xa5f463(0x18f)+_0x497fec+'/add',{'body':_0x416382});return X(_0x64dbf6[_0xa5f463(0x14c)][_0xa5f463(0x168)],_0x242c98);}}async[_0x71f2d7(0x15c)](_0x5b8b9a){const _0x405343=_0x71f2d7;var _0x34842a,_0x430f73;const {text:_0x9d1f6d,unitId:_0x2cf297}=_0x5b8b9a,_0x4e7979=(_0x430f73=(_0x34842a=_0x9d1f6d[_0x405343(0x155)])==null?void 0x0:_0x34842a[_0x405343(0x15b)](_0x3ad844=>_0x3ad844[_0x405343(0x175)]===_0x33e38f[_0x405343(0x153)])['map'](_0xce2b6b=>_0xce2b6b[_0x405343(0x142)]))!=null?_0x430f73:[],_0x1b0ac6=JSON[_0x405343(0x13d)](_0x9d1f6d),_0x5616c4=_0x5b8b9a[_0x405343(0x138)],_0x35d6b2=_0x5b8b9a['id'],_0x52df02={'memberId':(await this[_0x405343(0x15d)]['requireSession'](_0x2cf297))[_0x405343(0x181)](),'unitId':_0x2cf297,'threadId':_0x5616c4,'mention':_0x4e7979,'content':_0x1b0ac6,'replyId':_0x35d6b2},_0x4baeac=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2cf297+'/edit',{'body':_0x52df02});return!_0x4baeac[_0x405343(0x14c)][_0x405343(0x147)]||_0x4baeac[_0x405343(0x14c)][_0x405343(0x147)]['code']===0x1;}async['resolveComment'](_0x33443c){const _0x1bf878=_0x71f2d7,{unitId:_0x1eafff}=_0x33443c,_0x28978b=_0x33443c[_0x1bf878(0x138)],_0x24b380={'memberId':this[_0x1bf878(0x157)][_0x1bf878(0x180)]()[_0x1bf878(0x15e)],'unitId':_0x1eafff,'threadId':_0x28978b,'solved':_0x33443c[_0x1bf878(0x17d)]?I[_0x1bf878(0x188)]:I[_0x1bf878(0x185)]},_0x55081b=await this[_0x1bf878(0x193)][_0x1bf878(0x197)](_0x1bf878(0x18f)+_0x1eafff+_0x1bf878(0x17a),{'body':_0x24b380});return!_0x55081b[_0x1bf878(0x14c)][_0x1bf878(0x147)]||_0x55081b['body'][_0x1bf878(0x147)][_0x1bf878(0x139)]===0x1;}async[_0x71f2d7(0x18c)](_0x4737d2,_0x1f6e83,_0x10f08c,_0x492560){const _0x54d510=_0x71f2d7,_0x1ccf04={'memberId':(await this[_0x54d510(0x15d)][_0x54d510(0x161)](_0x4737d2))[_0x54d510(0x181)](),'threadId':_0x10f08c,'replyId':_0x492560,'unitId':_0x4737d2},_0x2829ca=await this['_httpService'][_0x54d510(0x197)](_0x54d510(0x18f)+_0x4737d2+_0x54d510(0x148),{'body':_0x1ccf04});return!_0x2829ca[_0x54d510(0x14c)]['error']||_0x2829ca[_0x54d510(0x14c)]['error']['code']===0x1;}async[_0x71f2d7(0x16c)](_0x1bf58e,_0x43c086,_0x11e529){const _0x3b4f67=_0x71f2d7,_0x3d576b={'unitId':_0x1bf58e,'threadId':_0x11e529},_0x4f57fa=await this[_0x3b4f67(0x193)][_0x3b4f67(0x197)]('/universer-api/comment/unit/'+_0x1bf58e+_0x3b4f67(0x16a),{'body':_0x3d576b}),_0x12307e=_0x11e529[_0x3b4f67(0x187)](_0x31626e=>ee(_0x4f57fa[_0x3b4f67(0x14c)]['comments'][_0x31626e],_0x1bf58e,_0x43c086))[_0x3b4f67(0x15b)](Boolean);return Object[_0x3b4f67(0x18e)](_0x4f57fa[_0x3b4f67(0x14c)][_0x3b4f67(0x141)])['forEach'](_0x4a9a31=>{const _0x3df9de=_0x3b4f67;this[_0x3df9de(0x157)][_0x3df9de(0x14a)](_0x4a9a31);}),_0x12307e;}['saveCommentToSnapshot'](_0x2422c6){const _0x27c2cc=_0x71f2d7;return{'id':_0x2422c6['id'],'threadId':_0x2422c6[_0x27c2cc(0x138)],'ref':_0x2422c6[_0x27c2cc(0x195)]};}};S=Q([b(0x0,_0x4b8dfe(_0x15440e)),b(0x1,_0x4b8dfe(_0x49c7ce)),b(0x2,_0x4b8dfe(_0x4ead13))],S);var re=Object[_0x71f2d7(0x177)],te=(_0x50bf10,_0x3fdbfc,_0x36687f,_0x289651)=>{const _0x173baa=_0x71f2d7;for(var _0x39cbfb=_0x289651>0x1?void 0x0:_0x289651?re(_0x3fdbfc,_0x36687f):_0x3fdbfc,_0x5a9f7d=_0x50bf10[_0x173baa(0x162)]-0x1,_0x59fe3c;_0x5a9f7d>=0x0;_0x5a9f7d--)(_0x59fe3c=_0x50bf10[_0x5a9f7d])&&(_0x39cbfb=_0x59fe3c(_0x39cbfb)||_0x39cbfb);return _0x39cbfb;},M=(_0x5b7d28,_0x24860d)=>(_0x4551b0,_0x870ee8)=>_0x24860d(_0x4551b0,_0x870ee8,_0x5b7d28);let f=class extends _0x29e1ca{constructor(_0xf65984,_0x4262cc){const _0x412f95=_0x71f2d7;super(),this[_0x412f95(0x169)]=_0xf65984,this[_0x412f95(0x152)]=_0x4262cc,this['_initDataSource']();}[_0x71f2d7(0x13f)](){const _0x4e4d0b=_0x71f2d7;this[_0x4e4d0b(0x169)][_0x4e4d0b(0x16f)]=this['_threadCommentDataSource'],this[_0x4e4d0b(0x169)][_0x4e4d0b(0x184)]=!0x1;}};f=te([M(0x0,_0x3f700d),M(0x1,_0x4b8dfe(S))],f);var se=Object[_0x71f2d7(0x198)],oe=Object[_0x71f2d7(0x177)],ne=(_0x5a2935,_0x1a5f49,_0x2380d7)=>_0x1a5f49 in _0x5a2935?se(_0x5a2935,_0x1a5f49,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2380d7}):_0x5a2935[_0x1a5f49]=_0x2380d7,ie=(_0x42624b,_0x16437a,_0x5817be,_0x2f9234)=>{const _0x257769=_0x71f2d7;for(var _0x20b0cc=_0x2f9234>0x1?void 0x0:_0x2f9234?oe(_0x16437a,_0x5817be):_0x16437a,_0x465cc7=_0x42624b[_0x257769(0x162)]-0x1,_0x51cc57;_0x465cc7>=0x0;_0x465cc7--)(_0x51cc57=_0x42624b[_0x465cc7])&&(_0x20b0cc=_0x51cc57(_0x20b0cc)||_0x20b0cc);return _0x20b0cc;},N=(_0x5ebd8c,_0xf91dba)=>(_0x45e77c,_0x410d4e)=>_0xf91dba(_0x45e77c,_0x410d4e,_0x5ebd8c),$=(_0x3476e5,_0x1d61ca,_0x2345bc)=>ne(_0x3476e5,typeof _0x1d61ca!=_0x71f2d7(0x145)?_0x1d61ca+'':_0x1d61ca,_0x2345bc);let g=class extends _0x39767c{constructor(_0x30c6c8=O,_0x1b0758,_0x4b4e72){const _0x1510e7=_0x71f2d7;super(),this[_0x1510e7(0x150)]=_0x30c6c8,this[_0x1510e7(0x144)]=_0x1b0758,this[_0x1510e7(0x136)]=_0x4b4e72;const {..._0x185bf6}=_0xf97ff9({},O,this[_0x1510e7(0x150)]);this['_configService'][_0x1510e7(0x189)](z,_0x185bf6);}['onStarting'](){const _0x9bf7fb=_0x71f2d7;[[S],[f],[_]][_0x9bf7fb(0x196)](_0x31e914=>{const _0x587ac2=_0x9bf7fb;this[_0x587ac2(0x144)][_0x587ac2(0x18a)](_0x31e914);});}[_0x71f2d7(0x176)](){const _0x2c4b82=_0x71f2d7;this[_0x2c4b82(0x144)][_0x2c4b82(0x179)](f),this[_0x2c4b82(0x144)][_0x2c4b82(0x179)](_);}};$(g,'pluginName',W),$(g,'type',_0x48d0a5[_0x71f2d7(0x158)]),g=ie([_0x296157(_0x228392,_0x33917a,_0x44e499),N(0x1,_0x4b8dfe(_0x1eebbd)),N(0x2,_0x128401)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1e10(_0x512148,_0x2ee8c3){_0x512148=_0x512148-0x67;const _0x404909=_0x4049();let _0x1e1039=_0x404909[_0x512148];return _0x1e1039;}(function(_0x104196,_0x2ec350){const _0x586797=_0x1e10,_0x59149f=_0x104196();while(!![]){try{const _0x9d4b96=parseInt(_0x586797(0x92))/0x1+parseInt(_0x586797(0xd4))/0x2+-parseInt(_0x586797(0xb7))/0x3+-parseInt(_0x586797(0xcc))/0x4+-parseInt(_0x586797(0xb5))/0x5+parseInt(_0x586797(0xac))/0x6*(parseInt(_0x586797(0xa8))/0x7)+-parseInt(_0x586797(0x6e))/0x8;if(_0x9d4b96===_0x2ec350)break;else _0x59149f['push'](_0x59149f['shift']());}catch(_0x3e6089){_0x59149f['push'](_0x59149f['shift']());}}}(_0x4049,0x8f55d),function(_0xe078fe,_0x1635f9){const _0x50102b=_0x1e10;typeof exports==_0x50102b(0xcb)&&typeof module<'u'?_0x1635f9(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x50102b(0xdd)&&define[_0x50102b(0xcf)]?define([_0x50102b(0xb0),_0x50102b(0x7a),_0x50102b(0x91),_0x50102b(0xbf),'@univerjs/thread-comment-ui',_0x50102b(0xe5),_0x50102b(0x71),_0x50102b(0xd7)],_0x1635f9):(_0xe078fe=typeof globalThis<'u'?globalThis:_0xe078fe||self,_0x1635f9(_0xe078fe['UniverProThreadCommentDatasource']={},_0xe078fe[_0x50102b(0xa6)],_0xe078fe[_0x50102b(0x77)],_0xe078fe[_0x50102b(0x9c)],_0xe078fe[_0x50102b(0x90)],_0xe078fe[_0x50102b(0x96)],_0xe078fe[_0x50102b(0x71)],_0xe078fe[_0x50102b(0xe8)]));}(this,function(_0x8c5ac4,_0x150138,_0x41db44,_0x20b2cb,_0x422b9e,_0x452b2f,_0xd5333,_0x9f538c){'use strict';const _0x518227=_0x1e10;const _0x378f72=_0x518227(0x95);var _0x4a49df=(_0x51d771=>(_0x51d771[_0x51d771['OpenOrReOpen']=0x0]=_0x518227(0xd9),_0x51d771[_0x51d771[_0x518227(0x8d)]=0x1]=_0x518227(0x8d),_0x51d771[_0x51d771[_0x518227(0x6a)]=-0x1]=_0x518227(0x6a),_0x51d771))(_0x4a49df||{}),_0x39c2af=(_0x3d4198=>(_0x3d4198[_0x3d4198[_0x518227(0xb4)]=0x0]=_0x518227(0xb4),_0x3d4198[_0x3d4198[_0x518227(0x99)]=0x1]=_0x518227(0x99),_0x3d4198[_0x3d4198['Reply']=0x2]=_0x518227(0x9d),_0x3d4198[_0x3d4198[_0x518227(0xd0)]=0x3]='Edit',_0x3d4198[_0x3d4198[_0x518227(0x6f)]=0x4]=_0x518227(0x6f),_0x3d4198[_0x3d4198[_0x518227(0xe9)]=0x5]=_0x518227(0xe9),_0x3d4198[_0x3d4198[_0x518227(0x6a)]=-0x1]=_0x518227(0x6a),_0x3d4198))(_0x39c2af||{});const _0x21b2ba=_0x3039eb=>_0x20b2cb[_0x518227(0xea)](new Date(+_0x3039eb))[_0x518227(0x68)](_0x518227(0xba)),_0x555a25=async(_0x5f30a9,_0x5a5b52)=>{const _0x19177c=_0x518227,_0x4afab7=_0x5f30a9[_0x19177c(0xde)](_0x20b2cb[_0x19177c(0xc8)]),_0x2c7e1b=_0x5f30a9['get'](_0x9f538c[_0x19177c(0xbb)]);_0x5a5b52['forEach'](_0x39fc39=>{const _0x3ea067=_0x19177c;_0x4afab7[_0x3ea067(0xb9)](_0x39fc39)&&_0x5a5b52[_0x3ea067(0xa9)](_0x39fc39);}),_0x5a5b52['size']&&(await _0x2c7e1b['get'](_0x19177c(0x7d),{'params':{'userIDs':[..._0x5a5b52]}}))['body'][_0x19177c(0x85)][_0x19177c(0x7e)](_0x1519cf=>{const _0x110e45=_0x19177c;_0x1519cf&&_0x4afab7[_0x110e45(0x69)](_0x1519cf);});};var _0x32e3d9=Object[_0x518227(0xa5)],_0x40c1de=(_0xaebe00,_0x1b210b,_0x24abab,_0x3d3558)=>{const _0x362537=_0x518227;for(var _0x39e4f5=_0x3d3558>0x1?void 0x0:_0x3d3558?_0x32e3d9(_0x1b210b,_0x24abab):_0x1b210b,_0x1d416a=_0xaebe00[_0x362537(0xab)]-0x1,_0x3ce2c3;_0x1d416a>=0x0;_0x1d416a--)(_0x3ce2c3=_0xaebe00[_0x1d416a])&&(_0x39e4f5=_0x3ce2c3(_0x39e4f5)||_0x39e4f5);return _0x39e4f5;},_0x213a69=(_0x2595d3,_0x378ed7)=>(_0x53d753,_0x5bddd8)=>_0x378ed7(_0x53d753,_0x5bddd8,_0x2595d3);let _0x2021bf=class extends _0x20b2cb[_0x518227(0x88)]{constructor(_0x467d79,_0xb16511,_0x3a4511,_0x2d883c){const _0x215223=_0x518227;super(),this[_0x215223(0xa4)]=_0x467d79,this[_0x215223(0x8c)]=_0xb16511,this[_0x215223(0xda)]=_0x3a4511,this[_0x215223(0x78)]=_0x2d883c,this[_0x215223(0xdc)](),this[_0x215223(0xa3)]();}['_initUserSync'](){const _0x50dd91=_0x518227;this['disposeWithMe'](this[_0x50dd91(0x8c)][_0x50dd91(0xb2)][_0x50dd91(0xaa)](_0xd5333['bufferTime'](0x10))[_0x50dd91(0xe7)](_0x5a1e10=>{const _0x7a8d1b=_0x50dd91,_0x514c0a=new Set();_0x5a1e10[_0x7a8d1b(0x7e)](_0x1a5a9f=>{const _0x55b731=_0x7a8d1b;switch(_0x1a5a9f[_0x55b731(0x8a)]){case _0x55b731(0xbd):{const _0x32a87d=_0x1a5a9f[_0x55b731(0xe4)][_0x55b731(0x67)];_0x514c0a['add'](_0x32a87d);break;}}}),_0x555a25(this['_injector'],_0x514c0a);}));}[_0x518227(0xdc)](){const _0x13763a=_0x518227;this[_0x13763a(0xc9)](this['_commentService']['commentUpdate$']['subscribe'](async _0x533b69=>{const _0x650bbd=_0x13763a;var _0x13251c,_0x884367,_0x210d32,_0x53448d;const _0x18a952=(_0x13251c=this['_threadCommentModel']['getUnit'](_0x533b69[_0x650bbd(0xe0)])['find'](_0x4327a9=>_0x4327a9[_0x650bbd(0x86)]===_0x533b69[_0x650bbd(0x86)]))==null?void 0x0:_0x13251c[_0x650bbd(0xd1)];if(!_0x18a952)return;const {unitId:_0x5707dd,subUnitId:_0x490785}=_0x18a952;switch(_0x533b69['user']&&this['_userService']['addUser'](_0x533b69[_0x650bbd(0xc6)]),_0x533b69[_0x650bbd(0x8a)]){case _0x39c2af[_0x650bbd(0x99)]:break;case _0x39c2af[_0x650bbd(0x9d)]:{this['_threadCommentModel']['addComment'](_0x5707dd,_0x490785,{'unitId':_0x5707dd,'subUnitId':_0x490785,'ref':'','id':_0x533b69[_0x650bbd(0xce)],'dT':_0x21b2ba(+_0x533b69[_0x650bbd(0xca)]),'threadId':_0x533b69[_0x650bbd(0x86)],'personId':(_0x210d32=(_0x884367=_0x533b69[_0x650bbd(0xc6)])==null?void 0x0:_0x884367['userID'])!=null?_0x210d32:_0x533b69[_0x650bbd(0x79)],'text':JSON['parse'](_0x533b69[_0x650bbd(0xdf)]),'parentId':_0x18a952['id']});break;}case _0x39c2af[_0x650bbd(0x6f)]:{const _0x71bad=this[_0x650bbd(0x8c)][_0x650bbd(0xe2)](_0x5707dd,_0x490785,_0x533b69[_0x650bbd(0xce)]);_0x71bad&&_0x71bad['parentId']&&this['_threadCommentModel']['deleteComment'](_0x5707dd,_0x490785,_0x533b69[_0x650bbd(0xce)]);break;}case _0x39c2af[_0x650bbd(0xd0)]:{this[_0x650bbd(0x8c)]['updateComment'](_0x5707dd,_0x490785,{'commentId':_0x533b69[_0x650bbd(0xce)],'text':JSON[_0x650bbd(0xae)](_0x533b69[_0x650bbd(0xdf)])});break;}case _0x39c2af[_0x650bbd(0xe9)]:{const _0x2ccc66=(_0x53448d=this[_0x650bbd(0x8c)][_0x650bbd(0x87)](_0x533b69[_0x650bbd(0xe0)])['find'](_0x180e4a=>_0x180e4a[_0x650bbd(0x86)]===_0x533b69[_0x650bbd(0x86)]))==null?void 0x0:_0x53448d['root'];_0x2ccc66&&this['_threadCommentModel'][_0x650bbd(0xad)](_0x5707dd,_0x490785,_0x2ccc66['id'],_0x533b69[_0x650bbd(0xd2)]===_0x4a49df['Solved']);break;}}}));}};_0x2021bf=_0x40c1de([_0x213a69(0x0,_0x20b2cb[_0x518227(0x76)](_0x150138[_0x518227(0xaf)])),_0x213a69(0x1,_0x20b2cb['Inject'](_0x452b2f['ThreadCommentModel'])),_0x213a69(0x2,_0x20b2cb[_0x518227(0x76)](_0x20b2cb[_0x518227(0xc8)])),_0x213a69(0x3,_0x20b2cb[_0x518227(0x76)](_0x20b2cb['Injector']))],_0x2021bf);const _0xd4012=_0x518227(0x81),_0x12b701={};var _0x13bd95=Object[_0x518227(0xa5)],_0x1e9da9=(_0x257214,_0x49d8cc,_0xaa434b,_0x73aa5)=>{const _0x4105f4=_0x518227;for(var _0x50d19c=_0x73aa5>0x1?void 0x0:_0x73aa5?_0x13bd95(_0x49d8cc,_0xaa434b):_0x49d8cc,_0x3f62ac=_0x257214[_0x4105f4(0xab)]-0x1,_0x43b91f;_0x3f62ac>=0x0;_0x3f62ac--)(_0x43b91f=_0x257214[_0x3f62ac])&&(_0x50d19c=_0x43b91f(_0x50d19c)||_0x50d19c);return _0x50d19c;},_0x5ec117=(_0x2aecdb,_0x169b11)=>(_0x1d9617,_0x4cb2e8)=>_0x169b11(_0x1d9617,_0x4cb2e8,_0x2aecdb);function _0x3c462a(_0x289c47,_0x3fabb){const _0x28b727=_0x518227,_0x42b375=_0x289c47[_0x28b727(0x72)][0x0];return{..._0x3fabb,'id':_0x42b375[_0x28b727(0xce)],'resolved':_0x289c47[_0x28b727(0xd2)]===0x1,'dT':_0x21b2ba(_0x42b375[_0x28b727(0xca)]),'personId':_0x42b375['userId'],'threadId':_0x42b375[_0x28b727(0x86)]};}function _0x52bbc0(_0x1432c7,_0xa742e7,_0x28ff06){const _0x52146c=_0x518227;var _0x4cdfbd,_0x2abd54;if(((_0x2abd54=(_0x4cdfbd=_0x1432c7==null?void 0x0:_0x1432c7[_0x52146c(0x72)])==null?void 0x0:_0x4cdfbd[_0x52146c(0xab)])!=null?_0x2abd54:0x0)>0x0){const _0x4ec8b6=(_0x95cea8,_0xbf9922)=>({'id':_0x95cea8['replyId'],'threadId':_0x95cea8['threadId'],'dT':_0x21b2ba(_0x95cea8[_0x52146c(0xca)]),'personId':_0x95cea8[_0x52146c(0x79)],'resolved':_0x1432c7[_0x52146c(0xd2)]===_0x4a49df['Solved'],'unitId':_0xa742e7,'subUnitId':_0x28ff06,'text':JSON[_0x52146c(0xae)](_0x95cea8[_0x52146c(0xdf)]),'parentId':_0xbf9922}),_0x9a3d33=_0x4ec8b6(_0x1432c7[_0x52146c(0x72)][0x0]);return{..._0x9a3d33,'children':_0x1432c7['replies']['slice'](0x1)[_0x52146c(0xbe)](_0x36e757=>_0x4ec8b6(_0x36e757,_0x9a3d33['id']))};}return null;}let _0x2b8bfd=class{constructor(_0x25ef62,_0x1f6465,_0x2ac169){const _0x4ac67b=_0x518227;this[_0x4ac67b(0xd8)]=_0x25ef62,this['_userService']=_0x1f6465,this[_0x4ac67b(0xd5)]=_0x2ac169;}async['addComment'](_0x3741dd){const _0x53660f=_0x518227;var _0x4b88e8,_0x2656b2;const {parentId:_0x506af3,unitId:_0x53637c,text:_0x4ecfec,threadId:_0x5abcbb}=_0x3741dd,_0x248cad=(_0x2656b2=(_0x4b88e8=_0x4ecfec[_0x53660f(0xb6)])==null?void 0x0:_0x4b88e8[_0x53660f(0x9b)](_0x57c490=>_0x57c490[_0x53660f(0x9a)]===_0x20b2cb[_0x53660f(0x6c)][_0x53660f(0x97)])[_0x53660f(0xbe)](_0x21f21f=>_0x21f21f[_0x53660f(0x7f)]))!=null?_0x2656b2:[],_0x242dde=JSON[_0x53660f(0x83)](_0x4ecfec),_0x287395=(await this['_sessionService'][_0x53660f(0xa7)](_0x53637c))[_0x53660f(0xc2)]();if(_0x506af3){const _0xb23eab={'memberId':_0x287395,'unitId':_0x53637c,'content':_0x242dde,'mention':_0x248cad,'threadId':_0x5abcbb},_0x38c1aa=(await this[_0x53660f(0xd8)]['post'](_0x53660f(0xc5)+_0x53637c+_0x53660f(0xe6),{'body':_0xb23eab}))['body'][_0x53660f(0x9e)];return{..._0x3741dd,'id':_0x38c1aa[_0x53660f(0xce)],'dT':_0x20b2cb[_0x53660f(0xea)](+_0x38c1aa[_0x53660f(0xca)])[_0x53660f(0x68)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x38c1aa['userId']};}else{const _0x23feea={'memberId':_0x287395,'unitId':_0x53637c,'content':_0x242dde,'mention':_0x248cad},_0x35a650=await this['_httpService'][_0x53660f(0x73)](_0x53660f(0xc5)+_0x53637c+_0x53660f(0x8e),{'body':_0x23feea});return _0x3c462a(_0x35a650['body'][_0x53660f(0x84)],_0x3741dd);}}async[_0x518227(0x74)](_0x3560c4){const _0x4fdaf0=_0x518227;var _0x17be41,_0x4fb7b8;const {text:_0x3b64ac,unitId:_0x101030}=_0x3560c4,_0x33dffd=(_0x4fb7b8=(_0x17be41=_0x3b64ac['customRanges'])==null?void 0x0:_0x17be41['filter'](_0x5ef4a4=>_0x5ef4a4[_0x4fdaf0(0x9a)]===_0x20b2cb[_0x4fdaf0(0x6c)][_0x4fdaf0(0x97)])[_0x4fdaf0(0xbe)](_0x24389f=>_0x24389f['rangeId']))!=null?_0x4fb7b8:[],_0x38b5dc=JSON[_0x4fdaf0(0x83)](_0x3b64ac),_0x4df5cf=_0x3560c4['threadId'],_0x220387=_0x3560c4['id'],_0x4d6267={'memberId':(await this['_sessionService'][_0x4fdaf0(0xa7)](_0x101030))['getMemberID'](),'unitId':_0x101030,'threadId':_0x4df5cf,'mention':_0x33dffd,'content':_0x38b5dc,'replyId':_0x220387},_0x4688ea=await this[_0x4fdaf0(0xd8)][_0x4fdaf0(0x73)](_0x4fdaf0(0xc5)+_0x101030+_0x4fdaf0(0xa0),{'body':_0x4d6267});return!_0x4688ea[_0x4fdaf0(0xb3)][_0x4fdaf0(0xc0)]||_0x4688ea[_0x4fdaf0(0xb3)][_0x4fdaf0(0xc0)][_0x4fdaf0(0xc3)]===0x1;}async[_0x518227(0xad)](_0x4c8b32){const _0x515808=_0x518227,{unitId:_0x427b02}=_0x4c8b32,_0x4c09b7=_0x4c8b32[_0x515808(0x86)],_0x31184c={'memberId':this['_userService']['getCurrentUser']()[_0x515808(0xc1)],'unitId':_0x427b02,'threadId':_0x4c09b7,'solved':_0x4c8b32[_0x515808(0xc4)]?_0x4a49df[_0x515808(0x8d)]:_0x4a49df[_0x515808(0xd9)]},_0x3ccd92=await this[_0x515808(0xd8)][_0x515808(0x73)](_0x515808(0xc5)+_0x427b02+'/solved',{'body':_0x31184c});return!_0x3ccd92[_0x515808(0xb3)][_0x515808(0xc0)]||_0x3ccd92[_0x515808(0xb3)][_0x515808(0xc0)][_0x515808(0xc3)]===0x1;}async['deleteComment'](_0x13e7b3,_0x5a1f9c,_0x4f338a,_0x19c020){const _0x26841f=_0x518227,_0x20972b={'memberId':(await this[_0x26841f(0xd5)][_0x26841f(0xa7)](_0x13e7b3))[_0x26841f(0xc2)](),'threadId':_0x4f338a,'replyId':_0x19c020,'unitId':_0x13e7b3},_0x246971=await this['_httpService'][_0x26841f(0x73)](_0x26841f(0xc5)+_0x13e7b3+_0x26841f(0x6b),{'body':_0x20972b});return!_0x246971[_0x26841f(0xb3)][_0x26841f(0xc0)]||_0x246971[_0x26841f(0xb3)]['error'][_0x26841f(0xc3)]===0x1;}async[_0x518227(0x80)](_0x3035db,_0x3958bf,_0x4bd665){const _0x529cff=_0x518227,_0x21de8e={'unitId':_0x3035db,'threadId':_0x4bd665},_0x50bbe2=await this[_0x529cff(0xd8)][_0x529cff(0x73)](_0x529cff(0xc5)+_0x3035db+_0x529cff(0xe3),{'body':_0x21de8e}),_0x5bc75b=_0x4bd665[_0x529cff(0xbe)](_0x19cdee=>_0x52bbc0(_0x50bbe2[_0x529cff(0xb3)][_0x529cff(0x8b)][_0x19cdee],_0x3035db,_0x3958bf))['filter'](Boolean);return Object[_0x529cff(0xcd)](_0x50bbe2[_0x529cff(0xb3)][_0x529cff(0x85)])['forEach'](_0x5ce4cb=>{const _0x289ea6=_0x529cff;this[_0x289ea6(0xda)][_0x289ea6(0x69)](_0x5ce4cb);}),_0x5bc75b;}[_0x518227(0x75)](_0x4bcd1d){return{'id':_0x4bcd1d['id'],'threadId':_0x4bcd1d['threadId'],'ref':_0x4bcd1d['ref']};}};_0x2b8bfd=_0x1e9da9([_0x5ec117(0x0,_0x20b2cb[_0x518227(0x76)](_0x9f538c[_0x518227(0xbb)])),_0x5ec117(0x1,_0x20b2cb[_0x518227(0x76)](_0x20b2cb[_0x518227(0xc8)])),_0x5ec117(0x2,_0x20b2cb[_0x518227(0x76)](_0x150138['CollaborationSessionService']))],_0x2b8bfd);var _0x40aa5b=Object[_0x518227(0xa5)],_0x2864da=(_0x24cbed,_0x4522d9,_0x238b83,_0x5dc6da)=>{const _0x74259c=_0x518227;for(var _0x3b7039=_0x5dc6da>0x1?void 0x0:_0x5dc6da?_0x40aa5b(_0x4522d9,_0x238b83):_0x4522d9,_0x50cb7d=_0x24cbed[_0x74259c(0xab)]-0x1,_0x12b061;_0x50cb7d>=0x0;_0x50cb7d--)(_0x12b061=_0x24cbed[_0x50cb7d])&&(_0x3b7039=_0x12b061(_0x3b7039)||_0x3b7039);return _0x3b7039;},_0x348bbf=(_0x394d1d,_0x561967)=>(_0x517952,_0x18508f)=>_0x561967(_0x517952,_0x18508f,_0x394d1d);let _0x4c10ff=class extends _0x20b2cb['Disposable']{constructor(_0x132fe5,_0x591af8){const _0x37e73f=_0x518227;super(),this[_0x37e73f(0xd3)]=_0x132fe5,this[_0x37e73f(0xe1)]=_0x591af8,this[_0x37e73f(0x9f)]();}[_0x518227(0x9f)](){const _0x4dba7b=_0x518227;this[_0x4dba7b(0xd3)][_0x4dba7b(0xdb)]=this[_0x4dba7b(0xe1)],this[_0x4dba7b(0xd3)][_0x4dba7b(0xa2)]=!0x1;}};_0x4c10ff=_0x2864da([_0x348bbf(0x0,_0x452b2f[_0x518227(0x98)]),_0x348bbf(0x1,_0x20b2cb[_0x518227(0x76)](_0x2b8bfd))],_0x4c10ff);var _0x2140a9=Object['defineProperty'],_0x4a86ed=Object[_0x518227(0xa5)],_0x4eabb3=(_0x190cda,_0x21650a,_0xf1fa12)=>_0x21650a in _0x190cda?_0x2140a9(_0x190cda,_0x21650a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf1fa12}):_0x190cda[_0x21650a]=_0xf1fa12,_0x90131d=(_0x1205dd,_0x4a51cd,_0x4fe526,_0x2466a4)=>{const _0x4f42d6=_0x518227;for(var _0x3255e0=_0x2466a4>0x1?void 0x0:_0x2466a4?_0x4a86ed(_0x4a51cd,_0x4fe526):_0x4a51cd,_0x34cfca=_0x1205dd[_0x4f42d6(0xab)]-0x1,_0x58af97;_0x34cfca>=0x0;_0x34cfca--)(_0x58af97=_0x1205dd[_0x34cfca])&&(_0x3255e0=_0x58af97(_0x3255e0)||_0x3255e0);return _0x3255e0;},_0x7e1683=(_0x485826,_0x2d718d)=>(_0x1121de,_0xd6b854)=>_0x2d718d(_0x1121de,_0xd6b854,_0x485826),_0xbafd78=(_0x355641,_0x4780d0,_0x3ddd51)=>_0x4eabb3(_0x355641,typeof _0x4780d0!='symbol'?_0x4780d0+'':_0x4780d0,_0x3ddd51);_0x8c5ac4[_0x518227(0xb8)]=class extends _0x20b2cb['Plugin']{constructor(_0x11ad2c=_0x12b701,_0x518f52,_0x374606){const _0x3e03c3=_0x518227;super(),this[_0x3e03c3(0x8f)]=_0x11ad2c,this['_injector']=_0x518f52,this[_0x3e03c3(0x82)]=_0x374606;const {..._0x2df462}=_0x20b2cb[_0x3e03c3(0x93)]({},_0x12b701,this[_0x3e03c3(0x8f)]);this[_0x3e03c3(0x82)][_0x3e03c3(0xbc)](_0xd4012,_0x2df462);}[_0x518227(0xc7)](){const _0x1dfb57=_0x518227;[[_0x2b8bfd],[_0x4c10ff],[_0x2021bf]][_0x1dfb57(0x7e)](_0x483a63=>{const _0x48c6f4=_0x1dfb57;this[_0x48c6f4(0x78)]['add'](_0x483a63);});}[_0x518227(0xb1)](){const _0x4da6a1=_0x518227;this[_0x4da6a1(0x78)][_0x4da6a1(0xde)](_0x4c10ff),this['_injector'][_0x4da6a1(0xde)](_0x2021bf);}},_0xbafd78(_0x8c5ac4[_0x518227(0xb8)],'pluginName',_0x378f72),_0xbafd78(_0x8c5ac4[_0x518227(0xb8)],'type',_0x20b2cb[_0x518227(0xd6)][_0x518227(0x7b)]),_0x8c5ac4[_0x518227(0xb8)]=_0x90131d([_0x20b2cb[_0x518227(0x94)](_0x422b9e['UniverThreadCommentUIPlugin'],_0x150138[_0x518227(0x6d)],_0x41db44['UniverLicensePlugin']),_0x7e1683(0x1,_0x20b2cb[_0x518227(0x76)](_0x20b2cb[_0x518227(0x89)])),_0x7e1683(0x2,_0x20b2cb['IConfigService'])],_0x8c5ac4[_0x518227(0xb8)]),Object[_0x518227(0x70)](_0x8c5ac4,Symbol[_0x518227(0xa1)],{'value':_0x518227(0x7c)});}));function _0x4049(){const _0x39bf12=['Edit','root','solved','_threadCommentDataSourceService','1078990nHrzGv','_sessionService','UniverInstanceType','@univerjs/network','_httpService','OpenOrReOpen','_userService','dataSource','_init','function','get','content','unitId','_threadCommentDataSource','getComment','/list','payload','@univerjs/thread-comment','/reply','subscribe','UniverNetwork','Solve','dayjs','personId','format','addUser','UNRECOGNIZED','/delete','CustomRangeType','UniverCollaborationClientPlugin','1108864xDxIzK','Delete','defineProperty','rxjs','replies','post','updateComment','saveCommentToSnapshot','Inject','UniverProLicense','_injector','userId','@univerjs-pro/collaboration-client','UNIVER_UNKNOWN','Module','/universer-api/user/list','forEach','rangeId','listComments','thread-comment-data-source.config','_configService','stringify','comment','users','threadId','getUnit','Disposable','Injector','type','comments','_threadCommentModel','Solved','/add','_config','UniverThreadCommentUi','@univerjs-pro/license','786372HcNVZo','merge','DependentOn','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadComment','COMMENT','IThreadCommentDataSourceService','Add','rangeType','filter','UniverCore','Reply','reply','_initDataSource','/edit','toStringTag','syncUpdateMutationToColla','_initUserSync','_commentService','getOwnPropertyDescriptor','UniverProCollaborationClient','requireSession','63jOAwxh','delete','pipe','length','602466pjRWgY','resolveComment','parse','CommentService','exports','onReady','commentUpdate$','body','Unknown','1147360qIuSXe','customRanges','2384244rRYBel','UniverThreadCommentDataSourcePlugin','getUser','YYYY/MM/DD\x20HH:mm','HTTPService','setConfig','add','map','@univerjs/core','error','userID','getMemberID','code','resolved','/universer-api/comment/unit/','user','onStarting','UserManagerService','disposeWithMe','createTimestamp','object','1918548GsNzdI','values','replyId','amd'];_0x4049=function(){return _0x39bf12;};return _0x4049();}
1
+ (function(_0xeb5dd5,_0x2c5eab){const _0x27a719=_0x252d,_0x2514db=_0xeb5dd5();while(!![]){try{const _0x38ef6b=-parseInt(_0x27a719(0x1a8))/0x1*(-parseInt(_0x27a719(0x1ab))/0x2)+parseInt(_0x27a719(0x1db))/0x3+-parseInt(_0x27a719(0x1b6))/0x4+-parseInt(_0x27a719(0x1ed))/0x5+-parseInt(_0x27a719(0x205))/0x6+-parseInt(_0x27a719(0x20e))/0x7*(parseInt(_0x27a719(0x1ff))/0x8)+parseInt(_0x27a719(0x1f5))/0x9;if(_0x38ef6b===_0x2c5eab)break;else _0x2514db['push'](_0x2514db['shift']());}catch(_0x31750b){_0x2514db['push'](_0x2514db['shift']());}}}(_0x35a6,0x4a661),function(_0x14c6ca,_0xa3ad81){const _0x1e1d63=_0x252d;typeof exports==_0x1e1d63(0x1c4)&&typeof module<'u'?_0xa3ad81(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x1e1d63(0x1fb)]?define([_0x1e1d63(0x191),_0x1e1d63(0x1f1),'@univerjs-pro/license','@univerjs/core','@univerjs/thread-comment-ui',_0x1e1d63(0x195),_0x1e1d63(0x197),_0x1e1d63(0x1e2)],_0xa3ad81):(_0x14c6ca=typeof globalThis<'u'?globalThis:_0x14c6ca||self,_0xa3ad81(_0x14c6ca[_0x1e1d63(0x198)]={},_0x14c6ca[_0x1e1d63(0x1d8)],_0x14c6ca['UniverProLicense'],_0x14c6ca[_0x1e1d63(0x1b0)],_0x14c6ca[_0x1e1d63(0x19e)],_0x14c6ca['UniverThreadComment'],_0x14c6ca[_0x1e1d63(0x197)],_0x14c6ca[_0x1e1d63(0x1bd)]));}(this,function(_0x4afe61,_0x3f0ee1,_0x3ada5f,_0x92db82,_0x164632,_0x3dde62,_0x3e3a06,_0x206d9f){'use strict';const _0x8e74c2=_0x252d;const _0x2b801f=_0x8e74c2(0x1dc);var _0x551ddc=(_0xf2bb46=>(_0xf2bb46[_0xf2bb46[_0x8e74c2(0x19b)]=0x0]=_0x8e74c2(0x19b),_0xf2bb46[_0xf2bb46[_0x8e74c2(0x1bf)]=0x1]='Solved',_0xf2bb46[_0xf2bb46[_0x8e74c2(0x1cb)]=-0x1]=_0x8e74c2(0x1cb),_0xf2bb46))(_0x551ddc||{}),_0x5d0ba5=(_0x4eeeed=>(_0x4eeeed[_0x4eeeed[_0x8e74c2(0x1f6)]=0x0]='Unknown',_0x4eeeed[_0x4eeeed[_0x8e74c2(0x1a3)]=0x1]=_0x8e74c2(0x1a3),_0x4eeeed[_0x4eeeed['Reply']=0x2]=_0x8e74c2(0x19a),_0x4eeeed[_0x4eeeed['Edit']=0x3]=_0x8e74c2(0x1be),_0x4eeeed[_0x4eeeed['Delete']=0x4]=_0x8e74c2(0x1f7),_0x4eeeed[_0x4eeeed['Solve']=0x5]=_0x8e74c2(0x1a0),_0x4eeeed[_0x4eeeed[_0x8e74c2(0x1cb)]=-0x1]=_0x8e74c2(0x1cb),_0x4eeeed))(_0x5d0ba5||{});const _0x4747c0=_0x487d92=>_0x92db82[_0x8e74c2(0x1ba)](new Date(+_0x487d92))['format']('YYYY/MM/DD\x20HH:mm'),_0x56921a=async(_0x19562d,_0x1f9fe2)=>{const _0x56a905=_0x8e74c2,_0x1e97b7=_0x19562d[_0x56a905(0x1dd)](_0x92db82[_0x56a905(0x1d0)]),_0x1f1574=_0x19562d[_0x56a905(0x1dd)](_0x206d9f[_0x56a905(0x18c)]);_0x1f9fe2[_0x56a905(0x1d9)](_0x454c6c=>{const _0x1d7375=_0x56a905;_0x1e97b7[_0x1d7375(0x196)](_0x454c6c)&&_0x1f9fe2[_0x1d7375(0x1c0)](_0x454c6c);}),_0x1f9fe2[_0x56a905(0x1c8)]&&(await _0x1f1574[_0x56a905(0x1dd)](_0x56a905(0x1af),{'params':{'userIDs':[..._0x1f9fe2]}}))[_0x56a905(0x1e1)]['users'][_0x56a905(0x1d9)](_0x9f0395=>{const _0x2b92ef=_0x56a905;_0x9f0395&&_0x1e97b7[_0x2b92ef(0x1e4)](_0x9f0395);});};var _0x58b32f=Object[_0x8e74c2(0x18f)],_0x5bef24=(_0x1c7541,_0x2b97da,_0x5953a1,_0x469327)=>{const _0x8e6fb7=_0x8e74c2;for(var _0x35a58f=_0x469327>0x1?void 0x0:_0x469327?_0x58b32f(_0x2b97da,_0x5953a1):_0x2b97da,_0xb16469=_0x1c7541[_0x8e6fb7(0x193)]-0x1,_0x259695;_0xb16469>=0x0;_0xb16469--)(_0x259695=_0x1c7541[_0xb16469])&&(_0x35a58f=_0x259695(_0x35a58f)||_0x35a58f);return _0x35a58f;},_0x5f53ff=(_0x43018d,_0x11e81f)=>(_0x2878d7,_0x4d1288)=>_0x11e81f(_0x2878d7,_0x4d1288,_0x43018d);let _0x2b59de=class extends _0x92db82['Disposable']{constructor(_0x1cdffe,_0x5bbef7,_0x513eaa,_0x5db3ed){const _0x1a6316=_0x8e74c2;super(),this['_commentService']=_0x1cdffe,this[_0x1a6316(0x1e8)]=_0x5bbef7,this[_0x1a6316(0x201)]=_0x513eaa,this[_0x1a6316(0x20b)]=_0x5db3ed,this[_0x1a6316(0x1b8)](),this['_initUserSync']();}['_initUserSync'](){const _0x3dacb0=_0x8e74c2;this[_0x3dacb0(0x1ad)](this['_threadCommentModel'][_0x3dacb0(0x1f9)][_0x3dacb0(0x19f)](_0x3e3a06[_0x3dacb0(0x1c3)](0x10))[_0x3dacb0(0x1ca)](_0x3e2b25=>{const _0x1dac19=_0x3dacb0,_0x546cfa=new Set();_0x3e2b25[_0x1dac19(0x1d9)](_0x700b68=>{const _0x310119=_0x1dac19;switch(_0x700b68['type']){case'add':{const _0x1a4bd7=_0x700b68['payload'][_0x310119(0x1ee)];_0x546cfa[_0x310119(0x1cd)](_0x1a4bd7);break;}}}),_0x56921a(this['_injector'],_0x546cfa);}));}[_0x8e74c2(0x1b8)](){const _0x437c7c=_0x8e74c2;this['disposeWithMe'](this[_0x437c7c(0x1f0)][_0x437c7c(0x1f9)][_0x437c7c(0x1ca)](async _0x220669=>{const _0x2121fa=_0x437c7c;var _0x346fff,_0x470513,_0x16ee0d,_0x3a312a;const _0x567a48=(_0x346fff=this[_0x2121fa(0x1e8)][_0x2121fa(0x209)](_0x220669['unitId'])[_0x2121fa(0x1cf)](_0x11782c=>_0x11782c[_0x2121fa(0x1bb)]===_0x220669['threadId']))==null?void 0x0:_0x346fff[_0x2121fa(0x1e9)];if(!_0x567a48)return;const {unitId:_0x12e60a,subUnitId:_0x5333a7}=_0x567a48;switch(_0x220669[_0x2121fa(0x1f3)]&&this[_0x2121fa(0x201)][_0x2121fa(0x1e4)](_0x220669[_0x2121fa(0x1f3)]),_0x220669[_0x2121fa(0x1b5)]){case _0x5d0ba5[_0x2121fa(0x1a3)]:break;case _0x5d0ba5[_0x2121fa(0x19a)]:{this[_0x2121fa(0x1e8)][_0x2121fa(0x1fc)](_0x12e60a,_0x5333a7,{'unitId':_0x12e60a,'subUnitId':_0x5333a7,'ref':'','id':_0x220669[_0x2121fa(0x1a5)],'dT':_0x4747c0(+_0x220669['createTimestamp']),'threadId':_0x220669[_0x2121fa(0x1bb)],'personId':(_0x16ee0d=(_0x470513=_0x220669['user'])==null?void 0x0:_0x470513[_0x2121fa(0x20a)])!=null?_0x16ee0d:_0x220669[_0x2121fa(0x192)],'text':JSON['parse'](_0x220669[_0x2121fa(0x1ec)]),'parentId':_0x567a48['id']});break;}case _0x5d0ba5[_0x2121fa(0x1f7)]:{const _0x13ea52=this[_0x2121fa(0x1e8)][_0x2121fa(0x18b)](_0x12e60a,_0x5333a7,_0x220669[_0x2121fa(0x1a5)]);_0x13ea52&&_0x13ea52[_0x2121fa(0x1f4)]&&this['_threadCommentModel']['deleteComment'](_0x12e60a,_0x5333a7,_0x220669[_0x2121fa(0x1a5)]);break;}case _0x5d0ba5[_0x2121fa(0x1be)]:{this[_0x2121fa(0x1e8)][_0x2121fa(0x1d6)](_0x12e60a,_0x5333a7,{'commentId':_0x220669[_0x2121fa(0x1a5)],'text':JSON[_0x2121fa(0x207)](_0x220669[_0x2121fa(0x1ec)])});break;}case _0x5d0ba5['Solve']:{const _0x54cfa6=(_0x3a312a=this[_0x2121fa(0x1e8)][_0x2121fa(0x209)](_0x220669[_0x2121fa(0x19d)])['find'](_0x1fad21=>_0x1fad21[_0x2121fa(0x1bb)]===_0x220669['threadId']))==null?void 0x0:_0x3a312a[_0x2121fa(0x1e9)];_0x54cfa6&&this[_0x2121fa(0x1e8)]['resolveComment'](_0x12e60a,_0x5333a7,_0x54cfa6['id'],_0x220669[_0x2121fa(0x1fa)]===_0x551ddc[_0x2121fa(0x1bf)]);break;}}}));}};_0x2b59de=_0x5bef24([_0x5f53ff(0x0,_0x92db82[_0x8e74c2(0x1d7)](_0x3f0ee1[_0x8e74c2(0x1e6)])),_0x5f53ff(0x1,_0x92db82['Inject'](_0x3dde62[_0x8e74c2(0x1b9)])),_0x5f53ff(0x2,_0x92db82[_0x8e74c2(0x1d7)](_0x92db82[_0x8e74c2(0x1d0)])),_0x5f53ff(0x3,_0x92db82[_0x8e74c2(0x1d7)](_0x92db82[_0x8e74c2(0x1a6)]))],_0x2b59de);const _0x410026=_0x8e74c2(0x1e7),_0x22114d={};var _0x4d7156=Object['getOwnPropertyDescriptor'],_0x2ed38e=(_0x51218d,_0x5a693d,_0x19db9a,_0x3d3fa6)=>{for(var _0x1646b0=_0x3d3fa6>0x1?void 0x0:_0x3d3fa6?_0x4d7156(_0x5a693d,_0x19db9a):_0x5a693d,_0x40da6f=_0x51218d['length']-0x1,_0xd179e6;_0x40da6f>=0x0;_0x40da6f--)(_0xd179e6=_0x51218d[_0x40da6f])&&(_0x1646b0=_0xd179e6(_0x1646b0)||_0x1646b0);return _0x1646b0;},_0x403db3=(_0x58d44f,_0x5bf2f4)=>(_0x27c06b,_0x1650a3)=>_0x5bf2f4(_0x27c06b,_0x1650a3,_0x58d44f);function _0x489f18(_0x525e13,_0x1645c0){const _0x5066ed=_0x8e74c2,_0x458516=_0x525e13[_0x5066ed(0x1de)][0x0];return{..._0x1645c0,'id':_0x458516[_0x5066ed(0x1a5)],'resolved':_0x525e13[_0x5066ed(0x1fa)]===0x1,'dT':_0x4747c0(_0x458516['createTimestamp']),'personId':_0x458516['userId'],'threadId':_0x458516[_0x5066ed(0x1bb)]};}function _0x53f8c0(_0x45f841,_0x1ffbfa,_0x4ce031){const _0x3ca480=_0x8e74c2;var _0x1ae60e,_0x4ed7df;if(((_0x4ed7df=(_0x1ae60e=_0x45f841==null?void 0x0:_0x45f841[_0x3ca480(0x1de)])==null?void 0x0:_0x1ae60e[_0x3ca480(0x193)])!=null?_0x4ed7df:0x0)>0x0){const _0x584678=(_0x2904ea,_0x48566e)=>({'id':_0x2904ea[_0x3ca480(0x1a5)],'threadId':_0x2904ea[_0x3ca480(0x1bb)],'dT':_0x4747c0(_0x2904ea[_0x3ca480(0x1d2)]),'personId':_0x2904ea[_0x3ca480(0x192)],'resolved':_0x45f841[_0x3ca480(0x1fa)]===_0x551ddc[_0x3ca480(0x1bf)],'unitId':_0x1ffbfa,'subUnitId':_0x4ce031,'text':JSON[_0x3ca480(0x207)](_0x2904ea[_0x3ca480(0x1ec)]),'parentId':_0x48566e}),_0x2b7b7c=_0x584678(_0x45f841['replies'][0x0]);return{..._0x2b7b7c,'children':_0x45f841[_0x3ca480(0x1de)][_0x3ca480(0x1bc)](0x1)[_0x3ca480(0x206)](_0x116613=>_0x584678(_0x116613,_0x2b7b7c['id']))};}return null;}let _0x15d3de=class{constructor(_0x449f25,_0x227d87,_0x1135e0){const _0x380add=_0x8e74c2;this[_0x380add(0x1f2)]=_0x449f25,this[_0x380add(0x201)]=_0x227d87,this[_0x380add(0x1c5)]=_0x1135e0;}async['addComment'](_0x5b3f77){const _0x401911=_0x8e74c2;var _0x1d72d0,_0x418e73;const {parentId:_0x591483,unitId:_0x4be70c,text:_0xf0de95,threadId:_0x4ff4e0}=_0x5b3f77,_0x1e8540=(_0x418e73=(_0x1d72d0=_0xf0de95[_0x401911(0x1df)])==null?void 0x0:_0x1d72d0['filter'](_0x1cdc50=>_0x1cdc50[_0x401911(0x1d5)]===_0x92db82[_0x401911(0x1b1)][_0x401911(0x1b2)])[_0x401911(0x206)](_0x227b0a=>_0x227b0a[_0x401911(0x1a1)]))!=null?_0x418e73:[],_0x175705=JSON[_0x401911(0x1d3)](_0xf0de95),_0x524676=(await this[_0x401911(0x1c5)][_0x401911(0x1d1)](_0x4be70c))['getMemberID']();if(_0x591483){const _0x4dd3ef={'memberId':_0x524676,'unitId':_0x4be70c,'content':_0x175705,'mention':_0x1e8540,'threadId':_0x4ff4e0},_0x41d7fb=(await this[_0x401911(0x1f2)][_0x401911(0x200)](_0x401911(0x1b3)+_0x4be70c+'/reply',{'body':_0x4dd3ef}))['body'][_0x401911(0x1c2)];return{..._0x5b3f77,'id':_0x41d7fb[_0x401911(0x1a5)],'dT':_0x92db82[_0x401911(0x1ba)](+_0x41d7fb[_0x401911(0x1d2)])[_0x401911(0x208)](_0x401911(0x1c1)),'personId':_0x41d7fb['userId']};}else{const _0x140593={'memberId':_0x524676,'unitId':_0x4be70c,'content':_0x175705,'mention':_0x1e8540},_0x4cbdd6=await this['_httpService'][_0x401911(0x200)](_0x401911(0x1b3)+_0x4be70c+_0x401911(0x20c),{'body':_0x140593});return _0x489f18(_0x4cbdd6[_0x401911(0x1e1)][_0x401911(0x1a2)],_0x5b3f77);}}async['updateComment'](_0x1dc6bc){const _0x116c54=_0x8e74c2;var _0x28c61f,_0x2a0314;const {text:_0x5133a9,unitId:_0x148485}=_0x1dc6bc,_0x1b9cdf=(_0x2a0314=(_0x28c61f=_0x5133a9[_0x116c54(0x1df)])==null?void 0x0:_0x28c61f['filter'](_0x148650=>_0x148650['rangeType']===_0x92db82[_0x116c54(0x1b1)]['COMMENT'])[_0x116c54(0x206)](_0x5e0880=>_0x5e0880[_0x116c54(0x1a1)]))!=null?_0x2a0314:[],_0x289772=JSON[_0x116c54(0x1d3)](_0x5133a9),_0x1e5319=_0x1dc6bc[_0x116c54(0x1bb)],_0x1d0d23=_0x1dc6bc['id'],_0xd50343={'memberId':(await this[_0x116c54(0x1c5)][_0x116c54(0x1d1)](_0x148485))[_0x116c54(0x1f8)](),'unitId':_0x148485,'threadId':_0x1e5319,'mention':_0x1b9cdf,'content':_0x289772,'replyId':_0x1d0d23},_0x1a379=await this[_0x116c54(0x1f2)][_0x116c54(0x200)]('/universer-api/comment/unit/'+_0x148485+_0x116c54(0x202),{'body':_0xd50343});return!_0x1a379[_0x116c54(0x1e1)][_0x116c54(0x18a)]||_0x1a379[_0x116c54(0x1e1)]['error']['code']===0x1;}async['resolveComment'](_0x57b868){const _0x2f828a=_0x8e74c2,{unitId:_0x469947}=_0x57b868,_0x40f299=_0x57b868[_0x2f828a(0x1bb)],_0x4b1450={'memberId':this[_0x2f828a(0x201)][_0x2f828a(0x1eb)]()['userID'],'unitId':_0x469947,'threadId':_0x40f299,'solved':_0x57b868[_0x2f828a(0x20d)]?_0x551ddc[_0x2f828a(0x1bf)]:_0x551ddc[_0x2f828a(0x19b)]},_0x28394c=await this[_0x2f828a(0x1f2)][_0x2f828a(0x200)](_0x2f828a(0x1b3)+_0x469947+'/solved',{'body':_0x4b1450});return!_0x28394c[_0x2f828a(0x1e1)][_0x2f828a(0x18a)]||_0x28394c[_0x2f828a(0x1e1)][_0x2f828a(0x18a)][_0x2f828a(0x1b4)]===0x1;}async[_0x8e74c2(0x18e)](_0x1ed241,_0x3c37a0,_0x3ebf5d,_0x5e4492){const _0x1db10b=_0x8e74c2,_0x531762={'memberId':(await this[_0x1db10b(0x1c5)]['requireSession'](_0x1ed241))[_0x1db10b(0x1f8)](),'threadId':_0x3ebf5d,'replyId':_0x5e4492,'unitId':_0x1ed241},_0x4b5597=await this['_httpService'][_0x1db10b(0x200)](_0x1db10b(0x1b3)+_0x1ed241+'/delete',{'body':_0x531762});return!_0x4b5597[_0x1db10b(0x1e1)][_0x1db10b(0x18a)]||_0x4b5597[_0x1db10b(0x1e1)][_0x1db10b(0x18a)][_0x1db10b(0x1b4)]===0x1;}async[_0x8e74c2(0x1b7)](_0x5ea5dc,_0x1188ff,_0x48aa5b){const _0x14f9b3=_0x8e74c2,_0x20109b={'unitId':_0x5ea5dc,'threadId':_0x48aa5b},_0x13db2c=await this[_0x14f9b3(0x1f2)][_0x14f9b3(0x200)](_0x14f9b3(0x1b3)+_0x5ea5dc+_0x14f9b3(0x1fd),{'body':_0x20109b}),_0x16d296=_0x48aa5b[_0x14f9b3(0x206)](_0x4aab23=>_0x53f8c0(_0x13db2c[_0x14f9b3(0x1e1)]['comments'][_0x4aab23],_0x5ea5dc,_0x1188ff))[_0x14f9b3(0x1cc)](Boolean);return Object[_0x14f9b3(0x1e0)](_0x13db2c[_0x14f9b3(0x1e1)]['users'])['forEach'](_0x16d32d=>{const _0x8520c=_0x14f9b3;this['_userService'][_0x8520c(0x1e4)](_0x16d32d);}),_0x16d296;}[_0x8e74c2(0x1e5)](_0x6b0e8c){const _0x40459e=_0x8e74c2;return{'id':_0x6b0e8c['id'],'threadId':_0x6b0e8c[_0x40459e(0x1bb)],'ref':_0x6b0e8c[_0x40459e(0x1c9)]};}};_0x15d3de=_0x2ed38e([_0x403db3(0x0,_0x92db82['Inject'](_0x206d9f[_0x8e74c2(0x18c)])),_0x403db3(0x1,_0x92db82['Inject'](_0x92db82[_0x8e74c2(0x1d0)])),_0x403db3(0x2,_0x92db82[_0x8e74c2(0x1d7)](_0x3f0ee1[_0x8e74c2(0x19c)]))],_0x15d3de);var _0x1b8f85=Object['getOwnPropertyDescriptor'],_0x33864e=(_0x4d0d48,_0x32578d,_0x2912b4,_0x4add0d)=>{for(var _0x3e7161=_0x4add0d>0x1?void 0x0:_0x4add0d?_0x1b8f85(_0x32578d,_0x2912b4):_0x32578d,_0x537b6d=_0x4d0d48['length']-0x1,_0x1f0dc8;_0x537b6d>=0x0;_0x537b6d--)(_0x1f0dc8=_0x4d0d48[_0x537b6d])&&(_0x3e7161=_0x1f0dc8(_0x3e7161)||_0x3e7161);return _0x3e7161;},_0x864310=(_0x312da2,_0x29f58c)=>(_0x2e1df1,_0x2a0301)=>_0x29f58c(_0x2e1df1,_0x2a0301,_0x312da2);let _0x1b82f1=class extends _0x92db82[_0x8e74c2(0x1a7)]{constructor(_0x381e41,_0x5812dc){const _0x49643f=_0x8e74c2;super(),this[_0x49643f(0x18d)]=_0x381e41,this['_threadCommentDataSource']=_0x5812dc,this[_0x49643f(0x1ac)]();}[_0x8e74c2(0x1ac)](){const _0x1a4247=_0x8e74c2;this[_0x1a4247(0x18d)][_0x1a4247(0x1aa)]=this[_0x1a4247(0x1ea)],this[_0x1a4247(0x18d)][_0x1a4247(0x1a9)]=!0x1;}};_0x1b82f1=_0x33864e([_0x864310(0x0,_0x3dde62['IThreadCommentDataSourceService']),_0x864310(0x1,_0x92db82[_0x8e74c2(0x1d7)](_0x15d3de))],_0x1b82f1);var _0x527b89=Object['defineProperty'],_0x185feb=Object['getOwnPropertyDescriptor'],_0x1a4e11=(_0x301d90,_0x2afb90,_0x43ef52)=>_0x2afb90 in _0x301d90?_0x527b89(_0x301d90,_0x2afb90,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x43ef52}):_0x301d90[_0x2afb90]=_0x43ef52,_0x3538c5=(_0x223611,_0x1cd909,_0x25dca3,_0x28d4e5)=>{const _0x4ef8d5=_0x8e74c2;for(var _0x7a5ead=_0x28d4e5>0x1?void 0x0:_0x28d4e5?_0x185feb(_0x1cd909,_0x25dca3):_0x1cd909,_0x3daec4=_0x223611[_0x4ef8d5(0x193)]-0x1,_0x1644f0;_0x3daec4>=0x0;_0x3daec4--)(_0x1644f0=_0x223611[_0x3daec4])&&(_0x7a5ead=_0x1644f0(_0x7a5ead)||_0x7a5ead);return _0x7a5ead;},_0x207ce0=(_0x3b783e,_0x550928)=>(_0x2c4955,_0x348e30)=>_0x550928(_0x2c4955,_0x348e30,_0x3b783e),_0x30e433=(_0x4c7e6f,_0x39628f,_0x114e97)=>_0x1a4e11(_0x4c7e6f,typeof _0x39628f!=_0x8e74c2(0x203)?_0x39628f+'':_0x39628f,_0x114e97);_0x4afe61['UniverThreadCommentDataSourcePlugin']=class extends _0x92db82[_0x8e74c2(0x1ce)]{constructor(_0x16114d=_0x22114d,_0x360940,_0x55096d){const _0x3cbb9e=_0x8e74c2;super(),this['_config']=_0x16114d,this[_0x3cbb9e(0x20b)]=_0x360940,this['_configService']=_0x55096d;const {..._0x3c8fa4}=_0x92db82[_0x3cbb9e(0x1c7)]({},_0x22114d,this[_0x3cbb9e(0x204)]);this['_configService'][_0x3cbb9e(0x1a4)](_0x410026,_0x3c8fa4);}[_0x8e74c2(0x1c6)](){[[_0x15d3de],[_0x1b82f1],[_0x2b59de]]['forEach'](_0x332ff7=>{const _0x52b7a2=_0x252d;this[_0x52b7a2(0x20b)]['add'](_0x332ff7);});}[_0x8e74c2(0x1d4)](){const _0x364541=_0x8e74c2;this['_injector'][_0x364541(0x1dd)](_0x1b82f1),this['_injector'][_0x364541(0x1dd)](_0x2b59de);}},_0x30e433(_0x4afe61[_0x8e74c2(0x190)],_0x8e74c2(0x1e3),_0x2b801f),_0x30e433(_0x4afe61[_0x8e74c2(0x190)],_0x8e74c2(0x1b5),_0x92db82['UniverInstanceType']['UNIVER_UNKNOWN']),_0x4afe61[_0x8e74c2(0x190)]=_0x3538c5([_0x92db82[_0x8e74c2(0x1fe)](_0x164632['UniverThreadCommentUIPlugin'],_0x3f0ee1['UniverCollaborationClientPlugin'],_0x3ada5f[_0x8e74c2(0x1da)]),_0x207ce0(0x1,_0x92db82[_0x8e74c2(0x1d7)](_0x92db82[_0x8e74c2(0x1a6)])),_0x207ce0(0x2,_0x92db82[_0x8e74c2(0x1ae)])],_0x4afe61['UniverThreadCommentDataSourcePlugin']),Object[_0x8e74c2(0x194)](_0x4afe61,Symbol[_0x8e74c2(0x1ef)],{'value':_0x8e74c2(0x199)});}));function _0x252d(_0x1bfa8,_0x298735){_0x1bfa8=_0x1bfa8-0x18a;const _0x35a6d6=_0x35a6();let _0x252da4=_0x35a6d6[_0x1bfa8];return _0x252da4;}function _0x35a6(){const _0x499eb8=['disposeWithMe','IConfigService','/universer-api/user/list','UniverCore','CustomRangeType','COMMENT','/universer-api/comment/unit/','code','type','856580qerIsf','listComments','_init','ThreadCommentModel','dayjs','threadId','slice','UniverNetwork','Edit','Solved','delete','YYYY/MM/DD\x20HH:mm','reply','bufferTime','object','_sessionService','onStarting','merge','size','ref','subscribe','UNRECOGNIZED','filter','add','Plugin','find','UserManagerService','requireSession','createTimestamp','stringify','onReady','rangeType','updateComment','Inject','UniverProCollaborationClient','forEach','UniverLicensePlugin','302100qVGovs','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','replies','customRanges','values','body','@univerjs/network','pluginName','addUser','saveCommentToSnapshot','CommentService','thread-comment-data-source.config','_threadCommentModel','root','_threadCommentDataSource','getCurrentUser','content','1718150YyAUEa','personId','toStringTag','_commentService','@univerjs-pro/collaboration-client','_httpService','user','parentId','7425495vsAxOg','Unknown','Delete','getMemberID','commentUpdate$','solved','amd','addComment','/list','DependentOn','109264WNtXao','post','_userService','/edit','symbol','_config','2593434lCkAkI','map','parse','format','getUnit','userID','_injector','/add','resolved','91ukVzKn','error','getComment','HTTPService','_threadCommentDataSourceService','deleteComment','getOwnPropertyDescriptor','UniverThreadCommentDataSourcePlugin','exports','userId','length','defineProperty','@univerjs/thread-comment','getUser','rxjs','UniverProThreadCommentDatasource','Module','Reply','OpenOrReOpen','CollaborationSessionService','unitId','UniverThreadCommentUi','pipe','Solve','rangeId','comment','Add','setConfig','replyId','Injector','Disposable','3215bNELiz','syncUpdateMutationToColla','dataSource','340nwhzpC','_initDataSource'];_0x35a6=function(){return _0x499eb8;};return _0x35a6();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.13.0-insiders.20251223-857805c",
3
+ "version": "0.14.0-insiders.20251222-4efcfbb",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.13.0-insiders.20251223-857805c",
49
- "@univerjs-pro/license": "0.13.0-insiders.20251223-857805c",
50
- "@univerjs/network": "0.13.0-insiders.20251223-857805c",
51
- "@univerjs/core": "0.13.0-insiders.20251223-857805c",
48
+ "@univerjs-pro/collaboration-client": "0.14.0-insiders.20251222-4efcfbb",
49
+ "@univerjs-pro/license": "0.14.0-insiders.20251222-4efcfbb",
50
+ "@univerjs/core": "0.14.0-insiders.20251222-4efcfbb",
51
+ "@univerjs/network": "0.14.0-insiders.20251222-4efcfbb",
52
52
  "@univerjs/protocol": "0.1.47",
53
- "@univerjs/thread-comment-ui": "0.13.0-insiders.20251223-857805c",
54
- "@univerjs/thread-comment": "0.13.0-insiders.20251223-857805c"
53
+ "@univerjs/thread-comment": "0.14.0-insiders.20251222-4efcfbb",
54
+ "@univerjs/thread-comment-ui": "0.14.0-insiders.20251222-4efcfbb"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
59
  "vite": "^7.2.7",
60
60
  "vitest": "^4.0.15",
61
- "@univerjs-infra/shared": "0.13.0"
61
+ "@univerjs-infra/shared": "0.14.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",